Skip to content

Releases

@var-ui/react@0.14.0

Choose a tag to compare

@phthalo-release-bot phthalo-release-bot released this 23 Nov 23:57
22ffa61

Minor Changes

  • #275 d166a77 Thanks @dbanksdesign! - Card gaps from real apps:

    • react onClick makes a div card pressable. The title renders as a <button> whose ::after covers 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, and titleEnd (Astro: the title-end slot) for a badge at the end of the title row. React link cards accept a node title.
    • core card recipe: new header, titleEnd, description and action slots and the data-pressable root state. A div card with no children no longer renders an empty body, which added a stray gap.
  • #279 2473fcb Thanks @dbanksdesign! - Named colors for identity, not status:

    • Badge and StatusDot color takes any name from the base palette: blue, red, violet, teal, sage, stone and the rest of the 40 families. It sets the hue instead of tone, in every appearance. none (the default) leaves tone in 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–8 lists eight of them in chart series order (blue, orange, teal, pink, grass, violet, amber, red). Chart chrome: color.chart.axis, gridline and plot.
  • #295 974ba64 Thanks @dbanksdesign! - Every data-* 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, Layout data-has-header, …) and markers inside a slot (Calendar data-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 the data-class-* payloads (now data-var-ui-class-*); React's Carousel, Menubar, ToggleGroup, Splitter, Tree, context-menu, icon-fallback and popover markers; TopNav's data-label (now data-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, ScrollArea data-edge, AppShell data-has-top-nav. Select .var-ui-code-block, .var-ui-code-block__body, .var-ui-alert__actionLink and so on instead.
  • #238 e97729d Thanks @dbanksdesign! - prose gains 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.
    • proseContent is removed from @var-ui/core (class docs-prose). It was the docs site's reading style, and it sat in the utilities layer, so it overrode component styles and needed data-prose-isolate to keep out of demos. @var-ui/docs now has docsProse (in @var-ui/docs/styles), which sets prose's vars to the docs ramp and adds the docs extras. It lives in the base layer, so components inside win. data-prose-isolate is replaced by data-not-prose.
    • prose no longer gives inline children of list items and blockquotes (code, badges) a bottom margin; only block children are spaced.
    • Table sets display: table on its <table>, so it keeps its layout inside Prose (which makes bare tables scrollable blocks).
  • #276 146282b Thanks @dbanksdesign! - Form field gaps from real apps:

    • TextAreaField autosize with minRows / maxRows: platform field-sizing: content, heights in lh plus padding (core: autosize variant, minRows / maxRows vars).
    • 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), since aria-required already says it.
    • label, description and errorMessage accept nodes on every field (FieldMeta), like Typeahead. New labelText() for code that needs the label as a string.
    • NumberInput.onValueChange documents that it fires on commit (blur, Enter, steppers), not per keystroke. Use the native onChange for live dirty tracking.
  • #255 704d04c Thanks @dbanksdesign! - IconButton size="xl" carries a matching 24px glyph. New size.icon.xl token (1.5rem) and Icon size="xl"; IconButton no longer maps xl to the lg glyph. With pill it is a circle, for primary play-style actions: <IconButton size="xl" pill tone="accent" appearance="solid" icon={…} aria-label="Play" />.

  • #233 8af0092 Thanks @dbanksdesign! - CodeBlock and CopyButton share one set of copy props and events.

    • CodeBlock (React and Astro): copyErrorLabel is now errorLabel, matching CopyButton. copyText and errorText are removed: the copy button is icon-only, so copyLabel / copiedLabel / errorLabel (its accessible name in each state) are the only labels. A copy failure shows the error icon, as CopyButton does.
    • React CodeBlock gains onCopied(value) and onCopyError(error, value) and is built on useCopy. It resets after 2 seconds like CopyButton (it was 1.2s). The status region now announces success as well as failure; success is screen-reader-only.
    • Astro: CodeBlock fires the same events as CopyButton, renamed to var-ui:copied / var-ui:copy-error (COPIED_EVENT / COPY_ERROR_EVENT; previously COPY_BUTTON_COPIED_EVENT / COPY_BUTTON_ERROR_EVENT), and honours data-var-ui-timeout. The hand-written markup contract uses data-var-ui-error-label (was data-copy-error-label) and drops the [data-codeblock-copy-text] span.
    • CopyButton's default errorLabel is now Copy failed (was Error), and useCopy clears error after the timeout, as it already did for copied.
  • #281 6ac0e2c Thanks @dbanksdesign! - @var-ui/react no longer depends on react-aria, directly or as a peer: install react, react-dom, react-aria-components and @var-ui/core. Our popups no longer render under a react-aria trigger's press responder, which removes the one reason we imported react-aria (its Overlay, to clear that responder).

    • Menu provides react-aria's menu contexts itself (MenuContext, RootMenuTriggerStateContext, the popover and overlay-state contexts) instead of wrapping in RAC MenuTrigger. 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-ui Popover (a light-dismiss native popover) instead of RAC DialogTrigger. 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 RAC MenuTrigger / DialogTrigger, it keeps its anchor and warns in development.
  • #250 993ae7f Thanks @dbanksdesign! - react-aria is now a peer dependency (^3.50.0) instead of an exact dependency, so apps install one copy: the one react-aria-components uses. Two copies made menu items take over their trigger's ref, so Menu popups 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 that react-aria is duplicated. @react-aria/i18n is gone (...

