diff --git a/docs/assets/scripts/search.js b/docs/assets/scripts/search.js index 049ab30a..ead4efa0 100644 --- a/docs/assets/scripts/search.js +++ b/docs/assets/scripts/search.js @@ -373,4 +373,12 @@ hide(); } }); + + // We're using Turbo, so when a user searches for something, visits a result, and presses the back button, the search + // UI will still be visible but not interactive. This removes the search UI when Turbo renders a page so they don't + // get trapped. + window.addEventListener('turbo:render', () => { + document.body.classList.remove('search-visible'); + document.querySelectorAll('.search__overlay, .search__dialog').forEach(el => el.remove()); + }); })(); diff --git a/docs/pages/resources/changelog.md b/docs/pages/resources/changelog.md index d50d8cda..c6f73cec 100644 --- a/docs/pages/resources/changelog.md +++ b/docs/pages/resources/changelog.md @@ -12,6 +12,11 @@ Components with the Experimental bad New versions of Shoelace are released as-needed and generally occur when a critical mass of changes have accumulated. At any time, you can see what's coming in the next release by visiting [next.shoelace.style](https://next.shoelace.style). +## Next + +- Fixed a bug in `` that resulted in improper spacing between the label and the required asterisk [#1540] +- Updated `@ctrl/tinycolor` to 4.0.1 [#1542] + ## 2.8.0 - Added `--isolatedModules` and `--verbatimModuleSyntax` to `tsconfig.json`. For anyone directly importing event types, they no longer provide a default export due to these options being enabled. For people using the `events/event.js` file directly, there is no change. @@ -23,7 +28,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti - Improved expand/collapse behavior of `` to work more like users expect [#1521] - Improved `` so labels truncate properly instead of getting chopped and overflowing - Removed the extra `React.Component` around `@lit-labs/react` wrapper. [#1531] -- Upgrade `@lit-labs/react` to v2.0.1. [#1531] +- Updated `@lit-labs/react` to v2.0.1. [#1531] ## 2.7.0 diff --git a/package-lock.json b/package-lock.json index 566d8b4b..9379318a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.8.0", "license": "MIT", "dependencies": { - "@ctrl/tinycolor": "^3.5.0", + "@ctrl/tinycolor": "^4.0.1", "@floating-ui/dom": "^1.2.1", "@lit-labs/react": "^2.0.1", "@shoelace-style/animations": "^1.1.0", @@ -833,11 +833,11 @@ } }, "node_modules/@ctrl/tinycolor": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.5.0.tgz", - "integrity": "sha512-tlJpwF40DEQcfR/QF+wNMVyGMaO9FQp6Z1Wahj4Gk3CJQYHwA2xVG7iKDFdW6zuxZY9XWOpGcfNCTsX4McOsOg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-4.0.1.tgz", + "integrity": "sha512-dfimuE1mfaqL8P8jyQzdk9yFeFUWCyhjK5VyydXgDtQO0fezr6aWaGauHnlI07BZBIF45gahb0oxJjkUcylDwQ==", "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/@custom-elements-manifest/analyzer": { @@ -17913,9 +17913,9 @@ "dev": true }, "@ctrl/tinycolor": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.5.0.tgz", - "integrity": "sha512-tlJpwF40DEQcfR/QF+wNMVyGMaO9FQp6Z1Wahj4Gk3CJQYHwA2xVG7iKDFdW6zuxZY9XWOpGcfNCTsX4McOsOg==" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-4.0.1.tgz", + "integrity": "sha512-dfimuE1mfaqL8P8jyQzdk9yFeFUWCyhjK5VyydXgDtQO0fezr6aWaGauHnlI07BZBIF45gahb0oxJjkUcylDwQ==" }, "@custom-elements-manifest/analyzer": { "version": "0.8.3", diff --git a/package.json b/package.json index 11181f44..5cca9356 100644 --- a/package.json +++ b/package.json @@ -25,15 +25,8 @@ "./dist/react/*": "./dist/react/*", "./dist/translations/*": "./dist/translations/*" }, - "files": [ - "dist", - "cdn" - ], - "keywords": [ - "web components", - "custom elements", - "components" - ], + "files": ["dist", "cdn"], + "keywords": ["web components", "custom elements", "components"], "repository": { "type": "git", "url": "git+https://github.com/shoelace-style/shoelace.git" @@ -67,7 +60,7 @@ "node": ">=14.17.0" }, "dependencies": { - "@ctrl/tinycolor": "^3.5.0", + "@ctrl/tinycolor": "^4.0.1", "@floating-ui/dom": "^1.2.1", "@lit-labs/react": "^2.0.1", "@shoelace-style/animations": "^1.1.0", @@ -140,9 +133,6 @@ "user-agent-data-types": "^0.3.0" }, "lint-staged": { - "*.{ts,js}": [ - "eslint --max-warnings 0 --cache --fix", - "prettier --write" - ] + "*.{ts,js}": ["eslint --max-warnings 0 --cache --fix", "prettier --write"] } } diff --git a/scripts/build.js b/scripts/build.js index d27793b5..e46f4ef9 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -53,6 +53,10 @@ async function buildTheDocs(watch = false) { output.push(data.toString()); }); + child.stderr.on('data', data => { + output.push(data.toString()); + }); + if (watch) { // The process doesn't terminate in watch mode so, before resolving, we listen for a known signal in stdout that // tells us when the first build completes. diff --git a/src/components/switch/switch.component.ts b/src/components/switch/switch.component.ts index 232d0333..2ec28063 100644 --- a/src/components/switch/switch.component.ts +++ b/src/components/switch/switch.component.ts @@ -215,7 +215,9 @@ export default class SlSwitch extends ShoelaceElement implements ShoelaceFormCon - +
+ +
`; }