@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.
Files changed (168) hide show
  1. package/dist/catalog.json +24 -0
  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/autocomplete/autocomplete.js +1 -1
  8. package/dist/components/avatar/avatar.d.ts +6 -6
  9. package/dist/components/avatar-group/avatar-group.d.ts +6 -6
  10. package/dist/components/badge/badge.d.ts +5 -5
  11. package/dist/components/basic-input/basic-input.d.ts +3 -2
  12. package/dist/components/basic-input/basic-input.js +7 -0
  13. package/dist/components/basic-input/input-control-group.d.ts +2 -2
  14. package/dist/components/beam/beam-pulse-driver.d.ts +1 -0
  15. package/dist/components/beam/beam-pulse-driver.js +2 -2
  16. package/dist/components/beam/beam.css +1 -1
  17. package/dist/components/beam/beam.d.ts +17 -14
  18. package/dist/components/beam/beam.js +31 -26
  19. package/dist/components/bleed/bleed.d.ts +3 -3
  20. package/dist/components/button/button-link.d.ts +1 -1
  21. package/dist/components/button/button.d.ts +1 -1
  22. package/dist/components/checkbox/checkbox-group.d.ts +1 -1
  23. package/dist/components/checkbox/checkbox.d.ts +7 -7
  24. package/dist/components/chip/chip.d.ts +6 -6
  25. package/dist/components/clamp-text/clamp-text.d.ts +5 -5
  26. package/dist/components/dialog/dialog-close.d.ts +1 -1
  27. package/dist/components/dialog/dialog-indent-background.d.ts +1 -1
  28. package/dist/components/dialog/dialog-indent.d.ts +1 -1
  29. package/dist/components/dialog/dialog-sheet.d.ts +10 -10
  30. package/dist/components/dialog/dialog-sheet.js +1 -1
  31. package/dist/components/dialog/dialog-trigger.d.ts +1 -1
  32. package/dist/components/dialog/dialog.d.ts +1 -1
  33. package/dist/components/disclosure/disclosure-panel.d.ts +12 -0
  34. package/dist/components/disclosure/disclosure-panel.js +13 -0
  35. package/dist/components/disclosure/disclosure-trigger.d.ts +46 -0
  36. package/dist/components/disclosure/disclosure-trigger.js +82 -0
  37. package/dist/components/disclosure/disclosure.css +1 -0
  38. package/dist/components/disclosure/disclosure.d.ts +25 -0
  39. package/dist/components/disclosure/disclosure.js +30 -0
  40. package/dist/components/disclosure/disclosure.module.js +15 -0
  41. package/dist/components/disclosure/index.d.ts +4 -0
  42. package/dist/components/elevator/elevator.d.ts +7 -7
  43. package/dist/components/fieldset/fieldset.d.ts +4 -4
  44. package/dist/components/fit-text/fit-text.d.ts +2 -2
  45. package/dist/components/glow/glow.d.ts +12 -12
  46. package/dist/components/grid/grid-item.d.ts +8 -8
  47. package/dist/components/grid/grid.d.ts +12 -12
  48. package/dist/components/icon-button/icon-button-link.d.ts +2 -2
  49. package/dist/components/icon-button/icon-button.d.ts +2 -2
  50. package/dist/components/index.d.ts +4 -0
  51. package/dist/components/linear-progress/linear-progress.d.ts +4 -4
  52. package/dist/components/masonry/masonry-item.d.ts +3 -3
  53. package/dist/components/masonry/masonry.d.ts +4 -4
  54. package/dist/components/menu/menu-checkbox-item.d.ts +4 -4
  55. package/dist/components/menu/menu-item.d.ts +4 -4
  56. package/dist/components/menu/menu-link-item.d.ts +4 -4
  57. package/dist/components/menu/menu-popup.d.ts +2 -2
  58. package/dist/components/menu/menu-popup.js +1 -1
  59. package/dist/components/menu/menu-radio-group.d.ts +2 -2
  60. package/dist/components/menu/menu-radio-item.d.ts +4 -4
  61. package/dist/components/menu/menu-separator.d.ts +1 -1
  62. package/dist/components/menu/menu-submenu-trigger.d.ts +3 -3
  63. package/dist/components/menu/menu.d.ts +3 -3
  64. package/dist/components/meter/meter.css +1 -1
  65. package/dist/components/meter/meter.d.ts +15 -5
  66. package/dist/components/meter/meter.js +2 -1
  67. package/dist/components/number-field/index.d.ts +2 -0
  68. package/dist/components/number-field/number-field.css +1 -0
  69. package/dist/components/number-field/number-field.d.ts +78 -0
  70. package/dist/components/number-field/number-field.js +120 -0
  71. package/dist/components/number-field/number-field.module.js +21 -0
  72. package/dist/components/otp-field/index.d.ts +4 -0
  73. package/dist/components/otp-field/otp-field-input.d.ts +12 -0
  74. package/dist/components/otp-field/otp-field-input.js +29 -0
  75. package/dist/components/otp-field/otp-field-separator.d.ts +13 -0
  76. package/dist/components/otp-field/otp-field-separator.js +20 -0
  77. package/dist/components/otp-field/otp-field.css +1 -0
  78. package/dist/components/otp-field/otp-field.d.ts +48 -0
  79. package/dist/components/otp-field/otp-field.js +78 -0
  80. package/dist/components/otp-field/otp-field.module.js +23 -0
  81. package/dist/components/popover/popover-sheet.d.ts +6 -6
  82. package/dist/components/popover/popover.d.ts +5 -5
  83. package/dist/components/progressive-blur/progressive-blur.d.ts +5 -5
  84. package/dist/components/prose/index.d.ts +2 -0
  85. package/dist/components/prose/prose.css +1 -0
  86. package/dist/components/prose/prose.d.ts +40 -0
  87. package/dist/components/prose/prose.js +27 -0
  88. package/dist/components/prose/prose.module.js +5 -0
  89. package/dist/components/radio/radio-group.d.ts +1 -1
  90. package/dist/components/radio/radio.d.ts +6 -6
  91. package/dist/components/select/select-indicator-slot.d.ts +1 -1
  92. package/dist/components/select/select-option.d.ts +4 -4
  93. package/dist/components/select/select-separator.d.ts +1 -1
  94. package/dist/components/select/select.d.ts +10 -10
  95. package/dist/components/select/select.js +1 -1
  96. package/dist/components/separator/separator.d.ts +15 -8
  97. package/dist/components/separator/separator.js +2 -1
  98. package/dist/components/shimmer/shimmer.d.ts +6 -6
  99. package/dist/components/skeleton/skeleton-overlay.d.ts +5 -5
  100. package/dist/components/skeleton/skeleton.d.ts +9 -9
  101. package/dist/components/slider/slider.d.ts +7 -7
  102. package/dist/components/spinner/spinner.d.ts +3 -3
  103. package/dist/components/stack/stack.d.ts +17 -17
  104. package/dist/components/static-noise/static-noise.d.ts +5 -5
  105. package/dist/components/surface/surface.d.ts +12 -12
  106. package/dist/components/switch/switch.d.ts +7 -7
  107. package/dist/components/tabs/tabs-list.d.ts +1 -1
  108. package/dist/components/tabs/tabs-panel.d.ts +1 -1
  109. package/dist/components/tabs/tabs-tab.d.ts +3 -3
  110. package/dist/components/tabs/tabs.d.ts +2 -2
  111. package/dist/components/text/text.css +1 -1
  112. package/dist/components/text/text.d.ts +24 -23
  113. package/dist/components/text/text.js +4 -2
  114. package/dist/components/textarea/textarea.d.ts +6 -6
  115. package/dist/components/textfield/textfield.css +1 -1
  116. package/dist/components/textfield/textfield.d.ts +19 -11
  117. package/dist/components/textfield/textfield.js +43 -39
  118. package/dist/components/textfield/textfield.module.js +3 -1
  119. package/dist/components/title/title.css +1 -1
  120. package/dist/components/title/title.d.ts +22 -21
  121. package/dist/components/title/title.js +4 -2
  122. package/dist/components/toast/toast-action.d.ts +1 -1
  123. package/dist/components/toast/toast-banner.d.ts +7 -7
  124. package/dist/components/toast/toast-banner.js +1 -1
  125. package/dist/components/toast/toast-viewport.d.ts +2 -2
  126. package/dist/components/toggle-button/toggle-button.d.ts +6 -6
  127. package/dist/components/toggle-group/toggle-group.d.ts +1 -1
  128. package/dist/components/tooltip/tooltip-content.d.ts +2 -2
  129. package/dist/components/typewriter/typewriter.d.ts +10 -10
  130. package/dist/index.js +7 -3
  131. package/dist/specs/components/accordion/usage.xml +1 -0
  132. package/dist/specs/components/beam/a11y.xml +3 -3
  133. package/dist/specs/components/beam/props.xml +22 -1
  134. package/dist/specs/components/beam/usage.xml +1 -0
  135. package/dist/specs/components/disclosure/a11y.xml +9 -0
  136. package/dist/specs/components/disclosure/meta.xml +20 -0
  137. package/dist/specs/components/disclosure/patterns.xml +55 -0
  138. package/dist/specs/components/disclosure/props.xml +54 -0
  139. package/dist/specs/components/disclosure/usage.xml +11 -0
  140. package/dist/specs/components/meter/patterns.xml +12 -0
  141. package/dist/specs/components/meter/props.xml +7 -0
  142. package/dist/specs/components/meter/usage.xml +2 -0
  143. package/dist/specs/components/number-field/a11y.xml +10 -0
  144. package/dist/specs/components/number-field/meta.xml +21 -0
  145. package/dist/specs/components/number-field/patterns.xml +43 -0
  146. package/dist/specs/components/number-field/props.xml +35 -0
  147. package/dist/specs/components/number-field/usage.xml +12 -0
  148. package/dist/specs/components/otp-field/a11y.xml +10 -0
  149. package/dist/specs/components/otp-field/meta.xml +20 -0
  150. package/dist/specs/components/otp-field/patterns.xml +66 -0
  151. package/dist/specs/components/otp-field/props.xml +29 -0
  152. package/dist/specs/components/otp-field/usage.xml +13 -0
  153. package/dist/specs/components/prose/a11y.xml +7 -0
  154. package/dist/specs/components/prose/meta.xml +18 -0
  155. package/dist/specs/components/prose/patterns.xml +59 -0
  156. package/dist/specs/components/prose/props.xml +37 -0
  157. package/dist/specs/components/prose/usage.xml +12 -0
  158. package/dist/specs/components/separator/props.xml +3 -0
  159. package/dist/specs/components/separator/usage.xml +1 -0
  160. package/dist/specs/components/text/props.xml +2 -2
  161. package/dist/specs/components/text/usage.xml +1 -0
  162. package/dist/specs/components/textfield/meta.xml +1 -0
  163. package/dist/specs/components/textfield/props.xml +6 -1
  164. package/dist/specs/components/textfield/usage.xml +2 -1
  165. package/dist/specs/components/title/props.xml +2 -2
  166. package/dist/specs/components/title/usage.xml +1 -0
  167. package/dist/specs/index.xml +41 -1
  168. package/package.json +2 -2