Read more

@var-ui/icons@0.14.0

Choose a tag to compare

@phthalo-release-bot phthalo-release-bot released this 23 Nov 23:57
22ffa61

Patch Changes

  • #254 f066000 Thanks @dbanksdesign! - Every published package now ships its CHANGELOG.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 lists typestyles as the one TypeStyles export (no root recipe/style), and the React README no longer describes the package as React Aria wrappers. IconButton warns once in development when it renders without an icon (any cause, including the pre-0.7 name="close").

@var-ui/docs@0.14.0

Choose a tag to compare

@phthalo-release-bot phthalo-release-bot released this 23 Nov 23:57
22ffa61

Minor Changes

  • #238 e97729d Thanks @dbanksdesign! - prose gains 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.
    • proseContent is removed from @var-ui/core (class docs-prose). It was the docs site's reading style, and it sat in the utilities layer, so it overrode component styles and needed data-prose-isolate to keep out of demos. @var-ui/docs now has docsProse (in @var-ui/docs/styles), which sets prose's vars to the docs ramp and adds the docs extras. It lives in the base layer, so components inside win. data-prose-isolate is replaced by data-not-prose.
    • prose no longer gives inline children of list items and blockquotes (code, badges) a bottom margin; only block children are spaced.
    • Table sets display: table on its <table>, so it keeps its layout inside Prose (which makes bare tables scrollable blocks).
  • #233 8af0092 Thanks @dbanksdesign! - CodeBlock and CopyButton share one set of copy props and events.

    • CodeBlock (React and Astro): copyErrorLabel is now errorLabel, matching CopyButton. copyText and errorText are removed: the copy button is icon-only, so copyLabel / copiedLabel / errorLabel (its accessible name in each state) are the only labels. A copy failure shows the error icon, as CopyButton does.
    • React CodeBlock gains onCopied(value) and onCopyError(error, value) and is built on useCopy. It resets after 2 seconds like CopyButton (it was 1.2s). The status region now announces success as well as failure; success is screen-reader-only.
    • Astro: CodeBlock fires the same events as CopyButton, renamed to var-ui:copied / var-ui:copy-error (COPIED_EVENT / COPY_ERROR_EVENT; previously COPY_BUTTON_COPIED_EVENT / COPY_BUTTON_ERROR_EVENT), and honours data-var-ui-timeout. The hand-written markup contract uses data-var-ui-error-label (was data-copy-error-label) and drops the [data-codeblock-copy-text] span.
    • CopyButton's default errorLabel is now Copy failed (was Error), and useCopy clears error after the timeout, as it already did for copied.

