@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
@@ -0,0 +1,120 @@
1
+ "use client";
2
+ import './number-field.css';
3
+ import { clsx } from "../../core/clsx.js";
4
+ import { ChromeMinus, ChromePlus } from "../../internal/chrome-icons/chrome-icons.js";
5
+ import { BasicInput } from "../basic-input/basic-input.js";
6
+ import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
7
+ import { FieldLabel } from "../basic-input/field-label.js";
8
+ import { Stack } from "../stack/stack.js";
9
+ import { IconButton } from "../icon-button/icon-button.js";
10
+ import number_field_module_default from "./number-field.module.js";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ import { Field } from "@base-ui/react/field";
13
+ import { NumberField } from "@base-ui/react/number-field";
14
+ //#region src/components/number-field/number-field.tsx
15
+ var renderStepperAddon = (position, children) => /* @__PURE__ */ jsx(Stack, {
16
+ className: number_field_module_default.Addon,
17
+ "data-grow": "false",
18
+ "data-position": position,
19
+ "data-shrink": "false",
20
+ hAlign: "center",
21
+ hPadding: "xs",
22
+ inline: true,
23
+ vAlign: "center",
24
+ vPadding: "xs",
25
+ children
26
+ });
27
+ var NumberField$1 = ({ className, description, dirty, disabled, error, fitContent, fullWidth = false, invalid, label, labelScrub = true, ref, stepperPlacement = "split", style, touched, validate, validationDebounceTime, validationMode, ...rootProps }) => {
28
+ const decrement = /* @__PURE__ */ jsx(NumberField.Decrement, { render: /* @__PURE__ */ jsx(IconButton, {
29
+ "aria-label": "Decrement",
30
+ icon: /* @__PURE__ */ jsx(ChromeMinus, {}),
31
+ size: "s",
32
+ type: "button",
33
+ variant: "secondary"
34
+ }) });
35
+ const increment = /* @__PURE__ */ jsx(NumberField.Increment, { render: /* @__PURE__ */ jsx(IconButton, {
36
+ "aria-label": "Increment",
37
+ icon: /* @__PURE__ */ jsx(ChromePlus, {}),
38
+ size: "s",
39
+ type: "button",
40
+ variant: "secondary"
41
+ }) });
42
+ const stepperPair = /* @__PURE__ */ jsxs(Stack, {
43
+ columnGap: "xs",
44
+ direction: "row",
45
+ vAlign: "center",
46
+ children: [decrement, increment]
47
+ });
48
+ let startAddon;
49
+ let endAddon;
50
+ if (stepperPlacement === "grouped") endAddon = renderStepperAddon("end", stepperPair);
51
+ else {
52
+ startAddon = renderStepperAddon("start", decrement);
53
+ endAddon = renderStepperAddon("end", increment);
54
+ }
55
+ const labelContent = label ? /* @__PURE__ */ jsx(FieldLabel, { children: label }) : null;
56
+ return /* @__PURE__ */ jsx(NumberField.Root, {
57
+ className: number_field_module_default.NumberField,
58
+ disabled,
59
+ ...rootProps,
60
+ children: /* @__PURE__ */ jsxs(Field.Root, {
61
+ className: clsx(number_field_module_default.Field, className),
62
+ dirty,
63
+ disabled,
64
+ invalid,
65
+ render: /* @__PURE__ */ jsx(Stack, {
66
+ expandChildren: true,
67
+ fullWidth,
68
+ rowGap: "s",
69
+ style
70
+ }),
71
+ touched,
72
+ validate,
73
+ validationDebounceTime,
74
+ validationMode,
75
+ children: [
76
+ label && labelScrub && /* @__PURE__ */ jsx(NumberField.ScrubArea, {
77
+ className: number_field_module_default.ScrubArea,
78
+ children: /* @__PURE__ */ jsx(Field.Label, {
79
+ className: number_field_module_default.Label,
80
+ children: labelContent
81
+ })
82
+ }),
83
+ label && !labelScrub && /* @__PURE__ */ jsx(Field.Label, {
84
+ className: number_field_module_default.Label,
85
+ children: labelContent
86
+ }),
87
+ /* @__PURE__ */ jsxs(NumberField.Group, {
88
+ render: /* @__PURE__ */ jsx(Stack, {
89
+ className: number_field_module_default.ControlGroup,
90
+ direction: "row",
91
+ expandChildren: true,
92
+ vPadding: "xs",
93
+ fullWidth: true,
94
+ vAlign: "stretch"
95
+ }),
96
+ children: [
97
+ startAddon,
98
+ /* @__PURE__ */ jsx(BasicInput, {
99
+ className: number_field_module_default.CustomBasicInput,
100
+ disabled,
101
+ fitContent,
102
+ render: /* @__PURE__ */ jsx(NumberField.Input, {
103
+ "aria-roledescription": typeof description === "string" ? description : void 0,
104
+ ref
105
+ })
106
+ }),
107
+ endAddon
108
+ ]
109
+ }),
110
+ /* @__PURE__ */ jsx(FieldHelperCopy, {
111
+ className: number_field_module_default.Description,
112
+ description,
113
+ error
114
+ })
115
+ ]
116
+ })
117
+ });
118
+ };
119
+ //#endregion
120
+ export { NumberField$1 as NumberField };
@@ -0,0 +1,21 @@
1
+ //#region src/components/number-field/number-field.module.css
2
+ var NumberField = "viraui__number-field-module__NumberField_l7i9a";
3
+ var Field = "viraui__number-field-module__Field_Ud43i";
4
+ var Label = "viraui__number-field-module__Label_-Sji0";
5
+ var ControlGroup = "viraui__number-field-module__ControlGroup_CX5th";
6
+ var CustomBasicInput = "viraui__number-field-module__CustomBasicInput_6fmMO";
7
+ var Addon = "viraui__number-field-module__Addon_QwT1q";
8
+ var ScrubArea = "viraui__number-field-module__ScrubArea_3Wzje";
9
+ var Description = "viraui__number-field-module__Description_GWcij";
10
+ var number_field_module_default = {
11
+ NumberField,
12
+ Field,
13
+ Label,
14
+ ControlGroup,
15
+ CustomBasicInput,
16
+ Addon,
17
+ ScrubArea,
18
+ Description
19
+ };
20
+ //#endregion
21
+ export { Addon, ControlGroup, CustomBasicInput, Description, Field, Label, NumberField, ScrubArea, number_field_module_default as default };
@@ -0,0 +1,4 @@
1
+ export { OTPField } from './otp-field';
2
+ export type { OTPFieldProps } from './otp-field';
3
+ export type { OTPFieldInputProps } from './otp-field-input';
4
+ export type { OTPFieldSeparatorProps } from './otp-field-separator';
@@ -0,0 +1,12 @@
1
+ import { OTPFieldInput as PrimitiveOTPFieldInput } from '@base-ui/react/otp-field';
2
+ import * as React from 'react';
3
+ /**
4
+ * Public OTPField input props.
5
+ *
6
+ * Base UI OTP Input. Chrome is `render={<Textfield controlOnly fitContent size={1} />}`.
7
+ * No per-slot label, description, error, addons, or public `render`.
8
+ *
9
+ * @defaultValue Base UI pass-through props keep upstream defaults.
10
+ */
11
+ export type OTPFieldInputProps = Omit<PrimitiveOTPFieldInput.Props, 'render'>;
12
+ export declare const OTPFieldInput: React.FC<OTPFieldInputProps>;
@@ -0,0 +1,29 @@
1
+ import { clsx } from "../../core/clsx.js";
2
+ import { Textfield } from "../textfield/textfield.js";
3
+ import otp_field_module_default from "./otp-field.module.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import "react";
6
+ import { OTPField } from "@base-ui/react/otp-field";
7
+ //#region src/components/otp-field/otp-field-input.tsx
8
+ var OTPFieldInput = ({ "aria-label": ariaLabel, className, ...inputProps }) => {
9
+ const renderSlot = (props, state) => {
10
+ const generatedName = `Character ${state.index + 1} of ${state.length}`;
11
+ const resolvedAriaLabel = state.index > 0 && ariaLabel === void 0 ? generatedName : ariaLabel;
12
+ return /* @__PURE__ */ jsx(Textfield, {
13
+ controlOnly: true,
14
+ fitContent: true,
15
+ size: 1,
16
+ ...props,
17
+ "aria-label": resolvedAriaLabel,
18
+ ...resolvedAriaLabel != null ? { "aria-labelledby": void 0 } : {}
19
+ });
20
+ };
21
+ return /* @__PURE__ */ jsx(OTPField.Input, {
22
+ ...inputProps,
23
+ "aria-label": ariaLabel,
24
+ className: clsx(otp_field_module_default.Slot, className),
25
+ render: renderSlot
26
+ });
27
+ };
28
+ //#endregion
29
+ export { OTPFieldInput };
@@ -0,0 +1,13 @@
1
+ import { OTPField as PrimitiveOTPField } from '@base-ui/react/otp-field';
2
+ import * as React from 'react';
3
+ /**
4
+ * Public OTPField separator props.
5
+ *
6
+ * Base UI OTP Separator with Vira `Separator` chrome. Not an input.
7
+ *
8
+ * @defaultValue `orientation` is `'horizontal'`. Default `render` is a short Vira `Separator`
9
+ * with `minWidth` + `maxWidth` `var(--space-m)` so the dash stays visible in the slot row
10
+ * (`data-shrink="false"` alone is not enough — content size stays 0 under flex).
11
+ */
12
+ export type OTPFieldSeparatorProps = React.ComponentPropsWithRef<typeof PrimitiveOTPField.Separator>;
13
+ export declare const OTPFieldSeparator: React.FC<OTPFieldSeparatorProps>;
@@ -0,0 +1,20 @@
1
+ import { Separator } from "../separator/separator.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import "react";
4
+ import { OTPField } from "@base-ui/react/otp-field";
5
+ //#region src/components/otp-field/otp-field-separator.tsx
6
+ var otpSeparatorChrome = {
7
+ maxWidth: "var(--space-m)",
8
+ minWidth: "var(--space-m)"
9
+ };
10
+ var OTPFieldSeparator = ({ className, orientation = "horizontal", render, ...separatorProps }) => /* @__PURE__ */ jsx(OTPField.Separator, {
11
+ render: render ?? /* @__PURE__ */ jsx(Separator, {
12
+ ...otpSeparatorChrome,
13
+ orientation
14
+ }),
15
+ ...separatorProps,
16
+ className,
17
+ orientation
18
+ });
19
+ //#endregion
20
+ export { OTPFieldSeparator };
@@ -0,0 +1 @@
1
+ @layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{.viraui__otp-field-module__OTPField_8UOfz{--vui-textfield-input-height:var(--space-2xl);--vui-textfield-control-group-background:var(--base-1);--vui-textfield-control-group-color:var(--global-foreground);--vui-textfield-control-group-border-color:var(--global-contrast);--vui-textfield-control-group-border-radius:var(--radius-m);--vui-field-label-padding-inline:calc(var(--vui-textfield-control-group-border-radius) / 2);max-block-size:min-content;&[data-fullwidth=true]{inline-size:100%}&:has([required]) .viraui__otp-field-module__Label_7eZGm:after{content:" *";color:var(--highlight-red)}&[data-invalid][data-dirty] .viraui__otp-field-module__SlotCluster_nJxZ4:not(.viraui__otp-field-module__WiggleA_5-MVD,.viraui__otp-field-module__WiggleB_pfeA5){animation:viraui__otp-field-module__OTPFieldWiggleA_gLGT0 var(--duration-normal) var(--easing-wiggle)}}.viraui__otp-field-module__SlotCluster_nJxZ4{&.viraui__otp-field-module__WiggleA_5-MVD{animation:viraui__otp-field-module__OTPFieldWiggleA_gLGT0 var(--duration-normal) var(--easing-wiggle)}&.viraui__otp-field-module__WiggleB_pfeA5{animation:viraui__otp-field-module__OTPFieldWiggleB_0IC0k var(--duration-normal) var(--easing-wiggle)}@media (prefers-reduced-motion:reduce){animation:none}}@keyframes viraui__otp-field-module__OTPFieldWiggleA_gLGT0{0%{translate:var(--space-s)}to{translate:0}}@keyframes viraui__otp-field-module__OTPFieldWiggleB_0IC0k{0%{translate:var(--space-s)}to{translate:0}}.viraui__otp-field-module__Description_pYBbZ{padding-inline:calc(var(--vui-textfield-control-group-border-radius) / 2)}}@layer viraui.overrides{.viraui__otp-field-module__Slot_G3aie{text-align:center;padding-inline:0;aspect-ratio:1;&:focus::placeholder{color:#0000}}}
@@ -0,0 +1,48 @@
1
+ import { FieldRoot } from '@base-ui/react/field';
2
+ import { OTPFieldRoot as PrimitiveOTPFieldRoot } from '@base-ui/react/otp-field';
3
+ import { OTPFieldInputProps } from './otp-field-input';
4
+ import { OTPFieldSeparatorProps } from './otp-field-separator';
5
+ import * as React from 'react';
6
+ /**
7
+ * Public OTPField props.
8
+ *
9
+ * Field chrome plus Base UI OTP Root. `length` is required and does not spawn Inputs —
10
+ * list exactly that many `OTPField.Input` children. `render` replaces the OTP primitive
11
+ * root (slot cluster), not the Field wrapper.
12
+ *
13
+ * @defaultValue Base UI pass-through props keep upstream defaults.
14
+ */
15
+ export type OTPFieldProps = PrimitiveOTPFieldRoot.Props & Omit<FieldRoot.Props, 'ref' | 'render'> & {
16
+ /**
17
+ * Visible label rendered with shared internal `FieldLabel`. Names the first slot.
18
+ *
19
+ * @defaultValue No label is rendered.
20
+ */
21
+ label?: React.ReactNode;
22
+ /**
23
+ * Helper copy rendered with `Field.Description` and `Text` while the field is valid.
24
+ *
25
+ * @defaultValue No description is rendered.
26
+ */
27
+ description?: React.ReactNode;
28
+ /**
29
+ * Error copy rendered with `Field.Error` and `Text` in the same slot as `description`.
30
+ * Replaces description while the field is invalid and dirty.
31
+ *
32
+ * @defaultValue No static error copy is rendered.
33
+ */
34
+ error?: React.ReactNode;
35
+ /**
36
+ * When `true`, the field is `inline-size: 100%` and the inner slot Stack uses
37
+ * `fullWidth` + `expandChildren` so slots grow equally.
38
+ *
39
+ * @defaultValue false
40
+ */
41
+ fullWidth?: boolean;
42
+ };
43
+ type OTPFieldComponent = React.FC<OTPFieldProps> & {
44
+ Input: React.FC<OTPFieldInputProps>;
45
+ Separator: React.FC<OTPFieldSeparatorProps>;
46
+ };
47
+ export declare const OTPField: OTPFieldComponent;
48
+ export {};
@@ -0,0 +1,78 @@
1
+ "use client";
2
+ import './otp-field.css';
3
+ import { clsx } from "../../core/clsx.js";
4
+ import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
5
+ import { FieldLabel } from "../basic-input/field-label.js";
6
+ import { Stack } from "../stack/stack.js";
7
+ import otp_field_module_default from "./otp-field.module.js";
8
+ import { OTPFieldInput } from "./otp-field-input.js";
9
+ import { OTPFieldSeparator } from "./otp-field-separator.js";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ import { Field } from "@base-ui/react/field";
12
+ import * as React from "react";
13
+ import { OTPField } from "@base-ui/react/otp-field";
14
+ //#region src/components/otp-field/otp-field.tsx
15
+ var OTPFieldRoot = ({ children, className, description, dirty, disabled, error, fullWidth = false, invalid, label, name, onValueComplete, onValueInvalid, ref, render, touched, validate, validationDebounceTime, validationMode, ...otpRootProps }) => {
16
+ const [wigglePass, setWigglePass] = React.useState();
17
+ const bumpWiggle = () => {
18
+ setWigglePass((current) => current === "a" ? "b" : "a");
19
+ };
20
+ const handleValueInvalid = (value, eventDetails) => {
21
+ bumpWiggle();
22
+ onValueInvalid?.(value, eventDetails);
23
+ };
24
+ const handleValueComplete = (value, eventDetails) => {
25
+ if (invalid) bumpWiggle();
26
+ onValueComplete?.(value, eventDetails);
27
+ };
28
+ return /* @__PURE__ */ jsxs(Field.Root, {
29
+ className: clsx(otp_field_module_default.OTPField, className),
30
+ "data-fullwidth": fullWidth,
31
+ dirty,
32
+ disabled,
33
+ invalid,
34
+ name,
35
+ ref,
36
+ render: /* @__PURE__ */ jsx(Stack, {
37
+ expandChildren: true,
38
+ rowGap: "s"
39
+ }),
40
+ touched,
41
+ validate,
42
+ validationDebounceTime,
43
+ validationMode,
44
+ children: [
45
+ label && /* @__PURE__ */ jsx(Field.Label, {
46
+ className: otp_field_module_default.Label,
47
+ children: /* @__PURE__ */ jsx(FieldLabel, { children: label })
48
+ }),
49
+ /* @__PURE__ */ jsx(OTPField.Root, {
50
+ ...otpRootProps,
51
+ className: clsx(otp_field_module_default.SlotCluster, wigglePass === "a" && otp_field_module_default.WiggleA, wigglePass === "b" && otp_field_module_default.WiggleB),
52
+ disabled,
53
+ name,
54
+ onValueComplete: handleValueComplete,
55
+ onValueInvalid: handleValueInvalid,
56
+ render: render ?? /* @__PURE__ */ jsx(Stack, {
57
+ columnGap: "s",
58
+ direction: "row",
59
+ expandChildren: fullWidth,
60
+ fullWidth,
61
+ vAlign: "center"
62
+ }),
63
+ children
64
+ }),
65
+ /* @__PURE__ */ jsx(FieldHelperCopy, {
66
+ className: otp_field_module_default.Description,
67
+ description,
68
+ error
69
+ })
70
+ ]
71
+ });
72
+ };
73
+ var OTPField$1 = Object.assign(OTPFieldRoot, {
74
+ Input: OTPFieldInput,
75
+ Separator: OTPFieldSeparator
76
+ });
77
+ //#endregion
78
+ export { OTPField$1 as OTPField };
@@ -0,0 +1,23 @@
1
+ //#region src/components/otp-field/otp-field.module.css
2
+ var OTPField = "viraui__otp-field-module__OTPField_8UOfz";
3
+ var OTPFieldWiggleA = "viraui__otp-field-module__OTPFieldWiggleA_gLGT0";
4
+ var Label = "viraui__otp-field-module__Label_7eZGm";
5
+ var SlotCluster = "viraui__otp-field-module__SlotCluster_nJxZ4";
6
+ var WiggleA = "viraui__otp-field-module__WiggleA_5-MVD";
7
+ var WiggleB = "viraui__otp-field-module__WiggleB_pfeA5";
8
+ var OTPFieldWiggleB = "viraui__otp-field-module__OTPFieldWiggleB_0IC0k";
9
+ var Description = "viraui__otp-field-module__Description_pYBbZ";
10
+ var Slot = "viraui__otp-field-module__Slot_G3aie";
11
+ var otp_field_module_default = {
12
+ OTPField,
13
+ OTPFieldWiggleA,
14
+ Label,
15
+ SlotCluster,
16
+ WiggleA,
17
+ WiggleB,
18
+ OTPFieldWiggleB,
19
+ Description,
20
+ Slot
21
+ };
22
+ //#endregion
23
+ export { Description, Label, OTPField, OTPFieldWiggleA, OTPFieldWiggleB, Slot, SlotCluster, WiggleA, WiggleB, otp_field_module_default as default };
@@ -8,7 +8,7 @@ type PopoverSheetContainerProps = {
8
8
  * Omit for Base UI default (`document.body` from the module window —
9
9
  * iframe hosts must pass the iframe document body explicitly).
10
10
  *
11
- * @default Base UI FloatingPortal resolution
11
+ * @defaultValue Base UI FloatingPortal resolution
12
12
  */
13
13
  container?: React.ComponentProps<typeof PrimitivePopover.Portal>['container'];
14
14
  };
@@ -17,7 +17,7 @@ type PopoverSheetStyledProps = PopoverSheetPositionerProps & PopoverSheetContain
17
17
  * Whether to skip the built-in Surface, header, and close chrome and render
18
18
  * only the positioning/animation shell (Portal + Positioner + Popup + Viewport).
19
19
  *
20
- * @default false
20
+ * @defaultValue false
21
21
  */
22
22
  unstyled?: false;
23
23
  /**
@@ -27,19 +27,19 @@ type PopoverSheetStyledProps = PopoverSheetPositionerProps & PopoverSheetContain
27
27
  /**
28
28
  * Supporting copy announced with the title.
29
29
  *
30
- * @default No description is rendered.
30
+ * @defaultValue No description is rendered.
31
31
  */
32
32
  description?: React.ReactNode;
33
33
  /**
34
34
  * Whether to show the built-in flat IconButton close control.
35
35
  *
36
- * @default false
36
+ * @defaultValue false
37
37
  */
38
38
  showCloseButton?: boolean;
39
39
  /**
40
40
  * Aligns the header content.
41
41
  *
42
- * @default `start`
42
+ * @defaultValue `start`
43
43
  */
44
44
  headerAlign?: Extract<StackProps['hAlign'], 'start' | 'center' | 'end'>;
45
45
  };
@@ -68,7 +68,7 @@ type PopoverSheetUnstyledProps = PopoverSheetPositionerProps & PopoverSheetConta
68
68
  * and must compose `Popover.Title` (and `Popover.Description` when needed) for
69
69
  * accessible naming.
70
70
  *
71
- * @default `sideOffset` is `8`; no description, no close button, styled chrome.
71
+ * @defaultValue `sideOffset` is `8`; no description, no close button, styled chrome.
72
72
  */
73
73
  export type PopoverSheetProps = PopoverSheetStyledProps | PopoverSheetUnstyledProps;
74
74
  export declare const PopoverSheet: React.FC<PopoverSheetProps>;
@@ -9,7 +9,7 @@ import type * as React from 'react';
9
9
  * and `handle` for detached/multiple triggers. `children` may be a node or a
10
10
  * `({ payload }) => ReactNode` render function for per-trigger content.
11
11
  *
12
- * @default Base UI pass-through props keep upstream defaults.
12
+ * @defaultValue Base UI pass-through props keep upstream defaults.
13
13
  */
14
14
  export type PopoverProps = PopoverRoot.Props;
15
15
  /**
@@ -21,7 +21,7 @@ export type PopoverProps = PopoverRoot.Props;
21
21
  * `payload` for per-trigger content, `openOnHover`/`delay`/`closeDelay` for hover
22
22
  * open behavior, and `id` for controlled activation via the Root `triggerId` prop.
23
23
  *
24
- * @default Base UI pass-through props keep upstream defaults.
24
+ * @defaultValue Base UI pass-through props keep upstream defaults.
25
25
  */
26
26
  export type PopoverTriggerProps = PopoverTriggerNamespace.Props;
27
27
  /**
@@ -33,7 +33,7 @@ export type PopoverTriggerProps = PopoverTriggerNamespace.Props;
33
33
  *
34
34
  * Compose inside `Popover.Sheet` so the control closes the open popover.
35
35
  *
36
- * @default Base UI pass-through props keep upstream defaults.
36
+ * @defaultValue Base UI pass-through props keep upstream defaults.
37
37
  */
38
38
  export type PopoverCloseProps = PopoverCloseNamespace.Props;
39
39
  /**
@@ -44,7 +44,7 @@ export type PopoverCloseProps = PopoverCloseNamespace.Props;
44
44
  * `Popover.Sheet` so the popup keeps an accessible name; the styled sheet
45
45
  * renders it internally from its `title` prop.
46
46
  *
47
- * @default Base UI pass-through props keep upstream defaults.
47
+ * @defaultValue Base UI pass-through props keep upstream defaults.
48
48
  */
49
49
  export type PopoverTitleProps = PopoverTitleNamespace.Props;
50
50
  /**
@@ -55,7 +55,7 @@ export type PopoverTitleProps = PopoverTitleNamespace.Props;
55
55
  * `Popover.Sheet`; the styled sheet renders it internally from its
56
56
  * `description` prop.
57
57
  *
58
- * @default Base UI pass-through props keep upstream defaults.
58
+ * @defaultValue Base UI pass-through props keep upstream defaults.
59
59
  */
60
60
  export type PopoverDescriptionProps = PopoverDescriptionNamespace.Props;
61
61
  export declare const PopoverTrigger: PrimitivePopover.Trigger;
@@ -6,31 +6,31 @@ import type * as React from 'react';
6
6
  * Includes standard `div` attributes such as `id`, `className`, and event handlers,
7
7
  * plus Vira-owned progressive backdrop blur controls.
8
8
  *
9
- * @default Native div pass-through props keep React defaults.
9
+ * @defaultValue Native div pass-through props keep React defaults.
10
10
  */
11
11
  export type ProgressiveBlurProps = React.ComponentPropsWithRef<'div'> & {
12
12
  /**
13
13
  * Sets the maximum blur radius applied to the first layer at the selected edge.
14
14
  *
15
- * @default '16px'
15
+ * @defaultValue '16px'
16
16
  */
17
17
  blur?: string;
18
18
  /**
19
19
  * Selects the edge where maximum blur starts and fades toward the opposite edge.
20
20
  *
21
- * @default 'bottom'
21
+ * @defaultValue 'bottom'
22
22
  */
23
23
  direction?: ProgressiveBlurDirection;
24
24
  /**
25
25
  * Selects the easing curve used to distribute blur factors across internal layers.
26
26
  *
27
- * @default 'exponential'
27
+ * @defaultValue 'exponential'
28
28
  */
29
29
  easing?: ProgressiveBlurEasing;
30
30
  /**
31
31
  * Sets the number of internal blur layers. Values are clamped to `2..16`.
32
32
  *
33
- * @default Varies by easing: linear `6`, ease-in/out `8`, ease-in-out `10`, exponential `8`.
33
+ * @defaultValue Varies by easing: linear `6`, ease-in/out `8`, ease-in-out `10`, exponential `8`.
34
34
  */
35
35
  steps?: number;
36
36
  };
@@ -0,0 +1,2 @@
1
+ export { Prose } from './prose';
2
+ export type { ProseProps } from './prose';
@@ -0,0 +1 @@
1
+ @layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-prose-align{syntax:"*";inherits:false;initial-value:start}@property --vui-prose-gap-blocks{syntax:"<length>";inherits:true;initial-value:2em}@property --vui-prose-gap-heading-start{syntax:"<length>";inherits:true;initial-value:1.3em}@property --vui-prose-gap-heading-end{syntax:"<length>";inherits:true;initial-value:.8em}.viraui__prose-module__Prose_8yO9h{--vui-prose-gap-blocks:2em;--vui-prose-gap-heading-start:1.3em;--vui-prose-gap-heading-end:0.8em;&[data-prose-gap=s]{--vui-prose-gap-blocks:1em;--vui-prose-gap-heading-start:0.7em;--vui-prose-gap-heading-end:0.3em}&[data-prose-gap=m]{--vui-prose-gap-blocks:1.5em;--vui-prose-gap-heading-start:1em;--vui-prose-gap-heading-end:0.6em}&[data-prose-has-align=true]{text-align:var(--vui-prose-align)}&>:is(h1,h2,h3,h4,h5,h6,hgroup,ul,ol,dd,p,figure,img,pre,table,fieldset,blockquote,picture,div):where(:not(:first-child)){margin-block:var(--vui-prose-gap-blocks)}&>:is(h1,h2,h3,h4,h5,h6)+*{margin-block-start:var(--vui-prose-gap-heading-start)}&>:is(h1,h2,h3,h4,h5,h6){margin-block-end:var(--vui-prose-gap-heading-end);text-box:trim-both cap alphabetic}}}
@@ -0,0 +1,40 @@
1
+ import { useRender } from '@base-ui/react/use-render';
2
+ import type * as React from 'react';
3
+ type ProseGap = 's' | 'm' | 'l';
4
+ /**
5
+ * Public Prose props.
6
+ *
7
+ * Grouping wrapper for document blocks. Native `div` attributes pass through.
8
+ * Replace the root with Base UI `render` (for example `article`). No `as` prop.
9
+ *
10
+ * @defaultValue Native div pass-through props keep React defaults.
11
+ */
12
+ export type ProseProps = React.ComponentPropsWithoutRef<'div'> & {
13
+ /**
14
+ * Em density for heading-aware vertical rhythm (`s` < `m` < `l`).
15
+ *
16
+ * @defaultValue 'l'
17
+ */
18
+ gap?: ProseGap;
19
+ /**
20
+ * Aligns the region using logical alignment values.
21
+ * Omit so `text-align` inherits from the parent. Title/Text children that omit `align` inherit this value.
22
+ *
23
+ * @defaultValue Inherits parent `text-align`.
24
+ */
25
+ align?: React.CSSProperties['textAlign'];
26
+ /**
27
+ * Replaces the default `div` root using Base UI render semantics.
28
+ *
29
+ * @defaultValue The prose region renders a `div` root.
30
+ */
31
+ render?: useRender.RenderProp;
32
+ /**
33
+ * Ref forwarded to the rendered prose root element.
34
+ *
35
+ * @defaultValue No ref is attached.
36
+ */
37
+ ref?: React.Ref<HTMLElement>;
38
+ };
39
+ export declare const Prose: React.FC<ProseProps>;
40
+ export {};
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import './prose.css';
3
+ import { clsx } from "../../core/clsx.js";
4
+ import prose_module_default from "./prose.module.js";
5
+ import { useRender } from "@base-ui/react/use-render";
6
+ //#region src/components/prose/prose.tsx
7
+ var Prose = ({ align, className, gap = "l", ref, render, style, ...otherProps }) => {
8
+ const hasAlign = align !== void 0;
9
+ const dynamicStyle = {
10
+ ...hasAlign && { "--vui-prose-align": align },
11
+ ...style
12
+ };
13
+ return useRender({
14
+ defaultTagName: "div",
15
+ render,
16
+ ref,
17
+ props: {
18
+ ...otherProps,
19
+ "data-prose-gap": gap,
20
+ "data-prose-has-align": hasAlign ? "true" : "false",
21
+ className: clsx(prose_module_default.Prose, className),
22
+ style: dynamicStyle
23
+ }
24
+ });
25
+ };
26
+ //#endregion
27
+ export { Prose };
@@ -0,0 +1,5 @@
1
+ //#region src/components/prose/prose.module.css
2
+ var Prose = "viraui__prose-module__Prose_8yO9h";
3
+ var prose_module_default = { Prose };
4
+ //#endregion
5
+ export { Prose, prose_module_default as default };
@@ -5,7 +5,7 @@ import { RadioGroup as RadioGroupPrimitive } from '@base-ui/react';
5
5
  * Thin wrapper around Base UI `RadioGroup` with default option spacing.
6
6
  * Compose with `Field.Root` and `Fieldset` for group labels, validation, and copy.
7
7
  *
8
- * @default Base UI pass-through props keep upstream defaults.
8
+ * @defaultValue Base UI pass-through props keep upstream defaults.
9
9
  */
10
10
  export type RadioGroupProps<Value = string> = RadioGroupPrimitive.Props<Value>;
11
11
  export declare const RadioGroup: <Value>({ children, className, ...otherProps }: RadioGroupProps<Value>) => import('react').JSX.Element;
@@ -7,37 +7,37 @@ import type * as React from 'react';
7
7
  * Self-contained option row for use inside `RadioGroup`. Group-level `name`,
8
8
  * `invalid`, and `error` belong on an external `Field.Root` and `Fieldset`, not on individual options.
9
9
  *
10
- * @default Base UI pass-through props keep upstream defaults.
10
+ * @defaultValue Base UI pass-through props keep upstream defaults.
11
11
  */
12
12
  export type RadioProps = RadioRoot.Props & {
13
13
  /**
14
14
  * Visible label rendered with shared internal `FieldLabel`.
15
15
  *
16
- * @default No label is rendered.
16
+ * @defaultValue No label is rendered.
17
17
  */
18
18
  label?: React.ReactNode;
19
19
  /**
20
20
  * Helper copy rendered with `Field.Description` and `Text` for this option.
21
21
  *
22
- * @default No description is rendered.
22
+ * @defaultValue No description is rendered.
23
23
  */
24
24
  description?: React.ReactNode;
25
25
  /**
26
26
  * Controls the visual radio size.
27
27
  *
28
- * @default 's'
28
+ * @defaultValue 's'
29
29
  */
30
30
  size?: 'm' | 's';
31
31
  /**
32
32
  * Sets block padding using one token for both sides or a `[start, end]` tuple.
33
33
  *
34
- * @default No block padding.
34
+ * @defaultValue No block padding.
35
35
  */
36
36
  vPadding?: StackProps['vPadding'];
37
37
  /**
38
38
  * Sets inline padding using one token for both sides or a `[start, end]` tuple.
39
39
  *
40
- * @default No inline padding.
40
+ * @defaultValue No inline padding.
41
41
  */
42
42
  hPadding?: StackProps['hPadding'];
43
43
  };