Releases: carbon-design-system/carbon-components-svelte
Releases · carbon-design-system/carbon-components-svelte
v0.98.1
Bug Fixes
- checkbox: prevent duplicate "check" event dispatches in Svelte 5 by @metonym (7b85c5f, #2465), closes #2467
- combo-box: ensure bind:value syncs when clearing via keyboard by @metonym (4f052e5, #2471), closes #2470
- combo-box: prevent dispatching initial "select" event in Svelte 5 by @metonym (38c428d, #2473), closes #2472
- content-switcher: fix focus management for Svelte 5 compatibility by @metonym (521d628, #2469), closes #2468
- data-table:
PropertyPathdepth limit supports 4 levels by @metonym (dd0b142, #2461) - structured-list: prevent dispatching initial "change" event in Svelte 5 by @metonym (5291165, #2479), closes #2478
- toolbar-search: replace
JSON.stringifywith custom deep comparison for filtered rows by @metonym (14a565b, #2459) - tooltip: prevent dispatching initial "close" event in Svelte 5 by @metonym (5abd2ba, #2476), closes #2475
Performance
- data-table: optimize
resolvePathutility by @metonym (41b7b6b, #2481) - tree-view: optimize node traversal by @metonym (7eeb844, #2483)
- tree-view: optimize
showNodeand batch active/selected updates by @metonym (e537ba3, #2483)
Full Changelog: v0.98.0...v0.98.1
v0.98.0
If using carbon-preprocess-svelte, version 0.11.18 or greater is required.
Features
- contained-list: add
ContainedListandContainedListItemby @metonym in #2453 (836f5e7) - heading: add
HeadingandSectioncomponents by @metonym in #2455 (c028489) - file-uploader: add
maxFileSizeprop by @metonym in #2451 (0eb5f9d) - slider: support warning state by @metonym in #2450 (303ec5c), closes #2444
Bug Fixes
Full Changelog: v0.97.0...v0.98.0
v0.97.0
If using carbon-preprocess-svelte, version 0.11.17 or greater is required.
Features
- file-uploader-button: support
iconby @metonym in #2434 (eed238c), closes #2433 - slider: support
invalidTextby @metonym in #2447 (9588710), closes #2445 - slider: support
readonlyby @metonym in #2448 (494cb55), closes #2443 - stack: add
alignandjustifyprops by @metonym in #2441 (9044402)
Bug Fixes
- file-uploader-button: prevent crash when
filesis cleared by @metonym in #2437 (5ce7a04), closes #2436 - slider: fix typo in
labelTextprop description by @metonym in #2446 (e4f4ed0) - tree-view-node: make
findParentTreeNodeandcomputeTreeLeafDepthstricter by @metonym in #2440 (d91295b)
Full Changelog: v0.96.0...v0.97.0
v0.96.0
Breaking Changes: Slot Renaming for Svelte 5 Compatibility
In Svelte 5, props and slots (#snippet) must have distinct names to avoid conflicts.
This release includes breaking changes to named slots across many components to ensure compatibility with Svelte 5. The changes follow a consistent pattern: slots that previously shared names with props have been renamed to use the Children suffix (e.g., labelText → labelChildren).
Renaming slots ensures that:
#snippetcan be used in Svelte 5 without prop/slot naming conflicts- Slot behavior still works in Svelte 3 and Svelte 4 with minimal breaking changes
Migration guide
Form Components: labelText → labelChildren
Svelte 3/4
<TextInput>
- <span slot="labelText">Custom Label</span>
+ <span slot="labelChildren">Custom Label</span>
</TextInput>
<ComboBox>
- <strong slot="labelText">Required: </strong>
+ <strong slot="labelChildren">Required: </strong>
</ComboBox>
<Checkbox>
- <span slot="labelText">I agree to the <a href="/terms">terms</a></span>
+ <span slot="labelChildren">I agree to the <a href="/terms">terms</a></span>
</Checkbox>
<Select>
- <span slot="labelText">Custom Label</span>
+ <span slot="labelChildren">Custom Label</span>
</Select>
<ProgressBar>
- <span slot="labelText">Custom Progress Label</span>
+ <span slot="labelChildren">Custom Progress Label</span>
</ProgressBar>Svelte 5
<TextInput>
{#snippet labelChildren()}
<span>Custom Label</span>
{/snippet}
</TextInput>
<ComboBox>
{#snippet labelChildren()}
<strong>Required: </strong>
{/snippet}
</ComboBox>
<Checkbox>
{#snippet labelChildren()}
<span>I agree to the <a href="/terms">terms</a></span>
{/snippet}
</Checkbox>
<Select>
{#snippet labelChildren()}
<span>Custom Label</span>
{/snippet}
</Select>
<ProgressBar>
{#snippet labelChildren()}
<span>Custom Progress Label</span>
{/snippet}
</ProgressBar>Notification Components: title/subtitle/caption → titleChildren/subtitleChildren/captionChildren
Svelte 3/4
<InlineNotification>
- <strong slot="title">Error: </strong>
- <span slot="subtitle">An internal server error occurred.</span>
+ <strong slot="titleChildren">Error: </strong>
+ <span slot="subtitleChildren">An internal server error occurred.</span>
</InlineNotification>
<ToastNotification>
- <strong slot="title">Error: </strong>
- <strong slot="subtitle">An internal server error occurred.</strong>
- <strong slot="caption">{new Date().toLocaleString()}</strong>
+ <strong slot="titleChildren">Error: </strong>
+ <strong slot="subtitleChildren">An internal server error occurred.</strong>
+ <strong slot="captionChildren">{new Date().toLocaleString()}</strong>
</ToastNotification>Svelte 5
<InlineNotification>
{#snippet titleChildren()}
<strong>Error: </strong>
{/snippet}
{#snippet subtitleChildren()}
<span>An internal server error occurred.</span>
{/snippet}
</InlineNotification>
<ToastNotification>
{#snippet titleChildren()}
<strong>Error: </strong>
{/snippet}
{#snippet subtitleChildren()}
<strong>An internal server error occurred.</strong>
{/snippet}
{#snippet captionChildren()}
<strong>{new Date().toLocaleString()}</strong>
{/snippet}
</ToastNotification>DataTable: title/description → titleChildren/descriptionChildren
Svelte 3/4
<DataTable headers={headers} rows={rows}>
- <h2 slot="title">Data Table Title</h2>
- <p slot="description">Table description text</p>
+ <h2 slot="titleChildren">Data Table Title</h2>
+ <p slot="descriptionChildren">Table description text</p>
</DataTable>Svelte 5
<DataTable headers={headers} rows={rows}>
{#snippet titleChildren()}
<h2>Data Table Title</h2>
{/snippet}
{#snippet descriptionChildren()}
<p>Table description text</p>
{/snippet}
</DataTable>Tile Group Components: legend prop → legendText, legendText slot → legendChildren
Svelte 3/4
-<TileGroup legend="Select a tile">
- <span slot="legendText">Custom Legend</span>
+<TileGroup legendText="Select a tile">
+ <span slot="legendChildren">Custom Legend</span>
</TileGroup>
-<SelectableTileGroup legend="Choose one">
+<SelectableTileGroup legendText="Choose one">
<!-- tiles -->
</SelectableTileGroup>
<RadioButtonGroup legendText="Select an option">
- <span slot="legendText">Custom Legend</span>
+ <span slot="legendChildren">Custom Legend</span>
</RadioButtonGroup>Svelte 5
<TileGroup legendText="Select a tile">
{#snippet legendChildren()}
<span>Custom Legend</span>
{/snippet}
</TileGroup>
<SelectableTileGroup legendText="Choose one">
<!-- tiles -->
</SelectableTileGroup>
<RadioButtonGroup legendText="Select an option">
{#snippet legendChildren()}
<span>Custom Legend</span>
{/snippet}
</RadioButtonGroup>Header Components: company prop → companyText, text slot → textChildren
Svelte 3/4
-<Header company="IBM">
+<Header companyText="IBM">
<!-- header content -->
</Header>
<HeaderAction>
- <span slot="text">Action</span>
+ <span slot="textChildren">Action</span>
</HeaderAction>Svelte 5
<Header companyText="IBM">
<!-- header content -->
</Header>
<HeaderAction>
{#snippet textChildren()}
<span>Action</span>
{/snippet}
</HeaderAction>⚠ BREAKING CHANGES
- radio-button-group: change
legendTextslot tolegendChildrenby @metonym (7f5fbe0, #2425), closes #2412 - tile-group: rename
legendtolegendTextby @metonym (2ffdeab, #2424) - selectable-tile-group: rename
legendtolegendTextby @metonym (d101a5e, #2424) - data-table: change
title/descriptionslots totitleChildren,descriptionChildrenby @metonym (855f283, #2423), closes #2413 - inline-notification: change
title/subtitle/captionslot names totitleChildren/subtitleChildren/captionChildrenby @metonym (3187319, #2419) - toast-notification: change
title/subtitle/captionslot names totitleChildren/subtitleChildren/captionChildrenby @metonym (4735d53, #2419), closes #2415 - header: change
companyprop tocompanyTextby @metonym (873967d, #2416) - header-action: change
textslot totextChildrenby @metonym (fac2a25, #2416) - context-menu-option: change
labelTextslot tolabelChildrenby @spburtsev (ed1336b, #2408) - file-uploader-drop-container: change
labelTextslot tolabelChildrenby @spburtsev (9edcceb, #2408) - file-uploader-button: change
labelTextslot tolabelChildrenby @spburtsev (c39957a, #2408) - number-input: change
labelTextslot tolabelChildrenby @spburtsev (9a4c5ee, #2408) - text-area: change
labelTextslot tolabelChildrenby @spburtsev (1c04b86, #2408) - text-input: change
labelTextslot tolabelChildrenby @spburtsev (39df16f, #2408) - password-input: change
labelTextslot tolabelChildrenby @spburtsev (a1600ae, #2408) - date-picker-input: change
labelTextslot tolabelChildrenby @spburtsev (eb0fd33, #2408) - toggle-skeleton: change
labelTextslot tolabelChildrenby @spburtsev (099cdd2, #2408) - toggle: change
labelTextslot tolabelChildrenby @spburtsev (...