@mechane-ai/elements 0.7.1 → 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 +73 -36
- package/dist/ai.js +231 -170
- package/dist/assets/stylex.css +464 -166
- package/dist/{categorical-values-75J0TUkR.js → categorical-values-DYRiw5Qd.js} +2 -2
- package/dist/{chart-frame--DOsZKwP.js → chart-frame-RL1hCWBC.js} +2 -1
- package/dist/{chart-input-C-g586YE.js → chart-input-Bm3ot1yD.js} +2 -2
- package/dist/charts/cartesian.js +6 -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-D0Jmsj7w.js → code-block-B30xQKqg.js} +1 -1
- package/dist/collections.js +369 -244
- 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-HLYu0cmz.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 +144 -91
- 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/charts/src/chart-theme.d.ts +1 -0
- package/dist/packages/collections/src/data-table.d.ts +9 -1
- package/dist/packages/collections/src/index.d.ts +4 -2
- package/dist/packages/collections/src/metrics.d.ts +5 -2
- package/dist/packages/collections/src/timeline.d.ts +26 -0
- 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-DVybsnm4.js → pierre-tree-CRk09rx7.js} +2 -2
- package/dist/{src-DjTM64tN.js → src-Cc0Sadzr.js} +378 -295
- package/dist/{src-B_DCatpY.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-BkCsvZGi.js +0 -675
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
|
|
11
|
-
import { defaultRangeExtractor 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
|
+
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 T({ 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 E({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
|
111
111
|
]);
|
|
112
112
|
}
|
|
113
113
|
// packages/collections/src/data-table.tsx
|
|
114
|
-
var
|
|
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
|
|
@@ -132,6 +132,7 @@ var ce = b({}), le = "a, button, input, select, textarea, label, summary, [role=
|
|
|
132
132
|
k7Eaqz: "xeuugli",
|
|
133
133
|
kVQacm: "xysyzu8",
|
|
134
134
|
kZeWKH: "xish69e",
|
|
135
|
+
k3XXqK: "x1t137rt",
|
|
135
136
|
kPJHz1: "x13qnu6",
|
|
136
137
|
k7shQP: "x9v5kkp",
|
|
137
138
|
kZs9gx: "x19rmrnh",
|
|
@@ -196,7 +197,7 @@ var ce = b({}), le = "a, button, input, select, textarea, label, summary, [role=
|
|
|
196
197
|
},
|
|
197
198
|
cell: {
|
|
198
199
|
k7Eaqz: "x1cxjkq6",
|
|
199
|
-
k8WAf4: "
|
|
200
|
+
k8WAf4: "xt970qd",
|
|
200
201
|
kg3NbH: "x1m92p3w",
|
|
201
202
|
kXLuUW: "xxymvpz",
|
|
202
203
|
kHjlTd: "xj0a0fe",
|
|
@@ -222,160 +223,182 @@ var ce = b({}), le = "a, button, input, select, textarea, label, summary, [role=
|
|
|
222
223
|
k1xSpc: "xazwdyr",
|
|
223
224
|
$$css: !0
|
|
224
225
|
},
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
khDVqt: "xuxw1ft",
|
|
228
|
-
kg5iWk: "xlyipyv",
|
|
226
|
+
contentCell: {
|
|
227
|
+
k8WAf4: "xn9t2bk",
|
|
229
228
|
$$css: !0
|
|
230
229
|
},
|
|
231
230
|
spacer: (e) => [
|
|
232
|
-
|
|
231
|
+
A,
|
|
233
232
|
{
|
|
234
233
|
kZKoxP: e == null ? e : "x16ye13r",
|
|
235
234
|
$$css: !0
|
|
236
235
|
},
|
|
237
236
|
{ "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
|
|
238
237
|
]
|
|
239
|
-
},
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
},
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
},
|
|
246
|
-
content:
|
|
247
|
-
fill:
|
|
238
|
+
}, fe = {
|
|
239
|
+
fixed: j.content,
|
|
240
|
+
content: j.contentCell
|
|
241
|
+
}, pe = {
|
|
242
|
+
start: j.start,
|
|
243
|
+
end: j.end
|
|
244
|
+
}, me = {
|
|
245
|
+
content: j.content,
|
|
246
|
+
fill: j.fillFrame
|
|
247
|
+
}, he = {
|
|
248
|
+
content: j.content,
|
|
249
|
+
fill: j.fillViewport
|
|
248
250
|
};
|
|
249
|
-
function M({
|
|
250
|
-
|
|
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(() => {
|
|
251
274
|
let e = ae();
|
|
252
275
|
return e.columns(t.map((t) => e.display({
|
|
253
276
|
id: t.id,
|
|
254
277
|
header: t.label
|
|
255
278
|
})));
|
|
256
|
-
}, [t]),
|
|
257
|
-
features:
|
|
258
|
-
columns:
|
|
279
|
+
}, [t]), N = oe({
|
|
280
|
+
features: le,
|
|
281
|
+
columns: M,
|
|
259
282
|
data: e,
|
|
260
283
|
getRowId: n
|
|
261
|
-
}),
|
|
262
|
-
|
|
263
|
-
if (
|
|
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(() => {
|
|
286
|
+
if (x === void 0) {
|
|
287
|
+
G.current = void 0;
|
|
265
288
|
return;
|
|
266
289
|
}
|
|
267
|
-
if (
|
|
268
|
-
let e =
|
|
290
|
+
if (G.current === x) return;
|
|
291
|
+
let e = I.current?.querySelector(`[data-row-id="${CSS.escape(x)}"] [data-row-action]`);
|
|
269
292
|
if (e == null) return;
|
|
270
293
|
let t = requestAnimationFrame(() => {
|
|
271
|
-
e.focus({ preventScroll: !0 }),
|
|
294
|
+
e.focus({ preventScroll: !0 }), G.current = x;
|
|
272
295
|
});
|
|
273
296
|
return () => cancelAnimationFrame(t);
|
|
274
|
-
}, [e,
|
|
275
|
-
end:
|
|
276
|
-
onEndReached: T === void 0 ?
|
|
297
|
+
}, [e, x]), O({
|
|
298
|
+
end: L,
|
|
299
|
+
onEndReached: T === void 0 ? D : void 0,
|
|
277
300
|
content: e.length
|
|
278
|
-
}),
|
|
279
|
-
let e =
|
|
301
|
+
}), f(() => {
|
|
302
|
+
let e = R.current, t = z.current;
|
|
280
303
|
if (T === void 0 || e === null || t === null) return;
|
|
281
|
-
let n = new ResizeObserver(() =>
|
|
304
|
+
let n = new ResizeObserver(() => V(e.offsetHeight + t.offsetHeight));
|
|
282
305
|
return n.observe(e), n.observe(t), () => n.disconnect();
|
|
283
306
|
}, [
|
|
284
307
|
T,
|
|
285
|
-
|
|
286
|
-
|
|
308
|
+
S,
|
|
309
|
+
C
|
|
287
310
|
]);
|
|
288
|
-
let Y =
|
|
311
|
+
let Y = ce({
|
|
289
312
|
count: e.length,
|
|
290
313
|
enabled: T !== void 0,
|
|
291
|
-
getScrollElement: () =>
|
|
314
|
+
getScrollElement: () => I.current,
|
|
292
315
|
getItemKey: (t) => {
|
|
293
316
|
let r = e[t];
|
|
294
317
|
if (r === void 0) throw RangeError("The virtual row is outside the supplied table page.");
|
|
295
318
|
return n(r);
|
|
296
319
|
},
|
|
297
|
-
estimateSize: () => T?.estimatedRowHeight ??
|
|
298
|
-
scrollMargin:
|
|
299
|
-
scrollPaddingStart:
|
|
320
|
+
estimateSize: () => w === "fixed" ? k : T?.estimatedRowHeight ?? k,
|
|
321
|
+
scrollMargin: B,
|
|
322
|
+
scrollPaddingStart: B,
|
|
300
323
|
overscan: 6,
|
|
301
324
|
rangeExtractor: (t) => {
|
|
302
|
-
let n =
|
|
303
|
-
return
|
|
325
|
+
let n = se(t);
|
|
326
|
+
return K === -1 ? n : [.../* @__PURE__ */ new Set([
|
|
304
327
|
...n,
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
328
|
+
K - 1,
|
|
329
|
+
K,
|
|
330
|
+
K + 1
|
|
308
331
|
])].filter((t) => t >= 0 && t < e.length).toSorted((e, t) => e - t);
|
|
309
332
|
}
|
|
310
|
-
}),
|
|
333
|
+
}), X = T === void 0 ? N.getRowModel().rows.map((e, t) => ({
|
|
311
334
|
row: e,
|
|
312
335
|
index: t,
|
|
313
336
|
gap: 0
|
|
314
337
|
})) : Y.getVirtualItems().flatMap((e, t, n) => {
|
|
315
|
-
let r =
|
|
338
|
+
let r = N.getRowModel().rows[e.index];
|
|
316
339
|
return r === void 0 ? [] : [{
|
|
317
340
|
row: r,
|
|
318
341
|
index: e.index,
|
|
319
|
-
gap: e.start - (n[t - 1]?.end ??
|
|
342
|
+
gap: e.start - (n[t - 1]?.end ?? B)
|
|
320
343
|
}];
|
|
321
|
-
}),
|
|
322
|
-
|
|
323
|
-
|
|
344
|
+
}), Z = T !== void 0 && (e.length === 0 || Y.range?.endIndex === e.length - 1);
|
|
345
|
+
f(() => {
|
|
346
|
+
Z && D?.();
|
|
324
347
|
}, [
|
|
325
|
-
|
|
326
|
-
|
|
348
|
+
Z,
|
|
349
|
+
D,
|
|
327
350
|
e.length
|
|
328
|
-
]),
|
|
329
|
-
if (
|
|
330
|
-
let e = Array.from(
|
|
331
|
-
e != null && (e.focus({ preventScroll: T !== void 0 }),
|
|
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);
|
|
332
355
|
});
|
|
333
|
-
function
|
|
356
|
+
function Q(t, r) {
|
|
334
357
|
let i = t.metaKey || t.ctrlKey, a = t.altKey || t.shiftKey;
|
|
335
358
|
if (i || a) return;
|
|
336
|
-
let o =
|
|
359
|
+
let o = de.get(t.key);
|
|
337
360
|
if (o === void 0) return;
|
|
338
361
|
t.preventDefault();
|
|
339
362
|
let s = r + o, c = e[s];
|
|
340
|
-
c !== void 0 && (
|
|
363
|
+
c !== void 0 && (W.current = n(c), U(W.current), T !== void 0 && Y.scrollToIndex(s, { align: "auto" }));
|
|
341
364
|
}
|
|
342
|
-
let
|
|
343
|
-
return /* @__PURE__ */
|
|
344
|
-
...
|
|
345
|
-
children: [/* @__PURE__ */
|
|
346
|
-
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,
|
|
347
370
|
role: "region",
|
|
348
371
|
"aria-label": r,
|
|
349
372
|
tabIndex: 0,
|
|
350
|
-
...
|
|
351
|
-
children: [/* @__PURE__ */
|
|
373
|
+
...d.props(j.viewport, he[J], typeof T?.height == "number" && j.virtual(T.height)),
|
|
374
|
+
children: [/* @__PURE__ */ v("table", {
|
|
352
375
|
"aria-rowcount": T === void 0 ? void 0 : Math.max(1, e.length) + 1,
|
|
353
|
-
...
|
|
376
|
+
...d.props(j.table, (w === "fixed" || t.some((e) => e.truncate === !0)) && j.fixed, j.minimumWidth(ye, be)),
|
|
354
377
|
children: [
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
ref:
|
|
357
|
-
...
|
|
378
|
+
/* @__PURE__ */ _("caption", {
|
|
379
|
+
ref: R,
|
|
380
|
+
...d.props(j.caption, S && l.hidden),
|
|
358
381
|
children: r
|
|
359
382
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
ref:
|
|
363
|
-
...
|
|
364
|
-
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", {
|
|
365
388
|
scope: "col",
|
|
366
389
|
className: "x7wzq59 x13vifvy x1vjfegm xc9qbxq xt970qd xso031l x1q0q8m5 x1qndepd x153jb6y xpvm0e4 xo1l8bm xy8obcc xuxw1ft x187nhsf xeuugli x1m92p3w",
|
|
367
390
|
children: "Select"
|
|
368
391
|
}), t.map((e) => {
|
|
369
|
-
let t =
|
|
370
|
-
return /* @__PURE__ */
|
|
392
|
+
let t = a?.columnId === e.id ? a.direction : void 0;
|
|
393
|
+
return /* @__PURE__ */ _("th", {
|
|
371
394
|
scope: "col",
|
|
372
395
|
"aria-sort": t,
|
|
373
|
-
...
|
|
374
|
-
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", {
|
|
375
398
|
type: "button",
|
|
376
399
|
className: "x3nfvp2 x6s0dn4 x1hnptsi x1uey4wk xwu7q15 x1717udv xc342km x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x1ypdohk x1mkgjtd x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
377
400
|
onClick: () => {
|
|
378
|
-
|
|
401
|
+
s(t === "ascending" ? {
|
|
379
402
|
columnId: e.id,
|
|
380
403
|
direction: "descending"
|
|
381
404
|
} : t === "descending" ? void 0 : {
|
|
@@ -383,7 +406,7 @@ function M({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
383
406
|
direction: "ascending"
|
|
384
407
|
});
|
|
385
408
|
},
|
|
386
|
-
children: [e.label,
|
|
409
|
+
children: [e.label, _(t === "ascending" ? re : t === "descending" ? ne : ie, {
|
|
387
410
|
size: 14,
|
|
388
411
|
"aria-hidden": "true"
|
|
389
412
|
})]
|
|
@@ -391,164 +414,184 @@ function M({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
391
414
|
}, e.id);
|
|
392
415
|
})] })
|
|
393
416
|
}),
|
|
394
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ v("tbody", {
|
|
395
418
|
onBlur: (e) => {
|
|
396
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
419
|
+
e.currentTarget.contains(e.relatedTarget) || U(void 0);
|
|
397
420
|
},
|
|
398
421
|
children: [
|
|
399
|
-
|
|
422
|
+
X.map(({ row: e, index: n, gap: r }) => /* @__PURE__ */ v(ee, { children: [r > 0 && /* @__PURE__ */ _("tr", {
|
|
400
423
|
"aria-hidden": "true",
|
|
401
|
-
children: /* @__PURE__ */
|
|
402
|
-
colSpan:
|
|
403
|
-
...
|
|
424
|
+
children: /* @__PURE__ */ _("td", {
|
|
425
|
+
colSpan: $,
|
|
426
|
+
...d.props(j.spacer(r))
|
|
404
427
|
})
|
|
405
|
-
}), /* @__PURE__ */
|
|
428
|
+
}), /* @__PURE__ */ v("tr", {
|
|
406
429
|
"data-index": n,
|
|
407
430
|
"data-row-id": e.id,
|
|
408
431
|
"aria-rowindex": T === void 0 ? void 0 : n + 2,
|
|
409
|
-
ref: T === void 0 ? void 0 : Y.measureElement,
|
|
410
|
-
onFocus: () =>
|
|
432
|
+
ref: T === void 0 || w === "fixed" ? void 0 : Y.measureElement,
|
|
433
|
+
onFocus: () => U(e.id),
|
|
411
434
|
onClick: (e) => {
|
|
412
|
-
if (y === void 0 || !
|
|
435
|
+
if (y === void 0 || !F(e) || e.target instanceof Element && e.target.closest(ue) !== null) return;
|
|
413
436
|
let t = e.currentTarget.querySelector("[data-row-action]");
|
|
414
437
|
t?.focus({ preventScroll: !0 }), t?.click();
|
|
415
438
|
},
|
|
416
439
|
...{
|
|
417
|
-
0: { className: "
|
|
418
|
-
2: { className: "
|
|
419
|
-
1: { className: "
|
|
420
|
-
3: { className: "
|
|
421
|
-
}[(y !== void 0) << 1 | (
|
|
422
|
-
children: [
|
|
423
|
-
className: "
|
|
424
|
-
children: /* @__PURE__ */
|
|
425
|
-
"aria-label":
|
|
426
|
-
checked:
|
|
440
|
+
0: { className: "xsdox4t xso031l x1q0q8m5 x1qndepd xzro8vx" },
|
|
441
|
+
2: { className: "xsdox4t xso031l x1q0q8m5 x1qndepd xzro8vx x1ypdohk" },
|
|
442
|
+
1: { className: "xsdox4t xso031l x1q0q8m5 x1qndepd xzro8vx x1r8u7ye" },
|
|
443
|
+
3: { className: "xsdox4t xso031l x1q0q8m5 x1qndepd xzro8vx x1ypdohk x1r8u7ye" }
|
|
444
|
+
}[(y !== void 0) << 1 | (c?.has(e.id) === !0 || b === e.id)],
|
|
445
|
+
children: [c !== void 0 && /* @__PURE__ */ _("td", {
|
|
446
|
+
className: "xt970qd xxymvpz xj0a0fe x187nhsf xeuugli x1m92p3w",
|
|
447
|
+
children: /* @__PURE__ */ _(o.Root, {
|
|
448
|
+
"aria-label": g(e.original),
|
|
449
|
+
checked: c.has(e.id),
|
|
427
450
|
onCheckedChange: (t) => {
|
|
428
|
-
let n = new Set(
|
|
429
|
-
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);
|
|
430
453
|
},
|
|
431
|
-
children: /* @__PURE__ */
|
|
454
|
+
children: /* @__PURE__ */ _(o.Indicator, {})
|
|
432
455
|
})
|
|
433
|
-
}), t.map((t, r) => /* @__PURE__ */
|
|
434
|
-
...
|
|
435
|
-
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, {
|
|
436
459
|
row: e.original,
|
|
437
460
|
action: y,
|
|
438
461
|
active: b === e.id,
|
|
439
|
-
onKeyDown: (e) =>
|
|
440
|
-
children: /* @__PURE__ */
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
1: { className: "x1lliihq xeuugli x193iq5w xb3r6kr xuxw1ft xlyipyv" }
|
|
444
|
-
}[t.truncate === !0 | 0],
|
|
462
|
+
onKeyDown: (e) => Q(e, n),
|
|
463
|
+
children: /* @__PURE__ */ _(P, {
|
|
464
|
+
fixed: w === "fixed",
|
|
465
|
+
truncate: t.truncate,
|
|
445
466
|
children: t.cell(e.original)
|
|
446
467
|
})
|
|
447
|
-
}) : /* @__PURE__ */
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
1: { className: "x1lliihq xeuugli x193iq5w xb3r6kr xuxw1ft xlyipyv" }
|
|
451
|
-
}[t.truncate === !0 | 0],
|
|
468
|
+
}) : /* @__PURE__ */ _(P, {
|
|
469
|
+
fixed: w === "fixed",
|
|
470
|
+
truncate: t.truncate,
|
|
452
471
|
children: t.cell(e.original)
|
|
453
472
|
})
|
|
454
473
|
}, t.id))]
|
|
455
474
|
})] }, e.id)),
|
|
456
|
-
T !== void 0 &&
|
|
475
|
+
T !== void 0 && xe > 0 && /* @__PURE__ */ _("tr", {
|
|
457
476
|
"aria-hidden": "true",
|
|
458
|
-
children: /* @__PURE__ */
|
|
459
|
-
colSpan:
|
|
460
|
-
...
|
|
477
|
+
children: /* @__PURE__ */ _("td", {
|
|
478
|
+
colSpan: $,
|
|
479
|
+
...d.props(j.spacer(xe))
|
|
461
480
|
})
|
|
462
481
|
}),
|
|
463
|
-
e.length === 0 && /* @__PURE__ */
|
|
464
|
-
colSpan:
|
|
482
|
+
e.length === 0 && /* @__PURE__ */ _("tr", { children: /* @__PURE__ */ _("td", {
|
|
483
|
+
colSpan: $,
|
|
465
484
|
className: "x1ttojsm x2b8uid x153jb6y",
|
|
466
485
|
children: i
|
|
467
486
|
}) })
|
|
468
487
|
]
|
|
469
488
|
})
|
|
470
489
|
]
|
|
471
|
-
}), /* @__PURE__ */
|
|
472
|
-
ref:
|
|
490
|
+
}), /* @__PURE__ */ _("div", {
|
|
491
|
+
ref: L,
|
|
473
492
|
...{
|
|
474
493
|
0: {},
|
|
475
|
-
1: { className: "xid9utz x1c8xbx5" }
|
|
476
|
-
}[
|
|
477
|
-
children:
|
|
494
|
+
1: { className: "xid9utz x1c8xbx5 x15x95ik x1az1eml" }
|
|
495
|
+
}[E !== void 0 | 0],
|
|
496
|
+
children: E
|
|
478
497
|
})]
|
|
479
|
-
}),
|
|
498
|
+
}), ve && /* @__PURE__ */ _("div", {
|
|
480
499
|
className: "x1c8xbx5 x178xt8z x13fuv20 xhjagg4",
|
|
481
|
-
children:
|
|
500
|
+
children: A
|
|
482
501
|
})]
|
|
483
502
|
});
|
|
484
503
|
}
|
|
485
|
-
function
|
|
504
|
+
function P({ fixed: e, truncate: t, children: n }) {
|
|
505
|
+
let r = typeof n == "string" && (t ?? e);
|
|
506
|
+
return /* @__PURE__ */ _("span", {
|
|
507
|
+
...{
|
|
508
|
+
0: { className: "x78zum5 x6s0dn4 xeuugli xh8yej3 x1dqyrwa" },
|
|
509
|
+
1: { className: "x78zum5 x6s0dn4 xeuugli xh8yej3 xt7dq6l" }
|
|
510
|
+
}[!e | 0],
|
|
511
|
+
children: /* @__PURE__ */ _("span", {
|
|
512
|
+
title: typeof n == "string" ? n : void 0,
|
|
513
|
+
...{
|
|
514
|
+
0: { className: "x1lliihq xeuugli x193iq5w" },
|
|
515
|
+
2: { className: "x1lliihq xeuugli x193iq5w xh8yej3 xjexgjb" },
|
|
516
|
+
1: { className: "x1lliihq xeuugli x193iq5w xb3r6kr xuxw1ft xlyipyv" },
|
|
517
|
+
3: { className: "x1lliihq xeuugli x193iq5w xh8yej3 xjexgjb xb3r6kr xuxw1ft xlyipyv" }
|
|
518
|
+
}[!!e << 1 | !!r],
|
|
519
|
+
children: n
|
|
520
|
+
})
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
function F(e) {
|
|
486
524
|
if (e.defaultPrevented || e.button !== 0) return !1;
|
|
487
525
|
let t = e.metaKey || e.ctrlKey, n = e.altKey || e.shiftKey;
|
|
488
526
|
return t || n ? !1 : e.detail === 0 || e.currentTarget.ownerDocument.getSelection()?.isCollapsed !== !1;
|
|
489
527
|
}
|
|
490
|
-
function
|
|
491
|
-
|
|
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", {
|
|
492
530
|
type: "button",
|
|
493
|
-
"aria-label":
|
|
531
|
+
"aria-label": a,
|
|
494
532
|
"aria-pressed": n,
|
|
495
533
|
"data-row-action": !0,
|
|
496
534
|
onKeyDown: i,
|
|
497
535
|
onClick: (n) => {
|
|
498
|
-
|
|
536
|
+
F(n) && t.onActivate(e);
|
|
499
537
|
},
|
|
500
|
-
className: "x1rh3ycu x1hx0egp
|
|
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",
|
|
501
539
|
children: r
|
|
502
|
-
}) : /* @__PURE__ */
|
|
540
|
+
}) : /* @__PURE__ */ _("a", {
|
|
503
541
|
href: t.href(e),
|
|
504
|
-
"aria-label":
|
|
542
|
+
"aria-label": a,
|
|
505
543
|
"data-row-action": !0,
|
|
506
544
|
onKeyDown: i,
|
|
507
545
|
onClick: (n) => {
|
|
508
|
-
t.onActivate !== void 0 &&
|
|
546
|
+
t.onActivate !== void 0 && F(n) && (n.preventDefault(), t.onActivate(e));
|
|
509
547
|
},
|
|
510
|
-
className: "x1rh3ycu x1hx0egp
|
|
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",
|
|
511
549
|
children: r
|
|
512
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
|
+
}) })] });
|
|
513
556
|
}
|
|
514
557
|
// packages/collections/src/collection-scroll.tsx
|
|
515
|
-
function
|
|
558
|
+
function I(e) {
|
|
516
559
|
switch (e.status) {
|
|
517
|
-
case "loading": return /* @__PURE__ */
|
|
560
|
+
case "loading": return /* @__PURE__ */ _("span", {
|
|
518
561
|
role: "status",
|
|
519
562
|
children: e.message ?? "Loading…"
|
|
520
563
|
});
|
|
521
|
-
case "complete": return /* @__PURE__ */
|
|
522
|
-
case "ready": return /* @__PURE__ */
|
|
564
|
+
case "complete": return e.message === void 0 ? null : /* @__PURE__ */ _(a, { children: e.message });
|
|
565
|
+
case "ready": return /* @__PURE__ */ _(t, {
|
|
523
566
|
onClick: e.onLoadMore,
|
|
524
567
|
children: e.message ?? "Load more"
|
|
525
568
|
});
|
|
526
|
-
case "error": return /* @__PURE__ */
|
|
569
|
+
case "error": return /* @__PURE__ */ v(r, {
|
|
527
570
|
role: "status",
|
|
528
|
-
children: [/* @__PURE__ */
|
|
571
|
+
children: [/* @__PURE__ */ _(a, { children: e.message ?? "More records could not be loaded." }), /* @__PURE__ */ _(t, {
|
|
529
572
|
onClick: e.onLoadMore,
|
|
530
573
|
children: "Retry"
|
|
531
574
|
})]
|
|
532
575
|
});
|
|
533
576
|
}
|
|
534
577
|
}
|
|
535
|
-
function
|
|
536
|
-
let a =
|
|
537
|
-
|
|
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({
|
|
538
581
|
end: o,
|
|
539
582
|
viewport: r ? a : void 0,
|
|
540
583
|
onEndReached: n,
|
|
541
584
|
content: e
|
|
542
585
|
});
|
|
543
|
-
let s = /* @__PURE__ */
|
|
586
|
+
let s = /* @__PURE__ */ _("div", {
|
|
544
587
|
ref: o,
|
|
545
588
|
...{
|
|
546
589
|
0: {},
|
|
547
|
-
1: { className: "xid9utz x1c8xbx5 x153jb6y xy8obcc x2b8uid" }
|
|
590
|
+
1: { className: "x15x95ik x1az1eml xid9utz x1c8xbx5 x153jb6y xy8obcc x2b8uid" }
|
|
548
591
|
}[t !== void 0 | 0],
|
|
549
592
|
children: t
|
|
550
593
|
});
|
|
551
|
-
return /* @__PURE__ */
|
|
594
|
+
return /* @__PURE__ */ v("div", {
|
|
552
595
|
ref: a,
|
|
553
596
|
...{
|
|
554
597
|
0: {},
|
|
@@ -562,28 +605,28 @@ function F({ children: e, endContent: t, onEndReached: n, fill: r = !1, endPosit
|
|
|
562
605
|
});
|
|
563
606
|
}
|
|
564
607
|
// packages/collections/src/inspector.tsx
|
|
565
|
-
function
|
|
566
|
-
return /* @__PURE__ */
|
|
567
|
-
...
|
|
568
|
-
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", {
|
|
569
612
|
className: "xeuugli",
|
|
570
613
|
children: e
|
|
571
|
-
}), /* @__PURE__ */
|
|
614
|
+
}), /* @__PURE__ */ _("aside", {
|
|
572
615
|
"aria-label": n,
|
|
573
616
|
className: "xeuugli x1jvlu93 xpvm0e4 x178xt8z x13fuv20 xhjagg4",
|
|
574
617
|
children: t
|
|
575
618
|
})]
|
|
576
619
|
});
|
|
577
620
|
}
|
|
578
|
-
function
|
|
579
|
-
return /* @__PURE__ */
|
|
580
|
-
...
|
|
581
|
-
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", {
|
|
582
625
|
className: "xjp7ctv",
|
|
583
|
-
children: [/* @__PURE__ */
|
|
626
|
+
children: [/* @__PURE__ */ _("dt", {
|
|
584
627
|
className: "x153jb6y",
|
|
585
628
|
children: e
|
|
586
|
-
}), /* @__PURE__ */
|
|
629
|
+
}), /* @__PURE__ */ _("dd", {
|
|
587
630
|
className: "x1ghz6dp xbixft xj0a0fe xss6m8b",
|
|
588
631
|
children: t
|
|
589
632
|
})]
|
|
@@ -591,36 +634,57 @@ function L({ items: e, ...t }) {
|
|
|
591
634
|
});
|
|
592
635
|
}
|
|
593
636
|
// packages/collections/src/list-footer.tsx
|
|
594
|
-
function
|
|
595
|
-
return /* @__PURE__ */
|
|
596
|
-
...
|
|
597
|
-
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", {
|
|
598
641
|
className: "x78zum5 x6s0dn4 x1hnptsi",
|
|
599
642
|
children: t
|
|
600
643
|
})]
|
|
601
644
|
});
|
|
602
645
|
}
|
|
603
646
|
// packages/collections/src/metrics.tsx
|
|
604
|
-
|
|
605
|
-
|
|
647
|
+
var V = {
|
|
648
|
+
grid: {
|
|
649
|
+
k1xSpc: "x78zum5",
|
|
650
|
+
kwnvtZ: "x1a02dak",
|
|
651
|
+
khm7nJ: "xpb3s3w",
|
|
652
|
+
k1C7PZ: "x1i3977y",
|
|
653
|
+
kogj98: "x1ghz6dp",
|
|
654
|
+
$$css: !0
|
|
655
|
+
},
|
|
656
|
+
columns: {
|
|
657
|
+
k1xSpc: "xrvj5dj",
|
|
658
|
+
kumcoG: "xpuu00s",
|
|
659
|
+
kOIVth: "x1j825kq",
|
|
660
|
+
k7Eaqz: "xeuugli",
|
|
661
|
+
kogj98: "x1ghz6dp",
|
|
662
|
+
$$css: !0
|
|
663
|
+
}
|
|
664
|
+
}, H = {
|
|
665
|
+
inline: V.grid,
|
|
666
|
+
columns: V.columns
|
|
667
|
+
};
|
|
668
|
+
function U({ layout: e = "inline", ...t }) {
|
|
669
|
+
return /* @__PURE__ */ _("dl", { ...u(d.props(H[e]), t) });
|
|
606
670
|
}
|
|
607
|
-
function
|
|
608
|
-
return /* @__PURE__ */
|
|
609
|
-
...
|
|
610
|
-
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", {
|
|
611
675
|
className: "x153jb6y x9ek82g",
|
|
612
676
|
children: e
|
|
613
|
-
}), /* @__PURE__ */
|
|
677
|
+
}), /* @__PURE__ */ _("dd", {
|
|
614
678
|
className: "x1ghz6dp xbixft xk50ysn xss6m8b",
|
|
615
679
|
children: t
|
|
616
680
|
})]
|
|
617
681
|
});
|
|
618
682
|
}
|
|
619
683
|
// packages/collections/src/table.tsx
|
|
620
|
-
var
|
|
684
|
+
var G = {
|
|
621
685
|
kzqmXN: "x5lhr3w",
|
|
622
686
|
$$css: !0
|
|
623
|
-
},
|
|
687
|
+
}, K = {
|
|
624
688
|
secondary: {
|
|
625
689
|
k1xSpc: "x1n9xxwz xazwdyr",
|
|
626
690
|
$$css: !0
|
|
@@ -629,7 +693,7 @@ var V = {
|
|
|
629
693
|
kzqmXN: "x2ipgtl",
|
|
630
694
|
$$css: !0
|
|
631
695
|
},
|
|
632
|
-
column: (e) => [
|
|
696
|
+
column: (e) => [G, { "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(`${e}%`) }],
|
|
633
697
|
th: {
|
|
634
698
|
kVAEAm: "x1n2onr6",
|
|
635
699
|
kZKoxP: "xc9qbxq",
|
|
@@ -659,45 +723,106 @@ var V = {
|
|
|
659
723
|
$$css: !0
|
|
660
724
|
}
|
|
661
725
|
};
|
|
662
|
-
function
|
|
726
|
+
function q({ headers: e, children: t, label: n, ...r }) {
|
|
663
727
|
let i = e.findLastIndex((e) => typeof e == "string" || e.secondary !== !0);
|
|
664
|
-
return /* @__PURE__ */
|
|
728
|
+
return /* @__PURE__ */ _("div", {
|
|
665
729
|
role: "region",
|
|
666
730
|
"aria-label": n,
|
|
667
731
|
tabIndex: 0,
|
|
668
732
|
className: "xeuugli xh8yej3 xw2csxc x13qnu6 x9v5kkp x19rmrnh x1bqaal",
|
|
669
|
-
children: /* @__PURE__ */
|
|
670
|
-
...
|
|
733
|
+
children: /* @__PURE__ */ v("table", {
|
|
734
|
+
...u({ "aria-label": n }, {
|
|
671
735
|
0: { className: "xh8yej3 x1mwwwfo xpvm0e4 x1hz01jw xvmahel xtqrqnz x1778rvt xdpxx8g" },
|
|
672
736
|
1: { className: "xh8yej3 x1mwwwfo xpvm0e4 x1hz01jw xvmahel xtqrqnz x1778rvt xdpxx8g x140o2bo" }
|
|
673
737
|
}[!!e.some((e) => typeof e != "string") | 0], r),
|
|
674
|
-
children: [/* @__PURE__ */
|
|
738
|
+
children: [/* @__PURE__ */ _("thead", { children: /* @__PURE__ */ _("tr", { children: e.map((t, n) => /* @__PURE__ */ _("th", {
|
|
675
739
|
scope: "col",
|
|
676
|
-
...
|
|
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),
|
|
677
741
|
children: typeof t == "string" ? t : t.label
|
|
678
|
-
}, typeof t == "string" ? t : t.label)) }) }), /* @__PURE__ */
|
|
742
|
+
}, typeof t == "string" ? t : t.label)) }) }), /* @__PURE__ */ _("tbody", { children: t })]
|
|
679
743
|
})
|
|
680
744
|
});
|
|
681
745
|
}
|
|
682
|
-
function
|
|
683
|
-
return /* @__PURE__ */
|
|
684
|
-
...
|
|
746
|
+
function J({ children: e, secondary: t = !1, mobileLabel: n, ...r }) {
|
|
747
|
+
return /* @__PURE__ */ v("td", {
|
|
748
|
+
...u({
|
|
685
749
|
0: { className: "x14o62y9 x9f619 x1t0vds8 x1m92p3w xbixft xxymvpz xuxw1ft xss6m8b xb3r6kr xlyipyv" },
|
|
686
750
|
1: { className: "x14o62y9 x9f619 x1t0vds8 x1m92p3w xbixft xxymvpz xuxw1ft xss6m8b xb3r6kr xlyipyv x1n9xxwz xazwdyr" }
|
|
687
751
|
}[!!t | 0], r),
|
|
688
|
-
children: [e, n !== void 0 && /* @__PURE__ */
|
|
752
|
+
children: [e, n !== void 0 && /* @__PURE__ */ _("small", {
|
|
689
753
|
className: "x1s85apg xacuhyv x153jb6y xy8obcc xas2l8k xb3r6kr xlyipyv",
|
|
690
754
|
children: n
|
|
691
755
|
})]
|
|
692
756
|
});
|
|
693
757
|
}
|
|
694
758
|
// packages/collections/src/timestamp.tsx
|
|
695
|
-
function
|
|
696
|
-
return /* @__PURE__ */
|
|
759
|
+
function Y({ dateTime: e, label: t, title: n }) {
|
|
760
|
+
return n === void 0 ? /* @__PURE__ */ _("time", {
|
|
697
761
|
dateTime: e,
|
|
698
|
-
|
|
699
|
-
|
|
762
|
+
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xuxw1ft x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
763
|
+
children: t
|
|
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 }) }) })] });
|
|
773
|
+
}
|
|
774
|
+
// packages/collections/src/timeline.tsx
|
|
775
|
+
function X({ label: e, children: t }) {
|
|
776
|
+
return /* @__PURE__ */ _("ol", {
|
|
777
|
+
"aria-label": e,
|
|
778
|
+
className: "xe8uvvx x1ghz6dp x1717udv xeuugli",
|
|
700
779
|
children: t
|
|
701
780
|
});
|
|
702
781
|
}
|
|
703
|
-
|
|
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", {
|
|
808
|
+
className: "x1n2onr6 xrvj5dj x1qpdrs7 x1y1mm1b xhlx3wy xeuugli x1hz01jw xtqrqnz x1778rvt xbixft x1cpjm7i x1hmns74 x1lk18uv x1gi6gvw x1jw5pjq x1vgi0k x1mi36wk x1wse844 xup0pd7",
|
|
809
|
+
children: [/* @__PURE__ */ _("span", {
|
|
810
|
+
"aria-hidden": !0,
|
|
811
|
+
className: "x78zum5 x6s0dn4 x1qx5ct2 x153jb6y",
|
|
812
|
+
children: e
|
|
813
|
+
}), o === void 0 ? /* @__PURE__ */ _("div", {
|
|
814
|
+
className: "xrvj5dj x1hnptsi xeuugli",
|
|
815
|
+
children: d
|
|
816
|
+
}) : /* @__PURE__ */ _(i.Root, {
|
|
817
|
+
open: c,
|
|
818
|
+
onOpenChange: l,
|
|
819
|
+
className: "xrvj5dj x1hnptsi xeuugli xh8yej3",
|
|
820
|
+
children: d
|
|
821
|
+
})]
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
var Q = {
|
|
825
|
+
Root: X,
|
|
826
|
+
Item: Z
|
|
827
|
+
};
|
|
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 };
|