@devalok/shilp-sutra 0.16.0 → 0.16.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.
@@ -1 +1 @@
1
- {"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../src/ui/data-table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAChF,OAAO,EACL,KAAK,SAAS,EAkBf,MAAM,uBAAuB,CAAA;AAwB9B,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAWrE,yDAAyD;AACzD,MAAM,WAAW,UAAU,CAAC,KAAK;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,CAAC,YAAY,EAAE,KAAK,EAAE,KAAK,IAAI,CAAA;IACxC,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,WAAW,cAAc,CAAC,KAAK,EAAE,MAAM;IAC3C,kDAAkD;IAClD,OAAO,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAA;IACnC,eAAe;IACf,IAAI,EAAE,KAAK,EAAE,CAAA;IACb,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,oDAAoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8EAA8E;IAC9E,eAA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,MAAM,CAAA;IAGjC,0EAA0E;IAC1E,UAAU,CAAC,EAAE;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,EAAE,MAAM,CAAA;QAChB,KAAK,EAAE,MAAM,CAAA;QACb,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;KACrC,CAAA;IAGD,wDAAwD;IACxD,YAAY,CAAC,EAAE,OAAO,CAAA;IAGtB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,OAAO,CAAA;IAGtB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAA;IAGjC,6DAA6D;IAC7D,WAAW,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,CAAA;CAClC;AA2DD,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,EACvC,OAAO,EACP,IAAI,EACJ,SAAS,EACT,aAAa,EACb,QAAgB,EAChB,UAAkB,EAClB,YAAoB,EACpB,SAAiB,EACjB,QAAQ,EAAE,eAAe,EACzB,eAAe,EACf,UAAkB,EAClB,iBAAiB,EACjB,OAAe,EACf,OAAO,EAAE,cAA2B,EACpC,aAAa,EAAE,oBAAoB,EACnC,QAAgB,EAChB,UAAU,EACV,UAAkB,EAClB,cAAc,EACd,WAAmB,EACnB,gBAAqB,EACrB,SAAe,EACf,MAAM,EACN,UAAU,EACV,OAAe,EACf,WAAW,EACX,gBAAgB,EAChB,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,gBAAgB,EAC5B,YAAoB,EACpB,YAAoB,EACpB,UAAU,EACV,WAAW,GACZ,EAAE,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,2CA4wB/B;yBA9yBe,SAAS"}
@@ -1,45 +1,45 @@
1
1
  "use client";
