@ostack.tech/ui 1.2.0 → 1.3.0-beta.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 (139) hide show
  1. package/dist/chunks/{en-DGLb7rrz.js → en-W4OWqPrv.js} +3 -4
  2. package/dist/chunks/en-W4OWqPrv.js.map +1 -0
  3. package/dist/chunks/{platformUtils-dLFQaWJG.js → platformUtils-Dm2Fkhni.js} +2 -3
  4. package/dist/chunks/{platformUtils-dLFQaWJG.js.map → platformUtils-Dm2Fkhni.js.map} +1 -1
  5. package/dist/locales/en-GB.js +2 -3
  6. package/dist/locales/en-GB.js.map +1 -1
  7. package/dist/locales/en-US.js +2 -3
  8. package/dist/locales/en-US.js.map +1 -1
  9. package/dist/locales/fr-FR.js +2 -3
  10. package/dist/locales/fr-FR.js.map +1 -1
  11. package/dist/locales/pt-PT.js +2 -3
  12. package/dist/locales/pt-PT.js.map +1 -1
  13. package/dist/ostack-ui.css +942 -255
  14. package/dist/ostack-ui.js +9889 -7842
  15. package/dist/ostack-ui.js.map +1 -1
  16. package/package.json +6 -6
  17. package/scss/_utils.scss +2 -1
  18. package/scss/components/ButtonGroup/_ButtonGroup.scss +7 -4
  19. package/scss/components/Calendar/_Calendar.scss +0 -1
  20. package/scss/components/Card/_Card.scss +16 -7
  21. package/scss/components/Code/_Code.scss +3 -3
  22. package/scss/components/Container/_Container.scss +3 -3
  23. package/scss/components/ControlCode/_ControlCode.scss +1 -1
  24. package/scss/components/DataTable/_DataTable.scss +8 -8
  25. package/scss/components/DescriptionList/_DescriptionList.scss +1 -1
  26. package/scss/components/DropdownMenu/_DropdownMenu.scss +8 -2
  27. package/scss/components/Feedback/_Feedback.scss +12 -9
  28. package/scss/components/Field/_Field.scss +3 -3
  29. package/scss/components/FieldGroup/_FieldGroup.scss +2 -1
  30. package/scss/components/Form/_Form.scss +2 -2
  31. package/scss/components/Grid/_Grid.scss +17 -11
  32. package/scss/components/Heading/_Heading-variables.scss +4 -1
  33. package/scss/components/Heading/_Heading.scss +22 -10
  34. package/scss/components/HelperText/_HelperText.scss +9 -7
  35. package/scss/components/Icon/_Icon-variables.scss +1 -0
  36. package/scss/components/Icon/_Icon.scss +2 -6
  37. package/scss/components/Keyboard/_Keyboard-variables.scss +4 -2
  38. package/scss/components/Keyboard/_Keyboard.scss +8 -4
  39. package/scss/components/Label/_Label-variables.scss +4 -0
  40. package/scss/components/Label/_Label.scss +13 -4
  41. package/scss/components/Link/_Link-variables.scss +1 -1
  42. package/scss/components/Link/_Link.scss +12 -3
  43. package/scss/components/Mark/_Mark.scss +2 -1
  44. package/scss/components/Spinner/_Spinner-variables.scss +1 -1
  45. package/scss/components/Spinner/_Spinner.scss +0 -7
  46. package/scss/components/Stack/_Stack.scss +22 -12
  47. package/scss/components/Stepper/_Stepper-variables.scss +0 -4
  48. package/scss/components/Stepper/_Stepper.scss +1 -6
  49. package/scss/components/Tabs/_Tabs-variables.scss +0 -1
  50. package/scss/components/Tabs/_Tabs.scss +4 -3
  51. package/scss/components/Tag/_Tag-variables.scss +1 -0
  52. package/scss/components/Tag/_Tag.scss +4 -3
  53. package/scss/components/Text/_Text-variables.scss +4 -0
  54. package/scss/components/Text/_Text.scss +19 -0
  55. package/scss/index.scss +5 -0
  56. package/scss/scss/helpers/_margin-utils.scss +35 -0
  57. package/scss/scss/helpers/_padding-utils.scss +35 -0
  58. package/scss/scss/helpers/_print-utils.scss +1 -1
  59. package/scss/scss/helpers/_sizing-utils.scss +45 -0
  60. package/scss/scss/helpers/_text-utils.scss +43 -0
  61. package/scss/scss/placeholders/checkable-group/_checkable-group.scss +2 -2
  62. package/scss/scss/placeholders/control/_control.scss +1 -9
  63. package/scss/scss/placeholders/menu/_menu.scss +2 -1
  64. package/scss/scss/placeholders/popover/_popover.scss +2 -2
  65. package/scss/scss/utils/_responsive-values.scss +7 -8
  66. package/types/components/Actions/Action.d.ts +1 -1
  67. package/types/components/Actions/Actions.d.ts +1 -1
  68. package/types/components/Alert/Alert.d.ts +3 -2
  69. package/types/components/Box/Box.d.ts +37 -0
  70. package/types/components/Box/index.d.ts +1 -0
  71. package/types/components/Button/Button.d.ts +3 -2
  72. package/types/components/ButtonGroup/ButtonGroup.d.ts +3 -2
  73. package/types/components/Calendar/Calendar.d.ts +3 -2
  74. package/types/components/Calendar/CalendarContext.d.ts +1 -0
  75. package/types/components/Card/Card.d.ts +3 -2
  76. package/types/components/Card/CardTitle.d.ts +3 -2
  77. package/types/components/Checkbox/Checkbox.d.ts +2 -1
  78. package/types/components/CheckboxGroup/CheckboxGroup.d.ts +3 -2
  79. package/types/components/Code/Code.d.ts +4 -2
  80. package/types/components/Container/Container.d.ts +3 -2
  81. package/types/components/Control/Control.d.ts +13 -13
  82. package/types/components/ControlCode/ControlCode.d.ts +3 -2
  83. package/types/components/DataTable/DataTableBody.d.ts +2 -3
  84. package/types/components/DataTable/DataTablePagination.d.ts +3 -2
  85. package/types/components/DataTable/DataTableRowsPerPage.d.ts +3 -2
  86. package/types/components/DataTable/ScrolledDataTableRows.d.ts +2 -2
  87. package/types/components/DataTable/useVirtualizerSnapshot.d.ts +13 -0
  88. package/types/components/DateRangeInput/DateRangeInput.d.ts +5 -6
  89. package/types/components/DropdownMenu/DropdownMenuContent.d.ts +3 -2
  90. package/types/components/Feedback/Feedback.d.ts +6 -4
  91. package/types/components/Feedback/FeedbackList.d.ts +3 -2
  92. package/types/components/Field/Field.d.ts +5 -10
  93. package/types/components/FieldGroup/FieldGroup.d.ts +3 -2
  94. package/types/components/FieldGroup/FieldGroupTitle.d.ts +3 -2
  95. package/types/components/Form/Form.d.ts +3 -8
  96. package/types/components/Grid/Grid.d.ts +11 -4
  97. package/types/components/Grid/GridContext.d.ts +1 -1
  98. package/types/components/Heading/Heading.d.ts +12 -3
  99. package/types/components/HelperText/HelperText.d.ts +4 -2
  100. package/types/components/Icon/Icon.d.ts +9 -4
  101. package/types/components/IconButton/IconButton.d.ts +3 -2
  102. package/types/components/Keybinds/Keybinds.d.ts +3 -2
  103. package/types/components/Keyboard/Keyboard.d.ts +17 -4
  104. package/types/components/Label/Label.d.ts +11 -2
  105. package/types/components/Link/Link.d.ts +4 -2
  106. package/types/components/Mark/Mark.d.ts +7 -5
  107. package/types/components/MenuList/MenuList.d.ts +3 -2
  108. package/types/components/Popover/Popover.d.ts +1 -1
  109. package/types/components/Popover/PopoverContent.d.ts +4 -2
  110. package/types/components/Printer/PrinterContent.d.ts +3 -9
  111. package/types/components/RadioGroup/Radio.d.ts +2 -1
  112. package/types/components/RadioGroup/RadioGroup.d.ts +3 -2
  113. package/types/components/Root/Root.d.ts +3 -8
  114. package/types/components/Root/RootElement.d.ts +2 -2
  115. package/types/components/Separator/Separator.d.ts +2 -1
  116. package/types/components/Slot/Slot.d.ts +1 -1
  117. package/types/components/Spinner/Spinner.d.ts +7 -4
  118. package/types/components/Stack/Stack.d.ts +10 -11
  119. package/types/components/Stack/StackContext.d.ts +1 -1
  120. package/types/components/Stepper/StepContent.d.ts +3 -8
  121. package/types/components/Stepper/StepList.d.ts +3 -2
  122. package/types/components/Stepper/Stepper.d.ts +9 -13
  123. package/types/components/Table/Table.d.ts +2 -1
  124. package/types/components/Tabs/TabContent.d.ts +3 -2
  125. package/types/components/Tabs/TabList.d.ts +2 -1
  126. package/types/components/Tabs/Tabs.d.ts +6 -4
  127. package/types/components/Tag/Tag.d.ts +4 -2
  128. package/types/components/Text/Text.d.ts +48 -0
  129. package/types/components/Text/index.d.ts +1 -0
  130. package/types/index.d.ts +10 -3
  131. package/types/utils/localeUtils.d.ts +8 -0
  132. package/types/utils/responsiveValues.d.ts +41 -0
  133. package/types/utils/useMarginProps.d.ts +46 -0
  134. package/types/utils/usePaddingProps.d.ts +46 -0
  135. package/types/utils/useSizingProps.d.ts +23 -0
  136. package/types/utils/useTextProps.d.ts +50 -0
  137. package/dist/chunks/en-DGLb7rrz.js.map +0 -1
  138. package/types/utils/changeCase.d.ts +0 -2
  139. package/types/utils/useResponsiveValues.d.ts +0 -41