@@ -10,46 +10,50 @@ import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import { Field } from "@base-ui/react/field";
11
11
  import { Input } from "@base-ui/react/input";
12
12
  //#region src/components/textfield/textfield.tsx
13
- var Textfield = ({ className, description, dirty, disabled, endAddon, error, fitContent, fullWidth = false, invalid, label, name, ref, startAddon, touched, validate, validationDebounceTime, validationMode, ...inputProps }) => /* @__PURE__ */ jsxs(Field.Root, {
14
- className: clsx(textfield_module_default.Textfield, className),
15
- dirty,
16
- disabled,
17
- invalid,
18
- name,
19
- touched,
20
- validate,
21
- validationDebounceTime,
22
- validationMode,
23
- "data-fullwidth": fullWidth,
24
- render: /* @__PURE__ */ jsx(Stack, {
25
- expandChildren: true,
26
- rowGap: "s"
27
- }),
28
- children: [
29
- label && /* @__PURE__ */ jsx(Field.Label, {
30
- className: textfield_module_default.Label,
31
- children: /* @__PURE__ */ jsx(FieldLabel, { children: label })
13
+ var Textfield = ({ className, controlOnly = false, description, dirty, disabled, endAddon, error, fitContent, fullWidth = false, invalid, label, name, ref, render, startAddon, touched, validate, validationDebounceTime, validationMode, ...inputProps }) => {
14
+ const control = /* @__PURE__ */ jsx(InputControlGroup, {
15
+ addonClassName: textfield_module_default.Addon,
16
+ controlGroupClassName: clsx(textfield_module_default.ControlGroup, controlOnly && textfield_module_default.ControlOnly),
17
+ endAddon,
18
+ startAddon,
19
+ children: /* @__PURE__ */ jsx(BasicInput, {
20
+ ...inputProps,
21
+ ref,
22
+ className: clsx(textfield_module_default.CustomBasicInput, controlOnly && className),
23
+ disabled,
24
+ fitContent,
25
+ render: render ?? /* @__PURE__ */ jsx(Input, {})
26
+ })
27
+ });
28
+ if (controlOnly) return control;
29
+ return /* @__PURE__ */ jsxs(Field.Root, {
30
+ className: clsx(textfield_module_default.Textfield, className),
31
+ "data-fullwidth": fullWidth,
32
+ dirty,
33
+ disabled,
34
+ invalid,
35
+ name,
36
+ render: /* @__PURE__ */ jsx(Stack, {
37
+ expandChildren: true,
38
+ rowGap: "s"
32
39
  }),
33
- /* @__PURE__ */ jsx(InputControlGroup, {
34
- addonClassName: textfield_module_default.Addon,
35
- controlGroupClassName: textfield_module_default.ControlGroup,
36
- endAddon,
37
- startAddon,
38
- children: /* @__PURE__ */ jsx(BasicInput, {
39
- ...inputProps,
40
- ref,
41
- className: textfield_module_default.CustomBasicInput,
42
- disabled,
43
- fitContent,
44
- render: /* @__PURE__ */ jsx(Input, {})
40
+ touched,
41
+ validate,
42
+ validationDebounceTime,
43
+ validationMode,
44
+ children: [
45
+ label && /* @__PURE__ */ jsx(Field.Label, {
46
+ className: textfield_module_default.Label,
47
+ children: /* @__PURE__ */ jsx(FieldLabel, { children: label })
48
+ }),
49
+ control,
50
+ /* @__PURE__ */ jsx(FieldHelperCopy, {
51
+ className: textfield_module_default.Description,
52
+ description,
53
+ error
45
54
  })
46
- }),
47
- /* @__PURE__ */ jsx(FieldHelperCopy, {
48
- className: textfield_module_default.Description,
49
- description,
50
- error
51
- })
52
- ]
53
- });
55
+ ]
56
+ });
57
+ };
54
58
  //#endregion
55
59
  export { Textfield };
@@ -1,5 +1,6 @@
1
1
  //#region src/components/textfield/textfield.module.css
2
2
  var Textfield = "viraui__textfield-module__Textfield_o-70A";
3
+ var ControlOnly = "viraui__textfield-module__ControlOnly_22bXm";
3
4
  var Label = "viraui__textfield-module__Label_5rjr0";
4
5
  var ControlGroup = "viraui__textfield-module__ControlGroup_2W-OC";
5
6
  var CustomBasicInput = "viraui__textfield-module__CustomBasicInput_oHgtd";
@@ -7,6 +8,7 @@ var Addon = "viraui__textfield-module__Addon_kK1ef";
7
8
  var Description = "viraui__textfield-module__Description_8Qxot";
8
9
  var textfield_module_default = {
9
10
  Textfield,
11
+ ControlOnly,
10
12
  Label,
11
13
  ControlGroup,
12
14
  CustomBasicInput,
@@ -14,4 +16,4 @@ var textfield_module_default = {
14
16
  Description
15
17
  };
16
18
  //#endregion
17
- export { Addon, ControlGroup, CustomBasicInput, Description, Label, Textfield, textfield_module_default as default };
19
+ export { Addon, ControlGroup, ControlOnly, CustomBasicInput, Description, Label, Textfield, textfield_module_default as default };
@@ -2,4 +2,4 @@
2
2
  var(--__title-size-min),
3
3
  calc(var(--__title-size-min) + (var(--__title-size-max) - var(--__title-size-min)) * var(--__title-fluid)),
4
4
  var(--__title-size-max)
5
- );--vui-title-font-family:var(--font-family-heading);--vui-title-line-height:var(--font-leading-m);--__title-letter-spacing:-0.03em;margin:0;max-inline-size:var(--vui-title-max-width);font-family:var(--vui-title-font-family);font-size:var(--vui-title-font-size);line-height:var(--vui-title-line-height);letter-spacing:var(--__title-letter-spacing);text-transform:var(--vui-title-text-transform);text-align:var(--vui-title-align);white-space:var(--vui-title-white-space);word-break:break-word;font-weight:var(--vui-title-font-weight);font-stretch:calc(var(--vui-title-font-width) * 1%);font-optical-sizing:auto;font-variation-settings:"wght" var(--vui-title-font-weight),"wdth" var(--vui-title-font-width),"opsz" var(--vui-title-font-opsz);text-box:var(--vui-title-trim) var(--vui-title-trim-type);display:inline-flex;&[data-title-has-tracking=true]{letter-spacing:var(--vui-title-letter-spacing)}&[data-title-balanced=true]{text-wrap:balance}&[data-title-selection=false]{-webkit-user-select:none;user-select:none}&[data-title-has-padding=true]{padding:var(--vui-title-padding-block-start) var(--vui-title-padding-inline-end) var(--vui-title-padding-block-end) var(--vui-title-padding-inline-start)}&[data-title-size=display]{--__title-size-min:var(--font-scale-h1);--__title-size-max:var(--font-scale-display)}&[data-title-size="2"]{--__title-size-min:var(--font-scale-h3);--__title-size-max:var(--font-scale-h2)}&[data-title-size="3"]{--__title-size-min:var(--font-scale-h4);--__title-size-max:var(--font-scale-h3)}&[data-title-size="4"]{--__title-size-min:var(--font-scale-h5);--__title-size-max:var(--font-scale-h4)}&[data-title-size="5"]{--__title-size-min:var(--font-scale-h6);--__title-size-max:var(--font-scale-h5);--__title-letter-spacing:-0.02em}&[data-title-size="6"]{--__title-size-min:var(--font-scale-body-m);--__title-size-max:var(--font-scale-h6);--__title-letter-spacing:-0.02em}&[data-title-fluid=false]{--vui-title-font-size:var(--__title-size-max)}@container root style(--effect-fluid-typography: initial){--vui-title-font-size:var(--__title-size-max)}&[data-title-has-literal-color=true]{color:var(--vui-title-literal-color)}&[data-title-line-height=none]{--vui-title-line-height:0}&[data-title-line-height=xs]{--vui-title-line-height:var(--font-leading-xs)}&[data-title-line-height=s]{--vui-title-line-height:var(--font-leading-s)}&[data-title-line-height=m]{--vui-title-line-height:var(--font-leading-m)}&[data-title-line-height=l]{--vui-title-line-height:var(--font-leading-l)}}}
5
+ );--vui-title-font-family:var(--font-family-heading);--vui-title-line-height:var(--font-leading-m);--__title-letter-spacing:-0.03em;margin:0;max-inline-size:var(--vui-title-max-width);font-family:var(--vui-title-font-family);font-size:var(--vui-title-font-size);line-height:var(--vui-title-line-height);letter-spacing:var(--__title-letter-spacing);text-transform:var(--vui-title-text-transform);white-space:var(--vui-title-white-space);word-break:break-word;font-weight:var(--vui-title-font-weight);font-stretch:calc(var(--vui-title-font-width) * 1%);font-optical-sizing:auto;font-variation-settings:"wght" var(--vui-title-font-weight),"wdth" var(--vui-title-font-width),"opsz" var(--vui-title-font-opsz);text-box:var(--vui-title-trim) var(--vui-title-trim-type);display:inline-flex;&[data-title-has-align=true]{text-align:var(--vui-title-align)}&[data-title-has-tracking=true]{letter-spacing:var(--vui-title-letter-spacing)}&[data-title-balanced=true]{text-wrap:balance}&[data-title-selection=false]{-webkit-user-select:none;user-select:none}&[data-title-has-padding=true]{padding:var(--vui-title-padding-block-start) var(--vui-title-padding-inline-end) var(--vui-title-padding-block-end) var(--vui-title-padding-inline-start)}&[data-title-size=display]{--__title-size-min:var(--font-scale-h1);--__title-size-max:var(--font-scale-display)}&[data-title-size="2"]{--__title-size-min:var(--font-scale-h3);--__title-size-max:var(--font-scale-h2)}&[data-title-size="3"]{--__title-size-min:var(--font-scale-h4);--__title-size-max:var(--font-scale-h3)}&[data-title-size="4"]{--__title-size-min:var(--font-scale-h5);--__title-size-max:var(--font-scale-h4)}&[data-title-size="5"]{--__title-size-min:var(--font-scale-h6);--__title-size-max:var(--font-scale-h5);--__title-letter-spacing:-0.02em}&[data-title-size="6"]{--__title-size-min:var(--font-scale-body-m);--__title-size-max:var(--font-scale-h6);--__title-letter-spacing:-0.02em}&[data-title-fluid=false]{--vui-title-font-size:var(--__title-size-max)}@container root style(--effect-fluid-typography: initial){--vui-title-font-size:var(--__title-size-max)}&[data-title-has-literal-color=true]{color:var(--vui-title-literal-color)}&[data-title-line-height=none]{--vui-title-line-height:0}&[data-title-line-height=xs]{--vui-title-line-height:var(--font-leading-xs)}&[data-title-line-height=s]{--vui-title-line-height:var(--font-leading-s)}&[data-title-line-height=m]{--vui-title-line-height:var(--font-leading-m)}&[data-title-line-height=l]{--vui-title-line-height:var(--font-leading-l)}}}
@@ -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,43 +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
+ * Omit so `text-align` inherits from the parent.
58
59
  *
