@viraui/react 2026.8.0 → 2026.9.1
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 +3 -3
- package/dist/components/prose/prose.css +1 -1
- package/dist/components/prose/prose.d.ts +8 -0
- package/dist/components/prose/prose.js +2 -1
- package/dist/components/select/select.css +1 -1
- package/dist/components/stack/stack.css +1 -1
- package/dist/components/stack/stack.d.ts +15 -3
- package/dist/components/stack/stack.js +2 -1
- package/dist/components/surface/surface.css +1 -1
- package/dist/components/text/text.css +2 -2
- package/dist/components/text/text.d.ts +9 -6
- package/dist/components/text/text.js +2 -2
- package/dist/components/title/title.css +2 -2
- package/dist/components/title/title.d.ts +9 -6
- package/dist/components/title/title.js +2 -2
- package/dist/preflight.css +1 -1
- package/dist/specs/PROTOCOL.md +1 -1
- package/dist/specs/activity-hints.xml +4 -4
- package/dist/specs/components/progressive-blur/usage.xml +2 -2
- package/dist/specs/components/prose/meta.xml +1 -1
- package/dist/specs/components/prose/patterns.xml +1 -1
- package/dist/specs/components/prose/props.xml +8 -2
- package/dist/specs/components/prose/usage.xml +2 -1
- package/dist/specs/components/stack/patterns.xml +98 -0
- package/dist/specs/components/stack/props.xml +8 -3
- package/dist/specs/components/stack/usage.xml +6 -3
- package/dist/specs/components/surface/usage.xml +1 -1
- package/dist/specs/components/text/meta.xml +1 -1
- package/dist/specs/components/text/patterns.xml +11 -11
- package/dist/specs/components/text/props.xml +10 -7
- package/dist/specs/components/text/usage.xml +2 -2
- package/dist/specs/components/title/meta.xml +1 -1
- package/dist/specs/components/title/patterns.xml +8 -8
- package/dist/specs/components/title/props.xml +10 -7
- package/dist/specs/components/title/usage.xml +3 -3
- package/dist/specs/foundation/attributes.xml +2 -4
- package/dist/specs/foundation/theme-topics.xml +3 -3
- package/dist/specs/foundation/toggles.xml +2 -2
- package/dist/specs/index.xml +4 -22
- package/dist/specs/patterns/compose-layout-first.xml +1 -1
- package/package.json +2 -2
- package/dist/specs/patterns/equal-width-actions.xml +0 -22
- package/dist/specs/patterns/page-chrome.xml +0 -34
- package/dist/specs/patterns/stack-as-surface.xml +0 -37
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viraui/react",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.9.1",
|
|
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.9.1",
|
|
32
32
|
"@viraui/icons": "2026.1.0",
|
|
33
33
|
"@viraui/postcss-config": "2026.0.0",
|
|
34
34
|
"@viraui/tsconfig": "2026.0.0",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<pattern id="equal-width-actions" title="Equal-width action row">
|
|
3
|
-
<uses>
|
|
4
|
-
<ref id="stack" units="meta,usage,props" />
|
|
5
|
-
<ref id="button" units="meta,props" />
|
|
6
|
-
</uses>
|
|
7
|
-
<do>Span or share space with Stack `fullWidth` and/or `expandChildren` (and control `fullWidth` when the surface owns it). Orthogonal: `fullWidth` sizes the Stack; `expandChildren` grows direct children on the main axis.</do>
|
|
8
|
-
<dont>Do not invent `width: 100%` / `w-full` / per-child `flex: 1` CSS on Button (or other content-sized controls) when Stack can own the fill.</dont>
|
|
9
|
-
<tsx><![CDATA[
|
|
10
|
-
{/* Full-bleed column CTAs */}
|
|
11
|
-
<Stack fullWidth rowGap="s">
|
|
12
|
-
<Button>Continue</Button>
|
|
13
|
-
<Button variant="secondary">Cancel</Button>
|
|
14
|
-
</Stack>
|
|
15
|
-
|
|
16
|
-
{/* Equal-width row actions — children grow on the main axis. Add fullWidth when the Stack itself should fill its parent width */}
|
|
17
|
-
<Stack expandChildren direction="row" columnGap="s">
|
|
18
|
-
<Button>Continue</Button>
|
|
19
|
-
<Button variant="secondary">Cancel</Button>
|
|
20
|
-
</Stack>
|
|
21
|
-
]]></tsx>
|
|
22
|
-
</pattern>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<pattern id="page-chrome" title="Page chrome with Stack render">
|
|
3
|
-
<uses>
|
|
4
|
-
<ref id="stack" units="meta,usage,props" />
|
|
5
|
-
<ref id="title" units="meta" />
|
|
6
|
-
<ref id="button" units="meta" />
|
|
7
|
-
</uses>
|
|
8
|
-
<do>Own page/section flex with Stack. Pick semantic tags (`header`, `main`, `nav`, `section`, …) via `render={<tag />}` — keep Stack as the layout engine. CSS modules may set min-block-size / scroll; never `display:flex`.</do>
|
|
9
|
-
<dont>Do not use raw `header`/`main`/`nav` + `display:flex` / CSS gap for jobs Stack owns. Tag choice ≠ layout engine. Do not pass `render={<div />}` — Stack already defaults to `div`; omit `render` unless the host changes.</dont>
|
|
10
|
-
<tsx><![CDATA[
|
|
11
|
-
<Stack rowGap="m" expandChildren>
|
|
12
|
-
<Stack
|
|
13
|
-
direction="row"
|
|
14
|
-
hAlign="space-between"
|
|
15
|
-
vAlign="center"
|
|
16
|
-
columnGap="m"
|
|
17
|
-
hPadding="m"
|
|
18
|
-
vPadding="m"
|
|
19
|
-
render={<header />}
|
|
20
|
-
>
|
|
21
|
-
<Title render={<h1 />}>Settings</Title>
|
|
22
|
-
<Button>Save</Button>
|
|
23
|
-
</Stack>
|
|
24
|
-
<Stack direction="row" columnGap="m" expandChildren render={<main />}>
|
|
25
|
-
<Stack rowGap="xs" hPadding="s" vPadding="s" render={<nav aria-label="Settings" />}>
|
|
26
|
-
{/* nav links */}
|
|
27
|
-
</Stack>
|
|
28
|
-
<Stack rowGap="l" expandChildren>
|
|
29
|
-
{/* content */}
|
|
30
|
-
</Stack>
|
|
31
|
-
</Stack>
|
|
32
|
-
</Stack>
|
|
33
|
-
]]></tsx>
|
|
34
|
-
</pattern>
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<pattern id="stack-as-surface" title="Stack as Surface (avoid extra DOM)">
|
|
3
|
-
<uses>
|
|
4
|
-
<ref id="stack" units="meta,usage,props" />
|
|
5
|
-
<ref id="surface" units="meta,usage,props" />
|
|
6
|
-
<ref id="text" units="meta" />
|
|
7
|
-
<ref id="chip" units="meta" />
|
|
8
|
-
</uses>
|
|
9
|
-
<do>When a flex cluster also needs Surface chrome (border, color, radius, padding), prefer `Stack render={<Surface … />}` so layout + chrome share one root. Put gap/align/`fullWidth`/`expandChildren` on Stack; put `border` / `color` / `radius` / padding on the Surface in `render`.</do>
|
|
10
|
-
<dont>Do not add a CSS class for border/background/radius on a Stack when Surface owns that chrome. Do not wrap Stack in an extra Surface solely for those props when `render` merge is enough. Nest Surface→Stack only when you need separate roots (e.g. Elevator around Surface, concentric nested Surfaces, or chrome that must not sit on the flex host).</dont>
|
|
11
|
-
<tsx><![CDATA[
|
|
12
|
-
{/* Preferred: single node */}
|
|
13
|
-
<Stack
|
|
14
|
-
direction="row"
|
|
15
|
-
columnGap="s"
|
|
16
|
-
vAlign="center"
|
|
17
|
-
fullWidth
|
|
18
|
-
render={<Surface border="all" color={1} radius="m" hPadding="m" vPadding="s" />}
|
|
19
|
-
>
|
|
20
|
-
<Text size="sm" color="muted">
|
|
21
|
-
Status
|
|
22
|
-
</Text>
|
|
23
|
-
<Chip>Active</Chip>
|
|
24
|
-
</Stack>
|
|
25
|
-
|
|
26
|
-
{/* OK when a separate Surface root is required (Elevator, nested radius="auto", …) */}
|
|
27
|
-
{/*
|
|
28
|
-
<Elevator elevation={1}>
|
|
29
|
-
<Surface border="all" color={1} radius="m" hPadding="m" vPadding="s">
|
|
30
|
-
<Stack direction="row" columnGap="s" vAlign="center" fullWidth>
|
|
31
|
-
…
|
|
32
|
-
</Stack>
|
|
33
|
-
</Surface>
|
|
34
|
-
</Elevator>
|
|
35
|
-
*/}
|
|
36
|
-
]]></tsx>
|
|
37
|
-
</pattern>
|