@viraui/react 2026.5.0 → 2026.6.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.
Files changed (169) hide show
  1. package/dist/catalog.json +5 -5
  2. package/dist/components/avatar/avatar.js +1 -1
  3. package/dist/components/stack/stack.d.ts +4 -1
  4. package/dist/components/tabs/tabs.css +1 -1
  5. package/dist/components/text/text.css +1 -1
  6. package/dist/components/text/text.d.ts +16 -5
  7. package/dist/components/text/text.js +2 -1
  8. package/dist/components/textfield/textfield.d.ts +1 -0
  9. package/dist/components/title/title.css +1 -1
  10. package/dist/components/title/title.d.ts +12 -2
  11. package/dist/components/title/title.js +2 -1
  12. package/dist/preflight.css +4 -1
  13. package/dist/specs/PROTOCOL.md +23 -19
  14. package/dist/specs/activity-hints.xml +18 -3
  15. package/dist/specs/components/accordion/patterns.xml +69 -5
  16. package/dist/specs/components/accordion/props.xml +4 -4
  17. package/dist/specs/components/accordion/usage.xml +8 -4
  18. package/dist/specs/components/annotate/patterns.xml +50 -3
  19. package/dist/specs/components/annotate/props.xml +22 -22
  20. package/dist/specs/components/annotate/usage.xml +7 -6
  21. package/dist/specs/components/autocomplete/patterns.xml +123 -7
  22. package/dist/specs/components/autocomplete/props.xml +14 -14
  23. package/dist/specs/components/autocomplete/usage.xml +11 -6
  24. package/dist/specs/components/avatar/patterns.xml +78 -3
  25. package/dist/specs/components/avatar/props.xml +8 -8
  26. package/dist/specs/components/avatar/usage.xml +9 -3
  27. package/dist/specs/components/avatar-group/patterns.xml +65 -3
  28. package/dist/specs/components/avatar-group/props.xml +8 -8
  29. package/dist/specs/components/avatar-group/usage.xml +10 -7
  30. package/dist/specs/components/badge/patterns.xml +57 -3
  31. package/dist/specs/components/badge/props.xml +8 -8
  32. package/dist/specs/components/badge/usage.xml +5 -3
  33. package/dist/specs/components/beam/meta.xml +1 -1
  34. package/dist/specs/components/beam/patterns.xml +68 -3
  35. package/dist/specs/components/beam/props.xml +22 -22
  36. package/dist/specs/components/beam/usage.xml +7 -7
  37. package/dist/specs/components/bleed/patterns.xml +54 -3
  38. package/dist/specs/components/bleed/props.xml +2 -2
  39. package/dist/specs/components/bleed/usage.xml +6 -3
  40. package/dist/specs/components/breakpoints/meta.xml +1 -1
  41. package/dist/specs/components/breakpoints/patterns.xml +1 -6
  42. package/dist/specs/components/breakpoints/props.xml +4 -2
  43. package/dist/specs/components/breakpoints/usage.xml +10 -2
  44. package/dist/specs/components/button/patterns.xml +124 -6
  45. package/dist/specs/components/button/props.xml +33 -32
  46. package/dist/specs/components/button/usage.xml +13 -13
  47. package/dist/specs/components/checkbox/patterns.xml +83 -3
  48. package/dist/specs/components/checkbox/props.xml +10 -10
  49. package/dist/specs/components/checkbox/usage.xml +11 -6
  50. package/dist/specs/components/chip/patterns.xml +74 -3
  51. package/dist/specs/components/chip/props.xml +14 -14
  52. package/dist/specs/components/chip/usage.xml +10 -6
  53. package/dist/specs/components/clamp-text/patterns.xml +1 -4
  54. package/dist/specs/components/clamp-text/props.xml +2 -2
  55. package/dist/specs/components/clamp-text/usage.xml +8 -5
  56. package/dist/specs/components/dialog/patterns.xml +136 -15
  57. package/dist/specs/components/dialog/props.xml +2 -2
  58. package/dist/specs/components/dialog/usage.xml +9 -7
  59. package/dist/specs/components/elevator/patterns.xml +54 -3
  60. package/dist/specs/components/elevator/usage.xml +8 -5
  61. package/dist/specs/components/fieldset/patterns.xml +97 -3
  62. package/dist/specs/components/fieldset/usage.xml +7 -5
  63. package/dist/specs/components/fit-text/patterns.xml +1 -4
  64. package/dist/specs/components/fit-text/props.xml +2 -2
  65. package/dist/specs/components/fit-text/usage.xml +8 -6
  66. package/dist/specs/components/glow/meta.xml +1 -1
  67. package/dist/specs/components/glow/patterns.xml +74 -3
  68. package/dist/specs/components/glow/props.xml +16 -16
  69. package/dist/specs/components/glow/usage.xml +8 -7
  70. package/dist/specs/components/grid/patterns.xml +88 -5
  71. package/dist/specs/components/grid/props.xml +23 -23
  72. package/dist/specs/components/grid/usage.xml +9 -5
  73. package/dist/specs/components/icon-button/patterns.xml +97 -6
  74. package/dist/specs/components/icon-button/props.xml +32 -32
  75. package/dist/specs/components/icon-button/usage.xml +11 -9
  76. package/dist/specs/components/linear-progress/patterns.xml +58 -3
  77. package/dist/specs/components/linear-progress/props.xml +6 -6
  78. package/dist/specs/components/linear-progress/usage.xml +9 -8
  79. package/dist/specs/components/masonry/patterns.xml +68 -5
  80. package/dist/specs/components/masonry/props.xml +2 -2
  81. package/dist/specs/components/masonry/usage.xml +9 -4
  82. package/dist/specs/components/menu/patterns.xml +179 -15
  83. package/dist/specs/components/menu/usage.xml +8 -7
  84. package/dist/specs/components/meter/patterns.xml +49 -3
  85. package/dist/specs/components/meter/props.xml +6 -6
  86. package/dist/specs/components/meter/usage.xml +10 -7
  87. package/dist/specs/components/popover/patterns.xml +118 -9
  88. package/dist/specs/components/popover/props.xml +2 -2
  89. package/dist/specs/components/popover/usage.xml +9 -8
  90. package/dist/specs/components/progressive-blur/meta.xml +1 -1
  91. package/dist/specs/components/progressive-blur/patterns.xml +1 -4
  92. package/dist/specs/components/progressive-blur/props.xml +2 -2
  93. package/dist/specs/components/progressive-blur/usage.xml +7 -6
  94. package/dist/specs/components/radio/patterns.xml +55 -5
  95. package/dist/specs/components/radio/props.xml +8 -8
  96. package/dist/specs/components/radio/usage.xml +9 -6
  97. package/dist/specs/components/select/patterns.xml +124 -8
  98. package/dist/specs/components/select/props.xml +18 -18
  99. package/dist/specs/components/select/usage.xml +11 -10
  100. package/dist/specs/components/separator/patterns.xml +121 -3
  101. package/dist/specs/components/separator/props.xml +4 -4
  102. package/dist/specs/components/separator/usage.xml +8 -5
  103. package/dist/specs/components/shimmer/patterns.xml +23 -3
  104. package/dist/specs/components/shimmer/props.xml +8 -8
  105. package/dist/specs/components/shimmer/usage.xml +7 -5
  106. package/dist/specs/components/skeleton/patterns.xml +172 -4
  107. package/dist/specs/components/skeleton/props.xml +14 -14
  108. package/dist/specs/components/skeleton/usage.xml +11 -7
  109. package/dist/specs/components/slider/patterns.xml +111 -3
  110. package/dist/specs/components/slider/props.xml +10 -10
  111. package/dist/specs/components/slider/usage.xml +11 -5
  112. package/dist/specs/components/spinner/patterns.xml +35 -3
  113. package/dist/specs/components/spinner/props.xml +2 -2
  114. package/dist/specs/components/spinner/usage.xml +8 -5
  115. package/dist/specs/components/stack/patterns.xml +359 -3
  116. package/dist/specs/components/stack/props.xml +24 -22
  117. package/dist/specs/components/stack/usage.xml +16 -10
  118. package/dist/specs/components/static-noise/meta.xml +1 -1
  119. package/dist/specs/components/static-noise/patterns.xml +20 -3
  120. package/dist/specs/components/static-noise/usage.xml +5 -5
  121. package/dist/specs/components/surface/patterns.xml +188 -3
  122. package/dist/specs/components/surface/props.xml +26 -26
  123. package/dist/specs/components/surface/usage.xml +15 -12
  124. package/dist/specs/components/switch/patterns.xml +73 -3
  125. package/dist/specs/components/switch/props.xml +12 -12
  126. package/dist/specs/components/switch/usage.xml +10 -5
  127. package/dist/specs/components/tabs/patterns.xml +111 -6
  128. package/dist/specs/components/tabs/props.xml +2 -2
  129. package/dist/specs/components/tabs/usage.xml +7 -3
  130. package/dist/specs/components/text/patterns.xml +97 -3
  131. package/dist/specs/components/text/props.xml +48 -43
  132. package/dist/specs/components/text/usage.xml +11 -4
  133. package/dist/specs/components/textarea/patterns.xml +49 -3
  134. package/dist/specs/components/textarea/props.xml +7 -6
  135. package/dist/specs/components/textarea/usage.xml +8 -5
  136. package/dist/specs/components/textfield/patterns.xml +163 -3
  137. package/dist/specs/components/textfield/props.xml +12 -11
  138. package/dist/specs/components/textfield/usage.xml +9 -3
  139. package/dist/specs/components/title/patterns.xml +74 -3
  140. package/dist/specs/components/title/props.xml +48 -43
  141. package/dist/specs/components/title/usage.xml +10 -7
  142. package/dist/specs/components/toast/patterns.xml +85 -8
  143. package/dist/specs/components/toast/usage.xml +8 -5
  144. package/dist/specs/components/toggle-button/patterns.xml +101 -3
  145. package/dist/specs/components/toggle-button/props.xml +16 -16
  146. package/dist/specs/components/toggle-button/usage.xml +9 -5
  147. package/dist/specs/components/toggle-group/patterns.xml +34 -5
  148. package/dist/specs/components/toggle-group/usage.xml +9 -5
  149. package/dist/specs/components/tooltip/patterns.xml +110 -6
  150. package/dist/specs/components/tooltip/props.xml +2 -2
  151. package/dist/specs/components/tooltip/usage.xml +8 -5
  152. package/dist/specs/components/typewriter/patterns.xml +18 -3
  153. package/dist/specs/components/typewriter/props.xml +2 -2
  154. package/dist/specs/components/typewriter/usage.xml +9 -8
  155. package/dist/specs/foundation/attributes.xml +67 -37
  156. package/dist/specs/foundation/bootstrap.xml +6 -6
  157. package/dist/specs/foundation/elevation.xml +51 -3
  158. package/dist/specs/foundation/modules.xml +117 -40
  159. package/dist/specs/foundation/theme-topics.xml +62 -27
  160. package/dist/specs/foundation/toggles.xml +2 -2
  161. package/dist/specs/index.xml +42 -6
  162. package/dist/specs/patterns/card-grid.xml +35 -0
  163. package/dist/specs/patterns/compose-layout-first.xml +32 -0
  164. package/dist/specs/patterns/equal-width-actions.xml +22 -0
  165. package/dist/specs/patterns/page-chrome.xml +34 -0
  166. package/dist/specs/patterns/settings-panel.xml +30 -0
  167. package/dist/specs/patterns/settings-row.xml +9 -7
  168. package/dist/specs/patterns/stack-as-surface.xml +37 -0
  169. package/package.json +2 -2
