@forte-ui/react 1.0.0-alpha.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 (304) hide show
  1. package/README.md +240 -0
  2. package/dist/Accordion-9JunkjgY.js +111 -0
  3. package/dist/Alert-Cn_WUF3L.js +183 -0
  4. package/dist/AspectRatio-gSjpTVk-.js +39 -0
  5. package/dist/Avatar-BuitDluH.js +87 -0
  6. package/dist/Badge-sArNWMre.js +33 -0
  7. package/dist/Breadcrumb-Cq7tFtMX.js +170 -0
  8. package/dist/Button-AiyKnx5I.js +42 -0
  9. package/dist/ButtonGroup-C-CrwPXP.js +54 -0
  10. package/dist/Calendar-D7Q-QJ_e.js +503 -0
  11. package/dist/Checkbox-DfNbmOed.js +56 -0
  12. package/dist/Collapsible-D8UKiGip.js +86 -0
  13. package/dist/ColorPicker-B-eCI31W.js +612 -0
  14. package/dist/Combobox-D-BN-Tvp.js +302 -0
  15. package/dist/ContextMenu-D81uDaMG.js +44 -0
  16. package/dist/DatePicker-CfkMsaI-.js +192 -0
  17. package/dist/Dialog-_n8FpFs5.js +432 -0
  18. package/dist/Drawer-DKQF3OO7.js +158 -0
  19. package/dist/Field-FLFEO70D.js +58 -0
  20. package/dist/Fieldset-CYhh71Qt.js +28 -0
  21. package/dist/Form-DVPmW9XV.js +17 -0
  22. package/dist/Input-BgGWhO2q.js +18 -0
  23. package/dist/InputGroup-DsZyDXNn.js +89 -0
  24. package/dist/Menu-CKu9xE2h.js +261 -0
  25. package/dist/Menubar-Dax027Db.js +19 -0
  26. package/dist/NavList-DGvcIoJm.js +176 -0
  27. package/dist/NavigationMenu-BayQkUUb.js +209 -0
  28. package/dist/NumberField-P55SA8T7.js +191 -0
  29. package/dist/OTPField-CjHvBNSN.js +55 -0
  30. package/dist/Popover-BXhn2Wwt.js +142 -0
  31. package/dist/PreviewCard-Dnitrky0.js +99 -0
  32. package/dist/Progress-BlomDp-X.js +81 -0
  33. package/dist/ProgressCircle-j6XBl0fk.js +112 -0
  34. package/dist/Radio-BIcX4INJ.js +37 -0
  35. package/dist/Resizable-7nJJM97e.js +609 -0
  36. package/dist/ScrollArea-CBMGJ6hh.js +83 -0
  37. package/dist/Select-BP-zvdXm.js +237 -0
  38. package/dist/Separator-DewJBzaJ.js +21 -0
  39. package/dist/Skeleton-zr6ObCCq.js +79 -0
  40. package/dist/Slider-Bh8_cti1.js +104 -0
  41. package/dist/Spinner-BF0uD4hR.js +53 -0
  42. package/dist/Switch-OBewMMvM.js +39 -0
  43. package/dist/Tabs-LgkSbPSF.js +132 -0
  44. package/dist/Textarea-CqZJL41e.js +51 -0
  45. package/dist/Toast-BWayxAcd.js +304 -0
  46. package/dist/Toggle-BrhMnkF5.js +45 -0
  47. package/dist/Toolbar-OmOVCk3i.js +88 -0
  48. package/dist/Tooltip-CI4chsRw.js +101 -0
  49. package/dist/clsx-By2n9mTe.js +16 -0
  50. package/dist/cn.d.ts +8 -0
  51. package/dist/cn.js +11 -0
  52. package/dist/components/accordion/Accordion.d.ts +117 -0
  53. package/dist/components/accordion/Accordion.js +3 -0
  54. package/dist/components/accordion/index.d.ts +2 -0
  55. package/dist/components/accordion/index.js +2 -0
  56. package/dist/components/alert/Alert.d.ts +167 -0
  57. package/dist/components/alert/Alert.js +3 -0
  58. package/dist/components/alert/index.d.ts +2 -0
  59. package/dist/components/alert/index.js +2 -0
  60. package/dist/components/aspect-ratio/AspectRatio.d.ts +128 -0
  61. package/dist/components/aspect-ratio/AspectRatio.js +3 -0
  62. package/dist/components/aspect-ratio/index.d.ts +2 -0
  63. package/dist/components/aspect-ratio/index.js +2 -0
  64. package/dist/components/avatar/Avatar.d.ts +176 -0
  65. package/dist/components/avatar/Avatar.js +3 -0
  66. package/dist/components/avatar/index.d.ts +2 -0
  67. package/dist/components/avatar/index.js +2 -0
  68. package/dist/components/badge/Badge.d.ts +117 -0
  69. package/dist/components/badge/Badge.js +3 -0
  70. package/dist/components/badge/index.d.ts +2 -0
  71. package/dist/components/badge/index.js +2 -0
  72. package/dist/components/breadcrumb/Breadcrumb.d.ts +244 -0
  73. package/dist/components/breadcrumb/Breadcrumb.js +3 -0
  74. package/dist/components/breadcrumb/index.d.ts +2 -0
  75. package/dist/components/breadcrumb/index.js +2 -0
  76. package/dist/components/button/Button.d.ts +73 -0
  77. package/dist/components/button/Button.js +3 -0
  78. package/dist/components/button/index.d.ts +2 -0
  79. package/dist/components/button/index.js +2 -0
  80. package/dist/components/button-group/ButtonGroup.d.ts +113 -0
  81. package/dist/components/button-group/ButtonGroup.js +3 -0
  82. package/dist/components/button-group/index.d.ts +2 -0
  83. package/dist/components/button-group/index.js +2 -0
  84. package/dist/components/calendar/Calendar.d.ts +201 -0
  85. package/dist/components/calendar/Calendar.js +3 -0
  86. package/dist/components/calendar/index.d.ts +2 -0
  87. package/dist/components/calendar/index.js +2 -0
  88. package/dist/components/checkbox/Checkbox.d.ts +130 -0
  89. package/dist/components/checkbox/Checkbox.js +3 -0
  90. package/dist/components/checkbox/index.d.ts +2 -0
  91. package/dist/components/checkbox/index.js +2 -0
  92. package/dist/components/collapsible/Collapsible.d.ts +91 -0
  93. package/dist/components/collapsible/Collapsible.js +3 -0
  94. package/dist/components/collapsible/index.d.ts +2 -0
  95. package/dist/components/collapsible/index.js +2 -0
  96. package/dist/components/color-picker/ColorPicker.d.ts +553 -0
  97. package/dist/components/color-picker/ColorPicker.js +4 -0
  98. package/dist/components/color-picker/color.d.ts +102 -0
  99. package/dist/components/color-picker/color.js +249 -0
  100. package/dist/components/color-picker/index.d.ts +2 -0
  101. package/dist/components/color-picker/index.js +3 -0
  102. package/dist/components/combobox/Combobox.d.ts +553 -0
  103. package/dist/components/combobox/Combobox.js +3 -0
  104. package/dist/components/combobox/index.d.ts +2 -0
  105. package/dist/components/combobox/index.js +2 -0
  106. package/dist/components/context-menu/ContextMenu.d.ts +103 -0
  107. package/dist/components/context-menu/ContextMenu.js +3 -0
  108. package/dist/components/context-menu/index.d.ts +3 -0
  109. package/dist/components/context-menu/index.js +2 -0
  110. package/dist/components/date-picker/DatePicker.d.ts +268 -0
  111. package/dist/components/date-picker/DatePicker.js +3 -0
  112. package/dist/components/date-picker/index.d.ts +2 -0
  113. package/dist/components/date-picker/index.js +2 -0
  114. package/dist/components/dialog/Dialog.d.ts +567 -0
  115. package/dist/components/dialog/Dialog.js +3 -0
  116. package/dist/components/dialog/index.d.ts +2 -0
  117. package/dist/components/dialog/index.js +2 -0
  118. package/dist/components/drawer/Drawer.d.ts +351 -0
  119. package/dist/components/drawer/Drawer.js +3 -0
  120. package/dist/components/drawer/index.d.ts +2 -0
  121. package/dist/components/drawer/index.js +2 -0
  122. package/dist/components/field/Field.d.ts +170 -0
  123. package/dist/components/field/Field.js +3 -0
  124. package/dist/components/field/index.d.ts +2 -0
  125. package/dist/components/field/index.js +2 -0
  126. package/dist/components/fieldset/Fieldset.d.ts +60 -0
  127. package/dist/components/fieldset/Fieldset.js +3 -0
  128. package/dist/components/fieldset/index.d.ts +2 -0
  129. package/dist/components/fieldset/index.js +2 -0
  130. package/dist/components/form/Form.d.ts +76 -0
  131. package/dist/components/form/Form.js +3 -0
  132. package/dist/components/form/index.d.ts +2 -0
  133. package/dist/components/form/index.js +2 -0
  134. package/dist/components/input/Input.d.ts +67 -0
  135. package/dist/components/input/Input.js +3 -0
  136. package/dist/components/input/index.d.ts +2 -0
  137. package/dist/components/input/index.js +2 -0
  138. package/dist/components/input-group/InputGroup.d.ts +214 -0
  139. package/dist/components/input-group/InputGroup.js +3 -0
  140. package/dist/components/input-group/index.d.ts +2 -0
  141. package/dist/components/input-group/index.js +2 -0
  142. package/dist/components/menu/Menu.d.ts +587 -0
  143. package/dist/components/menu/Menu.js +3 -0
  144. package/dist/components/menu/index.d.ts +2 -0
  145. package/dist/components/menu/index.js +2 -0
  146. package/dist/components/menubar/Menubar.d.ts +104 -0
  147. package/dist/components/menubar/Menubar.js +3 -0
  148. package/dist/components/menubar/index.d.ts +2 -0
  149. package/dist/components/menubar/index.js +2 -0
  150. package/dist/components/nav-list/NavList.d.ts +290 -0
  151. package/dist/components/nav-list/NavList.js +3 -0
  152. package/dist/components/nav-list/index.d.ts +2 -0
  153. package/dist/components/nav-list/index.js +2 -0
  154. package/dist/components/navigation-menu/NavigationMenu.d.ts +483 -0
  155. package/dist/components/navigation-menu/NavigationMenu.js +3 -0
  156. package/dist/components/navigation-menu/index.d.ts +2 -0
  157. package/dist/components/navigation-menu/index.js +2 -0
  158. package/dist/components/number-field/NumberField.d.ts +303 -0
  159. package/dist/components/number-field/NumberField.js +3 -0
  160. package/dist/components/number-field/index.d.ts +2 -0
  161. package/dist/components/number-field/index.js +2 -0
  162. package/dist/components/otp-field/OTPField.d.ts +206 -0
  163. package/dist/components/otp-field/OTPField.js +3 -0
  164. package/dist/components/otp-field/index.d.ts +2 -0
  165. package/dist/components/otp-field/index.js +2 -0
  166. package/dist/components/popover/Popover.d.ts +394 -0
  167. package/dist/components/popover/Popover.js +3 -0
  168. package/dist/components/popover/index.d.ts +2 -0
  169. package/dist/components/popover/index.js +2 -0
  170. package/dist/components/preview-card/PreviewCard.d.ts +307 -0
  171. package/dist/components/preview-card/PreviewCard.js +3 -0
  172. package/dist/components/preview-card/index.d.ts +2 -0
  173. package/dist/components/preview-card/index.js +2 -0
  174. package/dist/components/progress/Progress.d.ts +156 -0
  175. package/dist/components/progress/Progress.js +3 -0
  176. package/dist/components/progress/ProgressCircle.d.ts +166 -0
  177. package/dist/components/progress/ProgressCircle.js +3 -0
  178. package/dist/components/progress/index.d.ts +4 -0
  179. package/dist/components/progress/index.js +3 -0
  180. package/dist/components/radio/Radio.d.ts +144 -0
  181. package/dist/components/radio/Radio.js +3 -0
  182. package/dist/components/radio/index.d.ts +2 -0
  183. package/dist/components/radio/index.js +2 -0
  184. package/dist/components/resizable/Resizable.d.ts +211 -0
  185. package/dist/components/resizable/Resizable.js +3 -0
  186. package/dist/components/resizable/index.d.ts +2 -0
  187. package/dist/components/resizable/index.js +2 -0
  188. package/dist/components/scroll-area/ScrollArea.d.ts +113 -0
  189. package/dist/components/scroll-area/ScrollArea.js +3 -0
  190. package/dist/components/scroll-area/index.d.ts +2 -0
  191. package/dist/components/scroll-area/index.js +2 -0
  192. package/dist/components/select/Select.d.ts +345 -0
  193. package/dist/components/select/Select.js +3 -0
  194. package/dist/components/select/index.d.ts +2 -0
  195. package/dist/components/select/index.js +2 -0
  196. package/dist/components/separator/Separator.d.ts +75 -0
  197. package/dist/components/separator/Separator.js +3 -0
  198. package/dist/components/separator/index.d.ts +2 -0
  199. package/dist/components/separator/index.js +2 -0
  200. package/dist/components/skeleton/Skeleton.d.ts +169 -0
  201. package/dist/components/skeleton/Skeleton.js +3 -0
  202. package/dist/components/skeleton/index.d.ts +2 -0
  203. package/dist/components/skeleton/index.js +2 -0
  204. package/dist/components/slider/Slider.d.ts +208 -0
  205. package/dist/components/slider/Slider.js +3 -0
  206. package/dist/components/slider/index.d.ts +2 -0
  207. package/dist/components/slider/index.js +2 -0
  208. package/dist/components/spinner/Spinner.d.ts +92 -0
  209. package/dist/components/spinner/Spinner.js +3 -0
  210. package/dist/components/spinner/index.d.ts +2 -0
  211. package/dist/components/spinner/index.js +2 -0
  212. package/dist/components/switch/Switch.d.ts +80 -0
  213. package/dist/components/switch/Switch.js +3 -0
  214. package/dist/components/switch/index.d.ts +2 -0
  215. package/dist/components/switch/index.js +2 -0
  216. package/dist/components/tabs/Tabs.d.ts +125 -0
  217. package/dist/components/tabs/Tabs.js +3 -0
  218. package/dist/components/tabs/index.d.ts +2 -0
  219. package/dist/components/tabs/index.js +2 -0
  220. package/dist/components/textarea/Textarea.d.ts +119 -0
  221. package/dist/components/textarea/Textarea.js +3 -0
  222. package/dist/components/textarea/index.d.ts +2 -0
  223. package/dist/components/textarea/index.js +2 -0
  224. package/dist/components/toast/Toast.d.ts +517 -0
  225. package/dist/components/toast/Toast.js +3 -0
  226. package/dist/components/toast/index.d.ts +2 -0
  227. package/dist/components/toast/index.js +2 -0
  228. package/dist/components/toggle/Toggle.d.ts +171 -0
  229. package/dist/components/toggle/Toggle.js +3 -0
  230. package/dist/components/toggle/index.d.ts +2 -0
  231. package/dist/components/toggle/index.js +2 -0
  232. package/dist/components/toolbar/Toolbar.d.ts +318 -0
  233. package/dist/components/toolbar/Toolbar.js +3 -0
  234. package/dist/components/toolbar/index.d.ts +2 -0
  235. package/dist/components/toolbar/index.js +2 -0
  236. package/dist/components/tooltip/Tooltip.d.ts +361 -0
  237. package/dist/components/tooltip/Tooltip.js +3 -0
  238. package/dist/components/tooltip/index.d.ts +2 -0
  239. package/dist/components/tooltip/index.js +2 -0
  240. package/dist/index.d.ts +92 -0
  241. package/dist/index.js +86 -0
  242. package/dist/styles/Accordion.css +1 -0
  243. package/dist/styles/Alert.css +1 -0
  244. package/dist/styles/AspectRatio.css +1 -0
  245. package/dist/styles/Avatar.css +1 -0
  246. package/dist/styles/Badge.css +1 -0
  247. package/dist/styles/Breadcrumb.css +1 -0
  248. package/dist/styles/Button.css +1 -0
  249. package/dist/styles/ButtonGroup.css +1 -0
  250. package/dist/styles/Calendar.css +1 -0
  251. package/dist/styles/Checkbox.css +1 -0
  252. package/dist/styles/Collapsible.css +1 -0
  253. package/dist/styles/ColorPicker.css +1 -0
  254. package/dist/styles/Combobox.css +1 -0
  255. package/dist/styles/ContextMenu.css +1 -0
  256. package/dist/styles/DatePicker.css +1 -0
  257. package/dist/styles/Dialog.css +1 -0
  258. package/dist/styles/Drawer.css +1 -0
  259. package/dist/styles/Field.css +1 -0
  260. package/dist/styles/Fieldset.css +1 -0
  261. package/dist/styles/Form.css +1 -0
  262. package/dist/styles/Input.css +1 -0
  263. package/dist/styles/InputGroup.css +1 -0
  264. package/dist/styles/Menu.css +1 -0
  265. package/dist/styles/Menubar.css +1 -0
  266. package/dist/styles/NavList.css +1 -0
  267. package/dist/styles/NavigationMenu.css +1 -0
  268. package/dist/styles/NumberField.css +1 -0
  269. package/dist/styles/OTPField.css +1 -0
  270. package/dist/styles/Popover.css +1 -0
  271. package/dist/styles/PreviewCard.css +1 -0
  272. package/dist/styles/Progress.css +1 -0
  273. package/dist/styles/ProgressCircle.css +1 -0
  274. package/dist/styles/Radio.css +1 -0
  275. package/dist/styles/Resizable.css +1 -0
  276. package/dist/styles/ScrollArea.css +1 -0
  277. package/dist/styles/Select.css +1 -0
  278. package/dist/styles/Separator.css +1 -0
  279. package/dist/styles/Skeleton.css +1 -0
  280. package/dist/styles/Slider.css +1 -0
  281. package/dist/styles/Spinner.css +1 -0
  282. package/dist/styles/Switch.css +1 -0
  283. package/dist/styles/Tabs.css +1 -0
  284. package/dist/styles/Textarea.css +1 -0
  285. package/dist/styles/Toast.css +1 -0
  286. package/dist/styles/Toggle.css +1 -0
  287. package/dist/styles/Toolbar.css +1 -0
  288. package/dist/styles/Tooltip.css +1 -0
  289. package/dist/styles/a11y.css +119 -0
  290. package/dist/styles/layers.css +39 -0
  291. package/dist/styles/motion.css +194 -0
  292. package/dist/styles/patterns.css +236 -0
  293. package/dist/styles/properties.css +62 -0
  294. package/dist/styles/reset.css +11 -0
  295. package/dist/styles/tailwind.css +281 -0
  296. package/dist/styles/theme.css +57 -0
  297. package/dist/styles/tokens.color.css +223 -0
  298. package/dist/styles/tokens.css +460 -0
  299. package/dist/tailwind-merge.d.ts +52 -0
  300. package/dist/tailwind-merge.js +52 -0
  301. package/docs-data/props.json +8047 -0
  302. package/docs-data/theming.json +9600 -0
  303. package/docs-data/tokens.json +4070 -0
  304. package/package.json +78 -0