Patch Changes

  • #291 df5fd15 Thanks @dbanksdesign! - Fonts. Add the alloGrotesk pairing: 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. defineFonts slots accept several faces (upright + italic of one family), register a face shared by two slots once, and take an optional metricFallback face; FontFaceDefinition gains sizeAdjust, ascentOverride, descentOverride and lineGapOverride.

    Letter-spacing tokens resolve at the text that uses them. letterSpacing.* tokens were registered as <length-percentage>, so em values computed once against the root font size: caps (0.06em) rendered as 0.08em on 12px labels and display tracking didn't scale with headline size. They are now unregistered (* syntax), so em resolves at the use site.

    Tabular figures on badge and the slider output.

    Docs prose: H3–H6 use the body face (H3 at weight 650); the lead paragraph and page-header lead track at −0.005em.

  • #273 70443fb Thanks @dbanksdesign! - New codeBlockMarkup({ 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 Astro CodeBlocks 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 used data-copy-error-label, which the copy script never read. The root also carries data-language.

    Fix (react): a CodeBlock without highlighted HTML double-escaped its code, so <div> showed as &lt;div&gt;.

  • #272 0ef2a05 Thanks @dbanksdesign! - New reading type tokens: fontSize.prose.{body, lead, h1, h2, h3} (16 / 19 / 44 / 28 / 20px) and the paired fixed line heights lineHeight.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. Prose itself stays relative to its inherited font size.

  • #261 c3313b6 Thanks @dbanksdesign! - Collapsible SideNav sections can be controlled and remembered.

    • react SideNav.Section takes open / onOpenChange (controlled). A parent that ignores the change keeps the section as it is.
    • react, astro SideNav persistKey remembers which collapsible sections the reader opened or closed, in localStorage. Sections are keyed by id, or else their title. The section holding the current page always starts open. Astro SideNav also 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 custom docsSidebarState script is removed.
  • #254 f066000 Thanks @dbanksdesign! - Every published package now ships its CHANGELOG.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 lists typestyles as the one TypeStyles export (no root recipe/style), and the React README no longer describes the package as React Aria wrappers. IconButton warns once in development when it renders without an icon (any cause, including the pre-0.7 name="close").

@var-ui/docs-components@0.14.0

Choose a tag to compare

@phthalo-release-bot phthalo-release-bot released this 23 Nov 23:57
22ffa61

Patch Changes

  • #254 f066000 Thanks @dbanksdesign! - Every published package now ships its CHANGELOG.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 lists typestyles as the one TypeStyles export (no root recipe/style), and the React README no longer describes the package as React Aria wrappers. IconButton warns once in development when it renders without an icon (any cause, including the pre-0.7 name="close").

@var-ui/core@0.14.0

Choose a tag to compare

@phthalo-release-bot phthalo-release-bot released this 23 Nov 23:57
22ffa61