@@ -1,7 +1,125 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <patterns surface="separator">
3
- <example title="Separator structure">
4
- <tsx><![CDATA[<Separator />]]></tsx>
5
- <notes>Public assembly hint from legacy guide; not API authority.</notes>
3
+ <!-- Sources: viraui-app/components — cleaned (no handlers, no i18n, no app-only chrome). -->
4
+
5
+ <example title="Document shell header rule">
6
+ <tsx><![CDATA[
7
+ <Stack>
8
+ {/* header */}
9
+ <Separator variant="dashed" size="m" />
10
+ <Stack data-grow="true" expandChildren>
11
+ {/* page content */}
12
+ </Stack>
13
+ </Stack>
14
+ ]]></tsx>
15
+ <notes>From `layout/document-shell`. Dashed mid-size rule under sticky header. Shell height/sticky stay in CSS — Separator is the divider only.</notes>
16
+ </example>
17
+
18
+ <example title="Vertical page gutters">
19
+ <tsx><![CDATA[
20
+ <Stack render={<main />} direction="row" hAlign="center">
21
+ <Separator orientation="vertical" size="m" variant="dashed" />
22
+ {/* page body */}
23
+ <Separator orientation="vertical" size="m" variant="dashed" />
24
+ </Stack>
25
+ ]]></tsx>
26
+ <notes>From `app/(hub)/prompts/layout`. Vertical dashed rules frame centered content in a row Stack.</notes>
27
+ </example>
28
+
29
+ <example title="Form summary divider">
30
+ <tsx><![CDATA[
31
+ <Stack rowGap="l" vPadding="m">
32
+ <Separator />
33
+ <Stack columnGap="s" direction="row" hAlign="space-between" vAlign="center">
34
+ <Text tone="muted">Estimated Shares</Text>
35
+ <Text weight="semibold">1.95</Text>
36
+ </Stack>
37
+ <Stack columnGap="s" direction="row" hAlign="space-between" vAlign="center">
38
+ <Text tone="muted">Buying Power</Text>
39
+ <Text weight="semibold">$12,450.00</Text>
40
+ </Stack>
41
+ </Stack>
42
+ ]]></tsx>
43
+ <notes>From `editor/preview-grid/blocks/buy-investment`. Default horizontal Separator before key/value rows — not a Surface border.</notes>
44
+ </example>
45
+
46
+ <example title="Nested totals block">
47
+ <tsx><![CDATA[
48
+ <Surface color={2} radius="m" hPadding="m" vPadding="m">
49
+ <Stack rowGap="m">
50
+ <Stack direction="row" hAlign="space-between">
51
+ <Text size="s" tone="muted">
52
+ Net Royalties
53
+ </Text>
54
+ <Text family="mono" size="s">
55
+ $0.00
56
+ </Text>
57
+ </Stack>
58
+ <Stack direction="row" hAlign="space-between">
59
+ <Text size="s" tone="muted">
60
+ Processing Fee
61
+ </Text>
62
+ <Text family="mono" size="s">
63
+ -$0.00
64
+ </Text>
65
+ </Stack>
66
+ <Separator />
67
+ <Stack direction="row" hAlign="space-between">
68
+ <Text size="s" tone="muted">
69
+ Total Ready to Claim
70
+ </Text>
71
+ <Text family="mono" size="s" weight="semibold">
72
+ $0.00 USD
73
+ </Text>
74
+ </Stack>
75
+ </Stack>
76
+ </Surface>
77
+ ]]></tsx>
78
+ <notes>From `editor/preview-grid/blocks/claimable-balance`. Separator splits line items from total inside a tinted Surface.</notes>
79
+ </example>
80
+
81
+ <example title="List item dividers">
82
+ <tsx><![CDATA[
83
+ <Surface color={2} radius="m" hPadding="m" vPadding="m">
84
+ <Stack rowGap="s">
85
+ <Stack columnGap="m" direction="row" hAlign="space-between" vAlign="center">
86
+ <Text size="s">Expense ratio</Text>
87
+ <Text weight="semibold">0.03%</Text>
88
+ </Stack>
89
+ <Separator />
90
+ <Stack columnGap="m" direction="row" hAlign="space-between" vAlign="center">
91
+ <Text size="s">APY</Text>
92
+ <Text weight="semibold">4.82%</Text>
93
+ </Stack>
94
+ <Separator />
95
+ <Stack columnGap="m" direction="row" hAlign="space-between" vAlign="center">
96
+ <Text size="s">Dividend yield</Text>
97
+ <Text weight="semibold">2.14%</Text>
98
+ </Stack>
99
+ </Stack>
100
+ </Surface>
101
+ ]]></tsx>
102
+ <notes>From `editor/preview-grid/blocks/contextual-hints` metrics list. Insert Separator between stacked rows (`index &gt; 0` in app).</notes>
103
+ </example>
104
+
105
+ <example title="Editor action strip rules">
106
+ <tsx><![CDATA[
107
+ <Surface color={2} data-grow="false">
108
+ <Separator />
109
+ <Stack direction="row" vPadding="s" hPadding="m" columnGap="s" expandChildren>
110
+ <Button size="s" variant="secondary">
111
+ Shuffle
112
+ </Button>
113
+ <Button size="s">Export</Button>
114
+ </Stack>
115
+ <Separator />
116
+ <Stack vPadding="xs" hPadding="m">
117
+ <Button size="s" variant="flat">
118
+ Reset all
119
+ </Button>
120
+ </Stack>
121
+ </Surface>
122
+ ]]></tsx>
123
+ <notes>From `editor/editor` sidebar footer. Pair of Separators bookend the primary action row inside a tinted Surface.</notes>
6
124
  </example>
