@ostack.tech/ui 0.15.5 → 0.16.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 (259) hide show
  1. package/dist/chunks/{en-Buw2XVWt.js → en-DT1KWQei.js} +2 -2
  2. package/dist/chunks/{en-Buw2XVWt.js.map → en-DT1KWQei.js.map} +1 -1
  3. package/dist/locales/en-GB.js +1 -1
  4. package/dist/locales/en-US.js +1 -1
  5. package/dist/locales/fr-FR.js +1 -1
  6. package/dist/locales/fr-FR.js.map +1 -1
  7. package/dist/locales/pt-PT.js +1 -1
  8. package/dist/locales/pt-PT.js.map +1 -1
  9. package/dist/ostack-ui.css +128 -85
  10. package/dist/ostack-ui.js +2155 -1784
  11. package/dist/ostack-ui.js.map +1 -1
  12. package/package.json +5 -4
  13. package/scss/_utils.scss +0 -2
  14. package/scss/components/Checkbox/_Checkbox-variables.scss +7 -4
  15. package/scss/components/Checkbox/_Checkbox.scss +34 -9
  16. package/scss/components/CheckboxGroup/_CheckboxGroup.scss +9 -0
  17. package/scss/components/Code/_Code-variables.scss +8 -4
  18. package/scss/components/DateRangeInput/_DateRangeInput.scss +1 -1
  19. package/scss/components/Feedback/_Feedback-variables.scss +28 -1
  20. package/scss/components/Feedback/_Feedback.scss +95 -2
  21. package/scss/components/Field/_Field-variables.scss +0 -1
  22. package/scss/components/Field/_Field.scss +4 -40
  23. package/scss/components/HelperText/_HelperText-variables.scss +7 -0
  24. package/scss/components/HelperText/_HelperText.scss +9 -0
  25. package/scss/components/RadioGroup/_Radio.scss +13 -0
  26. package/scss/components/RadioGroup/_RadioGroup.scss +9 -0
  27. package/scss/components/Select/_Select.scss +2 -2
  28. package/scss/index.scss +0 -2
  29. package/scss/scss/placeholders/button/_button.scss +10 -6
  30. package/scss/scss/placeholders/checkable/_checkable-variables.scss +3 -2
  31. package/scss/scss/placeholders/checkable/_checkable.scss +25 -7
  32. package/scss/scss/placeholders/checkable-group/_checkable-group-variables.scss +1 -0
  33. package/scss/scss/placeholders/checkable-group/_checkable-group.scss +15 -3
  34. package/scss/scss/placeholders/popover/_popover.scss +3 -0
  35. package/scss/scss/utils/_breakpoints.scss +1 -1
  36. package/scss/scss/utils/_declare-var.scss +1 -1
  37. package/types/components/Alert/Alert.d.ts +12 -15
  38. package/types/components/Alert/AlertTitle.d.ts +2 -2
  39. package/types/components/AlertDialog/AlertDialog.d.ts +6 -2
  40. package/types/components/AlertDialog/AlertDialogAction.d.ts +3 -3
  41. package/types/components/AlertDialog/AlertDialogBody.d.ts +3 -5
  42. package/types/components/AlertDialog/AlertDialogCancel.d.ts +3 -3
  43. package/types/components/AlertDialog/AlertDialogContent.d.ts +6 -6
  44. package/types/components/AlertDialog/AlertDialogDescription.d.ts +3 -3
  45. package/types/components/AlertDialog/AlertDialogFooter.d.ts +3 -5
  46. package/types/components/AlertDialog/AlertDialogHeader.d.ts +3 -4
  47. package/types/components/AlertDialog/AlertDialogTitle.d.ts +4 -4
  48. package/types/components/AlertDialog/AlertDialogTrigger.d.ts +3 -3
  49. package/types/components/Button/Button.d.ts +14 -15
  50. package/types/components/ButtonGroup/ButtonGroup.d.ts +3 -3
  51. package/types/components/Calendar/Calendar.d.ts +6 -6
  52. package/types/components/Calendar/CalendarDay.d.ts +1 -1
  53. package/types/components/Calendar/CalendarHeader.d.ts +1 -1
  54. package/types/components/Calendar/CalendarMonthGrid.d.ts +1 -1
  55. package/types/components/Card/Card.d.ts +3 -3
  56. package/types/components/Card/CardBody.d.ts +3 -3
  57. package/types/components/Card/CardFooter.d.ts +3 -3
  58. package/types/components/Card/CardHeader.d.ts +3 -3
  59. package/types/components/Card/CardTitle.d.ts +3 -3
  60. package/types/components/Checkbox/Checkbox.d.ts +22 -14
  61. package/types/components/CheckboxGroup/CheckboxGroup.d.ts +22 -12
  62. package/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +15 -9
  63. package/types/components/CheckboxGroup/checkboxGroupUtils.d.ts +3 -0
  64. package/types/components/ClearContexts/ClearContexts.d.ts +19 -1
  65. package/types/components/CloseButton/CloseButton.d.ts +3 -4
  66. package/types/components/Code/Code.d.ts +3 -3
  67. package/types/components/Collapsible/Collapsible.d.ts +5 -3
  68. package/types/components/Collapsible/CollapsibleContent.d.ts +3 -3
  69. package/types/components/Collapsible/CollapsibleTrigger.d.ts +5 -5
  70. package/types/components/CommandMenu/CommandMenu.d.ts +18 -20
  71. package/types/components/CommandMenu/CommandMenuDialog.d.ts +6 -6
  72. package/types/components/CommandMenu/CommandMenuGroup.d.ts +3 -3
  73. package/types/components/CommandMenu/CommandMenuItem.d.ts +5 -3
  74. package/types/components/Container/Container.d.ts +3 -3
  75. package/types/components/Control/Control.d.ts +13 -13
  76. package/types/components/Control/ControlWithContainerRef.d.ts +12 -5
  77. package/types/components/Control/controlUtils.d.ts +24 -0
  78. package/types/components/ControlAddon/ControlAddon.d.ts +9 -3
  79. package/types/components/ControlCode/ControlCode.d.ts +3 -3
  80. package/types/components/DataTable/DataTable.d.ts +32 -21
  81. package/types/components/DataTable/DataTableBody.d.ts +4 -4
  82. package/types/components/DataTable/DataTableCell.d.ts +6 -4
  83. package/types/components/DataTable/DataTableColumn.d.ts +32 -11
  84. package/types/components/DataTable/DataTableColumnGroup.d.ts +31 -0
  85. package/types/components/DataTable/DataTableColumns.d.ts +14 -0
  86. package/types/components/DataTable/DataTableContent.d.ts +8 -8
  87. package/types/components/DataTable/DataTableContext.d.ts +7 -6
  88. package/types/components/DataTable/DataTableFilter.d.ts +1 -1
  89. package/types/components/DataTable/DataTableFoot.d.ts +6 -4
  90. package/types/components/DataTable/DataTableHead.d.ts +3 -4
  91. package/types/components/DataTable/DataTablePagination.d.ts +6 -6
  92. package/types/components/DataTable/DataTableRow.d.ts +3 -4
  93. package/types/components/DataTable/DataTableRowsPerPage.d.ts +3 -3
  94. package/types/components/DataTable/DataTableSelectionTrigger.d.ts +4 -4
  95. package/types/components/DataTable/PagedDataTablePagination.d.ts +3 -3
  96. package/types/components/DataTable/ScrolledDataTablePagination.d.ts +3 -3
  97. package/types/components/DataTable/__tests__/spliceWindow.test.d.ts +1 -0
  98. package/types/components/DataTable/columnUtils.d.ts +4 -3
  99. package/types/components/DataTable/index.d.ts +2 -0
  100. package/types/components/DataTable/processRows.d.ts +7 -7
  101. package/types/components/DataTable/sanitizeProps.d.ts +2 -2
  102. package/types/components/DataTable/useDataTableSelectionColumn.d.ts +2 -2
  103. package/types/components/DateInput/DateInput.d.ts +27 -18
  104. package/types/components/DateRangeInput/DateRangeInput.d.ts +37 -24
  105. package/types/components/DescriptionList/DescriptionList.d.ts +4 -4
  106. package/types/components/DescriptionList/DescriptionListItem.d.ts +4 -4
  107. package/types/components/Dialog/Dialog.d.ts +5 -1
  108. package/types/components/Dialog/DialogBody.d.ts +3 -4
  109. package/types/components/Dialog/DialogClose.d.ts +3 -3
  110. package/types/components/Dialog/DialogContent.d.ts +6 -6
  111. package/types/components/Dialog/DialogDescription.d.ts +3 -3
  112. package/types/components/Dialog/DialogFooter.d.ts +3 -4
  113. package/types/components/Dialog/DialogHeader.d.ts +5 -6
  114. package/types/components/Dialog/DialogTitle.d.ts +4 -4
  115. package/types/components/Dialog/DialogTrigger.d.ts +3 -3
  116. package/types/components/DropdownMenu/DropdownMenu.d.ts +4 -4
  117. package/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +5 -5
  118. package/types/components/DropdownMenu/DropdownMenuContent.d.ts +7 -7
  119. package/types/components/DropdownMenu/DropdownMenuGroup.d.ts +3 -3
  120. package/types/components/DropdownMenu/DropdownMenuItem.d.ts +4 -4
  121. package/types/components/DropdownMenu/DropdownMenuRadioGroup.d.ts +3 -3
  122. package/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -4
  123. package/types/components/DropdownMenu/DropdownMenuSub.d.ts +4 -0
  124. package/types/components/DropdownMenu/DropdownMenuSubContent.d.ts +5 -5
  125. package/types/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +3 -3
  126. package/types/components/DropdownMenu/DropdownMenuTrigger.d.ts +3 -3
  127. package/types/components/ErrorBoundary/ErrorBoundary.d.ts +9 -9
  128. package/types/components/Feedback/Feedback.d.ts +3 -3
  129. package/types/components/Feedback/FeedbackContext.d.ts +46 -0
  130. package/types/components/Feedback/FeedbackList.d.ts +6 -0
  131. package/types/components/Feedback/FeedbackListContext.d.ts +2 -0
  132. package/types/components/{FeedbackPopover → Feedback}/FeedbackPopover.d.ts +7 -7
  133. package/types/components/Feedback/FeedbackProvider.d.ts +13 -0
  134. package/types/components/Feedback/feedbackUtils.d.ts +19 -0
  135. package/types/components/Feedback/index.d.ts +4 -0
  136. package/types/components/Field/Field.d.ts +3 -3
  137. package/types/components/Field/FieldContext.d.ts +2 -70
  138. package/types/components/Field/fieldUtils.d.ts +7 -0
  139. package/types/components/Field/index.d.ts +1 -2
  140. package/types/components/FieldGroup/FieldGroup.d.ts +3 -3
  141. package/types/components/FieldGroup/FieldGroupBody.d.ts +3 -3
  142. package/types/components/FieldGroup/FieldGroupHeader.d.ts +4 -4
  143. package/types/components/FieldGroup/FieldGroupTitle.d.ts +2 -2
  144. package/types/components/Form/Form.d.ts +6 -6
  145. package/types/components/Form/FormContext.d.ts +1 -1
  146. package/types/components/Form/FormReset.d.ts +2 -2
  147. package/types/components/Form/FormSubmit.d.ts +2 -2
  148. package/types/components/Form/HiddenFormControl.d.ts +2 -2
  149. package/types/components/Form/useRegisterFormControl.d.ts +1 -1
  150. package/types/components/Grid/Grid.d.ts +4 -4
  151. package/types/components/Grid/GridContext.d.ts +10 -0
  152. package/types/components/Heading/Heading.d.ts +2 -2
  153. package/types/components/HelperText/HelperText.d.ts +3 -3
  154. package/types/components/HelperText/HelperTextContext.d.ts +38 -0
  155. package/types/components/HelperText/HelperTextProvider.d.ts +13 -0
  156. package/types/components/HelperText/helperTextUtils.d.ts +2 -0
  157. package/types/components/HelperText/index.d.ts +2 -0
  158. package/types/components/Icon/Icon.d.ts +3 -3
  159. package/types/components/IconButton/IconButton.d.ts +17 -17
  160. package/types/components/Input/Input.d.ts +1 -1
  161. package/types/components/Keybinds/Keybinds.d.ts +8 -3
  162. package/types/components/Keyboard/Keyboard.d.ts +3 -3
  163. package/types/components/Label/Label.d.ts +14 -14
  164. package/types/components/Label/LabelContext.d.ts +45 -0
  165. package/types/components/Label/LabelProvider.d.ts +13 -0
  166. package/types/components/Label/index.d.ts +2 -0
  167. package/types/components/Label/labelUtils.d.ts +23 -0
  168. package/types/components/Layer/Layer.d.ts +5 -5
  169. package/types/components/Link/Link.d.ts +4 -5
  170. package/types/components/Mark/Mark.d.ts +3 -3
  171. package/types/components/MenuList/MenuList.d.ts +3 -3
  172. package/types/components/MenuList/MenuListGroup.d.ts +5 -5
  173. package/types/components/MenuList/MenuListItem.d.ts +13 -14
  174. package/types/components/NumericInput/NumericInput.d.ts +5 -5
  175. package/types/components/NumericInput/numericInputUtils.d.ts +2 -2
  176. package/types/components/Output/Output.d.ts +2 -2
  177. package/types/components/Overlay/Overlay.d.ts +3 -3
  178. package/types/components/Popover/Popover.d.ts +4 -0
  179. package/types/components/Popover/PopoverAnchor.d.ts +4 -0
  180. package/types/components/Popover/PopoverClose.d.ts +5 -5
  181. package/types/components/Popover/PopoverContent.d.ts +5 -5
  182. package/types/components/Popover/PopoverTrigger.d.ts +3 -3
  183. package/types/components/Portal/Portal.d.ts +3 -3
  184. package/types/components/Printer/Printer.d.ts +1 -1
  185. package/types/components/Printer/PrinterContent.d.ts +5 -5
  186. package/types/components/Printer/PrinterTrigger.d.ts +4 -4
  187. package/types/components/RadioGroup/Radio.d.ts +23 -13
  188. package/types/components/RadioGroup/RadioGroup.d.ts +19 -16
  189. package/types/components/Root/Root.d.ts +9 -9
  190. package/types/components/Root/RootElement.d.ts +3 -3
  191. package/types/components/Select/Option.d.ts +3 -4
  192. package/types/components/Select/OptionsGroup.d.ts +3 -4
  193. package/types/components/Select/Select.d.ts +17 -13
  194. package/types/components/Select/SelectContext.d.ts +6 -12
  195. package/types/components/Select/SelectNative.d.ts +3 -3
  196. package/types/components/Select/selectUtils.d.ts +3 -0
  197. package/types/components/Separator/Separator.d.ts +3 -3
  198. package/types/components/Slot/Slot.d.ts +5 -0
  199. package/types/components/Slot/Slottable.d.ts +2 -2
  200. package/types/components/Spinner/Spinner.d.ts +3 -3
  201. package/types/components/Stack/Stack.d.ts +4 -4
  202. package/types/components/Stack/StackContext.d.ts +9 -0
  203. package/types/components/Stepper/Step.d.ts +6 -6
  204. package/types/components/Stepper/StepContent.d.ts +5 -5
  205. package/types/components/Stepper/StepList.d.ts +3 -3
  206. package/types/components/Stepper/Stepper.d.ts +6 -6
  207. package/types/components/Stepper/StepperFinishTrigger.d.ts +5 -5
  208. package/types/components/Stepper/StepperNextTrigger.d.ts +5 -5
  209. package/types/components/Stepper/StepperPreviousTrigger.d.ts +5 -5
  210. package/types/components/Table/Table.d.ts +15 -10
  211. package/types/components/Table/TableBody.d.ts +3 -3
  212. package/types/components/Table/TableCell.d.ts +3 -3
  213. package/types/components/Table/TableColumn.d.ts +29 -21
  214. package/types/components/Table/TableColumnGroup.d.ts +38 -0
  215. package/types/components/Table/TableContext.d.ts +1 -1
  216. package/types/components/Table/TableFoot.d.ts +3 -3
  217. package/types/components/Table/TableHead.d.ts +15 -7
  218. package/types/components/Table/TableRow.d.ts +3 -3
  219. package/types/components/Table/columnUtils.d.ts +11 -17
  220. package/types/components/Table/index.d.ts +1 -0
  221. package/types/components/Tabs/Tab.d.ts +7 -7
  222. package/types/components/Tabs/TabContent.d.ts +4 -4
  223. package/types/components/Tabs/TabList.d.ts +8 -8
  224. package/types/components/Tabs/Tabs.d.ts +8 -6
  225. package/types/components/Tag/Badge.d.ts +2 -2
  226. package/types/components/Tag/Tag.d.ts +10 -10
  227. package/types/components/TextArea/TextArea.d.ts +2 -2
  228. package/types/components/Toast/Toast.d.ts +13 -13
  229. package/types/components/Toast/ToastDescription.d.ts +4 -0
  230. package/types/components/Toast/ToastProvider.d.ts +2 -2
  231. package/types/components/Toast/ToastTitle.d.ts +3 -3
  232. package/types/components/Toast/ToastViewport.d.ts +3 -3
  233. package/types/components/Tooltip/Tooltip.d.ts +5 -5
  234. package/types/components/Tooltip/TooltipProvider.d.ts +4 -0
  235. package/types/components/VisuallyHidden/VisuallyHidden.d.ts +2 -2
  236. package/types/index.d.ts +1 -2
  237. package/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +12 -12
  238. package/types/providers/ErrorReportingProvider/ErrorReportingProvider.d.ts +1 -1
  239. package/types/providers/LocalizationProvider/LocalizationObject.d.ts +2 -3
  240. package/types/providers/ToastManagerProvider/ToastManagerContext.d.ts +6 -6
  241. package/types/utils/__tests__/combineEventHandlers.test.d.ts +1 -0
  242. package/types/utils/__tests__/cx.test.d.ts +1 -0
  243. package/types/utils/__tests__/numericStringUtils.test.d.ts +1 -0
  244. package/types/utils/__tests__/useNumericTrasformer.test.d.ts +1 -0
  245. package/types/utils/documentTitleUtils.d.ts +4 -0
  246. package/types/utils/parseChildren.d.ts +64 -0
  247. package/types/utils/polymorphicTypes.d.ts +2 -13
  248. package/types/utils/useLocation.d.ts +3 -3
  249. package/types/utils/useNumericTransformer.d.ts +9 -6
  250. package/scss/components/FeedbackList/_FeedbackList-variables.scss +0 -6
  251. package/scss/components/FeedbackList/_FeedbackList.scss +0 -32
  252. package/scss/components/FeedbackPopover/_FeedbackPopover-variables.scss +0 -26
  253. package/scss/components/FeedbackPopover/_FeedbackPopover.scss +0 -66
  254. package/types/components/FeedbackList/FeedbackList.d.ts +0 -6
  255. package/types/components/FeedbackList/FeedbackListContext.d.ts +0 -4
  256. package/types/components/FeedbackList/index.d.ts +0 -2
  257. package/types/components/FeedbackPopover/index.d.ts +0 -2
  258. package/types/components/Field/FieldProvider.d.ts +0 -13
  259. /package/types/components/{FeedbackPopover → Feedback}/FeedbackPopoverContext.d.ts +0 -0