Minor Changes

  • #291 df5fd15 Thanks @dbanksdesign! - Fonts. Add the alloGrotesk pairing: 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. defineFonts slots accept several faces (upright + italic of one family), register a face shared by two slots once, and take an optional metricFallback face; FontFaceDefinition gains sizeAdjust, ascentOverride, descentOverride and lineGapOverride.

    Letter-spacing tokens resolve at the text that uses them. letterSpacing.* tokens were registered as <length-percentage>, so em values computed once against the root font size: caps (0.06em) rendered as 0.08em on 12px labels and display tracking didn't scale with headline size. They are now unregistered (* syntax), so em resolves at the use site.

    Tabular figures on badge and the slider output.

    Docs prose: H3–H6 use the body face (H3 at weight 650); the lead paragraph and page-header lead track at −0.005em.

  • #275 d166a77 Thanks @dbanksdesign! - Card gaps from real apps:

    • react onClick makes a div card pressable. The title renders as a <button> whose ::after covers 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, and titleEnd (Astro: the title-end slot) for a badge at the end of the title row. React link cards accept a node title.
    • core card recipe: new header, titleEnd, description and action slots and the data-pressable root state. A div card with no children no longer renders an empty body, which added a stray gap.
  • #279 2473fcb Thanks @dbanksdesign! - Named colors for identity, not status:

    • Badge and StatusDot color takes any name from the base palette: blue, red, violet, teal, sage, stone and the rest of the 40 families. It sets the hue instead of tone, in every appearance. none (the default) leaves tone in 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–8 lists eight of them in chart series order (blue, orange, teal, pink, grass, violet, amber, red). Chart chrome: color.chart.axis, gridline and plot.
  • #273 70443fb Thanks @dbanksdesign! - New codeBlockMarkup({ 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 Astro CodeBlocks 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 used data-copy-error-label, which the copy script never read. The root also carries data-language.

    Fix (react): a CodeBlock without highlighted HTML double-escaped its code, so <div> showed as &lt;div&gt;.

  • #295 974ba64 Thanks @dbanksdesign! - Every data-* 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, Layout data-has-header, …) and markers inside a slot (Calendar data-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 the data-class-* payloads (now data-var-ui-class-*); React's Carousel, Menubar, ToggleGroup, Splitter, Tree, context-menu, icon-fallback and popover markers; TopNav's data-label (now data-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, ScrollArea data-edge, AppShell data-has-top-nav. Select .var-ui-code-block, .var-ui-code-block__body, .var-ui-alert__actionLink and so on instead.
  • #238 e97729d Thanks @dbanksdesign! - prose gains 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.
    • proseContent is removed from @var-ui/core (class docs-prose). It was the docs site's reading style, and it sat in the utilities layer, so it overrode component styles and needed data-prose-isolate to keep out of demos. @var-ui/docs now has docsProse (in @var-ui/docs/styles), which sets prose's vars to the docs ramp and adds the docs extras. It lives in the base layer, so components inside win. data-prose-isolate is replaced by data-not-prose.
    • prose no longer gives inline children of list items and blockquotes (code, badges) a bottom margin; only block children are spaced.
    • Table sets display: table on its <table>, so it keeps its layout inside Prose (which makes bare tables scrollable blocks).
  • #253 448324d Thanks @dbanksdesign! - Breaking: the font presets are functions: groteskMono(), figtreeGrotesk() and alloGrotesk() (were objects). They take { baseUrl } (default /fonts/) for where the app hosts the .woff2 files. 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 146282b Thanks @dbanksdesign! - Form field gaps from real apps:

    • TextAreaField autosize with minRows / maxRows: platform field-sizing: content, heights in lh plus padding (core: autosize variant, minRows / maxRows vars).
    • 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), since aria-required already says it.
    • label, description and errorMessage accept nodes on every field (FieldMeta), like Typeahead. New labelText() for code that needs the label as a string.
    • NumberInput.onValueChange documents that it fires on commit (blur, Enter, steppers), not per keystroke. Use the native onChange for live dirty tracking.
  • #260 0a7c3b0 Thanks @dbanksdesign! - Grid's responsive columns map ({ base: 2, md: 3 }) works with extracted CSS and SSR. In Astro it silently stayed one column, because the old gridColumnsStyle() built a runtime-hashed class that never reached the build-time stylesheet. The grid recipe's fixed variant is now static CSS that reads per-breakpoint track vars (columns.base … columns.xl recipe 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 the auto template. The components set those variables inline.

    Breaking (core): gridColumnsStyle is replaced by gridColumnsVars(counts), which returns the inline vars to pair with grid({ columns: 'fixed' }).

  • #255 704d04c Thanks @dbanksdesign! - `IconButton...

Read more

@var-ui/cli@0.14.0

Choose a tag to compare

@phthalo-release-bot phthalo-release-bot released this 23 Nov 23:57
22ffa61

