@ostack.tech/ui 0.15.5 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/dist/chunks/{en-Buw2XVWt.js → en-DT1KWQei.js} +2 -2
  2. package/dist/chunks/{en-Buw2XVWt.js.map → en-DT1KWQei.js.map} +1 -1
  3. package/dist/locales/en-GB.js +1 -1
  4. package/dist/locales/en-US.js +1 -1
  5. package/dist/locales/fr-FR.js +1 -1
  6. package/dist/locales/fr-FR.js.map +1 -1
  7. package/dist/locales/pt-PT.js +1 -1
  8. package/dist/locales/pt-PT.js.map +1 -1
  9. package/dist/ostack-ui.css +134 -85
  10. package/dist/ostack-ui.js +2155 -1784
  11. package/dist/ostack-ui.js.map +1 -1
  12. package/package.json +5 -4
  13. package/scss/_utils.scss +0 -2
  14. package/scss/components/Checkbox/_Checkbox-variables.scss +7 -4
  15. package/scss/components/Checkbox/_Checkbox.scss +34 -9
  16. package/scss/components/CheckboxGroup/_CheckboxGroup.scss +9 -0
  17. package/scss/components/Code/_Code-variables.scss +8 -4
  18. package/scss/components/DateRangeInput/_DateRangeInput.scss +1 -1
  19. package/scss/components/Feedback/_Feedback-variables.scss +28 -1
  20. package/scss/components/Feedback/_Feedback.scss +99 -2
  21. package/scss/components/Field/_Field-variables.scss +0 -1
  22. package/scss/components/Field/_Field.scss +4 -40
  23. package/scss/components/HelperText/_HelperText-variables.scss +8 -0
  24. package/scss/components/HelperText/_HelperText.scss +15 -0
  25. package/scss/components/RadioGroup/_Radio.scss +13 -0
  26. package/scss/components/RadioGroup/_RadioGroup.scss +9 -0
  27. package/scss/components/Select/_Select.scss +2 -2
  28. package/scss/index.scss +0 -2
  29. package/scss/scss/placeholders/button/_button.scss +10 -6
  30. package/scss/scss/placeholders/checkable/_checkable-variables.scss +3 -2
  31. package/scss/scss/placeholders/checkable/_checkable.scss +25 -7
  32. package/scss/scss/placeholders/checkable-group/_checkable-group-variables.scss +1 -0
  33. package/scss/scss/placeholders/checkable-group/_checkable-group.scss +15 -3
  34. package/scss/scss/placeholders/popover/_popover.scss +3 -0
  35. package/scss/scss/utils/_breakpoints.scss +1 -1
  36. package/scss/scss/utils/_declare-var.scss +1 -1
  37. package/types/components/Alert/Alert.d.ts +12 -15
  38. package/types/components/Alert/AlertTitle.d.ts +2 -2
  39. package/types/components/AlertDialog/AlertDialog.d.ts +6 -2
  40. package/types/components/AlertDialog/AlertDialogAction.d.ts +3 -3
  41. package/types/components/AlertDialog/AlertDialogBody.d.ts +3 -5
  42. package/types/components/AlertDialog/AlertDialogCancel.d.ts +3 -3
  43. package/types/components/AlertDialog/AlertDialogContent.d.ts +6 -6
  44. package/types/components/AlertDialog/AlertDialogDescription.d.ts +3 -3
  45. package/types/components/AlertDialog/AlertDialogFooter.d.ts +3 -5
  46. package/types/components/AlertDialog/AlertDialogHeader.d.ts +3 -4
  47. package/types/components/AlertDialog/AlertDialogTitle.d.ts +4 -4
  48. package/types/components/AlertDialog/AlertDialogTrigger.d.ts +3 -3
  49. package/types/components/Button/Button.d.ts +14 -15
  50. package/types/components/ButtonGroup/ButtonGroup.d.ts +3 -3
  51. package/types/components/Calendar/Calendar.d.ts +6 -6
  52. package/types/components/Calendar/CalendarDay.d.ts +1 -1
  53. package/types/components/Calendar/CalendarHeader.d.ts +1 -1
  54. package/types/components/Calendar/CalendarMonthGrid.d.ts +1 -1
  55. package/types/components/Card/Card.d.ts +3 -3
  56. package/types/components/Card/CardBody.d.ts +3 -3
  57. package/types/components/Card/CardFooter.d.ts +3 -3
  58. package/types/components/Card/CardHeader.d.ts +3 -3
  59. package/types/components/Card/CardTitle.d.ts +3 -3
  60. package/types/components/Checkbox/Checkbox.d.ts +22 -14
  61. package/types/components/CheckboxGroup/CheckboxGroup.d.ts +22 -12
  62. package/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +15 -9
  63. package/types/components/CheckboxGroup/checkboxGroupUtils.d.ts +3 -0
  64. package/types/components/ClearContexts/ClearContexts.d.ts +19 -1
  65. package/types/components/CloseButton/CloseButton.d.ts +3 -4
  66. package/types/components/Code/Code.d.ts +3 -3
  67. package/types/components/Collapsible/Collapsible.d.ts +5 -3
  68. package/types/components/Collapsible/CollapsibleContent.d.ts +3 -3
  69. package/types/components/Collapsible/CollapsibleTrigger.d.ts +5 -5
  70. package/types/components/CommandMenu/CommandMenu.d.ts +18 -20
  71. package/types/components/CommandMenu/CommandMenuDialog.d.ts +6 -6
  72. package/types/components/CommandMenu/CommandMenuGroup.d.ts +3 -3
  73. package/types/components/CommandMenu/CommandMenuItem.d.ts +5 -3
  74. package/types/components/Container/Container.d.ts +3 -3
  75. package/types/components/Control/Control.d.ts +13 -13
  76. package/types/components/Control/ControlWithContainerRef.d.ts +12 -5
  77. package/types/components/Control/controlUtils.d.ts +24 -0
  78. package/types/components/ControlAddon/ControlAddon.d.ts +9 -3
  79. package/types/components/ControlCode/ControlCode.d.ts +3 -3
  80. package/types/components/DataTable/DataTable.d.ts +32 -21
  81. package/types/components/DataTable/DataTableBody.d.ts +4 -4
  82. package/types/components/DataTable/DataTableCell.d.ts +6 -4
  83. package/types/components/DataTable/DataTableColumn.d.ts +32 -11
  84. package/types/components/DataTable/DataTableColumnGroup.d.ts +31 -0
  85. package/types/components/DataTable/DataTableColumns.d.ts +14 -0
  86. package/types/components/DataTable/DataTableContent.d.ts +8 -8
  87. package/types/components/DataTable/DataTableContext.d.ts +7 -6
  88. package/types/components/DataTable/DataTableFilter.d.ts +1 -1
  89. package/types/components/DataTable/DataTableFoot.d.ts +6 -4
  90. package/types/components/DataTable/DataTableHead.d.ts +3 -4
  91. package/types/components/DataTable/DataTablePagination.d.ts +6 -6
  92. package/types/components/DataTable/DataTableRow.d.ts +3 -4
  93. package/types/components/DataTable/DataTableRowsPerPage.d.ts +3 -3
  94. package/types/components/DataTable/DataTableSelectionTrigger.d.ts +4 -4
  95. package/types/components/DataTable/PagedDataTablePagination.d.ts +3 -3
  96. package/types/components/DataTable/ScrolledDataTablePagination.d.ts +3 -3
  97. package/types/components/DataTable/__tests__/spliceWindow.test.d.ts +1 -0
  98. package/types/components/DataTable/columnUtils.d.ts +4 -3
  99. package/types/components/DataTable/index.d.ts +2 -0
  100. package/types/components/DataTable/processRows.d.ts +7 -7
  101. package/types/components/DataTable/sanitizeProps.d.ts +2 -2
  102. package/types/components/DataTable/useDataTableSelectionColumn.d.ts +2 -2
  103. package/types/components/DateInput/DateInput.d.ts +27 -18
  104. package/types/components/DateRangeInput/DateRangeInput.d.ts +37 -24
  105. package/types/components/DescriptionList/DescriptionList.d.ts +4 -4
  106. package/types/components/DescriptionList/DescriptionListItem.d.ts +4 -4
  107. package/types/components/Dialog/Dialog.d.ts +5 -1
  108. package/types/components/Dialog/DialogBody.d.ts +3 -4
  109. package/types/components/Dialog/DialogClose.d.ts +3 -3
  110. package/types/components/Dialog/DialogContent.d.ts +6 -6
  111. package/types/components/Dialog/DialogDescription.d.ts +3 -3
  112. package/types/components/Dialog/DialogFooter.d.ts +3 -4
  113. package/types/components/Dialog/DialogHeader.d.ts +5 -6
  114. package/types/components/Dialog/DialogTitle.d.ts +4 -4
  115. package/types/components/Dialog/DialogTrigger.d.ts +3 -3
  116. package/types/components/DropdownMenu/DropdownMenu.d.ts +4 -4
  117. package/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +5 -5
  118. package/types/components/DropdownMenu/DropdownMenuContent.d.ts +7 -7
  119. package/types/components/DropdownMenu/DropdownMenuGroup.d.ts +3 -3
  120. package/types/components/DropdownMenu/DropdownMenuItem.d.ts +4 -4
  121. package/types/components/DropdownMenu/DropdownMenuRadioGroup.d.ts +3 -3
  122. package/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -4
  123. package/types/components/DropdownMenu/DropdownMenuSub.d.ts +4 -0
  124. package/types/components/DropdownMenu/DropdownMenuSubContent.d.ts +5 -5
  125. package/types/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +3 -3
  126. package/types/components/DropdownMenu/DropdownMenuTrigger.d.ts +3 -3
  127. package/types/components/ErrorBoundary/ErrorBoundary.d.ts +9 -9
  128. package/types/components/Feedback/Feedback.d.ts +3 -3
  129. package/types/components/Feedback/FeedbackContext.d.ts +46 -0
  130. package/types/components/Feedback/FeedbackList.d.ts +6 -0
  131. package/types/components/Feedback/FeedbackListContext.d.ts +2 -0
  132. package/types/components/{FeedbackPopover → Feedback}/FeedbackPopover.d.ts +7 -7
  133. package/types/components/Feedback/FeedbackProvider.d.ts +13 -0
  134. package/types/components/Feedback/feedbackUtils.d.ts +19 -0
  135. package/types/components/Feedback/index.d.ts +4 -0
  136. package/types/components/Field/Field.d.ts +3 -3
  137. package/types/components/Field/FieldContext.d.ts +2 -70
  138. package/types/components/Field/fieldUtils.d.ts +7 -0
  139. package/types/components/Field/index.d.ts +1 -2
  140. package/types/components/FieldGroup/FieldGroup.d.ts +3 -3
  141. package/types/components/FieldGroup/FieldGroupBody.d.ts +3 -3
  142. package/types/components/FieldGroup/FieldGroupHeader.d.ts +4 -4
  143. package/types/components/FieldGroup/FieldGroupTitle.d.ts +2 -2
  144. package/types/components/Form/Form.d.ts +6 -6
  145. package/types/components/Form/FormContext.d.ts +1 -1
  146. package/types/components/Form/FormReset.d.ts +2 -2
  147. package/types/components/Form/FormSubmit.d.ts +2 -2
  148. package/types/components/Form/HiddenFormControl.d.ts +2 -2
  149. package/types/components/Form/useRegisterFormControl.d.ts +1 -1
  150. package/types/components/Grid/Grid.d.ts +4 -4
  151. package/types/components/Grid/GridContext.d.ts +10 -0
  152. package/types/components/Heading/Heading.d.ts +2 -2
  153. package/types/components/HelperText/HelperText.d.ts +3 -3
  154. package/types/components/HelperText/HelperTextContext.d.ts +38 -0
  155. package/types/components/HelperText/HelperTextProvider.d.ts +13 -0
  156. package/types/components/HelperText/helperTextUtils.d.ts +2 -0
  157. package/types/components/HelperText/index.d.ts +2 -0
  158. package/types/components/Icon/Icon.d.ts +3 -3
  159. package/types/components/IconButton/IconButton.d.ts +17 -17
  160. package/types/components/Input/Input.d.ts +1 -1
  161. package/types/components/Keybinds/Keybinds.d.ts +8 -3
  162. package/types/components/Keyboard/Keyboard.d.ts +3 -3
  163. package/types/components/Label/Label.d.ts +14 -14
  164. package/types/components/Label/LabelContext.d.ts +45 -0
  165. package/types/components/Label/LabelProvider.d.ts +13 -0
  166. package/types/components/Label/index.d.ts +2 -0
  167. package/types/components/Label/labelUtils.d.ts +23 -0
  168. package/types/components/Layer/Layer.d.ts +5 -5
  169. package/types/components/Link/Link.d.ts +4 -5
  170. package/types/components/Mark/Mark.d.ts +3 -3
  171. package/types/components/MenuList/MenuList.d.ts +3 -3
  172. package/types/components/MenuList/MenuListGroup.d.ts +5 -5
  173. package/types/components/MenuList/MenuListItem.d.ts +13 -14
  174. package/types/components/NumericInput/NumericInput.d.ts +5 -5
  175. package/types/components/NumericInput/numericInputUtils.d.ts +2 -2
  176. package/types/components/Output/Output.d.ts +2 -2
  177. package/types/components/Overlay/Overlay.d.ts +3 -3
  178. package/types/components/Popover/Popover.d.ts +4 -0
  179. package/types/components/Popover/PopoverAnchor.d.ts +4 -0
  180. package/types/components/Popover/PopoverClose.d.ts +5 -5
  181. package/types/components/Popover/PopoverContent.d.ts +5 -5
  182. package/types/components/Popover/PopoverTrigger.d.ts +3 -3
  183. package/types/components/Portal/Portal.d.ts +3 -3
  184. package/types/components/Printer/Printer.d.ts +1 -1
  185. package/types/components/Printer/PrinterContent.d.ts +5 -5
  186. package/types/components/Printer/PrinterTrigger.d.ts +4 -4
  187. package/types/components/RadioGroup/Radio.d.ts +23 -13
  188. package/types/components/RadioGroup/RadioGroup.d.ts +19 -16
  189. package/types/components/Root/Root.d.ts +9 -9
  190. package/types/components/Root/RootElement.d.ts +3 -3
  191. package/types/components/Select/Option.d.ts +3 -4
  192. package/types/components/Select/OptionsGroup.d.ts +3 -4
  193. package/types/components/Select/Select.d.ts +17 -13
  194. package/types/components/Select/SelectContext.d.ts +6 -12
  195. package/types/components/Select/SelectNative.d.ts +3 -3
  196. package/types/components/Select/selectUtils.d.ts +3 -0
  197. package/types/components/Separator/Separator.d.ts +3 -3
  198. package/types/components/Slot/Slot.d.ts +5 -0
  199. package/types/components/Slot/Slottable.d.ts +2 -2
  200. package/types/components/Spinner/Spinner.d.ts +3 -3
  201. package/types/components/Stack/Stack.d.ts +4 -4
  202. package/types/components/Stack/StackContext.d.ts +9 -0
  203. package/types/components/Stepper/Step.d.ts +6 -6
  204. package/types/components/Stepper/StepContent.d.ts +5 -5
  205. package/types/components/Stepper/StepList.d.ts +3 -3
  206. package/types/components/Stepper/Stepper.d.ts +6 -6
  207. package/types/components/Stepper/StepperFinishTrigger.d.ts +5 -5
  208. package/types/components/Stepper/StepperNextTrigger.d.ts +5 -5
  209. package/types/components/Stepper/StepperPreviousTrigger.d.ts +5 -5
  210. package/types/components/Table/Table.d.ts +15 -10
  211. package/types/components/Table/TableBody.d.ts +3 -3
  212. package/types/components/Table/TableCell.d.ts +3 -3
  213. package/types/components/Table/TableColumn.d.ts +29 -21
  214. package/types/components/Table/TableColumnGroup.d.ts +38 -0
  215. package/types/components/Table/TableContext.d.ts +1 -1
  216. package/types/components/Table/TableFoot.d.ts +3 -3
  217. package/types/components/Table/TableHead.d.ts +15 -7
  218. package/types/components/Table/TableRow.d.ts +3 -3
  219. package/types/components/Table/columnUtils.d.ts +11 -17
  220. package/types/components/Table/index.d.ts +1 -0
  221. package/types/components/Tabs/Tab.d.ts +7 -7
  222. package/types/components/Tabs/TabContent.d.ts +4 -4
  223. package/types/components/Tabs/TabList.d.ts +8 -8
  224. package/types/components/Tabs/Tabs.d.ts +8 -6
  225. package/types/components/Tag/Badge.d.ts +2 -2
  226. package/types/components/Tag/Tag.d.ts +10 -10
  227. package/types/components/TextArea/TextArea.d.ts +2 -2
  228. package/types/components/Toast/Toast.d.ts +13 -13
  229. package/types/components/Toast/ToastDescription.d.ts +4 -0
  230. package/types/components/Toast/ToastProvider.d.ts +2 -2
  231. package/types/components/Toast/ToastTitle.d.ts +3 -3
  232. package/types/components/Toast/ToastViewport.d.ts +3 -3
  233. package/types/components/Tooltip/Tooltip.d.ts +5 -5
  234. package/types/components/Tooltip/TooltipProvider.d.ts +4 -0
  235. package/types/components/VisuallyHidden/VisuallyHidden.d.ts +2 -2
  236. package/types/index.d.ts +1 -2
  237. package/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +12 -12
  238. package/types/providers/ErrorReportingProvider/ErrorReportingProvider.d.ts +1 -1
  239. package/types/providers/LocalizationProvider/LocalizationObject.d.ts +2 -3
  240. package/types/providers/ToastManagerProvider/ToastManagerContext.d.ts +6 -6
  241. package/types/utils/__tests__/combineEventHandlers.test.d.ts +1 -0
  242. package/types/utils/__tests__/cx.test.d.ts +1 -0
  243. package/types/utils/__tests__/numericStringUtils.test.d.ts +1 -0
  244. package/types/utils/__tests__/useNumericTrasformer.test.d.ts +1 -0
  245. package/types/utils/documentTitleUtils.d.ts +4 -0
  246. package/types/utils/parseChildren.d.ts +64 -0
  247. package/types/utils/polymorphicTypes.d.ts +2 -13
  248. package/types/utils/useLocation.d.ts +3 -3
  249. package/types/utils/useNumericTransformer.d.ts +9 -6
  250. package/scss/components/FeedbackList/_FeedbackList-variables.scss +0 -6
  251. package/scss/components/FeedbackList/_FeedbackList.scss +0 -32
  252. package/scss/components/FeedbackPopover/_FeedbackPopover-variables.scss +0 -26
  253. package/scss/components/FeedbackPopover/_FeedbackPopover.scss +0 -66
  254. package/types/components/FeedbackList/FeedbackList.d.ts +0 -6
  255. package/types/components/FeedbackList/FeedbackListContext.d.ts +0 -4
  256. package/types/components/FeedbackList/index.d.ts +0 -2
  257. package/types/components/FeedbackPopover/index.d.ts +0 -2
  258. package/types/components/Field/FieldProvider.d.ts +0 -13
  259. /package/types/components/{FeedbackPopover → Feedback}/FeedbackPopoverContext.d.ts +0 -0
