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