@mechane-ai/elements 0.9.0 → 0.11.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 +153 -133
- package/dist/{categorical-values-DYRiw5Qd.js → categorical-values-FYc43JCa.js} +4 -4
- package/dist/{chart-frame-RL1hCWBC.js → chart-frame-Bczk5sWj.js} +22 -14
- package/dist/{chart-input-Bm3ot1yD.js → chart-input-CbzVN76m.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 +119 -92
- package/dist/charts.js +1 -1
- package/dist/code-block-B7xzM3tD.js +180 -0
- package/dist/collections.js +319 -242
- 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-CatGOrbo.js} +6 -2
- package/dist/content.js +172 -153
- package/dist/{assets/stylex.css → elements.css} +585 -229
- 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/ai/src/conversation.d.ts +14 -2
- package/dist/packages/ai/src/index.d.ts +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/charts/src/timeline/waterfall.d.ts +3 -2
- package/dist/packages/collections/src/collection-scroll.d.ts +2 -1
- package/dist/packages/collections/src/index.d.ts +1 -0
- package/dist/packages/collections/src/inspector.d.ts +6 -3
- 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/agent-avatar-glyphs.d.ts +1 -1
- 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-D47uA7lb.js} +3 -3
- package/dist/{src-Cc0Sadzr.js → src-C_heP5kL.js} +295 -221
- package/dist/src-Cs0dRc4X.js +617 -0
- package/dist/src-D05isEh_.js +1652 -0
- package/dist/src-DXsGTJgv.js +969 -0
- package/dist/tokens.js +33 -25
- package/dist/viewer-styles-CpHqp5Qv.js +70 -0
- package/package.json +2 -1
- package/packages/foundations/src/tokens.stylex.ts +55 -48
- 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/src-elMBQ2Dh.js +0 -1087
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-D05isEh_.js";
|
|
2
|
+
import { r as a } from "./src-C_heP5kL.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,89 +284,89 @@ 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
|
+
}), ge = 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
|
-
}), Z =
|
|
359
|
+
}), Z = E !== void 0 && (e.length === 0 || X.range?.endIndex === e.length - 1);
|
|
345
360
|
f(() => {
|
|
346
|
-
Z &&
|
|
361
|
+
Z && O?.();
|
|
347
362
|
}, [
|
|
348
363
|
Z,
|
|
349
|
-
|
|
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
371
|
function Q(t, r) {
|
|
357
372
|
let i = t.metaKey || t.ctrlKey, a = t.altKey || t.shiftKey;
|
|
@@ -360,43 +375,47 @@ function N({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
|
|
|
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
|
+
ge.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:
|
|
486
|
+
action: b,
|
|
487
|
+
active: x === e.id,
|
|
462
488
|
onKeyDown: (e) => Q(e, n),
|
|
463
|
-
children: /* @__PURE__ */ _(
|
|
464
|
-
fixed:
|
|
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,113 +569,163 @@ 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…"
|
|
563
591
|
});
|
|
564
|
-
case "complete": return
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
children:
|
|
592
|
+
case "complete": return r.message === void 0 ? null : /* @__PURE__ */ _(t, {
|
|
593
|
+
variant: "caption",
|
|
594
|
+
tone: "muted",
|
|
595
|
+
children: r.message
|
|
568
596
|
});
|
|
569
|
-
case "
|
|
597
|
+
case "ready": return /* @__PURE__ */ _(e, {
|
|
598
|
+
onClick: r.onLoadMore,
|
|
599
|
+
children: r.message ?? "Load more"
|
|
600
|
+
});
|
|
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
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
647
|
+
var z = 860;
|
|
648
|
+
function B({ master: t, detail: n, label: r, masterLabel: i, revealKey: a, returnFocusRef: o, ...s }) {
|
|
649
|
+
let c = m(null), l = m(null), d = m(null);
|
|
650
|
+
p(() => {
|
|
651
|
+
a !== void 0 && c.current !== null && d.current !== null && c.current.clientWidth <= z && (d.current.focus({ preventScroll: !0 }), d.current.scrollIntoView({
|
|
652
|
+
block: "start",
|
|
653
|
+
behavior: "instant"
|
|
654
|
+
}));
|
|
655
|
+
}, [a]);
|
|
656
|
+
function ee() {
|
|
657
|
+
let e = o?.current ?? l.current;
|
|
658
|
+
e?.focus({ preventScroll: !0 }), e?.scrollIntoView({
|
|
659
|
+
block: "nearest",
|
|
660
|
+
behavior: "instant"
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
return /* @__PURE__ */ _("div", {
|
|
664
|
+
...u({ className: "x9vvk8s x12h1iku xeuugli xbixft x1hz01jw xtqrqnz x1778rvt" }, s),
|
|
665
|
+
children: /* @__PURE__ */ v("div", {
|
|
666
|
+
ref: c,
|
|
667
|
+
className: "xrvj5dj x4ruv2j x1y7acmc x7a106z x1j825kq xeuugli",
|
|
668
|
+
children: [/* @__PURE__ */ _("div", {
|
|
669
|
+
ref: l,
|
|
670
|
+
role: "group",
|
|
671
|
+
"aria-label": i,
|
|
672
|
+
tabIndex: -1,
|
|
673
|
+
className: "xeuugli",
|
|
674
|
+
children: t
|
|
675
|
+
}), /* @__PURE__ */ v("aside", {
|
|
676
|
+
ref: d,
|
|
677
|
+
"aria-label": r,
|
|
678
|
+
tabIndex: -1,
|
|
679
|
+
className: "x7wzq59 x7cfggw xqfmuo8 xeuugli x1sbza1b xhuqrux xexx8yu xdz7uhd xpilrb4 xdctr63 x1t7ytsu x97x49r x972fbf x1mg79u0 x13fuv20 xhjagg4 x14ijc3v x13qnu6 x9v5kkp x19rmrnh x12ijfkc",
|
|
680
|
+
children: [/* @__PURE__ */ _("div", {
|
|
681
|
+
className: "x1s85apg x1yamub6 x1xxlxpq",
|
|
682
|
+
children: /* @__PURE__ */ v(e, {
|
|
683
|
+
size: "sm",
|
|
684
|
+
variant: "ghost",
|
|
685
|
+
onClick: ee,
|
|
686
|
+
children: ["Back to ", i.toLowerCase()]
|
|
687
|
+
})
|
|
688
|
+
}), n]
|
|
689
|
+
})]
|
|
690
|
+
})
|
|
619
691
|
});
|
|
620
692
|
}
|
|
621
|
-
function
|
|
693
|
+
function V({ items: e, ...t }) {
|
|
622
694
|
return /* @__PURE__ */ _("dl", {
|
|
623
|
-
...u({ className: "x1ghz6dp xrvj5dj
|
|
695
|
+
...u({ className: "x1ghz6dp xrvj5dj xezdspq x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
|
|
624
696
|
children: e.map(({ label: e, value: t }) => /* @__PURE__ */ v("div", {
|
|
625
697
|
className: "xjp7ctv",
|
|
626
698
|
children: [/* @__PURE__ */ _("dt", {
|
|
627
|
-
className: "x153jb6y",
|
|
699
|
+
className: "xeuugli x153jb6y xj0a0fe",
|
|
628
700
|
children: e
|
|
629
701
|
}), /* @__PURE__ */ _("dd", {
|
|
630
|
-
className: "x1ghz6dp xbixft xj0a0fe xss6m8b",
|
|
702
|
+
className: "xeuugli x1ghz6dp xbixft xj0a0fe xss6m8b",
|
|
631
703
|
children: t
|
|
632
704
|
})]
|
|
633
705
|
}, e))
|
|
634
706
|
});
|
|
635
707
|
}
|
|
636
708
|
// packages/collections/src/list-footer.tsx
|
|
637
|
-
function
|
|
709
|
+
function H({ children: e, actions: t, ...n }) {
|
|
638
710
|
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: "
|
|
711
|
+
...u({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak xeuugli x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
|
|
712
|
+
children: [/* @__PURE__ */ _("div", {
|
|
713
|
+
className: "xeuugli xj0a0fe",
|
|
714
|
+
children: e
|
|
715
|
+
}), t != null && /* @__PURE__ */ _("div", {
|
|
716
|
+
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli",
|
|
642
717
|
children: t
|
|
643
718
|
})]
|
|
644
719
|
});
|
|
645
720
|
}
|
|
646
721
|
// packages/collections/src/metrics.tsx
|
|
647
|
-
var
|
|
722
|
+
var U = {
|
|
648
723
|
grid: {
|
|
649
724
|
k1xSpc: "x78zum5",
|
|
650
725
|
kwnvtZ: "x1a02dak",
|
|
651
726
|
khm7nJ: "xpb3s3w",
|
|
652
727
|
k1C7PZ: "x1i3977y",
|
|
728
|
+
k7Eaqz: "xeuugli",
|
|
653
729
|
kogj98: "x1ghz6dp",
|
|
654
730
|
$$css: !0
|
|
655
731
|
},
|
|
@@ -661,49 +737,46 @@ var V = {
|
|
|
661
737
|
kogj98: "x1ghz6dp",
|
|
662
738
|
$$css: !0
|
|
663
739
|
}
|
|
664
|
-
},
|
|
665
|
-
inline:
|
|
666
|
-
columns:
|
|
740
|
+
}, W = {
|
|
741
|
+
inline: U.grid,
|
|
742
|
+
columns: U.columns
|
|
667
743
|
};
|
|
668
|
-
function
|
|
669
|
-
return /* @__PURE__ */ _("dl", { ...u(d.props(
|
|
744
|
+
function G({ layout: e = "inline", ...t }) {
|
|
745
|
+
return /* @__PURE__ */ _("dl", { ...u(d.props(W[e]), t) });
|
|
670
746
|
}
|
|
671
|
-
function
|
|
747
|
+
function K({ label: e, value: t, ...n }) {
|
|
672
748
|
return /* @__PURE__ */ v("div", {
|
|
673
|
-
...u({ className: "x3nfvp2 x1pha0wt xunmzkg xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
|
|
749
|
+
...u({ className: "x3nfvp2 x1pha0wt x1a02dak xunmzkg xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
|
|
674
750
|
children: [/* @__PURE__ */ _("dt", {
|
|
675
|
-
className: "x153jb6y x9ek82g",
|
|
751
|
+
className: "xeuugli x153jb6y x9ek82g xj0a0fe",
|
|
676
752
|
children: e
|
|
677
753
|
}), /* @__PURE__ */ _("dd", {
|
|
678
|
-
className: "x1ghz6dp xbixft
|
|
754
|
+
className: "xeuugli x1ghz6dp xbixft xk4h15q xss6m8b xj0a0fe",
|
|
679
755
|
children: t
|
|
680
756
|
})]
|
|
681
757
|
});
|
|
682
758
|
}
|
|
683
759
|
// packages/collections/src/table.tsx
|
|
684
|
-
var
|
|
685
|
-
kzqmXN: "
|
|
760
|
+
var q = {
|
|
761
|
+
kzqmXN: "x11ymkkh x2ipgtl",
|
|
686
762
|
$$css: !0
|
|
687
|
-
},
|
|
763
|
+
}, J = {
|
|
688
764
|
secondary: {
|
|
689
765
|
k1xSpc: "x1n9xxwz xazwdyr",
|
|
690
766
|
$$css: !0
|
|
691
767
|
},
|
|
692
|
-
|
|
693
|
-
kzqmXN: "x2ipgtl",
|
|
694
|
-
$$css: !0
|
|
695
|
-
},
|
|
696
|
-
column: (e) => [G, { "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(`${e}%`) }],
|
|
768
|
+
column: (e) => [q, { "--x-1xmrurk": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(`${e}%`) }],
|
|
697
769
|
th: {
|
|
698
770
|
kVAEAm: "x1n2onr6",
|
|
699
|
-
kZKoxP: "
|
|
771
|
+
kZKoxP: "x24vdcc",
|
|
700
772
|
kB7OPa: "x9f619",
|
|
701
773
|
k8WAf4: "xt970qd",
|
|
702
774
|
kg3NbH: "x1m92p3w",
|
|
703
775
|
kWkggS: "xpvm0e4",
|
|
704
776
|
kMwMTN: "x153jb6y",
|
|
705
777
|
kGuDYH: "xy8obcc",
|
|
706
|
-
k63SB2: "
|
|
778
|
+
k63SB2: "xj57cvi",
|
|
779
|
+
kLWn49: "xas2l8k",
|
|
707
780
|
khDVqt: "xuxw1ft",
|
|
708
781
|
k5JduY: "x1s928wv",
|
|
709
782
|
kwXMNM: "x1j6awrg",
|
|
@@ -723,13 +796,13 @@ var G = {
|
|
|
723
796
|
$$css: !0
|
|
724
797
|
}
|
|
725
798
|
};
|
|
726
|
-
function
|
|
799
|
+
function Y({ headers: e, children: t, label: n, ...r }) {
|
|
727
800
|
let i = e.findLastIndex((e) => typeof e == "string" || e.secondary !== !0);
|
|
728
801
|
return /* @__PURE__ */ _("div", {
|
|
729
802
|
role: "region",
|
|
730
803
|
"aria-label": n,
|
|
731
804
|
tabIndex: 0,
|
|
732
|
-
className: "xeuugli xh8yej3 xw2csxc x13qnu6 x9v5kkp x19rmrnh x1bqaal",
|
|
805
|
+
className: "xeuugli xh8yej3 xw2csxc x1t137rt x13qnu6 x9v5kkp x19rmrnh x1bqaal",
|
|
733
806
|
children: /* @__PURE__ */ v("table", {
|
|
734
807
|
...u({ "aria-label": n }, {
|
|
735
808
|
0: { className: "xh8yej3 x1mwwwfo xpvm0e4 x1hz01jw xvmahel xtqrqnz x1778rvt xdpxx8g" },
|
|
@@ -737,17 +810,21 @@ function q({ headers: e, children: t, label: n, ...r }) {
|
|
|
737
810
|
}[!!e.some((e) => typeof e != "string") | 0], r),
|
|
738
811
|
children: [/* @__PURE__ */ _("thead", { children: /* @__PURE__ */ _("tr", { children: e.map((t, n) => /* @__PURE__ */ _("th", {
|
|
739
812
|
scope: "col",
|
|
740
|
-
...d.props(
|
|
741
|
-
children:
|
|
813
|
+
...d.props(J.th, typeof t != "string" && J.column(t.width), typeof t != "string" && t.secondary === !0 && J.secondary, n === e.length - 1 && J.lastHeader, n === i && J.lastPrimaryHeader),
|
|
814
|
+
children: /* @__PURE__ */ _("span", {
|
|
815
|
+
title: typeof t == "string" ? t : t.label,
|
|
816
|
+
className: "x1lliihq xb3r6kr xlyipyv",
|
|
817
|
+
children: typeof t == "string" ? t : t.label
|
|
818
|
+
})
|
|
742
819
|
}, typeof t == "string" ? t : t.label)) }) }), /* @__PURE__ */ _("tbody", { children: t })]
|
|
743
820
|
})
|
|
744
821
|
});
|
|
745
822
|
}
|
|
746
|
-
function
|
|
823
|
+
function X({ children: e, secondary: t = !1, mobileLabel: n, ...r }) {
|
|
747
824
|
return /* @__PURE__ */ v("td", {
|
|
748
825
|
...u({
|
|
749
|
-
0: { className: "
|
|
750
|
-
1: { className: "
|
|
826
|
+
0: { className: "x1v2how9 x9f619 x1hmw7ec x1m92p3w xbixft xxymvpz xuxw1ft xss6m8b xb3r6kr xlyipyv" },
|
|
827
|
+
1: { className: "x1v2how9 x9f619 x1hmw7ec x1m92p3w xbixft xxymvpz xuxw1ft xss6m8b xb3r6kr xlyipyv x1n9xxwz xazwdyr" }
|
|
751
828
|
}[!!t | 0], r),
|
|
752
829
|
children: [e, n !== void 0 && /* @__PURE__ */ _("small", {
|
|
753
830
|
className: "x1s85apg xacuhyv x153jb6y xy8obcc xas2l8k xb3r6kr xlyipyv",
|
|
@@ -756,64 +833,64 @@ function J({ children: e, secondary: t = !1, mobileLabel: n, ...r }) {
|
|
|
756
833
|
});
|
|
757
834
|
}
|
|
758
835
|
// packages/collections/src/timestamp.tsx
|
|
759
|
-
function
|
|
836
|
+
function ge({ dateTime: e, label: t, title: n }) {
|
|
760
837
|
return n === void 0 ? /* @__PURE__ */ _("time", {
|
|
761
838
|
dateTime: e,
|
|
762
|
-
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b
|
|
839
|
+
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
763
840
|
children: t
|
|
764
|
-
}) : /* @__PURE__ */ v(
|
|
841
|
+
}) : /* @__PURE__ */ v(s.Root, { children: [/* @__PURE__ */ _(s.Trigger, {
|
|
765
842
|
render: /* @__PURE__ */ _("time", {
|
|
766
843
|
dateTime: e,
|
|
767
844
|
tabIndex: 0,
|
|
768
845
|
"aria-label": n,
|
|
769
|
-
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b
|
|
846
|
+
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk"
|
|
770
847
|
}),
|
|
771
848
|
children: t
|
|
772
|
-
}), /* @__PURE__ */ _(
|
|
849
|
+
}), /* @__PURE__ */ _(s.Portal, { children: /* @__PURE__ */ _(s.Positioner, { children: /* @__PURE__ */ _(s.Popup, { children: n }) }) })] });
|
|
773
850
|
}
|
|
774
851
|
// packages/collections/src/timeline.tsx
|
|
775
|
-
function
|
|
852
|
+
function Z({ label: e, children: t }) {
|
|
776
853
|
return /* @__PURE__ */ _("ol", {
|
|
777
854
|
"aria-label": e,
|
|
778
855
|
className: "xe8uvvx x1ghz6dp x1717udv xeuugli",
|
|
779
856
|
children: t
|
|
780
857
|
});
|
|
781
858
|
}
|
|
782
|
-
function
|
|
859
|
+
function Q({ icon: e, title: t, time: n, metadata: i, children: a, details: o, defaultOpen: s = !1 }) {
|
|
783
860
|
let [c, l] = h(s), u = /* @__PURE__ */ v("div", {
|
|
784
861
|
className: "x78zum5 x1pha0wt x1hnptsi x1a02dak xeuugli",
|
|
785
862
|
children: [/* @__PURE__ */ _("div", {
|
|
786
|
-
className: "xeuugli
|
|
787
|
-
children: o === void 0 ? t : /* @__PURE__ */ _(
|
|
788
|
-
className: "x14atkfc
|
|
863
|
+
className: "xeuugli xk4h15q xj0a0fe",
|
|
864
|
+
children: o === void 0 ? t : /* @__PURE__ */ _(r.Trigger, {
|
|
865
|
+
className: "x14atkfc x16exltd xwu7q15 xt970qd xlqzeqv",
|
|
789
866
|
children: t
|
|
790
867
|
})
|
|
791
|
-
}), n
|
|
792
|
-
className: "x153jb6y xy8obcc xss6m8b",
|
|
868
|
+
}), n != null && /* @__PURE__ */ _("div", {
|
|
869
|
+
className: "xeuugli x153jb6y xy8obcc xas2l8k xss6m8b xj0a0fe",
|
|
793
870
|
children: n
|
|
794
871
|
})]
|
|
795
872
|
}), d = /* @__PURE__ */ v(g, { children: [
|
|
796
873
|
u,
|
|
797
|
-
a
|
|
874
|
+
a != null && (!c || o === void 0) && /* @__PURE__ */ _("div", {
|
|
798
875
|
className: "xeuugli x1ewvobj xj0a0fe",
|
|
799
876
|
children: a
|
|
800
877
|
}),
|
|
801
|
-
|
|
802
|
-
className: "x153jb6y xy8obcc",
|
|
803
|
-
children:
|
|
878
|
+
i != null && /* @__PURE__ */ _("div", {
|
|
879
|
+
className: "xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
880
|
+
children: i
|
|
804
881
|
}),
|
|
805
|
-
o !== void 0 && /* @__PURE__ */ _(
|
|
882
|
+
o !== void 0 && /* @__PURE__ */ _(r.Panel, { children: o })
|
|
806
883
|
] });
|
|
807
884
|
return /* @__PURE__ */ v("li", {
|
|
808
|
-
className: "x1n2onr6 xrvj5dj
|
|
885
|
+
className: "x1n2onr6 xrvj5dj x1eqwfih x1y1mm1b xhlx3wy xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt xbixft x1cpjm7i x1hmns74 x1lk18uv x1gi6gvw x1jw5pjq x1vgi0k x1mi36wk x1wse844 xup0pd7",
|
|
809
886
|
children: [/* @__PURE__ */ _("span", {
|
|
810
887
|
"aria-hidden": !0,
|
|
811
|
-
className: "x78zum5 x6s0dn4
|
|
888
|
+
className: "x78zum5 x6s0dn4 xl56j7k x1b1e0sl x153jb6y",
|
|
812
889
|
children: e
|
|
813
890
|
}), o === void 0 ? /* @__PURE__ */ _("div", {
|
|
814
891
|
className: "xrvj5dj x1hnptsi xeuugli",
|
|
815
892
|
children: d
|
|
816
|
-
}) : /* @__PURE__ */ _(
|
|
893
|
+
}) : /* @__PURE__ */ _(r.Root, {
|
|
817
894
|
open: c,
|
|
818
895
|
onOpenChange: l,
|
|
819
896
|
className: "xrvj5dj x1hnptsi xeuugli xh8yej3",
|
|
@@ -821,8 +898,8 @@ function Z({ icon: e, title: t, time: n, metadata: r, children: a, details: o, d
|
|
|
821
898
|
})]
|
|
822
899
|
});
|
|
823
900
|
}
|
|
824
|
-
var
|
|
825
|
-
Root:
|
|
826
|
-
Item:
|
|
901
|
+
var $ = {
|
|
902
|
+
Root: Z,
|
|
903
|
+
Item: Q
|
|
827
904
|
};
|
|
828
|
-
export {
|
|
905
|
+
export { X as Cell, L as CollectionEnd, O as CollectionPagination, R as CollectionScroll, T as CollectionToolbar, D as ColumnControls, P as DataTable, N as DataTableText, V as Details, E as FilterChips, B as Inspector, H as ListFooter, K as Metric, G as MetricGrid, Y as Table, $ as Timeline, ge as Timestamp };
|