7
125
  </patterns>
@@ -30,10 +30,10 @@
30
30
  <prop name="vPadding" kind="react">
31
31
  <description>Sets block padding on the Stack wrapper using one token for both sides or a `[start, end]` tuple.</description>
32
32
  </prop>
33
- <css_var suffix="border-style">
33
+ <prop name="border-style" kind="css">
34
34
  <description>Separator line border style.</description>
35
- </css_var>
36
- <css_var suffix="size">
35
+ </prop>
36
+ <prop name="size" kind="css">
37
37
  <description>Separator line thickness.</description>
38
- </css_var>
38
+ </prop>
39
39
  </props>
@@ -1,8 +1,11 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <usage surface="separator">
3
- <do>Dividing sections within a page or panel</do>
4
- <do>Vertical dividers in toolbars, menus, or button groups</do>
5
- <do>Separating list items or stacked content blocks</do>
6
- <dont>Using Select.Separator for general layout dividers</dont>
7
- <dont>Replacing Surface borders with Separator for container chrome</dont>
3
+ <do>Horizontal rules between Stack sections — default orientation inside Surface panels, form summaries, or list metric rows</do>
4
+ <do>Split line items from a total inside a tinted Surface — Stack `rowGap` + Separator + totals row (Text pairs)</do>
5
+ <do>Bookend action strips — Separator above/below a Button row inside Surface (editor footers)</do>
6
+ <do>Vertical gutters or toolbar splits — `orientation=&quot;vertical&quot;` in a row Stack beside content or Button groups</do>
7
+ <do>Token thickness (`size`) and `variant` (e.g. dashed); space with Separator `hPadding`/`vPadding` or parent Stack gap — no custom border CSS</do>
8
+ <dont>Using Select.Separator for general layout dividers — that part is for Select option lists only</dont>
9
+ <dont>Replacing Surface borders or card outlines with Separator — use Surface `border` props for container chrome</dont>
10
+ <dont>Inventing divider margin/gap CSS when parent Stack `rowGap` / `columnGap` and Separator padding props cover spacing</dont>
8
11
  </usage>
