@minimalstuff/ui 4.1.0 → 4.2.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.
- package/README.md +5 -5
- package/dist/index.d.ts +62 -1
- package/dist/minimalstuff-ui.css +1 -1
- package/dist/minimalstuff-ui.js +1499 -1376
- package/package.json +34 -36
package/dist/minimalstuff-ui.js
CHANGED
|
@@ -3,7 +3,7 @@ import t, { cloneElement as n, createContext as r, createElement as i, isValidEl
|
|
|
3
3
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
4
4
|
import * as v from "react-dom";
|
|
5
5
|
import { createPortal as y } from "react-dom";
|
|
6
|
-
|
|
6
|
+
// node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
7
7
|
function b(e) {
|
|
8
8
|
var t, n, r = "";
|
|
9
9
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
@@ -19,19 +19,8 @@ function x() {
|
|
|
19
19
|
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = b(e)) && (r && (r += " "), r += t);
|
|
20
20
|
return r;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var S = {
|
|
25
|
-
none: "rounded-none",
|
|
26
|
-
sm: "rounded-sm",
|
|
27
|
-
md: "rounded-md",
|
|
28
|
-
lg: "rounded-lg",
|
|
29
|
-
xl: "rounded-xl",
|
|
30
|
-
full: "rounded-full"
|
|
31
|
-
}, C = {
|
|
32
|
-
...S,
|
|
33
|
-
full: S.lg
|
|
34
|
-
}, w = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", T = "focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent", E = "has-[:focus-visible]:outline-none has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", D = "has-[:focus-visible]:ring-blue-500", O = "has-[:focus-visible]:ring-red-500", k = "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400", A = {
|
|
22
|
+
// src/components/shared/focus_styles.ts
|
|
23
|
+
var S = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", C = "focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent", w = "has-[:focus-visible]:outline-none has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", T = "has-[:focus-visible]:ring-blue-500", E = "has-[:focus-visible]:ring-red-500", D = "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400", O = {
|
|
35
24
|
primary: {
|
|
36
25
|
solid: "border-transparent bg-blue-600 text-white enabled:hover:bg-blue-700 enabled:active:bg-blue-800",
|
|
37
26
|
outline: "border-blue-300 bg-transparent text-blue-700 enabled:hover:bg-blue-50 enabled:active:bg-blue-100 dark:border-blue-800 dark:text-blue-400 dark:enabled:hover:bg-blue-950/40 dark:enabled:active:bg-blue-950/60",
|
|
@@ -67,7 +56,17 @@ var S = {
|
|
|
67
56
|
subtle: "border-transparent bg-yellow-50 text-yellow-700 enabled:hover:bg-yellow-100 enabled:active:bg-yellow-200 dark:bg-yellow-500/10 dark:text-yellow-400 dark:enabled:hover:bg-yellow-500/20 dark:enabled:active:bg-yellow-500/30",
|
|
68
57
|
focusOutline: "focus-visible:outline-yellow-700 dark:focus-visible:outline-yellow-500"
|
|
69
58
|
}
|
|
70
|
-
},
|
|
59
|
+
}, k = "inline-flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed", A = `cursor-pointer transition-[color,background-color,border-color,transform] duration-200 enabled:active:duration-75 enabled:active:scale-[0.95] ${S}`, j = {
|
|
60
|
+
none: "rounded-none",
|
|
61
|
+
sm: "rounded-sm",
|
|
62
|
+
md: "rounded-md",
|
|
63
|
+
lg: "rounded-lg",
|
|
64
|
+
xl: "rounded-xl",
|
|
65
|
+
full: "rounded-full"
|
|
66
|
+
}, M = {
|
|
67
|
+
...j,
|
|
68
|
+
full: j.lg
|
|
69
|
+
}, N = {
|
|
71
70
|
xs: "h-6 w-6 text-xs",
|
|
72
71
|
sm: "h-8 w-8 text-sm",
|
|
73
72
|
md: "h-10 w-10 text-base",
|
|
@@ -93,19 +92,18 @@ function I({ name: e, src: t, size: n = "sm", color: r = "primary", radius: i =
|
|
|
93
92
|
role: u ? "img" : void 0,
|
|
94
93
|
"aria-label": u ? e : void 0,
|
|
95
94
|
"aria-hidden": !u || void 0,
|
|
96
|
-
className: x("inline-flex flex-shrink-0 items-center justify-center overflow-hidden", N[n], !a &&
|
|
95
|
+
className: x("inline-flex flex-shrink-0 items-center justify-center overflow-hidden", N[n], !a && j[i], !a && !l && ["border font-semibold", O[r].solid], o),
|
|
97
96
|
children: d
|
|
98
97
|
});
|
|
99
98
|
}
|
|
100
|
-
|
|
101
|
-
//#region src/components/badge/badge.tsx
|
|
99
|
+
// src/components/badge/badge.tsx
|
|
102
100
|
var L = {
|
|
103
101
|
xs: "px-1.5 py-0.5 text-xs",
|
|
104
102
|
sm: "px-2.5 py-1 text-sm",
|
|
105
103
|
md: "px-3 py-1 text-base",
|
|
106
104
|
lg: "px-3.5 py-1.5 text-lg"
|
|
107
105
|
}, R = ({ children: e, color: t = "primary", variant: n = "subtle", size: r = "sm", radius: i = "md", className: a, ...o }) => /* @__PURE__ */ g("span", {
|
|
108
|
-
className: x("inline-flex items-center gap-1 border",
|
|
106
|
+
className: x("inline-flex items-center gap-1 border", j[i], L[r], O[t][n], a),
|
|
109
107
|
...o,
|
|
110
108
|
children: e
|
|
111
109
|
}), z = {
|
|
@@ -120,13 +118,13 @@ var L = {
|
|
|
120
118
|
lg: "w-5 h-5"
|
|
121
119
|
};
|
|
122
120
|
function te(e) {
|
|
123
|
-
let { unstyled: t = !1, variant: n = "solid", color: r = "primary", size: i = "md", radius: a = "md", children: o, className: s, fullWidth: c = !1, loading: l = !1, startIcon: u, endIcon: d, disabled: f, ...p } = e, m =
|
|
121
|
+
let { unstyled: t = !1, variant: n = "solid", color: r = "primary", size: i = "md", radius: a = "md", children: o, className: s, fullWidth: c = !1, loading: l = !1, startIcon: u, endIcon: d, disabled: f, ...p } = e, m = O[r], h = ee[i];
|
|
124
122
|
return /* @__PURE__ */ _("button", {
|
|
125
123
|
type: "button",
|
|
126
|
-
className: x(
|
|
127
|
-
|
|
124
|
+
className: x(k, !t && [
|
|
125
|
+
A,
|
|
128
126
|
"gap-2 font-medium border",
|
|
129
|
-
|
|
127
|
+
j[a],
|
|
130
128
|
z[i],
|
|
131
129
|
m[n],
|
|
132
130
|
m.focusOutline
|
|
@@ -151,15 +149,14 @@ function te(e) {
|
|
|
151
149
|
]
|
|
152
150
|
});
|
|
153
151
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
var B = "border-gray-300 dark:border-gray-600", V = "bg-white dark:bg-gray-800", ne = "border-gray-200 dark:border-gray-700", H = "border-gray-100 dark:border-gray-800", re = "bg-white dark:bg-gray-900", U = {
|
|
152
|
+
// src/components/card/card_header.tsx
|
|
153
|
+
var B = {
|
|
157
154
|
2: "h2",
|
|
158
155
|
3: "h3",
|
|
159
156
|
4: "h4"
|
|
160
157
|
};
|
|
161
|
-
function
|
|
162
|
-
let a =
|
|
158
|
+
function V({ title: e, titleId: t, level: n, description: r, actions: i }) {
|
|
159
|
+
let a = B[n];
|
|
163
160
|
return /* @__PURE__ */ _("div", {
|
|
164
161
|
className: "mb-4",
|
|
165
162
|
children: [/* @__PURE__ */ _("div", {
|
|
@@ -175,15 +172,14 @@ function W({ title: e, titleId: t, level: n, description: r, actions: i }) {
|
|
|
175
172
|
})]
|
|
176
173
|
});
|
|
177
174
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
var ie = {
|
|
175
|
+
// src/components/shared/surface_tokens.ts
|
|
176
|
+
var ne = "border-gray-300 dark:border-gray-600", H = "bg-white dark:bg-gray-800", re = "border-gray-200 dark:border-gray-700", U = "border-gray-100 dark:border-gray-800", W = "bg-white dark:bg-gray-900", ie = "[scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]", ae = `[scrollbar-width:thin] ${ie}`, G = `[&,&_*]:[scrollbar-width:thin] ${ie}`, oe = {
|
|
181
177
|
none: "",
|
|
182
178
|
sm: "p-4",
|
|
183
179
|
md: "p-6",
|
|
184
180
|
lg: "p-8"
|
|
185
181
|
};
|
|
186
|
-
function
|
|
182
|
+
function K({ children: e, title: t, description: n, actions: r, headingLevel: i = 2, padding: a = "md", radius: o = "lg", unstyled: s = !1, className: c }) {
|
|
187
183
|
let u = l(), d = !!t;
|
|
188
184
|
return /* @__PURE__ */ _("div", {
|
|
189
185
|
role: d ? "region" : void 0,
|
|
@@ -192,10 +188,10 @@ function ae({ children: e, title: t, description: n, actions: r, headingLevel: i
|
|
|
192
188
|
"border",
|
|
193
189
|
"bg-white dark:bg-gray-800",
|
|
194
190
|
"border-gray-200 dark:border-gray-700",
|
|
195
|
-
|
|
196
|
-
|
|
191
|
+
j[o],
|
|
192
|
+
oe[a]
|
|
197
193
|
], c),
|
|
198
|
-
children: [d && /* @__PURE__ */ g(
|
|
194
|
+
children: [d && /* @__PURE__ */ g(V, {
|
|
199
195
|
title: t,
|
|
200
196
|
titleId: u,
|
|
201
197
|
level: i,
|
|
@@ -204,53 +200,52 @@ function ae({ children: e, title: t, description: n, actions: r, headingLevel: i
|
|
|
204
200
|
}), e]
|
|
205
201
|
});
|
|
206
202
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
function oe(e, t) {
|
|
203
|
+
// src/components/character_count/character_count.tsx
|
|
204
|
+
var se = "text-xs text-gray-500 dark:text-gray-400 mt-1 text-right";
|
|
205
|
+
function ce(e, t) {
|
|
211
206
|
return t ? "" : e === "overLimit" ? "text-red-600 dark:text-red-400" : e === "atLimit" ? "text-amber-700 dark:text-amber-400" : "";
|
|
212
207
|
}
|
|
213
|
-
function
|
|
208
|
+
function le({ current: e, min: t, max: n, showMin: r, showMax: i, unstyled: a = !1, id: o, className: s }) {
|
|
214
209
|
let c = r === !0 || i === !0, l = t !== void 0 && e <= t ? "atLimit" : "ok", u = n !== void 0 && e > n ? "overLimit" : n !== void 0 && e >= n ? "atLimit" : "ok", d = c ? `${e}/${t} min` : `${e} (min ${t})`, f = c ? `${e}/${n} max` : `${e}/${n}`;
|
|
215
210
|
return /* @__PURE__ */ _("div", {
|
|
216
211
|
id: o,
|
|
217
|
-
className: x(!a &&
|
|
212
|
+
className: x(!a && se, s),
|
|
218
213
|
children: [
|
|
219
214
|
r && t !== void 0 && /* @__PURE__ */ g("span", {
|
|
220
|
-
className:
|
|
215
|
+
className: ce(l, a),
|
|
221
216
|
children: d
|
|
222
217
|
}),
|
|
223
218
|
r && i && " · ",
|
|
224
219
|
i && n !== void 0 && /* @__PURE__ */ g("span", {
|
|
225
|
-
className:
|
|
220
|
+
className: ce(u, a),
|
|
226
221
|
children: f
|
|
227
222
|
}),
|
|
228
223
|
!r && !i && n !== void 0 && /* @__PURE__ */ g("span", {
|
|
229
|
-
className:
|
|
224
|
+
className: ce(u, a),
|
|
230
225
|
children: f
|
|
231
226
|
}),
|
|
232
227
|
!r && !i && t !== void 0 && n === void 0 && /* @__PURE__ */ g("span", {
|
|
233
|
-
className:
|
|
228
|
+
className: ce(l, a),
|
|
234
229
|
children: d
|
|
235
230
|
})
|
|
236
231
|
]
|
|
237
232
|
});
|
|
238
233
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
234
|
+
// src/components/shared/checkmark_icon.tsx
|
|
235
|
+
function ue() {
|
|
236
|
+
return /* @__PURE__ */ g("svg", {
|
|
237
|
+
className: "h-3 w-3 text-white",
|
|
238
|
+
viewBox: "0 0 12 12",
|
|
239
|
+
fill: "none",
|
|
240
|
+
stroke: "currentColor",
|
|
241
|
+
strokeWidth: "2.5",
|
|
242
|
+
strokeLinecap: "round",
|
|
243
|
+
strokeLinejoin: "round",
|
|
244
|
+
children: /* @__PURE__ */ g("polyline", { points: "2 6 5 9 10 3" })
|
|
245
|
+
});
|
|
250
246
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
function ce() {
|
|
247
|
+
// src/components/shared/dash_icon.tsx
|
|
248
|
+
function de() {
|
|
254
249
|
return /* @__PURE__ */ g("svg", {
|
|
255
250
|
className: "h-3 w-3 text-white",
|
|
256
251
|
viewBox: "0 0 12 12",
|
|
@@ -266,83 +261,71 @@ function ce() {
|
|
|
266
261
|
})
|
|
267
262
|
});
|
|
268
263
|
}
|
|
269
|
-
var
|
|
270
|
-
|
|
271
|
-
|
|
264
|
+
var fe = `w-full border ${ne} ${H} text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 ${C} transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed`, pe = "text-sm font-medium text-gray-700 dark:text-gray-300", me = "text-xs text-gray-600 dark:text-gray-400", he = "text-xs text-red-600 dark:text-red-400", ge = "border-red-500 dark:border-red-400", _e = ({ id: e, description: t, className: n }) => t ? typeof t == "string" ? /* @__PURE__ */ g("p", {
|
|
265
|
+
id: e,
|
|
266
|
+
className: x(me, n),
|
|
267
|
+
children: t
|
|
268
|
+
}) : /* @__PURE__ */ g("span", {
|
|
269
|
+
id: e,
|
|
270
|
+
className: x(me, "block", n),
|
|
271
|
+
children: t
|
|
272
|
+
}) : null, ve = r(!0);
|
|
273
|
+
function ye() {
|
|
274
|
+
return s(ve);
|
|
272
275
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
let r = he();
|
|
276
|
+
// src/components/shared/field_error.tsx
|
|
277
|
+
var be = ({ id: e, error: t, className: n }) => {
|
|
278
|
+
let r = ye();
|
|
277
279
|
return t ? /* @__PURE__ */ g("p", {
|
|
278
280
|
id: e,
|
|
279
|
-
className: x(
|
|
281
|
+
className: x(he, n),
|
|
280
282
|
role: r ? "alert" : void 0,
|
|
281
283
|
children: t
|
|
282
284
|
}) : null;
|
|
283
285
|
};
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
let t = l(), n = e ?? t;
|
|
288
|
-
return {
|
|
289
|
-
fieldId: n,
|
|
290
|
-
errorId: `${n}-error`,
|
|
291
|
-
descriptionId: `${n}-description`,
|
|
292
|
-
labelId: `${n}-label`,
|
|
293
|
-
characterCountId: `${n}-character-count`
|
|
294
|
-
};
|
|
295
|
-
}
|
|
296
|
-
//#endregion
|
|
297
|
-
//#region src/components/shared/checkmark_icon.tsx
|
|
298
|
-
function ge() {
|
|
299
|
-
return /* @__PURE__ */ g("svg", {
|
|
300
|
-
className: "h-3 w-3 text-white",
|
|
301
|
-
viewBox: "0 0 12 12",
|
|
302
|
-
fill: "none",
|
|
303
|
-
stroke: "currentColor",
|
|
304
|
-
strokeWidth: "2.5",
|
|
305
|
-
strokeLinecap: "round",
|
|
306
|
-
strokeLinejoin: "round",
|
|
307
|
-
children: /* @__PURE__ */ g("polyline", { points: "2 6 5 9 10 3" })
|
|
308
|
-
});
|
|
286
|
+
// src/components/shared/join_ids.ts
|
|
287
|
+
function q(...e) {
|
|
288
|
+
return e.filter(Boolean).join(" ") || void 0;
|
|
309
289
|
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
var _e = ({ id: e, description: t, className: n }) => t ? typeof t == "string" ? /* @__PURE__ */ g("p", {
|
|
313
|
-
id: e,
|
|
314
|
-
className: x(de, n),
|
|
315
|
-
children: t
|
|
316
|
-
}) : /* @__PURE__ */ g("span", {
|
|
317
|
-
id: e,
|
|
318
|
-
className: x(de, "block", n),
|
|
319
|
-
children: t
|
|
320
|
-
}) : null;
|
|
321
|
-
//#endregion
|
|
322
|
-
//#region src/components/shared/option_card_styles.ts
|
|
323
|
-
function ve(e) {
|
|
290
|
+
// src/components/shared/option_card_styles.ts
|
|
291
|
+
function xe(e) {
|
|
324
292
|
let { isSelected: t, isError: n, isDisabled: r, radius: i, unstyled: a } = e;
|
|
325
|
-
return x("flex cursor-pointer items-start gap-3 transition-colors duration-150",
|
|
326
|
-
|
|
293
|
+
return x("flex cursor-pointer items-start gap-3 transition-colors duration-150", w, n ? E : T, !a && [
|
|
294
|
+
j[i],
|
|
327
295
|
"border px-3 py-2.5",
|
|
328
296
|
t ? n ? x("border-red-500 dark:border-red-400", "bg-red-50 dark:bg-red-950/20") : "border-blue-500 bg-blue-50 dark:border-blue-500 dark:bg-blue-950/25" : n ? "border-red-300 bg-white dark:border-red-800/50 dark:bg-gray-800/50" : x("border-gray-200 dark:border-gray-700", "bg-gray-50 hover:border-gray-300 hover:bg-white dark:bg-gray-800/50 dark:hover:border-gray-600 dark:hover:bg-gray-800")
|
|
329
297
|
], r && "cursor-not-allowed opacity-50");
|
|
330
298
|
}
|
|
331
|
-
function
|
|
299
|
+
function Se(e) {
|
|
332
300
|
let { isSelected: t, isError: n } = e;
|
|
333
|
-
return t ? n ?
|
|
301
|
+
return t ? n ? ge : "border-blue-600 dark:border-blue-500" : n ? "border-red-400 dark:border-red-600" : ne;
|
|
334
302
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
function be(e, t) {
|
|
303
|
+
// src/components/shared/use_controlled_state.ts
|
|
304
|
+
function Ce(e, t) {
|
|
338
305
|
let [n, r] = p(t), i = e !== void 0, a = o((e) => {
|
|
339
306
|
i || r(e);
|
|
340
307
|
}, [i]);
|
|
341
308
|
return [i ? e : n, a];
|
|
342
309
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
310
|
+
// src/components/shared/use_field_ids.ts
|
|
311
|
+
function J(e) {
|
|
312
|
+
let t = l(), n = e ?? t;
|
|
313
|
+
return {
|
|
314
|
+
fieldId: n,
|
|
315
|
+
errorId: `${n}-error`,
|
|
316
|
+
descriptionId: `${n}-description`,
|
|
317
|
+
labelId: `${n}-label`,
|
|
318
|
+
characterCountId: `${n}-character-count`
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
// src/lib/merge_refs.ts
|
|
322
|
+
function we(...e) {
|
|
323
|
+
return (t) => {
|
|
324
|
+
for (let n of e) typeof n == "function" ? n(t) : n && (n.current = t);
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
// src/components/checkbox/checkbox.tsx
|
|
328
|
+
function Te(e, t, n) {
|
|
346
329
|
return e === void 0 ? null : typeof e == "string" ? /* @__PURE__ */ _("span", {
|
|
347
330
|
className: t,
|
|
348
331
|
children: [e, n && /* @__PURE__ */ g("span", {
|
|
@@ -354,95 +337,75 @@ function xe(e, t, n) {
|
|
|
354
337
|
children: "*"
|
|
355
338
|
})] });
|
|
356
339
|
}
|
|
357
|
-
function
|
|
358
|
-
let { fieldId:
|
|
340
|
+
function Ee({ label: e, indeterminate: t = !1, description: n, error: r, radius: i = "sm", unstyled: a = !1, fullWidth: o = !1, variant: s = "inline", className: l, wrapperClassName: u, checked: p, defaultChecked: m = !1, onChange: h, id: v, "aria-describedby": y, ref: b, ...S }) {
|
|
341
|
+
let { fieldId: C, errorId: w, descriptionId: T } = J(v), [E, D] = Ce(p, m), O = f(null), k = s === "card", A = E || t, M = q(y, !!n && T, r && w), N = d(() => we(O, b), [b]);
|
|
359
342
|
c(() => {
|
|
360
|
-
|
|
343
|
+
O.current && (O.current.indeterminate = t);
|
|
361
344
|
});
|
|
362
345
|
let P = (e) => {
|
|
363
|
-
e.target.indeterminate = t,
|
|
364
|
-
}, F =
|
|
365
|
-
isSelected:
|
|
346
|
+
e.target.indeterminate = t, D(e.target.checked), h?.(e);
|
|
347
|
+
}, F = k ? xe({
|
|
348
|
+
isSelected: A,
|
|
366
349
|
isError: !!r,
|
|
367
|
-
isDisabled:
|
|
350
|
+
isDisabled: S.disabled === !0,
|
|
368
351
|
radius: i,
|
|
369
352
|
unstyled: a
|
|
370
|
-
}) : x("flex items-start gap-3 cursor-pointer",
|
|
353
|
+
}) : x("flex items-start gap-3 cursor-pointer", S.disabled && "cursor-not-allowed opacity-50"), I = k ? x("select-none text-sm font-medium", A ? r ? "text-red-700 dark:text-red-300" : "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300") : x(pe, "select-none"), L = x("relative shrink-0", j[i], !k && ["has-[:focus-visible]:outline-none has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", r ? "has-[:focus-visible]:ring-red-500" : "has-[:focus-visible]:ring-blue-500"]), R = Te(e, I, S.required === !0);
|
|
371
354
|
return /* @__PURE__ */ _("div", {
|
|
372
355
|
className: x(o ? "w-full" : "w-fit", u),
|
|
373
356
|
children: [
|
|
374
357
|
/* @__PURE__ */ _("label", {
|
|
375
|
-
htmlFor:
|
|
358
|
+
htmlFor: C,
|
|
376
359
|
className: F,
|
|
377
360
|
children: [/* @__PURE__ */ _("span", {
|
|
378
361
|
className: L,
|
|
379
362
|
children: [/* @__PURE__ */ g("input", {
|
|
380
363
|
type: "checkbox",
|
|
381
364
|
ref: N,
|
|
382
|
-
id:
|
|
365
|
+
id: C,
|
|
383
366
|
className: "sr-only",
|
|
384
|
-
checked:
|
|
367
|
+
checked: E,
|
|
385
368
|
onChange: P,
|
|
386
369
|
"aria-invalid": !!r,
|
|
387
370
|
"aria-describedby": M,
|
|
388
|
-
...
|
|
371
|
+
...S
|
|
389
372
|
}), /* @__PURE__ */ g("span", {
|
|
390
373
|
className: x("flex h-5 w-5 items-center justify-center transition-all duration-200", !a && [
|
|
391
|
-
|
|
374
|
+
j[i],
|
|
392
375
|
"border-2",
|
|
393
|
-
|
|
376
|
+
A ? x("border-blue-600 dark:border-blue-500", "bg-blue-600 dark:bg-blue-500") : x("border-gray-300 dark:border-gray-600", "bg-white dark:bg-gray-800"),
|
|
394
377
|
r && "border-red-500 dark:border-red-400"
|
|
395
378
|
], l),
|
|
396
379
|
"aria-hidden": !0,
|
|
397
|
-
children: t ? /* @__PURE__ */ g(
|
|
380
|
+
children: t ? /* @__PURE__ */ g(de, {}) : E && /* @__PURE__ */ g(ue, {})
|
|
398
381
|
})]
|
|
399
|
-
}),
|
|
382
|
+
}), k ? /* @__PURE__ */ _("span", {
|
|
400
383
|
className: "flex min-w-0 flex-col",
|
|
401
384
|
children: [R, n && /* @__PURE__ */ g("span", {
|
|
402
|
-
id:
|
|
385
|
+
id: T,
|
|
403
386
|
className: x("text-xs text-gray-600 dark:text-gray-400", "mt-0.5"),
|
|
404
387
|
children: n
|
|
405
388
|
})]
|
|
406
389
|
}) : R]
|
|
407
390
|
}),
|
|
408
|
-
!
|
|
409
|
-
id:
|
|
391
|
+
!k && /* @__PURE__ */ g(_e, {
|
|
392
|
+
id: T,
|
|
410
393
|
description: n,
|
|
411
394
|
className: "mt-1 ml-8"
|
|
412
395
|
}),
|
|
413
|
-
/* @__PURE__ */ g(
|
|
414
|
-
id:
|
|
396
|
+
/* @__PURE__ */ g(be, {
|
|
397
|
+
id: w,
|
|
415
398
|
error: r,
|
|
416
|
-
className:
|
|
399
|
+
className: k ? "mt-1" : "mt-1 ml-8"
|
|
417
400
|
})
|
|
418
401
|
]
|
|
419
402
|
});
|
|
420
403
|
}
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
confirm: "Confirm",
|
|
424
|
-
cancel: "Cancel",
|
|
425
|
-
noResults: "No results found",
|
|
426
|
-
clearSelection: "Clear selection",
|
|
427
|
-
search: "Search",
|
|
428
|
-
clear: "Clear",
|
|
429
|
-
required: "required",
|
|
430
|
-
currentTheme: (e) => `Current theme: ${e}`,
|
|
431
|
-
overflowCount: (e) => `+${e} more`,
|
|
432
|
-
selectedCount: (e) => `${e} selected`,
|
|
433
|
-
maxSelectedHint: (e) => `You can select up to ${e} items`
|
|
434
|
-
});
|
|
435
|
-
//#endregion
|
|
436
|
-
//#region src/components/ui_provider/use_labels.ts
|
|
437
|
-
function we() {
|
|
438
|
-
return s(Ce);
|
|
439
|
-
}
|
|
440
|
-
//#endregion
|
|
441
|
-
//#region src/components/shared/option_row.tsx
|
|
442
|
-
function Te({ item: e, htmlFor: t, descriptionId: n, orientation: r, isSelected: i, isDisabled: a, isError: o, radius: s, unstyled: c, className: l, control: u, indicator: d }) {
|
|
404
|
+
// src/components/shared/option_row.tsx
|
|
405
|
+
function De({ item: e, htmlFor: t, descriptionId: n, orientation: r, isSelected: i, isDisabled: a, isError: o, radius: s, unstyled: c, className: l, control: u, indicator: d }) {
|
|
443
406
|
return /* @__PURE__ */ _("label", {
|
|
444
407
|
htmlFor: t,
|
|
445
|
-
className: x(
|
|
408
|
+
className: x(xe({
|
|
446
409
|
isSelected: i,
|
|
447
410
|
isError: o,
|
|
448
411
|
isDisabled: a,
|
|
@@ -472,11 +435,10 @@ function Te({ item: e, htmlFor: t, descriptionId: n, orientation: r, isSelected:
|
|
|
472
435
|
]
|
|
473
436
|
});
|
|
474
437
|
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
function Ee({ option: e, optionId: t, descriptionId: n, name: r, orientation: i, isSelected: a, isDisabled: o, error: s, radius: c, unstyled: l, className: u, onToggle: d }) {
|
|
438
|
+
// src/components/checkbox_options/checkbox_option_row.tsx
|
|
439
|
+
function Oe({ option: e, optionId: t, descriptionId: n, name: r, orientation: i, isSelected: a, isDisabled: o, error: s, radius: c, unstyled: l, className: u, onToggle: d }) {
|
|
478
440
|
let f = !!s;
|
|
479
|
-
return /* @__PURE__ */ g(
|
|
441
|
+
return /* @__PURE__ */ g(De, {
|
|
480
442
|
item: e,
|
|
481
443
|
htmlFor: t,
|
|
482
444
|
descriptionId: n,
|
|
@@ -500,27 +462,44 @@ function Ee({ option: e, optionId: t, descriptionId: n, name: r, orientation: i,
|
|
|
500
462
|
className: "sr-only"
|
|
501
463
|
}),
|
|
502
464
|
indicator: /* @__PURE__ */ g("span", {
|
|
503
|
-
className: x("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center border-2 transition-colors duration-150",
|
|
465
|
+
className: x("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center border-2 transition-colors duration-150", j.sm, Se({
|
|
504
466
|
isSelected: a,
|
|
505
467
|
isError: f
|
|
506
468
|
}), a && (f ? "bg-red-500 dark:bg-red-400" : "bg-blue-600 dark:bg-blue-500")),
|
|
507
469
|
"aria-hidden": !0,
|
|
508
|
-
children: a && /* @__PURE__ */ g(
|
|
470
|
+
children: a && /* @__PURE__ */ g(ue, {})
|
|
509
471
|
})
|
|
510
472
|
});
|
|
511
473
|
}
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
474
|
+
var ke = r({
|
|
475
|
+
close: "Close",
|
|
476
|
+
confirm: "Confirm",
|
|
477
|
+
cancel: "Cancel",
|
|
478
|
+
noResults: "No results found",
|
|
479
|
+
clearSelection: "Clear selection",
|
|
480
|
+
search: "Search",
|
|
481
|
+
clear: "Clear",
|
|
482
|
+
required: "required",
|
|
483
|
+
currentTheme: (e) => `Current theme: ${e}`,
|
|
484
|
+
overflowCount: (e) => `+${e} more`,
|
|
485
|
+
selectedCount: (e) => `${e} selected`,
|
|
486
|
+
maxSelectedHint: (e) => `You can select up to ${e} items`
|
|
487
|
+
});
|
|
488
|
+
// src/components/ui_provider/use_labels.ts
|
|
489
|
+
function Ae() {
|
|
490
|
+
return s(ke);
|
|
491
|
+
}
|
|
492
|
+
// src/components/checkbox_options/checkbox_options.tsx
|
|
493
|
+
function je(e, t, n) {
|
|
515
494
|
let r = t.includes(n) ? t.filter((e) => e !== n) : [...t, n];
|
|
516
495
|
return e.map((e) => e.value).filter((e) => r.includes(e));
|
|
517
496
|
}
|
|
518
|
-
function
|
|
519
|
-
let S =
|
|
497
|
+
function Me({ options: e, orientation: t = "vertical", values: n, defaultValues: r, onChange: i, name: a, label: o, error: s, required: c, requiredLabel: l, disabled: u, radius: d = "lg", unstyled: f = !1, className: p, wrapperClassName: m, id: v, "aria-describedby": y, ...b }) {
|
|
498
|
+
let S = Ae(), { fieldId: C, errorId: w } = J(v), T = a ?? C, [E, D] = Ce(n, r ?? []), O = e.map((e) => typeof e == "string" ? {
|
|
520
499
|
value: e,
|
|
521
500
|
label: e
|
|
522
501
|
} : e), k = (e) => {
|
|
523
|
-
let t =
|
|
502
|
+
let t = je(O, E, e);
|
|
524
503
|
D(t), i?.(t);
|
|
525
504
|
};
|
|
526
505
|
return /* @__PURE__ */ _("fieldset", {
|
|
@@ -542,7 +521,7 @@ function Oe({ options: e, orientation: t = "vertical", values: n, defaultValues:
|
|
|
542
521
|
}),
|
|
543
522
|
/* @__PURE__ */ g("div", {
|
|
544
523
|
className: x(t === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
|
|
545
|
-
children: O.map((e, n) => /* @__PURE__ */ g(
|
|
524
|
+
children: O.map((e, n) => /* @__PURE__ */ g(Oe, {
|
|
546
525
|
option: e,
|
|
547
526
|
optionId: `${C}-${n}`,
|
|
548
527
|
descriptionId: `${C}-${n}-desc`,
|
|
@@ -557,7 +536,7 @@ function Oe({ options: e, orientation: t = "vertical", values: n, defaultValues:
|
|
|
557
536
|
onToggle: k
|
|
558
537
|
}, e.value))
|
|
559
538
|
}),
|
|
560
|
-
/* @__PURE__ */ g(
|
|
539
|
+
/* @__PURE__ */ g(be, {
|
|
561
540
|
id: w,
|
|
562
541
|
error: s,
|
|
563
542
|
className: "mt-2"
|
|
@@ -565,9 +544,8 @@ function Oe({ options: e, orientation: t = "vertical", values: n, defaultValues:
|
|
|
565
544
|
]
|
|
566
545
|
});
|
|
567
546
|
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
var ke = () => {
|
|
547
|
+
// src/hooks/use_is_client/use_is_client.tsx
|
|
548
|
+
var Ne = () => {
|
|
571
549
|
let [e, t] = p(!1);
|
|
572
550
|
return c(() => {
|
|
573
551
|
requestAnimationFrame(() => {
|
|
@@ -575,14 +553,12 @@ var ke = () => {
|
|
|
575
553
|
});
|
|
576
554
|
}, []), e;
|
|
577
555
|
};
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
//#region src/components/shared/field.tsx
|
|
585
|
-
var je = ({ fieldId: e, errorId: t, descriptionId: n, label: r, description: i, error: a, required: o = !1, wrapperClassName: s, children: c }) => /* @__PURE__ */ _("div", {
|
|
556
|
+
// src/components/client_only/client_only.tsx
|
|
557
|
+
function Pe({ children: e, fallback: t }) {
|
|
558
|
+
return Ne() ? /* @__PURE__ */ g(h, { children: e }) : t ?? null;
|
|
559
|
+
}
|
|
560
|
+
// src/components/shared/field.tsx
|
|
561
|
+
var Fe = ({ fieldId: e, errorId: t, descriptionId: n, label: r, description: i, error: a, required: o = !1, wrapperClassName: s, children: c }) => /* @__PURE__ */ _("div", {
|
|
586
562
|
className: x("w-full", s),
|
|
587
563
|
children: [
|
|
588
564
|
r !== void 0 && (typeof r == "string" ? /* @__PURE__ */ _("label", {
|
|
@@ -605,20 +581,20 @@ var je = ({ fieldId: e, errorId: t, descriptionId: n, label: r, description: i,
|
|
|
605
581
|
description: i,
|
|
606
582
|
className: "mt-1"
|
|
607
583
|
}),
|
|
608
|
-
/* @__PURE__ */ g(
|
|
584
|
+
/* @__PURE__ */ g(be, {
|
|
609
585
|
id: t,
|
|
610
586
|
error: a,
|
|
611
587
|
className: "mt-1"
|
|
612
588
|
})
|
|
613
589
|
]
|
|
614
|
-
}),
|
|
615
|
-
function
|
|
616
|
-
return e >= 0 && e < t ? e :
|
|
590
|
+
}), Ie = -1;
|
|
591
|
+
function Le(e, t) {
|
|
592
|
+
return e >= 0 && e < t ? e : Ie;
|
|
617
593
|
}
|
|
618
|
-
function
|
|
619
|
-
let [r, i] = p(
|
|
594
|
+
function Re({ optionCount: e, getOptionId: t, isOpen: n }) {
|
|
595
|
+
let [r, i] = p(Ie), a = Le(r, e), s = o((t) => {
|
|
620
596
|
e !== 0 && i((n) => {
|
|
621
|
-
let r =
|
|
597
|
+
let r = Le(n, e) + t;
|
|
622
598
|
return r < 0 ? e - 1 : r >= e ? 0 : r;
|
|
623
599
|
});
|
|
624
600
|
}, [e]), l = o(() => {
|
|
@@ -626,7 +602,7 @@ function Pe({ optionCount: e, getOptionId: t, isOpen: n }) {
|
|
|
626
602
|
}, []), u = o(() => {
|
|
627
603
|
i(e - 1);
|
|
628
604
|
}, [e]), d = o(() => {
|
|
629
|
-
i(
|
|
605
|
+
i(Ie);
|
|
630
606
|
}, []), f = n && a >= 0 ? t(a) : void 0;
|
|
631
607
|
return c(() => {
|
|
632
608
|
f !== void 0 && document.getElementById(f)?.scrollIntoView?.({ block: "nearest" });
|
|
@@ -639,63 +615,42 @@ function Pe({ optionCount: e, getOptionId: t, isOpen: n }) {
|
|
|
639
615
|
reset: d
|
|
640
616
|
};
|
|
641
617
|
}
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
let w = we(), { fieldId: T, errorId: E } = Y(C), D = `${T}-listbox`, O = f(null), [k, j] = be(v, y), M = e.find((e) => e.value === k), [N, P] = p(""), [F, I] = p(!1), [L, R] = p(!1), z = d(() => F ? e.filter((e) => e.label.toLowerCase().includes(N.toLowerCase())) : e, [
|
|
618
|
+
// src/components/combobox/combobox.tsx
|
|
619
|
+
function ze({ options: e, label: t, "aria-label": n, error: r, placeholder: i, noResultsText: a, clearLabel: o, radius: s = "md", unstyled: c = !1, disabled: l = !1, required: u = !1, className: m, wrapperClassName: h, value: v, defaultValue: y = "", onChange: b, id: S }) {
|
|
620
|
+
let C = Ae(), { fieldId: w, errorId: T } = J(S), E = `${w}-listbox`, D = f(null), [k, A] = Ce(v, y), M = e.find((e) => e.value === k), [N, P] = p(""), [F, I] = p(!1), [L, R] = p(!1), z = d(() => F ? e.filter((e) => e.label.toLowerCase().includes(N.toLowerCase())) : e, [
|
|
646
621
|
e,
|
|
647
622
|
F,
|
|
648
623
|
N
|
|
649
|
-
]), { activeIndex: ee, activeOptionId: te, move: B, first: V, last: ne, reset: H } =
|
|
624
|
+
]), { activeIndex: ee, activeOptionId: te, move: B, first: V, last: ne, reset: H } = Re({
|
|
650
625
|
optionCount: z.length,
|
|
651
|
-
getOptionId: (e) => `${
|
|
626
|
+
getOptionId: (e) => `${E}-option-${e}`,
|
|
652
627
|
isOpen: L
|
|
653
628
|
}), re = L ? N : M?.label ?? "", U = () => {
|
|
654
629
|
l || (P(M?.label ?? ""), I(!1), R(!0), H());
|
|
655
630
|
}, W = () => {
|
|
656
631
|
R(!1), I(!1), H();
|
|
657
632
|
}, ie = (e) => {
|
|
658
|
-
|
|
633
|
+
A(e.value), b?.(e.value), W();
|
|
659
634
|
}, ae = () => {
|
|
660
|
-
|
|
635
|
+
A(""), b?.(""), P(""), D.current?.focus();
|
|
661
636
|
}, G = (e) => {
|
|
662
637
|
P(e.target.value), I(!0), R(!0), V();
|
|
663
638
|
}, oe = () => {
|
|
664
639
|
L || U();
|
|
665
640
|
}, K = (e) => {
|
|
666
|
-
|
|
667
|
-
L || U();
|
|
668
|
-
return;
|
|
669
|
-
}
|
|
670
|
-
if (!L) {
|
|
671
|
-
U(), V();
|
|
672
|
-
return;
|
|
673
|
-
}
|
|
674
|
-
B(1);
|
|
641
|
+
e.preventDefault(), e.altKey ? L || U() : L ? B(1) : (U(), V());
|
|
675
642
|
}, se = (e) => {
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
return;
|
|
679
|
-
}
|
|
680
|
-
if (!L) {
|
|
681
|
-
U(), ne();
|
|
682
|
-
return;
|
|
683
|
-
}
|
|
684
|
-
B(-1);
|
|
685
|
-
}, q = (e) => {
|
|
643
|
+
e.preventDefault(), e.altKey ? L && W() : L ? B(-1) : (U(), ne());
|
|
644
|
+
}, ce = (e) => {
|
|
686
645
|
if (!L) return;
|
|
687
646
|
let t = z[ee];
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
return;
|
|
691
|
-
}
|
|
692
|
-
e.preventDefault(), ie(t);
|
|
693
|
-
}, ce = (e) => {
|
|
647
|
+
t ? (e.preventDefault(), ie(t)) : W();
|
|
648
|
+
}, le = (e) => {
|
|
694
649
|
L && (e.preventDefault(), W());
|
|
695
650
|
};
|
|
696
|
-
return /* @__PURE__ */ g(
|
|
697
|
-
fieldId:
|
|
698
|
-
errorId:
|
|
651
|
+
return /* @__PURE__ */ g(Fe, {
|
|
652
|
+
fieldId: w,
|
|
653
|
+
errorId: T,
|
|
699
654
|
label: t,
|
|
700
655
|
error: r,
|
|
701
656
|
required: u,
|
|
@@ -708,8 +663,8 @@ function Fe({ options: e, label: t, "aria-label": n, error: r, placeholder: i, n
|
|
|
708
663
|
"aria-hidden": !0
|
|
709
664
|
}),
|
|
710
665
|
/* @__PURE__ */ g("input", {
|
|
711
|
-
ref:
|
|
712
|
-
id:
|
|
666
|
+
ref: D,
|
|
667
|
+
id: w,
|
|
713
668
|
role: "combobox",
|
|
714
669
|
type: "text",
|
|
715
670
|
autoComplete: "off",
|
|
@@ -722,31 +677,31 @@ function Fe({ options: e, label: t, "aria-label": n, error: r, placeholder: i, n
|
|
|
722
677
|
onKeyDown: (e) => {
|
|
723
678
|
if (e.key === "ArrowDown") return K(e);
|
|
724
679
|
if (e.key === "ArrowUp") return se(e);
|
|
725
|
-
if (e.key === "Enter") return
|
|
726
|
-
if (e.key === "Escape") return
|
|
680
|
+
if (e.key === "Enter") return ce(e);
|
|
681
|
+
if (e.key === "Escape") return le(e);
|
|
727
682
|
},
|
|
728
683
|
"aria-expanded": L,
|
|
729
|
-
"aria-controls":
|
|
684
|
+
"aria-controls": E,
|
|
730
685
|
"aria-autocomplete": "list",
|
|
731
686
|
"aria-label": n,
|
|
732
687
|
"aria-activedescendant": te,
|
|
733
688
|
"aria-invalid": !!r,
|
|
734
689
|
"aria-required": u || void 0,
|
|
735
|
-
"aria-describedby": r ?
|
|
690
|
+
"aria-describedby": r ? T : void 0,
|
|
736
691
|
className: x("w-full disabled:opacity-50 disabled:cursor-not-allowed", !c && [
|
|
737
|
-
|
|
738
|
-
|
|
692
|
+
fe,
|
|
693
|
+
j[s],
|
|
739
694
|
"pl-9 pr-8 py-2 text-sm"
|
|
740
695
|
], !c && r && x("border-red-500 dark:border-red-400", "focus:ring-red-500"), m)
|
|
741
696
|
}),
|
|
742
697
|
!c && M && !l && /* @__PURE__ */ g("button", {
|
|
743
698
|
type: "button",
|
|
744
|
-
"aria-label": o ??
|
|
699
|
+
"aria-label": o ?? C.clearSelection,
|
|
745
700
|
onMouseDown: (e) => {
|
|
746
701
|
e.preventDefault();
|
|
747
702
|
},
|
|
748
703
|
onClick: ae,
|
|
749
|
-
className: x("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
704
|
+
className: x("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", O.primary.focusOutline),
|
|
750
705
|
children: /* @__PURE__ */ g("span", {
|
|
751
706
|
className: "i-mdi-close block w-4 h-4",
|
|
752
707
|
"aria-hidden": !0
|
|
@@ -757,14 +712,14 @@ function Fe({ options: e, label: t, "aria-label": n, error: r, placeholder: i, n
|
|
|
757
712
|
"border",
|
|
758
713
|
"bg-white dark:bg-gray-900",
|
|
759
714
|
"border-gray-100 dark:border-gray-800",
|
|
760
|
-
|
|
715
|
+
j[s]
|
|
761
716
|
]),
|
|
762
717
|
children: [/* @__PURE__ */ g("ul", {
|
|
763
|
-
id:
|
|
718
|
+
id: E,
|
|
764
719
|
role: "listbox",
|
|
765
|
-
className: "max-h-60 overflow-auto py-1",
|
|
720
|
+
className: x("max-h-60 overflow-auto py-1", "[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]"),
|
|
766
721
|
children: z.map((e, t) => /* @__PURE__ */ g("li", {
|
|
767
|
-
id: `${
|
|
722
|
+
id: `${E}-option-${t}`,
|
|
768
723
|
role: "option",
|
|
769
724
|
"aria-selected": e.value === k,
|
|
770
725
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -775,84 +730,83 @@ function Fe({ options: e, label: t, "aria-label": n, error: r, placeholder: i, n
|
|
|
775
730
|
}), /* @__PURE__ */ g("div", {
|
|
776
731
|
role: "status",
|
|
777
732
|
className: z.length === 0 ? "px-3 py-2 text-gray-500 dark:text-gray-400" : void 0,
|
|
778
|
-
children: z.length === 0 ? a ??
|
|
733
|
+
children: z.length === 0 ? a ?? C.noResults : ""
|
|
779
734
|
})]
|
|
780
735
|
})
|
|
781
736
|
]
|
|
782
737
|
})
|
|
783
738
|
});
|
|
784
739
|
}
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
var Ie = Math.min, Le = Math.max, Re = Math.round, ze = Math.floor, X = (e) => ({
|
|
740
|
+
// node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
741
|
+
var Be = Math.min, Ve = Math.max, He = Math.round, Ue = Math.floor, Y = (e) => ({
|
|
788
742
|
x: e,
|
|
789
743
|
y: e
|
|
790
|
-
}),
|
|
744
|
+
}), We = {
|
|
791
745
|
left: "right",
|
|
792
746
|
right: "left",
|
|
793
747
|
bottom: "top",
|
|
794
748
|
top: "bottom"
|
|
795
749
|
};
|
|
796
|
-
function
|
|
797
|
-
return
|
|
750
|
+
function Ge(e, t, n) {
|
|
751
|
+
return Ve(e, Be(t, n));
|
|
798
752
|
}
|
|
799
|
-
function
|
|
753
|
+
function Ke(e, t) {
|
|
800
754
|
return typeof e == "function" ? e(t) : e;
|
|
801
755
|
}
|
|
802
|
-
function
|
|
756
|
+
function qe(e) {
|
|
803
757
|
return e.split("-")[0];
|
|
804
758
|
}
|
|
805
|
-
function
|
|
759
|
+
function Je(e) {
|
|
806
760
|
return e.split("-")[1];
|
|
807
761
|
}
|
|
808
|
-
function
|
|
762
|
+
function Ye(e) {
|
|
809
763
|
return e === "x" ? "y" : "x";
|
|
810
764
|
}
|
|
811
|
-
function
|
|
765
|
+
function Xe(e) {
|
|
812
766
|
return e === "y" ? "height" : "width";
|
|
813
767
|
}
|
|
814
|
-
function
|
|
768
|
+
function Ze(e) {
|
|
815
769
|
let t = e[0];
|
|
816
770
|
return t === "t" || t === "b" ? "y" : "x";
|
|
817
771
|
}
|
|
818
|
-
function
|
|
819
|
-
return
|
|
772
|
+
function Qe(e) {
|
|
773
|
+
return Ye(Ze(e));
|
|
820
774
|
}
|
|
821
|
-
function
|
|
775
|
+
function $e(e, t, n) {
|
|
822
776
|
n === void 0 && (n = !1);
|
|
823
|
-
let r =
|
|
824
|
-
return t.reference[a] > t.floating[a] && (o =
|
|
777
|
+
let r = Je(e), i = Qe(e), a = Xe(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
778
|
+
return t.reference[a] > t.floating[a] && (o = ct(o)), [o, ct(o)];
|
|
825
779
|
}
|
|
826
|
-
function
|
|
827
|
-
let t =
|
|
780
|
+
function et(e) {
|
|
781
|
+
let t = ct(e);
|
|
828
782
|
return [
|
|
829
|
-
|
|
783
|
+
tt(e),
|
|
830
784
|
t,
|
|
831
|
-
|
|
785
|
+
tt(t)
|
|
832
786
|
];
|
|
833
787
|
}
|
|
834
|
-
function
|
|
788
|
+
function tt(e) {
|
|
835
789
|
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
836
790
|
}
|
|
837
|
-
var
|
|
838
|
-
function
|
|
791
|
+
var nt = ["left", "right"], rt = ["right", "left"], it = ["top", "bottom"], at = ["bottom", "top"];
|
|
792
|
+
function ot(e, t, n) {
|
|
839
793
|
switch (e) {
|
|
840
794
|
case "top":
|
|
841
|
-
case "bottom": return n ? t ?
|
|
795
|
+
case "bottom": return n ? t ? rt : nt : t ? nt : rt;
|
|
842
796
|
case "left":
|
|
843
|
-
case "right": return t ?
|
|
797
|
+
case "right": return t ? it : at;
|
|
844
798
|
default: return [];
|
|
845
799
|
}
|
|
846
800
|
}
|
|
847
|
-
function
|
|
848
|
-
let i =
|
|
849
|
-
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(
|
|
801
|
+
function st(e, t, n, r) {
|
|
802
|
+
let i = Je(e), a = ot(qe(e), n === "start", r);
|
|
803
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(tt)))), a;
|
|
850
804
|
}
|
|
851
|
-
function
|
|
852
|
-
let t =
|
|
853
|
-
return
|
|
805
|
+
function ct(e) {
|
|
806
|
+
let t = qe(e);
|
|
807
|
+
return We[t] + e.slice(t.length);
|
|
854
808
|
}
|
|
855
|
-
function
|
|
809
|
+
function lt(e) {
|
|
856
810
|
return {
|
|
857
811
|
top: e.top ?? 0,
|
|
858
812
|
right: e.right ?? 0,
|
|
@@ -860,15 +814,15 @@ function at(e) {
|
|
|
860
814
|
left: e.left ?? 0
|
|
861
815
|
};
|
|
862
816
|
}
|
|
863
|
-
function
|
|
817
|
+
function ut(e) {
|
|
864
818
|
return typeof e == "number" ? {
|
|
865
819
|
top: e,
|
|
866
820
|
right: e,
|
|
867
821
|
bottom: e,
|
|
868
822
|
left: e
|
|
869
|
-
} :
|
|
823
|
+
} : lt(e);
|
|
870
824
|
}
|
|
871
|
-
function
|
|
825
|
+
function dt(e) {
|
|
872
826
|
let { x: t, y: n, width: r, height: i } = e;
|
|
873
827
|
return {
|
|
874
828
|
width: r,
|
|
@@ -881,10 +835,9 @@ function st(e) {
|
|
|
881
835
|
y: n
|
|
882
836
|
};
|
|
883
837
|
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
let { reference: r, floating: i } = e, a = qe(t), o = Je(t), s = Ke(o), c = Ue(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
838
|
+
// node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
839
|
+
function ft(e, t, n) {
|
|
840
|
+
let { reference: r, floating: i } = e, a = Ze(t), o = Qe(t), s = Xe(o), c = qe(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
888
841
|
switch (c) {
|
|
889
842
|
case "top":
|
|
890
843
|
p = {
|
|
@@ -915,12 +868,12 @@ function ct(e, t, n) {
|
|
|
915
868
|
y: r.y
|
|
916
869
|
};
|
|
917
870
|
}
|
|
918
|
-
let m =
|
|
871
|
+
let m = Je(t);
|
|
919
872
|
return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
|
|
920
873
|
}
|
|
921
|
-
async function
|
|
874
|
+
async function pt(e, t) {
|
|
922
875
|
t === void 0 && (t = {});
|
|
923
|
-
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } =
|
|
876
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = Ke(t, e), p = ut(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = dt(await i.getClippingRect({
|
|
924
877
|
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
925
878
|
boundary: c,
|
|
926
879
|
rootBoundary: l,
|
|
@@ -933,7 +886,7 @@ async function lt(e, t) {
|
|
|
933
886
|
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
934
887
|
x: 1,
|
|
935
888
|
y: 1
|
|
936
|
-
}, y =
|
|
889
|
+
}, y = dt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
937
890
|
elements: o,
|
|
938
891
|
rect: g,
|
|
939
892
|
offsetParent: _,
|
|
@@ -946,15 +899,15 @@ async function lt(e, t) {
|
|
|
946
899
|
right: (y.right - h.right + p.right) / v.x
|
|
947
900
|
};
|
|
948
901
|
}
|
|
949
|
-
var
|
|
902
|
+
var mt = 50, ht = async (e, t, n) => {
|
|
950
903
|
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
951
904
|
...o,
|
|
952
|
-
detectOverflow:
|
|
905
|
+
detectOverflow: pt
|
|
953
906
|
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
954
907
|
reference: e,
|
|
955
908
|
floating: t,
|
|
956
909
|
strategy: i
|
|
957
|
-
}), { x: u, y: d } =
|
|
910
|
+
}), { x: u, y: d } = ft(l, r, c), f = r, p = 0, m = {};
|
|
958
911
|
for (let n = 0; n < a.length; n++) {
|
|
959
912
|
let h = a[n];
|
|
960
913
|
if (!h) continue;
|
|
@@ -975,11 +928,11 @@ var ut = 50, dt = async (e, t, n) => {
|
|
|
975
928
|
u = v ?? u, d = y ?? d, m[g] = {
|
|
976
929
|
...m[g],
|
|
977
930
|
...b
|
|
978
|
-
}, x && p <
|
|
931
|
+
}, x && p < mt && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
979
932
|
reference: e,
|
|
980
933
|
floating: t,
|
|
981
934
|
strategy: i
|
|
982
|
-
}) : x.rects), {x: u, y: d} =
|
|
935
|
+
}) : x.rects), {x: u, y: d} = ft(l, f, c)), n = -1);
|
|
983
936
|
}
|
|
984
937
|
return {
|
|
985
938
|
x: u,
|
|
@@ -988,18 +941,18 @@ var ut = 50, dt = async (e, t, n) => {
|
|
|
988
941
|
strategy: i,
|
|
989
942
|
middlewareData: m
|
|
990
943
|
};
|
|
991
|
-
},
|
|
944
|
+
}, gt = (e) => ({
|
|
992
945
|
name: "arrow",
|
|
993
946
|
options: e,
|
|
994
947
|
async fn(t) {
|
|
995
|
-
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } =
|
|
948
|
+
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = Ke(e, t) || {};
|
|
996
949
|
if (l == null) return {};
|
|
997
|
-
let d =
|
|
950
|
+
let d = ut(u), f = {
|
|
998
951
|
x: n,
|
|
999
952
|
y: r
|
|
1000
|
-
}, p =
|
|
1001
|
-
|
|
1002
|
-
let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, E =
|
|
953
|
+
}, p = Qe(i), m = Xe(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), C = S ? S[y] : 0;
|
|
954
|
+
C && await (o.isElement == null ? void 0 : o.isElement(S)) || (C = s.floating[y] || a.floating[m]);
|
|
955
|
+
let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, E = Be(d[_], T), D = Be(d[v], T), O = C - h[m] - D, k = C / 2 - h[m] / 2 + w, A = Ge(E, k, O), j = !c.arrow && Je(i) != null && k !== A && a.reference[m] / 2 - (k < E ? E : D) - h[m] / 2 < 0, M = j ? k < E ? k - E : k - O : 0;
|
|
1003
956
|
return {
|
|
1004
957
|
[p]: f[p] + M,
|
|
1005
958
|
data: {
|
|
@@ -1010,19 +963,19 @@ var ut = 50, dt = async (e, t, n) => {
|
|
|
1010
963
|
reset: j
|
|
1011
964
|
};
|
|
1012
965
|
}
|
|
1013
|
-
}),
|
|
966
|
+
}), _t = function(e) {
|
|
1014
967
|
return e === void 0 && (e = {}), {
|
|
1015
968
|
name: "flip",
|
|
1016
969
|
options: e,
|
|
1017
970
|
async fn(t) {
|
|
1018
971
|
var n;
|
|
1019
|
-
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } =
|
|
972
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = Ke(e, t);
|
|
1020
973
|
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
1021
|
-
let g =
|
|
1022
|
-
!d && x && b.push(...
|
|
974
|
+
let g = qe(r), _ = Ze(o), v = qe(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [ct(o)] : et(o)), x = p !== "none";
|
|
975
|
+
!d && x && b.push(...st(o, m, p, y));
|
|
1023
976
|
let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
|
|
1024
977
|
if (l && w.push(C[g]), u) {
|
|
1025
|
-
let e =
|
|
978
|
+
let e = $e(r, a, y);
|
|
1026
979
|
w.push(C[e[0]], C[e[1]]);
|
|
1027
980
|
}
|
|
1028
981
|
if (T = [...T, {
|
|
@@ -1030,7 +983,7 @@ var ut = 50, dt = async (e, t, n) => {
|
|
|
1030
983
|
overflows: w
|
|
1031
984
|
}], !w.every((e) => e <= 0)) {
|
|
1032
985
|
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
1033
|
-
if (t && (u !== "alignment" || _ ===
|
|
986
|
+
if (t && (u !== "alignment" || _ === Ze(t) || T.every((e) => Ze(e.placement) !== _ || e.overflows[0] > 0))) return {
|
|
1034
987
|
data: {
|
|
1035
988
|
index: e,
|
|
1036
989
|
overflows: T
|
|
@@ -1042,7 +995,7 @@ var ut = 50, dt = async (e, t, n) => {
|
|
|
1042
995
|
case "bestFit": {
|
|
1043
996
|
let e = T.filter((e) => {
|
|
1044
997
|
if (x) {
|
|
1045
|
-
let t =
|
|
998
|
+
let t = Ze(e.placement);
|
|
1046
999
|
return t === _ || t === "y";
|
|
1047
1000
|
}
|
|
1048
1001
|
return !0;
|
|
@@ -1057,9 +1010,9 @@ var ut = 50, dt = async (e, t, n) => {
|
|
|
1057
1010
|
return {};
|
|
1058
1011
|
}
|
|
1059
1012
|
};
|
|
1060
|
-
},
|
|
1061
|
-
async function
|
|
1062
|
-
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o =
|
|
1013
|
+
}, vt = /*#__PURE__*/ new Set(["left", "top"]);
|
|
1014
|
+
async function yt(e, t) {
|
|
1015
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = qe(n), s = Je(n), c = Ze(n) === "y", l = vt.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = Ke(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
1063
1016
|
mainAxis: d,
|
|
1064
1017
|
crossAxis: 0,
|
|
1065
1018
|
alignmentAxis: null
|
|
@@ -1076,13 +1029,13 @@ async function ht(e, t) {
|
|
|
1076
1029
|
y: p * u
|
|
1077
1030
|
};
|
|
1078
1031
|
}
|
|
1079
|
-
var
|
|
1032
|
+
var bt = function(e) {
|
|
1080
1033
|
return e === void 0 && (e = 0), {
|
|
1081
1034
|
name: "offset",
|
|
1082
1035
|
options: e,
|
|
1083
1036
|
async fn(t) {
|
|
1084
1037
|
var n;
|
|
1085
|
-
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await
|
|
1038
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await yt(t, e);
|
|
1086
1039
|
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
1087
1040
|
x: r + s.x,
|
|
1088
1041
|
y: i + s.y,
|
|
@@ -1093,7 +1046,7 @@ var gt = function(e) {
|
|
|
1093
1046
|
};
|
|
1094
1047
|
}
|
|
1095
1048
|
};
|
|
1096
|
-
},
|
|
1049
|
+
}, xt = function(e) {
|
|
1097
1050
|
return e === void 0 && (e = {}), {
|
|
1098
1051
|
name: "shift",
|
|
1099
1052
|
options: e,
|
|
@@ -1104,10 +1057,10 @@ var gt = function(e) {
|
|
|
1104
1057
|
x: t,
|
|
1105
1058
|
y: n
|
|
1106
1059
|
};
|
|
1107
|
-
} }, ...l } =
|
|
1060
|
+
} }, ...l } = Ke(e, t), u = {
|
|
1108
1061
|
x: n,
|
|
1109
1062
|
y: r
|
|
1110
|
-
}, d = await a.detectOverflow(t, l), f =
|
|
1063
|
+
}, d = await a.detectOverflow(t, l), f = Ze(i), p = Ye(f), m = u[p], h = u[f], g = (e, t) => Ge(t + d[e === "y" ? "top" : "left"], t, t - d[e === "y" ? "bottom" : "right"]);
|
|
1111
1064
|
o && (m = g(p, m)), s && (h = g(f, h));
|
|
1112
1065
|
let _ = c.fn({
|
|
1113
1066
|
...t,
|
|
@@ -1128,41 +1081,40 @@ var gt = function(e) {
|
|
|
1128
1081
|
}
|
|
1129
1082
|
};
|
|
1130
1083
|
};
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
function vt() {
|
|
1084
|
+
// node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
1085
|
+
function St() {
|
|
1134
1086
|
return typeof window < "u";
|
|
1135
1087
|
}
|
|
1136
|
-
function
|
|
1137
|
-
return
|
|
1088
|
+
function Ct(e) {
|
|
1089
|
+
return wt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1138
1090
|
}
|
|
1139
|
-
function
|
|
1091
|
+
function X(e) {
|
|
1140
1092
|
var t;
|
|
1141
1093
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1142
1094
|
}
|
|
1143
|
-
function
|
|
1144
|
-
return ((
|
|
1095
|
+
function Z(e) {
|
|
1096
|
+
return ((wt(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
1145
1097
|
}
|
|
1146
|
-
function
|
|
1147
|
-
return
|
|
1098
|
+
function wt(e) {
|
|
1099
|
+
return St() ? e instanceof Node || e instanceof X(e).Node : !1;
|
|
1148
1100
|
}
|
|
1149
1101
|
function Q(e) {
|
|
1150
|
-
return
|
|
1102
|
+
return St() ? e instanceof Element || e instanceof X(e).Element : !1;
|
|
1151
1103
|
}
|
|
1152
|
-
function
|
|
1153
|
-
return
|
|
1104
|
+
function Tt(e) {
|
|
1105
|
+
return St() ? e instanceof HTMLElement || e instanceof X(e).HTMLElement : !1;
|
|
1154
1106
|
}
|
|
1155
|
-
function
|
|
1156
|
-
return !
|
|
1107
|
+
function Et(e) {
|
|
1108
|
+
return !St() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof X(e).ShadowRoot;
|
|
1157
1109
|
}
|
|
1158
|
-
function
|
|
1110
|
+
function Dt(e) {
|
|
1159
1111
|
let { overflow: t, overflowX: n, overflowY: r, display: i } = $(e);
|
|
1160
1112
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
1161
1113
|
}
|
|
1162
|
-
function
|
|
1163
|
-
return /^(table|td|th)$/.test(
|
|
1114
|
+
function Ot(e) {
|
|
1115
|
+
return /^(table|td|th)$/.test(Ct(e));
|
|
1164
1116
|
}
|
|
1165
|
-
function
|
|
1117
|
+
function kt(e) {
|
|
1166
1118
|
try {
|
|
1167
1119
|
if (e.matches(":popover-open")) return !0;
|
|
1168
1120
|
} catch {}
|
|
@@ -1172,30 +1124,30 @@ function Et(e) {
|
|
|
1172
1124
|
return !1;
|
|
1173
1125
|
}
|
|
1174
1126
|
}
|
|
1175
|
-
var
|
|
1176
|
-
function
|
|
1127
|
+
var At = /transform|translate|scale|rotate|perspective|filter/, jt = /paint|layout|strict|content/, Mt = (e) => !!e && e !== "none", Nt;
|
|
1128
|
+
function Pt(e) {
|
|
1177
1129
|
let t = Q(e) ? $(e) : e;
|
|
1178
|
-
return
|
|
1179
|
-
}
|
|
1180
|
-
function
|
|
1181
|
-
let t =
|
|
1182
|
-
for (;
|
|
1183
|
-
if (
|
|
1184
|
-
if (
|
|
1185
|
-
t =
|
|
1130
|
+
return Mt(t.transform) || Mt(t.translate) || Mt(t.scale) || Mt(t.rotate) || Mt(t.perspective) || !It() && (Mt(t.backdropFilter) || Mt(t.filter)) || At.test(t.willChange || "") || jt.test(t.contain || "");
|
|
1131
|
+
}
|
|
1132
|
+
function Ft(e) {
|
|
1133
|
+
let t = zt(e);
|
|
1134
|
+
for (; Tt(t) && !Lt(t);) {
|
|
1135
|
+
if (Pt(t)) return t;
|
|
1136
|
+
if (kt(t)) return null;
|
|
1137
|
+
t = zt(t);
|
|
1186
1138
|
}
|
|
1187
1139
|
return null;
|
|
1188
1140
|
}
|
|
1189
|
-
function
|
|
1190
|
-
return
|
|
1141
|
+
function It() {
|
|
1142
|
+
return Nt ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), Nt;
|
|
1191
1143
|
}
|
|
1192
|
-
function
|
|
1193
|
-
return /^(html|body|#document)$/.test(
|
|
1144
|
+
function Lt(e) {
|
|
1145
|
+
return /^(html|body|#document)$/.test(Ct(e));
|
|
1194
1146
|
}
|
|
1195
1147
|
function $(e) {
|
|
1196
|
-
return
|
|
1148
|
+
return X(e).getComputedStyle(e);
|
|
1197
1149
|
}
|
|
1198
|
-
function
|
|
1150
|
+
function Rt(e) {
|
|
1199
1151
|
return Q(e) ? {
|
|
1200
1152
|
scrollLeft: e.scrollLeft,
|
|
1201
1153
|
scrollTop: e.scrollTop
|
|
@@ -1204,102 +1156,101 @@ function Ft(e) {
|
|
|
1204
1156
|
scrollTop: e.scrollY
|
|
1205
1157
|
};
|
|
1206
1158
|
}
|
|
1207
|
-
function
|
|
1208
|
-
if (
|
|
1209
|
-
let t = e.assignedSlot || e.parentNode ||
|
|
1210
|
-
return
|
|
1159
|
+
function zt(e) {
|
|
1160
|
+
if (Ct(e) === "html") return e;
|
|
1161
|
+
let t = e.assignedSlot || e.parentNode || Et(e) && e.host || Z(e);
|
|
1162
|
+
return Et(t) ? t.host : t;
|
|
1211
1163
|
}
|
|
1212
|
-
function
|
|
1213
|
-
let t =
|
|
1214
|
-
return
|
|
1164
|
+
function Bt(e) {
|
|
1165
|
+
let t = zt(e);
|
|
1166
|
+
return Lt(t) ? (e.ownerDocument || e).body : Tt(t) && Dt(t) ? t : Bt(t);
|
|
1215
1167
|
}
|
|
1216
|
-
function
|
|
1168
|
+
function Vt(e, t, n) {
|
|
1217
1169
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1218
|
-
let r =
|
|
1170
|
+
let r = Bt(e), i = r === e.ownerDocument?.body, a = X(r);
|
|
1219
1171
|
if (i) {
|
|
1220
|
-
let e =
|
|
1221
|
-
return t.concat(a, a.visualViewport || [],
|
|
1172
|
+
let e = Ht(a);
|
|
1173
|
+
return t.concat(a, a.visualViewport || [], Dt(r) ? r : [], e && n ? Vt(e) : []);
|
|
1222
1174
|
}
|
|
1223
|
-
return t.concat(r,
|
|
1175
|
+
return t.concat(r, Vt(r, [], n));
|
|
1224
1176
|
}
|
|
1225
|
-
function
|
|
1177
|
+
function Ht(e) {
|
|
1226
1178
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1227
1179
|
}
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
let t = $(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = St(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = Re(n) !== a || Re(r) !== o;
|
|
1180
|
+
// node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
1181
|
+
function Ut(e) {
|
|
1182
|
+
let t = $(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = Tt(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = He(n) !== a || He(r) !== o;
|
|
1232
1183
|
return s && (n = a, r = o), {
|
|
1233
1184
|
width: n,
|
|
1234
1185
|
height: r,
|
|
1235
1186
|
$: s
|
|
1236
1187
|
};
|
|
1237
1188
|
}
|
|
1238
|
-
function
|
|
1189
|
+
function Wt(e) {
|
|
1239
1190
|
return Q(e) ? e : e.contextElement;
|
|
1240
1191
|
}
|
|
1241
|
-
function
|
|
1242
|
-
let t =
|
|
1243
|
-
if (!
|
|
1244
|
-
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } =
|
|
1245
|
-
return
|
|
1192
|
+
function Gt(e) {
|
|
1193
|
+
let t = Wt(e);
|
|
1194
|
+
if (!Tt(t)) return Y(1);
|
|
1195
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Ut(t), o = (a ? He(n.width) : n.width) / r, s = (a ? He(n.height) : n.height) / i;
|
|
1196
|
+
return o && Number.isFinite(o) || (o = 1), s && Number.isFinite(s) || (s = 1), {
|
|
1246
1197
|
x: o,
|
|
1247
1198
|
y: s
|
|
1248
1199
|
};
|
|
1249
1200
|
}
|
|
1250
|
-
var
|
|
1251
|
-
function
|
|
1252
|
-
let t =
|
|
1253
|
-
return !
|
|
1201
|
+
var Kt = /*#__PURE__*/ Y(0);
|
|
1202
|
+
function qt(e) {
|
|
1203
|
+
let t = X(e);
|
|
1204
|
+
return !It() || !t.visualViewport ? Kt : {
|
|
1254
1205
|
x: t.visualViewport.offsetLeft,
|
|
1255
1206
|
y: t.visualViewport.offsetTop
|
|
1256
1207
|
};
|
|
1257
1208
|
}
|
|
1258
|
-
function
|
|
1259
|
-
return t === void 0 && (t = !1), !!n && t && n ===
|
|
1209
|
+
function Jt(e, t, n) {
|
|
1210
|
+
return t === void 0 && (t = !1), !!n && t && n === X(e);
|
|
1260
1211
|
}
|
|
1261
|
-
function
|
|
1212
|
+
function Yt(e, t, n, r) {
|
|
1262
1213
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1263
|
-
let i = e.getBoundingClientRect(), a =
|
|
1264
|
-
t && (r ? Q(r) && (o =
|
|
1265
|
-
let s =
|
|
1214
|
+
let i = e.getBoundingClientRect(), a = Wt(e), o = Y(1);
|
|
1215
|
+
t && (r ? Q(r) && (o = Gt(r)) : o = Gt(e));
|
|
1216
|
+
let s = Jt(a, n, r) ? qt(a) : Y(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
1266
1217
|
if (a && r) {
|
|
1267
|
-
let e =
|
|
1218
|
+
let e = X(a), t = Q(r) ? X(r) : r, n = e, i = Ht(n);
|
|
1268
1219
|
for (; i && t !== n;) {
|
|
1269
|
-
let e =
|
|
1270
|
-
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n =
|
|
1220
|
+
let e = Gt(i), t = i.getBoundingClientRect(), r = $(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
1221
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = X(i), i = Ht(n);
|
|
1271
1222
|
}
|
|
1272
1223
|
}
|
|
1273
|
-
return
|
|
1224
|
+
return dt({
|
|
1274
1225
|
width: u,
|
|
1275
1226
|
height: d,
|
|
1276
1227
|
x: c,
|
|
1277
1228
|
y: l
|
|
1278
1229
|
});
|
|
1279
1230
|
}
|
|
1280
|
-
function
|
|
1281
|
-
let n =
|
|
1282
|
-
return t ? t.left + n :
|
|
1231
|
+
function Xt(e, t) {
|
|
1232
|
+
let n = Rt(e).scrollLeft;
|
|
1233
|
+
return t ? t.left + n : Yt(Z(e)).left + n;
|
|
1283
1234
|
}
|
|
1284
|
-
function
|
|
1235
|
+
function Zt(e, t) {
|
|
1285
1236
|
let n = e.getBoundingClientRect();
|
|
1286
1237
|
return {
|
|
1287
|
-
x: n.left + t.scrollLeft -
|
|
1238
|
+
x: n.left + t.scrollLeft - Xt(e, n),
|
|
1288
1239
|
y: n.top + t.scrollTop
|
|
1289
1240
|
};
|
|
1290
1241
|
}
|
|
1291
|
-
function
|
|
1292
|
-
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o =
|
|
1242
|
+
function Qt(e) {
|
|
1243
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = Z(r), s = t ? kt(t.floating) : !1;
|
|
1293
1244
|
if (r === o || s && a) return n;
|
|
1294
1245
|
let c = {
|
|
1295
1246
|
scrollLeft: 0,
|
|
1296
1247
|
scrollTop: 0
|
|
1297
|
-
}, l =
|
|
1298
|
-
if ((d || !a) && ((
|
|
1299
|
-
let e =
|
|
1300
|
-
l =
|
|
1248
|
+
}, l = Y(1), u = Y(0), d = Tt(r);
|
|
1249
|
+
if ((d || !a) && ((Ct(r) !== "body" || Dt(o)) && (c = Rt(r)), d)) {
|
|
1250
|
+
let e = Yt(r);
|
|
1251
|
+
l = Gt(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
1301
1252
|
}
|
|
1302
|
-
let f = o && !d && !a ?
|
|
1253
|
+
let f = o && !d && !a ? Zt(o, c) : Y(0);
|
|
1303
1254
|
return {
|
|
1304
1255
|
width: n.width * l.x,
|
|
1305
1256
|
height: n.height * l.y,
|
|
@@ -1307,29 +1258,29 @@ function Yt(e) {
|
|
|
1307
1258
|
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
1308
1259
|
};
|
|
1309
1260
|
}
|
|
1310
|
-
function
|
|
1261
|
+
function $t(e) {
|
|
1311
1262
|
return e.getClientRects ? Array.from(e.getClientRects()) : [];
|
|
1312
1263
|
}
|
|
1313
|
-
function
|
|
1314
|
-
let t =
|
|
1315
|
-
return $(n).direction === "rtl" && (a +=
|
|
1264
|
+
function en(e) {
|
|
1265
|
+
let t = Rt(e), n = e.ownerDocument.body, r = Ve(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = Ve(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + Xt(e), o = -t.scrollTop;
|
|
1266
|
+
return $(n).direction === "rtl" && (a += Ve(e.clientWidth, n.clientWidth) - r), {
|
|
1316
1267
|
width: r,
|
|
1317
1268
|
height: i,
|
|
1318
1269
|
x: a,
|
|
1319
1270
|
y: o
|
|
1320
1271
|
};
|
|
1321
1272
|
}
|
|
1322
|
-
var
|
|
1323
|
-
function
|
|
1273
|
+
var tn = 25;
|
|
1274
|
+
function nn(e, t, n) {
|
|
1324
1275
|
n === void 0 && (n = "viewport");
|
|
1325
|
-
let r = n === "layoutViewport", i =
|
|
1276
|
+
let r = n === "layoutViewport", i = X(e), a = Z(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
|
|
1326
1277
|
if (o) {
|
|
1327
|
-
let e = !
|
|
1278
|
+
let e = !It() || t === "fixed";
|
|
1328
1279
|
r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
|
|
1329
1280
|
}
|
|
1330
|
-
if (
|
|
1281
|
+
if (Xt(a) <= 0) {
|
|
1331
1282
|
let e = a.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(a.clientWidth - t.clientWidth - r), o = getComputedStyle(a).scrollbarGutter === "stable both-edges" ? i / 2 : i;
|
|
1332
|
-
o <=
|
|
1283
|
+
o <= tn && (s -= o);
|
|
1333
1284
|
}
|
|
1334
1285
|
return {
|
|
1335
1286
|
width: s,
|
|
@@ -1338,8 +1289,8 @@ function $t(e, t, n) {
|
|
|
1338
1289
|
y: u
|
|
1339
1290
|
};
|
|
1340
1291
|
}
|
|
1341
|
-
function
|
|
1342
|
-
let n =
|
|
1292
|
+
function rn(e, t) {
|
|
1293
|
+
let n = Yt(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = Gt(e);
|
|
1343
1294
|
return {
|
|
1344
1295
|
width: e.clientWidth * a.x,
|
|
1345
1296
|
height: e.clientHeight * a.y,
|
|
@@ -1347,13 +1298,13 @@ function en(e, t) {
|
|
|
1347
1298
|
y: r * a.y
|
|
1348
1299
|
};
|
|
1349
1300
|
}
|
|
1350
|
-
function
|
|
1301
|
+
function an(e, t, n) {
|
|
1351
1302
|
let r;
|
|
1352
|
-
if (t === "viewport" || t === "layoutViewport") r =
|
|
1353
|
-
else if (t === "document") r =
|
|
1354
|
-
else if (Q(t)) r =
|
|
1303
|
+
if (t === "viewport" || t === "layoutViewport") r = nn(e, n, t);
|
|
1304
|
+
else if (t === "document") r = en(Z(e));
|
|
1305
|
+
else if (Q(t)) r = rn(t, n);
|
|
1355
1306
|
else {
|
|
1356
|
-
let n =
|
|
1307
|
+
let n = qt(e);
|
|
1357
1308
|
r = {
|
|
1358
1309
|
x: t.x - n.x,
|
|
1359
1310
|
y: t.y - n.y,
|
|
@@ -1361,23 +1312,23 @@ function tn(e, t, n) {
|
|
|
1361
1312
|
height: t.height
|
|
1362
1313
|
};
|
|
1363
1314
|
}
|
|
1364
|
-
return
|
|
1315
|
+
return dt(r);
|
|
1365
1316
|
}
|
|
1366
|
-
function
|
|
1317
|
+
function on(e, t) {
|
|
1367
1318
|
let n = t.get(e);
|
|
1368
1319
|
if (n) return n;
|
|
1369
|
-
let r =
|
|
1370
|
-
for (; Q(o) && !
|
|
1371
|
-
let e = $(o), t =
|
|
1372
|
-
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o =
|
|
1320
|
+
let r = Vt(e, [], !1).filter((e) => Q(e) && Ct(e) !== "body"), i = null, a = $(e).position === "fixed", o = a ? zt(e) : e;
|
|
1321
|
+
for (; Q(o) && !Lt(o);) {
|
|
1322
|
+
let e = $(o), t = Pt(o), n = i ? i.position : a ? "fixed" : "";
|
|
1323
|
+
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = zt(o);
|
|
1373
1324
|
}
|
|
1374
1325
|
return t.set(e, r), r;
|
|
1375
1326
|
}
|
|
1376
|
-
function
|
|
1377
|
-
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ?
|
|
1327
|
+
function sn(e) {
|
|
1328
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? kt(t) ? [] : on(t, this._c) : [].concat(n), r], o = an(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
1378
1329
|
for (let e = 1; e < a.length; e++) {
|
|
1379
|
-
let n =
|
|
1380
|
-
s =
|
|
1330
|
+
let n = an(t, a[e], i);
|
|
1331
|
+
s = Ve(n.top, s), c = Be(n.right, c), l = Be(n.bottom, l), u = Ve(n.left, u);
|
|
1381
1332
|
}
|
|
1382
1333
|
return {
|
|
1383
1334
|
width: c - u,
|
|
@@ -1386,24 +1337,24 @@ function rn(e) {
|
|
|
1386
1337
|
y: s
|
|
1387
1338
|
};
|
|
1388
1339
|
}
|
|
1389
|
-
function
|
|
1390
|
-
let { width: t, height: n } =
|
|
1340
|
+
function cn(e) {
|
|
1341
|
+
let { width: t, height: n } = Ut(e);
|
|
1391
1342
|
return {
|
|
1392
1343
|
width: t,
|
|
1393
1344
|
height: n
|
|
1394
1345
|
};
|
|
1395
1346
|
}
|
|
1396
|
-
function
|
|
1397
|
-
let r =
|
|
1347
|
+
function ln(e, t, n) {
|
|
1348
|
+
let r = Tt(t), i = Z(t), a = n === "fixed", o = Yt(e, !0, a, t), s = {
|
|
1398
1349
|
scrollLeft: 0,
|
|
1399
1350
|
scrollTop: 0
|
|
1400
|
-
}, c =
|
|
1401
|
-
if ((r || !a) && ((
|
|
1402
|
-
let e =
|
|
1351
|
+
}, c = Y(0);
|
|
1352
|
+
if ((r || !a) && ((Ct(t) !== "body" || Dt(i)) && (s = Rt(t)), r)) {
|
|
1353
|
+
let e = Yt(t, !0, a, t);
|
|
1403
1354
|
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
1404
1355
|
}
|
|
1405
|
-
!r && i && (c.x =
|
|
1406
|
-
let l = i && !r && !a ?
|
|
1356
|
+
!r && i && (c.x = Xt(i));
|
|
1357
|
+
let l = i && !r && !a ? Zt(i, s) : Y(0);
|
|
1407
1358
|
return {
|
|
1408
1359
|
x: o.left + s.scrollLeft - c.x - l.x,
|
|
1409
1360
|
y: o.top + s.scrollTop - c.y - l.y,
|
|
@@ -1411,34 +1362,34 @@ function on(e, t, n) {
|
|
|
1411
1362
|
height: o.height
|
|
1412
1363
|
};
|
|
1413
1364
|
}
|
|
1414
|
-
function
|
|
1365
|
+
function un(e) {
|
|
1415
1366
|
return $(e).position === "static";
|
|
1416
1367
|
}
|
|
1417
|
-
function
|
|
1418
|
-
if (!
|
|
1368
|
+
function dn(e, t) {
|
|
1369
|
+
if (!Tt(e) || $(e).position === "fixed") return null;
|
|
1419
1370
|
if (t) return t(e);
|
|
1420
1371
|
let n = e.offsetParent;
|
|
1421
|
-
return
|
|
1422
|
-
}
|
|
1423
|
-
function
|
|
1424
|
-
let n =
|
|
1425
|
-
if (
|
|
1426
|
-
if (!
|
|
1427
|
-
let t =
|
|
1428
|
-
for (; t && !
|
|
1429
|
-
if (Q(t) && !
|
|
1430
|
-
t =
|
|
1372
|
+
return Z(e) === n && (n = n.ownerDocument.body), n;
|
|
1373
|
+
}
|
|
1374
|
+
function fn(e, t) {
|
|
1375
|
+
let n = X(e);
|
|
1376
|
+
if (kt(e)) return n;
|
|
1377
|
+
if (!Tt(e)) {
|
|
1378
|
+
let t = zt(e);
|
|
1379
|
+
for (; t && !Lt(t);) {
|
|
1380
|
+
if (Q(t) && !un(t)) return t;
|
|
1381
|
+
t = zt(t);
|
|
1431
1382
|
}
|
|
1432
1383
|
return n;
|
|
1433
1384
|
}
|
|
1434
|
-
let r =
|
|
1435
|
-
for (; r &&
|
|
1436
|
-
return r &&
|
|
1385
|
+
let r = dn(e, t);
|
|
1386
|
+
for (; r && Ot(r) && un(r);) r = dn(r, t);
|
|
1387
|
+
return r && Lt(r) && un(r) && !Pt(r) ? n : r || Ft(e) || n;
|
|
1437
1388
|
}
|
|
1438
|
-
var
|
|
1439
|
-
let t = this.getOffsetParent ||
|
|
1389
|
+
var pn = async function(e) {
|
|
1390
|
+
let t = this.getOffsetParent || fn, n = this.getDimensions, r = await n(e.floating);
|
|
1440
1391
|
return {
|
|
1441
|
-
reference:
|
|
1392
|
+
reference: ln(e.reference, await t(e.floating), e.strategy),
|
|
1442
1393
|
floating: {
|
|
1443
1394
|
x: 0,
|
|
1444
1395
|
y: 0,
|
|
@@ -1447,26 +1398,26 @@ var un = async function(e) {
|
|
|
1447
1398
|
}
|
|
1448
1399
|
};
|
|
1449
1400
|
};
|
|
1450
|
-
function
|
|
1401
|
+
function mn(e) {
|
|
1451
1402
|
return $(e).direction === "rtl";
|
|
1452
1403
|
}
|
|
1453
|
-
var
|
|
1454
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1455
|
-
getDocumentElement:
|
|
1456
|
-
getClippingRect:
|
|
1457
|
-
getOffsetParent:
|
|
1458
|
-
getElementRects:
|
|
1459
|
-
getClientRects:
|
|
1460
|
-
getDimensions:
|
|
1461
|
-
getScale:
|
|
1404
|
+
var hn = {
|
|
1405
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Qt,
|
|
1406
|
+
getDocumentElement: Z,
|
|
1407
|
+
getClippingRect: sn,
|
|
1408
|
+
getOffsetParent: fn,
|
|
1409
|
+
getElementRects: pn,
|
|
1410
|
+
getClientRects: $t,
|
|
1411
|
+
getDimensions: cn,
|
|
1412
|
+
getScale: Gt,
|
|
1462
1413
|
isElement: Q,
|
|
1463
|
-
isRTL:
|
|
1414
|
+
isRTL: mn
|
|
1464
1415
|
};
|
|
1465
|
-
function
|
|
1416
|
+
function gn(e, t) {
|
|
1466
1417
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1467
1418
|
}
|
|
1468
|
-
function
|
|
1469
|
-
let r = null, i, a =
|
|
1419
|
+
function _n(e, t, n) {
|
|
1420
|
+
let r = null, i, a = Z(e);
|
|
1470
1421
|
function o() {
|
|
1471
1422
|
var e;
|
|
1472
1423
|
clearTimeout(i), (e = r) == null || e.disconnect(), r = null;
|
|
@@ -1475,13 +1426,13 @@ function mn(e, t, n) {
|
|
|
1475
1426
|
n === void 0 && (n = !1), c === void 0 && (c = 1), o();
|
|
1476
1427
|
let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
|
|
1477
1428
|
if (n || t(), !f || !p) return;
|
|
1478
|
-
let m =
|
|
1429
|
+
let m = Ue(d), h = Ue(a.clientWidth - (u + f)), g = Ue(a.clientHeight - (d + p)), _ = Ue(u), v = {
|
|
1479
1430
|
rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
|
|
1480
|
-
threshold:
|
|
1431
|
+
threshold: Ve(0, Be(1, c)) || 1
|
|
1481
1432
|
}, y = !0;
|
|
1482
1433
|
function b(t) {
|
|
1483
1434
|
let n = t[0].intersectionRatio;
|
|
1484
|
-
if (!
|
|
1435
|
+
if (!gn(l, e.getBoundingClientRect())) return s();
|
|
1485
1436
|
if (n !== c) {
|
|
1486
1437
|
if (!y) return s();
|
|
1487
1438
|
n ? s(!1, n) : i = setTimeout(() => {
|
|
@@ -1500,18 +1451,18 @@ function mn(e, t, n) {
|
|
|
1500
1451
|
}
|
|
1501
1452
|
r.observe(e);
|
|
1502
1453
|
}
|
|
1503
|
-
let c =
|
|
1454
|
+
let c = X(e), l = () => s(n);
|
|
1504
1455
|
return c.addEventListener("resize", l), s(!0), () => {
|
|
1505
1456
|
c.removeEventListener("resize", l), o();
|
|
1506
1457
|
};
|
|
1507
1458
|
}
|
|
1508
|
-
function
|
|
1459
|
+
function vn(e, t, n, r) {
|
|
1509
1460
|
r === void 0 && (r = {});
|
|
1510
|
-
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l =
|
|
1461
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = Wt(e), u = i || a ? [...l ? Vt(l) : [], ...t ? Vt(t) : []] : [];
|
|
1511
1462
|
u.forEach((e) => {
|
|
1512
1463
|
i && e.addEventListener("scroll", n), a && e.addEventListener("resize", n);
|
|
1513
1464
|
});
|
|
1514
|
-
let d = l && s ?
|
|
1465
|
+
let d = l && s ? _n(l, n, a) : null, f = -1, p = null;
|
|
1515
1466
|
o && (p = new ResizeObserver((e) => {
|
|
1516
1467
|
let [r] = e;
|
|
1517
1468
|
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
@@ -1519,11 +1470,11 @@ function hn(e, t, n, r) {
|
|
|
1519
1470
|
(e = p) == null || e.observe(t);
|
|
1520
1471
|
})), n();
|
|
1521
1472
|
}), l && !c && p.observe(l), t && p.observe(t));
|
|
1522
|
-
let m, h = c ?
|
|
1473
|
+
let m, h = c ? Yt(e) : null;
|
|
1523
1474
|
c && g();
|
|
1524
1475
|
function g() {
|
|
1525
|
-
let t =
|
|
1526
|
-
h && !
|
|
1476
|
+
let t = Yt(e);
|
|
1477
|
+
h && !gn(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
1527
1478
|
}
|
|
1528
1479
|
return n(), () => {
|
|
1529
1480
|
var e;
|
|
@@ -1532,18 +1483,18 @@ function hn(e, t, n, r) {
|
|
|
1532
1483
|
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
1533
1484
|
};
|
|
1534
1485
|
}
|
|
1535
|
-
var
|
|
1486
|
+
var yn = bt, bn = xt, xn = _t, Sn = gt, Cn = (e, t, n) => {
|
|
1536
1487
|
let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
|
|
1537
|
-
...
|
|
1488
|
+
...hn,
|
|
1538
1489
|
...i.platform,
|
|
1539
1490
|
_c: r
|
|
1540
1491
|
};
|
|
1541
|
-
return
|
|
1492
|
+
return ht(e, t, {
|
|
1542
1493
|
...i,
|
|
1543
1494
|
platform: a
|
|
1544
1495
|
});
|
|
1545
|
-
},
|
|
1546
|
-
function
|
|
1496
|
+
}, wn = typeof document < "u" ? u : function() {};
|
|
1497
|
+
function Tn(e, t) {
|
|
1547
1498
|
if (e === t) return !0;
|
|
1548
1499
|
if (typeof e != typeof t) return !1;
|
|
1549
1500
|
if (typeof e == "function" && e.toString() === t.toString()) return !0;
|
|
@@ -1551,33 +1502,33 @@ function Sn(e, t) {
|
|
|
1551
1502
|
if (e && t && typeof e == "object") {
|
|
1552
1503
|
if (Array.isArray(e)) {
|
|
1553
1504
|
if (n = e.length, n !== t.length) return !1;
|
|
1554
|
-
for (r = n; r-- !== 0;) if (!
|
|
1505
|
+
for (r = n; r-- !== 0;) if (!Tn(e[r], t[r])) return !1;
|
|
1555
1506
|
return !0;
|
|
1556
1507
|
}
|
|
1557
1508
|
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
|
|
1558
1509
|
for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
|
|
1559
1510
|
for (r = n; r-- !== 0;) {
|
|
1560
1511
|
let n = i[r];
|
|
1561
|
-
if (!(n === "_owner" && e.$$typeof) && !
|
|
1512
|
+
if (!(n === "_owner" && e.$$typeof) && !Tn(e[n], t[n])) return !1;
|
|
1562
1513
|
}
|
|
1563
1514
|
return !0;
|
|
1564
1515
|
}
|
|
1565
1516
|
return e !== e && t !== t;
|
|
1566
1517
|
}
|
|
1567
|
-
function
|
|
1518
|
+
function En(e) {
|
|
1568
1519
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1569
1520
|
}
|
|
1570
|
-
function
|
|
1571
|
-
let n =
|
|
1521
|
+
function Dn(e, t) {
|
|
1522
|
+
let n = En(e);
|
|
1572
1523
|
return Math.round(t * n) / n;
|
|
1573
1524
|
}
|
|
1574
|
-
function
|
|
1525
|
+
function On(t) {
|
|
1575
1526
|
let n = e.useRef(t);
|
|
1576
|
-
return
|
|
1527
|
+
return wn(() => {
|
|
1577
1528
|
n.current = t;
|
|
1578
1529
|
}), n;
|
|
1579
1530
|
}
|
|
1580
|
-
function
|
|
1531
|
+
function kn(t) {
|
|
1581
1532
|
t === void 0 && (t = {});
|
|
1582
1533
|
let { placement: n = "bottom", strategy: r = "absolute", middleware: i = [], platform: a, elements: { reference: o, floating: s } = {}, transform: c = !0, whileElementsMounted: l, open: u } = t, [d, f] = e.useState({
|
|
1583
1534
|
x: 0,
|
|
@@ -1587,24 +1538,24 @@ function En(t) {
|
|
|
1587
1538
|
middlewareData: {},
|
|
1588
1539
|
isPositioned: !1
|
|
1589
1540
|
}), [p, m] = e.useState(i);
|
|
1590
|
-
|
|
1541
|
+
Tn(p, i) || m(i);
|
|
1591
1542
|
let [h, g] = e.useState(null), [_, y] = e.useState(null), b = e.useCallback((e) => {
|
|
1592
1543
|
e !== w.current && (w.current = e, g(e));
|
|
1593
1544
|
}, []), x = e.useCallback((e) => {
|
|
1594
1545
|
e !== T.current && (T.current = e, y(e));
|
|
1595
|
-
}, []), S = o || h, C = s || _, w = e.useRef(null), T = e.useRef(null), E = e.useRef(d), D = l != null, O =
|
|
1546
|
+
}, []), S = o || h, C = s || _, w = e.useRef(null), T = e.useRef(null), E = e.useRef(d), D = l != null, O = On(l), k = On(a), A = On(u), j = e.useCallback(() => {
|
|
1596
1547
|
if (!w.current || !T.current) return;
|
|
1597
1548
|
let e = {
|
|
1598
1549
|
placement: n,
|
|
1599
1550
|
strategy: r,
|
|
1600
1551
|
middleware: p
|
|
1601
1552
|
};
|
|
1602
|
-
k.current && (e.platform = k.current),
|
|
1553
|
+
k.current && (e.platform = k.current), Cn(w.current, T.current, e).then((e) => {
|
|
1603
1554
|
let t = {
|
|
1604
1555
|
...e,
|
|
1605
1556
|
isPositioned: A.current !== !1
|
|
1606
1557
|
};
|
|
1607
|
-
M.current && !
|
|
1558
|
+
M.current && !Tn(E.current, t) && (E.current = t, v.flushSync(() => {
|
|
1608
1559
|
f(t);
|
|
1609
1560
|
}));
|
|
1610
1561
|
});
|
|
@@ -1615,16 +1566,16 @@ function En(t) {
|
|
|
1615
1566
|
k,
|
|
1616
1567
|
A
|
|
1617
1568
|
]);
|
|
1618
|
-
|
|
1569
|
+
wn(() => {
|
|
1619
1570
|
u === !1 && E.current.isPositioned && (E.current.isPositioned = !1, f((e) => ({
|
|
1620
1571
|
...e,
|
|
1621
1572
|
isPositioned: !1
|
|
1622
1573
|
})));
|
|
1623
1574
|
}, [u]);
|
|
1624
1575
|
let M = e.useRef(!1);
|
|
1625
|
-
|
|
1576
|
+
wn(() => (M.current = !0, () => {
|
|
1626
1577
|
M.current = !1;
|
|
1627
|
-
}), []),
|
|
1578
|
+
}), []), wn(() => {
|
|
1628
1579
|
if (S && (w.current = S), C && (T.current = C), S && C) {
|
|
1629
1580
|
if (O.current) return O.current(S, C, j);
|
|
1630
1581
|
j();
|
|
@@ -1651,11 +1602,11 @@ function En(t) {
|
|
|
1651
1602
|
top: 0
|
|
1652
1603
|
};
|
|
1653
1604
|
if (!P.floating) return e;
|
|
1654
|
-
let t =
|
|
1605
|
+
let t = Dn(P.floating, d.x), n = Dn(P.floating, d.y);
|
|
1655
1606
|
return c ? {
|
|
1656
1607
|
...e,
|
|
1657
1608
|
transform: "translate(" + t + "px, " + n + "px)",
|
|
1658
|
-
...
|
|
1609
|
+
...En(P.floating) >= 1.5 && { willChange: "transform" }
|
|
1659
1610
|
} : {
|
|
1660
1611
|
position: r,
|
|
1661
1612
|
left: t,
|
|
@@ -1682,7 +1633,7 @@ function En(t) {
|
|
|
1682
1633
|
F
|
|
1683
1634
|
]);
|
|
1684
1635
|
}
|
|
1685
|
-
var
|
|
1636
|
+
var An = (e) => {
|
|
1686
1637
|
function t(e) {
|
|
1687
1638
|
return {}.hasOwnProperty.call(e, "current");
|
|
1688
1639
|
}
|
|
@@ -1691,90 +1642,88 @@ var Dn = (e) => {
|
|
|
1691
1642
|
options: e,
|
|
1692
1643
|
fn(n) {
|
|
1693
1644
|
let { element: r, padding: i } = typeof e == "function" ? e(n) : e;
|
|
1694
|
-
return r && t(r) ? r.current == null ? {} :
|
|
1645
|
+
return r && t(r) ? r.current == null ? {} : Sn({
|
|
1695
1646
|
element: r.current,
|
|
1696
1647
|
padding: i
|
|
1697
|
-
}).fn(n) : r ?
|
|
1648
|
+
}).fn(n) : r ? Sn({
|
|
1698
1649
|
element: r,
|
|
1699
1650
|
padding: i
|
|
1700
1651
|
}).fn(n) : {};
|
|
1701
1652
|
}
|
|
1702
1653
|
};
|
|
1703
|
-
},
|
|
1704
|
-
let n =
|
|
1654
|
+
}, jn = (e, t) => {
|
|
1655
|
+
let n = yn(e);
|
|
1705
1656
|
return {
|
|
1706
1657
|
name: n.name,
|
|
1707
1658
|
fn: n.fn,
|
|
1708
1659
|
options: [e, t]
|
|
1709
1660
|
};
|
|
1710
|
-
},
|
|
1711
|
-
let n =
|
|
1661
|
+
}, Mn = (e, t) => {
|
|
1662
|
+
let n = bn(e);
|
|
1712
1663
|
return {
|
|
1713
1664
|
name: n.name,
|
|
1714
1665
|
fn: n.fn,
|
|
1715
1666
|
options: [e, t]
|
|
1716
1667
|
};
|
|
1717
|
-
},
|
|
1718
|
-
let n =
|
|
1668
|
+
}, Nn = (e, t) => {
|
|
1669
|
+
let n = xn(e);
|
|
1719
1670
|
return {
|
|
1720
1671
|
name: n.name,
|
|
1721
1672
|
fn: n.fn,
|
|
1722
1673
|
options: [e, t]
|
|
1723
1674
|
};
|
|
1724
|
-
},
|
|
1725
|
-
let n =
|
|
1675
|
+
}, Pn = (e, t) => {
|
|
1676
|
+
let n = An(e);
|
|
1726
1677
|
return {
|
|
1727
1678
|
name: n.name,
|
|
1728
1679
|
fn: n.fn,
|
|
1729
1680
|
options: [e, t]
|
|
1730
1681
|
};
|
|
1731
|
-
},
|
|
1732
|
-
function
|
|
1733
|
-
return s(Mn);
|
|
1734
|
-
}
|
|
1735
|
-
//#endregion
|
|
1736
|
-
//#region src/components/menu/find_typeahead_index.ts
|
|
1737
|
-
var Pn = -1;
|
|
1738
|
-
function Fn(e, t, n) {
|
|
1682
|
+
}, Fn = -1;
|
|
1683
|
+
function In(e, t, n) {
|
|
1739
1684
|
let r = n.toLowerCase(), i = e.length;
|
|
1740
1685
|
for (let n = 1; n <= i; n += 1) {
|
|
1741
1686
|
let a = (t + n + i) % i;
|
|
1742
1687
|
if (e[a]?.toLowerCase().startsWith(r)) return a;
|
|
1743
1688
|
}
|
|
1744
|
-
return
|
|
1689
|
+
return Fn;
|
|
1690
|
+
}
|
|
1691
|
+
// src/components/menu/menu_context.ts
|
|
1692
|
+
var Ln = r(null);
|
|
1693
|
+
function Rn() {
|
|
1694
|
+
return s(Ln);
|
|
1745
1695
|
}
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
return Array.from(e.querySelectorAll(Ln));
|
|
1696
|
+
// src/components/menu/menu_surface.tsx
|
|
1697
|
+
var zn = ":not(:disabled):not([aria-disabled=\"true\"])", Bn = `[role="menuitem"]${zn}, [role="menuitemradio"]${zn}`;
|
|
1698
|
+
function Vn(e) {
|
|
1699
|
+
return Array.from(e.querySelectorAll(Bn));
|
|
1751
1700
|
}
|
|
1752
|
-
function
|
|
1753
|
-
let n =
|
|
1701
|
+
function Hn(e, t) {
|
|
1702
|
+
let n = Vn(e);
|
|
1754
1703
|
n.length !== 0 && n[(t % n.length + n.length) % n.length]?.focus({ preventScroll: !0 });
|
|
1755
1704
|
}
|
|
1756
|
-
function
|
|
1757
|
-
if (e.key === "ArrowDown")
|
|
1758
|
-
else if (e.key === "ArrowUp")
|
|
1759
|
-
else if (e.key === "Home")
|
|
1760
|
-
else if (e.key === "End")
|
|
1705
|
+
function Un(e, t, n, r) {
|
|
1706
|
+
if (e.key === "ArrowDown") Hn(t, r + 1);
|
|
1707
|
+
else if (e.key === "ArrowUp") Hn(t, r - 1);
|
|
1708
|
+
else if (e.key === "Home") Hn(t, 0);
|
|
1709
|
+
else if (e.key === "End") Hn(t, n.length - 1);
|
|
1761
1710
|
else return !1;
|
|
1762
1711
|
return e.preventDefault(), !0;
|
|
1763
1712
|
}
|
|
1764
|
-
function
|
|
1713
|
+
function Wn(e) {
|
|
1765
1714
|
return e.key.length === 1 && e.key !== " " && !e.ctrlKey && !e.metaKey && !e.altKey;
|
|
1766
1715
|
}
|
|
1767
|
-
function
|
|
1768
|
-
let i =
|
|
1769
|
-
i !== -1 &&
|
|
1716
|
+
function Gn(e, t, n, r) {
|
|
1717
|
+
let i = In(t.map((e) => e.textContent?.trim() ?? ""), n, r);
|
|
1718
|
+
i !== -1 && Hn(e, i);
|
|
1770
1719
|
}
|
|
1771
|
-
function
|
|
1720
|
+
function Kn({ setFloating: e, floatingStyles: t, isVisible: n, isPositioned: r, radius: i, onClose: a, children: o, id: s, labelledBy: l, "aria-label": u, initialFocus: d = "first" }) {
|
|
1772
1721
|
let p = f(null);
|
|
1773
1722
|
return c(() => {
|
|
1774
1723
|
if (!r) return;
|
|
1775
1724
|
let e = p.current;
|
|
1776
1725
|
if (!e) return;
|
|
1777
|
-
let t =
|
|
1726
|
+
let t = Vn(e);
|
|
1778
1727
|
(d === "last" ? t[t.length - 1] : t[0])?.focus({ preventScroll: !0 });
|
|
1779
1728
|
}, [r, d]), y(/* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
|
|
1780
1729
|
className: "fixed inset-0 z-40",
|
|
@@ -1795,21 +1744,20 @@ function Un({ setFloating: e, floatingStyles: t, isVisible: n, isPositioned: r,
|
|
|
1795
1744
|
onKeyDown: (e) => {
|
|
1796
1745
|
let t = p.current;
|
|
1797
1746
|
if (!t) return;
|
|
1798
|
-
let n =
|
|
1799
|
-
|
|
1747
|
+
let n = Vn(t), r = n.indexOf(document.activeElement);
|
|
1748
|
+
Un(e, t, n, r) || (e.key === "Escape" ? (e.preventDefault(), a()) : e.key === "Tab" ? a() : Wn(e) && Gn(t, n, r, e.key));
|
|
1800
1749
|
},
|
|
1801
|
-
className: x("w-max min-w-40 max-w-xs origin-top border py-1 shadow-lg backdrop-blur-sm", "transition-[opacity,transform] duration-150 ease-out", n ? "scale-100 opacity-100" : "scale-95 opacity-0",
|
|
1750
|
+
className: x("w-max min-w-40 max-w-xs origin-top border py-1 shadow-lg backdrop-blur-sm", "transition-[opacity,transform] duration-150 ease-out", n ? "scale-100 opacity-100" : "scale-95 opacity-0", W, U, j[i]),
|
|
1802
1751
|
onClick: (e) => e.stopPropagation(),
|
|
1803
|
-
children: /* @__PURE__ */ g(
|
|
1752
|
+
children: /* @__PURE__ */ g(Ln.Provider, {
|
|
1804
1753
|
value: a,
|
|
1805
1754
|
children: o
|
|
1806
1755
|
})
|
|
1807
1756
|
})
|
|
1808
1757
|
})] }), document.body);
|
|
1809
1758
|
}
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
function Wn() {
|
|
1759
|
+
// src/components/shared/use_overlay_state.ts
|
|
1760
|
+
function qn() {
|
|
1813
1761
|
let [e, t] = p(!1), [n, r] = p(!1), i = f(void 0);
|
|
1814
1762
|
return c(() => () => clearTimeout(i.current), []), {
|
|
1815
1763
|
isMounted: e,
|
|
@@ -1823,7 +1771,7 @@ function Wn() {
|
|
|
1823
1771
|
}, [])
|
|
1824
1772
|
};
|
|
1825
1773
|
}
|
|
1826
|
-
function
|
|
1774
|
+
function Jn(e, t, n) {
|
|
1827
1775
|
c(() => {
|
|
1828
1776
|
if (!e || !t) return;
|
|
1829
1777
|
let r = requestAnimationFrame(() => n(!0));
|
|
@@ -1834,10 +1782,9 @@ function Gn(e, t, n) {
|
|
|
1834
1782
|
n
|
|
1835
1783
|
]);
|
|
1836
1784
|
}
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
function qn(e, t) {
|
|
1785
|
+
// src/components/context_menu/context_menu.tsx
|
|
1786
|
+
var Yn = 2;
|
|
1787
|
+
function Xn(e, t) {
|
|
1841
1788
|
return { getBoundingClientRect: () => ({
|
|
1842
1789
|
width: 0,
|
|
1843
1790
|
height: 0,
|
|
@@ -1849,7 +1796,7 @@ function qn(e, t) {
|
|
|
1849
1796
|
bottom: t
|
|
1850
1797
|
}) };
|
|
1851
1798
|
}
|
|
1852
|
-
function
|
|
1799
|
+
function Zn(e) {
|
|
1853
1800
|
if (e.clientX !== 0 || e.clientY !== 0) return {
|
|
1854
1801
|
x: e.clientX,
|
|
1855
1802
|
y: e.clientY
|
|
@@ -1863,18 +1810,18 @@ function Jn(e) {
|
|
|
1863
1810
|
y: 0
|
|
1864
1811
|
};
|
|
1865
1812
|
}
|
|
1866
|
-
function
|
|
1867
|
-
let s = f(null), { isMounted: c, isVisible: l, setIsVisible: u, open: d, close: p } =
|
|
1813
|
+
function Qn({ children: e, items: t, radius: n = "md", className: r, ref: i, "aria-label": a }) {
|
|
1814
|
+
let s = f(null), { isMounted: c, isVisible: l, setIsVisible: u, open: d, close: p } = qn(), { refs: m, floatingStyles: h, isPositioned: v } = kn({
|
|
1868
1815
|
placement: "bottom-start",
|
|
1869
1816
|
open: c,
|
|
1870
|
-
whileElementsMounted:
|
|
1817
|
+
whileElementsMounted: vn,
|
|
1871
1818
|
middleware: [
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1819
|
+
jn(Yn),
|
|
1820
|
+
Nn(),
|
|
1821
|
+
Mn({ padding: 8 })
|
|
1875
1822
|
]
|
|
1876
1823
|
});
|
|
1877
|
-
|
|
1824
|
+
Jn(c, v, u);
|
|
1878
1825
|
let y = o(() => {
|
|
1879
1826
|
p(), s.current?.focus();
|
|
1880
1827
|
}, [p]);
|
|
@@ -1883,10 +1830,10 @@ function Yn({ children: e, items: t, radius: n = "md", className: r, ref: i, "ar
|
|
|
1883
1830
|
className: r,
|
|
1884
1831
|
onContextMenu: (e) => {
|
|
1885
1832
|
e.preventDefault(), s.current = document.activeElement;
|
|
1886
|
-
let { x: t, y: n } =
|
|
1887
|
-
m.setReference(
|
|
1833
|
+
let { x: t, y: n } = Zn(e);
|
|
1834
|
+
m.setReference(Xn(t, n)), d(!1);
|
|
1888
1835
|
},
|
|
1889
|
-
children: [e, c && /* @__PURE__ */ g(
|
|
1836
|
+
children: [e, c && /* @__PURE__ */ g(Kn, {
|
|
1890
1837
|
"aria-label": a,
|
|
1891
1838
|
setFloating: m.setFloating,
|
|
1892
1839
|
floatingStyles: h,
|
|
@@ -1898,36 +1845,29 @@ function Yn({ children: e, items: t, radius: n = "md", className: r, ref: i, "ar
|
|
|
1898
1845
|
})]
|
|
1899
1846
|
});
|
|
1900
1847
|
}
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
if (t) {
|
|
1905
|
-
t(e);
|
|
1906
|
-
return;
|
|
1907
|
-
}
|
|
1908
|
-
queueMicrotask(() => {
|
|
1848
|
+
// src/lib/surface_error.ts
|
|
1849
|
+
function $n(e, t) {
|
|
1850
|
+
t ? t(e) : queueMicrotask(() => {
|
|
1909
1851
|
throw e;
|
|
1910
1852
|
});
|
|
1911
1853
|
}
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
function Qn({ value: e, children: t, onError: n }) {
|
|
1854
|
+
// src/components/copy_button/copy_button.tsx
|
|
1855
|
+
var er = 2e3;
|
|
1856
|
+
function tr({ value: e, children: t, onError: n }) {
|
|
1916
1857
|
let [r, i] = p(!1), a = f(void 0);
|
|
1917
1858
|
return c(() => () => clearTimeout(a.current), []), /* @__PURE__ */ g(h, { children: t({
|
|
1918
1859
|
copied: r,
|
|
1919
1860
|
copy: async () => {
|
|
1920
1861
|
try {
|
|
1921
|
-
await navigator.clipboard.writeText(e), i(!0), clearTimeout(a.current), a.current = setTimeout(() => i(!1),
|
|
1862
|
+
await navigator.clipboard.writeText(e), i(!0), clearTimeout(a.current), a.current = setTimeout(() => i(!1), er);
|
|
1922
1863
|
} catch (e) {
|
|
1923
|
-
|
|
1864
|
+
$n(e, n);
|
|
1924
1865
|
}
|
|
1925
1866
|
}
|
|
1926
1867
|
}) });
|
|
1927
1868
|
}
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
function $n(e, t) {
|
|
1869
|
+
// src/lib/split_into_highlight_segments.ts
|
|
1870
|
+
function nr(e, t) {
|
|
1931
1871
|
if (t.length === 0) return [{
|
|
1932
1872
|
text: e,
|
|
1933
1873
|
isMatch: !1
|
|
@@ -1948,9 +1888,8 @@ function $n(e, t) {
|
|
|
1948
1888
|
isMatch: !1
|
|
1949
1889
|
}), n;
|
|
1950
1890
|
}
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
function er(e) {
|
|
1891
|
+
// src/components/highlight/highlight.tsx
|
|
1892
|
+
function rr(e) {
|
|
1954
1893
|
let t = 0;
|
|
1955
1894
|
return e.map((e) => {
|
|
1956
1895
|
let n = t;
|
|
@@ -1960,85 +1899,100 @@ function er(e) {
|
|
|
1960
1899
|
};
|
|
1961
1900
|
});
|
|
1962
1901
|
}
|
|
1963
|
-
function
|
|
1964
|
-
let n =
|
|
1902
|
+
function ir({ text: e, ranges: t }) {
|
|
1903
|
+
let n = rr(nr(e, t));
|
|
1965
1904
|
return /* @__PURE__ */ g(h, { children: n.map((e) => e.isMatch ? /* @__PURE__ */ g("mark", {
|
|
1966
1905
|
className: "rounded bg-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:text-yellow-100",
|
|
1967
1906
|
children: e.text
|
|
1968
1907
|
}, e.start) : /* @__PURE__ */ g("span", { children: e.text }, e.start)) });
|
|
1969
1908
|
}
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
"
|
|
1974
|
-
"
|
|
1975
|
-
|
|
1976
|
-
"
|
|
1977
|
-
"
|
|
1978
|
-
|
|
1979
|
-
"
|
|
1980
|
-
"
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1909
|
+
// src/components/drawer/drawer_styles.ts
|
|
1910
|
+
var ar = {
|
|
1911
|
+
sm: "sm:w-[22.5rem]",
|
|
1912
|
+
md: "sm:w-[26.25rem]",
|
|
1913
|
+
lg: "sm:w-[32.5rem]"
|
|
1914
|
+
}, or = {
|
|
1915
|
+
right: "right-0",
|
|
1916
|
+
left: "left-0"
|
|
1917
|
+
}, sr = {
|
|
1918
|
+
right: "translate-x-full motion-reduce:translate-x-0",
|
|
1919
|
+
left: "-translate-x-full motion-reduce:translate-x-0"
|
|
1920
|
+
}, cr = "translate-x-0", lr = {
|
|
1921
|
+
right: {
|
|
1922
|
+
none: "rounded-l-none",
|
|
1923
|
+
sm: "rounded-l-sm",
|
|
1924
|
+
md: "rounded-l-md",
|
|
1925
|
+
lg: "rounded-l-lg",
|
|
1926
|
+
xl: "rounded-l-xl",
|
|
1927
|
+
full: "rounded-l-lg"
|
|
1928
|
+
},
|
|
1929
|
+
left: {
|
|
1930
|
+
none: "rounded-r-none",
|
|
1931
|
+
sm: "rounded-r-sm",
|
|
1932
|
+
md: "rounded-r-md",
|
|
1933
|
+
lg: "rounded-r-lg",
|
|
1934
|
+
xl: "rounded-r-xl",
|
|
1935
|
+
full: "rounded-r-lg"
|
|
1936
|
+
}
|
|
1937
|
+
};
|
|
1938
|
+
// src/components/modal/modal_footer_slot.tsx
|
|
1939
|
+
function ur({ onSlotChange: e, children: t }) {
|
|
1940
|
+
return /* @__PURE__ */ g("div", {
|
|
1941
|
+
ref: e,
|
|
1942
|
+
className: x("flex items-center justify-end gap-3 px-6 py-4 border-t flex-shrink-0 empty:hidden", U),
|
|
1943
|
+
children: t
|
|
1944
|
+
});
|
|
1996
1945
|
}
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
1946
|
+
// src/components/modal/modal_footer_slot_context.ts
|
|
1947
|
+
var dr = r(null);
|
|
1948
|
+
// src/components/shared/accessible_name.ts
|
|
1949
|
+
function fr(e) {
|
|
2000
1950
|
return (e ?? "").replace(/\s+/g, " ").trim();
|
|
2001
1951
|
}
|
|
2002
|
-
function
|
|
1952
|
+
function pr(e, t) {
|
|
2003
1953
|
return t.split(/\s+/).map((t) => e.ownerDocument.getElementById(t)?.textContent).join(" ");
|
|
2004
1954
|
}
|
|
2005
|
-
function
|
|
2006
|
-
let t =
|
|
1955
|
+
function mr(e) {
|
|
1956
|
+
let t = fr(e.getAttribute("aria-label"));
|
|
2007
1957
|
if (t) return t;
|
|
2008
1958
|
let n = e.getAttribute("aria-labelledby");
|
|
2009
|
-
return (n ?
|
|
1959
|
+
return (n ? fr(pr(e, n)) : "") || fr(e.textContent);
|
|
1960
|
+
}
|
|
1961
|
+
// src/components/shared/portal_target.ts
|
|
1962
|
+
var hr = "main, nav, aside, header, footer, form[aria-label], form[aria-labelledby], section[aria-label], section[aria-labelledby], [role=main], [role=navigation], [role=complementary], [role=banner], [role=contentinfo], [role=region], [role=search], [role=form], dialog, [role=dialog], [role=alertdialog]";
|
|
1963
|
+
function gr(e) {
|
|
1964
|
+
return e?.closest(hr) ?? (e?.ownerDocument ?? document).body;
|
|
2010
1965
|
}
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
var sr = 8, cr = 8, lr = {
|
|
1966
|
+
// src/components/tooltip/tooltip.tsx
|
|
1967
|
+
var _r = 8, vr = 8, yr = {
|
|
2014
1968
|
top: "data-[state=closed]:translate-y-1",
|
|
2015
1969
|
bottom: "data-[state=closed]:-translate-y-1",
|
|
2016
1970
|
left: "data-[state=closed]:translate-x-1",
|
|
2017
1971
|
right: "data-[state=closed]:-translate-x-1"
|
|
2018
|
-
},
|
|
1972
|
+
}, br = {
|
|
2019
1973
|
top: "bottom",
|
|
2020
1974
|
bottom: "top",
|
|
2021
1975
|
left: "right",
|
|
2022
1976
|
right: "left"
|
|
2023
1977
|
};
|
|
2024
|
-
function
|
|
2025
|
-
let { isMounted:
|
|
1978
|
+
function xr({ content: e, children: t, position: r = "top", showOnClick: i = !1, temporaryContent: s, temporaryDuration: d = 2e3, disabled: m = !1, radius: v = "lg", onTemporaryShow: b, className: S, describeChild: C, portalContainer: w, ref: T }) {
|
|
1979
|
+
let { isMounted: E, isVisible: D, setIsVisible: O, open: k, close: A } = qn(), [M, N] = p(!1), P = l(), F = f(null), [I, L] = p(null), [R, z] = p(null), [ee, te] = p(null), B = f(void 0), { refs: V, floatingStyles: ne, placement: H, middlewareData: re, isPositioned: U } = kn({
|
|
2026
1980
|
placement: r,
|
|
2027
1981
|
strategy: "fixed",
|
|
2028
|
-
open:
|
|
2029
|
-
whileElementsMounted:
|
|
1982
|
+
open: E,
|
|
1983
|
+
whileElementsMounted: vn,
|
|
2030
1984
|
middleware: [
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
1985
|
+
jn(_r),
|
|
1986
|
+
Nn(),
|
|
1987
|
+
Mn({ padding: 8 }),
|
|
1988
|
+
Pn({ element: F })
|
|
2035
1989
|
]
|
|
2036
1990
|
}), W = H.split("-")[0];
|
|
2037
|
-
|
|
2038
|
-
let ie = o((e) =>
|
|
1991
|
+
Jn(E, U, O);
|
|
1992
|
+
let ie = o((e) => we(V.setReference, L, T)(e), [V, T]), ae = o((e) => we(V.setFloating, z)(e), [V]);
|
|
2039
1993
|
u(() => {
|
|
2040
1994
|
let e = I?.firstElementChild;
|
|
2041
|
-
te(R && e ?
|
|
1995
|
+
te(R && e ? fr(R.textContent) === mr(e) : null);
|
|
2042
1996
|
}, [
|
|
2043
1997
|
I,
|
|
2044
1998
|
R,
|
|
@@ -2047,125 +2001,417 @@ function dr({ content: e, children: t, position: r = "top", showOnClick: i = !1,
|
|
|
2047
2001
|
M
|
|
2048
2002
|
]);
|
|
2049
2003
|
let G = o(() => {
|
|
2050
|
-
N(!1),
|
|
2051
|
-
}, [
|
|
2052
|
-
!m && s && (N(!0),
|
|
2004
|
+
N(!1), A();
|
|
2005
|
+
}, [A]), oe = () => {
|
|
2006
|
+
!m && s && (N(!0), k(U), clearTimeout(B.current), B.current = setTimeout(G, d), b?.());
|
|
2053
2007
|
}, K = () => {
|
|
2054
|
-
m ||
|
|
2055
|
-
},
|
|
2008
|
+
m || k(U);
|
|
2009
|
+
}, se = o(() => {
|
|
2056
2010
|
clearTimeout(B.current), G();
|
|
2057
2011
|
}, [G]);
|
|
2058
2012
|
c(() => () => clearTimeout(B.current), []), c(() => {
|
|
2059
|
-
if (!
|
|
2013
|
+
if (!E) return;
|
|
2060
2014
|
let e = (e) => {
|
|
2061
|
-
e.key === "Escape" &&
|
|
2015
|
+
e.key === "Escape" && se();
|
|
2062
2016
|
};
|
|
2063
2017
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
2064
|
-
}, [
|
|
2065
|
-
let
|
|
2018
|
+
}, [E, se]);
|
|
2019
|
+
let ce = E && !m, le = M && s ? s : e, ue = {
|
|
2066
2020
|
onClick: (e) => {
|
|
2067
2021
|
i && s && oe(), a(t) && t.props.onClick?.(e);
|
|
2068
2022
|
},
|
|
2069
|
-
"aria-describedby": q(a(t) ? t.props["aria-describedby"] : void 0,
|
|
2070
|
-
},
|
|
2023
|
+
"aria-describedby": q(a(t) ? t.props["aria-describedby"] : void 0, ce && (C ?? (ee !== null && !ee)) && P)
|
|
2024
|
+
}, de = a(t) ? n(t, ue) : t, fe = w ?? gr(I), pe = re.arrow?.x, me = re.arrow?.y, he = br[W];
|
|
2071
2025
|
return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("span", {
|
|
2072
2026
|
ref: ie,
|
|
2073
|
-
className: x("inline-block",
|
|
2027
|
+
className: x("inline-block", S),
|
|
2074
2028
|
onMouseEnter: K,
|
|
2075
|
-
onMouseLeave:
|
|
2029
|
+
onMouseLeave: se,
|
|
2076
2030
|
onFocus: K,
|
|
2077
|
-
onBlur:
|
|
2078
|
-
children: [
|
|
2031
|
+
onBlur: se,
|
|
2032
|
+
children: [de, s !== void 0 && /* @__PURE__ */ g("span", {
|
|
2079
2033
|
role: "status",
|
|
2080
2034
|
className: "sr-only",
|
|
2081
2035
|
children: M ? s : null
|
|
2082
2036
|
})]
|
|
2083
|
-
}),
|
|
2037
|
+
}), ce && y(/* @__PURE__ */ g("div", {
|
|
2084
2038
|
ref: ae,
|
|
2085
2039
|
style: ne,
|
|
2086
2040
|
className: "z-50 inline-block pointer-events-none",
|
|
2087
2041
|
children: /* @__PURE__ */ _("div", {
|
|
2088
2042
|
id: P,
|
|
2089
2043
|
role: "tooltip",
|
|
2090
|
-
"data-state":
|
|
2091
|
-
className: x("px-3 py-1.5 text-sm whitespace-nowrap", "text-white dark:text-gray-900 bg-gray-900 dark:bg-gray-100 shadow-lg", "transition-[opacity,transform] duration-150 ease-out",
|
|
2092
|
-
children: [
|
|
2044
|
+
"data-state": D ? "open" : "closed",
|
|
2045
|
+
className: x("px-3 py-1.5 text-sm whitespace-nowrap", "text-white dark:text-gray-900 bg-gray-900 dark:bg-gray-100 shadow-lg", "transition-[opacity,transform] duration-150 ease-out", D ? "opacity-100" : "opacity-0", yr[W], j[v]),
|
|
2046
|
+
children: [le, /* @__PURE__ */ g("div", {
|
|
2093
2047
|
ref: F,
|
|
2094
2048
|
style: {
|
|
2095
2049
|
position: "absolute",
|
|
2096
|
-
width: `${
|
|
2097
|
-
height: `${
|
|
2098
|
-
left:
|
|
2099
|
-
top:
|
|
2100
|
-
[
|
|
2050
|
+
width: `${vr}px`,
|
|
2051
|
+
height: `${vr}px`,
|
|
2052
|
+
left: pe === void 0 ? void 0 : `${pe}px`,
|
|
2053
|
+
top: me === void 0 ? void 0 : `${me}px`,
|
|
2054
|
+
[he]: `-${vr / 2}px`
|
|
2101
2055
|
},
|
|
2102
2056
|
className: "rotate-45 bg-gray-900 dark:bg-gray-100"
|
|
2103
2057
|
})]
|
|
2104
2058
|
})
|
|
2105
|
-
}),
|
|
2059
|
+
}), fe)] });
|
|
2106
2060
|
}
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
var fr = {
|
|
2061
|
+
// src/components/icon_button/icon_button.tsx
|
|
2062
|
+
var Sr = {
|
|
2110
2063
|
xs: "p-1",
|
|
2111
2064
|
sm: "p-2",
|
|
2112
2065
|
md: "p-2",
|
|
2113
2066
|
lg: "p-3"
|
|
2114
|
-
},
|
|
2067
|
+
}, Cr = {
|
|
2115
2068
|
xs: "w-4 h-4",
|
|
2116
2069
|
sm: "w-4 h-4",
|
|
2117
2070
|
md: "w-5 h-5",
|
|
2118
2071
|
lg: "w-6 h-6"
|
|
2119
2072
|
};
|
|
2120
|
-
function
|
|
2073
|
+
function wr(e) {
|
|
2121
2074
|
if (e) return e === !0 ? {} : typeof e == "string" ? { position: e } : e;
|
|
2122
2075
|
}
|
|
2123
|
-
function
|
|
2124
|
-
let { icon: t, "aria-label": n, unstyled: r = !1, variant: i = "outline", color: a = "neutral", size: o = "md", radius: s = "md", className: c, children: l, tooltip: u, ref: d, ...f } = e, p =
|
|
2076
|
+
function Tr(e) {
|
|
2077
|
+
let { icon: t, "aria-label": n, unstyled: r = !1, variant: i = "outline", color: a = "neutral", size: o = "md", radius: s = "md", className: c, children: l, tooltip: u, ref: d, ...f } = e, p = O[a], m = wr(u), h = /* @__PURE__ */ _("button", {
|
|
2125
2078
|
ref: d,
|
|
2126
2079
|
type: "button",
|
|
2127
2080
|
"aria-label": n,
|
|
2128
|
-
className: x(
|
|
2129
|
-
|
|
2081
|
+
className: x(k, !r && [
|
|
2082
|
+
A,
|
|
2130
2083
|
"border",
|
|
2131
|
-
|
|
2132
|
-
|
|
2084
|
+
j[s],
|
|
2085
|
+
Sr[o],
|
|
2133
2086
|
p[i],
|
|
2134
2087
|
p.focusOutline
|
|
2135
2088
|
], c),
|
|
2136
2089
|
...f,
|
|
2137
|
-
children: [/* @__PURE__ */ g("div", { className: x(t,
|
|
2090
|
+
children: [/* @__PURE__ */ g("div", { className: x(t, Cr[o], l && "mr-1") }), l]
|
|
2138
2091
|
});
|
|
2139
2092
|
if (!m) return h;
|
|
2140
2093
|
let v = m.content !== void 0;
|
|
2141
|
-
return /* @__PURE__ */ g(
|
|
2094
|
+
return /* @__PURE__ */ g(xr, {
|
|
2142
2095
|
content: v ? m.content : n,
|
|
2143
2096
|
position: m.position,
|
|
2144
2097
|
describeChild: v ? void 0 : !1,
|
|
2145
2098
|
children: h
|
|
2146
2099
|
});
|
|
2147
2100
|
}
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2101
|
+
// src/components/modal/modal_header.tsx
|
|
2102
|
+
function Er({ titleId: e, title: t, onDismiss: n, dismissible: r, closeLabel: i }) {
|
|
2103
|
+
let a = Ae();
|
|
2104
|
+
return /* @__PURE__ */ _("div", {
|
|
2105
|
+
className: "flex items-center justify-between gap-4 px-6 pt-5 pb-4 flex-shrink-0",
|
|
2106
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
2107
|
+
id: e,
|
|
2108
|
+
className: "text-base font-medium tracking-tight text-gray-900 dark:text-gray-100",
|
|
2109
|
+
children: t
|
|
2110
|
+
}), r && /* @__PURE__ */ g(Tr, {
|
|
2111
|
+
icon: "i-mdi-close",
|
|
2112
|
+
onClick: n,
|
|
2113
|
+
"aria-label": i ?? a.close,
|
|
2114
|
+
variant: "subtle",
|
|
2115
|
+
size: "sm",
|
|
2116
|
+
radius: "full",
|
|
2117
|
+
className: "-mr-1"
|
|
2118
|
+
})]
|
|
2119
|
+
});
|
|
2120
|
+
}
|
|
2121
|
+
// src/components/modal/body_scroll_lock.ts
|
|
2122
|
+
var Dr = "--scrollbar-compensation", Or = 0, kr;
|
|
2123
|
+
function Ar() {
|
|
2124
|
+
let { style: e } = document.documentElement;
|
|
2125
|
+
return {
|
|
2126
|
+
overflow: e.overflow,
|
|
2127
|
+
overflowX: e.overflowX,
|
|
2128
|
+
overflowY: e.overflowY,
|
|
2129
|
+
paddingRight: e.paddingRight,
|
|
2130
|
+
scrollbarCompensation: e.getPropertyValue(Dr)
|
|
2131
|
+
};
|
|
2132
|
+
}
|
|
2133
|
+
function jr(e) {
|
|
2134
|
+
let { style: t } = document.documentElement;
|
|
2135
|
+
t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(Dr) : t.setProperty(Dr, e.scrollbarCompensation);
|
|
2136
|
+
}
|
|
2137
|
+
function Mr(e, t) {
|
|
2138
|
+
let { style: n } = document.documentElement;
|
|
2139
|
+
n.paddingRight = `${t + e}px`, n.setProperty(Dr, `${e}px`);
|
|
2140
|
+
}
|
|
2141
|
+
function Nr() {
|
|
2142
|
+
if (Or === 0) {
|
|
2143
|
+
let e = document.documentElement;
|
|
2144
|
+
kr = Ar();
|
|
2145
|
+
let t = Number.parseFloat(getComputedStyle(e).paddingRight) || 0, n = e.clientWidth;
|
|
2146
|
+
e.style.overflow = "hidden";
|
|
2147
|
+
let r = e.clientWidth - n;
|
|
2148
|
+
r > 0 && Mr(r, t);
|
|
2149
|
+
}
|
|
2150
|
+
Or += 1;
|
|
2151
|
+
}
|
|
2152
|
+
function Pr() {
|
|
2153
|
+
--Or, Or === 0 && kr && (jr(kr), kr = void 0);
|
|
2154
|
+
}
|
|
2155
|
+
function Fr() {
|
|
2156
|
+
c(() => (Nr(), Pr), []);
|
|
2157
|
+
}
|
|
2158
|
+
// src/components/modal/modal_stack.ts
|
|
2159
|
+
var Ir = [];
|
|
2160
|
+
function Lr(e) {
|
|
2161
|
+
return Ir.push(e), () => {
|
|
2162
|
+
let t = Ir.indexOf(e);
|
|
2163
|
+
t !== -1 && Ir.splice(t, 1);
|
|
2164
|
+
};
|
|
2165
|
+
}
|
|
2166
|
+
function Rr(e) {
|
|
2167
|
+
return Ir[Ir.length - 1] === e;
|
|
2168
|
+
}
|
|
2169
|
+
// src/components/shared/tabbable.ts
|
|
2170
|
+
var zr = "a[href], button, input, select, textarea, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]";
|
|
2171
|
+
function Br(e) {
|
|
2172
|
+
return e.matches(":disabled");
|
|
2173
|
+
}
|
|
2174
|
+
function Vr(e) {
|
|
2175
|
+
return e.getAttribute("tabindex") === "-1";
|
|
2176
|
+
}
|
|
2177
|
+
function Hr(e) {
|
|
2178
|
+
return e.matches("input[type=\"hidden\"]");
|
|
2179
|
+
}
|
|
2180
|
+
function Ur(e) {
|
|
2181
|
+
return e.closest("[inert]") !== null;
|
|
2182
|
+
}
|
|
2183
|
+
function Wr(e) {
|
|
2184
|
+
return typeof e.checkVisibility != "function" || e.checkVisibility();
|
|
2185
|
+
}
|
|
2186
|
+
function Gr(e) {
|
|
2187
|
+
return !Br(e) && !Vr(e) && !Hr(e) && !Ur(e) && Wr(e);
|
|
2188
|
+
}
|
|
2189
|
+
function Kr(e) {
|
|
2190
|
+
return e instanceof HTMLInputElement && e.type === "radio" && e.name !== "";
|
|
2191
|
+
}
|
|
2192
|
+
function qr(e) {
|
|
2193
|
+
let t = /* @__PURE__ */ new Map();
|
|
2194
|
+
for (let n of e) {
|
|
2195
|
+
let e = t.get(n.form) ?? /* @__PURE__ */ new Map();
|
|
2196
|
+
t.set(n.form, e);
|
|
2197
|
+
let r = e.get(n.name) ?? [];
|
|
2198
|
+
r.push(n), e.set(n.name, r);
|
|
2199
|
+
}
|
|
2200
|
+
return Array.from(t.values()).flatMap((e) => Array.from(e.values()));
|
|
2201
|
+
}
|
|
2202
|
+
function Jr(e) {
|
|
2203
|
+
return e.find((e) => e.checked) ?? e[0];
|
|
2204
|
+
}
|
|
2205
|
+
function Yr(e) {
|
|
2206
|
+
let t = Array.from(e.querySelectorAll(zr)).filter(Gr), n = t.filter(Kr), r = new Set(qr(n).map(Jr));
|
|
2207
|
+
return t.filter((e) => !Kr(e) || r.has(e));
|
|
2208
|
+
}
|
|
2209
|
+
// src/components/modal/use_modal_dialog.ts
|
|
2210
|
+
function Xr({ dialog: e, content: t, fallbackScope: n }) {
|
|
2211
|
+
let r = t ? Yr(t)[0] : void 0;
|
|
2212
|
+
return r || n === "content" ? r : e ? Yr(e)[0] : void 0;
|
|
2213
|
+
}
|
|
2214
|
+
function Zr(e) {
|
|
2215
|
+
let t = Xr(e);
|
|
2216
|
+
(e.initialFocusRef?.current ?? t ?? e.dialog)?.focus();
|
|
2217
|
+
}
|
|
2218
|
+
function Qr(e, t) {
|
|
2219
|
+
let n = Yr(t);
|
|
2220
|
+
if (n.length === 0) {
|
|
2221
|
+
e.preventDefault(), t.focus();
|
|
2222
|
+
return;
|
|
2223
|
+
}
|
|
2224
|
+
let r = n[0], i = n[n.length - 1], a = document.activeElement;
|
|
2225
|
+
(a instanceof HTMLElement ? n.indexOf(a) : -1) === -1 ? (e.preventDefault(), (e.shiftKey ? i : r).focus()) : e.shiftKey && a === r ? (e.preventDefault(), i.focus()) : !e.shiftKey && a === i && (e.preventDefault(), r.focus());
|
|
2226
|
+
}
|
|
2227
|
+
function $r() {
|
|
2228
|
+
let [e, t] = p(!1);
|
|
2229
|
+
return c(() => {
|
|
2230
|
+
let e = requestAnimationFrame(() => {
|
|
2231
|
+
requestAnimationFrame(() => t(!0));
|
|
2232
|
+
});
|
|
2233
|
+
return () => cancelAnimationFrame(e);
|
|
2234
|
+
}, []), e;
|
|
2235
|
+
}
|
|
2236
|
+
function ei(e, { isEnded: t, onDismiss: n, dismissible: r, modalToken: i }) {
|
|
2237
|
+
c(() => {
|
|
2238
|
+
if (t) return;
|
|
2239
|
+
let a = (t) => {
|
|
2240
|
+
if (Rr(i)) {
|
|
2241
|
+
if (t.key === "Escape") {
|
|
2242
|
+
if (t.defaultPrevented) return;
|
|
2243
|
+
t.preventDefault(), r && n();
|
|
2244
|
+
} else t.key === "Tab" && e.current && Qr(t, e.current);
|
|
2245
|
+
}
|
|
2246
|
+
};
|
|
2247
|
+
return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
|
|
2248
|
+
}, [
|
|
2249
|
+
t,
|
|
2250
|
+
n,
|
|
2251
|
+
r,
|
|
2252
|
+
i,
|
|
2253
|
+
e
|
|
2254
|
+
]);
|
|
2255
|
+
}
|
|
2256
|
+
function ti({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, initialFocusFallbackScope: i = "dialog", getFocusFallback: a }) {
|
|
2257
|
+
let [o] = p(() => Symbol("modal")), [s, l] = p(null), u = f(null), d = f(null), m = f(null);
|
|
2258
|
+
c(() => {
|
|
2259
|
+
if (!e) return Lr(o);
|
|
2260
|
+
}, [e, o]), Fr();
|
|
2261
|
+
let h = $r();
|
|
2262
|
+
return c(() => {
|
|
2263
|
+
e || (m.current = document.activeElement);
|
|
2264
|
+
}, [e]), c(() => {
|
|
2265
|
+
s && !e && Zr({
|
|
2266
|
+
dialog: u.current,
|
|
2267
|
+
content: d.current,
|
|
2268
|
+
initialFocusRef: r,
|
|
2269
|
+
fallbackScope: i
|
|
2270
|
+
});
|
|
2271
|
+
}, [s, e]), c(() => {
|
|
2272
|
+
if (!e) return;
|
|
2273
|
+
let t = m.current;
|
|
2274
|
+
(t?.isConnected ? t : a?.())?.focus();
|
|
2275
|
+
}, [e, a]), ei(u, {
|
|
2276
|
+
isEnded: e,
|
|
2277
|
+
onDismiss: t,
|
|
2278
|
+
dismissible: n,
|
|
2279
|
+
modalToken: o
|
|
2280
|
+
}), {
|
|
2281
|
+
dialogRef: u,
|
|
2282
|
+
contentRef: d,
|
|
2283
|
+
footerSlot: s,
|
|
2284
|
+
setFooterSlot: l,
|
|
2285
|
+
isVisible: h && !e,
|
|
2286
|
+
handleBackdropClick: () => {
|
|
2287
|
+
!e && n && t();
|
|
2288
|
+
}
|
|
2289
|
+
};
|
|
2290
|
+
}
|
|
2291
|
+
// node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_react@19.3.1_use-sync-external-store@1.7.0_react@19.3.1_/node_modules/zustand/esm/vanilla.mjs
|
|
2292
|
+
var ni = (e) => {
|
|
2293
|
+
let t, n = /* @__PURE__ */ new Set(), r = (e, r) => {
|
|
2294
|
+
let i = typeof e == "function" ? e(t) : e;
|
|
2295
|
+
if (!Object.is(i, t)) {
|
|
2296
|
+
let e = t;
|
|
2297
|
+
t = r ?? (typeof i != "object" || !i) ? i : Object.assign({}, t, i), n.forEach((n) => n(t, e));
|
|
2298
|
+
}
|
|
2299
|
+
}, i = () => t, a = {
|
|
2300
|
+
setState: r,
|
|
2301
|
+
getState: i,
|
|
2302
|
+
getInitialState: () => o,
|
|
2303
|
+
subscribe: (e) => (n.add(e), () => n.delete(e))
|
|
2304
|
+
}, o = t = e(r, i, a);
|
|
2305
|
+
return a;
|
|
2306
|
+
}, ri = ((e) => e ? ni(e) : ni), ii = (e) => e;
|
|
2307
|
+
function ai(e, n = ii) {
|
|
2308
|
+
let r = t.useSyncExternalStore(e.subscribe, t.useCallback(() => n(e.getState()), [e, n]), t.useCallback(() => n(e.getInitialState()), [e, n]));
|
|
2309
|
+
return t.useDebugValue(r), r;
|
|
2310
|
+
}
|
|
2311
|
+
var oi = (e) => {
|
|
2312
|
+
let t = ri(e), n = (e) => ai(t, e);
|
|
2313
|
+
return Object.assign(n, t), n;
|
|
2314
|
+
}, si = ((e) => e ? oi(e) : oi), ci = si((e) => ({
|
|
2315
|
+
globalHotkeysEnabled: !0,
|
|
2316
|
+
setGlobalHotkeysEnabled: (t) => e({ globalHotkeysEnabled: t })
|
|
2317
|
+
})), li = 0;
|
|
2318
|
+
function ui() {
|
|
2319
|
+
c(() => (li += 1, li === 1 && ci.getState().setGlobalHotkeysEnabled(!1), () => {
|
|
2320
|
+
--li, li === 0 && ci.getState().setGlobalHotkeysEnabled(!0);
|
|
2321
|
+
}), []);
|
|
2322
|
+
}
|
|
2323
|
+
// src/components/drawer/drawer.tsx
|
|
2324
|
+
function di() {
|
|
2325
|
+
let e = document.querySelector("main");
|
|
2326
|
+
return e && !e.hasAttribute("tabindex") && (e.tabIndex = -1), e;
|
|
2327
|
+
}
|
|
2328
|
+
function fi({ isEnded: e, onDismiss: t, title: n, children: r, footer: i, size: a, side: o, radius: s, className: c, dismissible: u, closeLabel: d, initialFocusRef: f }) {
|
|
2329
|
+
ui();
|
|
2330
|
+
let p = l(), { dialogRef: m, contentRef: h, footerSlot: v, setFooterSlot: b, isVisible: S, handleBackdropClick: C } = ti({
|
|
2331
|
+
isEnded: e,
|
|
2332
|
+
onDismiss: t,
|
|
2333
|
+
dismissible: u,
|
|
2334
|
+
initialFocusRef: f,
|
|
2335
|
+
initialFocusFallbackScope: "content",
|
|
2336
|
+
getFocusFallback: di
|
|
2337
|
+
});
|
|
2338
|
+
return y(/* @__PURE__ */ _("div", {
|
|
2339
|
+
className: x("fixed inset-0 z-50", "transition-opacity duration-200 ease-out", S ? "opacity-100" : "opacity-0"),
|
|
2340
|
+
onClick: C,
|
|
2341
|
+
children: [/* @__PURE__ */ g("div", {
|
|
2342
|
+
className: "fixed inset-0 bg-black/60 backdrop-blur-md",
|
|
2343
|
+
"aria-hidden": "true"
|
|
2344
|
+
}), /* @__PURE__ */ _("div", {
|
|
2345
|
+
ref: m,
|
|
2346
|
+
role: "dialog",
|
|
2347
|
+
"aria-modal": "true",
|
|
2348
|
+
"aria-labelledby": p,
|
|
2349
|
+
tabIndex: -1,
|
|
2350
|
+
inert: e,
|
|
2351
|
+
className: x("fixed inset-y-0 h-full w-full flex flex-col overflow-hidden", or[o], ar[a], W, G, "shadow-2xl", lr[o][s], "transition-transform duration-200 ease-out motion-reduce:transition-none", "focus:outline-none", S ? cr : sr[o]),
|
|
2352
|
+
onClick: (e) => e.stopPropagation(),
|
|
2353
|
+
children: [
|
|
2354
|
+
/* @__PURE__ */ g(Er, {
|
|
2355
|
+
titleId: p,
|
|
2356
|
+
title: n,
|
|
2357
|
+
onDismiss: t,
|
|
2358
|
+
dismissible: u,
|
|
2359
|
+
closeLabel: d
|
|
2360
|
+
}),
|
|
2361
|
+
/* @__PURE__ */ g("div", {
|
|
2362
|
+
ref: h,
|
|
2363
|
+
className: x("flex-1 overflow-y-auto min-h-0 px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", c),
|
|
2364
|
+
children: /* @__PURE__ */ g(dr.Provider, {
|
|
2365
|
+
value: v,
|
|
2366
|
+
children: r
|
|
2367
|
+
})
|
|
2368
|
+
}),
|
|
2369
|
+
/* @__PURE__ */ g(ur, {
|
|
2370
|
+
onSlotChange: b,
|
|
2371
|
+
children: i
|
|
2372
|
+
})
|
|
2373
|
+
]
|
|
2374
|
+
})]
|
|
2375
|
+
}), document.body);
|
|
2376
|
+
}
|
|
2377
|
+
function pi(e) {
|
|
2378
|
+
let [t, n] = p(!e);
|
|
2379
|
+
return e && t && n(!1), c(() => {
|
|
2380
|
+
if (e) return;
|
|
2381
|
+
let t = setTimeout(() => n(!0), 200);
|
|
2382
|
+
return () => clearTimeout(t);
|
|
2383
|
+
}, [e]), e || !t;
|
|
2384
|
+
}
|
|
2385
|
+
function mi({ isOpen: e, onClose: t, size: n = "md", side: r = "right", radius: i = "none", dismissible: a = !0, ...o }) {
|
|
2386
|
+
return pi(e) ? /* @__PURE__ */ g(fi, {
|
|
2387
|
+
...o,
|
|
2388
|
+
isEnded: !e,
|
|
2389
|
+
onDismiss: t,
|
|
2390
|
+
size: n,
|
|
2391
|
+
side: r,
|
|
2392
|
+
radius: i,
|
|
2393
|
+
dismissible: a
|
|
2394
|
+
}) : null;
|
|
2395
|
+
}
|
|
2396
|
+
// src/components/shared/use_controlled_length.ts
|
|
2397
|
+
function hi(e) {
|
|
2151
2398
|
return typeof e == "string" ? e.length : 0;
|
|
2152
2399
|
}
|
|
2153
|
-
function
|
|
2154
|
-
let [n, r] = p(
|
|
2400
|
+
function gi(e, t) {
|
|
2401
|
+
let [n, r] = p(hi(t)), i = e !== void 0;
|
|
2155
2402
|
return {
|
|
2156
|
-
length: i ?
|
|
2403
|
+
length: i ? hi(e) : n,
|
|
2157
2404
|
trackLength: (e) => {
|
|
2158
2405
|
i || r(e.length);
|
|
2159
2406
|
}
|
|
2160
2407
|
};
|
|
2161
2408
|
}
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
T(e.target.value), f?.(e);
|
|
2409
|
+
// src/components/input/input.tsx
|
|
2410
|
+
function _i({ label: e, description: t, error: n, showCharCount: r = !1, minLength: i, maxLength: a, radius: o = "md", unstyled: s = !1, className: c, wrapperClassName: l, value: u, defaultValue: d, onChange: f, id: p, "aria-describedby": m, ...h }) {
|
|
2411
|
+
let { fieldId: v, errorId: y, descriptionId: b, characterCountId: S } = J(p), { length: C, trackLength: w } = gi(u, d), T = r && (i !== void 0 || a !== void 0), E = (e) => {
|
|
2412
|
+
w(e.target.value), f?.(e);
|
|
2167
2413
|
};
|
|
2168
|
-
return /* @__PURE__ */ _(
|
|
2414
|
+
return /* @__PURE__ */ _(Fe, {
|
|
2169
2415
|
fieldId: v,
|
|
2170
2416
|
errorId: y,
|
|
2171
2417
|
descriptionId: b,
|
|
@@ -2177,20 +2423,20 @@ function vr({ label: e, description: t, error: n, showCharCount: r = !1, minLeng
|
|
|
2177
2423
|
children: [/* @__PURE__ */ g("input", {
|
|
2178
2424
|
id: v,
|
|
2179
2425
|
className: x("w-full disabled:opacity-50 disabled:cursor-not-allowed", !s && [
|
|
2180
|
-
|
|
2181
|
-
|
|
2426
|
+
fe,
|
|
2427
|
+
j[o],
|
|
2182
2428
|
"px-3 py-2 text-sm"
|
|
2183
2429
|
], !s && n && x("border-red-500 dark:border-red-400", "focus:ring-red-500"), c),
|
|
2184
2430
|
...u === void 0 ? { defaultValue: d } : { value: u },
|
|
2185
2431
|
minLength: i,
|
|
2186
2432
|
maxLength: a,
|
|
2187
|
-
onChange:
|
|
2433
|
+
onChange: E,
|
|
2188
2434
|
"aria-invalid": !!n,
|
|
2189
|
-
"aria-describedby": q(m, !!t && b, n && y,
|
|
2435
|
+
"aria-describedby": q(m, !!t && b, n && y, T && S),
|
|
2190
2436
|
...h
|
|
2191
|
-
}),
|
|
2192
|
-
id:
|
|
2193
|
-
current:
|
|
2437
|
+
}), T && /* @__PURE__ */ g(le, {
|
|
2438
|
+
id: S,
|
|
2439
|
+
current: C,
|
|
2194
2440
|
min: i,
|
|
2195
2441
|
max: a,
|
|
2196
2442
|
showMin: i !== void 0,
|
|
@@ -2198,41 +2444,40 @@ function vr({ label: e, description: t, error: n, showCharCount: r = !1, minLeng
|
|
|
2198
2444
|
})]
|
|
2199
2445
|
});
|
|
2200
2446
|
}
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
var yr = {
|
|
2447
|
+
// src/components/kbd/kbd.tsx
|
|
2448
|
+
var vi = {
|
|
2204
2449
|
xs: "px-1.5 py-0.5 text-xs",
|
|
2205
2450
|
sm: "px-2 py-0.5 text-xs",
|
|
2206
2451
|
md: "px-2.5 py-1 text-sm",
|
|
2207
2452
|
lg: "px-3 py-1 text-base"
|
|
2208
|
-
},
|
|
2209
|
-
className: x("inline-flex items-center",
|
|
2453
|
+
}, yi = ({ children: e, size: t = "sm", radius: n = "sm", unstyled: r = !1, className: i }) => /* @__PURE__ */ g("kbd", {
|
|
2454
|
+
className: x("inline-flex items-center", vi[t], !r && [
|
|
2210
2455
|
"border font-semibold uppercase",
|
|
2211
2456
|
"text-gray-600 dark:text-gray-300",
|
|
2212
2457
|
"bg-gray-100 dark:bg-gray-700",
|
|
2213
2458
|
"border-gray-200 dark:border-gray-600",
|
|
2214
|
-
|
|
2459
|
+
j[n]
|
|
2215
2460
|
], i),
|
|
2216
2461
|
children: e
|
|
2217
|
-
}),
|
|
2218
|
-
function
|
|
2462
|
+
}), bi = 4;
|
|
2463
|
+
function xi(e, t) {
|
|
2219
2464
|
return t === "center" ? e : `${e}-${t}`;
|
|
2220
2465
|
}
|
|
2221
|
-
function
|
|
2222
|
-
let d = f(null), [m, h] = p("first"), { isMounted: v, isVisible: y, setIsVisible: b, open: S, close: C } =
|
|
2223
|
-
placement:
|
|
2466
|
+
function Si({ trigger: e, children: t, side: r = "bottom", align: i = "start", radius: s = "md", className: c, ref: u }) {
|
|
2467
|
+
let d = f(null), [m, h] = p("first"), { isMounted: v, isVisible: y, setIsVisible: b, open: S, close: C } = qn(), { refs: w, floatingStyles: T, isPositioned: E } = kn({
|
|
2468
|
+
placement: xi(r, i),
|
|
2224
2469
|
open: v,
|
|
2225
|
-
whileElementsMounted:
|
|
2470
|
+
whileElementsMounted: vn,
|
|
2226
2471
|
middleware: [
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2472
|
+
jn(bi),
|
|
2473
|
+
Nn(),
|
|
2474
|
+
Mn({ padding: 8 })
|
|
2230
2475
|
]
|
|
2231
2476
|
});
|
|
2232
|
-
|
|
2477
|
+
Jn(v, E, b);
|
|
2233
2478
|
let D = l(), O = (a(e) ? e.props.id : void 0) ?? D, k = `${O}-menu`, A = o(() => {
|
|
2234
2479
|
C(), d.current?.querySelector("button, [href], [tabindex]")?.focus();
|
|
2235
|
-
}, [C]), j = o((e) =>
|
|
2480
|
+
}, [C]), j = o((e) => we(w.setReference, d, u)(e), [w, u]), M = {
|
|
2236
2481
|
id: O,
|
|
2237
2482
|
onClick: (t) => {
|
|
2238
2483
|
t.stopPropagation(), y ? C() : (h("first"), S(E)), a(e) && e.props.onClick?.(t);
|
|
@@ -2247,7 +2492,7 @@ function Cr({ trigger: e, children: t, side: r = "bottom", align: i = "start", r
|
|
|
2247
2492
|
return /* @__PURE__ */ _("span", {
|
|
2248
2493
|
ref: j,
|
|
2249
2494
|
className: x("inline-block", c),
|
|
2250
|
-
children: [N, v && /* @__PURE__ */ g(
|
|
2495
|
+
children: [N, v && /* @__PURE__ */ g(Kn, {
|
|
2251
2496
|
id: k,
|
|
2252
2497
|
labelledBy: O,
|
|
2253
2498
|
setFloating: w.setFloating,
|
|
@@ -2261,9 +2506,8 @@ function Cr({ trigger: e, children: t, side: r = "bottom", align: i = "start", r
|
|
|
2261
2506
|
})]
|
|
2262
2507
|
});
|
|
2263
2508
|
}
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
function wr({ label: e, children: t, unstyled: n = !1, className: r, wrapperClassName: i }) {
|
|
2509
|
+
// src/components/menu_group/menu_group.tsx
|
|
2510
|
+
function Ci({ label: e, children: t, unstyled: n = !1, className: r, wrapperClassName: i }) {
|
|
2267
2511
|
let a = l();
|
|
2268
2512
|
return /* @__PURE__ */ _("div", {
|
|
2269
2513
|
role: "group",
|
|
@@ -2277,9 +2521,13 @@ function wr({ label: e, children: t, unstyled: n = !1, className: r, wrapperClas
|
|
|
2277
2521
|
}), t]
|
|
2278
2522
|
});
|
|
2279
2523
|
}
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2524
|
+
// src/components/menu_item/menu_item_content.tsx
|
|
2525
|
+
var wi = ({ icon: e, children: t }) => /* @__PURE__ */ _(h, { children: [e && /* @__PURE__ */ g("div", {
|
|
2526
|
+
className: x(e, "h-4 w-4 flex-shrink-0"),
|
|
2527
|
+
"aria-hidden": "true"
|
|
2528
|
+
}), t] });
|
|
2529
|
+
// src/components/menu_item/menu_item_end.tsx
|
|
2530
|
+
function Ti({ trailing: e, selected: t }) {
|
|
2283
2531
|
let n = t !== void 0;
|
|
2284
2532
|
return !e && !n ? null : /* @__PURE__ */ _("span", {
|
|
2285
2533
|
className: "ml-auto flex flex-shrink-0 items-center gap-2 pl-2",
|
|
@@ -2292,47 +2540,19 @@ function Tr({ trailing: e, selected: t }) {
|
|
|
2292
2540
|
})]
|
|
2293
2541
|
});
|
|
2294
2542
|
}
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
var Er = [
|
|
2543
|
+
// src/components/menu_item/menu_item_styles.ts
|
|
2544
|
+
var Ei = [
|
|
2298
2545
|
"flex w-full cursor-pointer items-center gap-2 whitespace-nowrap px-4 py-2 text-left text-sm transition-colors",
|
|
2299
2546
|
"focus-visible:bg-gray-100 dark:focus-visible:bg-gray-700",
|
|
2300
|
-
|
|
2547
|
+
D
|
|
2301
2548
|
];
|
|
2302
|
-
function
|
|
2303
|
-
return x(
|
|
2304
|
-
}
|
|
2305
|
-
//#endregion
|
|
2306
|
-
//#region src/components/menu_item/menu_item_content.tsx
|
|
2307
|
-
var Or = ({ icon: e, children: t }) => /* @__PURE__ */ _(h, { children: [e && /* @__PURE__ */ g("div", {
|
|
2308
|
-
className: x(e, "h-4 w-4 flex-shrink-0"),
|
|
2309
|
-
"aria-hidden": "true"
|
|
2310
|
-
}), t] }), kr = "_blank", Ar = "noopener noreferrer", jr = ["no-underline hover:bg-gray-100 dark:hover:bg-gray-700", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
|
|
2311
|
-
function Mr({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1, disabled: o = !1, children: s, className: c, ref: l }) {
|
|
2312
|
-
let u = Nn();
|
|
2313
|
-
return /* @__PURE__ */ _("a", {
|
|
2314
|
-
ref: l,
|
|
2315
|
-
role: "menuitem",
|
|
2316
|
-
tabIndex: -1,
|
|
2317
|
-
href: o ? void 0 : n,
|
|
2318
|
-
target: r,
|
|
2319
|
-
rel: i ?? (r === kr ? Ar : void 0),
|
|
2320
|
-
"aria-disabled": o || void 0,
|
|
2321
|
-
onClick: (e) => {
|
|
2322
|
-
e.stopPropagation(), u?.();
|
|
2323
|
-
},
|
|
2324
|
-
className: Dr(jr, a, c),
|
|
2325
|
-
children: [/* @__PURE__ */ g(Or, {
|
|
2326
|
-
icon: e,
|
|
2327
|
-
children: s
|
|
2328
|
-
}), /* @__PURE__ */ g(Tr, { trailing: t })]
|
|
2329
|
-
});
|
|
2549
|
+
function Di(e, t, n) {
|
|
2550
|
+
return x(Ei, e, t ? "text-red-700 dark:text-red-300" : "text-gray-700 dark:text-gray-300", n);
|
|
2330
2551
|
}
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
let l = Nn();
|
|
2552
|
+
// src/components/menu_item/menu_item_button.tsx
|
|
2553
|
+
var Oi = ["hover:enabled:bg-gray-100 dark:hover:enabled:bg-gray-700", "disabled:cursor-not-allowed disabled:opacity-50"];
|
|
2554
|
+
function ki({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, disabled: a = !1, children: o, className: s, ref: c }) {
|
|
2555
|
+
let l = Rn();
|
|
2336
2556
|
return /* @__PURE__ */ _("button", {
|
|
2337
2557
|
ref: c,
|
|
2338
2558
|
type: "button",
|
|
@@ -2343,29 +2563,48 @@ function Pr({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, dis
|
|
|
2343
2563
|
e.stopPropagation(), n(e), l?.();
|
|
2344
2564
|
},
|
|
2345
2565
|
disabled: a,
|
|
2346
|
-
className:
|
|
2347
|
-
children: [/* @__PURE__ */ g(
|
|
2566
|
+
className: Di(Oi, i, s),
|
|
2567
|
+
children: [/* @__PURE__ */ g(wi, {
|
|
2348
2568
|
icon: e,
|
|
2349
2569
|
children: o
|
|
2350
|
-
}), /* @__PURE__ */ g(
|
|
2570
|
+
}), /* @__PURE__ */ g(Ti, {
|
|
2351
2571
|
trailing: t,
|
|
2352
2572
|
selected: r
|
|
2353
2573
|
})]
|
|
2354
2574
|
});
|
|
2355
2575
|
}
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
function
|
|
2359
|
-
|
|
2576
|
+
// src/components/menu_item/menu_item_link.tsx
|
|
2577
|
+
var Ai = "_blank", ji = "noopener noreferrer", Mi = ["no-underline hover:bg-gray-100 dark:hover:bg-gray-700", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
|
|
2578
|
+
function Ni({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1, disabled: o = !1, children: s, className: c, ref: l }) {
|
|
2579
|
+
let u = Rn();
|
|
2580
|
+
return /* @__PURE__ */ _("a", {
|
|
2581
|
+
ref: l,
|
|
2582
|
+
role: "menuitem",
|
|
2583
|
+
tabIndex: -1,
|
|
2584
|
+
href: o ? void 0 : n,
|
|
2585
|
+
target: r,
|
|
2586
|
+
rel: i ?? (r === Ai ? ji : void 0),
|
|
2587
|
+
"aria-disabled": o || void 0,
|
|
2588
|
+
onClick: (e) => {
|
|
2589
|
+
e.stopPropagation(), u?.();
|
|
2590
|
+
},
|
|
2591
|
+
className: Di(Mi, a, c),
|
|
2592
|
+
children: [/* @__PURE__ */ g(wi, {
|
|
2593
|
+
icon: e,
|
|
2594
|
+
children: s
|
|
2595
|
+
}), /* @__PURE__ */ g(Ti, { trailing: t })]
|
|
2596
|
+
});
|
|
2597
|
+
}
|
|
2598
|
+
// src/components/menu_item/menu_item.tsx
|
|
2599
|
+
function Pi(e) {
|
|
2600
|
+
return e.href === void 0 ? /* @__PURE__ */ g(ki, { ...e }) : /* @__PURE__ */ g(Ni, { ...e });
|
|
2360
2601
|
}
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
var Ir = ({ unstyled: e = !1, className: t }) => /* @__PURE__ */ g("hr", {
|
|
2364
|
-
role: "separator",
|
|
2602
|
+
// src/components/menu_separator/menu_separator.tsx
|
|
2603
|
+
var Fi = ({ unstyled: e = !1, className: t }) => /* @__PURE__ */ g("hr", {
|
|
2365
2604
|
"aria-orientation": "horizontal",
|
|
2366
2605
|
className: x("w-full", !e && ["my-1 border-0 border-t", "border-gray-200 dark:border-gray-700"], t)
|
|
2367
|
-
}),
|
|
2368
|
-
function
|
|
2606
|
+
}), Ii = [];
|
|
2607
|
+
function Li() {
|
|
2369
2608
|
let e = 0, t = [], n = null, r = /* @__PURE__ */ new Set(), i = () => {
|
|
2370
2609
|
for (let e of r) e(t);
|
|
2371
2610
|
};
|
|
@@ -2386,7 +2625,7 @@ function Rr() {
|
|
|
2386
2625
|
r.delete(i), r.size || (e = 0, t = [], n = null);
|
|
2387
2626
|
}),
|
|
2388
2627
|
getSnapshot: () => t,
|
|
2389
|
-
getServerSnapshot: () =>
|
|
2628
|
+
getServerSnapshot: () => Ii,
|
|
2390
2629
|
getListenersSize: () => r.size,
|
|
2391
2630
|
getUpsertPromise: () => n,
|
|
2392
2631
|
setUpsertPromise: (e) => {
|
|
@@ -2394,9 +2633,9 @@ function Rr() {
|
|
|
2394
2633
|
}
|
|
2395
2634
|
};
|
|
2396
2635
|
}
|
|
2397
|
-
var
|
|
2398
|
-
function
|
|
2399
|
-
let n = { current:
|
|
2636
|
+
var Ri = /* @__PURE__ */ new Map();
|
|
2637
|
+
function zi(e, t = 0) {
|
|
2638
|
+
let n = { current: Li() }, r = (e) => (r) => {
|
|
2400
2639
|
let i = /* @__PURE__ */ new Set();
|
|
2401
2640
|
n.current.set(e, (e) => (e.resolve(r), i.add(e.promise), {
|
|
2402
2641
|
...e,
|
|
@@ -2439,7 +2678,7 @@ function Br(e, t = 0) {
|
|
|
2439
2678
|
}), o;
|
|
2440
2679
|
}, c = (...e) => {
|
|
2441
2680
|
let t = e.length === 2, i = t ? e[0] : null, a = t ? e[1] : e[0];
|
|
2442
|
-
return
|
|
2681
|
+
return t && i !== n.current.getUpsertPromise() || n.current.setUpsertPromise(null), r(i)(a);
|
|
2443
2682
|
}, l = (...e) => {
|
|
2444
2683
|
let t = e.length === 2;
|
|
2445
2684
|
n.current.set(t ? e[0] : null, (n) => ({
|
|
@@ -2482,260 +2721,112 @@ function Br(e, t = 0) {
|
|
|
2482
2721
|
set: (r) => {
|
|
2483
2722
|
if (t || (e = r, !r)) return;
|
|
2484
2723
|
t = !0;
|
|
2485
|
-
let i =
|
|
2486
|
-
i ? n.current = i :
|
|
2724
|
+
let i = Ri.get(r);
|
|
2725
|
+
i ? n.current = i : Ri.set(r, n.current);
|
|
2487
2726
|
}
|
|
2488
2727
|
});
|
|
2489
2728
|
}
|
|
2490
2729
|
return d;
|
|
2491
2730
|
}
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
"
|
|
2496
|
-
"
|
|
2497
|
-
|
|
2498
|
-
"
|
|
2499
|
-
"
|
|
2500
|
-
"
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
}
|
|
2512
|
-
function Wr(e) {
|
|
2513
|
-
return e.matches("input[type=\"hidden\"]");
|
|
2514
|
-
}
|
|
2515
|
-
function Gr(e) {
|
|
2516
|
-
return e.closest("[inert]") !== null;
|
|
2517
|
-
}
|
|
2518
|
-
function Kr(e) {
|
|
2519
|
-
return typeof e.checkVisibility != "function" || e.checkVisibility();
|
|
2520
|
-
}
|
|
2521
|
-
function qr(e) {
|
|
2522
|
-
return !Hr(e) && !Ur(e) && !Wr(e) && !Gr(e) && Kr(e);
|
|
2523
|
-
}
|
|
2524
|
-
function Jr(e) {
|
|
2525
|
-
return e instanceof HTMLInputElement && e.type === "radio" && e.name !== "";
|
|
2526
|
-
}
|
|
2527
|
-
function Yr(e) {
|
|
2528
|
-
let t = /* @__PURE__ */ new Map();
|
|
2529
|
-
for (let n of e) {
|
|
2530
|
-
let e = t.get(n.form) ?? /* @__PURE__ */ new Map();
|
|
2531
|
-
t.set(n.form, e);
|
|
2532
|
-
let r = e.get(n.name) ?? [];
|
|
2533
|
-
r.push(n), e.set(n.name, r);
|
|
2534
|
-
}
|
|
2535
|
-
return Array.from(t.values()).flatMap((e) => Array.from(e.values()));
|
|
2536
|
-
}
|
|
2537
|
-
function Xr(e) {
|
|
2538
|
-
return e.find((e) => e.checked) ?? e[0];
|
|
2539
|
-
}
|
|
2540
|
-
function Zr(e) {
|
|
2541
|
-
let t = Array.from(e.querySelectorAll(Vr)).filter(qr), n = t.filter(Jr), r = new Set(Yr(n).map(Xr));
|
|
2542
|
-
return t.filter((e) => !Jr(e) || r.has(e));
|
|
2543
|
-
}
|
|
2544
|
-
//#endregion
|
|
2545
|
-
//#region src/components/modal/modal_stack.ts
|
|
2546
|
-
var Qr = [];
|
|
2547
|
-
function $r(e) {
|
|
2548
|
-
return Qr.push(e), () => {
|
|
2549
|
-
let t = Qr.indexOf(e);
|
|
2550
|
-
t !== -1 && Qr.splice(t, 1);
|
|
2551
|
-
};
|
|
2552
|
-
}
|
|
2553
|
-
function ei(e) {
|
|
2554
|
-
return Qr[Qr.length - 1] === e;
|
|
2731
|
+
// src/components/modal/confirm_modal_title.tsx
|
|
2732
|
+
var Bi = {
|
|
2733
|
+
danger: "i-mdi-alert-circle",
|
|
2734
|
+
primary: "i-mdi-help-circle",
|
|
2735
|
+
success: "i-mdi-check-circle"
|
|
2736
|
+
}, Vi = {
|
|
2737
|
+
danger: "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400",
|
|
2738
|
+
primary: "bg-blue-50 text-blue-600 dark:bg-blue-500/10 dark:text-blue-400",
|
|
2739
|
+
success: "bg-green-50 text-green-600 dark:bg-green-500/10 dark:text-green-400"
|
|
2740
|
+
};
|
|
2741
|
+
function Hi({ title: e, color: t }) {
|
|
2742
|
+
return /* @__PURE__ */ _("div", {
|
|
2743
|
+
className: "flex items-center gap-3",
|
|
2744
|
+
children: [/* @__PURE__ */ g("span", {
|
|
2745
|
+
className: x("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", Vi[t]),
|
|
2746
|
+
"aria-hidden": "true",
|
|
2747
|
+
children: /* @__PURE__ */ g("span", { className: x(Bi[t], "h-5 w-5") })
|
|
2748
|
+
}), e]
|
|
2749
|
+
});
|
|
2555
2750
|
}
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
var ti = r(null), ni = {
|
|
2751
|
+
// src/components/modal/modal_shell.tsx
|
|
2752
|
+
var Ui = {
|
|
2559
2753
|
sm: "max-w-md",
|
|
2560
2754
|
md: "max-w-lg",
|
|
2561
2755
|
lg: "max-w-2xl",
|
|
2562
2756
|
xl: "max-w-4xl"
|
|
2757
|
+
}, Wi = {
|
|
2758
|
+
auto: "",
|
|
2759
|
+
fixed: "h-[calc(100vh-4rem)] sm:h-[min(40rem,calc(100vh-10rem))]"
|
|
2760
|
+
}, Gi = {
|
|
2761
|
+
auto: "overflow-y-auto",
|
|
2762
|
+
fixed: "overflow-hidden flex flex-col"
|
|
2563
2763
|
};
|
|
2564
|
-
function
|
|
2565
|
-
let
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
requestAnimationFrame(() => w(!0));
|
|
2572
|
-
});
|
|
2573
|
-
return () => {
|
|
2574
|
-
cancelAnimationFrame(e), document.body.style.overflow = "";
|
|
2575
|
-
};
|
|
2576
|
-
}, []), c(() => {
|
|
2577
|
-
if (!E) return;
|
|
2578
|
-
let e = O.current, t = (k.current && Zr(k.current)[0]) ?? (e && Zr(e)[0]);
|
|
2579
|
-
(h?.current ?? t ?? e)?.focus();
|
|
2580
|
-
}, [E]), c(() => {
|
|
2581
|
-
e && A.current?.focus();
|
|
2582
|
-
}, [e]), c(() => {
|
|
2583
|
-
if (e) return;
|
|
2584
|
-
let n = (e) => {
|
|
2585
|
-
if (!ei(T)) return;
|
|
2586
|
-
if (e.key === "Escape") {
|
|
2587
|
-
if (e.defaultPrevented) return;
|
|
2588
|
-
e.preventDefault(), u && t();
|
|
2589
|
-
return;
|
|
2590
|
-
}
|
|
2591
|
-
if (e.key !== "Tab") return;
|
|
2592
|
-
let n = O.current;
|
|
2593
|
-
if (!n) return;
|
|
2594
|
-
let r = Zr(n);
|
|
2595
|
-
if (r.length === 0) {
|
|
2596
|
-
e.preventDefault(), n.focus();
|
|
2597
|
-
return;
|
|
2598
|
-
}
|
|
2599
|
-
let i = r[0], a = r[r.length - 1], o = document.activeElement;
|
|
2600
|
-
if ((o instanceof HTMLElement ? r.indexOf(o) : -1) === -1) {
|
|
2601
|
-
e.preventDefault(), (e.shiftKey ? a : i).focus();
|
|
2602
|
-
return;
|
|
2603
|
-
}
|
|
2604
|
-
e.shiftKey && o === i ? (e.preventDefault(), a.focus()) : !e.shiftKey && o === a && (e.preventDefault(), i.focus());
|
|
2605
|
-
};
|
|
2606
|
-
return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
|
|
2607
|
-
}, [
|
|
2608
|
-
e,
|
|
2609
|
-
t,
|
|
2610
|
-
u,
|
|
2611
|
-
T
|
|
2612
|
-
]);
|
|
2613
|
-
let N = () => {
|
|
2614
|
-
!e && u && t();
|
|
2615
|
-
}, P = m === "alertdialog" && !!r, F = C && !e;
|
|
2764
|
+
function Ki({ isEnded: e, onDismiss: t, title: n, children: r, footer: i, size: a = "md", height: o = "auto", radius: s = "xl", className: c, dismissible: u = !0, closeLabel: d, role: f = "dialog", initialFocusRef: p, "aria-label": m }) {
|
|
2765
|
+
let h = l(), v = l(), { dialogRef: b, contentRef: S, footerSlot: C, setFooterSlot: w, isVisible: T, handleBackdropClick: E } = ti({
|
|
2766
|
+
isEnded: e,
|
|
2767
|
+
onDismiss: t,
|
|
2768
|
+
dismissible: u,
|
|
2769
|
+
initialFocusRef: p
|
|
2770
|
+
}), D = f === "alertdialog" && !!r;
|
|
2616
2771
|
return y(/* @__PURE__ */ _("div", {
|
|
2617
|
-
className: x("fixed inset-0 z-50 flex items-start justify-center", "p-2 sm:py-[3rem] lg:py-[5rem]", "transition-opacity duration-200 ease-out",
|
|
2618
|
-
onClick:
|
|
2772
|
+
className: x("fixed inset-0 z-50 flex items-start justify-center", "p-2 sm:py-[3rem] lg:py-[5rem]", "transition-opacity duration-200 ease-out", T ? "opacity-100" : "opacity-0"),
|
|
2773
|
+
onClick: E,
|
|
2619
2774
|
children: [/* @__PURE__ */ g("div", {
|
|
2620
|
-
className: x("fixed inset-0 bg-black/60 backdrop-blur-md", "transition-opacity duration-200 ease-out",
|
|
2775
|
+
className: x("fixed inset-0 bg-black/60 backdrop-blur-md", "transition-opacity duration-200 ease-out", T ? "opacity-100" : "opacity-0"),
|
|
2621
2776
|
"aria-hidden": "true"
|
|
2622
2777
|
}), /* @__PURE__ */ _("div", {
|
|
2623
|
-
ref:
|
|
2624
|
-
role:
|
|
2778
|
+
ref: b,
|
|
2779
|
+
role: f,
|
|
2625
2780
|
"aria-modal": "true",
|
|
2626
|
-
"aria-labelledby": n ?
|
|
2627
|
-
"aria-label": n ? void 0 :
|
|
2628
|
-
"aria-describedby":
|
|
2781
|
+
"aria-labelledby": n ? h : void 0,
|
|
2782
|
+
"aria-label": n ? void 0 : m,
|
|
2783
|
+
"aria-describedby": D ? v : void 0,
|
|
2629
2784
|
tabIndex: -1,
|
|
2630
|
-
className: x("relative w-full",
|
|
2785
|
+
className: x("relative w-full", Ui[a], Wi[o], W, G, "shadow-2xl", j[s], "max-h-[calc(100vh-4rem)] sm:max-h-[calc(100vh-10rem)] overflow-hidden flex flex-col", "transition-all duration-200 ease-out", "focus:outline-none", T ? "opacity-100 scale-100 translate-y-0" : "opacity-0 scale-95 translate-y-1"),
|
|
2631
2786
|
onClick: (e) => e.stopPropagation(),
|
|
2632
2787
|
children: [
|
|
2633
|
-
n && /* @__PURE__ */
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
}), u && /* @__PURE__ */ g(hr, {
|
|
2640
|
-
icon: "i-mdi-close",
|
|
2641
|
-
onClick: t,
|
|
2642
|
-
"aria-label": d ?? b.close,
|
|
2643
|
-
variant: "subtle",
|
|
2644
|
-
size: "sm",
|
|
2645
|
-
radius: "full",
|
|
2646
|
-
className: "-mr-1"
|
|
2647
|
-
})]
|
|
2788
|
+
n && /* @__PURE__ */ g(Er, {
|
|
2789
|
+
titleId: h,
|
|
2790
|
+
title: n,
|
|
2791
|
+
onDismiss: t,
|
|
2792
|
+
dismissible: u,
|
|
2793
|
+
closeLabel: d
|
|
2648
2794
|
}),
|
|
2649
2795
|
/* @__PURE__ */ g("div", {
|
|
2650
|
-
ref:
|
|
2651
|
-
id:
|
|
2652
|
-
className: x("flex-1
|
|
2653
|
-
children: /* @__PURE__ */ g(
|
|
2654
|
-
value:
|
|
2796
|
+
ref: S,
|
|
2797
|
+
id: D ? v : void 0,
|
|
2798
|
+
className: x("flex-1 px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400 min-h-0", Gi[o], !n && "pt-6", c),
|
|
2799
|
+
children: /* @__PURE__ */ g(dr.Provider, {
|
|
2800
|
+
value: C,
|
|
2655
2801
|
children: r
|
|
2656
2802
|
})
|
|
2657
2803
|
}),
|
|
2658
|
-
/* @__PURE__ */ g(
|
|
2659
|
-
|
|
2660
|
-
className: x("flex items-center justify-end gap-3 px-6 py-4 border-t flex-shrink-0 empty:hidden", H),
|
|
2804
|
+
/* @__PURE__ */ g(ur, {
|
|
2805
|
+
onSlotChange: w,
|
|
2661
2806
|
children: i
|
|
2662
2807
|
})
|
|
2663
2808
|
]
|
|
2664
2809
|
})]
|
|
2665
2810
|
}), document.body);
|
|
2666
2811
|
}
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
let t, n = /* @__PURE__ */ new Set(), r = (e, r) => {
|
|
2671
|
-
let i = typeof e == "function" ? e(t) : e;
|
|
2672
|
-
if (!Object.is(i, t)) {
|
|
2673
|
-
let e = t;
|
|
2674
|
-
t = r ?? (typeof i != "object" || !i) ? i : Object.assign({}, t, i), n.forEach((n) => n(t, e));
|
|
2675
|
-
}
|
|
2676
|
-
}, i = () => t, a = {
|
|
2677
|
-
setState: r,
|
|
2678
|
-
getState: i,
|
|
2679
|
-
getInitialState: () => o,
|
|
2680
|
-
subscribe: (e) => (n.add(e), () => n.delete(e))
|
|
2681
|
-
}, o = t = e(r, i, a);
|
|
2682
|
-
return a;
|
|
2683
|
-
}, ai = ((e) => e ? ii(e) : ii), oi = (e) => e;
|
|
2684
|
-
function si(e, n = oi) {
|
|
2685
|
-
let r = t.useSyncExternalStore(e.subscribe, t.useCallback(() => n(e.getState()), [e, n]), t.useCallback(() => n(e.getInitialState()), [e, n]));
|
|
2686
|
-
return t.useDebugValue(r), r;
|
|
2687
|
-
}
|
|
2688
|
-
var ci = (e) => {
|
|
2689
|
-
let t = ai(e), n = (e) => si(t, e);
|
|
2690
|
-
return Object.assign(n, t), n;
|
|
2691
|
-
}, li = ((e) => e ? ci(e) : ci), ui = li((e) => ({
|
|
2692
|
-
globalHotkeysEnabled: !0,
|
|
2693
|
-
setGlobalHotkeysEnabled: (t) => e({ globalHotkeysEnabled: t })
|
|
2694
|
-
})), di = 0;
|
|
2695
|
-
function fi() {
|
|
2696
|
-
c(() => (di += 1, di === 1 && ui.getState().setGlobalHotkeysEnabled(!1), () => {
|
|
2697
|
-
--di, di === 0 && ui.getState().setGlobalHotkeysEnabled(!0);
|
|
2698
|
-
}), []);
|
|
2699
|
-
}
|
|
2700
|
-
//#endregion
|
|
2701
|
-
//#region src/components/modal/confirm_modal.tsx
|
|
2702
|
-
var pi = {
|
|
2703
|
-
danger: "i-mdi-alert-circle",
|
|
2704
|
-
primary: "i-mdi-help-circle",
|
|
2705
|
-
success: "i-mdi-check-circle"
|
|
2706
|
-
}, mi = {
|
|
2707
|
-
danger: "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400",
|
|
2708
|
-
primary: "bg-blue-50 text-blue-600 dark:bg-blue-500/10 dark:text-blue-400",
|
|
2709
|
-
success: "bg-green-50 text-green-600 dark:bg-green-500/10 dark:text-green-400"
|
|
2710
|
-
};
|
|
2711
|
-
function hi({ title: e, color: t }) {
|
|
2712
|
-
return /* @__PURE__ */ _("div", {
|
|
2713
|
-
className: "flex items-center gap-3",
|
|
2714
|
-
children: [/* @__PURE__ */ g("span", {
|
|
2715
|
-
className: x("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", mi[t]),
|
|
2716
|
-
"aria-hidden": "true",
|
|
2717
|
-
children: /* @__PURE__ */ g("span", { className: x(pi[t], "h-5 w-5") })
|
|
2718
|
-
}), e]
|
|
2719
|
-
});
|
|
2720
|
-
}
|
|
2721
|
-
var gi = Br(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, confirmColor: a, radius: o, closeLabel: s, onConfirm: c, onError: l }) => {
|
|
2722
|
-
fi();
|
|
2812
|
+
// src/components/modal/confirm_modal.tsx
|
|
2813
|
+
var qi = zi(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, confirmColor: a, radius: o, closeLabel: s, onConfirm: c, onError: l }) => {
|
|
2814
|
+
ui();
|
|
2723
2815
|
let [u, d] = p(!1), m = f(null), v = () => e.end(!1), y = async () => {
|
|
2724
|
-
if (!c)
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
d(!1), Xn(e, l);
|
|
2816
|
+
if (!c) e.end(!0);
|
|
2817
|
+
else {
|
|
2818
|
+
d(!0);
|
|
2819
|
+
try {
|
|
2820
|
+
await c(), e.end(!0);
|
|
2821
|
+
} catch (e) {
|
|
2822
|
+
d(!1), $n(e, l);
|
|
2823
|
+
}
|
|
2733
2824
|
}
|
|
2734
|
-
}, b =
|
|
2735
|
-
return /* @__PURE__ */ g(
|
|
2825
|
+
}, b = Ae(), x = u, S = r ?? b.confirm, C = i ?? b.cancel, w = a ?? "primary";
|
|
2826
|
+
return /* @__PURE__ */ g(Ki, {
|
|
2736
2827
|
isEnded: e.ended,
|
|
2737
2828
|
onDismiss: v,
|
|
2738
|
-
title: /* @__PURE__ */ g(
|
|
2829
|
+
title: /* @__PURE__ */ g(Hi, {
|
|
2739
2830
|
title: t,
|
|
2740
2831
|
color: w
|
|
2741
2832
|
}),
|
|
@@ -2765,50 +2856,47 @@ var gi = Br(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i,
|
|
|
2765
2856
|
children: n
|
|
2766
2857
|
});
|
|
2767
2858
|
}, 200);
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
function _i(e, t) {
|
|
2859
|
+
// src/components/modal/modal.tsx
|
|
2860
|
+
function Ji(e, t) {
|
|
2771
2861
|
return typeof e == "function" ? e(t) : e;
|
|
2772
2862
|
}
|
|
2773
|
-
var
|
|
2774
|
-
|
|
2775
|
-
let
|
|
2776
|
-
return /* @__PURE__ */ g(
|
|
2863
|
+
var Yi = zi(({ call: e, title: t, children: n, size: r, height: i, radius: a, className: o, dismissible: s, closeLabel: c, role: l, initialFocusRef: u, "aria-label": d }) => {
|
|
2864
|
+
ui();
|
|
2865
|
+
let f = () => e.end();
|
|
2866
|
+
return /* @__PURE__ */ g(Ki, {
|
|
2777
2867
|
isEnded: e.ended,
|
|
2778
|
-
onDismiss:
|
|
2868
|
+
onDismiss: f,
|
|
2779
2869
|
title: t,
|
|
2780
2870
|
size: r,
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2871
|
+
height: i,
|
|
2872
|
+
radius: a,
|
|
2873
|
+
className: o,
|
|
2874
|
+
dismissible: s,
|
|
2875
|
+
closeLabel: c,
|
|
2876
|
+
role: l,
|
|
2877
|
+
initialFocusRef: u,
|
|
2878
|
+
"aria-label": d,
|
|
2879
|
+
children: Ji(n, f)
|
|
2789
2880
|
});
|
|
2790
2881
|
}, 200);
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
let t = s(ti);
|
|
2882
|
+
// src/components/modal/modal_footer.tsx
|
|
2883
|
+
function Xi({ children: e }) {
|
|
2884
|
+
let t = s(dr);
|
|
2795
2885
|
return t ? y(e, t) : null;
|
|
2796
2886
|
}
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(vi, {}), /* @__PURE__ */ g(gi, {})] });
|
|
2887
|
+
// src/components/modal_provider/modal_provider.tsx
|
|
2888
|
+
function Zi() {
|
|
2889
|
+
return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(Yi, {}), /* @__PURE__ */ g(qi, {})] });
|
|
2801
2890
|
}
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
function Si(e, t, n, r) {
|
|
2891
|
+
// src/components/multi_combobox/multi_combobox.tsx
|
|
2892
|
+
var Qi = 2;
|
|
2893
|
+
function $i(e, t, n, r) {
|
|
2806
2894
|
return r?.(e, t) ? !0 : n === void 0 || t.includes(e) ? !1 : t.length >= n;
|
|
2807
2895
|
}
|
|
2808
|
-
function
|
|
2896
|
+
function ea(e, t) {
|
|
2809
2897
|
return e.includes(t) ? e.filter((e) => e !== t) : [...e, t];
|
|
2810
2898
|
}
|
|
2811
|
-
function
|
|
2899
|
+
function ta(e, t) {
|
|
2812
2900
|
if (e.length <= t) return {
|
|
2813
2901
|
visibleOptions: e,
|
|
2814
2902
|
hiddenCount: 0
|
|
@@ -2819,59 +2907,51 @@ function wi(e, t) {
|
|
|
2819
2907
|
hiddenCount: e.length - n
|
|
2820
2908
|
};
|
|
2821
2909
|
}
|
|
2822
|
-
var
|
|
2823
|
-
function
|
|
2824
|
-
let R =
|
|
2910
|
+
var na = "inline-flex items-center rounded-full bg-gray-200 dark:bg-gray-700 px-2 py-0.5 text-xs text-gray-900 dark:text-gray-100";
|
|
2911
|
+
function ra({ options: e, label: t, "aria-label": n, error: r, placeholder: i, searchPlaceholder: a, noResultsText: s, clearLabel: l, clearText: u, maxSelectedValues: m, isOptionDisabled: v, maxDisplayedValues: y = Qi, formatOverflowCount: b, formatSelectedCount: S, formatMaxSelectedHint: C, radius: w = "sm", unstyled: T = !1, disabled: E = !1, required: D = !1, className: k, wrapperClassName: A, values: N, defaultValues: P = [], onChange: F, onDropdownClose: I, id: L }) {
|
|
2912
|
+
let R = Ae(), { fieldId: z, errorId: ee, labelId: te } = J(L), B = `${z}-listbox`, V = `${z}-max-hint`, ne = f(null), H = f(null), re = f(null), [U, W] = Ce(N, P), [ie, ae] = p(""), [G, oe] = p(!1), K = d(() => {
|
|
2825
2913
|
let t = ie.trim().toLowerCase();
|
|
2826
2914
|
return t ? e.filter((e) => e.label.toLowerCase().includes(t)) : e;
|
|
2827
|
-
}, [e, ie]), { activeIndex: se, activeOptionId:
|
|
2915
|
+
}, [e, ie]), { activeIndex: se, activeOptionId: ce, move: le, first: ue, last: de, reset: pe } = Re({
|
|
2828
2916
|
optionCount: K.length,
|
|
2829
2917
|
getOptionId: (e) => `${B}-option-${e}`,
|
|
2830
2918
|
isOpen: G
|
|
2831
|
-
}),
|
|
2832
|
-
|
|
2833
|
-
},
|
|
2834
|
-
oe(!1), ae(""),
|
|
2919
|
+
}), me = d(() => e.filter((e) => U.includes(e.value)), [e, U]), { visibleOptions: he, hiddenCount: ge } = ta(me, y), _e = () => {
|
|
2920
|
+
E || oe(!0);
|
|
2921
|
+
}, ve = o(() => {
|
|
2922
|
+
oe(!1), ae(""), pe(), I?.(U);
|
|
2835
2923
|
}, [
|
|
2836
|
-
|
|
2924
|
+
pe,
|
|
2837
2925
|
I,
|
|
2838
2926
|
U
|
|
2839
|
-
]),
|
|
2840
|
-
G ?
|
|
2841
|
-
},
|
|
2842
|
-
if (
|
|
2843
|
-
let t =
|
|
2927
|
+
]), ye = () => {
|
|
2928
|
+
G ? ve() : _e();
|
|
2929
|
+
}, be = (e) => {
|
|
2930
|
+
if ($i(e, U, m, v)) return;
|
|
2931
|
+
let t = ea(U, e);
|
|
2844
2932
|
W(t), F?.(t);
|
|
2845
|
-
},
|
|
2933
|
+
}, q = () => {
|
|
2846
2934
|
W([]), F?.([]);
|
|
2847
2935
|
}, xe = (e) => {
|
|
2848
|
-
e.stopPropagation(),
|
|
2936
|
+
e.stopPropagation(), q(), G || I?.([]), ne.current?.focus();
|
|
2849
2937
|
}, Se = () => {
|
|
2850
|
-
|
|
2851
|
-
},
|
|
2852
|
-
|
|
2938
|
+
q(), re.current?.focus();
|
|
2939
|
+
}, we = () => {
|
|
2940
|
+
E || ye();
|
|
2853
2941
|
}, Te = (e) => {
|
|
2854
|
-
ae(e.target.value),
|
|
2942
|
+
ae(e.target.value), pe();
|
|
2855
2943
|
}, Ee = (e) => {
|
|
2856
|
-
|
|
2857
|
-
J(), ue();
|
|
2858
|
-
return;
|
|
2859
|
-
}
|
|
2860
|
-
ce(1);
|
|
2944
|
+
e.preventDefault(), G ? le(1) : (_e(), ue());
|
|
2861
2945
|
}, De = (e) => {
|
|
2862
|
-
|
|
2863
|
-
J(), de();
|
|
2864
|
-
return;
|
|
2865
|
-
}
|
|
2866
|
-
ce(-1);
|
|
2946
|
+
e.preventDefault(), G ? le(-1) : (_e(), de());
|
|
2867
2947
|
}, Oe = (e) => {
|
|
2868
2948
|
if (!G) return;
|
|
2869
2949
|
e.preventDefault();
|
|
2870
2950
|
let t = K[se];
|
|
2871
|
-
t &&
|
|
2951
|
+
t && be(t.value);
|
|
2872
2952
|
}, ke = (e) => {
|
|
2873
|
-
G && (e.preventDefault(),
|
|
2874
|
-
},
|
|
2953
|
+
G && (e.preventDefault(), ve(), ne.current?.focus());
|
|
2954
|
+
}, je = (e) => {
|
|
2875
2955
|
if (e.key === "ArrowDown") return Ee(e);
|
|
2876
2956
|
if (e.key === "ArrowUp") return De(e);
|
|
2877
2957
|
if (e.key === "Enter") return Oe(e);
|
|
@@ -2880,23 +2960,23 @@ function Ei({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
|
|
|
2880
2960
|
return c(() => {
|
|
2881
2961
|
if (!G) return;
|
|
2882
2962
|
let e = (e) => {
|
|
2883
|
-
H.current && !H.current.contains(e.target) &&
|
|
2963
|
+
H.current && !H.current.contains(e.target) && ve();
|
|
2884
2964
|
};
|
|
2885
2965
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
2886
|
-
}, [G,
|
|
2966
|
+
}, [G, ve]), /* @__PURE__ */ g(Fe, {
|
|
2887
2967
|
fieldId: z,
|
|
2888
2968
|
errorId: ee,
|
|
2889
2969
|
label: t,
|
|
2890
2970
|
error: r,
|
|
2891
|
-
required:
|
|
2892
|
-
wrapperClassName:
|
|
2971
|
+
required: D,
|
|
2972
|
+
wrapperClassName: A,
|
|
2893
2973
|
children: /* @__PURE__ */ _("div", {
|
|
2894
2974
|
ref: H,
|
|
2895
2975
|
className: "relative",
|
|
2896
2976
|
onBlur: (e) => {
|
|
2897
2977
|
if (!G) return;
|
|
2898
2978
|
let t = e.relatedTarget;
|
|
2899
|
-
t instanceof Node && H.current?.contains(t) ||
|
|
2979
|
+
t instanceof Node && H.current?.contains(t) || ve();
|
|
2900
2980
|
},
|
|
2901
2981
|
children: [
|
|
2902
2982
|
/* @__PURE__ */ g("button", {
|
|
@@ -2904,39 +2984,39 @@ function Ei({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
|
|
|
2904
2984
|
type: "button",
|
|
2905
2985
|
id: z,
|
|
2906
2986
|
role: "combobox",
|
|
2907
|
-
disabled:
|
|
2987
|
+
disabled: E,
|
|
2908
2988
|
"aria-expanded": G,
|
|
2909
2989
|
"aria-controls": B,
|
|
2910
2990
|
"aria-haspopup": "listbox",
|
|
2911
2991
|
"aria-invalid": !!r,
|
|
2912
|
-
"aria-required":
|
|
2992
|
+
"aria-required": D || void 0,
|
|
2913
2993
|
"aria-describedby": r ? ee : void 0,
|
|
2914
2994
|
"aria-labelledby": typeof t == "string" ? te : void 0,
|
|
2915
2995
|
"aria-label": n,
|
|
2916
|
-
onClick:
|
|
2917
|
-
onKeyDown:
|
|
2918
|
-
className: x("w-full flex flex-wrap items-center gap-1 text-left disabled:opacity-50 disabled:cursor-not-allowed", !
|
|
2919
|
-
|
|
2920
|
-
|
|
2996
|
+
onClick: we,
|
|
2997
|
+
onKeyDown: je,
|
|
2998
|
+
className: x("w-full flex flex-wrap items-center gap-1 text-left disabled:opacity-50 disabled:cursor-not-allowed", !T && [
|
|
2999
|
+
fe,
|
|
3000
|
+
j[w],
|
|
2921
3001
|
"pl-3 pr-8 py-2 text-sm min-h-10"
|
|
2922
|
-
], !
|
|
2923
|
-
children:
|
|
2924
|
-
className: x(!
|
|
3002
|
+
], !T && r && x("border-red-500 dark:border-red-400", "focus:ring-red-500"), k),
|
|
3003
|
+
children: me.length === 0 ? /* @__PURE__ */ g("span", {
|
|
3004
|
+
className: x(!T && "text-gray-500 dark:text-gray-400"),
|
|
2925
3005
|
children: i
|
|
2926
|
-
}) : /* @__PURE__ */ _(h, { children: [
|
|
2927
|
-
className: x(!
|
|
3006
|
+
}) : /* @__PURE__ */ _(h, { children: [he.map((e) => /* @__PURE__ */ g("span", {
|
|
3007
|
+
className: x(!T && na),
|
|
2928
3008
|
children: e.label
|
|
2929
|
-
}, e.value)),
|
|
2930
|
-
className: x(!
|
|
2931
|
-
children: (b ?? R.overflowCount)(
|
|
3009
|
+
}, e.value)), ge > 0 && /* @__PURE__ */ g("span", {
|
|
3010
|
+
className: x(!T && na),
|
|
3011
|
+
children: (b ?? R.overflowCount)(ge)
|
|
2932
3012
|
})] })
|
|
2933
3013
|
}),
|
|
2934
|
-
!
|
|
3014
|
+
!T && U.length > 0 && !E && /* @__PURE__ */ g("button", {
|
|
2935
3015
|
type: "button",
|
|
2936
3016
|
"aria-label": l ?? R.clearSelection,
|
|
2937
3017
|
onMouseDown: (e) => e.preventDefault(),
|
|
2938
3018
|
onClick: xe,
|
|
2939
|
-
className: x("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
3019
|
+
className: x("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", O.primary.focusOutline),
|
|
2940
3020
|
children: /* @__PURE__ */ g("span", {
|
|
2941
3021
|
className: "i-mdi-close block w-4 h-4",
|
|
2942
3022
|
"aria-hidden": !0
|
|
@@ -2946,11 +3026,11 @@ function Ei({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
|
|
|
2946
3026
|
onMouseDown: (e) => {
|
|
2947
3027
|
e.target !== re.current && e.preventDefault();
|
|
2948
3028
|
},
|
|
2949
|
-
className: x("absolute z-10 mt-1 w-full text-sm shadow-lg", !
|
|
3029
|
+
className: x("absolute z-10 mt-1 w-full text-sm shadow-lg", !T && [
|
|
2950
3030
|
"border overflow-hidden",
|
|
2951
3031
|
"bg-white dark:bg-gray-900",
|
|
2952
3032
|
"border-gray-100 dark:border-gray-800",
|
|
2953
|
-
|
|
3033
|
+
M[w]
|
|
2954
3034
|
]),
|
|
2955
3035
|
children: [
|
|
2956
3036
|
/* @__PURE__ */ g("input", {
|
|
@@ -2960,13 +3040,13 @@ function Ei({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
|
|
|
2960
3040
|
autoComplete: "off",
|
|
2961
3041
|
value: ie,
|
|
2962
3042
|
onChange: Te,
|
|
2963
|
-
onKeyDown:
|
|
3043
|
+
onKeyDown: je,
|
|
2964
3044
|
placeholder: a ?? R.search,
|
|
2965
3045
|
"aria-label": a ?? R.search,
|
|
2966
3046
|
"aria-controls": B,
|
|
2967
|
-
"aria-activedescendant":
|
|
3047
|
+
"aria-activedescendant": ce,
|
|
2968
3048
|
"aria-describedby": m === void 0 ? void 0 : V,
|
|
2969
|
-
className: x("w-full", !
|
|
3049
|
+
className: x("w-full", !T && [
|
|
2970
3050
|
"px-3 py-2 border-b bg-transparent focus:outline-none",
|
|
2971
3051
|
"text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400",
|
|
2972
3052
|
"border-gray-100 dark:border-gray-800"
|
|
@@ -2974,28 +3054,28 @@ function Ei({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
|
|
|
2974
3054
|
}),
|
|
2975
3055
|
m !== void 0 && /* @__PURE__ */ g("div", {
|
|
2976
3056
|
id: V,
|
|
2977
|
-
className: x("px-3 py-1 text-xs", !
|
|
2978
|
-
children: (
|
|
3057
|
+
className: x("px-3 py-1 text-xs", !T && ["border-b", "border-gray-100 dark:border-gray-800"], !T && "text-gray-500 dark:text-gray-400"),
|
|
3058
|
+
children: (C ?? R.maxSelectedHint)(m)
|
|
2979
3059
|
}),
|
|
2980
3060
|
/* @__PURE__ */ g("ul", {
|
|
2981
3061
|
id: B,
|
|
2982
3062
|
role: "listbox",
|
|
2983
3063
|
"aria-multiselectable": !0,
|
|
2984
|
-
className: "max-h-60 overflow-auto py-1",
|
|
3064
|
+
className: x("max-h-60 overflow-auto py-1", "[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]"),
|
|
2985
3065
|
children: K.map((e, t) => {
|
|
2986
|
-
let n = U.includes(e.value), r =
|
|
3066
|
+
let n = U.includes(e.value), r = $i(e.value, U, m, v);
|
|
2987
3067
|
return /* @__PURE__ */ _("li", {
|
|
2988
3068
|
id: `${B}-option-${t}`,
|
|
2989
3069
|
role: "option",
|
|
2990
3070
|
"aria-selected": n,
|
|
2991
3071
|
"aria-disabled": r,
|
|
2992
|
-
onClick: () =>
|
|
3072
|
+
onClick: () => be(e.value),
|
|
2993
3073
|
className: x("px-3 py-2 flex items-center gap-2 text-gray-900 dark:text-gray-100", r ? "opacity-50 cursor-not-allowed" : "cursor-pointer", t === se ? x("bg-blue-50 dark:bg-blue-900/40", "outline-2 -outline-offset-2 outline-blue-500 dark:outline-blue-400") : !r && "hover:bg-gray-50 dark:hover:bg-gray-800/60"),
|
|
2994
3074
|
children: [/* @__PURE__ */ g("span", {
|
|
2995
3075
|
"aria-hidden": !0,
|
|
2996
|
-
className: x("flex h-4 w-4 shrink-0 items-center justify-center", !
|
|
3076
|
+
className: x("flex h-4 w-4 shrink-0 items-center justify-center", !T && [
|
|
2997
3077
|
"border-2",
|
|
2998
|
-
|
|
3078
|
+
j[w],
|
|
2999
3079
|
n ? x("border-blue-600 dark:border-blue-500", "bg-blue-600 dark:bg-blue-500") : x("border-gray-300 dark:border-gray-600", "bg-white dark:bg-gray-800")
|
|
3000
3080
|
]),
|
|
3001
3081
|
children: n && /* @__PURE__ */ g("svg", {
|
|
@@ -3018,10 +3098,10 @@ function Ei({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
|
|
|
3018
3098
|
children: K.length === 0 ? s ?? R.noResults : ""
|
|
3019
3099
|
}),
|
|
3020
3100
|
m !== void 0 && /* @__PURE__ */ _("div", {
|
|
3021
|
-
className: x("flex items-center justify-between px-3 py-2", !
|
|
3101
|
+
className: x("flex items-center justify-between px-3 py-2", !T && ["border-t", "border-gray-100 dark:border-gray-800"]),
|
|
3022
3102
|
children: [/* @__PURE__ */ g("span", {
|
|
3023
3103
|
className: "text-xs text-gray-500 dark:text-gray-400",
|
|
3024
|
-
children: (
|
|
3104
|
+
children: (S ?? R.selectedCount)(U.length)
|
|
3025
3105
|
}), /* @__PURE__ */ g("button", {
|
|
3026
3106
|
type: "button",
|
|
3027
3107
|
disabled: U.length === 0,
|
|
@@ -3036,11 +3116,10 @@ function Ei({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
|
|
|
3036
3116
|
})
|
|
3037
3117
|
});
|
|
3038
3118
|
}
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
function Di({ option: e, optionId: t, descriptionId: n, name: r, orientation: i, isSelected: a, isDisabled: o, isFirstOption: s, required: c, error: l, radius: u, unstyled: d, className: f, onSelect: p }) {
|
|
3119
|
+
// src/components/radio_options/radio_option_row.tsx
|
|
3120
|
+
function ia({ option: e, optionId: t, descriptionId: n, name: r, orientation: i, isSelected: a, isDisabled: o, isFirstOption: s, required: c, error: l, radius: u, unstyled: d, className: f, onSelect: p }) {
|
|
3042
3121
|
let m = !!l;
|
|
3043
|
-
return /* @__PURE__ */ g(
|
|
3122
|
+
return /* @__PURE__ */ g(De, {
|
|
3044
3123
|
item: e,
|
|
3045
3124
|
htmlFor: t,
|
|
3046
3125
|
descriptionId: n,
|
|
@@ -3060,12 +3139,11 @@ function Di({ option: e, optionId: t, descriptionId: n, name: r, orientation: i,
|
|
|
3060
3139
|
onChange: () => p(e.value),
|
|
3061
3140
|
disabled: o,
|
|
3062
3141
|
required: c && s,
|
|
3063
|
-
"aria-invalid": l ? !0 : void 0,
|
|
3064
3142
|
"aria-describedby": e.description ? n : void 0,
|
|
3065
3143
|
className: "sr-only"
|
|
3066
3144
|
}),
|
|
3067
3145
|
indicator: /* @__PURE__ */ g("span", {
|
|
3068
|
-
className: x("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors duration-150",
|
|
3146
|
+
className: x("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors duration-150", Se({
|
|
3069
3147
|
isSelected: a,
|
|
3070
3148
|
isError: m
|
|
3071
3149
|
})),
|
|
@@ -3074,10 +3152,9 @@ function Di({ option: e, optionId: t, descriptionId: n, name: r, orientation: i,
|
|
|
3074
3152
|
})
|
|
3075
3153
|
});
|
|
3076
3154
|
}
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
let { fieldId: y, errorId: b } = Y(m), S = a ?? y, [C, w] = be(n, r ?? ""), T = e.map((e) => typeof e == "string" ? {
|
|
3155
|
+
// src/components/radio_options/radio_options.tsx
|
|
3156
|
+
function aa({ options: e, orientation: t = "vertical", value: n, defaultValue: r, onChange: i, name: a, label: o, error: s, required: c, disabled: l, radius: u = "lg", unstyled: d = !1, className: f, wrapperClassName: p, id: m, "aria-describedby": h, ...v }) {
|
|
3157
|
+
let { fieldId: y, errorId: b } = J(m), S = a ?? y, [C, w] = Ce(n, r ?? ""), T = e.map((e) => typeof e == "string" ? {
|
|
3081
3158
|
value: e,
|
|
3082
3159
|
label: e
|
|
3083
3160
|
} : e), E = (e) => {
|
|
@@ -3085,7 +3162,9 @@ function Oi({ options: e, orientation: t = "vertical", value: n, defaultValue: r
|
|
|
3085
3162
|
};
|
|
3086
3163
|
return /* @__PURE__ */ _("fieldset", {
|
|
3087
3164
|
className: x("m-0 border-0 p-0", p),
|
|
3165
|
+
role: "radiogroup",
|
|
3088
3166
|
disabled: l,
|
|
3167
|
+
"aria-invalid": s ? !0 : void 0,
|
|
3089
3168
|
"aria-describedby": q(h, s && b),
|
|
3090
3169
|
...v,
|
|
3091
3170
|
children: [
|
|
@@ -3098,7 +3177,7 @@ function Oi({ options: e, orientation: t = "vertical", value: n, defaultValue: r
|
|
|
3098
3177
|
}),
|
|
3099
3178
|
/* @__PURE__ */ g("div", {
|
|
3100
3179
|
className: x(t === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
|
|
3101
|
-
children: T.map((e, n) => /* @__PURE__ */ g(
|
|
3180
|
+
children: T.map((e, n) => /* @__PURE__ */ g(ia, {
|
|
3102
3181
|
option: e,
|
|
3103
3182
|
optionId: `${y}-${n}`,
|
|
3104
3183
|
descriptionId: `${y}-${n}-desc`,
|
|
@@ -3115,7 +3194,7 @@ function Oi({ options: e, orientation: t = "vertical", value: n, defaultValue: r
|
|
|
3115
3194
|
onSelect: E
|
|
3116
3195
|
}, e.value))
|
|
3117
3196
|
}),
|
|
3118
|
-
/* @__PURE__ */ g(
|
|
3197
|
+
/* @__PURE__ */ g(be, {
|
|
3119
3198
|
id: b,
|
|
3120
3199
|
error: s,
|
|
3121
3200
|
className: "mt-2"
|
|
@@ -3123,11 +3202,10 @@ function Oi({ options: e, orientation: t = "vertical", value: n, defaultValue: r
|
|
|
3123
3202
|
]
|
|
3124
3203
|
});
|
|
3125
3204
|
}
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
return /* @__PURE__ */ g(je, {
|
|
3205
|
+
// src/components/select/select.tsx
|
|
3206
|
+
function oa({ options: e, label: t, description: n, error: r, placeholder: i, radius: a = "md", unstyled: o = !1, className: s, wrapperClassName: c, value: l, defaultValue: u, onChange: d, id: f, "aria-describedby": p, ...m }) {
|
|
3207
|
+
let { fieldId: h, errorId: v, descriptionId: y } = J(f);
|
|
3208
|
+
return /* @__PURE__ */ g(Fe, {
|
|
3131
3209
|
fieldId: h,
|
|
3132
3210
|
errorId: v,
|
|
3133
3211
|
descriptionId: y,
|
|
@@ -3139,8 +3217,8 @@ function ki({ options: e, label: t, description: n, error: r, placeholder: i, ra
|
|
|
3139
3217
|
children: /* @__PURE__ */ _("select", {
|
|
3140
3218
|
id: h,
|
|
3141
3219
|
className: x("w-full disabled:opacity-50 disabled:cursor-not-allowed", !o && [
|
|
3142
|
-
|
|
3143
|
-
|
|
3220
|
+
fe,
|
|
3221
|
+
j[a],
|
|
3144
3222
|
"pl-3 pr-8 py-2 text-sm appearance-none bg-[length:1rem_1rem] bg-[position:right_0.5rem_center] bg-no-repeat",
|
|
3145
3223
|
"bg-[url(\"data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 20 20%27%3e%3cpath stroke=%27%236b7280%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.5%27 d=%27M6 8l4 4 4-4%27/%3e%3c/svg%3e\")]"
|
|
3146
3224
|
], !o && r && x("border-red-500 dark:border-red-400", "focus:ring-red-500"), s),
|
|
@@ -3159,10 +3237,9 @@ function ki({ options: e, label: t, description: n, error: r, placeholder: i, ra
|
|
|
3159
3237
|
})
|
|
3160
3238
|
});
|
|
3161
3239
|
}
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
let { fieldId: p, errorId: m, descriptionId: v } = Y(u), [y, b] = be(s, c), S = q(d, !!t && v, n && m);
|
|
3240
|
+
// src/components/switch/switch.tsx
|
|
3241
|
+
function sa({ label: e, description: t, error: n, unstyled: r = !1, fullWidth: i = !1, className: a, wrapperClassName: o, checked: s, defaultChecked: c = !1, onChange: l, id: u, "aria-describedby": d, ...f }) {
|
|
3242
|
+
let { fieldId: p, errorId: m, descriptionId: v } = J(u), [y, b] = Ce(s, c), S = q(d, !!t && v, n && m);
|
|
3166
3243
|
return /* @__PURE__ */ _("div", {
|
|
3167
3244
|
className: x(i ? "w-full" : "w-fit", o),
|
|
3168
3245
|
children: [
|
|
@@ -3170,7 +3247,7 @@ function Ai({ label: e, description: t, error: n, unstyled: r = !1, fullWidth: i
|
|
|
3170
3247
|
htmlFor: p,
|
|
3171
3248
|
className: x("flex items-center gap-3 cursor-pointer", f.disabled && "cursor-not-allowed opacity-50"),
|
|
3172
3249
|
children: [/* @__PURE__ */ _("span", {
|
|
3173
|
-
className: x("relative inline-flex w-11 shrink-0", "transition-colors duration-200 ease-in-out",
|
|
3250
|
+
className: x("relative inline-flex w-11 shrink-0", "transition-colors duration-200 ease-in-out", w, T, !r && [
|
|
3174
3251
|
"rounded-full border-2 border-transparent",
|
|
3175
3252
|
y ? "bg-blue-600 dark:bg-blue-500" : "bg-gray-200 dark:bg-gray-600",
|
|
3176
3253
|
n && "ring-2 ring-red-500 dark:ring-red-400"
|
|
@@ -3207,7 +3284,7 @@ function Ai({ label: e, description: t, error: n, unstyled: r = !1, fullWidth: i
|
|
|
3207
3284
|
description: t,
|
|
3208
3285
|
className: "mt-1 ml-14"
|
|
3209
3286
|
}),
|
|
3210
|
-
/* @__PURE__ */ g(
|
|
3287
|
+
/* @__PURE__ */ g(be, {
|
|
3211
3288
|
id: m,
|
|
3212
3289
|
error: n,
|
|
3213
3290
|
className: "mt-1 ml-14"
|
|
@@ -3215,233 +3292,299 @@ function Ai({ label: e, description: t, error: n, unstyled: r = !1, fullWidth: i
|
|
|
3215
3292
|
]
|
|
3216
3293
|
});
|
|
3217
3294
|
}
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3295
|
+
// src/components/tabs/tabs_styles.ts
|
|
3296
|
+
var ca = {
|
|
3297
|
+
list: "gap-1 p-1 bg-gray-100 dark:bg-gray-800/50",
|
|
3298
|
+
tab: "",
|
|
3299
|
+
indicator: `absolute inset-0 ${H} border border-gray-200 dark:border-gray-700`
|
|
3300
|
+
}, la = {
|
|
3221
3301
|
line: {
|
|
3222
|
-
list: `gap-1 border-b ${ne}`,
|
|
3223
|
-
tab: "-mb-px border-b-2",
|
|
3224
3302
|
activeTab: "border-transparent text-gray-900 dark:text-gray-100",
|
|
3225
3303
|
idleTab: "border-transparent text-gray-500 dark:text-gray-400",
|
|
3226
3304
|
idleHover: "hover:text-gray-900 hover:border-gray-300 dark:hover:text-gray-100 dark:hover:border-gray-600",
|
|
3227
|
-
|
|
3305
|
+
byOrientation: {
|
|
3306
|
+
horizontal: {
|
|
3307
|
+
list: `gap-1 border-b ${re}`,
|
|
3308
|
+
tab: "-mb-px border-b-2",
|
|
3309
|
+
indicator: "absolute inset-x-0 -bottom-0.5 h-0.5 bg-blue-600 dark:bg-blue-400"
|
|
3310
|
+
},
|
|
3311
|
+
vertical: {
|
|
3312
|
+
list: `gap-1 border-r ${re}`,
|
|
3313
|
+
tab: "border-r-2",
|
|
3314
|
+
indicator: "absolute inset-y-0 -right-0.5 w-0.5 bg-blue-600 dark:bg-blue-400"
|
|
3315
|
+
}
|
|
3316
|
+
}
|
|
3228
3317
|
},
|
|
3229
3318
|
segmented: {
|
|
3230
|
-
list: "gap-1 p-1 bg-gray-100 dark:bg-gray-800/50",
|
|
3231
|
-
tab: "",
|
|
3232
3319
|
activeTab: "text-gray-900 dark:text-gray-100",
|
|
3233
3320
|
idleTab: "text-gray-600 dark:text-gray-400",
|
|
3234
3321
|
idleHover: "hover:text-gray-900 dark:hover:text-gray-100",
|
|
3235
|
-
|
|
3322
|
+
byOrientation: {
|
|
3323
|
+
horizontal: ca,
|
|
3324
|
+
vertical: ca
|
|
3325
|
+
}
|
|
3236
3326
|
}
|
|
3237
|
-
},
|
|
3327
|
+
}, ua = {
|
|
3238
3328
|
xs: "px-2 py-1 text-xs",
|
|
3239
3329
|
sm: "px-3 py-1.5 text-sm",
|
|
3240
3330
|
md: "px-4 py-2.5 text-sm",
|
|
3241
3331
|
lg: "px-5 py-3 text-base"
|
|
3242
|
-
},
|
|
3332
|
+
}, da = {
|
|
3243
3333
|
xs: "w-3.5 h-3.5",
|
|
3244
3334
|
sm: "w-4 h-4",
|
|
3245
3335
|
md: "w-4 h-4",
|
|
3246
3336
|
lg: "w-5 h-5"
|
|
3247
|
-
},
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3337
|
+
}, fa = {
|
|
3338
|
+
horizontal: x(S, O.primary.focusOutline),
|
|
3339
|
+
vertical: x("outline-hidden focus-visible:outline-2", "focus-visible:-outline-offset-2", O.primary.focusOutline)
|
|
3340
|
+
}, pa = "items-center", ma = x("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", ae), ha = "w-48 shrink-0", ga = "justify-start text-left whitespace-normal", _a = "whitespace-nowrap", va = "flex min-h-0", ya = x("flex-1 min-w-0 min-h-0 overflow-y-auto", ae), ba = "ml-6", xa = "mt-4";
|
|
3341
|
+
function Sa(e, t) {
|
|
3342
|
+
return x("w-full", e === "vertical" && va, t);
|
|
3343
|
+
}
|
|
3344
|
+
function Ca(e) {
|
|
3345
|
+
let { orientation: t, unstyled: n, className: r } = e, i = t === "vertical";
|
|
3346
|
+
return x(i && ya, !n && [i ? ba : xa, fa[t]], r);
|
|
3347
|
+
}
|
|
3348
|
+
function wa(e) {
|
|
3349
|
+
let { variant: t, orientation: n, radius: r, unstyled: i, isFullWidth: a, className: o } = e, s = n === "vertical";
|
|
3350
|
+
return x("flex", s ? ma : pa, !s && a && "w-full", !i && s && ha, !i && la[t].byOrientation[n].list, !i && t === "segmented" && j[r], o);
|
|
3351
|
+
}
|
|
3352
|
+
function Ta(e) {
|
|
3353
|
+
let { variant: t, orientation: n, size: r, radius: i, unstyled: a, isActive: o, isDisabled: s, isFullWidth: c, className: l } = e, u = n === "vertical", d = la[t];
|
|
3354
|
+
return x("relative flex items-center gap-2", u ? ga : _a, !u && c && "flex-1 justify-center", s ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !a && [
|
|
3255
3355
|
"font-medium transition-colors duration-200",
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
t === "segmented" &&
|
|
3260
|
-
|
|
3261
|
-
],
|
|
3262
|
-
}
|
|
3263
|
-
function
|
|
3264
|
-
let { variant: t,
|
|
3265
|
-
return x("tabs-indicator pointer-events-none",
|
|
3266
|
-
}
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
let m = !!e.disabled;
|
|
3356
|
+
ua[r],
|
|
3357
|
+
d.byOrientation[n].tab,
|
|
3358
|
+
o ? d.activeTab : [d.idleTab, !s && d.idleHover],
|
|
3359
|
+
t === "segmented" && j[i],
|
|
3360
|
+
fa[n]
|
|
3361
|
+
], l);
|
|
3362
|
+
}
|
|
3363
|
+
function Ea(e) {
|
|
3364
|
+
let { variant: t, orientation: n, radius: r } = e;
|
|
3365
|
+
return x("tabs-indicator pointer-events-none", la[t].byOrientation[n].indicator, t === "segmented" && j[r]);
|
|
3366
|
+
}
|
|
3367
|
+
// src/components/tabs/tab_button.tsx
|
|
3368
|
+
function Da({ item: e, isActive: t, hasMountedPanel: n, isTabStop: r, isFullWidth: i, variant: a, orientation: o, size: s, radius: c, unstyled: l, tabId: u, panelId: d, onSelect: f, onKeyDown: p, ref: m, indicatorRef: v }) {
|
|
3369
|
+
let y = !!e.disabled;
|
|
3271
3370
|
return /* @__PURE__ */ _("button", {
|
|
3272
|
-
ref:
|
|
3273
|
-
id:
|
|
3371
|
+
ref: m,
|
|
3372
|
+
id: u,
|
|
3274
3373
|
role: "tab",
|
|
3275
3374
|
type: "button",
|
|
3276
3375
|
"aria-selected": t,
|
|
3277
3376
|
"aria-disabled": e.disabled,
|
|
3278
|
-
"aria-controls":
|
|
3279
|
-
tabIndex:
|
|
3377
|
+
"aria-controls": n ? d : void 0,
|
|
3378
|
+
tabIndex: r ? 0 : -1,
|
|
3280
3379
|
disabled: e.disabled,
|
|
3281
|
-
onClick:
|
|
3282
|
-
onKeyDown:
|
|
3283
|
-
className:
|
|
3284
|
-
variant:
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3380
|
+
onClick: f,
|
|
3381
|
+
onKeyDown: p,
|
|
3382
|
+
className: Ta({
|
|
3383
|
+
variant: a,
|
|
3384
|
+
orientation: o,
|
|
3385
|
+
size: s,
|
|
3386
|
+
radius: c,
|
|
3387
|
+
unstyled: l,
|
|
3288
3388
|
isActive: t,
|
|
3289
|
-
isDisabled:
|
|
3290
|
-
isFullWidth:
|
|
3389
|
+
isDisabled: y,
|
|
3390
|
+
isFullWidth: i
|
|
3291
3391
|
}),
|
|
3292
3392
|
children: [
|
|
3293
|
-
t && !
|
|
3294
|
-
ref:
|
|
3393
|
+
t && !l && /* @__PURE__ */ g("span", {
|
|
3394
|
+
ref: v,
|
|
3295
3395
|
"aria-hidden": "true",
|
|
3296
|
-
className:
|
|
3297
|
-
variant:
|
|
3298
|
-
|
|
3396
|
+
className: Ea({
|
|
3397
|
+
variant: a,
|
|
3398
|
+
orientation: o,
|
|
3399
|
+
radius: c
|
|
3299
3400
|
})
|
|
3300
3401
|
}),
|
|
3301
3402
|
e.icon && /* @__PURE__ */ g("span", {
|
|
3302
3403
|
"aria-hidden": "true",
|
|
3303
|
-
className: x("relative shrink-0",
|
|
3404
|
+
className: x("relative shrink-0", da[s], e.icon)
|
|
3304
3405
|
}),
|
|
3305
3406
|
/* @__PURE__ */ g("span", {
|
|
3306
3407
|
className: "relative",
|
|
3307
3408
|
children: e.title
|
|
3308
|
-
})
|
|
3409
|
+
}),
|
|
3410
|
+
e.badge ? /* @__PURE__ */ _(h, { children: [" ", e.badge] }) : null
|
|
3309
3411
|
]
|
|
3310
3412
|
});
|
|
3311
3413
|
}
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3414
|
+
// src/components/tabs/tab_panel.tsx
|
|
3415
|
+
function Oa({ panelId: e, tabId: t, isHidden: n, isAnimated: r, className: i, contentKey: a, children: o }) {
|
|
3416
|
+
return /* @__PURE__ */ g("div", {
|
|
3417
|
+
role: "tabpanel",
|
|
3418
|
+
id: e,
|
|
3419
|
+
"aria-labelledby": t,
|
|
3420
|
+
tabIndex: 0,
|
|
3421
|
+
hidden: n,
|
|
3422
|
+
className: i,
|
|
3423
|
+
children: /* @__PURE__ */ g("div", {
|
|
3424
|
+
className: x(r && "tabs-panel-inner"),
|
|
3425
|
+
children: o
|
|
3426
|
+
}, a)
|
|
3427
|
+
});
|
|
3317
3428
|
}
|
|
3318
|
-
|
|
3319
|
-
|
|
3429
|
+
// src/components/tabs/use_tab_indicator_transition.ts
|
|
3430
|
+
var ka = 200, Aa = "ease-out", ja = "(prefers-reduced-motion: reduce)";
|
|
3431
|
+
function Ma() {
|
|
3432
|
+
return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(ja).matches;
|
|
3433
|
+
}
|
|
3434
|
+
function Na(e, t, n) {
|
|
3435
|
+
return e === "vertical" ? [{
|
|
3436
|
+
transform: `translateY(${t.top - n.top}px)`,
|
|
3437
|
+
height: `${t.height}px`
|
|
3438
|
+
}, {
|
|
3439
|
+
transform: "none",
|
|
3440
|
+
height: `${n.height}px`
|
|
3441
|
+
}] : [{
|
|
3320
3442
|
transform: `translateX(${t.left - n.left}px)`,
|
|
3321
3443
|
width: `${t.width}px`
|
|
3322
3444
|
}, {
|
|
3323
3445
|
transform: "none",
|
|
3324
3446
|
width: `${n.width}px`
|
|
3325
|
-
}]
|
|
3326
|
-
|
|
3327
|
-
|
|
3447
|
+
}];
|
|
3448
|
+
}
|
|
3449
|
+
function Pa(e, t, n, r) {
|
|
3450
|
+
e.animate(Na(t, n, r), {
|
|
3451
|
+
duration: ka,
|
|
3452
|
+
easing: Aa
|
|
3328
3453
|
});
|
|
3329
3454
|
}
|
|
3330
|
-
function
|
|
3331
|
-
return !e || !t || !n ? !1 : !
|
|
3455
|
+
function Fa(e, t, n) {
|
|
3456
|
+
return !e || !t || !n ? !1 : !Ma();
|
|
3332
3457
|
}
|
|
3333
|
-
function
|
|
3334
|
-
let { activeIndex: t, indicatorRef: n, isAnimated: r } = e,
|
|
3458
|
+
function Ia(e) {
|
|
3459
|
+
let { activeIndex: t, indicatorRef: n, isAnimated: r, orientation: i } = e, a = f(null);
|
|
3335
3460
|
u(() => {
|
|
3336
3461
|
let e = n.current;
|
|
3337
3462
|
if (!e) {
|
|
3338
|
-
|
|
3463
|
+
a.current = null;
|
|
3339
3464
|
return;
|
|
3340
3465
|
}
|
|
3341
|
-
let t = e.getBoundingClientRect(),
|
|
3342
|
-
|
|
3466
|
+
let t = e.getBoundingClientRect(), o = typeof e.animate == "function";
|
|
3467
|
+
Fa(a.current, r, o) && Pa(e, i, a.current, t), a.current = t;
|
|
3343
3468
|
}, [
|
|
3344
3469
|
t,
|
|
3345
3470
|
n,
|
|
3346
|
-
r
|
|
3471
|
+
r,
|
|
3472
|
+
i
|
|
3347
3473
|
]);
|
|
3348
3474
|
}
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
var Ki = {
|
|
3352
|
-
ArrowRight: (e, t) => (e + 1) % t,
|
|
3353
|
-
ArrowLeft: (e, t) => (e - 1 + t) % t,
|
|
3475
|
+
// src/components/tabs/use_tabs_keyboard_navigation.ts
|
|
3476
|
+
var La = {
|
|
3354
3477
|
Home: () => 0,
|
|
3355
3478
|
End: (e, t) => t - 1
|
|
3479
|
+
}, Ra = (e, t) => (e + 1) % t, za = (e, t) => (e - 1 + t) % t, Ba = {
|
|
3480
|
+
horizontal: {
|
|
3481
|
+
...La,
|
|
3482
|
+
ArrowRight: Ra,
|
|
3483
|
+
ArrowLeft: za
|
|
3484
|
+
},
|
|
3485
|
+
vertical: {
|
|
3486
|
+
...La,
|
|
3487
|
+
ArrowDown: Ra,
|
|
3488
|
+
ArrowUp: za
|
|
3489
|
+
}
|
|
3356
3490
|
};
|
|
3357
|
-
function
|
|
3491
|
+
function Va(e) {
|
|
3358
3492
|
return e.flatMap((e, t) => e.disabled ? [] : [t]);
|
|
3359
3493
|
}
|
|
3360
|
-
function
|
|
3494
|
+
function Ha(e, t) {
|
|
3361
3495
|
let n = e[t];
|
|
3362
|
-
return n && !n.disabled ? t :
|
|
3496
|
+
return n && !n.disabled ? t : Va(e)[0] ?? -1;
|
|
3363
3497
|
}
|
|
3364
|
-
function
|
|
3365
|
-
let { items: t, activeIndex: n,
|
|
3498
|
+
function Ua(e) {
|
|
3499
|
+
let { items: t, activeIndex: n, orientation: r, onNavigate: i } = e;
|
|
3366
3500
|
return (e) => {
|
|
3367
|
-
let
|
|
3368
|
-
if (!
|
|
3369
|
-
let
|
|
3370
|
-
if (
|
|
3501
|
+
let a = Ba[r][e.key];
|
|
3502
|
+
if (!a) return;
|
|
3503
|
+
let o = Va(t);
|
|
3504
|
+
if (o.length === 0) return;
|
|
3371
3505
|
e.preventDefault();
|
|
3372
|
-
let
|
|
3373
|
-
|
|
3506
|
+
let s = a(o.indexOf(n), o.length);
|
|
3507
|
+
i(o[s]);
|
|
3374
3508
|
};
|
|
3375
3509
|
}
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
}, T = Ji(e, h), E = Yi({
|
|
3510
|
+
// src/components/tabs/tabs.tsx
|
|
3511
|
+
function Wa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orientation: i = "horizontal", size: a = "md", radius: o = "md", fullWidth: s = !1, unstyled: c = !1, animated: u = !0, keepMounted: d = !1, className: p, tabListClassName: m, panelClassName: h, onChange: v }) {
|
|
3512
|
+
let [y, b] = Ce(t, n), x = l(), S = f([]), C = f(null), w = (t) => {
|
|
3513
|
+
e[t]?.disabled || (b(t), v?.(t));
|
|
3514
|
+
}, T = (e) => {
|
|
3515
|
+
S.current[e]?.focus(), w(e);
|
|
3516
|
+
}, E = Ha(e, y), D = Ua({
|
|
3384
3517
|
items: e,
|
|
3385
|
-
activeIndex:
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3518
|
+
activeIndex: E,
|
|
3519
|
+
orientation: i,
|
|
3520
|
+
onNavigate: T
|
|
3521
|
+
}), O = Ca({
|
|
3522
|
+
orientation: i,
|
|
3523
|
+
unstyled: c,
|
|
3524
|
+
className: h
|
|
3525
|
+
}), k = u && !c;
|
|
3526
|
+
return Ia({
|
|
3527
|
+
activeIndex: y,
|
|
3528
|
+
indicatorRef: C,
|
|
3529
|
+
isAnimated: u,
|
|
3530
|
+
orientation: i
|
|
3392
3531
|
}), /* @__PURE__ */ _("div", {
|
|
3393
|
-
className:
|
|
3532
|
+
className: Sa(i, p),
|
|
3394
3533
|
children: [/* @__PURE__ */ g("div", {
|
|
3395
3534
|
role: "tablist",
|
|
3396
|
-
|
|
3535
|
+
"aria-orientation": i,
|
|
3536
|
+
className: wa({
|
|
3397
3537
|
variant: r,
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3538
|
+
orientation: i,
|
|
3539
|
+
radius: o,
|
|
3540
|
+
unstyled: c,
|
|
3541
|
+
isFullWidth: s,
|
|
3542
|
+
className: m
|
|
3402
3543
|
}),
|
|
3403
|
-
children: e.map((e, t) => /* @__PURE__ */ g(
|
|
3544
|
+
children: e.map((e, t) => /* @__PURE__ */ g(Da, {
|
|
3404
3545
|
ref: (e) => {
|
|
3405
|
-
|
|
3546
|
+
S.current[t] = e;
|
|
3406
3547
|
},
|
|
3407
|
-
indicatorRef:
|
|
3548
|
+
indicatorRef: C,
|
|
3408
3549
|
item: e,
|
|
3409
|
-
isActive:
|
|
3410
|
-
|
|
3411
|
-
|
|
3550
|
+
isActive: y === t,
|
|
3551
|
+
hasMountedPanel: d || y === t,
|
|
3552
|
+
isTabStop: E === t,
|
|
3553
|
+
isFullWidth: s,
|
|
3412
3554
|
variant: r,
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3555
|
+
orientation: i,
|
|
3556
|
+
size: a,
|
|
3557
|
+
radius: o,
|
|
3558
|
+
unstyled: c,
|
|
3559
|
+
tabId: `${x}-tab-${t}`,
|
|
3560
|
+
panelId: `${x}-panel-${t}`,
|
|
3561
|
+
onSelect: () => w(t),
|
|
3562
|
+
onKeyDown: D
|
|
3420
3563
|
}, e.title))
|
|
3421
|
-
}), /* @__PURE__ */ g(
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
className:
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3564
|
+
}), d ? e.map((e, t) => /* @__PURE__ */ g(Oa, {
|
|
3565
|
+
panelId: `${x}-panel-${t}`,
|
|
3566
|
+
tabId: `${x}-tab-${t}`,
|
|
3567
|
+
isHidden: t !== y,
|
|
3568
|
+
isAnimated: k,
|
|
3569
|
+
className: O,
|
|
3570
|
+
children: e.content
|
|
3571
|
+
}, e.title)) : /* @__PURE__ */ g(Oa, {
|
|
3572
|
+
panelId: `${x}-panel-${y}`,
|
|
3573
|
+
tabId: `${x}-tab-${y}`,
|
|
3574
|
+
isHidden: !1,
|
|
3575
|
+
isAnimated: k,
|
|
3576
|
+
className: O,
|
|
3577
|
+
contentKey: y,
|
|
3578
|
+
children: e[y]?.content
|
|
3435
3579
|
})]
|
|
3436
3580
|
});
|
|
3437
3581
|
}
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
T(e.target.value), f?.(e);
|
|
3582
|
+
// src/components/textarea/textarea.tsx
|
|
3583
|
+
function Ga({ label: e, description: t, error: n, showCharCount: r = !1, minLength: i, maxLength: a, radius: o = "md", unstyled: s = !1, className: c, wrapperClassName: l, value: u, defaultValue: d, onChange: f, id: p, "aria-describedby": m, ...h }) {
|
|
3584
|
+
let { fieldId: v, errorId: y, descriptionId: b, characterCountId: S } = J(p), { length: C, trackLength: w } = gi(u, d), T = r && (i !== void 0 || a !== void 0), E = (e) => {
|
|
3585
|
+
w(e.target.value), f?.(e);
|
|
3443
3586
|
};
|
|
3444
|
-
return /* @__PURE__ */ _(
|
|
3587
|
+
return /* @__PURE__ */ _(Fe, {
|
|
3445
3588
|
fieldId: v,
|
|
3446
3589
|
errorId: y,
|
|
3447
3590
|
descriptionId: b,
|
|
@@ -3453,20 +3596,20 @@ function Zi({ label: e, description: t, error: n, showCharCount: r = !1, minLeng
|
|
|
3453
3596
|
children: [/* @__PURE__ */ g("textarea", {
|
|
3454
3597
|
id: v,
|
|
3455
3598
|
className: x("w-full min-h-[80px] resize-y disabled:opacity-50 disabled:cursor-not-allowed", !s && [
|
|
3456
|
-
|
|
3457
|
-
|
|
3599
|
+
fe,
|
|
3600
|
+
j[o],
|
|
3458
3601
|
"px-3 py-2 text-sm"
|
|
3459
3602
|
], !s && n && x("border-red-500 dark:border-red-400", "focus:ring-red-500"), c),
|
|
3460
3603
|
...u === void 0 ? { defaultValue: d } : { value: u },
|
|
3461
3604
|
minLength: i,
|
|
3462
3605
|
maxLength: a,
|
|
3463
|
-
onChange:
|
|
3606
|
+
onChange: E,
|
|
3464
3607
|
"aria-invalid": !!n,
|
|
3465
|
-
"aria-describedby": q(m, !!t && b, n && y,
|
|
3608
|
+
"aria-describedby": q(m, !!t && b, n && y, T && S),
|
|
3466
3609
|
...h
|
|
3467
|
-
}),
|
|
3468
|
-
id:
|
|
3469
|
-
current:
|
|
3610
|
+
}), T && /* @__PURE__ */ g(le, {
|
|
3611
|
+
id: S,
|
|
3612
|
+
current: C,
|
|
3470
3613
|
min: i,
|
|
3471
3614
|
max: a,
|
|
3472
3615
|
showMin: i !== void 0,
|
|
@@ -3474,9 +3617,8 @@ function Zi({ label: e, description: t, error: n, showCharCount: r = !1, minLeng
|
|
|
3474
3617
|
})]
|
|
3475
3618
|
});
|
|
3476
3619
|
}
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
var Qi = "AppleWebKit", $i = ["Linux", "X11"], ea = [
|
|
3620
|
+
// src/lib/is_webkit_gtk.ts
|
|
3621
|
+
var Ka = "AppleWebKit", qa = ["Linux", "X11"], Ja = [
|
|
3480
3622
|
"Chrome",
|
|
3481
3623
|
"Chromium",
|
|
3482
3624
|
"Edg",
|
|
@@ -3484,46 +3626,12 @@ var Qi = "AppleWebKit", $i = ["Linux", "X11"], ea = [
|
|
|
3484
3626
|
"CriOS",
|
|
3485
3627
|
"FxiOS"
|
|
3486
3628
|
];
|
|
3487
|
-
function
|
|
3488
|
-
return !e.includes(
|
|
3489
|
-
}
|
|
3490
|
-
//#endregion
|
|
3491
|
-
//#region src/stores/theme_store/theme_store.ts
|
|
3492
|
-
var na = "theme";
|
|
3493
|
-
function ra(e) {
|
|
3494
|
-
return e === "light" || e === "dark" || e === "system";
|
|
3495
|
-
}
|
|
3496
|
-
function ia() {
|
|
3497
|
-
return globalThis.window !== void 0 && globalThis.document !== void 0;
|
|
3498
|
-
}
|
|
3499
|
-
function aa(e) {
|
|
3500
|
-
let t = window.matchMedia("(prefers-color-scheme: dark)").matches, n = e === "dark" || e === "system" && t;
|
|
3501
|
-
document.documentElement.classList.toggle("dark", n);
|
|
3629
|
+
function Ya(e) {
|
|
3630
|
+
return !e.includes(Ka) || !qa.some((t) => e.includes(t)) ? !1 : !Ja.some((t) => e.includes(t));
|
|
3502
3631
|
}
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
return ra(e) ? e : "system";
|
|
3507
|
-
}
|
|
3508
|
-
var sa = oa();
|
|
3509
|
-
ia() && aa(sa);
|
|
3510
|
-
var ca = li((e) => ({
|
|
3511
|
-
theme: sa,
|
|
3512
|
-
setTheme: (t) => {
|
|
3513
|
-
aa(t), ia() && globalThis.localStorage.setItem(na, t), e({ theme: t });
|
|
3514
|
-
}
|
|
3515
|
-
}));
|
|
3516
|
-
ia() && (globalThis.addEventListener("storage", (e) => {
|
|
3517
|
-
if (e.key !== na) return;
|
|
3518
|
-
let t = ra(e.newValue) ? e.newValue : "system";
|
|
3519
|
-
aa(t), ca.setState({ theme: t });
|
|
3520
|
-
}), globalThis.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
|
3521
|
-
ca.getState().theme === "system" && aa("system");
|
|
3522
|
-
}));
|
|
3523
|
-
//#endregion
|
|
3524
|
-
//#region src/lib/theme_transition.ts
|
|
3525
|
-
var la = 750, ua = "ease-in-out";
|
|
3526
|
-
async function da({ theme: e, element: t, transitionDuration: n = la, transitionEasing: r = ua, applyThemeCallback: i }) {
|
|
3632
|
+
// src/lib/theme_transition.ts
|
|
3633
|
+
var Xa = 750, Za = "ease-in-out";
|
|
3634
|
+
async function Qa({ theme: e, element: t, transitionDuration: n = Xa, transitionEasing: r = Za, applyThemeCallback: i }) {
|
|
3527
3635
|
if (!document.startViewTransition || globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
3528
3636
|
i(e);
|
|
3529
3637
|
return;
|
|
@@ -3537,20 +3645,51 @@ async function da({ theme: e, element: t, transitionDuration: n = la, transition
|
|
|
3537
3645
|
pseudoElement: "::view-transition-new(root)"
|
|
3538
3646
|
});
|
|
3539
3647
|
}
|
|
3540
|
-
function
|
|
3648
|
+
function $a(e) {
|
|
3541
3649
|
return e === "light" ? "dark" : e === "dark" ? "system" : "light";
|
|
3542
3650
|
}
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3651
|
+
// src/stores/theme_store/theme_store.ts
|
|
3652
|
+
var eo = "theme";
|
|
3653
|
+
function to(e) {
|
|
3654
|
+
return e === "light" || e === "dark" || e === "system";
|
|
3655
|
+
}
|
|
3656
|
+
function no() {
|
|
3657
|
+
return globalThis.window !== void 0 && globalThis.document !== void 0;
|
|
3658
|
+
}
|
|
3659
|
+
function ro(e) {
|
|
3660
|
+
let t = window.matchMedia("(prefers-color-scheme: dark)").matches, n = e === "dark" || e === "system" && t;
|
|
3661
|
+
document.documentElement.classList.toggle("dark", n);
|
|
3662
|
+
}
|
|
3663
|
+
function io() {
|
|
3664
|
+
if (!no()) return "system";
|
|
3665
|
+
let e = globalThis.localStorage.getItem(eo);
|
|
3666
|
+
return to(e) ? e : "system";
|
|
3667
|
+
}
|
|
3668
|
+
var ao = io();
|
|
3669
|
+
no() && ro(ao);
|
|
3670
|
+
var oo = si((e) => ({
|
|
3671
|
+
theme: ao,
|
|
3672
|
+
setTheme: (t) => {
|
|
3673
|
+
ro(t), no() && globalThis.localStorage.setItem(eo, t), e({ theme: t });
|
|
3674
|
+
}
|
|
3675
|
+
}));
|
|
3676
|
+
no() && (globalThis.addEventListener("storage", (e) => {
|
|
3677
|
+
if (e.key !== eo) return;
|
|
3678
|
+
let t = to(e.newValue) ? e.newValue : "system";
|
|
3679
|
+
ro(t), oo.setState({ theme: t });
|
|
3680
|
+
}), globalThis.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
|
3681
|
+
oo.getState().theme === "system" && ro("system");
|
|
3682
|
+
}));
|
|
3683
|
+
// src/components/theme_toggle/theme_toggle.tsx
|
|
3684
|
+
var so = {
|
|
3546
3685
|
light: "i-tabler-sun text-yellow-500",
|
|
3547
3686
|
dark: "i-tabler-moon-stars text-gray-700 dark:text-yellow-500",
|
|
3548
3687
|
system: "i-tabler-device-desktop text-blue-500"
|
|
3549
|
-
},
|
|
3550
|
-
function
|
|
3551
|
-
let l =
|
|
3552
|
-
let r =
|
|
3553
|
-
i && a ? await
|
|
3688
|
+
}, co = "i-tabler-device-desktop text-gray-400";
|
|
3689
|
+
function lo({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n, size: r = "md", radius: i, variant: a, getAriaLabel: s, tooltip: c }) {
|
|
3690
|
+
let l = oo((e) => e.theme), u = oo((e) => e.setTheme), d = Ae(), p = Ne(), m = f(null), h = o(async () => {
|
|
3691
|
+
let r = $a(l), i = m.current, a = e ?? !Ya(navigator.userAgent);
|
|
3692
|
+
i && a ? await Qa({
|
|
3554
3693
|
theme: r,
|
|
3555
3694
|
element: i,
|
|
3556
3695
|
transitionDuration: t,
|
|
@@ -3563,8 +3702,8 @@ function ha({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n
|
|
|
3563
3702
|
t,
|
|
3564
3703
|
n,
|
|
3565
3704
|
u
|
|
3566
|
-
]), _ = p ?
|
|
3567
|
-
return /* @__PURE__ */ g(
|
|
3705
|
+
]), _ = p ? so[l] : co;
|
|
3706
|
+
return /* @__PURE__ */ g(Tr, {
|
|
3568
3707
|
ref: m,
|
|
3569
3708
|
icon: _,
|
|
3570
3709
|
"aria-label": (s ?? d.currentTheme)(l),
|
|
@@ -3577,18 +3716,8 @@ function ha({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n
|
|
|
3577
3716
|
}
|
|
3578
3717
|
});
|
|
3579
3718
|
}
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
var ga = [
|
|
3583
|
-
"a[href]",
|
|
3584
|
-
"button",
|
|
3585
|
-
"input:not([type=\"hidden\"])",
|
|
3586
|
-
"select",
|
|
3587
|
-
"textarea",
|
|
3588
|
-
"summary",
|
|
3589
|
-
"[contenteditable]:not([contenteditable=\"false\"])",
|
|
3590
|
-
"[tabindex]"
|
|
3591
|
-
].join(", "), _a = [
|
|
3719
|
+
// src/components/toolbar/toolbar_items.ts
|
|
3720
|
+
var uo = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", fo = [
|
|
3592
3721
|
"textarea",
|
|
3593
3722
|
"[contenteditable]:not([contenteditable=\"false\"])",
|
|
3594
3723
|
`input:not(${[
|
|
@@ -3603,47 +3732,45 @@ var ga = [
|
|
|
3603
3732
|
"submit"
|
|
3604
3733
|
].map((e) => `[type="${e}"]`).join(", ")})`
|
|
3605
3734
|
].join(", ");
|
|
3606
|
-
function
|
|
3735
|
+
function po(e) {
|
|
3607
3736
|
return e.matches(":disabled, [aria-disabled=\"true\"]");
|
|
3608
3737
|
}
|
|
3609
|
-
function
|
|
3610
|
-
return Array.from(e.querySelectorAll(
|
|
3738
|
+
function mo(e) {
|
|
3739
|
+
return Array.from(e.querySelectorAll(uo));
|
|
3611
3740
|
}
|
|
3612
|
-
function
|
|
3613
|
-
return
|
|
3741
|
+
function ho(e) {
|
|
3742
|
+
return mo(e).filter((e) => !po(e));
|
|
3614
3743
|
}
|
|
3615
|
-
function
|
|
3616
|
-
return e instanceof HTMLElement && e.matches(
|
|
3744
|
+
function go(e) {
|
|
3745
|
+
return e instanceof HTMLElement && e.matches(fo);
|
|
3617
3746
|
}
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
var Sa = (e, t) => (e + 1) % t, Ca = (e, t) => (e - 1 + t) % t, wa = () => 0, Ta = (e, t) => t - 1, Ea = {
|
|
3747
|
+
// src/components/toolbar/toolbar_navigation.ts
|
|
3748
|
+
var _o = (e, t) => (e + 1) % t, vo = (e, t) => (e - 1 + t) % t, yo = () => 0, bo = (e, t) => t - 1, xo = {
|
|
3621
3749
|
horizontal: {
|
|
3622
|
-
ArrowRight:
|
|
3623
|
-
ArrowLeft:
|
|
3624
|
-
Home:
|
|
3625
|
-
End:
|
|
3750
|
+
ArrowRight: _o,
|
|
3751
|
+
ArrowLeft: vo,
|
|
3752
|
+
Home: yo,
|
|
3753
|
+
End: bo
|
|
3626
3754
|
},
|
|
3627
3755
|
vertical: {
|
|
3628
|
-
ArrowDown:
|
|
3629
|
-
ArrowUp:
|
|
3630
|
-
Home:
|
|
3631
|
-
End:
|
|
3756
|
+
ArrowDown: _o,
|
|
3757
|
+
ArrowUp: vo,
|
|
3758
|
+
Home: yo,
|
|
3759
|
+
End: bo
|
|
3632
3760
|
}
|
|
3633
3761
|
};
|
|
3634
|
-
function
|
|
3635
|
-
let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a =
|
|
3762
|
+
function So(e) {
|
|
3763
|
+
let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = xo[n][t];
|
|
3636
3764
|
if (a && i !== 0) return a(r, i);
|
|
3637
3765
|
}
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
function ka(e, t) {
|
|
3766
|
+
// src/components/toolbar/use_toolbar_roving_focus.ts
|
|
3767
|
+
var Co = ["disabled", "aria-disabled"];
|
|
3768
|
+
function wo(e, t) {
|
|
3642
3769
|
let n = f(null), r = o(() => {
|
|
3643
3770
|
let t = e.current;
|
|
3644
3771
|
if (!t) return;
|
|
3645
|
-
let r =
|
|
3646
|
-
for (let e of
|
|
3772
|
+
let r = ho(t), i = n.current, a = i && r.includes(i) ? i : r[0];
|
|
3773
|
+
for (let e of mo(t)) e.tabIndex = e === a ? 0 : -1;
|
|
3647
3774
|
}, [e]);
|
|
3648
3775
|
return c(() => {
|
|
3649
3776
|
let t = e.current;
|
|
@@ -3654,19 +3781,19 @@ function ka(e, t) {
|
|
|
3654
3781
|
subtree: !0,
|
|
3655
3782
|
childList: !0,
|
|
3656
3783
|
attributes: !0,
|
|
3657
|
-
attributeFilter:
|
|
3784
|
+
attributeFilter: Co
|
|
3658
3785
|
}), () => n.disconnect();
|
|
3659
3786
|
}, [e, r]), {
|
|
3660
3787
|
handleFocus: (t) => {
|
|
3661
3788
|
let i = e.current;
|
|
3662
3789
|
if (!i) return;
|
|
3663
|
-
let a =
|
|
3790
|
+
let a = ho(i).find((e) => e === t.target);
|
|
3664
3791
|
a && (n.current = a, r());
|
|
3665
3792
|
},
|
|
3666
3793
|
handleKeyDown: (n) => {
|
|
3667
3794
|
let r = e.current;
|
|
3668
|
-
if (!r ||
|
|
3669
|
-
let i =
|
|
3795
|
+
if (!r || go(n.target)) return;
|
|
3796
|
+
let i = ho(r), a = So({
|
|
3670
3797
|
key: n.key,
|
|
3671
3798
|
orientation: t,
|
|
3672
3799
|
currentPosition: i.findIndex((e) => e === n.target),
|
|
@@ -3676,20 +3803,19 @@ function ka(e, t) {
|
|
|
3676
3803
|
}
|
|
3677
3804
|
};
|
|
3678
3805
|
}
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
var Aa = {
|
|
3806
|
+
// src/components/toolbar/toolbar.tsx
|
|
3807
|
+
var To = {
|
|
3682
3808
|
horizontal: "flex items-center gap-1",
|
|
3683
3809
|
vertical: "flex flex-col items-stretch gap-1"
|
|
3684
3810
|
};
|
|
3685
|
-
function
|
|
3686
|
-
let { orientation: t = "horizontal", unstyled: n = !1, className: r, ref: i, onFocus: a, onKeyDown: o, ...s } = e, c = f(null), { handleFocus: l, handleKeyDown: u } =
|
|
3811
|
+
function Eo(e) {
|
|
3812
|
+
let { orientation: t = "horizontal", unstyled: n = !1, className: r, ref: i, onFocus: a, onKeyDown: o, ...s } = e, c = f(null), { handleFocus: l, handleKeyDown: u } = wo(c, t);
|
|
3687
3813
|
return /* @__PURE__ */ g("div", {
|
|
3688
3814
|
...s,
|
|
3689
|
-
ref:
|
|
3815
|
+
ref: we(c, i),
|
|
3690
3816
|
role: "toolbar",
|
|
3691
3817
|
"aria-orientation": t,
|
|
3692
|
-
className: x(!n &&
|
|
3818
|
+
className: x(!n && To[t], r),
|
|
3693
3819
|
onFocus: (e) => {
|
|
3694
3820
|
l(e), a?.(e);
|
|
3695
3821
|
},
|
|
@@ -3698,31 +3824,28 @@ function ja(e) {
|
|
|
3698
3824
|
}
|
|
3699
3825
|
});
|
|
3700
3826
|
}
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
function Ma(e = {}) {
|
|
3827
|
+
// src/components/ui_provider/ui_provider.tsx
|
|
3828
|
+
function Do(e = {}) {
|
|
3704
3829
|
return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
|
|
3705
3830
|
}
|
|
3706
|
-
function
|
|
3707
|
-
let r = s(
|
|
3831
|
+
function Oo({ labels: e, announceFieldErrors: t, children: n }) {
|
|
3832
|
+
let r = s(ke), i = ye(), a = d(() => ({
|
|
3708
3833
|
...r,
|
|
3709
|
-
...
|
|
3834
|
+
...Do(e)
|
|
3710
3835
|
}), [r, e]);
|
|
3711
|
-
return /* @__PURE__ */ g(
|
|
3836
|
+
return /* @__PURE__ */ g(ke.Provider, {
|
|
3712
3837
|
value: a,
|
|
3713
|
-
children: /* @__PURE__ */ g(
|
|
3838
|
+
children: /* @__PURE__ */ g(ve.Provider, {
|
|
3714
3839
|
value: t ?? i,
|
|
3715
3840
|
children: n
|
|
3716
3841
|
})
|
|
3717
3842
|
});
|
|
3718
3843
|
}
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
var Pa = (e) => {
|
|
3844
|
+
// src/hooks/use_is_client/with_client_only.tsx
|
|
3845
|
+
var ko = (e) => {
|
|
3722
3846
|
function t(t) {
|
|
3723
|
-
return
|
|
3847
|
+
return Ne() ? /* @__PURE__ */ g(e, { ...t }) : null;
|
|
3724
3848
|
}
|
|
3725
3849
|
return t;
|
|
3726
3850
|
};
|
|
3727
|
-
|
|
3728
|
-
export { I as Avatar, le as BASE_INPUT_STYLES, R as Badge, te as Button, ae as Card, K as CharacterCount, Se as Checkbox, Oe as CheckboxOptions, Ae as ClientOnly, Fe as Combobox, gi as ConfirmModal, Yn as ContextMenu, Qn as CopyButton, tr as Highlight, hr as IconButton, vr as Input, br as Kbd, Cr as Menu, wr as MenuGroup, Fr as MenuItem, Ir as MenuSeparator, vi as Modal, yi as ModalFooter, bi as ModalProvider, Ei as MultiCombobox, Oi as RadioOptions, ki as Select, Ai as Switch, Xi as Tabs, Zi as Textarea, ha as ThemeToggle, ja as Toolbar, dr as Tooltip, Na as UIProvider, $n as splitIntoHighlightSegments, fi as useDisableHotkeysWhileMounted, ui as useGlobalHotkeysStore, ke as useIsClient, ca as useThemeStore, Pa as withClientOnly };
|
|
3851
|
+
export { I as Avatar, fe as BASE_INPUT_STYLES, R as Badge, te as Button, K as Card, le as CharacterCount, Ee as Checkbox, Me as CheckboxOptions, Pe as ClientOnly, ze as Combobox, qi as ConfirmModal, Qn as ContextMenu, tr as CopyButton, mi as Drawer, ir as Highlight, Tr as IconButton, _i as Input, yi as Kbd, Si as Menu, Ci as MenuGroup, Pi as MenuItem, Fi as MenuSeparator, Yi as Modal, Xi as ModalFooter, Zi as ModalProvider, ra as MultiCombobox, aa as RadioOptions, oa as Select, sa as Switch, Wa as Tabs, Ga as Textarea, lo as ThemeToggle, Eo as Toolbar, xr as Tooltip, Oo as UIProvider, nr as splitIntoHighlightSegments, ui as useDisableHotkeysWhileMounted, ci as useGlobalHotkeysStore, Ne as useIsClient, oo as useThemeStore, ko as withClientOnly };
|