@@ -0,0 +1,76 @@
1
+ import { FormProps as BaseFormProps } from '@base-ui/react/form';
2
+ import * as React from "react";
3
+ export type FormValidationMode = "onSubmit" | "onBlur" | "onChange";
4
+ export interface FormProps<FormValues extends Record<string, unknown> = Record<string, unknown>> extends Omit<BaseFormProps<FormValues>, "className"> {
5
+ /**
6
+ * When the fields inside are validated. `validationMode` on an individual
7
+ * `Field.Root` takes precedence over this.
8
+ *
9
+ * - `onSubmit` — validate on submit, then re-validate on change. The default,
10
+ * and the right one for most forms: it does not tell someone their email
11
+ * is invalid while they are still on the third character of it.
12
+ * - `onBlur` — validate a field when it loses focus.
13
+ * - `onChange` — validate on every keystroke. Pair it with
14
+ * `validationDebounceTime` on the field if `validate` is expensive.
15
+ * @default "onSubmit"
16
+ */
17
+ validationMode?: FormValidationMode;
18
+ /**
19
+ * Errors that came from somewhere other than the browser — a server
20
+ * response, a form action, a schema parse. Keys are the `name` of a
21
+ * `Field.Root`; values are a message or an array of messages, which the
22
+ * matching `Field.Error` then renders.
23
+ */
24
+ errors?: BaseFormProps<FormValues>["errors"];
25
+ /**
26
+ * Called on submit once every field passes validation, with the form's
27
+ * values collected by `name`. Base UI calls `preventDefault()` on the native
28
+ * event for you, so this replaces `onSubmit` rather than sitting beside it.
29
+ */
30
+ onFormSubmit?: BaseFormProps<FormValues>["onFormSubmit"];
31
+ /**
32
+ * A ref to imperative actions. `validate()` runs every field; pass a field
33
+ * name to run just one.
34
+ */
35
+ actionsRef?: BaseFormProps<FormValues>["actionsRef"];
36
+ /**
37
+ * Additional class name(s). Applied after the internal styles so consumer
38
+ * utilities (e.g. Tailwind) win without needing `!important`.
39
+ */
40
+ className?: string;
41
+ /**
42
+ * Ref to the underlying `<form>` element. Declared explicitly rather than
43
+ * through `forwardRef` because the component is generic — a `forwardRef`
44
+ * wrapper would erase `FormValues` and with it the typing of
45
+ * `onFormSubmit`.
46
+ */
47
+ ref?: React.Ref<HTMLFormElement>;
48
+ }
49
+ /**
50
+ * A `<form>` that collects the validation state of every `Field` inside it,
51
+ * built on Base UI's `Form` primitive.
52
+ *
53
+ * ```tsx
54
+ * <Form
55
+ * onFormSubmit={async (values) => {
56
+ * const result = await save(values);
57
+ * if (!result.ok) setErrors(result.errors); // keys match Field.Root name
58
+ * }}
59
+ * errors={errors}
60
+ * >
61
+ * <Field.Root name="email">…</Field.Root>
62
+ * <Button type="submit">Save</Button>
63
+ * </Form>
64
+ * ```
65
+ *
66
+ * Two things it does that a bare `<form>` does not: it blocks submission while
67
+ * any field is invalid and moves focus to the first one that failed, and it
68
+ * routes the `errors` object back to the right `Field.Error` by `name` — which
69
+ * is why the `name` belongs on `Field.Root` rather than on the control.
70
+ *
71
+ * It lays out as a column with `--forte-form-gap` between children, since a form
72
+ * is nearly always a stack of fields. Set `display` through `className` for
73
+ * anything else; the gap is a knob rather than a hardcoded rule for exactly
74
+ * that reason.
75
+ */
76
+ export declare function Form<FormValues extends Record<string, unknown> = Record<string, unknown>>({ className, ...props }: FormProps<FormValues>): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import { t as e } from "../../Form-DVPmW9XV.js";
3
+ export { e as Form };
@@ -0,0 +1,2 @@
1
+ export { Form } from './Form';
2
+ export type { FormProps, FormValidationMode } from './Form';
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../../Form-DVPmW9XV.js";
2
+ export { e as Form };
@@ -0,0 +1,67 @@
1
+ import { Input as BaseInput } from '@base-ui/react/input';
2
+ import * as React from "react";
3
+ export type InputSize = "sm" | "md" | "lg";
4
+ export type InputVariant = "outline" | "soft" | "ghost";
5
+ type BaseInputProps = React.ComponentPropsWithoutRef<typeof BaseInput>;
6
+ export interface InputProps extends Omit<BaseInputProps, "className" | "size"> {
7
+ /**
8
+ * Size of the control. Height, inline padding and font size all move
9
+ * together, and the actual numbers follow the ambient `data-forte-density`
10
+ * setting. Matches `Select.Trigger`'s scale, so an input and a select on the
11
+ * same row line up.
12
+ *
13
+ * This shadows the native `size` attribute (which sets a width in
14
+ * characters). Reach for `fullWidth`, a CSS `inline-size`, or
15
+ * `render={<input size={10} />}` if you need that instead.
16
+ * @default "md"
17
+ */
18
+ size?: InputSize;
19
+ /**
20
+ * How much visual weight the control carries. `outline` reads as a form
21
+ * control, `soft` as a filled field, `ghost` as an inline affordance.
22
+ * @default "outline"
23
+ */
24
+ variant?: InputVariant;
25
+ /**
26
+ * Stretch the input to fill the width of its container. Only needed outside
27
+ * a `Field.Root` — a field is a flex column, so an input inside one already
28
+ * stretches.
29
+ * @default false
30
+ */
31
+ fullWidth?: boolean;
32
+ /**
33
+ * Additional class name(s). Applied after the internal styles so consumer
34
+ * utilities (e.g. Tailwind) win without needing `!important`.
35
+ */
36
+ className?: string;
37
+ }
38
+ /**
39
+ * A text input built on Base UI's `Input` primitive.
40
+ *
41
+ * Base UI's `Input` *is* `Field.Control` — the same component under a friendlier
42
+ * name — so this needs no wiring to participate in a `Field`: put one inside a
43
+ * `Field.Root` and it picks up the label, the description, the error message,
44
+ * `name`, `disabled` and the validity attributes automatically. Outside a field
45
+ * it is an ordinary `<input>`, so `type`, `placeholder`, `required`, `pattern`
46
+ * and the rest all pass straight through.
47
+ *
48
+ * ```tsx
49
+ * <Field.Root name="email">
50
+ * <Field.Label>Email</Field.Label>
51
+ * <Input type="email" required placeholder="you@example.com" />
52
+ * <Field.Error />
53
+ * </Field.Root>
54
+ * ```
55
+ *
56
+ * For a multi-line control reach for `Textarea`, which is the same
57
+ * `Field.Control` rendered as a `<textarea>` and adds the things a paragraph of
58
+ * text needs — row-based sizing, a growth ceiling, and `autoResize`.
59
+ *
60
+ * State is exposed on `data-*` (`data-disabled`, `data-invalid`, `data-valid`,
61
+ * `data-dirty`, `data-touched`, `data-filled`, `data-focused`) and every visual
62
+ * decision is a `--forte-input-*` custom property, so it can be re-skinned from
63
+ * plain CSS or targeted with Tailwind arbitrary variants
64
+ * (`data-[invalid]:...`) without wrapping.
65
+ */
66
+ export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLElement>>;
67
+ export {};
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import { t as e } from "../../Input-BgGWhO2q.js";
3
+ export { e as Input };
@@ -0,0 +1,2 @@
1
+ export { Input } from './Input';
2
+ export type { InputProps, InputSize, InputVariant } from './Input';
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../../Input-BgGWhO2q.js";
2
+ export { e as Input };
@@ -0,0 +1,214 @@
1
+ import { Input as BaseInput } from '@base-ui/react/input';
2
+ import { Field as BaseField } from '@base-ui/react/field';
3
+ import { ButtonProps } from '../button';
4
+ import * as React from "react";
5
+ export type InputGroupSize = "sm" | "md" | "lg";
6
+ export type InputGroupVariant = "outline" | "soft" | "ghost";
7
+ export type InputGroupAddonAlign = "inline-start" | "inline-end" | "block-start" | "block-end";
8
+ export interface InputGroupRootProps extends Omit<React.ComponentPropsWithoutRef<"div">, "className"> {
9
+ /**
10
+ * Size of the group. Height, inline padding and font size move together for
11
+ * the control and every addon at once, and the numbers come from the same
12
+ * `--forte-control-*` tokens `Input` and `Select.Trigger` read — so a group
13
+ * and a plain input on one row are the same height at every
14
+ * `data-forte-density` setting.
15
+ * @default "md"
16
+ */
17
+ size?: InputGroupSize;
18
+ /**
19
+ * How much visual weight the group carries. `outline` reads as a form
20
+ * control, `soft` as a filled field, `ghost` as an inline affordance — the
21
+ * same three `Input` has, because to a reader the group *is* the input.
22
+ * @default "outline"
23
+ */
24
+ variant?: InputGroupVariant;
25
+ /**
26
+ * Stretch the group to fill the width of its container. Only needed outside
27
+ * a `Field.Root` — a field is a flex column, so a group inside one already
28
+ * stretches.
29
+ * @default false
30
+ */
31
+ fullWidth?: boolean;
32
+ /**
33
+ * Additional class name(s). Applied after the internal styles so consumer
34
+ * utilities (e.g. Tailwind) win without needing `!important`.
35
+ */
36
+ className?: string;
37
+ }
38
+ /**
39
+ * The field shell: a `<div>` that draws one control boundary — border,
40
+ * background, radius, sizes, variants — around a bare `<InputGroup.Input>` or
41
+ * `<InputGroup.Textarea>` and any number of `<InputGroup.Addon>`s, so icons,
42
+ * prefixes and buttons sit *inside* the field instead of bolted onto it.
43
+ *
44
+ * Focus lives on the control; the group rings for it via
45
+ * `.forte-focus-ring-within`, so the whole field lights up the way a plain
46
+ * `Input` does. Buttons inside addons ring themselves, and the group stands
47
+ * down while they do.
48
+ *
49
+ * The group is a caret region, not a button: clicking anywhere in it —
50
+ * a prefix, an icon, the padding — focuses the control, exactly as clicking
51
+ * the empty end of a plain input places the caret. Interactive children keep
52
+ * the gesture for themselves.
53
+ *
54
+ * There is no `disabled` prop here on purpose. Disabled, read-only and
55
+ * invalid all belong to the control (or the `Field.Root` above it), and the
56
+ * group watches them through `:has()` — one source of truth, no way for the
57
+ * shell and the control to disagree.
58
+ */
59
+ export declare const InputGroupRoot: React.ForwardRefExoticComponent<InputGroupRootProps & React.RefAttributes<HTMLDivElement>>;
60
+ type BaseInputProps = React.ComponentPropsWithoutRef<typeof BaseInput>;
61
+ export interface InputGroupInputProps extends Omit<BaseInputProps, "className"> {
62
+ /**
63
+ * Additional class name(s). Applied after the internal styles so consumer
64
+ * utilities (e.g. Tailwind) win without needing `!important`.
65
+ */
66
+ className?: string;
67
+ }
68
+ /**
69
+ * The text control, rendered bare: the group owns the border, the background
70
+ * and the height, so this element is transparent and stretches to fill
71
+ * whatever the addons leave.
72
+ *
73
+ * Like `Input`, this is Base UI's `Input` — which *is* `Field.Control` — so a
74
+ * group inside a `Field.Root` picks up the label, the description, the error
75
+ * message, `name` and the validity attributes with no wiring, and the group's
76
+ * boundary recolours from the `data-invalid` this element carries.
77
+ */
78
+ export declare const InputGroupInput: React.ForwardRefExoticComponent<InputGroupInputProps & React.RefAttributes<HTMLElement>>;
79
+ type BaseControlProps = React.ComponentPropsWithoutRef<typeof BaseField.Control>;
80
+ type TextareaElementProps = Omit<React.ComponentPropsWithoutRef<"textarea">, "className">;
81
+ export interface InputGroupTextareaProps extends TextareaElementProps {
82
+ /**
83
+ * The number of rows the box is at its shortest. Sets the native `rows`
84
+ * attribute and the floor the control can never shrink below — including
85
+ * under `autoResize`.
86
+ * @default 3
87
+ */
88
+ rows?: number;
89
+ /**
90
+ * The number of rows the box may grow to before it starts scrolling
91
+ * instead. Only a ceiling: a textarea shorter than this is unaffected.
92
+ * Unset means no ceiling.
93
+ */
94
+ maxRows?: number;
95
+ /**
96
+ * Grow with the content as the user types, between `rows` and `maxRows` —
97
+ * the same behaviour, and the same `field-sizing` implementation with the
98
+ * same fallback, as `Textarea`'s `autoResize`.
99
+ * @default false
100
+ */
101
+ autoResize?: boolean;
102
+ /**
103
+ * Additional class name(s). Applied after the internal styles so consumer
104
+ * utilities (e.g. Tailwind) win without needing `!important`.
105
+ */
106
+ className?: string;
107
+ /** Replace the rendered element. Defaults to a `<textarea>`. */
108
+ render?: BaseControlProps["render"];
109
+ /** Callback fired when the value changes. Use when controlled. */
110
+ onValueChange?: BaseControlProps["onValueChange"];
111
+ }
112
+ /**
113
+ * The multi-line control, rendered bare the way `InputGroup.Input` is — the
114
+ * group draws the box. Height is counted in rows, exactly as `Textarea`
115
+ * counts it, and pairs naturally with `align="block-start"` /
116
+ * `align="block-end"` addons for a header row of actions or a footer row
117
+ * with a character count.
118
+ *
119
+ * There is no `resize` prop: the group's boundary is not this element's, so a
120
+ * native resize handle would sit visibly inside the field and drag a corner
121
+ * that is not the corner of anything. `autoResize` is the way a composer
122
+ * grows here.
123
+ */
124
+ export declare const InputGroupTextarea: React.ForwardRefExoticComponent<InputGroupTextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
125
+ export interface InputGroupAddonProps extends Omit<React.ComponentPropsWithoutRef<"div">, "className"> {
126
+ /**
127
+ * Which edge of the control the addon sits against. The `inline` pair
128
+ * shares the control's row; the `block` pair takes a full-width row of its
129
+ * own, above or below — the shape a textarea's toolbar or footer wants.
130
+ *
131
+ * Alignment is logical, so `inline-start` is the left edge in LTR and the
132
+ * right edge in RTL with no extra work.
133
+ * @default "inline-start"
134
+ */
135
+ align?: InputGroupAddonAlign;
136
+ /**
137
+ * Additional class name(s). Applied after the internal styles so consumer
138
+ * utilities (e.g. Tailwind) win without needing `!important`.
139
+ */
140
+ className?: string;
141
+ }
142
+ /**
143
+ * A slot inside the field for everything that is not the value: icons,
144
+ * prefixes and suffixes (wrap words in `<InputGroup.Text>`), buttons
145
+ * (`<InputGroup.Button>`), a `Spinner`, a keyboard hint.
146
+ *
147
+ * Placement is visual, driven by CSS `order`, so DOM order is free to follow
148
+ * focus order: put an addon that holds a button *after* the control in the
149
+ * source and the Tab sequence reads control-then-button even while the button
150
+ * draws at the start edge.
151
+ *
152
+ * Purely decorative content — icons above all — still needs
153
+ * `aria-hidden="true"`: the group cannot know which children carry meaning.
154
+ * Text that names or explains the control belongs to the field
155
+ * (`Field.Label`, `Field.Description`), not in here; a sighted-only prefix
156
+ * like a currency sign should be restated where assistive technology will
157
+ * meet it.
158
+ */
159
+ export declare const InputGroupAddon: React.ForwardRefExoticComponent<InputGroupAddonProps & React.RefAttributes<HTMLDivElement>>;
160
+ export interface InputGroupTextProps extends Omit<React.ComponentPropsWithoutRef<"span">, "className"> {
161
+ /**
162
+ * Additional class name(s). Applied after the internal styles so consumer
163
+ * utilities (e.g. Tailwind) win without needing `!important`.
164
+ */
165
+ className?: string;
166
+ }
167
+ /**
168
+ * Words inside an addon — a protocol, a unit, a domain, a count. A styled
169
+ * `<span>`: muted, unwrappable, sized by the group. Give it an `id` and point
170
+ * the control's `aria-describedby` at it when the text is information rather
171
+ * than decoration.
172
+ */
173
+ export declare const InputGroupText: React.ForwardRefExoticComponent<InputGroupTextProps & React.RefAttributes<HTMLSpanElement>>;
174
+ export interface InputGroupButtonProps extends ButtonProps {
175
+ }
176
+ /**
177
+ * A `Button` preset for life inside an addon: `ghost` + `neutral` so it reads
178
+ * as part of the field rather than a call to action, and sized by the group —
179
+ * the CSS caps it to the field's inner height, so at `sm` the visual box can
180
+ * dip below 24px. That is why this wrapper exists instead of a line of docs:
181
+ * it adds `.forte-target`, which floors the *hit* area at 24×24 without
182
+ * touching the visual one.
183
+ *
184
+ * It is otherwise exactly `Button` — every prop passes through, so
185
+ * `variant="solid"` turns the end addon into a primary action when the design
186
+ * calls for one. `iconOnly` still needs its `aria-label`.
187
+ */
188
+ export declare const InputGroupButton: React.ForwardRefExoticComponent<InputGroupButtonProps & React.RefAttributes<HTMLButtonElement>>;
189
+ /**
190
+ * A single field boundary around a text control and its trimmings.
191
+ *
192
+ * ```tsx
193
+ * <InputGroup.Root>
194
+ * <InputGroup.Addon>
195
+ * <SearchIcon aria-hidden="true" />
196
+ * </InputGroup.Addon>
197
+ * <InputGroup.Input placeholder="Search…" />
198
+ * <InputGroup.Addon align="inline-end">
199
+ * <InputGroup.Button iconOnly aria-label="Clear">
200
+ * <XIcon aria-hidden="true" />
201
+ * </InputGroup.Button>
202
+ * </InputGroup.Addon>
203
+ * </InputGroup.Root>
204
+ * ```
205
+ */
206
+ export declare const InputGroup: {
207
+ Root: React.ForwardRefExoticComponent<InputGroupRootProps & React.RefAttributes<HTMLDivElement>>;
208
+ Input: React.ForwardRefExoticComponent<InputGroupInputProps & React.RefAttributes<HTMLElement>>;
209
+ Textarea: React.ForwardRefExoticComponent<InputGroupTextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
210
+ Addon: React.ForwardRefExoticComponent<InputGroupAddonProps & React.RefAttributes<HTMLDivElement>>;
211
+ Text: React.ForwardRefExoticComponent<InputGroupTextProps & React.RefAttributes<HTMLSpanElement>>;
212
+ Button: React.ForwardRefExoticComponent<InputGroupButtonProps & React.RefAttributes<HTMLButtonElement>>;
213
+ };
214
+ export {};
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "../../InputGroup-DsZyDXNn.js";
3
+ export { o as InputGroup, n as InputGroupAddon, i as InputGroupButton, t as InputGroupInput, e as InputGroupRoot, r as InputGroupText, a as InputGroupTextarea };
@@ -0,0 +1,2 @@
1
+ export { InputGroup, InputGroupRoot, InputGroupInput, InputGroupTextarea, InputGroupAddon, InputGroupText, InputGroupButton, } from './InputGroup';
2
+ export type { InputGroupSize, InputGroupVariant, InputGroupAddonAlign, InputGroupRootProps, InputGroupInputProps, InputGroupTextareaProps, InputGroupAddonProps, InputGroupTextProps, InputGroupButtonProps, } from './InputGroup';
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "../../InputGroup-DsZyDXNn.js";
2
+ export { o as InputGroup, n as InputGroupAddon, i as InputGroupButton, t as InputGroupInput, e as InputGroupRoot, r as InputGroupText, a as InputGroupTextarea };