@noxickon/onyx 6.3.0 → 6.4.0

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.
@@ -16,6 +16,9 @@ export declare const buttonVariants: import('tailwind-variants').TVReturnType<{
16
16
  'soft-primary': {
17
17
  base: string[];
18
18
  };
19
+ 'ghost-primary': {
20
+ base: string[];
21
+ };
19
22
  destructive: {
20
23
  base: string[];
21
24
  };
@@ -63,6 +66,9 @@ export declare const buttonVariants: import('tailwind-variants').TVReturnType<{
63
66
  'soft-primary': {
64
67
  base: string[];
65
68
  };
69
+ 'ghost-primary': {
70
+ base: string[];
71
+ };
66
72
  destructive: {
67
73
  base: string[];
68
74
  };
@@ -110,6 +116,9 @@ export declare const buttonVariants: import('tailwind-variants').TVReturnType<{
110
116
  'soft-primary': {
111
117
  base: string[];
112
118
  };
119
+ 'ghost-primary': {
120
+ base: string[];
121
+ };
113
122
  destructive: {
114
123
  base: string[];
115
124
  };
@@ -29,6 +29,7 @@ var n = ["h-auto rounded-sm px-0 tracking-normal shadow-none active:scale-100"],
29
29
  outline: { base: ["text-fg-muted border-line", "ox-engaged:bg-surface-raised ox-engaged:text-fg ox-engaged:border-line-strong"] },
30
30
  ghost: { base: ["text-fg-muted", "ox-engaged:bg-surface-raised ox-engaged:text-fg"] },
31
31
  "soft-primary": { base: ["bg-primary-soft text-primary-soft-fg", "ox-engaged:bg-[color-mix(in_oklab,var(--primary-soft),var(--fg)_8%)]"] },
32
+ "ghost-primary": { base: ["text-primary-ink", "ox-engaged:bg-primary-soft"] },
32
33
  destructive: { base: [
33
34
  "bg-danger-solid text-danger-solid-fg",
34
35
  t,
@@ -17,73 +17,69 @@ import { SortableContext as L, sortableKeyboardCoordinates as R, useSortable as
17
17
  import { CSS as V } from "@dnd-kit/utilities";
18
18
  import { pick as H } from "es-toolkit";
19
19
  //#region src/components/DataTable/DataTable.tsx
20
- var U = "__ox-expand", W = "__ox-select", ee = [
20
+ var U = "__ox-expand", W = "__ox-select", G = [
21
21
  "w-3/5",
22
22
  "w-2/5",
23
23
  "w-4/5"
24
- ], { Provider: te, useRequiredContext: G } = e("OxDataTable"), K = (...e) => e.filter(Boolean).join(" ") || void 0, ne = (e) => {
24
+ ], { Provider: ee, useRequiredContext: K } = e("OxDataTable"), q = (...e) => e.filter(Boolean).join(" ") || void 0, te = (e) => {
25
25
  if (typeof e == "number") return e;
26
26
  if (typeof e == "string" && e.endsWith("px")) return Number.parseFloat(e);
27
- }, re = (e) => e == null ? null : typeof e == "string" || typeof e == "number" ? e : typeof e == "boolean" ? e ? "Yes" : "No" : null, ie = (e) => w(e) && e.type === Z;
28
- function q(e) {
29
- let t = d(61), { caption: n, children: r, className: i, columnOrder: u, columnVisibility: f, columns: p, data: m, defaultColumnOrder: h, defaultColumnVisibility: g, defaultExpandedRows: _, defaultFrozenColumns: v, defaultPage: y, defaultSelectedRows: b, defaultSort: x, density: S, emptyState: w, endReachedThreshold: D, frozenColumns: O, getRowCanExpand: j, getRowId: M, hover: N, loading: P, maxHeight: F, onColumnOrderChange: I, onColumnVisibilityChange: L, onEndReached: R, onFrozenColumnsChange: z, onPageChange: B, onSelectionChange: V, onSortChange: H, page: G, pageSize: re, paginationMode: ie, renderExpandedRow: q, rowCount: pe, selectable: me, selectedRows: he, sort: J, stickyHeader: Y } = e, X = x === void 0 ? null : x, Z = S === void 0 ? "comfortable" : S, ge = w === void 0 ? "No results." : w, _e = D === void 0 ? 320 : D, ve = N === void 0 ? !0 : N, ye = P === void 0 ? !1 : P, be = re === void 0 ? 10 : re, xe = ie === void 0 ? "pages" : ie, Se = me === void 0 ? !1 : me, Ce = Y === void 0 ? !0 : Y, we = T(), Q = c({ density: Z }), Te = new Map(p.map(de)), Ee = ue, De;
30
- t[0] !== p || t[1] !== h ? (De = h ?? p.map(le), t[0] = p, t[1] = h, t[2] = De) : De = t[2];
31
- let Oe;
32
- t[3] !== u || t[4] !== I || t[5] !== De ? (Oe = {
27
+ }, ne = (e) => e == null ? null : typeof e == "string" || typeof e == "number" ? e : typeof e == "boolean" ? e ? "Yes" : "No" : null, re = (e) => w(e) && e.type === Q;
28
+ function J(e) {
29
+ let t = d(56), { caption: n, children: r, className: i, columnOrder: u, columnVisibility: f, columns: p, data: m, defaultColumnOrder: h, defaultColumnVisibility: g, defaultExpandedRows: _, defaultFrozenColumns: v, defaultPage: y, defaultSelectedRows: b, defaultSort: x, density: S, emptyState: w, endReachedThreshold: D, frozenColumns: O, getRowCanExpand: j, getRowId: M, hover: N, loading: P, maxHeight: F, onColumnOrderChange: I, onColumnVisibilityChange: L, onEndReached: R, onFrozenColumnsChange: z, onPageChange: B, onSelectionChange: V, onSortChange: H, page: K, pageSize: ne, paginationMode: re, renderExpandedRow: J, rowCount: me, selectable: he, selectedRows: ge, sort: Y, stickyHeader: X } = e, Z = x === void 0 ? null : x, Q = S === void 0 ? "comfortable" : S, _e = w === void 0 ? "No results." : w, ve = D === void 0 ? 320 : D, ye = N === void 0 ? !0 : N, be = P === void 0 ? !1 : P, xe = ne === void 0 ? 10 : ne, Se = re === void 0 ? "pages" : re, Ce = he === void 0 ? !1 : he, we = X === void 0 ? !0 : X, Te = T(), $ = c({ density: Q }), Ee = new Map(p.map(fe)), De = de, Oe;
30
+ t[0] !== p || t[1] !== h ? (Oe = h ?? p.map(ue), t[0] = p, t[1] = h, t[2] = Oe) : Oe = t[2];
31
+ let ke;
32
+ t[3] !== u || t[4] !== I || t[5] !== Oe ? (ke = {
33
33
  prop: u,
34
- defaultProp: De,
34
+ defaultProp: Oe,
35
35
  onChange: I
36
- }, t[3] = u, t[4] = I, t[5] = De, t[6] = Oe) : Oe = t[6];
37
- let [ke, Ae] = o(Oe), je;
38
- t[7] === g ? je = t[8] : (je = g ?? {}, t[7] = g, t[8] = je);
39
- let Me;
40
- t[9] !== f || t[10] !== L || t[11] !== je ? (Me = {
36
+ }, t[3] = u, t[4] = I, t[5] = Oe, t[6] = ke) : ke = t[6];
37
+ let [Ae, je] = o(ke), Me;
38
+ t[7] === g ? Me = t[8] : (Me = g ?? {}, t[7] = g, t[8] = Me);
39
+ let Ne;
40
+ t[9] !== f || t[10] !== L || t[11] !== Me ? (Ne = {
41
41
  prop: f,
42
- defaultProp: je,
42
+ defaultProp: Me,
43
43
  onChange: L
44
- }, t[9] = f, t[10] = L, t[11] = je, t[12] = Me) : Me = t[12];
45
- let [Ne, Pe] = o(Me), Fe;
46
- t[13] === v ? Fe = t[14] : (Fe = v ?? [], t[13] = v, t[14] = Fe);
47
- let Ie;
48
- t[15] !== O || t[16] !== z || t[17] !== Fe ? (Ie = {
44
+ }, t[9] = f, t[10] = L, t[11] = Me, t[12] = Ne) : Ne = t[12];
45
+ let [Pe, Fe] = o(Ne), Ie;
46
+ t[13] === v ? Ie = t[14] : (Ie = v ?? [], t[13] = v, t[14] = Ie);
47
+ let Le;
48
+ t[15] !== O || t[16] !== z || t[17] !== Ie ? (Le = {
49
49
  prop: O,
50
- defaultProp: Fe,
50
+ defaultProp: Ie,
51
51
  onChange: z
52
- }, t[15] = O, t[16] = z, t[17] = Fe, t[18] = Ie) : Ie = t[18];
53
- let [Le, Re] = o(Ie), ze;
54
- t[19] !== X || t[20] !== J ? (ze = {
55
- prop: J,
56
- defaultProp: X
57
- }, t[19] = X, t[20] = J, t[21] = ze) : ze = t[21];
58
- let [Be, Ve] = o(ze), He;
59
- t[22] === b ? He = t[23] : (He = b ?? /* @__PURE__ */ new Set(), t[22] = b, t[23] = He);
60
- let Ue;
61
- t[24] !== V || t[25] !== he || t[26] !== He ? (Ue = {
62
- prop: he,
63
- defaultProp: He,
52
+ }, t[15] = O, t[16] = z, t[17] = Ie, t[18] = Le) : Le = t[18];
53
+ let [Re, ze] = o(Le), Be;
54
+ t[19] !== Z || t[20] !== Y ? (Be = {
55
+ prop: Y,
56
+ defaultProp: Z
57
+ }, t[19] = Z, t[20] = Y, t[21] = Be) : Be = t[21];
58
+ let [Ve, He] = o(Be), Ue;
59
+ t[22] === b ? Ue = t[23] : (Ue = b ?? /* @__PURE__ */ new Set(), t[22] = b, t[23] = Ue);
60
+ let We;
61
+ t[24] !== V || t[25] !== ge || t[26] !== Ue ? (We = {
62
+ prop: ge,
63
+ defaultProp: Ue,
64
64
  onChange: V
65
- }, t[24] = V, t[25] = he, t[26] = He, t[27] = Ue) : Ue = t[27];
66
- let [We, Ge] = o(Ue), Ke = y ?? 1, qe;
67
- t[28] !== B || t[29] !== G || t[30] !== Ke ? (qe = {
68
- prop: G,
69
- defaultProp: Ke,
65
+ }, t[24] = V, t[25] = ge, t[26] = Ue, t[27] = We) : We = t[27];
66
+ let [Ge, Ke] = o(We), qe = y ?? 1, Je;
67
+ t[28] !== B || t[29] !== K || t[30] !== qe ? (Je = {
68
+ prop: K,
69
+ defaultProp: qe,
70
70
  onChange: B
71
- }, t[28] = B, t[29] = G, t[30] = Ke, t[31] = qe) : qe = t[31];
72
- let [Je, Ye] = o(qe), Xe = l(p, ke), Ze;
73
- t[32] === Ne ? Ze = t[33] : (Ze = (e) => Ne[e] !== !1, t[32] = Ne, t[33] = Ze);
74
- let Qe = Ze, $e = Xe.map((e) => Te.get(e)).filter(ce), et;
75
- t[34] === Qe ? et = t[35] : (et = (e) => Qe(e.id), t[34] = Qe, t[35] = et);
76
- let tt = $e.filter(et), nt = new Set(Le), rt = tt.filter((e) => nt.has(e.id)), it = [...rt, ...tt.filter((e) => !nt.has(e.id))], at = nt.size > 0, ot = [];
77
- q && ot.push({
71
+ }, t[28] = B, t[29] = K, t[30] = qe, t[31] = Je) : Je = t[31];
72
+ let [Ye, Xe] = o(Je), Ze = l(p, Ae), Qe = (e) => Pe[e] !== !1, $e = Ze.map((e) => Ee.get(e)).filter(le), et = [...$e.filter(ce), ...$e.filter(se)], tt = et.filter((e) => e.system || Qe(e.id)), nt = new Set(Re), rt = tt.filter((e) => nt.has(e.id)), it = [...rt, ...tt.filter((e) => !nt.has(e.id))], at = nt.size > 0, ot = [];
73
+ J && ot.push({
78
74
  key: U,
79
75
  width: 44
80
- }), Se && ot.push({
76
+ }), Ce && ot.push({
81
77
  key: W,
82
78
  width: 48
83
79
  });
84
80
  for (let e of rt) ot.push({
85
81
  key: e.id,
86
- width: ne(e.width) ?? ne(e.minWidth) ?? 200
82
+ width: te(e.width) ?? te(e.minWidth) ?? 200
87
83
  });
88
84
  let st = /* @__PURE__ */ new Map(), ct = 0;
89
85
  for (let e of ot) st.set(e.key, ct), ct += e.width;
@@ -94,8 +90,8 @@ function q(e) {
94
90
  if (st.has(e)) if (at) i = "left", r.left = st.get(e), e !== lt && (a = "shadow-none", o = "shadow-none");
95
91
  else {
96
92
  Object.assign(r, { "--ox-frozen-left": `${st.get(e)}px` });
97
- let t = e === lt ? Q.frozenEdge() : void 0;
98
- a = K(Q.frozenHead(), t), o = K(Q.frozenCell(), t);
93
+ let t = e === lt ? $.frozenEdge() : void 0;
94
+ a = q($.frozenHead(), t), o = q($.frozenCell(), t);
99
95
  }
100
96
  return {
101
97
  sticky: i,
@@ -104,82 +100,81 @@ function q(e) {
104
100
  style: Object.keys(r).length > 0 ? r : void 0
105
101
  };
106
102
  }, dt;
107
- t[36] !== H || t[37] !== Ve || t[38] !== Be ? (dt = (e, t) => {
103
+ t[32] !== H || t[33] !== He || t[34] !== Ve ? (dt = (e, t) => {
108
104
  let n;
109
- n = t === void 0 ? !Be || Be.columnId !== e ? {
105
+ n = t === void 0 ? !Ve || Ve.columnId !== e ? {
110
106
  columnId: e,
111
107
  direction: "asc"
112
- } : Be.direction === "asc" ? {
108
+ } : Ve.direction === "asc" ? {
113
109
  columnId: e,
114
110
  direction: "desc"
115
111
  } : null : t === null ? null : {
116
112
  columnId: e,
117
113
  direction: t
118
- }, Ve(n), H?.(e, n?.direction ?? null);
119
- }, t[36] = H, t[37] = Ve, t[38] = Be, t[39] = dt) : dt = t[39];
114
+ }, He(n), H?.(e, n?.direction ?? null);
115
+ }, t[32] = H, t[33] = He, t[34] = Ve, t[35] = dt) : dt = t[35];
120
116
  let ft = dt, pt;
121
- t[40] === Re ? pt = t[41] : (pt = (e) => {
122
- Re((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
123
- }, t[40] = Re, t[41] = pt);
117
+ t[36] === ze ? pt = t[37] : (pt = (e) => {
118
+ ze((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
119
+ }, t[36] = ze, t[37] = pt);
124
120
  let mt = pt, ht;
125
- t[42] === Pe ? ht = t[43] : (ht = (e) => {
126
- Pe((t) => ({
121
+ t[38] === Fe ? ht = t[39] : (ht = (e) => {
122
+ Fe((t) => ({
127
123
  ...t,
128
124
  [e]: !1
129
125
  }));
130
- }, t[42] = Pe, t[43] = ht);
126
+ }, t[38] = Fe, t[39] = ht);
131
127
  let gt = ht, _t;
132
- t[44] === Ge ? _t = t[45] : (_t = () => Ge(/* @__PURE__ */ new Set()), t[44] = Ge, t[45] = _t);
128
+ t[40] === Ke ? _t = t[41] : (_t = () => Ke(/* @__PURE__ */ new Set()), t[40] = Ke, t[41] = _t);
133
129
  let vt = _t, yt;
134
- t[46] !== M || t[47] !== We ? (yt = (e) => We.has(M(e)), t[46] = M, t[47] = We, t[48] = yt) : yt = t[48];
135
- let bt = m.filter(yt), xt = pe == null ? void 0 : Math.max(1, Math.ceil(pe / be)), St;
136
- t[49] === Symbol.for("react.memo_cache_sentinel") ? (St = (e) => ({
137
- header: e.header,
138
- hideable: Ee(e),
139
- id: e.id,
140
- locked: e.locked ?? !1
141
- }), t[49] = St) : St = t[49];
142
- let Ct = {
143
- baseId: we,
130
+ t[42] !== M || t[43] !== Ge ? (yt = (e) => Ge.has(M(e)), t[42] = M, t[43] = Ge, t[44] = yt) : yt = t[44];
131
+ let bt = m.filter(yt), xt = me == null ? void 0 : Math.max(1, Math.ceil(me / xe)), St = {
132
+ baseId: Te,
144
133
  clearSelection: vt,
145
- columnVisibility: Ne,
146
- density: Z,
134
+ columnVisibility: Pe,
135
+ density: Q,
147
136
  frozenColumns: nt,
148
137
  hideColumn: gt,
149
- orderedColumns: $e.map(St),
150
- page: Je,
138
+ orderedColumns: et.map((e) => ({
139
+ header: e.header,
140
+ hideable: De(e),
141
+ id: e.id,
142
+ locked: e.locked ?? !1,
143
+ system: e.system ?? !1
144
+ })),
145
+ page: Ye,
151
146
  pageCount: xt,
152
- pageSize: be,
153
- paginationMode: xe,
147
+ pageSize: xe,
148
+ paginationMode: Se,
154
149
  requestSort: ft,
155
- rowCount: pe,
156
- selectable: Se,
150
+ rowCount: me,
151
+ selectable: Ce,
157
152
  selectedCount: bt.length,
158
153
  selectedRows: bt,
159
- setColumnOrder: Ae,
160
- setColumnVisibility: Pe,
161
- setPage: Ye,
162
- sort: Be,
154
+ setColumnOrder: je,
155
+ setColumnVisibility: Fe,
156
+ setPage: Xe,
157
+ sort: Ve,
163
158
  toggleFrozen: mt
164
- }, wt = E(!1), Tt;
165
- t[50] !== _e || t[51] !== R || t[52] !== xe ? (Tt = (e) => {
166
- if (xe !== "infinite" || !R) return;
159
+ }, Ct = E(!1), wt;
160
+ t[45] !== ve || t[46] !== R || t[47] !== Se ? (wt = (e) => {
161
+ if (Se !== "infinite" || !R) return;
167
162
  let t = e.currentTarget;
168
- t.scrollHeight - t.scrollTop - t.clientHeight <= _e ? wt.current || (wt.current = !0, R()) : wt.current = !1;
169
- }, t[50] = _e, t[51] = R, t[52] = xe, t[53] = Tt) : Tt = t[53];
170
- let Et = Tt, Dt, Ot;
171
- if (t[54] !== r) {
163
+ t.scrollHeight - t.scrollTop - t.clientHeight <= ve ? Ct.current || (Ct.current = !0, R()) : Ct.current = !1;
164
+ }, t[45] = ve, t[46] = R, t[47] = Se, t[48] = wt) : wt = t[48];
165
+ let Tt = wt, Et, Dt;
166
+ if (t[49] !== r) {
172
167
  let e = C.toArray(r);
173
- Ot = e.filter(se), Dt = e.filter(oe), t[54] = r, t[55] = Dt, t[56] = Ot;
174
- } else Dt = t[55], Ot = t[56];
175
- let kt = Dt, At = it.length + +!!Se + +!!q, $ = ut(U), jt = ut(W), Mt = at ? void 0 : Q.selectCol(), Nt = ae, Pt = () => ye && xe === "pages" ? Array.from({ length: Math.min(be, 8) }, (e, t) => /* @__PURE__ */ A(s.Row, { children: [
176
- q != null && /* @__PURE__ */ k(s.Cell, {
177
- className: K("w-11", $.cellClass),
178
- sticky: $.sticky,
179
- style: $.style
168
+ Dt = e.filter(oe), Et = e.filter(ae), t[49] = r, t[50] = Et, t[51] = Dt;
169
+ } else Et = t[50], Dt = t[51];
170
+ let Ot = Et, kt = it.length + +!!Ce + +!!J, At = ut(U), jt = ut(W), Mt = at ? void 0 : $.selectCol(), Nt = ie, Pt = () => be && Se === "pages" ? Array.from({ length: Math.min(xe, 8) }, (e, t) => /* @__PURE__ */ A(s.Row, { children: [
171
+ J != null && /* @__PURE__ */ k(s.Cell, {
172
+ className: q("w-11", At.cellClass),
173
+ sticky: At.sticky,
174
+ style: At.style
180
175
  }),
181
- Se && /* @__PURE__ */ k(s.Cell, {
182
- className: K(Mt, jt.cellClass),
176
+ Ce && /* @__PURE__ */ k(s.Cell, {
177
+ className: q(Mt, jt.cellClass),
183
178
  sticky: jt.sticky,
184
179
  style: jt.style
185
180
  }),
@@ -190,26 +185,26 @@ function q(e) {
190
185
  className: r.cellClass,
191
186
  sticky: r.sticky,
192
187
  style: r.style,
193
- children: /* @__PURE__ */ k(a, { className: K("h-2.5", ee[(t + n) % ee.length]) })
188
+ children: /* @__PURE__ */ k(a, { className: q("h-2.5", G[(t + n) % G.length]) })
194
189
  }, e.id);
195
190
  })
196
191
  ] }, `__ox-skeleton-${t}`)) : m.length === 0 ? /* @__PURE__ */ k(s.Row, { children: /* @__PURE__ */ k(s.Cell, {
197
- className: Q.empty(),
198
- colSpan: At || 1,
199
- children: ge
192
+ className: $.empty(),
193
+ colSpan: kt || 1,
194
+ children: _e
200
195
  }) }, "__ox-empty") : m.flatMap((e) => {
201
- let t = M(e), n = q != null && (j?.(e) ?? !0), r = [/* @__PURE__ */ A(s.Row, {
196
+ let t = M(e), n = J != null && (j?.(e) ?? !0), r = [/* @__PURE__ */ A(s.Row, {
202
197
  rowId: t,
203
198
  children: [
204
- q != null && /* @__PURE__ */ k(s.Cell, {
199
+ J != null && /* @__PURE__ */ k(s.Cell, {
205
200
  align: "center",
206
- className: K("w-11", $.cellClass),
207
- sticky: $.sticky,
208
- style: $.style,
201
+ className: q("w-11", At.cellClass),
202
+ sticky: At.sticky,
203
+ style: At.style,
209
204
  children: n && /* @__PURE__ */ k(s.ExpandTrigger, {})
210
205
  }),
211
- Se && /* @__PURE__ */ k(s.SelectCell, {
212
- className: K(Mt, jt.cellClass),
206
+ Ce && /* @__PURE__ */ k(s.SelectCell, {
207
+ className: q(Mt, jt.cellClass),
213
208
  sticky: jt.sticky,
214
209
  style: jt.style
215
210
  }),
@@ -227,55 +222,55 @@ function q(e) {
227
222
  }, t)];
228
223
  return n && r.push(/* @__PURE__ */ k(s.ExpandedRow, {
229
224
  rowId: t,
230
- children: q(e)
225
+ children: J(e)
231
226
  }, `${t}__detail`)), r;
232
227
  }), Ft;
233
- t[57] === F ? Ft = t[58] : (Ft = F == null ? void 0 : { maxHeight: F }, t[57] = F, t[58] = Ft);
228
+ t[52] === F ? Ft = t[53] : (Ft = F == null ? void 0 : { maxHeight: F }, t[52] = F, t[53] = Ft);
234
229
  let It;
235
- return t[59] === n ? It = t[60] : (It = n != null && /* @__PURE__ */ k(s.Caption, { children: n }), t[59] = n, t[60] = It), /* @__PURE__ */ k(te, {
236
- value: Ct,
230
+ return t[54] === n ? It = t[55] : (It = n != null && /* @__PURE__ */ k(s.Caption, { children: n }), t[54] = n, t[55] = It), /* @__PURE__ */ k(ee, {
231
+ value: St,
237
232
  children: /* @__PURE__ */ A("div", {
238
- className: Q.root({ class: i }),
233
+ className: $.root({ class: i }),
239
234
  "data-ox-slot": "data-table",
240
235
  children: [
241
- Ot,
236
+ Dt,
242
237
  /* @__PURE__ */ A("div", {
243
- "aria-busy": ye || void 0,
244
- className: Q.scroll(),
238
+ "aria-busy": be || void 0,
239
+ className: $.scroll(),
245
240
  "data-ox-slot": "data-table-scroll",
246
241
  style: Ft,
247
- onScroll: Et,
242
+ onScroll: Tt,
248
243
  children: [/* @__PURE__ */ A(s, {
249
244
  defaultExpandedRows: _,
250
- density: Z,
251
- hover: ve,
252
- selectable: Se,
253
- selectedRows: We,
254
- stickyHeader: Ce,
245
+ density: Q,
246
+ hover: ye,
247
+ selectable: Ce,
248
+ selectedRows: Ge,
249
+ stickyHeader: we,
255
250
  unwrapped: !0,
256
- onSelectedChange: Ge,
251
+ onSelectedChange: Ke,
257
252
  children: [
258
253
  It,
259
254
  /* @__PURE__ */ k(s.Header, { children: /* @__PURE__ */ A(s.Row, { children: [
260
- q != null && /* @__PURE__ */ k(s.Head, {
261
- className: K("w-11", $.headClass),
262
- sticky: $.sticky,
263
- style: $.style
255
+ J != null && /* @__PURE__ */ k(s.Head, {
256
+ className: q("w-11", At.headClass),
257
+ sticky: At.sticky,
258
+ style: At.style
264
259
  }),
265
- Se && /* @__PURE__ */ k(s.SelectAllCell, {
266
- className: K(Mt, jt.headClass),
260
+ Ce && /* @__PURE__ */ k(s.SelectAllCell, {
261
+ className: q(Mt, jt.headClass),
267
262
  sticky: jt.sticky,
268
263
  style: jt.style
269
264
  }),
270
265
  it.map((e) => {
271
266
  let t = ut(e.id, e.width, e.minWidth);
272
- return /* @__PURE__ */ k(fe, {
267
+ return /* @__PURE__ */ k(pe, {
273
268
  id: e.id,
274
269
  align: e.align,
275
270
  className: t.headClass,
276
271
  freezable: e.freezable,
277
272
  header: e.header,
278
- hideable: Ee(e),
273
+ hideable: De(e),
279
274
  locked: e.locked,
280
275
  sortable: e.sortable,
281
276
  sticky: t.sticky,
@@ -285,43 +280,49 @@ function q(e) {
285
280
  ] }) }),
286
281
  /* @__PURE__ */ k(s.Body, { children: Pt() })
287
282
  ]
288
- }), xe === "infinite" && ye && /* @__PURE__ */ A("div", {
289
- className: Q.footer(),
283
+ }), Se === "infinite" && be && /* @__PURE__ */ A("div", {
284
+ className: $.footer(),
290
285
  "data-ox-slot": "data-table-loading",
291
286
  children: [/* @__PURE__ */ k("span", {
292
287
  "aria-hidden": "true",
293
- className: Q.spinner()
288
+ className: $.spinner()
294
289
  }), "Loading more…"]
295
290
  })]
296
291
  }),
297
- kt
292
+ Ot
298
293
  ]
299
294
  })
300
295
  });
301
296
  }
302
- function ae(e, t) {
303
- return e.cell ? e.cell(t) : re(typeof e.accessor == "function" ? e.accessor(t) : t[e.accessor]);
297
+ function ie(e, t) {
298
+ return e.cell ? e.cell(t) : ne(typeof e.accessor == "function" ? e.accessor(t) : t[e.accessor]);
299
+ }
300
+ function ae(e) {
301
+ return re(e);
304
302
  }
305
303
  function oe(e) {
306
- return ie(e);
304
+ return !re(e);
307
305
  }
308
306
  function se(e) {
309
- return !ie(e);
307
+ return e.system;
310
308
  }
311
309
  function ce(e) {
312
- return e != null;
310
+ return !e.system;
313
311
  }
314
312
  function le(e) {
315
- return e.id;
313
+ return e != null;
316
314
  }
317
315
  function ue(e) {
318
- return e.hideable ?? !e.locked;
316
+ return e.id;
319
317
  }
320
318
  function de(e) {
321
- return [e.id, e];
319
+ return e.system ? !1 : e.hideable ?? !e.locked;
322
320
  }
323
321
  function fe(e) {
324
- let t = d(43), { align: r, className: i, freezable: a, header: o, hideable: l, id: u, locked: h, sortable: g, sticky: y, style: x } = e, { density: C, frozenColumns: w, hideColumn: T, requestSort: E, sort: D, toggleFrozen: j } = G(), M;
322
+ return [e.id, e];
323
+ }
324
+ function pe(e) {
325
+ let t = d(43), { align: r, className: i, freezable: a, header: o, hideable: l, id: u, locked: h, sortable: g, sticky: y, style: x } = e, { density: C, frozenColumns: w, hideColumn: T, requestSort: E, sort: D, toggleFrozen: j } = K(), M;
325
326
  t[0] !== w || t[1] !== u ? (M = w.has(u), t[0] = w, t[1] = u, t[2] = M) : M = t[2];
326
327
  let N = M, P = D?.columnId === u, F, I, L, R, z, B, V, H, U;
327
328
  if (t[3] !== r || t[4] !== i || t[5] !== C || t[6] !== a || t[7] !== o || t[8] !== T || t[9] !== l || t[10] !== u || t[11] !== P || t[12] !== N || t[13] !== h || t[14] !== E || t[15] !== D?.direction || t[16] !== g || t[17] !== y || t[18] !== x || t[19] !== j) {
@@ -338,7 +339,7 @@ function fe(e) {
338
339
  }) : /* @__PURE__ */ k(p, {
339
340
  "aria-hidden": "true",
340
341
  className: e.headSortIcon()
341
- })), F = s.Head, B = r, t[29] === i ? V = t[30] : (V = K("group/head", i), t[29] = i, t[30] = V), H = y, U = x, I = e.headCell(), L = h && /* @__PURE__ */ k(b, {
342
+ })), F = s.Head, B = r, t[29] === i ? V = t[30] : (V = q("group/head", i), t[29] = i, t[30] = V), H = y, U = x, I = e.headCell(), L = h && /* @__PURE__ */ k(b, {
342
343
  "aria-hidden": "true",
343
344
  className: e.lockIcon()
344
345
  }), R = g ? /* @__PURE__ */ A("button", {
@@ -383,17 +384,17 @@ function fe(e) {
383
384
  z
384
385
  ]
385
386
  }), t[31] = I, t[32] = L, t[33] = R, t[34] = z, t[35] = W) : W = t[35];
386
- let ee;
387
- return t[36] !== F || t[37] !== W || t[38] !== B || t[39] !== V || t[40] !== H || t[41] !== U ? (ee = /* @__PURE__ */ k(F, {
387
+ let G;
388
+ return t[36] !== F || t[37] !== W || t[38] !== B || t[39] !== V || t[40] !== H || t[41] !== U ? (G = /* @__PURE__ */ k(F, {
388
389
  align: B,
389
390
  className: V,
390
391
  sticky: H,
391
392
  style: U,
392
393
  children: W
393
- }), t[36] = F, t[37] = W, t[38] = B, t[39] = V, t[40] = H, t[41] = U, t[42] = ee) : ee = t[42], ee;
394
+ }), t[36] = F, t[37] = W, t[38] = B, t[39] = V, t[40] = H, t[41] = U, t[42] = G) : G = t[42], G;
394
395
  }
395
- function pe(e) {
396
- let t = d(6), { children: n, className: r } = e, { density: i } = G(), a;
396
+ function me(e) {
397
+ let t = d(6), { children: n, className: r } = e, { density: i } = K(), a;
397
398
  t[0] !== r || t[1] !== i ? (a = c({ density: i }).toolbar({ class: r }), t[0] = r, t[1] = i, t[2] = a) : a = t[2];
398
399
  let o;
399
400
  return t[3] !== n || t[4] !== a ? (o = /* @__PURE__ */ k("div", {
@@ -402,7 +403,7 @@ function pe(e) {
402
403
  children: n
403
404
  }), t[3] = n, t[4] = a, t[5] = o) : o = t[5], o;
404
405
  }
405
- function me(e) {
406
+ function he(e) {
406
407
  let t = d(5), { children: n, className: r } = e, i;
407
408
  t[0] === r ? i = t[1] : (i = c({}).toolbarGroup({ class: r }), t[0] = r, t[1] = i);
408
409
  let a;
@@ -412,7 +413,7 @@ function me(e) {
412
413
  children: n
413
414
  }), t[2] = n, t[3] = i, t[4] = a) : a = t[4], a;
414
415
  }
415
- function he() {
416
+ function ge() {
416
417
  let e = d(1), t;
417
418
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ k("span", {
418
419
  "aria-hidden": "true",
@@ -420,7 +421,7 @@ function he() {
420
421
  "data-ox-slot": "toolbar-divider"
421
422
  }), e[0] = t) : t = e[0], t;
422
423
  }
423
- function J(e) {
424
+ function Y(e) {
424
425
  let t = d(5), { children: n, className: r } = e, i;
425
426
  t[0] === r ? i = t[1] : (i = c({}).filterChips({ class: r }), t[0] = r, t[1] = i);
426
427
  let a;
@@ -430,8 +431,8 @@ function J(e) {
430
431
  children: n
431
432
  }), t[2] = n, t[3] = i, t[4] = a) : a = t[4], a;
432
433
  }
433
- function Y(e) {
434
- let t = d(11), { children: n, fallback: r } = e, { clearSelection: i, selectedCount: a, selectedRows: o } = G();
434
+ function X(e) {
435
+ let t = d(11), { children: n, fallback: r } = e, { clearSelection: i, selectedCount: a, selectedRows: o } = K();
435
436
  if (a === 0) {
436
437
  let e;
437
438
  return t[0] === r ? e = t[1] : (e = r == null ? null : /* @__PURE__ */ k(O, { children: r }), t[0] = r, t[1] = e), e;
@@ -451,8 +452,8 @@ function Y(e) {
451
452
  children: u
452
453
  }), t[8] = s, t[9] = u, t[10] = f) : f = t[10], f;
453
454
  }
454
- function X(e) {
455
- let n = d(46), { className: r, layout: i, nextLabel: a, previousLabel: o } = e, s = i === void 0 ? "end" : i, l = a === void 0 ? "Next page" : a, u = o === void 0 ? "Previous page" : o, { page: f, pageCount: p, pageSize: m, rowCount: _, setPage: v } = G(), y, b, x, S, C, w;
455
+ function Z(e) {
456
+ let n = d(46), { className: r, layout: i, nextLabel: a, previousLabel: o } = e, s = i === void 0 ? "end" : i, l = a === void 0 ? "Next page" : a, u = o === void 0 ? "Previous page" : o, { page: f, pageCount: p, pageSize: m, rowCount: _, setPage: v } = K(), y, b, x, S, C, w;
456
457
  if (n[0] !== r || n[1] !== s || n[2] !== l || n[3] !== f || n[4] !== p || n[5] !== m || n[6] !== u || n[7] !== _ || n[8] !== v) {
457
458
  let e = c({ paginationLayout: s }), i = f > 1, a = p == null ? !0 : f < p, o = _ === 0 ? 0 : (f - 1) * m + 1, d = _ == null ? f * m : Math.min(f * m, _), T;
458
459
  n[15] !== d || n[16] !== o ? (T = /* @__PURE__ */ A("span", {
@@ -524,8 +525,8 @@ function X(e) {
524
525
  ]
525
526
  }), n[39] = y, n[40] = b, n[41] = x, n[42] = S, n[43] = C, n[44] = w, n[45] = T) : T = n[45], T;
526
527
  }
527
- function Z(e) {
528
- let t = d(6), { children: n, className: r } = e, { density: i } = G(), a;
528
+ function Q(e) {
529
+ let t = d(6), { children: n, className: r } = e, { density: i } = K(), a;
529
530
  t[0] !== r || t[1] !== i ? (a = c({ density: i }).footerBar({ class: r }), t[0] = r, t[1] = i, t[2] = a) : a = t[2];
530
531
  let o;
531
532
  return t[3] !== n || t[4] !== a ? (o = /* @__PURE__ */ k("div", {
@@ -534,21 +535,21 @@ function Z(e) {
534
535
  children: n
535
536
  }), t[3] = n, t[4] = a, t[5] = o) : o = t[5], o;
536
537
  }
537
- function ge(e) {
538
- let t = d(27), { column: n, draftVisible: i, onToggleVisible: a } = e, o = c({}), s;
539
- t[0] !== n.id || t[1] !== n.locked ? (s = {
538
+ function _e(e) {
539
+ let t = d(29), { column: n, draftVisible: i, onToggleVisible: a } = e, o = c({}), s = T(), l = n.locked || !n.hideable, u;
540
+ t[0] !== n.id || t[1] !== n.locked ? (u = {
540
541
  id: n.id,
541
542
  disabled: n.locked
542
- }, t[0] = n.id, t[1] = n.locked, t[2] = s) : s = t[2];
543
- let { attributes: l, isDragging: u, listeners: f, setNodeRef: p, transform: m, transition: h } = z(s), g;
544
- t[3] === m ? g = t[4] : (g = V.Transform.toString(m), t[3] = m, t[4] = g);
545
- let _ = u ? .6 : void 0, v;
546
- t[5] !== g || t[6] !== _ || t[7] !== h ? (v = {
547
- transform: g,
548
- transition: h,
549
- opacity: _
550
- }, t[5] = g, t[6] = _, t[7] = h, t[8] = v) : v = t[8];
551
- let b = v, x = o.configItem(), S = n.locked ? /* @__PURE__ */ k("span", {
543
+ }, t[0] = n.id, t[1] = n.locked, t[2] = u) : u = t[2];
544
+ let { attributes: f, isDragging: p, listeners: m, setNodeRef: h, transform: g, transition: _ } = z(u), v;
545
+ t[3] === g ? v = t[4] : (v = V.Transform.toString(g), t[3] = g, t[4] = v);
546
+ let b = p ? .6 : void 0, x;
547
+ t[5] !== v || t[6] !== b || t[7] !== _ ? (x = {
548
+ transform: v,
549
+ transition: _,
550
+ opacity: b
551
+ }, t[5] = v, t[6] = b, t[7] = _, t[8] = x) : x = t[8];
552
+ let S = x, C = o.configItem(), w = l || void 0, E = n.locked ? /* @__PURE__ */ k("span", {
552
553
  "aria-hidden": "true",
553
554
  className: o.configHandleLocked(),
554
555
  children: /* @__PURE__ */ k(y, { className: "size-4" })
@@ -556,152 +557,159 @@ function ge(e) {
556
557
  "aria-label": "Drag to reorder",
557
558
  className: o.configHandle(),
558
559
  type: "button",
559
- ...l,
560
560
  ...f,
561
+ ...m,
561
562
  children: /* @__PURE__ */ k(y, { className: "size-4" })
562
- }), C = `Toggle ${typeof n.header == "string" ? n.header : n.id}`, w = n.locked ? !0 : i, T = n.locked || !n.hideable, E;
563
- t[9] !== n.id || t[10] !== a ? (E = () => a(n.id), t[9] = n.id, t[10] = a, t[11] = E) : E = t[11];
564
- let D;
565
- t[12] !== E || t[13] !== C || t[14] !== w || t[15] !== T ? (D = /* @__PURE__ */ k(r, {
566
- "aria-label": C,
567
- checked: w,
568
- disabled: T,
569
- onCheckedChange: E
570
- }), t[12] = E, t[13] = C, t[14] = w, t[15] = T, t[16] = D) : D = t[16];
571
- let O = o.configLabel(), j;
572
- t[17] !== n.header || t[18] !== O ? (j = /* @__PURE__ */ k("span", {
573
- className: O,
563
+ }), D = n.locked ? !0 : i, O;
564
+ t[9] !== n.id || t[10] !== a ? (O = () => a(n.id), t[9] = n.id, t[10] = a, t[11] = O) : O = t[11];
565
+ let j;
566
+ t[12] !== l || t[13] !== s || t[14] !== D || t[15] !== O ? (j = /* @__PURE__ */ k(r, {
567
+ id: s,
568
+ checked: D,
569
+ disabled: l,
570
+ onCheckedChange: O
571
+ }), t[12] = l, t[13] = s, t[14] = D, t[15] = O, t[16] = j) : j = t[16];
572
+ let M = q(o.configLabel(), l ? "cursor-not-allowed opacity-50" : "cursor-pointer select-none"), N;
573
+ t[17] !== n.header || t[18] !== s || t[19] !== M ? (N = /* @__PURE__ */ k("label", {
574
+ className: M,
575
+ htmlFor: s,
574
576
  children: n.header
575
- }), t[17] = n.header, t[18] = O, t[19] = j) : j = t[19];
576
- let M;
577
- return t[20] !== p || t[21] !== b || t[22] !== D || t[23] !== j || t[24] !== x || t[25] !== S ? (M = /* @__PURE__ */ A("div", {
578
- className: x,
579
- ref: p,
580
- style: b,
577
+ }), t[17] = n.header, t[18] = s, t[19] = M, t[20] = N) : N = t[20];
578
+ let P;
579
+ return t[21] !== h || t[22] !== S || t[23] !== j || t[24] !== N || t[25] !== C || t[26] !== w || t[27] !== E ? (P = /* @__PURE__ */ A("div", {
580
+ className: C,
581
+ "data-disabled": w,
582
+ ref: h,
583
+ style: S,
581
584
  children: [
582
- S,
583
- D,
584
- j
585
+ E,
586
+ j,
587
+ N
585
588
  ]
586
- }), t[20] = p, t[21] = b, t[22] = D, t[23] = j, t[24] = x, t[25] = S, t[26] = M) : M = t[26], M;
589
+ }), t[21] = h, t[22] = S, t[23] = j, t[24] = N, t[25] = C, t[26] = w, t[27] = E, t[28] = P) : P = t[28], P;
587
590
  }
588
- function _e(e) {
589
- let n = d(46), { applyLabel: r, cancelLabel: a, className: o, title: s, trigger: l } = e, f = r === void 0 ? "Apply" : r, p = a === void 0 ? "Cancel" : a, m = s === void 0 ? "Configure table" : s, { columnVisibility: h, orderedColumns: g, setColumnOrder: _, setColumnVisibility: v } = G(), y = c({}), [b, S] = D(!1), C;
590
- n[0] === g ? C = n[1] : (C = () => g.map(xe), n[0] = g, n[1] = C);
591
- let [w, T] = D(C), E;
592
- n[2] === h ? E = n[3] : (E = () => h, n[2] = h, n[3] = E);
593
- let [O, z] = D(E), V;
594
- n[4] === g ? V = n[5] : (V = new Map(g.map(be)), n[4] = g, n[5] = V);
595
- let U = V, W;
596
- n[6] !== h || n[7] !== g || n[8] !== S ? (W = (e) => {
597
- e && (T(g.map(ye)), z(h)), S(e);
598
- }, n[6] = h, n[7] = g, n[8] = S, n[9] = W) : W = n[9];
599
- let ee = W, te;
600
- n[10] === Symbol.for("react.memo_cache_sentinel") ? (te = { activationConstraint: { distance: 4 } }, n[10] = te) : te = n[10];
601
- let ne;
602
- n[11] === Symbol.for("react.memo_cache_sentinel") ? (ne = { coordinateGetter: R }, n[11] = ne) : ne = n[11];
603
- let re = I(F(N, te), F(M, ne)), ie;
604
- n[12] === Symbol.for("react.memo_cache_sentinel") ? (ie = (e) => {
591
+ function ve(e) {
592
+ let n = d(48), { applyLabel: r, cancelLabel: a, className: o, title: s, trigger: l } = e, f = r === void 0 ? "Apply" : r, p = a === void 0 ? "Cancel" : a, m = s === void 0 ? "Configure table" : s, { columnVisibility: h, orderedColumns: g, setColumnOrder: _, setColumnVisibility: v } = K(), y;
593
+ n[0] === g ? y = n[1] : (y = g.filter(Ce), n[0] = g, n[1] = y);
594
+ let b = y, S = c({}), [C, w] = D(!1), T;
595
+ n[2] === b ? T = n[3] : (T = () => b.map(Se), n[2] = b, n[3] = T);
596
+ let [E, O] = D(T), z;
597
+ n[4] === h ? z = n[5] : (z = () => h, n[4] = h, n[5] = z);
598
+ let [V, U] = D(z), W;
599
+ n[6] === b ? W = n[7] : (W = new Map(b.map(xe)), n[6] = b, n[7] = W);
600
+ let G = W, ee;
601
+ n[8] !== h || n[9] !== b || n[10] !== w ? (ee = (e) => {
602
+ e && (O(b.map(be)), U(h)), w(e);
603
+ }, n[8] = h, n[9] = b, n[10] = w, n[11] = ee) : ee = n[11];
604
+ let te = ee, ne;
605
+ n[12] === Symbol.for("react.memo_cache_sentinel") ? (ne = { activationConstraint: { distance: 4 } }, n[12] = ne) : ne = n[12];
606
+ let re;
607
+ n[13] === Symbol.for("react.memo_cache_sentinel") ? (re = { coordinateGetter: R }, n[13] = re) : re = n[13];
608
+ let J = I(F(N, ne), F(M, re)), ie;
609
+ n[14] === Symbol.for("react.memo_cache_sentinel") ? (ie = (e) => {
605
610
  let { active: t, over: n } = e;
606
- T((e) => u(e, String(t.id), n == null ? null : String(n.id)));
607
- }, n[12] = ie) : ie = n[12];
608
- let q = ie, ae;
609
- n[13] === Symbol.for("react.memo_cache_sentinel") ? (ae = (e) => {
610
- z((t) => ({
611
+ O((e) => u(e, String(t.id), n == null ? null : String(n.id)));
612
+ }, n[14] = ie) : ie = n[14];
613
+ let ae = ie, oe;
614
+ n[15] === Symbol.for("react.memo_cache_sentinel") ? (oe = (e) => {
615
+ U((t) => ({
611
616
  ...t,
612
617
  [e]: t[e] === !1
613
618
  }));
614
- }, n[13] = ae) : ae = n[13];
615
- let oe = ae, se;
616
- n[14] !== w || n[15] !== O || n[16] !== g || n[17] !== _ || n[18] !== v || n[19] !== S ? (se = () => {
617
- let e = g.map(ve), t = new Set(e);
618
- _(w.filter((e) => t.has(e))), v(H(O, e)), S(!1);
619
- }, n[14] = w, n[15] = O, n[16] = g, n[17] = _, n[18] = v, n[19] = S, n[20] = se) : se = n[20];
620
- let ce = se, le;
621
- n[21] === l ? le = n[22] : (le = l ?? /* @__PURE__ */ k(t, {
619
+ }, n[15] = oe) : oe = n[15];
620
+ let se = oe, ce;
621
+ n[16] !== b || n[17] !== E || n[18] !== V || n[19] !== _ || n[20] !== v || n[21] !== w ? (ce = () => {
622
+ let e = b.map(ye), t = new Set(e);
623
+ _(E.filter((e) => t.has(e))), v(H(V, e)), w(!1);
624
+ }, n[16] = b, n[17] = E, n[18] = V, n[19] = _, n[20] = v, n[21] = w, n[22] = ce) : ce = n[22];
625
+ let le = ce, ue;
626
+ n[23] === l ? ue = n[24] : (ue = l ?? /* @__PURE__ */ k(t, {
622
627
  "aria-label": "Configure table",
623
628
  isIconOnly: !0,
624
629
  variant: "ghost",
625
630
  children: /* @__PURE__ */ k(x, {})
626
- }), n[21] = l, n[22] = le);
627
- let ue;
628
- n[23] === le ? ue = n[24] : (ue = /* @__PURE__ */ k(i.Trigger, { children: le }), n[23] = le, n[24] = ue);
631
+ }), n[23] = l, n[24] = ue);
629
632
  let de;
630
- n[25] === o ? de = n[26] : (de = K("p-1.5", o), n[25] = o, n[26] = de);
631
- let fe = y.configPanel(), pe = y.configList(), me;
632
- if (n[27] !== w || n[28] !== O || n[29] !== U) {
633
+ n[25] === ue ? de = n[26] : (de = /* @__PURE__ */ k(i.Trigger, { children: ue }), n[25] = ue, n[26] = de);
634
+ let fe;
635
+ n[27] === o ? fe = n[28] : (fe = q("p-1.5", o), n[27] = o, n[28] = fe);
636
+ let pe = S.configPanel(), me = S.configList(), he;
637
+ if (n[29] !== E || n[30] !== V || n[31] !== G) {
633
638
  let e;
634
- n[31] !== O || n[32] !== U ? (e = (e) => {
635
- let t = U.get(e);
636
- return t == null ? null : /* @__PURE__ */ k(ge, {
639
+ n[33] !== V || n[34] !== G ? (e = (e) => {
640
+ let t = G.get(e);
641
+ return t == null ? null : /* @__PURE__ */ k(_e, {
637
642
  column: t,
638
- draftVisible: O[e] !== !1,
639
- onToggleVisible: oe
643
+ draftVisible: V[e] !== !1,
644
+ onToggleVisible: se
640
645
  }, e);
641
- }, n[31] = O, n[32] = U, n[33] = e) : e = n[33], me = w.map(e), n[27] = w, n[28] = O, n[29] = U, n[30] = me;
642
- } else me = n[30];
643
- let he = y.configActions(), J;
644
- n[34] === S ? J = n[35] : (J = () => S(!1), n[34] = S, n[35] = J);
645
- let Y;
646
- n[36] !== p || n[37] !== J ? (Y = /* @__PURE__ */ k(t, {
646
+ }, n[33] = V, n[34] = G, n[35] = e) : e = n[35], he = E.map(e), n[29] = E, n[30] = V, n[31] = G, n[32] = he;
647
+ } else he = n[32];
648
+ let ge = S.configActions(), Y;
649
+ n[36] === w ? Y = n[37] : (Y = () => w(!1), n[36] = w, n[37] = Y);
650
+ let X;
651
+ n[38] !== p || n[39] !== Y ? (X = /* @__PURE__ */ k(t, {
647
652
  variant: "outline",
648
- onClick: J,
653
+ onClick: Y,
649
654
  children: p
650
- }), n[36] = p, n[37] = J, n[38] = Y) : Y = n[38];
651
- let X;
652
- n[39] !== ce || n[40] !== f ? (X = /* @__PURE__ */ k(t, {
653
- onClick: ce,
654
- children: f
655
- }), n[39] = ce, n[40] = f, n[41] = X) : X = n[41];
655
+ }), n[38] = p, n[39] = Y, n[40] = X) : X = n[40];
656
656
  let Z;
657
- return n[42] !== he || n[43] !== Y || n[44] !== X ? (Z = /* @__PURE__ */ A("div", {
658
- className: he,
659
- children: [Y, X]
660
- }), n[42] = he, n[43] = Y, n[44] = X, n[45] = Z) : Z = n[45], /* @__PURE__ */ A(i, {
661
- open: b,
662
- onOpenChange: ee,
663
- children: [ue, /* @__PURE__ */ k(i.Content, {
657
+ n[41] !== le || n[42] !== f ? (Z = /* @__PURE__ */ k(t, {
658
+ onClick: le,
659
+ children: f
660
+ }), n[41] = le, n[42] = f, n[43] = Z) : Z = n[43];
661
+ let Q;
662
+ return n[44] !== ge || n[45] !== X || n[46] !== Z ? (Q = /* @__PURE__ */ A("div", {
663
+ className: ge,
664
+ children: [X, Z]
665
+ }), n[44] = ge, n[45] = X, n[46] = Z, n[47] = Q) : Q = n[47], /* @__PURE__ */ A(i, {
666
+ open: C,
667
+ onOpenChange: te,
668
+ children: [de, /* @__PURE__ */ k(i.Content, {
664
669
  align: "start",
665
- className: de,
670
+ className: fe,
666
671
  children: /* @__PURE__ */ A("div", {
667
- className: fe,
672
+ className: pe,
668
673
  children: [
669
674
  /* @__PURE__ */ k("div", {
670
- className: y.configTitle(),
675
+ className: S.configTitle(),
671
676
  children: m
672
677
  }),
673
- /* @__PURE__ */ k("div", { className: y.configSeparator() }),
678
+ /* @__PURE__ */ k("div", { className: S.configSeparator() }),
674
679
  /* @__PURE__ */ k(j, {
675
680
  collisionDetection: P,
676
- sensors: re,
677
- onDragEnd: q,
681
+ sensors: J,
682
+ onDragEnd: ae,
678
683
  children: /* @__PURE__ */ k(L, {
679
- items: w,
684
+ items: E,
680
685
  strategy: B,
681
686
  children: /* @__PURE__ */ k("div", {
682
- className: pe,
683
- children: me
687
+ className: me,
688
+ children: he
684
689
  })
685
690
  })
686
691
  }),
687
- /* @__PURE__ */ k("div", { className: y.configSeparator() }),
688
- Z
692
+ /* @__PURE__ */ k("div", { className: S.configSeparator() }),
693
+ Q
689
694
  ]
690
695
  })
691
696
  })]
692
697
  });
693
698
  }
694
- function ve(e) {
695
- return e.id;
696
- }
697
699
  function ye(e) {
698
700
  return e.id;
699
701
  }
700
702
  function be(e) {
701
- return [e.id, e];
703
+ return e.id;
702
704
  }
703
705
  function xe(e) {
706
+ return [e.id, e];
707
+ }
708
+ function Se(e) {
704
709
  return e.id;
705
710
  }
711
+ function Ce(e) {
712
+ return !e.system;
713
+ }
706
714
  //#endregion
707
- export { _e as OxDataTableColumnConfig, he as OxDataTableDivider, J as OxDataTableFilterChips, Z as OxDataTableFooter, X as OxDataTablePagination, q as OxDataTableRoot, Y as OxDataTableSelectionActions, pe as OxDataTableToolbar, me as OxDataTableToolbarGroup };
715
+ export { ve as OxDataTableColumnConfig, ge as OxDataTableDivider, Y as OxDataTableFilterChips, Q as OxDataTableFooter, Z as OxDataTablePagination, J as OxDataTableRoot, X as OxDataTableSelectionActions, me as OxDataTableToolbar, he as OxDataTableToolbarGroup };
@@ -25,7 +25,7 @@ var t = e({
25
25
  ],
26
26
  headSortIcon: "size-3.5 shrink-0 transition-colors",
27
27
  headMenuTrigger: [
28
- "inline-flex size-6 shrink-0 items-center justify-center rounded-sm text-fg-subtle",
28
+ "inline-flex size-6 shrink-0 items-center justify-center rounded-sm text-fg-subtle cursor-pointer",
29
29
  "opacity-0 transition-[opacity,color,background-color] group-hover/head:opacity-100",
30
30
  "hover:bg-fg/10 hover:text-fg data-[popup-open]:bg-fg/10 data-[popup-open]:opacity-100",
31
31
  "focus-visible:opacity-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-ink"
@@ -41,7 +41,7 @@ var t = e({
41
41
  configPanel: "flex w-64 flex-col",
42
42
  configTitle: "px-2 pt-1.5 pb-2 text-body font-semibold text-fg",
43
43
  configList: "flex flex-col gap-0.5 py-1",
44
- configItem: "flex items-center gap-2.5 rounded-control px-2 py-1.5 hover:bg-fg/8",
44
+ configItem: "flex items-center gap-2.5 rounded-control px-2 py-1.5 ox-interactive:hover:bg-fg/8",
45
45
  configHandle: "shrink-0 cursor-grab text-fg-subtle active:cursor-grabbing",
46
46
  configHandleLocked: "shrink-0 text-fg-subtle opacity-30",
47
47
  configLabel: "flex-1 truncate text-body",
@@ -17,6 +17,7 @@ interface OxDataTableColumn<TRow> {
17
17
  locked?: boolean;
18
18
  minWidth?: number | string;
19
19
  sortable?: boolean;
20
+ system?: boolean;
20
21
  width?: number | string;
21
22
  }
22
23
  interface OxDataTableSortState {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noxickon/onyx",
3
- "version": "6.3.0",
3
+ "version": "6.4.0",
4
4
  "type": "module",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",