@nxgt/material 3.7.5 → 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 +50 -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 +26 -0
  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-CDrQCOsU.js → components-B9EIfMdd.js} +18622 -18531
  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 +41 -6
  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 +26 -0
  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
@@ -1,1490 +0,0 @@
1
- import { t as e } from "./utils-Bcd2Z3ea.js";
2
- import { A as t, D as n, E as r, F as i, I as a, M as o, N as s, O as c, R as l, S as u, T as d, c as f, d as p, f as m, k as h, u as g, w as _, x as v } from "./tooltip-tmFoTU_d.js";
3
- import { a as y, c as b, l as ee, o as x, r as S, s as C, t as te } from "./in-dialog-AiwTD3DK.js";
4
- import { t as w } from "./spinner-CtGCPza-.js";
5
- import * as T from "react";
6
- import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
7
- //#region ../../node_modules/@radix-ui/react-collection/dist/index.mjs
8
- var ne = Object.defineProperty, k = (e, t) => ne(e, "name", {
9
- value: t,
10
- configurable: !0
11
- });
12
- // @__NO_SIDE_EFFECTS__
13
- function A(e) {
14
- let n = e + "CollectionProvider", [r, i] = t(n), [o, s] = r(n, {
15
- collectionRef: { current: null },
16
- itemMap: /* @__PURE__ */ new Map()
17
- }), c = /* @__PURE__ */ k((e) => {
18
- let { scope: t, children: n } = e, r = T.useRef(null), i = T.useRef(/* @__PURE__ */ new Map()).current;
19
- return /* @__PURE__ */ D(o, {
20
- scope: t,
21
- itemMap: i,
22
- collectionRef: r,
23
- children: n
24
- });
25
- }, "CollectionProvider");
26
- c.displayName = n;
27
- let u = e + "CollectionSlot", d = a(u), f = T.forwardRef((e, t) => {
28
- let { scope: n, children: r } = e, i = l(t, s(u, n).collectionRef);
29
- return /* @__PURE__ */ D(d, {
30
- ref: i,
31
- children: r
32
- });
33
- });
34
- f.displayName = u;
35
- let p = e + "CollectionItemSlot", m = "data-radix-collection-item", h = a(p), g = T.forwardRef((e, t) => {
36
- let { scope: n, children: r, ...i } = e, a = T.useRef(null), o = l(t, a), c = s(p, n);
37
- return T.useEffect(() => (c.itemMap.set(a, {
38
- ref: a,
39
- ...i
40
- }), () => void c.itemMap.delete(a))), /* @__PURE__ */ D(h, {
41
- [m]: "",
42
- ref: o,
43
- children: r
44
- });
45
- });
46
- g.displayName = p;
47
- function _(t) {
48
- let n = s(e + "CollectionConsumer", t);
49
- return T.useCallback(() => {
50
- let e = n.collectionRef.current;
51
- if (!e) return [];
52
- let t = Array.from(e.querySelectorAll(`[${m}]`));
53
- return Array.from(n.itemMap.values()).sort((e, n) => t.indexOf(e.ref.current) - t.indexOf(n.ref.current));
54
- }, [n.collectionRef, n.itemMap]);
55
- }
56
- return k(_, "useCollection"), [
57
- {
58
- Provider: c,
59
- Slot: f,
60
- ItemSlot: g
61
- },
62
- _,
63
- i
64
- ];
65
- }
66
- k(A, "createCollection");
67
- var j = /* @__PURE__ */ new WeakMap(), M = class e extends Map {
68
- static {
69
- k(this, "OrderedDict");
70
- }
71
- #e;
72
- constructor(e) {
73
- super(e), this.#e = [...super.keys()], j.set(this, !0);
74
- }
75
- set(e, t) {
76
- return j.get(this) && (this.has(e) ? this.#e[this.#e.indexOf(e)] = e : this.#e.push(e)), super.set(e, t), this;
77
- }
78
- insert(e, t, n) {
79
- let r = this.has(t), i = this.#e.length, a = F(e), o = a >= 0 ? a : i + a, s = o < 0 || o >= i ? -1 : o;
80
- if (s === this.size || r && s === this.size - 1 || s === -1) return this.set(t, n), this;
81
- let c = this.size + +!r;
82
- a < 0 && o++;
83
- let l = [...this.#e], u, d = !1;
84
- for (let e = o; e < c; e++) if (o === e) {
85
- let i = l[e];
86
- l[e] === t && (i = l[e + 1]), r && this.delete(t), u = this.get(i), this.set(t, n);
87
- } else {
88
- !d && l[e - 1] === t && (d = !0);
89
- let n = l[d ? e : e - 1], r = u;
90
- u = this.get(n), this.delete(n), this.set(n, r);
91
- }
92
- return this;
93
- }
94
- with(t, n, r) {
95
- let i = new e(this);
96
- return i.insert(t, n, r), i;
97
- }
98
- before(e) {
99
- let t = this.#e.indexOf(e) - 1;
100
- if (!(t < 0)) return this.entryAt(t);
101
- }
102
- setBefore(e, t, n) {
103
- let r = this.#e.indexOf(e);
104
- return r === -1 ? this : this.insert(r, t, n);
105
- }
106
- after(e) {
107
- let t = this.#e.indexOf(e);
108
- if (t = t === -1 || t === this.size - 1 ? -1 : t + 1, t !== -1) return this.entryAt(t);
109
- }
110
- setAfter(e, t, n) {
111
- let r = this.#e.indexOf(e);
112
- return r === -1 ? this : this.insert(r + 1, t, n);
113
- }
114
- first() {
115
- return this.entryAt(0);
116
- }
117
- last() {
118
- return this.entryAt(-1);
119
- }
120
- clear() {
121
- return this.#e = [], super.clear();
122
- }
123
- delete(e) {
124
- let t = super.delete(e);
125
- return t && this.#e.splice(this.#e.indexOf(e), 1), t;
126
- }
127
- deleteAt(e) {
128
- let t = this.keyAt(e);
129
- return t !== void 0 && this.delete(t);
130
- }
131
- at(e) {
132
- let t = N(this.#e, e);
133
- if (t !== void 0) return this.get(t);
134
- }
135
- entryAt(e) {
136
- let t = N(this.#e, e);
137
- if (t !== void 0) return [t, this.get(t)];
138
- }
139
- indexOf(e) {
140
- return this.#e.indexOf(e);
141
- }
142
- keyAt(e) {
143
- return N(this.#e, e);
144
- }
145
- from(e, t) {
146
- let n = this.indexOf(e);
147
- if (n === -1) return;
148
- let r = n + t;
149
- return r < 0 && (r = 0), r >= this.size && (r = this.size - 1), this.at(r);
150
- }
151
- keyFrom(e, t) {
152
- let n = this.indexOf(e);
153
- if (n === -1) return;
154
- let r = n + t;
155
- return r < 0 && (r = 0), r >= this.size && (r = this.size - 1), this.keyAt(r);
156
- }
157
- find(e, t) {
158
- let n = 0;
159
- for (let r of this) {
160
- if (Reflect.apply(e, t, [
161
- r,
162
- n,
163
- this
164
- ])) return r;
165
- n++;
166
- }
167
- }
168
- findIndex(e, t) {
169
- let n = 0;
170
- for (let r of this) {
171
- if (Reflect.apply(e, t, [
172
- r,
173
- n,
174
- this
175
- ])) return n;
176
- n++;
177
- }
178
- return -1;
179
- }
180
- filter(t, n) {
181
- let r = [], i = 0;
182
- for (let e of this) Reflect.apply(t, n, [
183
- e,
184
- i,
185
- this
186
- ]) && r.push(e), i++;
187
- return new e(r);
188
- }
189
- map(t, n) {
190
- let r = [], i = 0;
191
- for (let e of this) r.push([e[0], Reflect.apply(t, n, [
192
- e,
193
- i,
194
- this
195
- ])]), i++;
196
- return new e(r);
197
- }
198
- reduce(...e) {
199
- let [t, n] = e, r = 0, i = n ?? this.at(0);
200
- for (let n of this) i = r === 0 && e.length === 1 ? n : Reflect.apply(t, this, [
201
- i,
202
- n,
203
- r,
204
- this
205
- ]), r++;
206
- return i;
207
- }
208
- reduceRight(...e) {
209
- let [t, n] = e, r = n ?? this.at(-1);
210
- for (let n = this.size - 1; n >= 0; n--) {
211
- let i = this.at(n);
212
- r = n === this.size - 1 && e.length === 1 ? i : Reflect.apply(t, this, [
213
- r,
214
- i,
215
- n,
216
- this
217
- ]);
218
- }
219
- return r;
220
- }
221
- toSorted(t) {
222
- let n = [...this.entries()].sort(t);
223
- return new e(n);
224
- }
225
- toReversed() {
226
- let t = new e();
227
- for (let e = this.size - 1; e >= 0; e--) {
228
- let n = this.keyAt(e), r = this.get(n);
229
- t.set(n, r);
230
- }
231
- return t;
232
- }
233
- toSpliced(...t) {
234
- let n = [...this.entries()];
235
- return n.splice(...t), new e(n);
236
- }
237
- slice(t, n) {
238
- let r = new e(), i = this.size - 1;
239
- if (t === void 0) return r;
240
- t < 0 && (t += this.size), n !== void 0 && n > 0 && (i = n - 1);
241
- for (let e = t; e <= i; e++) {
242
- let t = this.keyAt(e), n = this.get(t);
243
- r.set(t, n);
244
- }
245
- return r;
246
- }
247
- every(e, t) {
248
- let n = 0;
249
- for (let r of this) {
250
- if (!Reflect.apply(e, t, [
251
- r,
252
- n,
253
- this
254
- ])) return !1;
255
- n++;
256
- }
257
- return !0;
258
- }
259
- some(e, t) {
260
- let n = 0;
261
- for (let r of this) {
262
- if (Reflect.apply(e, t, [
263
- r,
264
- n,
265
- this
266
- ])) return !0;
267
- n++;
268
- }
269
- return !1;
270
- }
271
- };
272
- function N(e, t) {
273
- if ("at" in Array.prototype) return Array.prototype.at.call(e, t);
274
- let n = P(e, t);
275
- return n === -1 ? void 0 : e[n];
276
- }
277
- k(N, "at");
278
- function P(e, t) {
279
- let n = e.length, r = F(t), i = r >= 0 ? r : n + r;
280
- return i < 0 || i >= n ? -1 : i;
281
- }
282
- k(P, "toSafeIndex");
283
- function F(e) {
284
- return e !== e || e === 0 ? 0 : Math.trunc(e);
285
- }
286
- k(F, "toSafeInteger");
287
- // @__NO_SIDE_EFFECTS__
288
- function I(e) {
289
- let n = e + "CollectionProvider", [r, i] = t(n), [o, s] = r(n, {
290
- collectionElement: null,
291
- collectionRef: { current: null },
292
- collectionRefObject: { current: null },
293
- itemMap: new M(),
294
- setItemMap: /* @__PURE__ */ k(() => void 0, "setItemMap")
295
- }), c = /* @__PURE__ */ k(({ state: e, ...t }) => e ? /* @__PURE__ */ D(d, {
296
- ...t,
297
- state: e
298
- }) : /* @__PURE__ */ D(u, { ...t }), "CollectionProvider");
299
- c.displayName = n;
300
- let u = /* @__PURE__ */ k((e) => {
301
- let t = v();
302
- return /* @__PURE__ */ D(d, {
303
- ...e,
304
- state: t
305
- });
306
- }, "CollectionInit");
307
- u.displayName = n + "Init";
308
- let d = /* @__PURE__ */ k((e) => {
309
- let { scope: t, children: n, state: r } = e, i = T.useRef(null), [a, s] = T.useState(null), c = l(i, s), [u, d] = r;
310
- return T.useEffect(() => {
311
- if (!a) return;
312
- let e = L(() => {});
313
- return e.observe(a, {
314
- childList: !0,
315
- subtree: !0
316
- }), () => {
317
- e.disconnect();
318
- };
319
- }, [a]), /* @__PURE__ */ D(o, {
320
- scope: t,
321
- itemMap: u,
322
- setItemMap: d,
323
- collectionRef: c,
324
- collectionRefObject: i,
325
- collectionElement: a,
326
- children: n
327
- });
328
- }, "CollectionProviderImpl");
329
- d.displayName = n + "Impl";
330
- let f = e + "CollectionSlot", p = a(f), m = T.forwardRef((e, t) => {
331
- let { scope: n, children: r } = e, i = l(t, s(f, n).collectionRef);
332
- return /* @__PURE__ */ D(p, {
333
- ref: i,
334
- children: r
335
- });
336
- });
337
- m.displayName = f;
338
- let h = e + "CollectionItemSlot", g = a(h), _ = T.forwardRef((e, t) => {
339
- let { scope: n, children: r, ...i } = e, a = T.useRef(null), [o, c] = T.useState(null), u = l(t, a, c), { setItemMap: d } = s(h, n), f = T.useRef(i);
340
- re(f.current, i) || (f.current = i);
341
- let p = f.current;
342
- return T.useEffect(() => {
343
- let e = p;
344
- return d((t) => o ? t.has(o) ? t.set(o, {
345
- ...e,
346
- element: o
347
- }).toSorted(ae) : (t.set(o, {
348
- ...e,
349
- element: o
350
- }), t.toSorted(ae)) : t), () => {
351
- d((e) => !o || !e.has(o) ? e : (e.delete(o), new M(e)));
352
- };
353
- }, [
354
- o,
355
- p,
356
- d
357
- ]), /* @__PURE__ */ D(g, {
358
- "data-radix-collection-item": "",
359
- ref: u,
360
- children: r
361
- });
362
- });
363
- _.displayName = h;
364
- function v() {
365
- return T.useState(new M());
366
- }
367
- k(v, "useInitCollection");
368
- function y(t) {
369
- let { itemMap: n } = s(e + "CollectionConsumer", t);
370
- return n;
371
- }
372
- return k(y, "useCollection"), [{
373
- Provider: c,
374
- Slot: m,
375
- ItemSlot: _
376
- }, {
377
- createCollectionScope: i,
378
- useCollection: y,
379
- useInitCollection: v
380
- }];
381
- }
382
- k(I, "createCollection");
383
- function re(e, t) {
384
- if (e === t) return !0;
385
- if (typeof e != "object" || typeof t != "object" || e == null || t == null) return !1;
386
- let n = Object.keys(e), r = Object.keys(t);
387
- if (n.length !== r.length) return !1;
388
- for (let r of n) if (!Object.prototype.hasOwnProperty.call(t, r) || e[r] !== t[r]) return !1;
389
- return !0;
390
- }
391
- k(re, "shallowEqual");
392
- function ie(e, t) {
393
- return !!(t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_PRECEDING);
394
- }
395
- k(ie, "isElementPreceding");
396
- function ae(e, t) {
397
- return !e[1].element || !t[1].element ? 0 : ie(e[1].element, t[1].element) ? -1 : 1;
398
- }
399
- k(ae, "sortByDocumentPosition");
400
- function L(e) {
401
- return new MutationObserver((t) => {
402
- for (let n of t) if (n.type === "childList") {
403
- e();
404
- return;
405
- }
406
- });
407
- }
408
- k(L, "getChildListObserver");
409
- //#endregion
410
- //#region ../../node_modules/@radix-ui/react-direction/dist/index.mjs
411
- var oe = Object.defineProperty, se = (e, t) => oe(e, "name", {
412
- value: t,
413
- configurable: !0
414
- }), ce = T.createContext(void 0);
415
- function le(e) {
416
- let t = T.useContext(ce);
417
- return e || t || "ltr";
418
- }
419
- se(le, "useDirection");
420
- //#endregion
421
- //#region ../../node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs
422
- var ue = Object.defineProperty, de = (e, t) => ue(e, "name", {
423
- value: t,
424
- configurable: !0
425
- }), fe = !1;
426
- function pe() {
427
- let [e, t] = T.useState(fe);
428
- return T.useEffect(() => {
429
- fe || (fe = !0, t(!0));
430
- }, []), e;
431
- }
432
- de(pe, "useIsHydrated");
433
- var me = T.useSyncExternalStore;
434
- function he() {
435
- return () => {};
436
- }
437
- de(he, "subscribe");
438
- function ge() {
439
- return me(he, () => !0, () => !1);
440
- }
441
- de(ge, "useIsHydratedModern");
442
- var _e = typeof me == "function" ? ge : pe, ve = Object.defineProperty, R = (e, t) => ve(e, "name", {
443
- value: t,
444
- configurable: !0
445
- }), ye = "rovingFocusGroup.onEntryFocus", be = {
446
- bubbles: !1,
447
- cancelable: !0
448
- }, z = "RovingFocusGroup", [xe, Se, Ce] = /* @__PURE__ */ A(z), [we, Te] = t(z, [Ce]), [Ee, De] = we(z), Oe = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ R(function(e, t) {
449
- return /* @__PURE__ */ D(xe.Provider, {
450
- scope: e.__scopeRovingFocusGroup,
451
- children: /* @__PURE__ */ D(xe.Slot, {
452
- scope: e.__scopeRovingFocusGroup,
453
- children: /* @__PURE__ */ D(ke, {
454
- ...e,
455
- ref: t
456
- })
457
- })
458
- });
459
- }, "RovingFocusGroup")), ke = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ R(function(e, t) {
460
- let { __scopeRovingFocusGroup: r, orientation: i, loop: a = !1, dir: s, currentTabStopId: c, defaultCurrentTabStopId: u, onCurrentTabStopIdChange: d, onEntryFocus: f, preventScrollOnEntryFocus: p = !1, ...m } = e, g = T.useRef(null), v = l(t, g), y = le(s), [b, ee] = n({
461
- prop: c,
462
- defaultProp: u ?? null,
463
- onChange: d,
464
- caller: z
465
- }), [x, S] = T.useState(!1), C = _(f), te = Se(r), w = T.useRef(!1), [E, O] = T.useState(0);
466
- return T.useEffect(() => {
467
- let e = g.current;
468
- if (e) return e.addEventListener(ye, C), () => e.removeEventListener(ye, C);
469
- }, [C]), /* @__PURE__ */ D(Ee, {
470
- scope: r,
471
- orientation: i,
472
- dir: y,
473
- loop: a,
474
- currentTabStopId: b,
475
- onItemFocus: T.useCallback((e) => ee(e), [ee]),
476
- onItemShiftTab: T.useCallback(() => S(!0), []),
477
- onFocusableItemAdd: T.useCallback(() => O((e) => e + 1), []),
478
- onFocusableItemRemove: T.useCallback(() => O((e) => e - 1), []),
479
- children: /* @__PURE__ */ D(o.div, {
480
- tabIndex: x || E === 0 ? -1 : 0,
481
- "data-orientation": i,
482
- ...m,
483
- ref: v,
484
- style: {
485
- outline: "none",
486
- ...e.style
487
- },
488
- onMouseDown: h(e.onMouseDown, () => {
489
- w.current = !0;
490
- }),
491
- onFocus: h(e.onFocus, (e) => {
492
- let t = !w.current;
493
- if (e.target === e.currentTarget && t && !x) {
494
- let t = new CustomEvent(ye, be);
495
- if (e.currentTarget.dispatchEvent(t), !t.defaultPrevented) {
496
- let e = te().filter((e) => e.focusable);
497
- Fe([
498
- e.find((e) => e.active),
499
- e.find((e) => e.id === b),
500
- ...e
501
- ].filter(Boolean).map((e) => e.ref.current), p);
502
- }
503
- }
504
- w.current = !1;
505
- }),
506
- onBlur: h(e.onBlur, () => S(!1))
507
- })
508
- });
509
- }, "RovingFocusGroupImpl")), Ae = "RovingFocusGroupItem", je = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ R(function(e, t) {
510
- let { __scopeRovingFocusGroup: n, focusable: r = !0, active: i = !1, tabStopId: a, children: s, ...l } = e, u = d(), f = a || u, p = De(Ae, n), m = p.currentTabStopId === f, g = Se(n), { onFocusableItemAdd: _, onFocusableItemRemove: v, currentTabStopId: y } = p, b = _e();
511
- return c(() => {
512
- if (!(!b || !r)) return _(), () => v();
513
- }, [
514
- b,
515
- r,
516
- _,
517
- v
518
- ]), T.useEffect(() => {
519
- if (!(b || !r)) return _(), () => v();
520
- }, [
521
- b,
522
- r,
523
- _,
524
- v
525
- ]), /* @__PURE__ */ D(xe.ItemSlot, {
526
- scope: n,
527
- id: f,
528
- focusable: r,
529
- active: i,
530
- children: /* @__PURE__ */ D(o.span, {
531
- tabIndex: m ? 0 : -1,
532
- "data-orientation": p.orientation,
533
- ...l,
534
- ref: t,
535
- onMouseDown: h(e.onMouseDown, (e) => {
536
- r ? p.onItemFocus(f) : e.preventDefault();
537
- }),
538
- onFocus: h(e.onFocus, () => p.onItemFocus(f)),
539
- onKeyDown: h(e.onKeyDown, (e) => {
540
- if (e.key === "Tab" && e.shiftKey) {
541
- p.onItemShiftTab();
542
- return;
543
- }
544
- if (e.target !== e.currentTarget) return;
545
- let t = Pe(e, p.orientation, p.dir);
546
- if (t !== void 0) {
547
- if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) return;
548
- e.preventDefault();
549
- let n = g().filter((e) => e.focusable).map((e) => e.ref.current);
550
- if (t === "last") n.reverse();
551
- else if (t === "prev" || t === "next") {
552
- t === "prev" && n.reverse();
553
- let r = n.indexOf(e.currentTarget);
554
- n = p.loop ? Ie(n, r + 1) : n.slice(r + 1);
555
- }
556
- setTimeout(() => Fe(n));
557
- }
558
- }),
559
- children: typeof s == "function" ? s({
560
- isCurrentTabStop: m,
561
- hasTabStop: y != null
562
- }) : s
563
- })
564
- });
565
- }, "RovingFocusGroupItem")), Me = {
566
- ArrowLeft: "prev",
567
- ArrowUp: "prev",
568
- ArrowRight: "next",
569
- ArrowDown: "next",
570
- PageUp: "first",
571
- Home: "first",
572
- PageDown: "last",
573
- End: "last"
574
- };
575
- function Ne(e, t) {
576
- return t === "rtl" ? e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e : e;
577
- }
578
- R(Ne, "getDirectionAwareKey");
579
- function Pe(e, t, n) {
580
- let r = Ne(e.key, n);
581
- if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r))) return Me[r];
582
- }
583
- R(Pe, "getFocusIntent");
584
- function Fe(e, t = !1) {
585
- let n = document.activeElement;
586
- for (let r of e) if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
587
- }
588
- R(Fe, "focusFirst");
589
- function Ie(e, t) {
590
- return e.map((n, r) => e[(t + r) % e.length]);
591
- }
592
- R(Ie, "wrapArray");
593
- var Le = Oe, Re = je, ze = Object.defineProperty, B = (e, t) => ze(e, "name", {
594
- value: t,
595
- configurable: !0
596
- }), Be = ["Enter", " "], Ve = [
597
- "ArrowDown",
598
- "PageUp",
599
- "Home"
600
- ], He = [
601
- "ArrowUp",
602
- "PageDown",
603
- "End"
604
- ], Ue = [...Ve, ...He], We = {
605
- ltr: [...Be, "ArrowRight"],
606
- rtl: [...Be, "ArrowLeft"]
607
- }, Ge = {
608
- ltr: ["ArrowLeft"],
609
- rtl: ["ArrowRight"]
610
- }, V = "Menu", [H, Ke, qe] = /* @__PURE__ */ A(V), [U, Je] = t(V, [
611
- qe,
612
- m,
613
- Te
614
- ]), W = m(), Ye = Te(), [Xe, G] = U(V), [Ze, K] = U(V), Qe = /* @__PURE__ */ B((e) => {
615
- let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = W(t), [c, l] = T.useState(null), u = T.useRef(!1), d = _(a), f = le(i);
616
- return T.useEffect(() => {
617
- let e = /* @__PURE__ */ B(() => {
618
- u.current = !0, document.addEventListener("pointerdown", t, {
619
- capture: !0,
620
- once: !0
621
- }), document.addEventListener("pointermove", t, {
622
- capture: !0,
623
- once: !0
624
- });
625
- }, "handleKeyDown"), t = /* @__PURE__ */ B(() => u.current = !1, "handlePointer");
626
- return document.addEventListener("keydown", e, { capture: !0 }), () => {
627
- document.removeEventListener("keydown", e, { capture: !0 }), document.removeEventListener("pointerdown", t, { capture: !0 }), document.removeEventListener("pointermove", t, { capture: !0 });
628
- };
629
- }, []), T.useEffect(() => {
630
- if (!n) return;
631
- let e = /* @__PURE__ */ B(() => d(!1), "handleBlur");
632
- return window.addEventListener("blur", e), () => window.removeEventListener("blur", e);
633
- }, [n, d]), /* @__PURE__ */ D(p, {
634
- ...s,
635
- children: /* @__PURE__ */ D(Xe, {
636
- scope: t,
637
- open: n,
638
- onOpenChange: d,
639
- content: c,
640
- onContentChange: l,
641
- children: /* @__PURE__ */ D(Ze, {
642
- scope: t,
643
- onClose: T.useCallback(() => d(!1), [d]),
644
- isUsingKeyboardRef: u,
645
- dir: f,
646
- modal: o,
647
- children: r
648
- })
649
- })
650
- });
651
- }, "Menu"), $e = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
652
- let { __scopeMenu: n, ...r } = e;
653
- return /* @__PURE__ */ D(f, {
654
- ...W(n),
655
- ...r,
656
- ref: t
657
- });
658
- }, "MenuAnchor")), et = "MenuPortal", [tt, nt] = U(et, { forceMount: void 0 }), rt = /* @__PURE__ */ B((e) => {
659
- let { __scopeMenu: t, forceMount: n, children: i, container: a } = e, o = G(et, t);
660
- return /* @__PURE__ */ D(tt, {
661
- scope: t,
662
- forceMount: n,
663
- children: /* @__PURE__ */ D(r, {
664
- present: n || o.open,
665
- children: /* @__PURE__ */ D(v, {
666
- asChild: !0,
667
- container: a,
668
- children: i
669
- })
670
- })
671
- });
672
- }, "MenuPortal"), q = "MenuContent", [it, at] = U(q), ot = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
673
- let n = nt(q, e.__scopeMenu), { forceMount: i = n.forceMount, ...a } = e, o = G(q, e.__scopeMenu), s = K(q, e.__scopeMenu);
674
- return /* @__PURE__ */ D(H.Provider, {
675
- scope: e.__scopeMenu,
676
- children: /* @__PURE__ */ D(r, {
677
- present: i || o.open,
678
- children: /* @__PURE__ */ D(H.Slot, {
679
- scope: e.__scopeMenu,
680
- children: s.modal ? /* @__PURE__ */ D(st, {
681
- ...a,
682
- ref: t
683
- }) : /* @__PURE__ */ D(ct, {
684
- ...a,
685
- ref: t
686
- })
687
- })
688
- })
689
- });
690
- }, "MenuContent")), st = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
691
- let n = G(q, e.__scopeMenu), r = T.useRef(null), i = l(t, r);
692
- return T.useEffect(() => {
693
- let e = r.current;
694
- if (e) return x(e);
695
- }, []), /* @__PURE__ */ D(ut, {
696
- ...e,
697
- ref: i,
698
- trapFocus: n.open,
699
- disableOutsidePointerEvents: n.open,
700
- disableOutsideScroll: !0,
701
- onFocusOutside: h(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
702
- onDismiss: () => n.onOpenChange(!1)
703
- });
704
- }, "MenuRootContentModal")), ct = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
705
- let n = G(q, e.__scopeMenu);
706
- return /* @__PURE__ */ D(ut, {
707
- ...e,
708
- ref: t,
709
- trapFocus: !1,
710
- disableOutsidePointerEvents: !1,
711
- disableOutsideScroll: !1,
712
- onDismiss: () => n.onOpenChange(!1)
713
- });
714
- }, "MenuRootContentNonModal")), lt = a("MenuContent.ScrollLock"), ut = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
715
- let { __scopeMenu: n, loop: r = !1, trapFocus: i, onOpenAutoFocus: a, onCloseAutoFocus: o, disableOutsidePointerEvents: s, onEntryFocus: c, onEscapeKeyDown: d, onPointerDownOutside: f, onFocusOutside: p, onInteractOutside: m, onDismiss: _, disableOutsideScroll: v, ...y } = e, x = G(q, n), S = K(q, n), te = W(n), w = Ye(n), E = Ke(n), [O, ne] = T.useState(null), k = T.useRef(null), A = l(t, k, x.onContentChange), j = T.useRef(0), M = T.useRef(""), N = T.useRef(0), P = T.useRef(null), F = T.useRef("right"), I = T.useRef(0), re = v ? C : T.Fragment, ie = v ? {
716
- as: lt,
717
- allowPinchZoom: !0
718
- } : void 0, ae = /* @__PURE__ */ B((e) => {
719
- let t = M.current + e, n = E().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = Rt(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
720
- (/* @__PURE__ */ B((function e(t) {
721
- M.current = t, window.clearTimeout(j.current), t !== "" && (j.current = window.setTimeout(() => e(""), 1e3));
722
- }), "updateSearch"))(t), o && setTimeout(() => o.focus());
723
- }, "handleTypeaheadSearch");
724
- T.useEffect(() => () => window.clearTimeout(j.current), []), b();
725
- let L = T.useCallback((e) => F.current === P.current?.side && Bt(e, P.current?.area), []);
726
- return /* @__PURE__ */ D(it, {
727
- scope: n,
728
- searchRef: M,
729
- onItemEnter: T.useCallback((e) => {
730
- L(e) && e.preventDefault();
731
- }, [L]),
732
- onItemLeave: T.useCallback((e) => {
733
- L(e) || (k.current?.focus(), ne(null));
734
- }, [L]),
735
- onTriggerLeave: T.useCallback((e) => {
736
- L(e) && e.preventDefault();
737
- }, [L]),
738
- pointerGraceTimerRef: N,
739
- onPointerGraceIntentChange: T.useCallback((e) => {
740
- P.current = e;
741
- }, []),
742
- children: /* @__PURE__ */ D(re, {
743
- ...ie,
744
- children: /* @__PURE__ */ D(ee, {
745
- asChild: !0,
746
- trapped: i,
747
- onMountAutoFocus: h(a, (e) => {
748
- e.preventDefault(), k.current?.focus({ preventScroll: !0 });
749
- }),
750
- onUnmountAutoFocus: o,
751
- children: /* @__PURE__ */ D(u, {
752
- asChild: !0,
753
- disableOutsidePointerEvents: s,
754
- onEscapeKeyDown: d,
755
- onPointerDownOutside: f,
756
- onFocusOutside: p,
757
- onInteractOutside: m,
758
- onDismiss: _,
759
- children: /* @__PURE__ */ D(Le, {
760
- asChild: !0,
761
- ...w,
762
- dir: S.dir,
763
- orientation: "vertical",
764
- loop: r,
765
- currentTabStopId: O,
766
- onCurrentTabStopIdChange: ne,
767
- onEntryFocus: h(c, (e) => {
768
- S.isUsingKeyboardRef.current || e.preventDefault();
769
- }),
770
- preventScrollOnEntryFocus: !0,
771
- children: /* @__PURE__ */ D(g, {
772
- role: "menu",
773
- "aria-orientation": "vertical",
774
- "data-state": Ft(x.open),
775
- "data-radix-menu-content": "",
776
- dir: S.dir,
777
- ...te,
778
- ...y,
779
- ref: A,
780
- style: {
781
- outline: "none",
782
- ...y.style
783
- },
784
- onKeyDown: h(y.onKeyDown, (e) => {
785
- let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
786
- t && (e.key === "Tab" && e.preventDefault(), !n && r && ae(e.key));
787
- let i = k.current;
788
- if (e.target !== i || !Ue.includes(e.key)) return;
789
- e.preventDefault();
790
- let a = E().filter((e) => !e.disabled).map((e) => e.ref.current);
791
- He.includes(e.key) && a.reverse(), It(a);
792
- }),
793
- onBlur: h(e.onBlur, (e) => {
794
- e.currentTarget.contains(e.target) || (window.clearTimeout(j.current), M.current = "");
795
- }),
796
- onPointerMove: h(e.onPointerMove, Z((e) => {
797
- let t = e.target, n = I.current !== e.clientX;
798
- if (e.currentTarget.contains(t) && n) {
799
- let t = e.clientX > I.current ? "right" : "left";
800
- F.current = t, I.current = e.clientX;
801
- }
802
- }))
803
- })
804
- })
805
- })
806
- })
807
- })
808
- });
809
- }, "MenuContentImpl")), dt = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
810
- let { __scopeMenu: n, ...r } = e;
811
- return /* @__PURE__ */ D(o.div, {
812
- role: "group",
813
- ...r,
814
- ref: t
815
- });
816
- }, "MenuGroup")), ft = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
817
- let { __scopeMenu: n, ...r } = e;
818
- return /* @__PURE__ */ D(o.div, {
819
- ...r,
820
- ref: t
821
- });
822
- }, "MenuLabel")), pt = "MenuItem", mt = "menu.itemSelect", ht = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
823
- let { disabled: n = !1, onSelect: r, ...i } = e, a = T.useRef(null), o = K(pt, e.__scopeMenu), c = at(pt, e.__scopeMenu), u = l(t, a), d = T.useRef(!1), f = /* @__PURE__ */ B(() => {
824
- let e = a.current;
825
- if (!n && e) {
826
- let t = new CustomEvent(mt, {
827
- bubbles: !0,
828
- cancelable: !0
829
- });
830
- e.addEventListener(mt, (e) => r?.(e), { once: !0 }), s(e, t), t.defaultPrevented ? d.current = !1 : o.onClose();
831
- }
832
- }, "handleSelect");
833
- return /* @__PURE__ */ D(gt, {
834
- ...i,
835
- ref: u,
836
- disabled: n,
837
- onClick: h(e.onClick, f),
838
- onPointerDown: (t) => {
839
- e.onPointerDown?.(t), d.current = !0;
840
- },
841
- onPointerUp: h(e.onPointerUp, (e) => {
842
- d.current || e.currentTarget?.click();
843
- }),
844
- onKeyDown: h(e.onKeyDown, (e) => {
845
- n || e.target !== e.currentTarget || c.searchRef.current !== "" && e.key === " " || Be.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
846
- })
847
- });
848
- }, "MenuItem")), gt = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
849
- let { __scopeMenu: n, disabled: r = !1, textValue: i, ...a } = e, s = at(pt, n), c = Ye(n), u = T.useRef(null), d = l(t, u), [f, p] = T.useState(!1), [m, g] = T.useState("");
850
- return T.useEffect(() => {
851
- let e = u.current;
852
- e && g((e.textContent ?? "").trim());
853
- }, [a.children]), /* @__PURE__ */ D(H.ItemSlot, {
854
- scope: n,
855
- disabled: r,
856
- textValue: i ?? m,
857
- children: /* @__PURE__ */ D(Re, {
858
- asChild: !0,
859
- ...c,
860
- focusable: !r,
861
- children: /* @__PURE__ */ D(o.div, {
862
- role: "menuitem",
863
- "data-highlighted": f ? "" : void 0,
864
- "aria-disabled": r || void 0,
865
- "data-disabled": r ? "" : void 0,
866
- ...a,
867
- ref: d,
868
- onPointerMove: h(e.onPointerMove, Z((e) => {
869
- r ? s.onItemLeave(e) : (s.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({ preventScroll: !0 }));
870
- })),
871
- onPointerLeave: h(e.onPointerLeave, Z((e) => s.onItemLeave(e))),
872
- onFocus: h(e.onFocus, () => p(!0)),
873
- onBlur: h(e.onBlur, () => p(!1))
874
- })
875
- })
876
- });
877
- }, "MenuItemImpl")), _t = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
878
- let { checked: n = !1, onCheckedChange: r, ...i } = e;
879
- return /* @__PURE__ */ D(wt, {
880
- scope: e.__scopeMenu,
881
- checked: n,
882
- children: /* @__PURE__ */ D(ht, {
883
- role: "menuitemcheckbox",
884
- "aria-checked": Y(n) ? "mixed" : n,
885
- ...i,
886
- ref: t,
887
- "data-state": X(n),
888
- onSelect: h(i.onSelect, () => r?.(Y(n) ? !0 : !n), { checkForDefaultPrevented: !1 })
889
- })
890
- });
891
- }, "MenuCheckboxItem")), [vt, yt] = U("MenuRadioGroup", {
892
- value: void 0,
893
- onValueChange: /* @__PURE__ */ B(() => {}, "onValueChange")
894
- }), bt = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
895
- let { value: n, onValueChange: r, ...i } = e, a = _(r);
896
- return /* @__PURE__ */ D(vt, {
897
- scope: e.__scopeMenu,
898
- value: n,
899
- onValueChange: a,
900
- children: /* @__PURE__ */ D(dt, {
901
- ...i,
902
- ref: t
903
- })
904
- });
905
- }, "MenuRadioGroup")), xt = "MenuRadioItem", St = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
906
- let { value: n, ...r } = e, i = yt(xt, e.__scopeMenu), a = n === i.value;
907
- return /* @__PURE__ */ D(wt, {
908
- scope: e.__scopeMenu,
909
- checked: a,
910
- children: /* @__PURE__ */ D(ht, {
911
- role: "menuitemradio",
912
- "aria-checked": a,
913
- ...r,
914
- ref: t,
915
- "data-state": X(a),
916
- onSelect: h(r.onSelect, () => i.onValueChange?.(n), { checkForDefaultPrevented: !1 })
917
- })
918
- });
919
- }, "MenuRadioItem")), Ct = "MenuItemIndicator", [wt, Tt] = U(Ct, { checked: !1 }), Et = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
920
- let { __scopeMenu: n, forceMount: i, ...a } = e, s = Tt(Ct, n);
921
- return /* @__PURE__ */ D(r, {
922
- present: i || Y(s.checked) || s.checked === !0,
923
- children: /* @__PURE__ */ D(o.span, {
924
- ...a,
925
- ref: t,
926
- "data-state": X(s.checked)
927
- })
928
- });
929
- }, "MenuItemIndicator")), Dt = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
930
- let { __scopeMenu: n, ...r } = e;
931
- return /* @__PURE__ */ D(o.div, {
932
- role: "separator",
933
- "aria-orientation": "horizontal",
934
- ...r,
935
- ref: t
936
- });
937
- }, "MenuSeparator")), Ot = "MenuSub", [kt, At] = U(Ot), jt = /* @__PURE__ */ B((e) => {
938
- let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = G(Ot, t), o = W(t), [s, c] = T.useState(null), [l, u] = T.useState(null), f = _(i);
939
- return T.useEffect(() => (a.open === !1 && f(!1), () => f(!1)), [a.open, f]), /* @__PURE__ */ D(p, {
940
- ...o,
941
- children: /* @__PURE__ */ D(Xe, {
942
- scope: t,
943
- open: r,
944
- onOpenChange: f,
945
- content: l,
946
- onContentChange: u,
947
- children: /* @__PURE__ */ D(kt, {
948
- scope: t,
949
- contentId: d(),
950
- triggerId: d(),
951
- trigger: s,
952
- onTriggerChange: c,
953
- children: n
954
- })
955
- })
956
- });
957
- }, "MenuSub"), J = "MenuSubTrigger", Mt = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
958
- let n = G(J, e.__scopeMenu), r = K(J, e.__scopeMenu), i = At(J, e.__scopeMenu), a = at(J, e.__scopeMenu), o = T.useRef(null), { pointerGraceTimerRef: s, onPointerGraceIntentChange: c } = a, u = { __scopeMenu: e.__scopeMenu }, d = T.useCallback(() => {
959
- o.current && window.clearTimeout(o.current), o.current = null;
960
- }, []);
961
- T.useEffect(() => d, [d]), T.useEffect(() => {
962
- let e = s.current;
963
- return () => {
964
- window.clearTimeout(e), c(null);
965
- };
966
- }, [s, c]);
967
- let f = l(t, i.onTriggerChange);
968
- return /* @__PURE__ */ D($e, {
969
- asChild: !0,
970
- ...u,
971
- children: /* @__PURE__ */ D(gt, {
972
- id: i.triggerId,
973
- "aria-haspopup": "menu",
974
- "aria-expanded": n.open,
975
- "aria-controls": n.open ? i.contentId : void 0,
976
- "data-state": Ft(n.open),
977
- ...e,
978
- ref: f,
979
- onClick: (t) => {
980
- e.onClick?.(t), !(e.disabled || t.defaultPrevented) && (t.currentTarget.focus(), n.open || n.onOpenChange(!0));
981
- },
982
- onPointerMove: h(e.onPointerMove, Z((t) => {
983
- a.onItemEnter(t), !t.defaultPrevented && !e.disabled && !n.open && !o.current && (a.onPointerGraceIntentChange(null), o.current = window.setTimeout(() => {
984
- n.onOpenChange(!0), d();
985
- }, 100));
986
- })),
987
- onPointerLeave: h(e.onPointerLeave, Z((e) => {
988
- d();
989
- let t = n.content?.getBoundingClientRect();
990
- if (t) {
991
- let r = n.content?.dataset.side, i = r === "right", o = i ? -5 : 5, c = t[i ? "left" : "right"], l = t[i ? "right" : "left"];
992
- a.onPointerGraceIntentChange({
993
- area: [
994
- {
995
- x: e.clientX + o,
996
- y: e.clientY
997
- },
998
- {
999
- x: c,
1000
- y: t.top
1001
- },
1002
- {
1003
- x: l,
1004
- y: t.top
1005
- },
1006
- {
1007
- x: l,
1008
- y: t.bottom
1009
- },
1010
- {
1011
- x: c,
1012
- y: t.bottom
1013
- }
1014
- ],
1015
- side: r
1016
- }), window.clearTimeout(s.current), s.current = window.setTimeout(() => a.onPointerGraceIntentChange(null), 300);
1017
- } else {
1018
- if (a.onTriggerLeave(e), e.defaultPrevented) return;
1019
- a.onPointerGraceIntentChange(null);
1020
- }
1021
- })),
1022
- onKeyDown: h(e.onKeyDown, (t) => {
1023
- e.disabled || t.target !== t.currentTarget || a.searchRef.current !== "" && t.key === " " || We[r.dir].includes(t.key) && (n.onOpenChange(!0), n.content?.focus(), t.preventDefault());
1024
- })
1025
- })
1026
- });
1027
- }, "MenuSubTrigger")), Nt = "MenuSubContent", Pt = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ B(function(e, t) {
1028
- let n = nt(q, e.__scopeMenu), { forceMount: i = n.forceMount, align: a = "start", ...o } = e, s = G(q, e.__scopeMenu), c = K(q, e.__scopeMenu), u = At(Nt, e.__scopeMenu), d = T.useRef(null), f = l(t, d);
1029
- return /* @__PURE__ */ D(H.Provider, {
1030
- scope: e.__scopeMenu,
1031
- children: /* @__PURE__ */ D(r, {
1032
- present: i || s.open,
1033
- children: /* @__PURE__ */ D(H.Slot, {
1034
- scope: e.__scopeMenu,
1035
- children: /* @__PURE__ */ D(ut, {
1036
- id: u.contentId,
1037
- "aria-labelledby": u.triggerId,
1038
- ...o,
1039
- ref: f,
1040
- align: a,
1041
- side: c.dir === "rtl" ? "left" : "right",
1042
- disableOutsidePointerEvents: !1,
1043
- disableOutsideScroll: !1,
1044
- trapFocus: !1,
1045
- onOpenAutoFocus: (e) => {
1046
- c.isUsingKeyboardRef.current && d.current?.focus(), e.preventDefault();
1047
- },
1048
- onCloseAutoFocus: (e) => e.preventDefault(),
1049
- onFocusOutside: h(e.onFocusOutside, (e) => {
1050
- e.target !== u.trigger && s.onOpenChange(!1);
1051
- }),
1052
- onEscapeKeyDown: h(e.onEscapeKeyDown, (e) => {
1053
- c.onClose(), e.preventDefault();
1054
- }),
1055
- onKeyDown: h(e.onKeyDown, (e) => {
1056
- let t = e.currentTarget.contains(e.target), n = Ge[c.dir].includes(e.key);
1057
- t && n && (s.onOpenChange(!1), u.trigger?.focus(), e.preventDefault());
1058
- })
1059
- })
1060
- })
1061
- })
1062
- });
1063
- }, "MenuSubContent"));
1064
- function Ft(e) {
1065
- return e ? "open" : "closed";
1066
- }
1067
- B(Ft, "getOpenState");
1068
- function Y(e) {
1069
- return e === "indeterminate";
1070
- }
1071
- B(Y, "isIndeterminate");
1072
- function X(e) {
1073
- return Y(e) ? "indeterminate" : e ? "checked" : "unchecked";
1074
- }
1075
- B(X, "getCheckedState");
1076
- function It(e) {
1077
- let t = document.activeElement;
1078
- for (let n of e) if (n === t || (n.focus(), document.activeElement !== t)) return;
1079
- }
1080
- B(It, "focusFirst");
1081
- function Lt(e, t) {
1082
- return e.map((n, r) => e[(t + r) % e.length]);
1083
- }
1084
- B(Lt, "wrapArray");
1085
- function Rt(e, t, n) {
1086
- let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = Lt(e, Math.max(i, 0));
1087
- r.length === 1 && (a = a.filter((e) => e !== n));
1088
- let o = a.find((e) => e.toLowerCase().startsWith(r.toLowerCase()));
1089
- return o === n ? void 0 : o;
1090
- }
1091
- B(Rt, "getNextMatch");
1092
- function zt(e, t) {
1093
- let { x: n, y: r } = e, i = !1;
1094
- for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
1095
- let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
1096
- l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
1097
- }
1098
- return i;
1099
- }
1100
- B(zt, "isPointInPolygon");
1101
- function Bt(e, t) {
1102
- return t ? zt({
1103
- x: e.clientX,
1104
- y: e.clientY
1105
- }, t) : !1;
1106
- }
1107
- B(Bt, "isPointerInGraceArea");
1108
- function Z(e) {
1109
- return (t) => t.pointerType === "mouse" ? e(t) : void 0;
1110
- }
1111
- B(Z, "whenMouse");
1112
- var Vt = Qe, Ht = $e, Ut = rt, Wt = ot, Gt = dt, Kt = ft, qt = ht, Jt = _t, Yt = bt, Xt = St, Zt = Et, Qt = Dt, $t = jt, en = Mt, tn = Pt, nn = Object.defineProperty, Q = (e, t) => nn(e, "name", {
1113
- value: t,
1114
- configurable: !0
1115
- }), rn = "DropdownMenu", [an, on] = t(rn, [Je]), $ = Je(), [sn, cn] = an(rn), ln = /* @__PURE__ */ Q((e) => {
1116
- let { __scopeDropdownMenu: t, children: r, dir: i, open: a, defaultOpen: o, onOpenChange: s, modal: c = !0 } = e, l = $(t), u = T.useRef(null), [f, p] = n({
1117
- prop: a,
1118
- defaultProp: o ?? !1,
1119
- onChange: s,
1120
- caller: rn
1121
- });
1122
- return /* @__PURE__ */ D(sn, {
1123
- scope: t,
1124
- triggerId: d(),
1125
- triggerRef: u,
1126
- contentId: d(),
1127
- open: f,
1128
- onOpenChange: p,
1129
- onOpenToggle: T.useCallback(() => p((e) => !e), [p]),
1130
- modal: c,
1131
- children: /* @__PURE__ */ D(Vt, {
1132
- ...l,
1133
- open: f,
1134
- onOpenChange: p,
1135
- dir: i,
1136
- modal: c,
1137
- children: r
1138
- })
1139
- });
1140
- }, "DropdownMenu"), un = "DropdownMenuTrigger", dn = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Q(function(e, t) {
1141
- let { __scopeDropdownMenu: n, disabled: r = !1, ...i } = e, a = cn(un, n), s = $(n), c = l(t, a.triggerRef);
1142
- return /* @__PURE__ */ D(Ht, {
1143
- asChild: !0,
1144
- ...s,
1145
- children: /* @__PURE__ */ D(o.button, {
1146
- type: "button",
1147
- id: a.triggerId,
1148
- "aria-haspopup": "menu",
1149
- "aria-expanded": a.open,
1150
- "aria-controls": a.open ? a.contentId : void 0,
1151
- "data-state": a.open ? "open" : "closed",
1152
- "data-disabled": r ? "" : void 0,
1153
- disabled: r,
1154
- ...i,
1155
- ref: c,
1156
- onPointerDown: h(e.onPointerDown, (e) => {
1157
- !r && e.button === 0 && e.ctrlKey === !1 && (a.onOpenToggle(), a.open || e.preventDefault());
1158
- }),
1159
- onKeyDown: h(e.onKeyDown, (e) => {
1160
- r || (["Enter", " "].includes(e.key) && a.onOpenToggle(), e.key === "ArrowDown" && a.onOpenChange(!0), [
1161
- "Enter",
1162
- " ",
1163
- "ArrowDown"
1164
- ].includes(e.key) && e.preventDefault());
1165
- })
1166
- })
1167
- });
1168
- }, "DropdownMenuTrigger")), fn = /* @__PURE__ */ Q((e) => {
1169
- let { __scopeDropdownMenu: t, ...n } = e;
1170
- return /* @__PURE__ */ D(Ut, {
1171
- ...$(t),
1172
- ...n
1173
- });
1174
- }, "DropdownMenuPortal"), pn = "DropdownMenuContent", mn = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Q(function(e, t) {
1175
- let { __scopeDropdownMenu: n, ...r } = e, i = cn(pn, n), a = $(n), o = T.useRef(!1);
1176
- return /* @__PURE__ */ D(Wt, {
1177
- id: i.contentId,
1178
- "aria-labelledby": i.triggerId,
1179
- ...a,
1180
- ...r,
1181
- ref: t,
1182
- onCloseAutoFocus: h(e.onCloseAutoFocus, (e) => {
1183
- o.current || i.triggerRef.current?.focus(), o.current = !1, e.preventDefault();
1184
- }),
1185
- onInteractOutside: h(e.onInteractOutside, (e) => {
1186
- let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
1187
- (!i.modal || r) && (o.current = !0);
1188
- }),
1189
- style: {
1190
- ...e.style,
1191
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1192
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1193
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1194
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1195
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1196
- }
1197
- });
1198
- }, "DropdownMenuContent")), hn = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Q(function(e, t) {
1199
- let { __scopeDropdownMenu: n, ...r } = e;
1200
- return /* @__PURE__ */ D(Gt, {
1201
- ...$(n),
1202
- ...r,
1203
- ref: t
1204
- });
1205
- }, "DropdownMenuGroup")), gn = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Q(function(e, t) {
1206
- let { __scopeDropdownMenu: n, ...r } = e;
1207
- return /* @__PURE__ */ D(Kt, {
1208
- ...$(n),
1209
- ...r,
1210
- ref: t
1211
- });
1212
- }, "DropdownMenuLabel")), _n = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Q(function(e, t) {
1213
- let { __scopeDropdownMenu: n, ...r } = e;
1214
- return /* @__PURE__ */ D(qt, {
1215
- ...$(n),
1216
- ...r,
1217
- ref: t
1218
- });
1219
- }, "DropdownMenuItem")), vn = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Q(function(e, t) {
1220
- let { __scopeDropdownMenu: n, ...r } = e;
1221
- return /* @__PURE__ */ D(Jt, {
1222
- ...$(n),
1223
- ...r,
1224
- ref: t
1225
- });
1226
- }, "DropdownMenuCheckboxItem")), yn = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Q(function(e, t) {
1227
- let { __scopeDropdownMenu: n, ...r } = e;
1228
- return /* @__PURE__ */ D(Yt, {
1229
- ...$(n),
1230
- ...r,
1231
- ref: t
1232
- });
1233
- }, "DropdownMenuRadioGroup")), bn = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Q(function(e, t) {
1234
- let { __scopeDropdownMenu: n, ...r } = e;
1235
- return /* @__PURE__ */ D(Xt, {
1236
- ...$(n),
1237
- ...r,
1238
- ref: t
1239
- });
1240
- }, "DropdownMenuRadioItem")), xn = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Q(function(e, t) {
1241
- let { __scopeDropdownMenu: n, ...r } = e;
1242
- return /* @__PURE__ */ D(Zt, {
1243
- ...$(n),
1244
- ...r,
1245
- ref: t
1246
- });
1247
- }, "DropdownMenuItemIndicator")), Sn = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Q(function(e, t) {
1248
- let { __scopeDropdownMenu: n, ...r } = e;
1249
- return /* @__PURE__ */ D(Qt, {
1250
- ...$(n),
1251
- ...r,
1252
- ref: t
1253
- });
1254
- }, "DropdownMenuSeparator")), Cn = /* @__PURE__ */ Q((e) => {
1255
- let { __scopeDropdownMenu: t, children: r, open: i, onOpenChange: a, defaultOpen: o } = e, s = $(t), [c, l] = n({
1256
- prop: i,
1257
- defaultProp: o ?? !1,
1258
- onChange: a,
1259
- caller: "DropdownMenuSub"
1260
- });
1261
- return /* @__PURE__ */ D($t, {
1262
- ...s,
1263
- open: c,
1264
- onOpenChange: l,
1265
- children: r
1266
- });
1267
- }, "DropdownMenuSub"), wn = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Q(function(e, t) {
1268
- let { __scopeDropdownMenu: n, ...r } = e;
1269
- return /* @__PURE__ */ D(en, {
1270
- ...$(n),
1271
- ...r,
1272
- ref: t
1273
- });
1274
- }, "DropdownMenuSubTrigger")), Tn = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Q(function(e, t) {
1275
- let { __scopeDropdownMenu: n, ...r } = e;
1276
- return /* @__PURE__ */ D(tn, {
1277
- ...$(n),
1278
- ...r,
1279
- ref: t,
1280
- style: {
1281
- ...e.style,
1282
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1283
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1284
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1285
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1286
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1287
- }
1288
- });
1289
- }, "DropdownMenuSubContent")), En = ln, Dn = dn, On = fn, kn = mn, An = hn, jn = gn, Mn = _n, Nn = vn, Pn = yn, Fn = bn, In = xn, Ln = Sn, Rn = Cn, zn = wn, Bn = Tn;
1290
- //#endregion
1291
- //#region lib/components/ui/menu-item-loading.tsx
1292
- function Vn(e) {
1293
- return e ? {
1294
- "aria-disabled": !0,
1295
- "aria-busy": !0,
1296
- disabled: !1,
1297
- "data-loading": "",
1298
- onSelect: (e) => e.preventDefault()
1299
- } : {};
1300
- }
1301
- var Hn = "data-[loading]:cursor-progress data-[loading]:opacity-70 data-[loading]:[&>svg]:hidden";
1302
- function Un({ className: t }) {
1303
- return /* @__PURE__ */ D(w, {
1304
- "aria-hidden": "true",
1305
- color: "default",
1306
- className: e("size-4", t)
1307
- });
1308
- }
1309
- //#endregion
1310
- //#region lib/components/ui/option-item-classes.ts
1311
- var Wn = "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", Gn = `pointer-coarse:min-h-11 transition-colors duration-100 motion-reduce:transition-none ${Wn}`, Kn = [
1312
- Gn,
1313
- "data-[highlighted]:bg-primary/8 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-(--nxgt-option-ring)",
1314
- "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",
1315
- "data-[state=checked]:data-[highlighted]:bg-primary/18 data-[state=checked]:data-[highlighted]:before:bg-primary-text",
1316
- "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]"
1317
- ].join(" "), qn = [
1318
- Gn,
1319
- "hover:bg-primary/8 focus-visible:bg-primary/8 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-(--nxgt-option-ring)",
1320
- "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]"
1321
- ].join(" "), Jn = "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]", Yn = "[&_svg:not([class*='text-'])]:text-muted-foreground gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", Xn = "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]", Zn = [
1322
- Gn,
1323
- "data-[highlighted]:bg-primary/8",
1324
- "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",
1325
- "data-[selected]:data-[highlighted]:bg-primary/18 data-[selected]:data-[highlighted]:before:bg-primary-text",
1326
- "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]"
1327
- ].join(" "), Qn = [
1328
- Gn,
1329
- "data-[selected=true]:bg-primary/8",
1330
- "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",
1331
- "aria-checked:data-[selected=true]:bg-primary/18 aria-checked:data-[selected=true]:before:bg-primary-text",
1332
- "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]"
1333
- ].join(" "), $n = [
1334
- "relative pointer-coarse:min-h-11 transition-colors duration-100 motion-reduce:transition-none",
1335
- "data-[highlighted]:bg-primary/8 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-(--nxgt-option-ring)",
1336
- "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]"
1337
- ].join(" "), er = [
1338
- "relative pointer-coarse:min-h-11 transition-colors duration-100 motion-reduce:transition-none",
1339
- "data-[selected=true]:bg-primary/8",
1340
- "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]"
1341
- ].join(" ");
1342
- //#endregion
1343
- //#region lib/components/ui/selection/option-mark.tsx
1344
- function tr({ kind: t, animate: n = "state", className: r }) {
1345
- let i = n === "enter" ? "nxgt-option-mark-enter" : "";
1346
- return t === "dot" ? /* @__PURE__ */ D("span", {
1347
- "aria-hidden": "true",
1348
- "data-slot": "option-mark",
1349
- className: e("nxgt-option-dot", i, r)
1350
- }) : /* @__PURE__ */ D("svg", {
1351
- "aria-hidden": "true",
1352
- focusable: "false",
1353
- "data-slot": "option-mark",
1354
- viewBox: "0 0 24 24",
1355
- className: e("nxgt-option-check", i, r),
1356
- children: /* @__PURE__ */ D("path", {
1357
- d: "M5.5 12.5l4.2 4.2L18.5 7.5",
1358
- pathLength: 1
1359
- })
1360
- });
1361
- }
1362
- //#endregion
1363
- //#region lib/components/ui/overlays/dropdown-menu/dropdown-menu-items.tsx
1364
- function nr({ className: t, inset: n, variant: r = "default", active: a, loading: o, children: s, ...c }) {
1365
- return /* @__PURE__ */ O(Mn, {
1366
- "data-slot": "dropdown-menu-item",
1367
- "data-pw": "dropdown-menu-item",
1368
- "data-inset": n,
1369
- "data-variant": r,
1370
- "data-active": a ? "" : void 0,
1371
- 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", Kn, Xn, Hn, t),
1372
- ...c,
1373
- ...Vn(o),
1374
- children: [o && /* @__PURE__ */ D(Un, {}), /* @__PURE__ */ D(i, { children: s })]
1375
- });
1376
- }
1377
- function rr({ className: t, children: n, checked: r, ...i }) {
1378
- return /* @__PURE__ */ O(Nn, {
1379
- "data-slot": "dropdown-menu-checkbox-item",
1380
- 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", $n, t),
1381
- checked: r,
1382
- ...i,
1383
- children: [/* @__PURE__ */ D("span", {
1384
- className: "pointer-events-none absolute start-2 flex size-3.5 center",
1385
- children: /* @__PURE__ */ D(In, {
1386
- forceMount: !0,
1387
- children: /* @__PURE__ */ D(tr, { kind: "check" })
1388
- })
1389
- }), n]
1390
- });
1391
- }
1392
- function ir({ ...e }) {
1393
- return /* @__PURE__ */ D(Pn, {
1394
- "data-slot": "dropdown-menu-radio-group",
1395
- ...e
1396
- });
1397
- }
1398
- function ar({ className: t, children: n, mark: r = "start", ...i }) {
1399
- let a = r === "end";
1400
- return /* @__PURE__ */ D(Fn, {
1401
- "data-slot": "dropdown-menu-radio-item",
1402
- 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", Kn, t),
1403
- ...i,
1404
- children: a ? /* @__PURE__ */ O(E, { children: [n, /* @__PURE__ */ D("span", {
1405
- className: "pointer-events-none ms-auto flex size-3.5 center",
1406
- children: /* @__PURE__ */ D(In, {
1407
- forceMount: !0,
1408
- children: /* @__PURE__ */ D(tr, { kind: "check" })
1409
- })
1410
- })] }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("span", {
1411
- className: "pointer-events-none absolute start-2 flex size-3.5 center",
1412
- children: /* @__PURE__ */ D(In, {
1413
- forceMount: !0,
1414
- children: /* @__PURE__ */ D(tr, { kind: "dot" })
1415
- })
1416
- }), n] })
1417
- });
1418
- }
1419
- //#endregion
1420
- //#region lib/components/ui/overlays/dropdown-menu/dropdown-menu.tsx
1421
- function or(e) {
1422
- return /* @__PURE__ */ D(S, {
1423
- value: e.modal ?? !1,
1424
- children: /* @__PURE__ */ D(En, {
1425
- "data-slot": "dropdown-menu",
1426
- modal: !1,
1427
- ...e
1428
- })
1429
- });
1430
- }
1431
- function sr({ ...e }) {
1432
- return /* @__PURE__ */ D(On, {
1433
- "data-slot": "dropdown-menu-portal",
1434
- ...e
1435
- });
1436
- }
1437
- function cr({ className: t, ...n }) {
1438
- return /* @__PURE__ */ D(Dn, {
1439
- "data-slot": "dropdown-menu-trigger",
1440
- "data-pw": n.name ?? "dropdown-menu",
1441
- className: e("transition-all focus:bg-primary/10 hover:bg-primary/10 rounded-(--nxgt-item-radius)", t),
1442
- ...n
1443
- });
1444
- }
1445
- function lr({ className: t, sideOffset: n = 4, container: r, ref: i, ...a }) {
1446
- return /* @__PURE__ */ D(te, {
1447
- value: !1,
1448
- children: /* @__PURE__ */ D(On, {
1449
- container: r,
1450
- children: /* @__PURE__ */ D(kn, {
1451
- ref: y(!1, i),
1452
- "data-slot": "dropdown-menu-content",
1453
- sideOffset: n,
1454
- 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),
1455
- ...a
1456
- })
1457
- })
1458
- });
1459
- }
1460
- function ur({ className: t, ...n }) {
1461
- return /* @__PURE__ */ D(An, {
1462
- "data-slot": "dropdown-menu-group",
1463
- className: e("grid gap-0.5", t),
1464
- ...n
1465
- });
1466
- }
1467
- function dr({ className: t, inset: n, ...r }) {
1468
- return /* @__PURE__ */ D(jn, {
1469
- "data-slot": "dropdown-menu-label",
1470
- "data-inset": n,
1471
- className: e("px-2 py-1.5 text-xs font-medium data-[inset]:ps-8 text-muted-foreground", t),
1472
- ...r
1473
- });
1474
- }
1475
- function fr({ className: t, ...n }) {
1476
- return /* @__PURE__ */ D(Ln, {
1477
- "data-slot": "dropdown-menu-separator",
1478
- className: e("bg-border -mx-1 my-1 h-px", t),
1479
- ...n
1480
- });
1481
- }
1482
- function pr({ className: t, ...n }) {
1483
- return /* @__PURE__ */ D("span", {
1484
- "data-slot": "dropdown-menu-shortcut",
1485
- className: e("text-muted-foreground ms-auto text-xs tracking-widest in-data-[active]:text-foreground/70 in-data-[highlighted]:text-accent-foreground", t),
1486
- ...n
1487
- });
1488
- }
1489
- //#endregion
1490
- export { le as $, Rn as A, Kt as B, Hn as C, Mn as D, kn as E, Jt as F, Qt as G, Yt as H, Wt as I, en as J, $t as K, Gt as L, zn as M, Dn as N, On as O, Ht as P, Te as Q, qt as R, qn as S, Vn as T, Xt as U, Ut as V, Vt as W, Re as X, Je as Y, Le as Z, Wn as _, sr as a, Yn as b, cr as c, ir as d, A as et, ar as f, Qn as g, er as h, dr as i, Bn as j, En as k, rr as l, Zn as m, lr as n, fr as o, tr as p, tn as q, ur as r, pr as s, or as t, nr as u, $n as v, Un as w, Jn as x, Kn as y, Zt as z };