@viraui/react 2026.7.0-next.0 → 2026.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/catalog.json +13 -1
  2. package/dist/components/accordion/accordion-item.d.ts +10 -10
  3. package/dist/components/accordion/accordion.d.ts +2 -2
  4. package/dist/components/annotate/annotate.d.ts +15 -15
  5. package/dist/components/autocomplete/autocomplete-item.d.ts +3 -3
  6. package/dist/components/autocomplete/autocomplete.d.ts +12 -12
  7. package/dist/components/avatar/avatar.d.ts +6 -6
  8. package/dist/components/avatar-group/avatar-group.d.ts +6 -6
  9. package/dist/components/badge/badge.d.ts +5 -5
  10. package/dist/components/basic-input/basic-input.d.ts +1 -1
  11. package/dist/components/basic-input/input-control-group.d.ts +2 -2
  12. package/dist/components/beam/beam.css +1 -1
  13. package/dist/components/beam/beam.d.ts +12 -12
  14. package/dist/components/bleed/bleed.d.ts +3 -3
  15. package/dist/components/button/button-link.d.ts +1 -1
  16. package/dist/components/button/button.d.ts +1 -1
  17. package/dist/components/checkbox/checkbox-group.d.ts +1 -1
  18. package/dist/components/checkbox/checkbox.d.ts +7 -7
  19. package/dist/components/chip/chip.d.ts +6 -6
  20. package/dist/components/clamp-text/clamp-text.d.ts +5 -5
  21. package/dist/components/dialog/dialog-close.d.ts +1 -1
  22. package/dist/components/dialog/dialog-indent-background.d.ts +1 -1
  23. package/dist/components/dialog/dialog-indent.d.ts +1 -1
  24. package/dist/components/dialog/dialog-sheet.d.ts +10 -10
  25. package/dist/components/dialog/dialog-trigger.d.ts +1 -1
  26. package/dist/components/dialog/dialog.d.ts +1 -1
  27. package/dist/components/disclosure/disclosure-panel.d.ts +12 -0
  28. package/dist/components/disclosure/disclosure-panel.js +13 -0
  29. package/dist/components/disclosure/disclosure-trigger.d.ts +46 -0
  30. package/dist/components/disclosure/disclosure-trigger.js +82 -0
  31. package/dist/components/disclosure/disclosure.css +1 -0
  32. package/dist/components/disclosure/disclosure.d.ts +25 -0
  33. package/dist/components/disclosure/disclosure.js +30 -0
  34. package/dist/components/disclosure/disclosure.module.js +15 -0
  35. package/dist/components/disclosure/index.d.ts +4 -0
  36. package/dist/components/elevator/elevator.d.ts +7 -7
  37. package/dist/components/fieldset/fieldset.d.ts +4 -4
  38. package/dist/components/fit-text/fit-text.d.ts +2 -2
  39. package/dist/components/glow/glow.d.ts +12 -12
  40. package/dist/components/grid/grid-item.d.ts +8 -8
  41. package/dist/components/grid/grid.d.ts +12 -12
  42. package/dist/components/icon-button/icon-button-link.d.ts +2 -2
  43. package/dist/components/icon-button/icon-button.d.ts +2 -2
  44. package/dist/components/index.d.ts +2 -0
  45. package/dist/components/linear-progress/linear-progress.d.ts +4 -4
  46. package/dist/components/masonry/masonry-item.d.ts +3 -3
  47. package/dist/components/masonry/masonry.d.ts +4 -4
  48. package/dist/components/menu/menu-checkbox-item.d.ts +4 -4
  49. package/dist/components/menu/menu-item.d.ts +4 -4
  50. package/dist/components/menu/menu-link-item.d.ts +4 -4
  51. package/dist/components/menu/menu-popup.d.ts +2 -2
  52. package/dist/components/menu/menu-radio-group.d.ts +2 -2
  53. package/dist/components/menu/menu-radio-item.d.ts +4 -4
  54. package/dist/components/menu/menu-separator.d.ts +1 -1
  55. package/dist/components/menu/menu-submenu-trigger.d.ts +3 -3
  56. package/dist/components/menu/menu.d.ts +3 -3
  57. package/dist/components/meter/meter.d.ts +5 -5
  58. package/dist/components/number-field/index.d.ts +2 -0
  59. package/dist/components/number-field/number-field.css +1 -0
  60. package/dist/components/number-field/number-field.d.ts +78 -0
  61. package/dist/components/number-field/number-field.js +120 -0
  62. package/dist/components/number-field/number-field.module.js +21 -0
  63. package/dist/components/otp-field/index.d.ts +1 -1
  64. package/dist/components/otp-field/otp-field-input.d.ts +1 -1
  65. package/dist/components/otp-field/otp-field-separator.d.ts +3 -1
  66. package/dist/components/otp-field/otp-field-separator.js +5 -1
  67. package/dist/components/otp-field/otp-field.d.ts +4 -5
  68. package/dist/components/otp-field/otp-field.js +0 -1
  69. package/dist/components/popover/popover-sheet.d.ts +6 -6
  70. package/dist/components/popover/popover.d.ts +5 -5
  71. package/dist/components/progressive-blur/progressive-blur.d.ts +5 -5
  72. package/dist/components/prose/prose.css +1 -1
  73. package/dist/components/prose/prose.d.ts +4 -4
  74. package/dist/components/radio/radio-group.d.ts +1 -1
  75. package/dist/components/radio/radio.d.ts +6 -6
  76. package/dist/components/select/select-indicator-slot.d.ts +1 -1
  77. package/dist/components/select/select-option.d.ts +4 -4
  78. package/dist/components/select/select-separator.d.ts +1 -1
  79. package/dist/components/select/select.d.ts +10 -10
  80. package/dist/components/separator/separator.d.ts +9 -9
  81. package/dist/components/shimmer/shimmer.d.ts +6 -6
  82. package/dist/components/skeleton/skeleton-overlay.d.ts +5 -5
  83. package/dist/components/skeleton/skeleton.d.ts +9 -9
  84. package/dist/components/slider/slider.d.ts +7 -7
  85. package/dist/components/spinner/spinner.d.ts +3 -3
  86. package/dist/components/stack/stack.d.ts +17 -17
  87. package/dist/components/static-noise/static-noise.d.ts +5 -5
  88. package/dist/components/surface/surface.d.ts +12 -12
  89. package/dist/components/switch/switch.d.ts +7 -7
  90. package/dist/components/tabs/tabs-list.d.ts +1 -1
  91. package/dist/components/tabs/tabs-panel.d.ts +1 -1
  92. package/dist/components/tabs/tabs-tab.d.ts +3 -3
  93. package/dist/components/tabs/tabs.d.ts +2 -2
  94. package/dist/components/text/text.d.ts +23 -23
  95. package/dist/components/textarea/textarea.d.ts +6 -6
  96. package/dist/components/textfield/textfield.d.ts +1 -1
  97. package/dist/components/title/title.d.ts +21 -21
  98. package/dist/components/toast/toast-action.d.ts +1 -1
  99. package/dist/components/toast/toast-banner.d.ts +7 -7
  100. package/dist/components/toast/toast-viewport.d.ts +2 -2
  101. package/dist/components/toggle-button/toggle-button.d.ts +6 -6
  102. package/dist/components/toggle-group/toggle-group.d.ts +1 -1
  103. package/dist/components/tooltip/tooltip-content.d.ts +2 -2
  104. package/dist/components/typewriter/typewriter.d.ts +10 -10
  105. package/dist/index.js +3 -1
  106. package/dist/specs/components/accordion/usage.xml +1 -0
  107. package/dist/specs/components/disclosure/a11y.xml +9 -0
  108. package/dist/specs/components/disclosure/meta.xml +20 -0
  109. package/dist/specs/components/disclosure/patterns.xml +55 -0
  110. package/dist/specs/components/disclosure/props.xml +54 -0
  111. package/dist/specs/components/disclosure/usage.xml +11 -0
  112. package/dist/specs/components/number-field/a11y.xml +10 -0
  113. package/dist/specs/components/number-field/meta.xml +21 -0
  114. package/dist/specs/components/number-field/patterns.xml +43 -0
  115. package/dist/specs/components/number-field/props.xml +35 -0
  116. package/dist/specs/components/number-field/usage.xml +12 -0
  117. package/dist/specs/components/otp-field/meta.xml +1 -4
  118. package/dist/specs/components/otp-field/patterns.xml +8 -8
  119. package/dist/specs/components/otp-field/props.xml +2 -2
  120. package/dist/specs/components/otp-field/usage.xml +4 -4
  121. package/dist/specs/index.xml +22 -2
  122. package/package.json +2 -2