Minor Changes

  • #240 a340f9f Thanks @dbanksdesign! - New var-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-md finds --var-ui-fontSize-md. The catalog gains a tokens array from listDesignTokens(), and the AGENTS.md block mentions the command.

Patch Changes

  • #281 6ac0e2c Thanks @dbanksdesign! - @var-ui/react no longer depends on react-aria, directly or as a peer: install react, react-dom, react-aria-components and @var-ui/core. Our popups no longer render under a react-aria trigger's press responder, which removes the one reason we imported react-aria (its Overlay, to clear that responder).

    • Menu provides react-aria's menu contexts itself (MenuContext, RootMenuTriggerStateContext, the popover and overlay-state contexts) instead of wrapping in RAC MenuTrigger. 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-ui Popover (a light-dismiss native popover) instead of RAC DialogTrigger. 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 RAC MenuTrigger / DialogTrigger, it keeps its anchor and warns in development.
  • #265 765e234 Thanks @dbanksdesign! - Component props data includes recipe variant defaults (size, tone, appearance, …), so var-ui component <name> and the docs Markdown views show them, not only the docs props table. JSDoc @default still wins.

  • #250 993ae7f Thanks @dbanksdesign! - react-aria is now a peer dependency (^3.50.0) instead of an exact dependency, so apps install one copy: the one react-aria-components uses. Two copies made menu items take over their trigger's ref, so Menu popups 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 that react-aria is duplicated. @react-aria/i18n is gone (isRTL comes from react-aria-components).

    Install it next to react-aria-components: pnpm add react-aria, then check npm ls react-aria lists one version.

  • #254 f066000 Thanks @dbanksdesign! - Every published package now ships its CHANGELOG.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 lists typestyles as the one TypeStyles export (no root recipe/style), and the React README no longer describes the package as React Aria wrappers. IconButton warns once in development when it renders without an icon (any cause, including the pre-0.7 name="close").

@var-ui/astro@0.14.0

Choose a tag to compare

@phthalo-release-bot phthalo-release-bot released this 23 Nov 23:57
22ffa61

