@gears-frontx/ui-kit 0.4.0-alpha.6 → 0.4.0-alpha.7

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.
Files changed (46) hide show
  1. package/dist/button.js +60 -57
  2. package/dist/button.js.map +1 -1
  3. package/dist/carousel.js.map +1 -1
  4. package/dist/chunks/button.BWdRnIvz.css +1 -0
  5. package/dist/chunks/combobox.CKhQGu5a.css +1 -0
  6. package/dist/chunks/pagination.CKDEuWt6.css +1 -0
  7. package/dist/chunks/spinner.CLQsj9Ky.css +1 -0
  8. package/dist/chunks/table.CMm41tvy.css +1 -0
  9. package/dist/combobox.js +135 -116
  10. package/dist/combobox.js.map +1 -1
  11. package/dist/components/button/button.d.ts +18 -5
  12. package/dist/components/button/button.d.ts.map +1 -1
  13. package/dist/components/carousel/carousel.d.ts +2 -2
  14. package/dist/components/carousel/carousel.d.ts.map +1 -1
  15. package/dist/components/combobox/combobox.d.ts +12 -1
  16. package/dist/components/combobox/combobox.d.ts.map +1 -1
  17. package/dist/components/pagination/pagination.d.ts +33 -2
  18. package/dist/components/pagination/pagination.d.ts.map +1 -1
  19. package/dist/components/pagination/public.d.ts +1 -1
  20. package/dist/components/pagination/public.d.ts.map +1 -1
  21. package/dist/components/sidebar/sidebar.d.ts +1 -1
  22. package/dist/components/sidebar/sidebar.d.ts.map +1 -1
  23. package/dist/components/spinner/spinner.d.ts +11 -1
  24. package/dist/components/spinner/spinner.d.ts.map +1 -1
  25. package/dist/components/table/table.d.ts +18 -2
  26. package/dist/components/table/table.d.ts.map +1 -1
  27. package/dist/docs/button.md +24 -4
  28. package/dist/docs/combobox.md +147 -0
  29. package/dist/docs/pagination.md +84 -5
  30. package/dist/docs/spinner.md +5 -1
  31. package/dist/docs/table.md +95 -11
  32. package/dist/index.js +198 -195
  33. package/dist/pagination.js +96 -52
  34. package/dist/pagination.js.map +1 -1
  35. package/dist/sidebar.js.map +1 -1
  36. package/dist/spinner.js +30 -27
  37. package/dist/spinner.js.map +1 -1
  38. package/dist/table.js +106 -97
  39. package/dist/table.js.map +1 -1
  40. package/llms.txt +27 -9
  41. package/package.json +1 -1
  42. package/dist/chunks/button.DgUTlW0_.css +0 -1
  43. package/dist/chunks/combobox.DZZ3tHP_.css +0 -1
  44. package/dist/chunks/pagination.bFb5us_w.css +0 -1
  45. package/dist/chunks/spinner.sH6x_1Uf.css +0 -1
  46. package/dist/chunks/table.DR2nFT0x.css +0 -1
package/dist/table.js CHANGED
@@ -1,22 +1,24 @@
1
1
  "use client";
2
- import { jsx as u, jsxs as P } from "react/jsx-runtime";
3
- import { cx as f, cva as W } from "class-variance-authority";
2
+ import { jsx as f, jsxs as P } from "react/jsx-runtime";
3
+ import { cx as m, cva as W } from "class-variance-authority";
4
4
  import { useRef as g, useState as N, useEffect as w, useCallback as F } from "react";