@@ -9,7 +9,7 @@ type TitleAxisPadding = TitleSpace | [TitleSpace | 0, TitleSpace | 0];
9
9
  * Includes standard text and heading HTML attributes such as `children`, `id`, `title`, and event handlers,
10
10
  * plus Vira-owned heading typography, color, and layout controls.
11
11
  *
12
- * @default Base HTML pass-through props keep upstream defaults.
12
+ * @defaultValue Base HTML pass-through props keep upstream defaults.
13
13
  */
14
14
  export type TitleProps = React.ComponentPropsWithoutRef<'span'> & {
15
15
  /**
@@ -17,13 +17,13 @@ export type TitleProps = React.ComponentPropsWithoutRef<'span'> & {
17
17
  *
18
18
  * Pair this with `size` for most headings so DOM semantics and visual preset stay intentionally aligned.
19
19
  *
20
- * @default The title renders a `span` root.
20
+ * @defaultValue The title renders a `span` root.
21
21
  */
22
22
  render?: useRender.RenderProp;
23
23
  /**
24
24
  * Ref forwarded to the rendered title root element.
25
25
  *
26
- * @default No ref is attached.
26
+ * @defaultValue No ref is attached.
27
27
  */
28
28
  ref?: React.Ref<HTMLElement>;
29
29
  /**
@@ -32,44 +32,44 @@ export type TitleProps = React.ComponentPropsWithoutRef<'span'> & {
32
32
  * This controls only the visual preset. Semantic heading choice remains owned by `render`,
33
33
  * because `Title` keeps a `span` root unless `render` replaces it.
34
34
  *
35
- * @default '1'
35
+ * @defaultValue '1'
36
36
  */
37
37
  size?: 'display' | '1' | '2' | '3' | '4' | '5' | '6';
38
38
  /**
39
39
  * Overrides the size preset weight (`font-weight` + `wght` axis).
40
40
  *
41
- * @default No weight override.
41
+ * @defaultValue No weight override.
42
42
  */
43
43
  weight?: number;
44
44
  /**
45
45
  * Applies a literal color escape hatch.
46
46
  *
47
- * @default No literal color override.
47
+ * @defaultValue No literal color override.
48
48
  */
49
49
  color?: string;
50
50
  /**
51
51
  * Controls line height through foundation leading tokens.
52
52
  *
53
- * @default 'm'
53
+ * @defaultValue 'm'
54
54
  */
55
55
  lineHeight?: 'none' | 'xs' | 's' | 'm' | 'l';
56
56
  /**
57
57
  * Aligns text using logical alignment values.
58
58
  * Omit so `text-align` inherits from the parent.
59
59
  *
60
- * @default Inherits parent `text-align`.
60
+ * @defaultValue Inherits parent `text-align`.
61
61
  */
62
62
  align?: React.CSSProperties['textAlign'];
63
63
  /**
64
64
  * Constrains the maximum inline size of the rendered text block.
65
65
  *
66
- * @default No max width constraint.
66
+ * @defaultValue No max width constraint.
67
67
  */
68
68
  maxWidth?: string;
69
69
  /**
70
70
  * Controls white-space preservation and wrapping behavior.
71
71
  *
72
- * @default 'normal'
72
+ * @defaultValue 'normal'
73
73
  */
74
74
  whiteSpace?: React.CSSProperties['whiteSpace'];
75
75
  /**
@@ -78,63 +78,63 @@ export type TitleProps = React.ComponentPropsWithoutRef<'span'> & {
78
78
  *
79
79
  * Overrides size preset letter-spacing when set.
80
80
  *
81
- * @default No letter-spacing override.
81
+ * @defaultValue No letter-spacing override.
82
82
  */
83
83
  tracking?: React.CSSProperties['letterSpacing'];
84
84
  /**
85
85
  * Applies `text-transform` on the rendered copy. Prefer this prop over CSS
86
86
  * `text-transform` on the same Title root.
87
87
  *
88
- * @default No text-transform override.
88
+ * @defaultValue No text-transform override.
89
89
  */
90
90
  transform?: React.CSSProperties['textTransform'];
91
91
  /**
92
92
  * Enables balanced wrapping for block-like titles.
93
93
  *
94
- * @default false
94
+ * @defaultValue false
95
95
  */
96
96
  balanced?: boolean;
97
97
  /**
98
98
  * Enables text selection on the rendered copy.
99
99
  *
100
- * @default true
100
+ * @defaultValue true
101
101
  */
102
102
  selection?: boolean;
103
103
  /**
104
104
  * Sets inline padding using one token for both sides or a `[start, end]` tuple.
105
105
  *
106
- * @default No inline padding.
106
+ * @defaultValue No inline padding.
107
107
  */
108
108
  hPadding?: TitleAxisPadding;
109
109
  /**
110
110
  * Sets block padding using one token for both sides or a `[start, end]` tuple.
111
111
  *
112
- * @default No block padding.
112
+ * @defaultValue No block padding.
113
113
  */
114
114
  vPadding?: TitleAxisPadding;
115
115
  /**
116
116
  * Trims text box whitespace at the chosen edge when the browser supports `text-box`.
117
117
  * Pass `false` to disable text-box trim.
118
118
  *
119
- * @default 'both'
119
+ * @defaultValue 'both'
120
120
  */
121
121
  trim?: 'start' | 'end' | 'both' | false;
122
122
  /**
123
123
  * Selects the `text-box` trim basis when `trim` is active.
124
124
  *
125
- * @default 'cap alphabetic'
125
+ * @defaultValue 'cap alphabetic'
126
126
  */
127
127
  trimType?: string;
128
128
  /**
129
129
  * Overrides font width as a percentage (100 = normal); maps to `font-stretch` and `wdth`.
130
130
  *
131
- * @default No width override.
131
+ * @defaultValue No width override.
132
132
  */
133
133
  fontWidth?: number;
134
134
  /**
135
135
  * Overrides the optical size (`opsz`) axis on variable fonts; static fonts keep `font-optical-sizing: auto`.
136
136
  *
137
- * @default No optical size override.
137
+ * @defaultValue No optical size override.
138
138
  */
139
139
  opticalSize?: number;
140
140
  /**
@@ -142,7 +142,7 @@ export type TitleProps = React.ComponentPropsWithoutRef<'span'> & {
142
142
  * Pass `false` to lock at this size’s `--font-scale-display` / `--font-scale-h*` token.
143
143
  * Theme `--effect-fluid-typography: initial` still locks all Title globally.
144
144
  *
145
- * @default true
145
+ * @defaultValue true
146
146
  */
147
147
  fluid?: boolean;
148
148
  };
