Repository navigation
Releases
@var-ui/react@0.14.0
Minor Changes
-
#275
d166a77Thanks @dbanksdesign! -Cardgaps from real apps:- react
onClickmakes a div card pressable. The title renders as a<button>whose::aftercovers the card: button semantics, focus and Enter/Space, the title as its accessible name, and no block content inside a button. Inner links and buttons stay clickable. - react, astro Every card takes
description, andtitleEnd(Astro: thetitle-endslot) for a badge at the end of the title row. React link cards accept a nodetitle. - core
cardrecipe: newheader,titleEnd,descriptionandactionslots and thedata-pressableroot state. A div card with no children no longer renders an empty body, which added a stray gap.
- react
-
#279
2473fcbThanks @dbanksdesign! - Named colors for identity, not status:- Badge and StatusDot
colortakes any name from the base palette:blue,red,violet,teal,sage,stoneand the rest of the 40 families. It sets the hue instead oftone, in every appearance.none(the default) leavestonein charge.<Badge color="violet">Reviewer</Badge>. - Tokens:
color.hue.<name>for every palette family, mode-aware: step 7 in light mode (≥ 5.5:1 on surface and subtle) and step 4 in dark mode (≥ 8:1), so each works as badge text, an outline and a fill. color.categorical.1–8lists eight of them in chart series order (blue, orange, teal, pink, grass, violet, amber, red). Chart chrome:color.chart.axis,gridlineandplot.
- Badge and StatusDot
-
#295
974ba64Thanks @dbanksdesign! - Everydata-*attribute a component renders is now either public (documented) or internal (data-var-ui-*). There is no undocumented middle ground any more.- Public: recipe variant axes and every attribute the recipes select on, including root flags set on an ancestor of a slot (AppShell
data-aside, Layoutdata-has-header, …) and markers inside a slot (Calendardata-calendar-mark). They are listed in each component's Styling hooks table. Newly documented in the Plain CSS guide:data-valid,data-dirty,data-touched(Field),data-has-children(Tree items),data-row-header(Table),data-trigger(react-aria popups),data-language(code block). - Renamed to
data-var-ui-*(script wiring and config, not a styling API): the Astro script attributes for Accordion, Banner, ColorModeToggle, CommandPalette, CopyButton, Menu, SegmentedControl, SideNav, Toast, Toc, the shared copy vocabulary (data-var-ui-code,data-var-ui-copy-label,data-var-ui-copied-label,data-var-ui-error-label,data-var-ui-timeout,data-var-ui-value) and thedata-class-*payloads (nowdata-var-ui-class-*); React's Carousel, Menubar, ToggleGroup, Splitter, Tree, context-menu, icon-fallback and popover markers; TopNav'sdata-label(nowdata-var-ui-label). - Removed (each part already has a slot class):
data-codeblock,data-codeblock-header,-body,-pre,data-alert-action,data-empty-state-icon,data-loading-overlay-content,data-timeline,data-timeline-item, ScrollAreadata-edge, AppShelldata-has-top-nav. Select.var-ui-code-block,.var-ui-code-block__body,.var-ui-alert__actionLinkand so on instead.
- Public: recipe variant axes and every attribute the recipes select on, including root flags set on an ancestor of a slot (AppShell
-
#238
e97729dThanks @dbanksdesign! -prosegains an opt-out, and the docs-only prose recipe moves out of core.data-not-prose(NOT_PROSE_ATTRIBUTE): prose element styles skip the marked element and everything inside it (a live demo, an embedded widget), while the element still takes part in the vertical flow.proseRules()scopes your own element rules the same way when you extend prose.proseContentis removed from@var-ui/core(classdocs-prose). It was the docs site's reading style, and it sat in theutilitieslayer, so it overrode component styles and neededdata-prose-isolateto keep out of demos.@var-ui/docsnow hasdocsProse(in@var-ui/docs/styles), which setsprose's vars to the docs ramp and adds the docs extras. It lives in thebaselayer, so components inside win.data-prose-isolateis replaced bydata-not-prose.proseno longer gives inline children of list items and blockquotes (code, badges) a bottom margin; only block children are spaced.Tablesetsdisplay: tableon its<table>, so it keeps its layout insideProse(which makes bare tables scrollable blocks).
-
#276
146282bThanks @dbanksdesign! - Form field gaps from real apps:- TextAreaField
autosizewithminRows/maxRows: platformfield-sizing: content, heights inlhplus padding (core:autosizevariant,minRows/maxRowsvars). - Required marker: every field label shows
*when the field is required, as CSS from the shared field chrome. It's excluded from the accessible name (empty alt text), sincearia-requiredalready says it. label,descriptionanderrorMessageaccept nodes on every field (FieldMeta), likeTypeahead. NewlabelText()for code that needs the label as a string.NumberInput.onValueChangedocuments that it fires on commit (blur, Enter, steppers), not per keystroke. Use the nativeonChangefor live dirty tracking.
- TextAreaField
-
#255
704d04cThanks @dbanksdesign! -IconButton size="xl"carries a matching 24px glyph. Newsize.icon.xltoken (1.5rem) andIcon size="xl";IconButtonno longer mapsxlto thelgglyph. Withpillit is a circle, for primary play-style actions:<IconButton size="xl" pill tone="accent" appearance="solid" icon={…} aria-label="Play" />. -
#233
8af0092Thanks @dbanksdesign! -CodeBlockandCopyButtonshare one set of copy props and events.CodeBlock(React and Astro):copyErrorLabelis nowerrorLabel, matchingCopyButton.copyTextanderrorTextare removed: the copy button is icon-only, socopyLabel/copiedLabel/errorLabel(its accessible name in each state) are the only labels. A copy failure shows the error icon, asCopyButtondoes.- React
CodeBlockgainsonCopied(value)andonCopyError(error, value)and is built onuseCopy. It resets after 2 seconds likeCopyButton(it was 1.2s). The status region now announces success as well as failure; success is screen-reader-only. - Astro:
CodeBlockfires the same events asCopyButton, renamed tovar-ui:copied/var-ui:copy-error(COPIED_EVENT/COPY_ERROR_EVENT; previouslyCOPY_BUTTON_COPIED_EVENT/COPY_BUTTON_ERROR_EVENT), and honoursdata-var-ui-timeout. The hand-written markup contract usesdata-var-ui-error-label(wasdata-copy-error-label) and drops the[data-codeblock-copy-text]span. CopyButton's defaulterrorLabelis nowCopy failed(wasError), anduseCopyclearserrorafter the timeout, as it already did forcopied.
-
#281
6ac0e2cThanks @dbanksdesign! -@var-ui/reactno longer depends onreact-aria, directly or as a peer: installreact,react-dom,react-aria-componentsand@var-ui/core. Our popups no longer render under a react-aria trigger's press responder, which removes the one reason we importedreact-aria(itsOverlay, to clear that responder).Menuprovides react-aria's menu contexts itself (MenuContext,RootMenuTriggerStateContext, the popover and overlay-state contexts) instead of wrapping in RACMenuTrigger. The trigger handles its own click and keys: ArrowDown, Enter and Space open with the first item focused, ArrowUp with the last. Submenus, Menubar and the presets are unchanged.ColorInput's picker is a var-uiPopover(a light-dismiss native popover) instead of RACDialogTrigger. It still takes focus when it opens and gives it back to the swatch.- The internal popover shell renders its content in place, without
Overlay. If a var-ui popup is placed inside a RACMenuTrigger/DialogTrigger, it keeps its anchor and warns in development.
-
#250
993ae7fThanks @dbanksdesign! -react-ariais now a peer dependency (^3.50.0) instead of an exact dependency, so apps install one copy: the onereact-aria-componentsuses. Two copies made menu items take over their trigger's ref, soMenupopups anchored to their own first item and rendered at the window's corner. A popup now ignores a trigger that sits inside itself and warns in development thatreact-ariais duplicated.@react-aria/i18nis gone (...
@var-ui/icons@0.14.0
Patch Changes
- #254
f066000Thanks @dbanksdesign! - Every published package now ships itsCHANGELOG.md. A new Upgrading guide (/docs/upgrading) covers the 0.6 → 0.13 breaks: platform prop names,filled→solid, native overlays, space tokens and removed exports. The core README liststypestylesas the one TypeStyles export (no rootrecipe/style), and the React README no longer describes the package as React Aria wrappers.IconButtonwarns once in development when it renders without anicon(any cause, including the pre-0.7name="close").
@var-ui/docs@0.14.0
Minor Changes
-
#238
e97729dThanks @dbanksdesign! -prosegains an opt-out, and the docs-only prose recipe moves out of core.data-not-prose(NOT_PROSE_ATTRIBUTE): prose element styles skip the marked element and everything inside it (a live demo, an embedded widget), while the element still takes part in the vertical flow.proseRules()scopes your own element rules the same way when you extend prose.proseContentis removed from@var-ui/core(classdocs-prose). It was the docs site's reading style, and it sat in theutilitieslayer, so it overrode component styles and neededdata-prose-isolateto keep out of demos.@var-ui/docsnow hasdocsProse(in@var-ui/docs/styles), which setsprose's vars to the docs ramp and adds the docs extras. It lives in thebaselayer, so components inside win.data-prose-isolateis replaced bydata-not-prose.proseno longer gives inline children of list items and blockquotes (code, badges) a bottom margin; only block children are spaced.Tablesetsdisplay: tableon its<table>, so it keeps its layout insideProse(which makes bare tables scrollable blocks).
-
#233
8af0092Thanks @dbanksdesign! -CodeBlockandCopyButtonshare one set of copy props and events.CodeBlock(React and Astro):copyErrorLabelis nowerrorLabel, matchingCopyButton.copyTextanderrorTextare removed: the copy button is icon-only, socopyLabel/copiedLabel/errorLabel(its accessible name in each state) are the only labels. A copy failure shows the error icon, asCopyButtondoes.- React
CodeBlockgainsonCopied(value)andonCopyError(error, value)and is built onuseCopy. It resets after 2 seconds likeCopyButton(it was 1.2s). The status region now announces success as well as failure; success is screen-reader-only. - Astro:
CodeBlockfires the same events asCopyButton, renamed tovar-ui:copied/var-ui:copy-error(COPIED_EVENT/COPY_ERROR_EVENT; previouslyCOPY_BUTTON_COPIED_EVENT/COPY_BUTTON_ERROR_EVENT), and honoursdata-var-ui-timeout. The hand-written markup contract usesdata-var-ui-error-label(wasdata-copy-error-label) and drops the[data-codeblock-copy-text]span. CopyButton's defaulterrorLabelis nowCopy failed(wasError), anduseCopyclearserrorafter the timeout, as it already did forcopied.
Patch Changes
-
#291
df5fd15Thanks @dbanksdesign! - Fonts. Add thealloGroteskpairing: Allo (Latin subset, variable weight) for body and UI, Space Grotesk for display, JetBrains Mono for code, each webfont backed by a metric-matched Arial fallback so text doesn't rewrap when the webfont swaps in.defineFontsslots accept several faces (upright + italic of one family), register a face shared by two slots once, and take an optionalmetricFallbackface;FontFaceDefinitiongainssizeAdjust,ascentOverride,descentOverrideandlineGapOverride.Letter-spacing tokens resolve at the text that uses them.
letterSpacing.*tokens were registered as<length-percentage>, soemvalues computed once against the root font size:caps(0.06em) rendered as 0.08em on 12px labels anddisplaytracking didn't scale with headline size. They are now unregistered (*syntax), soemresolves at the use site.Tabular figures on
badgeand theslideroutput.Docs prose: H3–H6 use the body face (H3 at weight 650); the lead paragraph and page-header lead track at −0.005em.
-
#273
70443fbThanks @dbanksdesign! - NewcodeBlockMarkup({ code, language, filename, copyable, … })in core: the structure of a code block (header, language label, copy button, body,pre,code) as plain attribute maps. The React and AstroCodeBlocks and the docs Shiki transformer all render from it, so they can't drift. They had: markdown fences put the language in the filename slot, showed a visible "Copy" label, and useddata-copy-error-label, which the copy script never read. The root also carriesdata-language.Fix (react): a
CodeBlockwithout highlighted HTML double-escaped its code, so<div>showed as<div>. -
#272
0ef2a05Thanks @dbanksdesign! - New reading type tokens:fontSize.prose.{body, lead, h1, h2, h3}(16 / 19 / 44 / 28 / 20px) and the paired fixed line heightslineHeight.prose.*(26 / 28 / 48 / 34 / 28px), so themes can tune long-form type apart from the 14px control scale. The docs kit (docsProse, the page header lead) uses them instead of hard-coded rems.Proseitself stays relative to its inherited font size. -
#261
c3313b6Thanks @dbanksdesign! - CollapsibleSideNavsections can be controlled and remembered.- react
SideNav.Sectiontakesopen/onOpenChange(controlled). A parent that ignores the change keeps the section as it is. - react, astro
SideNav persistKeyremembers which collapsible sections the reader opened or closed, inlocalStorage. Sections are keyed byid, or else their title. The section holding the current page always starts open. AstroSideNavalso initializes navs swapped in by the client router (astro:page-load). - core
persistDisclosures(root, key)(@var-ui/core/shared/disclosureState) is the framework-agnostic helper behind both. - docs The sidebar uses
persistKey. The customdocsSidebarStatescript is removed.
- react
-
#254
f066000Thanks @dbanksdesign! - Every published package now ships itsCHANGELOG.md. A new Upgrading guide (/docs/upgrading) covers the 0.6 → 0.13 breaks: platform prop names,filled→solid, native overlays, space tokens and removed exports. The core README liststypestylesas the one TypeStyles export (no rootrecipe/style), and the React README no longer describes the package as React Aria wrappers.IconButtonwarns once in development when it renders without anicon(any cause, including the pre-0.7name="close").
@var-ui/docs-components@0.14.0
Patch Changes
- #254
f066000Thanks @dbanksdesign! - Every published package now ships itsCHANGELOG.md. A new Upgrading guide (/docs/upgrading) covers the 0.6 → 0.13 breaks: platform prop names,filled→solid, native overlays, space tokens and removed exports. The core README liststypestylesas the one TypeStyles export (no rootrecipe/style), and the React README no longer describes the package as React Aria wrappers.IconButtonwarns once in development when it renders without anicon(any cause, including the pre-0.7name="close").
@var-ui/core@0.14.0
Minor Changes
-
#291
df5fd15Thanks @dbanksdesign! - Fonts. Add thealloGroteskpairing: Allo (Latin subset, variable weight) for body and UI, Space Grotesk for display, JetBrains Mono for code, each webfont backed by a metric-matched Arial fallback so text doesn't rewrap when the webfont swaps in.defineFontsslots accept several faces (upright + italic of one family), register a face shared by two slots once, and take an optionalmetricFallbackface;FontFaceDefinitiongainssizeAdjust,ascentOverride,descentOverrideandlineGapOverride.Letter-spacing tokens resolve at the text that uses them.
letterSpacing.*tokens were registered as<length-percentage>, soemvalues computed once against the root font size:caps(0.06em) rendered as 0.08em on 12px labels anddisplaytracking didn't scale with headline size. They are now unregistered (*syntax), soemresolves at the use site.Tabular figures on
badgeand theslideroutput.Docs prose: H3–H6 use the body face (H3 at weight 650); the lead paragraph and page-header lead track at −0.005em.
-
#275
d166a77Thanks @dbanksdesign! -Cardgaps from real apps:- react
onClickmakes a div card pressable. The title renders as a<button>whose::aftercovers the card: button semantics, focus and Enter/Space, the title as its accessible name, and no block content inside a button. Inner links and buttons stay clickable. - react, astro Every card takes
description, andtitleEnd(Astro: thetitle-endslot) for a badge at the end of the title row. React link cards accept a nodetitle. - core
cardrecipe: newheader,titleEnd,descriptionandactionslots and thedata-pressableroot state. A div card with no children no longer renders an empty body, which added a stray gap.
- react
-
#279
2473fcbThanks @dbanksdesign! - Named colors for identity, not status:- Badge and StatusDot
colortakes any name from the base palette:blue,red,violet,teal,sage,stoneand the rest of the 40 families. It sets the hue instead oftone, in every appearance.none(the default) leavestonein charge.<Badge color="violet">Reviewer</Badge>. - Tokens:
color.hue.<name>for every palette family, mode-aware: step 7 in light mode (≥ 5.5:1 on surface and subtle) and step 4 in dark mode (≥ 8:1), so each works as badge text, an outline and a fill. color.categorical.1–8lists eight of them in chart series order (blue, orange, teal, pink, grass, violet, amber, red). Chart chrome:color.chart.axis,gridlineandplot.
- Badge and StatusDot
-
#273
70443fbThanks @dbanksdesign! - NewcodeBlockMarkup({ code, language, filename, copyable, … })in core: the structure of a code block (header, language label, copy button, body,pre,code) as plain attribute maps. The React and AstroCodeBlocks and the docs Shiki transformer all render from it, so they can't drift. They had: markdown fences put the language in the filename slot, showed a visible "Copy" label, and useddata-copy-error-label, which the copy script never read. The root also carriesdata-language.Fix (react): a
CodeBlockwithout highlighted HTML double-escaped its code, so<div>showed as<div>. -
#295
974ba64Thanks @dbanksdesign! - Everydata-*attribute a component renders is now either public (documented) or internal (data-var-ui-*). There is no undocumented middle ground any more.- Public: recipe variant axes and every attribute the recipes select on, including root flags set on an ancestor of a slot (AppShell
data-aside, Layoutdata-has-header, …) and markers inside a slot (Calendardata-calendar-mark). They are listed in each component's Styling hooks table. Newly documented in the Plain CSS guide:data-valid,data-dirty,data-touched(Field),data-has-children(Tree items),data-row-header(Table),data-trigger(react-aria popups),data-language(code block). - Renamed to
data-var-ui-*(script wiring and config, not a styling API): the Astro script attributes for Accordion, Banner, ColorModeToggle, CommandPalette, CopyButton, Menu, SegmentedControl, SideNav, Toast, Toc, the shared copy vocabulary (data-var-ui-code,data-var-ui-copy-label,data-var-ui-copied-label,data-var-ui-error-label,data-var-ui-timeout,data-var-ui-value) and thedata-class-*payloads (nowdata-var-ui-class-*); React's Carousel, Menubar, ToggleGroup, Splitter, Tree, context-menu, icon-fallback and popover markers; TopNav'sdata-label(nowdata-var-ui-label). - Removed (each part already has a slot class):
data-codeblock,data-codeblock-header,-body,-pre,data-alert-action,data-empty-state-icon,data-loading-overlay-content,data-timeline,data-timeline-item, ScrollAreadata-edge, AppShelldata-has-top-nav. Select.var-ui-code-block,.var-ui-code-block__body,.var-ui-alert__actionLinkand so on instead.
- Public: recipe variant axes and every attribute the recipes select on, including root flags set on an ancestor of a slot (AppShell
-
#238
e97729dThanks @dbanksdesign! -prosegains an opt-out, and the docs-only prose recipe moves out of core.data-not-prose(NOT_PROSE_ATTRIBUTE): prose element styles skip the marked element and everything inside it (a live demo, an embedded widget), while the element still takes part in the vertical flow.proseRules()scopes your own element rules the same way when you extend prose.proseContentis removed from@var-ui/core(classdocs-prose). It was the docs site's reading style, and it sat in theutilitieslayer, so it overrode component styles and neededdata-prose-isolateto keep out of demos.@var-ui/docsnow hasdocsProse(in@var-ui/docs/styles), which setsprose's vars to the docs ramp and adds the docs extras. It lives in thebaselayer, so components inside win.data-prose-isolateis replaced bydata-not-prose.proseno longer gives inline children of list items and blockquotes (code, badges) a bottom margin; only block children are spaced.Tablesetsdisplay: tableon its<table>, so it keeps its layout insideProse(which makes bare tables scrollable blocks).
-
#253
448324dThanks @dbanksdesign! - Breaking: the font presets are functions:groteskMono(),figtreeGrotesk()andalloGrotesk()(were objects). They take{ baseUrl }(default/fonts/) for where the app hosts the.woff2files. Var UI does not ship the files. The presets' JSDoc and the Customize guide list the exact filenames to self-host and where to get them. -
#276
146282bThanks @dbanksdesign! - Form field gaps from real apps:- TextAreaField
autosizewithminRows/maxRows: platformfield-sizing: content, heights inlhplus padding (core:autosizevariant,minRows/maxRowsvars). - Required marker: every field label shows
*when the field is required, as CSS from the shared field chrome. It's excluded from the accessible name (empty alt text), sincearia-requiredalready says it. label,descriptionanderrorMessageaccept nodes on every field (FieldMeta), likeTypeahead. NewlabelText()for code that needs the label as a string.NumberInput.onValueChangedocuments that it fires on commit (blur, Enter, steppers), not per keystroke. Use the nativeonChangefor live dirty tracking.
- TextAreaField
-
#260
0a7c3b0Thanks @dbanksdesign! -Grid's responsivecolumnsmap ({ base: 2, md: 3 }) works with extracted CSS and SSR. In Astro it silently stayed one column, because the oldgridColumnsStyle()built a runtime-hashed class that never reached the build-time stylesheet. Thegridrecipe'sfixedvariant is now static CSS that reads per-breakpoint track vars (columns.base…columns.xlrecipe vars with TypeStyles'inheritOverride, so an unset breakpoint stays unset). Each breakpoint falls back to the nearest smaller one that is set, and before the first set one to theautotemplate. The components set those variables inline.Breaking (core):
gridColumnsStyleis replaced bygridColumnsVars(counts), which returns the inline vars to pair withgrid({ columns: 'fixed' }). -
#255
704d04cThanks @dbanksdesign! - `IconButton...
@var-ui/cli@0.14.0
Minor Changes
- #240
a340f9fThanks @dbanksdesign! - Newvar-ui tokens [query] [--json]: lists design tokens with their CSS variable and default value (light / dark for colours). The query matches the token path or variable name, ignoring case and separators, so a pasted--var-ui-font-size-mdfinds--var-ui-fontSize-md. The catalog gains atokensarray fromlistDesignTokens(), and the AGENTS.md block mentions the command.
Patch Changes
-
#281
6ac0e2cThanks @dbanksdesign! -@var-ui/reactno longer depends onreact-aria, directly or as a peer: installreact,react-dom,react-aria-componentsand@var-ui/core. Our popups no longer render under a react-aria trigger's press responder, which removes the one reason we importedreact-aria(itsOverlay, to clear that responder).Menuprovides react-aria's menu contexts itself (MenuContext,RootMenuTriggerStateContext, the popover and overlay-state contexts) instead of wrapping in RACMenuTrigger. The trigger handles its own click and keys: ArrowDown, Enter and Space open with the first item focused, ArrowUp with the last. Submenus, Menubar and the presets are unchanged.ColorInput's picker is a var-uiPopover(a light-dismiss native popover) instead of RACDialogTrigger. It still takes focus when it opens and gives it back to the swatch.- The internal popover shell renders its content in place, without
Overlay. If a var-ui popup is placed inside a RACMenuTrigger/DialogTrigger, it keeps its anchor and warns in development.
-
#265
765e234Thanks @dbanksdesign! - Component props data includes recipe variant defaults (size,tone,appearance, …), sovar-ui component <name>and the docs Markdown views show them, not only the docs props table. JSDoc@defaultstill wins. -
#250
993ae7fThanks @dbanksdesign! -react-ariais now a peer dependency (^3.50.0) instead of an exact dependency, so apps install one copy: the onereact-aria-componentsuses. Two copies made menu items take over their trigger's ref, soMenupopups anchored to their own first item and rendered at the window's corner. A popup now ignores a trigger that sits inside itself and warns in development thatreact-ariais duplicated.@react-aria/i18nis gone (isRTLcomes fromreact-aria-components).Install it next to
react-aria-components:pnpm add react-aria, then checknpm ls react-arialists one version. -
#254
f066000Thanks @dbanksdesign! - Every published package now ships itsCHANGELOG.md. A new Upgrading guide (/docs/upgrading) covers the 0.6 → 0.13 breaks: platform prop names,filled→solid, native overlays, space tokens and removed exports. The core README liststypestylesas the one TypeStyles export (no rootrecipe/style), and the React README no longer describes the package as React Aria wrappers.IconButtonwarns once in development when it renders without anicon(any cause, including the pre-0.7name="close").
@var-ui/astro@0.14.0
Minor Changes
-
#275
d166a77Thanks @dbanksdesign! -Cardgaps from real apps:- react
onClickmakes a div card pressable. The title renders as a<button>whose::aftercovers the card: button semantics, focus and Enter/Space, the title as its accessible name, and no block content inside a button. Inner links and buttons stay clickable. - react, astro Every card takes
description, andtitleEnd(Astro: thetitle-endslot) for a badge at the end of the title row. React link cards accept a nodetitle. - core
cardrecipe: newheader,titleEnd,descriptionandactionslots and thedata-pressableroot state. A div card with no children no longer renders an empty body, which added a stray gap.
- react
-
#279
2473fcbThanks @dbanksdesign! - Named colors for identity, not status:- Badge and StatusDot
colortakes any name from the base palette:blue,red,violet,teal,sage,stoneand the rest of the 40 families. It sets the hue instead oftone, in every appearance.none(the default) leavestonein charge.<Badge color="violet">Reviewer</Badge>. - Tokens:
color.hue.<name>for every palette family, mode-aware: step 7 in light mode (≥ 5.5:1 on surface and subtle) and step 4 in dark mode (≥ 8:1), so each works as badge text, an outline and a fill. color.categorical.1–8lists eight of them in chart series order (blue, orange, teal, pink, grass, violet, amber, red). Chart chrome:color.chart.axis,gridlineandplot.
- Badge and StatusDot
-
#295
974ba64Thanks @dbanksdesign! - Everydata-*attribute a component renders is now either public (documented) or internal (data-var-ui-*). There is no undocumented middle ground any more.- Public: recipe variant axes and every attribute the recipes select on, including root flags set on an ancestor of a slot (AppShell
data-aside, Layoutdata-has-header, …) and markers inside a slot (Calendardata-calendar-mark). They are listed in each component's Styling hooks table. Newly documented in the Plain CSS guide:data-valid,data-dirty,data-touched(Field),data-has-children(Tree items),data-row-header(Table),data-trigger(react-aria popups),data-language(code block). - Renamed to
data-var-ui-*(script wiring and config, not a styling API): the Astro script attributes for Accordion, Banner, ColorModeToggle, CommandPalette, CopyButton, Menu, SegmentedControl, SideNav, Toast, Toc, the shared copy vocabulary (data-var-ui-code,data-var-ui-copy-label,data-var-ui-copied-label,data-var-ui-error-label,data-var-ui-timeout,data-var-ui-value) and thedata-class-*payloads (nowdata-var-ui-class-*); React's Carousel, Menubar, ToggleGroup, Splitter, Tree, context-menu, icon-fallback and popover markers; TopNav'sdata-label(nowdata-var-ui-label). - Removed (each part already has a slot class):
data-codeblock,data-codeblock-header,-body,-pre,data-alert-action,data-empty-state-icon,data-loading-overlay-content,data-timeline,data-timeline-item, ScrollAreadata-edge, AppShelldata-has-top-nav. Select.var-ui-code-block,.var-ui-code-block__body,.var-ui-alert__actionLinkand so on instead.
- Public: recipe variant axes and every attribute the recipes select on, including root flags set on an ancestor of a slot (AppShell
-
#238
e97729dThanks @dbanksdesign! -prosegains an opt-out, and the docs-only prose recipe moves out of core.data-not-prose(NOT_PROSE_ATTRIBUTE): prose element styles skip the marked element and everything inside it (a live demo, an embedded widget), while the element still takes part in the vertical flow.proseRules()scopes your own element rules the same way when you extend prose.proseContentis removed from@var-ui/core(classdocs-prose). It was the docs site's reading style, and it sat in theutilitieslayer, so it overrode component styles and neededdata-prose-isolateto keep out of demos.@var-ui/docsnow hasdocsProse(in@var-ui/docs/styles), which setsprose's vars to the docs ramp and adds the docs extras. It lives in thebaselayer, so components inside win.data-prose-isolateis replaced bydata-not-prose.proseno longer gives inline children of list items and blockquotes (code, badges) a bottom margin; only block children are spaced.Tablesetsdisplay: tableon its<table>, so it keeps its layout insideProse(which makes bare tables scrollable blocks).
-
#233
8af0092Thanks @dbanksdesign! -CodeBlockandCopyButtonshare one set of copy props and events.CodeBlock(React and Astro):copyErrorLabelis nowerrorLabel, matchingCopyButton.copyTextanderrorTextare removed: the copy button is icon-only, socopyLabel/copiedLabel/errorLabel(its accessible name in each state) are the only labels. A copy failure shows the error icon, asCopyButtondoes.- React
CodeBlockgainsonCopied(value)andonCopyError(error, value)and is built onuseCopy. It resets after 2 seconds likeCopyButton(it was 1.2s). The status region now announces success as well as failure; success is screen-reader-only. - Astro:
CodeBlockfires the same events asCopyButton, renamed tovar-ui:copied/var-ui:copy-error(COPIED_EVENT/COPY_ERROR_EVENT; previouslyCOPY_BUTTON_COPIED_EVENT/COPY_BUTTON_ERROR_EVENT), and honoursdata-var-ui-timeout. The hand-written markup contract usesdata-var-ui-error-label(wasdata-copy-error-label) and drops the[data-codeblock-copy-text]span. CopyButton's defaulterrorLabelis nowCopy failed(wasError), anduseCopyclearserrorafter the timeout, as it already did forcopied.
-
#261
c3313b6Thanks @dbanksdesign! - CollapsibleSideNavsections can be controlled and remembered.- react
SideNav.Sectiontakesopen/onOpenChange(controlled). A parent that ignores the change keeps the section as it is. - react, astro
SideNav persistKeyremembers which collapsible sections the reader opened or closed, inlocalStorage. Sections are keyed byid, or else their title. The section holding the current page always starts open. AstroSideNavalso initializes navs swapped in by the client router (astro:page-load). - core
persistDisclosures(root, key)(@var-ui/core/shared/disclosureState) is the framework-agnostic helper behind both. - docs The sidebar uses
persistKey. The customdocsSidebarStatescript is removed.
- react
-
#278
a8ce869Thanks @dbanksdesign! - AstroTabs: the list and panels can live in different layout regions. The controller finds a tab's panel byaria-controlsanywhere in the document,Tabstakesidandpanels={false}(list only), and the newTabPanel(tabs,value,selected) renders a panel anywhere. Tab and panel ids are scoped by theTabsid (<id>-tab-<value>), fixing collisions between two tab sets with the same values on one page. Arrow keys follow the reading direction (RTL), and navs swapped in by the client router initialize. -
#258
c0da8e5Thanks @dbanksdesign! - Toasts fit around app chrome.- core
toastrecipe (its screen-edge axis export is nowtoastPlacement, wasplacement):top-centerandbottom-centerplacements, andoffsetBlock/offsetInlinevars (--var-ui-toast-offsetblock/--var-ui-toast-offsetinline) that move the region off its edges. They use TypeStyles'inheritOverride, so a value set on:rootreaches the region, for example above a bottom player bar. Also fixes the region'smax-width, which was a single-quoted string with an uninterpolated${…}and so was never applied. - react
ToastProviderandToastRegiontakeoffset(a length, or{ block, inline }).ToastProvideralso takesclassName,styleand an existingqueue, which keeps its own limit unlessmaxVisibleToastsis passed. NewcreateToaster(queue)returns the imperativetoastAPI bound to a queue you own, for apps that render their ownToastRegion. - astro
ToastRegiontakesoffsetwith the same shape.Grid,TextandAspectRatiouse the sharedmergeInlineStylehelper instead of their own copies, so astyleobject no longer loses to the component's own vars.
- core
-
#232
01f82e4Thanks @dbanksdesign! -ButtonandIconButtontakesize="xs", a 20px button for dense rows, tags and code-block headers. An invisible layer grows it...
@var-ui/react@0.2.1
Patch Changes
- #31
2a43136Thanks @dbanksdesign! - Point the repository metadata at the phthalo-dev GitHub organization.
@var-ui/icons@0.2.1
Patch Changes
- #31
2a43136Thanks @dbanksdesign! - Point the repository metadata at the phthalo-dev GitHub organization.
@var-ui/docs@0.2.1
Patch Changes
- #31
2a43136Thanks @dbanksdesign! - Point the repository metadata at the phthalo-dev GitHub organization.