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