59
- * @default 'start'
60
+ * @defaultValue Inherits parent `text-align`.
60
61
  */
61
62
  align?: React.CSSProperties['textAlign'];
62
63
  /**
63
64
  * Constrains the maximum inline size of the rendered text block.
64
65
  *
65
- * @default No max width constraint.
66
+ * @defaultValue No max width constraint.
66
67
  */
67
68
  maxWidth?: string;
68
69
  /**
69
70
  * Controls white-space preservation and wrapping behavior.
70
71
  *
71
- * @default 'normal'
72
+ * @defaultValue 'normal'
72
73
  */
73
74
  whiteSpace?: React.CSSProperties['whiteSpace'];
74
75
  /**
@@ -77,63 +78,63 @@ export type TitleProps = React.ComponentPropsWithoutRef<'span'> & {
77
78
  *
78
79
  * Overrides size preset letter-spacing when set.
79
80
  *
80
- * @default No letter-spacing override.
81
+ * @defaultValue No letter-spacing override.
81
82
  */
82
83
  tracking?: React.CSSProperties['letterSpacing'];
83
84
  /**
84
85
  * Applies `text-transform` on the rendered copy. Prefer this prop over CSS
85
86
  * `text-transform` on the same Title root.
86
87
  *
87
- * @default No text-transform override.
88
+ * @defaultValue No text-transform override.
88
89
  */