@@ -1,7 +1,27 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <patterns surface="shimmer">
3
- <example title="Shimmer structure">
4
- <tsx><![CDATA[<Shimmer>…</Shimmer>]]></tsx>
5
- <notes>Public assembly hint from legacy guide; not API authority.</notes>
3
+ <!-- Sources: preview-grid `savings-targets` — cleaned. -->
4
+
5
+ <example title="Muted status line with Spinner">
6
+ <tsx><![CDATA[
7
+ <Surface color={2} hPadding="l" vPadding="m">
8
+ <Stack direction="row" vAlign="center" hAlign="start" columnGap="s">
9
+ <Spinner variant="dot-grid" size="s" aria-hidden />
10
+ <Text tone="muted" size="s">
11
+ <Shimmer>You have not met your targets yet.</Shimmer>
12
+ </Text>
13
+ </Stack>
14
+ </Surface>
15
+ ]]></tsx>
16
+ <notes>From preview-grid `savings-targets` footer. Wrap final-dimension copy in Shimmer inside Text/Title — not Skeleton blocks. Parent region owns `aria-busy` if needed.</notes>
17
+ </example>
18
+
19
+ <example title="Inline loading label">
20
+ <tsx><![CDATA[
21
+ <Text size="s" tone="muted">
22
+ <Shimmer>Loading balance…</Shimmer>
23
+ </Text>
24
+ ]]></tsx>
25
+ <notes>Minimal text shimmer while async copy is pending. Prefer Skeleton for non-text layout placeholders.</notes>
6
26
  </example>
7
27
  </patterns>
@@ -25,16 +25,16 @@
25
25
  <prop name="spread" kind="react">
26
26
  <description>Sets the shimmer highlight spread using any valid CSS length string.</description>
27
27
  </prop>
28
- <css_var suffix="angle">
28
+ <prop name="angle" kind="css">
29
29
  <description>Shimmer gradient angle offset.</description>
30
- </css_var>
31
- <css_var suffix="duration">
30
+ </prop>
31
+ <prop name="duration" kind="css">
32
32
  <description>Shimmer animation duration.</description>
33
- </css_var>
34
- <css_var suffix="highlight">
33
+ </prop>
34
+ <prop name="highlight" kind="css">
35
35
  <description>Shimmer highlight color.</description>