@@ -3,7 +3,7 @@ import type * as React from 'react';
3
3
  /**
4
4
  * Public Toast.Action props.
5
5
  *
6
- * @default Base UI pass-through props keep upstream defaults.
6
+ * @defaultValue Base UI pass-through props keep upstream defaults.
7
7
  */
8
8
  export type ToastActionProps = ToastActionNamespace.Props;
9
9
  export declare const ToastAction: React.FC<ToastActionProps>;
@@ -15,43 +15,43 @@ export type ToastBannerProps = ToastRootNamespace.Props & {
15
15
  /**
16
16
  * Heading above the description. Falls back to `toast.title` from `toastManager.add`.
17
17
  *
18
- * @default `toast.title` when set on the toast instance.
18
+ * @defaultValue `toast.title` when set on the toast instance.
19
19
  */
20
20
  title?: React.ReactNode;
21
21
  /**
22
22
  * Supporting copy below the title.
23
23
  *
24
- * @default No description is rendered.
24
+ * @defaultValue No description is rendered.
25
25
  */
26
26
  description?: React.ReactNode;
27
27
  /**
28
28
  * Whether to render the dismiss control.
29
29
  *
30
- * @default true
30
+ * @defaultValue true
31
31
  */
32
32
  dismissable?: boolean;
33
33
  /**
34
34
  * Label for the dismiss control.
35
35
  *
36
- * @default 'Dismiss'
36
+ * @defaultValue 'Dismiss'
37
37
  */
38
38
  dismissLabel?: React.ReactNode;
39
39
  /**
40
40
  * Called when the dismiss control is activated, before Base UI closes the toast.
41
41
  *
42
- * @default No callback is invoked.
42
+ * @defaultValue No callback is invoked.
43
43
  */
44
44
  onDismiss?: () => void;
45
45
  /**
46
46
  * Optional action buttons. Accepts a single `Toast.Action` or an array of them.
47
47
  *
48
- * @default No actions are rendered.
48
+ * @defaultValue No actions are rendered.
49
49
  */
50
50
  children?: ToastBannerChildren;
51
51
  /**
52
52
  * Class name forwarded to the toast root.
53
53
  *
54
- * @default No extra class name.
54
+ * @defaultValue No extra class name.
55
55
  */
56
56
  className?: string;
57
57
  };