89
90
  transform?: React.CSSProperties['textTransform'];
90
91
  /**
91
92
  * Enables balanced wrapping for block-like titles.
92
93
  *
93
- * @default false
94
+ * @defaultValue false
94
95
  */
95
96
  balanced?: boolean;
96
97
  /**
97
98
  * Enables text selection on the rendered copy.
98
99
  *
99
- * @default true
100
+ * @defaultValue true
100
101
  */
101
102
  selection?: boolean;
102
103
  /**
103
104
  * Sets inline padding using one token for both sides or a `[start, end]` tuple.
104
105
  *
105
- * @default No inline padding.
106
+ * @defaultValue No inline padding.
106
107
  */
107
108
  hPadding?: TitleAxisPadding;
108
109
  /**
109
110
  * Sets block padding using one token for both sides or a `[start, end]` tuple.
110
111
  *
111
- * @default No block padding.
112
+ * @defaultValue No block padding.
112
113
  */
113
114
  vPadding?: TitleAxisPadding;
114
115
  /**
115
116
  * Trims text box whitespace at the chosen edge when the browser supports `text-box`.
116
117
  * Pass `false` to disable text-box trim.
117
118
  *
118
- * @default 'both'
119
+ * @defaultValue 'both'
119
120
  */
120
121
  trim?: 'start' | 'end' | 'both' | false;
