@primecoderin/fast-ui-react 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/LICENSE +21 -0
  3. package/README.md +180 -3
  4. package/dist/_virtual/_rolldown/runtime.js +12 -0
  5. package/dist/charts.d.ts +7 -0
  6. package/dist/charts.js +7 -0
  7. package/dist/components/Avatar/Avatar.d.ts +12 -0
  8. package/dist/components/Avatar/Avatar.js +92 -0
  9. package/dist/components/Button/Button.d.ts +44 -0
  10. package/dist/components/Button/Button.js +221 -0
  11. package/dist/components/Checkbox/CheckboxBox.d.ts +33 -0
  12. package/dist/components/Checkbox/CheckboxBox.js +148 -0
  13. package/dist/components/CodeSnippet/CodeSnippet.d.ts +26 -0
  14. package/dist/components/CodeSnippet/CodeSnippet.js +153 -0
  15. package/dist/components/Collapsible/Collapsible.d.ts +20 -0
  16. package/dist/components/Collapsible/Collapsible.js +97 -0
  17. package/dist/components/Container/Container.d.ts +301 -0
  18. package/dist/components/Container/Container.js +20 -0
  19. package/dist/components/FloatingActionButton/FloatingActionButton.d.ts +22 -0
  20. package/dist/components/FloatingActionButton/FloatingActionButton.js +141 -0
  21. package/dist/components/Grid/Grid.d.ts +311 -0
  22. package/dist/components/Grid/Grid.js +30 -0
  23. package/dist/components/IconTile/IconTile.d.ts +12 -0
  24. package/dist/components/IconTile/IconTile.js +70 -0
  25. package/dist/components/InlineError/InlineError.d.ts +9 -0
  26. package/dist/components/InlineError/InlineError.js +62 -0
  27. package/dist/components/Kbd/Kbd.d.ts +11 -0
  28. package/dist/components/Kbd/Kbd.js +31 -0
  29. package/dist/components/Link/Link.d.ts +18 -0
  30. package/dist/components/Link/Link.js +68 -0
  31. package/dist/components/Menu/ContextMenu.d.ts +18 -0
  32. package/dist/components/Menu/ContextMenu.js +68 -0
  33. package/dist/components/Menu/Menu.d.ts +86 -0
  34. package/dist/components/Menu/Menu.js +394 -0
  35. package/dist/components/OtpInput/OtpInput.d.ts +32 -0
  36. package/dist/components/OtpInput/OtpInput.js +177 -0
  37. package/dist/components/Popover/HoverPopover.d.ts +22 -0
  38. package/dist/components/Popover/HoverPopover.js +74 -0
  39. package/dist/components/Popover/Popover.d.ts +21 -0
  40. package/dist/components/Popover/Popover.js +64 -0
  41. package/dist/components/ProgressBar/ProgressBar.d.ts +17 -0
  42. package/dist/components/ProgressBar/ProgressBar.js +44 -0
  43. package/dist/components/Rating/Rating.d.ts +49 -0
  44. package/dist/components/Rating/Rating.js +241 -0
  45. package/dist/components/ScrollArea/ScrollArea.d.ts +23 -0
  46. package/dist/components/ScrollArea/ScrollArea.js +90 -0
  47. package/dist/components/SegmentedControl/SegmentedControl.d.ts +29 -0
  48. package/dist/components/SegmentedControl/SegmentedControl.js +99 -0
  49. package/dist/components/Separator/Separator.d.ts +9 -0
  50. package/dist/components/Separator/Separator.js +34 -0
  51. package/dist/components/Skeleton/Skeleton.d.ts +31 -0
  52. package/dist/components/Skeleton/Skeleton.js +152 -0
  53. package/dist/components/Slider/Slider.d.ts +54 -0
  54. package/dist/components/Slider/Slider.js +178 -0
  55. package/dist/components/Spinner/Spinner.d.ts +17 -0
  56. package/dist/components/Spinner/Spinner.js +118 -0
  57. package/dist/components/Stack/Stack.d.ts +302 -0
  58. package/dist/components/Stack/Stack.js +14 -0
  59. package/dist/components/StateIcon/StateIcon.d.ts +11 -0
  60. package/dist/components/StateIcon/StateIcon.js +65 -0
  61. package/dist/components/StatusBadge/StatusBadge.d.ts +19 -0
  62. package/dist/components/StatusBadge/StatusBadge.js +82 -0
  63. package/dist/components/Tabs/Tabs.d.ts +28 -0
  64. package/dist/components/Tabs/Tabs.js +109 -0
  65. package/dist/components/Tag/Tag.d.ts +11 -0
  66. package/dist/components/Tag/Tag.js +66 -0
  67. package/dist/components/Toast/AppToaster.d.ts +8 -0
  68. package/dist/components/Toast/AppToaster.js +135 -0
  69. package/dist/components/Toast/toast-manager.d.ts +28 -0
  70. package/dist/components/Toast/toast-manager.js +47 -0
  71. package/dist/components/ToggleButton/ToggleButton.d.ts +26 -0
  72. package/dist/components/ToggleButton/ToggleButton.js +106 -0
  73. package/dist/components/ToggleGroup/ToggleGroup.d.ts +32 -0
  74. package/dist/components/ToggleGroup/ToggleGroup.js +79 -0
  75. package/dist/components/Tooltip/Tooltip.d.ts +16 -0
  76. package/dist/components/Tooltip/Tooltip.js +58 -0
  77. package/dist/components/Tooltip/TooltipGroup.d.ts +22 -0
  78. package/dist/components/Tooltip/TooltipGroup.js +65 -0
  79. package/dist/components/Typography/Typography.d.ts +17 -0
  80. package/dist/components/Typography/Typography.js +100 -0
  81. package/dist/editor-forms.d.ts +1 -0
  82. package/dist/editor-forms.js +1 -0
  83. package/dist/editor.d.ts +1 -0
  84. package/dist/editor.js +1 -0
  85. package/dist/fonts/LICENSE +93 -0
  86. package/dist/fonts/inter-cyrillic-ext-wght-normal.woff2 +0 -0
  87. package/dist/fonts/inter-cyrillic-wght-normal.woff2 +0 -0
  88. package/dist/fonts/inter-greek-ext-wght-normal.woff2 +0 -0
  89. package/dist/fonts/inter-greek-wght-normal.woff2 +0 -0
  90. package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
  91. package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
  92. package/dist/fonts/inter-vietnamese-wght-normal.woff2 +0 -0
  93. package/dist/fonts.css +69 -0
  94. package/dist/forms.d.ts +22 -0
  95. package/dist/forms.js +23 -0
  96. package/dist/foundation.css +23 -0
  97. package/dist/global.css +116 -0
  98. package/dist/hooks/useAppToast.d.ts +12 -0
  99. package/dist/hooks/useAppToast.js +29 -0
  100. package/dist/icons/icons.d.ts +43 -0
  101. package/dist/icons/icons.js +44 -0
  102. package/dist/index.d.ts +106 -0
  103. package/dist/index.js +101 -0
  104. package/dist/patterns/Accordion/Accordion.d.ts +35 -0
  105. package/dist/patterns/Accordion/Accordion.js +139 -0
  106. package/dist/patterns/Alert/Alert.d.ts +38 -0
  107. package/dist/patterns/Alert/Alert.js +151 -0
  108. package/dist/patterns/AppShell/AppShell.d.ts +39 -0
  109. package/dist/patterns/AppShell/AppShell.js +218 -0
  110. package/dist/patterns/Breadcrumbs/Breadcrumbs.d.ts +21 -0
  111. package/dist/patterns/Breadcrumbs/Breadcrumbs.js +73 -0
  112. package/dist/patterns/Calendar/Calendar.d.ts +59 -0
  113. package/dist/patterns/Calendar/Calendar.js +283 -0
  114. package/dist/patterns/Calendar/DateRangePicker.d.ts +53 -0
  115. package/dist/patterns/Calendar/DateRangePicker.js +266 -0
  116. package/dist/patterns/Calendar/FormDateRangeField.d.ts +24 -0
  117. package/dist/patterns/Calendar/FormDateRangeField.js +138 -0
  118. package/dist/patterns/Card/Card.d.ts +26 -0
  119. package/dist/patterns/Card/Card.js +125 -0
  120. package/dist/patterns/Carousel/Carousel.d.ts +33 -0
  121. package/dist/patterns/Carousel/Carousel.js +127 -0
  122. package/dist/patterns/Cascader/Cascader.d.ts +53 -0
  123. package/dist/patterns/Cascader/Cascader.js +371 -0
  124. package/dist/patterns/Cascader/FormCascaderField.d.ts +21 -0
  125. package/dist/patterns/Cascader/FormCascaderField.js +130 -0
  126. package/dist/patterns/Charts/AreaChart.d.ts +13 -0
  127. package/dist/patterns/Charts/AreaChart.js +220 -0
  128. package/dist/patterns/Charts/BarChart.d.ts +11 -0
  129. package/dist/patterns/Charts/BarChart.js +220 -0
  130. package/dist/patterns/Charts/DonutChart.d.ts +37 -0
  131. package/dist/patterns/Charts/DonutChart.js +215 -0
  132. package/dist/patterns/Charts/GaugeChart.d.ts +44 -0
  133. package/dist/patterns/Charts/GaugeChart.js +210 -0
  134. package/dist/patterns/Charts/LineChart.d.ts +14 -0
  135. package/dist/patterns/Charts/LineChart.js +222 -0
  136. package/dist/patterns/Charts/Sparkline.d.ts +24 -0
  137. package/dist/patterns/Charts/Sparkline.js +81 -0
  138. package/dist/patterns/Charts/chart-parts.d.ts +139 -0
  139. package/dist/patterns/Charts/chart-parts.js +385 -0
  140. package/dist/patterns/Charts/gauge-math.d.ts +20 -0
  141. package/dist/patterns/Charts/gauge-math.js +21 -0
  142. package/dist/patterns/Charts/sparkline-path.d.ts +11 -0
  143. package/dist/patterns/Charts/sparkline-path.js +24 -0
  144. package/dist/patterns/ColorPicker/ColorPicker.d.ts +50 -0
  145. package/dist/patterns/ColorPicker/ColorPicker.js +590 -0
  146. package/dist/patterns/ColorPicker/FormColorField.d.ts +21 -0
  147. package/dist/patterns/ColorPicker/FormColorField.js +130 -0
  148. package/dist/patterns/ColorPicker/color-value.d.ts +19 -0
  149. package/dist/patterns/ColorPicker/color-value.js +72 -0
  150. package/dist/patterns/Combobox/Autocomplete.d.ts +48 -0
  151. package/dist/patterns/Combobox/Autocomplete.js +158 -0
  152. package/dist/patterns/Combobox/Combobox.d.ts +52 -0
  153. package/dist/patterns/Combobox/Combobox.js +195 -0
  154. package/dist/patterns/Combobox/ComboboxPopup.d.ts +24 -0
  155. package/dist/patterns/Combobox/ComboboxPopup.js +107 -0
  156. package/dist/patterns/Combobox/FormAutocompleteField.d.ts +17 -0
  157. package/dist/patterns/Combobox/FormAutocompleteField.js +119 -0
  158. package/dist/patterns/Combobox/FormComboboxField.d.ts +18 -0
  159. package/dist/patterns/Combobox/FormComboboxField.js +119 -0
  160. package/dist/patterns/Combobox/FormMultiSelectField.d.ts +18 -0
  161. package/dist/patterns/Combobox/FormMultiSelectField.js +119 -0
  162. package/dist/patterns/Combobox/MultiSelect.d.ts +54 -0
  163. package/dist/patterns/Combobox/MultiSelect.js +175 -0
  164. package/dist/patterns/CommandPalette/CommandPalette.d.ts +50 -0
  165. package/dist/patterns/CommandPalette/CommandPalette.js +193 -0
  166. package/dist/patterns/DataTable/DataTable.d.ts +107 -0
  167. package/dist/patterns/DataTable/DataTable.js +364 -0
  168. package/dist/patterns/DateTimePicker/DateTimePanel.d.ts +28 -0
  169. package/dist/patterns/DateTimePicker/DateTimePanel.js +444 -0
  170. package/dist/patterns/DateTimePicker/DateTimePicker.d.ts +75 -0
  171. package/dist/patterns/DateTimePicker/DateTimePicker.js +271 -0
  172. package/dist/patterns/DateTimePicker/FormDateTimeField.d.ts +32 -0
  173. package/dist/patterns/DateTimePicker/FormDateTimeField.js +148 -0
  174. package/dist/patterns/DateTimePicker/TimeSliders.d.ts +14 -0
  175. package/dist/patterns/DateTimePicker/TimeSliders.js +206 -0
  176. package/dist/patterns/DateTimePicker/picker-labels.d.ts +30 -0
  177. package/dist/patterns/DateTimePicker/picker-labels.js +23 -0
  178. package/dist/patterns/DateTimePicker/picker-values.d.ts +98 -0
  179. package/dist/patterns/DateTimePicker/picker-values.js +194 -0
  180. package/dist/patterns/DescriptionList/DescriptionList.d.ts +20 -0
  181. package/dist/patterns/DescriptionList/DescriptionList.js +57 -0
  182. package/dist/patterns/Dialog/Dialog.d.ts +26 -0
  183. package/dist/patterns/Dialog/Dialog.js +212 -0
  184. package/dist/patterns/Drawer/Drawer.d.ts +33 -0
  185. package/dist/patterns/Drawer/Drawer.js +153 -0
  186. package/dist/patterns/EmptyState/EmptyState.d.ts +35 -0
  187. package/dist/patterns/EmptyState/EmptyState.js +44 -0
  188. package/dist/patterns/FileUpload/FileUpload.d.ts +87 -0
  189. package/dist/patterns/FileUpload/FileUpload.js +417 -0
  190. package/dist/patterns/FileUpload/FormFileUploadField.d.ts +19 -0
  191. package/dist/patterns/FileUpload/FormFileUploadField.js +117 -0
  192. package/dist/patterns/FileUpload/add-files.d.ts +26 -0
  193. package/dist/patterns/FileUpload/add-files.js +35 -0
  194. package/dist/patterns/FileUpload/file-size.d.ts +14 -0
  195. package/dist/patterns/FileUpload/file-size.js +44 -0
  196. package/dist/patterns/FormField/CheckboxField.d.ts +26 -0
  197. package/dist/patterns/FormField/CheckboxField.js +97 -0
  198. package/dist/patterns/FormField/FieldFrame.d.ts +85 -0
  199. package/dist/patterns/FormField/FieldFrame.js +257 -0
  200. package/dist/patterns/FormField/FormCheckboxField.d.ts +17 -0
  201. package/dist/patterns/FormField/FormCheckboxField.js +92 -0
  202. package/dist/patterns/FormField/FormRadioGroupField.d.ts +16 -0
  203. package/dist/patterns/FormField/FormRadioGroupField.js +97 -0
  204. package/dist/patterns/FormField/FormRatingField.d.ts +19 -0
  205. package/dist/patterns/FormField/FormRatingField.js +119 -0
  206. package/dist/patterns/FormField/FormSelectField.d.ts +16 -0
  207. package/dist/patterns/FormField/FormSelectField.js +91 -0
  208. package/dist/patterns/FormField/FormSliderField.d.ts +22 -0
  209. package/dist/patterns/FormField/FormSliderField.js +128 -0
  210. package/dist/patterns/FormField/FormSwitchField.d.ts +19 -0
  211. package/dist/patterns/FormField/FormSwitchField.js +88 -0
  212. package/dist/patterns/FormField/FormTextAreaField.d.ts +12 -0
  213. package/dist/patterns/FormField/FormTextAreaField.js +91 -0
  214. package/dist/patterns/FormField/FormTextField.d.ts +23 -0
  215. package/dist/patterns/FormField/FormTextField.js +103 -0
  216. package/dist/patterns/FormField/RadioGroupField.d.ts +38 -0
  217. package/dist/patterns/FormField/RadioGroupField.js +201 -0
  218. package/dist/patterns/FormField/SelectField.d.ts +43 -0
  219. package/dist/patterns/FormField/SelectField.js +211 -0
  220. package/dist/patterns/FormField/SwitchField.d.ts +27 -0
  221. package/dist/patterns/FormField/SwitchField.js +105 -0
  222. package/dist/patterns/FormField/TextAreaField.d.ts +37 -0
  223. package/dist/patterns/FormField/TextAreaField.js +134 -0
  224. package/dist/patterns/FormField/TextField.d.ts +51 -0
  225. package/dist/patterns/FormField/TextField.js +256 -0
  226. package/dist/patterns/FormField/error-message.d.ts +6 -0
  227. package/dist/patterns/FormField/error-message.js +8 -0
  228. package/dist/patterns/FormField/field-styles.d.ts +44 -0
  229. package/dist/patterns/FormField/field-styles.js +89 -0
  230. package/dist/patterns/FormField/field-types.d.ts +4 -0
  231. package/dist/patterns/FormField/use-field-ids.d.ts +18 -0
  232. package/dist/patterns/FormField/use-field-ids.js +53 -0
  233. package/dist/patterns/List/List.d.ts +38 -0
  234. package/dist/patterns/List/List.js +174 -0
  235. package/dist/patterns/MentionsInput/FormMentionsField.d.ts +18 -0
  236. package/dist/patterns/MentionsInput/FormMentionsField.js +124 -0
  237. package/dist/patterns/MentionsInput/MentionsInput.d.ts +57 -0
  238. package/dist/patterns/MentionsInput/MentionsInput.js +133 -0
  239. package/dist/patterns/MentionsInput/mention-text.d.ts +24 -0
  240. package/dist/patterns/MentionsInput/mention-text.js +31 -0
  241. package/dist/patterns/Menubar/Menubar.d.ts +22 -0
  242. package/dist/patterns/Menubar/Menubar.js +79 -0
  243. package/dist/patterns/NavigationMenu/NavigationMenu.d.ts +27 -0
  244. package/dist/patterns/NavigationMenu/NavigationMenu.js +104 -0
  245. package/dist/patterns/NumberField/FormNumberField.d.ts +18 -0
  246. package/dist/patterns/NumberField/FormNumberField.js +119 -0
  247. package/dist/patterns/NumberField/NumberField.d.ts +57 -0
  248. package/dist/patterns/NumberField/NumberField.js +242 -0
  249. package/dist/patterns/Pagination/Pagination.d.ts +31 -0
  250. package/dist/patterns/Pagination/Pagination.js +275 -0
  251. package/dist/patterns/Pagination/page-items.d.ts +18 -0
  252. package/dist/patterns/Pagination/page-items.js +40 -0
  253. package/dist/patterns/PhoneField/FormPhoneField.d.ts +22 -0
  254. package/dist/patterns/PhoneField/FormPhoneField.js +97 -0
  255. package/dist/patterns/PhoneField/PhoneField.d.ts +60 -0
  256. package/dist/patterns/PhoneField/PhoneField.js +448 -0
  257. package/dist/patterns/PhoneField/phone-value.d.ts +26 -0
  258. package/dist/patterns/PhoneField/phone-value.js +38 -0
  259. package/dist/patterns/QRCode/QRCode.d.ts +37 -0
  260. package/dist/patterns/QRCode/QRCode.js +120 -0
  261. package/dist/patterns/QRCode/qr-path.d.ts +7 -0
  262. package/dist/patterns/QRCode/qr-path.js +25 -0
  263. package/dist/patterns/ResizablePanels/ResizablePanels.d.ts +34 -0
  264. package/dist/patterns/ResizablePanels/ResizablePanels.js +175 -0
  265. package/dist/patterns/ResizablePanels/panel-sizes.d.ts +31 -0
  266. package/dist/patterns/ResizablePanels/panel-sizes.js +54 -0
  267. package/dist/patterns/RichTextEditor/FormRichTextField.d.ts +18 -0
  268. package/dist/patterns/RichTextEditor/FormRichTextField.js +118 -0
  269. package/dist/patterns/RichTextEditor/RichTextEditor.d.ts +71 -0
  270. package/dist/patterns/RichTextEditor/RichTextEditor.js +453 -0
  271. package/dist/patterns/SearchInput/SearchInput.d.ts +26 -0
  272. package/dist/patterns/SearchInput/SearchInput.js +98 -0
  273. package/dist/patterns/SideNav/SideNav.d.ts +50 -0
  274. package/dist/patterns/SideNav/SideNav.js +269 -0
  275. package/dist/patterns/Stat/Stat.d.ts +51 -0
  276. package/dist/patterns/Stat/Stat.js +292 -0
  277. package/dist/patterns/Stepper/Stepper.d.ts +35 -0
  278. package/dist/patterns/Stepper/Stepper.js +110 -0
  279. package/dist/patterns/TagGroup/TagGroup.d.ts +44 -0
  280. package/dist/patterns/TagGroup/TagGroup.js +151 -0
  281. package/dist/patterns/TagsInput/FormTagsInputField.d.ts +18 -0
  282. package/dist/patterns/TagsInput/FormTagsInputField.js +124 -0
  283. package/dist/patterns/TagsInput/TagsInput.d.ts +51 -0
  284. package/dist/patterns/TagsInput/TagsInput.js +97 -0
  285. package/dist/patterns/Timeline/Timeline.d.ts +29 -0
  286. package/dist/patterns/Timeline/Timeline.js +85 -0
  287. package/dist/patterns/Toolbar/Toolbar.d.ts +31 -0
  288. package/dist/patterns/Toolbar/Toolbar.js +105 -0
  289. package/dist/patterns/Tour/Tour.d.ts +38 -0
  290. package/dist/patterns/Tour/Tour.js +333 -0
  291. package/dist/patterns/TransferList/FormTransferListField.d.ts +19 -0
  292. package/dist/patterns/TransferList/FormTransferListField.js +117 -0
  293. package/dist/patterns/TransferList/TransferList.d.ts +53 -0
  294. package/dist/patterns/TransferList/TransferList.js +441 -0
  295. package/dist/patterns/TreeSelect/FormTreeSelectField.d.ts +28 -0
  296. package/dist/patterns/TreeSelect/FormTreeSelectField.js +88 -0
  297. package/dist/patterns/TreeSelect/TreeSelect.d.ts +49 -0
  298. package/dist/patterns/TreeSelect/TreeSelect.js +375 -0
  299. package/dist/patterns/TreeView/TreeView.d.ts +40 -0
  300. package/dist/patterns/TreeView/TreeView.js +296 -0
  301. package/dist/provider/DesignSystemProvider.d.ts +54 -0
  302. package/dist/provider/DesignSystemProvider.js +270 -0
  303. package/dist/provider/nonce.d.ts +7 -0
  304. package/dist/provider/nonce.js +13 -0
  305. package/dist/styles.css +2 -0
  306. package/dist/theme/chart-palette.d.ts +51 -0
  307. package/dist/theme/chart-palette.js +112 -0
  308. package/dist/theme/create-theme.d.ts +52 -0
  309. package/dist/theme/create-theme.js +75 -0
  310. package/dist/theme/style-element.d.ts +28 -0
  311. package/dist/theme/style-element.js +79 -0
  312. package/dist/theme/tenant-branding.d.ts +48 -0
  313. package/dist/theme/tenant-branding.js +65 -0
  314. package/dist/theme/theme-switch.d.ts +25 -0
  315. package/dist/theme/theme-switch.js +90 -0
  316. package/dist/theme/token-names.d.ts +3 -0
  317. package/dist/theme/token-names.js +166 -0
  318. package/dist/theme.css +241 -0
  319. package/dist/tokens.css +383 -0
  320. package/dist/types/direction.d.ts +4 -0
  321. package/dist/types/tone.d.ts +7 -0
  322. package/dist/utils/cn.d.ts +7 -0
  323. package/dist/utils/cn.js +50 -0
  324. package/dist/utils/first-field.d.ts +8 -0
  325. package/dist/utils/first-field.js +10 -0
  326. package/dist/utils/layout.d.ts +33 -0
  327. package/dist/utils/layout.js +30 -0
  328. package/dist/utils/popup.d.ts +12 -0
  329. package/dist/utils/popup.js +27 -0
  330. package/docs/accessibility.md +61 -0
  331. package/docs/advanced-components.md +38 -0
  332. package/docs/ai-assistants.md +44 -0
  333. package/docs/architecture.md +65 -0
  334. package/docs/browser-support.md +30 -0
  335. package/docs/charts.md +56 -0
  336. package/docs/components.md +2928 -0
  337. package/docs/conventions.md +19 -0
  338. package/docs/customization.md +79 -0
  339. package/docs/dates-files-data.md +48 -0
  340. package/docs/design-principles.md +50 -0
  341. package/docs/faq.md +68 -0
  342. package/docs/forms.md +114 -0
  343. package/docs/getting-started.md +64 -0
  344. package/docs/icons.md +48 -0
  345. package/docs/internationalization.md +64 -0
  346. package/docs/layout-and-navigation.md +51 -0
  347. package/docs/nextjs.md +69 -0
  348. package/docs/releasing.md +40 -0
  349. package/docs/testing.md +242 -0
  350. package/docs/theming.md +118 -0
  351. package/docs/typescript.md +62 -0
  352. package/llms-full.txt +4573 -0
  353. package/llms.txt +52 -0
  354. package/package.json +193 -6
