@ostack.tech/ui 0.1.2 → 0.2.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 (207) hide show
  1. package/dist/chunks/en-lyNzumTm.js +105 -0
  2. package/dist/chunks/en-lyNzumTm.js.map +1 -0
  3. package/dist/locales/en-GB.js +16 -0
  4. package/dist/locales/en-GB.js.map +1 -0
  5. package/dist/locales/en-US.js +16 -0
  6. package/dist/locales/en-US.js.map +1 -0
  7. package/dist/locales/fr.js +110 -0
  8. package/dist/locales/fr.js.map +1 -0
  9. package/dist/locales/pt.js +110 -0
  10. package/dist/locales/pt.js.map +1 -0
  11. package/dist/ostack-ui.js +6151 -6401
  12. package/dist/ostack-ui.js.map +1 -1
  13. package/dist/types/components/Alert/Alert.d.ts +9 -9
  14. package/dist/types/components/Alert/AlertTitle.d.ts +3 -3
  15. package/dist/types/components/AlertDialog/AlertDialogAction.d.ts +3 -3
  16. package/dist/types/components/AlertDialog/AlertDialogBody.d.ts +3 -3
  17. package/dist/types/components/AlertDialog/AlertDialogCancel.d.ts +3 -3
  18. package/dist/types/components/AlertDialog/AlertDialogContent.d.ts +5 -5
  19. package/dist/types/components/AlertDialog/AlertDialogDescription.d.ts +3 -3
  20. package/dist/types/components/AlertDialog/AlertDialogFooter.d.ts +3 -3
  21. package/dist/types/components/AlertDialog/AlertDialogHeader.d.ts +3 -3
  22. package/dist/types/components/AlertDialog/AlertDialogTitle.d.ts +3 -3
  23. package/dist/types/components/AlertDialog/AlertDialogTrigger.d.ts +3 -3
  24. package/dist/types/components/Button/Button.d.ts +7 -7
  25. package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +3 -3
  26. package/dist/types/components/Calendar/Calendar.d.ts +6 -6
  27. package/dist/types/components/Calendar/CalendarContext.d.ts +1 -2
  28. package/dist/types/components/Calendar/CalendarDay.d.ts +2 -3
  29. package/dist/types/components/Calendar/CalendarMonthCaption.d.ts +2 -3
  30. package/dist/types/components/Card/Card.d.ts +3 -3
  31. package/dist/types/components/Card/CardBody.d.ts +3 -3
  32. package/dist/types/components/Card/CardFooter.d.ts +3 -3
  33. package/dist/types/components/Card/CardHeader.d.ts +3 -3
  34. package/dist/types/components/Card/CardTitle.d.ts +3 -3
  35. package/dist/types/components/Checkbox/Checkbox.d.ts +11 -11
  36. package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts +9 -9
  37. package/dist/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +1 -2
  38. package/dist/types/components/ClearContexts/ClearContexts.d.ts +3 -3
  39. package/dist/types/components/CloseButton/CloseButton.d.ts +3 -3
  40. package/dist/types/components/Code/Code.d.ts +3 -3
  41. package/dist/types/components/Collapsible/Collapsible.d.ts +3 -3
  42. package/dist/types/components/Collapsible/CollapsibleContent.d.ts +3 -3
  43. package/dist/types/components/Collapsible/CollapsibleContext.d.ts +1 -2
  44. package/dist/types/components/Collapsible/CollapsibleTrigger.d.ts +4 -4
  45. package/dist/types/components/CommandMenu/CommandMenu.d.ts +11 -11
  46. package/dist/types/components/CommandMenu/CommandMenuDialog.d.ts +7 -7
  47. package/dist/types/components/CommandMenu/CommandMenuGroup.d.ts +4 -4
  48. package/dist/types/components/CommandMenu/CommandMenuItem.d.ts +3 -3
  49. package/dist/types/components/Container/Container.d.ts +3 -3
  50. package/dist/types/components/ControlAddon/ControlAddon.d.ts +3 -3
  51. package/dist/types/components/ControlCode/ControlCode.d.ts +4 -4
  52. package/dist/types/components/DataTable/DataTable.d.ts +11 -11
  53. package/dist/types/components/DataTable/DataTableApi.d.ts +2 -2
  54. package/dist/types/components/DataTable/DataTableBody.d.ts +4 -4
  55. package/dist/types/components/DataTable/DataTableCell.d.ts +4 -4
  56. package/dist/types/components/DataTable/DataTableColumn.d.ts +4 -4
  57. package/dist/types/components/DataTable/DataTableContent.d.ts +9 -9
  58. package/dist/types/components/DataTable/DataTableContext.d.ts +19 -19
  59. package/dist/types/components/DataTable/DataTableFilter.d.ts +3 -3
  60. package/dist/types/components/DataTable/DataTableFoot.d.ts +3 -3
  61. package/dist/types/components/DataTable/DataTableHead.d.ts +3 -3
  62. package/dist/types/components/DataTable/DataTablePagination.d.ts +4 -4
  63. package/dist/types/components/DataTable/DataTableRow.d.ts +3 -3
  64. package/dist/types/components/DataTable/DataTableRowsPerPage.d.ts +4 -4
  65. package/dist/types/components/DataTable/DataTableSelectionTrigger.d.ts +5 -5
  66. package/dist/types/components/DataTable/PagedDataTablePagination.d.ts +3 -3
  67. package/dist/types/components/DataTable/ScrolledDataTablePagination.d.ts +3 -3
  68. package/dist/types/components/DataTable/getRowKey.d.ts +2 -2
  69. package/dist/types/components/DateInput/DateInput.d.ts +5 -5
  70. package/dist/types/components/DatePicker/DatePicker.d.ts +2 -2
  71. package/dist/types/components/DateRangeInput/DateRangeInput.d.ts +19 -19
  72. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +2 -2
  73. package/dist/types/components/Dialog/DialogBody.d.ts +3 -3
  74. package/dist/types/components/Dialog/DialogClose.d.ts +3 -3
  75. package/dist/types/components/Dialog/DialogContent.d.ts +5 -5
  76. package/dist/types/components/Dialog/DialogDescription.d.ts +3 -3
  77. package/dist/types/components/Dialog/DialogFooter.d.ts +3 -3
  78. package/dist/types/components/Dialog/DialogHeader.d.ts +4 -4
  79. package/dist/types/components/Dialog/DialogTitle.d.ts +3 -3
  80. package/dist/types/components/Dialog/DialogTrigger.d.ts +3 -3
  81. package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +3 -3
  82. package/dist/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +4 -4
  83. package/dist/types/components/DropdownMenu/DropdownMenuContent.d.ts +6 -6
  84. package/dist/types/components/DropdownMenu/DropdownMenuGroup.d.ts +3 -3
  85. package/dist/types/components/DropdownMenu/DropdownMenuItem.d.ts +3 -3
  86. package/dist/types/components/DropdownMenu/DropdownMenuRadioGroup.d.ts +3 -3
  87. package/dist/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -4
  88. package/dist/types/components/DropdownMenu/DropdownMenuSubContent.d.ts +4 -4
  89. package/dist/types/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +3 -3
  90. package/dist/types/components/DropdownMenu/DropdownMenuTrigger.d.ts +3 -3
  91. package/dist/types/components/ErrorBoundary/ErrorBoundary.d.ts +10 -10
  92. package/dist/types/components/Feedback/Feedback.d.ts +4 -4
  93. package/dist/types/components/FeedbackList/FeedbackList.d.ts +3 -3
  94. package/dist/types/components/FeedbackList/FeedbackListContext.d.ts +1 -2
  95. package/dist/types/components/FeedbackPopover/FeedbackPopover.d.ts +6 -6
  96. package/dist/types/components/FeedbackPopover/FeedbackPopoverContext.d.ts +1 -2
  97. package/dist/types/components/Field/Field.d.ts +3 -3
  98. package/dist/types/components/Field/FieldContext.d.ts +5 -5
  99. package/dist/types/components/FieldGroup/FieldGroup.d.ts +3 -3
  100. package/dist/types/components/FieldGroup/FieldGroupBody.d.ts +3 -3
  101. package/dist/types/components/FieldGroup/FieldGroupContext.d.ts +4 -4
  102. package/dist/types/components/FieldGroup/FieldGroupHeader.d.ts +6 -6
  103. package/dist/types/components/FieldGroup/FieldGroupTitle.d.ts +3 -3
  104. package/dist/types/components/Grid/Grid.d.ts +3 -3
  105. package/dist/types/components/Heading/Heading.d.ts +3 -3
  106. package/dist/types/components/HelperText/HelperText.d.ts +3 -3
  107. package/dist/types/components/Icon/Icon.d.ts +4 -4
  108. package/dist/types/components/IconButton/IconButton.d.ts +9 -9
  109. package/dist/types/components/Input/Input.d.ts +14 -14
  110. package/dist/types/components/Input/InputWithContainerRef.d.ts +4 -4
  111. package/dist/types/components/Keyboard/Keyboard.d.ts +3 -3
  112. package/dist/types/components/Label/Label.d.ts +10 -10
  113. package/dist/types/components/Link/Link.d.ts +4 -4
  114. package/dist/types/components/Link/LinkContext.d.ts +1 -2
  115. package/dist/types/components/Mark/Mark.d.ts +3 -3
  116. package/dist/types/components/MenuList/MenuList.d.ts +3 -3
  117. package/dist/types/components/MenuList/MenuListContext.d.ts +1 -2
  118. package/dist/types/components/MenuList/MenuListGroup.d.ts +7 -7
  119. package/dist/types/components/MenuList/MenuListItem.d.ts +13 -13
  120. package/dist/types/components/NumericInput/NumericInput.d.ts +3 -3
  121. package/dist/types/components/Output/Output.d.ts +3 -3
  122. package/dist/types/components/Overlay/Overlay.d.ts +3 -3
  123. package/dist/types/components/Popover/PopoverClose.d.ts +3 -3
  124. package/dist/types/components/Popover/PopoverContent.d.ts +5 -5
  125. package/dist/types/components/Popover/PopoverTrigger.d.ts +3 -3
  126. package/dist/types/components/Portal/Portal.d.ts +3 -3
  127. package/dist/types/components/Portal/PortalContext.d.ts +1 -2
  128. package/dist/types/components/RadioGroup/Radio.d.ts +10 -10
  129. package/dist/types/components/RadioGroup/RadioGroup.d.ts +10 -10
  130. package/dist/types/components/Root/Root.d.ts +14 -10
  131. package/dist/types/components/Root/RootContext.d.ts +1 -2
  132. package/dist/types/components/Root/RootElement.d.ts +9 -0
  133. package/dist/types/components/Root/index.d.ts +1 -1
  134. package/dist/types/components/Select/Option.d.ts +3 -3
  135. package/dist/types/components/Select/OptionsGroup.d.ts +3 -3
  136. package/dist/types/components/Select/Select.d.ts +11 -11
  137. package/dist/types/components/Select/SelectContext.d.ts +6 -6
  138. package/dist/types/components/Separator/Separator.d.ts +3 -3
  139. package/dist/types/components/Slot/Slottable.d.ts +3 -3
  140. package/dist/types/components/Spinner/Spinner.d.ts +3 -3
  141. package/dist/types/components/Stack/Stack.d.ts +8 -8
  142. package/dist/types/components/Stepper/Step.d.ts +5 -5
  143. package/dist/types/components/Stepper/StepContent.d.ts +3 -3
  144. package/dist/types/components/Stepper/StepList.d.ts +3 -3
  145. package/dist/types/components/Stepper/Stepper.d.ts +5 -5
  146. package/dist/types/components/Stepper/StepperContext.d.ts +1 -2
  147. package/dist/types/components/Table/Table.d.ts +5 -5
  148. package/dist/types/components/Table/TableBody.d.ts +3 -3
  149. package/dist/types/components/Table/TableCell.d.ts +4 -4
  150. package/dist/types/components/Table/TableColumn.d.ts +14 -14
  151. package/dist/types/components/Table/TableContext.d.ts +4 -5
  152. package/dist/types/components/Table/TableFoot.d.ts +3 -3
  153. package/dist/types/components/Table/TableHead.d.ts +4 -4
  154. package/dist/types/components/Table/TableRow.d.ts +3 -3
  155. package/dist/types/components/Tabs/Tab.d.ts +4 -4
  156. package/dist/types/components/Tabs/TabContent.d.ts +3 -3
  157. package/dist/types/components/Tabs/TabList.d.ts +5 -5
  158. package/dist/types/components/Tabs/Tabs.d.ts +3 -3
  159. package/dist/types/components/Tabs/TabsContext.d.ts +1 -2
  160. package/dist/types/components/Tag/Tag.d.ts +7 -7
  161. package/dist/types/components/TextArea/TextArea.d.ts +3 -3
  162. package/dist/types/components/Toast/Toast.d.ts +11 -11
  163. package/dist/types/components/Toast/ToastProvider.d.ts +2 -2
  164. package/dist/types/components/Toast/ToastTitle.d.ts +3 -3
  165. package/dist/types/components/Toast/ToastViewport.d.ts +3 -3
  166. package/dist/types/components/Tooltip/Tooltip.d.ts +7 -7
  167. package/dist/types/index.d.ts +1 -1
  168. package/dist/types/locales/en-GB.d.ts +3 -0
  169. package/dist/types/locales/en-US.d.ts +3 -0
  170. package/dist/types/{locale → locales}/en.d.ts +1 -1
  171. package/dist/types/locales/fr.d.ts +3 -0
  172. package/dist/types/locales/index.d.ts +4 -0
  173. package/dist/types/locales/pt.d.ts +3 -0
  174. package/dist/types/providers/AlertDialogProvider/AlertDialogProvider.d.ts +2 -2
  175. package/dist/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +17 -17
  176. package/dist/types/providers/DocumentTitleProvider/DocumentTitle.d.ts +2 -2
  177. package/dist/types/providers/DocumentTitleProvider/DocumentTitleProvider.d.ts +2 -2
  178. package/dist/types/providers/DocumentTitleProvider/DocumentTitleProviderContext.d.ts +2 -3
  179. package/dist/types/providers/ErrorReportingProvider/ErrorReport.d.ts +2 -2
  180. package/dist/types/providers/ErrorReportingProvider/ErrorReportingContext.d.ts +3 -3
  181. package/dist/types/providers/ErrorReportingProvider/ErrorReportingProvider.d.ts +2 -2
  182. package/dist/types/providers/ErrorReportingProvider/useErrorReporter.d.ts +1 -2
  183. package/dist/types/providers/LocalizationProvider/LocalizationContext.d.ts +6 -4
  184. package/dist/types/{locale → providers/LocalizationProvider}/LocalizationObject.d.ts +18 -18
  185. package/dist/types/providers/LocalizationProvider/LocalizationProvider.d.ts +13 -5
  186. package/dist/types/providers/LocalizationProvider/index.d.ts +1 -0
  187. package/dist/types/providers/LocalizationProvider/useLocale.d.ts +6 -3
  188. package/dist/types/providers/PrefixProvider/PrefixContext.d.ts +1 -4
  189. package/dist/types/providers/PrefixProvider/PrefixProvider.d.ts +3 -3
  190. package/dist/types/providers/PrefixProvider/defaultPrefix.d.ts +12 -0
  191. package/dist/types/providers/PrefixProvider/index.d.ts +1 -0
  192. package/dist/types/providers/PrefixProvider/usePrefix.d.ts +1 -1
  193. package/dist/types/providers/ToastManagerProvider/ToastManagerContext.d.ts +7 -7
  194. package/dist/types/providers/ToastManagerProvider/ToastManagerProvider.d.ts +2 -2
  195. package/dist/types/utils/control.d.ts +1 -2
  196. package/dist/types/utils/useCombinedRef.d.ts +2 -2
  197. package/dist/types/utils/useControllableState.d.ts +2 -2
  198. package/dist/types/utils/useLayoutEffect.d.ts +2 -2
  199. package/package.json +20 -4
  200. package/dist/ostack-ui.cjs +0 -11095
  201. package/dist/ostack-ui.cjs.map +0 -1
  202. package/dist/types/locale/defaultLocale.d.ts +0 -3
  203. package/dist/types/locale/en-GB.d.ts +0 -3
  204. package/dist/types/locale/en-US.d.ts +0 -3
  205. package/dist/types/locale/fr-FR.d.ts +0 -3
  206. package/dist/types/locale/index.d.ts +0 -6
  207. package/dist/types/locale/pt-PT.d.ts +0 -3
