@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.
- package/dist/chunks/{en-DGLb7rrz.js → en-W4OWqPrv.js} +3 -4
- package/dist/chunks/en-W4OWqPrv.js.map +1 -0
- package/dist/chunks/{platformUtils-dLFQaWJG.js → platformUtils-Dm2Fkhni.js} +2 -3
- package/dist/chunks/{platformUtils-dLFQaWJG.js.map → platformUtils-Dm2Fkhni.js.map} +1 -1
- package/dist/locales/en-GB.js +2 -3
- package/dist/locales/en-GB.js.map +1 -1
- package/dist/locales/en-US.js +2 -3
- package/dist/locales/en-US.js.map +1 -1
- package/dist/locales/fr-FR.js +2 -3
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js +2 -3
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui.css +942 -255
- package/dist/ostack-ui.js +9889 -7842
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +6 -6
- package/scss/_utils.scss +2 -1
- package/scss/components/ButtonGroup/_ButtonGroup.scss +7 -4
- package/scss/components/Calendar/_Calendar.scss +0 -1
- package/scss/components/Card/_Card.scss +16 -7
- package/scss/components/Code/_Code.scss +3 -3
- package/scss/components/Container/_Container.scss +3 -3
- package/scss/components/ControlCode/_ControlCode.scss +1 -1
- package/scss/components/DataTable/_DataTable.scss +8 -8
- package/scss/components/DescriptionList/_DescriptionList.scss +1 -1
- package/scss/components/DropdownMenu/_DropdownMenu.scss +8 -2
- package/scss/components/Feedback/_Feedback.scss +12 -9
- package/scss/components/Field/_Field.scss +3 -3
- package/scss/components/FieldGroup/_FieldGroup.scss +2 -1
- package/scss/components/Form/_Form.scss +2 -2
- package/scss/components/Grid/_Grid.scss +17 -11
- package/scss/components/Heading/_Heading-variables.scss +4 -1
- package/scss/components/Heading/_Heading.scss +22 -10
- package/scss/components/HelperText/_HelperText.scss +9 -7
- package/scss/components/Icon/_Icon-variables.scss +1 -0
- package/scss/components/Icon/_Icon.scss +2 -6
- package/scss/components/Keyboard/_Keyboard-variables.scss +4 -2
- package/scss/components/Keyboard/_Keyboard.scss +8 -4
- package/scss/components/Label/_Label-variables.scss +4 -0
- package/scss/components/Label/_Label.scss +13 -4
- package/scss/components/Link/_Link-variables.scss +1 -1
- package/scss/components/Link/_Link.scss +12 -3
- package/scss/components/Mark/_Mark.scss +2 -1
- package/scss/components/Spinner/_Spinner-variables.scss +1 -1
- package/scss/components/Spinner/_Spinner.scss +0 -7
- package/scss/components/Stack/_Stack.scss +22 -12
- package/scss/components/Stepper/_Stepper-variables.scss +0 -4
- package/scss/components/Stepper/_Stepper.scss +1 -6
- package/scss/components/Tabs/_Tabs-variables.scss +0 -1
- package/scss/components/Tabs/_Tabs.scss +4 -3
- package/scss/components/Tag/_Tag-variables.scss +1 -0
- package/scss/components/Tag/_Tag.scss +4 -3
- package/scss/components/Text/_Text-variables.scss +4 -0
- package/scss/components/Text/_Text.scss +19 -0
- package/scss/index.scss +5 -0
- package/scss/scss/helpers/_margin-utils.scss +35 -0
- package/scss/scss/helpers/_padding-utils.scss +35 -0
- package/scss/scss/helpers/_print-utils.scss +1 -1
- package/scss/scss/helpers/_sizing-utils.scss +45 -0
- package/scss/scss/helpers/_text-utils.scss +43 -0
- package/scss/scss/placeholders/checkable-group/_checkable-group.scss +2 -2
- package/scss/scss/placeholders/control/_control.scss +1 -9
- package/scss/scss/placeholders/menu/_menu.scss +2 -1
- package/scss/scss/placeholders/popover/_popover.scss +2 -2
- package/scss/scss/utils/_responsive-values.scss +7 -8
- package/types/components/Actions/Action.d.ts +1 -1
- package/types/components/Actions/Actions.d.ts +1 -1
- package/types/components/Alert/Alert.d.ts +3 -2
- package/types/components/Box/Box.d.ts +37 -0
- package/types/components/Box/index.d.ts +1 -0
- package/types/components/Button/Button.d.ts +3 -2
- package/types/components/ButtonGroup/ButtonGroup.d.ts +3 -2
- package/types/components/Calendar/Calendar.d.ts +3 -2
- package/types/components/Calendar/CalendarContext.d.ts +1 -0
- package/types/components/Card/Card.d.ts +3 -2
- package/types/components/Card/CardTitle.d.ts +3 -2
- package/types/components/Checkbox/Checkbox.d.ts +2 -1
- package/types/components/CheckboxGroup/CheckboxGroup.d.ts +3 -2
- package/types/components/Code/Code.d.ts +4 -2
- package/types/components/Container/Container.d.ts +3 -2
- package/types/components/Control/Control.d.ts +13 -13
- package/types/components/ControlCode/ControlCode.d.ts +3 -2
- package/types/components/DataTable/DataTableBody.d.ts +2 -3
- package/types/components/DataTable/DataTablePagination.d.ts +3 -2
- package/types/components/DataTable/DataTableRowsPerPage.d.ts +3 -2
- package/types/components/DataTable/ScrolledDataTableRows.d.ts +2 -2
- package/types/components/DataTable/useVirtualizerSnapshot.d.ts +13 -0
- package/types/components/DateRangeInput/DateRangeInput.d.ts +5 -6
- package/types/components/DropdownMenu/DropdownMenuContent.d.ts +3 -2
- package/types/components/Feedback/Feedback.d.ts +6 -4
- package/types/components/Feedback/FeedbackList.d.ts +3 -2
- package/types/components/Field/Field.d.ts +5 -10
- package/types/components/FieldGroup/FieldGroup.d.ts +3 -2
- package/types/components/FieldGroup/FieldGroupTitle.d.ts +3 -2
- package/types/components/Form/Form.d.ts +3 -8
- package/types/components/Grid/Grid.d.ts +11 -4
- package/types/components/Grid/GridContext.d.ts +1 -1
- package/types/components/Heading/Heading.d.ts +12 -3
- package/types/components/HelperText/HelperText.d.ts +4 -2
- package/types/components/Icon/Icon.d.ts +9 -4
- package/types/components/IconButton/IconButton.d.ts +3 -2
- package/types/components/Keybinds/Keybinds.d.ts +3 -2
- package/types/components/Keyboard/Keyboard.d.ts +17 -4
- package/types/components/Label/Label.d.ts +11 -2
- package/types/components/Link/Link.d.ts +4 -2
- package/types/components/Mark/Mark.d.ts +7 -5
- package/types/components/MenuList/MenuList.d.ts +3 -2
- package/types/components/Popover/Popover.d.ts +1 -1
- package/types/components/Popover/PopoverContent.d.ts +4 -2
- package/types/components/Printer/PrinterContent.d.ts +3 -9
- package/types/components/RadioGroup/Radio.d.ts +2 -1
- package/types/components/RadioGroup/RadioGroup.d.ts +3 -2
- package/types/components/Root/Root.d.ts +3 -8
- package/types/components/Root/RootElement.d.ts +2 -2
- package/types/components/Separator/Separator.d.ts +2 -1
- package/types/components/Slot/Slot.d.ts +1 -1
- package/types/components/Spinner/Spinner.d.ts +7 -4
- package/types/components/Stack/Stack.d.ts +10 -11
- package/types/components/Stack/StackContext.d.ts +1 -1
- package/types/components/Stepper/StepContent.d.ts +3 -8
- package/types/components/Stepper/StepList.d.ts +3 -2
- package/types/components/Stepper/Stepper.d.ts +9 -13
- package/types/components/Table/Table.d.ts +2 -1
- package/types/components/Tabs/TabContent.d.ts +3 -2
- package/types/components/Tabs/TabList.d.ts +2 -1
- package/types/components/Tabs/Tabs.d.ts +6 -4
- package/types/components/Tag/Tag.d.ts +4 -2
- package/types/components/Text/Text.d.ts +48 -0
- package/types/components/Text/index.d.ts +1 -0
- package/types/index.d.ts +10 -3
- package/types/utils/localeUtils.d.ts +8 -0
- package/types/utils/responsiveValues.d.ts +41 -0
- package/types/utils/useMarginProps.d.ts +46 -0
- package/types/utils/usePaddingProps.d.ts +46 -0
- package/types/utils/useSizingProps.d.ts +23 -0
- package/types/utils/useTextProps.d.ts +50 -0
- package/dist/chunks/en-DGLb7rrz.js.map +0 -1
- package/types/utils/changeCase.d.ts +0 -2
- package/types/utils/useResponsiveValues.d.ts +0 -41
|
@@ -2,19 +2,24 @@ import type { IconProp } from "@fortawesome/fontawesome-svg-core";
|
|
|
2
2
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
3
3
|
import type { ComponentProps, ReactNode } from "react";
|
|
4
4
|
import type { AccentColor } from "../../utils/accent.ts";
|
|
5
|
+
import type { Responsive } from "../../utils/responsiveValues.ts";
|
|
6
|
+
import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
|
|
7
|
+
import { type TextSize } from "../../utils/useTextProps.ts";
|
|
5
8
|
export type { IconProp } from "@fortawesome/fontawesome-svg-core";
|
|
6
9
|
/** Possible sizes of an icon. */
|
|
7
|
-
export type IconSize =
|
|
10
|
+
export type IconSize = TextSize;
|
|
8
11
|
/** Possible colours of an icon. */
|
|
9
12
|
export type IconColor = AccentColor;
|
|
10
13
|
/** Properties of the icon component. */
|
|
11
|
-
export interface IconProps extends Omit<ComponentProps<typeof FontAwesomeIcon>, "icon" | "size"> {
|
|
14
|
+
export interface IconProps extends UseMarginPropsOptions, Omit<ComponentProps<typeof FontAwesomeIcon>, "icon" | "size"> {
|
|
12
15
|
/** Icon to display. */
|
|
13
16
|
icon: IconProp;
|
|
14
17
|
/** Size of the icon. By default, the icon will be sized according to the current font size. */
|
|
15
|
-
size?: IconSize
|
|
18
|
+
size?: Responsive<IconSize>;
|
|
16
19
|
/** Colour of the icon. By default, the icon will have the current font's colour. */
|
|
17
20
|
color?: IconColor;
|
|
21
|
+
/** Uses a higher contrast colour for the icon. */
|
|
22
|
+
highContrast?: boolean;
|
|
18
23
|
/**
|
|
19
24
|
* Optional accessible label for the icon.
|
|
20
25
|
*
|
|
@@ -46,4 +51,4 @@ export interface IconProps extends Omit<ComponentProps<typeof FontAwesomeIcon>,
|
|
|
46
51
|
* }
|
|
47
52
|
* ```
|
|
48
53
|
*/
|
|
49
|
-
export declare function Icon({ size, color, label, className, ...otherProps }: IconProps): import("react").JSX.Element;
|
|
54
|
+
export declare function Icon({ size, color, highContrast, label, style, className, ...otherProps }: IconProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from "react";
|
|
2
2
|
import { type KeyboardShortcutKeybinds } from "../../utils/keyboardShortcut.ts";
|
|
3
3
|
import type { PolymorphicProps } from "../../utils/polymorphicTypes.ts";
|
|
4
|
+
import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
|
|
4
5
|
import type { ButtonAs, ButtonColor, ButtonSize, ButtonVariant } from "../Button";
|
|
5
6
|
import { type IconProp, type IconProps } from "../Icon";
|
|
6
7
|
import { type KeybindsProps } from "../Keybinds";
|
|
@@ -18,7 +19,7 @@ export type IconButtonSize = ButtonSize;
|
|
|
18
19
|
/** Properties of the icon button component. */
|
|
19
20
|
export type IconButtonProps<TAs extends IconButtonAs = "button"> = PolymorphicProps<IconButtonAs, TAs, "button", IconButtonOwnProps>;
|
|
20
21
|
/** Own properties of the icon button component. */
|
|
21
|
-
export interface IconButtonOwnProps {
|
|
22
|
+
export interface IconButtonOwnProps extends UseMarginPropsOptions {
|
|
22
23
|
/**
|
|
23
24
|
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
24
25
|
* original component props with the props of the supplied element/component and change the
|
|
@@ -153,4 +154,4 @@ export interface IconButtonOwnProps {
|
|
|
153
154
|
* }
|
|
154
155
|
* ```
|
|
155
156
|
*/
|
|
156
|
-
export declare function IconButton<TAs extends IconButtonAs = "button">({ as, asChild, variant, color, size, circle, icon, label, active, disabled, loading, loadingLabel, showSpinner, tooltipContent: tooltipContentProp, keybinds, iconProps, labelProps, spinnerProps, tooltipProps, keybindsProps, type, onClick, className, children, "aria-disabled": ariaDisabled, ...otherProps }: IconButtonProps<TAs>): import("react").JSX.Element;
|
|
157
|
+
export declare function IconButton<TAs extends IconButtonAs = "button">({ as, asChild, variant, color, size, circle, icon, label, active, disabled, loading, loadingLabel, showSpinner, tooltipContent: tooltipContentProp, keybinds, iconProps, labelProps, spinnerProps, tooltipProps, keybindsProps, type, onClick, className, style, children, "aria-disabled": ariaDisabled, ...otherProps }: IconButtonProps<TAs>): import("react").JSX.Element;
|
|
@@ -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 keybinds component. */
|
|
3
|
-
export interface KeybindsProps extends Omit<ComponentProps<"span">, "children"> {
|
|
4
|
+
export interface KeybindsProps extends UseMarginPropsOptions, Omit<ComponentProps<"span">, "children"> {
|
|
4
5
|
keybinds: string | string[] | null | undefined;
|
|
5
6
|
/** Limits the number of keybinds to display. Must be >= 1. By default, all keybinds are displayed. */
|
|
6
7
|
limit?: number;
|
|
@@ -16,4 +17,4 @@ export interface KeybindsProps extends Omit<ComponentProps<"span">, "children">
|
|
|
16
17
|
keyLabels?: Record<string, ReactNode>;
|
|
17
18
|
}
|
|
18
19
|
/** Component which visually renders [`tinykeys`](https://jamiebuilds.github.io/tinykeys) keybinds. */
|
|
19
|
-
export declare function Keybinds({ keybinds: keybindsProp, limit, keybindsSeparatorLabel: keybindsSeparatorLabelProp, keyPressesSeparatorLabel, keySymbols, keyLabels, className, ...otherProps }: KeybindsProps): import("react").JSX.Element | null;
|
|
20
|
+
export declare function Keybinds({ keybinds: keybindsProp, limit, keybindsSeparatorLabel: keybindsSeparatorLabelProp, keyPressesSeparatorLabel, keySymbols, keyLabels, className, style, ...otherProps }: KeybindsProps): import("react").JSX.Element | null;
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import type { ComponentProps } from "react";
|
|
2
|
+
import type { AccentColor } from "../../utils/accent.ts";
|
|
3
|
+
import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
|
|
4
|
+
import { type UseTextPropsOptions } from "../../utils/useTextProps.ts";
|
|
5
|
+
/** Keyboard colour. */
|
|
6
|
+
export type KeyboardColor = AccentColor;
|
|
2
7
|
/** Properties of the keyboard component. */
|
|
3
|
-
export interface KeyboardProps extends ComponentProps<"kbd"> {
|
|
8
|
+
export interface KeyboardProps extends UseMarginPropsOptions, UseTextPropsOptions, ComponentProps<"kbd"> {
|
|
4
9
|
/**
|
|
5
10
|
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
6
11
|
* original component props with the props of the supplied element/component and change the
|
|
7
12
|
* underlying DOM node.
|
|
8
13
|
*/
|
|
9
14
|
asChild?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Colour of the keyboard element.
|
|
17
|
+
*
|
|
18
|
+
* @default "primary"
|
|
19
|
+
*/
|
|
20
|
+
color?: KeyboardColor;
|
|
10
21
|
}
|
|
11
22
|
/**
|
|
12
23
|
* Component which represents a span of inline text denoting textual user input from a keyboard,
|
|
@@ -17,13 +28,15 @@ export interface KeyboardProps extends ComponentProps<"kbd"> {
|
|
|
17
28
|
* Example usage:
|
|
18
29
|
*
|
|
19
30
|
* ```tsx
|
|
31
|
+
* import { Keyboard, Text } from "@ostack.tech/ui";
|
|
32
|
+
*
|
|
20
33
|
* function BookmarkInstructions() {
|
|
21
34
|
* return (
|
|
22
|
-
*
|
|
35
|
+
* <Text>
|
|
23
36
|
* Press <Keyboard>Ctrl</Keyboard> + <Keyboard>D</Keyboard> to bookmark this page.
|
|
24
|
-
*
|
|
37
|
+
* </Text>
|
|
25
38
|
* );
|
|
26
39
|
* }
|
|
27
40
|
* ```
|
|
28
41
|
*/
|
|
29
|
-
export declare function Keyboard({ asChild, className, ...otherProps }: KeyboardProps): import("react").JSX.Element;
|
|
42
|
+
export declare function Keyboard({ asChild, color, className, style, ...otherProps }: KeyboardProps): import("react").JSX.Element;
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import { Label as LabelPrimitive } from "radix-ui";
|
|
2
2
|
import type { ComponentProps, ReactNode } from "react";
|
|
3
|
+
import type { AccentColor } from "../../utils/accent.ts";
|
|
4
|
+
import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
|
|
5
|
+
import { type UseTextPropsOptions } from "../../utils/useTextProps.ts";
|
|
3
6
|
import { type IconProps } from "../Icon";
|
|
4
7
|
import { type IconButtonProps } from "../IconButton";
|
|
5
8
|
import { type PopoverContentProps, type PopoverProps } from "../Popover";
|
|
9
|
+
/** Label colours. */
|
|
10
|
+
export type LabelColor = AccentColor;
|
|
6
11
|
/** Properties of the label component. */
|
|
7
|
-
export interface LabelProps extends ComponentProps<typeof LabelPrimitive.Root> {
|
|
12
|
+
export interface LabelProps extends UseMarginPropsOptions, UseTextPropsOptions, ComponentProps<typeof LabelPrimitive.Root> {
|
|
8
13
|
/** Shows a "required" symbol next to the label. */
|
|
9
14
|
required?: boolean;
|
|
10
15
|
/** Optional helper text displayed as a popover triggered by an icon button. */
|
|
11
16
|
helperText?: ReactNode;
|
|
12
17
|
/** Label of the helper button announced to assistive technologies. */
|
|
13
18
|
helperButtonLabel?: string;
|
|
19
|
+
/** Colour of the label. */
|
|
20
|
+
color?: LabelColor;
|
|
21
|
+
/** Uses a higher contrast colour for the text. */
|
|
22
|
+
highContrast?: boolean;
|
|
14
23
|
/** Properties to pass to the container element. */
|
|
15
24
|
containerProps?: ComponentProps<"div">;
|
|
16
25
|
/** Properties to pass to the required icon container element. */
|
|
@@ -41,4 +50,4 @@ export interface LabelProps extends ComponentProps<typeof LabelPrimitive.Root> {
|
|
|
41
50
|
* }
|
|
42
51
|
* ```
|
|
43
52
|
*/
|
|
44
|
-
export declare function Label({ asChild, required, helperText, helperButtonLabel: helperButtonLabelProp, htmlFor, id, className, children, containerProps, requiredIconProps, requiredIconContainerProps, helperButtonProps, helperPopoverProps, helperPopoverContentProps, onClick, ...otherProps }: LabelProps): import("react").JSX.Element;
|
|
53
|
+
export declare function Label({ asChild, required, helperText, helperButtonLabel: helperButtonLabelProp, color, highContrast, htmlFor, id, className, truncate, style, children, containerProps, requiredIconProps, requiredIconContainerProps, helperButtonProps, helperPopoverProps, helperPopoverContentProps, onClick, ...otherProps }: LabelProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { AccentColor } from "../../utils/accent.ts";
|
|
2
2
|
import type { PolymorphicProps } from "../../utils/polymorphicTypes.ts";
|
|
3
|
+
import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
|
|
4
|
+
import { type UseTextPropsOptions } from "../../utils/useTextProps.ts";
|
|
3
5
|
import { type IconProp, type IconProps } from "../Icon";
|
|
4
6
|
/** Elements a link can be rendered as. */
|
|
5
7
|
export type LinkAs = "a" | "button";
|
|
@@ -10,7 +12,7 @@ export type LinkColor = AccentColor;
|
|
|
10
12
|
/** Properties of the link component. */
|
|
11
13
|
export type LinkProps<TAs extends LinkAs = "a"> = PolymorphicProps<LinkAs, TAs, "a", LinkOwnProps>;
|
|
12
14
|
/** Own properties of the link component. */
|
|
13
|
-
export interface LinkOwnProps {
|
|
15
|
+
export interface LinkOwnProps extends UseMarginPropsOptions, UseTextPropsOptions {
|
|
14
16
|
/**
|
|
15
17
|
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
16
18
|
* original component props with the props of the supplied element/component and change the
|
|
@@ -57,4 +59,4 @@ export interface LinkOwnProps {
|
|
|
57
59
|
* }
|
|
58
60
|
* ```
|
|
59
61
|
*/
|
|
60
|
-
export declare function Link<TAs extends LinkAs = "a">({ as, asChild, type, color: colorProp, variant: variantProp, external, icon, iconProps, className, children, ...otherProps }: LinkProps<TAs>): import("react").JSX.Element;
|
|
62
|
+
export declare function Link<TAs extends LinkAs = "a">({ as, asChild, type, color: colorProp, variant: variantProp, external, icon, iconProps, className, style, children, ...otherProps }: LinkProps<TAs>): 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
|
/** Possible mark colours. */
|
|
4
6
|
export type MarkColor = AccentColor;
|
|
5
7
|
/** Properties of the mark component. */
|
|
6
|
-
export interface MarkProps extends ComponentProps<"mark"> {
|
|
8
|
+
export interface MarkProps extends UseMarginPropsOptions, UseTextPropsOptions, ComponentProps<"mark"> {
|
|
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
|
|
@@ -25,16 +27,16 @@ export interface MarkProps extends ComponentProps<"mark"> {
|
|
|
25
27
|
* Example usage:
|
|
26
28
|
*
|
|
27
29
|
* ```tsx
|
|
28
|
-
* import { Mark } from "@ostack.tech/ui";
|
|
30
|
+
* import { Mark, Text } from "@ostack.tech/ui";
|
|
29
31
|
*
|
|
30
32
|
* function HighlightedPassage() {
|
|
31
33
|
* return (
|
|
32
|
-
*
|
|
34
|
+
* <Text>
|
|
33
35
|
* “The study found that <Mark>climate change significantly impacts biodiversity</Mark>,
|
|
34
36
|
* leading to habitat loss and species extinction.”
|
|
35
|
-
*
|
|
37
|
+
* </Text>
|
|
36
38
|
* );
|
|
37
39
|
* }
|
|
38
40
|
* ```
|
|
39
41
|
*/
|
|
40
|
-
export declare function Mark({ asChild, color, className, ...otherProps }: MarkProps): import("react").JSX.Element;
|
|
42
|
+
export declare function Mark({ asChild, color, className, style, ...otherProps }: MarkProps): import("react").JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { ComponentProps } from "react";
|
|
2
|
+
import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
|
|
2
3
|
/** Menu list variants. */
|
|
3
4
|
export type MenuListVariant = "solid" | "subtle";
|
|
4
5
|
/** Placement of icons within menu list items. */
|
|
5
6
|
export type MenuListIconPlacement = "start" | "end";
|
|
6
7
|
/** Properties of the menu list component. */
|
|
7
|
-
export interface MenuListProps extends ComponentProps<"ul"> {
|
|
8
|
+
export interface MenuListProps extends UseMarginPropsOptions, ComponentProps<"ul"> {
|
|
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
|
|
@@ -49,4 +50,4 @@ export interface MenuListProps extends ComponentProps<"ul"> {
|
|
|
49
50
|
* }
|
|
50
51
|
* ```
|
|
51
52
|
*/
|
|
52
|
-
export declare function MenuList({ asChild, variant, iconPlacement, className, ...otherProps }: MenuListProps): import("react").JSX.Element;
|
|
53
|
+
export declare function MenuList({ asChild, variant, iconPlacement, className, style, ...otherProps }: MenuListProps): import("react").JSX.Element;
|
|
@@ -26,7 +26,7 @@ export interface PopoverProps extends ComponentProps<typeof PopoverPrimitive.Roo
|
|
|
26
26
|
* <PopoverTrigger>
|
|
27
27
|
* <Button>Account information</Button>
|
|
28
28
|
* </PopoverTrigger>
|
|
29
|
-
* <PopoverContent>
|
|
29
|
+
* <PopoverContent p={2}>
|
|
30
30
|
* <strong>Account name:</strong> Alana Richards
|
|
31
31
|
* </PopoverContent>
|
|
32
32
|
* </Popover>
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
2
2
|
import type { ComponentProps } from "react";
|
|
3
|
+
import { type UsePaddingPropsOptions } from "../../utils/usePaddingProps.ts";
|
|
4
|
+
import { type UseSizingPropsOptions } from "../../utils/useSizingProps.ts";
|
|
3
5
|
/** Properties of the popover content component. */
|
|
4
|
-
export interface PopoverContentProps extends ComponentProps<typeof PopoverPrimitive.Content> {
|
|
6
|
+
export interface PopoverContentProps extends UsePaddingPropsOptions, UseSizingPropsOptions, ComponentProps<typeof PopoverPrimitive.Content> {
|
|
5
7
|
/**
|
|
6
8
|
* Whether to show an arrow pointing to the anchor.
|
|
7
9
|
*
|
|
@@ -14,4 +16,4 @@ export interface PopoverContentProps extends ComponentProps<typeof PopoverPrimit
|
|
|
14
16
|
arrowProps?: ComponentProps<typeof PopoverPrimitive.Arrow>;
|
|
15
17
|
}
|
|
16
18
|
/** The component that pops out when the popover is open. */
|
|
17
|
-
export declare function PopoverContent({ showArrow, sideOffset, collisionPadding, forceMount, className, portalProps, arrowProps, children, ...otherProps }: PopoverContentProps): import("react").JSX.Element;
|
|
19
|
+
export declare function PopoverContent({ showArrow, sideOffset, collisionPadding, forceMount, className, style, portalProps, arrowProps, children, ...otherProps }: PopoverContentProps): import("react").JSX.Element;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type BoxProps } from "../Box";
|
|
2
2
|
import { type PortalProps } from "../Portal";
|
|
3
3
|
/** Properties of the printer content. */
|
|
4
|
-
export interface PrinterContentProps extends
|
|
5
|
-
/**
|
|
6
|
-
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
7
|
-
* original component props with the props of the supplied element/component and change the
|
|
8
|
-
* underlying DOM node.
|
|
9
|
-
*/
|
|
10
|
-
asChild?: boolean;
|
|
4
|
+
export interface PrinterContentProps extends BoxProps {
|
|
11
5
|
/** Whether the provided `children` should only be rendered while printing. */
|
|
12
6
|
printOnly?: boolean;
|
|
13
7
|
/** Container of the portal. */
|
|
@@ -19,4 +13,4 @@ export interface PrinterContentProps extends ComponentProps<"div"> {
|
|
|
19
13
|
* All “element” properties provided to this component will be forwarded to a wrapper element which
|
|
20
14
|
* **only** exists during printing.
|
|
21
15
|
*/
|
|
22
|
-
export declare function PrinterContent({
|
|
16
|
+
export declare function PrinterContent({ printOnly, portalContainer, className, children, ref, ...otherProps }: PrinterContentProps): import("react").JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
|
|
2
2
|
import { type ComponentProps, type ReactNode } from "react";
|
|
3
|
+
import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
|
|
3
4
|
import { type ControlStatus } from "../Control";
|
|
4
5
|
import { type ControlCodeProps } from "../ControlCode";
|
|
5
6
|
import { type LabelProps } from "../Label";
|
|
6
7
|
import { type SpinnerProps } from "../Spinner";
|
|
7
8
|
/** Properties of a radio component. */
|
|
8
|
-
export interface RadioProps extends Omit<ComponentProps<typeof RadioGroupPrimitive.Item>, "value"> {
|
|
9
|
+
export interface RadioProps extends UseMarginPropsOptions, Omit<ComponentProps<typeof RadioGroupPrimitive.Item>, "value"> {
|
|
9
10
|
/** Radio value. */
|
|
10
11
|
value?: ComponentProps<"input">["value"];
|
|
11
12
|
/** Sets the status of the radio. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RadioGroup as RadioGroupPrimitive } 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 CloseButtonProps } from "../CloseButton";
|
|
4
5
|
import { type ControlShowClearButton, type ControlStatus, type ControlVariant } from "../Control";
|
|
5
6
|
import { type ControlCodeProps } from "../ControlCode";
|
|
@@ -7,7 +8,7 @@ import type { FormValidationMode } from "../Form";
|
|
|
7
8
|
import { type FormControlValidateFn } from "../Form/useRegisterFormControl.ts";
|
|
8
9
|
import { type SpinnerProps } from "../Spinner";
|
|
9
10
|
/** Properties of the radio group component. */
|
|
10
|
-
export interface RadioGroupProps extends Omit<ComponentProps<typeof RadioGroupPrimitive.Root>, "asChild" | "onValueChange"> {
|
|
11
|
+
export interface RadioGroupProps extends UseMarginPropsOptions, Omit<ComponentProps<typeof RadioGroupPrimitive.Root>, "asChild" | "onValueChange"> {
|
|
11
12
|
/** Whether to display the radio group inline. */
|
|
12
13
|
inline?: boolean;
|
|
13
14
|
/**
|
|
@@ -112,4 +113,4 @@ export interface RadioGroupProps extends Omit<ComponentProps<typeof RadioGroupPr
|
|
|
112
113
|
* }
|
|
113
114
|
* ```
|
|
114
115
|
*/
|
|
115
|
-
export declare function RadioGroup({ defaultValue, value: controlledValue, onValueChange, inline: inlineProp, variant: variantProp, status: statusProp, loading, loadingDescription: loadingDescriptionProp, showSpinner, code, showClearButton, clearDescription: clearDescriptionProp, clearButtonLabel: clearButtonLabelProp, onBlurToOutside, validate, validationMode, startAdornment, endAdornment, codeProps, containerProps, startContainerProps, endContainerProps, clearButtonProps, spinnerProps, id, name, required, disabled: disabledProp, readOnly, className, children, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ref, ...otherProps }: RadioGroupProps): import("react").JSX.Element;
|
|
116
|
+
export declare function RadioGroup({ defaultValue, value: controlledValue, onValueChange, inline: inlineProp, variant: variantProp, status: statusProp, loading, loadingDescription: loadingDescriptionProp, showSpinner, code, showClearButton, clearDescription: clearDescriptionProp, clearButtonLabel: clearButtonLabelProp, onBlurToOutside, validate, validationMode, startAdornment, endAdornment, codeProps, containerProps, startContainerProps, endContainerProps, clearButtonProps, spinnerProps, id, name, required, disabled: disabledProp, readOnly, className, style, children, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ref, ...otherProps }: RadioGroupProps): import("react").JSX.Element;
|
|
@@ -2,16 +2,11 @@ import type { ComponentProps } from "react";
|
|
|
2
2
|
import { type DocumentTitleProviderProps } from "../../providers/DocumentTitleProvider";
|
|
3
3
|
import { type ErrorReportingProviderProps } from "../../providers/ErrorReportingProvider";
|
|
4
4
|
import type { LocalizationObject } from "../../providers/LocalizationProvider";
|
|
5
|
+
import type { BoxProps } from "../Box";
|
|
5
6
|
import type { ErrorBoundaryProps } from "../ErrorBoundary";
|
|
6
7
|
import { type ToastSwipeDirection, type ToastViewportPosition } from "../Toast";
|
|
7
8
|
/** Properties of the ostack/UI root component. */
|
|
8
|
-
export interface RootProps extends
|
|
9
|
-
/**
|
|
10
|
-
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
11
|
-
* original component props with the props of the supplied element/component and change the
|
|
12
|
-
* underlying DOM node.
|
|
13
|
-
*/
|
|
14
|
-
asChild?: boolean;
|
|
9
|
+
export interface RootProps extends Omit<BoxProps, "as">, Pick<ErrorReportingProviderProps, "reportError" | "errorReportingUrl" | "errorReportingMethod" | "encodeErrorReport" | "encodedErrorReportMimeType" | "errorReportingOptions">, Pick<DocumentTitleProviderProps, "baseDocumentTitle"> {
|
|
15
10
|
/**
|
|
16
11
|
* Custom prefix used to prefix all component classes, styles, etc.
|
|
17
12
|
*
|
|
@@ -117,7 +112,7 @@ export interface RootProps extends ComponentProps<"div">, Pick<ErrorReportingPro
|
|
|
117
112
|
}
|
|
118
113
|
/**
|
|
119
114
|
* Root component that should wrap an ostack/UI application, exposing all ostack/UI providers and
|
|
120
|
-
* base styles.
|
|
115
|
+
* base styles. Built on top of the [`Box` component](/docs/ostack-ui-layout-box--docs).
|
|
121
116
|
*
|
|
122
117
|
* It further wraps the whole application in an error boundary with support for error reporting.
|
|
123
118
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type BoxProps } from "../Box";
|
|
2
2
|
import type { RootProps } from "./Root.tsx";
|
|
3
3
|
/** Properties of the root element component. */
|
|
4
|
-
export interface RootElementProps extends
|
|
4
|
+
export interface RootElementProps extends Omit<BoxProps, "as">, Pick<RootProps, "errorBoundaryProps"> {
|
|
5
5
|
/** Whether to wrap children in an error boundary. */
|
|
6
6
|
includeErrorBoundary: boolean;
|
|
7
7
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
2
2
|
import type { ComponentProps } from "react";
|
|
3
3
|
import type { AccentColor } from "../../utils/accent.ts";
|
|
4
|
+
import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
|
|
4
5
|
/** Link colours. */
|
|
5
6
|
export type SeparatorColor = AccentColor;
|
|
6
7
|
/** Properties of the separator component. */
|
|
7
|
-
export interface SeparatorProps extends ComponentProps<typeof SeparatorPrimitive.Root> {
|
|
8
|
+
export interface SeparatorProps extends UseMarginPropsOptions, ComponentProps<typeof SeparatorPrimitive.Root> {
|
|
8
9
|
/**
|
|
9
10
|
* Colour of the separator.
|
|
10
11
|
*
|
|
@@ -9,5 +9,5 @@ export interface SlotProps extends ComponentProps<typeof SlotPrimitive.Root> {
|
|
|
9
9
|
* Used to support components with an `asChild` property.
|
|
10
10
|
*/
|
|
11
11
|
export declare const Slot: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLElement> & {
|
|
12
|
-
children?: React.ReactNode;
|
|
12
|
+
children?: React.ReactNode | undefined;
|
|
13
13
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import type { AccentColor } from "../../utils/accent.ts";
|
|
3
|
+
import type { Responsive } from "../../utils/responsiveValues.ts";
|
|
4
|
+
import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
|
|
5
|
+
import { type TextSize } from "../../utils/useTextProps.ts";
|
|
3
6
|
/** Possible sizes of the spinner. */
|
|
4
|
-
export type SpinnerSize =
|
|
7
|
+
export type SpinnerSize = TextSize;
|
|
5
8
|
/** Possible colours of the spinner. */
|
|
6
9
|
export type SpinnerColor = AccentColor;
|
|
7
10
|
/** Properties of the spinner component. */
|
|
8
|
-
export interface SpinnerProps extends ComponentProps<"span"> {
|
|
11
|
+
export interface SpinnerProps extends UseMarginPropsOptions, ComponentProps<"span"> {
|
|
9
12
|
/** Size of the spinner. By default, the spinner will be sized according to the current font size. */
|
|
10
|
-
size?: SpinnerSize
|
|
13
|
+
size?: Responsive<SpinnerSize>;
|
|
11
14
|
/** Colour of the spinner. By default, the spinner will have the current font's colour. */
|
|
12
15
|
color?: SpinnerColor;
|
|
13
16
|
/**
|
|
@@ -31,4 +34,4 @@ export interface SpinnerProps extends ComponentProps<"span"> {
|
|
|
31
34
|
* }
|
|
32
35
|
* ```
|
|
33
36
|
*/
|
|
34
|
-
export declare function Spinner({ size, color, label, className, ...otherProps }: SpinnerProps): import("react").JSX.Element;
|
|
37
|
+
export declare function Spinner({ size, color, label, className, style, ...otherProps }: SpinnerProps): import("react").JSX.Element;
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type Responsive } from "../../utils/
|
|
1
|
+
import { type CSSProperties, type ReactElement } from "react";
|
|
2
|
+
import { type Responsive } from "../../utils/responsiveValues.ts";
|
|
3
|
+
import { type BoxProps } from "../Box";
|
|
3
4
|
/** Possible stack directions. */
|
|
4
5
|
export type StackDirection = "column" | "column-reverse" | "row" | "row-reverse";
|
|
5
6
|
/** Whether to wrap items. */
|
|
6
7
|
export type StackWrap = boolean | "reverse";
|
|
7
8
|
/** Properties of the stack component. */
|
|
8
|
-
export interface StackProps extends
|
|
9
|
-
/**
|
|
10
|
-
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
11
|
-
* original component props with the props of the supplied element/component and change the
|
|
12
|
-
* underlying DOM node.
|
|
13
|
-
*/
|
|
14
|
-
asChild?: boolean;
|
|
9
|
+
export interface StackProps extends BoxProps {
|
|
15
10
|
/**
|
|
16
11
|
* Direction of the stack.
|
|
17
12
|
*
|
|
@@ -26,9 +21,13 @@ export interface StackProps extends ComponentProps<"div"> {
|
|
|
26
21
|
gap?: Responsive<number | string>;
|
|
27
22
|
/** Adds a divider between elements. */
|
|
28
23
|
divider?: ReactElement;
|
|
29
|
-
|
|
24
|
+
/** Sets the `align-items` CSS property. */
|
|
30
25
|
alignItems?: Responsive<CSSProperties["alignItems"]>;
|
|
26
|
+
/** Sets the `justify-content` CSS property. */
|
|
27
|
+
justifyContent?: Responsive<CSSProperties["justifyContent"]>;
|
|
28
|
+
/** Sets the `align-content` CSS property. */
|
|
31
29
|
alignContent?: Responsive<CSSProperties["alignContent"]>;
|
|
30
|
+
/** Sets the `flex-wrap` property. A boolean value sets `"wrap"`/`"nowrap"` respectively. */
|
|
32
31
|
wrap?: Responsive<StackWrap>;
|
|
33
32
|
}
|
|
34
33
|
/**
|
|
@@ -57,4 +56,4 @@ export interface StackProps extends ComponentProps<"div"> {
|
|
|
57
56
|
* }
|
|
58
57
|
* ```
|
|
59
58
|
*/
|
|
60
|
-
export declare function Stack({
|
|
59
|
+
export declare function Stack({ direction, gap, divider, alignItems, justifyContent, alignContent, wrap, className, style, children, ...otherProps }: StackProps): import("react").JSX.Element;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { type ComponentProps } from "react";
|
|
2
|
+
import { type BoxProps } from "../Box";
|
|
2
3
|
/** Properties of the step content component. */
|
|
3
|
-
export interface StepContentProps extends
|
|
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;
|
|
4
|
+
export interface StepContentProps extends BoxProps {
|
|
10
5
|
/** Index of the step that corresponds to this content. */
|
|
11
6
|
index?: number;
|
|
12
7
|
/** Properties to pass to the content label element (print only). */
|
|
@@ -15,4 +10,4 @@ export interface StepContentProps extends ComponentProps<"div"> {
|
|
|
15
10
|
stepContentLabelIndexProps?: ComponentProps<"span">;
|
|
16
11
|
}
|
|
17
12
|
/** Step content component. */
|
|
18
|
-
export declare function StepContent({
|
|
13
|
+
export declare function StepContent({ index, id, className, stepContentLabelProps, stepContentLabelIndexProps, ref, ...otherProps }: StepContentProps): 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 step list component. */
|
|
3
|
-
export interface StepListProps extends ComponentProps<"ol"> {
|
|
4
|
+
export interface StepListProps extends UseMarginPropsOptions, ComponentProps<"ol"> {
|
|
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
|
|
@@ -13,4 +14,4 @@ export interface StepListProps extends ComponentProps<"ol"> {
|
|
|
13
14
|
*
|
|
14
15
|
* The `index` of each `Step` is automatically added when `Step`s are direct children of `StepList`.
|
|
15
16
|
*/
|
|
16
|
-
export declare function StepList({ asChild, className, children, ...otherProps }: StepListProps): import("react").JSX.Element;
|
|
17
|
+
export declare function StepList({ asChild, className, style, children, ...otherProps }: StepListProps): import("react").JSX.Element;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Ref } from "react";
|
|
2
|
+
import { type BoxProps } from "../Box";
|
|
2
3
|
import { type StepperApi } from "./StepperContext.ts";
|
|
3
4
|
/** Properties of the stepper component. */
|
|
4
|
-
export interface StepperProps extends
|
|
5
|
-
/**
|
|
6
|
-
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
7
|
-
* original component props with the props of the supplied element/component and change the
|
|
8
|
-
* underlying DOM node.
|
|
9
|
-
*/
|
|
10
|
-
asChild?: boolean;
|
|
5
|
+
export interface StepperProps extends Omit<BoxProps, "as"> {
|
|
11
6
|
/**
|
|
12
7
|
* Index of the default active step.
|
|
13
8
|
*
|
|
@@ -28,7 +23,8 @@ export interface StepperProps extends ComponentProps<"div"> {
|
|
|
28
23
|
apiRef?: Ref<StepperApi | undefined>;
|
|
29
24
|
}
|
|
30
25
|
/**
|
|
31
|
-
* Display progress through a sequence of numbered steps.
|
|
26
|
+
* Display progress through a sequence of numbered steps. Built on top of the [`Box`
|
|
27
|
+
* component](/docs/ostack-ui-layout-box--docs).
|
|
32
28
|
*
|
|
33
29
|
* It composes the following subcomponents:
|
|
34
30
|
*
|
|
@@ -61,9 +57,9 @@ export interface StepperProps extends ComponentProps<"div"> {
|
|
|
61
57
|
* <Step>Payment</Step>
|
|
62
58
|
* <Step>Review</Step>
|
|
63
59
|
* </StepList>
|
|
64
|
-
* <StepContent>Shipping options…</StepContent>
|
|
65
|
-
* <StepContent>Payment options…</StepContent>
|
|
66
|
-
* <StepContent>Finalize checkout…</StepContent>
|
|
60
|
+
* <StepContent py={2}>Shipping options…</StepContent>
|
|
61
|
+
* <StepContent py={2}>Payment options…</StepContent>
|
|
62
|
+
* <StepContent py={2}>Finalize checkout…</StepContent>
|
|
67
63
|
* <StepperPreviousTrigger />
|
|
68
64
|
* <StepperNextTrigger />
|
|
69
65
|
* <StepperFinishTrigger onClick={completeCheckout} />
|
|
@@ -72,4 +68,4 @@ export interface StepperProps extends ComponentProps<"div"> {
|
|
|
72
68
|
* }
|
|
73
69
|
* ```
|
|
74
70
|
*/
|
|
75
|
-
export declare function Stepper({
|
|
71
|
+
export declare function Stepper({ defaultActiveStep, activeStep: controlledActiveStep, onActiveStepChange, showAllStepsWhilePrinting, className, apiRef, children, ...otherProps }: StepperProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ComponentProps, type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
|
|
2
3
|
import { type ControlStatus } from "../Control";
|
|
3
4
|
/** Default column width in `"fixed"` mode. */
|
|
4
5
|
export declare const DEFAULT_TABLE_COLUMN_WIDTH = 150;
|
|
@@ -9,7 +10,7 @@ export type TableVariant = "default" | "control";
|
|
|
9
10
|
/** Possible table layouts. */
|
|
10
11
|
export type TableLayout = "auto" | "fixed";
|
|
11
12
|
/** Properties of the table component. */
|
|
12
|
-
export interface TableProps extends ComponentProps<"table"> {
|
|
13
|
+
export interface TableProps extends UseMarginPropsOptions, ComponentProps<"table"> {
|
|
13
14
|
/**
|
|
14
15
|
* Caption of the table. This caption is displayed outside the table, above or below it (depending
|
|
15
16
|
* on the value of `captionSide`), in a `<div>` element.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
2
2
|
import type { ComponentProps } from "react";
|
|
3
|
+
import { type BoxProps } from "../Box";
|
|
3
4
|
/** Properties of the tab content component. */
|
|
4
|
-
export interface TabContentProps extends Omit<ComponentProps<typeof TabsPrimitive.TabsContent>, "value"> {
|
|
5
|
+
export interface TabContentProps extends BoxProps, Omit<ComponentProps<typeof TabsPrimitive.TabsContent>, "value"> {
|
|
5
6
|
/** Value of the tab that corresponds to this content. */
|
|
6
7
|
value: string | number;
|
|
7
8
|
/**
|
|
@@ -11,4 +12,4 @@ export interface TabContentProps extends Omit<ComponentProps<typeof TabsPrimitiv
|
|
|
11
12
|
tabContentLabelProps?: ComponentProps<"span">;
|
|
12
13
|
}
|
|
13
14
|
/** Tab content component. */
|
|
14
|
-
export declare function TabContent({
|
|
15
|
+
export declare function TabContent({ value, forceMount, className, tabContentLabelProps, ...otherProps }: TabContentProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
2
2
|
import { type ComponentProps, type ReactNode } from "react";
|
|
3
|
+
import { type UseMarginPropsOptions } from "../../utils/useMarginProps.ts";
|
|
3
4
|
import { type IconButtonProps } from "../IconButton";
|
|
4
5
|
/** Properties of the tab list component. */
|
|
5
|
-
export interface TabListProps extends ComponentProps<typeof TabsPrimitive.List> {
|
|
6
|
+
export interface TabListProps extends UseMarginPropsOptions, ComponentProps<typeof TabsPrimitive.List> {
|
|
6
7
|
/** Label of the scroll left button. */
|
|
7
8
|
scrollLeftButtonLabel?: ReactNode;
|
|
8
9
|
/** Label of the scroll right button. */
|