36
- </css_var>
37
- <css_var suffix="spread">
36
+ </prop>
37
+ <prop name="spread" kind="css">
38
38
  <description>Shimmer highlight spread width.</description>
39
- </css_var>
39
+ </prop>
40
40
  </props>
@@ -1,9 +1,11 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <usage surface="shimmer">
3
- <do>Loading placeholder copy inside Text or Title</do>
4
- <do>Animated text shimmer while awaiting async content</do>
5
- <do>Muted loading labels that keep the final text dimensions</do>
6
- <dont>Putting aria-busy on Shimmer instead of the surrounding loading region</dont>
3
+ <do>Wrap final-dimension loading copy inside Text or Title so typography / tone / size inherit — Shimmer is a `span` effect, not a layout block</do>
4
+ <do>Status footers: Surface + Stack row (`columnGap`, `vAlign=&quot;center&quot;`) with decorative Spinner (`aria-hidden`) beside Text &gt; Shimmer</do>
5
+ <do>Keep children as the real placeholder string so layout width matches the eventual label</do>
6
+ <do>Announce busy on the surrounding region when needed — do not mark Shimmer `aria-hidden` (it renders readable text)</do>
7
+ <dont>Using Shimmer for fixed-size block / media placeholders — use Skeleton</dont>
7
8
  <dont>Using Shimmer without children text content</dont>
8
- <dont>Using Shimmer for block placeholders better served by Skeleton</dont>
9
+ <dont>Putting `aria-busy` on Shimmer instead of the surrounding loading region</dont>
10
+ <dont>Replacing Skeleton card stacks with nested Shimmer</dont>
9
11
  </usage>
