@devalok/shilp-sutra 0.18.0 → 0.18.2
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/motion-provider.js +24 -0
- package/dist/_chunks/primitives.js +101 -101
- package/dist/_chunks/tree-view.js +12 -12
- package/dist/_chunks/use-calendar.js +1 -1
- package/dist/_chunks/vendor-utils.js +2 -2
- package/dist/composed/activity-feed.js +21 -21
- package/dist/composed/avatar-group.js +25 -25
- package/dist/composed/command-palette.js +3 -3
- package/dist/composed/confirm-dialog.js +1 -1
- package/dist/composed/content-card.js +1 -1
- package/dist/composed/empty-state.js +2 -2
- package/dist/composed/error-boundary.js +2 -2
- package/dist/composed/global-loading.js +10 -10
- package/dist/composed/lib/string-utils.d.ts +0 -1
- package/dist/composed/lib/string-utils.js +0 -1
- package/dist/composed/loading-skeleton.js +1 -1
- package/dist/composed/member-picker.js +6 -6
- package/dist/composed/page-header.js +1 -1
- package/dist/composed/page-skeletons.js +1 -1
- package/dist/composed/priority-indicator.js +6 -6
- package/dist/composed/rich-text-editor.js +1 -1
- package/dist/composed/schedule-view.js +15 -15
- package/dist/composed/simple-tooltip.js +8 -8
- package/dist/composed/status-badge.js +12 -12
- package/dist/motion/index.d.ts +1 -1
- package/dist/motion/index.d.ts.map +1 -1
- package/dist/motion/index.js +8 -6
- package/dist/motion/primitives-index.js +184 -8
- package/dist/shell/app-command-palette.js +1 -1
- package/dist/shell/bottom-navbar.js +3 -3
- package/dist/shell/notification-center.js +35 -35
- package/dist/shell/notification-preferences.js +29 -28
- package/dist/shell/sidebar.js +56 -56
- package/dist/shell/top-bar.js +25 -25
- package/dist/ui/accordion.js +11 -11
- package/dist/ui/alert-dialog.js +41 -41
- package/dist/ui/alert.js +10 -10
- package/dist/ui/aspect-ratio.js +5 -5
- package/dist/ui/autocomplete.js +15 -15
- package/dist/ui/avatar.js +4 -4
- package/dist/ui/badge.js +11 -11
- package/dist/ui/banner.js +3 -3
- package/dist/ui/breadcrumb.js +8 -8
- package/dist/ui/button-group.js +4 -4
- package/dist/ui/button.js +25 -25
- package/dist/ui/card.js +5 -5
- package/dist/ui/charts/index.js +4 -4
- package/dist/ui/checkbox.js +4 -4
- package/dist/ui/chip.js +14 -14
- package/dist/ui/code.js +1 -1
- package/dist/ui/collapsible.js +7 -7
- package/dist/ui/color-input.js +1 -1
- package/dist/ui/combobox.js +5 -5
- package/dist/ui/container.js +4 -4
- package/dist/ui/context-menu.js +4 -4
- package/dist/ui/data-table-toolbar.js +18 -18
- package/dist/ui/data-table.js +55 -55
- package/dist/ui/dialog.js +3 -3
- package/dist/ui/dropdown-menu.js +3 -3
- package/dist/ui/file-upload.js +10 -10
- package/dist/ui/form.js +1 -1
- package/dist/ui/hover-card.js +12 -12
- package/dist/ui/icon-button.js +9 -9
- package/dist/ui/index.js +322 -516
- package/dist/ui/input-otp.js +4 -4
- package/dist/ui/input.js +9 -9
- package/dist/ui/label.js +9 -9
- package/dist/ui/lib/date-utils.d.ts +0 -1
- package/dist/{_chunks → ui/lib}/date-utils.js +1 -2
- package/dist/{_chunks/motion2.js → ui/lib/motion.js} +13 -14
- package/dist/ui/lib/use-ripple.d.ts.map +1 -1
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/link.js +1 -1
- package/dist/ui/menubar.js +66 -66
- package/dist/ui/navigation-menu.js +4 -4
- package/dist/ui/number-input.js +9 -9
- package/dist/ui/pagination.js +1 -1
- package/dist/ui/popover.js +18 -18
- package/dist/ui/progress.js +4 -4
- package/dist/ui/radio.js +11 -11
- package/dist/ui/search-input.js +2 -2
- package/dist/ui/segmented-control.d.ts +2 -0
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +59 -55
- package/dist/ui/select.js +19 -19
- package/dist/ui/separator.js +5 -5
- package/dist/ui/sheet.js +10 -10
- package/dist/ui/sidebar.js +574 -38
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.js +9 -9
- package/dist/ui/spinner.js +2 -2
- package/dist/ui/stack.js +1 -1
- package/dist/ui/stat-card.js +35 -35
- package/dist/ui/stepper.d.ts +1 -3
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +74 -74
- package/dist/ui/switch.js +7 -7
- package/dist/ui/table.js +28 -28
- package/dist/ui/tabs.js +10 -10
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.js +10 -10
- package/dist/ui/toast.js +12 -12
- package/dist/ui/toaster.js +11 -11
- package/dist/ui/toggle-group.js +2 -2
- package/dist/ui/toggle.js +8 -8
- package/dist/ui/tooltip.js +21 -21
- package/dist/ui/visually-hidden.js +3 -3
- package/docs/components/_header.md +83 -0
- package/docs/components/composed/activity-feed.md +43 -0
- package/docs/components/composed/avatar-group.md +32 -0
- package/docs/components/composed/command-palette.md +40 -0
- package/docs/components/composed/confirm-dialog.md +46 -0
- package/docs/components/composed/content-card.md +36 -0
- package/docs/components/composed/date-picker.md +130 -0
- package/docs/components/composed/empty-state.md +53 -0
- package/docs/components/composed/error-boundary.md +29 -0
- package/docs/components/composed/global-loading.md +27 -0
- package/docs/components/composed/loading-skeleton.md +51 -0
- package/docs/components/composed/member-picker.md +35 -0
- package/docs/components/composed/page-header.md +41 -0
- package/docs/components/composed/page-skeletons.md +32 -0
- package/docs/components/composed/priority-indicator.md +32 -0
- package/docs/components/composed/rich-text-editor.md +71 -0
- package/docs/components/composed/schedule-view.md +39 -0
- package/docs/components/composed/simple-tooltip.md +33 -0
- package/docs/components/composed/status-badge.md +41 -0
- package/docs/components/shell/app-command-palette.md +44 -0
- package/docs/components/shell/bottom-navbar.md +48 -0
- package/docs/components/shell/command-registry.md +48 -0
- package/docs/components/shell/link-context.md +41 -0
- package/docs/components/shell/notification-center.md +63 -0
- package/docs/components/shell/notification-preferences.md +42 -0
- package/docs/components/shell/sidebar.md +88 -0
- package/docs/components/shell/top-bar.md +63 -0
- package/docs/components/ui/accordion.md +48 -0
- package/docs/components/ui/alert-dialog.md +58 -0
- package/docs/components/ui/alert.md +43 -0
- package/docs/components/ui/aspect-ratio.md +25 -0
- package/docs/components/ui/autocomplete.md +48 -0
- package/docs/components/ui/avatar.md +34 -0
- package/docs/components/ui/badge.md +48 -0
- package/docs/components/ui/banner.md +35 -0
- package/docs/components/ui/breadcrumb.md +37 -0
- package/docs/components/ui/button-group.md +32 -0
- package/docs/components/ui/button.md +55 -0
- package/docs/components/ui/card.md +48 -0
- package/docs/components/ui/charts.md +43 -0
- package/docs/components/ui/checkbox.md +31 -0
- package/docs/components/ui/chip.md +43 -0
- package/docs/components/ui/code.md +28 -0
- package/docs/components/ui/collapsible.md +40 -0
- package/docs/components/ui/color-input.md +37 -0
- package/docs/components/ui/combobox.md +54 -0
- package/docs/components/ui/container.md +26 -0
- package/docs/components/ui/context-menu.md +43 -0
- package/docs/components/ui/data-table-toolbar.md +44 -0
- package/docs/components/ui/data-table.md +91 -0
- package/docs/components/ui/dialog.md +51 -0
- package/docs/components/ui/dropdown-menu.md +45 -0
- package/docs/components/ui/file-upload.md +41 -0
- package/docs/components/ui/form.md +51 -0
- package/docs/components/ui/hover-card.md +32 -0
- package/docs/components/ui/icon-button.md +33 -0
- package/docs/components/ui/input-otp.md +44 -0
- package/docs/components/ui/input.md +48 -0
- package/docs/components/ui/label.md +25 -0
- package/docs/components/ui/link.md +29 -0
- package/docs/components/ui/menubar.md +44 -0
- package/docs/components/ui/navigation-menu.md +46 -0
- package/docs/components/ui/number-input.md +44 -0
- package/docs/components/ui/pagination.md +48 -0
- package/docs/components/ui/popover.md +30 -0
- package/docs/components/ui/progress.md +29 -0
- package/docs/components/ui/radio.md +34 -0
- package/docs/components/ui/search-input.md +43 -0
- package/docs/components/ui/segmented-control.md +50 -0
- package/docs/components/ui/select.md +49 -0
- package/docs/components/ui/separator.md +29 -0
- package/docs/components/ui/sheet.md +47 -0
- package/docs/components/ui/sidebar.md +72 -0
- package/docs/components/ui/skeleton.md +77 -0
- package/docs/components/ui/slider.md +29 -0
- package/docs/components/ui/spinner.md +50 -0
- package/docs/components/ui/stack.md +39 -0
- package/docs/components/ui/stat-card.md +61 -0
- package/docs/components/ui/stepper.md +49 -0
- package/docs/components/ui/switch.md +34 -0
- package/docs/components/ui/table.md +47 -0
- package/docs/components/ui/tabs.md +56 -0
- package/docs/components/ui/text.md +37 -0
- package/docs/components/ui/textarea.md +39 -0
- package/docs/components/ui/toast.md +65 -0
- package/docs/components/ui/toaster.md +47 -0
- package/docs/components/ui/toggle-group.md +43 -0
- package/docs/components/ui/toggle.md +37 -0
- package/docs/components/ui/tooltip.md +33 -0
- package/docs/components/ui/tree-view.md +65 -0
- package/docs/components/ui/visually-hidden.md +21 -0
- package/llms-full.txt +3384 -1591
- package/llms.txt +4 -4
- package/package.json +28 -3
- package/dist/_chunks/avatar.js +0 -52
- package/dist/_chunks/button-group.js +0 -27
- package/dist/_chunks/button.js +0 -113
- package/dist/_chunks/card.js +0 -50
- package/dist/_chunks/checkbox.js +0 -16
- package/dist/_chunks/form.js +0 -27
- package/dist/_chunks/sidebar.js +0 -606
- package/dist/_chunks/spinner.js +0 -64
- package/dist/_chunks/tooltip.js +0 -30
- package/dist/_chunks/utils.js +0 -17
- package/dist/motion/motion-provider.js +0 -24
- package/dist/motion/primitives.js +0 -187
- /package/dist/_chunks/{motion.js → framer.js} +0 -0
package/dist/ui/data-table.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
3
|
-
import nt, { useState as u, useRef as V, useEffect as D, useCallback as j, useMemo as
|
|
4
|
-
import { useReactTable as
|
|
3
|
+
import nt, { useState as u, useRef as V, useEffect as D, useCallback as j, useMemo as lt } from "react";
|
|
4
|
+
import { useReactTable as st, getExpandedRowModel as ot, getPaginationRowModel as at, getFilteredRowModel as ct, getSortedRowModel as rt, getCoreRowModel as dt, flexRender as te } from "@tanstack/react-table";
|
|
5
5
|
import { useVirtualizer as it } from "@tanstack/react-virtual";
|
|
6
6
|
import { IconArrowUp as ut, IconArrowDown as ft, IconArrowsSort as mt, IconSearch as gt, IconChevronLeft as pt, IconChevronRight as Ne, IconX as ht } from "@tabler/icons-react";
|
|
7
7
|
import { Table as bt, TableHeader as xt, TableRow as z, TableHead as we, TableBody as A, TableCell as O } from "./table.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { Button as yt } from "./button.js";
|
|
9
|
+
import { Checkbox as ke } from "./checkbox.js";
|
|
10
10
|
import { Skeleton as Re } from "./skeleton.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { cn as a } from "./lib/utils.js";
|
|
12
|
+
import { springs as ne } from "./lib/motion.js";
|
|
13
13
|
import { DataTableToolbar as St } from "./data-table-toolbar.js";
|
|
14
|
-
import { A as Ct, m as
|
|
14
|
+
import { A as Ct, m as le } from "../_chunks/framer.js";
|
|
15
15
|
const Nt = {
|
|
16
16
|
compact: "py-ds-02",
|
|
17
17
|
standard: "py-ds-05",
|
|
@@ -66,7 +66,7 @@ function Rt({
|
|
|
66
66
|
pageSizeOptions: ze,
|
|
67
67
|
selectable: C = !1,
|
|
68
68
|
onSelectionChange: G,
|
|
69
|
-
toolbar:
|
|
69
|
+
toolbar: se = !1,
|
|
70
70
|
density: De = "standard",
|
|
71
71
|
columnPinning: N,
|
|
72
72
|
editable: Ie = !1,
|
|
@@ -82,15 +82,15 @@ function Rt({
|
|
|
82
82
|
selectedIds: Y,
|
|
83
83
|
selectableFilter: ce,
|
|
84
84
|
getRowId: g,
|
|
85
|
-
pagination:
|
|
85
|
+
pagination: s,
|
|
86
86
|
singleExpand: U = !1,
|
|
87
87
|
stickyHeader: Me = !1,
|
|
88
88
|
onRowClick: T,
|
|
89
89
|
bulkActions: _
|
|
90
90
|
}) {
|
|
91
91
|
const [Ve, re] = u([]), [je, $e] = u([]), [W, X] = u(""), [_e, q] = u({
|
|
92
|
-
pageIndex:
|
|
93
|
-
pageSize: (
|
|
92
|
+
pageIndex: s ? s.page - 1 : 0,
|
|
93
|
+
pageSize: (s == null ? void 0 : s.pageSize) ?? E ?? 10
|
|
94
94
|
}), [x, de] = u({}), [He, Ae] = u({}), [ie, Oe] = u({
|
|
95
95
|
left: (N == null ? void 0 : N.left) ?? [],
|
|
96
96
|
right: (N == null ? void 0 : N.right) ?? []
|
|
@@ -104,39 +104,39 @@ function Rt({
|
|
|
104
104
|
}), de(e);
|
|
105
105
|
}
|
|
106
106
|
}, [Y]), D(() => {
|
|
107
|
-
|
|
107
|
+
s && q((e) => ({
|
|
108
108
|
...e,
|
|
109
|
-
pageIndex:
|
|
110
|
-
pageSize:
|
|
109
|
+
pageIndex: s.page - 1,
|
|
110
|
+
pageSize: s.pageSize
|
|
111
111
|
}));
|
|
112
|
-
}, [
|
|
112
|
+
}, [s == null ? void 0 : s.page, s == null ? void 0 : s.pageSize]);
|
|
113
113
|
const Ge = j(
|
|
114
114
|
(e) => {
|
|
115
115
|
re((t) => {
|
|
116
|
-
const
|
|
117
|
-
return F && (
|
|
116
|
+
const l = typeof e == "function" ? e(t) : e;
|
|
117
|
+
return F && (l.length === 0 && t.length > 0 ? F(t[0].id, !1) : l.length > 0 && F(l[0].id, l[0].desc ? "desc" : "asc")), l;
|
|
118
118
|
});
|
|
119
119
|
},
|
|
120
120
|
[F]
|
|
121
121
|
), Le = j(
|
|
122
122
|
(e) => {
|
|
123
123
|
fe((t) => {
|
|
124
|
-
const
|
|
125
|
-
if (!U ||
|
|
126
|
-
const o = typeof t == "object" ? Object.keys(t).filter((m) => t[m]) : [], R = Object.keys(
|
|
127
|
-
return R.length > 0 ? { [R[R.length - 1]]: !0 } :
|
|
124
|
+
const l = typeof e == "function" ? e(t) : e;
|
|
125
|
+
if (!U || l === !0 || typeof l != "object") return l;
|
|
126
|
+
const o = typeof t == "object" ? Object.keys(t).filter((m) => t[m]) : [], R = Object.keys(l).filter((m) => l[m]).filter((m) => !o.includes(m));
|
|
127
|
+
return R.length > 0 ? { [R[R.length - 1]]: !0 } : l;
|
|
128
128
|
});
|
|
129
129
|
},
|
|
130
130
|
[U]
|
|
131
|
-
), Z = V(
|
|
131
|
+
), Z = V(s == null ? void 0 : s.onPageChange);
|
|
132
132
|
D(() => {
|
|
133
|
-
Z.current =
|
|
134
|
-
}, [
|
|
133
|
+
Z.current = s == null ? void 0 : s.onPageChange;
|
|
134
|
+
}, [s == null ? void 0 : s.onPageChange]);
|
|
135
135
|
const Ye = j(
|
|
136
136
|
(e) => {
|
|
137
137
|
q((t) => {
|
|
138
|
-
const
|
|
139
|
-
return Z.current &&
|
|
138
|
+
const l = typeof e == "function" ? e(t) : e;
|
|
139
|
+
return Z.current && l.pageIndex !== t.pageIndex && Z.current(l.pageIndex + 1), l;
|
|
140
140
|
});
|
|
141
141
|
},
|
|
142
142
|
[]
|
|
@@ -193,12 +193,12 @@ function Rt({
|
|
|
193
193
|
...C ? [Ue] : [],
|
|
194
194
|
...$ ? [We] : [],
|
|
195
195
|
...B
|
|
196
|
-
], M = !!
|
|
196
|
+
], M = !!s, v = i || M, y = {
|
|
197
197
|
columnVisibility: He,
|
|
198
198
|
columnPinning: ie
|
|
199
199
|
};
|
|
200
200
|
S && (y.sorting = Ve), (p || h) && (y.columnFilters = je, y.globalFilter = W), v && (y.pagination = _e), C && (y.rowSelection = x), $ && (y.expanded = Ke);
|
|
201
|
-
const ge = S && !!F, c =
|
|
201
|
+
const ge = S && !!F, c = st({
|
|
202
202
|
data: f,
|
|
203
203
|
columns: k,
|
|
204
204
|
state: y,
|
|
@@ -219,7 +219,7 @@ function Rt({
|
|
|
219
219
|
...M ? {
|
|
220
220
|
manualPagination: !0,
|
|
221
221
|
pageCount: Math.ceil(
|
|
222
|
-
|
|
222
|
+
s.total / s.pageSize
|
|
223
223
|
)
|
|
224
224
|
} : { getPaginationRowModel: at() }
|
|
225
225
|
},
|
|
@@ -243,14 +243,14 @@ function Rt({
|
|
|
243
243
|
return;
|
|
244
244
|
}
|
|
245
245
|
if (!P.current) return;
|
|
246
|
-
const e = Object.keys(x).filter((
|
|
246
|
+
const e = Object.keys(x).filter((l) => x[l]), t = f.filter((l, o) => {
|
|
247
247
|
const r = g ? g(f[o]) : String(o);
|
|
248
248
|
return e.includes(r);
|
|
249
249
|
});
|
|
250
250
|
P.current(t);
|
|
251
251
|
}, [x, f, g]);
|
|
252
252
|
function pe(e) {
|
|
253
|
-
const { left: t = [], right:
|
|
253
|
+
const { left: t = [], right: l = [] } = ie, o = t.indexOf(e), r = l.indexOf(e);
|
|
254
254
|
return o !== -1 ? {
|
|
255
255
|
className: "sticky bg-surface-1 z-raised",
|
|
256
256
|
style: { left: 0 }
|
|
@@ -263,22 +263,22 @@ function Rt({
|
|
|
263
263
|
if (!Ie || e === "_select" || e === "_expand") return !1;
|
|
264
264
|
const t = c.getColumn(e);
|
|
265
265
|
if (!t) return !1;
|
|
266
|
-
const
|
|
267
|
-
return (
|
|
266
|
+
const l = t.columnDef.meta;
|
|
267
|
+
return (l == null ? void 0 : l.enableEditing) !== !1;
|
|
268
268
|
}
|
|
269
269
|
const he = Nt[ue], H = c.getRowModel().rows, be = it({
|
|
270
270
|
count: b ? H.length : 0,
|
|
271
271
|
getScrollElement: () => me.current,
|
|
272
272
|
estimateSize: () => Ee,
|
|
273
273
|
overscan: 10
|
|
274
|
-
}), qe = (
|
|
274
|
+
}), qe = (s == null ? void 0 : s.pageSize) ?? E ?? 5, Je = k.length, Qe = j(
|
|
275
275
|
(e, t) => {
|
|
276
276
|
!T || t.target.closest(kt) || T(e);
|
|
277
277
|
},
|
|
278
278
|
[T]
|
|
279
279
|
);
|
|
280
280
|
function xe(e, t) {
|
|
281
|
-
const
|
|
281
|
+
const l = e.getVisibleCells();
|
|
282
282
|
return /* @__PURE__ */ n(
|
|
283
283
|
z,
|
|
284
284
|
{
|
|
@@ -289,7 +289,7 @@ function Rt({
|
|
|
289
289
|
T && "cursor-pointer"
|
|
290
290
|
),
|
|
291
291
|
onClick: T ? (o) => Qe(e.original, o) : void 0,
|
|
292
|
-
children:
|
|
292
|
+
children: l.map((o) => {
|
|
293
293
|
const r = pe(o.column.id), R = (w == null ? void 0 : w.rowIndex) === e.index && (w == null ? void 0 : w.columnId) === o.column.id;
|
|
294
294
|
return /* @__PURE__ */ n(
|
|
295
295
|
O,
|
|
@@ -347,7 +347,7 @@ function Rt({
|
|
|
347
347
|
}
|
|
348
348
|
function ve() {
|
|
349
349
|
const e = ["w-3/4", "w-1/2", "w-2/3", "w-full"];
|
|
350
|
-
return /* @__PURE__ */ n(A, { children: Array.from({ length: qe }, (t,
|
|
350
|
+
return /* @__PURE__ */ n(A, { children: Array.from({ length: qe }, (t, l) => /* @__PURE__ */ n(z, { children: Array.from({ length: Je }, (o, r) => {
|
|
351
351
|
var Se, Ce;
|
|
352
352
|
const m = (((Se = k[r]) == null ? void 0 : Se.id) ?? ((Ce = k[r]) == null ? void 0 : Ce.header)) === "_select";
|
|
353
353
|
return /* @__PURE__ */ n(
|
|
@@ -356,9 +356,9 @@ function Rt({
|
|
|
356
356
|
className: he,
|
|
357
357
|
children: m ? /* @__PURE__ */ n(Re, { variant: "text", className: "h-4 w-4", animation: "pulse" }) : /* @__PURE__ */ n(Re, { variant: "text", className: a("h-4", e[r % e.length]), animation: "pulse" })
|
|
358
358
|
},
|
|
359
|
-
`skeleton-${
|
|
359
|
+
`skeleton-${l}-${r}`
|
|
360
360
|
);
|
|
361
|
-
}) }, `skeleton-${
|
|
361
|
+
}) }, `skeleton-${l}`)) });
|
|
362
362
|
}
|
|
363
363
|
function Pe() {
|
|
364
364
|
if (Te)
|
|
@@ -384,15 +384,15 @@ function Rt({
|
|
|
384
384
|
height: `${t}px`,
|
|
385
385
|
position: "relative"
|
|
386
386
|
},
|
|
387
|
-
children: e.map((
|
|
388
|
-
const o = H[
|
|
387
|
+
children: e.map((l) => {
|
|
388
|
+
const o = H[l.index];
|
|
389
389
|
return xe(o, {
|
|
390
390
|
position: "absolute",
|
|
391
391
|
top: 0,
|
|
392
392
|
left: 0,
|
|
393
393
|
width: "100%",
|
|
394
|
-
height: `${
|
|
395
|
-
transform: `translateY(${
|
|
394
|
+
height: `${l.size}px`,
|
|
395
|
+
transform: `translateY(${l.start}px)`
|
|
396
396
|
});
|
|
397
397
|
})
|
|
398
398
|
}
|
|
@@ -403,14 +403,14 @@ function Rt({
|
|
|
403
403
|
Ze(e)
|
|
404
404
|
] }, e.id)) });
|
|
405
405
|
}
|
|
406
|
-
const ee =
|
|
406
|
+
const ee = lt(() => {
|
|
407
407
|
if (!_ || !C) return [];
|
|
408
408
|
const e = Object.keys(x).filter((t) => x[t]);
|
|
409
|
-
return f.filter((t,
|
|
410
|
-
const o = g ? g(f[
|
|
409
|
+
return f.filter((t, l) => {
|
|
410
|
+
const o = g ? g(f[l]) : String(l);
|
|
411
411
|
return e.includes(o);
|
|
412
412
|
});
|
|
413
|
-
}, [_, C, x, f, g]), et = ee.length > 0, tt = M ?
|
|
413
|
+
}, [_, C, x, f, g]), et = ee.length > 0, tt = M ? s.total : c.getFilteredRowModel().rows.length, ye = /* @__PURE__ */ d(bt, { children: [
|
|
414
414
|
/* @__PURE__ */ d(
|
|
415
415
|
xt,
|
|
416
416
|
{
|
|
@@ -419,13 +419,13 @@ function Rt({
|
|
|
419
419
|
),
|
|
420
420
|
children: [
|
|
421
421
|
c.getHeaderGroups().map((e) => /* @__PURE__ */ n(z, { children: e.headers.map((t) => {
|
|
422
|
-
const
|
|
422
|
+
const l = S && t.column.getCanSort(), o = t.column.getIsSorted(), r = pe(t.column.id);
|
|
423
423
|
return /* @__PURE__ */ n(
|
|
424
424
|
we,
|
|
425
425
|
{
|
|
426
426
|
className: r.className,
|
|
427
427
|
style: r.style,
|
|
428
|
-
children: t.isPlaceholder ? null :
|
|
428
|
+
children: t.isPlaceholder ? null : l ? /* @__PURE__ */ d(
|
|
429
429
|
"button",
|
|
430
430
|
{
|
|
431
431
|
type: "button",
|
|
@@ -443,7 +443,7 @@ function Rt({
|
|
|
443
443
|
t.getContext()
|
|
444
444
|
),
|
|
445
445
|
/* @__PURE__ */ n(Ct, { mode: "wait", initial: !1, children: o === "asc" ? /* @__PURE__ */ n(
|
|
446
|
-
|
|
446
|
+
le.span,
|
|
447
447
|
{
|
|
448
448
|
initial: { opacity: 0, rotate: 90 },
|
|
449
449
|
animate: { opacity: 1, rotate: 0 },
|
|
@@ -460,7 +460,7 @@ function Rt({
|
|
|
460
460
|
},
|
|
461
461
|
"asc"
|
|
462
462
|
) : o === "desc" ? /* @__PURE__ */ n(
|
|
463
|
-
|
|
463
|
+
le.span,
|
|
464
464
|
{
|
|
465
465
|
initial: { opacity: 0, rotate: -90 },
|
|
466
466
|
animate: { opacity: 1, rotate: 0 },
|
|
@@ -477,7 +477,7 @@ function Rt({
|
|
|
477
477
|
},
|
|
478
478
|
"desc"
|
|
479
479
|
) : /* @__PURE__ */ n(
|
|
480
|
-
|
|
480
|
+
le.span,
|
|
481
481
|
{
|
|
482
482
|
initial: { opacity: 0 },
|
|
483
483
|
animate: { opacity: 1 },
|
|
@@ -509,7 +509,7 @@ function Rt({
|
|
|
509
509
|
{
|
|
510
510
|
type: "text",
|
|
511
511
|
value: t.column.getFilterValue() ?? "",
|
|
512
|
-
onChange: (
|
|
512
|
+
onChange: (l) => t.column.setFilterValue(l.target.value),
|
|
513
513
|
placeholder: `Filter ${typeof t.column.columnDef.header == "string" ? t.column.columnDef.header : ""}...`,
|
|
514
514
|
"aria-label": `Filter ${typeof t.column.columnDef.header == "string" ? t.column.columnDef.header : t.column.id}`,
|
|
515
515
|
className: a(
|
|
@@ -527,7 +527,7 @@ function Rt({
|
|
|
527
527
|
Pe()
|
|
528
528
|
] });
|
|
529
529
|
return /* @__PURE__ */ d("div", { className: a(K), children: [
|
|
530
|
-
|
|
530
|
+
se && /* @__PURE__ */ n(
|
|
531
531
|
St,
|
|
532
532
|
{
|
|
533
533
|
table: c,
|
|
@@ -538,7 +538,7 @@ function Rt({
|
|
|
538
538
|
onDensityChange: Be
|
|
539
539
|
}
|
|
540
540
|
),
|
|
541
|
-
h && !
|
|
541
|
+
h && !se && /* @__PURE__ */ d("div", { className: "flex items-center gap-ds-03 pb-ds-04 border-b border-surface-border mb-ds-04", children: [
|
|
542
542
|
/* @__PURE__ */ n(
|
|
543
543
|
gt,
|
|
544
544
|
{
|
package/dist/ui/dialog.js
CHANGED
|
@@ -3,9 +3,9 @@ import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
|
3
3
|
import * as t from "react";
|
|
4
4
|
import { aa as u, ab as C, ac as m, ad as x, ae as y, af as N, ag as R, ah as j } from "../_chunks/primitives.js";
|
|
5
5
|
import { IconX as M } from "@tabler/icons-react";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { A as P, m as g } from "../_chunks/
|
|
6
|
+
import { cn as i } from "./lib/utils.js";
|
|
7
|
+
import { tweens as p, springs as T } from "./lib/motion.js";
|
|
8
|
+
import { A as P, m as g } from "../_chunks/framer.js";
|
|
9
9
|
const D = t.createContext({ open: !1 }), z = () => t.useContext(D), A = ({
|
|
10
10
|
open: a,
|
|
11
11
|
defaultOpen: s,
|
package/dist/ui/dropdown-menu.js
CHANGED
|
@@ -3,9 +3,9 @@ import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
|
3
3
|
import * as r from "react";
|
|
4
4
|
import { X as f, Y as b, Z as w, _ as y, $ as x, a0 as N, a1 as g, a2 as h, a3 as v, a4 as M, a5 as P, a6 as _, a7 as j, a8 as G, a9 as T } from "../_chunks/primitives.js";
|
|
5
5
|
import { IconChevronRight as z, IconCheck as A, IconCircle as L } from "@tabler/icons-react";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { A as R, m as S } from "../_chunks/
|
|
6
|
+
import { cn as d } from "./lib/utils.js";
|
|
7
|
+
import { tweens as D, springs as C } from "./lib/motion.js";
|
|
8
|
+
import { A as R, m as S } from "../_chunks/framer.js";
|
|
9
9
|
const I = r.createContext(!1), k = r.createContext(!1), U = ({
|
|
10
10
|
open: s,
|
|
11
11
|
defaultOpen: a = !1,
|
package/dist/ui/file-upload.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import * as r from "react";
|
|
4
4
|
import { IconPaperclip as X, IconCheck as Z, IconUpload as q } from "@tabler/icons-react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { m as c, A as M } from "../_chunks/
|
|
5
|
+
import { cn as h } from "./lib/utils.js";
|
|
6
|
+
import { springs as D, tweens as N } from "./lib/motion.js";
|
|
7
|
+
import { Spinner as B } from "./spinner.js";
|
|
8
|
+
import { m as c, A as M } from "../_chunks/framer.js";
|
|
9
9
|
const G = 10 * 1024 * 1024;
|
|
10
10
|
function H(a, l) {
|
|
11
11
|
return l.split(",").map((i) => i.trim()).some((i) => i.startsWith(".") ? a.name.toLowerCase().endsWith(i.toLowerCase()) : i.endsWith("/*") ? a.type.startsWith(i.slice(0, i.indexOf("/") + 1)) : a.type === i);
|
|
@@ -29,9 +29,9 @@ const J = r.forwardRef(
|
|
|
29
29
|
sublabel: j,
|
|
30
30
|
...E
|
|
31
31
|
}, L) => {
|
|
32
|
-
const y = r.useRef(null), [b, d] = r.useState(!1), [
|
|
32
|
+
const y = r.useRef(null), [b, d] = r.useState(!1), [z, f] = r.useState(
|
|
33
33
|
null
|
|
34
|
-
), g = r.useRef(!1), k = r.useRef(!1), u = I ||
|
|
34
|
+
), g = r.useRef(!1), k = r.useRef(!1), u = I || z, C = r.useCallback(() => {
|
|
35
35
|
var e;
|
|
36
36
|
s || o || (e = y.current) == null || e.click();
|
|
37
37
|
}, [s, o]), m = r.useCallback(
|
|
@@ -65,12 +65,12 @@ const J = r.forwardRef(
|
|
|
65
65
|
g.current = !0, k.current = !1;
|
|
66
66
|
}, []), P = r.useCallback(() => {
|
|
67
67
|
g.current && !k.current && a && f("File type is not accepted"), g.current = !1;
|
|
68
|
-
}, [a]),
|
|
68
|
+
}, [a]), K = r.useCallback(
|
|
69
69
|
(e) => {
|
|
70
70
|
e.preventDefault(), e.stopPropagation(), !s && !o && d(!0);
|
|
71
71
|
},
|
|
72
72
|
[s, o]
|
|
73
|
-
),
|
|
73
|
+
), S = r.useCallback(
|
|
74
74
|
(e) => {
|
|
75
75
|
e.preventDefault(), e.stopPropagation(), !s && !o && d(!0);
|
|
76
76
|
},
|
|
@@ -146,8 +146,8 @@ const J = r.forwardRef(
|
|
|
146
146
|
role: "presentation",
|
|
147
147
|
className: h("flex flex-col", F),
|
|
148
148
|
"data-drag-active": b ? "true" : void 0,
|
|
149
|
-
onDragEnter:
|
|
150
|
-
onDragOver:
|
|
149
|
+
onDragEnter: K,
|
|
150
|
+
onDragOver: S,
|
|
151
151
|
onDragLeave: T,
|
|
152
152
|
onDrop: _,
|
|
153
153
|
children: [
|
package/dist/ui/form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as d } from "react/jsx-runtime";
|
|
3
3
|
import * as e from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { cn as i } from "./lib/utils.js";
|
|
5
5
|
const x = e.createContext({}), u = e.forwardRef(
|
|
6
6
|
({ className: l, helperTextId: n, state: t = "helper", required: r, children: a, ...o }, s) => {
|
|
7
7
|
const c = e.useId(), m = n || `${c}-helper`, p = e.useMemo(
|
package/dist/ui/hover-card.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import * as t from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { A as g, m as
|
|
8
|
-
const m = t.createContext(!1),
|
|
4
|
+
import { r as u, s as p, t as C, u as v } from "../_chunks/primitives.js";
|
|
5
|
+
import { cn as y } from "./lib/utils.js";
|
|
6
|
+
import { tweens as x, springs as b } from "./lib/motion.js";
|
|
7
|
+
import { A as g, m as H } from "../_chunks/framer.js";
|
|
8
|
+
const m = t.createContext(!1), h = ({
|
|
9
9
|
open: s,
|
|
10
10
|
defaultOpen: a = !1,
|
|
11
11
|
onOpenChange: e,
|
|
@@ -19,8 +19,8 @@ const m = t.createContext(!1), H = ({
|
|
|
19
19
|
);
|
|
20
20
|
return /* @__PURE__ */ r(m.Provider, { value: d, children: /* @__PURE__ */ r(v, { open: d, onOpenChange: f, ...n }) });
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
const
|
|
22
|
+
h.displayName = "HoverCard";
|
|
23
|
+
const T = C, w = t.forwardRef(({ className: s, align: a = "center", sideOffset: e = 4, children: n, ...i }, c) => {
|
|
24
24
|
const o = t.useContext(m);
|
|
25
25
|
return /* @__PURE__ */ r(g, { children: o && /* @__PURE__ */ r(u, { forceMount: !0, children: /* @__PURE__ */ r(
|
|
26
26
|
p,
|
|
@@ -32,7 +32,7 @@ const M = C, h = t.forwardRef(({ className: s, align: a = "center", sideOffset:
|
|
|
32
32
|
asChild: !0,
|
|
33
33
|
...i,
|
|
34
34
|
children: /* @__PURE__ */ r(
|
|
35
|
-
|
|
35
|
+
H.div,
|
|
36
36
|
{
|
|
37
37
|
initial: { opacity: 0, scale: 0.95 },
|
|
38
38
|
animate: { opacity: 1, scale: 1 },
|
|
@@ -48,9 +48,9 @@ const M = C, h = t.forwardRef(({ className: s, align: a = "center", sideOffset:
|
|
|
48
48
|
}
|
|
49
49
|
) }) });
|
|
50
50
|
});
|
|
51
|
-
|
|
51
|
+
w.displayName = p.displayName;
|
|
52
52
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
h as HoverCard,
|
|
54
|
+
w as HoverCardContent,
|
|
55
|
+
T as HoverCardTrigger
|
|
56
56
|
};
|
package/dist/ui/icon-button.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { Button as a } from "./button.js";
|
|
5
|
+
import { cn as d } from "./lib/utils.js";
|
|
6
6
|
const l = {
|
|
7
7
|
sm: "icon-sm",
|
|
8
8
|
md: "icon-md",
|
|
9
9
|
lg: "icon-lg"
|
|
10
|
-
}, f =
|
|
11
|
-
({ icon: o, shape: r = "square", size: n = "md", className: t, loading:
|
|
10
|
+
}, f = s.forwardRef(
|
|
11
|
+
({ icon: o, shape: r = "square", size: n = "md", className: t, loading: i, ...m }, c) => /* @__PURE__ */ e(
|
|
12
12
|
a,
|
|
13
13
|
{
|
|
14
|
-
ref:
|
|
14
|
+
ref: c,
|
|
15
15
|
size: l[n],
|
|
16
16
|
className: d(r === "circle" && "rounded-ds-full", t),
|
|
17
|
-
loading:
|
|
17
|
+
loading: i,
|
|
18
18
|
loadingPosition: "center",
|
|
19
|
-
...
|
|
19
|
+
...m,
|
|
20
20
|
children: o
|
|
21
21
|
}
|
|
22
22
|
)
|