@pstdio/ui 0.44.0-nightly.20261018030230 → 0.44.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/dist/{MermaidComponent-DIHl8p85.js → MermaidComponent-DhNTaUMt.js} +2 -2
- package/dist/{MermaidComponent-DIHl8p85.js.map → MermaidComponent-DhNTaUMt.js.map} +1 -1
- package/dist/apply-theme-preference-B0vCu8zY.d.ts +26 -0
- package/dist/chat-ui.d.ts +50 -50
- package/dist/chat-ui.js +143 -141
- package/dist/chat-ui.js.map +1 -1
- package/dist/{collection-view-fields-Sa5HO5P7.d.ts → collection-view-fields-tMtZmuhS.d.ts} +0 -2
- package/dist/{collection-view-grouping-aKZhxYfX.js → collection-view-grouping-BKIr4QAb.js} +2 -2
- package/dist/{collection-view-grouping-aKZhxYfX.js.map → collection-view-grouping-BKIr4QAb.js.map} +1 -1
- package/dist/{collection-view-search-mHPkdyxT.js → collection-view-search-D7HFymZW.js} +160 -166
- package/dist/collection-view-search-D7HFymZW.js.map +1 -0
- package/dist/collection-view.d.ts +3 -90
- package/dist/collection-view.js +1 -1
- package/dist/data-table.d.ts +3 -2
- package/dist/data-table.js +98 -88
- package/dist/data-table.js.map +1 -1
- package/dist/{diff-drawer-BMl0zobj.js → diff-drawer-ByJsQg8F.js} +10 -10
- package/dist/diff-drawer-ByJsQg8F.js.map +1 -0
- package/dist/{diff-viewer-C5KXwq7E.js → diff-viewer-Cpiw-1ut.js} +4 -4
- package/dist/{diff-viewer-C5KXwq7E.js.map → diff-viewer-Cpiw-1ut.js.map} +1 -1
- package/dist/diff.js +2 -2
- package/dist/{display-sort-control-0_gG-W9g.js → display-sort-control-BuqijDAl.js} +3 -3
- package/dist/{display-sort-control-0_gG-W9g.js.map → display-sort-control-BuqijDAl.js.map} +1 -1
- package/dist/{edit-mode-data-table-BI_UDPfF.js → edit-mode-data-table-BwNTRik5.js} +147 -136
- package/dist/edit-mode-data-table-BwNTRik5.js.map +1 -0
- package/dist/host-storage-28AkEy1N.js +98 -0
- package/dist/host-storage-28AkEy1N.js.map +1 -0
- package/dist/index-3H4B61XK.d.ts +38 -0
- package/dist/{index-BTABZd25.d.ts → index-DTjRTEez.d.ts} +2 -2
- package/dist/index-kYQwGcym.d.ts +91 -0
- package/dist/index.d.ts +114 -101
- package/dist/index.js +763 -761
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer.d.ts +2 -2
- package/dist/kanban-renderer.js +509 -494
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/list-row-BDDAVuVd.js +1228 -0
- package/dist/list-row-BDDAVuVd.js.map +1 -0
- package/dist/{markdown-editor-Dx41ftfs.js → markdown-editor-DUBUE7M-.js} +150 -138
- package/dist/markdown-editor-DUBUE7M-.js.map +1 -0
- package/dist/{param-editor-C4IUuO77.js → param-editor-DK1uCOh3.js} +2 -2
- package/dist/{param-editor-C4IUuO77.js.map → param-editor-DK1uCOh3.js.map} +1 -1
- package/dist/{param-editor-field-uBStVJ48.js → param-editor-field-B5z6200g.js} +278 -282
- package/dist/param-editor-field-B5z6200g.js.map +1 -0
- package/dist/param-editor.js +2 -2
- package/dist/{rich-text-Dlv0q1r_.js → rich-text-2c_ra5gK.js} +3 -3
- package/dist/{rich-text-Dlv0q1r_.js.map → rich-text-2c_ra5gK.js.map} +1 -1
- package/dist/rich-text.js +3 -3
- package/dist/terminal.d.ts +28 -0
- package/dist/terminal.js +59 -32
- package/dist/terminal.js.map +1 -1
- package/dist/{theme-DJE3KvWt.js → theme-Chgjys_o.js} +124 -96
- package/dist/theme-Chgjys_o.js.map +1 -0
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +1 -1
- package/dist/{tree-list-Ces1hpRd.js → tree-list-B8Gtot1M.js} +99 -99
- package/dist/tree-list-B8Gtot1M.js.map +1 -0
- package/dist/{use-virtualizer-CfDHoDer.js → use-virtualizer-CqDYJolY.js} +8 -3
- package/dist/use-virtualizer-CqDYJolY.js.map +1 -0
- package/dist/{workspace-badge-CvQBU6Hs.d.ts → workspace-badge-BMjS8ii4.d.ts} +6 -1
- package/package.json +2 -2
- package/dist/collection-view-search-mHPkdyxT.js.map +0 -1
- package/dist/diff-drawer-BMl0zobj.js.map +0 -1
- package/dist/edit-mode-data-table-BI_UDPfF.js.map +0 -1
- package/dist/host-storage-BIo5azql.js +0 -31
- package/dist/host-storage-BIo5azql.js.map +0 -1
- package/dist/index-Dd6e8lU_.d.ts +0 -61
- package/dist/list-row-F8kBQGB-.js +0 -1232
- package/dist/list-row-F8kBQGB-.js.map +0 -1
- package/dist/markdown-editor-Dx41ftfs.js.map +0 -1
- package/dist/param-editor-field-uBStVJ48.js.map +0 -1
- package/dist/theme-DJE3KvWt.js.map +0 -1
- package/dist/tree-list-Ces1hpRd.js.map +0 -1
- package/dist/use-virtualizer-CfDHoDer.js.map +0 -1
|
@@ -1,1232 +0,0 @@
|
|
|
1
|
-
import { n as e, t } from "./scroll-area-IeoRS73V.js";
|
|
2
|
-
import { Box as n, Checkbox as r, HStack as i, Icon as a, IconButton as o, Input as s, InputGroup as c, Menu as l, Portal as u, Stack as d, Text as f, Tooltip as p, chakra as m, useMenu as h, useRecipe as g } from "@chakra-ui/react";
|
|
3
|
-
import { c as _ } from "react/compiler-runtime";
|
|
4
|
-
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
5
|
-
import * as x from "react";
|
|
6
|
-
import { Fragment as S, forwardRef as C, useEffect as w, useId as T, useRef as E, useState as D } from "react";
|
|
7
|
-
import { Check as O, ChevronDown as k, ChevronRight as A, Search as j } from "lucide-react";
|
|
8
|
-
//#region src/components/overlays/resource-context-menu.tsx
|
|
9
|
-
var M = (e) => {
|
|
10
|
-
let n = _(16), { actions: r, contentBackground: i, contentMinWidth: a, onSelect: o } = e, s;
|
|
11
|
-
n[0] === Symbol.for("react.memo_cache_sentinel") ? (s = {
|
|
12
|
-
overscrollBehavior: "contain",
|
|
13
|
-
tabIndex: -1
|
|
14
|
-
}, n[0] = s) : s = n[0];
|
|
15
|
-
let c;
|
|
16
|
-
if (n[1] !== r || n[2] !== i || n[3] !== a || n[4] !== o) {
|
|
17
|
-
let e;
|
|
18
|
-
n[6] !== i || n[7] !== a || n[8] !== o ? (e = (e) => /* @__PURE__ */ b(S, { children: [e.separatorBefore ? /* @__PURE__ */ y(l.Separator, {}) : null, e.items && !e.isDisabled ? /* @__PURE__ */ b(l.Root, {
|
|
19
|
-
positioning: {
|
|
20
|
-
placement: "right-start",
|
|
21
|
-
gutter: 2
|
|
22
|
-
},
|
|
23
|
-
closeOnSelect: !1,
|
|
24
|
-
children: [/* @__PURE__ */ y(l.TriggerItem, {
|
|
25
|
-
asChild: !0,
|
|
26
|
-
children: /* @__PURE__ */ y(q, {
|
|
27
|
-
asChild: !0,
|
|
28
|
-
variant: "full-width",
|
|
29
|
-
label: e.label,
|
|
30
|
-
icon: e.icon,
|
|
31
|
-
endContent: /* @__PURE__ */ y(A, { size: 14 })
|
|
32
|
-
})
|
|
33
|
-
}), /* @__PURE__ */ y(M, {
|
|
34
|
-
actions: e.items,
|
|
35
|
-
contentMinWidth: a,
|
|
36
|
-
contentBackground: i,
|
|
37
|
-
onSelect: o
|
|
38
|
-
})]
|
|
39
|
-
}) : /* @__PURE__ */ y(l.Item, {
|
|
40
|
-
value: e.key,
|
|
41
|
-
disabled: e.isDisabled,
|
|
42
|
-
closeOnSelect: e.closeOnSelect,
|
|
43
|
-
asChild: !0,
|
|
44
|
-
children: /* @__PURE__ */ y(q, {
|
|
45
|
-
asChild: !0,
|
|
46
|
-
variant: "full-width",
|
|
47
|
-
label: e.label,
|
|
48
|
-
icon: e.icon,
|
|
49
|
-
endContent: e.items ? /* @__PURE__ */ y(A, { size: 14 }) : e.endContent,
|
|
50
|
-
disabled: e.isDisabled,
|
|
51
|
-
onActivate: () => o(e)
|
|
52
|
-
})
|
|
53
|
-
})] }, e.key), n[6] = i, n[7] = a, n[8] = o, n[9] = e) : e = n[9], c = r.map(e), n[1] = r, n[2] = i, n[3] = a, n[4] = o, n[5] = c;
|
|
54
|
-
} else c = n[5];
|
|
55
|
-
let d;
|
|
56
|
-
n[10] === c ? d = n[11] : (d = /* @__PURE__ */ y(t, {
|
|
57
|
-
flex: "1",
|
|
58
|
-
minH: "0",
|
|
59
|
-
viewportProps: s,
|
|
60
|
-
children: c
|
|
61
|
-
}), n[10] = c, n[11] = d);
|
|
62
|
-
let f;
|
|
63
|
-
return n[12] !== i || n[13] !== a || n[14] !== d ? (f = /* @__PURE__ */ y(u, { children: /* @__PURE__ */ y(l.Positioner, { children: /* @__PURE__ */ y(l.Content, {
|
|
64
|
-
minW: a,
|
|
65
|
-
bg: i,
|
|
66
|
-
maxH: "var(--available-height)",
|
|
67
|
-
children: d
|
|
68
|
-
}) }) }), n[12] = i, n[13] = a, n[14] = d, n[15] = f) : f = n[15], f;
|
|
69
|
-
}, N = (e) => {
|
|
70
|
-
let t = _(5), n = E(null), r;
|
|
71
|
-
t[0] === e ? r = t[1] : (r = (t) => {
|
|
72
|
-
t.closeOnSelect ?? e ?? !0 ? n.current = t : t.onClick?.();
|
|
73
|
-
}, t[0] = e, t[1] = r);
|
|
74
|
-
let i;
|
|
75
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
|
|
76
|
-
let e = n.current;
|
|
77
|
-
n.current = null, e?.onClick?.();
|
|
78
|
-
}, t[2] = i) : i = t[2];
|
|
79
|
-
let a;
|
|
80
|
-
return t[3] === r ? a = t[4] : (a = {
|
|
81
|
-
onSelect: r,
|
|
82
|
-
onExitComplete: i
|
|
83
|
-
}, t[3] = r, t[4] = a), a;
|
|
84
|
-
}, P = (e) => {
|
|
85
|
-
let t = _(15), { actions: n, children: r, contentMinWidth: i, contentBackground: a, positioning: o, closeOnSelect: s } = e, c = i === void 0 ? "17.5rem" : i, u = a === void 0 ? "bg" : a, d;
|
|
86
|
-
t[0] === o ? d = t[1] : (d = o === void 0 ? { placement: "bottom-start" } : o, t[0] = o, t[1] = d);
|
|
87
|
-
let f = d, { onSelect: p, onExitComplete: m } = N(s);
|
|
88
|
-
if (n.length === 0) return r;
|
|
89
|
-
let h;
|
|
90
|
-
t[2] === r ? h = t[3] : (h = /* @__PURE__ */ y(l.Trigger, {
|
|
91
|
-
asChild: !0,
|
|
92
|
-
children: r
|
|
93
|
-
}), t[2] = r, t[3] = h);
|
|
94
|
-
let g;
|
|
95
|
-
t[4] !== n || t[5] !== u || t[6] !== c || t[7] !== p ? (g = /* @__PURE__ */ y(M, {
|
|
96
|
-
actions: n,
|
|
97
|
-
contentMinWidth: c,
|
|
98
|
-
contentBackground: u,
|
|
99
|
-
onSelect: p
|
|
100
|
-
}), t[4] = n, t[5] = u, t[6] = c, t[7] = p, t[8] = g) : g = t[8];
|
|
101
|
-
let v;
|
|
102
|
-
return t[9] !== s || t[10] !== m || t[11] !== f || t[12] !== h || t[13] !== g ? (v = /* @__PURE__ */ b(l.Root, {
|
|
103
|
-
positioning: f,
|
|
104
|
-
closeOnSelect: s,
|
|
105
|
-
onExitComplete: m,
|
|
106
|
-
children: [h, g]
|
|
107
|
-
}), t[9] = s, t[10] = m, t[11] = f, t[12] = h, t[13] = g, t[14] = v) : v = t[14], v;
|
|
108
|
-
}, F = (e) => {
|
|
109
|
-
let t = _(40), { actions: n, children: r, contentMinWidth: i, contentBackground: a, positioning: o, closeOnSelect: s, keepMountedWhenEmpty: c } = e, u = i === void 0 ? "17.5rem" : i, d = a === void 0 ? "bg" : a, f;
|
|
110
|
-
t[0] === o ? f = t[1] : (f = o === void 0 ? { placement: "bottom-start" } : o, t[0] = o, t[1] = f);
|
|
111
|
-
let p = f, g = c !== void 0 && c, { onSelect: x, onExitComplete: S } = N(s), C = E(null), w;
|
|
112
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (w = {
|
|
113
|
-
x: 0,
|
|
114
|
-
y: 0,
|
|
115
|
-
width: 0,
|
|
116
|
-
height: 0
|
|
117
|
-
}, t[2] = w) : w = t[2];
|
|
118
|
-
let T = E(w), D;
|
|
119
|
-
t[3] === Symbol.for("react.memo_cache_sentinel") ? (D = () => T.current, t[3] = D) : D = t[3];
|
|
120
|
-
let O;
|
|
121
|
-
t[4] === p ? O = t[5] : (O = {
|
|
122
|
-
...p,
|
|
123
|
-
strategy: "fixed",
|
|
124
|
-
getAnchorRect: D
|
|
125
|
-
}, t[4] = p, t[5] = O);
|
|
126
|
-
let k;
|
|
127
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (k = () => {
|
|
128
|
-
let e = C.current;
|
|
129
|
-
C.current = null, e && requestAnimationFrame(() => e.focus());
|
|
130
|
-
}, t[6] = k) : k = t[6];
|
|
131
|
-
let A;
|
|
132
|
-
t[7] !== s || t[8] !== O ? (A = {
|
|
133
|
-
positioning: O,
|
|
134
|
-
closeOnSelect: s,
|
|
135
|
-
onEscapeKeyDown: k
|
|
136
|
-
}, t[7] = s, t[8] = O, t[9] = A) : A = t[9];
|
|
137
|
-
let j = h(A), P;
|
|
138
|
-
t[10] === j.api ? P = t[11] : (P = j.api.getContextTriggerProps(), t[10] = j.api, t[11] = P);
|
|
139
|
-
let F = P;
|
|
140
|
-
if (n.length === 0 && !g) {
|
|
141
|
-
let e;
|
|
142
|
-
return t[12] === r ? e = t[13] : (e = /* @__PURE__ */ y(v, { children: r }), t[12] = r, t[13] = e), e;
|
|
143
|
-
}
|
|
144
|
-
let I;
|
|
145
|
-
t[14] !== n.length || t[15] !== F ? (I = (e) => {
|
|
146
|
-
n.length !== 0 && e.pointerType !== "mouse" && (C.current = null, e.stopPropagation(), T.current = {
|
|
147
|
-
x: e.clientX,
|
|
148
|
-
y: e.clientY,
|
|
149
|
-
width: 0,
|
|
150
|
-
height: 0
|
|
151
|
-
}, F.onPointerDown?.(e));
|
|
152
|
-
}, t[14] = n.length, t[15] = F, t[16] = I) : I = t[16];
|
|
153
|
-
let L;
|
|
154
|
-
t[17] === n.length ? L = t[18] : (L = (e) => {
|
|
155
|
-
if (e.defaultPrevented || n.length === 0 || e.key !== "ContextMenu" && !(e.shiftKey && e.key === "F10")) return;
|
|
156
|
-
e.preventDefault(), e.stopPropagation();
|
|
157
|
-
let t = e.currentTarget.getBoundingClientRect();
|
|
158
|
-
e.currentTarget.dispatchEvent(new MouseEvent("contextmenu", {
|
|
159
|
-
bubbles: !0,
|
|
160
|
-
cancelable: !0,
|
|
161
|
-
clientX: t.left,
|
|
162
|
-
clientY: t.bottom
|
|
163
|
-
})), C.current = e.target;
|
|
164
|
-
}, t[17] = n.length, t[18] = L);
|
|
165
|
-
let R;
|
|
166
|
-
t[19] !== n.length || t[20] !== F ? (R = (e) => {
|
|
167
|
-
C.current = null, n.length > 0 && !e.defaultPrevented && (T.current = {
|
|
168
|
-
x: e.clientX,
|
|
169
|
-
y: e.clientY,
|
|
170
|
-
width: 0,
|
|
171
|
-
height: 0
|
|
172
|
-
}, e.stopPropagation(), F.onContextMenu?.(e));
|
|
173
|
-
}, t[19] = n.length, t[20] = F, t[21] = R) : R = t[21];
|
|
174
|
-
let z;
|
|
175
|
-
t[22] !== r || t[23] !== I || t[24] !== L || t[25] !== R || t[26] !== F ? (z = /* @__PURE__ */ y(m.div, {
|
|
176
|
-
asChild: !0,
|
|
177
|
-
...F,
|
|
178
|
-
onPointerDown: I,
|
|
179
|
-
onKeyDown: L,
|
|
180
|
-
onContextMenu: R,
|
|
181
|
-
children: r
|
|
182
|
-
}), t[22] = r, t[23] = I, t[24] = L, t[25] = R, t[26] = F, t[27] = z) : z = t[27];
|
|
183
|
-
let B;
|
|
184
|
-
t[28] !== n || t[29] !== d || t[30] !== u || t[31] !== x ? (B = n.length > 0 ? /* @__PURE__ */ y(M, {
|
|
185
|
-
actions: n,
|
|
186
|
-
contentMinWidth: u,
|
|
187
|
-
contentBackground: d,
|
|
188
|
-
onSelect: x
|
|
189
|
-
}) : null, t[28] = n, t[29] = d, t[30] = u, t[31] = x, t[32] = B) : B = t[32];
|
|
190
|
-
let V;
|
|
191
|
-
t[33] !== j || t[34] !== S || t[35] !== B ? (V = /* @__PURE__ */ y(l.RootProvider, {
|
|
192
|
-
value: j,
|
|
193
|
-
lazyMount: !0,
|
|
194
|
-
unmountOnExit: !0,
|
|
195
|
-
onExitComplete: S,
|
|
196
|
-
children: B
|
|
197
|
-
}), t[33] = j, t[34] = S, t[35] = B, t[36] = V) : V = t[36];
|
|
198
|
-
let ee;
|
|
199
|
-
return t[37] !== z || t[38] !== V ? (ee = /* @__PURE__ */ b(v, { children: [z, V] }), t[37] = z, t[38] = V, t[39] = ee) : ee = t[39], ee;
|
|
200
|
-
}, I = (e) => {
|
|
201
|
-
let t = _(4), { item: r } = e;
|
|
202
|
-
if (!r.icon) return null;
|
|
203
|
-
let i;
|
|
204
|
-
t[0] === r.icon ? i = t[1] : (i = typeof r.icon == "function" ? /* @__PURE__ */ y(a, {
|
|
205
|
-
as: r.icon,
|
|
206
|
-
boxSize: "14px"
|
|
207
|
-
}) : r.icon, t[0] = r.icon, t[1] = i);
|
|
208
|
-
let o;
|
|
209
|
-
return t[2] === i ? o = t[3] : (o = /* @__PURE__ */ y(n, {
|
|
210
|
-
color: "fg.muted",
|
|
211
|
-
flexShrink: 0,
|
|
212
|
-
display: "inline-flex",
|
|
213
|
-
children: i
|
|
214
|
-
}), t[2] = i, t[3] = o), o;
|
|
215
|
-
}, L = (e) => {
|
|
216
|
-
let t = _(23), { children: r, items: a, onOpenChange: o, onSelect: s, open: c, placement: p, triggerId: m } = e, h = p === void 0 ? "right-start" : p, g;
|
|
217
|
-
t[0] === m ? g = t[1] : (g = { trigger: m }, t[0] = m, t[1] = g);
|
|
218
|
-
let v;
|
|
219
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (v = { mainAxis: 4 }, t[2] = v) : v = t[2];
|
|
220
|
-
let x;
|
|
221
|
-
t[3] === h ? x = t[4] : (x = {
|
|
222
|
-
placement: h,
|
|
223
|
-
offset: v
|
|
224
|
-
}, t[3] = h, t[4] = x);
|
|
225
|
-
let C;
|
|
226
|
-
t[5] === o ? C = t[6] : (C = (e) => o(e.open), t[5] = o, t[6] = C);
|
|
227
|
-
let w;
|
|
228
|
-
t[7] === r ? w = t[8] : (w = /* @__PURE__ */ y(l.Trigger, {
|
|
229
|
-
asChild: !0,
|
|
230
|
-
children: r
|
|
231
|
-
}), t[7] = r, t[8] = w);
|
|
232
|
-
let T;
|
|
233
|
-
if (t[9] !== a || t[10] !== s) {
|
|
234
|
-
let e;
|
|
235
|
-
t[12] === s ? e = t[13] : (e = (e) => /* @__PURE__ */ b(S, { children: [e.separatorBefore ? /* @__PURE__ */ y(l.Separator, {}) : null, /* @__PURE__ */ y(l.Item, {
|
|
236
|
-
value: e.id,
|
|
237
|
-
disabled: e.disabled || e.readOnly,
|
|
238
|
-
_disabled: e.readOnly ? {
|
|
239
|
-
opacity: 1,
|
|
240
|
-
cursor: "default"
|
|
241
|
-
} : void 0,
|
|
242
|
-
onClick: () => {
|
|
243
|
-
e.readOnly || s(e);
|
|
244
|
-
},
|
|
245
|
-
children: /* @__PURE__ */ b(i, {
|
|
246
|
-
gap: "2",
|
|
247
|
-
minW: "0",
|
|
248
|
-
w: "full",
|
|
249
|
-
justify: "space-between",
|
|
250
|
-
alignItems: "center",
|
|
251
|
-
children: [/* @__PURE__ */ b(i, {
|
|
252
|
-
gap: "2",
|
|
253
|
-
minW: "0",
|
|
254
|
-
flex: "1",
|
|
255
|
-
alignItems: e.description ? "flex-start" : "center",
|
|
256
|
-
children: [/* @__PURE__ */ y(I, { item: e }), /* @__PURE__ */ b(d, {
|
|
257
|
-
gap: "0",
|
|
258
|
-
minW: "0",
|
|
259
|
-
children: [/* @__PURE__ */ y(f, {
|
|
260
|
-
textStyle: "label/S/regular",
|
|
261
|
-
truncate: !0,
|
|
262
|
-
children: e.label
|
|
263
|
-
}), e.description ? /* @__PURE__ */ y(f, {
|
|
264
|
-
textStyle: "label/XS",
|
|
265
|
-
color: "fg.menu-item.secondary",
|
|
266
|
-
truncate: !0,
|
|
267
|
-
children: e.description
|
|
268
|
-
}) : null]
|
|
269
|
-
})]
|
|
270
|
-
}), e.endContent ? /* @__PURE__ */ y(n, {
|
|
271
|
-
flexShrink: 0,
|
|
272
|
-
children: e.endContent
|
|
273
|
-
}) : null]
|
|
274
|
-
})
|
|
275
|
-
})] }, e.id), t[12] = s, t[13] = e), T = a.map(e), t[9] = a, t[10] = s, t[11] = T;
|
|
276
|
-
} else T = t[11];
|
|
277
|
-
let E;
|
|
278
|
-
t[14] === T ? E = t[15] : (E = /* @__PURE__ */ y(u, { children: /* @__PURE__ */ y(l.Positioner, { children: /* @__PURE__ */ y(l.Content, {
|
|
279
|
-
minW: "200px",
|
|
280
|
-
bg: "bg",
|
|
281
|
-
children: T
|
|
282
|
-
}) }) }), t[14] = T, t[15] = E);
|
|
283
|
-
let D;
|
|
284
|
-
return t[16] !== c || t[17] !== g || t[18] !== x || t[19] !== C || t[20] !== w || t[21] !== E ? (D = /* @__PURE__ */ b(l.Root, {
|
|
285
|
-
ids: g,
|
|
286
|
-
open: c,
|
|
287
|
-
positioning: x,
|
|
288
|
-
onOpenChange: C,
|
|
289
|
-
children: [w, E]
|
|
290
|
-
}), t[16] = c, t[17] = g, t[18] = x, t[19] = C, t[20] = w, t[21] = E, t[22] = D) : D = t[22], D;
|
|
291
|
-
}, R = (e) => e.map((e) => ({
|
|
292
|
-
key: e.id,
|
|
293
|
-
label: e.label,
|
|
294
|
-
icon: typeof e.icon == "function" ? /* @__PURE__ */ y(a, {
|
|
295
|
-
as: e.icon,
|
|
296
|
-
boxSize: "16px"
|
|
297
|
-
}) : e.icon,
|
|
298
|
-
endContent: e.endContent,
|
|
299
|
-
isDisabled: e.disabled,
|
|
300
|
-
separatorBefore: e.separatorBefore,
|
|
301
|
-
onClick: () => e.onAction?.()
|
|
302
|
-
})), z = (e) => {
|
|
303
|
-
let t = _(23), { children: n, item: r, menuOpen: i, onMenuOpenChange: a, onMenuSelect: o } = e, s = T();
|
|
304
|
-
if (r.menuItems && r.menuItems.length > 0) {
|
|
305
|
-
let e;
|
|
306
|
-
return t[0] !== n || t[1] !== r.id || t[2] !== r.menuItems || t[3] !== r.menuPlacement || t[4] !== i || t[5] !== a || t[6] !== o ? (e = /* @__PURE__ */ y(L, {
|
|
307
|
-
triggerId: r.id,
|
|
308
|
-
items: r.menuItems,
|
|
309
|
-
open: i,
|
|
310
|
-
placement: r.menuPlacement,
|
|
311
|
-
onOpenChange: a,
|
|
312
|
-
onSelect: o,
|
|
313
|
-
children: n
|
|
314
|
-
}), t[0] = n, t[1] = r.id, t[2] = r.menuItems, t[3] = r.menuPlacement, t[4] = i, t[5] = a, t[6] = o, t[7] = e) : e = t[7], e;
|
|
315
|
-
}
|
|
316
|
-
let c = n.props.id ?? s, l;
|
|
317
|
-
t[8] !== n || t[9] !== r.tooltip || t[10] !== c ? (l = r.tooltip ? /* @__PURE__ */ y(p.Trigger, {
|
|
318
|
-
asChild: !0,
|
|
319
|
-
id: c,
|
|
320
|
-
children: n
|
|
321
|
-
}) : n, t[8] = n, t[9] = r.tooltip, t[10] = c, t[11] = l) : l = t[11];
|
|
322
|
-
let d = l, f;
|
|
323
|
-
t[12] !== r.contextMenuItems || t[13] !== d ? (f = r.contextMenuItems && r.contextMenuItems.length > 0 ? /* @__PURE__ */ y(F, {
|
|
324
|
-
actions: R(r.contextMenuItems),
|
|
325
|
-
children: d
|
|
326
|
-
}) : d, t[12] = r.contextMenuItems, t[13] = d, t[14] = f) : f = t[14];
|
|
327
|
-
let m = f;
|
|
328
|
-
if (!r.tooltip) return m;
|
|
329
|
-
let h;
|
|
330
|
-
t[15] === c ? h = t[16] : (h = { trigger: c }, t[15] = c, t[16] = h);
|
|
331
|
-
let g;
|
|
332
|
-
t[17] === r.tooltip ? g = t[18] : (g = /* @__PURE__ */ y(u, { children: /* @__PURE__ */ y(p.Positioner, { children: /* @__PURE__ */ y(p.Content, { children: r.tooltip }) }) }), t[17] = r.tooltip, t[18] = g);
|
|
333
|
-
let v;
|
|
334
|
-
return t[19] !== m || t[20] !== h || t[21] !== g ? (v = /* @__PURE__ */ b(p.Root, {
|
|
335
|
-
openDelay: 100,
|
|
336
|
-
closeDelay: 100,
|
|
337
|
-
ids: h,
|
|
338
|
-
children: [m, g]
|
|
339
|
-
}), t[19] = m, t[20] = h, t[21] = g, t[22] = v) : v = t[22], v;
|
|
340
|
-
}, B = {
|
|
341
|
-
main: {
|
|
342
|
-
h: "2.5rem",
|
|
343
|
-
px: "xs"
|
|
344
|
-
},
|
|
345
|
-
narrow: {
|
|
346
|
-
h: "2rem",
|
|
347
|
-
px: "xs"
|
|
348
|
-
},
|
|
349
|
-
input: {
|
|
350
|
-
h: "3rem",
|
|
351
|
-
px: "0"
|
|
352
|
-
}
|
|
353
|
-
}, V = x.forwardRef(function(e, t) {
|
|
354
|
-
let n = _(9), r, a, o;
|
|
355
|
-
n[0] === e ? (r = n[1], a = n[2], o = n[3]) : ({variant: o, children: r, ...a} = e, n[0] = e, n[1] = r, n[2] = a, n[3] = o);
|
|
356
|
-
let s = B[o === void 0 ? "main" : o], c;
|
|
357
|
-
return n[4] !== r || n[5] !== t || n[6] !== a || n[7] !== s ? (c = /* @__PURE__ */ y(i, {
|
|
358
|
-
ref: t,
|
|
359
|
-
as: "header",
|
|
360
|
-
alignItems: "center",
|
|
361
|
-
borderWidth: "0",
|
|
362
|
-
...s,
|
|
363
|
-
...a,
|
|
364
|
-
children: r
|
|
365
|
-
}), n[4] = r, n[5] = t, n[6] = a, n[7] = s, n[8] = c) : c = n[8], c;
|
|
366
|
-
}), ee = (e) => {
|
|
367
|
-
let t = _(8), { inputRef: n, value: r, placeholder: i, onValueChange: a } = e, o;
|
|
368
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ y(j, { size: 14 }), t[0] = o) : o = t[0];
|
|
369
|
-
let l;
|
|
370
|
-
t[1] === a ? l = t[2] : (l = (e) => a(e.target.value), t[1] = a, t[2] = l);
|
|
371
|
-
let u;
|
|
372
|
-
return t[3] !== n || t[4] !== i || t[5] !== l || t[6] !== r ? (u = /* @__PURE__ */ y(V, {
|
|
373
|
-
variant: "input",
|
|
374
|
-
borderBottomWidth: "1px",
|
|
375
|
-
borderColor: "border.subtle",
|
|
376
|
-
flexShrink: 0,
|
|
377
|
-
children: /* @__PURE__ */ y(c, {
|
|
378
|
-
startElement: o,
|
|
379
|
-
width: "full",
|
|
380
|
-
children: /* @__PURE__ */ y(s, {
|
|
381
|
-
ref: n,
|
|
382
|
-
mx: "xs",
|
|
383
|
-
variant: "borderless",
|
|
384
|
-
value: r,
|
|
385
|
-
placeholder: i,
|
|
386
|
-
"aria-label": i,
|
|
387
|
-
autoComplete: "off",
|
|
388
|
-
onChange: l,
|
|
389
|
-
onKeyDown: te
|
|
390
|
-
})
|
|
391
|
-
})
|
|
392
|
-
}), t[3] = n, t[4] = i, t[5] = l, t[6] = r, t[7] = u) : u = t[7], u;
|
|
393
|
-
};
|
|
394
|
-
function te(e) {
|
|
395
|
-
return e.stopPropagation();
|
|
396
|
-
}
|
|
397
|
-
//#endregion
|
|
398
|
-
//#region src/components/primitives/checkbox.tsx
|
|
399
|
-
var ne = x.forwardRef(function(e, t) {
|
|
400
|
-
let n = _(33), i, a, o, s, c, l, u;
|
|
401
|
-
n[0] === e ? (i = n[1], a = n[2], o = n[3], s = n[4], c = n[5], l = n[6], u = n[7]) : ({icon: a, children: i, inputProps: o, rootRef: c, disabled: l, readOnly: u, ...s} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o, n[4] = s, n[5] = c, n[6] = l, n[7] = u);
|
|
402
|
-
let d = l !== void 0 && l, f = u !== void 0 && u, p = d ? "not-allowed" : f ? "default" : "pointer", m;
|
|
403
|
-
n[8] !== o || n[9] !== t ? (m = /* @__PURE__ */ y(r.HiddenInput, {
|
|
404
|
-
ref: t,
|
|
405
|
-
...o
|
|
406
|
-
}), n[8] = o, n[9] = t, n[10] = m) : m = n[10];
|
|
407
|
-
let h, g, v;
|
|
408
|
-
n[11] === Symbol.for("react.memo_cache_sentinel") ? (h = { borderColor: "border.accent-light" }, g = { borderColor: "border.accent-light" }, v = {
|
|
409
|
-
borderColor: "border.accent-light",
|
|
410
|
-
outline: "none",
|
|
411
|
-
boxShadow: "none"
|
|
412
|
-
}, n[11] = h, n[12] = g, n[13] = v) : (h = n[11], g = n[12], v = n[13]);
|
|
413
|
-
let x;
|
|
414
|
-
n[14] === Symbol.for("react.memo_cache_sentinel") ? (x = {
|
|
415
|
-
bg: "bg.button.primary.default",
|
|
416
|
-
borderColor: "bg.button.primary.default",
|
|
417
|
-
color: "fg.button.primary.default",
|
|
418
|
-
_hover: { borderColor: "bg.button.primary.default" },
|
|
419
|
-
_active: { borderColor: "bg.button.primary.default" }
|
|
420
|
-
}, n[14] = x) : x = n[14];
|
|
421
|
-
let S;
|
|
422
|
-
n[15] === Symbol.for("react.memo_cache_sentinel") ? (S = {
|
|
423
|
-
bg: "bg.button.primary.default",
|
|
424
|
-
borderColor: "bg.button.primary.default",
|
|
425
|
-
color: "fg.button.primary.default",
|
|
426
|
-
_hover: { borderColor: "bg.button.primary.default" },
|
|
427
|
-
_active: { borderColor: "bg.button.primary.default" }
|
|
428
|
-
}, n[15] = S) : S = n[15];
|
|
429
|
-
let C;
|
|
430
|
-
n[16] === a ? C = n[17] : (C = a ? /* @__PURE__ */ y(r.Indicator, { children: a }) : /* @__PURE__ */ y(r.Indicator, {}), n[16] = a, n[17] = C);
|
|
431
|
-
let w;
|
|
432
|
-
n[18] !== p || n[19] !== C ? (w = /* @__PURE__ */ y(r.Control, {
|
|
433
|
-
bg: "bg",
|
|
434
|
-
borderColor: "border",
|
|
435
|
-
color: "fg.button.primary.default",
|
|
436
|
-
cursor: p,
|
|
437
|
-
transition: "border-color 0.2s ease-in-out",
|
|
438
|
-
boxShadow: "none",
|
|
439
|
-
_hover: h,
|
|
440
|
-
_active: g,
|
|
441
|
-
_focusVisible: v,
|
|
442
|
-
_checked: x,
|
|
443
|
-
_indeterminate: S,
|
|
444
|
-
children: C
|
|
445
|
-
}), n[18] = p, n[19] = C, n[20] = w) : w = n[20];
|
|
446
|
-
let T;
|
|
447
|
-
n[21] !== i || n[22] !== p ? (T = i != null && /* @__PURE__ */ y(r.Label, {
|
|
448
|
-
cursor: p,
|
|
449
|
-
children: i
|
|
450
|
-
}), n[21] = i, n[22] = p, n[23] = T) : T = n[23];
|
|
451
|
-
let E;
|
|
452
|
-
return n[24] !== d || n[25] !== p || n[26] !== f || n[27] !== s || n[28] !== c || n[29] !== T || n[30] !== m || n[31] !== w ? (E = /* @__PURE__ */ b(r.Root, {
|
|
453
|
-
ref: c,
|
|
454
|
-
disabled: d,
|
|
455
|
-
readOnly: f,
|
|
456
|
-
cursor: p,
|
|
457
|
-
...s,
|
|
458
|
-
children: [
|
|
459
|
-
m,
|
|
460
|
-
w,
|
|
461
|
-
T
|
|
462
|
-
]
|
|
463
|
-
}), n[24] = d, n[25] = p, n[26] = f, n[27] = s, n[28] = c, n[29] = T, n[30] = m, n[31] = w, n[32] = E) : E = n[32], E;
|
|
464
|
-
}), re = (e) => {
|
|
465
|
-
let t = _(41), { item: r, multiple: o } = e, s = r.variant === "compact" ? "3" : "3.5", c;
|
|
466
|
-
t[0] !== r.isSelected || t[1] !== r.secondaryLabel || t[2] !== r.variant || t[3] !== o ? (c = o ? /* @__PURE__ */ b(i, {
|
|
467
|
-
gap: "xs",
|
|
468
|
-
children: [r.secondaryLabel, /* @__PURE__ */ y(ne, {
|
|
469
|
-
checked: !!r.isSelected,
|
|
470
|
-
readOnly: !0,
|
|
471
|
-
pointerEvents: "none",
|
|
472
|
-
size: r.variant === "compact" ? "xs" : "sm",
|
|
473
|
-
inputProps: {
|
|
474
|
-
tabIndex: -1,
|
|
475
|
-
"aria-hidden": !0
|
|
476
|
-
}
|
|
477
|
-
})]
|
|
478
|
-
}) : void 0, t[0] = r.isSelected, t[1] = r.secondaryLabel, t[2] = r.variant, t[3] = o, t[4] = c) : c = t[4];
|
|
479
|
-
let u = c;
|
|
480
|
-
if (!o && r.isSelected) {
|
|
481
|
-
let e;
|
|
482
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ y(a, {
|
|
483
|
-
as: O,
|
|
484
|
-
boxSize: "3.5"
|
|
485
|
-
}), t[5] = e) : e = t[5], u = e;
|
|
486
|
-
}
|
|
487
|
-
let d, p, m;
|
|
488
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (d = { bg: "transparent" }, p = { bg: "transparent" }, m = { bg: "transparent" }, t[6] = d, t[7] = p, t[8] = m) : (d = t[6], p = t[7], m = t[8]);
|
|
489
|
-
let h = r.variant ?? "full-width", g = o ? void 0 : r.secondaryLabel, v = !o && r.isSelected, x;
|
|
490
|
-
t[9] !== s || t[10] !== r.icon || t[11] !== r.iconColor || t[12] !== r.label || t[13] !== o ? (x = o ? /* @__PURE__ */ b(i, {
|
|
491
|
-
minW: "0",
|
|
492
|
-
gap: "xs",
|
|
493
|
-
children: [r.icon ? /* @__PURE__ */ y(a, {
|
|
494
|
-
as: r.icon,
|
|
495
|
-
boxSize: s,
|
|
496
|
-
color: r.iconColor ?? "fg.muted"
|
|
497
|
-
}) : null, /* @__PURE__ */ y(f, {
|
|
498
|
-
textStyle: "label/S/regular",
|
|
499
|
-
truncate: !0,
|
|
500
|
-
children: r.label
|
|
501
|
-
})]
|
|
502
|
-
}) : r.label, t[9] = s, t[10] = r.icon, t[11] = r.iconColor, t[12] = r.label, t[13] = o, t[14] = x) : x = t[14];
|
|
503
|
-
let S;
|
|
504
|
-
t[15] !== s || t[16] !== r.icon || t[17] !== r.iconColor || t[18] !== o ? (S = !o && r.icon ? /* @__PURE__ */ y(a, {
|
|
505
|
-
as: r.icon,
|
|
506
|
-
boxSize: s,
|
|
507
|
-
color: r.iconColor ?? "fg.muted"
|
|
508
|
-
}) : void 0, t[15] = s, t[16] = r.icon, t[17] = r.iconColor, t[18] = o, t[19] = S) : S = t[19];
|
|
509
|
-
let C;
|
|
510
|
-
t[20] !== u || t[21] !== r.id || t[22] !== r.isDisabled || t[23] !== r.tooltipLabel || t[24] !== h || t[25] !== g || t[26] !== v || t[27] !== x || t[28] !== S ? (C = /* @__PURE__ */ y(n, {
|
|
511
|
-
bg: "transparent",
|
|
512
|
-
h: "auto",
|
|
513
|
-
p: "0",
|
|
514
|
-
_hover: d,
|
|
515
|
-
_focus: p,
|
|
516
|
-
_active: m,
|
|
517
|
-
children: /* @__PURE__ */ y(q, {
|
|
518
|
-
asChild: !0,
|
|
519
|
-
id: r.id,
|
|
520
|
-
role: "presentation",
|
|
521
|
-
variant: h,
|
|
522
|
-
disabled: r.isDisabled,
|
|
523
|
-
tooltip: r.tooltipLabel,
|
|
524
|
-
description: g,
|
|
525
|
-
isSelected: v,
|
|
526
|
-
label: x,
|
|
527
|
-
icon: S,
|
|
528
|
-
endContent: u
|
|
529
|
-
})
|
|
530
|
-
}), t[20] = u, t[21] = r.id, t[22] = r.isDisabled, t[23] = r.tooltipLabel, t[24] = h, t[25] = g, t[26] = v, t[27] = x, t[28] = S, t[29] = C) : C = t[29];
|
|
531
|
-
let w = C;
|
|
532
|
-
if (o) {
|
|
533
|
-
let e = r.id, n = !!r.isSelected, i;
|
|
534
|
-
return t[30] !== w || t[31] !== r.id || t[32] !== r.isDisabled || t[33] !== r.onSelect || t[34] !== n ? (i = /* @__PURE__ */ y(l.CheckboxItem, {
|
|
535
|
-
value: e,
|
|
536
|
-
checked: n,
|
|
537
|
-
disabled: r.isDisabled,
|
|
538
|
-
onCheckedChange: r.onSelect,
|
|
539
|
-
asChild: !0,
|
|
540
|
-
children: w
|
|
541
|
-
}), t[30] = w, t[31] = r.id, t[32] = r.isDisabled, t[33] = r.onSelect, t[34] = n, t[35] = i) : i = t[35], i;
|
|
542
|
-
}
|
|
543
|
-
let T;
|
|
544
|
-
return t[36] !== w || t[37] !== r.id || t[38] !== r.isDisabled || t[39] !== r.onSelect ? (T = /* @__PURE__ */ y(l.Item, {
|
|
545
|
-
value: r.id,
|
|
546
|
-
disabled: r.isDisabled,
|
|
547
|
-
onClick: r.onSelect,
|
|
548
|
-
asChild: !0,
|
|
549
|
-
children: w
|
|
550
|
-
}), t[36] = w, t[37] = r.id, t[38] = r.isDisabled, t[39] = r.onSelect, t[40] = T) : T = t[40], T;
|
|
551
|
-
}, ie = (e, t) => {
|
|
552
|
-
let n = t.trim().toLowerCase();
|
|
553
|
-
return n ? e.filter((e) => [e.label, e.searchText].filter(Boolean).join(" ").toLowerCase().includes(n)) : e;
|
|
554
|
-
}, ae = (e, t) => !e || !t ? !1 : e !== t, oe = (e, t, n) => !e || !t ? n : {
|
|
555
|
-
items: t.items,
|
|
556
|
-
filterItems: t.filterItems ?? n.filterItems,
|
|
557
|
-
showSearch: t.showSearch ?? n.showSearch,
|
|
558
|
-
searchPlaceholder: t.searchPlaceholder ?? n.searchPlaceholder,
|
|
559
|
-
emptyState: t.emptyState ?? n.emptyState,
|
|
560
|
-
contentTestId: t.contentTestId ?? n.contentTestId,
|
|
561
|
-
closeOnSelect: !1,
|
|
562
|
-
listId: "parent"
|
|
563
|
-
}, se = (e) => {
|
|
564
|
-
let n = _(46), { trigger: r, items: i, searchPlaceholder: o, emptyState: s, filterItems: c, listId: d, header: f, width: p, maxListHeight: m, showSearch: h, closeOnSelect: g, lazyMount: v, open: x, positioning: S, onOpenChange: C, onFocusOutside: T, contentTestId: O, portalled: A, parentList: j, multiple: M } = e, N = c === void 0 ? ie : c, P = p === void 0 ? "260px" : p, F = m === void 0 ? "18rem" : m, I = h === void 0 || h, L = g === void 0 || g, R = v !== void 0 && v, z = A === void 0 || A, B = M !== void 0 && M, te = !!j, [ne, se] = D(!1), [ue, de] = D(""), [fe, H] = D("child"), pe = E(null), me = x ?? ne, he = te && fe === "parent", U = oe(he, j, {
|
|
565
|
-
items: i,
|
|
566
|
-
filterItems: N,
|
|
567
|
-
showSearch: I,
|
|
568
|
-
searchPlaceholder: o,
|
|
569
|
-
emptyState: s,
|
|
570
|
-
contentTestId: O,
|
|
571
|
-
closeOnSelect: L,
|
|
572
|
-
listId: te ? "child" : d ?? ""
|
|
573
|
-
}), ge = U.filterItems(U.items, ue), W = E(U.listId);
|
|
574
|
-
w(() => {
|
|
575
|
-
if (!me) {
|
|
576
|
-
W.current = U.listId;
|
|
577
|
-
return;
|
|
578
|
-
}
|
|
579
|
-
ae(W.current, U.listId) && de(""), W.current = U.listId;
|
|
580
|
-
}, [me, U.listId]);
|
|
581
|
-
let _e;
|
|
582
|
-
n[0] !== U.showSearch || n[1] !== me ? (_e = [me, U.showSearch], n[0] = U.showSearch, n[1] = me, n[2] = _e) : _e = n[2], w(() => {
|
|
583
|
-
if (!me || !U.showSearch) return;
|
|
584
|
-
let e = setTimeout(() => pe.current?.focus(), 0);
|
|
585
|
-
return () => clearTimeout(e);
|
|
586
|
-
}, _e);
|
|
587
|
-
let ve;
|
|
588
|
-
n[3] !== te || n[4] !== C || n[5] !== x ? (ve = (e) => {
|
|
589
|
-
x === void 0 && se(e.open), de(""), e.open && te && H("child"), C?.(e);
|
|
590
|
-
}, n[3] = te, n[4] = C, n[5] = x, n[6] = ve) : ve = n[6];
|
|
591
|
-
let G = ve, ye;
|
|
592
|
-
n[7] !== he || n[8] !== j ? (ye = (e) => {
|
|
593
|
-
if (!he || !j) return;
|
|
594
|
-
let t = j.items.find((t) => t.id === e.value);
|
|
595
|
-
t && (j.onSelect?.(t), H("child"));
|
|
596
|
-
}, n[7] = he, n[8] = j, n[9] = ye) : ye = n[9];
|
|
597
|
-
let be = ye, xe;
|
|
598
|
-
n[10] === j ? xe = n[11] : (xe = j ? /* @__PURE__ */ y(V, {
|
|
599
|
-
as: "div",
|
|
600
|
-
role: "menuitem",
|
|
601
|
-
"aria-label": j.ariaLabel,
|
|
602
|
-
"aria-disabled": j.disabled || void 0,
|
|
603
|
-
tabIndex: j.disabled ? -1 : 0,
|
|
604
|
-
variant: "narrow",
|
|
605
|
-
px: "0",
|
|
606
|
-
borderBottomWidth: "1px",
|
|
607
|
-
borderColor: "border.subtle",
|
|
608
|
-
flexShrink: 0,
|
|
609
|
-
onPointerDownCapture: ce,
|
|
610
|
-
onClickCapture: (e) => {
|
|
611
|
-
e.stopPropagation(), !j.disabled && H(le);
|
|
612
|
-
},
|
|
613
|
-
children: /* @__PURE__ */ y(q, {
|
|
614
|
-
asChild: !0,
|
|
615
|
-
role: "presentation",
|
|
616
|
-
variant: "full-width",
|
|
617
|
-
id: "__parent-toggle",
|
|
618
|
-
label: j.selectedLabel,
|
|
619
|
-
icon: j.selectedIcon ? /* @__PURE__ */ y(a, {
|
|
620
|
-
as: j.selectedIcon,
|
|
621
|
-
boxSize: "14px"
|
|
622
|
-
}) : void 0,
|
|
623
|
-
disabled: j.disabled,
|
|
624
|
-
endContent: j.disabled ? void 0 : /* @__PURE__ */ y(a, {
|
|
625
|
-
as: k,
|
|
626
|
-
boxSize: "14px"
|
|
627
|
-
})
|
|
628
|
-
})
|
|
629
|
-
}) : null, n[10] = j, n[11] = xe);
|
|
630
|
-
let Se = j ? xe : f, K = !!Se && !U.showSearch, Ce = U.showSearch ? /* @__PURE__ */ y(ee, {
|
|
631
|
-
inputRef: pe,
|
|
632
|
-
value: ue,
|
|
633
|
-
placeholder: U.searchPlaceholder,
|
|
634
|
-
onValueChange: de
|
|
635
|
-
}) : null, we = l, Te = l, Ee;
|
|
636
|
-
n[12] === K ? Ee = n[13] : (Ee = K ? /* @__PURE__ */ y(l.Separator, { margin: "0" }) : null, n[12] = K, n[13] = Ee);
|
|
637
|
-
let De = t, J;
|
|
638
|
-
n[14] === Symbol.for("react.memo_cache_sentinel") ? (J = { overscrollBehavior: "contain" }, n[14] = J) : J = n[14];
|
|
639
|
-
let Y = ge.length > 0 ? ge.map((e) => /* @__PURE__ */ y(re, {
|
|
640
|
-
item: e,
|
|
641
|
-
multiple: B && !he
|
|
642
|
-
}, e.id)) : U.emptyState, X;
|
|
643
|
-
n[15] !== De || n[16] !== U.contentTestId || n[17] !== F || n[18] !== J || n[19] !== Y ? (X = /* @__PURE__ */ y(De, {
|
|
644
|
-
maxH: F,
|
|
645
|
-
"data-testid": U.contentTestId,
|
|
646
|
-
viewportProps: J,
|
|
647
|
-
p: "0",
|
|
648
|
-
gap: "0",
|
|
649
|
-
children: Y
|
|
650
|
-
}), n[15] = De, n[16] = U.contentTestId, n[17] = F, n[18] = J, n[19] = Y, n[20] = X) : X = n[20];
|
|
651
|
-
let Z;
|
|
652
|
-
n[21] !== Se || n[22] !== Ce || n[23] !== Te.Content || n[24] !== Ee || n[25] !== X || n[26] !== P ? (Z = /* @__PURE__ */ b(Te.Content, {
|
|
653
|
-
w: P,
|
|
654
|
-
bg: "bg",
|
|
655
|
-
gap: "0",
|
|
656
|
-
p: "0",
|
|
657
|
-
children: [
|
|
658
|
-
Se,
|
|
659
|
-
Ce,
|
|
660
|
-
Ee,
|
|
661
|
-
X
|
|
662
|
-
]
|
|
663
|
-
}), n[21] = Se, n[22] = Ce, n[23] = Te.Content, n[24] = Ee, n[25] = X, n[26] = P, n[27] = Z) : Z = n[27];
|
|
664
|
-
let Oe;
|
|
665
|
-
n[28] !== we.Positioner || n[29] !== Z ? (Oe = /* @__PURE__ */ y(we.Positioner, { children: Z }), n[28] = we.Positioner, n[29] = Z, n[30] = Oe) : Oe = n[30];
|
|
666
|
-
let ke = Oe, Ae = te ? be : void 0, je;
|
|
667
|
-
n[31] === r ? je = n[32] : (je = /* @__PURE__ */ y(l.Trigger, {
|
|
668
|
-
asChild: !0,
|
|
669
|
-
children: r
|
|
670
|
-
}), n[31] = r, n[32] = je);
|
|
671
|
-
let Me = !z, Ne;
|
|
672
|
-
n[33] !== ke || n[34] !== Me ? (Ne = /* @__PURE__ */ y(u, {
|
|
673
|
-
disabled: Me,
|
|
674
|
-
children: ke
|
|
675
|
-
}), n[33] = ke, n[34] = Me, n[35] = Ne) : Ne = n[35];
|
|
676
|
-
let Pe;
|
|
677
|
-
return n[36] !== U.closeOnSelect || n[37] !== G || n[38] !== R || n[39] !== T || n[40] !== x || n[41] !== S || n[42] !== Ae || n[43] !== je || n[44] !== Ne ? (Pe = /* @__PURE__ */ b(l.Root, {
|
|
678
|
-
lazyMount: R,
|
|
679
|
-
closeOnSelect: U.closeOnSelect,
|
|
680
|
-
open: x,
|
|
681
|
-
positioning: S,
|
|
682
|
-
onOpenChange: G,
|
|
683
|
-
onFocusOutside: T,
|
|
684
|
-
onSelect: Ae,
|
|
685
|
-
children: [je, Ne]
|
|
686
|
-
}), n[36] = U.closeOnSelect, n[37] = G, n[38] = R, n[39] = T, n[40] = x, n[41] = S, n[42] = Ae, n[43] = je, n[44] = Ne, n[45] = Pe) : Pe = n[45], Pe;
|
|
687
|
-
};
|
|
688
|
-
function ce(e) {
|
|
689
|
-
return e.stopPropagation();
|
|
690
|
-
}
|
|
691
|
-
function le(e) {
|
|
692
|
-
return e === "child" ? "parent" : "child";
|
|
693
|
-
}
|
|
694
|
-
//#endregion
|
|
695
|
-
//#region src/components/list-row/searchable-action-menu.tsx
|
|
696
|
-
var ue = (e) => {
|
|
697
|
-
let t = _(14), { action: n } = e, r;
|
|
698
|
-
t[0] === n.menuItems ? r = t[1] : (r = n.menuItems ?? [], t[0] = n.menuItems, t[1] = r);
|
|
699
|
-
let i;
|
|
700
|
-
t[2] === r ? i = t[3] : (i = r.map(de), t[2] = r, t[3] = i);
|
|
701
|
-
let a = i, s;
|
|
702
|
-
t[4] !== n.icon || t[5] !== n.label ? (s = /* @__PURE__ */ y(o, {
|
|
703
|
-
variant: "ghost",
|
|
704
|
-
size: "2xs",
|
|
705
|
-
"aria-label": n.label,
|
|
706
|
-
children: n.icon
|
|
707
|
-
}), t[4] = n.icon, t[5] = n.label, t[6] = s) : s = t[6];
|
|
708
|
-
let c = n.searchPlaceholder ?? "Search...", u = n.emptyMenuLabel ?? "No results found", d;
|
|
709
|
-
t[7] === u ? d = t[8] : (d = /* @__PURE__ */ y(l.Item, {
|
|
710
|
-
value: "empty",
|
|
711
|
-
asChild: !0,
|
|
712
|
-
children: /* @__PURE__ */ y(q, {
|
|
713
|
-
asChild: !0,
|
|
714
|
-
variant: "full-width",
|
|
715
|
-
label: u,
|
|
716
|
-
disabled: !0
|
|
717
|
-
})
|
|
718
|
-
}), t[7] = u, t[8] = d);
|
|
719
|
-
let f;
|
|
720
|
-
return t[9] !== a || t[10] !== s || t[11] !== c || t[12] !== d ? (f = /* @__PURE__ */ y(se, {
|
|
721
|
-
trigger: s,
|
|
722
|
-
items: a,
|
|
723
|
-
searchPlaceholder: c,
|
|
724
|
-
emptyState: d,
|
|
725
|
-
onFocusOutside: fe
|
|
726
|
-
}), t[9] = a, t[10] = s, t[11] = c, t[12] = d, t[13] = f) : f = t[13], f;
|
|
727
|
-
};
|
|
728
|
-
function de(e) {
|
|
729
|
-
return {
|
|
730
|
-
id: e.id,
|
|
731
|
-
label: e.label,
|
|
732
|
-
searchText: [e.label, e.description].filter(Boolean).join(" "),
|
|
733
|
-
tooltipLabel: e.description,
|
|
734
|
-
variant: "full-width",
|
|
735
|
-
onSelect: () => e.onAction?.()
|
|
736
|
-
};
|
|
737
|
-
}
|
|
738
|
-
function fe(e) {
|
|
739
|
-
return e.preventDefault();
|
|
740
|
-
}
|
|
741
|
-
//#endregion
|
|
742
|
-
//#region src/components/list-row/list-row-actions.tsx
|
|
743
|
-
var H = (t, n) => t.tooltip ? /* @__PURE__ */ y(e, {
|
|
744
|
-
content: t.tooltip,
|
|
745
|
-
openDelay: 300,
|
|
746
|
-
children: n
|
|
747
|
-
}, t.id) : /* @__PURE__ */ y(S, { children: n }, t.id), pe = (e) => {
|
|
748
|
-
let t = _(12), { actions: n, alwaysVisible: r, context: a } = e, s = r !== void 0 && r, c;
|
|
749
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (c = { key: "listRowAccessory" }, t[0] = c) : c = t[0];
|
|
750
|
-
let d = g(c);
|
|
751
|
-
if (n.length === 0) return null;
|
|
752
|
-
let f = s ? "always" : "hover", p;
|
|
753
|
-
t[1] !== d || t[2] !== f ? (p = d({ visibility: f }), t[1] = d, t[2] = f, t[3] = p) : p = t[3];
|
|
754
|
-
let m;
|
|
755
|
-
if (t[4] !== n || t[5] !== a) {
|
|
756
|
-
let e;
|
|
757
|
-
t[7] === a ? e = t[8] : (e = (e) => e.menuItems && e.menuItems.length >= 8 ? /* @__PURE__ */ y(ue, { action: e }, e.id) : e.menuItems && e.menuItems.length > 0 ? H(e, /* @__PURE__ */ b(l.Root, { children: [/* @__PURE__ */ y(l.Trigger, {
|
|
758
|
-
asChild: !0,
|
|
759
|
-
children: /* @__PURE__ */ y(o, {
|
|
760
|
-
variant: "ghost",
|
|
761
|
-
size: "2xs",
|
|
762
|
-
"aria-label": e.label,
|
|
763
|
-
children: e.icon
|
|
764
|
-
})
|
|
765
|
-
}), /* @__PURE__ */ y(u, { children: /* @__PURE__ */ y(l.Positioner, { children: /* @__PURE__ */ y(l.Content, {
|
|
766
|
-
minW: "160px",
|
|
767
|
-
bg: "bg",
|
|
768
|
-
children: e.menuItems.map(he)
|
|
769
|
-
}) }) })] })) : H(e, /* @__PURE__ */ y(o, {
|
|
770
|
-
variant: "ghost",
|
|
771
|
-
size: "2xs",
|
|
772
|
-
"aria-label": e.label,
|
|
773
|
-
onClick: (t) => {
|
|
774
|
-
t.stopPropagation(), e.onAction?.(a);
|
|
775
|
-
},
|
|
776
|
-
children: e.icon
|
|
777
|
-
})), t[7] = a, t[8] = e), m = n.map(e), t[4] = n, t[5] = a, t[6] = m;
|
|
778
|
-
} else m = t[6];
|
|
779
|
-
let h;
|
|
780
|
-
return t[9] !== p || t[10] !== m ? (h = /* @__PURE__ */ y(i, {
|
|
781
|
-
gap: "0",
|
|
782
|
-
css: p,
|
|
783
|
-
onClick: me,
|
|
784
|
-
children: m
|
|
785
|
-
}), t[9] = p, t[10] = m, t[11] = h) : h = t[11], h;
|
|
786
|
-
};
|
|
787
|
-
function me(e) {
|
|
788
|
-
return e.stopPropagation();
|
|
789
|
-
}
|
|
790
|
-
function he(t) {
|
|
791
|
-
return /* @__PURE__ */ b(S, { children: [t.separatorBefore ? /* @__PURE__ */ y(l.Separator, {}) : null, /* @__PURE__ */ y(e, {
|
|
792
|
-
content: t.description,
|
|
793
|
-
disabled: !t.description,
|
|
794
|
-
openDelay: 300,
|
|
795
|
-
children: /* @__PURE__ */ y(l.Item, {
|
|
796
|
-
value: t.id,
|
|
797
|
-
disabled: t.disabled || t.readOnly,
|
|
798
|
-
onClick: () => {
|
|
799
|
-
t.readOnly || t.onAction?.();
|
|
800
|
-
},
|
|
801
|
-
children: /* @__PURE__ */ b(i, {
|
|
802
|
-
gap: "2",
|
|
803
|
-
minW: "0",
|
|
804
|
-
w: "full",
|
|
805
|
-
justify: "space-between",
|
|
806
|
-
children: [/* @__PURE__ */ b(i, {
|
|
807
|
-
gap: "2",
|
|
808
|
-
minW: "0",
|
|
809
|
-
children: [t.icon ? /* @__PURE__ */ y(n, { children: t.icon }) : null, /* @__PURE__ */ y(n, {
|
|
810
|
-
minW: "0",
|
|
811
|
-
children: t.label
|
|
812
|
-
})]
|
|
813
|
-
}), t.endContent ? /* @__PURE__ */ y(n, {
|
|
814
|
-
flexShrink: 0,
|
|
815
|
-
children: t.endContent
|
|
816
|
-
}) : null]
|
|
817
|
-
})
|
|
818
|
-
})
|
|
819
|
-
})] }, t.id);
|
|
820
|
-
}
|
|
821
|
-
//#endregion
|
|
822
|
-
//#region src/components/list-row/list-row-content.tsx
|
|
823
|
-
var U = (e, t = !1) => {
|
|
824
|
-
let n = e.contextMenuItems ?? [];
|
|
825
|
-
if (n.length === 0 || !t) return e.actions ?? [];
|
|
826
|
-
let r = e.actions?.flatMap((t) => t.menuItems?.length ? t.menuItems : [{
|
|
827
|
-
id: t.id,
|
|
828
|
-
label: t.label,
|
|
829
|
-
icon: t.icon,
|
|
830
|
-
onAction: () => t.onAction?.({ nodeId: e.id })
|
|
831
|
-
}]) ?? [], i = new Set(r.map((e) => e.id)), o = n.filter((e) => !i.has(e.id)).map((e, t) => ({
|
|
832
|
-
...e,
|
|
833
|
-
separatorBefore: e.separatorBefore || t === 0 && r.length > 0
|
|
834
|
-
}));
|
|
835
|
-
return [{
|
|
836
|
-
id: "resource-actions",
|
|
837
|
-
label: "Resource actions",
|
|
838
|
-
icon: /* @__PURE__ */ y(a, {
|
|
839
|
-
as: k,
|
|
840
|
-
boxSize: "14px"
|
|
841
|
-
}),
|
|
842
|
-
menuItems: [...r, ...o]
|
|
843
|
-
}];
|
|
844
|
-
}, ge = {
|
|
845
|
-
collection: "compact",
|
|
846
|
-
tree: "1"
|
|
847
|
-
}, W = (e) => e.isEmptyStateVariant ? "fg.menu-item.secondary" : e.isDisabled ? "fg.muted" : e.tone === "danger" ? "red.500" : "fg", _e = (e) => {
|
|
848
|
-
let t = _(7), { label: r, textStyle: i, color: a } = e;
|
|
849
|
-
if (typeof r == "string") {
|
|
850
|
-
let e;
|
|
851
|
-
return t[0] !== a || t[1] !== r || t[2] !== i ? (e = /* @__PURE__ */ y(f, {
|
|
852
|
-
textStyle: i,
|
|
853
|
-
color: a,
|
|
854
|
-
truncate: !0,
|
|
855
|
-
children: r
|
|
856
|
-
}), t[0] = a, t[1] = r, t[2] = i, t[3] = e) : e = t[3], e;
|
|
857
|
-
}
|
|
858
|
-
let o;
|
|
859
|
-
return t[4] !== a || t[5] !== r ? (o = /* @__PURE__ */ y(n, {
|
|
860
|
-
minW: "0",
|
|
861
|
-
maxW: "full",
|
|
862
|
-
overflow: "hidden",
|
|
863
|
-
color: a,
|
|
864
|
-
children: r
|
|
865
|
-
}), t[4] = a, t[5] = r, t[6] = o) : o = t[6], o;
|
|
866
|
-
}, ve = (e) => {
|
|
867
|
-
let t = _(8), { description: r, textStyle: i, color: a, marginLeft: o } = e;
|
|
868
|
-
if (!r) return null;
|
|
869
|
-
if (typeof r == "string") {
|
|
870
|
-
let e;
|
|
871
|
-
return t[0] !== a || t[1] !== r || t[2] !== o || t[3] !== i ? (e = /* @__PURE__ */ y(f, {
|
|
872
|
-
ml: o,
|
|
873
|
-
textStyle: i,
|
|
874
|
-
color: a,
|
|
875
|
-
truncate: !0,
|
|
876
|
-
children: r
|
|
877
|
-
}), t[0] = a, t[1] = r, t[2] = o, t[3] = i, t[4] = e) : e = t[4], e;
|
|
878
|
-
}
|
|
879
|
-
let s;
|
|
880
|
-
return t[5] !== r || t[6] !== o ? (s = /* @__PURE__ */ y(n, {
|
|
881
|
-
ml: o,
|
|
882
|
-
minW: "0",
|
|
883
|
-
maxW: "full",
|
|
884
|
-
overflow: "hidden",
|
|
885
|
-
children: r
|
|
886
|
-
}), t[5] = r, t[6] = o, t[7] = s) : s = t[7], s;
|
|
887
|
-
}, G = (t) => {
|
|
888
|
-
let r = _(36), { item: o, isExpanded: s, showChevron: c, isDisabled: l, variant: u, tone: f, labelId: p } = t, m;
|
|
889
|
-
r[0] === Symbol.for("react.memo_cache_sentinel") ? (m = { key: "treeChevron" }, r[0] = m) : m = r[0];
|
|
890
|
-
let h = g(m), v = u === "empty-state", x = u === "compact" || u === "collection" || u === "full-width" || u === "tree" || v, S = x ? "label/S/regular" : "label/M/regular", C = x ? "label/XS" : "label/S/regular", w = x ? "0" : "2px", T = u === "tree" || u === "collection" ? "16px" : "14px", E = ge[u ?? ""] ?? "2", D;
|
|
891
|
-
r[1] !== l || r[2] !== v || r[3] !== f ? (D = W({
|
|
892
|
-
isEmptyStateVariant: v,
|
|
893
|
-
isDisabled: l,
|
|
894
|
-
tone: f
|
|
895
|
-
}), r[1] = l, r[2] = v, r[3] = f, r[4] = D) : D = r[4];
|
|
896
|
-
let O = D, k = o.iconColor ?? (f === "danger" ? "red.500" : "fg.muted"), j = f === "danger" ? "red.400" : "fg.menu-item.secondary", M;
|
|
897
|
-
r[5] !== h || r[6] !== s || r[7] !== c ? (M = c ? /* @__PURE__ */ y(n, {
|
|
898
|
-
color: "fg.muted",
|
|
899
|
-
flexShrink: 0,
|
|
900
|
-
display: "flex",
|
|
901
|
-
alignItems: "center",
|
|
902
|
-
children: /* @__PURE__ */ y(a, {
|
|
903
|
-
as: A,
|
|
904
|
-
boxSize: "12px",
|
|
905
|
-
css: h(),
|
|
906
|
-
"data-open": s
|
|
907
|
-
})
|
|
908
|
-
}) : null, r[5] = h, r[6] = s, r[7] = c, r[8] = M) : M = r[8];
|
|
909
|
-
let N;
|
|
910
|
-
r[9] !== k || r[10] !== T || r[11] !== o.icon ? (N = o.icon ? /* @__PURE__ */ y(n, {
|
|
911
|
-
color: k,
|
|
912
|
-
flexShrink: 0,
|
|
913
|
-
display: "inline-flex",
|
|
914
|
-
alignItems: "center",
|
|
915
|
-
justifyContent: "center",
|
|
916
|
-
boxSize: T,
|
|
917
|
-
fontSize: T,
|
|
918
|
-
lineHeight: "1",
|
|
919
|
-
css: { "& > svg": {
|
|
920
|
-
width: T,
|
|
921
|
-
height: T
|
|
922
|
-
} },
|
|
923
|
-
children: o.icon
|
|
924
|
-
}) : null, r[9] = k, r[10] = T, r[11] = o.icon, r[12] = N) : N = r[12];
|
|
925
|
-
let P;
|
|
926
|
-
r[13] === o.indicator ? P = r[14] : (P = o.indicator ? /* @__PURE__ */ y(e, {
|
|
927
|
-
content: o.indicator.tooltip,
|
|
928
|
-
disabled: !o.indicator.tooltip,
|
|
929
|
-
openDelay: 300,
|
|
930
|
-
children: /* @__PURE__ */ y(n, {
|
|
931
|
-
color: o.indicator.color ?? "fg.muted",
|
|
932
|
-
flexShrink: 0,
|
|
933
|
-
children: o.indicator.icon
|
|
934
|
-
})
|
|
935
|
-
}) : null, r[13] = o.indicator, r[14] = P);
|
|
936
|
-
let F;
|
|
937
|
-
r[15] !== o.label || r[16] !== O || r[17] !== S ? (F = /* @__PURE__ */ y(_e, {
|
|
938
|
-
label: o.label,
|
|
939
|
-
textStyle: S,
|
|
940
|
-
color: O
|
|
941
|
-
}), r[15] = o.label, r[16] = O, r[17] = S, r[18] = F) : F = r[18];
|
|
942
|
-
let I;
|
|
943
|
-
r[19] !== E || r[20] !== N || r[21] !== P || r[22] !== F ? (I = /* @__PURE__ */ b(i, {
|
|
944
|
-
gap: E,
|
|
945
|
-
minW: "0",
|
|
946
|
-
alignItems: "center",
|
|
947
|
-
children: [
|
|
948
|
-
N,
|
|
949
|
-
P,
|
|
950
|
-
F
|
|
951
|
-
]
|
|
952
|
-
}), r[19] = E, r[20] = N, r[21] = P, r[22] = F, r[23] = I) : I = r[23];
|
|
953
|
-
let L;
|
|
954
|
-
r[24] !== j || r[25] !== w || r[26] !== C || r[27] !== o.description ? (L = /* @__PURE__ */ y(ve, {
|
|
955
|
-
description: o.description,
|
|
956
|
-
textStyle: C,
|
|
957
|
-
color: j,
|
|
958
|
-
marginLeft: w
|
|
959
|
-
}), r[24] = j, r[25] = w, r[26] = C, r[27] = o.description, r[28] = L) : L = r[28];
|
|
960
|
-
let R;
|
|
961
|
-
r[29] !== I || r[30] !== L ? (R = /* @__PURE__ */ b(d, {
|
|
962
|
-
gap: "0",
|
|
963
|
-
minW: "0",
|
|
964
|
-
flex: "1",
|
|
965
|
-
children: [I, L]
|
|
966
|
-
}), r[29] = I, r[30] = L, r[31] = R) : R = r[31];
|
|
967
|
-
let z;
|
|
968
|
-
return r[32] !== p || r[33] !== M || r[34] !== R ? (z = /* @__PURE__ */ b(i, {
|
|
969
|
-
id: p,
|
|
970
|
-
gap: "2",
|
|
971
|
-
minW: "0",
|
|
972
|
-
flex: "1",
|
|
973
|
-
overflow: "hidden",
|
|
974
|
-
alignItems: "center",
|
|
975
|
-
children: [M, R]
|
|
976
|
-
}), r[32] = p, r[33] = M, r[34] = R, r[35] = z) : z = r[35], z;
|
|
977
|
-
}, ye = (e) => {
|
|
978
|
-
let t = _(23), { labelId: r, item: i, isDisabled: a, isExpanded: o, showChevron: s, tone: c, variant: l, showContextMenuTrigger: u } = e, d = c === void 0 ? "default" : c, f = l === void 0 ? "default" : l, p;
|
|
979
|
-
t[0] !== i || t[1] !== u ? (p = U(i, u), t[0] = i, t[1] = u, t[2] = p) : p = t[2];
|
|
980
|
-
let m = p, h;
|
|
981
|
-
t[3] !== a || t[4] !== o || t[5] !== i || t[6] !== r || t[7] !== s || t[8] !== d || t[9] !== f ? (h = /* @__PURE__ */ y(G, {
|
|
982
|
-
labelId: r,
|
|
983
|
-
item: i,
|
|
984
|
-
isExpanded: o,
|
|
985
|
-
showChevron: s,
|
|
986
|
-
isDisabled: a,
|
|
987
|
-
tone: d,
|
|
988
|
-
variant: f
|
|
989
|
-
}), t[3] = a, t[4] = o, t[5] = i, t[6] = r, t[7] = s, t[8] = d, t[9] = f, t[10] = h) : h = t[10];
|
|
990
|
-
let g;
|
|
991
|
-
t[11] !== i.endContent || t[12] !== r ? (g = i.endContent ? /* @__PURE__ */ y(n, {
|
|
992
|
-
id: `${r}-end`,
|
|
993
|
-
color: "fg.muted",
|
|
994
|
-
flexShrink: 0,
|
|
995
|
-
display: "flex",
|
|
996
|
-
alignItems: "center",
|
|
997
|
-
children: i.endContent
|
|
998
|
-
}) : null, t[11] = i.endContent, t[12] = r, t[13] = g) : g = t[13];
|
|
999
|
-
let x;
|
|
1000
|
-
t[14] !== m || t[15] !== i.contextMenuItems?.length || t[16] !== i.id || t[17] !== u ? (x = m.length > 0 ? /* @__PURE__ */ y(pe, {
|
|
1001
|
-
actions: m,
|
|
1002
|
-
context: { nodeId: i.id },
|
|
1003
|
-
alwaysVisible: u && (i.contextMenuItems?.length ?? 0) > 0
|
|
1004
|
-
}) : null, t[14] = m, t[15] = i.contextMenuItems?.length, t[16] = i.id, t[17] = u, t[18] = x) : x = t[18];
|
|
1005
|
-
let S;
|
|
1006
|
-
return t[19] !== h || t[20] !== g || t[21] !== x ? (S = /* @__PURE__ */ b(v, { children: [
|
|
1007
|
-
h,
|
|
1008
|
-
g,
|
|
1009
|
-
x
|
|
1010
|
-
] }), t[19] = h, t[20] = g, t[21] = x, t[22] = S) : S = t[22], S;
|
|
1011
|
-
}, be = (e) => {
|
|
1012
|
-
if (!(e <= 0)) return `calc(var(--chakra-spacing-1) + ${e} * 12px)`;
|
|
1013
|
-
}, xe = (e) => e === "compact" || e === "full-width" || e === "empty-state", Se = (e, t) => e === "collection" && !t ? {
|
|
1014
|
-
rowHeight: "collection-row",
|
|
1015
|
-
minHeight: void 0
|
|
1016
|
-
} : xe(e) && !t ? {
|
|
1017
|
-
rowHeight: "1.75rem",
|
|
1018
|
-
minHeight: void 0
|
|
1019
|
-
} : {
|
|
1020
|
-
rowHeight: "auto",
|
|
1021
|
-
minHeight: e === "default" ? "2.25rem" : "1.75rem"
|
|
1022
|
-
}, K = (e) => ({
|
|
1023
|
-
bg: e.isSelected ? e.selectedBg : "transparent",
|
|
1024
|
-
_hover: e.variant === "empty-state" ? { bg: "transparent" } : e.isSelected ? { bg: e.selectedBg } : e.tone === "danger" ? {
|
|
1025
|
-
outline: "1px solid",
|
|
1026
|
-
outlineColor: "red.500",
|
|
1027
|
-
outlineOffset: "-1px"
|
|
1028
|
-
} : { bg: e.hoverBg },
|
|
1029
|
-
_active: e.variant === "empty-state" ? { bg: "transparent" } : { bg: e.selectedBg }
|
|
1030
|
-
}), Ce = (e, t) => t ? `${e} ${e}-end` : e, we = (e) => {
|
|
1031
|
-
let t = e.isDisabled ? "not-allowed" : "pointer";
|
|
1032
|
-
return {
|
|
1033
|
-
"aria-labelledby": e.rootProps["aria-label"] ? void 0 : Ce(e.labelId, e.hasEndContent),
|
|
1034
|
-
...e.rootProps,
|
|
1035
|
-
role: e.rowRole,
|
|
1036
|
-
"aria-selected": e.rootProps["aria-selected"] ?? (e.rowRole === "option" ? e.isSelected : void 0),
|
|
1037
|
-
"aria-expanded": e.showChevron ? e.isExpanded : void 0,
|
|
1038
|
-
className: e.className ? `group ${e.className}` : "group",
|
|
1039
|
-
width: "full",
|
|
1040
|
-
minWidth: "0",
|
|
1041
|
-
maxWidth: "full",
|
|
1042
|
-
height: e.rowHeight,
|
|
1043
|
-
minHeight: e.minHeight,
|
|
1044
|
-
display: "flex",
|
|
1045
|
-
position: "relative",
|
|
1046
|
-
alignItems: "center",
|
|
1047
|
-
justifyContent: "space-between",
|
|
1048
|
-
gap: "xs",
|
|
1049
|
-
px: "sm",
|
|
1050
|
-
py: e.verticalPadding,
|
|
1051
|
-
pl: e.paddingLeft,
|
|
1052
|
-
borderRadius: e.variant === "full-width" || e.variant === "collection" ? "0" : "xs",
|
|
1053
|
-
...K({ ...e }),
|
|
1054
|
-
cursor: e.variant === "empty-state" ? "default" : t,
|
|
1055
|
-
overflow: "hidden",
|
|
1056
|
-
textAlign: "left",
|
|
1057
|
-
color: "inherit",
|
|
1058
|
-
textDecoration: "none"
|
|
1059
|
-
};
|
|
1060
|
-
}, q = C((e, t) => {
|
|
1061
|
-
let n = _(104), { id: r, label: i, description: a, icon: o, iconColor: s, indicator: c, endContent: l, tooltip: u, disabled: d, isContainer: f, isNavigable: p, href: h, navigationIntent: g, menuItems: v, menuPlacement: b, contextMenuItems: x, actions: S, children: C, onActivate: w, depth: E, isSelected: O, isExpanded: k, showExpandToggle: A, showContextMenuTrigger: j, variant: M, tone: N, selectedBg: P, hoverBg: F, asChild: I, className: L, role: R, onToggleExpand: B, onPointerMove: V, draggable: ee, onDragStart: te, onDragOver: ne, onDragEnd: re, onDrop: ie, onClick: ae, onKeyDown: oe, ...se } = e, ce = E === void 0 ? 0 : E, le = O !== void 0 && O, ue = k !== void 0 && k, de = A !== void 0 && A, fe = j !== void 0 && j, H = M === void 0 ? "default" : M, pe = N === void 0 ? "default" : N, me = P === void 0 ? "bg.active" : P, he = F === void 0 ? "bg.hover" : F, U = I !== void 0 && I, [ge, W] = D(!1), _e = T(), ve;
|
|
1062
|
-
n[0] !== S || n[1] !== C || n[2] !== x || n[3] !== a || n[4] !== d || n[5] !== l || n[6] !== h || n[7] !== o || n[8] !== s || n[9] !== r || n[10] !== c || n[11] !== f || n[12] !== p || n[13] !== i || n[14] !== v || n[15] !== b || n[16] !== g || n[17] !== w || n[18] !== u ? (ve = {
|
|
1063
|
-
id: r,
|
|
1064
|
-
label: i,
|
|
1065
|
-
description: a,
|
|
1066
|
-
icon: o,
|
|
1067
|
-
iconColor: s,
|
|
1068
|
-
indicator: c,
|
|
1069
|
-
endContent: l,
|
|
1070
|
-
tooltip: u,
|
|
1071
|
-
disabled: d,
|
|
1072
|
-
isContainer: f,
|
|
1073
|
-
isNavigable: p,
|
|
1074
|
-
href: h,
|
|
1075
|
-
navigationIntent: g,
|
|
1076
|
-
menuItems: v,
|
|
1077
|
-
menuPlacement: b,
|
|
1078
|
-
contextMenuItems: x,
|
|
1079
|
-
actions: S,
|
|
1080
|
-
children: C,
|
|
1081
|
-
onActivate: w
|
|
1082
|
-
}, n[0] = S, n[1] = C, n[2] = x, n[3] = a, n[4] = d, n[5] = l, n[6] = h, n[7] = o, n[8] = s, n[9] = r, n[10] = c, n[11] = f, n[12] = p, n[13] = i, n[14] = v, n[15] = b, n[16] = g, n[17] = w, n[18] = u, n[19] = ve) : ve = n[19];
|
|
1083
|
-
let G = ve, xe;
|
|
1084
|
-
n[20] !== ee || n[21] !== re || n[22] !== ne || n[23] !== te || n[24] !== ie ? (xe = {
|
|
1085
|
-
draggable: ee,
|
|
1086
|
-
onDragStart: te,
|
|
1087
|
-
onDragOver: ne,
|
|
1088
|
-
onDragEnd: re,
|
|
1089
|
-
onDrop: ie
|
|
1090
|
-
}, n[20] = ee, n[21] = re, n[22] = ne, n[23] = te, n[24] = ie, n[25] = xe) : xe = n[25];
|
|
1091
|
-
let K = xe, Ce = (G.children?.length ?? 0) > 0 || G.isContainer === !0, q = (G.menuItems?.length ?? 0) > 0, De = (G.actions?.length ?? 0) > 0 || (G.contextMenuItems?.length ?? 0) > 0, J = de && Ce, Y = G.disabled === !0, X;
|
|
1092
|
-
n[26] !== q || n[27] !== Y || n[28] !== w || n[29] !== B || n[30] !== J ? (X = () => {
|
|
1093
|
-
if (!Y && !q) {
|
|
1094
|
-
if (J) {
|
|
1095
|
-
B?.();
|
|
1096
|
-
return;
|
|
1097
|
-
}
|
|
1098
|
-
w?.();
|
|
1099
|
-
}
|
|
1100
|
-
}, n[26] = q, n[27] = Y, n[28] = w, n[29] = B, n[30] = J, n[31] = X) : X = n[31];
|
|
1101
|
-
let Z = X, Oe;
|
|
1102
|
-
n[32] !== Z || n[33] !== q || n[34] !== Y || n[35] !== ae || n[36] !== W ? (Oe = (e) => {
|
|
1103
|
-
if (ae?.(e), !e.defaultPrevented) {
|
|
1104
|
-
if (Y) {
|
|
1105
|
-
e.preventDefault();
|
|
1106
|
-
return;
|
|
1107
|
-
}
|
|
1108
|
-
q ? W(Te) : Z();
|
|
1109
|
-
}
|
|
1110
|
-
}, n[32] = Z, n[33] = q, n[34] = Y, n[35] = ae, n[36] = W, n[37] = Oe) : Oe = n[37];
|
|
1111
|
-
let ke = Oe, Ae;
|
|
1112
|
-
n[38] !== Z || n[39] !== q || n[40] !== Y || n[41] !== oe || n[42] !== W ? (Ae = (e) => {
|
|
1113
|
-
if (oe?.(e), !e.defaultPrevented && e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), !Y)) {
|
|
1114
|
-
if (q) {
|
|
1115
|
-
W(Ee);
|
|
1116
|
-
return;
|
|
1117
|
-
}
|
|
1118
|
-
Z();
|
|
1119
|
-
}
|
|
1120
|
-
}, n[38] = Z, n[39] = q, n[40] = Y, n[41] = oe, n[42] = W, n[43] = Ae) : Ae = n[43];
|
|
1121
|
-
let je = Ae, Me = G.description !== void 0, Ne = be(ce), Pe = H === "default" || Me ? "xs" : "2xs", Fe;
|
|
1122
|
-
n[44] === ke ? Fe = n[45] : (Fe = { onClick: ke }, n[44] = ke, n[45] = Fe);
|
|
1123
|
-
let Ie = Fe, { rowHeight: Le, minHeight: Re } = Se(H, Me), ze = R ?? (q ? "button" : "option"), Be = we({
|
|
1124
|
-
rootProps: {
|
|
1125
|
-
...se,
|
|
1126
|
-
id: r
|
|
1127
|
-
},
|
|
1128
|
-
labelId: _e,
|
|
1129
|
-
hasEndContent: !!G.endContent,
|
|
1130
|
-
rowRole: ze,
|
|
1131
|
-
className: L,
|
|
1132
|
-
isSelected: le,
|
|
1133
|
-
isExpanded: ue,
|
|
1134
|
-
showChevron: J,
|
|
1135
|
-
rowHeight: Le,
|
|
1136
|
-
minHeight: Re,
|
|
1137
|
-
verticalPadding: Pe,
|
|
1138
|
-
paddingLeft: Ne,
|
|
1139
|
-
selectedBg: me,
|
|
1140
|
-
hoverBg: he,
|
|
1141
|
-
tone: pe,
|
|
1142
|
-
isDisabled: Y,
|
|
1143
|
-
variant: H
|
|
1144
|
-
}), Ve;
|
|
1145
|
-
n[46] !== Y || n[47] !== ue || n[48] !== G || n[49] !== _e || n[50] !== J || n[51] !== fe || n[52] !== pe || n[53] !== H ? (Ve = /* @__PURE__ */ y(ye, {
|
|
1146
|
-
labelId: _e,
|
|
1147
|
-
item: G,
|
|
1148
|
-
isExpanded: ue,
|
|
1149
|
-
showChevron: J,
|
|
1150
|
-
isDisabled: Y,
|
|
1151
|
-
tone: pe,
|
|
1152
|
-
variant: H,
|
|
1153
|
-
showContextMenuTrigger: fe
|
|
1154
|
-
}), n[46] = Y, n[47] = ue, n[48] = G, n[49] = _e, n[50] = J, n[51] = fe, n[52] = pe, n[53] = H, n[54] = Ve) : Ve = n[54];
|
|
1155
|
-
let Q = Ve, He;
|
|
1156
|
-
n[55] !== G || n[56] !== ge || n[57] !== W ? (He = (e) => /* @__PURE__ */ y(z, {
|
|
1157
|
-
item: G,
|
|
1158
|
-
menuOpen: ge,
|
|
1159
|
-
onMenuOpenChange: W,
|
|
1160
|
-
onMenuSelect: (e) => {
|
|
1161
|
-
W(!1), e.onAction?.();
|
|
1162
|
-
},
|
|
1163
|
-
children: e
|
|
1164
|
-
}), n[55] = G, n[56] = ge, n[57] = W, n[58] = He) : He = n[58];
|
|
1165
|
-
let $ = He;
|
|
1166
|
-
if (U) {
|
|
1167
|
-
let e;
|
|
1168
|
-
n[59] !== Ie || n[60] !== Q || n[61] !== K || n[62] !== V || n[63] !== t || n[64] !== Be ? (e = /* @__PURE__ */ y(m.div, {
|
|
1169
|
-
ref: t,
|
|
1170
|
-
...Be,
|
|
1171
|
-
...K,
|
|
1172
|
-
...Ie,
|
|
1173
|
-
onPointerMove: V,
|
|
1174
|
-
children: Q
|
|
1175
|
-
}), n[59] = Ie, n[60] = Q, n[61] = K, n[62] = V, n[63] = t, n[64] = Be, n[65] = e) : e = n[65];
|
|
1176
|
-
let r;
|
|
1177
|
-
return n[66] !== e || n[67] !== $ ? (r = $(e), n[66] = e, n[67] = $, n[68] = r) : r = n[68], r;
|
|
1178
|
-
}
|
|
1179
|
-
if (G.href && !J && !Y && !q) {
|
|
1180
|
-
let e = Be, r;
|
|
1181
|
-
n[69] !== Q || n[70] !== K || n[71] !== ke || n[72] !== G.href || n[73] !== V || n[74] !== t || n[75] !== e ? (r = /* @__PURE__ */ y(m.a, {
|
|
1182
|
-
ref: t,
|
|
1183
|
-
href: G.href,
|
|
1184
|
-
...e,
|
|
1185
|
-
...K,
|
|
1186
|
-
onClick: ke,
|
|
1187
|
-
onPointerMove: V,
|
|
1188
|
-
children: Q
|
|
1189
|
-
}), n[69] = Q, n[70] = K, n[71] = ke, n[72] = G.href, n[73] = V, n[74] = t, n[75] = e, n[76] = r) : r = n[76];
|
|
1190
|
-
let i;
|
|
1191
|
-
return n[77] !== r || n[78] !== $ ? (i = $(r), n[77] = r, n[78] = $, n[79] = i) : i = n[79], i;
|
|
1192
|
-
}
|
|
1193
|
-
if (De) {
|
|
1194
|
-
let e = Y || void 0, r = se.tabIndex ?? 0, i;
|
|
1195
|
-
n[80] !== Ie || n[81] !== Q || n[82] !== K || n[83] !== je || n[84] !== V || n[85] !== t || n[86] !== Be || n[87] !== e || n[88] !== r ? (i = /* @__PURE__ */ y(m.div, {
|
|
1196
|
-
ref: t,
|
|
1197
|
-
"aria-disabled": e,
|
|
1198
|
-
...Be,
|
|
1199
|
-
...K,
|
|
1200
|
-
...Ie,
|
|
1201
|
-
tabIndex: r,
|
|
1202
|
-
onKeyDown: je,
|
|
1203
|
-
onPointerMove: V,
|
|
1204
|
-
children: Q
|
|
1205
|
-
}), n[80] = Ie, n[81] = Q, n[82] = K, n[83] = je, n[84] = V, n[85] = t, n[86] = Be, n[87] = e, n[88] = r, n[89] = i) : i = n[89];
|
|
1206
|
-
let a;
|
|
1207
|
-
return n[90] !== i || n[91] !== $ ? (a = $(i), n[90] = i, n[91] = $, n[92] = a) : a = n[92], a;
|
|
1208
|
-
}
|
|
1209
|
-
let Ue = Be, We;
|
|
1210
|
-
n[93] !== Ie || n[94] !== Q || n[95] !== K || n[96] !== Y || n[97] !== V || n[98] !== t || n[99] !== Ue ? (We = /* @__PURE__ */ y(m.button, {
|
|
1211
|
-
ref: t,
|
|
1212
|
-
type: "button",
|
|
1213
|
-
disabled: Y,
|
|
1214
|
-
...Ue,
|
|
1215
|
-
...K,
|
|
1216
|
-
...Ie,
|
|
1217
|
-
onPointerMove: V,
|
|
1218
|
-
children: Q
|
|
1219
|
-
}), n[93] = Ie, n[94] = Q, n[95] = K, n[96] = Y, n[97] = V, n[98] = t, n[99] = Ue, n[100] = We) : We = n[100];
|
|
1220
|
-
let Ge;
|
|
1221
|
-
return n[101] !== We || n[102] !== $ ? (Ge = $(We), n[101] = We, n[102] = $, n[103] = Ge) : Ge = n[103], Ge;
|
|
1222
|
-
});
|
|
1223
|
-
function Te(e) {
|
|
1224
|
-
return !e;
|
|
1225
|
-
}
|
|
1226
|
-
function Ee(e) {
|
|
1227
|
-
return !e;
|
|
1228
|
-
}
|
|
1229
|
-
//#endregion
|
|
1230
|
-
export { ne as a, R as c, ie as i, P as l, ue as n, ee as o, se as r, V as s, q as t, F as u };
|
|
1231
|
-
|
|
1232
|
-
//# sourceMappingURL=list-row-F8kBQGB-.js.map
|