@@ -0,0 +1,85 @@
1
+ "use client";
2
+ import { c } from "react/compiler-runtime";
3
+ import { cn } from "../../utils/cn.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ // src/patterns/Timeline/Timeline.tsx
6
+ var DOT = {
7
+ neutral: "bg-neutral-tint text-neutral-text border-neutral-border",
8
+ info: "bg-info-tint text-info-text border-info-border",
9
+ success: "bg-success-tint text-success-text border-success-border",
10
+ warning: "bg-warning-tint text-warning-text border-warning-border",
11
+ error: "bg-error-tint text-error-text border-error-border",
12
+ pending: "bg-pending-tint text-pending-text border-pending-border",
13
+ reserved: "bg-reserved-tint text-reserved-text border-reserved-border"
14
+ };
15
+ /**
16
+ * Events in the order they happened, joined by a line, each with a dot, a title, the time and a description. An
17
+ * ordered list, so a screen reader counts the events. The caller sorts the events.
18
+ */
19
+ var Timeline = (t0) => {
20
+ const $ = c(10);
21
+ const { events, "aria-label": ariaLabel, className } = t0;
22
+ let t1;
23
+ if ($[0] !== className) {
24
+ t1 = cn("m-0 flex list-none flex-col p-0", className);
25
+ $[0] = className;
26
+ $[1] = t1;
27
+ } else t1 = $[1];
28
+ let t2;
29
+ if ($[2] !== events) {
30
+ let t3;
31
+ if ($[4] !== events.length) {
32
+ t3 = (event, index) => /* @__PURE__ */ jsxs("li", {
33
+ className: "relative flex gap-3 pb-6 last:pb-0",
34
+ children: [
35
+ index < events.length - 1 ? /* @__PURE__ */ jsx("span", {
36
+ "aria-hidden": "true",
37
+ className: "absolute start-[9.5px] top-5 bottom-0 w-px bg-line"
38
+ }) : null,
39
+ /* @__PURE__ */ jsx("span", {
40
+ "aria-hidden": "true",
41
+ className: cn("box-border mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full border [&_svg]:size-3", DOT[event.tone ?? "neutral"]),
42
+ children: event.icon ?? /* @__PURE__ */ jsx("span", { className: "size-1.5 rounded-full bg-current" })
43
+ }),
44
+ /* @__PURE__ */ jsxs("div", {
45
+ className: "flex min-w-0 flex-col gap-0.5",
46
+ children: [
47
+ /* @__PURE__ */ jsx("span", {
48
+ className: "text-body-sm font-medium text-fg",
49
+ children: event.title
50
+ }),
51
+ event.time ? /* @__PURE__ */ jsx("time", {
52
+ ...event.dateTime ? { dateTime: event.dateTime } : {},
53
+ className: "text-caption text-fg-secondary",
54
+ children: event.time
55
+ }) : null,
56
+ event.description ? /* @__PURE__ */ jsx("div", {
57
+ className: "text-body-sm text-fg-body",
58
+ children: event.description
59
+ }) : null
60
+ ]
61
+ })
62
+ ]
63
+ }, event.id);
64
+ $[4] = events.length;
65
+ $[5] = t3;
66
+ } else t3 = $[5];
67
+ t2 = events.map(t3);
68
+ $[2] = events;
69
+ $[3] = t2;
70
+ } else t2 = $[3];
71
+ let t3;
72
+ if ($[6] !== ariaLabel || $[7] !== t1 || $[8] !== t2) {
73
+ t3 = /* @__PURE__ */ jsx("ol", {
74
+ "aria-label": ariaLabel,
75
+ className: t1,
76
+ children: t2
77
+ });
78
+ $[6] = ariaLabel;
79
+ $[7] = t1;
80
+ $[8] = t2;
81
+ $[9] = t3;
82
+ } else t3 = $[9];
83
+ return t3;
84
+ };
85
+ export { Timeline };
@@ -0,0 +1,31 @@
1
+ import type { ReactNode } from "react";
2
+ export interface ToolbarProps {
3
+ children: ReactNode;
4
+ /** Accessible name of the toolbar, e.g. "Text formatting". */
5
+ "aria-label": string;
6
+ /** A row (default) or a column. */
7
+ orientation?: "horizontal" | "vertical" | undefined;
8
+ className?: string | undefined;
9
+ }
10
+ /**
11
+ * A row of controls that is one stop in the Tab order: Tab enters it, the arrow keys move between the buttons, and
12
+ * Tab leaves it. For formatting, view and editing controls (a text editor's bold, italic, link), where Tab through
13
+ * twenty buttons would be a burden.
14
+ */
15
+ export declare const Toolbar: ({ children, "aria-label": ariaLabel, orientation, className }: ToolbarProps) => import("react").JSX.Element;
16
+ export interface ToolbarButtonProps {
17
+ /** The label. Leave it out for a glyph alone, and give `aria-label`. */
18
+ children?: ReactNode | undefined;
19
+ /** A glyph before the label. */
20
+ icon?: ReactNode | undefined;
21
+ onClick?: (() => void) | undefined;
22
+ /** For a button that stays on (bold): whether it is on. It sets `aria-pressed`. Leave it out for an action. */
23
+ pressed?: boolean | undefined;
24
+ disabled?: boolean | undefined;
25
+ /** The accessible name, for a button with no text of its own. */
26
+ "aria-label"?: string | undefined;
27
+ }
28
+ /** A button in a Toolbar. */
29
+ export declare const ToolbarButton: ({ children, icon, onClick, pressed, disabled, "aria-label": ariaLabel }: ToolbarButtonProps) => import("react").JSX.Element;
30
+ /** A thin rule between groups of buttons in a Toolbar. */
31
+ export declare const ToolbarSeparator: () => import("react").JSX.Element;
@@ -0,0 +1,105 @@
1
+ "use client";
2
+ import { c } from "react/compiler-runtime";
3
+ import { Toolbar as Toolbar$1 } from "@base-ui/react/toolbar";
4
+ import { cn } from "../../utils/cn.js";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ // src/patterns/Toolbar/Toolbar.tsx
7
+ /**
8
+ * A row of controls that is one stop in the Tab order: Tab enters it, the arrow keys move between the buttons, and
9
+ * Tab leaves it. For formatting, view and editing controls (a text editor's bold, italic, link), where Tab through
10
+ * twenty buttons would be a burden.
11
+ */
12
+ var Toolbar = (t0) => {
13
+ const $ = c(8);
14
+ const { children, "aria-label": ariaLabel, orientation: t1, className } = t0;
15
+ const orientation = t1 === void 0 ? "horizontal" : t1;
16
+ const t2 = orientation === "vertical" && "flex-col";
17
+ let t3;
18
+ if ($[0] !== className || $[1] !== t2) {
19
+ t3 = cn("inline-flex items-center gap-0.5 rounded-md border border-line bg-surface p-0.75", t2, className);
20
+ $[0] = className;
21
+ $[1] = t2;
22
+ $[2] = t3;
23
+ } else t3 = $[2];
24
+ let t4;
25
+ if ($[3] !== ariaLabel || $[4] !== children || $[5] !== orientation || $[6] !== t3) {
26
+ t4 = /* @__PURE__ */ jsx(Toolbar$1.Root, {
27
+ "aria-label": ariaLabel,
28
+ orientation,
29
+ className: t3,
30
+ children
31
+ });
32
+ $[3] = ariaLabel;
33
+ $[4] = children;
34
+ $[5] = orientation;
35
+ $[6] = t3;
36
+ $[7] = t4;
37
+ } else t4 = $[7];
38
+ return t4;
39
+ };
40
+ /** A button in a Toolbar. */
41
+ var ToolbarButton = (t0) => {
42
+ const $ = c(16);
43
+ const { children, icon, onClick, pressed, disabled, "aria-label": ariaLabel } = t0;
44
+ let t1;
45
+ if ($[0] !== disabled) {
46
+ t1 = disabled === void 0 ? {} : { disabled };
47
+ $[0] = disabled;
48
+ $[1] = t1;
49
+ } else t1 = $[1];
50
+ let t2;
51
+ if ($[2] !== ariaLabel) {
52
+ t2 = ariaLabel ? { "aria-label": ariaLabel } : {};
53
+ $[2] = ariaLabel;
54
+ $[3] = t2;
55
+ } else t2 = $[3];
56
+ let t3;
57
+ if ($[4] !== pressed) {
58
+ t3 = pressed === void 0 ? {} : { "aria-pressed": pressed };
59
+ $[4] = pressed;
60
+ $[5] = t3;
61
+ } else t3 = $[5];
62
+ let t4;
63
+ if ($[6] !== onClick) {
64
+ t4 = onClick ? { onClick: () => {
65
+ onClick();
66
+ } } : {};
67
+ $[6] = onClick;
68
+ $[7] = t4;
69
+ } else t4 = $[7];
70
+ let t5;
71
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
72
+ t5 = cn("inline-flex h-8 min-w-8 cursor-pointer items-center justify-center gap-1.5 rounded-sm border-0 bg-transparent px-2 text-caption font-medium text-fg-secondary outline-none [&_svg]:size-4", "transition-colors duration-150 ease-standard hover:bg-subtle hover:text-fg", "aria-pressed:bg-primary-light aria-pressed:text-primary-text", "focus-visible:ring-2 focus-visible:ring-focus data-disabled:cursor-not-allowed data-disabled:text-fg-disabled data-disabled:hover:bg-transparent");
73
+ $[8] = t5;
74
+ } else t5 = $[8];
75
+ let t6;
76
+ if ($[9] !== children || $[10] !== icon || $[11] !== t1 || $[12] !== t2 || $[13] !== t3 || $[14] !== t4) {
77
+ t6 = /* @__PURE__ */ jsxs(Toolbar$1.Button, {
78
+ ...t1,
79
+ ...t2,
80
+ ...t3,
81
+ ...t4,
82
+ className: t5,
83
+ children: [icon, children]
84
+ });
85
+ $[9] = children;
86
+ $[10] = icon;
87
+ $[11] = t1;
88
+ $[12] = t2;
89
+ $[13] = t3;
90
+ $[14] = t4;
91
+ $[15] = t6;
92
+ } else t6 = $[15];
93
+ return t6;
94
+ };
95
+ /** A thin rule between groups of buttons in a Toolbar. */
96
+ var ToolbarSeparator = () => {
97
+ const $ = c(1);
98
+ let t0;
99
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
100
+ t0 = /* @__PURE__ */ jsx(Toolbar$1.Separator, { className: "mx-0.5 h-5 w-px self-center bg-line data-[orientation=horizontal]:my-0.5 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-5" });
101
+ $[0] = t0;
102
+ } else t0 = $[0];
103
+ return t0;
104
+ };
105
+ export { Toolbar, ToolbarButton, ToolbarSeparator };
@@ -0,0 +1,38 @@
1
+ import { type ReactNode } from "react";
2
+ export interface TourStep {
3
+ id: string;
4
+ /** What the step points at: a CSS selector (`"#new-order"`) or a function that finds the element. */
5
+ target: string | (() => HTMLElement | null);
6
+ title: string;
7
+ content: ReactNode;
8
+ }
9
+ /** The texts of the tour. The design system has no i18n, so the caller supplies them. */
10
+ export interface TourLabels {
11
+ next: string;
12
+ previous: string;
13
+ /** The last step's button, e.g. "Done". */
14
+ finish: string;
15
+ /** Accessible name of the button that ends the tour, e.g. "Close tour". */
16
+ close: string;
17
+ /** Says where the person is: `(step, total) => `Step ${step} of ${total}``. */
18
+ progress: (step: number, total: number) => string;
19
+ }
20
+ export interface TourProps {
21
+ steps: readonly TourStep[];
22
+ open: boolean;
23
+ /** Called with `false` when the tour ends: the close button, the last step's button, or Escape. */
24
+ onOpenChange: (open: boolean) => void;
25
+ /** The index of the step on show. */
26
+ step: number;
27
+ /** Called with the index of the step the buttons go to. */
28
+ onStepChange: (step: number) => void;
29
+ labels: TourLabels;
30
+ }
31
+ /**
32
+ * A guided walk through the page: one step at a time points at a part of it with a ring and a card, and the card's
33
+ * buttons go back and on. The page is dimmed around the ring but not blocked, and Escape ends the tour. The focus
34
+ * starts on the card's Next button; on each later step it moves to the step's title, so a screen reader reads the
35
+ * new step. The app decides when to show it (a first visit) and remembers that it has. A step whose target is not
36
+ * on the page is not shown, so a tour should only open once its targets are there.
37
+ */
38
+ export declare const Tour: ({ steps, open, onOpenChange, step, onStepChange, labels }: TourProps) => import("react").JSX.Element | null;
@@ -0,0 +1,333 @@
1
+ "use client";
2
+ import { c } from "react/compiler-runtime";
3
+ import { useEffect, useRef, useState } from "react";
4
+ import { Popover } from "@base-ui/react/popover";
5
+ import { X } from "lucide-react";
6
+ import { cn } from "../../utils/cn.js";
7
+ import { popup, positioner } from "../../utils/popup.js";
8
+ import { Button } from "../../components/Button/Button.js";
9
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
10
+ // src/patterns/Tour/Tour.tsx
11
+ /**
12
+ * A guided walk through the page: one step at a time points at a part of it with a ring and a card, and the card's
13
+ * buttons go back and on. The page is dimmed around the ring but not blocked, and Escape ends the tour. The focus
14
+ * starts on the card's Next button; on each later step it moves to the step's title, so a screen reader reads the
15
+ * new step. The app decides when to show it (a first visit) and remembers that it has. A step whose target is not
16
+ * on the page is not shown, so a tour should only open once its targets are there.
17
+ */
18
+ var Tour = (t0) => {
19
+ const $ = c(70);
20
+ const { steps, open, onOpenChange, step, onStepChange, labels } = t0;
21
+ const current = steps[step];
22
+ const stepId = current?.id;
23
+ const [anchor, setAnchor] = useState(null);
24
+ const [box, setBox] = useState(null);
25
+ const next = useRef(null);
26
+ const title = useRef(null);
27
+ const shownStep = useRef(null);
28
+ const target = useRef(current?.target);
29
+ let t1;
30
+ if ($[0] !== current?.target) {
31
+ t1 = () => {
32
+ target.current = current?.target;
33
+ };
34
+ $[0] = current?.target;
35
+ $[1] = t1;
36
+ } else t1 = $[1];
37
+ useEffect(t1);
38
+ let t2;
39
+ if ($[2] !== open || $[3] !== stepId) {
40
+ t2 = () => {
41
+ const goal = target.current;
42
+ if (!open || stepId === void 0 || goal === void 0) {
43
+ setAnchor(null);
44
+ setBox(null);
45
+ return;
46
+ }
47
+ const element = typeof goal === "string" ? document.querySelector(goal) : goal();
48
+ setAnchor(element);
49
+ if (!element) return;
50
+ const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
51
+ element.scrollIntoView({
52
+ block: "center",
53
+ inline: "nearest",
54
+ behavior: reduce ? "auto" : "smooth"
55
+ });
56
+ const update = () => {
57
+ setBox(element.getBoundingClientRect());
58
+ };
59
+ update();
60
+ window.addEventListener("resize", update);
61
+ window.addEventListener("scroll", update, true);
62
+ const observer = new ResizeObserver(update);
63
+ observer.observe(element);
64
+ return () => {
65
+ window.removeEventListener("resize", update);
66
+ window.removeEventListener("scroll", update, true);
67
+ observer.disconnect();
68
+ };
69
+ };
70
+ $[2] = open;
71
+ $[3] = stepId;
72
+ $[4] = t2;
73
+ } else t2 = $[4];
74
+ let t3;
75
+ if ($[5] !== open || $[6] !== step || $[7] !== stepId) {
76
+ t3 = [
77
+ open,
78
+ step,
79
+ stepId
80
+ ];
81
+ $[5] = open;
82
+ $[6] = step;
83
+ $[7] = stepId;
84
+ $[8] = t3;
85
+ } else t3 = $[8];
86
+ useEffect(t2, t3);
87
+ let t4;
88
+ let t5;
89
+ if ($[9] !== anchor || $[10] !== open || $[11] !== step) {
90
+ t4 = () => {
91
+ if (!open || !anchor) {
92
+ shownStep.current = null;
93
+ return;
94
+ }
95
+ if (shownStep.current !== null && shownStep.current !== step) title.current?.focus({ preventScroll: true });
96
+ shownStep.current = step;
97
+ };
98
+ t5 = [
99
+ open,
100
+ step,
101
+ anchor
102
+ ];
103
+ $[9] = anchor;
104
+ $[10] = open;
105
+ $[11] = step;
106
+ $[12] = t4;
107
+ $[13] = t5;
108
+ } else {
109
+ t4 = $[12];
110
+ t5 = $[13];
111
+ }
112
+ useEffect(t4, t5);
113
+ if (!open || !current || !anchor) return null;
114
+ const isFirst = step === 0;
115
+ const isLast = step === steps.length - 1;
116
+ let t6;
117
+ if ($[14] !== box) {
118
+ t6 = box ? /* @__PURE__ */ jsx("div", {
119
+ "aria-hidden": "true",
120
+ className: "pointer-events-none fixed z-1100 rounded-md transition-[top,left,width,height] duration-200 ease-standard motion-reduce:transition-none",
121
+ style: {
122
+ top: box.top - 4,
123
+ left: box.left - 4,
124
+ width: box.width + 8,
125
+ height: box.height + 8,
126
+ boxShadow: "0 0 0 2px var(--fast-primary), 0 0 0 9999px var(--fast-scrim)"
127
+ }
128
+ }) : null;
129
+ $[14] = box;
130
+ $[15] = t6;
131
+ } else t6 = $[15];
132
+ let t7;
133
+ if ($[16] !== onOpenChange) {
134
+ t7 = (value, details) => {
135
+ if (!value && details.reason === "escape-key") onOpenChange(false);
136
+ };
137
+ $[16] = onOpenChange;
138
+ $[17] = t7;
139
+ } else t7 = $[17];
140
+ let t8;
141
+ if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
142
+ t8 = cn(popup, "flex w-80 max-w-(--available-width) flex-col gap-3 p-4");
143
+ $[18] = t8;
144
+ } else t8 = $[18];
145
+ let t9;
146
+ if ($[19] !== current.title) {
147
+ t9 = /* @__PURE__ */ jsx(Popover.Title, {
148
+ ref: title,
149
+ tabIndex: -1,
150
+ className: "m-0 text-body font-semibold text-fg outline-none",
151
+ children: current.title
152
+ });
153
+ $[19] = current.title;
154
+ $[20] = t9;
155
+ } else t9 = $[20];
156
+ let t10;
157
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
158
+ t10 = /* @__PURE__ */ jsx(X, {});
159
+ $[21] = t10;
160
+ } else t10 = $[21];
161
+ let t11;
162
+ if ($[22] !== onOpenChange) {
163
+ t11 = () => {
164
+ onOpenChange(false);
165
+ };
166
+ $[22] = onOpenChange;
167
+ $[23] = t11;
168
+ } else t11 = $[23];
169
+ let t12;
170
+ if ($[24] !== labels.close || $[25] !== t11) {
171
+ t12 = /* @__PURE__ */ jsx(Button, {
172
+ variant: "subtle",
173
+ size: "small",
174
+ "aria-label": labels.close,
175
+ icon: t10,
176
+ className: "-me-1.5 -mt-1",
177
+ onClick: t11
178
+ });
179
+ $[24] = labels.close;
180
+ $[25] = t11;
181
+ $[26] = t12;
182
+ } else t12 = $[26];
183
+ let t13;
184
+ if ($[27] !== t12 || $[28] !== t9) {
185
+ t13 = /* @__PURE__ */ jsxs("div", {
186
+ className: "flex items-start justify-between gap-3",
187
+ children: [t9, t12]
188
+ });
189
+ $[27] = t12;
190
+ $[28] = t9;
191
+ $[29] = t13;
192
+ } else t13 = $[29];
193
+ let t14;
194
+ if ($[30] !== current.content) {
195
+ t14 = /* @__PURE__ */ jsx("div", {
196
+ className: "text-body-sm text-fg-body",
197
+ children: current.content
198
+ });
199
+ $[30] = current.content;
200
+ $[31] = t14;
201
+ } else t14 = $[31];
202
+ let t15;
203
+ if ($[32] !== labels || $[33] !== step || $[34] !== steps.length) {
204
+ t15 = labels.progress(step + 1, steps.length);
205
+ $[32] = labels;
206
+ $[33] = step;
207
+ $[34] = steps.length;
208
+ $[35] = t15;
209
+ } else t15 = $[35];
210
+ let t16;
211
+ if ($[36] !== t15) {
212
+ t16 = /* @__PURE__ */ jsx("span", {
213
+ className: "text-caption text-fg-secondary",
214
+ children: t15
215
+ });
216
+ $[36] = t15;
217
+ $[37] = t16;
218
+ } else t16 = $[37];
219
+ let t17;
220
+ if ($[38] !== isFirst || $[39] !== labels.previous || $[40] !== onStepChange || $[41] !== step) {
221
+ t17 = isFirst ? null : /* @__PURE__ */ jsx(Button, {
222
+ variant: "secondary",
223
+ size: "small",
224
+ onClick: () => {
225
+ onStepChange(step - 1);
226
+ },
227
+ children: labels.previous
228
+ });
229
+ $[38] = isFirst;
230
+ $[39] = labels.previous;
231
+ $[40] = onStepChange;
232
+ $[41] = step;
233
+ $[42] = t17;
234
+ } else t17 = $[42];
235
+ let t18;
236
+ if ($[43] !== isLast || $[44] !== onOpenChange || $[45] !== onStepChange || $[46] !== step) {
237
+ t18 = () => {
238
+ if (isLast) onOpenChange(false);
239
+ else onStepChange(step + 1);
240
+ };
241
+ $[43] = isLast;
242
+ $[44] = onOpenChange;
243
+ $[45] = onStepChange;
244
+ $[46] = step;
245
+ $[47] = t18;
246
+ } else t18 = $[47];
247
+ const t19 = isLast ? labels.finish : labels.next;
248
+ let t20;
249
+ if ($[48] !== t18 || $[49] !== t19) {
250
+ t20 = /* @__PURE__ */ jsx(Button, {
251
+ ref: next,
252
+ variant: "primary",
253
+ size: "small",
254
+ className: "shadow-none",
255
+ onClick: t18,
256
+ children: t19
257
+ });
258
+ $[48] = t18;
259
+ $[49] = t19;
260
+ $[50] = t20;
261
+ } else t20 = $[50];
262
+ let t21;
263
+ if ($[51] !== t17 || $[52] !== t20) {
264
+ t21 = /* @__PURE__ */ jsxs("div", {
265
+ className: "flex items-center gap-2",
266
+ children: [t17, t20]
267
+ });
268
+ $[51] = t17;
269
+ $[52] = t20;
270
+ $[53] = t21;
271
+ } else t21 = $[53];
272
+ let t22;
273
+ if ($[54] !== t16 || $[55] !== t21) {
274
+ t22 = /* @__PURE__ */ jsxs("div", {
275
+ className: "flex items-center justify-between gap-3",
276
+ children: [t16, t21]
277
+ });
278
+ $[54] = t16;
279
+ $[55] = t21;
280
+ $[56] = t22;
281
+ } else t22 = $[56];
282
+ let t23;
283
+ if ($[57] !== t13 || $[58] !== t14 || $[59] !== t22) {
284
+ t23 = /* @__PURE__ */ jsxs(Popover.Popup, {
285
+ initialFocus: next,
286
+ className: t8,
287
+ children: [
288
+ t13,
289
+ t14,
290
+ t22
291
+ ]
292
+ });
293
+ $[57] = t13;
294
+ $[58] = t14;
295
+ $[59] = t22;
296
+ $[60] = t23;
297
+ } else t23 = $[60];
298
+ let t24;
299
+ if ($[61] !== anchor || $[62] !== t23) {
300
+ t24 = /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
301
+ anchor,
302
+ side: "bottom",
303
+ align: "center",
304
+ sideOffset: 14,
305
+ collisionPadding: 12,
306
+ className: positioner,
307
+ children: t23
308
+ }) });
309
+ $[61] = anchor;
310
+ $[62] = t23;
311
+ $[63] = t24;
312
+ } else t24 = $[63];
313
+ let t25;
314
+ if ($[64] !== t24 || $[65] !== t7) {
315
+ t25 = /* @__PURE__ */ jsx(Popover.Root, {
316
+ open: true,
317
+ onOpenChange: t7,
318
+ children: t24
319
+ });
320
+ $[64] = t24;
321
+ $[65] = t7;
322
+ $[66] = t25;
323
+ } else t25 = $[66];
324
+ let t26;
325
+ if ($[67] !== t25 || $[68] !== t6) {
326
+ t26 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t6, t25] });
327
+ $[67] = t25;
328
+ $[68] = t6;
329
+ $[69] = t26;
330
+ } else t26 = $[69];
331
+ return t26;
332
+ };
333
+ export { Tour };
@@ -0,0 +1,19 @@
1
+ import { type Control, type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
2
+ import type { FieldOrientation } from "../FormField/field-types.js";
3
+ import { type TransferListProps } from "./TransferList.js";
4
+ export type { TransferListLabels } from "./TransferList.js";
5
+ export interface FormTransferListFieldProps<TValues extends FieldValues> extends Omit<TransferListProps, "value" | "onValueChange" | "aria-label" | "aria-labelledby" | "aria-describedby" | "className"> {
6
+ control: Control<TValues>;
7
+ name: FieldPath<TValues>;
8
+ label: string;
9
+ hint?: string | undefined;
10
+ required?: boolean | undefined;
11
+ /** Label above the control (default) or in a column beside it. */
12
+ orientation?: FieldOrientation | undefined;
13
+ /** react-hook-form validation rules, for forms that do not use a schema resolver. */
14
+ rules?: ControllerProps<TValues, FieldPath<TValues>>["rules"] | undefined;
15
+ /** Turns a stored schema message (an i18n key) into display text. */
16
+ formatError?: ((message: string) => string) | undefined;
17
+ }
18
+ /** A TransferList in a field, bound to a react-hook-form field holding an array of the `id`s of the chosen items. */
19
+ export declare const FormTransferListField: <TValues extends FieldValues>({ control, name, label, hint, required, orientation, rules, formatError, disabled, ...transferProps }: FormTransferListFieldProps<TValues>) => import("react").JSX.Element;