@viraui/react 2026.6.5 → 2026.7.0-next.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 +24 -0
- package/dist/components/accordion/accordion-item.d.ts +10 -10
- package/dist/components/accordion/accordion.d.ts +2 -2
- package/dist/components/annotate/annotate.d.ts +15 -15
- package/dist/components/autocomplete/autocomplete-item.d.ts +3 -3
- package/dist/components/autocomplete/autocomplete.d.ts +12 -12
- package/dist/components/autocomplete/autocomplete.js +1 -1
- package/dist/components/avatar/avatar.d.ts +6 -6
- package/dist/components/avatar-group/avatar-group.d.ts +6 -6
- package/dist/components/badge/badge.d.ts +5 -5
- package/dist/components/basic-input/basic-input.d.ts +3 -2
- package/dist/components/basic-input/basic-input.js +7 -0
- package/dist/components/basic-input/input-control-group.d.ts +2 -2
- package/dist/components/beam/beam-pulse-driver.d.ts +1 -0
- package/dist/components/beam/beam-pulse-driver.js +2 -2
- package/dist/components/beam/beam.css +1 -1
- package/dist/components/beam/beam.d.ts +17 -14
- package/dist/components/beam/beam.js +31 -26
- package/dist/components/bleed/bleed.d.ts +3 -3
- package/dist/components/button/button-link.d.ts +1 -1
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/checkbox/checkbox-group.d.ts +1 -1
- package/dist/components/checkbox/checkbox.d.ts +7 -7
- package/dist/components/chip/chip.d.ts +6 -6
- package/dist/components/clamp-text/clamp-text.d.ts +5 -5
- package/dist/components/dialog/dialog-close.d.ts +1 -1
- package/dist/components/dialog/dialog-indent-background.d.ts +1 -1
- package/dist/components/dialog/dialog-indent.d.ts +1 -1
- package/dist/components/dialog/dialog-sheet.d.ts +10 -10
- package/dist/components/dialog/dialog-sheet.js +1 -1
- package/dist/components/dialog/dialog-trigger.d.ts +1 -1
- package/dist/components/dialog/dialog.d.ts +1 -1
- package/dist/components/disclosure/disclosure-panel.d.ts +12 -0
- package/dist/components/disclosure/disclosure-panel.js +13 -0
- package/dist/components/disclosure/disclosure-trigger.d.ts +46 -0
- package/dist/components/disclosure/disclosure-trigger.js +82 -0
- package/dist/components/disclosure/disclosure.css +1 -0
- package/dist/components/disclosure/disclosure.d.ts +25 -0
- package/dist/components/disclosure/disclosure.js +30 -0
- package/dist/components/disclosure/disclosure.module.js +15 -0
- package/dist/components/disclosure/index.d.ts +4 -0
- package/dist/components/elevator/elevator.d.ts +7 -7
- package/dist/components/fieldset/fieldset.d.ts +4 -4
- package/dist/components/fit-text/fit-text.d.ts +2 -2
- package/dist/components/glow/glow.d.ts +12 -12
- package/dist/components/grid/grid-item.d.ts +8 -8
- package/dist/components/grid/grid.d.ts +12 -12
- package/dist/components/icon-button/icon-button-link.d.ts +2 -2
- package/dist/components/icon-button/icon-button.d.ts +2 -2
- package/dist/components/index.d.ts +4 -0
- package/dist/components/linear-progress/linear-progress.d.ts +4 -4
- package/dist/components/masonry/masonry-item.d.ts +3 -3
- package/dist/components/masonry/masonry.d.ts +4 -4
- package/dist/components/menu/menu-checkbox-item.d.ts +4 -4
- package/dist/components/menu/menu-item.d.ts +4 -4
- package/dist/components/menu/menu-link-item.d.ts +4 -4
- package/dist/components/menu/menu-popup.d.ts +2 -2
- package/dist/components/menu/menu-popup.js +1 -1
- package/dist/components/menu/menu-radio-group.d.ts +2 -2
- package/dist/components/menu/menu-radio-item.d.ts +4 -4
- package/dist/components/menu/menu-separator.d.ts +1 -1
- package/dist/components/menu/menu-submenu-trigger.d.ts +3 -3
- package/dist/components/menu/menu.d.ts +3 -3
- package/dist/components/meter/meter.css +1 -1
- package/dist/components/meter/meter.d.ts +15 -5
- package/dist/components/meter/meter.js +2 -1
- package/dist/components/number-field/index.d.ts +2 -0
- package/dist/components/number-field/number-field.css +1 -0
- package/dist/components/number-field/number-field.d.ts +78 -0
- package/dist/components/number-field/number-field.js +120 -0
- package/dist/components/number-field/number-field.module.js +21 -0
- package/dist/components/otp-field/index.d.ts +4 -0
- package/dist/components/otp-field/otp-field-input.d.ts +12 -0
- package/dist/components/otp-field/otp-field-input.js +29 -0
- package/dist/components/otp-field/otp-field-separator.d.ts +13 -0
- package/dist/components/otp-field/otp-field-separator.js +20 -0
- package/dist/components/otp-field/otp-field.css +1 -0
- package/dist/components/otp-field/otp-field.d.ts +48 -0
- package/dist/components/otp-field/otp-field.js +78 -0
- package/dist/components/otp-field/otp-field.module.js +23 -0
- package/dist/components/popover/popover-sheet.d.ts +6 -6
- package/dist/components/popover/popover.d.ts +5 -5
- package/dist/components/progressive-blur/progressive-blur.d.ts +5 -5
- package/dist/components/prose/index.d.ts +2 -0
- package/dist/components/prose/prose.css +1 -0
- package/dist/components/prose/prose.d.ts +40 -0
- package/dist/components/prose/prose.js +27 -0
- package/dist/components/prose/prose.module.js +5 -0
- package/dist/components/radio/radio-group.d.ts +1 -1
- package/dist/components/radio/radio.d.ts +6 -6
- package/dist/components/select/select-indicator-slot.d.ts +1 -1
- package/dist/components/select/select-option.d.ts +4 -4
- package/dist/components/select/select-separator.d.ts +1 -1
- package/dist/components/select/select.d.ts +10 -10
- package/dist/components/select/select.js +1 -1
- package/dist/components/separator/separator.d.ts +15 -8
- package/dist/components/separator/separator.js +2 -1
- package/dist/components/shimmer/shimmer.d.ts +6 -6
- package/dist/components/skeleton/skeleton-overlay.d.ts +5 -5
- package/dist/components/skeleton/skeleton.d.ts +9 -9
- package/dist/components/slider/slider.d.ts +7 -7
- package/dist/components/spinner/spinner.d.ts +3 -3
- package/dist/components/stack/stack.d.ts +17 -17
- package/dist/components/static-noise/static-noise.d.ts +5 -5
- package/dist/components/surface/surface.d.ts +12 -12
- package/dist/components/switch/switch.d.ts +7 -7
- package/dist/components/tabs/tabs-list.d.ts +1 -1
- package/dist/components/tabs/tabs-panel.d.ts +1 -1
- package/dist/components/tabs/tabs-tab.d.ts +3 -3
- package/dist/components/tabs/tabs.d.ts +2 -2
- package/dist/components/text/text.css +1 -1
- package/dist/components/text/text.d.ts +24 -23
- package/dist/components/text/text.js +4 -2
- package/dist/components/textarea/textarea.d.ts +6 -6
- package/dist/components/textfield/textfield.css +1 -1
- package/dist/components/textfield/textfield.d.ts +19 -11
- package/dist/components/textfield/textfield.js +43 -39
- package/dist/components/textfield/textfield.module.js +3 -1
- package/dist/components/title/title.css +1 -1
- package/dist/components/title/title.d.ts +22 -21
- package/dist/components/title/title.js +4 -2
- package/dist/components/toast/toast-action.d.ts +1 -1
- package/dist/components/toast/toast-banner.d.ts +7 -7
- package/dist/components/toast/toast-banner.js +1 -1
- package/dist/components/toast/toast-viewport.d.ts +2 -2
- package/dist/components/toggle-button/toggle-button.d.ts +6 -6
- package/dist/components/toggle-group/toggle-group.d.ts +1 -1
- package/dist/components/tooltip/tooltip-content.d.ts +2 -2
- package/dist/components/typewriter/typewriter.d.ts +10 -10
- package/dist/index.js +7 -3
- package/dist/specs/components/accordion/usage.xml +1 -0
- package/dist/specs/components/beam/a11y.xml +3 -3
- package/dist/specs/components/beam/props.xml +22 -1
- package/dist/specs/components/beam/usage.xml +1 -0
- package/dist/specs/components/disclosure/a11y.xml +9 -0
- package/dist/specs/components/disclosure/meta.xml +20 -0
- package/dist/specs/components/disclosure/patterns.xml +55 -0
- package/dist/specs/components/disclosure/props.xml +54 -0
- package/dist/specs/components/disclosure/usage.xml +11 -0
- package/dist/specs/components/meter/patterns.xml +12 -0
- package/dist/specs/components/meter/props.xml +7 -0
- package/dist/specs/components/meter/usage.xml +2 -0
- package/dist/specs/components/number-field/a11y.xml +10 -0
- package/dist/specs/components/number-field/meta.xml +21 -0
- package/dist/specs/components/number-field/patterns.xml +43 -0
- package/dist/specs/components/number-field/props.xml +35 -0
- package/dist/specs/components/number-field/usage.xml +12 -0
- package/dist/specs/components/otp-field/a11y.xml +10 -0
- package/dist/specs/components/otp-field/meta.xml +20 -0
- package/dist/specs/components/otp-field/patterns.xml +66 -0
- package/dist/specs/components/otp-field/props.xml +29 -0
- package/dist/specs/components/otp-field/usage.xml +13 -0
- package/dist/specs/components/prose/a11y.xml +7 -0
- package/dist/specs/components/prose/meta.xml +18 -0
- package/dist/specs/components/prose/patterns.xml +59 -0
- package/dist/specs/components/prose/props.xml +37 -0
- package/dist/specs/components/prose/usage.xml +12 -0
- package/dist/specs/components/separator/props.xml +3 -0
- package/dist/specs/components/separator/usage.xml +1 -0
- package/dist/specs/components/text/props.xml +2 -2
- package/dist/specs/components/text/usage.xml +1 -0
- package/dist/specs/components/textfield/meta.xml +1 -0
- package/dist/specs/components/textfield/props.xml +6 -1
- package/dist/specs/components/textfield/usage.xml +2 -1
- package/dist/specs/components/title/props.xml +2 -2
- package/dist/specs/components/title/usage.xml +1 -0
- package/dist/specs/index.xml +41 -1
- package/package.json +2 -2
package/dist/catalog.json
CHANGED
|
@@ -86,6 +86,12 @@
|
|
|
86
86
|
"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.",
|
|
87
87
|
"agentDocs": "./specs/components/dialog/meta.xml"
|
|
88
88
|
},
|
|
89
|
+
{
|
|
90
|
+
"id": "disclosure",
|
|
91
|
+
"name": "Disclosure",
|
|
92
|
+
"summary": "Single-section expand/collapse wrapping Base UI Collapsible. Default Trigger is Surface with render → Collapsible Trigger; Panel is a height motion shell with no default content padding. Use Accordion for multi-item lists.",
|
|
93
|
+
"agentDocs": "./specs/components/disclosure/meta.xml"
|
|
94
|
+
},
|
|
89
95
|
{
|
|
90
96
|
"id": "elevator",
|
|
91
97
|
"name": "Elevator",
|
|
@@ -146,6 +152,18 @@
|
|
|
146
152
|
"summary": "Shows a determinate metric in a compact horizontal track for static capacity, level, or score values.",
|
|
147
153
|
"agentDocs": "./specs/components/meter/meta.xml"
|
|
148
154
|
},
|
|
155
|
+
{
|
|
156
|
+
"id": "number-field",
|
|
157
|
+
"name": "NumberField",
|
|
158
|
+
"summary": "Single public NumberField with Field chrome, internal IconButton steppers, and optional label scrub. Group / Decrement / Increment / ScrubArea stay internal.",
|
|
159
|
+
"agentDocs": "./specs/components/number-field/meta.xml"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": "otp-field",
|
|
163
|
+
"name": "OTPField",
|
|
164
|
+
"summary": "Field-wrapped one-time code slots. Default slots compose Textfield controlOnly; one label/helper on OTPField.",
|
|
165
|
+
"agentDocs": "./specs/components/otp-field/meta.xml"
|
|
166
|
+
},
|
|
149
167
|
{
|
|
150
168
|
"id": "popover",
|
|
151
169
|
"name": "Popover",
|
|
@@ -158,6 +176,12 @@
|
|
|
158
176
|
"summary": "Decorative stacked backdrop-filter overlay that ramps blur from one edge toward the opposite edge. GPU/memory-heavy — use sparingly; prefer one focal instance per view.",
|
|
159
177
|
"agentDocs": "./specs/components/progressive-blur/meta.xml"
|
|
160
178
|
},
|
|
179
|
+
{
|
|
180
|
+
"id": "prose",
|
|
181
|
+
"name": "Prose",
|
|
182
|
+
"summary": "Grouping region that applies heading-aware em rhythm to direct document blocks.",
|
|
183
|
+
"agentDocs": "./specs/components/prose/meta.xml"
|
|
184
|
+
},
|
|
161
185
|
{
|
|
162
186
|
"id": "radio",
|
|
163
187
|
"name": "Radio",
|
|
@@ -8,19 +8,19 @@ import type * as React from 'react';
|
|
|
8
8
|
* Wraps Base UI accordion item parts with optional Surface layout and panel height animation.
|
|
9
9
|
* Island separation between open/closed blocks is controlled by the root `Accordion` `islands` prop for surface items.
|
|
10
10
|
*
|
|
11
|
-
* @
|
|
11
|
+
* @defaultValue Base UI pass-through props keep upstream defaults.
|
|
12
12
|
*/
|
|
13
13
|
export type AccordionItemProps = AccordionItem.Props & {
|
|
14
14
|
/**
|
|
15
15
|
* Visible trigger label rendered inside the accordion header button.
|
|
16
16
|
*
|
|
17
|
-
* @
|
|
17
|
+
* @defaultValue No trigger label is rendered.
|
|
18
18
|
*/
|
|
19
19
|
trigger: React.ReactNode;
|
|
20
20
|
/**
|
|
21
21
|
* Panel content revealed when the item is open.
|
|
22
22
|
*
|
|
23
|
-
* @
|
|
23
|
+
* @defaultValue No panel content is rendered.
|
|
24
24
|
*/
|
|
25
25
|
children?: React.ReactNode;
|
|
26
26
|
/**
|
|
@@ -28,45 +28,45 @@ export type AccordionItemProps = AccordionItem.Props & {
|
|
|
28
28
|
* When `false`, renders without `Surface` so consumers can insert `Separator` between items;
|
|
29
29
|
* island styling is skipped for that item.
|
|
30
30
|
*
|
|
31
|
-
* @
|
|
31
|
+
* @defaultValue true
|
|
32
32
|
*/
|
|
33
33
|
useSurface?: boolean;
|
|
34
34
|
/**
|
|
35
35
|
* Side of the trigger label where the expand/collapse icon is rendered.
|
|
36
36
|
*
|
|
37
|
-
* @
|
|
37
|
+
* @defaultValue end
|
|
38
38
|
*/
|
|
39
39
|
iconPosition?: 'start' | 'end';
|
|
40
40
|
/**
|
|
41
41
|
* Decorative icon shown when the item is closed.
|
|
42
42
|
*
|
|
43
|
-
* @
|
|
43
|
+
* @defaultValue Built-in Plus chrome SVG at size 16
|
|
44
44
|
*/
|
|
45
45
|
iconClosed?: React.ReactNode;
|
|
46
46
|
/**
|
|
47
47
|
* Decorative icon shown when the item is open.
|
|
48
48
|
*
|
|
49
|
-
* @
|
|
49
|
+
* @defaultValue Built-in Minus chrome SVG at size 16
|
|
50
50
|
*/
|
|
51
51
|
iconOpen?: React.ReactNode;
|
|
52
52
|
/**
|
|
53
53
|
* Contrast border side(s) forwarded to the wrapping `Surface` when `useSurface` is `true`.
|
|
54
54
|
* Pass a single side or a list (e.g. `['bottom', 'left']`). Omit for no border.
|
|
55
55
|
*
|
|
56
|
-
* @
|
|
56
|
+
* @defaultValue No border.
|
|
57
57
|
*/
|
|
58
58
|
border?: SurfaceProps['border'];
|
|
59
59
|
/**
|
|
60
60
|
* Resting background for the item card, forwarded to the wrapping `Surface` when `useSurface` is `true`.
|
|
61
61
|
* Omit for no background (`Surface` leaves `--vui-surface-background` as `none`).
|
|
62
62
|
*
|
|
63
|
-
* @
|
|
63
|
+
* @defaultValue No background.
|
|
64
64
|
*/
|
|
65
65
|
color?: SurfaceProps['color'];
|
|
66
66
|
/**
|
|
67
67
|
* Corner radius token for the wrapping `Surface` island edges when `useSurface` is `true`.
|
|
68
68
|
*
|
|
69
|
-
* @
|
|
69
|
+
* @defaultValue medium
|
|
70
70
|
*/
|
|
71
71
|
radius?: ThemeTypes['radius'];
|
|
72
72
|
};
|
|
@@ -7,7 +7,7 @@ import type * as React from 'react';
|
|
|
7
7
|
* Includes Base UI accordion root props such as `value`, `defaultValue`, `multiple`,
|
|
8
8
|
* and `onValueChange`.
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
10
|
+
* @defaultValue Base UI pass-through props keep upstream defaults.
|
|
11
11
|
*/
|
|
12
12
|
export type AccordionProps = AccordionRoot.Props & {
|
|
13
13
|
/**
|
|
@@ -15,7 +15,7 @@ export type AccordionProps = AccordionRoot.Props & {
|
|
|
15
15
|
* When `false`, blocks stay attached with corner radius only on the first and last items.
|
|
16
16
|
* Applies only to items with `useSurface`.
|
|
17
17
|
*
|
|
18
|
-
* @
|
|
18
|
+
* @defaultValue true
|
|
19
19
|
*/
|
|
20
20
|
islands?: boolean;
|
|
21
21
|
};
|
|
@@ -7,7 +7,7 @@ export type AnnotateSide = 'top-start' | 'top' | 'top-end' | 'end' | 'bottom-end
|
|
|
7
7
|
* Includes standard `span` attributes such as `children`, `id`, `className`, and event handlers,
|
|
8
8
|
* plus Vira-owned decorative annotation controls.
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
10
|
+
* @defaultValue Native span pass-through props keep React defaults.
|
|
11
11
|
*/
|
|
12
12
|
export type AnnotateProps = React.ComponentPropsWithRef<'span'> & {
|
|
13
13
|
/**
|
|
@@ -15,86 +15,86 @@ export type AnnotateProps = React.ComponentPropsWithRef<'span'> & {
|
|
|
15
15
|
*
|
|
16
16
|
* Do not put critical information here — assistive tech does not announce the note.
|
|
17
17
|
*
|
|
18
|
-
* @
|
|
18
|
+
* @defaultValue No note; arrow and label stay hidden.
|
|
19
19
|
*/
|
|
20
20
|
note?: string;
|
|
21
21
|
/**
|
|
22
22
|
* Places the decorative arrow and label relative to the wrapped content.
|
|
23
23
|
*
|
|
24
|
-
* @
|
|
24
|
+
* @defaultValue 'top'
|
|
25
25
|
*/
|
|
26
26
|
side?: AnnotateSide;
|
|
27
27
|
/**
|
|
28
28
|
* Highlight token driving arrow, label, and optional mark color via `--vui-annotate-color`.
|
|
29
29
|
*
|
|
30
|
-
* @
|
|
30
|
+
* @defaultValue `var(--global-foreground)` when omitted
|
|
31
31
|
*/
|
|
32
32
|
color?: ThemeTypes['highlight'];
|
|
33
33
|
/**
|
|
34
34
|
* When true, applies a highlighter mark behind the wrapped content.
|
|
35
35
|
*
|
|
36
|
-
* @
|
|
36
|
+
* @defaultValue false
|
|
37
37
|
*/
|
|
38
38
|
mark?: boolean;
|
|
39
39
|
/**
|
|
40
40
|
* Horizontal offset for the arrow pseudo (`--vui-annotate-arrow-x`).
|
|
41
41
|
*
|
|
42
|
-
* @
|
|
42
|
+
* @defaultValue `0px`
|
|
43
43
|
*/
|
|
44
44
|
arrowOffsetX?: string;
|
|
45
45
|
/**
|
|
46
46
|
* Vertical offset for the arrow pseudo (`--vui-annotate-arrow-y`).
|
|
47
47
|
*
|
|
48
|
-
* @
|
|
48
|
+
* @defaultValue `0px`
|
|
49
49
|
*/
|
|
50
50
|
arrowOffsetY?: string;
|
|
51
51
|
/**
|
|
52
52
|
* Horizontal nudge for the note via translateX on the inner nudge wrapper.
|
|
53
53
|
*
|
|
54
|
-
* @
|
|
54
|
+
* @defaultValue `0px`
|
|
55
55
|
*/
|
|
56
56
|
textOffsetX?: string;
|
|
57
57
|
/**
|
|
58
58
|
* Vertical nudge for the note via translateY on the inner nudge wrapper.
|
|
59
59
|
*
|
|
60
|
-
* @
|
|
60
|
+
* @defaultValue `0px`
|
|
61
61
|
*/
|
|
62
62
|
textOffsetY?: string;
|
|
63
63
|
/**
|
|
64
64
|
* Rotation for the label (and composed transforms) via `--vui-annotate-rotate`.
|
|
65
65
|
*
|
|
66
|
-
* @
|
|
66
|
+
* @defaultValue `-4deg`
|
|
67
67
|
*/
|
|
68
68
|
rotate?: string;
|
|
69
69
|
/**
|
|
70
70
|
* Gap between the target and the arrow via `--vui-annotate-target-gap`.
|
|
71
71
|
*
|
|
72
|
-
* @
|
|
72
|
+
* @defaultValue `var(--space-s)`
|
|
73
73
|
*/
|
|
74
74
|
targetGap?: string;
|
|
75
75
|
/**
|
|
76
76
|
* Gap between arrow and label on all sides via `--vui-annotate-label-gap`.
|
|
77
77
|
*
|
|
78
|
-
* @
|
|
78
|
+
* @defaultValue `var(--space-xs)`
|
|
79
79
|
*/
|
|
80
80
|
labelGap?: string;
|
|
81
81
|
/**
|
|
82
82
|
* Max width for the label pseudo via `--vui-annotate-label-max-width`.
|
|
83
83
|
*
|
|
84
|
-
* @
|
|
84
|
+
* @defaultValue `300px`
|
|
85
85
|
*/
|
|
86
86
|
labelMaxWidth?: string;
|
|
87
87
|
/**
|
|
88
88
|
* Stacking order for arrow and note via `--vui-annotate-z-index`.
|
|
89
89
|
* Same value on both parts.
|
|
90
90
|
*
|
|
91
|
-
* @
|
|
91
|
+
* @defaultValue undefined (`auto`)
|
|
92
92
|
*/
|
|
93
93
|
zIndex?: React.CSSProperties['zIndex'];
|
|
94
94
|
/**
|
|
95
95
|
* Text alignment for the note via `--vui-annotate-text-align`.
|
|
96
96
|
*
|
|
97
|
-
* @
|
|
97
|
+
* @defaultValue undefined (`start`)
|
|
98
98
|
*/
|
|
99
99
|
textAlign?: React.CSSProperties['textAlign'];
|
|
100
100
|
};
|
|
@@ -4,19 +4,19 @@ import type * as React from 'react';
|
|
|
4
4
|
/**
|
|
5
5
|
* Public Autocomplete.Item props.
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @defaultValue Base UI pass-through props keep upstream defaults.
|
|
8
8
|
*/
|
|
9
9
|
export type AutocompleteItemProps = AutocompleteItem.Props & {
|
|
10
10
|
/**
|
|
11
11
|
* Decorative leading node rendered before the item label.
|
|
12
12
|
*
|
|
13
|
-
* @
|
|
13
|
+
* @defaultValue No addon is rendered.
|
|
14
14
|
*/
|
|
15
15
|
addon?: React.ReactNode;
|
|
16
16
|
/**
|
|
17
17
|
* Vertical alignment of the addon relative to the item label row.
|
|
18
18
|
*
|
|
19
|
-
* @
|
|
19
|
+
* @defaultValue 'center'
|
|
20
20
|
*/
|
|
21
21
|
addonAlign?: StackProps['vAlign'];
|
|
22
22
|
};
|
|
@@ -11,70 +11,70 @@ import type * as React from 'react';
|
|
|
11
11
|
* `mode`, `filter`, `limit`, and `autoHighlight`, plus optional field copy and Textfield
|
|
12
12
|
* control-group chrome (`startAddon` / `endAddon` / `fitContent`).
|
|
13
13
|
*
|
|
14
|
-
* @
|
|
14
|
+
* @defaultValue Base UI pass-through props keep upstream defaults.
|
|
15
15
|
*/
|
|
16
16
|
export type AutocompleteProps = Omit<AutocompleteRoot.Props<any>, 'children'> & Omit<FieldRoot.Props, 'ref' | 'children'> & {
|
|
17
17
|
/**
|
|
18
18
|
* Visible label rendered with shared internal `FieldLabel`.
|
|
19
19
|
*
|
|
20
|
-
* @
|
|
20
|
+
* @defaultValue No label is rendered.
|
|
21
21
|
*/
|
|
22
22
|
label?: React.ReactNode;
|
|
23
23
|
/**
|
|
24
24
|
* Helper copy rendered with `Field.Description` and `Text` while the field is valid.
|
|
25
25
|
*
|
|
26
|
-
* @
|
|
26
|
+
* @defaultValue No description is rendered.
|
|
27
27
|
*/
|
|
28
28
|
description?: React.ReactNode;
|
|
29
29
|
/**
|
|
30
30
|
* Error copy rendered with `Field.Error` and `Text` in the same slot as `description`.
|
|
31
31
|
* Replaces description while the field is invalid and dirty.
|
|
32
32
|
*
|
|
33
|
-
* @
|
|
33
|
+
* @defaultValue No static error copy is rendered.
|
|
34
34
|
*/
|
|
35
35
|
error?: React.ReactNode;
|
|
36
36
|
/**
|
|
37
37
|
* Leading decoration (prefix text, icon). Not a second field control.
|
|
38
38
|
*
|
|
39
|
-
* @
|
|
39
|
+
* @defaultValue No start addon is rendered.
|
|
40
40
|
*/
|
|
41
41
|
startAddon?: React.ReactNode;
|
|
42
42
|
/**
|
|
43
43
|
* Trailing decoration (icon, button). Buttons must use `type="button"`.
|
|
44
44
|
*
|
|
45
|
-
* @
|
|
45
|
+
* @defaultValue No end addon is rendered.
|
|
46
46
|
*/
|
|
47
47
|
endAddon?: React.ReactNode;
|
|
48
48
|
/**
|
|
49
49
|
* When `true`, sets `field-sizing: content` so the control grows inline with its value.
|
|
50
50
|
* Block chrome stays `var(--vui-autocomplete-input-height)`. Omitted / `false` keeps the browser fixed default.
|
|
51
51
|
*
|
|
52
|
-
* @
|
|
52
|
+
* @defaultValue undefined (browser fixed)
|
|
53
53
|
*/
|
|
54
54
|
fitContent?: BasicInputProps['fitContent'];
|
|
55
55
|
/**
|
|
56
56
|
* Placeholder text shown in the input when empty.
|
|
57
57
|
*
|
|
58
|
-
* @
|
|
58
|
+
* @defaultValue No placeholder is rendered.
|
|
59
59
|
*/
|
|
60
60
|
placeholder?: string;
|
|
61
61
|
/**
|
|
62
62
|
* Content rendered inside baked `Autocomplete.Empty` when the filtered list has no items.
|
|
63
63
|
*
|
|
64
|
-
* @
|
|
64
|
+
* @defaultValue No empty copy is rendered.
|
|
65
65
|
*/
|
|
66
66
|
empty?: React.ReactNode;
|
|
67
67
|
/**
|
|
68
68
|
* Content rendered inside baked `Autocomplete.Status` (async / limit messaging).
|
|
69
69
|
* Keep the slot mounted; update children when status changes.
|
|
70
70
|
*
|
|
71
|
-
* @
|
|
71
|
+
* @defaultValue No status copy is rendered.
|
|
72
72
|
*/
|
|
73
73
|
status?: React.ReactNode;
|
|
74
74
|
/**
|
|
75
75
|
* Ref forwarded to the autocomplete input.
|
|
76
76
|
*
|
|
77
|
-
* @
|
|
77
|
+
* @defaultValue No ref is attached.
|
|
78
78
|
*/
|
|
79
79
|
ref?: React.Ref<HTMLInputElement>;
|
|
80
80
|
/**
|
|
@@ -82,7 +82,7 @@ export type AutocompleteProps = Omit<AutocompleteRoot.Props<any>, 'children'> &
|
|
|
82
82
|
* Omit for Base UI default (`document.body` from the module window —
|
|
83
83
|
* iframe hosts must pass the iframe document body explicitly).
|
|
84
84
|
*
|
|
85
|
-
* @
|
|
85
|
+
* @defaultValue Base UI FloatingPortal resolution
|
|
86
86
|
*/
|
|
87
87
|
container?: React.ComponentProps<typeof PrimitiveAutocomplete.Portal>['container'];
|
|
88
88
|
/**
|
|
@@ -10,8 +10,8 @@ import { Stack } from "../stack/stack.js";
|
|
|
10
10
|
import { AutocompleteGroup } from "./autocomplete-group.js";
|
|
11
11
|
import autocomplete_module_default from "./autocomplete.module.js";
|
|
12
12
|
import { AutocompleteItemPart } from "./autocomplete-item.js";
|
|
13
|
-
import { Elevator } from "../elevator/elevator.js";
|
|
14
13
|
import { Surface } from "../surface/surface.js";
|
|
14
|
+
import { Elevator } from "../elevator/elevator.js";
|
|
15
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
16
|
import { Autocomplete } from "@base-ui/react/autocomplete";
|
|
17
17
|
import { Field } from "@base-ui/react/field";
|
|
@@ -5,37 +5,37 @@ import type * as React from 'react';
|
|
|
5
5
|
* Includes standard `span` attributes such as `id`, `title`, ARIA props, and event handlers,
|
|
6
6
|
* plus Vira-owned image, fallback, and size controls.
|
|
7
7
|
*
|
|
8
|
-
* @
|
|
8
|
+
* @defaultValue Native span pass-through props keep React defaults.
|
|
9
9
|
*/
|
|
10
10
|
export type AvatarProps = React.ComponentPropsWithRef<'span'> & {
|
|
11
11
|
/**
|
|
12
12
|
* Supplies the avatar image source URL.
|
|
13
13
|
*
|
|
14
|
-
* @
|
|
14
|
+
* @defaultValue No default; when omitted the fallback renders.
|
|
15
15
|
*/
|
|
16
16
|
src?: string;
|
|
17
17
|
/**
|
|
18
18
|
* Supplies alternative text for the avatar image.
|
|
19
19
|
*
|
|
20
|
-
* @
|
|
20
|
+
* @defaultValue ''
|
|
21
21
|
*/
|
|
22
22
|
alt?: string;
|
|
23
23
|
/**
|
|
24
24
|
* Supplies the content shown when the image is absent or fails to load.
|
|
25
25
|
*
|
|
26
|
-
* @
|
|
26
|
+
* @defaultValue No default; consumer must provide a value.
|
|
27
27
|
*/
|
|
28
28
|
fallback: React.ReactNode;
|
|
29
29
|
/**
|
|
30
30
|
* Selects the rendered avatar footprint.
|
|
31
31
|
*
|
|
32
|
-
* @
|
|
32
|
+
* @defaultValue 's'
|
|
33
33
|
*/
|
|
34
34
|
size?: 'xs' | 's' | 'm' | 'l';
|
|
35
35
|
/**
|
|
36
36
|
* Ref forwarded to the rendered avatar root element.
|
|
37
37
|
*
|
|
38
|
-
* @
|
|
38
|
+
* @defaultValue No ref is attached.
|
|
39
39
|
*/
|
|
40
40
|
ref?: React.Ref<HTMLSpanElement>;
|
|
41
41
|
};
|
|
@@ -7,25 +7,25 @@ type AvatarGroupAvatarProps = Omit<AvatarProps, 'size' | 'ref'>;
|
|
|
7
7
|
* Includes standard `div` attributes such as `id`, `role`, `title`, data attributes, and event handlers,
|
|
8
8
|
* plus Vira-owned avatar composition controls.
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
10
|
+
* @defaultValue Native div pass-through props keep React defaults.
|
|
11
11
|
*/
|
|
12
12
|
export type AvatarGroupProps = React.ComponentPropsWithRef<'div'> & {
|
|
13
13
|
/**
|
|
14
14
|
* Supplies the avatar payloads rendered by the group in DOM order.
|
|
15
15
|
*
|
|
16
|
-
* @
|
|
16
|
+
* @defaultValue No default; consumers must provide an array.
|
|
17
17
|
*/
|
|
18
18
|
avatars: AvatarGroupAvatarProps[];
|
|
19
19
|
/**
|
|
20
20
|
* Selects the shared avatar footprint for every rendered avatar.
|
|
21
21
|
*
|
|
22
|
-
* @
|
|
22
|
+
* @defaultValue 's'
|
|
23
23
|
*/
|
|
24
24
|
size?: AvatarProps['size'];
|
|
25
25
|
/**
|
|
26
26
|
* Chooses whether avatars overlap across the inline or block axis.
|
|
27
27
|
*
|
|
28
|
-
* @
|
|
28
|
+
* @defaultValue 'horizontal'
|
|
29
29
|
*/
|
|
30
30
|
direction?: 'horizontal' | 'vertical';
|
|
31
31
|
/**
|
|
@@ -33,13 +33,13 @@ export type AvatarGroupProps = React.ComponentPropsWithRef<'div'> & {
|
|
|
33
33
|
*
|
|
34
34
|
* Omitted, zero, and negative values are ignored.
|
|
35
35
|
*
|
|
36
|
-
* @
|
|
36
|
+
* @defaultValue No truncation.
|
|
37
37
|
*/
|
|
38
38
|
maxVisible?: number;
|
|
39
39
|
/**
|
|
40
40
|
* Supplies the content rendered inside the optional overflow pill when truncation is active.
|
|
41
41
|
*
|
|
42
|
-
* @
|
|
42
|
+
* @defaultValue No overflow pill content.
|
|
43
43
|
*/
|
|
44
44
|
overflowText?: React.ReactNode;
|
|
45
45
|
};
|
|
@@ -7,32 +7,32 @@ export type BadgePosition = 'top-end' | 'top-start' | 'bottom-end' | 'bottom-sta
|
|
|
7
7
|
* Includes standard `div` attributes such as `children`, `id`, `className`, and event handlers,
|
|
8
8
|
* plus Vira-owned decorative status-dot controls.
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
10
|
+
* @defaultValue Native div pass-through props keep React defaults.
|
|
11
11
|
*/
|
|
12
12
|
export type BadgeProps = React.ComponentPropsWithRef<'div'> & {
|
|
13
13
|
/**
|
|
14
14
|
* Diameter of the status dot via `--vui-badge-size`.
|
|
15
15
|
*
|
|
16
|
-
* @
|
|
16
|
+
* @defaultValue '0.5rem'
|
|
17
17
|
*/
|
|
18
18
|
size?: string;
|
|
19
19
|
/**
|
|
20
20
|
* Highlight token driving the status-dot color via `--vui-badge-color`.
|
|
21
21
|
*
|
|
22
|
-
* @
|
|
22
|
+
* @defaultValue `var(--global-primary)` when omitted
|
|
23
23
|
*/
|
|
24
24
|
color?: ThemeTypes['highlight'];
|
|
25
25
|
/**
|
|
26
26
|
* When true, shows the decorative status dot and applies the radial mask cutout.
|
|
27
27
|
* Enter: hole expands, then the dot scales in. Exit: reverse (dot then hole).
|
|
28
28
|
*
|
|
29
|
-
* @
|
|
29
|
+
* @defaultValue false
|
|
30
30
|
*/
|
|
31
31
|
show?: boolean;
|
|
32
32
|
/**
|
|
33
33
|
* Places the status dot on a corner of the wrapped content.
|
|
34
34
|
*
|
|
35
|
-
* @
|
|
35
|
+
* @defaultValue 'top-end'
|
|
36
36
|
*/
|
|
37
37
|
position?: BadgePosition;
|
|
38
38
|
};
|
|
@@ -5,7 +5,8 @@ import * as React from 'react';
|
|
|
5
5
|
*
|
|
6
6
|
* Merges `BasicInput` and `Control` classes onto one field control surface.
|
|
7
7
|
* With `render={<Input />}` (Base UI input), renders `Input` only — it already wraps
|
|
8
|
-
* `Field.Control`. With `render
|
|
8
|
+
* `Field.Control`. With a component `render` (OTP Input), clones that element (no Field.Control).
|
|
9
|
+
* With `render={<textarea />}`, renders `Field.Control` + native textarea.
|
|
9
10
|
*/
|
|
10
11
|
export type BasicInputProps = Omit<Field.Control.Props, 'ref'> & {
|
|
11
12
|
ref?: React.Ref<HTMLElement> | undefined;
|
|
@@ -13,7 +14,7 @@ export type BasicInputProps = Omit<Field.Control.Props, 'ref'> & {
|
|
|
13
14
|
* When `true`, sets `field-sizing: content` on the control via `data-sizing="content"`.
|
|
14
15
|
* Omitted / `false` keeps the browser `field-sizing: fixed` default.
|
|
15
16
|
*
|
|
16
|
-
* @
|
|
17
|
+
* @defaultValue undefined (browser fixed)
|
|
17
18
|
*/
|
|
18
19
|
fitContent?: boolean;
|
|
19
20
|
};
|
|
@@ -7,6 +7,7 @@ import { Input } from "@base-ui/react/input";
|
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
//#region src/components/basic-input/basic-input.tsx
|
|
9
9
|
var usesInputPrimitiveRender = (render) => React.isValidElement(render) && render.type === Input;
|
|
10
|
+
var usesComponentRender = (render) => React.isValidElement(render) && typeof render.type !== "string";
|
|
10
11
|
var BasicInput = React.forwardRef(function BasicInput({ className, render, fitContent, ...otherProps }, ref) {
|
|
11
12
|
const mergedClassName = clsx(basic_input_module_default.BasicInput, className);
|
|
12
13
|
const sizingProps = { ...fitContent && { "data-sizing": "content" } };
|
|
@@ -16,6 +17,12 @@ var BasicInput = React.forwardRef(function BasicInput({ className, render, fitCo
|
|
|
16
17
|
...sizingProps,
|
|
17
18
|
...otherProps
|
|
18
19
|
});
|
|
20
|
+
if (usesComponentRender(render)) return React.cloneElement(render, {
|
|
21
|
+
...otherProps,
|
|
22
|
+
...sizingProps,
|
|
23
|
+
className: clsx(mergedClassName, render.props.className),
|
|
24
|
+
ref
|
|
25
|
+
});
|
|
19
26
|
return /* @__PURE__ */ jsx(Field.Control, {
|
|
20
27
|
ref,
|
|
21
28
|
className: mergedClassName,
|
|
@@ -4,13 +4,13 @@ export type InputControlGroupProps = {
|
|
|
4
4
|
/**
|
|
5
5
|
* Optional content rendered before the control (for example a currency prefix).
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @defaultValue No start addon is rendered.
|
|
8
8
|
*/
|
|
9
9
|
startAddon?: React.ReactNode;
|
|
10
10
|
/**
|
|
11
11
|
* Optional content rendered after the control (for example an action button).
|
|
12
12
|
*
|
|
13
|
-
* @
|
|
13
|
+
* @defaultValue No end addon is rendered.
|
|
14
14
|
*/
|
|
15
15
|
endAddon?: React.ReactNode;
|
|
16
16
|
/**
|
|
@@ -206,13 +206,13 @@ var frame = (ts) => {
|
|
|
206
206
|
}
|
|
207
207
|
};
|
|
208
208
|
var startLoop = () => {
|
|
209
|
-
if (rafId
|
|
209
|
+
if (rafId === null) {
|
|
210
210
|
lastFrame = 0;
|
|
211
211
|
rafId = requestAnimationFrame(frame);
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
214
|
var stopLoopIfIdle = () => {
|
|
215
|
-
if (instances.size === 0 && rafId
|
|
215
|
+
if (instances.size === 0 && rafId !== null) {
|
|
216
216
|
cancelAnimationFrame(rafId);
|
|
217
217
|
rafId = null;
|
|
218
218
|
}
|