5
- import './chunks/table.DR2nFT0x.css';const O = "_tableContainer_1h458_8", z = "_table_1h458_8", L = "_tableRow_1h458_84", $ = "_tableBody_1h458_101", S = "_tableHead_1h458_69", X = "_columnResizer_1h458_229", A = "_tableCell_1h458_273", k = "_variantDefault_1h458_335", V = "_variantCollection_1h458_339", j = "_densityCompact_1h458_409", K = "_tableCaption_1h458_418", U = "_tableFooter_1h458_440", s = {
5
+ import './chunks/table.CMm41tvy.css';const O = "_tableContainer_pfb4y_8", z = "_table_pfb4y_8", k = "_stickyHeader_pfb4y_79", L = "_tableHeader_pfb4y_91", $ = "_tableHead_pfb4y_70", S = "_tableRow_pfb4y_59", X = "_tableBody_pfb4y_147", A = "_columnResizer_pfb4y_279", V = "_tableCell_pfb4y_127", j = "_variantDefault_pfb4y_387", K = "_variantCollection_pfb4y_94", U = "_densityCompact_pfb4y_461", Y = "_tableCaption_pfb4y_470", q = "_tableFooter_pfb4y_492", i = {
6
6
  tableContainer: O,
7
7
  table: z,
8
- tableRow: L,
9
- tableBody: $,
10
- tableHead: S,
11
- columnResizer: X,
12
- tableCell: A,
13
- variantDefault: k,
14
- variantCollection: V,
15
- densityCompact: j,
16
- tableCaption: K,
17
- tableFooter: U
18
- }, x = 12, R = 8, Y = 72, q = 32;
19
- function G(e) {
8
+ stickyHeader: k,
9
+ tableHeader: L,
10
+ tableHead: $,
11
+ tableRow: S,
12
+ tableBody: X,
13
+ columnResizer: A,
14
+ tableCell: V,
15
+ variantDefault: j,
16
+ variantCollection: K,
17
+ densityCompact: U,
18
+ tableCaption: Y,
19
+ tableFooter: q
20
+ }, H = 12, x = 8, G = 72, J = 32;
21
+ function Q(e) {
20
22
  var t;
21
23
  return Array.from(((t = e.parentElement) == null ? void 0 : t.children) ?? []).filter(
22
24
  (n) => n instanceof HTMLTableCellElement
@@ -24,10 +26,10 @@ function G(e) {
24
26
  }
25
27
  function T(e, t) {
26
28
  var n;
27
- return t !== void 0 ? t : (n = e.textContent) != null && n.trim() ? Y : q;
29
+ return t !== void 0 ? t : (n = e.textContent) != null && n.trim() ? G : J;
28
30
  }
29
- function I(e) {
30
- const t = G(e), n = e.closest("table");
31
+ function R(e) {
32
+ const t = Q(e), n = e.closest("table");
31
33
  if (n && n.style.tableLayout !== "fixed") {
32
34
  for (const a of t)
33
35
  a.style.width = `${Math.round(a.getBoundingClientRect().width)}px`;
@@ -41,65 +43,65 @@ function M(e) {
41
43
  function E(e) {
42
44
  var n;
43
45
  const t = (n = e[0]) == null ? void 0 : n.closest("table");
44
- t && (t.style.width = `${e.reduce((a, i) => a + M(i), 0)}px`);
46
+ t && (t.style.width = `${e.reduce((a, s) => a + M(s), 0)}px`);
45
47
  }
46
- function H(e, t, n) {
48
+ function I(e, t, n) {
47
49
  const a = e[t];
48
50
  if (!a)
49
51
  return 0;
50
- const i = T(a, n), d = a.closest("table");
51
- if (t !== e.length - 1 || !d)
52
- return i;
53
- const c = Number.parseFloat(getComputedStyle(d).minWidth);
52
+ const s = T(a, n), b = a.closest("table");
53
+ if (t !== e.length - 1 || !b)
54
+ return s;
55
+ const c = Number.parseFloat(getComputedStyle(b).minWidth);
54
56
  if (!Number.isFinite(c))
55
- return i;
56
- const C = e.slice(0, t).reduce((b, m) => b + M(m), 0);
57
- return Math.max(i, Math.ceil(c - C));
57
+ return s;
58
+ const d = e.slice(0, t).reduce((u, p) => u + M(p), 0);
59
+ return Math.max(s, Math.ceil(c - d));
58
60
  }
59
- function D(e, t, n, a, i, d, c) {
60
- const C = e[t];
61
- if (!C)
61
+ function D(e, t, n, a, s, b, c) {
62
+ const d = e[t];
63
+ if (!d)
62
64
  return n;
63
- const b = a === null ? null : e[t + 1], m = a === null || !b ? Number.POSITIVE_INFINITY : n + a - c, p = Math.round(Math.min(Math.max(n + i, d), m));
64
- return C.style.width = `${p}px`, b && a !== null && (b.style.width = `${n + a - p}px`), E(e), p;
65
+ const u = a === null ? null : e[t + 1], p = a === null || !u ? Number.POSITIVE_INFINITY : n + a - c, h = Math.round(Math.min(Math.max(n + s, b), p));
66
+ return d.style.width = `${h}px`, u && a !== null && (u.style.width = `${n + a - h}px`), E(e), h;
65
67
  }
66
- function J({ minWidth: e }) {
67
- const t = g(null), n = g(null), [a, i] = N(""), [d, c] = N(null);
68
+ function Z({ minWidth: e }) {
69
+ const t = g(null), n = g(null), [a, s] = N(""), [b, c] = N(null);
68
70
  w(() => {
69
71
  var o, l, r;
70
- i(((r = (l = (o = t.current) == null ? void 0 : o.closest("th")) == null ? void 0 : l.textContent) == null ? void 0 : r.trim()) ?? "");
72
+ s(((r = (l = (o = t.current) == null ? void 0 : o.closest("th")) == null ? void 0 : l.textContent) == null ? void 0 : r.trim()) ?? "");
71
73
  }, []);
72
- const C = (o) => {
74
+ const d = (o) => {
73
75
  document.body.style.cursor = o ? "col-resize" : "", document.body.style.userSelect = o ? "none" : "";
74
- }, b = (o, l, r) => {
76
+ }, u = (o, l, r) => {
75
77
  try {
76
78
  r ? o.setPointerCapture(l) : o.hasPointerCapture(l) && o.releasePointerCapture(l);
77
79
  } catch {
78
80
  }
79
- }, m = F(() => {
81
+ }, p = F(() => {
80
82
  const o = n.current;
81
83
  if (!o)
82
84
  return;
83
- n.current = null, C(!1);
85
+ n.current = null, d(!1);
84
86
  const l = t.current;
85
- l && b(l, o.pointerId, !1);
87
+ l && u(l, o.pointerId, !1);
86
88
  }, []);
87
- w(() => m, [m]);
88
- const p = (o) => {
89
+ w(() => p, [p]);
90
+ const h = (o) => {
89
91
  const l = o.currentTarget.closest("th");
90
92
  if (!(l instanceof HTMLTableCellElement) || o.button !== 0)
91
93
  return;
92
- const r = I(l), h = r.indexOf(l), _ = r[h + 1] ?? null;
94
+ const r = R(l), y = r.indexOf(l), _ = r[y + 1] ?? null;
93
95
  n.current = {
94
96
  pointerId: o.pointerId,
95
97
  startX: o.clientX,
96
98
  cells: r,
97
- index: h,
99
+ index: y,
98
100
  selfStart: l.getBoundingClientRect().width,
99
101
  neighbourStart: _ ? _.getBoundingClientRect().width : null,
100
- minSelf: H(r, h, e),
102
+ minSelf: I(r, y, e),
101
103
  minNeighbour: _ ? T(_, void 0) : 0
102
- }, b(o.currentTarget, o.pointerId, !0), C(!0), c(Math.round(n.current.selfStart));
104
+ }, u(o.currentTarget, o.pointerId, !0), d(!0), c(Math.round(n.current.selfStart));
103
105
  }, v = (o) => {
104
106
  const l = n.current;
105
107
  !l || l.pointerId !== o.pointerId || c(
@@ -114,45 +116,45 @@ function J({ minWidth: e }) {
114
116
  )
115
117
  );
116
118
  }, B = (o) => {
117
- const l = o.key === "ArrowLeft" ? -x : o.key === "ArrowRight" ? x : 0;
119
+ const l = o.key === "ArrowLeft" ? -H : o.key === "ArrowRight" ? H : 0;
118
120
  if (l === 0)
119
121
  return;
120
122
  const r = o.currentTarget.closest("th");
121
123
  if (!(r instanceof HTMLTableCellElement))
122
124
  return;
123
125
  o.preventDefault();
124
- const h = I(r), _ = h.indexOf(r), y = h[_ + 1] ?? null;
126
+ const y = R(r), _ = y.indexOf(r), C = y[_ + 1] ?? null;
125
127
  c(
126
128
  D(
127
- h,
129
+ y,
128
130
  _,
129
131
  r.getBoundingClientRect().width,
130
- y ? y.getBoundingClientRect().width : null,
132
+ C ? C.getBoundingClientRect().width : null,
131
133
  l,
132
- H(h, _, e),
133
- y ? T(y, void 0) : 0
134
+ I(y, _, e),
135
+ C ? T(C, void 0) : 0
134
136
  )
135
137
  );
136
138
  };
137
- return /* @__PURE__ */ u(
139
+ return /* @__PURE__ */ f(
138
140
  "span",
139
141
  {
140
142
  ref: t,
141
143
  role: "separator",
142
144
  "aria-orientation": "vertical",
143
- "aria-label": `${a || "Column"} width${d === null ? "" : `, ${d} pixels`}`,
145
+ "aria-label": `${a || "Column"} width${b === null ? "" : `, ${b} pixels`}`,
144
146
  tabIndex: 0,
145
- className: s.columnResizer,
146
- style: { width: R, insetInlineEnd: -R / 2 },
147
- onPointerDown: p,
147
+ className: i.columnResizer,
148
+ style: { width: x, insetInlineEnd: -x / 2 },
149
+ onPointerDown: h,
148
150
  onPointerMove: v,
149
- onPointerUp: m,
150
- onPointerCancel: m,
151
+ onPointerUp: p,
152
+ onPointerCancel: p,
151
153
  onKeyDown: B
152
154
  }
153
155
  );
154
156
  }
155
- const Q = W(s.table, {
157
+ const tt = W(i.table, {
156
158
  variants: {
157
159
  /*
158
160
  * `collection` is the spec's own guide word for the dense arrangement:
@@ -160,82 +162,89 @@ const Q = W(s.table, {
160
162
  * density axis below is orthogonal to it and still applies.
161
163
  */
162
164
  variant: {
163
- default: s.variantDefault,
164
- collection: s.variantCollection
165
+ default: i.variantDefault,
166
+ collection: i.variantCollection
165
167
  }
166
168
  },
167
169
  defaultVariants: {
168
170
  variant: "default"
169
171
  }
170
172
  });
171
- function nt({
173
+ function lt({
172
174
  className: e,
173
175
  label: t,
174
176
  density: n,
175
177
  variant: a,
176
- containerClassName: i,
177
- containerStyle: d,
178
- ...c
178
+ containerClassName: s,
179
+ containerStyle: b,
180
+ containerRef: c,
181
+ stickyHeader: d,
182
+ ...u
179
183
  }) {
180
- return /* @__PURE__ */ u(
184
+ return /* @__PURE__ */ f(
181
185
  "div",
182
186
  {
183
- className: f(s.tableContainer, i),
184
- style: d,
187
+ ref: c,
188
+ className: m(i.tableContainer, s),
189
+ style: b,
185
190
  tabIndex: 0,
186
191
  role: t === void 0 ? void 0 : "region",
187
192
  "aria-label": t,
188
- children: /* @__PURE__ */ u(
193
+ children: /* @__PURE__ */ f(
189
194
  "table",
190
195
  {
191
- className: Q({
196
+ className: tt({
192
197
  variant: a,
193
- className: f(n === "compact" && s.densityCompact, e)
198
+ className: m(
199
+ n === "compact" && i.densityCompact,
200
+ d && i.stickyHeader,
201
+ e
202
+ )
194
203
  }),
195
- ...c
204
+ ...u
196
205
  }
197
206
  )
198
207
  }
199
208
  );
200
209
  }
201
- function ot({ className: e, ...t }) {
202
- return /* @__PURE__ */ u("thead", { className: f(s.tableHeader, e), ...t });
203
- }
204
- function lt({ className: e, ...t }) {
205
- return /* @__PURE__ */ u("tbody", { className: f(s.tableBody, e), ...t });
206
- }
207
210
  function at({ className: e, ...t }) {
208
- return /* @__PURE__ */ u("tfoot", { className: f(s.tableFooter, e), ...t });
211
+ return /* @__PURE__ */ f("thead", { className: m(i.tableHeader, e), ...t });
209
212
  }
210
213
  function rt({ className: e, ...t }) {
211
- return /* @__PURE__ */ u("tr", { className: f(s.tableRow, e), ...t });
214
+ return /* @__PURE__ */ f("tbody", { className: m(i.tableBody, e), ...t });
215
+ }
216
+ function it({ className: e, ...t }) {
217
+ return /* @__PURE__ */ f("tfoot", { className: m(i.tableFooter, e), ...t });
212
218
  }
213
- function it({
219
+ function st({ className: e, ...t }) {
220
+ return /* @__PURE__ */ f("tr", { className: m(i.tableRow, e), ...t });
221
+ }
222
+ function ct({
214
223
  className: e,
215
224
  resizable: t,
216
225
  resizeMinWidth: n,
217
226
  children: a,
218
- ...i
227
+ ...s
219
228
  }) {
220
- return /* @__PURE__ */ P("th", { className: f(s.tableHead, e), ...i, children: [
229
+ return /* @__PURE__ */ P("th", { className: m(i.tableHead, e), ...s, children: [
221
230
  a,
222
- t ? /* @__PURE__ */ u(J, { minWidth: n }) : null
231
+ t ? /* @__PURE__ */ f(Z, { minWidth: n }) : null
223
232
  ] });
224
233
  }
225
- function st({ className: e, ...t }) {
226
- return /* @__PURE__ */ u("td", { className: f(s.tableCell, e), ...t });
234
+ function ut({ className: e, ...t }) {
235
+ return /* @__PURE__ */ f("td", { className: m(i.tableCell, e), ...t });
227
236
  }
228
- function ct({ className: e, ...t }) {
229
- return /* @__PURE__ */ u("caption", { className: f(s.tableCaption, e), ...t });
237
+ function ft({ className: e, ...t }) {
238
+ return /* @__PURE__ */ f("caption", { className: m(i.tableCaption, e), ...t });
230
239
  }
231
240
  export {
232
- nt as Table,
233
- lt as TableBody,
234
- ct as TableCaption,
235
- st as TableCell,
236
- at as TableFooter,
237
- it as TableHead,
238
- ot as TableHeader,
239
- rt as TableRow
241
+ lt as Table,
242
+ rt as TableBody,
243
+ ft as TableCaption,
244
+ ut as TableCell,
245
+ it as TableFooter,
246
+ ct as TableHead,
247
+ at as TableHeader,
248
+ st as TableRow
240
249
  };
241
250
  //# sourceMappingURL=table.js.map
package/dist/table.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"table.js","sources":["../src/components/table/table.tsx"],"sourcesContent":["'use client';\n\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport {\n type ComponentProps,\n type CSSProperties,\n type KeyboardEvent as ReactKeyboardEvent,\n type PointerEvent as ReactPointerEvent,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport styles from './table.module.css';\n\n/*\n * Resize behaviour constants. These are not style values: they decide how\n * the drag RESPONDS, not how anything looks, so they live here rather than\n * as unexplained numbers in the stylesheet. All four are the design spec's\n * own.\n */\n/** How far one arrow-key press moves the boundary. */\nconst KEYBOARD_STEP = 12;\n/** The grab area straddling the column's trailing edge, half on each side. */\nconst HANDLE_WIDTH = 8;\n/** A column carrying text needs room for a word. */\nconst MIN_WIDTH_WITH_TEXT = 72;\n/** One carrying only a control (a checkbox, a row action) does not. */\nconst MIN_WIDTH_WITHOUT_TEXT = 32;\n\nfunction headerCellsOf(cell: HTMLTableCellElement): HTMLTableCellElement[] {\n return Array.from(cell.parentElement?.children ?? []).filter(\n (child): child is HTMLTableCellElement => child instanceof HTMLTableCellElement,\n );\n}\n\nfunction minWidthOf(cell: HTMLTableCellElement, override: number | undefined): number {\n if (override !== undefined) {\n return override;\n }\n return cell.textContent?.trim() ? MIN_WIDTH_WITH_TEXT : MIN_WIDTH_WITHOUT_TEXT;\n}\n\n/*\n * The first drag freezes every column at the width it currently renders and\n * switches the table to a fixed layout. Without that the browser keeps\n * re-deriving every column from its content, so widening one column silently\n * reflows the rest and the drag does not hold.\n */\nfunction freezeColumns(cell: HTMLTableCellElement): HTMLTableCellElement[] {\n const cells = headerCellsOf(cell);\n const table = cell.closest('table');\n if (table && table.style.tableLayout !== 'fixed') {\n for (const column of cells) {\n column.style.width = `${Math.round(column.getBoundingClientRect().width)}px`;\n }\n table.style.tableLayout = 'fixed';\n pinTableWidth(cells);\n }\n return cells;\n}\n\nfunction frozenWidthOf(cell: HTMLTableCellElement): number {\n return Number.parseFloat(cell.style.width) || 0;\n}\n\n/*\n * A fixed layout still stretches its columns to the table's own width, and\n * `.table` is `width: 100%`: left alone, whatever a column gives up is handed\n * straight back to the others, which is why the last column could never be\n * narrowed. Pinning the table to the sum of its frozen columns makes the\n * columns the only thing deciding its width, so it can end up narrower than\n * its container or wider than it (the wrapper then scrolls).\n */\nfunction pinTableWidth(cells: HTMLTableCellElement[]): void {\n const table = cells[0]?.closest('table');\n if (table) {\n table.style.width = `${cells.reduce((sum, column) => sum + frozenWidthOf(column), 0)}px`;\n }\n}\n\n/*\n * The floor a dragged column resizes against. Only the last column can\n * change the table's width, so only the last one also has to respect a\n * `min-width` on the table (the collection view's 960px): below that the\n * browser would widen the table back and spread the difference over every\n * column, and the width the handle announced would no longer be the one on\n * screen.\n */\nfunction minSelfOf(\n cells: HTMLTableCellElement[],\n index: number,\n override: number | undefined,\n): number {\n const self = cells[index];\n if (!self) {\n return 0;\n }\n const own = minWidthOf(self, override);\n const table = self.closest('table');\n if (index !== cells.length - 1 || !table) {\n return own;\n }\n const tableFloor = Number.parseFloat(getComputedStyle(table).minWidth);\n if (!Number.isFinite(tableFloor)) {\n return own;\n }\n const others = cells.slice(0, index).reduce((sum, column) => sum + frozenWidthOf(column), 0);\n return Math.max(own, Math.ceil(tableFloor - others));\n}\n\n/*\n * A column resizes against its TRAILING neighbour: the pair's combined width\n * is what stays constant, so dragging an inner boundary never changes the\n * table's own width. The last column has no neighbour to trade with, and\n * there the table's pinned width (see pinTableWidth) follows it in both\n * directions.\n */\nfunction applyWidths(\n cells: HTMLTableCellElement[],\n index: number,\n selfStart: number,\n neighbourStart: number | null,\n delta: number,\n minSelf: number,\n minNeighbour: number,\n): number {\n const self = cells[index];\n if (!self) {\n return selfStart;\n }\n const neighbour = neighbourStart === null ? null : cells[index + 1];\n const ceiling =\n neighbourStart === null || !neighbour\n ? Number.POSITIVE_INFINITY\n : selfStart + neighbourStart - minNeighbour;\n const next = Math.round(Math.min(Math.max(selfStart + delta, minSelf), ceiling));\n self.style.width = `${next}px`;\n if (neighbour && neighbourStart !== null) {\n neighbour.style.width = `${selfStart + neighbourStart - next}px`;\n }\n pinTableWidth(cells);\n return next;\n}\n\ninterface DragState {\n pointerId: number;\n startX: number;\n cells: HTMLTableCellElement[];\n index: number;\n selfStart: number;\n neighbourStart: number | null;\n minSelf: number;\n minNeighbour: number;\n}\n\ninterface TableColumnResizerProps {\n minWidth?: number;\n}\n\n/*\n * The trailing-edge resize handle. Rendered inside its own <th>, which is\n * what it measures and resizes; the geometry it needs from JS (the grab\n * width and its half-overhang) comes from HANDLE_WIDTH above, and the\n * hairline it draws is the stylesheet's.\n */\nfunction TableColumnResizer({ minWidth }: TableColumnResizerProps) {\n const handleRef = useRef<HTMLSpanElement>(null);\n const dragRef = useRef<DragState | null>(null);\n const [columnName, setColumnName] = useState('');\n const [width, setWidth] = useState<number | null>(null);\n\n useEffect(() => {\n setColumnName(handleRef.current?.closest('th')?.textContent?.trim() ?? '');\n }, []);\n\n /*\n * The cursor and the text selection are locked for the DURATION of the\n * drag, not for the pointer's position: without it, dragging past the\n * handle turns the pointer back into a caret and starts selecting the\n * header labels it crosses.\n */\n const lockPage = (locked: boolean) => {\n document.body.style.cursor = locked ? 'col-resize' : '';\n document.body.style.userSelect = locked ? 'none' : '';\n };\n\n /*\n * Pointer capture is what keeps the drag alive once the pointer leaves\n * the 8px handle, but it is not what the drag depends on: a pointer id\n * the platform does not consider active throws, and the drag still has to\n * work. Both calls are therefore best-effort, and the drag's own state is\n * the ref above.\n */\n const capturePointer = (handle: HTMLSpanElement, pointerId: number, capture: boolean) => {\n try {\n if (capture) {\n handle.setPointerCapture(pointerId);\n } else if (handle.hasPointerCapture(pointerId)) {\n handle.releasePointerCapture(pointerId);\n }\n } catch {\n // No capture to take or give back; the drag is unaffected either way.\n }\n };\n\n /*\n * Only a drag this handle started may release the lock: the unmount\n * cleanup and a stray pointerup both land here, and clearing the body\n * styles unconditionally would wipe a cursor something else on the page\n * had set.\n */\n const endDrag = useCallback(() => {\n const drag = dragRef.current;\n if (!drag) {\n return;\n }\n dragRef.current = null;\n lockPage(false);\n const handle = handleRef.current;\n if (handle) {\n capturePointer(handle, drag.pointerId, false);\n }\n }, []);\n\n // Releases the lock if the header unmounts mid-drag: the page would\n // otherwise keep the resize cursor and the suppressed selection forever.\n useEffect(() => endDrag, [endDrag]);\n\n const onPointerDown = (event: ReactPointerEvent<HTMLSpanElement>) => {\n const cell = event.currentTarget.closest('th');\n if (!(cell instanceof HTMLTableCellElement) || event.button !== 0) {\n return;\n }\n const cells = freezeColumns(cell);\n const index = cells.indexOf(cell);\n const neighbour = cells[index + 1] ?? null;\n dragRef.current = {\n pointerId: event.pointerId,\n startX: event.clientX,\n cells,\n index,\n selfStart: cell.getBoundingClientRect().width,\n neighbourStart: neighbour ? neighbour.getBoundingClientRect().width : null,\n minSelf: minSelfOf(cells, index, minWidth),\n minNeighbour: neighbour ? minWidthOf(neighbour, undefined) : 0,\n };\n capturePointer(event.currentTarget, event.pointerId, true);\n lockPage(true);\n setWidth(Math.round(dragRef.current.selfStart));\n };\n\n const onPointerMove = (event: ReactPointerEvent<HTMLSpanElement>) => {\n const drag = dragRef.current;\n if (!drag || drag.pointerId !== event.pointerId) {\n return;\n }\n setWidth(\n applyWidths(\n drag.cells,\n drag.index,\n drag.selfStart,\n drag.neighbourStart,\n event.clientX - drag.startX,\n drag.minSelf,\n drag.minNeighbour,\n ),\n );\n };\n\n const onKeyDown = (event: ReactKeyboardEvent<HTMLSpanElement>) => {\n const step =\n event.key === 'ArrowLeft' ? -KEYBOARD_STEP : event.key === 'ArrowRight' ? KEYBOARD_STEP : 0;\n if (step === 0) {\n return;\n }\n const cell = event.currentTarget.closest('th');\n if (!(cell instanceof HTMLTableCellElement)) {\n return;\n }\n event.preventDefault();\n const cells = freezeColumns(cell);\n const index = cells.indexOf(cell);\n const neighbour = cells[index + 1] ?? null;\n setWidth(\n applyWidths(\n cells,\n index,\n cell.getBoundingClientRect().width,\n neighbour ? neighbour.getBoundingClientRect().width : null,\n step,\n minSelfOf(cells, index, minWidth),\n neighbour ? minWidthOf(neighbour, undefined) : 0,\n ),\n );\n };\n\n return (\n <span\n ref={handleRef}\n role=\"separator\"\n aria-orientation=\"vertical\"\n aria-label={`${columnName || 'Column'} width${width === null ? '' : `, ${width} pixels`}`}\n tabIndex={0}\n className={styles.columnResizer}\n style={{ width: HANDLE_WIDTH, insetInlineEnd: -HANDLE_WIDTH / 2 }}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n onKeyDown={onKeyDown}\n />\n );\n}\n\n/*\n * Table has no Base UI primitive (registry/base-vega ships plain native\n * elements with data-slot markers, this kit drops data-slot everywhere —\n * see card.tsx) — pure styling translation over native `<table>` markup,\n * per design-notes.md: a composite data-table (sorting, filtering,\n * pagination, virtualisation, column defs) is deliberately out of scope\n * here. This is styled markup, nothing more.\n *\n * Table renders two elements, matching the source exactly: its own\n * scroll wrapper div around the <table>, rather than asking every consumer\n * to remember to add one. That wrapper is also the one to cap the table's\n * height with (`containerClassName` / `containerStyle`), not a div of the\n * consumer's own around <Table>: a sticky header sticks to its NEAREST\n * scrolling ancestor, and since the wrapper already scrolls horizontally it\n * is that ancestor. An outer div would scroll while the wrapper, having no\n * height of its own, never did, and the collection header would scroll\n * away with the rows.\n *\n * That wrapper is `tabIndex={0}`, a deliberate addition over the source,\n * which has none. A horizontally-overflowing region with no scrollbar\n * dragging alternative is otherwise unreachable from the keyboard (WCAG\n * 2.1.1) — a mouse/touch user can drag or swipe it, a keyboard-only user\n * cannot Tab to it and press the arrow keys, since a plain `div` isn't in\n * the tab order by default. This is unconditional rather than toggled on\n * only when the table actually overflows: detecting that needs a\n * ResizeObserver, which is exactly the behavior layer this \"primitive\n * markup\" component intentionally does not have. The trade-off is a table\n * that never overflows still gets one extra, functionless tab stop — minor\n * next to the alternative of a table that does overflow being silently\n * unreachable.\n *\n * A focus stop should announce something: `label` names the wrapper\n * (`role=\"region\"` + `aria-label` — a bare div's aria-label is ignored\n * without a role, which is also why wrapping the Table yourself and\n * labelling that wrapper doesn't work: the name lands on a non-focusable\n * element while the focusable one stays nameless). Without `label` the\n * wrapper stays roleless and nameless as before — prefer passing it\n * whenever the surrounding page doesn't already make the table's purpose\n * obvious the moment focus lands.\n */\nconst tableVariants = cva(styles.table, {\n variants: {\n /*\n * `collection` is the spec's own guide word for the dense arrangement:\n * a fixed layout with a sticky header and tall, wrapping rows. The\n * density axis below is orthogonal to it and still applies.\n */\n variant: {\n default: styles.variantDefault,\n collection: styles.variantCollection,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface TableProps extends ComponentProps<'table'>, VariantProps<typeof tableVariants> {\n /**\n * Accessible name for the focusable scroll wrapper around the table\n * (`role=\"region\"` + `aria-label`). Announced when keyboard focus lands\n * on the wrapper; without it the stop announces nothing.\n */\n label?: string;\n /**\n * Cell metrics only — `compact` tightens row padding for operational\n * views (the mockups' Data Table density axis). Not a data-table\n * feature: no virtualization, no row model, purely the cells' padding.\n */\n density?: 'default' | 'compact';\n /**\n * className for the scroll wrapper around the table, merged after the\n * kit class. Give it a `max-height` to scroll the table vertically inside\n * the wrapper, which is what keeps a sticky header in place.\n */\n containerClassName?: string;\n /** Inline style for the same scroll wrapper, e.g. `{ maxHeight: 320 }`. */\n containerStyle?: CSSProperties;\n}\n\nexport function Table({\n className,\n label,\n density,\n variant,\n containerClassName,\n containerStyle,\n ...props\n}: TableProps) {\n return (\n <div\n className={cx(styles.tableContainer, containerClassName)}\n style={containerStyle}\n tabIndex={0}\n role={label === undefined ? undefined : 'region'}\n aria-label={label}\n >\n <table\n className={tableVariants({\n variant,\n className: cx(density === 'compact' && styles.densityCompact, className),\n })}\n {...props}\n />\n </div>\n );\n}\n\nexport type TableHeaderProps = ComponentProps<'thead'>;\n\nexport function TableHeader({ className, ...props }: TableHeaderProps) {\n return <thead className={cx(styles.tableHeader, className)} {...props} />;\n}\n\nexport type TableBodyProps = ComponentProps<'tbody'>;\n\nexport function TableBody({ className, ...props }: TableBodyProps) {\n return <tbody className={cx(styles.tableBody, className)} {...props} />;\n}\n\nexport type TableFooterProps = ComponentProps<'tfoot'>;\n\nexport function TableFooter({ className, ...props }: TableFooterProps) {\n return <tfoot className={cx(styles.tableFooter, className)} {...props} />;\n}\n\nexport type TableRowProps = ComponentProps<'tr'>;\n\nexport function TableRow({ className, ...props }: TableRowProps) {\n return <tr className={cx(styles.tableRow, className)} {...props} />;\n}\n\nexport interface TableHeadProps extends ComponentProps<'th'> {\n /**\n * Renders a draggable, keyboard-resizable handle on the column's trailing\n * edge. Off by default: the spec's own default is on, but turning it on\n * here would make every column of every shipped table draggable without\n * the caller asking for it.\n */\n resizable?: boolean;\n /**\n * Pixel floor for this column while resizing, overriding the 72 / 32\n * defaults (72 for a column carrying text, 32 for one that does not).\n */\n resizeMinWidth?: number;\n}\n\nexport function TableHead({\n className,\n resizable,\n resizeMinWidth,\n children,\n ...props\n}: TableHeadProps) {\n return (\n <th className={cx(styles.tableHead, className)} {...props}>\n {children}\n {resizable ? <TableColumnResizer minWidth={resizeMinWidth} /> : null}\n </th>\n );\n}\n\nexport type TableCellProps = ComponentProps<'td'>;\n\nexport function TableCell({ className, ...props }: TableCellProps) {\n return <td className={cx(styles.tableCell, className)} {...props} />;\n}\n\n/**\n * A table's accessible name/description, kept as a real semantic caption\n * regardless of where it's drawn — `.table`'s `caption-side: bottom` (see\n * table.module.css) only moves it visually below the rows; a `<caption>`\n * contributes to the table's accessibility tree the same way at either\n * position.\n */\nexport type TableCaptionProps = ComponentProps<'caption'>;\n\nexport function TableCaption({ className, ...props }: TableCaptionProps) {\n return <caption className={cx(styles.tableCaption, className)} {...props} />;\n}\n"],"names":["KEYBOARD_STEP","HANDLE_WIDTH","MIN_WIDTH_WITH_TEXT","MIN_WIDTH_WITHOUT_TEXT","headerCellsOf","cell","_a","child","minWidthOf","override","freezeColumns","cells","table","column","pinTableWidth","frozenWidthOf","sum","minSelfOf","index","self","own","tableFloor","others","applyWidths","selfStart","neighbourStart","delta","minSelf","minNeighbour","neighbour","ceiling","next","TableColumnResizer","minWidth","handleRef","useRef","dragRef","columnName","setColumnName","useState","width","setWidth","useEffect","_c","_b","lockPage","locked","capturePointer","handle","pointerId","capture","endDrag","useCallback","drag","onPointerDown","event","onPointerMove","onKeyDown","step","jsx","styles","tableVariants","cva","Table","className","label","density","variant","containerClassName","containerStyle","props","cx","TableHeader","TableBody","TableFooter","TableRow","TableHead","resizable","resizeMinWidth","children","jsxs","TableCell","TableCaption"],"mappings":";;;;;;;;;;;;;;;;;GAuBMA,IAAgB,IAEhBC,IAAe,GAEfC,IAAsB,IAEtBC,IAAyB;AAE/B,SAASC,EAAcC,GAAoD;;AACzE,SAAO,MAAM,OAAKC,IAAAD,EAAK,kBAAL,gBAAAC,EAAoB,aAAY,CAAA,CAAE,EAAE;AAAA,IACpD,CA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AS,EAAE,WAAAX,GAAW,GAAGM,KAAwB;AAC/D,SAAO,gBAAAX,EAAC,QAAG,WAAWY,EAAGX,EAAO,UAAUI,CAAS,GAAI,GAAGM,GAAO;AACnE;AAiBO,SAASM,GAAU;AAAA,EACxB,WAAAZ;AAAA,EACA,WAAAa;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGT;AACL,GAAmB;AACjB,SACE,gBAAAU,EAAC,QAAG,WAAWT,EAAGX,EAAO,WAAWI,CAAS,GAAI,GAAGM,GACjD,UAAA;AAAA,IAAAS;AAAA,IACAF,IAAY,gBAAAlB,EAAC3B,GAAA,EAAmB,UAAU8C,GAAgB,IAAK;AAAA,EAAA,GAClE;AAEJ;AAIO,SAASG,GAAU,EAAE,WAAAjB,GAAW,GAAGM,KAAyB;AACjE,SAAO,gBAAAX,EAAC,QAAG,WAAWY,EAAGX,EAAO,WAAWI,CAAS,GAAI,GAAGM,GAAO;AACpE;AAWO,SAASY,GAAa,EAAE,WAAAlB,GAAW,GAAGM,KAA4B;AACvE,SAAO,gBAAAX,EAAC,aAAQ,WAAWY,EAAGX,EAAO,cAAcI,CAAS,GAAI,GAAGM,GAAO;AAC5E;"}
1
+ {"version":3,"file":"table.js","sources":["../src/components/table/table.tsx"],"sourcesContent":["'use client';\n\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport {\n type ComponentProps,\n type CSSProperties,\n type KeyboardEvent as ReactKeyboardEvent,\n type PointerEvent as ReactPointerEvent,\n type Ref,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport styles from './table.module.css';\n\n/*\n * Resize behaviour constants. These are not style values: they decide how\n * the drag RESPONDS, not how anything looks, so they live here rather than\n * as unexplained numbers in the stylesheet. All four are the design spec's\n * own.\n */\n/** How far one arrow-key press moves the boundary. */\nconst KEYBOARD_STEP = 12;\n/** The grab area straddling the column's trailing edge, half on each side. */\nconst HANDLE_WIDTH = 8;\n/** A column carrying text needs room for a word. */\nconst MIN_WIDTH_WITH_TEXT = 72;\n/** One carrying only a control (a checkbox, a row action) does not. */\nconst MIN_WIDTH_WITHOUT_TEXT = 32;\n\nfunction headerCellsOf(cell: HTMLTableCellElement): HTMLTableCellElement[] {\n return Array.from(cell.parentElement?.children ?? []).filter(\n (child): child is HTMLTableCellElement => child instanceof HTMLTableCellElement,\n );\n}\n\nfunction minWidthOf(cell: HTMLTableCellElement, override: number | undefined): number {\n if (override !== undefined) {\n return override;\n }\n return cell.textContent?.trim() ? MIN_WIDTH_WITH_TEXT : MIN_WIDTH_WITHOUT_TEXT;\n}\n\n/*\n * The first drag freezes every column at the width it currently renders and\n * switches the table to a fixed layout. Without that the browser keeps\n * re-deriving every column from its content, so widening one column silently\n * reflows the rest and the drag does not hold.\n */\nfunction freezeColumns(cell: HTMLTableCellElement): HTMLTableCellElement[] {\n const cells = headerCellsOf(cell);\n const table = cell.closest('table');\n if (table && table.style.tableLayout !== 'fixed') {\n for (const column of cells) {\n column.style.width = `${Math.round(column.getBoundingClientRect().width)}px`;\n }\n table.style.tableLayout = 'fixed';\n pinTableWidth(cells);\n }\n return cells;\n}\n\nfunction frozenWidthOf(cell: HTMLTableCellElement): number {\n return Number.parseFloat(cell.style.width) || 0;\n}\n\n/*\n * A fixed layout still stretches its columns to the table's own width, and\n * `.table` is `width: 100%`: left alone, whatever a column gives up is handed\n * straight back to the others, which is why the last column could never be\n * narrowed. Pinning the table to the sum of its frozen columns makes the\n * columns the only thing deciding its width, so it can end up narrower than\n * its container or wider than it (the wrapper then scrolls).\n */\nfunction pinTableWidth(cells: HTMLTableCellElement[]): void {\n const table = cells[0]?.closest('table');\n if (table) {\n table.style.width = `${cells.reduce((sum, column) => sum + frozenWidthOf(column), 0)}px`;\n }\n}\n\n/*\n * The floor a dragged column resizes against. Only the last column can\n * change the table's width, so only the last one also has to respect a\n * `min-width` on the table (the collection view's 960px): below that the\n * browser would widen the table back and spread the difference over every\n * column, and the width the handle announced would no longer be the one on\n * screen.\n */\nfunction minSelfOf(\n cells: HTMLTableCellElement[],\n index: number,\n override: number | undefined,\n): number {\n const self = cells[index];\n if (!self) {\n return 0;\n }\n const own = minWidthOf(self, override);\n const table = self.closest('table');\n if (index !== cells.length - 1 || !table) {\n return own;\n }\n const tableFloor = Number.parseFloat(getComputedStyle(table).minWidth);\n if (!Number.isFinite(tableFloor)) {\n return own;\n }\n const others = cells.slice(0, index).reduce((sum, column) => sum + frozenWidthOf(column), 0);\n return Math.max(own, Math.ceil(tableFloor - others));\n}\n\n/*\n * A column resizes against its TRAILING neighbour: the pair's combined width\n * is what stays constant, so dragging an inner boundary never changes the\n * table's own width. The last column has no neighbour to trade with, and\n * there the table's pinned width (see pinTableWidth) follows it in both\n * directions.\n */\nfunction applyWidths(\n cells: HTMLTableCellElement[],\n index: number,\n selfStart: number,\n neighbourStart: number | null,\n delta: number,\n minSelf: number,\n minNeighbour: number,\n): number {\n const self = cells[index];\n if (!self) {\n return selfStart;\n }\n const neighbour = neighbourStart === null ? null : cells[index + 1];\n const ceiling =\n neighbourStart === null || !neighbour\n ? Number.POSITIVE_INFINITY\n : selfStart + neighbourStart - minNeighbour;\n const next = Math.round(Math.min(Math.max(selfStart + delta, minSelf), ceiling));\n self.style.width = `${next}px`;\n if (neighbour && neighbourStart !== null) {\n neighbour.style.width = `${selfStart + neighbourStart - next}px`;\n }\n pinTableWidth(cells);\n return next;\n}\n\ninterface DragState {\n pointerId: number;\n startX: number;\n cells: HTMLTableCellElement[];\n index: number;\n selfStart: number;\n neighbourStart: number | null;\n minSelf: number;\n minNeighbour: number;\n}\n\ninterface TableColumnResizerProps {\n minWidth?: number;\n}\n\n/*\n * The trailing-edge resize handle. Rendered inside its own <th>, which is\n * what it measures and resizes; the geometry it needs from JS (the grab\n * width and its half-overhang) comes from HANDLE_WIDTH above, and the\n * hairline it draws is the stylesheet's.\n */\nfunction TableColumnResizer({ minWidth }: TableColumnResizerProps) {\n const handleRef = useRef<HTMLSpanElement>(null);\n const dragRef = useRef<DragState | null>(null);\n const [columnName, setColumnName] = useState('');\n const [width, setWidth] = useState<number | null>(null);\n\n useEffect(() => {\n setColumnName(handleRef.current?.closest('th')?.textContent?.trim() ?? '');\n }, []);\n\n /*\n * The cursor and the text selection are locked for the DURATION of the\n * drag, not for the pointer's position: without it, dragging past the\n * handle turns the pointer back into a caret and starts selecting the\n * header labels it crosses.\n */\n const lockPage = (locked: boolean) => {\n document.body.style.cursor = locked ? 'col-resize' : '';\n document.body.style.userSelect = locked ? 'none' : '';\n };\n\n /*\n * Pointer capture is what keeps the drag alive once the pointer leaves\n * the 8px handle, but it is not what the drag depends on: a pointer id\n * the platform does not consider active throws, and the drag still has to\n * work. Both calls are therefore best-effort, and the drag's own state is\n * the ref above.\n */\n const capturePointer = (handle: HTMLSpanElement, pointerId: number, capture: boolean) => {\n try {\n if (capture) {\n handle.setPointerCapture(pointerId);\n } else if (handle.hasPointerCapture(pointerId)) {\n handle.releasePointerCapture(pointerId);\n }\n } catch {\n // No capture to take or give back; the drag is unaffected either way.\n }\n };\n\n /*\n * Only a drag this handle started may release the lock: the unmount\n * cleanup and a stray pointerup both land here, and clearing the body\n * styles unconditionally would wipe a cursor something else on the page\n * had set.\n */\n const endDrag = useCallback(() => {\n const drag = dragRef.current;\n if (!drag) {\n return;\n }\n dragRef.current = null;\n lockPage(false);\n const handle = handleRef.current;\n if (handle) {\n capturePointer(handle, drag.pointerId, false);\n }\n }, []);\n\n // Releases the lock if the header unmounts mid-drag: the page would\n // otherwise keep the resize cursor and the suppressed selection forever.\n useEffect(() => endDrag, [endDrag]);\n\n const onPointerDown = (event: ReactPointerEvent<HTMLSpanElement>) => {\n const cell = event.currentTarget.closest('th');\n if (!(cell instanceof HTMLTableCellElement) || event.button !== 0) {\n return;\n }\n const cells = freezeColumns(cell);\n const index = cells.indexOf(cell);\n const neighbour = cells[index + 1] ?? null;\n dragRef.current = {\n pointerId: event.pointerId,\n startX: event.clientX,\n cells,\n index,\n selfStart: cell.getBoundingClientRect().width,\n neighbourStart: neighbour ? neighbour.getBoundingClientRect().width : null,\n minSelf: minSelfOf(cells, index, minWidth),\n minNeighbour: neighbour ? minWidthOf(neighbour, undefined) : 0,\n };\n capturePointer(event.currentTarget, event.pointerId, true);\n lockPage(true);\n setWidth(Math.round(dragRef.current.selfStart));\n };\n\n const onPointerMove = (event: ReactPointerEvent<HTMLSpanElement>) => {\n const drag = dragRef.current;\n if (!drag || drag.pointerId !== event.pointerId) {\n return;\n }\n setWidth(\n applyWidths(\n drag.cells,\n drag.index,\n drag.selfStart,\n drag.neighbourStart,\n event.clientX - drag.startX,\n drag.minSelf,\n drag.minNeighbour,\n ),\n );\n };\n\n const onKeyDown = (event: ReactKeyboardEvent<HTMLSpanElement>) => {\n const step =\n event.key === 'ArrowLeft' ? -KEYBOARD_STEP : event.key === 'ArrowRight' ? KEYBOARD_STEP : 0;\n if (step === 0) {\n return;\n }\n const cell = event.currentTarget.closest('th');\n if (!(cell instanceof HTMLTableCellElement)) {\n return;\n }\n event.preventDefault();\n const cells = freezeColumns(cell);\n const index = cells.indexOf(cell);\n const neighbour = cells[index + 1] ?? null;\n setWidth(\n applyWidths(\n cells,\n index,\n cell.getBoundingClientRect().width,\n neighbour ? neighbour.getBoundingClientRect().width : null,\n step,\n minSelfOf(cells, index, minWidth),\n neighbour ? minWidthOf(neighbour, undefined) : 0,\n ),\n );\n };\n\n return (\n <span\n ref={handleRef}\n role=\"separator\"\n aria-orientation=\"vertical\"\n aria-label={`${columnName || 'Column'} width${width === null ? '' : `, ${width} pixels`}`}\n tabIndex={0}\n className={styles.columnResizer}\n style={{ width: HANDLE_WIDTH, insetInlineEnd: -HANDLE_WIDTH / 2 }}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n onKeyDown={onKeyDown}\n />\n );\n}\n\n/*\n * Table has no Base UI primitive (registry/base-vega ships plain native\n * elements with data-slot markers, this kit drops data-slot everywhere —\n * see card.tsx) — pure styling translation over native `<table>` markup,\n * per design-notes.md: a composite data-table (sorting, filtering,\n * pagination, virtualisation, column defs) is deliberately out of scope\n * here. This is styled markup, nothing more.\n *\n * Table renders two elements, matching the source exactly: its own\n * scroll wrapper div around the <table>, rather than asking every consumer\n * to remember to add one. That wrapper is also the one to cap the table's\n * height with (`containerClassName` / `containerStyle`), not a div of the\n * consumer's own around <Table>: a sticky header sticks to its NEAREST\n * scrolling ancestor, and since the wrapper already scrolls horizontally it\n * is that ancestor. An outer div would scroll while the wrapper, having no\n * height of its own, never did, and the sticky header would scroll away\n * with the rows. `containerRef` reaches the same element for a caller that\n * measures it or drives its scroll.\n *\n * That wrapper is `tabIndex={0}`, a deliberate addition over the source,\n * which has none. A horizontally-overflowing region with no scrollbar\n * dragging alternative is otherwise unreachable from the keyboard (WCAG\n * 2.1.1) — a mouse/touch user can drag or swipe it, a keyboard-only user\n * cannot Tab to it and press the arrow keys, since a plain `div` isn't in\n * the tab order by default. This is unconditional rather than toggled on\n * only when the table actually overflows: detecting that needs a\n * ResizeObserver, which is exactly the behavior layer this \"primitive\n * markup\" component intentionally does not have. The trade-off is a table\n * that never overflows still gets one extra, functionless tab stop — minor\n * next to the alternative of a table that does overflow being silently\n * unreachable.\n *\n * A focus stop should announce something: `label` names the wrapper\n * (`role=\"region\"` + `aria-label` — a bare div's aria-label is ignored\n * without a role, which is also why wrapping the Table yourself and\n * labelling that wrapper doesn't work: the name lands on a non-focusable\n * element while the focusable one stays nameless). Without `label` the\n * wrapper stays roleless and nameless as before — prefer passing it\n * whenever the surrounding page doesn't already make the table's purpose\n * obvious the moment focus lands.\n */\nconst tableVariants = cva(styles.table, {\n variants: {\n /*\n * `collection` is the spec's own guide word for the dense arrangement:\n * a fixed layout with a sticky header and tall, wrapping rows. The\n * density axis below is orthogonal to it and still applies.\n */\n variant: {\n default: styles.variantDefault,\n collection: styles.variantCollection,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface TableProps extends ComponentProps<'table'>, VariantProps<typeof tableVariants> {\n /**\n * Accessible name for the focusable scroll wrapper around the table\n * (`role=\"region\"` + `aria-label`). Announced when keyboard focus lands\n * on the wrapper; without it the stop announces nothing.\n */\n label?: string;\n /**\n * Cell metrics only — `compact` tightens row padding for operational\n * views (the mockups' Data Table density axis). Not a data-table\n * feature: no virtualization, no row model, purely the cells' padding.\n */\n density?: 'default' | 'compact';\n /**\n * className for the scroll wrapper around the table, merged after the\n * kit class. Give it a `max-height` to scroll the table vertically inside\n * the wrapper, which is what keeps a sticky header in place.\n */\n containerClassName?: string;\n /** Inline style for the same scroll wrapper, e.g. `{ maxHeight: 320 }`. */\n containerStyle?: CSSProperties;\n /**\n * Ref to the scroll wrapper `div`, for a caller that measures it or drives\n * its scroll position (`ref` itself lands on the `<table>`, as for every\n * other prop). Both a ref object and a callback ref work.\n */\n containerRef?: Ref<HTMLDivElement>;\n /**\n * Pins the header cells to the top of the scroll wrapper on an opaque\n * fill, so the rows scroll under them. Needs a bounded wrapper height\n * (`containerClassName` / `containerStyle`) to have anything to scroll\n * within. Independent of `variant`: it carries no layout, row height or\n * minimum width, only the pinning, and switches the table to separated\n * borders so the rule under the header stays with it.\n * @default false\n */\n stickyHeader?: boolean;\n}\n\nexport function Table({\n className,\n label,\n density,\n variant,\n containerClassName,\n containerStyle,\n containerRef,\n stickyHeader,\n ...props\n}: TableProps) {\n return (\n <div\n ref={containerRef}\n className={cx(styles.tableContainer, containerClassName)}\n style={containerStyle}\n tabIndex={0}\n role={label === undefined ? undefined : 'region'}\n aria-label={label}\n >\n <table\n className={tableVariants({\n variant,\n className: cx(\n density === 'compact' && styles.densityCompact,\n stickyHeader && styles.stickyHeader,\n className,\n ),\n })}\n {...props}\n />\n </div>\n );\n}\n\nexport type TableHeaderProps = ComponentProps<'thead'>;\n\nexport function TableHeader({ className, ...props }: TableHeaderProps) {\n return <thead className={cx(styles.tableHeader, className)} {...props} />;\n}\n\nexport type TableBodyProps = ComponentProps<'tbody'>;\n\nexport function TableBody({ className, ...props }: TableBodyProps) {\n return <tbody className={cx(styles.tableBody, className)} {...props} />;\n}\n\nexport type TableFooterProps = ComponentProps<'tfoot'>;\n\nexport function TableFooter({ className, ...props }: TableFooterProps) {\n return <tfoot className={cx(styles.tableFooter, className)} {...props} />;\n}\n\nexport type TableRowProps = ComponentProps<'tr'>;\n\nexport function TableRow({ className, ...props }: TableRowProps) {\n return <tr className={cx(styles.tableRow, className)} {...props} />;\n}\n\nexport interface TableHeadProps extends ComponentProps<'th'> {\n /**\n * Renders a draggable, keyboard-resizable handle on the column's trailing\n * edge. Off by default: the spec's own default is on, but turning it on\n * here would make every column of every shipped table draggable without\n * the caller asking for it.\n */\n resizable?: boolean;\n /**\n * Pixel floor for this column while resizing, overriding the 72 / 32\n * defaults (72 for a column carrying text, 32 for one that does not).\n */\n resizeMinWidth?: number;\n}\n\nexport function TableHead({\n className,\n resizable,\n resizeMinWidth,\n children,\n ...props\n}: TableHeadProps) {\n return (\n <th className={cx(styles.tableHead, className)} {...props}>\n {children}\n {resizable ? <TableColumnResizer minWidth={resizeMinWidth} /> : null}\n </th>\n );\n}\n\nexport type TableCellProps = ComponentProps<'td'>;\n\nexport function TableCell({ className, ...props }: TableCellProps) {\n return <td className={cx(styles.tableCell, className)} {...props} />;\n}\n\n/**\n * A table's accessible name/description, kept as a real semantic caption\n * regardless of where it's drawn — `.table`'s `caption-side: bottom` (see\n * table.module.css) only moves it visually below the rows; a `<caption>`\n * contributes to the table's accessibility tree the same way at either\n * position.\n */\nexport type TableCaptionProps = ComponentProps<'caption'>;\n\nexport function TableCaption({ className, ...props }: TableCaptionProps) {\n return <caption className={cx(styles.tableCaption, className)} {...props} />;\n}\n"],"names":["KEYBOARD_STEP","HANDLE_WIDTH","MIN_WIDTH_WITH_TEXT","MIN_WIDTH_WITHOUT_TEXT","headerCellsOf","cell","_a","child","minWidthOf","override","freezeColumns","cells","table","column","pinTableWidth","frozenWidthOf","sum","minSelfOf","index","self","own","tableFloor","others","applyWidths","selfStart","neighbourStart","delta","minSelf","minNeighbour","neighbour","ceiling","next","TableColumnResizer","minWidth","handleRef","useRef","dragRef","columnName","setColumnName","useState","width","setWidth","useEffect","_c","_b","lockPage","locked","capturePointer","handle","pointerId","capture","endDrag","useCallback","drag","onPointerDown","event","onPointerMove","onKeyDown","step","jsx","styles","tableVariants","cva","Table","className","label","density","variant","containerClassName","containerStyle","containerRef","stickyHeader","props","cx","TableHeader","TableBody","TableFooter","TableRow","TableHead","resizable","resizeMinWidth","children","jsxs","TableCell","TableCaption"],"mappings":";;;;;;;;;;;;;;;;;;;GAwBMA,IAAgB,IAEhBC,IAAe,GAEfC,IAAsB,IAEtBC,IAAyB;AAE/B,SAASC,EAAcC,GAAoD;;AACzE,SAAO,MAAM,OAAKC,IAAAD,EAAK,kBAAL,gBAAAC,EAAoB,aAAY,CAAA,CAAE,EAAE;AAAA,IACpD,CAACC,MAAyCA,aAAiB;AAAA,EAAA;AAE/D;AAEA,SAASC,EAAWH,GAA4BI,GAAsC;;AACpF,SAAIA,MAAa,SACRA,KAEFH,IAAAD,EAAK,gBAAL,QAAAC,EAAkB,SAASJ,IAAsBC;AAC1D;AAQA,SAASO,EAAcL,GAAoD;AACzE,QAAMM,IAAQP,EAAcC,CAAI,GAC1BO,IAAQP,EAAK,QAAQ,OAAO;AAClC,MAAIO,KAASA,EAAM,MAAM,gBAAgB,SAAS;AAChD,eAAWC,KAAUF;AACnB,MAAAE,EAAO,MAAM,QAAQ,GAAG,KAAK,MAAMA,EAAO,sBAAA,EAAwB,KAAK,CAAC;AAE1E,IAAAD,EAAM,MAAM,cAAc,SAC1BE,EAAcH,CAAK;AAAA,EACrB;AACA,SAAOA;AACT;AAEA,SAASI,EAAcV,GAAoC;AACzD,SAAO,OAAO,WAAWA,EAAK,MAAM,KAAK,KAAK;AAChD;AAUA,SAASS,EAAcH,GAAqC;;AAC1D,QAAMC,KAAQN,IAAAK,EAAM,CAAC,MAAP,gBAAAL,EAAU,QAAQ;AAChC,EAAIM,M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GAAGQ,GAAO;AACpE;AAWO,SAASY,GAAa,EAAE,WAAApB,GAAW,GAAGQ,KAA4B;AACvE,SAAO,gBAAAb,EAAC,aAAQ,WAAWc,EAAGb,EAAO,cAAcI,CAAS,GAAI,GAAGQ,GAAO;AAC5E;"}
package/llms.txt CHANGED
@@ -146,8 +146,12 @@ Rules for generated code:
146
146
  consumer className can recolor a button in every state via
147
147
  `--button-bg`/`--button-fg`/`--button-bg-hover`/`--button-fg-hover`/
148
148
  `--button-border` — no new variant needed; icons go in the `icon` slot
149
- prop, NEVER in children — `icon` with no children makes a square
150
- icon-only button (always pass `aria-label` then); `loading` spins,
149
+ prop, NEVER in children — `icon` with no children leaves the button with no
150
+ accessible name (pass `aria-label` unless `end` holds announced text), and
151
+ with no `end` either it is a square icon-only button; `end` is the
152
+ trailing slot after the label (a chevron, a sort arrow, a count; its
153
+ content joins the accessible name, so hide a glyph with `aria-hidden`);
154
+ `loading` spins,
151
155
  disables, and keeps the width and accessible name; render prop for
152
156
  button-semantic actions over a real anchor (not a link substitute);
153
157
  `buttonVariants` is exported for styling other elements to match.
@@ -182,7 +186,13 @@ Rules for generated code:
182
186
  - [Combobox](dist/docs/combobox.md): filterable text field picking from a
183
187
  list, wrapping Base UI's dedicated Combobox primitive (not a
184
188
  Popover+search composition); single-select (ComboboxInput) or
185
- multi-select chips (ComboboxChips+ComboboxChip); always pass `items`.
189
+ multi-select chips (ComboboxChips+ComboboxChip); a select-looking field
190
+ with the search input in the popup is `ComboboxTrigger variant="select"`
191
+ plus `<ComboboxInput showTrigger={false} />` first in ComboboxContent
192
+ (render the trigger as a `div` to hold chips, and name that `div` with
193
+ `aria-labelledby` or `aria-label`, since a `<label for>` cannot name it; a
194
+ chip is removed there by toggling its option off in the list); always pass
195
+ `items`.
186
196
  - [Command](dist/docs/command.md): searchable, keyboard-navigable
187
197
  command/option list built on `cmdk` (Command/CommandInput/CommandList/
188
198
  CommandGroup/CommandItem/CommandSeparator); `CommandDialog` composes the
@@ -300,10 +310,15 @@ Rules for generated code:
300
310
  NavigationMenuContent/NavigationMenuLink); one shared popup/Viewport
301
311
  morphs to each active item's measured size.
302
312
  - [Pagination](dist/docs/pagination.md): page-number navigation from real
303
- anchors, styled through Button's own variant classes (Pagination/
304
- PaginationContent/PaginationItem/PaginationLink/PaginationPrevious/
305
- PaginationNext/PaginationEllipsis); `PaginationLink`'s `isActive`
306
- switches outline/ghost and sets `aria-current`.
313
+ anchors (Pagination/PaginationContent/PaginationItem/PaginationLink/
314
+ PaginationPrevious/PaginationNext/PaginationEllipsis); `isActive` paints
315
+ the current page and sets `aria-current`. For paging held in state, with
316
+ no URL per page, use the button twins PaginationButton/
317
+ PaginationPreviousButton/PaginationNextButton (`disabled` at the ends of
318
+ the range, plus `focusableWhenDisabled` so a focused button keeps focus
319
+ there); a custom non-blank `text` on Previous/Next is also their accessible
320
+ name unless an `aria-label` is passed (blank keeps the default name); the
321
+ Previous/Next chevrons mirror in right-to-left.
307
322
  - [Popover](dist/docs/popover.md): portalled panel anchored to a trigger,
308
323
  opened by click by default (Popover/PopoverTrigger/PopoverContent/
309
324
  PopoverHeader/PopoverTitle/PopoverDescription); non-modal by default —
@@ -364,7 +379,8 @@ Rules for generated code:
364
379
  inside a button instead of nesting this. `label`/`description` compose
365
380
  it into a loading block (glyph in a 36 indicator box, text beneath),
366
381
  which becomes the live region while the glyph turns decorative;
367
- `compact` takes that pair to 28/14.
382
+ `compact` takes that pair to 28/14 and `size="lg"` up to 64/32 (a bare
383
+ spinner goes to 32).
368
384
  - [StatusDot](dist/docs/status-dot.md): inline status - a 6px round dot
369
385
  plus an optional 12/16 label, both in the tone's colour; tone
370
386
  neutral|success|warning|danger|info, `live` for a 2s pulse; no box of
@@ -382,7 +398,9 @@ Rules for generated code:
382
398
  logic sets the attribute, the kit paints it); Table's own wrapper
383
399
  scrolls horizontally and is keyboard-reachable (`tabIndex`); cap the
384
400
  height on that wrapper (`containerClassName`/`containerStyle`), never on
385
- an outer div, or a sticky header will not stick; size a column via `className`/`style` width on TableHead/TableCell; no portal.
401
+ an outer div, or a sticky header will not stick; `containerRef` reaches
402
+ that wrapper, and `stickyHeader` pins the header on any table without the
403
+ `collection` variant's layout; size a column via `className`/`style` width on TableHead/TableCell; no portal.
386
404
  - [Tabs](dist/docs/tabs.md): switch between panels sharing the same
387
405
  space (Tabs/TabsList/TabsTrigger/TabsContent); list variants
388
406
  default|line; orientation horizontal|vertical (default horizontal);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gears-frontx/ui-kit",
3
- "version": "0.4.0-alpha.6",
3
+ "version": "0.4.0-alpha.7",
4
4
  "description": "Standard React component base for FrontX templates - Base UI behavior, CSS Modules styling on semantic tokens, CVA variants",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -1 +0,0 @@
1
- ._button_tl0n1_6{box-sizing:border-box;--button-focus-ring: var(--ring);position:relative;display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);white-space:nowrap;flex-shrink:0;border:var(--border-width) solid var(--button-border, transparent);border-radius:var(--radius-lg);font-family:inherit;font-size:var(--text-label-size);line-height:var(--text-label-line-height);font-weight:var(--text-label-weight);letter-spacing:var(--text-label-tracking);cursor:pointer;-webkit-user-select:none;user-select:none;text-decoration:none;transition:color .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}._button_tl0n1_6:focus-visible{outline:var(--border-width-focus) solid var(--button-focus-ring);outline-offset:2px}@media(forced-colors:active){._button_tl0n1_6:focus-visible{outline-color:Highlight}}._button_tl0n1_6:disabled{pointer-events:none;opacity:var(--opacity-disabled)}._button_tl0n1_6[data-loading]{pointer-events:none;opacity:var(--opacity-disabled)}._variantDefault_tl0n1_132{background-color:var(--button-bg, var(--primary));color:var(--button-fg, var(--primary-foreground))}._variantDefault_tl0n1_132:hover{background-color:var(--button-bg-hover, var(--button-bg, var(--primary-hover)));color:var(--button-fg-hover, var(--button-fg, var(--primary-foreground)))}._variantDestructive_tl0n1_164{--tint: 10%;--tint-hover: 20%;background-color:var(--button-bg, color-mix(in oklab, var(--destructive) var(--tint), transparent));color:var(--button-fg, var(--destructive))}[data-theme=dark] ._variantDestructive_tl0n1_164{--tint: 20%;--tint-hover: 30%}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) ._variantDestructive_tl0n1_164{--tint: 20%;--tint-hover: 30%}}._variantDestructive_tl0n1_164:hover{background-color:var(--button-bg-hover, var(--button-bg, color-mix(in oklab, var(--destructive) var(--tint-hover), transparent)));color:var(--button-fg-hover, var(--button-fg, var(--destructive)))}._variantOutline_tl0n1_196{border-color:var(--button-border, var(--border-strong));background-color:var(--button-bg, var(--surface-elevated));color:var(--button-fg, var(--foreground))}._variantOutline_tl0n1_196:hover{background-color:var(--button-bg-hover, var(--button-bg, var(--muted)));color:var(--button-fg-hover, var(--button-fg, var(--foreground)))}._variantSecondary_tl0n1_216{background-color:var(--button-bg, var(--secondary));color:var(--button-fg, var(--secondary-foreground))}._variantSecondary_tl0n1_216:hover{background-color:var(--button-bg-hover, var(--button-bg, color-mix(in oklab, var(--secondary) 80%, transparent)));color:var(--button-fg-hover, var(--button-fg, var(--secondary-foreground)))}._variantGhost_tl0n1_233{background-color:var(--button-bg, transparent);color:var(--button-fg, var(--muted-foreground))}._variantGhost_tl0n1_233:hover{background-color:var(--button-bg-hover, var(--button-bg, var(--muted)));color:var(--button-fg-hover, var(--button-fg, var(--foreground)))}._variantLink_tl0n1_254{background-color:var(--button-bg, transparent);color:var(--button-fg, var(--link-foreground));text-underline-offset:4px}._variantLink_tl0n1_254:hover{background-color:var(--button-bg-hover, var(--button-bg, transparent));color:var(--button-fg-hover, var(--button-fg, var(--link-foreground)));text-decoration:underline}._variantNavigation_tl0n1_273{border-color:var(--button-border, var(--border));background-color:var(--button-bg, var(--card));color:var(--button-fg, var(--muted-foreground))}._variantNavigation_tl0n1_273:hover{background-color:var(--button-bg-hover, var(--button-bg, var(--muted)));color:var(--button-fg-hover, var(--button-fg, var(--muted-foreground)))}._variantNavigation_tl0n1_273[data-current],._variantNavigation_tl0n1_273[data-current]:hover{background-color:var(--button-bg-hover, var(--button-bg, var(--secondary)));color:var(--button-fg-hover, var(--button-fg, var(--secondary-foreground)))}._button_tl0n1_6._variantAvatar_tl0n1_312{height:auto;padding:0;border:0;border-radius:var(--radius-full)}._variantAvatar_tl0n1_312{background-color:var(--button-bg, transparent);color:var(--button-fg, inherit)}._variantAvatar_tl0n1_312:hover{background-color:var(--button-bg-hover, var(--button-bg, transparent));color:var(--button-fg-hover, var(--button-fg, inherit))}._variantAvatar_tl0n1_312:hover,._variantAvatar_tl0n1_312[data-popup-open],._variantAvatar_tl0n1_312[aria-expanded=true]{box-shadow:0 0 0 var(--border-width-focus) color-mix(in oklab,var(--primary) 35%,transparent)}._variantUtility_tl0n1_343{border-color:transparent;background-color:var(--button-bg, transparent);color:var(--button-fg, var(--muted-foreground))}._variantUtility_tl0n1_343:hover{background-color:var(--button-bg-hover, var(--button-bg, var(--muted)));color:var(--button-fg-hover, var(--button-fg, var(--foreground)))}._variantUtility_tl0n1_343 ._icon_tl0n1_357 svg{width:18px;height:18px}._variantDefault_tl0n1_132{--button-focus-ring: var(--primary-ring)}._variantDestructive_tl0n1_164{--button-focus-ring: var(--destructive-ring)}._sizeDefault_tl0n1_392{height:var(--control-height-md);padding:0 var(--space-4)}._sizeSm_tl0n1_308{height:var(--control-height-sm);padding:0 var(--space-3);border-radius:var(--radius-md)}._sizeLg_tl0n1_411{height:var(--control-height-lg);padding:0 var(--space-5)}._button_tl0n1_6[data-icon-only]{aspect-ratio:1;padding:0}._icon_tl0n1_357{display:inline-flex}._icon_tl0n1_357 svg{width:var(--icon-size-sm);height:var(--icon-size-sm)}._sizeLg_tl0n1_411 ._icon_tl0n1_357 svg{width:var(--icon-size-md);height:var(--icon-size-md)}._button_tl0n1_6[data-loading] ._icon_tl0n1_357,._button_tl0n1_6[data-loading] ._label_tl0n1_451{opacity:0}._spinner_tl0n1_42{box-sizing:border-box;position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;width:var(--icon-size-xs);height:var(--icon-size-xs);border:2px solid color-mix(in oklab,currentColor 25%,transparent);border-top-color:currentColor;border-radius:50%;animation:_button-spin_tl0n1_1 .8s linear infinite}@keyframes _button-spin_tl0n1_1{to{rotate:360deg}}@media(prefers-reduced-motion:reduce){._spinner_tl0n1_42{animation-duration:2.4s}}
@@ -1 +0,0 @@
1
- ._inputWrap_2zifi_15{position:relative;display:inline-flex;width:fit-content}._input_2zifi_15{box-sizing:border-box;display:block;width:100%;min-width:12rem;height:var(--control-height-lg);padding:var(--space-1) var(--space-3);border:var(--border-width) solid var(--input);border-radius:var(--radius-lg);background-color:var(--surface-elevated);color:var(--foreground);font-family:inherit;font-size:var(--text-label-size);line-height:var(--text-label-line-height);font-weight:var(--text-body-weight);letter-spacing:var(--text-label-tracking);outline:none;transition:color .15s ease,border-color .15s ease,box-shadow .15s ease}._input_2zifi_15::placeholder{color:var(--muted-foreground)}._input_2zifi_15:focus-visible{border-color:var(--ring);box-shadow:inset 0 0 0 var(--ring-inset) var(--ring)}@media(forced-colors:active){._input_2zifi_15:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._input_2zifi_15:disabled{cursor:not-allowed;opacity:var(--opacity-disabled)}._input_2zifi_15[aria-invalid=true]{border-color:var(--destructive);box-shadow:inset 0 0 0 var(--ring-inset) var(--destructive)}._hasTrailingControl_2zifi_110{padding-inline-end:calc(var(--space-2) + var(--control-height-sm) + var(--space-1))}._inputTrigger_2zifi_15,._inputClear_2zifi_15{box-sizing:border-box;position:absolute;inset-inline-end:var(--space-2);top:50%;translate:0 -50%;display:inline-flex;align-items:center;justify-content:center;width:var(--control-height-sm);height:var(--control-height-sm);padding:0;border:none;border-radius:var(--radius-sm);background-color:transparent;color:var(--muted-foreground);cursor:pointer;transition:background-color .15s ease,color .15s ease}._inputTrigger_2zifi_15:hover,._inputClear_2zifi_15:hover{background-color:var(--muted);color:var(--foreground)}._inputTrigger_2zifi_15:focus-visible,._inputClear_2zifi_15:focus-visible{outline:2px solid var(--ring);outline-offset:1px}._inputTrigger_2zifi_15:disabled,._inputClear_2zifi_15:disabled{cursor:not-allowed;opacity:var(--opacity-disabled)}._inputWrap_2zifi_15:has(._inputClear_2zifi_15) ._inputTrigger_2zifi_15{display:none}._positioner_2zifi_176{isolation:isolate;z-index:50}._popup_2zifi_181{box-sizing:border-box;display:flex;flex-direction:column;position:relative;isolation:isolate;z-index:50;max-height:var(--available-height);width:var(--anchor-width);min-width:9rem;overflow:hidden;border-radius:var(--radius-lg);border:var(--border-width) solid var(--popover-border);background-color:var(--popover);color:var(--popover-foreground);box-shadow:var(--popover-shadow);transform-origin:var(--transform-origin);transition:opacity .1s ease,transform .1s ease}@media(prefers-reduced-motion:reduce){._popup_2zifi_181{transition:opacity .1s ease}}._popup_2zifi_181[data-starting-style],._popup_2zifi_181[data-ending-style]{opacity:0;transform:scale(.95)}._list_2zifi_192{overflow-x:hidden;overflow-y:auto;min-height:0;padding:var(--space-1)}._empty_2zifi_251{padding:var(--space-4) var(--space-2);color:var(--muted-foreground);text-align:center;font-size:var(--text-meta-size);line-height:var(--text-meta-line-height)}._group_2zifi_259{scroll-margin:var(--space-1) 0}._groupLabel_2zifi_263{padding:var(--space-1) var(--space-2);color:var(--muted-foreground);font-size:var(--text-meta-size);line-height:var(--text-meta-line-height)}._item_2zifi_270{box-sizing:border-box;position:relative;display:flex;width:100%;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-8) var(--space-2) var(--space-2);border-radius:var(--radius-sm);cursor:default;-webkit-user-select:none;user-select:none;font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);outline:none}._item_2zifi_270:focus,._item_2zifi_270[data-highlighted]{background-color:var(--accent);color:var(--accent-foreground)}._item_2zifi_270[data-disabled]{pointer-events:none;opacity:var(--opacity-disabled)}._itemIndicator_2zifi_276{pointer-events:none;position:absolute;inset-inline-end:var(--space-2);display:flex;width:var(--icon-size-sm);height:var(--icon-size-sm);align-items:center;justify-content:center}._separator_2zifi_322{pointer-events:none;margin:var(--space-2) calc(-1 * var(--space-1));height:var(--border-width);background-color:var(--border)}._chips_2zifi_333{box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-1);width:100%;min-width:12rem;min-height:var(--control-height-lg);padding:var(--space-1) var(--space-2);border:var(--border-width) solid var(--input);border-radius:var(--radius-lg);background-color:var(--surface-elevated);cursor:text;transition:border-color .15s ease,box-shadow .15s ease}._chips_2zifi_333:focus-within{border-color:var(--ring);box-shadow:inset 0 0 0 var(--ring-inset) var(--ring)}@media(forced-colors:active){._chips_2zifi_333:focus-within{outline:2px solid Highlight;outline-offset:2px}}._chips_2zifi_333[aria-invalid=true]{border-color:var(--destructive);box-shadow:inset 0 0 0 var(--ring-inset) var(--destructive)}._chip_2zifi_333{box-sizing:border-box;display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-2);border-radius:var(--radius-full);background-color:var(--secondary);color:var(--secondary-foreground);font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);white-space:nowrap}._chip_2zifi_333[data-disabled]{opacity:var(--opacity-disabled)}._chipRemove_2zifi_333{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--icon-size-md);height:var(--icon-size-md);padding:0;border:none;border-radius:var(--radius-full);background-color:transparent;color:inherit;cursor:pointer}._chipRemove_2zifi_333:hover{background-color:color-mix(in oklab,var(--secondary-foreground) 15%,transparent)}._chipRemove_2zifi_333:focus-visible{outline:2px solid var(--ring);outline-offset:1px}._chipRemove_2zifi_333:disabled{cursor:not-allowed;opacity:var(--opacity-disabled)}._chipRemoveIcon_2zifi_435{width:var(--icon-size-xs);height:var(--icon-size-xs);flex-shrink:0;pointer-events:none}._chipsInput_2zifi_333{flex:1 1 auto;min-width:4rem;border:none;outline:none;background-color:transparent;color:var(--foreground);font-family:inherit;font-size:var(--text-label-size);line-height:var(--text-label-line-height);font-weight:var(--text-body-weight);letter-spacing:var(--text-label-tracking)}._chipsInput_2zifi_333::placeholder{color:var(--muted-foreground)}._chipsInput_2zifi_333:disabled{cursor:not-allowed}._svgIcon_2zifi_464{width:var(--icon-size-sm);height:var(--icon-size-sm);flex-shrink:0;pointer-events:none}
@@ -1 +0,0 @@
1
- ._pagination_u1u2f_16{display:flex;width:100%;justify-content:center}._content_u1u2f_22{display:flex;align-items:center;gap:var(--space-1);margin:0;padding:0;list-style:none}._link_u1u2f_37{box-sizing:border-box;display:inline-flex;height:var(--control-height-xs);align-items:center;justify-content:center;gap:var(--space-1);border-radius:var(--radius-sm);padding-inline:var(--space-2);background-color:transparent;color:var(--muted-foreground);font-family:inherit;font-size:var(--text-label-size);line-height:var(--text-label-line-height);font-weight:var(--text-label-weight);letter-spacing:var(--text-label-tracking);text-decoration:none;white-space:nowrap;cursor:pointer;transition:color .15s ease,background-color .15s ease}._link_u1u2f_37:hover{color:var(--foreground)}._link_u1u2f_37:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:2px}@media(forced-colors:active){._link_u1u2f_37:focus-visible{outline-color:Highlight}}._link_u1u2f_37[data-active]{background-color:var(--background);color:var(--primary)}._link_u1u2f_37._square_u1u2f_101{width:var(--control-height-xs);padding-inline:0}._previousNextText_u1u2f_106{display:none}@media(min-width:640px){._previousNextText_u1u2f_106{display:block}}._icon_u1u2f_119{width:var(--icon-size-sm);height:var(--icon-size-sm)}._ellipsis_u1u2f_126{display:flex;align-items:center;justify-content:center;width:var(--control-height-xs);height:var(--control-height-xs);color:var(--muted-foreground)}._srOnly_u1u2f_137{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@@ -1 +0,0 @@
1
- ._spinner_1q85o_6{width:var(--icon-size-sm);height:var(--icon-size-sm);animation:_spin_1q85o_6 1s linear infinite}._spinner_1q85o_6[data-compact]{width:14px;height:14px}._block_1q85o_28{display:inline-flex;flex-direction:column;align-items:center;gap:var(--space-2);text-align:center}._indicator_1q85o_44{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem}._indicator_1q85o_44 ._spinner_1q85o_6{width:18px;height:18px}._block_1q85o_28[data-compact] ._indicator_1q85o_44{width:1.75rem;height:1.75rem}._block_1q85o_28[data-compact] ._indicator_1q85o_44 ._spinner_1q85o_6{width:14px;height:14px}._label_1q85o_73{font-family:var(--font-mono);font-size:var(--text-mono-size);line-height:var(--text-mono-line-height);font-weight:var(--text-mono-weight);letter-spacing:.08em;text-transform:uppercase;color:var(--foreground)}._description_1q85o_85{font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);font-weight:var(--text-meta-weight);letter-spacing:var(--text-meta-tracking);color:var(--muted-foreground)}@keyframes _spin_1q85o_6{to{rotate:360deg}}@media(prefers-reduced-motion:reduce){._spinner_1q85o_6{animation-duration:2.4s}}
@@ -1 +0,0 @@
1
- ._tableContainer_1h458_8{position:relative;width:100%;overflow:auto}._tableContainer_1h458_8:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:2px}@media(forced-colors:active){._tableContainer_1h458_8:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._table_1h458_8{width:100%;border-collapse:collapse;caption-side:bottom;font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);font-weight:var(--text-meta-weight);letter-spacing:var(--text-meta-tracking)}._tableRow_1h458_84{--table-row-fill: transparent;background-color:var(--table-row-fill);border-bottom:var(--border-width) solid var(--border);transition:color .15s ease,background-color .15s ease,border-color .15s ease}._tableBody_1h458_101:last-child ._tableRow_1h458_84:last-child{border-bottom:0}._tableBody_1h458_101 ._tableRow_1h458_84:hover,._tableBody_1h458_101 ._tableRow_1h458_84:has([aria-expanded=true]){--table-row-fill: var(--muted)}._tableBody_1h458_101 ._tableRow_1h458_84[data-state=selected]{--table-row-fill: var(--selection-subtle)}._tableBody_1h458_101 ._tableRow_1h458_84[data-state=stale]{--table-row-fill: var(--warning-soft)}._tableBody_1h458_101 ._tableRow_1h458_84[data-state=restricted]{--table-row-fill: var(--danger-soft)}._tableHead_1h458_69{box-sizing:border-box;position:relative;height:var(--control-height-md);padding:0 var(--space-4);text-align:start;vertical-align:middle;font-family:var(--font-mono);font-size:var(--text-mono-size);line-height:var(--text-mono-line-height);font-weight:var(--text-mono-weight);letter-spacing:var(--text-mono-tracking);text-transform:uppercase;white-space:nowrap;color:var(--subtle-foreground)}._tableHead_1h458_69:has([role=checkbox]){padding-inline-end:0}._columnResizer_1h458_229{position:absolute;top:0;bottom:0;z-index:1;padding:0;border:0;background:none;cursor:col-resize;touch-action:none;outline:none}._columnResizer_1h458_229:after{content:"";position:absolute;top:0;bottom:0;left:50%;width:var(--border-width);translate:-50% 0;background-color:var(--border);transition:width var(--duration-micro) var(--ease-standard),background-color var(--duration-micro) var(--ease-standard)}._columnResizer_1h458_229:hover:after,._columnResizer_1h458_229:focus-visible:after,._columnResizer_1h458_229:active:after{width:var(--border-width-focus);background-color:var(--primary)}@media(forced-colors:active){._columnResizer_1h458_229:focus-visible:after{background-color:Highlight}}._tableCell_1h458_273{box-sizing:border-box;padding:var(--space-3) var(--space-4);height:var(--control-height-lg);vertical-align:middle;white-space:nowrap}._tableCell_1h458_273:has([role=checkbox]){padding-inline-end:0}._variantCollection_1h458_339{table-layout:fixed;min-width:960px}._variantCollection_1h458_339 ._tableHead_1h458_69{position:sticky;top:0;z-index:2;height:var(--control-height-lg);padding:0 var(--space-3);background-color:var(--card);color:var(--muted-foreground);line-height:16px}._variantCollection_1h458_339 ._tableBody_1h458_101 ._tableRow_1h458_84{height:4rem}._variantCollection_1h458_339 ._tableCell_1h458_273{height:auto;padding:var(--space-3) var(--space-2);font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);white-space:normal}._variantCollection_1h458_339 ._tableBody_1h458_101 ._tableRow_1h458_84:focus-visible{outline:none;box-shadow:inset 0 0 0 var(--border-width-focus) var(--primary)}._variantCollection_1h458_339 ._tableBody_1h458_101 ._tableRow_1h458_84[tabindex]{cursor:pointer;transition:background-color var(--duration-micro) var(--ease-standard)}._variantCollection_1h458_339 ._tableBody_1h458_101 ._tableRow_1h458_84[data-pending]{--table-row-fill: var(--muted);cursor:progress}._densityCompact_1h458_409 ._tableHead_1h458_69{height:var(--control-height-sm)}._densityCompact_1h458_409 ._tableCell_1h458_273{padding-block:var(--space-2);height:auto}._tableCaption_1h458_418{margin-top:var(--space-4);font-size:var(--text-body-size);line-height:var(--text-body-line-height);color:var(--muted-foreground)}._tableFooter_1h458_440{font-weight:var(--text-label-weight)}._tableFooter_1h458_440 ._tableRow_1h458_84{--table-row-fill: var(--muted)}._tableFooter_1h458_440 ._tableRow_1h458_84:last-child{border-bottom:0}