@epilot/volt-ui-experimental-griffel 0.2.0 → 0.2.3
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/AGENTS.md +153 -0
- package/AUTHORING.md +292 -0
- package/README.md +90 -7
- package/dist/components/alert-dialog/alert-dialog.js +18 -18
- package/dist/components/avatar/avatar.js +18 -19
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/badge/badge.js +13 -13
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +6 -6
- package/dist/components/button/button.js +20 -20
- package/dist/components/button-group/button-group.js +6 -6
- package/dist/components/callout/callout.js +6 -6
- package/dist/components/card/card.js +8 -8
- package/dist/components/collapsible-sidebar/collapsible-sidebar.js +4 -4
- package/dist/components/command/command.js +15 -15
- package/dist/components/data-table/data-table-column-header.js +5 -5
- package/dist/components/data-table/data-table-error.js +13 -13
- package/dist/components/data-table/data-table-loading.js +4 -4
- package/dist/components/date-range-picker/date-range-picker.js +8 -8
- package/dist/components/date-time-picker/calendar.js +15 -15
- package/dist/components/date-time-picker/date-time-picker-panel.js +73 -67
- package/dist/components/date-time-picker/date-time-picker-panel.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker.js +53 -49
- package/dist/components/date-time-picker/date-time-picker.js.map +1 -1
- package/dist/components/date-time-picker/time-picker.js +77 -71
- package/dist/components/date-time-picker/time-picker.js.map +1 -1
- package/dist/components/dialog/dialog.js +21 -21
- package/dist/components/drawer/drawer.js +16 -16
- package/dist/components/dropdown-menu/dropdown-menu.js +13 -13
- package/dist/components/field/field-combobox.js +9 -9
- package/dist/components/field/field.js +22 -22
- package/dist/components/label/label.js +11 -11
- package/dist/components/list/list.js +13 -13
- package/dist/components/option-card/option-card.js +24 -24
- package/dist/components/pill/pill.js +21 -20
- package/dist/components/pill/pill.js.map +1 -1
- package/dist/components/popover/popover.js +4 -4
- package/dist/components/radio/radio.js +8 -8
- package/dist/components/scroll-overflow/scroll-overflow.js +6 -6
- package/dist/components/select/select.js +25 -25
- package/dist/components/skeleton/skeleton.js +17 -17
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/table/table-pagination.js +74 -76
- package/dist/components/table/table-pagination.js.map +1 -1
- package/dist/components/tabs/tabs.js +19 -19
- package/dist/components/toast/toast.js +24 -24
- package/dist/components/toggle/toggle.js +17 -17
- package/dist/components/tooltip/tooltip.js +6 -6
- package/dist/index.d.ts +9200 -65
- package/dist/index.js +276 -273
- package/dist/index.js.map +1 -1
- package/dist/tokens/core.generated.js +1168 -1154
- package/dist/tokens/core.generated.js.map +1 -1
- package/dist/tokens/index.d.ts +1079 -1053
- package/dist/tokens/index.js +1078 -1056
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/install.js +21 -9
- package/dist/tokens/install.js.map +1 -1
- package/dist/tokens/palette.generated.js +1323 -1293
- package/dist/tokens/palette.generated.js.map +1 -1
- package/dist/tokens.json +45 -1
- package/package.json +12 -5
- package/testing/jest-preset.cjs +64 -0
- package/dist/components/accordion/accordion.d.ts +0 -14
- package/dist/components/alert-dialog/alert-dialog.d.ts +0 -36
- package/dist/components/avatar/avatar-group.d.ts +0 -7
- package/dist/components/avatar/avatar.d.ts +0 -17
- package/dist/components/badge/badge.d.ts +0 -41
- package/dist/components/breadcrumb/breadcrumb.d.ts +0 -37
- package/dist/components/button/button.d.ts +0 -18
- package/dist/components/button-group/button-group.d.ts +0 -30
- package/dist/components/callout/callout.d.ts +0 -23
- package/dist/components/card/card.d.ts +0 -9
- package/dist/components/checkbox/checkbox.d.ts +0 -4
- package/dist/components/collapsible-sidebar/collapsible-sidebar.d.ts +0 -33
- package/dist/components/command/command.d.ts +0 -85
- package/dist/components/data-table/data-table-body.d.ts +0 -21
- package/dist/components/data-table/data-table-column-header.d.ts +0 -13
- package/dist/components/data-table/data-table-column-visibility.d.ts +0 -21
- package/dist/components/data-table/data-table-content.d.ts +0 -13
- package/dist/components/data-table/data-table-context.d.ts +0 -66
- package/dist/components/data-table/data-table-error.d.ts +0 -21
- package/dist/components/data-table/data-table-header.d.ts +0 -14
- package/dist/components/data-table/data-table-loading.d.ts +0 -13
- package/dist/components/data-table/data-table-pagination.d.ts +0 -17
- package/dist/components/data-table/data-table-pinning-utils.d.ts +0 -17
- package/dist/components/data-table/data-table-row.d.ts +0 -14
- package/dist/components/data-table/data-table-toolbar.d.ts +0 -7
- package/dist/components/data-table/data-table.d.ts +0 -92
- package/dist/components/data-table/get-selected-row-data.d.ts +0 -18
- package/dist/components/data-table/hooks/index.d.ts +0 -2
- package/dist/components/data-table/hooks/use-data-table-content.d.ts +0 -1
- package/dist/components/data-table/hooks/use-data-table.d.ts +0 -2
- package/dist/components/date-range-picker/date-range-picker-utils.d.ts +0 -2
- package/dist/components/date-range-picker/date-range-picker.d.ts +0 -34
- package/dist/components/date-range-picker/range-calendar.d.ts +0 -15
- package/dist/components/date-time-picker/calendar.d.ts +0 -28
- package/dist/components/date-time-picker/date-time-picker-context.d.ts +0 -39
- package/dist/components/date-time-picker/date-time-picker-input.d.ts +0 -13
- package/dist/components/date-time-picker/date-time-picker-panel.d.ts +0 -15
- package/dist/components/date-time-picker/date-time-picker-popover.d.ts +0 -6
- package/dist/components/date-time-picker/date-time-picker-utils.d.ts +0 -37
- package/dist/components/date-time-picker/date-time-picker.d.ts +0 -47
- package/dist/components/date-time-picker/time-picker.d.ts +0 -12
- package/dist/components/dialog/dialog.d.ts +0 -27
- package/dist/components/drawer/drawer.d.ts +0 -27
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +0 -41
- package/dist/components/field/field-combobox.d.ts +0 -90
- package/dist/components/field/field-select.d.ts +0 -4
- package/dist/components/field/field.d.ts +0 -76
- package/dist/components/label/label.d.ts +0 -21
- package/dist/components/list/list.d.ts +0 -46
- package/dist/components/option-card/option-card.d.ts +0 -39
- package/dist/components/pill/pill.d.ts +0 -27
- package/dist/components/popover/popover.d.ts +0 -14
- package/dist/components/radio/radio.d.ts +0 -6
- package/dist/components/scroll-overflow/scroll-overflow.d.ts +0 -38
- package/dist/components/segmented-control/segmented-control.d.ts +0 -11
- package/dist/components/select/select.d.ts +0 -26
- package/dist/components/separator/separator.d.ts +0 -30
- package/dist/components/skeleton/skeleton.d.ts +0 -24
- package/dist/components/spinner/spinner.d.ts +0 -25
- package/dist/components/switch/switch.d.ts +0 -17
- package/dist/components/table/table-pagination.d.ts +0 -45
- package/dist/components/table/table.d.ts +0 -50
- package/dist/components/tabs/tabs.d.ts +0 -18
- package/dist/components/text/text.d.ts +0 -22
- package/dist/components/toast/toast.d.ts +0 -10
- package/dist/components/toggle/toggle-group.d.ts +0 -10
- package/dist/components/toggle/toggle.d.ts +0 -10
- package/dist/components/tooltip/tooltip.d.ts +0 -15
- package/dist/lib/clear-button.d.ts +0 -5
- package/dist/lib/icons.d.ts +0 -3
- package/dist/lib/pagination.d.ts +0 -71
- package/dist/renderer/contract.d.ts +0 -12
- package/dist/renderer/index.d.ts +0 -10
- package/dist/styles/make-styles.d.ts +0 -37
- package/dist/tokens/core.generated.d.ts +0 -3
- package/dist/tokens/install.d.ts +0 -38
- package/dist/tokens/palette.generated.d.ts +0 -3
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type SeparatorProps } from "../separator/separator";
|
|
3
|
-
/**
|
|
4
|
-
* ButtonGroup — compound component family for grouping buttons, text, and separators.
|
|
5
|
-
*
|
|
6
|
-
* One `makeVoltStyles` call for the whole family, one slot per sub-component (following `card.tsx`).
|
|
7
|
-
*
|
|
8
|
-
* No Base UI primitive is needed: v1 only used Radix `Slot` for `asChild` on `ButtonGroupText`,
|
|
9
|
-
* which CONVENTIONS rule 6 drops.
|
|
10
|
-
*
|
|
11
|
-
* `ButtonGroup` handles both `horizontal` and `vertical` orientations, removing adjoining border
|
|
12
|
-
* radius and borders on adjacent children. Sibling focus-visible elements are elevated (`z-index: 10`)
|
|
13
|
-
* and made relative so focus rings are never obscured by subsequent siblings.
|
|
14
|
-
*
|
|
15
|
-
* Nested button groups gain a gap via a `:has()` selector keyed on `SLOT_ATTR` (never on `data-slot`,
|
|
16
|
-
* per CONVENTIONS rule 4).
|
|
17
|
-
*
|
|
18
|
-
* `ButtonGroupText` provides a matching text container (`gray-a4`, subtle border, `shadow-xs`).
|
|
19
|
-
*
|
|
20
|
-
* `ButtonGroupSeparator` composes `Separator` with transparent background and stretch alignment.
|
|
21
|
-
*/
|
|
22
|
-
export type ButtonGroupOrientation = "horizontal" | "vertical";
|
|
23
|
-
export type ButtonGroupProps = React.ComponentProps<"div"> & {
|
|
24
|
-
orientation?: ButtonGroupOrientation;
|
|
25
|
-
};
|
|
26
|
-
export declare const ButtonGroup: React.ForwardRefExoticComponent<Omit<ButtonGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
-
export type ButtonGroupTextProps = React.ComponentProps<"div">;
|
|
28
|
-
export declare const ButtonGroupText: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
-
export type ButtonGroupSeparatorProps = SeparatorProps;
|
|
30
|
-
export declare const ButtonGroupSeparator: React.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export type CalloutVariant = "info" | "gray" | "success" | "warning" | "destructive";
|
|
3
|
-
export type CalloutProps = React.ComponentProps<"div"> & {
|
|
4
|
-
variant?: CalloutVariant;
|
|
5
|
-
hideIcon?: boolean;
|
|
6
|
-
customIcon?: React.ReactNode;
|
|
7
|
-
/** Shows a top-right close button that dismisses the callout. */
|
|
8
|
-
dismissible?: boolean;
|
|
9
|
-
/** Called when the close button is clicked, after the callout hides itself. */
|
|
10
|
-
onDismiss?: () => void;
|
|
11
|
-
};
|
|
12
|
-
export declare const Callout: React.ForwardRefExoticComponent<Omit<CalloutProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export type CalloutTitleProps = React.ComponentProps<"div">;
|
|
14
|
-
export declare const CalloutTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
-
export type CalloutDescriptionProps = React.ComponentProps<"div">;
|
|
16
|
-
export declare const CalloutDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
export type CalloutActionProps = React.ComponentProps<"div"> & {
|
|
18
|
-
align?: "start" | "end";
|
|
19
|
-
};
|
|
20
|
-
export declare const CalloutAction: React.ForwardRefExoticComponent<Omit<CalloutActionProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
-
export type CalloutIconProps = React.ComponentProps<"svg"> & {
|
|
22
|
-
customIcon?: React.ReactNode;
|
|
23
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export type CardProps = React.ComponentProps<"div">;
|
|
3
|
-
export declare const Card: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
export declare const CardHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export declare const CardTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
export declare const CardDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export declare const CardAction: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export declare const CardContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
export declare const CardFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
|
-
export type CheckboxProps = React.ComponentProps<typeof CheckboxPrimitive.Root>;
|
|
4
|
-
export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export interface CollapsibleSidebarContextValue {
|
|
3
|
-
collapsed: boolean;
|
|
4
|
-
onCollapsedChange: (collapsed: boolean) => void;
|
|
5
|
-
width: number | string;
|
|
6
|
-
collapsedWidth: number | string;
|
|
7
|
-
isHovered: boolean;
|
|
8
|
-
expandOnHover: boolean;
|
|
9
|
-
skipTransition: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare function useCollapsibleSidebar(): CollapsibleSidebarContextValue;
|
|
12
|
-
export type CollapsibleSidebarProps = React.ComponentProps<"div"> & {
|
|
13
|
-
collapsed?: boolean;
|
|
14
|
-
defaultCollapsed?: boolean;
|
|
15
|
-
onCollapsedChange?: (collapsed: boolean) => void;
|
|
16
|
-
width?: number | string;
|
|
17
|
-
collapsedWidth?: number | string;
|
|
18
|
-
expandOnHover?: boolean;
|
|
19
|
-
hoverDelay?: number;
|
|
20
|
-
};
|
|
21
|
-
export declare const CollapsibleSidebar: React.ForwardRefExoticComponent<Omit<CollapsibleSidebarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
-
export type CollapsibleSidebarContentProps = React.ComponentProps<"aside"> & {
|
|
23
|
-
floatingClassName?: string;
|
|
24
|
-
};
|
|
25
|
-
export declare const CollapsibleSidebarContent: React.ForwardRefExoticComponent<Omit<CollapsibleSidebarContentProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
26
|
-
export type CollapsibleSidebarCondensedProps = React.ComponentProps<"div">;
|
|
27
|
-
export declare const CollapsibleSidebarCondensed: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
-
export type CollapsibleSidebarToggleProps = Omit<React.ComponentProps<"button">, "onClick" | "children"> & {
|
|
29
|
-
children?: React.ReactNode | ((props: {
|
|
30
|
-
collapsed: boolean;
|
|
31
|
-
}) => React.ReactNode);
|
|
32
|
-
};
|
|
33
|
-
export declare const CollapsibleSidebarToggle: React.ForwardRefExoticComponent<Omit<CollapsibleSidebarToggleProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Command as CommandPrimitive } from "cmdk";
|
|
3
|
-
import { Dialog } from "../dialog/dialog";
|
|
4
|
-
export type CommandProps = React.ComponentProps<typeof CommandPrimitive> & {
|
|
5
|
-
"data-slot"?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const Command: React.ForwardRefExoticComponent<Omit<CommandProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export type CommandDialogProps = Omit<React.ComponentProps<typeof Dialog>, "children"> & {
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
title?: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
className?: string;
|
|
13
|
-
showCloseButton?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare const CommandDialog: React.ForwardRefExoticComponent<Omit<CommandDialogProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
16
|
-
export type CommandInputProps = React.ComponentProps<typeof CommandPrimitive.Input> & {
|
|
17
|
-
wrapperClassName?: string;
|
|
18
|
-
};
|
|
19
|
-
export declare const CommandInput: React.ForwardRefExoticComponent<Omit<CommandInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
20
|
-
export type CommandListProps = React.ComponentProps<typeof CommandPrimitive.List>;
|
|
21
|
-
export declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
22
|
-
children?: React.ReactNode;
|
|
23
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
24
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
25
|
-
} & {
|
|
26
|
-
asChild?: boolean;
|
|
27
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
28
|
-
label?: string;
|
|
29
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
export type CommandEmptyProps = React.ComponentProps<typeof CommandPrimitive.Empty>;
|
|
31
|
-
export declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
32
|
-
children?: React.ReactNode;
|
|
33
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
34
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
35
|
-
} & {
|
|
36
|
-
asChild?: boolean;
|
|
37
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
-
export type CommandGroupProps = React.ComponentProps<typeof CommandPrimitive.Group>;
|
|
39
|
-
export declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
40
|
-
children?: React.ReactNode;
|
|
41
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
42
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
43
|
-
} & {
|
|
44
|
-
asChild?: boolean;
|
|
45
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "heading" | "value"> & {
|
|
46
|
-
heading?: React.ReactNode;
|
|
47
|
-
value?: string;
|
|
48
|
-
forceMount?: boolean;
|
|
49
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
50
|
-
export type CommandSeparatorProps = React.ComponentProps<typeof CommandPrimitive.Separator>;
|
|
51
|
-
export declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
52
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
53
|
-
} & {
|
|
54
|
-
asChild?: boolean;
|
|
55
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
56
|
-
alwaysRender?: boolean;
|
|
57
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
58
|
-
export type CommandItemProps = React.ComponentProps<typeof CommandPrimitive.Item>;
|
|
59
|
-
export declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
60
|
-
children?: React.ReactNode;
|
|
61
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
62
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
63
|
-
} & {
|
|
64
|
-
asChild?: boolean;
|
|
65
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "onSelect" | "disabled" | "value"> & {
|
|
66
|
-
disabled?: boolean;
|
|
67
|
-
onSelect?: (value: string) => void;
|
|
68
|
-
value?: string;
|
|
69
|
-
keywords?: string[];
|
|
70
|
-
forceMount?: boolean;
|
|
71
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
72
|
-
export type CommandShortcutProps = React.ComponentProps<"span">;
|
|
73
|
-
export declare const CommandShortcut: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
74
|
-
export type CommandLoadingProps = React.ComponentProps<typeof CommandPrimitive.Loading>;
|
|
75
|
-
export declare const CommandLoading: React.ForwardRefExoticComponent<Omit<{
|
|
76
|
-
children?: React.ReactNode;
|
|
77
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
78
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
79
|
-
} & {
|
|
80
|
-
asChild?: boolean;
|
|
81
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
82
|
-
progress?: number;
|
|
83
|
-
label?: string;
|
|
84
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
85
|
-
export { Command as CommandRoot };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
export type DataTableBodyProps = {
|
|
4
|
-
/** Additional class name */
|
|
5
|
-
className?: string;
|
|
6
|
-
/** Custom empty state content */
|
|
7
|
-
emptyState?: ReactNode;
|
|
8
|
-
/** Loading state content (shown when isLoading is true) */
|
|
9
|
-
loadingState?: ReactNode;
|
|
10
|
-
/** Whether the table is in loading state */
|
|
11
|
-
isLoading?: boolean;
|
|
12
|
-
/** Error state content (shown when isError is true) */
|
|
13
|
-
errorState?: ReactNode;
|
|
14
|
-
/** Whether the table is in error state */
|
|
15
|
-
isError?: boolean;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Renders the table body with rows.
|
|
19
|
-
* Must be used within a DataTable component.
|
|
20
|
-
*/
|
|
21
|
-
export declare const DataTableBody: React.ForwardRefExoticComponent<DataTableBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { Column } from "@tanstack/react-table";
|
|
3
|
-
export type DataTableColumnHeaderProps<TData = unknown, TValue = unknown> = {
|
|
4
|
-
/** The column instance from Tanstack Table */
|
|
5
|
-
column: Column<TData, TValue>;
|
|
6
|
-
/** The header title to display */
|
|
7
|
-
title: string;
|
|
8
|
-
/** Additional class name */
|
|
9
|
-
className?: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const DataTableColumnHeader: <TData = unknown, TValue = unknown>(props: DataTableColumnHeaderProps<TData, TValue> & {
|
|
12
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
13
|
-
}) => React.ReactElement | null;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ComponentProps, ReactNode } from "react";
|
|
3
|
-
import { DropdownMenu } from "../dropdown-menu/dropdown-menu";
|
|
4
|
-
export type DataTableColumnVisibilityProps = {
|
|
5
|
-
/** Custom icon for the default trigger button. Falls back to settings gear icon. */
|
|
6
|
-
icon?: ReactNode;
|
|
7
|
-
/** Custom trigger element. Defaults to a settings icon button. */
|
|
8
|
-
trigger?: ReactNode;
|
|
9
|
-
/** Label shown at top of dropdown and as screen reader text for default trigger. Required for i18n. */
|
|
10
|
-
label: string;
|
|
11
|
-
/** Additional class name for the dropdown content */
|
|
12
|
-
contentClassName?: string;
|
|
13
|
-
/** Alignment of dropdown relative to trigger. Default: "end" */
|
|
14
|
-
align?: "start" | "center" | "end";
|
|
15
|
-
} & Omit<ComponentProps<typeof DropdownMenu>, "children">;
|
|
16
|
-
/**
|
|
17
|
-
* A dropdown menu for toggling column visibility in DataTable.
|
|
18
|
-
* Shows checkboxes for each column that can be hidden.
|
|
19
|
-
* Place in DataTableToolbar for consistent layout.
|
|
20
|
-
*/
|
|
21
|
-
export declare const DataTableColumnVisibility: React.ForwardRefExoticComponent<Omit<DataTableColumnVisibilityProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
export type DataTableContentProps = {
|
|
4
|
-
/** Children to render inside the table (DataTableHeader, DataTableBody) */
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
/** Additional class name */
|
|
7
|
-
className?: string;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Container component for DataTable that handles the table structure.
|
|
11
|
-
* If no children are provided, renders DataTableHeader and DataTableBody by default.
|
|
12
|
-
*/
|
|
13
|
-
export declare const DataTableContent: React.ForwardRefExoticComponent<DataTableContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { MouseEvent } from "react";
|
|
2
|
-
import type { Table as TanstackTable, PaginationState, Row } from "@tanstack/react-table";
|
|
3
|
-
/**
|
|
4
|
-
* @no-host-element Constant configuration value.
|
|
5
|
-
*/
|
|
6
|
-
export declare const DEFAULT_ROW_HEIGHT = 48;
|
|
7
|
-
/**
|
|
8
|
-
* @no-host-element Constant configuration value.
|
|
9
|
-
*/
|
|
10
|
-
export declare const DEFAULT_OVERSCAN = 10;
|
|
11
|
-
/**
|
|
12
|
-
* @no-host-element Constant configuration value.
|
|
13
|
-
*/
|
|
14
|
-
export declare const DEFAULT_CONTAINER_HEIGHT = 600;
|
|
15
|
-
/** Controls how cell content handles overflow */
|
|
16
|
-
export type DataTableCellOverflow = "grow" | "wrap" | "truncate";
|
|
17
|
-
export type DataTablePaginationConfig = {
|
|
18
|
-
/** Controlled page index (0-indexed) */
|
|
19
|
-
pageIndex?: number;
|
|
20
|
-
/** Page size (items per page). Default: 10 */
|
|
21
|
-
pageSize?: number;
|
|
22
|
-
/** Available page size options. Default: [10, 25, 50, 100] */
|
|
23
|
-
pageSizeOptions?: number[];
|
|
24
|
-
/** Total items count for server-side pagination */
|
|
25
|
-
totalItems?: number;
|
|
26
|
-
/** Total page count for server-side pagination (optional if totalItems provided) */
|
|
27
|
-
pageCount?: number;
|
|
28
|
-
/** Callback for pagination state changes */
|
|
29
|
-
onPaginationChange?: (state: PaginationState) => void;
|
|
30
|
-
};
|
|
31
|
-
export type DataTableContextValue<TData> = {
|
|
32
|
-
table: TanstackTable<TData>;
|
|
33
|
-
pagination?: DataTablePaginationConfig;
|
|
34
|
-
/** Handler called when a row is clicked. Enables clickable row mode. */
|
|
35
|
-
onRowClick?: (row: Row<TData>, event: MouseEvent<HTMLTableRowElement>) => void;
|
|
36
|
-
/** Custom hover class for clickable rows. Default: 'hover:bg-accent-a3' */
|
|
37
|
-
clickableRowClassName?: string;
|
|
38
|
-
/** Custom class for selected rows. Default: 'data-[state=selected]:bg-accent-a3' */
|
|
39
|
-
selectedRowClassName?: string;
|
|
40
|
-
/** Controls how cell content handles overflow. 'grow' expands cells (default), 'wrap' wraps text, 'truncate' shows ellipsis. */
|
|
41
|
-
cellOverflow?: DataTableCellOverflow;
|
|
42
|
-
/** Whether column resizing is disabled (enabled by default) */
|
|
43
|
-
disableColumnResizing?: boolean;
|
|
44
|
-
/** Show bottom border on header row. Default: true */
|
|
45
|
-
showHeaderBorder?: boolean;
|
|
46
|
-
/** Show bottom borders on data rows. Default: true */
|
|
47
|
-
showRowBorders?: boolean;
|
|
48
|
-
/** Ensure columns have minimum width to fit header content (prevents hover clipping on sortable headers) */
|
|
49
|
-
fitHeaderWidth?: boolean;
|
|
50
|
-
};
|
|
51
|
-
export type DataTableContentContextValue = {
|
|
52
|
-
/** Sync column widths to visual values before resize starts (prevents snap/jump) */
|
|
53
|
-
syncColumnWidthsBeforeResize: () => void;
|
|
54
|
-
/** Width of the spacer column to fill remaining container space (0 if columns fill or exceed container) */
|
|
55
|
-
spacerWidth: number;
|
|
56
|
-
} | null;
|
|
57
|
-
/**
|
|
58
|
-
* Context for accessing table instance in compound components
|
|
59
|
-
* @no-host-element Context object, renders no DOM element.
|
|
60
|
-
*/
|
|
61
|
-
export declare const DataTableContext: import("react").Context<DataTableContextValue<any> | null>;
|
|
62
|
-
/**
|
|
63
|
-
* Context for content-level functions (sync widths before resize)
|
|
64
|
-
* @no-host-element Context object, renders no DOM element.
|
|
65
|
-
*/
|
|
66
|
-
export declare const DataTableContentContext: import("react").Context<DataTableContentContextValue>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
export type DataTableErrorProps = {
|
|
4
|
-
/** Error title text */
|
|
5
|
-
title?: string;
|
|
6
|
-
/** Error description/message */
|
|
7
|
-
description?: ReactNode;
|
|
8
|
-
/** Retry button text */
|
|
9
|
-
retryLabel?: string;
|
|
10
|
-
/** Callback when retry is clicked */
|
|
11
|
-
onRetry?: () => void;
|
|
12
|
-
/** Additional class name */
|
|
13
|
-
className?: string;
|
|
14
|
-
/** Custom error content (overrides default error display) */
|
|
15
|
-
children?: ReactNode;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Error state display for DataTable.
|
|
19
|
-
* Shows an error icon, message, and optional retry button.
|
|
20
|
-
*/
|
|
21
|
-
export declare const DataTableError: React.ForwardRefExoticComponent<DataTableErrorProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export type DataTableHeaderProps = {
|
|
3
|
-
/** Additional class name */
|
|
4
|
-
className?: string;
|
|
5
|
-
/** Whether to make header sticky */
|
|
6
|
-
sticky?: boolean;
|
|
7
|
-
/** Background color for sticky header. Default: tokens.gray2 */
|
|
8
|
-
stickyBackground?: string;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Renders the table header with column headers.
|
|
12
|
-
* Must be used within a DataTable component.
|
|
13
|
-
*/
|
|
14
|
-
export declare const DataTableHeader: React.ForwardRefExoticComponent<DataTableHeaderProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
export type DataTableLoadingProps = {
|
|
4
|
-
/** Additional class name */
|
|
5
|
-
className?: string;
|
|
6
|
-
/** Custom loading content (overrides default spinner) */
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Loading state display for DataTable.
|
|
11
|
-
* Renders a centered spinner by default, or custom content when children are provided.
|
|
12
|
-
*/
|
|
13
|
-
export declare const DataTableLoading: React.ForwardRefExoticComponent<DataTableLoadingProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type TablePaginationLabels } from "../table/table-pagination";
|
|
3
|
-
export type DataTablePaginationProps = {
|
|
4
|
-
/** Available page size options */
|
|
5
|
-
pageSizeOptions?: number[];
|
|
6
|
-
/** Number of sibling pages to show on each side of current page */
|
|
7
|
-
siblingCount?: number;
|
|
8
|
-
/** Labels for i18n. See TablePaginationLabels for available options. */
|
|
9
|
-
labels?: TablePaginationLabels;
|
|
10
|
-
/** Additional class name */
|
|
11
|
-
className?: string;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Pagination component that integrates with DataTable's Tanstack Table instance.
|
|
15
|
-
* Must be used within a DataTable component.
|
|
16
|
-
*/
|
|
17
|
-
export declare const DataTablePagination: React.ForwardRefExoticComponent<DataTablePaginationProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Column, Table } from "@tanstack/react-table";
|
|
2
|
-
export type PinningPosition = "left" | "right" | false;
|
|
3
|
-
/**
|
|
4
|
-
* Calculate the sticky offset for a pinned column based on the widths
|
|
5
|
-
* of columns pinned before it.
|
|
6
|
-
*/
|
|
7
|
-
export declare function getPinnedColumnOffset<TData>(column: Column<TData, unknown>, table: Table<TData>): number;
|
|
8
|
-
/**
|
|
9
|
-
* Check if this column is the last pinned column on the left side.
|
|
10
|
-
* Used for applying shadow separator on the right edge.
|
|
11
|
-
*/
|
|
12
|
-
export declare function isLastLeftPinnedColumn<TData>(column: Column<TData, unknown>, table: Table<TData>): boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Check if this column is the first pinned column on the right side.
|
|
15
|
-
* Used for applying shadow separator on the left edge.
|
|
16
|
-
*/
|
|
17
|
-
export declare function isFirstRightPinnedColumn<TData>(column: Column<TData, unknown>, table: Table<TData>): boolean;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { CSSProperties } from "react";
|
|
3
|
-
import type { Row } from "@tanstack/react-table";
|
|
4
|
-
export type DataTableRowProps<TData> = {
|
|
5
|
-
/** The row instance from TanStack Table */
|
|
6
|
-
row: Row<TData>;
|
|
7
|
-
/** Optional style (used for virtualized row heights) */
|
|
8
|
-
style?: CSSProperties;
|
|
9
|
-
/** Additional class name */
|
|
10
|
-
className?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const DataTableRow: <TData>(props: DataTableRowProps<TData> & {
|
|
13
|
-
ref?: React.Ref<HTMLTableRowElement>;
|
|
14
|
-
}) => React.ReactElement | null;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export type DataTableToolbarProps = React.ComponentProps<"div">;
|
|
3
|
-
/**
|
|
4
|
-
* A toolbar wrapper for DataTable that contains filters, search, and actions.
|
|
5
|
-
* Place above the table for consistent layout.
|
|
6
|
-
*/
|
|
7
|
-
export declare const DataTableToolbar: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ReactNode, MouseEvent } from "react";
|
|
3
|
-
import { type SortingState, type RowSelectionState, type ColumnFiltersState, type VisibilityState, type ColumnDef, type Row, type ColumnSizingState, type ColumnPinningState } from "@tanstack/react-table";
|
|
4
|
-
import { type TableDensity } from "../table/table";
|
|
5
|
-
import { type DataTablePaginationConfig, type DataTableCellOverflow } from "./data-table-context";
|
|
6
|
-
export type DataTableProps<TData> = {
|
|
7
|
-
/** Column definitions */
|
|
8
|
-
columns: ColumnDef<TData, unknown>[];
|
|
9
|
-
/** Data array */
|
|
10
|
-
data: TData[];
|
|
11
|
-
/** Children rendered inside the context (DataTableContent, DataTablePagination, etc.) */
|
|
12
|
-
children?: ReactNode;
|
|
13
|
-
/** Unique key accessor for each row */
|
|
14
|
-
getRowId?: (row: TData) => string;
|
|
15
|
-
/** Enable row selection with checkboxes */
|
|
16
|
-
enableRowSelection?: boolean | ((row: Row<TData>) => boolean);
|
|
17
|
-
/** Enable column sorting */
|
|
18
|
-
enableSorting?: boolean;
|
|
19
|
-
/** Skip client-side sorting (for server-side sorting). When true, sorting state is tracked but rows are not sorted client-side. */
|
|
20
|
-
manualSorting?: boolean;
|
|
21
|
-
/** Enable column filtering */
|
|
22
|
-
enableFiltering?: boolean;
|
|
23
|
-
/** Skip client-side filtering (for server-side filtering). When true, filter state is tracked but rows are not filtered client-side. */
|
|
24
|
-
manualFiltering?: boolean;
|
|
25
|
-
/** Enable global search/filter */
|
|
26
|
-
enableGlobalFilter?: boolean;
|
|
27
|
-
/** Pagination configuration */
|
|
28
|
-
pagination?: DataTablePaginationConfig;
|
|
29
|
-
/** Controlled sorting state */
|
|
30
|
-
sorting?: SortingState;
|
|
31
|
-
/** Callback when sorting changes */
|
|
32
|
-
onSortingChange?: (sorting: SortingState) => void;
|
|
33
|
-
/** Default sorting state */
|
|
34
|
-
defaultSorting?: SortingState;
|
|
35
|
-
/** Controlled row selection state */
|
|
36
|
-
rowSelection?: RowSelectionState;
|
|
37
|
-
/** Callback when row selection changes */
|
|
38
|
-
onRowSelectionChange?: (selection: RowSelectionState) => void;
|
|
39
|
-
/** Default row selection state */
|
|
40
|
-
defaultRowSelection?: RowSelectionState;
|
|
41
|
-
/** Controlled column filters state */
|
|
42
|
-
columnFilters?: ColumnFiltersState;
|
|
43
|
-
/** Callback when column filters change */
|
|
44
|
-
onColumnFiltersChange?: (filters: ColumnFiltersState) => void;
|
|
45
|
-
/** Controlled column visibility state */
|
|
46
|
-
columnVisibility?: VisibilityState;
|
|
47
|
-
/** Callback when column visibility changes */
|
|
48
|
-
onColumnVisibilityChange?: (visibility: VisibilityState) => void;
|
|
49
|
-
/** Controlled global filter value */
|
|
50
|
-
globalFilter?: string;
|
|
51
|
-
/** Callback when global filter changes */
|
|
52
|
-
onGlobalFilterChange?: (value: string) => void;
|
|
53
|
-
/** Handler called when a row is clicked. Enables clickable row mode. */
|
|
54
|
-
onRowClick?: (row: Row<TData>, event: MouseEvent<HTMLTableRowElement>) => void;
|
|
55
|
-
/** Custom hover class for clickable rows. Default: 'hover:bg-accent-a3' */
|
|
56
|
-
clickableRowClassName?: string;
|
|
57
|
-
/** Custom class for selected rows. Default: 'data-[state=selected]:bg-accent-a3' */
|
|
58
|
-
selectedRowClassName?: string;
|
|
59
|
-
/** Controls how cell content handles overflow. 'grow' expands cells (default), 'wrap' wraps text, 'truncate' shows ellipsis. Can be overridden per-column via column meta. */
|
|
60
|
-
cellOverflow?: DataTableCellOverflow;
|
|
61
|
-
/** Disable column width resizing (enabled by default) */
|
|
62
|
-
disableColumnResizing?: boolean;
|
|
63
|
-
/** Resize mode: 'onChange' updates during drag, 'onEnd' updates when drag finishes. Default: 'onChange' */
|
|
64
|
-
columnResizeMode?: "onChange" | "onEnd";
|
|
65
|
-
/** Controlled column sizing state */
|
|
66
|
-
columnSizing?: ColumnSizingState;
|
|
67
|
-
/** Callback when column sizing changes */
|
|
68
|
-
onColumnSizingChange?: (sizing: ColumnSizingState) => void;
|
|
69
|
-
/** Default column sizing for uncontrolled mode */
|
|
70
|
-
defaultColumnSizing?: ColumnSizingState;
|
|
71
|
-
/** Controlled column pinning state */
|
|
72
|
-
columnPinning?: ColumnPinningState;
|
|
73
|
-
/** Callback when column pinning changes */
|
|
74
|
-
onColumnPinningChange?: (pinning: ColumnPinningState) => void;
|
|
75
|
-
/** Default column pinning for uncontrolled mode */
|
|
76
|
-
defaultColumnPinning?: ColumnPinningState;
|
|
77
|
-
/** Auto-pin selection column to left when rows are selected. Default: false */
|
|
78
|
-
autoPinSelection?: boolean;
|
|
79
|
-
/** Show bottom border on header row. Default: true */
|
|
80
|
-
showHeaderBorder?: boolean;
|
|
81
|
-
/** Show bottom borders on data rows. Default: true */
|
|
82
|
-
showRowBorders?: boolean;
|
|
83
|
-
/** Ensure columns have minimum width to fit header content (prevents hover clipping on sortable headers). Default: false */
|
|
84
|
-
fitHeaderWidth?: boolean;
|
|
85
|
-
/** Cell density: compact, normal, or comfortable. Default: normal */
|
|
86
|
-
density?: TableDensity;
|
|
87
|
-
/** Additional class name */
|
|
88
|
-
className?: string;
|
|
89
|
-
};
|
|
90
|
-
export declare const DataTable: <TData>(props: DataTableProps<TData> & {
|
|
91
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
92
|
-
}) => React.ReactElement | null;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { RowSelectionState } from "@tanstack/react-table";
|
|
2
|
-
/**
|
|
3
|
-
* Extracts selected row data from a row selection state.
|
|
4
|
-
*
|
|
5
|
-
* @param rowSelection - The selection state from DataTable (controlled via rowSelection prop)
|
|
6
|
-
* @param data - Your data array
|
|
7
|
-
* @param getRowId - Optional ID accessor function (defaults to `row.id`)
|
|
8
|
-
* @returns Array of selected data items
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* const selectedData = useMemo(
|
|
13
|
-
* () => getSelectedRowData(rowSelection, data),
|
|
14
|
-
* [rowSelection, data]
|
|
15
|
-
* )
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare function getSelectedRowData<TData>(rowSelection: RowSelectionState, data: TData[], getRowId?: (row: TData) => string): TData[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useDataTableContent(): import("../data-table-context").DataTableContentContextValue;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { RangeCalendar } from "./range-calendar";
|
|
3
|
-
import type { RangeCalendarProps } from "./range-calendar";
|
|
4
|
-
import type { DateRange, DateTimePickerLocale } from "./date-range-picker-utils";
|
|
5
|
-
export type DateRangePreset = {
|
|
6
|
-
label: string;
|
|
7
|
-
getValue: () => DateRange;
|
|
8
|
-
};
|
|
9
|
-
export type DateRangePickerProps = {
|
|
10
|
-
value: DateRange;
|
|
11
|
-
onChange: (range: DateRange) => void;
|
|
12
|
-
onBlur?: () => void;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
disablePast?: boolean;
|
|
15
|
-
label?: string;
|
|
16
|
-
error?: string;
|
|
17
|
-
startPlaceholder?: string;
|
|
18
|
-
endPlaceholder?: string;
|
|
19
|
-
format?: string;
|
|
20
|
-
locale?: DateTimePickerLocale;
|
|
21
|
-
className?: string;
|
|
22
|
-
keyboardIcon?: React.ReactNode;
|
|
23
|
-
inputAriaLabel?: string;
|
|
24
|
-
openPickerAriaLabel?: string;
|
|
25
|
-
previousMonthLabel?: string;
|
|
26
|
-
nextMonthLabel?: string;
|
|
27
|
-
testId?: string;
|
|
28
|
-
currentTimeInTimezone?: Date;
|
|
29
|
-
showWeekNumbers?: boolean;
|
|
30
|
-
presets?: DateRangePreset[];
|
|
31
|
-
};
|
|
32
|
-
export declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
-
export { RangeCalendar };
|
|
34
|
-
export type { RangeCalendarProps, DateRange, DateTimePickerLocale };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { DateRange, DateTimePickerLocale } from "./date-range-picker-utils";
|
|
3
|
-
export type RangeCalendarProps = {
|
|
4
|
-
value: DateRange;
|
|
5
|
-
onChange: (range: DateRange) => void;
|
|
6
|
-
onRangeComplete?: (range: DateRange) => void;
|
|
7
|
-
disablePast?: boolean;
|
|
8
|
-
locale?: DateTimePickerLocale;
|
|
9
|
-
previousMonthLabel?: string;
|
|
10
|
-
nextMonthLabel?: string;
|
|
11
|
-
currentTimeInTimezone?: Date;
|
|
12
|
-
showWeekNumbers?: boolean;
|
|
13
|
-
className?: string;
|
|
14
|
-
};
|
|
15
|
-
export declare const RangeCalendar: React.ForwardRefExoticComponent<RangeCalendarProps & React.RefAttributes<HTMLDivElement>>;
|