Repository navigation
v1.0.0
The first stable release and the API freeze: Phase 14 of the roadmap. From 1.0.0 on, semantic versioning covers the exports of the package entry, the documented props and their data-* state attributes, the stable wave-* classes of the class-name registry, the --wave-* tokens, the namespaced theme keys and the CSS entries of the exports map; Wave's own wave: utility classes and the modules the entry does not export are internal. 1.0 ends the 0.x compromises at once. It makes every change 0.18 announced: everything 0.x deprecated is removed (P14-02), Image.alt is required (P14-03), Badge and CounterBadge color="important" is Fluent's neutral high-emphasis color (P14-05), a TimePicker without format follows the hour cycle of the browser's language (P14-06), and the details argument of every change callback is required. And it makes four breaks that no 0.x release announced, chosen after 0.18 shipped and without a 0.19 to announce them (the roadmap's announce-first rule is waived for them; Upgrading to 1.0 and a migration codemod stand in for the notice): every class the components draw carries the prefix wave: and an app's Tailwind build gets Wave's theme keys under wave (bg-wave-primary), so nothing of Wave's styling collides with an app's any more (P14-01); ref reaches the focusable element of twelve form controls, whose wrapper is the new slotProps.root (P14-04, reversing 0.18's decision to keep ref on the root); the package is ES modules only; and the 0.4 ramp names --brand-N and --grey-N no longer re-theme Wave. It closes the four gaps of Phase 14: foundation-9, foundation-10, badge-1 and timepicker-3. Nothing is added but what these changes need. Read "Upgrading from 0.18" before upgrading.
Upgrading from 0.18
Upgrading to 1.0 lists every change with its old and new form and how to find the uses in an app. In short:
- Upgrade to 0.18.1 first, run a development build and replace each use it warns about (every replacement works in 0.18), then upgrade to 1.0 and run the type check: removed props, values, call forms and exports, the
reftypes of the twelve controls and the requireddetailsarguments are type errors. 1.0 logs none of the 0.18 notices, and JavaScript that no type checker reads gets no message for a removed prop (the guide's "Untyped code" says what it gets). - ES modules only.
exports["."]is{ types: index.d.ts, default: index.mjs },mainis./dist/index.mjsandmoduleis gone; no.cjsorindex.d.ctsships.require()of the package works on Node.js 22.12 and later (theenginesfloor, unchanged) and returns the same module asimport. A TypeScript file compiled as CommonJS needsmodulenode20ornodenext(node16reports TS1479), and Jest in CommonJS mode must transform the package or run in its ES modules mode. - Namespaced utilities. Wave's classes are
wave:flex,wave:bg-primary; your Tailwind build gets Wave's colors, type ramp and shadows asbg-wave-primary,text-wave-body-1andshadow-wave-4, and the 0.x names (bg-primary,text-foreground,border-border,text-body-1,shadow-4,var(--color-primary)) generate nothing unless a theme of yours defines them. The migration codemod rewrites your own classes,@applylists and theme variable uses:node node_modules/@mortenbrudvik/waveui/codemod/migrate-1.0.mjs --dry-run "src/**/*.{ts,tsx,css}"prints every change, and without--dry-runit writes them. It never rewrites the 17 names a stock shadcn/ui theme defines too (bg-primary,text-foreground,border-border, …), nor the names your own theme declares, without--include-shared: an app without shadcn/ui and without a theme of its own passes it. It cannot find selectors of Wave's 0.x classes (.bg-primary,querySelector('.flex'): use the stablewave-*classes ordata-*attributes), reveals against Wave's row groups (group-hover/table-row:: the rows carrywave:group/table-row), or the setup changes: without Tailwind, a Tailwind class inclassName(p-2) still removes Wave's conflicting class but nothing defines it, so use your own CSS or the new./utilities; with./tailwind, your@themeno longer restyles the components (they come precompiled, every theme value inlined: restyle them through the--wave-*tokens), your build no longer generates the classes they use, and any utility and unlayered rule of yours wins over Wave's classes, so a bare background class of yours also covers a component's hover, pressed, selected and disabled backgrounds. refreaches the control of Checkbox, Switch, SearchBox, SpinButton, ColorSlider, AlphaSlider,ColorPicker.HexField, Combobox, Dropdown, TimePicker, DatePicker and TagPicker (its trigger,TagPicker.InputorTagPicker.Button), which losecontrolRef; their root isslotProps.root.ref. A ref object typed for the root no longer compiles, but a callback ref or state setter typed for a<div>still does on the seven whose control is an<input>(SearchBox, SpinButton, ColorSlider, AlphaSlider, Combobox, TimePicker, DatePicker): look for those by hand.Popover.Trigger,Menu.Trigger,TeachingPopover.Trigger,Dialog.Trigger,Drawer.Trigger,Overflow.Item asChildandPresencearound one of them now reach its control.- Removed: every prop, value, call form, export, class, stylesheet and rule that 0.x deprecated (Removed), with no alias, and the 0.4 ramp names as overrides (override
--wave-brand-Nand--wave-grey-N). - Required: the
detailsargument of the change callbacks (code that calls such a prop itself passes it) andImage.alt(Changed, Required arguments and props). - Defaults and meanings:
color="important"on Badge and CounterBadge is the neutral high-emphasis look (severekeeps the orange); TeachingPopover's Done callsonFinishonly, neveronDismiss; a TimePicker withoutformatfollows the browser's language after mounting (12-hour on the server and in the hydrating render): passformatfor a fixed hour cycle.
Added
slotProps.rooton the twelve controls whoserefmoved and onRadioGroup.Item(whose<label>no ref reached), as on Input since 0.18: the root element'sref, classes, style, attributes and handlers. Your classes and style come after the component's ownclassNameandstyle, your handlers run first (preventDefault()skips the component's own root handlers), and the component keeps its enumerateddata-*attributes, its own root props and its hidden state (hidden,inert,aria-hiddenat the component's own values); a<label>root (Checkbox, Switch,RadioGroup.Item,ColorPicker.HexField) takes nohtmlForfrom the part, which would send its clicks to another element. Checkbox, Switch and the radio do not call your rootonClickwhile disabled; the other roots pass no click to their control and call it in every state. A click on a label root's text reaches itsonClicktwice, as on any<label>(the text, then the click the label passes to the control).@mortenbrudvik/waveui/utilities(also./utilities.css): the namespaced token utilities for apps without Tailwind:bg-,text-,border-,ring-,fill-andstroke-with each of the 144 color tokens, the type ramp (text-wave-body-1), the shadows (shadow-wave-4), the font families and the animations, 889 classes without variants and without spacing or layout utilities. Unlayered like./styles, so its classes beat the zero-specificity base styles of./stylesinside the provider; link it after./stylesand before your own CSS.- The namespaced theme keys in
./tailwindand./tokens(--color-wave-*,--text-wave-*,--shadow-wave-*, with the font families, durations, curves and animations that carriedwavealready), for an app's own classes:bg-wave-primary,text-wave-body-1,shadow-wave-4,tw:bg-wave-primaryin a prefixed build. - The migration codemod
codemod/migrate-1.0.mjs, shipped in the package (Node.js built-ins only): it rewrites an app's utilities of Wave's former theme names (31 color utilities with 144 color names, the type ramp, the shadow levels) with their variants, modifiers and important marks,@applylists and theme variable uses (var(--color-primary),theme(--text-body-1--line-height)), in scripts, CSS, HTML, Vue, Svelte and MDX, never a comment or a declaration;--dry-runwrites nothing,--include-sharedalso rewrites the 17 names shared with a stock shadcn/ui theme and the names the scanned files declare as their own theme keys; a second run changes nothing. TagPicker.Buttonis reached by TagPicker'srefwhen it renders in place ofTagPicker.Input.- Development warnings (keys):
MessageBar:dismiss-button-slot-object,SearchBox:dismiss-button-slot-objectandTag:dismissIcon-button-slot-object, when a dismiss or clear slot object'sasis a button, which is unwrapped (see Changed);Image:alt-missing("Image: `alt` is required. …") replaces 0.18'sImage:alt, for JavaScript that leavesaltout. - Documentation: Upgrading to 1.0 is final. The README gains the setup matrix of Quick start, "ES modules only" under Installation, "Custom Tailwind setups", "Namespaced names", the
rootpart and the components that read a child'sref, and "Upgrading to 1.0" in place of "1.0 notices"; the guide's Pattern 5 is "cn() and wcn()" (#pattern-5-cn-and-wcn); the testing guide gains "Wave's utility classes in tests".
Changed
Styling: namespaced utilities
- Every class the components draw carries Tailwind's prefix
wave:(wave:flex,wave:bg-primary,wave:not-disabled:not-aria-disabled:hover:bg-primary-hover,wave:wave-rtl:-scale-x-100, the group markerswave:group/row,wave:group/nav-row,wave:group/table-rowandwave:group/grid), and so do the public recipesfocusRing,focusRingInset,inputFocusandinputFocusWithin.dist/styles.cssis compiled withprefix(wave)against an internal, unnamespaced theme (src/styles/theme.css,@theme inline reference, so no theme variable is emitted), and holds the same rules as before with the prefix: stripped ofwave\:, its classes, rule bodies and order equal the sheet built without the prefix. The classes are internal; the stablewave-*classes, thedata-*attributes and the tokens are the styling hooks. ./tailwindputs Wave in cascade layers:@layer theme, base, components, utilities;, the tokens and the namespaced keys intheme, Wave's scoped base styles inbase, the components' precompiled utilities incomponents(fromdist/components.css, an internal file:dist/styles.csswithout its token and base rules, which only this entry imports), and thewave-rtl:variant; it has no@source(0.x scanneddistand generated the components' classes in the app's build). So an app's@themeno longer restyles the components: in 0.x the app's--spacing,--radius-*, font weights and line heights, and the unnamespaced keys Wave shared with it (--color-primary,--text-body-1, an--shadow-Nof the app's, which the 0.17 notes said keeps its value), reached them;dist/components.cssinlines every theme value, and the--wave-*tokens restyle Wave. Nor does the app's build generate the classes the components use any more, so a class of the app's that worked only because Wave'sdistheld it is no longer generated. Any utility and any unlayered rule of the app wins over Wave's classes, in either import order; an app@layer componentsclass competes with them by specificity, then source order; an app with a prefixed build (prefix(tw)) imports it as well, where 0.x needed./stylesin a layer../tokensdeclares only the namespaced theme keys for apps (0.x declared--color-primary,--text-body-1,--shadow-4, …). A custom Tailwind setup built on./tokensand./variants.cssno longer compiles the components (its build cannot generate theirwave:classes): they come from./styles, in a layer of the app's, as the README's "Custom Tailwind setups" shows.- The public
cnis the components' merge (wcn, module-only, with Wave's prefix): a class and itswave:twin are one utility, socn(focusRing, 'focus-visible:outline-offset-0')drops the recipe's offset, and an app'scn('p-4', 'p-2')merges as before. It knows Wave's scales under the 0.x and the namespaced names, socn('text-body-1', 'text-foreground')keeps both as in 0.18, and so doescn('text-wave-body-1', 'text-wave-foreground'). A consumer's unprefixed class still replaces a component's conflictingwave:class of the same variant, as in 0.18 (theconflictingClasscontract oftestSystemPropsis unchanged). - Without Tailwind, a Tailwind class passed in
className(p-2) still removes the component's conflicting class but has no CSS:./stylesdefines only Wave's ownwave:classes, where 0.18.1's sheet happened to define the generic utilities the components used. - Storybook compiles two sheets:
.storybook/preview.css, the library'sstyles.css, and.storybook/stories.css, the stories' own classes as an app's unprefixed build compiles them (one Tailwind build has one prefix). The stories use the namespaced keys (bg-wave-primary), migrated by the codemod.
ref placement
refreaches the focusable element of a form control whose root wraps one (Phase 14 spec R5, which supersedes the Phase 13 spec's R19): therole="checkbox"androle="switch"buttons of Checkbox and Switch, the inputs of SearchBox (type="search"), SpinButton (role="spinbutton"), ColorSlider and AlphaSlider (range),ColorPicker.HexField, Combobox and TimePicker (role="combobox") and DatePicker (text), Dropdown's<button role="combobox">, and TagPicker's trigger, whichever renders (refisRef<HTMLInputElement | HTMLButtonElement>).controlRefis removed from the twelve and stays on ColorArea,Table.SelectionCellandDataGrid.SelectionCell; Input andRadioGroup.Itemkeep theirref. The roots of Combobox, Dropdown, TimePicker and TagPicker keep the picker's own ref besideslotProps.root.ref, so a press inside them still keeps the open list open.- What reads a child's
reffollows it:Popover.Trigger,Menu.TriggerandTeachingPopover.Triggerplace their surface against the control and return focus to it, and for the first two a press on the rest of the root (a Switch's label text) is outside the trigger, so it closes an open popover or menu (a TeachingPopover does not close on a press outside); their state ARIA stays on the root, as in 0.18.Dialog.TriggerandDrawer.Triggertake the control's element for the focus return (Escape returns focus to the control).Overflow.Item asChildmeasures the control, andPresencewaits for the control's animations while its attributes reach the root. Tooltip, which places its surface against its own wrapper, is unchanged.
Slots
- The dismiss and clear slots of MessageBar (
dismiss), SearchBox (dismiss) and Tag (dismissIcon) takeSlot<'span'>: a<button>orButtonelement is still merged into the built-in button, a slot object is always the content (its attributes,className,style,refand handlers stay on the content element), and an object whoseasis'button'or Wave'sButtonis unwrapped like the glyph slots (its children render, its props are dropped, with a development warning). The close slots of Dialog, Drawer, NavDrawer and TeachingPopover are unchanged.
Defaults and meanings
- Badge and CounterBadge
color="important"(announced in 0.6): Fluent's neutral high-emphasis color, the page's text color as the fill with the page color as its text (near black with white text in the light theme, white with dark text in the dark one); the tint fills with the secondary text color, the outline draws the accessible neutral stroke, and a CounterBadge's dot takes the filled look.color="severe"keeps the orange thatimportantdrew through 0.x. No token was added: the pairs are the existingforegroundandmuted-foregroundonbackground. - TeachingPopover's Done (announced in 0.14) calls
onFinishonly, notonFinishand thenonDismiss; Close, Escape and the Trigger callonDismissas before. - TimePicker's
format(announced in 0.18): withoutformat, the hour cycle ofnavigator.language(h23andh24give 24-hour times,h11andh1212-hour ones; a language the browser rejects gives 12-hour). The server render and the render that hydrates it show 12-hour times, so hydration matches, and the picker switches right after mounting; a picker mounted in the browser without server HTML follows the language from its first render. An explicitformatwins and reads nothing. TimePicker has nohourCycleorlocaleprop.
Required arguments and props
- The
detailsargument is required in Dialog, Drawer and NavDraweronOpenChange(announced in 0.6 and 0.11), Menu and ToolbaronCheckedValuesChange(0.7), TreeonCheckedItemsChange(0.8), CalendaronValueChangeanduseListbox'sonOpenChangeandonSelect(0.10), OverflowonOverflowChange, DataGridonSortChangeandonSelectedItemsChangeandTable.SelectionCellonCheckedChange(0.14), and AvatarGrouponOpenChange, DataGrid's anduseTableColumnSizing'sonColumnWidthsChange,Table.ResizeHandleonResize,useTableSort'sonSortChange, theonSelectedItemsChangeofuseSelectionanduseTableSelection(whose options extenduseSelection's) anduseFlatTree'sonCheckedItemsChange(0.18). A handler may still ignore it; code that calls such a prop itself passes it (TS2554 otherwise). The paths that passed none in 0.x pass one:useTableSort'ssetColumnSortandtoggleColumnSortwithout an event reportnew Event('sort'),useFlatTree'ssetCheckedwithout an eventnew Event('check'), andTable.SelectionCell's form reset the form'sresetevent. TheonResize(width, details?)of the bindingsuseTableColumnSizinghands to a resize handle stays optional (an input a handle calls). Image.altis required (announced in 0.18):ImageProps.alt: string(alt=""for a decorative image), andStrictImagePropsis the same type. JavaScript that leaves it out renders noaltand warns once in development (Image:alt-missing).- Other required types:
Nav.Category'slabel(its text children no longer label it); a DataGrid withoutitems,sortordefaultSorttakes noonSortChange(passdefaultSort={null}to hear an uncontrolled grid's sort); in single mode Accordion'sopenItems,defaultOpenItemsandonOpenItemsChangearenever.ListSelectionModenarrows to'single' | 'multiple'.
Package
- ES modules only (Phase 14 spec R4): one ES output (
lib.formats: ['es']),exports["."]withtypesanddefault,main./dist/index.mjs, nomodulefield;distholds.mjsmodules, their maps,index.d.tsand the stylesheets.lib/globalRegistrystill keeps one set of singletons for two copies of the package (duplicate installs or versions, bundler duplicates, hot reload, micro-frontends). tailwind-mergeis pinned exactly (3.7.0, was^3.7.0): the components' merge parses classes through itsexperimentalParseClassName, and a test fails if the parse changes.filesgainscodemod(without its tests); theexportsmap gains./utilitiesand./utilities.cssand loses./legacy-tokens.css.
Dev gates
verify-dist:checkNoCommonJs(no.cjs,.cjs.mapor.d.ctsindist) andcheckRequireEsm(the entry loads throughrequire()in a child process and exposes the names ofimport()), in place of the CommonJS parity checks;RECORDED_IMPORTS_1_0, ten records (the six component imports of 0.18, the presence core, the window,createBrandTokensandwaveTokens), each with its 0.18.1 size (BASELINES_0_18_1), its size measured at the flip and its budget, that size plusBUDGET_MARGIN_1_0(512 bytes minified, 192 gzip), in place ofRECORDED_IMPORTS,RECORDED_IMPORTS_0_17,RECORDED_IMPORTS_0_18,BASELINES_0_17_1,BUDGET_MARGIN_0_18and the presence, window, DataGrid, brand and token budgets;TEST_ONLY_MODULESislib/slotParts;MODULE_ONLY_NAMESgainswcn,createWcnandUTILITY_PREFIX.build-css: the compile check runs first (scripts/prefix-codemod.mjs --checkoversrc/componentsandsrc/lib: no unprefixed utility word in a class context, and elsewhere only the wordsscripts/prefix-allowlist.jsonnames for a file); every class ofstyles.cssbut the style entries' own carries the prefix, and no declared custom property is a theme variable or refers to itself;components.cssequalsstyles.csswithout the token and base rules, node for node;utilities.cssholds exactly the generated classes, unlayered, and reads no variable thatstyles.cssdoes not declare; no rule selects.darkor.high-contrast.pack-smoke:smoke.cjsis therequire()consumer; the plain fixture checks two type programs (.mtsundermodulenode16,.ctsundernode20),./utilitiesand the shipped codemod; the Tailwind fixture builds the layered./tailwind, a custom./tokenssetup and aprefix(tw)app; an optional floor step runssmoke.cjson a Node.js 22.12 binary named byWAVE_NODE_FLOOR.check:packageruns attw'sesm-onlyprofile.verify-storybookchecks both Storybook sheets.- Tests: the 1.0 inventory (
src/lib/deprecations.ts) and its test retired once every row was done;src/__tests__/removedApi.test.tskeeps the removed exports, types, stylesheets, theme classes, 0.4 variable names and TagPicker classes absent and fails if a library module names a removed export.testSystemPropstakesref: 'control'(withcontrol.tag),testRootPartRefchecksslotProps.root.ref, andUNKNOWN_PROPgives React's unknown-prop error. The tests assert Wave's classes with the prefix (toHaveClass('wave:bg-primary')); repository toolsscripts/prefix-codemod.mjsandscripts/prefix-tests-codemod.mjsmade the change.
Deprecated
- Nothing.
warnDeprecatedandresolveDeprecatedProphave no caller in 1.0; they stay for a rename in a 1.x minor, which keeps the old name as a deprecated alias until 2.0.
Removed
Every row of the 1.0 inventory of 0.18 is done (84 rows: the 61 removals below, the 4 default changes and 18 required arguments and props under Changed, and the ref decision, reversed), and no alias is left. Each line names the release that announced it.
- The 0.4 names renamed in 0.5 (announced in 0.5): Checkbox and Switch
onChange(checked)(useonCheckedChange); theonChange(value)of RadioGroup, Rating, SearchBox, SpinButton, ColorPicker, SwatchPicker, TagPicker, TimePicker and DatePicker (useonValueChange); Combobox and DropdownonOptionSelect; TabListselectedValue,defaultSelectedValue,verticalandonTabSelect; NavselectedValue,defaultSelectedValueandonNavItemSelect; aNav.Categorylabelled by its text children; TeachingPopovercurrentStepanddefaultCurrentStep; ListselectionMode="multi"; DataGridselectedKeys,defaultSelectedKeys,onSelectionChange,sortColumn,sortDirection,defaultSortColumnanddefaultSortDirection;Table.HeadandTable.HeadCell(with the flatTableHeadandTableHeadCelland the typesTableHeadPropsandTableHeadCellProps); Stackdirection; Skeletonvariant; a numeric Textweight; Linkvariant(and the typeLinkVariant); Tooltipvariant; Accordion's single-modeopenItems,defaultOpenItemsandonOpenItemsChange. The 0.5 names replace them. - The button-object form of the dismiss and clear slots (announced in 0.5):
MessageBar.dismiss,SearchBox.dismissandTag.dismissIconwith button props; pass icon content and handle the press inonDismissoronClear(see Changed, Slots for what a slot object does now). legacy-tokens.css(announced in 0.5): the file and the export./legacy-tokens.css, the 0.4 variable names.- The
darkandhigh-contrasttheme classes (announced in 0.5):WaveProviderand the portal wrappers carry onlywave-darkandwave-high-contrast(getThemeClassNamereturns one class), and Wave's styles select only those. animations.css(announced in 0.18):src/styles/animations.css, empty since 0.5.- The 0.4 ramp names as overrides (not announced): through 0.18 each ramp stop read its 0.4 name as a fallback (
--wave-brand-80: var(--brand-80, #0f6cbd)), so an app's--brand-80or--grey-38still re-themed Wave; each stop is now its own value, and such an override stops applying without a message. Override--wave-brand-Nand--wave-grey-N, which work since 0.5. - Tooltip
delay(announced in 0.7): useopenDelay. - A numeric
sizeon Input, Select and Slider (announced in 0.9): usehtmlSizeon Input and Select; on Slider it had no effect. - InfoLabel
label(announced in 0.9): usechildren. wave-tag-picker__controlandwave-tag-picker__group(announced in 0.11), withtagPickerClassNames.controland.group: usewave-tag-picker-controlandwave-tag-picker-group.- PresenceBadge
'dnd'and'oof'(announced in 0.13), with the typeDeprecatedPresenceStatus: use'do-not-disturb'and'out-of-office'. The type no longer takes the old names; at run time they still draw'do-not-disturb'and'out-of-office'(the look,data-statusand name of the new status), and a development build warns once per old name. The fallback is a bridge for server data and untyped code, which no type check reads, and may be removed in 2.0: map the old values before rendering (status === 'dnd' ? 'do-not-disturb' : …). Another status outside the union throws aTypeErrorwhile the badge renders, as in 0.18. DataGridColumn.id(announced in 0.14): usecolumnId.useRovingTabIndex(containerRef, options)(announced in 0.18): calluseRovingTabIndex(options)and spread itscontainerPropson the container.- DataGrid's positional
onSortChange(columnId, direction)(announced in 0.18), with the typeDataGridLegacySortProps: give the griditems,sortordefaultSortand readonSortChange(sort, details). - The
[presence=className rule (announced in 0.18): aclassNamewith presence variants no longer turns the default motion ofMenu.Popover,Dialog.Content, Drawer and NavDrawer off; it is a plain class list, andmotionreplaces the default. controlRefof Checkbox, Switch, SearchBox, SpinButton, ColorSlider, AlphaSlider,ColorPicker.HexField, Combobox, Dropdown, TimePicker, DatePicker and TagPicker (not announced):refreaches the control.- The CommonJS build (not announced):
dist/index.cjs, every.cjsmodule and map,index.d.cts, therequirecondition and themodulefield. - The development warnings of the removed forms: every
deprecated:…key ofwarnDeprecatedandresolveDeprecatedProp,MessageBar:dismiss-button-objectandSearchBox:dismiss-button-object(the button-object form; an object whoseasis a button now warns under the…-slot-objectkeys of Added),Badge:color:important,CounterBadge:color:important,Menu.Popover:legacy-motion,Dialog.Content:legacy-motion,Drawer:legacy-motion,NavDrawer:legacy-motion,Image:alt(nowImage:alt-missing),Slider:size-number,Accordion:single-multiple-open,DataGrid:mixed-sort,DataGrid:items-deprecated-sort,DataGrid:sortColumn-without-sortDirectionandDataGrid:sortDirection-without-sortColumn. - From the entry: the values
TableHeadandTableHeadCelland the typesTableHeadProps,TableHeadCellProps,DataGridLegacySortProps,LinkVariantandDeprecatedPresenceStatus; nothing else.
Fixed
- Overflow keeps an item's last visible size while the item is hidden from outside it. It kept the size only while the measured element itself carried the hidden marker, and read 0 otherwise (an element inside
display: nonemeasures 0). Now it also keeps it while an element around the measured one carries the marker: a control inOverflow.Item asChild, whose root carries it (seerefplacement), can stay hidden instead of measuring 0, fitting and being shown again in a loop, and anOverflownested in a hidden item keeps its items' sizes instead of reading them as 0 wide. - The README's custom overlays sample, which did not type-check in 0.18.1, types its props and refs.
- A click on a Checkbox's glyph toggles it once in Firefox and WebKit (present in 0.18.1). A click on the check or the mixed glyph of a checked Checkbox toggled it, the glyph left the box, and those engines, finding the click's target gone, had the label pass the same click to the box again, which toggled it back: a checked Checkbox could not be unchecked by a click on the centre of its check, and inside
Popover.TriggerorMenu.Triggerit opened the surface and closed it again. The glyphs now take no pointer events (a class at the start of their class list), so the click's target is the box, which stays. Chromium was not affected, nor were Switch and the native checkboxes.
Size
Against 0.18.1 as published on npm, measured with this release's build tools (verify-dist's measureImport: a minified production Vite build of an entry that imports the names from dist/index.mjs, bare imports external, gzip by node:zlib; the stylesheets as built, gzip at level 9). Sizes are in bytes:
| Import | 0.18.1 | 1.0.0 | Growth |
|---|---|---|---|
dist/styles.css |
104,654 (16,499 gzip) | 110,691 (16,555 gzip) | +6,037 (+56 gzip) |
dist/components.css (new, internal) |
— | 92,638 (13,299 gzip) | |
dist/utilities.css (new) |
— | 62,857 (6,786 gzip) | |
dist/preflight.css |
3,453 (1,272 gzip) | 3,453 (1,272 gzip) | 0 |
An import of only Button |
11,079 (3,865 gzip) | 12,037 (4,033 gzip) | +958 (+168 gzip) |
An import of only MessageBar |
29,221 (10,201 gzip) | 30,070 (10,222 gzip) | +849 (+21 gzip) |
An import of only Tree |
50,383 (17,271 gzip) | 51,190 (17,427 gzip) | +807 (+156 gzip) |
An import of only Dialog |
72,599 (24,466 gzip) | 73,934 (24,667 gzip) | +1,335 (+201 gzip) |
An import of WaveProvider and Dialog |
75,147 (25,458 gzip) | 76,487 (25,640 gzip) | +1,340 (+182 gzip) |
An import of only DataGrid |
73,306 (24,926 gzip) | 72,123 (24,325 gzip) | −1,183 (−601 gzip) |
An import of usePresence and Presence |
5,453 (2,341 gzip) | 5,453 (2,341 gzip) | 0 |
An import of only useVirtualWindow |
3,868 (1,817 gzip) | 3,868 (1,817 gzip) | 0 |
An import of only createBrandTokens |
3,630 (1,956 gzip) | 3,630 (1,956 gzip) | 0 |
An import of only waveTokens |
3,071 (969 gzip) | 3,071 (969 gzip) | 0 |
An import of only Table |
31,658 (11,015 gzip) | 33,005 (11,100 gzip) | +1,347 (+85 gzip) |
An import of only cn |
806 (383 gzip) | 1,062 (532 gzip) | +256 (+149 gzip) |
An import of only mergeSlotProps |
2,558 (1,224 gzip) | 2,782 (1,344 gzip) | +224 (+120 gzip) |
An import of only getNativeElementProps |
2,604 (1,214 gzip) | 2,604 (1,214 gzip) | 0 |
| The npm package | 4,092,458 (1,055 files; 15,878,351 unpacked) | 2,415,234 (537 files; 8,561,563 unpacked) | −1,677,224 |
- The prefix costs about 5 bytes per class word before gzip, and the components' merge holds the prefix and its parse function (about 220 bytes); gzip absorbs most of it. The removals pay for part of it (about 430 bytes of MessageBar, about 200 of Tree and of Dialog), and in DataGrid they outweigh it: its 0.x selection, sort and column aliases and its positional callback form are gone. The presence core, the window,
createBrandTokensandwaveTokenshold no class string and no merge. The publiccnholds the prefix-aware merge of the components now. A control with a newrootpart pays its merge (Checkbox-only grows from 18,527 to 19,002 bytes, TagPicker-only from 120,133 to 122,230, the prefix included). dist/styles.cssgrows by the prefix (about 6 bytes per selector; 6,642 bytes over the sheet built without it), less what the removals took out (605 bytes: the.darkand.high-contrastselectors among them); gzip absorbs nearly all of it.- The package halves:
distholds 524 files (1,043 in 0.18.1), without the CommonJS build. - Budgets:
verify-distgates the ten imports fromButtontowaveTokensat their size measured at the flip plus 512 bytes (192 gzip), and prints each against 0.18.1;Table,cnand the helpers are measured, not gated.
Known limits
- The custom Tailwind setup that imports
./stylesinto a layer of the app's (README, "Custom Tailwind setups") follows the cascade rules and was checked once, in Chromium;pack-smoke's custom setup checks only that the app's build holds no component class. - The real-browser passes of the phase ran in Chromium, Firefox and WebKit. The first covered the stylesheet setups, a consumer's overrides, right to left, motion, forced colors and the app's base styles, and found
./utilitieslosing to the base styles of./styleswhile it was layered. The final pass verified the release in all three engines: the unlayered./utilities(a Button's and a native button's background, a border color; on the provider root itself a utility wins by coming after./styles); the twelve controls thatrefreaches (refand the focus ring on the control,slotProps.root.refon the root, a Field label'shtmlFor, form reset, submit and the focus of a required control, Dialog, Popover, Menu, context Menu and TeachingPopover triggers around a Switch or Checkbox placed against the control with Escape returning focus to it,Overflow.Item asChild, the roving locks); TimePicker's default format (12-hour in the server HTML, then 24-hour foren-GB,de-DEandja-JPafter hydration with no mismatch, 24-hour on a client-only mount, an explicitformatwinning); an app's@layer basestyles inside the provider and layered token overrides (:rootalone does not reach the theme tokens,:root, .wave-lightdoes); the./tailwindpath's@property --tw-*registrations inside@layer components(pixel-identical to the plain./styles); and the Checkbox glyph fix. - WebKit's forced-colors emulation in the browser pass (Playwright's WebKit on Windows) matches the media query but applies no system colors, so forced colors were compared fully in Chromium and Firefox only.
- No CI job runs
require()on Node.js 22.12 itself:pack-smoke's floor step runs only whenWAVE_NODE_FLOORnames a 22.12 binary, which no CI job sets, and the CI checksrequire()on the Node.js lines it runs (22, 24 and 26). The final pass ran it by hand on Node.js 22.12.0 and 24.21.0. Overflow.Item asChildaround one of the twelve controls measures the control, not the whole component, so a control with a wider root (a Checkbox with its label) can overflow the row by the difference: use an item withoutasChild.- On the
./tailwindpath Wave's@property --tw-*registrations sit inside@layer components, with the precompiled components (0.18.1: at the top level of the app's Tailwind output). Current Chromium, Firefox and WebKit honor them there (the final pass found no pixel difference from the plain./styles); Safari 16.4 to 17.x, inside the README's browser floor, was not checked. - The codemod has no
binorexportsentry, so it is reached by its path,node node_modules/@mortenbrudvik/waveui/codemod/migrate-1.0.mjs. Under Yarn Plug'n'Play there is nonode_modules: run it withyarn nodefrom the folder Yarn resolves for the package (yarn node -p "require.resolve('@mortenbrudvik/waveui/package.json')"names itspackage.json; the codemod iscodemod/migrate-1.0.mjsbeside it), or from.yarn/unplugged/afteryarn unplug @mortenbrudvik/waveui, or run a copy of the file, which needs nothing but Node.js (checked with Yarn 4.9). tailwind-mergeis pinned to an exact version (Package): an app that installs another version of it gets a second copy.