github carbon-design-system/carbon-components-svelte v0.114.2

one hour ago

This patch keeps floating menus, calendars and tooltips where they belong, fixes two crashes in Svelte 5's async mode, and trims the keyboard-shortcut code from apps that don't use it.

  • MultiSelect: a filterable MultiSelect's menu shows inside a Modal or with portalMenu. Before, it opened with no width (#5676). Also released as 0.113.2, 0.112.3, 0.111.4, 0.109.1 and 0.107.2.
  • Floating menus and DatePicker: an open menu, tooltip, popover or calendar follows its field when content added above it moves the field, as in a Modal that shows a notice.
  • Tooltips: an in-place tooltip that would run past the window opens in the portal, which keeps it inside, on TooltipDefinition, TooltipIcon, icon-only Button and PasswordInput (#5704).
  • DataTable, ComboBox, Dropdown, MultiSelect: removing a row or dropping a menu group no longer crashes in Svelte 5's async mode (#5688).
  • Smaller bundles: Button, Search and HeaderSearch load the shortcut binding only when shortcut is set, and Kbd draws its keys without importing ten icon components. A one-Button app is about 6.5 kB smaller minified, and with carbon-preprocess-svelte ships no shortcut code (#5686).

This release also centers inline icons on the text's cap height (AILabel, Card, ConfirmModal, CopyText, Kbd), fixes ImageLoader's double fetch and loading flash, and improves UI Shell's ProfileMenu and HeaderSwitcher naming, anchoring and forced-colors rendering.

Full Changelog: v0.114.1...v0.114.2


Changes without a breaking marker

  • Tooltips: with portalTooltip unset, a TooltipDefinition, TooltipIcon, icon-only Button or PasswordInput tooltip near the window's edge now renders in a portal on document.body instead of beside its trigger. Styles that target it through the trigger's parent won't reach it then. Set portalTooltip={false} to keep it in place (#5711).

Bug Fixes

  • ai-label: center the label on the cap height in running text (a2abbf5)
  • card: center the title end icon on the cap height (9dae3e4)
  • combo-box: fire clear when autofill drops the selection (eb2b2fb)
  • confirm-modal: center the heading icon on the cap height (e763167)
  • confirm-modal: keep the heading icon's gap in right-to-left text (14f51ea)
  • copy-text: center the icon on the cap height (50e1545)
  • data-table: don't crash removing a row in Svelte async mode (15d6089)
  • data-table: sort rows replaced in place in Svelte async mode (c08eb81)
  • date-picker: follow the field when the layout shifts (bf81708)
  • date-picker: keep typed range dates when focus leaves the picker (0fbc442)
  • floating-portal: follow the anchor when the layout shifts (4623650)
  • header-switcher: anchor the menu to the trigger's start edge (db050be)
  • image-loader: fetch srcset once instead of src and the candidate (302fbcc)
  • image-loader: skip the loading slot for an already-cached image (fcef8fc)
  • kbd: center the key caps on the cap height in running text (a6df7e0)
  • list-box: don't crash dropping a menu group in Svelte async mode (62a6bb9)
  • multi-select: anchor the filterable menu to its field (dafdf93), closes #5676
  • profile-menu: keep the header avatar's circle in forced colors (cdf1d90)
  • profile-menu: paint item icons ButtonText in forced colors (5cfba6d)
  • tooltip: portal an in-place tooltip that runs past the window (f6fd66c), closes #5704
  • ui-shell: keep avatar initials out of profile menu item names (b2ea454)
  • ui-shell: name the ProfileMenu and HeaderSwitcher panels as groups (e760c38)

Performance

  • button: bind the shortcut only when one is set (110f178)
  • header-search: bind the shortcut only when one is set (2dc95d1)
  • kbd: draw named keys from a path map (8c18c9e)
  • keyboard-shortcut: let bundlers drop the unused key maps (4223540)
  • search: bind the shortcut only when one is set (f72185c)

Don't miss a new carbon-components-svelte release

NewReleases is sending notifications on new releases.