@ostack.tech/ui 0.15.5 → 0.16.1

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 +134 -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 +99 -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 +8 -0
  24. package/scss/components/HelperText/_HelperText.scss +15 -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,9 +1,12 @@
1
- import { type ComponentPropsWithRef, type ReactNode } from "react";
2
- import { Calendar } from "../Calendar";
1
+ import { type ReactNode } from "react";
2
+ import { type CalendarProps } from "../Calendar";
3
3
  import { type ControlNonFileInputProps } from "../Control";
4
+ import { type ControlAddonProps } from "../ControlAddon";
4
5
  import type { FormValidationMode } from "../Form";
5
6
  import { type FormControlValidateFn } from "../Form/useRegisterFormControl.ts";
6
- import { PopoverContent } from "../Popover";
7
+ import { type IconProps } from "../Icon";
8
+ import { type PopoverContentProps } from "../Popover";
9
+ import { type TooltipProps } from "../Tooltip";
7
10
  /** Properties of the date input component. */
8
11
  export interface DateInputProps extends Omit<ControlNonFileInputProps, "defaultValue" | "value" | "onValueChange"> {
9
12
  /** Date input's default value. */
@@ -18,26 +21,26 @@ export interface DateInputProps extends Omit<ControlNonFileInputProps, "defaultV
18
21
  onValueChange?: (valueRepresentations: DateValueRepresentations) => void;
19
22
  /**
20
23
  * Minimum date allowed. When a string it provided, it should represent the
21
- * date in the ISO 8601 format, _i.e._ `"2020-01-01"` should be provided
22
- * instead of a formatted `"01/01/2020"`.
24
+ * date in the ISO 8601 format, i.e. `"2020-01-01"` should be provided instead
25
+ * of a formatted `"01/01/2020"`.
23
26
  */
24
27
  minDate?: string | Date | null;
25
28
  /**
26
29
  * Maximum date allowed. When a string it provided, it should represent the
27
- * date in the ISO 8601 format, _i.e._ `"2020-01-01"` should be provided
28
- * instead of a formatted `"01/01/2020"`.
30
+ * date in the ISO 8601 format, i.e. `"2020-01-01"` should be provided instead
31
+ * of a formatted `"01/01/2020"`.
29
32
  */
30
33
  maxDate?: string | Date | null;
31
34
  /**
32
35
  * Minimum month allowed. When a string it provided, it should represent the
33
- * date in the ISO 8601 format, _i.e._ `"2020-01"` should be provided instead
34
- * of a formatted `"01/2020"`.
36
+ * date in the ISO 8601 format, i.e. `"2020-01"` should be provided instead of
37
+ * a formatted `"01/2020"`.
35
38
  */
36
39
  minMonth?: string | Date | null;
37
40
  /**
38
41
  * Maximum month allowed. When a string it provided, it should represent the
39
- * date in the ISO 8601 format, _i.e._ `"2020-01"` should be provided instead
40
- * of a formatted `"01/2020"`.
42
+ * date in the ISO 8601 format, i.e. `"2020-01"` should be provided instead of
43
+ * a formatted `"01/2020"`.
41
44
  */
42
45
  maxMonth?: string | Date | null;
43
46
  /** Minimum year allowed. */
@@ -74,10 +77,16 @@ export interface DateInputProps extends Omit<ControlNonFileInputProps, "defaultV
74
77
  calendarButtonLabel?: ReactNode;
75
78
  /** Function called whenever the popover's open state changes. */
76
79
  onPopoverOpenChange?: (open: boolean) => void;
80
+ /** Properties to pass to the calendar button tooltip component. */
81
+ calendarButtonTooltipProps?: Omit<TooltipProps, "content" | "children">;
82
+ /** Properties to pass to the calendar button component. */
83
+ calendarButtonProps?: Omit<ControlAddonProps<"button">, "as" | "asChild" | "children">;
84
+ /** Properties to pass to the calendar button icon component. */
85
+ calendarButtonIconProps?: Omit<IconProps, "label">;
77
86
  /** Properties to pass to the calendar component. */
78
- calendarProps?: Omit<ComponentPropsWithRef<typeof Calendar>, "selectionMode" | "defaultValue" | "value" | "onValueChange" | "minDate" | "maxDate" | "minMonth" | "maxMonth" | "minYear" | "maxYear">;
87
+ calendarProps?: Omit<CalendarProps, "selectionMode" | "defaultValue" | "value" | "onValueChange" | "minDate" | "maxDate" | "minMonth" | "maxMonth" | "minYear" | "maxYear">;
79
88
  /** Properties to pass to the popover content component. */
80
- popoverContentProps?: ComponentPropsWithRef<typeof PopoverContent>;
89
+ popoverContentProps?: Omit<PopoverContentProps, "children">;
81
90
  }
82
91
  /** Representations of the date value. */
