@nxgt/material 3.7.4 → 3.8.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 (176) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +39 -6
  3. package/bin/nxgt-theme.js +6 -0
  4. package/dist/{async-slice-o_fpqeGX.js → async-slice-DDjaJY_F.js} +2 -2
  5. package/dist/background--Bf_EbFR.js +159 -0
  6. package/dist/backgrounds/backgrounds.css +2 -0
  7. package/dist/backgrounds/css-react/moon.css +97 -0
  8. package/dist/backgrounds.js +3 -139
  9. package/dist/browser-only-DQ94lWF8.js +18 -0
  10. package/dist/bubble-input-B7BVd9fX.js +237 -0
  11. package/dist/{button--cF4gY14.js → button-DbfdITBB.js} +51 -57
  12. package/dist/charts.js +3 -3
  13. package/dist/{chip-D1B1dL77.js → chip-DpySRqCy.js} +2 -2
  14. package/dist/{client-only.utils-lQ7GqP8w.js → client-only.utils-3nHNzCki.js} +1 -1
  15. package/dist/{code-editor-0CdGwKDg.js → code-editor-BiA14xua.js} +7 -7
  16. package/dist/code-editor.js +6 -6
  17. package/dist/{code-language-items-CGARRbVm.js → code-language-items-C_dJ6GVs.js} +2 -2
  18. package/dist/components/theme-tokens.css +34 -35
  19. package/dist/components/tones/app-tones.css +2 -1
  20. package/dist/components/tones/containers.css +4 -1
  21. package/dist/components/tones/index.css +2 -0
  22. package/dist/components/tones/surface.css +1 -0
  23. package/dist/components/tones/tokens.css +8 -3
  24. package/dist/components/tones/zone-paint.css +15 -0
  25. package/dist/components/ui/feedback/toast/toast-tokens.css +1 -0
  26. package/dist/components/ui/layout/app-shell/activity-backdrop.css +62 -1
  27. package/dist/components/ui/layout/sidebar/sidebar-tokens.css +5 -2
  28. package/dist/components/ui/media/media-player/nxgt-media-player.css +7 -32
  29. package/dist/components/ui/primitives/field-box/field-box-tokens.css +5 -2
  30. package/dist/{components-DD7_NI6U.js → components-B9EIfMdd.js} +18652 -18553
  31. package/dist/components.js +24 -22
  32. package/dist/{dialog-DdJ1C4BR.js → dialog-CkIYpJXk.js} +55 -53
  33. package/dist/dist-B7RjY7SL.js +158 -0
  34. package/dist/dist-C4wtXCjf.js +593 -0
  35. package/dist/dist-DVRQkaTK.js +111 -0
  36. package/dist/dist-lmHmz_bu.js +419 -0
  37. package/dist/dnd.js +1 -1
  38. package/dist/dropdown-menu-BC5Tbhb9.js +908 -0
  39. package/dist/editor.js +527 -527
  40. package/dist/empty-state-s2CSjKXJ.js +126 -0
  41. package/dist/{escape-owner-B8k7DvFa.js → escape-owner-CripBce_.js} +2 -1
  42. package/dist/{field-blur-DFUazxsL.js → field-blur-DPLsMufs.js} +1 -1
  43. package/dist/{field-blur-context-Dw9ZAgBr.js → field-blur-context-1ZwJgsHE.js} +2 -2
  44. package/dist/has-text-content-Ds2dkHX_.js +10 -0
  45. package/dist/hooks.js +35 -33
  46. package/dist/{hover-card-D5iHS9q1.js → hover-card-Cox-tPDz.js} +41 -39
  47. package/dist/{i18n-provider-C6SBK_nO.js → i18n-provider-C6HhBw34.js} +1 -1
  48. package/dist/i18n.js +6 -6
  49. package/dist/{icon-badge-Bb5-73XP.js → icon-badge-q3Ve8gra.js} +3 -3
  50. package/dist/{icon-button-5A6Mrj6w.js → icon-button-DJcWpIhu.js} +2 -1
  51. package/dist/{in-dialog-AiwTD3DK.js → in-dialog-Vwkyp-M5.js} +6 -5
  52. package/dist/lib/backgrounds/background/available.d.ts +3 -3
  53. package/dist/lib/backgrounds/background/background.d.ts +7 -3
  54. package/dist/lib/backgrounds/background/types.d.ts +7 -1
  55. package/dist/lib/backgrounds/index.d.ts +1 -1
  56. package/dist/lib/components/ui/layout/app-shell/activity-chrome.d.ts +17 -0
  57. package/dist/lib/components/ui/layout/app-shell/activity-layout.d.ts +6 -4
  58. package/dist/lib/components/ui/layout/app-shell/backdrop-layer.d.ts +11 -0
  59. package/dist/lib/components/ui/layout/app-shell/keep-shapes-inside.d.ts +17 -0
  60. package/dist/lib/components/ui/layout/app-shell/theme-backdrop.d.ts +6 -0
  61. package/dist/lib/components/ui/layout/app-shell/use-activity-backdrop.d.ts +18 -0
  62. package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +9 -0
  63. package/dist/lib/hooks/resolve-theme.d.ts +46 -1
  64. package/dist/lib/hooks/theme-store.d.ts +35 -4
  65. package/dist/lib/hooks/use-theme.d.ts +20 -4
  66. package/dist/lib/i18n/resources/en/en.d.ts +4 -0
  67. package/dist/lib/i18n/resources/en/material.json.d.ts +4 -0
  68. package/dist/lib/i18n/resources/fr/fr.d.ts +4 -0
  69. package/dist/lib/i18n/resources/fr/material.json.d.ts +4 -0
  70. package/dist/lib/i18n/resources/resources.d.ts +8 -0
  71. package/dist/lib/i18n/translator.d.ts +1 -1
  72. package/dist/lib/theme-picker/index.d.ts +7 -0
  73. package/dist/lib/theme-picker/partials/mini-background.d.ts +10 -0
  74. package/dist/lib/theme-picker/partials/mode-control.d.ts +5 -0
  75. package/dist/lib/theme-picker/partials/theme-tile.d.ts +12 -0
  76. package/dist/lib/theme-picker/theme-label.d.ts +7 -0
  77. package/dist/lib/theme-picker/theme-picker.d.ts +25 -0
  78. package/dist/lib/themes/index.d.ts +14 -0
  79. package/dist/lib/themes/nxgt-theme-provider.d.ts +29 -0
  80. package/dist/lib/themes/nxgt-theme.d.ts +22 -0
  81. package/dist/lib/themes/theme-context.d.ts +28 -0
  82. package/dist/lib/themes/theme-value.d.ts +5 -0
  83. package/dist/lib/vite/index.d.ts +1 -1
  84. package/dist/lib.js +3 -3
  85. package/dist/main.js +43 -39
  86. package/dist/map.js +8 -8
  87. package/dist/material.css +1 -1
  88. package/dist/nxgt-theme-CgSb9Obl.js +37 -0
  89. package/dist/pdf-reader.js +1 -1
  90. package/dist/print.js +2 -2
  91. package/dist/{public-SsiazLEv.js → public-Ce30uvp0.js} +591 -587
  92. package/dist/read-storage-C2J90bNm.js +10 -0
  93. package/dist/{rich-code-block-CwNwQs5z.js → rich-code-block-C2Fp_FDU.js} +5 -5
  94. package/dist/{sortable-provider-BvD98s8Y.js → sortable-provider-pVaEZzty.js} +3 -3
  95. package/dist/{spinner-CtGCPza-.js → spinner-CsHcmcpF.js} +2 -2
  96. package/dist/{stored-language-Bb7yX5uE.js → stored-language-BeIKw3-K.js} +15 -15
  97. package/dist/styles.css +8 -1
  98. package/dist/theme-context-BagPvRcz.js +16 -0
  99. package/dist/theme-picker.js +118 -0
  100. package/dist/theme-store-CSl51uNH.js +91 -0
  101. package/dist/theme-toggle-C8os82b4.js +48 -0
  102. package/dist/themes.js +42 -0
  103. package/dist/toggle-group-j8zaxEg1.js +69 -0
  104. package/dist/{toolbar-items-DsDDD5AY.js → toolbar-items-CqHvlTU8.js} +443 -589
  105. package/dist/tooltip-rhbqNmr3.js +1064 -0
  106. package/dist/{translate-material-Bsjc4Tow.js → translate-material-CGZljjp1.js} +2 -2
  107. package/dist/{translator-or2y0JJB.js → translator-DCYO4Ij3.js} +3 -3
  108. package/dist/{use-background-activity-B8jLHNop.js → use-background-activity-KxQgelFF.js} +1 -1
  109. package/dist/{use-chat-composer-DZ01a16D.js → use-chat-composer-CDrgWGMM.js} +4684 -4886
  110. package/dist/{use-heading-spy-ByOQNnFZ.js → use-heading-spy-DXo6IOX9.js} +52 -121
  111. package/dist/{use-material-translation-hLQzOjF0.js → use-material-translation-DkxcLbLM.js} +2 -2
  112. package/dist/use-slice-reducer-BGkeGtML.js +42 -0
  113. package/dist/use-theme-Cd-aiDJo.js +31 -0
  114. package/docs/README.md +2 -1
  115. package/docs/components/foundations.md +39 -0
  116. package/docs/components/navigation-and-layout.md +3 -3
  117. package/docs/getting-started.md +1 -1
  118. package/docs/guides/app-shell.md +46 -7
  119. package/docs/guides/backgrounds.md +43 -7
  120. package/docs/guides/i18n.md +1 -1
  121. package/docs/guides/themes.md +103 -0
  122. package/docs/guides/theming.md +288 -84
  123. package/docs/guides/vite-plugin.md +26 -0
  124. package/docs/previews/backgrounds-background-from-theme.webp +0 -0
  125. package/docs/previews/backgrounds-geometry-more.webp +0 -0
  126. package/docs/previews/backgrounds-geometry.webp +0 -0
  127. package/docs/previews/backgrounds-illustrated-scenes.webp +0 -0
  128. package/docs/previews/backgrounds-light-more.webp +0 -0
  129. package/docs/previews/backgrounds-light.webp +0 -0
  130. package/docs/previews/backgrounds-material-more.webp +0 -0
  131. package/docs/previews/backgrounds-matrix.webp +0 -0
  132. package/docs/previews/backgrounds-moon.webp +0 -0
  133. package/docs/previews/backgrounds-motif-shapes.webp +0 -0
  134. package/docs/previews/backgrounds-motifs.webp +0 -0
  135. package/docs/previews/foundations-themes-themepicker.webp +0 -0
  136. package/docs/roadmap.md +25 -0
  137. package/docs/troubleshooting.md +35 -7
  138. package/lib/backgrounds/backgrounds.css +2 -0
  139. package/lib/backgrounds/css-react/moon.css +97 -0
  140. package/lib/components/theme-tokens.css +34 -35
  141. package/lib/components/tones/app-tones.css +2 -1
  142. package/lib/components/tones/containers.css +4 -1
  143. package/lib/components/tones/index.css +2 -0
  144. package/lib/components/tones/surface.css +1 -0
  145. package/lib/components/tones/tokens.css +8 -3
  146. package/lib/components/tones/zone-paint.css +15 -0
  147. package/lib/components/ui/feedback/toast/toast-tokens.css +1 -0
  148. package/lib/components/ui/layout/app-shell/activity-backdrop.css +62 -1
  149. package/lib/components/ui/layout/sidebar/sidebar-tokens.css +5 -2
  150. package/lib/components/ui/media/media-player/nxgt-media-player.css +7 -32
  151. package/lib/components/ui/primitives/field-box/field-box-tokens.css +5 -2
  152. package/lib/styles.css +8 -1
  153. package/lib/theme-picker/theme-picker-list.css +29 -0
  154. package/lib/theme-picker/theme-picker.css +192 -0
  155. package/lib/theme-picker/theme-tile-background.css +77 -0
  156. package/lib/theme-picker/theme-tile-textures-night.css +63 -0
  157. package/lib/theme-picker/theme-tile-textures.css +153 -0
  158. package/lib/themes/ambre.css +134 -0
  159. package/lib/themes/ardoise.css +133 -0
  160. package/lib/themes/bleumono.css +136 -0
  161. package/lib/themes/bluemoon.css +136 -0
  162. package/lib/themes/corail.css +136 -0
  163. package/lib/themes/foret.css +133 -0
  164. package/lib/themes/lavande.css +133 -0
  165. package/lib/themes/menthe.css +136 -0
  166. package/lib/themes/ocean.css +136 -0
  167. package/lib/themes/pink.css +134 -0
  168. package/lib/themes/prune.css +133 -0
  169. package/lib/themes/sable.css +133 -0
  170. package/lib/themes/slate.css +133 -0
  171. package/lib/themes/teal.css +137 -0
  172. package/package.json +30 -2
  173. package/dist/dropdown-menu-DWtgUVW7.js +0 -1490
  174. package/dist/empty-state-CRWLQ1sM.js +0 -191
  175. package/dist/tooltip-tmFoTU_d.js +0 -1582
  176. package/dist/use-slice-reducer-0r5dXnJe.js +0 -58
