shekel-fe-shared-lib 1.0.9 → 1.0.10
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 +13 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +181 -180
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5,11 +5,11 @@ const ee = ({
|
|
|
5
5
|
size: a = "md",
|
|
6
6
|
fullWidth: n = !1,
|
|
7
7
|
icon: t,
|
|
8
|
-
iconPosition:
|
|
8
|
+
iconPosition: i = "left",
|
|
9
9
|
loading: u = !1,
|
|
10
10
|
hoverColor: $,
|
|
11
|
-
bgColor:
|
|
12
|
-
textColor:
|
|
11
|
+
bgColor: d,
|
|
12
|
+
textColor: l,
|
|
13
13
|
borderColor: m,
|
|
14
14
|
hoverBgColor: g,
|
|
15
15
|
hoverTextColor: x,
|
|
@@ -17,10 +17,10 @@ const ee = ({
|
|
|
17
17
|
style: h,
|
|
18
18
|
className: r = "",
|
|
19
19
|
children: w,
|
|
20
|
-
disabled:
|
|
20
|
+
disabled: c,
|
|
21
21
|
...y
|
|
22
22
|
}) => {
|
|
23
|
-
const
|
|
23
|
+
const o = "inline-flex items-center justify-center font-normal transition-all duration-300 ease-out focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed active:scale-95", f = {
|
|
24
24
|
primary: "bg-[#EC615B] hover:bg-[#D4554F] text-white focus:ring-[#EC615B] shadow-sm hover:shadow-md",
|
|
25
25
|
outlined: "border border-gray-300 bg-white hover:bg-gray-50 text-[#181918] focus:ring-gray-300",
|
|
26
26
|
ghost: "bg-gray-100 hover:bg-gray-200 text-[#181918] focus:ring-gray-300",
|
|
@@ -38,8 +38,8 @@ const ee = ({
|
|
|
38
38
|
full: "rounded-full"
|
|
39
39
|
}, B = n ? "w-full" : "";
|
|
40
40
|
let k = f[s];
|
|
41
|
-
(
|
|
42
|
-
const T = `${
|
|
41
|
+
(d || l || m) && (k = "");
|
|
42
|
+
const T = `${o} ${k} ${N[a]} ${p[b]} ${B} ${r}`, P = () => u ? /* @__PURE__ */ C(
|
|
43
43
|
"svg",
|
|
44
44
|
{
|
|
45
45
|
className: "animate-spin h-4 w-4",
|
|
@@ -71,23 +71,23 @@ const ee = ({
|
|
|
71
71
|
) : t, L = {
|
|
72
72
|
...h
|
|
73
73
|
};
|
|
74
|
-
return
|
|
74
|
+
return d && (L.backgroundColor = d), l && (L.color = l), m && (L.borderColor = m), /* @__PURE__ */ C(
|
|
75
75
|
"button",
|
|
76
76
|
{
|
|
77
77
|
className: T,
|
|
78
|
-
disabled:
|
|
78
|
+
disabled: c || u,
|
|
79
79
|
style: L,
|
|
80
80
|
onMouseEnter: (M) => {
|
|
81
|
-
!
|
|
81
|
+
!c && !u && (g ? M.currentTarget.style.backgroundColor = g : $ && (M.currentTarget.style.backgroundColor = $), x && (M.currentTarget.style.color = x));
|
|
82
82
|
},
|
|
83
83
|
onMouseLeave: (M) => {
|
|
84
|
-
!
|
|
84
|
+
!c && !u && ((d || g || $) && (M.currentTarget.style.backgroundColor = d || ""), (l || x) && (M.currentTarget.style.color = l || ""));
|
|
85
85
|
},
|
|
86
86
|
...y,
|
|
87
87
|
children: [
|
|
88
|
-
|
|
88
|
+
i === "left" && P(),
|
|
89
89
|
w,
|
|
90
|
-
|
|
90
|
+
i === "right" && P()
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
93
|
);
|
|
@@ -96,11 +96,11 @@ const ee = ({
|
|
|
96
96
|
value: a,
|
|
97
97
|
selected: n = !1,
|
|
98
98
|
onClick: t,
|
|
99
|
-
className:
|
|
99
|
+
className: i = "",
|
|
100
100
|
size: u = "responsive",
|
|
101
101
|
rounded: $ = "md",
|
|
102
|
-
bgColor:
|
|
103
|
-
borderColor:
|
|
102
|
+
bgColor: d,
|
|
103
|
+
borderColor: l,
|
|
104
104
|
labelColor: m,
|
|
105
105
|
valueColor: g,
|
|
106
106
|
selectedBgColor: x,
|
|
@@ -109,7 +109,7 @@ const ee = ({
|
|
|
109
109
|
selectedValueColor: r,
|
|
110
110
|
style: w
|
|
111
111
|
}) => {
|
|
112
|
-
const
|
|
112
|
+
const c = () => {
|
|
113
113
|
switch (u) {
|
|
114
114
|
case "sm":
|
|
115
115
|
return "p-2 sm:p-3";
|
|
@@ -139,7 +139,7 @@ const ee = ({
|
|
|
139
139
|
default:
|
|
140
140
|
return "rounded-md";
|
|
141
141
|
}
|
|
142
|
-
},
|
|
142
|
+
}, o = () => {
|
|
143
143
|
switch (u) {
|
|
144
144
|
case "sm":
|
|
145
145
|
return "text-xs sm:text-xs";
|
|
@@ -165,16 +165,16 @@ const ee = ({
|
|
|
165
165
|
default:
|
|
166
166
|
return "text-3xl";
|
|
167
167
|
}
|
|
168
|
-
}, P = `${`stat-card relative flex flex-col ${
|
|
168
|
+
}, P = `${`stat-card relative flex flex-col ${c()} ${y()} border transition-all duration-500 ease-in-out cursor-pointer overflow-hidden`} ${n ? "border-[#181918] bg-[#F4F4F4] shadow-sm scale-[1.02]" : `${l ? "" : "border-gray-200"} ${d ? "" : "bg-white"} ${!d && !l ? "hover:border-gray-300 hover:shadow-sm" : ""}`} ${i}`, L = {
|
|
169
169
|
...w
|
|
170
170
|
};
|
|
171
|
-
return n && x ? L.backgroundColor = x : !n &&
|
|
171
|
+
return n && x ? L.backgroundColor = x : !n && d && (L.backgroundColor = d), n && b ? L.borderColor = b : !n && l && (L.borderColor = l), /* @__PURE__ */ C("div", { className: P, onClick: t, style: L, children: [
|
|
172
172
|
n && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-[#EC615B]/5 to-transparent animate-slide-in pointer-events-none" }),
|
|
173
173
|
/* @__PURE__ */ C("div", { className: "relative z-10 transition-transform duration-300 ease-out hover:scale-[0.98] active:scale-[0.96]", children: [
|
|
174
174
|
/* @__PURE__ */ e(
|
|
175
175
|
"span",
|
|
176
176
|
{
|
|
177
|
-
className: `${
|
|
177
|
+
className: `${o()} font-normal mb-2 block transition-colors duration-500 ${n ? "text-gray-700" : "text-gray-600"}`,
|
|
178
178
|
style: n && h ? { color: h } : !n && m ? { color: m } : void 0,
|
|
179
179
|
children: s
|
|
180
180
|
}
|
|
@@ -194,11 +194,11 @@ const ee = ({
|
|
|
194
194
|
iconPosition: a = "left",
|
|
195
195
|
size: n = "md",
|
|
196
196
|
fullWidth: t = !1,
|
|
197
|
-
className:
|
|
197
|
+
className: i = "",
|
|
198
198
|
onIconClick: u,
|
|
199
199
|
bgColor: $,
|
|
200
|
-
borderColor:
|
|
201
|
-
focusBorderColor:
|
|
200
|
+
borderColor: d,
|
|
201
|
+
focusBorderColor: l,
|
|
202
202
|
iconColor: m,
|
|
203
203
|
textColor: g,
|
|
204
204
|
placeholderColor: x,
|
|
@@ -206,12 +206,12 @@ const ee = ({
|
|
|
206
206
|
style: h,
|
|
207
207
|
...r
|
|
208
208
|
}) => {
|
|
209
|
-
const w = "relative inline-flex items-center",
|
|
209
|
+
const w = "relative inline-flex items-center", c = "border focus:outline-none focus:ring-1 transition-all duration-200 ease-in-out", y = {
|
|
210
210
|
sm: "px-3 py-1.5 text-sm",
|
|
211
211
|
md: "px-4 py-2 text-base",
|
|
212
212
|
lg: "px-5 py-3 text-lg",
|
|
213
213
|
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"
|
|
214
|
-
},
|
|
214
|
+
}, o = {
|
|
215
215
|
sm: "w-4 h-4",
|
|
216
216
|
md: "w-5 h-5",
|
|
217
217
|
lg: "w-6 h-6",
|
|
@@ -224,13 +224,13 @@ const ee = ({
|
|
|
224
224
|
full: "rounded-full"
|
|
225
225
|
}, N = a === "left" ? n === "sm" ? "pl-9" : n === "md" ? "pl-10" : n === "lg" ? "pl-12" : "pl-9 sm:pl-10 md:pl-12" : n === "sm" ? "pr-9" : n === "md" ? "pr-10" : n === "lg" ? "pr-12" : "pr-9 sm:pr-10 md:pr-12", p = t ? "w-full" : "", B = {
|
|
226
226
|
backgroundColor: $,
|
|
227
|
-
borderColor:
|
|
227
|
+
borderColor: d || "#D1D5DB",
|
|
228
228
|
color: g,
|
|
229
229
|
...h
|
|
230
|
-
}, k = x ? "" : "placeholder:text-gray-400", T =
|
|
230
|
+
}, k = x ? "" : "placeholder:text-gray-400", T = d ? "" : "border-gray-300", P = g ? "" : "text-gray-900", L = l ? "" : "focus:ring-[#EC615B] focus:border-[#EC615B]", M = `${c} ${!i.includes("px-") && !i.includes("py-") ? y[n] : ""} ${s ? N : ""} ${p} ${i.includes("rounded") ? "" : f[b]} ${i.includes("border-") ? "" : T} ${P} ${L} ${k} ${i}`, F = a === "left" ? "left-3" : "right-3", j = m || "text-gray-400", S = m ? "" : "hover:text-gray-600", E = /* @__PURE__ */ e(
|
|
231
231
|
"svg",
|
|
232
232
|
{
|
|
233
|
-
className: `${
|
|
233
|
+
className: `${o[n]} ${j}`,
|
|
234
234
|
xmlns: "http://www.w3.org/2000/svg",
|
|
235
235
|
fill: "none",
|
|
236
236
|
viewBox: "0 0 24 24",
|
|
@@ -262,8 +262,8 @@ const ee = ({
|
|
|
262
262
|
className: M,
|
|
263
263
|
style: {
|
|
264
264
|
...B,
|
|
265
|
-
...
|
|
266
|
-
"--focus-border-color":
|
|
265
|
+
...l && {
|
|
266
|
+
"--focus-border-color": l
|
|
267
267
|
},
|
|
268
268
|
...x && {
|
|
269
269
|
"--placeholder-color": x
|
|
@@ -278,11 +278,11 @@ const ee = ({
|
|
|
278
278
|
shadow: a = "sm",
|
|
279
279
|
hover: n = !1,
|
|
280
280
|
bordered: t = !0,
|
|
281
|
-
rounded:
|
|
281
|
+
rounded: i = "lg",
|
|
282
282
|
className: u = "",
|
|
283
283
|
bgColor: $,
|
|
284
|
-
borderColor:
|
|
285
|
-
style:
|
|
284
|
+
borderColor: d,
|
|
285
|
+
style: l,
|
|
286
286
|
children: m,
|
|
287
287
|
...g
|
|
288
288
|
}) => {
|
|
@@ -303,21 +303,21 @@ const ee = ({
|
|
|
303
303
|
md: "rounded-md",
|
|
304
304
|
lg: "rounded-lg",
|
|
305
305
|
xl: "rounded-xl"
|
|
306
|
-
}, w = t ? `border ${
|
|
306
|
+
}, w = t ? `border ${d || "border-gray-200"}` : "", c = n ? "cursor-pointer" : "", o = `${x} ${$ ? "" : "bg-white"} ${b[s]} ${h[a]} ${r[i]} ${w} ${c} ${u}`, f = {
|
|
307
307
|
...$ && { backgroundColor: $ },
|
|
308
|
-
...
|
|
308
|
+
...l
|
|
309
309
|
};
|
|
310
|
-
return /* @__PURE__ */ e("div", { className:
|
|
310
|
+
return /* @__PURE__ */ e("div", { className: o, style: f, ...g, children: /* @__PURE__ */ e("div", { className: n ? "transition-transform duration-300 ease-out hover:scale-[0.98] active:scale-[0.96]" : "", children: m }) });
|
|
311
311
|
}, ne = ({
|
|
312
312
|
items: s,
|
|
313
313
|
trigger: a = "click",
|
|
314
314
|
placement: n = "bottomLeft",
|
|
315
315
|
children: t,
|
|
316
|
-
className:
|
|
316
|
+
className: i = "",
|
|
317
317
|
overlayClassName: u = "",
|
|
318
318
|
disabled: $ = !1,
|
|
319
|
-
size:
|
|
320
|
-
menuBgColor:
|
|
319
|
+
size: d = "md",
|
|
320
|
+
menuBgColor: l,
|
|
321
321
|
menuItemHoverColor: m,
|
|
322
322
|
dangerColor: g,
|
|
323
323
|
borderColor: x,
|
|
@@ -332,11 +332,11 @@ const ee = ({
|
|
|
332
332
|
document.removeEventListener("mousedown", z);
|
|
333
333
|
};
|
|
334
334
|
}, [h]);
|
|
335
|
-
const
|
|
335
|
+
const c = () => {
|
|
336
336
|
!$ && a === "click" && r(!h);
|
|
337
337
|
}, y = () => {
|
|
338
338
|
!$ && a === "hover" && r(!0);
|
|
339
|
-
},
|
|
339
|
+
}, o = () => {
|
|
340
340
|
!$ && a === "hover" && r(!1);
|
|
341
341
|
}, f = (z) => {
|
|
342
342
|
!z.disabled && z.onClick && z.onClick(), r(!1);
|
|
@@ -360,15 +360,15 @@ const ee = ({
|
|
|
360
360
|
"div",
|
|
361
361
|
{
|
|
362
362
|
ref: w,
|
|
363
|
-
className: `relative inline-block ${
|
|
363
|
+
className: `relative inline-block ${i}`,
|
|
364
364
|
onMouseEnter: y,
|
|
365
|
-
onMouseLeave:
|
|
365
|
+
onMouseLeave: o,
|
|
366
366
|
style: b,
|
|
367
367
|
children: [
|
|
368
368
|
/* @__PURE__ */ e(
|
|
369
369
|
"div",
|
|
370
370
|
{
|
|
371
|
-
onClick:
|
|
371
|
+
onClick: c,
|
|
372
372
|
className: `inline-flex ${$ ? "cursor-not-allowed opacity-50" : "cursor-pointer"}`,
|
|
373
373
|
children: t
|
|
374
374
|
}
|
|
@@ -376,12 +376,12 @@ const ee = ({
|
|
|
376
376
|
h && !$ && /* @__PURE__ */ e(
|
|
377
377
|
"div",
|
|
378
378
|
{
|
|
379
|
-
className: `absolute ${N[n]} ${p} z-50 ${B[
|
|
379
|
+
className: `absolute ${N[n]} ${p} z-50 ${B[d]} ${u}`,
|
|
380
380
|
children: /* @__PURE__ */ e(
|
|
381
381
|
"div",
|
|
382
382
|
{
|
|
383
383
|
className: `dropdown-menu rounded-lg shadow-lg border py-1 overflow-hidden ${E}`,
|
|
384
|
-
style: { backgroundColor:
|
|
384
|
+
style: { backgroundColor: l || "#ffffff" },
|
|
385
385
|
children: s.map((z) => {
|
|
386
386
|
let I = {};
|
|
387
387
|
return z.disabled || (z.danger ? I = {
|
|
@@ -394,7 +394,7 @@ const ee = ({
|
|
|
394
394
|
className: `
|
|
395
395
|
dropdown-menu-item
|
|
396
396
|
flex items-center cursor-pointer transition-all duration-200 ease-out
|
|
397
|
-
${k[
|
|
397
|
+
${!u.includes("px-") && !u.includes("py-") ? k[d] : ""}
|
|
398
398
|
${z.disabled ? "opacity-50 cursor-not-allowed" : F}
|
|
399
399
|
${z.danger ? g ? "" : L : "text-gray-700"}
|
|
400
400
|
`,
|
|
@@ -419,11 +419,11 @@ const ee = ({
|
|
|
419
419
|
value: a,
|
|
420
420
|
defaultValue: n,
|
|
421
421
|
placeholder: t = "Select an option",
|
|
422
|
-
onChange:
|
|
422
|
+
onChange: i,
|
|
423
423
|
disabled: u = !1,
|
|
424
424
|
size: $ = "md",
|
|
425
|
-
fullWidth:
|
|
426
|
-
className:
|
|
425
|
+
fullWidth: d = !1,
|
|
426
|
+
className: l = "",
|
|
427
427
|
allowClear: m = !1,
|
|
428
428
|
showSearch: g = !1,
|
|
429
429
|
searchPlaceholder: x = "Search...",
|
|
@@ -431,9 +431,9 @@ const ee = ({
|
|
|
431
431
|
borderColor: h,
|
|
432
432
|
focusBorderColor: r = "#EC615B",
|
|
433
433
|
selectedBgColor: w,
|
|
434
|
-
selectedTextColor:
|
|
434
|
+
selectedTextColor: c,
|
|
435
435
|
hoverBgColor: y,
|
|
436
|
-
rounded:
|
|
436
|
+
rounded: o = "lg",
|
|
437
437
|
style: f
|
|
438
438
|
}) => {
|
|
439
439
|
const [N, p] = R(!1), [B, k] = R(
|
|
@@ -448,9 +448,9 @@ const ee = ({
|
|
|
448
448
|
};
|
|
449
449
|
}, [N, g]);
|
|
450
450
|
const j = (v) => {
|
|
451
|
-
a === void 0 && k(v),
|
|
451
|
+
a === void 0 && k(v), i == null || i(v), p(!1), P("");
|
|
452
452
|
}, S = (v) => {
|
|
453
|
-
v.stopPropagation(), a === void 0 && k(void 0),
|
|
453
|
+
v.stopPropagation(), a === void 0 && k(void 0), i == null || i("");
|
|
454
454
|
}, E = s.find((v) => v.value === F), z = g ? s.filter(
|
|
455
455
|
(v) => v.label.toLowerCase().includes(T.toLowerCase())
|
|
456
456
|
) : s, I = {
|
|
@@ -464,12 +464,12 @@ const ee = ({
|
|
|
464
464
|
md: "rounded-md",
|
|
465
465
|
lg: "rounded-lg",
|
|
466
466
|
full: "rounded-full"
|
|
467
|
-
}, W =
|
|
467
|
+
}, W = d ? "w-full" : "min-w-[200px]", D = () => {
|
|
468
468
|
const v = {};
|
|
469
469
|
return b && (v.backgroundColor = b), h && (v.borderColor = h), v;
|
|
470
470
|
}, H = () => {
|
|
471
471
|
const v = {};
|
|
472
|
-
return w && (v.backgroundColor = w),
|
|
472
|
+
return w && (v.backgroundColor = w), c && (v.color = c), v;
|
|
473
473
|
}, Q = /* @__PURE__ */ e(
|
|
474
474
|
"svg",
|
|
475
475
|
{
|
|
@@ -480,7 +480,7 @@ const ee = ({
|
|
|
480
480
|
children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
|
|
481
481
|
}
|
|
482
482
|
), q = /* @__PURE__ */ e("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) });
|
|
483
|
-
return /* @__PURE__ */ C("div", { ref: L, className: `relative inline-block ${W}
|
|
483
|
+
return /* @__PURE__ */ C("div", { ref: L, className: `relative inline-block ${W}`, style: f, children: [
|
|
484
484
|
/* @__PURE__ */ C(
|
|
485
485
|
"div",
|
|
486
486
|
{
|
|
@@ -489,10 +489,11 @@ const ee = ({
|
|
|
489
489
|
select-trigger
|
|
490
490
|
flex items-center justify-between gap-2
|
|
491
491
|
border transition-all duration-200 ease-out
|
|
492
|
-
${I[$]}
|
|
493
|
-
${A[
|
|
492
|
+
${!l.includes("px-") && !l.includes("py-") && !l.includes("h-") ? I[$] : ""}
|
|
493
|
+
${l.includes("rounded") ? "" : A[o]}
|
|
494
494
|
${u ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
495
495
|
${N ? "ring-2 ring-opacity-20" : ""}
|
|
496
|
+
${l}
|
|
496
497
|
`,
|
|
497
498
|
style: {
|
|
498
499
|
...D(),
|
|
@@ -528,7 +529,7 @@ const ee = ({
|
|
|
528
529
|
]
|
|
529
530
|
}
|
|
530
531
|
),
|
|
531
|
-
N && !u && /* @__PURE__ */ e("div", { className: "absolute top-full left-0 right-0 mt-1 z-50 dropdown-slide-down", children: /* @__PURE__ */ C("div", { className: `select-dropdown bg-white shadow-lg border border-gray-200 py-1 max-h-[300px] overflow-auto ${A[
|
|
532
|
+
N && !u && /* @__PURE__ */ e("div", { className: "absolute top-full left-0 right-0 mt-1 z-50 dropdown-slide-down", children: /* @__PURE__ */ C("div", { className: `select-dropdown bg-white shadow-lg border border-gray-200 py-1 max-h-[300px] overflow-auto ${A[o]}`, children: [
|
|
532
533
|
g && /* @__PURE__ */ e("div", { className: "px-2 py-2 border-b border-gray-200", children: /* @__PURE__ */ e(
|
|
533
534
|
"input",
|
|
534
535
|
{
|
|
@@ -557,7 +558,7 @@ const ee = ({
|
|
|
557
558
|
style: {
|
|
558
559
|
...v.value === F ? H() : {},
|
|
559
560
|
backgroundColor: v.value === F ? w || "#FCEAE9" : void 0,
|
|
560
|
-
color: v.value === F ?
|
|
561
|
+
color: v.value === F ? c || "#EC615B" : "#181918",
|
|
561
562
|
fontWeight: v.value === F ? "medium" : void 0
|
|
562
563
|
},
|
|
563
564
|
onMouseEnter: (O) => {
|
|
@@ -577,11 +578,11 @@ const ee = ({
|
|
|
577
578
|
dataSource: a,
|
|
578
579
|
rowKey: n = "id",
|
|
579
580
|
pagination: t,
|
|
580
|
-
loading:
|
|
581
|
+
loading: i = !1,
|
|
581
582
|
onRow: u,
|
|
582
583
|
className: $ = "",
|
|
583
|
-
bordered:
|
|
584
|
-
striped:
|
|
584
|
+
bordered: d = !1,
|
|
585
|
+
striped: l = !1,
|
|
585
586
|
size: m = "md",
|
|
586
587
|
headerBgColor: g,
|
|
587
588
|
headerTextColor: x,
|
|
@@ -589,9 +590,9 @@ const ee = ({
|
|
|
589
590
|
borderColor: h,
|
|
590
591
|
stripedRowColor: r,
|
|
591
592
|
rounded: w = "md",
|
|
592
|
-
style:
|
|
593
|
+
style: c
|
|
593
594
|
}) => {
|
|
594
|
-
const [y,
|
|
595
|
+
const [y, o] = R(
|
|
595
596
|
t && typeof t == "object" && t.current || 1
|
|
596
597
|
), [f, N] = R(
|
|
597
598
|
t && typeof t == "object" && t.pageSize || 10
|
|
@@ -632,17 +633,17 @@ const ee = ({
|
|
|
632
633
|
xl: "rounded-xl",
|
|
633
634
|
"2xl": "rounded-2xl"
|
|
634
635
|
}, k = p[m], T = B[w], P = (S, E) => typeof n == "function" ? n(S) : S[n] || String(E), L = (S, E) => E ? E.split(".").reduce((z, I) => z == null ? void 0 : z[I], S) : S, M = t === !1 ? a : a.slice((y - 1) * f, y * f), F = (S) => {
|
|
635
|
-
|
|
636
|
+
o(S), t && typeof t == "object" && t.onChange && t.onChange(S, f);
|
|
636
637
|
}, j = (S) => {
|
|
637
|
-
N(S),
|
|
638
|
+
N(S), o(1), t && typeof t == "object" && t.onChange && t.onChange(1, S);
|
|
638
639
|
};
|
|
639
|
-
return /* @__PURE__ */ C("div", { className: "w-full", style:
|
|
640
|
+
return /* @__PURE__ */ C("div", { className: "w-full", style: c, children: [
|
|
640
641
|
/* @__PURE__ */ e(
|
|
641
642
|
"div",
|
|
642
643
|
{
|
|
643
644
|
className: `overflow-x-auto ${T || "rounded-2xl"} border`,
|
|
644
645
|
style: { borderColor: h || "#EEEEEE" },
|
|
645
|
-
children: /* @__PURE__ */ C("table", { className: `w-full ${
|
|
646
|
+
children: /* @__PURE__ */ C("table", { className: `w-full ${d ? "border-collapse" : ""} ${$}`, children: [
|
|
646
647
|
/* @__PURE__ */ e(
|
|
647
648
|
"thead",
|
|
648
649
|
{
|
|
@@ -653,7 +654,7 @@ const ee = ({
|
|
|
653
654
|
children: /* @__PURE__ */ e("tr", { children: s.map((S, E) => /* @__PURE__ */ e(
|
|
654
655
|
"th",
|
|
655
656
|
{
|
|
656
|
-
className: `${k.headerPadding} text-left ${k.headerFontSize} font-medium uppercase tracking-wider ${
|
|
657
|
+
className: `${k.headerPadding} text-left ${k.headerFontSize} font-medium uppercase tracking-wider ${d && E !== s.length - 1 ? "border-r" : ""} ${S.align === "center" ? "text-center" : S.align === "right" ? "text-right" : ""}`,
|
|
657
658
|
style: {
|
|
658
659
|
width: S.width,
|
|
659
660
|
borderColor: h || "#EEEEEE",
|
|
@@ -670,7 +671,7 @@ const ee = ({
|
|
|
670
671
|
{
|
|
671
672
|
className: "bg-white divide-y",
|
|
672
673
|
style: { borderColor: h || "#e5e5e5" },
|
|
673
|
-
children:
|
|
674
|
+
children: i ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
674
675
|
"td",
|
|
675
676
|
{
|
|
676
677
|
colSpan: s.length,
|
|
@@ -719,7 +720,7 @@ const ee = ({
|
|
|
719
720
|
children: "No data"
|
|
720
721
|
}
|
|
721
722
|
) }) : M.map((S, E) => {
|
|
722
|
-
const z = u ? u(S, E) : {}, I =
|
|
723
|
+
const z = u ? u(S, E) : {}, I = l && E % 2 === 1 ? r || "#F5F6F7" : "transparent", A = b || "#f3f4f6";
|
|
723
724
|
return /* @__PURE__ */ e(
|
|
724
725
|
"tr",
|
|
725
726
|
{
|
|
@@ -728,7 +729,7 @@ const ee = ({
|
|
|
728
729
|
backgroundColor: I
|
|
729
730
|
},
|
|
730
731
|
onMouseEnter: (W) => {
|
|
731
|
-
(b || !
|
|
732
|
+
(b || !l || E % 2 === 0) && (W.currentTarget.style.backgroundColor = A);
|
|
732
733
|
},
|
|
733
734
|
onMouseLeave: (W) => {
|
|
734
735
|
W.currentTarget.style.backgroundColor = I;
|
|
@@ -739,7 +740,7 @@ const ee = ({
|
|
|
739
740
|
return /* @__PURE__ */ e(
|
|
740
741
|
"td",
|
|
741
742
|
{
|
|
742
|
-
className: `${k.rowPadding} ${k.rowFontSize} text-gray-900 ${
|
|
743
|
+
className: `${k.rowPadding} ${k.rowFontSize} text-gray-900 ${d && D !== s.length - 1 ? "border-r" : ""} ${W.align === "center" ? "text-center" : W.align === "right" ? "text-right" : ""}`,
|
|
743
744
|
style: {
|
|
744
745
|
borderColor: h || "#EEEEEE"
|
|
745
746
|
},
|
|
@@ -777,11 +778,11 @@ const ee = ({
|
|
|
777
778
|
pageSize: a,
|
|
778
779
|
total: n,
|
|
779
780
|
onChange: t,
|
|
780
|
-
onPageSizeChange:
|
|
781
|
+
onPageSizeChange: i,
|
|
781
782
|
showSizeChanger: u = !0,
|
|
782
783
|
pageSizeOptions: $ = [10, 20, 50, 100],
|
|
783
|
-
showTotal:
|
|
784
|
-
size:
|
|
784
|
+
showTotal: d = !0,
|
|
785
|
+
size: l = "md"
|
|
785
786
|
}) => {
|
|
786
787
|
const m = Math.ceil(n / a), g = (s - 1) * a + 1, x = Math.min(s * a, n), b = {
|
|
787
788
|
sm: {
|
|
@@ -802,23 +803,23 @@ const ee = ({
|
|
|
802
803
|
}, h = () => {
|
|
803
804
|
const r = [];
|
|
804
805
|
if (m <= 7)
|
|
805
|
-
for (let
|
|
806
|
-
r.push(
|
|
806
|
+
for (let c = 1; c <= m; c++)
|
|
807
|
+
r.push(c);
|
|
807
808
|
else if (s <= 3) {
|
|
808
|
-
for (let
|
|
809
|
+
for (let c = 1; c <= 5; c++) r.push(c);
|
|
809
810
|
r.push("..."), r.push(m);
|
|
810
811
|
} else if (s >= m - 2) {
|
|
811
812
|
r.push(1), r.push("...");
|
|
812
|
-
for (let
|
|
813
|
+
for (let c = m - 4; c <= m; c++) r.push(c);
|
|
813
814
|
} else {
|
|
814
815
|
r.push(1), r.push("...");
|
|
815
|
-
for (let
|
|
816
|
+
for (let c = s - 1; c <= s + 1; c++) r.push(c);
|
|
816
817
|
r.push("..."), r.push(m);
|
|
817
818
|
}
|
|
818
819
|
return r;
|
|
819
820
|
};
|
|
820
821
|
return /* @__PURE__ */ C("div", { className: "flex items-center justify-between px-4 py-3 border-t border-[#EEEEEE] sm:px-6 mt-4", children: [
|
|
821
|
-
|
|
822
|
+
d && /* @__PURE__ */ C("div", { className: "text-sm text-[#181918]", children: [
|
|
822
823
|
g,
|
|
823
824
|
"-",
|
|
824
825
|
x,
|
|
@@ -831,7 +832,7 @@ const ee = ({
|
|
|
831
832
|
G,
|
|
832
833
|
{
|
|
833
834
|
value: a.toString(),
|
|
834
|
-
onChange: (r) =>
|
|
835
|
+
onChange: (r) => i(Number(r)),
|
|
835
836
|
options: $.map((r) => ({
|
|
836
837
|
value: r.toString(),
|
|
837
838
|
label: `${r} / page`
|
|
@@ -846,8 +847,8 @@ const ee = ({
|
|
|
846
847
|
{
|
|
847
848
|
onClick: () => t(s - 1),
|
|
848
849
|
disabled: s === 1,
|
|
849
|
-
className: `relative inline-flex items-center justify-center rounded-md ${b[
|
|
850
|
-
children: /* @__PURE__ */ e("svg", { className: b[
|
|
850
|
+
className: `relative inline-flex items-center justify-center rounded-md ${b[l].nav} text-[#181918] hover:bg-gray-100 focus:z-20 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-all duration-300 ease-out hover:scale-110 active:scale-95`,
|
|
851
|
+
children: /* @__PURE__ */ e("svg", { className: b[l].icon, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ e(
|
|
851
852
|
"path",
|
|
852
853
|
{
|
|
853
854
|
strokeLinecap: "round",
|
|
@@ -861,7 +862,7 @@ const ee = ({
|
|
|
861
862
|
h().map((r, w) => r === "..." ? /* @__PURE__ */ e(
|
|
862
863
|
"span",
|
|
863
864
|
{
|
|
864
|
-
className: `relative inline-flex items-center justify-center ${b[
|
|
865
|
+
className: `relative inline-flex items-center justify-center ${b[l].button} font-normal text-[#181918]`,
|
|
865
866
|
children: "..."
|
|
866
867
|
},
|
|
867
868
|
`ellipsis-${w}`
|
|
@@ -869,7 +870,7 @@ const ee = ({
|
|
|
869
870
|
"button",
|
|
870
871
|
{
|
|
871
872
|
onClick: () => t(r),
|
|
872
|
-
className: `relative inline-flex items-center justify-center rounded-md ${b[
|
|
873
|
+
className: `relative inline-flex items-center justify-center rounded-md ${b[l].button} font-medium transition-all duration-300 ease-out focus:z-20 hover:scale-105 active:scale-95 ${s === r ? "bg-[#EC615B] text-white shadow-sm" : "text-[#181918] hover:bg-gray-100"}`,
|
|
873
874
|
children: r
|
|
874
875
|
},
|
|
875
876
|
r
|
|
@@ -879,8 +880,8 @@ const ee = ({
|
|
|
879
880
|
{
|
|
880
881
|
onClick: () => t(s + 1),
|
|
881
882
|
disabled: s === m,
|
|
882
|
-
className: `relative inline-flex items-center justify-center rounded-md ${b[
|
|
883
|
-
children: /* @__PURE__ */ e("svg", { className: b[
|
|
883
|
+
className: `relative inline-flex items-center justify-center rounded-md ${b[l].nav} text-[#181918] hover:bg-gray-100 focus:z-20 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-all duration-300 ease-out hover:scale-110 active:scale-95`,
|
|
884
|
+
children: /* @__PURE__ */ e("svg", { className: b[l].icon, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ e(
|
|
884
885
|
"path",
|
|
885
886
|
{
|
|
886
887
|
strokeLinecap: "round",
|
|
@@ -899,11 +900,11 @@ const ee = ({
|
|
|
899
900
|
description: a,
|
|
900
901
|
searchPlaceholder: n = "Search...",
|
|
901
902
|
onSearch: t,
|
|
902
|
-
actions:
|
|
903
|
+
actions: i,
|
|
903
904
|
filters: u,
|
|
904
905
|
className: $ = "",
|
|
905
|
-
size:
|
|
906
|
-
titleColor:
|
|
906
|
+
size: d = "responsive",
|
|
907
|
+
titleColor: l,
|
|
907
908
|
descriptionColor: m,
|
|
908
909
|
searchBgColor: g = "white",
|
|
909
910
|
searchBorderColor: x = "#d1d5db",
|
|
@@ -966,7 +967,7 @@ const ee = ({
|
|
|
966
967
|
maxWidth: "max-w-sm md:max-w-md lg:max-w-lg",
|
|
967
968
|
descriptionMargin: "mt-0.5 sm:mt-1 md:mt-2"
|
|
968
969
|
}
|
|
969
|
-
}[
|
|
970
|
+
}[d], f = {
|
|
970
971
|
none: "rounded-none",
|
|
971
972
|
sm: "rounded-sm",
|
|
972
973
|
md: "rounded-md",
|
|
@@ -987,7 +988,7 @@ const ee = ({
|
|
|
987
988
|
"h2",
|
|
988
989
|
{
|
|
989
990
|
className: `${y.titleSize} ${y.titleWeight}`,
|
|
990
|
-
style: { color:
|
|
991
|
+
style: { color: l || "#111827" },
|
|
991
992
|
children: s
|
|
992
993
|
}
|
|
993
994
|
),
|
|
@@ -1037,7 +1038,7 @@ const ee = ({
|
|
|
1037
1038
|
}
|
|
1038
1039
|
)
|
|
1039
1040
|
] }) }),
|
|
1040
|
-
|
|
1041
|
+
i && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 w-full sm:w-auto", children: i })
|
|
1041
1042
|
] }),
|
|
1042
1043
|
u && /* @__PURE__ */ e("div", { className: `flex flex-wrap items-center ${y.gap}`, children: u })
|
|
1043
1044
|
]
|
|
@@ -1055,11 +1056,11 @@ const ee = ({
|
|
|
1055
1056
|
onClose: a,
|
|
1056
1057
|
title: n,
|
|
1057
1058
|
children: t,
|
|
1058
|
-
footer:
|
|
1059
|
+
footer: i,
|
|
1059
1060
|
width: u,
|
|
1060
1061
|
size: $ = "md",
|
|
1061
|
-
closable:
|
|
1062
|
-
maskClosable:
|
|
1062
|
+
closable: d = !0,
|
|
1063
|
+
maskClosable: l = !0,
|
|
1063
1064
|
centered: m = !0,
|
|
1064
1065
|
className: g = "",
|
|
1065
1066
|
bgColor: x = "#ffffff",
|
|
@@ -1067,9 +1068,9 @@ const ee = ({
|
|
|
1067
1068
|
overlayColor: h = "rgba(0, 0, 0, 0.5)",
|
|
1068
1069
|
bodyClassName: r = "",
|
|
1069
1070
|
headerClassName: w = "",
|
|
1070
|
-
maxHeight:
|
|
1071
|
+
maxHeight: c = "70vh"
|
|
1071
1072
|
}) => {
|
|
1072
|
-
const [y,
|
|
1073
|
+
const [y, o] = R(!1), [f, N] = R(!1), p = u || X[$], k = {
|
|
1073
1074
|
width: typeof p == "number" ? `${p}px` : p,
|
|
1074
1075
|
maxWidth: "90vw",
|
|
1075
1076
|
backgroundColor: x
|
|
@@ -1080,24 +1081,24 @@ const ee = ({
|
|
|
1080
1081
|
};
|
|
1081
1082
|
if (V(() => {
|
|
1082
1083
|
if (s)
|
|
1083
|
-
|
|
1084
|
+
o(!0), setTimeout(() => N(!0), 10), document.body.style.overflow = "hidden";
|
|
1084
1085
|
else {
|
|
1085
1086
|
N(!1);
|
|
1086
1087
|
const F = setTimeout(() => {
|
|
1087
|
-
|
|
1088
|
+
o(!1);
|
|
1088
1089
|
}, 200);
|
|
1089
1090
|
return document.body.style.overflow = "unset", () => clearTimeout(F);
|
|
1090
1091
|
}
|
|
1091
1092
|
}, [s]), V(() => {
|
|
1092
1093
|
const F = (j) => {
|
|
1093
|
-
j.key === "Escape" &&
|
|
1094
|
+
j.key === "Escape" && d && s && a();
|
|
1094
1095
|
};
|
|
1095
1096
|
return s && document.addEventListener("keydown", F), () => {
|
|
1096
1097
|
document.removeEventListener("keydown", F);
|
|
1097
1098
|
};
|
|
1098
|
-
}, [s, a,
|
|
1099
|
+
}, [s, a, d]), !y) return null;
|
|
1099
1100
|
const L = () => {
|
|
1100
|
-
|
|
1101
|
+
l && a();
|
|
1101
1102
|
}, M = (F) => {
|
|
1102
1103
|
F.stopPropagation();
|
|
1103
1104
|
};
|
|
@@ -1118,17 +1119,17 @@ const ee = ({
|
|
|
1118
1119
|
"div",
|
|
1119
1120
|
{
|
|
1120
1121
|
className: `relative rounded-lg shadow-xl transition-all duration-200 ease-out overflow-y-auto ${f ? "opacity-100 scale-100 translate-y-0" : "opacity-0 scale-95 -translate-y-4"} ${g}`,
|
|
1121
|
-
style: { ...k, maxHeight: typeof
|
|
1122
|
+
style: { ...k, maxHeight: typeof c == "number" ? `${c}px` : c },
|
|
1122
1123
|
onClick: M,
|
|
1123
1124
|
children: [
|
|
1124
|
-
(n ||
|
|
1125
|
+
(n || d) && /* @__PURE__ */ C(
|
|
1125
1126
|
"div",
|
|
1126
1127
|
{
|
|
1127
1128
|
className: `flex items-center justify-between px-6 py-4 border-b border-gray-200 ${w}`,
|
|
1128
1129
|
style: T,
|
|
1129
1130
|
children: [
|
|
1130
1131
|
n && /* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-gray-900", children: n }),
|
|
1131
|
-
|
|
1132
|
+
d && /* @__PURE__ */ e(
|
|
1132
1133
|
"button",
|
|
1133
1134
|
{
|
|
1134
1135
|
onClick: a,
|
|
@@ -1163,7 +1164,7 @@ const ee = ({
|
|
|
1163
1164
|
children: t
|
|
1164
1165
|
}
|
|
1165
1166
|
),
|
|
1166
|
-
|
|
1167
|
+
i && /* @__PURE__ */ e("div", { className: "px-6 py-4 border-t border-gray-200 flex justify-end gap-2", children: i })
|
|
1167
1168
|
]
|
|
1168
1169
|
}
|
|
1169
1170
|
) })
|
|
@@ -1175,11 +1176,11 @@ const ee = ({
|
|
|
1175
1176
|
variant: a = "default",
|
|
1176
1177
|
size: n = "md",
|
|
1177
1178
|
dot: t = !1,
|
|
1178
|
-
icon:
|
|
1179
|
+
icon: i,
|
|
1179
1180
|
iconPosition: u = "left",
|
|
1180
1181
|
className: $ = "",
|
|
1181
|
-
bgColor:
|
|
1182
|
-
textColor:
|
|
1182
|
+
bgColor: d,
|
|
1183
|
+
textColor: l,
|
|
1183
1184
|
borderColor: m,
|
|
1184
1185
|
rounded: g = "full",
|
|
1185
1186
|
style: x
|
|
@@ -1208,7 +1209,7 @@ const ee = ({
|
|
|
1208
1209
|
warning: "bg-yellow-600",
|
|
1209
1210
|
danger: "bg-red-600",
|
|
1210
1211
|
info: "bg-cyan-600"
|
|
1211
|
-
},
|
|
1212
|
+
}, c = {
|
|
1212
1213
|
sm: "w-3 h-3",
|
|
1213
1214
|
md: "w-3.5 h-3.5",
|
|
1214
1215
|
lg: "w-4 h-4",
|
|
@@ -1219,22 +1220,22 @@ const ee = ({
|
|
|
1219
1220
|
md: "rounded-md",
|
|
1220
1221
|
lg: "rounded-lg",
|
|
1221
1222
|
full: "rounded-full"
|
|
1222
|
-
},
|
|
1223
|
-
...
|
|
1224
|
-
...
|
|
1223
|
+
}, o = {
|
|
1224
|
+
...d && { backgroundColor: d },
|
|
1225
|
+
...l && { color: l },
|
|
1225
1226
|
...m && { borderColor: m, borderWidth: "1px", borderStyle: "solid" },
|
|
1226
1227
|
...x
|
|
1227
1228
|
};
|
|
1228
1229
|
return /* @__PURE__ */ C(
|
|
1229
1230
|
"span",
|
|
1230
1231
|
{
|
|
1231
|
-
className: `inline-flex items-center gap-1.5 font-medium transition-all duration-200 ${
|
|
1232
|
-
style:
|
|
1232
|
+
className: `inline-flex items-center gap-1.5 font-medium transition-all duration-200 ${d ? "" : b[a]} ${h[n]} ${y[g]} ${$}`,
|
|
1233
|
+
style: o,
|
|
1233
1234
|
children: [
|
|
1234
1235
|
t && /* @__PURE__ */ e("span", { className: `rounded-full ${r[n]} ${w[a]}` }),
|
|
1235
|
-
|
|
1236
|
+
i && u === "left" && /* @__PURE__ */ e("span", { className: `inline-flex items-center ${c[n]}`, children: i }),
|
|
1236
1237
|
s,
|
|
1237
|
-
|
|
1238
|
+
i && u === "right" && /* @__PURE__ */ e("span", { className: `inline-flex items-center ${c[n]}`, children: i })
|
|
1238
1239
|
]
|
|
1239
1240
|
}
|
|
1240
1241
|
);
|
|
@@ -1243,16 +1244,16 @@ const ee = ({
|
|
|
1243
1244
|
current: a = 0,
|
|
1244
1245
|
direction: n = "vertical",
|
|
1245
1246
|
size: t = "md",
|
|
1246
|
-
variant:
|
|
1247
|
+
variant: i = "default",
|
|
1247
1248
|
className: u = "",
|
|
1248
1249
|
style: $,
|
|
1249
|
-
finishColor:
|
|
1250
|
-
processColor:
|
|
1250
|
+
finishColor: d,
|
|
1251
|
+
processColor: l,
|
|
1251
1252
|
waitColor: m,
|
|
1252
1253
|
errorColor: g,
|
|
1253
1254
|
lineColor: x
|
|
1254
1255
|
}) => {
|
|
1255
|
-
const b = (
|
|
1256
|
+
const b = (o, f) => f.status ? f.status : o < a ? "finish" : o === a ? "process" : "wait", h = {
|
|
1256
1257
|
sm: "w-6 h-6",
|
|
1257
1258
|
md: "w-8 h-8",
|
|
1258
1259
|
lg: "w-10 h-10",
|
|
@@ -1267,38 +1268,38 @@ const ee = ({
|
|
|
1267
1268
|
md: "text-sm",
|
|
1268
1269
|
lg: "text-base",
|
|
1269
1270
|
responsive: "text-xs sm:text-xs md:text-sm lg:text-base"
|
|
1270
|
-
},
|
|
1271
|
+
}, c = (o, f) => f || (o === "finish" ? /* @__PURE__ */ e("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e(
|
|
1271
1272
|
"path",
|
|
1272
1273
|
{
|
|
1273
1274
|
fillRule: "evenodd",
|
|
1274
1275
|
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",
|
|
1275
1276
|
clipRule: "evenodd"
|
|
1276
1277
|
}
|
|
1277
|
-
) }) :
|
|
1278
|
+
) }) : o === "error" ? /* @__PURE__ */ e("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e(
|
|
1278
1279
|
"path",
|
|
1279
1280
|
{
|
|
1280
1281
|
fillRule: "evenodd",
|
|
1281
1282
|
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",
|
|
1282
1283
|
clipRule: "evenodd"
|
|
1283
1284
|
}
|
|
1284
|
-
) }) : null), y = (
|
|
1285
|
-
const f =
|
|
1286
|
-
switch (
|
|
1285
|
+
) }) : null), y = (o) => {
|
|
1286
|
+
const f = i === "outline";
|
|
1287
|
+
switch (o) {
|
|
1287
1288
|
case "finish":
|
|
1288
1289
|
return {
|
|
1289
|
-
icon: f ? `bg-white text-white border ${
|
|
1290
|
+
icon: f ? `bg-white text-white border ${d ? `border-[${d}]` : "border-green-500"}` : `${d ? `bg-[${d}]` : "bg-green-500"} text-white ${d ? `border-[${d}]` : "border-green-500"}`,
|
|
1290
1291
|
title: "text-[#181918]",
|
|
1291
1292
|
description: "text-gray-600",
|
|
1292
1293
|
line: x ? `bg-[${x}]` : "bg-green-500",
|
|
1293
|
-
iconColor:
|
|
1294
|
+
iconColor: d
|
|
1294
1295
|
};
|
|
1295
1296
|
case "process":
|
|
1296
1297
|
return {
|
|
1297
|
-
icon: f ? `bg-white text-white border ${
|
|
1298
|
+
icon: f ? `bg-white text-white border ${l ? `border-[${l}]` : "border-[#EC615B]"}` : `${l ? `bg-[${l}]` : "bg-[#EC615B]"} text-white ${l ? `border-[${l}]` : "border-[#EC615B]"}`,
|
|
1298
1299
|
title: "text-[#181918] font-semibold",
|
|
1299
1300
|
description: "text-gray-700",
|
|
1300
1301
|
line: x ? `bg-[${x}]` : "bg-gray-300",
|
|
1301
|
-
iconColor:
|
|
1302
|
+
iconColor: l
|
|
1302
1303
|
};
|
|
1303
1304
|
case "error":
|
|
1304
1305
|
return {
|
|
@@ -1318,8 +1319,8 @@ const ee = ({
|
|
|
1318
1319
|
};
|
|
1319
1320
|
}
|
|
1320
1321
|
};
|
|
1321
|
-
return n === "horizontal" ? /* @__PURE__ */ e("div", { className: `flex items-start ${u}`, style: $, children: s.map((
|
|
1322
|
-
const N = b(f,
|
|
1322
|
+
return n === "horizontal" ? /* @__PURE__ */ e("div", { className: `flex items-start ${u}`, style: $, children: s.map((o, f) => {
|
|
1323
|
+
const N = b(f, o), p = y(N), B = f === s.length - 1, k = {};
|
|
1323
1324
|
return p.iconColor && (k.color = p.iconColor), /* @__PURE__ */ C("div", { className: "flex flex-1 items-start", children: [
|
|
1324
1325
|
/* @__PURE__ */ C("div", { className: "flex flex-col items-center", children: [
|
|
1325
1326
|
/* @__PURE__ */ e(
|
|
@@ -1327,7 +1328,7 @@ const ee = ({
|
|
|
1327
1328
|
{
|
|
1328
1329
|
className: `flex items-center justify-center ${h[t]} rounded-full border transition-all duration-300 ${p.icon}`,
|
|
1329
1330
|
style: k,
|
|
1330
|
-
children:
|
|
1331
|
+
children: c(N, o.icon)
|
|
1331
1332
|
}
|
|
1332
1333
|
),
|
|
1333
1334
|
/* @__PURE__ */ C("div", { className: "mt-2 text-center", children: [
|
|
@@ -1335,14 +1336,14 @@ const ee = ({
|
|
|
1335
1336
|
"div",
|
|
1336
1337
|
{
|
|
1337
1338
|
className: `${r[t]} ${p.title} transition-colors duration-300`,
|
|
1338
|
-
children:
|
|
1339
|
+
children: o.title
|
|
1339
1340
|
}
|
|
1340
1341
|
),
|
|
1341
|
-
|
|
1342
|
+
o.description && /* @__PURE__ */ e(
|
|
1342
1343
|
"div",
|
|
1343
1344
|
{
|
|
1344
1345
|
className: `${w[t]} ${p.description} mt-1 transition-colors duration-300`,
|
|
1345
|
-
children:
|
|
1346
|
+
children: o.description
|
|
1346
1347
|
}
|
|
1347
1348
|
)
|
|
1348
1349
|
] })
|
|
@@ -1354,8 +1355,8 @@ const ee = ({
|
|
|
1354
1355
|
}
|
|
1355
1356
|
)
|
|
1356
1357
|
] }, f);
|
|
1357
|
-
}) }) : /* @__PURE__ */ e("div", { className: `flex flex-col ${u}`, style: $, children: s.map((
|
|
1358
|
-
const N = b(f,
|
|
1358
|
+
}) }) : /* @__PURE__ */ e("div", { className: `flex flex-col ${u}`, style: $, children: s.map((o, f) => {
|
|
1359
|
+
const N = b(f, o), p = y(N), B = f === s.length - 1, k = {};
|
|
1359
1360
|
return p.iconColor && (k.color = p.iconColor), /* @__PURE__ */ C("div", { className: "flex", children: [
|
|
1360
1361
|
/* @__PURE__ */ C("div", { className: "flex flex-col items-center mr-4", children: [
|
|
1361
1362
|
/* @__PURE__ */ e(
|
|
@@ -1363,7 +1364,7 @@ const ee = ({
|
|
|
1363
1364
|
{
|
|
1364
1365
|
className: `flex items-center justify-center ${h[t]} rounded-full border transition-all duration-300 ${p.icon}`,
|
|
1365
1366
|
style: k,
|
|
1366
|
-
children:
|
|
1367
|
+
children: c(N, o.icon)
|
|
1367
1368
|
}
|
|
1368
1369
|
),
|
|
1369
1370
|
!B && /* @__PURE__ */ e(
|
|
@@ -1379,14 +1380,14 @@ const ee = ({
|
|
|
1379
1380
|
"div",
|
|
1380
1381
|
{
|
|
1381
1382
|
className: `${r[t]} ${p.title} transition-colors duration-300`,
|
|
1382
|
-
children:
|
|
1383
|
+
children: o.title
|
|
1383
1384
|
}
|
|
1384
1385
|
),
|
|
1385
|
-
|
|
1386
|
+
o.description && /* @__PURE__ */ e(
|
|
1386
1387
|
"div",
|
|
1387
1388
|
{
|
|
1388
1389
|
className: `${w[t]} ${p.description} mt-1 transition-colors duration-300`,
|
|
1389
|
-
children:
|
|
1390
|
+
children: o.description
|
|
1390
1391
|
}
|
|
1391
1392
|
)
|
|
1392
1393
|
] })
|
|
@@ -1397,11 +1398,11 @@ const ee = ({
|
|
|
1397
1398
|
status: a = "normal",
|
|
1398
1399
|
showInfo: n = !0,
|
|
1399
1400
|
strokeColor: t,
|
|
1400
|
-
strokeWidth:
|
|
1401
|
+
strokeWidth: i,
|
|
1401
1402
|
size: u = "md",
|
|
1402
1403
|
className: $ = "",
|
|
1403
|
-
format:
|
|
1404
|
-
bgColor:
|
|
1404
|
+
format: d,
|
|
1405
|
+
bgColor: l,
|
|
1405
1406
|
successColor: m,
|
|
1406
1407
|
exceptionColor: g,
|
|
1407
1408
|
trackColor: x,
|
|
@@ -1417,7 +1418,7 @@ const ee = ({
|
|
|
1417
1418
|
md: "text-sm",
|
|
1418
1419
|
lg: "text-base",
|
|
1419
1420
|
responsive: "text-xs sm:text-sm md:text-base lg:text-lg"
|
|
1420
|
-
},
|
|
1421
|
+
}, c = {
|
|
1421
1422
|
none: "rounded-none",
|
|
1422
1423
|
sm: "rounded-sm",
|
|
1423
1424
|
md: "rounded-md",
|
|
@@ -1431,11 +1432,11 @@ const ee = ({
|
|
|
1431
1432
|
case "exception":
|
|
1432
1433
|
return g || "bg-red-500";
|
|
1433
1434
|
case "active":
|
|
1434
|
-
return
|
|
1435
|
+
return l || "bg-[#EC615B]";
|
|
1435
1436
|
default:
|
|
1436
|
-
return h === 100 ? m || "bg-green-500" :
|
|
1437
|
+
return h === 100 ? m || "bg-green-500" : l || "bg-[#EC615B]";
|
|
1437
1438
|
}
|
|
1438
|
-
},
|
|
1439
|
+
}, o = () => x || "bg-gray-200", f = () => a === "success" || h === 100 ? /* @__PURE__ */ e("svg", { className: "w-4 h-4 text-green-500", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e(
|
|
1439
1440
|
"path",
|
|
1440
1441
|
{
|
|
1441
1442
|
fillRule: "evenodd",
|
|
@@ -1449,17 +1450,17 @@ const ee = ({
|
|
|
1449
1450
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",
|
|
1450
1451
|
clipRule: "evenodd"
|
|
1451
1452
|
}
|
|
1452
|
-
) }) : null, N = () =>
|
|
1453
|
+
) }) : null, N = () => d ? d(h) : `${Math.round(h)}%`, p = i ? `${i}px` : void 0;
|
|
1453
1454
|
return /* @__PURE__ */ C("div", { className: `flex items-center gap-2 ${$}`, children: [
|
|
1454
1455
|
/* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
|
|
1455
1456
|
"div",
|
|
1456
1457
|
{
|
|
1457
|
-
className: `w-full overflow-hidden ${r[u]} ${
|
|
1458
|
+
className: `w-full overflow-hidden ${r[u]} ${c[b]} ${o()}`,
|
|
1458
1459
|
style: { height: p },
|
|
1459
1460
|
children: /* @__PURE__ */ e(
|
|
1460
1461
|
"div",
|
|
1461
1462
|
{
|
|
1462
|
-
className: `${y()} ${r[u]} ${
|
|
1463
|
+
className: `${y()} ${r[u]} ${c[b]} transition-all duration-300 ease-out ${a === "active" ? "progress-active" : ""}`,
|
|
1463
1464
|
style: {
|
|
1464
1465
|
width: `${h}%`,
|
|
1465
1466
|
height: p
|
|
@@ -1475,11 +1476,11 @@ const ee = ({
|
|
|
1475
1476
|
defaultChecked: a = !1,
|
|
1476
1477
|
onChange: n,
|
|
1477
1478
|
disabled: t = !1,
|
|
1478
|
-
indeterminate:
|
|
1479
|
+
indeterminate: i = !1,
|
|
1479
1480
|
size: u = "md",
|
|
1480
1481
|
variant: $ = "filled",
|
|
1481
|
-
className:
|
|
1482
|
-
id:
|
|
1482
|
+
className: d = "",
|
|
1483
|
+
id: l,
|
|
1483
1484
|
name: m,
|
|
1484
1485
|
value: g,
|
|
1485
1486
|
checkedColor: x = "#EC615B",
|
|
@@ -1487,10 +1488,10 @@ const ee = ({
|
|
|
1487
1488
|
checkedBorderColor: h = "#EC615B",
|
|
1488
1489
|
style: r
|
|
1489
1490
|
}) => {
|
|
1490
|
-
const [w,
|
|
1491
|
+
const [w, c] = R(a), y = s !== void 0, o = y ? s : w, f = (L) => {
|
|
1491
1492
|
if (t) return;
|
|
1492
1493
|
const M = L.target.checked;
|
|
1493
|
-
y ||
|
|
1494
|
+
y || c(M), n == null || n(M);
|
|
1494
1495
|
}, N = {
|
|
1495
1496
|
sm: "w-4 h-4",
|
|
1496
1497
|
md: "w-5 h-5",
|
|
@@ -1501,8 +1502,8 @@ const ee = ({
|
|
|
1501
1502
|
md: "w-3.5 h-3.5",
|
|
1502
1503
|
lg: "w-4 h-4",
|
|
1503
1504
|
responsive: "w-2.5 h-2.5 sm:w-3.5 sm:h-3.5 lg:w-4 lg:h-4"
|
|
1504
|
-
}, B = $ === "filled", k = () => t ? "cursor-not-allowed opacity-50 border-gray-300 bg-gray-100" : !
|
|
1505
|
-
if (!t && !(!
|
|
1505
|
+
}, B = $ === "filled", k = () => t ? "cursor-not-allowed opacity-50 border-gray-300 bg-gray-100" : !o && !i ? "border-gray-300 bg-white hover:border-gray-400" : "", T = () => {
|
|
1506
|
+
if (!t && !(!o && !i))
|
|
1506
1507
|
return B ? {
|
|
1507
1508
|
borderColor: h,
|
|
1508
1509
|
backgroundColor: x
|
|
@@ -1510,16 +1511,16 @@ const ee = ({
|
|
|
1510
1511
|
borderColor: h,
|
|
1511
1512
|
backgroundColor: b
|
|
1512
1513
|
};
|
|
1513
|
-
}, P = () => B && (
|
|
1514
|
+
}, P = () => B && (o || i) ? "text-white" : "";
|
|
1514
1515
|
return /* @__PURE__ */ C("div", { className: "inline-flex items-center", style: r, children: [
|
|
1515
1516
|
/* @__PURE__ */ e(
|
|
1516
1517
|
"input",
|
|
1517
1518
|
{
|
|
1518
1519
|
type: "checkbox",
|
|
1519
|
-
id:
|
|
1520
|
+
id: l,
|
|
1520
1521
|
name: m,
|
|
1521
1522
|
value: g,
|
|
1522
|
-
checked:
|
|
1523
|
+
checked: o,
|
|
1523
1524
|
onChange: f,
|
|
1524
1525
|
disabled: t,
|
|
1525
1526
|
className: "sr-only"
|
|
@@ -1528,7 +1529,7 @@ const ee = ({
|
|
|
1528
1529
|
/* @__PURE__ */ C(
|
|
1529
1530
|
"label",
|
|
1530
1531
|
{
|
|
1531
|
-
htmlFor:
|
|
1532
|
+
htmlFor: l,
|
|
1532
1533
|
className: `
|
|
1533
1534
|
relative flex items-center justify-center
|
|
1534
1535
|
${N[u]}
|
|
@@ -1537,11 +1538,11 @@ const ee = ({
|
|
|
1537
1538
|
transition-all duration-200 ease-out
|
|
1538
1539
|
cursor-pointer
|
|
1539
1540
|
${k()}
|
|
1540
|
-
${
|
|
1541
|
+
${d}
|
|
1541
1542
|
`,
|
|
1542
1543
|
style: T(),
|
|
1543
1544
|
children: [
|
|
1544
|
-
|
|
1545
|
+
o && !i && /* @__PURE__ */ e(
|
|
1545
1546
|
"svg",
|
|
1546
1547
|
{
|
|
1547
1548
|
className: `${p[u]} ${P()}`,
|
|
@@ -1549,17 +1550,17 @@ const ee = ({
|
|
|
1549
1550
|
stroke: "currentColor",
|
|
1550
1551
|
viewBox: "0 0 24 24",
|
|
1551
1552
|
strokeWidth: 3,
|
|
1552
|
-
style: !B && (
|
|
1553
|
+
style: !B && (o || i) ? { color: x } : void 0,
|
|
1553
1554
|
children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })
|
|
1554
1555
|
}
|
|
1555
1556
|
),
|
|
1556
|
-
|
|
1557
|
+
i && /* @__PURE__ */ e(
|
|
1557
1558
|
"svg",
|
|
1558
1559
|
{
|
|
1559
1560
|
className: `${p[u]} ${P()}`,
|
|
1560
1561
|
fill: "currentColor",
|
|
1561
1562
|
viewBox: "0 0 24 24",
|
|
1562
|
-
style: !B && (
|
|
1563
|
+
style: !B && (o || i) ? { color: x } : void 0,
|
|
1563
1564
|
children: /* @__PURE__ */ e("rect", { x: "4", y: "11", width: "16", height: "2", rx: "1" })
|
|
1564
1565
|
}
|
|
1565
1566
|
)
|
|
@@ -1611,11 +1612,11 @@ const ee = ({
|
|
|
1611
1612
|
onRemove: a,
|
|
1612
1613
|
emptyMessage: n = "No items selected",
|
|
1613
1614
|
className: t = "",
|
|
1614
|
-
itemClassName:
|
|
1615
|
+
itemClassName: i = "",
|
|
1615
1616
|
maxHeight: u = "300px",
|
|
1616
1617
|
size: $ = "md",
|
|
1617
|
-
bgColor:
|
|
1618
|
-
hoverBgColor:
|
|
1618
|
+
bgColor: d,
|
|
1619
|
+
hoverBgColor: l,
|
|
1619
1620
|
textColor: m,
|
|
1620
1621
|
sublabelColor: g,
|
|
1621
1622
|
removeButtonColor: x,
|
|
@@ -1623,7 +1624,7 @@ const ee = ({
|
|
|
1623
1624
|
rounded: h = "md",
|
|
1624
1625
|
style: r
|
|
1625
1626
|
}) => {
|
|
1626
|
-
const w = Y($),
|
|
1627
|
+
const w = Y($), c = Z(h), y = "#F4F4F4", o = "#EBEBEB", f = "#181918", N = "#999999", p = "#9CA3AF", B = "#EC615B", k = d || y, T = l || o, P = m || f, L = g || N, M = x || p, F = b || B;
|
|
1627
1628
|
return s.length === 0 ? /* @__PURE__ */ e(
|
|
1628
1629
|
"div",
|
|
1629
1630
|
{
|
|
@@ -1644,11 +1645,11 @@ const ee = ({
|
|
|
1644
1645
|
{
|
|
1645
1646
|
className: `
|
|
1646
1647
|
group flex items-center justify-between
|
|
1647
|
-
${
|
|
1648
|
+
${c}
|
|
1648
1649
|
transition-all duration-300 ease-out
|
|
1649
1650
|
hover:shadow-sm
|
|
1650
1651
|
animate-slide-in-item
|
|
1651
|
-
${
|
|
1652
|
+
${i}
|
|
1652
1653
|
`,
|
|
1653
1654
|
style: {
|
|
1654
1655
|
backgroundColor: k,
|