@stackloop/ui 4.0.10 → 4.1.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 +59 -1
- package/dist/Accordion.d.ts +18 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1065 -996
- package/dist/index.js.map +1 -1
- package/dist/stackloop-ui.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e, Fragment as Ue } from "react/jsx-runtime";
|
|
2
|
-
import et, { useState as U, useEffect as J, useCallback as ke, useRef as Q, useMemo as Ae, forwardRef as
|
|
3
|
-
import { motion as
|
|
4
|
-
import { Loader2 as dt, Calendar as Tt, ChevronLeft as qe, ChevronDown as
|
|
2
|
+
import et, { useState as U, useEffect as J, useCallback as ke, useRef as Q, useMemo as Ae, forwardRef as Ie, createContext as Rt, useContext as Lt } from "react";
|
|
3
|
+
import { motion as M, AnimatePresence as se } from "framer-motion";
|
|
4
|
+
import { Loader2 as dt, Calendar as Tt, ChevronLeft as qe, ChevronDown as ge, ChevronRight as Qe, Search as ye, X as oe, EyeOff as zt, Eye as It, Check as ct, ArrowUp as Et, ArrowDown as Pt, ChevronsUpDown as Bt, House as Gt, Plus as Dt, WifiOff as Ze, Wifi as Ye, Info as jt, AlertTriangle as Ft, AlertCircle as Ot, CheckCircle as Vt, Camera as Ut, Upload as Ht, Play as Yt, Pause as Wt, Mic as $t, Square as Kt, Trash2 as _t, Image as Jt, FileText as rt } from "lucide-react";
|
|
5
5
|
import { createPortal as mt } from "react-dom";
|
|
6
6
|
function ut(t) {
|
|
7
7
|
var r, o, a = "";
|
|
@@ -39,13 +39,13 @@ const Qt = (t, r) => {
|
|
|
39
39
|
getClassGroupId: (i) => {
|
|
40
40
|
if (i.startsWith("[") && i.endsWith("]"))
|
|
41
41
|
return tr(i);
|
|
42
|
-
const
|
|
43
|
-
return bt(
|
|
42
|
+
const d = i.split(Ve), l = d[0] === "" && d.length > 1 ? 1 : 0;
|
|
43
|
+
return bt(d, l, r);
|
|
44
44
|
},
|
|
45
|
-
getConflictingClassGroupIds: (i,
|
|
46
|
-
if (
|
|
47
|
-
const
|
|
48
|
-
return
|
|
45
|
+
getConflictingClassGroupIds: (i, d) => {
|
|
46
|
+
if (d) {
|
|
47
|
+
const l = a[i], m = o[i];
|
|
48
|
+
return l ? m ? Qt(m, l) : l : m || ot;
|
|
49
49
|
}
|
|
50
50
|
return o[i] || ot;
|
|
51
51
|
}
|
|
@@ -53,18 +53,18 @@ const Qt = (t, r) => {
|
|
|
53
53
|
}, bt = (t, r, o) => {
|
|
54
54
|
if (t.length - r === 0)
|
|
55
55
|
return o.classGroupId;
|
|
56
|
-
const n = t[r],
|
|
57
|
-
if (
|
|
58
|
-
const m = bt(t, r + 1,
|
|
56
|
+
const n = t[r], c = o.nextPart.get(n);
|
|
57
|
+
if (c) {
|
|
58
|
+
const m = bt(t, r + 1, c);
|
|
59
59
|
if (m) return m;
|
|
60
60
|
}
|
|
61
61
|
const i = o.validators;
|
|
62
62
|
if (i === null)
|
|
63
63
|
return;
|
|
64
|
-
const
|
|
65
|
-
for (let m = 0; m <
|
|
64
|
+
const d = r === 0 ? t.join(Ve) : t.slice(r).join(Ve), l = i.length;
|
|
65
|
+
for (let m = 0; m < l; m++) {
|
|
66
66
|
const u = i[m];
|
|
67
|
-
if (u.validator(
|
|
67
|
+
if (u.validator(d))
|
|
68
68
|
return u.classGroupId;
|
|
69
69
|
}
|
|
70
70
|
}, tr = (t) => t.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
@@ -85,8 +85,8 @@ const Qt = (t, r) => {
|
|
|
85
85
|
return o;
|
|
86
86
|
}, tt = (t, r, o, a) => {
|
|
87
87
|
const n = t.length;
|
|
88
|
-
for (let
|
|
89
|
-
const i = t[
|
|
88
|
+
for (let c = 0; c < n; c++) {
|
|
89
|
+
const i = t[c];
|
|
90
90
|
ar(i, r, o, a);
|
|
91
91
|
}
|
|
92
92
|
}, ar = (t, r, o, a) => {
|
|
@@ -109,18 +109,18 @@ const Qt = (t, r) => {
|
|
|
109
109
|
}
|
|
110
110
|
r.validators === null && (r.validators = []), r.validators.push(Zt(o, t));
|
|
111
111
|
}, sr = (t, r, o, a) => {
|
|
112
|
-
const n = Object.entries(t),
|
|
113
|
-
for (let i = 0; i <
|
|
114
|
-
const [
|
|
115
|
-
tt(
|
|
112
|
+
const n = Object.entries(t), c = n.length;
|
|
113
|
+
for (let i = 0; i < c; i++) {
|
|
114
|
+
const [d, l] = n[i];
|
|
115
|
+
tt(l, ht(r, d), o, a);
|
|
116
116
|
}
|
|
117
117
|
}, ht = (t, r) => {
|
|
118
118
|
let o = t;
|
|
119
119
|
const a = r.split(Ve), n = a.length;
|
|
120
|
-
for (let
|
|
121
|
-
const i = a[
|
|
122
|
-
let
|
|
123
|
-
|
|
120
|
+
for (let c = 0; c < n; c++) {
|
|
121
|
+
const i = a[c];
|
|
122
|
+
let d = o.nextPart.get(i);
|
|
123
|
+
d || (d = pt(), o.nextPart.set(i, d)), o = d;
|
|
124
124
|
}
|
|
125
125
|
return o;
|
|
126
126
|
}, lr = (t) => "isThemeGetter" in t && t.isThemeGetter === !0, dr = (t) => {
|
|
@@ -132,19 +132,19 @@ const Qt = (t, r) => {
|
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
let r = 0, o = /* @__PURE__ */ Object.create(null), a = /* @__PURE__ */ Object.create(null);
|
|
135
|
-
const n = (
|
|
136
|
-
o[
|
|
135
|
+
const n = (c, i) => {
|
|
136
|
+
o[c] = i, r++, r > t && (r = 0, a = o, o = /* @__PURE__ */ Object.create(null));
|
|
137
137
|
};
|
|
138
138
|
return {
|
|
139
|
-
get(
|
|
140
|
-
let i = o[
|
|
139
|
+
get(c) {
|
|
140
|
+
let i = o[c];
|
|
141
141
|
if (i !== void 0)
|
|
142
142
|
return i;
|
|
143
|
-
if ((i = a[
|
|
144
|
-
return n(
|
|
143
|
+
if ((i = a[c]) !== void 0)
|
|
144
|
+
return n(c, i), i;
|
|
145
145
|
},
|
|
146
|
-
set(
|
|
147
|
-
|
|
146
|
+
set(c, i) {
|
|
147
|
+
c in o ? o[c] = i : n(c, i);
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
150
|
}, Xe = "!", at = ":", cr = [], nt = (t, r, o, a, n) => ({
|
|
@@ -159,43 +159,43 @@ const Qt = (t, r) => {
|
|
|
159
159
|
experimentalParseClassName: o
|
|
160
160
|
} = t;
|
|
161
161
|
let a = (n) => {
|
|
162
|
-
const
|
|
163
|
-
let i = 0,
|
|
162
|
+
const c = [];
|
|
163
|
+
let i = 0, d = 0, l = 0, m;
|
|
164
164
|
const u = n.length;
|
|
165
165
|
for (let N = 0; N < u; N++) {
|
|
166
|
-
const
|
|
167
|
-
if (i === 0 &&
|
|
168
|
-
if (
|
|
169
|
-
|
|
166
|
+
const S = n[N];
|
|
167
|
+
if (i === 0 && d === 0) {
|
|
168
|
+
if (S === at) {
|
|
169
|
+
c.push(n.slice(l, N)), l = N + 1;
|
|
170
170
|
continue;
|
|
171
171
|
}
|
|
172
|
-
if (
|
|
172
|
+
if (S === "/") {
|
|
173
173
|
m = N;
|
|
174
174
|
continue;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
S === "[" ? i++ : S === "]" ? i-- : S === "(" ? d++ : S === ")" && d--;
|
|
178
178
|
}
|
|
179
|
-
const
|
|
180
|
-
let
|
|
181
|
-
|
|
179
|
+
const y = c.length === 0 ? n : n.slice(l);
|
|
180
|
+
let g = y, k = !1;
|
|
181
|
+
y.endsWith(Xe) ? (g = y.slice(0, -1), k = !0) : (
|
|
182
182
|
/**
|
|
183
183
|
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
|
|
184
184
|
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
|
|
185
185
|
*/
|
|
186
|
-
|
|
186
|
+
y.startsWith(Xe) && (g = y.slice(1), k = !0)
|
|
187
187
|
);
|
|
188
|
-
const
|
|
189
|
-
return nt(
|
|
188
|
+
const I = m && m > l ? m - l : void 0;
|
|
189
|
+
return nt(c, k, g, I);
|
|
190
190
|
};
|
|
191
191
|
if (r) {
|
|
192
|
-
const n = r + at,
|
|
193
|
-
a = (i) => i.startsWith(n) ?
|
|
192
|
+
const n = r + at, c = a;
|
|
193
|
+
a = (i) => i.startsWith(n) ? c(i.slice(n.length)) : nt(cr, !1, i, void 0, !0);
|
|
194
194
|
}
|
|
195
195
|
if (o) {
|
|
196
196
|
const n = a;
|
|
197
|
-
a = (
|
|
198
|
-
className:
|
|
197
|
+
a = (c) => o({
|
|
198
|
+
className: c,
|
|
199
199
|
parseClassName: n
|
|
200
200
|
});
|
|
201
201
|
}
|
|
@@ -207,9 +207,9 @@ const Qt = (t, r) => {
|
|
|
207
207
|
}), (o) => {
|
|
208
208
|
const a = [];
|
|
209
209
|
let n = [];
|
|
210
|
-
for (let
|
|
211
|
-
const i = o[
|
|
212
|
-
|
|
210
|
+
for (let c = 0; c < o.length; c++) {
|
|
211
|
+
const i = o[c], d = i[0] === "[", l = r.has(i);
|
|
212
|
+
d || l ? (n.length > 0 && (n.sort(), a.push(...n), n = []), a.push(i)) : n.push(i);
|
|
213
213
|
}
|
|
214
214
|
return n.length > 0 && (n.sort(), a.push(...n)), a;
|
|
215
215
|
};
|
|
@@ -223,45 +223,45 @@ const Qt = (t, r) => {
|
|
|
223
223
|
parseClassName: o,
|
|
224
224
|
getClassGroupId: a,
|
|
225
225
|
getConflictingClassGroupIds: n,
|
|
226
|
-
sortModifiers:
|
|
227
|
-
} = r, i = [],
|
|
228
|
-
let
|
|
229
|
-
for (let m =
|
|
230
|
-
const u =
|
|
231
|
-
isExternal:
|
|
232
|
-
modifiers:
|
|
233
|
-
hasImportantModifier:
|
|
234
|
-
baseClassName:
|
|
226
|
+
sortModifiers: c
|
|
227
|
+
} = r, i = [], d = t.trim().split(br);
|
|
228
|
+
let l = "";
|
|
229
|
+
for (let m = d.length - 1; m >= 0; m -= 1) {
|
|
230
|
+
const u = d[m], {
|
|
231
|
+
isExternal: y,
|
|
232
|
+
modifiers: g,
|
|
233
|
+
hasImportantModifier: k,
|
|
234
|
+
baseClassName: I,
|
|
235
235
|
maybePostfixModifierPosition: N
|
|
236
236
|
} = o(u);
|
|
237
|
-
if (
|
|
238
|
-
|
|
237
|
+
if (y) {
|
|
238
|
+
l = u + (l.length > 0 ? " " + l : l);
|
|
239
239
|
continue;
|
|
240
240
|
}
|
|
241
|
-
let
|
|
241
|
+
let S = !!N, C = a(S ? I.substring(0, N) : I);
|
|
242
242
|
if (!C) {
|
|
243
|
-
if (!
|
|
244
|
-
|
|
243
|
+
if (!S) {
|
|
244
|
+
l = u + (l.length > 0 ? " " + l : l);
|
|
245
245
|
continue;
|
|
246
246
|
}
|
|
247
|
-
if (C = a(
|
|
248
|
-
|
|
247
|
+
if (C = a(I), !C) {
|
|
248
|
+
l = u + (l.length > 0 ? " " + l : l);
|
|
249
249
|
continue;
|
|
250
250
|
}
|
|
251
|
-
|
|
251
|
+
S = !1;
|
|
252
252
|
}
|
|
253
|
-
const
|
|
253
|
+
const P = g.length === 0 ? "" : g.length === 1 ? g[0] : c(g).join(":"), V = k ? P + Xe : P, D = V + C;
|
|
254
254
|
if (i.indexOf(D) > -1)
|
|
255
255
|
continue;
|
|
256
256
|
i.push(D);
|
|
257
|
-
const z = n(C,
|
|
257
|
+
const z = n(C, S);
|
|
258
258
|
for (let j = 0; j < z.length; ++j) {
|
|
259
259
|
const B = z[j];
|
|
260
260
|
i.push(V + B);
|
|
261
261
|
}
|
|
262
|
-
|
|
262
|
+
l = u + (l.length > 0 ? " " + l : l);
|
|
263
263
|
}
|
|
264
|
-
return
|
|
264
|
+
return l;
|
|
265
265
|
}, fr = (...t) => {
|
|
266
266
|
let r = 0, o, a, n = "";
|
|
267
267
|
for (; r < t.length; )
|
|
@@ -275,34 +275,34 @@ const Qt = (t, r) => {
|
|
|
275
275
|
t[a] && (r = ft(t[a])) && (o && (o += " "), o += r);
|
|
276
276
|
return o;
|
|
277
277
|
}, gr = (t, ...r) => {
|
|
278
|
-
let o, a, n,
|
|
279
|
-
const i = (
|
|
280
|
-
const m = r.reduce((u,
|
|
281
|
-
return o = pr(m), a = o.cache.get, n = o.cache.set,
|
|
282
|
-
},
|
|
283
|
-
const m = a(
|
|
278
|
+
let o, a, n, c;
|
|
279
|
+
const i = (l) => {
|
|
280
|
+
const m = r.reduce((u, y) => y(u), t());
|
|
281
|
+
return o = pr(m), a = o.cache.get, n = o.cache.set, c = d, d(l);
|
|
282
|
+
}, d = (l) => {
|
|
283
|
+
const m = a(l);
|
|
284
284
|
if (m)
|
|
285
285
|
return m;
|
|
286
|
-
const u = hr(
|
|
287
|
-
return n(
|
|
286
|
+
const u = hr(l, o);
|
|
287
|
+
return n(l, u), u;
|
|
288
288
|
};
|
|
289
|
-
return
|
|
289
|
+
return c = i, (...l) => c(fr(...l));
|
|
290
290
|
}, yr = [], te = (t) => {
|
|
291
291
|
const r = (o) => o[t] || yr;
|
|
292
292
|
return r.isThemeGetter = !0, r;
|
|
293
|
-
}, gt = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, yt = /^\((?:(\w[\w-]*):)?(.+)\)$/i, xr = /^\d+\/\d+$/, wr = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, vr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Cr = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Nr = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, kr = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Te = (t) => xr.test(t), H = (t) => !!t && !Number.isNaN(Number(t)), Ne = (t) => !!t && Number.isInteger(Number(t)), We = (t) => t.endsWith("%") && H(t.slice(0, -1)),
|
|
293
|
+
}, gt = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, yt = /^\((?:(\w[\w-]*):)?(.+)\)$/i, xr = /^\d+\/\d+$/, wr = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, vr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Cr = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Nr = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, kr = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Te = (t) => xr.test(t), H = (t) => !!t && !Number.isNaN(Number(t)), Ne = (t) => !!t && Number.isInteger(Number(t)), We = (t) => t.endsWith("%") && H(t.slice(0, -1)), we = (t) => wr.test(t), Sr = () => !0, Mr = (t) => (
|
|
294
294
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
295
295
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
296
296
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
297
297
|
vr.test(t) && !Cr.test(t)
|
|
298
|
-
), xt = () => !1, Ar = (t) => Nr.test(t), Rr = (t) => kr.test(t), Lr = (t) => !
|
|
298
|
+
), xt = () => !1, Ar = (t) => Nr.test(t), Rr = (t) => kr.test(t), Lr = (t) => !A(t) && !R(t), Tr = (t) => Ee(t, Ct, xt), A = (t) => gt.test(t), Me = (t) => Ee(t, Nt, Mr), $e = (t) => Ee(t, Br, H), it = (t) => Ee(t, wt, xt), zr = (t) => Ee(t, vt, Rr), De = (t) => Ee(t, kt, Ar), R = (t) => yt.test(t), Ge = (t) => Pe(t, Nt), Ir = (t) => Pe(t, Gr), st = (t) => Pe(t, wt), Er = (t) => Pe(t, Ct), Pr = (t) => Pe(t, vt), je = (t) => Pe(t, kt, !0), Ee = (t, r, o) => {
|
|
299
299
|
const a = gt.exec(t);
|
|
300
300
|
return a ? a[1] ? r(a[1]) : o(a[2]) : !1;
|
|
301
|
-
},
|
|
301
|
+
}, Pe = (t, r, o = !1) => {
|
|
302
302
|
const a = yt.exec(t);
|
|
303
303
|
return a ? a[1] ? r(a[1]) : o : !1;
|
|
304
304
|
}, wt = (t) => t === "position" || t === "percentage", vt = (t) => t === "image" || t === "url", Ct = (t) => t === "length" || t === "size" || t === "bg-size", Nt = (t) => t === "length", Br = (t) => t === "number", Gr = (t) => t === "family-name", kt = (t) => t === "shadow", Dr = () => {
|
|
305
|
-
const t = te("color"), r = te("font"), o = te("text"), a = te("font-weight"), n = te("tracking"),
|
|
305
|
+
const t = te("color"), r = te("font"), o = te("text"), a = te("font-weight"), n = te("tracking"), c = te("leading"), i = te("breakpoint"), d = te("container"), l = te("spacing"), m = te("radius"), u = te("shadow"), y = te("inset-shadow"), g = te("text-shadow"), k = te("drop-shadow"), I = te("blur"), N = te("perspective"), S = te("aspect"), C = te("ease"), P = te("animate"), V = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], D = () => [
|
|
306
306
|
"center",
|
|
307
307
|
"top",
|
|
308
308
|
"bottom",
|
|
@@ -320,51 +320,51 @@ const Qt = (t, r) => {
|
|
|
320
320
|
"bottom-left",
|
|
321
321
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
322
322
|
"left-bottom"
|
|
323
|
-
], z = () => [...D(),
|
|
324
|
-
span: ["full", Ne,
|
|
325
|
-
}, Ne,
|
|
326
|
-
position: [
|
|
323
|
+
], z = () => [...D(), R, A], j = () => ["auto", "hidden", "clip", "visible", "scroll"], B = () => ["auto", "contain", "none"], h = () => [R, A, l], L = () => [Te, "full", "auto", ...h()], x = () => [Ne, "none", "subgrid", R, A], b = () => ["auto", {
|
|
324
|
+
span: ["full", Ne, R, A]
|
|
325
|
+
}, Ne, R, A], T = () => [Ne, "auto", R, A], E = () => ["auto", "min", "max", "fr", R, A], G = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], v = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], F = () => ["auto", ...h()], W = () => [Te, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...h()], f = () => [t, R, A], q = () => [...D(), st, it, {
|
|
326
|
+
position: [R, A]
|
|
327
327
|
}], Y = () => ["no-repeat", {
|
|
328
328
|
repeat: ["", "x", "y", "space", "round"]
|
|
329
|
-
}], $ = () => ["auto", "cover", "contain",
|
|
330
|
-
size: [
|
|
329
|
+
}], $ = () => ["auto", "cover", "contain", Er, Tr, {
|
|
330
|
+
size: [R, A]
|
|
331
331
|
}], K = () => [We, Ge, Me], Z = () => [
|
|
332
332
|
// Deprecated since Tailwind CSS v4.0.0
|
|
333
333
|
"",
|
|
334
334
|
"none",
|
|
335
335
|
"full",
|
|
336
336
|
m,
|
|
337
|
-
|
|
338
|
-
|
|
337
|
+
R,
|
|
338
|
+
A
|
|
339
339
|
], ee = () => ["", H, Ge, Me], pe = () => ["solid", "dashed", "dotted", "double"], be = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], X = () => [H, We, st, it], ve = () => [
|
|
340
340
|
// Deprecated since Tailwind CSS v4.0.0
|
|
341
341
|
"",
|
|
342
342
|
"none",
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
], ae = () => ["none", H,
|
|
343
|
+
I,
|
|
344
|
+
R,
|
|
345
|
+
A
|
|
346
|
+
], ae = () => ["none", H, R, A], ne = () => ["none", H, R, A], ie = () => [H, R, A], re = () => [Te, "full", ...h()];
|
|
347
347
|
return {
|
|
348
348
|
cacheSize: 500,
|
|
349
349
|
theme: {
|
|
350
350
|
animate: ["spin", "ping", "pulse", "bounce"],
|
|
351
351
|
aspect: ["video"],
|
|
352
|
-
blur: [
|
|
353
|
-
breakpoint: [
|
|
352
|
+
blur: [we],
|
|
353
|
+
breakpoint: [we],
|
|
354
354
|
color: [Sr],
|
|
355
|
-
container: [
|
|
356
|
-
"drop-shadow": [
|
|
355
|
+
container: [we],
|
|
356
|
+
"drop-shadow": [we],
|
|
357
357
|
ease: ["in", "out", "in-out"],
|
|
358
358
|
font: [Lr],
|
|
359
359
|
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
360
|
-
"inset-shadow": [
|
|
360
|
+
"inset-shadow": [we],
|
|
361
361
|
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
362
362
|
perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
|
|
363
|
-
radius: [
|
|
364
|
-
shadow: [
|
|
363
|
+
radius: [we],
|
|
364
|
+
shadow: [we],
|
|
365
365
|
spacing: ["px", H],
|
|
366
|
-
text: [
|
|
367
|
-
"text-shadow": [
|
|
366
|
+
text: [we],
|
|
367
|
+
"text-shadow": [we],
|
|
368
368
|
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
|
|
369
369
|
},
|
|
370
370
|
classGroups: {
|
|
@@ -376,7 +376,7 @@ const Qt = (t, r) => {
|
|
|
376
376
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
377
377
|
*/
|
|
378
378
|
aspect: [{
|
|
379
|
-
aspect: ["auto", "square", Te,
|
|
379
|
+
aspect: ["auto", "square", Te, A, R, S]
|
|
380
380
|
}],
|
|
381
381
|
/**
|
|
382
382
|
* Container
|
|
@@ -389,7 +389,7 @@ const Qt = (t, r) => {
|
|
|
389
389
|
* @see https://tailwindcss.com/docs/columns
|
|
390
390
|
*/
|
|
391
391
|
columns: [{
|
|
392
|
-
columns: [H,
|
|
392
|
+
columns: [H, A, R, d]
|
|
393
393
|
}],
|
|
394
394
|
/**
|
|
395
395
|
* Break After
|
|
@@ -589,7 +589,7 @@ const Qt = (t, r) => {
|
|
|
589
589
|
* @see https://tailwindcss.com/docs/z-index
|
|
590
590
|
*/
|
|
591
591
|
z: [{
|
|
592
|
-
z: [Ne, "auto",
|
|
592
|
+
z: [Ne, "auto", R, A]
|
|
593
593
|
}],
|
|
594
594
|
// ------------------------
|
|
595
595
|
// --- Flexbox and Grid ---
|
|
@@ -599,7 +599,7 @@ const Qt = (t, r) => {
|
|
|
599
599
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
600
600
|
*/
|
|
601
601
|
basis: [{
|
|
602
|
-
basis: [Te, "full", "auto",
|
|
602
|
+
basis: [Te, "full", "auto", d, ...h()]
|
|
603
603
|
}],
|
|
604
604
|
/**
|
|
605
605
|
* Flex Direction
|
|
@@ -620,35 +620,35 @@ const Qt = (t, r) => {
|
|
|
620
620
|
* @see https://tailwindcss.com/docs/flex
|
|
621
621
|
*/
|
|
622
622
|
flex: [{
|
|
623
|
-
flex: [H, Te, "auto", "initial", "none",
|
|
623
|
+
flex: [H, Te, "auto", "initial", "none", A]
|
|
624
624
|
}],
|
|
625
625
|
/**
|
|
626
626
|
* Flex Grow
|
|
627
627
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
628
628
|
*/
|
|
629
629
|
grow: [{
|
|
630
|
-
grow: ["", H,
|
|
630
|
+
grow: ["", H, R, A]
|
|
631
631
|
}],
|
|
632
632
|
/**
|
|
633
633
|
* Flex Shrink
|
|
634
634
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
635
635
|
*/
|
|
636
636
|
shrink: [{
|
|
637
|
-
shrink: ["", H,
|
|
637
|
+
shrink: ["", H, R, A]
|
|
638
638
|
}],
|
|
639
639
|
/**
|
|
640
640
|
* Order
|
|
641
641
|
* @see https://tailwindcss.com/docs/order
|
|
642
642
|
*/
|
|
643
643
|
order: [{
|
|
644
|
-
order: [Ne, "first", "last", "none",
|
|
644
|
+
order: [Ne, "first", "last", "none", R, A]
|
|
645
645
|
}],
|
|
646
646
|
/**
|
|
647
647
|
* Grid Template Columns
|
|
648
648
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
649
649
|
*/
|
|
650
650
|
"grid-cols": [{
|
|
651
|
-
"grid-cols":
|
|
651
|
+
"grid-cols": x()
|
|
652
652
|
}],
|
|
653
653
|
/**
|
|
654
654
|
* Grid Column Start / End
|
|
@@ -676,7 +676,7 @@ const Qt = (t, r) => {
|
|
|
676
676
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
677
677
|
*/
|
|
678
678
|
"grid-rows": [{
|
|
679
|
-
"grid-rows":
|
|
679
|
+
"grid-rows": x()
|
|
680
680
|
}],
|
|
681
681
|
/**
|
|
682
682
|
* Grid Row Start / End
|
|
@@ -711,14 +711,14 @@ const Qt = (t, r) => {
|
|
|
711
711
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
712
712
|
*/
|
|
713
713
|
"auto-cols": [{
|
|
714
|
-
"auto-cols":
|
|
714
|
+
"auto-cols": E()
|
|
715
715
|
}],
|
|
716
716
|
/**
|
|
717
717
|
* Grid Auto Rows
|
|
718
718
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
719
719
|
*/
|
|
720
720
|
"auto-rows": [{
|
|
721
|
-
"auto-rows":
|
|
721
|
+
"auto-rows": E()
|
|
722
722
|
}],
|
|
723
723
|
/**
|
|
724
724
|
* Gap
|
|
@@ -753,14 +753,14 @@ const Qt = (t, r) => {
|
|
|
753
753
|
* @see https://tailwindcss.com/docs/justify-items
|
|
754
754
|
*/
|
|
755
755
|
"justify-items": [{
|
|
756
|
-
"justify-items": [...
|
|
756
|
+
"justify-items": [...v(), "normal"]
|
|
757
757
|
}],
|
|
758
758
|
/**
|
|
759
759
|
* Justify Self
|
|
760
760
|
* @see https://tailwindcss.com/docs/justify-self
|
|
761
761
|
*/
|
|
762
762
|
"justify-self": [{
|
|
763
|
-
"justify-self": ["auto", ...
|
|
763
|
+
"justify-self": ["auto", ...v()]
|
|
764
764
|
}],
|
|
765
765
|
/**
|
|
766
766
|
* Align Content
|
|
@@ -774,7 +774,7 @@ const Qt = (t, r) => {
|
|
|
774
774
|
* @see https://tailwindcss.com/docs/align-items
|
|
775
775
|
*/
|
|
776
776
|
"align-items": [{
|
|
777
|
-
items: [...
|
|
777
|
+
items: [...v(), {
|
|
778
778
|
baseline: ["", "last"]
|
|
779
779
|
}]
|
|
780
780
|
}],
|
|
@@ -783,7 +783,7 @@ const Qt = (t, r) => {
|
|
|
783
783
|
* @see https://tailwindcss.com/docs/align-self
|
|
784
784
|
*/
|
|
785
785
|
"align-self": [{
|
|
786
|
-
self: ["auto", ...
|
|
786
|
+
self: ["auto", ...v(), {
|
|
787
787
|
baseline: ["", "last"]
|
|
788
788
|
}]
|
|
789
789
|
}],
|
|
@@ -799,14 +799,14 @@ const Qt = (t, r) => {
|
|
|
799
799
|
* @see https://tailwindcss.com/docs/place-items
|
|
800
800
|
*/
|
|
801
801
|
"place-items": [{
|
|
802
|
-
"place-items": [...
|
|
802
|
+
"place-items": [...v(), "baseline"]
|
|
803
803
|
}],
|
|
804
804
|
/**
|
|
805
805
|
* Place Self
|
|
806
806
|
* @see https://tailwindcss.com/docs/place-self
|
|
807
807
|
*/
|
|
808
808
|
"place-self": [{
|
|
809
|
-
"place-self": ["auto", ...
|
|
809
|
+
"place-self": ["auto", ...v()]
|
|
810
810
|
}],
|
|
811
811
|
// Spacing
|
|
812
812
|
/**
|
|
@@ -974,7 +974,7 @@ const Qt = (t, r) => {
|
|
|
974
974
|
* @see https://tailwindcss.com/docs/width
|
|
975
975
|
*/
|
|
976
976
|
w: [{
|
|
977
|
-
w: [
|
|
977
|
+
w: [d, "screen", ...W()]
|
|
978
978
|
}],
|
|
979
979
|
/**
|
|
980
980
|
* Min-Width
|
|
@@ -982,7 +982,7 @@ const Qt = (t, r) => {
|
|
|
982
982
|
*/
|
|
983
983
|
"min-w": [{
|
|
984
984
|
"min-w": [
|
|
985
|
-
|
|
985
|
+
d,
|
|
986
986
|
"screen",
|
|
987
987
|
/** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
988
988
|
"none",
|
|
@@ -995,7 +995,7 @@ const Qt = (t, r) => {
|
|
|
995
995
|
*/
|
|
996
996
|
"max-w": [{
|
|
997
997
|
"max-w": [
|
|
998
|
-
|
|
998
|
+
d,
|
|
999
999
|
"screen",
|
|
1000
1000
|
"none",
|
|
1001
1001
|
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
@@ -1053,21 +1053,21 @@ const Qt = (t, r) => {
|
|
|
1053
1053
|
* @see https://tailwindcss.com/docs/font-weight
|
|
1054
1054
|
*/
|
|
1055
1055
|
"font-weight": [{
|
|
1056
|
-
font: [a,
|
|
1056
|
+
font: [a, R, $e]
|
|
1057
1057
|
}],
|
|
1058
1058
|
/**
|
|
1059
1059
|
* Font Stretch
|
|
1060
1060
|
* @see https://tailwindcss.com/docs/font-stretch
|
|
1061
1061
|
*/
|
|
1062
1062
|
"font-stretch": [{
|
|
1063
|
-
"font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", We,
|
|
1063
|
+
"font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", We, A]
|
|
1064
1064
|
}],
|
|
1065
1065
|
/**
|
|
1066
1066
|
* Font Family
|
|
1067
1067
|
* @see https://tailwindcss.com/docs/font-family
|
|
1068
1068
|
*/
|
|
1069
1069
|
"font-family": [{
|
|
1070
|
-
font: [
|
|
1070
|
+
font: [Ir, A, r]
|
|
1071
1071
|
}],
|
|
1072
1072
|
/**
|
|
1073
1073
|
* Font Variant Numeric
|
|
@@ -1104,14 +1104,14 @@ const Qt = (t, r) => {
|
|
|
1104
1104
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
1105
1105
|
*/
|
|
1106
1106
|
tracking: [{
|
|
1107
|
-
tracking: [n,
|
|
1107
|
+
tracking: [n, R, A]
|
|
1108
1108
|
}],
|
|
1109
1109
|
/**
|
|
1110
1110
|
* Line Clamp
|
|
1111
1111
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
1112
1112
|
*/
|
|
1113
1113
|
"line-clamp": [{
|
|
1114
|
-
"line-clamp": [H, "none",
|
|
1114
|
+
"line-clamp": [H, "none", R, $e]
|
|
1115
1115
|
}],
|
|
1116
1116
|
/**
|
|
1117
1117
|
* Line Height
|
|
@@ -1120,7 +1120,7 @@ const Qt = (t, r) => {
|
|
|
1120
1120
|
leading: [{
|
|
1121
1121
|
leading: [
|
|
1122
1122
|
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1123
|
-
|
|
1123
|
+
c,
|
|
1124
1124
|
...h()
|
|
1125
1125
|
]
|
|
1126
1126
|
}],
|
|
@@ -1129,7 +1129,7 @@ const Qt = (t, r) => {
|
|
|
1129
1129
|
* @see https://tailwindcss.com/docs/list-style-image
|
|
1130
1130
|
*/
|
|
1131
1131
|
"list-image": [{
|
|
1132
|
-
"list-image": ["none",
|
|
1132
|
+
"list-image": ["none", R, A]
|
|
1133
1133
|
}],
|
|
1134
1134
|
/**
|
|
1135
1135
|
* List Style Position
|
|
@@ -1143,7 +1143,7 @@ const Qt = (t, r) => {
|
|
|
1143
1143
|
* @see https://tailwindcss.com/docs/list-style-type
|
|
1144
1144
|
*/
|
|
1145
1145
|
"list-style-type": [{
|
|
1146
|
-
list: ["disc", "decimal", "none",
|
|
1146
|
+
list: ["disc", "decimal", "none", R, A]
|
|
1147
1147
|
}],
|
|
1148
1148
|
/**
|
|
1149
1149
|
* Text Alignment
|
|
@@ -1184,7 +1184,7 @@ const Qt = (t, r) => {
|
|
|
1184
1184
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
1185
1185
|
*/
|
|
1186
1186
|
"text-decoration-thickness": [{
|
|
1187
|
-
decoration: [H, "from-font", "auto",
|
|
1187
|
+
decoration: [H, "from-font", "auto", R, Me]
|
|
1188
1188
|
}],
|
|
1189
1189
|
/**
|
|
1190
1190
|
* Text Decoration Color
|
|
@@ -1198,7 +1198,7 @@ const Qt = (t, r) => {
|
|
|
1198
1198
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
1199
1199
|
*/
|
|
1200
1200
|
"underline-offset": [{
|
|
1201
|
-
"underline-offset": [H, "auto",
|
|
1201
|
+
"underline-offset": [H, "auto", R, A]
|
|
1202
1202
|
}],
|
|
1203
1203
|
/**
|
|
1204
1204
|
* Text Transform
|
|
@@ -1229,7 +1229,7 @@ const Qt = (t, r) => {
|
|
|
1229
1229
|
* @see https://tailwindcss.com/docs/vertical-align
|
|
1230
1230
|
*/
|
|
1231
1231
|
"vertical-align": [{
|
|
1232
|
-
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super",
|
|
1232
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", R, A]
|
|
1233
1233
|
}],
|
|
1234
1234
|
/**
|
|
1235
1235
|
* Whitespace
|
|
@@ -1264,7 +1264,7 @@ const Qt = (t, r) => {
|
|
|
1264
1264
|
* @see https://tailwindcss.com/docs/content
|
|
1265
1265
|
*/
|
|
1266
1266
|
content: [{
|
|
1267
|
-
content: ["none",
|
|
1267
|
+
content: ["none", R, A]
|
|
1268
1268
|
}],
|
|
1269
1269
|
// -------------------
|
|
1270
1270
|
// --- Backgrounds ---
|
|
@@ -1319,10 +1319,10 @@ const Qt = (t, r) => {
|
|
|
1319
1319
|
bg: ["none", {
|
|
1320
1320
|
linear: [{
|
|
1321
1321
|
to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
1322
|
-
}, Ne,
|
|
1323
|
-
radial: ["",
|
|
1324
|
-
conic: [Ne,
|
|
1325
|
-
},
|
|
1322
|
+
}, Ne, R, A],
|
|
1323
|
+
radial: ["", R, A],
|
|
1324
|
+
conic: [Ne, R, A]
|
|
1325
|
+
}, Pr, zr]
|
|
1326
1326
|
}],
|
|
1327
1327
|
/**
|
|
1328
1328
|
* Background Color
|
|
@@ -1664,7 +1664,7 @@ const Qt = (t, r) => {
|
|
|
1664
1664
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
1665
1665
|
*/
|
|
1666
1666
|
"outline-offset": [{
|
|
1667
|
-
"outline-offset": [H,
|
|
1667
|
+
"outline-offset": [H, R, A]
|
|
1668
1668
|
}],
|
|
1669
1669
|
/**
|
|
1670
1670
|
* Outline Width
|
|
@@ -1709,7 +1709,7 @@ const Qt = (t, r) => {
|
|
|
1709
1709
|
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
1710
1710
|
*/
|
|
1711
1711
|
"inset-shadow": [{
|
|
1712
|
-
"inset-shadow": ["none",
|
|
1712
|
+
"inset-shadow": ["none", y, je, De]
|
|
1713
1713
|
}],
|
|
1714
1714
|
/**
|
|
1715
1715
|
* Inset Box Shadow Color
|
|
@@ -1776,7 +1776,7 @@ const Qt = (t, r) => {
|
|
|
1776
1776
|
* @see https://tailwindcss.com/docs/text-shadow
|
|
1777
1777
|
*/
|
|
1778
1778
|
"text-shadow": [{
|
|
1779
|
-
"text-shadow": ["none",
|
|
1779
|
+
"text-shadow": ["none", g, je, De]
|
|
1780
1780
|
}],
|
|
1781
1781
|
/**
|
|
1782
1782
|
* Text Shadow Color
|
|
@@ -1790,7 +1790,7 @@ const Qt = (t, r) => {
|
|
|
1790
1790
|
* @see https://tailwindcss.com/docs/opacity
|
|
1791
1791
|
*/
|
|
1792
1792
|
opacity: [{
|
|
1793
|
-
opacity: [H,
|
|
1793
|
+
opacity: [H, R, A]
|
|
1794
1794
|
}],
|
|
1795
1795
|
/**
|
|
1796
1796
|
* Mix Blend Mode
|
|
@@ -1912,7 +1912,7 @@ const Qt = (t, r) => {
|
|
|
1912
1912
|
"mask-y-to": f()
|
|
1913
1913
|
}],
|
|
1914
1914
|
"mask-image-radial": [{
|
|
1915
|
-
"mask-radial": [
|
|
1915
|
+
"mask-radial": [R, A]
|
|
1916
1916
|
}],
|
|
1917
1917
|
"mask-image-radial-from-pos": [{
|
|
1918
1918
|
"mask-radial-from": X()
|
|
@@ -2000,7 +2000,7 @@ const Qt = (t, r) => {
|
|
|
2000
2000
|
* @see https://tailwindcss.com/docs/mask-image
|
|
2001
2001
|
*/
|
|
2002
2002
|
"mask-image": [{
|
|
2003
|
-
mask: ["none",
|
|
2003
|
+
mask: ["none", R, A]
|
|
2004
2004
|
}],
|
|
2005
2005
|
// ---------------
|
|
2006
2006
|
// --- Filters ---
|
|
@@ -2014,8 +2014,8 @@ const Qt = (t, r) => {
|
|
|
2014
2014
|
// Deprecated since Tailwind CSS v3.0.0
|
|
2015
2015
|
"",
|
|
2016
2016
|
"none",
|
|
2017
|
-
|
|
2018
|
-
|
|
2017
|
+
R,
|
|
2018
|
+
A
|
|
2019
2019
|
]
|
|
2020
2020
|
}],
|
|
2021
2021
|
/**
|
|
@@ -2030,14 +2030,14 @@ const Qt = (t, r) => {
|
|
|
2030
2030
|
* @see https://tailwindcss.com/docs/brightness
|
|
2031
2031
|
*/
|
|
2032
2032
|
brightness: [{
|
|
2033
|
-
brightness: [H,
|
|
2033
|
+
brightness: [H, R, A]
|
|
2034
2034
|
}],
|
|
2035
2035
|
/**
|
|
2036
2036
|
* Contrast
|
|
2037
2037
|
* @see https://tailwindcss.com/docs/contrast
|
|
2038
2038
|
*/
|
|
2039
2039
|
contrast: [{
|
|
2040
|
-
contrast: [H,
|
|
2040
|
+
contrast: [H, R, A]
|
|
2041
2041
|
}],
|
|
2042
2042
|
/**
|
|
2043
2043
|
* Drop Shadow
|
|
@@ -2048,7 +2048,7 @@ const Qt = (t, r) => {
|
|
|
2048
2048
|
// Deprecated since Tailwind CSS v4.0.0
|
|
2049
2049
|
"",
|
|
2050
2050
|
"none",
|
|
2051
|
-
|
|
2051
|
+
k,
|
|
2052
2052
|
je,
|
|
2053
2053
|
De
|
|
2054
2054
|
]
|
|
@@ -2065,35 +2065,35 @@ const Qt = (t, r) => {
|
|
|
2065
2065
|
* @see https://tailwindcss.com/docs/grayscale
|
|
2066
2066
|
*/
|
|
2067
2067
|
grayscale: [{
|
|
2068
|
-
grayscale: ["", H,
|
|
2068
|
+
grayscale: ["", H, R, A]
|
|
2069
2069
|
}],
|
|
2070
2070
|
/**
|
|
2071
2071
|
* Hue Rotate
|
|
2072
2072
|
* @see https://tailwindcss.com/docs/hue-rotate
|
|
2073
2073
|
*/
|
|
2074
2074
|
"hue-rotate": [{
|
|
2075
|
-
"hue-rotate": [H,
|
|
2075
|
+
"hue-rotate": [H, R, A]
|
|
2076
2076
|
}],
|
|
2077
2077
|
/**
|
|
2078
2078
|
* Invert
|
|
2079
2079
|
* @see https://tailwindcss.com/docs/invert
|
|
2080
2080
|
*/
|
|
2081
2081
|
invert: [{
|
|
2082
|
-
invert: ["", H,
|
|
2082
|
+
invert: ["", H, R, A]
|
|
2083
2083
|
}],
|
|
2084
2084
|
/**
|
|
2085
2085
|
* Saturate
|
|
2086
2086
|
* @see https://tailwindcss.com/docs/saturate
|
|
2087
2087
|
*/
|
|
2088
2088
|
saturate: [{
|
|
2089
|
-
saturate: [H,
|
|
2089
|
+
saturate: [H, R, A]
|
|
2090
2090
|
}],
|
|
2091
2091
|
/**
|
|
2092
2092
|
* Sepia
|
|
2093
2093
|
* @see https://tailwindcss.com/docs/sepia
|
|
2094
2094
|
*/
|
|
2095
2095
|
sepia: [{
|
|
2096
|
-
sepia: ["", H,
|
|
2096
|
+
sepia: ["", H, R, A]
|
|
2097
2097
|
}],
|
|
2098
2098
|
/**
|
|
2099
2099
|
* Backdrop Filter
|
|
@@ -2104,8 +2104,8 @@ const Qt = (t, r) => {
|
|
|
2104
2104
|
// Deprecated since Tailwind CSS v3.0.0
|
|
2105
2105
|
"",
|
|
2106
2106
|
"none",
|
|
2107
|
-
|
|
2108
|
-
|
|
2107
|
+
R,
|
|
2108
|
+
A
|
|
2109
2109
|
]
|
|
2110
2110
|
}],
|
|
2111
2111
|
/**
|
|
@@ -2120,56 +2120,56 @@ const Qt = (t, r) => {
|
|
|
2120
2120
|
* @see https://tailwindcss.com/docs/backdrop-brightness
|
|
2121
2121
|
*/
|
|
2122
2122
|
"backdrop-brightness": [{
|
|
2123
|
-
"backdrop-brightness": [H,
|
|
2123
|
+
"backdrop-brightness": [H, R, A]
|
|
2124
2124
|
}],
|
|
2125
2125
|
/**
|
|
2126
2126
|
* Backdrop Contrast
|
|
2127
2127
|
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
2128
2128
|
*/
|
|
2129
2129
|
"backdrop-contrast": [{
|
|
2130
|
-
"backdrop-contrast": [H,
|
|
2130
|
+
"backdrop-contrast": [H, R, A]
|
|
2131
2131
|
}],
|
|
2132
2132
|
/**
|
|
2133
2133
|
* Backdrop Grayscale
|
|
2134
2134
|
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
2135
2135
|
*/
|
|
2136
2136
|
"backdrop-grayscale": [{
|
|
2137
|
-
"backdrop-grayscale": ["", H,
|
|
2137
|
+
"backdrop-grayscale": ["", H, R, A]
|
|
2138
2138
|
}],
|
|
2139
2139
|
/**
|
|
2140
2140
|
* Backdrop Hue Rotate
|
|
2141
2141
|
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
2142
2142
|
*/
|
|
2143
2143
|
"backdrop-hue-rotate": [{
|
|
2144
|
-
"backdrop-hue-rotate": [H,
|
|
2144
|
+
"backdrop-hue-rotate": [H, R, A]
|
|
2145
2145
|
}],
|
|
2146
2146
|
/**
|
|
2147
2147
|
* Backdrop Invert
|
|
2148
2148
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
2149
2149
|
*/
|
|
2150
2150
|
"backdrop-invert": [{
|
|
2151
|
-
"backdrop-invert": ["", H,
|
|
2151
|
+
"backdrop-invert": ["", H, R, A]
|
|
2152
2152
|
}],
|
|
2153
2153
|
/**
|
|
2154
2154
|
* Backdrop Opacity
|
|
2155
2155
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
2156
2156
|
*/
|
|
2157
2157
|
"backdrop-opacity": [{
|
|
2158
|
-
"backdrop-opacity": [H,
|
|
2158
|
+
"backdrop-opacity": [H, R, A]
|
|
2159
2159
|
}],
|
|
2160
2160
|
/**
|
|
2161
2161
|
* Backdrop Saturate
|
|
2162
2162
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
2163
2163
|
*/
|
|
2164
2164
|
"backdrop-saturate": [{
|
|
2165
|
-
"backdrop-saturate": [H,
|
|
2165
|
+
"backdrop-saturate": [H, R, A]
|
|
2166
2166
|
}],
|
|
2167
2167
|
/**
|
|
2168
2168
|
* Backdrop Sepia
|
|
2169
2169
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
2170
2170
|
*/
|
|
2171
2171
|
"backdrop-sepia": [{
|
|
2172
|
-
"backdrop-sepia": ["", H,
|
|
2172
|
+
"backdrop-sepia": ["", H, R, A]
|
|
2173
2173
|
}],
|
|
2174
2174
|
// --------------
|
|
2175
2175
|
// --- Tables ---
|
|
@@ -2224,7 +2224,7 @@ const Qt = (t, r) => {
|
|
|
2224
2224
|
* @see https://tailwindcss.com/docs/transition-property
|
|
2225
2225
|
*/
|
|
2226
2226
|
transition: [{
|
|
2227
|
-
transition: ["", "all", "colors", "opacity", "shadow", "transform", "none",
|
|
2227
|
+
transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", R, A]
|
|
2228
2228
|
}],
|
|
2229
2229
|
/**
|
|
2230
2230
|
* Transition Behavior
|
|
@@ -2238,28 +2238,28 @@ const Qt = (t, r) => {
|
|
|
2238
2238
|
* @see https://tailwindcss.com/docs/transition-duration
|
|
2239
2239
|
*/
|
|
2240
2240
|
duration: [{
|
|
2241
|
-
duration: [H, "initial",
|
|
2241
|
+
duration: [H, "initial", R, A]
|
|
2242
2242
|
}],
|
|
2243
2243
|
/**
|
|
2244
2244
|
* Transition Timing Function
|
|
2245
2245
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
2246
2246
|
*/
|
|
2247
2247
|
ease: [{
|
|
2248
|
-
ease: ["linear", "initial", C,
|
|
2248
|
+
ease: ["linear", "initial", C, R, A]
|
|
2249
2249
|
}],
|
|
2250
2250
|
/**
|
|
2251
2251
|
* Transition Delay
|
|
2252
2252
|
* @see https://tailwindcss.com/docs/transition-delay
|
|
2253
2253
|
*/
|
|
2254
2254
|
delay: [{
|
|
2255
|
-
delay: [H,
|
|
2255
|
+
delay: [H, R, A]
|
|
2256
2256
|
}],
|
|
2257
2257
|
/**
|
|
2258
2258
|
* Animation
|
|
2259
2259
|
* @see https://tailwindcss.com/docs/animation
|
|
2260
2260
|
*/
|
|
2261
2261
|
animate: [{
|
|
2262
|
-
animate: ["none",
|
|
2262
|
+
animate: ["none", P, R, A]
|
|
2263
2263
|
}],
|
|
2264
2264
|
// ------------------
|
|
2265
2265
|
// --- Transforms ---
|
|
@@ -2276,7 +2276,7 @@ const Qt = (t, r) => {
|
|
|
2276
2276
|
* @see https://tailwindcss.com/docs/perspective
|
|
2277
2277
|
*/
|
|
2278
2278
|
perspective: [{
|
|
2279
|
-
perspective: [N,
|
|
2279
|
+
perspective: [N, R, A]
|
|
2280
2280
|
}],
|
|
2281
2281
|
/**
|
|
2282
2282
|
* Perspective Origin
|
|
@@ -2372,7 +2372,7 @@ const Qt = (t, r) => {
|
|
|
2372
2372
|
* @see https://tailwindcss.com/docs/transform
|
|
2373
2373
|
*/
|
|
2374
2374
|
transform: [{
|
|
2375
|
-
transform: [
|
|
2375
|
+
transform: [R, A, "", "none", "gpu", "cpu"]
|
|
2376
2376
|
}],
|
|
2377
2377
|
/**
|
|
2378
2378
|
* Transform Origin
|
|
@@ -2457,7 +2457,7 @@ const Qt = (t, r) => {
|
|
|
2457
2457
|
* @see https://tailwindcss.com/docs/cursor
|
|
2458
2458
|
*/
|
|
2459
2459
|
cursor: [{
|
|
2460
|
-
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out",
|
|
2460
|
+
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", R, A]
|
|
2461
2461
|
}],
|
|
2462
2462
|
/**
|
|
2463
2463
|
* Field Sizing
|
|
@@ -2679,7 +2679,7 @@ const Qt = (t, r) => {
|
|
|
2679
2679
|
* @see https://tailwindcss.com/docs/will-change
|
|
2680
2680
|
*/
|
|
2681
2681
|
"will-change": [{
|
|
2682
|
-
"will-change": ["auto", "scroll", "contents", "transform",
|
|
2682
|
+
"will-change": ["auto", "scroll", "contents", "transform", R, A]
|
|
2683
2683
|
}],
|
|
2684
2684
|
// -----------
|
|
2685
2685
|
// --- SVG ---
|
|
@@ -2776,26 +2776,26 @@ function p(...t) {
|
|
|
2776
2776
|
return jr(qt(t));
|
|
2777
2777
|
}
|
|
2778
2778
|
const Fe = et.forwardRef(
|
|
2779
|
-
({ variant: t = "primary", size: r = "md", loading: o, icon: a, animate: n = !0, className:
|
|
2780
|
-
const u = n !== !1,
|
|
2779
|
+
({ variant: t = "primary", size: r = "md", loading: o, icon: a, animate: n = !0, className: c, children: i, disabled: d, ...l }, m) => {
|
|
2780
|
+
const u = n !== !1, y = "inline-flex items-center justify-center gap-2 font-medium rounded-md transition-all duration-200 touch-target disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.98] flex-shrink-0 whitespace-nowrap", g = {
|
|
2781
2781
|
primary: "bg-primary text-white hover:bg-primary/80 active:bg-primary/80 shadow-sm",
|
|
2782
2782
|
secondary: "bg-secondary text-foreground hover:bg-border active:bg-border-dark",
|
|
2783
2783
|
outline: "bg-transparent text-primary border-1 border-primary hover:bg-secondary active:bg-border",
|
|
2784
2784
|
ghost: "bg-transparent text-primary hover:bg-secondary active:bg-border",
|
|
2785
2785
|
danger: "bg-error text-white hover:bg-red-600 active:bg-red-700 shadow-sm"
|
|
2786
|
-
},
|
|
2786
|
+
}, k = {
|
|
2787
2787
|
sm: "px-3 py-2 text-sm min-h-[2.25rem]",
|
|
2788
2788
|
md: "px-4 py-2.5 text-base min-h-[2.75rem]",
|
|
2789
2789
|
lg: "px-6 py-3.5 text-lg min-h-[3.25rem]"
|
|
2790
2790
|
};
|
|
2791
2791
|
return /* @__PURE__ */ s(
|
|
2792
|
-
|
|
2792
|
+
M.button,
|
|
2793
2793
|
{
|
|
2794
2794
|
ref: m,
|
|
2795
|
-
whileTap: u ? { scale:
|
|
2796
|
-
className: p(
|
|
2797
|
-
disabled:
|
|
2798
|
-
...
|
|
2795
|
+
whileTap: u ? { scale: d || o ? 1 : 0.98 } : void 0,
|
|
2796
|
+
className: p(y, g[t], k[r], c),
|
|
2797
|
+
disabled: d || o,
|
|
2798
|
+
...l,
|
|
2799
2799
|
children: [
|
|
2800
2800
|
o ? /* @__PURE__ */ e(dt, { className: p("h-5 w-5", u && "animate-spin") }) : a ? /* @__PURE__ */ e("span", { className: "shrink-0", children: a }) : null,
|
|
2801
2801
|
i
|
|
@@ -2805,39 +2805,39 @@ const Fe = et.forwardRef(
|
|
|
2805
2805
|
}
|
|
2806
2806
|
);
|
|
2807
2807
|
Fe.displayName = "Button";
|
|
2808
|
-
const
|
|
2808
|
+
const de = ({
|
|
2809
2809
|
open: t,
|
|
2810
2810
|
anchorRef: r,
|
|
2811
2811
|
placement: o,
|
|
2812
2812
|
children: a,
|
|
2813
2813
|
className: n,
|
|
2814
|
-
offset:
|
|
2814
|
+
offset: c = 8,
|
|
2815
2815
|
matchWidth: i = !0
|
|
2816
2816
|
}) => {
|
|
2817
|
-
const [
|
|
2818
|
-
J(() => (
|
|
2819
|
-
const
|
|
2817
|
+
const [d, l] = U(!1), [m, u] = U(null);
|
|
2818
|
+
J(() => (l(!0), () => l(!1)), []);
|
|
2819
|
+
const y = ke(() => {
|
|
2820
2820
|
if (!t || !r.current) return;
|
|
2821
|
-
const
|
|
2821
|
+
const g = r.current.getBoundingClientRect();
|
|
2822
2822
|
u({
|
|
2823
2823
|
position: "fixed",
|
|
2824
|
-
top: o === "top" ?
|
|
2825
|
-
left:
|
|
2826
|
-
width: i ?
|
|
2824
|
+
top: o === "top" ? g.top - c : g.bottom + c,
|
|
2825
|
+
left: g.left,
|
|
2826
|
+
width: i ? g.width : void 0,
|
|
2827
2827
|
zIndex: 70
|
|
2828
2828
|
});
|
|
2829
|
-
}, [r, i,
|
|
2829
|
+
}, [r, i, c, t, o]);
|
|
2830
2830
|
return J(() => {
|
|
2831
2831
|
if (t)
|
|
2832
|
-
return
|
|
2833
|
-
window.removeEventListener("resize",
|
|
2832
|
+
return y(), window.addEventListener("resize", y), window.addEventListener("scroll", y, !0), () => {
|
|
2833
|
+
window.removeEventListener("resize", y), window.removeEventListener("scroll", y, !0);
|
|
2834
2834
|
};
|
|
2835
|
-
}, [t,
|
|
2835
|
+
}, [t, y]), !d || !t || !m ? null : mt(
|
|
2836
2836
|
/* @__PURE__ */ e(
|
|
2837
2837
|
"div",
|
|
2838
2838
|
{
|
|
2839
2839
|
style: m,
|
|
2840
|
-
onMouseDown: (
|
|
2840
|
+
onMouseDown: (g) => g.stopPropagation(),
|
|
2841
2841
|
className: p(o === "top" && "-translate-y-full", n),
|
|
2842
2842
|
children: a
|
|
2843
2843
|
}
|
|
@@ -2850,50 +2850,50 @@ const le = ({
|
|
|
2850
2850
|
label: o,
|
|
2851
2851
|
required: a,
|
|
2852
2852
|
placeholder: n = "Select date",
|
|
2853
|
-
error:
|
|
2853
|
+
error: c,
|
|
2854
2854
|
hint: i,
|
|
2855
|
-
disabled:
|
|
2856
|
-
minDate:
|
|
2855
|
+
disabled: d,
|
|
2856
|
+
minDate: l,
|
|
2857
2857
|
maxDate: m,
|
|
2858
2858
|
className: u,
|
|
2859
|
-
animate:
|
|
2859
|
+
animate: y = !0
|
|
2860
2860
|
}) => {
|
|
2861
|
-
const
|
|
2861
|
+
const g = y !== !1, [k, I] = U(!1), [N, S] = U("bottom"), [C, P] = U(!1), [V, D] = U("bottom"), [z, j] = U(!1), [B, h] = U("bottom"), [L, x] = U(t || /* @__PURE__ */ new Date()), b = Q(null), T = Q(null), E = Q(null), G = Q(null), v = Q(null), F = Q(null);
|
|
2862
2862
|
J(() => {
|
|
2863
|
-
const
|
|
2864
|
-
b.current && !b.current.contains(O.target) && (
|
|
2863
|
+
const w = (O) => {
|
|
2864
|
+
b.current && !b.current.contains(O.target) && (I(!1), P(!1), j(!1));
|
|
2865
2865
|
};
|
|
2866
|
-
return
|
|
2867
|
-
document.removeEventListener("mousedown",
|
|
2866
|
+
return k && document.addEventListener("mousedown", w), () => {
|
|
2867
|
+
document.removeEventListener("mousedown", w);
|
|
2868
2868
|
};
|
|
2869
|
-
}, [
|
|
2870
|
-
|
|
2871
|
-
}, [
|
|
2872
|
-
if (!
|
|
2873
|
-
const
|
|
2869
|
+
}, [k]), J(() => {
|
|
2870
|
+
k || (P(!1), j(!1));
|
|
2871
|
+
}, [k]), J(() => {
|
|
2872
|
+
if (!k) return;
|
|
2873
|
+
const w = () => {
|
|
2874
2874
|
if (!T.current) return;
|
|
2875
|
-
const O = T.current.getBoundingClientRect(), _ = 430,
|
|
2876
|
-
if (
|
|
2877
|
-
|
|
2875
|
+
const O = T.current.getBoundingClientRect(), _ = 430, xe = window.innerHeight - O.bottom - 8, fe = O.top - 8;
|
|
2876
|
+
if (xe >= _) {
|
|
2877
|
+
S("bottom");
|
|
2878
2878
|
return;
|
|
2879
2879
|
}
|
|
2880
2880
|
if (fe >= _) {
|
|
2881
|
-
|
|
2881
|
+
S("top");
|
|
2882
2882
|
return;
|
|
2883
2883
|
}
|
|
2884
|
-
|
|
2884
|
+
S("bottom");
|
|
2885
2885
|
};
|
|
2886
|
-
return
|
|
2887
|
-
window.removeEventListener("resize",
|
|
2886
|
+
return w(), window.addEventListener("resize", w), window.addEventListener("scroll", w, !0), () => {
|
|
2887
|
+
window.removeEventListener("resize", w), window.removeEventListener("scroll", w, !0);
|
|
2888
2888
|
};
|
|
2889
|
-
}, [
|
|
2889
|
+
}, [k]), J(() => {
|
|
2890
2890
|
if (!C) return;
|
|
2891
|
-
const
|
|
2892
|
-
G.current?.querySelector(`button[data-month="${
|
|
2891
|
+
const w = L.getMonth();
|
|
2892
|
+
G.current?.querySelector(`button[data-month="${w}"]`)?.scrollIntoView({ block: "center" });
|
|
2893
2893
|
}, [C, L]), J(() => {
|
|
2894
2894
|
if (!z) return;
|
|
2895
|
-
const
|
|
2896
|
-
F.current?.querySelector(`button[data-year="${
|
|
2895
|
+
const w = L.getFullYear();
|
|
2896
|
+
F.current?.querySelector(`button[data-year="${w}"]`)?.scrollIntoView({ block: "center" });
|
|
2897
2897
|
}, [z, L]);
|
|
2898
2898
|
const W = [
|
|
2899
2899
|
"January",
|
|
@@ -2908,9 +2908,9 @@ const le = ({
|
|
|
2908
2908
|
"October",
|
|
2909
2909
|
"November",
|
|
2910
2910
|
"December"
|
|
2911
|
-
], f = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], q = (
|
|
2912
|
-
const O =
|
|
2913
|
-
for (let Le = 0; Le <
|
|
2911
|
+
], f = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], q = (w) => {
|
|
2912
|
+
const O = w.getFullYear(), _ = w.getMonth(), xe = new Date(O, _, 1), Se = new Date(O, _ + 1, 0).getDate(), le = xe.getDay(), Be = [];
|
|
2913
|
+
for (let Le = 0; Le < le; Le++)
|
|
2914
2914
|
Be.push(null);
|
|
2915
2915
|
for (let Le = 1; Le <= Se; Le++)
|
|
2916
2916
|
Be.push(new Date(O, _, Le));
|
|
@@ -2918,39 +2918,39 @@ const le = ({
|
|
|
2918
2918
|
Be.push(null);
|
|
2919
2919
|
return Be;
|
|
2920
2920
|
}, Y = () => {
|
|
2921
|
-
|
|
2921
|
+
x(new Date(L.getFullYear(), L.getMonth() - 1, 1));
|
|
2922
2922
|
}, $ = () => {
|
|
2923
|
-
|
|
2924
|
-
}, K = (
|
|
2925
|
-
|
|
2926
|
-
}, Z = (
|
|
2927
|
-
|
|
2923
|
+
x(new Date(L.getFullYear(), L.getMonth() + 1, 1));
|
|
2924
|
+
}, K = (w) => {
|
|
2925
|
+
x(new Date(L.getFullYear(), w, 1)), P(!1);
|
|
2926
|
+
}, Z = (w) => {
|
|
2927
|
+
x(new Date(w, L.getMonth(), 1)), j(!1);
|
|
2928
2928
|
}, ee = () => {
|
|
2929
|
-
if (
|
|
2930
|
-
const
|
|
2929
|
+
if (P(!1), !z && v.current) {
|
|
2930
|
+
const w = v.current.getBoundingClientRect(), O = window.innerHeight - w.bottom, _ = w.top;
|
|
2931
2931
|
h(O < 220 && _ > O ? "top" : "bottom");
|
|
2932
2932
|
}
|
|
2933
|
-
j((
|
|
2933
|
+
j((w) => !w);
|
|
2934
2934
|
}, pe = () => {
|
|
2935
|
-
if (j(!1), !C &&
|
|
2936
|
-
const
|
|
2935
|
+
if (j(!1), !C && E.current) {
|
|
2936
|
+
const w = E.current.getBoundingClientRect(), O = window.innerHeight - w.bottom, _ = w.top;
|
|
2937
2937
|
D(O < 220 && _ > O ? "top" : "bottom");
|
|
2938
2938
|
}
|
|
2939
|
-
|
|
2940
|
-
}, be = (
|
|
2941
|
-
r(
|
|
2942
|
-
}, X = (
|
|
2939
|
+
P((w) => !w);
|
|
2940
|
+
}, be = (w) => {
|
|
2941
|
+
r(w), I(!1);
|
|
2942
|
+
}, X = (w) => !!(l && w < l || m && w > m), ve = (w, O) => !w || !O ? !1 : w.getDate() === O.getDate() && w.getMonth() === O.getMonth() && w.getFullYear() === O.getFullYear(), ae = (w) => w ? ve(w, /* @__PURE__ */ new Date()) : !1, ne = (w) => w ? w.toLocaleDateString("en-US", {
|
|
2943
2943
|
year: "numeric",
|
|
2944
2944
|
month: "short",
|
|
2945
2945
|
day: "numeric"
|
|
2946
|
-
}) : "", ie = q(L), re = L.getFullYear(), Ce = L.getMonth(), ce =
|
|
2947
|
-
if (
|
|
2948
|
-
const O =
|
|
2949
|
-
if (re === O &&
|
|
2946
|
+
}) : "", ie = q(L), re = L.getFullYear(), Ce = L.getMonth(), ce = l ? l.getFullYear() : re - 100, me = m ? m.getFullYear() : re + 20, he = Array.from({ length: me - ce + 1 }, (w, O) => ce + O), Re = (w) => {
|
|
2947
|
+
if (l) {
|
|
2948
|
+
const O = l.getFullYear(), _ = l.getMonth();
|
|
2949
|
+
if (re === O && w < _) return !0;
|
|
2950
2950
|
}
|
|
2951
2951
|
if (m) {
|
|
2952
2952
|
const O = m.getFullYear(), _ = m.getMonth();
|
|
2953
|
-
if (re === O &&
|
|
2953
|
+
if (re === O && w > _) return !0;
|
|
2954
2954
|
}
|
|
2955
2955
|
return !1;
|
|
2956
2956
|
}, He = N === "bottom" ? { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 } } : { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 } };
|
|
@@ -2964,8 +2964,8 @@ const le = ({
|
|
|
2964
2964
|
{
|
|
2965
2965
|
ref: T,
|
|
2966
2966
|
type: "button",
|
|
2967
|
-
onClick: () => !
|
|
2968
|
-
disabled:
|
|
2967
|
+
onClick: () => !d && I(!k),
|
|
2968
|
+
disabled: d,
|
|
2969
2969
|
"aria-required": a,
|
|
2970
2970
|
className: p(
|
|
2971
2971
|
"w-full px-4 py-3 rounded-md border transition-all duration-200",
|
|
@@ -2973,9 +2973,9 @@ const le = ({
|
|
|
2973
2973
|
"focus:outline-none focus:ring-1 focus:ring-primary",
|
|
2974
2974
|
"disabled:bg-secondary disabled:cursor-not-allowed",
|
|
2975
2975
|
"touch-target",
|
|
2976
|
-
|
|
2977
|
-
!
|
|
2978
|
-
|
|
2976
|
+
c && "border-error",
|
|
2977
|
+
!c && "border-border",
|
|
2978
|
+
k && "ring-1 ring-primary"
|
|
2979
2979
|
),
|
|
2980
2980
|
children: [
|
|
2981
2981
|
/* @__PURE__ */ e("span", { className: p("truncate", !t && "text-foreground/50"), children: t ? ne(t) : n }),
|
|
@@ -2983,8 +2983,8 @@ const le = ({
|
|
|
2983
2983
|
]
|
|
2984
2984
|
}
|
|
2985
2985
|
),
|
|
2986
|
-
|
|
2987
|
-
|
|
2986
|
+
g ? /* @__PURE__ */ e(se, { children: k ? /* @__PURE__ */ e(de, { open: k, anchorRef: T, placement: N, matchWidth: !1, children: /* @__PURE__ */ s(
|
|
2987
|
+
M.div,
|
|
2988
2988
|
{
|
|
2989
2989
|
initial: He.initial,
|
|
2990
2990
|
animate: He.animate,
|
|
@@ -3007,7 +3007,7 @@ const le = ({
|
|
|
3007
3007
|
/* @__PURE__ */ s(
|
|
3008
3008
|
"button",
|
|
3009
3009
|
{
|
|
3010
|
-
ref:
|
|
3010
|
+
ref: E,
|
|
3011
3011
|
type: "button",
|
|
3012
3012
|
onClick: pe,
|
|
3013
3013
|
className: "h-7 w-20 shrink-0 rounded-md border border-border bg-background px-2 text-[10px] font-medium text-foreground focus:outline-none focus:ring-1 focus:ring-primary flex items-center justify-between gap-1",
|
|
@@ -3016,7 +3016,7 @@ const le = ({
|
|
|
3016
3016
|
"aria-expanded": C,
|
|
3017
3017
|
children: [
|
|
3018
3018
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: W[Ce] }),
|
|
3019
|
-
/* @__PURE__ */ e(
|
|
3019
|
+
/* @__PURE__ */ e(ge, { className: p("w-3 h-3 text-primary transition-transform", C && "rotate-180") })
|
|
3020
3020
|
]
|
|
3021
3021
|
}
|
|
3022
3022
|
),
|
|
@@ -3029,7 +3029,7 @@ const le = ({
|
|
|
3029
3029
|
"absolute z-60 w-36 rounded-md border border-border bg-background shadow-lg py-1 max-h-56 overflow-y-auto",
|
|
3030
3030
|
V === "bottom" ? "top-full mt-1" : "bottom-full mb-1"
|
|
3031
3031
|
),
|
|
3032
|
-
children: W.map((
|
|
3032
|
+
children: W.map((w, O) => {
|
|
3033
3033
|
const _ = Re(O);
|
|
3034
3034
|
return /* @__PURE__ */ e(
|
|
3035
3035
|
"button",
|
|
@@ -3046,9 +3046,9 @@ const le = ({
|
|
|
3046
3046
|
O === Ce && "bg-border text-foreground font-medium",
|
|
3047
3047
|
_ && "text-border-dark cursor-not-allowed"
|
|
3048
3048
|
),
|
|
3049
|
-
children:
|
|
3049
|
+
children: w
|
|
3050
3050
|
},
|
|
3051
|
-
|
|
3051
|
+
w
|
|
3052
3052
|
);
|
|
3053
3053
|
})
|
|
3054
3054
|
}
|
|
@@ -3058,7 +3058,7 @@ const le = ({
|
|
|
3058
3058
|
/* @__PURE__ */ s(
|
|
3059
3059
|
"button",
|
|
3060
3060
|
{
|
|
3061
|
-
ref:
|
|
3061
|
+
ref: v,
|
|
3062
3062
|
type: "button",
|
|
3063
3063
|
onClick: ee,
|
|
3064
3064
|
className: "h-7 w-14 shrink-0 rounded-md border border-border bg-background px-2 text-[10px] font-medium text-foreground focus:outline-none focus:ring-1 focus:ring-primary flex items-center justify-between gap-1",
|
|
@@ -3067,7 +3067,7 @@ const le = ({
|
|
|
3067
3067
|
"aria-expanded": z,
|
|
3068
3068
|
children: [
|
|
3069
3069
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: re }),
|
|
3070
|
-
/* @__PURE__ */ e(
|
|
3070
|
+
/* @__PURE__ */ e(ge, { className: p("w-3 h-3 text-primary transition-transform", z && "rotate-180") })
|
|
3071
3071
|
]
|
|
3072
3072
|
}
|
|
3073
3073
|
),
|
|
@@ -3080,21 +3080,21 @@ const le = ({
|
|
|
3080
3080
|
"absolute z-60 w-28 rounded-md border border-border bg-background shadow-lg py-1 max-h-56 overflow-y-auto",
|
|
3081
3081
|
B === "bottom" ? "top-full mt-1" : "bottom-full mb-1"
|
|
3082
3082
|
),
|
|
3083
|
-
children: he.map((
|
|
3083
|
+
children: he.map((w) => /* @__PURE__ */ e(
|
|
3084
3084
|
"button",
|
|
3085
3085
|
{
|
|
3086
3086
|
type: "button",
|
|
3087
3087
|
role: "option",
|
|
3088
|
-
"data-year":
|
|
3089
|
-
"aria-selected":
|
|
3090
|
-
onClick: () => Z(
|
|
3088
|
+
"data-year": w,
|
|
3089
|
+
"aria-selected": w === re,
|
|
3090
|
+
onClick: () => Z(w),
|
|
3091
3091
|
className: p(
|
|
3092
3092
|
"w-full px-3 py-2 text-xs text-left hover:bg-secondary transition-colors",
|
|
3093
|
-
|
|
3093
|
+
w === re && "bg-border text-foreground font-medium"
|
|
3094
3094
|
),
|
|
3095
|
-
children:
|
|
3095
|
+
children: w
|
|
3096
3096
|
},
|
|
3097
|
-
|
|
3097
|
+
w
|
|
3098
3098
|
))
|
|
3099
3099
|
}
|
|
3100
3100
|
)
|
|
@@ -3110,50 +3110,50 @@ const le = ({
|
|
|
3110
3110
|
}
|
|
3111
3111
|
)
|
|
3112
3112
|
] }),
|
|
3113
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 mb-1", children: f.map((
|
|
3113
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 mb-1", children: f.map((w) => /* @__PURE__ */ e(
|
|
3114
3114
|
"div",
|
|
3115
3115
|
{
|
|
3116
3116
|
className: "text-center text-[10px] font-medium text-foreground/70 py-1",
|
|
3117
|
-
children:
|
|
3117
|
+
children: w
|
|
3118
3118
|
},
|
|
3119
|
-
|
|
3119
|
+
w
|
|
3120
3120
|
)) }),
|
|
3121
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 border border-border rounded-md overflow-hidden", children: ie.map((
|
|
3122
|
-
const _ = (O + 1) % 7 === 0,
|
|
3123
|
-
if (!
|
|
3121
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 border border-border rounded-md overflow-hidden", children: ie.map((w, O) => {
|
|
3122
|
+
const _ = (O + 1) % 7 === 0, xe = Math.floor(O / 7) === Math.floor((ie.length - 1) / 7);
|
|
3123
|
+
if (!w)
|
|
3124
3124
|
return /* @__PURE__ */ e(
|
|
3125
3125
|
"div",
|
|
3126
3126
|
{
|
|
3127
3127
|
className: p(
|
|
3128
3128
|
"h-8 bg-background",
|
|
3129
3129
|
!_ && "border-r border-border",
|
|
3130
|
-
!
|
|
3130
|
+
!xe && "border-b border-border"
|
|
3131
3131
|
)
|
|
3132
3132
|
},
|
|
3133
3133
|
`empty-${O}`
|
|
3134
3134
|
);
|
|
3135
|
-
const fe = ve(
|
|
3135
|
+
const fe = ve(w, t || null), Se = ae(w), le = X(w);
|
|
3136
3136
|
return /* @__PURE__ */ e(
|
|
3137
|
-
|
|
3137
|
+
M.button,
|
|
3138
3138
|
{
|
|
3139
3139
|
type: "button",
|
|
3140
|
-
whileTap:
|
|
3141
|
-
onClick: () => !
|
|
3142
|
-
disabled:
|
|
3140
|
+
whileTap: g ? { scale: le ? 1 : 0.95 } : void 0,
|
|
3141
|
+
onClick: () => !le && be(w),
|
|
3142
|
+
disabled: le,
|
|
3143
3143
|
className: p(
|
|
3144
3144
|
"h-8 w-full cursor-pointer rounded-none flex items-center justify-center",
|
|
3145
3145
|
"text-[10px] font-medium transition-all duration-200",
|
|
3146
3146
|
!_ && "border-r border-border",
|
|
3147
|
-
!
|
|
3147
|
+
!xe && "border-b border-border",
|
|
3148
3148
|
"hover:bg-secondary",
|
|
3149
3149
|
fe && "bg-primary text-white hover:bg-primary/80",
|
|
3150
3150
|
Se && !fe && "border border-primary text-primary",
|
|
3151
|
-
|
|
3152
|
-
!fe && !Se && !
|
|
3151
|
+
le && "text-border-dark cursor-not-allowed hover:bg-transparent",
|
|
3152
|
+
!fe && !Se && !le && "text-foreground"
|
|
3153
3153
|
),
|
|
3154
|
-
children:
|
|
3154
|
+
children: w.getDate()
|
|
3155
3155
|
},
|
|
3156
|
-
|
|
3156
|
+
w.toISOString()
|
|
3157
3157
|
);
|
|
3158
3158
|
}) }),
|
|
3159
3159
|
/* @__PURE__ */ e("div", { className: "mt-1.5", children: /* @__PURE__ */ e(
|
|
@@ -3167,7 +3167,7 @@ const le = ({
|
|
|
3167
3167
|
) })
|
|
3168
3168
|
]
|
|
3169
3169
|
}
|
|
3170
|
-
) }) : null }) :
|
|
3170
|
+
) }) : null }) : k && /* @__PURE__ */ e(de, { open: k, anchorRef: T, placement: N, matchWidth: !1, children: /* @__PURE__ */ s("div", { className: "z-50 w-72 bg-background rounded-md border border-border shadow-lg p-2.5", children: [
|
|
3171
3171
|
/* @__PURE__ */ s("div", { className: "grid grid-cols-[auto_1fr_auto] items-center gap-1.5 mb-3", children: [
|
|
3172
3172
|
/* @__PURE__ */ e(
|
|
3173
3173
|
"button",
|
|
@@ -3183,7 +3183,7 @@ const le = ({
|
|
|
3183
3183
|
/* @__PURE__ */ s(
|
|
3184
3184
|
"button",
|
|
3185
3185
|
{
|
|
3186
|
-
ref:
|
|
3186
|
+
ref: E,
|
|
3187
3187
|
type: "button",
|
|
3188
3188
|
onClick: pe,
|
|
3189
3189
|
className: "h-7 w-20 shrink-0 rounded-md border border-border bg-background px-2 text-[10px] font-medium text-foreground focus:outline-none focus:ring-1 focus:ring-primary flex items-center justify-between gap-1",
|
|
@@ -3192,7 +3192,7 @@ const le = ({
|
|
|
3192
3192
|
"aria-expanded": C,
|
|
3193
3193
|
children: [
|
|
3194
3194
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: W[Ce] }),
|
|
3195
|
-
/* @__PURE__ */ e(
|
|
3195
|
+
/* @__PURE__ */ e(ge, { className: p("w-3 h-3 text-primary transition-transform", C && "rotate-180") })
|
|
3196
3196
|
]
|
|
3197
3197
|
}
|
|
3198
3198
|
),
|
|
@@ -3205,7 +3205,7 @@ const le = ({
|
|
|
3205
3205
|
"absolute z-60 w-36 rounded-md border border-border bg-background shadow-lg py-1 max-h-56 overflow-y-auto",
|
|
3206
3206
|
V === "bottom" ? "top-full mt-1" : "bottom-full mb-1"
|
|
3207
3207
|
),
|
|
3208
|
-
children: W.map((
|
|
3208
|
+
children: W.map((w, O) => {
|
|
3209
3209
|
const _ = Re(O);
|
|
3210
3210
|
return /* @__PURE__ */ e(
|
|
3211
3211
|
"button",
|
|
@@ -3222,9 +3222,9 @@ const le = ({
|
|
|
3222
3222
|
O === Ce && "bg-border text-foreground font-medium",
|
|
3223
3223
|
_ && "text-border-dark cursor-not-allowed"
|
|
3224
3224
|
),
|
|
3225
|
-
children:
|
|
3225
|
+
children: w
|
|
3226
3226
|
},
|
|
3227
|
-
|
|
3227
|
+
w
|
|
3228
3228
|
);
|
|
3229
3229
|
})
|
|
3230
3230
|
}
|
|
@@ -3234,7 +3234,7 @@ const le = ({
|
|
|
3234
3234
|
/* @__PURE__ */ s(
|
|
3235
3235
|
"button",
|
|
3236
3236
|
{
|
|
3237
|
-
ref:
|
|
3237
|
+
ref: v,
|
|
3238
3238
|
type: "button",
|
|
3239
3239
|
onClick: ee,
|
|
3240
3240
|
className: "h-7 w-14 shrink-0 rounded-md border border-border bg-background px-2 text-[10px] font-medium text-foreground focus:outline-none focus:ring-1 focus:ring-primary flex items-center justify-between gap-1",
|
|
@@ -3243,7 +3243,7 @@ const le = ({
|
|
|
3243
3243
|
"aria-expanded": z,
|
|
3244
3244
|
children: [
|
|
3245
3245
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: re }),
|
|
3246
|
-
/* @__PURE__ */ e(
|
|
3246
|
+
/* @__PURE__ */ e(ge, { className: p("w-3 h-3 text-primary transition-transform", z && "rotate-180") })
|
|
3247
3247
|
]
|
|
3248
3248
|
}
|
|
3249
3249
|
),
|
|
@@ -3256,21 +3256,21 @@ const le = ({
|
|
|
3256
3256
|
"absolute z-60 w-28 rounded-md border border-border bg-background shadow-lg py-1 max-h-56 overflow-y-auto",
|
|
3257
3257
|
B === "bottom" ? "top-full mt-1" : "bottom-full mb-1"
|
|
3258
3258
|
),
|
|
3259
|
-
children: he.map((
|
|
3259
|
+
children: he.map((w) => /* @__PURE__ */ e(
|
|
3260
3260
|
"button",
|
|
3261
3261
|
{
|
|
3262
3262
|
type: "button",
|
|
3263
3263
|
role: "option",
|
|
3264
|
-
"data-year":
|
|
3265
|
-
"aria-selected":
|
|
3266
|
-
onClick: () => Z(
|
|
3264
|
+
"data-year": w,
|
|
3265
|
+
"aria-selected": w === re,
|
|
3266
|
+
onClick: () => Z(w),
|
|
3267
3267
|
className: p(
|
|
3268
3268
|
"w-full px-3 py-2 text-xs text-left hover:bg-secondary transition-colors",
|
|
3269
|
-
|
|
3269
|
+
w === re && "bg-border text-foreground font-medium"
|
|
3270
3270
|
),
|
|
3271
|
-
children:
|
|
3271
|
+
children: w
|
|
3272
3272
|
},
|
|
3273
|
-
|
|
3273
|
+
w
|
|
3274
3274
|
))
|
|
3275
3275
|
}
|
|
3276
3276
|
)
|
|
@@ -3286,49 +3286,49 @@ const le = ({
|
|
|
3286
3286
|
}
|
|
3287
3287
|
)
|
|
3288
3288
|
] }),
|
|
3289
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 mb-1", children: f.map((
|
|
3289
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 mb-1", children: f.map((w) => /* @__PURE__ */ e(
|
|
3290
3290
|
"div",
|
|
3291
3291
|
{
|
|
3292
3292
|
className: "text-center text-[10px] font-medium text-primary/70 py-1",
|
|
3293
|
-
children:
|
|
3293
|
+
children: w
|
|
3294
3294
|
},
|
|
3295
|
-
|
|
3295
|
+
w
|
|
3296
3296
|
)) }),
|
|
3297
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 border border-border rounded-md overflow-hidden", children: ie.map((
|
|
3298
|
-
const _ = (O + 1) % 7 === 0,
|
|
3299
|
-
if (!
|
|
3297
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 border border-border rounded-md overflow-hidden", children: ie.map((w, O) => {
|
|
3298
|
+
const _ = (O + 1) % 7 === 0, xe = Math.floor(O / 7) === Math.floor((ie.length - 1) / 7);
|
|
3299
|
+
if (!w)
|
|
3300
3300
|
return /* @__PURE__ */ e(
|
|
3301
3301
|
"div",
|
|
3302
3302
|
{
|
|
3303
3303
|
className: p(
|
|
3304
3304
|
"h-8 bg-background",
|
|
3305
3305
|
!_ && "border-r border-border",
|
|
3306
|
-
!
|
|
3306
|
+
!xe && "border-b border-border"
|
|
3307
3307
|
)
|
|
3308
3308
|
},
|
|
3309
3309
|
`empty-${O}`
|
|
3310
3310
|
);
|
|
3311
|
-
const fe = ve(
|
|
3311
|
+
const fe = ve(w, t || null), Se = ae(w), le = X(w);
|
|
3312
3312
|
return /* @__PURE__ */ e(
|
|
3313
3313
|
"button",
|
|
3314
3314
|
{
|
|
3315
3315
|
type: "button",
|
|
3316
|
-
onClick: () => !
|
|
3317
|
-
disabled:
|
|
3316
|
+
onClick: () => !le && be(w),
|
|
3317
|
+
disabled: le,
|
|
3318
3318
|
className: p(
|
|
3319
3319
|
"h-8 w-full rounded-none flex items-center justify-center",
|
|
3320
3320
|
"text-[10px] font-medium transition-all duration-200",
|
|
3321
3321
|
!_ && "border-r border-border",
|
|
3322
|
-
!
|
|
3322
|
+
!xe && "border-b border-border",
|
|
3323
3323
|
"hover:bg-secondary",
|
|
3324
3324
|
fe && "bg-primary text-white hover:bg-primary/80",
|
|
3325
3325
|
Se && !fe && "border border-primary text-primary",
|
|
3326
|
-
|
|
3327
|
-
!fe && !Se && !
|
|
3326
|
+
le && "text-border-dark cursor-not-allowed hover:bg-transparent",
|
|
3327
|
+
!fe && !Se && !le && "text-foreground"
|
|
3328
3328
|
),
|
|
3329
|
-
children:
|
|
3329
|
+
children: w.getDate()
|
|
3330
3330
|
},
|
|
3331
|
-
|
|
3331
|
+
w.toISOString()
|
|
3332
3332
|
);
|
|
3333
3333
|
}) }),
|
|
3334
3334
|
/* @__PURE__ */ e("div", { className: "mt-1.5 pt-1.5", children: /* @__PURE__ */ e(
|
|
@@ -3341,15 +3341,15 @@ const le = ({
|
|
|
3341
3341
|
}
|
|
3342
3342
|
) })
|
|
3343
3343
|
] }) }),
|
|
3344
|
-
|
|
3345
|
-
|
|
3344
|
+
c && /* @__PURE__ */ e(
|
|
3345
|
+
M.p,
|
|
3346
3346
|
{
|
|
3347
|
-
...
|
|
3347
|
+
...g ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
3348
3348
|
className: "mt-1.5 text-sm text-error",
|
|
3349
|
-
children:
|
|
3349
|
+
children: c
|
|
3350
3350
|
}
|
|
3351
3351
|
),
|
|
3352
|
-
i && !
|
|
3352
|
+
i && !c && /* @__PURE__ */ e("p", { className: "mt-1.5 text-sm text-primary/70", children: i })
|
|
3353
3353
|
] });
|
|
3354
3354
|
}, ue = [
|
|
3355
3355
|
{ iso2: "AF", name: "Afghanistan", dialCode: "+93" },
|
|
@@ -3603,36 +3603,36 @@ const le = ({
|
|
|
3603
3603
|
onCountryChange: o,
|
|
3604
3604
|
label: a = "Country",
|
|
3605
3605
|
required: n,
|
|
3606
|
-
placeholder:
|
|
3606
|
+
placeholder: c = "Select country",
|
|
3607
3607
|
error: i,
|
|
3608
|
-
hint:
|
|
3609
|
-
searchable:
|
|
3608
|
+
hint: d,
|
|
3609
|
+
searchable: l = !0,
|
|
3610
3610
|
clearable: m = !0,
|
|
3611
3611
|
showFlags: u = !0,
|
|
3612
|
-
disabled:
|
|
3613
|
-
animate:
|
|
3614
|
-
className:
|
|
3612
|
+
disabled: y,
|
|
3613
|
+
animate: g = !0,
|
|
3614
|
+
className: k
|
|
3615
3615
|
}) => {
|
|
3616
|
-
const
|
|
3617
|
-
if (!
|
|
3616
|
+
const I = g !== !1, [N, S] = U(!1), [C, P] = U(""), [V, D] = U("bottom"), z = Q(null), j = Q(null), B = Ae(() => ue.find((b) => b.iso2 === t), [t]), h = Ae(() => {
|
|
3617
|
+
if (!l || !C.trim()) return ue;
|
|
3618
3618
|
const b = C.toLowerCase();
|
|
3619
3619
|
return ue.filter((T) => T.name.toLowerCase().includes(b) || T.iso2.toLowerCase().includes(b) || T.dialCode.replace(/\s/g, "").includes(b.replace(/\s/g, "")));
|
|
3620
|
-
}, [C,
|
|
3620
|
+
}, [C, l]);
|
|
3621
3621
|
J(() => {
|
|
3622
3622
|
const b = (T) => {
|
|
3623
|
-
z.current && !z.current.contains(T.target) && (
|
|
3623
|
+
z.current && !z.current.contains(T.target) && (S(!1), P(""));
|
|
3624
3624
|
};
|
|
3625
3625
|
return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
|
|
3626
3626
|
}, []), J(() => {
|
|
3627
3627
|
if (!N) return;
|
|
3628
3628
|
const b = () => {
|
|
3629
3629
|
if (!j.current) return;
|
|
3630
|
-
const T = j.current.getBoundingClientRect(),
|
|
3631
|
-
if (G >=
|
|
3630
|
+
const T = j.current.getBoundingClientRect(), E = l ? 360 : 300, G = window.innerHeight - T.bottom - 8, v = T.top - 8;
|
|
3631
|
+
if (G >= E) {
|
|
3632
3632
|
D("bottom");
|
|
3633
3633
|
return;
|
|
3634
3634
|
}
|
|
3635
|
-
if (
|
|
3635
|
+
if (v >= E) {
|
|
3636
3636
|
D("top");
|
|
3637
3637
|
return;
|
|
3638
3638
|
}
|
|
@@ -3641,13 +3641,13 @@ const le = ({
|
|
|
3641
3641
|
return b(), window.addEventListener("resize", b), window.addEventListener("scroll", b, !0), () => {
|
|
3642
3642
|
window.removeEventListener("resize", b), window.removeEventListener("scroll", b, !0);
|
|
3643
3643
|
};
|
|
3644
|
-
}, [N,
|
|
3644
|
+
}, [N, l]);
|
|
3645
3645
|
const L = (b) => {
|
|
3646
3646
|
r?.(b);
|
|
3647
|
-
const T = ue.find((
|
|
3648
|
-
T && o?.(T),
|
|
3649
|
-
},
|
|
3650
|
-
return /* @__PURE__ */ s("div", { ref: z, className: p("w-full space-y-1.5",
|
|
3647
|
+
const T = ue.find((E) => E.iso2 === b);
|
|
3648
|
+
T && o?.(T), S(!1), P("");
|
|
3649
|
+
}, x = V === "top" ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 } } : { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 } };
|
|
3650
|
+
return /* @__PURE__ */ s("div", { ref: z, className: p("w-full space-y-1.5", k), children: [
|
|
3651
3651
|
a && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
3652
3652
|
a,
|
|
3653
3653
|
n && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
@@ -3657,8 +3657,8 @@ const le = ({
|
|
|
3657
3657
|
"button",
|
|
3658
3658
|
{
|
|
3659
3659
|
type: "button",
|
|
3660
|
-
onClick: () => !
|
|
3661
|
-
disabled:
|
|
3660
|
+
onClick: () => !y && S(!N),
|
|
3661
|
+
disabled: y,
|
|
3662
3662
|
"aria-haspopup": "listbox",
|
|
3663
3663
|
"aria-expanded": N,
|
|
3664
3664
|
"aria-required": n,
|
|
@@ -3670,16 +3670,16 @@ const le = ({
|
|
|
3670
3670
|
"touch-target text-base",
|
|
3671
3671
|
i && "border-error focus:ring-error",
|
|
3672
3672
|
N && "ring-2 ring-primary",
|
|
3673
|
-
!i && (
|
|
3674
|
-
i &&
|
|
3673
|
+
!i && (y ? "opacity-50" : "border-border"),
|
|
3674
|
+
i && y && "opacity-50"
|
|
3675
3675
|
),
|
|
3676
3676
|
children: [
|
|
3677
3677
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
3678
3678
|
u && B && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: Ke(B.iso2) }),
|
|
3679
|
-
/* @__PURE__ */ e("span", { className: p("truncate", !B && "text-foreground/50"), children: B ? B.name :
|
|
3679
|
+
/* @__PURE__ */ e("span", { className: p("truncate", !B && "text-foreground/50"), children: B ? B.name : c })
|
|
3680
3680
|
] }),
|
|
3681
3681
|
/* @__PURE__ */ e(
|
|
3682
|
-
|
|
3682
|
+
ge,
|
|
3683
3683
|
{
|
|
3684
3684
|
className: p(
|
|
3685
3685
|
"w-5 h-5 text-primary transition-transform shrink-0",
|
|
@@ -3690,25 +3690,25 @@ const le = ({
|
|
|
3690
3690
|
]
|
|
3691
3691
|
}
|
|
3692
3692
|
),
|
|
3693
|
-
|
|
3694
|
-
|
|
3693
|
+
I ? /* @__PURE__ */ e(se, { children: N ? /* @__PURE__ */ e(de, { open: N, anchorRef: j, placement: V, children: /* @__PURE__ */ s(
|
|
3694
|
+
M.div,
|
|
3695
3695
|
{
|
|
3696
|
-
initial:
|
|
3697
|
-
animate:
|
|
3698
|
-
exit:
|
|
3696
|
+
initial: x.initial,
|
|
3697
|
+
animate: x.animate,
|
|
3698
|
+
exit: x.exit,
|
|
3699
3699
|
transition: { duration: 0.2 },
|
|
3700
3700
|
role: "listbox",
|
|
3701
3701
|
className: "z-50 w-full max-w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden overflow-x-hidden",
|
|
3702
3702
|
children: [
|
|
3703
|
-
|
|
3704
|
-
/* @__PURE__ */ e(
|
|
3703
|
+
l && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
3704
|
+
/* @__PURE__ */ e(ye, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
3705
3705
|
/* @__PURE__ */ e(
|
|
3706
3706
|
"input",
|
|
3707
3707
|
{
|
|
3708
3708
|
type: "text",
|
|
3709
3709
|
placeholder: "Search country or code",
|
|
3710
3710
|
value: C,
|
|
3711
|
-
onChange: (b) =>
|
|
3711
|
+
onChange: (b) => P(b.target.value),
|
|
3712
3712
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary"
|
|
3713
3713
|
}
|
|
3714
3714
|
),
|
|
@@ -3716,7 +3716,7 @@ const le = ({
|
|
|
3716
3716
|
"button",
|
|
3717
3717
|
{
|
|
3718
3718
|
type: "button",
|
|
3719
|
-
onClick: () =>
|
|
3719
|
+
onClick: () => P(""),
|
|
3720
3720
|
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
3721
3721
|
"aria-label": "Clear search",
|
|
3722
3722
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4 text-primary/50 hover:text-primary" })
|
|
@@ -3763,21 +3763,21 @@ const le = ({
|
|
|
3763
3763
|
] })
|
|
3764
3764
|
]
|
|
3765
3765
|
}
|
|
3766
|
-
) }) : null }) : N && /* @__PURE__ */ e(
|
|
3766
|
+
) }) : null }) : N && /* @__PURE__ */ e(de, { open: N, anchorRef: j, placement: V, children: /* @__PURE__ */ s(
|
|
3767
3767
|
"div",
|
|
3768
3768
|
{
|
|
3769
3769
|
role: "listbox",
|
|
3770
3770
|
className: "z-50 w-full max-w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden overflow-x-hidden",
|
|
3771
3771
|
children: [
|
|
3772
|
-
|
|
3773
|
-
/* @__PURE__ */ e(
|
|
3772
|
+
l && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
3773
|
+
/* @__PURE__ */ e(ye, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
3774
3774
|
/* @__PURE__ */ e(
|
|
3775
3775
|
"input",
|
|
3776
3776
|
{
|
|
3777
3777
|
type: "text",
|
|
3778
3778
|
placeholder: "Search country or code",
|
|
3779
3779
|
value: C,
|
|
3780
|
-
onChange: (b) =>
|
|
3780
|
+
onChange: (b) => P(b.target.value),
|
|
3781
3781
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary"
|
|
3782
3782
|
}
|
|
3783
3783
|
),
|
|
@@ -3785,7 +3785,7 @@ const le = ({
|
|
|
3785
3785
|
"button",
|
|
3786
3786
|
{
|
|
3787
3787
|
type: "button",
|
|
3788
|
-
onClick: () =>
|
|
3788
|
+
onClick: () => P(""),
|
|
3789
3789
|
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
3790
3790
|
"aria-label": "Clear search",
|
|
3791
3791
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4 text-primary/50 hover:text-primary" })
|
|
@@ -3835,14 +3835,14 @@ const le = ({
|
|
|
3835
3835
|
) })
|
|
3836
3836
|
] }),
|
|
3837
3837
|
i && /* @__PURE__ */ e(
|
|
3838
|
-
|
|
3838
|
+
M.p,
|
|
3839
3839
|
{
|
|
3840
|
-
...
|
|
3840
|
+
...I ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
3841
3841
|
className: "text-sm text-error",
|
|
3842
3842
|
children: i
|
|
3843
3843
|
}
|
|
3844
3844
|
),
|
|
3845
|
-
|
|
3845
|
+
d && !i && /* @__PURE__ */ e("p", { className: "text-sm text-primary/70", children: d })
|
|
3846
3846
|
] });
|
|
3847
3847
|
};
|
|
3848
3848
|
St.displayName = "CountrySelect";
|
|
@@ -3857,11 +3857,11 @@ const _e = (t) => {
|
|
|
3857
3857
|
const o = t.replace(/\s/g, ""), a = o.startsWith("00") ? `+${o.slice(2)}` : o;
|
|
3858
3858
|
if (!a.startsWith("+")) return;
|
|
3859
3859
|
const n = ue.filter((i) => {
|
|
3860
|
-
const
|
|
3861
|
-
return a.startsWith(
|
|
3862
|
-
}),
|
|
3863
|
-
return
|
|
3864
|
-
(i,
|
|
3860
|
+
const d = Oe(i.dialCode);
|
|
3861
|
+
return a.startsWith(d);
|
|
3862
|
+
}), c = r ? n.find((i) => i.iso2 === r.toUpperCase()) : void 0;
|
|
3863
|
+
return c || [...n].sort(
|
|
3864
|
+
(i, d) => Oe(d.dialCode).length - Oe(i.dialCode).length
|
|
3865
3865
|
)[0];
|
|
3866
3866
|
}, Mt = ({
|
|
3867
3867
|
value: t,
|
|
@@ -3869,20 +3869,20 @@ const _e = (t) => {
|
|
|
3869
3869
|
country: o,
|
|
3870
3870
|
defaultCountry: a = "KE",
|
|
3871
3871
|
autoDetect: n = !1,
|
|
3872
|
-
onCountryChange:
|
|
3872
|
+
onCountryChange: c,
|
|
3873
3873
|
label: i,
|
|
3874
|
-
error:
|
|
3875
|
-
hint:
|
|
3874
|
+
error: d,
|
|
3875
|
+
hint: l,
|
|
3876
3876
|
searchable: m = !0,
|
|
3877
3877
|
showFlags: u = !0,
|
|
3878
|
-
animate:
|
|
3879
|
-
disabled:
|
|
3880
|
-
required:
|
|
3881
|
-
className:
|
|
3878
|
+
animate: y = !0,
|
|
3879
|
+
disabled: g,
|
|
3880
|
+
required: k,
|
|
3881
|
+
className: I,
|
|
3882
3882
|
placeholder: N,
|
|
3883
|
-
...
|
|
3883
|
+
...S
|
|
3884
3884
|
}) => {
|
|
3885
|
-
const C =
|
|
3885
|
+
const C = y !== !1, [P, V] = U(!1), [D, z] = U(""), [j, B] = U(a), [h, L] = U("bottom"), x = Q(null), b = Q(null), T = Q(null), E = Q(!1);
|
|
3886
3886
|
J(() => {
|
|
3887
3887
|
o && B(o.toUpperCase());
|
|
3888
3888
|
}, [o]), J(() => {
|
|
@@ -3892,7 +3892,7 @@ const _e = (t) => {
|
|
|
3892
3892
|
}
|
|
3893
3893
|
}, [n, o]), J(() => {
|
|
3894
3894
|
const f = (q) => {
|
|
3895
|
-
|
|
3895
|
+
x.current && !x.current.contains(q.target) && (V(!1), z(""));
|
|
3896
3896
|
};
|
|
3897
3897
|
return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
|
|
3898
3898
|
}, []);
|
|
@@ -3910,11 +3910,11 @@ const _e = (t) => {
|
|
|
3910
3910
|
const f = Je(t, j);
|
|
3911
3911
|
f && f.iso2 !== j && B(f.iso2);
|
|
3912
3912
|
}, [o, t, j]), J(() => {
|
|
3913
|
-
G && T.current !== G.iso2 && (T.current = G.iso2,
|
|
3914
|
-
}, [G,
|
|
3915
|
-
|
|
3913
|
+
G && T.current !== G.iso2 && (T.current = G.iso2, c?.(G));
|
|
3914
|
+
}, [G, c]), J(() => {
|
|
3915
|
+
E.current || r && (t ?? "").trim() === "" && (E.current = !0, r(G.dialCode));
|
|
3916
3916
|
}, [r, G.dialCode, t]), J(() => {
|
|
3917
|
-
if (!
|
|
3917
|
+
if (!P) return;
|
|
3918
3918
|
const f = () => {
|
|
3919
3919
|
if (!b.current) return;
|
|
3920
3920
|
const q = b.current.getBoundingClientRect(), Y = m ? 360 : 300, $ = window.innerHeight - q.bottom - 8, K = q.top - 8;
|
|
@@ -3931,21 +3931,21 @@ const _e = (t) => {
|
|
|
3931
3931
|
return f(), window.addEventListener("resize", f), window.addEventListener("scroll", f, !0), () => {
|
|
3932
3932
|
window.removeEventListener("resize", f), window.removeEventListener("scroll", f, !0);
|
|
3933
3933
|
};
|
|
3934
|
-
}, [
|
|
3935
|
-
const
|
|
3934
|
+
}, [P, m]);
|
|
3935
|
+
const v = Ae(() => {
|
|
3936
3936
|
if (!m || !D.trim()) return ue;
|
|
3937
3937
|
const f = D.toLowerCase();
|
|
3938
3938
|
return ue.filter((q) => q.name.toLowerCase().includes(f) || q.iso2.toLowerCase().includes(f) || q.dialCode.replace(/\s/g, "").includes(f.replace(/\s/g, "")));
|
|
3939
3939
|
}, [D, m]), F = (f) => {
|
|
3940
|
-
o || B(f.iso2),
|
|
3940
|
+
o || B(f.iso2), c?.(f);
|
|
3941
3941
|
const q = (t ?? "").replace(/\s/g, ""), Y = Je(q, o || j), $ = Y ? Oe(Y.dialCode) : "";
|
|
3942
3942
|
let K = f.dialCode;
|
|
3943
3943
|
q && ($ && q.startsWith($) ? K = `${f.dialCode}${q.slice($.length)}` : q.startsWith("+") ? K = `${f.dialCode}${q.replace(/^\+[\d-]*/, "")}` : K = `${f.dialCode}${q}`), r?.(K), V(!1), z("");
|
|
3944
3944
|
}, W = h === "top" ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 } } : { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 } };
|
|
3945
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
3945
|
+
return /* @__PURE__ */ s("div", { ref: x, className: p("w-full space-y-1.5", I), children: [
|
|
3946
3946
|
i && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
3947
3947
|
i,
|
|
3948
|
-
|
|
3948
|
+
k && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
3949
3949
|
] }),
|
|
3950
3950
|
/* @__PURE__ */ s("div", { ref: b, className: "relative", children: [
|
|
3951
3951
|
/* @__PURE__ */ s(
|
|
@@ -3955,15 +3955,15 @@ const _e = (t) => {
|
|
|
3955
3955
|
"flex items-stretch rounded-md border transition-all duration-200 bg-background overflow-hidden",
|
|
3956
3956
|
"focus-within:ring-2 focus-within:ring-primary focus-within:border-transparent",
|
|
3957
3957
|
"disabled:bg-secondary disabled:cursor-not-allowed",
|
|
3958
|
-
|
|
3958
|
+
d ? "border-error" : "border-border"
|
|
3959
3959
|
),
|
|
3960
3960
|
children: [
|
|
3961
3961
|
/* @__PURE__ */ s(
|
|
3962
3962
|
"button",
|
|
3963
3963
|
{
|
|
3964
3964
|
type: "button",
|
|
3965
|
-
onClick: () => !
|
|
3966
|
-
disabled:
|
|
3965
|
+
onClick: () => !g && V(!P),
|
|
3966
|
+
disabled: g,
|
|
3967
3967
|
className: p(
|
|
3968
3968
|
"flex items-center gap-2 px-3 py-2 text-left",
|
|
3969
3969
|
"border-r border-border/70",
|
|
@@ -3971,16 +3971,16 @@ const _e = (t) => {
|
|
|
3971
3971
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
3972
3972
|
),
|
|
3973
3973
|
"aria-haspopup": "listbox",
|
|
3974
|
-
"aria-expanded":
|
|
3974
|
+
"aria-expanded": P,
|
|
3975
3975
|
children: [
|
|
3976
3976
|
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: _e(G.iso2) }),
|
|
3977
3977
|
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: G.iso2 }),
|
|
3978
3978
|
/* @__PURE__ */ e(
|
|
3979
|
-
|
|
3979
|
+
ge,
|
|
3980
3980
|
{
|
|
3981
3981
|
className: p(
|
|
3982
3982
|
"w-4 h-4 text-primary transition-transform",
|
|
3983
|
-
|
|
3983
|
+
P && "rotate-180"
|
|
3984
3984
|
)
|
|
3985
3985
|
}
|
|
3986
3986
|
)
|
|
@@ -3995,21 +3995,21 @@ const _e = (t) => {
|
|
|
3995
3995
|
value: t ?? "",
|
|
3996
3996
|
onChange: (f) => r?.(f.target.value),
|
|
3997
3997
|
placeholder: N || `${G.dialCode} Phone number`,
|
|
3998
|
-
disabled:
|
|
3999
|
-
required:
|
|
3998
|
+
disabled: g,
|
|
3999
|
+
required: k,
|
|
4000
4000
|
className: p(
|
|
4001
4001
|
"flex-1 px-4 py-2.5 text-base bg-transparent text-foreground",
|
|
4002
4002
|
"placeholder:text-foreground/50 focus:outline-none",
|
|
4003
4003
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
4004
4004
|
),
|
|
4005
|
-
...
|
|
4005
|
+
...S
|
|
4006
4006
|
}
|
|
4007
4007
|
)
|
|
4008
4008
|
]
|
|
4009
4009
|
}
|
|
4010
4010
|
),
|
|
4011
|
-
C ? /* @__PURE__ */ e(
|
|
4012
|
-
|
|
4011
|
+
C ? /* @__PURE__ */ e(se, { children: P ? /* @__PURE__ */ e(de, { open: P, anchorRef: b, placement: h, children: /* @__PURE__ */ s(
|
|
4012
|
+
M.div,
|
|
4013
4013
|
{
|
|
4014
4014
|
initial: W.initial,
|
|
4015
4015
|
animate: W.animate,
|
|
@@ -4019,7 +4019,7 @@ const _e = (t) => {
|
|
|
4019
4019
|
className: "z-50 w-full max-w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden overflow-x-hidden",
|
|
4020
4020
|
children: [
|
|
4021
4021
|
m && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4022
|
-
/* @__PURE__ */ e(
|
|
4022
|
+
/* @__PURE__ */ e(ye, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
4023
4023
|
/* @__PURE__ */ e(
|
|
4024
4024
|
"input",
|
|
4025
4025
|
{
|
|
@@ -4041,7 +4041,7 @@ const _e = (t) => {
|
|
|
4041
4041
|
}
|
|
4042
4042
|
)
|
|
4043
4043
|
] }) }),
|
|
4044
|
-
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children:
|
|
4044
|
+
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: v.map((f) => /* @__PURE__ */ s(
|
|
4045
4045
|
"button",
|
|
4046
4046
|
{
|
|
4047
4047
|
type: "button",
|
|
@@ -4063,14 +4063,14 @@ const _e = (t) => {
|
|
|
4063
4063
|
)) })
|
|
4064
4064
|
]
|
|
4065
4065
|
}
|
|
4066
|
-
) }) : null }) :
|
|
4066
|
+
) }) : null }) : P && /* @__PURE__ */ e(de, { open: P, anchorRef: b, placement: h, children: /* @__PURE__ */ s(
|
|
4067
4067
|
"div",
|
|
4068
4068
|
{
|
|
4069
4069
|
role: "listbox",
|
|
4070
4070
|
className: "z-50 w-full max-w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden overflow-x-hidden",
|
|
4071
4071
|
children: [
|
|
4072
4072
|
m && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4073
|
-
/* @__PURE__ */ e(
|
|
4073
|
+
/* @__PURE__ */ e(ye, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
4074
4074
|
/* @__PURE__ */ e(
|
|
4075
4075
|
"input",
|
|
4076
4076
|
{
|
|
@@ -4092,7 +4092,7 @@ const _e = (t) => {
|
|
|
4092
4092
|
}
|
|
4093
4093
|
)
|
|
4094
4094
|
] }) }),
|
|
4095
|
-
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children:
|
|
4095
|
+
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: v.map((f) => /* @__PURE__ */ s(
|
|
4096
4096
|
"button",
|
|
4097
4097
|
{
|
|
4098
4098
|
type: "button",
|
|
@@ -4116,78 +4116,78 @@ const _e = (t) => {
|
|
|
4116
4116
|
}
|
|
4117
4117
|
) })
|
|
4118
4118
|
] }),
|
|
4119
|
-
|
|
4120
|
-
|
|
4119
|
+
d && /* @__PURE__ */ e(
|
|
4120
|
+
M.p,
|
|
4121
4121
|
{
|
|
4122
4122
|
...C ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
4123
4123
|
className: "text-sm text-error",
|
|
4124
|
-
children:
|
|
4124
|
+
children: d
|
|
4125
4125
|
}
|
|
4126
4126
|
),
|
|
4127
|
-
|
|
4127
|
+
l && !d && /* @__PURE__ */ e("p", { className: "text-sm text-primary/70", children: l })
|
|
4128
4128
|
] });
|
|
4129
4129
|
};
|
|
4130
4130
|
Mt.displayName = "PhoneInput";
|
|
4131
|
-
const Vr =
|
|
4131
|
+
const Vr = Ie(
|
|
4132
4132
|
(t, r) => {
|
|
4133
|
-
const o = t.animate !== !1, [a, n] = U(!1),
|
|
4134
|
-
t.onChange?.(
|
|
4133
|
+
const o = t.animate !== !1, [a, n] = U(!1), c = (x) => {
|
|
4134
|
+
t.onChange?.(x), t.onValueChange?.(x);
|
|
4135
4135
|
};
|
|
4136
4136
|
if (t.type === "phone" || t.type === "tel") {
|
|
4137
|
-
const { type:
|
|
4137
|
+
const { type: x, value: b, onChange: T, onValueChange: E, ...G } = t;
|
|
4138
4138
|
return /* @__PURE__ */ e(
|
|
4139
4139
|
Mt,
|
|
4140
4140
|
{
|
|
4141
4141
|
...G,
|
|
4142
4142
|
value: typeof b == "string" ? b : "",
|
|
4143
|
-
onChange: (
|
|
4143
|
+
onChange: (v) => c(v)
|
|
4144
4144
|
}
|
|
4145
4145
|
);
|
|
4146
4146
|
}
|
|
4147
4147
|
if (t.type === "country") {
|
|
4148
|
-
const { type:
|
|
4148
|
+
const { type: x, value: b, onChange: T, onValueChange: E, ...G } = t;
|
|
4149
4149
|
return /* @__PURE__ */ e(
|
|
4150
4150
|
St,
|
|
4151
4151
|
{
|
|
4152
4152
|
...G,
|
|
4153
4153
|
value: typeof b == "string" ? b : "",
|
|
4154
|
-
onChange: (
|
|
4154
|
+
onChange: (v) => c(v)
|
|
4155
4155
|
}
|
|
4156
4156
|
);
|
|
4157
4157
|
}
|
|
4158
4158
|
if (t.type === "date") {
|
|
4159
|
-
const { type:
|
|
4159
|
+
const { type: x, value: b, onChange: T, onValueChange: E, ...G } = t;
|
|
4160
4160
|
return /* @__PURE__ */ e(
|
|
4161
4161
|
Fr,
|
|
4162
4162
|
{
|
|
4163
4163
|
...G,
|
|
4164
4164
|
value: b instanceof Date ? b : void 0,
|
|
4165
|
-
onChange: (
|
|
4165
|
+
onChange: (v) => c(v)
|
|
4166
4166
|
}
|
|
4167
4167
|
);
|
|
4168
4168
|
}
|
|
4169
4169
|
const i = t, {
|
|
4170
|
-
label:
|
|
4171
|
-
error:
|
|
4170
|
+
label: d,
|
|
4171
|
+
error: l,
|
|
4172
4172
|
hint: m,
|
|
4173
4173
|
leftIcon: u,
|
|
4174
|
-
rightIcon:
|
|
4175
|
-
animate:
|
|
4176
|
-
className:
|
|
4177
|
-
type:
|
|
4174
|
+
rightIcon: y,
|
|
4175
|
+
animate: g,
|
|
4176
|
+
className: k,
|
|
4177
|
+
type: I,
|
|
4178
4178
|
value: N,
|
|
4179
|
-
placeholder:
|
|
4179
|
+
placeholder: S,
|
|
4180
4180
|
disabled: C,
|
|
4181
|
-
required:
|
|
4181
|
+
required: P,
|
|
4182
4182
|
onChange: V,
|
|
4183
4183
|
onValueChange: D,
|
|
4184
4184
|
onWheel: z,
|
|
4185
4185
|
...j
|
|
4186
|
-
} = i, B =
|
|
4186
|
+
} = i, B = I === "number", h = I === "password";
|
|
4187
4187
|
return /* @__PURE__ */ s("div", { className: "w-full space-y-1.5", children: [
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4188
|
+
d && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
4189
|
+
d,
|
|
4190
|
+
P && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
4191
4191
|
] }),
|
|
4192
4192
|
/* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4193
4193
|
u && /* @__PURE__ */ e("div", { className: "absolute flex items-center pointer-events-none text-primary", style: { left: "14px", top: "50%", transform: "translateY(-50%)" }, children: u }),
|
|
@@ -4195,7 +4195,7 @@ const Vr = Ee(
|
|
|
4195
4195
|
"input",
|
|
4196
4196
|
{
|
|
4197
4197
|
ref: r,
|
|
4198
|
-
type: h && a ? "text" :
|
|
4198
|
+
type: h && a ? "text" : I,
|
|
4199
4199
|
className: p(
|
|
4200
4200
|
"w-full rounded-md border transition-all duration-200",
|
|
4201
4201
|
"bg-background text-foreground placeholder:text-foreground/50",
|
|
@@ -4203,29 +4203,29 @@ const Vr = Ee(
|
|
|
4203
4203
|
"disabled:bg-secondary disabled:cursor-not-allowed",
|
|
4204
4204
|
"touch-target text-base",
|
|
4205
4205
|
B && "number-input",
|
|
4206
|
-
|
|
4207
|
-
!
|
|
4208
|
-
|
|
4206
|
+
l && "border-error focus:ring-error",
|
|
4207
|
+
!l && "border-border",
|
|
4208
|
+
k
|
|
4209
4209
|
),
|
|
4210
4210
|
style: {
|
|
4211
4211
|
paddingTop: "12px",
|
|
4212
4212
|
paddingBottom: "12px",
|
|
4213
4213
|
paddingLeft: u ? "44px" : "16px",
|
|
4214
|
-
paddingRight:
|
|
4214
|
+
paddingRight: y || h ? "44px" : "16px"
|
|
4215
4215
|
},
|
|
4216
4216
|
value: N,
|
|
4217
|
-
onChange: (
|
|
4218
|
-
onWheel: B ? (
|
|
4219
|
-
|
|
4217
|
+
onChange: (x) => c(x.target.value),
|
|
4218
|
+
onWheel: B ? (x) => {
|
|
4219
|
+
x.preventDefault(), z?.(x);
|
|
4220
4220
|
} : z,
|
|
4221
|
-
placeholder:
|
|
4221
|
+
placeholder: S,
|
|
4222
4222
|
disabled: C,
|
|
4223
|
-
required:
|
|
4223
|
+
required: P,
|
|
4224
4224
|
...j
|
|
4225
4225
|
}
|
|
4226
4226
|
),
|
|
4227
4227
|
h && /* @__PURE__ */ e(
|
|
4228
|
-
|
|
4228
|
+
M.button,
|
|
4229
4229
|
{
|
|
4230
4230
|
type: "button",
|
|
4231
4231
|
onClick: () => n(!a),
|
|
@@ -4241,31 +4241,31 @@ const Vr = Ee(
|
|
|
4241
4241
|
whileTap: o ? { scale: 0.9, y: "-50%" } : void 0,
|
|
4242
4242
|
animate: { y: "-50%" },
|
|
4243
4243
|
transition: o ? { duration: 0.1 } : { duration: 0 },
|
|
4244
|
-
children: a ? /* @__PURE__ */ e(zt, { className: "w-5 h-5" }) : /* @__PURE__ */ e(
|
|
4244
|
+
children: a ? /* @__PURE__ */ e(zt, { className: "w-5 h-5" }) : /* @__PURE__ */ e(It, { className: "w-5 h-5" })
|
|
4245
4245
|
}
|
|
4246
4246
|
),
|
|
4247
|
-
|
|
4247
|
+
y && !h && /* @__PURE__ */ e("div", { className: "absolute flex items-center pointer-events-none text-primary", style: { right: "14px", top: "50%", transform: "translateY(-50%)" }, children: y })
|
|
4248
4248
|
] }),
|
|
4249
|
-
|
|
4250
|
-
|
|
4249
|
+
l && /* @__PURE__ */ e(
|
|
4250
|
+
M.p,
|
|
4251
4251
|
{
|
|
4252
4252
|
...o ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
4253
4253
|
className: "text-sm text-error",
|
|
4254
|
-
children:
|
|
4254
|
+
children: l
|
|
4255
4255
|
}
|
|
4256
4256
|
),
|
|
4257
|
-
m && !
|
|
4257
|
+
m && !l && /* @__PURE__ */ e("p", { className: "text-sm text-primary/70", children: m })
|
|
4258
4258
|
] });
|
|
4259
4259
|
}
|
|
4260
4260
|
);
|
|
4261
4261
|
Vr.displayName = "Input";
|
|
4262
|
-
const Ur =
|
|
4263
|
-
({ label: t, error: r, helperText: o, className: a, required: n, animate:
|
|
4264
|
-
const
|
|
4262
|
+
const Ur = Ie(
|
|
4263
|
+
({ label: t, error: r, helperText: o, className: a, required: n, animate: c = !0, ...i }, d) => {
|
|
4264
|
+
const l = c !== !1;
|
|
4265
4265
|
return /* @__PURE__ */ s(
|
|
4266
|
-
|
|
4266
|
+
M.div,
|
|
4267
4267
|
{
|
|
4268
|
-
...
|
|
4268
|
+
...l ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 } } : {},
|
|
4269
4269
|
className: "w-full",
|
|
4270
4270
|
children: [
|
|
4271
4271
|
t && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground mb-1.5", children: [
|
|
@@ -4275,7 +4275,7 @@ const Ur = Ee(
|
|
|
4275
4275
|
/* @__PURE__ */ e(
|
|
4276
4276
|
"textarea",
|
|
4277
4277
|
{
|
|
4278
|
-
ref:
|
|
4278
|
+
ref: d,
|
|
4279
4279
|
className: p(
|
|
4280
4280
|
"w-full px-4 py-3 bg-background border border-border rounded-md",
|
|
4281
4281
|
"text-foreground placeholder:text-foreground/50",
|
|
@@ -4290,9 +4290,9 @@ const Ur = Ee(
|
|
|
4290
4290
|
}
|
|
4291
4291
|
),
|
|
4292
4292
|
r && /* @__PURE__ */ e(
|
|
4293
|
-
|
|
4293
|
+
M.p,
|
|
4294
4294
|
{
|
|
4295
|
-
...
|
|
4295
|
+
...l ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
4296
4296
|
className: "mt-1 text-sm text-error",
|
|
4297
4297
|
children: r
|
|
4298
4298
|
}
|
|
@@ -4304,39 +4304,39 @@ const Ur = Ee(
|
|
|
4304
4304
|
}
|
|
4305
4305
|
);
|
|
4306
4306
|
Ur.displayName = "Textarea";
|
|
4307
|
-
const ze =
|
|
4308
|
-
({ label: t, description: r, className: o, checked: a, defaultChecked: n, onChange:
|
|
4309
|
-
const m = i !== !1, [u,
|
|
4307
|
+
const ze = Ie(
|
|
4308
|
+
({ label: t, description: r, className: o, checked: a, defaultChecked: n, onChange: c, animate: i = !0, ...d }, l) => {
|
|
4309
|
+
const m = i !== !1, [u, y] = U(n || !1), g = a !== void 0 ? a : u;
|
|
4310
4310
|
return /* @__PURE__ */ s("label", { className: "flex items-start gap-3 cursor-pointer group", children: [
|
|
4311
4311
|
/* @__PURE__ */ s("div", { className: "relative flex-shrink-0 mt-0.5", children: [
|
|
4312
4312
|
/* @__PURE__ */ e(
|
|
4313
4313
|
"input",
|
|
4314
4314
|
{
|
|
4315
|
-
ref:
|
|
4315
|
+
ref: l,
|
|
4316
4316
|
type: "checkbox",
|
|
4317
4317
|
className: "sr-only peer",
|
|
4318
|
-
checked:
|
|
4319
|
-
onChange: (
|
|
4320
|
-
a === void 0 &&
|
|
4318
|
+
checked: g,
|
|
4319
|
+
onChange: (I) => {
|
|
4320
|
+
a === void 0 && y(I.target.checked), c?.(I.target.checked);
|
|
4321
4321
|
},
|
|
4322
|
-
...
|
|
4322
|
+
...d
|
|
4323
4323
|
}
|
|
4324
4324
|
),
|
|
4325
4325
|
/* @__PURE__ */ e(
|
|
4326
|
-
|
|
4326
|
+
M.div,
|
|
4327
4327
|
{
|
|
4328
4328
|
className: p(
|
|
4329
4329
|
"w-6 h-6 rounded-md border-2 transition-all duration-200",
|
|
4330
4330
|
"peer-focus:ring-2 peer-focus:ring-primary peer-focus:ring-offset-2",
|
|
4331
4331
|
"peer-disabled:opacity-50 peer-disabled:cursor-not-allowed",
|
|
4332
4332
|
"flex items-center justify-center",
|
|
4333
|
-
|
|
4333
|
+
g ? "bg-primary border-primary" : "border-border bg-secondary",
|
|
4334
4334
|
o
|
|
4335
4335
|
),
|
|
4336
4336
|
whileTap: m ? { scale: 0.95 } : void 0,
|
|
4337
4337
|
children: /* @__PURE__ */ e(ct, { className: p(
|
|
4338
4338
|
"w-3 h-3 text-white transition-opacity duration-200",
|
|
4339
|
-
|
|
4339
|
+
g ? "opacity-100" : "opacity-0"
|
|
4340
4340
|
) })
|
|
4341
4341
|
}
|
|
4342
4342
|
)
|
|
@@ -4355,19 +4355,19 @@ const lo = ({
|
|
|
4355
4355
|
onChange: o,
|
|
4356
4356
|
name: a,
|
|
4357
4357
|
disabled: n,
|
|
4358
|
-
className:
|
|
4358
|
+
className: c,
|
|
4359
4359
|
animate: i = !0
|
|
4360
4360
|
}) => {
|
|
4361
|
-
const
|
|
4362
|
-
return /* @__PURE__ */ e("div", { className: p("flex flex-wrap gap-2",
|
|
4363
|
-
const m = r ===
|
|
4361
|
+
const d = i !== !1;
|
|
4362
|
+
return /* @__PURE__ */ e("div", { className: p("flex flex-wrap gap-2", c), children: t.map((l) => {
|
|
4363
|
+
const m = r === l.value;
|
|
4364
4364
|
return /* @__PURE__ */ s("label", { className: "relative cursor-pointer", children: [
|
|
4365
4365
|
/* @__PURE__ */ e(
|
|
4366
4366
|
"input",
|
|
4367
4367
|
{
|
|
4368
4368
|
type: "radio",
|
|
4369
4369
|
name: a,
|
|
4370
|
-
value:
|
|
4370
|
+
value: l.value,
|
|
4371
4371
|
checked: m,
|
|
4372
4372
|
onChange: (u) => o?.(u.target.value),
|
|
4373
4373
|
disabled: n,
|
|
@@ -4375,10 +4375,10 @@ const lo = ({
|
|
|
4375
4375
|
}
|
|
4376
4376
|
),
|
|
4377
4377
|
/* @__PURE__ */ s(
|
|
4378
|
-
|
|
4378
|
+
M.div,
|
|
4379
4379
|
{
|
|
4380
4380
|
"data-ripple": "true",
|
|
4381
|
-
whileTap:
|
|
4381
|
+
whileTap: d ? { scale: n ? 1 : 0.95 } : void 0,
|
|
4382
4382
|
className: p(
|
|
4383
4383
|
"px-4 py-2.5 rounded-full border-2 transition-all duration-200",
|
|
4384
4384
|
"flex items-center gap-2 min-h-11",
|
|
@@ -4387,16 +4387,16 @@ const lo = ({
|
|
|
4387
4387
|
m ? "bg-primary border-primary text-white" : "bg-background border-border text-primary hover:border-border-dark"
|
|
4388
4388
|
),
|
|
4389
4389
|
children: [
|
|
4390
|
-
|
|
4391
|
-
/* @__PURE__ */ e("span", { className: "font-medium text-base", children:
|
|
4390
|
+
l.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: l.icon }),
|
|
4391
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-base", children: l.label })
|
|
4392
4392
|
]
|
|
4393
4393
|
}
|
|
4394
4394
|
)
|
|
4395
|
-
] },
|
|
4395
|
+
] }, l.value);
|
|
4396
4396
|
}) });
|
|
4397
|
-
}, Hr =
|
|
4398
|
-
({ label: t, description: r, className: o, checked: a, onChange: n, animate:
|
|
4399
|
-
const
|
|
4397
|
+
}, Hr = Ie(
|
|
4398
|
+
({ label: t, description: r, className: o, checked: a, onChange: n, animate: c = !0, ...i }, d) => {
|
|
4399
|
+
const l = c !== !1;
|
|
4400
4400
|
return /* @__PURE__ */ s("label", { className: "flex items-center justify-between gap-4 cursor-pointer group", children: [
|
|
4401
4401
|
(t || r) && /* @__PURE__ */ s("div", { className: "flex-1 space-y-0.5", children: [
|
|
4402
4402
|
t && /* @__PURE__ */ e("div", { className: "text-base font-medium text-foreground", children: t }),
|
|
@@ -4406,7 +4406,7 @@ const lo = ({
|
|
|
4406
4406
|
/* @__PURE__ */ e(
|
|
4407
4407
|
"input",
|
|
4408
4408
|
{
|
|
4409
|
-
ref:
|
|
4409
|
+
ref: d,
|
|
4410
4410
|
type: "checkbox",
|
|
4411
4411
|
onChange: (u) => {
|
|
4412
4412
|
n?.(u.target.checked);
|
|
@@ -4427,12 +4427,12 @@ const lo = ({
|
|
|
4427
4427
|
o
|
|
4428
4428
|
),
|
|
4429
4429
|
children: /* @__PURE__ */ e(
|
|
4430
|
-
|
|
4430
|
+
M.div,
|
|
4431
4431
|
{
|
|
4432
4432
|
className: "absolute top-1 w-5 h-5 bg-white rounded-full shadow-sm",
|
|
4433
4433
|
style: { left: a ? "24px" : "4px" },
|
|
4434
|
-
animate:
|
|
4435
|
-
transition:
|
|
4434
|
+
animate: l ? { left: a ? "24px" : "4px" } : void 0,
|
|
4435
|
+
transition: l ? { type: "spring", stiffness: 500, damping: 30 } : { duration: 0 }
|
|
4436
4436
|
}
|
|
4437
4437
|
)
|
|
4438
4438
|
}
|
|
@@ -4448,31 +4448,31 @@ const co = ({
|
|
|
4448
4448
|
min: o = 0,
|
|
4449
4449
|
max: a = 100,
|
|
4450
4450
|
step: n = 1,
|
|
4451
|
-
label:
|
|
4451
|
+
label: c,
|
|
4452
4452
|
showValue: i = !0,
|
|
4453
|
-
unit:
|
|
4454
|
-
disabled:
|
|
4453
|
+
unit: d = "%",
|
|
4454
|
+
disabled: l,
|
|
4455
4455
|
className: m,
|
|
4456
4456
|
animate: u = !0
|
|
4457
4457
|
}) => {
|
|
4458
|
-
const
|
|
4458
|
+
const y = u !== !1, [g, k] = U(!1), I = (t - o) / (a - o) * 100;
|
|
4459
4459
|
return /* @__PURE__ */ s("div", { className: p("w-full space-y-2", m), children: [
|
|
4460
|
-
(
|
|
4461
|
-
|
|
4460
|
+
(c || i) && /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
4461
|
+
c && /* @__PURE__ */ e("label", { className: "text-sm font-medium text-primary", children: c }),
|
|
4462
4462
|
i && /* @__PURE__ */ s("span", { className: "text-sm font-semibold text-primary", children: [
|
|
4463
4463
|
t,
|
|
4464
|
-
|
|
4464
|
+
d
|
|
4465
4465
|
] })
|
|
4466
4466
|
] }),
|
|
4467
4467
|
/* @__PURE__ */ s("div", { className: "relative h-12 flex items-center", children: [
|
|
4468
4468
|
/* @__PURE__ */ e("div", { className: "relative w-full h-2 bg-border rounded-full overflow-hidden", children: /* @__PURE__ */ e(
|
|
4469
|
-
|
|
4469
|
+
M.div,
|
|
4470
4470
|
{
|
|
4471
4471
|
className: "absolute left-0 top-0 h-full bg-primary rounded-full",
|
|
4472
|
-
style: { width: `${
|
|
4472
|
+
style: { width: `${I}%` },
|
|
4473
4473
|
initial: !1,
|
|
4474
|
-
animate:
|
|
4475
|
-
transition:
|
|
4474
|
+
animate: y ? { width: `${I}%` } : void 0,
|
|
4475
|
+
transition: y ? { type: "spring", stiffness: 300, damping: 30 } : { duration: 0 }
|
|
4476
4476
|
}
|
|
4477
4477
|
) }),
|
|
4478
4478
|
/* @__PURE__ */ e(
|
|
@@ -4484,26 +4484,26 @@ const co = ({
|
|
|
4484
4484
|
step: n,
|
|
4485
4485
|
value: t,
|
|
4486
4486
|
onChange: (N) => r(Number(N.target.value)),
|
|
4487
|
-
onMouseDown: () =>
|
|
4488
|
-
onMouseUp: () =>
|
|
4489
|
-
onTouchStart: () =>
|
|
4490
|
-
onTouchEnd: () =>
|
|
4491
|
-
disabled:
|
|
4487
|
+
onMouseDown: () => k(!0),
|
|
4488
|
+
onMouseUp: () => k(!1),
|
|
4489
|
+
onTouchStart: () => k(!0),
|
|
4490
|
+
onTouchEnd: () => k(!1),
|
|
4491
|
+
disabled: l,
|
|
4492
4492
|
className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer disabled:cursor-not-allowed",
|
|
4493
4493
|
style: { zIndex: 10 }
|
|
4494
4494
|
}
|
|
4495
4495
|
),
|
|
4496
4496
|
/* @__PURE__ */ e(
|
|
4497
|
-
|
|
4497
|
+
M.div,
|
|
4498
4498
|
{
|
|
4499
4499
|
className: p(
|
|
4500
4500
|
"absolute w-6 h-6 bg-background border-2 border-primary rounded-full shadow-md",
|
|
4501
4501
|
"pointer-events-none",
|
|
4502
|
-
|
|
4502
|
+
l && "opacity-50"
|
|
4503
4503
|
),
|
|
4504
|
-
style: { left: `calc(${
|
|
4505
|
-
animate:
|
|
4506
|
-
transition:
|
|
4504
|
+
style: { left: `calc(${I}% - 12px)` },
|
|
4505
|
+
animate: y ? { scale: g ? 1.2 : 1 } : void 0,
|
|
4506
|
+
transition: y ? { type: "spring", stiffness: 300, damping: 20 } : { duration: 0 }
|
|
4507
4507
|
}
|
|
4508
4508
|
)
|
|
4509
4509
|
] })
|
|
@@ -4514,17 +4514,17 @@ const co = ({
|
|
|
4514
4514
|
onChange: o,
|
|
4515
4515
|
label1: a,
|
|
4516
4516
|
label2: n,
|
|
4517
|
-
min:
|
|
4517
|
+
min: c = 0,
|
|
4518
4518
|
max: i = 100,
|
|
4519
|
-
step:
|
|
4520
|
-
unit:
|
|
4519
|
+
step: d = 1,
|
|
4520
|
+
unit: l = "%",
|
|
4521
4521
|
disabled: m,
|
|
4522
4522
|
className: u,
|
|
4523
|
-
animate:
|
|
4523
|
+
animate: y = !0
|
|
4524
4524
|
}) => {
|
|
4525
|
-
const
|
|
4526
|
-
const
|
|
4527
|
-
o(C, Math.max(
|
|
4525
|
+
const g = y !== !1, k = t + r, I = k > 0 ? t / k * 100 : 50, N = k > 0 ? r / k * 100 : 50, S = (C) => {
|
|
4526
|
+
const P = i - C;
|
|
4527
|
+
o(C, Math.max(c, Math.min(i, P)));
|
|
4528
4528
|
};
|
|
4529
4529
|
return /* @__PURE__ */ s("div", { className: p("w-full space-y-3", u), children: [
|
|
4530
4530
|
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
@@ -4532,28 +4532,28 @@ const co = ({
|
|
|
4532
4532
|
/* @__PURE__ */ e("label", { className: "text-sm font-medium text-primary", children: a }),
|
|
4533
4533
|
/* @__PURE__ */ s("span", { className: "text-sm font-semibold text-primary", children: [
|
|
4534
4534
|
t,
|
|
4535
|
-
|
|
4535
|
+
l
|
|
4536
4536
|
] })
|
|
4537
4537
|
] }),
|
|
4538
4538
|
/* @__PURE__ */ s("div", { className: "relative h-10 flex items-center", children: [
|
|
4539
4539
|
/* @__PURE__ */ e("div", { className: "w-full h-2 bg-border rounded-full overflow-hidden", children: /* @__PURE__ */ e(
|
|
4540
|
-
|
|
4540
|
+
M.div,
|
|
4541
4541
|
{
|
|
4542
4542
|
className: "h-full bg-primary",
|
|
4543
4543
|
initial: !1,
|
|
4544
|
-
animate:
|
|
4545
|
-
transition:
|
|
4544
|
+
animate: g ? { width: `${I}%` } : void 0,
|
|
4545
|
+
transition: g ? { type: "spring", stiffness: 300, damping: 30 } : { duration: 0 }
|
|
4546
4546
|
}
|
|
4547
4547
|
) }),
|
|
4548
4548
|
/* @__PURE__ */ e(
|
|
4549
4549
|
"input",
|
|
4550
4550
|
{
|
|
4551
4551
|
type: "range",
|
|
4552
|
-
min:
|
|
4552
|
+
min: c,
|
|
4553
4553
|
max: i,
|
|
4554
|
-
step:
|
|
4554
|
+
step: d,
|
|
4555
4555
|
value: t,
|
|
4556
|
-
onChange: (C) =>
|
|
4556
|
+
onChange: (C) => S(Number(C.target.value)),
|
|
4557
4557
|
disabled: m,
|
|
4558
4558
|
className: "absolute inset-0 w-full opacity-0 cursor-pointer disabled:cursor-not-allowed"
|
|
4559
4559
|
}
|
|
@@ -4565,28 +4565,28 @@ const co = ({
|
|
|
4565
4565
|
/* @__PURE__ */ e("label", { className: "text-sm font-medium text-primary", children: n }),
|
|
4566
4566
|
/* @__PURE__ */ s("span", { className: "text-sm font-semibold text-success", children: [
|
|
4567
4567
|
r,
|
|
4568
|
-
|
|
4568
|
+
l
|
|
4569
4569
|
] })
|
|
4570
4570
|
] }),
|
|
4571
4571
|
/* @__PURE__ */ s("div", { className: "relative h-10 flex items-center", children: [
|
|
4572
4572
|
/* @__PURE__ */ e("div", { className: "w-full h-2 bg-border rounded-full overflow-hidden", children: /* @__PURE__ */ e(
|
|
4573
|
-
|
|
4573
|
+
M.div,
|
|
4574
4574
|
{
|
|
4575
4575
|
className: "h-full bg-success",
|
|
4576
4576
|
initial: !1,
|
|
4577
|
-
animate:
|
|
4578
|
-
transition:
|
|
4577
|
+
animate: g ? { width: `${N}%` } : void 0,
|
|
4578
|
+
transition: g ? { type: "spring", stiffness: 300, damping: 30 } : { duration: 0 }
|
|
4579
4579
|
}
|
|
4580
4580
|
) }),
|
|
4581
4581
|
/* @__PURE__ */ e(
|
|
4582
4582
|
"input",
|
|
4583
4583
|
{
|
|
4584
4584
|
type: "range",
|
|
4585
|
-
min:
|
|
4585
|
+
min: c,
|
|
4586
4586
|
max: i,
|
|
4587
|
-
step:
|
|
4587
|
+
step: d,
|
|
4588
4588
|
value: r,
|
|
4589
|
-
onChange: (C) =>
|
|
4589
|
+
onChange: (C) => S(i - Number(C.target.value)),
|
|
4590
4590
|
disabled: m,
|
|
4591
4591
|
className: "absolute inset-0 w-full opacity-0 cursor-pointer disabled:cursor-not-allowed"
|
|
4592
4592
|
}
|
|
@@ -4595,8 +4595,8 @@ const co = ({
|
|
|
4595
4595
|
] }),
|
|
4596
4596
|
/* @__PURE__ */ s("div", { className: "text-xs text-primary/70 text-center", children: [
|
|
4597
4597
|
"Total: ",
|
|
4598
|
-
|
|
4599
|
-
|
|
4598
|
+
k,
|
|
4599
|
+
l
|
|
4600
4600
|
] })
|
|
4601
4601
|
] });
|
|
4602
4602
|
}, uo = ({
|
|
@@ -4605,31 +4605,31 @@ const co = ({
|
|
|
4605
4605
|
onChange: o,
|
|
4606
4606
|
placeholder: a = "Select an option",
|
|
4607
4607
|
label: n,
|
|
4608
|
-
error:
|
|
4608
|
+
error: c,
|
|
4609
4609
|
searchable: i = !1,
|
|
4610
|
-
clearable:
|
|
4611
|
-
disabled:
|
|
4610
|
+
clearable: d = !0,
|
|
4611
|
+
disabled: l,
|
|
4612
4612
|
className: m,
|
|
4613
4613
|
animate: u = !0
|
|
4614
4614
|
}) => {
|
|
4615
|
-
const
|
|
4616
|
-
(h) => h.label.toLowerCase().includes(
|
|
4615
|
+
const y = u !== !1, [g, k] = U(!1), [I, N] = U(""), [S, C] = U("bottom"), P = Q(null), V = Q(null), D = t.find((h) => h.value === r), z = i ? t.filter(
|
|
4616
|
+
(h) => h.label.toLowerCase().includes(I.toLowerCase())
|
|
4617
4617
|
) : t;
|
|
4618
4618
|
J(() => {
|
|
4619
4619
|
const h = (L) => {
|
|
4620
|
-
|
|
4620
|
+
P.current && !P.current.contains(L.target) && (k(!1), N(""));
|
|
4621
4621
|
};
|
|
4622
4622
|
return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
|
|
4623
4623
|
}, []), J(() => {
|
|
4624
|
-
if (!
|
|
4624
|
+
if (!g) return;
|
|
4625
4625
|
const h = () => {
|
|
4626
4626
|
if (!V.current) return;
|
|
4627
|
-
const L = V.current.getBoundingClientRect(),
|
|
4628
|
-
if (b >=
|
|
4627
|
+
const L = V.current.getBoundingClientRect(), x = i ? 360 : 300, b = window.innerHeight - L.bottom - 8, T = L.top - 8;
|
|
4628
|
+
if (b >= x) {
|
|
4629
4629
|
C("bottom");
|
|
4630
4630
|
return;
|
|
4631
4631
|
}
|
|
4632
|
-
if (T >=
|
|
4632
|
+
if (T >= x) {
|
|
4633
4633
|
C("top");
|
|
4634
4634
|
return;
|
|
4635
4635
|
}
|
|
@@ -4638,28 +4638,28 @@ const co = ({
|
|
|
4638
4638
|
return h(), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), () => {
|
|
4639
4639
|
window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
|
|
4640
4640
|
};
|
|
4641
|
-
}, [
|
|
4641
|
+
}, [g, i]);
|
|
4642
4642
|
const j = (h) => {
|
|
4643
|
-
o(h),
|
|
4644
|
-
}, B =
|
|
4645
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
4643
|
+
o(h), k(!1), N("");
|
|
4644
|
+
}, B = S === "top" ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 } } : { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 } };
|
|
4645
|
+
return /* @__PURE__ */ s("div", { ref: P, className: p("relative w-full", m), children: [
|
|
4646
4646
|
n && /* @__PURE__ */ e("label", { className: "block mb-1.5 text-sm font-medium text-foreground", children: n }),
|
|
4647
4647
|
/* @__PURE__ */ s(
|
|
4648
4648
|
"button",
|
|
4649
4649
|
{
|
|
4650
4650
|
ref: V,
|
|
4651
4651
|
type: "button",
|
|
4652
|
-
onClick: () => !
|
|
4653
|
-
disabled:
|
|
4652
|
+
onClick: () => !l && k(!g),
|
|
4653
|
+
disabled: l,
|
|
4654
4654
|
className: p(
|
|
4655
4655
|
"w-full px-4 py-3 rounded-md border transition-all duration-200",
|
|
4656
4656
|
"bg-background text-left flex items-center justify-between gap-2",
|
|
4657
4657
|
"focus:outline-none focus:ring-2 focus:ring-primary",
|
|
4658
4658
|
"disabled:bg-secondary disabled:cursor-not-allowed",
|
|
4659
4659
|
"touch-target",
|
|
4660
|
-
|
|
4661
|
-
!
|
|
4662
|
-
|
|
4660
|
+
c && "border-error",
|
|
4661
|
+
!c && "border-border",
|
|
4662
|
+
g && "ring-2 ring-primary"
|
|
4663
4663
|
),
|
|
4664
4664
|
children: [
|
|
4665
4665
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
@@ -4667,19 +4667,19 @@ const co = ({
|
|
|
4667
4667
|
/* @__PURE__ */ e("span", { className: p("truncate", !D && "text-foreground/50"), children: D?.label || a })
|
|
4668
4668
|
] }),
|
|
4669
4669
|
/* @__PURE__ */ e(
|
|
4670
|
-
|
|
4670
|
+
ge,
|
|
4671
4671
|
{
|
|
4672
4672
|
className: p(
|
|
4673
4673
|
"w-5 h-5 text-primary transition-transform shrink-0",
|
|
4674
|
-
|
|
4674
|
+
g && "rotate-180"
|
|
4675
4675
|
)
|
|
4676
4676
|
}
|
|
4677
4677
|
)
|
|
4678
4678
|
]
|
|
4679
4679
|
}
|
|
4680
4680
|
),
|
|
4681
|
-
|
|
4682
|
-
|
|
4681
|
+
y ? /* @__PURE__ */ e(se, { children: g ? /* @__PURE__ */ e(de, { open: g, anchorRef: V, placement: S, children: /* @__PURE__ */ s(
|
|
4682
|
+
M.div,
|
|
4683
4683
|
{
|
|
4684
4684
|
initial: B.initial,
|
|
4685
4685
|
animate: B.animate,
|
|
@@ -4688,18 +4688,18 @@ const co = ({
|
|
|
4688
4688
|
className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
|
|
4689
4689
|
children: [
|
|
4690
4690
|
i && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4691
|
-
/* @__PURE__ */ e(
|
|
4691
|
+
/* @__PURE__ */ e(ye, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
4692
4692
|
/* @__PURE__ */ e(
|
|
4693
4693
|
"input",
|
|
4694
4694
|
{
|
|
4695
4695
|
type: "text",
|
|
4696
4696
|
placeholder: "Search...",
|
|
4697
|
-
value:
|
|
4697
|
+
value: I,
|
|
4698
4698
|
onChange: (h) => N(h.target.value),
|
|
4699
4699
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary"
|
|
4700
4700
|
}
|
|
4701
4701
|
),
|
|
4702
|
-
|
|
4702
|
+
I && /* @__PURE__ */ e(
|
|
4703
4703
|
"button",
|
|
4704
4704
|
{
|
|
4705
4705
|
onClick: () => N(""),
|
|
@@ -4709,7 +4709,7 @@ const co = ({
|
|
|
4709
4709
|
)
|
|
4710
4710
|
] }) }),
|
|
4711
4711
|
/* @__PURE__ */ s("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: [
|
|
4712
|
-
|
|
4712
|
+
d && /* @__PURE__ */ e(
|
|
4713
4713
|
"button",
|
|
4714
4714
|
{
|
|
4715
4715
|
type: "button",
|
|
@@ -4742,20 +4742,20 @@ const co = ({
|
|
|
4742
4742
|
] })
|
|
4743
4743
|
]
|
|
4744
4744
|
}
|
|
4745
|
-
) }) : null }) :
|
|
4745
|
+
) }) : null }) : g && /* @__PURE__ */ e(de, { open: g, anchorRef: V, placement: S, children: /* @__PURE__ */ s(M.div, { className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden", children: [
|
|
4746
4746
|
i && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4747
|
-
/* @__PURE__ */ e(
|
|
4747
|
+
/* @__PURE__ */ e(ye, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
4748
4748
|
/* @__PURE__ */ e(
|
|
4749
4749
|
"input",
|
|
4750
4750
|
{
|
|
4751
4751
|
type: "text",
|
|
4752
4752
|
placeholder: "Search...",
|
|
4753
|
-
value:
|
|
4753
|
+
value: I,
|
|
4754
4754
|
onChange: (h) => N(h.target.value),
|
|
4755
4755
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary"
|
|
4756
4756
|
}
|
|
4757
4757
|
),
|
|
4758
|
-
|
|
4758
|
+
I && /* @__PURE__ */ e(
|
|
4759
4759
|
"button",
|
|
4760
4760
|
{
|
|
4761
4761
|
onClick: () => N(""),
|
|
@@ -4765,7 +4765,7 @@ const co = ({
|
|
|
4765
4765
|
)
|
|
4766
4766
|
] }) }),
|
|
4767
4767
|
/* @__PURE__ */ s("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: [
|
|
4768
|
-
|
|
4768
|
+
d && /* @__PURE__ */ e(
|
|
4769
4769
|
"button",
|
|
4770
4770
|
{
|
|
4771
4771
|
type: "button",
|
|
@@ -4797,45 +4797,45 @@ const co = ({
|
|
|
4797
4797
|
)) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-primary/70 text-sm", children: "No options found" })
|
|
4798
4798
|
] })
|
|
4799
4799
|
] }) }),
|
|
4800
|
-
|
|
4801
|
-
|
|
4800
|
+
c && /* @__PURE__ */ e(
|
|
4801
|
+
M.p,
|
|
4802
4802
|
{
|
|
4803
|
-
...
|
|
4803
|
+
...y ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
4804
4804
|
className: "mt-1.5 text-sm text-error",
|
|
4805
|
-
children:
|
|
4805
|
+
children: c
|
|
4806
4806
|
}
|
|
4807
4807
|
)
|
|
4808
4808
|
] });
|
|
4809
|
-
}, Yr =
|
|
4809
|
+
}, Yr = Ie(
|
|
4810
4810
|
({
|
|
4811
4811
|
options: t,
|
|
4812
4812
|
value: r,
|
|
4813
4813
|
onChange: o,
|
|
4814
4814
|
placeholder: a = "Select an option",
|
|
4815
4815
|
label: n,
|
|
4816
|
-
error:
|
|
4816
|
+
error: c,
|
|
4817
4817
|
hint: i,
|
|
4818
|
-
searchable:
|
|
4819
|
-
clearable:
|
|
4818
|
+
searchable: d = !1,
|
|
4819
|
+
clearable: l = !0,
|
|
4820
4820
|
disabled: m,
|
|
4821
4821
|
required: u,
|
|
4822
|
-
className:
|
|
4823
|
-
animate:
|
|
4824
|
-
},
|
|
4825
|
-
const
|
|
4826
|
-
(
|
|
4822
|
+
className: y,
|
|
4823
|
+
animate: g = !0
|
|
4824
|
+
}, k) => {
|
|
4825
|
+
const I = g !== !1, [N, S] = U(!1), [C, P] = U(""), [V, D] = U("bottom"), z = Q(null), j = t.find((x) => x.value === r), B = d ? t.filter(
|
|
4826
|
+
(x) => x.label.toLowerCase().includes(C.toLowerCase())
|
|
4827
4827
|
) : t;
|
|
4828
4828
|
J(() => {
|
|
4829
|
-
const
|
|
4830
|
-
z.current && !z.current.contains(b.target) && (
|
|
4829
|
+
const x = (b) => {
|
|
4830
|
+
z.current && !z.current.contains(b.target) && (S(!1), P(""));
|
|
4831
4831
|
};
|
|
4832
|
-
return document.addEventListener("mousedown",
|
|
4832
|
+
return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
4833
4833
|
}, []), J(() => {
|
|
4834
4834
|
if (!N) return;
|
|
4835
|
-
const
|
|
4835
|
+
const x = () => {
|
|
4836
4836
|
if (!z.current) return;
|
|
4837
|
-
const b = z.current.getBoundingClientRect(), T =
|
|
4838
|
-
if (
|
|
4837
|
+
const b = z.current.getBoundingClientRect(), T = d ? 360 : 300, E = window.innerHeight - b.bottom - 8, G = b.top - 8;
|
|
4838
|
+
if (E >= T) {
|
|
4839
4839
|
D("bottom");
|
|
4840
4840
|
return;
|
|
4841
4841
|
}
|
|
@@ -4845,14 +4845,14 @@ const co = ({
|
|
|
4845
4845
|
}
|
|
4846
4846
|
D("bottom");
|
|
4847
4847
|
};
|
|
4848
|
-
return
|
|
4849
|
-
window.removeEventListener("resize",
|
|
4848
|
+
return x(), window.addEventListener("resize", x), window.addEventListener("scroll", x, !0), () => {
|
|
4849
|
+
window.removeEventListener("resize", x), window.removeEventListener("scroll", x, !0);
|
|
4850
4850
|
};
|
|
4851
|
-
}, [N,
|
|
4852
|
-
const h = (
|
|
4853
|
-
o(
|
|
4851
|
+
}, [N, d]);
|
|
4852
|
+
const h = (x) => {
|
|
4853
|
+
o(x), S(!1), P("");
|
|
4854
4854
|
}, L = V === "top" ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 } } : { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 } };
|
|
4855
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
4855
|
+
return /* @__PURE__ */ s("div", { ref: k, className: p("w-full space-y-1.5", y), children: [
|
|
4856
4856
|
n && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
4857
4857
|
n,
|
|
4858
4858
|
u && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
@@ -4862,7 +4862,7 @@ const co = ({
|
|
|
4862
4862
|
"button",
|
|
4863
4863
|
{
|
|
4864
4864
|
type: "button",
|
|
4865
|
-
onClick: () => !m &&
|
|
4865
|
+
onClick: () => !m && S(!N),
|
|
4866
4866
|
disabled: m,
|
|
4867
4867
|
"aria-haspopup": "listbox",
|
|
4868
4868
|
"aria-expanded": N,
|
|
@@ -4873,8 +4873,8 @@ const co = ({
|
|
|
4873
4873
|
"focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",
|
|
4874
4874
|
"disabled:bg-secondary disabled:cursor-not-allowed",
|
|
4875
4875
|
"touch-target text-base",
|
|
4876
|
-
|
|
4877
|
-
!
|
|
4876
|
+
c && "border-error focus:ring-error",
|
|
4877
|
+
!c && "border-border",
|
|
4878
4878
|
N && "ring-2 ring-primary"
|
|
4879
4879
|
),
|
|
4880
4880
|
children: [
|
|
@@ -4883,7 +4883,7 @@ const co = ({
|
|
|
4883
4883
|
/* @__PURE__ */ e("span", { className: p("truncate", !j && "text-foreground/50"), children: j?.label || a })
|
|
4884
4884
|
] }),
|
|
4885
4885
|
/* @__PURE__ */ e(
|
|
4886
|
-
|
|
4886
|
+
ge,
|
|
4887
4887
|
{
|
|
4888
4888
|
className: p(
|
|
4889
4889
|
"w-5 h-5 text-primary transition-transform shrink-0",
|
|
@@ -4894,8 +4894,8 @@ const co = ({
|
|
|
4894
4894
|
]
|
|
4895
4895
|
}
|
|
4896
4896
|
),
|
|
4897
|
-
|
|
4898
|
-
|
|
4897
|
+
I ? /* @__PURE__ */ e(se, { children: N ? /* @__PURE__ */ e(de, { open: N, anchorRef: z, placement: V, children: /* @__PURE__ */ s(
|
|
4898
|
+
M.div,
|
|
4899
4899
|
{
|
|
4900
4900
|
initial: L.initial,
|
|
4901
4901
|
animate: L.animate,
|
|
@@ -4904,15 +4904,15 @@ const co = ({
|
|
|
4904
4904
|
role: "listbox",
|
|
4905
4905
|
className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
|
|
4906
4906
|
children: [
|
|
4907
|
-
|
|
4908
|
-
/* @__PURE__ */ e(
|
|
4907
|
+
d && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4908
|
+
/* @__PURE__ */ e(ye, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
4909
4909
|
/* @__PURE__ */ e(
|
|
4910
4910
|
"input",
|
|
4911
4911
|
{
|
|
4912
4912
|
type: "text",
|
|
4913
4913
|
placeholder: "Search...",
|
|
4914
4914
|
value: C,
|
|
4915
|
-
onChange: (
|
|
4915
|
+
onChange: (x) => P(x.target.value),
|
|
4916
4916
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
|
|
4917
4917
|
"aria-label": "Search options"
|
|
4918
4918
|
}
|
|
@@ -4921,7 +4921,7 @@ const co = ({
|
|
|
4921
4921
|
"button",
|
|
4922
4922
|
{
|
|
4923
4923
|
type: "button",
|
|
4924
|
-
onClick: () =>
|
|
4924
|
+
onClick: () => P(""),
|
|
4925
4925
|
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
4926
4926
|
"aria-label": "Clear search",
|
|
4927
4927
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4 text-primary/50 hover:text-primary" })
|
|
@@ -4929,7 +4929,7 @@ const co = ({
|
|
|
4929
4929
|
)
|
|
4930
4930
|
] }) }),
|
|
4931
4931
|
/* @__PURE__ */ s("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: [
|
|
4932
|
-
|
|
4932
|
+
l && /* @__PURE__ */ e(
|
|
4933
4933
|
"button",
|
|
4934
4934
|
{
|
|
4935
4935
|
type: "button",
|
|
@@ -4945,45 +4945,45 @@ const co = ({
|
|
|
4945
4945
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
4946
4946
|
}
|
|
4947
4947
|
),
|
|
4948
|
-
B.length > 0 ? B.map((
|
|
4948
|
+
B.length > 0 ? B.map((x) => /* @__PURE__ */ s(
|
|
4949
4949
|
"button",
|
|
4950
4950
|
{
|
|
4951
4951
|
type: "button",
|
|
4952
4952
|
role: "option",
|
|
4953
|
-
"aria-selected":
|
|
4954
|
-
onClick: () => !
|
|
4955
|
-
disabled:
|
|
4953
|
+
"aria-selected": x.value === r,
|
|
4954
|
+
onClick: () => !x.disabled && h(x.value),
|
|
4955
|
+
disabled: x.disabled,
|
|
4956
4956
|
className: p(
|
|
4957
4957
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
4958
4958
|
"hover:bg-secondary transition-colors",
|
|
4959
4959
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
4960
|
-
|
|
4960
|
+
x.value === r && "bg-border text-foreground font-medium"
|
|
4961
4961
|
),
|
|
4962
4962
|
children: [
|
|
4963
|
-
|
|
4964
|
-
/* @__PURE__ */ e("span", { children:
|
|
4963
|
+
x.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: x.icon }),
|
|
4964
|
+
/* @__PURE__ */ e("span", { children: x.label })
|
|
4965
4965
|
]
|
|
4966
4966
|
},
|
|
4967
|
-
|
|
4967
|
+
x.value
|
|
4968
4968
|
)) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-primary/70 text-sm", children: "No options found" })
|
|
4969
4969
|
] })
|
|
4970
4970
|
]
|
|
4971
4971
|
}
|
|
4972
|
-
) }) : null }) : N && /* @__PURE__ */ e(
|
|
4973
|
-
|
|
4972
|
+
) }) : null }) : N && /* @__PURE__ */ e(de, { open: N, anchorRef: z, placement: V, children: /* @__PURE__ */ s(
|
|
4973
|
+
M.div,
|
|
4974
4974
|
{
|
|
4975
4975
|
role: "listbox",
|
|
4976
4976
|
className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
|
|
4977
4977
|
children: [
|
|
4978
|
-
|
|
4979
|
-
/* @__PURE__ */ e(
|
|
4978
|
+
d && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4979
|
+
/* @__PURE__ */ e(ye, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
4980
4980
|
/* @__PURE__ */ e(
|
|
4981
4981
|
"input",
|
|
4982
4982
|
{
|
|
4983
4983
|
type: "text",
|
|
4984
4984
|
placeholder: "Search...",
|
|
4985
4985
|
value: C,
|
|
4986
|
-
onChange: (
|
|
4986
|
+
onChange: (x) => P(x.target.value),
|
|
4987
4987
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
|
|
4988
4988
|
"aria-label": "Search options"
|
|
4989
4989
|
}
|
|
@@ -4992,7 +4992,7 @@ const co = ({
|
|
|
4992
4992
|
"button",
|
|
4993
4993
|
{
|
|
4994
4994
|
type: "button",
|
|
4995
|
-
onClick: () =>
|
|
4995
|
+
onClick: () => P(""),
|
|
4996
4996
|
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
4997
4997
|
"aria-label": "Clear search",
|
|
4998
4998
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4 text-primary/50 hover:text-primary" })
|
|
@@ -5000,7 +5000,7 @@ const co = ({
|
|
|
5000
5000
|
)
|
|
5001
5001
|
] }) }),
|
|
5002
5002
|
/* @__PURE__ */ s("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: [
|
|
5003
|
-
|
|
5003
|
+
l && /* @__PURE__ */ e(
|
|
5004
5004
|
"button",
|
|
5005
5005
|
{
|
|
5006
5006
|
type: "button",
|
|
@@ -5016,76 +5016,76 @@ const co = ({
|
|
|
5016
5016
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
5017
5017
|
}
|
|
5018
5018
|
),
|
|
5019
|
-
B.length > 0 ? B.map((
|
|
5019
|
+
B.length > 0 ? B.map((x) => /* @__PURE__ */ s(
|
|
5020
5020
|
"button",
|
|
5021
5021
|
{
|
|
5022
5022
|
type: "button",
|
|
5023
5023
|
role: "option",
|
|
5024
|
-
"aria-selected":
|
|
5025
|
-
onClick: () => !
|
|
5026
|
-
disabled:
|
|
5024
|
+
"aria-selected": x.value === r,
|
|
5025
|
+
onClick: () => !x.disabled && h(x.value),
|
|
5026
|
+
disabled: x.disabled,
|
|
5027
5027
|
className: p(
|
|
5028
5028
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
5029
5029
|
"hover:bg-secondary transition-colors",
|
|
5030
5030
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
5031
|
-
|
|
5031
|
+
x.value === r && "bg-border text-foreground font-medium"
|
|
5032
5032
|
),
|
|
5033
5033
|
children: [
|
|
5034
|
-
|
|
5035
|
-
/* @__PURE__ */ e("span", { children:
|
|
5034
|
+
x.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: x.icon }),
|
|
5035
|
+
/* @__PURE__ */ e("span", { children: x.label })
|
|
5036
5036
|
]
|
|
5037
5037
|
},
|
|
5038
|
-
|
|
5038
|
+
x.value
|
|
5039
5039
|
)) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-primary/70 text-sm", children: "No options found" })
|
|
5040
5040
|
] })
|
|
5041
5041
|
]
|
|
5042
5042
|
}
|
|
5043
5043
|
) })
|
|
5044
5044
|
] }),
|
|
5045
|
-
|
|
5046
|
-
|
|
5045
|
+
c && /* @__PURE__ */ e(
|
|
5046
|
+
M.p,
|
|
5047
5047
|
{
|
|
5048
|
-
...
|
|
5048
|
+
...I ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
5049
5049
|
className: "text-sm text-error",
|
|
5050
|
-
children:
|
|
5050
|
+
children: c
|
|
5051
5051
|
}
|
|
5052
5052
|
),
|
|
5053
|
-
i && !
|
|
5053
|
+
i && !c && /* @__PURE__ */ e("p", { className: "text-sm text-primary/70", children: i })
|
|
5054
5054
|
] });
|
|
5055
5055
|
}
|
|
5056
5056
|
);
|
|
5057
5057
|
Yr.displayName = "Select";
|
|
5058
|
-
const Wr =
|
|
5058
|
+
const Wr = Ie(
|
|
5059
5059
|
({
|
|
5060
5060
|
options: t,
|
|
5061
5061
|
value: r = [],
|
|
5062
5062
|
onChange: o,
|
|
5063
5063
|
placeholder: a = "Select options...",
|
|
5064
5064
|
label: n,
|
|
5065
|
-
error:
|
|
5065
|
+
error: c,
|
|
5066
5066
|
hint: i,
|
|
5067
|
-
searchable:
|
|
5068
|
-
clearable:
|
|
5067
|
+
searchable: d = !1,
|
|
5068
|
+
clearable: l = !0,
|
|
5069
5069
|
maxItems: m,
|
|
5070
5070
|
disabled: u,
|
|
5071
|
-
required:
|
|
5072
|
-
className:
|
|
5073
|
-
animate:
|
|
5074
|
-
chipVariant:
|
|
5071
|
+
required: y,
|
|
5072
|
+
className: g,
|
|
5073
|
+
animate: k = !0,
|
|
5074
|
+
chipVariant: I = "primary"
|
|
5075
5075
|
}, N) => {
|
|
5076
|
-
const
|
|
5077
|
-
(
|
|
5076
|
+
const S = k !== !1, [C, P] = U(!1), [V, D] = U(""), [z, j] = U("bottom"), B = Q(null), h = t.filter((v) => r.includes(v.value)), L = d ? t.filter(
|
|
5077
|
+
(v) => v.label.toLowerCase().includes(V.toLowerCase())
|
|
5078
5078
|
) : t;
|
|
5079
5079
|
J(() => {
|
|
5080
|
-
const
|
|
5081
|
-
B.current && !B.current.contains(F.target) && (
|
|
5080
|
+
const v = (F) => {
|
|
5081
|
+
B.current && !B.current.contains(F.target) && (P(!1), D(""));
|
|
5082
5082
|
};
|
|
5083
|
-
return document.addEventListener("mousedown",
|
|
5083
|
+
return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
|
|
5084
5084
|
}, []), J(() => {
|
|
5085
5085
|
if (!C) return;
|
|
5086
|
-
const
|
|
5086
|
+
const v = () => {
|
|
5087
5087
|
if (!B.current) return;
|
|
5088
|
-
const F = B.current.getBoundingClientRect(), W =
|
|
5088
|
+
const F = B.current.getBoundingClientRect(), W = d ? 360 : 300, f = window.innerHeight - F.bottom - 8, q = F.top - 8;
|
|
5089
5089
|
if (f >= W) {
|
|
5090
5090
|
j("bottom");
|
|
5091
5091
|
return;
|
|
@@ -5096,19 +5096,19 @@ const Wr = Ee(
|
|
|
5096
5096
|
}
|
|
5097
5097
|
j("bottom");
|
|
5098
5098
|
};
|
|
5099
|
-
return
|
|
5100
|
-
window.removeEventListener("resize",
|
|
5099
|
+
return v(), window.addEventListener("resize", v), window.addEventListener("scroll", v, !0), () => {
|
|
5100
|
+
window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0);
|
|
5101
5101
|
};
|
|
5102
|
-
}, [C,
|
|
5103
|
-
const
|
|
5104
|
-
const F = r.includes(
|
|
5102
|
+
}, [C, d]);
|
|
5103
|
+
const x = (v) => {
|
|
5104
|
+
const F = r.includes(v) ? r.filter((W) => W !== v) : m && r.length >= m ? r : [...r, v];
|
|
5105
5105
|
o(F);
|
|
5106
|
-
}, b = (
|
|
5107
|
-
const F = r.filter((W) => W !==
|
|
5106
|
+
}, b = (v) => {
|
|
5107
|
+
const F = r.filter((W) => W !== v);
|
|
5108
5108
|
o(F);
|
|
5109
5109
|
}, T = () => {
|
|
5110
5110
|
o([]);
|
|
5111
|
-
},
|
|
5111
|
+
}, E = {
|
|
5112
5112
|
default: "bg-secondary text-primary border border-border hover:bg-border",
|
|
5113
5113
|
primary: "bg-primary/10 text-primary border border-primary/20 hover:bg-primary/20",
|
|
5114
5114
|
success: "bg-success/10 text-success border border-success/20 hover:bg-success/20",
|
|
@@ -5116,10 +5116,10 @@ const Wr = Ee(
|
|
|
5116
5116
|
danger: "bg-error/10 text-error border border-error/20 hover:bg-error/20",
|
|
5117
5117
|
info: "bg-info/10 text-info border border-info/20 hover:bg-info/20"
|
|
5118
5118
|
}, G = z === "top" ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 } } : { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 } };
|
|
5119
|
-
return /* @__PURE__ */ s("div", { ref: N, className: p("w-full space-y-1.5",
|
|
5119
|
+
return /* @__PURE__ */ s("div", { ref: N, className: p("w-full space-y-1.5", g), children: [
|
|
5120
5120
|
n && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
5121
5121
|
n,
|
|
5122
|
-
|
|
5122
|
+
y && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
5123
5123
|
] }),
|
|
5124
5124
|
/* @__PURE__ */ s("div", { ref: B, className: "relative", children: [
|
|
5125
5125
|
/* @__PURE__ */ s(
|
|
@@ -5127,13 +5127,13 @@ const Wr = Ee(
|
|
|
5127
5127
|
{
|
|
5128
5128
|
role: "button",
|
|
5129
5129
|
tabIndex: u ? -1 : 0,
|
|
5130
|
-
onClick: () => !u &&
|
|
5131
|
-
onKeyDown: (
|
|
5132
|
-
u || (
|
|
5130
|
+
onClick: () => !u && P(!C),
|
|
5131
|
+
onKeyDown: (v) => {
|
|
5132
|
+
u || (v.key === "Enter" || v.key === " ") && (v.preventDefault(), P((F) => !F));
|
|
5133
5133
|
},
|
|
5134
5134
|
"aria-haspopup": "listbox",
|
|
5135
5135
|
"aria-expanded": C,
|
|
5136
|
-
"aria-required":
|
|
5136
|
+
"aria-required": y,
|
|
5137
5137
|
"aria-disabled": u,
|
|
5138
5138
|
className: p(
|
|
5139
5139
|
"w-full px-4 py-3 rounded-md border transition-all duration-200",
|
|
@@ -5141,43 +5141,43 @@ const Wr = Ee(
|
|
|
5141
5141
|
"focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",
|
|
5142
5142
|
u && "bg-secondary cursor-not-allowed",
|
|
5143
5143
|
"touch-target text-base min-h-12",
|
|
5144
|
-
|
|
5145
|
-
!
|
|
5144
|
+
c && "border-error focus:ring-error",
|
|
5145
|
+
!c && "border-border",
|
|
5146
5146
|
C && "ring-2 ring-primary"
|
|
5147
5147
|
),
|
|
5148
5148
|
children: [
|
|
5149
|
-
r.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2 w-full", children: h.map((
|
|
5150
|
-
|
|
5149
|
+
r.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2 w-full", children: h.map((v) => /* @__PURE__ */ s(
|
|
5150
|
+
M.div,
|
|
5151
5151
|
{
|
|
5152
5152
|
layout: !0,
|
|
5153
|
-
initial:
|
|
5154
|
-
animate:
|
|
5155
|
-
exit:
|
|
5153
|
+
initial: S ? { opacity: 0, scale: 0.8 } : {},
|
|
5154
|
+
animate: S ? { opacity: 1, scale: 1 } : {},
|
|
5155
|
+
exit: S ? { opacity: 0, scale: 0.8 } : {},
|
|
5156
5156
|
className: p(
|
|
5157
5157
|
"flex items-center gap-1.5 px-2.5 py-1 rounded-md text-sm font-medium",
|
|
5158
|
-
|
|
5158
|
+
E[I]
|
|
5159
5159
|
),
|
|
5160
5160
|
children: [
|
|
5161
|
-
|
|
5162
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
5161
|
+
v.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: v.icon }),
|
|
5162
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: v.label }),
|
|
5163
5163
|
/* @__PURE__ */ e(
|
|
5164
5164
|
"button",
|
|
5165
5165
|
{
|
|
5166
5166
|
type: "button",
|
|
5167
5167
|
onClick: (F) => {
|
|
5168
|
-
F.stopPropagation(), b(
|
|
5168
|
+
F.stopPropagation(), b(v.value);
|
|
5169
5169
|
},
|
|
5170
5170
|
className: "shrink-0 ml-0.5 hover:opacity-70 transition-opacity",
|
|
5171
|
-
"aria-label": `Remove ${
|
|
5171
|
+
"aria-label": `Remove ${v.label}`,
|
|
5172
5172
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4" })
|
|
5173
5173
|
}
|
|
5174
5174
|
)
|
|
5175
5175
|
]
|
|
5176
5176
|
},
|
|
5177
|
-
|
|
5177
|
+
v.value
|
|
5178
5178
|
)) }) : /* @__PURE__ */ e("span", { className: p("truncate", "text-foreground/50"), children: a }),
|
|
5179
5179
|
/* @__PURE__ */ e(
|
|
5180
|
-
|
|
5180
|
+
ge,
|
|
5181
5181
|
{
|
|
5182
5182
|
className: p(
|
|
5183
5183
|
"w-5 h-5 text-primary transition-transform shrink-0 ml-auto",
|
|
@@ -5188,8 +5188,8 @@ const Wr = Ee(
|
|
|
5188
5188
|
]
|
|
5189
5189
|
}
|
|
5190
5190
|
),
|
|
5191
|
-
|
|
5192
|
-
|
|
5191
|
+
S ? /* @__PURE__ */ e(se, { children: C ? /* @__PURE__ */ e(de, { open: C, anchorRef: B, placement: z, children: /* @__PURE__ */ s(
|
|
5192
|
+
M.div,
|
|
5193
5193
|
{
|
|
5194
5194
|
initial: G.initial,
|
|
5195
5195
|
animate: G.animate,
|
|
@@ -5198,15 +5198,15 @@ const Wr = Ee(
|
|
|
5198
5198
|
role: "listbox",
|
|
5199
5199
|
className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
|
|
5200
5200
|
children: [
|
|
5201
|
-
|
|
5202
|
-
/* @__PURE__ */ e(
|
|
5201
|
+
d && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
5202
|
+
/* @__PURE__ */ e(ye, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
5203
5203
|
/* @__PURE__ */ e(
|
|
5204
5204
|
"input",
|
|
5205
5205
|
{
|
|
5206
5206
|
type: "text",
|
|
5207
5207
|
placeholder: "Search...",
|
|
5208
5208
|
value: V,
|
|
5209
|
-
onChange: (
|
|
5209
|
+
onChange: (v) => D(v.target.value),
|
|
5210
5210
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
|
|
5211
5211
|
"aria-label": "Search options"
|
|
5212
5212
|
}
|
|
@@ -5223,7 +5223,7 @@ const Wr = Ee(
|
|
|
5223
5223
|
)
|
|
5224
5224
|
] }) }),
|
|
5225
5225
|
/* @__PURE__ */ s("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: [
|
|
5226
|
-
|
|
5226
|
+
l && r.length > 0 && /* @__PURE__ */ e(
|
|
5227
5227
|
"button",
|
|
5228
5228
|
{
|
|
5229
5229
|
type: "button",
|
|
@@ -5237,15 +5237,15 @@ const Wr = Ee(
|
|
|
5237
5237
|
children: /* @__PURE__ */ e("span", { children: "Clear all" })
|
|
5238
5238
|
}
|
|
5239
5239
|
),
|
|
5240
|
-
L.length > 0 ? L.map((
|
|
5241
|
-
const F = r.includes(
|
|
5240
|
+
L.length > 0 ? L.map((v) => {
|
|
5241
|
+
const F = r.includes(v.value), W = v.disabled || m !== void 0 && r.length >= m && !F;
|
|
5242
5242
|
return /* @__PURE__ */ s(
|
|
5243
5243
|
"div",
|
|
5244
5244
|
{
|
|
5245
5245
|
role: "option",
|
|
5246
5246
|
"aria-selected": F,
|
|
5247
5247
|
"aria-disabled": W,
|
|
5248
|
-
onClick: () => !W &&
|
|
5248
|
+
onClick: () => !W && x(v.value),
|
|
5249
5249
|
className: p(
|
|
5250
5250
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
5251
5251
|
"hover:bg-secondary transition-colors",
|
|
@@ -5259,38 +5259,38 @@ const Wr = Ee(
|
|
|
5259
5259
|
{
|
|
5260
5260
|
checked: F,
|
|
5261
5261
|
disabled: W,
|
|
5262
|
-
onChange: () => !W &&
|
|
5262
|
+
onChange: () => !W && x(v.value),
|
|
5263
5263
|
onClick: (f) => f.stopPropagation(),
|
|
5264
|
-
animate:
|
|
5264
|
+
animate: S,
|
|
5265
5265
|
className: "w-5 h-5",
|
|
5266
|
-
"aria-label":
|
|
5266
|
+
"aria-label": v.label
|
|
5267
5267
|
}
|
|
5268
5268
|
),
|
|
5269
|
-
|
|
5270
|
-
/* @__PURE__ */ e("span", { children:
|
|
5269
|
+
v.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: v.icon }),
|
|
5270
|
+
/* @__PURE__ */ e("span", { children: v.label })
|
|
5271
5271
|
]
|
|
5272
5272
|
},
|
|
5273
|
-
|
|
5273
|
+
v.value
|
|
5274
5274
|
);
|
|
5275
5275
|
}) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-primary/70 text-sm", children: "No options found" })
|
|
5276
5276
|
] })
|
|
5277
5277
|
]
|
|
5278
5278
|
}
|
|
5279
|
-
) }) : null }) : C && /* @__PURE__ */ e(
|
|
5280
|
-
|
|
5279
|
+
) }) : null }) : C && /* @__PURE__ */ e(de, { open: C, anchorRef: B, placement: z, children: /* @__PURE__ */ s(
|
|
5280
|
+
M.div,
|
|
5281
5281
|
{
|
|
5282
5282
|
role: "listbox",
|
|
5283
5283
|
className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
|
|
5284
5284
|
children: [
|
|
5285
|
-
|
|
5286
|
-
/* @__PURE__ */ e(
|
|
5285
|
+
d && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
5286
|
+
/* @__PURE__ */ e(ye, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
5287
5287
|
/* @__PURE__ */ e(
|
|
5288
5288
|
"input",
|
|
5289
5289
|
{
|
|
5290
5290
|
type: "text",
|
|
5291
5291
|
placeholder: "Search...",
|
|
5292
5292
|
value: V,
|
|
5293
|
-
onChange: (
|
|
5293
|
+
onChange: (v) => D(v.target.value),
|
|
5294
5294
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
|
|
5295
5295
|
"aria-label": "Search options"
|
|
5296
5296
|
}
|
|
@@ -5307,7 +5307,7 @@ const Wr = Ee(
|
|
|
5307
5307
|
)
|
|
5308
5308
|
] }) }),
|
|
5309
5309
|
/* @__PURE__ */ s("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: [
|
|
5310
|
-
|
|
5310
|
+
l && r.length > 0 && /* @__PURE__ */ e(
|
|
5311
5311
|
"button",
|
|
5312
5312
|
{
|
|
5313
5313
|
type: "button",
|
|
@@ -5321,15 +5321,15 @@ const Wr = Ee(
|
|
|
5321
5321
|
children: /* @__PURE__ */ e("span", { children: "Clear all" })
|
|
5322
5322
|
}
|
|
5323
5323
|
),
|
|
5324
|
-
L.length > 0 ? L.map((
|
|
5325
|
-
const F = r.includes(
|
|
5324
|
+
L.length > 0 ? L.map((v) => {
|
|
5325
|
+
const F = r.includes(v.value), W = v.disabled || m !== void 0 && r.length >= m && !F;
|
|
5326
5326
|
return /* @__PURE__ */ s(
|
|
5327
5327
|
"div",
|
|
5328
5328
|
{
|
|
5329
5329
|
role: "option",
|
|
5330
5330
|
"aria-selected": F,
|
|
5331
5331
|
"aria-disabled": W,
|
|
5332
|
-
onClick: () => !W &&
|
|
5332
|
+
onClick: () => !W && x(v.value),
|
|
5333
5333
|
className: p(
|
|
5334
5334
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
5335
5335
|
"hover:bg-secondary transition-colors",
|
|
@@ -5343,18 +5343,18 @@ const Wr = Ee(
|
|
|
5343
5343
|
{
|
|
5344
5344
|
checked: F,
|
|
5345
5345
|
disabled: W,
|
|
5346
|
-
onChange: () => !W &&
|
|
5346
|
+
onChange: () => !W && x(v.value),
|
|
5347
5347
|
onClick: (f) => f.stopPropagation(),
|
|
5348
|
-
animate:
|
|
5348
|
+
animate: S,
|
|
5349
5349
|
className: "w-5 h-5",
|
|
5350
|
-
"aria-label":
|
|
5350
|
+
"aria-label": v.label
|
|
5351
5351
|
}
|
|
5352
5352
|
),
|
|
5353
|
-
|
|
5354
|
-
/* @__PURE__ */ e("span", { children:
|
|
5353
|
+
v.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: v.icon }),
|
|
5354
|
+
/* @__PURE__ */ e("span", { children: v.label })
|
|
5355
5355
|
]
|
|
5356
5356
|
},
|
|
5357
|
-
|
|
5357
|
+
v.value
|
|
5358
5358
|
);
|
|
5359
5359
|
}) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-primary/70 text-sm", children: "No options found" })
|
|
5360
5360
|
] })
|
|
@@ -5362,15 +5362,15 @@ const Wr = Ee(
|
|
|
5362
5362
|
}
|
|
5363
5363
|
) })
|
|
5364
5364
|
] }),
|
|
5365
|
-
|
|
5366
|
-
|
|
5365
|
+
c && /* @__PURE__ */ e(
|
|
5366
|
+
M.p,
|
|
5367
5367
|
{
|
|
5368
|
-
...
|
|
5368
|
+
...S ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
5369
5369
|
className: "text-sm text-error",
|
|
5370
|
-
children:
|
|
5370
|
+
children: c
|
|
5371
5371
|
}
|
|
5372
5372
|
),
|
|
5373
|
-
i && !
|
|
5373
|
+
i && !c && /* @__PURE__ */ e("p", { className: "text-sm text-primary/70", children: i })
|
|
5374
5374
|
] });
|
|
5375
5375
|
}
|
|
5376
5376
|
);
|
|
@@ -5381,29 +5381,29 @@ const po = ({
|
|
|
5381
5381
|
side: o = "bottom",
|
|
5382
5382
|
offset: a = 10,
|
|
5383
5383
|
delay: n = 120,
|
|
5384
|
-
disabled:
|
|
5384
|
+
disabled: c = !1,
|
|
5385
5385
|
open: i,
|
|
5386
|
-
defaultOpen:
|
|
5387
|
-
onOpenChange:
|
|
5386
|
+
defaultOpen: d = !1,
|
|
5387
|
+
onOpenChange: l,
|
|
5388
5388
|
className: m,
|
|
5389
5389
|
showArrow: u = !0,
|
|
5390
|
-
arrowSize:
|
|
5391
|
-
arrowClassName:
|
|
5390
|
+
arrowSize: y = 10,
|
|
5391
|
+
arrowClassName: g
|
|
5392
5392
|
}) => {
|
|
5393
|
-
const [
|
|
5393
|
+
const [k, I] = U(!1), [N, S] = U(d), [C, P] = U(o), [V, D] = U("center"), [z, j] = U(null), B = Q(null), h = Q(null), L = Q(null), x = i !== void 0, b = x ? !!i : N, T = ke(
|
|
5394
5394
|
(Y) => {
|
|
5395
|
-
|
|
5395
|
+
x || S(Y), l?.(Y);
|
|
5396
5396
|
},
|
|
5397
|
-
[
|
|
5398
|
-
),
|
|
5397
|
+
[x, l]
|
|
5398
|
+
), E = ke(() => {
|
|
5399
5399
|
L.current !== null && (window.clearTimeout(L.current), L.current = null);
|
|
5400
5400
|
}, []), G = ke(() => {
|
|
5401
|
-
|
|
5401
|
+
c || (E(), L.current = window.setTimeout(() => {
|
|
5402
5402
|
T(!0);
|
|
5403
5403
|
}, Math.max(0, n)));
|
|
5404
|
-
}, [
|
|
5405
|
-
|
|
5406
|
-
}, [
|
|
5404
|
+
}, [E, n, c, T]), v = ke(() => {
|
|
5405
|
+
E(), T(!1);
|
|
5406
|
+
}, [E, T]), F = ke(() => {
|
|
5407
5407
|
if (!b || !B.current || !h.current) return;
|
|
5408
5408
|
const Y = B.current.getBoundingClientRect(), $ = h.current.getBoundingClientRect(), K = 8, Z = window.innerWidth - Y.right - K, ee = Y.left - K, pe = Y.top - K, be = window.innerHeight - Y.bottom - K, X = {
|
|
5409
5409
|
right: Z >= $.width + a,
|
|
@@ -5439,11 +5439,11 @@ const po = ({
|
|
|
5439
5439
|
Math.max(ie, K),
|
|
5440
5440
|
window.innerHeight - $.height - K
|
|
5441
5441
|
);
|
|
5442
|
-
|
|
5442
|
+
P(ae), j({ left: re, top: Ce });
|
|
5443
5443
|
}, [b, a, o]);
|
|
5444
|
-
J(() => (
|
|
5445
|
-
|
|
5446
|
-
}), []), J(() => () =>
|
|
5444
|
+
J(() => (I(!0), () => {
|
|
5445
|
+
I(!1);
|
|
5446
|
+
}), []), J(() => () => E(), [E]), J(() => {
|
|
5447
5447
|
if (b)
|
|
5448
5448
|
return F(), window.addEventListener("resize", F), window.addEventListener("scroll", F, !0), () => {
|
|
5449
5449
|
window.removeEventListener("resize", F), window.removeEventListener("scroll", F, !0);
|
|
@@ -5464,10 +5464,10 @@ const po = ({
|
|
|
5464
5464
|
[z]
|
|
5465
5465
|
), f = Ae(
|
|
5466
5466
|
() => ({
|
|
5467
|
-
width:
|
|
5468
|
-
height:
|
|
5467
|
+
width: y,
|
|
5468
|
+
height: y
|
|
5469
5469
|
}),
|
|
5470
|
-
[
|
|
5470
|
+
[y]
|
|
5471
5471
|
), q = Ae(() => C === "right" ? "left-0 top-1/2 -translate-x-1/2 -translate-y-1/2 border-l border-b" : C === "left" ? "right-0 top-1/2 translate-x-1/2 -translate-y-1/2 border-r border-t" : C === "top" ? V === "start" ? "bottom-0 left-4 translate-y-1/2 border-r border-b" : V === "end" ? "bottom-0 right-4 translate-y-1/2 border-r border-b" : "bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2 border-r border-b" : V === "start" ? "top-0 left-4 -translate-y-1/2 border-l border-t" : V === "end" ? "top-0 right-4 -translate-y-1/2 border-l border-t" : "top-0 left-1/2 -translate-x-1/2 -translate-y-1/2 border-l border-t", [V, C]);
|
|
5472
5472
|
return /* @__PURE__ */ s(Ue, { children: [
|
|
5473
5473
|
/* @__PURE__ */ e(
|
|
@@ -5476,16 +5476,16 @@ const po = ({
|
|
|
5476
5476
|
ref: B,
|
|
5477
5477
|
className: "inline-flex",
|
|
5478
5478
|
onMouseEnter: G,
|
|
5479
|
-
onMouseLeave:
|
|
5479
|
+
onMouseLeave: v,
|
|
5480
5480
|
onFocus: G,
|
|
5481
|
-
onBlur:
|
|
5481
|
+
onBlur: v,
|
|
5482
5482
|
onKeyDown: (Y) => {
|
|
5483
|
-
Y.key === "Escape" &&
|
|
5483
|
+
Y.key === "Escape" && v();
|
|
5484
5484
|
},
|
|
5485
5485
|
children: t
|
|
5486
5486
|
}
|
|
5487
5487
|
),
|
|
5488
|
-
|
|
5488
|
+
k && b && !c && mt(
|
|
5489
5489
|
/* @__PURE__ */ e("div", { style: W, role: "tooltip", "aria-hidden": !b, children: /* @__PURE__ */ s(
|
|
5490
5490
|
"div",
|
|
5491
5491
|
{
|
|
@@ -5502,7 +5502,7 @@ const po = ({
|
|
|
5502
5502
|
className: p(
|
|
5503
5503
|
"absolute rotate-45 bg-background border-border",
|
|
5504
5504
|
q,
|
|
5505
|
-
|
|
5505
|
+
g
|
|
5506
5506
|
)
|
|
5507
5507
|
}
|
|
5508
5508
|
),
|
|
@@ -5514,15 +5514,83 @@ const po = ({
|
|
|
5514
5514
|
)
|
|
5515
5515
|
] });
|
|
5516
5516
|
}, bo = ({
|
|
5517
|
+
items: t,
|
|
5518
|
+
variant: r = "default",
|
|
5519
|
+
allowMultiple: o = !1,
|
|
5520
|
+
defaultOpen: a = [],
|
|
5521
|
+
className: n,
|
|
5522
|
+
onChange: c,
|
|
5523
|
+
animate: i = !0
|
|
5524
|
+
}) => {
|
|
5525
|
+
const d = i !== !1, [l, m] = U(a), u = (g) => {
|
|
5526
|
+
let k;
|
|
5527
|
+
o ? k = l.includes(g) ? l.filter((I) => I !== g) : [...l, g] : k = l.includes(g) ? [] : [g], m(k), c?.(k);
|
|
5528
|
+
}, y = {
|
|
5529
|
+
default: "border-t border-border",
|
|
5530
|
+
bordered: "border border-border rounded-none"
|
|
5531
|
+
};
|
|
5532
|
+
return /* @__PURE__ */ e("div", { className: p("w-full", n), children: t.map((g, k) => /* @__PURE__ */ s(
|
|
5533
|
+
"div",
|
|
5534
|
+
{
|
|
5535
|
+
className: p(
|
|
5536
|
+
y[r],
|
|
5537
|
+
k === t.length - 1 && r === "default" && "border-b border-border"
|
|
5538
|
+
),
|
|
5539
|
+
children: [
|
|
5540
|
+
/* @__PURE__ */ s(
|
|
5541
|
+
M.button,
|
|
5542
|
+
{
|
|
5543
|
+
onClick: () => !g.disabled && u(g.id),
|
|
5544
|
+
disabled: g.disabled,
|
|
5545
|
+
className: p(
|
|
5546
|
+
"w-full flex items-center justify-between px-4 py-3 text-left transition-colors",
|
|
5547
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
5548
|
+
"disabled:hover:bg-transparent"
|
|
5549
|
+
),
|
|
5550
|
+
whileHover: !g.disabled && d ? { backgroundColor: "var(--color-secondary)" } : {},
|
|
5551
|
+
whileTap: !g.disabled && d ? { scale: 0.99 } : {},
|
|
5552
|
+
children: [
|
|
5553
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-3 flex-1", children: [
|
|
5554
|
+
g.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: g.icon }),
|
|
5555
|
+
/* @__PURE__ */ e("span", { className: "text-foreground font-medium", children: g.title })
|
|
5556
|
+
] }),
|
|
5557
|
+
/* @__PURE__ */ e(
|
|
5558
|
+
M.div,
|
|
5559
|
+
{
|
|
5560
|
+
animate: { rotate: l.includes(g.id) ? 180 : 0 },
|
|
5561
|
+
transition: d ? { duration: 0.3 } : { duration: 0 },
|
|
5562
|
+
className: "shrink-0 ml-2",
|
|
5563
|
+
children: /* @__PURE__ */ e(ge, { className: "w-5 h-5 text-foreground/60" })
|
|
5564
|
+
}
|
|
5565
|
+
)
|
|
5566
|
+
]
|
|
5567
|
+
}
|
|
5568
|
+
),
|
|
5569
|
+
/* @__PURE__ */ e(se, { children: l.includes(g.id) && /* @__PURE__ */ e(
|
|
5570
|
+
M.div,
|
|
5571
|
+
{
|
|
5572
|
+
initial: d ? { height: 0, opacity: 0 } : { height: "auto", opacity: 1 },
|
|
5573
|
+
animate: { height: "auto", opacity: 1 },
|
|
5574
|
+
exit: d ? { height: 0, opacity: 0 } : { height: 0, opacity: 1 },
|
|
5575
|
+
transition: d ? { duration: 0.3, ease: "easeInOut" } : { duration: 0 },
|
|
5576
|
+
className: "overflow-hidden",
|
|
5577
|
+
children: /* @__PURE__ */ e("div", { className: "px-4 py-3 bg-secondary/40 text-foreground text-sm leading-relaxed", children: g.content })
|
|
5578
|
+
}
|
|
5579
|
+
) })
|
|
5580
|
+
]
|
|
5581
|
+
},
|
|
5582
|
+
g.id
|
|
5583
|
+
)) });
|
|
5584
|
+
}, ho = ({
|
|
5517
5585
|
children: t,
|
|
5518
5586
|
variant: r = "default",
|
|
5519
5587
|
padding: o = "md",
|
|
5520
5588
|
className: a,
|
|
5521
5589
|
onClick: n,
|
|
5522
|
-
hover:
|
|
5590
|
+
hover: c = !1,
|
|
5523
5591
|
animate: i = !0
|
|
5524
5592
|
}) => {
|
|
5525
|
-
const
|
|
5593
|
+
const d = i !== !1, l = {
|
|
5526
5594
|
default: "bg-background border border-border",
|
|
5527
5595
|
outlined: "bg-transparent border-2 border-border-dark",
|
|
5528
5596
|
elevated: "bg-background border-2 border-border shadow-card"
|
|
@@ -5531,20 +5599,20 @@ const po = ({
|
|
|
5531
5599
|
sm: "p-3",
|
|
5532
5600
|
md: "p-4 sm:p-6",
|
|
5533
5601
|
lg: "p-6 sm:p-8"
|
|
5534
|
-
}, u = n ?
|
|
5602
|
+
}, u = n ? M.button : M.div;
|
|
5535
5603
|
return /* @__PURE__ */ e(
|
|
5536
5604
|
u,
|
|
5537
5605
|
{
|
|
5538
|
-
...
|
|
5606
|
+
...d ? {
|
|
5539
5607
|
initial: { opacity: 0, y: 20 },
|
|
5540
5608
|
animate: { opacity: 1, y: 0 },
|
|
5541
5609
|
transition: { duration: 0.3 }
|
|
5542
5610
|
} : {},
|
|
5543
|
-
whileHover:
|
|
5544
|
-
whileTap:
|
|
5611
|
+
whileHover: d && (c || n) ? { y: -2, boxShadow: "0 10px 15px -3px rgb(0 0 0 / 0.1)" } : void 0,
|
|
5612
|
+
whileTap: d && n ? { scale: 0.98 } : void 0,
|
|
5545
5613
|
className: p(
|
|
5546
5614
|
"rounded-lg transition-all duration-200",
|
|
5547
|
-
|
|
5615
|
+
l[r],
|
|
5548
5616
|
m[o],
|
|
5549
5617
|
n && "cursor-pointer w-full text-left",
|
|
5550
5618
|
a
|
|
@@ -5553,16 +5621,16 @@ const po = ({
|
|
|
5553
5621
|
children: t
|
|
5554
5622
|
}
|
|
5555
5623
|
);
|
|
5556
|
-
},
|
|
5624
|
+
}, fo = ({ children: t, className: r }) => /* @__PURE__ */ e("div", { className: p("mb-4", r), children: t }), go = ({ children: t, className: r }) => /* @__PURE__ */ e("h3", { className: p("text-lg font-semibold text-foreground", r), children: t }), yo = ({ children: t, className: r }) => /* @__PURE__ */ e("p", { className: p("text-sm text-foreground/70 mt-1", r), children: t }), xo = ({ children: t, className: r }) => /* @__PURE__ */ e("div", { className: r, children: t }), wo = ({
|
|
5557
5625
|
isOpen: t,
|
|
5558
5626
|
onClose: r,
|
|
5559
5627
|
children: o,
|
|
5560
5628
|
title: a,
|
|
5561
5629
|
position: n = "right",
|
|
5562
|
-
className:
|
|
5630
|
+
className: c,
|
|
5563
5631
|
animate: i = !0
|
|
5564
5632
|
}) => {
|
|
5565
|
-
const
|
|
5633
|
+
const d = i !== !1;
|
|
5566
5634
|
J(() => {
|
|
5567
5635
|
const m = (u) => {
|
|
5568
5636
|
u.key === "Escape" && r();
|
|
@@ -5571,19 +5639,19 @@ const po = ({
|
|
|
5571
5639
|
document.removeEventListener("keydown", m), document.body.style.overflow = "unset";
|
|
5572
5640
|
};
|
|
5573
5641
|
}, [t, r]);
|
|
5574
|
-
const
|
|
5642
|
+
const l = t ? /* @__PURE__ */ s(Ue, { children: [
|
|
5575
5643
|
/* @__PURE__ */ e(
|
|
5576
|
-
|
|
5644
|
+
M.div,
|
|
5577
5645
|
{
|
|
5578
|
-
...
|
|
5646
|
+
...d ? { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2 } } : {},
|
|
5579
5647
|
className: "fixed inset-0 z-40 bg-black/50 backdrop-blur-sm",
|
|
5580
5648
|
onClick: r
|
|
5581
5649
|
}
|
|
5582
5650
|
),
|
|
5583
5651
|
/* @__PURE__ */ s(
|
|
5584
|
-
|
|
5652
|
+
M.div,
|
|
5585
5653
|
{
|
|
5586
|
-
...
|
|
5654
|
+
...d ? {
|
|
5587
5655
|
initial: { x: n === "left" ? "-100%" : "100%" },
|
|
5588
5656
|
animate: { x: 0 },
|
|
5589
5657
|
exit: { x: n === "left" ? "-100%" : "100%" },
|
|
@@ -5593,7 +5661,7 @@ const po = ({
|
|
|
5593
5661
|
"fixed top-0 z-50 h-full w-[400px] sm:w-[480px] bg-background shadow-xl",
|
|
5594
5662
|
n === "left" ? "left-0 border-r" : "right-0 border-l",
|
|
5595
5663
|
"border-border",
|
|
5596
|
-
|
|
5664
|
+
c
|
|
5597
5665
|
),
|
|
5598
5666
|
children: [
|
|
5599
5667
|
a && /* @__PURE__ */ s("div", { className: "flex items-center justify-between px-6 py-4 border-b border-border", children: [
|
|
@@ -5613,23 +5681,23 @@ const po = ({
|
|
|
5613
5681
|
}
|
|
5614
5682
|
)
|
|
5615
5683
|
] }) : null;
|
|
5616
|
-
return
|
|
5617
|
-
},
|
|
5684
|
+
return d ? /* @__PURE__ */ e(se, { children: l }) : l;
|
|
5685
|
+
}, vo = ({
|
|
5618
5686
|
isOpen: t,
|
|
5619
5687
|
onClose: r,
|
|
5620
5688
|
children: o,
|
|
5621
5689
|
title: a,
|
|
5622
5690
|
size: n = "md",
|
|
5623
|
-
className:
|
|
5691
|
+
className: c,
|
|
5624
5692
|
animate: i = !0
|
|
5625
5693
|
}) => {
|
|
5626
|
-
const
|
|
5694
|
+
const d = i !== !1, l = Q(null);
|
|
5627
5695
|
J(() => {
|
|
5628
|
-
const
|
|
5629
|
-
|
|
5696
|
+
const y = (g) => {
|
|
5697
|
+
g.key === "Escape" && r();
|
|
5630
5698
|
};
|
|
5631
|
-
return t && (document.addEventListener("keydown",
|
|
5632
|
-
document.removeEventListener("keydown",
|
|
5699
|
+
return t && (document.addEventListener("keydown", y), document.body.style.overflow = "hidden"), () => {
|
|
5700
|
+
document.removeEventListener("keydown", y), document.body.style.overflow = "unset";
|
|
5633
5701
|
};
|
|
5634
5702
|
}, [t, r]);
|
|
5635
5703
|
const m = {
|
|
@@ -5642,18 +5710,18 @@ const po = ({
|
|
|
5642
5710
|
"div",
|
|
5643
5711
|
{
|
|
5644
5712
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",
|
|
5645
|
-
onClick: (
|
|
5646
|
-
|
|
5713
|
+
onClick: (y) => {
|
|
5714
|
+
y.target === y.currentTarget && r();
|
|
5647
5715
|
},
|
|
5648
5716
|
children: /* @__PURE__ */ s(
|
|
5649
|
-
|
|
5717
|
+
M.div,
|
|
5650
5718
|
{
|
|
5651
|
-
ref:
|
|
5652
|
-
...
|
|
5719
|
+
ref: l,
|
|
5720
|
+
...d ? { initial: { opacity: 0, scale: 0.95 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.95 }, transition: { duration: 0.2 } } : {},
|
|
5653
5721
|
className: p(
|
|
5654
5722
|
"bg-background border border-border rounded-lg shadow-2xl w-full max-h-[90vh] overflow-hidden flex flex-col",
|
|
5655
5723
|
m[n],
|
|
5656
|
-
|
|
5724
|
+
c
|
|
5657
5725
|
),
|
|
5658
5726
|
children: [
|
|
5659
5727
|
a && /* @__PURE__ */ s("div", { className: "px-6 py-4 border-b border-border flex items-center justify-between", children: [
|
|
@@ -5674,23 +5742,23 @@ const po = ({
|
|
|
5674
5742
|
)
|
|
5675
5743
|
}
|
|
5676
5744
|
) : null;
|
|
5677
|
-
return
|
|
5678
|
-
},
|
|
5745
|
+
return d ? /* @__PURE__ */ e(se, { children: u }) : u;
|
|
5746
|
+
}, Co = ({
|
|
5679
5747
|
children: t,
|
|
5680
5748
|
className: r
|
|
5681
|
-
}) => /* @__PURE__ */ e("div", { className: p("px-6 py-4", r), children: t }),
|
|
5749
|
+
}) => /* @__PURE__ */ e("div", { className: p("px-6 py-4", r), children: t }), No = ({
|
|
5682
5750
|
children: t,
|
|
5683
5751
|
className: r
|
|
5684
|
-
}) => /* @__PURE__ */ e("div", { className: p("px-6 py-4 border-t border-border flex items-center justify-end gap-3 bg-background sticky bottom-0", r), children: t }),
|
|
5752
|
+
}) => /* @__PURE__ */ e("div", { className: p("px-6 py-4 border-t border-border flex items-center justify-end gap-3 bg-background sticky bottom-0", r), children: t }), ko = ({
|
|
5685
5753
|
isOpen: t,
|
|
5686
5754
|
onClose: r,
|
|
5687
5755
|
title: o,
|
|
5688
5756
|
children: a,
|
|
5689
5757
|
showCloseButton: n = !1,
|
|
5690
|
-
className:
|
|
5758
|
+
className: c,
|
|
5691
5759
|
animate: i = !0
|
|
5692
5760
|
}) => {
|
|
5693
|
-
const
|
|
5761
|
+
const d = i !== !1;
|
|
5694
5762
|
J(() => {
|
|
5695
5763
|
const m = (u) => {
|
|
5696
5764
|
u.key === "Escape" && r();
|
|
@@ -5699,24 +5767,24 @@ const po = ({
|
|
|
5699
5767
|
document.removeEventListener("keydown", m), document.body.style.overflow = "unset";
|
|
5700
5768
|
};
|
|
5701
5769
|
}, [t, r]);
|
|
5702
|
-
const
|
|
5770
|
+
const l = t ? /* @__PURE__ */ s(Ue, { children: [
|
|
5703
5771
|
/* @__PURE__ */ e(
|
|
5704
|
-
|
|
5772
|
+
M.div,
|
|
5705
5773
|
{
|
|
5706
|
-
...
|
|
5774
|
+
...d ? { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 } } : {},
|
|
5707
5775
|
onClick: r,
|
|
5708
5776
|
className: "fixed inset-0 bg-black/50 z-40"
|
|
5709
5777
|
}
|
|
5710
5778
|
),
|
|
5711
5779
|
/* @__PURE__ */ s(
|
|
5712
|
-
|
|
5780
|
+
M.div,
|
|
5713
5781
|
{
|
|
5714
|
-
...
|
|
5782
|
+
...d ? { initial: { y: "100%" }, animate: { y: 0 }, exit: { y: "100%" }, transition: { type: "spring", damping: 30, stiffness: 300 } } : {},
|
|
5715
5783
|
className: p(
|
|
5716
5784
|
"fixed bottom-0 left-0 right-0 z-50",
|
|
5717
5785
|
"bg-white rounded-t-3xl shadow-2xl",
|
|
5718
5786
|
"max-h-[90vh] flex flex-col",
|
|
5719
|
-
|
|
5787
|
+
c
|
|
5720
5788
|
),
|
|
5721
5789
|
children: [
|
|
5722
5790
|
/* @__PURE__ */ e("div", { className: "flex justify-center pt-3 pb-2", children: /* @__PURE__ */ e("div", { className: "w-12 h-1.5 bg-border-dark rounded-full" }) }),
|
|
@@ -5737,47 +5805,47 @@ const po = ({
|
|
|
5737
5805
|
}
|
|
5738
5806
|
)
|
|
5739
5807
|
] }) : null;
|
|
5740
|
-
return
|
|
5808
|
+
return d ? /* @__PURE__ */ e(se, { children: l }) : l;
|
|
5741
5809
|
};
|
|
5742
|
-
function
|
|
5810
|
+
function So({
|
|
5743
5811
|
data: t,
|
|
5744
5812
|
columns: r,
|
|
5745
5813
|
loading: o = !1,
|
|
5746
5814
|
onRowClick: a,
|
|
5747
5815
|
keyExtractor: n,
|
|
5748
|
-
selectable:
|
|
5816
|
+
selectable: c = !1,
|
|
5749
5817
|
selectedKeys: i,
|
|
5750
|
-
defaultSelectedKeys:
|
|
5751
|
-
onSelectionChange:
|
|
5818
|
+
defaultSelectedKeys: d = [],
|
|
5819
|
+
onSelectionChange: l,
|
|
5752
5820
|
className: m,
|
|
5753
5821
|
animate: u = !0
|
|
5754
5822
|
}) {
|
|
5755
|
-
const
|
|
5756
|
-
|
|
5757
|
-
const T = new Set(b),
|
|
5758
|
-
|
|
5823
|
+
const y = u !== !1, [g, k] = U(null), [I, N] = U("asc"), [S, C] = U(d), P = i !== void 0, V = P ? i : S, D = new Set(V), z = (b) => {
|
|
5824
|
+
P || C(b);
|
|
5825
|
+
const T = new Set(b), E = t.filter((G) => T.has(n(G)));
|
|
5826
|
+
l?.(b, E);
|
|
5759
5827
|
}, j = (b) => {
|
|
5760
|
-
|
|
5761
|
-
}, B =
|
|
5762
|
-
const
|
|
5763
|
-
return
|
|
5828
|
+
g === b ? N(I === "asc" ? "desc" : "asc") : (k(b), N("asc"));
|
|
5829
|
+
}, B = g ? [...t].sort((b, T) => {
|
|
5830
|
+
const E = b[g], G = T[g];
|
|
5831
|
+
return E < G ? I === "asc" ? -1 : 1 : E > G ? I === "asc" ? 1 : -1 : 0;
|
|
5764
5832
|
}) : t, h = t.length > 0 && t.every((b) => D.has(n(b))), L = (b) => {
|
|
5765
5833
|
if (b) {
|
|
5766
5834
|
z(t.map((T) => n(T)));
|
|
5767
5835
|
return;
|
|
5768
5836
|
}
|
|
5769
5837
|
z([]);
|
|
5770
|
-
},
|
|
5771
|
-
const
|
|
5838
|
+
}, x = (b, T) => {
|
|
5839
|
+
const E = n(b);
|
|
5772
5840
|
if (T) {
|
|
5773
|
-
D.has(
|
|
5841
|
+
D.has(E) || z([...V, E]);
|
|
5774
5842
|
return;
|
|
5775
5843
|
}
|
|
5776
|
-
z(V.filter((G) => G !==
|
|
5844
|
+
z(V.filter((G) => G !== E));
|
|
5777
5845
|
};
|
|
5778
5846
|
return o ? /* @__PURE__ */ e("div", { className: p("border border-border rounded-lg overflow-hidden", m), children: /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ s("table", { className: "w-full", children: [
|
|
5779
5847
|
/* @__PURE__ */ e("thead", { className: "border-b border-border", children: /* @__PURE__ */ s("tr", { children: [
|
|
5780
|
-
|
|
5848
|
+
c && /* @__PURE__ */ e("th", { className: "px-4 py-4 text-left w-14", children: /* @__PURE__ */ e("div", { className: "flex items-center", onClick: (b) => b.stopPropagation(), children: /* @__PURE__ */ e(
|
|
5781
5849
|
ze,
|
|
5782
5850
|
{
|
|
5783
5851
|
checked: h,
|
|
@@ -5786,20 +5854,20 @@ function ko({
|
|
|
5786
5854
|
"aria-label": "Select all rows"
|
|
5787
5855
|
}
|
|
5788
5856
|
) }) }),
|
|
5789
|
-
r.map((b, T) => /* @__PURE__ */ e("th", { className: "px-6 py-4 text-left", children: /* @__PURE__ */ e("div", { className: p("h-4 bg-border rounded w-24",
|
|
5857
|
+
r.map((b, T) => /* @__PURE__ */ e("th", { className: "px-6 py-4 text-left", children: /* @__PURE__ */ e("div", { className: p("h-4 bg-border rounded w-24", y && "animate-pulse") }) }, T))
|
|
5790
5858
|
] }) }),
|
|
5791
5859
|
/* @__PURE__ */ e("tbody", { children: [...Array(5)].map((b, T) => /* @__PURE__ */ s("tr", { className: "border-b border-border", children: [
|
|
5792
|
-
|
|
5793
|
-
r.map((
|
|
5860
|
+
c && /* @__PURE__ */ e("td", { className: "px-4 py-4 w-14", children: /* @__PURE__ */ e("div", { className: p("h-4 bg-secondary rounded", y && "animate-pulse") }) }),
|
|
5861
|
+
r.map((E, G) => /* @__PURE__ */ e("td", { className: "px-6 py-4", children: /* @__PURE__ */ e("div", { className: p("h-4 bg-secondary rounded", y && "animate-pulse") }) }, G))
|
|
5794
5862
|
] }, T)) })
|
|
5795
5863
|
] }) }) }) : /* @__PURE__ */ e(
|
|
5796
|
-
|
|
5864
|
+
M.div,
|
|
5797
5865
|
{
|
|
5798
|
-
...
|
|
5866
|
+
...y ? { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 } } : {},
|
|
5799
5867
|
className: p("border border-border rounded-lg overflow-hidden", m),
|
|
5800
5868
|
children: /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ s("table", { className: "w-full", children: [
|
|
5801
5869
|
/* @__PURE__ */ e("thead", { className: "border-b border-border", children: /* @__PURE__ */ s("tr", { children: [
|
|
5802
|
-
|
|
5870
|
+
c && /* @__PURE__ */ e("th", { className: "px-4 py-4 text-left w-14", children: /* @__PURE__ */ e("div", { className: "flex items-center", onClick: (b) => b.stopPropagation(), children: /* @__PURE__ */ e(
|
|
5803
5871
|
ze,
|
|
5804
5872
|
{
|
|
5805
5873
|
checked: h,
|
|
@@ -5819,41 +5887,41 @@ function ko({
|
|
|
5819
5887
|
onClick: () => b.sortable && j(b.key),
|
|
5820
5888
|
children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
5821
5889
|
b.header,
|
|
5822
|
-
b.sortable && /* @__PURE__ */ e("span", { className: "text-primary/50 hover:text-primary transition-colors", children:
|
|
5890
|
+
b.sortable && /* @__PURE__ */ e("span", { className: "text-primary/50 hover:text-primary transition-colors", children: g === b.key ? I === "asc" ? /* @__PURE__ */ e(Et, { className: "w-4 h-4" }) : /* @__PURE__ */ e(Pt, { className: "w-4 h-4" }) : /* @__PURE__ */ e(Bt, { className: "w-4 h-4" }) })
|
|
5823
5891
|
] })
|
|
5824
5892
|
},
|
|
5825
5893
|
T
|
|
5826
5894
|
))
|
|
5827
5895
|
] }) }),
|
|
5828
5896
|
/* @__PURE__ */ e("tbody", { children: B.map((b, T) => /* @__PURE__ */ s(
|
|
5829
|
-
|
|
5897
|
+
M.tr,
|
|
5830
5898
|
{
|
|
5831
|
-
...
|
|
5899
|
+
...y ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.2, delay: T * 0.05 } } : {},
|
|
5832
5900
|
onClick: () => a && a(b),
|
|
5833
5901
|
className: p(
|
|
5834
5902
|
"border-b border-border transition-colors",
|
|
5835
5903
|
a && "cursor-pointer hover:bg-secondary"
|
|
5836
5904
|
),
|
|
5837
5905
|
children: [
|
|
5838
|
-
|
|
5906
|
+
c && /* @__PURE__ */ e("td", { className: "px-4 py-4 w-14", onClick: (E) => E.stopPropagation(), children: /* @__PURE__ */ e("div", { className: "flex items-center", children: /* @__PURE__ */ e(
|
|
5839
5907
|
ze,
|
|
5840
5908
|
{
|
|
5841
5909
|
checked: D.has(n(b)),
|
|
5842
|
-
onChange: (
|
|
5910
|
+
onChange: (E) => x(b, E),
|
|
5843
5911
|
className: "w-5 h-5",
|
|
5844
5912
|
"aria-label": `Select row ${T + 1}`
|
|
5845
5913
|
}
|
|
5846
5914
|
) }) }),
|
|
5847
|
-
r.map((
|
|
5915
|
+
r.map((E, G) => /* @__PURE__ */ e(
|
|
5848
5916
|
"td",
|
|
5849
5917
|
{
|
|
5850
5918
|
className: p(
|
|
5851
5919
|
"px-6 py-4 text-sm text-foreground/70",
|
|
5852
|
-
|
|
5920
|
+
E.width
|
|
5853
5921
|
),
|
|
5854
|
-
style:
|
|
5855
|
-
title:
|
|
5856
|
-
children:
|
|
5922
|
+
style: E.width ? { width: E.width } : void 0,
|
|
5923
|
+
title: E.truncate && !E.render ? String(b[E.key] ?? "") : void 0,
|
|
5924
|
+
children: E.truncate && !E.render ? /* @__PURE__ */ e("div", { className: "truncate", children: String(b[E.key] ?? "") }) : E.render ? E.render(b) : String(b[E.key] ?? "")
|
|
5857
5925
|
},
|
|
5858
5926
|
G
|
|
5859
5927
|
))
|
|
@@ -5865,30 +5933,30 @@ function ko({
|
|
|
5865
5933
|
}
|
|
5866
5934
|
);
|
|
5867
5935
|
}
|
|
5868
|
-
const
|
|
5936
|
+
const Mo = ({
|
|
5869
5937
|
currentPage: t,
|
|
5870
5938
|
totalPages: r,
|
|
5871
5939
|
onPageChange: o,
|
|
5872
5940
|
totalItems: a,
|
|
5873
5941
|
itemsPerPage: n,
|
|
5874
|
-
className:
|
|
5942
|
+
className: c,
|
|
5875
5943
|
animate: i = !0
|
|
5876
5944
|
}) => {
|
|
5877
|
-
const
|
|
5945
|
+
const d = i !== !1, l = et.useMemo(() => {
|
|
5878
5946
|
if (r <= 5)
|
|
5879
|
-
return Array.from({ length: r }, (
|
|
5880
|
-
const
|
|
5881
|
-
let
|
|
5882
|
-
return
|
|
5947
|
+
return Array.from({ length: r }, (I, N) => N + 1);
|
|
5948
|
+
const y = Math.floor(5 / 2);
|
|
5949
|
+
let g = Math.max(1, t - y), k = g + 5 - 1;
|
|
5950
|
+
return k > r && (k = r, g = Math.max(1, k - 5 + 1)), Array.from({ length: k - g + 1 }, (I, N) => g + N);
|
|
5883
5951
|
}, [t, r]), m = (u) => {
|
|
5884
|
-
const
|
|
5885
|
-
|
|
5952
|
+
const y = Math.max(1, Math.min(r, u));
|
|
5953
|
+
y !== t && o(y);
|
|
5886
5954
|
};
|
|
5887
5955
|
return /* @__PURE__ */ s(
|
|
5888
|
-
|
|
5956
|
+
M.div,
|
|
5889
5957
|
{
|
|
5890
|
-
...
|
|
5891
|
-
className: p("flex items-center justify-between gap-4 flex-wrap",
|
|
5958
|
+
...d ? { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 } } : {},
|
|
5959
|
+
className: p("flex items-center justify-between gap-4 flex-wrap", c),
|
|
5892
5960
|
children: [
|
|
5893
5961
|
/* @__PURE__ */ e("div", { className: "text-sm text-foreground/70", children: a && n && /* @__PURE__ */ s("span", { children: [
|
|
5894
5962
|
"Showing ",
|
|
@@ -5913,7 +5981,7 @@ const So = ({
|
|
|
5913
5981
|
children: "Previous"
|
|
5914
5982
|
}
|
|
5915
5983
|
),
|
|
5916
|
-
!
|
|
5984
|
+
!l.includes(1) && /* @__PURE__ */ e(
|
|
5917
5985
|
Fe,
|
|
5918
5986
|
{
|
|
5919
5987
|
variant: "secondary",
|
|
@@ -5924,20 +5992,20 @@ const So = ({
|
|
|
5924
5992
|
"aria-label": "Go to first page"
|
|
5925
5993
|
}
|
|
5926
5994
|
),
|
|
5927
|
-
/* @__PURE__ */ e(
|
|
5928
|
-
const
|
|
5995
|
+
/* @__PURE__ */ e(M.div, { layout: !0, className: "flex items-center justify-center gap-1 min-w-56", children: /* @__PURE__ */ e(se, { initial: !1, mode: "popLayout", children: l.map((u) => {
|
|
5996
|
+
const y = u === t;
|
|
5929
5997
|
return /* @__PURE__ */ e(
|
|
5930
|
-
|
|
5998
|
+
M.button,
|
|
5931
5999
|
{
|
|
5932
6000
|
layout: !0,
|
|
5933
|
-
whileHover:
|
|
5934
|
-
whileTap:
|
|
6001
|
+
whileHover: d ? { y: -1 } : void 0,
|
|
6002
|
+
whileTap: d ? { scale: 0.96 } : void 0,
|
|
5935
6003
|
onClick: () => m(u),
|
|
5936
6004
|
className: p(
|
|
5937
6005
|
"w-10 h-10 rounded-md border text-sm font-medium tabular-nums leading-none inline-flex items-center justify-center transition-all duration-200",
|
|
5938
|
-
|
|
6006
|
+
y ? "bg-primary text-white border-primary shadow-sm" : "hover:bg-secondary border-border text-foreground"
|
|
5939
6007
|
),
|
|
5940
|
-
"aria-current":
|
|
6008
|
+
"aria-current": y ? "page" : void 0,
|
|
5941
6009
|
children: u
|
|
5942
6010
|
},
|
|
5943
6011
|
u
|
|
@@ -5965,36 +6033,36 @@ const So = ({
|
|
|
5965
6033
|
label: o,
|
|
5966
6034
|
actions: a,
|
|
5967
6035
|
variant: n = "primary",
|
|
5968
|
-
position:
|
|
6036
|
+
position: c = "bottom-right",
|
|
5969
6037
|
disabled: i,
|
|
5970
|
-
className:
|
|
5971
|
-
animate:
|
|
6038
|
+
className: d,
|
|
6039
|
+
animate: l = !0
|
|
5972
6040
|
}) => {
|
|
5973
|
-
const m =
|
|
6041
|
+
const m = l !== !1, [u, y] = U(!1), g = {
|
|
5974
6042
|
"bottom-right": "fixed bottom-6 right-6",
|
|
5975
6043
|
"bottom-left": "fixed bottom-6 left-6",
|
|
5976
6044
|
"bottom-center": "fixed bottom-6 left-1/2 -translate-x-1/2"
|
|
5977
|
-
},
|
|
6045
|
+
}, k = {
|
|
5978
6046
|
primary: "bg-primary text-white hover:bg-primary/80 shadow-lg",
|
|
5979
6047
|
secondary: "bg-background text-primary border-2 border-primary hover:bg-secondary shadow-md"
|
|
5980
|
-
},
|
|
6048
|
+
}, I = {
|
|
5981
6049
|
primary: "bg-primary text-white",
|
|
5982
6050
|
success: "bg-success text-white",
|
|
5983
6051
|
danger: "bg-error text-white",
|
|
5984
6052
|
warning: "bg-warning text-white"
|
|
5985
6053
|
}, N = () => {
|
|
5986
|
-
a && a.length > 0 ?
|
|
6054
|
+
a && a.length > 0 ? y(!u) : r && r();
|
|
5987
6055
|
};
|
|
5988
|
-
return /* @__PURE__ */ s("div", { className: p(
|
|
5989
|
-
m ? /* @__PURE__ */ e(
|
|
5990
|
-
|
|
6056
|
+
return /* @__PURE__ */ s("div", { className: p(g[c], "z-50", d), children: [
|
|
6057
|
+
m ? /* @__PURE__ */ e(se, { children: u && a ? /* @__PURE__ */ e(
|
|
6058
|
+
M.div,
|
|
5991
6059
|
{
|
|
5992
6060
|
initial: { opacity: 0 },
|
|
5993
6061
|
animate: { opacity: 1 },
|
|
5994
6062
|
exit: { opacity: 0 },
|
|
5995
6063
|
className: "absolute bottom-20 right-0 flex flex-col gap-3 mb-2",
|
|
5996
|
-
children: a.map((
|
|
5997
|
-
|
|
6064
|
+
children: a.map((S, C) => /* @__PURE__ */ s(
|
|
6065
|
+
M.div,
|
|
5998
6066
|
{
|
|
5999
6067
|
initial: { opacity: 0, y: 20, scale: 0.8 },
|
|
6000
6068
|
animate: { opacity: 1, y: 0, scale: 1 },
|
|
@@ -6007,25 +6075,25 @@ const So = ({
|
|
|
6007
6075
|
{
|
|
6008
6076
|
className: p(
|
|
6009
6077
|
"bg-background border border-border rounded-md px-3 py-1.5 text-sm font-medium whitespace-nowrap shadow-lg",
|
|
6010
|
-
|
|
6078
|
+
S.labelClassName
|
|
6011
6079
|
),
|
|
6012
|
-
style:
|
|
6013
|
-
children:
|
|
6080
|
+
style: S.labelStyle,
|
|
6081
|
+
children: S.label
|
|
6014
6082
|
}
|
|
6015
6083
|
),
|
|
6016
6084
|
/* @__PURE__ */ e(
|
|
6017
|
-
|
|
6085
|
+
M.button,
|
|
6018
6086
|
{
|
|
6019
6087
|
whileHover: m ? { scale: 1.1 } : void 0,
|
|
6020
6088
|
whileTap: m ? { scale: 0.9 } : void 0,
|
|
6021
6089
|
onClick: () => {
|
|
6022
|
-
|
|
6090
|
+
S.onClick(), y(!1);
|
|
6023
6091
|
},
|
|
6024
6092
|
className: p(
|
|
6025
6093
|
"w-12 h-12 rounded-full shadow-lg flex items-center justify-center transition-all",
|
|
6026
|
-
|
|
6094
|
+
I[S.variant || "primary"]
|
|
6027
6095
|
),
|
|
6028
|
-
children:
|
|
6096
|
+
children: S.icon
|
|
6029
6097
|
}
|
|
6030
6098
|
)
|
|
6031
6099
|
]
|
|
@@ -6033,34 +6101,34 @@ const So = ({
|
|
|
6033
6101
|
C
|
|
6034
6102
|
))
|
|
6035
6103
|
}
|
|
6036
|
-
) : null }) : u && a && /* @__PURE__ */ e("div", { className: "absolute bottom-20 right-0 flex flex-col gap-3 mb-2", children: a.map((
|
|
6104
|
+
) : null }) : u && a && /* @__PURE__ */ e("div", { className: "absolute bottom-20 right-0 flex flex-col gap-3 mb-2", children: a.map((S, C) => /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
6037
6105
|
/* @__PURE__ */ e(
|
|
6038
6106
|
"span",
|
|
6039
6107
|
{
|
|
6040
6108
|
className: p(
|
|
6041
6109
|
"bg-background border border-border rounded-md px-3 py-1.5 text-sm font-medium whitespace-nowrap shadow-lg",
|
|
6042
|
-
|
|
6110
|
+
S.labelClassName
|
|
6043
6111
|
),
|
|
6044
|
-
style:
|
|
6045
|
-
children:
|
|
6112
|
+
style: S.labelStyle,
|
|
6113
|
+
children: S.label
|
|
6046
6114
|
}
|
|
6047
6115
|
),
|
|
6048
6116
|
/* @__PURE__ */ e(
|
|
6049
6117
|
"button",
|
|
6050
6118
|
{
|
|
6051
6119
|
onClick: () => {
|
|
6052
|
-
|
|
6120
|
+
S.onClick(), y(!1);
|
|
6053
6121
|
},
|
|
6054
6122
|
className: p(
|
|
6055
6123
|
"w-12 h-12 rounded-full shadow-lg flex items-center justify-center transition-all",
|
|
6056
|
-
|
|
6124
|
+
I[S.variant || "primary"]
|
|
6057
6125
|
),
|
|
6058
|
-
children:
|
|
6126
|
+
children: S.icon
|
|
6059
6127
|
}
|
|
6060
6128
|
)
|
|
6061
6129
|
] }, C)) }),
|
|
6062
6130
|
/* @__PURE__ */ s(
|
|
6063
|
-
|
|
6131
|
+
M.button,
|
|
6064
6132
|
{
|
|
6065
6133
|
whileTap: m ? { scale: i ? 1 : 0.9 } : void 0,
|
|
6066
6134
|
whileHover: m ? { scale: i ? 1 : 1.05 } : void 0,
|
|
@@ -6070,7 +6138,7 @@ const So = ({
|
|
|
6070
6138
|
"z-30 rounded-full p-4 transition-all duration-200",
|
|
6071
6139
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
6072
6140
|
"flex items-center gap-2",
|
|
6073
|
-
|
|
6141
|
+
k[n],
|
|
6074
6142
|
o ? "px-6" : "w-16 h-16 justify-center",
|
|
6075
6143
|
u && "rotate-45"
|
|
6076
6144
|
),
|
|
@@ -6081,20 +6149,20 @@ const So = ({
|
|
|
6081
6149
|
}
|
|
6082
6150
|
)
|
|
6083
6151
|
] });
|
|
6084
|
-
},
|
|
6152
|
+
}, Ao = $r, Ro = ({
|
|
6085
6153
|
steps: t,
|
|
6086
6154
|
currentStep: r,
|
|
6087
6155
|
className: o,
|
|
6088
6156
|
animate: a = !0
|
|
6089
6157
|
}) => {
|
|
6090
|
-
const n = a !== !1,
|
|
6158
|
+
const n = a !== !1, c = t[r];
|
|
6091
6159
|
return /* @__PURE__ */ s("div", { className: p("w-full", o), children: [
|
|
6092
|
-
/* @__PURE__ */ e("div", { className: "hidden md:block", children: /* @__PURE__ */ e("div", { className: "relative flex items-center mb-2", children: t.map((i,
|
|
6093
|
-
const
|
|
6160
|
+
/* @__PURE__ */ e("div", { className: "hidden md:block", children: /* @__PURE__ */ e("div", { className: "relative flex items-center mb-2", children: t.map((i, d) => {
|
|
6161
|
+
const l = d < r, m = d === r, u = d > r;
|
|
6094
6162
|
return /* @__PURE__ */ s(et.Fragment, { children: [
|
|
6095
6163
|
/* @__PURE__ */ s("div", { className: "flex flex-col items-center relative z-10", children: [
|
|
6096
6164
|
/* @__PURE__ */ e(
|
|
6097
|
-
|
|
6165
|
+
M.div,
|
|
6098
6166
|
{
|
|
6099
6167
|
initial: !1,
|
|
6100
6168
|
animate: n ? { scale: m ? 1.05 : 1 } : void 0,
|
|
@@ -6102,10 +6170,10 @@ const So = ({
|
|
|
6102
6170
|
"w-12 h-12 rounded-full flex items-center justify-center",
|
|
6103
6171
|
"font-semibold text-base transition-all duration-300",
|
|
6104
6172
|
"ring-4 ring-white",
|
|
6105
|
-
(
|
|
6173
|
+
(l || m) && "bg-primary text-white shadow-lg",
|
|
6106
6174
|
u && "bg-border text-muted-foreground"
|
|
6107
6175
|
),
|
|
6108
|
-
children:
|
|
6176
|
+
children: l ? /* @__PURE__ */ e(ct, { className: "w-6 h-6 stroke-[3]" }) : /* @__PURE__ */ e("span", { children: d + 1 })
|
|
6109
6177
|
}
|
|
6110
6178
|
),
|
|
6111
6179
|
/* @__PURE__ */ s("div", { className: "mt-3 text-center max-w-[120px]", children: [
|
|
@@ -6115,7 +6183,7 @@ const So = ({
|
|
|
6115
6183
|
className: p(
|
|
6116
6184
|
"text-sm font-semibold block",
|
|
6117
6185
|
m && "text-primary",
|
|
6118
|
-
|
|
6186
|
+
l && "text-primary",
|
|
6119
6187
|
u && "text-primary/50"
|
|
6120
6188
|
),
|
|
6121
6189
|
children: i.label
|
|
@@ -6127,7 +6195,7 @@ const So = ({
|
|
|
6127
6195
|
className: p(
|
|
6128
6196
|
"text-xs mt-1 leading-tight",
|
|
6129
6197
|
m && "text-primary",
|
|
6130
|
-
|
|
6198
|
+
l && "text-primary/70",
|
|
6131
6199
|
u && "text-primary/50"
|
|
6132
6200
|
),
|
|
6133
6201
|
children: i.description
|
|
@@ -6135,65 +6203,65 @@ const So = ({
|
|
|
6135
6203
|
)
|
|
6136
6204
|
] })
|
|
6137
6205
|
] }),
|
|
6138
|
-
|
|
6139
|
-
|
|
6206
|
+
d < t.length - 1 && /* @__PURE__ */ e("div", { className: "flex-1 relative", style: { marginTop: "-48px", marginLeft: "4px", marginRight: "4px" }, children: /* @__PURE__ */ e("div", { className: "h-1.5 bg-border rounded-full overflow-hidden", children: /* @__PURE__ */ e(
|
|
6207
|
+
M.div,
|
|
6140
6208
|
{
|
|
6141
6209
|
initial: !1,
|
|
6142
|
-
style: { width:
|
|
6143
|
-
animate: n ? { width:
|
|
6210
|
+
style: { width: d < r ? "100%" : "0%" },
|
|
6211
|
+
animate: n ? { width: d < r ? "100%" : "0%" } : void 0,
|
|
6144
6212
|
transition: n ? { duration: 0.4, ease: "easeInOut" } : { duration: 0 },
|
|
6145
6213
|
className: "h-full bg-primary rounded-full"
|
|
6146
6214
|
}
|
|
6147
6215
|
) }) })
|
|
6148
|
-
] },
|
|
6216
|
+
] }, d);
|
|
6149
6217
|
}) }) }),
|
|
6150
6218
|
/* @__PURE__ */ s("div", { className: "md:hidden", children: [
|
|
6151
|
-
/* @__PURE__ */ e("div", { className: "flex items-center justify-center gap-2 mb-3", children: t.map((i,
|
|
6152
|
-
const
|
|
6219
|
+
/* @__PURE__ */ e("div", { className: "flex items-center justify-center gap-2 mb-3", children: t.map((i, d) => {
|
|
6220
|
+
const l = d < r, m = d === r;
|
|
6153
6221
|
return /* @__PURE__ */ e(
|
|
6154
|
-
|
|
6222
|
+
M.div,
|
|
6155
6223
|
{
|
|
6156
6224
|
initial: !1,
|
|
6157
6225
|
style: {
|
|
6158
|
-
backgroundColor:
|
|
6226
|
+
backgroundColor: l || m ? "var(--color-primary)" : "var(--color-border-dark)"
|
|
6159
6227
|
},
|
|
6160
6228
|
animate: n ? { scale: m ? 1.2 : 1 } : void 0,
|
|
6161
6229
|
className: p(
|
|
6162
6230
|
"rounded-full transition-all duration-300",
|
|
6163
6231
|
m ? "w-3 h-3" : "w-2 h-2",
|
|
6164
|
-
(
|
|
6232
|
+
(l || m) && "shadow-sm"
|
|
6165
6233
|
)
|
|
6166
6234
|
},
|
|
6167
|
-
|
|
6235
|
+
d
|
|
6168
6236
|
);
|
|
6169
6237
|
}) }),
|
|
6170
6238
|
/* @__PURE__ */ e(
|
|
6171
|
-
|
|
6239
|
+
M.div,
|
|
6172
6240
|
{
|
|
6173
6241
|
...n ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 } } : {},
|
|
6174
6242
|
className: "text-center",
|
|
6175
|
-
children: /* @__PURE__ */ e("p", { className: "text-sm font-semibold text-foreground", children:
|
|
6243
|
+
children: /* @__PURE__ */ e("p", { className: "text-sm font-semibold text-foreground", children: c?.label })
|
|
6176
6244
|
},
|
|
6177
6245
|
r
|
|
6178
6246
|
)
|
|
6179
6247
|
] })
|
|
6180
6248
|
] });
|
|
6181
|
-
},
|
|
6249
|
+
}, Lo = ({
|
|
6182
6250
|
children: t,
|
|
6183
6251
|
variant: r = "default",
|
|
6184
6252
|
size: o = "md",
|
|
6185
6253
|
className: a,
|
|
6186
6254
|
dot: n = !1,
|
|
6187
|
-
animate:
|
|
6255
|
+
animate: c = !0
|
|
6188
6256
|
}) => {
|
|
6189
|
-
const i =
|
|
6257
|
+
const i = c !== !1, d = {
|
|
6190
6258
|
default: "bg-secondary text-primary border border-border",
|
|
6191
6259
|
primary: "bg-primary/10 text-primary border border-primary/20",
|
|
6192
6260
|
success: "bg-success/10 text-success border border-success/20",
|
|
6193
6261
|
warning: "bg-warning/10 text-warning border border-warning/20",
|
|
6194
6262
|
danger: "bg-error/10 text-error border border-error/20",
|
|
6195
6263
|
info: "bg-info/10 text-info border border-info/20"
|
|
6196
|
-
},
|
|
6264
|
+
}, l = {
|
|
6197
6265
|
sm: "px-2 py-0.5 text-xs",
|
|
6198
6266
|
md: "px-2.5 py-1 text-sm",
|
|
6199
6267
|
lg: "px-3 py-1.5 text-base"
|
|
@@ -6206,13 +6274,13 @@ const So = ({
|
|
|
6206
6274
|
info: "bg-info"
|
|
6207
6275
|
};
|
|
6208
6276
|
return /* @__PURE__ */ s(
|
|
6209
|
-
|
|
6277
|
+
M.span,
|
|
6210
6278
|
{
|
|
6211
6279
|
...i ? { initial: { opacity: 0, scale: 0.9 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.2 } } : {},
|
|
6212
6280
|
className: p(
|
|
6213
6281
|
"inline-flex items-center gap-1.5 rounded-lg font-medium",
|
|
6214
|
-
|
|
6215
|
-
|
|
6282
|
+
d[r],
|
|
6283
|
+
l[o],
|
|
6216
6284
|
a
|
|
6217
6285
|
),
|
|
6218
6286
|
children: [
|
|
@@ -6221,14 +6289,14 @@ const So = ({
|
|
|
6221
6289
|
]
|
|
6222
6290
|
}
|
|
6223
6291
|
);
|
|
6224
|
-
},
|
|
6292
|
+
}, To = ({
|
|
6225
6293
|
isOffline: t,
|
|
6226
6294
|
className: r,
|
|
6227
6295
|
animate: o = !0
|
|
6228
6296
|
}) => {
|
|
6229
6297
|
const a = o !== !1;
|
|
6230
6298
|
return t ? /* @__PURE__ */ s(
|
|
6231
|
-
|
|
6299
|
+
M.div,
|
|
6232
6300
|
{
|
|
6233
6301
|
...a ? { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 } } : {},
|
|
6234
6302
|
className: p(
|
|
@@ -6242,20 +6310,20 @@ const So = ({
|
|
|
6242
6310
|
]
|
|
6243
6311
|
}
|
|
6244
6312
|
) : null;
|
|
6245
|
-
},
|
|
6313
|
+
}, zo = ({
|
|
6246
6314
|
status: t,
|
|
6247
6315
|
count: r,
|
|
6248
6316
|
className: o,
|
|
6249
6317
|
animate: a = !0
|
|
6250
6318
|
}) => {
|
|
6251
|
-
const n = a !== !1,
|
|
6319
|
+
const n = a !== !1, c = n ? /* @__PURE__ */ e(M.div, { animate: { rotate: 360 }, transition: { repeat: 1 / 0, duration: 1, ease: "linear" }, children: /* @__PURE__ */ e(Ye, { className: "w-4 h-4" }) }) : /* @__PURE__ */ e(Ye, { className: "w-4 h-4" }), d = {
|
|
6252
6320
|
synced: {
|
|
6253
6321
|
icon: /* @__PURE__ */ e(Ye, { className: "w-4 h-4" }),
|
|
6254
6322
|
label: "Synced",
|
|
6255
6323
|
color: "bg-success text-white"
|
|
6256
6324
|
},
|
|
6257
6325
|
syncing: {
|
|
6258
|
-
icon:
|
|
6326
|
+
icon: c,
|
|
6259
6327
|
label: "Syncing...",
|
|
6260
6328
|
color: "bg-info text-white"
|
|
6261
6329
|
},
|
|
@@ -6271,18 +6339,18 @@ const So = ({
|
|
|
6271
6339
|
}
|
|
6272
6340
|
}[t];
|
|
6273
6341
|
return /* @__PURE__ */ s(
|
|
6274
|
-
|
|
6342
|
+
M.div,
|
|
6275
6343
|
{
|
|
6276
6344
|
...n ? { initial: { scale: 0.9, opacity: 0 }, animate: { scale: 1, opacity: 1 } } : {},
|
|
6277
6345
|
className: p(
|
|
6278
6346
|
"inline-flex items-center gap-2 px-3 py-1.5 rounded-full",
|
|
6279
6347
|
"text-sm font-medium shadow-sm",
|
|
6280
|
-
|
|
6348
|
+
d.color,
|
|
6281
6349
|
o
|
|
6282
6350
|
),
|
|
6283
6351
|
children: [
|
|
6284
|
-
|
|
6285
|
-
/* @__PURE__ */ e("span", { children:
|
|
6352
|
+
d.icon,
|
|
6353
|
+
/* @__PURE__ */ e("span", { children: d.label })
|
|
6286
6354
|
]
|
|
6287
6355
|
}
|
|
6288
6356
|
);
|
|
@@ -6302,7 +6370,7 @@ const So = ({
|
|
|
6302
6370
|
label: a,
|
|
6303
6371
|
animate: n = !0
|
|
6304
6372
|
}) => {
|
|
6305
|
-
const
|
|
6373
|
+
const c = n !== !1, i = c ? M.div : "div";
|
|
6306
6374
|
return /* @__PURE__ */ s("div", { className: p("inline-flex flex-col items-center gap-2", o), children: [
|
|
6307
6375
|
/* @__PURE__ */ e(
|
|
6308
6376
|
i,
|
|
@@ -6312,7 +6380,7 @@ const So = ({
|
|
|
6312
6380
|
Kr[t],
|
|
6313
6381
|
_r[r]
|
|
6314
6382
|
),
|
|
6315
|
-
...
|
|
6383
|
+
...c ? { animate: { rotate: 360 }, transition: { duration: 0.8, repeat: 1 / 0, ease: "linear" } } : {},
|
|
6316
6384
|
role: "status",
|
|
6317
6385
|
"aria-label": a || "Loading"
|
|
6318
6386
|
}
|
|
@@ -6321,7 +6389,7 @@ const So = ({
|
|
|
6321
6389
|
] });
|
|
6322
6390
|
};
|
|
6323
6391
|
Jr.displayName = "Spinner";
|
|
6324
|
-
const At = Rt(void 0),
|
|
6392
|
+
const At = Rt(void 0), Io = () => {
|
|
6325
6393
|
const t = Lt(At);
|
|
6326
6394
|
if (!t)
|
|
6327
6395
|
throw new Error("useToast must be used within ToastProvider");
|
|
@@ -6348,9 +6416,9 @@ const At = Rt(void 0), zo = () => {
|
|
|
6348
6416
|
"bottom-center": "bottom-4 left-1/2 -translate-x-1/2",
|
|
6349
6417
|
"bottom-right": "bottom-4 right-4"
|
|
6350
6418
|
}, lt = ({ toast: t, onRemove: r, animate: o = !0 }) => {
|
|
6351
|
-
const a = o !== !1, n = t.variant || "default",
|
|
6419
|
+
const a = o !== !1, n = t.variant || "default", c = Qr[n], i = n === "loading", d = typeof t.message == "string" ? t.message : String(t.message), l = a ? M.div : "div";
|
|
6352
6420
|
return /* @__PURE__ */ s(
|
|
6353
|
-
|
|
6421
|
+
l,
|
|
6354
6422
|
{
|
|
6355
6423
|
...a ? {
|
|
6356
6424
|
layout: !0,
|
|
@@ -6364,9 +6432,9 @@ const At = Rt(void 0), zo = () => {
|
|
|
6364
6432
|
qr[n]
|
|
6365
6433
|
),
|
|
6366
6434
|
children: [
|
|
6367
|
-
|
|
6435
|
+
c && /* @__PURE__ */ e(c, { className: p("w-5 h-5 shrink-0 mt-0.5", i && "animate-spin") }),
|
|
6368
6436
|
/* @__PURE__ */ s("div", { className: "flex-1 min-w-0", children: [
|
|
6369
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-medium leading-relaxed", children:
|
|
6437
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium leading-relaxed", children: d }),
|
|
6370
6438
|
t.action && /* @__PURE__ */ e("div", { className: "mt-3 flex justify-end", children: /* @__PURE__ */ e(
|
|
6371
6439
|
"button",
|
|
6372
6440
|
{
|
|
@@ -6394,24 +6462,24 @@ const At = Rt(void 0), zo = () => {
|
|
|
6394
6462
|
maxToasts: o = 5,
|
|
6395
6463
|
animate: a = !0
|
|
6396
6464
|
}) => {
|
|
6397
|
-
const n = a !== !1, [
|
|
6398
|
-
i((u) => u.filter((
|
|
6399
|
-
}, []),
|
|
6465
|
+
const n = a !== !1, [c, i] = U([]), d = ke((m) => {
|
|
6466
|
+
i((u) => u.filter((y) => y.id !== m));
|
|
6467
|
+
}, []), l = ke(
|
|
6400
6468
|
(m) => {
|
|
6401
6469
|
if (typeof m.message != "string") {
|
|
6402
6470
|
console.error("Toast message must be a string, received:", m.message);
|
|
6403
6471
|
return;
|
|
6404
6472
|
}
|
|
6405
|
-
const u = Math.random().toString(36).substring(2, 9),
|
|
6406
|
-
i((
|
|
6407
|
-
|
|
6408
|
-
},
|
|
6473
|
+
const u = Math.random().toString(36).substring(2, 9), y = m.duration ?? 5e3;
|
|
6474
|
+
i((g) => [...g, { ...m, id: u }].slice(-o)), y > 0 && setTimeout(() => {
|
|
6475
|
+
d(u);
|
|
6476
|
+
}, y);
|
|
6409
6477
|
},
|
|
6410
|
-
[o,
|
|
6478
|
+
[o, d]
|
|
6411
6479
|
);
|
|
6412
|
-
return /* @__PURE__ */ s(At.Provider, { value: { toasts:
|
|
6480
|
+
return /* @__PURE__ */ s(At.Provider, { value: { toasts: c, addToast: l, removeToast: d }, children: [
|
|
6413
6481
|
t,
|
|
6414
|
-
/* @__PURE__ */ e("div", { className: p("fixed z-100 flex flex-col gap-2", Zr[r]), children: n ? /* @__PURE__ */ e(
|
|
6482
|
+
/* @__PURE__ */ e("div", { className: p("fixed z-100 flex flex-col gap-2", Zr[r]), children: n ? /* @__PURE__ */ e(se, { mode: "popLayout", children: c.map((m) => /* @__PURE__ */ e(lt, { toast: m, onRemove: d, animate: n }, m.id)) }) : c.map((m) => /* @__PURE__ */ e(lt, { toast: m, onRemove: d, animate: n }, m.id)) })
|
|
6415
6483
|
] });
|
|
6416
6484
|
};
|
|
6417
6485
|
Xr.displayName = "ToastProvider";
|
|
@@ -6421,14 +6489,14 @@ const Eo = ({
|
|
|
6421
6489
|
preview: o,
|
|
6422
6490
|
label: a = "Take Photo",
|
|
6423
6491
|
disabled: n,
|
|
6424
|
-
className:
|
|
6492
|
+
className: c,
|
|
6425
6493
|
animate: i = !0
|
|
6426
6494
|
}) => {
|
|
6427
|
-
const
|
|
6428
|
-
const
|
|
6429
|
-
|
|
6495
|
+
const d = i !== !1, l = Q(null), m = (u) => {
|
|
6496
|
+
const y = u.target.files?.[0];
|
|
6497
|
+
y && t(y);
|
|
6430
6498
|
};
|
|
6431
|
-
return /* @__PURE__ */ s("div", { className: p("w-full",
|
|
6499
|
+
return /* @__PURE__ */ s("div", { className: p("w-full", c), children: [
|
|
6432
6500
|
a && /* @__PURE__ */ e("label", { className: "block mb-2 text-sm font-medium text-primary", children: a }),
|
|
6433
6501
|
o ? /* @__PURE__ */ s("div", { className: "relative rounded-lg overflow-hidden border-2 border-border", children: [
|
|
6434
6502
|
/* @__PURE__ */ e(
|
|
@@ -6448,11 +6516,11 @@ const Eo = ({
|
|
|
6448
6516
|
}
|
|
6449
6517
|
)
|
|
6450
6518
|
] }) : /* @__PURE__ */ s(
|
|
6451
|
-
|
|
6519
|
+
M.button,
|
|
6452
6520
|
{
|
|
6453
6521
|
type: "button",
|
|
6454
|
-
whileTap:
|
|
6455
|
-
onClick: () =>
|
|
6522
|
+
whileTap: d ? { scale: n ? 1 : 0.98 } : void 0,
|
|
6523
|
+
onClick: () => l.current?.click(),
|
|
6456
6524
|
disabled: n,
|
|
6457
6525
|
className: p(
|
|
6458
6526
|
"w-full p-4 rounded-lg border-2 border-border",
|
|
@@ -6470,7 +6538,7 @@ const Eo = ({
|
|
|
6470
6538
|
/* @__PURE__ */ e(
|
|
6471
6539
|
"input",
|
|
6472
6540
|
{
|
|
6473
|
-
ref:
|
|
6541
|
+
ref: l,
|
|
6474
6542
|
type: "file",
|
|
6475
6543
|
accept: "image/*",
|
|
6476
6544
|
capture: "environment",
|
|
@@ -6486,20 +6554,20 @@ const Eo = ({
|
|
|
6486
6554
|
multiple: o = !1,
|
|
6487
6555
|
label: a = "Upload Files",
|
|
6488
6556
|
disabled: n,
|
|
6489
|
-
className:
|
|
6557
|
+
className: c,
|
|
6490
6558
|
animate: i = !0
|
|
6491
6559
|
}) => {
|
|
6492
|
-
const
|
|
6560
|
+
const d = i !== !1, l = Q(null), m = (u) => {
|
|
6493
6561
|
u && t(Array.from(u));
|
|
6494
6562
|
};
|
|
6495
|
-
return /* @__PURE__ */ s("div", { className: p("w-full",
|
|
6563
|
+
return /* @__PURE__ */ s("div", { className: p("w-full", c), children: [
|
|
6496
6564
|
a && /* @__PURE__ */ e("label", { className: "block mb-2 text-sm font-medium text-primary", children: a }),
|
|
6497
6565
|
/* @__PURE__ */ s(
|
|
6498
|
-
|
|
6566
|
+
M.button,
|
|
6499
6567
|
{
|
|
6500
6568
|
type: "button",
|
|
6501
|
-
whileTap:
|
|
6502
|
-
onClick: () => !n &&
|
|
6569
|
+
whileTap: d ? { scale: n ? 1 : 0.98 } : void 0,
|
|
6570
|
+
onClick: () => !n && l.current?.click(),
|
|
6503
6571
|
disabled: n,
|
|
6504
6572
|
className: p(
|
|
6505
6573
|
"w-full p-4 rounded-lg border-2 border-border",
|
|
@@ -6517,7 +6585,7 @@ const Eo = ({
|
|
|
6517
6585
|
/* @__PURE__ */ e(
|
|
6518
6586
|
"input",
|
|
6519
6587
|
{
|
|
6520
|
-
ref:
|
|
6588
|
+
ref: l,
|
|
6521
6589
|
type: "file",
|
|
6522
6590
|
accept: r,
|
|
6523
6591
|
multiple: o,
|
|
@@ -6527,25 +6595,25 @@ const Eo = ({
|
|
|
6527
6595
|
}
|
|
6528
6596
|
)
|
|
6529
6597
|
] });
|
|
6530
|
-
},
|
|
6598
|
+
}, Bo = ({
|
|
6531
6599
|
onRecordingComplete: t,
|
|
6532
6600
|
label: r = "Record Audio",
|
|
6533
6601
|
maxDuration: o = 300,
|
|
6534
6602
|
// 5 minutes default
|
|
6535
6603
|
disabled: a,
|
|
6536
6604
|
className: n,
|
|
6537
|
-
animate:
|
|
6605
|
+
animate: c = !0
|
|
6538
6606
|
}) => {
|
|
6539
|
-
const i =
|
|
6607
|
+
const i = c !== !1, [d, l] = U(!1), [m, u] = U(!1), [y, g] = U(0), [k, I] = U(null), N = Q(null), S = Q([]), C = Q(null), P = async () => {
|
|
6540
6608
|
try {
|
|
6541
6609
|
const h = await navigator.mediaDevices.getUserMedia({ audio: !0 }), L = new MediaRecorder(h);
|
|
6542
|
-
N.current = L,
|
|
6543
|
-
|
|
6610
|
+
N.current = L, S.current = [], L.ondataavailable = (x) => {
|
|
6611
|
+
x.data.size > 0 && S.current.push(x.data);
|
|
6544
6612
|
}, L.onstop = () => {
|
|
6545
|
-
const
|
|
6546
|
-
|
|
6547
|
-
}, L.start(),
|
|
6548
|
-
|
|
6613
|
+
const x = new Blob(S.current, { type: "audio/webm" }), b = URL.createObjectURL(x);
|
|
6614
|
+
I(b), t(x), h.getTracks().forEach((T) => T.stop());
|
|
6615
|
+
}, L.start(), l(!0), g(0), C.current = setInterval(() => {
|
|
6616
|
+
g((x) => x >= o ? (z(), x) : x + 1);
|
|
6549
6617
|
}, 1e3);
|
|
6550
6618
|
} catch (h) {
|
|
6551
6619
|
console.error("Error accessing microphone:", h);
|
|
@@ -6554,39 +6622,39 @@ const Eo = ({
|
|
|
6554
6622
|
N.current?.state === "recording" && (N.current.pause(), u(!0), C.current && clearInterval(C.current));
|
|
6555
6623
|
}, D = () => {
|
|
6556
6624
|
N.current?.state === "paused" && (N.current.resume(), u(!1), C.current = setInterval(() => {
|
|
6557
|
-
|
|
6625
|
+
g((h) => Math.min(h + 1, o));
|
|
6558
6626
|
}, 1e3));
|
|
6559
6627
|
}, z = () => {
|
|
6560
|
-
N.current && (N.current.stop(),
|
|
6628
|
+
N.current && (N.current.stop(), l(!1), u(!1), C.current && (clearInterval(C.current), C.current = null));
|
|
6561
6629
|
}, j = () => {
|
|
6562
|
-
|
|
6630
|
+
I(null), g(0);
|
|
6563
6631
|
}, B = (h) => {
|
|
6564
|
-
const L = Math.floor(h / 60),
|
|
6565
|
-
return `${L.toString().padStart(2, "0")}:${
|
|
6632
|
+
const L = Math.floor(h / 60), x = h % 60;
|
|
6633
|
+
return `${L.toString().padStart(2, "0")}:${x.toString().padStart(2, "0")}`;
|
|
6566
6634
|
};
|
|
6567
6635
|
return /* @__PURE__ */ s("div", { className: p("w-full", n), children: [
|
|
6568
6636
|
r && /* @__PURE__ */ e("label", { className: "block mb-2 text-sm font-medium text-primary", children: r }),
|
|
6569
6637
|
/* @__PURE__ */ s("div", { className: "p-4 md:p-6 bg-background rounded-lg border-2 border-border space-y-4", children: [
|
|
6570
|
-
!
|
|
6638
|
+
!k && /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-4", children: [
|
|
6571
6639
|
/* @__PURE__ */ s("div", { className: "relative", children: [
|
|
6572
6640
|
/* @__PURE__ */ e(
|
|
6573
|
-
|
|
6641
|
+
M.button,
|
|
6574
6642
|
{
|
|
6575
6643
|
type: "button",
|
|
6576
6644
|
whileTap: i ? { scale: a ? 1 : 0.95 } : void 0,
|
|
6577
|
-
onClick:
|
|
6645
|
+
onClick: d ? m ? D : V : P,
|
|
6578
6646
|
disabled: a,
|
|
6579
6647
|
className: p(
|
|
6580
6648
|
"w-16 h-16 md:w-20 md:h-20 rounded-full flex items-center justify-center",
|
|
6581
6649
|
"transition-all duration-200",
|
|
6582
6650
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
6583
|
-
|
|
6651
|
+
d ? p("bg-warning text-white", i && "animate-pulse") : "bg-primary text-white hover:bg-primary/80"
|
|
6584
6652
|
),
|
|
6585
|
-
children:
|
|
6653
|
+
children: d ? m ? /* @__PURE__ */ e(Yt, { className: "w-6 h-6 md:w-8 md:h-8" }) : /* @__PURE__ */ e(Wt, { className: "w-6 h-6 md:w-8 md:h-8" }) : /* @__PURE__ */ e($t, { className: "w-6 h-6 md:w-8 md:h-8" })
|
|
6586
6654
|
}
|
|
6587
6655
|
),
|
|
6588
|
-
|
|
6589
|
-
|
|
6656
|
+
d && !m && /* @__PURE__ */ e(
|
|
6657
|
+
M.div,
|
|
6590
6658
|
{
|
|
6591
6659
|
className: "absolute top-0 right-0 w-4 h-4 bg-error rounded-full border-2 border-white",
|
|
6592
6660
|
animate: i ? { scale: [1, 1.2, 1] } : void 0,
|
|
@@ -6595,11 +6663,11 @@ const Eo = ({
|
|
|
6595
6663
|
)
|
|
6596
6664
|
] }),
|
|
6597
6665
|
/* @__PURE__ */ s("div", { className: "text-center", children: [
|
|
6598
|
-
/* @__PURE__ */ e("p", { className: "text-xl md:text-2xl font-mono font-semibold text-foreground", children: B(
|
|
6599
|
-
/* @__PURE__ */ e("p", { className: "text-xs md:text-sm text-primary/70 mt-1", children:
|
|
6666
|
+
/* @__PURE__ */ e("p", { className: "text-xl md:text-2xl font-mono font-semibold text-foreground", children: B(y) }),
|
|
6667
|
+
/* @__PURE__ */ e("p", { className: "text-xs md:text-sm text-primary/70 mt-1", children: d ? m ? "Paused" : "Recording..." : "Tap to record" })
|
|
6600
6668
|
] }),
|
|
6601
|
-
|
|
6602
|
-
|
|
6669
|
+
d && /* @__PURE__ */ s(
|
|
6670
|
+
M.button,
|
|
6603
6671
|
{
|
|
6604
6672
|
...i ? { initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 } } : {},
|
|
6605
6673
|
type: "button",
|
|
@@ -6612,17 +6680,17 @@ const Eo = ({
|
|
|
6612
6680
|
}
|
|
6613
6681
|
)
|
|
6614
6682
|
] }),
|
|
6615
|
-
|
|
6616
|
-
|
|
6683
|
+
k && /* @__PURE__ */ s(
|
|
6684
|
+
M.div,
|
|
6617
6685
|
{
|
|
6618
6686
|
...i ? { initial: { opacity: 0 }, animate: { opacity: 1 } } : {},
|
|
6619
6687
|
className: "space-y-3",
|
|
6620
6688
|
children: [
|
|
6621
|
-
/* @__PURE__ */ e("audio", { src:
|
|
6689
|
+
/* @__PURE__ */ e("audio", { src: k, controls: !0, className: "w-full" }),
|
|
6622
6690
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
6623
6691
|
/* @__PURE__ */ s("span", { className: "text-sm text-primary/70", children: [
|
|
6624
6692
|
"Duration: ",
|
|
6625
|
-
B(
|
|
6693
|
+
B(y)
|
|
6626
6694
|
] }),
|
|
6627
6695
|
/* @__PURE__ */ s(
|
|
6628
6696
|
"button",
|
|
@@ -6642,22 +6710,22 @@ const Eo = ({
|
|
|
6642
6710
|
)
|
|
6643
6711
|
] })
|
|
6644
6712
|
] });
|
|
6645
|
-
},
|
|
6713
|
+
}, Go = ({
|
|
6646
6714
|
items: t,
|
|
6647
6715
|
onRemove: r,
|
|
6648
6716
|
onView: o,
|
|
6649
6717
|
columns: a = 3,
|
|
6650
6718
|
className: n,
|
|
6651
|
-
animate:
|
|
6719
|
+
animate: c = !0
|
|
6652
6720
|
}) => {
|
|
6653
|
-
const i =
|
|
6721
|
+
const i = c !== !1, d = {
|
|
6654
6722
|
2: "grid-cols-2",
|
|
6655
6723
|
3: "grid-cols-3",
|
|
6656
6724
|
4: "grid-cols-4"
|
|
6657
|
-
},
|
|
6725
|
+
}, l = (u) => {
|
|
6658
6726
|
if (!u) return "";
|
|
6659
|
-
const
|
|
6660
|
-
return
|
|
6727
|
+
const y = u / 1024;
|
|
6728
|
+
return y < 1024 ? `${y.toFixed(1)} KB` : `${(y / 1024).toFixed(1)} MB`;
|
|
6661
6729
|
}, m = (u) => {
|
|
6662
6730
|
switch (u) {
|
|
6663
6731
|
case "document":
|
|
@@ -6668,8 +6736,8 @@ const Eo = ({
|
|
|
6668
6736
|
return /* @__PURE__ */ e(Jt, { className: "w-8 h-8 text-primary" });
|
|
6669
6737
|
}
|
|
6670
6738
|
};
|
|
6671
|
-
return t.length === 0 ? null : /* @__PURE__ */ e("div", { className: p("w-full", n), children: /* @__PURE__ */ e("div", { className: p("grid gap-3",
|
|
6672
|
-
|
|
6739
|
+
return t.length === 0 ? null : /* @__PURE__ */ e("div", { className: p("w-full", n), children: /* @__PURE__ */ e("div", { className: p("grid gap-3", d[a]), children: t.map((u) => /* @__PURE__ */ s(
|
|
6740
|
+
M.div,
|
|
6673
6741
|
{
|
|
6674
6742
|
...i ? { initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.8 } } : {},
|
|
6675
6743
|
className: "relative group",
|
|
@@ -6698,54 +6766,54 @@ const Eo = ({
|
|
|
6698
6766
|
}
|
|
6699
6767
|
),
|
|
6700
6768
|
r && /* @__PURE__ */ e(
|
|
6701
|
-
|
|
6769
|
+
M.button,
|
|
6702
6770
|
{
|
|
6703
6771
|
...i ? { initial: { opacity: 0 }, whileHover: { opacity: 1 } } : {},
|
|
6704
6772
|
className: "absolute -top-2 -right-2 p-1.5 bg-error text-white rounded-full shadow-lg hover:bg-red-600 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
6705
|
-
onClick: (
|
|
6706
|
-
|
|
6773
|
+
onClick: (y) => {
|
|
6774
|
+
y.stopPropagation(), r(u.id);
|
|
6707
6775
|
},
|
|
6708
6776
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4" })
|
|
6709
6777
|
}
|
|
6710
6778
|
),
|
|
6711
6779
|
u.size && /* @__PURE__ */ s("div", { className: "absolute bottom-0 left-0 right-0 bg-black/60 text-white text-xs p-1.5 backdrop-blur-sm", children: [
|
|
6712
6780
|
/* @__PURE__ */ e("p", { className: "truncate", children: u.name }),
|
|
6713
|
-
/* @__PURE__ */ e("p", { className: "text-white/70", children:
|
|
6781
|
+
/* @__PURE__ */ e("p", { className: "text-white/70", children: l(u.size) })
|
|
6714
6782
|
] })
|
|
6715
6783
|
]
|
|
6716
6784
|
},
|
|
6717
6785
|
u.id
|
|
6718
6786
|
)) }) });
|
|
6719
|
-
},
|
|
6787
|
+
}, Do = ({
|
|
6720
6788
|
text: t = "Built by StackLoop",
|
|
6721
6789
|
showHeart: r = !0,
|
|
6722
6790
|
href: o,
|
|
6723
6791
|
position: a = "fixed",
|
|
6724
6792
|
backgroundColor: n = "bg-gray-900",
|
|
6725
|
-
textColor:
|
|
6793
|
+
textColor: c = "text-gray-400",
|
|
6726
6794
|
className: i = ""
|
|
6727
6795
|
}) => {
|
|
6728
|
-
const
|
|
6796
|
+
const d = r ? /* @__PURE__ */ s(Ue, { children: [
|
|
6729
6797
|
"Built with ",
|
|
6730
6798
|
/* @__PURE__ */ e("span", { className: "text-red-500 mx-1", children: "❤️" }),
|
|
6731
6799
|
" by ",
|
|
6732
6800
|
t.replace(/^Built by /, "")
|
|
6733
|
-
] }) : t,
|
|
6801
|
+
] }) : t, l = o ? /* @__PURE__ */ e(
|
|
6734
6802
|
"a",
|
|
6735
6803
|
{
|
|
6736
6804
|
href: o,
|
|
6737
6805
|
target: "_blank",
|
|
6738
6806
|
rel: "noopener noreferrer",
|
|
6739
|
-
className: `${
|
|
6740
|
-
children:
|
|
6807
|
+
className: `${c} hover:text-white transition-colors duration-200 text-sm`,
|
|
6808
|
+
children: d
|
|
6741
6809
|
}
|
|
6742
|
-
) : /* @__PURE__ */ e("span", { className: `${
|
|
6810
|
+
) : /* @__PURE__ */ e("span", { className: `${c} text-sm`, children: d });
|
|
6743
6811
|
return /* @__PURE__ */ e(
|
|
6744
6812
|
"div",
|
|
6745
6813
|
{
|
|
6746
6814
|
className: `${a} bottom-0 left-0 right-0 ${n} ${i}`,
|
|
6747
6815
|
style: { zIndex: 40 },
|
|
6748
|
-
children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-2 px-4", children:
|
|
6816
|
+
children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-2 px-4", children: l })
|
|
6749
6817
|
}
|
|
6750
6818
|
);
|
|
6751
6819
|
}, eo = 'button, a, [role="button"], [data-ripple="true"]';
|
|
@@ -6755,7 +6823,7 @@ function to(t) {
|
|
|
6755
6823
|
function ro(t) {
|
|
6756
6824
|
return t.getAttribute("data-ripple") === "false";
|
|
6757
6825
|
}
|
|
6758
|
-
function
|
|
6826
|
+
function jo() {
|
|
6759
6827
|
if (typeof window > "u" || window.__uiRippleInitialized)
|
|
6760
6828
|
return;
|
|
6761
6829
|
const t = (o, a) => {
|
|
@@ -6767,8 +6835,8 @@ function Do() {
|
|
|
6767
6835
|
const n = a.closest(eo);
|
|
6768
6836
|
if (!n || to(n) || ro(n))
|
|
6769
6837
|
return;
|
|
6770
|
-
const
|
|
6771
|
-
m.className = "button-ripple", m.style.left = `${
|
|
6838
|
+
const c = n.getBoundingClientRect(), i = Math.max(c.width, c.height) * 2, d = o.clientX - c.left - i / 2, l = o.clientY - c.top - i / 2, m = document.createElement("span");
|
|
6839
|
+
m.className = "button-ripple", m.style.left = `${d}px`, m.style.top = `${l}px`, m.style.width = `${i}px`, m.style.height = `${i}px`, getComputedStyle(n).position === "static" && (n.dataset.ripplePositioned = "true", n.style.position = "relative"), getComputedStyle(n).overflow === "visible" && (n.dataset.rippleOverflow = "true", n.style.overflow = "hidden"), n.appendChild(m);
|
|
6772
6840
|
const u = window.setTimeout(() => {
|
|
6773
6841
|
t(n, m);
|
|
6774
6842
|
}, 700);
|
|
@@ -6779,48 +6847,49 @@ function Do() {
|
|
|
6779
6847
|
document.addEventListener("pointerdown", r), window.__uiRippleInitialized = !0;
|
|
6780
6848
|
}
|
|
6781
6849
|
export {
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6850
|
+
bo as Accordion,
|
|
6851
|
+
Bo as AudioRecorder,
|
|
6852
|
+
Lo as Badge,
|
|
6853
|
+
ko as BottomSheet,
|
|
6785
6854
|
Fe as Button,
|
|
6786
6855
|
Eo as CameraCapture,
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6856
|
+
ho as Card,
|
|
6857
|
+
xo as CardContent,
|
|
6858
|
+
yo as CardDescription,
|
|
6859
|
+
fo as CardHeader,
|
|
6860
|
+
go as CardTitle,
|
|
6792
6861
|
ze as Checkbox,
|
|
6793
6862
|
St as CountrySelect,
|
|
6794
|
-
|
|
6863
|
+
Do as CreditBar,
|
|
6795
6864
|
Fr as DatePicker,
|
|
6796
|
-
|
|
6865
|
+
wo as Drawer,
|
|
6797
6866
|
uo as Dropdown,
|
|
6798
6867
|
mo as DualSlider,
|
|
6799
|
-
|
|
6868
|
+
Ao as FAB,
|
|
6800
6869
|
Po as FileUploader,
|
|
6801
6870
|
$r as FloatingActionButton,
|
|
6802
6871
|
Vr as Input,
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6872
|
+
vo as Modal,
|
|
6873
|
+
Co as ModalContent,
|
|
6874
|
+
No as ModalFooter,
|
|
6806
6875
|
Wr as MultiSelect,
|
|
6807
|
-
|
|
6808
|
-
|
|
6876
|
+
To as OfflineBadge,
|
|
6877
|
+
Mo as Pagination,
|
|
6809
6878
|
Mt as PhoneInput,
|
|
6810
6879
|
lo as RadioPills,
|
|
6811
6880
|
Yr as Select,
|
|
6812
6881
|
co as Slider,
|
|
6813
6882
|
Jr as Spinner,
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6883
|
+
Ro as StepProgress,
|
|
6884
|
+
zo as SyncIndicator,
|
|
6885
|
+
So as Table,
|
|
6817
6886
|
Ur as Textarea,
|
|
6818
|
-
|
|
6887
|
+
Go as ThumbnailGrid,
|
|
6819
6888
|
Xr as ToastProvider,
|
|
6820
6889
|
Hr as Toggle,
|
|
6821
6890
|
po as Tooltip,
|
|
6822
6891
|
p as cn,
|
|
6823
|
-
|
|
6824
|
-
|
|
6892
|
+
jo as setupRippleEffects,
|
|
6893
|
+
Io as useToast
|
|
6825
6894
|
};
|
|
6826
6895
|
//# sourceMappingURL=index.js.map
|