@@ -1,8 +1,176 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <patterns surface="skeleton">
3
- <example title="Skeleton structure">
4
- <tsx><![CDATA[<Skeleton />
5
- <Skeleton.Overlay>…</Skeleton.Overlay>]]></tsx>
6
- <notes>Public assembly hint from legacy guide; not API authority.</notes>
3
+ <!-- Sources: viraui-app/components + preview-grid — cleaned (no handlers, no app-only chrome, no CSS that reinvents layout props). -->
4
+
5
+ <example title="Fixed-size chrome placeholder (mode switcher)">
6
+ <tsx><![CDATA[
7
+ <Surface border="all" radius="m" vPadding="2xs" hPadding="2xs" aria-hidden>
8
+ <Skeleton aria-hidden height="1.75rem" radius="m" width="5.75rem" />
9
+ </Surface>
10
+ ]]></tsx>
11
+ <notes>From `common/mode-switcher` SSR gate. Explicit `width`/`height`/`radius` when the final control size is known. Decorative — parent owns `aria-hidden` / busy status.</notes>
12
+ </example>
13
+
14
+ <example title="Overlay over pending content (code block)">
15
+ <tsx><![CDATA[
16
+ <Surface
17
+ data-vibrant
18
+ radius="m"
19
+ border="all"
20
+ overflow="hidden"
21
+ aria-busy
22
+ role="region"
23
+ aria-label="Code preview"
24
+ >
25
+ <Stack>
26
+ {/* toolbar */}
27
+ <Skeleton.Overlay>
28
+ {/* pending highlighted body — Overlay sizes to children */}
29
+ <pre>
30
+ <code>{`/* theme export */`}</code>
31
+ </pre>
32
+ </Skeleton.Overlay>
33
+ </Stack>
34
+ </Surface>
35
+ ]]></tsx>
36
+ <notes>From `common/code-block`. Prefer `Skeleton.Overlay` when placeholder must match incoming content box. Announce busy on the Surface, not on Skeleton.</notes>
37
+ </example>
38
+
39
+ <example title="Card skeleton stack (canvas preview)">
40
+ <tsx><![CDATA[
41
+ <Surface border="all" color={1} overflow="hidden" radius="l">
42
+ <Stack direction="column" hPadding="l" rowGap="m" vPadding="l">
43
+ <Skeleton aria-hidden height="1.25rem" radius="m" width="37%" />
44
+ <Skeleton aria-hidden height="1rem" radius="m" width="56%" />
45
+ <Skeleton aria-hidden height="8rem" radius="l" width="100%" />
46
+ <Skeleton aria-hidden height="1rem" radius="m" width="100%" />
47
+ <Skeleton aria-hidden height="1rem" radius="m" width="76%" />
48
+ <Skeleton aria-hidden height="1rem" radius="m" width="51%" />
49
+ <Stack columnGap="s" direction="row" expandChildren>
50
+ <Skeleton aria-hidden height="2.5rem" radius="l" width="100%" />
51
+ <Skeleton aria-hidden height="2.5rem" radius="l" width="100%" />
52
+ </Stack>
53
+ </Stack>
54
+ </Surface>
55
+ ]]></tsx>
56
+ <notes>From `editor/canvas/canvas-preview-skeleton` card. Varied widths mimic title/body/CTA. `expandChildren` shares action-row width — no flex CSS.</notes>
57
+ </example>
58
+
59
+ <example title="Sidebar section skeleton">
60
+ <tsx><![CDATA[
61
+ <Stack hPadding="m">
62
+ <Surface color={2} radius="m">
63
+ <Stack hPadding="m" rowGap="m" vPadding="m">
64
+ <Stack columnGap="s" direction="row" vAlign="center">
65
+ <Skeleton aria-hidden height="1.125rem" radius="m" width="1.125rem" />
66
+ <Skeleton aria-hidden height="1rem" radius="m" width="42%" />
67
+ </Stack>
68
+ <Skeleton aria-hidden height="0.875rem" radius="m" width="68%" />
69
+ </Stack>
70
+ <Stack hPadding="m" rowGap="m" vPadding="m">
71
+ <Skeleton aria-hidden height="2.5rem" radius="m" width="100%" />
72
+ <Skeleton aria-hidden height="2.5rem" radius="m" width="100%" />
73
+ </Stack>
74
+ </Surface>
75
+ </Stack>
76
+ ]]></tsx>
77
+ <notes>From `editor/sidebar/sidebar-sections-skeleton`. Icon + title row, muted line, then control-height blocks. Drop `min-block-size` header CSS from this hint.</notes>
78
+ </example>
79
+
80
+ <example title="Editor shell footer actions">
81
+ <tsx><![CDATA[
82
+ <Surface color={2} data-grow="false">
83
+ <Separator />
84
+ <Stack direction="row" hPadding="m" columnGap="s" vPadding="s" expandChildren>
85
+ <Skeleton aria-hidden height="2rem" radius="m" width="100%" />
86
+ <Skeleton aria-hidden height="2rem" radius="m" width="100%" />
87
+ <Skeleton aria-hidden height="2rem" radius="m" width="100%" />
88
+ </Stack>
89
+ <Separator />
90
+ <Stack hPadding="m" rowGap="s" vPadding="xs">
91
+ <Skeleton aria-hidden height="2rem" radius="m" width="100%" />
92
+ </Stack>
93
+ </Surface>
94
+ ]]></tsx>
95
+ <notes>From `editor/editor-shell-skeleton` sidebar footer. Equal-width action skeletons via `expandChildren`. Shell grid/`100dvh` stay in app CSS.</notes>
96
+ </example>
97
+
98
+ <example title="Overlay + view-transition wipe (loading placeholder)">
99
+ <tsx><![CDATA[
100
+ <div className="skeleton-overlay-shell">
101
+ {/* CSS: .skeleton-overlay-shell { view-transition-name: skeleton-overlay; } */}
102
+ <Surface
103
+ aria-busy
104
+ aria-label="Overview card"
105
+ border="all"
106
+ color={1}
107
+ radius="l"
108
+ role="region"
109
+ overflow="hidden"
110
+ >
111
+ <Stack rowGap="m" hPadding="m" vPadding="m">
112
+ <Stack rowGap="xs" maxWidth="20ch">
113
+ <Skeleton.Overlay>
114
+ <Title size="6" render={<h2 />}>
115
+ Ledger overview
116
+ </Title>
117
+ </Skeleton.Overlay>
118
+ <Skeleton.Overlay>
119
+ <Text size="s" tone="muted">
120
+ Updated 2 hours ago
121
+ </Text>
122
+ </Skeleton.Overlay>
123
+ </Stack>
124
+
125
+ <Skeleton.Overlay>
126
+ <Surface color={2} radius="l">
127
+ {/* media sized by real content */}
128
+ </Surface>
129
+ </Skeleton.Overlay>
130
+
131
+ <Skeleton.Overlay>
132
+ <Text size="s">Next payout scheduled for Friday with FX risk: low and 3 actions pending</Text>
133
+ </Skeleton.Overlay>
134
+
135
+ <Stack columnGap="s" direction="row" expandChildren>
136
+ <Button size="s">Show content</Button>
137
+ <Skeleton.Overlay>
138
+ <Button size="s" variant="secondary">
139
+ Secondary action
140
+ </Button>
141
+ </Skeleton.Overlay>
142
+ </Stack>
143
+ </Stack>
144
+ </Surface>
145
+ </div>
146
+ ]]></tsx>
147
+ <notes>From preview-grid `loading-placeholder`. Overlay wraps real structure for zero layout shift; wipe uses `view-transition-name: skeleton-overlay` on a CSS class — not inline style. Drop kitchen reveal handlers.</notes>
148
+ </example>
149
+
150
+ <example title="Static placeholder card (prompts info backdrop)">
151
+ <tsx><![CDATA[
152
+ <Elevator resting={1}>
153
+ <Surface border="all" overflow="hidden" radius="l">
154
+ <Stack hPadding="m" rowGap="s" vPadding="m">
155
+ <Skeleton animate={false} aria-hidden height="8rem" radius="m" width="100%" />
156
+ <Skeleton animate={false} aria-hidden height="1rem" radius="full" width="70%" />
157
+ <Skeleton animate={false} aria-hidden height="0.75rem" radius="m" width="45%" />
158
+ </Stack>
159
+ </Surface>
160
+ </Elevator>
161
+ ]]></tsx>
162
+ <notes>From `prompts/prompts-info-state` decorative card. `animate={false}` when pulse would compete with empty-state chrome. Drop Grid/absolute backdrop shell from this hint.</notes>
163
+ </example>
164
+
165
+ <example title="Large preview shell fallback (export dialog)">
166
+ <tsx><![CDATA[
167
+ <Skeleton
168
+ aria-hidden
169
+ width="min(800px, 90vw)"
170
+ height="min(50vh, 54rem)"
171
+ radius="m"
172
+ />
173
+ ]]></tsx>
174
+ <notes>From `editor/export-dialog` Suspense fallback. One block sized to the eventual preview shell. Parent dialog region owns busy announcement.</notes>
7
175
  </example>
8
176
  </patterns>
@@ -49,25 +49,25 @@
49
49
  <prop name="width" kind="react">
