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