@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
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from "react";
2
+ /** Properties of the helper text provider component. */
3
+ export interface HelperTextProviderProps {
4
+ children?: ReactNode;
5
+ }
6
+ /**
7
+ * Component providing context necessary for form controls aware of helper
8
+ * texts.
9
+ *
10
+ * The `Field` component uses this component internally. As such, it is seldom
11
+ * necessary to use it manually.
12
+ */
13
+ export declare function HelperTextProvider({ children }: HelperTextProviderProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /** Hook exposing whether the `id`s of helper texts. */
2
+ export declare function useHelperTextIds(): string[] | undefined;
@@ -1 +1,3 @@
1
1
  export * from "./HelperText.tsx";
2
+ export * from "./HelperTextProvider.tsx";
3
+ export * from "./helperTextUtils.ts";
@@ -1,6 +1,6 @@
1
1
  import type { IconProp } from "@fortawesome/fontawesome-svg-core";
2
2
  import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
3
- import { type ComponentPropsWithoutRef, type ReactNode } from "react";
3
+ import type { ComponentProps, ReactNode } from "react";
4
4
  import type { AccentColor } from "../../utils/accent.ts";
5
5
  export type { IconProp } from "@fortawesome/fontawesome-svg-core";
6
6
  /** Possible sizes of an icon. */
@@ -8,7 +8,7 @@ export type IconSize = "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
8
8
  /** Possible colours of an icon. */
9
9
  export type IconColor = AccentColor;
10
10
  /** Properties of the icon component. */
11
- export interface IconProps extends Omit<ComponentPropsWithoutRef<typeof FontAwesomeIcon>, "icon" | "size"> {
11
+ export interface IconProps extends Omit<ComponentProps<typeof FontAwesomeIcon>, "icon" | "size"> {
12
12
  /** Icon to display. */
13
13
  icon: IconProp;
14
14
  /**
@@ -53,4 +53,4 @@ export interface IconProps extends Omit<ComponentPropsWithoutRef<typeof FontAwes
53
53
  * }
54
54
  * ```
55
55
  */
56
- export declare const Icon: import("react").NamedExoticComponent<IconProps & import("react").RefAttributes<SVGSVGElement>>;
56
+ export declare function Icon({ size, color, label, className, ...otherProps }: IconProps): import("react").JSX.Element;
@@ -1,11 +1,12 @@
1
- import { type ComponentPropsWithRef, type ReactElement, type ReactNode } from "react";
1
+ import { type ReactElement, type ReactNode } from "react";
2
2
  import { type KeyboardShortcutKeybinds } from "../../utils/keyboardShortcut.ts";
3
- import type { PolymorphicComponent, PolymorphicProps } from "../../utils/polymorphicTypes.ts";
3
+ import type { PolymorphicProps } from "../../utils/polymorphicTypes.ts";
4
4
  import type { ButtonAs, ButtonColor, ButtonSize, ButtonVariant } from "../Button";
5
- import { Icon, type IconProp } from "../Icon";
6
- import { Spinner } from "../Spinner";
7
- import { Tooltip } from "../Tooltip";
8
- import { VisuallyHidden } from "../VisuallyHidden";
5
+ import { type IconProp, type IconProps } from "../Icon";
6
+ import { type KeybindsProps } from "../Keybinds";
7
+ import { type SpinnerProps } from "../Spinner";
8
+ import { type TooltipProps } from "../Tooltip";
9
+ import { type VisuallyHiddenProps } from "../VisuallyHidden";
9
10
  /** Elements an icon button can be rendered as. */
10
11
  export type IconButtonAs = ButtonAs;
11
12
  /** Icon button variants. */
@@ -72,8 +73,7 @@ export interface IconButtonOwnProps {
72
73
  *
73
74
  * When `true`, the button is “soft-disabled”: it looks disabled and ignores
74
75
  * user interaction but remains focusable. By default, a spinner is shown as
75
- * the button's icon (_i.e._, `showSpinner` is set to `true` unless
76
- * overridden).
76
+ * the button's icon (i.e. `showSpinner` is set to `true` unless overridden).
77
77
  *
78
78
  * The button's label while loading can be controlled via `loadingLabel`.
79
79
  *
@@ -127,19 +127,19 @@ export interface IconButtonOwnProps {
127
127
  *
128
128
  * > **Note:** This property does **not** automatically register a keyboard
129
129
  * > shortcut to run the icon button's action. This should be done manually via
130
- * > _e.g._ the `useKeyboardShortcut` hook.
130
+ * > e.g. the `useKeyboardShortcut` hook.
131
131
  */
132
132
  keybinds?: KeyboardShortcutKeybinds;
133
133
  /** Properties to pass to the `Icon` component. */
134
- iconProps?: Omit<ComponentPropsWithRef<typeof Icon>, "icon" | "label">;
134
+ iconProps?: Omit<IconProps, "icon" | "label">;
135
135
  /** Properties to pass to the `VisuallyHidden` label component. */
136
- labelProps?: Omit<ComponentPropsWithRef<typeof VisuallyHidden>, "children">;
136
+ labelProps?: Omit<VisuallyHiddenProps, "children">;
137
137
  /** Properties to pass to the `Spinner` component. */
138
- spinnerProps?: ComponentPropsWithRef<typeof Spinner>;
138
+ spinnerProps?: SpinnerProps;
139
139
  /** Properties to pass to the `Tooltip` component. */
140
- tooltipProps?: Omit<ComponentPropsWithRef<typeof Tooltip>, "content" | "children">;
140
+ tooltipProps?: Omit<TooltipProps, "content" | "children">;
141
141
  /** Properties to pass to the keybinds component. */
142
- keybindsProps?: ComponentPropsWithRef<"div">;
142
+ keybindsProps?: Omit<KeybindsProps, "keybinds">;
143
143
  }
144
144
  /**
145
145
  * The icon button component renders a button containing a single icon. Use it
@@ -151,8 +151,8 @@ export interface IconButtonOwnProps {
151
151
  *
152
152
  * Built on top of the browser's [`<button>`
153
153
  * element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button),
154
- * [`Icon` component](?path=/docs/ostack-ui-data-display-icon--docs), and
155
- * [`Tooltip` component](?path=/docs/ostack-ui-overlay-tooltip--docs).
154
+ * [`Icon` component](/docs/ostack-ui-data-display-icon--docs), and [`Tooltip`
155
+ * component](/docs/ostack-ui-overlay-tooltip--docs).
156
156
  *
157
157
  * Example usage:
158
158
  *
@@ -171,4 +171,4 @@ export interface IconButtonOwnProps {
171
171
  * }
172
172
  * ```
173
173
  */
174
- export declare const IconButton: PolymorphicComponent<IconButtonAs, "button", IconButtonOwnProps>;
174
+ export declare function IconButton<TAs extends IconButtonAs = "button">({ as, asChild, variant, color, size, circle, icon, label, active, disabled, loading, loadingLabel, showSpinner, tooltipContent, keybinds, iconProps, labelProps, spinnerProps, tooltipProps, keybindsProps, type, onClick, className, children, "aria-disabled": ariaDisabled, ...otherProps }: IconButtonProps<TAs>): import("react").JSX.Element;
@@ -43,4 +43,4 @@ export type InputProps = InputSingleFileProps | InputMultipleFileProps | InputNo
43
43
  * }
44
44
  * ```
45
45
  */
46
- export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
46
+ export declare function Input({ type, multiple, name, defaultValue, value, status, disabled, validate, validationMode, onValueChange, onBlurToOutside, ...otherProps }: InputProps): import("react").JSX.Element;
@@ -1,5 +1,6 @@
1
- import { type ComponentPropsWithoutRef, type ReactNode } from "react";
2
- export interface KeybindsProps extends Omit<ComponentPropsWithoutRef<"span">, "children"> {
1
+ import { type ComponentProps, type ReactNode } from "react";
2
+ /** Properties of the keybinds component. */
3
+ export interface KeybindsProps extends Omit<ComponentProps<"span">, "children"> {
3
4
  keybinds: string | string[] | null | undefined;
4
5
  /**
5
6
  * Limits the number of keybinds to display. Must be >= 1. By default, all
@@ -17,4 +18,8 @@ export interface KeybindsProps extends Omit<ComponentPropsWithoutRef<"span">, "c
17
18
  /** Accessible key labels to use instead of the default ones. */
18
19
  keyLabels?: Record<string, ReactNode>;
19
20
  }
20
- export declare const Keybinds: import("react").ForwardRefExoticComponent<KeybindsProps & import("react").RefAttributes<HTMLSpanElement>>;
21
+ /**
22
+ * Component which visually renders
23
+ * [`tinykeys`](https://jamiebuilds.github.io/tinykeys) keybinds.
24
+ */
25
+ export declare function Keybinds({ keybinds, limit, keybindsSeparatorLabel, keyPressesSeparatorLabel, keySymbols, keyLabels, className, ...otherProps }: KeybindsProps): import("react").JSX.Element | null;
@@ -1,6 +1,6 @@
1
- import { type ComponentPropsWithoutRef } from "react";
1
+ import type { ComponentProps } from "react";
2
2
  /** Properties of the keyboard component. */
3
- export interface KeyboardProps extends ComponentPropsWithoutRef<"kbd"> {
3
+ export interface KeyboardProps extends ComponentProps<"kbd"> {
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
@@ -27,4 +27,4 @@ export interface KeyboardProps extends ComponentPropsWithoutRef<"kbd"> {
27
27
  * }
28
28
  * ```
29
29
  */
30
- export declare const Keyboard: import("react").ForwardRefExoticComponent<KeyboardProps & import("react").RefAttributes<HTMLElement>>;
30
+ export declare function Keyboard({ asChild, className, ...otherProps }: KeyboardProps): import("react").JSX.Element;
@@ -1,10 +1,10 @@
1
1
  import { Label as LabelPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from "react";
3
- import { Icon } from "../Icon";
4
- import { IconButton } from "../IconButton";
5
- import { Popover, PopoverContent } from "../Popover";
2
+ import type { ComponentProps, ReactNode } from "react";
3
+ import { type IconProps } from "../Icon";
4
+ import { type IconButtonProps } from "../IconButton";
5
+ import { type PopoverContentProps, type PopoverProps } from "../Popover";
6
6
  /** Properties of the label component. */
7
- export interface LabelProps extends ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {
7
+ export interface LabelProps extends ComponentProps<typeof LabelPrimitive.Root> {
8
8
  /** Shows a "required" symbol next to the label. */
9
9
  required?: boolean;
10
10
  /** Optional helper text displayed as a popover triggered by an icon button. */
@@ -12,24 +12,24 @@ export interface LabelProps extends ComponentPropsWithoutRef<typeof LabelPrimiti
12
12
  /** Label of the helper button announced to assistive technologies. */
13
13
  helperButtonLabel?: string;
14
14
  /** Properties to pass to the container element. */
15
- containerProps?: ComponentPropsWithRef<"div">;
15
+ containerProps?: ComponentProps<"div">;
16
16
  /** Properties to pass to the required icon container element. */
17
- requiredIconContainerProps?: ComponentPropsWithRef<"span">;
17
+ requiredIconContainerProps?: ComponentProps<"span">;
18
18
  /** Properties to pass to the required icon component. */
19
- requiredIconProps?: Omit<ComponentPropsWithRef<typeof Icon>, "icon">;
19
+ requiredIconProps?: Omit<IconProps, "icon">;
20
20
  /** Properties to pass to the helper button component. */
21
- helperButtonProps?: Omit<ComponentPropsWithRef<typeof IconButton<"button">>, "icon">;
21
+ helperButtonProps?: Omit<IconButtonProps, "icon">;
22
22
  /** Properties to pass to the helper popover component. */
23
- helperPopoverProps?: ComponentPropsWithRef<typeof Popover>;
23
+ helperPopoverProps?: PopoverProps;
24
24
  /** Properties to pass to the helper popover content component. */
25
- helperPopoverContentProps?: ComponentPropsWithRef<typeof PopoverContent>;
25
+ helperPopoverContentProps?: PopoverContentProps;
26
26
  }
27
27
  /**
28
28
  * The `Label` component renders an accessible label which can be associated
29
29
  * with form controls.
30
30
  *
31
- * It should typically be used within a `Field` component together with a
32
- * control (`Input`, `Checkbox`, `Select`, _etc._), in which case the label will
31
+ * It should typically be used within a `Field` component together with a form
32
+ * control (`Input`, `TextArea`, `Select`, etc.), in which case the label will
33
33
  * be automatically associated with its respective control.
34
34
  *
35
35
  * Example usage:
@@ -42,4 +42,4 @@ export interface LabelProps extends ComponentPropsWithoutRef<typeof LabelPrimiti
42
42
  * }
43
43
  * ```
44
44
  */
45
- export declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<HTMLLabelElement>>;
45
+ export declare function Label({ asChild, required, helperText, helperButtonLabel, htmlFor, id, className, children, containerProps, requiredIconProps, requiredIconContainerProps, helperButtonProps, helperPopoverProps, helperPopoverContentProps, onClick, ...otherProps }: LabelProps): import("react").JSX.Element;
@@ -0,0 +1,45 @@
1
+ import { type ReactNode } from "react";
2
+ /** Value of the label context. */
3
+ export type LabelContextValue = LabelStore;
4
+ /** State of the label context. */
5
+ export interface LabelState {
6
+ label?: ReactNode;
7
+ labelId?: string;
8
+ controlId?: string;
9
+ controlTagName?: string;
10
+ controlRequired: boolean;
11
+ }
12
+ /** Label store. */
13
+ export type LabelStore = ReturnType<typeof useCreateLabelContext>;
14
+ /** Label context. */
15
+ export declare const LabelContext: import("react").Context<(Omit<import("zustand").StoreApi<LabelState>, "subscribe"> & {
16
+ subscribe: {
17
+ (listener: (selectedState: LabelState, previousSelectedState: LabelState) => void): () => void;
18
+ <U>(selector: (state: LabelState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
19
+ equalityFn?: ((a: U, b: U) => boolean) | undefined;
20
+ fireImmediately?: boolean;
21
+ } | undefined): () => void;
22
+ };
23
+ }) | null>;
24
+ /** Hook which creates the label context value. */
25
+ export declare function useCreateLabelContext(): Omit<import("zustand").StoreApi<LabelState>, "subscribe"> & {
26
+ subscribe: {
27
+ (listener: (selectedState: LabelState, previousSelectedState: LabelState) => void): () => void;
28
+ <U>(selector: (state: LabelState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
29
+ equalityFn?: ((a: U, b: U) => boolean) | undefined;
30
+ fireImmediately?: boolean;
31
+ } | undefined): () => void;
32
+ };
33
+ };
34
+ /** Hook returning the label's context value. */
35
+ export declare function useLabelContext(): LabelContextValue | null;
36
+ /** Hook that returns access to the label's store. */
37
+ export declare function useLabelStore<T>(selector: (state: Partial<LabelState>) => T): T;
38
+ /** Hook that registers a label and returns its identifier. */
39
+ export declare function useRegisterLabel(label: ReactNode, labelId: string | undefined): string | undefined;
40
+ /** Hook exposing whether the `id` of a control. */
41
+ export declare function useLabelControlId(): string | undefined;
42
+ /** Hook exposing whether the `tagName` of a control. */
43
+ export declare function useLabelControlTagName(): string | undefined;
44
+ /** Hook exposing whether a control is marked as required. */
45
+ export declare function useLabelControlRequired(): boolean | undefined;
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from "react";
2
+ /** Properties of the label provider component. */
3
+ export interface LabelProviderProps {
4
+ children?: ReactNode;
5
+ }
6
+ /**
7
+ * Component providing context necessary for form controls aware of labels and
8
+ * vice versa.
9
+ *
10
+ * The `Field` component uses this component internally. As such, it is seldom
11
+ * necessary to use it manually.
12
+ */
13
+ export declare function LabelProvider({ children }: LabelProviderProps): import("react").JSX.Element;
@@ -1 +1,3 @@
1
1
  export * from "./Label.tsx";
2
+ export * from "./LabelProvider.tsx";
3
+ export * from "./labelUtils.ts";
@@ -0,0 +1,23 @@
1
+ import { type ReactNode } from "react";
2
+ /** Hook exposing whether a component is being rendered within a label provider. */
3
+ export declare function useIsInLabelProvider(): boolean;
4
+ /** Hook exposing the label's `children`. */
5
+ export declare function useLabel(): ReactNode;
6
+ /** Hook exposing the label's id. */
7
+ export declare function useLabelId(): string | undefined;
8
+ /** Options available to the {@link useOnLabelChange} hook. */
9
+ export interface UseOnLabelChangeOptions {
10
+ /**
11
+ * Whether to run the callback immediately with the current label.
12
+ *
13
+ * @default true
14
+ */
15
+ fireImmediately?: boolean;
16
+ }
17
+ /** Hook which runs the provided callback whenever the label's label changes. */
18
+ export declare function useOnLabelChange(cb: (label: ReactNode) => (() => void) | void, { fireImmediately }?: UseOnLabelChangeOptions): void;
19
+ /**
20
+ * Hook that registers whether a control is marked as required. Returns whether
21
+ * there is a label provider to register in.
22
+ */
23
+ export declare function useRegisterControlInLabelProvider(id: string, tagName?: string, required?: boolean): boolean;
@@ -1,9 +1,9 @@
1
- import { type ComponentPropsWithoutRef, type ReactNode } from "react";
2
- import { Slot } from "../Slot";
1
+ import { type ReactNode } from "react";
2
+ import { type SlotProps } from "../Slot";
3
3
  /** Available z-index names. */
4
4
  export type LayerZIndex = "docked" | "dropdown" | "sticky" | "banner" | "overlay" | "dialog" | "popover" | "skipLink" | "toast" | "tooltip";
5
5
  /** Properties of the layer component. */
6
- export interface LayerProps extends ComponentPropsWithoutRef<typeof Slot> {
6
+ export interface LayerProps extends SlotProps {
7
7
  /** Z-index of the layer. */
8
8
  zIndex?: LayerZIndex | number | (LayerZIndex | number)[];
9
9
  /** Resets the stacking context. */
@@ -14,8 +14,8 @@ export interface LayerProps extends ComponentPropsWithoutRef<typeof Slot> {
14
14
  * The layer component manages hierarchical stacking contexts by tracking and
15
15
  * adding up z-index values.
16
16
  *
17
- * All ostack/UI overlays (dialogs, dropdown menus, _etc._) are rendered within
18
- * a layer, allowing them to be nested.
17
+ * All ostack/UI overlays (dialogs, dropdown menus, etc.) are rendered within a
18
+ * layer, allowing them to be nested.
19
19
  *
20
20
  * Example usage:
21
21
  *
@@ -1,7 +1,6 @@
1
- import { type ComponentPropsWithRef } from "react";
2
1
  import type { AccentColor } from "../../utils/accent.ts";
3
- import type { PolymorphicComponent, PolymorphicProps } from "../../utils/polymorphicTypes.ts";
4
- import { Icon, type IconProp } from "../Icon";
2
+ import type { PolymorphicProps } from "../../utils/polymorphicTypes.ts";
3
+ import { type IconProp, type IconProps } from "../Icon";
5
4
  /** Elements a link can be rendered as. */
6
5
  export type LinkAs = "a" | "button";
7
6
  /** Link variants. */
@@ -40,7 +39,7 @@ export interface LinkOwnProps {
40
39
  /** Link icon. By default, only `external` links have an icon. */
41
40
  icon?: IconProp | null;
42
41
  /** Properties to pass to the icon component. */
43
- iconProps?: Omit<ComponentPropsWithRef<typeof Icon>, "icon">;
42
+ iconProps?: Omit<IconProps, "icon">;
44
43
  }
45
44
  /**
46
45
  * The link component, with its `href` property, is used to create a hyperlink
@@ -58,4 +57,4 @@ export interface LinkOwnProps {
58
57
  * }
59
58
  * ```
60
59
  */
61
- export declare const Link: PolymorphicComponent<LinkAs, "a", LinkOwnProps>;
60
+ export declare function Link<TAs extends LinkAs = "a">({ as, asChild, type, color, variant, external, icon, iconProps, className, children, ...otherProps }: LinkProps<TAs>): import("react").JSX.Element;
@@ -1,9 +1,9 @@
1
- import { type ComponentPropsWithoutRef } from "react";
1
+ import type { ComponentProps } from "react";
2
2
  import type { AccentColor } from "../../utils/accent.ts";
3
3
  /** Possible mark colours. */
4
4
  export type MarkColor = AccentColor;
5
5
  /** Properties of the mark component. */
6
- export interface MarkProps extends ComponentPropsWithoutRef<"mark"> {
6
+ export interface MarkProps extends ComponentProps<"mark"> {
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
@@ -38,4 +38,4 @@ export interface MarkProps extends ComponentPropsWithoutRef<"mark"> {
38
38
  * }
39
39
  * ```
40
40
  */
41
- export declare const Mark: import("react").ForwardRefExoticComponent<MarkProps & import("react").RefAttributes<HTMLElement>>;
41
+ export declare function Mark({ asChild, color, className, ...otherProps }: MarkProps): import("react").JSX.Element;
@@ -1,10 +1,10 @@
1
- import { type ComponentPropsWithoutRef } from "react";
1
+ import type { ComponentProps } from "react";
2
2
  /** Menu list variants. */
3
3
  export type MenuListVariant = "solid" | "subtle";
4
4
  /** Placement of icons within menu list items. */
5
5
  export type MenuListIconPlacement = "start" | "end";
6
6
  /** Properties of the menu list component. */
7
- export interface MenuListProps extends ComponentPropsWithoutRef<"ul"> {
7
+ export interface MenuListProps extends ComponentProps<"ul"> {
8
8
  /**
9
9
  * Change the component to the HTML tag or custom component of the only child.
10
10
  * This will merge the original component props with the props of the supplied
@@ -50,4 +50,4 @@ export interface MenuListProps extends ComponentPropsWithoutRef<"ul"> {
50
50
  * }
51
51
  * ```
52
52
  */
53
- export declare const MenuList: import("react").ForwardRefExoticComponent<MenuListProps & import("react").RefAttributes<HTMLUListElement>>;
53
+ export declare function MenuList({ asChild, variant, iconPlacement, className, ...otherProps }: MenuListProps): import("react").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ElementType, type ReactNode } from "react";
1
+ import { type ComponentProps, type ElementType, type ReactNode } from "react";
2
2
  /** Properties of the menu list group component. */
3
- export interface MenuListGroupProps extends ComponentPropsWithoutRef<"ul"> {
3
+ export interface MenuListGroupProps extends ComponentProps<"ul"> {
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
@@ -16,9 +16,9 @@ export interface MenuListGroupProps extends ComponentPropsWithoutRef<"ul"> {
16
16
  */
17
17
  itemAs?: ElementType;
18
18
  /** Properties to pass to the item element containing the group. */
19
- itemProps?: ComponentPropsWithRef<"li">;
19
+ itemProps?: ComponentProps<"li">;
20
20
  /** Properties to pass to the label element. */
21
- labelProps?: ComponentPropsWithRef<"div">;
21
+ labelProps?: ComponentProps<"div">;
22
22
  }
23
23
  /** Menu list group component. */
24
- export declare const MenuListGroup: import("react").ForwardRefExoticComponent<MenuListGroupProps & import("react").RefAttributes<HTMLUListElement>>;
24
+ export declare function MenuListGroup({ asChild, label, itemAs, className, itemProps, labelProps, children, ...otherProps }: MenuListGroupProps): import("react").JSX.Element;
@@ -1,16 +1,16 @@
1
- import { type ComponentProps, type ComponentPropsWithoutRef, type ComponentPropsWithRef, type MouseEvent, type ReactElement, type ReactNode } from "react";
1
+ import { type ComponentProps, type MouseEvent, type ReactElement, type ReactNode } from "react";
2
2
  import type { AccentColor } from "../../utils/accent.ts";
3
3
  import { type KeyboardShortcutKeybinds } from "../../utils/keyboardShortcut.ts";
4
- import { Icon, type IconProp } from "../Icon";
5
- import { Keybinds } from "../Keybinds";
6
- import { Spinner } from "../Spinner";
4
+ import { type IconProp, type IconProps } from "../Icon";
5
+ import { type KeybindsProps } from "../Keybinds";
6
+ import { type SpinnerProps } from "../Spinner";
7
7
  import type { MenuListIconPlacement } from "./MenuList.tsx";
8
8
  /** Elements a menu list item's action can be rendered as. */
9
9
  export type MenuListItemType = "button" | "link" | "text";
10
10
  /** Menu list item colours. */
11
11
  export type MenuListItemColor = AccentColor;
12
12
  /** Properties of the menu list item component. */
13
- export interface MenuListItemProps extends Omit<ComponentPropsWithoutRef<"li">, "onSelect"> {
13
+ export interface MenuListItemProps extends Omit<ComponentProps<"li">, "onSelect"> {
14
14
  /**
15
15
  * Change the component to the HTML tag or custom component of the only child.
16
16
  * This will merge the original component props with the props of the supplied
@@ -44,8 +44,7 @@ export interface MenuListItemProps extends Omit<ComponentPropsWithoutRef<"li">,
44
44
  *
45
45
  * When `true`, the item is “soft-disabled”: it looks disabled and ignores
46
46
  * user interaction but remains focusable. By default, a spinner is shown as
47
- * the item's icon (_i.e._, `showSpinner` is set to `true` unless
48
- * overridden).
47
+ * the item's icon (i.e. `showSpinner` is set to `true` unless overridden).
49
48
  *
50
49
  * The item's content while loading can be controlled via `loadingContent`.
51
50
  * The position of the spinner may be controlled via `iconPlacement`.
@@ -95,7 +94,7 @@ export interface MenuListItemProps extends Omit<ComponentPropsWithoutRef<"li">,
95
94
  * `aria-keyshortcuts`.
96
95
  *
97
96
  * > **Note:** This property does **not** automatically register a keyboard
98
- * > shortcut to run the item's action. This should be done manually via _e.g._
97
+ * > shortcut to run the item's action. This should be done manually via e.g.
99
98
  * > the `useKeyboardShortcut` hook.
100
99
  */
101
100
  keybinds?: KeyboardShortcutKeybinds;
@@ -106,15 +105,15 @@ export interface MenuListItemProps extends Omit<ComponentPropsWithoutRef<"li">,
106
105
  /** Rel of the link, when `type` is set to `"link"`. */
107
106
  rel?: ComponentProps<"a">["rel"];
108
107
  /** Properties to pass to the action element of the item. */
109
- actionProps?: Omit<ComponentPropsWithRef<"button" | "a" | "div">, "disabled" | "href" | "target" | "rel">;
108
+ actionProps?: Omit<ComponentProps<"button" | "a" | "div">, "disabled" | "href" | "target" | "rel">;
110
109
  /** Properties to pass to the content element of the item. */
111
- contentProps?: ComponentPropsWithRef<"div">;
110
+ contentProps?: ComponentProps<"div">;
112
111
  /** Properties to pass to the icon component. */
113
- iconProps?: Omit<ComponentPropsWithRef<typeof Icon>, "icon">;
112
+ iconProps?: Omit<IconProps, "icon">;
114
113
  /** Properties to pass to the spinner component. */
115
- spinnerProps?: ComponentPropsWithRef<typeof Spinner>;
114
+ spinnerProps?: SpinnerProps;
116
115
  /** Properties to pass to the keybinds component. */
117
- keybindsProps?: ComponentPropsWithRef<typeof Keybinds>;
116
+ keybindsProps?: Omit<KeybindsProps, "keybinds">;
118
117
  }
119
118
  /** Menu list item component. */
120
- export declare const MenuListItem: import("react").ForwardRefExoticComponent<MenuListItemProps & import("react").RefAttributes<HTMLLIElement>>;
119
+ export declare function MenuListItem({ asChild, type, selected, onSelect, color, disabled, loading, loadingContent, showSpinner, icon, iconPlacement, keybinds, href, target, rel, actionProps, contentProps, iconProps, spinnerProps, keybindsProps, className, children, "aria-disabled": ariaDisabled, ...otherProps }: MenuListItemProps): import("react").JSX.Element;
@@ -24,7 +24,8 @@ export interface NumericInputProps extends NumericTransformerOptions, Omit<Contr
24
24
  valueIsUnformattedString?: boolean;
25
25
  /**
26
26
  * Specifies the precision of a number, set to `null` to have no limit on
27
- * precision.
27
+ * precision. When provided, a `scale` must also be set and will default to
28
+ * `0` otherwise.
28
29
  *
29
30
  * @default null
30
31
  */
@@ -75,9 +76,8 @@ export interface NumericValueRepresentations {
75
76
  }
76
77
  /**
77
78
  * The numeric input component is used to collect numeric user input. It is
78
- * built on top of the [`Input`
79
- * component](?path=/docs/ostack-ui-forms-input--docs) and the
80
- * [`react-number-format`
79
+ * built on top of the [`Input` component](/docs/ostack-ui-forms-input--docs)
80
+ * and the [`react-number-format`
81
81
  * library](https://s-yadav.github.io/react-number-format/).
82
82
  *
83
83
  * It supports specifying the precision, scale, separators, grouping of digits,
@@ -97,4 +97,4 @@ export interface NumericValueRepresentations {
97
97
  * }
98
98
  * ```
99
99
  */
100
- export declare const NumericInput: import("react").ForwardRefExoticComponent<NumericInputProps & import("react").RefAttributes<HTMLInputElement>>;
100
+ export declare function NumericInput({ name, defaultValue, value: controlledValue, valueIsUnformattedString, valueIsInteger, onValueChange, onBlurToOutside, precision, scale, fixedScale, decimalSeparator, groupDigits, groupingStyle, groupSeparator, prefix, suffix, min, max, exclusiveMin, exclusiveMax, validate, validationMode, required, disabled, readOnly, status, autoComplete, form, ref, ...otherProps }: NumericInputProps): import("react").JSX.Element;
@@ -19,6 +19,6 @@ export declare function valueToStringValue(value: string | number | bigint | nul
19
19
  * Converts the `react-number-format` values representation into our own
20
20
  * representation, while handling the case of integer values with a scale.
21
21
  */
22
- export declare function transformNumberFormatValues({ formattedValue, value, floatValue }: NumberFormatValues, valueIsInteger: boolean, scale: number | undefined): NumericValueRepresentations;
22
+ export declare function transformNumberFormatValues({ formattedValue, value, floatValue }: NumberFormatValues, valueIsInteger: boolean, scale: number | null | undefined): NumericValueRepresentations;
23
23
  /** Transforms the numeric scale into a `step` value. */
24
- export declare function scaleToStep(valueIsInteger: boolean, scale: number | undefined): string | undefined;
24
+ export declare function scaleToStep(valueIsInteger: boolean, scale: number | null | undefined): string | undefined;
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from "react";
1
+ import type { ReactNode } from "react";
2
2
  import { type ControlOutputProps } from "../Control";
3
3
  /** Properties of the output component. */
4
4
  export interface OutputProps extends Omit<ControlOutputProps, "asChild" | "disabled" | "loading" | "loadingDescription" | "showClearButton" | "clearButtonLabel" | "onValueChange" | "onBlurToOutside" | "clearButtonProps"> {
@@ -40,4 +40,4 @@ export interface OutputProps extends Omit<ControlOutputProps, "asChild" | "disab
40
40
  * }
41
41
  * ```
42
42
  */
43
- export declare const Output: import("react").ForwardRefExoticComponent<OutputProps & import("react").RefAttributes<HTMLOutputElement>>;
43
+ export declare function Output({ pending, pendingContent, showSpinner, className, children, ...otherProps }: OutputProps): import("react").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { type ComponentPropsWithoutRef } from "react";
1
+ import type { ComponentProps } from "react";
2
2
  /** Properties of the label component. */
3
- export interface OverlayProps extends ComponentPropsWithoutRef<"div"> {
3
+ export interface OverlayProps extends ComponentProps<"div"> {
4
4
  }
5
5
  /** Internal component used by dialogs to overlay content. */
6
- export declare const Overlay: import("react").ForwardRefExoticComponent<OverlayProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ export declare function Overlay({ className, ...otherProps }: OverlayProps): import("react").JSX.Element;
@@ -1,4 +1,8 @@
1
1
  import { Popover as PopoverPrimitive } from "radix-ui";
2
+ import type { ComponentProps } from "react";
3
+ /** Properties of the popover component. */
4
+ export interface PopoverProps extends ComponentProps<typeof PopoverPrimitive.Root> {
5
+ }
2
6
  /**
3
7
  * The popover component displays content in a floating pop-up, triggered by a
4
8
  * button. Built on top of the [Radix Popover
@@ -1,4 +1,8 @@
1
1
  import { Popover as PopoverPrimitive } from "radix-ui";
2
+ import type { ComponentProps } from "react";
3
+ /** Properties of the popover anchor component. */
4
+ export interface PopoverAnchorProps extends ComponentProps<typeof PopoverPrimitive.Anchor> {
5
+ }
2
6
  /**
3
7
  * An optional element to position the `PopoverContent` against. If this part is
4
8
  * not used, the content will position alongside the `PopoverTrigger`.
@@ -1,14 +1,14 @@
1
- import { type ComponentPropsWithoutRef, type ReactNode } from "react";
2
- import { CloseButton } from "../CloseButton";
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import { type CloseButtonProps } from "../CloseButton";
3
3
  /** Properties of the popover close component. */
4
4
  export type PopoverCloseProps = PopoverCloseChildlessProps | PopoverCloseChildrenProps;
5
5
  /** Properties of the popover close component when rendered without children. */
6
- export interface PopoverCloseChildlessProps extends Omit<ComponentPropsWithoutRef<typeof CloseButton>, "asChild"> {
6
+ export interface PopoverCloseChildlessProps extends Omit<CloseButtonProps, "asChild"> {
7
7
  children?: never;
8
8
  }
9
9
  /** Properties of the popover close component when rendered with children. */
10
- export interface PopoverCloseChildrenProps extends ComponentPropsWithoutRef<"button"> {
10
+ export interface PopoverCloseChildrenProps extends ComponentProps<"button"> {
11
11
  children: ReactNode;
12
12
  }
13
13
  /** The button that closes an open popover. */
14
- export declare const PopoverClose: import("react").ForwardRefExoticComponent<PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
14
+ export declare function PopoverClose({ children, ...otherProps }: PopoverCloseProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { Popover as PopoverPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
2
+ import type { ComponentProps } from "react";
3
3
  /** Properties of the popover content component. */
4
- export interface PopoverContentProps extends ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
4
+ export interface PopoverContentProps extends ComponentProps<typeof PopoverPrimitive.Content> {
5
5
  /**
6
6
  * Whether to show an arrow pointing to the anchor.
7
7
  *
@@ -9,9 +9,9 @@ export interface PopoverContentProps extends ComponentPropsWithoutRef<typeof Pop
9
9
  */
10
10
  showArrow?: boolean;
11
11
  /** Properties to pass to the portal component. */
12
- portalProps?: Omit<ComponentPropsWithRef<typeof PopoverPrimitive.Portal>, "forceMount">;
12
+ portalProps?: Omit<ComponentProps<typeof PopoverPrimitive.Portal>, "forceMount">;
13
13
  /** Properties to pass to the arrow component. */
14
- arrowProps?: ComponentPropsWithRef<typeof PopoverPrimitive.Arrow>;
14
+ arrowProps?: ComponentProps<typeof PopoverPrimitive.Arrow>;
15
15
  }
16
16
  /** The component that pops out when the popover is open. */
17
- export declare const PopoverContent: import("react").ForwardRefExoticComponent<PopoverContentProps & import("react").RefAttributes<HTMLDivElement>>;
17
+ export declare function PopoverContent({ showArrow, sideOffset, collisionPadding, forceMount, className, portalProps, arrowProps, children, ...otherProps }: PopoverContentProps): import("react").JSX.Element;