@pstdio/ui 0.39.0 → 0.41.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.
Files changed (82) hide show
  1. package/dist/{MermaidComponent-81jr28u4.js → MermaidComponent-BCiI63_G.js} +3 -3
  2. package/dist/{MermaidComponent-81jr28u4.js.map → MermaidComponent-BCiI63_G.js.map} +1 -1
  3. package/dist/chat-question-bubble-w2vMbFsS.js +68 -0
  4. package/dist/chat-question-bubble-w2vMbFsS.js.map +1 -0
  5. package/dist/chat-ui.d.ts +94 -17
  6. package/dist/chat-ui.js +2240 -1476
  7. package/dist/chat-ui.js.map +1 -1
  8. package/dist/{data-table-stats-row-CpRe_xK2.js → data-table-stats-row-EiTEONdY.js} +2 -2
  9. package/dist/{data-table-stats-row-CpRe_xK2.js.map → data-table-stats-row-EiTEONdY.js.map} +1 -1
  10. package/dist/data-table.d.ts +27 -7
  11. package/dist/data-table.js +1035 -872
  12. package/dist/data-table.js.map +1 -1
  13. package/dist/diff-bubble-DewUd_2w.js +61 -0
  14. package/dist/diff-bubble-DewUd_2w.js.map +1 -0
  15. package/dist/{diff-drawer-45rpk3aq.js → diff-drawer-BwZBOObe.js} +106 -85
  16. package/dist/diff-drawer-BwZBOObe.js.map +1 -0
  17. package/dist/diff-viewer-kOOd7C7h.js +574 -0
  18. package/dist/diff-viewer-kOOd7C7h.js.map +1 -0
  19. package/dist/diff.d.ts +11 -0
  20. package/dist/diff.js +107 -98
  21. package/dist/diff.js.map +1 -1
  22. package/dist/display-sort-control-DPxc0e5z.js +587 -0
  23. package/dist/display-sort-control-DPxc0e5z.js.map +1 -0
  24. package/dist/{workspace-badge-Brm3Xr3m.d.ts → host-storage-DP0RLj4i.d.ts} +15 -1
  25. package/dist/{index-BfFLdci8.d.ts → index-C9mywhyX.d.ts} +49 -13
  26. package/dist/index-D3UJyWWh.d.ts +501 -0
  27. package/dist/index.d.ts +38 -13
  28. package/dist/index.js +941 -908
  29. package/dist/index.js.map +1 -1
  30. package/dist/kanban-renderer.d.ts +2 -326
  31. package/dist/kanban-renderer.js +991 -610
  32. package/dist/kanban-renderer.js.map +1 -1
  33. package/dist/list-row-DM0DiIrN.js +1167 -0
  34. package/dist/list-row-DM0DiIrN.js.map +1 -0
  35. package/dist/{mermaid-renderer-DImi0fDp.js → mermaid-renderer-0PmNkOXI.js} +29 -29
  36. package/dist/mermaid-renderer-0PmNkOXI.js.map +1 -0
  37. package/dist/mermaid.js +1 -1
  38. package/dist/param-editor.js +2 -3
  39. package/dist/prism-JVIsQMoJ.js +1029 -0
  40. package/dist/prism-JVIsQMoJ.js.map +1 -0
  41. package/dist/{resource-badge-95WPVlZf.d.ts → resource-badge-nOWPqxFU.d.ts} +1 -0
  42. package/dist/rich-text-DM24VNQZ.js +10447 -0
  43. package/dist/rich-text-DM24VNQZ.js.map +1 -0
  44. package/dist/rich-text.d.ts +2 -2
  45. package/dist/rich-text.js +2 -2
  46. package/dist/style.css +1 -1
  47. package/dist/terminal.d.ts +5 -63
  48. package/dist/terminal.js +102 -122
  49. package/dist/terminal.js.map +1 -1
  50. package/dist/{theme-BsOWAIi2.js → theme-at0rtSnX.js} +441 -246
  51. package/dist/theme-at0rtSnX.js.map +1 -0
  52. package/dist/theme-kKuLN2jb.js +80 -0
  53. package/dist/theme-kKuLN2jb.js.map +1 -0
  54. package/dist/theme-preference-BV4cbJNB.js +115 -0
  55. package/dist/theme-preference-BV4cbJNB.js.map +1 -0
  56. package/dist/theme.js +3 -2
  57. package/dist/{tree-list-WhISG-cz.js → tree-list-Cqgl8mnN.js} +400 -377
  58. package/dist/tree-list-Cqgl8mnN.js.map +1 -0
  59. package/package.json +4 -4
  60. package/dist/diff-bubble-DZsarmSG.js +0 -61
  61. package/dist/diff-bubble-DZsarmSG.js.map +0 -1
  62. package/dist/diff-drawer-45rpk3aq.js.map +0 -1
  63. package/dist/diff-viewer-DJ1B5hxL.js +0 -558
  64. package/dist/diff-viewer-DJ1B5hxL.js.map +0 -1
  65. package/dist/list-row-uqD-q4gv.js +0 -1018
  66. package/dist/list-row-uqD-q4gv.js.map +0 -1
  67. package/dist/mermaid-renderer-DImi0fDp.js.map +0 -1
  68. package/dist/param-editor-BQd4AOUP.js +0 -225
  69. package/dist/param-editor-BQd4AOUP.js.map +0 -1
  70. package/dist/param-editor-field-BJ_rLUnV.js +0 -2385
  71. package/dist/param-editor-field-BJ_rLUnV.js.map +0 -1
  72. package/dist/prism-BStPsJSB.js +0 -658
  73. package/dist/prism-BStPsJSB.js.map +0 -1
  74. package/dist/rich-text-VYAmEigU.js +0 -6979
  75. package/dist/rich-text-VYAmEigU.js.map +0 -1
  76. package/dist/slider-hwHYe98I.js +0 -423
  77. package/dist/slider-hwHYe98I.js.map +0 -1
  78. package/dist/theme-BsOWAIi2.js.map +0 -1
  79. package/dist/theme-preference-pzfuK5cH.js +0 -101
  80. package/dist/theme-preference-pzfuK5cH.js.map +0 -1
  81. package/dist/tree-list-WhISG-cz.js.map +0 -1
  82. package/dist/types-DWA3enV6.d.ts +0 -182
