@pstdio/ui 0.18.0 → 0.19.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/chat-ui.js +941 -899
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/chat-ui/components/chat-message-list-items.d.ts +17 -0
- package/dist/components/chat-ui/components/message-types.d.ts +1 -0
- package/dist/components/chat-ui/components/timeline.d.ts +2 -0
- package/dist/components/chat-ui/tool-rendering/default-renderers.d.ts +1 -0
- package/dist/components/chat-ui/tool-rendering/shared.d.ts +3 -2
- package/dist/components/chat-ui/tool-rendering/standard-renderers.d.ts +1 -0
- package/dist/components/data-table/data-table-skeleton.d.ts +13 -0
- package/dist/components/data-table/index.d.ts +2 -0
- package/dist/components/overlays/dialog-accept-shortcut.d.ts +12 -0
- package/dist/components/overlays/index.d.ts +1 -0
- package/dist/components/param-editor/index.d.ts +3 -1
- package/dist/components/param-editor/inputs/selection-input.d.ts +5 -0
- package/dist/components/param-editor/inputs/selection-menu.d.ts +6 -0
- package/dist/components/param-editor/param-editor-row.d.ts +17 -0
- package/dist/components/param-editor/param-editor.types.d.ts +18 -0
- package/dist/components/primitives/glyph-icon.d.ts +16 -0
- package/dist/components/primitives/icon-color-picker.d.ts +3 -13
- package/dist/components/primitives/icon-options.d.ts +301 -0
- package/dist/components/primitives/index.d.ts +10 -3
- package/dist/components/primitives/segmented-control.d.ts +20 -0
- package/dist/components/primitives/tag-swatch.d.ts +10 -0
- package/dist/components/tag-editor/index.d.ts +4 -0
- package/dist/components/tag-editor/tag-editor-heading.d.ts +11 -0
- package/dist/components/tag-editor/tag-editor-row.d.ts +1 -1
- package/dist/components/tag-editor/tag-editor-save-bar.d.ts +13 -0
- package/dist/components/tag-editor/tag-editor.types.d.ts +11 -11
- package/dist/components/tag-editor/tag-settings-panel.d.ts +3 -1
- package/dist/data-table.js +564 -522
- package/dist/data-table.js.map +1 -1
- package/dist/dialog-accept-shortcut-DAEBsoWW.js +7 -0
- package/dist/dialog-accept-shortcut-DAEBsoWW.js.map +1 -0
- package/dist/diff.js +2 -2
- package/dist/font/css/prompt-studio-icons.css +36 -6
- package/dist/font/prompt-studio-icons.eot +0 -0
- package/dist/font/prompt-studio-icons.svg +1 -1
- package/dist/font/prompt-studio-icons.ttf +0 -0
- package/dist/font/prompt-studio-icons.woff +0 -0
- package/dist/font/prompt-studio-icons.woff2 +0 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1978 -1712
- package/dist/index.js.map +1 -1
- package/dist/{kanban-renderer-toolbar-Db1mIWWd.js → kanban-renderer-toolbar-Bcj_N1qr.js} +66 -66
- package/dist/kanban-renderer-toolbar-Bcj_N1qr.js.map +1 -0
- package/dist/kanban-renderer.js +138 -135
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/list-row-BtoVJpFs.js +821 -0
- package/dist/list-row-BtoVJpFs.js.map +1 -0
- package/dist/param-editor-XRjSu6MT.js +161 -0
- package/dist/param-editor-XRjSu6MT.js.map +1 -0
- package/dist/param-editor-field-B9lEPq8c.js +3028 -0
- package/dist/param-editor-field-B9lEPq8c.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/theme/primitives/sizes.d.ts +59 -0
- package/dist/theme/recipes/segmented-control.d.ts +22 -0
- package/dist/theme/recipes/switch.d.ts +1 -0
- package/dist/theme/recipes/tabs.d.ts +11 -0
- package/dist/{theme-poQlUgt0.js → theme-7PDdD9OD.js} +200 -120
- package/dist/theme-7PDdD9OD.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/{tree-list-BAja2eXU.js → tree-list-B2L0cTj2.js} +2 -2
- package/dist/{tree-list-BAja2eXU.js.map → tree-list-B2L0cTj2.js.map} +1 -1
- package/package.json +2 -2
- package/dist/kanban-renderer-toolbar-Db1mIWWd.js.map +0 -1
- package/dist/list-row-BYWwcbGK.js +0 -823
- package/dist/list-row-BYWwcbGK.js.map +0 -1
- package/dist/param-editor-BCZOw5Gt.js +0 -140
- package/dist/param-editor-BCZOw5Gt.js.map +0 -1
- package/dist/param-editor-field-ZzZwgjZ_.js +0 -2094
- package/dist/param-editor-field-ZzZwgjZ_.js.map +0 -1
- package/dist/theme-poQlUgt0.js.map +0 -1
|
@@ -1,823 +0,0 @@
|
|
|
1
|
-
import { jsx as r, jsxs as k, Fragment as nt } from "react/jsx-runtime";
|
|
2
|
-
import { c as D } from "react/compiler-runtime";
|
|
3
|
-
import { Menu as w, Portal as Ne, HStack as ue, Stack as ot, Text as je, Box as z, Icon as Me, InputGroup as st, Input as at, IconButton as Je, chakra as _e } from "@chakra-ui/react";
|
|
4
|
-
import * as ct from "react";
|
|
5
|
-
import { Fragment as Ke, useState as Ve, useRef as Ye, useEffect as et, forwardRef as dt } from "react";
|
|
6
|
-
import { Search as ut, ChevronDown as lt, ChevronRight as ht } from "lucide-react";
|
|
7
|
-
import { T as Qe, S as ft } from "./scroll-area-BMbg1WcD.js";
|
|
8
|
-
const rt = (n) => {
|
|
9
|
-
const e = D(6), {
|
|
10
|
-
actions: t,
|
|
11
|
-
contentBackground: o,
|
|
12
|
-
contentMinWidth: i
|
|
13
|
-
} = n;
|
|
14
|
-
let s;
|
|
15
|
-
e[0] !== t ? (s = t.map(mt), e[0] = t, e[1] = s) : s = e[1];
|
|
16
|
-
let l;
|
|
17
|
-
return e[2] !== o || e[3] !== i || e[4] !== s ? (l = /* @__PURE__ */ r(Ne, { children: /* @__PURE__ */ r(w.Positioner, { children: /* @__PURE__ */ r(w.Content, { minW: i, bg: o, children: s }) }) }), e[2] = o, e[3] = i, e[4] = s, e[5] = l) : l = e[5], l;
|
|
18
|
-
}, ln = (n) => {
|
|
19
|
-
const e = D(13), {
|
|
20
|
-
actions: t,
|
|
21
|
-
children: o,
|
|
22
|
-
contentMinWidth: i,
|
|
23
|
-
contentBackground: s,
|
|
24
|
-
positioning: l,
|
|
25
|
-
closeOnSelect: a
|
|
26
|
-
} = n, d = i === void 0 ? "17.5rem" : i, c = s === void 0 ? "bg" : s;
|
|
27
|
-
let h;
|
|
28
|
-
e[0] !== l ? (h = l === void 0 ? {
|
|
29
|
-
placement: "bottom-start"
|
|
30
|
-
} : l, e[0] = l, e[1] = h) : h = e[1];
|
|
31
|
-
const p = h;
|
|
32
|
-
if (t.length === 0)
|
|
33
|
-
return o;
|
|
34
|
-
let m;
|
|
35
|
-
e[2] !== o ? (m = /* @__PURE__ */ r(w.Trigger, { asChild: !0, children: o }), e[2] = o, e[3] = m) : m = e[3];
|
|
36
|
-
let u;
|
|
37
|
-
e[4] !== t || e[5] !== c || e[6] !== d ? (u = /* @__PURE__ */ r(rt, { actions: t, contentMinWidth: d, contentBackground: c }), e[4] = t, e[5] = c, e[6] = d, e[7] = u) : u = e[7];
|
|
38
|
-
let f;
|
|
39
|
-
return e[8] !== a || e[9] !== p || e[10] !== m || e[11] !== u ? (f = /* @__PURE__ */ k(w.Root, { positioning: p, closeOnSelect: a, children: [
|
|
40
|
-
m,
|
|
41
|
-
u
|
|
42
|
-
] }), e[8] = a, e[9] = p, e[10] = m, e[11] = u, e[12] = f) : f = e[12], f;
|
|
43
|
-
}, pt = (n) => {
|
|
44
|
-
const e = D(15), {
|
|
45
|
-
actions: t,
|
|
46
|
-
children: o,
|
|
47
|
-
contentMinWidth: i,
|
|
48
|
-
contentBackground: s,
|
|
49
|
-
positioning: l,
|
|
50
|
-
closeOnSelect: a,
|
|
51
|
-
keepMountedWhenEmpty: d
|
|
52
|
-
} = n, c = i === void 0 ? "17.5rem" : i, h = s === void 0 ? "bg" : s;
|
|
53
|
-
let p;
|
|
54
|
-
e[0] !== l ? (p = l === void 0 ? {
|
|
55
|
-
placement: "bottom-start"
|
|
56
|
-
} : l, e[0] = l, e[1] = p) : p = e[1];
|
|
57
|
-
const m = p, u = d === void 0 ? !1 : d;
|
|
58
|
-
if (t.length === 0 && !u) {
|
|
59
|
-
let b;
|
|
60
|
-
return e[2] !== o ? (b = /* @__PURE__ */ r(nt, { children: o }), e[2] = o, e[3] = b) : b = e[3], b;
|
|
61
|
-
}
|
|
62
|
-
let f;
|
|
63
|
-
e[4] !== o ? (f = /* @__PURE__ */ r(w.ContextTrigger, { asChild: !0, children: o }), e[4] = o, e[5] = f) : f = e[5];
|
|
64
|
-
let v;
|
|
65
|
-
e[6] !== t || e[7] !== h || e[8] !== c ? (v = t.length > 0 ? /* @__PURE__ */ r(rt, { actions: t, contentMinWidth: c, contentBackground: h }) : null, e[6] = t, e[7] = h, e[8] = c, e[9] = v) : v = e[9];
|
|
66
|
-
let C;
|
|
67
|
-
return e[10] !== a || e[11] !== m || e[12] !== f || e[13] !== v ? (C = /* @__PURE__ */ k(w.Root, { positioning: m, closeOnSelect: a, children: [
|
|
68
|
-
f,
|
|
69
|
-
v
|
|
70
|
-
] }), e[10] = a, e[11] = m, e[12] = f, e[13] = v, e[14] = C) : C = e[14], C;
|
|
71
|
-
};
|
|
72
|
-
function mt(n) {
|
|
73
|
-
return /* @__PURE__ */ k(Ke, { children: [
|
|
74
|
-
n.separatorBefore ? /* @__PURE__ */ r(w.Separator, {}) : null,
|
|
75
|
-
/* @__PURE__ */ r(w.Item, { value: n.key, disabled: n.isDisabled, asChild: !0, children: /* @__PURE__ */ r(Fe, { asChild: !0, variant: "full-width", label: n.label, icon: n.icon, endContent: n.endContent, disabled: n.isDisabled, onActivate: n.onClick }) })
|
|
76
|
-
] }, n.key);
|
|
77
|
-
}
|
|
78
|
-
const gt = (n) => {
|
|
79
|
-
const e = D(4), {
|
|
80
|
-
item: t
|
|
81
|
-
} = n;
|
|
82
|
-
if (!t.icon)
|
|
83
|
-
return null;
|
|
84
|
-
let o;
|
|
85
|
-
e[0] !== t.icon ? (o = typeof t.icon == "function" ? /* @__PURE__ */ r(Me, { as: t.icon, boxSize: "14px" }) : t.icon, e[0] = t.icon, e[1] = o) : o = e[1];
|
|
86
|
-
let i;
|
|
87
|
-
return e[2] !== o ? (i = /* @__PURE__ */ r(z, { color: "fg.muted", flexShrink: 0, display: "inline-flex", children: o }), e[2] = o, e[3] = i) : i = e[3], i;
|
|
88
|
-
}, bt = (n) => {
|
|
89
|
-
const e = D(20), {
|
|
90
|
-
children: t,
|
|
91
|
-
items: o,
|
|
92
|
-
onOpenChange: i,
|
|
93
|
-
onSelect: s,
|
|
94
|
-
open: l,
|
|
95
|
-
placement: a
|
|
96
|
-
} = n, d = a === void 0 ? "right-start" : a;
|
|
97
|
-
let c;
|
|
98
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = {
|
|
99
|
-
mainAxis: 4
|
|
100
|
-
}, e[0] = c) : c = e[0];
|
|
101
|
-
let h;
|
|
102
|
-
e[1] !== d ? (h = {
|
|
103
|
-
placement: d,
|
|
104
|
-
offset: c
|
|
105
|
-
}, e[1] = d, e[2] = h) : h = e[2];
|
|
106
|
-
let p;
|
|
107
|
-
e[3] !== i ? (p = (C) => i(C.open), e[3] = i, e[4] = p) : p = e[4];
|
|
108
|
-
let m;
|
|
109
|
-
e[5] !== t ? (m = /* @__PURE__ */ r(w.Trigger, { asChild: !0, children: t }), e[5] = t, e[6] = m) : m = e[6];
|
|
110
|
-
let u;
|
|
111
|
-
if (e[7] !== o || e[8] !== s) {
|
|
112
|
-
let C;
|
|
113
|
-
e[10] !== s ? (C = (b) => /* @__PURE__ */ k(Ke, { children: [
|
|
114
|
-
b.separatorBefore ? /* @__PURE__ */ r(w.Separator, {}) : null,
|
|
115
|
-
/* @__PURE__ */ r(w.Item, { value: b.id, disabled: b.disabled || b.readOnly, _disabled: b.readOnly ? {
|
|
116
|
-
opacity: 1,
|
|
117
|
-
cursor: "default"
|
|
118
|
-
} : void 0, onClick: () => {
|
|
119
|
-
b.readOnly || s(b);
|
|
120
|
-
}, children: /* @__PURE__ */ k(ue, { gap: "2", minW: "0", w: "full", justify: "space-between", alignItems: "center", children: [
|
|
121
|
-
/* @__PURE__ */ k(ue, { gap: "2", minW: "0", flex: "1", alignItems: b.description ? "flex-start" : "center", children: [
|
|
122
|
-
/* @__PURE__ */ r(gt, { item: b }),
|
|
123
|
-
/* @__PURE__ */ k(ot, { gap: "0", minW: "0", children: [
|
|
124
|
-
/* @__PURE__ */ r(je, { textStyle: "label/S/regular", truncate: !0, children: b.label }),
|
|
125
|
-
b.description ? /* @__PURE__ */ r(je, { textStyle: "label/XS", color: "fg.menu-item.secondary", truncate: !0, children: b.description }) : null
|
|
126
|
-
] })
|
|
127
|
-
] }),
|
|
128
|
-
b.endContent ? /* @__PURE__ */ r(z, { flexShrink: 0, children: b.endContent }) : null
|
|
129
|
-
] }) })
|
|
130
|
-
] }, b.id), e[10] = s, e[11] = C) : C = e[11], u = o.map(C), e[7] = o, e[8] = s, e[9] = u;
|
|
131
|
-
} else
|
|
132
|
-
u = e[9];
|
|
133
|
-
let f;
|
|
134
|
-
e[12] !== u ? (f = /* @__PURE__ */ r(Ne, { children: /* @__PURE__ */ r(w.Positioner, { children: /* @__PURE__ */ r(w.Content, { minW: "200px", bg: "bg", children: u }) }) }), e[12] = u, e[13] = f) : f = e[13];
|
|
135
|
-
let v;
|
|
136
|
-
return e[14] !== l || e[15] !== h || e[16] !== p || e[17] !== m || e[18] !== f ? (v = /* @__PURE__ */ k(w.Root, { open: l, positioning: h, onOpenChange: p, children: [
|
|
137
|
-
m,
|
|
138
|
-
f
|
|
139
|
-
] }), e[14] = l, e[15] = h, e[16] = p, e[17] = m, e[18] = f, e[19] = v) : v = e[19], v;
|
|
140
|
-
}, vt = (n) => n.map((e) => ({
|
|
141
|
-
key: e.id,
|
|
142
|
-
label: e.label,
|
|
143
|
-
icon: typeof e.icon == "function" ? /* @__PURE__ */ r(Me, { as: e.icon, boxSize: "16px" }) : e.icon,
|
|
144
|
-
endContent: e.endContent,
|
|
145
|
-
isDisabled: e.disabled,
|
|
146
|
-
separatorBefore: e.separatorBefore,
|
|
147
|
-
onClick: () => e.onAction?.()
|
|
148
|
-
})), xt = (n) => {
|
|
149
|
-
const e = D(15), {
|
|
150
|
-
children: t,
|
|
151
|
-
item: o,
|
|
152
|
-
menuOpen: i,
|
|
153
|
-
onMenuOpenChange: s,
|
|
154
|
-
onMenuSelect: l
|
|
155
|
-
} = n;
|
|
156
|
-
if (o.menuItems && o.menuItems.length > 0) {
|
|
157
|
-
let p;
|
|
158
|
-
return e[0] !== t || e[1] !== o.menuItems || e[2] !== o.menuPlacement || e[3] !== i || e[4] !== s || e[5] !== l ? (p = /* @__PURE__ */ r(bt, { items: o.menuItems, open: i, placement: o.menuPlacement, onOpenChange: s, onSelect: l, children: t }), e[0] = t, e[1] = o.menuItems, e[2] = o.menuPlacement, e[3] = i, e[4] = s, e[5] = l, e[6] = p) : p = e[6], p;
|
|
159
|
-
}
|
|
160
|
-
let a;
|
|
161
|
-
e[7] !== t || e[8] !== o.tooltip ? (a = o.tooltip ? /* @__PURE__ */ r(Qe, { content: o.tooltip, children: t }) : t, e[7] = t, e[8] = o.tooltip, e[9] = a) : a = e[9];
|
|
162
|
-
const d = a;
|
|
163
|
-
if (!o.contextMenuItems || o.contextMenuItems.length === 0)
|
|
164
|
-
return d;
|
|
165
|
-
let c;
|
|
166
|
-
e[10] !== o.contextMenuItems ? (c = vt(o.contextMenuItems), e[10] = o.contextMenuItems, e[11] = c) : c = e[11];
|
|
167
|
-
let h;
|
|
168
|
-
return e[12] !== d || e[13] !== c ? (h = /* @__PURE__ */ r(pt, { actions: c, children: d }), e[12] = d, e[13] = c, e[14] = h) : h = e[14], h;
|
|
169
|
-
}, St = {
|
|
170
|
-
main: {
|
|
171
|
-
h: "2.5rem",
|
|
172
|
-
px: "xs"
|
|
173
|
-
},
|
|
174
|
-
narrow: {
|
|
175
|
-
h: "2rem",
|
|
176
|
-
px: "xs"
|
|
177
|
-
},
|
|
178
|
-
input: {
|
|
179
|
-
h: "3rem",
|
|
180
|
-
px: "0"
|
|
181
|
-
}
|
|
182
|
-
}, it = ct.forwardRef(function(e, t) {
|
|
183
|
-
const o = D(9);
|
|
184
|
-
let i, s, l;
|
|
185
|
-
o[0] !== e ? ({
|
|
186
|
-
variant: l,
|
|
187
|
-
children: i,
|
|
188
|
-
...s
|
|
189
|
-
} = e, o[0] = e, o[1] = i, o[2] = s, o[3] = l) : (i = o[1], s = o[2], l = o[3]);
|
|
190
|
-
const d = St[l === void 0 ? "main" : l];
|
|
191
|
-
let c;
|
|
192
|
-
return o[4] !== i || o[5] !== t || o[6] !== s || o[7] !== d ? (c = /* @__PURE__ */ r(ue, { ref: t, as: "header", alignItems: "center", borderWidth: "0", ...d, ...s, children: i }), o[4] = i, o[5] = t, o[6] = s, o[7] = d, o[8] = c) : c = o[8], c;
|
|
193
|
-
}), Ct = {
|
|
194
|
-
bg: "transparent",
|
|
195
|
-
border: "0",
|
|
196
|
-
borderColor: "transparent",
|
|
197
|
-
borderRadius: "0",
|
|
198
|
-
boxShadow: "none",
|
|
199
|
-
transition: "none",
|
|
200
|
-
_hover: {
|
|
201
|
-
bg: "transparent",
|
|
202
|
-
borderColor: "transparent"
|
|
203
|
-
},
|
|
204
|
-
_active: {
|
|
205
|
-
bg: "transparent",
|
|
206
|
-
borderColor: "transparent"
|
|
207
|
-
},
|
|
208
|
-
_focus: {
|
|
209
|
-
borderColor: "transparent",
|
|
210
|
-
outline: "none",
|
|
211
|
-
boxShadow: "none"
|
|
212
|
-
},
|
|
213
|
-
_focusVisible: {
|
|
214
|
-
borderColor: "transparent",
|
|
215
|
-
outline: "none",
|
|
216
|
-
boxShadow: "none"
|
|
217
|
-
}
|
|
218
|
-
}, wt = (n) => {
|
|
219
|
-
const e = D(8), {
|
|
220
|
-
inputRef: t,
|
|
221
|
-
value: o,
|
|
222
|
-
placeholder: i,
|
|
223
|
-
onValueChange: s
|
|
224
|
-
} = n;
|
|
225
|
-
let l;
|
|
226
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ r(ut, { size: 14 }), e[0] = l) : l = e[0];
|
|
227
|
-
let a;
|
|
228
|
-
e[1] !== s ? (a = (c) => s(c.target.value), e[1] = s, e[2] = a) : a = e[2];
|
|
229
|
-
let d;
|
|
230
|
-
return e[3] !== t || e[4] !== i || e[5] !== a || e[6] !== o ? (d = /* @__PURE__ */ r(it, { variant: "input", borderBottomWidth: "1px", borderColor: "border.subtle", flexShrink: 0, children: /* @__PURE__ */ r(st, { startElement: l, width: "full", children: /* @__PURE__ */ r(at, { ref: t, mx: "xs", value: o, placeholder: i, "aria-label": i, autoComplete: "off", ...Ct, onChange: a, onKeyDown: It }) }) }), e[3] = t, e[4] = i, e[5] = a, e[6] = o, e[7] = d) : d = e[7], d;
|
|
231
|
-
};
|
|
232
|
-
function It(n) {
|
|
233
|
-
return n.stopPropagation();
|
|
234
|
-
}
|
|
235
|
-
const yt = (n, e) => {
|
|
236
|
-
const t = e.trim().toLowerCase();
|
|
237
|
-
return t ? n.filter((o) => [o.label, o.searchText].filter(Boolean).join(" ").toLowerCase().includes(t)) : n;
|
|
238
|
-
}, Mt = (n, e) => !n || !e ? !1 : n !== e, Pt = (n, e, t) => !n || !e ? t : {
|
|
239
|
-
items: e.items,
|
|
240
|
-
filterItems: e.filterItems ?? t.filterItems,
|
|
241
|
-
showSearch: e.showSearch ?? t.showSearch,
|
|
242
|
-
searchPlaceholder: e.searchPlaceholder ?? t.searchPlaceholder,
|
|
243
|
-
emptyState: e.emptyState ?? t.emptyState,
|
|
244
|
-
contentTestId: e.contentTestId ?? t.contentTestId,
|
|
245
|
-
closeOnSelect: !1,
|
|
246
|
-
listId: "parent"
|
|
247
|
-
}, kt = "calc(var(--chakra-z-index-popover) + 2)", Rt = (n) => {
|
|
248
|
-
const e = D(50), {
|
|
249
|
-
trigger: t,
|
|
250
|
-
items: o,
|
|
251
|
-
searchPlaceholder: i,
|
|
252
|
-
emptyState: s,
|
|
253
|
-
filterItems: l,
|
|
254
|
-
listId: a,
|
|
255
|
-
header: d,
|
|
256
|
-
width: c,
|
|
257
|
-
maxListHeight: h,
|
|
258
|
-
showSearch: p,
|
|
259
|
-
closeOnSelect: m,
|
|
260
|
-
lazyMount: u,
|
|
261
|
-
open: f,
|
|
262
|
-
positioning: v,
|
|
263
|
-
onOpenChange: C,
|
|
264
|
-
onFocusOutside: b,
|
|
265
|
-
contentTestId: J,
|
|
266
|
-
portalled: $,
|
|
267
|
-
parentList: x
|
|
268
|
-
} = n, O = l === void 0 ? yt : l, H = c === void 0 ? "260px" : c, A = h === void 0 ? "18rem" : h, j = p === void 0 ? !0 : p, F = m === void 0 ? !0 : m, N = u === void 0 ? !1 : u, he = $ === void 0 ? !0 : $, U = !!x, [Be, Te] = Ve(!1), [Pe, ke] = Ve(""), [Ge, fe] = Ve("child"), B = Ye(null), G = f ?? Be, ne = U && Ge === "parent", I = Pt(ne, x, {
|
|
269
|
-
items: o,
|
|
270
|
-
filterItems: O,
|
|
271
|
-
showSearch: j,
|
|
272
|
-
searchPlaceholder: i,
|
|
273
|
-
emptyState: s,
|
|
274
|
-
contentTestId: J,
|
|
275
|
-
closeOnSelect: F,
|
|
276
|
-
listId: U ? "child" : a ?? ""
|
|
277
|
-
}), ge = I.filterItems(I.items, Pe), X = Ye(I.listId);
|
|
278
|
-
et(() => {
|
|
279
|
-
if (!G) {
|
|
280
|
-
X.current = I.listId;
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
Mt(X.current, I.listId) && ke(""), X.current = I.listId;
|
|
284
|
-
}, [G, I.listId]);
|
|
285
|
-
let oe;
|
|
286
|
-
e[0] !== I.showSearch || e[1] !== G ? (oe = [G, I.showSearch], e[0] = I.showSearch, e[1] = G, e[2] = oe) : oe = e[2], et(() => {
|
|
287
|
-
if (!G || !I.showSearch)
|
|
288
|
-
return;
|
|
289
|
-
const g = setTimeout(() => B.current?.focus(), 0);
|
|
290
|
-
return () => clearTimeout(g);
|
|
291
|
-
}, oe);
|
|
292
|
-
let pe;
|
|
293
|
-
e[3] !== U || e[4] !== C || e[5] !== f ? (pe = (g) => {
|
|
294
|
-
f === void 0 && Te(g.open), ke(""), g.open && U && fe("child"), C?.(g);
|
|
295
|
-
}, e[3] = U, e[4] = C, e[5] = f, e[6] = pe) : pe = e[6];
|
|
296
|
-
const Re = pe;
|
|
297
|
-
let be;
|
|
298
|
-
e[7] !== ne || e[8] !== x ? (be = (g) => {
|
|
299
|
-
if (!ne || !x)
|
|
300
|
-
return;
|
|
301
|
-
const $e = x.items.find((qe) => qe.id === g.value);
|
|
302
|
-
$e && (x.onSelect?.($e), fe("child"));
|
|
303
|
-
}, e[7] = ne, e[8] = x, e[9] = be) : be = e[9];
|
|
304
|
-
const ve = be, Le = Ot;
|
|
305
|
-
let le;
|
|
306
|
-
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (le = (g) => ({
|
|
307
|
-
id: g.id,
|
|
308
|
-
label: g.label,
|
|
309
|
-
description: g.secondaryLabel,
|
|
310
|
-
icon: Le(g.icon),
|
|
311
|
-
disabled: g.isDisabled,
|
|
312
|
-
tooltip: g.tooltipLabel
|
|
313
|
-
}), e[10] = le) : le = e[10];
|
|
314
|
-
const re = le;
|
|
315
|
-
let Y;
|
|
316
|
-
e[11] !== x ? (Y = x ? /* @__PURE__ */ r(it, { as: "div", role: "menuitem", "aria-label": x.ariaLabel, "aria-disabled": x.disabled || void 0, tabIndex: x.disabled ? -1 : 0, variant: "narrow", px: "0", borderBottomWidth: "1px", borderColor: "border.subtle", flexShrink: 0, onPointerDownCapture: Dt, onClickCapture: (g) => {
|
|
317
|
-
g.stopPropagation(), !x.disabled && fe(Bt);
|
|
318
|
-
}, children: /* @__PURE__ */ r(Fe, { asChild: !0, role: "presentation", variant: "full-width", id: "__parent-toggle", label: x.selectedLabel, icon: Le(x.selectedIcon), disabled: x.disabled, endContent: x.disabled ? void 0 : /* @__PURE__ */ r(Me, { as: lt, boxSize: "14px" }) }) }) : null, e[11] = x, e[12] = Y) : Y = e[12];
|
|
319
|
-
const xe = x ? Y : d, Oe = !!xe && !I.showSearch, me = I.showSearch ? /* @__PURE__ */ r(wt, { inputRef: B, value: Pe, placeholder: I.searchPlaceholder, onValueChange: ke }) : null, W = w, Se = "auto", y = w, Ce = "bg", L = "0", Xe = "0";
|
|
320
|
-
let P;
|
|
321
|
-
e[13] !== Oe ? (P = Oe ? /* @__PURE__ */ r(w.Separator, { margin: "0" }) : null, e[13] = Oe, e[14] = P) : P = e[14];
|
|
322
|
-
const De = ft;
|
|
323
|
-
let T;
|
|
324
|
-
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = {
|
|
325
|
-
overscrollBehavior: "contain"
|
|
326
|
-
}, e[15] = T) : T = e[15];
|
|
327
|
-
const M = "0", we = "0", q = ge.length > 0 ? ge.map((g) => /* @__PURE__ */ r(w.Item, { value: g.id, disabled: g.isDisabled, onClick: g.onSelect, asChild: !0, children: /* @__PURE__ */ r(z, { bg: "transparent", h: "auto", p: "0", _hover: {
|
|
328
|
-
bg: "transparent"
|
|
329
|
-
}, _focus: {
|
|
330
|
-
bg: "transparent"
|
|
331
|
-
}, _active: {
|
|
332
|
-
bg: "transparent"
|
|
333
|
-
}, children: /* @__PURE__ */ r(Fe, { asChild: !0, ...re(g), role: "presentation", variant: g.variant ?? "full-width", isSelected: g.isSelected }) }) }, g.id)) : I.emptyState;
|
|
334
|
-
let K;
|
|
335
|
-
e[16] !== De || e[17] !== I.contentTestId || e[18] !== A || e[19] !== T || e[20] !== q ? (K = /* @__PURE__ */ r(De, { maxH: A, "data-testid": I.contentTestId, viewportProps: T, p: M, gap: we, children: q }), e[16] = De, e[17] = I.contentTestId, e[18] = A, e[19] = T, e[20] = q, e[21] = K) : K = e[21];
|
|
336
|
-
let E;
|
|
337
|
-
e[22] !== xe || e[23] !== me || e[24] !== y.Content || e[25] !== P || e[26] !== K || e[27] !== H ? (E = /* @__PURE__ */ k(y.Content, { w: H, bg: Ce, gap: L, p: Xe, children: [
|
|
338
|
-
xe,
|
|
339
|
-
me,
|
|
340
|
-
P,
|
|
341
|
-
K
|
|
342
|
-
] }), e[22] = xe, e[23] = me, e[24] = y.Content, e[25] = P, e[26] = K, e[27] = H, e[28] = E) : E = e[28];
|
|
343
|
-
let ee;
|
|
344
|
-
e[29] !== W.Positioner || e[30] !== E ? (ee = /* @__PURE__ */ r(W.Positioner, { pointerEvents: Se, children: E }), e[29] = W.Positioner, e[30] = E, e[31] = ee) : ee = e[31];
|
|
345
|
-
const ie = ee, se = U ? ve : void 0;
|
|
346
|
-
let Z;
|
|
347
|
-
e[32] !== t ? (Z = /* @__PURE__ */ r(w.Trigger, { asChild: !0, children: t }), e[32] = t, e[33] = Z) : Z = e[33];
|
|
348
|
-
const Ie = !he;
|
|
349
|
-
let ae;
|
|
350
|
-
e[34] !== ie || e[35] !== he ? (ae = he ? /* @__PURE__ */ r(z, { position: "fixed", inset: "0", pointerEvents: "none", zIndex: kt, children: ie }) : ie, e[34] = ie, e[35] = he, e[36] = ae) : ae = e[36];
|
|
351
|
-
let ce;
|
|
352
|
-
e[37] !== Ie || e[38] !== ae ? (ce = /* @__PURE__ */ r(Ne, { disabled: Ie, children: ae }), e[37] = Ie, e[38] = ae, e[39] = ce) : ce = e[39];
|
|
353
|
-
let te;
|
|
354
|
-
return e[40] !== I.closeOnSelect || e[41] !== Re || e[42] !== N || e[43] !== b || e[44] !== f || e[45] !== v || e[46] !== se || e[47] !== Z || e[48] !== ce ? (te = /* @__PURE__ */ k(w.Root, { lazyMount: N, closeOnSelect: I.closeOnSelect, open: f, positioning: v, onOpenChange: Re, onFocusOutside: b, onSelect: se, children: [
|
|
355
|
-
Z,
|
|
356
|
-
ce
|
|
357
|
-
] }), e[40] = I.closeOnSelect, e[41] = Re, e[42] = N, e[43] = b, e[44] = f, e[45] = v, e[46] = se, e[47] = Z, e[48] = ce, e[49] = te) : te = e[49], te;
|
|
358
|
-
};
|
|
359
|
-
function Ot(n) {
|
|
360
|
-
return n ? /* @__PURE__ */ r(Me, { as: n, boxSize: "14px" }) : void 0;
|
|
361
|
-
}
|
|
362
|
-
function Dt(n) {
|
|
363
|
-
return n.stopPropagation();
|
|
364
|
-
}
|
|
365
|
-
function Bt(n) {
|
|
366
|
-
return n === "child" ? "parent" : "child";
|
|
367
|
-
}
|
|
368
|
-
const Tt = (n) => {
|
|
369
|
-
const e = D(14), {
|
|
370
|
-
action: t
|
|
371
|
-
} = n;
|
|
372
|
-
let o;
|
|
373
|
-
e[0] !== t.menuItems ? (o = t.menuItems ?? [], e[0] = t.menuItems, e[1] = o) : o = e[1];
|
|
374
|
-
let i;
|
|
375
|
-
e[2] !== o ? (i = o.map(Wt), e[2] = o, e[3] = i) : i = e[3];
|
|
376
|
-
const s = i;
|
|
377
|
-
let l;
|
|
378
|
-
e[4] !== t.icon || e[5] !== t.label ? (l = /* @__PURE__ */ r(Je, { variant: "ghost", size: "2xs", "aria-label": t.label, children: t.icon }), e[4] = t.icon, e[5] = t.label, e[6] = l) : l = e[6];
|
|
379
|
-
const a = t.searchPlaceholder ?? "Search...", d = t.emptyMenuLabel ?? "No results found";
|
|
380
|
-
let c;
|
|
381
|
-
e[7] !== d ? (c = /* @__PURE__ */ r(w.Item, { value: "empty", asChild: !0, children: /* @__PURE__ */ r(Fe, { asChild: !0, variant: "full-width", label: d, disabled: !0 }) }), e[7] = d, e[8] = c) : c = e[8];
|
|
382
|
-
let h;
|
|
383
|
-
return e[9] !== s || e[10] !== l || e[11] !== a || e[12] !== c ? (h = /* @__PURE__ */ r(Rt, { trigger: l, items: s, searchPlaceholder: a, emptyState: c, onFocusOutside: Lt }), e[9] = s, e[10] = l, e[11] = a, e[12] = c, e[13] = h) : h = e[13], h;
|
|
384
|
-
};
|
|
385
|
-
function Wt(n) {
|
|
386
|
-
return {
|
|
387
|
-
id: n.id,
|
|
388
|
-
label: n.label,
|
|
389
|
-
searchText: [n.label, n.description].filter(Boolean).join(" "),
|
|
390
|
-
tooltipLabel: n.description,
|
|
391
|
-
variant: "full-width",
|
|
392
|
-
onSelect: () => n.onAction?.()
|
|
393
|
-
};
|
|
394
|
-
}
|
|
395
|
-
function Lt(n) {
|
|
396
|
-
return n.preventDefault();
|
|
397
|
-
}
|
|
398
|
-
const tt = (n, e) => n.tooltip ? /* @__PURE__ */ r(Qe, { content: n.tooltip, openDelay: 300, children: e }, n.id) : /* @__PURE__ */ r(Ke, { children: e }, n.id), $t = (n) => {
|
|
399
|
-
const e = D(11), {
|
|
400
|
-
actions: t,
|
|
401
|
-
alwaysVisible: o,
|
|
402
|
-
context: i
|
|
403
|
-
} = n, s = o === void 0 ? !1 : o;
|
|
404
|
-
if (t.length === 0)
|
|
405
|
-
return null;
|
|
406
|
-
const l = s ? "1" : "0", a = s ? "auto" : "none";
|
|
407
|
-
let d, c;
|
|
408
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
409
|
-
opacity: "1",
|
|
410
|
-
pointerEvents: "auto"
|
|
411
|
-
}, c = {
|
|
412
|
-
opacity: "1",
|
|
413
|
-
pointerEvents: "auto"
|
|
414
|
-
}, e[0] = d, e[1] = c) : (d = e[0], c = e[1]);
|
|
415
|
-
let h;
|
|
416
|
-
if (e[2] !== t || e[3] !== i) {
|
|
417
|
-
let m;
|
|
418
|
-
e[5] !== i ? (m = (u) => u.menuItems && u.menuItems.length >= 8 ? /* @__PURE__ */ r(Tt, { action: u }, u.id) : u.menuItems && u.menuItems.length > 0 ? tt(u, /* @__PURE__ */ k(w.Root, { children: [
|
|
419
|
-
/* @__PURE__ */ r(w.Trigger, { asChild: !0, children: /* @__PURE__ */ r(Je, { variant: "ghost", size: "2xs", "aria-label": u.label, children: u.icon }) }),
|
|
420
|
-
/* @__PURE__ */ r(Ne, { children: /* @__PURE__ */ r(w.Positioner, { children: /* @__PURE__ */ r(w.Content, { minW: "160px", bg: "bg", children: u.menuItems.map(At) }) }) })
|
|
421
|
-
] })) : tt(u, /* @__PURE__ */ r(Je, { variant: "ghost", size: "2xs", "aria-label": u.label, onClick: (f) => {
|
|
422
|
-
f.stopPropagation(), u.onAction?.(i);
|
|
423
|
-
}, children: u.icon })), e[5] = i, e[6] = m) : m = e[6], h = t.map(m), e[2] = t, e[3] = i, e[4] = h;
|
|
424
|
-
} else
|
|
425
|
-
h = e[4];
|
|
426
|
-
let p;
|
|
427
|
-
return e[7] !== l || e[8] !== a || e[9] !== h ? (p = /* @__PURE__ */ r(ue, { gap: "0", opacity: l, pointerEvents: a, _groupHover: d, _groupFocusWithin: c, transition: "opacity 120ms ease", onClick: Ht, children: h }), e[7] = l, e[8] = a, e[9] = h, e[10] = p) : p = e[10], p;
|
|
428
|
-
};
|
|
429
|
-
function Ht(n) {
|
|
430
|
-
return n.stopPropagation();
|
|
431
|
-
}
|
|
432
|
-
function At(n) {
|
|
433
|
-
return /* @__PURE__ */ k(Ke, { children: [
|
|
434
|
-
n.separatorBefore ? /* @__PURE__ */ r(w.Separator, {}) : null,
|
|
435
|
-
/* @__PURE__ */ r(Qe, { content: n.description, disabled: !n.description, openDelay: 300, children: /* @__PURE__ */ r(w.Item, { value: n.id, disabled: n.disabled || n.readOnly, onClick: () => {
|
|
436
|
-
n.readOnly || n.onAction?.();
|
|
437
|
-
}, children: /* @__PURE__ */ k(ue, { gap: "2", minW: "0", w: "full", justify: "space-between", children: [
|
|
438
|
-
/* @__PURE__ */ k(ue, { gap: "2", minW: "0", children: [
|
|
439
|
-
n.icon ? /* @__PURE__ */ r(z, { children: n.icon }) : null,
|
|
440
|
-
/* @__PURE__ */ r(z, { minW: "0", children: n.label })
|
|
441
|
-
] }),
|
|
442
|
-
n.endContent ? /* @__PURE__ */ r(z, { flexShrink: 0, children: n.endContent }) : null
|
|
443
|
-
] }) }) })
|
|
444
|
-
] }, n.id);
|
|
445
|
-
}
|
|
446
|
-
const Et = (n, e = !0) => {
|
|
447
|
-
const t = n.contextMenuItems ?? [];
|
|
448
|
-
if (t.length === 0 || !e) return n.actions ?? [];
|
|
449
|
-
const o = n.actions?.flatMap((l) => l.menuItems?.length ? l.menuItems : [{
|
|
450
|
-
id: l.id,
|
|
451
|
-
label: l.label,
|
|
452
|
-
icon: l.icon,
|
|
453
|
-
onAction: () => l.onAction?.({
|
|
454
|
-
nodeId: n.id
|
|
455
|
-
})
|
|
456
|
-
}]) ?? [], i = new Set(o.map((l) => l.id)), s = t.filter((l) => !i.has(l.id)).map((l, a) => ({
|
|
457
|
-
...l,
|
|
458
|
-
separatorBefore: l.separatorBefore || a === 0 && o.length > 0
|
|
459
|
-
}));
|
|
460
|
-
return [{
|
|
461
|
-
id: "resource-actions",
|
|
462
|
-
label: "Resource actions",
|
|
463
|
-
icon: /* @__PURE__ */ r(Me, { as: lt, boxSize: "14px" }),
|
|
464
|
-
menuItems: [...o, ...s]
|
|
465
|
-
}];
|
|
466
|
-
}, zt = (n) => n.isEmptyStateVariant ? "fg.menu-item.secondary" : n.isDisabled ? "fg.muted" : n.tone === "danger" ? "red.500" : "fg", _t = (n) => {
|
|
467
|
-
const e = D(7), {
|
|
468
|
-
label: t,
|
|
469
|
-
textStyle: o,
|
|
470
|
-
color: i
|
|
471
|
-
} = n;
|
|
472
|
-
if (typeof t == "string") {
|
|
473
|
-
let l;
|
|
474
|
-
return e[0] !== i || e[1] !== t || e[2] !== o ? (l = /* @__PURE__ */ r(je, { textStyle: o, color: i, truncate: !0, children: t }), e[0] = i, e[1] = t, e[2] = o, e[3] = l) : l = e[3], l;
|
|
475
|
-
}
|
|
476
|
-
let s;
|
|
477
|
-
return e[4] !== i || e[5] !== t ? (s = /* @__PURE__ */ r(z, { minW: "0", maxW: "full", overflow: "hidden", color: i, children: t }), e[4] = i, e[5] = t, e[6] = s) : s = e[6], s;
|
|
478
|
-
}, Vt = (n) => {
|
|
479
|
-
const e = D(8), {
|
|
480
|
-
description: t,
|
|
481
|
-
textStyle: o,
|
|
482
|
-
color: i,
|
|
483
|
-
marginLeft: s
|
|
484
|
-
} = n;
|
|
485
|
-
if (!t)
|
|
486
|
-
return null;
|
|
487
|
-
if (typeof t == "string") {
|
|
488
|
-
let a;
|
|
489
|
-
return e[0] !== i || e[1] !== t || e[2] !== s || e[3] !== o ? (a = /* @__PURE__ */ r(je, { ml: s, textStyle: o, color: i, truncate: !0, children: t }), e[0] = i, e[1] = t, e[2] = s, e[3] = o, e[4] = a) : a = e[4], a;
|
|
490
|
-
}
|
|
491
|
-
let l;
|
|
492
|
-
return e[5] !== t || e[6] !== s ? (l = /* @__PURE__ */ r(z, { ml: s, minW: "0", maxW: "full", overflow: "hidden", children: t }), e[5] = t, e[6] = s, e[7] = l) : l = e[7], l;
|
|
493
|
-
}, jt = (n) => {
|
|
494
|
-
const e = D(33), {
|
|
495
|
-
item: t,
|
|
496
|
-
isExpanded: o,
|
|
497
|
-
showChevron: i,
|
|
498
|
-
isDisabled: s,
|
|
499
|
-
variant: l,
|
|
500
|
-
tone: a
|
|
501
|
-
} = n, d = l === "empty-state", c = l === "compact" || l === "collection" || l === "full-width" || l === "tree" || d, h = c ? "label/S/regular" : "label/M/regular", p = c ? "label/XS" : "label/S/regular", m = c ? "0" : "2px", u = l === "tree" || l === "collection" ? "16px" : "14px", f = l === "collection" ? "compact" : l === "tree" ? "1" : "2";
|
|
502
|
-
let v;
|
|
503
|
-
e[0] !== s || e[1] !== d || e[2] !== a ? (v = zt({
|
|
504
|
-
isEmptyStateVariant: d,
|
|
505
|
-
isDisabled: s,
|
|
506
|
-
tone: a
|
|
507
|
-
}), e[0] = s, e[1] = d, e[2] = a, e[3] = v) : v = e[3];
|
|
508
|
-
const C = v, b = t.iconColor ?? (a === "danger" ? "red.500" : "fg.muted"), J = a === "danger" ? "red.400" : "fg.menu-item.secondary";
|
|
509
|
-
let $;
|
|
510
|
-
e[4] !== o || e[5] !== i ? ($ = i ? /* @__PURE__ */ r(z, { color: "fg.muted", flexShrink: 0, display: "flex", alignItems: "center", children: /* @__PURE__ */ r(Me, { as: ht, boxSize: "12px", transform: o ? "rotate(90deg)" : "rotate(0deg)", transition: "transform 120ms ease" }) }) : null, e[4] = o, e[5] = i, e[6] = $) : $ = e[6];
|
|
511
|
-
let x;
|
|
512
|
-
e[7] !== b || e[8] !== u || e[9] !== t.icon ? (x = t.icon ? /* @__PURE__ */ r(z, { color: b, flexShrink: 0, display: "inline-flex", alignItems: "center", justifyContent: "center", boxSize: u, fontSize: u, lineHeight: "1", css: {
|
|
513
|
-
"& > svg": {
|
|
514
|
-
width: u,
|
|
515
|
-
height: u
|
|
516
|
-
}
|
|
517
|
-
}, children: t.icon }) : null, e[7] = b, e[8] = u, e[9] = t.icon, e[10] = x) : x = e[10];
|
|
518
|
-
let O;
|
|
519
|
-
e[11] !== t.indicator ? (O = t.indicator ? /* @__PURE__ */ r(Qe, { content: t.indicator.tooltip, disabled: !t.indicator.tooltip, openDelay: 300, children: /* @__PURE__ */ r(z, { color: t.indicator.color ?? "fg.muted", flexShrink: 0, children: t.indicator.icon }) }) : null, e[11] = t.indicator, e[12] = O) : O = e[12];
|
|
520
|
-
let H;
|
|
521
|
-
e[13] !== t.label || e[14] !== C || e[15] !== h ? (H = /* @__PURE__ */ r(_t, { label: t.label, textStyle: h, color: C }), e[13] = t.label, e[14] = C, e[15] = h, e[16] = H) : H = e[16];
|
|
522
|
-
let A;
|
|
523
|
-
e[17] !== f || e[18] !== x || e[19] !== O || e[20] !== H ? (A = /* @__PURE__ */ k(ue, { gap: f, minW: "0", alignItems: "center", children: [
|
|
524
|
-
x,
|
|
525
|
-
O,
|
|
526
|
-
H
|
|
527
|
-
] }), e[17] = f, e[18] = x, e[19] = O, e[20] = H, e[21] = A) : A = e[21];
|
|
528
|
-
let j;
|
|
529
|
-
e[22] !== J || e[23] !== m || e[24] !== p || e[25] !== t.description ? (j = /* @__PURE__ */ r(Vt, { description: t.description, textStyle: p, color: J, marginLeft: m }), e[22] = J, e[23] = m, e[24] = p, e[25] = t.description, e[26] = j) : j = e[26];
|
|
530
|
-
let F;
|
|
531
|
-
e[27] !== A || e[28] !== j ? (F = /* @__PURE__ */ k(ot, { gap: "0", minW: "0", flex: "1", children: [
|
|
532
|
-
A,
|
|
533
|
-
j
|
|
534
|
-
] }), e[27] = A, e[28] = j, e[29] = F) : F = e[29];
|
|
535
|
-
let N;
|
|
536
|
-
return e[30] !== $ || e[31] !== F ? (N = /* @__PURE__ */ k(ue, { gap: "2", minW: "0", flex: "1", overflow: "hidden", alignItems: "center", children: [
|
|
537
|
-
$,
|
|
538
|
-
F
|
|
539
|
-
] }), e[30] = $, e[31] = F, e[32] = N) : N = e[32], N;
|
|
540
|
-
}, Ft = (n) => {
|
|
541
|
-
const e = D(21), {
|
|
542
|
-
item: t,
|
|
543
|
-
isDisabled: o,
|
|
544
|
-
isExpanded: i,
|
|
545
|
-
showChevron: s,
|
|
546
|
-
tone: l,
|
|
547
|
-
variant: a,
|
|
548
|
-
showContextMenuTrigger: d
|
|
549
|
-
} = n, c = l === void 0 ? "default" : l, h = a === void 0 ? "default" : a;
|
|
550
|
-
let p;
|
|
551
|
-
e[0] !== t || e[1] !== d ? (p = Et(t, d), e[0] = t, e[1] = d, e[2] = p) : p = e[2];
|
|
552
|
-
const m = p;
|
|
553
|
-
let u;
|
|
554
|
-
e[3] !== o || e[4] !== i || e[5] !== t || e[6] !== s || e[7] !== c || e[8] !== h ? (u = /* @__PURE__ */ r(jt, { item: t, isExpanded: i, showChevron: s, isDisabled: o, tone: c, variant: h }), e[3] = o, e[4] = i, e[5] = t, e[6] = s, e[7] = c, e[8] = h, e[9] = u) : u = e[9];
|
|
555
|
-
let f;
|
|
556
|
-
e[10] !== t.endContent ? (f = t.endContent ? /* @__PURE__ */ r(z, { flexShrink: 0, color: "fg.muted", display: "flex", alignItems: "center", children: t.endContent }) : null, e[10] = t.endContent, e[11] = f) : f = e[11];
|
|
557
|
-
let v;
|
|
558
|
-
e[12] !== m || e[13] !== t.contextMenuItems?.length || e[14] !== t.id || e[15] !== d ? (v = m.length > 0 ? /* @__PURE__ */ r($t, { actions: m, context: {
|
|
559
|
-
nodeId: t.id
|
|
560
|
-
}, alwaysVisible: d && (t.contextMenuItems?.length ?? 0) > 0 }) : null, e[12] = m, e[13] = t.contextMenuItems?.length, e[14] = t.id, e[15] = d, e[16] = v) : v = e[16];
|
|
561
|
-
let C;
|
|
562
|
-
return e[17] !== u || e[18] !== f || e[19] !== v ? (C = /* @__PURE__ */ k(nt, { children: [
|
|
563
|
-
u,
|
|
564
|
-
f,
|
|
565
|
-
v
|
|
566
|
-
] }), e[17] = u, e[18] = f, e[19] = v, e[20] = C) : C = e[20], C;
|
|
567
|
-
}, Nt = (n) => {
|
|
568
|
-
if (!(n <= 0))
|
|
569
|
-
return `calc(var(--chakra-spacing-1) + ${n} * 12px)`;
|
|
570
|
-
}, Kt = (n) => n === "compact" || n === "full-width" || n === "empty-state", Qt = (n, e) => n === "collection" && !e ? {
|
|
571
|
-
rowHeight: "collection-row",
|
|
572
|
-
minHeight: void 0
|
|
573
|
-
} : Kt(n) && !e ? {
|
|
574
|
-
rowHeight: "1.75rem",
|
|
575
|
-
minHeight: void 0
|
|
576
|
-
} : {
|
|
577
|
-
rowHeight: "auto",
|
|
578
|
-
minHeight: n === "default" ? "2.25rem" : "1.75rem"
|
|
579
|
-
}, Gt = (n) => ({
|
|
580
|
-
bg: n.isSelected ? n.selectedBg : "transparent",
|
|
581
|
-
_hover: n.variant === "empty-state" ? {
|
|
582
|
-
bg: "transparent"
|
|
583
|
-
} : n.isSelected ? {
|
|
584
|
-
bg: n.selectedBg
|
|
585
|
-
} : n.tone === "danger" ? {
|
|
586
|
-
outline: "1px solid",
|
|
587
|
-
outlineColor: "red.500",
|
|
588
|
-
outlineOffset: "-1px"
|
|
589
|
-
} : {
|
|
590
|
-
bg: n.hoverBg
|
|
591
|
-
},
|
|
592
|
-
_active: n.variant === "empty-state" ? {
|
|
593
|
-
bg: "transparent"
|
|
594
|
-
} : {
|
|
595
|
-
bg: n.selectedBg
|
|
596
|
-
}
|
|
597
|
-
}), Xt = (n) => ({
|
|
598
|
-
...n.rootProps,
|
|
599
|
-
role: n.rowRole,
|
|
600
|
-
"aria-selected": n.rootProps["aria-selected"] ?? (n.rowRole === "option" ? n.isSelected : void 0),
|
|
601
|
-
"aria-expanded": n.showChevron ? n.isExpanded : void 0,
|
|
602
|
-
className: n.className ? `group ${n.className}` : "group",
|
|
603
|
-
width: "full",
|
|
604
|
-
minWidth: "0",
|
|
605
|
-
maxWidth: "full",
|
|
606
|
-
height: n.rowHeight,
|
|
607
|
-
minHeight: n.minHeight,
|
|
608
|
-
display: "flex",
|
|
609
|
-
alignItems: "center",
|
|
610
|
-
justifyContent: "space-between",
|
|
611
|
-
gap: "xs",
|
|
612
|
-
px: "sm",
|
|
613
|
-
py: n.verticalPadding,
|
|
614
|
-
pl: n.paddingLeft,
|
|
615
|
-
borderRadius: n.variant === "full-width" || n.variant === "collection" ? "0" : "xs",
|
|
616
|
-
...Gt({
|
|
617
|
-
...n
|
|
618
|
-
}),
|
|
619
|
-
cursor: n.variant === "empty-state" ? "default" : n.isDisabled ? "not-allowed" : "pointer",
|
|
620
|
-
overflow: "hidden",
|
|
621
|
-
textAlign: "left",
|
|
622
|
-
color: "inherit",
|
|
623
|
-
textDecoration: "none"
|
|
624
|
-
}), Fe = dt((n, e) => {
|
|
625
|
-
const t = D(108), {
|
|
626
|
-
id: o,
|
|
627
|
-
label: i,
|
|
628
|
-
description: s,
|
|
629
|
-
icon: l,
|
|
630
|
-
iconColor: a,
|
|
631
|
-
indicator: d,
|
|
632
|
-
endContent: c,
|
|
633
|
-
tooltip: h,
|
|
634
|
-
disabled: p,
|
|
635
|
-
isContainer: m,
|
|
636
|
-
isNavigable: u,
|
|
637
|
-
href: f,
|
|
638
|
-
navigationIntent: v,
|
|
639
|
-
menuItems: C,
|
|
640
|
-
menuPlacement: b,
|
|
641
|
-
contextMenuItems: J,
|
|
642
|
-
actions: $,
|
|
643
|
-
children: x,
|
|
644
|
-
onActivate: O,
|
|
645
|
-
depth: H,
|
|
646
|
-
isSelected: A,
|
|
647
|
-
isExpanded: j,
|
|
648
|
-
showExpandToggle: F,
|
|
649
|
-
showContextMenuTrigger: N,
|
|
650
|
-
variant: he,
|
|
651
|
-
tone: U,
|
|
652
|
-
selectedBg: Be,
|
|
653
|
-
hoverBg: Te,
|
|
654
|
-
asChild: Pe,
|
|
655
|
-
className: ke,
|
|
656
|
-
role: Ge,
|
|
657
|
-
onToggleExpand: fe,
|
|
658
|
-
onPointerMove: B,
|
|
659
|
-
draggable: G,
|
|
660
|
-
onDragStart: ne,
|
|
661
|
-
onDragOver: We,
|
|
662
|
-
onDragEnd: I,
|
|
663
|
-
onDrop: ge,
|
|
664
|
-
onClick: X,
|
|
665
|
-
onKeyDown: oe,
|
|
666
|
-
...pe
|
|
667
|
-
} = n, Re = H === void 0 ? 0 : H, be = A === void 0 ? !1 : A, ve = j === void 0 ? !1 : j, Le = F === void 0 ? !1 : F, le = N === void 0 ? !0 : N, re = he === void 0 ? "default" : he, Y = U === void 0 ? "default" : U, Ue = Be === void 0 ? "bg.active" : Be, xe = Te === void 0 ? "bg.hover" : Te, Oe = Pe === void 0 ? !1 : Pe, [me, W] = Ve(!1);
|
|
668
|
-
let Se;
|
|
669
|
-
t[0] !== $ || t[1] !== x || t[2] !== J || t[3] !== s || t[4] !== p || t[5] !== c || t[6] !== f || t[7] !== l || t[8] !== a || t[9] !== o || t[10] !== d || t[11] !== m || t[12] !== u || t[13] !== i || t[14] !== C || t[15] !== b || t[16] !== v || t[17] !== O || t[18] !== h ? (Se = {
|
|
670
|
-
id: o,
|
|
671
|
-
label: i,
|
|
672
|
-
description: s,
|
|
673
|
-
icon: l,
|
|
674
|
-
iconColor: a,
|
|
675
|
-
indicator: d,
|
|
676
|
-
endContent: c,
|
|
677
|
-
tooltip: h,
|
|
678
|
-
disabled: p,
|
|
679
|
-
isContainer: m,
|
|
680
|
-
isNavigable: u,
|
|
681
|
-
href: f,
|
|
682
|
-
navigationIntent: v,
|
|
683
|
-
menuItems: C,
|
|
684
|
-
menuPlacement: b,
|
|
685
|
-
contextMenuItems: J,
|
|
686
|
-
actions: $,
|
|
687
|
-
children: x,
|
|
688
|
-
onActivate: O
|
|
689
|
-
}, t[0] = $, t[1] = x, t[2] = J, t[3] = s, t[4] = p, t[5] = c, t[6] = f, t[7] = l, t[8] = a, t[9] = o, t[10] = d, t[11] = m, t[12] = u, t[13] = i, t[14] = C, t[15] = b, t[16] = v, t[17] = O, t[18] = h, t[19] = Se) : Se = t[19];
|
|
690
|
-
const y = Se;
|
|
691
|
-
let Ce;
|
|
692
|
-
t[20] !== G || t[21] !== I || t[22] !== We || t[23] !== ne || t[24] !== ge ? (Ce = {
|
|
693
|
-
draggable: G,
|
|
694
|
-
onDragStart: ne,
|
|
695
|
-
onDragOver: We,
|
|
696
|
-
onDragEnd: I,
|
|
697
|
-
onDrop: ge
|
|
698
|
-
}, t[20] = G, t[21] = I, t[22] = We, t[23] = ne, t[24] = ge, t[25] = Ce) : Ce = t[25];
|
|
699
|
-
const L = Ce, Xe = (y.children?.length ?? 0) > 0 || y.isContainer === !0, P = (y.menuItems?.length ?? 0) > 0, De = (y.actions?.length ?? 0) > 0 || (y.contextMenuItems?.length ?? 0) > 0, T = Le && Xe, M = y.disabled === !0;
|
|
700
|
-
let we;
|
|
701
|
-
t[26] !== P || t[27] !== M || t[28] !== y || t[29] !== O || t[30] !== fe || t[31] !== T ? (we = () => {
|
|
702
|
-
if (!M && !P) {
|
|
703
|
-
if (T) {
|
|
704
|
-
fe?.();
|
|
705
|
-
return;
|
|
706
|
-
}
|
|
707
|
-
if (O) {
|
|
708
|
-
O();
|
|
709
|
-
return;
|
|
710
|
-
}
|
|
711
|
-
y.onActivate?.();
|
|
712
|
-
}
|
|
713
|
-
}, t[26] = P, t[27] = M, t[28] = y, t[29] = O, t[30] = fe, t[31] = T, t[32] = we) : we = t[32];
|
|
714
|
-
const q = we;
|
|
715
|
-
let K;
|
|
716
|
-
t[33] !== q || t[34] !== M || t[35] !== X ? (K = (S) => {
|
|
717
|
-
if (X?.(S), !S.defaultPrevented) {
|
|
718
|
-
if (M) {
|
|
719
|
-
S.preventDefault();
|
|
720
|
-
return;
|
|
721
|
-
}
|
|
722
|
-
q();
|
|
723
|
-
}
|
|
724
|
-
}, t[33] = q, t[34] = M, t[35] = X, t[36] = K) : K = t[36];
|
|
725
|
-
const E = K;
|
|
726
|
-
let ee;
|
|
727
|
-
t[37] !== M || t[38] !== X || t[39] !== W ? (ee = (S) => {
|
|
728
|
-
if (X?.(S), !S.defaultPrevented) {
|
|
729
|
-
if (M) {
|
|
730
|
-
S.preventDefault();
|
|
731
|
-
return;
|
|
732
|
-
}
|
|
733
|
-
W(qt);
|
|
734
|
-
}
|
|
735
|
-
}, t[37] = M, t[38] = X, t[39] = W, t[40] = ee) : ee = t[40];
|
|
736
|
-
const ie = ee;
|
|
737
|
-
let se;
|
|
738
|
-
t[41] !== q || t[42] !== P || t[43] !== M || t[44] !== oe || t[45] !== W ? (se = (S) => {
|
|
739
|
-
if (oe?.(S), !S.defaultPrevented && !(S.key !== "Enter" && S.key !== " ") && (S.preventDefault(), !M)) {
|
|
740
|
-
if (P) {
|
|
741
|
-
W(Zt);
|
|
742
|
-
return;
|
|
743
|
-
}
|
|
744
|
-
q();
|
|
745
|
-
}
|
|
746
|
-
}, t[41] = q, t[42] = P, t[43] = M, t[44] = oe, t[45] = W, t[46] = se) : se = t[46];
|
|
747
|
-
const Z = se, Ie = y.description !== void 0, ae = Nt(Re), ce = re === "default" || Ie ? "xs" : "2xs";
|
|
748
|
-
let te;
|
|
749
|
-
t[47] !== E || t[48] !== ie || t[49] !== P ? (te = P ? {
|
|
750
|
-
onClick: ie
|
|
751
|
-
} : {
|
|
752
|
-
onClick: E
|
|
753
|
-
}, t[47] = E, t[48] = ie, t[49] = P, t[50] = te) : te = t[50];
|
|
754
|
-
const g = te, {
|
|
755
|
-
rowHeight: $e,
|
|
756
|
-
minHeight: qe
|
|
757
|
-
} = Qt(re, Ie), de = Xt({
|
|
758
|
-
rootProps: pe,
|
|
759
|
-
rowRole: Ge ?? (P ? "button" : "option"),
|
|
760
|
-
className: ke,
|
|
761
|
-
isSelected: be,
|
|
762
|
-
isExpanded: ve,
|
|
763
|
-
showChevron: T,
|
|
764
|
-
rowHeight: $e,
|
|
765
|
-
minHeight: qe,
|
|
766
|
-
verticalPadding: ce,
|
|
767
|
-
paddingLeft: ae,
|
|
768
|
-
selectedBg: Ue,
|
|
769
|
-
hoverBg: xe,
|
|
770
|
-
tone: Y,
|
|
771
|
-
isDisabled: M,
|
|
772
|
-
variant: re
|
|
773
|
-
});
|
|
774
|
-
let He;
|
|
775
|
-
t[51] !== M || t[52] !== ve || t[53] !== y || t[54] !== T || t[55] !== le || t[56] !== Y || t[57] !== re ? (He = /* @__PURE__ */ r(Ft, { item: y, isExpanded: ve, showChevron: T, isDisabled: M, tone: Y, variant: re, showContextMenuTrigger: le }), t[51] = M, t[52] = ve, t[53] = y, t[54] = T, t[55] = le, t[56] = Y, t[57] = re, t[58] = He) : He = t[58];
|
|
776
|
-
const _ = He;
|
|
777
|
-
let Ae;
|
|
778
|
-
t[59] !== y || t[60] !== me || t[61] !== W ? (Ae = (S) => /* @__PURE__ */ r(xt, { item: y, menuOpen: me, onMenuOpenChange: W, onMenuSelect: (R) => {
|
|
779
|
-
W(!1), R.onAction?.();
|
|
780
|
-
}, children: S }), t[59] = y, t[60] = me, t[61] = W, t[62] = Ae) : Ae = t[62];
|
|
781
|
-
const V = Ae;
|
|
782
|
-
if (Oe) {
|
|
783
|
-
let S;
|
|
784
|
-
t[63] !== g || t[64] !== _ || t[65] !== L || t[66] !== B || t[67] !== e || t[68] !== de ? (S = /* @__PURE__ */ r(_e.div, { ref: e, ...de, ...L, ...g, onPointerMove: B, children: _ }), t[63] = g, t[64] = _, t[65] = L, t[66] = B, t[67] = e, t[68] = de, t[69] = S) : S = t[69];
|
|
785
|
-
let R;
|
|
786
|
-
return t[70] !== S || t[71] !== V ? (R = V(S), t[70] = S, t[71] = V, t[72] = R) : R = t[72], R;
|
|
787
|
-
}
|
|
788
|
-
if (y.href && !T && !M && !P) {
|
|
789
|
-
const S = de;
|
|
790
|
-
let R;
|
|
791
|
-
t[73] !== _ || t[74] !== L || t[75] !== E || t[76] !== y.href || t[77] !== B || t[78] !== e || t[79] !== S ? (R = /* @__PURE__ */ r(_e.a, { ref: e, href: y.href, ...S, ...L, onClick: E, onPointerMove: B, children: _ }), t[73] = _, t[74] = L, t[75] = E, t[76] = y.href, t[77] = B, t[78] = e, t[79] = S, t[80] = R) : R = t[80];
|
|
792
|
-
let Q;
|
|
793
|
-
return t[81] !== R || t[82] !== V ? (Q = V(R), t[81] = R, t[82] = V, t[83] = Q) : Q = t[83], Q;
|
|
794
|
-
}
|
|
795
|
-
if (De) {
|
|
796
|
-
const S = M || void 0, R = pe.tabIndex ?? 0;
|
|
797
|
-
let Q;
|
|
798
|
-
t[84] !== g || t[85] !== _ || t[86] !== L || t[87] !== Z || t[88] !== B || t[89] !== e || t[90] !== de || t[91] !== S || t[92] !== R ? (Q = /* @__PURE__ */ r(_e.div, { ref: e, "aria-disabled": S, ...de, ...L, ...g, tabIndex: R, onKeyDown: Z, onPointerMove: B, children: _ }), t[84] = g, t[85] = _, t[86] = L, t[87] = Z, t[88] = B, t[89] = e, t[90] = de, t[91] = S, t[92] = R, t[93] = Q) : Q = t[93];
|
|
799
|
-
let ze;
|
|
800
|
-
return t[94] !== Q || t[95] !== V ? (ze = V(Q), t[94] = Q, t[95] = V, t[96] = ze) : ze = t[96], ze;
|
|
801
|
-
}
|
|
802
|
-
const Ze = de;
|
|
803
|
-
let ye;
|
|
804
|
-
t[97] !== g || t[98] !== _ || t[99] !== L || t[100] !== M || t[101] !== B || t[102] !== e || t[103] !== Ze ? (ye = /* @__PURE__ */ r(_e.button, { ref: e, type: "button", disabled: M, ...Ze, ...L, ...g, onPointerMove: B, children: _ }), t[97] = g, t[98] = _, t[99] = L, t[100] = M, t[101] = B, t[102] = e, t[103] = Ze, t[104] = ye) : ye = t[104];
|
|
805
|
-
let Ee;
|
|
806
|
-
return t[105] !== ye || t[106] !== V ? (Ee = V(ye), t[105] = ye, t[106] = V, t[107] = Ee) : Ee = t[107], Ee;
|
|
807
|
-
});
|
|
808
|
-
function qt(n) {
|
|
809
|
-
return !n;
|
|
810
|
-
}
|
|
811
|
-
function Zt(n) {
|
|
812
|
-
return !n;
|
|
813
|
-
}
|
|
814
|
-
export {
|
|
815
|
-
it as H,
|
|
816
|
-
Fe as L,
|
|
817
|
-
pt as R,
|
|
818
|
-
Tt as S,
|
|
819
|
-
wt as a,
|
|
820
|
-
ln as b,
|
|
821
|
-
Rt as c
|
|
822
|
-
};
|
|
823
|
-
//# sourceMappingURL=list-row-BYWwcbGK.js.map
|