@youversion/design-system-components 0.33.0 → 0.34.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/CHANGELOG.md +19 -0
- package/dist/index.es.js +204 -191
- package/dist/index.umd.js +2 -2
- package/dist/src/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/src/PopoverBody/PopoverBody.d.ts +3 -1
- package/dist/src/PopoverBody/PopoverBody.d.ts.map +1 -1
- package/dist/src/PopoverBody/PopoverBodyContents.d.ts +4 -1
- package/dist/src/PopoverBody/PopoverBodyContents.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -237,25 +237,25 @@ var H0 = "!";
|
|
|
237
237
|
function $e(l) {
|
|
238
238
|
var i = l.separator || ":", e = i.length === 1, r = i[0], a = i.length;
|
|
239
239
|
return function(u) {
|
|
240
|
-
for (var v = [], g = 0, p = 0, w,
|
|
241
|
-
var
|
|
240
|
+
for (var v = [], g = 0, p = 0, w, b = 0; b < u.length; b++) {
|
|
241
|
+
var y = u[b];
|
|
242
242
|
if (g === 0) {
|
|
243
|
-
if (
|
|
244
|
-
v.push(u.slice(p,
|
|
243
|
+
if (y === r && (e || u.slice(b, b + a) === i)) {
|
|
244
|
+
v.push(u.slice(p, b)), p = b + a;
|
|
245
245
|
continue;
|
|
246
246
|
}
|
|
247
|
-
if (
|
|
248
|
-
w =
|
|
247
|
+
if (y === "/") {
|
|
248
|
+
w = b;
|
|
249
249
|
continue;
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
-
|
|
252
|
+
y === "[" ? g++ : y === "]" && g--;
|
|
253
253
|
}
|
|
254
|
-
var x = v.length === 0 ? u : u.substring(p), k = x.startsWith(H0),
|
|
254
|
+
var x = v.length === 0 ? u : u.substring(p), k = x.startsWith(H0), Z = k ? x.substring(1) : x, C = w && w > p ? w - p : void 0;
|
|
255
255
|
return {
|
|
256
256
|
modifiers: v,
|
|
257
257
|
hasImportantModifier: k,
|
|
258
|
-
baseClassName:
|
|
258
|
+
baseClassName: Z,
|
|
259
259
|
maybePostfixModifierPosition: C
|
|
260
260
|
};
|
|
261
261
|
};
|
|
@@ -280,25 +280,25 @@ var je = /\s+/;
|
|
|
280
280
|
function Te(l, i) {
|
|
281
281
|
var e = i.splitModifiers, r = i.getClassGroupId, a = i.getConflictingClassGroupIds, t = /* @__PURE__ */ new Set();
|
|
282
282
|
return l.trim().split(je).map(function(u) {
|
|
283
|
-
var v = e(u), g = v.modifiers, p = v.hasImportantModifier, w = v.baseClassName,
|
|
284
|
-
if (!
|
|
285
|
-
if (!
|
|
283
|
+
var v = e(u), g = v.modifiers, p = v.hasImportantModifier, w = v.baseClassName, b = v.maybePostfixModifierPosition, y = r(b ? w.substring(0, b) : w), x = !!b;
|
|
284
|
+
if (!y) {
|
|
285
|
+
if (!b)
|
|
286
286
|
return {
|
|
287
287
|
isTailwindClass: !1,
|
|
288
288
|
originalClassName: u
|
|
289
289
|
};
|
|
290
|
-
if (
|
|
290
|
+
if (y = r(w), !y)
|
|
291
291
|
return {
|
|
292
292
|
isTailwindClass: !1,
|
|
293
293
|
originalClassName: u
|
|
294
294
|
};
|
|
295
295
|
x = !1;
|
|
296
296
|
}
|
|
297
|
-
var k = Oe(g).join(":"),
|
|
297
|
+
var k = Oe(g).join(":"), Z = p ? k + H0 : k;
|
|
298
298
|
return {
|
|
299
299
|
isTailwindClass: !0,
|
|
300
|
-
modifierId:
|
|
301
|
-
classGroupId:
|
|
300
|
+
modifierId: Z,
|
|
301
|
+
classGroupId: y,
|
|
302
302
|
originalClassName: u,
|
|
303
303
|
hasPostfixModifier: x
|
|
304
304
|
};
|
|
@@ -306,8 +306,8 @@ function Te(l, i) {
|
|
|
306
306
|
if (!u.isTailwindClass)
|
|
307
307
|
return !0;
|
|
308
308
|
var v = u.modifierId, g = u.classGroupId, p = u.hasPostfixModifier, w = v + g;
|
|
309
|
-
return t.has(w) ? !1 : (t.add(w), a(g, p).forEach(function(
|
|
310
|
-
return t.add(v +
|
|
309
|
+
return t.has(w) ? !1 : (t.add(w), a(g, p).forEach(function(b) {
|
|
310
|
+
return t.add(v + b);
|
|
311
311
|
}), !0);
|
|
312
312
|
}).reverse().map(function(u) {
|
|
313
313
|
return u.originalClassName;
|
|
@@ -318,17 +318,17 @@ function Y1() {
|
|
|
318
318
|
i[e] = arguments[e];
|
|
319
319
|
var r, a, t, u = v;
|
|
320
320
|
function v(p) {
|
|
321
|
-
var w = i[0],
|
|
321
|
+
var w = i[0], b = i.slice(1), y = b.reduce(function(x, k) {
|
|
322
322
|
return k(x);
|
|
323
323
|
}, w());
|
|
324
|
-
return r = Pe(
|
|
324
|
+
return r = Pe(y), a = r.cache.get, t = r.cache.set, u = g, g(p);
|
|
325
325
|
}
|
|
326
326
|
function g(p) {
|
|
327
327
|
var w = a(p);
|
|
328
328
|
if (w)
|
|
329
329
|
return w;
|
|
330
|
-
var
|
|
331
|
-
return t(p,
|
|
330
|
+
var b = Te(p, r);
|
|
331
|
+
return t(p, b), b;
|
|
332
332
|
}
|
|
333
333
|
return function() {
|
|
334
334
|
return u(Se.apply(null, arguments));
|
|
@@ -400,7 +400,7 @@ function Ke(l) {
|
|
|
400
400
|
return De.test(l);
|
|
401
401
|
}
|
|
402
402
|
function Q1() {
|
|
403
|
-
var l = N("colors"), i = N("spacing"), e = N("blur"), r = N("brightness"), a = N("borderColor"), t = N("borderRadius"), u = N("borderSpacing"), v = N("borderWidth"), g = N("contrast"), p = N("grayscale"), w = N("hueRotate"),
|
|
403
|
+
var l = N("colors"), i = N("spacing"), e = N("blur"), r = N("brightness"), a = N("borderColor"), t = N("borderRadius"), u = N("borderSpacing"), v = N("borderWidth"), g = N("contrast"), p = N("grayscale"), w = N("hueRotate"), b = N("invert"), y = N("gap"), x = N("gradientColorStops"), k = N("gradientColorStopPositions"), Z = N("inset"), C = N("margin"), I = N("opacity"), R = N("padding"), A = N("saturate"), S = N("scale"), z = N("sepia"), m = N("skew"), B = N("space"), M = N("translate"), j = function() {
|
|
404
404
|
return ["auto", "contain", "none"];
|
|
405
405
|
}, $ = function() {
|
|
406
406
|
return ["auto", "hidden", "clip", "visible", "scroll"];
|
|
@@ -602,63 +602,63 @@ function Q1() {
|
|
|
602
602
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
603
603
|
*/
|
|
604
604
|
inset: [{
|
|
605
|
-
inset: [
|
|
605
|
+
inset: [Z]
|
|
606
606
|
}],
|
|
607
607
|
/**
|
|
608
608
|
* Right / Left
|
|
609
609
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
610
610
|
*/
|
|
611
611
|
"inset-x": [{
|
|
612
|
-
"inset-x": [
|
|
612
|
+
"inset-x": [Z]
|
|
613
613
|
}],
|
|
614
614
|
/**
|
|
615
615
|
* Top / Bottom
|
|
616
616
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
617
617
|
*/
|
|
618
618
|
"inset-y": [{
|
|
619
|
-
"inset-y": [
|
|
619
|
+
"inset-y": [Z]
|
|
620
620
|
}],
|
|
621
621
|
/**
|
|
622
622
|
* Start
|
|
623
623
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
624
624
|
*/
|
|
625
625
|
start: [{
|
|
626
|
-
start: [
|
|
626
|
+
start: [Z]
|
|
627
627
|
}],
|
|
628
628
|
/**
|
|
629
629
|
* End
|
|
630
630
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
631
631
|
*/
|
|
632
632
|
end: [{
|
|
633
|
-
end: [
|
|
633
|
+
end: [Z]
|
|
634
634
|
}],
|
|
635
635
|
/**
|
|
636
636
|
* Top
|
|
637
637
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
638
638
|
*/
|
|
639
639
|
top: [{
|
|
640
|
-
top: [
|
|
640
|
+
top: [Z]
|
|
641
641
|
}],
|
|
642
642
|
/**
|
|
643
643
|
* Right
|
|
644
644
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
645
645
|
*/
|
|
646
646
|
right: [{
|
|
647
|
-
right: [
|
|
647
|
+
right: [Z]
|
|
648
648
|
}],
|
|
649
649
|
/**
|
|
650
650
|
* Bottom
|
|
651
651
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
652
652
|
*/
|
|
653
653
|
bottom: [{
|
|
654
|
-
bottom: [
|
|
654
|
+
bottom: [Z]
|
|
655
655
|
}],
|
|
656
656
|
/**
|
|
657
657
|
* Left
|
|
658
658
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
659
659
|
*/
|
|
660
660
|
left: [{
|
|
661
|
-
left: [
|
|
661
|
+
left: [Z]
|
|
662
662
|
}],
|
|
663
663
|
/**
|
|
664
664
|
* Visibility
|
|
@@ -808,21 +808,21 @@ function Q1() {
|
|
|
808
808
|
* @see https://tailwindcss.com/docs/gap
|
|
809
809
|
*/
|
|
810
810
|
gap: [{
|
|
811
|
-
gap: [
|
|
811
|
+
gap: [y]
|
|
812
812
|
}],
|
|
813
813
|
/**
|
|
814
814
|
* Gap X
|
|
815
815
|
* @see https://tailwindcss.com/docs/gap
|
|
816
816
|
*/
|
|
817
817
|
"gap-x": [{
|
|
818
|
-
"gap-x": [
|
|
818
|
+
"gap-x": [y]
|
|
819
819
|
}],
|
|
820
820
|
/**
|
|
821
821
|
* Gap Y
|
|
822
822
|
* @see https://tailwindcss.com/docs/gap
|
|
823
823
|
*/
|
|
824
824
|
"gap-y": [{
|
|
825
|
-
"gap-y": [
|
|
825
|
+
"gap-y": [y]
|
|
826
826
|
}],
|
|
827
827
|
/**
|
|
828
828
|
* Justify Content
|
|
@@ -1856,7 +1856,7 @@ function Q1() {
|
|
|
1856
1856
|
* @see https://tailwindcss.com/docs/invert
|
|
1857
1857
|
*/
|
|
1858
1858
|
invert: [{
|
|
1859
|
-
invert: [
|
|
1859
|
+
invert: [b]
|
|
1860
1860
|
}],
|
|
1861
1861
|
/**
|
|
1862
1862
|
* Saturate
|
|
@@ -1920,7 +1920,7 @@ function Q1() {
|
|
|
1920
1920
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
1921
1921
|
*/
|
|
1922
1922
|
"backdrop-invert": [{
|
|
1923
|
-
"backdrop-invert": [
|
|
1923
|
+
"backdrop-invert": [b]
|
|
1924
1924
|
}],
|
|
1925
1925
|
/**
|
|
1926
1926
|
* Backdrop Opacity
|
|
@@ -2077,14 +2077,14 @@ function Q1() {
|
|
|
2077
2077
|
* @see https://tailwindcss.com/docs/skew
|
|
2078
2078
|
*/
|
|
2079
2079
|
"skew-x": [{
|
|
2080
|
-
"skew-x": [
|
|
2080
|
+
"skew-x": [m]
|
|
2081
2081
|
}],
|
|
2082
2082
|
/**
|
|
2083
2083
|
* Skew Y
|
|
2084
2084
|
* @see https://tailwindcss.com/docs/skew
|
|
2085
2085
|
*/
|
|
2086
2086
|
"skew-y": [{
|
|
2087
|
-
"skew-y": [
|
|
2087
|
+
"skew-y": [m]
|
|
2088
2088
|
}],
|
|
2089
2089
|
/**
|
|
2090
2090
|
* Transform Origin
|
|
@@ -2489,8 +2489,8 @@ const O1 = (l) => {
|
|
|
2489
2489
|
height: g,
|
|
2490
2490
|
margin: p,
|
|
2491
2491
|
padding: w,
|
|
2492
|
-
width:
|
|
2493
|
-
...
|
|
2492
|
+
width: b,
|
|
2493
|
+
...y
|
|
2494
2494
|
}, x) => {
|
|
2495
2495
|
const k = {
|
|
2496
2496
|
0: "",
|
|
@@ -2499,22 +2499,22 @@ const O1 = (l) => {
|
|
|
2499
2499
|
4: "shadow-light-4 dark:shadow-dark-4",
|
|
2500
2500
|
8: "shadow-light-8 dark:shadow-dark-8",
|
|
2501
2501
|
12: "shadow-light-12 dark:shadow-dark-12"
|
|
2502
|
-
},
|
|
2502
|
+
}, Z = O1(u), C = O1(l), I = O1(i), R = K1(w), A = K1(p), S = f(
|
|
2503
2503
|
e,
|
|
2504
2504
|
r,
|
|
2505
2505
|
k[v],
|
|
2506
2506
|
A,
|
|
2507
2507
|
R,
|
|
2508
|
-
|
|
2508
|
+
Z,
|
|
2509
2509
|
C,
|
|
2510
2510
|
I,
|
|
2511
|
-
|
|
2511
|
+
b,
|
|
2512
2512
|
g,
|
|
2513
2513
|
a
|
|
2514
2514
|
);
|
|
2515
2515
|
return Q(t, {
|
|
2516
2516
|
className: S,
|
|
2517
|
-
...
|
|
2517
|
+
...y,
|
|
2518
2518
|
ref: x
|
|
2519
2519
|
});
|
|
2520
2520
|
}, H = d(s2);
|
|
@@ -2658,19 +2658,19 @@ const g2 = ({
|
|
|
2658
2658
|
placeholder: g,
|
|
2659
2659
|
prefix: p,
|
|
2660
2660
|
startIcon: w,
|
|
2661
|
-
suffix:
|
|
2662
|
-
value:
|
|
2661
|
+
suffix: b,
|
|
2662
|
+
value: y,
|
|
2663
2663
|
...x
|
|
2664
2664
|
}, k) => {
|
|
2665
|
-
const
|
|
2665
|
+
const Z = E(null), C = y1({ forwardedRef: k, innerRef: Z }), [I, R] = T(!!y), [A, S] = T(!1);
|
|
2666
2666
|
l1(() => {
|
|
2667
2667
|
var M;
|
|
2668
|
-
R(!!((M = C == null ? void 0 : C.current) != null && M.value) || !!(
|
|
2669
|
-
}, [
|
|
2668
|
+
R(!!((M = C == null ? void 0 : C.current) != null && M.value) || !!(y || g));
|
|
2669
|
+
}, [y, g, C]);
|
|
2670
2670
|
const z = (M) => {
|
|
2671
2671
|
var j;
|
|
2672
|
-
R(!!((j = C == null ? void 0 : C.current) != null && j.value) || !!(
|
|
2673
|
-
},
|
|
2672
|
+
R(!!((j = C == null ? void 0 : C.current) != null && j.value) || !!(y || g)), v && v(M);
|
|
2673
|
+
}, m = () => {
|
|
2674
2674
|
i || !C.current || (C.current.focus(), S(!0));
|
|
2675
2675
|
}, B = () => {
|
|
2676
2676
|
S(!1);
|
|
@@ -2684,8 +2684,8 @@ const g2 = ({
|
|
|
2684
2684
|
i ? "bg-gray-10 dark:bg-gray-40" : null,
|
|
2685
2685
|
r ? "border-alert dark:border-alert-dark" : "border-tertiary-light dark:border-tertiary-dark"
|
|
2686
2686
|
]),
|
|
2687
|
-
onClick:
|
|
2688
|
-
onFocus:
|
|
2687
|
+
onClick: m,
|
|
2688
|
+
onFocus: m,
|
|
2689
2689
|
children: [
|
|
2690
2690
|
w ? /* @__PURE__ */ n("div", { className: "text-text-muted-light dark:text-text-muted-dark pis-1.5", children: w }) : null,
|
|
2691
2691
|
/* @__PURE__ */ o("span", { className: "relative flex flex-1 overflow-hidden", children: [
|
|
@@ -2715,11 +2715,11 @@ const g2 = ({
|
|
|
2715
2715
|
onChange: z,
|
|
2716
2716
|
placeholder: g,
|
|
2717
2717
|
ref: C,
|
|
2718
|
-
value:
|
|
2718
|
+
value: y,
|
|
2719
2719
|
...x
|
|
2720
2720
|
}
|
|
2721
2721
|
),
|
|
2722
|
-
|
|
2722
|
+
b && (A || I) ? /* @__PURE__ */ n(
|
|
2723
2723
|
V,
|
|
2724
2724
|
{
|
|
2725
2725
|
className: f(
|
|
@@ -2727,7 +2727,7 @@ const g2 = ({
|
|
|
2727
2727
|
e ? "pie-1 -mis-1" : "pie-2 -mis-2",
|
|
2728
2728
|
t ? "pbs-3 pbe-1" : "plb-2"
|
|
2729
2729
|
),
|
|
2730
|
-
children:
|
|
2730
|
+
children: b
|
|
2731
2731
|
}
|
|
2732
2732
|
) : null,
|
|
2733
2733
|
t ? /* @__PURE__ */ n(
|
|
@@ -2840,11 +2840,11 @@ const z2 = ({
|
|
|
2840
2840
|
onChange: g,
|
|
2841
2841
|
onSelect: p,
|
|
2842
2842
|
value: w,
|
|
2843
|
-
...
|
|
2844
|
-
},
|
|
2845
|
-
const x = E(null), k = E(null), [
|
|
2843
|
+
...b
|
|
2844
|
+
}, y) => {
|
|
2845
|
+
const x = E(null), k = E(null), [Z, C] = T(w), [I, R] = T(!1);
|
|
2846
2846
|
Z0(
|
|
2847
|
-
|
|
2847
|
+
y,
|
|
2848
2848
|
() => ({
|
|
2849
2849
|
clearSelection() {
|
|
2850
2850
|
C(null), g("");
|
|
@@ -2854,15 +2854,15 @@ const z2 = ({
|
|
|
2854
2854
|
[g]
|
|
2855
2855
|
);
|
|
2856
2856
|
const A = (B) => {
|
|
2857
|
-
I || R(!0), !B.length &&
|
|
2857
|
+
I || R(!0), !B.length && Z && C(null), g(B);
|
|
2858
2858
|
}, S = (B) => {
|
|
2859
2859
|
p(B), g(B.label), C(B.label), R(!1);
|
|
2860
2860
|
}, z = k0(
|
|
2861
2861
|
(B) => {
|
|
2862
|
-
k.current && !k.current.contains(B.target) && (!
|
|
2862
|
+
k.current && !k.current.contains(B.target) && (!Z && w && g(""), Z && w && g(Z), R(!1));
|
|
2863
2863
|
},
|
|
2864
|
-
[g,
|
|
2865
|
-
),
|
|
2864
|
+
[g, Z, w]
|
|
2865
|
+
), m = G(() => r.filter((B) => B.label.toLowerCase().includes(w.toLowerCase())) ?? [], [r, w]);
|
|
2866
2866
|
return l1(() => (document.addEventListener("click", z, !0), () => {
|
|
2867
2867
|
document.removeEventListener("click", z, !0);
|
|
2868
2868
|
}), [z]), /* @__PURE__ */ o(H, { className: "relative", ref: k, children: [
|
|
@@ -2882,10 +2882,10 @@ const z2 = ({
|
|
|
2882
2882
|
onFocus: () => R(!0),
|
|
2883
2883
|
ref: x,
|
|
2884
2884
|
value: w ?? "",
|
|
2885
|
-
...
|
|
2885
|
+
...b
|
|
2886
2886
|
}
|
|
2887
2887
|
),
|
|
2888
|
-
I ? /* @__PURE__ */ n(H, { className: "absolute top-[calc(100%+1px)] w-full z-50", children: /* @__PURE__ */ n(W1, { className: "max-h-[300px] overflow-y-auto", children:
|
|
2888
|
+
I ? /* @__PURE__ */ n(H, { className: "absolute top-[calc(100%+1px)] w-full z-50", children: /* @__PURE__ */ n(W1, { className: "max-h-[300px] overflow-y-auto", children: m.length ? m.map((B, M) => /* @__PURE__ */ n(b1, { onClick: () => S(B), children: B.label }, `${B.value}-${M}`)) : /* @__PURE__ */ n(b1, { children: v }, "no-options") }) }) : null
|
|
2889
2889
|
] });
|
|
2890
2890
|
}, I2 = d(z2);
|
|
2891
2891
|
I2.displayName = "AutocompleteSelect";
|
|
@@ -3879,8 +3879,8 @@ const e7 = ({
|
|
|
3879
3879
|
size: g = "md",
|
|
3880
3880
|
type: p = "button",
|
|
3881
3881
|
variant: w = "filled:default",
|
|
3882
|
-
...
|
|
3883
|
-
},
|
|
3882
|
+
...b
|
|
3883
|
+
}, y) => {
|
|
3884
3884
|
const x = Y0(r !== void 0 ? t : void 0), k = f(
|
|
3885
3885
|
J0,
|
|
3886
3886
|
P[w],
|
|
@@ -3888,7 +3888,7 @@ const e7 = ({
|
|
|
3888
3888
|
{ "disabled:opacity-100": u },
|
|
3889
3889
|
l
|
|
3890
3890
|
);
|
|
3891
|
-
return /* @__PURE__ */ o("button", { className: k, disabled: e || u, ref:
|
|
3891
|
+
return /* @__PURE__ */ o("button", { className: k, disabled: e || u, ref: y, type: p, ...b, children: [
|
|
3892
3892
|
t === "start" && r !== void 0 ? Q(r, {
|
|
3893
3893
|
className: g === "xs" ? "mie-0.25" : "mie-0.5",
|
|
3894
3894
|
onClick: a ?? void 0,
|
|
@@ -3914,7 +3914,7 @@ const e7 = ({
|
|
|
3914
3914
|
}, x1 = d(e7);
|
|
3915
3915
|
x1.displayName = "Button";
|
|
3916
3916
|
const l7 = ({ error: l, className: i, label: e, disabled: r, name: a, labelProps: t, ...u }, v) => {
|
|
3917
|
-
const g = be(), p = G(() => `checkbox-label-${g}`, [g]), { className: w, ...
|
|
3917
|
+
const g = be(), p = G(() => `checkbox-label-${g}`, [g]), { className: w, ...b } = t ?? {};
|
|
3918
3918
|
return /* @__PURE__ */ o(
|
|
3919
3919
|
"div",
|
|
3920
3920
|
{
|
|
@@ -3944,7 +3944,7 @@ const l7 = ({ error: l, className: i, label: e, disabled: r, name: a, labelProps
|
|
|
3944
3944
|
"peer-disabled:text-text-muted-light peer-disabled:dark:text-text-muted-dark text-text-light dark:text-text-dark",
|
|
3945
3945
|
w
|
|
3946
3946
|
),
|
|
3947
|
-
children: /* @__PURE__ */ n("label", { htmlFor: a, id: p, ...
|
|
3947
|
+
children: /* @__PURE__ */ n("label", { htmlFor: a, id: p, ...b, children: e })
|
|
3948
3948
|
}
|
|
3949
3949
|
) : null,
|
|
3950
3950
|
l ? /* @__PURE__ */ n("div", { className: "text-alert-light dark:text-alert-dark text-13", children: l }) : null
|
|
@@ -3966,10 +3966,10 @@ const r7 = ({
|
|
|
3966
3966
|
resetAriaLabel: g = "Reset color",
|
|
3967
3967
|
resetValue: p = "#FFFFFF",
|
|
3968
3968
|
value: w,
|
|
3969
|
-
...
|
|
3970
|
-
},
|
|
3969
|
+
...b
|
|
3970
|
+
}, y) => {
|
|
3971
3971
|
"use client";
|
|
3972
|
-
const x = /^#[0-9A-F]{0,6}$/i, k = /^#([0-9A-F]{3}){1,2}$/i,
|
|
3972
|
+
const x = /^#[0-9A-F]{0,6}$/i, k = /^#([0-9A-F]{3}){1,2}$/i, Z = E(null), C = E(null), [I, R] = T(!1), A = y ?? Z, S = (M) => {
|
|
3973
3973
|
if (!M.target.value.length)
|
|
3974
3974
|
return u(M);
|
|
3975
3975
|
const j = M.target.value.startsWith("#") ? M.target.value : `#${M.target.value}`;
|
|
@@ -3979,7 +3979,7 @@ const r7 = ({
|
|
|
3979
3979
|
const j = k.test(p) ? p : "";
|
|
3980
3980
|
M.target.value = j, M.target.name = t, u(M);
|
|
3981
3981
|
}
|
|
3982
|
-
function
|
|
3982
|
+
function m() {
|
|
3983
3983
|
var M;
|
|
3984
3984
|
i || (R(!0), (M = A == null ? void 0 : A.current) == null || M.focus());
|
|
3985
3985
|
}
|
|
@@ -3996,7 +3996,7 @@ const r7 = ({
|
|
|
3996
3996
|
r ? "border-alert" : "",
|
|
3997
3997
|
I ? "border-blue-30 border-standard" : ""
|
|
3998
3998
|
),
|
|
3999
|
-
onClick:
|
|
3999
|
+
onClick: m,
|
|
4000
4000
|
children: [
|
|
4001
4001
|
/* @__PURE__ */ o("div", { className: "flex flex-col justify-center items-start", id: "labelAndInput", children: [
|
|
4002
4002
|
w || !w && I ? /* @__PURE__ */ n("label", { className: "text-13 font-medium text-gray-25", htmlFor: `${t}-input`, children: a }) : null,
|
|
@@ -4031,7 +4031,7 @@ const r7 = ({
|
|
|
4031
4031
|
ref: C,
|
|
4032
4032
|
type: "color",
|
|
4033
4033
|
value: w || p,
|
|
4034
|
-
...
|
|
4034
|
+
...b
|
|
4035
4035
|
}
|
|
4036
4036
|
),
|
|
4037
4037
|
/* @__PURE__ */ n(
|
|
@@ -4099,24 +4099,24 @@ const ee = ({ autoFocus: l = !0, children: i, className: e }) => {
|
|
|
4099
4099
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
4100
4100
|
);
|
|
4101
4101
|
let t = document.activeElement;
|
|
4102
|
-
const u = a[0], v = a[a.length - 1], g = (
|
|
4103
|
-
if (
|
|
4104
|
-
if (
|
|
4102
|
+
const u = a[0], v = a[a.length - 1], g = (b) => {
|
|
4103
|
+
if (b.key === "Tab") {
|
|
4104
|
+
if (b.shiftKey) {
|
|
4105
4105
|
if (document.activeElement === u)
|
|
4106
|
-
|
|
4106
|
+
b.preventDefault(), v.focus(), t = v;
|
|
4107
4107
|
else
|
|
4108
|
-
for (let
|
|
4109
|
-
if (a[
|
|
4110
|
-
t = a[
|
|
4108
|
+
for (let y = 0; y < a.length; y++)
|
|
4109
|
+
if (a[y] === document.activeElement) {
|
|
4110
|
+
t = a[y - 1];
|
|
4111
4111
|
break;
|
|
4112
4112
|
}
|
|
4113
|
-
} else if (!
|
|
4113
|
+
} else if (!b.shiftKey) {
|
|
4114
4114
|
if (document.activeElement === v)
|
|
4115
|
-
|
|
4115
|
+
b.preventDefault(), u.focus(), t = u;
|
|
4116
4116
|
else
|
|
4117
|
-
for (let
|
|
4118
|
-
if (a[
|
|
4119
|
-
t = a[
|
|
4117
|
+
for (let y = 0; y < a.length; y++)
|
|
4118
|
+
if (a[y] === document.activeElement) {
|
|
4119
|
+
t = a[y + 1];
|
|
4120
4120
|
break;
|
|
4121
4121
|
}
|
|
4122
4122
|
}
|
|
@@ -4124,14 +4124,14 @@ const ee = ({ autoFocus: l = !0, children: i, className: e }) => {
|
|
|
4124
4124
|
};
|
|
4125
4125
|
l && (() => {
|
|
4126
4126
|
if (r.current) {
|
|
4127
|
-
const
|
|
4127
|
+
const b = r.current.querySelector(
|
|
4128
4128
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
4129
4129
|
);
|
|
4130
|
-
|
|
4130
|
+
b && b.focus();
|
|
4131
4131
|
}
|
|
4132
4132
|
})();
|
|
4133
|
-
const w = (
|
|
4134
|
-
r.current && !r.current.contains(
|
|
4133
|
+
const w = (b) => {
|
|
4134
|
+
r.current && !r.current.contains(b.target) && t.focus();
|
|
4135
4135
|
};
|
|
4136
4136
|
return document.addEventListener("keydown", g), document.addEventListener("click", w), () => {
|
|
4137
4137
|
document.removeEventListener("keydown", g), document.removeEventListener("click", w);
|
|
@@ -4222,9 +4222,9 @@ const g7 = ({
|
|
|
4222
4222
|
) : null,
|
|
4223
4223
|
/* @__PURE__ */ n("div", { children: t ? /* @__PURE__ */ n(v1, { className: "pbe-1", size: "md", variant: "headline", children: t }) : null }),
|
|
4224
4224
|
/* @__PURE__ */ n("div", { children: i }),
|
|
4225
|
-
/* @__PURE__ */ n("div", { className: "w-full flex justify-end items-center pbs-2", children: r == null ? void 0 : r.map(({ label:
|
|
4225
|
+
/* @__PURE__ */ n("div", { className: "w-full flex justify-end items-center pbs-2", children: r == null ? void 0 : r.map(({ label: b, ...y }, x) => (
|
|
4226
4226
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
4227
|
-
/* @__PURE__ */ n(x1, { "aria-label":
|
|
4227
|
+
/* @__PURE__ */ n(x1, { "aria-label": b, size: "sm", variant: "all_caps", ...y, children: b }, `${b}${x}`)
|
|
4228
4228
|
)) })
|
|
4229
4229
|
]
|
|
4230
4230
|
}
|
|
@@ -4422,20 +4422,20 @@ const en = ({
|
|
|
4422
4422
|
dismissImageAriaLabel: u = "Remove Image",
|
|
4423
4423
|
error: v = "",
|
|
4424
4424
|
fileMaxKbSizeError: g = (M, j) => `${M} is too big to upload, the maximum size is ${j}kb. Please try again.`,
|
|
4425
|
-
fileMaxSizeError: p = (M) => `${M} is too large to upload. The maximum dimensions are ${
|
|
4426
|
-
fileMinSizeError: w = (M) => `${M} is too small to upload. The minimum dimensions are ${
|
|
4427
|
-
fileRatioError:
|
|
4428
|
-
fileCallback:
|
|
4425
|
+
fileMaxSizeError: p = (M) => `${M} is too large to upload. The maximum dimensions are ${m == null ? void 0 : m.maxWidth}x${m == null ? void 0 : m.maxHeight}. Please try again.`,
|
|
4426
|
+
fileMinSizeError: w = (M) => `${M} is too small to upload. The minimum dimensions are ${m == null ? void 0 : m.minWidth}x${m == null ? void 0 : m.minHeight}. Please try again.`,
|
|
4427
|
+
fileRatioError: b = (M) => `${M} must have a ratio of, ${m == null ? void 0 : m.imageRatio}. Please try again.`,
|
|
4428
|
+
fileCallback: y,
|
|
4429
4429
|
hero: x = !1,
|
|
4430
4430
|
hint: k,
|
|
4431
|
-
imageWidth:
|
|
4431
|
+
imageWidth: Z = 160,
|
|
4432
4432
|
imageSrc: C,
|
|
4433
4433
|
label: I = "Upload Image",
|
|
4434
4434
|
name: R = "imageUpload",
|
|
4435
4435
|
onBlur: A,
|
|
4436
4436
|
preProcessing: S,
|
|
4437
4437
|
shape: z = "circle",
|
|
4438
|
-
validation:
|
|
4438
|
+
validation: m
|
|
4439
4439
|
}, B) => {
|
|
4440
4440
|
const M = E(null), j = y1({ forwardedRef: B, innerRef: M }), [$, X] = T(void 0), [D, O] = T(C ? "resolved" : "idle"), [s1, Y] = T(v), Z1 = () => M != null && M.current ? M.current.click() : void 0;
|
|
4441
4441
|
l1(() => {
|
|
@@ -4463,7 +4463,7 @@ const en = ({
|
|
|
4463
4463
|
]),
|
|
4464
4464
|
onLoad: () => $ != null && $.imageSrc ? URL.revokeObjectURL($.imageSrc) : void 0,
|
|
4465
4465
|
src: h1 || void 0,
|
|
4466
|
-
width:
|
|
4466
|
+
width: Z
|
|
4467
4467
|
}
|
|
4468
4468
|
),
|
|
4469
4469
|
a ? null : /* @__PURE__ */ n(
|
|
@@ -4489,27 +4489,27 @@ const en = ({
|
|
|
4489
4489
|
$ == null ? void 0 : $.imageSrc,
|
|
4490
4490
|
C,
|
|
4491
4491
|
D,
|
|
4492
|
-
|
|
4492
|
+
Z,
|
|
4493
4493
|
h1,
|
|
4494
4494
|
z
|
|
4495
4495
|
]), k1 = ({ file: J, imageUrl: i1 }) => new Promise((a1, n1) => {
|
|
4496
4496
|
var U1;
|
|
4497
|
-
const W = new Image(), g1 = (U1 =
|
|
4497
|
+
const W = new Image(), g1 = (U1 = m == null ? void 0 : m.imageRatio) == null ? void 0 : U1.split("/");
|
|
4498
4498
|
W.onload = async () => {
|
|
4499
|
-
if (
|
|
4500
|
-
if (
|
|
4499
|
+
if (m)
|
|
4500
|
+
if (m != null && m.maxByteSize && J.size > m.maxByteSize) {
|
|
4501
4501
|
X(void 0), O("rejected");
|
|
4502
|
-
const fe = g(J.name, Math.round(
|
|
4502
|
+
const fe = g(J.name, Math.round(m.maxByteSize / 1e3));
|
|
4503
4503
|
return Y(fe), n1(!1);
|
|
4504
4504
|
} else {
|
|
4505
|
-
if (
|
|
4505
|
+
if (m != null && m.minWidth && W.width < (m == null ? void 0 : m.minWidth) || m != null && m.minHeight && W.height < (m == null ? void 0 : m.minHeight))
|
|
4506
4506
|
return X(void 0), O("rejected"), Y(w(J.name)), n1(!1);
|
|
4507
|
-
if (
|
|
4507
|
+
if (m != null && m.maxHeight && W.height > (m == null ? void 0 : m.maxHeight) || m != null && m.maxWidth && W.width > (m == null ? void 0 : m.maxWidth))
|
|
4508
4508
|
return X(void 0), O("rejected"), Y(p(J.name)), n1(!1);
|
|
4509
|
-
if (
|
|
4510
|
-
return X(void 0), O("rejected"), Y(
|
|
4509
|
+
if (m != null && m.imageRatio && (g1 == null ? void 0 : g1.length) === 2 && parseInt(g1[0]) / parseInt(g1[1]) !== W.width / W.height)
|
|
4510
|
+
return X(void 0), O("rejected"), Y(b(J.name)), n1(!1);
|
|
4511
4511
|
}
|
|
4512
|
-
return
|
|
4512
|
+
return Z = W.width, typeof y == "function" && (console.log("Callback"), await y(J, W)), Y(""), a1(!0);
|
|
4513
4513
|
}, W.src = i1;
|
|
4514
4514
|
}), r1 = async (J) => {
|
|
4515
4515
|
try {
|
|
@@ -4610,7 +4610,7 @@ const tn = ({
|
|
|
4610
4610
|
...v
|
|
4611
4611
|
}, g) => {
|
|
4612
4612
|
const p = Y0(r !== void 0 ? a : void 0);
|
|
4613
|
-
return /* @__PURE__ */ o(({ children:
|
|
4613
|
+
return /* @__PURE__ */ o(({ children: b }) => Q(
|
|
4614
4614
|
e,
|
|
4615
4615
|
{
|
|
4616
4616
|
...v,
|
|
@@ -4623,7 +4623,7 @@ const tn = ({
|
|
|
4623
4623
|
]),
|
|
4624
4624
|
ref: g
|
|
4625
4625
|
},
|
|
4626
|
-
|
|
4626
|
+
b
|
|
4627
4627
|
), { children: [
|
|
4628
4628
|
a === "start" && r !== void 0 ? Q(r, {
|
|
4629
4629
|
className: f("flex-shrink-0", u === "xs" ? "mie-0.25" : "mie-0.5"),
|
|
@@ -4838,7 +4838,7 @@ const gn = ({ title: l, titleId: i, ...e }, r) => /* @__PURE__ */ o(
|
|
|
4838
4838
|
"dark:text-text-muted-dark hover:!text-canvas-light hover:dark:text-gray-50",
|
|
4839
4839
|
"border border-transparent focus:border-info focus:dark:border-info",
|
|
4840
4840
|
"hover:border-transparent hover:dark:border-transparent"
|
|
4841
|
-
),
|
|
4841
|
+
), b = w, y = f(p, "bg-yv-red !text-white dark:!text-white"), x = G(
|
|
4842
4842
|
() => kn({
|
|
4843
4843
|
page: l.findIndex((k) => k === i) + 1,
|
|
4844
4844
|
pages: l
|
|
@@ -4851,7 +4851,7 @@ const gn = ({ title: l, titleId: i, ...e }, r) => /* @__PURE__ */ o(
|
|
|
4851
4851
|
H,
|
|
4852
4852
|
{
|
|
4853
4853
|
"aria-label": v,
|
|
4854
|
-
className: f(
|
|
4854
|
+
className: f(b, "hidden md:flex mli-0"),
|
|
4855
4855
|
component: r,
|
|
4856
4856
|
onClick: () => e(l[0]),
|
|
4857
4857
|
children: [
|
|
@@ -4864,7 +4864,7 @@ const gn = ({ title: l, titleId: i, ...e }, r) => /* @__PURE__ */ o(
|
|
|
4864
4864
|
H,
|
|
4865
4865
|
{
|
|
4866
4866
|
"aria-label": u,
|
|
4867
|
-
className: f(
|
|
4867
|
+
className: f(b, "mli-0"),
|
|
4868
4868
|
component: r,
|
|
4869
4869
|
onClick: () => e(l[l.findIndex((k) => k === i) - 1]),
|
|
4870
4870
|
children: [
|
|
@@ -4877,20 +4877,20 @@ const gn = ({ title: l, titleId: i, ...e }, r) => /* @__PURE__ */ o(
|
|
|
4877
4877
|
x.map((k) => /* @__PURE__ */ n(
|
|
4878
4878
|
H,
|
|
4879
4879
|
{
|
|
4880
|
-
"aria-label": a(l.findIndex((
|
|
4881
|
-
className: f(k === i ?
|
|
4880
|
+
"aria-label": a(l.findIndex((Z) => Z === k) + 1),
|
|
4881
|
+
className: f(k === i ? y : w, "hidden md:flex"),
|
|
4882
4882
|
component: r,
|
|
4883
4883
|
onClick: () => e(k),
|
|
4884
4884
|
children: /* @__PURE__ */ n(
|
|
4885
4885
|
V,
|
|
4886
4886
|
{
|
|
4887
4887
|
className: f(
|
|
4888
|
-
k === i ?
|
|
4888
|
+
k === i ? y : "text-inherit hover:text-inherit",
|
|
4889
4889
|
"hidden md:flex"
|
|
4890
4890
|
),
|
|
4891
4891
|
size: "sm",
|
|
4892
4892
|
variant: "fieldLabel",
|
|
4893
|
-
children: l.findIndex((
|
|
4893
|
+
children: l.findIndex((Z) => Z === k) + 1
|
|
4894
4894
|
}
|
|
4895
4895
|
)
|
|
4896
4896
|
},
|
|
@@ -4910,7 +4910,7 @@ const gn = ({ title: l, titleId: i, ...e }, r) => /* @__PURE__ */ o(
|
|
|
4910
4910
|
H,
|
|
4911
4911
|
{
|
|
4912
4912
|
"aria-label": t,
|
|
4913
|
-
className: f(w,
|
|
4913
|
+
className: f(w, b, "mli-0"),
|
|
4914
4914
|
component: r,
|
|
4915
4915
|
onClick: () => e(l[l.findIndex((k) => k === i) + 1]),
|
|
4916
4916
|
children: [
|
|
@@ -4923,7 +4923,7 @@ const gn = ({ title: l, titleId: i, ...e }, r) => /* @__PURE__ */ o(
|
|
|
4923
4923
|
H,
|
|
4924
4924
|
{
|
|
4925
4925
|
"aria-label": g,
|
|
4926
|
-
className: f(w,
|
|
4926
|
+
className: f(w, b, "hidden md:flex mli-0"),
|
|
4927
4927
|
component: r,
|
|
4928
4928
|
onClick: () => e(l[l.length - 1]),
|
|
4929
4929
|
children: [
|
|
@@ -4934,27 +4934,38 @@ const gn = ({ title: l, titleId: i, ...e }, r) => /* @__PURE__ */ o(
|
|
|
4934
4934
|
)
|
|
4935
4935
|
] }) : null
|
|
4936
4936
|
] });
|
|
4937
|
-
}, Oo = ({ children: l, className: i, ...e }) => /* @__PURE__ */ n("div", { className: f(["relative", i]), ...e, children: l }), Cn = ({
|
|
4938
|
-
|
|
4939
|
-
|
|
4937
|
+
}, Oo = ({ children: l, className: i, ...e }) => /* @__PURE__ */ n("div", { className: f(["relative", i]), ...e, children: l }), Cn = ({
|
|
4938
|
+
align: l,
|
|
4939
|
+
children: i,
|
|
4940
|
+
className: e,
|
|
4941
|
+
fullScreenMobile: r,
|
|
4942
|
+
...a
|
|
4943
|
+
}) => {
|
|
4944
|
+
const t = G(() => {
|
|
4945
|
+
const { horizontal: u, vertical: v } = l, g = r ? {
|
|
4946
|
+
center: "left-1/2 -translate-x-1/2",
|
|
4947
|
+
end: "left-1/2 -translate-x-1/2 lg:inline-end-0 lg:left-auto lg:translate-x-0",
|
|
4948
|
+
start: "left-1/2 -translate-x-1/2 lg:inline-start-0 lg:left-auto lg:translate-x-0"
|
|
4949
|
+
} : {
|
|
4940
4950
|
center: "left-1/2 -translate-x-1/2",
|
|
4941
4951
|
end: "inline-end-0",
|
|
4942
4952
|
start: "inline-start-0"
|
|
4943
|
-
},
|
|
4953
|
+
}, p = {
|
|
4944
4954
|
bottom: "",
|
|
4945
4955
|
top: "bottom-full"
|
|
4946
4956
|
};
|
|
4947
|
-
return `${
|
|
4948
|
-
}, [l]);
|
|
4957
|
+
return `${g[u]} ${p[v]}`;
|
|
4958
|
+
}, [l, r]);
|
|
4949
4959
|
return /* @__PURE__ */ n(
|
|
4950
4960
|
"div",
|
|
4951
4961
|
{
|
|
4952
4962
|
className: f([
|
|
4953
4963
|
"absolute shadow-light-2 dark:shadow-dark-2 rounded-1 bg-canvas-light dark:bg-overlay-body-dark mbe-0.5 w-max overflow-y-scroll min-h-[200px] max-h-[400px] scrollbar-hide z-10",
|
|
4954
|
-
|
|
4964
|
+
t,
|
|
4965
|
+
r ? "fixed w-11/12 lg:absolute lg:w-max" : "",
|
|
4955
4966
|
e
|
|
4956
4967
|
]),
|
|
4957
|
-
...
|
|
4968
|
+
...a,
|
|
4958
4969
|
children: i
|
|
4959
4970
|
}
|
|
4960
4971
|
);
|
|
@@ -4964,27 +4975,29 @@ const gn = ({ title: l, titleId: i, ...e }, r) => /* @__PURE__ */ o(
|
|
|
4964
4975
|
children: e,
|
|
4965
4976
|
className: r,
|
|
4966
4977
|
closeOnClickInside: a = !0,
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4978
|
+
fullScreenMobile: t = !1,
|
|
4979
|
+
isDismissible: u,
|
|
4980
|
+
isOpen: v,
|
|
4981
|
+
onClose: g,
|
|
4982
|
+
...p
|
|
4971
4983
|
}) => {
|
|
4972
|
-
function
|
|
4973
|
-
|
|
4984
|
+
function w(x) {
|
|
4985
|
+
u && x.key === "Escape" && g();
|
|
4974
4986
|
}
|
|
4975
|
-
function
|
|
4976
|
-
|
|
4987
|
+
function b() {
|
|
4988
|
+
u && g();
|
|
4977
4989
|
}
|
|
4978
|
-
const
|
|
4979
|
-
return L0({ handler:
|
|
4990
|
+
const y = E(null);
|
|
4991
|
+
return L0({ handler: b, ref: y }), /* @__PURE__ */ n(Mn, { open: v, children: /* @__PURE__ */ n(ee, { autoFocus: i, children: /* @__PURE__ */ n(
|
|
4980
4992
|
Cn,
|
|
4981
4993
|
{
|
|
4982
4994
|
align: l,
|
|
4983
4995
|
className: r,
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4996
|
+
fullScreenMobile: t,
|
|
4997
|
+
onClose: g,
|
|
4998
|
+
...p,
|
|
4999
|
+
children: /* @__PURE__ */ n("div", { onClick: a ? g : () => {
|
|
5000
|
+
}, onKeyDown: w, ref: y, children: e })
|
|
4988
5001
|
}
|
|
4989
5002
|
) }) });
|
|
4990
5003
|
}, jo = ({ onToggle: l, children: i, className: e, disabled: r }) => {
|
|
@@ -5097,10 +5110,10 @@ const Bn = ({ title: l, titleId: i, ...e }, r) => /* @__PURE__ */ o(
|
|
|
5097
5110
|
value: g,
|
|
5098
5111
|
dismissButtonLabel: p,
|
|
5099
5112
|
...w
|
|
5100
|
-
},
|
|
5101
|
-
const
|
|
5113
|
+
}, b) => {
|
|
5114
|
+
const y = E(null), x = y1({ forwardedRef: b, innerRef: y }), k = (C) => {
|
|
5102
5115
|
u && u(C.target.value);
|
|
5103
|
-
},
|
|
5116
|
+
}, Z = () => {
|
|
5104
5117
|
u && u("");
|
|
5105
5118
|
};
|
|
5106
5119
|
return /* @__PURE__ */ o("div", { className: f(["flex items-start flex-col gap-0.5", l]), children: [
|
|
@@ -5135,7 +5148,7 @@ const Bn = ({ title: l, titleId: i, ...e }, r) => /* @__PURE__ */ o(
|
|
|
5135
5148
|
{
|
|
5136
5149
|
"aria-label": p,
|
|
5137
5150
|
className: "p-0.25 hover:text-white bg-gray-45 dark:bg-gray-50",
|
|
5138
|
-
onClick:
|
|
5151
|
+
onClick: Z,
|
|
5139
5152
|
variant: "primary",
|
|
5140
5153
|
children: /* @__PURE__ */ n(se, {})
|
|
5141
5154
|
}
|
|
@@ -5162,27 +5175,27 @@ const $n = ({
|
|
|
5162
5175
|
onSelect: g,
|
|
5163
5176
|
value: p,
|
|
5164
5177
|
...w
|
|
5165
|
-
},
|
|
5166
|
-
const
|
|
5178
|
+
}, b) => {
|
|
5179
|
+
const y = E(null), x = E(null), [k, Z] = T(p), [C, I] = T(!1);
|
|
5167
5180
|
Z0(
|
|
5168
|
-
|
|
5181
|
+
b,
|
|
5169
5182
|
() => ({
|
|
5170
5183
|
clearSelection() {
|
|
5171
|
-
|
|
5184
|
+
Z(null), v("");
|
|
5172
5185
|
},
|
|
5173
|
-
...
|
|
5186
|
+
...y.current
|
|
5174
5187
|
}),
|
|
5175
5188
|
[v]
|
|
5176
5189
|
);
|
|
5177
|
-
const R = (
|
|
5178
|
-
C || I(!0), !
|
|
5179
|
-
}, A = (
|
|
5180
|
-
g(
|
|
5190
|
+
const R = (m) => {
|
|
5191
|
+
C || I(!0), !m.length && k && Z(null), v(m);
|
|
5192
|
+
}, A = (m) => {
|
|
5193
|
+
g(m), v(m.label), Z(m.label), I(!1);
|
|
5181
5194
|
}, S = k0(() => {
|
|
5182
5195
|
!k && p && v(""), k && p && v(k), I(!1);
|
|
5183
5196
|
}, [v, k, p]), z = G(() => {
|
|
5184
|
-
const
|
|
5185
|
-
return e.filter((B) => B.label.toLowerCase().includes(
|
|
5197
|
+
const m = p.toLowerCase();
|
|
5198
|
+
return e.filter((B) => B.label.toLowerCase().includes(m));
|
|
5186
5199
|
}, [e, p]);
|
|
5187
5200
|
return L0({
|
|
5188
5201
|
handler: S,
|
|
@@ -5203,16 +5216,16 @@ const $n = ({
|
|
|
5203
5216
|
hint: t,
|
|
5204
5217
|
label: l,
|
|
5205
5218
|
name: i ?? l,
|
|
5206
|
-
onChange: (
|
|
5207
|
-
R(
|
|
5219
|
+
onChange: (m) => {
|
|
5220
|
+
R(m);
|
|
5208
5221
|
},
|
|
5209
5222
|
onFocus: () => I(!0),
|
|
5210
|
-
ref:
|
|
5223
|
+
ref: y,
|
|
5211
5224
|
value: p,
|
|
5212
5225
|
...w
|
|
5213
5226
|
}
|
|
5214
5227
|
),
|
|
5215
|
-
C ? /* @__PURE__ */ n(H, { className: "absolute top-full inset-x-0 z-50", children: /* @__PURE__ */ n(W1, { className: "max-h-[300px] rounded-t-0 px-0.5 overflow-y-auto", children: z.length ? z.map((
|
|
5228
|
+
C ? /* @__PURE__ */ n(H, { className: "absolute top-full inset-x-0 z-50", children: /* @__PURE__ */ n(W1, { className: "max-h-[300px] rounded-t-0 px-0.5 overflow-y-auto", children: z.length ? z.map((m, B) => /* @__PURE__ */ n(b1, { onClick: () => A(m), children: m.label }, `${m.value}-${B}`)) : /* @__PURE__ */ n(b1, { children: u }, "no-options") }) }) : null
|
|
5216
5229
|
]
|
|
5217
5230
|
}
|
|
5218
5231
|
);
|
|
@@ -5229,11 +5242,11 @@ function Pn({ className: l, defaultValue: i, onChange: e = () => {
|
|
|
5229
5242
|
...a,
|
|
5230
5243
|
className: `inline-flex overflow-hidden text-gray-40 dark:text-white ${l}`,
|
|
5231
5244
|
ref: t,
|
|
5232
|
-
children: r.map((w,
|
|
5245
|
+
children: r.map((w, b) => /* @__PURE__ */ n(
|
|
5233
5246
|
Tn,
|
|
5234
5247
|
{
|
|
5235
5248
|
activeIndex: u,
|
|
5236
|
-
currentIndex:
|
|
5249
|
+
currentIndex: b,
|
|
5237
5250
|
lastIndex: r.length - 1,
|
|
5238
5251
|
onSelectedValue: p,
|
|
5239
5252
|
prevIndex: g,
|
|
@@ -5278,20 +5291,20 @@ const Fn = "appearance-none outline-none bg-transparent disabled:bg-gray-10 dark
|
|
|
5278
5291
|
"font-aktiv-grotesk font-medium text-13 absolute inline-start-2 block-start-2 pointer-events-none opacity-0 h-1.5"
|
|
5279
5292
|
), Dn = "-translate-y-1 opacity-100", Un = "text-overlay-text dark:text-text-dark", _n = "!pbs-3 !pbe-1", qn = "absolute block-end-2 inline-end-1.5 leading-0 pointer-events-none text-text-muted-light dark:text-text-muted-dark", Xn = ({ children: l, className: i, disabled: e = !1, error: r, hint: a, label: t, name: u, onChange: v, value: g, ...p }, w) => {
|
|
5280
5293
|
var A;
|
|
5281
|
-
const
|
|
5294
|
+
const b = f(En, Fn), y = E(null), x = y1({ forwardedRef: w, innerRef: y }), [k, Z] = T(!!(g || (A = x == null ? void 0 : x.current) != null && A.value));
|
|
5282
5295
|
l1(() => {
|
|
5283
5296
|
var S;
|
|
5284
|
-
|
|
5297
|
+
Z(!!((S = x == null ? void 0 : x.current) != null && S.value || g));
|
|
5285
5298
|
}, [g, x]);
|
|
5286
5299
|
const C = G(() => {
|
|
5287
|
-
const S = f(
|
|
5300
|
+
const S = f(b, Un, t ? _n : null), z = f(b, T1);
|
|
5288
5301
|
return k ? S : z;
|
|
5289
|
-
}, [
|
|
5302
|
+
}, [b, k, t]), I = G(() => {
|
|
5290
5303
|
const S = f(x0, Dn), z = f(x0);
|
|
5291
5304
|
return k ? S : z;
|
|
5292
5305
|
}, [k]), R = (S) => {
|
|
5293
5306
|
var z;
|
|
5294
|
-
|
|
5307
|
+
Z(!!((z = x == null ? void 0 : x.current) != null && z.value || g)), v && v(S);
|
|
5295
5308
|
};
|
|
5296
5309
|
return /* @__PURE__ */ o("div", { className: f(i), children: [
|
|
5297
5310
|
/* @__PURE__ */ o("div", { className: "relative w-full border-none", children: [
|
|
@@ -5482,9 +5495,9 @@ const no = {
|
|
|
5482
5495
|
placeholder: g,
|
|
5483
5496
|
value: p,
|
|
5484
5497
|
...w
|
|
5485
|
-
},
|
|
5486
|
-
const
|
|
5487
|
-
|
|
5498
|
+
}, b) => {
|
|
5499
|
+
const y = E(null), x = y1({ forwardedRef: b, innerRef: y }), [k, Z] = T(!!(p || g)), [C, I] = T(!1), R = (z) => {
|
|
5500
|
+
Z(!!(z.target.value || g)), v && v(z);
|
|
5488
5501
|
}, A = () => {
|
|
5489
5502
|
i || !x.current || (x.current.focus(), I(!0));
|
|
5490
5503
|
}, S = () => {
|
|
@@ -5585,36 +5598,36 @@ const go = {
|
|
|
5585
5598
|
const v = E(null), [g, p] = T(_.START);
|
|
5586
5599
|
l1(() => {
|
|
5587
5600
|
if (g === _.START) {
|
|
5588
|
-
const
|
|
5589
|
-
return () => clearTimeout(
|
|
5601
|
+
const Z = setTimeout(() => p(_.SHOW), 100);
|
|
5602
|
+
return () => clearTimeout(Z);
|
|
5590
5603
|
} else if (g === _.DISMISS) {
|
|
5591
|
-
const
|
|
5604
|
+
const Z = setTimeout(() => {
|
|
5592
5605
|
e && e(), p(_.REMOVE);
|
|
5593
5606
|
}, 1e3);
|
|
5594
|
-
return () => clearTimeout(
|
|
5607
|
+
return () => clearTimeout(Z);
|
|
5595
5608
|
} else if (r && g !== _.REMOVE) {
|
|
5596
|
-
const
|
|
5597
|
-
return () => clearTimeout(
|
|
5609
|
+
const Z = setTimeout(() => p(_.DISMISS), r);
|
|
5610
|
+
return () => clearTimeout(Z);
|
|
5598
5611
|
}
|
|
5599
5612
|
}, [r, g, e]);
|
|
5600
5613
|
const w = G(() => {
|
|
5601
|
-
var
|
|
5602
|
-
return g === _.DISMISS && ((
|
|
5603
|
-
}, [v, g]),
|
|
5604
|
-
const
|
|
5614
|
+
var Z;
|
|
5615
|
+
return g === _.DISMISS && ((Z = v == null ? void 0 : v.current) != null && Z.clientHeight) ? `-${v.current.clientHeight}px` : "0px";
|
|
5616
|
+
}, [v, g]), b = () => p(_.DISMISS), y = G(() => {
|
|
5617
|
+
const Z = "flex items-start justify-start p-2 text-white rounded-1 width-full max-w-[400px] border-0 opacity-0 transition-[opacity, transform] duration-1000 ease-in-out min-w-[276px]";
|
|
5605
5618
|
switch (u) {
|
|
5606
5619
|
case "inlineEnd":
|
|
5607
|
-
return g === _.SHOW ? `${
|
|
5620
|
+
return g === _.SHOW ? `${Z} translate-x-0 opacity-1` : `${Z} translate-x-[400px]`;
|
|
5608
5621
|
case "inlineStart":
|
|
5609
5622
|
default:
|
|
5610
|
-
return g === _.SHOW ? `${
|
|
5623
|
+
return g === _.SHOW ? `${Z} translate-x-[-400px]` : `${Z} opacity-1 translate-x-0`;
|
|
5611
5624
|
}
|
|
5612
5625
|
}, [u, g]), x = G(() => {
|
|
5613
|
-
const
|
|
5614
|
-
return u === "inlineEnd" ? `${
|
|
5626
|
+
const Z = "flex flex-col transition-[margin] duration-500 ease-in-out overflow-hidden";
|
|
5627
|
+
return u === "inlineEnd" ? `${Z} items-end` : `${Z} items-start`;
|
|
5615
5628
|
}, [u]), k = G(() => go[t], [t]);
|
|
5616
|
-
return g === _.REMOVE ? null : /* @__PURE__ */ n("div", { className: f(x), style: { marginBlockEnd: w }, children: /* @__PURE__ */ o("div", { className: f(
|
|
5617
|
-
!a && /* @__PURE__ */ n("button", { "aria-label": "Dismiss", className: "mie-1", onClick:
|
|
5629
|
+
return g === _.REMOVE ? null : /* @__PURE__ */ n("div", { className: f(x), style: { marginBlockEnd: w }, children: /* @__PURE__ */ o("div", { className: f(y, k, l), ref: v, children: [
|
|
5630
|
+
!a && /* @__PURE__ */ n("button", { "aria-label": "Dismiss", className: "mie-1", onClick: b, children: /* @__PURE__ */ n(se, {}) }),
|
|
5618
5631
|
i
|
|
5619
5632
|
] }) });
|
|
5620
5633
|
}, po = "_tooltipWrapper_qu88w_1", wo = "_tooltipContent_qu88w_18", y0 = {
|