@viraui/react 2026.6.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.
- package/dist/catalog.json +5 -5
- package/dist/components/stack/stack.d.ts +4 -1
- package/dist/components/tabs/tabs.css +1 -1
- package/dist/components/text/text.css +1 -1
- package/dist/components/text/text.d.ts +12 -2
- package/dist/components/text/text.js +2 -1
- package/dist/components/textfield/textfield.d.ts +1 -0
- package/dist/components/title/title.css +1 -1
- package/dist/components/title/title.d.ts +12 -2
- package/dist/components/title/title.js +2 -1
- package/dist/specs/PROTOCOL.md +1 -1
- package/dist/specs/activity-hints.xml +18 -3
- package/dist/specs/components/accordion/patterns.xml +69 -5
- package/dist/specs/components/accordion/props.xml +4 -4
- package/dist/specs/components/accordion/usage.xml +8 -4
- package/dist/specs/components/annotate/patterns.xml +50 -3
- package/dist/specs/components/annotate/props.xml +22 -22
- package/dist/specs/components/annotate/usage.xml +7 -6
- package/dist/specs/components/autocomplete/patterns.xml +123 -7
- package/dist/specs/components/autocomplete/props.xml +14 -14
- package/dist/specs/components/autocomplete/usage.xml +11 -6
- package/dist/specs/components/avatar/patterns.xml +78 -3
- package/dist/specs/components/avatar/props.xml +8 -8
- package/dist/specs/components/avatar/usage.xml +9 -3
- package/dist/specs/components/avatar-group/patterns.xml +65 -3
- package/dist/specs/components/avatar-group/props.xml +8 -8
- package/dist/specs/components/avatar-group/usage.xml +10 -7
- package/dist/specs/components/badge/patterns.xml +57 -3
- package/dist/specs/components/badge/props.xml +8 -8
- package/dist/specs/components/badge/usage.xml +5 -3
- package/dist/specs/components/beam/meta.xml +1 -1
- package/dist/specs/components/beam/patterns.xml +68 -3
- package/dist/specs/components/beam/props.xml +22 -22
- package/dist/specs/components/beam/usage.xml +7 -7
- package/dist/specs/components/bleed/patterns.xml +54 -3
- package/dist/specs/components/bleed/props.xml +2 -2
- package/dist/specs/components/bleed/usage.xml +6 -3
- package/dist/specs/components/breakpoints/meta.xml +1 -1
- package/dist/specs/components/breakpoints/patterns.xml +1 -6
- package/dist/specs/components/breakpoints/props.xml +4 -2
- package/dist/specs/components/breakpoints/usage.xml +10 -2
- package/dist/specs/components/button/patterns.xml +124 -6
- package/dist/specs/components/button/props.xml +33 -32
- package/dist/specs/components/button/usage.xml +13 -13
- package/dist/specs/components/checkbox/patterns.xml +83 -3
- package/dist/specs/components/checkbox/props.xml +10 -10
- package/dist/specs/components/checkbox/usage.xml +11 -6
- package/dist/specs/components/chip/patterns.xml +74 -3
- package/dist/specs/components/chip/props.xml +14 -14
- package/dist/specs/components/chip/usage.xml +10 -6
- package/dist/specs/components/clamp-text/patterns.xml +1 -4
- package/dist/specs/components/clamp-text/props.xml +2 -2
- package/dist/specs/components/clamp-text/usage.xml +8 -5
- package/dist/specs/components/dialog/patterns.xml +136 -15
- package/dist/specs/components/dialog/props.xml +2 -2
- package/dist/specs/components/dialog/usage.xml +9 -7
- package/dist/specs/components/elevator/patterns.xml +54 -3
- package/dist/specs/components/elevator/usage.xml +8 -5
- package/dist/specs/components/fieldset/patterns.xml +97 -3
- package/dist/specs/components/fieldset/usage.xml +7 -5
- package/dist/specs/components/fit-text/patterns.xml +1 -4
- package/dist/specs/components/fit-text/props.xml +2 -2
- package/dist/specs/components/fit-text/usage.xml +8 -6
- package/dist/specs/components/glow/meta.xml +1 -1
- package/dist/specs/components/glow/patterns.xml +74 -3
- package/dist/specs/components/glow/props.xml +16 -16
- package/dist/specs/components/glow/usage.xml +8 -7
- package/dist/specs/components/grid/patterns.xml +88 -5
- package/dist/specs/components/grid/props.xml +23 -23
- package/dist/specs/components/grid/usage.xml +9 -5
- package/dist/specs/components/icon-button/patterns.xml +97 -6
- package/dist/specs/components/icon-button/props.xml +32 -32
- package/dist/specs/components/icon-button/usage.xml +11 -9
- package/dist/specs/components/linear-progress/patterns.xml +58 -3
- package/dist/specs/components/linear-progress/props.xml +6 -6
- package/dist/specs/components/linear-progress/usage.xml +9 -8
- package/dist/specs/components/masonry/patterns.xml +68 -5
- package/dist/specs/components/masonry/props.xml +2 -2
- package/dist/specs/components/masonry/usage.xml +9 -4
- package/dist/specs/components/menu/patterns.xml +179 -15
- package/dist/specs/components/menu/usage.xml +8 -7
- package/dist/specs/components/meter/patterns.xml +49 -3
- package/dist/specs/components/meter/props.xml +6 -6
- package/dist/specs/components/meter/usage.xml +10 -7
- package/dist/specs/components/popover/patterns.xml +118 -9
- package/dist/specs/components/popover/props.xml +2 -2
- package/dist/specs/components/popover/usage.xml +9 -8
- package/dist/specs/components/progressive-blur/meta.xml +1 -1
- package/dist/specs/components/progressive-blur/patterns.xml +1 -4
- package/dist/specs/components/progressive-blur/props.xml +2 -2
- package/dist/specs/components/progressive-blur/usage.xml +7 -6
- package/dist/specs/components/radio/patterns.xml +55 -5
- package/dist/specs/components/radio/props.xml +8 -8
- package/dist/specs/components/radio/usage.xml +9 -6
- package/dist/specs/components/select/patterns.xml +124 -8
- package/dist/specs/components/select/props.xml +18 -18
- package/dist/specs/components/select/usage.xml +11 -10
- package/dist/specs/components/separator/patterns.xml +121 -3
- package/dist/specs/components/separator/props.xml +4 -4
- package/dist/specs/components/separator/usage.xml +8 -5
- package/dist/specs/components/shimmer/patterns.xml +23 -3
- package/dist/specs/components/shimmer/props.xml +8 -8
- package/dist/specs/components/shimmer/usage.xml +7 -5
- package/dist/specs/components/skeleton/patterns.xml +172 -4
- package/dist/specs/components/skeleton/props.xml +14 -14
- package/dist/specs/components/skeleton/usage.xml +11 -7
- package/dist/specs/components/slider/patterns.xml +111 -3
- package/dist/specs/components/slider/props.xml +10 -10
- package/dist/specs/components/slider/usage.xml +11 -5
- package/dist/specs/components/spinner/patterns.xml +35 -3
- package/dist/specs/components/spinner/props.xml +2 -2
- package/dist/specs/components/spinner/usage.xml +8 -5
- package/dist/specs/components/stack/patterns.xml +359 -3
- package/dist/specs/components/stack/props.xml +24 -22
- package/dist/specs/components/stack/usage.xml +16 -10
- package/dist/specs/components/static-noise/meta.xml +1 -1
- package/dist/specs/components/static-noise/patterns.xml +20 -3
- package/dist/specs/components/static-noise/usage.xml +5 -5
- package/dist/specs/components/surface/patterns.xml +188 -3
- package/dist/specs/components/surface/props.xml +26 -26
- package/dist/specs/components/surface/usage.xml +15 -12
- package/dist/specs/components/switch/patterns.xml +73 -3
- package/dist/specs/components/switch/props.xml +12 -12
- package/dist/specs/components/switch/usage.xml +10 -5
- package/dist/specs/components/tabs/patterns.xml +111 -6
- package/dist/specs/components/tabs/props.xml +2 -2
- package/dist/specs/components/tabs/usage.xml +7 -3
- package/dist/specs/components/text/patterns.xml +97 -3
- package/dist/specs/components/text/props.xml +48 -43
- package/dist/specs/components/text/usage.xml +11 -4
- package/dist/specs/components/textarea/patterns.xml +49 -3
- package/dist/specs/components/textarea/props.xml +7 -6
- package/dist/specs/components/textarea/usage.xml +8 -5
- package/dist/specs/components/textfield/patterns.xml +163 -3
- package/dist/specs/components/textfield/props.xml +12 -11
- package/dist/specs/components/textfield/usage.xml +9 -3
- package/dist/specs/components/title/patterns.xml +74 -3
- package/dist/specs/components/title/props.xml +48 -43
- package/dist/specs/components/title/usage.xml +10 -7
- package/dist/specs/components/toast/patterns.xml +85 -8
- package/dist/specs/components/toast/usage.xml +8 -5
- package/dist/specs/components/toggle-button/patterns.xml +101 -3
- package/dist/specs/components/toggle-button/props.xml +16 -16
- package/dist/specs/components/toggle-button/usage.xml +9 -5
- package/dist/specs/components/toggle-group/patterns.xml +34 -5
- package/dist/specs/components/toggle-group/usage.xml +9 -5
- package/dist/specs/components/tooltip/patterns.xml +110 -6
- package/dist/specs/components/tooltip/props.xml +2 -2
- package/dist/specs/components/tooltip/usage.xml +8 -5
- package/dist/specs/components/typewriter/patterns.xml +18 -3
- package/dist/specs/components/typewriter/props.xml +2 -2
- package/dist/specs/components/typewriter/usage.xml +9 -8
- package/dist/specs/foundation/attributes.xml +67 -37
- package/dist/specs/foundation/bootstrap.xml +6 -6
- package/dist/specs/foundation/elevation.xml +51 -3
- package/dist/specs/foundation/modules.xml +117 -40
- package/dist/specs/foundation/theme-topics.xml +62 -27
- package/dist/specs/foundation/toggles.xml +2 -2
- package/dist/specs/index.xml +42 -6
- package/dist/specs/patterns/card-grid.xml +35 -0
- package/dist/specs/patterns/compose-layout-first.xml +32 -0
- package/dist/specs/patterns/equal-width-actions.xml +22 -0
- package/dist/specs/patterns/page-chrome.xml +34 -0
- package/dist/specs/patterns/settings-panel.xml +30 -0
- package/dist/specs/patterns/settings-row.xml +9 -7
- package/dist/specs/patterns/stack-as-surface.xml +37 -0
- package/package.json +2 -2
package/dist/catalog.json
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
{
|
|
42
42
|
"id": "beam",
|
|
43
43
|
"name": "Beam",
|
|
44
|
-
"summary": "Decorative animated border, line, or pulse glow on a transparent Surface shell (radius only). Put the visual card as children. CSS-module geometry plus shared ~30fps pulse rAF for pulse variants. Memory/CPU
|
|
44
|
+
"summary": "Decorative animated border, line, or pulse glow on a transparent Surface shell (radius only). Put the visual card as children. CSS-module geometry plus shared ~30fps pulse rAF for pulse variants. Memory/CPU-heavy — use sparingly; prefer one focal instance per view.",
|
|
45
45
|
"agentDocs": "./specs/components/beam/meta.xml"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
{
|
|
54
54
|
"id": "breakpoints",
|
|
55
55
|
"name": "BreakpointsProvider",
|
|
56
|
-
"summary": "Client provider plus `useBreakpoints` for mobile-first viewport min-width matches. Defaults are hardcoded em thresholds, not theme tokens.",
|
|
56
|
+
"summary": "Client provider plus `useBreakpoints` for mobile-first viewport min-width matches. Defaults are hardcoded em thresholds, not theme tokens. Style-only CSS should reuse the same map lengths.",
|
|
57
57
|
"agentDocs": "./specs/components/breakpoints/meta.xml"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
{
|
|
108
108
|
"id": "glow",
|
|
109
109
|
"name": "Glow",
|
|
110
|
-
"summary": "Decorative pointer-driven border highlight on a transparent Surface shell (radius only). Put the visual card as children; a shared rAF tracker paints CSS variables without React re-renders. Memory-heavy — use sparingly
|
|
110
|
+
"summary": "Decorative pointer-driven border highlight on a transparent Surface shell (radius only). Put the visual card as children; a shared rAF tracker paints CSS variables without React re-renders. Memory/CPU-heavy — use sparingly; prefer one focal instance per view.",
|
|
111
111
|
"agentDocs": "./specs/components/glow/meta.xml"
|
|
112
112
|
},
|
|
113
113
|
{
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
{
|
|
156
156
|
"id": "progressive-blur",
|
|
157
157
|
"name": "ProgressiveBlur",
|
|
158
|
-
"summary": "Decorative stacked backdrop-filter overlay that ramps blur from one edge toward the opposite edge.",
|
|
158
|
+
"summary": "Decorative stacked backdrop-filter overlay that ramps blur from one edge toward the opposite edge. GPU/memory-heavy — use sparingly; prefer one focal instance per view.",
|
|
159
159
|
"agentDocs": "./specs/components/progressive-blur/meta.xml"
|
|
160
160
|
},
|
|
161
161
|
{
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
{
|
|
210
210
|
"id": "static-noise",
|
|
211
211
|
"name": "StaticNoise",
|
|
212
|
-
"summary": "Decorative SVG turbulence noise overlay for textured surfaces and hero sections. Memory-heavy — use sparingly
|
|
212
|
+
"summary": "Decorative SVG turbulence noise overlay for textured surfaces and hero sections. Memory-heavy — use sparingly; prefer one focal instance per view.",
|
|
213
213
|
"agentDocs": "./specs/components/static-noise/meta.xml"
|
|
214
214
|
},
|
|
215
215
|
{
|
|
@@ -46,8 +46,9 @@ export type StackProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
|
46
46
|
/**
|
|
47
47
|
* Makes direct children grow along the flex main axis (`flex-grow`).
|
|
48
48
|
*
|
|
49
|
+
* Prefer for equal-width row actions instead of inventing width/flex CSS on each child.
|
|
49
50
|
* Does not set the stack root's own inline size — use `fullWidth` when this stack must
|
|
50
|
-
* fill its parent width (e.g. centered shell with `maxWidth
|
|
51
|
+
* fill its parent width (e.g. centered shell with `maxWidth`, or a full-bleed Button column).
|
|
51
52
|
*
|
|
52
53
|
* @default false
|
|
53
54
|
*/
|
|
@@ -55,6 +56,8 @@ export type StackProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
|
55
56
|
/**
|
|
56
57
|
* Sets `inline-size: 100%` on the stack root so it fills the parent's inline size.
|
|
57
58
|
*
|
|
59
|
+
* Prefer this (with cross-axis stretch) so content-sized children like Button span a panel —
|
|
60
|
+
* do not add `width: 100%` CSS on those children.
|
|
58
61
|
* Use with `maxWidth` under a parent `hAlign="center"` for a fluid, capped, centered shell.
|
|
59
62
|
* Orthogonal to `expandChildren` (self size vs children grow).
|
|
60
63
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-tabs-translate-amount{syntax:"<length>";inherits:true;initial-value:10px}.viraui__tabs-module__Tabs_AwbZZ{min-block-size:10rem}.viraui__tabs-module__Viewport_15X1I{display:grid;grid-template-columns:minmax(0,1fr);inline-size:100%}.viraui__tabs-module__Panel_vkCFI{grid-area:1/1;inline-size:100%;opacity:1;translate:0 0;transition:opacity var(--duration-fast) var(--easing-entrance),translate var(--duration-fast) var(--easing-entrance);&[data-ending-style]{pointer-events:none}&[data-ending-style],&[data-starting-style]{opacity:0}&[data-activation-direction=right][data-starting-style]{translate:var(--vui-tabs-translate-amount) 0}&[data-activation-direction=left][data-starting-style],&[data-activation-direction=right][data-ending-style]{translate:calc(var(--vui-tabs-translate-amount) * -1) 0}&[data-activation-direction=left][data-ending-style]{translate:var(--vui-tabs-translate-amount) 0}&[data-activation-direction=none][data-ending-style],&[data-activation-direction=none][data-starting-style]{translate:0 var(--vui-tabs-translate-amount)}&[hidden]{display:none}@media (prefers-reduced-motion:reduce){&[data-ending-style],&[data-starting-style]{opacity:1;translate:0 0}}}}@layer viraui.overrides{.viraui__tabs-module__List_XJorr{position:relative;max-inline-size:100%;overflow-x:auto;overflow-y:clip}.viraui__tabs-module__Track_Fet4f{display:inline-flex;min-inline-size:100%;box-sizing:border-box;padding-inline:var(--space-2xs)}.viraui__tabs-module__Indicator_UyNUn{position:absolute;pointer-events:none;inset-block-start:0;
|
|
1
|
+
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-tabs-translate-amount{syntax:"<length>";inherits:true;initial-value:10px}.viraui__tabs-module__Tabs_AwbZZ{min-block-size:10rem}.viraui__tabs-module__Viewport_15X1I{display:grid;grid-template-columns:minmax(0,1fr);inline-size:100%}.viraui__tabs-module__Panel_vkCFI{grid-area:1/1;inline-size:100%;opacity:1;translate:0 0;transition:opacity var(--duration-fast) var(--easing-entrance),translate var(--duration-fast) var(--easing-entrance);&[data-ending-style]{pointer-events:none}&[data-ending-style],&[data-starting-style]{opacity:0}&[data-activation-direction=right][data-starting-style]{translate:var(--vui-tabs-translate-amount) 0}&[data-activation-direction=left][data-starting-style],&[data-activation-direction=right][data-ending-style]{translate:calc(var(--vui-tabs-translate-amount) * -1) 0}&[data-activation-direction=left][data-ending-style]{translate:var(--vui-tabs-translate-amount) 0}&[data-activation-direction=none][data-ending-style],&[data-activation-direction=none][data-starting-style]{translate:0 var(--vui-tabs-translate-amount)}&[hidden]{display:none}@media (prefers-reduced-motion:reduce){&[data-ending-style],&[data-starting-style]{opacity:1;translate:0 0}}}}@layer viraui.overrides{.viraui__tabs-module__List_XJorr{position:relative;max-inline-size:100%;overflow-x:auto;overflow-y:clip}.viraui__tabs-module__Track_Fet4f{display:inline-flex;min-inline-size:100%;box-sizing:border-box;padding-inline:var(--space-2xs)}.viraui__tabs-module__Indicator_UyNUn{position:absolute;pointer-events:none;inset-block-start:0;left:0;inline-size:var(--active-tab-width);block-size:round(nearest,var(--active-tab-height),2px);translate:var(--active-tab-left) calc(var(--active-tab-top) + (var(--active-tab-height) - round(nearest, var(--active-tab-height), 2px)) / 2);transition:translate var(--duration-fast) var(--easing-standard),inline-size var(--duration-fast) var(--easing-standard),block-size var(--duration-fast) var(--easing-standard)}.viraui__tabs-module__Item_XZ86Z{position:relative;flex-shrink:0;cursor:pointer;flex-basis:0;transition:none;will-change:auto;&[data-variant]:not(:disabled):active{translate:0 0}&:hover{background:#0000}&[data-disabled]{opacity:.5;background:#0000}&[data-active] .viraui__tabs-module__Label_5-8-Y{color:var(--global-foreground)}&:focus-visible{border-radius:var(--radius-s);outline-offset:-2px}}}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
var(--__text-size-min),
|
|
3
3
|
calc(var(--__text-size-min) + (var(--__text-size-max) - var(--__text-size-min)) * var(--__text-fluid)),
|
|
4
4
|
var(--__text-size-max)
|
|
5
|
-
);--vui-text-font-family:var(--font-family-body);--vui-text-line-height:var(--font-leading-m);margin:0;max-inline-size:var(--vui-text-max-width);font-family:var(--vui-text-font-family);font-size:var(--vui-text-font-size);line-height:var(--vui-text-line-height);text-align:var(--vui-text-align);letter-spacing:var(--vui-text-letter-spacing);text-transform:var(--vui-text-text-transform);white-space:var(--vui-text-white-space);word-break:break-word;font-weight:var(--vui-text-font-weight);font-stretch:calc(var(--vui-text-font-width) * 1%);font-optical-sizing:auto;font-variation-settings:"wght" var(--vui-text-font-weight),"wdth" var(--vui-text-font-width),"opsz" var(--vui-text-font-opsz);text-box:var(--vui-text-trim) var(--vui-text-trim-type);&[data-text-balanced=true]{text-wrap:balance}&[data-text-selection=false]{-webkit-user-select:none;user-select:none}&[data-text-has-padding=true]{padding:var(--vui-text-padding-block-start) var(--vui-text-padding-inline-end) var(--vui-text-padding-block-end) var(--vui-text-padding-inline-start)}&[data-text-family=mono]{--vui-text-font-family:var(--font-family-mono)}&[data-text-size="4xl"]{--__text-size-min:var(--font-scale-body-3xl);--__text-size-max:var(--font-scale-body-4xl)}&[data-text-size="3xl"]{--__text-size-min:var(--font-scale-body-2xl);--__text-size-max:var(--font-scale-body-3xl)}&[data-text-size="2xl"]{--__text-size-min:var(--font-scale-body-xl);--__text-size-max:var(--font-scale-body-2xl)}&[data-text-size=xl]{--__text-size-min:var(--font-scale-body-l);--__text-size-max:var(--font-scale-body-xl)}&[data-text-size=l]{--__text-size-min:var(--font-scale-body-m);--__text-size-max:var(--font-scale-body-l)}&[data-text-size=s]{--__text-size-
|
|
5
|
+
);--vui-text-font-family:var(--font-family-body);--vui-text-line-height:var(--font-leading-m);margin:0;max-inline-size:var(--vui-text-max-width);font-family:var(--vui-text-font-family);font-size:var(--vui-text-font-size);line-height:var(--vui-text-line-height);text-align:var(--vui-text-align);letter-spacing:var(--vui-text-letter-spacing);text-transform:var(--vui-text-text-transform);white-space:var(--vui-text-white-space);word-break:break-word;font-weight:var(--vui-text-font-weight);font-stretch:calc(var(--vui-text-font-width) * 1%);font-optical-sizing:auto;font-variation-settings:"wght" var(--vui-text-font-weight),"wdth" var(--vui-text-font-width),"opsz" var(--vui-text-font-opsz);text-box:var(--vui-text-trim) var(--vui-text-trim-type);&[data-text-balanced=true]{text-wrap:balance}&[data-text-selection=false]{-webkit-user-select:none;user-select:none}&[data-text-has-padding=true]{padding:var(--vui-text-padding-block-start) var(--vui-text-padding-inline-end) var(--vui-text-padding-block-end) var(--vui-text-padding-inline-start)}&[data-text-family=mono]{--vui-text-font-family:var(--font-family-mono)}&[data-text-size="4xl"]{--__text-size-min:var(--font-scale-body-3xl);--__text-size-max:var(--font-scale-body-4xl)}&[data-text-size="3xl"]{--__text-size-min:var(--font-scale-body-2xl);--__text-size-max:var(--font-scale-body-3xl)}&[data-text-size="2xl"]{--__text-size-min:var(--font-scale-body-xl);--__text-size-max:var(--font-scale-body-2xl)}&[data-text-size=xl]{--__text-size-min:var(--font-scale-body-l);--__text-size-max:var(--font-scale-body-xl)}&[data-text-size=l]{--__text-size-min:var(--font-scale-body-m);--__text-size-max:var(--font-scale-body-l)}&[data-text-size=s]{--__text-size-max:var(--font-scale-body-s)}&[data-text-size=s],&[data-text-size=xs]{--__text-size-min:var(--font-scale-body-xs)}&[data-text-size=xs]{--__text-size-max:var(--font-scale-body-xs)}&[data-text-fluid=false]{--vui-text-font-size:var(--__text-size-max)}@container root style(--effect-fluid-typography: initial){--vui-text-font-size:var(--__text-size-max)}&[data-text-weight=light]{--vui-text-font-weight:200}&[data-text-weight=semibold]{--vui-text-font-weight:600}&[data-text-weight=bold]{--vui-text-font-weight:800}&[data-text-tone=primary]{color:var(--global-primary)}&[data-text-tone=muted]{color:var(--global-muted)}&[data-text-tone=interactive]{color:var(--global-interactive-text)}&[data-text-tone=positive]{color:var(--highlight-green)}&[data-text-tone=informative]{color:var(--highlight-blue)}&[data-text-tone=danger]{color:var(--highlight-red)}&[data-text-tone=warning]{color:var(--highlight-yellow)}&[data-text-has-literal-color=true]{color:var(--vui-text-literal-color)}&[data-text-line-height=none]{--vui-text-line-height:0}&[data-text-line-height=xs]{--vui-text-line-height:var(--font-leading-xs)}&[data-text-line-height=s]{--vui-text-line-height:var(--font-leading-s)}&[data-text-line-height=m]{--vui-text-line-height:var(--font-leading-m)}&[data-text-line-height=l]{--vui-text-line-height:var(--font-leading-l)}}}
|
|
@@ -83,13 +83,15 @@ export type TextProps = React.ComponentPropsWithoutRef<'span'> & {
|
|
|
83
83
|
*/
|
|
84
84
|
whiteSpace?: React.CSSProperties['whiteSpace'];
|
|
85
85
|
/**
|
|
86
|
-
* Sets letter
|
|
86
|
+
* Sets letter-spacing on the rendered copy. Prefer this prop over CSS
|
|
87
|
+
* `letter-spacing` on the same Text root.
|
|
87
88
|
*
|
|
88
89
|
* @default No letter-spacing override.
|
|
89
90
|
*/
|
|
90
91
|
tracking?: React.CSSProperties['letterSpacing'];
|
|
91
92
|
/**
|
|
92
|
-
* Applies
|
|
93
|
+
* Applies `text-transform` on the rendered copy. Prefer this prop over CSS
|
|
94
|
+
* `text-transform` on the same Text root.
|
|
93
95
|
*
|
|
94
96
|
* @default No text-transform override.
|
|
95
97
|
*/
|
|
@@ -143,6 +145,14 @@ export type TextProps = React.ComponentPropsWithoutRef<'span'> & {
|
|
|
143
145
|
* @default No optical size override.
|
|
144
146
|
*/
|
|
145
147
|
opticalSize?: number;
|
|
148
|
+
/**
|
|
149
|
+
* Enables viewport fluid clamp sizing for this instance.
|
|
150
|
+
* Default locks at this size’s `--font-scale-body-*` token (UI chrome stays stable).
|
|
151
|
+
* Pass `true` for fluid page/body copy. Theme `--effect-fluid-typography: initial` still locks all Text globally.
|
|
152
|
+
*
|
|
153
|
+
* @default false
|
|
154
|
+
*/
|
|
155
|
+
fluid?: boolean;
|
|
146
156
|
};
|
|
147
157
|
export declare const Text: React.FC<TextProps>;
|
|
148
158
|
export {};
|
|
@@ -4,7 +4,7 @@ import { resolveAxisPadding } from "../../core/styles/resolve-axis-padding.js";
|
|
|
4
4
|
import text_module_default from "./text.module.js";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
//#region src/components/text/text.tsx
|
|
7
|
-
var Text = ({ align = "start", balanced = false, selection = true, className, color, family = "body", fontWidth, hPadding, lineHeight = "m", maxWidth, opticalSize, ref, render, size = "m", style, tone, tracking, transform, trim = "both", trimType = "cap alphabetic", vPadding, weight = "regular", whiteSpace = "normal", ...otherProps }) => {
|
|
7
|
+
var Text = ({ align = "start", balanced = false, selection = true, className, color, family = "body", fluid = false, fontWidth, hPadding, lineHeight = "m", maxWidth, opticalSize, ref, render, size = "m", style, tone, tracking, transform, trim = "both", trimType = "cap alphabetic", vPadding, weight = "regular", whiteSpace = "normal", ...otherProps }) => {
|
|
8
8
|
const hasPadding = Boolean(hPadding || vPadding);
|
|
9
9
|
const dynamicStyle = {
|
|
10
10
|
"--vui-text-align": align,
|
|
@@ -35,6 +35,7 @@ var Text = ({ align = "start", balanced = false, selection = true, className, co
|
|
|
35
35
|
"data-text-line-height": lineHeight,
|
|
36
36
|
"data-text-balanced": balanced ? "true" : "false",
|
|
37
37
|
"data-text-selection": selection ? "true" : "false",
|
|
38
|
+
"data-text-fluid": fluid ? "true" : "false",
|
|
38
39
|
"data-text-has-padding": hasPadding ? "true" : "false",
|
|
39
40
|
"data-text-has-literal-color": color ? "true" : "false",
|
|
40
41
|
className: clsx(text_module_default.Text, className),
|
|
@@ -53,6 +53,7 @@ export type TextfieldProps = PrimitiveInput.Props & FieldRoot.Props & {
|
|
|
53
53
|
fitContent?: BasicInputProps['fitContent'];
|
|
54
54
|
/**
|
|
55
55
|
* When `true`, root and control group take `inline-size: 100%`.
|
|
56
|
+
* Prefer this prop over CSS `width: 100%` / `w-full` on the Textfield root.
|
|
56
57
|
*
|
|
57
58
|
* @default false
|
|
58
59
|
*/
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
var(--__title-size-min),
|
|
3
3
|
calc(var(--__title-size-min) + (var(--__title-size-max) - var(--__title-size-min)) * var(--__title-fluid)),
|
|
4
4
|
var(--__title-size-max)
|
|
5
|
-
);--vui-title-font-family:var(--font-family-heading);--vui-title-line-height:var(--font-leading-m);--__title-letter-spacing:-0.03em;margin:0;max-inline-size:var(--vui-title-max-width);font-family:var(--vui-title-font-family);font-size:var(--vui-title-font-size);line-height:var(--vui-title-line-height);letter-spacing:var(--__title-letter-spacing);text-transform:var(--vui-title-text-transform);text-align:var(--vui-title-align);white-space:var(--vui-title-white-space);word-break:break-word;font-weight:var(--vui-title-font-weight);font-stretch:calc(var(--vui-title-font-width) * 1%);font-optical-sizing:auto;font-variation-settings:"wght" var(--vui-title-font-weight),"wdth" var(--vui-title-font-width),"opsz" var(--vui-title-font-opsz);text-box:var(--vui-title-trim) var(--vui-title-trim-type);display:inline-flex;&[data-title-has-tracking=true]{letter-spacing:var(--vui-title-letter-spacing)}&[data-title-balanced=true]{text-wrap:balance}&[data-title-selection=false]{-webkit-user-select:none;user-select:none}&[data-title-has-padding=true]{padding:var(--vui-title-padding-block-start) var(--vui-title-padding-inline-end) var(--vui-title-padding-block-end) var(--vui-title-padding-inline-start)}&[data-title-size=display]{--__title-size-min:var(--font-scale-h1);--__title-size-max:var(--font-scale-display)}&[data-title-size="2"]{--__title-size-min:var(--font-scale-h3);--__title-size-max:var(--font-scale-h2)}&[data-title-size="3"]{--__title-size-min:var(--font-scale-h4);--__title-size-max:var(--font-scale-h3)}&[data-title-size="4"]{--__title-size-min:var(--font-scale-h5);--__title-size-max:var(--font-scale-h4)}&[data-title-size="5"]{--__title-size-min:var(--font-scale-h6);--__title-size-max:var(--font-scale-h5);--__title-letter-spacing:-0.02em}&[data-title-size="6"]{--__title-size-min:var(--font-scale-body-m);--__title-size-max:var(--font-scale-h6);--__title-letter-spacing:-0.02em}
|
|
5
|
+
);--vui-title-font-family:var(--font-family-heading);--vui-title-line-height:var(--font-leading-m);--__title-letter-spacing:-0.03em;margin:0;max-inline-size:var(--vui-title-max-width);font-family:var(--vui-title-font-family);font-size:var(--vui-title-font-size);line-height:var(--vui-title-line-height);letter-spacing:var(--__title-letter-spacing);text-transform:var(--vui-title-text-transform);text-align:var(--vui-title-align);white-space:var(--vui-title-white-space);word-break:break-word;font-weight:var(--vui-title-font-weight);font-stretch:calc(var(--vui-title-font-width) * 1%);font-optical-sizing:auto;font-variation-settings:"wght" var(--vui-title-font-weight),"wdth" var(--vui-title-font-width),"opsz" var(--vui-title-font-opsz);text-box:var(--vui-title-trim) var(--vui-title-trim-type);display:inline-flex;&[data-title-has-tracking=true]{letter-spacing:var(--vui-title-letter-spacing)}&[data-title-balanced=true]{text-wrap:balance}&[data-title-selection=false]{-webkit-user-select:none;user-select:none}&[data-title-has-padding=true]{padding:var(--vui-title-padding-block-start) var(--vui-title-padding-inline-end) var(--vui-title-padding-block-end) var(--vui-title-padding-inline-start)}&[data-title-size=display]{--__title-size-min:var(--font-scale-h1);--__title-size-max:var(--font-scale-display)}&[data-title-size="2"]{--__title-size-min:var(--font-scale-h3);--__title-size-max:var(--font-scale-h2)}&[data-title-size="3"]{--__title-size-min:var(--font-scale-h4);--__title-size-max:var(--font-scale-h3)}&[data-title-size="4"]{--__title-size-min:var(--font-scale-h5);--__title-size-max:var(--font-scale-h4)}&[data-title-size="5"]{--__title-size-min:var(--font-scale-h6);--__title-size-max:var(--font-scale-h5);--__title-letter-spacing:-0.02em}&[data-title-size="6"]{--__title-size-min:var(--font-scale-body-m);--__title-size-max:var(--font-scale-h6);--__title-letter-spacing:-0.02em}&[data-title-fluid=false]{--vui-title-font-size:var(--__title-size-max)}@container root style(--effect-fluid-typography: initial){--vui-title-font-size:var(--__title-size-max)}&[data-title-has-literal-color=true]{color:var(--vui-title-literal-color)}&[data-title-line-height=none]{--vui-title-line-height:0}&[data-title-line-height=xs]{--vui-title-line-height:var(--font-leading-xs)}&[data-title-line-height=s]{--vui-title-line-height:var(--font-leading-s)}&[data-title-line-height=m]{--vui-title-line-height:var(--font-leading-m)}&[data-title-line-height=l]{--vui-title-line-height:var(--font-leading-l)}}}
|
|
@@ -72,7 +72,8 @@ export type TitleProps = React.ComponentPropsWithoutRef<'span'> & {
|
|
|
72
72
|
*/
|
|
73
73
|
whiteSpace?: React.CSSProperties['whiteSpace'];
|
|
74
74
|
/**
|
|
75
|
-
* Sets letter
|
|
75
|
+
* Sets letter-spacing on the rendered copy. Prefer this prop over CSS
|
|
76
|
+
* `letter-spacing` on the same Title root.
|
|
76
77
|
*
|
|
77
78
|
* Overrides size preset letter-spacing when set.
|
|
78
79
|
*
|
|
@@ -80,7 +81,8 @@ export type TitleProps = React.ComponentPropsWithoutRef<'span'> & {
|
|
|
80
81
|
*/
|
|
81
82
|
tracking?: React.CSSProperties['letterSpacing'];
|
|
82
83
|
/**
|
|
83
|
-
* Applies
|
|
84
|
+
* Applies `text-transform` on the rendered copy. Prefer this prop over CSS
|
|
85
|
+
* `text-transform` on the same Title root.
|
|
84
86
|
*
|
|
85
87
|
* @default No text-transform override.
|
|
86
88
|
*/
|
|
@@ -134,6 +136,14 @@ export type TitleProps = React.ComponentPropsWithoutRef<'span'> & {
|
|
|
134
136
|
* @default No optical size override.
|
|
135
137
|
*/
|
|
136
138
|
opticalSize?: number;
|
|
139
|
+
/**
|
|
140
|
+
* Enables viewport fluid clamp sizing for this instance.
|
|
141
|
+
* Pass `false` to lock at this size’s `--font-scale-display` / `--font-scale-h*` token.
|
|
142
|
+
* Theme `--effect-fluid-typography: initial` still locks all Title globally.
|
|
143
|
+
*
|
|
144
|
+
* @default true
|
|
145
|
+
*/
|
|
146
|
+
fluid?: boolean;
|
|
137
147
|
};
|
|
138
148
|
export declare const Title: React.FC<TitleProps>;
|
|
139
149
|
export {};
|
|
@@ -4,7 +4,7 @@ import { resolveAxisPadding } from "../../core/styles/resolve-axis-padding.js";
|
|
|
4
4
|
import title_module_default from "./title.module.js";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
//#region src/components/title/title.tsx
|
|
7
|
-
var Title = ({ align = "start", balanced = false, selection = true, className, color, fontWidth, hPadding, size = "1", lineHeight = "m", maxWidth, opticalSize, ref, render, style, tracking, transform, trim = "both", trimType = "cap alphabetic", vPadding, weight, whiteSpace = "normal", ...otherProps }) => {
|
|
7
|
+
var Title = ({ align = "start", balanced = false, selection = true, className, color, fluid = true, fontWidth, hPadding, size = "1", lineHeight = "m", maxWidth, opticalSize, ref, render, style, tracking, transform, trim = "both", trimType = "cap alphabetic", vPadding, weight, whiteSpace = "normal", ...otherProps }) => {
|
|
8
8
|
const hasPadding = Boolean(hPadding || vPadding);
|
|
9
9
|
const hasTracking = tracking !== void 0;
|
|
10
10
|
const dynamicStyle = {
|
|
@@ -33,6 +33,7 @@ var Title = ({ align = "start", balanced = false, selection = true, className, c
|
|
|
33
33
|
"data-title-line-height": lineHeight,
|
|
34
34
|
"data-title-balanced": balanced ? "true" : "false",
|
|
35
35
|
"data-title-selection": selection ? "true" : "false",
|
|
36
|
+
"data-title-fluid": fluid ? "true" : "false",
|
|
36
37
|
"data-title-has-padding": hasPadding ? "true" : "false",
|
|
37
38
|
"data-title-has-literal-color": color ? "true" : "false",
|
|
38
39
|
"data-title-has-tracking": hasTracking ? "true" : "false",
|
package/dist/specs/PROTOCOL.md
CHANGED
|
@@ -28,7 +28,7 @@ Prefer opening via package export / that `dist/specs/` tree. The `version` attri
|
|
|
28
28
|
## Index-first (mandatory)
|
|
29
29
|
|
|
30
30
|
1. Open `index.xml` (specs root) before any component or foundation unit.
|
|
31
|
-
2. Use `activity-hints.xml` for activity → load sequences (`choose-component`, `implement`, `foundation-attrs`, `bootstrap`).
|
|
31
|
+
2. Use `activity-hints.xml` for activity → load sequences (`choose-component`, `implement`, `compose-layout`, `foundation-attrs`, `bootstrap`).
|
|
32
32
|
3. Open only the unit files named for that activity (and the chosen surface), using `href` values from the index (still under the same specs root).
|
|
33
33
|
4. Do **not** parse the full tree of XML unit files. Failure to route is an index or content defect—not a reason to tree-walk or `rg` the package.
|
|
34
34
|
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
<description>Mode, vibrancy, elevation, grow/shrink hooks.</description>
|
|
24
24
|
<load>
|
|
25
25
|
<step open="index.xml" />
|
|
26
|
-
<step open="foundation/attributes.xml" />
|
|
27
|
-
<step open="foundation/elevation.xml" when="elevation on React or raw DOM" />
|
|
26
|
+
<step open="foundation/attributes.xml" when="always" />
|
|
27
|
+
<step open="foundation/elevation.xml" when="elevation/shadows on React or raw DOM" />
|
|
28
28
|
<step open="foundation/toggles.xml" when="effects involved" />
|
|
29
|
-
<step open="foundation/modules.xml" when="
|
|
29
|
+
<step open="foundation/modules.xml" when="which preflight capability owns a behavior or CSS var" />
|
|
30
30
|
</load>
|
|
31
31
|
<forbid>Inventing data-* attributes not listed in foundation units</forbid>
|
|
32
32
|
</activity>
|
|
@@ -39,4 +39,19 @@
|
|
|
39
39
|
</load>
|
|
40
40
|
<forbid>Guessing import paths or inventing provider trees</forbid>
|
|
41
41
|
</activity>
|
|
42
|
+
<activity id="compose-layout">
|
|
43
|
+
<description>Page/section flex, grid, panels — prefer layout primitives and composition over custom CSS.</description>
|
|
44
|
+
<load>
|
|
45
|
+
<step open="index.xml" note="category=pattern + stack/surface/grid/masonry/bleed" />
|
|
46
|
+
<step open="patterns/compose-layout-first.xml" />
|
|
47
|
+
<step open="patterns/stack-as-surface.xml" when="border/fill/radius on a flex cluster" />
|
|
48
|
+
<step open="patterns/page-chrome.xml" when="page shell / semantic tags" />
|
|
49
|
+
<step open="patterns/equal-width-actions.xml" when="full-bleed or equal action rows" />
|
|
50
|
+
<step open="patterns/card-grid.xml" when="CSS grid tracks / card walls" />
|
|
51
|
+
<step open="patterns/settings-panel.xml" when="settings / form panels" />
|
|
52
|
+
<step unit="usage" note="confirm stack/surface/grid (etc.) do/dont after pattern" />
|
|
53
|
+
<step unit="props" note="verify spacing / render / fullWidth names" />
|
|
54
|
+
</load>
|
|
55
|
+
<forbid>Inventing display:flex / display:grid / CSS gap/padding/border chrome when Stack, Grid, Masonry, Bleed, or Surface cover it</forbid>
|
|
56
|
+
</activity>
|
|
42
57
|
</activity_hints>
|
|
@@ -1,9 +1,73 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<patterns surface="accordion">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
<!-- Sources: viraui-app/components — cleaned (no handlers, no i18n, no scroll-box style). Public parts: Accordion + Accordion.Item only. -->
|
|
4
|
+
|
|
5
|
+
<example title="Help FAQ (multiple open)">
|
|
6
|
+
<tsx><![CDATA[
|
|
7
|
+
<Surface overflow="hidden" color={1} border="all" radius="l">
|
|
8
|
+
<Stack rowGap="l">
|
|
9
|
+
<Stack rowGap="l" hPadding="m" vPadding="m">
|
|
10
|
+
<Stack rowGap="xs">
|
|
11
|
+
<Title size="6" render={<h2 />}>
|
|
12
|
+
Payout Help
|
|
13
|
+
</Title>
|
|
14
|
+
<Text size="s" tone="muted">
|
|
15
|
+
Royalty deposits and tax reporting
|
|
16
|
+
</Text>
|
|
17
|
+
</Stack>
|
|
18
|
+
|
|
19
|
+
<Accordion defaultValue={['tax-docs']} multiple>
|
|
20
|
+
<Accordion.Item color={2} border="all" trigger="When do payouts arrive?" value="arrival-timing">
|
|
21
|
+
<Text tone="muted">
|
|
22
|
+
Payouts trigger when your balance crosses the minimum threshold. ACH transfers land in 2–3 business days;
|
|
23
|
+
instant payouts post within minutes for eligible accounts.
|
|
24
|
+
</Text>
|
|
25
|
+
</Accordion.Item>
|
|
26
|
+
<Accordion.Item color={2} border="all" trigger="What fees apply?" value="fees">
|
|
27
|
+
<Text tone="muted">
|
|
28
|
+
Standard ACH deposits are free. Instant payouts carry a 1.5% fee capped at $25 per transfer.
|
|
29
|
+
</Text>
|
|
30
|
+
</Accordion.Item>
|
|
31
|
+
<Accordion.Item color={2} border="all" trigger="Tax documents" value="tax-docs">
|
|
32
|
+
<Text tone="muted">
|
|
33
|
+
Annual 1099 forms publish by January 31. Download prior-year statements from Account Settings.
|
|
34
|
+
</Text>
|
|
35
|
+
</Accordion.Item>
|
|
36
|
+
</Accordion>
|
|
37
|
+
</Stack>
|
|
38
|
+
|
|
39
|
+
<Surface
|
|
40
|
+
render={<Stack direction="row" hAlign="space-between" vAlign="center" />}
|
|
41
|
+
color={2}
|
|
42
|
+
hPadding="l"
|
|
43
|
+
vPadding="m"
|
|
44
|
+
>
|
|
45
|
+
<Button variant="secondary">View all statements</Button>
|
|
46
|
+
<Button>Contact support</Button>
|
|
47
|
+
</Surface>
|
|
48
|
+
</Stack>
|
|
49
|
+
</Surface>
|
|
50
|
+
]]></tsx>
|
|
51
|
+
<notes>From `editor/preview-grid/blocks/payout-help`. Compose via `Accordion.Item` only — no public Header/Trigger/Panel. `multiple` + `defaultValue` from Base UI root. Item `color`/`border` forward to Surface when `useSurface` (default).</notes>
|
|
52
|
+
</example>
|
|
53
|
+
|
|
54
|
+
<example title="Sidebar advanced section">
|
|
55
|
+
<tsx><![CDATA[
|
|
56
|
+
<Accordion>
|
|
57
|
+
<Accordion.Item
|
|
58
|
+
value="advanced"
|
|
59
|
+
trigger="Advanced"
|
|
60
|
+
iconClosed={<CircleWarning />}
|
|
61
|
+
iconOpen={<RouteAlert />}
|
|
62
|
+
color={1}
|
|
63
|
+
radius="m"
|
|
64
|
+
>
|
|
65
|
+
<Stack rowGap="m" vPadding="xs">
|
|
66
|
+
{/* advanced controls */}
|
|
67
|
+
</Stack>
|
|
68
|
+
</Accordion.Item>
|
|
69
|
+
</Accordion>
|
|
70
|
+
]]></tsx>
|
|
71
|
+
<notes>From `editor/sidebar/sidebar` advancedAccordion. Single Item with custom open/closed icons + Surface `color`/`radius`. Drop studio store / section registry chrome.</notes>
|
|
8
72
|
</example>
|
|
9
73
|
</patterns>
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
<prop name="Item.useSurface" kind="react">
|
|
40
40
|
<description>When `true`, wraps the item in `Surface` (optional open-block background via `color`). When `false`, renders without `Surface` so consumers can insert `Separator` between items; island styling is skipped for that item.</description>
|
|
41
41
|
</prop>
|
|
42
|
-
<
|
|
42
|
+
<prop name="island-gap" kind="css">
|
|
43
43
|
<description>Gap between separated Surface islands when islands={true}.</description>
|
|
44
|
-
</
|
|
45
|
-
<
|
|
44
|
+
</prop>
|
|
45
|
+
<prop name="radius" kind="css">
|
|
46
46
|
<description>Corner radius for Surface island block edges when useSurface is true.</description>
|
|
47
|
-
</
|
|
47
|
+
</prop>
|
|
48
48
|
</props>
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<usage surface="accordion">
|
|
3
|
-
<do>Progressive disclosure for
|
|
4
|
-
<do>
|
|
5
|
-
<do>
|
|
6
|
-
<
|
|
3
|
+
<do>Progressive disclosure for FAQ or settings groups in one surface</do>
|
|
4
|
+
<do>Compose only via `Accordion` + `Accordion.Item` — put panel body (Text, Stack of controls, …) as Item children; pass visible label via Item `trigger`</do>
|
|
5
|
+
<do>FAQ chrome: outer Surface + Stack header (Title/Text) + Accordion; Item `color` / `border` / `radius` forward to Surface when `useSurface` (default)</do>
|
|
6
|
+
<do>Separated islands with root `islands`; attached block corners when `islands={false}`</do>
|
|
7
|
+
<do>Insert `Separator` between items when `Item` `useSurface={false}`</do>
|
|
8
|
+
<do>Multiple open sections with root `multiple` (+ `defaultValue` / `value` as needed)</do>
|
|
9
|
+
<dont>Trying to compose separate public `Accordion.Header`, `Accordion.Trigger`, or `Accordion.Panel` exports — those stay inside `Accordion.Item`</dont>
|
|
7
10
|
<dont>Rendering an item without trigger text and without an external aria-label strategy</dont>
|
|
11
|
+
<dont>Using Accordion for primary navigation that should be links, Tabs, or routes</dont>
|
|
8
12
|
</usage>
|
|
@@ -1,7 +1,54 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<patterns surface="annotate">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<!-- Sources: viraui-app/components — cleaned (no handlers, no giant SVG payloads, no swatch layout CSS). -->
|
|
4
|
+
|
|
5
|
+
<example title="QR callout (device pairing)">
|
|
6
|
+
<tsx><![CDATA[
|
|
7
|
+
<Surface border="all" color={1} radius="l" hPadding="m" vPadding="m">
|
|
8
|
+
<Stack rowGap="m" expandChildren>
|
|
9
|
+
<Stack rowGap="m" vAlign="start" hPadding="l" vPadding={['2xl', 'l']} hAlign="center">
|
|
10
|
+
<Annotate color="blue" note="Scan me!" side="top-end" arrowOffsetY="25px">
|
|
11
|
+
<Surface color="var(--global-foreground)" radius="l" hPadding="m" vPadding="m">
|
|
12
|
+
{/* QR / code graphic */}
|
|
13
|
+
</Surface>
|
|
14
|
+
</Annotate>
|
|
15
|
+
|
|
16
|
+
<Stack vPadding="m" rowGap="xs" hAlign="center">
|
|
17
|
+
<Title align="center" size="6" render={<h6 />}>
|
|
18
|
+
Scan to connect your mobile device
|
|
19
|
+
</Title>
|
|
20
|
+
<Text size="s" align="center" maxWidth="20rem" tone="muted">
|
|
21
|
+
Open the Ledger mobile app and scan this code to link your device.
|
|
22
|
+
</Text>
|
|
23
|
+
</Stack>
|
|
24
|
+
</Stack>
|
|
25
|
+
|
|
26
|
+
<Button variant="secondary">Got it</Button>
|
|
27
|
+
</Stack>
|
|
28
|
+
</Surface>
|
|
29
|
+
]]></tsx>
|
|
30
|
+
<notes>From `editor/preview-grid/blocks/device-pairing`. Annotate wraps the QR Surface; `note` is decorative only. Collapse the inline SVG to a comment slot.</notes>
|
|
31
|
+
</example>
|
|
32
|
+
|
|
33
|
+
<example title="CTA nudge (empty team)">
|
|
34
|
+
<tsx><![CDATA[
|
|
35
|
+
<Annotate color="green" note="start here" side="bottom-end" arrowOffsetY="-25px">
|
|
36
|
+
<Button>Invite Members</Button>
|
|
37
|
+
</Annotate>
|
|
38
|
+
]]></tsx>
|
|
39
|
+
<notes>From `editor/preview-grid/blocks/empty-team`. Point at a primary CTA. Drop Badge toggle / onClick kitchen chrome — keep Annotate + Button.</notes>
|
|
40
|
+
</example>
|
|
41
|
+
|
|
42
|
+
<example title="Inline mark in copy">
|
|
43
|
+
<tsx><![CDATA[
|
|
44
|
+
<Text size="s" tone="muted">
|
|
45
|
+
Designers love packing{' '}
|
|
46
|
+
<Annotate color="yellow" mark note="look here" side="top-end">
|
|
47
|
+
quirky glyphs
|
|
48
|
+
</Annotate>{' '}
|
|
49
|
+
into test phrases. This is a preview of the theme voice, contrast, and color rhythm.
|
|
50
|
+
</Text>
|
|
51
|
+
]]></tsx>
|
|
52
|
+
<notes>From `editor/preview-grid/blocks/theme-preview`. `mark` highlighter behind inline phrase; note stays decorative. Drop swatch grid shell from this hint.</notes>
|
|
6
53
|
</example>
|
|
7
54
|
</patterns>
|
|
@@ -52,37 +52,37 @@
|
|
|
52
52
|
<prop name="zIndex" kind="react">
|
|
53
53
|
<description>Stacking order for arrow and note via `--vui-annotate-z-index`. Same value on both parts.</description>
|
|
54
54
|
</prop>
|
|
55
|
-
<
|
|
55
|
+
<prop name="arrow-x" kind="css">
|
|
56
56
|
<description>Horizontal arrow offset.</description>
|
|
57
|
-
</
|
|
58
|
-
<
|
|
57
|
+
</prop>
|
|
58
|
+
<prop name="arrow-y" kind="css">
|
|
59
59
|
<description>Vertical arrow offset.</description>
|
|
60
|
-
</
|
|
61
|
-
<
|
|
60
|
+
</prop>
|
|
61
|
+
<prop name="color" kind="css">
|
|
62
62
|
<description>Arrow, note, and mark accent color. Defaults to var(--global-foreground).</description>
|
|
63
|
-
</
|
|
64
|
-
<
|
|
63
|
+
</prop>
|
|
64
|
+
<prop name="label-gap" kind="css">
|
|
65
65
|
<description>Gap between arrow and note on all sides.</description>
|
|
66
|
-
</
|
|
67
|
-
<
|
|
66
|
+
</prop>
|
|
67
|
+
<prop name="label-max-width" kind="css">
|
|
68
68
|
<description>Max width for the note part.</description>
|
|
69
|
-
</
|
|
70
|
-
<
|
|
69
|
+
</prop>
|
|
70
|
+
<prop name="rotate" kind="css">
|
|
71
71
|
<description>Note rotation angle.</description>
|
|
72
|
-
</
|
|
73
|
-
<
|
|
72
|
+
</prop>
|
|
73
|
+
<prop name="target-gap" kind="css">
|
|
74
74
|
<description>Gap between the target and the arrow.</description>
|
|
75
|
-
</
|
|
76
|
-
<
|
|
75
|
+
</prop>
|
|
76
|
+
<prop name="text-align" kind="css">
|
|
77
77
|
<description>Text alignment for the note. Defaults to start.</description>
|
|
78
|
-
</
|
|
79
|
-
<
|
|
78
|
+
</prop>
|
|
79
|
+
<prop name="text-x" kind="css">
|
|
80
80
|
<description>Legacy horizontal note offset custom property. Prefer textOffsetX from React.</description>
|
|
81
|
-
</
|
|
82
|
-
<
|
|
81
|
+
</prop>
|
|
82
|
+
<prop name="text-y" kind="css">
|
|
83
83
|
<description>Legacy vertical note offset custom property. Prefer textOffsetY from React.</description>
|
|
84
|
-
</
|
|
85
|
-
<
|
|
84
|
+
</prop>
|
|
85
|
+
<prop name="z-index" kind="css">
|
|
86
86
|
<description>Stacking order for arrow and note. Defaults to auto.</description>
|
|
87
|
-
</
|
|
87
|
+
</prop>
|
|
88
88
|
</props>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<usage surface="annotate">
|
|
3
|
-
<do>
|
|
4
|
-
<do>
|
|
5
|
-
<do>
|
|
6
|
-
<dont>
|
|
7
|
-
<dont>
|
|
3
|
+
<do>Wrap a Button CTA, a Surface graphic (QR / icon tile), or an inline phrase inside Text/Title — children stay the real content</do>
|
|
4
|
+
<do>Compose onboarding / empty-state callouts inside Stack + Surface shells with Title/Text/Button for the labeled instructions</do>
|
|
5
|
+
<do>Add optional `mark` highlighter behind the wrapped phrase while keeping `note` decorative</do>
|
|
6
|
+
<dont>Putting critical instructions or status only in `note` — assistive tech does not announce it; put that copy in Text/Title/Button</dont>
|
|
7
|
+
<dont>Using Annotate instead of Tooltip/Popover when focus, hover, or keyboard behavior is required</dont>
|
|
8
|
+
<dont>Nesting Annotate inside `overflow: hidden` parents without room for the arrow and label</dont>
|
|
9
|
+
<dont>Adding `position: relative` on Annotate — it breaks CSS anchor `position-area` placement</dont>
|
|
8
10
|
<dont>Expecting the label to participate in hit-testing or selection</dont>
|
|
9
|
-
<dont>Adding position:relative on Annotate — it breaks CSS anchor position-area placement</dont>
|
|
10
11
|
</usage>
|