Skip to content

v2.10.0

Latest

Choose a tag to compare

@ndlabdev ndlabdev released this 28 Oct 15:01
12b847a

Added

  • FormField — ariaId prop sets the base of the published ids, for two fields that share a name on one page. A console warning names a published id that already exists on the page and says whether the field wraps more than one control or shares its ids with another field. It shows once per id while the field that warned stays mounted. setControlId(id, labelable) on the field context takes an optional second argument for custom controls that a <label for> cannot target. (#244)

Changed

  • The svelte peer dependency is now ^5.33.0, up from ^5.0.0. bits-ui already required 5.33, so existing installs are not affected. (#244)
  • @sveltejs/kit ^2.12.0 is now a peer dependency. Header, Link, NavigationMenu, Sidebar and useTour import $app/state, which first ships in 2.12, so sv5ui already required it. (#252)
  • CheckboxGroup, RadioGroup — item ids no longer follow <id>-<value>, and the RadioGroup legend id no longer follows <id>-legend, so they stay unique across groups and match between server and client. Select an item through its group, for example #plan [role="checkbox"] instead of #plan-basic. (#244)

Fixed

  • FormField — the label no longer sets for on controls it cannot target (SelectMenu, Rating, RadioGroup, Slider, ColorPicker, CheckboxGroup), and whitespace in name no longer breaks aria-describedby. With server rendering the label keeps for until the page hydrates. (#244)
  • CheckboxGroup, RadioGroup — two groups that share an id or a field name no longer select each other's items. CheckboxGroup's fieldset carries the field id, and RadioGroup, Slider and ColorPicker report a user id to FormField. (#244)
  • Checkbox, CheckboxGroup, RadioGroup — variant="card" items get an accessible name from their label, and item descriptions are announced in both variants. A card Checkbox inside a FormField is named by both labels, like the list variant, and a user aria-label or aria-labelledby is kept. (#252)
  • Textarea — with loading, the spinner spins next to a leading slot or icon instead of the leading icon. (#244)
  • ThemeModeButton, ThemeMode — the button applies the stored mode on mount without ThemeMode, and setMode with an unchanged mode no longer dispatches a storage event. (#244)
  • Modal, Slideover, Lightbox, Select, Accordion, Collapsible, ScrollArea, NavigationMenu — closing animations no longer flash back for one frame with Svelte's experimental.async, and NavigationMenu with unmountOnHide: false no longer shows the previous panel behind the new one. (#245)
  • Popover, DropdownMenu, ContextMenu, Tooltip, DatePicker, DateRangePicker — open and close animations now play, zooming and fading like Select. They used classes from an animation plugin that sv5ui does not ship. Apps that installed such a plugin themselves lose the small slide toward the trigger. (#245)
  • Tour — the panel now animates in. (#245)
  • Modal — transition: 'slide' animates on close and fades both ways. (#245)
  • Lightbox — double-clicking the arrows no longer zooms the next image, and a zoomed image can no longer be panned past its own edges. (#246)
  • Lightbox — the caption text can be clicked, selected and copied, and links in captionSlot work, instead of closing the viewer. ui.track now applies. (#246)