@mechane-ai/elements 0.51.0 → 0.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.js +169 -169
- package/dist/{article-CRlhq9oA.js → article-BDVuehRt.js} +1 -1
- package/dist/article.js +1 -1
- package/dist/catalog.json +42 -1
- package/dist/{categorical-values-BYP_R5gS.js → categorical-values-BoS03HcI.js} +1 -1
- package/dist/charts/cartesian.js +1 -1
- package/dist/charts/comparison.js +1 -1
- package/dist/charts/distribution.js +1 -1
- package/dist/charts/figure.js +12 -13
- package/dist/charts/graph.js +1 -1
- package/dist/charts/hierarchy.js +1 -1
- package/dist/charts/image.js +1 -1
- package/dist/charts/matrix.js +1 -1
- package/dist/charts/plot.js +3 -3
- package/dist/charts/relationship.js +1 -1
- package/dist/charts/text.js +1 -1
- package/dist/charts/timeline.js +1 -1
- package/dist/charts/trend.js +1 -1
- package/dist/charts.js +2 -2
- package/dist/collections.js +1 -1
- package/dist/content/markdown.js +1 -278
- package/dist/{dates-ckJdYF7t.js → dates-CjlTzw00.js} +1 -1
- package/dist/{dumbbell-plot-BC8d_IJy.js → dumbbell-plot-Xxl6P7D1.js} +3 -3
- package/dist/{embedding-map-Bj8krO-d.js → embedding-map-tU8hT_aC.js} +3 -3
- package/dist/{figure-frame-koVKcXph.js → figure-frame-BKc9TvtX.js} +1 -1
- package/dist/forms/dates.js +1 -1
- package/dist/{image-grid-CLhol2jy.js → image-grid-BZy2lkNb.js} +2 -2
- package/dist/kits/evaluation.js +4 -4
- package/dist/kits/interpretability.js +7 -7
- package/dist/kits/operations.js +4 -4
- package/dist/kits/research.js +463 -183
- package/dist/kits/training.js +3 -3
- package/dist/markdown-VpLw_P9T.js +313 -0
- package/dist/mdx.js +2 -2
- package/dist/packages/charts/src/graph/tree-diagram.d.ts +1 -1
- package/dist/packages/charts/src/plot/plot-layout.d.ts +0 -6
- package/dist/packages/charts/src/timeline/event-strip.d.ts +12 -2
- package/dist/packages/charts/src/timeline/index.d.ts +1 -1
- package/dist/packages/collections/src/metrics.d.ts +5 -11
- package/dist/packages/content/src/markdown/markdown.d.ts +8 -1
- package/dist/packages/kits/src/research/collection-page.d.ts +9 -0
- package/dist/packages/kits/src/research/index.d.ts +3 -1
- package/dist/packages/kits/src/research/lineage-graph.d.ts +40 -0
- package/dist/{plot-layout-B2xRt-_k.js → plot-layout-D8j-ozGR.js} +102 -86
- package/dist/{plot-surface-0cKFwtws.js → plot-surface-5e3xeiub.js} +1 -1
- package/dist/{reference-lines-nSxcZVF5.js → reference-lines-1FttCg46.js} +1 -1
- package/dist/{scene-4ePpWdmE.js → scene-8F-fQksU.js} +4 -4
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-DWZIYDty.js → slope-chart-B35ZfaYn.js} +4 -4
- package/dist/{src-DNclWY4V.js → src-fvoTU3Bq.js} +377 -377
- package/dist/{time-series-CsngFxr1.js → time-series-DoFMGmFV.js} +612 -590
- package/dist/{token-heatmap-BQLIxPky.js → token-heatmap-DLPQWwMv.js} +3 -3
- package/dist/{token-predictions-C3B5L-eO.js → token-predictions-D_Jwf8Aw.js} +3 -3
- package/dist/{tree-diagram-Dau9jeXS.js → tree-diagram-DreDBCvt.js} +4 -4
- package/dist/{treemap-DWrMQndu.js → treemap-MVX-wa4t.js} +4 -4
- package/dist/{violin-plot-D05ODcyc.js → violin-plot-Bi71NqXF.js} +3 -3
- package/dist/waterfall-8y8ANO3c.js +605 -0
- package/package.json +1 -1
- package/recipes/calendar-workspace.tsx +39 -0
- package/skills/use-elements/references/workspace.md +8 -6
- package/dist/visible-motion-1GcUaEi4.js +0 -23
- package/dist/waterfall-BkLLv2Lm.js +0 -576
|
@@ -2,31 +2,31 @@ import { D as e, T as t, c as n, i as r, m as i, u as a, v as o } from "./src-9E
|
|
|
2
2
|
import { c as s } from "./src-Dxs3Buo_.js";
|
|
3
3
|
import { i as c, r as l, t as u } from "./src-na2DdkKI.js";
|
|
4
4
|
import { d } from "./src-npqwq3Sa.js";
|
|
5
|
-
import { l as f, t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { n as
|
|
9
|
-
import * as
|
|
10
|
-
import { Button as
|
|
11
|
-
import { createParts as
|
|
12
|
-
import { Children as
|
|
13
|
-
import { byCell as
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import { ArrowDown as
|
|
5
|
+
import { l as f, t as p } from "./constants.stylex-CqhVl0uU.js";
|
|
6
|
+
import { t as ee } from "./accessibility-P89UG9-r.js";
|
|
7
|
+
import { t as te } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
8
|
+
import { n as m } from "./forms-CEbwzlRR.js";
|
|
9
|
+
import * as h from "@stylexjs/stylex";
|
|
10
|
+
import { Button as g } from "@ui-sdk/react/button";
|
|
11
|
+
import { createParts as _, mergeProps as v, usePart as y, usePrimitive as b } from "@ui-sdk/react/primitive";
|
|
12
|
+
import { Children as x, Fragment as ne, createContext as S, useContext as C, useEffect as w, useId as T, useLayoutEffect as E, useMemo as D, useRef as O, useState as k, useSyncExternalStore as re } from "react";
|
|
13
|
+
import { byCell as A, createChange as ie, createGridFocus as ae, createSelection as j, createVirtualizer as oe, definePrimitive as M, dispatch as N, selects as se } from "@ui-sdk/core";
|
|
14
|
+
import { Fragment as ce, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
15
|
+
import { ArrowDown as le, ArrowUp as ue, ArrowUpDown as de, ChevronLeft as fe, ChevronRight as pe, CircleDashed as me, ListFilter as I, Search as he, Settings2 as ge, X as L } from "lucide-react";
|
|
16
16
|
import { useShortcut as R } from "@ui-sdk/react/shortcuts";
|
|
17
17
|
import { Toolbar as _e, ToolbarButton as z, ToolbarGroup as ve, ToolbarInput as B } from "@ui-sdk/react/toolbar";
|
|
18
18
|
import { createColumnHelper as ye, tableFeatures as be, useTable as xe } from "@tanstack/react-table";
|
|
19
19
|
import { Timeline as Se, TimelineDescription as Ce, TimelineItem as we, TimelineMarker as Te, TimelineTime as V, TimelineTitle as Ee } from "@ui-sdk/react/timeline";
|
|
20
20
|
// packages/collections/src/control-toolbar.tsx
|
|
21
|
-
var H =
|
|
21
|
+
var H = S(!1);
|
|
22
22
|
function U(e) {
|
|
23
|
-
return
|
|
23
|
+
return C(H) ? /* @__PURE__ */ P(ve, { ...e }) : /* @__PURE__ */ P(H, {
|
|
24
24
|
value: !0,
|
|
25
|
-
children: /* @__PURE__ */
|
|
25
|
+
children: /* @__PURE__ */ P(_e, { ...e })
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
function De(e) {
|
|
29
|
-
return
|
|
29
|
+
return C(H) ? /* @__PURE__ */ P(z, { render: e }) : e;
|
|
30
30
|
}
|
|
31
31
|
// packages/collections/src/collection-controls.tsx
|
|
32
32
|
var W = {
|
|
@@ -45,39 +45,39 @@ var W = {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
function G({ label: e, children: t, actions: n }) {
|
|
48
|
-
let r =
|
|
49
|
-
return !r && !i ? null : /* @__PURE__ */
|
|
48
|
+
let r = x.toArray(t).length > 0, i = x.toArray(n).length > 0;
|
|
49
|
+
return !r && !i ? null : /* @__PURE__ */ F(U, {
|
|
50
50
|
"aria-label": e,
|
|
51
|
-
...
|
|
52
|
-
children: [t, i && /* @__PURE__ */
|
|
51
|
+
...h.props(a.row, a.blockEnd, W.toolbar),
|
|
52
|
+
children: [t, i && /* @__PURE__ */ P("div", {
|
|
53
53
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli xvc5jky",
|
|
54
54
|
children: n
|
|
55
55
|
})]
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
function K({ filters: t, onRemove: n, label: r = "Applied filters" }) {
|
|
59
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
59
|
+
return t.length === 0 ? null : /* @__PURE__ */ P(U, {
|
|
60
60
|
"aria-label": r,
|
|
61
61
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli",
|
|
62
|
-
children: t.map((t) => /* @__PURE__ */
|
|
62
|
+
children: t.map((t) => /* @__PURE__ */ F("span", {
|
|
63
63
|
className: "x1n2onr6 x9f619 x3nfvp2 x6s0dn4 xunmzkg x1f9pz31 x992rv9 xyibt8p x1ok0vyi xeuugli x193iq5w xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt x1s928wv x1j6awrg xarstr8 x5hscyn x86avzo x10z0kkz x1k48kgn x2q1x1w",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ P("span", {
|
|
65
65
|
title: t.label,
|
|
66
66
|
className: "xeuugli xb3r6kr xlyipyv xuxw1ft",
|
|
67
67
|
children: t.label
|
|
68
|
-
}), /* @__PURE__ */
|
|
69
|
-
render: /* @__PURE__ */
|
|
68
|
+
}), /* @__PURE__ */ P(z, {
|
|
69
|
+
render: /* @__PURE__ */ P(e, {
|
|
70
70
|
"aria-label": `Remove ${t.label}`,
|
|
71
71
|
variant: "ghost",
|
|
72
72
|
xstyle: W.remove
|
|
73
73
|
}),
|
|
74
74
|
onClick: (e) => {
|
|
75
|
-
|
|
75
|
+
N({ options: () => ({ onRemove: n }) }, "onRemove", t.id, {
|
|
76
76
|
reason: "remove-press",
|
|
77
77
|
event: e.nativeEvent
|
|
78
78
|
});
|
|
79
79
|
},
|
|
80
|
-
children: /* @__PURE__ */
|
|
80
|
+
children: /* @__PURE__ */ P(L, {
|
|
81
81
|
size: 14,
|
|
82
82
|
"aria-hidden": "true"
|
|
83
83
|
})
|
|
@@ -86,29 +86,29 @@ function K({ filters: t, onRemove: n, label: r = "Applied filters" }) {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
function Oe({ options: n, onChange: r, onReset: i, label: a = "Display options" }) {
|
|
89
|
-
let o = De(/* @__PURE__ */
|
|
89
|
+
let o = De(/* @__PURE__ */ P(e, {
|
|
90
90
|
"aria-label": a,
|
|
91
91
|
title: a
|
|
92
92
|
}));
|
|
93
|
-
return /* @__PURE__ */
|
|
93
|
+
return /* @__PURE__ */ F(l.Root, { children: [/* @__PURE__ */ P(l.Trigger, {
|
|
94
94
|
render: o,
|
|
95
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ P(ge, {
|
|
96
96
|
size: 14,
|
|
97
97
|
"aria-hidden": "true"
|
|
98
98
|
})
|
|
99
|
-
}), /* @__PURE__ */
|
|
99
|
+
}), /* @__PURE__ */ F(l.Popup, {
|
|
100
100
|
align: "end",
|
|
101
|
-
children: [/* @__PURE__ */
|
|
101
|
+
children: [/* @__PURE__ */ P(l.Title, { children: "Display" }), /* @__PURE__ */ F("div", {
|
|
102
102
|
className: "xrvj5dj x1n8ia3y xfb3i0g",
|
|
103
|
-
children: [n.map((e) => /* @__PURE__ */
|
|
103
|
+
children: [n.map((e) => /* @__PURE__ */ F("label", {
|
|
104
104
|
className: "x78zum5 x6s0dn4 x1hnptsi xbixft xtqrqnz x1hz01jw x1778rvt xeuugli xj0a0fe",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
105
|
+
children: [/* @__PURE__ */ P(s.Root, {
|
|
106
106
|
checked: e.isChecked,
|
|
107
107
|
onCheckedChange: (t) => r(e.id, t),
|
|
108
108
|
disabled: e.isRequired === !0,
|
|
109
|
-
children: /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ P(s.Indicator, {})
|
|
110
110
|
}), e.label]
|
|
111
|
-
}, e.id)), i !== void 0 && /* @__PURE__ */
|
|
111
|
+
}, e.id)), i !== void 0 && /* @__PURE__ */ P(t, {
|
|
112
112
|
type: "button",
|
|
113
113
|
variant: "ghost",
|
|
114
114
|
onClick: i,
|
|
@@ -118,26 +118,26 @@ function Oe({ options: n, onChange: r, onReset: i, label: a = "Display options"
|
|
|
118
118
|
})] });
|
|
119
119
|
}
|
|
120
120
|
function ke({ label: e, description: r, previous: i, next: a }) {
|
|
121
|
-
return /* @__PURE__ */
|
|
121
|
+
return /* @__PURE__ */ F("nav", {
|
|
122
122
|
"aria-label": e === void 0 ? "Pagination" : `${e} pagination`,
|
|
123
123
|
className: "x78zum5 x6s0dn4 x1qughib x1a02dak xaml1ju xeuugli",
|
|
124
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ P(n, { children: r }), /* @__PURE__ */ F("div", {
|
|
125
125
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli xvc5jky",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ F(t, {
|
|
127
127
|
variant: "outline",
|
|
128
128
|
"aria-label": e === void 0 ? void 0 : `Previous page of ${e}`,
|
|
129
129
|
disabled: i.disabled,
|
|
130
130
|
onClick: i.onClick,
|
|
131
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ P(fe, {
|
|
132
132
|
size: 16,
|
|
133
133
|
"aria-hidden": "true"
|
|
134
134
|
}), "Previous"]
|
|
135
|
-
}), /* @__PURE__ */
|
|
135
|
+
}), /* @__PURE__ */ F(t, {
|
|
136
136
|
variant: "outline",
|
|
137
137
|
"aria-label": e === void 0 ? void 0 : `Next page of ${e}`,
|
|
138
138
|
disabled: a.disabled,
|
|
139
139
|
onClick: a.onClick,
|
|
140
|
-
children: ["Next", /* @__PURE__ */
|
|
140
|
+
children: ["Next", /* @__PURE__ */ P(pe, {
|
|
141
141
|
size: 16,
|
|
142
142
|
"aria-hidden": "true"
|
|
143
143
|
})]
|
|
@@ -516,58 +516,58 @@ var Ae = {
|
|
|
516
516
|
};
|
|
517
517
|
// packages/collections/src/data-table-text.tsx
|
|
518
518
|
function Me({ children: e, leading: t, isDecorative: n = !1 }) {
|
|
519
|
-
let r =
|
|
520
|
-
return /* @__PURE__ */
|
|
519
|
+
let r = x.toArray(t).length > 0;
|
|
520
|
+
return /* @__PURE__ */ F("span", {
|
|
521
521
|
"aria-hidden": n || void 0,
|
|
522
522
|
inert: n || void 0,
|
|
523
|
-
...
|
|
524
|
-
children: [r && /* @__PURE__ */
|
|
523
|
+
...h.props(q.textRow),
|
|
524
|
+
children: [r && /* @__PURE__ */ P("span", {
|
|
525
525
|
"aria-hidden": !0,
|
|
526
|
-
...
|
|
526
|
+
...h.props(q.adornment),
|
|
527
527
|
children: t
|
|
528
|
-
}), /* @__PURE__ */
|
|
529
|
-
...
|
|
528
|
+
}), /* @__PURE__ */ P("span", {
|
|
529
|
+
...h.props(q.textColumn),
|
|
530
530
|
children: e
|
|
531
531
|
})]
|
|
532
532
|
});
|
|
533
533
|
}
|
|
534
534
|
function Ne({ children: e, secondary: t, leading: n, trailing: r }) {
|
|
535
|
-
let i =
|
|
536
|
-
return /* @__PURE__ */
|
|
535
|
+
let i = x.toArray(r).length > 0;
|
|
536
|
+
return /* @__PURE__ */ F(Me, {
|
|
537
537
|
leading: n,
|
|
538
|
-
children: [/* @__PURE__ */
|
|
539
|
-
...
|
|
540
|
-
children: [/* @__PURE__ */
|
|
538
|
+
children: [/* @__PURE__ */ F("span", {
|
|
539
|
+
...h.props(q.primaryRow),
|
|
540
|
+
children: [/* @__PURE__ */ P("span", {
|
|
541
541
|
"data-record-text": !0,
|
|
542
542
|
title: e,
|
|
543
|
-
...
|
|
543
|
+
...h.props(q.text, q.primaryText, q.truncated),
|
|
544
544
|
children: e
|
|
545
|
-
}), i && /* @__PURE__ */
|
|
546
|
-
...
|
|
545
|
+
}), i && /* @__PURE__ */ P("span", {
|
|
546
|
+
...h.props(q.adornment),
|
|
547
547
|
children: r
|
|
548
548
|
})]
|
|
549
|
-
}), t !== void 0 && /* @__PURE__ */
|
|
549
|
+
}), t !== void 0 && /* @__PURE__ */ P("span", {
|
|
550
550
|
title: t,
|
|
551
|
-
...
|
|
551
|
+
...h.props(q.text, q.truncated, q.secondaryText),
|
|
552
552
|
children: t
|
|
553
553
|
})]
|
|
554
554
|
});
|
|
555
555
|
}
|
|
556
556
|
function Pe({ leading: e, isSecondary: t = !1 }) {
|
|
557
|
-
return /* @__PURE__ */
|
|
557
|
+
return /* @__PURE__ */ F(Me, {
|
|
558
558
|
leading: e,
|
|
559
559
|
isDecorative: !0,
|
|
560
|
-
children: [/* @__PURE__ */
|
|
561
|
-
...
|
|
562
|
-
children: /* @__PURE__ */
|
|
563
|
-
}), t && /* @__PURE__ */
|
|
564
|
-
...
|
|
565
|
-
children: /* @__PURE__ */
|
|
560
|
+
children: [/* @__PURE__ */ P("span", {
|
|
561
|
+
...h.props(q.text),
|
|
562
|
+
children: /* @__PURE__ */ P(d, { width: "70%" })
|
|
563
|
+
}), t && /* @__PURE__ */ P("span", {
|
|
564
|
+
...h.props(q.text, q.secondaryText),
|
|
565
|
+
children: /* @__PURE__ */ P(d, { width: "45%" })
|
|
566
566
|
})]
|
|
567
567
|
});
|
|
568
568
|
}
|
|
569
569
|
// packages/collections/src/data-table-layout.tsx
|
|
570
|
-
var Fe =
|
|
570
|
+
var Fe = p.compactTable.slice(7), Ie = /* @__PURE__ */ new Set(["string", "number"]), J = {
|
|
571
571
|
primary: {
|
|
572
572
|
minimumWidth: 240,
|
|
573
573
|
isFlexible: !0,
|
|
@@ -638,16 +638,16 @@ function We() {
|
|
|
638
638
|
return globalThis.matchMedia(Fe).matches;
|
|
639
639
|
}
|
|
640
640
|
function Ge({ columns: e, canSelect: t = !1 }) {
|
|
641
|
-
return /* @__PURE__ */
|
|
641
|
+
return /* @__PURE__ */ F("colgroup", { children: [t && /* @__PURE__ */ P("col", { ...h.props(q.selection) }), e.map((e) => /* @__PURE__ */ P("col", { ...h.props(e.width !== void 0 && q.width(e.width), e.isSecondary === !0 && q.secondary) }, e.id))] });
|
|
642
642
|
}
|
|
643
643
|
function Ke({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
|
|
644
644
|
let i = J[e], a = t && i.shouldTruncate, o = typeof r == "string" && (n ?? a);
|
|
645
|
-
return /* @__PURE__ */
|
|
646
|
-
...
|
|
647
|
-
children: /* @__PURE__ */
|
|
645
|
+
return /* @__PURE__ */ P("span", {
|
|
646
|
+
...h.props(q.cellViewport, !t && q.contentViewport),
|
|
647
|
+
children: /* @__PURE__ */ P("span", {
|
|
648
648
|
"data-record-text": Ie.has(typeof r) || void 0,
|
|
649
649
|
title: typeof r == "string" ? r : void 0,
|
|
650
|
-
...
|
|
650
|
+
...h.props(q.cellContent, t && q.fixedContent, t && !i.shouldTruncate && q.readable, o && q.truncated),
|
|
651
651
|
children: r
|
|
652
652
|
})
|
|
653
653
|
});
|
|
@@ -682,7 +682,7 @@ var Ye = {
|
|
|
682
682
|
none: "ascending",
|
|
683
683
|
ascending: "descending",
|
|
684
684
|
descending: "none"
|
|
685
|
-
}, Xe = /* @__PURE__ */ new Set(["ascending", "descending"]), Ze = /* @__PURE__ */ new Set(["Home", "End"]), Qe =
|
|
685
|
+
}, Xe = /* @__PURE__ */ new Set(["ascending", "descending"]), Ze = /* @__PURE__ */ new Set(["Home", "End"]), Qe = M({
|
|
686
686
|
name: "collection-results",
|
|
687
687
|
options: {
|
|
688
688
|
status: "string",
|
|
@@ -713,7 +713,7 @@ var Ye = {
|
|
|
713
713
|
"hasNextPage"
|
|
714
714
|
],
|
|
715
715
|
api: (e) => {
|
|
716
|
-
let t =
|
|
716
|
+
let t = ie(e), n = ae(e, {
|
|
717
717
|
key: "active",
|
|
718
718
|
rows: () => e.options().rowIds.length,
|
|
719
719
|
cols: () => 1,
|
|
@@ -832,7 +832,7 @@ var Ye = {
|
|
|
832
832
|
row: "number",
|
|
833
833
|
col: "number"
|
|
834
834
|
},
|
|
835
|
-
selects:
|
|
835
|
+
selects: se({ active: A }),
|
|
836
836
|
attrs: (e, { props: t, api: n }) => ({ tabindex: n.grid.tabIndex(e, t) }),
|
|
837
837
|
on: {
|
|
838
838
|
keydown: (e, { api: t }) => t.rowKeydown(e),
|
|
@@ -859,16 +859,16 @@ var Ye = {
|
|
|
859
859
|
}
|
|
860
860
|
});
|
|
861
861
|
function $e(e, t) {
|
|
862
|
-
let n =
|
|
862
|
+
let n = b(Qe, e), r = y(n, "root", {}, t(n.api), "table");
|
|
863
863
|
return {
|
|
864
864
|
api: n.api,
|
|
865
865
|
element: r
|
|
866
866
|
};
|
|
867
867
|
}
|
|
868
|
-
var et =
|
|
868
|
+
var et = _(Qe, {
|
|
869
869
|
root: "table",
|
|
870
870
|
trigger: "a"
|
|
871
|
-
}).Trigger, tt =
|
|
871
|
+
}).Trigger, tt = _(Qe, {
|
|
872
872
|
root: "table",
|
|
873
873
|
trigger: "button"
|
|
874
874
|
}).Trigger;
|
|
@@ -879,7 +879,7 @@ function nt(e) {
|
|
|
879
879
|
return t || n ? !1 : e.detail === 0 || e.currentTarget.ownerDocument.getSelection()?.isCollapsed !== !1;
|
|
880
880
|
}
|
|
881
881
|
function rt({ index: e, recordId: t, row: n, action: r, isActive: i, children: a }) {
|
|
882
|
-
let o = r.label?.(n), s = r.href === void 0 ? /* @__PURE__ */
|
|
882
|
+
let o = r.label?.(n), s = r.href === void 0 ? /* @__PURE__ */ P(tt, {
|
|
883
883
|
value: t,
|
|
884
884
|
row: e,
|
|
885
885
|
col: 0,
|
|
@@ -891,9 +891,9 @@ function rt({ index: e, recordId: t, row: n, action: r, isActive: i, children: a
|
|
|
891
891
|
onClick: (e) => {
|
|
892
892
|
nt(e) && r.onActivate(n);
|
|
893
893
|
},
|
|
894
|
-
...
|
|
894
|
+
...h.props(q.trigger),
|
|
895
895
|
children: a
|
|
896
|
-
}) : /* @__PURE__ */
|
|
896
|
+
}) : /* @__PURE__ */ P(et, {
|
|
897
897
|
value: t,
|
|
898
898
|
row: e,
|
|
899
899
|
col: 0,
|
|
@@ -903,10 +903,10 @@ function rt({ index: e, recordId: t, row: n, action: r, isActive: i, children: a
|
|
|
903
903
|
onClick: (e) => {
|
|
904
904
|
r.onActivate !== void 0 && nt(e) && (e.preventDefault(), r.onActivate(n));
|
|
905
905
|
},
|
|
906
|
-
...
|
|
906
|
+
...h.props(q.trigger),
|
|
907
907
|
children: a
|
|
908
908
|
});
|
|
909
|
-
return o === void 0 || r.showTooltip !== !0 ? s : /* @__PURE__ */
|
|
909
|
+
return o === void 0 || r.showTooltip !== !0 ? s : /* @__PURE__ */ F(u.Root, { children: [/* @__PURE__ */ P(u.Trigger, { render: s }), /* @__PURE__ */ P(u.Popup, {
|
|
910
910
|
side: "top",
|
|
911
911
|
align: "start",
|
|
912
912
|
children: o
|
|
@@ -914,7 +914,7 @@ function rt({ index: e, recordId: t, row: n, action: r, isActive: i, children: a
|
|
|
914
914
|
}
|
|
915
915
|
// packages/collections/src/use-end-reached.ts
|
|
916
916
|
function it({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
917
|
-
|
|
917
|
+
w(() => {
|
|
918
918
|
if (n === void 0 || e.current === null) return;
|
|
919
919
|
let r = new IntersectionObserver((e) => {
|
|
920
920
|
e.some((e) => e.isIntersecting) && n();
|
|
@@ -930,7 +930,7 @@ function it({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
|
930
930
|
// packages/collections/src/use-table-window.ts
|
|
931
931
|
var at = [];
|
|
932
932
|
function ot(e) {
|
|
933
|
-
let t =
|
|
933
|
+
let t = O(e), [{ rows: n, subscribe: r, readItems: i, scrollToIndex: a }] = k(() => {
|
|
934
934
|
let e = oe({
|
|
935
935
|
count: () => t.current.count,
|
|
936
936
|
estimate: () => t.current.estimate,
|
|
@@ -949,10 +949,10 @@ function ot(e) {
|
|
|
949
949
|
readItems: () => e.items(),
|
|
950
950
|
scrollToIndex: (t) => e.scrollToIndex(t)
|
|
951
951
|
};
|
|
952
|
-
}), [o] =
|
|
953
|
-
return
|
|
952
|
+
}), [o] = k(() => /* @__PURE__ */ new Map()), { isEnabled: s, viewport: c } = e;
|
|
953
|
+
return E(() => {
|
|
954
954
|
t.current = e, n.refresh();
|
|
955
|
-
}),
|
|
955
|
+
}), E(() => {
|
|
956
956
|
let e = c.current;
|
|
957
957
|
if (s && e !== null) return n.connect(e);
|
|
958
958
|
}, [
|
|
@@ -960,7 +960,7 @@ function ot(e) {
|
|
|
960
960
|
n,
|
|
961
961
|
c
|
|
962
962
|
]), {
|
|
963
|
-
items:
|
|
963
|
+
items: re(r, i, () => at),
|
|
964
964
|
size: n.size(),
|
|
965
965
|
scrollToIndex: a,
|
|
966
966
|
measure(e) {
|
|
@@ -973,13 +973,13 @@ function ot(e) {
|
|
|
973
973
|
}
|
|
974
974
|
// packages/collections/src/data-table-rows.tsx
|
|
975
975
|
var st = be({}), ct = {
|
|
976
|
-
ascending:
|
|
977
|
-
descending:
|
|
978
|
-
none:
|
|
976
|
+
ascending: ue,
|
|
977
|
+
descending: le,
|
|
978
|
+
none: de
|
|
979
979
|
};
|
|
980
980
|
function lt(e, t) {
|
|
981
|
-
let n =
|
|
982
|
-
|
|
981
|
+
let n = O(void 0);
|
|
982
|
+
w(() => {
|
|
983
983
|
if (t === void 0) {
|
|
984
984
|
n.current = void 0;
|
|
985
985
|
return;
|
|
@@ -993,69 +993,69 @@ function lt(e, t) {
|
|
|
993
993
|
};
|
|
994
994
|
}, [e, t]);
|
|
995
995
|
}
|
|
996
|
-
function X({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, onSortChange: o, selectedIds: c, onSelectionChange: l, selectionLabel: u, rowAction: d, activeRowId:
|
|
997
|
-
let j =
|
|
996
|
+
function X({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, onSortChange: o, selectedIds: c, onSelectionChange: l, selectionLabel: u, rowAction: d, activeRowId: p, focusRowId: m, onRowHighlightChange: _, hideCaption: v = !1, hideHeaders: y = !1, rowSizing: b = "fixed", window: x, endContent: S, onEndReached: C, footer: T, pagination: A, resultStatus: ie = "ready", isPlaceholder: ae = !1 }) {
|
|
997
|
+
let j = D(() => Ve(t), [t]), oe = re(Ue, We, () => !1), M = D(() => {
|
|
998
998
|
let e = ye();
|
|
999
999
|
return e.columns(j.map((t) => e.display({
|
|
1000
1000
|
id: t.id,
|
|
1001
1001
|
header: t.label
|
|
1002
1002
|
})));
|
|
1003
|
-
}, [j]),
|
|
1003
|
+
}, [j]), N = xe({
|
|
1004
1004
|
features: st,
|
|
1005
|
-
columns:
|
|
1005
|
+
columns: M,
|
|
1006
1006
|
data: e,
|
|
1007
1007
|
getRowId: n
|
|
1008
|
-
}),
|
|
1008
|
+
}), se = te(), le = se.viewport, ue = O(null), de = O(null), fe = O(null), [pe, me] = k(0), [I, he] = k(), [ge, L] = k(), R = O(void 0), _e = O(void 0), z = D(() => e.map(n), [e, n]), ve = I === void 0 ? -1 : z.indexOf(I.id), B = I?.isWithin === !0 ? ve : -1, be = B === -1 ? void 0 : I?.id, Se = j.findIndex((e) => e.role === "primary" && e.isSecondary !== !0), Ce = Se === -1 ? j.findIndex((e) => e.isSecondary !== !0) : Se, we = typeof x?.height == "string" ? x.height : "content", Te = d !== void 0 && d.disabled !== !0;
|
|
1009
1009
|
it({
|
|
1010
|
-
end:
|
|
1011
|
-
onEndReached:
|
|
1010
|
+
end: ue,
|
|
1011
|
+
onEndReached: x === void 0 ? C : void 0,
|
|
1012
1012
|
content: e.length
|
|
1013
|
-
}),
|
|
1014
|
-
let e =
|
|
1015
|
-
if (
|
|
1013
|
+
}), w(() => {
|
|
1014
|
+
let e = de.current, t = fe.current;
|
|
1015
|
+
if (x === void 0 || e === null || t === null) return;
|
|
1016
1016
|
let n = new ResizeObserver(() => me(e.offsetHeight + t.offsetHeight));
|
|
1017
1017
|
return n.observe(e), n.observe(t), () => n.disconnect();
|
|
1018
1018
|
}, [
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1019
|
+
x,
|
|
1020
|
+
v,
|
|
1021
|
+
y
|
|
1022
1022
|
]);
|
|
1023
1023
|
let V = ot({
|
|
1024
|
-
isEnabled:
|
|
1025
|
-
viewport:
|
|
1024
|
+
isEnabled: x !== void 0,
|
|
1025
|
+
viewport: le,
|
|
1026
1026
|
count: e.length,
|
|
1027
1027
|
keyOf: (e) => z[e] ?? String(e),
|
|
1028
|
-
estimate:
|
|
1029
|
-
margin:
|
|
1028
|
+
estimate: b === "fixed" ? f.rowHeight : x?.estimatedRowHeight ?? f.rowHeight,
|
|
1029
|
+
margin: pe,
|
|
1030
1030
|
keep: () => [
|
|
1031
1031
|
Math.max(0, ve),
|
|
1032
1032
|
B - 1,
|
|
1033
1033
|
B,
|
|
1034
1034
|
B + 1
|
|
1035
1035
|
],
|
|
1036
|
-
onEnd:
|
|
1036
|
+
onEnd: C
|
|
1037
1037
|
});
|
|
1038
|
-
|
|
1039
|
-
|
|
1038
|
+
w(() => {
|
|
1039
|
+
x !== void 0 && e.length === 0 && C?.();
|
|
1040
1040
|
}, [
|
|
1041
|
-
|
|
1041
|
+
x,
|
|
1042
1042
|
e.length,
|
|
1043
|
-
|
|
1043
|
+
C
|
|
1044
1044
|
]);
|
|
1045
1045
|
function Ee(e) {
|
|
1046
|
-
return
|
|
1046
|
+
return le.current?.querySelector(`[data-row-id="${CSS.escape(e)}"] [data-row-action]`) ?? null;
|
|
1047
1047
|
}
|
|
1048
|
-
let H =
|
|
1048
|
+
let H = D(() => o === void 0 ? [] : j.filter((e) => e.canSort === !0).map(({ id: e, label: t }) => ({
|
|
1049
1049
|
id: e,
|
|
1050
1050
|
label: t
|
|
1051
|
-
})), [j, o]), U =
|
|
1052
|
-
status:
|
|
1051
|
+
})), [j, o]), U = D(() => c === void 0 ? null : Array.from(c), [c]), De = {
|
|
1052
|
+
status: ie,
|
|
1053
1053
|
sort: a ?? null,
|
|
1054
1054
|
onSortChange: o === void 0 ? void 0 : (e, t) => o(e ?? void 0, t),
|
|
1055
1055
|
sortable: H,
|
|
1056
1056
|
selected: U,
|
|
1057
1057
|
onSelectedChange: l === void 0 ? void 0 : (e, t) => l(new Set(e), t),
|
|
1058
|
-
pagination:
|
|
1058
|
+
pagination: A,
|
|
1059
1059
|
rowIds: z,
|
|
1060
1060
|
rowLabel: (t) => {
|
|
1061
1061
|
let n = e[t];
|
|
@@ -1063,7 +1063,7 @@ function X({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
|
|
|
1063
1063
|
},
|
|
1064
1064
|
isActionable: Te,
|
|
1065
1065
|
reveal: (e) => {
|
|
1066
|
-
|
|
1066
|
+
x !== void 0 && V.scrollToIndex(e);
|
|
1067
1067
|
},
|
|
1068
1068
|
onOpen: (e) => {
|
|
1069
1069
|
let t = z[e], n = t === void 0 ? null : Ee(t);
|
|
@@ -1071,16 +1071,16 @@ function X({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
|
|
|
1071
1071
|
},
|
|
1072
1072
|
isPlaceholder: ae
|
|
1073
1073
|
};
|
|
1074
|
-
|
|
1074
|
+
E(() => {
|
|
1075
1075
|
let e = _e.current;
|
|
1076
1076
|
e !== void 0 && (_e.current = void 0, Ee(e)?.click());
|
|
1077
1077
|
});
|
|
1078
|
-
let W =
|
|
1078
|
+
let W = x === void 0 ? N.getRowModel().rows.map((e, t) => ({
|
|
1079
1079
|
row: e,
|
|
1080
1080
|
index: t,
|
|
1081
1081
|
spacerHeight: 0
|
|
1082
1082
|
})) : V.items.flatMap((e, t, n) => {
|
|
1083
|
-
let r =
|
|
1083
|
+
let r = N.getRowModel().rows[e.index], i = n[t - 1];
|
|
1084
1084
|
if (r === void 0) return [];
|
|
1085
1085
|
let a = i === void 0 ? 0 : i.start + i.size;
|
|
1086
1086
|
return [{
|
|
@@ -1089,63 +1089,63 @@ function X({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
|
|
|
1089
1089
|
spacerHeight: e.start - a
|
|
1090
1090
|
}];
|
|
1091
1091
|
}), G = W.some(({ row: e }) => e.id === ge) ? ge : void 0;
|
|
1092
|
-
ge !== void 0 && G === void 0 && L(void 0), lt(G ?? be,
|
|
1093
|
-
let K = j.filter((e) => !oe || e.isSecondary !== !0).length + (c === void 0 ? 0 : 1), Oe = c === void 0 ? 0 : 76, Ae =
|
|
1092
|
+
ge !== void 0 && G === void 0 && L(void 0), lt(G ?? be, _);
|
|
1093
|
+
let K = j.filter((e) => !oe || e.isSecondary !== !0).length + (c === void 0 ? 0 : 1), Oe = c === void 0 ? 0 : 76, Ae = T != null && typeof T != "boolean" || A !== void 0, { minimumWidth: je, compactWidth: Me } = He(j, Oe), Ne = V.items.at(-1), Pe = V.size - (Ne === void 0 ? 0 : Ne.start + Ne.size), Fe = c === void 0 ? 0 : z.filter((e) => c.has(e)).length, Ie = z.length > 0 && Fe === z.length, J = Fe > 0 && !Ie;
|
|
1094
1094
|
function qe(t) {
|
|
1095
|
-
return /* @__PURE__ */
|
|
1096
|
-
/* @__PURE__ */
|
|
1097
|
-
ref:
|
|
1095
|
+
return /* @__PURE__ */ F(ce, { children: [
|
|
1096
|
+
/* @__PURE__ */ P("caption", {
|
|
1097
|
+
ref: de,
|
|
1098
1098
|
"aria-label": r,
|
|
1099
|
-
...
|
|
1099
|
+
...h.props(q.caption, v && ee.hidden),
|
|
1100
1100
|
children: r
|
|
1101
1101
|
}),
|
|
1102
|
-
/* @__PURE__ */
|
|
1102
|
+
/* @__PURE__ */ P(Ge, {
|
|
1103
1103
|
columns: j,
|
|
1104
1104
|
canSelect: c !== void 0
|
|
1105
1105
|
}),
|
|
1106
|
-
/* @__PURE__ */
|
|
1107
|
-
ref:
|
|
1108
|
-
...
|
|
1109
|
-
children: /* @__PURE__ */
|
|
1106
|
+
/* @__PURE__ */ P("thead", {
|
|
1107
|
+
ref: fe,
|
|
1108
|
+
...h.props(y && ee.hidden),
|
|
1109
|
+
children: /* @__PURE__ */ F("tr", { children: [c !== void 0 && /* @__PURE__ */ P("th", {
|
|
1110
1110
|
scope: "col",
|
|
1111
1111
|
"aria-label": "Select",
|
|
1112
|
-
...
|
|
1113
|
-
children: /* @__PURE__ */
|
|
1112
|
+
...h.props(q.header, q.selection, q.rowControl),
|
|
1113
|
+
children: /* @__PURE__ */ P(s.Root, {
|
|
1114
1114
|
"aria-label": `Select every row of ${r}`,
|
|
1115
1115
|
checked: Ie,
|
|
1116
1116
|
indeterminate: J,
|
|
1117
1117
|
disabled: z.length === 0,
|
|
1118
1118
|
onCheckedChange: (e, n) => t.toggleAll(n.event),
|
|
1119
|
-
children: /* @__PURE__ */
|
|
1119
|
+
children: /* @__PURE__ */ P(s.Indicator, {})
|
|
1120
1120
|
})
|
|
1121
1121
|
}), j.map((e) => {
|
|
1122
1122
|
let n = a?.columnId === e.id ? a.direction : void 0, i = ct[n ?? "none"];
|
|
1123
|
-
return /* @__PURE__ */
|
|
1123
|
+
return /* @__PURE__ */ P("th", {
|
|
1124
1124
|
scope: "col",
|
|
1125
1125
|
title: e.label,
|
|
1126
1126
|
"aria-sort": n,
|
|
1127
|
-
...
|
|
1128
|
-
children: e.canSort === !0 && o !== void 0 ? /* @__PURE__ */
|
|
1127
|
+
...h.props(q.header, Re[e.role], e.width !== void 0 && q.width(e.width), e.isSecondary === !0 && q.secondary),
|
|
1128
|
+
children: e.canSort === !0 && o !== void 0 ? /* @__PURE__ */ F(g, {
|
|
1129
1129
|
type: "button",
|
|
1130
1130
|
"aria-label": `Sort ${r} by ${e.label}`,
|
|
1131
|
-
...
|
|
1131
|
+
...h.props(q.sort),
|
|
1132
1132
|
onClick: (n) => t.toggleSort(e.id, n.nativeEvent),
|
|
1133
|
-
children: [/* @__PURE__ */
|
|
1134
|
-
...
|
|
1133
|
+
children: [/* @__PURE__ */ P("span", {
|
|
1134
|
+
...h.props(q.headerLabel),
|
|
1135
1135
|
children: e.label
|
|
1136
|
-
}), /* @__PURE__ */
|
|
1136
|
+
}), /* @__PURE__ */ P(i, {
|
|
1137
1137
|
size: 14,
|
|
1138
1138
|
"aria-hidden": "true",
|
|
1139
|
-
...
|
|
1139
|
+
...h.props(q.sortIcon)
|
|
1140
1140
|
})]
|
|
1141
|
-
}) : /* @__PURE__ */
|
|
1142
|
-
...
|
|
1141
|
+
}) : /* @__PURE__ */ P("span", {
|
|
1142
|
+
...h.props(q.headerLabel),
|
|
1143
1143
|
children: e.label
|
|
1144
1144
|
})
|
|
1145
1145
|
}, e.id);
|
|
1146
1146
|
})] })
|
|
1147
1147
|
}),
|
|
1148
|
-
/* @__PURE__ */
|
|
1148
|
+
/* @__PURE__ */ F("tbody", {
|
|
1149
1149
|
onPointerLeave: () => L(void 0),
|
|
1150
1150
|
onKeyDownCapture: () => L(void 0),
|
|
1151
1151
|
onBlur: (e) => {
|
|
@@ -1155,17 +1155,17 @@ function X({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
|
|
|
1155
1155
|
});
|
|
1156
1156
|
},
|
|
1157
1157
|
children: [
|
|
1158
|
-
W.map(({ row: e, index: n, spacerHeight: r }) => /* @__PURE__ */
|
|
1158
|
+
W.map(({ row: e, index: n, spacerHeight: r }) => /* @__PURE__ */ F(ne, { children: [r > 0 && /* @__PURE__ */ P("tr", {
|
|
1159
1159
|
"aria-hidden": "true",
|
|
1160
|
-
children: /* @__PURE__ */
|
|
1160
|
+
children: /* @__PURE__ */ P("td", {
|
|
1161
1161
|
colSpan: K,
|
|
1162
|
-
...
|
|
1162
|
+
...h.props(q.spacer(r))
|
|
1163
1163
|
})
|
|
1164
|
-
}), /* @__PURE__ */
|
|
1164
|
+
}), /* @__PURE__ */ F("tr", {
|
|
1165
1165
|
"data-index": n,
|
|
1166
1166
|
"data-row-id": e.id,
|
|
1167
|
-
"aria-rowindex":
|
|
1168
|
-
ref:
|
|
1167
|
+
"aria-rowindex": x === void 0 ? void 0 : n + 2,
|
|
1168
|
+
ref: x === void 0 || b === "fixed" ? void 0 : V.measure(n),
|
|
1169
1169
|
onPointerMove: (t) => {
|
|
1170
1170
|
t.pointerType === "mouse" && L(e.id);
|
|
1171
1171
|
},
|
|
@@ -1184,48 +1184,48 @@ function X({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
|
|
|
1184
1184
|
isWithin: !0
|
|
1185
1185
|
});
|
|
1186
1186
|
},
|
|
1187
|
-
...
|
|
1188
|
-
children: [c !== void 0 && /* @__PURE__ */
|
|
1189
|
-
...
|
|
1190
|
-
children: /* @__PURE__ */
|
|
1187
|
+
...h.props(q.row, Te && q.actionable, (c?.has(e.id) === !0 || p === e.id) && q.selected),
|
|
1188
|
+
children: [c !== void 0 && /* @__PURE__ */ P("td", {
|
|
1189
|
+
...h.props(q.cell, q.selection, q.rowControl),
|
|
1190
|
+
children: /* @__PURE__ */ P(s.Root, {
|
|
1191
1191
|
"aria-label": u(e.original),
|
|
1192
1192
|
checked: c.has(e.id),
|
|
1193
1193
|
onCheckedChange: (n, r) => t.toggleRow(e.id, r.event),
|
|
1194
|
-
children: /* @__PURE__ */
|
|
1194
|
+
children: /* @__PURE__ */ P(s.Indicator, {})
|
|
1195
1195
|
})
|
|
1196
1196
|
}), j.map((t, r) => {
|
|
1197
|
-
let i = /* @__PURE__ */
|
|
1197
|
+
let i = /* @__PURE__ */ P(Ke, {
|
|
1198
1198
|
role: t.role,
|
|
1199
|
-
isFixed:
|
|
1199
|
+
isFixed: b === "fixed",
|
|
1200
1200
|
shouldTruncate: t.shouldTruncate,
|
|
1201
1201
|
children: t.cell(e.original)
|
|
1202
1202
|
});
|
|
1203
|
-
return /* @__PURE__ */
|
|
1203
|
+
return /* @__PURE__ */ P("td", {
|
|
1204
1204
|
"data-record-label": r === Ce || void 0,
|
|
1205
|
-
...
|
|
1206
|
-
children: d !== void 0 && r === Ce ? /* @__PURE__ */
|
|
1205
|
+
...h.props(q.cell, Le[b], Re[t.role], t.width !== void 0 && q.width(t.width), t.isSecondary === !0 && q.secondary),
|
|
1206
|
+
children: d !== void 0 && r === Ce ? /* @__PURE__ */ P(rt, {
|
|
1207
1207
|
index: n,
|
|
1208
1208
|
recordId: e.id,
|
|
1209
1209
|
row: e.original,
|
|
1210
1210
|
action: d,
|
|
1211
|
-
isActive:
|
|
1211
|
+
isActive: p === e.id,
|
|
1212
1212
|
children: i
|
|
1213
1213
|
}) : i
|
|
1214
1214
|
}, t.id);
|
|
1215
1215
|
})]
|
|
1216
1216
|
})] }, e.id)),
|
|
1217
|
-
|
|
1217
|
+
x !== void 0 && Pe > 0 && /* @__PURE__ */ P("tr", {
|
|
1218
1218
|
"aria-hidden": "true",
|
|
1219
|
-
children: /* @__PURE__ */
|
|
1219
|
+
children: /* @__PURE__ */ P("td", {
|
|
1220
1220
|
colSpan: K,
|
|
1221
|
-
...
|
|
1221
|
+
...h.props(q.spacer(Pe))
|
|
1222
1222
|
})
|
|
1223
1223
|
}),
|
|
1224
|
-
e.length === 0 && /* @__PURE__ */
|
|
1224
|
+
e.length === 0 && /* @__PURE__ */ P("tr", { children: /* @__PURE__ */ P("td", {
|
|
1225
1225
|
colSpan: K,
|
|
1226
|
-
...
|
|
1227
|
-
children: /* @__PURE__ */
|
|
1228
|
-
...
|
|
1226
|
+
...h.props(q.emptyCell),
|
|
1227
|
+
children: /* @__PURE__ */ P("div", {
|
|
1228
|
+
...h.props(q.empty),
|
|
1229
1229
|
children: i
|
|
1230
1230
|
})
|
|
1231
1231
|
}) })
|
|
@@ -1235,67 +1235,67 @@ function X({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, on
|
|
|
1235
1235
|
}
|
|
1236
1236
|
let { api: Y, element: Je } = $e(De, (t) => ({
|
|
1237
1237
|
"aria-label": r,
|
|
1238
|
-
"aria-busy":
|
|
1239
|
-
"aria-rowcount":
|
|
1240
|
-
...
|
|
1238
|
+
"aria-busy": ie === "pending" || void 0,
|
|
1239
|
+
"aria-rowcount": x === void 0 ? void 0 : Math.max(1, e.length) + 1,
|
|
1240
|
+
...h.props(q.table, q.fixed, q.minimumWidth(je, Me)),
|
|
1241
1241
|
children: qe(t)
|
|
1242
1242
|
}));
|
|
1243
|
-
return
|
|
1244
|
-
if (
|
|
1243
|
+
return E(() => {
|
|
1244
|
+
if (m === void 0) {
|
|
1245
1245
|
R.current = void 0;
|
|
1246
1246
|
return;
|
|
1247
1247
|
}
|
|
1248
|
-
let e = z.indexOf(
|
|
1249
|
-
if (R.current ===
|
|
1248
|
+
let e = z.indexOf(m);
|
|
1249
|
+
if (R.current === m || e === -1) return;
|
|
1250
1250
|
let t = requestAnimationFrame(() => {
|
|
1251
|
-
Y.focusRow(e) && (R.current =
|
|
1251
|
+
Y.focusRow(e) && (R.current = m);
|
|
1252
1252
|
});
|
|
1253
1253
|
return () => cancelAnimationFrame(t);
|
|
1254
1254
|
}, [
|
|
1255
1255
|
z,
|
|
1256
|
-
|
|
1256
|
+
m,
|
|
1257
1257
|
Te,
|
|
1258
1258
|
Y
|
|
1259
|
-
]), /* @__PURE__ */
|
|
1260
|
-
...
|
|
1261
|
-
children: [/* @__PURE__ */
|
|
1262
|
-
ref:
|
|
1259
|
+
]), /* @__PURE__ */ F("div", {
|
|
1260
|
+
...h.props(q.frame, ze[we]),
|
|
1261
|
+
children: [/* @__PURE__ */ F("div", {
|
|
1262
|
+
ref: se.ref,
|
|
1263
1263
|
"data-table-viewport": !0,
|
|
1264
1264
|
role: "region",
|
|
1265
1265
|
"aria-label": r,
|
|
1266
|
-
tabIndex:
|
|
1267
|
-
...
|
|
1266
|
+
tabIndex: se.tabIndex,
|
|
1267
|
+
...h.props(q.viewport, Be[we], typeof x?.height == "number" && q.virtual(x.height)),
|
|
1268
1268
|
children: [
|
|
1269
1269
|
Je,
|
|
1270
|
-
|
|
1270
|
+
x !== void 0 && /* @__PURE__ */ P("div", {
|
|
1271
1271
|
"aria-hidden": !0,
|
|
1272
|
-
...
|
|
1272
|
+
...h.props(q.sizer(pe + V.size))
|
|
1273
1273
|
}),
|
|
1274
|
-
/* @__PURE__ */
|
|
1275
|
-
ref:
|
|
1276
|
-
...
|
|
1277
|
-
children:
|
|
1274
|
+
/* @__PURE__ */ P("div", {
|
|
1275
|
+
ref: ue,
|
|
1276
|
+
...h.props(S !== void 0 && q.endContent),
|
|
1277
|
+
children: S
|
|
1278
1278
|
})
|
|
1279
1279
|
]
|
|
1280
|
-
}), Ae && /* @__PURE__ */
|
|
1281
|
-
...
|
|
1282
|
-
children: [
|
|
1283
|
-
...
|
|
1280
|
+
}), Ae && /* @__PURE__ */ F("div", {
|
|
1281
|
+
...h.props(q.footer),
|
|
1282
|
+
children: [T, A !== void 0 && /* @__PURE__ */ P(ke, {
|
|
1283
|
+
...A,
|
|
1284
1284
|
label: r
|
|
1285
1285
|
})]
|
|
1286
1286
|
})]
|
|
1287
1287
|
});
|
|
1288
1288
|
}
|
|
1289
1289
|
// packages/collections/src/table-query.tsx
|
|
1290
|
-
var ut =
|
|
1290
|
+
var ut = S(void 0);
|
|
1291
1291
|
function Z(e) {
|
|
1292
1292
|
if (e.reason.trim().length === 0) throw Error("A table query exception requires a reason.");
|
|
1293
1293
|
}
|
|
1294
1294
|
function dt({ search: e, filters: t, children: n, isFiltered: r = !1 }) {
|
|
1295
|
-
return e === void 0 ? /* @__PURE__ */
|
|
1295
|
+
return e === void 0 ? /* @__PURE__ */ P(ut, {
|
|
1296
1296
|
value: void 0,
|
|
1297
1297
|
children: n
|
|
1298
|
-
}) : (e !== !0 && Z(e), t !== !0 && Z(t), /* @__PURE__ */
|
|
1298
|
+
}) : (e !== !0 && Z(e), t !== !0 && Z(t), /* @__PURE__ */ P(ut, {
|
|
1299
1299
|
value: r,
|
|
1300
1300
|
children: n
|
|
1301
1301
|
}));
|
|
@@ -1309,12 +1309,12 @@ function ft(e) {
|
|
|
1309
1309
|
}
|
|
1310
1310
|
var pt = [];
|
|
1311
1311
|
function mt(e, t) {
|
|
1312
|
-
let [n, r] =
|
|
1312
|
+
let [n, r] = k(""), [i, a] = k(/* @__PURE__ */ new Map()), o = typeof t.search == "function" ? t.search : void 0;
|
|
1313
1313
|
typeof t.search != "function" && Z(t.search), ft(t.filters);
|
|
1314
1314
|
let s = "reason" in t.filters ? pt : t.filters, c = o === void 0 ? void 0 : {
|
|
1315
1315
|
value: n,
|
|
1316
1316
|
onChange: r
|
|
1317
|
-
}, l = n.trim().toLowerCase(), u =
|
|
1317
|
+
}, l = n.trim().toLowerCase(), u = D(() => s.map((t) => {
|
|
1318
1318
|
let n = new Set(e.map(t.value)), r = i.get(t.id);
|
|
1319
1319
|
r !== void 0 && n.add(r);
|
|
1320
1320
|
let o = Array.from(n, (e) => ({
|
|
@@ -1350,7 +1350,7 @@ function mt(e, t) {
|
|
|
1350
1350
|
};
|
|
1351
1351
|
}
|
|
1352
1352
|
function ht() {
|
|
1353
|
-
let e =
|
|
1353
|
+
let e = C(ut);
|
|
1354
1354
|
if (e === void 0) throw Error("A frame-owned table requires its enclosing collection to supply TableQueryFrame.");
|
|
1355
1355
|
return e;
|
|
1356
1356
|
}
|
|
@@ -1401,48 +1401,48 @@ var Q = {
|
|
|
1401
1401
|
"Delete"
|
|
1402
1402
|
]);
|
|
1403
1403
|
function yt({ option: e }) {
|
|
1404
|
-
return /* @__PURE__ */
|
|
1405
|
-
...
|
|
1406
|
-
children: e.icon ?? /* @__PURE__ */
|
|
1404
|
+
return /* @__PURE__ */ P("span", {
|
|
1405
|
+
...h.props(Q.icon, _t[e.tone ?? "neutral"]),
|
|
1406
|
+
children: e.icon ?? /* @__PURE__ */ P(me, {
|
|
1407
1407
|
size: 14,
|
|
1408
1408
|
"aria-hidden": !0
|
|
1409
1409
|
})
|
|
1410
1410
|
});
|
|
1411
1411
|
}
|
|
1412
1412
|
function bt({ groups: t }) {
|
|
1413
|
-
let [n, i] =
|
|
1413
|
+
let [n, i] = k(""), a = t.filter((e) => e.label.toLowerCase().includes(n.toLowerCase())), o = t.length === 1 && t[0] !== void 0 ? `Filter by ${t[0].label.toLowerCase()}` : "Filters", s = De(/* @__PURE__ */ P(e, {
|
|
1414
1414
|
"aria-label": o,
|
|
1415
1415
|
title: "Filters"
|
|
1416
1416
|
}));
|
|
1417
|
-
return /* @__PURE__ */
|
|
1417
|
+
return /* @__PURE__ */ F(c.Root, {
|
|
1418
1418
|
onOpenChange: (e) => {
|
|
1419
1419
|
e || i("");
|
|
1420
1420
|
},
|
|
1421
|
-
children: [/* @__PURE__ */
|
|
1421
|
+
children: [/* @__PURE__ */ P(c.Trigger, {
|
|
1422
1422
|
render: s,
|
|
1423
|
-
children: /* @__PURE__ */
|
|
1423
|
+
children: /* @__PURE__ */ P(I, {
|
|
1424
1424
|
size: 14,
|
|
1425
1425
|
"aria-hidden": !0
|
|
1426
1426
|
})
|
|
1427
|
-
}), /* @__PURE__ */
|
|
1427
|
+
}), /* @__PURE__ */ F(c.Popup, {
|
|
1428
1428
|
align: "end",
|
|
1429
1429
|
children: [
|
|
1430
|
-
/* @__PURE__ */
|
|
1430
|
+
/* @__PURE__ */ P(xt, {
|
|
1431
1431
|
label: "Find a filter",
|
|
1432
1432
|
value: n,
|
|
1433
1433
|
onChange: i
|
|
1434
1434
|
}),
|
|
1435
|
-
a.map((e) => /* @__PURE__ */
|
|
1436
|
-
a.length === 0 && /* @__PURE__ */
|
|
1435
|
+
a.map((e) => /* @__PURE__ */ P(St, { group: e }, e.id)),
|
|
1436
|
+
a.length === 0 && /* @__PURE__ */ P("div", {
|
|
1437
1437
|
className: "x1hmw7ec x5g2kb4",
|
|
1438
|
-
children: /* @__PURE__ */
|
|
1438
|
+
children: /* @__PURE__ */ P(r, { children: "No filters found" })
|
|
1439
1439
|
})
|
|
1440
1440
|
]
|
|
1441
1441
|
})]
|
|
1442
1442
|
});
|
|
1443
1443
|
}
|
|
1444
1444
|
function xt({ label: e, value: t, onChange: n }) {
|
|
1445
|
-
return /* @__PURE__ */
|
|
1445
|
+
return /* @__PURE__ */ P(m, {
|
|
1446
1446
|
type: "search",
|
|
1447
1447
|
"aria-label": e,
|
|
1448
1448
|
placeholder: "Filter…",
|
|
@@ -1456,52 +1456,52 @@ function xt({ label: e, value: t, onChange: n }) {
|
|
|
1456
1456
|
});
|
|
1457
1457
|
}
|
|
1458
1458
|
function St({ group: e }) {
|
|
1459
|
-
let [t, n] =
|
|
1460
|
-
return /* @__PURE__ */
|
|
1459
|
+
let [t, n] = k(""), i = e.options.filter((e) => e.label.toLowerCase().includes(t.toLowerCase()));
|
|
1460
|
+
return /* @__PURE__ */ F(c.SubmenuRoot, {
|
|
1461
1461
|
onOpenChange: (e) => {
|
|
1462
1462
|
e || n("");
|
|
1463
1463
|
},
|
|
1464
|
-
children: [/* @__PURE__ */
|
|
1465
|
-
e.icon ?? /* @__PURE__ */
|
|
1464
|
+
children: [/* @__PURE__ */ F(c.SubmenuTrigger, { children: [
|
|
1465
|
+
e.icon ?? /* @__PURE__ */ P(I, {
|
|
1466
1466
|
size: 14,
|
|
1467
1467
|
"aria-hidden": !0
|
|
1468
1468
|
}),
|
|
1469
|
-
/* @__PURE__ */
|
|
1469
|
+
/* @__PURE__ */ P("span", {
|
|
1470
1470
|
className: "x98rzlu xeuugli xj0a0fe",
|
|
1471
1471
|
children: e.label
|
|
1472
1472
|
}),
|
|
1473
|
-
/* @__PURE__ */
|
|
1473
|
+
/* @__PURE__ */ P("span", {
|
|
1474
1474
|
className: "xazcve0 xb3r6kr xuxw1ft xlyipyv x153jb6y xy8obcc xas2l8k",
|
|
1475
1475
|
children: e.options.find((t) => t.value === e.value)?.label
|
|
1476
1476
|
}),
|
|
1477
|
-
/* @__PURE__ */
|
|
1477
|
+
/* @__PURE__ */ P(pe, {
|
|
1478
1478
|
size: 14,
|
|
1479
1479
|
"aria-hidden": !0
|
|
1480
1480
|
})
|
|
1481
|
-
] }), /* @__PURE__ */
|
|
1481
|
+
] }), /* @__PURE__ */ F(c.Popup, {
|
|
1482
1482
|
align: "start",
|
|
1483
1483
|
"aria-label": e.label,
|
|
1484
1484
|
children: [
|
|
1485
|
-
/* @__PURE__ */
|
|
1485
|
+
/* @__PURE__ */ P(xt, {
|
|
1486
1486
|
label: `Find ${e.label.toLowerCase()}`,
|
|
1487
1487
|
value: t,
|
|
1488
1488
|
onChange: n
|
|
1489
1489
|
}),
|
|
1490
|
-
/* @__PURE__ */
|
|
1490
|
+
/* @__PURE__ */ P(c.RadioGroup, {
|
|
1491
1491
|
value: e.value,
|
|
1492
1492
|
onValueChange: e.onChange,
|
|
1493
|
-
children: i.map((e) => /* @__PURE__ */
|
|
1493
|
+
children: i.map((e) => /* @__PURE__ */ F(c.RadioItem, {
|
|
1494
1494
|
value: e.value,
|
|
1495
1495
|
closeOnSelect: !0,
|
|
1496
|
-
children: [/* @__PURE__ */
|
|
1496
|
+
children: [/* @__PURE__ */ P(yt, { option: e }), /* @__PURE__ */ P("span", {
|
|
1497
1497
|
className: "x98rzlu xeuugli xj0a0fe",
|
|
1498
1498
|
children: e.label
|
|
1499
1499
|
})]
|
|
1500
1500
|
}, e.value))
|
|
1501
1501
|
}),
|
|
1502
|
-
i.length === 0 && /* @__PURE__ */
|
|
1502
|
+
i.length === 0 && /* @__PURE__ */ P("div", {
|
|
1503
1503
|
className: "x1hmw7ec x5g2kb4",
|
|
1504
|
-
children: /* @__PURE__ */
|
|
1504
|
+
children: /* @__PURE__ */ P(r, { children: "No options found" })
|
|
1505
1505
|
})
|
|
1506
1506
|
]
|
|
1507
1507
|
})]
|
|
@@ -1524,7 +1524,7 @@ function wt(e) {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
throw Error("Select a listed filter option, or provide a filter ID and value.");
|
|
1526
1526
|
}
|
|
1527
|
-
var Tt =
|
|
1527
|
+
var Tt = M({
|
|
1528
1528
|
name: "collection-query",
|
|
1529
1529
|
options: {
|
|
1530
1530
|
search: "value",
|
|
@@ -1540,13 +1540,13 @@ var Tt = se({
|
|
|
1540
1540
|
let { search: t, isDisabled: n } = e();
|
|
1541
1541
|
return n || t === void 0 ? null : (e) => {
|
|
1542
1542
|
if (typeof e != "string") throw TypeError("The search term must be a string.");
|
|
1543
|
-
|
|
1543
|
+
N({ options: () => t }, "onChange", e, { reason: "imperative" });
|
|
1544
1544
|
};
|
|
1545
1545
|
},
|
|
1546
1546
|
get submitSearch() {
|
|
1547
1547
|
let { search: t, isDisabled: n } = e();
|
|
1548
1548
|
return n || t?.onSubmit === void 0 ? null : () => {
|
|
1549
|
-
|
|
1549
|
+
N({ options: () => t }, "onSubmit", t.value, { reason: "imperative" });
|
|
1550
1550
|
};
|
|
1551
1551
|
},
|
|
1552
1552
|
get setFilter() {
|
|
@@ -1554,7 +1554,7 @@ var Tt = se({
|
|
|
1554
1554
|
return n || t.length === 0 ? null : (e, n) => {
|
|
1555
1555
|
let [r, i] = n === void 0 ? wt(e) : [e, n], a = t.find((e) => e.id === r);
|
|
1556
1556
|
if (a === void 0 || !a.options.some((e) => e.value === i)) throw Error("Unknown filter or option. Choose one of the listed filter options.");
|
|
1557
|
-
|
|
1557
|
+
N({ options: () => a }, "onChange", i, { reason: "imperative" });
|
|
1558
1558
|
};
|
|
1559
1559
|
},
|
|
1560
1560
|
items() {
|
|
@@ -1574,142 +1574,142 @@ var Tt = se({
|
|
|
1574
1574
|
shown: (e) => e.available && !e.disabled
|
|
1575
1575
|
},
|
|
1576
1576
|
slots: (e) => ({ root: e({}) })
|
|
1577
|
-
}), Et =
|
|
1577
|
+
}), Et = _(Tt, { root: "div" }).Root, Dt = { input: {
|
|
1578
1578
|
k7Eaqz: "xeuugli",
|
|
1579
1579
|
kUk6DE: "x98rzlu",
|
|
1580
1580
|
$$css: !0
|
|
1581
1581
|
} };
|
|
1582
1582
|
function Ot({ label: t = "Collection controls", search: n, filters: r = [], filterContent: i, chips: a = [], viewActions: o, display: s, isPlaceholder: c = !1, isReady: u }) {
|
|
1583
|
-
let [d, f] =
|
|
1584
|
-
|
|
1585
|
-
d && !c && u && (
|
|
1583
|
+
let [d, f] = k(!1), [p, ee] = k(!1), te = O(null), h = O(null), g = O(null), _ = D(() => Object.fromEntries(r.map((e) => [e.id, e.value])), [r]), v = c || !u, y = n !== void 0 && (d || n.value.length > 0);
|
|
1584
|
+
E(() => {
|
|
1585
|
+
d && !c && u && (g.current?.focus(), g.current?.select());
|
|
1586
1586
|
}, [
|
|
1587
1587
|
d,
|
|
1588
1588
|
c,
|
|
1589
1589
|
u
|
|
1590
1590
|
]);
|
|
1591
|
-
function
|
|
1592
|
-
(
|
|
1591
|
+
function b() {
|
|
1592
|
+
(te.current ?? h.current?.querySelector("button"))?.focus();
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1595
|
-
n !== void 0 && !c && u && (
|
|
1594
|
+
function ne() {
|
|
1595
|
+
n !== void 0 && !c && u && (g.current?.focus(), g.current?.select(), f(!0));
|
|
1596
1596
|
}
|
|
1597
|
-
function
|
|
1598
|
-
n !== void 0 &&
|
|
1597
|
+
function S(e, t) {
|
|
1598
|
+
n !== void 0 && N({ options: () => n }, "onChange", "", {
|
|
1599
1599
|
reason: e,
|
|
1600
1600
|
event: t
|
|
1601
|
-
}), f(!1),
|
|
1601
|
+
}), f(!1), b();
|
|
1602
1602
|
}
|
|
1603
|
-
function
|
|
1604
|
-
|
|
1603
|
+
function C(e) {
|
|
1604
|
+
y && !e.defaultPrevented && e.key === "Escape" && e.target instanceof Element && e.target.closest("[role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"], [data-native-find], input:not([data-view-find]), textarea, select") === null && (e.preventDefault(), e.stopPropagation(), S("escape-key", e.nativeEvent));
|
|
1605
1605
|
}
|
|
1606
|
-
let
|
|
1606
|
+
let w = r.filter((e) => e.value !== e.defaultValue).map((e) => ({
|
|
1607
1607
|
id: `filter:${e.id}`,
|
|
1608
1608
|
label: e.options.find((t) => t.value === e.value)?.label ?? e.value,
|
|
1609
1609
|
onRemove: (t) => e.onChange(e.defaultValue, t)
|
|
1610
1610
|
}));
|
|
1611
|
-
for (let e of a)
|
|
1611
|
+
for (let e of a) w.push({
|
|
1612
1612
|
...e,
|
|
1613
1613
|
id: `chip:${e.id}`
|
|
1614
1614
|
});
|
|
1615
|
-
let
|
|
1615
|
+
let T = i !== void 0 || r.length > 0, re = x.toArray([o, s]).length > 0, A = n !== void 0 || T || re, ie = n?.label ?? "Search this view", ae = n?.placeholder ?? "Find in view…";
|
|
1616
1616
|
return {
|
|
1617
|
-
openSearch:
|
|
1618
|
-
onKeyDown:
|
|
1619
|
-
actions:
|
|
1617
|
+
openSearch: ne,
|
|
1618
|
+
onKeyDown: C,
|
|
1619
|
+
actions: A ? /* @__PURE__ */ F(U, {
|
|
1620
1620
|
"aria-label": t,
|
|
1621
|
-
render: /* @__PURE__ */
|
|
1621
|
+
render: /* @__PURE__ */ P(Et, {
|
|
1622
1622
|
search: n,
|
|
1623
1623
|
groups: r,
|
|
1624
|
-
selections:
|
|
1625
|
-
isDisabled:
|
|
1626
|
-
ref:
|
|
1627
|
-
"aria-hidden":
|
|
1628
|
-
inert:
|
|
1624
|
+
selections: _,
|
|
1625
|
+
isDisabled: v,
|
|
1626
|
+
ref: h,
|
|
1627
|
+
"aria-hidden": v,
|
|
1628
|
+
inert: v,
|
|
1629
1629
|
className: "x78zum5 x6s0dn4 x1a02dak x13a6bvl x1hnptsi xeuugli x193iq5w"
|
|
1630
1630
|
}),
|
|
1631
1631
|
children: [
|
|
1632
|
-
n !== void 0 && /* @__PURE__ */
|
|
1632
|
+
n !== void 0 && /* @__PURE__ */ P(z, {
|
|
1633
1633
|
disabled: c,
|
|
1634
|
-
render: /* @__PURE__ */
|
|
1635
|
-
ref:
|
|
1634
|
+
render: /* @__PURE__ */ P(e, {
|
|
1635
|
+
ref: te,
|
|
1636
1636
|
type: "button",
|
|
1637
1637
|
"aria-label": "Find in view",
|
|
1638
1638
|
title: "Find in view",
|
|
1639
1639
|
"data-view-find-trigger": !0,
|
|
1640
|
-
"aria-expanded":
|
|
1641
|
-
onClick:
|
|
1640
|
+
"aria-expanded": y,
|
|
1641
|
+
onClick: ne
|
|
1642
1642
|
}),
|
|
1643
|
-
children: /* @__PURE__ */
|
|
1643
|
+
children: /* @__PURE__ */ P(he, {
|
|
1644
1644
|
size: 14,
|
|
1645
1645
|
"aria-hidden": !0
|
|
1646
1646
|
})
|
|
1647
1647
|
}),
|
|
1648
|
-
|
|
1648
|
+
y && /* @__PURE__ */ F("div", {
|
|
1649
1649
|
className: "x78zum5 x6s0dn4 xunmzkg xdl07me x193iq5w",
|
|
1650
|
-
children: [/* @__PURE__ */
|
|
1650
|
+
children: [/* @__PURE__ */ P(B, {
|
|
1651
1651
|
disabled: c,
|
|
1652
|
-
render: /* @__PURE__ */
|
|
1653
|
-
ref:
|
|
1652
|
+
render: /* @__PURE__ */ P(m, {
|
|
1653
|
+
ref: g,
|
|
1654
1654
|
type: "search",
|
|
1655
1655
|
"data-view-find": !0,
|
|
1656
|
-
"aria-label":
|
|
1656
|
+
"aria-label": ie,
|
|
1657
1657
|
placeholder: ae,
|
|
1658
1658
|
value: n.value,
|
|
1659
1659
|
onValueChange: n.onChange,
|
|
1660
1660
|
onKeyDown: (e) => {
|
|
1661
|
-
e.key === "Enter" && n.onSubmit !== void 0 && (e.preventDefault(),
|
|
1661
|
+
e.key === "Enter" && n.onSubmit !== void 0 && (e.preventDefault(), N({ options: () => n }, "onSubmit", n.value, {
|
|
1662
1662
|
reason: "enter-key",
|
|
1663
1663
|
event: e.nativeEvent
|
|
1664
|
-
})), e.key === "Escape" && (e.preventDefault(), e.stopPropagation(),
|
|
1664
|
+
})), e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), S("escape-key", e.nativeEvent));
|
|
1665
1665
|
},
|
|
1666
1666
|
xstyle: Dt.input
|
|
1667
1667
|
})
|
|
1668
|
-
}), /* @__PURE__ */
|
|
1669
|
-
render: /* @__PURE__ */
|
|
1668
|
+
}), /* @__PURE__ */ P(z, {
|
|
1669
|
+
render: /* @__PURE__ */ P(e, {
|
|
1670
1670
|
type: "button",
|
|
1671
1671
|
variant: "ghost",
|
|
1672
1672
|
"data-view-find-close": !0,
|
|
1673
1673
|
"aria-label": "Close search",
|
|
1674
1674
|
title: "Close search (Esc)",
|
|
1675
|
-
onClick: (e) =>
|
|
1675
|
+
onClick: (e) => S("clear-press", e.nativeEvent)
|
|
1676
1676
|
}),
|
|
1677
|
-
children: /* @__PURE__ */
|
|
1677
|
+
children: /* @__PURE__ */ P(L, {
|
|
1678
1678
|
size: 14,
|
|
1679
1679
|
"aria-hidden": !0
|
|
1680
1680
|
})
|
|
1681
1681
|
})]
|
|
1682
1682
|
}),
|
|
1683
|
-
i === void 0 ? r.length > 0 ? /* @__PURE__ */
|
|
1684
|
-
open:
|
|
1685
|
-
onOpenChange:
|
|
1686
|
-
children: [/* @__PURE__ */
|
|
1687
|
-
render: /* @__PURE__ */
|
|
1683
|
+
i === void 0 ? r.length > 0 ? /* @__PURE__ */ P(bt, { groups: r }) : null : /* @__PURE__ */ F(l.Root, {
|
|
1684
|
+
open: p,
|
|
1685
|
+
onOpenChange: ee,
|
|
1686
|
+
children: [/* @__PURE__ */ P(l.Trigger, {
|
|
1687
|
+
render: /* @__PURE__ */ P(z, { render: /* @__PURE__ */ P(e, {
|
|
1688
1688
|
"aria-label": "Filters",
|
|
1689
1689
|
title: "Filters"
|
|
1690
1690
|
}) }),
|
|
1691
|
-
children: /* @__PURE__ */
|
|
1691
|
+
children: /* @__PURE__ */ P(I, {
|
|
1692
1692
|
size: 14,
|
|
1693
1693
|
"aria-hidden": !0
|
|
1694
1694
|
})
|
|
1695
|
-
}), /* @__PURE__ */
|
|
1695
|
+
}), /* @__PURE__ */ F(l.Popup, {
|
|
1696
1696
|
align: "end",
|
|
1697
1697
|
className: "x1m258z3 xw7nakj",
|
|
1698
|
-
children: [/* @__PURE__ */
|
|
1698
|
+
children: [/* @__PURE__ */ P(l.Title, { children: "Filters" }), i(() => ee(!1))]
|
|
1699
1699
|
})]
|
|
1700
1700
|
}),
|
|
1701
1701
|
o,
|
|
1702
1702
|
s
|
|
1703
1703
|
]
|
|
1704
1704
|
}) : void 0,
|
|
1705
|
-
chips:
|
|
1706
|
-
"aria-hidden":
|
|
1707
|
-
inert:
|
|
1705
|
+
chips: w.length > 0 && /* @__PURE__ */ P("div", {
|
|
1706
|
+
"aria-hidden": v,
|
|
1707
|
+
inert: v,
|
|
1708
1708
|
className: "xjp7ctv",
|
|
1709
|
-
children: /* @__PURE__ */
|
|
1710
|
-
filters:
|
|
1709
|
+
children: /* @__PURE__ */ P(K, {
|
|
1710
|
+
filters: w,
|
|
1711
1711
|
onRemove: (e, t) => {
|
|
1712
|
-
|
|
1712
|
+
b(), w.find((t) => t.id === e)?.onRemove(t);
|
|
1713
1713
|
}
|
|
1714
1714
|
})
|
|
1715
1715
|
})
|
|
@@ -1719,13 +1719,13 @@ function Ot({ label: t = "Collection controls", search: n, filters: r = [], filt
|
|
|
1719
1719
|
function kt({ columns: e, rows: t = 3, hideCaption: n = !0, ...r }) {
|
|
1720
1720
|
let i = typeof r.window?.height == "string" ? r.window.height : "content", a = Array.from({ length: t }, (e, t) => ({ id: String(t) })), o = e.map(({ placeholder: e, ...t }) => ({
|
|
1721
1721
|
...t,
|
|
1722
|
-
cell: () => e ?? /* @__PURE__ */
|
|
1722
|
+
cell: () => e ?? /* @__PURE__ */ P(d, { width: "60%" })
|
|
1723
1723
|
}));
|
|
1724
|
-
return /* @__PURE__ */
|
|
1724
|
+
return /* @__PURE__ */ P("div", {
|
|
1725
1725
|
"aria-hidden": !0,
|
|
1726
1726
|
inert: !0,
|
|
1727
|
-
...
|
|
1728
|
-
children: /* @__PURE__ */
|
|
1727
|
+
...h.props(ze[i], q.placeholder),
|
|
1728
|
+
children: /* @__PURE__ */ P(X, {
|
|
1729
1729
|
...r,
|
|
1730
1730
|
hideCaption: n,
|
|
1731
1731
|
isPlaceholder: !0,
|
|
@@ -1740,31 +1740,31 @@ function At({ query: e, ...t }) {
|
|
|
1740
1740
|
switch (e.mode) {
|
|
1741
1741
|
case "local":
|
|
1742
1742
|
if (t.onEndReached !== void 0 || t.pagination !== void 0) throw Error("Local table queries require all rows. Use a controlled or frame query for a paged source.");
|
|
1743
|
-
return /* @__PURE__ */
|
|
1743
|
+
return /* @__PURE__ */ P(Mt, {
|
|
1744
1744
|
query: e,
|
|
1745
1745
|
table: t
|
|
1746
1746
|
});
|
|
1747
|
-
case "controlled": return /* @__PURE__ */
|
|
1747
|
+
case "controlled": return /* @__PURE__ */ P(Nt, {
|
|
1748
1748
|
table: {
|
|
1749
1749
|
...t,
|
|
1750
1750
|
filteredEmpty: t.filteredEmpty ?? t.empty
|
|
1751
1751
|
},
|
|
1752
1752
|
...gt(e)
|
|
1753
1753
|
});
|
|
1754
|
-
case "frame": return /* @__PURE__ */
|
|
1755
|
-
case "static": return Z(e), /* @__PURE__ */
|
|
1754
|
+
case "frame": return /* @__PURE__ */ P(jt, { table: t });
|
|
1755
|
+
case "static": return Z(e), /* @__PURE__ */ P(dt, { children: /* @__PURE__ */ P(X, { ...t }) });
|
|
1756
1756
|
}
|
|
1757
1757
|
}
|
|
1758
1758
|
function jt({ table: e }) {
|
|
1759
1759
|
let t = ht();
|
|
1760
|
-
return /* @__PURE__ */
|
|
1760
|
+
return /* @__PURE__ */ P(dt, { children: /* @__PURE__ */ P(X, {
|
|
1761
1761
|
...e,
|
|
1762
1762
|
empty: t ? e.filteredEmpty ?? "No matching records." : e.empty
|
|
1763
1763
|
}) });
|
|
1764
1764
|
}
|
|
1765
1765
|
function Mt({ query: e, table: t }) {
|
|
1766
1766
|
let { rows: n, search: r, filters: i, isFiltered: a } = mt(t.rows, e);
|
|
1767
|
-
return /* @__PURE__ */
|
|
1767
|
+
return /* @__PURE__ */ P(Nt, {
|
|
1768
1768
|
table: {
|
|
1769
1769
|
...t,
|
|
1770
1770
|
rows: n
|
|
@@ -1780,7 +1780,7 @@ function Nt({ table: e, search: t, filters: n, isFiltered: r }) {
|
|
|
1780
1780
|
filters: n,
|
|
1781
1781
|
isReady: !0,
|
|
1782
1782
|
label: e.caption
|
|
1783
|
-
}), a =
|
|
1783
|
+
}), a = O(null), o = {
|
|
1784
1784
|
description: `Find in ${e.caption}`,
|
|
1785
1785
|
layer: a,
|
|
1786
1786
|
when: () => {
|
|
@@ -1790,16 +1790,16 @@ function Nt({ table: e, search: t, filters: n, isFiltered: r }) {
|
|
|
1790
1790
|
return t === null || t.closest("[data-native-find], textarea, select, input:not([data-view-find]), [contenteditable=\"true\"], [role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"]") !== null ? !1 : t.closest("[data-table-query]") === e || t === e.ownerDocument.body && e.ownerDocument.querySelectorAll("[data-view-find-trigger]").length === 1;
|
|
1791
1791
|
}
|
|
1792
1792
|
};
|
|
1793
|
-
return R(t === void 0 ? null : "/", i.openSearch, o), R(t === void 0 ? null : "mod+f", i.openSearch, o), /* @__PURE__ */
|
|
1793
|
+
return R(t === void 0 ? null : "/", i.openSearch, o), R(t === void 0 ? null : "mod+f", i.openSearch, o), /* @__PURE__ */ P(dt, { children: /* @__PURE__ */ F("div", {
|
|
1794
1794
|
ref: a,
|
|
1795
1795
|
"data-table-query": !0,
|
|
1796
1796
|
onKeyDown: i.onKeyDown,
|
|
1797
|
-
...
|
|
1798
|
-
children: [(t !== void 0 || n.length > 0) && /* @__PURE__ */
|
|
1797
|
+
...h.props(ze[typeof e.window?.height == "string" ? e.window.height : "content"]),
|
|
1798
|
+
children: [(t !== void 0 || n.length > 0) && /* @__PURE__ */ P(G, {
|
|
1799
1799
|
label: `${e.caption} controls`,
|
|
1800
1800
|
actions: i.actions,
|
|
1801
1801
|
children: i.chips
|
|
1802
|
-
}), /* @__PURE__ */
|
|
1802
|
+
}), /* @__PURE__ */ P(X, {
|
|
1803
1803
|
...e,
|
|
1804
1804
|
empty: r ? e.filteredEmpty ?? "No matching records." : e.empty
|
|
1805
1805
|
})]
|
|
@@ -1808,28 +1808,28 @@ function Nt({ table: e, search: t, filters: n, isFiltered: r }) {
|
|
|
1808
1808
|
// packages/collections/src/collection-scroll.tsx
|
|
1809
1809
|
function Pt(e) {
|
|
1810
1810
|
switch (e.status) {
|
|
1811
|
-
case "loading": return /* @__PURE__ */
|
|
1811
|
+
case "loading": return /* @__PURE__ */ P(n, {
|
|
1812
1812
|
role: "status",
|
|
1813
1813
|
variant: "caption",
|
|
1814
1814
|
tone: "muted",
|
|
1815
1815
|
children: e.message ?? "Loading…"
|
|
1816
1816
|
});
|
|
1817
|
-
case "complete": return e.message === void 0 ? null : /* @__PURE__ */
|
|
1817
|
+
case "complete": return e.message === void 0 ? null : /* @__PURE__ */ P(n, {
|
|
1818
1818
|
variant: "caption",
|
|
1819
1819
|
tone: "muted",
|
|
1820
1820
|
children: e.message
|
|
1821
1821
|
});
|
|
1822
|
-
case "ready": return /* @__PURE__ */
|
|
1822
|
+
case "ready": return /* @__PURE__ */ P(t, {
|
|
1823
1823
|
onClick: e.onLoadMore,
|
|
1824
1824
|
children: e.message ?? "Load more"
|
|
1825
1825
|
});
|
|
1826
|
-
case "error": return /* @__PURE__ */
|
|
1826
|
+
case "error": return /* @__PURE__ */ F(i, {
|
|
1827
1827
|
role: "status",
|
|
1828
|
-
children: [/* @__PURE__ */
|
|
1828
|
+
children: [/* @__PURE__ */ P(n, {
|
|
1829
1829
|
variant: "caption",
|
|
1830
1830
|
tone: "muted",
|
|
1831
1831
|
children: e.message ?? "More records could not be loaded."
|
|
1832
|
-
}), /* @__PURE__ */
|
|
1832
|
+
}), /* @__PURE__ */ P(t, {
|
|
1833
1833
|
onClick: e.onLoadMore,
|
|
1834
1834
|
children: "Retry"
|
|
1835
1835
|
})]
|
|
@@ -1837,14 +1837,14 @@ function Pt(e) {
|
|
|
1837
1837
|
}
|
|
1838
1838
|
}
|
|
1839
1839
|
function Ft({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, endPosition: i = "end", label: a = "Collection" }) {
|
|
1840
|
-
let o =
|
|
1840
|
+
let o = te(), s = o.viewport, c = O(null);
|
|
1841
1841
|
it({
|
|
1842
1842
|
end: c,
|
|
1843
1843
|
viewport: r ? s : void 0,
|
|
1844
1844
|
onEndReached: n,
|
|
1845
1845
|
content: e
|
|
1846
1846
|
});
|
|
1847
|
-
let l = /* @__PURE__ */
|
|
1847
|
+
let l = /* @__PURE__ */ P("div", {
|
|
1848
1848
|
ref: c,
|
|
1849
1849
|
...{
|
|
1850
1850
|
0: {},
|
|
@@ -1852,7 +1852,7 @@ function Ft({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, e
|
|
|
1852
1852
|
}[t !== void 0 | 0],
|
|
1853
1853
|
children: t
|
|
1854
1854
|
});
|
|
1855
|
-
return /* @__PURE__ */
|
|
1855
|
+
return /* @__PURE__ */ F("div", {
|
|
1856
1856
|
ref: o.ref,
|
|
1857
1857
|
role: r ? "region" : void 0,
|
|
1858
1858
|
"aria-label": r ? a : void 0,
|
|
@@ -1869,11 +1869,11 @@ function Ft({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, e
|
|
|
1869
1869
|
});
|
|
1870
1870
|
}
|
|
1871
1871
|
// packages/collections/src/inspector.tsx
|
|
1872
|
-
var It = 860, Lt =
|
|
1872
|
+
var It = 860, Lt = S(void 0);
|
|
1873
1873
|
function Rt({ reading: e }) {
|
|
1874
1874
|
return { value: e };
|
|
1875
1875
|
}
|
|
1876
|
-
var zt =
|
|
1876
|
+
var zt = M({
|
|
1877
1877
|
name: "detail-field",
|
|
1878
1878
|
options: { reading: "string" },
|
|
1879
1879
|
state: Rt,
|
|
@@ -1881,10 +1881,10 @@ var zt = se({
|
|
|
1881
1881
|
api: () => ({}),
|
|
1882
1882
|
agent: { actions: [] },
|
|
1883
1883
|
slots: (e) => ({ root: e({}) })
|
|
1884
|
-
}), Bt =
|
|
1884
|
+
}), Bt = _(zt, { root: "dd" }).Root;
|
|
1885
1885
|
function Vt({ master: e, detail: n, label: r, masterLabel: i, revealKey: a, returnFocusRef: o, ...s }) {
|
|
1886
|
-
let c =
|
|
1887
|
-
|
|
1886
|
+
let c = T(), l = O(null), u = O(null), d = O(null);
|
|
1887
|
+
E(() => {
|
|
1888
1888
|
a !== void 0 && l.current !== null && d.current !== null && l.current.clientWidth <= It && (d.current.focus({ preventScroll: !0 }), d.current.scrollIntoView({
|
|
1889
1889
|
block: "start",
|
|
1890
1890
|
behavior: "instant"
|
|
@@ -1897,12 +1897,12 @@ function Vt({ master: e, detail: n, label: r, masterLabel: i, revealKey: a, retu
|
|
|
1897
1897
|
behavior: "instant"
|
|
1898
1898
|
});
|
|
1899
1899
|
}
|
|
1900
|
-
return /* @__PURE__ */
|
|
1901
|
-
...
|
|
1902
|
-
children: /* @__PURE__ */
|
|
1900
|
+
return /* @__PURE__ */ P("div", {
|
|
1901
|
+
...v({ className: "x9vvk8s x12h1iku xeuugli xbixft x1hz01jw xtqrqnz x1778rvt" }, s),
|
|
1902
|
+
children: /* @__PURE__ */ F("div", {
|
|
1903
1903
|
ref: l,
|
|
1904
1904
|
className: "xrvj5dj x4ruv2j x1y7acmc x7a106z x1j825kq xeuugli",
|
|
1905
|
-
children: [/* @__PURE__ */
|
|
1905
|
+
children: [/* @__PURE__ */ P("div", {
|
|
1906
1906
|
ref: u,
|
|
1907
1907
|
role: "group",
|
|
1908
1908
|
"aria-label": i,
|
|
@@ -1910,20 +1910,20 @@ function Vt({ master: e, detail: n, label: r, masterLabel: i, revealKey: a, retu
|
|
|
1910
1910
|
tabIndex: -1,
|
|
1911
1911
|
className: "xeuugli",
|
|
1912
1912
|
children: e
|
|
1913
|
-
}), /* @__PURE__ */
|
|
1913
|
+
}), /* @__PURE__ */ F("aside", {
|
|
1914
1914
|
ref: d,
|
|
1915
1915
|
id: c,
|
|
1916
1916
|
"aria-label": r,
|
|
1917
1917
|
tabIndex: -1,
|
|
1918
1918
|
className: "x7wzq59 x7cfggw xqfmuo8 xeuugli x1sbza1b xhuqrux xexx8yu xdz7uhd xpilrb4 xdctr63 x1t7ytsu x97x49r x972fbf x1mg79u0 x13fuv20 xhjagg4 x14ijc3v x13qnu6 x9v5kkp x19rmrnh x12ijfkc",
|
|
1919
|
-
children: [/* @__PURE__ */
|
|
1919
|
+
children: [/* @__PURE__ */ P("div", {
|
|
1920
1920
|
className: "x1s85apg x1yamub6 x1xxlxpq",
|
|
1921
|
-
children: /* @__PURE__ */
|
|
1921
|
+
children: /* @__PURE__ */ F(t, {
|
|
1922
1922
|
variant: "ghost",
|
|
1923
1923
|
onClick: f,
|
|
1924
1924
|
children: ["Back to ", i.toLowerCase()]
|
|
1925
1925
|
})
|
|
1926
|
-
}), /* @__PURE__ */
|
|
1926
|
+
}), /* @__PURE__ */ P(Lt.Provider, {
|
|
1927
1927
|
value: r,
|
|
1928
1928
|
children: n
|
|
1929
1929
|
})]
|
|
@@ -1933,26 +1933,26 @@ function Vt({ master: e, detail: n, label: r, masterLabel: i, revealKey: a, retu
|
|
|
1933
1933
|
}
|
|
1934
1934
|
function Ht({ value: e, label: t }) {
|
|
1935
1935
|
let n = typeof e == "number" ? String(e) : e;
|
|
1936
|
-
return typeof n == "string" ? /* @__PURE__ */
|
|
1936
|
+
return typeof n == "string" ? /* @__PURE__ */ P(Bt, {
|
|
1937
1937
|
"aria-label": t,
|
|
1938
1938
|
reading: n,
|
|
1939
1939
|
className: "xeuugli x1ghz6dp xbixft xj0a0fe xss6m8b",
|
|
1940
1940
|
children: n
|
|
1941
|
-
}) : /* @__PURE__ */
|
|
1941
|
+
}) : /* @__PURE__ */ P("dd", {
|
|
1942
1942
|
className: "xeuugli x1ghz6dp xbixft xj0a0fe xss6m8b",
|
|
1943
1943
|
children: e
|
|
1944
1944
|
});
|
|
1945
1945
|
}
|
|
1946
1946
|
function Ut({ items: e, ...t }) {
|
|
1947
|
-
let n =
|
|
1948
|
-
return /* @__PURE__ */
|
|
1949
|
-
...
|
|
1950
|
-
children: e.map(({ label: e, value: t }) => /* @__PURE__ */
|
|
1947
|
+
let n = C(Lt), r = t["aria-label"] ?? n;
|
|
1948
|
+
return /* @__PURE__ */ P("dl", {
|
|
1949
|
+
...v({ className: "x1ghz6dp xrvj5dj xezdspq x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
|
|
1950
|
+
children: e.map(({ label: e, value: t }) => /* @__PURE__ */ F("div", {
|
|
1951
1951
|
className: "xjp7ctv",
|
|
1952
|
-
children: [/* @__PURE__ */
|
|
1952
|
+
children: [/* @__PURE__ */ P("dt", {
|
|
1953
1953
|
className: "xeuugli x153jb6y xj0a0fe",
|
|
1954
1954
|
children: e
|
|
1955
|
-
}), /* @__PURE__ */
|
|
1955
|
+
}), /* @__PURE__ */ P(Ht, {
|
|
1956
1956
|
value: t,
|
|
1957
1957
|
label: r === void 0 ? e : `${r} · ${e}`
|
|
1958
1958
|
})]
|
|
@@ -1961,12 +1961,12 @@ function Ut({ items: e, ...t }) {
|
|
|
1961
1961
|
}
|
|
1962
1962
|
// packages/collections/src/list-footer.tsx
|
|
1963
1963
|
function Wt({ children: e, actions: t, ...n }) {
|
|
1964
|
-
return /* @__PURE__ */
|
|
1965
|
-
...
|
|
1966
|
-
children: [/* @__PURE__ */
|
|
1964
|
+
return /* @__PURE__ */ F("div", {
|
|
1965
|
+
...v({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak xeuugli x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
|
|
1966
|
+
children: [/* @__PURE__ */ P("div", {
|
|
1967
1967
|
className: "xeuugli xj0a0fe",
|
|
1968
1968
|
children: e
|
|
1969
|
-
}), t != null && /* @__PURE__ */
|
|
1969
|
+
}), t != null && /* @__PURE__ */ P("div", {
|
|
1970
1970
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli",
|
|
1971
1971
|
children: t
|
|
1972
1972
|
})]
|
|
@@ -2117,36 +2117,36 @@ var $ = {
|
|
|
2117
2117
|
columns: $.columns
|
|
2118
2118
|
};
|
|
2119
2119
|
function qt({ layout: e = "inline", ...t }) {
|
|
2120
|
-
return /* @__PURE__ */
|
|
2120
|
+
return /* @__PURE__ */ P("dl", { ...v(h.props(Kt[e]), t) });
|
|
2121
2121
|
}
|
|
2122
2122
|
function Jt({ label: e, value: t, detail: n, change: r, target: i, isLoading: a = !1, hasDetail: o = !1, variant: s = "inline", trend: c, ...l }) {
|
|
2123
|
-
let u = Gt[s], f = r?.tone === "positive" ? $.changePositive : r?.tone === "negative" ? $.changeNegative : void 0;
|
|
2124
|
-
return /* @__PURE__ */
|
|
2125
|
-
...
|
|
2123
|
+
let u = Gt[s], f = a && o || n !== void 0, p = r?.tone === "positive" ? $.changePositive : r?.tone === "negative" ? $.changeNegative : void 0;
|
|
2124
|
+
return /* @__PURE__ */ F("div", {
|
|
2125
|
+
...v(h.props($.metric, u.metric), l),
|
|
2126
2126
|
children: [
|
|
2127
|
-
/* @__PURE__ */
|
|
2128
|
-
...
|
|
2127
|
+
/* @__PURE__ */ P("dt", {
|
|
2128
|
+
...h.props($.label, u.label),
|
|
2129
2129
|
children: e
|
|
2130
2130
|
}),
|
|
2131
|
-
/* @__PURE__ */
|
|
2132
|
-
...
|
|
2133
|
-
children: /* @__PURE__ */
|
|
2131
|
+
/* @__PURE__ */ P("dd", {
|
|
2132
|
+
...h.props($.value, u.value),
|
|
2133
|
+
children: /* @__PURE__ */ F("span", {
|
|
2134
2134
|
className: "x78zum5 x1pha0wt x1a02dak x1hnptsi xeuugli",
|
|
2135
|
-
children: [/* @__PURE__ */
|
|
2136
|
-
...
|
|
2135
|
+
children: [/* @__PURE__ */ P("span", { children: a ? /* @__PURE__ */ P(d, { width: u.valueWidth }) : t ?? "—" }), !a && r !== void 0 && /* @__PURE__ */ P("span", {
|
|
2136
|
+
...h.props($.change, p),
|
|
2137
2137
|
children: r.value
|
|
2138
2138
|
})]
|
|
2139
2139
|
})
|
|
2140
2140
|
}),
|
|
2141
|
-
|
|
2142
|
-
...
|
|
2143
|
-
children: a ? /* @__PURE__ */
|
|
2141
|
+
f && /* @__PURE__ */ P("dd", {
|
|
2142
|
+
...h.props($.detail, u.detail),
|
|
2143
|
+
children: a ? /* @__PURE__ */ P(d, { width: "24ch" }) : n
|
|
2144
2144
|
}),
|
|
2145
|
-
!a && i !== void 0 && /* @__PURE__ */
|
|
2145
|
+
!a && i !== void 0 && /* @__PURE__ */ P("dd", {
|
|
2146
2146
|
className: "x1ghz6dp xeuugli xy8obcc xas2l8k x153jb6y xss6m8b",
|
|
2147
2147
|
children: i
|
|
2148
2148
|
}),
|
|
2149
|
-
c !== void 0 && /* @__PURE__ */
|
|
2149
|
+
c !== void 0 && /* @__PURE__ */ P("dd", {
|
|
2150
2150
|
className: "x1ghz6dp xeuugli xh8yej3 xkh2ocl",
|
|
2151
2151
|
children: c
|
|
2152
2152
|
})
|
|
@@ -2155,66 +2155,66 @@ function Jt({ label: e, value: t, detail: n, change: r, target: i, isLoading: a
|
|
|
2155
2155
|
}
|
|
2156
2156
|
// packages/collections/src/timestamp.tsx
|
|
2157
2157
|
function Yt({ dateTime: e, label: t, title: n }) {
|
|
2158
|
-
return n === void 0 ? /* @__PURE__ */
|
|
2158
|
+
return n === void 0 ? /* @__PURE__ */ P("time", {
|
|
2159
2159
|
dateTime: e,
|
|
2160
2160
|
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
2161
2161
|
children: t
|
|
2162
|
-
}) : /* @__PURE__ */
|
|
2163
|
-
render: /* @__PURE__ */
|
|
2162
|
+
}) : /* @__PURE__ */ F(u.Root, { children: [/* @__PURE__ */ P(u.Trigger, {
|
|
2163
|
+
render: /* @__PURE__ */ P("time", {
|
|
2164
2164
|
dateTime: e,
|
|
2165
2165
|
tabIndex: 0,
|
|
2166
2166
|
"aria-label": n,
|
|
2167
2167
|
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk"
|
|
2168
2168
|
}),
|
|
2169
2169
|
children: t
|
|
2170
|
-
}), /* @__PURE__ */
|
|
2170
|
+
}), /* @__PURE__ */ P(u.Popup, { children: n })] });
|
|
2171
2171
|
}
|
|
2172
2172
|
// packages/collections/src/timeline.tsx
|
|
2173
2173
|
function Xt({ label: e, children: t }) {
|
|
2174
|
-
return /* @__PURE__ */
|
|
2174
|
+
return /* @__PURE__ */ P(Se, {
|
|
2175
2175
|
"aria-label": e,
|
|
2176
|
-
render: /* @__PURE__ */
|
|
2176
|
+
render: /* @__PURE__ */ P("ol", {}),
|
|
2177
2177
|
className: "xe8uvvx x1ghz6dp x1717udv xeuugli",
|
|
2178
2178
|
children: t
|
|
2179
2179
|
});
|
|
2180
2180
|
}
|
|
2181
2181
|
function Zt({ icon: e, title: t, time: n, metadata: r, children: i, details: a, defaultOpen: s = !1 }) {
|
|
2182
|
-
let [c, l] =
|
|
2182
|
+
let [c, l] = k(s), u = /* @__PURE__ */ F("div", {
|
|
2183
2183
|
className: "x78zum5 x1pha0wt x1hnptsi x1a02dak xeuugli",
|
|
2184
|
-
children: [/* @__PURE__ */
|
|
2184
|
+
children: [/* @__PURE__ */ P(Ee, {
|
|
2185
2185
|
className: "xeuugli xk4h15q xj0a0fe",
|
|
2186
|
-
children: a === void 0 ? t : /* @__PURE__ */
|
|
2186
|
+
children: a === void 0 ? t : /* @__PURE__ */ P(o.Trigger, {
|
|
2187
2187
|
className: "x14atkfc x16exltd x17oiadl xt970qd xlqzeqv",
|
|
2188
2188
|
children: t
|
|
2189
2189
|
})
|
|
2190
|
-
}), n != null && /* @__PURE__ */
|
|
2191
|
-
render: /* @__PURE__ */
|
|
2190
|
+
}), n != null && /* @__PURE__ */ P(V, {
|
|
2191
|
+
render: /* @__PURE__ */ P("div", {}),
|
|
2192
2192
|
className: "xeuugli x153jb6y xy8obcc xas2l8k xss6m8b xj0a0fe",
|
|
2193
2193
|
children: n
|
|
2194
2194
|
})]
|
|
2195
|
-
}), d = /* @__PURE__ */
|
|
2195
|
+
}), d = /* @__PURE__ */ F(ce, { children: [
|
|
2196
2196
|
u,
|
|
2197
|
-
i != null && (!c || a === void 0) && /* @__PURE__ */
|
|
2197
|
+
i != null && (!c || a === void 0) && /* @__PURE__ */ P(Ce, {
|
|
2198
2198
|
className: "xeuugli x1ewvobj xj0a0fe",
|
|
2199
2199
|
children: i
|
|
2200
2200
|
}),
|
|
2201
|
-
r != null && /* @__PURE__ */
|
|
2201
|
+
r != null && /* @__PURE__ */ P("div", {
|
|
2202
2202
|
className: "xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
2203
2203
|
children: r
|
|
2204
2204
|
}),
|
|
2205
|
-
a !== void 0 && /* @__PURE__ */
|
|
2205
|
+
a !== void 0 && /* @__PURE__ */ P(o.Panel, { children: a })
|
|
2206
2206
|
] });
|
|
2207
|
-
return /* @__PURE__ */
|
|
2208
|
-
render: /* @__PURE__ */
|
|
2207
|
+
return /* @__PURE__ */ F(we, {
|
|
2208
|
+
render: /* @__PURE__ */ P("li", {}),
|
|
2209
2209
|
className: "x1n2onr6 xrvj5dj x1eqwfih x1y1mm1b xhlx3wy xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt xbixft x1cpjm7i x1hmns74 x1lk18uv x1gi6gvw x1jw5pjq x1vgi0k x1mi36wk x1wse844 xup0pd7 x1t137rt x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
2210
|
-
children: [/* @__PURE__ */
|
|
2211
|
-
render: /* @__PURE__ */
|
|
2210
|
+
children: [/* @__PURE__ */ P(Te, {
|
|
2211
|
+
render: /* @__PURE__ */ P("span", {}),
|
|
2212
2212
|
className: "x78zum5 x6s0dn4 xl56j7k x1b1e0sl x153jb6y",
|
|
2213
2213
|
children: e
|
|
2214
|
-
}), a === void 0 ? /* @__PURE__ */
|
|
2214
|
+
}), a === void 0 ? /* @__PURE__ */ P("div", {
|
|
2215
2215
|
className: "xrvj5dj x1hnptsi xeuugli",
|
|
2216
2216
|
children: d
|
|
2217
|
-
}) : /* @__PURE__ */
|
|
2217
|
+
}) : /* @__PURE__ */ P(o.Root, {
|
|
2218
2218
|
open: c,
|
|
2219
2219
|
onOpenChange: l,
|
|
2220
2220
|
className: "xrvj5dj x1hnptsi xeuugli xh8yej3",
|