@viraui/react 0.0.25 → 0.0.27
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 +116 -68
- package/dist/components/accordion/accordion-item.d.ts +58 -0
- package/dist/components/accordion/accordion-item.js +65 -0
- package/dist/components/accordion/accordion.css +1 -0
- package/dist/components/accordion/accordion.d.ts +26 -0
- package/dist/components/accordion/accordion.guide.json +30 -0
- package/dist/components/accordion/accordion.js +22 -0
- package/dist/components/accordion/accordion.module.js +17 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/avatar/avatar.css +1 -1
- package/dist/components/avatar/avatar.guide.json +25 -1
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/avatar/avatar.module.js +8 -4
- package/dist/components/avatar-group/avatar-group.css +2 -2
- package/dist/components/avatar-group/avatar-group.guide.json +27 -1
- package/dist/components/avatar-group/avatar-group.js +2 -2
- package/dist/components/avatar-group/avatar-group.module.js +12 -6
- package/dist/components/basic-input/basic-input.css +1 -1
- package/dist/components/basic-input/basic-input.js +3 -3
- package/dist/components/basic-input/basic-input.module.js +4 -2
- package/dist/components/basic-input/field-label.css +1 -1
- package/dist/components/basic-input/field-label.module.js +4 -2
- package/dist/components/bleed/bleed.css +1 -0
- package/dist/components/bleed/bleed.d.ts +26 -0
- package/dist/components/bleed/bleed.guide.json +39 -0
- package/dist/components/bleed/bleed.js +24 -0
- package/dist/components/bleed/bleed.module.js +5 -0
- package/dist/components/bleed/index.d.ts +2 -0
- package/dist/components/button/button.css +1 -1
- package/dist/components/button/button.guide.json +33 -3
- package/dist/components/button/button.js +1 -1
- package/dist/components/button/button.module.js +8 -4
- package/dist/components/checkbox/checkbox-group.js +2 -2
- package/dist/components/checkbox/checkbox.css +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/checkbox/checkbox.module.js +16 -8
- package/dist/components/chip/chip.css +1 -1
- package/dist/components/chip/chip.guide.json +26 -1
- package/dist/components/chip/chip.module.js +10 -5
- package/dist/components/clamp-text/clamp-text.css +1 -1
- package/dist/components/clamp-text/clamp-text.guide.json +15 -1
- package/dist/components/clamp-text/clamp-text.js +1 -1
- package/dist/components/clamp-text/clamp-text.module.js +4 -2
- package/dist/components/dialog/dialog-close.js +2 -2
- package/dist/components/dialog/dialog-indent-background.js +2 -2
- package/dist/components/dialog/dialog-indent.js +2 -2
- package/dist/components/dialog/dialog-sheet.js +3 -3
- package/dist/components/dialog/dialog-trigger.js +2 -2
- package/dist/components/dialog/dialog.css +1 -1
- package/dist/components/dialog/dialog.d.ts +5 -4
- package/dist/components/dialog/dialog.guide.json +15 -1
- package/dist/components/dialog/dialog.js +4 -3
- package/dist/components/dialog/dialog.module.js +24 -12
- package/dist/components/elevator/elevator.js +2 -2
- package/dist/components/fieldset/fieldset.js +1 -1
- package/dist/components/icon/icon.module.js +4 -2
- package/dist/components/icon-button/icon-button.js +2 -2
- package/dist/components/index.d.ts +21 -13
- package/dist/components/linear-progress/linear-progress.css +1 -1
- package/dist/components/linear-progress/linear-progress.guide.json +14 -1
- package/dist/components/linear-progress/linear-progress.js +1 -1
- package/dist/components/linear-progress/linear-progress.module.js +8 -4
- package/dist/components/masonry/masonry.css +1 -1
- package/dist/components/masonry/masonry.guide.json +42 -1
- package/dist/components/masonry/masonry.js +3 -3
- package/dist/components/masonry/masonry.module.js +6 -3
- package/dist/components/meter/index.d.ts +2 -0
- package/dist/components/meter/meter.css +1 -0
- package/dist/components/meter/meter.d.ts +44 -0
- package/dist/components/meter/meter.guide.json +39 -0
- package/dist/components/meter/meter.js +59 -0
- package/dist/components/meter/meter.module.js +11 -0
- package/dist/components/popover/index.d.ts +4 -0
- package/dist/components/popover/popover-sheet.d.ts +65 -0
- package/dist/components/popover/popover-sheet.js +79 -0
- package/dist/components/popover/popover.css +1 -0
- package/dist/components/popover/popover.d.ts +74 -0
- package/dist/components/popover/popover.guide.json +28 -0
- package/dist/components/popover/popover.js +23 -0
- package/dist/components/popover/popover.module.js +13 -0
- package/dist/components/progressive-blur/progressive-blur.css +1 -1
- package/dist/components/progressive-blur/progressive-blur.guide.json +15 -1
- package/dist/components/progressive-blur/progressive-blur.js +1 -1
- package/dist/components/progressive-blur/progressive-blur.module.js +6 -3
- package/dist/components/radio/radio-group.d.ts +1 -1
- package/dist/components/radio/radio-group.js +2 -2
- package/dist/components/radio/radio.css +1 -1
- package/dist/components/radio/radio.js +1 -1
- package/dist/components/radio/radio.module.js +8 -4
- package/dist/components/select/select-group.js +1 -1
- package/dist/components/select/select-option.js +3 -3
- package/dist/components/select/select.css +1 -1
- package/dist/components/select/select.guide.json +26 -1
- package/dist/components/select/select.js +5 -4
- package/dist/components/select/select.module.js +36 -18
- package/dist/components/separator/separator.css +1 -1
- package/dist/components/separator/separator.js +1 -1
- package/dist/components/separator/separator.module.js +4 -2
- package/dist/components/shimmer/shimmer.css +1 -1
- package/dist/components/shimmer/shimmer.guide.json +39 -1
- package/dist/components/shimmer/shimmer.js +4 -4
- package/dist/components/shimmer/shimmer.module.js +4 -2
- package/dist/components/skeleton/skeleton.css +1 -1
- package/dist/components/skeleton/skeleton.guide.json +50 -1
- package/dist/components/skeleton/skeleton.js +5 -5
- package/dist/components/skeleton/skeleton.module.js +4 -2
- package/dist/components/slider/slider.css +1 -1
- package/dist/components/slider/slider.guide.json +20 -1
- package/dist/components/slider/slider.js +1 -1
- package/dist/components/slider/slider.module.js +20 -10
- package/dist/components/spinner/spinner.css +1 -1
- package/dist/components/spinner/spinner.guide.json +15 -1
- package/dist/components/spinner/spinner.module.js +6 -3
- package/dist/components/stack/stack.css +1 -1
- package/dist/components/stack/stack.guide.json +77 -1
- package/dist/components/stack/stack.js +8 -8
- package/dist/components/stack/stack.module.js +4 -2
- package/dist/components/static-noise/static-noise.module.js +6 -3
- package/dist/components/surface/surface-radius-context.js +7 -7
- package/dist/components/surface/surface.css +1 -1
- package/dist/components/surface/surface.d.ts +1 -1
- package/dist/components/surface/surface.guide.json +85 -1
- package/dist/components/surface/surface.js +6 -6
- package/dist/components/surface/surface.module.js +4 -2
- package/dist/components/switch/switch.css +1 -1
- package/dist/components/switch/switch.guide.json +32 -1
- package/dist/components/switch/switch.js +1 -1
- package/dist/components/switch/switch.module.js +10 -5
- package/dist/components/tabs/tabs-indicator.js +2 -2
- package/dist/components/tabs/tabs-list.js +2 -2
- package/dist/components/tabs/tabs-panel.js +2 -2
- package/dist/components/tabs/tabs-tab.js +2 -2
- package/dist/components/tabs/tabs-viewport.js +2 -2
- package/dist/components/tabs/tabs.css +1 -1
- package/dist/components/tabs/tabs.guide.json +8 -1
- package/dist/components/tabs/tabs.js +2 -2
- package/dist/components/tabs/tabs.module.js +16 -8
- package/dist/components/text/text.css +1 -1
- package/dist/components/text/text.guide.json +125 -1
- package/dist/components/text/text.js +11 -11
- package/dist/components/text/text.module.js +4 -2
- package/dist/components/textarea/textarea.css +1 -1
- package/dist/components/textarea/textarea.guide.json +14 -1
- package/dist/components/textarea/textarea.js +1 -1
- package/dist/components/textarea/textarea.module.js +10 -5
- package/dist/components/textfield/textfield.css +1 -1
- package/dist/components/textfield/textfield.guide.json +20 -1
- package/dist/components/textfield/textfield.js +1 -1
- package/dist/components/textfield/textfield.module.js +14 -7
- package/dist/components/title/title.css +1 -1
- package/dist/components/title/title.guide.json +123 -1
- package/dist/components/title/title.js +11 -11
- package/dist/components/title/title.module.js +4 -2
- package/dist/components/toast/toast-action.js +2 -2
- package/dist/components/toast/toast-banner.js +1 -1
- package/dist/components/toast/toast-viewport.js +2 -2
- package/dist/components/toast/toast.css +1 -1
- package/dist/components/toast/toast.module.js +8 -4
- package/dist/components/toggle-button/index.d.ts +2 -0
- package/dist/components/toggle-button/toggle-button.d.ts +39 -0
- package/dist/components/toggle-button/toggle-button.guide.json +25 -0
- package/dist/components/toggle-button/toggle-button.js +25 -0
- package/dist/components/toggle-group/index.d.ts +2 -0
- package/dist/components/toggle-group/toggle-group.d.ts +11 -0
- package/dist/components/toggle-group/toggle-group.guide.json +26 -0
- package/dist/components/toggle-group/toggle-group.js +15 -0
- package/dist/components/tooltip/index.d.ts +6 -0
- package/dist/components/tooltip/tooltip-content.d.ts +15 -0
- package/dist/components/tooltip/tooltip-content.js +32 -0
- package/dist/components/tooltip/tooltip.css +1 -0
- package/dist/components/tooltip/tooltip.d.ts +13 -0
- package/dist/components/tooltip/tooltip.guide.json +25 -0
- package/dist/components/tooltip/tooltip.js +20 -0
- package/dist/components/tooltip/tooltip.module.js +11 -0
- package/dist/components/typewriter/index.d.ts +3 -0
- package/dist/components/typewriter/typewriter.css +1 -0
- package/dist/components/typewriter/typewriter.d.ts +68 -0
- package/dist/components/typewriter/typewriter.guide.json +39 -0
- package/dist/components/typewriter/typewriter.js +105 -0
- package/dist/components/typewriter/typewriter.module.js +18 -0
- package/dist/components/typewriter/typewriter.utils.d.ts +23 -0
- package/dist/components/typewriter/typewriter.utils.js +100 -0
- package/dist/index.js +26 -16
- package/dist/preflight-surface.json +17 -4
- package/dist/preflight.css +1 -1
- package/package.json +6 -6
package/dist/catalog.json
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
"version": 1,
|
|
3
3
|
"package": "@viraui/react",
|
|
4
4
|
"components": [
|
|
5
|
+
{
|
|
6
|
+
"id": "accordion",
|
|
7
|
+
"name": "Accordion",
|
|
8
|
+
"summary": "Collapsible sections grouped into open/closed blocks with optional Surface wrapping, shared corner radius, and background on open items.",
|
|
9
|
+
"guidePath": "./components/accordion/accordion.guide.json"
|
|
10
|
+
},
|
|
5
11
|
{
|
|
6
12
|
"id": "avatar",
|
|
7
13
|
"name": "Avatar",
|
|
@@ -14,24 +20,42 @@
|
|
|
14
20
|
"summary": "Overlapping avatar stack with shared sizing, directional layout, and an optional overflow pill.",
|
|
15
21
|
"guidePath": "./components/avatar-group/avatar-group.guide.json"
|
|
16
22
|
},
|
|
23
|
+
{
|
|
24
|
+
"id": "bleed",
|
|
25
|
+
"name": "Bleed",
|
|
26
|
+
"summary": "Layout utility that pulls content past inline padding using negative margins or full viewport bleed.",
|
|
27
|
+
"guidePath": "./components/bleed/bleed.guide.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "button",
|
|
31
|
+
"name": "Button",
|
|
32
|
+
"summary": "Primary action control with size, variant, optional addon, optional pill shape, and loading state.",
|
|
33
|
+
"guidePath": "./components/button/button.guide.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "checkbox",
|
|
37
|
+
"name": "Checkbox",
|
|
38
|
+
"summary": "Field.Item checkbox option for standalone fields or CheckboxGroup children.",
|
|
39
|
+
"guidePath": "./components/checkbox/checkbox.guide.json"
|
|
40
|
+
},
|
|
17
41
|
{
|
|
18
42
|
"id": "chip",
|
|
19
43
|
"name": "Chip",
|
|
20
44
|
"summary": "Compact visual label primitive for short status, category, or metadata treatments.",
|
|
21
45
|
"guidePath": "./components/chip/chip.guide.json"
|
|
22
46
|
},
|
|
23
|
-
{
|
|
24
|
-
"id": "dialog",
|
|
25
|
-
"name": "Dialog",
|
|
26
|
-
"summary": "Compound drawer sheet with `Dialog.Trigger`, `Dialog.Sheet`, `Dialog.Close`, and Base UI pass-through `Dialog.Provider`, `Dialog.Indent`, and `Dialog.IndentBackground` for app-shell indent effects.",
|
|
27
|
-
"guidePath": "./components/dialog/dialog.guide.json"
|
|
28
|
-
},
|
|
29
47
|
{
|
|
30
48
|
"id": "clamp-text",
|
|
31
49
|
"name": "ClampText",
|
|
32
50
|
"summary": "Presentational utility that truncates overflowing copy to a fixed line count.",
|
|
33
51
|
"guidePath": "./components/clamp-text/clamp-text.guide.json"
|
|
34
52
|
},
|
|
53
|
+
{
|
|
54
|
+
"id": "dialog",
|
|
55
|
+
"name": "Dialog",
|
|
56
|
+
"summary": "Compound drawer sheet with `Dialog.Trigger`, `Dialog.Sheet`, `Dialog.Close`, and Base UI pass-through `Dialog.Provider`, `Dialog.Indent`, and `Dialog.IndentBackground` for app-shell indent effects.",
|
|
57
|
+
"guidePath": "./components/dialog/dialog.guide.json"
|
|
58
|
+
},
|
|
35
59
|
{
|
|
36
60
|
"id": "elevator",
|
|
37
61
|
"name": "Elevator",
|
|
@@ -39,10 +63,16 @@
|
|
|
39
63
|
"guidePath": "./components/elevator/elevator.guide.json"
|
|
40
64
|
},
|
|
41
65
|
{
|
|
42
|
-
"id": "
|
|
43
|
-
"name": "
|
|
44
|
-
"summary": "
|
|
45
|
-
"guidePath": "./components/
|
|
66
|
+
"id": "fieldset",
|
|
67
|
+
"name": "Fieldset",
|
|
68
|
+
"summary": "Semantic field grouping with shared legend and optional group helper copy.",
|
|
69
|
+
"guidePath": "./components/fieldset/fieldset.guide.json"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "icon",
|
|
73
|
+
"name": "Icon",
|
|
74
|
+
"summary": "Decorative Vira SVG icon selected by name and variant.",
|
|
75
|
+
"guidePath": "./components/icon/icon.guide.json"
|
|
46
76
|
},
|
|
47
77
|
{
|
|
48
78
|
"id": "icon-button",
|
|
@@ -63,40 +93,22 @@
|
|
|
63
93
|
"guidePath": "./components/masonry/masonry.guide.json"
|
|
64
94
|
},
|
|
65
95
|
{
|
|
66
|
-
"id": "
|
|
67
|
-
"name": "
|
|
68
|
-
"summary": "
|
|
69
|
-
"guidePath": "./components/
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"id": "textarea",
|
|
73
|
-
"name": "Textarea",
|
|
74
|
-
"summary": "Multi-line field control with shared field copy and optional resize.",
|
|
75
|
-
"guidePath": "./components/textarea/textarea.guide.json"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"id": "slider",
|
|
79
|
-
"name": "Slider",
|
|
80
|
-
"summary": "Field-wrapped range input supporting single-thumb or two-thumb range selection.",
|
|
81
|
-
"guidePath": "./components/slider/slider.guide.json"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"id": "switch",
|
|
85
|
-
"name": "Switch",
|
|
86
|
-
"summary": "Field-wrapped toggle control with regular or small track and optional field copy.",
|
|
87
|
-
"guidePath": "./components/switch/switch.guide.json"
|
|
96
|
+
"id": "meter",
|
|
97
|
+
"name": "Meter",
|
|
98
|
+
"summary": "Shows a determinate metric in a compact horizontal track for static capacity, level, or score values.",
|
|
99
|
+
"guidePath": "./components/meter/meter.guide.json"
|
|
88
100
|
},
|
|
89
101
|
{
|
|
90
|
-
"id": "
|
|
91
|
-
"name": "
|
|
92
|
-
"summary": "
|
|
93
|
-
"guidePath": "./components/
|
|
102
|
+
"id": "popover",
|
|
103
|
+
"name": "Popover",
|
|
104
|
+
"summary": "Compound popover built on Base UI Popover with `Popover.Trigger`, `Popover.Sheet`, `Popover.Close`, `Popover.Title`, `Popover.Description`, and `Popover.createHandle` for detached and multiple triggers; `Sheet` encapsulates Portal + Positioner + Popup + Viewport + Title + Description and animates position, size, and content between triggers; `Sheet` with `unstyled` skips the built-in Surface and header so the consumer composes the popup chrome, including `Popover.Title` and `Popover.Description`.",
|
|
105
|
+
"guidePath": "./components/popover/popover.guide.json"
|
|
94
106
|
},
|
|
95
107
|
{
|
|
96
|
-
"id": "
|
|
97
|
-
"name": "
|
|
98
|
-
"summary": "
|
|
99
|
-
"guidePath": "./components/
|
|
108
|
+
"id": "progressive-blur",
|
|
109
|
+
"name": "ProgressiveBlur",
|
|
110
|
+
"summary": "Decorative stacked backdrop-filter overlay that ramps blur from one edge toward the opposite edge.",
|
|
111
|
+
"guidePath": "./components/progressive-blur/progressive-blur.guide.json"
|
|
100
112
|
},
|
|
101
113
|
{
|
|
102
114
|
"id": "radio",
|
|
@@ -122,36 +134,78 @@
|
|
|
122
134
|
"summary": "Decorative inline text shimmer that inherits typography and color from a parent text primitive.",
|
|
123
135
|
"guidePath": "./components/shimmer/shimmer.guide.json"
|
|
124
136
|
},
|
|
125
|
-
{
|
|
126
|
-
"id": "icon",
|
|
127
|
-
"name": "Icon",
|
|
128
|
-
"summary": "Decorative Vira SVG icon selected by name and variant.",
|
|
129
|
-
"guidePath": "./components/icon/icon.guide.json"
|
|
130
|
-
},
|
|
131
137
|
{
|
|
132
138
|
"id": "skeleton",
|
|
133
139
|
"name": "Skeleton",
|
|
134
140
|
"summary": "Decorative loading placeholder sized by props, not children.",
|
|
135
141
|
"guidePath": "./components/skeleton/skeleton.guide.json"
|
|
136
142
|
},
|
|
143
|
+
{
|
|
144
|
+
"id": "slider",
|
|
145
|
+
"name": "Slider",
|
|
146
|
+
"summary": "Field-wrapped range input supporting single-thumb or two-thumb range selection.",
|
|
147
|
+
"guidePath": "./components/slider/slider.guide.json"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"id": "spinner",
|
|
151
|
+
"name": "Spinner",
|
|
152
|
+
"summary": "Decorative SVG pulsing loading indicator used inside interactive components.",
|
|
153
|
+
"guidePath": "./components/spinner/spinner.guide.json"
|
|
154
|
+
},
|
|
137
155
|
{
|
|
138
156
|
"id": "stack",
|
|
139
157
|
"name": "Stack",
|
|
140
158
|
"summary": "Flex layout primitive for arranging children with token spacing, alignment, and padding; root is a named CSS container query context (`stack`).",
|
|
141
159
|
"guidePath": "./components/stack/stack.guide.json"
|
|
142
160
|
},
|
|
161
|
+
{
|
|
162
|
+
"id": "static-noise",
|
|
163
|
+
"name": "StaticNoise",
|
|
164
|
+
"summary": "Decorative SVG turbulence noise overlay for textured surfaces and hero sections.",
|
|
165
|
+
"guidePath": "./components/static-noise/static-noise.guide.json"
|
|
166
|
+
},
|
|
143
167
|
{
|
|
144
168
|
"id": "surface",
|
|
145
169
|
"name": "Surface",
|
|
146
170
|
"summary": "Presentational container with token background, optional border, radius, and padding; nested surfaces use radius=\"auto\" for concentric corners; root is a named CSS container query context (`surface`).",
|
|
147
171
|
"guidePath": "./components/surface/surface.guide.json"
|
|
148
172
|
},
|
|
173
|
+
{
|
|
174
|
+
"id": "switch",
|
|
175
|
+
"name": "Switch",
|
|
176
|
+
"summary": "Field-wrapped toggle control with regular or small track and optional field copy.",
|
|
177
|
+
"guidePath": "./components/switch/switch.guide.json"
|
|
178
|
+
},
|
|
149
179
|
{
|
|
150
180
|
"id": "tabs",
|
|
151
181
|
"name": "Tabs",
|
|
152
182
|
"summary": "Compound segmented tab control with Surface list chrome, moving indicator, and animated panels.",
|
|
153
183
|
"guidePath": "./components/tabs/tabs.guide.json"
|
|
154
184
|
},
|
|
185
|
+
{
|
|
186
|
+
"id": "text",
|
|
187
|
+
"name": "Text",
|
|
188
|
+
"summary": "Theme-aware body-copy primitive with tone, family, and responsive body sizing.",
|
|
189
|
+
"guidePath": "./components/text/text.guide.json"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"id": "textarea",
|
|
193
|
+
"name": "Textarea",
|
|
194
|
+
"summary": "Multi-line field control with shared field copy and optional resize.",
|
|
195
|
+
"guidePath": "./components/textarea/textarea.guide.json"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"id": "textfield",
|
|
199
|
+
"name": "Textfield",
|
|
200
|
+
"summary": "Single-line field input with control-group chrome and optional addons.",
|
|
201
|
+
"guidePath": "./components/textfield/textfield.guide.json"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"id": "title",
|
|
205
|
+
"name": "Title",
|
|
206
|
+
"summary": "Theme-aware heading and display typography primitive.",
|
|
207
|
+
"guidePath": "./components/title/title.guide.json"
|
|
208
|
+
},
|
|
155
209
|
{
|
|
156
210
|
"id": "toast",
|
|
157
211
|
"name": "Toast",
|
|
@@ -159,34 +213,28 @@
|
|
|
159
213
|
"guidePath": "./components/toast/toast.guide.json"
|
|
160
214
|
},
|
|
161
215
|
{
|
|
162
|
-
"id": "
|
|
163
|
-
"name": "
|
|
164
|
-
"summary": "
|
|
165
|
-
"guidePath": "./components/
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"id": "static-noise",
|
|
169
|
-
"name": "StaticNoise",
|
|
170
|
-
"summary": "Decorative SVG turbulence noise overlay for textured surfaces and hero sections.",
|
|
171
|
-
"guidePath": "./components/static-noise/static-noise.guide.json"
|
|
216
|
+
"id": "toggle-button",
|
|
217
|
+
"name": "ToggleButton",
|
|
218
|
+
"summary": "Icon-only two-state toggle that swaps resting and optional pressed icons on Base UI Toggle state.",
|
|
219
|
+
"guidePath": "./components/toggle-button/toggle-button.guide.json"
|
|
172
220
|
},
|
|
173
221
|
{
|
|
174
|
-
"id": "
|
|
175
|
-
"name": "
|
|
176
|
-
"summary": "
|
|
177
|
-
"guidePath": "./components/
|
|
222
|
+
"id": "toggle-group",
|
|
223
|
+
"name": "ToggleGroup",
|
|
224
|
+
"summary": "Toolbar toggle set with shared selection state and default Stack spacing on Base UI ToggleGroup.",
|
|
225
|
+
"guidePath": "./components/toggle-group/toggle-group.guide.json"
|
|
178
226
|
},
|
|
179
227
|
{
|
|
180
|
-
"id": "
|
|
181
|
-
"name": "
|
|
182
|
-
"summary": "
|
|
183
|
-
"guidePath": "./components/
|
|
228
|
+
"id": "typewriter",
|
|
229
|
+
"name": "Typewriter",
|
|
230
|
+
"summary": "Decorative inline typewriter animation that inherits typography and color from a parent text primitive.",
|
|
231
|
+
"guidePath": "./components/typewriter/typewriter.guide.json"
|
|
184
232
|
},
|
|
185
233
|
{
|
|
186
|
-
"id": "
|
|
187
|
-
"name": "
|
|
188
|
-
"summary": "
|
|
189
|
-
"guidePath": "./components/
|
|
234
|
+
"id": "tooltip",
|
|
235
|
+
"name": "Tooltip",
|
|
236
|
+
"summary": "Compound tooltip built on Base UI Tooltip with `Tooltip.Provider`, `Tooltip.Trigger`, `Tooltip.Content`, and `Tooltip.createHandle` for detached and multiple triggers; `Content` encapsulates Portal + Positioner + Popup + Viewport and animates position, size, and content between triggers.",
|
|
237
|
+
"guidePath": "./components/tooltip/tooltip.guide.json"
|
|
190
238
|
}
|
|
191
239
|
],
|
|
192
240
|
"consumption": "./consumption.json",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { AccordionItem } from '@base-ui/react/accordion';
|
|
2
|
+
import { SurfaceProps } from '../surface';
|
|
3
|
+
import type * as React from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Public Accordion.Item props.
|
|
6
|
+
*
|
|
7
|
+
* Wraps Base UI accordion item parts with optional Surface layout and panel height animation.
|
|
8
|
+
* Island separation between open/closed blocks is controlled by the root `Accordion` `islands` prop for surface items.
|
|
9
|
+
*
|
|
10
|
+
* @default Base UI pass-through props keep upstream defaults.
|
|
11
|
+
*/
|
|
12
|
+
export type AccordionItemProps = AccordionItem.Props & {
|
|
13
|
+
/**
|
|
14
|
+
* Visible trigger label rendered inside the accordion header button.
|
|
15
|
+
*
|
|
16
|
+
* @default No trigger label is rendered.
|
|
17
|
+
*/
|
|
18
|
+
trigger: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Panel content revealed when the item is open.
|
|
21
|
+
*
|
|
22
|
+
* @default No panel content is rendered.
|
|
23
|
+
*/
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* When `true`, wraps the item in `Surface` with border and open-block background.
|
|
27
|
+
* When `false`, renders without `Surface` so consumers can insert `Separator` between items;
|
|
28
|
+
* island styling is skipped for that item.
|
|
29
|
+
*
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
useSurface?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Side of the trigger label where the expand/collapse icon is rendered.
|
|
35
|
+
*
|
|
36
|
+
* @default end
|
|
37
|
+
*/
|
|
38
|
+
iconPosition?: 'start' | 'end';
|
|
39
|
+
/**
|
|
40
|
+
* Decorative icon shown when the item is closed.
|
|
41
|
+
*
|
|
42
|
+
* @default `<Icon name="Plus" size={16} />`
|
|
43
|
+
*/
|
|
44
|
+
iconClosed?: React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Decorative icon shown when the item is open.
|
|
47
|
+
*
|
|
48
|
+
* @default `<Icon name="Minus" size={16} />`
|
|
49
|
+
*/
|
|
50
|
+
iconOpen?: React.ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* Resting background for the item card, forwarded to the wrapping `Surface` when `useSurface` is `true`.
|
|
53
|
+
*
|
|
54
|
+
* @default 1
|
|
55
|
+
*/
|
|
56
|
+
color?: SurfaceProps['color'];
|
|
57
|
+
};
|
|
58
|
+
export declare const AccordionItemComponent: React.FC<AccordionItemProps>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { clsx } from "../../core/clsx.js";
|
|
2
|
+
import accordion_module_default from "./accordion.module.js";
|
|
3
|
+
import { Text } from "../text/text.js";
|
|
4
|
+
import { Stack } from "../stack/stack.js";
|
|
5
|
+
import { Icon } from "../icon/icon.js";
|
|
6
|
+
import { Surface } from "../surface/surface.js";
|
|
7
|
+
import { Accordion } from "@base-ui/react/accordion";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/accordion/accordion-item.tsx
|
|
10
|
+
var AccordionItemComponent = ({ children, className, color = 1, iconClosed = /* @__PURE__ */ jsx(Icon, {
|
|
11
|
+
name: "Plus",
|
|
12
|
+
size: 16
|
|
13
|
+
}), iconOpen = /* @__PURE__ */ jsx(Icon, {
|
|
14
|
+
name: "Minus",
|
|
15
|
+
size: 16
|
|
16
|
+
}), iconPosition = "end", trigger, useSurface = true, ...otherProps }) => {
|
|
17
|
+
const iconAtStart = iconPosition === "start";
|
|
18
|
+
const triggerIcon = /* @__PURE__ */ jsxs("span", {
|
|
19
|
+
"aria-hidden": true,
|
|
20
|
+
className: accordion_module_default.IconSlot,
|
|
21
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
22
|
+
className: accordion_module_default.Icon,
|
|
23
|
+
children: iconClosed
|
|
24
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
25
|
+
className: accordion_module_default.Icon,
|
|
26
|
+
children: iconOpen
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
return /* @__PURE__ */ jsxs(Accordion.Item, {
|
|
30
|
+
className: clsx(accordion_module_default.Item, className),
|
|
31
|
+
"data-use-surface": useSurface ? "true" : "false",
|
|
32
|
+
...useSurface && { render: /* @__PURE__ */ jsx(Surface, {
|
|
33
|
+
border: "all",
|
|
34
|
+
color
|
|
35
|
+
}) },
|
|
36
|
+
...otherProps,
|
|
37
|
+
children: [/* @__PURE__ */ jsx(Accordion.Header, { children: /* @__PURE__ */ jsxs(Accordion.Trigger, {
|
|
38
|
+
className: accordion_module_default.Trigger,
|
|
39
|
+
render: /* @__PURE__ */ jsx(Stack, {
|
|
40
|
+
columnGap: iconAtStart ? "small" : void 0,
|
|
41
|
+
direction: iconAtStart ? "row" : "row-reverse",
|
|
42
|
+
fillChildren: false,
|
|
43
|
+
hAlign: iconPosition === "end" ? "space-between" : "start",
|
|
44
|
+
hPadding: "medium",
|
|
45
|
+
render: /* @__PURE__ */ jsx("button", { type: "button" }),
|
|
46
|
+
vAlign: "center",
|
|
47
|
+
vPadding: "medium"
|
|
48
|
+
}),
|
|
49
|
+
children: [triggerIcon, /* @__PURE__ */ jsx(Text, {
|
|
50
|
+
weight: "semibold",
|
|
51
|
+
children: trigger
|
|
52
|
+
})]
|
|
53
|
+
}) }), /* @__PURE__ */ jsx(Accordion.Panel, {
|
|
54
|
+
className: accordion_module_default.Panel,
|
|
55
|
+
children: /* @__PURE__ */ jsx(Stack, {
|
|
56
|
+
fillChildren: false,
|
|
57
|
+
hPadding: "medium",
|
|
58
|
+
vPadding: ["2x-small", "medium"],
|
|
59
|
+
children
|
|
60
|
+
})
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
//#endregion
|
|
65
|
+
export { AccordionItemComponent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.viraui__accordion-module__Accordion_wFOlN{--vui-accordion-island-gap:var(--space-medium);--trigger-radius:var(--radius-large);inline-size:100%;&:dir(rtl) .viraui__accordion-module__Trigger_4HzIb[data-stack-direction=row-reverse]{direction:ltr;flex-direction:row}}.viraui__accordion-module__Item_66o2x{inline-size:100%;transition:margin var(--duration-fast) var(--easing-standard),background var(--duration-fast) var(--easing-standard),border-radius var(--duration-fast) var(--easing-standard);&[data-use-surface=true]{--vui-surface-border-radius-top-left:0;--vui-surface-border-radius-top-right:0;--vui-surface-border-radius-bottom-right:0;--vui-surface-border-radius-bottom-left:0;&:not([data-open]){--vui-surface-background:#0000}&:not([data-open])+&:not([data-open]),&[data-open]+&[data-open]{border-top-width:0}&:first-child,&:not([data-open])+&[data-open],&[data-open]+&:not([data-open]){--vui-surface-border-radius-top-left:var(--trigger-radius);--vui-surface-border-radius-top-right:var(--trigger-radius)}&:last-child,&:not([data-open]):has(+&[data-open]),&[data-open]:has(+&:not([data-open])){--vui-surface-border-radius-bottom-left:var(--trigger-radius);--vui-surface-border-radius-bottom-right:var(--trigger-radius)}&:not(:last-child):not([data-open]):has(+&[data-open]),&:not(:last-child)[data-open]:has(+&:not([data-open])){margin-block-end:var(--vui-accordion-island-gap)}}.viraui__accordion-module__Accordion_wFOlN[data-islands=false] &[data-use-surface=true]{&:not(:first-child){border-top-width:0}&:not([data-open])+&[data-open],&[data-open]+&:not([data-open]){--vui-surface-border-radius-top-left:0;--vui-surface-border-radius-top-right:0}&:not([data-open]):has(+&[data-open]),&[data-open]:has(+&:not([data-open])){--vui-surface-border-radius-bottom-left:0;--vui-surface-border-radius-bottom-right:0}&:not(:last-child):not([data-open]):has(+&[data-open]),&:not(:last-child)[data-open]:has(+&:not([data-open])){margin-block-end:0}}}.viraui__accordion-module__Trigger_4HzIb{inline-size:100%;border:0;background:#0000;cursor:pointer;text-align:start;color:inherit;&:focus-visible{outline-offset:-4px}&[data-disabled]{cursor:not-allowed;opacity:.5}.viraui__accordion-module__Item_66o2x[data-use-surface=true] &{&:focus-visible{border-radius:var(--radius-large);outline-offset:-4px}}}.viraui__accordion-module__IconSlot_AVQq3{position:relative;flex-shrink:0;inline-size:1rem;block-size:1rem}.viraui__accordion-module__Icon_qdu2v{position:absolute;inset:0;display:grid;place-items:center;transition:opacity var(--duration-fast) var(--easing-standard),rotate var(--duration-fast) var(--easing-standard);&:first-of-type{opacity:1;rotate:0deg}&:last-of-type{opacity:0;rotate:-90deg}.viraui__accordion-module__Trigger_4HzIb[data-panel-open] &:first-of-type{opacity:0;rotate:90deg}.viraui__accordion-module__Trigger_4HzIb[data-panel-open] &:last-of-type{opacity:1;rotate:0deg}@media (prefers-reduced-motion:reduce){transition:none}}.viraui__accordion-module__Panel_U1Ofk{block-size:var(--accordion-panel-height);overflow:hidden;transition:block-size var(--duration-fast) var(--easing-standard);&[data-ending-style],&[data-starting-style]{block-size:0}@media (prefers-reduced-motion:reduce){transition:none}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AccordionRoot } from '@base-ui/react/accordion';
|
|
2
|
+
import { AccordionItemProps } from './accordion-item';
|
|
3
|
+
import type * as React from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Public Accordion root props.
|
|
6
|
+
*
|
|
7
|
+
* Includes Base UI accordion root props such as `value`, `defaultValue`, `multiple`,
|
|
8
|
+
* and `onValueChange`.
|
|
9
|
+
*
|
|
10
|
+
* @default Base UI pass-through props keep upstream defaults.
|
|
11
|
+
*/
|
|
12
|
+
export type AccordionProps = AccordionRoot.Props & {
|
|
13
|
+
/**
|
|
14
|
+
* When `true`, open/closed blocks render as separated Surface islands with gap between them.
|
|
15
|
+
* When `false`, blocks stay attached with corner radius only on the first and last items.
|
|
16
|
+
* Applies only to items with `useSurface`.
|
|
17
|
+
*
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
islands?: boolean;
|
|
21
|
+
};
|
|
22
|
+
type AccordionComponent = React.FC<AccordionProps> & {
|
|
23
|
+
Item: React.FC<AccordionItemProps>;
|
|
24
|
+
};
|
|
25
|
+
export declare const Accordion: AccordionComponent;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Accordion",
|
|
3
|
+
"summary": "Collapsible sections grouped into open/closed blocks with optional Surface wrapping, shared corner radius, and background on open items.",
|
|
4
|
+
"whenToUse": [
|
|
5
|
+
"Progressive disclosure for related content sections in one surface",
|
|
6
|
+
"FAQ or settings groups where only one section may be open by default",
|
|
7
|
+
"Multiple open sections when `multiple` is enabled"
|
|
8
|
+
],
|
|
9
|
+
"whenNotToUse": [
|
|
10
|
+
"Primary navigation that should use links, tabs, or routes directly",
|
|
11
|
+
"Expecting to compose public Header/Trigger/Panel parts; those are owned by `Accordion.Item`"
|
|
12
|
+
],
|
|
13
|
+
"accessibility": [
|
|
14
|
+
"Provide meaningful `trigger` text so each section has an accessible name",
|
|
15
|
+
"Use `value` when controlling or identifying items programmatically",
|
|
16
|
+
"Disabled items cannot be expanded through pointer or keyboard"
|
|
17
|
+
],
|
|
18
|
+
"antiPatterns": [
|
|
19
|
+
"Trying to compose separate public `Accordion.Header`, `Accordion.Trigger`, or `Accordion.Panel` exports",
|
|
20
|
+
"Rendering an item without trigger text and without an external aria-label strategy"
|
|
21
|
+
],
|
|
22
|
+
"related": ["Surface", "Separator", "Stack", "Text", "Icon"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"css": {
|
|
25
|
+
"island-gap": {
|
|
26
|
+
"description": "Gap between separated Surface islands when islands={true}."
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './accordion.css';
|
|
2
|
+
import { clsx } from "../../core/clsx.js";
|
|
3
|
+
import accordion_module_default from "./accordion.module.js";
|
|
4
|
+
import { AccordionItemComponent } from "./accordion-item.js";
|
|
5
|
+
import { Stack } from "../stack/stack.js";
|
|
6
|
+
import { Accordion } from "@base-ui/react/accordion";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/accordion/accordion.tsx
|
|
9
|
+
var AccordionRootComponent = ({ children, className, islands = true, ...otherProps }) => /* @__PURE__ */ jsx(Accordion.Root, {
|
|
10
|
+
...otherProps,
|
|
11
|
+
render: /* @__PURE__ */ jsx(Stack, {
|
|
12
|
+
className: clsx(accordion_module_default.Accordion, className),
|
|
13
|
+
"data-islands": islands ? "true" : "false",
|
|
14
|
+
direction: "column",
|
|
15
|
+
fillChildren: false
|
|
16
|
+
}),
|
|
17
|
+
hiddenUntilFound: true,
|
|
18
|
+
children
|
|
19
|
+
});
|
|
20
|
+
var Accordion$1 = Object.assign(AccordionRootComponent, { Item: AccordionItemComponent });
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Accordion$1 as Accordion };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/components/accordion/accordion.module.css
|
|
2
|
+
var Accordion = "viraui__accordion-module__Accordion_wFOlN";
|
|
3
|
+
var Trigger = "viraui__accordion-module__Trigger_4HzIb";
|
|
4
|
+
var Item = "viraui__accordion-module__Item_66o2x";
|
|
5
|
+
var IconSlot = "viraui__accordion-module__IconSlot_AVQq3";
|
|
6
|
+
var Icon = "viraui__accordion-module__Icon_qdu2v";
|
|
7
|
+
var Panel = "viraui__accordion-module__Panel_U1Ofk";
|
|
8
|
+
var accordion_module_default = {
|
|
9
|
+
Accordion,
|
|
10
|
+
Trigger,
|
|
11
|
+
Item,
|
|
12
|
+
IconSlot,
|
|
13
|
+
Icon,
|
|
14
|
+
Panel
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Accordion, Icon, IconSlot, Item, Panel, Trigger, accordion_module_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__avatar-module__Avatar_BRuS3{--avatar-size:var(--space-2x-large);--avatar-background:var(--global-contrast);--avatar-foreground:var(--global-foreground);--avatar-radius:var(--radius-medium);display:inline-flex;align-items:center;justify-content:center;inline-size:var(--avatar-size);block-size:var(--avatar-size);min-inline-size:var(--avatar-size);min-block-size:var(--avatar-size);overflow:hidden;border-radius:var(--avatar-radius);background:var(--avatar-background);color:var(--avatar-foreground);vertical-align:middle;-webkit-user-select:none;user-select:none;container-name:viraui-avatar;container-type:inline-size;&[data-size=x-small]{--avatar-size:var(--space-large)}&[data-size=small]{--avatar-size:var(--space-2x-large)}&[data-size=regular]{--avatar-size:var(--space-wide)}&[data-size=big]{--avatar-size:var(--space-2x-wide)}}.viraui__avatar-module__Image_Q7bHi{inline-size:100%;block-size:100%;display:block;object-fit:cover}.viraui__avatar-module__Label_QASTF{font-size:30cqw}
|
|
1
|
+
.viraui__avatar-module__Avatar_BRuS3{--vui-avatar-size:var(--space-2x-large);--vui-avatar-background:var(--global-contrast);--vui-avatar-foreground:var(--global-foreground);--vui-avatar-radius:var(--radius-medium);display:inline-flex;align-items:center;justify-content:center;inline-size:var(--vui-avatar-size);block-size:var(--vui-avatar-size);min-inline-size:var(--vui-avatar-size);min-block-size:var(--vui-avatar-size);overflow:hidden;border-radius:var(--vui-avatar-radius);background:var(--vui-avatar-background);color:var(--vui-avatar-foreground);vertical-align:middle;-webkit-user-select:none;user-select:none;container-name:viraui-avatar;container-type:inline-size;&[data-size=x-small]{--vui-avatar-size:var(--space-large);--vui-avatar-radius:var(--radius-small)}&[data-size=small]{--vui-avatar-size:var(--space-2x-large)}&[data-size=regular]{--vui-avatar-size:var(--space-wide)}&[data-size=big]{--vui-avatar-size:var(--space-2x-wide);--vui-avatar-radius:var(--radius-large)}}.viraui__avatar-module__Image_Q7bHi{inline-size:100%;block-size:100%;display:block;object-fit:cover}.viraui__avatar-module__Label_QASTF{font-size:30cqw}
|
|
@@ -16,5 +16,29 @@
|
|
|
16
16
|
"Relying on Avatar children for layout sizing",
|
|
17
17
|
"Omitting meaningful alt text when the image conveys identity"
|
|
18
18
|
],
|
|
19
|
-
"related": ["Skeleton"]
|
|
19
|
+
"related": ["Skeleton"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"react": {
|
|
22
|
+
"size": {
|
|
23
|
+
"description": "Selects the rendered avatar footprint.",
|
|
24
|
+
"refCss": "size"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"css": {
|
|
28
|
+
"size": {
|
|
29
|
+
"description": "Avatar inline and block size on the root.",
|
|
30
|
+
"refReact": "size"
|
|
31
|
+
},
|
|
32
|
+
"radius": {
|
|
33
|
+
"description": "Corner radius on the root; size presets also adjust this.",
|
|
34
|
+
"refReact": "size"
|
|
35
|
+
},
|
|
36
|
+
"background": {
|
|
37
|
+
"description": "Root background fill behind image or fallback."
|
|
38
|
+
},
|
|
39
|
+
"foreground": {
|
|
40
|
+
"description": "Root foreground color for fallback content."
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
20
44
|
}
|
|
@@ -4,8 +4,8 @@ import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props
|
|
|
4
4
|
import avatar_module_default from "./avatar.module.js";
|
|
5
5
|
import { Text } from "../text/text.js";
|
|
6
6
|
import { Skeleton } from "../skeleton/skeleton.js";
|
|
7
|
-
import { Avatar } from "@base-ui/react/avatar";
|
|
8
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { Avatar } from "@base-ui/react/avatar";
|
|
9
9
|
//#region src/components/avatar/avatar.tsx
|
|
10
10
|
var fallbackTextSizeByAvatarSize = {
|
|
11
11
|
"x-small": "x-small",
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
//#region src/components/avatar/avatar.module.css
|
|
2
|
+
var Avatar = "viraui__avatar-module__Avatar_BRuS3";
|
|
3
|
+
var Image = "viraui__avatar-module__Image_Q7bHi";
|
|
4
|
+
var Label = "viraui__avatar-module__Label_QASTF";
|
|
1
5
|
var avatar_module_default = {
|
|
2
|
-
Avatar
|
|
3
|
-
Image
|
|
4
|
-
Label
|
|
6
|
+
Avatar,
|
|
7
|
+
Image,
|
|
8
|
+
Label
|
|
5
9
|
};
|
|
6
10
|
//#endregion
|
|
7
|
-
export { avatar_module_default as default };
|
|
11
|
+
export { Avatar, Image, Label, avatar_module_default as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.viraui__avatar-group-module__AvatarGroup_zOrR-{--avatar-size:var(--space-2x-large);--avatar-overlap-distance:var(--space-small);--avatar-group-gap-size:var(--space-x-small);--avatar-group-item-radius:var(--radius-medium);display:inline-flex;flex-wrap:nowrap;align-items:flex-start;min-inline-size:max-content;vertical-align:middle;&[data-direction=vertical]{flex-direction:column}&[data-size=x-small]{--avatar-size:var(--space-large);--avatar-overlap-distance:var(--space-x-small);--avatar-group-gap-size:var(--space-2x-small)}&[data-size=regular]{--avatar-size:var(--space-wide);--avatar-overlap-distance:var(--space-medium);--avatar-group-gap-size:var(--space-x-small)}&[data-size=big]{--avatar-size:var(--space-2x-wide);--avatar-overlap-distance:var(--space-large);--avatar-group-gap-size:var(--space-small)}}.viraui__avatar-group-module__AvatarWrapper_0opqY{position:relative;display:inline-flex;flex:0 0 auto;inline-size:var(--avatar-size);block-size:var(--avatar-size);.viraui__avatar-group-module__AvatarGroup_zOrR-[data-direction=horizontal] &:not(:first-child){margin-inline-start:calc(var(--avatar-overlap-distance) * -1)}.viraui__avatar-group-module__AvatarGroup_zOrR-[data-direction=vertical] &:not(:first-child){margin-block-start:calc(var(--avatar-overlap-distance) * -1)}--avatar-hole-half:calc((var(--avatar-size) / 2) + var(--avatar-group-gap-size));--avatar-hole-r:calc(min(var(--avatar-group-item-radius), var(--avatar-size) / 2) + var(--avatar-group-gap-size));.viraui__avatar-group-module__AvatarGroup_zOrR-:dir(ltr)[data-direction=horizontal] &:not(:last-child){--avatar-hole-cx:calc(100% + (var(--avatar-size) / 2) - var(--avatar-overlap-distance));--avatar-hole-cy:50%}.viraui__avatar-group-module__AvatarGroup_zOrR-:dir(rtl)[data-direction=horizontal] &:not(:last-child){--avatar-hole-cx:calc(var(--avatar-overlap-distance) - (var(--avatar-size) / 2));--avatar-hole-cy:50%}.viraui__avatar-group-module__AvatarGroup_zOrR-[data-direction=vertical] &:not(:last-child){--avatar-hole-cx:50%;--avatar-hole-cy:calc(100% + (var(--avatar-size) / 2) - var(--avatar-overlap-distance))}.viraui__avatar-group-module__AvatarGroup_zOrR- &:not(:last-child){--avatar-hole-edge:calc((var(--avatar-hole-half) - var(--avatar-hole-r)) * 2);--avatar-hole-corner-inset:calc(var(--avatar-hole-r) * 0.85);@supports (corner-shape:squircle){@container root not style(--corner-shape-enable: initial){--avatar-hole-corner-tr:curve by var(--avatar-hole-r) var(--avatar-hole-r) with var(--avatar-hole-corner-inset) 0px /var(--avatar-hole-r) calc(var(--avatar-hole-r) * 0.15);--avatar-hole-corner-br:curve by calc(var(--avatar-hole-r) * -1) var(--avatar-hole-r) with 0px var(--avatar-hole-corner-inset) /calc(var(--avatar-hole-r) * -0.15) var(--avatar-hole-r);--avatar-hole-corner-bl:curve by calc(var(--avatar-hole-r) * -1) calc(var(--avatar-hole-r) * -1) with calc(var(--avatar-hole-corner-inset) * -1) 0px /calc(var(--avatar-hole-r) * -1) calc(var(--avatar-hole-r) * -0.15);--avatar-hole-corner-tl:curve by var(--avatar-hole-r) calc(var(--avatar-hole-r) * -1) with 0px calc(var(--avatar-hole-corner-inset) * -1) /calc(var(--avatar-hole-r) * 0.15) calc(var(--avatar-hole-r) * -1)}}clip-path:shape(evenodd from 0 0,line to 100% 0,line to 100% 100%,line to 0 100%,close,move to calc(var(--avatar-hole-cx) - var(--avatar-hole-half) + var(--avatar-hole-r)) calc(var(--avatar-hole-cy) - var(--avatar-hole-half)),line by var(--avatar-hole-edge) 0,var(--avatar-hole-corner-tr,arc by var(--avatar-hole-r) var(--avatar-hole-r) of var(--avatar-hole-r) cw),line by 0 var(--avatar-hole-edge),var(
|
|
1
|
+
.viraui__avatar-group-module__AvatarGroup_zOrR-{--vui-avatar-group-size:var(--space-2x-large);--vui-avatar-group-overlap-distance:var(--space-small);--vui-avatar-group-gap-size:var(--space-x-small);--vui-avatar-group-item-radius:var(--radius-medium);display:inline-flex;flex-wrap:nowrap;align-items:flex-start;min-inline-size:max-content;vertical-align:middle;&[data-direction=vertical]{flex-direction:column}&[data-size=x-small]{--vui-avatar-group-size:var(--space-large);--vui-avatar-group-overlap-distance:var(--space-x-small);--vui-avatar-group-gap-size:var(--space-2x-small);--vui-avatar-group-item-radius:var(--radius-small)}&[data-size=small]{--vui-avatar-group-size:var(--space-2x-large);--vui-avatar-group-overlap-distance:var(--space-medium);--vui-avatar-group-gap-size:var(--space-x-small)}&[data-size=regular]{--vui-avatar-group-size:var(--space-wide);--vui-avatar-group-overlap-distance:var(--space-medium);--vui-avatar-group-gap-size:var(--space-x-small)}&[data-size=big]{--vui-avatar-group-size:var(--space-2x-wide);--vui-avatar-group-overlap-distance:var(--space-large);--vui-avatar-group-gap-size:var(--space-small);--vui-avatar-group-item-radius:var(--radius-large)}}.viraui__avatar-group-module__AvatarWrapper_0opqY{position:relative;display:inline-flex;flex:0 0 auto;inline-size:var(--vui-avatar-group-size);block-size:var(--vui-avatar-group-size);.viraui__avatar-group-module__AvatarGroup_zOrR-[data-direction=horizontal] &:not(:first-child){margin-inline-start:calc(var(--vui-avatar-group-overlap-distance) * -1)}.viraui__avatar-group-module__AvatarGroup_zOrR-[data-direction=vertical] &:not(:first-child){margin-block-start:calc(var(--vui-avatar-group-overlap-distance) * -1)}--avatar-hole-half:calc((var(--vui-avatar-group-size) / 2) + var(--vui-avatar-group-gap-size));--avatar-hole-r:calc(min(var(--vui-avatar-group-item-radius), var(--vui-avatar-group-size) / 2) + var(--vui-avatar-group-gap-size));.viraui__avatar-group-module__AvatarGroup_zOrR-:dir(ltr)[data-direction=horizontal] &:not(:last-child){--avatar-hole-cx:calc(100% + (var(--vui-avatar-group-size) / 2) - var(--vui-avatar-group-overlap-distance));--avatar-hole-cy:50%}.viraui__avatar-group-module__AvatarGroup_zOrR-:dir(rtl)[data-direction=horizontal] &:not(:last-child){--avatar-hole-cx:calc(var(--vui-avatar-group-overlap-distance) - (var(--vui-avatar-group-size) / 2));--avatar-hole-cy:50%}.viraui__avatar-group-module__AvatarGroup_zOrR-[data-direction=vertical] &:not(:last-child){--avatar-hole-cx:50%;--avatar-hole-cy:calc(100% + (var(--vui-avatar-group-size) / 2) - var(--vui-avatar-group-overlap-distance))}.viraui__avatar-group-module__AvatarGroup_zOrR- &:not(:last-child){--avatar-hole-edge:calc((var(--avatar-hole-half) - var(--avatar-hole-r)) * 2);--avatar-hole-corner-inset:calc(var(--avatar-hole-r) * 0.85);@supports (corner-shape:squircle){@container root not style(--corner-shape-enable: initial){--avatar-hole-corner-tr:curve by var(--avatar-hole-r) var(--avatar-hole-r) with var(--avatar-hole-corner-inset) 0px /var(--avatar-hole-r) calc(var(--avatar-hole-r) * 0.15);--avatar-hole-corner-br:curve by calc(var(--avatar-hole-r) * -1) var(--avatar-hole-r) with 0px var(--avatar-hole-corner-inset) /calc(var(--avatar-hole-r) * -0.15) var(--avatar-hole-r);--avatar-hole-corner-bl:curve by calc(var(--avatar-hole-r) * -1) calc(var(--avatar-hole-r) * -1) with calc(var(--avatar-hole-corner-inset) * -1) 0px /calc(var(--avatar-hole-r) * -1) calc(var(--avatar-hole-r) * -0.15);--avatar-hole-corner-tl:curve by var(--avatar-hole-r) calc(var(--avatar-hole-r) * -1) with 0px calc(var(--avatar-hole-corner-inset) * -1) /calc(var(--avatar-hole-r) * 0.15) calc(var(--avatar-hole-r) * -1)}}clip-path:shape(evenodd from 0 0,line to 100% 0,line to 100% 100%,line to 0 100%,close,move to calc(var(--avatar-hole-cx) - var(--avatar-hole-half) + var(--avatar-hole-r)) calc(var(--avatar-hole-cy) - var(--avatar-hole-half)),line by var(--avatar-hole-edge) 0,var(--avatar-hole-corner-tr,arc by var(--avatar-hole-r) var(--avatar-hole-r) of var(--avatar-hole-r) cw),line by 0 var(--avatar-hole-edge),var(
|
|
2
2
|
--avatar-hole-corner-br,arc by calc(var(--avatar-hole-r) * -1) var(--avatar-hole-r) of var(--avatar-hole-r) cw
|
|
3
3
|
),line by calc(var(--avatar-hole-edge) * -1) 0,var(
|
|
4
4
|
--avatar-hole-corner-bl,arc by calc(var(--avatar-hole-r) * -1) calc(var(--avatar-hole-r) * -1) of var(--avatar-hole-r) cw
|
|
5
5
|
),line by 0 calc(var(--avatar-hole-edge) * -1),var(
|
|
6
6
|
--avatar-hole-corner-tl,arc by var(--avatar-hole-r) calc(var(--avatar-hole-r) * -1) of var(--avatar-hole-r) cw
|
|
7
|
-
),close)}}.viraui__avatar-group-module__OverflowWrapper_bKv6I{inline-size:auto}.viraui__avatar-group-module__AvatarGroupItem_Vvlyh{--avatar-radius:var(--avatar-group-item-radius)}.viraui__avatar-group-module__OverflowPill_nMmTD{display:inline-flex;align-items:center;justify-content:center;min-inline-size:var(--avatar-size);block-size:var(--avatar-size)}
|
|
7
|
+
),close)}}.viraui__avatar-group-module__OverflowWrapper_bKv6I{inline-size:auto}.viraui__avatar-group-module__AvatarGroupItem_Vvlyh{--vui-avatar-radius:var(--vui-avatar-group-item-radius)}.viraui__avatar-group-module__OverflowPill_nMmTD{display:inline-flex;align-items:center;justify-content:center;min-inline-size:var(--vui-avatar-group-size);block-size:var(--vui-avatar-group-size)}
|
|
@@ -18,5 +18,31 @@
|
|
|
18
18
|
"Expecting grouped avatars to follow theme radius tokens instead of always rendering as circles",
|
|
19
19
|
"Using non-positive maxVisible values expecting truncation"
|
|
20
20
|
],
|
|
21
|
-
"related": ["Avatar"]
|
|
21
|
+
"related": ["Avatar"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"react": {
|
|
24
|
+
"size": {
|
|
25
|
+
"description": "Shared avatar footprint for every item in the group.",
|
|
26
|
+
"refCss": "size"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"css": {
|
|
30
|
+
"size": {
|
|
31
|
+
"description": "Rendered avatar size used for overlap layout.",
|
|
32
|
+
"refReact": "size"
|
|
33
|
+
},
|
|
34
|
+
"overlap-distance": {
|
|
35
|
+
"description": "Negative margin overlap between adjacent avatars.",
|
|
36
|
+
"refReact": "size"
|
|
37
|
+
},
|
|
38
|
+
"gap-size": {
|
|
39
|
+
"description": "Cutout gap used by overlap clip-path math.",
|
|
40
|
+
"refReact": "size"
|
|
41
|
+
},
|
|
42
|
+
"item-radius": {
|
|
43
|
+
"description": "Corner radius applied to grouped avatar items.",
|
|
44
|
+
"refReact": "size"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
22
48
|
}
|