shekel-fe-shared-lib 1.0.26 → 1.0.28
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/dist/index.cjs +16 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +211 -198
- package/dist/index.mjs.map +1 -1
- package/dist/shekel-fe-shared-lib.css +1 -1
- package/dist/types/components/Input/CurrencyInput.d.ts +2 -2
- package/dist/types/components/Input/Input.d.ts +1 -1
- package/dist/types/components/Input/PasswordInput.d.ts +1 -0
- package/dist/types/components/Input/PhoneInput.d.ts +2 -2
- package/dist/types/components/StatCard/StatCard.d.ts +4 -0
- package/package.json +2 -3
package/dist/index.mjs
CHANGED
|
@@ -118,26 +118,39 @@ const R1 = ({
|
|
|
118
118
|
progressText: a,
|
|
119
119
|
badge: l,
|
|
120
120
|
width: c = 347,
|
|
121
|
-
className: p = ""
|
|
121
|
+
className: p = "",
|
|
122
|
+
selected: d = !1,
|
|
123
|
+
onClick: C,
|
|
124
|
+
size: m = "md",
|
|
125
|
+
rounded: L = "2xl"
|
|
122
126
|
}) => {
|
|
123
|
-
const
|
|
127
|
+
const y = m === "sm" ? "p-3" : m === "lg" ? "p-6" : "p-4", g = {
|
|
128
|
+
none: "rounded-none",
|
|
129
|
+
sm: "rounded-sm",
|
|
130
|
+
md: "rounded-md",
|
|
131
|
+
lg: "rounded-lg",
|
|
132
|
+
xl: "rounded-xl",
|
|
133
|
+
"2xl": "rounded-2xl",
|
|
134
|
+
full: "rounded-full"
|
|
135
|
+
}[L] ?? "rounded-2xl", v = /* @__PURE__ */ u("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
|
|
124
136
|
/* @__PURE__ */ n("rect", { x: "3", y: "6", width: "18", height: "12", rx: "2", stroke: "currentColor", strokeWidth: "2" }),
|
|
125
137
|
/* @__PURE__ */ n("path", { d: "M3 10h18M7 14h4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
126
138
|
] });
|
|
127
139
|
return /* @__PURE__ */ u(
|
|
128
140
|
"div",
|
|
129
141
|
{
|
|
130
|
-
className: `bg-white border
|
|
142
|
+
className: `bg-white border flex flex-col justify-between transition-all duration-300 ease-in-out hover:border-gray-300 hover:-translate-y-1 cursor-pointer ${y} ${g} ${d ? "border-[#EC615B]" : "border-[#E6E6E6]"} ${p}`,
|
|
131
143
|
style: {
|
|
132
144
|
width: typeof c == "number" ? `${c}px` : c,
|
|
133
|
-
boxShadow: "0 0 0 0 rgba(0, 0, 0, 0)",
|
|
145
|
+
boxShadow: d ? "0 0 0 1px #EC615B" : "0 0 0 0 rgba(0, 0, 0, 0)",
|
|
134
146
|
transition: "all 0.3s ease-in-out"
|
|
135
147
|
},
|
|
136
|
-
|
|
137
|
-
|
|
148
|
+
onClick: C,
|
|
149
|
+
onMouseEnter: (x) => {
|
|
150
|
+
x.currentTarget.style.boxShadow = d ? "0 0 0 1px #EC615B" : "0 0 20px 0 rgba(0, 0, 0, 0.1)";
|
|
138
151
|
},
|
|
139
|
-
onMouseLeave: (
|
|
140
|
-
|
|
152
|
+
onMouseLeave: (x) => {
|
|
153
|
+
x.currentTarget.style.boxShadow = d ? "0 0 0 1px #EC615B" : "0 0 0 0 rgba(0, 0, 0, 0)";
|
|
141
154
|
},
|
|
142
155
|
children: [
|
|
143
156
|
/* @__PURE__ */ u("div", { children: [
|
|
@@ -150,7 +163,7 @@ const R1 = ({
|
|
|
150
163
|
backgroundColor: o,
|
|
151
164
|
color: s
|
|
152
165
|
},
|
|
153
|
-
children: r ||
|
|
166
|
+
children: r || v
|
|
154
167
|
}
|
|
155
168
|
),
|
|
156
169
|
l && l
|
|
@@ -186,17 +199,17 @@ const R1 = ({
|
|
|
186
199
|
process.env.NODE_ENV !== "production" && console.warn(
|
|
187
200
|
"[Shekel Shared Lib] SearchInput is deprecated as of v1.0.11. Please use the new Input component instead for better functionality and consistent styling."
|
|
188
201
|
);
|
|
189
|
-
const
|
|
202
|
+
const w = "relative inline-flex items-center", g = "border focus:outline-none focus:ring-1 transition-all duration-200 ease-in-out", v = {
|
|
190
203
|
sm: "px-3 py-1.5 text-sm",
|
|
191
204
|
md: "px-4 py-2 text-base",
|
|
192
205
|
lg: "px-5 py-3 text-lg",
|
|
193
206
|
responsive: "px-3 sm:px-4 md:px-5 py-1.5 sm:py-2 md:py-3 text-sm sm:text-base md:text-lg"
|
|
194
|
-
},
|
|
207
|
+
}, x = {
|
|
195
208
|
sm: "w-4 h-4",
|
|
196
209
|
md: "w-5 h-5",
|
|
197
210
|
lg: "w-6 h-6",
|
|
198
211
|
responsive: "w-4 sm:w-5 md:w-6 h-4 sm:h-5 md:h-6"
|
|
199
|
-
},
|
|
212
|
+
}, b = {
|
|
200
213
|
none: "rounded-none",
|
|
201
214
|
sm: "rounded-sm",
|
|
202
215
|
md: "rounded-lg",
|
|
@@ -207,10 +220,10 @@ const R1 = ({
|
|
|
207
220
|
borderColor: l || "#D1D5DB",
|
|
208
221
|
color: d,
|
|
209
222
|
...L
|
|
210
|
-
}, _ = C ? "" : "placeholder:text-gray-400", z = l ? "" : "border-gray-300", H = d ? "" : "text-gray-900",
|
|
223
|
+
}, _ = C ? "" : "placeholder:text-gray-400", z = l ? "" : "border-gray-300", H = d ? "" : "text-gray-900", B = c ? "" : "focus:ring-[#EC615B] focus:border-[#EC615B]", U = `${g} ${!s.includes("px-") && !s.includes("py-") ? v[r] : ""} ${e ? k : ""} ${f} ${s.includes("rounded") ? "" : b[m]} ${s.includes("border-") ? "" : z} ${H} ${B} ${_} ${s}`, E = t === "left" ? "left-3" : "right-3", N = p || "text-gray-400", V = p ? "" : "hover:text-gray-600", S = /* @__PURE__ */ n(
|
|
211
224
|
"svg",
|
|
212
225
|
{
|
|
213
|
-
className: `${
|
|
226
|
+
className: `${x[r]} ${N}`,
|
|
214
227
|
xmlns: "http://www.w3.org/2000/svg",
|
|
215
228
|
fill: "none",
|
|
216
229
|
viewBox: "0 0 24 24",
|
|
@@ -226,7 +239,7 @@ const R1 = ({
|
|
|
226
239
|
)
|
|
227
240
|
}
|
|
228
241
|
);
|
|
229
|
-
return /* @__PURE__ */ u("div", { className: `${
|
|
242
|
+
return /* @__PURE__ */ u("div", { className: `${w} ${f}`, children: [
|
|
230
243
|
e && /* @__PURE__ */ n(
|
|
231
244
|
"div",
|
|
232
245
|
{
|
|
@@ -288,10 +301,10 @@ const R1 = ({
|
|
|
288
301
|
borderColor: C,
|
|
289
302
|
style: m
|
|
290
303
|
}) => {
|
|
291
|
-
const [L, y] = R(!1),
|
|
304
|
+
const [L, y] = R(!1), w = i2(null);
|
|
292
305
|
I(() => {
|
|
293
306
|
const $ = (G) => {
|
|
294
|
-
|
|
307
|
+
w.current && !w.current.contains(G.target) && y(!1);
|
|
295
308
|
};
|
|
296
309
|
return L && document.addEventListener("mousedown", $), () => {
|
|
297
310
|
document.removeEventListener("mousedown", $);
|
|
@@ -301,9 +314,9 @@ const R1 = ({
|
|
|
301
314
|
!a && t === "click" && y(!L);
|
|
302
315
|
}, v = () => {
|
|
303
316
|
!a && t === "hover" && y(!0);
|
|
304
|
-
},
|
|
317
|
+
}, x = () => {
|
|
305
318
|
!a && t === "hover" && y(!1);
|
|
306
|
-
},
|
|
319
|
+
}, b = ($) => {
|
|
307
320
|
!$.disabled && $.onClick && $.onClick(), y(!1);
|
|
308
321
|
}, k = {
|
|
309
322
|
bottomLeft: "top-full left-0 mt-1",
|
|
@@ -320,14 +333,14 @@ const R1 = ({
|
|
|
320
333
|
md: "px-4 py-2 text-sm gap-2",
|
|
321
334
|
lg: "px-5 py-3 text-base gap-2.5",
|
|
322
335
|
responsive: "px-3 sm:px-4 md:px-5 py-1.5 sm:py-2 md:py-3 text-xs sm:text-sm md:text-base gap-1.5 sm:gap-2 md:gap-2.5"
|
|
323
|
-
}, z = "hover:bg-gray-50", H = "border-gray-200",
|
|
336
|
+
}, z = "hover:bg-gray-50", H = "border-gray-200", B = "text-red-600", U = p ? { backgroundColor: p } : {}, E = p ? "" : z, N = d ? { color: d } : {}, V = d ? { backgroundColor: d + "15" } : {}, S = C || H;
|
|
324
337
|
return /* @__PURE__ */ u(
|
|
325
338
|
"div",
|
|
326
339
|
{
|
|
327
|
-
ref:
|
|
340
|
+
ref: w,
|
|
328
341
|
className: `relative inline-block ${s}`,
|
|
329
342
|
onMouseEnter: v,
|
|
330
|
-
onMouseLeave:
|
|
343
|
+
onMouseLeave: x,
|
|
331
344
|
style: m,
|
|
332
345
|
children: [
|
|
333
346
|
/* @__PURE__ */ n(
|
|
@@ -355,13 +368,13 @@ const R1 = ({
|
|
|
355
368
|
} : p && (G = U)), /* @__PURE__ */ u(
|
|
356
369
|
"div",
|
|
357
370
|
{
|
|
358
|
-
onClick: () =>
|
|
371
|
+
onClick: () => b($),
|
|
359
372
|
className: `
|
|
360
373
|
dropdown-menu-item
|
|
361
374
|
flex items-center cursor-pointer transition-all duration-200 ease-out
|
|
362
375
|
${!i.includes("px-") && !i.includes("py-") ? _[l] : ""}
|
|
363
376
|
${$.disabled ? "opacity-50 cursor-not-allowed" : E}
|
|
364
|
-
${$.danger ? d ? "" :
|
|
377
|
+
${$.danger ? d ? "" : B : "text-gray-700"}
|
|
365
378
|
`,
|
|
366
379
|
style: G,
|
|
367
380
|
children: [
|
|
@@ -497,7 +510,7 @@ function z0(e) {
|
|
|
497
510
|
const [L, y] = M.useState(() => {
|
|
498
511
|
const k = r._getWatch(o, c.current);
|
|
499
512
|
return p.current ? p.current(k) : k;
|
|
500
|
-
}),
|
|
513
|
+
}), w = M.useCallback((k) => {
|
|
501
514
|
const f = U2(o, r._names, k || r._formValues, !1, c.current);
|
|
502
515
|
return p.current ? p.current(f) : f;
|
|
503
516
|
}, [r._formValues, r._names, o]), g = M.useCallback((k) => {
|
|
@@ -520,13 +533,13 @@ function z0(e) {
|
|
|
520
533
|
g(k.values);
|
|
521
534
|
}
|
|
522
535
|
})), [r, a, o, g]), M.useEffect(() => r._removeUnmounted());
|
|
523
|
-
const v = C.current !== r,
|
|
536
|
+
const v = C.current !== r, x = m.current, b = M.useMemo(() => {
|
|
524
537
|
if (i)
|
|
525
538
|
return null;
|
|
526
|
-
const k = !v && !s2(
|
|
527
|
-
return v || k ?
|
|
528
|
-
}, [i, v, o,
|
|
529
|
-
return
|
|
539
|
+
const k = !v && !s2(x, o);
|
|
540
|
+
return v || k ? w() : null;
|
|
541
|
+
}, [i, v, o, x, w]);
|
|
542
|
+
return b !== null ? b : L;
|
|
530
543
|
}
|
|
531
544
|
function W(e) {
|
|
532
545
|
const t = _2(), { name: r, disabled: o, control: s = t, shouldUnregister: i, defaultValue: a, exact: l = !0 } = e, c = F0(s._names.array, r), p = M.useMemo(() => D(s._formValues, r, D(s._defaultValues, r, a)), [s, r, a]), d = z0({
|
|
@@ -544,7 +557,7 @@ function W(e) {
|
|
|
544
557
|
...C2(e.disabled) ? { disabled: e.disabled } : {}
|
|
545
558
|
}));
|
|
546
559
|
m.current = e;
|
|
547
|
-
const
|
|
560
|
+
const w = M.useMemo(() => Object.defineProperties({}, {
|
|
548
561
|
invalid: {
|
|
549
562
|
enumerable: !0,
|
|
550
563
|
get: () => !!D(C.errors, r)
|
|
@@ -577,7 +590,7 @@ function W(e) {
|
|
|
577
590
|
name: r
|
|
578
591
|
},
|
|
579
592
|
type: E2.BLUR
|
|
580
|
-
}), [r, s._formValues]),
|
|
593
|
+
}), [r, s._formValues]), x = M.useCallback((k) => {
|
|
581
594
|
const f = D(s._fields, r);
|
|
582
595
|
f && f._f && k && (f._f.ref = {
|
|
583
596
|
focus: () => r2(k.focus) && k.focus(),
|
|
@@ -585,14 +598,14 @@ function W(e) {
|
|
|
585
598
|
setCustomValidity: (h) => r2(k.setCustomValidity) && k.setCustomValidity(h),
|
|
586
599
|
reportValidity: () => r2(k.reportValidity) && k.reportValidity()
|
|
587
600
|
});
|
|
588
|
-
}, [s._fields, r]),
|
|
601
|
+
}, [s._fields, r]), b = M.useMemo(() => ({
|
|
589
602
|
name: r,
|
|
590
603
|
value: d,
|
|
591
604
|
...C2(o) || C.disabled ? { disabled: C.disabled || o } : {},
|
|
592
605
|
onChange: g,
|
|
593
606
|
onBlur: v,
|
|
594
|
-
ref:
|
|
595
|
-
}), [r, o, C.disabled, g, v,
|
|
607
|
+
ref: x
|
|
608
|
+
}), [r, o, C.disabled, g, v, x, d]);
|
|
596
609
|
return M.useEffect(() => {
|
|
597
610
|
const k = s._options.shouldUnregister || i, f = L.current;
|
|
598
611
|
f && f !== r && !c && s.unregister(f), s.register(r, {
|
|
@@ -616,10 +629,10 @@ function W(e) {
|
|
|
616
629
|
name: r
|
|
617
630
|
});
|
|
618
631
|
}, [o, r, s]), M.useMemo(() => ({
|
|
619
|
-
field:
|
|
632
|
+
field: b,
|
|
620
633
|
formState: C,
|
|
621
|
-
fieldState:
|
|
622
|
-
}), [
|
|
634
|
+
fieldState: w
|
|
635
|
+
}), [b, C, w]);
|
|
623
636
|
}
|
|
624
637
|
const U0 = M.createContext(null);
|
|
625
638
|
U0.displayName = "HookFormContext";
|
|
@@ -639,28 +652,28 @@ const X2 = ({
|
|
|
639
652
|
showSearch: m = !1,
|
|
640
653
|
searchPlaceholder: L = "Search...",
|
|
641
654
|
bgColor: y,
|
|
642
|
-
borderColor:
|
|
655
|
+
borderColor: w,
|
|
643
656
|
focusBorderColor: g = "#EC615B",
|
|
644
657
|
selectedBgColor: v,
|
|
645
|
-
selectedTextColor:
|
|
646
|
-
hoverBgColor:
|
|
658
|
+
selectedTextColor: x,
|
|
659
|
+
hoverBgColor: b,
|
|
647
660
|
rounded: k = "lg",
|
|
648
661
|
style: f,
|
|
649
662
|
label: h,
|
|
650
663
|
error: _,
|
|
651
664
|
helperText: z
|
|
652
665
|
}) => {
|
|
653
|
-
const [H,
|
|
666
|
+
const [H, B] = R(!1), [U, E] = R(r), [N, V] = R(""), S = i2(null), $ = i2(null), G = t !== void 0 ? t : U;
|
|
654
667
|
I(() => {
|
|
655
668
|
const F = (Y) => {
|
|
656
|
-
S.current && !S.current.contains(Y.target) && (
|
|
669
|
+
S.current && !S.current.contains(Y.target) && (B(!1), V(""), H && (i == null || i()));
|
|
657
670
|
};
|
|
658
671
|
return H && (document.addEventListener("mousedown", F), m && $.current && $.current.focus()), () => {
|
|
659
672
|
document.removeEventListener("mousedown", F);
|
|
660
673
|
};
|
|
661
674
|
}, [H, m]);
|
|
662
675
|
const c2 = (F) => {
|
|
663
|
-
t === void 0 && E(F), s == null || s(F),
|
|
676
|
+
t === void 0 && E(F), s == null || s(F), B(!1), V("");
|
|
664
677
|
}, P = (F) => {
|
|
665
678
|
F.stopPropagation(), t === void 0 && E(void 0), s == null || s("");
|
|
666
679
|
}, K = e.find((F) => F.value === G), Q = m ? e.filter(
|
|
@@ -678,10 +691,10 @@ const X2 = ({
|
|
|
678
691
|
full: "rounded-full"
|
|
679
692
|
}, u0 = p ? "w-full" : "min-w-[200px]", p2 = () => {
|
|
680
693
|
const F = {};
|
|
681
|
-
return y && (F.backgroundColor = y),
|
|
694
|
+
return y && (F.backgroundColor = y), w && (F.borderColor = w), F;
|
|
682
695
|
}, f0 = () => {
|
|
683
696
|
const F = {};
|
|
684
|
-
return v && (F.backgroundColor = v),
|
|
697
|
+
return v && (F.backgroundColor = v), x && (F.color = x), F;
|
|
685
698
|
}, h0 = /* @__PURE__ */ n(
|
|
686
699
|
"svg",
|
|
687
700
|
{
|
|
@@ -699,7 +712,7 @@ const X2 = ({
|
|
|
699
712
|
/* @__PURE__ */ u(
|
|
700
713
|
"div",
|
|
701
714
|
{
|
|
702
|
-
onClick: () => !l &&
|
|
715
|
+
onClick: () => !l && B(!H),
|
|
703
716
|
className: `
|
|
704
717
|
select-trigger
|
|
705
718
|
flex items-center justify-between gap-2
|
|
@@ -713,17 +726,17 @@ const X2 = ({
|
|
|
713
726
|
style: {
|
|
714
727
|
...p2(),
|
|
715
728
|
backgroundColor: y || p2().backgroundColor || "#FFFFFF",
|
|
716
|
-
borderColor: _ ? "#C21919" :
|
|
729
|
+
borderColor: _ ? "#C21919" : w || p2().borderColor || "#D1D5DB",
|
|
717
730
|
...H && {
|
|
718
731
|
borderColor: _ ? "#C21919" : g,
|
|
719
732
|
boxShadow: `0 0 0 2px ${_ ? "#C21919" : g}20`
|
|
720
733
|
},
|
|
721
|
-
...!l && !H &&
|
|
734
|
+
...!l && !H && b && {
|
|
722
735
|
cursor: "pointer"
|
|
723
736
|
}
|
|
724
737
|
},
|
|
725
738
|
onMouseEnter: (F) => {
|
|
726
|
-
!l &&
|
|
739
|
+
!l && b && (F.currentTarget.style.backgroundColor = b);
|
|
727
740
|
},
|
|
728
741
|
onMouseLeave: (F) => {
|
|
729
742
|
y ? F.currentTarget.style.backgroundColor = y : F.currentTarget.style.backgroundColor = "#FFFFFF";
|
|
@@ -755,7 +768,7 @@ const X2 = ({
|
|
|
755
768
|
placeholder: L,
|
|
756
769
|
className: "w-full px-3 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:ring-2 transition-all duration-200 ease-out",
|
|
757
770
|
style: {
|
|
758
|
-
borderColor:
|
|
771
|
+
borderColor: w,
|
|
759
772
|
boxShadow: `0 0 0 2px ${g}20`
|
|
760
773
|
},
|
|
761
774
|
onClick: (F) => F.stopPropagation()
|
|
@@ -773,11 +786,11 @@ const X2 = ({
|
|
|
773
786
|
style: {
|
|
774
787
|
...F.value === G ? f0() : {},
|
|
775
788
|
backgroundColor: F.value === G ? v || "#FCEAE9" : void 0,
|
|
776
|
-
color: F.value === G ?
|
|
789
|
+
color: F.value === G ? x || "#EC615B" : "#181918",
|
|
777
790
|
fontWeight: F.value === G ? "medium" : void 0
|
|
778
791
|
},
|
|
779
792
|
onMouseEnter: (Y) => {
|
|
780
|
-
!F.disabled && F.value !== G && (Y.currentTarget.style.backgroundColor =
|
|
793
|
+
!F.disabled && F.value !== G && (Y.currentTarget.style.backgroundColor = b || "#F3F4F6");
|
|
781
794
|
},
|
|
782
795
|
onMouseLeave: (Y) => {
|
|
783
796
|
F.value !== G && (Y.currentTarget.style.backgroundColor = "transparent");
|
|
@@ -820,7 +833,7 @@ const X2 = ({
|
|
|
820
833
|
error: r ?? ((a = i.error) == null ? void 0 : a.message)
|
|
821
834
|
}
|
|
822
835
|
);
|
|
823
|
-
},
|
|
836
|
+
}, B0 = ({ control: e, name: t, ...r }) => e && t ? /* @__PURE__ */ n(G0, { control: e, name: t, ...r }) : /* @__PURE__ */ n(X2, { name: t, ...r }), T1 = ({
|
|
824
837
|
columns: e,
|
|
825
838
|
dataSource: t,
|
|
826
839
|
rowKey: r = "id",
|
|
@@ -836,12 +849,12 @@ const X2 = ({
|
|
|
836
849
|
rowHoverColor: m,
|
|
837
850
|
borderColor: L,
|
|
838
851
|
stripedRowColor: y,
|
|
839
|
-
rounded:
|
|
852
|
+
rounded: w = "md",
|
|
840
853
|
style: g
|
|
841
854
|
}) => {
|
|
842
|
-
const [v,
|
|
855
|
+
const [v, x] = R(
|
|
843
856
|
o && typeof o == "object" && o.current || 1
|
|
844
|
-
), [
|
|
857
|
+
), [b, k] = R(
|
|
845
858
|
o && typeof o == "object" && o.pageSize || 10
|
|
846
859
|
), f = {
|
|
847
860
|
sm: {
|
|
@@ -879,10 +892,10 @@ const X2 = ({
|
|
|
879
892
|
lg: "rounded-lg",
|
|
880
893
|
xl: "rounded-xl",
|
|
881
894
|
"2xl": "rounded-2xl"
|
|
882
|
-
}, _ = f[p], z = h[
|
|
883
|
-
|
|
895
|
+
}, _ = f[p], z = h[w], H = (V, S) => typeof r == "function" ? r(V) : V[r] || String(S), B = (V, S) => S ? S.split(".").reduce(($, G) => $ == null ? void 0 : $[G], V) : V, U = o === !1 ? t : t.slice((v - 1) * b, v * b), E = (V) => {
|
|
896
|
+
x(V), o && typeof o == "object" && o.onChange && o.onChange(V, b);
|
|
884
897
|
}, N = (V) => {
|
|
885
|
-
k(V),
|
|
898
|
+
k(V), x(1), o && typeof o == "object" && o.onChange && o.onChange(1, V);
|
|
886
899
|
};
|
|
887
900
|
return /* @__PURE__ */ u("div", { className: "w-full", style: g, children: [
|
|
888
901
|
/* @__PURE__ */ n(
|
|
@@ -983,7 +996,7 @@ const X2 = ({
|
|
|
983
996
|
},
|
|
984
997
|
...$,
|
|
985
998
|
children: e.map((P, K) => {
|
|
986
|
-
const Q =
|
|
999
|
+
const Q = B(V, P.dataIndex), d2 = P.render ? P.render(Q, V, S) : Q;
|
|
987
1000
|
return /* @__PURE__ */ n(
|
|
988
1001
|
"td",
|
|
989
1002
|
{
|
|
@@ -1006,10 +1019,10 @@ const X2 = ({
|
|
|
1006
1019
|
}
|
|
1007
1020
|
),
|
|
1008
1021
|
o !== !1 && /* @__PURE__ */ n(
|
|
1009
|
-
|
|
1022
|
+
Z0,
|
|
1010
1023
|
{
|
|
1011
1024
|
current: v,
|
|
1012
|
-
pageSize:
|
|
1025
|
+
pageSize: b,
|
|
1013
1026
|
total: t.length,
|
|
1014
1027
|
onChange: E,
|
|
1015
1028
|
onPageSizeChange: N,
|
|
@@ -1020,7 +1033,7 @@ const X2 = ({
|
|
|
1020
1033
|
}
|
|
1021
1034
|
)
|
|
1022
1035
|
] });
|
|
1023
|
-
},
|
|
1036
|
+
}, Z0 = ({
|
|
1024
1037
|
current: e,
|
|
1025
1038
|
pageSize: t,
|
|
1026
1039
|
total: r,
|
|
@@ -1076,7 +1089,7 @@ const X2 = ({
|
|
|
1076
1089
|
] }),
|
|
1077
1090
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
1078
1091
|
i && /* @__PURE__ */ n(
|
|
1079
|
-
|
|
1092
|
+
B0,
|
|
1080
1093
|
{
|
|
1081
1094
|
value: t.toString(),
|
|
1082
1095
|
onChange: (y) => s(Number(y)),
|
|
@@ -1106,13 +1119,13 @@ const X2 = ({
|
|
|
1106
1119
|
) })
|
|
1107
1120
|
}
|
|
1108
1121
|
),
|
|
1109
|
-
L().map((y,
|
|
1122
|
+
L().map((y, w) => y === "..." ? /* @__PURE__ */ n(
|
|
1110
1123
|
"span",
|
|
1111
1124
|
{
|
|
1112
1125
|
className: `relative inline-flex items-center justify-center ${m[c].button} font-normal text-[#181918]`,
|
|
1113
1126
|
children: "..."
|
|
1114
1127
|
},
|
|
1115
|
-
`ellipsis-${
|
|
1128
|
+
`ellipsis-${w}`
|
|
1116
1129
|
) : /* @__PURE__ */ n(
|
|
1117
1130
|
"button",
|
|
1118
1131
|
{
|
|
@@ -1158,12 +1171,12 @@ const X2 = ({
|
|
|
1158
1171
|
searchFocusBorderColor: m = "#3b82f6",
|
|
1159
1172
|
rounded: L = "md",
|
|
1160
1173
|
style: y,
|
|
1161
|
-
hideActionButtons:
|
|
1174
|
+
hideActionButtons: w = !1,
|
|
1162
1175
|
selectedActionButton: g
|
|
1163
1176
|
}) => {
|
|
1164
1177
|
const v = (_) => {
|
|
1165
1178
|
o == null || o(_.target.value);
|
|
1166
|
-
},
|
|
1179
|
+
}, b = {
|
|
1167
1180
|
sm: {
|
|
1168
1181
|
titleSize: "text-lg",
|
|
1169
1182
|
titleWeight: "font-semibold",
|
|
@@ -1229,14 +1242,14 @@ const X2 = ({
|
|
|
1229
1242
|
return /* @__PURE__ */ u(
|
|
1230
1243
|
"div",
|
|
1231
1244
|
{
|
|
1232
|
-
className: `${
|
|
1245
|
+
className: `${b.spacing} mb-4 ${a}`,
|
|
1233
1246
|
style: y,
|
|
1234
1247
|
children: [
|
|
1235
1248
|
(e || t) && /* @__PURE__ */ u("div", { children: [
|
|
1236
1249
|
e && /* @__PURE__ */ n(
|
|
1237
1250
|
"h2",
|
|
1238
1251
|
{
|
|
1239
|
-
className: `${
|
|
1252
|
+
className: `${b.titleSize} ${b.titleWeight}`,
|
|
1240
1253
|
style: { color: c || "#111827" },
|
|
1241
1254
|
children: e
|
|
1242
1255
|
}
|
|
@@ -1244,18 +1257,18 @@ const X2 = ({
|
|
|
1244
1257
|
t && /* @__PURE__ */ n(
|
|
1245
1258
|
"p",
|
|
1246
1259
|
{
|
|
1247
|
-
className: `${
|
|
1260
|
+
className: `${b.descriptionSize} ${b.descriptionMargin}`,
|
|
1248
1261
|
style: { color: p || "#6b7280" },
|
|
1249
1262
|
children: t
|
|
1250
1263
|
}
|
|
1251
1264
|
)
|
|
1252
1265
|
] }),
|
|
1253
|
-
/* @__PURE__ */ u("div", { className: `flex flex-col sm:flex-row items-stretch sm:items-center justify-between ${
|
|
1254
|
-
o && /* @__PURE__ */ n("div", { className: `flex-1 ${
|
|
1266
|
+
/* @__PURE__ */ u("div", { className: `flex flex-col sm:flex-row items-stretch sm:items-center justify-between ${b.gap}`, children: [
|
|
1267
|
+
o && /* @__PURE__ */ n("div", { className: `flex-1 ${b.maxWidth}`, children: /* @__PURE__ */ u("div", { className: "relative", children: [
|
|
1255
1268
|
/* @__PURE__ */ n("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ n(
|
|
1256
1269
|
"svg",
|
|
1257
1270
|
{
|
|
1258
|
-
className: `${
|
|
1271
|
+
className: `${b.iconSize} text-gray-400`,
|
|
1259
1272
|
fill: "none",
|
|
1260
1273
|
stroke: "currentColor",
|
|
1261
1274
|
viewBox: "0 0 24 24",
|
|
@@ -1276,7 +1289,7 @@ const X2 = ({
|
|
|
1276
1289
|
type: "text",
|
|
1277
1290
|
placeholder: r,
|
|
1278
1291
|
onChange: v,
|
|
1279
|
-
className: `block w-full ${
|
|
1292
|
+
className: `block w-full ${b.searchPaddingLeft} pr-3 ${b.searchInputPy} border ${f} focus:outline-none focus:ring-2 focus:ring-opacity-50 ${b.searchInputSize} transition-colors duration-200`,
|
|
1280
1293
|
style: h,
|
|
1281
1294
|
onFocus: (_) => {
|
|
1282
1295
|
_.currentTarget.style.borderColor = m, _.currentTarget.style.boxShadow = "0 0 0 2px rgba(59, 130, 246, 0.1)";
|
|
@@ -1287,9 +1300,9 @@ const X2 = ({
|
|
|
1287
1300
|
}
|
|
1288
1301
|
)
|
|
1289
1302
|
] }) }),
|
|
1290
|
-
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 w-full sm:w-auto", children:
|
|
1303
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 w-full sm:w-auto", children: w && g ? g : s })
|
|
1291
1304
|
] }),
|
|
1292
|
-
i && /* @__PURE__ */ n("div", { className: `flex flex-wrap items-center ${
|
|
1305
|
+
i && /* @__PURE__ */ n("div", { className: `flex flex-wrap items-center ${b.gap}`, children: i })
|
|
1293
1306
|
]
|
|
1294
1307
|
}
|
|
1295
1308
|
);
|
|
@@ -1316,10 +1329,10 @@ const X2 = ({
|
|
|
1316
1329
|
headerBgColor: m = "#ffffff",
|
|
1317
1330
|
overlayColor: L = "rgba(0, 0, 0, 0.5)",
|
|
1318
1331
|
bodyClassName: y = "",
|
|
1319
|
-
headerClassName:
|
|
1332
|
+
headerClassName: w = "",
|
|
1320
1333
|
maxHeight: g = "70vh"
|
|
1321
1334
|
}) => {
|
|
1322
|
-
const [v,
|
|
1335
|
+
const [v, x] = R(!1), [b, k] = R(!1), f = i || O0[a], _ = {
|
|
1323
1336
|
width: typeof f == "number" ? `${f}px` : f,
|
|
1324
1337
|
maxWidth: "90vw",
|
|
1325
1338
|
backgroundColor: C
|
|
@@ -1330,11 +1343,11 @@ const X2 = ({
|
|
|
1330
1343
|
};
|
|
1331
1344
|
if (I(() => {
|
|
1332
1345
|
if (e)
|
|
1333
|
-
|
|
1346
|
+
x(!0), setTimeout(() => k(!0), 10), document.body.style.overflow = "hidden";
|
|
1334
1347
|
else {
|
|
1335
1348
|
k(!1);
|
|
1336
1349
|
const E = setTimeout(() => {
|
|
1337
|
-
|
|
1350
|
+
x(!1);
|
|
1338
1351
|
}, 200);
|
|
1339
1352
|
return document.body.style.overflow = "unset", () => clearTimeout(E);
|
|
1340
1353
|
}
|
|
@@ -1346,7 +1359,7 @@ const X2 = ({
|
|
|
1346
1359
|
document.removeEventListener("keydown", E);
|
|
1347
1360
|
};
|
|
1348
1361
|
}, [e, t, l]), !v) return null;
|
|
1349
|
-
const
|
|
1362
|
+
const B = () => {
|
|
1350
1363
|
c && t();
|
|
1351
1364
|
}, U = (E) => {
|
|
1352
1365
|
E.stopPropagation();
|
|
@@ -1355,26 +1368,26 @@ const X2 = ({
|
|
|
1355
1368
|
"div",
|
|
1356
1369
|
{
|
|
1357
1370
|
className: "fixed inset-0 z-50 overflow-y-auto",
|
|
1358
|
-
onClick:
|
|
1371
|
+
onClick: B,
|
|
1359
1372
|
children: [
|
|
1360
1373
|
/* @__PURE__ */ n(
|
|
1361
1374
|
"div",
|
|
1362
1375
|
{
|
|
1363
|
-
className: `fixed inset-0 transition-opacity duration-200 ease-out ${
|
|
1376
|
+
className: `fixed inset-0 transition-opacity duration-200 ease-out ${b ? "opacity-100" : "opacity-0"}`,
|
|
1364
1377
|
style: H
|
|
1365
1378
|
}
|
|
1366
1379
|
),
|
|
1367
1380
|
/* @__PURE__ */ n("div", { className: `flex min-h-full items-center justify-center p-4 ${p ? "items-center" : "items-start pt-20"}`, children: /* @__PURE__ */ u(
|
|
1368
1381
|
"div",
|
|
1369
1382
|
{
|
|
1370
|
-
className: `relative rounded-lg shadow-xl transition-all duration-200 ease-out overflow-y-auto ${
|
|
1383
|
+
className: `relative rounded-lg shadow-xl transition-all duration-200 ease-out overflow-y-auto ${b ? "opacity-100 scale-100 translate-y-0" : "opacity-0 scale-95 -translate-y-4"} ${d}`,
|
|
1371
1384
|
style: { ..._, maxHeight: typeof g == "number" ? `${g}px` : g },
|
|
1372
1385
|
onClick: U,
|
|
1373
1386
|
children: [
|
|
1374
1387
|
(r || l) && /* @__PURE__ */ u(
|
|
1375
1388
|
"div",
|
|
1376
1389
|
{
|
|
1377
|
-
className: `flex items-center justify-between px-6 py-4 border-b border-gray-200 ${
|
|
1390
|
+
className: `flex items-center justify-between px-6 py-4 border-b border-gray-200 ${w}`,
|
|
1378
1391
|
style: z,
|
|
1379
1392
|
children: [
|
|
1380
1393
|
r && /* @__PURE__ */ n("h3", { className: "text-lg font-semibold text-gray-900", children: r }),
|
|
@@ -1451,7 +1464,7 @@ const X2 = ({
|
|
|
1451
1464
|
md: "w-2 h-2",
|
|
1452
1465
|
lg: "w-2.5 h-2.5",
|
|
1453
1466
|
responsive: "w-1 h-1 sm:w-1.5 sm:h-1.5 md:w-2 md:h-2 lg:w-2.5 lg:h-2.5"
|
|
1454
|
-
},
|
|
1467
|
+
}, w = {
|
|
1455
1468
|
default: "bg-gray-600",
|
|
1456
1469
|
primary: "bg-[#EC615B]",
|
|
1457
1470
|
success: "bg-green-600",
|
|
@@ -1469,7 +1482,7 @@ const X2 = ({
|
|
|
1469
1482
|
md: "rounded-md",
|
|
1470
1483
|
lg: "rounded-lg",
|
|
1471
1484
|
full: "rounded-full"
|
|
1472
|
-
},
|
|
1485
|
+
}, x = {
|
|
1473
1486
|
...l && { backgroundColor: l },
|
|
1474
1487
|
...c && { color: c },
|
|
1475
1488
|
...p && { borderColor: p, borderWidth: "1px", borderStyle: "solid" },
|
|
@@ -1479,9 +1492,9 @@ const X2 = ({
|
|
|
1479
1492
|
"span",
|
|
1480
1493
|
{
|
|
1481
1494
|
className: `inline-flex items-center gap-1.5 font-medium transition-all duration-200 ${l ? "" : m[t]} ${L[r]} ${v[d]} ${a}`,
|
|
1482
|
-
style:
|
|
1495
|
+
style: x,
|
|
1483
1496
|
children: [
|
|
1484
|
-
o && /* @__PURE__ */ n("span", { className: `rounded-full ${y[r]} ${
|
|
1497
|
+
o && /* @__PURE__ */ n("span", { className: `rounded-full ${y[r]} ${w[t]}` }),
|
|
1485
1498
|
s && i === "left" && /* @__PURE__ */ n("span", { className: `inline-flex items-center ${g[r]}`, children: s }),
|
|
1486
1499
|
e,
|
|
1487
1500
|
s && i === "right" && /* @__PURE__ */ n("span", { className: `inline-flex items-center ${g[r]}`, children: s })
|
|
@@ -1502,7 +1515,7 @@ const X2 = ({
|
|
|
1502
1515
|
errorColor: d,
|
|
1503
1516
|
lineColor: C
|
|
1504
1517
|
}) => {
|
|
1505
|
-
const m = (
|
|
1518
|
+
const m = (x, b) => b.status ? b.status : x < t ? "finish" : x === t ? "process" : "wait", L = {
|
|
1506
1519
|
sm: "w-6 h-6",
|
|
1507
1520
|
md: "w-8 h-8",
|
|
1508
1521
|
lg: "w-10 h-10",
|
|
@@ -1512,31 +1525,31 @@ const X2 = ({
|
|
|
1512
1525
|
md: "text-base",
|
|
1513
1526
|
lg: "text-lg",
|
|
1514
1527
|
responsive: "text-xs sm:text-sm md:text-base lg:text-lg"
|
|
1515
|
-
},
|
|
1528
|
+
}, w = {
|
|
1516
1529
|
sm: "text-xs",
|
|
1517
1530
|
md: "text-sm",
|
|
1518
1531
|
lg: "text-base",
|
|
1519
1532
|
responsive: "text-xs sm:text-xs md:text-sm lg:text-base"
|
|
1520
|
-
}, g = (
|
|
1533
|
+
}, g = (x, b) => b || (x === "finish" ? /* @__PURE__ */ n("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
|
|
1521
1534
|
"path",
|
|
1522
1535
|
{
|
|
1523
1536
|
fillRule: "evenodd",
|
|
1524
1537
|
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
1525
1538
|
clipRule: "evenodd"
|
|
1526
1539
|
}
|
|
1527
|
-
) }) :
|
|
1540
|
+
) }) : x === "error" ? /* @__PURE__ */ n("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
|
|
1528
1541
|
"path",
|
|
1529
1542
|
{
|
|
1530
1543
|
fillRule: "evenodd",
|
|
1531
1544
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
1532
1545
|
clipRule: "evenodd"
|
|
1533
1546
|
}
|
|
1534
|
-
) }) : null), v = (
|
|
1535
|
-
const
|
|
1536
|
-
switch (
|
|
1547
|
+
) }) : null), v = (x) => {
|
|
1548
|
+
const b = s === "outline";
|
|
1549
|
+
switch (x) {
|
|
1537
1550
|
case "finish":
|
|
1538
1551
|
return {
|
|
1539
|
-
icon:
|
|
1552
|
+
icon: b ? `bg-white text-white border ${l ? `border-[${l}]` : "border-green-500"}` : `${l ? `bg-[${l}]` : "bg-green-500"} text-white ${l ? `border-[${l}]` : "border-green-500"}`,
|
|
1540
1553
|
title: "text-[#181918]",
|
|
1541
1554
|
description: "text-gray-600",
|
|
1542
1555
|
line: C ? `bg-[${C}]` : "bg-green-500",
|
|
@@ -1544,7 +1557,7 @@ const X2 = ({
|
|
|
1544
1557
|
};
|
|
1545
1558
|
case "process":
|
|
1546
1559
|
return {
|
|
1547
|
-
icon:
|
|
1560
|
+
icon: b ? `bg-white text-white border ${c ? `border-[${c}]` : "border-[#EC615B]"}` : `${c ? `bg-[${c}]` : "bg-[#EC615B]"} text-white ${c ? `border-[${c}]` : "border-[#EC615B]"}`,
|
|
1548
1561
|
title: "text-[#181918] font-semibold",
|
|
1549
1562
|
description: "text-gray-700",
|
|
1550
1563
|
line: C ? `bg-[${C}]` : "bg-gray-300",
|
|
@@ -1552,7 +1565,7 @@ const X2 = ({
|
|
|
1552
1565
|
};
|
|
1553
1566
|
case "error":
|
|
1554
1567
|
return {
|
|
1555
|
-
icon:
|
|
1568
|
+
icon: b ? `bg-white text-white border ${d ? `border-[${d}]` : "border-red-500"}` : `${d ? `bg-[${d}]` : "bg-red-500"} text-white ${d ? `border-[${d}]` : "border-red-500"}`,
|
|
1556
1569
|
title: "text-red-600",
|
|
1557
1570
|
description: "text-red-500",
|
|
1558
1571
|
line: C ? `bg-[${C}]` : "bg-gray-300",
|
|
@@ -1568,8 +1581,8 @@ const X2 = ({
|
|
|
1568
1581
|
};
|
|
1569
1582
|
}
|
|
1570
1583
|
};
|
|
1571
|
-
return r === "horizontal" ? /* @__PURE__ */ n("div", { className: `flex items-start ${i}`, style: a, children: e.map((
|
|
1572
|
-
const k = m(
|
|
1584
|
+
return r === "horizontal" ? /* @__PURE__ */ n("div", { className: `flex items-start ${i}`, style: a, children: e.map((x, b) => {
|
|
1585
|
+
const k = m(b, x), f = v(k), h = b === e.length - 1, _ = {};
|
|
1573
1586
|
return f.iconColor && (_.color = f.iconColor), /* @__PURE__ */ u("div", { className: "flex flex-1 items-start", children: [
|
|
1574
1587
|
/* @__PURE__ */ u("div", { className: "flex flex-col items-center", children: [
|
|
1575
1588
|
/* @__PURE__ */ n(
|
|
@@ -1577,7 +1590,7 @@ const X2 = ({
|
|
|
1577
1590
|
{
|
|
1578
1591
|
className: `flex items-center justify-center ${L[o]} rounded-full border transition-all duration-300 ${f.icon}`,
|
|
1579
1592
|
style: _,
|
|
1580
|
-
children: g(k,
|
|
1593
|
+
children: g(k, x.icon)
|
|
1581
1594
|
}
|
|
1582
1595
|
),
|
|
1583
1596
|
/* @__PURE__ */ u("div", { className: "mt-2 text-center", children: [
|
|
@@ -1585,14 +1598,14 @@ const X2 = ({
|
|
|
1585
1598
|
"div",
|
|
1586
1599
|
{
|
|
1587
1600
|
className: `${y[o]} ${f.title} transition-colors duration-300`,
|
|
1588
|
-
children:
|
|
1601
|
+
children: x.title
|
|
1589
1602
|
}
|
|
1590
1603
|
),
|
|
1591
|
-
|
|
1604
|
+
x.description && /* @__PURE__ */ n(
|
|
1592
1605
|
"div",
|
|
1593
1606
|
{
|
|
1594
|
-
className: `${
|
|
1595
|
-
children:
|
|
1607
|
+
className: `${w[o]} ${f.description} mt-1 transition-colors duration-300`,
|
|
1608
|
+
children: x.description
|
|
1596
1609
|
}
|
|
1597
1610
|
)
|
|
1598
1611
|
] })
|
|
@@ -1603,9 +1616,9 @@ const X2 = ({
|
|
|
1603
1616
|
className: `flex-1 h-0.5 mt-4 mx-2 ${f.line} transition-colors duration-300`
|
|
1604
1617
|
}
|
|
1605
1618
|
)
|
|
1606
|
-
] },
|
|
1607
|
-
}) }) : /* @__PURE__ */ n("div", { className: `flex flex-col ${i}`, style: a, children: e.map((
|
|
1608
|
-
const k = m(
|
|
1619
|
+
] }, b);
|
|
1620
|
+
}) }) : /* @__PURE__ */ n("div", { className: `flex flex-col ${i}`, style: a, children: e.map((x, b) => {
|
|
1621
|
+
const k = m(b, x), f = v(k), h = b === e.length - 1, _ = {};
|
|
1609
1622
|
return f.iconColor && (_.color = f.iconColor), /* @__PURE__ */ u("div", { className: "flex", children: [
|
|
1610
1623
|
/* @__PURE__ */ u("div", { className: "flex flex-col items-center mr-4", children: [
|
|
1611
1624
|
/* @__PURE__ */ n(
|
|
@@ -1613,7 +1626,7 @@ const X2 = ({
|
|
|
1613
1626
|
{
|
|
1614
1627
|
className: `flex items-center justify-center ${L[o]} rounded-full border transition-all duration-300 ${f.icon}`,
|
|
1615
1628
|
style: _,
|
|
1616
|
-
children: g(k,
|
|
1629
|
+
children: g(k, x.icon)
|
|
1617
1630
|
}
|
|
1618
1631
|
),
|
|
1619
1632
|
!h && /* @__PURE__ */ n(
|
|
@@ -1629,18 +1642,18 @@ const X2 = ({
|
|
|
1629
1642
|
"div",
|
|
1630
1643
|
{
|
|
1631
1644
|
className: `${y[o]} ${f.title} transition-colors duration-300`,
|
|
1632
|
-
children:
|
|
1645
|
+
children: x.title
|
|
1633
1646
|
}
|
|
1634
1647
|
),
|
|
1635
|
-
|
|
1648
|
+
x.description && /* @__PURE__ */ n(
|
|
1636
1649
|
"div",
|
|
1637
1650
|
{
|
|
1638
|
-
className: `${
|
|
1639
|
-
children:
|
|
1651
|
+
className: `${w[o]} ${f.description} mt-1 transition-colors duration-300`,
|
|
1652
|
+
children: x.description
|
|
1640
1653
|
}
|
|
1641
1654
|
)
|
|
1642
1655
|
] })
|
|
1643
|
-
] },
|
|
1656
|
+
] }, b);
|
|
1644
1657
|
}) });
|
|
1645
1658
|
}, Y1 = ({
|
|
1646
1659
|
percent: e = 0,
|
|
@@ -1662,7 +1675,7 @@ const X2 = ({
|
|
|
1662
1675
|
md: "h-2",
|
|
1663
1676
|
lg: "h-3",
|
|
1664
1677
|
responsive: "h-1.5 sm:h-2 md:h-3 lg:h-4"
|
|
1665
|
-
},
|
|
1678
|
+
}, w = {
|
|
1666
1679
|
sm: "text-xs",
|
|
1667
1680
|
md: "text-sm",
|
|
1668
1681
|
lg: "text-base",
|
|
@@ -1685,7 +1698,7 @@ const X2 = ({
|
|
|
1685
1698
|
default:
|
|
1686
1699
|
return L === 100 ? p || "bg-green-500" : c || "bg-[#EC615B]";
|
|
1687
1700
|
}
|
|
1688
|
-
},
|
|
1701
|
+
}, x = () => C || "bg-gray-200", b = () => t === "success" || L === 100 ? /* @__PURE__ */ n("svg", { className: "w-4 h-4 text-green-500", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
|
|
1689
1702
|
"path",
|
|
1690
1703
|
{
|
|
1691
1704
|
fillRule: "evenodd",
|
|
@@ -1704,7 +1717,7 @@ const X2 = ({
|
|
|
1704
1717
|
/* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
|
|
1705
1718
|
"div",
|
|
1706
1719
|
{
|
|
1707
|
-
className: `w-full overflow-hidden ${y[i]} ${g[m]} ${
|
|
1720
|
+
className: `w-full overflow-hidden ${y[i]} ${g[m]} ${x()}`,
|
|
1708
1721
|
style: { height: f },
|
|
1709
1722
|
children: /* @__PURE__ */ n(
|
|
1710
1723
|
"div",
|
|
@@ -1718,7 +1731,7 @@ const X2 = ({
|
|
|
1718
1731
|
)
|
|
1719
1732
|
}
|
|
1720
1733
|
) }),
|
|
1721
|
-
r && /* @__PURE__ */ n("div", { className: `flex items-center gap-1 ${
|
|
1734
|
+
r && /* @__PURE__ */ n("div", { className: `flex items-center gap-1 ${w[i]} text-gray-600 font-normal`, children: b() || k() })
|
|
1722
1735
|
] });
|
|
1723
1736
|
}, J1 = ({
|
|
1724
1737
|
checked: e,
|
|
@@ -1737,9 +1750,9 @@ const X2 = ({
|
|
|
1737
1750
|
checkedBorderColor: L = "#EC615B",
|
|
1738
1751
|
style: y
|
|
1739
1752
|
}) => {
|
|
1740
|
-
const [
|
|
1753
|
+
const [w, g] = R(t), v = e !== void 0, x = v ? e : w, b = (B) => {
|
|
1741
1754
|
if (o) return;
|
|
1742
|
-
const U =
|
|
1755
|
+
const U = B.target.checked;
|
|
1743
1756
|
v || g(U), r == null || r(U);
|
|
1744
1757
|
}, k = {
|
|
1745
1758
|
sm: "w-4 h-4",
|
|
@@ -1751,8 +1764,8 @@ const X2 = ({
|
|
|
1751
1764
|
md: "w-3.5 h-3.5",
|
|
1752
1765
|
lg: "w-4 h-4",
|
|
1753
1766
|
responsive: "w-2.5 h-2.5 sm:w-3.5 sm:h-3.5 lg:w-4 lg:h-4"
|
|
1754
|
-
}, h = a === "filled", _ = () => o ? "cursor-not-allowed opacity-50 border-gray-300 bg-gray-100" : !
|
|
1755
|
-
if (!o && !(!
|
|
1767
|
+
}, h = a === "filled", _ = () => o ? "cursor-not-allowed opacity-50 border-gray-300 bg-gray-100" : !x && !s ? "border-gray-300 bg-white hover:border-gray-400" : "", z = () => {
|
|
1768
|
+
if (!o && !(!x && !s))
|
|
1756
1769
|
return h ? {
|
|
1757
1770
|
borderColor: L,
|
|
1758
1771
|
backgroundColor: C
|
|
@@ -1760,7 +1773,7 @@ const X2 = ({
|
|
|
1760
1773
|
borderColor: L,
|
|
1761
1774
|
backgroundColor: m
|
|
1762
1775
|
};
|
|
1763
|
-
}, H = () => h && (
|
|
1776
|
+
}, H = () => h && (x || s) ? "text-white" : "";
|
|
1764
1777
|
return /* @__PURE__ */ u("div", { className: "inline-flex items-center", style: y, children: [
|
|
1765
1778
|
/* @__PURE__ */ n(
|
|
1766
1779
|
"input",
|
|
@@ -1769,8 +1782,8 @@ const X2 = ({
|
|
|
1769
1782
|
id: c,
|
|
1770
1783
|
name: p,
|
|
1771
1784
|
value: d,
|
|
1772
|
-
checked:
|
|
1773
|
-
onChange:
|
|
1785
|
+
checked: x,
|
|
1786
|
+
onChange: b,
|
|
1774
1787
|
disabled: o,
|
|
1775
1788
|
className: "sr-only"
|
|
1776
1789
|
}
|
|
@@ -1791,7 +1804,7 @@ const X2 = ({
|
|
|
1791
1804
|
`,
|
|
1792
1805
|
style: z(),
|
|
1793
1806
|
children: [
|
|
1794
|
-
|
|
1807
|
+
x && !s && /* @__PURE__ */ n(
|
|
1795
1808
|
"svg",
|
|
1796
1809
|
{
|
|
1797
1810
|
className: `${f[i]} ${H()}`,
|
|
@@ -1799,7 +1812,7 @@ const X2 = ({
|
|
|
1799
1812
|
stroke: "currentColor",
|
|
1800
1813
|
viewBox: "0 0 24 24",
|
|
1801
1814
|
strokeWidth: 3,
|
|
1802
|
-
style: !h && (
|
|
1815
|
+
style: !h && (x || s) ? { color: C } : void 0,
|
|
1803
1816
|
children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })
|
|
1804
1817
|
}
|
|
1805
1818
|
),
|
|
@@ -1809,7 +1822,7 @@ const X2 = ({
|
|
|
1809
1822
|
className: `${f[i]} ${H()}`,
|
|
1810
1823
|
fill: "currentColor",
|
|
1811
1824
|
viewBox: "0 0 24 24",
|
|
1812
|
-
style: !h && (
|
|
1825
|
+
style: !h && (x || s) ? { color: C } : void 0,
|
|
1813
1826
|
children: /* @__PURE__ */ n("rect", { x: "4", y: "11", width: "16", height: "2", rx: "1" })
|
|
1814
1827
|
}
|
|
1815
1828
|
)
|
|
@@ -1873,13 +1886,13 @@ const X2 = ({
|
|
|
1873
1886
|
rounded: L = "md",
|
|
1874
1887
|
style: y
|
|
1875
1888
|
}) => {
|
|
1876
|
-
const
|
|
1889
|
+
const w = D0(a), g = R0(L), v = "#F4F4F4", x = "#EBEBEB", b = "#181918", k = "#999999", f = "#9CA3AF", h = "#EC615B", _ = l || v, z = c || x, H = p || b, B = d || k, U = C || f, E = m || h;
|
|
1877
1890
|
return e.length === 0 ? /* @__PURE__ */ n(
|
|
1878
1891
|
"div",
|
|
1879
1892
|
{
|
|
1880
1893
|
className: `text-center py-8 text-gray-500 text-sm ${o}`,
|
|
1881
1894
|
style: {
|
|
1882
|
-
color:
|
|
1895
|
+
color: B,
|
|
1883
1896
|
...y
|
|
1884
1897
|
},
|
|
1885
1898
|
children: r
|
|
@@ -1887,7 +1900,7 @@ const X2 = ({
|
|
|
1887
1900
|
) : /* @__PURE__ */ n(
|
|
1888
1901
|
"div",
|
|
1889
1902
|
{
|
|
1890
|
-
className: `overflow-y-auto ${
|
|
1903
|
+
className: `overflow-y-auto ${w.container} ${o}`,
|
|
1891
1904
|
style: { maxHeight: i, ...y },
|
|
1892
1905
|
children: e.map((N, V) => /* @__PURE__ */ u(
|
|
1893
1906
|
"div",
|
|
@@ -1911,19 +1924,19 @@ const X2 = ({
|
|
|
1911
1924
|
S.currentTarget.style.backgroundColor = _;
|
|
1912
1925
|
},
|
|
1913
1926
|
children: [
|
|
1914
|
-
/* @__PURE__ */ u("div", { className: `flex-1 min-w-0 ${
|
|
1927
|
+
/* @__PURE__ */ u("div", { className: `flex-1 min-w-0 ${w.item}`, children: [
|
|
1915
1928
|
N.sublabel && /* @__PURE__ */ n(
|
|
1916
1929
|
"div",
|
|
1917
1930
|
{
|
|
1918
|
-
className: `font-normal mb-0.5 ${
|
|
1919
|
-
style: { color:
|
|
1931
|
+
className: `font-normal mb-0.5 ${w.sublabel}`,
|
|
1932
|
+
style: { color: B },
|
|
1920
1933
|
children: N.sublabel
|
|
1921
1934
|
}
|
|
1922
1935
|
),
|
|
1923
1936
|
/* @__PURE__ */ n(
|
|
1924
1937
|
"div",
|
|
1925
1938
|
{
|
|
1926
|
-
className: `font-medium truncate ${
|
|
1939
|
+
className: `font-medium truncate ${w.label}`,
|
|
1927
1940
|
style: { color: H },
|
|
1928
1941
|
children: N.label
|
|
1929
1942
|
}
|
|
@@ -1940,7 +1953,7 @@ const X2 = ({
|
|
|
1940
1953
|
hover:scale-110
|
|
1941
1954
|
active:scale-95
|
|
1942
1955
|
focus:outline-none focus:ring-2 focus:ring-opacity-50
|
|
1943
|
-
${
|
|
1956
|
+
${w.button}
|
|
1944
1957
|
`,
|
|
1945
1958
|
style: {
|
|
1946
1959
|
color: U
|
|
@@ -1955,7 +1968,7 @@ const X2 = ({
|
|
|
1955
1968
|
children: /* @__PURE__ */ n(
|
|
1956
1969
|
"svg",
|
|
1957
1970
|
{
|
|
1958
|
-
className:
|
|
1971
|
+
className: w.icon,
|
|
1959
1972
|
fill: "none",
|
|
1960
1973
|
stroke: "currentColor",
|
|
1961
1974
|
viewBox: "0 0 24 24",
|
|
@@ -2164,34 +2177,34 @@ const e0 = ({
|
|
|
2164
2177
|
const [p, d] = R(Array(e).fill("")), C = i2([]);
|
|
2165
2178
|
I(() => {
|
|
2166
2179
|
if (t) {
|
|
2167
|
-
const
|
|
2180
|
+
const w = t.split("").slice(0, e), g = [...w, ...Array(e - w.length).fill("")];
|
|
2168
2181
|
d(g);
|
|
2169
2182
|
}
|
|
2170
2183
|
}, [t, e]);
|
|
2171
|
-
const m = (
|
|
2172
|
-
var
|
|
2184
|
+
const m = (w, g) => {
|
|
2185
|
+
var b;
|
|
2173
2186
|
if (g && !/^\d+$/.test(g)) return;
|
|
2174
2187
|
const v = [...p];
|
|
2175
|
-
v[
|
|
2176
|
-
const
|
|
2177
|
-
r == null || r(
|
|
2178
|
-
}, L = (
|
|
2188
|
+
v[w] = g.slice(-1), d(v);
|
|
2189
|
+
const x = v.join("");
|
|
2190
|
+
r == null || r(x), g && w < e - 1 && ((b = C.current[w + 1]) == null || b.focus()), v.every((k) => k !== "") && (s == null || s(x));
|
|
2191
|
+
}, L = (w, g) => {
|
|
2179
2192
|
var v;
|
|
2180
|
-
g.key === "Backspace" && !p[
|
|
2181
|
-
}, y = (
|
|
2193
|
+
g.key === "Backspace" && !p[w] && w > 0 && ((v = C.current[w - 1]) == null || v.focus());
|
|
2194
|
+
}, y = (w) => {
|
|
2182
2195
|
var f;
|
|
2183
|
-
|
|
2184
|
-
const g =
|
|
2196
|
+
w.preventDefault();
|
|
2197
|
+
const g = w.clipboardData.getData("text/plain");
|
|
2185
2198
|
if (!/^\d+$/.test(g)) return;
|
|
2186
|
-
const v = g.split("").slice(0, e),
|
|
2187
|
-
d(
|
|
2188
|
-
const
|
|
2189
|
-
r == null || r(
|
|
2199
|
+
const v = g.split("").slice(0, e), x = [...v, ...Array(e - v.length).fill("")];
|
|
2200
|
+
d(x);
|
|
2201
|
+
const b = x.join("");
|
|
2202
|
+
r == null || r(b);
|
|
2190
2203
|
const k = Math.min(v.length, e - 1);
|
|
2191
|
-
(f = C.current[k]) == null || f.focus(),
|
|
2204
|
+
(f = C.current[k]) == null || f.focus(), x.every((h) => h !== "") && (s == null || s(b));
|
|
2192
2205
|
};
|
|
2193
2206
|
return /* @__PURE__ */ u("div", { className: "w-full", children: [
|
|
2194
|
-
/* @__PURE__ */ n("div", { className: `flex gap-2 justify-center ${c}`, onBlur: o, children: p.map((
|
|
2207
|
+
/* @__PURE__ */ n("div", { className: `flex gap-2 justify-center ${c}`, onBlur: o, children: p.map((w, g) => /* @__PURE__ */ u(M.Fragment, { children: [
|
|
2195
2208
|
/* @__PURE__ */ n(
|
|
2196
2209
|
t2,
|
|
2197
2210
|
{
|
|
@@ -2199,7 +2212,7 @@ const e0 = ({
|
|
|
2199
2212
|
C.current[g] = v;
|
|
2200
2213
|
},
|
|
2201
2214
|
placeholder: "",
|
|
2202
|
-
value:
|
|
2215
|
+
value: w,
|
|
2203
2216
|
onChange: (v) => m(g, v.target.value),
|
|
2204
2217
|
onKeyDown: (v) => L(g, v),
|
|
2205
2218
|
onPaste: y,
|
|
@@ -2268,7 +2281,7 @@ const e0 = ({
|
|
|
2268
2281
|
onChange: C,
|
|
2269
2282
|
...m
|
|
2270
2283
|
}, L) => {
|
|
2271
|
-
const y = t ? "phone-input-error-state" : "", [
|
|
2284
|
+
const y = t ? "phone-input-error-state" : "", [w, g] = R("");
|
|
2272
2285
|
I(() => {
|
|
2273
2286
|
if (d !== void 0) {
|
|
2274
2287
|
const f = String(d).replace(/\D/g, ""), h = v(f);
|
|
@@ -2283,13 +2296,13 @@ const e0 = ({
|
|
|
2283
2296
|
return h;
|
|
2284
2297
|
let _ = "";
|
|
2285
2298
|
return c === "spaced" ? h.length <= 3 ? _ = h : h.length <= 6 ? _ = `${h.slice(0, 3)} ${h.slice(3)}` : _ = `${h.slice(0, 3)} ${h.slice(3, 6)} ${h.slice(6, 10)}` : c === "dashed" ? h.length <= 3 ? _ = h : h.length <= 6 ? _ = `${h.slice(0, 3)}-${h.slice(3)}` : _ = `${h.slice(0, 3)}-${h.slice(3, 6)}-${h.slice(6, 10)}` : s === "+1" ? h.length <= 3 ? _ = h : h.length <= 6 ? _ = `(${h.slice(0, 3)}) ${h.slice(3)}` : _ = `(${h.slice(0, 3)}) ${h.slice(3, 6)}-${h.slice(6, 10)}` : h.length <= 3 ? _ = h : h.length <= 6 ? _ = `${h.slice(0, 3)} ${h.slice(3)}` : _ = `${h.slice(0, 3)} ${h.slice(3, 6)} ${h.slice(6, 10)}`, _;
|
|
2286
|
-
},
|
|
2299
|
+
}, x = (f) => {
|
|
2287
2300
|
var h;
|
|
2288
2301
|
!/^\d$/.test(f.key) && f.key !== "Backspace" && f.key !== "Delete" && f.key !== "Tab" && f.key !== "ArrowLeft" && f.key !== "ArrowRight" && f.key !== "Home" && f.key !== "End" && f.preventDefault(), (h = m.onKeyDown) == null || h.call(m, f);
|
|
2289
|
-
},
|
|
2302
|
+
}, b = (f) => {
|
|
2290
2303
|
const h = f.target, _ = h.selectionStart || 0, z = h.value.replace(/\D/g, ""), H = v(z);
|
|
2291
2304
|
g(H);
|
|
2292
|
-
const
|
|
2305
|
+
const B = w.length, E = H.length - B;
|
|
2293
2306
|
if (requestAnimationFrame(() => {
|
|
2294
2307
|
const N = Math.max(0, Math.min(_ + E, H.length));
|
|
2295
2308
|
h.setSelectionRange(N, N);
|
|
@@ -2303,7 +2316,7 @@ const e0 = ({
|
|
|
2303
2316
|
}, k = (f) => {
|
|
2304
2317
|
var N;
|
|
2305
2318
|
f.preventDefault();
|
|
2306
|
-
const _ = f.clipboardData.getData("text/plain").replace(/\D/g, ""), H = f.target.selectionStart || 0, U =
|
|
2319
|
+
const _ = f.clipboardData.getData("text/plain").replace(/\D/g, ""), H = f.target.selectionStart || 0, U = w.replace(/\D/g, "").slice(0, H) + _, E = v(U);
|
|
2307
2320
|
if (g(E), C) {
|
|
2308
2321
|
const V = {
|
|
2309
2322
|
...f,
|
|
@@ -2398,10 +2411,10 @@ const e0 = ({
|
|
|
2398
2411
|
{
|
|
2399
2412
|
...m,
|
|
2400
2413
|
ref: L,
|
|
2401
|
-
value:
|
|
2414
|
+
value: w,
|
|
2402
2415
|
className: o,
|
|
2403
|
-
onKeyDown:
|
|
2404
|
-
onChange:
|
|
2416
|
+
onKeyDown: x,
|
|
2417
|
+
onChange: b,
|
|
2405
2418
|
onPaste: k,
|
|
2406
2419
|
style: {
|
|
2407
2420
|
flex: 1,
|
|
@@ -2461,9 +2474,9 @@ const F2 = M.forwardRef(({
|
|
|
2461
2474
|
...p
|
|
2462
2475
|
}, d) => {
|
|
2463
2476
|
const C = t ? "currency-input-error-state" : "", [m, L] = R(""), y = (v) => {
|
|
2464
|
-
const
|
|
2477
|
+
const b = v.replace(/[^\d.]/g, "").split("."), k = b[0], f = b[1], h = k.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
2465
2478
|
return f !== void 0 ? `${h}.${f}` : h;
|
|
2466
|
-
},
|
|
2479
|
+
}, w = (v) => v.replace(/,/g, "");
|
|
2467
2480
|
I(() => {
|
|
2468
2481
|
if (c !== void 0) {
|
|
2469
2482
|
const v = String(c);
|
|
@@ -2471,12 +2484,12 @@ const F2 = M.forwardRef(({
|
|
|
2471
2484
|
}
|
|
2472
2485
|
}, [c, a]);
|
|
2473
2486
|
const g = (v) => {
|
|
2474
|
-
const
|
|
2487
|
+
const x = v.target.value;
|
|
2475
2488
|
if (a) {
|
|
2476
|
-
const
|
|
2477
|
-
L(k), l && l(
|
|
2489
|
+
const b = w(x), k = y(b);
|
|
2490
|
+
L(k), l && l(b, v);
|
|
2478
2491
|
} else
|
|
2479
|
-
L(
|
|
2492
|
+
L(x), l && l(x, v);
|
|
2480
2493
|
};
|
|
2481
2494
|
return /* @__PURE__ */ u("div", { className: "w-full", children: [
|
|
2482
2495
|
e && /* @__PURE__ */ u(
|
|
@@ -2742,14 +2755,14 @@ const J0 = {
|
|
|
2742
2755
|
whitesmoke: "9lhpx",
|
|
2743
2756
|
yellow: "9zl6o",
|
|
2744
2757
|
yellowgreen: "61fzm"
|
|
2745
|
-
},
|
|
2758
|
+
}, Z = Math.round;
|
|
2746
2759
|
function u2(e, t) {
|
|
2747
2760
|
const r = e.replace(/^[^(]*\((.*)/, "$1").replace(/\).*/, "").match(/\d*\.?\d+%?/g) || [], o = r.map((s) => parseFloat(s));
|
|
2748
2761
|
for (let s = 0; s < 3; s += 1)
|
|
2749
2762
|
o[s] = t(o[s] || 0, r[s] || "", s);
|
|
2750
2763
|
return r[3] ? o[3] = r[3].includes("%") ? o[3] / 100 : o[3] : o[3] = 1, o;
|
|
2751
2764
|
}
|
|
2752
|
-
const
|
|
2765
|
+
const B2 = (e, t, r) => r === 0 ? e : e / 100;
|
|
2753
2766
|
function J(e, t) {
|
|
2754
2767
|
const r = t || 255;
|
|
2755
2768
|
return e > r ? r : e < 0 ? 0 : e;
|
|
@@ -2853,7 +2866,7 @@ class T {
|
|
|
2853
2866
|
getHue() {
|
|
2854
2867
|
if (typeof this._h > "u") {
|
|
2855
2868
|
const t = this.getMax() - this.getMin();
|
|
2856
|
-
t === 0 ? this._h = 0 : this._h =
|
|
2869
|
+
t === 0 ? this._h = 0 : this._h = Z(60 * (this.r === this.getMax() ? (this.g - this.b) / t + (this.g < this.b ? 6 : 0) : this.g === this.getMax() ? (this.b - this.r) / t + 2 : (this.r - this.g) / t + 4));
|
|
2857
2870
|
}
|
|
2858
2871
|
return this._h;
|
|
2859
2872
|
}
|
|
@@ -2923,10 +2936,10 @@ class T {
|
|
|
2923
2936
|
*/
|
|
2924
2937
|
mix(t, r = 50) {
|
|
2925
2938
|
const o = this._c(t), s = r / 100, i = (l) => (o[l] - this[l]) * s + this[l], a = {
|
|
2926
|
-
r:
|
|
2927
|
-
g:
|
|
2928
|
-
b:
|
|
2929
|
-
a:
|
|
2939
|
+
r: Z(i("r")),
|
|
2940
|
+
g: Z(i("g")),
|
|
2941
|
+
b: Z(i("b")),
|
|
2942
|
+
a: Z(i("a") * 100) / 100
|
|
2930
2943
|
};
|
|
2931
2944
|
return this._c(a);
|
|
2932
2945
|
}
|
|
@@ -2955,7 +2968,7 @@ class T {
|
|
|
2955
2968
|
}, t);
|
|
2956
2969
|
}
|
|
2957
2970
|
onBackground(t) {
|
|
2958
|
-
const r = this._c(t), o = this.a + r.a * (1 - this.a), s = (i) =>
|
|
2971
|
+
const r = this._c(t), o = this.a + r.a * (1 - this.a), s = (i) => Z((this[i] * this.a + r[i] * r.a * (1 - this.a)) / o);
|
|
2959
2972
|
return this._c({
|
|
2960
2973
|
r: s("r"),
|
|
2961
2974
|
g: s("g"),
|
|
@@ -2986,7 +2999,7 @@ class T {
|
|
|
2986
2999
|
t += o.length === 2 ? o : "0" + o;
|
|
2987
3000
|
const s = (this.b || 0).toString(16);
|
|
2988
3001
|
if (t += s.length === 2 ? s : "0" + s, typeof this.a == "number" && this.a >= 0 && this.a < 1) {
|
|
2989
|
-
const i =
|
|
3002
|
+
const i = Z(this.a * 255).toString(16);
|
|
2990
3003
|
t += i.length === 2 ? i : "0" + i;
|
|
2991
3004
|
}
|
|
2992
3005
|
return t;
|
|
@@ -3002,7 +3015,7 @@ class T {
|
|
|
3002
3015
|
}
|
|
3003
3016
|
/** CSS support color pattern */
|
|
3004
3017
|
toHslString() {
|
|
3005
|
-
const t = this.getHue(), r =
|
|
3018
|
+
const t = this.getHue(), r = Z(this.getHSLSaturation() * 100), o = Z(this.getLightness() * 100);
|
|
3006
3019
|
return this.a !== 1 ? `hsla(${t},${r}%,${o}%,${this.a})` : `hsl(${t},${r}%,${o}%)`;
|
|
3007
3020
|
}
|
|
3008
3021
|
/** Same as toHsb */
|
|
@@ -3058,7 +3071,7 @@ class T {
|
|
|
3058
3071
|
}) {
|
|
3059
3072
|
const i = (t % 360 + 360) % 360;
|
|
3060
3073
|
if (this._h = i, this._hsl_s = r, this._l = o, this.a = typeof s == "number" ? s : 1, r <= 0) {
|
|
3061
|
-
const L =
|
|
3074
|
+
const L = Z(o * 255);
|
|
3062
3075
|
this.r = L, this.g = L, this.b = L;
|
|
3063
3076
|
return;
|
|
3064
3077
|
}
|
|
@@ -3066,7 +3079,7 @@ class T {
|
|
|
3066
3079
|
const p = i / 60, d = (1 - Math.abs(2 * o - 1)) * r, C = d * (1 - Math.abs(p % 2 - 1));
|
|
3067
3080
|
p >= 0 && p < 1 ? (a = d, l = C) : p >= 1 && p < 2 ? (a = C, l = d) : p >= 2 && p < 3 ? (l = d, c = C) : p >= 3 && p < 4 ? (l = C, c = d) : p >= 4 && p < 5 ? (a = C, c = d) : p >= 5 && p < 6 && (a = d, c = C);
|
|
3068
3081
|
const m = o - d / 2;
|
|
3069
|
-
this.r =
|
|
3082
|
+
this.r = Z((a + m) * 255), this.g = Z((l + m) * 255), this.b = Z((c + m) * 255);
|
|
3070
3083
|
}
|
|
3071
3084
|
fromHsv({
|
|
3072
3085
|
h: t,
|
|
@@ -3076,10 +3089,10 @@ class T {
|
|
|
3076
3089
|
}) {
|
|
3077
3090
|
const i = (t % 360 + 360) % 360;
|
|
3078
3091
|
this._h = i, this._hsv_s = r, this._v = o, this.a = typeof s == "number" ? s : 1;
|
|
3079
|
-
const a =
|
|
3092
|
+
const a = Z(o * 255);
|
|
3080
3093
|
if (this.r = a, this.g = a, this.b = a, r <= 0)
|
|
3081
3094
|
return;
|
|
3082
|
-
const l = i / 60, c = Math.floor(l), p = l - c, d =
|
|
3095
|
+
const l = i / 60, c = Math.floor(l), p = l - c, d = Z(o * (1 - r) * 255), C = Z(o * (1 - r * p) * 255), m = Z(o * (1 - r * (1 - p)) * 255);
|
|
3083
3096
|
switch (c) {
|
|
3084
3097
|
case 0:
|
|
3085
3098
|
this.g = m, this.b = d;
|
|
@@ -3103,7 +3116,7 @@ class T {
|
|
|
3103
3116
|
}
|
|
3104
3117
|
}
|
|
3105
3118
|
fromHsvString(t) {
|
|
3106
|
-
const r = u2(t,
|
|
3119
|
+
const r = u2(t, B2);
|
|
3107
3120
|
this.fromHsv({
|
|
3108
3121
|
h: r[0],
|
|
3109
3122
|
s: r[1],
|
|
@@ -3112,7 +3125,7 @@ class T {
|
|
|
3112
3125
|
});
|
|
3113
3126
|
}
|
|
3114
3127
|
fromHslString(t) {
|
|
3115
|
-
const r = u2(t,
|
|
3128
|
+
const r = u2(t, B2);
|
|
3116
3129
|
this.fromHsl({
|
|
3117
3130
|
h: r[0],
|
|
3118
3131
|
s: r[1],
|
|
@@ -3123,12 +3136,12 @@ class T {
|
|
|
3123
3136
|
fromRgbString(t) {
|
|
3124
3137
|
const r = u2(t, (o, s) => (
|
|
3125
3138
|
// Convert percentage to number. e.g. 50% -> 128
|
|
3126
|
-
s.includes("%") ?
|
|
3139
|
+
s.includes("%") ? Z(o / 100 * 255) : o
|
|
3127
3140
|
));
|
|
3128
3141
|
this.r = r[0], this.g = r[1], this.b = r[2], this.a = r[3];
|
|
3129
3142
|
}
|
|
3130
3143
|
}
|
|
3131
|
-
const o2 = 2,
|
|
3144
|
+
const o2 = 2, Z2 = 0.16, X0 = 0.05, e1 = 0.05, t1 = 0.15, o0 = 5, s0 = 4, r1 = [{
|
|
3132
3145
|
index: 7,
|
|
3133
3146
|
amount: 15
|
|
3134
3147
|
}, {
|
|
@@ -3167,7 +3180,7 @@ function D2(e, t, r) {
|
|
|
3167
3180
|
if (e.h === 0 && e.s === 0)
|
|
3168
3181
|
return e.s;
|
|
3169
3182
|
let o;
|
|
3170
|
-
return r ? o = e.s -
|
|
3183
|
+
return r ? o = e.s - Z2 * t : t === s0 ? o = e.s + Z2 : o = e.s + X0 * t, o > 1 && (o = 1), r && t === o0 && o > 0.1 && (o = 0.1), o < 0.06 && (o = 0.06), Math.round(o * 100) / 100;
|
|
3171
3184
|
}
|
|
3172
3185
|
function R2(e, t, r) {
|
|
3173
3186
|
let o;
|
|
@@ -3537,7 +3550,7 @@ const l2 = /* @__PURE__ */ A.forwardRef((e, t) => {
|
|
|
3537
3550
|
const y = i ? {
|
|
3538
3551
|
msTransform: `rotate(${i}deg)`,
|
|
3539
3552
|
transform: `rotate(${i}deg)`
|
|
3540
|
-
} : void 0, [
|
|
3553
|
+
} : void 0, [w, g] = d0(c);
|
|
3541
3554
|
return /* @__PURE__ */ A.createElement("span", x2({
|
|
3542
3555
|
role: "img",
|
|
3543
3556
|
"aria-label": o.name
|
|
@@ -3548,7 +3561,7 @@ const l2 = /* @__PURE__ */ A.forwardRef((e, t) => {
|
|
|
3548
3561
|
className: m
|
|
3549
3562
|
}), /* @__PURE__ */ A.createElement(q, {
|
|
3550
3563
|
icon: o,
|
|
3551
|
-
primaryColor:
|
|
3564
|
+
primaryColor: w,
|
|
3552
3565
|
secondaryColor: g,
|
|
3553
3566
|
style: y
|
|
3554
3567
|
}));
|
|
@@ -4065,11 +4078,11 @@ const t3 = ({
|
|
|
4065
4078
|
boxShadow: "0 0 0 0 rgba(0, 0, 0, 0)",
|
|
4066
4079
|
transition: "all 0.3s ease-in-out"
|
|
4067
4080
|
},
|
|
4068
|
-
onMouseEnter: (
|
|
4069
|
-
|
|
4081
|
+
onMouseEnter: (w) => {
|
|
4082
|
+
w.currentTarget.style.boxShadow = "0 0 24px 0 rgba(0, 0, 0, 0.15)";
|
|
4070
4083
|
},
|
|
4071
|
-
onMouseLeave: (
|
|
4072
|
-
|
|
4084
|
+
onMouseLeave: (w) => {
|
|
4085
|
+
w.currentTarget.style.boxShadow = "0 0 0 0 rgba(0, 0, 0, 0)";
|
|
4073
4086
|
},
|
|
4074
4087
|
children: [
|
|
4075
4088
|
l !== "none" && /* @__PURE__ */ n(
|
|
@@ -4321,7 +4334,7 @@ export {
|
|
|
4321
4334
|
q0 as PhoneInput,
|
|
4322
4335
|
Y1 as Progress,
|
|
4323
4336
|
I1 as SearchInput,
|
|
4324
|
-
|
|
4337
|
+
B0 as Select,
|
|
4325
4338
|
X1 as SelectedItemsList,
|
|
4326
4339
|
P1 as StatCard,
|
|
4327
4340
|
Q1 as Steps,
|