From 6386c33f939b5fa310e8eb5a51412c6151de75d2 Mon Sep 17 00:00:00 2001 From: metonym Date: Sun, 26 Feb 2023 17:51:50 -0800 Subject: [PATCH 001/566] fix: `readonly` should override `error` behavior in `TextInput`, `NumberInput` (#1666) * fix(text-input): avoid overlapping readonly/invalid icons * fix(number-input): avoid overlapping readonly/invalid icons * fix: readonly inputs cannot be invalid Addresses https://github.com/carbon-design-system/carbon-components-svelte/pull/1666#pullrequestreview-1314558645 --- src/NumberInput/NumberInput.svelte | 23 ++++++++++++----------- src/TextInput/TextInput.svelte | 30 ++++++++++++++++-------------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/src/NumberInput/NumberInput.svelte b/src/NumberInput/NumberInput.svelte index 2b0f76ee..e917c303 100644 --- a/src/NumberInput/NumberInput.svelte +++ b/src/NumberInput/NumberInput.svelte @@ -128,7 +128,7 @@ $: incrementLabel = translateWithId("increment"); $: decrementLabel = translateWithId("decrement"); $: error = - invalid || + (invalid && !readonly) || (!allowEmpty && value == null) || value > max || (typeof value === "number" && value < min); @@ -191,8 +191,8 @@ type="number" pattern="[0-9]*" aria-describedby="{errorId}" - data-invalid="{invalid || undefined}" - aria-invalid="{invalid || undefined}" + data-invalid="{(error) || undefined}" + aria-invalid="{(error) || undefined}" aria-label="{label ? undefined : ariaLabel}" disabled="{disabled}" id="{id}" @@ -211,16 +211,17 @@ on:blur on:paste /> - {#if invalid} - - {/if} - {#if !invalid && warn} - - {/if} {#if readonly} + {:else} + {#if invalid} + + {/if} + {#if !invalid && warn} + + {/if} {/if} {#if !hideSteppers}
diff --git a/src/TextInput/TextInput.svelte b/src/TextInput/TextInput.svelte index bf1ac1db..5b8b184a 100644 --- a/src/TextInput/TextInput.svelte +++ b/src/TextInput/TextInput.svelte @@ -95,6 +95,7 @@ }; $: isFluid = !!ctx && ctx.isFluid; + $: error = invalid && !readonly; $: helperId = `helper-${id}`; $: errorId = `error-${id}`; $: warnId = `warn-${id}`; @@ -161,29 +162,30 @@ class:bx--text-input__field-outer-wrapper--inline="{inline}" >
- {#if invalid} - - {/if} - {#if !invalid && warn} - - {/if} {#if readonly} + {:else} + {#if invalid} + + {/if} + {#if !invalid && warn} + + {/if} {/if} Date: Sun, 26 Feb 2023 20:53:43 -0500 Subject: [PATCH 002/566] v0.73.2 --- CHANGELOG.md | 7 +++++++ COMPONENT_INDEX.md | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a740e91d..eb98f6c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.73.2](https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.73.1...v0.73.2) (2023-02-27) + + +### Bug Fixes + +* `readonly` should override `error` behavior in `TextInput`, `NumberInput` ([#1666](https://github.com/carbon-design-system/carbon-components-svelte/issues/1666)) ([6386c33](https://github.com/carbon-design-system/carbon-components-svelte/commit/6386c33f939b5fa310e8eb5a51412c6151de75d2)), closes [/github.com/carbon-design-system/carbon-components-svelte/pull/1666#pullrequestreview-1314558645](https://github.com/carbon-design-system//github.com/carbon-design-system/carbon-components-svelte/pull/1666/issues/pullrequestreview-1314558645) + ### [0.73.1](https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.73.0...v0.73.1) (2023-02-19) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 08dac7db..8355f943 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -1,6 +1,6 @@ # Component Index -> 165 components exported from carbon-components-svelte@0.73.1. +> 165 components exported from carbon-components-svelte@0.73.2. ## Components diff --git a/package.json b/package.json index 6d21284c..816f9e12 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "carbon-components-svelte", - "version": "0.73.1", + "version": "0.73.2", "license": "Apache-2.0", "description": "Svelte implementation of the Carbon Design System", "svelte": "./src/index.js", From d2e471bbecbbaf24cad8fe1589e6363354a35471 Mon Sep 17 00:00:00 2001 From: Enrico Sacchetti Date: Sun, 26 Feb 2023 22:49:32 -0500 Subject: [PATCH 003/566] chore(github): provide contact links in issue template (#1669) --- .github/ISSUE_TEMPLATE/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..2c0a64f0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: Ask a question + url: https://github.com/carbon-design-system/carbon-components-svelte/discussions + about: Please ask and answer questions here. + - name: Carbon Design System Discord + url: https://discord.gg/J7JEUEkTRX + about: Chat with us on Discord. From 42349ebc61fdc8756fc5209d4cb63f4f9a63dce9 Mon Sep 17 00:00:00 2001 From: gabrielleecredera <92097847+gabrielleecredera@users.noreply.github.com> Date: Sat, 11 Mar 2023 19:38:44 +0000 Subject: [PATCH 004/566] fix(1684): hide helper text container in password input when not used (#1685) --- docs/src/pages/components/PasswordInput.svx | 4 ++++ src/TextInput/PasswordInput.svelte | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/src/pages/components/PasswordInput.svx b/docs/src/pages/components/PasswordInput.svx index 6f503974..a67c2099 100644 --- a/docs/src/pages/components/PasswordInput.svx +++ b/docs/src/pages/components/PasswordInput.svx @@ -50,3 +50,7 @@ Set prop `type` to `"text"` to toggle password visibility. ## Disabled state + +## With helper text + + diff --git a/src/TextInput/PasswordInput.svelte b/src/TextInput/PasswordInput.svelte index 3fe598a9..a8ce24b1 100644 --- a/src/TextInput/PasswordInput.svelte +++ b/src/TextInput/PasswordInput.svelte @@ -248,7 +248,7 @@ {invalidText}
{/if} - {#if !invalid && !warn && !isFluid && !inline} + {#if !invalid && !warn && !isFluid && !inline && helperText}
Date: Sat, 11 Mar 2023 14:52:20 -0500 Subject: [PATCH 005/566] v0.73.3 --- CHANGELOG.md | 7 +++++++ COMPONENT_INDEX.md | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb98f6c9..af445b66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.73.3](https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.73.2...v0.73.3) (2023-03-11) + + +### Bug Fixes + +* **1684:** hide helper text container in password input when not used ([#1685](https://github.com/carbon-design-system/carbon-components-svelte/issues/1685)) ([42349eb](https://github.com/carbon-design-system/carbon-components-svelte/commit/42349ebc61fdc8756fc5209d4cb63f4f9a63dce9)) + ### [0.73.2](https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.73.1...v0.73.2) (2023-02-27) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 8355f943..68bf2ffe 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -1,6 +1,6 @@ # Component Index -> 165 components exported from carbon-components-svelte@0.73.2. +> 165 components exported from carbon-components-svelte@0.73.3. ## Components diff --git a/package.json b/package.json index 816f9e12..8f20fb6f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "carbon-components-svelte", - "version": "0.73.2", + "version": "0.73.3", "license": "Apache-2.0", "description": "Svelte implementation of the Carbon Design System", "svelte": "./src/index.js", From 821233ab4f0bf247dea6a8aa32b79d15424ff059 Mon Sep 17 00:00:00 2001 From: Hyunseung Date: Thu, 16 Mar 2023 02:23:59 +0900 Subject: [PATCH 006/566] fix(text-input): correctly set input padding for warning state (#1688) Fixes #1687 --- src/TextInput/TextInput.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TextInput/TextInput.svelte b/src/TextInput/TextInput.svelte index 5b8b184a..a2f17580 100644 --- a/src/TextInput/TextInput.svelte +++ b/src/TextInput/TextInput.svelte @@ -202,7 +202,7 @@ class:bx--text-input="{true}" class:bx--text-input--light="{light}" class:bx--text-input--invalid="{error}" - class:bx--text-input--warn="{warn}" + class:bx--text-input--warning="{warn}" class:bx--text-input--sm="{size === 'sm'}" class:bx--text-input--xl="{size === 'xl'}" {...$$restProps} From ca40dd18c2af1bc755b857c39469427038f20ece Mon Sep 17 00:00:00 2001 From: metonym Date: Mon, 20 Mar 2023 18:27:29 -0700 Subject: [PATCH 007/566] fix(selectable-tile): include dispatched events in types (#1695) Fixes #1694 --- COMPONENT_INDEX.md | 16 +++++++++------- docs/src/COMPONENT_API.json | 2 ++ src/Tile/SelectableTile.svelte | 5 +++++ types/Tile/SelectableTile.svelte.d.ts | 2 ++ 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 68bf2ffe..55a43ee8 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -3272,13 +3272,15 @@ None. ### Events -| Event name | Type | Detail | -| :--------- | :-------- | :----- | -| click | forwarded | -- | -| mouseover | forwarded | -- | -| mouseenter | forwarded | -- | -| mouseleave | forwarded | -- | -| keydown | forwarded | -- | +| Event name | Type | Detail | +| :--------- | :--------- | :------------------ | +| select | dispatched | string | +| deselect | dispatched | string | +| click | forwarded | -- | +| mouseover | forwarded | -- | +| mouseenter | forwarded | -- | +| mouseleave | forwarded | -- | +| keydown | forwarded | -- | ## `SideNav` diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 50954669..578a31d6 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -10544,6 +10544,8 @@ "moduleExports": [], "slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }], "events": [ + { "type": "dispatched", "name": "select", "detail": "string" }, + { "type": "dispatched", "name": "deselect", "detail": "string" }, { "type": "forwarded", "name": "click", "element": "label" }, { "type": "forwarded", "name": "mouseover", "element": "label" }, { "type": "forwarded", "name": "mouseenter", "element": "label" }, diff --git a/src/Tile/SelectableTile.svelte b/src/Tile/SelectableTile.svelte index a613a919..8c294310 100644 --- a/src/Tile/SelectableTile.svelte +++ b/src/Tile/SelectableTile.svelte @@ -1,4 +1,9 @@ - - diff --git a/docs/src/pages/_layout.svelte b/docs/src/pages/_layout.svelte index fa1074bb..b506dea7 100644 --- a/docs/src/pages/_layout.svelte +++ b/docs/src/pages/_layout.svelte @@ -12,10 +12,11 @@ SideNav, SideNavItems, SideNavMenuItem, + Theme, Tag, } from "carbon-components-svelte"; import LogoGithub from "carbon-icons-svelte/lib/LogoGithub.svelte"; - import Theme from "../components/Theme.svelte"; + import { theme } from "../store"; const deprecated = []; const new_components = []; @@ -38,7 +39,7 @@ - +
Date: Sun, 26 Mar 2023 05:18:42 +0900 Subject: [PATCH 011/566] docs(tag): fix typo (#1705) --- docs/src/pages/components/Tag.svx | 2 +- docs/src/pages/components/Theme.svx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/pages/components/Tag.svx b/docs/src/pages/components/Tag.svx index 85799b6e..b693a713 100644 --- a/docs/src/pages/components/Tag.svx +++ b/docs/src/pages/components/Tag.svx @@ -41,7 +41,7 @@ ## Custom icon -Note: rendering a custom icon cannnot be used with the filterable variant. +Note: rendering a custom icon cannot be used with the filterable variant. IBM Cloud diff --git a/docs/src/pages/components/Theme.svx b/docs/src/pages/components/Theme.svx index f00cb56d..9a5cab2f 100644 --- a/docs/src/pages/components/Theme.svx +++ b/docs/src/pages/components/Theme.svx @@ -12,7 +12,7 @@ The `Theme` component can dyanmically update the Carbon theme on the client-side The `all.css` StyleSheet uses [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) for dynamic theming. - + ## Default From 9c1b0c12789807ad264d2e5fd22eca2990d3c240 Mon Sep 17 00:00:00 2001 From: Gregor Wassmann Date: Sun, 26 Mar 2023 18:34:08 +0200 Subject: [PATCH 012/566] docs: fix layout for smaller screens (#1707) Fixes #1649 --- docs/src/global.css | 5 +++++ docs/src/layouts/ComponentLayout.svelte | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/src/global.css b/docs/src/global.css index fd8003b2..e154174f 100644 --- a/docs/src/global.css +++ b/docs/src/global.css @@ -33,6 +33,11 @@ html[theme="g90"] .code-override { overflow-x: auto; } +/* Addig this to the layout grid fixes overstretching. */ +.fix-overflow { + min-width: 0; +} + .token.tag, .token.operator { color: #6ea6ff; diff --git a/docs/src/layouts/ComponentLayout.svelte b/docs/src/layouts/ComponentLayout.svelte index e099d00a..9277ceed 100644 --- a/docs/src/layouts/ComponentLayout.svelte +++ b/docs/src/layouts/ComponentLayout.svelte @@ -66,7 +66,7 @@ - +

{component}

From c00df4021640c8697a37199ee2feb6348c79a23d Mon Sep 17 00:00:00 2001 From: metonym Date: Sun, 26 Mar 2023 12:28:48 -0700 Subject: [PATCH 013/566] chore(a11y): silence new a11y warnings from svelte@3.57 (#1703) * chore(deps-dev): upgrade svelte to 3.57 * chore(deps-dev): upgrade svelte-check * chore(a11y): silence new a11y warnings from svelte@3.57 * Revert "chore(deps-dev): upgrade svelte-check" This reverts commit 78106587a2fd0e1bb07e86afc9fb49f596d2c24a. * fix(progress-step): remove unnecessary `aria-disabled` https://github.com/carbon-design-system/carbon-components-svelte/pull/1703#pullrequestreview-1357928713 --- docs/package.json | 2 +- docs/yarn.lock | 10 +++++----- package.json | 2 +- src/ContextMenu/ContextMenu.svelte | 1 + src/OverflowMenu/OverflowMenu.svelte | 1 + src/ProgressIndicator/ProgressStep.svelte | 1 - src/Tabs/Tabs.svelte | 1 + src/TreeView/TreeView.svelte | 1 + src/TreeView/TreeViewNode.svelte | 1 + src/TreeView/TreeViewNodeList.svelte | 1 + src/UIShell/HeaderNav.svelte | 1 + src/UIShell/HeaderNavMenu.svelte | 1 + src/UIShell/HeaderSearch.svelte | 1 + src/UIShell/SideNavMenu.svelte | 1 + yarn.lock | 10 +++++----- 15 files changed, 22 insertions(+), 13 deletions(-) diff --git a/docs/package.json b/docs/package.json index 71f0550e..0e44fd58 100644 --- a/docs/package.json +++ b/docs/package.json @@ -22,7 +22,7 @@ "prism-svelte": "^0.4.7", "prismjs": "^1.28.0", "remark-slug": "^6.0.0", - "svelte": "^3.49.0", + "svelte": "^3.57.0", "vite": "^3.0.9" }, "routify": { diff --git a/docs/yarn.lock b/docs/yarn.lock index 60209c7b..894928bd 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -165,7 +165,7 @@ bufferutil@^4.0.1: node-gyp-build "~3.7.0" carbon-components-svelte@../: - version "0.70.1" + version "0.73.3" dependencies: flatpickr "4.6.9" @@ -1280,10 +1280,10 @@ svelte-hmr@^0.14.12: resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.14.12.tgz#a127aec02f1896500b10148b2d4d21ddde39973f" integrity sha512-4QSW/VvXuqVcFZ+RhxiR8/newmwOCTlbYIezvkeN6302YFRE8cXy0naamHcjz8Y9Ce3ITTZtrHrIL0AGfyo61w== -svelte@^3.49.0: - version "3.49.0" - resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029" - integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA== +svelte@^3.57.0: + version "3.57.0" + resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.57.0.tgz#a3969cfe51f25f2a55e75f7b98dbd02c3af0980b" + integrity sha512-WMXEvF+RtAaclw0t3bPDTUe19pplMlfyKDsixbHQYgCWi9+O9VN0kXU1OppzrB9gPAvz4NALuoca2LfW2bOjTQ== symbol-tree@^3.2.4: version "3.2.4" diff --git a/package.json b/package.json index 9451373d..3f748ae6 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "sass": "^1.49.11", "standard-version": "^9.5.0", "sveld": "^0.18.0", - "svelte": "^3.51.0", + "svelte": "^3.57.0", "svelte-check": "^2.8.1", "typescript": "^4.7.4" }, diff --git a/src/ContextMenu/ContextMenu.svelte b/src/ContextMenu/ContextMenu.svelte index 68adc47a..80182eb9 100644 --- a/src/ContextMenu/ContextMenu.svelte +++ b/src/ContextMenu/ContextMenu.svelte @@ -153,6 +153,7 @@ }}" /> +
    {#if open} +
+
    {/if} +
      +
+