@@ -0,0 +1,908 @@
1
+ import { t as e } from "./utils-Bcd2Z3ea.js";
2
+ import { n as t, o as n, r } from "./dist-DVRQkaTK.js";
3
+ import { a as i, c as a, i as o, l as s, n as c, r as l, s as u, u as d } from "./dist-lmHmz_bu.js";
4
+ import { b as f, c as p, d as m, f as h, u as ee, x as te } from "./tooltip-rhbqNmr3.js";
5
+ import { a as g, i as _, n as ne, r as v, t as y } from "./dist-C4wtXCjf.js";
6
+ import { a as re, c as ie, l as ae, o as oe, r as b, s as se, t as ce } from "./in-dialog-Vwkyp-M5.js";
7
+ import { t as x } from "./spinner-CsHcmcpF.js";
8
+ import * as S from "react";
9
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
10
+ //#region ../../node_modules/@radix-ui/react-menu/dist/index.mjs
11
+ var E = Object.defineProperty, D = (e, t) => E(e, "name", {
12
+ value: t,
13
+ configurable: !0
14
+ }), O = ["Enter", " "], le = [
15
+ "ArrowDown",
16
+ "PageUp",
17
+ "Home"
18
+ ], ue = [
19
+ "ArrowUp",
20
+ "PageDown",
21
+ "End"
22
+ ], de = [...le, ...ue], k = {
23
+ ltr: [...O, "ArrowRight"],
24
+ rtl: [...O, "ArrowLeft"]
25
+ }, A = {
26
+ ltr: ["ArrowLeft"],
27
+ rtl: ["ArrowRight"]
28
+ }, j = "Menu", [M, fe, pe] = g(j), [N, P] = a(j, [
29
+ pe,
30
+ h,
31
+ v
32
+ ]), F = h(), me = v(), [he, I] = N(j), [ge, L] = N(j), _e = /* @__PURE__ */ D((e) => {
33
+ let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = F(t), [l, u] = S.useState(null), d = S.useRef(!1), f = c(a), p = _(i);
34
+ return S.useEffect(() => {
35
+ let e = /* @__PURE__ */ D(() => {
36
+ d.current = !0, document.addEventListener("pointerdown", t, {
37
+ capture: !0,
38
+ once: !0
39
+ }), document.addEventListener("pointermove", t, {
40
+ capture: !0,
41
+ once: !0
42
+ });
43
+ }, "handleKeyDown"), t = /* @__PURE__ */ D(() => d.current = !1, "handlePointer");
44
+ return document.addEventListener("keydown", e, { capture: !0 }), () => {
45
+ document.removeEventListener("keydown", e, { capture: !0 }), document.removeEventListener("pointerdown", t, { capture: !0 }), document.removeEventListener("pointermove", t, { capture: !0 });
46
+ };
47
+ }, []), S.useEffect(() => {
48
+ if (!n) return;
49
+ let e = /* @__PURE__ */ D(() => f(!1), "handleBlur");
50
+ return window.addEventListener("blur", e), () => window.removeEventListener("blur", e);
51
+ }, [n, f]), /* @__PURE__ */ w(m, {
52
+ ...s,
53
+ children: /* @__PURE__ */ w(he, {
54
+ scope: t,
55
+ open: n,
56
+ onOpenChange: f,
57
+ content: l,
58
+ onContentChange: u,
59
+ children: /* @__PURE__ */ w(ge, {
60
+ scope: t,
61
+ onClose: S.useCallback(() => f(!1), [f]),
62
+ isUsingKeyboardRef: d,
63
+ dir: p,
64
+ modal: o,
65
+ children: r
66
+ })
67
+ })
68
+ });
69
+ }, "Menu"), ve = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
70
+ let { __scopeMenu: n, ...r } = e;
71
+ return /* @__PURE__ */ w(p, {
72
+ ...F(n),
73
+ ...r,
74
+ ref: t
75
+ });
76
+ }, "MenuAnchor")), ye = "MenuPortal", [be, xe] = N(ye, { forceMount: void 0 }), Se = /* @__PURE__ */ D((e) => {
77
+ let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, a = I(ye, t);
78
+ return /* @__PURE__ */ w(be, {
79
+ scope: t,
80
+ forceMount: n,
81
+ children: /* @__PURE__ */ w(o, {
82
+ present: n || a.open,
83
+ children: /* @__PURE__ */ w(f, {
84
+ asChild: !0,
85
+ container: i,
86
+ children: r
87
+ })
88
+ })
89
+ });
90
+ }, "MenuPortal"), R = "MenuContent", [Ce, z] = N(R), we = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
91
+ let n = xe(R, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = I(R, e.__scopeMenu), s = L(R, e.__scopeMenu);
92
+ return /* @__PURE__ */ w(M.Provider, {
93
+ scope: e.__scopeMenu,
94
+ children: /* @__PURE__ */ w(o, {
95
+ present: r || a.open,
96
+ children: /* @__PURE__ */ w(M.Slot, {
97
+ scope: e.__scopeMenu,
98
+ children: s.modal ? /* @__PURE__ */ w(Te, {
99
+ ...i,
100
+ ref: t
101
+ }) : /* @__PURE__ */ w(Ee, {
102
+ ...i,
103
+ ref: t
104
+ })
105
+ })
106
+ })
107
+ });
108
+ }, "MenuContent")), Te = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
109
+ let r = I(R, e.__scopeMenu), i = S.useRef(null), a = n(t, i);
110
+ return S.useEffect(() => {
111
+ let e = i.current;
112
+ if (e) return oe(e);
113
+ }, []), /* @__PURE__ */ w(B, {
114
+ ...e,
115
+ ref: a,
116
+ trapFocus: r.open,
117
+ disableOutsidePointerEvents: r.open,
118
+ disableOutsideScroll: !0,
119
+ onFocusOutside: u(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
120
+ onDismiss: () => r.onOpenChange(!1)
121
+ });
122
+ }, "MenuRootContentModal")), Ee = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
123
+ let n = I(R, e.__scopeMenu);
124
+ return /* @__PURE__ */ w(B, {
125
+ ...e,
126
+ ref: t,
127
+ trapFocus: !1,
128
+ disableOutsidePointerEvents: !1,
129
+ disableOutsideScroll: !1,
130
+ onDismiss: () => n.onOpenChange(!1)
131
+ });
132
+ }, "MenuRootContentNonModal")), De = r("MenuContent.ScrollLock"), B = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
133
+ let { __scopeMenu: r, loop: i = !1, trapFocus: a, onOpenAutoFocus: o, onCloseAutoFocus: s, disableOutsidePointerEvents: c, onEntryFocus: l, onEscapeKeyDown: d, onPointerDownOutside: f, onFocusOutside: p, onInteractOutside: m, onDismiss: h, disableOutsideScroll: g, ..._ } = e, v = I(R, r), y = L(R, r), re = F(r), oe = me(r), b = fe(r), [ce, x] = S.useState(null), C = S.useRef(null), T = n(t, C, v.onContentChange), E = S.useRef(0), O = S.useRef(""), le = S.useRef(0), k = S.useRef(null), A = S.useRef("right"), j = S.useRef(0), M = g ? se : S.Fragment, pe = g ? {
134
+ as: De,
135
+ allowPinchZoom: !0
136
+ } : void 0, N = /* @__PURE__ */ D((e) => {
137
+ let t = O.current + e, n = b().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = Qe(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
138
+ (/* @__PURE__ */ D((function e(t) {
139
+ O.current = t, window.clearTimeout(E.current), t !== "" && (E.current = window.setTimeout(() => e(""), 1e3));
140
+ }), "updateSearch"))(t), o && setTimeout(() => o.focus());
141
+ }, "handleTypeaheadSearch");
142
+ S.useEffect(() => () => window.clearTimeout(E.current), []), ie();
143
+ let P = S.useCallback((e) => A.current === k.current?.side && et(e, k.current?.area), []);
144
+ return /* @__PURE__ */ w(Ce, {
145
+ scope: r,
146
+ searchRef: O,
147
+ onItemEnter: S.useCallback((e) => {
148
+ P(e) && e.preventDefault();
149
+ }, [P]),
150
+ onItemLeave: S.useCallback((e) => {
151
+ P(e) || (C.current?.focus(), x(null));
152
+ }, [P]),
153
+ onTriggerLeave: S.useCallback((e) => {
154
+ P(e) && e.preventDefault();
155
+ }, [P]),
156
+ pointerGraceTimerRef: le,
157
+ onPointerGraceIntentChange: S.useCallback((e) => {
158
+ k.current = e;
159
+ }, []),
160
+ children: /* @__PURE__ */ w(M, {
161
+ ...pe,
162
+ children: /* @__PURE__ */ w(ae, {
163
+ asChild: !0,
164
+ trapped: a,
165
+ onMountAutoFocus: u(o, (e) => {
166
+ e.preventDefault(), C.current?.focus({ preventScroll: !0 });
167
+ }),
168
+ onUnmountAutoFocus: s,
169
+ children: /* @__PURE__ */ w(te, {
170
+ asChild: !0,
171
+ disableOutsidePointerEvents: c,
172
+ onEscapeKeyDown: d,
173
+ onPointerDownOutside: f,
174
+ onFocusOutside: p,
175
+ onInteractOutside: m,
176
+ onDismiss: h,
177
+ children: /* @__PURE__ */ w(ne, {
178
+ asChild: !0,
179
+ ...oe,
180
+ dir: y.dir,
181
+ orientation: "vertical",
182
+ loop: i,
183
+ currentTabStopId: ce,
184
+ onCurrentTabStopIdChange: x,
185
+ onEntryFocus: u(l, (e) => {
186
+ y.isUsingKeyboardRef.current || e.preventDefault();
187
+ }),
188
+ preventScrollOnEntryFocus: !0,
189
+ children: /* @__PURE__ */ w(ee, {
190
+ role: "menu",
191
+ "aria-orientation": "vertical",
192
+ "data-state": W(v.open),
193
+ "data-radix-menu-content": "",
194
+ dir: y.dir,
195
+ ...re,
196
+ ..._,
197
+ ref: T,
198
+ style: {
199
+ outline: "none",
200
+ ..._.style
201
+ },
202
+ onKeyDown: u(_.onKeyDown, (e) => {
203
+ let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
204
+ t && (e.key === "Tab" && e.preventDefault(), !n && r && N(e.key));
205
+ let i = C.current;
206
+ if (e.target !== i || !de.includes(e.key)) return;
207
+ e.preventDefault();
208
+ let a = b().filter((e) => !e.disabled).map((e) => e.ref.current);
209
+ ue.includes(e.key) && a.reverse(), Xe(a);
210
+ }),
211
+ onBlur: u(e.onBlur, (e) => {
212
+ e.currentTarget.contains(e.target) || (window.clearTimeout(E.current), O.current = "");
213
+ }),
214
+ onPointerMove: u(e.onPointerMove, q((e) => {
215
+ let t = e.target, n = j.current !== e.clientX;
216
+ if (e.currentTarget.contains(t) && n) {
217
+ let t = e.clientX > j.current ? "right" : "left";
218
+ A.current = t, j.current = e.clientX;
219
+ }
220
+ }))
221
+ })
222
+ })
223
+ })
224
+ })
225
+ })
226
+ });
227
+ }, "MenuContentImpl")), Oe = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
228
+ let { __scopeMenu: n, ...r } = e;
229
+ return /* @__PURE__ */ w(s.div, {
230
+ role: "group",
231
+ ...r,
232
+ ref: t
233
+ });
234
+ }, "MenuGroup")), ke = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
235
+ let { __scopeMenu: n, ...r } = e;
236
+ return /* @__PURE__ */ w(s.div, {
237
+ ...r,
238
+ ref: t
239
+ });
240
+ }, "MenuLabel")), V = "MenuItem", Ae = "menu.itemSelect", H = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
241
+ let { disabled: r = !1, onSelect: i, ...a } = e, o = S.useRef(null), s = L(V, e.__scopeMenu), c = z(V, e.__scopeMenu), l = n(t, o), f = S.useRef(!1), p = /* @__PURE__ */ D(() => {
242
+ let e = o.current;
243
+ if (!r && e) {
244
+ let t = new CustomEvent(Ae, {
245
+ bubbles: !0,
246
+ cancelable: !0
247
+ });
248
+ e.addEventListener(Ae, (e) => i?.(e), { once: !0 }), d(e, t), t.defaultPrevented ? f.current = !1 : s.onClose();
249
+ }
250
+ }, "handleSelect");
251
+ return /* @__PURE__ */ w(je, {
252
+ ...a,
253
+ ref: l,
254
+ disabled: r,
255
+ onClick: u(e.onClick, p),
256
+ onPointerDown: (t) => {
257
+ e.onPointerDown?.(t), f.current = !0;
258
+ },
259
+ onPointerUp: u(e.onPointerUp, (e) => {
260
+ f.current || e.currentTarget?.click();
261
+ }),
262
+ onKeyDown: u(e.onKeyDown, (e) => {
263
+ r || e.target !== e.currentTarget || c.searchRef.current !== "" && e.key === " " || O.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
264
+ })
265
+ });
266
+ }, "MenuItem")), je = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
267
+ let { __scopeMenu: r, disabled: i = !1, textValue: a, ...o } = e, c = z(V, r), l = me(r), d = S.useRef(null), f = n(t, d), [p, m] = S.useState(!1), [h, ee] = S.useState("");
268
+ return S.useEffect(() => {
269
+ let e = d.current;
270
+ e && ee((e.textContent ?? "").trim());
271
+ }, [o.children]), /* @__PURE__ */ w(M.ItemSlot, {
272
+ scope: r,
273
+ disabled: i,
274
+ textValue: a ?? h,
275
+ children: /* @__PURE__ */ w(y, {
276
+ asChild: !0,
277
+ ...l,
278
+ focusable: !i,
279
+ children: /* @__PURE__ */ w(s.div, {
280
+ role: "menuitem",
281
+ "data-highlighted": p ? "" : void 0,
282
+ "aria-disabled": i || void 0,
283
+ "data-disabled": i ? "" : void 0,
284
+ ...o,
285
+ ref: f,
286
+ onPointerMove: u(e.onPointerMove, q((e) => {
287
+ i ? c.onItemLeave(e) : (c.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({ preventScroll: !0 }));
288
+ })),
289
+ onPointerLeave: u(e.onPointerLeave, q((e) => c.onItemLeave(e))),
290
+ onFocus: u(e.onFocus, () => m(!0)),
291
+ onBlur: u(e.onBlur, () => m(!1))
292
+ })
293
+ })
294
+ });
295
+ }, "MenuItemImpl")), Me = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
296
+ let { checked: n = !1, onCheckedChange: r, ...i } = e;
297
+ return /* @__PURE__ */ w(ze, {
298
+ scope: e.__scopeMenu,
299
+ checked: n,
300
+ children: /* @__PURE__ */ w(H, {
301
+ role: "menuitemcheckbox",
302
+ "aria-checked": G(n) ? "mixed" : n,
303
+ ...i,
304
+ ref: t,
305
+ "data-state": K(n),
306
+ onSelect: u(i.onSelect, () => r?.(G(n) ? !0 : !n), { checkForDefaultPrevented: !1 })
307
+ })
308
+ });
309
+ }, "MenuCheckboxItem")), [Ne, Pe] = N("MenuRadioGroup", {
310
+ value: void 0,
311
+ onValueChange: /* @__PURE__ */ D(() => {}, "onValueChange")
312
+ }), Fe = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
313
+ let { value: n, onValueChange: r, ...i } = e, a = c(r);
314
+ return /* @__PURE__ */ w(Ne, {
315
+ scope: e.__scopeMenu,
316
+ value: n,
317
+ onValueChange: a,
318
+ children: /* @__PURE__ */ w(Oe, {
319
+ ...i,
320
+ ref: t
321
+ })
322
+ });
323
+ }, "MenuRadioGroup")), Ie = "MenuRadioItem", Le = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
324
+ let { value: n, ...r } = e, i = Pe(Ie, e.__scopeMenu), a = n === i.value;
325
+ return /* @__PURE__ */ w(ze, {
326
+ scope: e.__scopeMenu,
327
+ checked: a,
328
+ children: /* @__PURE__ */ w(H, {
329
+ role: "menuitemradio",
330
+ "aria-checked": a,
331
+ ...r,
332
+ ref: t,
333
+ "data-state": K(a),
334
+ onSelect: u(r.onSelect, () => i.onValueChange?.(n), { checkForDefaultPrevented: !1 })
335
+ })
336
+ });
337
+ }, "MenuRadioItem")), Re = "MenuItemIndicator", [ze, Be] = N(Re, { checked: !1 }), Ve = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
338
+ let { __scopeMenu: n, forceMount: r, ...i } = e, a = Be(Re, n);
339
+ return /* @__PURE__ */ w(o, {
340
+ present: r || G(a.checked) || a.checked === !0,
341
+ children: /* @__PURE__ */ w(s.span, {
342
+ ...i,
343
+ ref: t,
344
+ "data-state": K(a.checked)
345
+ })
346
+ });
347
+ }, "MenuItemIndicator")), He = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
348
+ let { __scopeMenu: n, ...r } = e;
349
+ return /* @__PURE__ */ w(s.div, {
350
+ role: "separator",
351
+ "aria-orientation": "horizontal",
352
+ ...r,
353
+ ref: t
354
+ });
355
+ }, "MenuSeparator")), Ue = "MenuSub", [We, Ge] = N(Ue), Ke = /* @__PURE__ */ D((e) => {
356
+ let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = I(Ue, t), o = F(t), [s, u] = S.useState(null), [d, f] = S.useState(null), p = c(i);
357
+ return S.useEffect(() => (a.open === !1 && p(!1), () => p(!1)), [a.open, p]), /* @__PURE__ */ w(m, {
358
+ ...o,
359
+ children: /* @__PURE__ */ w(he, {
360
+ scope: t,
361
+ open: r,
362
+ onOpenChange: p,
363
+ content: d,
364
+ onContentChange: f,
365
+ children: /* @__PURE__ */ w(We, {
366
+ scope: t,
367
+ contentId: l(),
368
+ triggerId: l(),
369
+ trigger: s,
370
+ onTriggerChange: u,
371
+ children: n
372
+ })
373
+ })
374
+ });
375
+ }, "MenuSub"), U = "MenuSubTrigger", qe = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
376
+ let r = I(U, e.__scopeMenu), i = L(U, e.__scopeMenu), a = Ge(U, e.__scopeMenu), o = z(U, e.__scopeMenu), s = S.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: l } = o, d = { __scopeMenu: e.__scopeMenu }, f = S.useCallback(() => {
377
+ s.current && window.clearTimeout(s.current), s.current = null;
378
+ }, []);
379
+ S.useEffect(() => f, [f]), S.useEffect(() => {
380
+ let e = c.current;
381
+ return () => {
382
+ window.clearTimeout(e), l(null);
383
+ };
384
+ }, [c, l]);
385
+ let p = n(t, a.onTriggerChange);
386
+ return /* @__PURE__ */ w(ve, {
387
+ asChild: !0,
388
+ ...d,
389
+ children: /* @__PURE__ */ w(je, {
390
+ id: a.triggerId,
391
+ "aria-haspopup": "menu",
392
+ "aria-expanded": r.open,
393
+ "aria-controls": r.open ? a.contentId : void 0,
394
+ "data-state": W(r.open),
395
+ ...e,
396
+ ref: p,
397
+ onClick: (t) => {
398
+ e.onClick?.(t), !(e.disabled || t.defaultPrevented) && (t.currentTarget.focus(), r.open || r.onOpenChange(!0));
399
+ },
400
+ onPointerMove: u(e.onPointerMove, q((t) => {
401
+ o.onItemEnter(t), !t.defaultPrevented && !e.disabled && !r.open && !s.current && (o.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
402
+ r.onOpenChange(!0), f();
403
+ }, 100));
404
+ })),
405
+ onPointerLeave: u(e.onPointerLeave, q((e) => {
406
+ f();
407
+ let t = r.content?.getBoundingClientRect();
408
+ if (t) {
409
+ let n = r.content?.dataset.side, i = n === "right", a = i ? -5 : 5, s = t[i ? "left" : "right"], l = t[i ? "right" : "left"];
410
+ o.onPointerGraceIntentChange({
411
+ area: [
412
+ {
413
+ x: e.clientX + a,
414
+ y: e.clientY
415
+ },
416
+ {
417
+ x: s,
418
+ y: t.top
419
+ },
420
+ {
421
+ x: l,
422
+ y: t.top
423
+ },
424
+ {
425
+ x: l,
426
+ y: t.bottom
427
+ },
428
+ {
429
+ x: s,
430
+ y: t.bottom
431
+ }
432
+ ],
433
+ side: n
434
+ }), window.clearTimeout(c.current), c.current = window.setTimeout(() => o.onPointerGraceIntentChange(null), 300);
435
+ } else {
436
+ if (o.onTriggerLeave(e), e.defaultPrevented) return;
437
+ o.onPointerGraceIntentChange(null);
438
+ }
439
+ })),
440
+ onKeyDown: u(e.onKeyDown, (t) => {
441
+ e.disabled || t.target !== t.currentTarget || o.searchRef.current !== "" && t.key === " " || k[i.dir].includes(t.key) && (r.onOpenChange(!0), r.content?.focus(), t.preventDefault());
442
+ })
443
+ })
444
+ });
445
+ }, "MenuSubTrigger")), Je = "MenuSubContent", Ye = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ D(function(e, t) {
446
+ let r = xe(R, e.__scopeMenu), { forceMount: i = r.forceMount, align: a = "start", ...s } = e, c = I(R, e.__scopeMenu), l = L(R, e.__scopeMenu), d = Ge(Je, e.__scopeMenu), f = S.useRef(null), p = n(t, f);
447
+ return /* @__PURE__ */ w(M.Provider, {
448
+ scope: e.__scopeMenu,
449
+ children: /* @__PURE__ */ w(o, {
450
+ present: i || c.open,
451
+ children: /* @__PURE__ */ w(M.Slot, {
452
+ scope: e.__scopeMenu,
453
+ children: /* @__PURE__ */ w(B, {
454
+ id: d.contentId,
455
+ "aria-labelledby": d.triggerId,
456
+ ...s,
457
+ ref: p,
458
+ align: a,
459
+ side: l.dir === "rtl" ? "left" : "right",
460
+ disableOutsidePointerEvents: !1,
461
+ disableOutsideScroll: !1,
462
+ trapFocus: !1,
463
+ onOpenAutoFocus: (e) => {
464
+ l.isUsingKeyboardRef.current && f.current?.focus(), e.preventDefault();
465
+ },
466
+ onCloseAutoFocus: (e) => e.preventDefault(),
467
+ onFocusOutside: u(e.onFocusOutside, (e) => {
468
+ e.target !== d.trigger && c.onOpenChange(!1);
469
+ }),
470
+ onEscapeKeyDown: u(e.onEscapeKeyDown, (e) => {
471
+ l.onClose(), e.preventDefault();
472
+ }),
473
+ onKeyDown: u(e.onKeyDown, (e) => {
474
+ let t = e.currentTarget.contains(e.target), n = A[l.dir].includes(e.key);
475
+ t && n && (c.onOpenChange(!1), d.trigger?.focus(), e.preventDefault());
476
+ })
477
+ })
478
+ })
479
+ })
480
+ });
481
+ }, "MenuSubContent"));
482
+ function W(e) {
483
+ return e ? "open" : "closed";
484
+ }
485
+ D(W, "getOpenState");
486
+ function G(e) {
487
+ return e === "indeterminate";
488
+ }
489
+ D(G, "isIndeterminate");
490
+ function K(e) {
491
+ return G(e) ? "indeterminate" : e ? "checked" : "unchecked";
492
+ }
493
+ D(K, "getCheckedState");
494
+ function Xe(e) {
495
+ let t = document.activeElement;
496
+ for (let n of e) if (n === t || (n.focus(), document.activeElement !== t)) return;
497
+ }
498
+ D(Xe, "focusFirst");
499
+ function Ze(e, t) {
500
+ return e.map((n, r) => e[(t + r) % e.length]);
501
+ }
502
+ D(Ze, "wrapArray");
503
+ function Qe(e, t, n) {
504
+ let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = Ze(e, Math.max(i, 0));
505
+ r.length === 1 && (a = a.filter((e) => e !== n));
506
+ let o = a.find((e) => e.toLowerCase().startsWith(r.toLowerCase()));
507
+ return o === n ? void 0 : o;
508
+ }
509
+ D(Qe, "getNextMatch");
510
+ function $e(e, t) {
511
+ let { x: n, y: r } = e, i = !1;
512
+ for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
513
+ let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
514
+ l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
515
+ }
516
+ return i;
517
+ }
518
+ D($e, "isPointInPolygon");
519
+ function et(e, t) {
520
+ return t ? $e({
521
+ x: e.clientX,
522
+ y: e.clientY
523
+ }, t) : !1;
524
+ }
525
+ D(et, "isPointerInGraceArea");
526
+ function q(e) {
527
+ return (t) => t.pointerType === "mouse" ? e(t) : void 0;
528
+ }
529
+ D(q, "whenMouse");
530
+ var tt = _e, nt = ve, rt = Se, it = we, at = Oe, ot = ke, st = H, ct = Me, lt = Fe, ut = Le, dt = Ve, ft = He, pt = Ke, mt = qe, ht = Ye, gt = Object.defineProperty, J = (e, t) => gt(e, "name", {
531
+ value: t,
532
+ configurable: !0
533
+ }), Y = "DropdownMenu", [_t, vt] = a(Y, [P]), X = P(), [yt, bt] = _t(Y), xt = /* @__PURE__ */ J((e) => {
534
+ let { __scopeDropdownMenu: t, children: n, dir: r, open: a, defaultOpen: o, onOpenChange: s, modal: c = !0 } = e, u = X(t), d = S.useRef(null), [f, p] = i({
535
+ prop: a,
536
+ defaultProp: o ?? !1,
537
+ onChange: s,
538
+ caller: Y
539
+ });
540
+ return /* @__PURE__ */ w(yt, {
541
+ scope: t,
542
+ triggerId: l(),
543
+ triggerRef: d,
544
+ contentId: l(),
545
+ open: f,
546
+ onOpenChange: p,
547
+ onOpenToggle: S.useCallback(() => p((e) => !e), [p]),
548
+ modal: c,
549
+ children: /* @__PURE__ */ w(tt, {
550
+ ...u,
551
+ open: f,
552
+ onOpenChange: p,
553
+ dir: r,
554
+ modal: c,
555
+ children: n
556
+ })
557
+ });
558
+ }, "DropdownMenu"), St = "DropdownMenuTrigger", Ct = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ J(function(e, t) {
559
+ let { __scopeDropdownMenu: r, disabled: i = !1, ...a } = e, o = bt(St, r), c = X(r), l = n(t, o.triggerRef);
560
+ return /* @__PURE__ */ w(nt, {
561
+ asChild: !0,
562
+ ...c,
563
+ children: /* @__PURE__ */ w(s.button, {
564
+ type: "button",
565
+ id: o.triggerId,
566
+ "aria-haspopup": "menu",
567
+ "aria-expanded": o.open,
568
+ "aria-controls": o.open ? o.contentId : void 0,
569
+ "data-state": o.open ? "open" : "closed",
570
+ "data-disabled": i ? "" : void 0,
571
+ disabled: i,
572
+ ...a,
573
+ ref: l,
574
+ onPointerDown: u(e.onPointerDown, (e) => {
575
+ !i && e.button === 0 && e.ctrlKey === !1 && (o.onOpenToggle(), o.open || e.preventDefault());
576
+ }),
577
+ onKeyDown: u(e.onKeyDown, (e) => {
578
+ i || (["Enter", " "].includes(e.key) && o.onOpenToggle(), e.key === "ArrowDown" && o.onOpenChange(!0), [
579
+ "Enter",
580
+ " ",
581
+ "ArrowDown"
582
+ ].includes(e.key) && e.preventDefault());
583
+ })
584
+ })
585
+ });
586
+ }, "DropdownMenuTrigger")), wt = /* @__PURE__ */ J((e) => {
587
+ let { __scopeDropdownMenu: t, ...n } = e;
588
+ return /* @__PURE__ */ w(rt, {
589
+ ...X(t),
590
+ ...n
591
+ });
592
+ }, "DropdownMenuPortal"), Tt = "DropdownMenuContent", Et = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ J(function(e, t) {
593
+ let { __scopeDropdownMenu: n, ...r } = e, i = bt(Tt, n), a = X(n), o = S.useRef(!1);
594
+ return /* @__PURE__ */ w(it, {
595
+ id: i.contentId,
596
+ "aria-labelledby": i.triggerId,
597
+ ...a,
598
+ ...r,
599
+ ref: t,
600
+ onCloseAutoFocus: u(e.onCloseAutoFocus, (e) => {
601
+ o.current || i.triggerRef.current?.focus(), o.current = !1, e.preventDefault();
602
+ }),
603
+ onInteractOutside: u(e.onInteractOutside, (e) => {
604
+ let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
605
+ (!i.modal || r) && (o.current = !0);
606
+ }),
607
+ style: {
608
+ ...e.style,
609
+ "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
610
+ "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
611
+ "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
612
+ "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
613
+ "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
614
+ }
615
+ });
616
+ }, "DropdownMenuContent")), Dt = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ J(function(e, t) {
617
+ let { __scopeDropdownMenu: n, ...r } = e;
618
+ return /* @__PURE__ */ w(at, {
619
+ ...X(n),
620
+ ...r,
621
+ ref: t
622
+ });
623
+ }, "DropdownMenuGroup")), Ot = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ J(function(e, t) {
624
+ let { __scopeDropdownMenu: n, ...r } = e;
625
+ return /* @__PURE__ */ w(ot, {
626
+ ...X(n),
627
+ ...r,
628
+ ref: t
629
+ });
630
+ }, "DropdownMenuLabel")), kt = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ J(function(e, t) {
631
+ let { __scopeDropdownMenu: n, ...r } = e;
632
+ return /* @__PURE__ */ w(st, {
633
+ ...X(n),
634
+ ...r,
635
+ ref: t
636
+ });
637
+ }, "DropdownMenuItem")), At = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ J(function(e, t) {
638
+ let { __scopeDropdownMenu: n, ...r } = e;
639
+ return /* @__PURE__ */ w(ct, {
640
+ ...X(n),
641
+ ...r,
642
+ ref: t
643
+ });
644
+ }, "DropdownMenuCheckboxItem")), jt = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ J(function(e, t) {
645
+ let { __scopeDropdownMenu: n, ...r } = e;
646
+ return /* @__PURE__ */ w(lt, {
647
+ ...X(n),
648
+ ...r,
649
+ ref: t
650
+ });
651
+ }, "DropdownMenuRadioGroup")), Mt = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ J(function(e, t) {
652
+ let { __scopeDropdownMenu: n, ...r } = e;
653
+ return /* @__PURE__ */ w(ut, {
654
+ ...X(n),
655
+ ...r,
656
+ ref: t
657
+ });
658
+ }, "DropdownMenuRadioItem")), Nt = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ J(function(e, t) {
659
+ let { __scopeDropdownMenu: n, ...r } = e;
660
+ return /* @__PURE__ */ w(dt, {
661
+ ...X(n),
662
+ ...r,
663
+ ref: t
664
+ });
665
+ }, "DropdownMenuItemIndicator")), Pt = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ J(function(e, t) {
666
+ let { __scopeDropdownMenu: n, ...r } = e;
667
+ return /* @__PURE__ */ w(ft, {
668
+ ...X(n),
669
+ ...r,
670
+ ref: t
671
+ });
672
+ }, "DropdownMenuSeparator")), Ft = /* @__PURE__ */ J((e) => {
673
+ let { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: a, defaultOpen: o } = e, s = X(t), [c, l] = i({
674
+ prop: r,
675
+ defaultProp: o ?? !1,
676
+ onChange: a,
677
+ caller: "DropdownMenuSub"
678
+ });
679
+ return /* @__PURE__ */ w(pt, {
680
+ ...s,
681
+ open: c,
682
+ onOpenChange: l,
683
+ children: n
684
+ });
685
+ }, "DropdownMenuSub"), It = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ J(function(e, t) {
686
+ let { __scopeDropdownMenu: n, ...r } = e;
687
+ return /* @__PURE__ */ w(mt, {
688
+ ...X(n),
689
+ ...r,
690
+ ref: t
691
+ });
692
+ }, "DropdownMenuSubTrigger")), Lt = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ J(function(e, t) {
693
+ let { __scopeDropdownMenu: n, ...r } = e;
694
+ return /* @__PURE__ */ w(ht, {
695
+ ...X(n),
696
+ ...r,
697
+ ref: t,
698
+ style: {
699
+ ...e.style,
700
+ "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
701
+ "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
702
+ "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
703
+ "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
704
+ "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
705
+ }
706
+ });
707
+ }, "DropdownMenuSubContent")), Rt = xt, zt = Ct, Z = wt, Bt = Et, Vt = Dt, Ht = Ot, Ut = kt, Wt = At, Gt = jt, Kt = Mt, qt = Nt, Jt = Pt, Yt = Ft, Xt = It, Zt = Lt;
708
+ //#endregion
709
+ //#region lib/components/ui/menu-item-loading.tsx
710
+ function Qt(e) {
711
+ return e ? {
712
+ "aria-disabled": !0,
713
+ "aria-busy": !0,
714
+ disabled: !1,
715
+ "data-loading": "",
716
+ onSelect: (e) => e.preventDefault()
717
+ } : {};
718
+ }
719
+ var $t = "data-[loading]:cursor-progress data-[loading]:opacity-70 data-[loading]:[&>svg]:hidden";
720
+ function en({ className: t }) {
721
+ return /* @__PURE__ */ w(x, {
722
+ "aria-hidden": "true",
723
+ color: "default",
724
+ className: e("size-4", t)
725
+ });
726
+ }
727
+ //#endregion
728
+ //#region lib/components/ui/option-item-classes.ts
729
+ var tn = "relative before:pointer-events-none before:absolute before:inset-y-1 before:start-0 before:w-[3px] before:rounded-full before:bg-transparent before:transition-colors before:duration-100 motion-reduce:before:transition-none", Q = `pointer-coarse:min-h-11 transition-colors duration-100 motion-reduce:transition-none ${tn}`, nn = [
730
+ Q,
731
+ "data-[highlighted]:bg-primary/8 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-(--nxgt-option-ring)",
732
+ "data-[state=checked]:bg-primary/12 data-[state=checked]:font-medium data-[state=checked]:before:bg-primary-text data-[state=checked]:text-primary-text data-[state=checked]:[&_svg:not([class*='text-'])]:text-primary-text",
733
+ "data-[state=checked]:data-[highlighted]:bg-primary/18 data-[state=checked]:data-[highlighted]:before:bg-primary-text",
734
+ "forced-colors:data-[highlighted]:outline-solid forced-colors:data-[highlighted]:outline-2 forced-colors:data-[highlighted]:-outline-offset-2 forced-colors:data-[highlighted]:outline-[Highlight] forced-colors:data-[state=checked]:before:bg-[Highlight]"
735
+ ].join(" "), rn = [
736
+ Q,
737
+ "hover:bg-primary/8 focus-visible:bg-primary/8 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-(--nxgt-option-ring)",
738
+ "forced-colors:focus-visible:outline-solid forced-colors:focus-visible:outline-2 forced-colors:focus-visible:-outline-offset-2 forced-colors:focus-visible:outline-[Highlight]"
739
+ ].join(" "), an = "data-[selected]:bg-primary/12 data-[selected]:font-medium data-[selected]:before:bg-primary-text data-[selected]:text-primary-text data-[selected]:[&_svg:not([class*='text-'])]:text-primary-text data-[selected]:hover:bg-primary/18 data-[selected]:focus-visible:bg-primary/18 forced-colors:data-[selected]:before:bg-[Highlight]", on = "[&_svg:not([class*='text-'])]:text-muted-foreground gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", sn = "data-[active]:bg-primary/12 data-[active]:font-medium data-[active]:before:bg-primary-text data-[active]:text-primary-text data-[active]:[&_svg:not([class*='text-'])]:text-primary-text data-[active]:data-[highlighted]:bg-primary/18 data-[active]:data-[highlighted]:before:bg-primary-text data-[variant=error]:data-[active]:text-error-text forced-colors:data-[active]:before:bg-[Highlight]", cn = [
740
+ Q,
741
+ "data-[highlighted]:bg-primary/8",
742
+ "data-[selected]:bg-primary/12 data-[selected]:font-medium data-[selected]:before:bg-primary-text data-[selected]:text-primary-text data-[selected]:[&_svg:not([class*='text-'])]:text-primary-text",
743
+ "data-[selected]:data-[highlighted]:bg-primary/18 data-[selected]:data-[highlighted]:before:bg-primary-text",
744
+ "forced-colors:data-[highlighted]:outline-solid forced-colors:data-[highlighted]:outline-2 forced-colors:data-[highlighted]:-outline-offset-2 forced-colors:data-[highlighted]:outline-[Highlight] forced-colors:data-[selected]:before:bg-[Highlight]"
745
+ ].join(" "), ln = [
746
+ Q,
747
+ "data-[selected=true]:bg-primary/8",
748
+ "aria-checked:bg-primary/12 aria-checked:font-medium aria-checked:before:bg-primary-text aria-checked:text-primary-text aria-checked:[&_svg:not([class*='text-'])]:text-primary-text",
749
+ "aria-checked:data-[selected=true]:bg-primary/18 aria-checked:data-[selected=true]:before:bg-primary-text",
750
+ "forced-colors:data-[selected=true]:outline-solid forced-colors:data-[selected=true]:outline-2 forced-colors:data-[selected=true]:-outline-offset-2 forced-colors:data-[selected=true]:outline-[Highlight] forced-colors:aria-checked:before:bg-[Highlight]"
751
+ ].join(" "), un = [
752
+ "relative pointer-coarse:min-h-11 transition-colors duration-100 motion-reduce:transition-none",
753
+ "data-[highlighted]:bg-primary/8 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-(--nxgt-option-ring)",
754
+ "forced-colors:data-[highlighted]:outline-solid forced-colors:data-[highlighted]:outline-2 forced-colors:data-[highlighted]:-outline-offset-2 forced-colors:data-[highlighted]:outline-[Highlight]"
755
+ ].join(" "), dn = [
756
+ "relative pointer-coarse:min-h-11 transition-colors duration-100 motion-reduce:transition-none",
757
+ "data-[selected=true]:bg-primary/8",
758
+ "forced-colors:data-[selected=true]:outline-solid forced-colors:data-[selected=true]:outline-2 forced-colors:data-[selected=true]:-outline-offset-2 forced-colors:data-[selected=true]:outline-[Highlight]"
759
+ ].join(" ");
760
+ //#endregion
761
+ //#region lib/components/ui/selection/option-mark.tsx
762
+ function $({ kind: t, animate: n = "state", className: r }) {
763
+ let i = n === "enter" ? "nxgt-option-mark-enter" : "";
764
+ return t === "dot" ? /* @__PURE__ */ w("span", {
765
+ "aria-hidden": "true",
766
+ "data-slot": "option-mark",
767
+ className: e("nxgt-option-dot", i, r)
768
+ }) : /* @__PURE__ */ w("svg", {
769
+ "aria-hidden": "true",
770
+ focusable: "false",
771
+ "data-slot": "option-mark",
772
+ viewBox: "0 0 24 24",
773
+ className: e("nxgt-option-check", i, r),
774
+ children: /* @__PURE__ */ w("path", {
775
+ d: "M5.5 12.5l4.2 4.2L18.5 7.5",
776
+ pathLength: 1
777
+ })
778
+ });
779
+ }
780
+ //#endregion
781
+ //#region lib/components/ui/overlays/dropdown-menu/dropdown-menu-items.tsx
782
+ function fn({ className: n, inset: r, variant: i = "default", active: a, loading: o, children: s, ...c }) {
783
+ return /* @__PURE__ */ T(Ut, {
784
+ "data-slot": "dropdown-menu-item",
785
+ "data-pw": "dropdown-menu-item",
786
+ "data-inset": r,
787
+ "data-variant": i,
788
+ "data-active": a ? "" : void 0,
789
+ className: e("data-[variant=error]:text-error-text data-[variant=error]:data-[highlighted]:bg-error/10 dark:data-[variant=error]:data-[highlighted]:bg-error/20 data-[variant=error]:*:[svg]:!text-error-text [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-(--nxgt-item-radius) px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", nn, sn, $t, n),
790
+ ...c,
791
+ ...Qt(o),
792
+ children: [o && /* @__PURE__ */ w(en, {}), /* @__PURE__ */ w(t, { children: s })]
793
+ });
794
+ }
795
+ function pn({ className: t, children: n, checked: r, ...i }) {
796
+ return /* @__PURE__ */ T(Wt, {
797
+ "data-slot": "dropdown-menu-checkbox-item",
798
+ className: e("flex cursor-default items-center gap-2 rounded-(--nxgt-item-radius) py-1.5 pe-2 ps-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", un, t),
799
+ checked: r,
800
+ ...i,
801
+ children: [/* @__PURE__ */ w("span", {
802
+ className: "pointer-events-none absolute start-2 flex size-3.5 center",
803
+ children: /* @__PURE__ */ w(qt, {
804
+ forceMount: !0,
805
+ children: /* @__PURE__ */ w($, { kind: "check" })
806
+ })
807
+ }), n]
808
+ });
809
+ }
810
+ function mn({ ...e }) {
811
+ return /* @__PURE__ */ w(Gt, {
812
+ "data-slot": "dropdown-menu-radio-group",
813
+ ...e
814
+ });
815
+ }
816
+ function hn({ className: t, children: n, mark: r = "start", ...i }) {
817
+ let a = r === "end";
818
+ return /* @__PURE__ */ w(Kt, {
819
+ "data-slot": "dropdown-menu-radio-item",
820
+ className: e("flex cursor-default items-center gap-2 rounded-(--nxgt-item-radius) py-1.5 pe-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", a ? "ps-2" : "ps-8", nn, t),
821
+ ...i,
822
+ children: a ? /* @__PURE__ */ T(C, { children: [n, /* @__PURE__ */ w("span", {
823
+ className: "pointer-events-none ms-auto flex size-3.5 center",
824
+ children: /* @__PURE__ */ w(qt, {
825
+ forceMount: !0,
826
+ children: /* @__PURE__ */ w($, { kind: "check" })
827
+ })
828
+ })] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("span", {
829
+ className: "pointer-events-none absolute start-2 flex size-3.5 center",
830
+ children: /* @__PURE__ */ w(qt, {
831
+ forceMount: !0,
832
+ children: /* @__PURE__ */ w($, { kind: "dot" })
833
+ })
834
+ }), n] })
835
+ });
836
+ }
837
+ //#endregion
838
+ //#region lib/components/ui/overlays/dropdown-menu/dropdown-menu.tsx
839
+ function gn(e) {
840
+ return /* @__PURE__ */ w(b, {
841
+ value: e.modal ?? !1,
842
+ children: /* @__PURE__ */ w(Rt, {
843
+ "data-slot": "dropdown-menu",
844
+ modal: !1,
845
+ ...e
846
+ })
847
+ });
848
+ }
849
+ function _n({ ...e }) {
850
+ return /* @__PURE__ */ w(Z, {
851
+ "data-slot": "dropdown-menu-portal",
852
+ ...e
853
+ });
854
+ }
855
+ function vn({ className: t, ...n }) {
856
+ return /* @__PURE__ */ w(zt, {
857
+ "data-slot": "dropdown-menu-trigger",
858
+ "data-pw": n.name ?? "dropdown-menu",
859
+ className: e("transition-all focus:bg-primary/10 hover:bg-primary/10 rounded-(--nxgt-item-radius)", t),
860
+ ...n
861
+ });
862
+ }
863
+ function yn({ className: t, sideOffset: n = 4, container: r, ref: i, ...a }) {
864
+ return /* @__PURE__ */ w(ce, {
865
+ value: !1,
866
+ children: /* @__PURE__ */ w(Z, {
867
+ container: r,
868
+ children: /* @__PURE__ */ w(Bt, {
869
+ ref: re(!1, i),
870
+ "data-slot": "dropdown-menu-content",
871
+ sideOffset: n,
872
+ className: e("grid bg-popover min-w-2xs text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded border p-1 shadow gap-0.5", t),
873
+ ...a
874
+ })
875
+ })
876
+ });
877
+ }
878
+ function bn({ className: t, ...n }) {
879
+ return /* @__PURE__ */ w(Vt, {
880
+ "data-slot": "dropdown-menu-group",
881
+ className: e("grid gap-0.5", t),
882
+ ...n
883
+ });
884
+ }
885
+ function xn({ className: t, inset: n, ...r }) {
886
+ return /* @__PURE__ */ w(Ht, {
887
+ "data-slot": "dropdown-menu-label",
888
+ "data-inset": n,
889
+ className: e("px-2 py-1.5 text-xs font-medium data-[inset]:ps-8 text-muted-foreground", t),
890
+ ...r
891
+ });
892
+ }
893
+ function Sn({ className: t, ...n }) {
894
+ return /* @__PURE__ */ w(Jt, {
895
+ "data-slot": "dropdown-menu-separator",
896
+ className: e("bg-border -mx-1 my-1 h-px", t),
897
+ ...n
898
+ });
899
+ }
900
+ function Cn({ className: t, ...n }) {
901
+ return /* @__PURE__ */ w("span", {
902
+ "data-slot": "dropdown-menu-shortcut",
903
+ className: e("text-muted-foreground ms-auto text-xs tracking-widest in-data-[active]:text-foreground/70 in-data-[highlighted]:text-accent-foreground", t),
904
+ ...n
905
+ });
906
+ }
907
+ //#endregion
908
+ export { Yt as A, ot as B, $t as C, Ut as D, Bt as E, ct as F, ft as G, lt as H, it as I, mt as J, pt as K, at as L, Xt as M, zt as N, Z as O, nt as P, st as R, rn as S, Qt as T, ut as U, rt as V, tt as W, P as Y, tn as _, _n as a, on as b, vn as c, mn as d, hn as f, ln as g, dn as h, xn as i, Zt as j, Rt as k, pn as l, cn as m, yn as n, Sn as o, $ as p, ht as q, bn as r, Cn as s, gn as t, fn as u, un as v, en as w, an as x, nn as y, dt as z };