@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,109 +1,74 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
function
|
|
3
|
-
persistKey:
|
|
4
|
-
hasActions:
|
|
5
|
-
externalSorting: P,
|
|
6
|
-
onExternalSortingChange: l,
|
|
7
|
-
externalRowSelection: y,
|
|
8
|
-
initialSettings: o,
|
|
9
|
-
onUpdate: m
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
function V({
|
|
3
|
+
persistKey: i,
|
|
4
|
+
hasActions: l = !1
|
|
10
5
|
}) {
|
|
11
|
-
const [
|
|
6
|
+
const [g, m] = e.useState([]), [S, b] = e.useState(
|
|
12
7
|
[]
|
|
13
|
-
), [
|
|
8
|
+
), [r, c] = e.useState({}), [h, P] = e.useState({}), [a, s] = e.useState({
|
|
14
9
|
left: [],
|
|
15
|
-
right:
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
o.hide?.forEach((t) => {
|
|
22
|
-
e[t] = !1;
|
|
23
|
-
}), d(e);
|
|
24
|
-
}
|
|
25
|
-
o.pinnedColumns && g({
|
|
26
|
-
left: o.pinnedColumns.left || [],
|
|
27
|
-
right: [
|
|
28
|
-
...(o.pinnedColumns.right || []).filter(
|
|
29
|
-
(e) => e !== "actions"
|
|
30
|
-
),
|
|
31
|
-
...s ? ["actions"] : []
|
|
32
|
-
]
|
|
33
|
-
}), !l && o.sorting && a(o.sorting);
|
|
34
|
-
}
|
|
35
|
-
}, [o, s, l]), i.useEffect(() => {
|
|
36
|
-
if (!r) return;
|
|
37
|
-
const e = localStorage.getItem(`datatable-${r}`);
|
|
38
|
-
if (e)
|
|
10
|
+
right: l ? ["actions"] : []
|
|
11
|
+
});
|
|
12
|
+
e.useEffect(() => {
|
|
13
|
+
if (!i) return;
|
|
14
|
+
const n = localStorage.getItem(`datatable-${i}`);
|
|
15
|
+
if (n)
|
|
39
16
|
try {
|
|
40
|
-
const t = JSON.parse(
|
|
41
|
-
t.columnVisibility &&
|
|
17
|
+
const t = JSON.parse(n);
|
|
18
|
+
t.columnVisibility && c(t.columnVisibility), t.columnPinning && s({
|
|
42
19
|
left: t.columnPinning.left || [],
|
|
43
20
|
right: [
|
|
44
21
|
...(t.columnPinning.right || []).filter(
|
|
45
|
-
(
|
|
22
|
+
(o) => o !== "actions"
|
|
46
23
|
),
|
|
47
|
-
...
|
|
24
|
+
...l ? ["actions"] : []
|
|
48
25
|
]
|
|
49
|
-
})
|
|
26
|
+
});
|
|
50
27
|
} catch (t) {
|
|
51
28
|
console.error("Failed to load table state", t);
|
|
52
29
|
}
|
|
53
|
-
}, [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
right: f.right || []
|
|
59
|
-
},
|
|
60
|
-
// Only include sorting if not controlled externally
|
|
61
|
-
...!l && c.length > 0 && { sorting: c }
|
|
30
|
+
}, [i, l]), e.useEffect(() => {
|
|
31
|
+
if (!i) return;
|
|
32
|
+
const n = {
|
|
33
|
+
columnVisibility: r,
|
|
34
|
+
columnPinning: a
|
|
62
35
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}, [u, f, c, r, l, m]);
|
|
73
|
-
const J = i.useCallback(
|
|
74
|
-
(e) => {
|
|
75
|
-
g((t) => {
|
|
76
|
-
const n = typeof e == "function" ? e(t) : e, h = Array.isArray(n.left) ? n.left : [], b = Array.isArray(n.right) ? n.right : [];
|
|
77
|
-
if (s) {
|
|
78
|
-
const N = b.filter(
|
|
79
|
-
(S) => S !== "actions"
|
|
36
|
+
localStorage.setItem(`datatable-${i}`, JSON.stringify(n));
|
|
37
|
+
}, [r, a, i]);
|
|
38
|
+
const d = e.useCallback(
|
|
39
|
+
(n) => {
|
|
40
|
+
s((t) => {
|
|
41
|
+
const o = typeof n == "function" ? n(t) : n, u = Array.isArray(o.left) ? o.left : [], f = Array.isArray(o.right) ? o.right : [];
|
|
42
|
+
if (l) {
|
|
43
|
+
const y = f.filter(
|
|
44
|
+
(C) => C !== "actions"
|
|
80
45
|
);
|
|
81
46
|
return {
|
|
82
|
-
left:
|
|
83
|
-
right: [...
|
|
47
|
+
left: u,
|
|
48
|
+
right: [...y, "actions"]
|
|
84
49
|
};
|
|
85
50
|
}
|
|
86
51
|
return {
|
|
87
|
-
left:
|
|
88
|
-
right:
|
|
52
|
+
left: u,
|
|
53
|
+
right: f
|
|
89
54
|
};
|
|
90
55
|
});
|
|
91
56
|
},
|
|
92
|
-
[
|
|
57
|
+
[l]
|
|
93
58
|
);
|
|
94
59
|
return {
|
|
95
|
-
sorting:
|
|
96
|
-
setSorting:
|
|
97
|
-
columnFilters:
|
|
98
|
-
setColumnFilters:
|
|
99
|
-
columnVisibility:
|
|
100
|
-
setColumnVisibility:
|
|
101
|
-
rowSelection:
|
|
102
|
-
setRowSelection:
|
|
103
|
-
columnPinning:
|
|
104
|
-
handleColumnPinningChange:
|
|
60
|
+
sorting: g,
|
|
61
|
+
setSorting: m,
|
|
62
|
+
columnFilters: S,
|
|
63
|
+
setColumnFilters: b,
|
|
64
|
+
columnVisibility: r,
|
|
65
|
+
setColumnVisibility: c,
|
|
66
|
+
rowSelection: h,
|
|
67
|
+
setRowSelection: P,
|
|
68
|
+
columnPinning: a,
|
|
69
|
+
handleColumnPinningChange: d
|
|
105
70
|
};
|
|
106
71
|
}
|
|
107
72
|
export {
|
|
108
|
-
|
|
73
|
+
V as useDataTableState
|
|
109
74
|
};
|
|
@@ -10,20 +10,14 @@ export declare const RESIZE_HANDLE_CONFIG: {
|
|
|
10
10
|
readonly lineHeight: "h-5";
|
|
11
11
|
readonly lineWidth: "w-[1px]";
|
|
12
12
|
};
|
|
13
|
-
export declare const CHECKBOX_COLUMN_CONFIG: {
|
|
14
|
-
readonly size: 50;
|
|
15
|
-
readonly minSize: 50;
|
|
16
|
-
readonly maxSize: 50;
|
|
17
|
-
};
|
|
18
13
|
export declare const ACTIONS_COLUMN_CONFIG: {
|
|
19
14
|
readonly size: 50;
|
|
20
15
|
readonly minSize: 50;
|
|
21
16
|
readonly maxSize: 50;
|
|
22
17
|
};
|
|
23
18
|
export declare const CELL_BACKGROUND_COLORS: {
|
|
24
|
-
readonly header: "
|
|
25
|
-
readonly body: "
|
|
19
|
+
readonly header: "rgb(250 250 250)";
|
|
20
|
+
readonly body: "white";
|
|
26
21
|
};
|
|
27
22
|
export declare const ROW_HEIGHT_DEFAULT = 66;
|
|
28
|
-
export declare const COLUMN_MIN_SIZE_DEFAULT = 50;
|
|
29
23
|
export declare const PINNED_SHADOW_CLASS = "shadow-[-4px_0_4px_-2px_rgba(0,0,0,0.1)]";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = {
|
|
2
2
|
height: "h-8",
|
|
3
3
|
gap: "gap-1.5",
|
|
4
4
|
roundedClass: "rounded-md",
|
|
@@ -8,25 +8,19 @@ const _ = {
|
|
|
8
8
|
width: "w-2",
|
|
9
9
|
lineHeight: "h-5",
|
|
10
10
|
lineWidth: "w-[1px]"
|
|
11
|
-
},
|
|
11
|
+
}, _ = {
|
|
12
12
|
size: 50,
|
|
13
13
|
minSize: 50,
|
|
14
14
|
maxSize: 50
|
|
15
15
|
}, i = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, n = {
|
|
20
|
-
header: "hsl(var(--sidebar))",
|
|
21
|
-
body: "hsl(var(--background))"
|
|
22
|
-
}, o = 66, s = 50, C = "shadow-[-4px_0_4px_-2px_rgba(0,0,0,0.1)]";
|
|
16
|
+
header: "rgb(250 250 250)",
|
|
17
|
+
body: "white"
|
|
18
|
+
}, n = 66, o = "shadow-[-4px_0_4px_-2px_rgba(0,0,0,0.1)]";
|
|
23
19
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
t as
|
|
27
|
-
|
|
28
|
-
s as COLUMN_MIN_SIZE_DEFAULT,
|
|
29
|
-
C as PINNED_SHADOW_CLASS,
|
|
20
|
+
_ as ACTIONS_COLUMN_CONFIG,
|
|
21
|
+
i as CELL_BACKGROUND_COLORS,
|
|
22
|
+
t as COLUMN_HEADER_CONFIG,
|
|
23
|
+
o as PINNED_SHADOW_CLASS,
|
|
30
24
|
e as RESIZE_HANDLE_CONFIG,
|
|
31
|
-
|
|
25
|
+
n as ROW_HEIGHT_DEFAULT
|
|
32
26
|
};
|