@@ -1,8 +1,8 @@
1
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
1
+ import { type ComponentProps } from "react";
2
2
  import type { AccentColor } from "../../utils/accent.ts";
3
- import { CloseButton } from "../CloseButton";
4
- import { CollapsibleContent } from "../Collapsible";
5
- import { Icon, type IconProp } from "../Icon";
3
+ import { type CloseButtonProps } from "../CloseButton";
4
+ import { type CollapsibleContentProps } from "../Collapsible";
5
+ import { type IconProp, type IconProps } from "../Icon";
6
6
  /** Tag variants. */
7
7
  export type TagVariant = "solid" | "subtle" | "outlined";
8
8
  /** Tag colours. */
@@ -10,7 +10,7 @@ export type TagColor = AccentColor;
10
10
  /** Tag's icon placement. */
11
11
  export type TagIconPlacement = "start" | "end";
12
12
  /** Properties of the tag component. */
13
- export interface TagProps extends ComponentPropsWithoutRef<"span"> {
13
+ export interface TagProps extends ComponentProps<"span"> {
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
@@ -68,13 +68,13 @@ export interface TagProps extends ComponentPropsWithoutRef<"span"> {
68
68
  */
69
69
  showCloseButton?: boolean;
70
70
  /** Properties to pass to the container element. */
71
- containerProps?: ComponentPropsWithRef<typeof CollapsibleContent>;
71
+ containerProps?: CollapsibleContentProps;
72
72
  /** Properties to pass to the content element. */
73
- contentProps?: ComponentPropsWithRef<"span">;
73
+ contentProps?: ComponentProps<"span">;
74
74
  /** Properties to pass to the icon component. */
75
- iconProps?: Omit<ComponentPropsWithRef<typeof Icon>, "icon">;
75
+ iconProps?: Omit<IconProps, "icon">;
76
76
  /** Properties to pass to the close button component. */
77
- closeButtonProps?: ComponentPropsWithRef<typeof CloseButton>;
77
+ closeButtonProps?: CloseButtonProps;
78
78
  }
79
79
  /**
80
80
  * Component displaying a stylised tag.
@@ -89,4 +89,4 @@ export interface TagProps extends ComponentPropsWithoutRef<"span"> {
89
89
  * }
90
90
  * ```
91
91
  */
92
- export declare const Tag: import("react").ForwardRefExoticComponent<TagProps & import("react").RefAttributes<HTMLSpanElement>>;
92
+ export declare function Tag({ asChild, variant, color, defaultOpen, open, onOpenChange, icon, iconPlacement, pill, showCloseButton, className, containerProps, contentProps, iconProps, closeButtonProps, children, ...otherProps }: TagProps): import("react").JSX.Element;
@@ -2,7 +2,7 @@ import { type ControlTextAreaProps } from "../Control";
2
2
  import type { FormValidationMode } from "../Form";
3
3
  import { type FormControlValidateFn } from "../Form/useRegisterFormControl.ts";
4
4
  /** Properties of the text area component. */
5
- export interface TextAreaProps extends ControlTextAreaProps {
5
+ export interface TextAreaProps extends Omit<ControlTextAreaProps, "asChild"> {
6
6
  /**
7
7
  * Custom validation function meant to validate the control when it is part of
8
8
  * a `Form`.
@@ -32,4 +32,4 @@ export interface TextAreaProps extends ControlTextAreaProps {
32
32
  * }
33
33
  * ```
34
34
  */
35
- export declare const TextArea: import("react").ForwardRefExoticComponent<TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
35
+ export declare function TextArea({ name, defaultValue, value, status, disabled, validate, validationMode, rows, onValueChange, onBlurToOutside, ...otherProps }: TextAreaProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { Toast as ToastPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from "react";
3
- import { CloseButton } from "../CloseButton";
4
- import { Icon, type IconProp } from "../Icon";
2
+ import { type ComponentProps, type ReactNode } from "react";
3
+ import { type CloseButtonProps } from "../CloseButton";
4
+ import { type IconProp, type IconProps } from "../Icon";
5
5
  /** Toast variants. */
6
6
  export type ToastVariant = "solid" | "subtle" | "outlined";
7
7
  /** Toast severities. */
@@ -21,7 +21,7 @@ export interface ToastPropsWithoutAction extends ToastPropsBase {
21
21
  actionAltText?: undefined;
22
22
  }
23
23
  /** Base properties of the toast component. */
24
- export interface ToastPropsBase extends Pick<ComponentPropsWithoutRef<typeof ToastPrimitive.Root>, "duration" | "defaultOpen" | "open" | "onOpenChange" | "onEscapeKeyDown" | "onPause" | "onResume" | "onSwipeStart" | "onSwipeMove" | "onSwipeEnd" | "onSwipeCancel" | "forceMount">, Omit<ComponentPropsWithoutRef<"div">, "onPause"> {
24
+ export interface ToastPropsBase extends Pick<ComponentProps<typeof ToastPrimitive.Root>, "duration" | "defaultOpen" | "open" | "onOpenChange" | "onEscapeKeyDown" | "onPause" | "onResume" | "onSwipeStart" | "onSwipeMove" | "onSwipeEnd" | "onSwipeCancel" | "forceMount">, Omit<ComponentProps<"div">, "onPause"> {
25
25
  /**
26
26
  * Toast variant.
27
27
  *
@@ -75,11 +75,11 @@ export interface ToastPropsBase extends Pick<ComponentPropsWithoutRef<typeof Toa
75
75
  dismissible?: boolean;
76
76
  /**
77
77
  * Whether to show a close button. By default, a close button is shown when an
78
- * `action` is not specified and when the toast is dismissible..
78
+ * `action` is not specified and when the toast is dismissible.
79
79
  */
80
80
  showCloseButton?: boolean;
81
81
  /**
82
- * Whether the toast should be visually hidden. _I.e._ it provides a
82
+ * Whether the toast should be visually hidden. I.e. it provides a
83
83
  * notification only to screen readers.
84
84
  *
85
85
  * This is useful when sighted users can easily see that something has
@@ -88,17 +88,17 @@ export interface ToastPropsBase extends Pick<ComponentPropsWithoutRef<typeof Toa
88
88
  */
89
89
  visuallyHidden?: boolean;
90
90
  /** Properties to pass to the root component. */
91
- rootProps?: Omit<ComponentPropsWithRef<"li">, "onPause">;
91
+ rootProps?: Omit<ComponentProps<"li">, "onPause">;
92
92
  /** Properties to pass to the container component. */
93
- containerProps?: ComponentPropsWithRef<"div">;
93
+ containerProps?: ComponentProps<"div">;
94
94
  /** Properties to pass to the icon component. */
95
- iconProps?: Omit<ComponentPropsWithRef<typeof Icon>, "icon">;
95
+ iconProps?: Omit<IconProps, "icon">;
96
96
  /** Properties to pass to the content component. */
97
- contentProps?: ComponentPropsWithRef<"div">;
97
+ contentProps?: ComponentProps<"div">;
98
98
  /** Properties to pass to the component containing the action/close button. */
99
- actionContainerProps?: ComponentPropsWithRef<"div">;
99
+ actionContainerProps?: ComponentProps<"div">;
100
100
  /** Properties to pass to the close button component. */
101
- closeButtonProps?: ComponentPropsWithRef<typeof CloseButton>;
101
+ closeButtonProps?: CloseButtonProps;
102
102
  }
103
103
  /**
104
104
  * The toast component provides a brief, temporary notification. Built on top of
@@ -151,4 +151,4 @@ export interface ToastPropsBase extends Pick<ComponentPropsWithoutRef<typeof Toa
151
151
  * > accessible region where notifications are rendered. Manual setup of these
152
152
  * > components is not required.
153
153
  */
154
- export declare const Toast: import("react").ForwardRefExoticComponent<ToastProps & import("react").RefAttributes<HTMLDivElement>>;
154
+ export declare function Toast({ duration, defaultOpen, open: controlledOpen, onOpenChange, onEscapeKeyDown, onPause, onResume, onSwipeStart, onSwipeMove, onSwipeEnd, onSwipeCancel, forceMount, variant, severity, announce, icon, action, actionAltText, dismissible, showCloseButton, visuallyHidden, rootProps, containerProps, iconProps, contentProps, actionContainerProps, closeButtonProps, children, className, ...otherProps }: ToastProps): import("react").JSX.Element;
@@ -1,3 +1,7 @@
1
1
  import { Toast as ToastPrimitive } from "radix-ui";
2
+ import type { ComponentProps } from "react";
3
+ /** Properties of the toast description component. */
4
+ export interface ToastDescriptionProps extends ComponentProps<typeof ToastPrimitive.Description> {
5
+ }
2
6
  /** The toast message. */
3
7
  export declare const ToastDescription: import("react").ForwardRefExoticComponent<ToastPrimitive.ToastDescriptionProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,9 +1,9 @@
1
1
  import { Toast as ToastPrimitive } from "radix-ui";
2
- import type { ComponentPropsWithoutRef } from "react";
2
+ import type { ComponentProps } from "react";
3
3
  /** Direction of pointer swipe that should close the toast */
4
4
  export type ToastSwipeDirection = "left" | "right";
5
5
  /** Properties of the toast provider. */
6
- export interface ToastProviderProps extends ComponentPropsWithoutRef<typeof ToastPrimitive.Provider> {
6
+ export interface ToastProviderProps extends ComponentProps<typeof ToastPrimitive.Provider> {
7
7
  swipeDirection?: ToastSwipeDirection;
8
8
  }
9
9
  /**
@@ -1,7 +1,7 @@
1
1
  import { Toast as ToastPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef } from "react";
2
+ import type { ComponentProps } from "react";
3
3
  /** Properties of the toast title. */
4
- export interface ToastTitleProps extends ComponentPropsWithoutRef<typeof ToastPrimitive.Title> {
4
+ export interface ToastTitleProps extends ComponentProps<typeof ToastPrimitive.Title> {
5
5
  }
6
6
  /** An optional title for the toast. */
7
- export declare const ToastTitle: import("react").ForwardRefExoticComponent<ToastTitleProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ export declare function ToastTitle({ className, ...otherProps }: ToastTitleProps): import("react").JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import { Toast as ToastPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef } from "react";
2
+ import type { ComponentProps } from "react";
3
3
  /** Position of the viewport. */
4
4
  export type ToastViewportPosition = "left" | "right";
5
5
  /** Properties of the toast viewport component. */
6
- export interface ToastViewportProps extends ComponentPropsWithoutRef<typeof ToastPrimitive.Viewport> {
6
+ export interface ToastViewportProps extends ComponentProps<typeof ToastPrimitive.Viewport> {
7
7
  /**
8
8
  * Position of the viewport.
9
9
  *
@@ -15,4 +15,4 @@ export interface ToastViewportProps extends ComponentPropsWithoutRef<typeof Toas
15
15
  * The fixed area where toasts appear. Users can jump to the viewport by
16
16
  * pressing a hotkey.
17
17
  */
18
- export declare const ToastViewport: import("react").ForwardRefExoticComponent<ToastViewportProps & import("react").RefAttributes<HTMLOListElement>>;
18
+ export declare function ToastViewport({ position, label, className, ...otherProps }: ToastViewportProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { Tooltip as TooltipPrimitive } from "radix-ui";
2
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactElement, type ReactNode } from "react";
2
+ import type { ComponentProps, ReactElement, ReactNode } from "react";
3
3
  /** Properties of the tooltip component. */
4
- export interface TooltipProps extends Omit<ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, "asChild" | "content" | "forceMount"> {
4
+ export interface TooltipProps extends Omit<ComponentProps<typeof TooltipPrimitive.Content>, "asChild" | "content" | "forceMount"> {
5
5
  /** Tooltip's content. */
6
6
  content: ReactNode;
7
7
  /**
@@ -38,9 +38,9 @@ export interface TooltipProps extends Omit<ComponentPropsWithoutRef<typeof Toolt
38
38
  /** Used to force mounting when more control is needed. */
39
39
  forceMount?: true;
40
40
  /** Properties to pass to the portal component. */
41
- portalProps?: Omit<ComponentPropsWithRef<typeof TooltipPrimitive.Portal>, "forceMount">;
41
+ portalProps?: Omit<ComponentProps<typeof TooltipPrimitive.Portal>, "forceMount">;
42
42
  /** Properties to pass to the arrow component. */
43
- arrowProps?: ComponentPropsWithRef<typeof TooltipPrimitive.Arrow>;
43
+ arrowProps?: ComponentProps<typeof TooltipPrimitive.Arrow>;
44
44
  }
45
45
  /**
46
46
  * The tooltip component displays a popup containing information related to an
@@ -67,4 +67,4 @@ export interface TooltipProps extends Omit<ComponentPropsWithoutRef<typeof Toolt
67
67
  * > `TooltipProvider`, which manages the global configuration and state for all
68
68
  * > nested tooltips. Manual setup of the provider is not required.
69
69
  */
70
- export declare const Tooltip: import("react").ForwardRefExoticComponent<TooltipProps & import("react").RefAttributes<HTMLDivElement>>;
70
+ export declare function Tooltip({ content, showArrow, children, defaultOpen, open, onOpenChange, delayDuration, disableHoverableContent, forceMount, portalProps, arrowProps, sideOffset, collisionPadding, className, ...otherProps }: TooltipProps): import("react").JSX.Element;
@@ -1,3 +1,7 @@
1
1
  import { Tooltip as TooltipPrimitive } from "radix-ui";
2
+ import type { ComponentProps } from "react";
3
+ /** Properties of the tooltip provider component. */
4
+ export interface TooltipProviderProps extends ComponentProps<typeof TooltipPrimitive.Provider> {
5
+ }
2
6
  /** Wrapper providing global options for tooltips. */
3
7
  export declare const TooltipProvider: import("react").FC<TooltipPrimitive.TooltipProviderProps>;
@@ -1,4 +1,4 @@
1
- import type { PolymorphicComponent, PolymorphicProps } from "../../utils/polymorphicTypes.ts";
1
+ import type { PolymorphicProps } from "../../utils/polymorphicTypes.ts";
2
2
  /** Elements a visually hidden component can be rendered as. */
3
3
  export type VisuallyHiddenAs = "span" | "div";
4
4
  /** Properties of the visually hidden component. */
@@ -39,4 +39,4 @@ export interface VisuallyHiddenOwnProps {
39
39
  * }
40
40
  * ```
41
41
  */
42
- export declare const VisuallyHidden: PolymorphicComponent<VisuallyHiddenAs, "span", VisuallyHiddenOwnProps>;
42
+ export declare function VisuallyHidden<TAs extends VisuallyHiddenAs = "span">({ asChild, as, focusable, className, ...otherProps }: VisuallyHiddenProps<TAs>): import("react").JSX.Element;
package/types/index.d.ts CHANGED
@@ -25,8 +25,6 @@ export * from "./components/Dialog";
25
25
  export * from "./components/DropdownMenu";
26
26
  export * from "./components/ErrorBoundary";
27
27
  export * from "./components/Feedback";
28
- export * from "./components/FeedbackList";
29
- export * from "./components/FeedbackPopover";
30
28
  export * from "./components/Field";
31
29
  export * from "./components/FieldGroup";
32
30
  export * from "./components/Form";
@@ -78,6 +76,7 @@ export * from "./utils/keyboardShortcut.ts";
78
76
  export * from "./utils/nativeControls.ts";
79
77
  export * from "./utils/navigate.ts";
80
78
  export * from "./utils/numericStringUtils.ts";
79
+ export * from "./utils/parseChildren.ts";
81
80
  export * from "./utils/parseDateStrict.ts";
82
81
  export * from "./utils/polymorphicTypes.ts";
83
82
  export * from "./utils/setNativeProperty.ts";
@@ -1,6 +1,6 @@
1
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from "react";
2
- import type { AlertDialogBody, AlertDialogContent, AlertDialogContentColor, AlertDialogContentSize, AlertDialogContentVariant, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "../../components/AlertDialog";
3
- import type { Button } from "../../components/Button";
1
+ import { type ReactNode } from "react";
2
+ import type { AlertDialogBodyProps, AlertDialogContentColor, AlertDialogContentProps, AlertDialogContentSize, AlertDialogContentVariant, AlertDialogDescriptionProps, AlertDialogFooterProps, AlertDialogHeaderProps, AlertDialogTitleProps } from "../../components/AlertDialog";
3
+ import type { ButtonProps } from "../../components/Button";
4
4
  /** Options that can be provided to both `alert` and `confirm` alert dialogs. */
5
5
  export interface AlertDialogOptions {
6
6
  /** Alert dialog's title. */
@@ -37,26 +37,26 @@ export interface AlertDialogOptions {
37
37
  */
38
38
  triggerElement?: HTMLElement | null;
39
39
  /** Properties to pass to the alert dialog's content component. */
40
- contentProps?: Omit<ComponentPropsWithoutRef<typeof AlertDialogContent>, "solid" | "color" | "size">;
40
+ contentProps?: Omit<AlertDialogContentProps, "solid" | "color" | "size">;
41
41
  /** Properties to pass to the alert dialog's header component. */
42
- headerProps?: ComponentPropsWithRef<typeof AlertDialogHeader>;
42
+ headerProps?: AlertDialogHeaderProps;
43
43
  /** Properties to pass to the alert dialog's title component. */
44
- titleProps?: ComponentPropsWithRef<typeof AlertDialogTitle>;
44
+ titleProps?: AlertDialogTitleProps;
45
45
  /** Properties to pass to the alert dialog's body component. */
46
- bodyProps?: ComponentPropsWithRef<typeof AlertDialogBody>;
46
+ bodyProps?: AlertDialogBodyProps;
47
47
  /** Properties to pass to the alert dialog's description component. */
48
- descriptionProps?: ComponentPropsWithRef<typeof AlertDialogDescription>;
48
+ descriptionProps?: AlertDialogDescriptionProps;
49
49
  /** Properties to pass to the alert dialog's footer component. */
50
- footerProps?: ComponentPropsWithRef<typeof AlertDialogFooter>;
50
+ footerProps?: AlertDialogFooterProps;
51
51
  /** Properties to pass to the alert dialog's OK button component. */
52
- okButtonProps?: Omit<ComponentPropsWithRef<typeof Button<"button">>, "onClick">;
52
+ okButtonProps?: Omit<ButtonProps, "onClick">;
53
53
  }
54
54
  /** Options that can be provided to a `confirm` alert dialog. */
55
55
  export interface ConfirmDialogOptions extends AlertDialogOptions {
56
56
  /** Alert dialog's cancel text. */
57
57
  cancelText?: ReactNode;
58
58
  /** Properties to pass to the alert dialog's cancel button component. */
59
- cancelButtonProps?: Omit<ComponentPropsWithRef<typeof Button<"button">>, "onClick">;
59
+ cancelButtonProps?: Omit<ButtonProps, "onClick">;
60
60
  }
61
61
  /** Value of the alert dialog context. */
62
62
  export interface AlertDialogProviderContextValue {
@@ -94,4 +94,4 @@ export interface AlertDialogProviderContextValue {
94
94
  confirm: (description: ReactNode, dialogOptions?: ConfirmDialogOptions) => Promise<boolean>;
95
95
  }
96
96
  /** Alert dialog context. */
97
- export declare const AlertDialogProviderContext: import("react").Context<AlertDialogProviderContextValue | undefined>;
97
+ export declare const AlertDialogProviderContext: import("react").Context<AlertDialogProviderContextValue | null>;
@@ -17,7 +17,7 @@ export interface ErrorReportingProviderProps {
17
17
  *
18
18
  * @param report Error report that should be reported.
19
19
  */
20
- reportError?: (report: ErrorReport) => void | Promise<void>;
20
+ reportError?: (report: ErrorReport) => void | PromiseLike<void>;
21
21
  /**
22
22
  * URL to report the error to when using the default `reportError` function.
23
23
  *
@@ -1,15 +1,14 @@
1
1
  import type { Locale as DayPickerLocale } from "@daypicker/react";
2
2
  import type { CalendarProps } from "../../components/Calendar";
3
3
  import type { CloseButtonProps } from "../../components/CloseButton";
4
- import type { CollapsibleTriggerChildlessProps } from "../../components/Collapsible/CollapsibleTrigger.tsx";
4
+ import type { CollapsibleTriggerChildlessProps } from "../../components/Collapsible";
5
5
  import type { CommandMenuDialogProps, CommandMenuProps } from "../../components/CommandMenu";
6
6
  import type { ControlCodeProps } from "../../components/ControlCode";
7
7
  import type { DataTableContentProps, DataTableFilterProps, DataTablePaginationProps, DataTableProps, DataTableRowsPerPageProps } from "../../components/DataTable";
8
8
  import type { DateInputProps } from "../../components/DateInput";
9
9
  import type { DateRangeInputProps } from "../../components/DateRangeInput";
10
10
  import type { ErrorBoundaryProps } from "../../components/ErrorBoundary";
11
- import type { FeedbackProps } from "../../components/Feedback";
12
- import type { FeedbackPopoverProps } from "../../components/FeedbackPopover";
11
+ import type { FeedbackPopoverProps, FeedbackProps } from "../../components/Feedback";
13
12
  import type { FieldGroupHeaderProps } from "../../components/FieldGroup";
14
13
  import type { FormProps } from "../../components/Form";
15
14
  import type { InputProps } from "../../components/Input";
@@ -1,16 +1,16 @@
1
- import { type ComponentPropsWithRef, type ReactNode } from "react";
2
- import type { Toast, ToastDescription, ToastTitle } from "../../components/Toast";
1
+ import { type ReactNode } from "react";
2
+ import type { ToastDescriptionProps, ToastProps, ToastTitleProps } from "../../components/Toast";
3
3
  import type { DistributedOmit } from "../../utils/typeUtils.ts";
4
4
  /** Toast options. */
5
- export type ToastOptions = DistributedOmit<ComponentPropsWithRef<typeof Toast>, "defaultOpen" | "open" | "title"> & {
5
+ export type ToastOptions = DistributedOmit<ToastProps, "defaultOpen" | "open" | "title"> & {
6
6
  /** Toast's title. */
7
7
  title?: ReactNode;
8
8
  /** HTML `title` prop. */
9
9
  htmlTitle?: string;
10
10
  /** Properties to pass to the title component. */
11
- titleProps?: ComponentPropsWithRef<typeof ToastTitle>;
11
+ titleProps?: ToastTitleProps;
12
12
  /** Properties to pass to the description component. */
13
- descriptionProps?: ComponentPropsWithRef<typeof ToastDescription>;
13
+ descriptionProps?: ToastDescriptionProps;
14
14
  };
15
15
  /** Toast identifier. */
16
16
  export type ToastId = number;
@@ -34,4 +34,4 @@ export interface ToastManagerContextValue {
34
34
  removeToast: (toastId: ToastId | null | undefined) => void;
35
35
  }
36
36
  /** Toast manager context. */
37
- export declare const ToastManagerContext: import("react").Context<ToastManagerContextValue | undefined>;
37
+ export declare const ToastManagerContext: import("react").Context<ToastManagerContextValue | null>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ /** Gets the current document title, taking into account pending updates. */
2
+ export declare function getDocumentTitle(): string;
3
+ /** Sets the document title, batching quick updates. */
4
+ export declare function setDocumentTitle(title: string): void;
@@ -0,0 +1,64 @@
1
+ import { type FunctionComponent, type ReactNode } from "react";
2
+ /** Options accepted by the {@link parseChildren} function. */
3
+ export interface ParseChildrenOptions {
4
+ /** Whether to transform children into an object instead of an array. */
5
+ toObject?: boolean;
6
+ /**
7
+ * Key property to use when `toObject` is `true`.
8
+ *
9
+ * @default "id"
10
+ */
11
+ objectKeyProp?: string;
12
+ /** Component used to group other components. */
13
+ groupType?: FunctionComponent<any>;
14
+ /**
15
+ * Whether to support groups nested within other groups.
16
+ *
17
+ * @default false
18
+ */
19
+ allowNestedGroups?: boolean;
20
+ /**
21
+ * Property to set on the object with the group children objects when a
22
+ * `groupComponent` is provided.
23
+ *
24
+ * @default "children"
25
+ */
26
+ groupProp?: string;
27
+ /**
28
+ * Whether to render (simply call) unknown functional components.
29
+ *
30
+ * @default true
31
+ */
32
+ renderUnknownComponents?: boolean;
33
+ /**
34
+ * Components that should **not** be rendered, even if
35
+ * `renderUnknownComponents` is `true`.
36
+ */
37
+ doNotRender?: FunctionComponent<any>[];
38
+ /** Function used to transform an object. */
39
+ transformObject?: (object: any) => any;
40
+ /**
41
+ * Function used to transform a child object.
42
+ *
43
+ * @default transformObject
44
+ */
45
+ transformChildObject?: (childObject: any) => any;
46
+ /**
47
+ * Function used to transform a group object.
48
+ *
49
+ * @default transformObject
50
+ */
51
+ transformGroupObject?: (groupObject: any) => any;
52
+ }
53
+ /** Result type of the `parseChildren` function. */
54
+ export type ParseChildrenResult<_TChildType, TOptions extends ParseChildrenOptions = ParseChildrenOptions> = TOptions["toObject"] extends true ? Record<string, any> : any[];
55
+ /**
56
+ * Utility function used to parse JSX elements within a `children` property and
57
+ * transform them into standard JS objects containing the JSX elements'
58
+ * properties.
59
+ *
60
+ * @param children Children property.
61
+ * @param childType Child type that should be transformed into an object.
62
+ * @param options Options used when parsing.
63
+ */
64
+ export declare function parseChildren<TChildType, const TOptions extends ParseChildrenOptions = ParseChildrenOptions>(children: ReactNode, childType: FunctionComponent<TChildType>, options?: TOptions): ParseChildrenResult<TChildType, TOptions>;
@@ -1,17 +1,6 @@
1
- import type { ComponentPropsWithoutRef, ComponentPropsWithRef, ElementType, ReactElement } from "react";
1
+ import type { ComponentProps, ElementType } from "react";
2
2
  /** Properties of a polymorphic component. */
3
- export type PolymorphicProps<TAsAllowed extends ElementType, TAs extends TAsAllowed, TAsDefault extends TAsAllowed, TOwnProps> = TOwnProps & AsProp<TAsAllowed, TAs, TAsDefault> & Omit<ComponentPropsWithoutRef<TAs>, keyof TOwnProps | "as">;
4
- /** Reference type for a polymorphic component. */
5
- export type PolymorphicRef<TAs extends ElementType> = ComponentPropsWithRef<TAs>["ref"];
6
- /** Polymorphic component type supporting an `as` property. */
7
- export interface PolymorphicComponent<TAsAllowed extends ElementType, TAsDefault extends TAsAllowed, TOwnProps> {
8
- (props: PolymorphicProps<TAsAllowed, TAsDefault, TAsDefault, TOwnProps> & {
9
- ref?: PolymorphicRef<TAsDefault>;
10
- }): ReactElement | null;
11
- <TAs extends TAsAllowed>(props: PolymorphicProps<TAsAllowed, TAs, TAsDefault, TOwnProps> & {
12
- ref?: PolymorphicRef<TAs>;
13
- }): ReactElement | null;
14
- }
3
+ export type PolymorphicProps<TAsAllowed extends ElementType, TAs extends TAsAllowed, TAsDefault extends TAsAllowed, TOwnProps> = TOwnProps & AsProp<TAsAllowed, TAs, TAsDefault> & Omit<ComponentProps<TAs>, keyof TOwnProps | "as">;
15
4
  /** `as` property for polymorphic components. */
16
5
  type AsProp<TAsAllowed extends ElementType, TAs extends TAsAllowed, TAsDefault extends TAsAllowed> = TAsDefault extends TAs ? {
17
6
  /** Element to render the component as. */
@@ -3,21 +3,21 @@ interface LocationPath {
3
3
  /**
4
4
  * String containing the pathname of the URL.
5
5
  *
6
- * _E.g._, `/foo/bar` in `https://example.org:8080/foo/bar?q=baz#bang`.
6
+ * E.g. `/foo/bar` in `https://example.org:8080/foo/bar?q=baz#bang`.
7
7
  */
8
8
  readonly pathname: string;
9
9
  /**
10
10
  * Search string (also known as _query string_): `"?"` followed by the
11
11
  * parameters of the URL or an empty string if there are no such parameters.
12
12
  *
13
- * _E.g._, `?q=baz` in `https://example.org:8080/foo/bar?q=baz#bang`.
13
+ * E.g. `?q=baz` in `https://example.org:8080/foo/bar?q=baz#bang`.
14
14
  */
15
15
  readonly search: string;
16
16
  /**
17
17
  * `"#"` followed by the fragment identifier of the URL or an empty string if
18
18
  * there is no fragment identifier.
19
19
  *
20
- * _E.g._, `#bang` in `https://example.org:8080/foo/bar?q=baz#bang`.
20
+ * E.g. `#bang` in `https://example.org:8080/foo/bar?q=baz#bang`.
21
21
  */
22
22
  readonly hash: string;
23
23
  }
@@ -3,18 +3,21 @@ export type GroupingStyle = "thousand" | "lakh" | "wan";
3
3
  /** Options of the `useNumericTransformer` hook. */
4
4
  export interface NumericTransformerOptions {
5
5
  /**
6
- * Whether the value should always represent an integer, even when it contains
7
- * a scale. Note that in this case, the scale must be known (i.e. `scale` must
8
- * not be `undefined`).
6
+ * Whether the value should always represent an integer. When set, the `scale`
7
+ * must be defined (and defaults to `0` if not provided).
8
+ *
9
+ * As an example, if `valueIsInteger` set with a `scale` of `2`, the value
10
+ * `1000` will be formatted similarly to `10.00`.
9
11
  */
10
12
  valueIsInteger?: boolean;
11
13
  /**
12
14
  * Specifies the number of digits allowed after the decimal separator. When
13
- * not specified, the scale has no limits.
15
+ * not specified (or `null`), the scale has no limits.
14
16
  *
15
- * @default null
17
+ * The scale must be set when `valueIsInteger` is also set, defaulting to `0`
18
+ * otherwise.
16
19
  */
17
- scale?: number;
20
+ scale?: number | null;
18
21
  /**
19
22
  * Whether to always add trailing zeros to match the given `scale`. Defaults
20
23
  * to `false` when `scale` is `null` and `true` otherwise.
@@ -1,6 +0,0 @@
1
- @use "../../scss/base-variables" as *;
2
- @use "../../scss/utils/spacing" as *;
3
-
4
- // Feedback
5
- $feedback-list-feedback-margin-x: spacing(3.5) !default;
6
- $feedback-list-feedback-margin-y: spacing(0.5) !default;
@@ -1,32 +0,0 @@
1
- @use "FeedbackList-variables" as *;
2
- @use "../Feedback/Feedback-variables" as *;
3
- @use "../../scss/base-variables" as *;
4
-
5
- .#{$prefix}feedback-list {
6
- width: fit-content;
7
- margin: 0;
8
- padding: 0;
9
-
10
- @if $feedback-text-align == right {
11
- :not(.#{$prefix}checkbox__root):not(.#{$prefix}checkbox-group):not(
12
- .#{$prefix}radio-group
13
- )
14
- + & {
15
- margin-left: auto !important;
16
- }
17
- }
18
-
19
- & > .#{$prefix}feedback {
20
- margin-left: $feedback-list-feedback-margin-x !important;
21
- text-align: left !important;
22
-
23
- & ~ .#{$prefix}feedback {
24
- margin-top: $feedback-list-feedback-margin-y;
25
- }
26
-
27
- &:only-of-type {
28
- list-style: none;
29
- margin-left: 0 !important;
30
- }
31
- }
32
- }
@@ -1,26 +0,0 @@
1
- @use "../ControlAddon/ControlAddon-variables" as *;
2
- @use "../Field/Field-variables" as *;
3
- @use "../Label/Label-variables" as *;
4
- @use "../../scss/base-variables" as *;
5
- @use "../../scss/utils/spacing" as *;
6
- @use "../../scss/placeholders/control/control-variables" as *;
7
-
8
- $feedback-popover-max-width: $label-helper-popover-max-width !default;
9
- $feedback-popover-max-height: $label-helper-popover-max-height !default;
10
- $feedback-popover-padding-y: $label-helper-popover-padding-y !default;
11
- $feedback-popover-padding-x: $label-helper-popover-padding-x !default;
12
-
13
- // Button - Within control
14
- $feedback-popover-button-control-inset-x: calc(
15
- (
16
- var(--#{$prefix}icon-button-min-size) - var(
17
- --#{$prefix}icon-button-font-size
18
- )
19
- ) /
20
- 2
21
- );
22
-
23
- // Feedback
24
- $feedback-popover-feedback-spacing-y: $field-feedback-spacing-y !default;
25
- $feedback-popover-feedback-font-size: null !default;
26
- $feedback-popover-feedback-line-height: null !default;