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