@@ -1,10 +1,10 @@
1
1
  import { Popover as PopoverPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef } from "react";
2
+ import type { ComponentProps } from "react";
3
3
  /** Properties of the popover trigger component. */
4
- export interface PopoverTriggerProps extends Omit<ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>, "asChild"> {
4
+ export interface PopoverTriggerProps extends Omit<ComponentProps<typeof PopoverPrimitive.Trigger>, "asChild"> {
5
5
  }
6
6
  /**
7
7
  * The button that toggles the popover. By default, the `PopoverContent` will
8
8
  * position itself against the trigger.
9
9
  */
10
- export declare const PopoverTrigger: import("react").ForwardRefExoticComponent<PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
10
+ export declare function PopoverTrigger(props: PopoverTriggerProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { Portal as PortalPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef } from "react";
2
+ import type { ComponentProps } from "react";
3
3
  /** Properties of the portal component. */
4
- export interface PortalProps extends ComponentPropsWithoutRef<typeof PortalPrimitive.Root> {
4
+ export interface PortalProps extends ComponentProps<typeof PortalPrimitive.Root> {
5
5
  }
6
6
  /**
7
7
  * Portal component used to render a React subtree in a different part of the
@@ -10,4 +10,4 @@ export interface PortalProps extends ComponentPropsWithoutRef<typeof PortalPrimi
10
10
  * The rendered subtree is automatically wrapped in a `Root` component, so that
11
11
  * styles are rendered correctly.
12
12
  */
13
- export declare const Portal: import("react").ForwardRefExoticComponent<PortalProps & import("react").RefAttributes<HTMLDivElement>>;
13
+ export declare function Portal({ asChild, children, ...otherProps }: PortalProps): import("react").JSX.Element;
@@ -92,7 +92,7 @@ export interface PrinterProps extends PrintOptions {
92
92
  * @param event Before print event. Calling `event.preventDefault()` will
93
93
  * prevent printing from occurring.
94
94
  */
95
- onBeforePrint?: (event: Event) => void | Promise<void>;
95
+ onBeforePrint?: (event: Event) => void | PromiseLike<void>;
96
96
  /**
97
97
  * Function called after printing finishes.
98
98
  *
@@ -1,7 +1,7 @@
1
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
2
- import { Portal } from "../Portal";
1
+ import { type ComponentProps } from "react";
2
+ import { type PortalProps } from "../Portal";
3
3
  /** Properties of the printer content. */
4
- export interface PrinterContentProps extends ComponentPropsWithoutRef<"div"> {
4
+ export interface PrinterContentProps extends ComponentProps<"div"> {
5
5
  /**
6
6
  * Change the component to the HTML tag or custom component of the only child.
7
7
  * This will merge the original component props with the props of the supplied
@@ -11,7 +11,7 @@ export interface PrinterContentProps extends ComponentPropsWithoutRef<"div"> {
11
11
  /** Whether the provided `children` should only be rendered while printing. */
12
12
  printOnly?: boolean;
13
13
  /** Container of the portal. */
14
- portalContainer?: ComponentPropsWithRef<typeof Portal>["container"];
14
+ portalContainer?: PortalProps["container"];
15
15
  }
16
16
  /**
17
17
  * Content to be printed.
@@ -19,4 +19,4 @@ export interface PrinterContentProps extends ComponentPropsWithoutRef<"div"> {
19
19
  * All “element” properties provided to this component will be forwarded to a
20
20
  * wrapper element which **only** exists during printing.
21
21
  */
22
- export declare const PrinterContent: import("react").ForwardRefExoticComponent<PrinterContentProps & import("react").RefAttributes<HTMLDivElement>>;
22
+ export declare function PrinterContent({ asChild, printOnly, portalContainer, className, children, ref, ...otherProps }: PrinterContentProps): import("react").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactElement } from "react";
1
+ import type { ComponentProps, ReactElement } from "react";
2
2
  /** Properties of the printer trigger. */
3
- export interface PrinterTriggerProps extends ComponentPropsWithoutRef<"button"> {
3
+ export interface PrinterTriggerProps extends ComponentProps<"button"> {
4
4
  /**
5
5
  * By default, the trigger will be hidden while printing, even when inside the
6
6
  * print content. Set this to `true` to show it.
@@ -8,7 +8,7 @@ export interface PrinterTriggerProps extends ComponentPropsWithoutRef<"button">
8
8
  * @default false
9
9
  */
10
10
  showWhenPrinting?: boolean;
11
- children: ReactElement<ComponentPropsWithRef<"button">>;
11
+ children: ReactElement<ComponentProps<"button">>;
12
12
  }
13
13
  /**
14
14
  * Trigger to print the content of the printer. The provided `children` should
@@ -17,4 +17,4 @@ export interface PrinterTriggerProps extends ComponentPropsWithoutRef<"button">
17
17
  * This trigger will **not** show in the print, even when inside the print
18
18
  * content, unless `showWhenPrinting` is set to `true`.
19
19
  */
20
- export declare const PrinterTrigger: import("react").ForwardRefExoticComponent<PrinterTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
20
+ export declare function PrinterTrigger({ showWhenPrinting, className, onClick, ref, ...otherProps }: PrinterTriggerProps): import("react").JSX.Element;
@@ -1,25 +1,29 @@
1
1
  import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from "react";
2
+ import { type ComponentProps, type ReactNode } from "react";
3
3
  import { type ControlStatus } from "../Control";
4
- import { ControlCode } from "../ControlCode";
5
- import { Label } from "../Label";
6
- import { Spinner } from "../Spinner";
4
+ import { type ControlCodeProps } from "../ControlCode";
5
+ import { type LabelProps } from "../Label";
6
+ import { type SpinnerProps } from "../Spinner";
7
7
  /** Properties of a radio component. */
8
- export interface RadioProps extends Omit<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, "value"> {
8
+ export interface RadioProps extends Omit<ComponentProps<typeof RadioGroupPrimitive.Item>, "value"> {
9
9
  /** Radio value. */
10
- value?: ComponentPropsWithoutRef<"input">["value"];
10
+ value?: ComponentProps<"input">["value"];
11
11
  /** Sets the status of the radio. */
12
12
  status?: ControlStatus;
13
13
  /** Radio code. */
14
14
  code?: ReactNode;
15
15
  /** Sets the radio as read-only. */
16
16
  readOnly?: boolean;
17
+ /** Radio start adornment. */
18
+ startAdornment?: ReactNode;
19
+ /** Radio end adornment. */
20
+ endAdornment?: ReactNode;
17
21
  /**
18
22
  * Renders the radio in a **loading** state.
19
23
  *
20
24
  * When `true`, the radio is “soft-disabled”: it looks disabled and ignores
21
25
  * user interaction but remains focusable. By default, a spinner is shown
22
- * (_i.e._, `showSpinner` is set to `true` unless overridden).
26
+ * (i.e. `showSpinner` is set to `true` unless overridden).
23
27
  *
24
28
  * The radio's accessible description while loading can be controlled via
25
29
  * `loadingDescription`.
@@ -46,15 +50,21 @@ export interface RadioProps extends Omit<ComponentPropsWithoutRef<typeof RadioGr
46
50
  */
47
51
  showSpinner?: boolean;
48
52
  /** Properties to pass to the root component. */
49
- rootProps?: ComponentPropsWithRef<"div">;
53
+ rootProps?: ComponentProps<"div">;
54
+ /** Properties to pass to the container component. */
55
+ containerProps?: ComponentProps<"div">;
56
+ /** Properties to pass to the start container element. */
57
+ startContainerProps?: ComponentProps<"div">;
58
+ /** Properties to pass to the end container element. */
59
+ endContainerProps?: ComponentProps<"div">;
50
60
  /** Properties to pass to the code component. */
51
- codeProps?: ComponentPropsWithRef<typeof ControlCode>;
61
+ codeProps?: ControlCodeProps;
52
62
  /** Properties to pass to the indicator component. */
53
- indicatorProps?: ComponentPropsWithRef<typeof RadioGroupPrimitive.Indicator>;
63
+ indicatorProps?: ComponentProps<typeof RadioGroupPrimitive.Indicator>;
54
64
  /** Properties to pass to the label component. */
55
- labelProps?: ComponentPropsWithRef<typeof Label>;
65
+ labelProps?: LabelProps;
56
66
  /** Properties to pass to the spinner component. */
57
- spinnerProps?: Omit<ComponentPropsWithRef<typeof Spinner>, "size">;
67
+ spinnerProps?: Omit<SpinnerProps, "size">;
58
68
  }
59
69
  /** Radio component. Must be used within a radio group. */
60
- export declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLButtonElement>>;
70
+ export declare function Radio({ value, status, code, loading, loadingDescription, showSpinner, children, rootProps, codeProps, indicatorProps, labelProps, spinnerProps, id, disabled, readOnly, startAdornment, endAdornment, containerProps, startContainerProps, endContainerProps, onClick, className, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ref, ...otherProps }: RadioProps): import("react").JSX.Element;
@@ -1,13 +1,13 @@
1
1
  import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type FocusEvent, type ReactNode } from "react";
3
- import { CloseButton } from "../CloseButton";
2
+ import { type ComponentProps, type FocusEvent, type ReactNode } from "react";
3
+ import { type CloseButtonProps } from "../CloseButton";
4
4
  import { type ControlShowClearButton, type ControlStatus, type ControlVariant } from "../Control";
5
- import { ControlCode } from "../ControlCode";
5
+ import { type ControlCodeProps } from "../ControlCode";
6
6
  import type { FormValidationMode } from "../Form";
7
7
  import { type FormControlValidateFn } from "../Form/useRegisterFormControl.ts";
8
- import { Spinner } from "../Spinner";
8
+ import { type SpinnerProps } from "../Spinner";
9
9
  /** Properties of the radio group component. */
10
- export interface RadioGroupProps extends Omit<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, "asChild" | "onValueChange"> {
10
+ export interface RadioGroupProps extends Omit<ComponentProps<typeof RadioGroupPrimitive.Root>, "asChild" | "onValueChange"> {
11
11
  /** Whether to display the radio group inline. */
12
12
  inline?: boolean;
13
13
  /**
@@ -24,7 +24,7 @@ export interface RadioGroupProps extends Omit<ComponentPropsWithoutRef<typeof Ra
24
24
  *
25
25
  * When `true`, the radio group is “soft-disabled”: it looks disabled and
26
26
  * ignores user interaction but remains focusable. By default, a spinner is
27
- * shown (_i.e._, `showSpinner` is set to `true` unless overridden).
27
+ * shown (i.e. `showSpinner` is set to `true` unless overridden).
28
28
  *
29
29
  * The radio group's accessible description while loading can be controlled
30
30
  * via `loadingDescription`.
@@ -67,6 +67,10 @@ export interface RadioGroupProps extends Omit<ComponentPropsWithoutRef<typeof Ra
67
67
  clearButtonLabel?: string;
68
68
  /** Function called when the value of the radio group changes. */
69
69
  onValueChange?: (value: string | null) => void;
70
+ /** Radio group's start adornment. */
71
+ startAdornment?: ReactNode;
72
+ /** Radio group's end adornment. */
73
+ endAdornment?: ReactNode;
70
74
  /**
71
75
  * Function called when the focus moves out of the control as a whole.
72
76
  *
@@ -85,18 +89,17 @@ export interface RadioGroupProps extends Omit<ComponentPropsWithoutRef<typeof Ra
85
89
  */
86
90
  validationMode?: FormValidationMode;
87
91
  /** Properties to pass to the code component. */
88
- codeProps?: ComponentPropsWithRef<typeof ControlCode>;
92
+ codeProps?: ControlCodeProps;
89
93
  /** Properties to pass to the container component. */
90
- containerProps?: ComponentPropsWithRef<"div">;
91
- /**
92
- * Properties to pass to the end element containing the clear button and
93
- * spinner.
94
- */
95
- endContainerProps?: ComponentPropsWithRef<"div">;
94
+ containerProps?: ComponentProps<"div">;
95
+ /** Properties to pass to the start container element. */
96
+ startContainerProps?: ComponentProps<"div">;
97
+ /** Properties to pass to the end container element. */
98
+ endContainerProps?: ComponentProps<"div">;
96
99
  /** Properties to pass to the clear button component. */
97
- clearButtonProps?: ComponentPropsWithRef<typeof CloseButton>;
100
+ clearButtonProps?: CloseButtonProps;
98
101
  /** Properties to pass to the spinner component. */
99
- spinnerProps?: Omit<ComponentPropsWithRef<typeof Spinner>, "size">;
102
+ spinnerProps?: Omit<SpinnerProps, "size">;
100
103
  }
101
104
  /**
102
105
  * The `RadioGroup` component displays a set of `Radio` button components,
@@ -122,4 +125,4 @@ export interface RadioGroupProps extends Omit<ComponentPropsWithoutRef<typeof Ra
122
125
  * }
123
126
  * ```
124
127
  */
125
- export declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
128
+ export declare function RadioGroup({ defaultValue, value: controlledValue, onValueChange, inline, variant, status, loading, loadingDescription, showSpinner, code, showClearButton, clearDescription, clearButtonLabel, onBlurToOutside, validate, validationMode, startAdornment, endAdornment, codeProps, containerProps, startContainerProps, endContainerProps, clearButtonProps, spinnerProps, id, name, required, disabled, readOnly, className, children, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ref, ...otherProps }: RadioGroupProps): import("react").JSX.Element;
@@ -1,11 +1,11 @@
1
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
2
- import { DocumentTitleProvider } from "../../providers/DocumentTitleProvider";
3
- import { ErrorReportingProvider } from "../../providers/ErrorReportingProvider";
1
+ import type { ComponentProps } from "react";
2
+ import { type DocumentTitleProviderProps } from "../../providers/DocumentTitleProvider";
3
+ import { type ErrorReportingProviderProps } from "../../providers/ErrorReportingProvider";
4
4
  import type { LocalizationObject } from "../../providers/LocalizationProvider";
5
- import type { ErrorBoundary } from "../ErrorBoundary";
5
+ import type { ErrorBoundaryProps } from "../ErrorBoundary";
6
6
  import { type ToastSwipeDirection, type ToastViewportPosition } from "../Toast";
7
7
  /** Properties of the ostack/UI root component. */
8
- export interface RootProps extends ComponentPropsWithoutRef<"div">, Pick<ComponentPropsWithoutRef<typeof ErrorReportingProvider>, "reportError" | "errorReportingUrl" | "errorReportingMethod" | "encodeErrorReport" | "encodedErrorReportMimeType" | "errorReportingOptions">, Pick<ComponentPropsWithoutRef<typeof DocumentTitleProvider>, "baseDocumentTitle"> {
8
+ export interface RootProps extends ComponentProps<"div">, Pick<ErrorReportingProviderProps, "reportError" | "errorReportingUrl" | "errorReportingMethod" | "encodeErrorReport" | "encodedErrorReportMimeType" | "errorReportingOptions">, Pick<DocumentTitleProviderProps, "baseDocumentTitle"> {
9
9
  /**
10
10
  * Change the component to the HTML tag or custom component of the only child.
11
11
  * This will merge the original component props with the props of the supplied
@@ -13,7 +13,7 @@ export interface RootProps extends ComponentPropsWithoutRef<"div">, Pick<Compone
13
13
  */
14
14
  asChild?: boolean;
15
15
  /**
16
- * Custom prefix used to prefix all component classes, styles, _etc._
16
+ * Custom prefix used to prefix all component classes, styles, etc.
17
17
  *
18
18
  * This prefix should match the `$prefix` SCSS variable.
19
19
  */
@@ -116,9 +116,9 @@ export interface RootProps extends ComponentPropsWithoutRef<"div">, Pick<Compone
116
116
  */
117
117
  toastViewportLabel?: string;
118
118
  /** Properties to pass to the `ToastViewport` component. */
119
- toastViewportProps?: ComponentPropsWithRef<"ol">;
119
+ toastViewportProps?: ComponentProps<"ol">;
120
120
  /** Properties to pass to the `ErrorBoundary` component. */
121
- errorBoundaryProps?: ComponentPropsWithRef<typeof ErrorBoundary>;
121
+ errorBoundaryProps?: ErrorBoundaryProps;
122
122
  }
123
123
  /**
124
124
  * Root component that should wrap an ostack/UI application, exposing all
@@ -127,4 +127,4 @@ export interface RootProps extends ComponentPropsWithoutRef<"div">, Pick<Compone
127
127
  * It further wraps the whole application in an error boundary with support for
128
128
  * error reporting.
129
129
  */
130
- export declare const Root: import("react").ForwardRefExoticComponent<RootProps & import("react").RefAttributes<HTMLDivElement>>;
130
+ export declare function Root({ prefix: newPrefix, enableErrorReporting, reportError, errorReportingUrl, errorReportingMethod, encodeErrorReport, encodedErrorReportMimeType, errorReportingOptions, defaultLocale, locale: controlledLocale, onLocaleChange, baseDocumentTitle, documentTitleBaseSeparator, documentTitleBreadcrumbsSeparator, portalsContainer, tooltipsDelayDuration, tooltipsSkipDelayDuration, disableTooltipsHoverableContent, toastsLabel, toastsDuration, toastsSwipeThreshold, toastViewportPosition, toastsSwipeDirection, toastViewportHotkey, toastViewportLabel, toastViewportProps, errorBoundaryProps, ...otherProps }: RootProps): import("react").JSX.Element;
@@ -1,9 +1,9 @@
1
- import { type ComponentPropsWithoutRef } from "react";
1
+ import { type ComponentProps } from "react";
2
2
  import type { RootProps } from "./Root.tsx";
3
3
  /** Properties of the root element component. */
4
- export interface RootElementProps extends ComponentPropsWithoutRef<"div">, Pick<RootProps, "asChild" | "errorBoundaryProps"> {
4
+ export interface RootElementProps extends ComponentProps<"div">, Pick<RootProps, "asChild" | "errorBoundaryProps"> {
5
5
  /** Whether to wrap children in an error boundary. */
6
6
  includeErrorBoundary: boolean;
7
7
  }
8
8
  /** Root element. */
9
- export declare const RootElement: import("react").ForwardRefExoticComponent<RootElementProps & import("react").RefAttributes<HTMLDivElement>>;
9
+ export declare function RootElement({ asChild, includeErrorBoundary, errorBoundaryProps, className, children, ...otherProps }: RootElementProps): import("react").JSX.Element;
@@ -1,7 +1,6 @@
1
- import { type ComponentPropsWithoutRef } from "react";
2
- import { CommandMenuItem } from "../CommandMenu";
1
+ import { type CommandMenuItemProps } from "../CommandMenu";
3
2
  /** Properties of the option component. */
4
- export interface OptionProps extends Omit<ComponentPropsWithoutRef<typeof CommandMenuItem>, "value" | "asLink" | "onSelect" | "selected" | "icon" | "target" | "href"> {
3
+ export interface OptionProps extends Omit<CommandMenuItemProps, "value" | "asLink" | "onSelect" | "selected" | "icon" | "target" | "href"> {
5
4
  /**
6
5
  * A unique value for this item. If no value is provided, it will be inferred
7
6
  * from `children` or the rendered `textContent`. If your `textContent`
@@ -10,4 +9,4 @@ export interface OptionProps extends Omit<ComponentPropsWithoutRef<typeof Comman
10
9
  value?: string | number;
11
10
  }
12
11
  /** An option which can be selected in a `Select`. */
13
- export declare const Option: import("react").NamedExoticComponent<OptionProps & import("react").RefAttributes<HTMLDivElement>>;
12
+ export declare function Option({ value, color, disabled, className, actionProps, iconProps, children, "aria-disabled": ariaDisabled, ...otherProps }: OptionProps): import("react").JSX.Element | null;
@@ -1,7 +1,6 @@
1
- import { type ComponentPropsWithoutRef } from "react";
2
- import { CommandMenuGroup } from "../CommandMenu";
1
+ import { type CommandMenuGroupProps } from "../CommandMenu";
3
2
  /** Properties of the options group component. */
4
- export interface OptionsGroupProps extends ComponentPropsWithoutRef<typeof CommandMenuGroup> {
3
+ export interface OptionsGroupProps extends CommandMenuGroupProps {
5
4
  }
6
5
  /** Component used to group options within a `Select`. */
7
- export declare const OptionsGroup: import("react").ForwardRefExoticComponent<OptionsGroupProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ export declare function OptionsGroup({ children, ...otherProps }: OptionsGroupProps): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
@@ -1,15 +1,17 @@
1
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type CSSProperties, type ReactNode } from "react";
2
- import { CommandMenu } from "../CommandMenu";
1
+ import { type ComponentProps, type CSSProperties, type ReactNode } from "react";
2
+ import { type CommandMenuProps } from "../CommandMenu";
3
3
  import { type ControlSelectMultipleProps, type ControlSelectSingleProps } from "../Control";
4
4
  import type { FormValidationMode } from "../Form";
5
5
  import { type FormControlValidateFn } from "../Form/useRegisterFormControl.ts";
6
- import type { IconButton } from "../IconButton";
7
- import { PopoverContent, PopoverTrigger } from "../Popover";
8
- import type { Tag } from "../Tag";
6
+ import type { IconButtonProps } from "../IconButton";
7
+ import { type PopoverContentProps, type PopoverTriggerProps } from "../Popover";
8
+ import type { TagProps } from "../Tag";
9
9
  /** Select's popover trigger properties. */
10
- type SelectPopoverTriggerProps = Omit<ComponentPropsWithoutRef<typeof PopoverTrigger>, "defaultValue" | "value">;
10
+ type SelectPopoverTriggerProps = Omit<PopoverTriggerProps, "defaultValue" | "value">;
11
11
  /** Base properties of the select component. */
12
- interface SelectPropsBase<TValue> extends SelectPopoverTriggerProps, Pick<ComponentPropsWithoutRef<typeof CommandMenu>, "searchPlaceholder" | "searchValue" | "onSearchValueChange"> {
12
+ interface SelectPropsBase<TValue> extends SelectPopoverTriggerProps, Pick<CommandMenuProps, "searchPlaceholder" | "searchValue" | "onSearchValueChange"> {
13
+ /** Maximum number of options that can be selected when `multiple` is set. */
14
+ maxSelected?: number;
13
15
  /**
14
16
  * Custom validation function meant to validate the control when it is part of
15
17
  * a `Form`.
@@ -60,21 +62,23 @@ interface SelectPropsBase<TValue> extends SelectPopoverTriggerProps, Pick<Compon
60
62
  */
61
63
  valueTagMaxWidth?: CSSProperties["maxWidth"];
62
64
  /** Properties to pass to the element holding the whole value or placeholder. */
63
- valueProps?: ComponentPropsWithRef<"div">;
65
+ valueProps?: ComponentProps<"div">;
64
66
  /** Properties to pass to each `Tag` holding a value, when `multiple` is set. */
65
- valueTagProps?: Omit<ComponentPropsWithoutRef<typeof Tag>, "defaultOpen" | "open" | "onOpenChange" | "color" | "showCloseButton">;
67
+ valueTagProps?: Omit<TagProps, "defaultOpen" | "open" | "onOpenChange" | "color" | "showCloseButton">;
66
68
  /** Properties to pass to the arrow `Icon` component. */
67
- arrowProps?: Omit<ComponentPropsWithRef<typeof IconButton<"button">>, "icon" | "label">;
69
+ arrowProps?: Omit<IconButtonProps, "icon" | "label">;
68
70
  /** Properties to pass to the `Popover` component. */
69
- popoverProps?: ComponentPropsWithRef<typeof PopoverContent>;
71
+ popoverProps?: PopoverContentProps;
70
72
  /** Options to pass to the `CommandMenu` component. */
71
- commandMenuProps?: Omit<ComponentPropsWithRef<typeof CommandMenu>, "defaultValue" | "value" | "onValueChange" | "iconPlacement" | "searchPlaceholder" | "searchValue" | "onSearchValueChange" | "label" | "listLabel" | "loading" | "loadingLabel" | "loadingProgress" | "emptyMessage">;
73
+ commandMenuProps?: Omit<CommandMenuProps, "defaultValue" | "value" | "onValueChange" | "iconPlacement" | "searchPlaceholder" | "searchValue" | "onSearchValueChange" | "label" | "listLabel" | "loading" | "loadingLabel" | "loadingProgress" | "emptyMessage">;
72
74
  }
73
75
  /** Properties of a single select control. */
74
76
  export interface SelectSingleProps extends Omit<ControlSelectSingleProps, keyof SelectPopoverTriggerProps>, SelectPropsBase<string> {
77
+ maxSelected?: never;
75
78
  }
76
79
  /** Properties of a multiple select control. */
77
80
  export interface SelectMultipleProps extends Omit<ControlSelectMultipleProps, keyof SelectPopoverTriggerProps>, SelectPropsBase<string[]> {
81
+ maxSelected?: number;
78
82
  }
79
83
  /** Properties of the select component. */
80
84
  export type SelectProps = SelectSingleProps | SelectMultipleProps;
@@ -113,5 +117,5 @@ export type SelectProps = SelectSingleProps | SelectMultipleProps;
113
117
  * }
114
118
  * ```
115
119
  */
116
- export declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLButtonElement>>;
120
+ export declare function Select({ multiple, defaultValue, value: controlledValue, onValueChange, defaultOpen, open: controlledOpen, onOpenChange, searchPlaceholder, searchValue: controlledSearchValue, onSearchValueChange, name, placeholder, disabled, readOnly, required, maxSelected, loading, loadingDescription, variant, status, code, startAdornment, endAdornment, showClearButton, clearDescription, searchLabel, optionsLabel, loadingOptions, loadingOptionsLabel, loadingOptionsProgress, showSpinner, emptyMessage, valueTagCloseButtonLabel, valueTagMaxWidth, onKeyDown, onBlurToOutside, validate, validationMode, className, rootProps, codeProps, containerProps, valueProps, valueTagProps, clearButtonProps, spinnerProps, arrowProps, popoverProps, commandMenuProps, autoComplete, form, style, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children, ref, ...otherProps }: SelectProps): import("react").JSX.Element;
117
121
  export {};
@@ -1,18 +1,11 @@
1
1
  import { type ReactNode } from "react";
2
2
  import type { AccentColor } from "../../utils/accent.ts";
3
- import type { ControlStatus } from "../Control";
4
3
  import type { SelectProps } from "./Select.tsx";
5
4
  /** Value of the select context. */
6
- export interface SelectContextValue {
5
+ export interface SelectContextValue extends Pick<SelectProps, "multiple" | "status" | "maxSelected" | "disabled" | "readOnly" | "valueTagCloseButtonLabel" | "valueTagProps"> {
7
6
  registering?: boolean;
8
- multiple: boolean;
9
7
  value: string | string[];
10
8
  onOptionSelect: (value: string) => void;
11
- status?: ControlStatus;
12
- disabled?: boolean;
13
- readOnly?: boolean;
14
- valueTagCloseButtonLabel?: SelectProps["valueTagCloseButtonLabel"];
15
- valueTagProps?: SelectProps["valueTagProps"];
16
9
  store: SelectStore;
17
10
  }
18
11
  /** State of an option. */
@@ -39,15 +32,16 @@ export declare const SelectContext: import("react").Context<SelectContextValue |
39
32
  /** Options to pass to the `useCreateSelectContext` hook. */
40
33
  export type UseCreateSelectContextOptions = Omit<SelectContextValue, "store">;
41
34
  /** Hook which creates the select context. */
42
- export declare function useCreateSelectContext({ multiple, value, onOptionSelect, status, disabled, readOnly, valueTagCloseButtonLabel, valueTagProps, }: UseCreateSelectContextOptions): {
43
- multiple: boolean;
35
+ export declare function useCreateSelectContext({ multiple, value, onOptionSelect, status, maxSelected, disabled, readOnly, valueTagCloseButtonLabel, valueTagProps, }: UseCreateSelectContextOptions): {
36
+ multiple: boolean | undefined;
44
37
  value: string | string[];
45
38
  onOptionSelect: (value: string) => void;
46
- status: ControlStatus | undefined;
39
+ status: import("../Control/Control.tsx").ControlStatus | undefined;
40
+ maxSelected: number | undefined;
47
41
  disabled: boolean | undefined;
48
42
  readOnly: boolean | undefined;
49
43
  valueTagCloseButtonLabel: ReactNode;
50
- valueTagProps: Omit<Omit<import("../Tag/Tag.tsx").TagProps & import("react").RefAttributes<HTMLSpanElement>, "ref">, "color" | "open" | "defaultOpen" | "onOpenChange" | "showCloseButton"> | undefined;
44
+ valueTagProps: Omit<import("../Tag/Tag.tsx").TagProps, "open" | "defaultOpen" | "onOpenChange" | "color" | "showCloseButton"> | undefined;
51
45
  store: Omit<import("zustand").StoreApi<SelectState>, "subscribe"> & {
52
46
  subscribe: {
53
47
  (listener: (selectedState: SelectState, previousSelectedState: SelectState) => void): () => void;
@@ -1,8 +1,8 @@
1
- import { type ComponentPropsWithoutRef } from "react";
1
+ import { type ComponentProps } from "react";
2
2
  /** Properties of the native `<select>` element. */
3
- export interface SelectNativeProps extends ComponentPropsWithoutRef<"select"> {
3
+ export interface SelectNativeProps extends ComponentProps<"select"> {
4
4
  actualElement: HTMLElement | null;
5
5
  onValueChange: (value: string | string[]) => void;
6
6
  }
7
7
  /** Native `<select>` element used by the `Select` component. */
8
- export declare const SelectNative: import("react").ForwardRefExoticComponent<SelectNativeProps & import("react").RefAttributes<HTMLSelectElement>>;
8
+ export declare function SelectNative({ actualElement, multiple, onValueChange, value, ...otherProps }: SelectNativeProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SelectProps } from "./Select.tsx";
2
+ /** Validates select props. */
3
+ export declare function validateSelectProps({ multiple, maxSelected, }: Pick<SelectProps, "multiple" | "maxSelected">): void;
@@ -1,10 +1,10 @@
1
1
  import { Separator as SeparatorPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef } from "react";
2
+ import type { ComponentProps } from "react";
3
3
  import type { AccentColor } from "../../utils/accent.ts";
4
4
  /** Link colours. */
5
5
  export type SeparatorColor = AccentColor;
6
6
  /** Properties of the separator component. */
7
- export interface SeparatorProps extends ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> {
7
+ export interface SeparatorProps extends ComponentProps<typeof SeparatorPrimitive.Root> {
8
8
  /**
9
9
  * Colour of the separator.
10
10
  *
@@ -42,4 +42,4 @@ export interface SeparatorProps extends ComponentPropsWithoutRef<typeof Separato
42
42
  * }
43
43
  * ```
44
44
  */
45
- export declare const Separator: import("react").ForwardRefExoticComponent<SeparatorProps & import("react").RefAttributes<HTMLDivElement>>;
45
+ export declare function Separator({ asChild, color, length, className, style, children, ...otherProps }: SeparatorProps): import("react").JSX.Element;
@@ -1,3 +1,8 @@
1
+ import { Slot as SlotPrimitive } from "radix-ui";
2
+ import type { ComponentProps } from "react";
3
+ /** Properties of the slot component. */
4
+ export interface SlotProps extends ComponentProps<typeof SlotPrimitive.Root> {
5
+ }
1
6
  /**
2
7
  * Component that merges its props onto its immediate child.
3
8
  *
@@ -1,4 +1,4 @@
1
- import type { ComponentType, ReactNode } from "react";
1
+ import type { FunctionComponent, ReactNode } from "react";
2
2
  /** Properties of the `Slottable` component. */
3
3
  export interface SlottableProps {
4
4
  children?: ReactNode;
@@ -7,4 +7,4 @@ export interface SlottableProps {
7
7
  * Component that can be used a child of `Slot`, where the content shall be
8
8
  * rendered.
9
9
  */
10
- export declare const Slottable: ComponentType<SlottableProps>;
10
+ export declare const Slottable: FunctionComponent<SlottableProps>;
@@ -1,11 +1,11 @@
1
- import { type ComponentPropsWithoutRef, type ReactNode } from "react";
1
+ import type { ComponentProps, ReactNode } from "react";
2
2
  import type { AccentColor } from "../../utils/accent.ts";
3
3
  /** Possible sizes of the spinner. */
4
4
  export type SpinnerSize = "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
5
5
  /** Possible colours of the spinner. */
6
6
  export type SpinnerColor = AccentColor;
7
7
  /** Properties of the spinner component. */
8
- export interface SpinnerProps extends ComponentPropsWithoutRef<"span"> {
8
+ export interface SpinnerProps extends ComponentProps<"span"> {
9
9
  /**
10
10
  * Size of the spinner. By default, the spinner will be sized according to the
11
11
  * current font size.
@@ -38,4 +38,4 @@ export interface SpinnerProps extends ComponentPropsWithoutRef<"span"> {
38
38
  * }
39
39
  * ```
40
40
  */
41
- export declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & import("react").RefAttributes<HTMLSpanElement>>;
41
+ export declare function Spinner({ size, color, label, className, ...otherProps }: SpinnerProps): import("react").JSX.Element;
@@ -1,11 +1,11 @@
1
- import { type ComponentPropsWithoutRef, type CSSProperties, type ReactElement } from "react";
1
+ import { type ComponentProps, type CSSProperties, type ReactElement } from "react";
2
2
  import { type Responsive } from "../../utils/useResponsiveValues.ts";
3
3
  /** Possible stack directions. */
4
4
  export type StackDirection = "column" | "column-reverse" | "row" | "row-reverse";
5
5
  /** Whether to wrap items. */
6
6
  export type StackWrap = boolean | "reverse";
7
7
  /** Properties of the stack component. */
8
- export interface StackProps extends ComponentPropsWithoutRef<"div"> {
8
+ export interface StackProps extends ComponentProps<"div"> {
9
9
  /**
10
10
  * Change the component to the HTML tag or custom component of the only child.
11
11
  * This will merge the original component props with the props of the supplied
@@ -43,7 +43,7 @@ export interface StackProps extends ComponentPropsWithoutRef<"div"> {
43
43
  *
44
44
  * The stack component is mostly concerned with one-dimension layouts. For
45
45
  * two-dimensional layouts, you might prefer to use the [`Grid`
46
- * component](?path=/docs/ostack-ui-layout-grid--docs) instead.
46
+ * component](/docs/ostack-ui-layout-grid--docs) instead.
47
47
  *
48
48
  * Example usage:
49
49
  *
@@ -61,4 +61,4 @@ export interface StackProps extends ComponentPropsWithoutRef<"div"> {
61
61
  * }
62
62
  * ```
63
63
  */
64
- export declare const Stack: import("react").ForwardRefExoticComponent<StackProps & import("react").RefAttributes<HTMLDivElement>>;
64
+ export declare function Stack({ asChild, direction, gap, divider, justifyContent, alignItems, alignContent, wrap, className, style, children, ...otherProps }: StackProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { Responsive } from "../../utils/useResponsiveValues.ts";
2
+ import type { StackDirection } from "./Stack.tsx";
3
+ /** Value of the stack context. */
4
+ export interface StackContextValue {
5
+ direction: Responsive<StackDirection> | undefined;
6
+ gap: Responsive<number | string> | undefined;
7
+ }
8
+ /** Stack context. */
9
+ export declare const StackContext: import("react").Context<StackContextValue | null>;
@@ -1,9 +1,9 @@
1
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from "react";
1
+ import { type ComponentProps, type ReactNode } from "react";
2
2
  import { type ButtonProps } from "../Button";
3
3
  import { type ControlStatus } from "../Control";
4
- import { Label } from "../Label";
4
+ import { type LabelProps } from "../Label";
5
5
  /** Properties of the step component. */
6
- export interface StepProps extends ComponentPropsWithoutRef<"li">, Pick<ButtonProps, "variant" | "disabled" | "loading" | "showSpinner" | "spinnerProps"> {
6
+ export interface StepProps extends ComponentProps<"li">, Pick<ButtonProps, "variant" | "disabled" | "loading" | "showSpinner" | "spinnerProps"> {
7
7
  /**
8
8
  * Change the component to the HTML tag or custom component of the only child.
9
9
  * This will merge the original component props with the props of the supplied
@@ -24,9 +24,9 @@ export interface StepProps extends ComponentPropsWithoutRef<"li">, Pick<ButtonPr
24
24
  /** Visually hidden label for completed steps. */
25
25
  completedLabel?: ReactNode;
26
26
  /** Properties to pass to the button element. */
27
- buttonProps?: Omit<ComponentPropsWithRef<"button">, "color" | "children" | "disabled">;
27
+ buttonProps?: Omit<ComponentProps<"button">, "color" | "children" | "disabled">;
28
28
  /** Properties to pass to the step's label component. */
29
- labelProps?: Omit<ComponentPropsWithRef<typeof Label>, "htmlFor">;
29
+ labelProps?: Omit<LabelProps, "htmlFor">;
30
30
  }
31
31
  /** Step trigger component. */
32
- export declare const Step: import("react").ForwardRefExoticComponent<StepProps & import("react").RefAttributes<HTMLLIElement>>;
32
+ export declare function Step({ asChild, index, completed, status, stepNumberLabel, completedLabel, variant, disabled, loading, showSpinner, className, children, buttonProps, labelProps, ...otherProps }: StepProps): import("react").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
1
+ import { type ComponentProps } from "react";
2
2
  /** Properties of the step content component. */
3
- export interface StepContentProps extends ComponentPropsWithoutRef<"div"> {
3
+ export interface StepContentProps extends ComponentProps<"div"> {
4
4
  /**
5
5
  * Change the component to the HTML tag or custom component of the only child.
6
6
  * This will merge the original component props with the props of the supplied
@@ -10,9 +10,9 @@ export interface StepContentProps extends ComponentPropsWithoutRef<"div"> {
10
10
  /** Index of the step that corresponds to this content. */
11
11
  index?: number;
12
12
  /** Properties to pass to the content label element (print only). */
13
- stepContentLabelProps?: ComponentPropsWithRef<"span">;
13
+ stepContentLabelProps?: ComponentProps<"span">;
14
14
  /** Properties to pass to the content label index element (print only). */
15
- stepContentLabelIndexProps?: ComponentPropsWithRef<"span">;
15
+ stepContentLabelIndexProps?: ComponentProps<"span">;
16
16
  }
17
17
  /** Step content component. */
18
- export declare const StepContent: import("react").ForwardRefExoticComponent<StepContentProps & import("react").RefAttributes<HTMLDivElement>>;
18
+ export declare function StepContent({ asChild, index, id, className, stepContentLabelProps, stepContentLabelIndexProps, ref, ...otherProps }: StepContentProps): import("react").JSX.Element;