@@ -1,6 +1,7 @@
1
1
  import { type ComponentProps, type ReactNode } from "react";
2
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
2
3
  /** Properties of the button group component. */
3
- export interface ButtonGroupProps extends ComponentProps<"div"> {
4
+ export interface ButtonGroupProps extends UseMarginPropsOptions, ComponentProps<"div"> {
4
5
  /**
5
6
  * Change the component to the HTML tag or custom component of the only child. This will merge the
6
7
  * original component props with the props of the supplied element/component and change the
@@ -31,4 +32,4 @@ export interface ButtonGroupProps extends ComponentProps<"div"> {
31
32
  * }
32
33
  * ```
33
34
  */
34
- export declare function ButtonGroup({ asChild, label, className, children, ...otherProps }: ButtonGroupProps): import("react").JSX.Element;
35
+ export declare function ButtonGroup({ asChild, label, className, style, children, ...otherProps }: ButtonGroupProps): import("react").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { type DayPickerProps } from "@daypicker/react";
2
2
  import { type ComponentProps, type RefObject } from "react";
3
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
3
4
  import type { IconButtonProps } from "../IconButton";
4
5
  import type { SelectSingleProps } from "../Select";
5
6
  /** Mode for selecting calendar dates. */
@@ -33,7 +34,7 @@ export interface CalendarApi<TValue extends Date | Date[] | DateRange | null = D
33
34
  /** Properties of the calendar component. */
34
35
  export type CalendarProps = CalendarNoneSelectionProps | CalendarSingleSelectionProps | CalendarMultipleSelectionProps | CalendarRangeSelectionProps;
35
36
  /** Base properties of the calendar component. */
36
- export interface CalendarPropsBase<TValue extends Date | Date[] | DateRange | null = Date | Date[] | DateRange | null> extends Pick<DayPickerProps, "required" | "className" | "style" | "id" | "numberOfMonths" | "pagedNavigation" | "disableNavigation" | "fixedWeeks" | "hideWeekdays" | "showOutsideDays" | "showWeekNumber" | "broadcastCalendar" | "ISOWeek" | "timeZone" | "noonSafe" | "footer" | "autoFocus" | "disabled" | "hidden" | "today" | "modifiers" | "aria-label" | "aria-labelledby" | "numerals" | "weekStartsOn" | "firstWeekContainsDate" | "useAdditionalWeekYearTokens" | "useAdditionalDayOfYearTokens" | "onMonthChange" | "onNextClick" | "onPrevClick" | "onDayClick" | "onDayFocus" | "onDayBlur" | "onDayKeyDown" | "onDayMouseEnter" | "onDayMouseLeave"> {
37
+ export interface CalendarPropsBase<TValue extends Date | Date[] | DateRange | null = Date | Date[] | DateRange | null> extends UseMarginPropsOptions, Pick<DayPickerProps, "required" | "className" | "style" | "id" | "numberOfMonths" | "pagedNavigation" | "disableNavigation" | "fixedWeeks" | "hideWeekdays" | "showOutsideDays" | "showWeekNumber" | "broadcastCalendar" | "ISOWeek" | "timeZone" | "noonSafe" | "footer" | "autoFocus" | "disabled" | "hidden" | "today" | "modifiers" | "aria-label" | "aria-labelledby" | "numerals" | "weekStartsOn" | "firstWeekContainsDate" | "useAdditionalWeekYearTokens" | "useAdditionalDayOfYearTokens" | "onMonthChange" | "onNextClick" | "onPrevClick" | "onDayClick" | "onDayFocus" | "onDayBlur" | "onDayKeyDown" | "onDayMouseEnter" | "onDayMouseLeave"> {
37
38
  /**
38
39
  * Mode for selecting calendar dates.
39
40
  *
@@ -114,4 +115,4 @@ export interface CalendarRangeSelectionProps extends CalendarPropsBase<DateRange
114
115
  * }
115
116
  * ```
116
117
  */
117
- export declare function Calendar({ selectionMode, defaultValue, value: controlledValue, onValueChange, required, minDate, maxDate, minMonth, maxMonth, minYear, maxYear, monthSelectLabel: monthSelectLabelProp, yearSelectLabel: yearSelectLabelProp, previousMonthLabel: previousMonthLabelProp, nextMonthLabel: nextMonthLabelProp, defaultMonth, month: controlledMonth, onMonthChange, onDayClick, onDayFocus, onDayMouseEnter, numberOfMonths, fixedWeeks, showOutsideDays, disableNavigation, disabled, modifiers, apiRef, headerProps, headerLabelProps, previousButtonProps, nextButtonProps, monthSelectProps, yearSelectProps, pagedNavigation, ...otherProps }: CalendarProps): import("react").JSX.Element;
118
+ export declare function Calendar({ selectionMode, defaultValue, value: controlledValue, onValueChange, required, minDate, maxDate, minMonth, maxMonth, minYear, maxYear, monthSelectLabel: monthSelectLabelProp, yearSelectLabel: yearSelectLabelProp, previousMonthLabel: previousMonthLabelProp, nextMonthLabel: nextMonthLabelProp, defaultMonth, month: controlledMonth, onMonthChange, onDayClick, onDayFocus, onDayMouseEnter, numberOfMonths, fixedWeeks, showOutsideDays, disableNavigation, disabled, modifiers, today, apiRef, headerProps, headerLabelProps, previousButtonProps, nextButtonProps, monthSelectProps, yearSelectProps, pagedNavigation, style, ...otherProps }: CalendarProps): import("react").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import type { CalendarProps } from "./Calendar.tsx";
2
2
  /** Value of the calendar context. */
3
3
  export interface CalendarContextValue {
4
+ curDate: Date;
4
5
  minAllowedDate: Date | undefined;
5
6
  maxAllowedDate: Date | undefined;
6
7
  monthSelectLabel: CalendarProps["monthSelectLabel"];
@@ -1,11 +1,12 @@
1
1
  import type { ComponentProps } from "react";
2
2
  import type { AccentColor } from "../../utils/accent.ts";
3
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
3
4
  /** Card variants. */
4
5
  export type CardVariant = "solid" | "subtle" | "outlined" | "ghost";
5
6
  /** Possible card colours. */
6
7
  export type CardColor = AccentColor;
7
8
  /** Properties of the card component. */
8
- export interface CardProps extends ComponentProps<"div"> {
9
+ export interface CardProps extends UseMarginPropsOptions, ComponentProps<"div"> {
9
10
  /**
10
11
  * Change the component to the HTML tag or custom component of the only child. This will merge the
11
12
  * original component props with the props of the supplied element/component and change the
@@ -60,4 +61,4 @@ export interface CardProps extends ComponentProps<"div"> {
60
61
  * }
61
62
  * ```
62
63
  */
63
- export declare function Card({ asChild, variant, color, mergeSections, className, ...otherProps }: CardProps): import("react").JSX.Element;
64
+ export declare function Card({ asChild, variant, color, mergeSections, className, style, ...otherProps }: CardProps): import("react").JSX.Element;
@@ -1,10 +1,11 @@
1
1
  import type { PolymorphicProps } from "../../utils/polymorphicTypes.ts";
2
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
2
3
  /** Elements a card title can be rendered as. */
3
4
  export type CardTitleAs = "div" | "span" | "h2" | "h3" | "h4" | "h5" | "h6";
4
5
  /** Properties of the card title component. */
5
6
  export type CardTitleProps<TAs extends CardTitleAs = "div"> = PolymorphicProps<CardTitleAs, TAs, "div", CardTitleOwnProps>;
6
7
  /** Own properties of the card title component. */
7
- export interface CardTitleOwnProps {
8
+ export interface CardTitleOwnProps extends UseMarginPropsOptions {
8
9
  /**
9
10
  * Change the component to the HTML tag or custom component of the only child. This will merge the
10
11
  * original component props with the props of the supplied element/component and change the
@@ -13,4 +14,4 @@ export interface CardTitleOwnProps {
13
14
  asChild?: boolean;
14
15
  }
15
16
  /** Title of the `Card` component. */
16
- export declare function CardTitle<TAs extends CardTitleAs = "div">({ as, asChild, className, ...otherProps }: CardTitleProps<TAs>): import("react").JSX.Element;
17
+ export declare function CardTitle<TAs extends CardTitleAs = "div">({ as, asChild, className, style, ...otherProps }: CardTitleProps<TAs>): import("react").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { Checkbox as CheckboxPrimitive } from "radix-ui";
2
2
  import { type ComponentProps, type FocusEvent, type ReactNode } from "react";
3
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
3
4
  import { type ControlStatus, type ControlVariant } from "../Control";
4
5
  import { type ControlCodeProps } from "../ControlCode";
5
6
  import type { FormValidationMode } from "../Form";
@@ -10,7 +11,7 @@ import { type SpinnerProps } from "../Spinner";
10
11
  /** `checked` state of a checkbox. */
11
12
  export type CheckboxChecked = CheckboxPrimitive.CheckedState;
12
13
  /** Properties of the checkbox component. */
13
- export interface CheckboxProps extends Omit<ComponentProps<typeof CheckboxPrimitive.Root>, "asChild"> {
14
+ export interface CheckboxProps extends UseMarginPropsOptions, Omit<ComponentProps<typeof CheckboxPrimitive.Root>, "asChild"> {
14
15
  /**
15
16
  * Checkbox style variant. Defaults to the default variant unless when rendering inside a table
16
17
  * cell (in which case it defaults to `"cell"`).
@@ -1,11 +1,12 @@
1
1
  import { type ComponentProps, type FocusEvent, type ReactNode } from "react";
2
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
2
3
  import { type ControlStatus, type ControlVariant } from "../Control";
3
4
  import { type ControlCodeProps } from "../ControlCode";
4
5
  import type { FormValidationMode } from "../Form";
5
6
  import { type FormControlValidateFn } from "../Form/useRegisterFormControl.ts";
6
7
  import { type SpinnerProps } from "../Spinner";
7
8
  /** Properties of the checkbox group component. */
8
- export interface CheckboxGroupProps extends ComponentProps<"div"> {
9
+ export interface CheckboxGroupProps extends UseMarginPropsOptions, ComponentProps<"div"> {
9
10
  /**
10
11
  * Whether to display the checkbox group inline. Defaults to `false` unless when rending inside a
11
12
  * table cell.
@@ -117,4 +118,4 @@ export interface CheckboxGroupProps extends ComponentProps<"div"> {
117
118
  * }
118
119
  * ```
119
120
  */
120
- export declare function CheckboxGroup({ inline: inlineProp, variant: variantProp, status: statusProp, code, name, loading, loadingDescription: loadingDescriptionProp, showSpinner, required, minChecked: minCheckedProp, maxChecked, disabled: disabledProp, readOnly, defaultValue, value, onValueChange, onBlurToOutside, validate, validationMode, codeProps, containerProps, startContainerProps, endContainerProps, spinnerProps, id, className, startAdornment, endAdornment, onMouseDown, onFocus, tabIndex: controlledTabIndex, children, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ref, ...otherProps }: CheckboxGroupProps): import("react").JSX.Element;
121
+ export declare function CheckboxGroup({ inline: inlineProp, variant: variantProp, status: statusProp, code, name, loading, loadingDescription: loadingDescriptionProp, showSpinner, required, minChecked: minCheckedProp, maxChecked, disabled: disabledProp, readOnly, defaultValue, value, onValueChange, onBlurToOutside, validate, validationMode, codeProps, containerProps, startContainerProps, endContainerProps, spinnerProps, id, className, startAdornment, endAdornment, onMouseDown, onFocus, tabIndex: controlledTabIndex, style, children, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ref, ...otherProps }: CheckboxGroupProps): import("react").JSX.Element;
@@ -1,9 +1,11 @@
1
1
  import type { ComponentProps } from "react";
2
2
  import type { AccentColor } from "../../utils/accent.ts";
3
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
4
+ import { type UseTextPropsOptions } from "../../utils/useTextProps.ts";
3
5
  /** Code colours. */
4
6
  export type CodeColor = AccentColor;
5
7
  /** Properties of the code component. */
6
- export interface CodeProps extends ComponentProps<"code"> {
8
+ export interface CodeProps extends UseMarginPropsOptions, UseTextPropsOptions, ComponentProps<"code"> {
7
9
  /**
8
10
  * Change the component to the HTML tag or custom component of the only child. This will merge the
9
11
  * original component props with the props of the supplied element/component and change the
@@ -31,4 +33,4 @@ export interface CodeProps extends ComponentProps<"code"> {
31
33
  * }
32
34
  * ```
33
35
  */
34
- export declare function Code({ asChild, color, className, ...otherProps }: CodeProps): import("react").JSX.Element;
36
+ export declare function Code({ asChild, color, className, style, ...otherProps }: CodeProps): import("react").JSX.Element;
@@ -1,10 +1,11 @@
1
1
  import type { ComponentProps } from "react";
2
2
  import { type Breakpoint } from "../../utils/breakpoints.ts";
3
- import { type Responsive } from "../../utils/useResponsiveValues.ts";
3
+ import { type Responsive } from "../../utils/responsiveValues.ts";
4
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
4
5
  /** Breakpoints accepted by the container. */
5
6
  export type ContainerSize = Exclude<Breakpoint, "xs">;
6
7
  /** Properties of the container component. */
7
- export interface ContainerProps extends ComponentProps<"div"> {
8
+ export interface ContainerProps extends UseMarginPropsOptions, ComponentProps<"div"> {
8
9
  /**
9
10
  * Change the component to the HTML tag or custom component of the only child. This will merge the
10
11
  * original component props with the props of the supplied element/component and change the
@@ -1,5 +1,6 @@
1
- import { type ComponentProps, type CSSProperties, type ElementType, type FocusEvent, type ReactNode } from "react";
2
- import { type Responsive } from "../../utils/useResponsiveValues.ts";
1
+ import { type ComponentProps, type ElementType, type FocusEvent, type ReactNode } from "react";
2
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
3
+ import { type UseTextPropsOptions } from "../../utils/useTextProps.ts";
3
4
  import { type CloseButtonProps } from "../CloseButton";
4
5
  import { type ControlCodeProps } from "../ControlCode";
5
6
  import { type SpinnerProps } from "../Spinner";
@@ -16,10 +17,10 @@ export type ControlVariant = "default" | "cell";
16
17
  /** Accepted values for "show clear button". */
17
18
  export type ControlShowClearButton = boolean | "auto";
18
19
  /** Base properties of the control component. */
19
- type ControlPropsBase<TElem extends ElementType, TValue, TAcceptedValue = TValue> = Omit<ComponentProps<TElem>, "children" | "type" | "multiple" | "defaultValue" | "value"> & {
20
+ type ControlPropsBase<TElem extends ElementType, TValue, TAcceptedValue = TValue> = Omit<ComponentProps<TElem>, "children" | "type" | "multiple" | "defaultValue" | "value"> & UseMarginPropsOptions & Pick<UseTextPropsOptions, "align"> & {
20
21
  /**
21
- * Change the component to the HTML tag or custom component of the only child. This will merge the
22
- * original component props with the props of the supplied element/component and change the
22
+ * Change the component to the HTML tag or custom component of the only child. This will merge
23
+ * the original component props with the props of the supplied element/component and change the
23
24
  * underlying DOM node.
24
25
  */
25
26
  asChild?: boolean;
@@ -52,11 +53,12 @@ type ControlPropsBase<TElem extends ElementType, TValue, TAcceptedValue = TValue
52
53
  /**
53
54
  * Renders the control in a **loading** state.
54
55
  *
55
- * When `true`, the control is “soft-disabled”: it looks disabled and ignores user interaction but
56
- * remains focusable. By default, a spinner is shown (i.e. `showSpinner` is set to `true` unless
57
- * overridden).
56
+ * When `true`, the control is “soft-disabled”: it looks disabled and ignores user interaction
57
+ * but remains focusable. By default, a spinner is shown (i.e. `showSpinner` is set to `true`
58
+ * unless overridden).
58
59
  *
59
- * The control's accessible description while loading can be controlled via `loadingDescription`.
60
+ * The control's accessible description while loading can be controlled via
61
+ * `loadingDescription`.
60
62
  *
61
63
  * To only show a spinner without “soft-disabling” the control, set `showSpinner` instead.
62
64
  *
@@ -77,8 +79,6 @@ type ControlPropsBase<TElem extends ElementType, TValue, TAcceptedValue = TValue
77
79
  * @default loading
78
80
  */
79
81
  showSpinner?: boolean;
80
- /** Sets the control's text align. */
81
- align?: Responsive<CSSProperties["textAlign"]>;
82
82
  /** Control's start adornment. */
83
83
  startAdornment?: ReactNode;
84
84
  /** Control's end adornment. */
@@ -93,8 +93,8 @@ type ControlPropsBase<TElem extends ElementType, TValue, TAcceptedValue = TValue
93
93
  /**
94
94
  * Accessible description for how to clear the control when the clear button is visible.
95
95
  *
96
- * This field should be provided when adding extra keybinds to clear the control (e.g. the control
97
- * is a file input and pressing Backspace/Delete clears it).
96
+ * This field should be provided when adding extra keybinds to clear the control (e.g. the
97
+ * control is a file input and pressing Backspace/Delete clears it).
98
98
  */
99
99
  clearDescription?: ReactNode;
100
100
  /**
@@ -1,7 +1,8 @@
1
1
  import type { ComponentProps, ReactNode } from "react";
2
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
2
3
  import { type ControlStatus, type ControlVariant } from "../Control";
3
4
  /** Properties of the control's code component. */
4
- export interface ControlCodeProps extends ComponentProps<"div"> {
5
+ export interface ControlCodeProps extends UseMarginPropsOptions, ComponentProps<"div"> {
5
6
  /**
6
7
  * Change the component to the HTML tag or custom component of the only child. This will merge the
7
8
  * original component props with the props of the supplied element/component and change the
@@ -16,4 +17,4 @@ export interface ControlCodeProps extends ComponentProps<"div"> {
16
17
  visuallyHiddenPrefix?: ReactNode;
17
18
  }
18
19
  /** Component used to display the "code" of a form control. */
19
- export declare function ControlCode({ asChild, variant, status, visuallyHiddenPrefix: visuallyHiddenPrefixProp, className, children, ...otherProps }: ControlCodeProps): import("react").JSX.Element;
20
+ export declare function ControlCode({ asChild, variant, status, visuallyHiddenPrefix: visuallyHiddenPrefixProp, className, style, children, ...otherProps }: ControlCodeProps): import("react").JSX.Element;
@@ -1,9 +1,8 @@
1
- import type { RefObject } from "react";
2
1
  import { type TableBodyProps } from "../Table";
3
2
  import type { DataTableContentProps } from "./DataTableContent.tsx";
4
3
  /** Properties of the data table foot component. */
5
4
  export interface DataTableBodyProps extends TableBodyProps, Pick<DataTableContentProps, "emptyMessage" | "emptyMessageProps"> {
6
- scrollableRef: RefObject<HTMLDivElement | null>;
5
+ scrollableEl: HTMLDivElement | null;
7
6
  }
8
7
  /** Body of the data table. */
9
- export declare function DataTableBody({ emptyMessage, emptyMessageProps, scrollableRef, ...otherProps }: DataTableBodyProps): import("react").JSX.Element;
8
+ export declare function DataTableBody({ emptyMessage, emptyMessageProps, scrollableEl, ...otherProps }: DataTableBodyProps): import("react").JSX.Element;
@@ -1,7 +1,8 @@
1
1
  import type { ComponentProps, ReactNode } from "react";
2
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
2
3
  import type { IconButtonProps } from "../IconButton";
3
4
  /** Properties of the data table pagination component. */
4
- export interface DataTablePaginationProps extends ComponentProps<"div"> {
5
+ export interface DataTablePaginationProps extends UseMarginPropsOptions, ComponentProps<"div"> {
5
6
  /**
6
7
  * Function used to render the range of displayed rows.
7
8
  *
@@ -28,4 +29,4 @@ export interface DataTablePaginationProps extends ComponentProps<"div"> {
28
29
  nextPageButtonProps?: IconButtonProps;
29
30
  }
30
31
  /** Component used to provide pagination to the data table. */
31
- export declare function DataTablePagination({ rowsRange: rowsRangeProp, rowsRangeSelectLabel: rowsRangeSelectLabelProp, previousPageButtonLabel: previousPageButtonLabelProp, nextPageButtonLabel: nextPageButtonLabelProp, previousPageButtonProps, nextPageButtonProps, preferRightAlignment, ...otherProps }: DataTablePaginationProps): import("react").JSX.Element | null;
32
+ export declare function DataTablePagination({ rowsRange: rowsRangeProp, rowsRangeSelectLabel: rowsRangeSelectLabelProp, previousPageButtonLabel: previousPageButtonLabelProp, nextPageButtonLabel: nextPageButtonLabelProp, previousPageButtonProps, nextPageButtonProps, preferRightAlignment, style, ...otherProps }: DataTablePaginationProps): import("react").JSX.Element | null;
@@ -1,6 +1,7 @@
1
1
  import { type ComponentProps, type ReactNode } from "react";
2
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
2
3
  /** Properties of the data table rows per page component. */
3
- export interface DataTableRowsPerPageProps extends ComponentProps<"div"> {
4
+ export interface DataTableRowsPerPageProps extends UseMarginPropsOptions, ComponentProps<"div"> {
4
5
  /**
5
6
  * Options used to set the data table's `limit` (the maximum number of rows shown per page).
6
7
  *
@@ -22,4 +23,4 @@ export interface DataTableRowsPerPageProps extends ComponentProps<"div"> {
22
23
  preferRightAlignment?: boolean;
23
24
  }
24
25
  /** Component displaying a select used to change the number of rows per page. */
25
- export declare function DataTableRowsPerPage({ limitOptions, label: labelProp, preferRightAlignment, className, ...otherProps }: DataTableRowsPerPageProps): import("react").JSX.Element;
26
+ export declare function DataTableRowsPerPage({ limitOptions, label: labelProp, preferRightAlignment, className, style, ...otherProps }: DataTableRowsPerPageProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import type { DataTableBodyProps } from "./DataTableBody.tsx";
2
2
  /** Properties of the scrolled data table body component. */
3
- interface ScrolledDataTableRowsProps extends Pick<DataTableBodyProps, "scrollableRef"> {
3
+ interface ScrolledDataTableRowsProps extends Pick<DataTableBodyProps, "scrollableEl"> {
4
4
  }
5
5
  /** Body of the data table in "scrolled" display mode. */
6
- export declare function ScrolledDataTableRows({ scrollableRef }: ScrolledDataTableRowsProps): import("react").JSX.Element;
6
+ export declare function ScrolledDataTableRows({ scrollableEl }: ScrolledDataTableRowsProps): import("react").JSX.Element;
7
7
  export {};
@@ -0,0 +1,13 @@
1
+ import { useVirtualizer } from "@tanstack/react-virtual";
2
+ /**
3
+ * Wraps `useVirtualizer`, exposing render-relevant state as immutable values so that consumers can
4
+ * be safely optimized by React Compiler. The `virtualizer` instance itself must only be used
5
+ * imperatively (effects, callbacks, refs).
6
+ */
7
+ export declare function useVirtualizerSnapshot<TScroll extends Element, TItem extends Element>(options: Parameters<typeof useVirtualizer<TScroll, TItem>>[0]): {
8
+ virtualizer: import("@tanstack/react-virtual").ReactVirtualizer<TScroll, TItem>;
9
+ virtualItems: import("@tanstack/virtual-core").VirtualItem[];
10
+ totalSize: number;
11
+ startIndex: number;
12
+ endIndex: number;
13
+ };
@@ -1,5 +1,6 @@
1
- import { type ComponentProps, type CSSProperties, type FocusEvent, type ReactNode } from "react";
2
- import { type Responsive } from "../../utils/useResponsiveValues.ts";
1
+ import { type ComponentProps, type FocusEvent, type ReactNode } from "react";
2
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
3
+ import { type UseTextPropsOptions } from "../../utils/useTextProps.ts";
3
4
  import { type CalendarProps, type DateRange } from "../Calendar";
4
5
  import { type CloseButtonProps } from "../CloseButton";
5
6
  import { type ControlShowClearButton, type ControlStatus, type ControlVariant } from "../Control";
@@ -26,7 +27,7 @@ export interface StringRange {
26
27
  end: string | null;
27
28
  }
28
29
  /** Properties of the date-range input component. */
29
- export interface DateRangeInputProps extends Omit<ComponentProps<"div">, "defaultValue"> {
30
+ export interface DateRangeInputProps extends UseMarginPropsOptions, Pick<UseTextPropsOptions, "align">, Omit<ComponentProps<"div">, "defaultValue"> {
30
31
  /** Name of the control. Both inputs will share the same name. */
31
32
  name?: string;
32
33
  /**
@@ -114,8 +115,6 @@ export interface DateRangeInputProps extends Omit<ComponentProps<"div">, "defaul
114
115
  * @default showSpinners
115
116
  */
116
117
  showEndSpinner?: boolean;
117
- /** Sets the inputs' text align. */
118
- align?: Responsive<CSSProperties["textAlign"]>;
119
118
  /** Date-range input's start adornment. */
120
119
  startAdornment?: ReactNode;
121
120
  /** Date-range input's start-middle adornment. */
@@ -238,4 +237,4 @@ export interface DateRangeValueRepresentations {
238
237
  * }
239
238
  * ```
240
239
  */
241
- export declare function DateRangeInput({ name, variant: variantProp, status: statusProp, code, value: controlledValue, defaultValue, onValueChange, required, disabled: disabledProp, readOnly, minDate, maxDate, minMonth, maxMonth, minYear, maxYear, loading, loadingDescription: loadingDescriptionProp, showSpinners, showStartSpinner, showEndSpinner, align, startAdornment, startMiddleAdornment, endMiddleAdornment, endAdornment, showClearButtons, clearButtonsLabel: clearButtonsLabelProp, format, announcedFormat: announcedFormatProp, formatDescription: formatDescriptionProp, startInputLabel: startInputLabelProp, endInputLabel: endInputLabelProp, selectedDateDescription: selectedDateDescriptionProp, selectedDateRangeDescription: selectedDateRangeDescriptionProp, calendarButtonLabel: calendarButtonLabelProp, placeholder: placeholderProp, startPlaceholder, endPlaceholder, className, onPopoverOpenChange, onBlurToOutside, form, validate, validationMode, codeProps, popoverAnchorProps, startContainerProps, endContainerProps, startInputProps, endInputProps, startClearButtonProps, endClearButtonProps, spinnerProps, calendarButtonTooltipProps, calendarButtonProps, calendarButtonIconProps, calendarProps, popoverContentProps, "aria-disabled": ariaDisabled, ...otherProps }: DateRangeInputProps): import("react").JSX.Element;
240
+ export declare function DateRangeInput({ name, variant: variantProp, status: statusProp, code, value: controlledValue, defaultValue, onValueChange, required, disabled: disabledProp, readOnly, minDate, maxDate, minMonth, maxMonth, minYear, maxYear, loading, loadingDescription: loadingDescriptionProp, showSpinners, showStartSpinner, showEndSpinner, align, startAdornment, startMiddleAdornment, endMiddleAdornment, endAdornment, showClearButtons, clearButtonsLabel: clearButtonsLabelProp, format, announcedFormat: announcedFormatProp, formatDescription: formatDescriptionProp, startInputLabel: startInputLabelProp, endInputLabel: endInputLabelProp, selectedDateDescription: selectedDateDescriptionProp, selectedDateRangeDescription: selectedDateRangeDescriptionProp, calendarButtonLabel: calendarButtonLabelProp, placeholder: placeholderProp, startPlaceholder, endPlaceholder, className, onPopoverOpenChange, onBlurToOutside, form, validate, validationMode, codeProps, popoverAnchorProps, startContainerProps, endContainerProps, startInputProps, endInputProps, startClearButtonProps, endClearButtonProps, spinnerProps, calendarButtonTooltipProps, calendarButtonProps, calendarButtonIconProps, calendarProps, popoverContentProps, "aria-disabled": ariaDisabled, style, ...otherProps }: DateRangeInputProps): import("react").JSX.Element;
@@ -1,8 +1,9 @@
1
1
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2
2
  import type { ComponentProps } from "react";
3
+ import { type UseSizingPropsOptions } from "../../utils/useSizingProps.ts";
3
4
  import { type MenuListProps } from "../MenuList";
4
5
  /** Properties of the dropdown menu content component. */
5
- export interface DropdownMenuContentProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.Content>, "asChild">, Pick<MenuListProps, "variant" | "iconPlacement"> {
6
+ export interface DropdownMenuContentProps extends UseSizingPropsOptions, Omit<ComponentProps<typeof DropdownMenuPrimitive.Content>, "asChild">, Pick<MenuListProps, "variant" | "iconPlacement"> {
6
7
  /**
7
8
  * Whether to show an arrow pointing to the anchor.
8
9
  *
@@ -17,4 +18,4 @@ export interface DropdownMenuContentProps extends Omit<ComponentProps<typeof Dro
17
18
  menuListProps?: Omit<MenuListProps, "variant" | "iconPlacement" | "asChild">;
18
19
  }
19
20
  /** The component that pops out when the dropdown menu is open. */
20
- export declare function DropdownMenuContent({ variant, iconPlacement, showArrow, sideOffset, collisionPadding, forceMount, className, portalProps, arrowProps, menuListProps, children, ...otherProps }: DropdownMenuContentProps): import("react").JSX.Element;
21
+ export declare function DropdownMenuContent({ variant, iconPlacement, showArrow, sideOffset, collisionPadding, forceMount, className, style, portalProps, arrowProps, menuListProps, children, ...otherProps }: DropdownMenuContentProps): import("react").JSX.Element;
@@ -1,11 +1,13 @@
1
1
  import type { ComponentProps, ReactNode } from "react";
2
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
3
+ import { type UseTextPropsOptions } from "../../utils/useTextProps.ts";
2
4
  /** Possible types of feedback. */
3
5
  export type FeedbackType = "success" | "error" | "warning";
4
6
  /** Properties of the feedback component. */
5
- export type FeedbackProps = ComponentProps<"div" | "li"> & {
7
+ export type FeedbackProps = UseMarginPropsOptions & UseTextPropsOptions & ComponentProps<"div" | "li"> & {
6
8
  /**
7
- * Change the component to the HTML tag or custom component of the only child. This will merge the
8
- * original component props with the props of the supplied element/component and change the
9
+ * Change the component to the HTML tag or custom component of the only child. This will merge
10
+ * the original component props with the props of the supplied element/component and change the
9
11
  * underlying DOM node.
10
12
  */
11
13
  asChild?: boolean;
@@ -18,4 +20,4 @@ export type FeedbackProps = ComponentProps<"div" | "li"> & {
18
20
  visuallyHiddenPrefix?: ReactNode | ((type: FeedbackType) => ReactNode);
19
21
  };
20
22
  /** Component used to provide some feedback to a form control. */
21
- export declare function Feedback({ asChild, type: typeProp, visuallyHiddenPrefix: visuallyHiddenPrefixProp, id, className, children, ...otherProps }: FeedbackProps): import("react").JSX.Element;
23
+ export declare function Feedback({ asChild, type: typeProp, visuallyHiddenPrefix: visuallyHiddenPrefixProp, id, className, style, children, ...otherProps }: FeedbackProps): import("react").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import type { ComponentProps } from "react";
2
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
2
3
  /** Properties of the feedback list component. */
3
- export interface FeedbackListProps extends ComponentProps<"ul"> {
4
+ export interface FeedbackListProps extends UseMarginPropsOptions, ComponentProps<"ul"> {
4
5
  }
5
6
  /** Component used to provide a list of feedbacks to a form control. */
6
- export declare function FeedbackList({ className, children, ...otherProps }: FeedbackListProps): import("react").JSX.Element;
7
+ export declare function FeedbackList({ className, style, children, ...otherProps }: FeedbackListProps): import("react").JSX.Element;
@@ -1,16 +1,11 @@
1
- import { type ComponentProps } from "react";
1
+ import { type BoxProps } from "../Box";
2
2
  /** Properties of the field component. */
3
- export interface FieldProps extends ComponentProps<"div"> {
4
- /**
5
- * Change the component to the HTML tag or custom component of the only child. This will merge the
6
- * original component props with the props of the supplied element/component and change the
7
- * underlying DOM node.
8
- */
9
- asChild?: boolean;
3
+ export interface FieldProps extends Omit<BoxProps, "as"> {
10
4
  }
11
5
  /**
12
6
  * The `Field` component acts as a container that associates a form control with a label, helper
13
- * text, and/or validation feedback.
7
+ * text, and/or validation feedback. Built on top of the [`Box`
8
+ * component](/docs/ostack-ui-layout-box--docs).
14
9
  *
15
10
  * Use a `Label` to identify the control, a `HelperText` to provide additional guidance or
16
11
  * descriptions, and `Feedback` to display error, warning, or success messages.
@@ -33,4 +28,4 @@ export interface FieldProps extends ComponentProps<"div"> {
33
28
  * }
34
29
  * ```
35
30
  */
36
- export declare function Field({ asChild, className, ref, ...otherProps }: FieldProps): import("react").JSX.Element;
31
+ export declare function Field({ className, ref, ...otherProps }: FieldProps): import("react").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { type ComponentProps } from "react";
2
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
2
3
  /** Properties of the field group component. */
3
- export interface FieldGroupProps extends ComponentProps<"div"> {
4
+ export interface FieldGroupProps extends UseMarginPropsOptions, ComponentProps<"div"> {
4
5
  /**
5
6
  * Change the component to the HTML tag or custom component of the only child. This will merge the
6
7
  * original component props with the props of the supplied element/component and change the
@@ -54,4 +55,4 @@ export interface FieldGroupProps extends ComponentProps<"div"> {
54
55
  * }
55
56
  * ```
56
57
  */
57
- export declare function FieldGroup({ asChild, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...otherProps }: FieldGroupProps): import("react").JSX.Element;
58
+ export declare function FieldGroup({ asChild, className, style, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...otherProps }: FieldGroupProps): import("react").JSX.Element;
@@ -1,10 +1,11 @@
1
1
  import type { PolymorphicProps } from "../../utils/polymorphicTypes.ts";
2
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
2
3
  /** Element a field group title can be rendered as. */
3
4
  export type FieldGroupTitleAs = "div" | "span" | "label" | "h2" | "h3" | "h4" | "h5" | "h6";
4
5
  /** Properties of the field group title component. */
5
6
  export type FieldGroupTitleProps<TAs extends FieldGroupTitleAs = "div"> = PolymorphicProps<FieldGroupTitleAs, TAs, "div", FieldGroupTitleOwnProps>;
6
7
  /** Own properties of the field group title component. */
7
- export interface FieldGroupTitleOwnProps {
8
+ export interface FieldGroupTitleOwnProps extends UseMarginPropsOptions {
8
9
  /**
9
10
  * Change the component to the HTML tag or custom component of the only child. This will merge the
10
11
  * original component props with the props of the supplied element/component and change the
@@ -13,4 +14,4 @@ export interface FieldGroupTitleOwnProps {
13
14
  asChild?: boolean;
14
15
  }
15
16
  /** Component used to display the caption of a field group. */
16
- export declare function FieldGroupTitle<TAs extends FieldGroupTitleAs = "div">({ as, asChild, id, className, ...otherProps }: FieldGroupTitleProps<TAs>): import("react").JSX.Element;
17
+ export declare function FieldGroupTitle<TAs extends FieldGroupTitleAs = "div">({ as, asChild, id, className, style, ...otherProps }: FieldGroupTitleProps<TAs>): import("react").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { type ComponentProps, type ReactNode, type Ref, type SubmitEvent } from "react";
2
+ import { type BoxProps } from "../Box";
2
3
  /** Form values. */
3
4
  export type FormValues = Record<string, any>;
4
5
  /** Validation mode of the form. */
@@ -30,13 +31,7 @@ export interface FormApi<T extends FormValues = any> {
30
31
  focus: (name: keyof T | "") => void;
31
32
  }
32
33
  /** Properties of the form component. */
33
- export interface FormProps<T extends FormValues = any> extends Omit<ComponentProps<"form">, "noValidate" | "onSubmit"> {
34
- /**
35
- * Change the component to the HTML tag or custom component of the only child. This will merge the
36
- * original component props with the props of the supplied element/component and change the
37
- * underlying DOM node.
38
- */
39
- asChild?: boolean;
34
+ export interface FormProps<T extends FormValues = any> extends Omit<BoxProps, keyof ComponentProps<"form">>, Omit<ComponentProps<"form">, "noValidate" | "onSubmit"> {
40
35
  /** Function used to validate the whole form. */
41
36
  validate?: FormValidateFn<T>;
42
37
  /**
@@ -137,4 +132,4 @@ export interface FormProps<T extends FormValues = any> extends Omit<ComponentPro
137
132
  * }
138
133
  * ```
139
134
  */
140
- export declare function Form<T extends FormValues = any>({ asChild, validationMode, errorDisplayMode, validate, externalErrors, nativeErrorMessages, className, confirmUnloadWhenDirty, disableNativeValidations, onSubmit, onReset, onValueChange, submitErrorMessage: submitErrorMessageProp, apiRef, ref, ...otherProps }: FormProps<T>): import("react").JSX.Element;
135
+ export declare function Form<T extends FormValues = any>({ asChild, validationMode, errorDisplayMode, validate, externalErrors, nativeErrorMessages, className, confirmUnloadWhenDirty, disableNativeValidations, onSubmit, onReset, onValueChange, submitErrorMessage: submitErrorMessageProp, children, apiRef, ref, ...otherProps }: FormProps<T>): import("react").JSX.Element;
@@ -1,5 +1,6 @@
1
- import { type ComponentProps } from "react";
2
- import { type Responsive } from "../../utils/useResponsiveValues.ts";
1
+ import { type CSSProperties } from "react";
2
+ import { type Responsive } from "../../utils/responsiveValues.ts";
3
+ import { type BoxProps } from "../Box";
3
4
  /** Size of a column. */
4
5
  export type GridColumnSize = number | "auto" | "content";
5
6
  /** Offset of a column. */
@@ -7,7 +8,7 @@ export type GridOffsetSize = number | "auto";
7
8
  /** Properties of the grid component. */
8
9
  export type GridProps = GridContainerProps | GridItemProps;
9
10
  /** Base properties of the grid component. */
10
- export interface GridPropsBase extends ComponentProps<"div"> {
11
+ export interface GridPropsBase extends BoxProps {
11
12
  /**
12
13
  * Change the component to the HTML tag or custom component of the only child. This will merge the
13
14
  * original component props with the props of the supplied element/component and change the
@@ -53,6 +54,12 @@ export interface GridPropsBase extends ComponentProps<"div"> {
53
54
  * @default gap
54
55
  */
55
56
  columnGap?: Responsive<number | string>;
57
+ /** Sets the `align-items` CSS property. */
58
+ alignItems?: Responsive<CSSProperties["alignItems"]>;
59
+ /** Sets the `justify-content` CSS property. */
60
+ justifyContent?: Responsive<CSSProperties["justifyContent"]>;
61
+ /** Sets the `align-content` CSS property. */
62
+ alignContent?: Responsive<CSSProperties["alignContent"]>;
56
63
  /** Column size (number of columns) at the `xs` breakpoint. */
57
64
  xs?: GridColumnSize;
58
65
  /** Offset size (number of columns) at the `xs` breakpoint. */
@@ -135,4 +142,4 @@ export interface GridItemProps extends GridPropsBase {
135
142
  * }
136
143
  * ```
137
144
  */
138
- export declare function Grid({ asChild, container, columns, gap, rowGap, columnGap, xs, sm, md, lg, xl, xxl, xsOffset, smOffset, mdOffset, lgOffset, xlOffset, xxlOffset, className, style, ...otherProps }: GridProps): import("react").JSX.Element;
145
+ export declare function Grid({ container, columns, gap, rowGap, columnGap, xs, sm, md, lg, xl, xxl, xsOffset, smOffset, mdOffset, lgOffset, xlOffset, xxlOffset, alignItems, justifyContent, alignContent, className, style, ...otherProps }: GridProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { Responsive } from "../../utils/useResponsiveValues.ts";
1
+ import type { Responsive } from "../../utils/responsiveValues.ts";
2
2
  /** Grid context value. */
3
3
  export interface GridContextValue {
4
4
  container: boolean;
@@ -1,12 +1,17 @@
1
+ import type { AccentColor } from "../../utils/accent.ts";
1
2
  import type { PolymorphicProps } from "../../utils/polymorphicTypes.ts";
3
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
4
+ import { type UseTextPropsOptions } from "../../utils/useTextProps.ts";
2
5
  /** Elements a heading can be rendered as. */
3
- export type HeadingAs = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div" | "span" | "label";
6
+ export type HeadingAs = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div" | "span";
4
7
  /** Heading levels. */
5
8
  export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
9
+ /** Heading colours. */
10
+ export type HeadingColor = AccentColor;
6
11
  /** Properties of the heading component. */
7
12
  export type HeadingProps<TAs extends HeadingAs = "h2"> = PolymorphicProps<HeadingAs, TAs, "h2", HeadingOwnProps>;
8
13
  /** Own properties of the heading component. */
9
- export interface HeadingOwnProps {
14
+ export interface HeadingOwnProps extends UseMarginPropsOptions, UseTextPropsOptions {
10
15
  /**
11
16
  * Change the component to the HTML tag or custom component of the only child. This will merge the
12
17
  * original component props with the props of the supplied element/component and change the
@@ -23,6 +28,10 @@ export interface HeadingOwnProps {
23
28
  * @default 2
24
29
  */
25
30
  level?: HeadingLevel;
31
+ /** Colour of the heading. */
32
+ color?: HeadingColor;
33
+ /** Uses a higher contrast colour for the text. */
34
+ highContrast?: boolean;
26
35
  }
27
36
  /**
28
37
  * Component used to render semantic HTML headings. It is built on top of the browser's
@@ -39,4 +48,4 @@ export interface HeadingOwnProps {
39
48
  * }
40
49
  * ```
41
50
  */
42
- export declare function Heading<TAs extends HeadingAs = "h2">({ as, asChild, level, className, ...otherProps }: HeadingProps<TAs>): import("react").JSX.Element;
51
+ export declare function Heading<TAs extends HeadingAs = "h2">({ as, asChild, level, color, highContrast, className, style, ...otherProps }: HeadingProps<TAs>): import("react").JSX.Element;
@@ -1,6 +1,8 @@
1
1
  import type { ComponentProps } from "react";
2
+ import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
3
+ import { type UseTextPropsOptions } from "../../utils/useTextProps.ts";
2
4
  /** Properties of the helper text component. */
3
- export interface HelperTextProps extends ComponentProps<"div"> {
5
+ export interface HelperTextProps extends UseMarginPropsOptions, UseTextPropsOptions, ComponentProps<"div"> {
4
6
  /**
5
7
  * Change the component to the HTML tag or custom component of the only child. This will merge the
6
8
  * original component props with the props of the supplied element/component and change the
@@ -9,4 +11,4 @@ export interface HelperTextProps extends ComponentProps<"div"> {
9
11
  asChild?: boolean;
10
12
  }
11
13
  /** Component used to provide helper text to a form control. */
12
- export declare function HelperText({ asChild, id, className, ...otherProps }: HelperTextProps): import("react").JSX.Element;
14
+ export declare function HelperText({ asChild, id, className, style, ...otherProps }: HelperTextProps): import("react").JSX.Element;