@viraui/react 2026.3.11 → 2026.4.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 +50 -50
- package/dist/components/textarea/textarea.js +2 -2
- package/dist/components/textfield/textfield.js +2 -2
- package/dist/specs/PROTOCOL.md +48 -0
- package/dist/specs/activity-hints.xml +42 -0
- package/dist/specs/components/accordion/a11y.xml +6 -0
- package/dist/specs/components/accordion/meta.xml +20 -0
- package/dist/specs/components/accordion/patterns.xml +9 -0
- package/dist/specs/components/accordion/props.xml +48 -0
- package/dist/specs/components/accordion/usage.xml +8 -0
- package/dist/specs/components/annotate/a11y.xml +6 -0
- package/dist/specs/components/annotate/meta.xml +19 -0
- package/dist/specs/components/annotate/patterns.xml +7 -0
- package/dist/specs/components/annotate/props.xml +88 -0
- package/dist/specs/components/annotate/usage.xml +10 -0
- package/dist/specs/components/autocomplete/a11y.xml +6 -0
- package/dist/specs/components/autocomplete/meta.xml +22 -0
- package/dist/specs/components/autocomplete/patterns.xml +14 -0
- package/dist/specs/components/autocomplete/props.xml +81 -0
- package/dist/specs/components/autocomplete/usage.xml +11 -0
- package/dist/specs/components/avatar/a11y.xml +5 -0
- package/dist/specs/components/avatar/meta.xml +17 -0
- package/dist/specs/components/avatar/patterns.xml +7 -0
- package/dist/specs/components/avatar/props.xml +38 -0
- package/dist/specs/components/avatar/usage.xml +7 -0
- package/dist/specs/components/avatar-group/a11y.xml +6 -0
- package/dist/specs/components/avatar-group/meta.xml +16 -0
- package/dist/specs/components/avatar-group/patterns.xml +7 -0
- package/dist/specs/components/avatar-group/props.xml +39 -0
- package/dist/specs/components/avatar-group/usage.xml +10 -0
- package/dist/specs/components/badge/a11y.xml +7 -0
- package/dist/specs/components/badge/meta.xml +19 -0
- package/dist/specs/components/badge/patterns.xml +7 -0
- package/dist/specs/components/badge/props.xml +37 -0
- package/dist/specs/components/badge/usage.xml +9 -0
- package/dist/specs/components/beam/a11y.xml +7 -0
- package/dist/specs/components/beam/meta.xml +18 -0
- package/dist/specs/components/beam/patterns.xml +7 -0
- package/dist/specs/components/beam/props.xml +90 -0
- package/dist/specs/components/beam/usage.xml +11 -0
- package/dist/specs/components/bleed/a11y.xml +7 -0
- package/dist/specs/components/bleed/meta.xml +18 -0
- package/dist/specs/components/bleed/patterns.xml +7 -0
- package/dist/specs/components/bleed/props.xml +22 -0
- package/dist/specs/components/bleed/usage.xml +10 -0
- package/dist/specs/components/breakpoints/a11y.xml +5 -0
- package/dist/specs/components/breakpoints/meta.xml +17 -0
- package/dist/specs/components/breakpoints/patterns.xml +9 -0
- package/dist/specs/components/breakpoints/props.xml +20 -0
- package/dist/specs/components/breakpoints/usage.xml +9 -0
- package/dist/specs/components/button/a11y.xml +9 -0
- package/dist/specs/components/button/meta.xml +20 -0
- package/dist/specs/components/button/patterns.xml +11 -0
- package/dist/specs/components/button/props.xml +101 -0
- package/dist/specs/components/button/usage.xml +18 -0
- package/dist/specs/components/checkbox/a11y.xml +6 -0
- package/dist/specs/components/checkbox/meta.xml +21 -0
- package/dist/specs/components/checkbox/patterns.xml +7 -0
- package/dist/specs/components/checkbox/props.xml +48 -0
- package/dist/specs/components/checkbox/usage.xml +10 -0
- package/dist/specs/components/chip/a11y.xml +6 -0
- package/dist/specs/components/chip/meta.xml +19 -0
- package/dist/specs/components/chip/patterns.xml +7 -0
- package/dist/specs/components/chip/props.xml +49 -0
- package/dist/specs/components/chip/usage.xml +11 -0
- package/dist/specs/components/clamp-text/a11y.xml +6 -0
- package/dist/specs/components/clamp-text/meta.xml +17 -0
- package/dist/specs/components/clamp-text/patterns.xml +7 -0
- package/dist/specs/components/clamp-text/props.xml +27 -0
- package/dist/specs/components/clamp-text/usage.xml +8 -0
- package/dist/specs/components/dialog/a11y.xml +7 -0
- package/dist/specs/components/dialog/meta.xml +21 -0
- package/dist/specs/components/dialog/patterns.xml +19 -0
- package/dist/specs/components/dialog/props.xml +49 -0
- package/dist/specs/components/dialog/usage.xml +12 -0
- package/dist/specs/components/elevator/a11y.xml +6 -0
- package/dist/specs/components/elevator/meta.xml +16 -0
- package/dist/specs/components/elevator/patterns.xml +7 -0
- package/dist/specs/components/elevator/props.xml +31 -0
- package/dist/specs/components/elevator/usage.xml +8 -0
- package/dist/specs/components/fieldset/a11y.xml +6 -0
- package/dist/specs/components/fieldset/meta.xml +22 -0
- package/dist/specs/components/fieldset/patterns.xml +7 -0
- package/dist/specs/components/fieldset/props.xml +26 -0
- package/dist/specs/components/fieldset/usage.xml +11 -0
- package/dist/specs/components/fit-text/a11y.xml +6 -0
- package/dist/specs/components/fit-text/meta.xml +18 -0
- package/dist/specs/components/fit-text/patterns.xml +7 -0
- package/dist/specs/components/fit-text/props.xml +19 -0
- package/dist/specs/components/fit-text/usage.xml +9 -0
- package/dist/specs/components/glow/a11y.xml +6 -0
- package/dist/specs/components/glow/meta.xml +19 -0
- package/dist/specs/components/glow/patterns.xml +7 -0
- package/dist/specs/components/glow/props.xml +74 -0
- package/dist/specs/components/glow/usage.xml +12 -0
- package/dist/specs/components/grid/a11y.xml +6 -0
- package/dist/specs/components/grid/meta.xml +18 -0
- package/dist/specs/components/grid/patterns.xml +9 -0
- package/dist/specs/components/grid/props.xml +101 -0
- package/dist/specs/components/grid/usage.xml +10 -0
- package/dist/specs/components/icon-button/a11y.xml +9 -0
- package/dist/specs/components/icon-button/meta.xml +18 -0
- package/dist/specs/components/icon-button/patterns.xml +11 -0
- package/dist/specs/components/icon-button/props.xml +95 -0
- package/dist/specs/components/icon-button/usage.xml +14 -0
- package/dist/specs/components/linear-progress/a11y.xml +6 -0
- package/dist/specs/components/linear-progress/meta.xml +21 -0
- package/dist/specs/components/linear-progress/patterns.xml +7 -0
- package/dist/specs/components/linear-progress/props.xml +31 -0
- package/dist/specs/components/linear-progress/usage.xml +11 -0
- package/dist/specs/components/masonry/a11y.xml +6 -0
- package/dist/specs/components/masonry/meta.xml +18 -0
- package/dist/specs/components/masonry/patterns.xml +9 -0
- package/dist/specs/components/masonry/props.xml +32 -0
- package/dist/specs/components/masonry/usage.xml +9 -0
- package/dist/specs/components/menu/a11y.xml +7 -0
- package/dist/specs/components/menu/meta.xml +25 -0
- package/dist/specs/components/menu/patterns.xml +25 -0
- package/dist/specs/components/menu/props.xml +73 -0
- package/dist/specs/components/menu/usage.xml +15 -0
- package/dist/specs/components/meter/a11y.xml +6 -0
- package/dist/specs/components/meter/meta.xml +19 -0
- package/dist/specs/components/meter/patterns.xml +7 -0
- package/dist/specs/components/meter/props.xml +31 -0
- package/dist/specs/components/meter/usage.xml +10 -0
- package/dist/specs/components/popover/a11y.xml +7 -0
- package/dist/specs/components/popover/meta.xml +22 -0
- package/dist/specs/components/popover/patterns.xml +15 -0
- package/dist/specs/components/popover/props.xml +37 -0
- package/dist/specs/components/popover/usage.xml +12 -0
- package/dist/specs/components/progressive-blur/a11y.xml +6 -0
- package/dist/specs/components/progressive-blur/meta.xml +17 -0
- package/dist/specs/components/progressive-blur/patterns.xml +7 -0
- package/dist/specs/components/progressive-blur/props.xml +28 -0
- package/dist/specs/components/progressive-blur/usage.xml +10 -0
- package/dist/specs/components/radio/a11y.xml +6 -0
- package/dist/specs/components/radio/meta.xml +20 -0
- package/dist/specs/components/radio/patterns.xml +9 -0
- package/dist/specs/components/radio/props.xml +44 -0
- package/dist/specs/components/radio/usage.xml +12 -0
- package/dist/specs/components/select/a11y.xml +6 -0
- package/dist/specs/components/select/meta.xml +21 -0
- package/dist/specs/components/select/patterns.xml +13 -0
- package/dist/specs/components/select/props.xml +83 -0
- package/dist/specs/components/select/usage.xml +14 -0
- package/dist/specs/components/separator/a11y.xml +6 -0
- package/dist/specs/components/separator/meta.xml +18 -0
- package/dist/specs/components/separator/patterns.xml +7 -0
- package/dist/specs/components/separator/props.xml +39 -0
- package/dist/specs/components/separator/usage.xml +8 -0
- package/dist/specs/components/shimmer/a11y.xml +6 -0
- package/dist/specs/components/shimmer/meta.xml +18 -0
- package/dist/specs/components/shimmer/patterns.xml +7 -0
- package/dist/specs/components/shimmer/props.xml +40 -0
- package/dist/specs/components/shimmer/usage.xml +9 -0
- package/dist/specs/components/skeleton/a11y.xml +8 -0
- package/dist/specs/components/skeleton/meta.xml +17 -0
- package/dist/specs/components/skeleton/patterns.xml +8 -0
- package/dist/specs/components/skeleton/props.xml +73 -0
- package/dist/specs/components/skeleton/usage.xml +10 -0
- package/dist/specs/components/slider/a11y.xml +6 -0
- package/dist/specs/components/slider/meta.xml +19 -0
- package/dist/specs/components/slider/patterns.xml +7 -0
- package/dist/specs/components/slider/props.xml +45 -0
- package/dist/specs/components/slider/usage.xml +8 -0
- package/dist/specs/components/spinner/a11y.xml +7 -0
- package/dist/specs/components/spinner/meta.xml +17 -0
- package/dist/specs/components/spinner/patterns.xml +7 -0
- package/dist/specs/components/spinner/props.xml +24 -0
- package/dist/specs/components/spinner/usage.xml +8 -0
- package/dist/specs/components/stack/a11y.xml +6 -0
- package/dist/specs/components/stack/meta.xml +19 -0
- package/dist/specs/components/stack/patterns.xml +7 -0
- package/dist/specs/components/stack/props.xml +94 -0
- package/dist/specs/components/stack/usage.xml +14 -0
- package/dist/specs/components/static-noise/a11y.xml +6 -0
- package/dist/specs/components/static-noise/meta.xml +17 -0
- package/dist/specs/components/static-noise/patterns.xml +7 -0
- package/dist/specs/components/static-noise/props.xml +27 -0
- package/dist/specs/components/static-noise/usage.xml +10 -0
- package/dist/specs/components/surface/a11y.xml +6 -0
- package/dist/specs/components/surface/meta.xml +17 -0
- package/dist/specs/components/surface/patterns.xml +7 -0
- package/dist/specs/components/surface/props.xml +92 -0
- package/dist/specs/components/surface/usage.xml +16 -0
- package/dist/specs/components/switch/a11y.xml +6 -0
- package/dist/specs/components/switch/meta.xml +19 -0
- package/dist/specs/components/switch/patterns.xml +7 -0
- package/dist/specs/components/switch/props.xml +48 -0
- package/dist/specs/components/switch/usage.xml +8 -0
- package/dist/specs/components/tabs/a11y.xml +6 -0
- package/dist/specs/components/tabs/meta.xml +19 -0
- package/dist/specs/components/tabs/patterns.xml +14 -0
- package/dist/specs/components/tabs/props.xml +24 -0
- package/dist/specs/components/tabs/usage.xml +8 -0
- package/dist/specs/components/text/a11y.xml +6 -0
- package/dist/specs/components/text/meta.xml +17 -0
- package/dist/specs/components/text/patterns.xml +7 -0
- package/dist/specs/components/text/props.xml +129 -0
- package/dist/specs/components/text/usage.xml +7 -0
- package/dist/specs/components/textarea/a11y.xml +6 -0
- package/dist/specs/components/textarea/meta.xml +19 -0
- package/dist/specs/components/textarea/patterns.xml +7 -0
- package/dist/specs/components/textarea/props.xml +39 -0
- package/dist/specs/components/textarea/usage.xml +10 -0
- package/dist/specs/components/textfield/a11y.xml +6 -0
- package/dist/specs/components/textfield/meta.xml +21 -0
- package/dist/specs/components/textfield/patterns.xml +7 -0
- package/dist/specs/components/textfield/props.xml +51 -0
- package/dist/specs/components/textfield/usage.xml +9 -0
- package/dist/specs/components/title/a11y.xml +7 -0
- package/dist/specs/components/title/meta.xml +17 -0
- package/dist/specs/components/title/patterns.xml +7 -0
- package/dist/specs/components/title/props.xml +124 -0
- package/dist/specs/components/title/usage.xml +10 -0
- package/dist/specs/components/toast/a11y.xml +7 -0
- package/dist/specs/components/toast/meta.xml +20 -0
- package/dist/specs/components/toast/patterns.xml +15 -0
- package/dist/specs/components/toast/props.xml +42 -0
- package/dist/specs/components/toast/usage.xml +10 -0
- package/dist/specs/components/toggle-button/a11y.xml +6 -0
- package/dist/specs/components/toggle-button/meta.xml +20 -0
- package/dist/specs/components/toggle-button/patterns.xml +7 -0
- package/dist/specs/components/toggle-button/props.xml +61 -0
- package/dist/specs/components/toggle-button/usage.xml +10 -0
- package/dist/specs/components/toggle-group/a11y.xml +6 -0
- package/dist/specs/components/toggle-group/meta.xml +19 -0
- package/dist/specs/components/toggle-group/patterns.xml +9 -0
- package/dist/specs/components/toggle-group/props.xml +15 -0
- package/dist/specs/components/toggle-group/usage.xml +9 -0
- package/dist/specs/components/tooltip/a11y.xml +6 -0
- package/dist/specs/components/tooltip/meta.xml +21 -0
- package/dist/specs/components/tooltip/patterns.xml +12 -0
- package/dist/specs/components/tooltip/props.xml +20 -0
- package/dist/specs/components/tooltip/usage.xml +10 -0
- package/dist/specs/components/typewriter/a11y.xml +7 -0
- package/dist/specs/components/typewriter/meta.xml +18 -0
- package/dist/specs/components/typewriter/patterns.xml +7 -0
- package/dist/specs/components/typewriter/props.xml +43 -0
- package/dist/specs/components/typewriter/usage.xml +11 -0
- package/dist/specs/foundation/attributes.xml +127 -0
- package/dist/specs/foundation/bootstrap.xml +62 -0
- package/dist/specs/foundation/elevation.xml +21 -0
- package/dist/specs/foundation/meta.xml +20 -0
- package/dist/specs/foundation/modules.xml +62 -0
- package/dist/specs/foundation/theme-topics.xml +60 -0
- package/dist/specs/foundation/toggles.xml +25 -0
- package/dist/specs/index.xml +538 -0
- package/dist/specs/patterns/settings-row.xml +19 -0
- package/package.json +12 -11
- package/dist/components/accordion/accordion.guide.json +0 -69
- package/dist/components/annotate/annotate.guide.json +0 -110
- package/dist/components/autocomplete/autocomplete.guide.json +0 -103
- package/dist/components/avatar/avatar.guide.json +0 -53
- package/dist/components/avatar-group/avatar-group.guide.json +0 -56
- package/dist/components/badge/badge.guide.json +0 -59
- package/dist/components/beam/beam.guide.json +0 -123
- package/dist/components/bleed/bleed.guide.json +0 -43
- package/dist/components/breakpoints/breakpoints.guide.json +0 -40
- package/dist/components/button/button-link.guide.json +0 -69
- package/dist/components/button/button.guide.json +0 -78
- package/dist/components/checkbox/checkbox.guide.json +0 -68
- package/dist/components/chip/chip.guide.json +0 -69
- package/dist/components/clamp-text/clamp-text.guide.json +0 -47
- package/dist/components/dialog/dialog.guide.json +0 -72
- package/dist/components/elevator/elevator.guide.json +0 -46
- package/dist/components/fieldset/fieldset.guide.json +0 -43
- package/dist/components/fit-text/fit-text.guide.json +0 -38
- package/dist/components/glow/glow.guide.json +0 -108
- package/dist/components/grid/grid.guide.json +0 -120
- package/dist/components/icon-button/icon-button-link.guide.json +0 -73
- package/dist/components/icon-button/icon-button.guide.json +0 -72
- package/dist/components/linear-progress/linear-progress.guide.json +0 -53
- package/dist/components/masonry/masonry.guide.json +0 -50
- package/dist/components/menu/menu.guide.json +0 -94
- package/dist/components/meter/meter.guide.json +0 -52
- package/dist/components/popover/popover.guide.json +0 -58
- package/dist/components/progressive-blur/progressive-blur.guide.json +0 -50
- package/dist/components/radio/radio.guide.json +0 -65
- package/dist/components/select/select.guide.json +0 -105
- package/dist/components/separator/separator.guide.json +0 -58
- package/dist/components/shimmer/shimmer.guide.json +0 -67
- package/dist/components/skeleton/skeleton.guide.json +0 -98
- package/dist/components/slider/slider.guide.json +0 -64
- package/dist/components/spinner/spinner.guide.json +0 -43
- package/dist/components/stack/stack.guide.json +0 -116
- package/dist/components/static-noise/static-noise.guide.json +0 -44
- package/dist/components/surface/surface.guide.json +0 -115
- package/dist/components/switch/switch.guide.json +0 -71
- package/dist/components/tabs/tabs.guide.json +0 -43
- package/dist/components/text/text.guide.json +0 -152
- package/dist/components/textarea/textarea.guide.json +0 -55
- package/dist/components/textfield/textfield.guide.json +0 -70
- package/dist/components/title/title.guide.json +0 -149
- package/dist/components/toast/toast.guide.json +0 -60
- package/dist/components/toggle-button/toggle-button.guide.json +0 -81
- package/dist/components/toggle-group/toggle-group.guide.json +0 -27
- package/dist/components/tooltip/tooltip.guide.json +0 -40
- package/dist/components/typewriter/typewriter.guide.json +0 -65
- package/dist/consumption.json +0 -84
- package/dist/preflight-surface.json +0 -233
- package/dist/theme-surface.json +0 -71
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<patterns surface="dialog">
|
|
3
|
+
<example title="Dialog structure">
|
|
4
|
+
<tsx><![CDATA[<Dialog.Provider>
|
|
5
|
+
<Dialog.IndentBackground />
|
|
6
|
+
<Dialog.Indent>
|
|
7
|
+
…
|
|
8
|
+
<Dialog>
|
|
9
|
+
<Dialog.Trigger />
|
|
10
|
+
<Dialog.Sheet title="…">
|
|
11
|
+
…
|
|
12
|
+
<Dialog.Close />
|
|
13
|
+
</Dialog.Sheet>
|
|
14
|
+
</Dialog>
|
|
15
|
+
</Dialog.Indent>
|
|
16
|
+
</Dialog.Provider>]]></tsx>
|
|
17
|
+
<notes>Public assembly hint from legacy guide; not API authority.</notes>
|
|
18
|
+
</example>
|
|
19
|
+
</patterns>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<props surface="dialog">
|
|
3
|
+
<when_to_use>
|
|
4
|
+
<item>Focused tasks or confirmations that interrupt the current page without navigation</item>
|
|
5
|
+
<item>Short forms or read-only content that needs a modal layer above the app</item>
|
|
6
|
+
<item>Bottom sheets where swipe dismissal or snap points are useful (pass `snapPoints`, `snapPoint`/`onSnapPointChange`, or `defaultSnapPoint` directly on `Dialog`)</item>
|
|
7
|
+
<item>Drill-down sheet flows (for example settings sub-pages) by nesting a `Dialog` inside `Dialog.Sheet` children</item>
|
|
8
|
+
<item>App-shell indent effects by wrapping page content in `Dialog.Provider`, `Dialog.IndentBackground`, and `Dialog.Indent`</item>
|
|
9
|
+
<item>Custom portal host (iframe preview, shadow root, or app overlay root) via `container` on the portal-owning public part</item>
|
|
10
|
+
</when_to_use>
|
|
11
|
+
<when_not_to_use>
|
|
12
|
+
<item>Small anchored hints or quick actions that should use Popover or Menu</item>
|
|
13
|
+
<item>Highly custom sheet anatomy that needs primitive-level composition</item>
|
|
14
|
+
<item>Centered modal layouts that should not slide from the screen edge</item>
|
|
15
|
+
</when_not_to_use>
|
|
16
|
+
<prop name="Sheet.children" kind="react">
|
|
17
|
+
<description>Optional body content rendered below the description.</description>
|
|
18
|
+
</prop>
|
|
19
|
+
<prop name="Sheet.container" kind="react">
|
|
20
|
+
<description>Portal mount node (iframe body, shadow root, or app overlay root). Omit for Base UI default (`document.body` from the module window — iframe hosts must pass the iframe document body explicitly).</description>
|
|
21
|
+
</prop>
|
|
22
|
+
<prop name="Sheet.description" kind="react">
|
|
23
|
+
<description>Supporting copy announced with the title.</description>
|
|
24
|
+
</prop>
|
|
25
|
+
<prop name="Sheet.fitContent" kind="react">
|
|
26
|
+
<description>Centers the sheet horizontally within the viewport.</description>
|
|
27
|
+
</prop>
|
|
28
|
+
<prop name="Sheet.headerAlign" kind="react">
|
|
29
|
+
<description>Aligns the header stack and title/description text (`start` | `center` | `end`).</description>
|
|
30
|
+
</prop>
|
|
31
|
+
<prop name="Sheet.maxContentWidth" kind="react">
|
|
32
|
+
<description>Optional maximum width of the content area.</description>
|
|
33
|
+
</prop>
|
|
34
|
+
<prop name="Sheet.maxHeight" kind="react">
|
|
35
|
+
<description>Maximum block size of the sheet panel.</description>
|
|
36
|
+
</prop>
|
|
37
|
+
<prop name="Sheet.showCloseButton" kind="react">
|
|
38
|
+
<description>Whether to show the close button.</description>
|
|
39
|
+
</prop>
|
|
40
|
+
<prop name="Sheet.showHandle" kind="react">
|
|
41
|
+
<description>Whether to show the drag handle above the sheet header.</description>
|
|
42
|
+
</prop>
|
|
43
|
+
<prop name="Sheet.title" kind="react">
|
|
44
|
+
<description>Accessible dialog title rendered as the modal heading.</description>
|
|
45
|
+
</prop>
|
|
46
|
+
<css_var suffix="max-block-size">
|
|
47
|
+
<description>Max block size of Dialog.Sheet popup root.</description>
|
|
48
|
+
</css_var>
|
|
49
|
+
</props>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<usage surface="dialog">
|
|
3
|
+
<do>Focused tasks or confirmations that interrupt the current page without navigation</do>
|
|
4
|
+
<do>Short forms or read-only content that needs a modal layer above the app</do>
|
|
5
|
+
<do>Bottom sheets where swipe dismissal or snap points are useful (pass `snapPoints`, `snapPoint`/`onSnapPointChange`, or `defaultSnapPoint` directly on `Dialog`)</do>
|
|
6
|
+
<do>Drill-down sheet flows (for example settings sub-pages) by nesting a `Dialog` inside `Dialog.Sheet` children</do>
|
|
7
|
+
<do>App-shell indent effects by wrapping page content in `Dialog.Provider`, `Dialog.IndentBackground`, and `Dialog.Indent`</do>
|
|
8
|
+
<do>Custom portal host (iframe preview, shadow root, or app overlay root) via `container` on the portal-owning public part</do>
|
|
9
|
+
<dont>Opening a sheet without `title` copy for assistive technologies</dont>
|
|
10
|
+
<dont>Relying only on backdrop press or swipe when a footer action is the primary close path</dont>
|
|
11
|
+
<dont>Using Dialog when a centered non-gesture modal is enough and a future Dialog primitive is available</dont>
|
|
12
|
+
</usage>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<a11y surface="elevator">
|
|
3
|
+
<rule>Elevation is visual only — do not use shadow depth as the only affordance for interactivity</rule>
|
|
4
|
+
<rule>Preserve child focus order and semantics; Elevator does not add a focusable node</rule>
|
|
5
|
+
<rule>Respect reduced-motion preferences when pairing animated elevation with motion</rule>
|
|
6
|
+
</a11y>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<meta id="elevator" title="Elevator" category="effect" shared_contract="elevator">
|
|
3
|
+
<summary>No-DOM elevation utility that merges shadow hooks onto valid element children.</summary>
|
|
4
|
+
<exports>
|
|
5
|
+
<export name="Elevator" />
|
|
6
|
+
</exports>
|
|
7
|
+
<related>
|
|
8
|
+
<ref id="surface" />
|
|
9
|
+
</related>
|
|
10
|
+
<units>
|
|
11
|
+
<unit kind="a11y" href="a11y.xml" />
|
|
12
|
+
<unit kind="props" href="props.xml" />
|
|
13
|
+
<unit kind="usage" href="usage.xml" />
|
|
14
|
+
<unit kind="patterns" href="patterns.xml" />
|
|
15
|
+
</units>
|
|
16
|
+
</meta>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<patterns surface="elevator">
|
|
3
|
+
<example title="Elevator structure">
|
|
4
|
+
<tsx><![CDATA[<Elevator resting={1}>…</Elevator>]]></tsx>
|
|
5
|
+
<notes>Public assembly hint from legacy guide; not API authority.</notes>
|
|
6
|
+
</example>
|
|
7
|
+
</patterns>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<props surface="elevator">
|
|
3
|
+
<when_to_use>
|
|
4
|
+
<item>Apply resting and optional hover elevation to existing elements</item>
|
|
5
|
+
<item>Compose animated box-shadow transitions with data-elevation hooks</item>
|
|
6
|
+
<item>Use getElevationProps when you need the mapping directly</item>
|
|
7
|
+
</when_to_use>
|
|
8
|
+
<when_not_to_use>
|
|
9
|
+
<item>When you need a wrapper DOM node for layout or styling isolation</item>
|
|
10
|
+
<item>Non-element children that cannot receive merged props</item>
|
|
11
|
+
</when_not_to_use>
|
|
12
|
+
<prop name="children" kind="react">
|
|
13
|
+
<description>Element or elements that receive elevation hooks on their rendered root.</description>
|
|
14
|
+
</prop>
|
|
15
|
+
<prop name="direction" kind="react">
|
|
16
|
+
<description>Shadow cast direction mapped to `data-elevation-direction`.</description>
|
|
17
|
+
</prop>
|
|
18
|
+
<prop name="extraShadow" kind="react">
|
|
19
|
+
<description>Additional shadow layer mapped to the `--extra-shadow` custom property.</description>
|
|
20
|
+
</prop>
|
|
21
|
+
<prop name="hover" kind="react">
|
|
22
|
+
<description>Hover elevation level mapped to `data-elevation-hover`.</description>
|
|
23
|
+
</prop>
|
|
24
|
+
<prop name="resting" kind="react">
|
|
25
|
+
<description>Resting elevation level mapped to `data-elevation`.</description>
|
|
26
|
+
</prop>
|
|
27
|
+
<prop name="shadowColor" kind="react">
|
|
28
|
+
<description>Shadow color mapped to the `--shadow-color` custom property.</description>
|
|
29
|
+
</prop>
|
|
30
|
+
|
|
31
|
+
</props>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<usage surface="elevator">
|
|
3
|
+
<do>Apply resting and optional hover elevation to existing elements</do>
|
|
4
|
+
<do>Compose animated box-shadow transitions with data-elevation hooks</do>
|
|
5
|
+
<do>Use getElevationProps when you need the mapping directly</do>
|
|
6
|
+
<dont>Wrapping invalid or non-element nodes</dont>
|
|
7
|
+
<dont>Overwriting child transition shorthand without composing box-shadow</dont>
|
|
8
|
+
</usage>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<a11y surface="fieldset">
|
|
3
|
+
<rule>Map visible label to Fieldset.Legend so grouped controls share an accessible section name</rule>
|
|
4
|
+
<rule>Keep group invalid state on Field.Root and surface group error copy through Fieldset error</rule>
|
|
5
|
+
<rule>Pass disabled to `<Fieldset disabled>` when the whole section should ignore interaction</rule>
|
|
6
|
+
</a11y>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<meta id="fieldset" title="Fieldset" category="form" shared_contract="fieldset">
|
|
3
|
+
<summary>Semantic field grouping with shared legend and optional group helper copy.</summary>
|
|
4
|
+
<exports>
|
|
5
|
+
<export name="Fieldset" />
|
|
6
|
+
</exports>
|
|
7
|
+
<related>
|
|
8
|
+
<ref id="radio-group" />
|
|
9
|
+
<ref id="checkbox-group" />
|
|
10
|
+
<ref id="textfield" />
|
|
11
|
+
<ref id="textarea" />
|
|
12
|
+
<ref id="select" />
|
|
13
|
+
<ref id="stack" />
|
|
14
|
+
</related>
|
|
15
|
+
<units>
|
|
16
|
+
<unit kind="a11y" href="a11y.xml" />
|
|
17
|
+
<unit kind="props" href="props.xml" />
|
|
18
|
+
<unit kind="usage" href="usage.xml" />
|
|
19
|
+
<unit kind="patterns" href="patterns.xml" />
|
|
20
|
+
</units>
|
|
21
|
+
<base_ui href="https://base-ui.com/react/components/fieldset#api-reference" />
|
|
22
|
+
</meta>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<patterns surface="fieldset">
|
|
3
|
+
<example title="Fieldset structure">
|
|
4
|
+
<tsx><![CDATA[<Fieldset label="…">…</Fieldset>]]></tsx>
|
|
5
|
+
<notes>Public assembly hint from legacy guide; not API authority.</notes>
|
|
6
|
+
</example>
|
|
7
|
+
</patterns>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<props surface="fieldset">
|
|
3
|
+
<when_to_use>
|
|
4
|
+
<item>Section legends for multiple related fields — billing details with Textfield, Textarea, or Select children</item>
|
|
5
|
+
<item>Choice groups that need a shared legend, group description, or group error — Field.Root > Fieldset render={<RadioGroup<Value> />} or render={<CheckboxGroup />}</item>
|
|
6
|
+
<item>Group validation and helper copy that require a Field.Root ancestor plus Fieldset description or error</item>
|
|
7
|
+
<item>Type-safe radio unions via RadioGroup<'ssd' | 'hdd'> merged through Fieldset render</item>
|
|
8
|
+
<item>Shared legend plus optional group description/error for a form block — border/section chrome belongs on Surface or the consumer</item>
|
|
9
|
+
</when_to_use>
|
|
10
|
+
<when_not_to_use>
|
|
11
|
+
<item>Every RadioGroup or CheckboxGroup by default — Fieldset is optional when options already have labels and no group copy is needed</item>
|
|
12
|
+
<item>Single Textfield, Textarea, Select, Radio, or Checkbox that already exposes its own label</item>
|
|
13
|
+
<item>Standalone RadioGroup or CheckboxGroup inside Field.Root with no shared legend — primitives are enough</item>
|
|
14
|
+
<item>Group legend, description, or validation on RadioGroup or CheckboxGroup props — those belong on Fieldset (with Field.Root when validating)</item>
|
|
15
|
+
</when_not_to_use>
|
|
16
|
+
<prop name="description" kind="react">
|
|
17
|
+
<description>Group helper copy rendered below the legend while valid. Requires a `Field.Root` ancestor for `FieldHelperCopy`.</description>
|
|
18
|
+
</prop>
|
|
19
|
+
<prop name="error" kind="react">
|
|
20
|
+
<description>Group error copy rendered below the legend when invalid. Requires a `Field.Root` ancestor.</description>
|
|
21
|
+
</prop>
|
|
22
|
+
<prop name="label" kind="react">
|
|
23
|
+
<description>Visible legend copy rendered with shared internal `FieldLabel`.</description>
|
|
24
|
+
</prop>
|
|
25
|
+
|
|
26
|
+
</props>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<usage surface="fieldset">
|
|
3
|
+
<do>Section legends for multiple related fields — billing details with Textfield, Textarea, or Select children</do>
|
|
4
|
+
<do>Choice groups that need a shared legend, group description, or group error — Field.Root > Fieldset render={<RadioGroup<Value> />} or render={<CheckboxGroup />}</do>
|
|
5
|
+
<do>Group validation and helper copy that require a Field.Root ancestor plus Fieldset description or error</do>
|
|
6
|
+
<do>Type-safe radio unions via RadioGroup<'ssd' | 'hdd'> merged through Fieldset render</do>
|
|
7
|
+
<do>Shared legend plus optional group description/error for a form block — border/section chrome belongs on Surface or the consumer</do>
|
|
8
|
+
<dont>Wrapping Fieldset.Root in Stack render — breaks Base UI render merge with RadioGroup or CheckboxGroup</dont>
|
|
9
|
+
<dont>Expecting description or error on Fieldset without a Field.Root ancestor</dont>
|
|
10
|
+
<dont>Omitting RadioGroup<Value> generics when option values are a restricted union</dont>
|
|
11
|
+
</usage>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<a11y surface="fit-text">
|
|
3
|
+
<rule>Children render twice; the reference copy is aria-hidden and inert so assistive tech sees one tree</rule>
|
|
4
|
+
<rule>Keep semantic roots on the visible children (Title render, heading elements, paragraphs)</rule>
|
|
5
|
+
<rule>Fitted size still respects user zoom because the ratio multiplies 1em</rule>
|
|
6
|
+
</a11y>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<meta id="fit-text" title="FitText" category="typography" shared_contract="fit-text">
|
|
3
|
+
<summary>CSS-only fit-to-width wrapper that scales children to fill available inline space.</summary>
|
|
4
|
+
<exports>
|
|
5
|
+
<export name="FitText" />
|
|
6
|
+
</exports>
|
|
7
|
+
<related>
|
|
8
|
+
<ref id="title" />
|
|
9
|
+
<ref id="text" />
|
|
10
|
+
<ref id="clamp-text" />
|
|
11
|
+
</related>
|
|
12
|
+
<units>
|
|
13
|
+
<unit kind="a11y" href="a11y.xml" />
|
|
14
|
+
<unit kind="props" href="props.xml" />
|
|
15
|
+
<unit kind="usage" href="usage.xml" />
|
|
16
|
+
<unit kind="patterns" href="patterns.xml" />
|
|
17
|
+
</units>
|
|
18
|
+
</meta>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<props surface="fit-text">
|
|
3
|
+
<when_to_use>
|
|
4
|
+
<item>Headlines or short copy that should fill a constrained inline width</item>
|
|
5
|
+
<item>Multi-line display type broken with br (or equivalent) inside Title, Text, or native markup</item>
|
|
6
|
+
<item>Resize-friendly marketing/hero type without JS measurement</item>
|
|
7
|
+
</when_to_use>
|
|
8
|
+
<when_not_to_use>
|
|
9
|
+
<item>Long body copy that should wrap and reflow at a fixed type size</item>
|
|
10
|
+
<item>Truncation — use ClampText instead</item>
|
|
11
|
+
<item>Cases that need a JS-measured or observer-driven fit</item>
|
|
12
|
+
</when_not_to_use>
|
|
13
|
+
<prop name="maxFontSize" kind="react">
|
|
14
|
+
<description>Caps the fitted font size using any valid CSS length string.</description>
|
|
15
|
+
</prop>
|
|
16
|
+
<css_var suffix="max-font-size">
|
|
17
|
+
<description>Upper bound for the fitted font size on the display slot.</description>
|
|
18
|
+
</css_var>
|
|
19
|
+
</props>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<usage surface="fit-text">
|
|
3
|
+
<do>Headlines or short copy that should fill a constrained inline width</do>
|
|
4
|
+
<do>Multi-line display type broken with br (or equivalent) inside Title, Text, or native markup</do>
|
|
5
|
+
<do>Resize-friendly marketing/hero type without JS measurement</do>
|
|
6
|
+
<dont>Expecting automatic line breaks without br or block structure in children</dont>
|
|
7
|
+
<dont>Putting interactive controls inside FitText (duplicate trees and inert reference)</dont>
|
|
8
|
+
<dont>Using FitText for truncation or ellipsis</dont>
|
|
9
|
+
</usage>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<a11y surface="glow">
|
|
3
|
+
<rule>Root stays in the accessibility tree; highlight is decorative CSS only</rule>
|
|
4
|
+
<rule>Glow is not a focus or status indicator — consumer owns accessible names and state</rule>
|
|
5
|
+
<rule>Highlight hides under coarse pointer / no-hover and under prefers-reduced-motion</rule>
|
|
6
|
+
</a11y>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<meta id="glow" title="Glow" category="effect" shared_contract="glow">
|
|
3
|
+
<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 (rarely).</summary>
|
|
4
|
+
<exports>
|
|
5
|
+
<export name="Glow" />
|
|
6
|
+
</exports>
|
|
7
|
+
<related>
|
|
8
|
+
<ref id="surface" />
|
|
9
|
+
<ref id="beam" />
|
|
10
|
+
<ref id="shimmer" />
|
|
11
|
+
<ref id="progressive-blur" />
|
|
12
|
+
</related>
|
|
13
|
+
<units>
|
|
14
|
+
<unit kind="a11y" href="a11y.xml" />
|
|
15
|
+
<unit kind="props" href="props.xml" />
|
|
16
|
+
<unit kind="usage" href="usage.xml" />
|
|
17
|
+
<unit kind="patterns" href="patterns.xml" />
|
|
18
|
+
</units>
|
|
19
|
+
</meta>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<props surface="glow">
|
|
3
|
+
<when_to_use>
|
|
4
|
+
<item>Wrap a Surface (or other content) that should highlight toward the pointer</item>
|
|
5
|
+
<item>Grid of glow shells that share one pointer highlight path</item>
|
|
6
|
+
<item>Nested glow inside a padded Surface using radius="auto"</item>
|
|
7
|
+
</when_to_use>
|
|
8
|
+
<when_not_to_use>
|
|
9
|
+
<item>Default decoration on many cards — memory cost is high; reserve for rare focal moments</item>
|
|
10
|
+
<item>Static or continuously animated borders — use Surface border or Beam instead</item>
|
|
11
|
+
<item>Accessible status or focus indication — glow is decorative only</item>
|
|
12
|
+
<item>As a replacement for Surface color/padding — compose Surface as children</item>
|
|
13
|
+
</when_not_to_use>
|
|
14
|
+
<prop name="radius" kind="react">
|
|
15
|
+
<description>Sets corner radius from the Vira radius token scale, a per-corner [top-left, top-right, bottom-right, bottom-left] tuple (0 for square corners), or auto for concentric radii from the nearest ancestor Surface.</description>
|
|
16
|
+
</prop>
|
|
17
|
+
<prop name="proximity" kind="react">
|
|
18
|
+
<description>Distance from the surface edge where the glow becomes fully active.</description>
|
|
19
|
+
</prop>
|
|
20
|
+
<prop name="spread" kind="react">
|
|
21
|
+
<description>Angular width of the highlighted arc (degrees, used as a unitless CSS number).</description>
|
|
22
|
+
</prop>
|
|
23
|
+
<prop name="opacity" kind="react">
|
|
24
|
+
<description>Resting opacity of the glow when the pointer is outside proximity.</description>
|
|
25
|
+
</prop>
|
|
26
|
+
<prop name="fitContent" kind="react">
|
|
27
|
+
<description>Shrinks the root to fit its content (`max-width: fit-content`).</description>
|
|
28
|
+
</prop>
|
|
29
|
+
<prop name="borderWidth" kind="react">
|
|
30
|
+
<description>Width of the masked glow border ring.</description>
|
|
31
|
+
</prop>
|
|
32
|
+
<prop name="borderColor" kind="react">
|
|
33
|
+
<description>Color of the masked border ring under the highlight.</description>
|
|
34
|
+
</prop>
|
|
35
|
+
<prop name="borderOffset" kind="react">
|
|
36
|
+
<description>Offset of the glow ring from the surface edge. Negative values place the ring outside.</description>
|
|
37
|
+
</prop>
|
|
38
|
+
<prop name="glowColor" kind="react">
|
|
39
|
+
<description>Overrides the glow gradient with a solid color or custom background value. Ignored when `rainbowColors` is true.</description>
|
|
40
|
+
</prop>
|
|
41
|
+
<prop name="globalHighlight" kind="react">
|
|
42
|
+
<description>Shares the highlight gradient across cards via `background-attachment: fixed`. Forced off when `rainbowColors` is true.</description>
|
|
43
|
+
</prop>
|
|
44
|
+
<prop name="rainbowColors" kind="react">
|
|
45
|
+
<description>Uses the multi-stop rainbow highlight gradient and disables global highlight attachment.</description>
|
|
46
|
+
</prop>
|
|
47
|
+
<prop name="angleLag" kind="react">
|
|
48
|
+
<description>CSS transition duration in milliseconds for the pointer-driven starting angle. Soft follow by default; set 0 for instant snap.</description>
|
|
49
|
+
</prop>
|
|
50
|
+
<css_var suffix="starting-angle">
|
|
51
|
+
<description>Conic gradient start angle in degrees (unitless number). Pointer tracker writes a continuous unwrapped value.</description>
|
|
52
|
+
</css_var>
|
|
53
|
+
<css_var suffix="angle-lag">
|
|
54
|
+
<description>Transition duration for `--vui-glow-starting-angle`.</description>
|
|
55
|
+
</css_var>
|
|
56
|
+
<css_var suffix="active-opacity">
|
|
57
|
+
<description>Current glow opacity from proximity tracking. Written by the shared tracker.</description>
|
|
58
|
+
</css_var>
|
|
59
|
+
<css_var suffix="spread">
|
|
60
|
+
<description>Angular width of the highlighted arc.</description>
|
|
61
|
+
</css_var>
|
|
62
|
+
<css_var suffix="border-width">
|
|
63
|
+
<description>Masked glow border ring width.</description>
|
|
64
|
+
</css_var>
|
|
65
|
+
<css_var suffix="border-color">
|
|
66
|
+
<description>Masked border ring color under the highlight.</description>
|
|
67
|
+
</css_var>
|
|
68
|
+
<css_var suffix="border-offset">
|
|
69
|
+
<description>Glow ring offset from the surface edge.</description>
|
|
70
|
+
</css_var>
|
|
71
|
+
<css_var suffix="color">
|
|
72
|
+
<description>Glow fill (solid color or gradient).</description>
|
|
73
|
+
</css_var>
|
|
74
|
+
</props>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<usage surface="glow">
|
|
3
|
+
<do>Wrap a Surface (or other content) that should highlight toward the pointer</do>
|
|
4
|
+
<do>Grid of glow shells that share one pointer highlight path</do>
|
|
5
|
+
<do>Nested glow inside a padded Surface using radius="auto"</do>
|
|
6
|
+
<dont>Relying on Glow for keyboard focus visibility</dont>
|
|
7
|
+
<dont>Treating Glow as the visual card (color/padding) instead of composing Surface children</dont>
|
|
8
|
+
<dont>Setting overflow:hidden on an ancestor Surface when outer glow must remain visible</dont>
|
|
9
|
+
<dont>Expecting soft bloom Light layer — Glow is border-ring only</dont>
|
|
10
|
+
<dont>Using many Glow instances on one page — memory- and CPU-heavy</dont>
|
|
11
|
+
<dont>Expecting continuous spin — use Beam instead</dont>
|
|
12
|
+
</usage>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<a11y surface="grid">
|
|
3
|
+
<rule>Grid is presentational — choose render roots that preserve correct semantics (section, list, article)</rule>
|
|
4
|
+
<rule>DOM order follows source order; keep reading and keyboard order aligned with visual placement</rule>
|
|
5
|
+
<rule>Prefer Grid.Item render when list or article semantics matter for children</rule>
|
|
6
|
+
</a11y>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<meta id="grid" title="Grid" category="layout" shared_contract="grid">
|
|
3
|
+
<summary>CSS Grid layout primitive for auto-fill/fit or fixed track layouts with token gaps, Stack-aligned padding, and item placement (`fullWidth` / `fullHeight` / column / row).</summary>
|
|
4
|
+
<exports>
|
|
5
|
+
<export name="Grid" />
|
|
6
|
+
</exports>
|
|
7
|
+
<related>
|
|
8
|
+
<ref id="stack" />
|
|
9
|
+
<ref id="masonry" />
|
|
10
|
+
<ref id="surface" />
|
|
11
|
+
</related>
|
|
12
|
+
<units>
|
|
13
|
+
<unit kind="a11y" href="a11y.xml" />
|
|
14
|
+
<unit kind="props" href="props.xml" />
|
|
15
|
+
<unit kind="usage" href="usage.xml" />
|
|
16
|
+
<unit kind="patterns" href="patterns.xml" />
|
|
17
|
+
</units>
|
|
18
|
+
</meta>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<patterns surface="grid">
|
|
3
|
+
<example title="Grid structure">
|
|
4
|
+
<tsx><![CDATA[<Grid>
|
|
5
|
+
<Grid.Item>…</Grid.Item>
|
|
6
|
+
</Grid>]]></tsx>
|
|
7
|
+
<notes>Public assembly hint from legacy guide; not API authority.</notes>
|
|
8
|
+
</example>
|
|
9
|
+
</patterns>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<props surface="grid">
|
|
3
|
+
<when_to_use>
|
|
4
|
+
<item>Responsive card or tile walls that need true CSS Grid tracks (auto-fill/fit or fixed columns)</item>
|
|
5
|
+
<item>Fixed-count columns that keep a given track breadth — pair `columns` with an explicit `colMinWidth` so a parent with `overflow: auto` can scroll</item>
|
|
6
|
+
<item>Layouts where items must span full row or full column tracks</item>
|
|
7
|
+
<item>Token-spaced grids with optional axis padding without custom grid CSS</item>
|
|
8
|
+
</when_to_use>
|
|
9
|
+
<when_not_to_use>
|
|
10
|
+
<item>Uneven-height presentational walls where reading order can follow columns — prefer Masonry</item>
|
|
11
|
+
<item>Simple one-axis flex spacing — prefer Stack</item>
|
|
12
|
+
<item>Expecting Masonry-style React column packing instead of CSS Grid tracks</item>
|
|
13
|
+
</when_not_to_use>
|
|
14
|
+
<prop name="colMinWidth" kind="react">
|
|
15
|
+
<description>Minimum column track width for `filling` auto-fill/auto-fit tracks. When `columns` is also set, an explicit value opts into fixed-breadth tracks (`repeat(N, var(--vui-grid-column-min-w))`) and sets `data-grid-fixed-breadth`; omit this prop to keep fluid `1fr` tracks.</description>
|
|
16
|
+
</prop>
|
|
17
|
+
<prop name="columnGap" kind="react">
|
|
18
|
+
<description>Sets the gap between grid columns using the Vira space token scale.</description>
|
|
19
|
+
</prop>
|
|
20
|
+
<prop name="columns" kind="react">
|
|
21
|
+
<description>Fixes the number of column tracks. When set, `filling` is ignored and `data-grid-filling-type` is omitted. Bare `columns={N}` uses fluid `repeat(N, minmax(0, 1fr))` tracks. Pass an explicit `colMinWidth` as well for fixed-breadth tracks and `data-grid-fixed-breadth="true"` (`inline-size: max-content`).</description>
|
|
22
|
+
</prop>
|
|
23
|
+
<prop name="filling" kind="react">
|
|
24
|
+
<description>Controls `repeat(auto-fill|auto-fit, …)` when `columns` is unset. Pass `false` to skip the filling data attribute.</description>
|
|
25
|
+
</prop>
|
|
26
|
+
<prop name="hPadding" kind="react">
|
|
27
|
+
<description>Sets inline padding using one token for both sides or a `[start, end]` tuple.</description>
|
|
28
|
+
</prop>
|
|
29
|
+
<prop name="Item.column" kind="react">
|
|
30
|
+
<description>Sets explicit `grid-column` placement via `--vui-grid-item-column`.</description>
|
|
31
|
+
</prop>
|
|
32
|
+
<prop name="Item.fullHeight" kind="react">
|
|
33
|
+
<description>Spans the item across every row track (`grid-row: 1 / -1`). Wins over `row` when both are set.</description>
|
|
34
|
+
</prop>
|
|
35
|
+
<prop name="Item.fullWidth" kind="react">
|
|
36
|
+
<description>Spans the item across every column track (`grid-column: 1 / -1`). Wins over `column` when both are set.</description>
|
|
37
|
+
</prop>
|
|
38
|
+
<prop name="Item.ref" kind="react">
|
|
39
|
+
<description>Ref forwarded to the rendered item root element.</description>
|
|
40
|
+
</prop>
|
|
41
|
+
<prop name="Item.render" kind="react">
|
|
42
|
+
<description>Replaces the default `div` item root using Base UI render semantics.</description>
|
|
43
|
+
</prop>
|
|
44
|
+
<prop name="Item.row" kind="react">
|
|
45
|
+
<description>Sets explicit `grid-row` placement via `--vui-grid-item-row`.</description>
|
|
46
|
+
</prop>
|
|
47
|
+
<prop name="Item.subgrid" kind="react">
|
|
48
|
+
<description>Opts the item into a nested CSS grid that inherits parent tracks via `subgrid`. Sets `display: grid` and `grid-template-columns` and/or `grid-template-rows` to `subgrid`. Pass `true` for both axes, or `'column'` / `'row'` for one axis. Pair with `fullWidth` / `fullHeight` or a `column` / `row` span so the item covers the tracks to inherit.</description>
|
|
49
|
+
</prop>
|
|
50
|
+
<prop name="ref" kind="react">
|
|
51
|
+
<description>Ref forwarded to the rendered grid root element.</description>
|
|
52
|
+
</prop>
|
|
53
|
+
<prop name="render" kind="react">
|
|
54
|
+
<description>Replaces the default `div` root using Base UI render semantics.</description>
|
|
55
|
+
</prop>
|
|
56
|
+
<prop name="rowGap" kind="react">
|
|
57
|
+
<description>Sets the gap between grid rows using the Vira space token scale.</description>
|
|
58
|
+
</prop>
|
|
59
|
+
<prop name="rowMinHeight" kind="react">
|
|
60
|
+
<description>Minimum row track size used when `rows` is set.</description>
|
|
61
|
+
</prop>
|
|
62
|
+
<prop name="rows" kind="react">
|
|
63
|
+
<description>Fixes the number of row tracks via `--vui-grid-rows`.</description>
|
|
64
|
+
</prop>
|
|
65
|
+
<prop name="vPadding" kind="react">
|
|
66
|
+
<description>Sets block padding using one token for both sides or a `[start, end]` tuple.</description>
|
|
67
|
+
</prop>
|
|
68
|
+
<css_var suffix="column-gap">
|
|
69
|
+
<description>Grid column gap on the root.</description>
|
|
70
|
+
</css_var>
|
|
71
|
+
<css_var suffix="column-min-w">
|
|
72
|
+
<description>Minimum column track width for auto-fill/auto-fit track sizing, and the fixed track breadth when `columns` is set with an explicit `colMinWidth`.</description>
|
|
73
|
+
</css_var>
|
|
74
|
+
<css_var suffix="column-size">
|
|
75
|
+
<description>Resolved column track size (`minmax` formula) used by auto-fill/fit.</description>
|
|
76
|
+
</css_var>
|
|
77
|
+
<css_var suffix="columns">
|
|
78
|
+
<description>Fixed column track count when `columns` is set and filling is inactive; bare `columns` sizes tracks as `minmax(0, 1fr)`; with explicit `colMinWidth`, tracks use `var(--vui-grid-column-min-w)` under `data-grid-fixed-breadth`.</description>
|
|
79
|
+
</css_var>
|
|
80
|
+
<css_var suffix="padding-block-end">
|
|
81
|
+
<description>Block-end padding when padding is enabled.</description>
|
|
82
|
+
</css_var>
|
|
83
|
+
<css_var suffix="padding-block-start">
|
|
84
|
+
<description>Block-start padding when padding is enabled.</description>
|
|
85
|
+
</css_var>
|
|
86
|
+
<css_var suffix="padding-inline-end">
|
|
87
|
+
<description>Inline-end padding when padding is enabled.</description>
|
|
88
|
+
</css_var>
|
|
89
|
+
<css_var suffix="padding-inline-start">
|
|
90
|
+
<description>Inline-start padding when padding is enabled.</description>
|
|
91
|
+
</css_var>
|
|
92
|
+
<css_var suffix="row-gap">
|
|
93
|
+
<description>Grid row gap on the root.</description>
|
|
94
|
+
</css_var>
|
|
95
|
+
<css_var suffix="row-min-h">
|
|
96
|
+
<description>Minimum row track size when fixed rows are enabled.</description>
|
|
97
|
+
</css_var>
|
|
98
|
+
<css_var suffix="rows">
|
|
99
|
+
<description>Fixed row track count when `rows` is set.</description>
|
|
100
|
+
</css_var>
|
|
101
|
+
</props>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<usage surface="grid">
|
|
3
|
+
<do>Responsive card or tile walls that need true CSS Grid tracks (auto-fill/fit or fixed columns)</do>
|
|
4
|
+
<do>Fixed-count columns that keep a given track breadth — pair `columns` with an explicit `colMinWidth` so a parent with `overflow: auto` can scroll</do>
|
|
5
|
+
<do>Layouts where items must span full row or full column tracks</do>
|
|
6
|
+
<do>Token-spaced grids with optional axis padding without custom grid CSS</do>
|
|
7
|
+
<dont>Using Masonry when you need explicit row/column placement or full-width/full-height spans</dont>
|
|
8
|
+
<dont>Re-declaring grid-template and gap in app CSS when Grid can own the layout</dont>
|
|
9
|
+
<dont>Setting both fullWidth and column (or fullHeight and row) and expecting the explicit placement to win — full-* data attrs override</dont>
|
|
10
|
+
</usage>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<a11y surface="icon-button">
|
|
3
|
+
<rule>Provide aria-label or aria-labelledby on every IconButton — icon alone is not a name</rule>
|
|
4
|
+
<rule>Loading sets aria-busy on the control; Spinner is decorative</rule>
|
|
5
|
+
<rule>Keep the accessible name stable when loading state changes</rule>
|
|
6
|
+
<rule>Provide aria-label or aria-labelledby on every IconButtonLink — icon alone is not a name</rule>
|
|
7
|
+
<rule>Renders a real link root so assistive tech get link role</rule>
|
|
8
|
+
<rule>loading sets aria-disabled / aria-busy for loading chrome; no disabled prop — native links stay activatable</rule>
|
|
9
|
+
</a11y>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<meta id="icon-button" title="IconButton" category="action" shared_contract="button">
|
|
3
|
+
<summary>Icon-only button that shares Button visual chrome (--vui-button-* CSS) and requires an accessible name through aria-label or aria-labelledby.</summary>
|
|
4
|
+
<exports>
|
|
5
|
+
<export name="IconButton" />
|
|
6
|
+
<export name="IconButtonLink" />
|
|
7
|
+
</exports>
|
|
8
|
+
<related>
|
|
9
|
+
<ref id="button" />
|
|
10
|
+
<ref id="spinner" />
|
|
11
|
+
</related>
|
|
12
|
+
<units>
|
|
13
|
+
<unit kind="a11y" href="a11y.xml" />
|
|
14
|
+
<unit kind="props" href="props.xml" />
|
|
15
|
+
<unit kind="usage" href="usage.xml" />
|
|
16
|
+
<unit kind="patterns" href="patterns.xml" />
|
|
17
|
+
</units>
|
|
18
|
+
</meta>
|