@@ -1,6 +1,6 @@
1
- import * as React from "react";
1
+ import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ElementType, type ReactNode } from "react";
2
2
  /** Properties of the menu list group component. */
3
- export interface MenuListGroupProps extends React.ComponentPropsWithoutRef<"ul"> {
3
+ export interface MenuListGroupProps extends ComponentPropsWithoutRef<"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
@@ -8,17 +8,17 @@ export interface MenuListGroupProps extends React.ComponentPropsWithoutRef<"ul">
8
8
  */
9
9
  asChild?: boolean;
10
10
  /** Optional label of the menu list group. */
11
- label?: React.ReactNode;
11
+ label?: ReactNode;
12
12
  /**
13
13
  * What the item element containing the group should be rendered as. Defaults
14
14
  * to `"li"` unless `asChild` is provided, in which case it defaults to
15
15
  * `"div"`.
16
16
  */
17
- itemAs?: React.ElementType;
17
+ itemAs?: ElementType;
18
18
  /** Properties to pass to the item element containing the group. */
19
- itemProps?: React.ComponentPropsWithRef<"li">;
19
+ itemProps?: ComponentPropsWithRef<"li">;
20
20
  /** Properties to pass to the label element. */
21
- labelProps?: React.ComponentPropsWithRef<"div">;
21
+ labelProps?: ComponentPropsWithRef<"div">;
22
22
  }
