@viraui/react 2026.7.0 → 2026.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog.json +9 -3
- package/dist/components/button/button.css +1 -1
- package/dist/components/direction-provider/index.d.ts +2 -0
- package/dist/components/direction-provider/index.js +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/menu/menu-popup.d.ts +2 -2
- package/dist/components/menu/menu.css +1 -1
- package/dist/components/progressive-blur/progressive-blur.css +1 -1
- package/dist/components/prose/prose.d.ts +5 -4
- package/dist/components/select/select-group.js +1 -1
- package/dist/components/select/select.d.ts +4 -1
- package/dist/components/select/select.js +4 -1
- package/dist/components/spinner/spinner.d.ts +6 -1
- package/dist/components/spinner/variants/arc.css +1 -0
- package/dist/components/spinner/variants/arc.d.ts +2 -0
- package/dist/components/spinner/variants/arc.js +19 -0
- package/dist/components/spinner/variants/arc.module.js +8 -0
- package/dist/components/spinner/variants/atom.css +1 -0
- package/dist/components/spinner/variants/atom.d.ts +6 -0
- package/dist/components/spinner/variants/atom.js +40 -0
- package/dist/components/spinner/variants/atom.module.js +8 -0
- package/dist/components/spinner/variants/blocks.css +1 -0
- package/dist/components/spinner/variants/blocks.d.ts +2 -0
- package/dist/components/spinner/variants/blocks.js +25 -0
- package/dist/components/spinner/variants/blocks.module.js +8 -0
- package/dist/components/spinner/variants/bouncing-dots.css +1 -0
- package/dist/components/spinner/variants/bouncing-dots.d.ts +2 -0
- package/dist/components/spinner/variants/bouncing-dots.js +21 -0
- package/dist/components/spinner/variants/bouncing-dots.module.js +8 -0
- package/dist/components/spinner/variants/cascade.css +1 -0
- package/dist/components/spinner/variants/cascade.d.ts +2 -0
- package/dist/components/spinner/variants/cascade.js +34 -0
- package/dist/components/spinner/variants/cascade.module.js +8 -0
- package/dist/components/spinner/variants/circular-dots.css +1 -0
- package/dist/components/spinner/variants/circular-dots.d.ts +2 -0
- package/dist/components/spinner/variants/circular-dots.js +26 -0
- package/dist/components/spinner/variants/circular-dots.module.js +8 -0
- package/dist/components/spinner/variants/classic-v2.css +1 -0
- package/dist/components/spinner/variants/classic-v2.d.ts +2 -0
- package/dist/components/spinner/variants/classic-v2.js +24 -0
- package/dist/components/spinner/variants/classic-v2.module.js +8 -0
- package/dist/components/spinner/variants/classic.css +1 -0
- package/dist/components/spinner/variants/classic.d.ts +2 -0
- package/dist/components/spinner/variants/classic.js +22 -0
- package/dist/components/spinner/variants/classic.module.js +8 -0
- package/dist/components/spinner/variants/clock.css +1 -0
- package/dist/components/spinner/variants/clock.d.ts +2 -0
- package/dist/components/spinner/variants/clock.js +18 -0
- package/dist/components/spinner/variants/clock.module.js +8 -0
- package/dist/components/spinner/variants/comet.css +1 -0
- package/dist/components/spinner/variants/comet.d.ts +2 -0
- package/dist/components/spinner/variants/comet.js +33 -0
- package/dist/components/spinner/variants/comet.module.js +10 -0
- package/dist/components/spinner/variants/compass.css +1 -0
- package/dist/components/spinner/variants/compass.d.ts +2 -0
- package/dist/components/spinner/variants/compass.js +16 -0
- package/dist/components/spinner/variants/compass.module.js +8 -0
- package/dist/components/spinner/variants/dual.css +1 -0
- package/dist/components/spinner/variants/dual.d.ts +2 -0
- package/dist/components/spinner/variants/dual.js +25 -0
- package/dist/components/spinner/variants/dual.module.js +10 -0
- package/dist/components/spinner/variants/eclipse.css +1 -0
- package/dist/components/spinner/variants/eclipse.d.ts +6 -0
- package/dist/components/spinner/variants/eclipse.js +21 -0
- package/dist/components/spinner/variants/eclipse.module.js +9 -0
- package/dist/components/spinner/variants/flip.css +1 -0
- package/dist/components/spinner/variants/flip.d.ts +2 -0
- package/dist/components/spinner/variants/flip.js +17 -0
- package/dist/components/spinner/variants/flip.module.js +8 -0
- package/dist/components/spinner/variants/gather.css +1 -0
- package/dist/components/spinner/variants/gather.d.ts +2 -0
- package/dist/components/spinner/variants/gather.js +50 -0
- package/dist/components/spinner/variants/gather.module.js +11 -0
- package/dist/components/spinner/variants/index.d.ts +9 -1
- package/dist/components/spinner/variants/index.js +96 -10
- package/dist/components/spinner/variants/leap.css +1 -0
- package/dist/components/spinner/variants/leap.d.ts +6 -0
- package/dist/components/spinner/variants/leap.js +27 -0
- package/dist/components/spinner/variants/leap.module.js +8 -0
- package/dist/components/spinner/variants/linear-dots.css +1 -0
- package/dist/components/spinner/variants/linear-dots.d.ts +2 -0
- package/dist/components/spinner/variants/linear-dots.js +21 -0
- package/dist/components/spinner/variants/linear-dots.module.js +8 -0
- package/dist/components/spinner/variants/loading.css +1 -0
- package/dist/components/spinner/variants/loading.d.ts +2 -0
- package/dist/components/spinner/variants/loading.js +50 -0
- package/dist/components/spinner/variants/loading.module.js +8 -0
- package/dist/components/spinner/variants/morph.css +1 -0
- package/dist/components/spinner/variants/morph.d.ts +2 -0
- package/dist/components/spinner/variants/morph.js +17 -0
- package/dist/components/spinner/variants/morph.module.js +8 -0
- package/dist/components/spinner/variants/orbit.css +1 -0
- package/dist/components/spinner/variants/orbit.d.ts +2 -0
- package/dist/components/spinner/variants/orbit.js +24 -0
- package/dist/components/spinner/variants/orbit.module.js +8 -0
- package/dist/components/spinner/variants/pulse.css +1 -0
- package/dist/components/spinner/variants/pulse.d.ts +2 -0
- package/dist/components/spinner/variants/pulse.js +19 -0
- package/dist/components/spinner/variants/pulse.module.js +8 -0
- package/dist/components/spinner/variants/radar.css +1 -0
- package/dist/components/spinner/variants/radar.d.ts +2 -0
- package/dist/components/spinner/variants/radar.js +53 -0
- package/dist/components/spinner/variants/radar.module.js +8 -0
- package/dist/components/spinner/variants/ring.css +1 -0
- package/dist/components/spinner/variants/ring.d.ts +2 -0
- package/dist/components/spinner/variants/ring.js +24 -0
- package/dist/components/spinner/variants/ring.module.js +8 -0
- package/dist/components/spinner/variants/ripple.css +1 -0
- package/dist/components/spinner/variants/ripple.d.ts +2 -0
- package/dist/components/spinner/variants/ripple.js +23 -0
- package/dist/components/spinner/variants/ripple.module.js +8 -0
- package/dist/components/spinner/variants/slide.css +1 -0
- package/dist/components/spinner/variants/slide.d.ts +2 -0
- package/dist/components/spinner/variants/slide.js +24 -0
- package/dist/components/spinner/variants/slide.module.js +8 -0
- package/dist/components/spinner/variants/snake.css +1 -0
- package/dist/components/spinner/variants/snake.d.ts +2 -0
- package/dist/components/spinner/variants/snake.js +19 -0
- package/dist/components/spinner/variants/snake.module.js +11 -0
- package/dist/components/spinner/variants/swirl.css +1 -0
- package/dist/components/spinner/variants/swirl.d.ts +2 -0
- package/dist/components/spinner/variants/swirl.js +35 -0
- package/dist/components/spinner/variants/swirl.module.js +8 -0
- package/dist/components/spinner/variants/trace.css +1 -0
- package/dist/components/spinner/variants/trace.d.ts +2 -0
- package/dist/components/spinner/variants/trace.js +28 -0
- package/dist/components/spinner/variants/trace.module.js +8 -0
- package/dist/components/spinner/variants/wave.css +1 -0
- package/dist/components/spinner/variants/wave.d.ts +2 -0
- package/dist/components/spinner/variants/wave.js +25 -0
- package/dist/components/spinner/variants/wave.module.js +8 -0
- package/dist/components/text/text.css +1 -1
- package/dist/components/text/text.d.ts +10 -2
- package/dist/components/title/title.d.ts +7 -0
- package/dist/index.js +2 -1
- package/dist/preflight.css +1 -1
- package/dist/specs/components/accordion/props.xml +2 -2
- package/dist/specs/components/accordion/usage.xml +2 -0
- package/dist/specs/components/autocomplete/patterns.xml +4 -4
- package/dist/specs/components/autocomplete/props.xml +2 -2
- package/dist/specs/components/autocomplete/usage.xml +1 -1
- package/dist/specs/components/button/patterns.xml +2 -2
- package/dist/specs/components/button/props.xml +4 -4
- package/dist/specs/components/button/usage.xml +2 -1
- package/dist/specs/components/chip/patterns.xml +2 -2
- package/dist/specs/components/chip/props.xml +2 -2
- package/dist/specs/components/chip/usage.xml +2 -0
- package/dist/specs/components/direction-provider/a11y.xml +6 -0
- package/dist/specs/components/direction-provider/meta.xml +20 -0
- package/dist/specs/components/direction-provider/patterns.xml +27 -0
- package/dist/specs/components/direction-provider/props.xml +18 -0
- package/dist/specs/components/direction-provider/usage.xml +10 -0
- package/dist/specs/components/disclosure/patterns.xml +2 -2
- package/dist/specs/components/disclosure/props.xml +2 -2
- package/dist/specs/components/disclosure/usage.xml +2 -0
- package/dist/specs/components/glow/patterns.xml +1 -1
- package/dist/specs/components/grid/patterns.xml +3 -3
- package/dist/specs/components/icon-button/props.xml +4 -4
- package/dist/specs/components/icon-button/usage.xml +3 -1
- package/dist/specs/components/menu/patterns.xml +18 -18
- package/dist/specs/components/menu/props.xml +5 -5
- package/dist/specs/components/menu/usage.xml +3 -1
- package/dist/specs/components/meter/patterns.xml +1 -1
- package/dist/specs/components/progressive-blur/usage.xml +2 -0
- package/dist/specs/components/prose/meta.xml +1 -1
- package/dist/specs/components/prose/patterns.xml +34 -10
- package/dist/specs/components/prose/props.xml +3 -1
- package/dist/specs/components/prose/usage.xml +4 -1
- package/dist/specs/components/select/patterns.xml +2 -2
- package/dist/specs/components/select/props.xml +4 -4
- package/dist/specs/components/select/usage.xml +2 -0
- package/dist/specs/components/slider/patterns.xml +1 -1
- package/dist/specs/components/spinner/props.xml +1 -1
- package/dist/specs/components/spinner/usage.xml +1 -1
- package/dist/specs/components/stack/patterns.xml +4 -4
- package/dist/specs/components/stack/props.xml +1 -0
- package/dist/specs/components/stack/usage.xml +1 -0
- package/dist/specs/components/surface/patterns.xml +3 -3
- package/dist/specs/components/tabs/patterns.xml +3 -3
- package/dist/specs/components/tabs/props.xml +1 -1
- package/dist/specs/components/tabs/usage.xml +2 -1
- package/dist/specs/components/text/meta.xml +2 -1
- package/dist/specs/components/text/patterns.xml +19 -16
- package/dist/specs/components/text/props.xml +8 -6
- package/dist/specs/components/text/usage.xml +9 -3
- package/dist/specs/components/textfield/patterns.xml +3 -3
- package/dist/specs/components/textfield/props.xml +2 -2
- package/dist/specs/components/textfield/usage.xml +2 -1
- package/dist/specs/components/title/meta.xml +2 -1
- package/dist/specs/components/title/patterns.xml +11 -10
- package/dist/specs/components/title/props.xml +5 -4
- package/dist/specs/components/title/usage.xml +8 -3
- package/dist/specs/components/toggle-button/patterns.xml +8 -8
- package/dist/specs/components/toggle-button/props.xml +3 -3
- package/dist/specs/components/toggle-button/usage.xml +2 -0
- package/dist/specs/components/toggle-group/patterns.xml +3 -3
- package/dist/specs/components/tooltip/patterns.xml +7 -7
- package/dist/specs/foundation/attributes.xml +22 -0
- package/dist/specs/foundation/bootstrap.xml +1 -1
- package/dist/specs/foundation/modules.xml +16 -7
- package/dist/specs/foundation/toggles.xml +1 -1
- package/dist/specs/index.xml +14 -4
- package/package.json +2 -2
- package/dist/components/spinner/variants/bars.d.ts +0 -2
- package/dist/components/spinner/variants/bars.js +0 -134
- package/dist/components/spinner/variants/dot-grid.css +0 -1
- package/dist/components/spinner/variants/dot-grid.d.ts +0 -2
- package/dist/components/spinner/variants/dot-grid.js +0 -57
- package/dist/components/spinner/variants/dot-grid.module.js +0 -16
- package/dist/components/spinner/variants/dots.d.ts +0 -2
- package/dist/components/spinner/variants/dots.js +0 -189
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<patterns surface="title">
|
|
3
3
|
<!-- Sources: viraui-app + design-kitchen preview-grid — cleaned (no handlers, no i18n). -->
|
|
4
|
+
<!-- Type measure: prefer maxWidth in `ch` (not rem) — scaled to size for ~10–12 words/line. -->
|
|
4
5
|
|
|
5
|
-
<example title="Auth hero heading">
|
|
6
|
+
<example title="Auth hero heading (readable measure)">
|
|
6
7
|
<tsx><![CDATA[
|
|
7
|
-
<Title size="1" render={<h1 />} maxWidth="
|
|
8
|
+
<Title size="1" render={<h1 />} maxWidth="36ch" lineHeight="s" balanced>
|
|
8
9
|
Ship real UI at the speed of thought.
|
|
9
10
|
</Title>
|
|
10
11
|
]]></tsx>
|
|
11
|
-
<notes>From `auth/login-view`. Pair `size` with `render={<h1 />}`
|
|
12
|
+
<notes>From `auth/login-view`. Pair `size` with `render={<h1 />}`; cap measure in `ch`; `lineHeight="s"` + `balanced` on wrapping display. Prefer `ch` over rem. (Live app nests Typewriter inside; see typewriter patterns.)</notes>
|
|
12
13
|
</example>
|
|
13
14
|
|
|
14
15
|
<example title="Card section heading">
|
|
@@ -17,21 +18,21 @@
|
|
|
17
18
|
<Title size="6" render={<h2 />}>
|
|
18
19
|
Preferences
|
|
19
20
|
</Title>
|
|
20
|
-
<Text size="s" maxWidth="
|
|
21
|
+
<Text size="s" maxWidth="45ch" tone="muted" balanced>
|
|
21
22
|
Manage your account settings and notifications.
|
|
22
23
|
</Text>
|
|
23
24
|
</Stack>
|
|
24
25
|
]]></tsx>
|
|
25
|
-
<notes>From preview-grid `preferences` (+ payout-threshold, notifications, …). Dense card titles use `size="6"` + `h2`.</notes>
|
|
26
|
+
<notes>From preview-grid `preferences` (+ payout-threshold, notifications, …). Dense card titles use `size="6"` + `h2`; blurb keeps `ch` measure + `balanced`.</notes>
|
|
26
27
|
</example>
|
|
27
28
|
|
|
28
29
|
<example title="Empty-state heading">
|
|
29
30
|
<tsx><![CDATA[
|
|
30
|
-
<Title align="center" size="5" render={<h3 />}>
|
|
31
|
+
<Title align="center" size="5" render={<h3 />} balanced>
|
|
31
32
|
No Team Members
|
|
32
33
|
</Title>
|
|
33
34
|
]]></tsx>
|
|
34
|
-
<notes>From preview-grid `empty-team`. Centered mid-size heading; pair with muted Text below.</notes>
|
|
35
|
+
<notes>From preview-grid `empty-team`. Centered mid-size heading; prefer `balanced` when the title wraps; pair with muted Text below.</notes>
|
|
35
36
|
</example>
|
|
36
37
|
|
|
37
38
|
<example title="Display metric">
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
</Text>
|
|
46
47
|
</Stack>
|
|
47
48
|
]]></tsx>
|
|
48
|
-
<notes>From preview-grid `daily-activity-goal`. `size="display"` for hero numerals; `whiteSpace="nowrap"` keeps metric on one line
|
|
49
|
+
<notes>From preview-grid `daily-activity-goal`. `size="display"` for hero numerals; `whiteSpace="nowrap"` keeps metric on one line — skip `balanced`.</notes>
|
|
49
50
|
</example>
|
|
50
51
|
|
|
51
52
|
<example title="Balance display">
|
|
@@ -68,11 +69,11 @@
|
|
|
68
69
|
<Title size="4" render={<h3 />}>
|
|
69
70
|
Colors
|
|
70
71
|
</Title>
|
|
71
|
-
<Text size="s" tone="muted">
|
|
72
|
+
<Text size="s" tone="muted" maxWidth="48ch" balanced>
|
|
72
73
|
Preview of theme voice, contrast, and color rhythm across accents.
|
|
73
74
|
</Text>
|
|
74
75
|
</Stack>
|
|
75
76
|
]]></tsx>
|
|
76
|
-
<notes>From design-kitchen `theme-preview` (+ `base-theme-selector` label scale). Mid panel titles use `size="4"` + `h3
|
|
77
|
+
<notes>From design-kitchen `theme-preview` (+ `base-theme-selector` label scale). Mid panel titles use `size="4"` + `h3`; supporting Text keeps `ch` measure.</notes>
|
|
77
78
|
</example>
|
|
78
79
|
</patterns>
|
|
@@ -4,19 +4,20 @@
|
|
|
4
4
|
<item>Headings and display text with title presets</item>
|
|
5
5
|
<item>Semantic heading tags chosen explicitly through render</item>
|
|
6
6
|
<item>Size and render paired together for most heading use cases</item>
|
|
7
|
+
<item>Readable wrapping titles: `maxWidth` (~10–12 words/line, **scaled to `size`** — smaller → narrower), `lineHeight` (`s` on large wrapping / inside Prose), and `balanced` on short multi-line heads</item>
|
|
7
8
|
<item>Letter-spacing via `tracking` or text-transform via `transform` — prefer props over CSS on the Title root</item>
|
|
8
9
|
<item>Fluid clamp sizing across title appearance presets (theme `--effect-fluid-typography` or per-instance `fluid`; off → fixed at --font-scale-display / h-* for that size)</item>
|
|
9
10
|
</when_to_use>
|
|
10
11
|
<when_not_to_use>
|
|
11
12
|
<item>Body copy — use Text</item>
|
|
12
13
|
<item>Body or mono family typography</item>
|
|
13
|
-
<item>Inventing CSS `letter-spacing` / `text-transform` / `width: 100%` when `tracking` / `transform` / parent Stack `fullWidth` cover the need</item>
|
|
14
|
+
<item>Inventing CSS `letter-spacing` / `text-transform` / `line-height` / `max-width` / `text-wrap: balance` / `width: 100%` when `tracking` / `transform` / `lineHeight` / `maxWidth` / `balanced` / parent Stack `fullWidth` cover the need</item>
|
|
14
15
|
</when_not_to_use>
|
|
15
16
|
<prop name="align" kind="react">
|
|
16
17
|
<description>Aligns text using logical alignment values. Omit so `text-align` inherits from the parent.</description>
|
|
17
18
|
</prop>
|
|
18
19
|
<prop name="balanced" kind="react">
|
|
19
|
-
<description>Enables balanced wrapping for block-like titles.</description>
|
|
20
|
+
<description>Enables balanced wrapping for block-like titles. Prefer on short wrapping heads (hero, empty state, section); omit for single-line / `whiteSpace="nowrap"` metrics.</description>
|
|
20
21
|
</prop>
|
|
21
22
|
<prop name="color" kind="react">
|
|
22
23
|
<description>Applies a literal color escape hatch.</description>
|
|
@@ -31,10 +32,10 @@
|
|
|
31
32
|
<description>Sets inline padding using one token for both sides or a `[start, end]` tuple (`0` allowed). Prefer the tuple for one-sided inset — never `style`/`paddingInline*` CSS when this prop covers it.</description>
|
|
32
33
|
</prop>
|
|
33
34
|
<prop name="lineHeight" kind="react">
|
|
34
|
-
<description>Controls line height through foundation leading tokens
|
|
35
|
+
<description>Controls line height through foundation leading tokens. Default `m`; prefer `s` on large wrapping titles and always inside Prose. Prefer this prop over CSS `line-height`.</description>
|
|
35
36
|
</prop>
|
|
36
37
|
<prop name="maxWidth" kind="react">
|
|
37
|
-
<description>Constrains the maximum inline size of the rendered text block.</description>
|
|
38
|
+
<description>Constrains the maximum inline size of the rendered text block. Prefer for readable wrapping titles (~10–12 words/line) over CSS `max-width`. Prefer **`ch`** (not `rem`) in patterns/examples. Width tracks `size` — smaller presets → narrower cap; never one fixed measure for every Title size. Shared columns may use parent Stack `maxWidth` instead.</description>
|
|
38
39
|
</prop>
|
|
39
40
|
<prop name="opticalSize" kind="react">
|
|
40
41
|
<description>Overrides the optical size (`opsz`) axis on variable fonts; static fonts keep `font-optical-sizing: auto`.</description>
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<usage surface="title">
|
|
3
3
|
<do>Headings and display type — pair `size` (visual preset) with `render={<h1 />}`…`h6` for outline semantics (default root is `span`)</do>
|
|
4
|
+
<do>Readable measure on wrapping titles: aim ~10–12 words per line — `maxWidth` / Stack `maxWidth` **scales with `size`** (smaller → narrower; larger → wider); prefer **`ch`** (not `rem`) in patterns/examples; large wrapping presets often `lineHeight="s"`</do>
|
|
5
|
+
<do>Prefer `balanced` on short wrapping titles (hero, empty state, section head); omit when single-line / `whiteSpace="nowrap"` metrics</do>
|
|
6
|
+
<do>Omit `align` so the heading inherits parent `text-align`; pass `align` only to override</do>
|
|
7
|
+
<do>Title inside Prose → `lineHeight="s"`; long-form rhythm stays on Prose — not Stack `rowGap`</do>
|
|
4
8
|
<do>Card / panel header: Stack `rowGap="xs"` + Title + muted Text blurb — Surface for card chrome</do>
|
|
5
9
|
<do>Auth / hero cycle: nest Typewriter inside Title (`preserveSpace`, caret props) so display preset + heading tag stay on the parent</do>
|
|
6
10
|
<do>Loading title copy: nest Shimmer inside Title — parent region owns busy semantics</do>
|
|
7
11
|
<do>Truncation: ClampText `render={<Title size=… render={<h* />} />}` — FitText wraps Title when short headlines must fill a constrained width</do>
|
|
8
12
|
<do>Fluid clamp across presets (`fluid` / theme `--effect-fluid-typography`); pass `fluid={false}` inside chrome or dense UI</do>
|
|
9
|
-
<do>Letter-spacing via `tracking`; text-transform via `transform`; width via `maxWidth` or parent Stack `fullWidth`</do>
|
|
10
|
-
<do>Omit `align` so the heading inherits parent `text-align`; pass `align` only to override</do>
|
|
13
|
+
<do>Letter-spacing via `tracking`; text-transform via `transform`; width via `maxWidth` or parent Stack `fullWidth`/`maxWidth`</do>
|
|
11
14
|
<do>Title-as-prose-link (`render={<a />}`) keeps preflight link chrome — omit `data-no-link-style`</do>
|
|
12
15
|
<dont>Assuming `size` changes the HTML tag — choose `render` explicitly</dont>
|
|
13
16
|
<dont>Using Title for long body paragraphs — use Text</dont>
|
|
14
|
-
<dont>Inventing CSS `letter-spacing` / `text-transform` / `width: 100%` / `paddingBlock*` / `paddingInline*` when props / Stack / `hPadding`/`vPadding` tuples cover it</dont>
|
|
17
|
+
<dont>Inventing CSS `letter-spacing` / `text-transform` / `line-height` / `max-width` / `text-wrap: balance` / `width: 100%` / `paddingBlock*` / `paddingInline*` when props / Stack / `hPadding`/`vPadding` tuples cover it</dont>
|
|
18
|
+
<dont>Full-bleed wrapping headlines across a wide shell when a capped measure + `balanced` fits</dont>
|
|
19
|
+
<dont>One fixed wide measure for every Title `size` — smaller presets need a narrower column for ~10–12 words/line</dont>
|
|
15
20
|
</usage>
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
render={
|
|
23
23
|
<ToggleButton
|
|
24
24
|
aria-label="Lock in shuffle"
|
|
25
|
-
restingIcon={<LockOpen2 aria-hidden
|
|
26
|
-
pressedIcon={<Lock aria-hidden
|
|
25
|
+
restingIcon={<LockOpen2 aria-hidden />}
|
|
26
|
+
pressedIcon={<Lock aria-hidden color="var(--global-primary)" />}
|
|
27
27
|
variant="flat"
|
|
28
28
|
pressedVariant="secondary"
|
|
29
29
|
/>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<ToggleButton
|
|
44
44
|
aria-label="Sync light and dark"
|
|
45
45
|
size="s"
|
|
46
|
-
restingIcon={<DarkLight aria-hidden
|
|
46
|
+
restingIcon={<DarkLight aria-hidden />}
|
|
47
47
|
variant="flat"
|
|
48
48
|
pressedVariant="primary"
|
|
49
49
|
/>
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
<Badge show color="yellow">
|
|
61
61
|
<ToggleButton
|
|
62
62
|
aria-label="Mute notifications"
|
|
63
|
-
restingIcon={<BellSlash aria-hidden
|
|
64
|
-
pressedIcon={<BellOn aria-hidden
|
|
63
|
+
restingIcon={<BellSlash aria-hidden />}
|
|
64
|
+
pressedIcon={<BellOn aria-hidden />}
|
|
65
65
|
size="s"
|
|
66
66
|
interpolateIcons
|
|
67
67
|
variant="secondary"
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
<ToggleButton
|
|
78
78
|
value="light"
|
|
79
79
|
aria-label="Light"
|
|
80
|
-
restingIcon={<Sun aria-hidden
|
|
80
|
+
restingIcon={<Sun aria-hidden />}
|
|
81
81
|
variant="flat"
|
|
82
82
|
size="s"
|
|
83
83
|
pressedVariant="secondary"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<ToggleButton
|
|
86
86
|
value="dark"
|
|
87
87
|
aria-label="Dark"
|
|
88
|
-
restingIcon={<MoonStars aria-hidden
|
|
88
|
+
restingIcon={<MoonStars aria-hidden />}
|
|
89
89
|
variant="flat"
|
|
90
90
|
size="s"
|
|
91
91
|
pressedVariant="secondary"
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
<ToggleButton
|
|
94
94
|
value="system"
|
|
95
95
|
aria-label="System"
|
|
96
|
-
restingIcon={<DarkLight aria-hidden
|
|
96
|
+
restingIcon={<DarkLight aria-hidden />}
|
|
97
97
|
variant="flat"
|
|
98
98
|
size="s"
|
|
99
99
|
pressedVariant="secondary"
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
<description>Applies a fully rounded pill shape to the button.</description>
|
|
21
21
|
</prop>
|
|
22
22
|
<prop name="pressedIcon" kind="react">
|
|
23
|
-
<description>Icon shown while the toggle is pressed
|
|
23
|
+
<description>Icon shown while the toggle is pressed. Omit glyph `size` / width / height — host CSS sizes SVG via `--vui-button-icon-size`.</description>
|
|
24
24
|
</prop>
|
|
25
25
|
<prop name="pressedVariant" kind="react">
|
|
26
26
|
<description>Visual variant while the toggle is pressed.</description>
|
|
27
27
|
</prop>
|
|
28
28
|
<prop name="restingIcon" kind="react">
|
|
29
|
-
<description>Icon shown while the toggle is not pressed
|
|
29
|
+
<description>Icon shown while the toggle is not pressed. Omit glyph `size` / width / height — host CSS sizes SVG via `--vui-button-icon-size`.</description>
|
|
30
30
|
</prop>
|
|
31
31
|
<prop name="size" kind="react">
|
|
32
32
|
<description>Controls the visual button size.</description>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<description>Button block size; size prop presets via data attributes.</description>
|
|
45
45
|
</prop>
|
|
46
46
|
<prop name="icon-size" kind="css">
|
|
47
|
-
<description>Addon icon size inside the button.</description>
|
|
47
|
+
<description>Addon icon size inside the button (`--vui-button-icon-size`). Prefer this over setting `size` on the glyph ReactNode.</description>
|
|
48
48
|
</prop>
|
|
49
49
|
<prop name="padding-block" kind="css">
|
|
50
50
|
<description>Vertical padding inside the button.</description>
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
<do>Toolbar pin, favorite, mute, or lock toggles identified only by icon</do>
|
|
4
4
|
<do>Compact on/off controls that share IconButton size, variant, and loading model</do>
|
|
5
5
|
<do>Two-state actions where pressed state should swap the visible glyph via `restingIcon` / `pressedIcon`</do>
|
|
6
|
+
<do>Omit `size` / width / height on `restingIcon` / `pressedIcon` glyphs — host CSS sizes SVG via `--vui-button-icon-size`; set glyph size only to expressly override</do>
|
|
6
7
|
<do>Temporal pressed feedback (e.g. copy) with optional `interpolateIcons` crossfade</do>
|
|
7
8
|
<do>Segmented toolbars: nest ToggleButtons with `value` inside ToggleGroup; label each control and the group</do>
|
|
8
9
|
<do>Optional chrome: wrap with Tooltip.Trigger / Badge — keep the accessible name on the ToggleButton</do>
|
|
9
10
|
<dont>Using IconButton for persistent or temporal pressed toolbar state</dont>
|
|
10
11
|
<dont>Using Switch for compact icon-only toolbar toggles</dont>
|
|
11
12
|
<dont>Passing `icon` or `render` — ToggleButton owns icon swap and Toggle render wiring; use `restingIcon` / `pressedIcon`</dont>
|
|
13
|
+
<dont>Passing `size={16}` / `size="1rem"` (or width/height) on every icon slot glyph — ToggleButton CSS sizes SVG descendants</dont>
|
|
12
14
|
<dont>Omitting `value` on ToggleButton children inside a ToggleGroup</dont>
|
|
13
15
|
<dont>Omitting both `aria-label` and `aria-labelledby`</dont>
|
|
14
16
|
</usage>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<ToggleButton
|
|
10
10
|
value="light"
|
|
11
11
|
aria-label="Light"
|
|
12
|
-
restingIcon={<Sun aria-hidden
|
|
12
|
+
restingIcon={<Sun aria-hidden />}
|
|
13
13
|
variant="flat"
|
|
14
14
|
size="s"
|
|
15
15
|
pressedVariant="secondary"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<ToggleButton
|
|
18
18
|
value="dark"
|
|
19
19
|
aria-label="Dark"
|
|
20
|
-
restingIcon={<MoonStars aria-hidden
|
|
20
|
+
restingIcon={<MoonStars aria-hidden />}
|
|
21
21
|
variant="flat"
|
|
22
22
|
size="s"
|
|
23
23
|
pressedVariant="secondary"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<ToggleButton
|
|
26
26
|
value="system"
|
|
27
27
|
aria-label="System"
|
|
28
|
-
restingIcon={<DarkLight aria-hidden
|
|
28
|
+
restingIcon={<DarkLight aria-hidden />}
|
|
29
29
|
variant="flat"
|
|
30
30
|
size="s"
|
|
31
31
|
pressedVariant="secondary"
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
render={
|
|
19
19
|
<Surface color={1} border="all" radius="m" vPadding="2xs" hPadding="2xs" aria-label="100%">
|
|
20
20
|
<Stack direction="row" vAlign="center">
|
|
21
|
-
<IconButton aria-label="Zoom out" icon={<Minus aria-hidden
|
|
22
|
-
<IconButton aria-label="Reset zoom" icon={<FocusCenter aria-hidden
|
|
23
|
-
<IconButton aria-label="Zoom in" icon={<Plus aria-hidden
|
|
21
|
+
<IconButton aria-label="Zoom out" icon={<Minus aria-hidden />} variant="flat" />
|
|
22
|
+
<IconButton aria-label="Reset zoom" icon={<FocusCenter aria-hidden />} variant="flat" />
|
|
23
|
+
<IconButton aria-label="Zoom in" icon={<Plus aria-hidden />} variant="flat" />
|
|
24
24
|
</Stack>
|
|
25
25
|
</Surface>
|
|
26
26
|
}
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
aria-label="Shuffle lock"
|
|
41
41
|
pressed={false}
|
|
42
42
|
variant="flat"
|
|
43
|
-
restingIcon={<LockOpen2 aria-hidden
|
|
44
|
-
pressedIcon={<Lock aria-hidden
|
|
43
|
+
restingIcon={<LockOpen2 aria-hidden />}
|
|
44
|
+
pressedIcon={<Lock aria-hidden />}
|
|
45
45
|
/>
|
|
46
46
|
}
|
|
47
47
|
/>
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
delay={50}
|
|
59
59
|
render={
|
|
60
60
|
<span aria-label="Supported by: Chrome, Edge, Firefox">
|
|
61
|
-
<TriangleWarning aria-hidden
|
|
61
|
+
<TriangleWarning aria-hidden color="var(--highlight-yellow)" />
|
|
62
62
|
</span>
|
|
63
63
|
}
|
|
64
64
|
/>
|
|
@@ -103,7 +103,7 @@ const toolbarHandle = Tooltip.createHandle<string>();
|
|
|
103
103
|
closeDelay={200}
|
|
104
104
|
handle={toolbarHandle}
|
|
105
105
|
payload="Duplicate"
|
|
106
|
-
render={<Duplicate
|
|
106
|
+
render={<Duplicate aria-label="Duplicate" />}
|
|
107
107
|
/>
|
|
108
108
|
{/* more Icon triggers with the same handle… */}
|
|
109
109
|
|
|
@@ -154,4 +154,26 @@
|
|
|
154
154
|
<gotcha>--vibrancy-blur</gotcha>
|
|
155
155
|
<gotcha>--vibrancy-brightness</gotcha>
|
|
156
156
|
</attr>
|
|
157
|
+
<attr name="data-layout-fixed">
|
|
158
|
+
<presence>boolean attribute on table elements</presence>
|
|
159
|
+
<effect>Sets table-layout: fixed on the table. Preflight already collapses borders, full inline-size, cell padding, and thead hairline — this only switches layout algorithm.</effect>
|
|
160
|
+
<values>
|
|
161
|
+
<value>(boolean presence)</value>
|
|
162
|
+
</values>
|
|
163
|
+
<when>Column widths must follow the first row / explicit widths instead of content</when>
|
|
164
|
+
<when_not>When auto table layout is already correct</when_not>
|
|
165
|
+
<when_not>Hand-rolling table-layout: fixed in app CSS instead of this attr</when_not>
|
|
166
|
+
<gotcha>Baseline table chrome lives in modules.xml id=baseline — do not reinvent cell padding or collapse.</gotcha>
|
|
167
|
+
</attr>
|
|
168
|
+
<attr name="data-table-separators">
|
|
169
|
+
<presence>boolean attribute on table elements</presence>
|
|
170
|
+
<effect>Draws a 1px base-2 hairline between consecutive body rows (tr + tr). Does not paint under thead (thead already has its own inset rule).</effect>
|
|
171
|
+
<values>
|
|
172
|
+
<value>(boolean presence)</value>
|
|
173
|
+
</values>
|
|
174
|
+
<when>Dense data tables that need row separators without custom border CSS</when>
|
|
175
|
+
<when_not>When thead/body styling without body-row lines is enough</when_not>
|
|
176
|
+
<when_not>Hand-rolling tr + tr border-top / row divider CSS instead of this attr</when_not>
|
|
177
|
+
<gotcha>Separators are body-row only; thead uses a separate inset box-shadow from baseline.</gotcha>
|
|
178
|
+
</attr>
|
|
157
179
|
</attributes>
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<tree>Toast.Portal > Toast.Viewport > Toast.Banner per toast</tree>
|
|
40
40
|
<next_js>Keep CSS side-effect imports in the Server Component root layout. Put the provider tree in a Client Component that wraps children.</next_js>
|
|
41
41
|
<astro>React context does not cross Astro islands. Providers must live in the same island as the Vira overlays that consume them.</astro>
|
|
42
|
-
<rtl>For RTL menus and popups, wrap with
|
|
42
|
+
<rtl>For RTL menus and popups, wrap with DirectionProvider direction="rtl" from @viraui/react (transparent Base UI re-export) and set dir="rtl" on a portal ancestor (usually html). Opt-in — not part of the Dialog/Tooltip/Toast overlay shell.</rtl>
|
|
43
43
|
</root_providers>
|
|
44
44
|
<next_js_app_router>
|
|
45
45
|
<rule>In Next.js App Router apps, import theme CSS, font CSS, and @viraui/react/preflight.css as JavaScript side-effect imports in root app/layout.tsx; never bootstrap them with CSS @import in globals.css.</rule>
|
|
@@ -19,10 +19,14 @@
|
|
|
19
19
|
</agent_rules>
|
|
20
20
|
|
|
21
21
|
<module id="baseline">
|
|
22
|
-
<purpose>Root document baseline after theme load: rem root from --font-root-size, color/background from --global-*, polarity --is-light-mode, scrollbar and focus-visible ring, reduced-motion, corner-shape gate.</purpose>
|
|
23
|
-
<provides>--is-light-mode; focus ring via --outline*; scrollbar via --scrollbar-*; corner-shape application</provides>
|
|
22
|
+
<purpose>Root document baseline after theme load: rem root from --font-root-size, color/background from --global-*, polarity --is-light-mode, scrollbar and focus-visible ring, reduced-motion, corner-shape gate; plus universal margin/box-sizing reset, body font baseline, media/form/table element resets, and nested-list font-size fix.</purpose>
|
|
23
|
+
<provides>--is-light-mode; focus ring via --outline*; scrollbar via --scrollbar-*; corner-shape application; margin/box-sizing reset; body font family/size/optical sizing; img/svg defaults; button/fieldset unstyled baseline; table collapse/spacing/cell padding/thead rule; data-layout-fixed; data-table-separators; nested ol/ul font-size: initial</provides>
|
|
24
24
|
<use>Theme tokens + data-mode. Query polarity with @container root style(--is-light-mode: black|white). Details: toggles.xml.</use>
|
|
25
|
+
<use>Bare img is block + full inline-size (capped); svg without fill inherits currentcolor. button and fieldset ship unstyled (Vira controls re-skin). table is full-width collapsed with cell padding and thead hairline; opt into fixed layout or body-row separators via attributes.xml.</use>
|
|
26
|
+
<use>Nested lists (ol ul / ul ol) reset font-size so inherited shrink from parent list does not cascade — list chrome itself is typography module.</use>
|
|
25
27
|
<do_not>Replace preflight reset with a second framework reboot. Prefer omitting third-party preflight/reset (setup skill coexistence).</do_not>
|
|
28
|
+
<do_not>Hand-roll table-layout: fixed or body-row hairlines when data-layout-fixed / data-table-separators cover it.</do_not>
|
|
29
|
+
<do_not>Re-apply universal margin:0 / box-sizing:border-box or button/fieldset appearance resets that preflight already owns.</do_not>
|
|
26
30
|
</module>
|
|
27
31
|
<module id="font-scale">
|
|
28
32
|
<purpose>Derives --font-scale-* from theme --font-heading-typescale / --font-body-typescale (pow + round). body-m = 1rem; smaller body steps floored; larger body and display from continuous powers.</purpose>
|
|
@@ -49,10 +53,15 @@
|
|
|
49
53
|
<do_not>Assign --vira-flex-grow / --vira-flex-shrink directly in app CSS — use the data-* attrs.</do_not>
|
|
50
54
|
</module>
|
|
51
55
|
<module id="typography">
|
|
52
|
-
<purpose>Semantic HTML element typography defaults and link chrome opt-out.</purpose>
|
|
53
|
-
<provides>element type defaults; data-no-link-style</provides>
|
|
54
|
-
<use>
|
|
56
|
+
<purpose>Semantic HTML element typography defaults and link chrome opt-out. Preflight already styles bare prose, lists, and inline chrome — agents must not reinvent these as app CSS by default.</purpose>
|
|
57
|
+
<provides>element type defaults for p, small, strong/b, s, address, label/legend, a:any-link, code, kbd, abbr, mark, del, ins, ul, ol, dt, dd; data-no-link-style</provides>
|
|
58
|
+
<use>Prose: p uses body-m size + 1.5 line-height; small scales down; strong/b use wght 700; s is strikethrough + disabled foreground; address is normal style; label/legend inherit font-size.</use>
|
|
59
|
+
<use>Inline chrome: every a:any-link gets interactive color + animated underline unless data-no-link-style is set (attributes.xml). Prose links — including Text/Title render as a — keep it. Chrome components set the attr. Inline code (not inside pre) and kbd get contrast pill chrome; pre code drops the box-shadow. abbr uses dashed primary underline. mark / del / ins get highlight-tinted chips (yellow / red / green).</use>
|
|
60
|
+
<use>Lists: ul gets inline padding + muted ::marker; ol gets muted tabular-nums ::marker. Prefer bare ul/ol/li (or Stack render as list) — do not invent list-style / marker / list padding CSS. Nested-list font-size reset is baseline module.</use>
|
|
61
|
+
<use>Definitions: dt is semibold; dd has zero margin/padding.</use>
|
|
55
62
|
<do_not>Rely on class presence to suppress link styles — use data-no-link-style only.</do_not>
|
|
63
|
+
<do_not>Reinvent list markers, list-style-type, or ul/ol padding when preflight already owns them — unless the consumer expressly asks for an override.</do_not>
|
|
64
|
+
<do_not>Reinvent link underline, inline code/kbd pills, or mark/del/ins highlight chips as app CSS by default.</do_not>
|
|
56
65
|
</module>
|
|
57
66
|
<module id="vibrancy">
|
|
58
67
|
<purpose>Theme-gated backdrop-filter glass on opt-in hosts.</purpose>
|
|
@@ -110,10 +119,10 @@
|
|
|
110
119
|
<use>Override on html/root when product needs a custom scrollbar tint.</use>
|
|
111
120
|
</custom_property>
|
|
112
121
|
<custom_property name="--scrollbar-track" surface="public">
|
|
113
|
-
<purpose>Scrollbar track color
|
|
122
|
+
<purpose>Scrollbar track color token on html. Preflight paints tracks as transparent (scrollbar-color + webkit track) so empty-track flash stays invisible; override this only if a product needs a visible track.</purpose>
|
|
114
123
|
<default>transparent</default>
|
|
115
124
|
<set_by>Preflight on html; optional root override</set_by>
|
|
116
|
-
<use>Optional root override.</use>
|
|
125
|
+
<use>Optional root override when a visible track is required.</use>
|
|
117
126
|
</custom_property>
|
|
118
127
|
<custom_property name="--outline" surface="public">
|
|
119
128
|
<purpose>Focus-visible outline shorthand.</purpose>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<when>Brand default is initial (off). When on, paints a fixed body::after foil overlay gated by @container root not style(--effect-holofoil: initial); foil blend adjusts under @container root style(--is-light-mode: white). Do not invent alternate foil hooks.</when>
|
|
21
21
|
</toggle>
|
|
22
22
|
<toggle name="--effect-fluid-typography">
|
|
23
|
-
<when>Empty/unset enables Text/Title fluid clamp sizing (prev scale step→step via viewport progress) when the instance `fluid` prop is true. Text defaults `fluid` false (locked at --font-scale-body-*); Title defaults true. Set theme to initial to lock each size at its theme scale token (--font-scale-body-* / --font-scale-display / --font-scale-h*). Per-instance: Text/Title `fluid={false}` → data-*-fluid=false locks that node to its size max token; Text `fluid` opts in. Module CSS also gates with @container root style(--effect-fluid-typography: initial). Text size xs
|
|
23
|
+
<when>Empty/unset enables Text/Title fluid clamp sizing (prev scale step→step via viewport progress) when the instance `fluid` prop is true. Text defaults `fluid` false (locked at --font-scale-body-*); Title defaults true. Set theme to initial to lock each size at its theme scale token (--font-scale-body-* / --font-scale-display / --font-scale-h*). Per-instance: Text/Title `fluid={false}` → data-*-fluid=false locks that node to its size max token; Text `fluid` opts in. Module CSS also gates with @container root style(--effect-fluid-typography: initial). Text size s and xs stay fixed (min=max); fluid clamp starts at m. At full fluid progress, on and off resolve to the same token.</when>
|
|
24
24
|
</toggle>
|
|
25
25
|
<toggle name="--corner-shape">
|
|
26
26
|
<when>Theme corner shape token; preflight may set internal --__corner-shape beside full radius. Not a consumer data-*.</when>
|
package/dist/specs/index.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<index package="@viraui/react" version="2026.
|
|
2
|
+
<index package="@viraui/react" version="2026.8.0" generated="2026-10-14T16:23:26.846Z">
|
|
3
3
|
<categories>
|
|
4
4
|
<category id="layout" />
|
|
5
5
|
<category id="action" />
|
|
@@ -151,6 +151,16 @@
|
|
|
151
151
|
<unit kind="patterns" href="components/dialog/patterns.xml" />
|
|
152
152
|
</units>
|
|
153
153
|
</entry>
|
|
154
|
+
<entry id="direction-provider" category="layout" title="DirectionProvider">
|
|
155
|
+
<summary>Transparent re-export of Base UI DirectionProvider and useDirection. Enables RTL behavior for Base UI–backed components; does not set HTML dir or CSS direction — pair with document dir=rtl on a porta…</summary>
|
|
156
|
+
<units>
|
|
157
|
+
<unit kind="meta" href="components/direction-provider/meta.xml" />
|
|
158
|
+
<unit kind="a11y" href="components/direction-provider/a11y.xml" />
|
|
159
|
+
<unit kind="props" href="components/direction-provider/props.xml" />
|
|
160
|
+
<unit kind="usage" href="components/direction-provider/usage.xml" />
|
|
161
|
+
<unit kind="patterns" href="components/direction-provider/patterns.xml" />
|
|
162
|
+
</units>
|
|
163
|
+
</entry>
|
|
154
164
|
<entry id="disclosure" category="layout" title="Disclosure">
|
|
155
165
|
<summary>Single-section expand/collapse wrapping Base UI Collapsible. Default Trigger is Surface with render → Collapsible Trigger; Panel is a height motion shell with no default content padding. Use Accordio…</summary>
|
|
156
166
|
<units>
|
|
@@ -302,7 +312,7 @@
|
|
|
302
312
|
</units>
|
|
303
313
|
</entry>
|
|
304
314
|
<entry id="prose" category="typography" title="Prose">
|
|
305
|
-
<summary>
|
|
315
|
+
<summary>Text-wall grouping region (articles, docs, privacy) with heading-aware em rhythm; reading column via parent Stack `maxWidth` sized for body Text `size`.</summary>
|
|
306
316
|
<units>
|
|
307
317
|
<unit kind="meta" href="components/prose/meta.xml" />
|
|
308
318
|
<unit kind="a11y" href="components/prose/a11y.xml" />
|
|
@@ -432,7 +442,7 @@
|
|
|
432
442
|
</units>
|
|
433
443
|
</entry>
|
|
434
444
|
<entry id="text" category="typography" title="Text">
|
|
435
|
-
<summary>Theme-aware body-copy primitive with tone, family, and
|
|
445
|
+
<summary>Theme-aware body-copy primitive with tone, family, sizing, and readable-measure props (`maxWidth` / `lineHeight` / `balanced`).</summary>
|
|
436
446
|
<units>
|
|
437
447
|
<unit kind="meta" href="components/text/meta.xml" />
|
|
438
448
|
<unit kind="a11y" href="components/text/a11y.xml" />
|
|
@@ -462,7 +472,7 @@
|
|
|
462
472
|
</units>
|
|
463
473
|
</entry>
|
|
464
474
|
<entry id="title" category="typography" title="Title">
|
|
465
|
-
<summary>Theme-aware heading and display typography
|
|
475
|
+
<summary>Theme-aware heading and display typography with readable-measure props (`maxWidth` / `lineHeight` / `balanced`).</summary>
|
|
466
476
|
<units>
|
|
467
477
|
<unit kind="meta" href="components/title/meta.xml" />
|
|
468
478
|
<unit kind="a11y" href="components/title/a11y.xml" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viraui/react",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.8.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@base-ui/react": ">=1.8.0",
|
|
31
|
-
"@viraui/foundation": "2026.
|
|
31
|
+
"@viraui/foundation": "2026.8.0",
|
|
32
32
|
"@viraui/icons": "2026.1.0",
|
|
33
33
|
"@viraui/postcss-config": "2026.0.0",
|
|
34
34
|
"@viraui/tsconfig": "2026.0.0",
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useId } from "react";
|
|
3
|
-
//#region src/components/spinner/variants/bars.tsx
|
|
4
|
-
/** Sanitize React useId for SVG id / begin references (strip `:`). */
|
|
5
|
-
var smilId = (reactId, name) => `${reactId.replaceAll(":", "")}${name}`;
|
|
6
|
-
var BarsGlyph = () => {
|
|
7
|
-
const reactId = useId();
|
|
8
|
-
const ccmt = smilId(reactId, "ccmt");
|
|
9
|
-
const izzb = smilId(reactId, "izzb");
|
|
10
|
-
const pulse = {
|
|
11
|
-
y: {
|
|
12
|
-
values: "6;1;6",
|
|
13
|
-
keySplines: ".36,.61,.3,.98;.36,.61,.3,.98"
|
|
14
|
-
},
|
|
15
|
-
height: {
|
|
16
|
-
values: "12;22;12",
|
|
17
|
-
keySplines: ".36,.61,.3,.98;.36,.61,.3,.98"
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
return /* @__PURE__ */ jsxs("g", {
|
|
21
|
-
fill: "currentColor",
|
|
22
|
-
children: [
|
|
23
|
-
/* @__PURE__ */ jsxs("rect", {
|
|
24
|
-
x: "1",
|
|
25
|
-
y: "6",
|
|
26
|
-
width: "2.8",
|
|
27
|
-
height: "12",
|
|
28
|
-
children: [/* @__PURE__ */ jsx("animate", {
|
|
29
|
-
id: ccmt,
|
|
30
|
-
begin: `0;${izzb}.end-0.1s`,
|
|
31
|
-
attributeName: "y",
|
|
32
|
-
calcMode: "spline",
|
|
33
|
-
dur: "0.6s",
|
|
34
|
-
values: pulse.y.values,
|
|
35
|
-
keySplines: pulse.y.keySplines
|
|
36
|
-
}), /* @__PURE__ */ jsx("animate", {
|
|
37
|
-
begin: `0;${izzb}.end-0.1s`,
|
|
38
|
-
attributeName: "height",
|
|
39
|
-
calcMode: "spline",
|
|
40
|
-
dur: "0.6s",
|
|
41
|
-
values: pulse.height.values,
|
|
42
|
-
keySplines: pulse.height.keySplines
|
|
43
|
-
})]
|
|
44
|
-
}),
|
|
45
|
-
/* @__PURE__ */ jsxs("rect", {
|
|
46
|
-
x: "5.8",
|
|
47
|
-
y: "6",
|
|
48
|
-
width: "2.8",
|
|
49
|
-
height: "12",
|
|
50
|
-
children: [/* @__PURE__ */ jsx("animate", {
|
|
51
|
-
begin: `${ccmt}.begin+0.1s`,
|
|
52
|
-
attributeName: "y",
|
|
53
|
-
calcMode: "spline",
|
|
54
|
-
dur: "0.6s",
|
|
55
|
-
values: pulse.y.values,
|
|
56
|
-
keySplines: pulse.y.keySplines
|
|
57
|
-
}), /* @__PURE__ */ jsx("animate", {
|
|
58
|
-
begin: `${ccmt}.begin+0.1s`,
|
|
59
|
-
attributeName: "height",
|
|
60
|
-
calcMode: "spline",
|
|
61
|
-
dur: "0.6s",
|
|
62
|
-
values: pulse.height.values,
|
|
63
|
-
keySplines: pulse.height.keySplines
|
|
64
|
-
})]
|
|
65
|
-
}),
|
|
66
|
-
/* @__PURE__ */ jsxs("rect", {
|
|
67
|
-
x: "10.6",
|
|
68
|
-
y: "6",
|
|
69
|
-
width: "2.8",
|
|
70
|
-
height: "12",
|
|
71
|
-
children: [/* @__PURE__ */ jsx("animate", {
|
|
72
|
-
begin: `${ccmt}.begin+0.2s`,
|
|
73
|
-
attributeName: "y",
|
|
74
|
-
calcMode: "spline",
|
|
75
|
-
dur: "0.6s",
|
|
76
|
-
values: pulse.y.values,
|
|
77
|
-
keySplines: pulse.y.keySplines
|
|
78
|
-
}), /* @__PURE__ */ jsx("animate", {
|
|
79
|
-
begin: `${ccmt}.begin+0.2s`,
|
|
80
|
-
attributeName: "height",
|
|
81
|
-
calcMode: "spline",
|
|
82
|
-
dur: "0.6s",
|
|
83
|
-
values: pulse.height.values,
|
|
84
|
-
keySplines: pulse.height.keySplines
|
|
85
|
-
})]
|
|
86
|
-
}),
|
|
87
|
-
/* @__PURE__ */ jsxs("rect", {
|
|
88
|
-
x: "15.4",
|
|
89
|
-
y: "6",
|
|
90
|
-
width: "2.8",
|
|
91
|
-
height: "12",
|
|
92
|
-
children: [/* @__PURE__ */ jsx("animate", {
|
|
93
|
-
begin: `${ccmt}.begin+0.3s`,
|
|
94
|
-
attributeName: "y",
|
|
95
|
-
calcMode: "spline",
|
|
96
|
-
dur: "0.6s",
|
|
97
|
-
values: pulse.y.values,
|
|
98
|
-
keySplines: pulse.y.keySplines
|
|
99
|
-
}), /* @__PURE__ */ jsx("animate", {
|
|
100
|
-
begin: `${ccmt}.begin+0.3s`,
|
|
101
|
-
attributeName: "height",
|
|
102
|
-
calcMode: "spline",
|
|
103
|
-
dur: "0.6s",
|
|
104
|
-
values: pulse.height.values,
|
|
105
|
-
keySplines: pulse.height.keySplines
|
|
106
|
-
})]
|
|
107
|
-
}),
|
|
108
|
-
/* @__PURE__ */ jsxs("rect", {
|
|
109
|
-
x: "20.2",
|
|
110
|
-
y: "6",
|
|
111
|
-
width: "2.8",
|
|
112
|
-
height: "12",
|
|
113
|
-
children: [/* @__PURE__ */ jsx("animate", {
|
|
114
|
-
id: izzb,
|
|
115
|
-
begin: `${ccmt}.begin+0.4s`,
|
|
116
|
-
attributeName: "y",
|
|
117
|
-
calcMode: "spline",
|
|
118
|
-
dur: "0.6s",
|
|
119
|
-
values: pulse.y.values,
|
|
120
|
-
keySplines: pulse.y.keySplines
|
|
121
|
-
}), /* @__PURE__ */ jsx("animate", {
|
|
122
|
-
begin: `${ccmt}.begin+0.4s`,
|
|
123
|
-
attributeName: "height",
|
|
124
|
-
calcMode: "spline",
|
|
125
|
-
dur: "0.6s",
|
|
126
|
-
values: pulse.height.values,
|
|
127
|
-
keySplines: pulse.height.keySplines
|
|
128
|
-
})]
|
|
129
|
-
})
|
|
130
|
-
]
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
//#endregion
|
|
134
|
-
export { BarsGlyph as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@keyframes viraui__dot-grid-module__spinner-dot-grid-1_X76yC{9.0909090909%{transform:translate(-12px)}18.1818181818%{transform:translate(0)}27.2727272727%{transform:translate(0)}36.3636363636%{transform:translate(12px)}45.4545454545%{transform:translate(12px,12px)}54.5454545455%{transform:translate(12px,12px)}63.6363636364%{transform:translate(12px,12px)}72.7272727273%{transform:translate(12px)}81.8181818182%{transform:translate(0)}90.9090909091%{transform:translate(-12px)}to{transform:translate(0)}}@keyframes viraui__dot-grid-module__spinner-dot-grid-2_ntLgO{9.0909090909%{transform:translate(0)}18.1818181818%{transform:translate(12px)}27.2727272727%{transform:translate(0)}36.3636363636%{transform:translate(12px)}45.4545454545%{transform:translate(12px,12px)}54.5454545455%{transform:translate(12px,12px)}63.6363636364%{transform:translate(12px,12px)}72.7272727273%{transform:translate(12px,12px)}81.8181818182%{transform:translateY(12px)}90.9090909091%{transform:translateY(12px)}to{transform:translate(0)}}@keyframes viraui__dot-grid-module__spinner-dot-grid-3_6XjPw{9.0909090909%{transform:translate(-12px)}18.1818181818%{transform:translate(-12px)}27.2727272727%{transform:translate(0)}36.3636363636%{transform:translate(-12px)}45.4545454545%{transform:translate(-12px)}54.5454545455%{transform:translate(-12px)}63.6363636364%{transform:translate(-12px)}72.7272727273%{transform:translate(-12px)}81.8181818182%{transform:translate(-12px,-12px)}90.9090909091%{transform:translateY(-12px)}to{transform:translate(0)}}@keyframes viraui__dot-grid-module__spinner-dot-grid-4_xy0HO{9.0909090909%{transform:translate(-12px)}18.1818181818%{transform:translate(-12px)}27.2727272727%{transform:translate(-12px,-12px)}36.3636363636%{transform:translateY(-12px)}45.4545454545%{transform:translate(0)}54.5454545455%{transform:translateY(-12px)}63.6363636364%{transform:translateY(-12px)}72.7272727273%{transform:translateY(-12px)}81.8181818182%{transform:translate(-12px,-12px)}90.9090909091%{transform:translate(-12px)}to{transform:translate(0)}}@keyframes viraui__dot-grid-module__spinner-dot-grid-5_lJzYz{9.0909090909%{transform:translate(0)}18.1818181818%{transform:translate(0)}27.2727272727%{transform:translate(0)}36.3636363636%{transform:translate(12px)}45.4545454545%{transform:translate(12px)}54.5454545455%{transform:translate(12px)}63.6363636364%{transform:translate(12px)}72.7272727273%{transform:translate(12px)}81.8181818182%{transform:translate(12px,-12px)}90.9090909091%{transform:translateY(-12px)}to{transform:translate(0)}}@keyframes viraui__dot-grid-module__spinner-dot-grid-6_ZjVjH{9.0909090909%{transform:translate(0)}18.1818181818%{transform:translate(-12px)}27.2727272727%{transform:translate(-12px)}36.3636363636%{transform:translate(0)}45.4545454545%{transform:translate(0)}54.5454545455%{transform:translate(0)}63.6363636364%{transform:translate(0)}72.7272727273%{transform:translateY(12px)}81.8181818182%{transform:translate(-12px,12px)}90.9090909091%{transform:translate(-12px)}to{transform:translate(0)}}@keyframes viraui__dot-grid-module__spinner-dot-grid-7_sEfp9{9.0909090909%{transform:translate(12px)}18.1818181818%{transform:translate(12px)}27.2727272727%{transform:translate(12px)}36.3636363636%{transform:translate(0)}45.4545454545%{transform:translateY(-12px)}54.5454545455%{transform:translate(12px,-12px)}63.6363636364%{transform:translateY(-12px)}72.7272727273%{transform:translateY(-12px)}81.8181818182%{transform:translate(0)}90.9090909091%{transform:translate(12px)}to{transform:translate(0)}}@keyframes viraui__dot-grid-module__spinner-dot-grid-8_L2-uH{9.0909090909%{transform:translate(0)}18.1818181818%{transform:translate(-12px)}27.2727272727%{transform:translate(-12px,-12px)}36.3636363636%{transform:translateY(-12px)}45.4545454545%{transform:translateY(-12px)}54.5454545455%{transform:translateY(-12px)}63.6363636364%{transform:translateY(-12px)}72.7272727273%{transform:translateY(-12px)}81.8181818182%{transform:translate(12px,-12px)}90.9090909091%{transform:translate(12px)}to{transform:translate(0)}}@keyframes viraui__dot-grid-module__spinner-dot-grid-9_CrL1l{9.0909090909%{transform:translate(-12px)}18.1818181818%{transform:translate(-12px)}27.2727272727%{transform:translate(0)}36.3636363636%{transform:translate(-12px)}45.4545454545%{transform:translate(0)}54.5454545455%{transform:translate(0)}63.6363636364%{transform:translate(-12px)}72.7272727273%{transform:translate(-12px)}81.8181818182%{transform:translate(-24px)}90.9090909091%{transform:translate(-12px)}to{transform:translate(0)}}.viraui__dot-grid-module__Glyph_sf2Sf{&>circle{transform-origin:50% 50%}&>circle:first-child{animation:viraui__dot-grid-module__spinner-dot-grid-1_X76yC 4s infinite}&>circle:nth-child(2){animation:viraui__dot-grid-module__spinner-dot-grid-2_ntLgO 4s infinite}&>circle:nth-child(3){animation:viraui__dot-grid-module__spinner-dot-grid-3_6XjPw 4s infinite}&>circle:nth-child(4){animation:viraui__dot-grid-module__spinner-dot-grid-4_xy0HO 4s infinite}&>circle:nth-child(5){animation:viraui__dot-grid-module__spinner-dot-grid-5_lJzYz 4s infinite}&>circle:nth-child(6){animation:viraui__dot-grid-module__spinner-dot-grid-6_ZjVjH 4s infinite}&>circle:nth-child(7){animation:viraui__dot-grid-module__spinner-dot-grid-7_sEfp9 4s infinite}&>circle:nth-child(8){animation:viraui__dot-grid-module__spinner-dot-grid-8_L2-uH 4s infinite}&>circle:nth-child(9){animation:viraui__dot-grid-module__spinner-dot-grid-9_CrL1l 4s infinite}}}
|