Minor Changes

  • #275 d166a77 Thanks @dbanksdesign! - Card gaps from real apps:

    • react onClick makes a div card pressable. The title renders as a <button> whose ::after covers 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, and titleEnd (Astro: the title-end slot) for a badge at the end of the title row. React link cards accept a node title.
    • core card recipe: new header, titleEnd, description and action slots and the data-pressable root state. A div card with no children no longer renders an empty body, which added a stray gap.
  • #279 2473fcb Thanks @dbanksdesign! - Named colors for identity, not status:

    • Badge and StatusDot color takes any name from the base palette: blue, red, violet, teal, sage, stone and the rest of the 40 families. It sets the hue instead of tone, in every appearance. none (the default) leaves tone in 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–8 lists eight of them in chart series order (blue, orange, teal, pink, grass, violet, amber, red). Chart chrome: color.chart.axis, gridline and plot.
  • #295 974ba64 Thanks @dbanksdesign! - Every data-* 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, Layout data-has-header, …) and markers inside a slot (Calendar data-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 the data-class-* payloads (now data-var-ui-class-*); React's Carousel, Menubar, ToggleGroup, Splitter, Tree, context-menu, icon-fallback and popover markers; TopNav's data-label (now data-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, ScrollArea data-edge, AppShell data-has-top-nav. Select .var-ui-code-block, .var-ui-code-block__body, .var-ui-alert__actionLink and so on instead.
  • #238 e97729d Thanks @dbanksdesign! - prose gains 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.
    • proseContent is removed from @var-ui/core (class docs-prose). It was the docs site's reading style, and it sat in the utilities layer, so it overrode component styles and needed data-prose-isolate to keep out of demos. @var-ui/docs now has docsProse (in @var-ui/docs/styles), which sets prose's vars to the docs ramp and adds the docs extras. It lives in the base layer, so components inside win. data-prose-isolate is replaced by data-not-prose.
    • prose no longer gives inline children of list items and blockquotes (code, badges) a bottom margin; only block children are spaced.
    • Table sets display: table on its <table>, so it keeps its layout inside Prose (which makes bare tables scrollable blocks).
  • #233 8af0092 Thanks @dbanksdesign! - CodeBlock and CopyButton share one set of copy props and events.

    • CodeBlock (React and Astro): copyErrorLabel is now errorLabel, matching CopyButton. copyText and errorText are removed: the copy button is icon-only, so copyLabel / copiedLabel / errorLabel (its accessible name in each state) are the only labels. A copy failure shows the error icon, as CopyButton does.
    • React CodeBlock gains onCopied(value) and onCopyError(error, value) and is built on useCopy. It resets after 2 seconds like CopyButton (it was 1.2s). The status region now announces success as well as failure; success is screen-reader-only.
    • Astro: CodeBlock fires the same events as CopyButton, renamed to var-ui:copied / var-ui:copy-error (COPIED_EVENT / COPY_ERROR_EVENT; previously COPY_BUTTON_COPIED_EVENT / COPY_BUTTON_ERROR_EVENT), and honours data-var-ui-timeout. The hand-written markup contract uses data-var-ui-error-label (was data-copy-error-label) and drops the [data-codeblock-copy-text] span.
    • CopyButton's default errorLabel is now Copy failed (was Error), and useCopy clears error after the timeout, as it already did for copied.
  • #261 c3313b6 Thanks @dbanksdesign! - Collapsible SideNav sections can be controlled and remembered.

    • react SideNav.Section takes open / onOpenChange (controlled). A parent that ignores the change keeps the section as it is.
    • react, astro SideNav persistKey remembers which collapsible sections the reader opened or closed, in localStorage. Sections are keyed by id, or else their title. The section holding the current page always starts open. Astro SideNav also 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 custom docsSidebarState script is removed.
  • #278 a8ce869 Thanks @dbanksdesign! - Astro Tabs: the list and panels can live in different layout regions. The controller finds a tab's panel by aria-controls anywhere in the document, Tabs takes id and panels={false} (list only), and the new TabPanel (tabs, value, selected) renders a panel anywhere. Tab and panel ids are scoped by the Tabs id (<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 c0da8e5 Thanks @dbanksdesign! - Toasts fit around app chrome.

    • core toast recipe (its screen-edge axis export is now toastPlacement, was placement): top-center and bottom-center placements, and offsetBlock / offsetInline vars (--var-ui-toast-offsetblock / --var-ui-toast-offsetinline) that move the region off its edges. They use TypeStyles' inheritOverride, so a value set on :root reaches the region, for example above a bottom player bar. Also fixes the region's max-width, which was a single-quoted string with an uninterpolated ${…} and so was never applied.
    • react ToastProvider and ToastRegion take offset (a length, or { block, inline }). ToastProvider also takes className, style and an existing queue, which keeps its own limit unless maxVisibleToasts is passed. New createToaster(queue) returns the imperative toast API bound to a queue you own, for apps that render their own ToastRegion.
    • astro ToastRegion takes offset with the same shape. Grid, Text and AspectRatio use the shared mergeInlineStyle helper instead of their own copies, so a style object no longer loses to the component's own vars.
  • #232 01f82e4 Thanks @dbanksdesign! - Button and IconButton take size="xs", a 20px button for dense rows, tags and code-block headers. An invisible layer grows it...

Read more

@var-ui/react@0.2.1

Choose a tag to compare

@phthalo-release-bot phthalo-release-bot released this 23 Oct 05:10
1385905

Patch Changes

@var-ui/icons@0.2.1

Choose a tag to compare

@phthalo-release-bot phthalo-release-bot released this 23 Oct 05:10
1385905

Patch Changes

@var-ui/docs@0.2.1

Choose a tag to compare

@phthalo-release-bot phthalo-release-bot released this 23 Oct 05:10
1385905

Patch Changes