@mechane-ai/elements 0.17.0 → 0.17.2
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.
- package/README.md +3 -0
- package/dist/collections.js +105 -110
- package/dist/elements.css +29 -1
- package/dist/layout.js +27 -18
- package/dist/packages/layout/src/sidebar.d.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,6 +99,9 @@ Detail titles wrap; list metadata truncates. Sidebar items share contiguous hit
|
|
|
99
99
|
navigation and reserve the divided sidebar footer for persistent account controls. Use
|
|
100
100
|
`SidebarFooter layout="navigation"` for a group of commands; its intrinsic height keeps the scrolling navigation clear.
|
|
101
101
|
|
|
102
|
+
Navigation closes the mobile drawer and preserves focus set by the destination. Use
|
|
103
|
+
`NavigationItem shouldCloseOnActivate={false}` for menu triggers.
|
|
104
|
+
|
|
102
105
|
`AppShell shouldFocus` temporarily hides navigation while retaining its expansion state. `ViewStack.Panel` keeps
|
|
103
106
|
inactive content mounted and measurable but removes it from keyboard and assistive-technology navigation. The
|
|
104
107
|
application owns which view is active and when to unmount it; use this for a draft or reading position that must survive
|
package/dist/collections.js
CHANGED
|
@@ -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 =
|
|
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
|
-
},
|
|
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
|
-
},
|
|
303
|
+
}, ge = {
|
|
304
304
|
content: N.content,
|
|
305
305
|
fill: N.fillFrame
|
|
306
|
-
},
|
|
306
|
+
}, I = {
|
|
307
307
|
content: N.content,
|
|
308
308
|
fill: N.fillViewport
|
|
309
309
|
};
|
|
310
|
-
function
|
|
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
|
|
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
|
|
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
|
|
329
|
+
function ve() {
|
|
330
330
|
return globalThis.matchMedia(j).matches;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
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
|
|
336
|
-
let 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,
|
|
340
|
+
...p.props(N.frame, ge[t], N.placeholder),
|
|
341
341
|
children: /* @__PURE__ */ b("div", {
|
|
342
|
-
...p.props(N.viewport,
|
|
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(
|
|
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,
|
|
365
|
-
children: /* @__PURE__ */ b(
|
|
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
|
|
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
|
|
394
|
-
return /* @__PURE__ */ x(
|
|
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
|
|
414
|
-
return /* @__PURE__ */ x(
|
|
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
|
|
427
|
-
let A = 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),
|
|
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
|
-
|
|
441
|
+
q.current = void 0;
|
|
442
442
|
return;
|
|
443
443
|
}
|
|
444
|
-
if (
|
|
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 }),
|
|
448
|
+
e.focus({ preventScroll: !0 }), q.current = S;
|
|
449
449
|
});
|
|
450
450
|
return () => cancelAnimationFrame(t);
|
|
451
451
|
}, [e, S]), de({
|
|
452
|
-
end:
|
|
452
|
+
end: z,
|
|
453
453
|
onEndReached: E === void 0 ? O : void 0,
|
|
454
454
|
content: e.length
|
|
455
455
|
}), h(() => {
|
|
456
|
-
let e =
|
|
456
|
+
let e = B.current, t = V.current;
|
|
457
457
|
if (E === void 0 || e === null || t === null) return;
|
|
458
|
-
let n = new ResizeObserver(() =>
|
|
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:
|
|
476
|
-
scrollPaddingStart:
|
|
475
|
+
scrollMargin: H,
|
|
476
|
+
scrollPaddingStart: H,
|
|
477
477
|
overscan: 6,
|
|
478
478
|
rangeExtractor: (t) => {
|
|
479
479
|
let n = ce(t);
|
|
480
|
-
return
|
|
480
|
+
return J === -1 ? n : [.../* @__PURE__ */ new Set([
|
|
481
481
|
...n,
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
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
|
-
}),
|
|
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 ??
|
|
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 (
|
|
507
|
-
let e = Array.from(P.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId ===
|
|
508
|
-
e != null && (e.focus({ preventScroll: E !== 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
|
|
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 =
|
|
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 && (
|
|
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),
|
|
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,
|
|
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,
|
|
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(
|
|
530
|
+
...p.props(N.table, N.fixed, N.minimumWidth(De, Oe)),
|
|
531
531
|
children: [
|
|
532
532
|
/* @__PURE__ */ b("caption", {
|
|
533
|
-
ref:
|
|
533
|
+
ref: B,
|
|
534
534
|
...p.props(N.caption, C && l.hidden),
|
|
535
535
|
children: r
|
|
536
536
|
}),
|
|
537
|
-
/* @__PURE__ */ b(
|
|
537
|
+
/* @__PURE__ */ b(ye, {
|
|
538
538
|
columns: A,
|
|
539
539
|
canSelect: c !== void 0
|
|
540
540
|
}),
|
|
541
541
|
/* @__PURE__ */ b("thead", {
|
|
542
|
-
ref:
|
|
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) ||
|
|
587
|
+
e.currentTarget.contains(e.relatedTarget) || G(void 0);
|
|
588
588
|
},
|
|
589
589
|
children: [
|
|
590
|
-
|
|
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: () =>
|
|
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,
|
|
626
|
-
children: m !== void 0 && r ===
|
|
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) =>
|
|
631
|
-
children: /* @__PURE__ */ b(
|
|
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(
|
|
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 &&
|
|
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(
|
|
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:
|
|
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
|
-
}),
|
|
663
|
+
}), Ee && /* @__PURE__ */ b("div", {
|
|
669
664
|
className: "xg7ukam x178xt8z x13fuv20 xhjagg4",
|
|
670
665
|
children: k
|
|
671
666
|
})]
|
|
672
667
|
});
|
|
673
668
|
}
|
|
674
|
-
function
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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 &&
|
|
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
|
|
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
|
|
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
|
|
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
|
|
796
|
-
function
|
|
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 <=
|
|
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
|
|
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
|
|
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
|
|
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
|
-
},
|
|
888
|
-
inline:
|
|
889
|
-
columns:
|
|
882
|
+
}, Z = {
|
|
883
|
+
inline: X.grid,
|
|
884
|
+
columns: X.columns
|
|
890
885
|
};
|
|
891
|
-
function
|
|
892
|
-
return /* @__PURE__ */ b("dl", { ...f(p.props(
|
|
886
|
+
function Ce({ layout: e = "inline", ...t }) {
|
|
887
|
+
return /* @__PURE__ */ b("dl", { ...f(p.props(Z[e]), t) });
|
|
893
888
|
}
|
|
894
|
-
function
|
|
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
|
|
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
|
|
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
|
|
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
|
|
973
|
-
Root:
|
|
974
|
-
Item:
|
|
967
|
+
var Ee = {
|
|
968
|
+
Root: $,
|
|
969
|
+
Item: Te
|
|
975
970
|
};
|
|
976
|
-
export {
|
|
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/dist/layout.js
CHANGED
|
@@ -120,39 +120,39 @@ function M({ children: e, label: t }) {
|
|
|
120
120
|
}), e]
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
function N({ children: e, icon: t, isSelected: n = !1,
|
|
124
|
-
let
|
|
123
|
+
function N({ children: e, icon: t, isSelected: n = !1, shouldCloseOnActivate: r = !0, onClick: i, className: s, style: c, ...l }) {
|
|
124
|
+
let u = d(E), f = p(), m = u !== null && !u.isExpanded;
|
|
125
125
|
return /* @__PURE__ */ _("div", {
|
|
126
126
|
...{
|
|
127
127
|
0: { className: "x78zum5 xeuugli x1ok0vyi" },
|
|
128
128
|
1: { className: "x78zum5 xeuugli x1ok0vyi x1r7kqkb" }
|
|
129
129
|
}[!!n | 0],
|
|
130
130
|
children: /* @__PURE__ */ v(o, {
|
|
131
|
-
...
|
|
131
|
+
...l,
|
|
132
132
|
...a({
|
|
133
|
-
className:
|
|
134
|
-
style:
|
|
133
|
+
className: s,
|
|
134
|
+
style: c,
|
|
135
135
|
styles: {
|
|
136
136
|
0: { className: "x9f619 x78zum5 x6s0dn4 x1ok0vyi xbixft xjbqb8w x1hz01jw xtqrqnz x1778rvt xj57cvi xvmahel xdpxx8g xkrqix3 x17lu4q8 x1480za7 x13qnu6 x9v5kkp x19rmrnh x1bqaal xc342km x1ypdohk xwj21n9 x1m8qfh3 x1nhvcw1 x1hnptsi x15rya3k x992rv9 x1avwmir xh8yej3 xeuugli xt970qd xksvo5r" },
|
|
137
137
|
1: { className: "x9f619 x78zum5 x6s0dn4 x1ok0vyi xbixft xjbqb8w x1hz01jw xtqrqnz x1778rvt xj57cvi xvmahel xdpxx8g xkrqix3 x17lu4q8 x1480za7 x13qnu6 x9v5kkp x19rmrnh x1bqaal xc342km x1ypdohk xwj21n9 x1m8qfh3 x1hnptsi x15rya3k x992rv9 x1avwmir xh8yej3 xeuugli xt970qd xksvo5r xl56j7k x1l31gyv" }
|
|
138
|
-
}[!!
|
|
138
|
+
}[!!m | 0]
|
|
139
139
|
}),
|
|
140
140
|
"aria-current": n ? "page" : void 0,
|
|
141
|
-
"aria-labelledby":
|
|
142
|
-
title:
|
|
141
|
+
"aria-labelledby": l["aria-labelledby"] ?? (l["aria-label"] === void 0 ? f : void 0),
|
|
142
|
+
title: l.title ?? (typeof e == "string" ? e : void 0),
|
|
143
143
|
onClick: (e) => {
|
|
144
|
-
|
|
144
|
+
i !== void 0 && i(e), !e.defaultPrevented && u !== null && r && u.onNavigate();
|
|
145
145
|
},
|
|
146
146
|
children: [t != null && /* @__PURE__ */ _("span", {
|
|
147
147
|
"aria-hidden": !0,
|
|
148
148
|
className: "x3nfvp2 x6s0dn4 xl56j7k xtwnzbg x18utl2x x2lah0s",
|
|
149
149
|
children: t
|
|
150
150
|
}), /* @__PURE__ */ _("span", {
|
|
151
|
-
id:
|
|
151
|
+
id: f,
|
|
152
152
|
...{
|
|
153
153
|
0: { className: "xeuugli xb3r6kr xlyipyv xuxw1ft" },
|
|
154
154
|
1: { className: "xeuugli xb3r6kr xlyipyv xuxw1ft x1s85apg xeod2sa" }
|
|
155
|
-
}[!!
|
|
155
|
+
}[!!m | 0],
|
|
156
156
|
children: e
|
|
157
157
|
})]
|
|
158
158
|
})
|
|
@@ -252,7 +252,7 @@ var R = { drawer: {
|
|
|
252
252
|
$$css: !0
|
|
253
253
|
} };
|
|
254
254
|
function z({ sidebarHeader: t, sidebar: n, footer: r, children: i, mainId: a = "main", shouldFocus: o = !1 }) {
|
|
255
|
-
let [s, c] = h(!0), [l, u] = h(!1), [d] = h(() => e.createHandle()), g = p(), y = m(null), b = m(null);
|
|
255
|
+
let [s, c] = h(!0), [l, u] = h(!1), [d] = h(() => e.createHandle()), g = p(), y = m(null), b = m(null), x = m(!1);
|
|
256
256
|
return f(() => {
|
|
257
257
|
let e = globalThis.matchMedia(T.sidebarDesktopQuery);
|
|
258
258
|
function t() {
|
|
@@ -267,7 +267,9 @@ function z({ sidebarHeader: t, sidebar: n, footer: r, children: i, mainId: a = "
|
|
|
267
267
|
navigationToggleRef: y,
|
|
268
268
|
mobileNavigationToggleRef: b,
|
|
269
269
|
onToggle: () => c((e) => !e),
|
|
270
|
-
onNavigate: () =>
|
|
270
|
+
onNavigate: () => {
|
|
271
|
+
x.current = l, u(!1);
|
|
272
|
+
}
|
|
271
273
|
},
|
|
272
274
|
children: [/* @__PURE__ */ v("div", {
|
|
273
275
|
className: "x9f619 x1ov3xa9 x78zum5 xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xvmahel",
|
|
@@ -298,7 +300,14 @@ function z({ sidebarHeader: t, sidebar: n, footer: r, children: i, mainId: a = "
|
|
|
298
300
|
onOpenChange: u,
|
|
299
301
|
children: /* @__PURE__ */ v(e.Portal, { children: [/* @__PURE__ */ _(e.Backdrop, {}), /* @__PURE__ */ _(e.Viewport, { children: /* @__PURE__ */ v(e.Popup, {
|
|
300
302
|
xstyle: R.drawer,
|
|
301
|
-
finalFocus: () =>
|
|
303
|
+
finalFocus: () => {
|
|
304
|
+
if (x.current) {
|
|
305
|
+
x.current = !1;
|
|
306
|
+
let e = document.querySelector(`#${CSS.escape(a)}`), t = document.activeElement;
|
|
307
|
+
return t instanceof HTMLElement && e?.contains(t) === !0 ? t : e;
|
|
308
|
+
}
|
|
309
|
+
return globalThis.matchMedia(T.sidebarDesktopQuery).matches ? y.current : b.current;
|
|
310
|
+
},
|
|
302
311
|
children: [/* @__PURE__ */ _(e.Title, {
|
|
303
312
|
isVisuallyHidden: !0,
|
|
304
313
|
children: "Navigation"
|
|
@@ -367,14 +376,14 @@ function U({ label: e, children: t, isFlush: n = !1, scrollRestorationId: r }) {
|
|
|
367
376
|
children: t
|
|
368
377
|
});
|
|
369
378
|
}
|
|
370
|
-
function
|
|
379
|
+
function W({ children: e }) {
|
|
371
380
|
return /* @__PURE__ */ _("div", {
|
|
372
381
|
className: "x2lah0s x1c8xbx5 x178xt8z x13fuv20 xhjagg4 xpvm0e4",
|
|
373
382
|
children: e
|
|
374
383
|
});
|
|
375
384
|
}
|
|
376
385
|
// packages/layout/src/view-stack.tsx
|
|
377
|
-
function
|
|
386
|
+
function ee({ children: e }) {
|
|
378
387
|
return /* @__PURE__ */ _("div", {
|
|
379
388
|
className: "x1n2onr6 x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j",
|
|
380
389
|
children: e
|
|
@@ -392,7 +401,7 @@ function G({ isActive: e, children: t }) {
|
|
|
392
401
|
});
|
|
393
402
|
}
|
|
394
403
|
var K = {
|
|
395
|
-
Root:
|
|
404
|
+
Root: ee,
|
|
396
405
|
Panel: G
|
|
397
406
|
}, q = { action: {
|
|
398
407
|
k7Eaqz: "xeuugli",
|
|
@@ -578,4 +587,4 @@ var ce = {
|
|
|
578
587
|
Pane: oe,
|
|
579
588
|
Handle: se
|
|
580
589
|
};
|
|
581
|
-
export { z as AppShell, B as DetailPage, V as FocusPage, j as Navigation, N as NavigationItem, P as NavigationLink, M as NavigationSection, X as PageContent, J as PageToolbar, ie as RecordPage, ce as Resizable, I as SidebarFooter, F as SidebarLabel, Y as ToolbarAction, K as ViewStack, H as Workbench,
|
|
590
|
+
export { z as AppShell, B as DetailPage, V as FocusPage, j as Navigation, N as NavigationItem, P as NavigationLink, M as NavigationSection, X as PageContent, J as PageToolbar, ie as RecordPage, ce as Resizable, I as SidebarFooter, F as SidebarLabel, Y as ToolbarAction, K as ViewStack, H as Workbench, W as WorkbenchFooter, U as WorkbenchScroll };
|
|
@@ -24,6 +24,7 @@ type NavigationProps = {
|
|
|
24
24
|
type NavigationItemProps = ComponentProps<typeof BaseButton> & {
|
|
25
25
|
readonly icon?: ReactNode;
|
|
26
26
|
readonly isSelected?: boolean;
|
|
27
|
+
readonly shouldCloseOnActivate?: boolean;
|
|
27
28
|
};
|
|
28
29
|
type NavigationLinkProps = ComponentProps<'a'> & {
|
|
29
30
|
readonly icon?: ReactNode;
|
|
@@ -45,7 +46,7 @@ export declare function NavigationSection({ children, label, }: {
|
|
|
45
46
|
readonly children: ReactNode;
|
|
46
47
|
readonly label: string;
|
|
47
48
|
}): ReactNode;
|
|
48
|
-
export declare function NavigationItem({ children, icon, isSelected, onClick, className, style, ...props }: NavigationItemProps): ReactNode;
|
|
49
|
+
export declare function NavigationItem({ children, icon, isSelected, shouldCloseOnActivate, onClick, className, style, ...props }: NavigationItemProps): ReactNode;
|
|
49
50
|
export declare function NavigationLink({ children, icon, isSelected, onClick, className, style, ...props }: NavigationLinkProps): ReactNode;
|
|
50
51
|
export declare function SidebarLabel({ children, shouldGrow }: SidebarLabelProps): ReactNode;
|
|
51
52
|
export declare function SidebarFooter({ children, layout }: SidebarFooterProps): ReactNode;
|
package/package.json
CHANGED