Highlights
- Up to 1.5 kB less JS for apps with a Button. Button, Search, InlineLoading and FileUploader no longer ship Loading's overlay focus trap and delay timer.
- Smaller builds with carbon-preprocess-svelte. With
optimizeComponents, a list box withvirtualize={false}drops its virtual window, and an OverflowMenu that never shows a tooltip drops it (see Builds). - Safari users can place the caret in right-to-left NumberInput and Slider fields.
Bug Fixes
- number-input: put the caret where Safari users click in RTL by @metonym in #5742
- slider: put the caret where Safari users click in RTL by @metonym in #5742
Performance
- loading: split the spinner from the overlay by @metonym in #5228
- list-box: let builds drop VirtualWindow for virtualize={false} by @metonym in #5746
- overflow-menu: let builds drop the tooltip a menu never shows by @metonym in #5747
- pagination-nav: list a long overflow's pages on demand by @metonym in #3568
Loading
Button, Search, InlineLoading and FileUploader render a spinner with no overlay and no delay, but they rendered it through Loading, so every app with one of them shipped the overlay's focus trap and the delay timer. They now render the spinner directly. Markup is unchanged.
carbon-preprocess-svelte's vite@svelte-5 example app, Svelte 5, barrel import, v0.114.4 and v0.114.5:
| App | JS, gzipped |
|---|---|
| Button, TextInput, Checkbox | 42,541 → 41,386 B (−1,155 B) |
| InlineLoading | 20,035 → 18,483 B (−1,552 B) |
| Search | 30,419 → 29,292 B (−1,127 B) |
| Button + Modal | 41,209 → 40,560 B (−649 B) |
| DataTable toolbar | 46,930 → 45,870 B (−1,060 B) |
| Button + Loading | 35,595 → 35,659 B (+64 B) |
With optimizeComponents, which already drops Button's spinner in apps that never set loading, the change is within ±170 B: up to 166 B smaller, and 93 B larger for an app that renders Loading.
Builds
With carbon-preprocess-svelte's optimizeComponents, two more branches fold at build time. Rendering doesn't change.
- ComboBox, Dropdown and MultiSelect with
virtualize={false}dropVirtualWindow: a page with one such Dropdown ships 0.8 kB less gzipped JS. - An OverflowMenu with a
menuslot oriconDescription=""dropsPortalTooltip: 1.5 kB less gzipped JS where nothing else bundles it.
PaginationNav
An overflow menu of more than 1,000 pages now lists its pages on first focus or press, instead of putting every page in the DOM (and in server HTML) up front. Shorter overflows are unchanged.
NumberInput and Slider
In a right-to-left page, clicking just before the - of a negative number in Safari put the caret after the last digit, so typing landed at the wrong end. Number fields now read left to right in RTL, so the caret lands where the user clicks. Text fields whose value has no letters (#5740) still hit the WebKit bug.
Full Changelog: v0.114.4...v0.114.5