@mechane-ai/elements 0.30.0 → 0.31.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/dist/ai.js +35 -35
- package/dist/{categorical-values-Dfe3nkBV.js → categorical-values-Cfn6nwHi.js} +2 -2
- package/dist/{chart-frame-rL7_RAIc.js → chart-frame-C8JU2tlM.js} +9 -9
- package/dist/{chart-input-JIyGPusK.js → chart-input-D0hBpH1r.js} +2 -2
- package/dist/charts/cartesian.js +6 -6
- package/dist/charts/distribution.js +2 -2
- package/dist/charts/graph.js +2 -2
- package/dist/charts/hierarchy.js +3 -3
- package/dist/charts/matrix.js +2 -2
- package/dist/charts/timeline.js +3 -3
- package/dist/charts.js +1 -1
- package/dist/{code-block-BX51BVe1.js → code-block-DlzYynjv.js} +1 -1
- package/dist/collections.js +224 -211
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +2 -2
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +2 -2
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-5oRGjDHa.js → content-link-Dh1hon1m.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/elements.css +33 -23
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +1 -1
- package/dist/forms.js +1 -1
- package/dist/index.js +1 -1
- package/dist/layout.js +392 -318
- package/dist/navigation/commands.js +1 -1
- package/dist/packages/foundations/src/control-styles.d.ts +3 -0
- package/dist/packages/foundations/src/header-styles.d.ts +47 -0
- package/dist/packages/layout/src/frame.stylex.d.ts +0 -2
- package/dist/{pierre-tree-D2kRr4h4.js → pierre-tree-tdFSl55t.js} +2 -2
- package/dist/{src-BfPaaDxg.js → src-Bb2fDOeE.js} +105 -105
- package/dist/{src-DlNMCgVy.js → src-CVleZrPa.js} +17 -17
- package/dist/{src-eWcNz_oB.js → src-DvLYUTID.js} +14 -14
- package/dist/{src-E3Or8tkO.js → src-SE6QORrJ.js} +347 -290
- package/package.json +1 -1
package/dist/collections.js
CHANGED
|
@@ -1,29 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as
|
|
3
|
-
import { r as
|
|
4
|
-
import { d as
|
|
5
|
-
import { t as
|
|
6
|
-
import { b as
|
|
7
|
-
import { t as
|
|
1
|
+
import { E as e, T as t, c as n, m as r, u as i, v as a } from "./src-SE6QORrJ.js";
|
|
2
|
+
import { r as o } from "./src-Bb2fDOeE.js";
|
|
3
|
+
import { r as s, t as c } from "./src-d7EAi61b.js";
|
|
4
|
+
import { d as l } from "./src-DvLYUTID.js";
|
|
5
|
+
import { t as u } from "./accessibility-C-aIZ1Yx.js";
|
|
6
|
+
import { b as d, f as ee } from "./tokens.stylex-BoRZ3D8s.js";
|
|
7
|
+
import { t as te } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
8
8
|
import { mergeProps as f } from "@base-ui/react/merge-props";
|
|
9
9
|
import * as p from "@stylexjs/stylex";
|
|
10
|
-
import { Children as m, Fragment as
|
|
10
|
+
import { Children as m, Fragment as ne, useEffect as h, useLayoutEffect as g, useMemo as re, useRef as _, useState as v, useSyncExternalStore as ie } from "react";
|
|
11
11
|
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
12
|
-
import { ArrowDown as
|
|
13
|
-
import { createColumnHelper as
|
|
14
|
-
import { defaultRangeExtractor as
|
|
12
|
+
import { ArrowDown as ae, ArrowUp as oe, ArrowUpDown as se, ChevronLeft as S, ChevronRight as C, Settings2 as w, X as T } from "lucide-react";
|
|
13
|
+
import { createColumnHelper as ce, tableFeatures as E, useTable as le } from "@tanstack/react-table";
|
|
14
|
+
import { defaultRangeExtractor as ue, useVirtualizer as de } from "@tanstack/react-virtual";
|
|
15
15
|
// packages/collections/src/collection-controls.tsx
|
|
16
|
-
var D = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
var D = {
|
|
17
|
+
toolbar: {
|
|
18
|
+
kOIVth: "x1hnptsi",
|
|
19
|
+
kMwMTN: "xbixft",
|
|
20
|
+
kMv6JI: "x1hz01jw",
|
|
21
|
+
kGuDYH: "xtqrqnz",
|
|
22
|
+
kLWn49: "x1778rvt",
|
|
23
|
+
kbsrmU: "xjl7jj",
|
|
24
|
+
$$css: !0
|
|
25
|
+
},
|
|
26
|
+
remove: {
|
|
27
|
+
kmuXW: "x2lah0s",
|
|
28
|
+
$$css: !0
|
|
29
|
+
}
|
|
30
|
+
};
|
|
20
31
|
function O({ label: e, children: t, actions: n }) {
|
|
21
|
-
let r = m.toArray(t).length > 0,
|
|
22
|
-
return !r && !
|
|
32
|
+
let r = m.toArray(t).length > 0, a = m.toArray(n).length > 0;
|
|
33
|
+
return !r && !a ? null : /* @__PURE__ */ x("div", {
|
|
23
34
|
role: "group",
|
|
24
35
|
"aria-label": e,
|
|
25
|
-
|
|
26
|
-
children: [t,
|
|
36
|
+
...p.props(i.row, i.blockEnd, D.toolbar),
|
|
37
|
+
children: [t, a && /* @__PURE__ */ b("div", {
|
|
27
38
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli xvc5jky",
|
|
28
39
|
children: n
|
|
29
40
|
})]
|
|
@@ -53,55 +64,55 @@ function k({ filters: t, onRemove: n, label: r = "Applied filters" }) {
|
|
|
53
64
|
}, t.id))
|
|
54
65
|
});
|
|
55
66
|
}
|
|
56
|
-
function
|
|
57
|
-
return /* @__PURE__ */ x(
|
|
67
|
+
function fe({ options: n, onChange: r, onReset: i, label: a = "Display options" }) {
|
|
68
|
+
return /* @__PURE__ */ x(s.Root, { children: [/* @__PURE__ */ b(s.Trigger, {
|
|
58
69
|
render: /* @__PURE__ */ b(e, {
|
|
59
|
-
"aria-label":
|
|
60
|
-
title:
|
|
70
|
+
"aria-label": a,
|
|
71
|
+
title: a
|
|
61
72
|
}),
|
|
62
73
|
children: /* @__PURE__ */ b(w, {
|
|
63
74
|
size: 14,
|
|
64
75
|
"aria-hidden": "true"
|
|
65
76
|
})
|
|
66
|
-
}), /* @__PURE__ */ b(
|
|
77
|
+
}), /* @__PURE__ */ b(s.Portal, { children: /* @__PURE__ */ b(s.Positioner, {
|
|
67
78
|
align: "end",
|
|
68
|
-
children: /* @__PURE__ */ x(
|
|
79
|
+
children: /* @__PURE__ */ x(s.Popup, { children: [/* @__PURE__ */ b(s.Title, { children: "Display" }), /* @__PURE__ */ x("div", {
|
|
69
80
|
className: "xrvj5dj x1n8ia3y xfb3i0g",
|
|
70
|
-
children: [
|
|
81
|
+
children: [n.map((e) => /* @__PURE__ */ x("label", {
|
|
71
82
|
className: "x78zum5 x6s0dn4 x1hnptsi xbixft xtqrqnz x1hz01jw x1778rvt xeuugli xj0a0fe",
|
|
72
|
-
children: [/* @__PURE__ */ b(
|
|
83
|
+
children: [/* @__PURE__ */ b(o.Root, {
|
|
73
84
|
checked: e.isChecked,
|
|
74
|
-
onCheckedChange: (t) =>
|
|
85
|
+
onCheckedChange: (t) => r(e.id, t),
|
|
75
86
|
disabled: e.isRequired,
|
|
76
|
-
children: /* @__PURE__ */ b(
|
|
87
|
+
children: /* @__PURE__ */ b(o.Indicator, {})
|
|
77
88
|
}), e.label]
|
|
78
|
-
}, e.id)),
|
|
89
|
+
}, e.id)), i !== void 0 && /* @__PURE__ */ b(t, {
|
|
79
90
|
type: "button",
|
|
80
91
|
variant: "ghost",
|
|
81
|
-
onClick:
|
|
92
|
+
onClick: i,
|
|
82
93
|
children: "Reset defaults"
|
|
83
94
|
})]
|
|
84
95
|
})] })
|
|
85
96
|
}) })] });
|
|
86
97
|
}
|
|
87
|
-
function
|
|
98
|
+
function pe({ description: e, previous: r, next: i }) {
|
|
88
99
|
return /* @__PURE__ */ x("nav", {
|
|
89
100
|
"aria-label": "Pagination",
|
|
90
101
|
className: "x78zum5 x6s0dn4 x1qughib x1a02dak xaml1ju xeuugli",
|
|
91
102
|
children: [/* @__PURE__ */ b(n, { children: e }), /* @__PURE__ */ x("div", {
|
|
92
103
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli xvc5jky",
|
|
93
|
-
children: [/* @__PURE__ */ x(
|
|
104
|
+
children: [/* @__PURE__ */ x(t, {
|
|
94
105
|
variant: "outline",
|
|
95
|
-
disabled:
|
|
96
|
-
onClick:
|
|
106
|
+
disabled: r.disabled,
|
|
107
|
+
onClick: r.onClick,
|
|
97
108
|
children: [/* @__PURE__ */ b(S, {
|
|
98
109
|
size: 16,
|
|
99
110
|
"aria-hidden": "true"
|
|
100
111
|
}), "Previous"]
|
|
101
|
-
}), /* @__PURE__ */ x(
|
|
112
|
+
}), /* @__PURE__ */ x(t, {
|
|
102
113
|
variant: "outline",
|
|
103
|
-
disabled:
|
|
104
|
-
onClick:
|
|
114
|
+
disabled: i.disabled,
|
|
115
|
+
onClick: i.onClick,
|
|
105
116
|
children: ["Next", /* @__PURE__ */ b(C, {
|
|
106
117
|
size: 16,
|
|
107
118
|
"aria-hidden": "true"
|
|
@@ -111,7 +122,7 @@ function de({ description: e, previous: t, next: r }) {
|
|
|
111
122
|
});
|
|
112
123
|
}
|
|
113
124
|
// packages/collections/src/use-end-reached.ts
|
|
114
|
-
function
|
|
125
|
+
function me({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
115
126
|
h(() => {
|
|
116
127
|
if (n === void 0 || e.current === null) return;
|
|
117
128
|
let r = new IntersectionObserver((e) => {
|
|
@@ -126,11 +137,11 @@ function fe({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
|
126
137
|
]);
|
|
127
138
|
}
|
|
128
139
|
// packages/collections/src/data-table.tsx
|
|
129
|
-
var
|
|
140
|
+
var he = E({}), ge = 76, A = ee.compactTable.slice(7), _e = /* @__PURE__ */ new Map([["ArrowUp", -1], ["ArrowDown", 1]]), j = {
|
|
130
141
|
kmVPX3: "x1717udv",
|
|
131
142
|
kMzoRj: "xc342km",
|
|
132
143
|
$$css: !0
|
|
133
|
-
},
|
|
144
|
+
}, M = {
|
|
134
145
|
frame: {
|
|
135
146
|
k7Eaqz: "xeuugli",
|
|
136
147
|
kMv6JI: "x1hz01jw",
|
|
@@ -254,14 +265,14 @@ var pe = E({}), me = 76, j = d.compactTable.slice(7), he = /* @__PURE__ */ new M
|
|
|
254
265
|
$$css: !0
|
|
255
266
|
},
|
|
256
267
|
spacer: (e) => [
|
|
257
|
-
|
|
268
|
+
j,
|
|
258
269
|
{
|
|
259
270
|
kZKoxP: e == null ? e : "x16ye13r",
|
|
260
271
|
$$css: !0
|
|
261
272
|
},
|
|
262
273
|
{ "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
|
|
263
274
|
]
|
|
264
|
-
},
|
|
275
|
+
}, N = {
|
|
265
276
|
primary: {
|
|
266
277
|
minimumWidth: 240,
|
|
267
278
|
isFlexible: !0,
|
|
@@ -292,26 +303,26 @@ var pe = E({}), me = 76, j = d.compactTable.slice(7), he = /* @__PURE__ */ new M
|
|
|
292
303
|
isFlexible: !1,
|
|
293
304
|
shouldTruncate: !1
|
|
294
305
|
}
|
|
295
|
-
},
|
|
296
|
-
fixed:
|
|
297
|
-
content:
|
|
306
|
+
}, P = {
|
|
307
|
+
fixed: M.content,
|
|
308
|
+
content: M.contentCell
|
|
298
309
|
}, F = {
|
|
299
|
-
primary:
|
|
300
|
-
text:
|
|
301
|
-
status:
|
|
302
|
-
number:
|
|
303
|
-
timestamp:
|
|
304
|
-
actions:
|
|
305
|
-
}, _e = {
|
|
306
|
-
content: N.content,
|
|
307
|
-
fill: N.fillFrame
|
|
310
|
+
primary: M.start,
|
|
311
|
+
text: M.start,
|
|
312
|
+
status: M.start,
|
|
313
|
+
number: M.end,
|
|
314
|
+
timestamp: M.end,
|
|
315
|
+
actions: M.end
|
|
308
316
|
}, I = {
|
|
309
|
-
content:
|
|
310
|
-
fill:
|
|
317
|
+
content: M.content,
|
|
318
|
+
fill: M.fillFrame
|
|
319
|
+
}, L = {
|
|
320
|
+
content: M.content,
|
|
321
|
+
fill: M.fillViewport
|
|
311
322
|
};
|
|
312
323
|
function ve(e) {
|
|
313
324
|
return e.map((e) => {
|
|
314
|
-
let t =
|
|
325
|
+
let t = N[e.role], n = e.width ?? (t.isFlexible ? void 0 : t.minimumWidth);
|
|
315
326
|
return {
|
|
316
327
|
...e,
|
|
317
328
|
...n === void 0 ? {} : { width: n }
|
|
@@ -320,36 +331,36 @@ function ve(e) {
|
|
|
320
331
|
}
|
|
321
332
|
function ye(e, t = 0) {
|
|
322
333
|
return {
|
|
323
|
-
minimumWidth: e.reduce((e, t) => e + (t.width ??
|
|
324
|
-
compactWidth: e.filter((e) => e.isSecondary !== !0).reduce((e, t) => e + (t.width ??
|
|
334
|
+
minimumWidth: e.reduce((e, t) => e + (t.width ?? N[t.role].minimumWidth), t),
|
|
335
|
+
compactWidth: e.filter((e) => e.isSecondary !== !0).reduce((e, t) => e + (t.width ?? N[t.role].minimumWidth), t)
|
|
325
336
|
};
|
|
326
337
|
}
|
|
327
338
|
function be(e) {
|
|
328
|
-
let t = globalThis.matchMedia(
|
|
339
|
+
let t = globalThis.matchMedia(A);
|
|
329
340
|
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
330
341
|
}
|
|
331
342
|
function xe() {
|
|
332
|
-
return globalThis.matchMedia(
|
|
343
|
+
return globalThis.matchMedia(A).matches;
|
|
333
344
|
}
|
|
334
345
|
function Se({ columns: e, canSelect: t = !1 }) {
|
|
335
|
-
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 &&
|
|
346
|
+
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 && M.width(e.width), e.isSecondary === !0 && M.secondary) }, e.id))] });
|
|
336
347
|
}
|
|
337
|
-
function
|
|
348
|
+
function R({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHeaders: r = !1 }) {
|
|
338
349
|
let i = ve(e), { minimumWidth: a, compactWidth: o } = ye(i);
|
|
339
350
|
return /* @__PURE__ */ b("div", {
|
|
340
351
|
"aria-hidden": !0,
|
|
341
352
|
inert: !0,
|
|
342
|
-
...p.props(
|
|
353
|
+
...p.props(M.frame, I[t], M.placeholder),
|
|
343
354
|
children: /* @__PURE__ */ b("div", {
|
|
344
|
-
...p.props(
|
|
355
|
+
...p.props(M.viewport, L[t]),
|
|
345
356
|
children: /* @__PURE__ */ x("table", {
|
|
346
|
-
...p.props(
|
|
357
|
+
...p.props(M.table, M.fixed, M.minimumWidth(a, o)),
|
|
347
358
|
children: [
|
|
348
359
|
/* @__PURE__ */ b(Se, { columns: i }),
|
|
349
360
|
/* @__PURE__ */ b("thead", {
|
|
350
|
-
...p.props(r &&
|
|
361
|
+
...p.props(r && u.hidden),
|
|
351
362
|
children: /* @__PURE__ */ b("tr", { children: i.map((e) => /* @__PURE__ */ b("th", {
|
|
352
|
-
...p.props(
|
|
363
|
+
...p.props(M.header, F[e.role], e.width !== void 0 && M.width(e.width), e.isSecondary === !0 && M.secondary),
|
|
353
364
|
children: /* @__PURE__ */ b("span", {
|
|
354
365
|
className: "x1lliihq xeuugli xb3r6kr xlyipyv xuxw1ft",
|
|
355
366
|
children: e.label
|
|
@@ -363,12 +374,12 @@ function L({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHead
|
|
|
363
374
|
].map((e) => /* @__PURE__ */ b("tr", {
|
|
364
375
|
className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6",
|
|
365
376
|
children: i.map((e) => /* @__PURE__ */ b("td", {
|
|
366
|
-
...p.props(
|
|
377
|
+
...p.props(M.cell, P[n], F[e.role], e.width !== void 0 && M.width(e.width), e.isSecondary === !0 && M.secondary),
|
|
367
378
|
children: /* @__PURE__ */ b(H, {
|
|
368
379
|
role: e.role,
|
|
369
380
|
isFixed: n === "fixed",
|
|
370
381
|
shouldTruncate: void 0,
|
|
371
|
-
children: e.placeholder ?? /* @__PURE__ */ b(
|
|
382
|
+
children: e.placeholder ?? /* @__PURE__ */ b(l, { width: "60%" })
|
|
372
383
|
})
|
|
373
384
|
}, e.id))
|
|
374
385
|
}, e)) })
|
|
@@ -377,12 +388,13 @@ function L({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHead
|
|
|
377
388
|
})
|
|
378
389
|
});
|
|
379
390
|
}
|
|
380
|
-
function
|
|
391
|
+
function z({ children: e, leading: t, isDecorative: n = !1 }) {
|
|
392
|
+
let r = m.toArray(t).length > 0;
|
|
381
393
|
return /* @__PURE__ */ x("span", {
|
|
382
394
|
"aria-hidden": n || void 0,
|
|
383
395
|
inert: n || void 0,
|
|
384
|
-
className: "x78zum5 x6s0dn4 x1n8ia3y xeuugli xh8yej3",
|
|
385
|
-
children: [
|
|
396
|
+
className: "x78zum5 x6s0dn4 x1n8ia3y xeuugli xh8yej3 x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
397
|
+
children: [r && /* @__PURE__ */ b("span", {
|
|
386
398
|
"aria-hidden": !0,
|
|
387
399
|
className: "x3nfvp2 x6s0dn4 x2lah0s",
|
|
388
400
|
children: t
|
|
@@ -392,8 +404,9 @@ function R({ children: e, leading: t, isDecorative: n = !1 }) {
|
|
|
392
404
|
})]
|
|
393
405
|
});
|
|
394
406
|
}
|
|
395
|
-
function
|
|
396
|
-
|
|
407
|
+
function B({ children: e, secondary: t, leading: n, trailing: r }) {
|
|
408
|
+
let i = m.toArray(r).length > 0;
|
|
409
|
+
return /* @__PURE__ */ x(z, {
|
|
397
410
|
leading: n,
|
|
398
411
|
children: [/* @__PURE__ */ x("span", {
|
|
399
412
|
className: "x78zum5 x6s0dn4 x1hnptsi xeuugli",
|
|
@@ -401,7 +414,7 @@ function z({ children: e, secondary: t, leading: n, trailing: r }) {
|
|
|
401
414
|
title: e,
|
|
402
415
|
className: "x1lliihq xeuugli x14atkfc xs83m0k xb3r6kr xuxw1ft xlyipyv",
|
|
403
416
|
children: e
|
|
404
|
-
}),
|
|
417
|
+
}), i && /* @__PURE__ */ b("span", {
|
|
405
418
|
className: "x3nfvp2 x6s0dn4 x2lah0s",
|
|
406
419
|
children: r
|
|
407
420
|
})]
|
|
@@ -412,73 +425,73 @@ function z({ children: e, secondary: t, leading: n, trailing: r }) {
|
|
|
412
425
|
})]
|
|
413
426
|
});
|
|
414
427
|
}
|
|
415
|
-
function
|
|
416
|
-
return /* @__PURE__ */ x(
|
|
428
|
+
function V({ leading: e, isSecondary: t = !1 }) {
|
|
429
|
+
return /* @__PURE__ */ x(z, {
|
|
417
430
|
leading: e,
|
|
418
431
|
isDecorative: !0,
|
|
419
432
|
children: [/* @__PURE__ */ b("span", {
|
|
420
433
|
className: "x1lliihq xeuugli xh8yej3",
|
|
421
|
-
children: /* @__PURE__ */ b(
|
|
434
|
+
children: /* @__PURE__ */ b(l, { width: "70%" })
|
|
422
435
|
}), t && /* @__PURE__ */ b("span", {
|
|
423
436
|
className: "x1lliihq xeuugli xh8yej3 x153jb6y xy8obcc xas2l8k",
|
|
424
|
-
children: /* @__PURE__ */ b(
|
|
437
|
+
children: /* @__PURE__ */ b(l, { width: "45%" })
|
|
425
438
|
})]
|
|
426
439
|
});
|
|
427
440
|
}
|
|
428
|
-
function
|
|
429
|
-
let
|
|
430
|
-
let e =
|
|
431
|
-
return e.columns(
|
|
441
|
+
function Ce({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, onSortChange: s, selectedIds: c, onSelectionChange: l, selectionLabel: ee, rowAction: f, activeRowId: m, focusRowId: y, hideCaption: S = !1, hideHeaders: C = !1, rowSizing: w = "fixed", window: T, endContent: E, onEndReached: D, footer: O }) {
|
|
442
|
+
let k = re(() => ve(t), [t]), fe = ie(be, xe, () => !1), pe = re(() => {
|
|
443
|
+
let e = ce();
|
|
444
|
+
return e.columns(k.map((t) => e.display({
|
|
432
445
|
id: t.id,
|
|
433
446
|
header: t.label
|
|
434
447
|
})));
|
|
435
|
-
}, [
|
|
436
|
-
features:
|
|
437
|
-
columns:
|
|
448
|
+
}, [k]), A = le({
|
|
449
|
+
features: he,
|
|
450
|
+
columns: pe,
|
|
438
451
|
data: e,
|
|
439
452
|
getRowId: n
|
|
440
|
-
}),
|
|
453
|
+
}), j = te(), N = j.viewport, R = _(null), z = _(null), B = _(null), [V, Ce] = v(0), [U, W] = v(), G = _(void 0), K = _(void 0), q = e.findIndex((e) => n(e) === U), J = k.findIndex((e) => e.role === "primary" && e.isSecondary !== !0), Y = J === -1 ? k.findIndex((e) => e.isSecondary !== !0) : J, X = typeof T?.height == "string" ? T.height : "content";
|
|
441
454
|
g(() => {
|
|
442
|
-
if (
|
|
455
|
+
if (y === void 0) {
|
|
443
456
|
K.current = void 0;
|
|
444
457
|
return;
|
|
445
458
|
}
|
|
446
|
-
if (K.current ===
|
|
447
|
-
let e =
|
|
459
|
+
if (K.current === y) return;
|
|
460
|
+
let e = N.current?.querySelector(`[data-row-id="${CSS.escape(y)}"] [data-row-action]`);
|
|
448
461
|
if (e == null) return;
|
|
449
462
|
let t = requestAnimationFrame(() => {
|
|
450
|
-
e.focus({ preventScroll: !0 }), K.current =
|
|
463
|
+
e.focus({ preventScroll: !0 }), K.current = y;
|
|
451
464
|
});
|
|
452
465
|
return () => cancelAnimationFrame(t);
|
|
453
|
-
}, [e,
|
|
466
|
+
}, [e, y]), me({
|
|
454
467
|
end: R,
|
|
455
|
-
onEndReached:
|
|
468
|
+
onEndReached: T === void 0 ? D : void 0,
|
|
456
469
|
content: e.length
|
|
457
470
|
}), h(() => {
|
|
458
471
|
let e = z.current, t = B.current;
|
|
459
|
-
if (
|
|
460
|
-
let n = new ResizeObserver(() =>
|
|
472
|
+
if (T === void 0 || e === null || t === null) return;
|
|
473
|
+
let n = new ResizeObserver(() => Ce(e.offsetHeight + t.offsetHeight));
|
|
461
474
|
return n.observe(e), n.observe(t), () => n.disconnect();
|
|
462
475
|
}, [
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
476
|
+
T,
|
|
477
|
+
S,
|
|
478
|
+
C
|
|
466
479
|
]);
|
|
467
|
-
let Z =
|
|
480
|
+
let Z = de({
|
|
468
481
|
count: e.length,
|
|
469
|
-
enabled:
|
|
470
|
-
getScrollElement: () =>
|
|
482
|
+
enabled: T !== void 0,
|
|
483
|
+
getScrollElement: () => N.current,
|
|
471
484
|
getItemKey: (t) => {
|
|
472
485
|
let r = e[t];
|
|
473
486
|
if (r === void 0) throw RangeError("The virtual row is outside the supplied table page.");
|
|
474
487
|
return n(r);
|
|
475
488
|
},
|
|
476
|
-
estimateSize: () =>
|
|
489
|
+
estimateSize: () => w === "fixed" ? d.rowHeight : T?.estimatedRowHeight ?? d.rowHeight,
|
|
477
490
|
scrollMargin: V,
|
|
478
491
|
scrollPaddingStart: V,
|
|
479
492
|
overscan: 6,
|
|
480
493
|
rangeExtractor: (t) => {
|
|
481
|
-
let n =
|
|
494
|
+
let n = ue(t);
|
|
482
495
|
return q === -1 ? n : [.../* @__PURE__ */ new Set([
|
|
483
496
|
...n,
|
|
484
497
|
q - 1,
|
|
@@ -486,78 +499,78 @@ function V({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
486
499
|
q + 1
|
|
487
500
|
])].filter((t) => t >= 0 && t < e.length).toSorted((e, t) => e - t);
|
|
488
501
|
}
|
|
489
|
-
}), Te =
|
|
502
|
+
}), Te = T === void 0 ? A.getRowModel().rows.map((e, t) => ({
|
|
490
503
|
row: e,
|
|
491
504
|
index: t,
|
|
492
505
|
spacerHeight: 0
|
|
493
506
|
})) : Z.getVirtualItems().flatMap((e, t, n) => {
|
|
494
|
-
let r =
|
|
507
|
+
let r = A.getRowModel().rows[e.index];
|
|
495
508
|
return r === void 0 ? [] : [{
|
|
496
509
|
row: r,
|
|
497
510
|
index: e.index,
|
|
498
511
|
spacerHeight: e.start - (n[t - 1]?.end ?? V)
|
|
499
512
|
}];
|
|
500
|
-
}), Q =
|
|
513
|
+
}), Q = T !== void 0 && (e.length === 0 || Z.range?.endIndex === e.length - 1);
|
|
501
514
|
h(() => {
|
|
502
|
-
Q &&
|
|
515
|
+
Q && D?.();
|
|
503
516
|
}, [
|
|
504
517
|
Q,
|
|
505
|
-
|
|
518
|
+
D,
|
|
506
519
|
e.length
|
|
507
520
|
]), g(() => {
|
|
508
521
|
if (G.current === void 0) return;
|
|
509
|
-
let e = Array.from(
|
|
510
|
-
e != null && (e.focus({ preventScroll:
|
|
522
|
+
let e = Array.from(N.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId === G.current)?.querySelector("[data-row-action]");
|
|
523
|
+
e != null && (e.focus({ preventScroll: T !== void 0 }), G.current = void 0);
|
|
511
524
|
});
|
|
512
525
|
function Ee(t, r) {
|
|
513
526
|
let i = t.metaKey || t.ctrlKey, a = t.altKey || t.shiftKey;
|
|
514
527
|
if (i || a) return;
|
|
515
|
-
let o =
|
|
528
|
+
let o = _e.get(t.key);
|
|
516
529
|
if (o === void 0) return;
|
|
517
530
|
t.preventDefault();
|
|
518
531
|
let s = r + o, c = e[s];
|
|
519
|
-
c !== void 0 && (G.current = n(c), W(G.current),
|
|
532
|
+
c !== void 0 && (G.current = n(c), W(G.current), T !== void 0 && Z.scrollToIndex(s, { align: "auto" }));
|
|
520
533
|
}
|
|
521
|
-
let $ =
|
|
534
|
+
let $ = k.filter((e) => !fe || e.isSecondary !== !0).length + (c === void 0 ? 0 : 1), De = c === void 0 ? 0 : ge, Oe = O != null && typeof O != "boolean", { minimumWidth: ke, compactWidth: Ae } = ye(k, De), je = Z.getTotalSize() - (Z.getVirtualItems().at(-1)?.end ?? V) + V;
|
|
522
535
|
return /* @__PURE__ */ x("div", {
|
|
523
|
-
...p.props(
|
|
536
|
+
...p.props(M.frame, I[X]),
|
|
524
537
|
children: [/* @__PURE__ */ x("div", {
|
|
525
|
-
ref:
|
|
538
|
+
ref: j.ref,
|
|
526
539
|
"data-table-viewport": !0,
|
|
527
540
|
role: "region",
|
|
528
541
|
"aria-label": r,
|
|
529
|
-
tabIndex:
|
|
530
|
-
...p.props(
|
|
542
|
+
tabIndex: j.tabIndex,
|
|
543
|
+
...p.props(M.viewport, L[X], typeof T?.height == "number" && M.virtual(T.height)),
|
|
531
544
|
children: [/* @__PURE__ */ x("table", {
|
|
532
|
-
"aria-rowcount":
|
|
533
|
-
...p.props(
|
|
545
|
+
"aria-rowcount": T === void 0 ? void 0 : Math.max(1, e.length) + 1,
|
|
546
|
+
...p.props(M.table, M.fixed, M.minimumWidth(ke, Ae)),
|
|
534
547
|
children: [
|
|
535
548
|
/* @__PURE__ */ b("caption", {
|
|
536
549
|
ref: z,
|
|
537
|
-
...p.props(
|
|
550
|
+
...p.props(M.caption, S && u.hidden),
|
|
538
551
|
children: r
|
|
539
552
|
}),
|
|
540
553
|
/* @__PURE__ */ b(Se, {
|
|
541
|
-
columns:
|
|
554
|
+
columns: k,
|
|
542
555
|
canSelect: c !== void 0
|
|
543
556
|
}),
|
|
544
557
|
/* @__PURE__ */ b("thead", {
|
|
545
558
|
ref: B,
|
|
546
|
-
...p.props(
|
|
559
|
+
...p.props(C && u.hidden),
|
|
547
560
|
children: /* @__PURE__ */ x("tr", { children: [c !== void 0 && /* @__PURE__ */ b("th", {
|
|
548
561
|
scope: "col",
|
|
549
562
|
className: "x9f619 x7wzq59 x13vifvy x11ru5tl x1krvmzm xt970qd xso031l x1q0q8m5 x1qndepd x153jb6y xpvm0e4 xj57cvi xy8obcc xas2l8k xuxw1ft x1d7z9mz xeuugli x1dc62k6",
|
|
550
563
|
children: /* @__PURE__ */ b("span", {
|
|
551
|
-
...p.props(
|
|
564
|
+
...p.props(u.hidden),
|
|
552
565
|
children: "Select"
|
|
553
566
|
})
|
|
554
|
-
}),
|
|
555
|
-
let t =
|
|
567
|
+
}), k.map((e) => {
|
|
568
|
+
let t = a?.columnId === e.id ? a.direction : void 0;
|
|
556
569
|
return /* @__PURE__ */ b("th", {
|
|
557
570
|
scope: "col",
|
|
558
571
|
title: e.label,
|
|
559
572
|
"aria-sort": t,
|
|
560
|
-
...p.props(
|
|
573
|
+
...p.props(M.header, F[e.role], e.width !== void 0 && M.width(e.width), e.isSecondary === !0 && M.secondary),
|
|
561
574
|
children: e.canSort === !0 && s !== void 0 ? /* @__PURE__ */ x("button", {
|
|
562
575
|
type: "button",
|
|
563
576
|
className: "x3nfvp2 x6s0dn4 x1hnptsi x193iq5w xeuugli x2zujid x17oiadl x1717udv xc342km x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x1ypdohk xp9636p x1s9zmfe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
@@ -573,7 +586,7 @@ function V({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
573
586
|
children: [/* @__PURE__ */ b("span", {
|
|
574
587
|
className: "x1lliihq xeuugli xb3r6kr xlyipyv xuxw1ft",
|
|
575
588
|
children: e.label
|
|
576
|
-
}), b(t === "ascending" ?
|
|
589
|
+
}), b(t === "ascending" ? oe : t === "descending" ? ae : se, {
|
|
577
590
|
size: 14,
|
|
578
591
|
"aria-hidden": "true",
|
|
579
592
|
className: "x2lah0s"
|
|
@@ -590,61 +603,61 @@ function V({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
590
603
|
e.currentTarget.contains(e.relatedTarget) || W(void 0);
|
|
591
604
|
},
|
|
592
605
|
children: [
|
|
593
|
-
Te.map(({ row: e, index: t, spacerHeight: n }) => /* @__PURE__ */ x(
|
|
606
|
+
Te.map(({ row: e, index: t, spacerHeight: n }) => /* @__PURE__ */ x(ne, { children: [n > 0 && /* @__PURE__ */ b("tr", {
|
|
594
607
|
"aria-hidden": "true",
|
|
595
608
|
children: /* @__PURE__ */ b("td", {
|
|
596
609
|
colSpan: $,
|
|
597
|
-
...p.props(
|
|
610
|
+
...p.props(M.spacer(n))
|
|
598
611
|
})
|
|
599
612
|
}), /* @__PURE__ */ x("tr", {
|
|
600
613
|
"data-index": t,
|
|
601
614
|
"data-row-id": e.id,
|
|
602
|
-
"aria-rowindex":
|
|
603
|
-
ref:
|
|
615
|
+
"aria-rowindex": T === void 0 ? void 0 : t + 2,
|
|
616
|
+
ref: T === void 0 || w === "fixed" ? void 0 : Z.measureElement,
|
|
604
617
|
onFocus: () => W(e.id),
|
|
605
618
|
...{
|
|
606
619
|
0: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6" },
|
|
607
620
|
2: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1ypdohk x1ecmtor" },
|
|
608
621
|
1: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1r8u7ye" },
|
|
609
622
|
3: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1ypdohk x1ecmtor x1r8u7ye" }
|
|
610
|
-
}[(
|
|
623
|
+
}[(f !== void 0) << 1 | (c?.has(e.id) === !0 || m === e.id)],
|
|
611
624
|
children: [c !== void 0 && /* @__PURE__ */ b("td", {
|
|
612
625
|
className: "x9f619 xt970qd xxymvpz xj0a0fe x1d7z9mz xeuugli x1dc62k6 x1n2onr6 x1vjfegm",
|
|
613
|
-
children: /* @__PURE__ */ b(
|
|
614
|
-
"aria-label":
|
|
626
|
+
children: /* @__PURE__ */ b(o.Root, {
|
|
627
|
+
"aria-label": ee(e.original),
|
|
615
628
|
checked: c.has(e.id),
|
|
616
629
|
onCheckedChange: (t) => {
|
|
617
630
|
let n = new Set(c);
|
|
618
|
-
t ? n.add(e.id) : n.delete(e.id),
|
|
631
|
+
t ? n.add(e.id) : n.delete(e.id), l(n);
|
|
619
632
|
},
|
|
620
|
-
children: /* @__PURE__ */ b(
|
|
633
|
+
children: /* @__PURE__ */ b(o.Indicator, {})
|
|
621
634
|
})
|
|
622
|
-
}),
|
|
623
|
-
...p.props(
|
|
624
|
-
children:
|
|
635
|
+
}), k.map((n, r) => /* @__PURE__ */ b("td", {
|
|
636
|
+
...p.props(M.cell, P[w], F[n.role], n.width !== void 0 && M.width(n.width), n.isSecondary === !0 && M.secondary),
|
|
637
|
+
children: f !== void 0 && r === Y ? /* @__PURE__ */ b(we, {
|
|
625
638
|
row: e.original,
|
|
626
|
-
action:
|
|
627
|
-
isActive:
|
|
639
|
+
action: f,
|
|
640
|
+
isActive: m === e.id,
|
|
628
641
|
onKeyDown: (e) => Ee(e, t),
|
|
629
642
|
children: /* @__PURE__ */ b(H, {
|
|
630
643
|
role: n.role,
|
|
631
|
-
isFixed:
|
|
644
|
+
isFixed: w === "fixed",
|
|
632
645
|
shouldTruncate: n.shouldTruncate,
|
|
633
646
|
children: n.cell(e.original)
|
|
634
647
|
})
|
|
635
648
|
}) : /* @__PURE__ */ b(H, {
|
|
636
649
|
role: n.role,
|
|
637
|
-
isFixed:
|
|
650
|
+
isFixed: w === "fixed",
|
|
638
651
|
shouldTruncate: n.shouldTruncate,
|
|
639
652
|
children: n.cell(e.original)
|
|
640
653
|
})
|
|
641
654
|
}, n.id))]
|
|
642
655
|
})] }, e.id)),
|
|
643
|
-
|
|
656
|
+
T !== void 0 && je > 0 && /* @__PURE__ */ b("tr", {
|
|
644
657
|
"aria-hidden": "true",
|
|
645
658
|
children: /* @__PURE__ */ b("td", {
|
|
646
659
|
colSpan: $,
|
|
647
|
-
...p.props(
|
|
660
|
+
...p.props(M.spacer(je))
|
|
648
661
|
})
|
|
649
662
|
}),
|
|
650
663
|
e.length === 0 && /* @__PURE__ */ b("tr", { children: /* @__PURE__ */ b("td", {
|
|
@@ -663,17 +676,17 @@ function V({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
663
676
|
...{
|
|
664
677
|
0: {},
|
|
665
678
|
1: { className: "xid9utz xg7ukam x153jb6y xy8obcc xas2l8k x15x95ik x1az1eml" }
|
|
666
|
-
}[
|
|
667
|
-
children:
|
|
679
|
+
}[E !== void 0 | 0],
|
|
680
|
+
children: E
|
|
668
681
|
})]
|
|
669
682
|
}), Oe && /* @__PURE__ */ b("div", {
|
|
670
683
|
className: "xg7ukam x178xt8z x13fuv20 xhjagg4",
|
|
671
|
-
children:
|
|
684
|
+
children: O
|
|
672
685
|
})]
|
|
673
686
|
});
|
|
674
687
|
}
|
|
675
688
|
function H({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
|
|
676
|
-
let i =
|
|
689
|
+
let i = N[e], a = t && i.shouldTruncate, o = typeof r == "string" && (n ?? a);
|
|
677
690
|
return /* @__PURE__ */ b("span", {
|
|
678
691
|
...{
|
|
679
692
|
0: { className: "x78zum5 x6s0dn4 xeuugli xh8yej3 xw3im37" },
|
|
@@ -700,7 +713,7 @@ function U(e) {
|
|
|
700
713
|
let t = e.metaKey || e.ctrlKey, n = e.altKey || e.shiftKey;
|
|
701
714
|
return t || n ? !1 : e.detail === 0 || e.currentTarget.ownerDocument.getSelection()?.isCollapsed !== !1;
|
|
702
715
|
}
|
|
703
|
-
function
|
|
716
|
+
function we({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
|
|
704
717
|
let a = t.label?.(e), o = t.href === void 0 ? /* @__PURE__ */ b("button", {
|
|
705
718
|
type: "button",
|
|
706
719
|
"aria-label": a,
|
|
@@ -723,14 +736,14 @@ function Ce({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
|
|
|
723
736
|
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",
|
|
724
737
|
children: r
|
|
725
738
|
});
|
|
726
|
-
return a === void 0 ? o : /* @__PURE__ */ x(
|
|
739
|
+
return a === void 0 ? o : /* @__PURE__ */ x(c.Root, { children: [/* @__PURE__ */ b(c.Trigger, { render: o }), /* @__PURE__ */ b(c.Portal, { children: /* @__PURE__ */ b(c.Positioner, {
|
|
727
740
|
side: "top",
|
|
728
741
|
align: "start",
|
|
729
|
-
children: /* @__PURE__ */ b(
|
|
742
|
+
children: /* @__PURE__ */ b(c.Popup, { children: a })
|
|
730
743
|
}) })] });
|
|
731
744
|
}
|
|
732
745
|
// packages/collections/src/collection-scroll.tsx
|
|
733
|
-
function
|
|
746
|
+
function W(e) {
|
|
734
747
|
switch (e.status) {
|
|
735
748
|
case "loading": return /* @__PURE__ */ b(n, {
|
|
736
749
|
role: "status",
|
|
@@ -743,7 +756,7 @@ function we(e) {
|
|
|
743
756
|
tone: "muted",
|
|
744
757
|
children: e.message
|
|
745
758
|
});
|
|
746
|
-
case "ready": return /* @__PURE__ */ b(
|
|
759
|
+
case "ready": return /* @__PURE__ */ b(t, {
|
|
747
760
|
onClick: e.onLoadMore,
|
|
748
761
|
children: e.message ?? "Load more"
|
|
749
762
|
});
|
|
@@ -753,16 +766,16 @@ function we(e) {
|
|
|
753
766
|
variant: "caption",
|
|
754
767
|
tone: "muted",
|
|
755
768
|
children: e.message ?? "More records could not be loaded."
|
|
756
|
-
}), /* @__PURE__ */ b(
|
|
769
|
+
}), /* @__PURE__ */ b(t, {
|
|
757
770
|
onClick: e.onLoadMore,
|
|
758
771
|
children: "Retry"
|
|
759
772
|
})]
|
|
760
773
|
});
|
|
761
774
|
}
|
|
762
775
|
}
|
|
763
|
-
function
|
|
764
|
-
let o =
|
|
765
|
-
|
|
776
|
+
function G({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, endPosition: i = "end", label: a = "Collection" }) {
|
|
777
|
+
let o = te(), s = o.viewport, c = _(null);
|
|
778
|
+
me({
|
|
766
779
|
end: c,
|
|
767
780
|
viewport: r ? s : void 0,
|
|
768
781
|
onEndReached: n,
|
|
@@ -793,11 +806,11 @@ function W({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, en
|
|
|
793
806
|
});
|
|
794
807
|
}
|
|
795
808
|
// packages/collections/src/inspector.tsx
|
|
796
|
-
var
|
|
797
|
-
function
|
|
809
|
+
var K = 860;
|
|
810
|
+
function q({ master: e, detail: n, label: r, masterLabel: i, revealKey: a, returnFocusRef: o, ...s }) {
|
|
798
811
|
let c = _(null), l = _(null), u = _(null);
|
|
799
812
|
g(() => {
|
|
800
|
-
a !== void 0 && c.current !== null && u.current !== null && c.current.clientWidth <=
|
|
813
|
+
a !== void 0 && c.current !== null && u.current !== null && c.current.clientWidth <= K && (u.current.focus({ preventScroll: !0 }), u.current.scrollIntoView({
|
|
801
814
|
block: "start",
|
|
802
815
|
behavior: "instant"
|
|
803
816
|
}));
|
|
@@ -817,28 +830,28 @@ function K({ master: e, detail: t, label: n, masterLabel: r, revealKey: a, retur
|
|
|
817
830
|
children: [/* @__PURE__ */ b("div", {
|
|
818
831
|
ref: l,
|
|
819
832
|
role: "group",
|
|
820
|
-
"aria-label":
|
|
833
|
+
"aria-label": i,
|
|
821
834
|
tabIndex: -1,
|
|
822
835
|
className: "xeuugli",
|
|
823
836
|
children: e
|
|
824
837
|
}), /* @__PURE__ */ x("aside", {
|
|
825
838
|
ref: u,
|
|
826
|
-
"aria-label":
|
|
839
|
+
"aria-label": r,
|
|
827
840
|
tabIndex: -1,
|
|
828
841
|
className: "x7wzq59 x7cfggw xqfmuo8 xeuugli x1sbza1b xhuqrux xexx8yu xdz7uhd xpilrb4 xdctr63 x1t7ytsu x97x49r x972fbf x1mg79u0 x13fuv20 xhjagg4 x14ijc3v x13qnu6 x9v5kkp x19rmrnh x12ijfkc",
|
|
829
842
|
children: [/* @__PURE__ */ b("div", {
|
|
830
843
|
className: "x1s85apg x1yamub6 x1xxlxpq",
|
|
831
|
-
children: /* @__PURE__ */ x(
|
|
844
|
+
children: /* @__PURE__ */ x(t, {
|
|
832
845
|
variant: "ghost",
|
|
833
846
|
onClick: d,
|
|
834
|
-
children: ["Back to ",
|
|
847
|
+
children: ["Back to ", i.toLowerCase()]
|
|
835
848
|
})
|
|
836
|
-
}),
|
|
849
|
+
}), n]
|
|
837
850
|
})]
|
|
838
851
|
})
|
|
839
852
|
});
|
|
840
853
|
}
|
|
841
|
-
function
|
|
854
|
+
function J({ items: e, ...t }) {
|
|
842
855
|
return /* @__PURE__ */ b("dl", {
|
|
843
856
|
...f({ className: "x1ghz6dp xrvj5dj xezdspq x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
|
|
844
857
|
children: e.map(({ label: e, value: t }) => /* @__PURE__ */ x("div", {
|
|
@@ -854,7 +867,7 @@ function q({ items: e, ...t }) {
|
|
|
854
867
|
});
|
|
855
868
|
}
|
|
856
869
|
// packages/collections/src/list-footer.tsx
|
|
857
|
-
function
|
|
870
|
+
function Y({ children: e, actions: t, ...n }) {
|
|
858
871
|
return /* @__PURE__ */ x("div", {
|
|
859
872
|
...f({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak xeuugli x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
|
|
860
873
|
children: [/* @__PURE__ */ b("div", {
|
|
@@ -867,7 +880,7 @@ function J({ children: e, actions: t, ...n }) {
|
|
|
867
880
|
});
|
|
868
881
|
}
|
|
869
882
|
// packages/collections/src/metrics.tsx
|
|
870
|
-
var
|
|
883
|
+
var X = {
|
|
871
884
|
grid: {
|
|
872
885
|
k1xSpc: "x78zum5",
|
|
873
886
|
kwnvtZ: "x1a02dak",
|
|
@@ -960,51 +973,51 @@ var Y = {
|
|
|
960
973
|
kCS8Yb: "x1l7klhg",
|
|
961
974
|
$$css: !0
|
|
962
975
|
}
|
|
963
|
-
},
|
|
976
|
+
}, Z = {
|
|
964
977
|
inline: {
|
|
965
978
|
metric: void 0,
|
|
966
979
|
label: void 0,
|
|
967
980
|
value: void 0,
|
|
968
|
-
detail:
|
|
981
|
+
detail: X.inlineDetail,
|
|
969
982
|
valueWidth: "5ch"
|
|
970
983
|
},
|
|
971
984
|
statistic: {
|
|
972
|
-
metric:
|
|
973
|
-
label:
|
|
974
|
-
value:
|
|
985
|
+
metric: X.statistic,
|
|
986
|
+
label: X.stackedLabel,
|
|
987
|
+
value: X.statisticValue,
|
|
975
988
|
detail: void 0,
|
|
976
989
|
valueWidth: "5ch"
|
|
977
990
|
},
|
|
978
991
|
headline: {
|
|
979
|
-
metric:
|
|
980
|
-
label:
|
|
981
|
-
value:
|
|
992
|
+
metric: X.headline,
|
|
993
|
+
label: X.headlineLabel,
|
|
994
|
+
value: X.headlineValue,
|
|
982
995
|
detail: void 0,
|
|
983
996
|
valueWidth: "9ch"
|
|
984
997
|
}
|
|
985
|
-
},
|
|
986
|
-
inline:
|
|
987
|
-
columns:
|
|
998
|
+
}, Te = {
|
|
999
|
+
inline: X.grid,
|
|
1000
|
+
columns: X.columns
|
|
988
1001
|
};
|
|
989
|
-
function
|
|
990
|
-
return /* @__PURE__ */ b("dl", { ...f(p.props(
|
|
1002
|
+
function Q({ layout: e = "inline", ...t }) {
|
|
1003
|
+
return /* @__PURE__ */ b("dl", { ...f(p.props(Te[e]), t) });
|
|
991
1004
|
}
|
|
992
|
-
function
|
|
993
|
-
let
|
|
1005
|
+
function Ee({ label: e, value: t, detail: n, isLoading: r = !1, hasDetail: i = !1, variant: a = "inline", trend: o, ...s }) {
|
|
1006
|
+
let c = Z[a];
|
|
994
1007
|
return /* @__PURE__ */ x("div", {
|
|
995
|
-
...f(p.props(
|
|
1008
|
+
...f(p.props(X.metric, c.metric), s),
|
|
996
1009
|
children: [
|
|
997
1010
|
/* @__PURE__ */ b("dt", {
|
|
998
|
-
...p.props(
|
|
1011
|
+
...p.props(X.label, c.label),
|
|
999
1012
|
children: e
|
|
1000
1013
|
}),
|
|
1001
1014
|
/* @__PURE__ */ b("dd", {
|
|
1002
|
-
...p.props(
|
|
1003
|
-
children: r ? /* @__PURE__ */ b(
|
|
1015
|
+
...p.props(X.value, c.value),
|
|
1016
|
+
children: r ? /* @__PURE__ */ b(l, { width: c.valueWidth }) : t
|
|
1004
1017
|
}),
|
|
1005
1018
|
(r ? i : n !== void 0) && /* @__PURE__ */ b("dd", {
|
|
1006
|
-
...p.props(
|
|
1007
|
-
children: r ? /* @__PURE__ */ b(
|
|
1019
|
+
...p.props(X.detail, c.detail),
|
|
1020
|
+
children: r ? /* @__PURE__ */ b(l, { width: "24ch" }) : n
|
|
1008
1021
|
}),
|
|
1009
1022
|
o !== void 0 && /* @__PURE__ */ b("dd", {
|
|
1010
1023
|
className: "x1ghz6dp xeuugli xh8yej3 xkh2ocl",
|
|
@@ -1014,12 +1027,12 @@ function Q({ label: e, value: t, detail: n, isLoading: r = !1, hasDetail: i = !1
|
|
|
1014
1027
|
});
|
|
1015
1028
|
}
|
|
1016
1029
|
// packages/collections/src/timestamp.tsx
|
|
1017
|
-
function
|
|
1030
|
+
function $({ dateTime: e, label: t, title: n }) {
|
|
1018
1031
|
return n === void 0 ? /* @__PURE__ */ b("time", {
|
|
1019
1032
|
dateTime: e,
|
|
1020
1033
|
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
1021
1034
|
children: t
|
|
1022
|
-
}) : /* @__PURE__ */ x(
|
|
1035
|
+
}) : /* @__PURE__ */ x(c.Root, { children: [/* @__PURE__ */ b(c.Trigger, {
|
|
1023
1036
|
render: /* @__PURE__ */ b("time", {
|
|
1024
1037
|
dateTime: e,
|
|
1025
1038
|
tabIndex: 0,
|
|
@@ -1027,40 +1040,40 @@ function Ee({ dateTime: e, label: t, title: n }) {
|
|
|
1027
1040
|
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk"
|
|
1028
1041
|
}),
|
|
1029
1042
|
children: t
|
|
1030
|
-
}), /* @__PURE__ */ b(
|
|
1043
|
+
}), /* @__PURE__ */ b(c.Portal, { children: /* @__PURE__ */ b(c.Positioner, { children: /* @__PURE__ */ b(c.Popup, { children: n }) }) })] });
|
|
1031
1044
|
}
|
|
1032
1045
|
// packages/collections/src/timeline.tsx
|
|
1033
|
-
function
|
|
1046
|
+
function De({ label: e, children: t }) {
|
|
1034
1047
|
return /* @__PURE__ */ b("ol", {
|
|
1035
1048
|
"aria-label": e,
|
|
1036
1049
|
className: "xe8uvvx x1ghz6dp x1717udv xeuugli",
|
|
1037
1050
|
children: t
|
|
1038
1051
|
});
|
|
1039
1052
|
}
|
|
1040
|
-
function
|
|
1053
|
+
function Oe({ icon: e, title: t, time: n, metadata: r, children: i, details: o, defaultOpen: s = !1 }) {
|
|
1041
1054
|
let [c, l] = v(s), u = /* @__PURE__ */ x("div", {
|
|
1042
1055
|
className: "x78zum5 x1pha0wt x1hnptsi x1a02dak xeuugli",
|
|
1043
1056
|
children: [/* @__PURE__ */ b("div", {
|
|
1044
1057
|
className: "xeuugli xk4h15q xj0a0fe",
|
|
1045
|
-
children: o === void 0 ?
|
|
1058
|
+
children: o === void 0 ? t : /* @__PURE__ */ b(a.Trigger, {
|
|
1046
1059
|
className: "x14atkfc x16exltd x17oiadl xt970qd xlqzeqv",
|
|
1047
|
-
children:
|
|
1060
|
+
children: t
|
|
1048
1061
|
})
|
|
1049
|
-
}),
|
|
1062
|
+
}), n != null && /* @__PURE__ */ b("div", {
|
|
1050
1063
|
className: "xeuugli x153jb6y xy8obcc xas2l8k xss6m8b xj0a0fe",
|
|
1051
|
-
children:
|
|
1064
|
+
children: n
|
|
1052
1065
|
})]
|
|
1053
1066
|
}), d = /* @__PURE__ */ x(y, { children: [
|
|
1054
1067
|
u,
|
|
1055
|
-
|
|
1068
|
+
i != null && (!c || o === void 0) && /* @__PURE__ */ b("div", {
|
|
1056
1069
|
className: "xeuugli x1ewvobj xj0a0fe",
|
|
1057
|
-
children:
|
|
1070
|
+
children: i
|
|
1058
1071
|
}),
|
|
1059
|
-
|
|
1072
|
+
r != null && /* @__PURE__ */ b("div", {
|
|
1060
1073
|
className: "xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
1061
|
-
children:
|
|
1074
|
+
children: r
|
|
1062
1075
|
}),
|
|
1063
|
-
o !== void 0 && /* @__PURE__ */ b(
|
|
1076
|
+
o !== void 0 && /* @__PURE__ */ b(a.Panel, { children: o })
|
|
1064
1077
|
] });
|
|
1065
1078
|
return /* @__PURE__ */ x("li", {
|
|
1066
1079
|
className: "x1n2onr6 xrvj5dj x1eqwfih x1y1mm1b xhlx3wy xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt xbixft x1cpjm7i x1hmns74 x1lk18uv x1gi6gvw x1jw5pjq x1vgi0k x1mi36wk x1wse844 xup0pd7",
|
|
@@ -1071,7 +1084,7 @@ function De({ icon: e, title: n, time: r, metadata: i, children: a, details: o,
|
|
|
1071
1084
|
}), o === void 0 ? /* @__PURE__ */ b("div", {
|
|
1072
1085
|
className: "xrvj5dj x1hnptsi xeuugli",
|
|
1073
1086
|
children: d
|
|
1074
|
-
}) : /* @__PURE__ */ b(
|
|
1087
|
+
}) : /* @__PURE__ */ b(a.Root, {
|
|
1075
1088
|
open: c,
|
|
1076
1089
|
onOpenChange: l,
|
|
1077
1090
|
className: "xrvj5dj x1hnptsi xeuugli xh8yej3",
|
|
@@ -1079,8 +1092,8 @@ function De({ icon: e, title: n, time: r, metadata: i, children: a, details: o,
|
|
|
1079
1092
|
})]
|
|
1080
1093
|
});
|
|
1081
1094
|
}
|
|
1082
|
-
var
|
|
1083
|
-
Root:
|
|
1084
|
-
Item:
|
|
1095
|
+
var ke = {
|
|
1096
|
+
Root: De,
|
|
1097
|
+
Item: Oe
|
|
1085
1098
|
};
|
|
1086
|
-
export {
|
|
1099
|
+
export { W as CollectionEnd, pe as CollectionPagination, G as CollectionScroll, O as CollectionToolbar, Ce as DataTable, R as DataTablePlaceholder, B as DataTableText, V as DataTableTextPlaceholder, J as Details, fe as DisplayOptions, k as FilterChips, q as Inspector, Y as ListFooter, Ee as Metric, Q as MetricGrid, ke as Timeline, $ as Timestamp };
|