@@ -4,13 +4,13 @@ export type ToastViewportPosition = 'bottom-right' | 'bottom-left' | 'bottom-cen
4
4
  /**
5
5
  * Public Toast.Viewport props.
6
6
  *
7
- * @default `position` is `bottom-right`.
7
+ * @defaultValue `position` is `bottom-right`.
8
8
  */
9
9
  export type ToastViewportProps = ToastViewportNamespace.Props & {
10
10
  /**
11
11
  * Controls viewport placement and stacking layout hooks.
12
12
  *
13
- * @default 'bottom-right'
13
+ * @defaultValue 'bottom-right'
14
14
  */
15
15
  position?: ToastViewportPosition;
16
16
  };
@@ -15,38 +15,38 @@ type ToggleButtonAccessibleNameProps = {
15
15
  * Icon-only two-state control built on Base UI `Toggle` and `IconButton`.
16
16
  * Requires an accessible name via `aria-label` or `aria-labelledby`.
17
17
  *
18
- * @default Base UI toggle pass-through props keep upstream defaults.
18
+ * @defaultValue Base UI toggle pass-through props keep upstream defaults.
19
19
  */
20
20
  export type ToggleButtonProps = Omit<IconButtonProps, 'icon' | 'render' | 'variant' | 'children' | 'aria-label' | 'aria-labelledby'> & Omit<TogglePrimitive.Props, 'render' | 'children' | 'aria-label' | 'aria-labelledby'> & ToggleButtonAccessibleNameProps & {
21
21
  /**
22
22
  * Icon shown while the toggle is not pressed.
23
23
  *
24
- * @default No default; required for every ToggleButton.
24
+ * @defaultValue No default; required for every ToggleButton.
25
25
  */
26
26
  restingIcon: ReactNode;
27
27
  /**
28
28
  * Icon shown while the toggle is pressed.
29
29
  *
30
- * @default When omitted, `restingIcon` is shown in both states.
30
+ * @defaultValue When omitted, `restingIcon` is shown in both states.
31
31
  */
32
32
  pressedIcon?: ReactNode;
33
33
  /**
34
34
  * Visual variant while the toggle is not pressed.
35
35
  *
36
- * @default 'flat'
36
+ * @defaultValue 'flat'
37
37
  */
38
38
  variant?: ButtonProps['variant'];
39
39
  /**
40
40
  * Visual variant while the toggle is pressed.
41
41
  *
42
- * @default When omitted, `variant` is used in both states.
42
+ * @defaultValue When omitted, `variant` is used in both states.
43
43
  */
44
44
  pressedVariant?: ButtonProps['variant'];
45
45
  /**
46
46
  * When `pressedIcon` is set, crossfade and rotate between resting and pressed icons
47
47
  * (`data-interpolate="true"`). When `false`, swap instantly with no transition.
48
48
  *
49
- * @default false
49
+ * @defaultValue false
50
50
  */
51
51
  interpolateIcons?: boolean;
52
52
  };
@@ -6,7 +6,7 @@ import { ToggleGroup as ToggleGroupPrimitive } from '@base-ui/react/toggle-group
6
6
  * (`row` / `column` from `orientation`) and zero gap — consumers own spacing.
7
7
  * Compose `ToggleButton` children each with `value` and an accessible name.
8
8
  *
9
- * @default Base UI pass-through props keep upstream defaults.
9
+ * @defaultValue Base UI pass-through props keep upstream defaults.
10
10
  */
11
11
  export type ToggleGroupProps = ToggleGroupPrimitive.Props;
12
12
  export declare const ToggleGroup: React.FC<ToggleGroupProps>;
@@ -8,7 +8,7 @@ type TooltipContentPositionerProps = Omit<TooltipPositioner.Props, 'className' |
8
8
  * to the Positioner; `sideOffset` defaults to `8`. Always renders the internal
9
9
  * Viewport so multi-trigger content animations work by default.
10
10
  *
11
- * @default `sideOffset` is `8`.
11
+ * @defaultValue `sideOffset` is `8`.
12
12
  */
13
13
  export type TooltipContentProps = TooltipContentPositionerProps & {
14
14
  /**
@@ -16,7 +16,7 @@ export type TooltipContentProps = TooltipContentPositionerProps & {
16
16
  * Omit for Base UI default (`document.body` from the module window —
17
17
  * iframe hosts must pass the iframe document body explicitly).
18
18
  *
19
- * @default Base UI FloatingPortal resolution
19
+ * @defaultValue Base UI FloatingPortal resolution
20
20
  */
21
21
  container?: React.ComponentProps<typeof PrimitiveTooltip.Portal>['container'];
22
22
  };
@@ -6,55 +6,55 @@ import type * as React from 'react';
6
6
  * Includes standard `span` attributes such as `id`, `className`, and event handlers,
7
7
  * plus Vira-owned typewriter animation controls.
8
8
  *
9
- * @default Native span pass-through props keep React defaults.
9
+ * @defaultValue Native span pass-through props keep React defaults.
10
10
  */
11
11
  export type TypewriterProps = React.ComponentPropsWithRef<'span'> & {
12
12
  /**
13
13
  * Cycles through multiple phrases instead of a single `children` string.
14
14
  *
15
- * @default The animation uses string `children` when provided.
15
+ * @defaultValue The animation uses string `children` when provided.
16
16
  */
17
17
  texts?: readonly string[];
18
18
  /**
19
19
  * Selects the caret style rendered after the typed text.
20
20
  *
21
- * @default 'pipe'
21
+ * @defaultValue 'pipe'
22
22
  */
23
23
  caret?: TypewriterCaret;
24
24
  /**
25
25
  * Overrides the caret color.
26
26
  *
27
- * @default The caret inherits `currentColor`.
27
+ * @defaultValue The caret inherits `currentColor`.
28
28
  */
29
29
  caretColor?: string;
30
30
  /**
31
31
  * Sets the delay between typed characters in milliseconds.
32
32
  *
33
- * @default 40
33
+ * @defaultValue 40
34
34
  */
35
35
  speed?: number;
36
36
  /**
37
37
  * Sets the delay between deleted characters in milliseconds.
38
38
  *
39
- * @default 25
39
+ * @defaultValue 25
40
40
  */
41
41
  deleteSpeed?: number;
42
42
  /**
43
43
  * Sets the pause after a phrase completes before deletion starts, in milliseconds.
44
44
  *
45
- * @default 2000
45
+ * @defaultValue 2000
46
46
  */
47
47
  pause?: number;
48
48
  /**
49
49
  * Sets the initial delay before typing starts, in milliseconds.
50
50
  *
51
- * @default 0
51
+ * @defaultValue 0
52
52
  */
53
53
  delay?: number;
54
54
  /**
55
55
  * Repeats the phrase cycle after the final phrase is deleted.
56
56
  *
57
- * @default true
57
+ * @defaultValue true
58
58
  */
59
59
  loop?: boolean;
60
60
  /**
@@ -62,7 +62,7 @@ export type TypewriterProps = React.ComponentPropsWithRef<'span'> & {
62
62
  * constraints) from first paint through delay, typing, and deletion via an
63
63
  * in-flow `visibility: hidden` phrase layer; the typed effect paints absolute on top.
64
64
  *
65
- * @default false
65
+ * @defaultValue false
66
66
  */
67
67
  preserveSpace?: boolean;
68
68
  };
package/dist/index.js CHANGED
@@ -24,6 +24,7 @@ import { DialogIndentBackground } from "./components/dialog/dialog-indent-backgr
24
24
  import { DialogSheet } from "./components/dialog/dialog-sheet.js";
25
25
  import { DialogTrigger } from "./components/dialog/dialog-trigger.js";
26
26
  import { Dialog } from "./components/dialog/dialog.js";
27
+ import { Disclosure } from "./components/disclosure/disclosure.js";
27
28
  import { ELEVATION_DEFAULTS } from "./core/elevation/elevation-types.js";
28
29
  import { getElevationProps } from "./core/elevation/get-elevation-props.js";
29
30
  import { Elevator } from "./components/elevator/elevator.js";
@@ -46,6 +47,7 @@ import { MenuSeparator } from "./components/menu/menu-separator.js";
46
47
  import { MenuSubmenuTrigger } from "./components/menu/menu-submenu-trigger.js";
47
48
  import { Menu, MenuSubmenu, MenuTrigger } from "./components/menu/menu.js";
48
49
  import { Meter } from "./components/meter/meter.js";
50
+ import { NumberField } from "./components/number-field/number-field.js";
49
51
  import { Textfield } from "./components/textfield/textfield.js";
50
52
  import { OTPField } from "./components/otp-field/otp-field.js";
51
53
  import { PopoverSheet } from "./components/popover/popover-sheet.js";
@@ -70,4 +72,4 @@ import { ToggleGroup } from "./components/toggle-group/toggle-group.js";
70
72
  import { Typewriter } from "./components/typewriter/typewriter.js";
71
73
  import { TooltipContent } from "./components/tooltip/tooltip-content.js";
72
74
  import { Tooltip, TooltipProvider, TooltipTrigger } from "./components/tooltip/tooltip.js";
73
- export { Accordion, Annotate, Autocomplete, Avatar, AvatarGroup, Badge, Beam, Bleed, BreakpointsProvider, Button, ButtonLink, Checkbox, CheckboxGroup, Chip, ClampText, Dialog, DialogClose, DialogIndent, DialogIndentBackground, DialogSheet, DialogTrigger, ELEVATION_DEFAULTS, Elevator, Fieldset, FitText, Glow, Grid, IconButton, IconButtonLink, LinearProgress, Masonry, Menu, MenuCheckboxItem, MenuGroup, MenuItem, MenuLinkItem, MenuPopup, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Meter, OTPField, Popover, PopoverClose, PopoverDescription, PopoverSheet, PopoverTitle, PopoverTrigger, ProgressiveBlur, Prose, Radio, RadioGroup, Select, Separator, Shimmer, Skeleton, Slider, Spinner, Stack, StaticNoise, Surface, Switch, Tabs, Text, Textarea, Textfield, Title, Toast, ToggleButton, ToggleGroup, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typewriter, getElevationProps, useBreakpoints };
75
+ export { Accordion, Annotate, Autocomplete, Avatar, AvatarGroup, Badge, Beam, Bleed, BreakpointsProvider, Button, ButtonLink, Checkbox, CheckboxGroup, Chip, ClampText, Dialog, DialogClose, DialogIndent, DialogIndentBackground, DialogSheet, DialogTrigger, Disclosure, ELEVATION_DEFAULTS, Elevator, Fieldset, FitText, Glow, Grid, IconButton, IconButtonLink, LinearProgress, Masonry, Menu, MenuCheckboxItem, MenuGroup, MenuItem, MenuLinkItem, MenuPopup, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Meter, NumberField, OTPField, Popover, PopoverClose, PopoverDescription, PopoverSheet, PopoverTitle, PopoverTrigger, ProgressiveBlur, Prose, Radio, RadioGroup, Select, Separator, Shimmer, Skeleton, Slider, Spinner, Stack, StaticNoise, Surface, Switch, Tabs, Text, Textarea, Textfield, Title, Toast, ToggleButton, ToggleGroup, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typewriter, getElevationProps, useBreakpoints };
@@ -8,5 +8,6 @@
8
8
  <do>Multiple open sections with root `multiple` (+ `defaultValue` / `value` as needed)</do>
9
9
  <dont>Trying to compose separate public `Accordion.Header`, `Accordion.Trigger`, or `Accordion.Panel` exports — those stay inside `Accordion.Item`</dont>
10
10
  <dont>Rendering an item without trigger text and without an external aria-label strategy</dont>
11
+ <dont>Using Accordion for a single expandable section — use Disclosure</dont>
11
12
  <dont>Using Accordion for primary navigation that should be links, Tabs, or routes</dont>
12
13
  </usage>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <a11y surface="disclosure">
3
+ <rule>Trigger is the disclosing control; Base UI wires expanded/controls relationship to the Panel</rule>
4
+ <rule>Accessible name comes from Trigger children, or explicit aria-label / aria-labelledby when icon-only</rule>
5
+ <rule>Trigger icons are decorative (aria-hidden); open/closed is communicated via Base UI attributes/ARIA, not icon alone</rule>
6
+ <rule>Disabled root ignores pointer and keyboard activation</rule>
7
+ <rule>prefers-reduced-motion disables Panel height and icon interpolate transitions; open/close still works</rule>
8
+ <rule>Do not re-apply widget role/aria that Base UI Collapsible already emits</rule>
9
+ </a11y>
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <meta id="disclosure" title="Disclosure" category="layout" shared_contract="disclosure">
3
+ <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.</summary>
4
+ <exports>
5
+ <export name="Disclosure" />
6
+ </exports>
7
+ <related>
8
+ <ref id="accordion" />
9
+ <ref id="surface" />
10
+ <ref id="toggle-button" />
11
+ <ref id="stack" />
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
+ <base_ui href="https://base-ui.com/react/components/collapsible#api-reference" />
20
+ </meta>
@@ -0,0 +1,55 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <patterns surface="disclosure">
3
+ <example title="Default Surface Trigger + Panel">
4
+ <tsx><![CDATA[
5
+ <Disclosure>
6
+ <Disclosure.Trigger hPadding="m" radius="m" vPadding="m">
7
+ Shipping details
8
+ </Disclosure.Trigger>
9
+ <Disclosure.Panel>
10
+ <Stack hPadding="m" vPadding="m">
11
+ <Text tone="muted">Orders ship within 2 business days.</Text>
12
+ </Stack>
13
+ </Disclosure.Panel>
14
+ </Disclosure>
15
+ ]]></tsx>
16
+ <notes>Default Trigger = Surface with render → Collapsible.Trigger; hoverColor defaults to 2. Panel is motion-only — pad children in the story/app.</notes>
17
+ </example>
18
+
19
+ <example title="Custom icons with interpolate">
20
+ <tsx><![CDATA[
21
+ <Disclosure>
22
+ <Disclosure.Trigger
23
+ hPadding="m"
24
+ interpolateIcons
25
+ openIcon={<Xmark size="1rem" />}
26
+ radius="m"
27
+ restingIcon={<Plus size="1rem" />}
28
+ vPadding="m"
29
+ >
30
+ Advanced
31
+ </Disclosure.Trigger>
32
+ <Disclosure.Panel>
33
+ <Stack hPadding="m" vPadding="m">
34
+ {/* advanced controls */}
35
+ </Stack>
36
+ </Disclosure.Panel>
37
+ </Disclosure>
38
+ ]]></tsx>
39
+ <notes>ToggleButton-style resting/open icons; interpolate opt-in. For multi-item lists use Accordion instead.</notes>
40
+ </example>
41
+
42
+ <example title="Custom Trigger render">
43
+ <tsx><![CDATA[
44
+ <Disclosure>
45
+ <Disclosure.Trigger render={<Button variant="secondary" />}>
46
+ Show more
47
+ </Disclosure.Trigger>
48
+ <Disclosure.Panel>
49
+ <Text>Extra details</Text>
50
+ </Disclosure.Panel>
51
+ </Disclosure>
52
+ ]]></tsx>
53
+ <notes>Consumer render replaces the whole Surface + primitive compose; Surface defaults do not apply.</notes>
54
+ </example>
55
+ </patterns>
@@ -0,0 +1,54 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <props surface="disclosure">
3
+ <when_to_use>
4
+ <item>Single-section progressive disclosure (show more, optional details, FAQ item alone)</item>
5
+ <item>Expand/collapse one block with Surface chrome Trigger and optional icon pair</item>
6
+ </when_to_use>
7
+ <when_not_to_use>
8
+ <item>Multi-item collapsible lists — use Accordion</item>
9
+ <item>Expecting default Panel content padding — Panel is a motion shell only</item>
10
+ <item>Primary navigation that should use links, Tabs, or routes</item>
11
+ </when_not_to_use>
12
+ <prop name="Trigger.restingIcon" kind="react">
13
+ <description>Decorative icon while the panel is closed. Defaults to ChromeChevronEnd when both icon slots are omitted.</description>
14
+ </prop>
15
+ <prop name="Trigger.openIcon" kind="react">
16
+ <description>Decorative icon while the panel is open. Defaults to ChromeChevronDown when both icon slots are omitted. When only restingIcon is set, that icon shows in both states.</description>
17
+ </prop>
18
+ <prop name="Trigger.interpolateIcons" kind="react">
19
+ <description>When dual icons are present, crossfade and light-rotate between them (`data-interpolate=&quot;true&quot;`). When false, swap instantly with no transition.</description>
20
+ </prop>
21
+ <prop name="Trigger.iconPosition" kind="react">
22
+ <description>Logical side of the label where the icon slot sits (`start` | `end`). Default `end`.</description>
23
+ </prop>
24
+ <prop name="Trigger.color" kind="react">
25
+ <description>Surface resting background on the default Trigger host. Omitted on consumer Trigger render.</description>
26
+ </prop>
27
+ <prop name="Trigger.hoverColor" kind="react">
28
+ <description>Surface hover background on the default Trigger host. Defaults to level 2 when omitted. Skipped when consumer supplies Trigger render.</description>
29
+ </prop>
30
+ <prop name="Trigger.border" kind="react">
31
+ <description>Surface contrast border on the default Trigger host.</description>
32
+ </prop>
33
+ <prop name="Trigger.borderStyle" kind="react">
34
+ <description>Surface border style when border is set on the default Trigger host.</description>
35
+ </prop>
36
+ <prop name="Trigger.radius" kind="react">
37
+ <description>Surface corner radius on the default Trigger host.</description>
38
+ </prop>
39
+ <prop name="Trigger.hPadding" kind="react">
40
+ <description>Surface inline padding on the default Trigger host. Defaults to `m` when omitted. Skipped when consumer supplies Trigger render.</description>
41
+ </prop>
42
+ <prop name="Trigger.vPadding" kind="react">
43
+ <description>Surface block padding on the default Trigger host. Defaults to `s` when omitted. Skipped when consumer supplies Trigger render.</description>
44
+ </prop>
45
+ <prop name="Trigger.render" kind="react">
46
+ <description>Replaces the whole default Surface + Collapsible Trigger compose with a custom host.</description>
47
+ </prop>
48
+ <prop name="Panel.hiddenUntilFound" kind="react">
49
+ <description>Allows browser find-in-page to expand the panel; Base UI Collapsible Panel pass-through.</description>
50
+ </prop>
51
+ <prop name="Panel.keepMounted" kind="react">
52
+ <description>Keeps the panel in the DOM while closed; Base UI Collapsible Panel pass-through.</description>
53
+ </prop>
54
+ </props>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <usage surface="disclosure">
3
+ <do>Compose `Disclosure` + `Disclosure.Trigger` + `Disclosure.Panel` for a single expandable section</do>
4
+ <do>Spread Surface chrome on Trigger (`color`, `hoverColor`, `border`, `radius`, padding) when using the default host</do>
5
+ <do>Supply Panel children layout (Stack/padding) yourself — Panel has no default content padding</do>
6
+ <do>Use `restingIcon` / `openIcon` / `interpolateIcons` for ToggleButton-style icon pairs; omit both for chrome chevron End/Down</do>
7
+ <do>Pass Trigger `render` when replacing the Surface compose entirely</do>
8
+ <dont>Using Accordion for a single section — Accordion is multi-item</dont>
9
+ <dont>Expecting Accordion-like default Panel padding from Disclosure.Panel</dont>
10
+ <dont>Relying on icon animation alone for open/closed meaning under reduced motion</dont>
11
+ </usage>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <a11y surface="number-field">
3
+ <rule>Visible `label` on `NumberField` names the numeric input via Field.Label / htmlFor.</rule>
4
+ <rule>Description uses Field description / `aria-describedby` while valid.</rule>
5
+ <rule>Error copy shares the helper slot and replaces description while invalid and dirty (same as Textfield).</rule>
6
+ <rule>Internal steppers are icon-only IconButtons named `Decrement` and `Increment`.</rule>
7
+ <rule>Label scrub is optional chrome (`labelScrub`, default true when label present). Disable with `labelScrub={false}` or omit label.</rule>
8
+ <rule>Focus order follows `stepperPlacement`: split → decrement, input, increment; grouped → input then both. Grouped visual side follows document direction (inline-end).</rule>
9
+ <rule>When `description` is a string, NumberField sets `aria-roledescription` on the numeric input to that string; otherwise Base UI default remains.</rule>
10
+ </a11y>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <meta id="number-field" title="NumberField" category="form" shared_contract="number-field">
3
+ <summary>Single public NumberField with Field chrome, internal IconButton steppers, and optional label scrub. Group / Decrement / Increment / ScrubArea stay internal.</summary>
4
+ <exports>
5
+ <export name="NumberField" />
6
+ </exports>
7
+ <related>
8
+ <ref id="textfield" />
9
+ <ref id="icon-button" />
10
+ <ref id="fieldset" />
11
+ <ref id="text" />
12
+ <ref id="stack" />
13
+ </related>
14
+ <units>
15
+ <unit kind="a11y" href="a11y.xml" />
16
+ <unit kind="props" href="props.xml" />
17
+ <unit kind="usage" href="usage.xml" />
18
+ <unit kind="patterns" href="patterns.xml" />
19
+ </units>
20
+ <base_ui href="https://base-ui.com/react/components/number-field#api-reference" />
21
+ </meta>
@@ -0,0 +1,43 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <patterns surface="number-field">
3
+ <example title="Labeled amount">
4
+ <tsx><![CDATA[
5
+ <NumberField
6
+ defaultValue={100}
7
+ label="Amount"
8
+ description="Enter the amount in your local currency."
9
+ />
10
+ ]]></tsx>
11
+ <notes>Default split steppers. Label scrub on when label is present.</notes>
12
+ </example>
13
+
14
+ <example title="Form name + bounds">
15
+ <tsx><![CDATA[
16
+ <Form>
17
+ <NumberField name="quantity" defaultValue={1} min={0} max={99} step={1} label="Quantity" />
18
+ </Form>
19
+ ]]></tsx>
20
+ <notes>`name` / min / max / step / label on NumberField. `Form` is `@base-ui/react/form`.</notes>
21
+ </example>
22
+
23
+ <example title="Stepper placement grouped">
24
+ <tsx><![CDATA[
25
+ <NumberField defaultValue={5} label="Count" stepperPlacement="grouped" />
26
+ ]]></tsx>
27
+ <notes>Both steppers at inline-end (LTR right / RTL left). Steppers are fixed secondary IconButtons.</notes>
28
+ </example>
29
+
30
+ <example title="Full width input grow">
31
+ <tsx><![CDATA[
32
+ <NumberField defaultValue={25} label="Amount" fullWidth />
33
+ ]]></tsx>
34
+ <notes>Row fills the column; only the numeric input flex-grows.</notes>
35
+ </example>
36
+
37
+ <example title="Plain label without scrub">
38
+ <tsx><![CDATA[
39
+ <NumberField defaultValue={10} label="Amount" labelScrub={false} />
40
+ ]]></tsx>
41
+ <notes>Field label without ScrubArea.</notes>
42
+ </example>
43
+ </patterns>