@ostack.tech/ui 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 (429) hide show
  1. package/README.md +3 -0
  2. package/dist/ostack-ui.cjs +11095 -0
  3. package/dist/ostack-ui.cjs.map +1 -0
  4. package/dist/ostack-ui.css +4191 -0
  5. package/dist/ostack-ui.css.map +1 -0
  6. package/dist/ostack-ui.js +11077 -0
  7. package/dist/ostack-ui.js.map +1 -0
  8. package/dist/types/components/Alert/Alert.d.ts +82 -0
  9. package/dist/types/components/Alert/AlertTitle.d.ts +12 -0
  10. package/dist/types/components/Alert/index.d.ts +2 -0
  11. package/dist/types/components/AlertDialog/AlertDialog.d.ts +81 -0
  12. package/dist/types/components/AlertDialog/AlertDialogAction.d.ts +10 -0
  13. package/dist/types/components/AlertDialog/AlertDialogBody.d.ts +7 -0
  14. package/dist/types/components/AlertDialog/AlertDialogCancel.d.ts +10 -0
  15. package/dist/types/components/AlertDialog/AlertDialogContent.d.ts +45 -0
  16. package/dist/types/components/AlertDialog/AlertDialogDescription.d.ts +14 -0
  17. package/dist/types/components/AlertDialog/AlertDialogFooter.d.ts +7 -0
  18. package/dist/types/components/AlertDialog/AlertDialogHeader.d.ts +7 -0
  19. package/dist/types/components/AlertDialog/AlertDialogTitle.d.ts +7 -0
  20. package/dist/types/components/AlertDialog/AlertDialogTrigger.d.ts +7 -0
  21. package/dist/types/components/AlertDialog/index.d.ts +10 -0
  22. package/dist/types/components/Button/Button.d.ts +111 -0
  23. package/dist/types/components/Button/index.d.ts +1 -0
  24. package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +32 -0
  25. package/dist/types/components/ButtonGroup/index.d.ts +1 -0
  26. package/dist/types/components/Calendar/Calendar.d.ts +41 -0
  27. package/dist/types/components/Calendar/CalendarContext.d.ts +18 -0
  28. package/dist/types/components/Calendar/CalendarDay.d.ts +11 -0
  29. package/dist/types/components/Calendar/CalendarMonthCaption.d.ts +9 -0
  30. package/dist/types/components/Calendar/index.d.ts +1 -0
  31. package/dist/types/components/Card/Card.d.ts +70 -0
  32. package/dist/types/components/Card/CardBody.d.ts +12 -0
  33. package/dist/types/components/Card/CardFooter.d.ts +12 -0
  34. package/dist/types/components/Card/CardHeader.d.ts +12 -0
  35. package/dist/types/components/Card/CardTitle.d.ts +19 -0
  36. package/dist/types/components/Card/index.d.ts +5 -0
  37. package/dist/types/components/Checkbox/Checkbox.d.ts +67 -0
  38. package/dist/types/components/Checkbox/index.d.ts +1 -0
  39. package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts +85 -0
  40. package/dist/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +8 -0
  41. package/dist/types/components/CheckboxGroup/index.d.ts +1 -0
  42. package/dist/types/components/ClearContexts/ClearContexts.d.ts +31 -0
  43. package/dist/types/components/ClearContexts/index.d.ts +1 -0
  44. package/dist/types/components/CloseButton/CloseButton.d.ts +7 -0
  45. package/dist/types/components/CloseButton/index.d.ts +1 -0
  46. package/dist/types/components/Code/Code.d.ts +35 -0
  47. package/dist/types/components/Code/index.d.ts +1 -0
  48. package/dist/types/components/Collapsible/Collapsible.d.ts +25 -0
  49. package/dist/types/components/Collapsible/CollapsibleContent.d.ts +7 -0
  50. package/dist/types/components/Collapsible/CollapsibleContext.d.ts +11 -0
  51. package/dist/types/components/Collapsible/CollapsibleTrigger.d.ts +10 -0
  52. package/dist/types/components/Collapsible/index.d.ts +3 -0
  53. package/dist/types/components/CommandMenu/CommandMenu.d.ts +91 -0
  54. package/dist/types/components/CommandMenu/CommandMenuDialog.d.ts +45 -0
  55. package/dist/types/components/CommandMenu/CommandMenuGroup.d.ts +9 -0
  56. package/dist/types/components/CommandMenu/CommandMenuItem.d.ts +13 -0
  57. package/dist/types/components/CommandMenu/index.d.ts +4 -0
  58. package/dist/types/components/Container/Container.d.ts +66 -0
  59. package/dist/types/components/Container/index.d.ts +1 -0
  60. package/dist/types/components/ControlAddon/ControlAddon.d.ts +36 -0
  61. package/dist/types/components/ControlAddon/index.d.ts +1 -0
  62. package/dist/types/components/ControlCode/ControlCode.d.ts +22 -0
  63. package/dist/types/components/ControlCode/index.d.ts +1 -0
  64. package/dist/types/components/DataTable/DataTable.d.ts +256 -0
  65. package/dist/types/components/DataTable/DataTableApi.d.ts +37 -0
  66. package/dist/types/components/DataTable/DataTableBody.d.ts +9 -0
  67. package/dist/types/components/DataTable/DataTableCell.d.ts +9 -0
  68. package/dist/types/components/DataTable/DataTableColumn.d.ts +70 -0
  69. package/dist/types/components/DataTable/DataTableContent.d.ts +28 -0
  70. package/dist/types/components/DataTable/DataTableContext.d.ts +141 -0
  71. package/dist/types/components/DataTable/DataTableEmptyOrLoadingRows.d.ts +9 -0
  72. package/dist/types/components/DataTable/DataTableFilter.d.ts +7 -0
  73. package/dist/types/components/DataTable/DataTableFoot.d.ts +8 -0
  74. package/dist/types/components/DataTable/DataTableHead.d.ts +7 -0
  75. package/dist/types/components/DataTable/DataTablePagination.d.ts +18 -0
  76. package/dist/types/components/DataTable/DataTableRow.d.ts +11 -0
  77. package/dist/types/components/DataTable/DataTableRowsPerPage.d.ts +19 -0
  78. package/dist/types/components/DataTable/DataTableSelectionTrigger.d.ts +21 -0
  79. package/dist/types/components/DataTable/PagedDataTablePagination.d.ts +7 -0
  80. package/dist/types/components/DataTable/PagedDataTableRows.d.ts +2 -0
  81. package/dist/types/components/DataTable/ScrolledDataTablePagination.d.ts +7 -0
  82. package/dist/types/components/DataTable/ScrolledDataTableRows.d.ts +7 -0
  83. package/dist/types/components/DataTable/getRowKey.d.ts +4 -0
  84. package/dist/types/components/DataTable/index.d.ts +12 -0
  85. package/dist/types/components/DataTable/spliceWindow.d.ts +24 -0
  86. package/dist/types/components/DataTable/transformRows.d.ts +10 -0
  87. package/dist/types/components/DataTable/useDataTableSelectionColumn.d.ts +4 -0
  88. package/dist/types/components/DateInput/DateInput.d.ts +87 -0
  89. package/dist/types/components/DateInput/index.d.ts +1 -0
  90. package/dist/types/components/DatePicker/DatePicker.d.ts +27 -0
  91. package/dist/types/components/DatePicker/index.d.ts +1 -0
  92. package/dist/types/components/DateRangeInput/DateRangeInput.d.ts +197 -0
  93. package/dist/types/components/DateRangeInput/index.d.ts +1 -0
  94. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +41 -0
  95. package/dist/types/components/DateRangePicker/index.d.ts +1 -0
  96. package/dist/types/components/Dialog/Dialog.d.ts +68 -0
  97. package/dist/types/components/Dialog/DialogBody.d.ts +7 -0
  98. package/dist/types/components/Dialog/DialogClose.d.ts +7 -0
  99. package/dist/types/components/Dialog/DialogContent.d.ts +45 -0
  100. package/dist/types/components/Dialog/DialogDescription.d.ts +13 -0
  101. package/dist/types/components/Dialog/DialogFooter.d.ts +7 -0
  102. package/dist/types/components/Dialog/DialogHeader.d.ts +16 -0
  103. package/dist/types/components/Dialog/DialogTitle.d.ts +7 -0
  104. package/dist/types/components/Dialog/DialogTrigger.d.ts +7 -0
  105. package/dist/types/components/Dialog/index.d.ts +9 -0
  106. package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +65 -0
  107. package/dist/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +24 -0
  108. package/dist/types/components/DropdownMenu/DropdownMenuContent.d.ts +20 -0
  109. package/dist/types/components/DropdownMenu/DropdownMenuGroup.d.ts +8 -0
  110. package/dist/types/components/DropdownMenu/DropdownMenuItem.d.ts +15 -0
  111. package/dist/types/components/DropdownMenu/DropdownMenuRadioGroup.d.ts +8 -0
  112. package/dist/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +16 -0
  113. package/dist/types/components/DropdownMenu/DropdownMenuSub.d.ts +3 -0
  114. package/dist/types/components/DropdownMenu/DropdownMenuSubContent.d.ts +13 -0
  115. package/dist/types/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +11 -0
  116. package/dist/types/components/DropdownMenu/DropdownMenuTrigger.d.ts +7 -0
  117. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  118. package/dist/types/components/ErrorBoundary/ErrorBoundary.d.ts +97 -0
  119. package/dist/types/components/ErrorBoundary/index.d.ts +2 -0
  120. package/dist/types/components/ErrorBoundary/useErrorBoundary.d.ts +1 -0
  121. package/dist/types/components/Feedback/Feedback.d.ts +22 -0
  122. package/dist/types/components/Feedback/index.d.ts +1 -0
  123. package/dist/types/components/FeedbackList/FeedbackList.d.ts +6 -0
  124. package/dist/types/components/FeedbackList/FeedbackListContext.d.ts +5 -0
  125. package/dist/types/components/FeedbackList/index.d.ts +2 -0
  126. package/dist/types/components/FeedbackPopover/FeedbackPopover.d.ts +34 -0
  127. package/dist/types/components/FeedbackPopover/FeedbackPopoverContext.d.ts +11 -0
  128. package/dist/types/components/FeedbackPopover/index.d.ts +2 -0
  129. package/dist/types/components/Field/Field.d.ts +20 -0
  130. package/dist/types/components/Field/FieldContext.d.ts +86 -0
  131. package/dist/types/components/Field/index.d.ts +2 -0
  132. package/dist/types/components/FieldGroup/FieldGroup.d.ts +30 -0
  133. package/dist/types/components/FieldGroup/FieldGroupBody.d.ts +12 -0
  134. package/dist/types/components/FieldGroup/FieldGroupContext.d.ts +10 -0
  135. package/dist/types/components/FieldGroup/FieldGroupHeader.d.ts +18 -0
  136. package/dist/types/components/FieldGroup/FieldGroupTitle.d.ts +19 -0
  137. package/dist/types/components/FieldGroup/index.d.ts +4 -0
  138. package/dist/types/components/Grid/Grid.d.ts +90 -0
  139. package/dist/types/components/Grid/index.d.ts +1 -0
  140. package/dist/types/components/Heading/Heading.d.ts +34 -0
  141. package/dist/types/components/Heading/index.d.ts +1 -0
  142. package/dist/types/components/HelperText/HelperText.d.ts +12 -0
  143. package/dist/types/components/HelperText/index.d.ts +1 -0
  144. package/dist/types/components/Icon/Icon.d.ts +57 -0
  145. package/dist/types/components/Icon/index.d.ts +1 -0
  146. package/dist/types/components/IconButton/IconButton.d.ts +101 -0
  147. package/dist/types/components/IconButton/index.d.ts +1 -0
  148. package/dist/types/components/Input/Input.d.ts +92 -0
  149. package/dist/types/components/Input/InputWithContainerRef.d.ts +14 -0
  150. package/dist/types/components/Input/index.d.ts +2 -0
  151. package/dist/types/components/Keyboard/Keyboard.d.ts +15 -0
  152. package/dist/types/components/Keyboard/index.d.ts +1 -0
  153. package/dist/types/components/Label/Label.d.ts +47 -0
  154. package/dist/types/components/Label/index.d.ts +1 -0
  155. package/dist/types/components/Link/Link.d.ts +58 -0
  156. package/dist/types/components/Link/LinkContext.d.ts +15 -0
  157. package/dist/types/components/Link/index.d.ts +1 -0
  158. package/dist/types/components/Mark/Mark.d.ts +41 -0
  159. package/dist/types/components/Mark/index.d.ts +1 -0
  160. package/dist/types/components/MenuList/MenuList.d.ts +48 -0
  161. package/dist/types/components/MenuList/MenuListContext.d.ts +11 -0
  162. package/dist/types/components/MenuList/MenuListGroup.d.ts +24 -0
  163. package/dist/types/components/MenuList/MenuListItem.d.ts +86 -0
  164. package/dist/types/components/MenuList/index.d.ts +3 -0
  165. package/dist/types/components/NumericInput/NumericInput.d.ts +86 -0
  166. package/dist/types/components/NumericInput/index.d.ts +1 -0
  167. package/dist/types/components/Output/Output.d.ts +25 -0
  168. package/dist/types/components/Output/index.d.ts +1 -0
  169. package/dist/types/components/Overlay/Overlay.d.ts +6 -0
  170. package/dist/types/components/Overlay/index.d.ts +1 -0
  171. package/dist/types/components/Popover/Popover.d.ts +27 -0
  172. package/dist/types/components/Popover/PopoverAnchor.d.ts +6 -0
  173. package/dist/types/components/Popover/PopoverClose.d.ts +7 -0
  174. package/dist/types/components/Popover/PopoverContent.d.ts +17 -0
  175. package/dist/types/components/Popover/PopoverTrigger.d.ts +10 -0
  176. package/dist/types/components/Popover/index.d.ts +5 -0
  177. package/dist/types/components/Portal/Portal.d.ts +13 -0
  178. package/dist/types/components/Portal/PortalContext.d.ts +10 -0
  179. package/dist/types/components/Portal/index.d.ts +2 -0
  180. package/dist/types/components/RadioGroup/Radio.d.ts +36 -0
  181. package/dist/types/components/RadioGroup/RadioGroup.d.ts +83 -0
  182. package/dist/types/components/RadioGroup/index.d.ts +2 -0
  183. package/dist/types/components/Root/Root.d.ts +121 -0
  184. package/dist/types/components/Root/RootContext.d.ts +8 -0
  185. package/dist/types/components/Root/index.d.ts +2 -0
  186. package/dist/types/components/Select/Option.d.ts +13 -0
  187. package/dist/types/components/Select/OptionsGroup.d.ts +7 -0
  188. package/dist/types/components/Select/Select.d.ts +117 -0
  189. package/dist/types/components/Select/SelectContext.d.ts +61 -0
  190. package/dist/types/components/Select/SelectMultipleValue.d.ts +1 -0
  191. package/dist/types/components/Select/SelectSingleValue.d.ts +1 -0
  192. package/dist/types/components/Select/index.d.ts +3 -0
  193. package/dist/types/components/Separator/Separator.d.ts +7 -0
  194. package/dist/types/components/Separator/index.d.ts +1 -0
  195. package/dist/types/components/Slot/Slot.d.ts +7 -0
  196. package/dist/types/components/Slot/Slottable.d.ts +10 -0
  197. package/dist/types/components/Slot/index.d.ts +2 -0
  198. package/dist/types/components/Spinner/Spinner.d.ts +47 -0
  199. package/dist/types/components/Spinner/index.d.ts +1 -0
  200. package/dist/types/components/Stack/Stack.d.ts +42 -0
  201. package/dist/types/components/Stack/index.d.ts +1 -0
  202. package/dist/types/components/Stepper/Step.d.ts +17 -0
  203. package/dist/types/components/Stepper/StepContent.d.ts +9 -0
  204. package/dist/types/components/Stepper/StepList.d.ts +12 -0
  205. package/dist/types/components/Stepper/Stepper.d.ts +59 -0
  206. package/dist/types/components/Stepper/StepperContext.d.ts +9 -0
  207. package/dist/types/components/Stepper/index.d.ts +4 -0
  208. package/dist/types/components/Table/Table.d.ts +122 -0
  209. package/dist/types/components/Table/TableBody.d.ts +6 -0
  210. package/dist/types/components/Table/TableCell.d.ts +45 -0
  211. package/dist/types/components/Table/TableColumn.d.ts +83 -0
  212. package/dist/types/components/Table/TableContext.d.ts +60 -0
  213. package/dist/types/components/Table/TableFoot.d.ts +12 -0
  214. package/dist/types/components/Table/TableHead.d.ts +23 -0
  215. package/dist/types/components/Table/TableRow.d.ts +10 -0
  216. package/dist/types/components/Table/index.d.ts +8 -0
  217. package/dist/types/components/Tabs/Tab.d.ts +14 -0
  218. package/dist/types/components/Tabs/TabContent.d.ts +9 -0
  219. package/dist/types/components/Tabs/TabList.d.ts +11 -0
  220. package/dist/types/components/Tabs/Tabs.d.ts +51 -0
  221. package/dist/types/components/Tabs/TabsContext.d.ts +34 -0
  222. package/dist/types/components/Tabs/index.d.ts +4 -0
  223. package/dist/types/components/Tag/Badge.d.ts +21 -0
  224. package/dist/types/components/Tag/Tag.d.ts +92 -0
  225. package/dist/types/components/Tag/index.d.ts +2 -0
  226. package/dist/types/components/TextArea/TextArea.d.ts +21 -0
  227. package/dist/types/components/TextArea/index.d.ts +1 -0
  228. package/dist/types/components/Toast/Toast.d.ts +79 -0
  229. package/dist/types/components/Toast/ToastDescription.d.ts +3 -0
  230. package/dist/types/components/Toast/ToastProvider.d.ts +12 -0
  231. package/dist/types/components/Toast/ToastTitle.d.ts +7 -0
  232. package/dist/types/components/Toast/ToastViewport.d.ts +10 -0
  233. package/dist/types/components/Toast/index.d.ts +5 -0
  234. package/dist/types/components/Tooltip/Tooltip.d.ts +55 -0
  235. package/dist/types/components/Tooltip/TooltipProvider.d.ts +3 -0
  236. package/dist/types/components/Tooltip/index.d.ts +2 -0
  237. package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +3 -0
  238. package/dist/types/components/VisuallyHidden/index.d.ts +1 -0
  239. package/dist/types/index.d.ts +96 -0
  240. package/dist/types/locale/LocalizationObject.d.ts +49 -0
  241. package/dist/types/locale/defaultLocale.d.ts +3 -0
  242. package/dist/types/locale/en-GB.d.ts +3 -0
  243. package/dist/types/locale/en-US.d.ts +3 -0
  244. package/dist/types/locale/en.d.ts +3 -0
  245. package/dist/types/locale/fr-FR.d.ts +3 -0
  246. package/dist/types/locale/index.d.ts +6 -0
  247. package/dist/types/locale/pt-PT.d.ts +3 -0
  248. package/dist/types/providers/AlertDialogProvider/AlertDialogProvider.d.ts +7 -0
  249. package/dist/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +97 -0
  250. package/dist/types/providers/AlertDialogProvider/index.d.ts +3 -0
  251. package/dist/types/providers/AlertDialogProvider/useAlertDialog.d.ts +68 -0
  252. package/dist/types/providers/DocumentTitleProvider/DocumentTitle.d.ts +12 -0
  253. package/dist/types/providers/DocumentTitleProvider/DocumentTitleProvider.d.ts +25 -0
  254. package/dist/types/providers/DocumentTitleProvider/DocumentTitleProviderContext.d.ts +44 -0
  255. package/dist/types/providers/DocumentTitleProvider/index.d.ts +2 -0
  256. package/dist/types/providers/ErrorReportingProvider/ErrorReport.d.ts +35 -0
  257. package/dist/types/providers/ErrorReportingProvider/ErrorReportingContext.d.ts +7 -0
  258. package/dist/types/providers/ErrorReportingProvider/ErrorReportingProvider.d.ts +70 -0
  259. package/dist/types/providers/ErrorReportingProvider/index.d.ts +4 -0
  260. package/dist/types/providers/ErrorReportingProvider/useErrorReporter.d.ts +3 -0
  261. package/dist/types/providers/LocalizationProvider/LocalizationContext.d.ts +6 -0
  262. package/dist/types/providers/LocalizationProvider/LocalizationProvider.d.ts +10 -0
  263. package/dist/types/providers/LocalizationProvider/index.d.ts +3 -0
  264. package/dist/types/providers/LocalizationProvider/useLocale.d.ts +3 -0
  265. package/dist/types/providers/PrefixProvider/PrefixContext.d.ts +5 -0
  266. package/dist/types/providers/PrefixProvider/PrefixProvider.d.ts +9 -0
  267. package/dist/types/providers/PrefixProvider/index.d.ts +3 -0
  268. package/dist/types/providers/PrefixProvider/usePrefix.d.ts +10 -0
  269. package/dist/types/providers/ToastManagerProvider/ToastManagerContext.d.ts +35 -0
  270. package/dist/types/providers/ToastManagerProvider/ToastManagerProvider.d.ts +11 -0
  271. package/dist/types/providers/ToastManagerProvider/index.d.ts +3 -0
  272. package/dist/types/providers/ToastManagerProvider/useToastManager.d.ts +23 -0
  273. package/dist/types/utils/accent.d.ts +2 -0
  274. package/dist/types/utils/boolDataAttr.d.ts +4 -0
  275. package/dist/types/utils/breakpoints.d.ts +32 -0
  276. package/dist/types/utils/changeCase.d.ts +2 -0
  277. package/dist/types/utils/combineEventHandlers.d.ts +24 -0
  278. package/dist/types/utils/control.d.ts +23 -0
  279. package/dist/types/utils/cx.d.ts +14 -0
  280. package/dist/types/utils/filtering.d.ts +14 -0
  281. package/dist/types/utils/keyboardShortcut.d.ts +111 -0
  282. package/dist/types/utils/mergeAriaIds.d.ts +2 -0
  283. package/dist/types/utils/nativeControls.d.ts +2 -0
  284. package/dist/types/utils/numericStringUtils.d.ts +27 -0
  285. package/dist/types/utils/parseDateStrict.d.ts +7 -0
  286. package/dist/types/utils/promiseUtils.d.ts +7 -0
  287. package/dist/types/utils/setNativeValue.d.ts +7 -0
  288. package/dist/types/utils/sorting.d.ts +9 -0
  289. package/dist/types/utils/stringHash.d.ts +7 -0
  290. package/dist/types/utils/typeUtils.d.ts +2 -0
  291. package/dist/types/utils/useCombinedRef.d.ts +9 -0
  292. package/dist/types/utils/useConstant.d.ts +7 -0
  293. package/dist/types/utils/useControllableState.d.ts +3 -0
  294. package/dist/types/utils/useCssVars.d.ts +47 -0
  295. package/dist/types/utils/useDateTransformer.d.ts +53 -0
  296. package/dist/types/utils/useIntersectionObserver.d.ts +5 -0
  297. package/dist/types/utils/useLatestValues.d.ts +8 -0
  298. package/dist/types/utils/useLayoutEffect.d.ts +3 -0
  299. package/dist/types/utils/useMeasure.d.ts +5 -0
  300. package/dist/types/utils/useMediaQuery.d.ts +12 -0
  301. package/dist/types/utils/useNumericTransformer.d.ts +60 -0
  302. package/dist/types/utils/useResponsiveValues.d.ts +31 -0
  303. package/dist/types/utils/useScrollPosition.d.ts +15 -0
  304. package/dist/types/utils/useScrollbarSize.d.ts +8 -0
  305. package/dist/types/utils/useSpacing.d.ts +7 -0
  306. package/dist/types/utils/warnOnce.d.ts +6 -0
  307. package/dist/types/utils/zustandUtils.d.ts +4 -0
  308. package/package.json +75 -0
  309. package/scss/_utils.scss +59 -0
  310. package/scss/components/Alert/_Alert-variables.scss +5 -0
  311. package/scss/components/Alert/_Alert.scss +56 -0
  312. package/scss/components/Button/_Button-variables.scss +164 -0
  313. package/scss/components/Button/_Button.scss +136 -0
  314. package/scss/components/ButtonGroup/_ButtonGroup-variables.scss +41 -0
  315. package/scss/components/ButtonGroup/_ButtonGroup.scss +48 -0
  316. package/scss/components/Calendar/_Calendar-variables.scss +127 -0
  317. package/scss/components/Calendar/_Calendar.scss +341 -0
  318. package/scss/components/Card/_Card-variables.scss +202 -0
  319. package/scss/components/Card/_Card.scss +253 -0
  320. package/scss/components/Checkbox/_Checkbox-variables.scss +25 -0
  321. package/scss/components/Checkbox/_Checkbox.scss +106 -0
  322. package/scss/components/CheckboxGroup/_CheckboxGroup.scss +68 -0
  323. package/scss/components/CloseButton/_CloseButton-variables.scss +2 -0
  324. package/scss/components/CloseButton/_CloseButton.scss +14 -0
  325. package/scss/components/Code/_Code-variables.scss +16 -0
  326. package/scss/components/Code/_Code.scss +30 -0
  327. package/scss/components/Collapsible/_Collapsible-variables.scss +5 -0
  328. package/scss/components/Collapsible/_Collapsible.scss +56 -0
  329. package/scss/components/CommandMenu/_CommandMenu-variables.scss +66 -0
  330. package/scss/components/CommandMenu/_CommandMenu.scss +162 -0
  331. package/scss/components/Container/_Container-variables.scss +21 -0
  332. package/scss/components/Container/_Container.scss +46 -0
  333. package/scss/components/ControlAddon/_ControlAddon-variables.scss +303 -0
  334. package/scss/components/ControlAddon/_ControlAddon.scss +331 -0
  335. package/scss/components/ControlCode/_ControlCode-variables.scss +61 -0
  336. package/scss/components/ControlCode/_ControlCode.scss +68 -0
  337. package/scss/components/DataTable/_DataTable.scss +134 -0
  338. package/scss/components/DateInput/_DateInput.scss +11 -0
  339. package/scss/components/DateRangeInput/_DateRangeInput-variables.scss +37 -0
  340. package/scss/components/DateRangeInput/_DateRangeInput.scss +130 -0
  341. package/scss/components/Dialog/_Dialog-variables.scss +195 -0
  342. package/scss/components/Dialog/_Dialog.scss +142 -0
  343. package/scss/components/DropdownMenu/_DropdownMenu-variables.scss +3 -0
  344. package/scss/components/DropdownMenu/_DropdownMenu.scss +50 -0
  345. package/scss/components/Feedback/_Feedback-variables.scss +8 -0
  346. package/scss/components/Feedback/_Feedback.scss +21 -0
  347. package/scss/components/FeedbackList/_FeedbackList-variables.scss +6 -0
  348. package/scss/components/FeedbackList/_FeedbackList.scss +31 -0
  349. package/scss/components/FeedbackPopover/_FeedbackPopover-variables.scss +26 -0
  350. package/scss/components/FeedbackPopover/_FeedbackPopover.scss +66 -0
  351. package/scss/components/Field/_Field.scss +51 -0
  352. package/scss/components/FieldGroup/_FieldGroup-variables.scss +31 -0
  353. package/scss/components/FieldGroup/_FieldGroup.scss +68 -0
  354. package/scss/components/Grid/_Grid.scss +101 -0
  355. package/scss/components/Heading/_Heading-variables.scss +78 -0
  356. package/scss/components/Heading/_Heading.scss +22 -0
  357. package/scss/components/HelperText/_HelperText-variables.scss +7 -0
  358. package/scss/components/HelperText/_HelperText.scss +18 -0
  359. package/scss/components/Icon/_Icon-variables.scss +3 -0
  360. package/scss/components/Icon/_Icon.scss +17 -0
  361. package/scss/components/IconButton/_IconButton-variables.scss +34 -0
  362. package/scss/components/IconButton/_IconButton.scss +41 -0
  363. package/scss/components/Input/_Input-variables.scss +6 -0
  364. package/scss/components/Input/_Input.scss +235 -0
  365. package/scss/components/Keyboard/_Keyboard.scss +17 -0
  366. package/scss/components/Label/_Label-variables.scss +26 -0
  367. package/scss/components/Label/_Label.scss +63 -0
  368. package/scss/components/Link/_Link-variables.scss +46 -0
  369. package/scss/components/Link/_Link.scss +63 -0
  370. package/scss/components/Mark/_Mark-variables.scss +8 -0
  371. package/scss/components/Mark/_Mark.scss +11 -0
  372. package/scss/components/MenuList/_MenuList.scss +86 -0
  373. package/scss/components/Output/_Output.scss +5 -0
  374. package/scss/components/Overlay/_Overlay-variables.scss +14 -0
  375. package/scss/components/Overlay/_Overlay.scss +32 -0
  376. package/scss/components/Popover/_Popover.scss +10 -0
  377. package/scss/components/RadioGroup/_Radio-variables.scss +1 -0
  378. package/scss/components/RadioGroup/_Radio.scss +49 -0
  379. package/scss/components/RadioGroup/_RadioGroup.scss +74 -0
  380. package/scss/components/Root/_Root-variables.scss +10 -0
  381. package/scss/components/Root/_Root.scss +107 -0
  382. package/scss/components/Select/_Select-variables.scss +101 -0
  383. package/scss/components/Select/_Select.scss +167 -0
  384. package/scss/components/Separator/_Separator.scss +16 -0
  385. package/scss/components/Spinner/_Spinner-variables.scss +3 -0
  386. package/scss/components/Spinner/_Spinner.scss +18 -0
  387. package/scss/components/Stack/_Stack-variables.scss +4 -0
  388. package/scss/components/Stack/_Stack.scss +47 -0
  389. package/scss/components/Stepper/_Stepper-variables.scss +38 -0
  390. package/scss/components/Stepper/_Stepper.scss +86 -0
  391. package/scss/components/Table/_Table-variables.scss +471 -0
  392. package/scss/components/Table/_Table.scss +632 -0
  393. package/scss/components/Tabs/_Tabs-variables.scss +403 -0
  394. package/scss/components/Tabs/_Tabs.scss +443 -0
  395. package/scss/components/Tag/_Tag-variables.scss +37 -0
  396. package/scss/components/Tag/_Tag.scss +86 -0
  397. package/scss/components/Toast/_Toast.scss +181 -0
  398. package/scss/components/Tooltip/_Tooltip-variables.scss +21 -0
  399. package/scss/components/Tooltip/_Tooltip.scss +44 -0
  400. package/scss/index.scss +57 -0
  401. package/scss/scss/_base-variables.scss +501 -0
  402. package/scss/scss/_colors.scss +188 -0
  403. package/scss/scss/helpers/_visually-hidden.scss +18 -0
  404. package/scss/scss/placeholders/_calendar-popover.scss +16 -0
  405. package/scss/scss/placeholders/button/_button-variables.scss +254 -0
  406. package/scss/scss/placeholders/button/_button.scss +153 -0
  407. package/scss/scss/placeholders/checkable/_checkable-variables.scss +78 -0
  408. package/scss/scss/placeholders/checkable/_checkable.scss +354 -0
  409. package/scss/scss/placeholders/checkable-group/_checkable-group-variables.scss +43 -0
  410. package/scss/scss/placeholders/checkable-group/_checkable-group.scss +141 -0
  411. package/scss/scss/placeholders/control/_control-variables.scss +300 -0
  412. package/scss/scss/placeholders/control/_control.scss +372 -0
  413. package/scss/scss/placeholders/menu/_menu-variables.scss +325 -0
  414. package/scss/scss/placeholders/menu/_menu.scss +364 -0
  415. package/scss/scss/placeholders/notification/_notification-variables.scss +76 -0
  416. package/scss/scss/placeholders/notification/_notification.scss +83 -0
  417. package/scss/scss/placeholders/popover/_popover-variables.scss +22 -0
  418. package/scss/scss/placeholders/popover/_popover.scss +70 -0
  419. package/scss/scss/utils/_animation.scss +125 -0
  420. package/scss/scss/utils/_breakpoints.scss +64 -0
  421. package/scss/scss/utils/_button-reset.scss +17 -0
  422. package/scss/scss/utils/_css-color-functions.scss +15 -0
  423. package/scss/scss/utils/_declare-var.scss +8 -0
  424. package/scss/scss/utils/_maybe-important.scss +5 -0
  425. package/scss/scss/utils/_responsive-values.scss +28 -0
  426. package/scss/scss/utils/_space-toggle.scss +25 -0
  427. package/scss/scss/utils/_spacing.scss +12 -0
  428. package/scss/scss/utils/_spinner.scss +31 -0
  429. package/scss/scss/utils/_transition.scss +15 -0
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ /** Value of the field group context. */
3
+ export interface FieldGroupContextValue {
4
+ setCodeId: React.Dispatch<React.SetStateAction<string | undefined>>;
5
+ setTitleId: React.Dispatch<React.SetStateAction<string | undefined>>;
6
+ }
7
+ /** Field group context. */
8
+ export declare const FieldGroupContext: React.Context<FieldGroupContextValue | null>;
9
+ /** Hook providing access to the field group context. */
10
+ export declare function useFieldGroupContext(): FieldGroupContextValue;
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ /** Properties of the field group header component. */
3
+ export interface FieldGroupHeaderProps extends React.ComponentPropsWithoutRef<"div"> {
4
+ /**
5
+ * Change the component to the HTML tag or custom component of the only child.
6
+ * This will merge the original component props with the props of the supplied
7
+ * element/component and change the underlying DOM node.
8
+ */
9
+ asChild?: boolean;
10
+ /** Code associated with the field group. */
11
+ code?: React.ReactNode;
12
+ /** Text prefixed to the code to be announced by assistive technologies. */
13
+ visuallyHiddenCodePrefix?: React.ReactNode;
14
+ /** Properties to pass to the code element. */
15
+ codeProps?: React.ComponentPropsWithoutRef<"span">;
16
+ }
17
+ /** Component used to display the header of a field group. */
18
+ export declare const FieldGroupHeader: React.ForwardRefExoticComponent<FieldGroupHeaderProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import { type HeadingLevel } from "../Heading";
3
+ /** Properties of the field group title component. */
4
+ export interface FieldGroupTitleProps extends React.ComponentPropsWithoutRef<"h2"> {
5
+ /**
6
+ * Change the component to the HTML tag or custom component of the only child.
7
+ * This will merge the original component props with the props of the supplied
8
+ * element/component and change the underlying DOM node.
9
+ */
10
+ asChild?: boolean;
11
+ /**
12
+ * Heading level.
13
+ *
14
+ * @default 2
15
+ */
16
+ level?: HeadingLevel;
17
+ }
18
+ /** Component used to display the caption of a field group. */
19
+ export declare const FieldGroupTitle: React.ForwardRefExoticComponent<FieldGroupTitleProps & React.RefAttributes<HTMLHeadingElement>>;
@@ -0,0 +1,4 @@
1
+ export * from "./FieldGroup.tsx";
2
+ export * from "./FieldGroupBody.tsx";
3
+ export * from "./FieldGroupHeader.tsx";
4
+ export * from "./FieldGroupTitle.tsx";
@@ -0,0 +1,90 @@
1
+ import * as React from "react";
2
+ import { type Responsive } from "../../utils/useResponsiveValues.ts";
3
+ /** Size of a column. */
4
+ export type GridColumnSize = number | "auto" | "content";
5
+ /** Offset of a column. */
6
+ export type GridOffsetSize = number | "auto";
7
+ /** Properties of the grid component. */
8
+ export interface GridProps extends React.ComponentPropsWithoutRef<"div"> {
9
+ /**
10
+ * Change the component to the HTML tag or custom component of the only child.
11
+ * This will merge the original component props with the props of the supplied
12
+ * element/component and change the underlying DOM node.
13
+ */
14
+ asChild?: boolean;
15
+ /**
16
+ * Mark the component as a grid container that contains the grid items. `Grid`
17
+ * components are otherwise always items.
18
+ */
19
+ container?: boolean;
20
+ /**
21
+ * Number of columns of the grid.
22
+ *
23
+ * A responsive value may be provided to change the number of columns based on
24
+ * the current breakpoint.
25
+ *
26
+ * @default 12
27
+ */
28
+ columns?: Responsive<number>;
29
+ /**
30
+ * Gap between both rows and columns. When a number `n` is provided, each unit
31
+ * corresponds to `spacing(n)`.
32
+ *
33
+ * A responsive value may be provided to change the gap based on the current
34
+ * breakpoint.
35
+ *
36
+ * @default 5
37
+ */
38
+ gap?: Responsive<number | string>;
39
+ /**
40
+ * Gap between rows. When a number `n` is provided, each unit corresponds to
41
+ * `spacing(n)`.
42
+ *
43
+ * A responsive value may be provided to change the row gap based on the
44
+ * current breakpoint.
45
+ *
46
+ * @default gap
47
+ */
48
+ rowGap?: Responsive<number | string>;
49
+ /**
50
+ * Gap between columns. When a number `n` is provided, each unit corresponds
51
+ * to `spacing(n)`.
52
+ *
53
+ * A responsive value may be provided to change the column gap based on the
54
+ * current breakpoint.
55
+ *
56
+ * @default gap
57
+ */
58
+ columnGap?: Responsive<number | string>;
59
+ /** Column size (number of columns) at the `xs` breakpoint. */
60
+ xs?: GridColumnSize;
61
+ /** Offset size (number of columns) at the `xs` breakpoint. */
62
+ xsOffset?: GridOffsetSize;
63
+ /** Column size (number of columns) at the `sm` breakpoint. */
64
+ sm?: GridColumnSize;
65
+ /** Offset size (number of columns) at the `sm` breakpoint. */
66
+ smOffset?: GridOffsetSize;
67
+ /** Column size (number of columns) at the `md` breakpoint. */
68
+ md?: GridColumnSize;
69
+ /** Offset size (number of columns) at the `md` breakpoint. */
70
+ mdOffset?: GridOffsetSize;
71
+ /** Column size (number of columns) at the `lg` breakpoint. */
72
+ lg?: GridColumnSize;
73
+ /** Offset size (number of columns) at the `lg` breakpoint. */
74
+ lgOffset?: GridOffsetSize;
75
+ /** Column size (number of columns) at the `xl` breakpoint. */
76
+ xl?: GridColumnSize;
77
+ /** Offset size (number of columns) at the `xl` breakpoint. */
78
+ xlOffset?: GridOffsetSize;
79
+ /** Column size (number of columns) at the `xxl` breakpoint. */
80
+ xxl?: GridColumnSize;
81
+ /** Offset size (number of columns) at the `xxl` breakpoint. */
82
+ xxlOffset?: GridOffsetSize;
83
+ }
84
+ /**
85
+ * The `Grid` component is designed for creating layouts with a defined number
86
+ * of columns. It allows you to configure columns responsively by specifying
87
+ * different column spans for each child at various breakpoints, enabling
88
+ * flexible and adaptive designs across screen sizes.
89
+ */
90
+ export declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from "./Grid.tsx";
@@ -0,0 +1,34 @@
1
+ import * as React from "react";
2
+ /** Heading levels. */
3
+ export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
4
+ /** Properties of the heading component. */
5
+ export interface HeadingProps extends React.ComponentPropsWithoutRef<`h${HeadingLevel}`> {
6
+ /**
7
+ * Change the component to the HTML tag or custom component of the only child.
8
+ * This will merge the original component props with the props of the supplied
9
+ * element/component and change the underlying DOM node.
10
+ */
11
+ asChild?: boolean;
12
+ /**
13
+ * Heading level. By default, if `asChild` is not provided, the level is used
14
+ * to determine which HTML element to render, so a level of `2` causes an
15
+ * `<h2>` element to be rendered.
16
+ *
17
+ * @default 2
18
+ */
19
+ level?: HeadingLevel;
20
+ }
21
+ /**
22
+ * Component used to render semantic HTML heading elements.
23
+ *
24
+ * Example usage:
25
+ *
26
+ * ```tsx
27
+ * import { Heading } from "@ostack.tech/ui";
28
+ *
29
+ * function FavoriteBooksTitle() {
30
+ * return <Heading>Favourite Books</Heading>;
31
+ * }
32
+ * ```
33
+ */
34
+ export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
@@ -0,0 +1 @@
1
+ export * from "./Heading.tsx";
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ /** Properties of the helper text component. */
3
+ export interface HelperTextProps extends React.ComponentPropsWithoutRef<"div"> {
4
+ /**
5
+ * Change the component to the HTML tag or custom component of the only child.
6
+ * This will merge the original component props with the props of the supplied
7
+ * element/component and change the underlying DOM node.
8
+ */
9
+ asChild?: boolean;
10
+ }
11
+ /** Component used to provide helper text to a form control. */
12
+ export declare const HelperText: React.ForwardRefExoticComponent<HelperTextProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from "./HelperText.tsx";
@@ -0,0 +1,57 @@
1
+ import type { FlipProp, IconProp } from "@fortawesome/fontawesome-svg-core";
2
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
3
+ import * as React from "react";
4
+ import { type AccentColor } from "../../utils/accent.ts";
5
+ export type { IconProp } from "@fortawesome/fontawesome-svg-core";
6
+ /** Possible sizes of an icon. */
7
+ export type IconSize = "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
8
+ /** Possible colours of an icon. */
9
+ export type IconColor = AccentColor;
10
+ /** Properties of the icon component. */
11
+ export interface IconProps extends Omit<React.ComponentPropsWithoutRef<typeof FontAwesomeIcon>, "icon" | "size" | "flip"> {
12
+ /** Icon to display. */
13
+ icon: IconProp;
14
+ /**
15
+ * Size of the icon. By default, the icon will be sized according to the
16
+ * current font size.
17
+ */
18
+ size?: IconSize;
19
+ /**
20
+ * Colour of the icon. By default, the icon will have the current font's
21
+ * colour.
22
+ */
23
+ color?: IconColor;
24
+ /**
25
+ * Optional accessible label for the icon.
26
+ *
27
+ * When provided, a visually hidden label is added so that assistive
28
+ * technologies correctly announce it.
29
+ */
30
+ label?: string;
31
+ flip?: boolean | FlipProp;
32
+ }
33
+ /**
34
+ * Icon component extending the FontAwesome's `FontAwesomeIcon` component.
35
+ *
36
+ * Properties supported by FontAwesome are also supported by this component. For
37
+ * more information on all supported properties, see [FontAwesome's React
38
+ * documentation](https://docs.fontawesome.com/v5/web/use-with/react).
39
+ *
40
+ * For a list of existing icons, consult:
41
+ * https://fontawesome.com/search?ic=free.
42
+ *
43
+ * For tree-shaking purposes, we recommend importing icons individually from
44
+ * their respective FontAwesome module.
45
+ *
46
+ * Example usage:
47
+ *
48
+ * ```tsx
49
+ * import { faCat } from "@fortawesome/free-solid-svg-icons";
50
+ * import { Icon } from "@ostack.tech/ui";
51
+ *
52
+ * function CatIcon() {
53
+ * return <Icon icon={faCat} />;
54
+ * }
55
+ * ```
56
+ */
57
+ export declare const Icon: React.NamedExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1 @@
1
+ export * from "./Icon.tsx";
@@ -0,0 +1,101 @@
1
+ import * as React from "react";
2
+ import { type ButtonColor, type ButtonSize, type ButtonVariant } from "../Button";
3
+ import { Icon, type IconProp } from "../Icon";
4
+ import { Spinner } from "../Spinner";
5
+ import { Tooltip } from "../Tooltip";
6
+ /** Icon button variants. */
7
+ export type IconButtonVariant = ButtonVariant;
8
+ /** Icon button colours. */
9
+ export type IconButtonColor = ButtonColor;
10
+ /** Icon button sizes. */
11
+ export type IconButtonSize = ButtonSize;
12
+ /** Properties of the icon button component. */
13
+ export interface IconButtonProps extends Omit<React.ComponentPropsWithoutRef<"button">, "children"> {
14
+ /**
15
+ * Change the component to the HTML tag or custom component of the only child.
16
+ * This will merge the original component props with the props of the supplied
17
+ * element/component and change the underlying DOM node.
18
+ */
19
+ asChild?: boolean;
20
+ children?: React.ReactElement;
21
+ /**
22
+ * Icon button's variant.
23
+ *
24
+ * @default solid
25
+ */
26
+ variant?: IconButtonVariant;
27
+ /**
28
+ * Icon button's colour.
29
+ *
30
+ * @default neutral
31
+ */
32
+ color?: IconButtonColor;
33
+ /**
34
+ * Size of the icon button.
35
+ *
36
+ * @default md
37
+ */
38
+ size?: IconButtonSize;
39
+ /** Whether to display the icon button as a circle. */
40
+ circle?: boolean;
41
+ /** Font Awesome icon to show within the button. */
42
+ icon: IconProp | React.ReactElement;
43
+ /** Button label provided to the icon button as a tooltip. */
44
+ label: React.ReactNode;
45
+ /**
46
+ * Whether to display the button in "active" state.
47
+ *
48
+ * @default false
49
+ */
50
+ active?: boolean;
51
+ /**
52
+ * Whether to disable the button.
53
+ *
54
+ * @default false
55
+ */
56
+ disabled?: boolean;
57
+ /**
58
+ * Whether to display the button in "loading" state.
59
+ *
60
+ * @default false
61
+ */
62
+ loading?: boolean;
63
+ /**
64
+ * Whether the icon button should be enabled when `loading` is `true`.
65
+ *
66
+ * @default false
67
+ */
68
+ enabledWhenLoading?: boolean;
69
+ /** Properties to pass to the `Icon` component. */
70
+ iconProps?: Omit<React.ComponentPropsWithRef<typeof Icon>, "icon" | "label">;
71
+ /** Properties to pass to the `Spinner` component. */
72
+ spinnerProps?: React.ComponentPropsWithRef<typeof Spinner>;
73
+ /** Properties to pass to the `Tooltip` component. */
74
+ tooltipProps?: Omit<React.ComponentPropsWithRef<typeof Tooltip>, "content" | "children">;
75
+ }
76
+ /**
77
+ * The icon button component renders a button containing a single icon. Use it
78
+ * as appropriate, as an alternative to the `Button` component, to trigger
79
+ * actions or events, such as opening a dialog or submitting a form
80
+ *
81
+ * A `label` property, displayed as a tooltip, is required for screen-readers to
82
+ * give meaning to the button.
83
+ *
84
+ * Example usage:
85
+ *
86
+ * ```tsx
87
+ * import { faRocket } from "@fortawesome/free-solid-svg-icons";
88
+ * import { IconButton } from "@ostack.tech/ui";
89
+ *
90
+ * function Launch() {
91
+ * return (
92
+ * <IconButton
93
+ * icon={faRocket}
94
+ * label="Launch rocket"
95
+ * onClick={launchRocket}
96
+ * />
97
+ * );
98
+ * }
99
+ * ```
100
+ */
101
+ export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1 @@
1
+ export * from "./IconButton.tsx";
@@ -0,0 +1,92 @@
1
+ import * as React from "react";
2
+ import { type ControlStatus, type ControlVariant } from "../../utils/control.ts";
3
+ import { type Responsive } from "../../utils/useResponsiveValues.ts";
4
+ import { CloseButton } from "../CloseButton";
5
+ import { type ControlAddon } from "../ControlAddon";
6
+ import { Spinner } from "../Spinner";
7
+ /** Accepted values for "show clear button". */
8
+ export type ShowClearButton = boolean | "auto";
9
+ export interface InputProps extends Omit<React.ComponentPropsWithoutRef<"input">, "children">, InputPropsBase {
10
+ }
11
+ /** Properties of the input component. */
12
+ export interface InputPropsBase {
13
+ /**
14
+ * Change the component to the HTML tag or custom component of the only child.
15
+ * This will merge the original component props with the props of the supplied
16
+ * element/component and change the underlying DOM node.
17
+ */
18
+ asChild?: boolean;
19
+ children?: React.ReactElement;
20
+ /**
21
+ * Input's style variant. Defaults to the default variant unless when
22
+ * rendering inside a table cell (in which it defaults to `"cell"`).
23
+ */
24
+ variant?: ControlVariant;
25
+ /** Sets the status of the input. */
26
+ status?: ControlStatus;
27
+ /** Input code. */
28
+ code?: React.ReactNode;
29
+ /**
30
+ * Adds a spinner to the input to indicate activity. Note that it doesn't
31
+ * automatically disable the input.
32
+ *
33
+ * @default false
34
+ */
35
+ loading?: boolean;
36
+ /** Sets the input's text align. */
37
+ align?: Responsive<React.CSSProperties["textAlign"]>;
38
+ /** Input's start adornment. */
39
+ startAdornment?: React.ReactNode;
40
+ /** Input's end adornment. */
41
+ endAdornment?: React.ReactNode;
42
+ /**
43
+ * Whether to show a button to clear the input when it has content.
44
+ *
45
+ * @default false
46
+ */
47
+ showClearButton?: ShowClearButton;
48
+ /** Label of the clear button announced to assistive technologies. */
49
+ clearButtonLabel?: string;
50
+ /**
51
+ * Function called whenever the value changes.
52
+ *
53
+ * @param value New value.
54
+ */
55
+ onValueChange?: (value: string) => void;
56
+ /**
57
+ * Function called when the focus moves out of the control as a whole.
58
+ *
59
+ * This is useful when there is a need to know when the user stops interacting
60
+ * with the control.
61
+ */
62
+ onBlurToOutside?: (event: React.FocusEvent) => void;
63
+ /** Properties to pass to the root component. */
64
+ rootProps?: React.ComponentPropsWithRef<"div">;
65
+ /** Properties to pass to the code component. */
66
+ codeProps?: Omit<React.ComponentPropsWithRef<typeof ControlAddon>, "status">;
67
+ /** Properties to pass to the container component. */
68
+ containerProps?: React.ComponentPropsWithRef<"div">;
69
+ /** Properties to pass to the clear button component. */
70
+ clearButtonProps?: React.ComponentPropsWithRef<typeof CloseButton>;
71
+ /** Properties to pass to the spinner component. */
72
+ spinnerProps?: Omit<React.ComponentPropsWithRef<typeof Spinner>, "size">;
73
+ }
74
+ /**
75
+ * The input component is used to collect user input. It is built on top of the
76
+ * browser's [`<input>`
77
+ * element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input).
78
+ *
79
+ * For accessibility purposes, inputs are usually included within a `Field`
80
+ * together with a `Label` and optionally `HelperText` and/or `Feedback`.
81
+ *
82
+ * Example usage:
83
+ *
84
+ * ```tsx
85
+ * import { Input } from "@ostack.tech/ui";
86
+ *
87
+ * function Search() {
88
+ * return <Input placeholder="Search…" />;
89
+ * }
90
+ * ```
91
+ */
92
+ export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import { Input, type InputProps } from "./Input.tsx";
3
+ /**
4
+ * Utility input component whose `ref` is passed to the input's container. Use
5
+ * `inputRef` to provide the input's ref instead.
6
+ *
7
+ * This component is useful when using an input component as a trigger for
8
+ * popovers/menus, and we wish to align said popover/menu against the input's
9
+ * container (since popovers/menus align themselves based on the element
10
+ * referenced by their trigger).
11
+ */
12
+ export declare const InputWithContainerRef: React.ForwardRefExoticComponent<InputProps & {
13
+ inputRef?: React.Ref<React.ComponentRef<typeof Input>>;
14
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export * from "./Input.tsx";
2
+ export * from "./InputWithContainerRef.tsx";
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ /** Properties of the keyboard component. */
3
+ export interface KeyboardProps extends React.ComponentPropsWithoutRef<"kbd"> {
4
+ /**
5
+ * Change the component to the HTML tag or custom component of the only child.
6
+ * This will merge the original component props with the props of the supplied
7
+ * element/component and change the underlying DOM node.
8
+ */
9
+ asChild?: boolean;
10
+ }
11
+ /**
12
+ * Component used to show which key or combination of keys performs a given
13
+ * action.
14
+ */
15
+ export declare const Keyboard: React.ForwardRefExoticComponent<KeyboardProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1 @@
1
+ export * from "./Keyboard.tsx";
@@ -0,0 +1,47 @@
1
+ import { Label as LabelPrimitive } from "radix-ui";
2
+ import * as React from "react";
3
+ import { Icon } from "../Icon";
4
+ import { IconButton } from "../IconButton";
5
+ import { Popover, PopoverContent } from "../Popover";
6
+ /** Properties of the label component. */
7
+ export interface LabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {
8
+ /** Shows a "required" symbol next to the label. */
9
+ required?: boolean;
10
+ /** Optional helper text displayed as a popover triggered by an icon button. */
11
+ helperText?: React.ReactNode;
12
+ /** Label of the required icon announced to assistive technologies. */
13
+ requiredIconLabel?: string;
14
+ /** Label of the helper button announced to assistive technologies. */
15
+ helperButtonLabel?: string;
16
+ /** Properties to pass to the container element. */
17
+ containerProps?: React.ComponentPropsWithRef<"div">;
18
+ /** Properties to pass to the required icon container element. */
19
+ requiredIconContainerProps?: React.ComponentPropsWithRef<"span">;
20
+ /** Properties to pass to the required icon component. */
21
+ requiredIconProps?: Omit<React.ComponentPropsWithRef<typeof Icon>, "icon">;
22
+ /** Properties to pass to the helper button component. */
23
+ helperButtonProps?: Omit<React.ComponentPropsWithRef<typeof IconButton>, "icon">;
24
+ /** Properties to pass to the helper popover component. */
25
+ helperPopoverProps?: React.ComponentPropsWithRef<typeof Popover>;
26
+ /** Properties to pass to the helper popover content component. */
27
+ helperPopoverContentProps?: React.ComponentPropsWithRef<typeof PopoverContent>;
28
+ }
29
+ /**
30
+ * The `Label` component renders an accessible label which can be associated
31
+ * with form controls.
32
+ *
33
+ * It should typically be used within a `Field` component together with a
34
+ * control (`Input`, `Checkbox`, `Select`, _etc._), in which case the label will
35
+ * be automatically associated with its respective control.
36
+ *
37
+ * Example usage:
38
+ *
39
+ * ```tsx
40
+ * import { Label } from "@ostack.tech/ui";
41
+ *
42
+ * function FullNameLabel() {
43
+ * return <Label>Full name</Label>;
44
+ * }
45
+ * ```
46
+ */
47
+ export declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
@@ -0,0 +1 @@
1
+ export * from "./Label.tsx";
@@ -0,0 +1,58 @@
1
+ import * as React from "react";
2
+ import { type AccentColor } from "../../utils/accent.ts";
3
+ import { Icon, type IconProp } from "../Icon";
4
+ /** Link variants. */
5
+ export type LinkVariant = "default" | "alert";
6
+ /** Link colours. */
7
+ export type LinkColor = AccentColor;
8
+ /** Properties of the link component. */
9
+ export interface LinkProps extends React.ComponentPropsWithoutRef<"a"> {
10
+ /**
11
+ * Change the component to the HTML tag or custom component of the only child.
12
+ * This will merge the original component props with the props of the supplied
13
+ * element/component and change the underlying DOM node.
14
+ */
15
+ asChild?: boolean;
16
+ /**
17
+ * Colour of the link.
18
+ *
19
+ * @default primary
20
+ */
21
+ color?: LinkColor;
22
+ /**
23
+ * Link variant. Defaults to `"default"`, unless when rendered within an
24
+ * `Alert`, in which case the `"alert"` variant is used.
25
+ *
26
+ * @default default
27
+ */
28
+ variant?: LinkVariant;
29
+ /**
30
+ * Marks this link as external, making it open in a new tab (it sets both
31
+ * `target="_blank"` and `rel="noopener noreferrer"`).
32
+ *
33
+ * If a `Referer` header should be included when navigating, then the `rel`
34
+ * attribute should be overriden to simply `rel="noopener"`.
35
+ */
36
+ external?: boolean;
37
+ /** Link icon. By default, only `external` links have an icon. */
38
+ icon?: IconProp | null;
39
+ /** Properties to pass to the icon component. */
40
+ iconProps?: Omit<React.ComponentPropsWithRef<typeof Icon>, "icon">;
41
+ }
42
+ /**
43
+ * The link component, with its `href` property, is used to create a hyperlink
44
+ * to web pages, files, email addresses, locations in the same page, or anything
45
+ * else a URL can address. It is built on top of the browser's [`<a>` (anchor)
46
+ * element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a).
47
+ *
48
+ * Example usage:
49
+ *
50
+ * ```tsx
51
+ * import { Link } from "@ostack.tech/ui";
52
+ *
53
+ * function GoBackLink() {
54
+ * return <Link href="../">Go back</Link>;
55
+ * }
56
+ * ```
57
+ */
58
+ export declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { type LinkColor, type LinkVariant } from "./Link.tsx";
3
+ /** Value of the link context. */
4
+ export interface LinkContextValue {
5
+ /** Default colour that the link should use. */
6
+ defaultColor: LinkColor;
7
+ /** Default variant that the link should use. */
8
+ defaultVariant: LinkVariant;
9
+ }
10
+ /** Default value of the link context. */
11
+ export declare const LINK_CONTEXT_DEFAULT_VALUE: LinkContextValue;
12
+ /** Context for links. */
13
+ export declare const LinkContext: React.Context<LinkContextValue>;
14
+ /** Hook providing access to the link context. */
15
+ export declare function useLinkContext(): LinkContextValue;
@@ -0,0 +1 @@
1
+ export * from "./Link.tsx";