50
50
  <description>Sets the skeleton inline size using any valid CSS size string.</description>
51
51
  </prop>
52
- <css_var suffix="background">
52
+ <prop name="background" kind="css">
53
53
  <description>Skeleton placeholder background color.</description>
54
- </css_var>
55
- <css_var suffix="block-size">
54
+ </prop>
55
+ <prop name="block-size" kind="css">
56
56
  <description>Skeleton block size.</description>
57
- </css_var>
58
- <css_var suffix="border-radius">
57
+ </prop>
58
+ <prop name="border-radius" kind="css">
59
59
  <description>Skeleton corner radius.</description>
60
- </css_var>
61
- <css_var suffix="duration">
60
+ </prop>
61
+ <prop name="duration" kind="css">
62
62
  <description>Pulse duration.</description>
63
- </css_var>
64
- <css_var suffix="inline-size">
63
+ </prop>
64
+ <prop name="inline-size" kind="css">
65
65
  <description>Skeleton inline size.</description>
66
- </css_var>
67
- <css_var suffix="min-block-size">
66
+ </prop>
67
+ <prop name="min-block-size" kind="css">
68
68
  <description>Skeleton minimum block size.</description>
69
- </css_var>
70
- <css_var suffix="min-inline-size">
69
+ </prop>
70
+ <prop name="min-inline-size" kind="css">
71
71
  <description>Skeleton minimum inline size.</description>
72
- </css_var>
72
+ </prop>
73
73
  </props>
@@ -1,10 +1,14 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <usage surface="skeleton">
3
- <do>Fixed-dimension pulse blocks while content loads</do>
4
- <do>Avatar or media placeholders with explicit width and height</do>
5
- <do>Skeleton.Overlay when placeholder layout should match incoming typography without layout shift</do>
6
- <do>View-transition wipe reveal for `Skeleton.Overlay`, with `viewTransitionName: &apos;skeleton-overlay&apos;` on the wrapper around skeleton+loaded content (prefer CSS class, not inline style)</do>
7
- <dont>Using Skeleton.Overlay without real content structure to size against</dont>
8
- <dont>Putting aria-busy on Skeleton instead of the surrounding loading region</dont>
9
- <dont>Expecting view-transition wipe without wrapper `viewTransitionName: &apos;skeleton-overlay&apos;` (prefer CSS class, not inline style)</dont>
3
+ <do>Card / sidebar placeholders: Surface chrome + Stack `rowGap` / padding, then Skeleton blocks with explicit `width` / `height` / `radius` — no flex/gap CSS</do>
4
+ <do>Equal-width action skeletons: Stack `direction=&quot;row&quot;` + `expandChildren` around Skeleton children</do>
5
+ <do>Zero layout shift: wrap real Title / Text / Button / Surface structure in `Skeleton.Overlay` so the pulse box matches incoming content</do>
6
+ <do>Announce busy on the surrounding Surface / region (`aria-busy`, `role=&quot;region&quot;`, label) — Skeleton roots force `aria-hidden`</do>
7
+ <do>View-transition wipe for Overlay reveal: CSS class with `view-transition-name: skeleton-overlay` on the shell wrapping skeleton+loaded content (not inline style)</do>
8
+ <do>Static decorative chrome: `animate={false}` when pulse would compete with empty-state or backdrop art</do>
9
+ <dont>Using Skeleton for inline loading copy — prefer Shimmer inside Text / Title</dont>
10
+ <dont>Putting `aria-busy` on Skeleton / Overlay instead of the surrounding loading region</dont>
11
+ <dont>Using `Skeleton.Overlay` without real children that define the measure box</dont>
12
+ <dont>Expecting view-transition wipe without wrapper `view-transition-name: skeleton-overlay`</dont>
13
+ <dont>Inventing flex / gap / equal-width CSS for placeholder stacks when Stack props cover it</dont>
10
14
  </usage>