83
92
  export interface DateValueRepresentations {
@@ -91,10 +100,10 @@ export interface DateValueRepresentations {
91
100
  /**
92
101
  * The date input component is used to allow a user to enter a date with the aid
93
102
  * of a popover calendar. It is built on top of the
94
- * [`Input`](?path=/docs/ostack-ui-forms-input--docs),
95
- * [`Popover`](?path=/docs/ostack-ui-overlay-popover--docs), and
96
- * [`Calendar`](?path=/docs/ostack-ui-data-display-calendar--docs) components
97
- * (and, by extension, the browser's [`<input>`
103
+ * [`Input`](/docs/ostack-ui-forms-input--docs),
104
+ * [`Popover`](/docs/ostack-ui-overlay-popover--docs), and
105
+ * [`Calendar`](/docs/ostack-ui-data-display-calendar--docs) components (and, by
106
+ * extension, the browser's [`<input>`
98
107
  * element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input)).
99
108
  *
100
109
  * For accessibility purposes, date inputs are usually included within a `Field`
@@ -110,4 +119,4 @@ export interface DateValueRepresentations {
110
119
  * }
111
120
  * ```
112
121
  */
113
- export declare const DateInput: import("react").ForwardRefExoticComponent<DateInputProps & import("react").RefAttributes<HTMLInputElement>>;
122
+ export declare function DateInput({ name, value: controlledValue, defaultValue, onValueChange, onChange, onFocus, disabled, loading, readOnly, status, showClearButton, endAdornment, minDate, maxDate, minMonth, maxMonth, minYear, maxYear, required, autoComplete, format, announcedFormat, formatDescription, selectedDateDescription, form, validate, validationMode, calendarButtonLabel, onPopoverOpenChange, onBlurToOutside, containerProps, clearButtonProps, calendarButtonTooltipProps, calendarButtonProps, calendarButtonIconProps, calendarProps, popoverContentProps, className, placeholder, "aria-disabled": ariaDisabled, "aria-describedby": ariaDescribedBy, ref, ...otherProps }: DateInputProps): import("react").JSX.Element;
@@ -1,13 +1,16 @@
1
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type CSSProperties, type FocusEvent, type ReactNode } from "react";
1
+ import { type ComponentProps, type CSSProperties, type FocusEvent, type ReactNode } from "react";
2
2
  import { type Responsive } from "../../utils/useResponsiveValues.ts";
3
- import { Calendar, type DateRange } from "../Calendar";
4
- import { CloseButton } from "../CloseButton";
3
+ import { type CalendarProps, type DateRange } from "../Calendar";
4
+ import { type CloseButtonProps } from "../CloseButton";
5
5
  import { type ControlShowClearButton, type ControlStatus, type ControlVariant } from "../Control";
6
- import { ControlCode } from "../ControlCode";
6
+ import { type ControlAddonProps } from "../ControlAddon";
7
+ import { type ControlCodeProps } from "../ControlCode";
7
8
  import type { FormValidationMode } from "../Form";
8
9
  import { type FormControlValidateFn } from "../Form/useRegisterFormControl.ts";
9
- import { PopoverAnchor, PopoverContent } from "../Popover";
10
- import { Spinner } from "../Spinner";
10
+ import { type IconProps } from "../Icon";
11
+ import { type PopoverAnchorProps, type PopoverContentProps } from "../Popover";
12
+ import { type SpinnerProps } from "../Spinner";
13
+ import { type TooltipProps } from "../Tooltip";
11
14
  /** Date-range using formatted strings as dates. */
12
15
  export interface FormattedRange {
13
16
  /** Start of the date-range. */
@@ -23,7 +26,7 @@ export interface StringRange {
23
26
  end: string | null;
24
27
  }
25
28
  /** Properties of the date-range input component. */
26
- export interface DateRangeInputProps extends Omit<ComponentPropsWithoutRef<"div">, "defaultValue"> {
29
+ export interface DateRangeInputProps extends Omit<ComponentProps<"div">, "defaultValue"> {
27
30
  /** Name of the control. Both inputs will share the same name. */
28
31
  name?: string;
29
32
  /**
@@ -46,7 +49,7 @@ export interface DateRangeInputProps extends Omit<ComponentPropsWithoutRef<"div"
46
49
  * value.
47
50
  */
48
51
  onValueChange?: (valueRepresentations: DateRangeValueRepresentations) => void;
49
- /** Sets the control as required. */
52
+ /** Whether the data-range input is required. */
50
53
  required?: boolean;
51
54
  /** Disables the control. */
52
55
  disabled?: boolean;
@@ -69,7 +72,7 @@ export interface DateRangeInputProps extends Omit<ComponentPropsWithoutRef<"div"
69
72
  *
70
73
  * When `true`, the date-range input is “soft-disabled”: it looks disabled and
71
74
  * ignores user interaction but remains focusable. By default, spinners are
72
- * shown (_i.e._, `showSpinners` is set to `true` unless overridden).
75
+ * shown (i.e. `showSpinners` is set to `true` unless overridden).
73
76
  *
74
77
  * The date-range input's accessible description while loading can be
75
78
  * controlled via `loadingDescription`.
@@ -124,6 +127,10 @@ export interface DateRangeInputProps extends Omit<ComponentPropsWithoutRef<"div"
124
127
  align?: Responsive<CSSProperties["textAlign"]>;
125
128
  /** Date-range input's start adornment. */
126
129
  startAdornment?: ReactNode;
130
+ /** Date-range input's start-middle adornment. */
131
+ startMiddleAdornment?: ReactNode;
132
+ /** Date-range input's end-middle adornment. */
133
+ endMiddleAdornment?: ReactNode;
127
134
  /** Date-range input's end adornment. */
128
135
  endAdornment?: ReactNode;
129
136
  /**
@@ -196,27 +203,33 @@ export interface DateRangeInputProps extends Omit<ComponentPropsWithoutRef<"div"
196
203
  /** Form attribute of the inputs. */
197
204
  form?: string;
198
205
  /** Properties to pass to the code component. */
199
- codeProps?: ComponentPropsWithRef<typeof ControlCode>;
206
+ codeProps?: ControlCodeProps;
200
207
  /** Properties to pass to the popover anchor component. */
201
- popoverAnchorProps?: ComponentPropsWithRef<typeof PopoverAnchor>;
208
+ popoverAnchorProps?: PopoverAnchorProps;
202
209
  /** Properties to pass to the start container element. */
203
- startContainerProps?: ComponentPropsWithRef<"div">;
210
+ startContainerProps?: ComponentProps<"div">;
204
211
  /** Properties to pass to the end container element. */
205
- endContainerProps?: ComponentPropsWithRef<"div">;
212
+ endContainerProps?: ComponentProps<"div">;
206
213
  /** Properties to pass to the input component representing the start date. */
207
- startInputProps?: ComponentPropsWithRef<"input">;
214
+ startInputProps?: ComponentProps<"input">;
208
215
  /** Properties to pass to the input component representing the end date. */
209
- endInputProps?: ComponentPropsWithRef<"input">;
216
+ endInputProps?: ComponentProps<"input">;
210
217
  /** Properties to pass to the button component that clears the start date. */
211
- startClearButtonProps?: ComponentPropsWithRef<typeof CloseButton>;
218
+ startClearButtonProps?: CloseButtonProps;
212
219
  /** Properties to pass to the button component that clears the end date. */
213
- endClearButtonProps?: ComponentPropsWithRef<typeof CloseButton>;
220
+ endClearButtonProps?: CloseButtonProps;
214
221
  /** Properties to pass to the spinner component. */
215
- spinnerProps?: Omit<ComponentPropsWithRef<typeof Spinner>, "size">;
222
+ spinnerProps?: Omit<SpinnerProps, "size">;
223
+ /** Properties to pass to the calendar button tooltip component. */
224
+ calendarButtonTooltipProps?: Omit<TooltipProps, "content" | "children">;
225
+ /** Properties to pass to the calendar button component. */
226
+ calendarButtonProps?: Omit<ControlAddonProps<"button">, "as" | "asChild" | "children">;
227
+ /** Properties to pass to the calendar button icon component. */
228
+ calendarButtonIconProps?: Omit<IconProps, "label">;
216
229
  /** Properties to pass to the date-range picker component. */
217
- calendarProps?: Omit<ComponentPropsWithRef<typeof Calendar>, "selectionMode" | "defaultValue" | "value" | "onValueChange" | "minDate" | "maxDate" | "minMonth" | "maxMonth" | "minYear" | "maxYear">;
230
+ calendarProps?: Omit<CalendarProps, "selectionMode" | "defaultValue" | "value" | "onValueChange" | "minDate" | "maxDate" | "minMonth" | "maxMonth" | "minYear" | "maxYear">;
218
231
  /** Properties to pass to the popover content component. */
219
- popoverContentProps?: ComponentPropsWithRef<typeof PopoverContent>;
232
+ popoverContentProps?: PopoverContentProps;
220
233
  }
221
234
  /** Representations of the date-range value. */
222
235
  export interface DateRangeValueRepresentations {
@@ -230,9 +243,9 @@ export interface DateRangeValueRepresentations {
230
243
  /**
231
244
  * The date-range input component displays two inputs used to allow a user to
232
245
  * specify a date interval with the aid of popover calendars. It is built on top
233
- * of the [`Popover`](?path=/docs/ostack-ui-overlay-popover--docs) and
234
- * [`Calendar`](?path=/docs/ostack-ui-data-display-calendar--docs) components,
235
- * as well as the browser's [`<input>`
246
+ * of the [`Popover`](/docs/ostack-ui-overlay-popover--docs) and
247
+ * [`Calendar`](/docs/ostack-ui-data-display-calendar--docs) components, as well
248
+ * as the browser's [`<input>`
236
249
  * element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input).
237
250
  *
238
251
  * For accessibility purposes, date-range inputs are usually included within a
@@ -254,4 +267,4 @@ export interface DateRangeValueRepresentations {
254
267
  * }
255
268
  * ```
256
269
  */
257
- export declare const DateRangeInput: import("react").ForwardRefExoticComponent<DateRangeInputProps & import("react").RefAttributes<HTMLDivElement>>;
270
+ export declare function DateRangeInput({ name, variant, status, code, value: controlledValue, defaultValue, onValueChange, required, disabled, readOnly, minDate, maxDate, minMonth, maxMonth, minYear, maxYear, loading, loadingDescription, showSpinners, showStartSpinner, showEndSpinner, align, startAdornment, startMiddleAdornment, endMiddleAdornment, endAdornment, showClearButtons, clearButtonsLabel, format, announcedFormat, formatDescription, startInputLabel, endInputLabel, selectedDateDescription, selectedDateRangeDescription, calendarButtonLabel, placeholder, startPlaceholder, endPlaceholder, className, onPopoverOpenChange, onBlurToOutside, form, validate, validationMode, codeProps, popoverAnchorProps, startContainerProps, endContainerProps, startInputProps, endInputProps, startClearButtonProps, endClearButtonProps, spinnerProps, calendarButtonTooltipProps, calendarButtonProps, calendarButtonIconProps, calendarProps, popoverContentProps, "aria-disabled": ariaDisabled, ...otherProps }: DateRangeInputProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
- import { type ComponentPropsWithoutRef } from "react";
1
+ import type { ComponentProps } from "react";
2
2
  import { type GridContainerProps } from "../Grid";
3
3
  /** Properties of the description list component. */
4
- export interface DescriptionListProps extends Pick<GridContainerProps, "asChild" | "columns" | "gap" | "rowGap" | "columnGap">, ComponentPropsWithoutRef<"dl"> {
4
+ export interface DescriptionListProps extends Pick<GridContainerProps, "asChild" | "columns" | "gap" | "rowGap" | "columnGap">, ComponentProps<"dl"> {
5
5
  }
6
6
  /**
7
7
  * A list of descriptions pairing terms with their associated details. Built on
@@ -11,7 +11,7 @@ export interface DescriptionListProps extends Pick<GridContainerProps, "asChild"
11
11
  * and
12
12
  * [`<dd>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dd)
13
13
  * elements, as well as the [`Grid`
14
- * component](?path=/docs/ostack-ui-layout-grid--docs) for layout.
14
+ * component](/docs/ostack-ui-layout-grid--docs) for layout.
15
15
  *
16
16
  * It composes the following subcomponent:
17
17
  *
@@ -35,4 +35,4 @@ export interface DescriptionListProps extends Pick<GridContainerProps, "asChild"
35
35
  * }
36
36
  * ```
37
37
  */
38
- export declare const DescriptionList: import("react").ForwardRefExoticComponent<DescriptionListProps & import("react").RefAttributes<HTMLDListElement>>;
38
+ export declare function DescriptionList({ asChild, columns, gap, rowGap, columnGap, className, ...otherProps }: DescriptionListProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { type ComponentPropsWithRef, type ReactNode } from "react";
1
+ import type { ComponentProps, ReactNode } from "react";
2
2
  import { type GridItemProps } from "../Grid";
3
3
  /** Properties of the description list item component. */
4
4
  export interface DescriptionListItemProps extends GridItemProps {
@@ -7,9 +7,9 @@ export interface DescriptionListItemProps extends GridItemProps {
7
7
  /** Details of the description list item. */
8
8
  children: ReactNode;
9
9
  /** Properties to pass to the description term element. */
10
- descriptionTermProps?: ComponentPropsWithRef<"dt">;
10
+ descriptionTermProps?: ComponentProps<"dt">;
11
11
  /** Properties to pass to the description details element. */
12
- descriptionDetailsProps?: ComponentPropsWithRef<"dd">;
12
+ descriptionDetailsProps?: ComponentProps<"dd">;
13
13
  }
14
14
  /** Item of the description list: a grouping of a term and its details. */
15
- export declare const DescriptionListItem: import("react").ForwardRefExoticComponent<DescriptionListItemProps & import("react").RefAttributes<HTMLDivElement>>;
15
+ export declare function DescriptionListItem({ term, children, descriptionTermProps, descriptionDetailsProps, className, ...otherProps }: DescriptionListItemProps): import("react").JSX.Element;
@@ -1,11 +1,15 @@
1
1
  import { Dialog as DialogPrimitive } from "radix-ui";
2
+ import type { ComponentProps } from "react";
3
+ /** Properties of the dialog component. */
4
+ export interface DialogProps extends ComponentProps<typeof DialogPrimitive.Root> {
5
+ }
2
6
  /**
3
7
  * The dialog component displays a “window” overlaid on either the main screen
4
8
  * or another dialog window, rendering the content underneath inert.
5
9
  *
6
10
  * Built on top of the [Radix Dialog
7
11
  * primitive](https://www.radix-ui.com/primitives/docs/components/dialog), and
8
- * the [`Card` component](?path=/docs/ostack-ui-data-display-card--docs).
12
+ * the [`Card` component](/docs/ostack-ui-data-display-card--docs).
9
13
  *
10
14
  * It composes the following subcomponents:
11
15
  *
@@ -1,7 +1,6 @@
1
- import { type ComponentPropsWithoutRef } from "react";
2
- import { CardBody } from "../Card";
1
+ import { type CardBodyProps } from "../Card";
3
2
  /** Properties of the dialog body component. */
4
- export interface DialogBodyProps extends ComponentPropsWithoutRef<typeof CardBody> {
3
+ export interface DialogBodyProps extends CardBodyProps {
5
4
  }
6
5
  /** Body section of the dialog. */
7
- export declare const DialogBody: import("react").ForwardRefExoticComponent<DialogBodyProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ export declare function DialogBody({ className, ...otherProps }: DialogBodyProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { Dialog as DialogPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef } from "react";
2
+ import type { ComponentProps } from "react";
3
3
  /** Properties of the dialog close component. */
4
- export interface DialogCloseProps extends Omit<ComponentPropsWithoutRef<typeof DialogPrimitive.Close>, "asChild"> {
4
+ export interface DialogCloseProps extends Omit<ComponentProps<typeof DialogPrimitive.Close>, "asChild"> {
5
5
  }
6
6
  /** Button which closes the dialog. */
7
- export declare const DialogClose: import("react").ForwardRefExoticComponent<DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
7
+ export declare function DialogClose(props: DialogCloseProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { Dialog as DialogPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
2
+ import { type ComponentProps } from "react";
3
3
  import { type CardColor, type CardVariant } from "../Card";
4
- import { Overlay } from "../Overlay";
4
+ import { type OverlayProps } from "../Overlay";
5
5
  /** Dialog content variants. */
6
6
  export type DialogContentVariant = CardVariant;
7
7
  /** Possible dialog content colors. */
@@ -9,7 +9,7 @@ export type DialogContentColor = CardColor;
9
9
  /** Possible dialog content sizes. */
10
10
  export type DialogContentSize = "sm" | "md" | "lg" | "xl";
11
11
  /** Properties of the dialog content component. */
12
- export interface DialogContentProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
12
+ export interface DialogContentProps extends ComponentProps<typeof DialogPrimitive.Content> {
13
13
  /**
14
14
  * Dialog content variant.
15
15
  *
@@ -37,9 +37,9 @@ export interface DialogContentProps extends ComponentPropsWithoutRef<typeof Dial
37
37
  */
38
38
  size?: DialogContentSize;
39
39
  /** Properties to pass to the portal component. */
40
- portalProps?: Omit<ComponentPropsWithRef<typeof DialogPrimitive.Portal>, "forceMount">;
40
+ portalProps?: Omit<ComponentProps<typeof DialogPrimitive.Portal>, "forceMount">;
41
41
  /** Properties to pass to the `Overlay` component. */
42
- overlayProps?: ComponentPropsWithRef<typeof Overlay>;
42
+ overlayProps?: OverlayProps;
43
43
  }
44
44
  /** Content to be rendered in the open dialog. */
45
- export declare const DialogContent: import("react").ForwardRefExoticComponent<DialogContentProps & import("react").RefAttributes<HTMLDivElement>>;
45
+ export declare function DialogContent({ asChild, variant, mergeSections, color, size, forceMount, onPointerDownOutside, portalProps, overlayProps, className, children, ...otherProps }: DialogContentProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { Dialog as DialogPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef } from "react";
2
+ import type { ComponentProps } from "react";
3
3
  /** Properties of the dialog description component. */
4
- export interface DialogDescriptionProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Description> {
4
+ export interface DialogDescriptionProps extends ComponentProps<typeof DialogPrimitive.Description> {
5
5
  }
6
6
  /**
7
7
  * Optional accessible description to be announced when the dialog is opened.
@@ -10,4 +10,4 @@ export interface DialogDescriptionProps extends ComponentPropsWithoutRef<typeof
10
10
  * the description entirely, pass `aria-describedby={undefined}` to the
11
11
  * `DialogContent` and omit this component.
12
12
  */
13
- export declare const DialogDescription: import("react").ForwardRefExoticComponent<DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
13
+ export declare function DialogDescription({ className, ...otherProps }: DialogDescriptionProps): import("react").JSX.Element;
@@ -1,7 +1,6 @@
1
- import { type ComponentPropsWithoutRef } from "react";
2
- import { CardFooter } from "../Card";
1
+ import { type CardFooterProps } from "../Card";
3
2
  /** Properties of the dialog footer component. */
4
- export interface DialogFooterProps extends ComponentPropsWithoutRef<typeof CardFooter> {
3
+ export interface DialogFooterProps extends CardFooterProps {
5
4
  }
6
5
  /** Footer section of the dialog. */
7
- export declare const DialogFooter: import("react").ForwardRefExoticComponent<DialogFooterProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ export declare function DialogFooter({ className, ...otherProps }: DialogFooterProps): import("react").JSX.Element;
@@ -1,8 +1,7 @@
1
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
2
- import { CardHeader } from "../Card";
3
- import { CloseButton } from "../CloseButton";
1
+ import { type CardHeaderProps } from "../Card";
2
+ import { type CloseButtonProps } from "../CloseButton";
4
3
  /** Properties of the dialog header component. */
5
- export interface DialogHeaderProps extends ComponentPropsWithoutRef<typeof CardHeader> {
4
+ export interface DialogHeaderProps extends CardHeaderProps {
6
5
  /**
7
6
  * Whether to show a close button.
8
7
  *
@@ -10,7 +9,7 @@ export interface DialogHeaderProps extends ComponentPropsWithoutRef<typeof CardH
10
9
  */
11
10
  showCloseButton?: boolean;
12
11
  /** Properties to pass to the close button component. */
13
- closeButtonProps?: ComponentPropsWithRef<typeof CloseButton>;
12
+ closeButtonProps?: CloseButtonProps;
14
13
  }
15
14
  /** Header section of the dialog. */
16
- export declare const DialogHeader: import("react").ForwardRefExoticComponent<DialogHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
15
+ export declare function DialogHeader({ showCloseButton, closeButtonProps, className, children, ...otherProps }: DialogHeaderProps): import("react").JSX.Element;
@@ -1,12 +1,12 @@
1
1
  import { Dialog as DialogPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef } from "react";
3
- import type { PolymorphicComponent, PolymorphicProps } from "../../utils/polymorphicTypes.ts";
2
+ import type { ComponentProps } from "react";
3
+ import type { PolymorphicProps } from "../../utils/polymorphicTypes.ts";
4
4
  /** Element a dialog title can be rendered as. */
5
5
  export type DialogTitleAs = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div" | "span";
6
6
  /** Properties of the dialog title component. */
7
7
  export type DialogTitleProps<TAs extends DialogTitleAs = "h2"> = PolymorphicProps<DialogTitleAs, TAs, "h2", DialogTitleOwnProps>;
8
8
  /** Own properties of the dialog title component. */
9
- export interface DialogTitleOwnProps extends Pick<ComponentPropsWithoutRef<typeof DialogPrimitive.Title>, "asChild"> {
9
+ export interface DialogTitleOwnProps extends Pick<ComponentProps<typeof DialogPrimitive.Title>, "asChild"> {
10
10
  }
11
11
  /** Accessible title to be announced when the dialog is opened. */
12
- export declare const DialogTitle: PolymorphicComponent<DialogTitleAs, "h2", DialogTitleOwnProps>;
12
+ export declare function DialogTitle<TAs extends DialogTitleAs = "h2">({ as, asChild, className, ...otherProps }: DialogTitleProps<TAs>): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { Dialog as DialogPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef } from "react";
2
+ import type { ComponentProps } from "react";
3
3
  /** Properties of the dialog trigger component. */
4
- export interface DialogTriggerProps extends Omit<ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>, "asChild"> {
4
+ export interface DialogTriggerProps extends Omit<ComponentProps<typeof DialogPrimitive.Trigger>, "asChild"> {
5
5
  }
6
6
  /** The button which, when pressed, opens the dialog. */
7
- export declare const DialogTrigger: import("react").ForwardRefExoticComponent<DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
7
+ export declare function DialogTrigger(props: DialogTriggerProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2
- import type { ComponentPropsWithoutRef, ComponentType } from "react";
2
+ import type { ComponentProps, FunctionComponent } from "react";
3
3
  /** Properties of the dropdown menu component. */
4
- export interface DropdownMenuProps extends Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root>, "dir"> {
4
+ export interface DropdownMenuProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.Root>, "dir"> {
5
5
  }
6
6
  /**
7
7
  * Menu displayed within a dropdown, containing a set of actions.
@@ -9,7 +9,7 @@ export interface DropdownMenuProps extends Omit<ComponentPropsWithoutRef<typeof
9
9
  * Built on top of the [Radix Dropdown Menu
10
10
  * primitive](https://www.radix-ui.com/primitives/docs/components/dropdown-menu)
11
11
  * and the [`MenuList`
12
- * component](?path=/docs/ostack-ui-data-display-menu-list--docs).
12
+ * component](/docs/ostack-ui-data-display-menu-list--docs).
13
13
  *
14
14
  * It composes the following subcomponents:
15
15
  *
@@ -63,4 +63,4 @@ export interface DropdownMenuProps extends Omit<ComponentPropsWithoutRef<typeof
63
63
  * }
64
64
  * ```
65
65
  */
66
- export declare const DropdownMenu: ComponentType<DropdownMenuProps>;
66
+ export declare const DropdownMenu: FunctionComponent<DropdownMenuProps>;
@@ -1,10 +1,10 @@
1
1
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
2
+ import { type ComponentProps } from "react";
3
3
  import type { CheckboxChecked } from "../Checkbox";
4
- import { Icon } from "../Icon";
4
+ import { type IconProps } from "../Icon";
5
5
  import { type MenuListItemProps } from "../MenuList";
6
6
  /** Properties of the dropdown menu checkbox item. */
7
- export interface DropdownMenuCheckboxItemProps extends Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>, "asChild" | "color">, Pick<MenuListItemProps, "color" | "loading" | "loadingContent" | "showSpinner" | "iconPlacement" | "keybinds" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps" | "keybindsProps"> {
7
+ export interface DropdownMenuCheckboxItemProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>, "asChild" | "color">, Pick<MenuListItemProps, "color" | "loading" | "loadingContent" | "showSpinner" | "iconPlacement" | "keybinds" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps" | "keybindsProps"> {
8
8
  /**
9
9
  * Whether to show the checkbox.
10
10
  *
@@ -18,7 +18,7 @@ export interface DropdownMenuCheckboxItemProps extends Omit<ComponentPropsWithou
18
18
  */
19
19
  onCheckedChange?: (value: CheckboxChecked) => void;
20
20
  /** Properties to pass to the checkbox indicator component. */
21
- indicatorProps?: Omit<ComponentPropsWithRef<typeof Icon>, "icon">;
21
+ indicatorProps?: Omit<IconProps, "icon">;
22
22
  }
23
23
  /** A dropdown menu item that can be controlled and rendered like a checkbox. */
24
- export declare const DropdownMenuCheckboxItem: import("react").ForwardRefExoticComponent<DropdownMenuCheckboxItemProps & import("react").RefAttributes<HTMLDivElement>>;
24
+ export declare function DropdownMenuCheckboxItem({ showCheckbox, defaultChecked, checked: controlledChecked, onCheckedChange, onSelect, color, disabled, loading, loadingContent, showSpinner, iconPlacement, keybinds, actionProps, contentProps, iconProps, spinnerProps, keybindsProps, indicatorProps, className, "aria-disabled": ariaDisabled, ...otherProps }: DropdownMenuCheckboxItemProps): import("react").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
3
- import { MenuList, type MenuListProps } from "../MenuList";
2
+ import type { ComponentProps } from "react";
3
+ import { type MenuListProps } from "../MenuList";
4
4
  /** Properties of the dropdown menu content component. */
5
- export interface DropdownMenuContentProps extends Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>, "asChild">, Pick<MenuListProps, "variant" | "iconPlacement"> {
5
+ export interface DropdownMenuContentProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.Content>, "asChild">, Pick<MenuListProps, "variant" | "iconPlacement"> {
6
6
  /**
7
7
  * Whether to show an arrow pointing to the anchor.
8
8
  *
@@ -10,11 +10,11 @@ export interface DropdownMenuContentProps extends Omit<ComponentPropsWithoutRef<
10
10
  */
11
11
  showArrow?: boolean;
12
12
  /** Properties to pass to the portal component. */
13
- portalProps?: Omit<ComponentPropsWithRef<typeof DropdownMenuPrimitive.Portal>, "forceMount">;
13
+ portalProps?: Omit<ComponentProps<typeof DropdownMenuPrimitive.Portal>, "forceMount">;
14
14
  /** Properties to pass to the arrow component. */
15
- arrowProps?: ComponentPropsWithRef<typeof DropdownMenuPrimitive.Arrow>;
15
+ arrowProps?: ComponentProps<typeof DropdownMenuPrimitive.Arrow>;
16
16
  /** Properties to pass to the menu list component. */
17
- menuListProps?: Omit<ComponentPropsWithRef<typeof MenuList>, "variant" | "iconPlacement" | "asChild">;
17
+ menuListProps?: Omit<MenuListProps, "variant" | "iconPlacement" | "asChild">;
18
18
  }
19
19
  /** The component that pops out when the dropdown menu is open. */
20
- export declare const DropdownMenuContent: import("react").ForwardRefExoticComponent<DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>>;
20
+ export declare function DropdownMenuContent({ variant, iconPlacement, showArrow, sideOffset, collisionPadding, forceMount, className, portalProps, arrowProps, menuListProps, children, ...otherProps }: DropdownMenuContentProps): import("react").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef } from "react";
2
+ import type { ComponentProps } from "react";
3
3
  import { type MenuListGroupProps } from "../MenuList";
4
4
  /** Properties of the dropdown menu group. */
5
- export interface DropdownMenuGroupProps extends Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>, "asChild">, Pick<MenuListGroupProps, "label" | "itemProps" | "labelProps"> {
5
+ export interface DropdownMenuGroupProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.Group>, "asChild">, Pick<MenuListGroupProps, "label" | "itemProps" | "labelProps"> {
6
6
  }
7
7
  /** Component used to group multiple dropdown menu items. */
8
- export declare const DropdownMenuGroup: import("react").ForwardRefExoticComponent<DropdownMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
8
+ export declare function DropdownMenuGroup({ label, itemProps, labelProps, className, ...otherProps }: DropdownMenuGroupProps): import("react").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef } from "react";
2
+ import { type ComponentProps } from "react";
3
3
  import { type MenuListItemProps } from "../MenuList";
4
4
  /** Properties of the dropdown menu item. */
5
- export interface DropdownMenuItemProps extends Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item>, "asChild" | "color">, Pick<MenuListItemProps, "selected" | "color" | "loading" | "loadingContent" | "showSpinner" | "icon" | "iconPlacement" | "keybinds" | "href" | "target" | "rel" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps" | "keybindsProps"> {
5
+ export interface DropdownMenuItemProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.Item>, "asChild" | "color">, Pick<MenuListItemProps, "selected" | "color" | "loading" | "loadingContent" | "showSpinner" | "icon" | "iconPlacement" | "keybinds" | "href" | "target" | "rel" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps" | "keybindsProps"> {
6
6
  /**
7
7
  * Render the item as a link. When set, you can pass `href`, `target`, and
8
8
  * `rel` properties to the item.
@@ -11,5 +11,5 @@ export interface DropdownMenuItemProps extends Omit<ComponentPropsWithoutRef<typ
11
11
  */
12
12
  asLink?: boolean;
13
13
  }
14
- /** Component containing a dropdown menu item. */
15
- export declare const DropdownMenuItem: import("react").ForwardRefExoticComponent<DropdownMenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
14
+ /** Dropdown menu item. */
15
+ export declare function DropdownMenuItem({ onSelect, asLink, selected, color, disabled, loading, loadingContent, showSpinner, icon, iconPlacement, keybinds, href, target, rel, actionProps, contentProps, iconProps, spinnerProps, keybindsProps, className, "aria-disabled": ariaDisabled, ...otherProps }: DropdownMenuItemProps): import("react").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef } from "react";
2
+ import type { ComponentProps } from "react";
3
3
  import { type MenuListGroupProps } from "../MenuList";
4
4
  /** Properties of the dropdown menu radio group. */
5
- export interface DropdownMenuRadioGroupProps extends Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>, "asChild">, Pick<MenuListGroupProps, "label" | "itemProps" | "labelProps"> {
5
+ export interface DropdownMenuRadioGroupProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>, "asChild">, Pick<MenuListGroupProps, "label" | "itemProps" | "labelProps"> {
6
6
  }
7
7
  /** Component used to group multiple dropdown menu radio items. */
8
- export declare const DropdownMenuRadioGroup: import("react").ForwardRefExoticComponent<DropdownMenuRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
8
+ export declare function DropdownMenuRadioGroup({ label, itemProps, labelProps, className, ...otherProps }: DropdownMenuRadioGroupProps): import("react").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
2
+ import { type ComponentProps } from "react";
3
3
  import { type MenuListItemProps } from "../MenuList";
4
4
  /** Properties of the dropdown menu radio item. */
5
- export interface DropdownMenuRadioItemProps extends Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>, "asChild" | "color">, Pick<MenuListItemProps, "color" | "loading" | "loadingContent" | "showSpinner" | "iconPlacement" | "keybinds" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps" | "keybindsProps"> {
5
+ export interface DropdownMenuRadioItemProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.RadioItem>, "asChild" | "color">, Pick<MenuListItemProps, "color" | "loading" | "loadingContent" | "showSpinner" | "iconPlacement" | "keybinds" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps" | "keybindsProps"> {
6
6
  /**
7
7
  * Whether to show the radio.
8
8
  *
@@ -10,7 +10,7 @@ export interface DropdownMenuRadioItemProps extends Omit<ComponentPropsWithoutRe
10
10
  */
11
11
  showRadio?: boolean;
12
12
  /** Properties to pass to the indicator component. */
13
- indicatorProps?: ComponentPropsWithRef<typeof DropdownMenuPrimitive.ItemIndicator>;
13
+ indicatorProps?: ComponentProps<typeof DropdownMenuPrimitive.ItemIndicator>;
14
14
  }
15
15
  /** A dropdown menu item that can be controlled and rendered like a radio. */
16
- export declare const DropdownMenuRadioItem: import("react").ForwardRefExoticComponent<DropdownMenuRadioItemProps & import("react").RefAttributes<HTMLDivElement>>;
16
+ export declare function DropdownMenuRadioItem({ showRadio, onSelect, color, disabled, loading, loadingContent, showSpinner, iconPlacement, keybinds, actionProps, contentProps, iconProps, spinnerProps, keybindsProps, indicatorProps, className, "aria-disabled": ariaDisabled, ...otherProps }: DropdownMenuRadioItemProps): import("react").JSX.Element;
@@ -1,3 +1,7 @@
1
1
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2
+ import type { ComponentProps } from "react";
3
+ /** Properties of the dropdown menu sub component. */
4
+ export interface DropdownMenuSubProps extends ComponentProps<typeof DropdownMenuPrimitive.Sub> {
5
+ }
2
6
  /** Container used to render a submenu. */
3
7
  export declare const DropdownMenuSub: import("react").FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
@@ -1,13 +1,13 @@
1
1
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
3
- import { MenuList, type MenuListProps } from "../MenuList";
2
+ import type { ComponentProps } from "react";
3
+ import { type MenuListProps } from "../MenuList";
4
4
  /** Properties of the dropdown menu sub content component. */
5
- export interface DropdownMenuSubContentProps extends Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>, "asChild">, Pick<MenuListProps, "variant" | "iconPlacement"> {
5
+ export interface DropdownMenuSubContentProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.SubContent>, "asChild">, Pick<MenuListProps, "variant" | "iconPlacement"> {
6
6
  /** Properties to pass to the menu list component. */
7
- menuListProps?: Omit<ComponentPropsWithRef<typeof MenuList>, "variant" | "iconPlacement" | "asChild">;
7
+ menuListProps?: Omit<MenuListProps, "variant" | "iconPlacement" | "asChild">;
8
8
  }
9
9
  /**
10
10
  * The component that pops out when a submenu is open. Must be rendered inside
11
11
  * `DropdownMenuSub`.
12
12
  */
13
- export declare const DropdownMenuSubContent: import("react").ForwardRefExoticComponent<DropdownMenuSubContentProps & import("react").RefAttributes<HTMLDivElement>>;
13
+ export declare function DropdownMenuSubContent({ variant, iconPlacement, sideOffset, alignOffset, className, children, menuListProps, ...otherProps }: DropdownMenuSubContentProps): import("react").JSX.Element;