@ostack.tech/ui 1.3.0-beta.1 → 1.3.0-beta.2
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/ostack-ui.js +50 -17
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +2 -2
- package/types/components/Alert/Alert.d.ts +1 -1
- package/types/components/AlertDialog/AlertDialog.d.ts +0 -1
- package/types/components/AlertDialog/AlertDialogBody.d.ts +2 -2
- package/types/components/AlertDialog/AlertDialogFooter.d.ts +2 -2
- package/types/components/Box/Box.d.ts +1 -1
- package/types/components/CheckboxGroup/CheckboxGroup.d.ts +2 -2
- package/types/components/CommandMenu/CommandMenuItem.d.ts +6 -0
- package/types/components/CommandMenu/cmdk/index.d.ts +2 -2
- package/types/components/Container/Container.d.ts +1 -1
- package/types/components/DataTable/DataTable.d.ts +13 -6
- package/types/components/DataTable/DataTableContent.d.ts +1 -1
- package/types/components/DataTable/DataTableRowsPerPage.d.ts +1 -5
- package/types/components/DateInput/DateInput.d.ts +4 -4
- package/types/components/DateRangeInput/DateRangeInput.d.ts +1 -1
- package/types/components/DropdownMenu/DropdownMenuItem.d.ts +6 -0
- package/types/components/Form/Form.d.ts +12 -3
- package/types/components/Form/FormError.d.ts +3 -2
- package/types/components/Keyboard/Keyboard.d.ts +1 -5
- package/types/components/Link/Link.d.ts +1 -1
- package/types/components/NumericInput/NumericInput.d.ts +4 -4
- package/types/components/Output/Output.d.ts +12 -0
- package/types/components/Select/Select.d.ts +1 -1
- package/types/components/Separator/Separator.d.ts +1 -1
- package/types/components/Table/TableCell.d.ts +2 -2
- package/types/components/Text/Text.d.ts +2 -6
- package/types/components/Tooltip/Tooltip.d.ts +1 -1
- package/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ostack.tech/ui",
|
|
3
|
-
"version": "1.3.0-beta.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.3.0-beta.2",
|
|
4
|
+
"description": "Accessible React component library.",
|
|
5
5
|
"homepage": "https://ui.ostack.tech/",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Opensoft",
|
|
@@ -83,7 +83,7 @@ export interface AlertProps extends UseMarginPropsOptions, ComponentProps<"div">
|
|
|
83
83
|
* ```tsx
|
|
84
84
|
* import { Alert, AlertTitle } from "@ostack.tech/ui";
|
|
85
85
|
*
|
|
86
|
-
* function TermsAndConditionsNotice {
|
|
86
|
+
* function TermsAndConditionsNotice() {
|
|
87
87
|
* return (
|
|
88
88
|
* <Alert>
|
|
89
89
|
* <AlertTitle>Notice</AlertTitle>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type DialogBodyProps } from "../Dialog";
|
|
2
2
|
/** Properties to the alert dialog body component. */
|
|
3
3
|
export type AlertDialogBodyProps = DialogBodyProps;
|
|
4
4
|
/** Body section of the alert dialog. */
|
|
5
|
-
export declare
|
|
5
|
+
export declare function AlertDialogBody(props: DialogBodyProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type DialogFooterProps } from "../Dialog";
|
|
2
2
|
/** Properties to the alert dialog footer component. */
|
|
3
3
|
export type AlertDialogFooterProps = DialogFooterProps;
|
|
4
4
|
/** Footer section of the alert dialog. */
|
|
5
|
-
export declare
|
|
5
|
+
export declare function AlertDialogFooter(props: DialogFooterProps): import("react").JSX.Element;
|
|
@@ -18,7 +18,7 @@ export interface BoxOwnProps extends UseMarginPropsOptions, UsePaddingPropsOptio
|
|
|
18
18
|
/**
|
|
19
19
|
* Basic layout component. Built on top of the browser's [`<div>`
|
|
20
20
|
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/div) with access to
|
|
21
|
-
* margin, padding,
|
|
21
|
+
* margin, padding, and sizing properties.
|
|
22
22
|
*
|
|
23
23
|
* Example usage:
|
|
24
24
|
*
|
|
@@ -8,8 +8,8 @@ import { type SpinnerProps } from "../Spinner";
|
|
|
8
8
|
/** Properties of the checkbox group component. */
|
|
9
9
|
export interface CheckboxGroupProps extends UseMarginPropsOptions, ComponentProps<"div"> {
|
|
10
10
|
/**
|
|
11
|
-
* Whether to display the checkbox group inline. Defaults to `false` unless when
|
|
12
|
-
* table cell.
|
|
11
|
+
* Whether to display the checkbox group inline. Defaults to `false` unless when rendering inside
|
|
12
|
+
* a table cell.
|
|
13
13
|
*/
|
|
14
14
|
inline?: boolean;
|
|
15
15
|
/**
|
|
@@ -10,6 +10,12 @@ export interface CommandMenuItemProps extends Omit<ComponentProps<typeof Command
|
|
|
10
10
|
* @default false
|
|
11
11
|
*/
|
|
12
12
|
asLink?: boolean;
|
|
13
|
+
/** Href for the link, when `asLink` is set. */
|
|
14
|
+
href?: ComponentProps<"a">["href"];
|
|
15
|
+
/** Target of the link, when `asLink` is set. */
|
|
16
|
+
target?: ComponentProps<"a">["target"];
|
|
17
|
+
/** Rel of the link, when `asLink` is set. */
|
|
18
|
+
rel?: ComponentProps<"a">["rel"];
|
|
13
19
|
}
|
|
14
20
|
/** Item of the command menu. */
|
|
15
21
|
export declare function CommandMenuItem({ onSelect, selected, asLink, color, disabled, loading, loadingContent, showSpinner, icon, iconPlacement, keybinds, href, target, rel, keywords, actionProps, contentProps, iconProps, spinnerProps, keybindsProps, className, children, "aria-disabled": ariaDisabled, ...otherProps }: CommandMenuItemProps): import("react").JSX.Element;
|
|
@@ -42,7 +42,7 @@ declare const Command: React.ForwardRefExoticComponent<Children & Omit<React.Det
|
|
|
42
42
|
*/
|
|
43
43
|
shouldFilter?: boolean;
|
|
44
44
|
/**
|
|
45
|
-
* Custom filter function for whether each command menu item should
|
|
45
|
+
* Custom filter function for whether each command menu item should match the given search
|
|
46
46
|
* query. It should return a number between 0 and 1, with 1 being the best match and 0 being
|
|
47
47
|
* hidden entirely. By default, uses the `command-score` library.
|
|
48
48
|
*/
|
|
@@ -170,7 +170,7 @@ declare const pkg: React.ForwardRefExoticComponent<Children & Omit<React.Detaile
|
|
|
170
170
|
*/
|
|
171
171
|
shouldFilter?: boolean;
|
|
172
172
|
/**
|
|
173
|
-
* Custom filter function for whether each command menu item should
|
|
173
|
+
* Custom filter function for whether each command menu item should match the given search
|
|
174
174
|
* query. It should return a number between 0 and 1, with 1 being the best match and 0 being
|
|
175
175
|
* hidden entirely. By default, uses the `command-score` library.
|
|
176
176
|
*/
|
|
@@ -45,7 +45,7 @@ export interface ContainerProps extends UseMarginPropsOptions, ComponentProps<"d
|
|
|
45
45
|
*/
|
|
46
46
|
leftGutter?: Responsive<number | string>;
|
|
47
47
|
/**
|
|
48
|
-
* Size of the right margin of the container.When a number is provided, each unit corresponds to
|
|
48
|
+
* Size of the right margin of the container. When a number is provided, each unit corresponds to
|
|
49
49
|
* `var(--o-ui-space)`.
|
|
50
50
|
*
|
|
51
51
|
* A responsive value may be provided to change the gutter size based on the current breakpoint.
|
|
@@ -296,7 +296,14 @@ export interface DataTableProps<T = any> extends ComponentProps<"div"> {
|
|
|
296
296
|
* Example usage:
|
|
297
297
|
*
|
|
298
298
|
* ```tsx
|
|
299
|
-
* import {
|
|
299
|
+
* import {
|
|
300
|
+
* DataTable,
|
|
301
|
+
* DataTableColumn,
|
|
302
|
+
* DataTableColumns,
|
|
303
|
+
* DataTableContent,
|
|
304
|
+
* DataTablePagination,
|
|
305
|
+
* DataTableRowsPerPage,
|
|
306
|
+
* } from "@ostack.tech/ui";
|
|
300
307
|
*
|
|
301
308
|
* function InventoryTable() {
|
|
302
309
|
* return (
|
|
@@ -314,11 +321,11 @@ export interface DataTableProps<T = any> extends ComponentProps<"div"> {
|
|
|
314
321
|
* ]}
|
|
315
322
|
* >
|
|
316
323
|
* <DataTableColumns>
|
|
317
|
-
* <DataTableColumn
|
|
318
|
-
* <DataTableColumn
|
|
319
|
-
* <DataTableColumn
|
|
320
|
-
* <DataTableColumn
|
|
321
|
-
* <DataTableColumn
|
|
324
|
+
* <DataTableColumn id="sku" label="SKU" header />
|
|
325
|
+
* <DataTableColumn id="product" label="Product" />
|
|
326
|
+
* <DataTableColumn id="category" label="Category" />
|
|
327
|
+
* <DataTableColumn id="stock" label="Stock" />
|
|
328
|
+
* <DataTableColumn id="condition" label="Condition" />
|
|
322
329
|
* </DataTableColumns>
|
|
323
330
|
* <DataTableContent caption="Inventory" />
|
|
324
331
|
* <DataTableRowsPerPage />
|
|
@@ -7,7 +7,7 @@ export interface DataTableContentProps extends Omit<TableProps, "layout"> {
|
|
|
7
7
|
/** Content of the table foot component. */
|
|
8
8
|
tableFootContent?: ReactNode;
|
|
9
9
|
/**
|
|
10
|
-
* Whether the table foot
|
|
10
|
+
* Whether the table foot should be shown when the data table is empty.
|
|
11
11
|
*
|
|
12
12
|
* @default false
|
|
13
13
|
*/
|
|
@@ -8,11 +8,7 @@ export interface DataTableRowsPerPageProps extends UseMarginPropsOptions, Compon
|
|
|
8
8
|
* @default [10, 15, 25, 50]
|
|
9
9
|
*/
|
|
10
10
|
limitOptions?: number[];
|
|
11
|
-
/**
|
|
12
|
-
* Function used to render the number of rows per page.
|
|
13
|
-
*
|
|
14
|
-
* @param rows Node representing the number of rows (a select).
|
|
15
|
-
*/
|
|
11
|
+
/** Label of the rows per page select. */
|
|
16
12
|
label?: ReactNode;
|
|
17
13
|
/**
|
|
18
14
|
* Whether the component should preferably be aligned to the right. This only has an effect when
|
|
@@ -20,22 +20,22 @@ export interface DateInputProps extends Omit<ControlNonFileInputProps, "defaultV
|
|
|
20
20
|
*/
|
|
21
21
|
onValueChange?: (valueRepresentations: DateValueRepresentations) => void;
|
|
22
22
|
/**
|
|
23
|
-
* Minimum date allowed. When a string
|
|
23
|
+
* Minimum date allowed. When a string is provided, it should represent the date in the ISO 8601
|
|
24
24
|
* format, i.e. `"2020-01-01"` should be provided instead of a formatted `"01/01/2020"`.
|
|
25
25
|
*/
|
|
26
26
|
minDate?: string | Date | null;
|
|
27
27
|
/**
|
|
28
|
-
* Maximum date allowed. When a string
|
|
28
|
+
* Maximum date allowed. When a string is provided, it should represent the date in the ISO 8601
|
|
29
29
|
* format, i.e. `"2020-01-01"` should be provided instead of a formatted `"01/01/2020"`.
|
|
30
30
|
*/
|
|
31
31
|
maxDate?: string | Date | null;
|
|
32
32
|
/**
|
|
33
|
-
* Minimum month allowed. When a string
|
|
33
|
+
* Minimum month allowed. When a string is provided, it should represent the date in the ISO 8601
|
|
34
34
|
* format, i.e. `"2020-01"` should be provided instead of a formatted `"01/2020"`.
|
|
35
35
|
*/
|
|
36
36
|
minMonth?: string | Date | null;
|
|
37
37
|
/**
|
|
38
|
-
* Maximum month allowed. When a string
|
|
38
|
+
* Maximum month allowed. When a string is provided, it should represent the date in the ISO 8601
|
|
39
39
|
* format, i.e. `"2020-01"` should be provided instead of a formatted `"01/2020"`.
|
|
40
40
|
*/
|
|
41
41
|
maxMonth?: string | Date | null;
|
|
@@ -49,7 +49,7 @@ export interface DateRangeInputProps extends UseMarginPropsOptions, Pick<UseText
|
|
|
49
49
|
* @param valueRepresentations Different representations of the date-range value.
|
|
50
50
|
*/
|
|
51
51
|
onValueChange?: (valueRepresentations: DateRangeValueRepresentations) => void;
|
|
52
|
-
/** Whether the
|
|
52
|
+
/** Whether the date-range input is required. */
|
|
53
53
|
required?: boolean;
|
|
54
54
|
/** Disables the control. */
|
|
55
55
|
disabled?: boolean;
|
|
@@ -10,6 +10,12 @@ export interface DropdownMenuItemProps extends Omit<ComponentProps<typeof Dropdo
|
|
|
10
10
|
* @default false
|
|
11
11
|
*/
|
|
12
12
|
asLink?: boolean;
|
|
13
|
+
/** Href for the link, when `asLink` is set. */
|
|
14
|
+
href?: ComponentProps<"a">["href"];
|
|
15
|
+
/** Target of the link, when `asLink` is set. */
|
|
16
|
+
target?: ComponentProps<"a">["target"];
|
|
17
|
+
/** Rel of the link, when `asLink` is set. */
|
|
18
|
+
rel?: ComponentProps<"a">["rel"];
|
|
13
19
|
}
|
|
14
20
|
/** Dropdown menu item. */
|
|
15
21
|
export declare function DropdownMenuItem({ onSelect, asLink, selected, color, disabled, loading, loadingContent, showSpinner, icon, iconPlacement, keybinds, href, target, rel, actionProps, contentProps, iconProps, spinnerProps, keybindsProps, className, "aria-disabled": ariaDisabled, ...otherProps }: DropdownMenuItemProps): import("react").JSX.Element;
|
|
@@ -89,8 +89,8 @@ export interface FormProps<T extends FormValues = any> extends Omit<BoxProps, ke
|
|
|
89
89
|
apiRef?: Ref<FormApi<T> | null>;
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
|
-
* The `Form` provides a wrapper over the browser's native validation capabilities and can
|
|
93
|
-
* to declaratively build simple forms.
|
|
92
|
+
* The `Form` component provides a wrapper over the browser's native validation capabilities and can
|
|
93
|
+
* be used to declaratively build simple forms.
|
|
94
94
|
*
|
|
95
95
|
* It composes the following subcomponents:
|
|
96
96
|
*
|
|
@@ -106,7 +106,16 @@ export interface FormProps<T extends FormValues = any> extends Omit<BoxProps, ke
|
|
|
106
106
|
* Example usage:
|
|
107
107
|
*
|
|
108
108
|
* ```tsx
|
|
109
|
-
* import {
|
|
109
|
+
* import {
|
|
110
|
+
* Button,
|
|
111
|
+
* Field,
|
|
112
|
+
* Form,
|
|
113
|
+
* FormError,
|
|
114
|
+
* FormSubmit,
|
|
115
|
+
* Input,
|
|
116
|
+
* Label,
|
|
117
|
+
* Stack,
|
|
118
|
+
* } from "@ostack.tech/ui";
|
|
110
119
|
*
|
|
111
120
|
* function SignInForm() {
|
|
112
121
|
* return (
|
|
@@ -5,8 +5,9 @@ export interface FormErrorProps {
|
|
|
5
5
|
/**
|
|
6
6
|
* Name of the field for which to display the error.
|
|
7
7
|
*
|
|
8
|
-
* By default, the name is inherited from the parent `Field` component if one
|
|
9
|
-
* provided a name. Otherwise, it defaults to the empty string, which represents a
|
|
8
|
+
* By default, the name is inherited from a control within the parent `Field` component if one
|
|
9
|
+
* exists and was provided a name. Otherwise, it defaults to the empty string, which represents a
|
|
10
|
+
* global error.
|
|
10
11
|
*/
|
|
11
12
|
name?: string;
|
|
12
13
|
/** How errors should be displayed. This property is, by default, inherited from the `Form`. */
|
|
@@ -12,11 +12,7 @@ export interface KeyboardProps extends UseMarginPropsOptions, UseTextPropsOption
|
|
|
12
12
|
* underlying DOM node.
|
|
13
13
|
*/
|
|
14
14
|
asChild?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Colour of the keyboard element.
|
|
17
|
-
*
|
|
18
|
-
* @default "primary"
|
|
19
|
-
*/
|
|
15
|
+
/** Colour of the keyboard element. */
|
|
20
16
|
color?: KeyboardColor;
|
|
21
17
|
}
|
|
22
18
|
/**
|
|
@@ -35,7 +35,7 @@ export interface LinkOwnProps extends UseMarginPropsOptions, UseTextPropsOptions
|
|
|
35
35
|
* `rel="noopener noreferrer"`).
|
|
36
36
|
*
|
|
37
37
|
* If a `Referer` header should be included when navigating, then the `rel` attribute should be
|
|
38
|
-
*
|
|
38
|
+
* overridden to simply `rel="noopener"`.
|
|
39
39
|
*/
|
|
40
40
|
external?: boolean;
|
|
41
41
|
/** Link icon. By default, only `external` links have an icon. */
|
|
@@ -30,22 +30,22 @@ export interface NumericInputProps extends NumericTransformerOptions, Omit<Contr
|
|
|
30
30
|
precision?: number | null;
|
|
31
31
|
/**
|
|
32
32
|
* Minimum number allowed. If a string is provided, it should **not** be the formatted
|
|
33
|
-
* representation, e.g. `"999999.99" should be provided instead of `"999 999,99 €"`.
|
|
33
|
+
* representation, e.g. `"999999.99"` should be provided instead of `"999 999,99 €"`.
|
|
34
34
|
*/
|
|
35
35
|
min?: string | number | bigint | null;
|
|
36
36
|
/**
|
|
37
37
|
* Maximum number allowed. If a string is provided, it should **not** be the formatted
|
|
38
|
-
* representation, e.g. `"999999.99" should be provided instead of `"999 999,99 €"`.
|
|
38
|
+
* representation, e.g. `"999999.99"` should be provided instead of `"999 999,99 €"`.
|
|
39
39
|
*/
|
|
40
40
|
max?: string | number | bigint | null;
|
|
41
41
|
/**
|
|
42
42
|
* Value that the number should be greater than. If a string is provided, it should **not** be the
|
|
43
|
-
* formatted representation, e.g. `"999999.99" should be provided instead of `"999 999,99 €"`.
|
|
43
|
+
* formatted representation, e.g. `"999999.99"` should be provided instead of `"999 999,99 €"`.
|
|
44
44
|
*/
|
|
45
45
|
exclusiveMin?: string | number | bigint | null;
|
|
46
46
|
/**
|
|
47
47
|
* Value that the number should be less than. If a string is provided, it should **not** be the
|
|
48
|
-
* formatted representation, e.g. `"999999.99" should be provided instead of `"999 999,99 €"`.
|
|
48
|
+
* formatted representation, e.g. `"999999.99"` should be provided instead of `"999 999,99 €"`.
|
|
49
49
|
*/
|
|
50
50
|
exclusiveMax?: string | number | bigint | null;
|
|
51
51
|
/** Custom validation function meant to validate the control when it is part of a `Form`. */
|
|
@@ -19,6 +19,18 @@ export interface OutputProps extends Omit<ControlOutputProps, "asChild" | "disab
|
|
|
19
19
|
* will remain unchanged.
|
|
20
20
|
*/
|
|
21
21
|
pendingContent?: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show a spinner in the output.
|
|
24
|
+
*
|
|
25
|
+
* Defaults to the value of the `pending` property. In most cases, prefer `pending`, which also
|
|
26
|
+
* marks the output as busy for assistive technologies.
|
|
27
|
+
*
|
|
28
|
+
* Use `showSpinner` when you want a spinner **without** marking the output as busy. To mark as
|
|
29
|
+
* busy **without** a spinner, set `pending` to `true` and `showSpinner` to `false`.
|
|
30
|
+
*
|
|
31
|
+
* @default pending
|
|
32
|
+
*/
|
|
33
|
+
showSpinner?: boolean;
|
|
22
34
|
}
|
|
23
35
|
/**
|
|
24
36
|
* The output component is used to display the result of a calculation or user action. It is built
|
|
@@ -55,7 +55,7 @@ interface SelectPropsBase<TValue> extends SelectPopoverTriggerProps, Pick<Comman
|
|
|
55
55
|
valueProps?: ComponentProps<"div">;
|
|
56
56
|
/** Properties to pass to each `Tag` holding a value, when `multiple` is set. */
|
|
57
57
|
valueTagProps?: Omit<TagProps, "defaultOpen" | "open" | "onOpenChange" | "color" | "showCloseButton">;
|
|
58
|
-
/** Properties to pass to the arrow `
|
|
58
|
+
/** Properties to pass to the arrow `IconButton` component. */
|
|
59
59
|
arrowProps?: Omit<IconButtonProps, "icon" | "label">;
|
|
60
60
|
/** Properties to pass to the `Popover` component. */
|
|
61
61
|
popoverProps?: PopoverContentProps;
|
|
@@ -22,7 +22,7 @@ export interface SeparatorProps extends UseMarginPropsOptions, ComponentProps<ty
|
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Component that visually or semantically separates content. Built on top of the [Radix Separator
|
|
25
|
-
* primitive](https://www.radix-ui.com/primitives/docs/components/separator)
|
|
25
|
+
* primitive](https://www.radix-ui.com/primitives/docs/components/separator).
|
|
26
26
|
*
|
|
27
27
|
* Example usage:
|
|
28
28
|
*
|
|
@@ -28,8 +28,8 @@ export interface TableCellProps extends Omit<ComponentProps<"td" | "th">, "align
|
|
|
28
28
|
/** Specifies how to align the cell's content. Numeric fields should typically be right aligned. */
|
|
29
29
|
align?: CSSProperties["textAlign"];
|
|
30
30
|
/**
|
|
31
|
-
* Style variant to use.
|
|
32
|
-
*
|
|
31
|
+
* Style variant to use. Defaults to `"header"` when the cell is a `header`, and to `"data"`
|
|
32
|
+
* otherwise.
|
|
33
33
|
*/
|
|
34
34
|
variant?: TableCellVariant;
|
|
35
35
|
/**
|
|
@@ -16,18 +16,14 @@ export interface TextOwnProps extends UseMarginPropsOptions, UseTextPropsOptions
|
|
|
16
16
|
* underlying DOM node.
|
|
17
17
|
*/
|
|
18
18
|
asChild?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Colour of the text.
|
|
21
|
-
*
|
|
22
|
-
* @default "primary"
|
|
23
|
-
*/
|
|
19
|
+
/** Colour of the text. */
|
|
24
20
|
color?: TextColor;
|
|
25
21
|
/** Uses a higher contrast colour for the text. */
|
|
26
22
|
highContrast?: boolean;
|
|
27
23
|
}
|
|
28
24
|
/**
|
|
29
25
|
* Component used to render text. By default, it renders as a [`<span>`
|
|
30
|
-
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/
|
|
26
|
+
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/span). Use the `as`
|
|
31
27
|
* property to render as an `<em>`, `<p>`, `<strong>`, or other text elements.
|
|
32
28
|
*
|
|
33
29
|
* Example usage:
|
|
@@ -54,7 +54,7 @@ export interface TooltipProps extends Omit<ComponentProps<typeof TooltipPrimitiv
|
|
|
54
54
|
* ```tsx
|
|
55
55
|
* import { Button, Tooltip } from "@ostack.tech/ui";
|
|
56
56
|
*
|
|
57
|
-
* function BookmarkButton() {
|
|
57
|
+
* function BookmarkButton() {
|
|
58
58
|
* return (
|
|
59
59
|
* <Tooltip content="Save for later…">
|
|
60
60
|
* <Button>Bookmark</Button>
|
|
@@ -36,7 +36,7 @@ export interface AlertDialogOptions {
|
|
|
36
36
|
*/
|
|
37
37
|
triggerElement?: HTMLElement | null;
|
|
38
38
|
/** Properties to pass to the alert dialog's content component. */
|
|
39
|
-
contentProps?: Omit<AlertDialogContentProps, "
|
|
39
|
+
contentProps?: Omit<AlertDialogContentProps, "variant" | "color" | "size">;
|
|
40
40
|
/** Properties to pass to the alert dialog's header component. */
|
|
41
41
|
headerProps?: AlertDialogHeaderProps;
|
|
42
42
|
/** Properties to pass to the alert dialog's title component. */
|