@mechane-ai/elements 0.20.1 → 0.21.0
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 +7 -4
- package/dist/collections.js +180 -71
- package/dist/elements.css +28 -0
- package/dist/layout.js +199 -192
- package/dist/packages/collections/src/index.d.ts +1 -0
- package/dist/packages/collections/src/metrics.d.ts +64 -5
- package/dist/packages/layout/src/index.d.ts +2 -0
- package/dist/packages/layout/src/report-section.d.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -142,10 +142,13 @@ acknowledgement, and draft retention.
|
|
|
142
142
|
record and store named choices rather than catalog indexes. Identity palettes remain separate from status colors.
|
|
143
143
|
|
|
144
144
|
`MetricGrid layout="columns"` distributes supplied metrics by available container width. Its inline layout suits compact
|
|
145
|
-
record summaries. `
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
record summaries. `Metric` offers `statistic` and `headline` variants, a concise `detail`, and a passive `trend` slot.
|
|
146
|
+
Use `isLoading` and `hasDetail` to reserve its value and qualification while the application loads data. `ReportSection`
|
|
147
|
+
takes a `summary` element and a chart as its child, placing the number above the full-width chart that explains it. The
|
|
148
|
+
application supplies the measure, period, formatting, coverage and read state. `PageContent` owns report insets and
|
|
149
|
+
section gaps; keep full-width tables outside it so their cell insets remain the only gutter. `SettingsSection` keeps
|
|
150
|
+
wide tables inside their scroll region, and `SettingsRow` aligns labels and controls. `FormActions` owns submission rows
|
|
151
|
+
and their internal spacing. The enclosing section owns the gap before and after the actions.
|
|
149
152
|
|
|
150
153
|
The default theme is light, with system fonts and a compact spacing scale. Import `themeProps` from
|
|
151
154
|
`@mechane-ai/elements/theme` and spread `themeProps.light` or `themeProps.dark` onto the document root. Portaled content
|
package/dist/collections.js
CHANGED
|
@@ -84,7 +84,7 @@ function A({ options: t, onChange: n, onReset: r, label: s = "Display options" }
|
|
|
84
84
|
})] })
|
|
85
85
|
}) })] });
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function de({ description: n, previous: r, next: i }) {
|
|
88
88
|
return /* @__PURE__ */ x("nav", {
|
|
89
89
|
"aria-label": "Pagination",
|
|
90
90
|
className: "x78zum5 x6s0dn4 x1qughib x1a02dak xaml1ju xeuugli",
|
|
@@ -111,7 +111,7 @@ function j({ description: n, previous: r, next: i }) {
|
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
// packages/collections/src/use-end-reached.ts
|
|
114
|
-
function
|
|
114
|
+
function fe({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
115
115
|
h(() => {
|
|
116
116
|
if (n === void 0 || e.current === null) return;
|
|
117
117
|
let r = new IntersectionObserver((e) => {
|
|
@@ -126,11 +126,11 @@ function de({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
|
126
126
|
]);
|
|
127
127
|
}
|
|
128
128
|
// packages/collections/src/data-table.tsx
|
|
129
|
-
var
|
|
129
|
+
var pe = E({}), me = 76, j = d.compactTable.slice(7), he = /* @__PURE__ */ new Map([["ArrowUp", -1], ["ArrowDown", 1]]), M = {
|
|
130
130
|
kmVPX3: "x1717udv",
|
|
131
131
|
kMzoRj: "xc342km",
|
|
132
132
|
$$css: !0
|
|
133
|
-
},
|
|
133
|
+
}, N = {
|
|
134
134
|
frame: {
|
|
135
135
|
k7Eaqz: "xeuugli",
|
|
136
136
|
kMv6JI: "x1hz01jw",
|
|
@@ -253,14 +253,14 @@ var fe = E({}), pe = 76, M = d.compactTable.slice(7), me = /* @__PURE__ */ new M
|
|
|
253
253
|
$$css: !0
|
|
254
254
|
},
|
|
255
255
|
spacer: (e) => [
|
|
256
|
-
|
|
256
|
+
M,
|
|
257
257
|
{
|
|
258
258
|
kZKoxP: e == null ? e : "x16ye13r",
|
|
259
259
|
$$css: !0
|
|
260
260
|
},
|
|
261
261
|
{ "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
|
|
262
262
|
]
|
|
263
|
-
},
|
|
263
|
+
}, P = {
|
|
264
264
|
primary: {
|
|
265
265
|
minimumWidth: 240,
|
|
266
266
|
isFlexible: !0,
|
|
@@ -291,26 +291,26 @@ var fe = E({}), pe = 76, M = d.compactTable.slice(7), me = /* @__PURE__ */ new M
|
|
|
291
291
|
isFlexible: !1,
|
|
292
292
|
shouldTruncate: !1
|
|
293
293
|
}
|
|
294
|
-
}, he = {
|
|
295
|
-
fixed: P.content,
|
|
296
|
-
content: P.contentCell
|
|
297
|
-
}, I = {
|
|
298
|
-
primary: P.start,
|
|
299
|
-
text: P.start,
|
|
300
|
-
status: P.start,
|
|
301
|
-
number: P.end,
|
|
302
|
-
timestamp: P.end,
|
|
303
|
-
actions: P.end
|
|
304
294
|
}, ge = {
|
|
305
|
-
|
|
306
|
-
|
|
295
|
+
fixed: N.content,
|
|
296
|
+
content: N.contentCell
|
|
297
|
+
}, F = {
|
|
298
|
+
primary: N.start,
|
|
299
|
+
text: N.start,
|
|
300
|
+
status: N.start,
|
|
301
|
+
number: N.end,
|
|
302
|
+
timestamp: N.end,
|
|
303
|
+
actions: N.end
|
|
307
304
|
}, _e = {
|
|
308
|
-
content:
|
|
309
|
-
fill:
|
|
305
|
+
content: N.content,
|
|
306
|
+
fill: N.fillFrame
|
|
307
|
+
}, I = {
|
|
308
|
+
content: N.content,
|
|
309
|
+
fill: N.fillViewport
|
|
310
310
|
};
|
|
311
311
|
function ve(e) {
|
|
312
312
|
return e.map((e) => {
|
|
313
|
-
let t =
|
|
313
|
+
let t = P[e.role], n = e.width ?? (t.isFlexible ? void 0 : t.minimumWidth);
|
|
314
314
|
return {
|
|
315
315
|
...e,
|
|
316
316
|
...n === void 0 ? {} : { width: n }
|
|
@@ -319,36 +319,36 @@ function ve(e) {
|
|
|
319
319
|
}
|
|
320
320
|
function ye(e, t = 0) {
|
|
321
321
|
return {
|
|
322
|
-
minimumWidth: e.reduce((e, t) => e + (t.width ??
|
|
323
|
-
compactWidth: e.filter((e) => e.isSecondary !== !0).reduce((e, t) => e + (t.width ??
|
|
322
|
+
minimumWidth: e.reduce((e, t) => e + (t.width ?? P[t.role].minimumWidth), t),
|
|
323
|
+
compactWidth: e.filter((e) => e.isSecondary !== !0).reduce((e, t) => e + (t.width ?? P[t.role].minimumWidth), t)
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
326
|
function be(e) {
|
|
327
|
-
let t = globalThis.matchMedia(
|
|
327
|
+
let t = globalThis.matchMedia(j);
|
|
328
328
|
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
329
329
|
}
|
|
330
330
|
function xe() {
|
|
331
|
-
return globalThis.matchMedia(
|
|
331
|
+
return globalThis.matchMedia(j).matches;
|
|
332
332
|
}
|
|
333
333
|
function Se({ columns: e, canSelect: t = !1 }) {
|
|
334
|
-
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 &&
|
|
334
|
+
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))] });
|
|
335
335
|
}
|
|
336
336
|
function L({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHeaders: r = !1 }) {
|
|
337
337
|
let i = ve(e), { minimumWidth: a, compactWidth: o } = ye(i);
|
|
338
338
|
return /* @__PURE__ */ b("div", {
|
|
339
339
|
"aria-hidden": !0,
|
|
340
340
|
inert: !0,
|
|
341
|
-
...p.props(
|
|
341
|
+
...p.props(N.frame, _e[t], N.placeholder),
|
|
342
342
|
children: /* @__PURE__ */ b("div", {
|
|
343
|
-
...p.props(
|
|
343
|
+
...p.props(N.viewport, I[t]),
|
|
344
344
|
children: /* @__PURE__ */ x("table", {
|
|
345
|
-
...p.props(
|
|
345
|
+
...p.props(N.table, N.fixed, N.minimumWidth(a, o)),
|
|
346
346
|
children: [
|
|
347
347
|
/* @__PURE__ */ b(Se, { columns: i }),
|
|
348
348
|
/* @__PURE__ */ b("thead", {
|
|
349
349
|
...p.props(r && l.hidden),
|
|
350
350
|
children: /* @__PURE__ */ b("tr", { children: i.map((e) => /* @__PURE__ */ b("th", {
|
|
351
|
-
...p.props(
|
|
351
|
+
...p.props(N.header, F[e.role], e.width !== void 0 && N.width(e.width), e.isSecondary === !0 && N.secondary),
|
|
352
352
|
children: /* @__PURE__ */ b("span", {
|
|
353
353
|
className: "x1lliihq xeuugli xb3r6kr xlyipyv xuxw1ft",
|
|
354
354
|
children: e.label
|
|
@@ -362,7 +362,7 @@ function L({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHead
|
|
|
362
362
|
].map((e) => /* @__PURE__ */ b("tr", {
|
|
363
363
|
className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6",
|
|
364
364
|
children: i.map((e) => /* @__PURE__ */ b("td", {
|
|
365
|
-
...p.props(
|
|
365
|
+
...p.props(N.cell, ge[n], F[e.role], e.width !== void 0 && N.width(e.width), e.isSecondary === !0 && N.secondary),
|
|
366
366
|
children: /* @__PURE__ */ b(H, {
|
|
367
367
|
role: e.role,
|
|
368
368
|
isFixed: n === "fixed",
|
|
@@ -425,18 +425,18 @@ function B({ leading: e, isSecondary: t = !1 }) {
|
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
427
|
function V({ 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 }) {
|
|
428
|
-
let A = ne(() => ve(t), [t]),
|
|
428
|
+
let A = ne(() => ve(t), [t]), de = re(be, xe, () => !1), j = ne(() => {
|
|
429
429
|
let e = se();
|
|
430
430
|
return e.columns(A.map((t) => e.display({
|
|
431
431
|
id: t.id,
|
|
432
432
|
header: t.label
|
|
433
433
|
})));
|
|
434
|
-
}, [A]),
|
|
435
|
-
features:
|
|
436
|
-
columns:
|
|
434
|
+
}, [A]), M = ce({
|
|
435
|
+
features: pe,
|
|
436
|
+
columns: j,
|
|
437
437
|
data: e,
|
|
438
438
|
getRowId: n
|
|
439
|
-
}),
|
|
439
|
+
}), P = ee(), L = P.viewport, R = _(null), z = _(null), B = _(null), [V, U] = 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";
|
|
440
440
|
g(() => {
|
|
441
441
|
if (S === void 0) {
|
|
442
442
|
K.current = void 0;
|
|
@@ -449,7 +449,7 @@ function V({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
449
449
|
e.focus({ preventScroll: !0 }), K.current = S;
|
|
450
450
|
});
|
|
451
451
|
return () => cancelAnimationFrame(t);
|
|
452
|
-
}, [e, S]),
|
|
452
|
+
}, [e, S]), fe({
|
|
453
453
|
end: R,
|
|
454
454
|
onEndReached: E === void 0 ? O : void 0,
|
|
455
455
|
content: e.length
|
|
@@ -485,12 +485,12 @@ function V({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
485
485
|
q + 1
|
|
486
486
|
])].filter((t) => t >= 0 && t < e.length).toSorted((e, t) => e - t);
|
|
487
487
|
}
|
|
488
|
-
}), Te = E === void 0 ?
|
|
488
|
+
}), Te = E === void 0 ? M.getRowModel().rows.map((e, t) => ({
|
|
489
489
|
row: e,
|
|
490
490
|
index: t,
|
|
491
491
|
spacerHeight: 0
|
|
492
492
|
})) : Z.getVirtualItems().flatMap((e, t, n) => {
|
|
493
|
-
let r =
|
|
493
|
+
let r = M.getRowModel().rows[e.index];
|
|
494
494
|
return r === void 0 ? [] : [{
|
|
495
495
|
row: r,
|
|
496
496
|
index: e.index,
|
|
@@ -511,28 +511,28 @@ function V({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
511
511
|
function Ee(t, r) {
|
|
512
512
|
let i = t.metaKey || t.ctrlKey, a = t.altKey || t.shiftKey;
|
|
513
513
|
if (i || a) return;
|
|
514
|
-
let o =
|
|
514
|
+
let o = he.get(t.key);
|
|
515
515
|
if (o === void 0) return;
|
|
516
516
|
t.preventDefault();
|
|
517
517
|
let s = r + o, c = e[s];
|
|
518
518
|
c !== void 0 && (G.current = n(c), W(G.current), E !== void 0 && Z.scrollToIndex(s, { align: "auto" }));
|
|
519
519
|
}
|
|
520
|
-
let $ = A.filter((e) => !
|
|
520
|
+
let $ = A.filter((e) => !de || e.isSecondary !== !0).length + (c === void 0 ? 0 : 1), De = c === void 0 ? 0 : me, Oe = k != null && typeof k != "boolean", { minimumWidth: ke, compactWidth: Ae } = ye(A, De), je = Z.getTotalSize() - (Z.getVirtualItems().at(-1)?.end ?? V) + V;
|
|
521
521
|
return /* @__PURE__ */ x("div", {
|
|
522
|
-
...p.props(
|
|
522
|
+
...p.props(N.frame, _e[X]),
|
|
523
523
|
children: [/* @__PURE__ */ x("div", {
|
|
524
|
-
ref:
|
|
524
|
+
ref: P.ref,
|
|
525
525
|
role: "region",
|
|
526
526
|
"aria-label": r,
|
|
527
|
-
tabIndex:
|
|
528
|
-
...p.props(
|
|
527
|
+
tabIndex: P.tabIndex,
|
|
528
|
+
...p.props(N.viewport, I[X], typeof E?.height == "number" && N.virtual(E.height)),
|
|
529
529
|
children: [/* @__PURE__ */ x("table", {
|
|
530
530
|
"aria-rowcount": E === void 0 ? void 0 : Math.max(1, e.length) + 1,
|
|
531
|
-
...p.props(
|
|
531
|
+
...p.props(N.table, N.fixed, N.minimumWidth(ke, Ae)),
|
|
532
532
|
children: [
|
|
533
533
|
/* @__PURE__ */ b("caption", {
|
|
534
534
|
ref: z,
|
|
535
|
-
...p.props(
|
|
535
|
+
...p.props(N.caption, C && l.hidden),
|
|
536
536
|
children: r
|
|
537
537
|
}),
|
|
538
538
|
/* @__PURE__ */ b(Se, {
|
|
@@ -555,7 +555,7 @@ function V({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
555
555
|
scope: "col",
|
|
556
556
|
title: e.label,
|
|
557
557
|
"aria-sort": t,
|
|
558
|
-
...p.props(
|
|
558
|
+
...p.props(N.header, F[e.role], e.width !== void 0 && N.width(e.width), e.isSecondary === !0 && N.secondary),
|
|
559
559
|
children: e.canSort === !0 && s !== void 0 ? /* @__PURE__ */ x("button", {
|
|
560
560
|
type: "button",
|
|
561
561
|
className: "x3nfvp2 x6s0dn4 x1hnptsi x193iq5w xeuugli x2zujid x17oiadl x1717udv xc342km x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x1ypdohk xp9636p x1s9zmfe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
@@ -592,7 +592,7 @@ function V({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
592
592
|
"aria-hidden": "true",
|
|
593
593
|
children: /* @__PURE__ */ b("td", {
|
|
594
594
|
colSpan: $,
|
|
595
|
-
...p.props(
|
|
595
|
+
...p.props(N.spacer(n))
|
|
596
596
|
})
|
|
597
597
|
}), /* @__PURE__ */ x("tr", {
|
|
598
598
|
"data-index": t,
|
|
@@ -618,7 +618,7 @@ function V({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
618
618
|
children: /* @__PURE__ */ b(a.Indicator, {})
|
|
619
619
|
})
|
|
620
620
|
}), A.map((n, r) => /* @__PURE__ */ b("td", {
|
|
621
|
-
...p.props(
|
|
621
|
+
...p.props(N.cell, ge[T], F[n.role], n.width !== void 0 && N.width(n.width), n.isSecondary === !0 && N.secondary),
|
|
622
622
|
children: m !== void 0 && r === Y ? /* @__PURE__ */ b(Ce, {
|
|
623
623
|
row: e.original,
|
|
624
624
|
action: m,
|
|
@@ -642,7 +642,7 @@ function V({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
642
642
|
"aria-hidden": "true",
|
|
643
643
|
children: /* @__PURE__ */ b("td", {
|
|
644
644
|
colSpan: $,
|
|
645
|
-
...p.props(
|
|
645
|
+
...p.props(N.spacer(je))
|
|
646
646
|
})
|
|
647
647
|
}),
|
|
648
648
|
e.length === 0 && /* @__PURE__ */ b("tr", { children: /* @__PURE__ */ b("td", {
|
|
@@ -668,7 +668,7 @@ function V({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
668
668
|
});
|
|
669
669
|
}
|
|
670
670
|
function H({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
|
|
671
|
-
let i =
|
|
671
|
+
let i = P[e], a = t && i.shouldTruncate, o = typeof r == "string" && (n ?? a);
|
|
672
672
|
return /* @__PURE__ */ b("span", {
|
|
673
673
|
...{
|
|
674
674
|
0: { className: "x78zum5 x6s0dn4 xeuugli xh8yej3 xw3im37" },
|
|
@@ -757,7 +757,7 @@ function we(r) {
|
|
|
757
757
|
}
|
|
758
758
|
function W({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, endPosition: i = "end", label: a = "Collection" }) {
|
|
759
759
|
let o = ee(), s = o.viewport, c = _(null);
|
|
760
|
-
|
|
760
|
+
fe({
|
|
761
761
|
end: c,
|
|
762
762
|
viewport: r ? s : void 0,
|
|
763
763
|
onEndReached: n,
|
|
@@ -879,28 +879,137 @@ var Y = {
|
|
|
879
879
|
k7Eaqz: "xeuugli",
|
|
880
880
|
kogj98: "x1ghz6dp",
|
|
881
881
|
$$css: !0
|
|
882
|
+
},
|
|
883
|
+
metric: {
|
|
884
|
+
k1xSpc: "x3nfvp2",
|
|
885
|
+
kGNEyG: "x1pha0wt",
|
|
886
|
+
kwnvtZ: "x1a02dak",
|
|
887
|
+
kOIVth: "xunmzkg",
|
|
888
|
+
k7Eaqz: "xeuugli",
|
|
889
|
+
kMv6JI: "x1hz01jw",
|
|
890
|
+
khiITx: "xvmahel",
|
|
891
|
+
kGuDYH: "xtqrqnz",
|
|
892
|
+
kLWn49: "x1778rvt",
|
|
893
|
+
$$css: !0
|
|
894
|
+
},
|
|
895
|
+
label: {
|
|
896
|
+
k7Eaqz: "xeuugli",
|
|
897
|
+
kMwMTN: "x153jb6y",
|
|
898
|
+
kayTVb: "x9ek82g",
|
|
899
|
+
kHjlTd: "xj0a0fe",
|
|
900
|
+
$$css: !0
|
|
901
|
+
},
|
|
902
|
+
value: {
|
|
903
|
+
k7Eaqz: "xeuugli",
|
|
904
|
+
kogj98: "x1ghz6dp",
|
|
905
|
+
kMwMTN: "xbixft",
|
|
906
|
+
k63SB2: "xk4h15q",
|
|
907
|
+
kcqcaj: "xss6m8b",
|
|
908
|
+
kHjlTd: "xj0a0fe",
|
|
909
|
+
$$css: !0
|
|
910
|
+
},
|
|
911
|
+
statistic: {
|
|
912
|
+
kXwgrk: "xdt5ytf",
|
|
913
|
+
kGNEyG: "x1cy8zhl",
|
|
914
|
+
$$css: !0
|
|
915
|
+
},
|
|
916
|
+
stackedLabel: {
|
|
917
|
+
kayTVb: "x1g77sc7",
|
|
918
|
+
$$css: !0
|
|
919
|
+
},
|
|
920
|
+
statisticValue: {
|
|
921
|
+
kGuDYH: "x71lla1",
|
|
922
|
+
kLWn49: "xgkpprq",
|
|
923
|
+
k63SB2: "x1b5ytql",
|
|
924
|
+
kb6lSQ: "x1wjjqco",
|
|
925
|
+
$$css: !0
|
|
926
|
+
},
|
|
927
|
+
headline: {
|
|
928
|
+
k1C7PZ: "xa2sdi0",
|
|
929
|
+
$$css: !0
|
|
930
|
+
},
|
|
931
|
+
headlineLabel: {
|
|
932
|
+
kayTVb: "x1g77sc7",
|
|
933
|
+
kCS8Yb: "x1l7klhg",
|
|
934
|
+
kGuDYH: "xy8obcc",
|
|
935
|
+
$$css: !0
|
|
936
|
+
},
|
|
937
|
+
headlineValue: {
|
|
938
|
+
kGuDYH: "xc0f4dz",
|
|
939
|
+
kLWn49: "xzju6ct",
|
|
940
|
+
k63SB2: "xtjd4bd",
|
|
941
|
+
kb6lSQ: "x1wjjqco",
|
|
942
|
+
$$css: !0
|
|
943
|
+
},
|
|
944
|
+
detail: {
|
|
945
|
+
k7Eaqz: "xeuugli",
|
|
946
|
+
kogj98: "x1ghz6dp",
|
|
947
|
+
kMwMTN: "x153jb6y",
|
|
948
|
+
kGuDYH: "xy8obcc",
|
|
949
|
+
kLWn49: "xas2l8k",
|
|
950
|
+
kAzted: "x1mqbd49",
|
|
951
|
+
kHjlTd: "xj0a0fe",
|
|
952
|
+
$$css: !0
|
|
953
|
+
},
|
|
954
|
+
inlineDetail: {
|
|
955
|
+
kCS8Yb: "x1l7klhg",
|
|
956
|
+
$$css: !0
|
|
882
957
|
}
|
|
883
958
|
}, X = {
|
|
959
|
+
inline: {
|
|
960
|
+
metric: void 0,
|
|
961
|
+
label: void 0,
|
|
962
|
+
value: void 0,
|
|
963
|
+
detail: Y.inlineDetail,
|
|
964
|
+
valueWidth: "5ch"
|
|
965
|
+
},
|
|
966
|
+
statistic: {
|
|
967
|
+
metric: Y.statistic,
|
|
968
|
+
label: Y.stackedLabel,
|
|
969
|
+
value: Y.statisticValue,
|
|
970
|
+
detail: void 0,
|
|
971
|
+
valueWidth: "5ch"
|
|
972
|
+
},
|
|
973
|
+
headline: {
|
|
974
|
+
metric: Y.headline,
|
|
975
|
+
label: Y.headlineLabel,
|
|
976
|
+
value: Y.headlineValue,
|
|
977
|
+
detail: void 0,
|
|
978
|
+
valueWidth: "9ch"
|
|
979
|
+
}
|
|
980
|
+
}, Z = {
|
|
884
981
|
inline: Y.grid,
|
|
885
982
|
columns: Y.columns
|
|
886
983
|
};
|
|
887
|
-
function
|
|
888
|
-
return /* @__PURE__ */ b("dl", { ...f(p.props(
|
|
984
|
+
function Te({ layout: e = "inline", ...t }) {
|
|
985
|
+
return /* @__PURE__ */ b("dl", { ...f(p.props(Z[e]), t) });
|
|
889
986
|
}
|
|
890
|
-
function
|
|
987
|
+
function Q({ label: e, value: t, detail: n, isLoading: r = !1, hasDetail: i = !1, variant: a = "inline", trend: o, ...s }) {
|
|
988
|
+
let l = X[a];
|
|
891
989
|
return /* @__PURE__ */ x("div", {
|
|
892
|
-
...f(
|
|
893
|
-
children: [
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
990
|
+
...f(p.props(Y.metric, l.metric), s),
|
|
991
|
+
children: [
|
|
992
|
+
/* @__PURE__ */ b("dt", {
|
|
993
|
+
...p.props(Y.label, l.label),
|
|
994
|
+
children: e
|
|
995
|
+
}),
|
|
996
|
+
/* @__PURE__ */ b("dd", {
|
|
997
|
+
...p.props(Y.value, l.value),
|
|
998
|
+
children: r ? /* @__PURE__ */ b(c, { width: l.valueWidth }) : t
|
|
999
|
+
}),
|
|
1000
|
+
(r ? i : n !== void 0) && /* @__PURE__ */ b("dd", {
|
|
1001
|
+
...p.props(Y.detail, l.detail),
|
|
1002
|
+
children: r ? /* @__PURE__ */ b(c, { width: "24ch" }) : n
|
|
1003
|
+
}),
|
|
1004
|
+
o !== void 0 && /* @__PURE__ */ b("dd", {
|
|
1005
|
+
className: "x1ghz6dp xeuugli xh8yej3 xkh2ocl",
|
|
1006
|
+
children: o
|
|
1007
|
+
})
|
|
1008
|
+
]
|
|
900
1009
|
});
|
|
901
1010
|
}
|
|
902
1011
|
// packages/collections/src/timestamp.tsx
|
|
903
|
-
function
|
|
1012
|
+
function Ee({ dateTime: e, label: t, title: n }) {
|
|
904
1013
|
return n === void 0 ? /* @__PURE__ */ b("time", {
|
|
905
1014
|
dateTime: e,
|
|
906
1015
|
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
@@ -916,14 +1025,14 @@ function Q({ dateTime: e, label: t, title: n }) {
|
|
|
916
1025
|
}), /* @__PURE__ */ b(s.Portal, { children: /* @__PURE__ */ b(s.Positioner, { children: /* @__PURE__ */ b(s.Popup, { children: n }) }) })] });
|
|
917
1026
|
}
|
|
918
1027
|
// packages/collections/src/timeline.tsx
|
|
919
|
-
function
|
|
1028
|
+
function $({ label: e, children: t }) {
|
|
920
1029
|
return /* @__PURE__ */ b("ol", {
|
|
921
1030
|
"aria-label": e,
|
|
922
1031
|
className: "xe8uvvx x1ghz6dp x1717udv xeuugli",
|
|
923
1032
|
children: t
|
|
924
1033
|
});
|
|
925
1034
|
}
|
|
926
|
-
function
|
|
1035
|
+
function De({ icon: e, title: t, time: n, metadata: i, children: a, details: o, defaultOpen: s = !1 }) {
|
|
927
1036
|
let [c, l] = v(s), u = /* @__PURE__ */ x("div", {
|
|
928
1037
|
className: "x78zum5 x1pha0wt x1hnptsi x1a02dak xeuugli",
|
|
929
1038
|
children: [/* @__PURE__ */ b("div", {
|
|
@@ -965,8 +1074,8 @@ function $({ icon: e, title: t, time: n, metadata: i, children: a, details: o, d
|
|
|
965
1074
|
})]
|
|
966
1075
|
});
|
|
967
1076
|
}
|
|
968
|
-
var
|
|
969
|
-
Root:
|
|
970
|
-
Item:
|
|
1077
|
+
var Oe = {
|
|
1078
|
+
Root: $,
|
|
1079
|
+
Item: De
|
|
971
1080
|
};
|
|
972
|
-
export { we as CollectionEnd,
|
|
1081
|
+
export { we as CollectionEnd, de as CollectionPagination, W as CollectionScroll, O as CollectionToolbar, V as DataTable, L as DataTablePlaceholder, z as DataTableText, B as DataTableTextPlaceholder, q as Details, A as DisplayOptions, k as FilterChips, K as Inspector, J as ListFooter, Q as Metric, Te as MetricGrid, Oe as Timeline, Ee as Timestamp };
|
package/dist/elements.css
CHANGED
|
@@ -672,6 +672,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
672
672
|
align-items: stretch;
|
|
673
673
|
}
|
|
674
674
|
|
|
675
|
+
.xkh2ocl {
|
|
676
|
+
align-self: stretch;
|
|
677
|
+
}
|
|
678
|
+
|
|
675
679
|
.xegkacw {
|
|
676
680
|
animation-duration: .9s;
|
|
677
681
|
}
|
|
@@ -1022,6 +1026,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1022
1026
|
column-gap: var(--x1qq5i99);
|
|
1023
1027
|
}
|
|
1024
1028
|
|
|
1029
|
+
.xa2sdi0 {
|
|
1030
|
+
column-gap: var(--xxhyxt);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1025
1033
|
.x9vvk8s {
|
|
1026
1034
|
container-name: inspector;
|
|
1027
1035
|
}
|
|
@@ -1126,6 +1134,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1126
1134
|
fill-opacity: .08;
|
|
1127
1135
|
}
|
|
1128
1136
|
|
|
1137
|
+
.x1l7klhg {
|
|
1138
|
+
flex-basis: 100%;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1129
1141
|
.x1irul0l {
|
|
1130
1142
|
flex-basis: var(--xmu2bot);
|
|
1131
1143
|
}
|
|
@@ -1190,6 +1202,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1190
1202
|
font-size: var(--x1af0fv0);
|
|
1191
1203
|
}
|
|
1192
1204
|
|
|
1205
|
+
.x71lla1 {
|
|
1206
|
+
font-size: var(--x3ivco5);
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1193
1209
|
.x1i2cqwi {
|
|
1194
1210
|
font-size: var(--xehpjyu);
|
|
1195
1211
|
}
|
|
@@ -1222,6 +1238,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1222
1238
|
font-weight: var(--x1nq3oar);
|
|
1223
1239
|
}
|
|
1224
1240
|
|
|
1241
|
+
.xtjd4bd {
|
|
1242
|
+
font-weight: var(--xeequbj);
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1225
1245
|
.xt9c220 {
|
|
1226
1246
|
grid-auto-columns: auto;
|
|
1227
1247
|
}
|
|
@@ -1338,6 +1358,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1338
1358
|
line-height: var(--x1o42vor);
|
|
1339
1359
|
}
|
|
1340
1360
|
|
|
1361
|
+
.xgkpprq {
|
|
1362
|
+
line-height: var(--x1q14agh);
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1341
1365
|
.x1ytb0s6 {
|
|
1342
1366
|
line-height: var(--x1sf6ltt);
|
|
1343
1367
|
}
|
|
@@ -1382,6 +1406,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1382
1406
|
opacity: calc(1 - var(--drawer-swipe-progress, 0));
|
|
1383
1407
|
}
|
|
1384
1408
|
|
|
1409
|
+
.x1g77sc7 {
|
|
1410
|
+
order: 0;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1385
1413
|
.x9ek82g {
|
|
1386
1414
|
order: 1;
|
|
1387
1415
|
}
|