Fixes#2143
Make `ToolbarSearch` filtering reactive to `DataTable` rows.
Previously, `ToolbarSearch` did not update when `DataTable` rows
changed. Now it subscribes to the context rows and re-runs
`filterRows` in `afterUpdate` to prevent infinite loops.
The `ListBoxSelection` component now properly handles
translations for the clear button based on the selected items:
- Fix `buttonLabel` and `description` to use the same translation logic
- Add tests for custom translations in both `ComboBox` and `MultiSelect`
Re-apply #2125 (reverted in #2130) to preserve `disabled` attribute.
Carbon styles depend on the `[disabled]` attribute. However, the `disabled`
attribute is not valid markup when applied to `div role="option"`. This PR
preserves the existing `disabled` attribute while also setting `aria-disabled`
to maintain accessibility.
This fixes an accessibility issue with `TextArea`.
Currently, if `hideLabel` is `true`, the label is not rendered at all.
The expected behavior is that it should be visually hidden while
still being available to screen readers.
Although `RadioTile` is meant to be used inside a `TileGroup`, it feels
unpolished for standalone usage to crash due to a missing parent context.
This fixes `RadioTile` to fail open by providing a no-op `add: () => {}`
when `TileGroup` context is not found.
`ListBoxSelection`, used by `MultiSelect` and `ComboBox`, currently
applies the wrong `aria-label` for the clear selection button. It uses
the `translateId` (e.g., `"clearAll"`) instead of the user-friendly copy.
Fixes a bug where the input `value` is immediately reset
when re-focusing the input. The `value` resetting is necessary
to support programmatically clearing the value, but it should
only execute if the input is not currently focused.
Fixes https://github.com/carbon-design-system/carbon-icons-svelte/issues/207
`carbon-icons-svelte@13` and `carbon-pictograms-svelte@13` now
only support TypeScript for Svelte 4/5.
The new `Component` type is incompatible with the `icon` prop in
`carbon-components-svelte`, causing a type error with Svelte 5, as
`typeof SvelteComponent` doesn't match the new `Component` type.
Since `Component` isn't available in Svelte 3/4, this PR changes
the `icon` prop type to `any` for compatibility across Svelte 3, 4, and 5.
- Menu items are sorted when the component renders.
- With selectionFeedback: top, selected items are immediately pinned to
the top.
- With selectionFeedback: top-after-reopen, selected items are pinned to the top only
after the dropdown is closed.
- With selectionFeedback: fixed, selected items are never pinned to the
top.
Fixes#2066
`$: nodes = traverse(nodes);` is unexpectedly mutating the original `nodes` reference used to render `TreeView`.
As a result, a tail leaf node is appended to the top-level list.
Flattening is necessary to obtain a reference to all node IDs (to programmatically show/hide nodes). This fix creates a new reference `flattenedNodes` instead of overriding the original `nodes`.