@@ -1,7 +1,115 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <patterns surface="slider">
3
- <example title="Slider structure">
4
- <tsx><![CDATA[<Slider />]]></tsx>
5
- <notes>Public assembly hint from legacy guide; not API authority.</notes>
3
+ <!-- Sources: viraui-app / design-kitchen preview-grid — cleaned (no handlers, no app chrome CSS). -->
4
+
5
+ <example title="Labeled amount with captions">
6
+ <tsx><![CDATA[
7
+ <Stack rowGap="m">
8
+ <Slider label="Minimum Payout Amount" min={50} max={10000} step={50} value={2500} renderValue />
9
+ <Stack columnGap="s" direction="row" hAlign="space-between" vAlign="center">
10
+ <Text family="mono" size="xs" tone="muted">
11
+ $50 (MIN)
12
+ </Text>
13
+ <Text family="mono" size="xs" tone="muted">
14
+ $10,000 (MAX)
15
+ </Text>
16
+ </Stack>
17
+ </Stack>
18
+ ]]></tsx>
19
+ <notes>From `editor/preview-grid/blocks/payout-threshold`. Field `label` + `renderValue` (true or custom formatter). Min/max captions are sibling Text — not track CSS.</notes>
20
+ </example>
21
+
22
+ <example title="External label row">
23
+ <tsx><![CDATA[
24
+ <Surface color={2} radius="l" hPadding="m" vPadding="m">
25
+ <Stack columnGap="m" direction="row" vAlign="center" expandChildren>
26
+ <Stack data-grow={false} minWidth="13ch" direction="row" columnGap="s" vAlign="center">
27
+ <Sun size={16} />
28
+ <Text weight="semibold" whiteSpace="nowrap">
29
+ Brightness
30
+ </Text>
31
+ </Stack>
32
+ <Slider
33
+ aria-label="Kitchen island brightness"
34
+ max={100}
35
+ min={0}
36
+ thumbAriaLabel="Kitchen island brightness"
37
+ value={86}
38
+ />
39
+ </Stack>
40
+ </Surface>
41
+ ]]></tsx>
42
+ <notes>From `editor/preview-grid/blocks/kitchen-island`. Visible label lives outside Slider; pass `aria-label` / `thumbAriaLabel` so the thumb stays named. `expandChildren` grows the track.</notes>
43
+ </example>
44
+
45
+ <example title="Bracketed continuum">
46
+ <tsx><![CDATA[
47
+ <Stack columnGap="l" direction="row" vAlign="center">
48
+ <Text family="mono" size="xs" data-shrink={false} tone="muted">
49
+ OPEN
50
+ </Text>
51
+ <Slider
52
+ aria-label="Living room roller shades"
53
+ max={100}
54
+ min={0}
55
+ thumbAriaLabel="Living room roller shades"
56
+ value={50}
57
+ />
58
+ <Text family="mono" size="xs" data-shrink={false} tone="muted">
59
+ CLOSE
60
+ </Text>
61
+ </Stack>
62
+ ]]></tsx>
63
+ <notes>From `editor/preview-grid/blocks/roller-shades`. Endcaps via Text + `data-shrink={false}` — Slider fills the middle. Drop the decorative shade preview from this hint.</notes>
64
+ </example>
65
+
66
+ <example title="Vertical band">
67
+ <tsx><![CDATA[
68
+ <Stack hAlign="center" rowGap="s" style={{ blockSize: '11rem' }}>
69
+ <Slider
70
+ aria-label="1K hertz band"
71
+ max={100}
72
+ min={0}
73
+ orientation="vertical"
74
+ thumbAriaLabel="1K hertz band"
75
+ value={50}
76
+ renderValue
77
+ />
78
+ <Text align="center" family="mono" size="xs" tone="muted">
79
+ 1K
80
+ </Text>
81
+ </Stack>
82
+ ]]></tsx>
83
+ <notes>From `editor/preview-grid/blocks/equalizer`. Vertical Slider needs a sized host (`blockSize` / flex grow). Band label is sibling Text. App wave-linking across bands is product logic — not part of the pattern.</notes>
84
+ </example>
85
+
86
+ <example title="Label + custom renderValue">
87
+ <tsx><![CDATA[
88
+ <Stack direction="row" columnGap="s" vAlign="end" expandChildren>
89
+ <Slider
90
+ label="Root size"
91
+ renderValue={(_formatted, values) => (
92
+ <Text size="xs" tone="muted">
93
+ {Math.round(((values[0] ?? 100) / 100) * 16)}px
94
+ </Text>
95
+ )}
96
+ min={87.5}
97
+ max={112.5}
98
+ step={6.25}
99
+ value={100}
100
+ />
101
+ </Stack>
102
+ ]]></tsx>
103
+ <notes>From `editor/controls/font-root-size` (+ hue-mode axes in `common/color-picker`). `renderValue` as a function owns the value slot (no default Text wrapper). Pair with trailing chrome (e.g. ShuffleLockToggle) via row Stack when needed.</notes>
104
+ </example>
105
+
106
+ <example title="Hue axis pair">
107
+ <tsx><![CDATA[
108
+ <Stack rowGap="m">
109
+ <Slider label="Saturation" renderValue min={0} max={10} step={1} value={5} thumbAriaLabel="Saturation" />
110
+ <Slider label="Contrast" renderValue min={0.5} max={1.5} step={0.05} value={1} thumbAriaLabel="Contrast" />
111
+ </Stack>
112
+ ]]></tsx>
113
+ <notes>From `common/color-picker` hue mode. Stacked labeled Sliders with `renderValue` / `thumbAriaLabel`. Drop ColorArea / HueSlider (chromakit) from this hint.</notes>
6
114
  </example>
7
115
  </patterns>
@@ -27,19 +27,19 @@
27
27
  <prop name="thumbAriaLabel" kind="react">
28
28
  <description>Accessible name for the thumb when `label` is omitted. Pass a string to name the first thumb (single-thumb slider, or the minimum thumb on a range). Pass a two-element tuple to name each range thumb in order; on a single-thumb slider only the first tuple value is applied.</description>
29
29
  </prop>
30
- <css_var suffix="progress-background">
30
+ <prop name="progress-background" kind="css">
31
31
  <description>Slider filled progress color.</description>
32
- </css_var>
33
- <css_var suffix="thumb-background">
32
+ </prop>
33
+ <prop name="thumb-background" kind="css">
34
34
  <description>Slider thumb fill color.</description>
35
- </css_var>
36
- <css_var suffix="thumb-size">
35
+ </prop>
36
+ <prop name="thumb-size" kind="css">
37
37
  <description>Slider thumb size.</description>
38
- </css_var>
39
- <css_var suffix="track-background">
38
+ </prop>
39
+ <prop name="track-background" kind="css">
40
40
  <description>Slider track background color.</description>
41
- </css_var>
42
- <css_var suffix="track-size">
41
+ </prop>
42
+ <prop name="track-size" kind="css">
43
43
  <description>Slider track thickness.</description>
44
- </css_var>
44
+ </prop>
45
45
  </props>