@primecoderin/fast-ui-react 0.0.0-stage → 0.1.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 +90 -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 +41 -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 +4574 -0
  353. package/llms.txt +52 -0
  354. package/package.json +166 -6
@@ -0,0 +1,65 @@
1
+ "use client";
2
+ import { c } from "react/compiler-runtime";
3
+ import { Tooltip } from "@base-ui/react/tooltip";
4
+ import { positioner } from "../../utils/popup.js";
5
+ import { TOOLTIP } from "./Tooltip.js";
6
+ import { jsx } from "react/jsx-runtime";
7
+ // src/components/Tooltip/TooltipGroup.tsx
8
+ /**
9
+ * Many triggers, one tooltip: for a table of metrics where every figure explains
10
+ * itself on hover and a tooltip each would mean hundreds of them. Render the
11
+ * group's `Host` once, anywhere under the triggers' page, and wrap each figure in
12
+ * a `Trigger`. Like Tooltip it is supplementary, shown on hover and keyboard focus
13
+ * only, so the figure needs its own accessible name.
14
+ *
15
+ * const metrics = createTooltipGroup(); // once, at module level
16
+ * <metrics.Host />
17
+ * <metrics.Trigger content="Monthly total"><span>0.0</span></metrics.Trigger>
18
+ */
19
+ var createTooltipGroup = () => {
20
+ const handle = Tooltip.createHandle();
21
+ const Host = () => {
22
+ const $ = c(1);
23
+ let t0;
24
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
25
+ t0 = /* @__PURE__ */ jsx(Tooltip.Root, {
26
+ handle,
27
+ children: _temp
28
+ });
29
+ $[0] = t0;
30
+ } else t0 = $[0];
31
+ return t0;
32
+ };
33
+ const Trigger = (t0) => {
34
+ const $ = c(3);
35
+ const { content, children } = t0;
36
+ let t1;
37
+ if ($[0] !== children || $[1] !== content) {
38
+ t1 = /* @__PURE__ */ jsx(Tooltip.Trigger, {
39
+ handle,
40
+ payload: content,
41
+ render: children
42
+ });
43
+ $[0] = children;
44
+ $[1] = content;
45
+ $[2] = t1;
46
+ } else t1 = $[2];
47
+ return t1;
48
+ };
49
+ return {
50
+ Host,
51
+ Trigger
52
+ };
53
+ };
54
+ function _temp(t0) {
55
+ const { payload } = t0;
56
+ return /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
57
+ className: positioner,
58
+ sideOffset: 8,
59
+ children: /* @__PURE__ */ jsx(Tooltip.Popup, {
60
+ className: TOOLTIP,
61
+ children: payload
62
+ })
63
+ }) });
64
+ }
65
+ export { createTooltipGroup };
@@ -0,0 +1,17 @@
1
+ import type { ComponentPropsWithoutRef } from "react";
2
+ /** The type scale of the design foundation: strong bold headings, readable body text. */
3
+ export type TextStyleName = "display" | "h1" | "h2" | "h3" | "h4" | "bodyLarge" | "body" | "bodySmall" | "caption" | "button" | "label";
4
+ type TypographyElement = "h1" | "h2" | "h3" | "h4" | "p" | "span" | "div" | "label";
5
+ export type TypographyTone = "primary" | "secondary" | "disabled" | "brand";
6
+ export interface TypographyProps extends ComponentPropsWithoutRef<"span"> {
7
+ /** A style of the type scale: display, h1 to h4, body large/regular/small, caption, button, label. */
8
+ variant?: TextStyleName | undefined;
9
+ /** The element to render. Pick for document structure; the look comes from `variant`. */
10
+ as?: TypographyElement | undefined;
11
+ tone?: TypographyTone | undefined;
12
+ /** One line, cut off with an ellipsis. */
13
+ truncate?: boolean | undefined;
14
+ }
15
+ /** Text in one of the type scale's styles. Use it where a heading or paragraph must match the foundation. */
16
+ export declare const Typography: ({ variant, as: Element, tone, truncate, className, ...rest }: TypographyProps) => import("react").JSX.Element;
17
+ export {};
@@ -0,0 +1,100 @@
1
+ "use client";
2
+ import { c } from "react/compiler-runtime";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "../../utils/cn.js";
5
+ import { jsx } from "react/jsx-runtime";
6
+ // src/components/Typography/Typography.tsx
7
+ /**
8
+ * Each `text-*` utility carries its size and line-height, and for the headings,
9
+ * button, label and caption also the weight (see `styles/theme.css`). The body
10
+ * sizes have no weight of their own, so they say `font-normal`.
11
+ */
12
+ var typographyVariants = cva("", {
13
+ variants: {
14
+ variant: {
15
+ display: "text-display",
16
+ h1: "text-h1",
17
+ h2: "text-h2",
18
+ h3: "text-h3",
19
+ h4: "text-h4",
20
+ bodyLarge: "text-body-lg font-normal",
21
+ body: "text-body font-normal",
22
+ bodySmall: "text-body-sm font-normal",
23
+ caption: "text-caption",
24
+ button: "text-button",
25
+ label: "text-label"
26
+ },
27
+ tone: {
28
+ primary: "text-fg",
29
+ secondary: "text-fg-secondary",
30
+ disabled: "text-fg-disabled",
31
+ brand: "text-primary-text"
32
+ },
33
+ truncate: {
34
+ true: "truncate",
35
+ false: ""
36
+ }
37
+ },
38
+ defaultVariants: {
39
+ variant: "body",
40
+ tone: "primary",
41
+ truncate: false
42
+ }
43
+ });
44
+ /** Text in one of the type scale's styles. Use it where a heading or paragraph must match the foundation. */
45
+ var Typography = (t0) => {
46
+ const $ = c(16);
47
+ let className;
48
+ let rest;
49
+ let t1;
50
+ let t2;
51
+ let t3;
52
+ let t4;
53
+ if ($[0] !== t0) {
54
+ ({variant: t1, as: t2, tone: t3, truncate: t4, className, ...rest} = t0);
55
+ $[0] = t0;
56
+ $[1] = className;
57
+ $[2] = rest;
58
+ $[3] = t1;
59
+ $[4] = t2;
60
+ $[5] = t3;
61
+ $[6] = t4;
62
+ } else {
63
+ className = $[1];
64
+ rest = $[2];
65
+ t1 = $[3];
66
+ t2 = $[4];
67
+ t3 = $[5];
68
+ t4 = $[6];
69
+ }
70
+ const variant = t1 === void 0 ? "body" : t1;
71
+ const Element = t2 === void 0 ? "span" : t2;
72
+ const tone = t3 === void 0 ? "primary" : t3;
73
+ const truncate = t4 === void 0 ? false : t4;
74
+ let t5;
75
+ if ($[7] !== className || $[8] !== tone || $[9] !== truncate || $[10] !== variant) {
76
+ t5 = cn(typographyVariants({
77
+ variant,
78
+ tone,
79
+ truncate
80
+ }), className);
81
+ $[7] = className;
82
+ $[8] = tone;
83
+ $[9] = truncate;
84
+ $[10] = variant;
85
+ $[11] = t5;
86
+ } else t5 = $[11];
87
+ let t6;
88
+ if ($[12] !== Element || $[13] !== rest || $[14] !== t5) {
89
+ t6 = /* @__PURE__ */ jsx(Element, {
90
+ ...rest,
91
+ className: t5
92
+ });
93
+ $[12] = Element;
94
+ $[13] = rest;
95
+ $[14] = t5;
96
+ $[15] = t6;
97
+ } else t6 = $[15];
98
+ return t6;
99
+ };
100
+ export { Typography };
@@ -0,0 +1 @@
1
+ export { FormRichTextField, type FormRichTextFieldProps } from "./patterns/RichTextEditor/FormRichTextField.js";
@@ -0,0 +1 @@
1
+ export { FormRichTextField } from "./patterns/RichTextEditor/FormRichTextField.js";
@@ -0,0 +1 @@
1
+ export { RichTextEditor, type RichTextEditorLabels, type RichTextEditorProps } from "./patterns/RichTextEditor/RichTextEditor.js";
package/dist/editor.js ADDED
@@ -0,0 +1 @@
1
+ export { RichTextEditor } from "./patterns/RichTextEditor/RichTextEditor.js";
@@ -0,0 +1,93 @@
1
+ Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
package/dist/fonts.css ADDED
@@ -0,0 +1,69 @@
1
+ /* Generated by scripts/generate-fonts.mjs from @fontsource-variable/inter 5.3.0. Do not edit by hand. */
2
+
3
+ /*
4
+ * Inter, the design system's font (`--fast-font-family`), served from the package's own files. One variable file
5
+ * per character set covers every weight. A browser downloads only the files whose characters a page shows, and
6
+ * only while text uses Inter, so an app that sets another font downloads none. Licence: fonts/LICENSE (SIL OFL 1.1).
7
+ */
8
+ @font-face {
9
+ font-family: Inter;
10
+ font-style: normal;
11
+ font-weight: 100 900;
12
+ font-display: swap;
13
+ src: url("./fonts/inter-cyrillic-ext-wght-normal.woff2") format("woff2");
14
+ unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
15
+ }
16
+
17
+ @font-face {
18
+ font-family: Inter;
19
+ font-style: normal;
20
+ font-weight: 100 900;
21
+ font-display: swap;
22
+ src: url("./fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
23
+ unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
24
+ }
25
+
26
+ @font-face {
27
+ font-family: Inter;
28
+ font-style: normal;
29
+ font-weight: 100 900;
30
+ font-display: swap;
31
+ src: url("./fonts/inter-greek-ext-wght-normal.woff2") format("woff2");
32
+ unicode-range: U+1F00-1FFF;
33
+ }
34
+
35
+ @font-face {
36
+ font-family: Inter;
37
+ font-style: normal;
38
+ font-weight: 100 900;
39
+ font-display: swap;
40
+ src: url("./fonts/inter-greek-wght-normal.woff2") format("woff2");
41
+ unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
42
+ }
43
+
44
+ @font-face {
45
+ font-family: Inter;
46
+ font-style: normal;
47
+ font-weight: 100 900;
48
+ font-display: swap;
49
+ src: url("./fonts/inter-vietnamese-wght-normal.woff2") format("woff2");
50
+ unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
51
+ }
52
+
53
+ @font-face {
54
+ font-family: Inter;
55
+ font-style: normal;
56
+ font-weight: 100 900;
57
+ font-display: swap;
58
+ src: url("./fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
59
+ unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
60
+ }
61
+
62
+ @font-face {
63
+ font-family: Inter;
64
+ font-style: normal;
65
+ font-weight: 100 900;
66
+ font-display: swap;
67
+ src: url("./fonts/inter-latin-wght-normal.woff2") format("woff2");
68
+ unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
69
+ }
@@ -0,0 +1,22 @@
1
+ export { FormCheckboxField, type FormCheckboxFieldProps } from "./patterns/FormField/FormCheckboxField.js";
2
+ export { FormRadioGroupField, type FormRadioGroupFieldProps, type RadioOption, } from "./patterns/FormField/FormRadioGroupField.js";
3
+ export { FormSelectField, type FormSelectFieldProps, type SelectOption, } from "./patterns/FormField/FormSelectField.js";
4
+ export { FormSwitchField, type FormSwitchFieldProps } from "./patterns/FormField/FormSwitchField.js";
5
+ export { FormTextAreaField, type FormTextAreaFieldProps } from "./patterns/FormField/FormTextAreaField.js";
6
+ export { FormTextField, type FormTextFieldProps } from "./patterns/FormField/FormTextField.js";
7
+ export { FormDateTimeField, type FormDateTimeFieldProps } from "./patterns/DateTimePicker/FormDateTimeField.js";
8
+ export { FormTreeSelectField, type FormTreeSelectFieldProps, } from "./patterns/TreeSelect/FormTreeSelectField.js";
9
+ export { FormPhoneField, type FormPhoneFieldProps, type PhoneCountry, type PhoneFieldLabels, } from "./patterns/PhoneField/FormPhoneField.js";
10
+ export { FormComboboxField, type FormComboboxFieldProps } from "./patterns/Combobox/FormComboboxField.js";
11
+ export { FormAutocompleteField, type FormAutocompleteFieldProps } from "./patterns/Combobox/FormAutocompleteField.js";
12
+ export { FormMultiSelectField, type FormMultiSelectFieldProps } from "./patterns/Combobox/FormMultiSelectField.js";
13
+ export { FormTagsInputField, type FormTagsInputFieldProps } from "./patterns/TagsInput/FormTagsInputField.js";
14
+ export { FormSliderField, type FormSliderFieldProps } from "./patterns/FormField/FormSliderField.js";
15
+ export { FormNumberField, type FormNumberFieldProps } from "./patterns/NumberField/FormNumberField.js";
16
+ export { FormRatingField, type FormRatingFieldProps } from "./patterns/FormField/FormRatingField.js";
17
+ export { FormColorField, type FormColorFieldProps } from "./patterns/ColorPicker/FormColorField.js";
18
+ export { FormDateRangeField, type FormDateRangeFieldProps } from "./patterns/Calendar/FormDateRangeField.js";
19
+ export { FormFileUploadField, type FormFileUploadFieldProps } from "./patterns/FileUpload/FormFileUploadField.js";
20
+ export { FormTransferListField, type FormTransferListFieldProps } from "./patterns/TransferList/FormTransferListField.js";
21
+ export { FormCascaderField, type FormCascaderFieldProps } from "./patterns/Cascader/FormCascaderField.js";
22
+ export { FormMentionsField, type FormMentionsFieldProps } from "./patterns/MentionsInput/FormMentionsField.js";
package/dist/forms.js ADDED
@@ -0,0 +1,23 @@
1
+ import { FormCheckboxField } from "./patterns/FormField/FormCheckboxField.js";
2
+ import { FormRadioGroupField } from "./patterns/FormField/FormRadioGroupField.js";
3
+ import { FormSelectField } from "./patterns/FormField/FormSelectField.js";
4
+ import { FormSwitchField } from "./patterns/FormField/FormSwitchField.js";
5
+ import { FormTextAreaField } from "./patterns/FormField/FormTextAreaField.js";
6
+ import { FormTextField } from "./patterns/FormField/FormTextField.js";
7
+ import { FormDateTimeField } from "./patterns/DateTimePicker/FormDateTimeField.js";
8
+ import { FormTreeSelectField } from "./patterns/TreeSelect/FormTreeSelectField.js";
9
+ import { FormPhoneField } from "./patterns/PhoneField/FormPhoneField.js";
10
+ import { FormComboboxField } from "./patterns/Combobox/FormComboboxField.js";
11
+ import { FormAutocompleteField } from "./patterns/Combobox/FormAutocompleteField.js";
12
+ import { FormMultiSelectField } from "./patterns/Combobox/FormMultiSelectField.js";
13
+ import { FormTagsInputField } from "./patterns/TagsInput/FormTagsInputField.js";
14
+ import { FormSliderField } from "./patterns/FormField/FormSliderField.js";
15
+ import { FormNumberField } from "./patterns/NumberField/FormNumberField.js";
16
+ import { FormRatingField } from "./patterns/FormField/FormRatingField.js";
17
+ import { FormColorField } from "./patterns/ColorPicker/FormColorField.js";
18
+ import { FormDateRangeField } from "./patterns/Calendar/FormDateRangeField.js";
19
+ import { FormFileUploadField } from "./patterns/FileUpload/FormFileUploadField.js";
20
+ import { FormTransferListField } from "./patterns/TransferList/FormTransferListField.js";
21
+ import { FormCascaderField } from "./patterns/Cascader/FormCascaderField.js";
22
+ import { FormMentionsField } from "./patterns/MentionsInput/FormMentionsField.js";
23
+ export { FormAutocompleteField, FormCascaderField, FormCheckboxField, FormColorField, FormComboboxField, FormDateRangeField, FormDateTimeField, FormFileUploadField, FormMentionsField, FormMultiSelectField, FormNumberField, FormPhoneField, FormRadioGroupField, FormRatingField, FormSelectField, FormSliderField, FormSwitchField, FormTagsInputField, FormTextAreaField, FormTextField, FormTransferListField, FormTreeSelectField };
@@ -0,0 +1,23 @@
1
+ /*
2
+ * The design foundation a page needs besides the components' own classes: the font (Inter, from the package's
3
+ * own files), the tokens (runtime CSS variables, dark theme, right-to-left font), their Tailwind utilities
4
+ * (`bg-primary`, `text-fg-secondary`, ...) and the base rules. An app that runs its own Tailwind 4 imports this
5
+ * file (see the README); `index.css` imports it for the ready-made stylesheet.
6
+ */
7
+ @import "./fonts.css";
8
+ @import "./tokens.css";
9
+ @import "./theme.css";
10
+ @import "./global.css";
11
+
12
+ @layer base {
13
+ /*
14
+ * Preflight is not imported, so the two universal resets the components rely on live here: border-box
15
+ * sizing, and borders that are off until a utility turns them on.
16
+ */
17
+ *,
18
+ ::before,
19
+ ::after {
20
+ box-sizing: border-box;
21
+ border: 0 solid;
22
+ }
23
+ }
@@ -0,0 +1,116 @@
1
+ /*
2
+ * The few rules that apply to the whole page: the font, the reset the design
3
+ * system relies on (Tailwind's Preflight is not imported), and icon sizing.
4
+ * All in `@layer base`, so Tailwind utilities override them without a
5
+ * specificity fight.
6
+ */
7
+
8
+ @layer base {
9
+ html {
10
+ -webkit-text-size-adjust: 100%;
11
+ text-size-adjust: 100%;
12
+ }
13
+
14
+ body {
15
+ margin: 0;
16
+ background-color: var(--fast-bg);
17
+ color: var(--fast-fg);
18
+ font-family: var(--fast-font-family);
19
+ /* The body style of the type scale, so a theme's `text-body` reaches text that sets no size of its own. */
20
+ font-size: var(--fast-text-body);
21
+ font-weight: 400;
22
+ line-height: var(--fast-text-body-line-height);
23
+ -webkit-font-smoothing: antialiased;
24
+ -moz-osx-font-smoothing: grayscale;
25
+ }
26
+
27
+ h1,
28
+ h2,
29
+ h3,
30
+ h4,
31
+ h5,
32
+ h6,
33
+ p,
34
+ dl,
35
+ dd,
36
+ figure,
37
+ blockquote {
38
+ margin: 0;
39
+ }
40
+
41
+ ul,
42
+ ol {
43
+ margin: 0;
44
+ padding: 0;
45
+ list-style: none;
46
+ }
47
+
48
+ /* Controls take the page's font and colour instead of the browser's, and none of its grey fill or radius. */
49
+ button,
50
+ input,
51
+ textarea,
52
+ select {
53
+ font: inherit;
54
+ color: inherit;
55
+ letter-spacing: inherit;
56
+ background-color: transparent;
57
+ border-radius: 0;
58
+ }
59
+
60
+ button {
61
+ padding: 0;
62
+ cursor: pointer;
63
+ }
64
+
65
+ button:disabled {
66
+ cursor: default;
67
+ }
68
+
69
+ a {
70
+ color: var(--fast-primary-text);
71
+ }
72
+
73
+ table {
74
+ border-collapse: collapse;
75
+ }
76
+
77
+ [hidden] {
78
+ display: none !important;
79
+ }
80
+
81
+ /* One keyboard focus ring for anything that does not draw its own. */
82
+ :focus-visible {
83
+ outline: 2px solid var(--fast-focus);
84
+ outline-offset: 2px;
85
+ }
86
+
87
+ /*
88
+ * Icons (lucide) size by the font-size of their surroundings, so an icon in a
89
+ * 16px button is 16px and one in a 32px state disc is 32px. Figma's icons are
90
+ * 1.5px strokes. Tailwind's `size-*` utilities still override the 1em.
91
+ */
92
+ svg.lucide {
93
+ display: inline-block;
94
+ flex-shrink: 0;
95
+ width: 1em;
96
+ height: 1em;
97
+ stroke-width: 1.5;
98
+ }
99
+
100
+ /* A theme change cross-fades the whole page (theme/theme-switch.ts). */
101
+ ::view-transition-old(root),
102
+ ::view-transition-new(root) {
103
+ animation-duration: 260ms;
104
+ animation-timing-function: ease;
105
+ }
106
+
107
+ @media (prefers-reduced-motion: reduce) {
108
+ *,
109
+ ::before,
110
+ ::after {
111
+ animation-duration: 0.01ms !important;
112
+ animation-iteration-count: 1 !important;
113
+ transition-duration: 0.01ms !important;
114
+ }
115
+ }
116
+ }
@@ -0,0 +1,12 @@
1
+ export interface ToastOptions {
2
+ /** Showing a toast with the same id replaces the visible one instead of stacking. */
3
+ id?: string | undefined;
4
+ }
5
+ export interface AppToast {
6
+ success: (message: string, options?: ToastOptions) => void;
7
+ error: (message: string, options?: ToastOptions) => void;
8
+ warning: (message: string, options?: ToastOptions) => void;
9
+ info: (message: string, options?: ToastOptions) => void;
10
+ }
11
+ /** Raises toasts through the app-wide toaster hosted by DesignSystemProvider. The object is stable. */
12
+ export declare const useAppToast: () => AppToast;
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { TOAST_TIMEOUT_MS, showToast } from "../components/Toast/toast-manager.js";
3
+ // src/hooks/useAppToast.ts
4
+ var show = (type, message, options) => {
5
+ showToast({
6
+ description: message,
7
+ type,
8
+ timeout: TOAST_TIMEOUT_MS,
9
+ priority: type === "error" ? "high" : "low",
10
+ ...options?.id ? { id: options.id } : {}
11
+ });
12
+ };
13
+ var appToast = {
14
+ success: (message, options) => {
15
+ show("success", message, options);
16
+ },
17
+ error: (message, options) => {
18
+ show("error", message, options);
19
+ },
20
+ warning: (message, options) => {
21
+ show("warning", message, options);
22
+ },
23
+ info: (message, options) => {
24
+ show("info", message, options);
25
+ }
26
+ };
27
+ /** Raises toasts through the app-wide toaster hosted by DesignSystemProvider. The object is stable. */
28
+ var useAppToast = () => appToast;
29
+ export { useAppToast };
@@ -0,0 +1,43 @@
1
+ import { type LucideIcon } from "lucide-react";
2
+ /**
3
+ * The shared icons of the design foundation, grouped by common navigation,
4
+ * actions and status roles. Drawn as 1.5px lucide line icons with rounded ends,
5
+ * they size by font-size (see `styles/global.css`), so an icon inside a 20px
6
+ * tile is 20px and no size prop is needed.
7
+ *
8
+ * Reach for this registry before importing an icon directly, so that the same
9
+ * action or concept uses the same icon on every screen.
10
+ *
11
+ * Direction: lucide's icons do not mirror in right-to-left. `arrow` points right;
12
+ * where it means "onward", flip it with CSS for a right-to-left layout.
13
+ */
14
+ export declare const FAST_ICONS: {
15
+ readonly dashboard: LucideIcon;
16
+ readonly home: LucideIcon;
17
+ readonly activity: LucideIcon;
18
+ readonly analytics: LucideIcon;
19
+ readonly billing: LucideIcon;
20
+ readonly invoices: LucideIcon;
21
+ readonly plans: LucideIcon;
22
+ readonly tags: LucideIcon;
23
+ readonly messages: LucideIcon;
24
+ readonly customers: LucideIcon;
25
+ readonly users: LucideIcon;
26
+ readonly groups: LucideIcon;
27
+ readonly settings: LucideIcon;
28
+ readonly search: LucideIcon;
29
+ readonly filter: LucideIcon;
30
+ readonly add: LucideIcon;
31
+ readonly edit: LucideIcon;
32
+ readonly delete: LucideIcon;
33
+ readonly download: LucideIcon;
34
+ readonly calendar: LucideIcon;
35
+ readonly arrow: LucideIcon;
36
+ readonly bolt: LucideIcon;
37
+ readonly check: LucideIcon;
38
+ readonly close: LucideIcon;
39
+ readonly warning: LucideIcon;
40
+ readonly error: LucideIcon;
41
+ readonly info: LucideIcon;
42
+ };
43
+ export type FastIconName = keyof typeof FAST_ICONS;