@mechane-ai/elements 0.8.0 → 0.9.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 +60 -39
- package/dist/ai.js +231 -170
- package/dist/assets/stylex.css +402 -164
- package/dist/{categorical-values-dGbaZ0tp.js → categorical-values-DYRiw5Qd.js} +2 -2
- package/dist/{chart-frame-DgPdIguO.js → chart-frame-RL1hCWBC.js} +1 -1
- package/dist/{chart-input-Sac4StHN.js → chart-input-Bm3ot1yD.js} +2 -2
- package/dist/charts/cartesian.js +5 -5
- 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 +1 -1
- package/dist/charts.js +1 -1
- package/dist/{code-block-BRNdtTaP.js → code-block-B30xQKqg.js} +1 -1
- package/dist/collections.js +305 -261
- 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 +4 -4
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-Dd8gapwc.js → content-link-BrPrpBof.js} +1 -1
- package/dist/content.js +35 -35
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +7 -7
- package/dist/forms.js +1 -1
- package/dist/index.js +1 -1
- package/dist/layout.js +138 -86
- package/dist/navigation/commands.js +1 -1
- package/dist/packages/ai/src/conversation.d.ts +2 -1
- package/dist/packages/ai/src/index.d.ts +4 -0
- package/dist/packages/ai/src/message-action.d.ts +10 -0
- package/dist/packages/ai/src/message-boundary.d.ts +6 -0
- package/dist/packages/ai/src/message.d.ts +2 -1
- package/dist/packages/collections/src/data-table.d.ts +6 -0
- package/dist/packages/collections/src/index.d.ts +2 -2
- package/dist/packages/collections/src/timeline.d.ts +10 -3
- package/dist/packages/core/src/actions.d.ts +7 -0
- package/dist/packages/core/src/agent-avatar-glyphs.d.ts +5 -0
- package/dist/packages/core/src/agent-avatar.d.ts +17 -0
- package/dist/packages/core/src/copy-value.d.ts +2 -1
- package/dist/packages/core/src/index.d.ts +5 -1
- package/dist/packages/forms/src/agent-avatar-picker.d.ts +8 -0
- package/dist/packages/forms/src/field-styles.d.ts +19 -0
- package/dist/packages/forms/src/forms.d.ts +2 -1
- package/dist/packages/forms/src/index.d.ts +2 -0
- package/dist/packages/foundations/src/tokens.stylex.d.ts +52 -0
- package/dist/packages/layout/src/app-shell.d.ts +2 -1
- package/dist/packages/layout/src/index.d.ts +2 -1
- package/dist/packages/layout/src/page-toolbar.d.ts +3 -1
- package/dist/packages/layout/src/sidebar.d.ts +4 -0
- package/dist/packages/layout/src/view-stack.d.ts +13 -0
- package/dist/packages/layout/src/workbench.d.ts +5 -2
- package/dist/{pierre-tree-DdE1boiT.js → pierre-tree-CRk09rx7.js} +2 -2
- package/dist/{src-Eg_ytPjv.js → src-Cc0Sadzr.js} +376 -293
- package/dist/{src-DV0BNk1M.js → src-DuuAmS-c.js} +1 -1
- package/dist/src-elMBQ2Dh.js +1087 -0
- package/dist/theme.js +1 -1
- package/dist/tokens.js +61 -10
- package/package.json +1 -1
- package/packages/foundations/src/tokens.stylex.ts +54 -0
- package/dist/src-Bc5sEhdO.js +0 -680
package/dist/collections.js
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as
|
|
3
|
-
import { r as
|
|
4
|
-
import { t as
|
|
5
|
-
import { mergeProps as
|
|
6
|
-
import * as
|
|
7
|
-
import { Fragment as ee, useEffect as
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { ArrowDown as ne, ArrowUp as re, ArrowUpDown as ie, ChevronLeft as
|
|
10
|
-
import { createColumnHelper as ae, tableFeatures as
|
|
1
|
+
import { C as e, S as t, c as n, f as r, h as i, i as a } from "./src-elMBQ2Dh.js";
|
|
2
|
+
import { r as o } from "./src-Cc0Sadzr.js";
|
|
3
|
+
import { r as s, t as c } from "./src-CfDf8TY8.js";
|
|
4
|
+
import { t as l } from "./accessibility-C-aIZ1Yx.js";
|
|
5
|
+
import { mergeProps as u } from "@base-ui/react/merge-props";
|
|
6
|
+
import * as d from "@stylexjs/stylex";
|
|
7
|
+
import { Fragment as ee, useEffect as f, useLayoutEffect as p, useMemo as te, useRef as m, useState as h } from "react";
|
|
8
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
9
|
+
import { ArrowDown as ne, ArrowUp as re, ArrowUpDown as ie, ChevronLeft as y, ChevronRight as b, Columns3 as x, X as S } from "lucide-react";
|
|
10
|
+
import { createColumnHelper as ae, tableFeatures as C, useTable as oe } from "@tanstack/react-table";
|
|
11
11
|
import { defaultRangeExtractor as se, useVirtualizer as ce } from "@tanstack/react-virtual";
|
|
12
12
|
// packages/collections/src/collection-controls.tsx
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */
|
|
13
|
+
function w({ label: e, children: t, actions: n }) {
|
|
14
|
+
return /* @__PURE__ */ v("div", {
|
|
15
15
|
role: "group",
|
|
16
16
|
"aria-label": e,
|
|
17
17
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi x1m92p3w xn9t2bk xso031l x1q0q8m5 x1qndepd",
|
|
18
|
-
children: [t, n !== void 0 && /* @__PURE__ */
|
|
18
|
+
children: [t, n !== void 0 && /* @__PURE__ */ _("div", {
|
|
19
19
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xvc5jky",
|
|
20
20
|
children: n
|
|
21
21
|
})]
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return /* @__PURE__ */
|
|
24
|
+
function T({ filters: t, onRemove: n, label: r = "Applied filters" }) {
|
|
25
|
+
return /* @__PURE__ */ _("div", {
|
|
26
26
|
role: "group",
|
|
27
|
-
"aria-label":
|
|
27
|
+
"aria-label": r,
|
|
28
28
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi",
|
|
29
|
-
children:
|
|
29
|
+
children: t.map((t) => /* @__PURE__ */ v("span", {
|
|
30
30
|
className: "x3nfvp2 x6s0dn4 xunmzkg xyibt8p xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xeuugli x193iq5w xj0a0fe xpvm0e4 xbixft x1hz01jw xtqrqnz",
|
|
31
|
-
children: [
|
|
32
|
-
"aria-label": `Remove ${
|
|
31
|
+
children: [t.label, /* @__PURE__ */ _(e, {
|
|
32
|
+
"aria-label": `Remove ${t.label}`,
|
|
33
33
|
variant: "ghost",
|
|
34
|
-
onClick: () => t
|
|
35
|
-
children: /* @__PURE__ */
|
|
34
|
+
onClick: () => n(t.id),
|
|
35
|
+
children: /* @__PURE__ */ _(S, {
|
|
36
36
|
size: 14,
|
|
37
37
|
"aria-hidden": "true"
|
|
38
38
|
})
|
|
39
39
|
})]
|
|
40
|
-
},
|
|
40
|
+
}, t.id))
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
render: /* @__PURE__ */
|
|
43
|
+
function E({ columns: e, onVisibilityChange: n, label: r = "Columns" }) {
|
|
44
|
+
return /* @__PURE__ */ v(s.Root, { children: [/* @__PURE__ */ v(s.Trigger, {
|
|
45
|
+
render: /* @__PURE__ */ _(t, {
|
|
46
46
|
variant: "outline",
|
|
47
47
|
size: "md"
|
|
48
48
|
}),
|
|
49
|
-
children: [/* @__PURE__ */
|
|
49
|
+
children: [/* @__PURE__ */ _(x, {
|
|
50
50
|
size: 16,
|
|
51
51
|
"aria-hidden": "true"
|
|
52
|
-
}),
|
|
53
|
-
}), /* @__PURE__ */
|
|
52
|
+
}), r]
|
|
53
|
+
}), /* @__PURE__ */ _(s.Portal, { children: /* @__PURE__ */ _(s.Positioner, {
|
|
54
54
|
align: "end",
|
|
55
|
-
children: /* @__PURE__ */
|
|
56
|
-
"aria-label":
|
|
57
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ _(s.Popup, {
|
|
56
|
+
"aria-label": r,
|
|
57
|
+
children: /* @__PURE__ */ _("div", {
|
|
58
58
|
className: "xrvj5dj x1n8ia3y xfb3i0g",
|
|
59
|
-
children: e.map((e) => /* @__PURE__ */
|
|
59
|
+
children: e.map((e) => /* @__PURE__ */ v("label", {
|
|
60
60
|
className: "x78zum5 x6s0dn4 x1hnptsi xbixft xtqrqnz x1hz01jw",
|
|
61
|
-
children: [/* @__PURE__ */
|
|
61
|
+
children: [/* @__PURE__ */ _(o.Root, {
|
|
62
62
|
checked: e.visible,
|
|
63
|
-
onCheckedChange: (
|
|
63
|
+
onCheckedChange: (t) => n(e.id, t),
|
|
64
64
|
disabled: e.required,
|
|
65
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ _(o.Indicator, {})
|
|
66
66
|
}), e.label]
|
|
67
67
|
}, e.id))
|
|
68
68
|
})
|
|
69
69
|
})
|
|
70
70
|
}) })] });
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return /* @__PURE__ */
|
|
72
|
+
function D({ description: e, previous: r, next: i }) {
|
|
73
|
+
return /* @__PURE__ */ v("nav", {
|
|
74
74
|
"aria-label": "Pagination",
|
|
75
75
|
className: "x78zum5 x6s0dn4 x1qughib x1a02dak xaml1ju",
|
|
76
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ _(n, { children: e }), /* @__PURE__ */ v("div", {
|
|
77
77
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xvc5jky",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ v(t, {
|
|
79
79
|
variant: "outline",
|
|
80
|
-
disabled:
|
|
81
|
-
onClick:
|
|
82
|
-
children: [/* @__PURE__ */
|
|
80
|
+
disabled: r.disabled,
|
|
81
|
+
onClick: r.onClick,
|
|
82
|
+
children: [/* @__PURE__ */ _(y, {
|
|
83
83
|
size: 16,
|
|
84
84
|
"aria-hidden": "true"
|
|
85
85
|
}), "Previous"]
|
|
86
|
-
}), /* @__PURE__ */
|
|
86
|
+
}), /* @__PURE__ */ v(t, {
|
|
87
87
|
variant: "outline",
|
|
88
88
|
disabled: i.disabled,
|
|
89
89
|
onClick: i.onClick,
|
|
90
|
-
children: ["Next", /* @__PURE__ */
|
|
90
|
+
children: ["Next", /* @__PURE__ */ _(b, {
|
|
91
91
|
size: 16,
|
|
92
92
|
"aria-hidden": "true"
|
|
93
93
|
})]
|
|
@@ -96,8 +96,8 @@ function w({ description: t, previous: n, next: i }) {
|
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
// packages/collections/src/use-end-reached.ts
|
|
99
|
-
function
|
|
100
|
-
|
|
99
|
+
function O({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
100
|
+
f(() => {
|
|
101
101
|
if (n === void 0 || e.current === null) return;
|
|
102
102
|
let r = new IntersectionObserver((e) => {
|
|
103
103
|
e.some((e) => e.isIntersecting) && n();
|
|
@@ -111,11 +111,11 @@ function T({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
|
111
111
|
]);
|
|
112
112
|
}
|
|
113
113
|
// packages/collections/src/data-table.tsx
|
|
114
|
-
var le =
|
|
114
|
+
var le = C({}), k = 48, ue = "a, button, input, select, textarea, label, summary, [role=\"button\"], [role=\"link\"], [role=\"switch\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"combobox\"], [role=\"slider\"], [role=\"spinbutton\"], [role=\"textbox\"], [role=\"tab\"], [role^=\"menuitem\"], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]:not([tabindex=\"-1\"])", de = /* @__PURE__ */ new Map([["ArrowUp", -1], ["ArrowDown", 1]]), A = {
|
|
115
115
|
kmVPX3: "x1717udv",
|
|
116
116
|
kMzoRj: "xc342km",
|
|
117
117
|
$$css: !0
|
|
118
|
-
},
|
|
118
|
+
}, j = {
|
|
119
119
|
frame: {
|
|
120
120
|
k7Eaqz: "xeuugli",
|
|
121
121
|
$$css: !0
|
|
@@ -228,7 +228,7 @@ var le = b({}), E = 48, ue = "a, button, input, select, textarea, label, summary
|
|
|
228
228
|
$$css: !0
|
|
229
229
|
},
|
|
230
230
|
spacer: (e) => [
|
|
231
|
-
|
|
231
|
+
A,
|
|
232
232
|
{
|
|
233
233
|
kZKoxP: e == null ? e : "x16ye13r",
|
|
234
234
|
$$css: !0
|
|
@@ -236,148 +236,169 @@ var le = b({}), E = 48, ue = "a, button, input, select, textarea, label, summary
|
|
|
236
236
|
{ "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
|
|
237
237
|
]
|
|
238
238
|
}, fe = {
|
|
239
|
-
fixed:
|
|
240
|
-
content:
|
|
241
|
-
}, k = {
|
|
242
|
-
start: O.start,
|
|
243
|
-
end: O.end
|
|
239
|
+
fixed: j.content,
|
|
240
|
+
content: j.contentCell
|
|
244
241
|
}, pe = {
|
|
245
|
-
|
|
246
|
-
|
|
242
|
+
start: j.start,
|
|
243
|
+
end: j.end
|
|
247
244
|
}, me = {
|
|
248
|
-
content:
|
|
249
|
-
fill:
|
|
245
|
+
content: j.content,
|
|
246
|
+
fill: j.fillFrame
|
|
247
|
+
}, he = {
|
|
248
|
+
content: j.content,
|
|
249
|
+
fill: j.fillViewport
|
|
250
250
|
};
|
|
251
|
-
function
|
|
252
|
-
|
|
251
|
+
function M({ children: e, secondary: t, leading: n }) {
|
|
252
|
+
return /* @__PURE__ */ v("span", {
|
|
253
|
+
className: "x78zum5 x6s0dn4 x1n8ia3y xeuugli xh8yej3",
|
|
254
|
+
children: [n !== void 0 && /* @__PURE__ */ _("span", {
|
|
255
|
+
"aria-hidden": !0,
|
|
256
|
+
className: "x3nfvp2 x6s0dn4 x2lah0s",
|
|
257
|
+
children: n
|
|
258
|
+
}), /* @__PURE__ */ v("span", {
|
|
259
|
+
className: "x98rzlu xeuugli",
|
|
260
|
+
children: [/* @__PURE__ */ _("span", {
|
|
261
|
+
title: e,
|
|
262
|
+
className: "x1lliihq xeuugli xh8yej3 xb3r6kr xuxw1ft xlyipyv",
|
|
263
|
+
children: e
|
|
264
|
+
}), t !== void 0 && /* @__PURE__ */ _("span", {
|
|
265
|
+
title: t,
|
|
266
|
+
className: "x1lliihq xeuugli xh8yej3 xb3r6kr xuxw1ft xlyipyv x153jb6y xy8obcc xas2l8k",
|
|
267
|
+
children: t
|
|
268
|
+
})]
|
|
269
|
+
})]
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
function N({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, onSortChange: s, selectedIds: c, onSelectionChange: u, selectionLabel: g, rowAction: y, activeRowId: b, focusRowId: x, hideCaption: S = !1, hideHeaders: C = !1, rowSizing: w = "fixed", window: T, endContent: E, onEndReached: D, footer: A }) {
|
|
273
|
+
let M = te(() => {
|
|
253
274
|
let e = ae();
|
|
254
275
|
return e.columns(t.map((t) => e.display({
|
|
255
276
|
id: t.id,
|
|
256
277
|
header: t.label
|
|
257
278
|
})));
|
|
258
|
-
}, [t]),
|
|
279
|
+
}, [t]), N = oe({
|
|
259
280
|
features: le,
|
|
260
|
-
columns:
|
|
281
|
+
columns: M,
|
|
261
282
|
data: e,
|
|
262
283
|
getRowId: n
|
|
263
|
-
}),
|
|
264
|
-
|
|
284
|
+
}), I = m(null), L = m(null), R = m(null), z = m(null), [B, V] = h(0), [H, U] = h(), W = m(void 0), G = m(void 0), K = e.findIndex((e) => n(e) === H), q = t.findIndex((e) => e.secondary !== !0), J = typeof T?.height == "string" ? T.height : "content";
|
|
285
|
+
p(() => {
|
|
265
286
|
if (x === void 0) {
|
|
266
|
-
|
|
287
|
+
G.current = void 0;
|
|
267
288
|
return;
|
|
268
289
|
}
|
|
269
|
-
if (
|
|
270
|
-
let e =
|
|
290
|
+
if (G.current === x) return;
|
|
291
|
+
let e = I.current?.querySelector(`[data-row-id="${CSS.escape(x)}"] [data-row-action]`);
|
|
271
292
|
if (e == null) return;
|
|
272
293
|
let t = requestAnimationFrame(() => {
|
|
273
|
-
e.focus({ preventScroll: !0 }),
|
|
294
|
+
e.focus({ preventScroll: !0 }), G.current = x;
|
|
274
295
|
});
|
|
275
296
|
return () => cancelAnimationFrame(t);
|
|
276
|
-
}, [e, x]),
|
|
277
|
-
end:
|
|
278
|
-
onEndReached:
|
|
297
|
+
}, [e, x]), O({
|
|
298
|
+
end: L,
|
|
299
|
+
onEndReached: T === void 0 ? D : void 0,
|
|
279
300
|
content: e.length
|
|
280
|
-
}),
|
|
281
|
-
let e =
|
|
282
|
-
if (
|
|
283
|
-
let n = new ResizeObserver(() =>
|
|
301
|
+
}), f(() => {
|
|
302
|
+
let e = R.current, t = z.current;
|
|
303
|
+
if (T === void 0 || e === null || t === null) return;
|
|
304
|
+
let n = new ResizeObserver(() => V(e.offsetHeight + t.offsetHeight));
|
|
284
305
|
return n.observe(e), n.observe(t), () => n.disconnect();
|
|
285
306
|
}, [
|
|
286
|
-
|
|
307
|
+
T,
|
|
287
308
|
S,
|
|
288
309
|
C
|
|
289
310
|
]);
|
|
290
|
-
let
|
|
311
|
+
let Y = ce({
|
|
291
312
|
count: e.length,
|
|
292
|
-
enabled:
|
|
293
|
-
getScrollElement: () =>
|
|
313
|
+
enabled: T !== void 0,
|
|
314
|
+
getScrollElement: () => I.current,
|
|
294
315
|
getItemKey: (t) => {
|
|
295
316
|
let r = e[t];
|
|
296
317
|
if (r === void 0) throw RangeError("The virtual row is outside the supplied table page.");
|
|
297
318
|
return n(r);
|
|
298
319
|
},
|
|
299
|
-
estimateSize: () => w === "fixed" ?
|
|
300
|
-
scrollMargin:
|
|
301
|
-
scrollPaddingStart:
|
|
320
|
+
estimateSize: () => w === "fixed" ? k : T?.estimatedRowHeight ?? k,
|
|
321
|
+
scrollMargin: B,
|
|
322
|
+
scrollPaddingStart: B,
|
|
302
323
|
overscan: 6,
|
|
303
324
|
rangeExtractor: (t) => {
|
|
304
325
|
let n = se(t);
|
|
305
|
-
return
|
|
326
|
+
return K === -1 ? n : [.../* @__PURE__ */ new Set([
|
|
306
327
|
...n,
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
328
|
+
K - 1,
|
|
329
|
+
K,
|
|
330
|
+
K + 1
|
|
310
331
|
])].filter((t) => t >= 0 && t < e.length).toSorted((e, t) => e - t);
|
|
311
332
|
}
|
|
312
|
-
}),
|
|
333
|
+
}), X = T === void 0 ? N.getRowModel().rows.map((e, t) => ({
|
|
313
334
|
row: e,
|
|
314
335
|
index: t,
|
|
315
336
|
gap: 0
|
|
316
|
-
})) :
|
|
317
|
-
let r =
|
|
337
|
+
})) : Y.getVirtualItems().flatMap((e, t, n) => {
|
|
338
|
+
let r = N.getRowModel().rows[e.index];
|
|
318
339
|
return r === void 0 ? [] : [{
|
|
319
340
|
row: r,
|
|
320
341
|
index: e.index,
|
|
321
|
-
gap: e.start - (n[t - 1]?.end ??
|
|
342
|
+
gap: e.start - (n[t - 1]?.end ?? B)
|
|
322
343
|
}];
|
|
323
|
-
}), Z =
|
|
324
|
-
|
|
325
|
-
Z &&
|
|
344
|
+
}), Z = T !== void 0 && (e.length === 0 || Y.range?.endIndex === e.length - 1);
|
|
345
|
+
f(() => {
|
|
346
|
+
Z && D?.();
|
|
326
347
|
}, [
|
|
327
348
|
Z,
|
|
328
|
-
|
|
349
|
+
D,
|
|
329
350
|
e.length
|
|
330
|
-
]),
|
|
331
|
-
if (
|
|
332
|
-
let e = Array.from(
|
|
333
|
-
e != null && (e.focus({ preventScroll:
|
|
351
|
+
]), p(() => {
|
|
352
|
+
if (W.current === void 0) return;
|
|
353
|
+
let e = Array.from(I.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId === W.current)?.querySelector("[data-row-action]");
|
|
354
|
+
e != null && (e.focus({ preventScroll: T !== void 0 }), W.current = void 0);
|
|
334
355
|
});
|
|
335
|
-
function
|
|
356
|
+
function Q(t, r) {
|
|
336
357
|
let i = t.metaKey || t.ctrlKey, a = t.altKey || t.shiftKey;
|
|
337
358
|
if (i || a) return;
|
|
338
359
|
let o = de.get(t.key);
|
|
339
360
|
if (o === void 0) return;
|
|
340
361
|
t.preventDefault();
|
|
341
362
|
let s = r + o, c = e[s];
|
|
342
|
-
c !== void 0 && (
|
|
363
|
+
c !== void 0 && (W.current = n(c), U(W.current), T !== void 0 && Y.scrollToIndex(s, { align: "auto" }));
|
|
343
364
|
}
|
|
344
|
-
let
|
|
345
|
-
return /* @__PURE__ */
|
|
346
|
-
...
|
|
347
|
-
children: [/* @__PURE__ */
|
|
348
|
-
ref:
|
|
365
|
+
let $ = t.length + (c === void 0 ? 0 : 1), _e = c === void 0 ? 0 : 44, ve = A != null && typeof A != "boolean", ye = t.reduce((e, t) => e + (t.width ?? 160), _e), be = t.filter((e) => e.secondary !== !0).reduce((e, t) => e + (t.width ?? 160), _e), xe = Y.getTotalSize() - (Y.getVirtualItems().at(-1)?.end ?? B) + B;
|
|
366
|
+
return /* @__PURE__ */ v("div", {
|
|
367
|
+
...d.props(j.frame, me[J]),
|
|
368
|
+
children: [/* @__PURE__ */ v("div", {
|
|
369
|
+
ref: I,
|
|
349
370
|
role: "region",
|
|
350
371
|
"aria-label": r,
|
|
351
372
|
tabIndex: 0,
|
|
352
|
-
...
|
|
353
|
-
children: [/* @__PURE__ */
|
|
354
|
-
"aria-rowcount":
|
|
355
|
-
...
|
|
373
|
+
...d.props(j.viewport, he[J], typeof T?.height == "number" && j.virtual(T.height)),
|
|
374
|
+
children: [/* @__PURE__ */ v("table", {
|
|
375
|
+
"aria-rowcount": T === void 0 ? void 0 : Math.max(1, e.length) + 1,
|
|
376
|
+
...d.props(j.table, (w === "fixed" || t.some((e) => e.truncate === !0)) && j.fixed, j.minimumWidth(ye, be)),
|
|
356
377
|
children: [
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
ref:
|
|
359
|
-
...
|
|
378
|
+
/* @__PURE__ */ _("caption", {
|
|
379
|
+
ref: R,
|
|
380
|
+
...d.props(j.caption, S && l.hidden),
|
|
360
381
|
children: r
|
|
361
382
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
ref:
|
|
365
|
-
...
|
|
366
|
-
children: /* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ v("colgroup", { children: [c !== void 0 && /* @__PURE__ */ _("col", { className: "x187nhsf xeuugli x1m92p3w" }), t.map((e) => /* @__PURE__ */ _("col", { ...d.props(e.width !== void 0 && j.width(e.width), e.secondary === !0 && j.secondary) }, e.id))] }),
|
|
384
|
+
/* @__PURE__ */ _("thead", {
|
|
385
|
+
ref: z,
|
|
386
|
+
...d.props(C && l.hidden),
|
|
387
|
+
children: /* @__PURE__ */ v("tr", { children: [c !== void 0 && /* @__PURE__ */ _("th", {
|
|
367
388
|
scope: "col",
|
|
368
389
|
className: "x7wzq59 x13vifvy x1vjfegm xc9qbxq xt970qd xso031l x1q0q8m5 x1qndepd x153jb6y xpvm0e4 xo1l8bm xy8obcc xuxw1ft x187nhsf xeuugli x1m92p3w",
|
|
369
390
|
children: "Select"
|
|
370
391
|
}), t.map((e) => {
|
|
371
|
-
let t =
|
|
372
|
-
return /* @__PURE__ */
|
|
392
|
+
let t = a?.columnId === e.id ? a.direction : void 0;
|
|
393
|
+
return /* @__PURE__ */ _("th", {
|
|
373
394
|
scope: "col",
|
|
374
395
|
"aria-sort": t,
|
|
375
|
-
...
|
|
376
|
-
children: e.sortable === !0 &&
|
|
396
|
+
...d.props(j.header, pe[e.align ?? "start"], e.width !== void 0 && j.width(e.width), e.secondary === !0 && j.secondary),
|
|
397
|
+
children: e.sortable === !0 && s !== void 0 ? /* @__PURE__ */ v("button", {
|
|
377
398
|
type: "button",
|
|
378
399
|
className: "x3nfvp2 x6s0dn4 x1hnptsi x1uey4wk xwu7q15 x1717udv xc342km x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x1ypdohk x1mkgjtd x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
379
400
|
onClick: () => {
|
|
380
|
-
|
|
401
|
+
s(t === "ascending" ? {
|
|
381
402
|
columnId: e.id,
|
|
382
403
|
direction: "descending"
|
|
383
404
|
} : t === "descending" ? void 0 : {
|
|
@@ -385,7 +406,7 @@ function A({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
385
406
|
direction: "ascending"
|
|
386
407
|
});
|
|
387
408
|
},
|
|
388
|
-
children: [e.label,
|
|
409
|
+
children: [e.label, _(t === "ascending" ? re : t === "descending" ? ne : ie, {
|
|
389
410
|
size: 14,
|
|
390
411
|
"aria-hidden": "true"
|
|
391
412
|
})]
|
|
@@ -393,25 +414,25 @@ function A({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
393
414
|
}, e.id);
|
|
394
415
|
})] })
|
|
395
416
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ v("tbody", {
|
|
397
418
|
onBlur: (e) => {
|
|
398
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
419
|
+
e.currentTarget.contains(e.relatedTarget) || U(void 0);
|
|
399
420
|
},
|
|
400
421
|
children: [
|
|
401
|
-
|
|
422
|
+
X.map(({ row: e, index: n, gap: r }) => /* @__PURE__ */ v(ee, { children: [r > 0 && /* @__PURE__ */ _("tr", {
|
|
402
423
|
"aria-hidden": "true",
|
|
403
|
-
children: /* @__PURE__ */
|
|
404
|
-
colSpan:
|
|
405
|
-
...
|
|
424
|
+
children: /* @__PURE__ */ _("td", {
|
|
425
|
+
colSpan: $,
|
|
426
|
+
...d.props(j.spacer(r))
|
|
406
427
|
})
|
|
407
|
-
}), /* @__PURE__ */
|
|
428
|
+
}), /* @__PURE__ */ v("tr", {
|
|
408
429
|
"data-index": n,
|
|
409
430
|
"data-row-id": e.id,
|
|
410
|
-
"aria-rowindex":
|
|
411
|
-
ref:
|
|
412
|
-
onFocus: () =>
|
|
431
|
+
"aria-rowindex": T === void 0 ? void 0 : n + 2,
|
|
432
|
+
ref: T === void 0 || w === "fixed" ? void 0 : Y.measureElement,
|
|
433
|
+
onFocus: () => U(e.id),
|
|
413
434
|
onClick: (e) => {
|
|
414
|
-
if (y === void 0 || !
|
|
435
|
+
if (y === void 0 || !F(e) || e.target instanceof Element && e.target.closest(ue) !== null) return;
|
|
415
436
|
let t = e.currentTarget.querySelector("[data-row-action]");
|
|
416
437
|
t?.focus({ preventScroll: !0 }), t?.click();
|
|
417
438
|
},
|
|
@@ -420,143 +441,149 @@ function A({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
420
441
|
2: { className: "xsdox4t xso031l x1q0q8m5 x1qndepd xzro8vx x1ypdohk" },
|
|
421
442
|
1: { className: "xsdox4t xso031l x1q0q8m5 x1qndepd xzro8vx x1r8u7ye" },
|
|
422
443
|
3: { className: "xsdox4t xso031l x1q0q8m5 x1qndepd xzro8vx x1ypdohk x1r8u7ye" }
|
|
423
|
-
}[(y !== void 0) << 1 | (
|
|
424
|
-
children: [
|
|
444
|
+
}[(y !== void 0) << 1 | (c?.has(e.id) === !0 || b === e.id)],
|
|
445
|
+
children: [c !== void 0 && /* @__PURE__ */ _("td", {
|
|
425
446
|
className: "xt970qd xxymvpz xj0a0fe x187nhsf xeuugli x1m92p3w",
|
|
426
|
-
children: /* @__PURE__ */
|
|
427
|
-
"aria-label":
|
|
428
|
-
checked:
|
|
447
|
+
children: /* @__PURE__ */ _(o.Root, {
|
|
448
|
+
"aria-label": g(e.original),
|
|
449
|
+
checked: c.has(e.id),
|
|
429
450
|
onCheckedChange: (t) => {
|
|
430
|
-
let n = new Set(
|
|
431
|
-
t ? n.add(e.id) : n.delete(e.id),
|
|
451
|
+
let n = new Set(c);
|
|
452
|
+
t ? n.add(e.id) : n.delete(e.id), u(n);
|
|
432
453
|
},
|
|
433
|
-
children: /* @__PURE__ */
|
|
454
|
+
children: /* @__PURE__ */ _(o.Indicator, {})
|
|
434
455
|
})
|
|
435
|
-
}), t.map((t, r) => /* @__PURE__ */
|
|
436
|
-
...
|
|
437
|
-
children: y !== void 0 && r ===
|
|
456
|
+
}), t.map((t, r) => /* @__PURE__ */ _("td", {
|
|
457
|
+
...d.props(j.cell, fe[w], pe[t.align ?? "start"], t.width !== void 0 && j.width(t.width), t.secondary === !0 && j.secondary),
|
|
458
|
+
children: y !== void 0 && r === q ? /* @__PURE__ */ _(ge, {
|
|
438
459
|
row: e.original,
|
|
439
460
|
action: y,
|
|
440
461
|
active: b === e.id,
|
|
441
|
-
onKeyDown: (e) =>
|
|
442
|
-
children: /* @__PURE__ */
|
|
462
|
+
onKeyDown: (e) => Q(e, n),
|
|
463
|
+
children: /* @__PURE__ */ _(P, {
|
|
443
464
|
fixed: w === "fixed",
|
|
444
465
|
truncate: t.truncate,
|
|
445
466
|
children: t.cell(e.original)
|
|
446
467
|
})
|
|
447
|
-
}) : /* @__PURE__ */
|
|
468
|
+
}) : /* @__PURE__ */ _(P, {
|
|
448
469
|
fixed: w === "fixed",
|
|
449
470
|
truncate: t.truncate,
|
|
450
471
|
children: t.cell(e.original)
|
|
451
472
|
})
|
|
452
473
|
}, t.id))]
|
|
453
474
|
})] }, e.id)),
|
|
454
|
-
|
|
475
|
+
T !== void 0 && xe > 0 && /* @__PURE__ */ _("tr", {
|
|
455
476
|
"aria-hidden": "true",
|
|
456
|
-
children: /* @__PURE__ */
|
|
457
|
-
colSpan:
|
|
458
|
-
...
|
|
477
|
+
children: /* @__PURE__ */ _("td", {
|
|
478
|
+
colSpan: $,
|
|
479
|
+
...d.props(j.spacer(xe))
|
|
459
480
|
})
|
|
460
481
|
}),
|
|
461
|
-
e.length === 0 && /* @__PURE__ */
|
|
462
|
-
colSpan:
|
|
482
|
+
e.length === 0 && /* @__PURE__ */ _("tr", { children: /* @__PURE__ */ _("td", {
|
|
483
|
+
colSpan: $,
|
|
463
484
|
className: "x1ttojsm x2b8uid x153jb6y",
|
|
464
485
|
children: i
|
|
465
486
|
}) })
|
|
466
487
|
]
|
|
467
488
|
})
|
|
468
489
|
]
|
|
469
|
-
}), /* @__PURE__ */
|
|
470
|
-
ref:
|
|
490
|
+
}), /* @__PURE__ */ _("div", {
|
|
491
|
+
ref: L,
|
|
471
492
|
...{
|
|
472
493
|
0: {},
|
|
473
494
|
1: { className: "xid9utz x1c8xbx5 x15x95ik x1az1eml" }
|
|
474
|
-
}[
|
|
475
|
-
children:
|
|
495
|
+
}[E !== void 0 | 0],
|
|
496
|
+
children: E
|
|
476
497
|
})]
|
|
477
|
-
}),
|
|
498
|
+
}), ve && /* @__PURE__ */ _("div", {
|
|
478
499
|
className: "x1c8xbx5 x178xt8z x13fuv20 xhjagg4",
|
|
479
|
-
children:
|
|
500
|
+
children: A
|
|
480
501
|
})]
|
|
481
502
|
});
|
|
482
503
|
}
|
|
483
|
-
function
|
|
484
|
-
|
|
504
|
+
function P({ fixed: e, truncate: t, children: n }) {
|
|
505
|
+
let r = typeof n == "string" && (t ?? e);
|
|
506
|
+
return /* @__PURE__ */ _("span", {
|
|
485
507
|
...{
|
|
486
508
|
0: { className: "x78zum5 x6s0dn4 xeuugli xh8yej3 x1dqyrwa" },
|
|
487
509
|
1: { className: "x78zum5 x6s0dn4 xeuugli xh8yej3 xt7dq6l" }
|
|
488
510
|
}[!e | 0],
|
|
489
|
-
children: /* @__PURE__ */
|
|
511
|
+
children: /* @__PURE__ */ _("span", {
|
|
490
512
|
title: typeof n == "string" ? n : void 0,
|
|
491
513
|
...{
|
|
492
514
|
0: { className: "x1lliihq xeuugli x193iq5w" },
|
|
493
|
-
2: { className: "x1lliihq xeuugli x193iq5w xh8yej3 xjexgjb
|
|
515
|
+
2: { className: "x1lliihq xeuugli x193iq5w xh8yej3 xjexgjb" },
|
|
494
516
|
1: { className: "x1lliihq xeuugli x193iq5w xb3r6kr xuxw1ft xlyipyv" },
|
|
495
517
|
3: { className: "x1lliihq xeuugli x193iq5w xh8yej3 xjexgjb xb3r6kr xuxw1ft xlyipyv" }
|
|
496
|
-
}[!!e << 1 | !!
|
|
518
|
+
}[!!e << 1 | !!r],
|
|
497
519
|
children: n
|
|
498
520
|
})
|
|
499
521
|
});
|
|
500
522
|
}
|
|
501
|
-
function
|
|
523
|
+
function F(e) {
|
|
502
524
|
if (e.defaultPrevented || e.button !== 0) return !1;
|
|
503
525
|
let t = e.metaKey || e.ctrlKey, n = e.altKey || e.shiftKey;
|
|
504
526
|
return t || n ? !1 : e.detail === 0 || e.currentTarget.ownerDocument.getSelection()?.isCollapsed !== !1;
|
|
505
527
|
}
|
|
506
|
-
function
|
|
507
|
-
|
|
528
|
+
function ge({ row: e, action: t, active: n, children: r, onKeyDown: i }) {
|
|
529
|
+
let a = t.label?.(e), o = t.href === void 0 ? /* @__PURE__ */ _("button", {
|
|
508
530
|
type: "button",
|
|
509
|
-
"aria-label":
|
|
531
|
+
"aria-label": a,
|
|
510
532
|
"aria-pressed": n,
|
|
511
533
|
"data-row-action": !0,
|
|
512
534
|
onKeyDown: i,
|
|
513
535
|
onClick: (n) => {
|
|
514
|
-
|
|
536
|
+
F(n) && t.onActivate(e);
|
|
515
537
|
},
|
|
516
|
-
className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xaeotn9 xwu7q15 x1717udv xc342km x1cum3z5 x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
538
|
+
className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli xaeotn9 xwu7q15 x1717udv xc342km x1cum3z5 x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
517
539
|
children: r
|
|
518
|
-
}) : /* @__PURE__ */
|
|
540
|
+
}) : /* @__PURE__ */ _("a", {
|
|
519
541
|
href: t.href(e),
|
|
520
|
-
"aria-label":
|
|
542
|
+
"aria-label": a,
|
|
521
543
|
"data-row-action": !0,
|
|
522
544
|
onKeyDown: i,
|
|
523
545
|
onClick: (n) => {
|
|
524
|
-
t.onActivate !== void 0 &&
|
|
546
|
+
t.onActivate !== void 0 && F(n) && (n.preventDefault(), t.onActivate(e));
|
|
525
547
|
},
|
|
526
|
-
className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xaeotn9 xwu7q15 x1717udv xc342km x1cum3z5 x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
548
|
+
className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli xaeotn9 xwu7q15 x1717udv xc342km x1cum3z5 x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
527
549
|
children: r
|
|
528
550
|
});
|
|
551
|
+
return a === void 0 ? o : /* @__PURE__ */ v(c.Root, { children: [/* @__PURE__ */ _(c.Trigger, { render: o }), /* @__PURE__ */ _(c.Portal, { children: /* @__PURE__ */ _(c.Positioner, {
|
|
552
|
+
side: "top",
|
|
553
|
+
align: "start",
|
|
554
|
+
children: /* @__PURE__ */ _(c.Popup, { children: a })
|
|
555
|
+
}) })] });
|
|
529
556
|
}
|
|
530
557
|
// packages/collections/src/collection-scroll.tsx
|
|
531
|
-
function
|
|
558
|
+
function I(e) {
|
|
532
559
|
switch (e.status) {
|
|
533
|
-
case "loading": return /* @__PURE__ */
|
|
560
|
+
case "loading": return /* @__PURE__ */ _("span", {
|
|
534
561
|
role: "status",
|
|
535
562
|
children: e.message ?? "Loading…"
|
|
536
563
|
});
|
|
537
|
-
case "complete": return e.message === void 0 ? null : /* @__PURE__ */
|
|
538
|
-
case "ready": return /* @__PURE__ */
|
|
564
|
+
case "complete": return e.message === void 0 ? null : /* @__PURE__ */ _(a, { children: e.message });
|
|
565
|
+
case "ready": return /* @__PURE__ */ _(t, {
|
|
539
566
|
onClick: e.onLoadMore,
|
|
540
567
|
children: e.message ?? "Load more"
|
|
541
568
|
});
|
|
542
|
-
case "error": return /* @__PURE__ */
|
|
569
|
+
case "error": return /* @__PURE__ */ v(r, {
|
|
543
570
|
role: "status",
|
|
544
|
-
children: [/* @__PURE__ */
|
|
571
|
+
children: [/* @__PURE__ */ _(a, { children: e.message ?? "More records could not be loaded." }), /* @__PURE__ */ _(t, {
|
|
545
572
|
onClick: e.onLoadMore,
|
|
546
573
|
children: "Retry"
|
|
547
574
|
})]
|
|
548
575
|
});
|
|
549
576
|
}
|
|
550
577
|
}
|
|
551
|
-
function
|
|
552
|
-
let a =
|
|
553
|
-
|
|
578
|
+
function L({ children: e, endContent: t, onEndReached: n, fill: r = !1, endPosition: i = "end" }) {
|
|
579
|
+
let a = m(null), o = m(null);
|
|
580
|
+
O({
|
|
554
581
|
end: o,
|
|
555
582
|
viewport: r ? a : void 0,
|
|
556
583
|
onEndReached: n,
|
|
557
584
|
content: e
|
|
558
585
|
});
|
|
559
|
-
let s = /* @__PURE__ */
|
|
586
|
+
let s = /* @__PURE__ */ _("div", {
|
|
560
587
|
ref: o,
|
|
561
588
|
...{
|
|
562
589
|
0: {},
|
|
@@ -564,7 +591,7 @@ function P({ children: e, endContent: t, onEndReached: n, fill: r = !1, endPosit
|
|
|
564
591
|
}[t !== void 0 | 0],
|
|
565
592
|
children: t
|
|
566
593
|
});
|
|
567
|
-
return /* @__PURE__ */
|
|
594
|
+
return /* @__PURE__ */ v("div", {
|
|
568
595
|
ref: a,
|
|
569
596
|
...{
|
|
570
597
|
0: {},
|
|
@@ -578,28 +605,28 @@ function P({ children: e, endContent: t, onEndReached: n, fill: r = !1, endPosit
|
|
|
578
605
|
});
|
|
579
606
|
}
|
|
580
607
|
// packages/collections/src/inspector.tsx
|
|
581
|
-
function
|
|
582
|
-
return /* @__PURE__ */
|
|
583
|
-
...
|
|
584
|
-
children: [/* @__PURE__ */
|
|
608
|
+
function R({ master: e, detail: t, label: n, ...r }) {
|
|
609
|
+
return /* @__PURE__ */ v("div", {
|
|
610
|
+
...u({ className: "xrvj5dj x1mkdm3x xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xb3r6kr" }, r),
|
|
611
|
+
children: [/* @__PURE__ */ _("div", {
|
|
585
612
|
className: "xeuugli",
|
|
586
613
|
children: e
|
|
587
|
-
}), /* @__PURE__ */
|
|
614
|
+
}), /* @__PURE__ */ _("aside", {
|
|
588
615
|
"aria-label": n,
|
|
589
616
|
className: "xeuugli x1jvlu93 xpvm0e4 x178xt8z x13fuv20 xhjagg4",
|
|
590
617
|
children: t
|
|
591
618
|
})]
|
|
592
619
|
});
|
|
593
620
|
}
|
|
594
|
-
function
|
|
595
|
-
return /* @__PURE__ */
|
|
596
|
-
...
|
|
597
|
-
children: e.map(({ label: e, value: t }) => /* @__PURE__ */
|
|
621
|
+
function z({ items: e, ...t }) {
|
|
622
|
+
return /* @__PURE__ */ _("dl", {
|
|
623
|
+
...u({ className: "x1ghz6dp xrvj5dj x10i657a x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
|
|
624
|
+
children: e.map(({ label: e, value: t }) => /* @__PURE__ */ v("div", {
|
|
598
625
|
className: "xjp7ctv",
|
|
599
|
-
children: [/* @__PURE__ */
|
|
626
|
+
children: [/* @__PURE__ */ _("dt", {
|
|
600
627
|
className: "x153jb6y",
|
|
601
628
|
children: e
|
|
602
|
-
}), /* @__PURE__ */
|
|
629
|
+
}), /* @__PURE__ */ _("dd", {
|
|
603
630
|
className: "x1ghz6dp xbixft xj0a0fe xss6m8b",
|
|
604
631
|
children: t
|
|
605
632
|
})]
|
|
@@ -607,17 +634,17 @@ function I({ items: e, ...t }) {
|
|
|
607
634
|
});
|
|
608
635
|
}
|
|
609
636
|
// packages/collections/src/list-footer.tsx
|
|
610
|
-
function
|
|
611
|
-
return /* @__PURE__ */
|
|
612
|
-
...
|
|
613
|
-
children: [/* @__PURE__ */
|
|
637
|
+
function B({ children: e, actions: t, ...n }) {
|
|
638
|
+
return /* @__PURE__ */ v("div", {
|
|
639
|
+
...u({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
|
|
640
|
+
children: [/* @__PURE__ */ _("div", { children: e }), t != null && /* @__PURE__ */ _("div", {
|
|
614
641
|
className: "x78zum5 x6s0dn4 x1hnptsi",
|
|
615
642
|
children: t
|
|
616
643
|
})]
|
|
617
644
|
});
|
|
618
645
|
}
|
|
619
646
|
// packages/collections/src/metrics.tsx
|
|
620
|
-
var
|
|
647
|
+
var V = {
|
|
621
648
|
grid: {
|
|
622
649
|
k1xSpc: "x78zum5",
|
|
623
650
|
kwnvtZ: "x1a02dak",
|
|
@@ -634,30 +661,30 @@ var R = {
|
|
|
634
661
|
kogj98: "x1ghz6dp",
|
|
635
662
|
$$css: !0
|
|
636
663
|
}
|
|
637
|
-
},
|
|
638
|
-
inline:
|
|
639
|
-
columns:
|
|
664
|
+
}, H = {
|
|
665
|
+
inline: V.grid,
|
|
666
|
+
columns: V.columns
|
|
640
667
|
};
|
|
641
|
-
function
|
|
642
|
-
return /* @__PURE__ */
|
|
668
|
+
function U({ layout: e = "inline", ...t }) {
|
|
669
|
+
return /* @__PURE__ */ _("dl", { ...u(d.props(H[e]), t) });
|
|
643
670
|
}
|
|
644
|
-
function
|
|
645
|
-
return /* @__PURE__ */
|
|
646
|
-
...
|
|
647
|
-
children: [/* @__PURE__ */
|
|
671
|
+
function W({ label: e, value: t, ...n }) {
|
|
672
|
+
return /* @__PURE__ */ v("div", {
|
|
673
|
+
...u({ className: "x3nfvp2 x1pha0wt xunmzkg xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
|
|
674
|
+
children: [/* @__PURE__ */ _("dt", {
|
|
648
675
|
className: "x153jb6y x9ek82g",
|
|
649
676
|
children: e
|
|
650
|
-
}), /* @__PURE__ */
|
|
677
|
+
}), /* @__PURE__ */ _("dd", {
|
|
651
678
|
className: "x1ghz6dp xbixft xk50ysn xss6m8b",
|
|
652
679
|
children: t
|
|
653
680
|
})]
|
|
654
681
|
});
|
|
655
682
|
}
|
|
656
683
|
// packages/collections/src/table.tsx
|
|
657
|
-
var
|
|
684
|
+
var G = {
|
|
658
685
|
kzqmXN: "x5lhr3w",
|
|
659
686
|
$$css: !0
|
|
660
|
-
},
|
|
687
|
+
}, K = {
|
|
661
688
|
secondary: {
|
|
662
689
|
k1xSpc: "x1n9xxwz xazwdyr",
|
|
663
690
|
$$css: !0
|
|
@@ -666,7 +693,7 @@ var H = {
|
|
|
666
693
|
kzqmXN: "x2ipgtl",
|
|
667
694
|
$$css: !0
|
|
668
695
|
},
|
|
669
|
-
column: (e) => [
|
|
696
|
+
column: (e) => [G, { "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(`${e}%`) }],
|
|
670
697
|
th: {
|
|
671
698
|
kVAEAm: "x1n2onr6",
|
|
672
699
|
kZKoxP: "xc9qbxq",
|
|
@@ -696,89 +723,106 @@ var H = {
|
|
|
696
723
|
$$css: !0
|
|
697
724
|
}
|
|
698
725
|
};
|
|
699
|
-
function
|
|
726
|
+
function q({ headers: e, children: t, label: n, ...r }) {
|
|
700
727
|
let i = e.findLastIndex((e) => typeof e == "string" || e.secondary !== !0);
|
|
701
|
-
return /* @__PURE__ */
|
|
728
|
+
return /* @__PURE__ */ _("div", {
|
|
702
729
|
role: "region",
|
|
703
730
|
"aria-label": n,
|
|
704
731
|
tabIndex: 0,
|
|
705
732
|
className: "xeuugli xh8yej3 xw2csxc x13qnu6 x9v5kkp x19rmrnh x1bqaal",
|
|
706
|
-
children: /* @__PURE__ */
|
|
707
|
-
...
|
|
733
|
+
children: /* @__PURE__ */ v("table", {
|
|
734
|
+
...u({ "aria-label": n }, {
|
|
708
735
|
0: { className: "xh8yej3 x1mwwwfo xpvm0e4 x1hz01jw xvmahel xtqrqnz x1778rvt xdpxx8g" },
|
|
709
736
|
1: { className: "xh8yej3 x1mwwwfo xpvm0e4 x1hz01jw xvmahel xtqrqnz x1778rvt xdpxx8g x140o2bo" }
|
|
710
737
|
}[!!e.some((e) => typeof e != "string") | 0], r),
|
|
711
|
-
children: [/* @__PURE__ */
|
|
738
|
+
children: [/* @__PURE__ */ _("thead", { children: /* @__PURE__ */ _("tr", { children: e.map((t, n) => /* @__PURE__ */ _("th", {
|
|
712
739
|
scope: "col",
|
|
713
|
-
...
|
|
740
|
+
...d.props(K.th, typeof t != "string" && K.column(t.width), typeof t != "string" && K.compactWidth, typeof t != "string" && t.secondary === !0 && K.secondary, n === e.length - 1 && K.lastHeader, n === i && K.lastPrimaryHeader),
|
|
714
741
|
children: typeof t == "string" ? t : t.label
|
|
715
|
-
}, typeof t == "string" ? t : t.label)) }) }), /* @__PURE__ */
|
|
742
|
+
}, typeof t == "string" ? t : t.label)) }) }), /* @__PURE__ */ _("tbody", { children: t })]
|
|
716
743
|
})
|
|
717
744
|
});
|
|
718
745
|
}
|
|
719
|
-
function
|
|
720
|
-
return /* @__PURE__ */
|
|
721
|
-
...
|
|
746
|
+
function J({ children: e, secondary: t = !1, mobileLabel: n, ...r }) {
|
|
747
|
+
return /* @__PURE__ */ v("td", {
|
|
748
|
+
...u({
|
|
722
749
|
0: { className: "x14o62y9 x9f619 x1t0vds8 x1m92p3w xbixft xxymvpz xuxw1ft xss6m8b xb3r6kr xlyipyv" },
|
|
723
750
|
1: { className: "x14o62y9 x9f619 x1t0vds8 x1m92p3w xbixft xxymvpz xuxw1ft xss6m8b xb3r6kr xlyipyv x1n9xxwz xazwdyr" }
|
|
724
751
|
}[!!t | 0], r),
|
|
725
|
-
children: [e, n !== void 0 && /* @__PURE__ */
|
|
752
|
+
children: [e, n !== void 0 && /* @__PURE__ */ _("small", {
|
|
726
753
|
className: "x1s85apg xacuhyv x153jb6y xy8obcc xas2l8k xb3r6kr xlyipyv",
|
|
727
754
|
children: n
|
|
728
755
|
})]
|
|
729
756
|
});
|
|
730
757
|
}
|
|
731
758
|
// packages/collections/src/timestamp.tsx
|
|
732
|
-
function
|
|
733
|
-
return /* @__PURE__ */
|
|
759
|
+
function Y({ dateTime: e, label: t, title: n }) {
|
|
760
|
+
return n === void 0 ? /* @__PURE__ */ _("time", {
|
|
734
761
|
dateTime: e,
|
|
735
|
-
|
|
736
|
-
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b",
|
|
762
|
+
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xuxw1ft x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
737
763
|
children: t
|
|
738
|
-
})
|
|
764
|
+
}) : /* @__PURE__ */ v(c.Root, { children: [/* @__PURE__ */ _(c.Trigger, {
|
|
765
|
+
render: /* @__PURE__ */ _("time", {
|
|
766
|
+
dateTime: e,
|
|
767
|
+
tabIndex: 0,
|
|
768
|
+
"aria-label": n,
|
|
769
|
+
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xuxw1ft x13qnu6 x9v5kkp x19rmrnh x7s97pk"
|
|
770
|
+
}),
|
|
771
|
+
children: t
|
|
772
|
+
}), /* @__PURE__ */ _(c.Portal, { children: /* @__PURE__ */ _(c.Positioner, { children: /* @__PURE__ */ _(c.Popup, { children: n }) }) })] });
|
|
739
773
|
}
|
|
740
774
|
// packages/collections/src/timeline.tsx
|
|
741
|
-
function
|
|
742
|
-
return /* @__PURE__ */
|
|
775
|
+
function X({ label: e, children: t }) {
|
|
776
|
+
return /* @__PURE__ */ _("ol", {
|
|
743
777
|
"aria-label": e,
|
|
744
778
|
className: "xe8uvvx x1ghz6dp x1717udv xeuugli",
|
|
745
779
|
children: t
|
|
746
780
|
});
|
|
747
781
|
}
|
|
748
|
-
function
|
|
749
|
-
|
|
782
|
+
function Z({ icon: e, title: t, time: n, metadata: r, children: a, details: o, defaultOpen: s = !1 }) {
|
|
783
|
+
let [c, l] = h(s), u = /* @__PURE__ */ v("div", {
|
|
784
|
+
className: "x78zum5 x1pha0wt x1hnptsi x1a02dak xeuugli",
|
|
785
|
+
children: [/* @__PURE__ */ _("div", {
|
|
786
|
+
className: "xeuugli xk50ysn xj0a0fe",
|
|
787
|
+
children: o === void 0 ? t : /* @__PURE__ */ _(i.Trigger, {
|
|
788
|
+
className: "x14atkfc xisnujt xwu7q15 xt970qd xlqzeqv",
|
|
789
|
+
children: t
|
|
790
|
+
})
|
|
791
|
+
}), n !== void 0 && /* @__PURE__ */ _("div", {
|
|
792
|
+
className: "x153jb6y xy8obcc xss6m8b",
|
|
793
|
+
children: n
|
|
794
|
+
})]
|
|
795
|
+
}), d = /* @__PURE__ */ v(g, { children: [
|
|
796
|
+
u,
|
|
797
|
+
a !== void 0 && (!c || o === void 0) && /* @__PURE__ */ _("div", {
|
|
798
|
+
className: "xeuugli x1ewvobj xj0a0fe",
|
|
799
|
+
children: a
|
|
800
|
+
}),
|
|
801
|
+
r !== void 0 && /* @__PURE__ */ _("div", {
|
|
802
|
+
className: "x153jb6y xy8obcc",
|
|
803
|
+
children: r
|
|
804
|
+
}),
|
|
805
|
+
o !== void 0 && /* @__PURE__ */ _(i.Panel, { children: o })
|
|
806
|
+
] });
|
|
807
|
+
return /* @__PURE__ */ v("li", {
|
|
750
808
|
className: "x1n2onr6 xrvj5dj x1qpdrs7 x1y1mm1b xhlx3wy xeuugli x1hz01jw xtqrqnz x1778rvt xbixft x1cpjm7i x1hmns74 x1lk18uv x1gi6gvw x1jw5pjq x1vgi0k x1mi36wk x1wse844 xup0pd7",
|
|
751
|
-
children: [/* @__PURE__ */
|
|
809
|
+
children: [/* @__PURE__ */ _("span", {
|
|
752
810
|
"aria-hidden": !0,
|
|
753
811
|
className: "x78zum5 x6s0dn4 x1qx5ct2 x153jb6y",
|
|
754
812
|
children: e
|
|
755
|
-
}), /* @__PURE__ */
|
|
813
|
+
}), o === void 0 ? /* @__PURE__ */ _("div", {
|
|
756
814
|
className: "xrvj5dj x1hnptsi xeuugli",
|
|
757
|
-
children:
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
}), n !== void 0 && /* @__PURE__ */ m("div", {
|
|
764
|
-
className: "x153jb6y xy8obcc xss6m8b",
|
|
765
|
-
children: n
|
|
766
|
-
})]
|
|
767
|
-
}),
|
|
768
|
-
i !== void 0 && /* @__PURE__ */ m("div", {
|
|
769
|
-
className: "xeuugli x1ewvobj xj0a0fe",
|
|
770
|
-
children: i
|
|
771
|
-
}),
|
|
772
|
-
r !== void 0 && /* @__PURE__ */ m("div", {
|
|
773
|
-
className: "x153jb6y xy8obcc",
|
|
774
|
-
children: r
|
|
775
|
-
})
|
|
776
|
-
]
|
|
815
|
+
children: d
|
|
816
|
+
}) : /* @__PURE__ */ _(i.Root, {
|
|
817
|
+
open: c,
|
|
818
|
+
onOpenChange: l,
|
|
819
|
+
className: "xrvj5dj x1hnptsi xeuugli xh8yej3",
|
|
820
|
+
children: d
|
|
777
821
|
})]
|
|
778
822
|
});
|
|
779
823
|
}
|
|
780
|
-
var
|
|
781
|
-
Root:
|
|
782
|
-
Item:
|
|
824
|
+
var Q = {
|
|
825
|
+
Root: X,
|
|
826
|
+
Item: Z
|
|
783
827
|
};
|
|
784
|
-
export {
|
|
828
|
+
export { J as Cell, I as CollectionEnd, D as CollectionPagination, L as CollectionScroll, w as CollectionToolbar, E as ColumnControls, N as DataTable, M as DataTableText, z as Details, T as FilterChips, R as Inspector, B as ListFooter, W as Metric, U as MetricGrid, q as Table, Q as Timeline, Y as Timestamp };
|