@logicplanes/kaeso-ui 0.6.0-rc.4 → 0.6.0-rc.6

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,6 +1,6 @@
1
1
  # @logicplanes/kaeso-ui component guides
2
2
 
3
- Version 0.6.0-rc.4. Generated from the showcase's demo modules (apps/showcase/src/demos); do not edit. For each component: what it is for, its import, keyboard, accessibility, do and don't, and every example's code. Props and variants: `component-registry.md`.
3
+ Version 0.6.0-rc.6. Generated from the showcase's demo modules (apps/showcase/src/demos); do not edit. For each component: what it is for, its import, keyboard, accessibility, do and don't, and every example's code. Props and variants: `component-registry.md`.
4
4
 
5
5
  ## AlertDialog
6
6
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@logicplanes/kaeso-ui",
3
- "version": "0.6.0-rc.4",
3
+ "version": "0.6.0-rc.6",
4
4
  "components": [
5
5
  {
6
6
  "entry": "app-frame",
@@ -5335,7 +5335,7 @@
5335
5335
  "components": [
5336
5336
  {
5337
5337
  "name": "ClientButton",
5338
- "description": "An agent client's mark, such as Claude, Cursor or GitHub Copilot, in a raised circle beside the other header buttons, as a button that opens how to connect it.",
5338
+ "description": "An agent client's mark, such as Claude, Cursor, GitHub Copilot or ChatGPT, in a raised circle beside the other header buttons, as a button that opens how to connect it.",
5339
5339
  "props": [
5340
5340
  {
5341
5341
  "name": "aria-label",
@@ -5346,7 +5346,7 @@
5346
5346
  },
5347
5347
  {
5348
5348
  "name": "client",
5349
- "type": "\"cursor\" | \"claude\" | \"github-copilot\"",
5349
+ "type": "\"cursor\" | \"claude\" | \"github-copilot\" | \"chatgpt\"",
5350
5350
  "required": true,
5351
5351
  "default": null,
5352
5352
  "description": "Which client's mark it shows."
@@ -1,6 +1,6 @@
1
1
  # @logicplanes/kaeso-ui component registry
2
2
 
3
- Version 0.6.0-rc.4. Generated from the component types, their descriptions and variants; do not edit.
3
+ Version 0.6.0-rc.6. Generated from the component types, their descriptions and variants; do not edit.
4
4
 
5
5
  ## app-frame
6
6
 
@@ -1172,12 +1172,12 @@ A multi-line field: radius 14 (multi-line text cannot be a pill), the same mater
1172
1172
 
1173
1173
  ### ClientButton
1174
1174
 
1175
- An agent client's mark, such as Claude, Cursor or GitHub Copilot, in a raised circle beside the other header buttons, as a button that opens how to connect it.
1175
+ An agent client's mark, such as Claude, Cursor, GitHub Copilot or ChatGPT, in a raised circle beside the other header buttons, as a button that opens how to connect it.
1176
1176
 
1177
1177
  | Prop | Type | Default | Description |
1178
1178
  |---|---|---|---|
1179
1179
  | `aria-label` * | `string` | | The client's name; also the tooltip. |
1180
- | `client` * | `"cursor" \| "claude" \| "github-copilot"` | | Which client's mark it shows. |
1180
+ | `client` * | `"cursor" \| "claude" \| "github-copilot" \| "chatgpt"` | | Which client's mark it shows. |
1181
1181
  | `className` | `string` | | Classes for the layout of the outer element: margin, width and placement, never its look. |
1182
1182
  | `data-force` | `string` | | Forces an interaction state for state matrices: `hover`, `pressed`, `focus`, `open`. |
1183
1183
  | `onClick` | `(() => void)` | | Opens how to connect the client. |
package/ai/icons.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Icon vocabulary
2
2
 
3
- Version 0.6.0-rc.4. Generated from `src/icons/vocabulary.ts`; do not edit. Use the name, never an icon picked by look: `icons.key` always means a key. Hugeicons, Stroke Rounded. Rules: `foundations/icons.md`.
3
+ Version 0.6.0-rc.6. Generated from `src/icons/vocabulary.ts`; do not edit. Use the name, never an icon picked by look: `icons.key` always means a key. Hugeicons, Stroke Rounded. Rules: `foundations/icons.md`.
4
4
 
5
5
  ## Kaeso objects
6
6
 
package/ai/tokens.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @logicplanes/kaeso-ui tokens
2
2
 
3
- Version 0.6.0-rc.4. Generated from `@logicplanes/kaeso-tokens`; do not edit. Components use these through role names (`bg-panel`, `text-fg-secondary`, `h-36`, `rounded-pill`); a raw value never appears in a component. How to use them: `foundations/*.md`.
3
+ Version 0.6.0-rc.6. Generated from `@logicplanes/kaeso-tokens`; do not edit. Components use these through role names (`bg-panel`, `text-fg-secondary`, `h-36`, `rounded-pill`); a raw value never appears in a component. How to use them: `foundations/*.md`.
4
4
 
5
5
  ## Neutrals
6
6
 
@@ -86,15 +86,15 @@ function Ae(t, n) {
86
86
  return n ? e("controls-on-fill", t ? "bg-raised-pressed hover:raised-selected-hover active:raised-selected-hover" : "bg-fill-2 hover:bg-fill-3 active:bg-fill-3") : t ? "hover:bg-raised-hover active:bg-raised-pressed hover:controls-on-fill" : "hover:bg-fill-1 active:bg-fill-2 hover:controls-on-fill";
87
87
  }
88
88
  var je = (e) => Math.min(e.size, e.minWidth ?? 136);
89
- function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowClick: l, rowMenu: u, selectable: f, canSelectRow: _, selection: v, onSelectionChange: de, sorting: w, onSortingChange: xe, manualSorting: Me, loading: D, error: Ne, onRetry: O, empty: k, hasMore: Pe, loadingMore: Fe, onLoadMore: Ie, stickyFirstColumn: Le, virtualizeAbove: Re = 100, className: ze, activeRowId: Be, freshRowIds: Ve, onHiddenColumnsChange: He, "aria-label": Ue, "data-force-row": We }, A) {
90
- let j = t(), Ge = r(), Ke = n(), M = i(), [qe, Je] = x([]), [Ye, Xe] = x({}), [Ze, Qe] = x(0), [$e, N] = x("body"), [et, tt] = x(0), P = b(null), nt = w ?? qe, F = v ?? Ye, rt = fe(() => f ? [{
89
+ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowClick: l, rowMenu: u, selectable: f, canSelectRow: _, selection: v, onSelectionChange: de, sorting: w, onSortingChange: xe, manualSorting: Me, loading: D, error: O, onRetry: k, empty: A, hasMore: Ne, loadingMore: Pe, onLoadMore: Fe, stickyFirstColumn: Ie, virtualizeAbove: Le = 100, className: Re, activeRowId: ze, freshRowIds: Be, onHiddenColumnsChange: Ve, "aria-label": He, "data-force-row": Ue }, j) {
90
+ let M = t(), We = r(), Ge = n(), N = i(), [Ke, qe] = x([]), [Je, Ye] = x({}), [Xe, Ze] = x(0), [Qe, P] = x("body"), [$e, et] = x(0), F = b(null), tt = w ?? Ke, I = v ?? Je, nt = fe(() => f ? [{
91
91
  id: "__select",
92
92
  size: 44,
93
93
  enableSorting: !1,
94
94
  enableResizing: !1,
95
95
  meta: { priority: 1 },
96
96
  header: ({ table: e }) => /* @__PURE__ */ S(te, {
97
- "aria-label": M("dataTable.selectAllRows", "Select all rows"),
97
+ "aria-label": N("dataTable.selectAllRows", "Select all rows"),
98
98
  checked: e.getIsAllRowsSelected(),
99
99
  indeterminate: e.getIsSomeRowsSelected() && !e.getIsAllRowsSelected(),
100
100
  onCheckedChange: (t) => e.toggleAllRowsSelected(t)
@@ -102,7 +102,7 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
102
102
  cell: ({ row: e }) => {
103
103
  let t = Ee(Te(o), e);
104
104
  return /* @__PURE__ */ S(te, {
105
- "aria-label": t ? M("dataTable.selectNamed", "Select {name}", { name: t }) : M("dataTable.selectRow", "Select row"),
105
+ "aria-label": t ? N("dataTable.selectNamed", "Select {name}", { name: t }) : N("dataTable.selectRow", "Select row"),
106
106
  checked: e.getIsSelected(),
107
107
  disabled: !e.getCanSelect(),
108
108
  onCheckedChange: (t) => e.toggleSelected(t)
@@ -111,21 +111,21 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
111
111
  }, ...o] : o, [
112
112
  o,
113
113
  f,
114
- M
115
- ]), I = be({
114
+ N
115
+ ]), L = be({
116
116
  data: a,
117
- columns: rt,
117
+ columns: nt,
118
118
  state: {
119
- sorting: nt,
120
- rowSelection: F
119
+ sorting: tt,
120
+ rowSelection: I
121
121
  },
122
122
  onSortingChange: (e) => {
123
- let t = typeof e == "function" ? e(nt) : e;
124
- P.current = null, w || Je(t), xe?.(t);
123
+ let t = typeof e == "function" ? e(tt) : e;
124
+ F.current = null, w || qe(t), xe?.(t);
125
125
  },
126
126
  onRowSelectionChange: (e) => {
127
- let t = typeof e == "function" ? e(F) : e;
128
- v || Xe(t), de?.(t);
127
+ let t = typeof e == "function" ? e(I) : e;
128
+ v || Ye(t), de?.(t);
129
129
  },
130
130
  getCoreRowModel: ve(),
131
131
  getSortedRowModel: ye(),
@@ -138,61 +138,61 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
138
138
  minSize: 64,
139
139
  maxSize: 640
140
140
  }
141
- }), L = b(null), R = b(null), z = b(null), it = I.getVisibleLeafColumns(), at = it.map((e) => ({
141
+ }), R = b(null), z = b(null), B = b(null), rt = L.getVisibleLeafColumns(), it = rt.map((e) => ({
142
142
  id: e.id,
143
143
  size: e.getSize(),
144
144
  priority: e.columnDef.meta?.priority ?? 2,
145
145
  grow: !!e.columnDef.meta?.grow,
146
146
  minWidth: e.columnDef.meta?.minWidth,
147
147
  fixed: e.id === "__select"
148
- })), ot = JSON.stringify(at), st = (e) => {
149
- let t = Ce(at, e, j ? 48 : 0);
148
+ })), at = JSON.stringify(it), ot = (e) => {
149
+ let t = Ce(it, e, M ? 48 : 0);
150
150
  return `${t.tight ? "!" : ""}${t.overflow ? ">" : ""}|${t.hidden.join(" ")}`;
151
- }, B = b(st);
152
- B.current = st;
151
+ }, st = b(ot);
152
+ st.current = ot;
153
153
  let [ct, lt] = x("|");
154
154
  y(() => {
155
- let e = L.current;
156
- if (e) return p([e], ([e]) => lt(B.current(Math.round(e?.contentRect.width ?? 0))));
155
+ let e = R.current;
156
+ if (e) return p([e], ([e]) => lt(st.current(Math.round(e?.contentRect.width ?? 0))));
157
157
  }, []), y(() => {
158
- L.current && lt(B.current(Math.round(we(L.current))));
159
- }, [ot]);
160
- let [ut = "", dt = ""] = ct.split("|"), ft = ut.includes("!"), pt = ut.includes(">"), V = fe(() => new Set(dt.split(" ").filter(Boolean)), [dt]), mt = b(He);
161
- mt.current = He, y(() => {
158
+ R.current && lt(st.current(Math.round(we(R.current))));
159
+ }, [at]);
160
+ let [ut = "", dt = ""] = ct.split("|"), ft = ut.includes("!"), pt = ut.includes(">"), V = fe(() => new Set(dt.split(" ").filter(Boolean)), [dt]), mt = b(Ve);
161
+ mt.current = Ve, y(() => {
162
162
  mt.current?.([...V]);
163
163
  }, [V]);
164
- let H = it.filter((e) => !V.has(e.id)), ht = (e) => e.columnDef.meta?.grow && ft ? je({
164
+ let H = rt.filter((e) => !V.has(e.id)), ht = (e) => e.columnDef.meta?.grow && ft ? je({
165
165
  size: e.getSize(),
166
166
  minWidth: e.columnDef.meta.minWidth
167
167
  }) : e.getSize(), U = {
168
168
  gridTemplateColumns: H.map((e) => e.columnDef.meta?.grow ? `minmax(${ht(e)}px, 1fr)` : `${e.getSize()}px`).join(" "),
169
169
  minWidth: H.reduce((e, t) => e + ht(t), 0)
170
- }, gt = pt && H.length > 1 && !H[H.length - 1]?.columnDef.meta?.grow, W = I.getRowModel().rows, G = W.length > Re, _t = Math.max(Se[c], se() ? 44 : 0), K = () => ce(L.current), vt = ue(z, K, W.length, G), q = ge({
170
+ }, gt = pt && H.length > 1 && !H[H.length - 1]?.columnDef.meta?.grow, W = L.getRowModel().rows, _t = pt && W.length === 0 && !D && !O, G = W.length > Le, vt = Math.max(Se[c], se() ? 44 : 0), K = () => ce(R.current), yt = ue(B, K, W.length, G), q = ge({
171
171
  count: W.length,
172
172
  getScrollElement: K,
173
- estimateSize: () => _t,
173
+ estimateSize: () => vt,
174
174
  overscan: 16,
175
175
  enabled: G,
176
- scrollMargin: vt
177
- }), J = (t) => e("flex min-w-0 items-center px-12", j && t === 0 && "pl-20", j && t === H.length - 1 && "pr-20"), Y = j || Ge, X = (t, n = !1, r = !1) => (Le && t === 0 || gt && t === H.length - 1) && e("sticky z-10", n ? Y ? "bg-raised" : "bg-panel" : r ? "bg-inherit" : Y ? "bg-raised group-hover/tr:bg-raised-hover group-active/tr:bg-raised-pressed" : "bg-panel group-hover/tr:bg-fill-1 group-active/tr:bg-fill-2", t === 0 ? "left-0" : "right-0", !j && !n && (t === 0 ? "rounded-l-item" : "rounded-r-item")), Z = !!l || !!f, Q = Z ? "gridcell" : "cell", yt = Z && W.length > 0 && $e === "body", bt = Math.min(Ze, Math.max(W.length - 1, 0)), xt = (e) => {
176
+ scrollMargin: yt
177
+ }), J = (t) => e("flex min-w-0 items-center px-12", M && t === 0 && "pl-20", M && t === H.length - 1 && "pr-20"), Y = M || We, X = (t, n = !1, r = !1) => (Ie && t === 0 || gt && t === H.length - 1) && e("sticky z-10", n ? Y ? "bg-raised" : "bg-panel" : r ? "bg-inherit" : Y ? "bg-raised group-hover/tr:bg-raised-hover group-active/tr:bg-raised-pressed" : "bg-panel group-hover/tr:bg-fill-1 group-active/tr:bg-fill-2", t === 0 ? "left-0" : "right-0", !M && !n && (t === 0 ? "rounded-l-item" : "rounded-r-item")), Z = !!l || !!f, Q = Z ? "gridcell" : "cell", bt = Z && W.length > 0 && Qe === "body", xt = Math.min(Xe, Math.max(W.length - 1, 0)), St = (e) => {
178
178
  let t = Math.max(0, Math.min(W.length - 1, e));
179
- N("body"), Qe(t), G && q.scrollToIndex(t, { align: "auto" });
180
- let n = () => z.current?.querySelector(`[data-row-index="${t}"]`), r = n();
179
+ P("body"), Ze(t), G && q.scrollToIndex(t, { align: "auto" });
180
+ let n = () => B.current?.querySelector(`[data-row-index="${t}"]`), r = n();
181
181
  r ? r.focus() : requestAnimationFrame(() => n()?.focus());
182
- }, St = (e) => {
183
- let t = E(R.current), n = t[Math.max(0, Math.min(t.length - 1, e))];
184
- return n ? (N("head"), tt(t.indexOf(n)), n.focus(), !0) : !1;
185
- }, Ct = b(() => {});
186
- Ct.current = () => {
187
- let e = E(R.current), t = Math.min(et, e.length - 1);
188
- for (let n of R.current?.querySelectorAll(De) ?? []) {
189
- let r = e.indexOf(n) === t && !yt ? "0" : "-1";
182
+ }, Ct = (e) => {
183
+ let t = E(z.current), n = t[Math.max(0, Math.min(t.length - 1, e))];
184
+ return n ? (P("head"), et(t.indexOf(n)), n.focus(), !0) : !1;
185
+ }, wt = b(() => {});
186
+ wt.current = () => {
187
+ let e = E(z.current), t = Math.min($e, e.length - 1);
188
+ for (let n of z.current?.querySelectorAll(De) ?? []) {
189
+ let r = e.indexOf(n) === t && !bt ? "0" : "-1";
190
190
  n.getAttribute("tabindex") !== r && n.setAttribute("tabindex", r);
191
191
  }
192
- }, y(() => Ct.current()), y(() => {
193
- let e = R.current;
192
+ }, y(() => wt.current()), y(() => {
193
+ let e = z.current;
194
194
  if (!e) return;
195
- let t = new MutationObserver(() => Ct.current());
195
+ let t = new MutationObserver(() => wt.current());
196
196
  return t.observe(e, {
197
197
  subtree: !0,
198
198
  childList: !0,
@@ -200,7 +200,7 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
200
200
  attributeFilter: ["tabindex"]
201
201
  }), () => t.disconnect();
202
202
  }, []), y(() => {
203
- let e = z.current;
203
+ let e = B.current;
204
204
  if (!e || !Z) return;
205
205
  let t = () => {
206
206
  for (let t of e.querySelectorAll("[data-row-index]")) for (let e of t.querySelectorAll(De)) e.getAttribute("tabindex") !== "-1" && e.setAttribute("tabindex", "-1");
@@ -213,25 +213,25 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
213
213
  attributes: !0,
214
214
  attributeFilter: ["tabindex"]
215
215
  }), () => n.disconnect();
216
- }, [Z]), ae(z, "[role=row]");
217
- let wt = (e, t) => {
218
- let n = e ? I.getColumn(e) : void 0;
216
+ }, [Z]), ae(B, "[role=row]");
217
+ let Tt = (e, t) => {
218
+ let n = e ? L.getColumn(e) : void 0;
219
219
  if (!n?.getCanResize()) return !1;
220
220
  let r = n.columnDef.minSize ?? 64, i = n.columnDef.maxSize ?? 640;
221
- return I.setColumnSizing((e) => ({
221
+ return L.setColumnSizing((e) => ({
222
222
  ...e,
223
223
  [n.id]: Math.max(r, Math.min(i, n.getSize() + t))
224
224
  })), !0;
225
- }, Tt = (e) => {
225
+ }, Et = (e) => {
226
226
  if (e.altKey || e.metaKey || e.ctrlKey) return;
227
- let t = E(R.current), n = t.indexOf(e.target);
227
+ let t = E(z.current), n = t.indexOf(e.target);
228
228
  if (n < 0) return;
229
229
  let r = {
230
230
  ArrowLeft: -16,
231
231
  ArrowRight: 16
232
232
  }[e.key];
233
233
  if (e.shiftKey) {
234
- r !== void 0 && wt(e.target.closest("[role=columnheader]")?.dataset.col, r) && e.preventDefault();
234
+ r !== void 0 && Tt(e.target.closest("[role=columnheader]")?.dataset.col, r) && e.preventDefault();
235
235
  return;
236
236
  }
237
237
  let i = {
@@ -240,17 +240,17 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
240
240
  Home: 0,
241
241
  End: t.length - 1
242
242
  }[e.key];
243
- i === void 0 ? e.key === "ArrowDown" && Z && W.length && (e.preventDefault(), xt(bt)) : (e.preventDefault(), i >= 0 && i < t.length && St(i));
244
- }, Et = () => Math.max(1, Math.floor((K()?.clientHeight ?? 400) / _t) - 1), Dt = (e, t) => {
245
- let n = P.current ? W.findIndex((e) => e.id === P.current?.id) : -1;
246
- n < 0 && (P.current = {
243
+ i === void 0 ? e.key === "ArrowDown" && Z && W.length && (e.preventDefault(), St(xt)) : (e.preventDefault(), i >= 0 && i < t.length && Ct(i));
244
+ }, Dt = () => Math.max(1, Math.floor((K()?.clientHeight ?? 400) / vt) - 1), Ot = (e, t) => {
245
+ let n = F.current ? W.findIndex((e) => e.id === F.current?.id) : -1;
246
+ n < 0 && (F.current = {
247
247
  id: W[e].id,
248
- base: F
248
+ base: I
249
249
  });
250
- let r = n < 0 ? e : n, i = { ...P.current?.base };
250
+ let r = n < 0 ? e : n, i = { ...F.current?.base };
251
251
  for (let e of W.slice(Math.min(r, t), Math.max(r, t) + 1)) e.getCanSelect() && (i[e.id] = !0);
252
- I.setRowSelection(i);
253
- }, Ot = (e, t, n) => {
252
+ L.setRowSelection(i);
253
+ }, kt = (e, t, n) => {
254
254
  let r = e.currentTarget, i = e.target;
255
255
  if (i !== r) {
256
256
  if (e.altKey || e.metaKey || e.ctrlKey || i.closest(Oe)) return;
@@ -263,7 +263,7 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
263
263
  }
264
264
  if (e.altKey) return;
265
265
  if (e.metaKey || e.ctrlKey) {
266
- e.key.toLowerCase() === "a" && f && !e.shiftKey && (e.preventDefault(), P.current = null, I.toggleAllRowsSelected(!0));
266
+ e.key.toLowerCase() === "a" && f && !e.shiftKey && (e.preventDefault(), F.current = null, L.toggleAllRowsSelected(!0));
267
267
  return;
268
268
  }
269
269
  let a = {
@@ -271,35 +271,35 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
271
271
  ArrowUp: n - 1,
272
272
  Home: 0,
273
273
  End: W.length - 1,
274
- PageDown: n + Et(),
275
- PageUp: n - Et()
274
+ PageDown: n + Dt(),
275
+ PageUp: n - Dt()
276
276
  }[e.key];
277
277
  if (a !== void 0) {
278
- if (e.preventDefault(), e.key === "ArrowUp" && !e.shiftKey && a < 0 && St(et)) return;
278
+ if (e.preventDefault(), e.key === "ArrowUp" && !e.shiftKey && a < 0 && Ct($e)) return;
279
279
  let t = Math.max(0, Math.min(W.length - 1, a));
280
- e.shiftKey && f ? Dt(n, t) : P.current = null, xt(t);
280
+ e.shiftKey && f ? Ot(n, t) : F.current = null, St(t);
281
281
  } else if (e.shiftKey) return;
282
282
  else if (e.key === "ArrowRight") {
283
283
  let t = ke(r)[0];
284
284
  if (!t) return;
285
285
  e.preventDefault(), t.focus();
286
- } else e.key === "Enter" ? (e.preventDefault(), l?.(t.original)) : (e.key === " " || e.key === "x") && f ? (e.preventDefault(), P.current = null, t.getCanSelect() && t.toggleSelected()) : e.key === "Escape" && f && Object.keys(F).length && (e.preventDefault(), P.current = null, I.toggleAllRowsSelected(!1));
287
- }, kt = [
288
- rt,
286
+ } else e.key === "Enter" ? (e.preventDefault(), l?.(t.original)) : (e.key === " " || e.key === "x") && f ? (e.preventDefault(), F.current = null, t.getCanSelect() && t.toggleSelected()) : e.key === "Escape" && f && Object.keys(I).length && (e.preventDefault(), F.current = null, L.toggleAllRowsSelected(!1));
287
+ }, At = [
288
+ nt,
289
289
  H.map((e) => e.id).join(" "),
290
- j,
290
+ M,
291
291
  gt,
292
- Le,
292
+ Ie,
293
293
  Y,
294
294
  Q
295
295
  ], $ = b(null);
296
- (!$.current || kt.some((e, t) => e !== $.current?.deps[t])) && ($.current = {
297
- deps: kt,
296
+ (!$.current || At.some((e, t) => e !== $.current?.deps[t])) && ($.current = {
297
+ deps: At,
298
298
  rows: /* @__PURE__ */ new WeakMap()
299
299
  });
300
- let At = $.current.rows, jt = (t, n, r) => {
301
- let i = t.id === Be, a = !!f && t.getIsSelected(), o = i || a, s = `${i} ${a}`, d = At.get(t), p = d?.state === s ? d.cells : Mt(t, o);
302
- d?.state !== s && At.set(t, {
300
+ let jt = $.current.rows, Mt = (t, n, r) => {
301
+ let i = t.id === ze, a = !!f && t.getIsSelected(), o = i || a, s = `${i} ${a}`, d = jt.get(t), p = d?.state === s ? d.cells : Nt(t, o);
302
+ d?.state !== s && jt.set(t, {
303
303
  state: s,
304
304
  cells: p
305
305
  });
@@ -309,27 +309,27 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
309
309
  "aria-selected": f ? t.getIsSelected() : void 0,
310
310
  "aria-current": i || void 0,
311
311
  "data-active": i || void 0,
312
- "data-fresh": Ve?.has(t.id) || void 0,
312
+ "data-fresh": Be?.has(t.id) || void 0,
313
313
  "data-row-index": n,
314
- ...We && n === 0 ? { "data-force": We } : {},
315
- tabIndex: Z ? yt && n === bt ? 0 : -1 : void 0,
314
+ ...Ue && n === 0 ? { "data-force": Ue } : {},
315
+ tabIndex: Z ? bt && n === xt ? 0 : -1 : void 0,
316
316
  onFocus: (e) => {
317
- e.target === e.currentTarget && (N("body"), n !== Ze && Qe(n));
317
+ e.target === e.currentTarget && (P("body"), n !== Xe && Ze(n));
318
318
  },
319
319
  onClick: (e) => {
320
- P.current = null, !(e.target.closest("button, a, [role=checkbox]") || le(e.currentTarget)) && l?.(t.original);
320
+ F.current = null, !(e.target.closest("button, a, [role=checkbox]") || le(e.currentTarget)) && l?.(t.original);
321
321
  },
322
- onKeyDown: (e) => Ot(e, t, n),
322
+ onKeyDown: (e) => kt(e, t, n),
323
323
  style: {
324
324
  ...U,
325
325
  ...r
326
326
  },
327
- className: e("group/tr grid w-full text-body text-fg transition-control focus-ring-inset", !j && "rounded-item", T.density[c].classes, l && "cursor-pointer", Ae(Y, o), "data-fresh:animate-row-fresh", r?.transform !== void 0 && "[transition-property:background-color,color,box-shadow,opacity]", "forced-colors:data-active:outline-2 forced-colors:data-active:-outline-offset-2 forced-colors:data-active:outline-solid"),
327
+ className: e("group/tr grid w-full text-body text-fg transition-control focus-ring-inset", !M && "rounded-item", T.density[c].classes, l && "cursor-pointer", Ae(Y, o), "data-fresh:animate-row-fresh", r?.transform !== void 0 && "[transition-property:background-color,color,box-shadow,opacity]", "forced-colors:data-active:outline-2 forced-colors:data-active:-outline-offset-2 forced-colors:data-active:outline-solid"),
328
328
  children: p
329
329
  });
330
330
  return u ? /* @__PURE__ */ C(h, { children: [/* @__PURE__ */ S(h.Trigger, { children: m }), /* @__PURE__ */ S(h.Content, { children: u(t.original) })] }, t.id) : /* @__PURE__ */ S("div", { children: m }, t.id);
331
331
  };
332
- function Mt(t, n) {
332
+ function Nt(t, n) {
333
333
  return t.getVisibleCells().filter((e) => !V.has(e.column.id)).map((r, i) => {
334
334
  let a = r.column.columnDef.meta, o = _e(r.column.columnDef.cell, r.getContext()), s = r.getValue(), c = a?.text ? a.text(t.original) : typeof s == "string" ? s : void 0, l = a?.tone?.(t.original);
335
335
  return /* @__PURE__ */ S("div", {
@@ -351,7 +351,7 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
351
351
  }, r.id);
352
352
  });
353
353
  }
354
- let Nt = (t, n) => {
354
+ let Pt = (t, n) => {
355
355
  let r = t.column.columnDef.meta, i = t.column.getCanSort(), a = t.column.getCanResize(), o = t.column.getIsSorted(), s = _e(t.column.columnDef.header, t.getContext()), c = /* @__PURE__ */ C(pe, { children: [i ? /* @__PURE__ */ C("button", {
356
356
  type: "button",
357
357
  onClick: t.column.getToggleSortingHandler(),
@@ -367,7 +367,7 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
367
367
  }), a && /* @__PURE__ */ S("div", {
368
368
  role: "separator",
369
369
  "aria-orientation": "vertical",
370
- "aria-label": M("dataTable.resizeColumn", "Resize column"),
370
+ "aria-label": N("dataTable.resizeColumn", "Resize column"),
371
371
  "aria-valuenow": t.column.getSize(),
372
372
  "aria-valuemin": t.column.columnDef.minSize ?? 64,
373
373
  "aria-valuemax": t.column.columnDef.maxSize ?? 640,
@@ -387,59 +387,60 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
387
387
  children: c
388
388
  }), /* @__PURE__ */ C(h.Content, { children: [
389
389
  /* @__PURE__ */ S(h.Item, {
390
- onClick: () => wt(t.column.id, 32),
391
- children: M("dataTable.widenColumn", "Widen column")
390
+ onClick: () => Tt(t.column.id, 32),
391
+ children: N("dataTable.widenColumn", "Widen column")
392
392
  }),
393
393
  /* @__PURE__ */ S(h.Item, {
394
- onClick: () => wt(t.column.id, -32),
395
- children: M("dataTable.narrowColumn", "Narrow column")
394
+ onClick: () => Tt(t.column.id, -32),
395
+ children: N("dataTable.narrowColumn", "Narrow column")
396
396
  }),
397
397
  /* @__PURE__ */ S(h.Item, {
398
398
  onClick: () => t.column.resetSize(),
399
- children: M("dataTable.resetWidth", "Reset width")
399
+ children: N("dataTable.resetWidth", "Reset width")
400
400
  })
401
401
  ] })] }) : c
402
402
  }, t.id);
403
403
  };
404
404
  return /* @__PURE__ */ C("div", {
405
405
  ref: (e) => {
406
- L.current = e, typeof A == "function" ? A(e) : A && (A.current = e);
406
+ R.current = e, typeof j == "function" ? j(e) : j && (j.current = e);
407
407
  },
408
- className: e("relative w-full min-w-0", !j && !Ke && "px-24", ze),
408
+ className: e("relative w-full min-w-0", !M && !Ge && "px-24", Re),
409
409
  children: [/* @__PURE__ */ C("div", {
410
410
  role: Z ? "grid" : "table",
411
- "aria-label": Ue,
412
- "aria-rowcount": W.length + 1,
411
+ "aria-label": He,
412
+ "aria-rowcount": W.length + +!_t,
413
413
  "aria-multiselectable": f || void 0,
414
414
  "aria-busy": D || void 0,
415
- className: e("w-full overflow-clip", j && "rounded-group bg-raised shadow-xs"),
415
+ className: e("w-full overflow-clip", M && "rounded-group bg-raised shadow-xs"),
416
416
  children: [/* @__PURE__ */ S("div", {
417
- ref: R,
417
+ ref: z,
418
418
  role: "rowgroup",
419
+ hidden: _t,
419
420
  className: e("sticky top-0 z-20 overflow-hidden", Y ? "bg-raised" : "bg-panel"),
420
- onKeyDown: Tt,
421
+ onKeyDown: Et,
421
422
  onFocus: (e) => {
422
- let t = E(R.current).indexOf(e.target);
423
- t < 0 || (P.current = null, N("head"), tt(t));
423
+ let t = E(z.current).indexOf(e.target);
424
+ t < 0 || (F.current = null, P("head"), et(t));
424
425
  },
425
426
  onScroll: (e) => {
426
- z.current && z.current.scrollLeft !== e.currentTarget.scrollLeft && (z.current.scrollLeft = e.currentTarget.scrollLeft);
427
+ B.current && B.current.scrollLeft !== e.currentTarget.scrollLeft && (B.current.scrollLeft = e.currentTarget.scrollLeft);
427
428
  },
428
- children: I.getHeaderGroups().map((e) => /* @__PURE__ */ S("div", {
429
+ children: L.getHeaderGroups().map((e) => /* @__PURE__ */ S("div", {
429
430
  role: "row",
430
431
  "aria-rowindex": 1,
431
432
  className: "grid h-36 hairline-b-strong",
432
433
  style: U,
433
- children: e.headers.filter((e) => !V.has(e.column.id)).map(Nt)
434
+ children: e.headers.filter((e) => !V.has(e.column.id)).map(Pt)
434
435
  }, e.id))
435
436
  }), /* @__PURE__ */ S("div", {
436
- ref: z,
437
+ ref: B,
437
438
  role: "rowgroup",
438
439
  className: "overflow-x-auto scrollbar-quiet scroll-fade-x",
439
440
  onScroll: (e) => {
440
- R.current && R.current.scrollLeft !== e.currentTarget.scrollLeft && (R.current.scrollLeft = e.currentTarget.scrollLeft);
441
+ z.current && z.current.scrollLeft !== e.currentTarget.scrollLeft && (z.current.scrollLeft = e.currentTarget.scrollLeft);
441
442
  },
442
- children: Ne ? /* @__PURE__ */ S("div", {
443
+ children: O ? /* @__PURE__ */ S("div", {
443
444
  role: "row",
444
445
  children: /* @__PURE__ */ S("div", {
445
446
  role: Q,
@@ -449,12 +450,12 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
449
450
  role: "alert",
450
451
  children: /* @__PURE__ */ S(ie, {
451
452
  size: "compact",
452
- title: M("dataTable.loadFailed", "Couldn't load these rows"),
453
- ...O ? {} : { description: M("dataTable.reloadToRetry", "Reload the page to try again.") },
454
- actions: O && /* @__PURE__ */ S(ee, {
453
+ title: N("dataTable.loadFailed", "Couldn't load these rows"),
454
+ ...k ? {} : { description: N("dataTable.reloadToRetry", "Reload the page to try again.") },
455
+ actions: k && /* @__PURE__ */ S(ee, {
455
456
  size: "sm",
456
- onClick: O,
457
- children: M("dataTable.tryAgain", "Try again")
457
+ onClick: k,
458
+ children: N("dataTable.tryAgain", "Try again")
458
459
  })
459
460
  })
460
461
  })
@@ -477,39 +478,39 @@ function Me({ data: a, columns: o, getRowId: s, density: c = "default", onRowCli
477
478
  role: Q,
478
479
  "aria-colspan": H.length,
479
480
  className: "block",
480
- children: k ?? /* @__PURE__ */ S(ie, {
481
+ children: A ?? /* @__PURE__ */ S(ie, {
481
482
  size: "compact",
482
- title: M("dataTable.noRows", "No rows")
483
+ title: N("dataTable.noRows", "No rows")
483
484
  })
484
485
  })
485
486
  }) : G ? /* @__PURE__ */ S("div", {
486
487
  className: "relative",
487
488
  style: { height: q.getTotalSize() },
488
- children: q.getVirtualItems().map((e) => jt(W[e.index], e.index, {
489
+ children: q.getVirtualItems().map((e) => Mt(W[e.index], e.index, {
489
490
  position: "absolute",
490
491
  top: 0,
491
492
  left: 0,
492
- transform: `translateY(${Math.round(e.start - vt)}px)`
493
+ transform: `translateY(${Math.round(e.start - yt)}px)`
493
494
  }))
494
- }) : W.map((e, t) => jt(e, t))
495
+ }) : W.map((e, t) => Mt(e, t))
495
496
  })]
496
497
  }), /* @__PURE__ */ S(re, {
497
498
  variant: "load-more",
498
- hasMore: !!Pe,
499
- loading: Fe,
500
- onLoadMore: Ie
499
+ hasMore: !!Ne,
500
+ loading: Pe,
501
+ onLoadMore: Fe
501
502
  })]
502
503
  });
503
504
  }
504
505
  var D = /* @__PURE__ */ de(Me);
505
506
  process.env.NODE_ENV !== "production" && (D.displayName = "DataTable");
506
- var Ne = D;
507
+ var O = D;
507
508
  //#endregion
508
509
  //#region src/components/data-table/columns.tsx
509
- function O(e) {
510
+ function k(e) {
510
511
  return w.add(e), e;
511
512
  }
512
- function k(e, t, n, r = {}, i) {
513
+ function A(e, t, n, r = {}, i) {
513
514
  return {
514
515
  id: e.id,
515
516
  header: () => e.header,
@@ -526,7 +527,7 @@ function k(e, t, n, r = {}, i) {
526
527
  }
527
528
  };
528
529
  }
529
- function Pe({ value: e }) {
530
+ function Ne({ value: e }) {
530
531
  let t = i()("dataTable.tokenCount", "{count} tokens", { count: s(e) });
531
532
  return /* @__PURE__ */ S(f, {
532
533
  content: t,
@@ -539,7 +540,7 @@ function Pe({ value: e }) {
539
540
  })] })
540
541
  });
541
542
  }
542
- function Fe({ value: e, now: t }) {
543
+ function Pe({ value: e, now: t }) {
543
544
  let n = a(e, {
544
545
  time: !0,
545
546
  seconds: !0
@@ -562,32 +563,32 @@ function Fe({ value: e, now: t }) {
562
563
  })
563
564
  });
564
565
  }
565
- var Ie = {
566
- text: (e, t) => k(e, t, (e) => e, { text: (e) => t(e) }),
567
- mono: (e, t) => k(e, t, (e) => e, {
566
+ var Fe = {
567
+ text: (e, t) => A(e, t, (e) => e, { text: (e) => t(e) }),
568
+ mono: (e, t) => A(e, t, (e) => e, {
568
569
  mono: !0,
569
570
  text: (e) => t(e)
570
571
  }),
571
- number: (e, t) => k(e, t, (e) => s(e), { align: "end" }),
572
- money: (e, t, n = {}) => k(e, t, (e) => u(e, n.decimals === void 0 ? {} : { decimals: n.decimals }), {
572
+ number: (e, t) => A(e, t, (e) => s(e), { align: "end" }),
573
+ money: (e, t, n = {}) => A(e, t, (e) => u(e, n.decimals === void 0 ? {} : { decimals: n.decimals }), {
573
574
  align: "end",
574
575
  mono: !1
575
576
  }, (e, t, n) => Number(e.getValue(n)) - Number(t.getValue(n))),
576
- tokens: (e, t) => k(e, t, (e) => /* @__PURE__ */ S(Pe, { value: e }), { align: "end" }),
577
- duration: (e, t) => k(e, t, (e) => o(e), { align: "end" }),
578
- date: (e, t) => O(k(e, t, (e) => /* @__PURE__ */ S("time", {
577
+ tokens: (e, t) => A(e, t, (e) => /* @__PURE__ */ S(Ne, { value: e }), { align: "end" }),
578
+ duration: (e, t) => A(e, t, (e) => o(e), { align: "end" }),
579
+ date: (e, t) => k(A(e, t, (e) => /* @__PURE__ */ S("time", {
579
580
  dateTime: new Date(e).toISOString(),
580
581
  children: a(e, { time: !0 })
581
582
  }), { text: (e) => a(t(e), { time: !0 }) }, "datetime")),
582
- relative: (e, t, n = {}) => O(k(e, t, (e) => /* @__PURE__ */ S(Fe, {
583
+ relative: (e, t, n = {}) => k(A(e, t, (e) => /* @__PURE__ */ S(Pe, {
583
584
  value: e,
584
585
  now: n.now ?? Date.now()
585
586
  }), { text: (e) => a(t(e), { time: !0 }) }, (e, t, n) => new Date(e.getValue(n)).getTime() - new Date(t.getValue(n)).getTime())),
586
- status: (e, t) => k(e, t, (e) => /* @__PURE__ */ S(_, {
587
+ status: (e, t) => A(e, t, (e) => /* @__PURE__ */ S(_, {
587
588
  tone: e.tone,
588
589
  children: e.label
589
590
  }), { text: void 0 }),
590
- avatar: (e, t) => k(e, t, (e) => /* @__PURE__ */ C("span", {
591
+ avatar: (e, t) => A(e, t, (e) => /* @__PURE__ */ C("span", {
591
592
  className: "inline-flex min-w-0 items-center gap-8",
592
593
  children: [/* @__PURE__ */ S(v, {
593
594
  name: e.name,
@@ -596,9 +597,9 @@ var Ie = {
596
597
  decorative: !0
597
598
  }), /* @__PURE__ */ S(g, { children: e.name })]
598
599
  }), { text: (e) => t(e).name }),
599
- custom: (e, t, n, r = {}) => k(e, t, n, r)
600
+ custom: (e, t, n, r = {}) => A(e, t, n, r)
600
601
  };
601
602
  //#endregion
602
- export { T as i, Ne as n, xe as r, Ie as t };
603
+ export { T as i, O as n, xe as r, Fe as t };
603
604
 
604
- //# sourceMappingURL=data-table-FFbcwv22.js.map
605
+ //# sourceMappingURL=data-table-5LgGiHdW.js.map