@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,7 +1,7 @@
|
|
|
1
1
|
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
2
|
-
import
|
|
2
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
3
3
|
/** Properties of the collapsible content component. */
|
|
4
|
-
export interface CollapsibleContentProps extends
|
|
4
|
+
export interface CollapsibleContentProps extends ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Content> {
|
|
5
5
|
}
|
|
6
6
|
/** Component containing the collapsible content. */
|
|
7
|
-
export declare const CollapsibleContent:
|
|
7
|
+
export declare const CollapsibleContent: import("react").ForwardRefExoticComponent<CollapsibleContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { type CollapsibleDirection } from "./Collapsible.tsx";
|
|
3
2
|
/** Value of the collapsible context. */
|
|
4
3
|
export interface CollapsibleContextValue {
|
|
@@ -6,6 +5,6 @@ export interface CollapsibleContextValue {
|
|
|
6
5
|
direction: CollapsibleDirection;
|
|
7
6
|
}
|
|
8
7
|
/** Collapsible context. */
|
|
9
|
-
export declare const CollapsibleContext:
|
|
8
|
+
export declare const CollapsibleContext: import("react").Context<CollapsibleContextValue | null>;
|
|
10
9
|
/** Hook providing access to the collapsible context. */
|
|
11
10
|
export declare function useCollapsibleContext(): CollapsibleContextValue;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
2
|
-
import
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
3
3
|
/** Properties of the collapsible trigger component. */
|
|
4
|
-
export interface CollapsibleTriggerProps extends Omit<
|
|
4
|
+
export interface CollapsibleTriggerProps extends Omit<ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Trigger>, "asChild" | "children"> {
|
|
5
5
|
defaultTriggerCollapseLabel?: string;
|
|
6
6
|
defaultTriggerExpandLabel?: string;
|
|
7
|
-
children?:
|
|
7
|
+
children?: ReactNode | ((open: boolean) => ReactNode);
|
|
8
8
|
}
|
|
9
9
|
/** Trigger that toggles the expansion of the collapsible content. */
|
|
10
|
-
export declare const CollapsibleTrigger:
|
|
10
|
+
export declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command as CommandPrimitive } from "cmdk";
|
|
2
|
-
import
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from "react";
|
|
3
3
|
import { ControlAddon } from "../ControlAddon";
|
|
4
4
|
import { Icon } from "../Icon";
|
|
5
5
|
import { Input } from "../Input";
|
|
@@ -10,7 +10,7 @@ export type CommandMenuVariant = MenuListVariant;
|
|
|
10
10
|
/** Placement of icons within command menu items. */
|
|
11
11
|
export type CommandMenuIconPlacement = MenuListIconPlacement;
|
|
12
12
|
/** Properties of the command menu component. */
|
|
13
|
-
export interface CommandMenuProps extends
|
|
13
|
+
export interface CommandMenuProps extends ComponentPropsWithoutRef<typeof CommandPrimitive> {
|
|
14
14
|
/**
|
|
15
15
|
* Style variant of the command menu list.
|
|
16
16
|
*
|
|
@@ -43,21 +43,21 @@ export interface CommandMenuProps extends React.ComponentPropsWithoutRef<typeof
|
|
|
43
43
|
/** Estimated progress of loading the list of items. */
|
|
44
44
|
loadingProgress?: number;
|
|
45
45
|
/** Message to display when no items were found. */
|
|
46
|
-
emptyMessage?:
|
|
46
|
+
emptyMessage?: ReactNode;
|
|
47
47
|
/** Properties to pass to the search `Input` component. */
|
|
48
|
-
searchProps?: Omit<
|
|
48
|
+
searchProps?: Omit<ComponentPropsWithRef<typeof Input>, "asChild" | "variant" | "status" | "code" | "defaultValue" | "value" | "onValueChange" | "startAdornment" | "endAdornment" | "showClearButton">;
|
|
49
49
|
/** Properties to pass to the search adornment `ControlAddon` component. */
|
|
50
|
-
searchAdornmentProps?:
|
|
50
|
+
searchAdornmentProps?: ComponentPropsWithRef<typeof ControlAddon>;
|
|
51
51
|
/** Properties to pass to the search `Icon` component. */
|
|
52
|
-
searchIconProps?:
|
|
52
|
+
searchIconProps?: ComponentPropsWithRef<typeof Icon>;
|
|
53
53
|
/** Properties to pass to the list component. */
|
|
54
|
-
listProps?: Omit<
|
|
54
|
+
listProps?: Omit<ComponentPropsWithRef<typeof MenuList>, "asChild" | "variant" | "iconPlacement">;
|
|
55
55
|
/** Properties to pass to the loading element. */
|
|
56
|
-
loadingProps?:
|
|
56
|
+
loadingProps?: ComponentPropsWithRef<"div">;
|
|
57
57
|
/** Properties to pass to the spinner component. */
|
|
58
|
-
spinnerProps?:
|
|
58
|
+
spinnerProps?: ComponentPropsWithRef<typeof Spinner>;
|
|
59
59
|
/** Properties to pass to the component containing the empty message. */
|
|
60
|
-
emptyMessageProps?:
|
|
60
|
+
emptyMessageProps?: ComponentPropsWithRef<"div">;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* The command menu renders a menu of selectable items which can be filtered and
|
|
@@ -88,4 +88,4 @@ export interface CommandMenuProps extends React.ComponentPropsWithoutRef<typeof
|
|
|
88
88
|
* }
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
|
-
export declare const CommandMenu:
|
|
91
|
+
export declare const CommandMenu: import("react").ForwardRefExoticComponent<CommandMenuProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
2
|
-
import
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from "react";
|
|
3
3
|
import { type DialogContentSize } from "../Dialog";
|
|
4
4
|
import { Overlay } from "../Overlay";
|
|
5
5
|
/** Possible command menu dialog sizes. */
|
|
6
6
|
export type CommandMenuDialogSize = DialogContentSize;
|
|
7
7
|
/** Properties of the command menu dialog. */
|
|
8
|
-
export interface CommandMenuDialogProps extends Omit<
|
|
8
|
+
export interface CommandMenuDialogProps extends Omit<ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, "asChild" | "title"> {
|
|
9
9
|
/** Accessible dialog title. Not shown visibly. */
|
|
10
|
-
title?:
|
|
10
|
+
title?: ReactNode;
|
|
11
11
|
/** Accessible dialog description. Not shown visibly. */
|
|
12
|
-
description?:
|
|
12
|
+
description?: ReactNode;
|
|
13
13
|
/**
|
|
14
14
|
* Size of the command menu dialog.
|
|
15
15
|
*
|
|
@@ -37,9 +37,9 @@ export interface CommandMenuDialogProps extends Omit<React.ComponentPropsWithout
|
|
|
37
37
|
*/
|
|
38
38
|
modal?: boolean;
|
|
39
39
|
/** Properties to pass to the portal component. */
|
|
40
|
-
portalProps?: Omit<
|
|
40
|
+
portalProps?: Omit<ComponentPropsWithRef<typeof DialogPrimitive.Portal>, "forceMount">;
|
|
41
41
|
/** Properties to pass to the `Overlay` component. */
|
|
42
|
-
overlayProps?:
|
|
42
|
+
overlayProps?: ComponentPropsWithRef<typeof Overlay>;
|
|
43
43
|
}
|
|
44
44
|
/** Component used to display the command menu within a dialog. */
|
|
45
|
-
export declare const CommandMenuDialog:
|
|
45
|
+
export declare const CommandMenuDialog: import("react").ForwardRefExoticComponent<CommandMenuDialogProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Command as CommandPrimitive } from "cmdk";
|
|
2
|
-
import
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
3
3
|
/** Properties of the command menu group. */
|
|
4
|
-
export interface CommandMenuGroupProps extends Omit<
|
|
4
|
+
export interface CommandMenuGroupProps extends Omit<ComponentPropsWithoutRef<typeof CommandPrimitive.Group>, "asChild" | "heading"> {
|
|
5
5
|
/** Optional label of the command menu group. */
|
|
6
|
-
label?:
|
|
6
|
+
label?: ReactNode;
|
|
7
7
|
}
|
|
8
8
|
/** Component used to group multiple command items. */
|
|
9
|
-
export declare const CommandMenuGroup:
|
|
9
|
+
export declare const CommandMenuGroup: import("react").ForwardRefExoticComponent<CommandMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command as CommandPrimitive } from "cmdk";
|
|
2
|
-
import
|
|
2
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
3
3
|
import { type MenuListItemProps } from "../MenuList";
|
|
4
|
-
export interface CommandMenuItemProps extends Omit<
|
|
4
|
+
export interface CommandMenuItemProps extends Omit<ComponentPropsWithoutRef<typeof CommandPrimitive.Item>, "asChild" | "color">, Pick<MenuListItemProps, "selected" | "color" | "loading" | "enabledWhenLoading" | "loadingContent" | "icon" | "iconPlacement" | "href" | "target" | "rel" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps"> {
|
|
5
5
|
/**
|
|
6
6
|
* Render the item as a link. When set, you can pass `href`, `target`, and
|
|
7
7
|
* `rel` properties to the item.
|
|
@@ -10,4 +10,4 @@ export interface CommandMenuItemProps extends Omit<React.ComponentPropsWithoutRe
|
|
|
10
10
|
*/
|
|
11
11
|
asLink?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export declare const CommandMenuItem:
|
|
13
|
+
export declare const CommandMenuItem: import("react").ForwardRefExoticComponent<CommandMenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
import { type Breakpoint } from "../../utils/breakpoints.ts";
|
|
3
3
|
import { type Responsive } from "../../utils/useResponsiveValues.ts";
|
|
4
4
|
/** Value specifying up to which breakpoint the container should be fluid. */
|
|
5
5
|
export type ContainerFluidUntil = Omit<Breakpoint, "xs">;
|
|
6
6
|
/** Properties of the container component. */
|
|
7
|
-
export interface ContainerProps extends
|
|
7
|
+
export interface ContainerProps extends ComponentPropsWithoutRef<"div"> {
|
|
8
8
|
/**
|
|
9
9
|
* Change the component to the HTML tag or custom component of the only child.
|
|
10
10
|
* This will merge the original component props with the props of the supplied
|
|
@@ -63,4 +63,4 @@ export interface ContainerProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
|
63
63
|
* }
|
|
64
64
|
* ```
|
|
65
65
|
*/
|
|
66
|
-
export declare const Container:
|
|
66
|
+
export declare const Container: import("react").ForwardRefExoticComponent<ContainerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
import { type ControlStatus, type ControlVariant } from "../../utils/control.ts";
|
|
3
3
|
/** Properties of the control addon component. */
|
|
4
|
-
export interface ControlAddonProps extends
|
|
4
|
+
export interface ControlAddonProps extends ComponentPropsWithoutRef<"div"> {
|
|
5
5
|
/**
|
|
6
6
|
* Change the component to the HTML tag or custom component of the only child.
|
|
7
7
|
* This will merge the original component props with the props of the supplied
|
|
@@ -33,4 +33,4 @@ export interface ControlAddonProps extends React.ComponentPropsWithoutRef<"div">
|
|
|
33
33
|
* `endAdornment` properties of a control, but can also be used standalone where
|
|
34
34
|
* it makes sense.
|
|
35
35
|
*/
|
|
36
|
-
export declare const ControlAddon:
|
|
36
|
+
export declare const ControlAddon: import("react").ForwardRefExoticComponent<ControlAddonProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
2
|
import { type ControlStatus, type ControlVariant } from "../../utils/control.ts";
|
|
3
3
|
/** Properties of the control's code component. */
|
|
4
|
-
export interface ControlCodeProps extends
|
|
4
|
+
export interface ControlCodeProps extends ComponentPropsWithoutRef<"div"> {
|
|
5
5
|
/**
|
|
6
6
|
* Change the component to the HTML tag or custom component of the only child.
|
|
7
7
|
* This will merge the original component props with the props of the supplied
|
|
@@ -16,7 +16,7 @@ export interface ControlCodeProps extends React.ComponentPropsWithoutRef<"div">
|
|
|
16
16
|
*/
|
|
17
17
|
status?: ControlStatus;
|
|
18
18
|
/** Text prefixed to the code to be announced by assistive technologies. */
|
|
19
|
-
visuallyHiddenPrefix?:
|
|
19
|
+
visuallyHiddenPrefix?: ReactNode;
|
|
20
20
|
}
|
|
21
21
|
/** Component used to display the "code" of a form control. */
|
|
22
|
-
export declare const ControlCode:
|
|
22
|
+
export declare const ControlCode: import("react").ForwardRefExoticComponent<ControlCodeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef, type Key, type ReactNode, type Ref } from "react";
|
|
2
2
|
import { type SortDirection } from "../../utils/sorting.ts";
|
|
3
3
|
import { type DataTableApi } from "./DataTableApi.ts";
|
|
4
4
|
import { type DataTableCellProps } from "./DataTableCell.tsx";
|
|
@@ -41,7 +41,7 @@ export interface DataTableGetRowsResult<T = unknown> {
|
|
|
41
41
|
totalCount: number;
|
|
42
42
|
}
|
|
43
43
|
/** Properties of the data table component. */
|
|
44
|
-
export interface DataTableProps<T = any> extends
|
|
44
|
+
export interface DataTableProps<T = any> extends ComponentPropsWithoutRef<"div"> {
|
|
45
45
|
/**
|
|
46
46
|
* Display mode of the data table. Rows are displayed either in pages or
|
|
47
47
|
* within an infinite scroll component.
|
|
@@ -67,9 +67,9 @@ export interface DataTableProps<T = any> extends React.ComponentPropsWithoutRef<
|
|
|
67
67
|
* Property of the row that contains the row's key, or a function used to get
|
|
68
68
|
* it, given the row.
|
|
69
69
|
*
|
|
70
|
-
* Keys should be of type `
|
|
70
|
+
* Keys should be of type `Key`, i.e. `string | number | bigint`.
|
|
71
71
|
*/
|
|
72
|
-
rowKey: string | number | symbol | ((row: T) =>
|
|
72
|
+
rowKey: string | number | symbol | ((row: T) => Key);
|
|
73
73
|
/**
|
|
74
74
|
* Number of rows to show when `loading` is `true`, or using `getRows` and the
|
|
75
75
|
* total count isn't yet known.
|
|
@@ -169,19 +169,19 @@ export interface DataTableProps<T = any> extends React.ComponentPropsWithoutRef<
|
|
|
169
169
|
*/
|
|
170
170
|
showSelectionColumn?: boolean;
|
|
171
171
|
/** Default keys of the selected rows. */
|
|
172
|
-
defaultSelectedRows?:
|
|
172
|
+
defaultSelectedRows?: Key[];
|
|
173
173
|
/**
|
|
174
174
|
* Controlled keys of the selected rows.
|
|
175
175
|
*
|
|
176
176
|
* Use together with `onSelectedRowsChange` to change the selected rows.
|
|
177
177
|
*/
|
|
178
|
-
selectedRows?:
|
|
178
|
+
selectedRows?: Key[];
|
|
179
179
|
/**
|
|
180
180
|
* Function called whenever the selected rows of the data table change.
|
|
181
181
|
*
|
|
182
182
|
* @param selectedRows Array containing the keys of the newly selected rows.
|
|
183
183
|
*/
|
|
184
|
-
onSelectedRowsChange?: (selectedRows:
|
|
184
|
+
onSelectedRowsChange?: (selectedRows: Key[]) => void;
|
|
185
185
|
/**
|
|
186
186
|
* Function used to render each row. This function should typically return a
|
|
187
187
|
* `DataTableRow` with the provided properties. This function is useful to
|
|
@@ -190,7 +190,7 @@ export interface DataTableProps<T = any> extends React.ComponentPropsWithoutRef<
|
|
|
190
190
|
* @default props => <DataTableRow {...props} />
|
|
191
191
|
* @param props Properties to pass to the data table row to render.
|
|
192
192
|
*/
|
|
193
|
-
renderRow?: (props: DataTableRowProps) =>
|
|
193
|
+
renderRow?: (props: DataTableRowProps) => ReactNode;
|
|
194
194
|
/**
|
|
195
195
|
* Function used to render each cell. This function should typically return a
|
|
196
196
|
* `DataTableCell` with the provided properties. This function is useful to
|
|
@@ -199,7 +199,7 @@ export interface DataTableProps<T = any> extends React.ComponentPropsWithoutRef<
|
|
|
199
199
|
* @default props => <DataTableCell {...props} />
|
|
200
200
|
* @param props Properties to pass to the data table cell to render.
|
|
201
201
|
*/
|
|
202
|
-
renderCell?: (props: DataTableCellProps) =>
|
|
202
|
+
renderCell?: (props: DataTableCellProps) => ReactNode;
|
|
203
203
|
/**
|
|
204
204
|
* Whether the height of each row should be computed dynamically (only
|
|
205
205
|
* relevant for scrolled mode).
|
|
@@ -224,7 +224,7 @@ export interface DataTableProps<T = any> extends React.ComponentPropsWithoutRef<
|
|
|
224
224
|
*/
|
|
225
225
|
overscan?: number;
|
|
226
226
|
/** Reference to interact with the data table's API. */
|
|
227
|
-
apiRef?:
|
|
227
|
+
apiRef?: Ref<DataTableApi<T> | undefined>;
|
|
228
228
|
}
|
|
229
229
|
/**
|
|
230
230
|
* The `DataTable` component is the root component used for displaying a data
|
|
@@ -253,4 +253,4 @@ export interface DataTableProps<T = any> extends React.ComponentPropsWithoutRef<
|
|
|
253
253
|
* component is only relevant when providing a custom data table cell via
|
|
254
254
|
* `renderCell`.
|
|
255
255
|
*/
|
|
256
|
-
export declare const DataTable:
|
|
256
|
+
export declare const DataTable: import("react").ForwardRefExoticComponent<DataTableProps<any> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ScrollToOptions } from "@tanstack/react-virtual";
|
|
2
|
-
import
|
|
2
|
+
import { type RefObject } from "react";
|
|
3
3
|
/** Options used when using the `goTo` function of the `DataTableApi`. */
|
|
4
4
|
export type DataTableScrollToOptions = ScrollToOptions;
|
|
5
5
|
/** Imperative data table API. */
|
|
@@ -34,4 +34,4 @@ export interface DataTableApi<T = unknown> {
|
|
|
34
34
|
goTo: (index: number, scrollOptions?: DataTableScrollToOptions) => void;
|
|
35
35
|
}
|
|
36
36
|
/** Hook used to access the data table API. */
|
|
37
|
-
export declare function useDataTableApiRef():
|
|
37
|
+
export declare function useDataTableApiRef(): RefObject<DataTableApi | null>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef, type RefObject } from "react";
|
|
2
2
|
import { TableBody } from "../Table";
|
|
3
3
|
import { type DataTableContentProps } from "./DataTableContent.tsx";
|
|
4
4
|
/** Properties of the data table foot component. */
|
|
5
|
-
export interface DataTableBodyProps extends
|
|
6
|
-
containerRef:
|
|
5
|
+
export interface DataTableBodyProps extends ComponentPropsWithoutRef<typeof TableBody>, Pick<DataTableContentProps, "emptyMessage" | "emptyMessageProps"> {
|
|
6
|
+
containerRef: RefObject<HTMLDivElement | null>;
|
|
7
7
|
}
|
|
8
8
|
/** Body of the data table. */
|
|
9
|
-
export declare const DataTableBody:
|
|
9
|
+
export declare const DataTableBody: import("react").ForwardRefExoticComponent<DataTableBodyProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
2
|
import { TableCell } from "../Table";
|
|
3
3
|
/** Properties of a data table cell. */
|
|
4
|
-
export interface DataTableCellProps extends
|
|
5
|
-
columnLabel?:
|
|
4
|
+
export interface DataTableCellProps extends ComponentPropsWithoutRef<typeof TableCell> {
|
|
5
|
+
columnLabel?: ReactNode;
|
|
6
6
|
columnLabelId?: string;
|
|
7
7
|
}
|
|
8
8
|
/** Data table cell. */
|
|
9
|
-
export declare const DataTableCell:
|
|
9
|
+
export declare const DataTableCell: import("react").ForwardRefExoticComponent<DataTableCellProps & import("react").RefAttributes<HTMLTableDataCellElement>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
2
|
import { type MatchAgainstFilter } from "../../utils/filtering.ts";
|
|
3
3
|
import { type TableColumn } from "../Table";
|
|
4
4
|
/** Data table columns. */
|
|
5
5
|
export type DataTableColumns<T = unknown> = Record<string, DataTableColumn<T>>;
|
|
6
6
|
/** Data table column. */
|
|
7
|
-
export interface DataTableColumn<T = unknown, TValue = any> extends Omit<
|
|
7
|
+
export interface DataTableColumn<T = unknown, TValue = any> extends Omit<ComponentPropsWithRef<typeof TableColumn>, "sorted" | "onSort"> {
|
|
8
8
|
/**
|
|
9
9
|
* Whether values of this column can be filtered.
|
|
10
10
|
*
|
|
@@ -35,7 +35,7 @@ export interface DataTableColumn<T = unknown, TValue = any> extends Omit<React.C
|
|
|
35
35
|
* Function used to render the cell's content. By default, the formatted value
|
|
36
36
|
* is rendered, possibly highlighted when it matches the filter.
|
|
37
37
|
*/
|
|
38
|
-
render?: (renderData: DataTableColumnRenderData<T, TValue>) =>
|
|
38
|
+
render?: (renderData: DataTableColumnRenderData<T, TValue>) => ReactNode;
|
|
39
39
|
/**
|
|
40
40
|
* Comparison function used when sorting values of this column. The default
|
|
41
41
|
* sorting function can handle primitive values and dates. When sorting other
|
|
@@ -66,5 +66,5 @@ export interface DataTableColumnRenderData<T = unknown, TValue = unknown> extend
|
|
|
66
66
|
* doesn't match the filter, this property will be the same as
|
|
67
67
|
* `formattedValue`.
|
|
68
68
|
*/
|
|
69
|
-
markedValue:
|
|
69
|
+
markedValue: ReactNode;
|
|
70
70
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
2
|
import { Table, type TableBody, type TableFoot, type TableHead } from "../Table";
|
|
3
3
|
/** Properties of the data table content component. */
|
|
4
|
-
export interface DataTableContentProps extends Omit<
|
|
4
|
+
export interface DataTableContentProps extends Omit<ComponentPropsWithoutRef<typeof Table>, "layout"> {
|
|
5
5
|
/** Message to display when the data table contains no rows. */
|
|
6
|
-
emptyMessage?:
|
|
6
|
+
emptyMessage?: ReactNode;
|
|
7
7
|
/** Content of the table foot component. */
|
|
8
|
-
tableFootContent?:
|
|
8
|
+
tableFootContent?: ReactNode;
|
|
9
9
|
/**
|
|
10
10
|
* Whether the table foot show be shown when the data table is empty.
|
|
11
11
|
*
|
|
@@ -13,16 +13,16 @@ export interface DataTableContentProps extends Omit<React.ComponentPropsWithoutR
|
|
|
13
13
|
*/
|
|
14
14
|
showTableFootWhenEmpty?: boolean;
|
|
15
15
|
/** Properties to pass to the table head component. */
|
|
16
|
-
tableHeadProps?:
|
|
16
|
+
tableHeadProps?: ComponentPropsWithRef<typeof TableHead>;
|
|
17
17
|
/** Properties to pass to the table body component. */
|
|
18
|
-
tableBodyProps?:
|
|
18
|
+
tableBodyProps?: ComponentPropsWithRef<typeof TableBody>;
|
|
19
19
|
/** Properties to pass to the table foot component, when one exists. */
|
|
20
|
-
tableFootProps?:
|
|
20
|
+
tableFootProps?: ComponentPropsWithRef<typeof TableFoot>;
|
|
21
21
|
/** Properties to pass to the component containing the empty message. */
|
|
22
|
-
emptyMessageProps?:
|
|
22
|
+
emptyMessageProps?: ComponentPropsWithRef<"div">;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Component containing the "main content" of the data table, i.e. the table
|
|
26
26
|
* itself.
|
|
27
27
|
*/
|
|
28
|
-
export declare const DataTableContent:
|
|
28
|
+
export declare const DataTableContent: import("react").ForwardRefExoticComponent<DataTableContentProps & import("react").RefAttributes<HTMLTableElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type Key, type ReactNode, type Ref } from "react";
|
|
2
2
|
import { type SortDirection } from "../../utils/sorting.ts";
|
|
3
3
|
import { type DataTableDisplayMode, type DataTableGetRowsOptions, type DataTableGetRowsResult } from "./DataTable.tsx";
|
|
4
4
|
import { type DataTableApi } from "./DataTableApi.ts";
|
|
@@ -8,16 +8,16 @@ import { type DataTableRowProps } from "./DataTableRow.tsx";
|
|
|
8
8
|
/** Value of the data table context. */
|
|
9
9
|
export interface DataTableContextValue<T = any> {
|
|
10
10
|
displayMode: DataTableDisplayMode;
|
|
11
|
-
rowKey: string | number | symbol | ((row: T) =>
|
|
11
|
+
rowKey: string | number | symbol | ((row: T) => Key);
|
|
12
12
|
required?: boolean;
|
|
13
13
|
showSelectionColumn: boolean;
|
|
14
|
-
renderRow?: (props: DataTableRowProps) =>
|
|
15
|
-
renderCell?: (props: DataTableCellProps) =>
|
|
14
|
+
renderRow?: (props: DataTableRowProps) => ReactNode;
|
|
15
|
+
renderCell?: (props: DataTableCellProps) => ReactNode;
|
|
16
16
|
dynamicRowHeight: boolean;
|
|
17
17
|
estimatedRowHeight: number | ((index: number) => number);
|
|
18
18
|
overscan: number;
|
|
19
19
|
generatedId: string;
|
|
20
|
-
apiRef?:
|
|
20
|
+
apiRef?: Ref<DataTableApi<T> | undefined>;
|
|
21
21
|
store: DataTableStore<T>;
|
|
22
22
|
}
|
|
23
23
|
/** State of the data table. */
|
|
@@ -51,7 +51,7 @@ export interface DataTableState<T = any> {
|
|
|
51
51
|
filter: string;
|
|
52
52
|
sortBy: string | null;
|
|
53
53
|
sortDirection: SortDirection;
|
|
54
|
-
selectedRows: [Set<
|
|
54
|
+
selectedRows: [Set<Key>];
|
|
55
55
|
scrolledRangeStart: number;
|
|
56
56
|
scrolledRangeEnd: number;
|
|
57
57
|
tableHeadHeight?: number;
|
|
@@ -65,8 +65,8 @@ export interface DataTableActions<T> {
|
|
|
65
65
|
setLimit: (limit: number) => void;
|
|
66
66
|
setFilter: (filter: string) => void;
|
|
67
67
|
setSort: (sortBy: string | null, sortDirection: SortDirection) => void;
|
|
68
|
-
selectRows: (keys:
|
|
69
|
-
unselectRows: (keys:
|
|
68
|
+
selectRows: (keys: Key[]) => void;
|
|
69
|
+
unselectRows: (keys: Key[]) => void;
|
|
70
70
|
updateWindow: (offset: number, limit: number) => void;
|
|
71
71
|
spliceWindow: (offset: number, limit: number, startIndex: number, deleted?: number, added?: number | T[]) => void;
|
|
72
72
|
refresh: (newTotalCount?: number | null) => void;
|
|
@@ -74,7 +74,7 @@ export interface DataTableActions<T> {
|
|
|
74
74
|
/** Data table store. */
|
|
75
75
|
export type DataTableStore<T> = ReturnType<typeof useCreateDataTableContext<T>>["store"];
|
|
76
76
|
/** Data table context. */
|
|
77
|
-
export declare const DataTableContext:
|
|
77
|
+
export declare const DataTableContext: import("react").Context<DataTableContextValue<any> | null>;
|
|
78
78
|
/** Options used to create the data table context value. */
|
|
79
79
|
export interface UseCreateDataTableContextOptions<T> extends Omit<DataTableContextValue, "generatedId" | "store"> {
|
|
80
80
|
columns: DataTableColumns<T>;
|
|
@@ -99,23 +99,23 @@ export interface UseCreateDataTableContextOptions<T> extends Omit<DataTableConte
|
|
|
99
99
|
sortDirection?: SortDirection;
|
|
100
100
|
onSort?: (sortBy: string | null, sortDirection: SortDirection) => void;
|
|
101
101
|
showSelectionColumn: boolean;
|
|
102
|
-
defaultSelectedRows?:
|
|
103
|
-
selectedRows?:
|
|
104
|
-
onSelectedRowsChange?: (selectedRows:
|
|
102
|
+
defaultSelectedRows?: Key[];
|
|
103
|
+
selectedRows?: Key[];
|
|
104
|
+
onSelectedRowsChange?: (selectedRows: Key[]) => void;
|
|
105
105
|
}
|
|
106
106
|
/** Hook which creates the data table context value. */
|
|
107
107
|
export declare function useCreateDataTableContext<T>({ displayMode, columns, rows, getRows, rowKey, loadingCount, required, loading, renderRow, renderCell, dynamicRowHeight, estimatedRowHeight, overscan, apiRef, leafColumns, headCount, defaultOffset, offset, onOffsetChange, defaultLimit, limit, onLimitChange, defaultFilter, filter, onFilterChange, defaultSortBy, sortBy, defaultSortDirection, sortDirection, onSort, showSelectionColumn, defaultSelectedRows, selectedRows, onSelectedRowsChange, }: UseCreateDataTableContextOptions<T>): {
|
|
108
108
|
displayMode: DataTableDisplayMode;
|
|
109
|
-
rowKey: string | number | symbol | ((row: any) =>
|
|
109
|
+
rowKey: string | number | symbol | ((row: any) => Key);
|
|
110
110
|
required: boolean | undefined;
|
|
111
111
|
showSelectionColumn: boolean;
|
|
112
|
-
renderRow: ((props: DataTableRowProps) =>
|
|
113
|
-
renderCell: ((props: DataTableCellProps) =>
|
|
112
|
+
renderRow: ((props: DataTableRowProps) => ReactNode) | undefined;
|
|
113
|
+
renderCell: ((props: DataTableCellProps) => ReactNode) | undefined;
|
|
114
114
|
dynamicRowHeight: boolean;
|
|
115
115
|
estimatedRowHeight: number | ((index: number) => number);
|
|
116
116
|
overscan: number;
|
|
117
117
|
generatedId: string;
|
|
118
|
-
apiRef:
|
|
118
|
+
apiRef: Ref<DataTableApi<any> | undefined> | undefined;
|
|
119
119
|
store: Omit<import("zustand").StoreApi<DataTableState<T>>, "subscribe"> & {
|
|
120
120
|
subscribe: {
|
|
121
121
|
(listener: (selectedState: DataTableState<T>, previousSelectedState: DataTableState<T>) => void): () => void;
|
|
@@ -130,12 +130,12 @@ export declare function useCreateDataTableContext<T>({ displayMode, columns, row
|
|
|
130
130
|
export declare function useDataTableContext<T = unknown>(): DataTableContextValue<T>;
|
|
131
131
|
/** Context value of a data table cell. */
|
|
132
132
|
export interface DataTableCellContextValue {
|
|
133
|
-
columnLabel?:
|
|
133
|
+
columnLabel?: ReactNode;
|
|
134
134
|
columnLabelId?: string;
|
|
135
135
|
}
|
|
136
136
|
/** Data table cell context. */
|
|
137
|
-
export declare const DataTableCellContext:
|
|
137
|
+
export declare const DataTableCellContext: import("react").Context<DataTableCellContextValue | null>;
|
|
138
138
|
/** Column label accessible within a data table cell. */
|
|
139
|
-
export declare function useDataTableColumnLabel():
|
|
139
|
+
export declare function useDataTableColumnLabel(): ReactNode;
|
|
140
140
|
/** Column label id accessible within a data table cell. */
|
|
141
141
|
export declare function useDataTableColumnLabelId(): string | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
import { Input } from "../Input";
|
|
3
3
|
/** Properties of the data table filter component. */
|
|
4
|
-
export interface DataTableFilterProps extends Omit<
|
|
4
|
+
export interface DataTableFilterProps extends Omit<ComponentPropsWithoutRef<typeof Input>, "defaultValue" | "value"> {
|
|
5
5
|
}
|
|
6
6
|
/** Input used to globally filter a data table. */
|
|
7
|
-
export declare const DataTableFilter:
|
|
7
|
+
export declare const DataTableFilter: import("react").ForwardRefExoticComponent<DataTableFilterProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
import { TableFoot } from "../Table";
|
|
3
3
|
/** Properties of the data table foot component. */
|
|
4
|
-
export interface DataTableFootProps extends
|
|
4
|
+
export interface DataTableFootProps extends ComponentPropsWithoutRef<typeof TableFoot> {
|
|
5
5
|
showWhenEmpty: boolean;
|
|
6
6
|
}
|
|
7
7
|
/** Foot of the data table. */
|
|
8
|
-
export declare const DataTableFoot:
|
|
8
|
+
export declare const DataTableFoot: import("react").ForwardRefExoticComponent<DataTableFootProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
import { TableHead } from "../Table";
|
|
3
3
|
/** Properties of the data table head component. */
|
|
4
|
-
export interface DataTableHeadProps extends
|
|
4
|
+
export interface DataTableHeadProps extends ComponentPropsWithoutRef<typeof TableHead> {
|
|
5
5
|
}
|
|
6
6
|
/** Head of the data table. */
|
|
7
|
-
export declare const DataTableHead:
|
|
7
|
+
export declare const DataTableHead: import("react").ForwardRefExoticComponent<DataTableHeadProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
2
|
/** Properties of the data table pagination component. */
|
|
3
|
-
export interface DataTablePaginationProps extends
|
|
3
|
+
export interface DataTablePaginationProps extends ComponentPropsWithoutRef<"div"> {
|
|
4
4
|
/**
|
|
5
5
|
* Function used to render the range of displayed rows.
|
|
6
6
|
*
|
|
@@ -8,11 +8,11 @@ export interface DataTablePaginationProps extends React.ComponentPropsWithoutRef
|
|
|
8
8
|
* this is a select).
|
|
9
9
|
* @param total Total number of rows.
|
|
10
10
|
*/
|
|
11
|
-
rowsRange?: (range:
|
|
11
|
+
rowsRange?: (range: ReactNode, total: number) => ReactNode;
|
|
12
12
|
/** Label of the previous page button (only relevant in paged mode). */
|
|
13
13
|
previousPageButtonLabel?: string;
|
|
14
14
|
/** Label of the next page button (only relevant in paged mode). */
|
|
15
15
|
nextPageButtonLabel?: string;
|
|
16
16
|
}
|
|
17
17
|
/** Component used to provide pagination to the data table. */
|
|
18
|
-
export declare const DataTablePagination:
|
|
18
|
+
export declare const DataTablePagination: import("react").ForwardRefExoticComponent<DataTablePaginationProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
import { TableRow } from "../Table";
|
|
3
3
|
/** Properties of a data table row. */
|
|
4
|
-
export interface DataTableRowProps<T = any> extends
|
|
4
|
+
export interface DataTableRowProps<T = any> extends ComponentPropsWithoutRef<typeof TableRow> {
|
|
5
5
|
/** Row data. When `undefined`, the row is rendered as "loading". */
|
|
6
6
|
row: T | undefined;
|
|
7
7
|
/** Row index. */
|
|
8
8
|
index: number;
|
|
9
9
|
}
|
|
10
10
|
/** Data table row. */
|
|
11
|
-
export declare const DataTableRow:
|
|
11
|
+
export declare const DataTableRow: import("react").NamedExoticComponent<DataTableRowProps<any> & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
2
|
/** Properties of the data table rows per page component. */
|
|
3
|
-
export interface DataTableRowsPerPageProps extends
|
|
3
|
+
export interface DataTableRowsPerPageProps extends ComponentPropsWithoutRef<"div"> {
|
|
4
4
|
/**
|
|
5
5
|
* Options used to set the data table's `limit` (the maximum number of rows
|
|
6
6
|
* shown per page).
|
|
@@ -13,7 +13,7 @@ export interface DataTableRowsPerPageProps extends React.ComponentPropsWithoutRe
|
|
|
13
13
|
*
|
|
14
14
|
* @param rows Node representing the number of rows (a select).
|
|
15
15
|
*/
|
|
16
|
-
label?:
|
|
16
|
+
label?: ReactNode;
|
|
17
17
|
}
|
|
18
18
|
/** Component displaying a select used to change the number of rows per page. */
|
|
19
|
-
export declare const DataTableRowsPerPage:
|
|
19
|
+
export declare const DataTableRowsPerPage: import("react").ForwardRefExoticComponent<DataTableRowsPerPageProps & import("react").RefAttributes<HTMLDivElement>>;
|