121
122
  /**
122
123
  * Selects the `text-box` trim basis when `trim` is active.
123
124
  *
124
- * @default 'cap alphabetic'
125
+ * @defaultValue 'cap alphabetic'
125
126
  */
126
127
  trimType?: string;
127
128
  /**
128
129
  * Overrides font width as a percentage (100 = normal); maps to `font-stretch` and `wdth`.
129
130
  *
130
- * @default No width override.
131
+ * @defaultValue No width override.
131
132
  */
132
133
  fontWidth?: number;
133
134
  /**
134
135
  * Overrides the optical size (`opsz`) axis on variable fonts; static fonts keep `font-optical-sizing: auto`.
135
136
  *
136
- * @default No optical size override.
137
+ * @defaultValue No optical size override.
137
138
  */
138
139
  opticalSize?: number;
139
140
  /**
@@ -141,7 +142,7 @@ export type TitleProps = React.ComponentPropsWithoutRef<'span'> & {
141
142
  * Pass `false` to lock at this size’s `--font-scale-display` / `--font-scale-h*` token.
142
143
  * Theme `--effect-fluid-typography: initial` still locks all Title globally.
143
144
  *
144
- * @default true
145
+ * @defaultValue true
145
146
  */
146
147
  fluid?: boolean;
147
148
  };