2
- import { jsxs as c, jsx as l } from "react/jsx-runtime";
3
- import Qe, { useState as u, useRef as Se, useEffect as _, useCallback as E, useMemo as Ze } from "react";
4
- import { useReactTable as Pe, getExpandedRowModel as et, getPaginationRowModel as tt, getFilteredRowModel as lt, getSortedRowModel as nt, getCoreRowModel as ot, flexRender as J } from "@tanstack/react-table";
5
- import { useVirtualizer as st } from "@tanstack/react-virtual";
6
- import { IconArrowUp as at, IconArrowDown as rt, IconArrowsSort as dt, IconSearch as ct, IconChevronLeft as it, IconChevronRight as he, IconX as ut } from "@tabler/icons-react";
7
- import { Table as mt, TableHeader as ft, TableRow as N, TableHead as be, TableBody as $, TableCell as j } from "./table.js";
8
- import { B as gt } from "../_chunks/button.js";
9
- import { C as xe } from "../_chunks/checkbox.js";
10
- import { Skeleton as ye } from "./skeleton.js";
11
- import { c as r } from "../_chunks/utils.js";
12
- import { DataTableToolbar as pt } from "./data-table-toolbar.js";
13
- const ht = {
2
+ import { jsxs as d, jsx as n } from "react/jsx-runtime";
3
+ import Pe, { useState as u, useRef as B, useEffect as D, useCallback as V, useMemo as et } from "react";
4
+ import { useReactTable as tt, getExpandedRowModel as lt, getPaginationRowModel as nt, getFilteredRowModel as ot, getSortedRowModel as st, getCoreRowModel as at, flexRender as ee } from "@tanstack/react-table";
5
+ import { useVirtualizer as rt } from "@tanstack/react-virtual";
6
+ import { IconArrowUp as ct, IconArrowDown as dt, IconArrowsSort as it, IconSearch as ut, IconChevronLeft as mt, IconChevronRight as ye, IconX as ft } from "@tabler/icons-react";
7
+ import { Table as gt, TableHeader as ht, TableRow as z, TableHead as Se, TableBody as H, TableCell as O } from "./table.js";
8
+ import { B as pt } from "../_chunks/button.js";
9
+ import { C as Ce } from "../_chunks/checkbox.js";
10
+ import { Skeleton as Ne } from "./skeleton.js";
11
+ import { c as a } from "../_chunks/utils.js";
12
+ import { DataTableToolbar as bt } from "./data-table-toolbar.js";
13
+ const xt = {
14
14
  compact: "py-ds-02",
15
15
  standard: "py-ds-05",
16
16
  comfortable: "py-ds-07"
17
17
  };
18
- function bt({
19
- initialValue: H,
20
- onSave: F,
21
- onCancel: v
18
+ function yt({
19
+ initialValue: A,
20
+ onSave: m,
21
+ onCancel: K
22
22
  }) {
23
- const [R, b] = u(H), f = Se(null);
24
- _(() => {
25
- var i, I;
26
- (i = f.current) == null || i.focus(), (I = f.current) == null || I.select();
23
+ const [I, S] = u(A), h = B(null);
24
+ D(() => {
25
+ var i, E;
26
+ (i = h.current) == null || i.focus(), (E = h.current) == null || E.select();
27
27
  }, []);
28
- const g = E(() => {
29
- F(R);
30
- }, [F, R]);
31
- return /* @__PURE__ */ l(
28
+ const p = V(() => {
29
+ m(I);
30
+ }, [m, I]);
31
+ return /* @__PURE__ */ n(
32
32
  "input",
33
33
  {
34
- ref: f,
34
+ ref: h,
35
35
  type: "text",
36
- value: R,
37
- onChange: (i) => b(i.target.value),
38
- onBlur: g,
36
+ value: I,
37
+ onChange: (i) => S(i.target.value),
38
+ onBlur: p,
39
39
  onKeyDown: (i) => {
40
- i.key === "Enter" ? (i.preventDefault(), g()) : i.key === "Escape" && (i.preventDefault(), v());
40
+ i.key === "Enter" ? (i.preventDefault(), p()) : i.key === "Escape" && (i.preventDefault(), K());
41
41
  },
42
- className: r(
42
+ className: a(
43
43
  "h-ds-xs-plus w-full rounded-ds-md",
44
44
  "border border-border-interactive bg-field",
45
45
  "px-ds-02 text-ds-sm",
@@ -50,93 +50,97 @@ function bt({
50
50
  }
51
51
  );
52
52
  }
53
- const xt = 'button, a, input, select, textarea, [role="checkbox"]';
54
- function yt({
55
- columns: H,
56
- data: F,
57
- className: v,
58
- noResultsText: R,
59
- sortable: b = !1,
60
- filterable: f = !1,
61
- globalFilter: g = !1,
53
+ const St = 'button, a, input, select, textarea, [role="checkbox"]';
54
+ function Ct({
55
+ columns: A,
56
+ data: m,
57
+ className: K,
58
+ noResultsText: I,
59
+ sortable: S = !1,
60
+ filterable: h = !1,
61
+ globalFilter: p = !1,
62
62
  paginated: i = !1,
63
- pageSize: I,
64
- pageSizeOptions: Ce,
65
- selectable: x = !1,
66
- onSelectionChange: B,
67
- toolbar: Q = !1,
68
- density: we = "standard",
69
- columnPinning: y,
70
- editable: Ne = !1,
71
- onCellEdit: A,
72
- expandable: M = !1,
73
- renderExpanded: Z,
74
- virtualRows: p = !1,
75
- virtualRowHeight: Re = 48,
76
- maxHeight: Ie = 600,
77
- onSort: k,
78
- emptyState: P,
79
- loading: ke = !1,
80
- selectedIds: O,
81
- selectableFilter: ee,
82
- getRowId: te,
63
+ pageSize: E,
64
+ pageSizeOptions: we,
65
+ selectable: C = !1,
66
+ onSelectionChange: G,
67
+ toolbar: te = !1,
68
+ density: ke = "standard",
69
+ columnPinning: N,
70
+ editable: Re = !1,
71
+ onCellEdit: L,
72
+ expandable: j = !1,
73
+ renderExpanded: le,
74
+ virtualRows: b = !1,
75
+ virtualRowHeight: ze = 48,
76
+ maxHeight: De = 600,
77
+ onSort: T,
78
+ emptyState: ne,
79
+ loading: Ie = !1,
80
+ selectedIds: Y,
81
+ selectableFilter: oe,
82
+ getRowId: g,
83
83
  pagination: o,
84
- singleExpand: K = !1,
85
- stickyHeader: ze = !1,
86
- onRowClick: z,
87
- bulkActions: T
84
+ singleExpand: U = !1,
85
+ stickyHeader: Ee = !1,
86
+ onRowClick: F,
87
+ bulkActions: $
88
88
  }) {
89
- const [De, le] = u([]), [Ee, Fe] = u([]), [G, L] = u(""), [Me, Y] = u({
89
+ const [Te, se] = u([]), [Fe, Me] = u([]), [W, X] = u(""), [Ve, q] = u({
90
90
  pageIndex: o ? o.page - 1 : 0,
91
- pageSize: (o == null ? void 0 : o.pageSize) ?? I ?? 10
92
- }), [U, ne] = u({}), [Te, Ve] = u({}), [oe, $e] = u({
93
- left: (y == null ? void 0 : y.left) ?? [],
94
- right: (y == null ? void 0 : y.right) ?? []
95
- }), [se, je] = u(we), [S, W] = u(null), [_e, ae] = u({}), re = Se(null);
96
- _(() => {
97
- if (O) {
91
+ pageSize: (o == null ? void 0 : o.pageSize) ?? E ?? 10
92
+ }), [x, ae] = u({}), [je, $e] = u({}), [re, _e] = u({
93
+ left: (N == null ? void 0 : N.left) ?? [],
94
+ right: (N == null ? void 0 : N.right) ?? []
95
+ }), [ce, He] = u(ke), [w, J] = u(null), [Oe, de] = u({}), ie = B(null);
96
+ D(() => {
97
+ if (Y) {
98
98
  const e = {};
99
- O.forEach((t) => {
99
+ Y.forEach((t) => {
100
100
  e[t] = !0;
101
- }), ne(e);
101
+ }), ae(e);
102
102
  }
103
- }, [O]), _(() => {
104
- o && Y((e) => ({
103
+ }, [Y]), D(() => {
104
+ o && q((e) => ({
105
105
  ...e,
106
106
  pageIndex: o.page - 1,
107
107
  pageSize: o.pageSize
108
108
  }));
109
109
  }, [o == null ? void 0 : o.page, o == null ? void 0 : o.pageSize]);
110
- const He = E(
110
+ const Be = V(
111
111
  (e) => {
112
- le((t) => {
113
- const n = typeof e == "function" ? e(t) : e;
114
- return k && (n.length === 0 && t.length > 0 ? k(t[0].id, !1) : n.length > 0 && k(n[0].id, n[0].desc ? "desc" : "asc")), n;
112
+ se((t) => {
113
+ const l = typeof e == "function" ? e(t) : e;
114
+ return T && (l.length === 0 && t.length > 0 ? T(t[0].id, !1) : l.length > 0 && T(l[0].id, l[0].desc ? "desc" : "asc")), l;
115
115
  });
116
116
  },
117
- [k]
118
- ), ve = E(
117
+ [T]
118
+ ), Ae = V(
119
119
  (e) => {
120
- ae((t) => {
121
- const n = typeof e == "function" ? e(t) : e;
122
- if (!K || n === !0 || typeof n != "object") return n;
123
- const s = typeof t == "object" ? Object.keys(t).filter((m) => t[m]) : [], w = Object.keys(n).filter((m) => n[m]).filter((m) => !s.includes(m));
124
- return w.length > 0 ? { [w[w.length - 1]]: !0 } : n;
120
+ de((t) => {
121
+ const l = typeof e == "function" ? e(t) : e;
122
+ if (!U || l === !0 || typeof l != "object") return l;
123
+ const s = typeof t == "object" ? Object.keys(t).filter((f) => t[f]) : [], R = Object.keys(l).filter((f) => l[f]).filter((f) => !s.includes(f));
124
+ return R.length > 0 ? { [R[R.length - 1]]: !0 } : l;
125
125
  });
126
126
  },
127
- [K]
128
- ), Be = E(
127
+ [U]
128
+ ), Q = B(o == null ? void 0 : o.onPageChange);
129
+ D(() => {
130
+ Q.current = o == null ? void 0 : o.onPageChange;
131
+ }, [o == null ? void 0 : o.onPageChange]);
132
+ const Ke = V(
129
133
  (e) => {
130
- Y((t) => {
131
- const n = typeof e == "function" ? e(t) : e;
132
- return o && n.pageIndex !== t.pageIndex && o.onPageChange(n.pageIndex + 1), n;
134
+ q((t) => {
135
+ const l = typeof e == "function" ? e(t) : e;
136
+ return Q.current && l.pageIndex !== t.pageIndex && Q.current(l.pageIndex + 1), l;
133
137
  });
134
138
  },
135
- [o]
136
- ), Ae = {
139
+ []
140
+ ), Ge = {
137
141
  id: "_select",
138
- header: ({ table: e }) => /* @__PURE__ */ l(
139
- xe,
142
+ header: ({ table: e }) => /* @__PURE__ */ n(
143
+ Ce,
140
144
  {
141
145
  checked: e.getIsAllPageRowsSelected(),
142
146
  indeterminate: e.getIsSomePageRowsSelected(),
@@ -144,8 +148,8 @@ function yt({
144
148
  "aria-label": "Select all rows"
145
149
  }
146
150
  ),
147
- cell: ({ row: e }) => /* @__PURE__ */ l(
148
- xe,
151
+ cell: ({ row: e }) => /* @__PURE__ */ n(
152
+ Ce,
149
153
  {
150
154
  checked: e.getIsSelected(),
151
155
  disabled: !e.getCanSelect(),
@@ -156,21 +160,21 @@ function yt({
156
160
  enableSorting: !1,
157
161
  enableColumnFilter: !1,
158
162
  enableHiding: !1
159
- }, Oe = {
163
+ }, Le = {
160
164
  id: "_expand",
161
165
  header: () => null,
162
- cell: ({ row: e }) => /* @__PURE__ */ l(
166
+ cell: ({ row: e }) => /* @__PURE__ */ n(
163
167
  "button",
164
168
  {
165
169
  type: "button",
166
170
  onClick: () => e.toggleExpanded(),
167
171
  "aria-label": e.getIsExpanded() ? "Collapse row" : "Expand row",
168
172
  className: "flex items-center justify-center p-ds-01 rounded-ds-sm hover:bg-layer-02 transition-colors",
169
- children: /* @__PURE__ */ l(
170
- he,
173
+ children: /* @__PURE__ */ n(
174
+ ye,
171
175
  {
172
176
  size: 16,
173
- className: r(
177
+ className: a(
174
178
  "transition-transform duration-moderate-02",
175
179
  e.getIsExpanded() && "rotate-90"
176
180
  ),
@@ -182,125 +186,129 @@ function yt({
182
186
  enableSorting: !1,
183
187
  enableColumnFilter: !1,
184
188
  enableHiding: !1
185
- }, C = [
186
- ...x ? [Ae] : [],
187
- ...M ? [Oe] : [],
188
- ...H
189
- ], D = !!o, X = i || D, h = {
190
- columnVisibility: Te,
191
- columnPinning: oe
189
+ }, k = [
190
+ ...C ? [Ge] : [],
191
+ ...j ? [Le] : [],
192
+ ...A
193
+ ], M = !!o, Z = i || M, y = {
194
+ columnVisibility: je,
195
+ columnPinning: re
192
196
  };
193
- b && (h.sorting = De), (f || g) && (h.columnFilters = Ee, h.globalFilter = G), X && (h.pagination = Me), x && (h.rowSelection = U), M && (h.expanded = _e);
194
- const de = b && !!k, a = Pe({
195
- data: F,
196
- columns: C,
197
- state: h,
198
- onColumnVisibilityChange: Ve,
199
- onColumnPinningChange: $e,
200
- getCoreRowModel: ot(),
201
- ...b && {
202
- onSortingChange: de ? He : le,
203
- ...de ? { manualSorting: !0 } : { getSortedRowModel: nt() }
197
+ S && (y.sorting = Te), (h || p) && (y.columnFilters = Fe, y.globalFilter = W), Z && (y.pagination = Ve), C && (y.rowSelection = x), j && (y.expanded = Oe);
198
+ const ue = S && !!T, r = tt({
199
+ data: m,
200
+ columns: k,
201
+ state: y,
202
+ onColumnVisibilityChange: $e,
203
+ onColumnPinningChange: _e,
204
+ getCoreRowModel: at(),
205
+ ...S && {
206
+ onSortingChange: ue ? Be : se,
207
+ ...ue ? { manualSorting: !0 } : { getSortedRowModel: st() }
204
208
  },
205
- ...(f || g) && {
206
- onColumnFiltersChange: Fe,
207
- onGlobalFilterChange: L,
208
- getFilteredRowModel: lt()
209
+ ...(h || p) && {
210
+ onColumnFiltersChange: Me,
211
+ onGlobalFilterChange: X,
212
+ getFilteredRowModel: ot()
209
213
  },
210
- ...X && {
211
- onPaginationChange: D ? Be : Y,
212
- ...D ? {
214
+ ...Z && {
215
+ onPaginationChange: M ? Ke : q,
216
+ ...M ? {
213
217
  manualPagination: !0,
214
218
  pageCount: Math.ceil(
215
219
  o.total / o.pageSize
216
220
  )
217
- } : { getPaginationRowModel: tt() }
221
+ } : { getPaginationRowModel: nt() }
218
222
  },
219
- ...x && {
220
- onRowSelectionChange: ne,
221
- enableRowSelection: ee ? (e) => ee(e.original) : !0
223
+ ...C && {
224
+ onRowSelectionChange: ae,
225
+ enableRowSelection: oe ? (e) => oe(e.original) : !0
222
226
  },
223
- ...M && {
224
- onExpandedChange: K ? ve : ae,
225
- getExpandedRowModel: et()
227
+ ...j && {
228
+ onExpandedChange: U ? Ae : de,
229
+ getExpandedRowModel: lt()
226
230
  },
227
- ...te && {
228
- getRowId: (e) => te(e)
229
- }
230
- });
231
- _(() => {
232
- if (B) {
233
- const e = a.getFilteredSelectedRowModel().rows.map((t) => t.original);
234
- B(e);
231
+ ...g && {
232
+ getRowId: (e) => g(e)
235
233
  }
236
- }, [U, B, a]);
237
- function ce(e) {
238
- const { left: t = [], right: n = [] } = oe, s = t.indexOf(e), d = n.indexOf(e);
234
+ }), v = B(G);
235
+ D(() => {
236
+ v.current = G;
237
+ }, [G]), D(() => {
238
+ if (!v.current) return;
239
+ const e = Object.keys(x).filter((l) => x[l]), t = m.filter((l, s) => {
240
+ const c = g ? g(m[s]) : String(s);
241
+ return e.includes(c);
242
+ });
243
+ v.current(t);
244
+ }, [x, m, g]);
245
+ function me(e) {
246
+ const { left: t = [], right: l = [] } = re, s = t.indexOf(e), c = l.indexOf(e);
239
247
  return s !== -1 ? {
240
248
  className: "sticky bg-layer-01 z-raised",
241
249
  style: { left: 0 }
242
- } : d !== -1 ? {
250
+ } : c !== -1 ? {
243
251
  className: "sticky bg-layer-01 z-raised",
244
252
  style: { right: 0 }
245
253
  } : { className: "", style: {} };
246
254
  }
247
- function Ke(e) {
248
- if (!Ne || e === "_select" || e === "_expand") return !1;
249
- const t = a.getColumn(e);
255
+ function Ye(e) {
256
+ if (!Re || e === "_select" || e === "_expand") return !1;
257
+ const t = r.getColumn(e);
250
258
  if (!t) return !1;
251
- const n = t.columnDef.meta;
252
- return (n == null ? void 0 : n.enableEditing) !== !1;
259
+ const l = t.columnDef.meta;
260
+ return (l == null ? void 0 : l.enableEditing) !== !1;
253
261
  }
254
- const ie = ht[se], V = a.getRowModel().rows, ue = st({
255
- count: p ? V.length : 0,
256
- getScrollElement: () => re.current,
257
- estimateSize: () => Re,
262
+ const fe = xt[ce], _ = r.getRowModel().rows, ge = rt({
263
+ count: b ? _.length : 0,
264
+ getScrollElement: () => ie.current,
265
+ estimateSize: () => ze,
258
266
  overscan: 10
259
- }), Ge = (o == null ? void 0 : o.pageSize) ?? I ?? 5, Le = C.length, Ye = E(
267
+ }), Ue = (o == null ? void 0 : o.pageSize) ?? E ?? 5, We = k.length, Xe = V(
260
268
  (e, t) => {
261
- !z || t.target.closest(xt) || z(e);
269
+ !F || t.target.closest(St) || F(e);
262
270
  },
263
- [z]
271
+ [F]
264
272
  );
265
- function me(e, t) {
266
- const n = e.getVisibleCells();
267
- return /* @__PURE__ */ l(
268
- N,
273
+ function he(e, t) {
274
+ const l = e.getVisibleCells();
275
+ return /* @__PURE__ */ n(
276
+ z,
269
277
  {
270
278
  "data-state": e.getIsSelected() && "selected",
271
279
  style: t,
272
- className: r(
273
- p ? "absolute w-full flex" : void 0,
274
- z && "cursor-pointer"
280
+ className: a(
281
+ b ? "absolute w-full flex" : void 0,
282
+ F && "cursor-pointer"
275
283
  ),
276
- onClick: z ? (s) => Ye(e.original, s) : void 0,
277
- children: n.map((s) => {
278
- const d = ce(s.column.id), w = (S == null ? void 0 : S.rowIndex) === e.index && (S == null ? void 0 : S.columnId) === s.column.id;
279
- return /* @__PURE__ */ l(
280
- j,
284
+ onClick: F ? (s) => Xe(e.original, s) : void 0,
285
+ children: l.map((s) => {
286
+ const c = me(s.column.id), R = (w == null ? void 0 : w.rowIndex) === e.index && (w == null ? void 0 : w.columnId) === s.column.id;
287
+ return /* @__PURE__ */ n(
288
+ O,
281
289
  {
282
- className: r(
283
- ie,
284
- d.className,
285
- p && "flex-1"
290
+ className: a(
291
+ fe,
292
+ c.className,
293
+ b && "flex-1"
286
294
  ),
287
- style: d.style,
295
+ style: c.style,
288
296
  onDoubleClick: () => {
289
- Ke(s.column.id) && W({
297
+ Ye(s.column.id) && J({
290
298
  rowIndex: e.index,
291
299
  columnId: s.column.id
292
300
  });
293
301
  },
294
- children: w ? /* @__PURE__ */ l(
295
- bt,
302
+ children: R ? /* @__PURE__ */ n(
303
+ yt,
296
304
  {
297
305
  initialValue: String(s.getValue() ?? ""),
298
- onSave: (m) => {
299
- A == null || A(e.index, s.column.id, m), W(null);
306
+ onSave: (f) => {
307
+ L == null || L(e.index, s.column.id, f), J(null);
300
308
  },
301
- onCancel: () => W(null)
309
+ onCancel: () => J(null)
302
310
  }
303
- ) : J(s.column.columnDef.cell, s.getContext())
311
+ ) : ee(s.column.columnDef.cell, s.getContext())
304
312
  },
305
313
  s.id
306
314
  );
@@ -309,105 +317,112 @@ function yt({
309
317
  e.id
310
318
  );
311
319
  }
312
- function Ue(e, t) {
313
- return !M || !e.getIsExpanded() || !Z ? null : /* @__PURE__ */ l(
314
- N,
320
+ function qe(e, t) {
321
+ return !j || !e.getIsExpanded() || !le ? null : /* @__PURE__ */ n(
322
+ z,
315
323
  {
316
324
  style: t,
317
- className: p ? "absolute w-full flex" : void 0,
318
- children: /* @__PURE__ */ l(
319
- j,
325
+ className: b ? "absolute w-full flex" : void 0,
326
+ children: /* @__PURE__ */ n(
327
+ O,
320
328
  {
321
- colSpan: C.length,
322
- className: r(
329
+ colSpan: k.length,
330
+ className: a(
323
331
  "bg-layer-02 p-ds-05",
324
- p && "flex-1"
332
+ b && "flex-1"
325
333
  ),
326
- children: Z(e.original)
334
+ children: le(e.original)
327
335
  }
328
336
  )
329
337
  },
330
338
  `${e.id}-expanded`
331
339
  );
332
340
  }
333
- function We() {
341
+ function Je() {
334
342
  const e = ["w-3/4", "w-1/2", "w-2/3", "w-full"];
335
- return /* @__PURE__ */ l($, { children: Array.from({ length: Ge }, (t, n) => /* @__PURE__ */ l(N, { children: Array.from({ length: Le }, (s, d) => {
336
- var ge, pe;
337
- const m = (((ge = C[d]) == null ? void 0 : ge.id) ?? ((pe = C[d]) == null ? void 0 : pe.header)) === "_select";
338
- return /* @__PURE__ */ l(
339
- j,
343
+ return /* @__PURE__ */ n(H, { children: Array.from({ length: Ue }, (t, l) => /* @__PURE__ */ n(z, { children: Array.from({ length: We }, (s, c) => {
344
+ var be, xe;
345
+ const f = (((be = k[c]) == null ? void 0 : be.id) ?? ((xe = k[c]) == null ? void 0 : xe.header)) === "_select";
346
+ return /* @__PURE__ */ n(
347
+ O,
340
348
  {
341
- className: ie,
342
- children: m ? /* @__PURE__ */ l(ye, { variant: "text", className: "h-4 w-4", animation: "pulse" }) : /* @__PURE__ */ l(ye, { variant: "text", className: r("h-4", e[d % e.length]), animation: "pulse" })
349
+ className: fe,
350
+ children: f ? /* @__PURE__ */ n(Ne, { variant: "text", className: "h-4 w-4", animation: "pulse" }) : /* @__PURE__ */ n(Ne, { variant: "text", className: a("h-4", e[c % e.length]), animation: "pulse" })
343
351
  },
344
- `skeleton-${n}-${d}`
352
+ `skeleton-${l}-${c}`
345
353
  );
346
- }) }, `skeleton-${n}`)) });
354
+ }) }, `skeleton-${l}`)) });
347
355
  }
348
- function Xe() {
349
- if (ke)
350
- return We();
351
- if (!V.length)
352
- return /* @__PURE__ */ l($, { children: /* @__PURE__ */ l(N, { children: /* @__PURE__ */ l(
353
- j,
356
+ function Qe() {
357
+ if (Ie)
358
+ return Je();
359
+ if (!_.length)
360
+ return /* @__PURE__ */ n(H, { children: /* @__PURE__ */ n(z, { children: /* @__PURE__ */ n(
361
+ O,
354
362
  {
355
- colSpan: C.length,
356
- className: r(
363
+ colSpan: k.length,
364
+ className: a(
357
365
  "h-24 text-center",
358
- !P && "text-text-tertiary"
366
+ !ne && "text-text-tertiary"
359
367
  ),
360
- children: P || R || "No results."
368
+ children: ne || I || "No results."
361
369
  }
362
370
  ) }) });
363
- if (p) {
364
- const e = ue.getVirtualItems(), t = ue.getTotalSize();
365
- return /* @__PURE__ */ l(
366
- $,
371
+ if (b) {
372
+ const e = ge.getVirtualItems(), t = ge.getTotalSize();
373
+ return /* @__PURE__ */ n(
374
+ H,
367
375
  {
368
376
  style: {
369
377
  height: `${t}px`,
370
378
  position: "relative"
371
379
  },
372
- children: e.map((n) => {
373
- const s = V[n.index];
374
- return me(s, {
380
+ children: e.map((l) => {
381
+ const s = _[l.index];
382
+ return he(s, {
375
383
  position: "absolute",
376
384
  top: 0,
377
385
  left: 0,
378
386
  width: "100%",
379
- height: `${n.size}px`,
380
- transform: `translateY(${n.start}px)`
387
+ height: `${l.size}px`,
388
+ transform: `translateY(${l.start}px)`
381
389
  });
382
390
  })
383
391
  }
384
392
  );
385
393
  }
386
- return /* @__PURE__ */ l($, { children: V.map((e) => /* @__PURE__ */ c(Qe.Fragment, { children: [
387
- me(e),
388
- Ue(e)
394
+ return /* @__PURE__ */ n(H, { children: _.map((e) => /* @__PURE__ */ d(Pe.Fragment, { children: [
395
+ he(e),
396
+ qe(e)
389
397
  ] }, e.id)) });
390
398
  }
391
- const q = Ze(() => !T || !x ? [] : a.getFilteredSelectedRowModel().rows.map((e) => e.original), [T, x, a, U]), qe = q.length > 0, Je = D ? o.total : a.getFilteredRowModel().rows.length, fe = /* @__PURE__ */ c(mt, { children: [
392
- /* @__PURE__ */ c(
393
- ft,
399
+ const P = et(() => {
400
+ if (!$ || !C) return [];
401
+ const e = Object.keys(x).filter((t) => x[t]);
402
+ return m.filter((t, l) => {
403
+ const s = g ? g(m[l]) : String(l);
404
+ return e.includes(s);
405
+ });
406
+ }, [$, C, x, m, g]), Ze = P.length > 0, ve = M ? o.total : r.getFilteredRowModel().rows.length, pe = /* @__PURE__ */ d(gt, { children: [
407
+ /* @__PURE__ */ d(
408
+ ht,
394
409
  {
395
- className: r(
396
- ze && "sticky top-0 z-10 bg-surface"
410
+ className: a(
411
+ Ee && "sticky top-0 z-10 bg-surface"
397
412
  ),
398
413
  children: [
399
- a.getHeaderGroups().map((e) => /* @__PURE__ */ l(N, { children: e.headers.map((t) => {
400
- const n = b && t.column.getCanSort(), s = t.column.getIsSorted(), d = ce(t.column.id);
401
- return /* @__PURE__ */ l(
402
- be,
414
+ r.getHeaderGroups().map((e) => /* @__PURE__ */ n(z, { children: e.headers.map((t) => {
415
+ const l = S && t.column.getCanSort(), s = t.column.getIsSorted(), c = me(t.column.id);
416
+ return /* @__PURE__ */ n(
417
+ Se,
403
418
  {
404
- className: d.className,
405
- style: d.style,
406
- children: t.isPlaceholder ? null : n ? /* @__PURE__ */ c(
419
+ className: c.className,
420
+ style: c.style,
421
+ children: t.isPlaceholder ? null : l ? /* @__PURE__ */ d(
407
422
  "button",
408
423
  {
409
424
  type: "button",
410
- className: r(
425
+ className: a(
411
426
  "flex items-center gap-ds-01 font-medium",
412
427
  "cursor-pointer select-none",
413
428
  "-ml-ds-01 rounded-ds-sm px-ds-01 py-ds-01",
@@ -416,24 +431,24 @@ function yt({
416
431
  onClick: t.column.getToggleSortingHandler(),
417
432
  "aria-label": `Sort by ${typeof t.column.columnDef.header == "string" ? t.column.columnDef.header : t.column.id}`,
418
433
  children: [
419
- J(
434
+ ee(
420
435
  t.column.columnDef.header,
421
436
  t.getContext()
422
437
  ),
423
- s === "asc" ? /* @__PURE__ */ l(
424
- at,
438
+ s === "asc" ? /* @__PURE__ */ n(
439
+ ct,
425
440
  {
426
441
  className: "h-ico-sm w-ico-sm text-text-secondary",
427
442
  "aria-hidden": "true"
428
443
  }
429
- ) : s === "desc" ? /* @__PURE__ */ l(
430
- rt,
444
+ ) : s === "desc" ? /* @__PURE__ */ n(
445
+ dt,
431
446
  {
432
447
  className: "h-ico-sm w-ico-sm text-text-secondary",
433
448
  "aria-hidden": "true"
434
449
  }
435
- ) : /* @__PURE__ */ l(
436
- dt,
450
+ ) : /* @__PURE__ */ n(
451
+ it,
437
452
  {
438
453
  className: "h-ico-sm w-ico-sm text-text-tertiary",
439
454
  "aria-hidden": "true"
@@ -441,7 +456,7 @@ function yt({
441
456
  )
442
457
  ]
443
458
  }
444
- ) : J(
459
+ ) : ee(
445
460
  t.column.columnDef.header,
446
461
  t.getContext()
447
462
  )
@@ -449,15 +464,15 @@ function yt({
449
464
  t.id
450
465
  );
451
466
  }) }, e.id)),
452
- f && a.getHeaderGroups().map((e) => /* @__PURE__ */ l(N, { children: e.headers.map((t) => /* @__PURE__ */ l(be, { className: "py-ds-01", children: t.isPlaceholder || t.column.columnDef.enableColumnFilter === !1 ? null : /* @__PURE__ */ l(
467
+ h && r.getHeaderGroups().map((e) => /* @__PURE__ */ n(z, { children: e.headers.map((t) => /* @__PURE__ */ n(Se, { className: "py-ds-01", children: t.isPlaceholder || t.column.columnDef.enableColumnFilter === !1 ? null : /* @__PURE__ */ n(
453
468
  "input",
454
469
  {
455
470
  type: "text",
456
471
  value: t.column.getFilterValue() ?? "",
457
- onChange: (n) => t.column.setFilterValue(n.target.value),
472
+ onChange: (l) => t.column.setFilterValue(l.target.value),
458
473
  placeholder: `Filter ${typeof t.column.columnDef.header == "string" ? t.column.columnDef.header : ""}...`,
459
474
  "aria-label": `Filter ${typeof t.column.columnDef.header == "string" ? t.column.columnDef.header : t.column.id}`,
460
- className: r(
475
+ className: a(
461
476
  "h-ds-xs-plus w-full rounded-ds-md",
462
477
  "border border-border bg-field",
463
478
  "px-ds-02 text-ds-sm",
@@ -469,38 +484,38 @@ function yt({
469
484
  ]
470
485
  }
471
486
  ),
472
- Xe()
487
+ Qe()
473
488
  ] });
474
- return /* @__PURE__ */ c("div", { className: r(v), children: [
475
- Q && /* @__PURE__ */ l(
476
- pt,
489
+ return /* @__PURE__ */ d("div", { className: a(K), children: [
490
+ te && /* @__PURE__ */ n(
491
+ bt,
477
492
  {
478
- table: a,
479
- globalFilter: g,
480
- globalFilterValue: G,
481
- onGlobalFilterChange: L,
482
- density: se,
483
- onDensityChange: je
493
+ table: r,
494
+ globalFilter: p,
495
+ globalFilterValue: W,
496
+ onGlobalFilterChange: X,
497
+ density: ce,
498
+ onDensityChange: He
484
499
  }
485
500
  ),
486
- g && !Q && /* @__PURE__ */ c("div", { className: "flex items-center gap-ds-03 pb-ds-04 border-b border-border-subtle mb-ds-04", children: [
487
- /* @__PURE__ */ l(
488
- ct,
501
+ p && !te && /* @__PURE__ */ d("div", { className: "flex items-center gap-ds-03 pb-ds-04 border-b border-border-subtle mb-ds-04", children: [
502
+ /* @__PURE__ */ n(
503
+ ut,
489
504
  {
490
505
  size: 16,
491
506
  className: "text-icon-secondary",
492
507
  "aria-hidden": "true"
493
508
  }
494
509
  ),
495
- /* @__PURE__ */ l(
510
+ /* @__PURE__ */ n(
496
511
  "input",
497
512
  {
498
513
  type: "text",
499
- value: G,
500
- onChange: (e) => L(e.target.value),
514
+ value: W,
515
+ onChange: (e) => X(e.target.value),
501
516
  placeholder: "Search all columns...",
502
517
  "aria-label": "Search all columns",
503
- className: r(
518
+ className: a(
504
519
  "flex-1 bg-transparent text-ds-md",
505
520
  "text-text-primary placeholder:text-text-placeholder",
506
521
  "outline-none"
@@ -508,87 +523,87 @@ function yt({
508
523
  }
509
524
  )
510
525
  ] }),
511
- p ? /* @__PURE__ */ l(
526
+ b ? /* @__PURE__ */ n(
512
527
  "div",
513
528
  {
514
- ref: re,
515
- style: { maxHeight: `${Ie}px`, overflowY: "auto" },
516
- children: fe
529
+ ref: ie,
530
+ style: { maxHeight: `${De}px`, overflowY: "auto" },
531
+ children: pe
517
532
  }
518
- ) : fe,
519
- X && /* @__PURE__ */ c("div", { className: "flex items-center justify-between px-ds-03 py-ds-04 border-t border-border-subtle", children: [
520
- /* @__PURE__ */ c("span", { className: "text-ds-sm text-text-secondary", children: [
521
- Je,
533
+ ) : pe,
534
+ Z && /* @__PURE__ */ d("div", { className: "flex items-center justify-between px-ds-03 py-ds-04 border-t border-border-subtle", children: [
535
+ /* @__PURE__ */ d("span", { className: "text-ds-sm text-text-secondary", children: [
536
+ ve,
522
537
  " total rows"
523
538
  ] }),
524
- /* @__PURE__ */ c("div", { className: "flex items-center gap-ds-03", children: [
525
- !D && /* @__PURE__ */ l(
539
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-ds-03", children: [
540
+ !M && /* @__PURE__ */ n(
526
541
  "select",
527
542
  {
528
- value: a.getState().pagination.pageSize,
543
+ value: r.getState().pagination.pageSize,
529
544
  onChange: (e) => {
530
- a.setPageSize(Number(e.target.value));
545
+ r.setPageSize(Number(e.target.value));
531
546
  },
532
547
  "aria-label": "Rows per page",
533
- className: r(
548
+ className: a(
534
549
  "h-ds-sm rounded-ds-md",
535
550
  "border border-border bg-field",
536
551
  "px-ds-03 text-ds-sm",
537
552
  "text-text-primary"
538
553
  ),
539
- children: (Ce ?? [10, 20, 50, 100]).map((e) => /* @__PURE__ */ c("option", { value: e, children: [
554
+ children: (we ?? [10, 20, 50, 100]).map((e) => /* @__PURE__ */ d("option", { value: e, children: [
540
555
  e,
541
556
  " rows"
542
557
  ] }, e))
543
558
  }
544
559
  ),
545
- /* @__PURE__ */ l(
560
+ /* @__PURE__ */ n(
546
561
  "button",
547
562
  {
548
563
  type: "button",
549
- disabled: !a.getCanPreviousPage(),
550
- onClick: () => a.previousPage(),
564
+ disabled: !r.getCanPreviousPage(),
565
+ onClick: () => r.previousPage(),
551
566
  "aria-label": "Previous page",
552
- className: r(
567
+ className: a(
553
568
  "h-ds-sm w-ds-sm flex items-center justify-center",
554
569
  "rounded-ds-md border border-border",
555
570
  "enabled:hover:bg-layer-02",
556
571
  "disabled:opacity-[0.38] disabled:cursor-not-allowed",
557
572
  "transition-colors"
558
573
  ),
559
- children: /* @__PURE__ */ l(it, { size: 16, "aria-hidden": "true" })
574
+ children: /* @__PURE__ */ n(mt, { size: 16, "aria-hidden": "true" })
560
575
  }
561
576
  ),
562
- /* @__PURE__ */ c("span", { className: "text-ds-sm text-text-secondary", children: [
577
+ /* @__PURE__ */ d("span", { className: "text-ds-sm text-text-secondary", children: [
563
578
  "Page ",
564
- a.getState().pagination.pageIndex + 1,
579
+ r.getState().pagination.pageIndex + 1,
565
580
  " of",
566
581
  " ",
567
- a.getPageCount()
582
+ r.getPageCount()
568
583
  ] }),
569
- /* @__PURE__ */ l(
584
+ /* @__PURE__ */ n(
570
585
  "button",
571
586
  {
572
587
  type: "button",
573
- disabled: !a.getCanNextPage(),
574
- onClick: () => a.nextPage(),
588
+ disabled: !r.getCanNextPage(),
589
+ onClick: () => r.nextPage(),
575
590
  "aria-label": "Next page",
576
- className: r(
591
+ className: a(
577
592
  "h-ds-sm w-ds-sm flex items-center justify-center",
578
593
  "rounded-ds-md border border-border",
579
594
  "enabled:hover:bg-layer-02",
580
595
  "disabled:opacity-[0.38] disabled:cursor-not-allowed",
581
596
  "transition-colors"
582
597
  ),
583
- children: /* @__PURE__ */ l(he, { size: 16, "aria-hidden": "true" })
598
+ children: /* @__PURE__ */ n(ye, { size: 16, "aria-hidden": "true" })
584
599
  }
585
600
  )
586
601
  ] })
587
602
  ] }),
588
- T && x && qe && /* @__PURE__ */ c(
603
+ $ && C && Ze && /* @__PURE__ */ d(
589
604
  "div",
590
605
  {
591
- className: r(
606
+ className: a(
592
607
  "fixed bottom-6 left-1/2 -translate-x-1/2 z-50",
593
608
  "flex items-center gap-ds-04 px-ds-05 py-ds-03",
594
609
  "rounded-ds-lg border border-border bg-surface shadow-lg",
@@ -597,34 +612,34 @@ function yt({
597
612
  role: "toolbar",
598
613
  "aria-label": "Bulk actions",
599
614
  children: [
600
- /* @__PURE__ */ c("span", { className: "text-ds-sm font-medium text-text-primary whitespace-nowrap", children: [
601
- q.length,
615
+ /* @__PURE__ */ d("span", { className: "text-ds-sm font-medium text-text-primary whitespace-nowrap", children: [
616
+ P.length,
602
617
  " selected"
603
618
  ] }),
604
- /* @__PURE__ */ l("div", { className: "h-5 w-px bg-border", "aria-hidden": "true" }),
605
- T.map((e) => /* @__PURE__ */ l(
606
- gt,
619
+ /* @__PURE__ */ n("div", { className: "h-5 w-px bg-border", "aria-hidden": "true" }),
620
+ $.map((e) => /* @__PURE__ */ n(
621
+ pt,
607
622
  {
608
623
  size: "sm",
609
624
  variant: e.color === "error" ? "destructive" : "outline",
610
625
  disabled: e.disabled,
611
- onClick: () => e.onClick(q),
626
+ onClick: () => e.onClick(P),
612
627
  children: e.label
613
628
  },
614
629
  e.label
615
630
  )),
616
- /* @__PURE__ */ l(
631
+ /* @__PURE__ */ n(
617
632
  "button",
618
633
  {
619
634
  type: "button",
620
- onClick: () => a.resetRowSelection(),
635
+ onClick: () => r.resetRowSelection(),
621
636
  "aria-label": "Clear selection",
622
- className: r(
637
+ className: a(
623
638
  "flex items-center justify-center p-ds-01",
624
639
  "rounded-ds-sm hover:bg-layer-02 transition-colors",
625
640
  "text-text-secondary hover:text-text-primary"
626
641
  ),
627
- children: /* @__PURE__ */ l(ut, { size: 16, "aria-hidden": "true" })
642
+ children: /* @__PURE__ */ n(ft, { size: 16, "aria-hidden": "true" })
628
643
  }
629
644
  )
630
645
  ]
@@ -632,7 +647,7 @@ function yt({
632
647
  )
633
648
  ] });
634
649
  }
635
- yt.displayName = "DataTable";
650
+ Ct.displayName = "DataTable";
636
651
  export {
637
- yt as DataTable
652
+ Ct as DataTable
638
653
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devalok/shilp-sutra",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "Devalok Design System — tokens, components, and patterns for Next.js",
5
5
  "license": "MIT",
6
6
  "type": "module",