23
23
  /** Menu list group component. */
24
- export declare const MenuListGroup: React.ForwardRefExoticComponent<MenuListGroupProps & React.RefAttributes<HTMLUListElement>>;
24
+ export declare const MenuListGroup: import("react").ForwardRefExoticComponent<MenuListGroupProps & import("react").RefAttributes<HTMLUListElement>>;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { type ComponentProps, type ComponentPropsWithoutRef, type ComponentPropsWithRef, type MouseEvent, type ReactElement, type ReactNode } from "react";
2
2
  import { type AccentColor } from "../../utils/accent.ts";
3
3
  import { Icon, type IconProp } from "../Icon";
4
4
  import { Spinner } from "../Spinner";
@@ -6,7 +6,7 @@ import { type MenuListIconPlacement } from "./MenuList.tsx";
6
6
  /** Menu list item colours. */
7
7
  export type MenuListItemColor = AccentColor;
8
8
  /** Properties of the menu list item component. */
9
- export interface MenuListItemProps extends Omit<React.ComponentPropsWithoutRef<"li">, "onSelect"> {
9
+ export interface MenuListItemProps extends Omit<ComponentPropsWithoutRef<"li">, "onSelect"> {
10
10
  /**
11
11
  * Change the component to the HTML tag or custom component of the only child.
12
12
  * This will merge the original component props with the props of the supplied
@@ -26,7 +26,7 @@ export interface MenuListItemProps extends Omit<React.ComponentPropsWithoutRef<"
26
26
  */
27
27
  selected?: boolean;
28
28
  /** Event handler for when the item has been selected. */
29
- onSelect?: (event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLDivElement>) => void;
29
+ onSelect?: (event: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLDivElement>) => void;
30
30
  /** Accent colour of the menu list item. */
31
31
  color?: MenuListItemColor;
32
32
  /**
@@ -48,13 +48,13 @@ export interface MenuListItemProps extends Omit<React.ComponentPropsWithoutRef<"
48
48
  * Content of the item when it is in "loading" state. If not provided, the
49
49
  * item content will remain unchanged.
50
50
  */
51
- loadingContent?: React.ReactNode;
51
+ loadingContent?: ReactNode;
52
52
  /**
53
53
  * Optional item icon.
54
54
  *
55
55
  * @default null
56
56
  */
57
- icon?: IconProp | React.ReactElement | null;
57
+ icon?: IconProp | ReactElement | null;
58
58
  /**
59
59
  * Placement of the icon.
60
60
  *
@@ -68,19 +68,19 @@ export interface MenuListItemProps extends Omit<React.ComponentPropsWithoutRef<"
68
68
  */
69
69
  disabled?: boolean;
70
70
  /** Href for the link, when `itemType` is set to `"link"`. */
71
- href?: React.ComponentProps<"a">["href"];
71
+ href?: ComponentProps<"a">["href"];
72
72
  /** Target of the link, when `itemType` is set to `"link"`. */
73
- target?: React.ComponentProps<"a">["target"];
73
+ target?: ComponentProps<"a">["target"];
74
74
  /** Rel of the link, when `itemType` is set to `"link"`. */
75
- rel?: React.ComponentProps<"a">["rel"];
75
+ rel?: ComponentProps<"a">["rel"];
76
76
  /** Properties to pass to the action element of the item. */
77
- actionProps?: Omit<React.ComponentPropsWithRef<"button" | "a" | "div">, "disabled" | "href" | "target" | "rel">;
77
+ actionProps?: Omit<ComponentPropsWithRef<"button" | "a" | "div">, "disabled" | "href" | "target" | "rel">;
78
78
  /** Properties to pass to the content element of the item. */
79
- contentProps?: React.ComponentPropsWithRef<"div">;
79
+ contentProps?: ComponentPropsWithRef<"div">;
80
80
  /** Properties to pass to the icon component. */
81
- iconProps?: Omit<React.ComponentPropsWithRef<typeof Icon>, "icon">;
81
+ iconProps?: Omit<ComponentPropsWithRef<typeof Icon>, "icon">;
82
82
  /** Properties to pass to the spinner component. */
83
- spinnerProps?: React.ComponentPropsWithRef<typeof Spinner>;
83
+ spinnerProps?: ComponentPropsWithRef<typeof Spinner>;
84
84
  }
85
85
  /** Menu list item component. */
86
- export declare const MenuListItem: React.ForwardRefExoticComponent<MenuListItemProps & React.RefAttributes<HTMLLIElement>>;
86
+ export declare const MenuListItem: import("react").ForwardRefExoticComponent<MenuListItemProps & import("react").RefAttributes<HTMLLIElement>>;
@@ -1,8 +1,8 @@
1
- import * as React from "react";
1
+ import { type ComponentPropsWithoutRef } from "react";
2
2
  import { type NumericTransformerOptions } from "../../utils/useNumericTransformer.tsx";
3
3
  import { Input } from "../Input";
4
4
  /** Properties of the numeric input component. */
5
- export interface NumericInputProps extends NumericTransformerOptions, Omit<React.ComponentPropsWithoutRef<typeof Input>, "defaultValue" | "value" | "onValueChange" | "type" | "min" | "max"> {
5
+ export interface NumericInputProps extends NumericTransformerOptions, Omit<ComponentPropsWithoutRef<typeof Input>, "defaultValue" | "value" | "onValueChange" | "type" | "min" | "max"> {
6
6
  type?: "text" | "tel" | "password";
7
7
  /** Numeric input's default value. */
8
8
  defaultValue?: string | number | null;
@@ -83,4 +83,4 @@ export interface NumericValueRepresentations {
83
83
  * can ensure proper associations between `Label`, `NumericInput`, and
84
84
  * `HelperText`, improving clarity and accessibility for users.
85
85
  */
86
- export declare const NumericInput: React.ForwardRefExoticComponent<NumericInputProps & React.RefAttributes<HTMLInputElement>>;
86
+ export declare const NumericInput: import("react").ForwardRefExoticComponent<NumericInputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,7 +1,7 @@
1
- import * as React from "react";
1
+ import { type ComponentPropsWithoutRef } from "react";
2
2
  import { type InputPropsBase } from "../Input";
3
3
  /** Properties of the output component. */
4
- export interface OutputProps extends Omit<InputPropsBase, "asChild" | "children" | "showClearButton" | "clearButtonLabel">, React.ComponentPropsWithoutRef<"output"> {
4
+ export interface OutputProps extends Omit<InputPropsBase, "asChild" | "children" | "showClearButton" | "clearButtonLabel">, ComponentPropsWithoutRef<"output"> {
5
5
  }
6
6
  /**
7
7
  * The output component is used to display the result of a calculation or user
@@ -22,4 +22,4 @@ export interface OutputProps extends Omit<InputPropsBase, "asChild" | "children"
22
22
  * }
23
23
  * ```
24
24
  */
25
- export declare const Output: React.ForwardRefExoticComponent<OutputProps & React.RefAttributes<HTMLOutputElement>>;
25
+ export declare const Output: import("react").ForwardRefExoticComponent<OutputProps & import("react").RefAttributes<HTMLOutputElement>>;
@@ -1,6 +1,6 @@
1
- import * as React from "react";
1
+ import { type ComponentPropsWithoutRef } from "react";
2
2
  /** Properties of the label component. */
3
- export interface OverlayProps extends React.ComponentPropsWithoutRef<"div"> {
3
+ export interface OverlayProps extends ComponentPropsWithoutRef<"div"> {
4
4
  }
5
5
  /** Overlay component. */
6
- export declare const Overlay: React.ForwardRefExoticComponent<OverlayProps & React.RefAttributes<HTMLDivElement>>;
6
+ export declare const Overlay: import("react").ForwardRefExoticComponent<OverlayProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,7 +1,7 @@
1
1
  import { Popover as PopoverPrimitive } from "radix-ui";
2
- import * as React from "react";
2
+ import { type ComponentPropsWithoutRef } from "react";
3
3
  /** Properties of the popover close component. */
4
- export interface PopoverCloseProps extends Omit<React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Close>, "asChild"> {
4
+ export interface PopoverCloseProps extends Omit<ComponentPropsWithoutRef<typeof PopoverPrimitive.Close>, "asChild"> {
5
5
  }
6
6
  /** The button that closes an open popover. */
7
- export declare const PopoverClose: React.ForwardRefExoticComponent<PopoverCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
+ export declare const PopoverClose: import("react").ForwardRefExoticComponent<PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,7 +1,7 @@
1
1
  import { Popover as PopoverPrimitive } from "radix-ui";
2
- import * as React from "react";
2
+ import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
3
3
  /** Properties of the popover content component. */
4
- export interface PopoverContentProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
4
+ export interface PopoverContentProps extends ComponentPropsWithoutRef<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 React.ComponentPropsWithoutRef<type
9
9
  */
10
10
  showArrow?: boolean;
11
11
  /** Properties to pass to the portal component. */
12
- portalProps?: Omit<React.ComponentPropsWithRef<typeof PopoverPrimitive.Portal>, "forceMount">;
12
+ portalProps?: Omit<ComponentPropsWithRef<typeof PopoverPrimitive.Portal>, "forceMount">;
13
13
  /** Properties to pass to the arrow component. */
14
- arrowProps?: React.ComponentPropsWithRef<typeof PopoverPrimitive.Arrow>;
14
+ arrowProps?: ComponentPropsWithRef<typeof PopoverPrimitive.Arrow>;
15
15
  }
16
16
  /** The component that pops out when the popover is open. */
17
- export declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
17
+ export declare const PopoverContent: import("react").ForwardRefExoticComponent<PopoverContentProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,10 +1,10 @@
1
1
  import { Popover as PopoverPrimitive } from "radix-ui";
2
- import * as React from "react";
2
+ import { type ComponentPropsWithoutRef } from "react";
3
3
  /** Properties of the popover trigger component. */
4
- export interface PopoverTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>, "asChild"> {
4
+ export interface PopoverTriggerProps extends Omit<ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>, "asChild"> {
5
5
  }
6
6
  /**
7
7
  * The button that toggles the popover. By default, the `PopoverContent` will
8
8
  * position itself against the trigger.
9
9
  */
10
- export declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
10
+ export declare const PopoverTrigger: import("react").ForwardRefExoticComponent<PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,7 +1,7 @@
1
1
  import { Portal as PortalPrimitive } from "radix-ui";
2
- import * as React from "react";
2
+ import { type ComponentPropsWithoutRef } from "react";
3
3
  /** Properties of the portal component. */
4
- export interface PortalProps extends React.ComponentPropsWithoutRef<typeof PortalPrimitive.Root> {
4
+ export interface PortalProps extends ComponentPropsWithoutRef<typeof PortalPrimitive.Root> {
5
5
  }
6
6
  /**
7
7
  * Portal component used to render a React subtree in a different part of the
@@ -10,4 +10,4 @@ export interface PortalProps extends React.ComponentPropsWithoutRef<typeof Porta
10
10
  * The rendered subtree is automatically wrapper in a `Root` component, so that
11
11
  * styles are rendered correctly.
12
12
  */
13
- export declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
13
+ export declare const Portal: import("react").ForwardRefExoticComponent<PortalProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,10 +1,9 @@
1
- import * as React from "react";
2
1
  /** Value of the portal context. */
3
2
  export interface PortalContextValue {
4
3
  /** Container where portals should render by default. */
5
4
  container?: Element | DocumentFragment | null;
6
5
  }
7
6
  /** Portal context. */
8
- export declare const PortalContext: React.Context<PortalContextValue | null>;
7
+ export declare const PortalContext: import("react").Context<PortalContextValue | null>;
9
8
  /** Hook providing access to the portal context. */
10
9
  export declare function usePortalContext(): PortalContextValue | null;
@@ -1,17 +1,17 @@
1
1
  import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
2
- import * as React from "react";
2
+ import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from "react";
3
3
  import { type ControlStatus } from "../../utils/control.ts";
4
4
  import { ControlCode } from "../ControlCode";
5
5
  import { Label } from "../Label";
6
6
  import { Spinner } from "../Spinner";
7
7
  /** Properties of a radio component. */
8
- export interface RadioProps extends Omit<React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, "value"> {
8
+ export interface RadioProps extends Omit<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, "value"> {
9
9
  /** Radio value. */
10
- value?: React.ComponentPropsWithoutRef<"input">["value"];
10
+ value?: ComponentPropsWithoutRef<"input">["value"];
11
11
  /** Sets the status of the radio. */
12
12
  status?: ControlStatus;
13
13
  /** Radio code. */
14
- code?: React.ReactNode;
14
+ code?: ReactNode;
15
15
  /** Sets the radio as read-only. */
16
16
  readOnly?: boolean;
17
17
  /**
@@ -22,15 +22,15 @@ export interface RadioProps extends Omit<React.ComponentPropsWithoutRef<typeof R
22
22
  */
23
23
  loading?: boolean;
24
24
  /** Properties to pass to the root component. */
25
- rootProps?: React.ComponentPropsWithRef<"div">;
25
+ rootProps?: ComponentPropsWithRef<"div">;
26
26
  /** Properties to pass to the code component. */
27
- codeProps?: React.ComponentPropsWithRef<typeof ControlCode>;
27
+ codeProps?: ComponentPropsWithRef<typeof ControlCode>;
28
28
  /** Properties to pass to the indicator component. */
29
- indicatorProps?: React.ComponentPropsWithRef<typeof RadioGroupPrimitive.Indicator>;
29
+ indicatorProps?: ComponentPropsWithRef<typeof RadioGroupPrimitive.Indicator>;
30
30
  /** Properties to pass to the label component. */
31
- labelProps?: React.ComponentPropsWithRef<typeof Label>;
31
+ labelProps?: ComponentPropsWithRef<typeof Label>;
32
32
  /** Properties to pass to the spinner component. */
33
- spinnerProps?: Omit<React.ComponentPropsWithRef<typeof Spinner>, "size">;
33
+ spinnerProps?: Omit<ComponentPropsWithRef<typeof Spinner>, "size">;
34
34
  }
35
35
  /** Radio component. Must be used within a radio group. */
36
- export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLButtonElement>>;
36
+ export declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,12 +1,12 @@
1
1
  import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
2
- import * as React from "react";
2
+ import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type FocusEvent, type ReactNode } from "react";
3
3
  import { type ControlStatus, type ControlVariant } from "../../utils/control.ts";
4
4
  import { CloseButton } from "../CloseButton";
5
5
  import { ControlCode } from "../ControlCode";
6
6
  import { type ShowClearButton } from "../Input";
7
7
  import { Spinner } from "../Spinner";
8
8
  /** Properties of the radio group component. */
9
- export interface RadioGroupProps extends Omit<React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, "asChild"> {
9
+ export interface RadioGroupProps extends Omit<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, "asChild"> {
10
10
  /** Whether to display the radio group inline. */
11
11
  inline?: boolean;
12
12
  /**
@@ -26,7 +26,7 @@ export interface RadioGroupProps extends Omit<React.ComponentPropsWithoutRef<typ
26
26
  */
27
27
  loading?: boolean;
28
28
  /** Radio group code. */
29
- code?: React.ReactNode;
29
+ code?: ReactNode;
30
30
  /**
31
31
  * Whether to show a button to clear the radio group.
32
32
  *
@@ -41,20 +41,20 @@ export interface RadioGroupProps extends Omit<React.ComponentPropsWithoutRef<typ
41
41
  * This is useful when there is a need to know when the user stops interacting
42
42
  * with the control.
43
43
  */
44
- onBlurToOutside?: (event: React.FocusEvent) => void;
44
+ onBlurToOutside?: (event: FocusEvent) => void;
45
45
  /** Properties to pass to the code component. */
46
- codeProps?: React.ComponentPropsWithRef<typeof ControlCode>;
46
+ codeProps?: ComponentPropsWithRef<typeof ControlCode>;
47
47
  /** Properties to pass to the container component. */
48
- containerProps?: React.ComponentPropsWithRef<"div">;
48
+ containerProps?: ComponentPropsWithRef<"div">;
49
49
  /**
50
50
  * Properties to pass to the end element containing the clear button and
51
51
  * spinner.
52
52
  */
53
- endContainerProps?: React.ComponentPropsWithRef<"div">;
53
+ endContainerProps?: ComponentPropsWithRef<"div">;
54
54
  /** Properties to pass to the clear button component. */
55
- clearButtonProps?: React.ComponentPropsWithRef<typeof CloseButton>;
55
+ clearButtonProps?: ComponentPropsWithRef<typeof CloseButton>;
56
56
  /** Properties to pass to the spinner component. */
57
- spinnerProps?: Omit<React.ComponentPropsWithRef<typeof Spinner>, "size">;
57
+ spinnerProps?: Omit<ComponentPropsWithRef<typeof Spinner>, "size">;
58
58
  }
59
59
  /**
60
60
  * The `RadioGroup` component displays a set of `Radio` button components,
@@ -80,4 +80,4 @@ export interface RadioGroupProps extends Omit<React.ComponentPropsWithoutRef<typ
80
80
  * }
81
81
  * ```
82
82
  */
83
- export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
83
+ export declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,11 @@
1
- import * as React from "react";
2
- import { type LocalizationObject } from "../../locale";
1
+ import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
3
2
  import { DocumentTitleProvider } from "../../providers/DocumentTitleProvider";
4
3
  import { ErrorReportingProvider } from "../../providers/ErrorReportingProvider";
5
- import { ErrorBoundary } from "../ErrorBoundary";
4
+ import { type LocalizationObject } from "../../providers/LocalizationProvider/LocalizationObject.ts";
5
+ import { type ErrorBoundary } from "../ErrorBoundary";
6
6
  import { type ToastSwipeDirection } from "../Toast";
7
7
  /** Properties of the ostack/UI root component. */
8
- export interface RootProps extends React.ComponentPropsWithoutRef<"div">, Pick<React.ComponentPropsWithoutRef<typeof ErrorReportingProvider>, "reportError" | "errorReportingUrl" | "errorReportingMethod" | "encodeErrorReport" | "encodedErrorReportMimeType" | "errorReportingOptions">, Pick<React.ComponentPropsWithoutRef<typeof DocumentTitleProvider>, "baseDocumentTitle"> {
8
+ export interface RootProps extends ComponentPropsWithoutRef<"div">, Pick<ComponentPropsWithoutRef<typeof ErrorReportingProvider>, "reportError" | "errorReportingUrl" | "errorReportingMethod" | "encodeErrorReport" | "encodedErrorReportMimeType" | "errorReportingOptions">, Pick<ComponentPropsWithoutRef<typeof DocumentTitleProvider>, "baseDocumentTitle"> {
9
9
  /**
10
10
  * Change the component to the HTML tag or custom component of the only child.
11
11
  * This will merge the original component props with the props of the supplied
@@ -23,12 +23,16 @@ export interface RootProps extends React.ComponentPropsWithoutRef<"div">, Pick<R
23
23
  * enabled in production.
24
24
  */
25
25
  enableErrorReporting?: boolean;
26
+ /** Uncontrolled locale to use. */
27
+ defaultLocale?: LocalizationObject;
28
+ /** Controlled locale to use. */
29
+ locale?: LocalizationObject;
26
30
  /**
27
- * Locale to use for the components.
31
+ * Function called when the locale changes.
28
32
  *
29
- * @default defaultLocale
33
+ * @param locale - New locale.
30
34
  */
31
- locale?: LocalizationObject;
35
+ onLocaleChange?: (locale: LocalizationObject) => void;
32
36
  /**
33
37
  * String which separates the breadcrumbs from the base document title.
34
38
  *
@@ -107,9 +111,9 @@ export interface RootProps extends React.ComponentPropsWithoutRef<"div">, Pick<R
107
111
  */
108
112
  toastViewportLabel?: string;
109
113
  /** Properties to pass to the `ToastViewport` component. */
110
- toastViewportProps?: React.ComponentPropsWithRef<"ol">;
114
+ toastViewportProps?: ComponentPropsWithRef<"ol">;
111
115
  /** Properties to pass to the `ErrorBoundary` component. */
112
- errorBoundaryProps?: React.ComponentPropsWithRef<typeof ErrorBoundary>;
116
+ errorBoundaryProps?: ComponentPropsWithRef<typeof ErrorBoundary>;
113
117
  }
114
118
  /**
115
119
  * Root component that should wrap an ostack/UI application, exposing all
@@ -118,4 +122,4 @@ export interface RootProps extends React.ComponentPropsWithoutRef<"div">, Pick<R
118
122
  * It further wraps the whole application in an error boundary with support for
119
123
  * error reporting.
120
124
  */
121
- export declare const Root: React.ForwardRefExoticComponent<RootProps & React.RefAttributes<HTMLDivElement>>;
125
+ export declare const Root: import("react").ForwardRefExoticComponent<RootProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,5 @@
1
- import * as React from "react";
2
1
  /** Root context. */
3
- export declare const RootContext: React.Context<boolean>;
2
+ export declare const RootContext: import("react").Context<boolean>;
4
3
  /**
5
4
  * Hook exposing whether a component is being rendered within the `Root`
6
5
  * component.
@@ -0,0 +1,9 @@
1
+ import { type ComponentPropsWithoutRef } from "react";
2
+ import { type RootProps } from "./Root.tsx";
3
+ /** Properties of the root element component. */
4
+ export interface RootElementProps extends ComponentPropsWithoutRef<"div">, Pick<RootProps, "asChild" | "errorBoundaryProps"> {
5
+ /** Whether to wrap children in an error boundary. */
6
+ includeErrorBoundary: boolean;
7
+ }
8
+ /** Root element. */
9
+ export declare const RootElement: import("react").ForwardRefExoticComponent<RootElementProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,2 +1,2 @@
1
1
  export * from "./Root.tsx";
2
- export * from "./RootContext.ts";
2
+ export { useIsInRoot } from "./RootContext.ts";
@@ -1,7 +1,7 @@
1
- import * as React from "react";
1
+ import { type ComponentPropsWithoutRef } from "react";
2
2
  import { CommandMenuItem } from "../CommandMenu";
3
3
  /** Properties of the option component. */
4
- export interface OptionProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandMenuItem>, "value" | "asLink" | "onSelect" | "selected" | "icon" | "target" | "href"> {
4
+ export interface OptionProps extends Omit<ComponentPropsWithoutRef<typeof CommandMenuItem>, "value" | "asLink" | "onSelect" | "selected" | "icon" | "target" | "href"> {
5
5
  /**
6
6
  * A unique value for this item. If no value is provided, it will be inferred
7
7
  * from `children` or the rendered `textContent`. If your `textContent`
@@ -10,4 +10,4 @@ export interface OptionProps extends Omit<React.ComponentPropsWithoutRef<typeof
10
10
  value?: string | number;
11
11
  }
12
12
  /** An option which can be selected in a `Select`. */
13
- export declare const Option: React.NamedExoticComponent<OptionProps & React.RefAttributes<HTMLDivElement>>;
13
+ export declare const Option: import("react").NamedExoticComponent<OptionProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,7 +1,7 @@
1
- import * as React from "react";
1
+ import { type ComponentPropsWithoutRef } from "react";
2
2
  import { CommandMenuGroup } from "../CommandMenu";
3
3
  /** Properties of the options group component. */
4
- export interface OptionsGroupProps extends React.ComponentPropsWithoutRef<typeof CommandMenuGroup> {
4
+ export interface OptionsGroupProps extends ComponentPropsWithoutRef<typeof CommandMenuGroup> {
5
5
  }
6
6
  /** Component used to group options within a `Select`. */
7
- export declare const OptionsGroup: React.ForwardRefExoticComponent<OptionsGroupProps & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const OptionsGroup: import("react").ForwardRefExoticComponent<OptionsGroupProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,11 @@
1
- import * as React from "react";
1
+ import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type CSSProperties, type ReactNode } from "react";
2
2
  import { CommandMenu } from "../CommandMenu";
3
3
  import { type IconButton } from "../IconButton";
4
4
  import { type Input } from "../Input";
5
5
  import { PopoverContent, PopoverTrigger } from "../Popover";
6
6
  import { type Tag } from "../Tag";
7
7
  /** Base properties of the select component. */
8
- export interface SelectPropsBase<T extends string | number | readonly string[] = string | number | readonly string[]> extends React.ComponentPropsWithoutRef<typeof PopoverTrigger>, Pick<React.ComponentPropsWithoutRef<typeof Input>, "name" | "required" | "variant" | "status" | "code" | "readOnly" | "loading" | "align" | "startAdornment" | "endAdornment" | "showClearButton" | "onBlurToOutside" | "rootProps" | "codeProps" | "containerProps" | "clearButtonProps" | "spinnerProps">, Pick<React.ComponentPropsWithoutRef<typeof CommandMenu>, "searchPlaceholder" | "searchValue" | "onSearchValueChange"> {
8
+ export interface SelectPropsBase<T extends string | number | readonly string[] = string | number | readonly string[]> extends ComponentPropsWithoutRef<typeof PopoverTrigger>, Pick<ComponentPropsWithoutRef<typeof Input>, "name" | "required" | "variant" | "status" | "code" | "readOnly" | "loading" | "align" | "startAdornment" | "endAdornment" | "showClearButton" | "onBlurToOutside" | "rootProps" | "codeProps" | "containerProps" | "clearButtonProps" | "spinnerProps">, Pick<ComponentPropsWithoutRef<typeof CommandMenu>, "searchPlaceholder" | "searchValue" | "onSearchValueChange"> {
9
9
  /**
10
10
  * Whether multiple options can be selected. If not set, at most one option
11
11
  * can be selected at a time.
@@ -37,7 +37,7 @@ export interface SelectPropsBase<T extends string | number | readonly string[] =
37
37
  /** Function called whenever the menu's open state changes. */
38
38
  onOpenChange?: (open: boolean) => void;
39
39
  /** Select's placeholder. */
40
- placeholder?: React.ReactNode;
40
+ placeholder?: ReactNode;
41
41
  /** Accessible label for the list of options. Not shown visibly. */
42
42
  optionsLabel?: string;
43
43
  /**
@@ -51,23 +51,23 @@ export interface SelectPropsBase<T extends string | number | readonly string[] =
51
51
  /** Estimated progress of loading the list of options. */
52
52
  loadingOptionsProgress?: number;
53
53
  /** Message to display when no options were found. */
54
- emptyMessage?: React.ReactNode;
54
+ emptyMessage?: ReactNode;
55
55
  /**
56
56
  * When `multiple` is set, this property controls the maximum width the
57
57
  * content of a value tag representing a selected option can reach. By
58
58
  * default, selected value tags have no width limit.
59
59
  */
60
- valueTagMaxWidth?: React.CSSProperties["maxWidth"];
60
+ valueTagMaxWidth?: CSSProperties["maxWidth"];
61
61
  /** Properties to pass to the element holding the whole value or placeholder. */
62
- valueProps?: React.ComponentPropsWithRef<"div">;
62
+ valueProps?: ComponentPropsWithRef<"div">;
63
63
  /** Properties to pass to each `Tag` holding a value, when `multiple` is set. */
64
- valueTagProps?: Omit<React.ComponentPropsWithoutRef<typeof Tag>, "defaultOpen" | "open" | "onOpenChange" | "color" | "showCloseButton">;
64
+ valueTagProps?: Omit<ComponentPropsWithoutRef<typeof Tag>, "defaultOpen" | "open" | "onOpenChange" | "color" | "showCloseButton">;
65
65
  /** Properties to pass to the arrow `Icon` component. */
66
- arrowProps?: Omit<React.ComponentPropsWithRef<typeof IconButton>, "icon" | "label">;
66
+ arrowProps?: Omit<ComponentPropsWithRef<typeof IconButton>, "icon" | "label">;
67
67
  /** Properties to pass to the `Popover` component. */
68
- popoverProps?: React.ComponentPropsWithRef<typeof PopoverContent>;
68
+ popoverProps?: ComponentPropsWithRef<typeof PopoverContent>;
69
69
  /** Options to pass to the `CommandMenu` component. */
70
- commandMenuProps?: Omit<React.ComponentPropsWithRef<typeof CommandMenu>, "defaultValue" | "value" | "onValueChange" | "iconPlacement" | "searchPlaceholder" | "searchValue" | "onSearchValueChange" | "listLabel" | "loading" | "loadingLabel" | "loadingProgress" | "emptyMessage">;
70
+ commandMenuProps?: Omit<ComponentPropsWithRef<typeof CommandMenu>, "defaultValue" | "value" | "onValueChange" | "iconPlacement" | "searchPlaceholder" | "searchValue" | "onSearchValueChange" | "listLabel" | "loading" | "loadingLabel" | "loadingProgress" | "emptyMessage">;
71
71
  }
72
72
  /** Properties of the select component with `multiple` not set. */
73
73
  export interface SelectSingleProps extends SelectPropsBase<string | number> {
@@ -114,4 +114,4 @@ export type SelectProps = SelectSingleProps | SelectMultipleProps;
114
114
  * }
115
115
  * ```
116
116
  */
117
- export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLButtonElement>>;
117
+ export declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { type Dispatch, type ReactNode, type SetStateAction } from "react";
2
2
  import { type AccentColor } from "../../utils/accent.ts";
3
3
  import { type ControlStatus } from "../../utils/control.ts";
4
4
  import { type SelectProps } from "./Select.tsx";
@@ -7,7 +7,7 @@ export interface SelectContextValue {
7
7
  registering?: boolean;
8
8
  multiple: boolean;
9
9
  value: string | string[];
10
- setValue: React.Dispatch<React.SetStateAction<string | number | readonly string[]>>;
10
+ setValue: Dispatch<SetStateAction<string | number | readonly string[]>>;
11
11
  onOptionSelect: (value: string) => void;
12
12
  status?: ControlStatus;
13
13
  disabled?: boolean;
@@ -17,7 +17,7 @@ export interface SelectContextValue {
17
17
  }
18
18
  /** State of an option. */
19
19
  export interface OptionState {
20
- content: React.ReactNode;
20
+ content: ReactNode;
21
21
  color?: AccentColor;
22
22
  disabled?: boolean;
23
23
  }
@@ -34,19 +34,19 @@ export interface SelectActions {
34
34
  /** Select store. */
35
35
  export type SelectStore = ReturnType<typeof useCreateSelectContext>["store"];
36
36
  /** Select context. */
37
- export declare const SelectContext: React.Context<SelectContextValue | null>;
37
+ export declare const SelectContext: import("react").Context<SelectContextValue | null>;
38
38
  /** Options to pass to the `useCreateSelectContext` hook. */
39
39
  export type UseCreateSelectContextOptions = Omit<SelectContextValue, "store">;
40
40
  /** Hook which creates the select context. */
41
41
  export declare function useCreateSelectContext({ multiple, value, setValue, onOptionSelect, status, disabled, readOnly, valueTagProps, }: UseCreateSelectContextOptions): {
42
42
  multiple: boolean;
43
43
  value: string | string[];
44
- setValue: React.Dispatch<React.SetStateAction<string | number | readonly string[]>>;
44
+ setValue: Dispatch<SetStateAction<string | number | readonly string[]>>;
45
45
  onOptionSelect: (value: string) => void;
46
46
  status: ControlStatus | undefined;
47
47
  disabled: boolean | undefined;
48
48
  readOnly: boolean | undefined;
49
- valueTagProps: Omit<Omit<import("../Tag/Tag.tsx").TagProps & React.RefAttributes<HTMLSpanElement>, "ref">, "color" | "defaultOpen" | "open" | "onOpenChange" | "showCloseButton"> | undefined;
49
+ valueTagProps: Omit<Omit<import("../Tag/Tag.tsx").TagProps & import("react").RefAttributes<HTMLSpanElement>, "ref">, "color" | "open" | "defaultOpen" | "onOpenChange" | "showCloseButton"> | undefined;
50
50
  store: Omit<import("zustand").StoreApi<SelectState>, "subscribe"> & {
51
51
  subscribe: {
52
52
  (listener: (selectedState: SelectState, previousSelectedState: SelectState) => void): () => void;
@@ -1,7 +1,7 @@
1
1
  import { Separator as SeparatorPrimitive } from "radix-ui";
2
- import * as React from "react";
2
+ import { type ComponentPropsWithoutRef } from "react";
3
3
  /** Properties of the separator component. */
4
- export interface SeparatorProps extends React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> {
4
+ export interface SeparatorProps extends ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> {
5
5
  }
6
6
  /** Component that visually or semantically separates content. */
7
- export declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const Separator: import("react").ForwardRefExoticComponent<SeparatorProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,10 +1,10 @@
1
- import type * as React from "react";
1
+ import { type ComponentType, type ReactNode } from "react";
2
2
  /** Properties of the `Slottable` component. */
3
3
  export interface SlottableProps {
4
- children?: React.ReactNode;
4
+ children?: ReactNode;
5
5
  }
6
6
  /**
7
7
  * Component that can be used a child of `Slot`, where the content shall be
8
8
  * rendered.
9
9
  */
10
- export declare const Slottable: React.ComponentType<SlottableProps>;
10
+ export declare const Slottable: ComponentType<SlottableProps>;
@@ -1,11 +1,11 @@
1
- import * as React from "react";
1
+ import { type ComponentPropsWithoutRef } from "react";
2
2
  import { type AccentColor } from "../../utils/accent.ts";
3
3
  /** Possible sizes of the spinner. */
4
4
  export type SpinnerSize = "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
5
5
  /** Possible colours of the spinner. */
6
6
  export type SpinnerColor = AccentColor;
7
7
  /** Properties of the spinner component. */
8
- export interface SpinnerProps extends React.ComponentPropsWithoutRef<"span"> {
8
+ export interface SpinnerProps extends ComponentPropsWithoutRef<"span"> {
9
9
  /**
10
10
  * Change the component to the HTML tag or custom component of the only child.
11
11
  * This will merge the original component props with the props of the supplied
@@ -44,4 +44,4 @@ export interface SpinnerProps extends React.ComponentPropsWithoutRef<"span"> {
44
44
  * }
45
45
  * ```
46
46
  */
47
- export declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<HTMLSpanElement>>;
47
+ export declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & import("react").RefAttributes<HTMLSpanElement>>;