@actioneer/ads 1.0.8 → 1.0.9

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,37 +1,37 @@
1
1
  "use client";
2
- import { jsx as d, jsxs as $, Fragment as Ae } from "react/jsx-runtime";
2
+ import { jsx as u, jsxs as M, Fragment as Ae } from "react/jsx-runtime";
3
3
  import * as r from "react";
4
4
  import { MotionConfig as De, motion as We } from "motion/react";
5
- import { cn as h } from "../lib/cn.js";
5
+ import { cn as b } from "../lib/cn.js";
6
6
  import { Button as Me } from "./button.js";
7
- import { Checkbox as be } from "./checkbox.js";
7
+ import { Checkbox as ge } from "./checkbox.js";
8
8
  import { Radio as Ve } from "./radio.js";
9
9
  import { ChevronRight as $e, ChevronUp as Le, ChevronDown as _e, SortIcon as Fe } from "../lib/icons.js";
10
10
  import { springDisclosure as je } from "../lib/motion.js";
11
- const he = (t) => t === "center" ? "text-center" : t === "right" ? "text-right" : "text-left", ve = (t, e = !1) => t === "left" ? h(
11
+ const ve = (t) => t === "center" ? "text-center" : t === "right" ? "text-right" : "text-left", ye = (t, e = !1) => t === "left" ? b(
12
12
  "sticky left-0 z-10",
13
13
  // Scroll-aware: the smudge only appears once content is actually
14
14
  // hidden behind the pinned column (nothing to scroll back to at the
15
15
  // far left → no shadow).
16
16
  "group-data-[scroll-left=true]/table-shell:shadow-table-smudge-left"
17
- ) : t === "right" ? h(
17
+ ) : t === "right" ? b(
18
18
  "sticky right-0 z-10",
19
19
  // Backward-compatible fallback. Action columns should opt into the
20
20
  // Table-level elevation so one shadow spans the complete column.
21
21
  !e && "group-data-[scroll-right=true]/table-shell:shadow-table-smudge-right"
22
- ) : void 0, ye = r.createContext({ interactive: !1, selected: !1 }), we = { depth: 0, hidden: !1 }, se = r.createContext(we), xe = (t) => ({
22
+ ) : void 0, we = r.createContext({ interactive: !1, selected: !1 }), xe = { depth: 0, hidden: !1 }, le = r.createContext(xe), Ne = (t) => ({
23
23
  backgroundColor: "var(--card)",
24
24
  backgroundImage: `linear-gradient(to right, ${t}, var(--card))`,
25
25
  backgroundSize: "var(--table-selection-width, 100%) 100%",
26
26
  backgroundRepeat: "no-repeat"
27
- }), ae = xe("var(--table-row-selected)"), Oe = xe("var(--table-row-hover)"), Ne = (t, { sticky: e, selected: s = !1 } = {}) => h(
27
+ }), ce = Ne("var(--table-row-selected)"), Oe = Ne("var(--table-row-hover)"), Ce = (t, { sticky: e, selected: s = !1 } = {}) => b(
28
28
  "bg-card align-middle transition-colors",
29
29
  // Functional row hairline; the table shell carries the outer stroke.
30
30
  "border-b border-table-stroke group-last/row:border-b-0",
31
31
  t && !e && // Scrolling cells fade to transparent so the row's continuous WG1 →
32
32
  // White hover fade shows through without a new rounded silhouette.
33
33
  "group-hover/row:bg-transparent group-focus-within/row:bg-transparent",
34
- t && e && !s && h(
34
+ t && e && !s && b(
35
35
  // Pinned cells stay opaque over scrolled content and fade in their
36
36
  // slice of the same row-wide hover gradient.
37
37
  "before:pointer-events-none before:absolute before:inset-0 before:-z-10",
@@ -41,42 +41,42 @@ const he = (t) => t === "center" ? "text-center" : t === "right" ? "text-right"
41
41
  "before:opacity-0 before:transition-opacity before:duration-150 before:ease-out",
42
42
  "group-hover/row:before:opacity-100 group-focus-within/row:before:opacity-100"
43
43
  ),
44
- t && "group-data-[selected]/row:bg-transparent"
45
- ), Ce = "bg-table-shell", ke = h(
44
+ t && "group-data-[selected]/row:bg-transparent group-data-[active]/row:bg-transparent"
45
+ ), ke = "bg-table-shell", Re = b(
46
46
  "after:pointer-events-none after:absolute after:right-0 after:top-1/2",
47
47
  "after:h-4 after:w-px after:-translate-y-1/2 after:rounded-sm",
48
48
  "after:bg-border-strong last:after:hidden"
49
- ), ie = "__ads_table_column_", le = 64, Xe = new Intl.Collator(void 0, {
49
+ ), de = "__ads_table_column_", ue = 64, Xe = new Intl.Collator(void 0, {
50
50
  numeric: !0,
51
51
  sensitivity: "base"
52
52
  });
53
- function L(t) {
53
+ function V(t) {
54
54
  const e = [];
55
55
  return r.Children.forEach(t, (s) => {
56
56
  if (r.isValidElement(s) && s.type === r.Fragment) {
57
- e.push(...L(s.props.children));
57
+ e.push(...V(s.props.children));
58
58
  return;
59
59
  }
60
60
  e.push(s);
61
61
  }), e;
62
62
  }
63
- function z(t, e) {
63
+ function R(t, e) {
64
64
  return t === e || !!(e.displayName && t && (typeof t == "object" || typeof t == "function") && "displayName" in t && t.displayName === e.displayName);
65
65
  }
66
- function Re(t) {
67
- return L(t).some((e) => !r.isValidElement(e) || z(e.type, de) ? !1 : z(e.type, K) && L(e.props.childRows).some(r.isValidElement) || Re(e.props.children));
66
+ function Se(t) {
67
+ return V(t).some((e) => !r.isValidElement(e) || R(e.type, fe) ? !1 : R(e.type, K) && V(e.props.childRows).some(r.isValidElement) || Se(e.props.children));
68
68
  }
69
69
  function Be(t) {
70
- const e = /* @__PURE__ */ new Map(), s = (i) => L(i).flatMap((n) => {
70
+ const e = /* @__PURE__ */ new Map(), s = (i) => V(i).flatMap((n) => {
71
71
  if (!r.isValidElement(n)) return [];
72
- if (z(n.type, de) || z(n.type, ue)) return [];
73
- if (!z(n.type, K)) return s(n.props.children);
72
+ if (R(n.type, fe) || R(n.type, me)) return [];
73
+ if (!R(n.type, K)) return s(n.props.children);
74
74
  const c = s(n.props.childRows);
75
75
  return n.props.rowKey === void 0 ? c : (c.length > 0 && e.set(n.props.rowKey, c), [n.props.rowKey, ...c]);
76
76
  });
77
77
  return { keys: s(t), descendants: e };
78
78
  }
79
- function oe(t, e) {
79
+ function ie(t, e) {
80
80
  for (const [s, i] of e)
81
81
  i.every((n) => t.has(n)) ? t.add(s) : t.delete(s);
82
82
  return t;
@@ -106,7 +106,7 @@ function ee(t) {
106
106
  }
107
107
  return "";
108
108
  }
109
- function ge(t) {
109
+ function he(t) {
110
110
  if (t instanceof Date)
111
111
  return { kind: "number", value: t.getTime() };
112
112
  if (typeof t == "number")
@@ -121,62 +121,62 @@ function ge(t) {
121
121
  return Number.isNaN(n) ? { kind: "text", value: e } : { kind: "number", value: n };
122
122
  }
123
123
  function Ue(t, e, s) {
124
- const i = ge(t), n = ge(e);
124
+ const i = he(t), n = he(e);
125
125
  if (i.kind === "empty") return n.kind === "empty" ? 0 : 1;
126
126
  if (n.kind === "empty") return -1;
127
127
  const c = i.kind === "number" && n.kind === "number" ? i.value - n.value : Xe.compare(String(i.value), String(n.value));
128
128
  return s === "ascending" ? c : -c;
129
129
  }
130
- const Se = r.createContext(null), te = () => r.useContext(Se), ce = r.createContext("body");
130
+ const ze = r.createContext(null), oe = () => r.useContext(ze), pe = r.createContext("body");
131
131
  function He(t) {
132
- const e = [], i = L(t.props.children).map((n, c) => {
133
- if (!r.isValidElement(n) || !z(n.type, K))
132
+ const e = [], i = V(t.props.children).map((n, c) => {
133
+ if (!r.isValidElement(n) || !R(n.type, K))
134
134
  return n;
135
- let b = 0;
136
- const A = L(n.props.children).map((o) => {
135
+ let g = 0;
136
+ const T = V(n.props.children).map((o) => {
137
137
  if (!r.isValidElement(o)) return o;
138
- for (; (e[b] ?? 0) > c; )
139
- b += 1;
140
- const _ = Math.max(1, Number(o.props.colSpan ?? 1)), E = Math.max(1, Number(o.props.rowSpan ?? 1)), x = b;
141
- for (let N = 0; N < _; N += 1)
142
- e[x + N] = Math.max(
143
- e[x + N] ?? 0,
144
- c + E
138
+ for (; (e[g] ?? 0) > c; )
139
+ g += 1;
140
+ const $ = Math.max(1, Number(o.props.colSpan ?? 1)), A = Math.max(1, Number(o.props.rowSpan ?? 1)), x = g;
141
+ for (let w = 0; w < $; w += 1)
142
+ e[x + w] = Math.max(
143
+ e[x + w] ?? 0,
144
+ c + A
145
145
  );
146
- return b += _, z(o.type, pe) ? r.cloneElement(o, { _sortColumnIndex: x }) : o;
146
+ return g += $, R(o.type, be) ? r.cloneElement(o, { _sortColumnIndex: x }) : o;
147
147
  });
148
- return r.cloneElement(n, void 0, A);
148
+ return r.cloneElement(n, void 0, T);
149
149
  });
150
150
  return r.cloneElement(t, void 0, i);
151
151
  }
152
- function ze(t, e, s = "ascending") {
153
- const i = L(t).map((n, c) => {
154
- if (!r.isValidElement(n) || !z(n.type, K))
152
+ function Ee(t, e, s = "ascending") {
153
+ const i = V(t).map((n, c) => {
154
+ if (!r.isValidElement(n) || !R(n.type, K))
155
155
  return { row: n, index: c, value: "" };
156
- const b = L(n.props.children);
156
+ const g = V(n.props.children);
157
157
  return {
158
158
  row: r.cloneElement(n, {
159
159
  key: n.key ?? n.props.rowKey ?? c,
160
- ...n.props.childRows ? { childRows: ze(n.props.childRows, e, s) } : {}
160
+ ...n.props.childRows ? { childRows: Ee(n.props.childRows, e, s) } : {}
161
161
  }),
162
162
  index: c,
163
- value: e === void 0 ? "" : ee(b[e])
163
+ value: e === void 0 ? "" : ee(g[e])
164
164
  };
165
165
  });
166
166
  return e !== void 0 && i.sort((n, c) => Ue(n.value, c.value, s) || n.index - c.index), i.map(({ row: n }) => n);
167
167
  }
168
168
  function qe(t, e, s) {
169
- return r.cloneElement(t, void 0, ze(t.props.children, e, s));
169
+ return r.cloneElement(t, void 0, Ee(t.props.children, e, s));
170
170
  }
171
- function Ee(t, e) {
172
- const s = e != null && e.column.startsWith(ie) ? Number(e.column.slice(ie.length)) : Number.NaN;
171
+ function Te(t, e) {
172
+ const s = e != null && e.column.startsWith(de) ? Number(e.column.slice(de.length)) : Number.NaN;
173
173
  return r.Children.map(t, (i) => r.isValidElement(i) ? i.type === r.Fragment ? r.cloneElement(
174
174
  i,
175
175
  void 0,
176
- Ee(i.props.children, e)
177
- ) : z(i.type, ue) ? He(i) : z(i.type, Te) ? qe(i, Number.isInteger(s) && s >= 0 ? s : void 0, e == null ? void 0 : e.direction) : i : i);
176
+ Te(i.props.children, e)
177
+ ) : R(i.type, me) ? He(i) : R(i.type, Ie) ? qe(i, Number.isInteger(s) && s >= 0 ? s : void 0, e == null ? void 0 : e.direction) : i : i);
178
178
  }
179
- const de = r.forwardRef(
179
+ const fe = r.forwardRef(
180
180
  ({
181
181
  className: t,
182
182
  wrapperClassName: e,
@@ -184,168 +184,168 @@ const de = r.forwardRef(
184
184
  footer: i,
185
185
  children: n,
186
186
  selectionMode: c = "none",
187
- selectedKeys: b,
188
- onSelectionChange: v,
189
- rowKeys: A,
187
+ selectedKeys: g,
188
+ onSelectionChange: y,
189
+ rowKeys: T,
190
190
  elevatedActionColumn: o = !1,
191
- actionColumnWidth: _ = "3rem",
192
- sortDescriptor: E,
191
+ actionColumnWidth: $ = "3rem",
192
+ sortDescriptor: A,
193
193
  onSortChange: x,
194
- allowsSorting: N = !0,
194
+ allowsSorting: w = !0,
195
195
  isStatic: U = !1,
196
- resizableColumns: F = !0,
197
- maxBodyHeight: D,
198
- ...q
199
- }, u) => {
200
- const k = r.useId(), R = r.useMemo(() => Re(n), [n]), y = r.useMemo(() => Be(n), [n]), T = r.useMemo(() => A ?? [], [A]), J = b === "all", W = r.useMemo(() => {
201
- const a = new Set(b === "all" ? [...T, ...y.keys] : b);
196
+ resizableColumns: j = !0,
197
+ maxBodyHeight: S,
198
+ ...Y
199
+ }, Z) => {
200
+ const d = r.useId(), C = r.useMemo(() => Se(n), [n]), f = r.useMemo(() => Be(n), [n]), I = r.useMemo(() => T ?? [], [T]), H = g === "all", P = r.useMemo(() => {
201
+ const a = new Set(g === "all" ? [...I, ...f.keys] : g);
202
202
  if (c !== "multiple") return a;
203
- for (const p of [...a])
204
- for (const g of y.descendants.get(p) ?? []) a.add(g);
205
- return oe(a, y.descendants);
206
- }, [b, c, T, y]), S = r.useCallback(
207
- (a) => J || W.has(a),
208
- [J, W]
209
- ), X = r.useCallback(
203
+ for (const m of [...a])
204
+ for (const v of f.descendants.get(m) ?? []) a.add(v);
205
+ return ie(a, f.descendants);
206
+ }, [g, c, I, f]), k = r.useCallback(
207
+ (a) => H || P.has(a),
208
+ [H, P]
209
+ ), O = r.useCallback(
210
210
  (a) => {
211
- var p;
212
- return c === "multiple" && !S(a) && (((p = y.descendants.get(a)) == null ? void 0 : p.some((g) => W.has(g))) ?? !1);
211
+ var m;
212
+ return c === "multiple" && !k(a) && (((m = f.descendants.get(a)) == null ? void 0 : m.some((v) => P.has(v))) ?? !1);
213
213
  },
214
- [c, S, y, W]
215
- ), C = T.length > 0 && T.every(S), j = !C && T.some((a) => S(a) || X(a)), f = r.useCallback(
214
+ [c, k, f, P]
215
+ ), D = I.length > 0 && I.every(k), z = !D && I.some((a) => k(a) || O(a)), h = r.useCallback(
216
216
  (a) => {
217
- if (!v) return;
217
+ if (!y) return;
218
218
  if (c === "single") {
219
- S(a) || v(/* @__PURE__ */ new Set([a]));
219
+ k(a) || y(/* @__PURE__ */ new Set([a]));
220
220
  return;
221
221
  }
222
- const p = new Set(W), g = !S(a);
223
- for (const B of [a, ...y.descendants.get(a) ?? []])
224
- g ? p.add(B) : p.delete(B);
225
- v(oe(p, y.descendants));
222
+ const m = new Set(P), v = !k(a);
223
+ for (const B of [a, ...f.descendants.get(a) ?? []])
224
+ v ? m.add(B) : m.delete(B);
225
+ y(ie(m, f.descendants));
226
226
  },
227
- [v, c, S, W, y]
228
- ), m = r.useCallback(() => {
229
- if (!v) return;
227
+ [y, c, k, P, f]
228
+ ), p = r.useCallback(() => {
229
+ if (!y) return;
230
230
  const a = /* @__PURE__ */ new Set();
231
- if (!C)
232
- for (const p of T) {
233
- a.add(p);
234
- for (const g of y.descendants.get(p) ?? []) a.add(g);
231
+ if (!D)
232
+ for (const m of I) {
233
+ a.add(m);
234
+ for (const v of f.descendants.get(m) ?? []) a.add(v);
235
235
  }
236
- v(oe(a, y.descendants));
237
- }, [v, C, T, y]), [V, O] = r.useState(), I = N && !x, w = I ? V ?? E : E, M = r.useCallback(
236
+ y(ie(a, f.descendants));
237
+ }, [y, D, I, f]), [L, q] = r.useState(), E = w && !x, N = E ? L ?? A : A, J = r.useCallback(
238
238
  (a) => {
239
- if (!N) return;
240
- const p = (w == null ? void 0 : w.column) === a && w.direction === "ascending" ? "descending" : "ascending", g = { column: a, direction: p };
241
- x ? x(g) : O(g);
239
+ if (!w) return;
240
+ const m = (N == null ? void 0 : N.column) === a && N.direction === "ascending" ? "descending" : "ascending", v = { column: a, direction: m };
241
+ x ? x(v) : q(v);
242
242
  },
243
- [w, N, x]
244
- ), re = r.useMemo(
245
- () => I ? Ee(n, w) : n,
246
- [w, I, n]
247
- ), G = r.useRef(null), [Q, l] = r.useState({
243
+ [N, w, x]
244
+ ), X = r.useMemo(
245
+ () => E ? Te(n, N) : n,
246
+ [N, E, n]
247
+ ), _ = r.useRef(null), [F, se] = r.useState({
248
248
  left: !1,
249
249
  right: !1
250
- }), P = r.useCallback(() => {
251
- const a = G.current;
250
+ }), G = r.useCallback(() => {
251
+ const a = _.current;
252
252
  if (!a) return;
253
253
  a.style.setProperty("--table-selection-width", `${a.clientWidth}px`), a.style.setProperty("--table-selection-scroll", `${a.scrollLeft}px`);
254
- const p = a.scrollWidth - a.clientWidth, g = a.scrollLeft > 1, B = a.scrollLeft < p - 1;
255
- l(
256
- (ne) => ne.left === g && ne.right === B ? ne : { left: g, right: B }
254
+ const m = a.scrollWidth - a.clientWidth, v = a.scrollLeft > 1, B = a.scrollLeft < m - 1;
255
+ se(
256
+ (ae) => ae.left === v && ae.right === B ? ae : { left: v, right: B }
257
257
  );
258
258
  }, []);
259
259
  r.useLayoutEffect(() => {
260
- P();
261
- const a = G.current;
260
+ G();
261
+ const a = _.current;
262
262
  if (!a || typeof ResizeObserver > "u") return;
263
- const p = new ResizeObserver(P);
264
- p.observe(a);
265
- const g = a.querySelector("table");
266
- return g && p.observe(g), () => p.disconnect();
267
- }, [P]);
268
- const [H, Y] = r.useState(
263
+ const m = new ResizeObserver(G);
264
+ m.observe(a);
265
+ const v = a.querySelector("table");
266
+ return v && m.observe(v), () => m.disconnect();
267
+ }, [G]);
268
+ const [Q, l] = r.useState(
269
269
  null
270
- ), Z = r.useCallback(
270
+ ), W = r.useCallback(
271
271
  (a) => {
272
- Y(
273
- (p) => p ?? Array.from(
272
+ l(
273
+ (m) => m ?? Array.from(
274
274
  a.cells,
275
- (g) => g.getBoundingClientRect().width
275
+ (v) => v.getBoundingClientRect().width
276
276
  )
277
277
  );
278
278
  },
279
279
  []
280
- ), fe = r.useCallback((a, p) => {
281
- Y((g) => {
282
- if (!g) return g;
283
- const B = [...g];
284
- return B[a] = Math.max(le, p), B;
280
+ ), te = r.useCallback((a, m) => {
281
+ l((v) => {
282
+ if (!v) return v;
283
+ const B = [...v];
284
+ return B[a] = Math.max(ue, m), B;
285
285
  });
286
- }, []), me = r.useCallback(
287
- () => Y(null),
286
+ }, []), re = r.useCallback(
287
+ () => l(null),
288
288
  []
289
- ), Pe = r.useMemo(
289
+ ), ne = r.useMemo(
290
290
  () => ({
291
291
  selectionMode: c,
292
- selectionName: k,
293
- hasNestedRows: R,
294
- isSelected: S,
295
- isIndeterminate: X,
296
- toggleKey: f,
297
- toggleAll: m,
298
- allSelected: C,
299
- someSelected: j,
292
+ selectionName: d,
293
+ hasNestedRows: C,
294
+ isSelected: k,
295
+ isIndeterminate: O,
296
+ toggleKey: h,
297
+ toggleAll: p,
298
+ allSelected: D,
299
+ someSelected: z,
300
300
  isStatic: U,
301
- sortDescriptor: w,
302
- requestSort: N ? M : void 0,
303
- automaticSorting: I,
301
+ sortDescriptor: N,
302
+ requestSort: w ? J : void 0,
303
+ automaticSorting: E,
304
304
  elevatedActionColumn: o,
305
- resizableColumns: F,
306
- columnWidths: H,
307
- snapshotColumnWidths: Z,
308
- setColumnWidth: fe,
309
- resetColumnWidths: me,
310
- stickyHeader: D != null
305
+ resizableColumns: j,
306
+ columnWidths: Q,
307
+ snapshotColumnWidths: W,
308
+ setColumnWidth: te,
309
+ resetColumnWidths: re,
310
+ stickyHeader: S != null
311
311
  }),
312
312
  [
313
313
  c,
314
- k,
315
- R,
316
- S,
317
- X,
318
- f,
319
- m,
314
+ d,
320
315
  C,
321
- j,
316
+ k,
317
+ O,
318
+ h,
319
+ p,
320
+ D,
321
+ z,
322
322
  U,
323
- w,
324
323
  N,
325
- I,
326
- M,
324
+ w,
325
+ E,
326
+ J,
327
327
  o,
328
- F,
329
- H,
330
- Z,
331
- fe,
332
- me,
333
- D
328
+ j,
329
+ Q,
330
+ W,
331
+ te,
332
+ re,
333
+ S
334
334
  ]
335
335
  );
336
- return /* @__PURE__ */ d(Se.Provider, { value: Pe, children: /* @__PURE__ */ d(se.Provider, { value: we, children: /* @__PURE__ */ $(
336
+ return /* @__PURE__ */ u(ze.Provider, { value: ne, children: /* @__PURE__ */ u(le.Provider, { value: xe, children: /* @__PURE__ */ M(
337
337
  "div",
338
338
  {
339
339
  "data-slot": "table-container",
340
- "data-scroll-left": Q.left ? "true" : "false",
341
- "data-scroll-right": Q.right ? "true" : "false",
342
- className: h(
340
+ "data-scroll-left": F.left ? "true" : "false",
341
+ "data-scroll-right": F.right ? "true" : "false",
342
+ className: b(
343
343
  "group/table-shell w-full min-w-0 overflow-clip rounded-m border border-table-stroke bg-table-shell",
344
344
  "[--table-card-radius:var(--radius-m)]",
345
345
  e
346
346
  ),
347
347
  children: [
348
- s && /* @__PURE__ */ d(
348
+ s && /* @__PURE__ */ u(
349
349
  "div",
350
350
  {
351
351
  "data-slot": "table-toolbar",
@@ -353,65 +353,65 @@ const de = r.forwardRef(
353
353
  children: s
354
354
  }
355
355
  ),
356
- /* @__PURE__ */ $(
356
+ /* @__PURE__ */ M(
357
357
  "div",
358
358
  {
359
359
  className: "relative",
360
360
  style: o ? {
361
- "--table-action-column-width": _
361
+ "--table-action-column-width": $
362
362
  } : void 0,
363
363
  children: [
364
- /* @__PURE__ */ d(
364
+ /* @__PURE__ */ u(
365
365
  "div",
366
366
  {
367
- ref: G,
368
- onScroll: P,
369
- className: h(
367
+ ref: _,
368
+ onScroll: G,
369
+ className: b(
370
370
  "overflow-x-auto rounded-(--table-card-radius)",
371
- D != null && "overflow-y-auto"
371
+ S != null && "overflow-y-auto"
372
372
  ),
373
- style: D != null ? { maxHeight: D } : void 0,
374
- children: /* @__PURE__ */ $(
373
+ style: S != null ? { maxHeight: S } : void 0,
374
+ children: /* @__PURE__ */ M(
375
375
  "table",
376
376
  {
377
- ref: u,
377
+ ref: Z,
378
378
  "data-slot": "table",
379
- className: h(
379
+ className: b(
380
380
  "w-full border-separate border-spacing-0 text-m font-normal",
381
381
  // Manual widths need fixed layout so the <colgroup> wins;
382
382
  // until the first resize the automatic layout is untouched.
383
- H && "table-fixed",
383
+ Q && "table-fixed",
384
384
  t
385
385
  ),
386
- ...q,
386
+ ...Y,
387
387
  children: [
388
- H && /* @__PURE__ */ d("colgroup", { children: H.map((a, p) => /* @__PURE__ */ d("col", { style: { width: a } }, p)) }),
389
- re
388
+ Q && /* @__PURE__ */ u("colgroup", { children: Q.map((a, m) => /* @__PURE__ */ u("col", { style: { width: a } }, m)) }),
389
+ X
390
390
  ]
391
391
  }
392
392
  )
393
393
  }
394
394
  ),
395
- /* @__PURE__ */ d(
395
+ /* @__PURE__ */ u(
396
396
  "div",
397
397
  {
398
398
  "aria-hidden": "true",
399
399
  "data-slot": "table-scroll-hint",
400
- className: h(
400
+ className: b(
401
401
  "pointer-events-none absolute inset-y-0 z-20 w-10",
402
402
  "bg-gradient-to-l from-(--table-scroll-hint) to-transparent",
403
403
  "opacity-0 transition-opacity duration-150 ease-out motion-reduce:transition-none",
404
- Q.right && "opacity-100",
404
+ F.right && "opacity-100",
405
405
  o ? "right-[var(--table-action-column-width)]" : "right-0"
406
406
  )
407
407
  }
408
408
  ),
409
- o && /* @__PURE__ */ d(
409
+ o && /* @__PURE__ */ u(
410
410
  "div",
411
411
  {
412
412
  "aria-hidden": "true",
413
413
  "data-slot": "table-action-column-elevation",
414
- className: h(
414
+ className: b(
415
415
  "pointer-events-none absolute inset-y-0 right-0 z-20",
416
416
  "w-[var(--table-action-column-width)]"
417
417
  // No shadow of its own: while columns hide behind the pinned
@@ -424,20 +424,20 @@ const de = r.forwardRef(
424
424
  ]
425
425
  }
426
426
  ),
427
- i && /* @__PURE__ */ d("div", { className: "flex items-center border-t border-table-stroke px-4 py-2.5", children: i })
427
+ i && /* @__PURE__ */ u("div", { className: "flex items-center border-t border-table-stroke px-4 py-2.5", children: i })
428
428
  ]
429
429
  }
430
430
  ) }) });
431
431
  }
432
432
  );
433
- de.displayName = "Table";
434
- const ue = r.forwardRef(({ className: t, ...e }, s) => {
435
- const i = te();
436
- return /* @__PURE__ */ d(ce.Provider, { value: "header", children: /* @__PURE__ */ d(
433
+ fe.displayName = "Table";
434
+ const me = r.forwardRef(({ className: t, ...e }, s) => {
435
+ const i = oe();
436
+ return /* @__PURE__ */ u(pe.Provider, { value: "header", children: /* @__PURE__ */ u(
437
437
  "thead",
438
438
  {
439
439
  ref: s,
440
- className: h(
440
+ className: b(
441
441
  "text-s font-medium text-table-header-foreground",
442
442
  (i == null ? void 0 : i.elevatedActionColumn) && "relative z-30 bg-table-shell",
443
443
  t
@@ -446,9 +446,9 @@ const ue = r.forwardRef(({ className: t, ...e }, s) => {
446
446
  }
447
447
  ) });
448
448
  });
449
- ue.displayName = "TableHeader";
450
- const Te = r.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ d(ce.Provider, { value: "body", children: /* @__PURE__ */ d("tbody", { ref: s, className: h("[&>tr:not([hidden],[data-collapsed]):not(:has(~tr:not([hidden],[data-collapsed])))>td]:border-b-0", t), ...e }) }));
451
- Te.displayName = "TableBody";
449
+ me.displayName = "TableHeader";
450
+ const Ie = r.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ u(pe.Provider, { value: "body", children: /* @__PURE__ */ u("tbody", { ref: s, className: b("[&>tr:not([hidden],[data-collapsed]):not(:has(~tr:not([hidden],[data-collapsed])))>td]:border-b-0", t), ...e }) }));
451
+ Ie.displayName = "TableBody";
452
452
  const K = r.forwardRef(
453
453
  ({
454
454
  className: t,
@@ -457,38 +457,39 @@ const K = r.forwardRef(
457
457
  childRows: i,
458
458
  expanded: n,
459
459
  defaultExpanded: c = !1,
460
- onExpandedChange: b,
461
- disclosureLabel: v,
462
- id: A,
460
+ onExpandedChange: g,
461
+ disclosureLabel: y,
462
+ id: T,
463
463
  hidden: o,
464
- isInteractive: _ = !1,
465
- onClick: E,
466
- onKeyDown: x,
467
- role: N,
468
- tabIndex: U,
469
- style: F,
470
- ...D
471
- }, q) => {
472
- const u = te(), k = r.useContext(ce), R = r.useContext(se), y = r.useId(), T = A ?? y, [J, W] = r.useState(c), [S, X] = r.useState(!1), C = n ?? J, j = L(i).map((l, P) => !r.isValidElement(l) || !z(l.type, K) ? l : r.cloneElement(l, {
473
- key: l.key ?? l.props.rowKey ?? P,
474
- id: l.props.id ?? `${T}-child-${encodeURIComponent(String(l.props.rowKey ?? P))}`
475
- })), f = k === "body" && j.some(r.isValidElement), m = j.flatMap((l) => r.isValidElement(l) && l.props.id ? [l.props.id] : []), V = (l) => {
476
- X(l), n === void 0 && W(!C), b == null || b(!C);
477
- }, O = !!u && u.selectionMode !== "none", I = k === "body" && (typeof E == "function" || f || O && e !== void 0), w = k === "body" && !(u != null && u.isStatic) && (I || _), M = O && k === "body" && e !== void 0 ? u.isSelected(e) : !1, re = r.useMemo(
478
- () => ({ interactive: w, selected: M }),
479
- [w, M]
464
+ isInteractive: $ = !1,
465
+ isActive: A = !1,
466
+ onClick: x,
467
+ onKeyDown: w,
468
+ role: U,
469
+ tabIndex: j,
470
+ style: S,
471
+ ...Y
472
+ }, Z) => {
473
+ const d = oe(), C = r.useContext(pe), f = r.useContext(le), I = r.useId(), H = T ?? I, [P, k] = r.useState(c), [O, D] = r.useState(!1), z = n ?? P, h = V(i).map((l, W) => !r.isValidElement(l) || !R(l.type, K) ? l : r.cloneElement(l, {
474
+ key: l.key ?? l.props.rowKey ?? W,
475
+ id: l.props.id ?? `${H}-child-${encodeURIComponent(String(l.props.rowKey ?? W))}`
476
+ })), p = C === "body" && h.some(r.isValidElement), L = h.flatMap((l) => r.isValidElement(l) && l.props.id ? [l.props.id] : []), q = (l) => {
477
+ D(l), n === void 0 && k(!z), g == null || g(!z);
478
+ }, E = !!d && d.selectionMode !== "none", N = C === "body" && (typeof x == "function" || p || E && e !== void 0), J = C === "body" && A, X = C === "body" && !(d != null && d.isStatic) && (N || $ || J), _ = E && C === "body" && e !== void 0 ? d.isSelected(e) : !1, F = _ || J, se = r.useMemo(
479
+ () => ({ interactive: X, selected: F }),
480
+ [X, F]
480
481
  );
481
482
  let G = !0;
482
- const Q = u != null && u.hasNestedRows || f || R.depth > 0 ? L(s).map((l, P) => {
483
- if (!G || !r.isValidElement(l) || !z(l.type, Ie) && !z(l.type, pe)) return l;
483
+ const Q = d != null && d.hasNestedRows || p || f.depth > 0 ? V(s).map((l, W) => {
484
+ if (!G || !r.isValidElement(l) || !R(l.type, Pe) && !R(l.type, be)) return l;
484
485
  G = !1;
485
- const H = v ?? String(ee(l.props.children)).trim(), Y = k === "header" ? "span" : "div";
486
- return r.cloneElement(l, { key: l.key ?? P }, /* @__PURE__ */ d(
487
- Y,
486
+ const te = y ?? String(ee(l.props.children)).trim(), re = C === "header" ? "span" : "div";
487
+ return r.cloneElement(l, { key: l.key ?? W }, /* @__PURE__ */ u(
488
+ re,
488
489
  {
489
490
  className: "inline-flex items-center gap-2",
490
- style: R.depth > 0 ? { paddingInlineStart: `calc(var(--spacing) * 6 * ${R.depth})` } : void 0,
491
- children: f ? /* @__PURE__ */ $(
491
+ style: f.depth > 0 ? { paddingInlineStart: `calc(var(--spacing) * 6 * ${f.depth})` } : void 0,
492
+ children: p ? /* @__PURE__ */ M(
492
493
  Me,
493
494
  {
494
495
  type: "button",
@@ -496,122 +497,128 @@ const K = r.forwardRef(
496
497
  size: "sm",
497
498
  className: "-mx-2 h-8 shrink-0 border-0 px-2 text-left text-inherit enabled:hover:bg-transparent enabled:hover:text-action-primary-text enabled:active:bg-transparent enabled:active:text-action-primary-text [&>span]:gap-2",
498
499
  style: { fontWeight: "inherit" },
499
- "aria-label": `${C ? "Collapse" : "Expand"} ${H || "row"}`,
500
- "aria-expanded": C,
501
- "aria-controls": m.join(" ") || void 0,
502
- onClick: (Z) => {
503
- Z.stopPropagation(), V(Z.detail === 0);
500
+ "aria-label": `${z ? "Collapse" : "Expand"} ${te || "row"}`,
501
+ "aria-expanded": z,
502
+ "aria-controls": L.join(" ") || void 0,
503
+ onClick: (ne) => {
504
+ ne.stopPropagation(), q(ne.detail === 0);
504
505
  },
505
506
  children: [
506
- /* @__PURE__ */ d(De, { reducedMotion: "user", children: /* @__PURE__ */ d(We.span, { initial: !1, animate: { rotate: C ? 90 : 0 }, transition: S ? { duration: 0 } : je, className: "inline-flex size-6 shrink-0 items-center justify-center", children: /* @__PURE__ */ d($e, { "aria-hidden": !0 }) }) }),
507
+ /* @__PURE__ */ u(De, { reducedMotion: "user", children: /* @__PURE__ */ u(We.span, { initial: !1, animate: { rotate: z ? 90 : 0 }, transition: O ? { duration: 0 } : je, className: "inline-flex size-6 shrink-0 items-center justify-center", children: /* @__PURE__ */ u($e, { "aria-hidden": !0 }) }) }),
507
508
  l.props.children
508
509
  ]
509
510
  }
510
- ) : /* @__PURE__ */ $(Ae, { children: [
511
- /* @__PURE__ */ d("span", { "aria-hidden": !0, className: "size-6 shrink-0" }),
511
+ ) : /* @__PURE__ */ M(Ae, { children: [
512
+ /* @__PURE__ */ u("span", { "aria-hidden": !0, className: "size-6 shrink-0" }),
512
513
  l.props.children
513
514
  ] })
514
515
  }
515
516
  ));
516
517
  }) : s;
517
- return /* @__PURE__ */ $(ye.Provider, { value: re, children: [
518
- /* @__PURE__ */ $(
518
+ return /* @__PURE__ */ M(we.Provider, { value: se, children: [
519
+ /* @__PURE__ */ M(
519
520
  "tr",
520
521
  {
521
- ref: q,
522
- id: T,
522
+ ref: Z,
523
+ id: H,
523
524
  hidden: o,
524
- "aria-hidden": R.hidden || void 0,
525
- "data-collapsed": R.hidden || void 0,
526
- "data-depth": u != null && u.hasNestedRows ? R.depth : void 0,
527
- "data-interactive": w || void 0,
528
- "data-selected": M || void 0,
529
- className: h(
525
+ "aria-hidden": f.hidden || void 0,
526
+ "data-collapsed": f.hidden || void 0,
527
+ "data-depth": d != null && d.hasNestedRows ? f.depth : void 0,
528
+ "data-interactive": X || void 0,
529
+ "data-selected": _ || void 0,
530
+ "data-active": J || void 0,
531
+ "aria-current": J ? "true" : void 0,
532
+ className: b(
530
533
  "group/row",
531
- k === "body" && "h-16",
534
+ C === "body" && "h-16",
532
535
  // Native table-row collapse removes height while preserving the
533
536
  // intrinsic column widths. `hidden` / display:none would make
534
537
  // every column shift when longer descendants become visible.
535
- R.hidden && "collapse",
536
- I && "cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
538
+ f.hidden && "collapse",
539
+ N && "cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
537
540
  t
538
541
  ),
539
- style: w ? {
540
- ...M ? ae : Oe,
542
+ style: X ? {
543
+ ...F ? ce : Oe,
541
544
  backgroundPositionX: "var(--table-selection-scroll, 0px)",
542
- ...F
543
- } : F,
545
+ ...S
546
+ } : S,
544
547
  onClick: (l) => {
545
- const P = l.target;
546
- P instanceof Element && P.closest(
548
+ const W = l.target;
549
+ W instanceof Element && W.closest(
547
550
  "a, button, input, select, textarea, [role='button'], [role='link'], [contenteditable='true']"
548
- ) || (E ? E(l) : O && e !== void 0 ? u == null || u.toggleKey(e) : f && V(l.detail === 0));
551
+ ) || (x ? x(l) : E && e !== void 0 ? d == null || d.toggleKey(e) : p && q(l.detail === 0));
549
552
  },
550
553
  onKeyDown: (l) => {
551
- x == null || x(l), !l.defaultPrevented && I && l.target === l.currentTarget && (l.key === "Enter" || l.key === " ") && (l.preventDefault(), l.currentTarget.click());
554
+ w == null || w(l), !l.defaultPrevented && N && l.target === l.currentTarget && (l.key === "Enter" || l.key === " ") && (l.preventDefault(), l.currentTarget.click());
552
555
  },
553
- role: N,
554
- tabIndex: U ?? (I ? 0 : void 0),
555
- ...D,
556
+ role: U,
557
+ tabIndex: j ?? (N ? 0 : void 0),
558
+ ...Y,
556
559
  children: [
557
- O && (k === "header" ? /* @__PURE__ */ $(
560
+ E && (C === "header" ? /* @__PURE__ */ M(
558
561
  "th",
559
562
  {
560
563
  scope: "col",
561
- className: h(
564
+ className: b(
562
565
  "w-10 border-b border-table-stroke px-4 py-2.5",
563
- ke,
566
+ Re,
564
567
  // Sticky without the baked shadow — an always-on smudge
565
568
  // muddies the shell's corners (elevation = actionability).
566
569
  // (sticky is positioned, so the ::after tick anchors to it —
567
570
  // no `relative` needed, and it would conflict with sticky.)
568
571
  "sticky left-0 z-10",
569
- Ce
572
+ ke
570
573
  ),
571
574
  children: [
572
- /* @__PURE__ */ d("span", { className: "sr-only", children: "Row selection" }),
573
- u.selectionMode === "multiple" && /* @__PURE__ */ d(
574
- be,
575
+ /* @__PURE__ */ u("span", { className: "sr-only", children: "Row selection" }),
576
+ d.selectionMode === "multiple" && /* @__PURE__ */ u(
577
+ ge,
575
578
  {
576
579
  size: "sm",
577
580
  "aria-label": "Select all rows",
578
- checked: u.allSelected,
579
- indeterminate: u.someSelected,
580
- onChange: u.toggleAll
581
+ checked: d.allSelected,
582
+ indeterminate: d.someSelected,
583
+ onChange: d.toggleAll
581
584
  }
582
585
  )
583
586
  ]
584
587
  }
585
- ) : /* @__PURE__ */ d(
588
+ ) : /* @__PURE__ */ u(
586
589
  "td",
587
590
  {
588
- className: h(
591
+ className: b(
589
592
  "h-16 w-10 px-4 py-2",
590
- Ne(w, { sticky: "left", selected: M }),
593
+ Ce(X, { sticky: "left", selected: F }),
591
594
  "sticky left-0 z-10"
592
595
  ),
593
- style: w && M ? {
594
- ...ae,
596
+ style: X && F ? {
597
+ ...ce,
595
598
  backgroundPositionX: "left"
596
599
  } : void 0,
597
600
  onClick: (l) => l.stopPropagation(),
598
- children: e !== void 0 && (u.selectionMode === "single" ? /* @__PURE__ */ d(
601
+ children: e !== void 0 && (d.selectionMode === "single" ? /* @__PURE__ */ u(
599
602
  Ve,
600
603
  {
601
- name: u.selectionName,
604
+ name: d.selectionName,
602
605
  value: e,
603
606
  "aria-label": `Select ${e}`,
604
- checked: M,
605
- onChange: () => u.toggleKey(e)
607
+ checked: _,
608
+ onChange: () => d.toggleKey(e)
606
609
  }
607
- ) : /* @__PURE__ */ d(
608
- be,
610
+ ) : /* @__PURE__ */ u(
611
+ ge,
609
612
  {
610
613
  size: "sm",
611
614
  "aria-label": `Select ${e}`,
612
- checked: M,
613
- indeterminate: u.isIndeterminate(e),
614
- onChange: () => u.toggleKey(e)
615
+ checked: _,
616
+ indeterminate: d.isIndeterminate(e),
617
+ onChange: () => d.toggleKey(e),
618
+ className: b(
619
+ "transition-opacity duration-150 ease-out motion-reduce:transition-none",
620
+ _ || d.isIndeterminate(e) ? "opacity-100" : "opacity-0 group-hover/row:opacity-100 group-focus-within/row:opacity-100"
621
+ )
615
622
  }
616
623
  ))
617
624
  }
@@ -620,12 +627,12 @@ const K = r.forwardRef(
620
627
  ]
621
628
  }
622
629
  ),
623
- f && /* @__PURE__ */ d(se.Provider, { value: { depth: R.depth + 1, hidden: R.hidden || !C || !!o }, children: j })
630
+ p && /* @__PURE__ */ u(le.Provider, { value: { depth: f.depth + 1, hidden: f.hidden || !z || !!o }, children: h })
624
631
  ] });
625
632
  }
626
633
  );
627
634
  K.displayName = "TableRow";
628
- const pe = r.forwardRef(
635
+ const be = r.forwardRef(
629
636
  ({
630
637
  className: t,
631
638
  align: e,
@@ -633,66 +640,66 @@ const pe = r.forwardRef(
633
640
  sortKey: i,
634
641
  allowsSorting: n = !0,
635
642
  _sortColumnIndex: c,
636
- children: b,
637
- ...v
638
- }, A) => {
639
- var X, C, j;
640
- const o = te(), E = (o != null && o.automaticSorting && c !== void 0 ? `${ie}${c}` : void 0) ?? i, x = Number(v.colSpan ?? 1) === 1, N = String(ee(b)).trim(), U = N.length > 0, F = n && x && s !== "right" && U && !!E && !!(o != null && o.requestSort), D = F && ((X = o == null ? void 0 : o.sortDescriptor) == null ? void 0 : X.column) === E, q = (C = o == null ? void 0 : o.sortDescriptor) == null ? void 0 : C.direction, u = !!(o != null && o.resizableColumns) && x && s !== "right", k = r.useRef(null), [R, y] = r.useState(!1), T = (f) => {
641
- if (f.button !== 0 || !o) return;
642
- const m = f.currentTarget.parentElement, V = m == null ? void 0 : m.parentElement;
643
- if (!(!m || !V)) {
644
- o.snapshotColumnWidths(V), k.current = {
645
- index: m.cellIndex,
646
- startX: f.clientX,
647
- startWidth: m.getBoundingClientRect().width
648
- }, y(!0);
643
+ children: g,
644
+ ...y
645
+ }, T) => {
646
+ var O, D, z;
647
+ const o = oe(), A = (o != null && o.automaticSorting && c !== void 0 ? `${de}${c}` : void 0) ?? i, x = Number(y.colSpan ?? 1) === 1, w = String(ee(g)).trim(), U = w.length > 0, j = n && x && s !== "right" && U && !!A && !!(o != null && o.requestSort), S = j && ((O = o == null ? void 0 : o.sortDescriptor) == null ? void 0 : O.column) === A, Y = (D = o == null ? void 0 : o.sortDescriptor) == null ? void 0 : D.direction, Z = !!(o != null && o.resizableColumns) && x && s !== "right", d = r.useRef(null), [C, f] = r.useState(!1), I = (h) => {
648
+ if (h.button !== 0 || !o) return;
649
+ const p = h.currentTarget.parentElement, L = p == null ? void 0 : p.parentElement;
650
+ if (!(!p || !L)) {
651
+ o.snapshotColumnWidths(L), d.current = {
652
+ index: p.cellIndex,
653
+ startX: h.clientX,
654
+ startWidth: p.getBoundingClientRect().width
655
+ }, f(!0);
649
656
  try {
650
- f.currentTarget.setPointerCapture(f.pointerId);
657
+ h.currentTarget.setPointerCapture(h.pointerId);
651
658
  } catch {
652
659
  }
653
- f.preventDefault();
660
+ h.preventDefault();
654
661
  }
655
- }, J = (f) => {
656
- const m = k.current;
657
- !m || !o || o.setColumnWidth(
658
- m.index,
659
- m.startWidth + (f.clientX - m.startX)
662
+ }, H = (h) => {
663
+ const p = d.current;
664
+ !p || !o || o.setColumnWidth(
665
+ p.index,
666
+ p.startWidth + (h.clientX - p.startX)
660
667
  );
661
- }, W = () => {
662
- k.current = null, y(!1);
663
- }, S = (f) => {
664
- if (f.key !== "ArrowLeft" && f.key !== "ArrowRight" || !o) return;
665
- f.preventDefault();
666
- const m = f.currentTarget.parentElement, V = m == null ? void 0 : m.parentElement;
667
- if (!m || !V) return;
668
- o.snapshotColumnWidths(V);
669
- const O = f.shiftKey ? 32 : 8, I = f.key === "ArrowRight" ? O : -O;
668
+ }, P = () => {
669
+ d.current = null, f(!1);
670
+ }, k = (h) => {
671
+ if (h.key !== "ArrowLeft" && h.key !== "ArrowRight" || !o) return;
672
+ h.preventDefault();
673
+ const p = h.currentTarget.parentElement, L = p == null ? void 0 : p.parentElement;
674
+ if (!p || !L) return;
675
+ o.snapshotColumnWidths(L);
676
+ const q = h.shiftKey ? 32 : 8, E = h.key === "ArrowRight" ? q : -q;
670
677
  o.setColumnWidth(
671
- m.cellIndex,
672
- m.getBoundingClientRect().width + I
678
+ p.cellIndex,
679
+ p.getBoundingClientRect().width + E
673
680
  );
674
681
  };
675
- return /* @__PURE__ */ $(
682
+ return /* @__PURE__ */ M(
676
683
  "th",
677
684
  {
678
- ref: A,
685
+ ref: T,
679
686
  scope: "col",
680
- "aria-sort": D ? q === "ascending" ? "ascending" : "descending" : F ? "none" : void 0,
681
- className: h(
687
+ "aria-sort": S ? Y === "ascending" ? "ascending" : "descending" : j ? "none" : void 0,
688
+ className: b(
682
689
  // whitespace-nowrap: header labels hug their content — the table
683
690
  // scrolls horizontally, so wrapping "Null %" to two lines only
684
691
  // wastes header height without saving any width.
685
692
  "relative whitespace-nowrap border-b border-table-stroke px-4 py-2.5 text-s font-medium text-table-header-foreground",
686
- Ce,
687
693
  ke,
694
+ Re,
688
695
  // The resize handle carries its own tick visual, so drop the
689
696
  // decorative one; the last column never shows a handle.
690
- u && "after:hidden [&:last-child>[data-slot=resize-handle]]:hidden",
697
+ Z && "after:hidden [&:last-child>[data-slot=resize-handle]]:hidden",
691
698
  // Capped-height tables scroll under the header: pin it to the
692
699
  // viewport top, painted like the table surface so rows pass beneath.
693
700
  (o == null ? void 0 : o.stickyHeader) && "sticky top-0 z-30",
694
- he(e),
695
- s && (s === "right" && (o != null && o.elevatedActionColumn) ? h(
701
+ ve(e),
702
+ s && (s === "right" && (o != null && o.elevatedActionColumn) ? b(
696
703
  // Preserve the semantic column width, but do not pin or paint
697
704
  // a blank header cell over the labels behind it. Only body
698
705
  // action cells participate in the sticky elevated surface.
@@ -701,57 +708,57 @@ const pe = r.forwardRef(
701
708
  "max-w-[var(--table-action-column-width)]",
702
709
  "px-2",
703
710
  "bg-transparent"
704
- ) : ve(s)),
711
+ ) : ye(s)),
705
712
  t
706
713
  ),
707
- ...v,
714
+ ...y,
708
715
  children: [
709
- F ? /* @__PURE__ */ $(
716
+ j ? /* @__PURE__ */ M(
710
717
  "button",
711
718
  {
712
719
  type: "button",
713
- onClick: () => o.requestSort(E),
714
- className: h(
720
+ onClick: () => o.requestSort(A),
721
+ className: b(
715
722
  "group/sort -mx-1 inline-flex items-center gap-1 rounded px-1 outline-none transition-colors",
716
723
  "hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
717
724
  e === "right" && "flex-row-reverse",
718
- D && "font-medium"
725
+ S && "font-medium"
719
726
  ),
720
727
  children: [
721
- b,
722
- D ? q === "ascending" ? /* @__PURE__ */ d(Le, { className: "size-3.5" }) : /* @__PURE__ */ d(_e, { className: "size-3.5" }) : /* @__PURE__ */ d(Fe, { className: "size-3.5 opacity-0 transition-opacity group-hover/sort:opacity-60" })
728
+ g,
729
+ S ? Y === "ascending" ? /* @__PURE__ */ u(Le, { className: "size-3.5" }) : /* @__PURE__ */ u(_e, { className: "size-3.5" }) : /* @__PURE__ */ u(Fe, { className: "size-3.5 opacity-0 transition-opacity group-hover/sort:opacity-60" })
723
730
  ]
724
731
  }
725
- ) : U ? b : /* @__PURE__ */ d("span", { className: "sr-only", children: v["aria-label"] ?? "Table column" }),
726
- u && /* @__PURE__ */ d(
732
+ ) : U ? g : /* @__PURE__ */ u("span", { className: "sr-only", children: y["aria-label"] ?? "Table column" }),
733
+ Z && /* @__PURE__ */ u(
727
734
  "span",
728
735
  {
729
736
  "data-slot": "resize-handle",
730
737
  role: "separator",
731
738
  "aria-orientation": "vertical",
732
- "aria-label": `Resize ${N || "this"} column`,
733
- "aria-valuemin": le,
739
+ "aria-label": `Resize ${w || "this"} column`,
740
+ "aria-valuemin": ue,
734
741
  "aria-valuemax": 2e3,
735
- "aria-valuenow": ((j = o == null ? void 0 : o.columnWidths) == null ? void 0 : j[c ?? -1]) ?? le,
742
+ "aria-valuenow": ((z = o == null ? void 0 : o.columnWidths) == null ? void 0 : z[c ?? -1]) ?? ue,
736
743
  tabIndex: 0,
737
- "data-resizing": R ? "true" : void 0,
738
- onPointerDown: T,
739
- onPointerMove: J,
740
- onPointerUp: W,
741
- onPointerCancel: W,
742
- onKeyDown: S,
744
+ "data-resizing": C ? "true" : void 0,
745
+ onPointerDown: I,
746
+ onPointerMove: H,
747
+ onPointerUp: P,
748
+ onPointerCancel: P,
749
+ onKeyDown: k,
743
750
  onDoubleClick: () => o == null ? void 0 : o.resetColumnWidths(),
744
- className: h(
751
+ className: b(
745
752
  // 12px hit area straddling the column edge; the 1px tick inside
746
753
  // is the visible affordance (it replaces the decorative one).
747
754
  "group/resize absolute -right-1.5 top-0 z-10 flex h-full w-3 cursor-col-resize touch-none select-none items-center justify-center rounded-sm outline-none",
748
755
  "focus-visible:ring-2 focus-visible:ring-ring"
749
756
  ),
750
- children: /* @__PURE__ */ d(
757
+ children: /* @__PURE__ */ u(
751
758
  "span",
752
759
  {
753
760
  "aria-hidden": "true",
754
- className: h(
761
+ className: b(
755
762
  "h-4 w-px rounded-sm bg-border-strong",
756
763
  "transition-[transform,background-color] duration-150 ease-out motion-reduce:transition-none",
757
764
  "group-hover/resize:scale-y-125 group-hover/resize:bg-foreground/60",
@@ -767,21 +774,21 @@ const pe = r.forwardRef(
767
774
  );
768
775
  }
769
776
  );
770
- pe.displayName = "TableColumn";
771
- const Ie = r.forwardRef(
772
- ({ className: t, align: e, sticky: s, sortValue: i, style: n, ...c }, b) => {
773
- const v = te(), { interactive: A, selected: o } = r.useContext(ye), _ = s === "right" && (v == null ? void 0 : v.elevatedActionColumn);
774
- return /* @__PURE__ */ d(
777
+ be.displayName = "TableColumn";
778
+ const Pe = r.forwardRef(
779
+ ({ className: t, align: e, sticky: s, sortValue: i, style: n, ...c }, g) => {
780
+ const y = oe(), { interactive: T, selected: o } = r.useContext(we), $ = s === "right" && (y == null ? void 0 : y.elevatedActionColumn);
781
+ return /* @__PURE__ */ u(
775
782
  "td",
776
783
  {
777
- ref: b,
784
+ ref: g,
778
785
  "data-sort-value": i instanceof Date ? i.toISOString() : i,
779
- style: A && o && s ? {
780
- ...ae,
786
+ style: T && o && s ? {
787
+ ...ce,
781
788
  backgroundPositionX: s,
782
789
  ...n
783
790
  } : n,
784
- className: h(
791
+ className: b(
785
792
  // whitespace-nowrap: cell content never wraps — the table's
786
793
  // overflow-x-auto viewport scrolls horizontally instead, matching the
787
794
  // header cells. Opt back into wrapping with `whitespace-normal` for
@@ -789,10 +796,10 @@ const Ie = r.forwardRef(
789
796
  // Cell values own the ADS 14px body-text contract instead of relying
790
797
  // on inheritance from <Table>; nested content stays 14px by default.
791
798
  "h-16 whitespace-nowrap px-4 py-2 text-m",
792
- Ne(A, { sticky: s, selected: o }),
793
- he(e),
794
- s && ve(s, v == null ? void 0 : v.elevatedActionColumn),
795
- _ && h(
799
+ Ce(T, { sticky: s, selected: o }),
800
+ ve(e),
801
+ s && ye(s, y == null ? void 0 : y.elevatedActionColumn),
802
+ $ && b(
796
803
  "w-[var(--table-action-column-width)]",
797
804
  "min-w-[var(--table-action-column-width)]",
798
805
  "max-w-[var(--table-action-column-width)]",
@@ -807,12 +814,12 @@ const Ie = r.forwardRef(
807
814
  );
808
815
  }
809
816
  );
810
- Ie.displayName = "TableCell";
817
+ Pe.displayName = "TableCell";
811
818
  export {
812
- de as Table,
813
- Te as TableBody,
814
- Ie as TableCell,
815
- pe as TableColumn,
816
- ue as TableHeader,
819
+ fe as Table,
820
+ Ie as TableBody,
821
+ Pe as TableCell,
822
+ be as TableColumn,
823
+ me as TableHeader,
817
824
  K as TableRow
818
825
  };