@mechane-ai/elements 0.17.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -125,7 +125,7 @@ function de({ end: e, viewport: t, onEndReached: n, content: r }) {
125
125
  ]);
126
126
  }
127
127
  // packages/collections/src/data-table.tsx
128
- var fe = E({}), pe = 76, j = d.compactTable.slice(7), me = "a, button, input, select, textarea, label, summary, [role=\"button\"], [role=\"link\"], [role=\"switch\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"combobox\"], [role=\"slider\"], [role=\"spinbutton\"], [role=\"textbox\"], [role=\"tab\"], [role^=\"menuitem\"], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]:not([tabindex=\"-1\"])", he = /* @__PURE__ */ new Map([["ArrowUp", -1], ["ArrowDown", 1]]), M = {
128
+ var fe = E({}), pe = 76, j = d.compactTable.slice(7), me = /* @__PURE__ */ new Map([["ArrowUp", -1], ["ArrowDown", 1]]), M = {
129
129
  kmVPX3: "x1717udv",
130
130
  kMzoRj: "xc342km",
131
131
  $$css: !0
@@ -290,7 +290,7 @@ var fe = E({}), pe = 76, j = d.compactTable.slice(7), me = "a, button, input, se
290
290
  isFlexible: !1,
291
291
  shouldTruncate: !1
292
292
  }
293
- }, ge = {
293
+ }, he = {
294
294
  fixed: N.content,
295
295
  content: N.contentCell
296
296
  }, F = {
@@ -300,14 +300,14 @@ var fe = E({}), pe = 76, j = d.compactTable.slice(7), me = "a, button, input, se
300
300
  number: N.end,
301
301
  timestamp: N.end,
302
302
  actions: N.end
303
- }, I = {
303
+ }, ge = {
304
304
  content: N.content,
305
305
  fill: N.fillFrame
306
- }, L = {
306
+ }, I = {
307
307
  content: N.content,
308
308
  fill: N.fillViewport
309
309
  };