@@ -4,11 +4,12 @@ import { resolveAxisPadding } from "../../core/styles/resolve-axis-padding.js";
4
4
  import title_module_default from "./title.module.js";
5
5
  import { useRender } from "@base-ui/react/use-render";
6
6
  //#region src/components/title/title.tsx
7
- var Title = ({ align = "start", balanced = false, selection = true, className, color, fluid = true, fontWidth, hPadding, size = "1", lineHeight = "m", maxWidth, opticalSize, ref, render, style, tracking, transform, trim = "both", trimType = "cap alphabetic", vPadding, weight, whiteSpace = "normal", ...otherProps }) => {
7
+ var Title = ({ align, balanced = false, selection = true, className, color, fluid = true, fontWidth, hPadding, size = "1", lineHeight = "m", maxWidth, opticalSize, ref, render, style, tracking, transform, trim = "both", trimType = "cap alphabetic", vPadding, weight, whiteSpace = "normal", ...otherProps }) => {
8
+ const hasAlign = align !== void 0;
8
9
  const hasPadding = Boolean(hPadding || vPadding);
9
10
  const hasTracking = tracking !== void 0;
10
11
  const dynamicStyle = {
11
- "--vui-title-align": align,
12
+ ...hasAlign && { "--vui-title-align": align },
12
13
  "--vui-title-max-width": maxWidth ?? "none",
13
14
  "--vui-title-literal-color": color,
14
15
  "--vui-title-white-space": whiteSpace,
@@ -34,6 +35,7 @@ var Title = ({ align = "start", balanced = false, selection = true, className, c
34
35
  "data-title-balanced": balanced ? "true" : "false",
35
36
  "data-title-selection": selection ? "true" : "false",
36
37
  "data-title-fluid": fluid ? "true" : "false",
38
+ "data-title-has-align": hasAlign ? "true" : "false",
37
39
  "data-title-has-padding": hasPadding ? "true" : "false",
38
40
  "data-title-has-literal-color": color ? "true" : "false",
39
41
  "data-title-has-tracking": hasTracking ? "true" : "false",
@@ -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
  };
@@ -1,8 +1,8 @@
1
1
  import { clsx } from "../../core/clsx.js";
2
2
  import { Text } from "../text/text.js";
3
3
  import { Stack } from "../stack/stack.js";
4
- import { Button } from "../button/button.js";
5
4
  import { Surface } from "../surface/surface.js";
5
+ import { Button } from "../button/button.js";
6
6
  import toast_module_default from "./toast.module.js";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { Toast } from "@base-ui/react/toast";
@@ -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
@@ -6,6 +6,7 @@ import { Autocomplete } from "./components/autocomplete/autocomplete.js";
6
6
  import { Avatar } from "./components/avatar/avatar.js";
7
7
  import { AvatarGroup } from "./components/avatar-group/avatar-group.js";
8
8
  import { Badge } from "./components/badge/badge.js";
9
+ import { Surface } from "./components/surface/surface.js";
9
10
  import { Beam } from "./components/beam/beam.js";
10
11
  import { Bleed } from "./components/bleed/bleed.js";
11
12
  import { BreakpointsProvider } from "./components/breakpoints/breakpoints-provider.js";
@@ -23,12 +24,12 @@ import { DialogIndentBackground } from "./components/dialog/dialog-indent-backgr
23
24
  import { DialogSheet } from "./components/dialog/dialog-sheet.js";
24
25
  import { DialogTrigger } from "./components/dialog/dialog-trigger.js";
25
26
  import { Dialog } from "./components/dialog/dialog.js";
27
+ import { Disclosure } from "./components/disclosure/disclosure.js";
26
28
  import { ELEVATION_DEFAULTS } from "./core/elevation/elevation-types.js";
27
29
  import { getElevationProps } from "./core/elevation/get-elevation-props.js";
28
30
  import { Elevator } from "./components/elevator/elevator.js";
29
31
  import { Fieldset } from "./components/fieldset/fieldset.js";
30
32
  import { FitText } from "./components/fit-text/fit-text.js";
31
- import { Surface } from "./components/surface/surface.js";
32
33
  import { Glow } from "./components/glow/glow.js";
33
34
  import { Grid } from "./components/grid/grid.js";
34
35
  import { IconButton } from "./components/icon-button/icon-button.js";
@@ -46,9 +47,13 @@ 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";
51
+ import { Textfield } from "./components/textfield/textfield.js";
52
+ import { OTPField } from "./components/otp-field/otp-field.js";
49
53
  import { PopoverSheet } from "./components/popover/popover-sheet.js";
50
54
  import { Popover, PopoverClose, PopoverDescription, PopoverTitle, PopoverTrigger } from "./components/popover/popover.js";
51
55
  import { ProgressiveBlur } from "./components/progressive-blur/progressive-blur.js";
56
+ import { Prose } from "./components/prose/prose.js";
52
57
  import { Radio } from "./components/radio/radio.js";
53
58
  import { RadioGroup } from "./components/radio/radio-group.js";
54
59
  import { Select } from "./components/select/select.js";
@@ -60,7 +65,6 @@ import { StaticNoise } from "./components/static-noise/static-noise.js";
60
65
  import { Switch } from "./components/switch/switch.js";
61
66
  import { Tabs } from "./components/tabs/tabs.js";
62
67
  import { Textarea } from "./components/textarea/textarea.js";
63
- import { Textfield } from "./components/textfield/textfield.js";
64
68
  import { Title } from "./components/title/title.js";
65
69
  import { Toast } from "./components/toast/toast.js";
66
70
  import { ToggleButton } from "./components/toggle-button/toggle-button.js";
@@ -68,4 +72,4 @@ import { ToggleGroup } from "./components/toggle-group/toggle-group.js";
68
72
  import { Typewriter } from "./components/typewriter/typewriter.js";
69
73
  import { TooltipContent } from "./components/tooltip/tooltip-content.js";
70
74
  import { Tooltip, TooltipProvider, TooltipTrigger } from "./components/tooltip/tooltip.js";
71
- 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, Popover, PopoverClose, PopoverDescription, PopoverSheet, PopoverTitle, PopoverTrigger, ProgressiveBlur, 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>
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <a11y surface="beam">
3
- <rule>Root stays in the accessibility tree; bloom layer is empty div</rule>
3
+ <rule>Root stays in the accessibility tree; bloom layer is an empty decorative div with aria-hidden</rule>
4
4
  <rule>Beam is not a focus or status indicator — consumer owns accessible names and state</rule>
5
- <rule>Offscreen instances pause animations without firing activate/deactivate</rule>
6
- <rule>prefers-reduced-motion disables motion and leaves a static resting look</rule>
5
+ <rule>Offscreen instances set data-paused="true" and pause motion without firing activate/deactivate</rule>
6
+ <rule>prefers-reduced-motion keeps a static visible rest (no looping motion); animate=false still fades the effect away</rule>
7
7
  </a11y>