@@ -1,1018 +0,0 @@
1
- import { n as e, t } from "./scroll-area-Cr1lNXAr.js";
2
- import { Box as n, HStack as r, Icon as i, IconButton as a, Input as o, InputGroup as s, Menu as c, Portal as l, Stack as u, Text as d, chakra as f, useMenu as p } from "@chakra-ui/react";
3
- import { c as m } from "react/compiler-runtime";
4
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
5
- import * as v from "react";
6
- import { Fragment as y, forwardRef as b, useEffect as x, useId as S, useRef as C, useState as w } from "react";
7
- import { Check as T, ChevronDown as E, ChevronRight as D, Search as O } from "lucide-react";
8
- //#region src/components/overlays/resource-context-menu.tsx
9
- var k = (e) => {
10
- let n = m(9), { actions: r, contentBackground: i, contentMinWidth: a } = e, o;
11
- n[0] === Symbol.for("react.memo_cache_sentinel") ? (o = { overscrollBehavior: "contain" }, n[0] = o) : o = n[0];
12
- let s;
13
- n[1] === r ? s = n[2] : (s = r.map(M), n[1] = r, n[2] = s);
14
- let u;
15
- n[3] === s ? u = n[4] : (u = /* @__PURE__ */ g(t, {
16
- flex: "1",
17
- minH: "0",
18
- viewportProps: o,
19
- children: s
20
- }), n[3] = s, n[4] = u);
21
- let d;
22
- return n[5] !== i || n[6] !== a || n[7] !== u ? (d = /* @__PURE__ */ g(l, { children: /* @__PURE__ */ g(c.Positioner, { children: /* @__PURE__ */ g(c.Content, {
23
- minW: a,
24
- bg: i,
25
- maxH: "var(--available-height)",
26
- children: u
27
- }) }) }), n[5] = i, n[6] = a, n[7] = u, n[8] = d) : d = n[8], d;
28
- }, A = (e) => {
29
- let t = m(13), { actions: n, children: r, contentMinWidth: i, contentBackground: a, positioning: o, closeOnSelect: s } = e, l = i === void 0 ? "17.5rem" : i, u = a === void 0 ? "bg" : a, d;
30
- t[0] === o ? d = t[1] : (d = o === void 0 ? { placement: "bottom-start" } : o, t[0] = o, t[1] = d);
31
- let f = d;
32
- if (n.length === 0) return r;
33
- let p;
34
- t[2] === r ? p = t[3] : (p = /* @__PURE__ */ g(c.Trigger, {
35
- asChild: !0,
36
- children: r
37
- }), t[2] = r, t[3] = p);
38
- let h;
39
- t[4] !== n || t[5] !== u || t[6] !== l ? (h = /* @__PURE__ */ g(k, {
40
- actions: n,
41
- contentMinWidth: l,
42
- contentBackground: u
43
- }), t[4] = n, t[5] = u, t[6] = l, t[7] = h) : h = t[7];
44
- let v;
45
- return t[8] !== s || t[9] !== f || t[10] !== p || t[11] !== h ? (v = /* @__PURE__ */ _(c.Root, {
46
- positioning: f,
47
- closeOnSelect: s,
48
- children: [p, h]
49
- }), t[8] = s, t[9] = f, t[10] = p, t[11] = h, t[12] = v) : v = t[12], v;
50
- }, j = (e) => {
51
- let t = m(25), { actions: n, children: r, contentMinWidth: i, contentBackground: a, positioning: o, closeOnSelect: s, keepMountedWhenEmpty: l } = e, u = i === void 0 ? "17.5rem" : i, d = a === void 0 ? "bg" : a, v;
52
- t[0] === o ? v = t[1] : (v = o === void 0 ? { placement: "bottom-start" } : o, t[0] = o, t[1] = v);
53
- let y = v, b = l !== void 0 && l, x;
54
- t[2] !== s || t[3] !== y ? (x = {
55
- positioning: y,
56
- closeOnSelect: s
57
- }, t[2] = s, t[3] = y, t[4] = x) : x = t[4];
58
- let S = p(x), C;
59
- t[5] === S.api ? C = t[6] : (C = S.api.getContextTriggerProps(), t[5] = S.api, t[6] = C);
60
- let w = C;
61
- if (n.length === 0 && !b) {
62
- let e;
63
- return t[7] === r ? e = t[8] : (e = /* @__PURE__ */ g(h, { children: r }), t[7] = r, t[8] = e), e;
64
- }
65
- let T;
66
- t[9] === w ? T = t[10] : (T = (e) => {
67
- e.defaultPrevented || w.onContextMenu?.(e);
68
- }, t[9] = w, t[10] = T);
69
- let E;
70
- t[11] !== r || t[12] !== T || t[13] !== w ? (E = /* @__PURE__ */ g(f.div, {
71
- asChild: !0,
72
- ...w,
73
- onContextMenu: T,
74
- children: r
75
- }), t[11] = r, t[12] = T, t[13] = w, t[14] = E) : E = t[14];
76
- let D;
77
- t[15] !== n || t[16] !== d || t[17] !== u ? (D = n.length > 0 ? /* @__PURE__ */ g(k, {
78
- actions: n,
79
- contentMinWidth: u,
80
- contentBackground: d
81
- }) : null, t[15] = n, t[16] = d, t[17] = u, t[18] = D) : D = t[18];
82
- let O;
83
- t[19] !== S || t[20] !== D ? (O = /* @__PURE__ */ g(c.RootProvider, {
84
- value: S,
85
- lazyMount: !0,
86
- unmountOnExit: !0,
87
- children: D
88
- }), t[19] = S, t[20] = D, t[21] = O) : O = t[21];
89
- let A;
90
- return t[22] !== O || t[23] !== E ? (A = /* @__PURE__ */ _(h, { children: [E, O] }), t[22] = O, t[23] = E, t[24] = A) : A = t[24], A;
91
- };
92
- function M(e) {
93
- return /* @__PURE__ */ _(y, { children: [e.separatorBefore ? /* @__PURE__ */ g(c.Separator, {}) : null, /* @__PURE__ */ g(c.Item, {
94
- value: e.key,
95
- disabled: e.isDisabled,
96
- asChild: !0,
97
- children: /* @__PURE__ */ g(H, {
98
- asChild: !0,
99
- variant: "full-width",
100
- label: e.label,
101
- icon: e.icon,
102
- endContent: e.endContent,
103
- disabled: e.isDisabled,
104
- onActivate: e.onClick
105
- })
106
- })] }, e.key);
107
- }
108
- //#endregion
109
- //#region src/components/list-row/list-row-menu.tsx
110
- var N = (e) => {
111
- let t = m(4), { item: r } = e;
112
- if (!r.icon) return null;
113
- let a;
114
- t[0] === r.icon ? a = t[1] : (a = typeof r.icon == "function" ? /* @__PURE__ */ g(i, {
115
- as: r.icon,
116
- boxSize: "14px"
117
- }) : r.icon, t[0] = r.icon, t[1] = a);
118
- let o;
119
- return t[2] === a ? o = t[3] : (o = /* @__PURE__ */ g(n, {
120
- color: "fg.muted",
121
- flexShrink: 0,
122
- display: "inline-flex",
123
- children: a
124
- }), t[2] = a, t[3] = o), o;
125
- }, P = (e) => {
126
- let t = m(20), { children: i, items: a, onOpenChange: o, onSelect: s, open: f, placement: p } = e, h = p === void 0 ? "right-start" : p, v;
127
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (v = { mainAxis: 4 }, t[0] = v) : v = t[0];
128
- let b;
129
- t[1] === h ? b = t[2] : (b = {
130
- placement: h,
131
- offset: v
132
- }, t[1] = h, t[2] = b);
133
- let x;
134
- t[3] === o ? x = t[4] : (x = (e) => o(e.open), t[3] = o, t[4] = x);
135
- let S;
136
- t[5] === i ? S = t[6] : (S = /* @__PURE__ */ g(c.Trigger, {
137
- asChild: !0,
138
- children: i
139
- }), t[5] = i, t[6] = S);
140
- let C;
141
- if (t[7] !== a || t[8] !== s) {
142
- let e;
143
- t[10] === s ? e = t[11] : (e = (e) => /* @__PURE__ */ _(y, { children: [e.separatorBefore ? /* @__PURE__ */ g(c.Separator, {}) : null, /* @__PURE__ */ g(c.Item, {
144
- value: e.id,
145
- disabled: e.disabled || e.readOnly,
146
- _disabled: e.readOnly ? {
147
- opacity: 1,
148
- cursor: "default"
149
- } : void 0,
150
- onClick: () => {
151
- e.readOnly || s(e);
152
- },
153
- children: /* @__PURE__ */ _(r, {
154
- gap: "2",
155
- minW: "0",
156
- w: "full",
157
- justify: "space-between",
158
- alignItems: "center",
159
- children: [/* @__PURE__ */ _(r, {
160
- gap: "2",
161
- minW: "0",
162
- flex: "1",
163
- alignItems: e.description ? "flex-start" : "center",
164
- children: [/* @__PURE__ */ g(N, { item: e }), /* @__PURE__ */ _(u, {
165
- gap: "0",
166
- minW: "0",
167
- children: [/* @__PURE__ */ g(d, {
168
- textStyle: "label/S/regular",
169
- truncate: !0,
170
- children: e.label
171
- }), e.description ? /* @__PURE__ */ g(d, {
172
- textStyle: "label/XS",
173
- color: "fg.menu-item.secondary",
174
- truncate: !0,
175
- children: e.description
176
- }) : null]
177
- })]
178
- }), e.endContent ? /* @__PURE__ */ g(n, {
179
- flexShrink: 0,
180
- children: e.endContent
181
- }) : null]
182
- })
183
- })] }, e.id), t[10] = s, t[11] = e), C = a.map(e), t[7] = a, t[8] = s, t[9] = C;
184
- } else C = t[9];
185
- let w;
186
- t[12] === C ? w = t[13] : (w = /* @__PURE__ */ g(l, { children: /* @__PURE__ */ g(c.Positioner, { children: /* @__PURE__ */ g(c.Content, {
187
- minW: "200px",
188
- bg: "bg",
189
- children: C
190
- }) }) }), t[12] = C, t[13] = w);
191
- let T;
192
- return t[14] !== f || t[15] !== b || t[16] !== x || t[17] !== S || t[18] !== w ? (T = /* @__PURE__ */ _(c.Root, {
193
- open: f,
194
- positioning: b,
195
- onOpenChange: x,
196
- children: [S, w]
197
- }), t[14] = f, t[15] = b, t[16] = x, t[17] = S, t[18] = w, t[19] = T) : T = t[19], T;
198
- }, F = (e) => e.map((e) => ({
199
- key: e.id,
200
- label: e.label,
201
- icon: typeof e.icon == "function" ? /* @__PURE__ */ g(i, {
202
- as: e.icon,
203
- boxSize: "16px"
204
- }) : e.icon,
205
- endContent: e.endContent,
206
- isDisabled: e.disabled,
207
- separatorBefore: e.separatorBefore,
208
- onClick: () => e.onAction?.()
209
- })), ee = (t) => {
210
- let n = m(15), { children: r, item: i, menuOpen: a, onMenuOpenChange: o, onMenuSelect: s } = t;
211
- if (i.menuItems && i.menuItems.length > 0) {
212
- let e;
213
- return n[0] !== r || n[1] !== i.menuItems || n[2] !== i.menuPlacement || n[3] !== a || n[4] !== o || n[5] !== s ? (e = /* @__PURE__ */ g(P, {
214
- items: i.menuItems,
215
- open: a,
216
- placement: i.menuPlacement,
217
- onOpenChange: o,
218
- onSelect: s,
219
- children: r
220
- }), n[0] = r, n[1] = i.menuItems, n[2] = i.menuPlacement, n[3] = a, n[4] = o, n[5] = s, n[6] = e) : e = n[6], e;
221
- }
222
- let c;
223
- n[7] !== r || n[8] !== i.tooltip ? (c = i.tooltip ? /* @__PURE__ */ g(e, {
224
- content: i.tooltip,
225
- children: r
226
- }) : r, n[7] = r, n[8] = i.tooltip, n[9] = c) : c = n[9];
227
- let l = c;
228
- if (!i.contextMenuItems || i.contextMenuItems.length === 0) return l;
229
- let u;
230
- n[10] === i.contextMenuItems ? u = n[11] : (u = F(i.contextMenuItems), n[10] = i.contextMenuItems, n[11] = u);
231
- let d;
232
- return n[12] !== l || n[13] !== u ? (d = /* @__PURE__ */ g(j, {
233
- actions: u,
234
- children: l
235
- }), n[12] = l, n[13] = u, n[14] = d) : d = n[14], d;
236
- }, te = {
237
- main: {
238
- h: "2.5rem",
239
- px: "xs"
240
- },
241
- narrow: {
242
- h: "2rem",
243
- px: "xs"
244
- },
245
- input: {
246
- h: "3rem",
247
- px: "0"
248
- }
249
- }, ne = v.forwardRef(function(e, t) {
250
- let n = m(9), i, a, o;
251
- n[0] === e ? (i = n[1], a = n[2], o = n[3]) : ({variant: o, children: i, ...a} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o);
252
- let s = te[o === void 0 ? "main" : o], c;
253
- return n[4] !== i || n[5] !== t || n[6] !== a || n[7] !== s ? (c = /* @__PURE__ */ g(r, {
254
- ref: t,
255
- as: "header",
256
- alignItems: "center",
257
- borderWidth: "0",
258
- ...s,
259
- ...a,
260
- children: i
261
- }), n[4] = i, n[5] = t, n[6] = a, n[7] = s, n[8] = c) : c = n[8], c;
262
- }), re = (e) => {
263
- let t = m(8), { inputRef: n, value: r, placeholder: i, onValueChange: a } = e, c;
264
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ g(O, { size: 14 }), t[0] = c) : c = t[0];
265
- let l;
266
- t[1] === a ? l = t[2] : (l = (e) => a(e.target.value), t[1] = a, t[2] = l);
267
- let u;
268
- return t[3] !== n || t[4] !== i || t[5] !== l || t[6] !== r ? (u = /* @__PURE__ */ g(ne, {
269
- variant: "input",
270
- borderBottomWidth: "1px",
271
- borderColor: "border.subtle",
272
- flexShrink: 0,
273
- children: /* @__PURE__ */ g(s, {
274
- startElement: c,
275
- width: "full",
276
- children: /* @__PURE__ */ g(o, {
277
- ref: n,
278
- mx: "xs",
279
- variant: "borderless",
280
- value: r,
281
- placeholder: i,
282
- "aria-label": i,
283
- autoComplete: "off",
284
- onChange: l,
285
- onKeyDown: ie
286
- })
287
- })
288
- }), t[3] = n, t[4] = i, t[5] = l, t[6] = r, t[7] = u) : u = t[7], u;
289
- };
290
- function ie(e) {
291
- return e.stopPropagation();
292
- }
293
- //#endregion
294
- //#region src/components/overlays/searchable-menu.tsx
295
- var I = (e, t) => {
296
- let n = t.trim().toLowerCase();
297
- return n ? e.filter((e) => [e.label, e.searchText].filter(Boolean).join(" ").toLowerCase().includes(n)) : e;
298
- }, ae = (e, t) => !e || !t ? !1 : e !== t, oe = (e, t, n) => !e || !t ? n : {
299
- items: t.items,
300
- filterItems: t.filterItems ?? n.filterItems,
301
- showSearch: t.showSearch ?? n.showSearch,
302
- searchPlaceholder: t.searchPlaceholder ?? n.searchPlaceholder,
303
- emptyState: t.emptyState ?? n.emptyState,
304
- contentTestId: t.contentTestId ?? n.contentTestId,
305
- closeOnSelect: !1,
306
- listId: "parent"
307
- }, se = (e) => {
308
- let r = m(47), { trigger: a, items: o, searchPlaceholder: s, emptyState: u, filterItems: d, listId: f, header: p, width: h, maxListHeight: v, showSearch: y, closeOnSelect: b, lazyMount: S, open: D, positioning: O, onOpenChange: k, onFocusOutside: A, contentTestId: j, portalled: M, parentList: N } = e, P = d === void 0 ? I : d, F = h === void 0 ? "260px" : h, ee = v === void 0 ? "18rem" : v, te = y === void 0 || y, ie = b === void 0 || b, se = S !== void 0 && S, de = M === void 0 || M, L = !!N, [fe, pe] = w(!1), [me, he] = w(""), [ge, R] = w("child"), _e = C(null), ve = D ?? fe, ye = L && ge === "parent", z = oe(ye, N, {
309
- items: o,
310
- filterItems: P,
311
- showSearch: te,
312
- searchPlaceholder: s,
313
- emptyState: u,
314
- contentTestId: j,
315
- closeOnSelect: ie,
316
- listId: L ? "child" : f ?? ""
317
- }), be = z.filterItems(z.items, me), xe = C(z.listId);
318
- x(() => {
319
- if (!ve) {
320
- xe.current = z.listId;
321
- return;
322
- }
323
- ae(xe.current, z.listId) && he(""), xe.current = z.listId;
324
- }, [ve, z.listId]);
325
- let Se;
326
- r[0] !== z.showSearch || r[1] !== ve ? (Se = [ve, z.showSearch], r[0] = z.showSearch, r[1] = ve, r[2] = Se) : Se = r[2], x(() => {
327
- if (!ve || !z.showSearch) return;
328
- let e = setTimeout(() => _e.current?.focus(), 0);
329
- return () => clearTimeout(e);
330
- }, Se);
331
- let Ce;
332
- r[3] !== L || r[4] !== k || r[5] !== D ? (Ce = (e) => {
333
- D === void 0 && pe(e.open), he(""), e.open && L && R("child"), k?.(e);
334
- }, r[3] = L, r[4] = k, r[5] = D, r[6] = Ce) : Ce = r[6];
335
- let B = Ce, V;
336
- r[7] !== ye || r[8] !== N ? (V = (e) => {
337
- if (!ye || !N) return;
338
- let t = N.items.find((t) => t.id === e.value);
339
- t && (N.onSelect?.(t), R("child"));
340
- }, r[7] = ye, r[8] = N, r[9] = V) : V = r[9];
341
- let we = V, Te = ce, Ee;
342
- r[10] === Symbol.for("react.memo_cache_sentinel") ? (Ee = (e) => ({
343
- id: e.id,
344
- label: e.label,
345
- description: e.secondaryLabel,
346
- icon: Te(e.icon),
347
- disabled: e.isDisabled,
348
- tooltip: e.tooltipLabel
349
- }), r[10] = Ee) : Ee = r[10];
350
- let U = Ee, De;
351
- r[11] === N ? De = r[12] : (De = N ? /* @__PURE__ */ g(ne, {
352
- as: "div",
353
- role: "menuitem",
354
- "aria-label": N.ariaLabel,
355
- "aria-disabled": N.disabled || void 0,
356
- tabIndex: N.disabled ? -1 : 0,
357
- variant: "narrow",
358
- px: "0",
359
- borderBottomWidth: "1px",
360
- borderColor: "border.subtle",
361
- flexShrink: 0,
362
- onPointerDownCapture: le,
363
- onClickCapture: (e) => {
364
- e.stopPropagation(), !N.disabled && R(ue);
365
- },
366
- children: /* @__PURE__ */ g(H, {
367
- asChild: !0,
368
- role: "presentation",
369
- variant: "full-width",
370
- id: "__parent-toggle",
371
- label: N.selectedLabel,
372
- icon: Te(N.selectedIcon),
373
- disabled: N.disabled,
374
- endContent: N.disabled ? void 0 : /* @__PURE__ */ g(i, {
375
- as: E,
376
- boxSize: "14px"
377
- })
378
- })
379
- }) : null, r[11] = N, r[12] = De);
380
- let W = N ? De : p, Oe = !!W && !z.showSearch, G = z.showSearch ? /* @__PURE__ */ g(re, {
381
- inputRef: _e,
382
- value: me,
383
- placeholder: z.searchPlaceholder,
384
- onValueChange: he
385
- }) : null, ke = c, K = c, q;
386
- r[13] === Oe ? q = r[14] : (q = Oe ? /* @__PURE__ */ g(c.Separator, { margin: "0" }) : null, r[13] = Oe, r[14] = q);
387
- let Ae = t, J;
388
- r[15] === Symbol.for("react.memo_cache_sentinel") ? (J = { overscrollBehavior: "contain" }, r[15] = J) : J = r[15];
389
- let je = be.length > 0 ? be.map((e) => /* @__PURE__ */ g(c.Item, {
390
- value: e.id,
391
- disabled: e.isDisabled,
392
- onClick: e.onSelect,
393
- asChild: !0,
394
- children: /* @__PURE__ */ g(n, {
395
- bg: "transparent",
396
- h: "auto",
397
- p: "0",
398
- _hover: { bg: "transparent" },
399
- _focus: { bg: "transparent" },
400
- _active: { bg: "transparent" },
401
- children: /* @__PURE__ */ g(H, {
402
- asChild: !0,
403
- ...U(e),
404
- role: "presentation",
405
- variant: e.variant ?? "full-width",
406
- isSelected: e.isSelected,
407
- endContent: e.isSelected ? /* @__PURE__ */ g(i, {
408
- as: T,
409
- boxSize: "3.5"
410
- }) : void 0
411
- })
412
- })
413
- }, e.id)) : z.emptyState, Y;
414
- r[16] !== Ae || r[17] !== z.contentTestId || r[18] !== ee || r[19] !== J || r[20] !== je ? (Y = /* @__PURE__ */ g(Ae, {
415
- maxH: ee,
416
- "data-testid": z.contentTestId,
417
- viewportProps: J,
418
- p: "0",
419
- gap: "0",
420
- children: je
421
- }), r[16] = Ae, r[17] = z.contentTestId, r[18] = ee, r[19] = J, r[20] = je, r[21] = Y) : Y = r[21];
422
- let X;
423
- r[22] !== W || r[23] !== G || r[24] !== K.Content || r[25] !== q || r[26] !== Y || r[27] !== F ? (X = /* @__PURE__ */ _(K.Content, {
424
- w: F,
425
- bg: "bg",
426
- gap: "0",
427
- p: "0",
428
- children: [
429
- W,
430
- G,
431
- q,
432
- Y
433
- ]
434
- }), r[22] = W, r[23] = G, r[24] = K.Content, r[25] = q, r[26] = Y, r[27] = F, r[28] = X) : X = r[28];
435
- let Me;
436
- r[29] !== ke.Positioner || r[30] !== X ? (Me = /* @__PURE__ */ g(ke.Positioner, { children: X }), r[29] = ke.Positioner, r[30] = X, r[31] = Me) : Me = r[31];
437
- let Ne = Me, Pe = L ? we : void 0, Fe;
438
- r[32] === a ? Fe = r[33] : (Fe = /* @__PURE__ */ g(c.Trigger, {
439
- asChild: !0,
440
- children: a
441
- }), r[32] = a, r[33] = Fe);
442
- let Ie = !de, Le;
443
- r[34] !== Ne || r[35] !== Ie ? (Le = /* @__PURE__ */ g(l, {
444
- disabled: Ie,
445
- children: Ne
446
- }), r[34] = Ne, r[35] = Ie, r[36] = Le) : Le = r[36];
447
- let Re;
448
- return r[37] !== z.closeOnSelect || r[38] !== B || r[39] !== se || r[40] !== A || r[41] !== D || r[42] !== O || r[43] !== Pe || r[44] !== Fe || r[45] !== Le ? (Re = /* @__PURE__ */ _(c.Root, {
449
- lazyMount: se,
450
- closeOnSelect: z.closeOnSelect,
451
- open: D,
452
- positioning: O,
453
- onOpenChange: B,
454
- onFocusOutside: A,
455
- onSelect: Pe,
456
- children: [Fe, Le]
457
- }), r[37] = z.closeOnSelect, r[38] = B, r[39] = se, r[40] = A, r[41] = D, r[42] = O, r[43] = Pe, r[44] = Fe, r[45] = Le, r[46] = Re) : Re = r[46], Re;
458
- };
459
- function ce(e) {
460
- return e ? /* @__PURE__ */ g(i, {
461
- as: e,
462
- boxSize: "14px"
463
- }) : void 0;
464
- }
465
- function le(e) {
466
- return e.stopPropagation();
467
- }
468
- function ue(e) {
469
- return e === "child" ? "parent" : "child";
470
- }
471
- //#endregion
472
- //#region src/components/list-row/searchable-action-menu.tsx
473
- var de = (e) => {
474
- let t = m(14), { action: n } = e, r;
475
- t[0] === n.menuItems ? r = t[1] : (r = n.menuItems ?? [], t[0] = n.menuItems, t[1] = r);
476
- let i;
477
- t[2] === r ? i = t[3] : (i = r.map(L), t[2] = r, t[3] = i);
478
- let o = i, s;
479
- t[4] !== n.icon || t[5] !== n.label ? (s = /* @__PURE__ */ g(a, {
480
- variant: "ghost",
481
- size: "2xs",
482
- "aria-label": n.label,
483
- children: n.icon
484
- }), t[4] = n.icon, t[5] = n.label, t[6] = s) : s = t[6];
485
- let l = n.searchPlaceholder ?? "Search...", u = n.emptyMenuLabel ?? "No results found", d;
486
- t[7] === u ? d = t[8] : (d = /* @__PURE__ */ g(c.Item, {
487
- value: "empty",
488
- asChild: !0,
489
- children: /* @__PURE__ */ g(H, {
490
- asChild: !0,
491
- variant: "full-width",
492
- label: u,
493
- disabled: !0
494
- })
495
- }), t[7] = u, t[8] = d);
496
- let f;
497
- return t[9] !== o || t[10] !== s || t[11] !== l || t[12] !== d ? (f = /* @__PURE__ */ g(se, {
498
- trigger: s,
499
- items: o,
500
- searchPlaceholder: l,
501
- emptyState: d,
502
- onFocusOutside: fe
503
- }), t[9] = o, t[10] = s, t[11] = l, t[12] = d, t[13] = f) : f = t[13], f;
504
- };
505
- function L(e) {
506
- return {
507
- id: e.id,
508
- label: e.label,
509
- searchText: [e.label, e.description].filter(Boolean).join(" "),
510
- tooltipLabel: e.description,
511
- variant: "full-width",
512
- onSelect: () => e.onAction?.()
513
- };
514
- }
515
- function fe(e) {
516
- return e.preventDefault();
517
- }
518
- //#endregion
519
- //#region src/components/list-row/list-row-actions.tsx
520
- var pe = (t, n) => t.tooltip ? /* @__PURE__ */ g(e, {
521
- content: t.tooltip,
522
- openDelay: 300,
523
- children: n
524
- }, t.id) : /* @__PURE__ */ g(y, { children: n }, t.id), me = (e) => {
525
- let t = m(11), { actions: n, alwaysVisible: i, context: o } = e, s = i !== void 0 && i;
526
- if (n.length === 0) return null;
527
- let u = s ? "1" : "0", d = s ? "auto" : "none", f, p;
528
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (f = {
529
- opacity: "1",
530
- pointerEvents: "auto"
531
- }, p = {
532
- opacity: "1",
533
- pointerEvents: "auto"
534
- }, t[0] = f, t[1] = p) : (f = t[0], p = t[1]);
535
- let h;
536
- if (t[2] !== n || t[3] !== o) {
537
- let e;
538
- t[5] === o ? e = t[6] : (e = (e) => e.menuItems && e.menuItems.length >= 8 ? /* @__PURE__ */ g(de, { action: e }, e.id) : e.menuItems && e.menuItems.length > 0 ? pe(e, /* @__PURE__ */ _(c.Root, { children: [/* @__PURE__ */ g(c.Trigger, {
539
- asChild: !0,
540
- children: /* @__PURE__ */ g(a, {
541
- variant: "ghost",
542
- size: "2xs",
543
- "aria-label": e.label,
544
- children: e.icon
545
- })
546
- }), /* @__PURE__ */ g(l, { children: /* @__PURE__ */ g(c.Positioner, { children: /* @__PURE__ */ g(c.Content, {
547
- minW: "160px",
548
- bg: "bg",
549
- children: e.menuItems.map(ge)
550
- }) }) })] })) : pe(e, /* @__PURE__ */ g(a, {
551
- variant: "ghost",
552
- size: "2xs",
553
- "aria-label": e.label,
554
- onClick: (t) => {
555
- t.stopPropagation(), e.onAction?.(o);
556
- },
557
- children: e.icon
558
- })), t[5] = o, t[6] = e), h = n.map(e), t[2] = n, t[3] = o, t[4] = h;
559
- } else h = t[4];
560
- let v;
561
- return t[7] !== u || t[8] !== d || t[9] !== h ? (v = /* @__PURE__ */ g(r, {
562
- gap: "0",
563
- opacity: u,
564
- pointerEvents: d,
565
- _groupHover: f,
566
- _groupFocusWithin: p,
567
- transition: "opacity 120ms ease",
568
- onClick: he,
569
- children: h
570
- }), t[7] = u, t[8] = d, t[9] = h, t[10] = v) : v = t[10], v;
571
- };
572
- function he(e) {
573
- return e.stopPropagation();
574
- }
575
- function ge(t) {
576
- return /* @__PURE__ */ _(y, { children: [t.separatorBefore ? /* @__PURE__ */ g(c.Separator, {}) : null, /* @__PURE__ */ g(e, {
577
- content: t.description,
578
- disabled: !t.description,
579
- openDelay: 300,
580
- children: /* @__PURE__ */ g(c.Item, {
581
- value: t.id,
582
- disabled: t.disabled || t.readOnly,
583
- onClick: () => {
584
- t.readOnly || t.onAction?.();
585
- },
586
- children: /* @__PURE__ */ _(r, {
587
- gap: "2",
588
- minW: "0",
589
- w: "full",
590
- justify: "space-between",
591
- children: [/* @__PURE__ */ _(r, {
592
- gap: "2",
593
- minW: "0",
594
- children: [t.icon ? /* @__PURE__ */ g(n, { children: t.icon }) : null, /* @__PURE__ */ g(n, {
595
- minW: "0",
596
- children: t.label
597
- })]
598
- }), t.endContent ? /* @__PURE__ */ g(n, {
599
- flexShrink: 0,
600
- children: t.endContent
601
- }) : null]
602
- })
603
- })
604
- })] }, t.id);
605
- }
606
- //#endregion
607
- //#region src/components/list-row/list-row-content.tsx
608
- var R = (e, t = !1) => {
609
- let n = e.contextMenuItems ?? [];
610
- if (n.length === 0 || !t) return e.actions ?? [];
611
- let r = e.actions?.flatMap((t) => t.menuItems?.length ? t.menuItems : [{
612
- id: t.id,
613
- label: t.label,
614
- icon: t.icon,
615
- onAction: () => t.onAction?.({ nodeId: e.id })
616
- }]) ?? [], a = new Set(r.map((e) => e.id)), o = n.filter((e) => !a.has(e.id)).map((e, t) => ({
617
- ...e,
618
- separatorBefore: e.separatorBefore || t === 0 && r.length > 0
619
- }));
620
- return [{
621
- id: "resource-actions",
622
- label: "Resource actions",
623
- icon: /* @__PURE__ */ g(i, {
624
- as: E,
625
- boxSize: "14px"
626
- }),
627
- menuItems: [...r, ...o]
628
- }];
629
- }, _e = (e) => e.isEmptyStateVariant ? "fg.menu-item.secondary" : e.isDisabled ? "fg.muted" : e.tone === "danger" ? "red.500" : "fg", ve = (e) => {
630
- let t = m(7), { label: r, textStyle: i, color: a } = e;
631
- if (typeof r == "string") {
632
- let e;
633
- return t[0] !== a || t[1] !== r || t[2] !== i ? (e = /* @__PURE__ */ g(d, {
634
- textStyle: i,
635
- color: a,
636
- truncate: !0,
637
- children: r
638
- }), t[0] = a, t[1] = r, t[2] = i, t[3] = e) : e = t[3], e;
639
- }
640
- let o;
641
- return t[4] !== a || t[5] !== r ? (o = /* @__PURE__ */ g(n, {
642
- minW: "0",
643
- maxW: "full",
644
- overflow: "hidden",
645
- color: a,
646
- children: r
647
- }), t[4] = a, t[5] = r, t[6] = o) : o = t[6], o;
648
- }, ye = (e) => {
649
- let t = m(8), { description: r, textStyle: i, color: a, marginLeft: o } = e;
650
- if (!r) return null;
651
- if (typeof r == "string") {
652
- let e;
653
- return t[0] !== a || t[1] !== r || t[2] !== o || t[3] !== i ? (e = /* @__PURE__ */ g(d, {
654
- ml: o,
655
- textStyle: i,
656
- color: a,
657
- truncate: !0,
658
- children: r
659
- }), t[0] = a, t[1] = r, t[2] = o, t[3] = i, t[4] = e) : e = t[4], e;
660
- }
661
- let s;
662
- return t[5] !== r || t[6] !== o ? (s = /* @__PURE__ */ g(n, {
663
- ml: o,
664
- minW: "0",
665
- maxW: "full",
666
- overflow: "hidden",
667
- children: r
668
- }), t[5] = r, t[6] = o, t[7] = s) : s = t[7], s;
669
- }, z = (t) => {
670
- let a = m(34), { item: o, isExpanded: s, showChevron: c, isDisabled: l, variant: d, tone: f, labelId: p } = t, h = d === "empty-state", v = d === "compact" || d === "collection" || d === "full-width" || d === "tree" || h, y = v ? "label/S/regular" : "label/M/regular", b = v ? "label/XS" : "label/S/regular", x = v ? "0" : "2px", S = d === "tree" || d === "collection" ? "16px" : "14px", C = d === "collection" ? "compact" : d === "tree" ? "1" : "2", w;
671
- a[0] !== l || a[1] !== h || a[2] !== f ? (w = _e({
672
- isEmptyStateVariant: h,
673
- isDisabled: l,
674
- tone: f
675
- }), a[0] = l, a[1] = h, a[2] = f, a[3] = w) : w = a[3];
676
- let T = w, E = o.iconColor ?? (f === "danger" ? "red.500" : "fg.muted"), O = f === "danger" ? "red.400" : "fg.menu-item.secondary", k;
677
- a[4] !== s || a[5] !== c ? (k = c ? /* @__PURE__ */ g(n, {
678
- color: "fg.muted",
679
- flexShrink: 0,
680
- display: "flex",
681
- alignItems: "center",
682
- children: /* @__PURE__ */ g(i, {
683
- as: D,
684
- boxSize: "12px",
685
- transform: s ? "rotate(90deg)" : "rotate(0deg)",
686
- transition: "transform 120ms ease"
687
- })
688
- }) : null, a[4] = s, a[5] = c, a[6] = k) : k = a[6];
689
- let A;
690
- a[7] !== E || a[8] !== S || a[9] !== o.icon ? (A = o.icon ? /* @__PURE__ */ g(n, {
691
- color: E,
692
- flexShrink: 0,
693
- display: "inline-flex",
694
- alignItems: "center",
695
- justifyContent: "center",
696
- boxSize: S,
697
- fontSize: S,
698
- lineHeight: "1",
699
- css: { "& > svg": {
700
- width: S,
701
- height: S
702
- } },
703
- children: o.icon
704
- }) : null, a[7] = E, a[8] = S, a[9] = o.icon, a[10] = A) : A = a[10];
705
- let j;
706
- a[11] === o.indicator ? j = a[12] : (j = o.indicator ? /* @__PURE__ */ g(e, {
707
- content: o.indicator.tooltip,
708
- disabled: !o.indicator.tooltip,
709
- openDelay: 300,
710
- children: /* @__PURE__ */ g(n, {
711
- color: o.indicator.color ?? "fg.muted",
712
- flexShrink: 0,
713
- children: o.indicator.icon
714
- })
715
- }) : null, a[11] = o.indicator, a[12] = j);
716
- let M;
717
- a[13] !== o.label || a[14] !== T || a[15] !== y ? (M = /* @__PURE__ */ g(ve, {
718
- label: o.label,
719
- textStyle: y,
720
- color: T
721
- }), a[13] = o.label, a[14] = T, a[15] = y, a[16] = M) : M = a[16];
722
- let N;
723
- a[17] !== C || a[18] !== A || a[19] !== j || a[20] !== M ? (N = /* @__PURE__ */ _(r, {
724
- gap: C,
725
- minW: "0",
726
- alignItems: "center",
727
- children: [
728
- A,
729
- j,
730
- M
731
- ]
732
- }), a[17] = C, a[18] = A, a[19] = j, a[20] = M, a[21] = N) : N = a[21];
733
- let P;
734
- a[22] !== O || a[23] !== x || a[24] !== b || a[25] !== o.description ? (P = /* @__PURE__ */ g(ye, {
735
- description: o.description,
736
- textStyle: b,
737
- color: O,
738
- marginLeft: x
739
- }), a[22] = O, a[23] = x, a[24] = b, a[25] = o.description, a[26] = P) : P = a[26];
740
- let F;
741
- a[27] !== N || a[28] !== P ? (F = /* @__PURE__ */ _(u, {
742
- gap: "0",
743
- minW: "0",
744
- flex: "1",
745
- children: [N, P]
746
- }), a[27] = N, a[28] = P, a[29] = F) : F = a[29];
747
- let ee;
748
- return a[30] !== p || a[31] !== k || a[32] !== F ? (ee = /* @__PURE__ */ _(r, {
749
- id: p,
750
- gap: "2",
751
- minW: "0",
752
- flex: "1",
753
- overflow: "hidden",
754
- alignItems: "center",
755
- children: [k, F]
756
- }), a[30] = p, a[31] = k, a[32] = F, a[33] = ee) : ee = a[33], ee;
757
- }, be = (e) => {
758
- let t = m(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;
759
- t[0] !== i || t[1] !== u ? (p = R(i, u), t[0] = i, t[1] = u, t[2] = p) : p = t[2];
760
- let v = p, y;
761
- t[3] !== a || t[4] !== o || t[5] !== i || t[6] !== r || t[7] !== s || t[8] !== d || t[9] !== f ? (y = /* @__PURE__ */ g(z, {
762
- labelId: r,
763
- item: i,
764
- isExpanded: o,
765
- showChevron: s,
766
- isDisabled: a,
767
- tone: d,
768
- variant: f
769
- }), t[3] = a, t[4] = o, t[5] = i, t[6] = r, t[7] = s, t[8] = d, t[9] = f, t[10] = y) : y = t[10];
770
- let b;
771
- t[11] !== i.endContent || t[12] !== r ? (b = i.endContent ? /* @__PURE__ */ g(n, {
772
- id: `${r}-end`,
773
- flexShrink: 0,
774
- color: "fg.muted",
775
- display: "flex",
776
- alignItems: "center",
777
- children: i.endContent
778
- }) : null, t[11] = i.endContent, t[12] = r, t[13] = b) : b = t[13];
779
- let x;
780
- t[14] !== v || t[15] !== i.contextMenuItems?.length || t[16] !== i.id || t[17] !== u ? (x = v.length > 0 ? /* @__PURE__ */ g(me, {
781
- actions: v,
782
- context: { nodeId: i.id },
783
- alwaysVisible: u && (i.contextMenuItems?.length ?? 0) > 0
784
- }) : null, t[14] = v, t[15] = i.contextMenuItems?.length, t[16] = i.id, t[17] = u, t[18] = x) : x = t[18];
785
- let S;
786
- return t[19] !== y || t[20] !== b || t[21] !== x ? (S = /* @__PURE__ */ _(h, { children: [
787
- y,
788
- b,
789
- x
790
- ] }), t[19] = y, t[20] = b, t[21] = x, t[22] = S) : S = t[22], S;
791
- }, xe = (e) => {
792
- if (!(e <= 0)) return `calc(var(--chakra-spacing-1) + ${e} * 12px)`;
793
- }, Se = (e) => e === "compact" || e === "full-width" || e === "empty-state", Ce = (e, t) => e === "collection" && !t ? {
794
- rowHeight: "collection-row",
795
- minHeight: void 0
796
- } : Se(e) && !t ? {
797
- rowHeight: "1.75rem",
798
- minHeight: void 0
799
- } : {
800
- rowHeight: "auto",
801
- minHeight: e === "default" ? "2.25rem" : "1.75rem"
802
- }, B = (e) => ({
803
- bg: e.isSelected ? e.selectedBg : "transparent",
804
- _hover: e.variant === "empty-state" ? { bg: "transparent" } : e.isSelected ? { bg: e.selectedBg } : e.tone === "danger" ? {
805
- outline: "1px solid",
806
- outlineColor: "red.500",
807
- outlineOffset: "-1px"
808
- } : { bg: e.hoverBg },
809
- _active: e.variant === "empty-state" ? { bg: "transparent" } : { bg: e.selectedBg }
810
- }), V = (e, t) => t ? `${e} ${e}-end` : e, we = (e) => {
811
- let t = e.isDisabled ? "not-allowed" : "pointer";
812
- return {
813
- "aria-labelledby": e.rootProps["aria-label"] ? void 0 : V(e.labelId, e.hasEndContent),
814
- ...e.rootProps,
815
- role: e.rowRole,
816
- "aria-selected": e.rootProps["aria-selected"] ?? (e.rowRole === "option" ? e.isSelected : void 0),
817
- "aria-expanded": e.showChevron ? e.isExpanded : void 0,
818
- className: e.className ? `group ${e.className}` : "group",
819
- width: "full",
820
- minWidth: "0",
821
- maxWidth: "full",
822
- height: e.rowHeight,
823
- minHeight: e.minHeight,
824
- display: "flex",
825
- alignItems: "center",
826
- justifyContent: "space-between",
827
- gap: "xs",
828
- px: "sm",
829
- py: e.verticalPadding,
830
- pl: e.paddingLeft,
831
- borderRadius: e.variant === "full-width" || e.variant === "collection" ? "0" : "xs",
832
- ...B({ ...e }),
833
- cursor: e.variant === "empty-state" ? "default" : t,
834
- overflow: "hidden",
835
- textAlign: "left",
836
- color: "inherit",
837
- textDecoration: "none"
838
- };
839
- }, H = b((e, t) => {
840
- let n = m(108), { id: r, label: i, description: a, icon: o, iconColor: s, indicator: c, endContent: l, tooltip: u, disabled: d, isContainer: p, isNavigable: h, href: _, navigationIntent: v, menuItems: y, menuPlacement: b, contextMenuItems: x, actions: C, children: T, onActivate: E, depth: D, isSelected: O, isExpanded: k, showExpandToggle: A, showContextMenuTrigger: j, variant: M, tone: N, selectedBg: P, hoverBg: F, asChild: te, className: ne, role: re, onToggleExpand: ie, onPointerMove: I, draggable: ae, onDragStart: oe, onDragOver: se, onDragEnd: ce, onDrop: le, onClick: ue, onKeyDown: de, ...L } = e, fe = D === void 0 ? 0 : D, pe = O !== void 0 && O, me = k !== void 0 && k, he = A !== void 0 && A, ge = j !== void 0 && j, R = M === void 0 ? "default" : M, _e = N === void 0 ? "default" : N, ve = P === void 0 ? "bg.active" : P, ye = F === void 0 ? "bg.hover" : F, z = te !== void 0 && te, [Se, B] = w(!1), V = S(), H;
841
- n[0] !== C || n[1] !== T || n[2] !== x || n[3] !== a || n[4] !== d || n[5] !== l || n[6] !== _ || n[7] !== o || n[8] !== s || n[9] !== r || n[10] !== c || n[11] !== p || n[12] !== h || n[13] !== i || n[14] !== y || n[15] !== b || n[16] !== v || n[17] !== E || n[18] !== u ? (H = {
842
- id: r,
843
- label: i,
844
- description: a,
845
- icon: o,
846
- iconColor: s,
847
- indicator: c,
848
- endContent: l,
849
- tooltip: u,
850
- disabled: d,
851
- isContainer: p,
852
- isNavigable: h,
853
- href: _,
854
- navigationIntent: v,
855
- menuItems: y,
856
- menuPlacement: b,
857
- contextMenuItems: x,
858
- actions: C,
859
- children: T,
860
- onActivate: E
861
- }, n[0] = C, n[1] = T, n[2] = x, n[3] = a, n[4] = d, n[5] = l, n[6] = _, n[7] = o, n[8] = s, n[9] = r, n[10] = c, n[11] = p, n[12] = h, n[13] = i, n[14] = y, n[15] = b, n[16] = v, n[17] = E, n[18] = u, n[19] = H) : H = n[19];
862
- let U = H, De;
863
- n[20] !== ae || n[21] !== ce || n[22] !== se || n[23] !== oe || n[24] !== le ? (De = {
864
- draggable: ae,
865
- onDragStart: oe,
866
- onDragOver: se,
867
- onDragEnd: ce,
868
- onDrop: le
869
- }, n[20] = ae, n[21] = ce, n[22] = se, n[23] = oe, n[24] = le, n[25] = De) : De = n[25];
870
- let W = De, Oe = (U.children?.length ?? 0) > 0 || U.isContainer === !0, G = (U.menuItems?.length ?? 0) > 0, ke = (U.actions?.length ?? 0) > 0 || (U.contextMenuItems?.length ?? 0) > 0, K = he && Oe, q = U.disabled === !0, Ae;
871
- n[26] !== G || n[27] !== q || n[28] !== E || n[29] !== ie || n[30] !== K ? (Ae = () => {
872
- if (!q && !G) {
873
- if (K) {
874
- ie?.();
875
- return;
876
- }
877
- E?.();
878
- }
879
- }, n[26] = G, n[27] = q, n[28] = E, n[29] = ie, n[30] = K, n[31] = Ae) : Ae = n[31];
880
- let J = Ae, je;
881
- n[32] !== J || n[33] !== q || n[34] !== ue ? (je = (e) => {
882
- if (ue?.(e), !e.defaultPrevented) {
883
- if (q) {
884
- e.preventDefault();
885
- return;
886
- }
887
- J();
888
- }
889
- }, n[32] = J, n[33] = q, n[34] = ue, n[35] = je) : je = n[35];
890
- let Y = je, X;
891
- n[36] !== q || n[37] !== ue || n[38] !== B ? (X = (e) => {
892
- if (ue?.(e), !e.defaultPrevented) {
893
- if (q) {
894
- e.preventDefault();
895
- return;
896
- }
897
- B(Te);
898
- }
899
- }, n[36] = q, n[37] = ue, n[38] = B, n[39] = X) : X = n[39];
900
- let Me = X, Ne;
901
- n[40] !== J || n[41] !== G || n[42] !== q || n[43] !== de || n[44] !== B ? (Ne = (e) => {
902
- if (de?.(e), !e.defaultPrevented && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), !q)) {
903
- if (G) {
904
- B(Ee);
905
- return;
906
- }
907
- J();
908
- }
909
- }, n[40] = J, n[41] = G, n[42] = q, n[43] = de, n[44] = B, n[45] = Ne) : Ne = n[45];
910
- let Pe = Ne, Fe = U.description !== void 0, Ie = xe(fe), Le = R === "default" || Fe ? "xs" : "2xs", Re;
911
- n[46] !== Y || n[47] !== Me || n[48] !== G ? (Re = G ? { onClick: Me } : { onClick: Y }, n[46] = Y, n[47] = Me, n[48] = G, n[49] = Re) : Re = n[49];
912
- let Z = Re, { rowHeight: ze, minHeight: Be } = Ce(R, Fe), Ve = re ?? (G ? "button" : "option"), He = we({
913
- rootProps: L,
914
- labelId: V,
915
- hasEndContent: !!U.endContent,
916
- rowRole: Ve,
917
- className: ne,
918
- isSelected: pe,
919
- isExpanded: me,
920
- showChevron: K,
921
- rowHeight: ze,
922
- minHeight: Be,
923
- verticalPadding: Le,
924
- paddingLeft: Ie,
925
- selectedBg: ve,
926
- hoverBg: ye,
927
- tone: _e,
928
- isDisabled: q,
929
- variant: R
930
- }), Ue;
931
- n[50] !== q || n[51] !== me || n[52] !== U || n[53] !== V || n[54] !== K || n[55] !== ge || n[56] !== _e || n[57] !== R ? (Ue = /* @__PURE__ */ g(be, {
932
- labelId: V,
933
- item: U,
934
- isExpanded: me,
935
- showChevron: K,
936
- isDisabled: q,
937
- tone: _e,
938
- variant: R,
939
- showContextMenuTrigger: ge
940
- }), n[50] = q, n[51] = me, n[52] = U, n[53] = V, n[54] = K, n[55] = ge, n[56] = _e, n[57] = R, n[58] = Ue) : Ue = n[58];
941
- let Q = Ue, We;
942
- n[59] !== U || n[60] !== Se || n[61] !== B ? (We = (e) => /* @__PURE__ */ g(ee, {
943
- item: U,
944
- menuOpen: Se,
945
- onMenuOpenChange: B,
946
- onMenuSelect: (e) => {
947
- B(!1), e.onAction?.();
948
- },
949
- children: e
950
- }), n[59] = U, n[60] = Se, n[61] = B, n[62] = We) : We = n[62];
951
- let $ = We;
952
- if (z) {
953
- let e;
954
- n[63] !== Z || n[64] !== Q || n[65] !== W || n[66] !== I || n[67] !== t || n[68] !== He ? (e = /* @__PURE__ */ g(f.div, {
955
- ref: t,
956
- ...He,
957
- ...W,
958
- ...Z,
959
- onPointerMove: I,
960
- children: Q
961
- }), n[63] = Z, n[64] = Q, n[65] = W, n[66] = I, n[67] = t, n[68] = He, n[69] = e) : e = n[69];
962
- let r;
963
- return n[70] !== e || n[71] !== $ ? (r = $(e), n[70] = e, n[71] = $, n[72] = r) : r = n[72], r;
964
- }
965
- if (U.href && !K && !q && !G) {
966
- let e = He, r;
967
- n[73] !== Q || n[74] !== W || n[75] !== Y || n[76] !== U.href || n[77] !== I || n[78] !== t || n[79] !== e ? (r = /* @__PURE__ */ g(f.a, {
968
- ref: t,
969
- href: U.href,
970
- ...e,
971
- ...W,
972
- onClick: Y,
973
- onPointerMove: I,
974
- children: Q
975
- }), n[73] = Q, n[74] = W, n[75] = Y, n[76] = U.href, n[77] = I, n[78] = t, n[79] = e, n[80] = r) : r = n[80];
976
- let i;
977
- return n[81] !== r || n[82] !== $ ? (i = $(r), n[81] = r, n[82] = $, n[83] = i) : i = n[83], i;
978
- }
979
- if (ke) {
980
- let e = q || void 0, r = L.tabIndex ?? 0, i;
981
- n[84] !== Z || n[85] !== Q || n[86] !== W || n[87] !== Pe || n[88] !== I || n[89] !== t || n[90] !== He || n[91] !== e || n[92] !== r ? (i = /* @__PURE__ */ g(f.div, {
982
- ref: t,
983
- "aria-disabled": e,
984
- ...He,
985
- ...W,
986
- ...Z,
987
- tabIndex: r,
988
- onKeyDown: Pe,
989
- onPointerMove: I,
990
- children: Q
991
- }), n[84] = Z, n[85] = Q, n[86] = W, n[87] = Pe, n[88] = I, n[89] = t, n[90] = He, n[91] = e, n[92] = r, n[93] = i) : i = n[93];
992
- let a;
993
- return n[94] !== i || n[95] !== $ ? (a = $(i), n[94] = i, n[95] = $, n[96] = a) : a = n[96], a;
994
- }
995
- let Ge = He, Ke;
996
- n[97] !== Z || n[98] !== Q || n[99] !== W || n[100] !== q || n[101] !== I || n[102] !== t || n[103] !== Ge ? (Ke = /* @__PURE__ */ g(f.button, {
997
- ref: t,
998
- type: "button",
999
- disabled: q,
1000
- ...Ge,
1001
- ...W,
1002
- ...Z,
1003
- onPointerMove: I,
1004
- children: Q
1005
- }), n[97] = Z, n[98] = Q, n[99] = W, n[100] = q, n[101] = I, n[102] = t, n[103] = Ge, n[104] = Ke) : Ke = n[104];
1006
- let qe;
1007
- return n[105] !== Ke || n[106] !== $ ? (qe = $(Ke), n[105] = Ke, n[106] = $, n[107] = qe) : qe = n[107], qe;
1008
- });
1009
- function Te(e) {
1010
- return !e;
1011
- }
1012
- function Ee(e) {
1013
- return !e;
1014
- }
1015
- //#endregion
1016
- export { re as a, j as c, I as i, de as n, ne as o, se as r, A as s, H as t };
1017
-
1018
- //# sourceMappingURL=list-row-uqD-q4gv.js.map