310
- function _e(e) {
310
+ function L(e) {
311
311
  return e.map((e) => {
312
312
  let t = P[e.role], n = e.width ?? (t.isFlexible ? void 0 : t.minimumWidth);
313
313
  return {
@@ -316,34 +316,34 @@ function _e(e) {
316
316
  };
317
317
  });
318
318
  }
319
- function ve(e, t = 0) {
319
+ function R(e, t = 0) {
320
320
  return {
321
321
  minimumWidth: e.reduce((e, t) => e + (t.width ?? P[t.role].minimumWidth), t),
322
322
  compactWidth: e.filter((e) => e.isSecondary !== !0).reduce((e, t) => e + (t.width ?? P[t.role].minimumWidth), t)
323
323
  };
324
324
  }
325
- function ye(e) {
325
+ function _e(e) {
326
326
  let t = globalThis.matchMedia(j);
327
327
  return t.addEventListener("change", e), () => t.removeEventListener("change", e);
328
328
  }
329
- function be() {
329
+ function ve() {
330
330
  return globalThis.matchMedia(j).matches;
331
331
  }
332
- function xe({ columns: e, canSelect: t = !1 }) {
332
+ function ye({ columns: e, canSelect: t = !1 }) {
333
333
  return /* @__PURE__ */ x("colgroup", { children: [t && /* @__PURE__ */ b("col", { className: "x1d7z9mz xeuugli x1dc62k6" }), e.map((e) => /* @__PURE__ */ b("col", { ...p.props(e.width !== void 0 && N.width(e.width), e.isSecondary === !0 && N.secondary) }, e.id))] });
334
334
  }
335
- function R({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHeaders: r = !1 }) {
336
- let i = _e(e), { minimumWidth: a, compactWidth: o } = ve(i);
335
+ function z({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHeaders: r = !1 }) {
336
+ let i = L(e), { minimumWidth: a, compactWidth: o } = R(i);
337
337
  return /* @__PURE__ */ b("div", {
338
338
  "aria-hidden": !0,
339
339
  inert: !0,
340
- ...p.props(N.frame, I[t], N.placeholder),
340
+ ...p.props(N.frame, ge[t], N.placeholder),
341
341
  children: /* @__PURE__ */ b("div", {
342
- ...p.props(N.viewport, L[t]),
342
+ ...p.props(N.viewport, I[t]),
343
343
  children: /* @__PURE__ */ x("table", {
344
344
  ...p.props(N.table, N.fixed, N.minimumWidth(a, o)),
345
345
  children: [
346
- /* @__PURE__ */ b(xe, { columns: i }),
346
+ /* @__PURE__ */ b(ye, { columns: i }),
347
347
  /* @__PURE__ */ b("thead", {
348
348
  ...p.props(r && l.hidden),
349
349
  children: /* @__PURE__ */ b("tr", { children: i.map((e) => /* @__PURE__ */ b("th", {
@@ -359,10 +359,10 @@ function R({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHead
359
359
  "second",
360
360
  "third"
361
361
  ].map((e) => /* @__PURE__ */ b("tr", {
362
- className: "x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6",
362
+ className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6",
363
363
  children: i.map((e) => /* @__PURE__ */ b("td", {
364
- ...p.props(N.cell, ge[n], F[e.role], e.width !== void 0 && N.width(e.width), e.isSecondary === !0 && N.secondary),
365
- children: /* @__PURE__ */ b(H, {
364
+ ...p.props(N.cell, he[n], F[e.role], e.width !== void 0 && N.width(e.width), e.isSecondary === !0 && N.secondary),
365
+ children: /* @__PURE__ */ b(U, {
366
366
  role: e.role,
367
367
  isFixed: n === "fixed",
368
368
  shouldTruncate: void 0,
@@ -375,7 +375,7 @@ function R({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHead
375
375
  })
376
376
  });
377
377
  }
378
- function z({ children: e, leading: t, isDecorative: n = !1 }) {
378
+ function B({ children: e, leading: t, isDecorative: n = !1 }) {
379
379
  return /* @__PURE__ */ x("span", {
380
380
  "aria-hidden": n || void 0,
381
381
  inert: n || void 0,
@@ -390,8 +390,8 @@ function z({ children: e, leading: t, isDecorative: n = !1 }) {
390
390
  })]
391
391
  });
392
392
  }
393
- function B({ children: e, secondary: t, leading: n, trailing: r }) {
394
- return /* @__PURE__ */ x(z, {
393
+ function V({ children: e, secondary: t, leading: n, trailing: r }) {
394
+ return /* @__PURE__ */ x(B, {
395
395
  leading: n,
396
396
  children: [/* @__PURE__ */ x("span", {
397
397
  className: "x78zum5 x6s0dn4 x1hnptsi xeuugli",
@@ -410,8 +410,8 @@ function B({ children: e, secondary: t, leading: n, trailing: r }) {
410
410
  })]
411
411
  });
412
412
  }
413
- function V({ leading: e, isSecondary: t = !1 }) {
414
- return /* @__PURE__ */ x(z, {
413
+ function H({ leading: e, isSecondary: t = !1 }) {
414
+ return /* @__PURE__ */ x(B, {
415
415
  leading: e,
416
416
  isDecorative: !0,
417
417
  children: [/* @__PURE__ */ b("span", {
@@ -423,8 +423,8 @@ function V({ leading: e, isSecondary: t = !1 }) {
423
423
  })]
424
424
  });
425
425
  }
426
- function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, onSortChange: s, selectedIds: c, onSelectionChange: d, selectionLabel: f, rowAction: m, activeRowId: y, focusRowId: S, hideCaption: C = !1, hideHeaders: w = !1, rowSizing: T = "fixed", window: E, endContent: D, onEndReached: O, footer: k }) {
427
- let A = te(() => _e(t), [t]), ue = ne(ye, be, () => !1), j = te(() => {
426
+ function be({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, onSortChange: s, selectedIds: c, onSelectionChange: d, selectionLabel: f, rowAction: m, activeRowId: y, focusRowId: S, hideCaption: C = !1, hideHeaders: w = !1, rowSizing: T = "fixed", window: E, endContent: D, onEndReached: O, footer: k }) {
427
+ let A = te(() => L(t), [t]), ue = ne(_e, ve, () => !1), j = te(() => {
428
428
  let e = oe();
429
429
  return e.columns(A.map((t) => e.display({
430
430
  id: t.id,
@@ -435,27 +435,27 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
435
435
  columns: j,
436
436
  data: e,
437
437
  getRowId: n
438
- }), P = _(null), R = _(null), z = _(null), B = _(null), [V, Se] = v(0), [we, W] = v(), G = _(void 0), K = _(void 0), q = e.findIndex((e) => n(e) === we), J = A.findIndex((e) => e.role === "primary" && e.isSecondary !== !0), Y = J === -1 ? A.findIndex((e) => e.isSecondary !== !0) : J, X = typeof E?.height == "string" ? E.height : "content";
438
+ }), P = _(null), z = _(null), B = _(null), V = _(null), [H, be] = v(0), [W, G] = v(), K = _(void 0), q = _(void 0), J = e.findIndex((e) => n(e) === W), Y = A.findIndex((e) => e.role === "primary" && e.isSecondary !== !0), Se = Y === -1 ? A.findIndex((e) => e.isSecondary !== !0) : Y, X = typeof E?.height == "string" ? E.height : "content";
439
439
  g(() => {
440
440
  if (S === void 0) {
441
- K.current = void 0;
441
+ q.current = void 0;
442
442
  return;
443
443
  }
444
- if (K.current === S) return;
444
+ if (q.current === S) return;
445
445
  let e = P.current?.querySelector(`[data-row-id="${CSS.escape(S)}"] [data-row-action]`);
446
446
  if (e == null) return;
447
447
  let t = requestAnimationFrame(() => {
448
- e.focus({ preventScroll: !0 }), K.current = S;
448
+ e.focus({ preventScroll: !0 }), q.current = S;
449
449
  });
450
450
  return () => cancelAnimationFrame(t);
451
451
  }, [e, S]), de({
452
- end: R,
452
+ end: z,
453
453
  onEndReached: E === void 0 ? O : void 0,
454
454
  content: e.length
455
455
  }), h(() => {
456
- let e = z.current, t = B.current;
456
+ let e = B.current, t = V.current;
457
457
  if (E === void 0 || e === null || t === null) return;
458
- let n = new ResizeObserver(() => Se(e.offsetHeight + t.offsetHeight));
458
+ let n = new ResizeObserver(() => be(e.offsetHeight + t.offsetHeight));
459
459
  return n.observe(e), n.observe(t), () => n.disconnect();
460
460
  }, [
461
461
  E,
@@ -472,19 +472,19 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
472
472
  return n(r);
473
473
  },
474
474
  estimateSize: () => T === "fixed" ? u.rowHeight : E?.estimatedRowHeight ?? u.rowHeight,
475
- scrollMargin: V,
476
- scrollPaddingStart: V,
475
+ scrollMargin: H,
476
+ scrollPaddingStart: H,
477
477
  overscan: 6,
478
478
  rangeExtractor: (t) => {
479
479
  let n = ce(t);
480
- return q === -1 ? n : [.../* @__PURE__ */ new Set([
480
+ return J === -1 ? n : [.../* @__PURE__ */ new Set([
481
481
  ...n,
482
- q - 1,
483
- q,
484
- q + 1
482
+ J - 1,
483
+ J,
484
+ J + 1
485
485
  ])].filter((t) => t >= 0 && t < e.length).toSorted((e, t) => e - t);
486
486
  }
487
- }), Te = E === void 0 ? M.getRowModel().rows.map((e, t) => ({
487
+ }), Ce = E === void 0 ? M.getRowModel().rows.map((e, t) => ({
488
488
  row: e,
489
489
  index: t,
490
490
  spacerHeight: 0
@@ -493,7 +493,7 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
493
493
  return r === void 0 ? [] : [{
494
494
  row: r,
495
495
  index: e.index,
496
- spacerHeight: e.start - (n[t - 1]?.end ?? V)
496
+ spacerHeight: e.start - (n[t - 1]?.end ?? H)
497
497
  }];
498
498
  }), Q = E !== void 0 && (e.length === 0 || Z.range?.endIndex === e.length - 1);
499
499
  h(() => {
@@ -503,43 +503,43 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
503
503
  O,
504
504
  e.length
505
505
  ]), g(() => {
506
- if (G.current === void 0) return;
507
- let e = Array.from(P.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId === G.current)?.querySelector("[data-row-action]");
508
- e != null && (e.focus({ preventScroll: E !== void 0 }), G.current = void 0);
506
+ if (K.current === void 0) return;
507
+ let e = Array.from(P.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId === K.current)?.querySelector("[data-row-action]");
508
+ e != null && (e.focus({ preventScroll: E !== void 0 }), K.current = void 0);
509
509
  });
510
- function Ee(t, r) {
510
+ function we(t, r) {
511
511
  let i = t.metaKey || t.ctrlKey, a = t.altKey || t.shiftKey;
512
512
  if (i || a) return;
513
- let o = he.get(t.key);
513
+ let o = me.get(t.key);
514
514
  if (o === void 0) return;
515
515
  t.preventDefault();
516
516
  let s = r + o, c = e[s];
517
- c !== void 0 && (G.current = n(c), W(G.current), E !== void 0 && Z.scrollToIndex(s, { align: "auto" }));
517
+ c !== void 0 && (K.current = n(c), G(K.current), E !== void 0 && Z.scrollToIndex(s, { align: "auto" }));
518
518
  }
519
- let $ = A.filter((e) => !ue || e.isSecondary !== !0).length + (c === void 0 ? 0 : 1), De = c === void 0 ? 0 : pe, Oe = k != null && typeof k != "boolean", { minimumWidth: ke, compactWidth: Ae } = ve(A, De), je = Z.getTotalSize() - (Z.getVirtualItems().at(-1)?.end ?? V) + V;
519
+ let $ = A.filter((e) => !ue || e.isSecondary !== !0).length + (c === void 0 ? 0 : 1), Te = c === void 0 ? 0 : pe, Ee = k != null && typeof k != "boolean", { minimumWidth: De, compactWidth: Oe } = R(A, Te), ke = Z.getTotalSize() - (Z.getVirtualItems().at(-1)?.end ?? H) + H;
520
520
  return /* @__PURE__ */ x("div", {
521
- ...p.props(N.frame, I[X]),
521
+ ...p.props(N.frame, ge[X]),
522
522
  children: [/* @__PURE__ */ x("div", {
523
523
  ref: P,
524
524
  role: "region",
525
525
  "aria-label": r,
526
526
  tabIndex: 0,
527
- ...p.props(N.viewport, L[X], typeof E?.height == "number" && N.virtual(E.height)),
527
+ ...p.props(N.viewport, I[X], typeof E?.height == "number" && N.virtual(E.height)),
528
528
  children: [/* @__PURE__ */ x("table", {
529
529
  "aria-rowcount": E === void 0 ? void 0 : Math.max(1, e.length) + 1,
530
- ...p.props(N.table, N.fixed, N.minimumWidth(ke, Ae)),
530
+ ...p.props(N.table, N.fixed, N.minimumWidth(De, Oe)),
531
531
  children: [
532
532
  /* @__PURE__ */ b("caption", {
533
- ref: z,
533
+ ref: B,
534
534
  ...p.props(N.caption, C && l.hidden),
535
535
  children: r
536
536
  }),
537
- /* @__PURE__ */ b(xe, {
537
+ /* @__PURE__ */ b(ye, {
538
538
  columns: A,
539
539
  canSelect: c !== void 0
540
540
  }),
541
541
  /* @__PURE__ */ b("thead", {
542
- ref: B,
542
+ ref: V,
543
543
  ...p.props(w && l.hidden),
544
544
  children: /* @__PURE__ */ x("tr", { children: [c !== void 0 && /* @__PURE__ */ b("th", {
545
545
  scope: "col",
@@ -584,10 +584,10 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
584
584
  }),
585
585
  /* @__PURE__ */ x("tbody", {
586
586
  onBlur: (e) => {
587
- e.currentTarget.contains(e.relatedTarget) || W(void 0);
587
+ e.currentTarget.contains(e.relatedTarget) || G(void 0);
588
588
  },
589
589
  children: [
590
- Te.map(({ row: e, index: t, spacerHeight: n }) => /* @__PURE__ */ x(ee, { children: [n > 0 && /* @__PURE__ */ b("tr", {
590
+ Ce.map(({ row: e, index: t, spacerHeight: n }) => /* @__PURE__ */ x(ee, { children: [n > 0 && /* @__PURE__ */ b("tr", {
591
591
  "aria-hidden": "true",
592
592
  children: /* @__PURE__ */ b("td", {
593
593
  colSpan: $,
@@ -598,20 +598,15 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
598
598
  "data-row-id": e.id,
599
599
  "aria-rowindex": E === void 0 ? void 0 : t + 2,
600
600
  ref: E === void 0 || T === "fixed" ? void 0 : Z.measureElement,
601
- onFocus: () => W(e.id),
602
- onClick: (e) => {
603
- if (m === void 0 || !U(e) || e.target instanceof Element && e.target.closest(me) !== null) return;
604
- let t = e.currentTarget.querySelector("[data-row-action]");
605
- t?.focus({ preventScroll: !0 }), t?.click();
606
- },
601
+ onFocus: () => G(e.id),
607
602
  ...{
608
- 0: { className: "x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6" },
609
- 2: { className: "x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1ypdohk x1ecmtor" },
610
- 1: { className: "x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1r8u7ye" },
611
- 3: { className: "x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1ypdohk x1ecmtor x1r8u7ye" }
603
+ 0: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6" },
604
+ 2: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1ypdohk x1ecmtor" },
605
+ 1: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1r8u7ye" },
606
+ 3: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1ypdohk x1ecmtor x1r8u7ye" }
612
607
  }[(m !== void 0) << 1 | (c?.has(e.id) === !0 || y === e.id)],
613
608
  children: [c !== void 0 && /* @__PURE__ */ b("td", {
614
- className: "x9f619 xt970qd xxymvpz xj0a0fe x1d7z9mz xeuugli x1dc62k6",
609
+ className: "x9f619 xt970qd xxymvpz xj0a0fe x1d7z9mz xeuugli x1dc62k6 x1n2onr6 x1vjfegm",
615
610
  children: /* @__PURE__ */ b(a.Root, {
616
611
  "aria-label": f(e.original),
617
612
  checked: c.has(e.id),
@@ -622,19 +617,19 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
622
617
  children: /* @__PURE__ */ b(a.Indicator, {})
623
618
  })
624
619
  }), A.map((n, r) => /* @__PURE__ */ b("td", {
625
- ...p.props(N.cell, ge[T], F[n.role], n.width !== void 0 && N.width(n.width), n.isSecondary === !0 && N.secondary),
626
- children: m !== void 0 && r === Y ? /* @__PURE__ */ b(Ce, {
620
+ ...p.props(N.cell, he[T], F[n.role], n.width !== void 0 && N.width(n.width), n.isSecondary === !0 && N.secondary),
621
+ children: m !== void 0 && r === Se ? /* @__PURE__ */ b(xe, {
627
622
  row: e.original,
628
623
  action: m,
629
624
  isActive: y === e.id,
630
- onKeyDown: (e) => Ee(e, t),
631
- children: /* @__PURE__ */ b(H, {
625
+ onKeyDown: (e) => we(e, t),
626
+ children: /* @__PURE__ */ b(U, {
632
627
  role: n.role,
633
628
  isFixed: T === "fixed",
634
629
  shouldTruncate: n.shouldTruncate,
635
630
  children: n.cell(e.original)
636
631
  })
637
- }) : /* @__PURE__ */ b(H, {
632
+ }) : /* @__PURE__ */ b(U, {
638
633
  role: n.role,
639
634
  isFixed: T === "fixed",
640
635
  shouldTruncate: n.shouldTruncate,
@@ -642,11 +637,11 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
642
637
  })
643
638
  }, n.id))]
644
639
  })] }, e.id)),
645
- E !== void 0 && je > 0 && /* @__PURE__ */ b("tr", {
640
+ E !== void 0 && ke > 0 && /* @__PURE__ */ b("tr", {
646
641
  "aria-hidden": "true",
647
642
  children: /* @__PURE__ */ b("td", {
648
643
  colSpan: $,
649
- ...p.props(N.spacer(je))
644
+ ...p.props(N.spacer(ke))
650
645
  })
651
646
  }),
652
647
  e.length === 0 && /* @__PURE__ */ b("tr", { children: /* @__PURE__ */ b("td", {
@@ -658,20 +653,20 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
658
653
  })
659
654
  ]
660
655
  }), /* @__PURE__ */ b("div", {
661
- ref: R,
656
+ ref: z,
662
657
  ...{
663
658
  0: {},
664
659
  1: { className: "xid9utz xg7ukam x153jb6y xy8obcc xas2l8k x15x95ik x1az1eml" }
665
660
  }[D !== void 0 | 0],
666
661
  children: D
667
662
  })]
668
- }), Oe && /* @__PURE__ */ b("div", {
663
+ }), Ee && /* @__PURE__ */ b("div", {
669
664
  className: "xg7ukam x178xt8z x13fuv20 xhjagg4",
670
665
  children: k
671
666
  })]
672
667
  });
673
668
  }
674
- function H({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
669
+ function U({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
675
670
  let i = P[e], a = t && i.shouldTruncate, o = typeof r == "string" && (n ?? a);
676
671
  return /* @__PURE__ */ b("span", {
677
672
  ...{
@@ -681,25 +676,25 @@ function H({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
681
676
  children: /* @__PURE__ */ b("span", {
682
677
  title: typeof r == "string" ? r : void 0,
683
678
  ...{
684
- 0: { className: "x1lliihq xeuugli xh8yej3 x193iq5w" },
685
- 4: { className: "x1lliihq xeuugli xh8yej3 x193iq5w x1l6neo7" },
686
- 2: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xuxw1ft" },
687
- 6: { className: "x1lliihq xeuugli xh8yej3 x193iq5w x1l6neo7 xuxw1ft" },
688
- 1: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xb3r6kr xuxw1ft xlyipyv" },
689
- 5: { className: "x1lliihq xeuugli xh8yej3 x193iq5w x1l6neo7 xb3r6kr xuxw1ft xlyipyv" },
690
- 3: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xb3r6kr xuxw1ft xlyipyv" },
691
- 7: { className: "x1lliihq xeuugli xh8yej3 x193iq5w x1l6neo7 xb3r6kr xuxw1ft xlyipyv" }
679
+ 0: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890" },
680
+ 4: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 x1l6neo7" },
681
+ 2: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 xuxw1ft" },
682
+ 6: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 x1l6neo7 xuxw1ft" },
683
+ 1: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 xb3r6kr xuxw1ft xlyipyv" },
684
+ 5: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 x1l6neo7 xb3r6kr xuxw1ft xlyipyv" },
685
+ 3: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 xb3r6kr xuxw1ft xlyipyv" },
686
+ 7: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 x1l6neo7 xb3r6kr xuxw1ft xlyipyv" }
692
687
  }[!!t << 2 | !(!t || i.shouldTruncate) << 1 | !!o],
693
688
  children: r
694
689
  })
695
690
  });
696
691
  }
697
- function U(e) {
692
+ function W(e) {
698
693
  if (e.defaultPrevented || e.button !== 0) return !1;
699
694
  let t = e.metaKey || e.ctrlKey, n = e.altKey || e.shiftKey;
700
695
  return t || n ? !1 : e.detail === 0 || e.currentTarget.ownerDocument.getSelection()?.isCollapsed !== !1;
701
696
  }
702
- function Ce({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
697
+ function xe({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
703
698
  let a = t.label?.(e), o = t.href === void 0 ? /* @__PURE__ */ b("button", {
704
699
  type: "button",
705
700
  "aria-label": a,
@@ -707,9 +702,9 @@ function Ce({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
707
702
  "data-row-action": !0,
708
703
  onKeyDown: i,
709
704
  onClick: (n) => {
710
- U(n) && t.onActivate(e);
705
+ W(n) && t.onActivate(e);
711
706
  },
712
- className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli x17tes2r x17oiadl x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x13qnu6 x9v5kkp x19rmrnh x7s97pk",
707
+ className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli x17tes2r x17oiadl x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x1t137rt x1s928wv x1j6awrg xarstr8 x11q50lq xa2q2qx x1x5eltu x1jdy9wv",
713
708
  children: r
714
709
  }) : /* @__PURE__ */ b("a", {
715
710
  href: t.href(e),
@@ -717,9 +712,9 @@ function Ce({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
717
712
  "data-row-action": !0,
718
713
  onKeyDown: i,
719
714
  onClick: (n) => {
720
- t.onActivate !== void 0 && U(n) && (n.preventDefault(), t.onActivate(e));
715
+ t.onActivate !== void 0 && W(n) && (n.preventDefault(), t.onActivate(e));
721
716
  },
722
- className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli x17tes2r x17oiadl x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x13qnu6 x9v5kkp x19rmrnh x7s97pk",
717
+ className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli x17tes2r x17oiadl x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x1t137rt x1s928wv x1j6awrg xarstr8 x11q50lq xa2q2qx x1x5eltu x1jdy9wv",
723
718
  children: r
724
719
  });
725
720
  return a === void 0 ? o : /* @__PURE__ */ x(s.Root, { children: [/* @__PURE__ */ b(s.Trigger, { render: o }), /* @__PURE__ */ b(s.Portal, { children: /* @__PURE__ */ b(s.Positioner, {
@@ -729,7 +724,7 @@ function Ce({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
729
724
  }) })] });
730
725
  }
731
726
  // packages/collections/src/collection-scroll.tsx
732
- function we(r) {
727
+ function G(r) {
733
728
  switch (r.status) {
734
729
  case "loading": return /* @__PURE__ */ b(t, {
735
730
  role: "status",
@@ -759,7 +754,7 @@ function we(r) {
759
754
  });
760
755
  }
761
756
  }
762
- function W({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, endPosition: i = "end", label: a = "Collection" }) {
757
+ function K({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, endPosition: i = "end", label: a = "Collection" }) {
763
758
  let o = _(null), s = _(null);
764
759
  de({
765
760
  end: s,
@@ -792,11 +787,11 @@ function W({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, en
792
787
  });
793
788
  }
794
789
  // packages/collections/src/inspector.tsx
795
- var G = 860;
796
- function K({ master: t, detail: n, label: r, masterLabel: i, revealKey: a, returnFocusRef: o, ...s }) {
790
+ var q = 860;
791
+ function J({ master: t, detail: n, label: r, masterLabel: i, revealKey: a, returnFocusRef: o, ...s }) {
797
792
  let c = _(null), l = _(null), u = _(null);
798
793
  g(() => {
799
- a !== void 0 && c.current !== null && u.current !== null && c.current.clientWidth <= G && (u.current.focus({ preventScroll: !0 }), u.current.scrollIntoView({
794
+ a !== void 0 && c.current !== null && u.current !== null && c.current.clientWidth <= q && (u.current.focus({ preventScroll: !0 }), u.current.scrollIntoView({
800
795
  block: "start",
801
796
  behavior: "instant"
802
797
  }));
@@ -837,7 +832,7 @@ function K({ master: t, detail: n, label: r, masterLabel: i, revealKey: a, retur
837
832
  })
838
833
  });
839
834
  }
840
- function q({ items: e, ...t }) {
835
+ function Y({ items: e, ...t }) {
841
836
  return /* @__PURE__ */ b("dl", {
842
837
  ...f({ className: "x1ghz6dp xrvj5dj xezdspq x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
843
838
  children: e.map(({ label: e, value: t }) => /* @__PURE__ */ x("div", {
@@ -853,7 +848,7 @@ function q({ items: e, ...t }) {
853
848
  });
854
849
  }
855
850
  // packages/collections/src/list-footer.tsx
856
- function J({ children: e, actions: t, ...n }) {
851
+ function Se({ children: e, actions: t, ...n }) {
857
852
  return /* @__PURE__ */ x("div", {
858
853
  ...f({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak xeuugli x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
859
854
  children: [/* @__PURE__ */ b("div", {
@@ -866,7 +861,7 @@ function J({ children: e, actions: t, ...n }) {
866
861
  });
867
862
  }
868
863
  // packages/collections/src/metrics.tsx
869
- var Y = {
864
+ var X = {
870
865
  grid: {
871
866
  k1xSpc: "x78zum5",
872
867
  kwnvtZ: "x1a02dak",
@@ -884,14 +879,14 @@ var Y = {
884
879
  kogj98: "x1ghz6dp",
885
880
  $$css: !0
886
881
  }
887
- }, X = {
888
- inline: Y.grid,
889
- columns: Y.columns
882
+ }, Z = {
883
+ inline: X.grid,
884
+ columns: X.columns
890
885
  };
891
- function Z({ layout: e = "inline", ...t }) {
892
- return /* @__PURE__ */ b("dl", { ...f(p.props(X[e]), t) });
886
+ function Ce({ layout: e = "inline", ...t }) {
887
+ return /* @__PURE__ */ b("dl", { ...f(p.props(Z[e]), t) });
893
888
  }
894
- function Te({ label: e, value: t, ...n }) {
889
+ function Q({ label: e, value: t, ...n }) {
895
890
  return /* @__PURE__ */ x("div", {
896
891
  ...f({ className: "x3nfvp2 x1pha0wt x1a02dak xunmzkg xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
897
892
  children: [/* @__PURE__ */ b("dt", {
@@ -904,7 +899,7 @@ function Te({ label: e, value: t, ...n }) {
904
899
  });
905
900
  }
906
901
  // packages/collections/src/timestamp.tsx
907
- function Q({ dateTime: e, label: t, title: n }) {
902
+ function we({ dateTime: e, label: t, title: n }) {
908
903
  return n === void 0 ? /* @__PURE__ */ b("time", {
909
904
  dateTime: e,
910
905
  className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
@@ -920,14 +915,14 @@ function Q({ dateTime: e, label: t, title: n }) {
920
915
  }), /* @__PURE__ */ b(s.Portal, { children: /* @__PURE__ */ b(s.Positioner, { children: /* @__PURE__ */ b(s.Popup, { children: n }) }) })] });
921
916
  }
922
917
  // packages/collections/src/timeline.tsx
923
- function Ee({ label: e, children: t }) {
918
+ function $({ label: e, children: t }) {
924
919
  return /* @__PURE__ */ b("ol", {
925
920
  "aria-label": e,
926
921
  className: "xe8uvvx x1ghz6dp x1717udv xeuugli",
927
922
  children: t
928
923
  });
929
924
  }
930
- function $({ icon: e, title: t, time: n, metadata: i, children: a, details: o, defaultOpen: s = !1 }) {
925
+ function Te({ icon: e, title: t, time: n, metadata: i, children: a, details: o, defaultOpen: s = !1 }) {
931
926
  let [c, l] = v(s), u = /* @__PURE__ */ x("div", {
932
927
  className: "x78zum5 x1pha0wt x1hnptsi x1a02dak xeuugli",
933
928
  children: [/* @__PURE__ */ b("div", {
@@ -969,8 +964,8 @@ function $({ icon: e, title: t, time: n, metadata: i, children: a, details: o, d
969
964
  })]
970
965
  });
971
966
  }
972
- var De = {
973
- Root: Ee,
974
- Item: $
967
+ var Ee = {
968
+ Root: $,
969
+ Item: Te
975
970
  };
976
- export { we as CollectionEnd, ue as CollectionPagination, W as CollectionScroll, O as CollectionToolbar, Se as DataTable, R as DataTablePlaceholder, B as DataTableText, V as DataTableTextPlaceholder, q as Details, A as DisplayOptions, k as FilterChips, K as Inspector, J as ListFooter, Te as Metric, Z as MetricGrid, De as Timeline, Q as Timestamp };
971
+ export { G as CollectionEnd, ue as CollectionPagination, K as CollectionScroll, O as CollectionToolbar, be as DataTable, z as DataTablePlaceholder, V as DataTableText, H as DataTableTextPlaceholder, Y as Details, A as DisplayOptions, k as FilterChips, J as Inspector, Se as ListFooter, Q as Metric, Ce as MetricGrid, Ee as Timeline, we as Timestamp };
package/dist/elements.css CHANGED
@@ -1221,6 +1221,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
1221
1221
  inset-inline-start: 0;
1222
1222
  }
1223
1223
 
1224
+ .xc8icb0 {
1225
+ isolation: isolate;
1226
+ }
1227
+
1224
1228
  .xl56j7k {
1225
1229
  justify-content: center;
1226
1230
  }
@@ -1667,7 +1671,7 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
1667
1671
  white-space: pre-wrap;
1668
1672
  }
1669
1673
 
1670
- .x11ru5tl {
1674
+ .x11ru5tl, .x1vjfegm {
1671
1675
  z-index: 1;
1672
1676
  }
1673
1677
 
@@ -1905,6 +1909,14 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
1905
1909
  padding-inline-end: calc(var(--x1drqizm) + var(--x14tmdi9));
1906
1910
  }
1907
1911
 
1912
+ .xkfz77:has(a, button, input, select, textarea, label, summary, [tabindex], [contenteditable]) {
1913
+ position: relative;
1914
+ }
1915
+
1916
+ .x1ljc890:has(a, button, input, select, textarea, label, summary, [tabindex], [contenteditable]) {
1917
+ z-index: 1;
1918
+ }
1919
+
1908
1920
  .xjl7jj:empty {
1909
1921
  display: none;
1910
1922
  }
@@ -3239,6 +3251,22 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
3239
3251
  inset-inline-start: auto;
3240
3252
  }
3241
3253
 
3254
+ .x1x5eltu:focus-visible:after {
3255
+ outline-color: var(--xzqn2nu);
3256
+ }
3257
+
3258
+ .x1jdy9wv:focus-visible:after {
3259
+ outline-offset: -2px;
3260
+ }
3261
+
3262
+ .xa2q2qx:focus-visible:after {
3263
+ outline-style: solid;
3264
+ }
3265
+
3266
+ .x11q50lq:focus-visible:after {
3267
+ outline-width: var(--xxx3t85);
3268
+ }
3269
+
3242
3270
  .xkt9h7a[data-indeterminate]:before {
3243
3271
  transform: none;
3244
3272
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mechane-ai/elements",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "Elements by Mechane — React components for applications, AI interfaces, and analytical graphics",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {