@yuno-payments/dashboard-design-system 0.0.167 → 0.0.170
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/components/atoms/access-denied-alert/access-denied-alert.d.ts +0 -16
- package/dist/components/atoms/accordion/accordion.d.ts +0 -66
- package/dist/components/atoms/alert/alert.d.ts +1 -26
- package/dist/components/atoms/alert/alert.js +8 -9
- package/dist/components/atoms/avatar/avatar-group.d.ts +0 -28
- package/dist/components/atoms/avatar/avatar.d.ts +0 -25
- package/dist/components/atoms/avatar/avatar.js +9 -9
- package/dist/components/atoms/badge/badge.d.ts +2 -30
- package/dist/components/atoms/badge/badge.js +11 -27
- package/dist/components/atoms/button/button.d.ts +0 -44
- package/dist/components/atoms/card/card.d.ts +3 -137
- package/dist/components/atoms/card/card.js +28 -56
- package/dist/components/atoms/checkbox/checkbox.d.ts +2 -38
- package/dist/components/atoms/checkbox/checkbox.js +27 -61
- package/dist/components/atoms/combobox/combobox.d.ts +0 -18
- package/dist/components/atoms/combobox/combobox.js +41 -41
- package/dist/components/atoms/combobox/types.d.ts +1 -90
- package/dist/components/atoms/currency-field/currency-field.d.ts +0 -38
- package/dist/components/atoms/currency-field/currency-field.js +19 -22
- package/dist/components/atoms/date-picker/date-picker.d.ts +0 -15
- package/dist/components/atoms/date-range-picker/date-range-picker.d.ts +0 -15
- package/dist/components/atoms/dots-menu/dots-menu.d.ts +0 -16
- package/dist/components/atoms/dots-menu/dots-menu.js +8 -8
- package/dist/components/atoms/dots-menu/dots-menu.types.d.ts +0 -52
- package/dist/components/atoms/dropdown-menu/dropdown-menu.d.ts +0 -50
- package/dist/components/atoms/field/field.d.ts +0 -55
- package/dist/components/atoms/field/field.js +46 -53
- package/dist/components/atoms/filter/filter-date-range.d.ts +2 -12
- package/dist/components/atoms/filter/filter-date-range.js +168 -203
- package/dist/components/atoms/filter/filter.d.ts +0 -6
- package/dist/components/atoms/filter/filter.js +76 -91
- package/dist/components/atoms/filter/index.d.ts +1 -1
- package/dist/components/atoms/filter-dropdown/filter-dropdown.d.ts +2 -208
- package/dist/components/atoms/filter-dropdown/filter-dropdown.js +160 -214
- package/dist/components/atoms/icon/icon-list.d.ts +0 -5
- package/dist/components/atoms/icon/icon-list.js +384 -394
- package/dist/components/atoms/icon/icon.d.ts +0 -29
- package/dist/components/atoms/index.d.ts +2 -3
- package/dist/components/atoms/label/index.d.ts +1 -1
- package/dist/components/atoms/link/link.d.ts +0 -20
- package/dist/components/atoms/multi-select/multi-select.d.ts +1 -1
- package/dist/components/atoms/multi-select/multi-select.js +6 -6
- package/dist/components/atoms/multi-values-field/multi-values-field.d.ts +0 -16
- package/dist/components/atoms/multi-values-field/multi-values-field.js +87 -109
- package/dist/components/atoms/multi-values-field/multi-values-field.types.d.ts +0 -81
- package/dist/components/atoms/otp-field/otp-field.d.ts +0 -32
- package/dist/components/atoms/password-field/password-field.d.ts +0 -23
- package/dist/components/atoms/password-field/password-field.js +1 -1
- package/dist/components/atoms/progress/progress.d.ts +0 -15
- package/dist/components/atoms/protected-field/protected-field.d.ts +0 -10
- package/dist/components/atoms/protected-field/protected-field.types.d.ts +0 -14
- package/dist/components/atoms/radio-group/radio-group-option.js +11 -11
- package/dist/components/atoms/radio-group/radio-group.d.ts +1 -50
- package/dist/components/atoms/radio-group/radio-group.js +12 -13
- package/dist/components/atoms/search-field/search-field.d.ts +0 -14
- package/dist/components/atoms/search-field/search-field.js +17 -17
- package/dist/components/atoms/search-field/search-field.types.d.ts +0 -57
- package/dist/components/atoms/select/index.d.ts +0 -2
- package/dist/components/atoms/select/select.d.ts +1 -83
- package/dist/components/atoms/select/select.js +21 -21
- package/dist/components/atoms/separator/separator.d.ts +0 -17
- package/dist/components/atoms/skeleton/index.d.ts +0 -9
- package/dist/components/atoms/switch/switch.d.ts +2 -56
- package/dist/components/atoms/switch/switch.js +32 -64
- package/dist/components/atoms/tabs/index.d.ts +0 -16
- package/dist/components/atoms/textarea/textarea.d.ts +0 -32
- package/dist/components/atoms/textarea/textarea.js +1 -1
- package/dist/components/atoms/time-picker/time-picker.d.ts +2 -73
- package/dist/components/atoms/time-picker/time-picker.js +3 -218
- package/dist/components/atoms/toaster/index.d.ts +0 -15
- package/dist/components/atoms/toggle-group/toggle-group.d.ts +1 -26
- package/dist/components/atoms/toggle-group/toggle-group.js +14 -15
- package/dist/components/atoms/tooltip/tooltip.d.ts +2 -53
- package/dist/components/atoms/typography/typography.d.ts +0 -18
- package/dist/components/molecules/breadcrumb/breadcrumb.d.ts +0 -50
- package/dist/components/molecules/breadcrumb/breadcrumb.js +17 -17
- package/dist/components/molecules/dialog-content/dialog-content.d.ts +0 -16
- package/dist/components/molecules/dialog-footer/dialog-footer.d.ts +0 -20
- package/dist/components/molecules/dialog-header/dialog-header.d.ts +0 -31
- package/dist/components/molecules/empty/empty-icon.js +6 -6
- package/dist/components/molecules/empty/empty.d.ts +1 -16
- package/dist/components/molecules/empty/empty.js +34 -37
- package/dist/components/molecules/highlight-banner/highlight-banner.d.ts +0 -17
- package/dist/components/molecules/pagination/pagination.d.ts +0 -49
- package/dist/components/organisms/data-table/components/cells/data-table-list-cell.d.ts +0 -41
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header-content.js +1 -1
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.js +18 -18
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header.d.ts +0 -18
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js +10 -10
- package/dist/components/organisms/data-table/components/data-table-body.d.ts +0 -18
- package/dist/components/organisms/data-table/components/data-table-header.d.ts +0 -12
- package/dist/components/organisms/data-table/components/data-table-header.js +7 -7
- package/dist/components/organisms/data-table/components/states/data-table-loading.d.ts +0 -24
- package/dist/components/organisms/data-table/components/states/data-table-loading.js +6 -6
- package/dist/components/organisms/data-table/data-table.d.ts +4 -133
- package/dist/components/organisms/data-table/data-table.js +100 -132
- package/dist/components/organisms/data-table/data-table.types.d.ts +26 -35
- package/dist/components/organisms/data-table/hooks/use-data-table-columns.js +41 -57
- package/dist/components/organisms/data-table/hooks/use-data-table-state.d.ts +2 -8
- package/dist/components/organisms/data-table/hooks/use-data-table-state.js +47 -82
- package/dist/components/organisms/data-table/utils/data-table-constants.d.ts +2 -8
- package/dist/components/organisms/data-table/utils/data-table-constants.js +10 -16
- package/dist/components/organisms/data-table/utils/data-table-styles.d.ts +0 -1652
- package/dist/components/organisms/data-table/utils/data-table-styles.js +14 -29
- package/dist/components/organisms/dialog/dialog.d.ts +1 -67
- package/dist/components/organisms/dialog/dialog.js +61 -78
- package/dist/components/organisms/index.d.ts +0 -2
- package/dist/components/organisms/sheet/sheet.d.ts +0 -69
- package/dist/components/organisms/sheet/sheet.js +33 -34
- package/dist/index.css +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +162 -173
- package/dist/vendor/shadcn/avatar.js +19 -19
- package/dist/vendor/shadcn/badge.js +15 -15
- package/dist/vendor/shadcn/card.js +7 -7
- package/dist/vendor/shadcn/date-picker.d.ts +2 -2
- package/dist/vendor/shadcn/date-picker.js +1 -1
- package/dist/vendor/shadcn/date-range-picker.d.ts +2 -2
- package/dist/vendor/shadcn/date-range-picker.js +1 -1
- package/dist/vendor/shadcn/dialog.js +2 -2
- package/dist/vendor/shadcn/input-group.js +17 -17
- package/dist/vendor/shadcn/input.js +7 -7
- package/dist/vendor/shadcn/popover.js +1 -1
- package/dist/vendor/shadcn/select.js +2 -2
- package/dist/vendor/shadcn/sonner.d.ts +1 -26
- package/dist/vendor/shadcn/sonner.js +8 -12
- package/dist/vendor/shadcn/table.js +30 -30
- package/dist/vendor/shadcn/textarea.js +9 -9
- package/dist/vendor/shadcn/time-picker.d.ts +2 -1
- package/dist/vendor/shadcn/time-picker.js +23 -17
- package/dist/vendor/shadcn/toggle.js +13 -13
- package/dist/vendor/shadcn/tooltip.js +15 -25
- package/package.json +1 -1
- package/dist/components/atoms/icon/aida-logo.d.ts +0 -3
- package/dist/components/atoms/icon/aida-logo.js +0 -64
- package/dist/components/atoms/label/label.d.ts +0 -11
- package/dist/components/atoms/label/label.js +0 -28
- package/dist/components/atoms/loading/index.d.ts +0 -1
- package/dist/components/atoms/loading/loading.d.ts +0 -39
- package/dist/components/atoms/loading/loading.js +0 -37
- package/dist/components/atoms/select/search-select.d.ts +0 -22
- package/dist/components/atoms/select/search-select.js +0 -201
- package/dist/components/organisms/tutorial/index.d.ts +0 -2
- package/dist/components/organisms/tutorial/tutorial.d.ts +0 -16
- package/dist/components/organisms/tutorial/tutorial.js +0 -114
- package/dist/components/organisms/tutorial/tutorial.types.d.ts +0 -15
- package/dist/hooks/index.d.ts +0 -3
- package/dist/hooks/use-body-scroll-lock.d.ts +0 -13
- package/dist/hooks/use-escape-key.d.ts +0 -14
- package/dist/hooks/use-media-query.d.ts +0 -20
- package/dist/hooks/use-media-query.js +0 -21
- package/dist/lib/notification-alert.d.ts +0 -42
- package/dist/lib/notification-alert.js +0 -75
- package/dist/node_modules/@phosphor-icons/react/dist/csr/File.es.js +0 -8
- package/dist/node_modules/@phosphor-icons/react/dist/csr/Microphone.es.js +0 -8
- package/dist/node_modules/@phosphor-icons/react/dist/csr/Stop.es.js +0 -8
- package/dist/node_modules/@phosphor-icons/react/dist/csr/Table.es.js +0 -8
- package/dist/node_modules/@phosphor-icons/react/dist/defs/File.es.js +0 -30
- package/dist/node_modules/@phosphor-icons/react/dist/defs/Microphone.es.js +0 -36
- package/dist/node_modules/@phosphor-icons/react/dist/defs/Stop.es.js +0 -36
- package/dist/node_modules/@phosphor-icons/react/dist/defs/Table.es.js +0 -30
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e } from "../../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { DropdownMenuContent as g, DropdownMenuItem as n, DropdownMenuSeparator as o } from "../../../../atoms/dropdown-menu/dropdown-menu.js";
|
|
3
|
+
import { Icon as i } from "../../../../atoms/icon/icon.js";
|
|
4
4
|
function p({
|
|
5
5
|
column: s,
|
|
6
6
|
isLastVisibleColumn: r,
|
|
@@ -9,63 +9,63 @@ function p({
|
|
|
9
9
|
const l = s.getCanSort(), d = s.getCanPin(), x = s.getCanHide(), t = s.getIsPinned(), c = s.getIsSorted();
|
|
10
10
|
return /* @__PURE__ */ e.jsxs(g, { align: "start", children: [
|
|
11
11
|
l && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
12
|
-
/* @__PURE__ */ e.jsxs(
|
|
13
|
-
/* @__PURE__ */ e.jsx(
|
|
12
|
+
/* @__PURE__ */ e.jsxs(n, { onClick: () => s.toggleSorting(!1), children: [
|
|
13
|
+
/* @__PURE__ */ e.jsx(i, { name: "ArrowUp", size: "sm" }),
|
|
14
14
|
"Ascending"
|
|
15
15
|
] }),
|
|
16
|
-
/* @__PURE__ */ e.jsxs(
|
|
17
|
-
/* @__PURE__ */ e.jsx(
|
|
16
|
+
/* @__PURE__ */ e.jsxs(n, { onClick: () => s.toggleSorting(!0), children: [
|
|
17
|
+
/* @__PURE__ */ e.jsx(i, { name: "ArrowDown", size: "sm" }),
|
|
18
18
|
"Descending"
|
|
19
19
|
] }),
|
|
20
|
-
c && /* @__PURE__ */ e.jsxs(
|
|
21
|
-
/* @__PURE__ */ e.jsx(
|
|
20
|
+
c && /* @__PURE__ */ e.jsxs(n, { onClick: () => s.clearSorting(), children: [
|
|
21
|
+
/* @__PURE__ */ e.jsx(i, { name: "X", size: "sm" }),
|
|
22
22
|
"Clear sorting"
|
|
23
23
|
] }),
|
|
24
24
|
/* @__PURE__ */ e.jsx(o, {})
|
|
25
25
|
] }),
|
|
26
26
|
d && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
27
27
|
/* @__PURE__ */ e.jsxs(
|
|
28
|
-
|
|
28
|
+
n,
|
|
29
29
|
{
|
|
30
30
|
onClick: () => s.pin("left"),
|
|
31
31
|
disabled: t === "left",
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */ e.jsx(
|
|
33
|
+
/* @__PURE__ */ e.jsx(i, { name: "PushPinSimple", size: "sm" }),
|
|
34
34
|
"Pin to the left"
|
|
35
35
|
]
|
|
36
36
|
}
|
|
37
37
|
),
|
|
38
38
|
/* @__PURE__ */ e.jsxs(
|
|
39
|
-
|
|
39
|
+
n,
|
|
40
40
|
{
|
|
41
41
|
onClick: () => s.pin("right"),
|
|
42
42
|
disabled: t === "right",
|
|
43
43
|
children: [
|
|
44
|
-
/* @__PURE__ */ e.jsx(
|
|
44
|
+
/* @__PURE__ */ e.jsx(i, { name: "PushPinSimple", size: "sm" }),
|
|
45
45
|
"Pin to the right"
|
|
46
46
|
]
|
|
47
47
|
}
|
|
48
48
|
),
|
|
49
|
-
t && /* @__PURE__ */ e.jsxs(
|
|
50
|
-
/* @__PURE__ */ e.jsx(
|
|
49
|
+
t && /* @__PURE__ */ e.jsxs(n, { onClick: () => s.pin(!1), children: [
|
|
50
|
+
/* @__PURE__ */ e.jsx(i, { name: "PushPinSimpleSlash", size: "sm" }),
|
|
51
51
|
"Unpin"
|
|
52
52
|
] }),
|
|
53
53
|
/* @__PURE__ */ e.jsx(o, {})
|
|
54
54
|
] }),
|
|
55
55
|
x && /* @__PURE__ */ e.jsxs(
|
|
56
|
-
|
|
56
|
+
n,
|
|
57
57
|
{
|
|
58
58
|
onClick: () => s.toggleVisibility(!1),
|
|
59
59
|
disabled: r,
|
|
60
60
|
children: [
|
|
61
|
-
/* @__PURE__ */ e.jsx(
|
|
61
|
+
/* @__PURE__ */ e.jsx(i, { name: "EyeSlash", size: "sm" }),
|
|
62
62
|
"Hide",
|
|
63
63
|
r && /* @__PURE__ */ e.jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: "(Last column)" })
|
|
64
64
|
]
|
|
65
65
|
}
|
|
66
66
|
),
|
|
67
|
-
/* @__PURE__ */ e.jsxs(
|
|
68
|
-
/* @__PURE__ */ e.jsx(
|
|
67
|
+
/* @__PURE__ */ e.jsxs(n, { onClick: a, children: [
|
|
68
|
+
/* @__PURE__ */ e.jsx(i, { name: "Columns", size: "sm" }),
|
|
69
69
|
"Manage columns"
|
|
70
70
|
] })
|
|
71
71
|
] });
|
package/dist/components/organisms/data-table/components/column-header/data-table-column-header.d.ts
CHANGED
|
@@ -1,27 +1,9 @@
|
|
|
1
1
|
import { Column, Table } from '@tanstack/react-table';
|
|
2
|
-
/**
|
|
3
|
-
* Props for the DataTableColumnHeader component
|
|
4
|
-
*/
|
|
5
2
|
interface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
/**
|
|
7
|
-
* TanStack Table column instance
|
|
8
|
-
*/
|
|
9
3
|
column: Column<TData, TValue>;
|
|
10
|
-
/**
|
|
11
|
-
* TanStack Table instance
|
|
12
|
-
*/
|
|
13
4
|
table: Table<TData>;
|
|
14
|
-
/**
|
|
15
|
-
* Column header title text
|
|
16
|
-
*/
|
|
17
5
|
title: string;
|
|
18
|
-
/**
|
|
19
|
-
* Optional info/tooltip text
|
|
20
|
-
*/
|
|
21
6
|
info?: string;
|
|
22
7
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Column header component with sorting, pinning, and visibility controls
|
|
25
|
-
*/
|
|
26
8
|
export declare function DataTableColumnHeader<TData, TValue>({ column, table, title, className, info, }: DataTableColumnHeaderProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
27
9
|
export {};
|
package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as e } from "../../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { Icon as b } from "../../../../atoms/icon/icon.js";
|
|
3
2
|
import { cn as m } from "../../../../../lib/utils.js";
|
|
4
|
-
import { useColumnHeader as
|
|
5
|
-
import { DataTableColumnHeaderMenu as
|
|
6
|
-
import { DataTableManageColumnsDialog as
|
|
7
|
-
import { DataTableColumnHeaderContent as
|
|
3
|
+
import { useColumnHeader as b } from "../../hooks/use-column-header.js";
|
|
4
|
+
import { DataTableColumnHeaderMenu as D } from "./data-table-column-header-menu.js";
|
|
5
|
+
import { DataTableManageColumnsDialog as O } from "../dialogs/data-table-manage-columns-dialog.js";
|
|
6
|
+
import { DataTableColumnHeaderContent as v } from "./data-table-column-header-content.js";
|
|
7
|
+
import { Icon as H } from "../../../../atoms/icon/icon.js";
|
|
8
8
|
import { DropdownMenu as I } from "../../../../atoms/dropdown-menu/dropdown-menu.js";
|
|
9
9
|
function z({
|
|
10
10
|
column: o,
|
|
@@ -28,10 +28,10 @@ function z({
|
|
|
28
28
|
visibleColumnsCount: j,
|
|
29
29
|
isLastVisibleColumn: M,
|
|
30
30
|
handleManageColumnsClick: h
|
|
31
|
-
} =
|
|
31
|
+
} = b(o, l);
|
|
32
32
|
return !i && !x ? /* @__PURE__ */ e.jsxs("div", { className: m("flex items-center gap-2", a), children: [
|
|
33
33
|
n && /* @__PURE__ */ e.jsx(
|
|
34
|
-
|
|
34
|
+
H,
|
|
35
35
|
{
|
|
36
36
|
name: "Info",
|
|
37
37
|
size: "sm",
|
|
@@ -43,7 +43,7 @@ function z({
|
|
|
43
43
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
44
44
|
/* @__PURE__ */ e.jsx("div", { className: m("flex items-center gap-2", a), children: /* @__PURE__ */ e.jsxs(I, { open: t, onOpenChange: p, children: [
|
|
45
45
|
/* @__PURE__ */ e.jsx(
|
|
46
|
-
|
|
46
|
+
v,
|
|
47
47
|
{
|
|
48
48
|
title: s,
|
|
49
49
|
info: n,
|
|
@@ -57,7 +57,7 @@ function z({
|
|
|
57
57
|
}
|
|
58
58
|
),
|
|
59
59
|
/* @__PURE__ */ e.jsx(
|
|
60
|
-
|
|
60
|
+
D,
|
|
61
61
|
{
|
|
62
62
|
column: o,
|
|
63
63
|
isLastVisibleColumn: M,
|
|
@@ -66,7 +66,7 @@ function z({
|
|
|
66
66
|
)
|
|
67
67
|
] }) }),
|
|
68
68
|
/* @__PURE__ */ e.jsx(
|
|
69
|
-
|
|
69
|
+
O,
|
|
70
70
|
{
|
|
71
71
|
isOpen: d,
|
|
72
72
|
onOpenChange: C,
|
|
@@ -1,27 +1,9 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
|
-
/**
|
|
3
|
-
* Props for the DataTableBody component
|
|
4
|
-
*/
|
|
5
2
|
interface DataTableBodyProps<TData> {
|
|
6
|
-
/**
|
|
7
|
-
* TanStack Table instance
|
|
8
|
-
*/
|
|
9
3
|
table: Table<TData>;
|
|
10
|
-
/**
|
|
11
|
-
* Whether column resizing is enabled
|
|
12
|
-
*/
|
|
13
4
|
enableColumnResizing?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Callback fired when a row is clicked
|
|
16
|
-
*/
|
|
17
5
|
onRowClick?: (row: TData) => void;
|
|
18
|
-
/**
|
|
19
|
-
* Fixed height for each row in pixels
|
|
20
|
-
*/
|
|
21
6
|
rowHeight?: number;
|
|
22
7
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Table body component that renders data rows
|
|
25
|
-
*/
|
|
26
8
|
export declare function DataTableBody<TData>({ table, enableColumnResizing, onRowClick, rowHeight, }: DataTableBodyProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
27
9
|
export {};
|
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
|
-
/**
|
|
3
|
-
* Props for the DataTableHeader component
|
|
4
|
-
*/
|
|
5
2
|
interface DataTableHeaderProps<TData> {
|
|
6
|
-
/**
|
|
7
|
-
* TanStack Table instance
|
|
8
|
-
*/
|
|
9
3
|
table: Table<TData>;
|
|
10
|
-
/**
|
|
11
|
-
* Whether column resizing is enabled
|
|
12
|
-
*/
|
|
13
4
|
enableColumnResizing?: boolean;
|
|
14
5
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Renders the table header with sortable and resizable columns
|
|
17
|
-
*/
|
|
18
6
|
export declare function DataTableHeader<TData>({ table, enableColumnResizing, }: DataTableHeaderProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
19
7
|
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as e } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { TableHeader as
|
|
3
|
-
import { DataTableHeaderCell as
|
|
2
|
+
import { TableHeader as t, TableRow as i } from "../../../../vendor/shadcn/table.js";
|
|
3
|
+
import { DataTableHeaderCell as m } from "./cells/data-table-header-cell.js";
|
|
4
4
|
function p({
|
|
5
|
-
table:
|
|
6
|
-
enableColumnResizing:
|
|
5
|
+
table: l,
|
|
6
|
+
enableColumnResizing: s
|
|
7
7
|
}) {
|
|
8
|
-
return /* @__PURE__ */ e.jsx(
|
|
9
|
-
|
|
8
|
+
return /* @__PURE__ */ e.jsx(t, { children: l.getHeaderGroups().map((a) => /* @__PURE__ */ e.jsx(i, { className: "bg-neutral-50", children: a.headers.map((r) => /* @__PURE__ */ e.jsx(
|
|
9
|
+
m,
|
|
10
10
|
{
|
|
11
11
|
header: r,
|
|
12
|
-
enableColumnResizing:
|
|
12
|
+
enableColumnResizing: s ?? !1
|
|
13
13
|
},
|
|
14
14
|
r.id
|
|
15
15
|
)) }, a.id)) });
|
|
@@ -1,34 +1,10 @@
|
|
|
1
1
|
import { DataTableColumnDef, DataTableActionsConfig } from '../../data-table.types';
|
|
2
|
-
/**
|
|
3
|
-
* Props for the DataTableLoading component
|
|
4
|
-
*/
|
|
5
2
|
interface DataTableLoadingProps<TData, TValue = unknown> {
|
|
6
|
-
/**
|
|
7
|
-
* Column definitions to determine header structure
|
|
8
|
-
*/
|
|
9
3
|
columns: DataTableColumnDef<TData, TValue>[];
|
|
10
|
-
/**
|
|
11
|
-
* Number of skeleton rows to display
|
|
12
|
-
* @default 5
|
|
13
|
-
*/
|
|
14
4
|
rowsCount?: number;
|
|
15
|
-
/**
|
|
16
|
-
* Whether checkbox selection column is enabled
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
5
|
checkboxSelection?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Actions configuration to determine if actions column should be shown
|
|
22
|
-
*/
|
|
23
6
|
actions?: DataTableActionsConfig<TData>;
|
|
24
|
-
/**
|
|
25
|
-
* Fixed height for each skeleton row in pixels
|
|
26
|
-
*/
|
|
27
7
|
rowHeight?: number;
|
|
28
8
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Loading state component for DataTable showing skeleton rows
|
|
31
|
-
* Displays a table structure with skeleton loaders matching the expected column layout
|
|
32
|
-
*/
|
|
33
9
|
export declare function DataTableLoading<TData, TValue = unknown>({ columns, rowsCount, checkboxSelection, actions, rowHeight, }: DataTableLoadingProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
34
10
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as e } from "../../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { Table as u, TableHeader as
|
|
2
|
+
import { Table as u, TableHeader as x, TableRow as a, TableHead as f, TableBody as p, TableCell as h } from "../../../../../vendor/shadcn/table.js";
|
|
3
3
|
import { Skeleton as o } from "../../../../../vendor/shadcn/skeleton.js";
|
|
4
4
|
function j(s) {
|
|
5
5
|
return typeof s == "object" && s !== null && "title" in s && typeof s.title == "string";
|
|
@@ -13,20 +13,20 @@ function v({
|
|
|
13
13
|
rowsCount: l = 5,
|
|
14
14
|
checkboxSelection: c = !1,
|
|
15
15
|
actions: d,
|
|
16
|
-
rowHeight:
|
|
16
|
+
rowHeight: i
|
|
17
17
|
}) {
|
|
18
18
|
const n = [];
|
|
19
19
|
return c && n.push(null), s.forEach((r) => {
|
|
20
20
|
n.push(b(r));
|
|
21
21
|
}), d && n.push("Actions"), /* @__PURE__ */ e.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ e.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ e.jsxs(u, { children: [
|
|
22
|
-
/* @__PURE__ */ e.jsx(
|
|
23
|
-
/* @__PURE__ */ e.jsx(p, { children: Array.from({ length: l }).map((r,
|
|
22
|
+
/* @__PURE__ */ e.jsx(x, { children: /* @__PURE__ */ e.jsx(a, { className: "bg-neutral-50", children: n.map((r, t) => /* @__PURE__ */ e.jsx(f, { children: r ? /* @__PURE__ */ e.jsx("div", { className: "text-xs font-medium", children: r }) : /* @__PURE__ */ e.jsx(o, { className: "h-4 w-4" }) }, t)) }) }),
|
|
23
|
+
/* @__PURE__ */ e.jsx(p, { children: Array.from({ length: l }).map((r, t) => /* @__PURE__ */ e.jsx(
|
|
24
24
|
a,
|
|
25
25
|
{
|
|
26
|
-
style: { height:
|
|
26
|
+
style: { height: i ? `${i}px` : void 0 },
|
|
27
27
|
children: n.map((T, m) => /* @__PURE__ */ e.jsx(h, { children: /* @__PURE__ */ e.jsx(o, { className: "h-4 w-[80px]" }) }, m))
|
|
28
28
|
},
|
|
29
|
-
|
|
29
|
+
t
|
|
30
30
|
)) })
|
|
31
31
|
] }) }) });
|
|
32
32
|
}
|
|
@@ -1,151 +1,22 @@
|
|
|
1
1
|
import { ColumnResizeMode } from '@tanstack/react-table';
|
|
2
|
-
import { DataTableActionsConfig, DataTableColumnDef } from './data-table.types';
|
|
3
|
-
import { EmptyProps } from '../../molecules';
|
|
4
|
-
/**
|
|
5
|
-
* Props for the DataTable component
|
|
6
|
-
*/
|
|
2
|
+
import { DataTableActionsConfig, DataTableColumnDef, DataTableEmptyConfig } from './data-table.types';
|
|
7
3
|
export interface DataTableProps<TData, TValue> {
|
|
8
|
-
/**
|
|
9
|
-
* Column definitions for the table
|
|
10
|
-
*/
|
|
11
4
|
columns: DataTableColumnDef<TData, TValue>[];
|
|
12
|
-
/**
|
|
13
|
-
* Array of data to display in the table
|
|
14
|
-
*/
|
|
15
5
|
data: TData[];
|
|
16
|
-
/**
|
|
17
|
-
* Whether the table is in a loading state
|
|
18
|
-
* @default false
|
|
19
|
-
*/
|
|
20
6
|
isLoading?: boolean;
|
|
21
|
-
|
|
22
|
-
* Configuration for the empty state when no data is available
|
|
23
|
-
*/
|
|
24
|
-
empty?: EmptyProps;
|
|
25
|
-
/**
|
|
26
|
-
* Whether to enable checkbox selection column
|
|
27
|
-
* @default false
|
|
28
|
-
*/
|
|
7
|
+
empty?: DataTableEmptyConfig;
|
|
29
8
|
checkboxSelection?: boolean;
|
|
30
|
-
|
|
31
|
-
* Controlled row selection state (optional)
|
|
32
|
-
* If provided, component operates in controlled mode
|
|
33
|
-
*/
|
|
34
|
-
rowSelection?: import('@tanstack/react-table').RowSelectionState;
|
|
35
|
-
/**
|
|
36
|
-
* Callback fired when row selection changes
|
|
37
|
-
* In controlled mode, you must update the rowSelection prop
|
|
38
|
-
*/
|
|
39
|
-
onRowSelectionChange?: (rowSelectionState: import('@tanstack/react-table').RowSelectionState, selectedRows: TData[]) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Whether to enable column sorting
|
|
42
|
-
* @default true
|
|
43
|
-
*/
|
|
9
|
+
onRowSelectionChange?: (selectedRows: TData[]) => void;
|
|
44
10
|
enableSorting?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Whether sorting is handled manually (server-side)
|
|
47
|
-
* @default false
|
|
48
|
-
*/
|
|
49
11
|
manualSorting?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Controlled sorting state (optional)
|
|
52
|
-
* If provided, component operates in controlled mode
|
|
53
|
-
*/
|
|
54
|
-
sorting?: import('@tanstack/react-table').SortingState;
|
|
55
|
-
/**
|
|
56
|
-
* Callback when sorting changes (required for controlled mode)
|
|
57
|
-
*/
|
|
58
|
-
onSortingChange?: (sorting: import('@tanstack/react-table').SortingState) => void;
|
|
59
|
-
/**
|
|
60
|
-
* Whether to enable column filtering
|
|
61
|
-
* @default false
|
|
62
|
-
*/
|
|
63
12
|
enableColumnFilters?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Whether to enable column resizing
|
|
66
|
-
* @default true
|
|
67
|
-
*/
|
|
68
13
|
enableColumnResizing?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Column resize mode: 'onChange' or 'onEnd'
|
|
71
|
-
* @default 'onChange'
|
|
72
|
-
*/
|
|
73
14
|
columnResizeMode?: ColumnResizeMode;
|
|
74
|
-
/**
|
|
75
|
-
* Whether to enable column pinning
|
|
76
|
-
* @default true
|
|
77
|
-
*/
|
|
78
|
-
enableColumnPinning?: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Callback fired when a row is clicked
|
|
81
|
-
*/
|
|
82
15
|
onRowClick?: (row: TData) => void;
|
|
83
|
-
/**
|
|
84
|
-
* Configuration for actions column (always pinned to the right)
|
|
85
|
-
*/
|
|
86
16
|
actions?: DataTableActionsConfig<TData>;
|
|
87
|
-
/**
|
|
88
|
-
* Fixed height for the table container
|
|
89
|
-
*/
|
|
90
17
|
height?: string | number;
|
|
91
|
-
/**
|
|
92
|
-
* Height for each row in pixels
|
|
93
|
-
* @default 52
|
|
94
|
-
*/
|
|
95
18
|
rowHeight?: number;
|
|
96
|
-
/**
|
|
97
|
-
* Additional CSS classes for the container
|
|
98
|
-
*/
|
|
99
19
|
className?: string;
|
|
100
|
-
/**
|
|
101
|
-
* Unique key for persisting table state in localStorage
|
|
102
|
-
*/
|
|
103
20
|
persistKey?: string;
|
|
104
|
-
/**
|
|
105
|
-
* Initial settings to load (from backend/profile)
|
|
106
|
-
* Takes precedence over localStorage
|
|
107
|
-
*/
|
|
108
|
-
initialSettings?: import('./data-table.types').DataTableSettings;
|
|
109
|
-
/**
|
|
110
|
-
* Callback when table settings change (for syncing to backend)
|
|
111
|
-
*/
|
|
112
|
-
onUpdate?: (settings: import('./data-table.types').DataTableSettings) => void;
|
|
113
21
|
}
|
|
114
|
-
|
|
115
|
-
* Advanced data table component built on TanStack Table.
|
|
116
|
-
* Features sorting, filtering, column resizing, row selection, and loading/empty states.
|
|
117
|
-
* Supports column pinning, visibility control, and state persistence.
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* ```tsx
|
|
121
|
-
* // Uncontrolled selection
|
|
122
|
-
* <DataTable
|
|
123
|
-
* columns={[
|
|
124
|
-
* { accessorKey: 'name', header: 'Name' },
|
|
125
|
-
* { accessorKey: 'email', header: 'Email' }
|
|
126
|
-
* ]}
|
|
127
|
-
* data={users}
|
|
128
|
-
* checkboxSelection
|
|
129
|
-
* onRowSelectionChange={(rowSelectionState, selectedRows) => {
|
|
130
|
-
* console.log('Selected rows:', selectedRows);
|
|
131
|
-
* }}
|
|
132
|
-
* actions={{
|
|
133
|
-
* items: [{ label: 'Edit', onClick: (row) => editUser(row) }]
|
|
134
|
-
* }}
|
|
135
|
-
* />
|
|
136
|
-
*
|
|
137
|
-
* // Controlled selection
|
|
138
|
-
* const [rowSelection, setRowSelection] = useState({});
|
|
139
|
-
* <DataTable
|
|
140
|
-
* columns={columns}
|
|
141
|
-
* data={users}
|
|
142
|
-
* checkboxSelection
|
|
143
|
-
* rowSelection={rowSelection}
|
|
144
|
-
* onRowSelectionChange={(newRowSelection, selectedRows) => {
|
|
145
|
-
* setRowSelection(newRowSelection);
|
|
146
|
-
* console.log('Selected rows:', selectedRows);
|
|
147
|
-
* }}
|
|
148
|
-
* />
|
|
149
|
-
* ```
|
|
150
|
-
*/
|
|
151
|
-
export declare function DataTable<TData, TValue>({ columns, data, isLoading, empty, checkboxSelection, rowSelection: externalRowSelection, onRowSelectionChange, enableSorting, manualSorting, sorting: externalSorting, onSortingChange: externalOnSortingChange, enableColumnFilters, enableColumnResizing, columnResizeMode, enableColumnPinning, onRowClick, actions, height, rowHeight, className, persistKey, initialSettings, onUpdate, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function DataTable<TData, TValue>({ columns, data, isLoading, empty, checkboxSelection, onRowSelectionChange, enableSorting, manualSorting, enableColumnFilters, enableColumnResizing, columnResizeMode, onRowClick, actions, height, rowHeight, className, persistKey, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|