What's new
Every released version of @wideset/react, newest first.
Generated from the package’s CHANGELOG.md by Changesets.
Breaking changes come first in each version, with what to change in your code.
@wideset/react
1.2.0
Breaking changes
-
Button:
Button.IconandSplitButton.Iconuse SVG event types and rejectchildren. Update explicitly typed handlers toSVGSVGElement, useclassNamefor the icon color, and put any label beside the icon:// Before const onIconClick: MouseEventHandler<HTMLDivElement> = (event) => log(event.currentTarget.id); // After const onIconClick: MouseEventHandler<SVGSVGElement> = (event) => log(event.currentTarget.id); -
Card, Modal, Popup, Sidepanel, StatusModal: these surfaces set their own text color (
text-ws-static-base) next to their background, and so do the pop-ups built onPopup(ComboBox,DatePicker,DateRangePicker,FilterButton).Carddoes it when it is bordered. Their content no longer takes the color of the page or of a wrapper, which made it unreadable on a page with light text, such as thecreate-next-apptemplate when the system is dark. If you relied on the inherited color, set it on the surface itself:// Before: the card's content took the wrapper's color <div className="text-ws-static-strong"> <Card> <Card.Content>Three invoices are due this week.</Card.Content> </Card> </div> // After: set it on the surface <Card className="text-ws-static-strong"> <Card.Content>Three invoices are due this week.</Card.Content> </Card> -
Divider: no longer accepts
childrenin its props type. Children were accepted by TypeScript but ignored at runtime. Use thetextprop for the optional label:// Before: accepted by TypeScript, but the label was not rendered <Divider>or</Divider> // After <Divider text="or" /> -
DropdownMenu:
DropdownMenu.SubTriggerandDropdownMenu.RadioIteminclude a chevron and a checkmark, respectively. If you supply your own indicator, pass a single custom row throughasChild:// Before <DropdownMenu.RadioItem value="asc"> <DropdownMenu.ItemIndicator aria-hidden>✓</DropdownMenu.ItemIndicator> Ascending </DropdownMenu.RadioItem> // After <DropdownMenu.RadioItem value="asc" asChild> <div> <DropdownMenu.ItemIndicator aria-hidden>✓</DropdownMenu.ItemIndicator> Ascending </div> </DropdownMenu.RadioItem> -
Modal:
Modal.Closeaccepts children only whenasChildistrue, and requires a single element in that mode. Use<Modal.Close />for the default X. IfasChilddepended on a boolean, choose which form to render:// Before <Modal.Close asChild={useCustomClose}> <Button>Cancel</Button> </Modal.Close>; // After useCustomClose ? ( <Modal.Close asChild> <Button>Cancel</Button> </Modal.Close> ) : ( <Modal.Close /> ); -
Spreadsheet: the grid writes
tabindex="-1"on its scroll container and on controls in cells. Update DOM snapshots anduserEvent.tab()tests that expected those controls in the Tab order, and give a scroll container inside a celltabIndex={-1}:<Spreadsheet.Cell> <div tabIndex={-1} className="overflow-auto"> … </div> </Spreadsheet.Cell>
New components
- NavigationBar: the app’s top bar.
NavigationBar.Startholds the menu button and logo.NavigationBar.NavholdsNavigationBar.Itempage links (active,disabled,asChildfor router links) composed fromNavigationBar.IconandNavigationBar.Label, orBreadcrumbson a nested page.NavigationBar.EndwithNavigationBar.Actionsholds search, a segmented control and icon actions. The line under the bar isdivider, on by default.
Features
- Accordion: triggers are wrapped in semantic headings.
headingLevelsets the level to match the surrounding section; the default is3. - Button:
Button.IconandSplitButton.Iconforward refs and props such asonClick,styleandtitleto the SVG. - DropdownMenu: long menus scroll within the viewport with 10px of default edge padding, and submenus are portaled by default.
- Modal: refs reach the DOM elements of
Modal.Close,Modal.Title,Modal.DescriptionandModal.Body.
Fixes
- Button: no extra spacing in labels made of adjacent text and numbers.
- DatePicker, TimePicker, ToastProvider: no longer read the clock while rendering, so
next buildpasses in an app withcacheComponentson, which is whatcreate-next-appnow generates.Calendarshown directly on a page andDateRangePickerwithdefaultDatePresetstill need today’s date: passtodayor wrap them in<Suspense>. - Registry: the notes shadcn prints for the stylesheet items no longer assume Vite: they name the app entry point for Next.js too.
- Spreadsheet: Tab leaves the grid without briefly focusing a control in a cell, and Firefox no longer stops on the grid’s scroll container.
Design (Figma parity)
- Avatar:
Avatar.Groupin a row rings each avatar in the container color (2px, 3px fromlg), so overlapping avatars no longer run into each other. The status notch no longer also cuts into the top and left of that ring or of theselectedring. - DropdownMenu: submenus and radio items are styled like the main menu, and separators have tighter spacing.
- LinkButton: both sizes pad 8 × 4px, so
lgis 28px tall instead of 32px andsmhas 8px sides instead of 10px. A focused link’s ring has 4px corners instead of 6px, and the box takes the variant’s alpha fill. - ListItem: the selected check on rows (
SelectandComboBoxoptions) is 20px in the primary text color instead of 18px in the row’s text color. - Motion: menus, selects, comboboxes, pickers and
Popupopen and close with a short fade on the motion tokens (no zoom or slide).Tooltipzooms by its--ws-motion-scale-smalltoken, which reduced motion flattens. TheMultiSelecttag remove button,Chip.ActionandChip.IconButtonno longer shrink on press. - Select:
SelectandMultiSelectend the field as Figma does: the arrow and the clear button are 24 / 32 / 40px icon buttons side by side, 4px from the right edge, one text inset (12 / 16 / 16px) after the value, with a 20px arrow atlg(it was 16px). This applies to the Border and Ghost presets, and so toTimePickerand the rows-per-page field inPagination, which useSelect; that field is 80px wide (it was 72px), so a three-digit value still fits.MultiSelectsets its tags 4 / 8 / 8px from the edge, so two tags fit on one line next to the clear button again.MultiSelectno longer passeshasClearButtontoMultiSelectValue; the prop stays for custom compositions that put their own clear button over the value.
1.1.0
Breaking changes
-
Card: the lines under the header and above the footer are off by default. Add
dividerto keep them, for example on a card with a table, a list or a footer of actions:<Card divider>…</Card> -
Chip: the root is a passive container: it no longer has a button role, a tab stop or keyboard activation. Move the main action to
Chip.Actionand the text toChip.Label. For removal, add a siblingChip.IconButtonwith an accessible name and your own handler:// Before <Chip onClick={applyFilter}> <Chip.Icon icon={RiMapPinLine} /> Warsaw </Chip> // After <Chip> <Chip.Action onClick={applyFilter}> <Chip.Icon icon={RiMapPinLine} /> <Chip.Label>Warsaw</Chip.Label> </Chip.Action> <Chip.IconButton aria-label="Remove Warsaw" onClick={removeFilter} /> </Chip> -
FormField: the label’s info tooltip opens from a
<button>(data-slot="field-label-tooltip") instead of a focusable<svg>, and a required control’s accessible name no longer ends with*.[data-slot=field-label]now matches the<label>itself; the row around it is[data-slot=form-field-label-row]. Update tests and styles that target the old elements. If you installed from the registry, runnpx wideset add form-field --overwriteto get the newfield-labelparts. -
IconButton: requires
aria-labeloraria-labelledby, also withasChildand inTextInput.IconButtonandToast.IconAction.IconButton.Icon,IconButtonIconandIconButtonIconPropsare removed: pass the icon through theiconprop (inside a regular Button useButton.Icon):// Before <IconButton icon={RiCloseLine} /> // After <IconButton icon={RiCloseLine} aria-label="Close" /> -
ProgressBar: is composed from parts.
variantis renamed tostatus;label,description,fixedWidthandgetValueLabelare removed.classNameandrefreach the root column instead of the track; style the track throughProgressBar.Track. Atype="circle"bar shows its percentage only with<ProgressBar.Value />:// Before <ProgressBar value={65} label="Uploading assets" description="12 of 18 files uploaded" /> // After <ProgressBar value={65}> <ProgressBar.Header> <ProgressBar.Label>Uploading assets</ProgressBar.Label> <ProgressBar.Value /> </ProgressBar.Header> <ProgressBar.Track /> <ProgressBar.Description>12 of 18 files uploaded</ProgressBar.Description> </ProgressBar> -
SegmentedControl: behaves as a radio group.
rovingFocuson the root andnameon items are removed: setnameon the group. Arrow keys select the focused item and Enter no longer activates it. Track changes withonValueChange, not item click handlers. Selectors usedata-state="checked"/"unchecked"instead of"on"/"off":// Before <SegmentedControl rovingFocus defaultValue="list"> <SegmentedControl.Item name="view" value="list">List</SegmentedControl.Item> </SegmentedControl> // After <SegmentedControl name="view" defaultValue="list"> <SegmentedControl.Item value="list">List</SegmentedControl.Item> </SegmentedControl> -
Switch:
classNamestyles the switch control (the same element asref); move row layout classes to the newwrapperClassName. Passing bothlabeland children is a type error.SwitchPropsis a union, so extend it with a type alias, not an interface:// Before <Switch className="w-full justify-between" label="Email notifications" />; interface SettingProps extends SwitchProps { hint?: string; } // After <Switch wrapperClassName="w-full justify-between" label="Email notifications" />; type SettingProps = SwitchProps & { hint?: string }; -
Table: an ordinary table no longer gets
tabIndex={-1}. To keep programmatic focus, set it yourself:<Table tabIndex={-1}>. An explicittabIndexalso overrides the sticky table’s default of0. -
Tabs:
Tabs.Item.activeis removed. Control the selection on the root withvalueandonValueChange(ordefaultValue):// Before <Tabs.Item value="billing" active={selectedTab === 'billing'}>Billing</Tabs.Item> // After <Tabs value={selectedTab} onValueChange={setSelectedTab}> <Tabs.List> <Tabs.Item value="billing">Billing</Tabs.Item> </Tabs.List> </Tabs> -
Typography: the type scale follows Figma’s renamed text styles: titles are 24/32/40px and subtitles 16/18/20px.
typography-subtitle-lgand the 48–72px display sizes are removed, and thetitle-*andsubtitle-*classes change size.Card.Titleis 16px (was 20px), Modal, Popup and StatusModal titles 18px (was 20px) and the Sidepanel title 20px (was 24px). Migrate by role:Old class (size) New class (size) typography-subtitle-lg(32)typography-title-md(32): page headingtypography-subtitle-md(24), heading or key figuretypography-title-sm(24) for a heading,title-md(32) for a KPItypography-subtitle-md(24), side panel titletypography-subtitle-md(20)typography-subtitle-sm(20)typography-subtitle-sm(18)typography-subtitle-xs(18)typography-subtitle-xs(16)typography-title-lg/-md/-sm(72 / 56 / 48)typography-title-lg(40) for the one figure a page is about
New components
- AppShell: the full-height frame a screen sits in, with
AppShell.Main(AppShellMain) for the page.direction="inset" | "flat" | "frame" | "canvas"sets the window background, the page’s look and the surface of aSidebarinside it. - Illustration: Figma’s line drawings (
calendar,computer,folder, atlg240px andsm140px) for empty states, first runs and announcements. They follow the text and primary colours, so dark mode and a rebrand recolour them. - Spreadsheet: a dense grid people work through cell by cell, with 32px or 40px rows, grid lines, a pinned header, row numbers and arrow-key navigation around one selected cell.
Features
- Chip: new
Chip.Action,Chip.LabelandChip.IconButtonparts (alsoChipAction,ChipLabel,ChipIconButton) for independent main and removal actions. - FormField: the tooltip trigger is a real
<button>named bytooltipAriaLabel(“More information” by default), andsuffixsits inside the label, so “(optional)” is part of the control’s accessible name. - ProgressBar: parts
ProgressBar.Header,.Label,.Value,.Trackand.Description(also exported by name),formatValue(value, max)andasChild. The label names the bar and the description describes it. - Select, MultiSelect: with
preset="ghost"the field reads as a value: the arrow shows only on hover, focus or open, and a prefix sits beside the value without a divider. - Sidebar:
surface="page" | "tinted" | "frame", which follows theAppShelldirection by default;Sidebar.Footer(SidebarFooter);Sidebar.Itemsuffixfor a count or badge,suffixOnHoverfor a shortcut shown on hover and focus, andnestedfor a child of the item above. - Styles:
font-ws-mono(IBM Plex Mono with system fallbacks) for code and terminals;decoration-ws-*utilities for text decoration colours;ws-scrollbaron an element, orws-scrollbarson<html>, to match Wideset’s scrollbars. - Switch:
Switch.Description(SwitchDescription) for supporting text under a composed label, announced as the switch’s description. - Table:
Table.CellDescription(TableCellDescription), a quieter second line under a cell’s label. - Tabs:
Tabs,Tabs.List,Tabs.ItemandTabs.Labelforwardref.
Fixes
- Avatar: an icon avatar no longer announces “Default User Icon”;
aria-labelnames it, with itsstatusadded. A clickable icon avatar warns in the console withoutaria-label.AvatarandAvatar.MorewithonClickshow the focus ring only on keyboard focus. - Calendar: with
todayset and nothing selected it opens on the month oftoday(also in DatePicker and DateRangePicker); withmode="multiple"on the earliest selected date. - Card: in a grid track or a flex row a card no longer grows to fit wide content; a table in
Card.Contentscrolls inside it. - Checkbox, RadioButton: keep the checked fill on keyboard focus.
- DateRangePicker: in controlled mode the first click of a range is no longer dropped;
presetLabelsalso labels the trigger while a preset is active; presets count from thetodayprop. - FilterButton: the list stays where it opened while you tick options, and a long selected value ends with an ellipsis.
- Modal, StatusModal, Sidepanel: no browser focus ring around the whole dialog when the dialog itself takes focus.
- MultiSelect, FilterButton: the lists stop at the room left in the window and scroll, as Select and ComboBox do.
- RadioButton, Pagination, Tabs: arrow-key navigation and focus fixed; SegmentedControl and Tabs show keyboard focus.
- ScrollArea:
onScrollis attached to the scrolling viewport, so it receives scroll events andevent.currentTargetgives the scroll position. - Select: a long value stays on one line and ends with an ellipsis (also in MultiSelect, ComboBox, Timepicker and Pagination).
- StatusBadge: an icon with bare text keeps its label padding instead of collapsing to an icon-sized square.
- Styles:
@wideset/react/stylesis about 32 KB smaller: it no longer carries classes only the blocks use. - Table: no unintended focus after a row click; sticky tables stay keyboard-scrollable with a Wideset focus outline.
Table.Footwith several rows draws its top line once. - Toast: an expanded toast renders every
Toast.Action; a basic toast keeps one and warns when given more.
Design (Figma parity)
- Avatar: initials show one letter at
xsandsm. - Buttons and controls: only free-standing buttons shrink on press, also not when used as popup triggers. Split buttons, selects, pickers, tabs, chips, list rows, tiles and calendar days don’t scale.
- Card:
Card.Descriptionsits 2px underCard.Title(was 8px). - Colours: body text (
--ws-static-text-base) is neutral-800 in light mode (was neutral-900); the neutral fill (--ws-semantic-fill-neutral, neutral StatusBadge and SystemAlert) is 8% black in light mode (was 12%). - ComboBox: the clear button sits right before the arrow.
- FilterButton: 4px more between the value and the clear button at the small size.
- SegmentedControl: unselected icon colour and selection fill.
- Select, ComboBox: the list opens 4px below the field (was 13px and 9px).
- Sidebar: parts line up on one right edge; a collapsed sidebar keeps every part on the rail’s centre line, cuts section headers short and draws the unfold icon.
- Scrollbars: match ScrollArea in AppShell.Main, ComboBox, FilterButton, Modal.Body, Select, Spreadsheet, Textarea and every block.
- Table: a sortable column that is not sorted shows quiet up-down arrows.
- Thumbnail: PDF thumbnails use the Pink Strong token.
1.0.0
First public release.