@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,19 @@
1
+ import * as React from "react";
2
+ /** Properties of the data table rows per page component. */
3
+ export interface DataTableRowsPerPageProps extends React.ComponentPropsWithoutRef<"div"> {
4
+ /**
5
+ * Options used to set the data table's `limit` (the maximum number of rows
6
+ * shown per page).
7
+ *
8
+ * @default [10, 15, 25, 50]
9
+ */
10
+ limitOptions?: number[];
11
+ /**
12
+ * Function used to render the number of rows per page.
13
+ *
14
+ * @param rows Node representing the number of rows (a select).
15
+ */
16
+ label?: React.ReactNode;
17
+ }
18
+ /** Component displaying a select used to change the number of rows per page. */
19
+ export declare const DataTableRowsPerPage: React.ForwardRefExoticComponent<DataTableRowsPerPageProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ import { Button } from "../Button";
3
+ /** Properties of the data table selection trigger component. */
4
+ export interface DataTableSelectionTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof Button>, "onClick"> {
5
+ /**
6
+ * Whether the button should be displayed when no rows are selected.
7
+ *
8
+ * @default false
9
+ */
10
+ showWhenNoneSelected?: boolean;
11
+ /**
12
+ * Action to run when triggering the action.
13
+ *
14
+ * @param selectedRows Rows currently selected.
15
+ * @param event Original click event.
16
+ */
17
+ onClick: (selectedRows: React.Key[], event: React.MouseEvent) => void;
18
+ children: React.ReactNode;
19
+ }
20
+ /** Trigger used to run an action over selected rows. */
21
+ export declare const DataTableSelectionTrigger: React.ForwardRefExoticComponent<DataTableSelectionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { type DataTablePaginationProps } from "./DataTablePagination.tsx";
3
+ /** Properties of the scrolled data table pagination. */
4
+ export interface PagedDataTablePaginationProps extends React.ComponentPropsWithoutRef<"div">, Pick<DataTablePaginationProps, "rowsRange" | "previousPageButtonLabel" | "nextPageButtonLabel"> {
5
+ }
6
+ /** Pagination component of the scrolled data table. */
7
+ export declare const PagedDataTablePagination: React.ForwardRefExoticComponent<PagedDataTablePaginationProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ /** Body of the data table in "paged" display mode. */
2
+ export declare function PagedDataTableRows<T = unknown>(): import("react/jsx-runtime").JSX.Element[];
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { type DataTablePaginationProps } from "./DataTablePagination.tsx";
3
+ /** Properties of the scrolled data table pagination. */
4
+ export interface ScrolledDataTablePaginationProps extends React.ComponentPropsWithoutRef<"div">, Pick<DataTablePaginationProps, "rowsRange"> {
5
+ }
6
+ /** Pagination component of the scrolled data table. */
7
+ export declare const ScrolledDataTablePagination: React.ForwardRefExoticComponent<ScrolledDataTablePaginationProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,7 @@
1
+ import { type DataTableBodyProps } from "./DataTableBody.tsx";
2
+ /** Properties of the scrolled data table body component. */
3
+ interface ScrolledDataTableRowsProps extends Pick<DataTableBodyProps, "containerRef"> {
4
+ }
5
+ /** Body of the data table in "scrolled" display mode. */
6
+ export declare function ScrolledDataTableRows<T = unknown>({ containerRef, }: ScrolledDataTableRowsProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,4 @@
1
+ import type * as React from "react";
2
+ import { type DataTableProps } from "./DataTable.tsx";
3
+ /** Returns the key of a row. */
4
+ export declare function getRowKey<T = unknown>(row: T, rowKey: DataTableProps<T>["rowKey"]): React.Key;
@@ -0,0 +1,12 @@
1
+ export * from "./DataTable.tsx";
2
+ export * from "./DataTableApi.ts";
3
+ export * from "./DataTableCell.tsx";
4
+ export * from "./DataTableColumn.tsx";
5
+ export * from "./DataTableContent.tsx";
6
+ export { useDataTableColumnLabel, useDataTableColumnLabelId, } from "./DataTableContext.ts";
7
+ export * from "./DataTableFilter.tsx";
8
+ export * from "./DataTablePagination.tsx";
9
+ export * from "./DataTableRow.tsx";
10
+ export * from "./DataTableRowsPerPage.tsx";
11
+ export * from "./DataTableSelectionTrigger.tsx";
12
+ export { DATA_TABLE_SELECTION_COLUMN_WIDTH } from "./useDataTableSelectionColumn.tsx";
@@ -0,0 +1,24 @@
1
+ /** Result of applying the table splice to the visible window. */
2
+ export interface SpliceWindowResult<T = unknown> {
3
+ /** New total number of rows. */
4
+ totalCount: number;
5
+ /**
6
+ * New visible window. If the window didn't change, then this window will be
7
+ * the same object as the one provided, otherwise it will be a new object.
8
+ */
9
+ window: (T | undefined)[];
10
+ }
11
+ /**
12
+ * Applies the splice performed on the table to the window containing the
13
+ * visible rows.
14
+ *
15
+ * @param totalCount Total number of rows.
16
+ * @param offset Window offset.
17
+ * @param limit Window limit.
18
+ * @param window Window of visible rows.
19
+ * @param startIndex Start index of the splice.
20
+ * @param deleted Number of deleted items by the splice.
21
+ * @param added Rows added via splice.
22
+ * @returns The new table count as well as the new visible window.
23
+ */
24
+ export declare function spliceWindow<T = unknown>(totalCount: number, offset: number, limit: number, window: (T | undefined)[], startIndex: number, deleted?: number, added?: number | T[]): SpliceWindowResult<T>;
@@ -0,0 +1,10 @@
1
+ import { type SortDirection } from "../../utils/sorting.ts";
2
+ import { type DataTableColumns } from "./DataTableColumn.tsx";
3
+ /** Filters the provided rows. */
4
+ export declare function filterRows<T>(leafColumns: DataTableColumns<T>, rows: T[], filter: string): T[];
5
+ export declare function filterRows<T>(leafColumns: DataTableColumns<T>, rows: undefined, filter: string): undefined;
6
+ export declare function filterRows<T>(leafColumns: DataTableColumns<T>, rows: T[] | undefined, filter: string): T[] | undefined;
7
+ /** Sorts the provided rows. */
8
+ export declare function sortRows<T>(leafColumns: DataTableColumns<T>, rows: T[], sortBy: string | null, sortDirection: SortDirection | null): T[];
9
+ export declare function sortRows<T>(leafColumns: DataTableColumns<T>, rows: undefined, sortBy: string | null, sortDirection: SortDirection | null): undefined;
10
+ export declare function sortRows<T>(leafColumns: DataTableColumns<T>, rows: T[] | undefined, sortBy: string | null, sortDirection: SortDirection | null): T[] | undefined;
@@ -0,0 +1,4 @@
1
+ import { type DataTableColumn } from "./DataTableColumn.tsx";
2
+ export declare const DATA_TABLE_SELECTION_COLUMN_WIDTH = 42;
3
+ export declare function useDataTableSelectionColumn<T = unknown, TValue = any>(): DataTableColumn<T, TValue> | undefined;
4
+ export declare function useDataTableSelectionColumnId(): string;
@@ -0,0 +1,87 @@
1
+ import { type Locale } from "date-fns";
2
+ import * as React from "react";
3
+ import { DatePicker } from "../DatePicker";
4
+ import { type Input } from "../Input";
5
+ import { PopoverContent } from "../Popover";
6
+ /** Properties of the date input component. */
7
+ export interface DateInputProps extends Omit<React.ComponentPropsWithoutRef<typeof Input>, "defaultValue" | "value" | "onValueChange"> {
8
+ /** Date input's default value. */
9
+ defaultValue?: string | Date | null;
10
+ /** Date input's controlled value. */
11
+ value?: string | Date | null;
12
+ /**
13
+ * Function called whenever the value of the date input changes.
14
+ *
15
+ * @param valueRepresentations Different representations of the date value.
16
+ */
17
+ onValueChange?: (valueRepresentations: DateValueRepresentations) => void;
18
+ /** Minimum date allowed. */
19
+ minDate?: string | Date | null;
20
+ /** Maximum date allowed. */
21
+ maxDate?: string | Date | null;
22
+ /** Minimum month allowed. */
23
+ minMonth?: string | Date | null;
24
+ /** Maximum month allowed. */
25
+ maxMonth?: string | Date | null;
26
+ /** Minimum year allowed. */
27
+ minYear?: number;
28
+ /** Maximum year allowed. */
29
+ maxYear?: number;
30
+ /** `date-fns` locale to format dates and to be used by the date picker. */
31
+ locale?: Locale;
32
+ /**
33
+ * Short format of the date, as supported by
34
+ * [`date-fns`](https://date-fns.org/docs/format), used for the written input
35
+ * text.
36
+ */
37
+ shortFormat?: string;
38
+ /**
39
+ * Full format of the date, as supported by
40
+ * [`date-fns`](https://date-fns.org/docs/format), used to announce the date
41
+ * to assistive technologies.
42
+ */
43
+ fullFormat?: string;
44
+ /** Description of the short format provided to assistive technologies. */
45
+ formatDescription?: string;
46
+ /**
47
+ * Function that should return the label to provide to the button that opens
48
+ * the input's calendar.
49
+ *
50
+ * @param selectedDate Currently selected date.
51
+ * @param editable Whether the calendar is editable.
52
+ */
53
+ calendarButtonLabel?: (selectedDate: string | null, editable: boolean) => string;
54
+ /** Function called whenever the popover's open state changes. */
55
+ onPopoverOpenChange?: (open: boolean) => void;
56
+ /** Properties to pass to the date picker component. */
57
+ datePickerProps?: Omit<React.ComponentPropsWithRef<typeof DatePicker>, "value" | "defaultValue" | "minDate" | "maxDate" | "minMonth" | "maxMonth" | "minYear" | "maxYear" | "locale">;
58
+ /** Properties to pass to the popover content component. */
59
+ popoverContentProps?: React.ComponentPropsWithRef<typeof PopoverContent>;
60
+ }
61
+ /** Representations of the date value. */
62
+ export interface DateValueRepresentations {
63
+ /** Date value as a formatted string. */
64
+ formattedValue: string;
65
+ /** Date value as a date. */
66
+ dateValue: Date | null;
67
+ }
68
+ /**
69
+ * The date input component is used to allow a user to enter a date with the aid
70
+ * of a popover calendar. It is built on top of the `Input`, `Popover`, and
71
+ * `DatePicker` components (and, by extension, the browser's [`<input>`
72
+ * element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input)).
73
+ *
74
+ * For accessibility purposes, date inputs are usually included within a `Field`
75
+ * together with a `Label` and optionally `HelperText` and/or `Feedback`.
76
+ *
77
+ * Example usage:
78
+ *
79
+ * ```tsx
80
+ * import { DateInput } from "@ostack.tech/ui";
81
+ *
82
+ * function DateOfBirth() {
83
+ * return <DateInput placeholder="Enter your date of birth…" />;
84
+ * }
85
+ * ```
86
+ */
87
+ export declare const DateInput: React.ForwardRefExoticComponent<DateInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ export * from "./DateInput.tsx";
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import { Calendar } from "../Calendar";
3
+ /** Properties of the date picker component. */
4
+ export interface DatePickerProps extends React.ComponentPropsWithoutRef<typeof Calendar> {
5
+ /** Default date value. */
6
+ defaultValue?: Date | null;
7
+ /** Controlled selected date value. */
8
+ value?: Date | null;
9
+ /** Action called whenever the date picker's value changes. */
10
+ onChange?: (value: Date | null) => void;
11
+ }
12
+ /**
13
+ * Date picker component built on top of [React
14
+ * DayPicker](https://react-day-picker.js.org) and
15
+ * [Calendar](/docs/ostack-ui-forms-calendar--docs) component, providing an
16
+ * intuitive and easy-to-use interface for selecting a date. It acts as a
17
+ * higher-level abstraction that manages date selection while offering both
18
+ * controlled and uncontrolled usage scenarios.
19
+ *
20
+ * The DatePicker allows users to easily select a date by responding to click
21
+ * events on the calendar days. When a date is clicked, the component updates
22
+ * the selected date and triggers a callback, making it simple to integrate into
23
+ * forms or other applications that need to track a chosen date.
24
+ *
25
+ * For detailed customization options, refer to the Calendar component story.
26
+ */
27
+ export declare function DatePicker({ defaultValue, value: controlledValue, defaultMonth, onChange, onDayClick, ...otherProps }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./DatePicker.tsx";
@@ -0,0 +1,197 @@
1
+ import { type Locale } from "date-fns";
2
+ import * as React from "react";
3
+ import { type ControlStatus, type ControlVariant } from "../../utils/control.ts";
4
+ import { type Responsive } from "../../utils/useResponsiveValues.ts";
5
+ import { CloseButton } from "../CloseButton";
6
+ import { ControlCode } from "../ControlCode";
7
+ import { type DateRange, DateRangePicker } from "../DateRangePicker";
8
+ import { type ShowClearButton } from "../Input";
9
+ import { PopoverAnchor, PopoverContent } from "../Popover";
10
+ import { Spinner } from "../Spinner";
11
+ /** Date-range using strings as dates. */
12
+ export interface StringRange {
13
+ start: string;
14
+ end: string;
15
+ }
16
+ /** Properties of the date-range input component. */
17
+ export interface DateRangeInputProps extends Omit<React.ComponentPropsWithoutRef<"div">, "defaultValue"> {
18
+ /**
19
+ * Date-range input's style variant. Defaults to the default variant unless
20
+ * when rendering inside a table cell (in which it defaults to `"cell"`).
21
+ */
22
+ variant?: ControlVariant;
23
+ /** Sets the status of the date-range input. */
24
+ status?: ControlStatus;
25
+ /** Date-range input code. */
26
+ code?: React.ReactNode;
27
+ /** Default date-range value. */
28
+ defaultValue?: DateRange | StringRange;
29
+ /** Date-range value. */
30
+ value?: DateRange | StringRange;
31
+ /**
32
+ * Function called whenever the value of the date-range input changes.
33
+ *
34
+ * @param valueRepresentations Different representations of the date-range
35
+ * value.
36
+ */
37
+ onValueChange?: (valueRepresentations: DateRangeValueRepresentations) => void;
38
+ /** Sets the control as required. */
39
+ required?: boolean;
40
+ /** Disables the control. */
41
+ disabled?: boolean;
42
+ /** Sets the control as read-only. */
43
+ readOnly?: boolean;
44
+ /** Minimum date allowed. */
45
+ minDate?: string | Date | null;
46
+ /** Maximum date allowed. */
47
+ maxDate?: string | Date | null;
48
+ /** Minimum month allowed. */
49
+ minMonth?: string | Date | null;
50
+ /** Maximum month allowed. */
51
+ maxMonth?: string | Date | null;
52
+ /** Minimum year allowed. */
53
+ minYear?: number;
54
+ /** Maximum year allowed. */
55
+ maxYear?: number;
56
+ /**
57
+ * Adds a spinner to the start/end inputs to indicate activity. Note that it
58
+ * doesn't automatically disable the input.
59
+ *
60
+ * @default false
61
+ */
62
+ loading?: boolean;
63
+ /**
64
+ * Adds a spinner to the start input to indicate activity. Note that it
65
+ * doesn't automatically disable the input.
66
+ *
67
+ * @default loading
68
+ */
69
+ startLoading?: boolean;
70
+ /**
71
+ * Adds a spinner to the end input to indicate activity. Note that it doesn't
72
+ * automatically disable the input.
73
+ *
74
+ * @default loading
75
+ */
76
+ endLoading?: boolean;
77
+ /** Sets the inputs' text align. */
78
+ align?: Responsive<React.CSSProperties["textAlign"]>;
79
+ /** Date-range input's start adornment. */
80
+ startAdornment?: React.ReactNode;
81
+ /** Date-range input's end adornment. */
82
+ endAdornment?: React.ReactNode;
83
+ /**
84
+ * Whether to show buttons to clear the start/end inputs when they have
85
+ * content.
86
+ *
87
+ * @default true
88
+ */
89
+ showClearButtons?: ShowClearButton;
90
+ /** Label of the clear buttons announced to assistive technologies. */
91
+ clearButtonsLabel?: string;
92
+ /** `date-fns` locale to format dates and to be used by the date-range picker. */
93
+ locale?: Locale;
94
+ /**
95
+ * Short format of the dates, as supported by
96
+ * [`date-fns`](https://date-fns.org/docs/format), used for the written input
97
+ * text.
98
+ */
99
+ shortFormat?: string;
100
+ /**
101
+ * Full format of the dates, as supported by
102
+ * [`date-fns`](https://date-fns.org/docs/format), used to announce the dates
103
+ * to assistive technologies.
104
+ */
105
+ fullFormat?: string;
106
+ /** Description of the short format provided to assistive technologies. */
107
+ formatDescription?: string;
108
+ /**
109
+ * Label announced to assistive technologies for the start input (so that the
110
+ * user knows that they are interacting with the start input).
111
+ */
112
+ startInputLabel?: string;
113
+ /**
114
+ * Label announced to assistive technologies for the end input (so that the
115
+ * user knows that they are interacting with the end input).
116
+ */
117
+ endInputLabel?: string;
118
+ /**
119
+ * Function that should return the label to provide to the button that opens
120
+ * the input's calendar.
121
+ *
122
+ * @param selectedDateRange Currently selected date-range.
123
+ * @param editable Whether the calendar is editable.
124
+ */
125
+ calendarButtonLabel?: (selectedDateRange: string | null, editable: boolean) => string;
126
+ /** Placeholder for both start and end inputs. */
127
+ placeholder?: string;
128
+ /** Placeholder for the start input (defaults to `placeholder`). */
129
+ startPlaceholder?: string;
130
+ /** Placeholder for the end input (defaults to `placeholder`). */
131
+ endPlaceholder?: string;
132
+ /** Function called whenever the popover's open state changes. */
133
+ onPopoverOpenChange?: (open: boolean, focusedInput: "start" | "end") => void;
134
+ /**
135
+ * Function called when the focus moves out of the control as a whole.
136
+ *
137
+ * This is useful when there is a need to know when the user stops interacting
138
+ * with the control.
139
+ */
140
+ onBlurToOutside?: (event: React.FocusEvent) => void;
141
+ /** Properties to pass to the code component. */
142
+ codeProps?: React.ComponentPropsWithRef<typeof ControlCode>;
143
+ /** Properties to pass to the popover anchor component. */
144
+ popoverAnchorProps?: React.ComponentPropsWithRef<typeof PopoverAnchor>;
145
+ /** Properties to pass to the start container element. */
146
+ startContainerProps?: React.ComponentPropsWithRef<"div">;
147
+ /** Properties to pass to the end container element. */
148
+ endContainerProps?: React.ComponentPropsWithRef<"div">;
149
+ /** Properties to pass to the input component representing the start date. */
150
+ startInputProps?: React.ComponentPropsWithRef<"input">;
151
+ /** Properties to pass to the input component representing the end date. */
152
+ endInputProps?: React.ComponentPropsWithRef<"input">;
153
+ /** Properties to pass to the button component that clears the start date. */
154
+ startClearButtonProps?: React.ComponentPropsWithRef<typeof CloseButton>;
155
+ /** Properties to pass to the button component that clears the end date. */
156
+ endClearButtonProps?: React.ComponentPropsWithRef<typeof CloseButton>;
157
+ /** Properties to pass to the spinner component. */
158
+ spinnerProps?: Omit<React.ComponentPropsWithRef<typeof Spinner>, "size">;
159
+ /** Properties to pass to the date-range picker component. */
160
+ dateRangePickerProps?: Omit<React.ComponentPropsWithRef<typeof DateRangePicker>, "value" | "defaultValue" | "minDate" | "maxDate" | "minMonth" | "maxMonth" | "minYear" | "maxYear" | "locale">;
161
+ /** Properties to pass to the popover content component. */
162
+ popoverContentProps?: React.ComponentPropsWithRef<typeof PopoverContent>;
163
+ }
164
+ /** Representations of the date-range value. */
165
+ export interface DateRangeValueRepresentations {
166
+ /** Date-range value as formatted strings. */
167
+ formattedValue: StringRange;
168
+ /** Date-range value as dates. */
169
+ dateValue: DateRange;
170
+ }
171
+ /**
172
+ * The date-range input component displays two inputs used to allow a user to
173
+ * specify a date interval with the aid of popover calendars. It is built on top
174
+ * of the `Input`, `Popover`, and `DateRangePicker` components (and, by
175
+ * extension, the browser's [`<input>`
176
+ * element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input)).
177
+ *
178
+ * For accessibility purposes, date-range inputs are usually included within a
179
+ * `Field` together with a `Label` and optionally `HelperText` and/or
180
+ * `Feedback`.
181
+ *
182
+ * Example usage:
183
+ *
184
+ * ```tsx
185
+ * import { DateRangeInput } from "@ostack.tech/ui";
186
+ *
187
+ * function HolidayDates() {
188
+ * return (
189
+ * <DateRangeInput
190
+ * startPlaceholder="Holiday start…"
191
+ * endPlaceholder="Holiday end…"
192
+ * />
193
+ * );
194
+ * }
195
+ * ```
196
+ */
197
+ export declare const DateRangeInput: React.ForwardRefExoticComponent<DateRangeInputProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from "./DateRangeInput.tsx";
@@ -0,0 +1,41 @@
1
+ import * as React from "react";
2
+ import { Calendar } from "../Calendar";
3
+ /** A range of dates from a start date to an end date. */
4
+ export interface DateRange {
5
+ start: Date | null;
6
+ end: Date | null;
7
+ }
8
+ /** Mode specifying which end of the range the user is controlling. */
9
+ export type DateRangePickerSelectionMode = "start" | "end" | "both";
10
+ /** Properties of the date-range picker component. */
11
+ export interface DateRangePickerProps extends React.ComponentPropsWithoutRef<typeof Calendar> {
12
+ /** Default date-range value. */
13
+ defaultValue?: DateRange;
14
+ /** Controlled selected date-range value. */
15
+ value?: DateRange;
16
+ /** Action called whenever the date-range picker's value changes. */
17
+ onChange?: (value: DateRange) => void;
18
+ /**
19
+ * Specifies which end of the range the user is currently attempting to
20
+ * change.
21
+ *
22
+ * @default "both"
23
+ */
24
+ selectionMode?: DateRangePickerSelectionMode;
25
+ }
26
+ /**
27
+ * Date-range picker component built on top of [React
28
+ * DayPicker](https://react-day-picker.js.org) and
29
+ * [Calendar](/docs/ostack-ui-forms-calendar--docs). Unlike the `Calendar`,
30
+ * `DateRangePicker` provides its own default event handlers for date selection.
31
+ * It supports controlled and uncontrolled states, logical constraints to ensure
32
+ * valid ranges, and flexible selection modes for the start, end, or both dates.
33
+ * Interactive hover feedback helps users visualize their selections in
34
+ * real-time.
35
+ *
36
+ * This component doesn’t have dedicated stories as its functionality is covered
37
+ * by [DatePicker](/docs/ostack-ui-forms-date-picker--docs) and `Calendar`
38
+ * stories, avoiding redundancy. Ideal for booking systems, dashboards, and
39
+ * forms, it simplifies workflows requiring precise date range inputs.
40
+ */
41
+ export declare function DateRangePicker({ defaultValue, value: controlledValue, onChange, selectionMode, defaultMonth, modifiers, onDayClick, onDayFocus, onDayMouseEnter, numberOfMonths, ...otherProps }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./DateRangePicker.tsx";
@@ -0,0 +1,68 @@
1
+ import { Dialog as DialogPrimitive } from "radix-ui";
2
+ /**
3
+ * The dialog component displays a “window” overlaid on either the main screen
4
+ * or another dialog window, rendering the content underneath inert.
5
+ *
6
+ * Built on top of the [Radix Dialog
7
+ * primitive](https://www.radix-ui.com/primitives/docs/components/dialog), and
8
+ * the `Card` component.
9
+ *
10
+ * It composes the following subcomponents:
11
+ *
12
+ * - `DialogTrigger`: The button which, when pressed, opens the dialog.
13
+ * - `DialogContent`: Content to display when the dialog is open.
14
+ * - `DialogHeader`: Header section of the dialog.
15
+ * - `DialogTitle`: An accessible title to be announced when the dialog is opened.
16
+ * - `DialogBody`: Body section of the dialog.
17
+ * - `DialogDescription`: An optional accessible description to be announced when
18
+ * the dialog is opened.
19
+ *
20
+ * To hide the description, wrap it within `<VisuallyHidden asChild>`. To remove
21
+ * the description entirely, pass `aria-describedby={undefined}` to the
22
+ * `DialogContent` and omit this component.
23
+ * - `DialogFooter`: Footer section of the dialog.
24
+ * - `DialogClose`: A button which closes the dialog.
25
+ *
26
+ * Example usage:
27
+ *
28
+ * ```tsx
29
+ * import {
30
+ * Button,
31
+ * Dialog,
32
+ * DialogBody,
33
+ * DialogClose,
34
+ * DialogContent,
35
+ * DialogDescription,
36
+ * DialogFooter,
37
+ * DialogHeader,
38
+ * DialogTitle,
39
+ * DialogTrigger,
40
+ * } from "@ostack.tech/ui";
41
+ *
42
+ * function UserSettings() {
43
+ * return (
44
+ * <Dialog>
45
+ * <DialogTrigger>
46
+ * <Button>User settings…</Button>
47
+ * </DialogTrigger>
48
+ *
49
+ * <DialogContent>
50
+ * <DialogHeader>
51
+ * <DialogTitle>User Settings</DialogTitle>
52
+ * </DialogHeader>
53
+ * <DialogBody>
54
+ * <DialogDescription>Edit your user settings:</DialogDescription>
55
+ * …
56
+ * </DialogBody>
57
+ * <DialogFooter>
58
+ * <DialogClose>
59
+ * <Button>Close</Button>
60
+ * </DialogClose>
61
+ * </DialogFooter>
62
+ * </DialogContent>
63
+ * </Dialog>
64
+ * );
65
+ * }
66
+ * ```
67
+ */
68
+ export declare const Dialog: import("react").FC<DialogPrimitive.DialogProps>;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { CardBody } from "../Card";
3
+ /** Properties of the dialog body component. */
4
+ export interface DialogBodyProps extends React.ComponentPropsWithoutRef<typeof CardBody> {
5
+ }
6
+ /** Body section of the dialog. */
7
+ export declare const DialogBody: React.ForwardRefExoticComponent<DialogBodyProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,7 @@
1
+ import { Dialog as DialogPrimitive } from "radix-ui";
2
+ import * as React from "react";
3
+ /** Properties of the dialog close component. */
4
+ export interface DialogCloseProps extends Omit<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>, "asChild"> {
5
+ }
6
+ /** Button which closes the dialog. */
7
+ export declare const DialogClose: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,45 @@
1
+ import { Dialog as DialogPrimitive } from "radix-ui";
2
+ import * as React from "react";
3
+ import { type CardColor, type CardVariant } from "../Card";
4
+ import { Overlay } from "../Overlay";
5
+ /** Dialog content variants. */
6
+ export type DialogContentVariant = CardVariant;
7
+ /** Possible dialog content colors. */
8
+ export type DialogContentColor = CardColor;
9
+ /** Possible dialog content sizes. */
10
+ export type DialogContentSize = "sm" | "md" | "lg" | "xl";
11
+ /** Properties of the dialog content component. */
12
+ export interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
13
+ /**
14
+ * Dialog content variant.
15
+ *
16
+ * @default solid
17
+ */
18
+ variant?: DialogContentVariant;
19
+ /**
20
+ * Whether sections should be merged together, as opposed to them being
21
+ * clearly delimited. By default, each section is clearly delimited via a
22
+ * border or solid background colour.
23
+ *
24
+ * @default false
25
+ */
26
+ mergeSections?: boolean;
27
+ /**
28
+ * Dialog content color.
29
+ *
30
+ * @default neutral
31
+ */
32
+ color?: DialogContentColor;
33
+ /**
34
+ * Size of the dialog content.
35
+ *
36
+ * @default md
37
+ */
38
+ size?: DialogContentSize;
39
+ /** Properties to pass to the portal component. */
40
+ portalProps?: Omit<React.ComponentPropsWithRef<typeof DialogPrimitive.Portal>, "forceMount">;
41
+ /** Properties to pass to the `Overlay` component. */
42
+ overlayProps?: React.ComponentPropsWithRef<typeof Overlay>;
43
+ }
44
+ /** Content to be rendered in the open dialog. */
45
+ export declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,13 @@
1
+ import { Dialog as DialogPrimitive } from "radix-ui";
2
+ import * as React from "react";
3
+ /** Properties of the dialog description component. */
4
+ export interface DialogDescriptionProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description> {
5
+ }
6
+ /**
7
+ * Optional accessible description to be announced when the dialog is opened.
8
+ *
9
+ * To hide the description, wrap it within `<VisuallyHidden asChild>`. To remove
10
+ * the description entirely, pass `aria-describedby={undefined}` to the
11
+ * `DialogContent` and omit this component.
12
+ */
13
+ export declare const DialogDescription: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;