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