@devalok/shilp-sutra 0.34.0 → 0.34.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/badge-group.js +306 -246
- package/dist/_chunks/chat.js +513 -0
- package/dist/_chunks/date-picker.js +748 -0
- package/dist/_chunks/document-preview.js +109 -90
- package/dist/_chunks/file-preview.js +492 -504
- package/dist/_chunks/framer.js +5564 -5613
- package/dist/_chunks/image-preview.js +127 -88
- package/dist/_chunks/keybinding.js +12 -14
- package/dist/_chunks/link-context.js +19 -16
- package/dist/_chunks/mention-suggestion.js +353 -350
- package/dist/_chunks/motion-provider.js +26 -20
- package/dist/_chunks/popover.js +127 -0
- package/dist/_chunks/primitives.js +7584 -6425
- package/dist/_chunks/rich-chat-input.js +2070 -0
- package/dist/_chunks/rolldown-runtime.js +21 -0
- package/dist/_chunks/shared.js +126 -0
- package/dist/_chunks/sonner.js +605 -734
- package/dist/_chunks/stat-row.js +418 -440
- package/dist/_chunks/tiptap.js +15850 -19964
- package/dist/_chunks/tree-view.js +231 -290
- package/dist/_chunks/use-calendar.js +161 -208
- package/dist/_chunks/vendor-client.js +314 -2199
- package/dist/_chunks/vendor-utils.js +1721 -2978
- package/dist/ai/ai-command-provider.js +23 -17
- package/dist/ai/block-renderer.js +68 -51
- package/dist/ai/blocks/index.js +2 -12
- package/dist/ai/command-bar.js +470 -519
- package/dist/ai/conversation.js +241 -227
- package/dist/ai/index.js +181 -167
- package/dist/ai/types.js +0 -1
- package/dist/composed/activity-feed.js +232 -202
- package/dist/composed/avatar-group.js +164 -222
- package/dist/composed/bulk-action-bar.js +174 -165
- package/dist/composed/command-palette.js +290 -308
- package/dist/composed/confirm-dialog.js +28 -48
- package/dist/composed/content-card.js +69 -108
- package/dist/composed/date-picker/index.js +3 -13
- package/dist/composed/deadline-indicator.js +68 -74
- package/dist/composed/emoji-picker.js +83 -110
- package/dist/composed/empty-state.js +64 -103
- package/dist/composed/error-boundary.js +129 -127
- package/dist/composed/file-preview.js +2 -12
- package/dist/composed/filter-bar.js +98 -130
- package/dist/composed/form-section.js +61 -45
- package/dist/composed/global-loading.js +34 -47
- package/dist/composed/index.js +34 -92
- package/dist/composed/inline-edit.js +92 -107
- package/dist/composed/lib/string-utils.js +8 -8
- package/dist/composed/loading-skeleton.js +103 -171
- package/dist/composed/markdown-viewer.js +187 -139
- package/dist/composed/master-detail.js +147 -156
- package/dist/composed/member-picker.js +46 -49
- package/dist/composed/multi-select-popover.js +181 -179
- package/dist/composed/page-header.js +54 -76
- package/dist/composed/page-skeletons.js +143 -127
- package/dist/composed/priority-indicator.js +105 -111
- package/dist/composed/responsive-overlay.js +36 -41
- package/dist/composed/rich-chat-input.js +2 -1860
- package/dist/composed/rich-text-editor.js +561 -424
- package/dist/composed/schedule-view.js +134 -185
- package/dist/composed/simple-tooltip.js +21 -21
- package/dist/composed/status-badge.js +133 -137
- package/dist/hooks/index.js +7 -12
- package/dist/hooks/use-color-mode.js +28 -25
- package/dist/hooks/use-mobile.js +13 -13
- package/dist/hooks/use-toast.js +2 -4
- package/dist/hooks/use-touch-device.js +9 -11
- package/dist/hooks/use-viewport-height.js +14 -14
- package/dist/motion/index.js +3 -11
- package/dist/motion/primitives-index.js +226 -186
- package/dist/shell/app-command-palette.js +203 -234
- package/dist/shell/bottom-navbar.js +150 -190
- package/dist/shell/command-registry.js +13 -14
- package/dist/shell/index.js +10 -20
- package/dist/shell/link-context.js +2 -5
- package/dist/shell/notification-center.js +238 -259
- package/dist/shell/notification-preferences.js +241 -184
- package/dist/shell/sidebar.js +251 -281
- package/dist/shell/top-bar.js +203 -237
- package/dist/tailwind/index.cjs +426 -442
- package/dist/tailwind/index.js +2 -4
- package/dist/tailwind/preset.js +443 -459
- package/dist/ui/accordion.js +52 -60
- package/dist/ui/alert-dialog.js +111 -156
- package/dist/ui/alert.js +177 -99
- package/dist/ui/aspect-ratio.js +13 -16
- package/dist/ui/autocomplete.js +112 -148
- package/dist/ui/avatar.js +196 -169
- package/dist/ui/badge-group.js +2 -7
- package/dist/ui/badge-indicator.js +42 -51
- package/dist/ui/badge.js +2 -15
- package/dist/ui/banner.js +76 -68
- package/dist/ui/breadcrumb.js +65 -84
- package/dist/ui/button-group.js +109 -102
- package/dist/ui/button-processing.js +69 -73
- package/dist/ui/button.js +393 -279
- package/dist/ui/card.js +151 -157
- package/dist/ui/charts/index.js +1002 -1319
- package/dist/ui/chat/index.js +2 -11
- package/dist/ui/checkbox.js +77 -100
- package/dist/ui/code.js +18 -32
- package/dist/ui/collapsible.js +21 -29
- package/dist/ui/color-input.js +453 -372
- package/dist/ui/color-swatch.js +60 -90
- package/dist/ui/combobox.js +244 -293
- package/dist/ui/container.js +18 -24
- package/dist/ui/context-menu.js +154 -203
- package/dist/ui/data-table-body.js +116 -213
- package/dist/ui/data-table-bulk-actions.js +43 -59
- package/dist/ui/data-table-card.js +84 -71
- package/dist/ui/data-table-context.js +39 -42
- package/dist/ui/data-table-header.js +98 -139
- package/dist/ui/data-table-pagination.js +69 -82
- package/dist/ui/data-table-toolbar.js +104 -130
- package/dist/ui/data-table.js +278 -354
- package/dist/ui/devalok-grain.js +77 -66
- package/dist/ui/dialog.js +122 -151
- package/dist/ui/dropdown-menu.js +152 -203
- package/dist/ui/file-upload.js +242 -266
- package/dist/ui/form.js +60 -56
- package/dist/ui/hover-card.js +54 -54
- package/dist/ui/icon-button.js +21 -26
- package/dist/ui/icon-context.js +17 -17
- package/dist/ui/icon-group.js +22 -29
- package/dist/ui/icon.js +201 -121
- package/dist/ui/index.js +74 -350
- package/dist/ui/input-otp.js +44 -48
- package/dist/ui/input.js +92 -169
- package/dist/ui/label.js +17 -22
- package/dist/ui/lib/date-utils.js +14 -11
- package/dist/ui/lib/motion.js +77 -36
- package/dist/ui/lib/utils.js +39 -16
- package/dist/ui/link.js +13 -24
- package/dist/ui/menubar.js +132 -210
- package/dist/ui/navigation-menu.js +163 -193
- package/dist/ui/number-input.js +72 -95
- package/dist/ui/pagination.js +122 -159
- package/dist/ui/popover.js +2 -131
- package/dist/ui/progress-ring.js +133 -143
- package/dist/ui/progress.js +51 -95
- package/dist/ui/radio.js +41 -50
- package/dist/ui/search-input.js +51 -53
- package/dist/ui/segmented-control.js +93 -114
- package/dist/ui/select.js +131 -157
- package/dist/ui/separator.js +15 -25
- package/dist/ui/sheet.js +135 -163
- package/dist/ui/sidebar.js +357 -600
- package/dist/ui/skeleton.js +179 -231
- package/dist/ui/slider.js +24 -34
- package/dist/ui/spinner.js +226 -205
- package/dist/ui/split-button.js +227 -276
- package/dist/ui/stack.js +56 -70
- package/dist/ui/stat-card.js +259 -251
- package/dist/ui/status-dot.js +67 -63
- package/dist/ui/stepper.js +119 -168
- package/dist/ui/switch.js +51 -54
- package/dist/ui/table.js +57 -90
- package/dist/ui/tabs.js +139 -156
- package/dist/ui/text.js +52 -59
- package/dist/ui/textarea.js +40 -57
- package/dist/ui/toast-types.js +0 -1
- package/dist/ui/toast.js +554 -536
- package/dist/ui/toaster.js +23 -33
- package/dist/ui/toggle-group.js +37 -41
- package/dist/ui/toggle.js +36 -40
- package/dist/ui/tooltip.js +80 -65
- package/dist/ui/tree-view/index.js +2 -6
- package/dist/ui/visually-hidden.js +12 -10
- package/llms-full.txt +1 -1
- package/package.json +1 -1
- package/dist/_chunks/date-time-picker.js +0 -851
- package/dist/_chunks/typing-indicator.js +0 -565
|
@@ -1,48 +1,45 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import e from "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/ui/data-table-context.tsx
|
|
5
|
+
function n(e) {
|
|
6
|
+
if (!e) return "";
|
|
7
|
+
let t = [];
|
|
8
|
+
return e.align === "right" && t.push("text-right tabular-nums"), e.align === "center" && t.push("text-center"), e.hideBelow === "sm" && t.push("hidden sm:table-cell"), e.hideBelow === "md" && t.push("hidden md:table-cell"), e.hideBelow === "lg" && t.push("hidden lg:table-cell"), t.join(" ");
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
var r = {
|
|
11
|
+
compact: "py-ds-02",
|
|
12
|
+
standard: "py-ds-05",
|
|
13
|
+
comfortable: "py-ds-07"
|
|
14
|
+
}, i = "button, a, input, select, textarea, [role=\"checkbox\"]", a = e.createContext(null);
|
|
15
|
+
function o({ children: e, value: n }) {
|
|
16
|
+
return /* @__PURE__ */ t(a.Provider, {
|
|
17
|
+
value: n,
|
|
18
|
+
children: e
|
|
19
|
+
});
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
function s() {
|
|
22
|
+
let t = e.useContext(a);
|
|
23
|
+
if (!t) throw Error("useDataTableContext must be used within DataTableProvider");
|
|
24
|
+
return t;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
function c(e, t) {
|
|
27
|
+
let { left: n = [], right: r = [] } = t, i = n.indexOf(e), a = r.indexOf(e);
|
|
28
|
+
return i === -1 ? a === -1 ? {
|
|
29
|
+
className: "",
|
|
30
|
+
style: {}
|
|
31
|
+
} : {
|
|
32
|
+
className: "sticky bg-surface-base z-raised",
|
|
33
|
+
style: { right: 0 }
|
|
34
|
+
} : {
|
|
35
|
+
className: "sticky bg-surface-base z-raised",
|
|
36
|
+
style: { left: 0 }
|
|
37
|
+
};
|
|
34
38
|
}
|
|
35
|
-
function
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
function l(e, t, n) {
|
|
40
|
+
if (!t || e === "_select" || e === "_expand") return !1;
|
|
41
|
+
let r = n.getColumn(e);
|
|
42
|
+
return !(!r || r.columnDef.meta?.enableEditing === !1);
|
|
39
43
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
b as INTERACTIVE_SELECTOR,
|
|
43
|
-
d as densityPaddingMap,
|
|
44
|
-
f as getColumnMetaClasses,
|
|
45
|
-
g as getPinnedCellStyle,
|
|
46
|
-
p as isColumnEditable,
|
|
47
|
-
x as useDataTableContext
|
|
48
|
-
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { o as DataTableProvider, i as INTERACTIVE_SELECTOR, r as densityPaddingMap, n as getColumnMetaClasses, c as getPinnedCellStyle, l as isColumnEditable, s as useDataTableContext };
|
|
@@ -1,141 +1,100 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Icon as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
s,
|
|
99
|
-
{
|
|
100
|
-
icon: C,
|
|
101
|
-
size: "sm",
|
|
102
|
-
className: "text-surface-fg-subtle"
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
},
|
|
106
|
-
"unsorted"
|
|
107
|
-
) })
|
|
108
|
-
]
|
|
109
|
-
}
|
|
110
|
-
) : d(
|
|
111
|
-
e.column.columnDef.header,
|
|
112
|
-
e.getContext()
|
|
113
|
-
)
|
|
114
|
-
},
|
|
115
|
-
e.id
|
|
116
|
-
);
|
|
117
|
-
}) }, n.id)),
|
|
118
|
-
x && r.getHeaderGroups().map((n) => /* @__PURE__ */ t(p, { children: n.headers.map((e) => /* @__PURE__ */ t(f, { className: "py-ds-01", children: e.isPlaceholder || e.column.columnDef.enableColumnFilter === !1 ? null : /* @__PURE__ */ t(
|
|
119
|
-
"input",
|
|
120
|
-
{
|
|
121
|
-
type: "text",
|
|
122
|
-
value: e.column.getFilterValue() ?? "",
|
|
123
|
-
onChange: (o) => e.column.setFilterValue(o.target.value),
|
|
124
|
-
placeholder: `Filter ${typeof e.column.columnDef.header == "string" ? e.column.columnDef.header : ""}...`,
|
|
125
|
-
"aria-label": `Filter ${typeof e.column.columnDef.header == "string" ? e.column.columnDef.header : e.column.id}`,
|
|
126
|
-
className: a(
|
|
127
|
-
"h-ds-xs-plus w-full rounded-ds-md",
|
|
128
|
-
"border border-surface-border-strong bg-surface-raised-hover",
|
|
129
|
-
"px-ds-02 text-ds-sm",
|
|
130
|
-
"text-surface-fg placeholder:text-surface-fg-subtle",
|
|
131
|
-
"outline-hidden focus:border-accent-7"
|
|
132
|
-
)
|
|
133
|
-
}
|
|
134
|
-
) }, `${e.id}-filter`)) }, `${n.id}-filters`))
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
);
|
|
2
|
+
import { a as e, c as t } from "../_chunks/framer.js";
|
|
3
|
+
import { springs as n } from "./lib/motion.js";
|
|
4
|
+
import { cn as r } from "./lib/utils.js";
|
|
5
|
+
import { Icon as i } from "./icon.js";
|
|
6
|
+
import { TableHead as a, TableHeader as o, TableRow as s } from "./table.js";
|
|
7
|
+
import { getColumnMetaClasses as c, getPinnedCellStyle as l, useDataTableContext as u } from "./data-table-context.js";
|
|
8
|
+
import "react";
|
|
9
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
|
+
import { IconArrowDown as p, IconArrowUp as m, IconArrowsSort as h } from "@tabler/icons-react";
|
|
11
|
+
import { flexRender as g } from "@tanstack/react-table";
|
|
12
|
+
//#region src/ui/data-table-header.tsx
|
|
13
|
+
function _({ stickyHeader: _ }) {
|
|
14
|
+
let { table: v, sortable: y, filterable: b, columnPinningState: x } = u();
|
|
15
|
+
return /* @__PURE__ */ f(o, {
|
|
16
|
+
className: r(_ && "sticky top-0 z-10 bg-surface-base"),
|
|
17
|
+
children: [v.getHeaderGroups().map((o) => /* @__PURE__ */ d(s, { children: o.headers.map((o) => {
|
|
18
|
+
let s = y && o.column.getCanSort(), u = o.column.getIsSorted(), _ = l(o.column.id, x);
|
|
19
|
+
return /* @__PURE__ */ d(a, {
|
|
20
|
+
className: r(_.className, c(o.column.columnDef.meta)),
|
|
21
|
+
style: _.style,
|
|
22
|
+
"aria-sort": s ? u === "asc" ? "ascending" : u === "desc" ? "descending" : "none" : void 0,
|
|
23
|
+
children: o.isPlaceholder ? null : s ? /* @__PURE__ */ f("button", {
|
|
24
|
+
type: "button",
|
|
25
|
+
className: r("flex items-center gap-ds-01 font-medium", "cursor-pointer select-none", "-ml-ds-01 rounded-ds-sm px-ds-01 py-ds-01", "hover:bg-surface-raised transition-colors"),
|
|
26
|
+
onClick: o.column.getToggleSortingHandler(),
|
|
27
|
+
"aria-label": `Sort by ${typeof o.column.columnDef.header == "string" ? o.column.columnDef.header : o.column.id}`,
|
|
28
|
+
children: [g(o.column.columnDef.header, o.getContext()), /* @__PURE__ */ d(t, {
|
|
29
|
+
mode: "wait",
|
|
30
|
+
initial: !1,
|
|
31
|
+
children: u === "asc" ? /* @__PURE__ */ d(e.span, {
|
|
32
|
+
initial: {
|
|
33
|
+
opacity: 0,
|
|
34
|
+
rotate: 90
|
|
35
|
+
},
|
|
36
|
+
animate: {
|
|
37
|
+
opacity: 1,
|
|
38
|
+
rotate: 0
|
|
39
|
+
},
|
|
40
|
+
exit: {
|
|
41
|
+
opacity: 0,
|
|
42
|
+
rotate: -90
|
|
43
|
+
},
|
|
44
|
+
transition: n.snappy,
|
|
45
|
+
className: "inline-flex",
|
|
46
|
+
children: /* @__PURE__ */ d(i, {
|
|
47
|
+
icon: m,
|
|
48
|
+
size: "sm",
|
|
49
|
+
className: "text-surface-fg-muted"
|
|
50
|
+
})
|
|
51
|
+
}, "asc") : u === "desc" ? /* @__PURE__ */ d(e.span, {
|
|
52
|
+
initial: {
|
|
53
|
+
opacity: 0,
|
|
54
|
+
rotate: -90
|
|
55
|
+
},
|
|
56
|
+
animate: {
|
|
57
|
+
opacity: 1,
|
|
58
|
+
rotate: 0
|
|
59
|
+
},
|
|
60
|
+
exit: {
|
|
61
|
+
opacity: 0,
|
|
62
|
+
rotate: 90
|
|
63
|
+
},
|
|
64
|
+
transition: n.snappy,
|
|
65
|
+
className: "inline-flex",
|
|
66
|
+
children: /* @__PURE__ */ d(i, {
|
|
67
|
+
icon: p,
|
|
68
|
+
size: "sm",
|
|
69
|
+
className: "text-surface-fg-muted"
|
|
70
|
+
})
|
|
71
|
+
}, "desc") : /* @__PURE__ */ d(e.span, {
|
|
72
|
+
initial: { opacity: 0 },
|
|
73
|
+
animate: { opacity: 1 },
|
|
74
|
+
exit: { opacity: 0 },
|
|
75
|
+
transition: n.snappy,
|
|
76
|
+
className: "inline-flex",
|
|
77
|
+
children: /* @__PURE__ */ d(i, {
|
|
78
|
+
icon: h,
|
|
79
|
+
size: "sm",
|
|
80
|
+
className: "text-surface-fg-subtle"
|
|
81
|
+
})
|
|
82
|
+
}, "unsorted")
|
|
83
|
+
})]
|
|
84
|
+
}) : g(o.column.columnDef.header, o.getContext())
|
|
85
|
+
}, o.id);
|
|
86
|
+
}) }, o.id)), b && v.getHeaderGroups().map((e) => /* @__PURE__ */ d(s, { children: e.headers.map((e) => /* @__PURE__ */ d(a, {
|
|
87
|
+
className: "py-ds-01",
|
|
88
|
+
children: e.isPlaceholder || e.column.columnDef.enableColumnFilter === !1 ? null : /* @__PURE__ */ d("input", {
|
|
89
|
+
type: "text",
|
|
90
|
+
value: e.column.getFilterValue() ?? "",
|
|
91
|
+
onChange: (t) => e.column.setFilterValue(t.target.value),
|
|
92
|
+
placeholder: `Filter ${typeof e.column.columnDef.header == "string" ? e.column.columnDef.header : ""}...`,
|
|
93
|
+
"aria-label": `Filter ${typeof e.column.columnDef.header == "string" ? e.column.columnDef.header : e.column.id}`,
|
|
94
|
+
className: r("h-ds-xs-plus w-full rounded-ds-md", "border border-surface-border-strong bg-surface-raised-hover", "px-ds-02 text-ds-sm", "text-surface-fg placeholder:text-surface-fg-subtle", "outline-hidden focus:border-accent-7")
|
|
95
|
+
})
|
|
96
|
+
}, `${e.id}-filter`)) }, `${e.id}-filters`))]
|
|
97
|
+
});
|
|
138
98
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
};
|
|
99
|
+
//#endregion
|
|
100
|
+
export { _ as DataTableHeader };
|
|
@@ -1,84 +1,71 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
className: t(
|
|
70
|
-
"h-ds-sm w-ds-sm flex items-center justify-center",
|
|
71
|
-
"rounded-ds-md border border-surface-border-strong",
|
|
72
|
-
"enabled:hover:bg-surface-raised",
|
|
73
|
-
"disabled:opacity-action-disabled disabled:cursor-not-allowed",
|
|
74
|
-
"transition-colors"
|
|
75
|
-
),
|
|
76
|
-
children: /* @__PURE__ */ a(o, { icon: l, size: "sm" })
|
|
77
|
-
}
|
|
78
|
-
)
|
|
79
|
-
] })
|
|
80
|
-
] });
|
|
2
|
+
import { cn as e } from "./lib/utils.js";
|
|
3
|
+
import { Icon as t } from "./icon.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
6
|
+
import { IconChevronLeft as i, IconChevronRight as a } from "@tabler/icons-react";
|
|
7
|
+
//#region src/ui/data-table-pagination.tsx
|
|
8
|
+
function o({ table: o, totalRowCount: s, useServerPagination: c, pageSizeOptions: l }) {
|
|
9
|
+
return /* @__PURE__ */ r("div", {
|
|
10
|
+
className: "flex items-center justify-between px-ds-03 py-ds-04 border-t border-surface-border",
|
|
11
|
+
children: [/* @__PURE__ */ r("span", {
|
|
12
|
+
className: "text-ds-sm text-surface-fg-muted",
|
|
13
|
+
children: [s, " total rows"]
|
|
14
|
+
}), /* @__PURE__ */ r("div", {
|
|
15
|
+
className: "flex items-center gap-ds-03",
|
|
16
|
+
children: [
|
|
17
|
+
!c && /* @__PURE__ */ n("select", {
|
|
18
|
+
value: o.getState().pagination.pageSize,
|
|
19
|
+
onChange: (e) => {
|
|
20
|
+
o.setPageSize(Number(e.target.value));
|
|
21
|
+
},
|
|
22
|
+
"aria-label": "Rows per page",
|
|
23
|
+
className: e("h-ds-sm rounded-ds-md", "border border-surface-border-strong bg-surface-raised-hover", "px-ds-03 text-ds-sm", "text-surface-fg"),
|
|
24
|
+
children: (l ?? [
|
|
25
|
+
10,
|
|
26
|
+
20,
|
|
27
|
+
50,
|
|
28
|
+
100
|
|
29
|
+
]).map((e) => /* @__PURE__ */ r("option", {
|
|
30
|
+
value: e,
|
|
31
|
+
children: [e, " rows"]
|
|
32
|
+
}, e))
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ n("button", {
|
|
35
|
+
type: "button",
|
|
36
|
+
disabled: !o.getCanPreviousPage(),
|
|
37
|
+
onClick: () => o.previousPage(),
|
|
38
|
+
"aria-label": "Previous page",
|
|
39
|
+
className: e("h-ds-sm w-ds-sm flex items-center justify-center", "rounded-ds-md border border-surface-border-strong", "enabled:hover:bg-surface-raised", "disabled:opacity-action-disabled disabled:cursor-not-allowed", "transition-colors"),
|
|
40
|
+
children: /* @__PURE__ */ n(t, {
|
|
41
|
+
icon: i,
|
|
42
|
+
size: "sm"
|
|
43
|
+
})
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ r("span", {
|
|
46
|
+
className: "text-ds-sm text-surface-fg-muted",
|
|
47
|
+
children: [
|
|
48
|
+
"Page ",
|
|
49
|
+
o.getState().pagination.pageIndex + 1,
|
|
50
|
+
" of",
|
|
51
|
+
" ",
|
|
52
|
+
o.getPageCount()
|
|
53
|
+
]
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ n("button", {
|
|
56
|
+
type: "button",
|
|
57
|
+
disabled: !o.getCanNextPage(),
|
|
58
|
+
onClick: () => o.nextPage(),
|
|
59
|
+
"aria-label": "Next page",
|
|
60
|
+
className: e("h-ds-sm w-ds-sm flex items-center justify-center", "rounded-ds-md border border-surface-border-strong", "enabled:hover:bg-surface-raised", "disabled:opacity-action-disabled disabled:cursor-not-allowed", "transition-colors"),
|
|
61
|
+
children: /* @__PURE__ */ n(t, {
|
|
62
|
+
icon: a,
|
|
63
|
+
size: "sm"
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
})]
|
|
68
|
+
});
|
|
81
69
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
};
|
|
70
|
+
//#endregion
|
|
71
|
+
export { o as DataTablePagination };
|