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