shekel-fe-shared-lib 3.0.0 → 3.0.1
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 +21 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +910 -906
- package/dist/index.mjs.map +1 -1
- package/dist/types/components/Steps.d.ts +4 -0
- package/package.json +3 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as i, Fragment as I2, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import s2, { useState as O, useRef as u2, useEffect as v2, useCallback as A0, useMemo as O2, useLayoutEffect as Q0, createContext as e1 } from "react";
|
|
3
3
|
import { useController as Z2 } from "react-hook-form";
|
|
4
4
|
import { createPortal as c0 } from "react-dom";
|
|
5
5
|
const t1 = {
|
|
@@ -115,7 +115,7 @@ const t1 = {
|
|
|
115
115
|
/* @__PURE__ */ e("path", { d: "M12 3a9 9 0 019 9", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" })
|
|
116
116
|
]
|
|
117
117
|
}
|
|
118
|
-
), d1 =
|
|
118
|
+
), d1 = s2.forwardRef(
|
|
119
119
|
({
|
|
120
120
|
variant: t = "primary",
|
|
121
121
|
size: r = "large",
|
|
@@ -132,39 +132,39 @@ const t1 = {
|
|
|
132
132
|
hoverLift: v = !1,
|
|
133
133
|
pressScale: u = !0,
|
|
134
134
|
disabled: f,
|
|
135
|
-
className:
|
|
136
|
-
style:
|
|
137
|
-
children:
|
|
135
|
+
className: F = "",
|
|
136
|
+
style: b,
|
|
137
|
+
children: D,
|
|
138
138
|
bgColor: m,
|
|
139
|
-
textColor:
|
|
139
|
+
textColor: w,
|
|
140
140
|
borderColor: H,
|
|
141
141
|
hoverBgColor: g,
|
|
142
142
|
hoverTextColor: B,
|
|
143
143
|
hoverBorderColor: S,
|
|
144
|
-
disabledBgColor:
|
|
144
|
+
disabledBgColor: Z,
|
|
145
145
|
disabledTextColor: M,
|
|
146
|
-
focusRingColor:
|
|
146
|
+
focusRingColor: $,
|
|
147
147
|
...p
|
|
148
|
-
},
|
|
149
|
-
const [
|
|
148
|
+
}, L) => {
|
|
149
|
+
const [k, y] = O(!1), [x, E] = O(!1), [R, r2] = O(!1), [W, J] = O([]), Y = u2(null), z = c1(C)[t], q = t1[r], n2 = r1[r], c2 = s1[r], e2 = s === "circle" || s === "square", i2 = e2 ? 0 : o1[r], a2 = o !== void 0 ? n1[o] : s === "circle" ? 9999 : 8, N = f || d, P = Math.max(12, Math.round(n2 * 1.2)), o2 = N ? Z ?? z.disabledBg : k ? g ?? z.hoverBg : m ?? z.bg, l2 = N ? Z ?? z.disabledBg : k ? S ?? z.hoverBorder ?? z.border : H ?? z.border, X = N ? M ?? z.disabledColor ?? z.color : k ? B ?? z.hoverColor ?? z.color : w ?? z.color, b2 = (j) => {
|
|
150
150
|
var K;
|
|
151
|
-
if (
|
|
152
|
-
const h2 =
|
|
153
|
-
|
|
151
|
+
if (E(!0), _ && !N && Y.current) {
|
|
152
|
+
const h2 = Y.current.getBoundingClientRect(), d2 = j.clientX - h2.left, R2 = j.clientY - h2.top, B2 = Math.max(h2.width, h2.height) * 2, D2 = Date.now() + Math.random();
|
|
153
|
+
J((V2) => [...V2, { id: D2, x: d2, y: R2, size: B2 }]), setTimeout(() => J((V2) => V2.filter((S2) => S2.id !== D2)), 600);
|
|
154
154
|
}
|
|
155
155
|
(K = p.onMouseDown) == null || K.call(p, j);
|
|
156
156
|
}, N2 = (j) => {
|
|
157
157
|
var K;
|
|
158
|
-
|
|
158
|
+
E(!1), (K = p.onMouseUp) == null || K.call(p, j);
|
|
159
159
|
}, G = (j) => {
|
|
160
160
|
var K;
|
|
161
|
-
|
|
162
|
-
},
|
|
161
|
+
y(!0), (K = p.onMouseEnter) == null || K.call(p, j);
|
|
162
|
+
}, U = (j) => {
|
|
163
163
|
var K;
|
|
164
|
-
|
|
164
|
+
y(!1), E(!1), (K = p.onMouseLeave) == null || K.call(p, j);
|
|
165
165
|
}, C2 = [];
|
|
166
|
-
v &&
|
|
167
|
-
const w2 = C2.length ? C2.join(" ") : "none", k2 =
|
|
166
|
+
v && k && !N && C2.push("translateY(-1px)"), u && x && !N && C2.push("scale(0.97)");
|
|
167
|
+
const w2 = C2.length ? C2.join(" ") : "none", k2 = R ? `0 0 0 3px ${$ ?? z.focusRing}` : v && k && !N ? "0 4px 12px rgba(0,0,0,0.08)" : "none";
|
|
168
168
|
return /* @__PURE__ */ i(I2, { children: [
|
|
169
169
|
/* @__PURE__ */ e("style", { children: `
|
|
170
170
|
@keyframes shekel-btn-spin { to { transform: rotate(360deg); } }
|
|
@@ -174,32 +174,32 @@ const t1 = {
|
|
|
174
174
|
"button",
|
|
175
175
|
{
|
|
176
176
|
ref: (j) => {
|
|
177
|
-
|
|
177
|
+
Y.current = j, typeof L == "function" ? L(j) : L && (L.current = j);
|
|
178
178
|
},
|
|
179
179
|
type: n,
|
|
180
180
|
disabled: N,
|
|
181
181
|
"aria-busy": d,
|
|
182
182
|
onMouseEnter: G,
|
|
183
|
-
onMouseLeave:
|
|
183
|
+
onMouseLeave: U,
|
|
184
184
|
onMouseDown: b2,
|
|
185
185
|
onMouseUp: N2,
|
|
186
186
|
onFocus: (j) => {
|
|
187
187
|
var h2, d2;
|
|
188
188
|
const K = j.target;
|
|
189
|
-
(h2 = K.matches) != null && h2.call(K, ":focus-visible") &&
|
|
189
|
+
(h2 = K.matches) != null && h2.call(K, ":focus-visible") && r2(!0), (d2 = p.onFocus) == null || d2.call(p, j);
|
|
190
190
|
},
|
|
191
191
|
onBlur: (j) => {
|
|
192
192
|
var K;
|
|
193
|
-
|
|
193
|
+
r2(!1), (K = p.onBlur) == null || K.call(p, j);
|
|
194
194
|
},
|
|
195
|
-
className: `inline-flex items-center justify-center font-medium select-none relative overflow-hidden ${a ? "w-full" : ""} ${N ? "cursor-not-allowed" : "cursor-pointer"} ${
|
|
195
|
+
className: `inline-flex items-center justify-center font-medium select-none relative overflow-hidden ${a ? "w-full" : ""} ${N ? "cursor-not-allowed" : "cursor-pointer"} ${F}`,
|
|
196
196
|
style: {
|
|
197
197
|
height: q,
|
|
198
|
-
width:
|
|
199
|
-
padding:
|
|
198
|
+
width: e2 ? q : a ? "100%" : void 0,
|
|
199
|
+
padding: e2 ? 0 : `0 ${i2}px`,
|
|
200
200
|
borderRadius: a2,
|
|
201
201
|
border: t === "link" || t === "text" ? "none" : `1px solid ${l2}`,
|
|
202
|
-
backgroundColor:
|
|
202
|
+
backgroundColor: o2,
|
|
203
203
|
color: X,
|
|
204
204
|
fontSize: n2,
|
|
205
205
|
gap: c2,
|
|
@@ -207,18 +207,18 @@ const t1 = {
|
|
|
207
207
|
boxShadow: k2,
|
|
208
208
|
opacity: t === "outline" && N ? 0.55 : 1,
|
|
209
209
|
transition: "background-color 180ms cubic-bezier(0.23, 1, 0.32, 1), color 150ms ease-out, border-color 180ms cubic-bezier(0.23, 1, 0.32, 1), transform 120ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 180ms ease-out",
|
|
210
|
-
textDecoration: t === "link" &&
|
|
211
|
-
...
|
|
210
|
+
textDecoration: t === "link" && k && !N ? "underline" : void 0,
|
|
211
|
+
...b
|
|
212
212
|
},
|
|
213
213
|
...p,
|
|
214
214
|
children: [
|
|
215
|
-
d && h === "left" && /* @__PURE__ */ e(H0, { size:
|
|
216
|
-
!d && c && h === "left" && /* @__PURE__ */ e("span", { className: "inline-flex items-center", style: { width:
|
|
217
|
-
!
|
|
218
|
-
|
|
219
|
-
!d && c && h === "right" && /* @__PURE__ */ e("span", { className: "inline-flex items-center", style: { width:
|
|
220
|
-
d && h === "right" && /* @__PURE__ */ e(H0, { size:
|
|
221
|
-
_ &&
|
|
215
|
+
d && h === "left" && /* @__PURE__ */ e(H0, { size: P }),
|
|
216
|
+
!d && c && h === "left" && /* @__PURE__ */ e("span", { className: "inline-flex items-center", style: { width: P, height: P }, children: c }),
|
|
217
|
+
!e2 && (d && l ? l : D),
|
|
218
|
+
e2 && !d && (c ?? D),
|
|
219
|
+
!d && c && h === "right" && /* @__PURE__ */ e("span", { className: "inline-flex items-center", style: { width: P, height: P }, children: c }),
|
|
220
|
+
d && h === "right" && /* @__PURE__ */ e(H0, { size: P }),
|
|
221
|
+
_ && W.map((j) => /* @__PURE__ */ e(
|
|
222
222
|
"span",
|
|
223
223
|
{
|
|
224
224
|
"aria-hidden": !0,
|
|
@@ -261,9 +261,9 @@ const Se = ({
|
|
|
261
261
|
size: v = "md",
|
|
262
262
|
rounded: u = "2xl",
|
|
263
263
|
detailed: f = !1,
|
|
264
|
-
minHeight:
|
|
264
|
+
minHeight: F = 120
|
|
265
265
|
}) => {
|
|
266
|
-
const
|
|
266
|
+
const b = v === "sm" ? "p-3" : v === "lg" ? "p-6" : "p-4", m = {
|
|
267
267
|
none: "rounded-none",
|
|
268
268
|
sm: "rounded-sm",
|
|
269
269
|
md: "rounded-md",
|
|
@@ -271,17 +271,17 @@ const Se = ({
|
|
|
271
271
|
xl: "rounded-xl",
|
|
272
272
|
"2xl": "rounded-2xl",
|
|
273
273
|
full: "rounded-full"
|
|
274
|
-
}[u] ?? "rounded-2xl",
|
|
274
|
+
}[u] ?? "rounded-2xl", w = /* @__PURE__ */ i("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
|
|
275
275
|
/* @__PURE__ */ e("rect", { x: "3", y: "6", width: "18", height: "12", rx: "2", stroke: "currentColor", strokeWidth: "2" }),
|
|
276
276
|
/* @__PURE__ */ e("path", { d: "M3 10h18M7 14h4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
277
277
|
] }), H = f ? `bg-white justify-between hover:border-gray-300 ${C ? "border-[#EC615B]" : "border-[#E6E6E6]"}` : `bg-[#FDFDFD] hover:bg-[#F4F4F4] focus:bg-[#F4F4F4] hover:border-[#181918] focus:border-[#181918] ${C ? "bg-[#F4F4F4] border-[#181918]" : "border-[#EEEEEE]"}`, g = f ? "0 0 0 1px #EC615B" : "0 0 0 1px #181918";
|
|
278
278
|
return /* @__PURE__ */ e(
|
|
279
279
|
"div",
|
|
280
280
|
{
|
|
281
|
-
className: `border flex flex-col transition-all duration-300 ease-in-out hover:-translate-y-1 cursor-pointer ${H} ${
|
|
281
|
+
className: `border flex flex-col transition-all duration-300 ease-in-out hover:-translate-y-1 cursor-pointer ${H} ${b} ${m} ${h}`,
|
|
282
282
|
style: {
|
|
283
283
|
width: typeof c == "number" ? `${c}px` : c || "96px",
|
|
284
|
-
minHeight: typeof
|
|
284
|
+
minHeight: typeof F == "number" ? `${F}px` : F,
|
|
285
285
|
boxShadow: C ? g : "0 0 0 0 rgba(0, 0, 0, 0)",
|
|
286
286
|
transition: "all 0.3s ease-in-out"
|
|
287
287
|
},
|
|
@@ -303,7 +303,7 @@ const Se = ({
|
|
|
303
303
|
backgroundColor: o,
|
|
304
304
|
color: n
|
|
305
305
|
},
|
|
306
|
-
children: s ||
|
|
306
|
+
children: s || w
|
|
307
307
|
}
|
|
308
308
|
),
|
|
309
309
|
l && l
|
|
@@ -342,7 +342,7 @@ const Se = ({
|
|
|
342
342
|
process.env.NODE_ENV !== "production" && console.warn(
|
|
343
343
|
"[Shekel Shared Lib] SearchInput is deprecated as of v1.0.11. Please use the new Input component instead for better functionality and consistent styling."
|
|
344
344
|
);
|
|
345
|
-
const
|
|
345
|
+
const F = "relative inline-flex items-center", b = "border focus:outline-none focus:ring-1 transition-all duration-200 ease-in-out", D = {
|
|
346
346
|
sm: "px-3 py-1.5 text-sm",
|
|
347
347
|
md: "px-4 py-2 text-base",
|
|
348
348
|
lg: "px-5 py-3 text-lg",
|
|
@@ -352,7 +352,7 @@ const Se = ({
|
|
|
352
352
|
md: "w-5 h-5",
|
|
353
353
|
lg: "w-6 h-6",
|
|
354
354
|
responsive: "w-4 sm:w-5 md:w-6 h-4 sm:h-5 md:h-6"
|
|
355
|
-
},
|
|
355
|
+
}, w = {
|
|
356
356
|
none: "rounded-none",
|
|
357
357
|
sm: "rounded-sm",
|
|
358
358
|
md: "rounded-lg",
|
|
@@ -363,10 +363,10 @@ const Se = ({
|
|
|
363
363
|
borderColor: l || "#D1D5DB",
|
|
364
364
|
color: C,
|
|
365
365
|
...u
|
|
366
|
-
}, S = _ ? "" : "placeholder:text-gray-400",
|
|
366
|
+
}, S = _ ? "" : "placeholder:text-gray-400", Z = l ? "" : "border-gray-300", M = C ? "" : "text-gray-900", $ = c ? "" : "focus:ring-[#EC615B] focus:border-[#EC615B]", p = `${b} ${!n.includes("px-") && !n.includes("py-") ? D[s] : ""} ${t ? H : ""} ${g} ${n.includes("rounded") ? "" : w[v]} ${n.includes("border-") ? "" : Z} ${M} ${$} ${S} ${n}`, L = r === "left" ? "left-3" : "right-3", k = h || "text-gray-400", y = h ? "" : "hover:text-gray-600", x = /* @__PURE__ */ e(
|
|
367
367
|
"svg",
|
|
368
368
|
{
|
|
369
|
-
className: `${m[s]} ${
|
|
369
|
+
className: `${m[s]} ${k}`,
|
|
370
370
|
xmlns: "http://www.w3.org/2000/svg",
|
|
371
371
|
fill: "none",
|
|
372
372
|
viewBox: "0 0 24 24",
|
|
@@ -382,13 +382,13 @@ const Se = ({
|
|
|
382
382
|
)
|
|
383
383
|
}
|
|
384
384
|
);
|
|
385
|
-
return /* @__PURE__ */ i("div", { className: `${
|
|
385
|
+
return /* @__PURE__ */ i("div", { className: `${F} ${g}`, children: [
|
|
386
386
|
t && /* @__PURE__ */ e(
|
|
387
387
|
"div",
|
|
388
388
|
{
|
|
389
|
-
className: `absolute ${
|
|
389
|
+
className: `absolute ${L} ${k} ${a ? "cursor-pointer" : ""} ${y}`,
|
|
390
390
|
onClick: a,
|
|
391
|
-
children: t === !0 ?
|
|
391
|
+
children: t === !0 ? x : t
|
|
392
392
|
}
|
|
393
393
|
),
|
|
394
394
|
/* @__PURE__ */ e(
|
|
@@ -431,22 +431,22 @@ const Se = ({
|
|
|
431
431
|
children: v,
|
|
432
432
|
...u
|
|
433
433
|
}) => {
|
|
434
|
-
const [f,
|
|
434
|
+
const [f, F] = s2.useState(!1), b = a && f ? S0.lg : S0[n];
|
|
435
435
|
return /* @__PURE__ */ i(
|
|
436
436
|
"div",
|
|
437
437
|
{
|
|
438
438
|
...u,
|
|
439
|
-
onMouseEnter: (
|
|
439
|
+
onMouseEnter: (D) => {
|
|
440
440
|
var m;
|
|
441
|
-
a &&
|
|
441
|
+
a && F(!0), (m = u.onMouseEnter) == null || m.call(u, D);
|
|
442
442
|
},
|
|
443
|
-
onMouseLeave: (
|
|
443
|
+
onMouseLeave: (D) => {
|
|
444
444
|
var m;
|
|
445
|
-
a &&
|
|
445
|
+
a && F(!1), (m = u.onMouseLeave) == null || m.call(u, D);
|
|
446
446
|
},
|
|
447
447
|
className: `bg-white rounded-xl overflow-hidden transition-shadow duration-200 ${o ? "border border-[#E6E6E6]" : ""} ${d}`,
|
|
448
448
|
style: {
|
|
449
|
-
boxShadow:
|
|
449
|
+
boxShadow: b,
|
|
450
450
|
..._
|
|
451
451
|
},
|
|
452
452
|
children: [
|
|
@@ -481,23 +481,23 @@ const Se = ({
|
|
|
481
481
|
borderColor: _,
|
|
482
482
|
style: v
|
|
483
483
|
}) => {
|
|
484
|
-
const [u, f] =
|
|
484
|
+
const [u, f] = O(!1), F = u2(null);
|
|
485
485
|
v2(() => {
|
|
486
|
-
const
|
|
487
|
-
|
|
486
|
+
const E = (R) => {
|
|
487
|
+
F.current && !F.current.contains(R.target) && f(!1);
|
|
488
488
|
};
|
|
489
|
-
return u && document.addEventListener("mousedown",
|
|
490
|
-
document.removeEventListener("mousedown",
|
|
489
|
+
return u && document.addEventListener("mousedown", E), () => {
|
|
490
|
+
document.removeEventListener("mousedown", E);
|
|
491
491
|
};
|
|
492
492
|
}, [u]);
|
|
493
|
-
const
|
|
493
|
+
const b = () => {
|
|
494
494
|
!d && r === "click" && f(!u);
|
|
495
|
-
},
|
|
495
|
+
}, D = () => {
|
|
496
496
|
!d && r === "hover" && f(!0);
|
|
497
497
|
}, m = () => {
|
|
498
498
|
!d && r === "hover" && f(!1);
|
|
499
|
-
},
|
|
500
|
-
!
|
|
499
|
+
}, w = (E) => {
|
|
500
|
+
!E.disabled && E.onClick && E.onClick(), f(!1);
|
|
501
501
|
}, H = {
|
|
502
502
|
bottomLeft: "top-full left-0 mt-1",
|
|
503
503
|
bottomRight: "top-full right-0 mt-1",
|
|
@@ -513,20 +513,20 @@ const Se = ({
|
|
|
513
513
|
md: "px-4 py-2 text-sm gap-2",
|
|
514
514
|
lg: "px-5 py-3 text-base gap-2.5",
|
|
515
515
|
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"
|
|
516
|
-
},
|
|
516
|
+
}, Z = "hover:bg-gray-50", M = "border-gray-200", $ = "text-red-600", p = h ? { backgroundColor: h } : {}, L = h ? "" : Z, k = C ? { color: C } : {}, y = C ? { backgroundColor: C + "15" } : {}, x = _ || M;
|
|
517
517
|
return /* @__PURE__ */ i(
|
|
518
518
|
"div",
|
|
519
519
|
{
|
|
520
|
-
ref:
|
|
520
|
+
ref: F,
|
|
521
521
|
className: `relative inline-block ${n}`,
|
|
522
|
-
onMouseEnter:
|
|
522
|
+
onMouseEnter: D,
|
|
523
523
|
onMouseLeave: m,
|
|
524
524
|
style: v,
|
|
525
525
|
children: [
|
|
526
526
|
/* @__PURE__ */ e(
|
|
527
527
|
"div",
|
|
528
528
|
{
|
|
529
|
-
onClick:
|
|
529
|
+
onClick: b,
|
|
530
530
|
className: `inline-flex ${d ? "cursor-not-allowed opacity-50" : "cursor-pointer"}`,
|
|
531
531
|
children: o
|
|
532
532
|
}
|
|
@@ -539,31 +539,31 @@ const Se = ({
|
|
|
539
539
|
children: /* @__PURE__ */ e(
|
|
540
540
|
"div",
|
|
541
541
|
{
|
|
542
|
-
className: `dropdown-menu rounded-lg shadow-lg border py-1 overflow-hidden ${
|
|
542
|
+
className: `dropdown-menu rounded-lg shadow-lg border py-1 overflow-hidden ${x}`,
|
|
543
543
|
style: { backgroundColor: c || "#ffffff" },
|
|
544
|
-
children: t.map((
|
|
545
|
-
let
|
|
546
|
-
return
|
|
547
|
-
...
|
|
548
|
-
...
|
|
549
|
-
} : h && (
|
|
544
|
+
children: t.map((E) => {
|
|
545
|
+
let R = {};
|
|
546
|
+
return E.disabled || (E.danger ? R = {
|
|
547
|
+
...k,
|
|
548
|
+
...y
|
|
549
|
+
} : h && (R = p)), /* @__PURE__ */ i(
|
|
550
550
|
"div",
|
|
551
551
|
{
|
|
552
|
-
onClick: () =>
|
|
552
|
+
onClick: () => w(E),
|
|
553
553
|
className: `
|
|
554
554
|
dropdown-menu-item
|
|
555
555
|
flex items-center cursor-pointer transition-all duration-200 ease-out
|
|
556
556
|
${!a.includes("px-") && !a.includes("py-") ? S[l] : ""}
|
|
557
|
-
${
|
|
558
|
-
${
|
|
557
|
+
${E.disabled ? "opacity-50 cursor-not-allowed" : L}
|
|
558
|
+
${E.danger ? C ? "" : $ : "text-gray-700"}
|
|
559
559
|
`,
|
|
560
|
-
style:
|
|
560
|
+
style: R,
|
|
561
561
|
children: [
|
|
562
|
-
|
|
563
|
-
/* @__PURE__ */ e("span", { children:
|
|
562
|
+
E.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: E.icon }),
|
|
563
|
+
/* @__PURE__ */ e("span", { children: E.label })
|
|
564
564
|
]
|
|
565
565
|
},
|
|
566
|
-
|
|
566
|
+
E.key
|
|
567
567
|
);
|
|
568
568
|
})
|
|
569
569
|
}
|
|
@@ -589,32 +589,32 @@ const Se = ({
|
|
|
589
589
|
showSearch: v = !1,
|
|
590
590
|
searchPlaceholder: u = "Search...",
|
|
591
591
|
bgColor: f,
|
|
592
|
-
borderColor:
|
|
593
|
-
focusBorderColor:
|
|
594
|
-
selectedBgColor:
|
|
592
|
+
borderColor: F,
|
|
593
|
+
focusBorderColor: b = "#EC615B",
|
|
594
|
+
selectedBgColor: D,
|
|
595
595
|
selectedTextColor: m,
|
|
596
|
-
hoverBgColor:
|
|
596
|
+
hoverBgColor: w,
|
|
597
597
|
rounded: H = "lg",
|
|
598
598
|
style: g,
|
|
599
599
|
label: B,
|
|
600
600
|
error: S,
|
|
601
|
-
helperText:
|
|
601
|
+
helperText: Z
|
|
602
602
|
}) => {
|
|
603
|
-
const [M,
|
|
603
|
+
const [M, $] = O(!1), [p, L] = O(s), [k, y] = O(""), x = u2(null), E = u2(null), R = r !== void 0 ? r : p;
|
|
604
604
|
v2(() => {
|
|
605
|
-
const N = (
|
|
606
|
-
|
|
605
|
+
const N = (P) => {
|
|
606
|
+
x.current && !x.current.contains(P.target) && ($(!1), y(""), M && (a == null || a()));
|
|
607
607
|
};
|
|
608
|
-
return M && (document.addEventListener("mousedown", N), v &&
|
|
608
|
+
return M && (document.addEventListener("mousedown", N), v && E.current && E.current.focus()), () => {
|
|
609
609
|
document.removeEventListener("mousedown", N);
|
|
610
610
|
};
|
|
611
611
|
}, [M, v]);
|
|
612
|
-
const
|
|
613
|
-
r === void 0 &&
|
|
614
|
-
},
|
|
615
|
-
N.stopPropagation(), r === void 0 &&
|
|
616
|
-
},
|
|
617
|
-
(N) => N.label.toLowerCase().includes(
|
|
612
|
+
const r2 = (N) => {
|
|
613
|
+
r === void 0 && L(N), n == null || n(N), $(!1), y("");
|
|
614
|
+
}, W = (N) => {
|
|
615
|
+
N.stopPropagation(), r === void 0 && L(void 0), n == null || n("");
|
|
616
|
+
}, J = t.find((N) => N.value === R), Y = v ? t.filter(
|
|
617
|
+
(N) => N.label.toLowerCase().includes(k.toLowerCase())
|
|
618
618
|
) : t, z = {
|
|
619
619
|
sm: "px-3 py-1.5 text-sm",
|
|
620
620
|
md: "px-4 py-2 text-base",
|
|
@@ -628,10 +628,10 @@ const Se = ({
|
|
|
628
628
|
full: "rounded-full"
|
|
629
629
|
}, n2 = h ? "w-full" : "min-w-[200px]", c2 = () => {
|
|
630
630
|
const N = {};
|
|
631
|
-
return f && (N.backgroundColor = f),
|
|
632
|
-
},
|
|
631
|
+
return f && (N.backgroundColor = f), F && (N.borderColor = F), N;
|
|
632
|
+
}, e2 = () => {
|
|
633
633
|
const N = {};
|
|
634
|
-
return
|
|
634
|
+
return D && (N.backgroundColor = D), m && (N.color = m), N;
|
|
635
635
|
}, i2 = /* @__PURE__ */ e(
|
|
636
636
|
"svg",
|
|
637
637
|
{
|
|
@@ -644,12 +644,12 @@ const Se = ({
|
|
|
644
644
|
), a2 = /* @__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" }) });
|
|
645
645
|
return /* @__PURE__ */ i("div", { className: `relative inline-block ${n2}`, style: g, children: [
|
|
646
646
|
B && /* @__PURE__ */ e("label", { className: "block text-sm font-medium mb-2", style: { color: S ? "#C21919" : "#181918" }, children: B }),
|
|
647
|
-
/* @__PURE__ */ i("div", { ref:
|
|
648
|
-
/* @__PURE__ */ e("input", { type: "hidden", name: d, value:
|
|
647
|
+
/* @__PURE__ */ i("div", { ref: x, className: "relative", children: [
|
|
648
|
+
/* @__PURE__ */ e("input", { type: "hidden", name: d, value: R ?? "", readOnly: !0 }),
|
|
649
649
|
/* @__PURE__ */ i(
|
|
650
650
|
"div",
|
|
651
651
|
{
|
|
652
|
-
onClick: () => !l &&
|
|
652
|
+
onClick: () => !l && $(!M),
|
|
653
653
|
className: `
|
|
654
654
|
select-trigger
|
|
655
655
|
flex items-center justify-between gap-2
|
|
@@ -663,28 +663,28 @@ const Se = ({
|
|
|
663
663
|
style: {
|
|
664
664
|
...c2(),
|
|
665
665
|
backgroundColor: f || c2().backgroundColor || "#FFFFFF",
|
|
666
|
-
borderColor: S ? "#C21919" :
|
|
666
|
+
borderColor: S ? "#C21919" : F || c2().borderColor || "#D1D5DB",
|
|
667
667
|
...M && {
|
|
668
|
-
borderColor: S ? "#C21919" :
|
|
669
|
-
boxShadow: `0 0 0 2px ${S ? "#C21919" :
|
|
668
|
+
borderColor: S ? "#C21919" : b,
|
|
669
|
+
boxShadow: `0 0 0 2px ${S ? "#C21919" : b}20`
|
|
670
670
|
},
|
|
671
|
-
...!l && !M &&
|
|
671
|
+
...!l && !M && w && {
|
|
672
672
|
cursor: "pointer"
|
|
673
673
|
}
|
|
674
674
|
},
|
|
675
675
|
onMouseEnter: (N) => {
|
|
676
|
-
!l &&
|
|
676
|
+
!l && w && (N.currentTarget.style.backgroundColor = w);
|
|
677
677
|
},
|
|
678
678
|
onMouseLeave: (N) => {
|
|
679
679
|
f ? N.currentTarget.style.backgroundColor = f : N.currentTarget.style.backgroundColor = "#FFFFFF";
|
|
680
680
|
},
|
|
681
681
|
children: [
|
|
682
|
-
/* @__PURE__ */ e("span", { className:
|
|
682
|
+
/* @__PURE__ */ e("span", { className: J ? "text-gray-900" : "text-gray-400", children: J ? J.label : o }),
|
|
683
683
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
|
|
684
|
-
_ &&
|
|
684
|
+
_ && R && !l && /* @__PURE__ */ e(
|
|
685
685
|
"span",
|
|
686
686
|
{
|
|
687
|
-
onClick:
|
|
687
|
+
onClick: W,
|
|
688
688
|
className: "text-gray-400 hover:text-gray-600 transition-colors duration-200 ease-out",
|
|
689
689
|
children: a2
|
|
690
690
|
}
|
|
@@ -698,39 +698,39 @@ const Se = ({
|
|
|
698
698
|
v && /* @__PURE__ */ e("div", { className: "px-2 py-2 border-b border-gray-200", children: /* @__PURE__ */ e(
|
|
699
699
|
"input",
|
|
700
700
|
{
|
|
701
|
-
ref:
|
|
701
|
+
ref: E,
|
|
702
702
|
type: "text",
|
|
703
|
-
value:
|
|
704
|
-
onChange: (N) =>
|
|
703
|
+
value: k,
|
|
704
|
+
onChange: (N) => y(N.target.value),
|
|
705
705
|
placeholder: u,
|
|
706
706
|
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",
|
|
707
707
|
style: {
|
|
708
|
-
borderColor:
|
|
709
|
-
boxShadow: `0 0 0 2px ${
|
|
708
|
+
borderColor: F,
|
|
709
|
+
boxShadow: `0 0 0 2px ${b}20`
|
|
710
710
|
},
|
|
711
711
|
onClick: (N) => N.stopPropagation()
|
|
712
712
|
}
|
|
713
713
|
) }),
|
|
714
|
-
|
|
714
|
+
Y.length === 0 ? /* @__PURE__ */ e("div", { className: "px-4 py-3 text-sm text-gray-500 text-center", children: "No results found" }) : Y.map((N) => /* @__PURE__ */ e(
|
|
715
715
|
"div",
|
|
716
716
|
{
|
|
717
|
-
onClick: () => !N.disabled &&
|
|
717
|
+
onClick: () => !N.disabled && r2(N.value),
|
|
718
718
|
className: `
|
|
719
719
|
select-option
|
|
720
720
|
px-4 py-2 text-sm transition-all duration-200 ease-out
|
|
721
721
|
${N.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
722
722
|
`,
|
|
723
723
|
style: {
|
|
724
|
-
...N.value ===
|
|
725
|
-
backgroundColor: N.value ===
|
|
726
|
-
color: N.value ===
|
|
727
|
-
fontWeight: N.value ===
|
|
724
|
+
...N.value === R ? e2() : {},
|
|
725
|
+
backgroundColor: N.value === R ? D || "#FCEAE9" : void 0,
|
|
726
|
+
color: N.value === R ? m || "#EC615B" : "#181918",
|
|
727
|
+
fontWeight: N.value === R ? "medium" : void 0
|
|
728
728
|
},
|
|
729
|
-
onMouseEnter: (
|
|
730
|
-
!N.disabled && N.value !==
|
|
729
|
+
onMouseEnter: (P) => {
|
|
730
|
+
!N.disabled && N.value !== R && (P.currentTarget.style.backgroundColor = w || "#F3F4F6");
|
|
731
731
|
},
|
|
732
|
-
onMouseLeave: (
|
|
733
|
-
N.value !==
|
|
732
|
+
onMouseLeave: (P) => {
|
|
733
|
+
N.value !== R && (P.currentTarget.style.backgroundColor = "transparent");
|
|
734
734
|
},
|
|
735
735
|
children: N.label
|
|
736
736
|
},
|
|
@@ -749,7 +749,7 @@ const Se = ({
|
|
|
749
749
|
) }),
|
|
750
750
|
S
|
|
751
751
|
] }),
|
|
752
|
-
!S &&
|
|
752
|
+
!S && Z && /* @__PURE__ */ e("div", { className: "mt-1 text-xs text-gray-500", children: Z })
|
|
753
753
|
] });
|
|
754
754
|
}, p1 = ({
|
|
755
755
|
control: t,
|
|
@@ -786,12 +786,12 @@ const Se = ({
|
|
|
786
786
|
rowHoverColor: v,
|
|
787
787
|
borderColor: u,
|
|
788
788
|
stripedRowColor: f,
|
|
789
|
-
rounded:
|
|
790
|
-
style:
|
|
789
|
+
rounded: F = "md",
|
|
790
|
+
style: b
|
|
791
791
|
}) => {
|
|
792
|
-
const [
|
|
792
|
+
const [D, m] = O(
|
|
793
793
|
o && typeof o == "object" && o.current || 1
|
|
794
|
-
), [
|
|
794
|
+
), [w, H] = O(
|
|
795
795
|
o && typeof o == "object" && o.pageSize || 10
|
|
796
796
|
), g = {
|
|
797
797
|
sm: {
|
|
@@ -829,16 +829,16 @@ const Se = ({
|
|
|
829
829
|
lg: "rounded-lg",
|
|
830
830
|
xl: "rounded-xl",
|
|
831
831
|
"2xl": "rounded-2xl"
|
|
832
|
-
}, S = g[h],
|
|
833
|
-
m(
|
|
834
|
-
},
|
|
835
|
-
H(
|
|
832
|
+
}, S = g[h], Z = B[F], M = (y, x) => typeof s == "function" ? s(y) : y[s] || String(x), $ = (y, x) => x ? x.split(".").reduce((E, R) => E == null ? void 0 : E[R], y) : y, p = o === !1 ? r : r.slice((D - 1) * w, D * w), L = (y) => {
|
|
833
|
+
m(y), o && typeof o == "object" && o.onChange && o.onChange(y, w);
|
|
834
|
+
}, k = (y) => {
|
|
835
|
+
H(y), m(1), o && typeof o == "object" && o.onChange && o.onChange(1, y);
|
|
836
836
|
};
|
|
837
|
-
return /* @__PURE__ */ i("div", { className: "w-full", style:
|
|
837
|
+
return /* @__PURE__ */ i("div", { className: "w-full", style: b, children: [
|
|
838
838
|
/* @__PURE__ */ e(
|
|
839
839
|
"div",
|
|
840
840
|
{
|
|
841
|
-
className: `overflow-x-auto ${
|
|
841
|
+
className: `overflow-x-auto ${Z || "rounded-2xl"} border`,
|
|
842
842
|
style: { borderColor: u || "#EEEEEE" },
|
|
843
843
|
children: /* @__PURE__ */ i("table", { className: `w-full ${l ? "border-collapse" : ""} ${d}`, children: [
|
|
844
844
|
/* @__PURE__ */ e(
|
|
@@ -848,18 +848,18 @@ const Se = ({
|
|
|
848
848
|
backgroundColor: C || "#F5F6F7",
|
|
849
849
|
color: _ || "#333333"
|
|
850
850
|
},
|
|
851
|
-
children: /* @__PURE__ */ e("tr", { children: t.map((
|
|
851
|
+
children: /* @__PURE__ */ e("tr", { children: t.map((y, x) => /* @__PURE__ */ e(
|
|
852
852
|
"th",
|
|
853
853
|
{
|
|
854
|
-
className: `${S.headerPadding} text-left ${S.headerFontSize} font-medium uppercase tracking-wider ${l &&
|
|
854
|
+
className: `${S.headerPadding} text-left ${S.headerFontSize} font-medium uppercase tracking-wider ${l && x !== t.length - 1 ? "border-r" : ""} ${y.align === "center" ? "text-center" : y.align === "right" ? "text-right" : ""}`,
|
|
855
855
|
style: {
|
|
856
|
-
width:
|
|
856
|
+
width: y.width,
|
|
857
857
|
borderColor: u || "#EEEEEE",
|
|
858
858
|
color: _ || "#333333"
|
|
859
859
|
},
|
|
860
|
-
children:
|
|
860
|
+
children: y.title
|
|
861
861
|
},
|
|
862
|
-
|
|
862
|
+
y.key
|
|
863
863
|
)) })
|
|
864
864
|
}
|
|
865
865
|
),
|
|
@@ -916,38 +916,38 @@ const Se = ({
|
|
|
916
916
|
style: { color: "#333333" },
|
|
917
917
|
children: "No data"
|
|
918
918
|
}
|
|
919
|
-
) }) : p.map((
|
|
920
|
-
const
|
|
919
|
+
) }) : p.map((y, x) => {
|
|
920
|
+
const E = a ? a(y, x) : {}, R = c && x % 2 === 1 ? f || "#F5F6F7" : "transparent", r2 = v || "#f3f4f6";
|
|
921
921
|
return /* @__PURE__ */ e(
|
|
922
922
|
"tr",
|
|
923
923
|
{
|
|
924
924
|
className: "transition-colors duration-200 ease-out",
|
|
925
925
|
style: {
|
|
926
|
-
backgroundColor:
|
|
926
|
+
backgroundColor: R
|
|
927
927
|
},
|
|
928
|
-
onMouseEnter: (
|
|
929
|
-
(v || !c ||
|
|
928
|
+
onMouseEnter: (W) => {
|
|
929
|
+
(v || !c || x % 2 === 0) && (W.currentTarget.style.backgroundColor = r2);
|
|
930
930
|
},
|
|
931
|
-
onMouseLeave: (
|
|
932
|
-
|
|
931
|
+
onMouseLeave: (W) => {
|
|
932
|
+
W.currentTarget.style.backgroundColor = R;
|
|
933
933
|
},
|
|
934
|
-
...
|
|
935
|
-
children: t.map((
|
|
936
|
-
const
|
|
934
|
+
...E,
|
|
935
|
+
children: t.map((W, J) => {
|
|
936
|
+
const Y = $(y, W.dataIndex), z = W.render ? W.render(Y, y, x) : Y;
|
|
937
937
|
return /* @__PURE__ */ e(
|
|
938
938
|
"td",
|
|
939
939
|
{
|
|
940
|
-
className: `${S.rowPadding} ${S.rowFontSize} text-gray-900 ${l &&
|
|
940
|
+
className: `${S.rowPadding} ${S.rowFontSize} text-gray-900 ${l && J !== t.length - 1 ? "border-r" : ""} ${W.align === "center" ? "text-center" : W.align === "right" ? "text-right" : ""}`,
|
|
941
941
|
style: {
|
|
942
942
|
borderColor: u || "#EEEEEE"
|
|
943
943
|
},
|
|
944
944
|
children: z
|
|
945
945
|
},
|
|
946
|
-
|
|
946
|
+
W.key
|
|
947
947
|
);
|
|
948
948
|
})
|
|
949
949
|
},
|
|
950
|
-
M(
|
|
950
|
+
M(y, x)
|
|
951
951
|
);
|
|
952
952
|
})
|
|
953
953
|
}
|
|
@@ -958,11 +958,11 @@ const Se = ({
|
|
|
958
958
|
o !== !1 && /* @__PURE__ */ e(
|
|
959
959
|
C1,
|
|
960
960
|
{
|
|
961
|
-
current:
|
|
962
|
-
pageSize:
|
|
961
|
+
current: D,
|
|
962
|
+
pageSize: w,
|
|
963
963
|
total: r.length,
|
|
964
|
-
onChange:
|
|
965
|
-
onPageSizeChange:
|
|
964
|
+
onChange: L,
|
|
965
|
+
onPageSizeChange: k,
|
|
966
966
|
showSizeChanger: o && typeof o == "object" ? o.showSizeChanger : !0,
|
|
967
967
|
pageSizeOptions: o && typeof o == "object" ? o.pageSizeOptions : [10, 20, 50, 100],
|
|
968
968
|
showTotal: o && typeof o == "object" ? o.showTotal : !0,
|
|
@@ -1000,17 +1000,17 @@ const Se = ({
|
|
|
1000
1000
|
}, u = () => {
|
|
1001
1001
|
const f = [];
|
|
1002
1002
|
if (h <= 7)
|
|
1003
|
-
for (let
|
|
1004
|
-
f.push(
|
|
1003
|
+
for (let b = 1; b <= h; b++)
|
|
1004
|
+
f.push(b);
|
|
1005
1005
|
else if (t <= 3) {
|
|
1006
|
-
for (let
|
|
1006
|
+
for (let b = 1; b <= 5; b++) f.push(b);
|
|
1007
1007
|
f.push("..."), f.push(h);
|
|
1008
1008
|
} else if (t >= h - 2) {
|
|
1009
1009
|
f.push(1), f.push("...");
|
|
1010
|
-
for (let
|
|
1010
|
+
for (let b = h - 4; b <= h; b++) f.push(b);
|
|
1011
1011
|
} else {
|
|
1012
1012
|
f.push(1), f.push("...");
|
|
1013
|
-
for (let
|
|
1013
|
+
for (let b = t - 1; b <= t + 1; b++) f.push(b);
|
|
1014
1014
|
f.push("..."), f.push(h);
|
|
1015
1015
|
}
|
|
1016
1016
|
return f;
|
|
@@ -1056,13 +1056,13 @@ const Se = ({
|
|
|
1056
1056
|
) })
|
|
1057
1057
|
}
|
|
1058
1058
|
),
|
|
1059
|
-
u().map((f,
|
|
1059
|
+
u().map((f, F) => f === "..." ? /* @__PURE__ */ e(
|
|
1060
1060
|
"span",
|
|
1061
1061
|
{
|
|
1062
1062
|
className: `relative inline-flex items-center justify-center ${v[c].button} font-normal text-[#181918]`,
|
|
1063
1063
|
children: "..."
|
|
1064
1064
|
},
|
|
1065
|
-
`ellipsis-${
|
|
1065
|
+
`ellipsis-${F}`
|
|
1066
1066
|
) : /* @__PURE__ */ e(
|
|
1067
1067
|
"button",
|
|
1068
1068
|
{
|
|
@@ -1108,12 +1108,12 @@ const Se = ({
|
|
|
1108
1108
|
searchFocusBorderColor: v = "#3b82f6",
|
|
1109
1109
|
rounded: u = "md",
|
|
1110
1110
|
style: f,
|
|
1111
|
-
hideActionButtons:
|
|
1112
|
-
selectedActionButton:
|
|
1111
|
+
hideActionButtons: F = !1,
|
|
1112
|
+
selectedActionButton: b
|
|
1113
1113
|
}) => {
|
|
1114
|
-
const
|
|
1114
|
+
const D = (S) => {
|
|
1115
1115
|
o == null || o(S.target.value);
|
|
1116
|
-
},
|
|
1116
|
+
}, w = {
|
|
1117
1117
|
sm: {
|
|
1118
1118
|
titleSize: "text-lg",
|
|
1119
1119
|
titleWeight: "font-semibold",
|
|
@@ -1179,14 +1179,14 @@ const Se = ({
|
|
|
1179
1179
|
return /* @__PURE__ */ i(
|
|
1180
1180
|
"div",
|
|
1181
1181
|
{
|
|
1182
|
-
className: `${
|
|
1182
|
+
className: `${w.spacing} mb-4 ${d}`,
|
|
1183
1183
|
style: f,
|
|
1184
1184
|
children: [
|
|
1185
1185
|
(t || r) && /* @__PURE__ */ i("div", { children: [
|
|
1186
1186
|
t && /* @__PURE__ */ e(
|
|
1187
1187
|
"h2",
|
|
1188
1188
|
{
|
|
1189
|
-
className: `${
|
|
1189
|
+
className: `${w.titleSize} ${w.titleWeight}`,
|
|
1190
1190
|
style: { color: c || "#111827" },
|
|
1191
1191
|
children: t
|
|
1192
1192
|
}
|
|
@@ -1194,18 +1194,18 @@ const Se = ({
|
|
|
1194
1194
|
r && /* @__PURE__ */ e(
|
|
1195
1195
|
"p",
|
|
1196
1196
|
{
|
|
1197
|
-
className: `${
|
|
1197
|
+
className: `${w.descriptionSize} ${w.descriptionMargin}`,
|
|
1198
1198
|
style: { color: h || "#6b7280" },
|
|
1199
1199
|
children: r
|
|
1200
1200
|
}
|
|
1201
1201
|
)
|
|
1202
1202
|
] }),
|
|
1203
|
-
/* @__PURE__ */ i("div", { className: `flex flex-col sm:flex-row items-stretch sm:items-center justify-between ${
|
|
1204
|
-
o && /* @__PURE__ */ e("div", { className: `flex-1 ${
|
|
1203
|
+
/* @__PURE__ */ i("div", { className: `flex flex-col sm:flex-row items-stretch sm:items-center justify-between ${w.gap}`, children: [
|
|
1204
|
+
o && /* @__PURE__ */ e("div", { className: `flex-1 ${w.maxWidth}`, children: /* @__PURE__ */ i("div", { className: "relative", children: [
|
|
1205
1205
|
/* @__PURE__ */ e("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ e(
|
|
1206
1206
|
"svg",
|
|
1207
1207
|
{
|
|
1208
|
-
className: `${
|
|
1208
|
+
className: `${w.iconSize} text-gray-400`,
|
|
1209
1209
|
fill: "none",
|
|
1210
1210
|
stroke: "currentColor",
|
|
1211
1211
|
viewBox: "0 0 24 24",
|
|
@@ -1225,8 +1225,8 @@ const Se = ({
|
|
|
1225
1225
|
{
|
|
1226
1226
|
type: "text",
|
|
1227
1227
|
placeholder: s,
|
|
1228
|
-
onChange:
|
|
1229
|
-
className: `block w-full ${
|
|
1228
|
+
onChange: D,
|
|
1229
|
+
className: `block w-full ${w.searchPaddingLeft} pr-3 ${w.searchInputPy} border ${g} focus:outline-none focus:ring-2 focus:ring-opacity-50 ${w.searchInputSize} transition-colors duration-200`,
|
|
1230
1230
|
style: B,
|
|
1231
1231
|
onFocus: (S) => {
|
|
1232
1232
|
S.currentTarget.style.borderColor = v, S.currentTarget.style.boxShadow = "0 0 0 2px rgba(59, 130, 246, 0.1)";
|
|
@@ -1237,9 +1237,9 @@ const Se = ({
|
|
|
1237
1237
|
}
|
|
1238
1238
|
)
|
|
1239
1239
|
] }) }),
|
|
1240
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 w-full sm:w-auto", children:
|
|
1240
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 w-full sm:w-auto", children: F && b ? b : n })
|
|
1241
1241
|
] }),
|
|
1242
|
-
a && /* @__PURE__ */ e("div", { className: `flex flex-wrap items-center ${
|
|
1242
|
+
a && /* @__PURE__ */ e("div", { className: `flex flex-wrap items-center ${w.gap}`, children: a })
|
|
1243
1243
|
]
|
|
1244
1244
|
}
|
|
1245
1245
|
);
|
|
@@ -1311,75 +1311,75 @@ const Se = ({
|
|
|
1311
1311
|
okDisabled: v,
|
|
1312
1312
|
hideCancel: u,
|
|
1313
1313
|
size: f = "md",
|
|
1314
|
-
width:
|
|
1315
|
-
maxHeight:
|
|
1316
|
-
placement:
|
|
1314
|
+
width: F,
|
|
1315
|
+
maxHeight: b,
|
|
1316
|
+
placement: D,
|
|
1317
1317
|
centered: m = !0,
|
|
1318
|
-
edgeOffset:
|
|
1318
|
+
edgeOffset: w = 40,
|
|
1319
1319
|
motion: H = "auto",
|
|
1320
1320
|
backdrop: g = "normal",
|
|
1321
1321
|
closeIcon: B,
|
|
1322
1322
|
submitOnEnter: S = !1,
|
|
1323
|
-
bare:
|
|
1323
|
+
bare: Z = !1,
|
|
1324
1324
|
noPadding: M = !1,
|
|
1325
|
-
closable:
|
|
1325
|
+
closable: $ = !0,
|
|
1326
1326
|
maskClosable: p = !0,
|
|
1327
|
-
closeOnEsc:
|
|
1328
|
-
destroyOnClose:
|
|
1329
|
-
lockScroll:
|
|
1330
|
-
bgColor:
|
|
1331
|
-
overlayColor:
|
|
1332
|
-
borderRadius:
|
|
1333
|
-
shadow:
|
|
1334
|
-
animationDuration:
|
|
1335
|
-
zIndex:
|
|
1336
|
-
className:
|
|
1327
|
+
closeOnEsc: L = !0,
|
|
1328
|
+
destroyOnClose: k = !1,
|
|
1329
|
+
lockScroll: y = !0,
|
|
1330
|
+
bgColor: x = "#FFFFFF",
|
|
1331
|
+
overlayColor: E = "rgba(0, 0, 0, 0.45)",
|
|
1332
|
+
borderRadius: R = 16,
|
|
1333
|
+
shadow: r2 = "0 6px 16px rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05)",
|
|
1334
|
+
animationDuration: W = 200,
|
|
1335
|
+
zIndex: J = 1e3,
|
|
1336
|
+
className: Y = "",
|
|
1337
1337
|
style: z,
|
|
1338
1338
|
headerClassName: q = "",
|
|
1339
1339
|
headerStyle: n2,
|
|
1340
1340
|
bodyClassName: c2 = "",
|
|
1341
|
-
bodyStyle:
|
|
1341
|
+
bodyStyle: e2,
|
|
1342
1342
|
footerClassName: i2 = "",
|
|
1343
1343
|
footerStyle: a2,
|
|
1344
1344
|
ariaLabel: N,
|
|
1345
|
-
ariaLabelledBy:
|
|
1346
|
-
afterOpen:
|
|
1345
|
+
ariaLabelledBy: P,
|
|
1346
|
+
afterOpen: o2,
|
|
1347
1347
|
afterClose: l2,
|
|
1348
1348
|
getContainer: X
|
|
1349
1349
|
}) => {
|
|
1350
|
-
const [b2, N2] =
|
|
1350
|
+
const [b2, N2] = O(t), [G, U] = O(!1), [C2, w2] = O(!1), k2 = u2(null), j = u2(null), K = u2(`shekel-modal-title-${Math.random().toString(36).slice(2, 8)}`), h2 = u2(null), d2 = A0(() => {
|
|
1351
1351
|
h == null || h(), r == null || r();
|
|
1352
1352
|
}, [h, r]);
|
|
1353
1353
|
v2(() => {
|
|
1354
1354
|
if (t) {
|
|
1355
1355
|
h2.current = typeof document < "u" ? document.activeElement : null, N2(!0);
|
|
1356
|
-
let
|
|
1356
|
+
let Q;
|
|
1357
1357
|
const _2 = requestAnimationFrame(() => {
|
|
1358
|
-
|
|
1359
|
-
|
|
1358
|
+
Q = requestAnimationFrame(() => {
|
|
1359
|
+
U(!0), o2 == null || o2();
|
|
1360
1360
|
});
|
|
1361
1361
|
});
|
|
1362
1362
|
return () => {
|
|
1363
|
-
cancelAnimationFrame(_2),
|
|
1363
|
+
cancelAnimationFrame(_2), Q && cancelAnimationFrame(Q);
|
|
1364
1364
|
};
|
|
1365
1365
|
} else {
|
|
1366
1366
|
if (!b2) return;
|
|
1367
|
-
|
|
1368
|
-
const
|
|
1367
|
+
U(!1);
|
|
1368
|
+
const Q = setTimeout(() => {
|
|
1369
1369
|
N2(!1), l2 == null || l2(), h2.current && typeof h2.current.focus == "function" && h2.current.focus();
|
|
1370
|
-
},
|
|
1371
|
-
return () => clearTimeout(
|
|
1370
|
+
}, W);
|
|
1371
|
+
return () => clearTimeout(Q);
|
|
1372
1372
|
}
|
|
1373
|
-
}, [t,
|
|
1374
|
-
if (!
|
|
1375
|
-
const
|
|
1376
|
-
return A > 0 && (
|
|
1377
|
-
|
|
1373
|
+
}, [t, W]), v2(() => {
|
|
1374
|
+
if (!y || !b2) return;
|
|
1375
|
+
const Q = document.body, _2 = Q.style.overflow, Y2 = Q.style.paddingRight, A = window.innerWidth - document.documentElement.clientWidth;
|
|
1376
|
+
return A > 0 && (Q.style.paddingRight = `${A}px`), Q.style.overflow = "hidden", () => {
|
|
1377
|
+
Q.style.overflow = _2, Q.style.paddingRight = Y2;
|
|
1378
1378
|
};
|
|
1379
|
-
}, [b2,
|
|
1379
|
+
}, [b2, y]), v2(() => {
|
|
1380
1380
|
if (!b2) return;
|
|
1381
|
-
const
|
|
1382
|
-
if (
|
|
1381
|
+
const Q = (_2) => {
|
|
1382
|
+
if (L && _2.key === "Escape") {
|
|
1383
1383
|
_2.stopPropagation(), d2();
|
|
1384
1384
|
return;
|
|
1385
1385
|
}
|
|
@@ -1392,25 +1392,25 @@ const Se = ({
|
|
|
1392
1392
|
const A = Y2[0], g2 = Y2[Y2.length - 1], G2 = document.activeElement;
|
|
1393
1393
|
_2.shiftKey && G2 === A ? (_2.preventDefault(), g2.focus()) : !_2.shiftKey && G2 === g2 && (_2.preventDefault(), A.focus());
|
|
1394
1394
|
};
|
|
1395
|
-
return document.addEventListener("keydown",
|
|
1396
|
-
}, [b2,
|
|
1395
|
+
return document.addEventListener("keydown", Q), () => document.removeEventListener("keydown", Q);
|
|
1396
|
+
}, [b2, L, d2]), v2(() => {
|
|
1397
1397
|
if (!G || !j.current) return;
|
|
1398
1398
|
const _2 = j.current.querySelectorAll(E0)[0];
|
|
1399
1399
|
_2 ? _2.focus() : j.current.focus();
|
|
1400
1400
|
}, [G]);
|
|
1401
|
-
const R2 = (
|
|
1402
|
-
p &&
|
|
1401
|
+
const R2 = (Q) => {
|
|
1402
|
+
p && Q.target === k2.current && d2();
|
|
1403
1403
|
}, B2 = async () => {
|
|
1404
1404
|
if (c)
|
|
1405
1405
|
try {
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1406
|
+
const Q = c();
|
|
1407
|
+
Q && typeof Q.then == "function" && (w2(!0), await Q);
|
|
1408
1408
|
} finally {
|
|
1409
1409
|
w2(!1);
|
|
1410
1410
|
}
|
|
1411
1411
|
};
|
|
1412
1412
|
if (!b2) return null;
|
|
1413
|
-
const D2 =
|
|
1413
|
+
const D2 = D ?? (m ? "center" : "top"), V2 = {
|
|
1414
1414
|
"top-left": { justify: "flex-start", align: "flex-start" },
|
|
1415
1415
|
top: { justify: "center", align: "flex-start" },
|
|
1416
1416
|
"top-right": { justify: "flex-end", align: "flex-start" },
|
|
@@ -1437,11 +1437,11 @@ const Se = ({
|
|
|
1437
1437
|
"slide-down": { closed: "translateY(-20px)", open: "translateY(0)" },
|
|
1438
1438
|
"slide-left": { closed: "translateX(20px)", open: "translateX(0)" },
|
|
1439
1439
|
"slide-right": { closed: "translateX(-20px)", open: "translateX(0)" }
|
|
1440
|
-
}, T = j2 === "auto" ? "scale" : j2, { closed: x2, open: F2 } = P2[T], H2 = typeof
|
|
1441
|
-
backgroundColor:
|
|
1440
|
+
}, T = j2 === "auto" ? "scale" : j2, { closed: x2, open: F2 } = P2[T], H2 = typeof w == "number" ? `${w}px` : w, V = g === "none" ? { backgroundColor: "transparent" } : g === "blur" ? {
|
|
1441
|
+
backgroundColor: E,
|
|
1442
1442
|
backdropFilter: "blur(6px)",
|
|
1443
1443
|
WebkitBackdropFilter: "blur(6px)"
|
|
1444
|
-
} : { backgroundColor:
|
|
1444
|
+
} : { backgroundColor: E }, t2 = F ?? h1[f], f2 = typeof R == "number" ? `${R}px` : R, m2 = b !== void 0 ? typeof b == "number" ? `${b}px` : b : f === "full" ? "100vh" : "calc(100vh - 40px)", y2 = a === null || a === !1 ? null : a === void 0 ? a === void 0 && (c || h) ? /* @__PURE__ */ i(I2, { children: [
|
|
1445
1445
|
!u && /* @__PURE__ */ e(B0, { variant: "outline", onClick: () => d2(), children: l }),
|
|
1446
1446
|
c && /* @__PURE__ */ e(
|
|
1447
1447
|
B0,
|
|
@@ -1453,7 +1453,7 @@ const Se = ({
|
|
|
1453
1453
|
children: d
|
|
1454
1454
|
}
|
|
1455
1455
|
)
|
|
1456
|
-
] }) : null : a, M2 =
|
|
1456
|
+
] }) : null : a, M2 = P ?? (typeof s == "string" ? K.current : void 0), $2 = X ? X() : typeof document < "u" ? document.body : null;
|
|
1457
1457
|
if (!$2) return null;
|
|
1458
1458
|
const T2 = /* @__PURE__ */ i(
|
|
1459
1459
|
"div",
|
|
@@ -1466,13 +1466,13 @@ const Se = ({
|
|
|
1466
1466
|
style: {
|
|
1467
1467
|
position: "fixed",
|
|
1468
1468
|
inset: 0,
|
|
1469
|
-
zIndex:
|
|
1469
|
+
zIndex: J,
|
|
1470
1470
|
display: "flex",
|
|
1471
1471
|
alignItems: E2,
|
|
1472
1472
|
justifyContent: S2,
|
|
1473
1473
|
padding: f === "full" ? 0 : H2,
|
|
1474
1474
|
opacity: G ? 1 : 0,
|
|
1475
|
-
transition: `opacity ${
|
|
1475
|
+
transition: `opacity ${W}ms ease-out, backdrop-filter ${W}ms ease-out`,
|
|
1476
1476
|
overflowY: "auto",
|
|
1477
1477
|
willChange: "opacity",
|
|
1478
1478
|
...V
|
|
@@ -1498,29 +1498,29 @@ const Se = ({
|
|
|
1498
1498
|
"aria-label": N,
|
|
1499
1499
|
"aria-labelledby": M2,
|
|
1500
1500
|
tabIndex: -1,
|
|
1501
|
-
onMouseDown: (
|
|
1502
|
-
onKeyDown: (
|
|
1503
|
-
S &&
|
|
1501
|
+
onMouseDown: (Q) => Q.stopPropagation(),
|
|
1502
|
+
onKeyDown: (Q) => {
|
|
1503
|
+
S && Q.key === "Enter" && !Q.shiftKey && Q.target.tagName !== "TEXTAREA" && c && (Q.preventDefault(), B2());
|
|
1504
1504
|
},
|
|
1505
|
-
className: `shekel-modal-panel ${
|
|
1505
|
+
className: `shekel-modal-panel ${Y}`,
|
|
1506
1506
|
style: {
|
|
1507
1507
|
position: "relative",
|
|
1508
1508
|
width: "100%",
|
|
1509
|
-
maxWidth:
|
|
1509
|
+
maxWidth: t2,
|
|
1510
1510
|
maxHeight: m2,
|
|
1511
|
-
backgroundColor:
|
|
1511
|
+
backgroundColor: x,
|
|
1512
1512
|
borderRadius: f === "full" ? 0 : f2,
|
|
1513
|
-
boxShadow:
|
|
1513
|
+
boxShadow: r2,
|
|
1514
1514
|
display: "flex",
|
|
1515
1515
|
flexDirection: "column",
|
|
1516
1516
|
opacity: G ? 1 : 0,
|
|
1517
1517
|
transform: G ? F2 : x2,
|
|
1518
|
-
transition: `opacity ${
|
|
1518
|
+
transition: `opacity ${W}ms cubic-bezier(0.23, 1, 0.32, 1), transform ${W}ms cubic-bezier(0.23, 1, 0.32, 1)`,
|
|
1519
1519
|
outline: "none",
|
|
1520
1520
|
...z
|
|
1521
1521
|
},
|
|
1522
|
-
children:
|
|
1523
|
-
|
|
1522
|
+
children: Z ? /* @__PURE__ */ i(I2, { children: [
|
|
1523
|
+
$ && /* @__PURE__ */ e(
|
|
1524
1524
|
"button",
|
|
1525
1525
|
{
|
|
1526
1526
|
type: "button",
|
|
@@ -1534,12 +1534,12 @@ const Se = ({
|
|
|
1534
1534
|
"div",
|
|
1535
1535
|
{
|
|
1536
1536
|
className: `flex-1 overflow-auto ${c2}`,
|
|
1537
|
-
style:
|
|
1537
|
+
style: e2,
|
|
1538
1538
|
children: n
|
|
1539
1539
|
}
|
|
1540
1540
|
)
|
|
1541
1541
|
] }) : /* @__PURE__ */ i(I2, { children: [
|
|
1542
|
-
(s ||
|
|
1542
|
+
(s || $) && /* @__PURE__ */ i(
|
|
1543
1543
|
"div",
|
|
1544
1544
|
{
|
|
1545
1545
|
className: `shekel-modal-header flex items-start justify-between gap-4 px-6 pt-5 pb-3 ${q}`,
|
|
@@ -1549,7 +1549,7 @@ const Se = ({
|
|
|
1549
1549
|
s && /* @__PURE__ */ e("div", { id: M2, className: "text-lg font-semibold text-[#181918]", children: s }),
|
|
1550
1550
|
o && /* @__PURE__ */ e("div", { className: "text-sm text-[#595959] mt-1", children: o })
|
|
1551
1551
|
] }),
|
|
1552
|
-
|
|
1552
|
+
$ && /* @__PURE__ */ e(
|
|
1553
1553
|
"button",
|
|
1554
1554
|
{
|
|
1555
1555
|
type: "button",
|
|
@@ -1565,8 +1565,8 @@ const Se = ({
|
|
|
1565
1565
|
/* @__PURE__ */ e(
|
|
1566
1566
|
"div",
|
|
1567
1567
|
{
|
|
1568
|
-
className: `shekel-modal-body flex-1 overflow-auto ${M ? "" : "px-6"} ${s ||
|
|
1569
|
-
style:
|
|
1568
|
+
className: `shekel-modal-body flex-1 overflow-auto ${M ? "" : "px-6"} ${s || $ || M ? "" : "pt-5"} ${y2 || M ? "" : "pb-5"} ${c2}`,
|
|
1569
|
+
style: e2,
|
|
1570
1570
|
children: n
|
|
1571
1571
|
}
|
|
1572
1572
|
),
|
|
@@ -1616,19 +1616,19 @@ const Se = ({
|
|
|
1616
1616
|
md: "w-2 h-2",
|
|
1617
1617
|
lg: "w-2.5 h-2.5",
|
|
1618
1618
|
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"
|
|
1619
|
-
},
|
|
1619
|
+
}, F = {
|
|
1620
1620
|
default: "bg-gray-600",
|
|
1621
1621
|
primary: "bg-[#EC615B]",
|
|
1622
1622
|
success: "bg-green-600",
|
|
1623
1623
|
warning: "bg-yellow-600",
|
|
1624
1624
|
danger: "bg-red-600",
|
|
1625
1625
|
info: "bg-cyan-600"
|
|
1626
|
-
},
|
|
1626
|
+
}, b = {
|
|
1627
1627
|
sm: "w-3 h-3",
|
|
1628
1628
|
md: "w-3.5 h-3.5",
|
|
1629
1629
|
lg: "w-4 h-4",
|
|
1630
1630
|
responsive: "w-2.5 h-2.5 sm:w-3 sm:h-3 md:w-3.5 md:h-3.5 lg:w-4 lg:h-4"
|
|
1631
|
-
},
|
|
1631
|
+
}, D = {
|
|
1632
1632
|
none: "rounded-none",
|
|
1633
1633
|
sm: "rounded-sm",
|
|
1634
1634
|
md: "rounded-md",
|
|
@@ -1643,17 +1643,17 @@ const Se = ({
|
|
|
1643
1643
|
return /* @__PURE__ */ i(
|
|
1644
1644
|
"span",
|
|
1645
1645
|
{
|
|
1646
|
-
className: `inline-flex items-center gap-1.5 font-medium transition-all duration-200 ${l ? "" : v[r]} ${u[s]} ${
|
|
1646
|
+
className: `inline-flex items-center gap-1.5 font-medium transition-all duration-200 ${l ? "" : v[r]} ${u[s]} ${D[C]} ${d}`,
|
|
1647
1647
|
style: m,
|
|
1648
1648
|
children: [
|
|
1649
|
-
o && /* @__PURE__ */ e("span", { className: `rounded-full ${f[s]} ${
|
|
1650
|
-
n && a === "left" && /* @__PURE__ */ e("span", { className: `inline-flex items-center ${
|
|
1649
|
+
o && /* @__PURE__ */ e("span", { className: `rounded-full ${f[s]} ${F[r]}` }),
|
|
1650
|
+
n && a === "left" && /* @__PURE__ */ e("span", { className: `inline-flex items-center ${b[s]}`, children: n }),
|
|
1651
1651
|
t,
|
|
1652
|
-
n && a === "right" && /* @__PURE__ */ e("span", { className: `inline-flex items-center ${
|
|
1652
|
+
n && a === "right" && /* @__PURE__ */ e("span", { className: `inline-flex items-center ${b[s]}`, children: n })
|
|
1653
1653
|
]
|
|
1654
1654
|
}
|
|
1655
1655
|
);
|
|
1656
|
-
}, D0 = ({ size: t, color: r }) => /* @__PURE__ */ e(
|
|
1656
|
+
}, D0 = ({ size: t, color: r, strokeWidth: s = 2 }) => /* @__PURE__ */ e(
|
|
1657
1657
|
"svg",
|
|
1658
1658
|
{
|
|
1659
1659
|
width: t,
|
|
@@ -1666,13 +1666,13 @@ const Se = ({
|
|
|
1666
1666
|
{
|
|
1667
1667
|
d: "M5 12.5l4.5 4.5L19 7.5",
|
|
1668
1668
|
stroke: r,
|
|
1669
|
-
strokeWidth:
|
|
1669
|
+
strokeWidth: s,
|
|
1670
1670
|
strokeLinecap: "round",
|
|
1671
1671
|
strokeLinejoin: "round"
|
|
1672
1672
|
}
|
|
1673
1673
|
)
|
|
1674
1674
|
}
|
|
1675
|
-
), f1 = ({ size: t, color: r }) => /* @__PURE__ */ e(
|
|
1675
|
+
), f1 = ({ size: t, color: r, strokeWidth: s = 2 }) => /* @__PURE__ */ e(
|
|
1676
1676
|
"svg",
|
|
1677
1677
|
{
|
|
1678
1678
|
width: t,
|
|
@@ -1680,7 +1680,7 @@ const Se = ({
|
|
|
1680
1680
|
viewBox: "0 0 24 24",
|
|
1681
1681
|
fill: "none",
|
|
1682
1682
|
"aria-hidden": "true",
|
|
1683
|
-
children: /* @__PURE__ */ e("path", { d: "M6 6l12 12M18 6L6 18", stroke: r, strokeWidth:
|
|
1683
|
+
children: /* @__PURE__ */ e("path", { d: "M6 6l12 12M18 6L6 18", stroke: r, strokeWidth: s, strokeLinecap: "round" })
|
|
1684
1684
|
}
|
|
1685
1685
|
), Re = ({
|
|
1686
1686
|
items: t,
|
|
@@ -1690,25 +1690,29 @@ const Se = ({
|
|
|
1690
1690
|
className: n = "",
|
|
1691
1691
|
style: a,
|
|
1692
1692
|
activeColor: d = "#EC615B",
|
|
1693
|
-
inactiveColor: l = "#
|
|
1693
|
+
inactiveColor: l = "#101828",
|
|
1694
1694
|
errorColor: c = "#C21919",
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1695
|
+
textColor: h = "#494B4D",
|
|
1696
|
+
activeTextColor: C = "#181918",
|
|
1697
|
+
showConnector: _ = !1,
|
|
1698
|
+
connectorColor: v,
|
|
1699
|
+
gap: u,
|
|
1700
|
+
iconSize: f,
|
|
1701
|
+
checkSize: F,
|
|
1702
|
+
borderWidth: b,
|
|
1703
|
+
checkStrokeWidth: D,
|
|
1704
|
+
onStepClick: m
|
|
1701
1705
|
}) => {
|
|
1702
|
-
const w =
|
|
1703
|
-
const
|
|
1706
|
+
const w = f ?? (o === "sm" ? 28 : o === "lg" ? 44 : 36), H = F ?? (o === "sm" ? 18 : o === "lg" ? 30 : 24), g = b ?? 2, B = D ?? 2, S = o === "sm" ? 14 : o === "lg" ? 20 : 18, Z = o === "sm" ? 12 : o === "lg" ? 14 : 13, M = u !== void 0 ? typeof u == "number" ? `${u}px` : u : s === "vertical" ? "28px" : "16px", $ = (x, E) => E.status ? E.status : x < r ? "finish" : x === r ? "process" : "wait", p = (x) => x === "error" ? c : x === "finish" ? d : l, L = (x, E) => E || (x === "error" ? /* @__PURE__ */ e(f1, { size: H, color: c, strokeWidth: B }) : x === "finish" ? /* @__PURE__ */ e(D0, { size: H, color: d, strokeWidth: B }) : x === "process" ? /* @__PURE__ */ e(D0, { size: H, color: l, strokeWidth: B }) : null), k = s === "vertical", y = (x, E) => {
|
|
1707
|
+
const R = $(E, x), r2 = p(R), W = E === t.length - 1, J = !!m;
|
|
1704
1708
|
return /* @__PURE__ */ i(
|
|
1705
1709
|
"div",
|
|
1706
1710
|
{
|
|
1707
|
-
className: `flex ${
|
|
1708
|
-
onClick:
|
|
1709
|
-
style:
|
|
1711
|
+
className: `flex ${k ? "flex-row" : "flex-col items-center"} ${J ? "cursor-pointer" : ""}`,
|
|
1712
|
+
onClick: J ? () => m(E) : void 0,
|
|
1713
|
+
style: W ? void 0 : { marginBottom: k ? M : 0, marginRight: k ? 0 : M },
|
|
1710
1714
|
children: [
|
|
1711
|
-
/* @__PURE__ */ i("div", { className: `flex ${
|
|
1715
|
+
/* @__PURE__ */ i("div", { className: `flex ${k ? "flex-col items-center" : "flex-row items-center"} shrink-0`, children: [
|
|
1712
1716
|
/* @__PURE__ */ e(
|
|
1713
1717
|
"div",
|
|
1714
1718
|
{
|
|
@@ -1716,22 +1720,22 @@ const Se = ({
|
|
|
1716
1720
|
style: {
|
|
1717
1721
|
width: w,
|
|
1718
1722
|
height: w,
|
|
1719
|
-
border: `${
|
|
1723
|
+
border: `${g}px solid ${r2}`,
|
|
1720
1724
|
backgroundColor: "transparent"
|
|
1721
1725
|
},
|
|
1722
|
-
children:
|
|
1726
|
+
children: L(R, x.icon)
|
|
1723
1727
|
}
|
|
1724
1728
|
),
|
|
1725
|
-
|
|
1729
|
+
_ && !W && /* @__PURE__ */ e(
|
|
1726
1730
|
"div",
|
|
1727
1731
|
{
|
|
1728
|
-
className:
|
|
1732
|
+
className: k ? "w-px" : "h-px",
|
|
1729
1733
|
style: {
|
|
1730
|
-
backgroundColor:
|
|
1734
|
+
backgroundColor: v ?? "#E6E6E6",
|
|
1731
1735
|
flex: 1,
|
|
1732
|
-
minHeight:
|
|
1733
|
-
minWidth:
|
|
1734
|
-
margin:
|
|
1736
|
+
minHeight: k ? 16 : void 0,
|
|
1737
|
+
minWidth: k ? void 0 : 16,
|
|
1738
|
+
margin: k ? "6px 0" : "0 6px"
|
|
1735
1739
|
}
|
|
1736
1740
|
}
|
|
1737
1741
|
)
|
|
@@ -1739,31 +1743,31 @@ const Se = ({
|
|
|
1739
1743
|
/* @__PURE__ */ i(
|
|
1740
1744
|
"div",
|
|
1741
1745
|
{
|
|
1742
|
-
className:
|
|
1743
|
-
style: { paddingBottom:
|
|
1746
|
+
className: k ? "flex-1 pl-4" : "pt-2 text-center",
|
|
1747
|
+
style: { paddingBottom: k && !W ? 2 : 0 },
|
|
1744
1748
|
children: [
|
|
1745
1749
|
/* @__PURE__ */ e(
|
|
1746
1750
|
"div",
|
|
1747
1751
|
{
|
|
1748
1752
|
className: "font-medium transition-colors duration-200",
|
|
1749
1753
|
style: {
|
|
1750
|
-
fontSize:
|
|
1754
|
+
fontSize: S,
|
|
1751
1755
|
lineHeight: `${w}px`,
|
|
1752
|
-
color:
|
|
1756
|
+
color: R === "wait" ? h : C
|
|
1753
1757
|
},
|
|
1754
|
-
children:
|
|
1758
|
+
children: x.title
|
|
1755
1759
|
}
|
|
1756
1760
|
),
|
|
1757
|
-
|
|
1761
|
+
x.description && /* @__PURE__ */ e(
|
|
1758
1762
|
"div",
|
|
1759
1763
|
{
|
|
1760
1764
|
className: "transition-colors duration-200",
|
|
1761
1765
|
style: {
|
|
1762
|
-
fontSize:
|
|
1766
|
+
fontSize: Z,
|
|
1763
1767
|
color: "#8C8C8C",
|
|
1764
1768
|
marginTop: 2
|
|
1765
1769
|
},
|
|
1766
|
-
children:
|
|
1770
|
+
children: x.description
|
|
1767
1771
|
}
|
|
1768
1772
|
)
|
|
1769
1773
|
]
|
|
@@ -1771,15 +1775,15 @@ const Se = ({
|
|
|
1771
1775
|
)
|
|
1772
1776
|
]
|
|
1773
1777
|
},
|
|
1774
|
-
|
|
1778
|
+
E
|
|
1775
1779
|
);
|
|
1776
1780
|
};
|
|
1777
1781
|
return /* @__PURE__ */ e(
|
|
1778
1782
|
"div",
|
|
1779
1783
|
{
|
|
1780
|
-
className: `flex ${
|
|
1784
|
+
className: `flex ${k ? "flex-col" : "flex-row items-start"} ${n}`,
|
|
1781
1785
|
style: a,
|
|
1782
|
-
children: t.map(
|
|
1786
|
+
children: t.map(y)
|
|
1783
1787
|
}
|
|
1784
1788
|
);
|
|
1785
1789
|
}, Ge = ({
|
|
@@ -1802,18 +1806,18 @@ const Se = ({
|
|
|
1802
1806
|
md: "h-2",
|
|
1803
1807
|
lg: "h-3",
|
|
1804
1808
|
responsive: "h-1.5 sm:h-2 md:h-3 lg:h-4"
|
|
1805
|
-
},
|
|
1809
|
+
}, F = {
|
|
1806
1810
|
sm: "text-xs",
|
|
1807
1811
|
md: "text-sm",
|
|
1808
1812
|
lg: "text-base",
|
|
1809
1813
|
responsive: "text-xs sm:text-sm md:text-base lg:text-lg"
|
|
1810
|
-
},
|
|
1814
|
+
}, b = {
|
|
1811
1815
|
none: "rounded-none",
|
|
1812
1816
|
sm: "rounded-sm",
|
|
1813
1817
|
md: "rounded-md",
|
|
1814
1818
|
lg: "rounded-lg",
|
|
1815
1819
|
full: "rounded-full"
|
|
1816
|
-
},
|
|
1820
|
+
}, D = () => {
|
|
1817
1821
|
if (o) return o;
|
|
1818
1822
|
switch (r) {
|
|
1819
1823
|
case "success":
|
|
@@ -1825,7 +1829,7 @@ const Se = ({
|
|
|
1825
1829
|
default:
|
|
1826
1830
|
return u === 100 ? h || "bg-green-500" : c || "bg-[#EC615B]";
|
|
1827
1831
|
}
|
|
1828
|
-
}, m = () => _ || "bg-gray-200",
|
|
1832
|
+
}, m = () => _ || "bg-gray-200", w = () => r === "success" || u === 100 ? /* @__PURE__ */ e("svg", { className: "w-4 h-4 text-green-500", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e(
|
|
1829
1833
|
"path",
|
|
1830
1834
|
{
|
|
1831
1835
|
fillRule: "evenodd",
|
|
@@ -1844,12 +1848,12 @@ const Se = ({
|
|
|
1844
1848
|
/* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
|
|
1845
1849
|
"div",
|
|
1846
1850
|
{
|
|
1847
|
-
className: `w-full overflow-hidden ${f[a]} ${
|
|
1851
|
+
className: `w-full overflow-hidden ${f[a]} ${b[v]} ${m()}`,
|
|
1848
1852
|
style: { height: g },
|
|
1849
1853
|
children: /* @__PURE__ */ e(
|
|
1850
1854
|
"div",
|
|
1851
1855
|
{
|
|
1852
|
-
className: `${
|
|
1856
|
+
className: `${D()} ${f[a]} ${b[v]} transition-all duration-300 ease-out ${r === "active" ? "progress-active" : ""}`,
|
|
1853
1857
|
style: {
|
|
1854
1858
|
width: `${u}%`,
|
|
1855
1859
|
height: g
|
|
@@ -1858,7 +1862,7 @@ const Se = ({
|
|
|
1858
1862
|
)
|
|
1859
1863
|
}
|
|
1860
1864
|
) }),
|
|
1861
|
-
s && /* @__PURE__ */ e("div", { className: `flex items-center gap-1 ${
|
|
1865
|
+
s && /* @__PURE__ */ e("div", { className: `flex items-center gap-1 ${F[a]} text-gray-600 font-normal`, children: w() || H() })
|
|
1862
1866
|
] });
|
|
1863
1867
|
}, m1 = {
|
|
1864
1868
|
sm: { box: 16, icon: 10 },
|
|
@@ -1880,40 +1884,40 @@ const Se = ({
|
|
|
1880
1884
|
id: v,
|
|
1881
1885
|
name: u,
|
|
1882
1886
|
value: f,
|
|
1883
|
-
accentColor:
|
|
1884
|
-
borderColor:
|
|
1885
|
-
boxBgColor:
|
|
1887
|
+
accentColor: F = "#EC615B",
|
|
1888
|
+
borderColor: b = "#181918",
|
|
1889
|
+
boxBgColor: D = "#FFFFFF",
|
|
1886
1890
|
boxRadius: m = 6,
|
|
1887
|
-
style:
|
|
1891
|
+
style: w,
|
|
1888
1892
|
required: H,
|
|
1889
1893
|
autoFocus: g,
|
|
1890
1894
|
tabIndex: B
|
|
1891
1895
|
}) => {
|
|
1892
|
-
const [S,
|
|
1893
|
-
o || (M ||
|
|
1894
|
-
},
|
|
1895
|
-
width:
|
|
1896
|
-
height:
|
|
1897
|
-
borderRadius:
|
|
1898
|
-
border: `1.5px solid ${
|
|
1899
|
-
backgroundColor: o ? "#F5F5F5" :
|
|
1896
|
+
const [S, Z] = O(r), M = t !== void 0, $ = M ? !!t : S, p = s2.useId(), L = v ?? p, k = $ || n, y = (n2) => {
|
|
1897
|
+
o || (M || Z(n2.target.checked), s == null || s(n2.target.checked, n2));
|
|
1898
|
+
}, x = m1[a], E = typeof m == "number" ? `${m}px` : m, R = d === "filled", r2 = R ? F : D, W = F, J = {
|
|
1899
|
+
width: x.box,
|
|
1900
|
+
height: x.box,
|
|
1901
|
+
borderRadius: E,
|
|
1902
|
+
border: `1.5px solid ${k ? W : b}`,
|
|
1903
|
+
backgroundColor: o ? "#F5F5F5" : k ? r2 : D,
|
|
1900
1904
|
transition: "all 0.15s ease-out"
|
|
1901
|
-
},
|
|
1905
|
+
}, Y = R ? "#FFFFFF" : F, z = /* @__PURE__ */ i(
|
|
1902
1906
|
"span",
|
|
1903
1907
|
{
|
|
1904
1908
|
"aria-hidden": !0,
|
|
1905
1909
|
className: "relative inline-flex items-center justify-center shrink-0",
|
|
1906
|
-
style:
|
|
1910
|
+
style: J,
|
|
1907
1911
|
children: [
|
|
1908
1912
|
/* @__PURE__ */ e(
|
|
1909
1913
|
"input",
|
|
1910
1914
|
{
|
|
1911
1915
|
type: "checkbox",
|
|
1912
|
-
id:
|
|
1916
|
+
id: L,
|
|
1913
1917
|
name: u,
|
|
1914
1918
|
value: f,
|
|
1915
|
-
checked:
|
|
1916
|
-
onChange:
|
|
1919
|
+
checked: $,
|
|
1920
|
+
onChange: y,
|
|
1917
1921
|
disabled: o,
|
|
1918
1922
|
required: H,
|
|
1919
1923
|
autoFocus: g,
|
|
@@ -1927,15 +1931,15 @@ const Se = ({
|
|
|
1927
1931
|
{
|
|
1928
1932
|
className: "absolute inset-0 flex items-center justify-center pointer-events-none transition-opacity duration-150 ease-out",
|
|
1929
1933
|
style: {
|
|
1930
|
-
opacity: n ||
|
|
1931
|
-
transform: n ||
|
|
1934
|
+
opacity: n || $ ? 1 : 0,
|
|
1935
|
+
transform: n || $ ? "scale(1)" : "scale(0.6)",
|
|
1932
1936
|
transition: "opacity 150ms ease-out, transform 150ms ease-out"
|
|
1933
1937
|
},
|
|
1934
|
-
children: n ? /* @__PURE__ */ e("svg", { width:
|
|
1938
|
+
children: n ? /* @__PURE__ */ e("svg", { width: x.icon, height: x.icon, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e("path", { d: "M3 8h10", stroke: Y, strokeWidth: "2.2", strokeLinecap: "round" }) }) : /* @__PURE__ */ e("svg", { width: x.icon, height: x.icon, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
1935
1939
|
"path",
|
|
1936
1940
|
{
|
|
1937
1941
|
d: "M3 8.5l3.2 3.2L13 5",
|
|
1938
|
-
stroke:
|
|
1942
|
+
stroke: Y,
|
|
1939
1943
|
strokeWidth: "2",
|
|
1940
1944
|
strokeLinecap: "round",
|
|
1941
1945
|
strokeLinejoin: "round"
|
|
@@ -1949,9 +1953,9 @@ const Se = ({
|
|
|
1949
1953
|
return /* @__PURE__ */ i(
|
|
1950
1954
|
"label",
|
|
1951
1955
|
{
|
|
1952
|
-
htmlFor:
|
|
1956
|
+
htmlFor: L,
|
|
1953
1957
|
className: `inline-flex items-center gap-2 align-middle ${o ? "cursor-not-allowed opacity-60" : "cursor-pointer"} ${_}`,
|
|
1954
|
-
style:
|
|
1958
|
+
style: w,
|
|
1955
1959
|
onMouseDown: (n2) => {
|
|
1956
1960
|
n2.detail > 1 && n2.preventDefault();
|
|
1957
1961
|
},
|
|
@@ -2018,13 +2022,13 @@ const Se = ({
|
|
|
2018
2022
|
rounded: u = "md",
|
|
2019
2023
|
style: f
|
|
2020
2024
|
}) => {
|
|
2021
|
-
const
|
|
2025
|
+
const F = g1(d), b = x1(u), D = "#F4F4F4", m = "#EBEBEB", w = "#181918", H = "#999999", g = "#9CA3AF", B = "#EC615B", S = l || D, Z = c || m, M = h || w, $ = C || H, p = _ || g, L = v || B;
|
|
2022
2026
|
return t.length === 0 ? /* @__PURE__ */ e(
|
|
2023
2027
|
"div",
|
|
2024
2028
|
{
|
|
2025
2029
|
className: `text-center py-8 text-gray-500 text-sm ${o}`,
|
|
2026
2030
|
style: {
|
|
2027
|
-
color:
|
|
2031
|
+
color: $,
|
|
2028
2032
|
...f
|
|
2029
2033
|
},
|
|
2030
2034
|
children: s
|
|
@@ -2032,14 +2036,14 @@ const Se = ({
|
|
|
2032
2036
|
) : /* @__PURE__ */ e(
|
|
2033
2037
|
"div",
|
|
2034
2038
|
{
|
|
2035
|
-
className: `overflow-y-auto ${
|
|
2039
|
+
className: `overflow-y-auto ${F.container} ${o}`,
|
|
2036
2040
|
style: { maxHeight: a, ...f },
|
|
2037
|
-
children: t.map((
|
|
2041
|
+
children: t.map((k, y) => /* @__PURE__ */ i(
|
|
2038
2042
|
"div",
|
|
2039
2043
|
{
|
|
2040
2044
|
className: `
|
|
2041
2045
|
group flex items-center justify-between
|
|
2042
|
-
${
|
|
2046
|
+
${b}
|
|
2043
2047
|
transition-all duration-300 ease-out
|
|
2044
2048
|
hover:shadow-sm
|
|
2045
2049
|
animate-slide-in-item
|
|
@@ -2047,37 +2051,37 @@ const Se = ({
|
|
|
2047
2051
|
`,
|
|
2048
2052
|
style: {
|
|
2049
2053
|
backgroundColor: S,
|
|
2050
|
-
animationDelay: `${
|
|
2054
|
+
animationDelay: `${y * 50}ms`
|
|
2051
2055
|
},
|
|
2052
|
-
onMouseEnter: (
|
|
2053
|
-
|
|
2056
|
+
onMouseEnter: (x) => {
|
|
2057
|
+
x.currentTarget.style.backgroundColor = Z;
|
|
2054
2058
|
},
|
|
2055
|
-
onMouseLeave: (
|
|
2056
|
-
|
|
2059
|
+
onMouseLeave: (x) => {
|
|
2060
|
+
x.currentTarget.style.backgroundColor = S;
|
|
2057
2061
|
},
|
|
2058
2062
|
children: [
|
|
2059
|
-
/* @__PURE__ */ i("div", { className: `flex-1 min-w-0 ${
|
|
2060
|
-
|
|
2063
|
+
/* @__PURE__ */ i("div", { className: `flex-1 min-w-0 ${F.item}`, children: [
|
|
2064
|
+
k.sublabel && /* @__PURE__ */ e(
|
|
2061
2065
|
"div",
|
|
2062
2066
|
{
|
|
2063
|
-
className: `font-normal mb-0.5 ${
|
|
2064
|
-
style: { color:
|
|
2065
|
-
children:
|
|
2067
|
+
className: `font-normal mb-0.5 ${F.sublabel}`,
|
|
2068
|
+
style: { color: $ },
|
|
2069
|
+
children: k.sublabel
|
|
2066
2070
|
}
|
|
2067
2071
|
),
|
|
2068
2072
|
/* @__PURE__ */ e(
|
|
2069
2073
|
"div",
|
|
2070
2074
|
{
|
|
2071
|
-
className: `font-medium truncate ${
|
|
2075
|
+
className: `font-medium truncate ${F.label}`,
|
|
2072
2076
|
style: { color: M },
|
|
2073
|
-
children:
|
|
2077
|
+
children: k.label
|
|
2074
2078
|
}
|
|
2075
2079
|
)
|
|
2076
2080
|
] }),
|
|
2077
2081
|
/* @__PURE__ */ e(
|
|
2078
2082
|
"button",
|
|
2079
2083
|
{
|
|
2080
|
-
onClick: () => r(
|
|
2084
|
+
onClick: () => r(k.id),
|
|
2081
2085
|
className: `
|
|
2082
2086
|
ml-3 flex-shrink-0 rounded-full
|
|
2083
2087
|
flex items-center justify-center
|
|
@@ -2085,22 +2089,22 @@ const Se = ({
|
|
|
2085
2089
|
hover:scale-110
|
|
2086
2090
|
active:scale-95
|
|
2087
2091
|
focus:outline-none focus:ring-2 focus:ring-opacity-50
|
|
2088
|
-
${
|
|
2092
|
+
${F.button}
|
|
2089
2093
|
`,
|
|
2090
2094
|
style: {
|
|
2091
2095
|
color: p
|
|
2092
2096
|
},
|
|
2093
|
-
onMouseEnter: (
|
|
2094
|
-
|
|
2097
|
+
onMouseEnter: (x) => {
|
|
2098
|
+
x.currentTarget.style.backgroundColor = "white", x.currentTarget.style.color = L;
|
|
2095
2099
|
},
|
|
2096
|
-
onMouseLeave: (
|
|
2097
|
-
|
|
2100
|
+
onMouseLeave: (x) => {
|
|
2101
|
+
x.currentTarget.style.backgroundColor = "transparent", x.currentTarget.style.color = p;
|
|
2098
2102
|
},
|
|
2099
|
-
"aria-label": `Remove ${
|
|
2103
|
+
"aria-label": `Remove ${k.label}`,
|
|
2100
2104
|
children: /* @__PURE__ */ e(
|
|
2101
2105
|
"svg",
|
|
2102
2106
|
{
|
|
2103
|
-
className:
|
|
2107
|
+
className: F.icon,
|
|
2104
2108
|
fill: "none",
|
|
2105
2109
|
stroke: "currentColor",
|
|
2106
2110
|
viewBox: "0 0 24 24",
|
|
@@ -2119,7 +2123,7 @@ const Se = ({
|
|
|
2119
2123
|
)
|
|
2120
2124
|
]
|
|
2121
2125
|
},
|
|
2122
|
-
|
|
2126
|
+
k.id
|
|
2123
2127
|
))
|
|
2124
2128
|
}
|
|
2125
2129
|
);
|
|
@@ -2148,7 +2152,7 @@ const Se = ({
|
|
|
2148
2152
|
}
|
|
2149
2153
|
)
|
|
2150
2154
|
}
|
|
2151
|
-
), U0 = U2, f0 =
|
|
2155
|
+
), U0 = U2, f0 = s2.forwardRef(
|
|
2152
2156
|
(t, r) => {
|
|
2153
2157
|
const {
|
|
2154
2158
|
label: s,
|
|
@@ -2164,52 +2168,52 @@ const Se = ({
|
|
|
2164
2168
|
addonAfter: v,
|
|
2165
2169
|
allowClear: u,
|
|
2166
2170
|
status: f,
|
|
2167
|
-
className:
|
|
2168
|
-
style:
|
|
2169
|
-
wrapperClassName:
|
|
2171
|
+
className: F = "",
|
|
2172
|
+
style: b,
|
|
2173
|
+
wrapperClassName: D = "",
|
|
2170
2174
|
wrapperStyle: m,
|
|
2171
|
-
onClear:
|
|
2175
|
+
onClear: w,
|
|
2172
2176
|
required: H,
|
|
2173
2177
|
disabled: g,
|
|
2174
2178
|
readOnly: B,
|
|
2175
2179
|
id: S,
|
|
2176
|
-
value:
|
|
2180
|
+
value: Z,
|
|
2177
2181
|
defaultValue: M,
|
|
2178
|
-
onChange:
|
|
2182
|
+
onChange: $,
|
|
2179
2183
|
accentColor: p = "#EC615B",
|
|
2180
|
-
errorColor:
|
|
2181
|
-
borderColor:
|
|
2182
|
-
filledBorderColor:
|
|
2183
|
-
addonBackgroundColor:
|
|
2184
|
-
...
|
|
2185
|
-
} = t, [
|
|
2184
|
+
errorColor: L = "#C21919",
|
|
2185
|
+
borderColor: k = "#D9D9D9",
|
|
2186
|
+
filledBorderColor: y = "#181918",
|
|
2187
|
+
addonBackgroundColor: x = "#FAFAFA",
|
|
2188
|
+
...E
|
|
2189
|
+
} = t, [R, r2] = s2.useState(
|
|
2186
2190
|
M
|
|
2187
|
-
),
|
|
2188
|
-
|
|
2191
|
+
), W = Z !== void 0, J = W ? Z : R, Y = s2.useId(), z = S ?? Y, q = !!l || f === "error", n2 = f === "warning", c2 = d === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : d, e2 = (C2) => {
|
|
2192
|
+
W || r2(C2.target.value), $ == null || $(C2);
|
|
2189
2193
|
}, i2 = () => {
|
|
2190
|
-
|
|
2194
|
+
W || r2("");
|
|
2191
2195
|
const C2 = {
|
|
2192
2196
|
target: { value: "" },
|
|
2193
2197
|
currentTarget: { value: "" }
|
|
2194
2198
|
};
|
|
2195
|
-
|
|
2196
|
-
}, a2 =
|
|
2199
|
+
$ == null || $(C2), w == null || w();
|
|
2200
|
+
}, a2 = J !== void 0 && J !== "" && J !== null, N = q ? L : n2 ? "#FAAD14" : a2 ? y : k, P = q ? U0(L, 0.1) : n2 ? "rgba(250,173,20,0.1)" : U0(p, 0.2), o2 = {
|
|
2197
2201
|
"--shekel-accent": p,
|
|
2198
2202
|
"--shekel-border": N,
|
|
2199
|
-
"--shekel-focus-shadow":
|
|
2203
|
+
"--shekel-focus-shadow": P
|
|
2200
2204
|
}, l2 = "border-[color:var(--shekel-border)] hover:border-[color:var(--shekel-accent)] focus-within:border-[color:var(--shekel-accent)]", X = "focus-within:shadow-[0_0_0_2px_var(--shekel-focus-shadow)]", b2 = g ? "opacity-60 cursor-not-allowed bg-[#F5F5F5]" : "bg-white", N2 = "flex items-center px-3 text-sm border border-[color:var(--shekel-border)]", G = {
|
|
2201
|
-
backgroundColor:
|
|
2205
|
+
backgroundColor: x,
|
|
2202
2206
|
color: "#181918",
|
|
2203
2207
|
whiteSpace: "nowrap"
|
|
2204
|
-
},
|
|
2205
|
-
return /* @__PURE__ */ i("div", { className: "w-full", style:
|
|
2208
|
+
}, U = u && a2 && !g && !B;
|
|
2209
|
+
return /* @__PURE__ */ i("div", { className: "w-full", style: o2, children: [
|
|
2206
2210
|
s && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
|
|
2207
2211
|
/* @__PURE__ */ i(
|
|
2208
2212
|
"label",
|
|
2209
2213
|
{
|
|
2210
2214
|
htmlFor: z,
|
|
2211
2215
|
className: `block text-sm font-medium ${o}`,
|
|
2212
|
-
style: { color: q ?
|
|
2216
|
+
style: { color: q ? L : "#181918", ...n },
|
|
2213
2217
|
children: [
|
|
2214
2218
|
s,
|
|
2215
2219
|
H && c2
|
|
@@ -2218,7 +2222,7 @@ const Se = ({
|
|
|
2218
2222
|
),
|
|
2219
2223
|
a && /* @__PURE__ */ e("div", { className: "shrink-0", children: a })
|
|
2220
2224
|
] }),
|
|
2221
|
-
/* @__PURE__ */ i("div", { className: `flex w-full ${
|
|
2225
|
+
/* @__PURE__ */ i("div", { className: `flex w-full ${D}`, style: m, children: [
|
|
2222
2226
|
_ && /* @__PURE__ */ e(
|
|
2223
2227
|
"div",
|
|
2224
2228
|
{
|
|
@@ -2242,19 +2246,19 @@ const Se = ({
|
|
|
2242
2246
|
required: H,
|
|
2243
2247
|
disabled: g,
|
|
2244
2248
|
readOnly: B,
|
|
2245
|
-
value:
|
|
2246
|
-
onChange:
|
|
2247
|
-
className: `flex-1 min-w-0 h-full bg-transparent outline-none text-sm text-[#181918] placeholder:text-[#8C8C8C] ${
|
|
2249
|
+
value: J,
|
|
2250
|
+
onChange: e2,
|
|
2251
|
+
className: `flex-1 min-w-0 h-full bg-transparent outline-none text-sm text-[#181918] placeholder:text-[#8C8C8C] ${F}`,
|
|
2248
2252
|
style: {
|
|
2249
2253
|
padding: "4px 11px",
|
|
2250
2254
|
paddingLeft: h ? 8 : 11,
|
|
2251
|
-
paddingRight: C ||
|
|
2252
|
-
...
|
|
2255
|
+
paddingRight: C || U ? 8 : 11,
|
|
2256
|
+
...b
|
|
2253
2257
|
},
|
|
2254
|
-
...
|
|
2258
|
+
...E
|
|
2255
2259
|
}
|
|
2256
2260
|
),
|
|
2257
|
-
|
|
2261
|
+
U && /* @__PURE__ */ e(
|
|
2258
2262
|
"button",
|
|
2259
2263
|
{
|
|
2260
2264
|
type: "button",
|
|
@@ -2288,8 +2292,8 @@ const Se = ({
|
|
|
2288
2292
|
}
|
|
2289
2293
|
)
|
|
2290
2294
|
] }),
|
|
2291
|
-
l && /* @__PURE__ */ i("div", { className: "flex items-center mt-1 text-xs gap-1", style: { color:
|
|
2292
|
-
/* @__PURE__ */ e(J2, { color:
|
|
2295
|
+
l && /* @__PURE__ */ i("div", { className: "flex items-center mt-1 text-xs gap-1", style: { color: L }, children: [
|
|
2296
|
+
/* @__PURE__ */ e(J2, { color: L, size: 14 }),
|
|
2293
2297
|
l
|
|
2294
2298
|
] }),
|
|
2295
2299
|
!l && c && /* @__PURE__ */ e("div", { className: "mt-1 text-xs text-gray-500", children: c })
|
|
@@ -2318,7 +2322,7 @@ const y1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
2318
2322
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
2319
2323
|
}
|
|
2320
2324
|
);
|
|
2321
|
-
}, m0 =
|
|
2325
|
+
}, m0 = s2.forwardRef(
|
|
2322
2326
|
({ control: t, name: r, ...s }, o) => t && r ? /* @__PURE__ */ e(y1, { control: t, name: r, ...s }) : /* @__PURE__ */ e(f0, { ref: o, name: r, ...s })
|
|
2323
2327
|
);
|
|
2324
2328
|
m0.displayName = "Input";
|
|
@@ -2354,9 +2358,9 @@ const v1 = ({ visible: t }) => t ? /* @__PURE__ */ i("svg", { width: "16", heigh
|
|
|
2354
2358
|
strokeLinecap: "round"
|
|
2355
2359
|
}
|
|
2356
2360
|
)
|
|
2357
|
-
] }), g0 =
|
|
2361
|
+
] }), g0 = s2.forwardRef(
|
|
2358
2362
|
({ visibilityToggle: t = !0, ...r }, s) => {
|
|
2359
|
-
const [o, n] =
|
|
2363
|
+
const [o, n] = s2.useState(!1), a = /* @__PURE__ */ e(
|
|
2360
2364
|
"button",
|
|
2361
2365
|
{
|
|
2362
2366
|
type: "button",
|
|
@@ -2415,7 +2419,7 @@ const b1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
2415
2419
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
2416
2420
|
}
|
|
2417
2421
|
);
|
|
2418
|
-
}, w1 =
|
|
2422
|
+
}, w1 = s2.forwardRef(
|
|
2419
2423
|
({ control: t, name: r, ...s }, o) => t && r ? /* @__PURE__ */ e(b1, { control: t, name: r, ...s }) : /* @__PURE__ */ e(g0, { ref: o, name: r, ...s })
|
|
2420
2424
|
);
|
|
2421
2425
|
w1.displayName = "PasswordInput";
|
|
@@ -2435,67 +2439,67 @@ const P0 = ({
|
|
|
2435
2439
|
errorColor: v = "#C21919",
|
|
2436
2440
|
borderColor: u = "#D9D9D9",
|
|
2437
2441
|
filledBorderColor: f = "#181918",
|
|
2438
|
-
boxWidth:
|
|
2439
|
-
boxHeight:
|
|
2442
|
+
boxWidth: F = 63,
|
|
2443
|
+
boxHeight: b = 44
|
|
2440
2444
|
}) => {
|
|
2441
|
-
const [
|
|
2445
|
+
const [D, m] = O(Array(t).fill("")), w = u2([]);
|
|
2442
2446
|
v2(() => {
|
|
2443
2447
|
if (r) {
|
|
2444
|
-
const p = r.split("").slice(0, t),
|
|
2445
|
-
m(
|
|
2448
|
+
const p = r.split("").slice(0, t), L = [...p, ...Array(t - p.length).fill("")];
|
|
2449
|
+
m(L);
|
|
2446
2450
|
} else
|
|
2447
2451
|
m(Array(t).fill(""));
|
|
2448
2452
|
}, [r, t]);
|
|
2449
|
-
const H = (p,
|
|
2450
|
-
var
|
|
2451
|
-
if (
|
|
2452
|
-
const
|
|
2453
|
-
|
|
2454
|
-
const
|
|
2455
|
-
s == null || s(
|
|
2456
|
-
}, g = (p,
|
|
2457
|
-
var
|
|
2458
|
-
|
|
2453
|
+
const H = (p, L) => {
|
|
2454
|
+
var x;
|
|
2455
|
+
if (L && !/^\d+$/.test(L)) return;
|
|
2456
|
+
const k = [...D];
|
|
2457
|
+
k[p] = L.slice(-1), m(k);
|
|
2458
|
+
const y = k.join("");
|
|
2459
|
+
s == null || s(y), L && p < t - 1 && ((x = w.current[p + 1]) == null || x.focus()), k.every((E) => E !== "") && (n == null || n(y));
|
|
2460
|
+
}, g = (p, L) => {
|
|
2461
|
+
var k, y, x;
|
|
2462
|
+
L.key === "Backspace" && !D[p] && p > 0 ? (k = w.current[p - 1]) == null || k.focus() : L.key === "ArrowLeft" && p > 0 ? (y = w.current[p - 1]) == null || y.focus() : L.key === "ArrowRight" && p < t - 1 && ((x = w.current[p + 1]) == null || x.focus());
|
|
2459
2463
|
}, B = (p) => {
|
|
2460
|
-
var
|
|
2464
|
+
var R;
|
|
2461
2465
|
p.preventDefault();
|
|
2462
|
-
const
|
|
2463
|
-
if (!/^\d+$/.test(
|
|
2464
|
-
const
|
|
2465
|
-
m(
|
|
2466
|
-
const
|
|
2467
|
-
s == null || s(
|
|
2468
|
-
const
|
|
2469
|
-
(
|
|
2470
|
-
}, S = (p) => a ? v : p ? f : u,
|
|
2466
|
+
const L = p.clipboardData.getData("text/plain");
|
|
2467
|
+
if (!/^\d+$/.test(L)) return;
|
|
2468
|
+
const k = L.split("").slice(0, t), y = [...k, ...Array(t - k.length).fill("")];
|
|
2469
|
+
m(y);
|
|
2470
|
+
const x = y.join("");
|
|
2471
|
+
s == null || s(x);
|
|
2472
|
+
const E = Math.min(k.length, t - 1);
|
|
2473
|
+
(R = w.current[E]) == null || R.focus(), y.every((r2) => r2 !== "") && (n == null || n(x));
|
|
2474
|
+
}, S = (p) => a ? v : p ? f : u, Z = a ? U2(v, 0.1) : U2(_, 0.2), M = "border-[color:var(--shekel-box-border)] hover:border-[color:var(--shekel-accent)] focus-within:border-[color:var(--shekel-accent)]", $ = "focus-within:shadow-[0_0_0_2px_var(--shekel-focus-shadow)]";
|
|
2471
2475
|
return /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
2472
2476
|
/* @__PURE__ */ e(
|
|
2473
2477
|
"div",
|
|
2474
2478
|
{
|
|
2475
2479
|
className: `flex flex-nowrap gap-2 justify-center w-full ${c}`,
|
|
2476
2480
|
onBlur: o,
|
|
2477
|
-
children:
|
|
2481
|
+
children: D.map((p, L) => /* @__PURE__ */ i(s2.Fragment, { children: [
|
|
2478
2482
|
/* @__PURE__ */ e(
|
|
2479
2483
|
"div",
|
|
2480
2484
|
{
|
|
2481
|
-
className: `flex-1 min-w-0 border rounded-[12px] transition-all duration-200 ${M} ${
|
|
2485
|
+
className: `flex-1 min-w-0 border rounded-[12px] transition-all duration-200 ${M} ${$} ${l ? "opacity-60 cursor-not-allowed bg-[#F5F5F5]" : "bg-white"} ${h}`,
|
|
2482
2486
|
style: {
|
|
2483
|
-
maxWidth: typeof
|
|
2484
|
-
height: typeof
|
|
2487
|
+
maxWidth: typeof F == "number" ? `${F}px` : F,
|
|
2488
|
+
height: typeof b == "number" ? `${b}px` : b,
|
|
2485
2489
|
aspectRatio: "63 / 44",
|
|
2486
2490
|
"--shekel-box-border": S(p !== ""),
|
|
2487
2491
|
"--shekel-accent": _,
|
|
2488
|
-
"--shekel-focus-shadow":
|
|
2492
|
+
"--shekel-focus-shadow": Z
|
|
2489
2493
|
},
|
|
2490
2494
|
children: /* @__PURE__ */ e(
|
|
2491
2495
|
"input",
|
|
2492
2496
|
{
|
|
2493
|
-
ref: (
|
|
2494
|
-
|
|
2497
|
+
ref: (k) => {
|
|
2498
|
+
w.current[L] = k;
|
|
2495
2499
|
},
|
|
2496
2500
|
value: p,
|
|
2497
|
-
onChange: (
|
|
2498
|
-
onKeyDown: (
|
|
2501
|
+
onChange: (k) => H(L, k.target.value),
|
|
2502
|
+
onKeyDown: (k) => g(L, k),
|
|
2499
2503
|
onPaste: B,
|
|
2500
2504
|
disabled: l,
|
|
2501
2505
|
maxLength: 1,
|
|
@@ -2506,8 +2510,8 @@ const P0 = ({
|
|
|
2506
2510
|
)
|
|
2507
2511
|
}
|
|
2508
2512
|
),
|
|
2509
|
-
C &&
|
|
2510
|
-
] },
|
|
2513
|
+
C && L === Math.floor(t / 2) - 1 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center shrink-0 px-1", children: /* @__PURE__ */ e("span", { className: "text-gray-400 text-xl", children: "—" }) })
|
|
2514
|
+
] }, L))
|
|
2511
2515
|
}
|
|
2512
2516
|
),
|
|
2513
2517
|
a && d && /* @__PURE__ */ i("div", { className: "flex items-center justify-center mt-2 text-xs gap-1", style: { color: v }, children: [
|
|
@@ -2538,10 +2542,10 @@ const P0 = ({
|
|
|
2538
2542
|
accentColor: a,
|
|
2539
2543
|
errorColor: d
|
|
2540
2544
|
}) => {
|
|
2541
|
-
const [l, c] =
|
|
2545
|
+
const [l, c] = O(!1), [h, C] = O(-1), _ = u2(null);
|
|
2542
2546
|
v2(() => {
|
|
2543
|
-
const m = (
|
|
2544
|
-
_.current && !_.current.contains(
|
|
2547
|
+
const m = (w) => {
|
|
2548
|
+
_.current && !_.current.contains(w.target) && (c(!1), C(-1));
|
|
2545
2549
|
};
|
|
2546
2550
|
return l && document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
|
|
2547
2551
|
}, [l]), v2(() => {
|
|
@@ -2552,13 +2556,13 @@ const P0 = ({
|
|
|
2552
2556
|
(m.key === "Enter" || m.key === " " || m.key === "ArrowDown") && (m.preventDefault(), c(!0));
|
|
2553
2557
|
return;
|
|
2554
2558
|
}
|
|
2555
|
-
m.key === "Escape" ? (m.preventDefault(), c(!1)) : m.key === "ArrowDown" ? (m.preventDefault(), C((
|
|
2556
|
-
}, u = s.find((m) => m.value === t) ?? s[0],
|
|
2559
|
+
m.key === "Escape" ? (m.preventDefault(), c(!1)) : m.key === "ArrowDown" ? (m.preventDefault(), C((w) => Math.min(s.length - 1, w + 1))) : m.key === "ArrowUp" ? (m.preventDefault(), C((w) => Math.max(0, w - 1))) : m.key === "Enter" && (m.preventDefault(), h >= 0 && (r(s[h].value), c(!1)));
|
|
2560
|
+
}, u = s.find((m) => m.value === t) ?? s[0], F = {
|
|
2557
2561
|
height: 44,
|
|
2558
2562
|
borderColor: n ? d : l ? a : "#D9D9D9",
|
|
2559
2563
|
boxShadow: l ? `0 0 0 2px ${U2(a, 0.2)}` : void 0
|
|
2560
|
-
},
|
|
2561
|
-
return /* @__PURE__ */ i("div", { ref: _, className: "relative", style: { width:
|
|
2564
|
+
}, b = s.some((m) => !!m.flag);
|
|
2565
|
+
return /* @__PURE__ */ i("div", { ref: _, className: "relative", style: { width: b ? 108 : 85 }, children: [
|
|
2562
2566
|
/* @__PURE__ */ i(
|
|
2563
2567
|
"button",
|
|
2564
2568
|
{
|
|
@@ -2569,7 +2573,7 @@ const P0 = ({
|
|
|
2569
2573
|
"aria-haspopup": "listbox",
|
|
2570
2574
|
"aria-expanded": l,
|
|
2571
2575
|
className: `flex items-center justify-between w-full bg-[#FAFAFA] border rounded-[12px] pl-3 pr-2 text-sm text-[#181918] transition-all duration-200 ${o ? "opacity-60 cursor-not-allowed" : "cursor-pointer"}`,
|
|
2572
|
-
style:
|
|
2576
|
+
style: F,
|
|
2573
2577
|
children: [
|
|
2574
2578
|
/* @__PURE__ */ i("span", { className: "flex items-center min-w-0 gap-1.5", children: [
|
|
2575
2579
|
(u == null ? void 0 : u.flag) && /* @__PURE__ */ e(
|
|
@@ -2610,13 +2614,13 @@ const P0 = ({
|
|
|
2610
2614
|
role: "listbox",
|
|
2611
2615
|
className: "absolute left-0 top-full z-50 bg-white overflow-auto max-h-60",
|
|
2612
2616
|
style: {
|
|
2613
|
-
width:
|
|
2617
|
+
width: b ? 180 : 120,
|
|
2614
2618
|
marginTop: 4,
|
|
2615
2619
|
padding: 4,
|
|
2616
2620
|
borderRadius: 8,
|
|
2617
2621
|
boxShadow: "0 6px 16px 0 rgba(0,0,0,0.08), 0 3px 6px -4px rgba(0,0,0,0.12), 0 9px 28px 8px rgba(0,0,0,0.05)"
|
|
2618
2622
|
},
|
|
2619
|
-
children: s.map((m,
|
|
2623
|
+
children: s.map((m, w) => {
|
|
2620
2624
|
const H = m.value === t;
|
|
2621
2625
|
return /* @__PURE__ */ i(
|
|
2622
2626
|
"div",
|
|
@@ -2626,7 +2630,7 @@ const P0 = ({
|
|
|
2626
2630
|
onClick: () => {
|
|
2627
2631
|
r(m.value), c(!1);
|
|
2628
2632
|
},
|
|
2629
|
-
onMouseEnter: () => C(
|
|
2633
|
+
onMouseEnter: () => C(w),
|
|
2630
2634
|
className: "flex items-center justify-between cursor-pointer transition-colors duration-150",
|
|
2631
2635
|
style: {
|
|
2632
2636
|
padding: "5px 12px",
|
|
@@ -2634,7 +2638,7 @@ const P0 = ({
|
|
|
2634
2638
|
borderRadius: 4,
|
|
2635
2639
|
fontSize: 14,
|
|
2636
2640
|
lineHeight: "22px",
|
|
2637
|
-
backgroundColor: H ? U2(a, 0.08) :
|
|
2641
|
+
backgroundColor: H ? U2(a, 0.08) : w === h ? "rgba(0, 0, 0, 0.04)" : "transparent",
|
|
2638
2642
|
color: H ? a : "#181918",
|
|
2639
2643
|
fontWeight: H ? 600 : 400
|
|
2640
2644
|
},
|
|
@@ -2670,7 +2674,7 @@ const P0 = ({
|
|
|
2670
2674
|
}
|
|
2671
2675
|
)
|
|
2672
2676
|
] });
|
|
2673
|
-
}, x0 =
|
|
2677
|
+
}, x0 = s2.forwardRef(
|
|
2674
2678
|
({
|
|
2675
2679
|
label: t,
|
|
2676
2680
|
labelClassName: r = "",
|
|
@@ -2692,68 +2696,68 @@ const P0 = ({
|
|
|
2692
2696
|
showCountryCodeDropdown: v = !0,
|
|
2693
2697
|
format: u = "spaced",
|
|
2694
2698
|
customFormat: f,
|
|
2695
|
-
value:
|
|
2696
|
-
onChange:
|
|
2697
|
-
required:
|
|
2699
|
+
value: F,
|
|
2700
|
+
onChange: b,
|
|
2701
|
+
required: D,
|
|
2698
2702
|
disabled: m,
|
|
2699
|
-
id:
|
|
2703
|
+
id: w,
|
|
2700
2704
|
wrapperClassName: H = "",
|
|
2701
2705
|
style: g,
|
|
2702
2706
|
onKeyDown: B,
|
|
2703
2707
|
onPaste: S,
|
|
2704
|
-
accentColor:
|
|
2708
|
+
accentColor: Z = "#EC615B",
|
|
2705
2709
|
errorColor: M = "#C21919",
|
|
2706
|
-
borderColor:
|
|
2710
|
+
borderColor: $ = "#D9D9D9",
|
|
2707
2711
|
filledBorderColor: p = "#181918",
|
|
2708
|
-
...
|
|
2709
|
-
},
|
|
2710
|
-
const
|
|
2711
|
-
|
|
2712
|
+
...L
|
|
2713
|
+
}, k) => {
|
|
2714
|
+
const y = s2.useId(), x = w ?? y, [E, R] = O(""), r2 = u2(null), W = c !== void 0, [J, Y] = O(h), z = W ? c : J, q = (G) => {
|
|
2715
|
+
W || Y(G), C == null || C(G);
|
|
2712
2716
|
};
|
|
2713
2717
|
v2(() => {
|
|
2714
|
-
if (
|
|
2715
|
-
const G = String(
|
|
2716
|
-
|
|
2718
|
+
if (F !== void 0) {
|
|
2719
|
+
const G = String(F).replace(/\D/g, "");
|
|
2720
|
+
R(n2(G));
|
|
2717
2721
|
}
|
|
2718
|
-
}, [
|
|
2722
|
+
}, [F, u, z]);
|
|
2719
2723
|
const n2 = (G) => {
|
|
2720
|
-
const
|
|
2721
|
-
return f ? f(
|
|
2724
|
+
const U = G.replace(/\D/g, "");
|
|
2725
|
+
return f ? f(U) : u === "none" ? U : u === "spaced" ? U.length <= 3 ? U : U.length <= 6 ? `${U.slice(0, 3)} ${U.slice(3)}` : `${U.slice(0, 3)} ${U.slice(3, 6)} ${U.slice(6, 10)}` : u === "dashed" ? U.length <= 3 ? U : U.length <= 6 ? `${U.slice(0, 3)}-${U.slice(3)}` : `${U.slice(0, 3)}-${U.slice(3, 6)}-${U.slice(6, 10)}` : z === "+1" ? U.length <= 3 ? U : U.length <= 6 ? `(${U.slice(0, 3)}) ${U.slice(3)}` : `(${U.slice(0, 3)}) ${U.slice(3, 6)}-${U.slice(6, 10)}` : U.length <= 3 ? U : U.length <= 6 ? `${U.slice(0, 3)} ${U.slice(3)}` : `${U.slice(0, 3)} ${U.slice(3, 6)} ${U.slice(6, 10)}`;
|
|
2722
2726
|
}, c2 = (G) => {
|
|
2723
2727
|
!/^\d$/.test(G.key) && !["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(G.key) && !(G.metaKey || G.ctrlKey) && G.preventDefault(), B == null || B(G);
|
|
2724
|
-
},
|
|
2725
|
-
const
|
|
2726
|
-
if (
|
|
2728
|
+
}, e2 = (G) => {
|
|
2729
|
+
const U = G.target, C2 = U.selectionStart || 0, w2 = U.value.replace(/\D/g, ""), k2 = n2(w2), j = E.length, h2 = k2.length - j;
|
|
2730
|
+
if (R(k2), requestAnimationFrame(() => {
|
|
2727
2731
|
const d2 = Math.max(0, Math.min(C2 + h2, k2.length));
|
|
2728
|
-
|
|
2729
|
-
}),
|
|
2732
|
+
U.setSelectionRange(d2, d2);
|
|
2733
|
+
}), b) {
|
|
2730
2734
|
const d2 = { ...G, target: { ...G.target, value: w2 } };
|
|
2731
|
-
|
|
2735
|
+
b(d2);
|
|
2732
2736
|
}
|
|
2733
2737
|
}, i2 = (G) => {
|
|
2734
2738
|
G.preventDefault();
|
|
2735
|
-
const
|
|
2736
|
-
if (
|
|
2739
|
+
const U = G.clipboardData.getData("text/plain").replace(/\D/g, ""), w2 = G.target.selectionStart || 0, j = E.replace(/\D/g, "").slice(0, w2) + U, K = n2(j);
|
|
2740
|
+
if (R(K), b) {
|
|
2737
2741
|
const h2 = { ...G, target: { ...G.target, value: j } };
|
|
2738
|
-
|
|
2742
|
+
b(h2);
|
|
2739
2743
|
}
|
|
2740
2744
|
S == null || S(G);
|
|
2741
|
-
}, a2 = !!a, N = n === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : n,
|
|
2745
|
+
}, a2 = !!a, N = n === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : n, o2 = a2 ? M : E !== "" ? p : $, l2 = a2 ? U2(M, 0.1) : U2(Z, 0.2);
|
|
2742
2746
|
return /* @__PURE__ */ i("div", { className: "w-full", style: {
|
|
2743
|
-
"--shekel-accent":
|
|
2744
|
-
"--shekel-border":
|
|
2747
|
+
"--shekel-accent": Z,
|
|
2748
|
+
"--shekel-border": o2,
|
|
2745
2749
|
"--shekel-focus-shadow": l2
|
|
2746
2750
|
}, children: [
|
|
2747
2751
|
t && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
|
|
2748
2752
|
/* @__PURE__ */ i(
|
|
2749
2753
|
"label",
|
|
2750
2754
|
{
|
|
2751
|
-
htmlFor:
|
|
2755
|
+
htmlFor: x,
|
|
2752
2756
|
className: `block text-sm font-medium ${r}`,
|
|
2753
2757
|
style: { color: a2 ? M : "#181918", ...s },
|
|
2754
2758
|
children: [
|
|
2755
2759
|
t,
|
|
2756
|
-
|
|
2760
|
+
D && N
|
|
2757
2761
|
]
|
|
2758
2762
|
}
|
|
2759
2763
|
),
|
|
@@ -2768,7 +2772,7 @@ const P0 = ({
|
|
|
2768
2772
|
options: _,
|
|
2769
2773
|
disabled: m,
|
|
2770
2774
|
error: a2,
|
|
2771
|
-
accentColor:
|
|
2775
|
+
accentColor: Z,
|
|
2772
2776
|
errorColor: M
|
|
2773
2777
|
}
|
|
2774
2778
|
) : /* @__PURE__ */ e(
|
|
@@ -2778,7 +2782,7 @@ const P0 = ({
|
|
|
2778
2782
|
style: {
|
|
2779
2783
|
width: 61,
|
|
2780
2784
|
height: 44,
|
|
2781
|
-
borderColor: a2 ? M :
|
|
2785
|
+
borderColor: a2 ? M : $,
|
|
2782
2786
|
backgroundColor: m ? "#F5F5F5" : "#FAFAFA",
|
|
2783
2787
|
color: m ? "#00000040" : "#000000"
|
|
2784
2788
|
},
|
|
@@ -2794,20 +2798,20 @@ const P0 = ({
|
|
|
2794
2798
|
"input",
|
|
2795
2799
|
{
|
|
2796
2800
|
ref: (G) => {
|
|
2797
|
-
|
|
2801
|
+
r2.current = G, typeof k == "function" ? k(G) : k && (k.current = G);
|
|
2798
2802
|
},
|
|
2799
|
-
id:
|
|
2803
|
+
id: x,
|
|
2800
2804
|
type: "tel",
|
|
2801
2805
|
inputMode: "tel",
|
|
2802
|
-
required:
|
|
2806
|
+
required: D,
|
|
2803
2807
|
disabled: m,
|
|
2804
|
-
value:
|
|
2805
|
-
onChange:
|
|
2808
|
+
value: E,
|
|
2809
|
+
onChange: e2,
|
|
2806
2810
|
onKeyDown: c2,
|
|
2807
2811
|
onPaste: i2,
|
|
2808
2812
|
className: `flex-1 min-w-0 h-full bg-transparent outline-none text-sm text-[#181918] placeholder:text-[#8C8C8C] ${l}`,
|
|
2809
2813
|
style: { padding: "4px 11px", ...g },
|
|
2810
|
-
...
|
|
2814
|
+
...L
|
|
2811
2815
|
}
|
|
2812
2816
|
)
|
|
2813
2817
|
}
|
|
@@ -2837,14 +2841,14 @@ const M1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
2837
2841
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
2838
2842
|
}
|
|
2839
2843
|
);
|
|
2840
|
-
}, L1 =
|
|
2844
|
+
}, L1 = s2.forwardRef(
|
|
2841
2845
|
({ control: t, name: r, ...s }, o) => t && r ? /* @__PURE__ */ e(M1, { control: t, name: r, ...s }) : /* @__PURE__ */ e(x0, { ref: o, name: r, ...s })
|
|
2842
2846
|
);
|
|
2843
2847
|
L1.displayName = "PhoneInput";
|
|
2844
2848
|
const z0 = (t) => {
|
|
2845
2849
|
const s = t.replace(/[^\d.]/g, "").split("."), o = s[0] ?? "", n = s[1], a = o.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
2846
2850
|
return n !== void 0 ? `${a}.${n}` : a;
|
|
2847
|
-
}, _1 = (t) => t.replace(/,/g, ""), y0 =
|
|
2851
|
+
}, _1 = (t) => t.replace(/,/g, ""), y0 = s2.forwardRef(
|
|
2848
2852
|
({
|
|
2849
2853
|
label: t,
|
|
2850
2854
|
labelClassName: r = "",
|
|
@@ -2861,30 +2865,30 @@ const z0 = (t) => {
|
|
|
2861
2865
|
disabled: v,
|
|
2862
2866
|
id: u,
|
|
2863
2867
|
className: f = "",
|
|
2864
|
-
style:
|
|
2865
|
-
wrapperClassName:
|
|
2866
|
-
addonAfter:
|
|
2868
|
+
style: F,
|
|
2869
|
+
wrapperClassName: b = "",
|
|
2870
|
+
addonAfter: D,
|
|
2867
2871
|
addonBefore: m,
|
|
2868
|
-
currencyPillBgColor:
|
|
2872
|
+
currencyPillBgColor: w = "#F0F2F4",
|
|
2869
2873
|
currencyPillColor: H = "#000000",
|
|
2870
2874
|
hideCurrencyPill: g = !1,
|
|
2871
2875
|
...B
|
|
2872
2876
|
}, S) => {
|
|
2873
|
-
const [
|
|
2877
|
+
const [Z, M] = O(""), $ = s2.useId(), p = u ?? $;
|
|
2874
2878
|
v2(() => {
|
|
2875
2879
|
if (h !== void 0) {
|
|
2876
|
-
const
|
|
2877
|
-
M(c ? z0(
|
|
2880
|
+
const R = String(h);
|
|
2881
|
+
M(c ? z0(R) : R);
|
|
2878
2882
|
}
|
|
2879
2883
|
}, [h, c]);
|
|
2880
|
-
const
|
|
2881
|
-
const
|
|
2884
|
+
const L = (R) => {
|
|
2885
|
+
const r2 = R.target.value;
|
|
2882
2886
|
if (c) {
|
|
2883
|
-
const
|
|
2884
|
-
M(
|
|
2887
|
+
const W = _1(r2), J = z0(W);
|
|
2888
|
+
M(J), C == null || C(W, R);
|
|
2885
2889
|
} else
|
|
2886
|
-
M(
|
|
2887
|
-
},
|
|
2890
|
+
M(r2), C == null || C(r2, R);
|
|
2891
|
+
}, k = !!a, y = Z !== "" && Z !== void 0, x = n === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : n, E = k ? "border-[#C21919] focus-within:shadow-[0_0_0_2px_rgba(194,25,25,0.1)]" : y ? "border-[#181918] hover:border-[#EC615B] focus-within:border-[#EC615B] focus-within:shadow-[0_0_0_2px_rgba(236,97,91,0.2)]" : "border-[#D9D9D9] hover:border-[#EC615B] focus-within:border-[#EC615B] focus-within:shadow-[0_0_0_2px_rgba(236,97,91,0.2)]";
|
|
2888
2892
|
return /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
2889
2893
|
t && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
|
|
2890
2894
|
/* @__PURE__ */ i(
|
|
@@ -2892,10 +2896,10 @@ const z0 = (t) => {
|
|
|
2892
2896
|
{
|
|
2893
2897
|
htmlFor: p,
|
|
2894
2898
|
className: `block text-sm font-medium ${r}`,
|
|
2895
|
-
style: { color:
|
|
2899
|
+
style: { color: k ? "#C21919" : "#181918", ...s },
|
|
2896
2900
|
children: [
|
|
2897
2901
|
t,
|
|
2898
|
-
_ &&
|
|
2902
|
+
_ && x
|
|
2899
2903
|
]
|
|
2900
2904
|
}
|
|
2901
2905
|
),
|
|
@@ -2904,14 +2908,14 @@ const z0 = (t) => {
|
|
|
2904
2908
|
/* @__PURE__ */ i(
|
|
2905
2909
|
"div",
|
|
2906
2910
|
{
|
|
2907
|
-
className: `flex items-stretch w-full border rounded-[12px] transition-all duration-200 overflow-hidden ${
|
|
2911
|
+
className: `flex items-stretch w-full border rounded-[12px] transition-all duration-200 overflow-hidden ${E} ${v ? "opacity-60 cursor-not-allowed bg-[#F5F5F5]" : "bg-white"} ${b}`,
|
|
2908
2912
|
style: { height: 44 },
|
|
2909
2913
|
children: [
|
|
2910
2914
|
m && /* @__PURE__ */ e(
|
|
2911
2915
|
"div",
|
|
2912
2916
|
{
|
|
2913
2917
|
className: "flex items-center justify-center shrink-0 px-3 text-sm font-medium",
|
|
2914
|
-
style: { backgroundColor:
|
|
2918
|
+
style: { backgroundColor: w, color: H },
|
|
2915
2919
|
children: m
|
|
2916
2920
|
}
|
|
2917
2921
|
),
|
|
@@ -2921,7 +2925,7 @@ const z0 = (t) => {
|
|
|
2921
2925
|
className: "flex items-center justify-center shrink-0 font-medium",
|
|
2922
2926
|
style: {
|
|
2923
2927
|
width: 37,
|
|
2924
|
-
backgroundColor:
|
|
2928
|
+
backgroundColor: w,
|
|
2925
2929
|
color: H
|
|
2926
2930
|
},
|
|
2927
2931
|
children: l
|
|
@@ -2934,20 +2938,20 @@ const z0 = (t) => {
|
|
|
2934
2938
|
id: p,
|
|
2935
2939
|
required: _,
|
|
2936
2940
|
disabled: v,
|
|
2937
|
-
value:
|
|
2938
|
-
onChange:
|
|
2941
|
+
value: Z,
|
|
2942
|
+
onChange: L,
|
|
2939
2943
|
inputMode: c ? "decimal" : B.inputMode,
|
|
2940
2944
|
className: `flex-1 min-w-0 h-full bg-transparent outline-none text-sm text-[#181918] placeholder:text-[#8C8C8C] ${f}`,
|
|
2941
|
-
style: { padding: "4px 16px", ...
|
|
2945
|
+
style: { padding: "4px 16px", ...F },
|
|
2942
2946
|
...B
|
|
2943
2947
|
}
|
|
2944
2948
|
),
|
|
2945
|
-
|
|
2949
|
+
D && /* @__PURE__ */ e(
|
|
2946
2950
|
"div",
|
|
2947
2951
|
{
|
|
2948
2952
|
className: "flex items-center justify-center shrink-0 px-3",
|
|
2949
|
-
style: { backgroundColor:
|
|
2950
|
-
children:
|
|
2953
|
+
style: { backgroundColor: w },
|
|
2954
|
+
children: D
|
|
2951
2955
|
}
|
|
2952
2956
|
)
|
|
2953
2957
|
]
|
|
@@ -2977,7 +2981,7 @@ const N1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
2977
2981
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
2978
2982
|
}
|
|
2979
2983
|
);
|
|
2980
|
-
}, V1 =
|
|
2984
|
+
}, V1 = s2.forwardRef(
|
|
2981
2985
|
({ control: t, name: r, ...s }, o) => t && r ? /* @__PURE__ */ e(N1, { control: t, name: r, ...s }) : /* @__PURE__ */ e(y0, { ref: o, name: r, ...s })
|
|
2982
2986
|
);
|
|
2983
2987
|
V1.displayName = "CurrencyInput";
|
|
@@ -3012,7 +3016,7 @@ const H1 = (t, r, s = "label") => {
|
|
|
3012
3016
|
strokeLinecap: "round",
|
|
3013
3017
|
strokeLinejoin: "round"
|
|
3014
3018
|
}
|
|
3015
|
-
) }), v0 =
|
|
3019
|
+
) }), v0 = s2.forwardRef(
|
|
3016
3020
|
(t, r) => {
|
|
3017
3021
|
const {
|
|
3018
3022
|
label: s,
|
|
@@ -3028,115 +3032,115 @@ const H1 = (t, r, s = "label") => {
|
|
|
3028
3032
|
defaultValue: v,
|
|
3029
3033
|
onChange: u,
|
|
3030
3034
|
options: f = [],
|
|
3031
|
-
placeholder:
|
|
3032
|
-
showSearch:
|
|
3033
|
-
searchPlaceholder:
|
|
3035
|
+
placeholder: F = "Select an option",
|
|
3036
|
+
showSearch: b = !0,
|
|
3037
|
+
searchPlaceholder: D = "Search",
|
|
3034
3038
|
optionFilterProp: m = "label",
|
|
3035
|
-
filterOption:
|
|
3039
|
+
filterOption: w,
|
|
3036
3040
|
onSearch: H,
|
|
3037
3041
|
mode: g = "single",
|
|
3038
3042
|
allowClear: B = !0,
|
|
3039
3043
|
height: S = 44,
|
|
3040
|
-
borderRadius:
|
|
3044
|
+
borderRadius: Z = 12,
|
|
3041
3045
|
className: M = "",
|
|
3042
|
-
style:
|
|
3046
|
+
style: $,
|
|
3043
3047
|
popupClassName: p = "",
|
|
3044
|
-
popupStyle:
|
|
3045
|
-
onBlur:
|
|
3046
|
-
onFocus:
|
|
3047
|
-
onDropdownVisibleChange:
|
|
3048
|
-
id:
|
|
3049
|
-
notFoundContent:
|
|
3050
|
-
status:
|
|
3051
|
-
optionRender:
|
|
3052
|
-
suffixIcon:
|
|
3053
|
-
prefixIcon:
|
|
3048
|
+
popupStyle: L,
|
|
3049
|
+
onBlur: k,
|
|
3050
|
+
onFocus: y,
|
|
3051
|
+
onDropdownVisibleChange: x,
|
|
3052
|
+
id: E,
|
|
3053
|
+
notFoundContent: R = "No results found",
|
|
3054
|
+
status: r2,
|
|
3055
|
+
optionRender: W,
|
|
3056
|
+
suffixIcon: J,
|
|
3057
|
+
prefixIcon: Y,
|
|
3054
3058
|
accentColor: z = "#EC615B",
|
|
3055
3059
|
errorColor: q = "#C21919",
|
|
3056
3060
|
borderColor: n2 = "#D9D9D9",
|
|
3057
3061
|
filledBorderColor: c2 = "#181918",
|
|
3058
|
-
selectedBgColor:
|
|
3062
|
+
selectedBgColor: e2,
|
|
3059
3063
|
selectedTextColor: i2,
|
|
3060
3064
|
optionHoverColor: a2 = "rgba(0, 0, 0, 0.04)",
|
|
3061
3065
|
tagBgColor: N = "#F5F5F5",
|
|
3062
|
-
tagBorderColor:
|
|
3063
|
-
} = t,
|
|
3066
|
+
tagBorderColor: P = "#E8E8E8"
|
|
3067
|
+
} = t, o2 = e2 ?? U2(z, 0.08), l2 = i2 ?? z, X = _ !== void 0, [b2, N2] = O(
|
|
3064
3068
|
v ?? (g === "multiple" ? [] : void 0)
|
|
3065
|
-
), G = X ? _ : b2, [
|
|
3069
|
+
), G = X ? _ : b2, [U, C2] = O(!1), [w2, k2] = O(""), [j, K] = O(-1), [h2, d2] = O(!1), R2 = s2.useId(), B2 = E ?? R2, D2 = u2(null), V2 = u2(null), S2 = u2(null), [E2, K2] = O({
|
|
3066
3070
|
top: 0,
|
|
3067
3071
|
left: 0,
|
|
3068
3072
|
width: 0
|
|
3069
3073
|
}), j2 = () => {
|
|
3070
3074
|
if (!V2.current) return;
|
|
3071
|
-
const
|
|
3072
|
-
K2({ top:
|
|
3075
|
+
const I = V2.current.getBoundingClientRect();
|
|
3076
|
+
K2({ top: I.bottom + 4, left: I.left, width: I.width });
|
|
3073
3077
|
};
|
|
3074
3078
|
v2(() => {
|
|
3075
|
-
if (!
|
|
3079
|
+
if (!U) return;
|
|
3076
3080
|
j2();
|
|
3077
|
-
const
|
|
3078
|
-
return window.addEventListener("resize",
|
|
3079
|
-
window.removeEventListener("resize",
|
|
3081
|
+
const I = () => j2();
|
|
3082
|
+
return window.addEventListener("resize", I), window.addEventListener("scroll", I, !0), () => {
|
|
3083
|
+
window.removeEventListener("resize", I), window.removeEventListener("scroll", I, !0);
|
|
3080
3084
|
};
|
|
3081
|
-
}, [
|
|
3082
|
-
const P2 = u2(null), T = u2(null), x2 = !!l ||
|
|
3083
|
-
(
|
|
3084
|
-
[
|
|
3085
|
-
), f2 = O2(() => !
|
|
3086
|
-
C || (C2(!0),
|
|
3085
|
+
}, [U]);
|
|
3086
|
+
const P2 = u2(null), T = u2(null), x2 = !!l || r2 === "error", F2 = d === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : d, H2 = typeof S == "number" ? `${S}px` : S, V = typeof Z == "number" ? `${Z}px` : Z, t2 = A0(
|
|
3087
|
+
(I, p2) => w === !1 ? !0 : typeof w == "function" ? w(I, p2) : H1(I, p2, m),
|
|
3088
|
+
[w, m]
|
|
3089
|
+
), f2 = O2(() => !b || !w2 ? f : f.filter((I) => t2(w2, I)), [f, w2, b, t2]), m2 = g === "multiple", L2 = m2 ? Array.isArray(G) ? G : [] : G != null && G !== "" ? [G] : [], y2 = L2.map((I) => f.find((p2) => p2.value === I)).filter(Boolean), M2 = L2.length > 0, $2 = () => {
|
|
3090
|
+
C || (C2(!0), x == null || x(!0), y == null || y());
|
|
3087
3091
|
}, T2 = () => {
|
|
3088
|
-
C2(!1), k2(""), K(-1),
|
|
3092
|
+
C2(!1), k2(""), K(-1), x == null || x(!1), k == null || k();
|
|
3089
3093
|
};
|
|
3090
3094
|
v2(() => {
|
|
3091
|
-
const
|
|
3095
|
+
const I = (p2) => {
|
|
3092
3096
|
var z2, V0;
|
|
3093
3097
|
const A2 = p2.target, W2 = (z2 = D2.current) == null ? void 0 : z2.contains(A2), X2 = (V0 = S2.current) == null ? void 0 : V0.contains(A2);
|
|
3094
|
-
!W2 && !X2 &&
|
|
3098
|
+
!W2 && !X2 && U && T2();
|
|
3095
3099
|
};
|
|
3096
|
-
return
|
|
3097
|
-
}, [
|
|
3098
|
-
if (
|
|
3099
|
-
const
|
|
3100
|
+
return U && document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
|
|
3101
|
+
}, [U]), v2(() => {
|
|
3102
|
+
if (U && b && (T.current ? T.current.focus() : P2.current && P2.current.focus()), U) {
|
|
3103
|
+
const I = f2.findIndex(
|
|
3100
3104
|
(p2) => L2.includes(p2.value)
|
|
3101
3105
|
);
|
|
3102
|
-
K(
|
|
3106
|
+
K(I >= 0 ? I : 0);
|
|
3103
3107
|
}
|
|
3104
|
-
}, [
|
|
3105
|
-
const
|
|
3106
|
-
X || N2(
|
|
3107
|
-
}, _2 = (
|
|
3108
|
-
if (!
|
|
3108
|
+
}, [U]);
|
|
3109
|
+
const Q = (I, p2) => {
|
|
3110
|
+
X || N2(I), u == null || u(I, p2);
|
|
3111
|
+
}, _2 = (I) => {
|
|
3112
|
+
if (!I.disabled)
|
|
3109
3113
|
if (m2) {
|
|
3110
|
-
const p2 = Array.isArray(G) ? G : [], W2 = p2.includes(
|
|
3111
|
-
|
|
3114
|
+
const p2 = Array.isArray(G) ? G : [], W2 = p2.includes(I.value) ? p2.filter((z2) => z2 !== I.value) : [...p2, I.value], X2 = f.filter((z2) => W2.includes(z2.value));
|
|
3115
|
+
Q(W2, X2);
|
|
3112
3116
|
} else
|
|
3113
|
-
|
|
3114
|
-
}, Y2 = (
|
|
3115
|
-
|
|
3116
|
-
}, A = (
|
|
3117
|
-
if (
|
|
3117
|
+
Q(I.value, I), T2();
|
|
3118
|
+
}, Y2 = (I) => {
|
|
3119
|
+
I.stopPropagation(), Q(m2 ? [] : void 0, m2 ? [] : void 0);
|
|
3120
|
+
}, A = (I, p2) => {
|
|
3121
|
+
if (I.stopPropagation(), !m2) return;
|
|
3118
3122
|
const W2 = (Array.isArray(G) ? G : []).filter((z2) => z2 !== p2), X2 = f.filter((z2) => W2.includes(z2.value));
|
|
3119
|
-
|
|
3120
|
-
}, g2 = (
|
|
3121
|
-
if (!
|
|
3122
|
-
["Enter", " ", "ArrowDown"].includes(
|
|
3123
|
+
Q(W2, X2);
|
|
3124
|
+
}, g2 = (I) => {
|
|
3125
|
+
if (!U) {
|
|
3126
|
+
["Enter", " ", "ArrowDown"].includes(I.key) && (I.preventDefault(), $2());
|
|
3123
3127
|
return;
|
|
3124
3128
|
}
|
|
3125
|
-
if (
|
|
3126
|
-
|
|
3127
|
-
else if (
|
|
3128
|
-
|
|
3129
|
-
else if (
|
|
3130
|
-
|
|
3131
|
-
else if (
|
|
3132
|
-
|
|
3133
|
-
else if (
|
|
3129
|
+
if (I.key === "Escape")
|
|
3130
|
+
I.preventDefault(), T2();
|
|
3131
|
+
else if (I.key === "ArrowDown")
|
|
3132
|
+
I.preventDefault(), K((p2) => Math.min(f2.length - 1, p2 + 1));
|
|
3133
|
+
else if (I.key === "ArrowUp")
|
|
3134
|
+
I.preventDefault(), K((p2) => Math.max(0, p2 - 1));
|
|
3135
|
+
else if (I.key === "Enter")
|
|
3136
|
+
I.preventDefault(), j >= 0 && f2[j] && _2(f2[j]);
|
|
3137
|
+
else if (I.key === "Backspace" && m2 && !w2 && L2.length > 0) {
|
|
3134
3138
|
const p2 = L2[L2.length - 1], W2 = (Array.isArray(G) ? G : []).filter((z2) => z2 !== p2), X2 = f.filter((z2) => W2.includes(z2.value));
|
|
3135
|
-
|
|
3139
|
+
Q(W2, X2);
|
|
3136
3140
|
}
|
|
3137
|
-
}, G2 = (
|
|
3138
|
-
k2(
|
|
3139
|
-
}, q2 = x2 ? q :
|
|
3141
|
+
}, G2 = (I) => {
|
|
3142
|
+
k2(I.target.value), H == null || H(I.target.value), K(0);
|
|
3143
|
+
}, q2 = x2 ? q : U ? z : M2 ? c2 : n2, d0 = U ? `0 0 0 2px ${U2(z, 0.2)}` : void 0, r0 = {
|
|
3140
3144
|
"--shekel-accent": z
|
|
3141
3145
|
}, o0 = B && M2 && !C;
|
|
3142
3146
|
return /* @__PURE__ */ i("div", { className: "w-full", ref: r, style: r0, children: [
|
|
@@ -3163,10 +3167,10 @@ const H1 = (t, r, s = "label") => {
|
|
|
3163
3167
|
id: B2,
|
|
3164
3168
|
role: "combobox",
|
|
3165
3169
|
"aria-haspopup": "listbox",
|
|
3166
|
-
"aria-expanded":
|
|
3170
|
+
"aria-expanded": U,
|
|
3167
3171
|
"aria-disabled": C,
|
|
3168
3172
|
tabIndex: C ? -1 : 0,
|
|
3169
|
-
onClick: () =>
|
|
3173
|
+
onClick: () => U ? T2() : $2(),
|
|
3170
3174
|
onKeyDown: g2,
|
|
3171
3175
|
onMouseEnter: () => d2(!0),
|
|
3172
3176
|
onMouseLeave: () => d2(!1),
|
|
@@ -3177,12 +3181,12 @@ const H1 = (t, r, s = "label") => {
|
|
|
3177
3181
|
padding: m2 && L2.length > 0 ? "4px 8px 4px 8px" : "4px 11px",
|
|
3178
3182
|
borderColor: q2,
|
|
3179
3183
|
boxShadow: d0,
|
|
3180
|
-
|
|
3184
|
+
...$
|
|
3181
3185
|
},
|
|
3182
3186
|
children: [
|
|
3183
|
-
|
|
3187
|
+
Y && /* @__PURE__ */ e("span", { className: "shrink-0 mr-2 flex items-center text-[#8C8C8C]", children: Y }),
|
|
3184
3188
|
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0 flex flex-wrap items-center gap-1 relative", children: [
|
|
3185
|
-
m2 && y2.map((
|
|
3189
|
+
m2 && y2.map((I) => /* @__PURE__ */ i(
|
|
3186
3190
|
"span",
|
|
3187
3191
|
{
|
|
3188
3192
|
className: "inline-flex items-center gap-1 rounded px-2 text-xs text-[#181918] border",
|
|
@@ -3190,15 +3194,15 @@ const H1 = (t, r, s = "label") => {
|
|
|
3190
3194
|
height: 24,
|
|
3191
3195
|
lineHeight: "22px",
|
|
3192
3196
|
backgroundColor: N,
|
|
3193
|
-
borderColor:
|
|
3197
|
+
borderColor: P
|
|
3194
3198
|
},
|
|
3195
3199
|
children: [
|
|
3196
|
-
/* @__PURE__ */ e("span", { className: "truncate max-w-[140px]", children:
|
|
3200
|
+
/* @__PURE__ */ e("span", { className: "truncate max-w-[140px]", children: I.label }),
|
|
3197
3201
|
!C && /* @__PURE__ */ e(
|
|
3198
3202
|
"button",
|
|
3199
3203
|
{
|
|
3200
3204
|
type: "button",
|
|
3201
|
-
onClick: (p2) => A(p2,
|
|
3205
|
+
onClick: (p2) => A(p2, I.value),
|
|
3202
3206
|
className: "flex items-center justify-center text-[#8C8C8C] hover:text-[#181918]",
|
|
3203
3207
|
"aria-label": "Remove",
|
|
3204
3208
|
children: /* @__PURE__ */ e("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ e(
|
|
@@ -3214,20 +3218,20 @@ const H1 = (t, r, s = "label") => {
|
|
|
3214
3218
|
)
|
|
3215
3219
|
]
|
|
3216
3220
|
},
|
|
3217
|
-
|
|
3221
|
+
I.value
|
|
3218
3222
|
)),
|
|
3219
|
-
|
|
3223
|
+
U && b ? /* @__PURE__ */ e(
|
|
3220
3224
|
"input",
|
|
3221
3225
|
{
|
|
3222
3226
|
ref: T,
|
|
3223
3227
|
value: w2,
|
|
3224
3228
|
onChange: G2,
|
|
3225
3229
|
onKeyDown: g2,
|
|
3226
|
-
onClick: (
|
|
3227
|
-
placeholder: !m2 && y2[0] && typeof y2[0].label == "string" ? y2[0].label :
|
|
3230
|
+
onClick: (I) => I.stopPropagation(),
|
|
3231
|
+
placeholder: !m2 && y2[0] && typeof y2[0].label == "string" ? y2[0].label : F,
|
|
3228
3232
|
className: "flex-1 min-w-[40px] outline-none bg-transparent text-sm text-[#181918] placeholder:text-[#8C8C8C]"
|
|
3229
3233
|
}
|
|
3230
|
-
) : !m2 && y2[0] ? /* @__PURE__ */ e("span", { className: "truncate text-sm text-[#181918]", children: y2[0].label }) : y2.length === 0 ? /* @__PURE__ */ e("span", { className: "truncate text-sm text-[#8C8C8C]", children:
|
|
3234
|
+
) : !m2 && y2[0] ? /* @__PURE__ */ e("span", { className: "truncate text-sm text-[#181918]", children: y2[0].label }) : y2.length === 0 ? /* @__PURE__ */ e("span", { className: "truncate text-sm text-[#8C8C8C]", children: F }) : null
|
|
3231
3235
|
] }),
|
|
3232
3236
|
/* @__PURE__ */ e("div", { className: "flex items-center shrink-0 ml-2", children: o0 && h2 ? /* @__PURE__ */ e(
|
|
3233
3237
|
"button",
|
|
@@ -3238,11 +3242,11 @@ const H1 = (t, r, s = "label") => {
|
|
|
3238
3242
|
className: "flex items-center justify-center w-4 h-4 text-[#BFBFBF] hover:text-[#595959] transition-colors",
|
|
3239
3243
|
children: /* @__PURE__ */ e(E1, {})
|
|
3240
3244
|
}
|
|
3241
|
-
) :
|
|
3245
|
+
) : J !== void 0 ? /* @__PURE__ */ e("span", { className: "flex items-center text-[#8C8C8C]", children: J }) : /* @__PURE__ */ e(S1, { open: U }) })
|
|
3242
3246
|
]
|
|
3243
3247
|
}
|
|
3244
3248
|
),
|
|
3245
|
-
|
|
3249
|
+
U && !C && typeof document < "u" && c0(
|
|
3246
3250
|
/* @__PURE__ */ i(I2, { children: [
|
|
3247
3251
|
/* @__PURE__ */ e("style", { children: `
|
|
3248
3252
|
@keyframes shekel-dropdown-in {
|
|
@@ -3265,10 +3269,10 @@ const H1 = (t, r, s = "label") => {
|
|
|
3265
3269
|
width: E2.width,
|
|
3266
3270
|
borderRadius: 8,
|
|
3267
3271
|
boxShadow: "0 6px 16px 0 rgba(0,0,0,0.08), 0 3px 6px -4px rgba(0,0,0,0.12), 0 9px 28px 8px rgba(0,0,0,0.05)",
|
|
3268
|
-
...
|
|
3272
|
+
...L
|
|
3269
3273
|
},
|
|
3270
3274
|
children: [
|
|
3271
|
-
|
|
3275
|
+
b && /* @__PURE__ */ e("div", { className: "px-2 py-2 border-b border-[#F0F0F0]", children: /* @__PURE__ */ e(
|
|
3272
3276
|
"input",
|
|
3273
3277
|
{
|
|
3274
3278
|
ref: P2,
|
|
@@ -3276,43 +3280,43 @@ const H1 = (t, r, s = "label") => {
|
|
|
3276
3280
|
value: w2,
|
|
3277
3281
|
onChange: G2,
|
|
3278
3282
|
onKeyDown: g2,
|
|
3279
|
-
placeholder:
|
|
3283
|
+
placeholder: D,
|
|
3280
3284
|
className: "w-full outline-none text-sm bg-transparent px-2 py-1 text-[#181918] placeholder:text-[#8C8C8C]",
|
|
3281
|
-
onClick: (
|
|
3285
|
+
onClick: (I) => I.stopPropagation()
|
|
3282
3286
|
}
|
|
3283
3287
|
) }),
|
|
3284
|
-
/* @__PURE__ */ e("div", { role: "listbox", className: "overflow-auto flex flex-col gap-0.5", style: { maxHeight: 256, padding: 4 }, children: f2.length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-3 text-sm text-[#8C8C8C] text-center", children:
|
|
3285
|
-
const A2 = L2.includes(
|
|
3288
|
+
/* @__PURE__ */ e("div", { role: "listbox", className: "overflow-auto flex flex-col gap-0.5", style: { maxHeight: 256, padding: 4 }, children: f2.length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-3 text-sm text-[#8C8C8C] text-center", children: R }) : f2.map((I, p2) => {
|
|
3289
|
+
const A2 = L2.includes(I.value), W2 = p2 === j;
|
|
3286
3290
|
return /* @__PURE__ */ i(
|
|
3287
3291
|
"div",
|
|
3288
3292
|
{
|
|
3289
3293
|
role: "option",
|
|
3290
3294
|
"aria-selected": A2,
|
|
3291
|
-
"aria-disabled":
|
|
3295
|
+
"aria-disabled": I.disabled,
|
|
3292
3296
|
onClick: (X2) => {
|
|
3293
|
-
X2.stopPropagation(), _2(
|
|
3297
|
+
X2.stopPropagation(), _2(I);
|
|
3294
3298
|
},
|
|
3295
|
-
onMouseEnter: () => !
|
|
3296
|
-
className: `flex items-center justify-between transition-colors duration-150 ${
|
|
3299
|
+
onMouseEnter: () => !I.disabled && K(p2),
|
|
3300
|
+
className: `flex items-center justify-between transition-colors duration-150 ${I.disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer"}`,
|
|
3297
3301
|
style: {
|
|
3298
3302
|
padding: "10px 16px",
|
|
3299
3303
|
minHeight: 42,
|
|
3300
3304
|
borderRadius: 6,
|
|
3301
3305
|
fontSize: 14,
|
|
3302
3306
|
lineHeight: "22px",
|
|
3303
|
-
backgroundColor: A2 ?
|
|
3307
|
+
backgroundColor: A2 ? o2 : W2 && !I.disabled ? a2 : "transparent",
|
|
3304
3308
|
color: A2 ? l2 : "#181918",
|
|
3305
3309
|
fontWeight: A2 ? 600 : 400
|
|
3306
3310
|
},
|
|
3307
3311
|
children: [
|
|
3308
|
-
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children:
|
|
3309
|
-
/* @__PURE__ */ e("div", { className: "truncate font-semibold", children:
|
|
3310
|
-
/* @__PURE__ */ e("div", { className: "truncate text-xs text-[#8C8C8C] font-normal mt-0.5", children:
|
|
3311
|
-
] }) : /* @__PURE__ */ e("span", { className: "truncate", children:
|
|
3312
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: W ? W(I, { selected: A2 }) : I.description ? /* @__PURE__ */ i(I2, { children: [
|
|
3313
|
+
/* @__PURE__ */ e("div", { className: "truncate font-semibold", children: I.label }),
|
|
3314
|
+
/* @__PURE__ */ e("div", { className: "truncate text-xs text-[#8C8C8C] font-normal mt-0.5", children: I.description })
|
|
3315
|
+
] }) : /* @__PURE__ */ e("span", { className: "truncate", children: I.label }) }),
|
|
3312
3316
|
A2 && /* @__PURE__ */ e($1, { color: l2 })
|
|
3313
3317
|
]
|
|
3314
3318
|
},
|
|
3315
|
-
|
|
3319
|
+
I.value
|
|
3316
3320
|
);
|
|
3317
3321
|
}) })
|
|
3318
3322
|
]
|
|
@@ -3350,7 +3354,7 @@ const B1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
3350
3354
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
3351
3355
|
}
|
|
3352
3356
|
);
|
|
3353
|
-
}, O0 =
|
|
3357
|
+
}, O0 = s2.forwardRef(
|
|
3354
3358
|
({ control: t, name: r, ...s }, o) => t && r ? /* @__PURE__ */ e(B1, { control: t, name: r, ...s }) : /* @__PURE__ */ e(v0, { ref: o, name: r, ...s })
|
|
3355
3359
|
);
|
|
3356
3360
|
O0.displayName = "SelectInput";
|
|
@@ -3390,7 +3394,7 @@ const u0 = [
|
|
|
3390
3394
|
) }), I1 = () => /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M9 3l-4 4 4 4", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }) }), R1 = () => /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M5 3l4 4-4 4", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }) }), G1 = () => /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M11 3l-4 4 4 4M6 3L2 7l4 4", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }) }), Z1 = () => /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M3 3l4 4-4 4M8 3l4 4-4 4", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }) }), j1 = () => /* @__PURE__ */ i("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: [
|
|
3391
3395
|
/* @__PURE__ */ e("circle", { cx: "6", cy: "6", r: "6", fill: "currentColor" }),
|
|
3392
3396
|
/* @__PURE__ */ e("path", { d: "M4 4l4 4M8 4l-4 4", stroke: "#FFFFFF", strokeWidth: "1.2", strokeLinecap: "round" })
|
|
3393
|
-
] }), b0 =
|
|
3397
|
+
] }), b0 = s2.forwardRef(
|
|
3394
3398
|
(t, r) => {
|
|
3395
3399
|
const {
|
|
3396
3400
|
label: s,
|
|
@@ -3406,37 +3410,37 @@ const u0 = [
|
|
|
3406
3410
|
defaultValue: v,
|
|
3407
3411
|
onChange: u,
|
|
3408
3412
|
placeholder: f = "Select date",
|
|
3409
|
-
format:
|
|
3410
|
-
minDate:
|
|
3411
|
-
maxDate:
|
|
3413
|
+
format: F = "YYYY-MM-DD",
|
|
3414
|
+
minDate: b,
|
|
3415
|
+
maxDate: D,
|
|
3412
3416
|
disabledDate: m,
|
|
3413
|
-
showToday:
|
|
3417
|
+
showToday: w = !0,
|
|
3414
3418
|
allowClear: H = !0,
|
|
3415
3419
|
firstDayOfWeek: g = 0,
|
|
3416
3420
|
height: B = 44,
|
|
3417
3421
|
borderRadius: S = 12,
|
|
3418
|
-
className:
|
|
3422
|
+
className: Z = "",
|
|
3419
3423
|
style: M,
|
|
3420
|
-
popupClassName:
|
|
3424
|
+
popupClassName: $ = "",
|
|
3421
3425
|
onOpenChange: p,
|
|
3422
|
-
id:
|
|
3423
|
-
status:
|
|
3424
|
-
accentColor:
|
|
3425
|
-
errorColor:
|
|
3426
|
-
borderColor:
|
|
3427
|
-
filledBorderColor:
|
|
3428
|
-
} = t,
|
|
3426
|
+
id: L,
|
|
3427
|
+
status: k,
|
|
3428
|
+
accentColor: y = "#EC615B",
|
|
3429
|
+
errorColor: x = "#C21919",
|
|
3430
|
+
borderColor: E = "#D9D9D9",
|
|
3431
|
+
filledBorderColor: R = "#181918"
|
|
3432
|
+
} = t, r2 = _ !== void 0, [W, J] = O(s0(v)), Y = r2 ? s0(_) : W, [z, q] = O(!1), [n2, c2] = O(!1), [e2, i2] = O(Y ?? /* @__PURE__ */ new Date()), a2 = s2.useId(), N = L ?? a2, P = u2(null), o2 = u2(null), l2 = u2(null), [X, b2] = O({
|
|
3429
3433
|
top: 0,
|
|
3430
3434
|
left: 0,
|
|
3431
3435
|
width: 280
|
|
3432
3436
|
}), N2 = () => {
|
|
3433
|
-
if (!
|
|
3434
|
-
const V =
|
|
3437
|
+
if (!o2.current) return;
|
|
3438
|
+
const V = o2.current.getBoundingClientRect(), t2 = 280, f2 = typeof window < "u" ? window.innerWidth : 0, m2 = typeof window < "u" ? window.innerHeight : 0;
|
|
3435
3439
|
let L2 = V.left;
|
|
3436
|
-
L2 +
|
|
3440
|
+
L2 + t2 + 8 > f2 && (L2 = Math.max(8, f2 - t2 - 8));
|
|
3437
3441
|
const y2 = 340;
|
|
3438
3442
|
let M2 = V.bottom + 4;
|
|
3439
|
-
M2 + y2 + 8 > m2 && V.top > y2 + 8 && (M2 = V.top - y2 - 4), b2({ top: M2, left: L2, width:
|
|
3443
|
+
M2 + y2 + 8 > m2 && V.top > y2 + 8 && (M2 = V.top - y2 - 4), b2({ top: M2, left: L2, width: t2 });
|
|
3440
3444
|
};
|
|
3441
3445
|
v2(() => {
|
|
3442
3446
|
if (!z) return;
|
|
@@ -3446,46 +3450,46 @@ const u0 = [
|
|
|
3446
3450
|
window.removeEventListener("resize", V), window.removeEventListener("scroll", V, !0);
|
|
3447
3451
|
};
|
|
3448
3452
|
}, [z]);
|
|
3449
|
-
const G = !!l ||
|
|
3450
|
-
const
|
|
3451
|
-
return !!(j &&
|
|
3453
|
+
const G = !!l || k === "error", U = Y !== null, C2 = d === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : d, w2 = typeof B == "number" ? `${B}px` : B, k2 = typeof S == "number" ? `${S}px` : S, j = O2(() => b ? n0(s0(b)) : null, [b]), K = O2(() => D ? n0(s0(D)) : null, [D]), h2 = (V) => {
|
|
3454
|
+
const t2 = n0(V);
|
|
3455
|
+
return !!(j && t2 < j || K && t2 > K || m && m(t2));
|
|
3452
3456
|
};
|
|
3453
3457
|
v2(() => {
|
|
3454
|
-
|
|
3455
|
-
}, [
|
|
3456
|
-
const V = (
|
|
3458
|
+
Y && i2(Y);
|
|
3459
|
+
}, [Y == null ? void 0 : Y.getTime()]), v2(() => {
|
|
3460
|
+
const V = (t2) => {
|
|
3457
3461
|
var y2, M2;
|
|
3458
|
-
const f2 =
|
|
3462
|
+
const f2 = t2.target, m2 = (y2 = P.current) == null ? void 0 : y2.contains(f2), L2 = (M2 = l2.current) == null ? void 0 : M2.contains(f2);
|
|
3459
3463
|
!m2 && !L2 && z && (q(!1), p == null || p(!1));
|
|
3460
3464
|
};
|
|
3461
3465
|
return z && document.addEventListener("mousedown", V), () => document.removeEventListener("mousedown", V);
|
|
3462
3466
|
}, [z, p]);
|
|
3463
3467
|
const d2 = (V) => {
|
|
3464
|
-
|
|
3468
|
+
r2 || J(V), u == null || u(V, V ? R0(V, F) : "");
|
|
3465
3469
|
}, R2 = () => {
|
|
3466
3470
|
if (C) return;
|
|
3467
3471
|
const V = !z;
|
|
3468
|
-
q(V), p == null || p(V), V &&
|
|
3472
|
+
q(V), p == null || p(V), V && Y && i2(Y);
|
|
3469
3473
|
}, B2 = (V) => {
|
|
3470
3474
|
h2(V) || (d2(V), q(!1), p == null || p(!1));
|
|
3471
3475
|
}, D2 = (V) => {
|
|
3472
3476
|
V.stopPropagation(), d2(null);
|
|
3473
|
-
}, V2 = O2(() => n0(/* @__PURE__ */ new Date()), []), S2 = G ?
|
|
3474
|
-
const V =
|
|
3477
|
+
}, V2 = O2(() => n0(/* @__PURE__ */ new Date()), []), S2 = G ? x : z ? y : U ? R : E, E2 = z ? `0 0 0 2px ${U2(y, 0.2)}` : void 0, K2 = { "--shekel-accent": y }, j2 = H && U && !C && n2, P2 = g === 1 ? U1 : D1, T = O2(() => {
|
|
3478
|
+
const V = e2.getFullYear(), t2 = e2.getMonth(), f2 = new Date(V, t2, 1).getDay(), m2 = g === 1 ? f2 === 0 ? 6 : f2 - 1 : f2, L2 = new Date(V, t2 + 1, 0).getDate(), y2 = new Date(V, t2, 0).getDate(), M2 = [];
|
|
3475
3479
|
for (let $2 = m2 - 1; $2 >= 0; $2--)
|
|
3476
|
-
M2.push({ date: new Date(V,
|
|
3480
|
+
M2.push({ date: new Date(V, t2 - 1, y2 - $2), outside: !0 });
|
|
3477
3481
|
for (let $2 = 1; $2 <= L2; $2++)
|
|
3478
|
-
M2.push({ date: new Date(V,
|
|
3482
|
+
M2.push({ date: new Date(V, t2, $2), outside: !1 });
|
|
3479
3483
|
for (; M2.length < 42; ) {
|
|
3480
3484
|
const $2 = M2[M2.length - 1].date, T2 = new Date($2);
|
|
3481
3485
|
T2.setDate(T2.getDate() + 1), M2.push({ date: T2, outside: !0 });
|
|
3482
3486
|
}
|
|
3483
3487
|
return M2;
|
|
3484
|
-
}, [
|
|
3485
|
-
i2(new Date(
|
|
3488
|
+
}, [e2, g]), x2 = (V) => {
|
|
3489
|
+
i2(new Date(e2.getFullYear(), e2.getMonth() + V, 1));
|
|
3486
3490
|
}, F2 = (V) => {
|
|
3487
|
-
i2(new Date(
|
|
3488
|
-
}, H2 =
|
|
3491
|
+
i2(new Date(e2.getFullYear() + V, e2.getMonth(), 1));
|
|
3492
|
+
}, H2 = Y ? R0(Y, F) : "";
|
|
3489
3493
|
return /* @__PURE__ */ i("div", { className: "w-full", ref: r, style: K2, children: [
|
|
3490
3494
|
s && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
|
|
3491
3495
|
/* @__PURE__ */ i(
|
|
@@ -3493,7 +3497,7 @@ const u0 = [
|
|
|
3493
3497
|
{
|
|
3494
3498
|
htmlFor: N,
|
|
3495
3499
|
className: `block text-sm font-medium ${o}`,
|
|
3496
|
-
style: { color: G ?
|
|
3500
|
+
style: { color: G ? x : "#181918", ...n },
|
|
3497
3501
|
children: [
|
|
3498
3502
|
s,
|
|
3499
3503
|
h && C2
|
|
@@ -3502,11 +3506,11 @@ const u0 = [
|
|
|
3502
3506
|
),
|
|
3503
3507
|
a && /* @__PURE__ */ e("div", { className: "shrink-0", children: a })
|
|
3504
3508
|
] }),
|
|
3505
|
-
/* @__PURE__ */ i("div", { className: "relative", ref:
|
|
3509
|
+
/* @__PURE__ */ i("div", { className: "relative", ref: P, children: [
|
|
3506
3510
|
/* @__PURE__ */ i(
|
|
3507
3511
|
"div",
|
|
3508
3512
|
{
|
|
3509
|
-
ref:
|
|
3513
|
+
ref: o2,
|
|
3510
3514
|
id: N,
|
|
3511
3515
|
role: "combobox",
|
|
3512
3516
|
"aria-haspopup": "dialog",
|
|
@@ -3519,7 +3523,7 @@ const u0 = [
|
|
|
3519
3523
|
onKeyDown: (V) => {
|
|
3520
3524
|
C || ((V.key === "Enter" || V.key === " " || V.key === "ArrowDown") && (V.preventDefault(), R2()), V.key === "Escape" && z && (V.preventDefault(), q(!1), p == null || p(!1)));
|
|
3521
3525
|
},
|
|
3522
|
-
className: `flex items-center w-full bg-white border transition-colors duration-200 hover:border-[color:var(--shekel-accent)] ${C ? "opacity-60 cursor-not-allowed bg-[#F5F5F5]" : "cursor-pointer"} ${
|
|
3526
|
+
className: `flex items-center w-full bg-white border transition-colors duration-200 hover:border-[color:var(--shekel-accent)] ${C ? "opacity-60 cursor-not-allowed bg-[#F5F5F5]" : "cursor-pointer"} ${Z}`,
|
|
3523
3527
|
style: {
|
|
3524
3528
|
height: w2,
|
|
3525
3529
|
borderRadius: k2,
|
|
@@ -3532,7 +3536,7 @@ const u0 = [
|
|
|
3532
3536
|
/* @__PURE__ */ e(
|
|
3533
3537
|
"span",
|
|
3534
3538
|
{
|
|
3535
|
-
className: `flex-1 min-w-0 truncate text-sm ${
|
|
3539
|
+
className: `flex-1 min-w-0 truncate text-sm ${Y ? "text-[#181918]" : "text-[#8C8C8C]"}`,
|
|
3536
3540
|
children: H2 || f
|
|
3537
3541
|
}
|
|
3538
3542
|
),
|
|
@@ -3559,7 +3563,7 @@ const u0 = [
|
|
|
3559
3563
|
"div",
|
|
3560
3564
|
{
|
|
3561
3565
|
ref: l2,
|
|
3562
|
-
className: `fixed z-[1000] bg-white shekel-picker-anim ${
|
|
3566
|
+
className: `fixed z-[1000] bg-white shekel-picker-anim ${$}`,
|
|
3563
3567
|
style: {
|
|
3564
3568
|
top: X.top,
|
|
3565
3569
|
left: X.left,
|
|
@@ -3594,9 +3598,9 @@ const u0 = [
|
|
|
3594
3598
|
)
|
|
3595
3599
|
] }),
|
|
3596
3600
|
/* @__PURE__ */ i("div", { className: "text-sm font-medium text-[#181918]", children: [
|
|
3597
|
-
u0[
|
|
3601
|
+
u0[e2.getMonth()],
|
|
3598
3602
|
" ",
|
|
3599
|
-
|
|
3603
|
+
e2.getFullYear()
|
|
3600
3604
|
] }),
|
|
3601
3605
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
|
|
3602
3606
|
/* @__PURE__ */ e(
|
|
@@ -3630,8 +3634,8 @@ const u0 = [
|
|
|
3630
3634
|
},
|
|
3631
3635
|
V
|
|
3632
3636
|
)) }),
|
|
3633
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 px-1", children: T.map(({ date: V, outside:
|
|
3634
|
-
const m2 =
|
|
3637
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 px-1", children: T.map(({ date: V, outside: t2 }, f2) => {
|
|
3638
|
+
const m2 = Y && G0(V, Y), L2 = G0(V, V2), y2 = h2(V);
|
|
3635
3639
|
return /* @__PURE__ */ e(
|
|
3636
3640
|
"button",
|
|
3637
3641
|
{
|
|
@@ -3646,14 +3650,14 @@ const u0 = [
|
|
|
3646
3650
|
children: /* @__PURE__ */ e(
|
|
3647
3651
|
"span",
|
|
3648
3652
|
{
|
|
3649
|
-
className: `flex items-center justify-center rounded-full transition-colors ${y2 ? "text-[#D9D9D9] cursor-not-allowed" :
|
|
3653
|
+
className: `flex items-center justify-center rounded-full transition-colors ${y2 ? "text-[#D9D9D9] cursor-not-allowed" : t2 ? "text-[#BFBFBF] hover:bg-[#F5F5F5]" : "text-[#181918] hover:bg-[#F5F5F5]"}`,
|
|
3650
3654
|
style: {
|
|
3651
3655
|
width: 28,
|
|
3652
3656
|
height: 28,
|
|
3653
|
-
backgroundColor: m2 ?
|
|
3657
|
+
backgroundColor: m2 ? y : void 0,
|
|
3654
3658
|
color: m2 ? "#FFFFFF" : void 0,
|
|
3655
3659
|
fontWeight: m2 ? 600 : 400,
|
|
3656
|
-
border: L2 && !m2 ? `1px solid ${
|
|
3660
|
+
border: L2 && !m2 ? `1px solid ${y}` : void 0
|
|
3657
3661
|
},
|
|
3658
3662
|
children: V.getDate()
|
|
3659
3663
|
}
|
|
@@ -3662,7 +3666,7 @@ const u0 = [
|
|
|
3662
3666
|
f2
|
|
3663
3667
|
);
|
|
3664
3668
|
}) }),
|
|
3665
|
-
|
|
3669
|
+
w && /* @__PURE__ */ e("div", { className: "border-t border-[#F0F0F0] mt-2 pt-2 text-center", children: /* @__PURE__ */ e(
|
|
3666
3670
|
"button",
|
|
3667
3671
|
{
|
|
3668
3672
|
type: "button",
|
|
@@ -3671,7 +3675,7 @@ const u0 = [
|
|
|
3671
3675
|
},
|
|
3672
3676
|
disabled: h2(V2),
|
|
3673
3677
|
className: "text-sm hover:underline disabled:text-[#D9D9D9] disabled:no-underline",
|
|
3674
|
-
style: { color:
|
|
3678
|
+
style: { color: y },
|
|
3675
3679
|
children: "Today"
|
|
3676
3680
|
}
|
|
3677
3681
|
) })
|
|
@@ -3682,8 +3686,8 @@ const u0 = [
|
|
|
3682
3686
|
document.body
|
|
3683
3687
|
)
|
|
3684
3688
|
] }),
|
|
3685
|
-
l && /* @__PURE__ */ i("div", { className: "flex items-center mt-1 text-xs gap-1", style: { color:
|
|
3686
|
-
/* @__PURE__ */ e(J2, { color:
|
|
3689
|
+
l && /* @__PURE__ */ i("div", { className: "flex items-center mt-1 text-xs gap-1", style: { color: x }, children: [
|
|
3690
|
+
/* @__PURE__ */ e(J2, { color: x, size: 14 }),
|
|
3687
3691
|
l
|
|
3688
3692
|
] }),
|
|
3689
3693
|
!l && c && /* @__PURE__ */ e("div", { className: "mt-1 text-xs text-gray-500", children: c })
|
|
@@ -3706,7 +3710,7 @@ const T1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
3706
3710
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
3707
3711
|
}
|
|
3708
3712
|
);
|
|
3709
|
-
}, A1 =
|
|
3713
|
+
}, A1 = s2.forwardRef(
|
|
3710
3714
|
({ control: t, name: r, ...s }, o) => t && r ? /* @__PURE__ */ e(T1, { control: t, name: r, ...s }) : /* @__PURE__ */ e(b0, { ref: o, name: r, ...s })
|
|
3711
3715
|
);
|
|
3712
3716
|
A1.displayName = "DatePicker";
|
|
@@ -3766,18 +3770,18 @@ const C0 = [
|
|
|
3766
3770
|
rangeBgColor: u,
|
|
3767
3771
|
rangeTextColor: f
|
|
3768
3772
|
}) => {
|
|
3769
|
-
const
|
|
3770
|
-
const g = t.getFullYear(), B = t.getMonth(), S = new Date(g, B, 1).getDay(),
|
|
3771
|
-
for (let
|
|
3772
|
-
p.push({ date: new Date(g, B - 1,
|
|
3773
|
-
for (let
|
|
3774
|
-
p.push({ date: new Date(g, B,
|
|
3773
|
+
const F = l === 1 ? P1 : W1, b = O2(() => t0(/* @__PURE__ */ new Date()), []), D = O2(() => {
|
|
3774
|
+
const g = t.getFullYear(), B = t.getMonth(), S = new Date(g, B, 1).getDay(), Z = l === 1 ? S === 0 ? 6 : S - 1 : S, M = new Date(g, B + 1, 0).getDate(), $ = new Date(g, B, 0).getDate(), p = [];
|
|
3775
|
+
for (let L = Z - 1; L >= 0; L--)
|
|
3776
|
+
p.push({ date: new Date(g, B - 1, $ - L), outside: !0 });
|
|
3777
|
+
for (let L = 1; L <= M; L++)
|
|
3778
|
+
p.push({ date: new Date(g, B, L), outside: !1 });
|
|
3775
3779
|
for (; p.length < 42; ) {
|
|
3776
|
-
const
|
|
3777
|
-
|
|
3780
|
+
const L = p[p.length - 1].date, k = new Date(L);
|
|
3781
|
+
k.setDate(k.getDate() + 1), p.push({ date: k, outside: !0 });
|
|
3778
3782
|
}
|
|
3779
3783
|
return p;
|
|
3780
|
-
}, [t, l]), m = s ?? o,
|
|
3784
|
+
}, [t, l]), m = s ?? o, w = r && m ? r.getTime() <= m.getTime() ? r : m : null, H = r && m ? r.getTime() <= m.getTime() ? m : r : null;
|
|
3781
3785
|
return /* @__PURE__ */ i("div", { style: { width: 280 }, children: [
|
|
3782
3786
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between px-2 py-1", children: [
|
|
3783
3787
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-1", style: { minWidth: 64 }, children: c && /* @__PURE__ */ i(I2, { children: [
|
|
@@ -3842,24 +3846,24 @@ const C0 = [
|
|
|
3842
3846
|
)
|
|
3843
3847
|
] }) })
|
|
3844
3848
|
] }),
|
|
3845
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 px-1 pt-2 pb-1", children:
|
|
3846
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 px-1", onMouseLeave: () => n(null), children:
|
|
3847
|
-
const
|
|
3849
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 px-1 pt-2 pb-1", children: F.map((g) => /* @__PURE__ */ e("div", { className: "text-xs text-[#8C8C8C] text-center py-1", style: { height: 28 }, children: g }, g)) }),
|
|
3850
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 px-1", onMouseLeave: () => n(null), children: D.map(({ date: g, outside: B }, S) => {
|
|
3851
|
+
const Z = !!(r && e0(g, r)), M = !!(s && e0(g, s)), $ = w && H && !e0(w, H) ? O1(g, w, H) : !1, p = w && e0(g, w), L = H && e0(g, H), k = Z || M, y = e0(g, b), x = d(g);
|
|
3848
3852
|
return /* @__PURE__ */ e(
|
|
3849
3853
|
"button",
|
|
3850
3854
|
{
|
|
3851
3855
|
type: "button",
|
|
3852
|
-
disabled:
|
|
3856
|
+
disabled: x,
|
|
3853
3857
|
onClick: () => a(g),
|
|
3854
|
-
onMouseEnter: () => !
|
|
3858
|
+
onMouseEnter: () => !x && n(g),
|
|
3855
3859
|
className: "flex items-center justify-center text-sm",
|
|
3856
3860
|
style: {
|
|
3857
3861
|
height: 32,
|
|
3858
|
-
backgroundColor:
|
|
3859
|
-
borderTopLeftRadius: p ? 999 :
|
|
3860
|
-
borderBottomLeftRadius: p ? 999 :
|
|
3861
|
-
borderTopRightRadius:
|
|
3862
|
-
borderBottomRightRadius:
|
|
3862
|
+
backgroundColor: $ ? u : void 0,
|
|
3863
|
+
borderTopLeftRadius: p ? 999 : $ ? 0 : 999,
|
|
3864
|
+
borderBottomLeftRadius: p ? 999 : $ ? 0 : 999,
|
|
3865
|
+
borderTopRightRadius: L ? 999 : $ ? 0 : 999,
|
|
3866
|
+
borderBottomRightRadius: L ? 999 : $ ? 0 : 999
|
|
3863
3867
|
},
|
|
3864
3868
|
children: /* @__PURE__ */ e(
|
|
3865
3869
|
"span",
|
|
@@ -3868,10 +3872,10 @@ const C0 = [
|
|
|
3868
3872
|
style: {
|
|
3869
3873
|
width: 28,
|
|
3870
3874
|
height: 28,
|
|
3871
|
-
backgroundColor:
|
|
3872
|
-
color:
|
|
3873
|
-
fontWeight:
|
|
3874
|
-
border:
|
|
3875
|
+
backgroundColor: k ? v : void 0,
|
|
3876
|
+
color: k ? "#FFFFFF" : x ? "#D9D9D9" : B ? "#BFBFBF" : $ ? f : "#181918",
|
|
3877
|
+
fontWeight: k ? 600 : 400,
|
|
3878
|
+
border: y && !k ? `1px solid ${v}` : void 0
|
|
3875
3879
|
},
|
|
3876
3880
|
children: g.getDate()
|
|
3877
3881
|
}
|
|
@@ -3881,7 +3885,7 @@ const C0 = [
|
|
|
3881
3885
|
);
|
|
3882
3886
|
}) })
|
|
3883
3887
|
] });
|
|
3884
|
-
}, w0 =
|
|
3888
|
+
}, w0 = s2.forwardRef(
|
|
3885
3889
|
(t, r) => {
|
|
3886
3890
|
const {
|
|
3887
3891
|
label: s,
|
|
@@ -3897,47 +3901,47 @@ const C0 = [
|
|
|
3897
3901
|
defaultValue: v,
|
|
3898
3902
|
onChange: u,
|
|
3899
3903
|
placeholder: f = ["Start date", "End date"],
|
|
3900
|
-
format:
|
|
3901
|
-
separator:
|
|
3902
|
-
minDate:
|
|
3904
|
+
format: F = "YYYY-MM-DD",
|
|
3905
|
+
separator: b,
|
|
3906
|
+
minDate: D,
|
|
3903
3907
|
maxDate: m,
|
|
3904
|
-
disabledDate:
|
|
3908
|
+
disabledDate: w,
|
|
3905
3909
|
allowClear: H = !0,
|
|
3906
3910
|
firstDayOfWeek: g = 0,
|
|
3907
3911
|
height: B = 44,
|
|
3908
3912
|
borderRadius: S = 12,
|
|
3909
|
-
className:
|
|
3913
|
+
className: Z = "",
|
|
3910
3914
|
style: M,
|
|
3911
|
-
popupClassName:
|
|
3915
|
+
popupClassName: $ = "",
|
|
3912
3916
|
onOpenChange: p,
|
|
3913
|
-
id:
|
|
3914
|
-
status:
|
|
3915
|
-
accentColor:
|
|
3916
|
-
errorColor:
|
|
3917
|
-
borderColor:
|
|
3918
|
-
filledBorderColor:
|
|
3919
|
-
rangeBgColor:
|
|
3920
|
-
rangeTextColor:
|
|
3921
|
-
singlePanel:
|
|
3922
|
-
presets:
|
|
3923
|
-
} = t, z =
|
|
3917
|
+
id: L,
|
|
3918
|
+
status: k,
|
|
3919
|
+
accentColor: y = "#EC615B",
|
|
3920
|
+
errorColor: x = "#C21919",
|
|
3921
|
+
borderColor: E = "#D9D9D9",
|
|
3922
|
+
filledBorderColor: R = "#181918",
|
|
3923
|
+
rangeBgColor: r2,
|
|
3924
|
+
rangeTextColor: W,
|
|
3925
|
+
singlePanel: J = !1,
|
|
3926
|
+
presets: Y
|
|
3927
|
+
} = t, z = r2 ?? U2(y, 0.12), q = W ?? y, [n2, c2] = O(
|
|
3924
3928
|
typeof window < "u" ? window.innerWidth < 640 : !1
|
|
3925
3929
|
);
|
|
3926
3930
|
v2(() => {
|
|
3927
3931
|
const A = () => c2(window.innerWidth < 640);
|
|
3928
3932
|
return window.addEventListener("resize", A), () => window.removeEventListener("resize", A);
|
|
3929
3933
|
}, []);
|
|
3930
|
-
const
|
|
3934
|
+
const e2 = J || n2, i2 = _ !== void 0, [a2, N] = O(() => [
|
|
3931
3935
|
Q2(v == null ? void 0 : v[0]),
|
|
3932
3936
|
Q2(v == null ? void 0 : v[1])
|
|
3933
|
-
]),
|
|
3937
|
+
]), P = i2 ? [Q2(_[0]), Q2(_[1])] : a2, [o2, l2] = P, [X, b2] = O(!1), [N2, G] = O(!1), [U, C2] = O("from"), [w2, k2] = O(null), [j, K] = O(o2 ?? /* @__PURE__ */ new Date()), h2 = s2.useId(), d2 = L ?? h2, R2 = u2(null), B2 = u2(null), D2 = u2(null), [V2, S2] = O({ top: 0, left: 0 }), E2 = () => {
|
|
3934
3938
|
if (!B2.current) return;
|
|
3935
|
-
const A = B2.current.getBoundingClientRect(), g2 = typeof window < "u" ? window.innerWidth : 0, G2 =
|
|
3939
|
+
const A = B2.current.getBoundingClientRect(), g2 = typeof window < "u" ? window.innerWidth : 0, G2 = e2 ? 296 : 580;
|
|
3936
3940
|
let q2 = A.left;
|
|
3937
3941
|
q2 + G2 + 8 > g2 && (q2 = Math.max(8, g2 - G2 - 8)), S2({ top: A.bottom + 4, left: q2 });
|
|
3938
|
-
}, K2 = !!l ||
|
|
3942
|
+
}, K2 = !!l || k === "error", j2 = !!o2 || !!l2, P2 = d === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : d, T = typeof B == "number" ? `${B}px` : B, x2 = typeof S == "number" ? `${S}px` : S, F2 = O2(() => D ? t0(Q2(D)) : null, [D]), H2 = O2(() => m ? t0(Q2(m)) : null, [m]), V = (A) => {
|
|
3939
3943
|
const g2 = t0(A);
|
|
3940
|
-
return !!(F2 && g2 < F2 || H2 && g2 > H2 ||
|
|
3944
|
+
return !!(F2 && g2 < F2 || H2 && g2 > H2 || w && w(g2));
|
|
3941
3945
|
};
|
|
3942
3946
|
v2(() => {
|
|
3943
3947
|
const A = (g2) => {
|
|
@@ -3953,22 +3957,22 @@ const C0 = [
|
|
|
3953
3957
|
return window.addEventListener("resize", A), window.addEventListener("scroll", A, !0), () => {
|
|
3954
3958
|
window.removeEventListener("resize", A), window.removeEventListener("scroll", A, !0);
|
|
3955
3959
|
};
|
|
3956
|
-
}, [X,
|
|
3957
|
-
const
|
|
3960
|
+
}, [X, e2]);
|
|
3961
|
+
const t2 = (A, g2) => {
|
|
3958
3962
|
i2 || N([A, g2]), u == null || u(
|
|
3959
3963
|
[A, g2],
|
|
3960
|
-
[A ? l0(A,
|
|
3964
|
+
[A ? l0(A, F) : "", g2 ? l0(g2, F) : ""]
|
|
3961
3965
|
);
|
|
3962
3966
|
}, f2 = (A) => {
|
|
3963
|
-
V(A) || (
|
|
3967
|
+
V(A) || (U === "from" || !o2 ? (t2(A, null), C2("to"), k2(null)) : (A.getTime() < o2.getTime() ? t2(A, o2) : t2(o2, A), C2("from"), b2(!1), p == null || p(!1), k2(null)));
|
|
3964
3968
|
}, m2 = (A) => {
|
|
3965
3969
|
if (C) return;
|
|
3966
3970
|
A && C2(A);
|
|
3967
3971
|
const g2 = !X;
|
|
3968
|
-
b2(g2), p == null || p(g2), g2 && (
|
|
3972
|
+
b2(g2), p == null || p(g2), g2 && (o2 || l2) && K(o2 ?? l2 ?? /* @__PURE__ */ new Date());
|
|
3969
3973
|
}, L2 = (A) => {
|
|
3970
|
-
A.stopPropagation(),
|
|
3971
|
-
}, y2 = K2 ?
|
|
3974
|
+
A.stopPropagation(), t2(null, null), C2("from");
|
|
3975
|
+
}, y2 = K2 ? x : X ? y : j2 ? R : E, M2 = X ? `0 0 0 2px ${U2(y, 0.2)}` : void 0, $2 = { "--shekel-accent": y }, T2 = H && j2 && !C && N2, Q = o2 ? l0(o2, F) : "", _2 = l2 ? l0(l2, F) : "", Y2 = /* @__PURE__ */ e("span", { className: "mx-2 text-[#8C8C8C] flex items-center", children: /* @__PURE__ */ e("svg", { width: "14", height: "10", viewBox: "0 0 14 10", fill: "none", children: /* @__PURE__ */ e("path", { d: "M1 5h12M9 1l4 4-4 4", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) }) });
|
|
3972
3976
|
return /* @__PURE__ */ i("div", { className: "w-full", ref: r, style: $2, children: [
|
|
3973
3977
|
s && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
|
|
3974
3978
|
/* @__PURE__ */ i(
|
|
@@ -3976,7 +3980,7 @@ const C0 = [
|
|
|
3976
3980
|
{
|
|
3977
3981
|
htmlFor: d2,
|
|
3978
3982
|
className: `block text-sm font-medium ${o}`,
|
|
3979
|
-
style: { color: K2 ?
|
|
3983
|
+
style: { color: K2 ? x : "#181918", ...n },
|
|
3980
3984
|
children: [
|
|
3981
3985
|
s,
|
|
3982
3986
|
h && P2
|
|
@@ -3997,7 +4001,7 @@ const C0 = [
|
|
|
3997
4001
|
"aria-disabled": C,
|
|
3998
4002
|
onMouseEnter: () => G(!0),
|
|
3999
4003
|
onMouseLeave: () => G(!1),
|
|
4000
|
-
className: `flex items-center w-full bg-white border transition-colors duration-200 hover:border-[color:var(--shekel-accent)] ${C ? "opacity-60 cursor-not-allowed bg-[#F5F5F5]" : "cursor-pointer"} ${
|
|
4004
|
+
className: `flex items-center w-full bg-white border transition-colors duration-200 hover:border-[color:var(--shekel-accent)] ${C ? "opacity-60 cursor-not-allowed bg-[#F5F5F5]" : "cursor-pointer"} ${Z}`,
|
|
4001
4005
|
style: {
|
|
4002
4006
|
height: T,
|
|
4003
4007
|
borderRadius: x2,
|
|
@@ -4014,13 +4018,13 @@ const C0 = [
|
|
|
4014
4018
|
type: "button",
|
|
4015
4019
|
disabled: C,
|
|
4016
4020
|
onClick: () => m2("from"),
|
|
4017
|
-
className: `w-full text-left text-sm truncate ${
|
|
4018
|
-
children:
|
|
4021
|
+
className: `w-full text-left text-sm truncate ${Q ? "text-[#181918]" : "text-[#8C8C8C]"}`,
|
|
4022
|
+
children: Q || f[0]
|
|
4019
4023
|
}
|
|
4020
4024
|
),
|
|
4021
|
-
X &&
|
|
4025
|
+
X && U === "from" && /* @__PURE__ */ e("div", { className: "absolute left-0 right-2 bottom-[-6px] h-[2px] transition-all", style: { backgroundColor: y } })
|
|
4022
4026
|
] }),
|
|
4023
|
-
|
|
4027
|
+
b === void 0 ? Y2 : b,
|
|
4024
4028
|
/* @__PURE__ */ i("div", { className: "relative flex-1 min-w-0", children: [
|
|
4025
4029
|
/* @__PURE__ */ e(
|
|
4026
4030
|
"button",
|
|
@@ -4032,7 +4036,7 @@ const C0 = [
|
|
|
4032
4036
|
children: _2 || f[1]
|
|
4033
4037
|
}
|
|
4034
4038
|
),
|
|
4035
|
-
X &&
|
|
4039
|
+
X && U === "to" && /* @__PURE__ */ e("div", { className: "absolute left-0 right-2 bottom-[-6px] h-[2px] transition-all", style: { backgroundColor: y } })
|
|
4036
4040
|
] }),
|
|
4037
4041
|
/* @__PURE__ */ e("div", { className: "flex items-center shrink-0 ml-2", children: T2 ? /* @__PURE__ */ e(
|
|
4038
4042
|
"button",
|
|
@@ -4057,7 +4061,7 @@ const C0 = [
|
|
|
4057
4061
|
"div",
|
|
4058
4062
|
{
|
|
4059
4063
|
ref: D2,
|
|
4060
|
-
className: `fixed z-[1000] bg-white flex shekel-range-anim ${
|
|
4064
|
+
className: `fixed z-[1000] bg-white flex shekel-range-anim ${$}`,
|
|
4061
4065
|
style: {
|
|
4062
4066
|
top: V2.top,
|
|
4063
4067
|
left: V2.left,
|
|
@@ -4067,18 +4071,18 @@ const C0 = [
|
|
|
4067
4071
|
padding: 8
|
|
4068
4072
|
},
|
|
4069
4073
|
children: [
|
|
4070
|
-
|
|
4074
|
+
Y && Y.length > 0 && /* @__PURE__ */ e(
|
|
4071
4075
|
"div",
|
|
4072
4076
|
{
|
|
4073
4077
|
className: "flex flex-col py-1 pr-2 mr-2 border-r border-[#F0F0F0]",
|
|
4074
4078
|
style: { minWidth: 120 },
|
|
4075
|
-
children:
|
|
4079
|
+
children: Y.map((A, g2) => /* @__PURE__ */ e(
|
|
4076
4080
|
"button",
|
|
4077
4081
|
{
|
|
4078
4082
|
type: "button",
|
|
4079
4083
|
onClick: () => {
|
|
4080
4084
|
const G2 = Q2(A.value[0]), q2 = Q2(A.value[1]);
|
|
4081
|
-
|
|
4085
|
+
t2(G2, q2), b2(!1), p == null || p(!1);
|
|
4082
4086
|
},
|
|
4083
4087
|
className: "text-left px-3 py-1.5 text-sm text-[#181918] rounded hover:bg-[rgba(0,0,0,0.04)] transition-colors",
|
|
4084
4088
|
children: A.label
|
|
@@ -4091,7 +4095,7 @@ const C0 = [
|
|
|
4091
4095
|
j0,
|
|
4092
4096
|
{
|
|
4093
4097
|
viewDate: j,
|
|
4094
|
-
from:
|
|
4098
|
+
from: o2,
|
|
4095
4099
|
to: l2,
|
|
4096
4100
|
hoverDate: w2,
|
|
4097
4101
|
onHoverDate: k2,
|
|
@@ -4099,21 +4103,21 @@ const C0 = [
|
|
|
4099
4103
|
isDisabledDate: V,
|
|
4100
4104
|
firstDayOfWeek: g,
|
|
4101
4105
|
showLeftArrows: !0,
|
|
4102
|
-
showRightArrows:
|
|
4106
|
+
showRightArrows: e2,
|
|
4103
4107
|
onShiftMonth: (A) => K(new Date(j.getFullYear(), j.getMonth() + A, 1)),
|
|
4104
4108
|
onShiftYear: (A) => K(new Date(j.getFullYear() + A, j.getMonth(), 1)),
|
|
4105
|
-
accentColor:
|
|
4109
|
+
accentColor: y,
|
|
4106
4110
|
rangeBgColor: z,
|
|
4107
4111
|
rangeTextColor: q
|
|
4108
4112
|
}
|
|
4109
4113
|
),
|
|
4110
|
-
!
|
|
4114
|
+
!e2 && /* @__PURE__ */ i(I2, { children: [
|
|
4111
4115
|
/* @__PURE__ */ e("div", { className: "w-px bg-[#F0F0F0] mx-2" }),
|
|
4112
4116
|
/* @__PURE__ */ e(
|
|
4113
4117
|
j0,
|
|
4114
4118
|
{
|
|
4115
4119
|
viewDate: new Date(j.getFullYear(), j.getMonth() + 1, 1),
|
|
4116
|
-
from:
|
|
4120
|
+
from: o2,
|
|
4117
4121
|
to: l2,
|
|
4118
4122
|
hoverDate: w2,
|
|
4119
4123
|
onHoverDate: k2,
|
|
@@ -4124,7 +4128,7 @@ const C0 = [
|
|
|
4124
4128
|
showRightArrows: !0,
|
|
4125
4129
|
onShiftMonth: (A) => K(new Date(j.getFullYear(), j.getMonth() + A, 1)),
|
|
4126
4130
|
onShiftYear: (A) => K(new Date(j.getFullYear() + A, j.getMonth(), 1)),
|
|
4127
|
-
accentColor:
|
|
4131
|
+
accentColor: y,
|
|
4128
4132
|
rangeBgColor: z,
|
|
4129
4133
|
rangeTextColor: q
|
|
4130
4134
|
}
|
|
@@ -4137,8 +4141,8 @@ const C0 = [
|
|
|
4137
4141
|
document.body
|
|
4138
4142
|
)
|
|
4139
4143
|
] }),
|
|
4140
|
-
l && /* @__PURE__ */ i("div", { className: "flex items-center mt-1 text-xs gap-1", style: { color:
|
|
4141
|
-
/* @__PURE__ */ e(J2, { color:
|
|
4144
|
+
l && /* @__PURE__ */ i("div", { className: "flex items-center mt-1 text-xs gap-1", style: { color: x }, children: [
|
|
4145
|
+
/* @__PURE__ */ e(J2, { color: x, size: 14 }),
|
|
4142
4146
|
l
|
|
4143
4147
|
] }),
|
|
4144
4148
|
!l && c && /* @__PURE__ */ e("div", { className: "mt-1 text-xs text-gray-500", children: c })
|
|
@@ -4161,7 +4165,7 @@ const q1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
4161
4165
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
4162
4166
|
}
|
|
4163
4167
|
);
|
|
4164
|
-
}, X1 =
|
|
4168
|
+
}, X1 = s2.forwardRef(
|
|
4165
4169
|
({ control: t, name: r, ...s }, o) => t && r ? /* @__PURE__ */ e(q1, { control: t, name: r, ...s }) : /* @__PURE__ */ e(w0, { ref: o, name: r, ...s })
|
|
4166
4170
|
);
|
|
4167
4171
|
X1.displayName = "DateRangePicker";
|
|
@@ -4179,7 +4183,7 @@ const J1 = (t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), a0 = (t, r) => {
|
|
|
4179
4183
|
const s = t.split("."), o = s[0] || "0";
|
|
4180
4184
|
let n = s[1] ?? "";
|
|
4181
4185
|
return n.length < r ? n = n.padEnd(r, "0") : n = n.slice(0, r), r > 0 ? `${o}.${n}` : o;
|
|
4182
|
-
}, k0 =
|
|
4186
|
+
}, k0 = s2.forwardRef(
|
|
4183
4187
|
({
|
|
4184
4188
|
value: t,
|
|
4185
4189
|
onChange: r,
|
|
@@ -4198,44 +4202,44 @@ const J1 = (t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), a0 = (t, r) => {
|
|
|
4198
4202
|
allowDecimals: n,
|
|
4199
4203
|
thousandSep: a,
|
|
4200
4204
|
decimalSep: d
|
|
4201
|
-
}, u = { thousandSep: a, decimalSep: d }, [f,
|
|
4205
|
+
}, u = { thousandSep: a, decimalSep: d }, [f, F] = O(() => {
|
|
4202
4206
|
if (t == null || t === "") return "";
|
|
4203
4207
|
const H = String(t), g = o && n ? p0(H, s) : H;
|
|
4204
4208
|
return a0(g, v);
|
|
4205
|
-
}),
|
|
4206
|
-
|
|
4209
|
+
}), b = u2(null), D = (H) => {
|
|
4210
|
+
b.current = H, typeof _ == "function" ? _(H) : _ && (_.current = H);
|
|
4207
4211
|
};
|
|
4208
4212
|
return v2(() => {
|
|
4209
4213
|
if (t === void 0) return;
|
|
4210
4214
|
const H = t === null || t === "" ? "" : String(t), g = o && n && H ? p0(H, s) : H;
|
|
4211
|
-
|
|
4215
|
+
F(a0(g, v));
|
|
4212
4216
|
}, [t, o, n, s, a, d]), /* @__PURE__ */ e(
|
|
4213
4217
|
m0,
|
|
4214
4218
|
{
|
|
4215
|
-
ref:
|
|
4219
|
+
ref: D,
|
|
4216
4220
|
...C,
|
|
4217
4221
|
value: f,
|
|
4218
4222
|
onChange: (H) => {
|
|
4219
|
-
const g = H.target, B = g.selectionStart ?? 0, S = f,
|
|
4220
|
-
if (!n) return
|
|
4221
|
-
const [
|
|
4222
|
-
if (
|
|
4223
|
-
const
|
|
4224
|
-
return `${
|
|
4225
|
-
})(),
|
|
4226
|
-
|
|
4227
|
-
const p =
|
|
4223
|
+
const g = H.target, B = g.selectionStart ?? 0, S = f, Z = T0(g.value, u), M = (() => {
|
|
4224
|
+
if (!n) return Z.replace(/\D/g, "");
|
|
4225
|
+
const [L, ...k] = Z.split("."), y = L.replace(/\D/g, "");
|
|
4226
|
+
if (k.length === 0) return y;
|
|
4227
|
+
const x = k.join("").replace(/\D/g, "").slice(0, s);
|
|
4228
|
+
return `${y}.${x}`;
|
|
4229
|
+
})(), $ = a0(M, v);
|
|
4230
|
+
F($);
|
|
4231
|
+
const p = $.length - S.length;
|
|
4228
4232
|
requestAnimationFrame(() => {
|
|
4229
|
-
if (!
|
|
4230
|
-
const
|
|
4231
|
-
|
|
4233
|
+
if (!b.current) return;
|
|
4234
|
+
const L = Math.max(0, Math.min($.length, B + p));
|
|
4235
|
+
b.current.setSelectionRange(L, L);
|
|
4232
4236
|
}), r == null || r(M, H);
|
|
4233
4237
|
},
|
|
4234
4238
|
onFocus: c,
|
|
4235
4239
|
onBlur: (H) => {
|
|
4236
4240
|
if (o && n && f) {
|
|
4237
4241
|
const g = T0(f, u), B = p0(g, s), S = a0(B, v);
|
|
4238
|
-
|
|
4242
|
+
F(S), r == null || r(B);
|
|
4239
4243
|
}
|
|
4240
4244
|
l == null || l(H);
|
|
4241
4245
|
},
|
|
@@ -4260,7 +4264,7 @@ const Q1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
4260
4264
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
4261
4265
|
}
|
|
4262
4266
|
);
|
|
4263
|
-
}, ee =
|
|
4267
|
+
}, ee = s2.forwardRef(
|
|
4264
4268
|
({ control: t, name: r, ...s }, o) => t && r ? /* @__PURE__ */ e(Q1, { control: t, name: r, ...s }) : /* @__PURE__ */ e(k0, { ref: o, name: r, ...s })
|
|
4265
4269
|
);
|
|
4266
4270
|
ee.displayName = "AmountInput";
|
|
@@ -4386,41 +4390,41 @@ const h0 = (t) => {
|
|
|
4386
4390
|
value: v,
|
|
4387
4391
|
defaultValue: u,
|
|
4388
4392
|
onChange: f,
|
|
4389
|
-
onRemove:
|
|
4390
|
-
onPreview:
|
|
4391
|
-
showPreviewAction:
|
|
4393
|
+
onRemove: F,
|
|
4394
|
+
onPreview: b,
|
|
4395
|
+
showPreviewAction: D = !0,
|
|
4392
4396
|
previewActionText: m = "View",
|
|
4393
|
-
previewButtonVariant:
|
|
4397
|
+
previewButtonVariant: w = "pill",
|
|
4394
4398
|
showRemove: H = !0,
|
|
4395
4399
|
accept: g,
|
|
4396
4400
|
multiple: B = !1,
|
|
4397
4401
|
maxSize: S,
|
|
4398
|
-
maxFiles:
|
|
4402
|
+
maxFiles: Z,
|
|
4399
4403
|
fileTypesLabel: M,
|
|
4400
|
-
uploadText:
|
|
4404
|
+
uploadText: $ = "Drag and drop your document here or",
|
|
4401
4405
|
browseText: p = "Browse",
|
|
4402
|
-
hintText:
|
|
4403
|
-
dropZoneIcon:
|
|
4404
|
-
onUpload:
|
|
4405
|
-
showPreview:
|
|
4406
|
-
previewLayout:
|
|
4407
|
-
keepInputOnUpload:
|
|
4408
|
-
className:
|
|
4409
|
-
style:
|
|
4410
|
-
dropzoneClassName:
|
|
4411
|
-
dropzoneStyle:
|
|
4406
|
+
hintText: L,
|
|
4407
|
+
dropZoneIcon: k,
|
|
4408
|
+
onUpload: y,
|
|
4409
|
+
showPreview: x = !0,
|
|
4410
|
+
previewLayout: E = "list",
|
|
4411
|
+
keepInputOnUpload: R = !0,
|
|
4412
|
+
className: r2 = "",
|
|
4413
|
+
style: W,
|
|
4414
|
+
dropzoneClassName: J = "",
|
|
4415
|
+
dropzoneStyle: Y,
|
|
4412
4416
|
accentColor: z = "#EC615B",
|
|
4413
4417
|
errorColor: q = "#C21919",
|
|
4414
4418
|
borderColor: n2 = "#D9D9D9",
|
|
4415
4419
|
dropzoneBgColor: c2 = "#FFFFFF",
|
|
4416
|
-
id:
|
|
4417
|
-
} = t, i2 =
|
|
4418
|
-
|
|
4420
|
+
id: e2
|
|
4421
|
+
} = t, i2 = s2.useId(), a2 = e2 ?? i2, N = u2(null), P = v !== void 0, [o2, l2] = O(u ?? []), X = P ? v : o2, [b2, N2] = O(!1), [G, U] = O(""), C2 = !!C || !!G, w2 = a === void 0 ? /* @__PURE__ */ e("span", { style: { color: q }, children: "*" }) : a, k2 = L ?? (M ? `Supported file types: ${M}${S ? `. Max file size, ${h0(S)}` : ""}` : null), j = (T) => {
|
|
4422
|
+
P || l2(T), f == null || f(T);
|
|
4419
4423
|
}, K = (T, x2) => {
|
|
4420
4424
|
if (l2((F2) => {
|
|
4421
4425
|
const H2 = F2.map((V) => V.id === T ? { ...V, ...x2 } : V);
|
|
4422
|
-
return
|
|
4423
|
-
}),
|
|
4426
|
+
return P ? F2 : H2;
|
|
4427
|
+
}), P && v) {
|
|
4424
4428
|
const F2 = v.map((H2) => H2.id === T ? { ...H2, ...x2 } : H2);
|
|
4425
4429
|
f == null || f(F2);
|
|
4426
4430
|
}
|
|
@@ -4433,16 +4437,16 @@ const h0 = (t) => {
|
|
|
4433
4437
|
}
|
|
4434
4438
|
return null;
|
|
4435
4439
|
}, d2 = async (T) => {
|
|
4436
|
-
if (
|
|
4437
|
-
if (B || (T = T.slice(0, 1)),
|
|
4438
|
-
|
|
4440
|
+
if (U(""), T.length === 0) return;
|
|
4441
|
+
if (B || (T = T.slice(0, 1)), Z && X.length + T.length > Z) {
|
|
4442
|
+
U(`Max ${Z} files allowed`);
|
|
4439
4443
|
return;
|
|
4440
4444
|
}
|
|
4441
4445
|
const x2 = [], F2 = [];
|
|
4442
4446
|
for (const V of T) {
|
|
4443
|
-
const
|
|
4444
|
-
if (
|
|
4445
|
-
x2.push(
|
|
4447
|
+
const t2 = h2(V);
|
|
4448
|
+
if (t2) {
|
|
4449
|
+
x2.push(t2);
|
|
4446
4450
|
continue;
|
|
4447
4451
|
}
|
|
4448
4452
|
const f2 = M0(V) ? URL.createObjectURL(V) : void 0;
|
|
@@ -4453,28 +4457,28 @@ const h0 = (t) => {
|
|
|
4453
4457
|
size: V.size,
|
|
4454
4458
|
type: V.type,
|
|
4455
4459
|
thumbnailUrl: f2,
|
|
4456
|
-
status:
|
|
4457
|
-
progress:
|
|
4460
|
+
status: y ? "uploading" : "done",
|
|
4461
|
+
progress: y ? 0 : 100
|
|
4458
4462
|
});
|
|
4459
4463
|
}
|
|
4460
|
-
x2.length > 0 &&
|
|
4464
|
+
x2.length > 0 && U(x2[0]);
|
|
4461
4465
|
let H2 = B ? [...X, ...F2] : F2;
|
|
4462
|
-
if (
|
|
4466
|
+
if (Z && (H2 = H2.slice(0, Z)), j(H2), y)
|
|
4463
4467
|
for (const V of F2)
|
|
4464
4468
|
try {
|
|
4465
|
-
const
|
|
4469
|
+
const t2 = await y(V.file, {
|
|
4466
4470
|
onProgress: (f2) => K(V.id, { progress: f2 })
|
|
4467
4471
|
});
|
|
4468
|
-
K(V.id, { status: "done", progress: 100, ...
|
|
4469
|
-
} catch (
|
|
4472
|
+
K(V.id, { status: "done", progress: 100, ...t2 ?? {} });
|
|
4473
|
+
} catch (t2) {
|
|
4470
4474
|
K(V.id, {
|
|
4471
4475
|
status: "error",
|
|
4472
4476
|
progress: 0,
|
|
4473
|
-
error: (
|
|
4477
|
+
error: (t2 == null ? void 0 : t2.message) ?? "Upload failed"
|
|
4474
4478
|
});
|
|
4475
4479
|
}
|
|
4476
4480
|
}, R2 = (T) => {
|
|
4477
|
-
T.target.files && (d2(Array.from(T.target.files)), !
|
|
4481
|
+
T.target.files && (d2(Array.from(T.target.files)), !R && N.current && (N.current.value = ""));
|
|
4478
4482
|
}, B2 = (T) => {
|
|
4479
4483
|
if (T.preventDefault(), N2(!1), l) return;
|
|
4480
4484
|
const x2 = T.dataTransfer;
|
|
@@ -4482,15 +4486,15 @@ const h0 = (t) => {
|
|
|
4482
4486
|
}, D2 = (T) => {
|
|
4483
4487
|
T.thumbnailUrl && URL.revokeObjectURL(T.thumbnailUrl);
|
|
4484
4488
|
const x2 = X.filter((F2) => F2.id !== T.id);
|
|
4485
|
-
j(x2),
|
|
4489
|
+
j(x2), F == null || F(T);
|
|
4486
4490
|
};
|
|
4487
4491
|
v2(() => () => {
|
|
4488
4492
|
X.forEach((T) => {
|
|
4489
4493
|
T.thumbnailUrl && URL.revokeObjectURL(T.thumbnailUrl);
|
|
4490
4494
|
});
|
|
4491
4495
|
}, []);
|
|
4492
|
-
const V2 = X.some((T) => T.status === "uploading"), S2 = !!c || V2, E2 = l || S2, K2 = C2 ? q : b2 || S2 ? z : n2, j2 = b2 ? U2(z, 0.04) : S2 ? U2(z, 0.02) : c2, P2 = !B && X.length > 0 &&
|
|
4493
|
-
return /* @__PURE__ */ i("div", { className: `w-full ${
|
|
4496
|
+
const V2 = X.some((T) => T.status === "uploading"), S2 = !!c || V2, E2 = l || S2, K2 = C2 ? q : b2 || S2 ? z : n2, j2 = b2 ? U2(z, 0.04) : S2 ? U2(z, 0.02) : c2, P2 = !B && X.length > 0 && x && E === "list";
|
|
4497
|
+
return /* @__PURE__ */ i("div", { className: `w-full ${r2}`, style: W, children: [
|
|
4494
4498
|
/* @__PURE__ */ e("style", { children: `
|
|
4495
4499
|
@keyframes shekel-spin { to { transform: rotate(360deg); } }
|
|
4496
4500
|
.shekel-spin { animation: shekel-spin 0.8s linear infinite; transform-origin: center; }
|
|
@@ -4523,17 +4527,17 @@ const h0 = (t) => {
|
|
|
4523
4527
|
onDragLeave: () => N2(!1),
|
|
4524
4528
|
onDrop: B2,
|
|
4525
4529
|
"aria-busy": S2,
|
|
4526
|
-
className: `flex flex-col sm:flex-row items-center gap-4 sm:gap-6 px-4 sm:px-6 py-5 sm:py-6 rounded-[12px] transition-all duration-200 ${E2 ? "cursor-not-allowed" : "cursor-pointer"} ${l ? "opacity-60" : ""} ${
|
|
4530
|
+
className: `flex flex-col sm:flex-row items-center gap-4 sm:gap-6 px-4 sm:px-6 py-5 sm:py-6 rounded-[12px] transition-all duration-200 ${E2 ? "cursor-not-allowed" : "cursor-pointer"} ${l ? "opacity-60" : ""} ${J}`,
|
|
4527
4531
|
style: {
|
|
4528
4532
|
border: `1.5px dashed ${K2}`,
|
|
4529
4533
|
backgroundColor: j2,
|
|
4530
|
-
...
|
|
4534
|
+
...Y
|
|
4531
4535
|
},
|
|
4532
4536
|
children: [
|
|
4533
|
-
/* @__PURE__ */ e("div", { className: "shrink-0", children: S2 ? /* @__PURE__ */ e(oe, { size: 40, color: z }) :
|
|
4537
|
+
/* @__PURE__ */ e("div", { className: "shrink-0", children: S2 ? /* @__PURE__ */ e(oe, { size: 40, color: z }) : k ?? /* @__PURE__ */ e(re, { color: b2 ? z : "#181918", size: 20 }) }),
|
|
4534
4538
|
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0 text-center", children: [
|
|
4535
4539
|
S2 ? /* @__PURE__ */ e("div", { className: "text-[#181918] text-sm", style: { color: z }, children: h }) : /* @__PURE__ */ i("div", { className: "text-[#181918] text-sm", children: [
|
|
4536
|
-
|
|
4540
|
+
$,
|
|
4537
4541
|
" ",
|
|
4538
4542
|
/* @__PURE__ */ e(
|
|
4539
4543
|
"button",
|
|
@@ -4570,20 +4574,20 @@ const h0 = (t) => {
|
|
|
4570
4574
|
]
|
|
4571
4575
|
}
|
|
4572
4576
|
),
|
|
4573
|
-
|
|
4577
|
+
x && X.length > 0 && /* @__PURE__ */ e(
|
|
4574
4578
|
"div",
|
|
4575
4579
|
{
|
|
4576
|
-
className:
|
|
4580
|
+
className: E === "grid" ? "grid grid-cols-2 md:grid-cols-3 gap-3 mt-3" : "flex flex-col gap-2 mt-3",
|
|
4577
4581
|
children: X.map(
|
|
4578
|
-
(T) =>
|
|
4582
|
+
(T) => E === "grid" ? /* @__PURE__ */ e(
|
|
4579
4583
|
ne,
|
|
4580
4584
|
{
|
|
4581
4585
|
file: T,
|
|
4582
4586
|
onRemove: D2,
|
|
4583
|
-
onPreview:
|
|
4584
|
-
showPreviewAction:
|
|
4587
|
+
onPreview: b,
|
|
4588
|
+
showPreviewAction: D,
|
|
4585
4589
|
previewActionText: m,
|
|
4586
|
-
previewButtonVariant:
|
|
4590
|
+
previewButtonVariant: w,
|
|
4587
4591
|
showRemove: H,
|
|
4588
4592
|
accentColor: z,
|
|
4589
4593
|
errorColor: q,
|
|
@@ -4595,10 +4599,10 @@ const h0 = (t) => {
|
|
|
4595
4599
|
{
|
|
4596
4600
|
file: T,
|
|
4597
4601
|
onRemove: D2,
|
|
4598
|
-
onPreview:
|
|
4599
|
-
showPreviewAction:
|
|
4602
|
+
onPreview: b,
|
|
4603
|
+
showPreviewAction: D,
|
|
4600
4604
|
previewActionText: m,
|
|
4601
|
-
previewButtonVariant:
|
|
4605
|
+
previewButtonVariant: w,
|
|
4602
4606
|
showRemove: H,
|
|
4603
4607
|
accentColor: z,
|
|
4604
4608
|
errorColor: q,
|
|
@@ -4632,7 +4636,7 @@ const h0 = (t) => {
|
|
|
4632
4636
|
}) => {
|
|
4633
4637
|
const C = F0(t.name), _ = M0(t), v = t.status === "uploading", u = t.status === "error", f = () => {
|
|
4634
4638
|
s ? s(t) : X0(t);
|
|
4635
|
-
},
|
|
4639
|
+
}, F = !!(s || t.url || t.thumbnailUrl);
|
|
4636
4640
|
return /* @__PURE__ */ i("div", { className: "flex items-center gap-3 border border-[#E6E6E6] rounded-[12px] px-3 py-2 bg-white", children: [
|
|
4637
4641
|
/* @__PURE__ */ e("div", { className: "shrink-0 flex items-center justify-center w-10 h-10 rounded-lg bg-[#F5F5F5] overflow-hidden", children: _ && t.thumbnailUrl ? /* @__PURE__ */ e("img", { src: t.thumbnailUrl, alt: "", className: "w-full h-full object-cover" }) : /* @__PURE__ */ e(Y0, { ext: C, size: 28 }) }),
|
|
4638
4642
|
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -4654,7 +4658,7 @@ const h0 = (t) => {
|
|
|
4654
4658
|
) })
|
|
4655
4659
|
] }),
|
|
4656
4660
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
4657
|
-
o &&
|
|
4661
|
+
o && F && !v && (a === "pill" ? /* @__PURE__ */ i(
|
|
4658
4662
|
"button",
|
|
4659
4663
|
{
|
|
4660
4664
|
type: "button",
|
|
@@ -4831,31 +4835,31 @@ function J0({
|
|
|
4831
4835
|
disabled: v,
|
|
4832
4836
|
layout: u = "row",
|
|
4833
4837
|
columns: f,
|
|
4834
|
-
gap:
|
|
4835
|
-
equalWidth:
|
|
4836
|
-
cardHeight:
|
|
4838
|
+
gap: F = 16,
|
|
4839
|
+
equalWidth: b = !0,
|
|
4840
|
+
cardHeight: D = 94,
|
|
4837
4841
|
iconSize: m = 20,
|
|
4838
|
-
titleSize:
|
|
4842
|
+
titleSize: w = 12,
|
|
4839
4843
|
descriptionSize: H = 12,
|
|
4840
4844
|
radioSize: g = 24,
|
|
4841
4845
|
className: B = "",
|
|
4842
4846
|
style: S,
|
|
4843
|
-
cardClassName:
|
|
4847
|
+
cardClassName: Z = "",
|
|
4844
4848
|
cardStyle: M,
|
|
4845
|
-
accentColor:
|
|
4849
|
+
accentColor: $ = "#EC615B",
|
|
4846
4850
|
errorColor: p = "#C21919",
|
|
4847
|
-
borderColor:
|
|
4848
|
-
selectedBorderColor:
|
|
4849
|
-
selectedGlowColor:
|
|
4850
|
-
name:
|
|
4851
|
-
id:
|
|
4851
|
+
borderColor: L = "#EEEEEE",
|
|
4852
|
+
selectedBorderColor: k,
|
|
4853
|
+
selectedGlowColor: y,
|
|
4854
|
+
name: x,
|
|
4855
|
+
id: E
|
|
4852
4856
|
}) {
|
|
4853
|
-
const
|
|
4854
|
-
v ||
|
|
4857
|
+
const R = r !== void 0, [r2, W] = s2.useState(s), J = R ? r : r2, Y = s2.useId(), z = E ?? Y, q = !!C, n2 = c === void 0 ? /* @__PURE__ */ e("span", { style: { color: p }, children: "*" }) : c, c2 = typeof F == "number" ? `${F}px` : F, e2 = k ?? $, i2 = y ?? U2($, 0.2), a2 = (P) => {
|
|
4858
|
+
v || P.disabled || (R || W(P.value), o == null || o(P.value, P));
|
|
4855
4859
|
}, N = {
|
|
4856
4860
|
display: "grid",
|
|
4857
4861
|
gap: c2,
|
|
4858
|
-
gridTemplateColumns: f ? `repeat(${f}, minmax(0, 1fr))` : u === "row" ?
|
|
4862
|
+
gridTemplateColumns: f ? `repeat(${f}, minmax(0, 1fr))` : u === "row" ? b ? "repeat(auto-fit, minmax(180px, 1fr))" : `repeat(${t.length}, auto)` : "1fr",
|
|
4859
4863
|
...S
|
|
4860
4864
|
};
|
|
4861
4865
|
return /* @__PURE__ */ i("div", { className: "w-full", id: z, children: [
|
|
@@ -4873,32 +4877,32 @@ function J0({
|
|
|
4873
4877
|
),
|
|
4874
4878
|
l && /* @__PURE__ */ e("div", { className: "shrink-0", children: l })
|
|
4875
4879
|
] }),
|
|
4876
|
-
/* @__PURE__ */ e("div", { role: "radiogroup", "aria-labelledby": n ? z : void 0, className: B, style: N, children: t.map((
|
|
4877
|
-
const
|
|
4880
|
+
/* @__PURE__ */ e("div", { role: "radiogroup", "aria-labelledby": n ? z : void 0, className: B, style: N, children: t.map((P) => {
|
|
4881
|
+
const o2 = J === P.value, l2 = !!v || !!P.disabled;
|
|
4878
4882
|
return /* @__PURE__ */ i(
|
|
4879
4883
|
"div",
|
|
4880
4884
|
{
|
|
4881
4885
|
role: "radio",
|
|
4882
|
-
"aria-checked":
|
|
4886
|
+
"aria-checked": o2,
|
|
4883
4887
|
"aria-disabled": l2,
|
|
4884
4888
|
tabIndex: l2 ? -1 : 0,
|
|
4885
|
-
onClick: () => a2(
|
|
4889
|
+
onClick: () => a2(P),
|
|
4886
4890
|
onKeyDown: (X) => {
|
|
4887
|
-
(X.key === "Enter" || X.key === " ") && (X.preventDefault(), a2(
|
|
4891
|
+
(X.key === "Enter" || X.key === " ") && (X.preventDefault(), a2(P));
|
|
4888
4892
|
},
|
|
4889
|
-
className: `relative bg-white transition-all duration-200 ${l2 ? "opacity-60 cursor-not-allowed" : "cursor-pointer"} ${
|
|
4893
|
+
className: `relative bg-white transition-all duration-200 ${l2 ? "opacity-60 cursor-not-allowed" : "cursor-pointer"} ${Z}`,
|
|
4890
4894
|
style: {
|
|
4891
|
-
height: typeof
|
|
4895
|
+
height: typeof D == "number" ? `${D}px` : D,
|
|
4892
4896
|
padding: "14px 16px",
|
|
4893
4897
|
borderRadius: 16,
|
|
4894
|
-
border: `1.5px solid ${
|
|
4895
|
-
boxShadow:
|
|
4898
|
+
border: `1.5px solid ${o2 ? e2 : L}`,
|
|
4899
|
+
boxShadow: o2 ? `0 0 0 4px ${i2}` : "none",
|
|
4896
4900
|
...M
|
|
4897
4901
|
},
|
|
4898
4902
|
children: [
|
|
4899
4903
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-3 h-full", children: [
|
|
4900
4904
|
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0 flex flex-col justify-center", children: [
|
|
4901
|
-
|
|
4905
|
+
P.icon && /* @__PURE__ */ e(
|
|
4902
4906
|
"div",
|
|
4903
4907
|
{
|
|
4904
4908
|
className: "shrink-0 text-[#181918] flex items-center",
|
|
@@ -4908,7 +4912,7 @@ function J0({
|
|
|
4908
4912
|
{
|
|
4909
4913
|
className: "inline-flex items-center justify-center",
|
|
4910
4914
|
style: { width: m, height: m },
|
|
4911
|
-
children:
|
|
4915
|
+
children: P.icon
|
|
4912
4916
|
}
|
|
4913
4917
|
)
|
|
4914
4918
|
}
|
|
@@ -4917,33 +4921,33 @@ function J0({
|
|
|
4917
4921
|
"div",
|
|
4918
4922
|
{
|
|
4919
4923
|
className: "font-semibold text-[#181918] truncate",
|
|
4920
|
-
style: { fontSize:
|
|
4921
|
-
children:
|
|
4924
|
+
style: { fontSize: w, marginTop: P.icon ? 6 : 0, lineHeight: 1.3 },
|
|
4925
|
+
children: P.label
|
|
4922
4926
|
}
|
|
4923
4927
|
),
|
|
4924
|
-
|
|
4928
|
+
P.description && /* @__PURE__ */ e(
|
|
4925
4929
|
"div",
|
|
4926
4930
|
{
|
|
4927
4931
|
className: "text-[#8C8C8C] truncate",
|
|
4928
4932
|
style: { fontSize: H, marginTop: 2, lineHeight: 1.3 },
|
|
4929
|
-
children:
|
|
4933
|
+
children: P.description
|
|
4930
4934
|
}
|
|
4931
4935
|
)
|
|
4932
4936
|
] }),
|
|
4933
4937
|
/* @__PURE__ */ e("div", { className: "shrink-0 flex items-center", children: /* @__PURE__ */ e(
|
|
4934
4938
|
ie,
|
|
4935
4939
|
{
|
|
4936
|
-
selected:
|
|
4940
|
+
selected: o2,
|
|
4937
4941
|
disabled: l2,
|
|
4938
|
-
accentColor:
|
|
4942
|
+
accentColor: $,
|
|
4939
4943
|
size: g
|
|
4940
4944
|
}
|
|
4941
4945
|
) })
|
|
4942
4946
|
] }),
|
|
4943
|
-
|
|
4947
|
+
x && /* @__PURE__ */ e("input", { type: "hidden", name: x, value: o2 ? String(P.value) : "", readOnly: !0 })
|
|
4944
4948
|
]
|
|
4945
4949
|
},
|
|
4946
|
-
|
|
4950
|
+
P.value
|
|
4947
4951
|
);
|
|
4948
4952
|
}) }),
|
|
4949
4953
|
C && /* @__PURE__ */ i("div", { className: "flex items-center mt-2 text-xs gap-1", style: { color: p }, children: [
|
|
@@ -4986,7 +4990,7 @@ const ce = {
|
|
|
4986
4990
|
sm: { trackWidth: 28, trackHeight: 16, knobSize: 12 },
|
|
4987
4991
|
md: { trackWidth: 36, trackHeight: 20, knobSize: 16 },
|
|
4988
4992
|
lg: { trackWidth: 48, trackHeight: 26, knobSize: 22 }
|
|
4989
|
-
}, L0 =
|
|
4993
|
+
}, L0 = s2.forwardRef(
|
|
4990
4994
|
(t, r) => {
|
|
4991
4995
|
const {
|
|
4992
4996
|
checked: s,
|
|
@@ -5002,44 +5006,44 @@ const ce = {
|
|
|
5002
5006
|
trackWidth: v,
|
|
5003
5007
|
trackHeight: u,
|
|
5004
5008
|
knobSize: f,
|
|
5005
|
-
onColor:
|
|
5006
|
-
offColor:
|
|
5007
|
-
knobColor:
|
|
5009
|
+
onColor: F = "#EC615B",
|
|
5010
|
+
offColor: b = "#8C9196",
|
|
5011
|
+
knobColor: D = "#FFFFFF",
|
|
5008
5012
|
loadingColor: m,
|
|
5009
|
-
checkedIcon:
|
|
5013
|
+
checkedIcon: w,
|
|
5010
5014
|
uncheckedIcon: H,
|
|
5011
5015
|
name: g,
|
|
5012
5016
|
id: B,
|
|
5013
5017
|
className: S = "",
|
|
5014
|
-
style:
|
|
5018
|
+
style: Z,
|
|
5015
5019
|
autoFocus: M,
|
|
5016
|
-
tabIndex:
|
|
5017
|
-
} = t, p = s !== void 0, [
|
|
5020
|
+
tabIndex: $
|
|
5021
|
+
} = t, p = s !== void 0, [L, k] = s2.useState(o ?? !1), y = p ? !!s : L, x = s2.useId(), E = B ?? x, { trackWidth: R, trackHeight: r2, knobSize: W } = ce[_], J = v ?? R, Y = u ?? r2, z = f ?? W, q = (Y - z) / 2, n2 = y ? J - z - q : q, c2 = (N) => {
|
|
5018
5022
|
if (h || C) return;
|
|
5019
|
-
const
|
|
5020
|
-
p ||
|
|
5021
|
-
},
|
|
5022
|
-
(N.key === " " || N.key === "Enter" || N.key === "ArrowRight" && !
|
|
5023
|
-
}, i2 =
|
|
5023
|
+
const P = !y;
|
|
5024
|
+
p || k(P), n == null || n(P, N);
|
|
5025
|
+
}, e2 = (N) => {
|
|
5026
|
+
(N.key === " " || N.key === "Enter" || N.key === "ArrowRight" && !y || N.key === "ArrowLeft" && y) && (N.preventDefault(), c2(N));
|
|
5027
|
+
}, i2 = y ? F : b, a2 = /* @__PURE__ */ i(
|
|
5024
5028
|
"button",
|
|
5025
5029
|
{
|
|
5026
5030
|
ref: r,
|
|
5027
|
-
id:
|
|
5031
|
+
id: E,
|
|
5028
5032
|
type: "button",
|
|
5029
5033
|
role: "switch",
|
|
5030
|
-
"aria-checked":
|
|
5034
|
+
"aria-checked": y,
|
|
5031
5035
|
"aria-disabled": h || C,
|
|
5032
5036
|
disabled: h || C,
|
|
5033
5037
|
autoFocus: M,
|
|
5034
|
-
tabIndex:
|
|
5038
|
+
tabIndex: $,
|
|
5035
5039
|
onClick: c2,
|
|
5036
|
-
onKeyDown:
|
|
5040
|
+
onKeyDown: e2,
|
|
5037
5041
|
className: `relative inline-flex items-center shrink-0 rounded-full transition-colors duration-200 ${h || C ? "opacity-60 cursor-not-allowed" : "cursor-pointer"} ${S}`,
|
|
5038
5042
|
style: {
|
|
5039
|
-
width:
|
|
5040
|
-
height:
|
|
5043
|
+
width: J,
|
|
5044
|
+
height: Y,
|
|
5041
5045
|
backgroundColor: C ? m ?? i2 : i2,
|
|
5042
|
-
...
|
|
5046
|
+
...Z
|
|
5043
5047
|
},
|
|
5044
5048
|
children: [
|
|
5045
5049
|
/* @__PURE__ */ e(
|
|
@@ -5052,7 +5056,7 @@ const ce = {
|
|
|
5052
5056
|
transform: "translateY(-50%)",
|
|
5053
5057
|
width: z,
|
|
5054
5058
|
height: z,
|
|
5055
|
-
backgroundColor:
|
|
5059
|
+
backgroundColor: D,
|
|
5056
5060
|
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.15)"
|
|
5057
5061
|
},
|
|
5058
5062
|
children: C ? /* @__PURE__ */ i(
|
|
@@ -5069,10 +5073,10 @@ const ce = {
|
|
|
5069
5073
|
/* @__PURE__ */ e("path", { d: "M12 3a9 9 0 019 9", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" })
|
|
5070
5074
|
]
|
|
5071
5075
|
}
|
|
5072
|
-
) :
|
|
5076
|
+
) : y && w ? /* @__PURE__ */ e("span", { style: { color: i2, fontSize: z * 0.5, lineHeight: 1 }, children: w }) : !y && H ? /* @__PURE__ */ e("span", { style: { color: i2, fontSize: z * 0.5, lineHeight: 1 }, children: H }) : null
|
|
5073
5077
|
}
|
|
5074
5078
|
),
|
|
5075
|
-
g && /* @__PURE__ */ e("input", { type: "hidden", name: g, value:
|
|
5079
|
+
g && /* @__PURE__ */ e("input", { type: "hidden", name: g, value: y ? "true" : "false" })
|
|
5076
5080
|
]
|
|
5077
5081
|
}
|
|
5078
5082
|
);
|
|
@@ -5084,7 +5088,7 @@ const ce = {
|
|
|
5084
5088
|
/* @__PURE__ */ i(
|
|
5085
5089
|
"label",
|
|
5086
5090
|
{
|
|
5087
|
-
htmlFor:
|
|
5091
|
+
htmlFor: E,
|
|
5088
5092
|
className: `inline-flex items-center gap-3 ${h || C ? "cursor-not-allowed" : "cursor-pointer"} ${d}`,
|
|
5089
5093
|
style: l,
|
|
5090
5094
|
children: [
|
|
@@ -5112,7 +5116,7 @@ const de = ({ control: t, name: r, ...s }) => {
|
|
|
5112
5116
|
}
|
|
5113
5117
|
}
|
|
5114
5118
|
);
|
|
5115
|
-
}, pe =
|
|
5119
|
+
}, pe = s2.forwardRef(
|
|
5116
5120
|
({ control: t, name: r, ...s }, o) => t && r ? /* @__PURE__ */ e(de, { control: t, name: r, ...s }) : /* @__PURE__ */ e(L0, { ref: o, name: r, ...s })
|
|
5117
5121
|
);
|
|
5118
5122
|
pe.displayName = "Toggle";
|
|
@@ -5333,7 +5337,7 @@ const ue = {
|
|
|
5333
5337
|
bgColor: l = "#EEEEEE",
|
|
5334
5338
|
hoverBgColor: c = "#E5E5E5"
|
|
5335
5339
|
}) => {
|
|
5336
|
-
const [h, C] =
|
|
5340
|
+
const [h, C] = O(!1), _ = u2(null);
|
|
5337
5341
|
v2(() => {
|
|
5338
5342
|
const u = (f) => {
|
|
5339
5343
|
_.current && !_.current.contains(f.target) && C(!1);
|
|
@@ -5512,33 +5516,33 @@ const ue = {
|
|
|
5512
5516
|
copyValue: v,
|
|
5513
5517
|
onCopy: u,
|
|
5514
5518
|
copyIconColor: f,
|
|
5515
|
-
bottomTextColor:
|
|
5516
|
-
valueFontSize:
|
|
5517
|
-
backgroundPattern:
|
|
5519
|
+
bottomTextColor: F,
|
|
5520
|
+
valueFontSize: b = 32,
|
|
5521
|
+
backgroundPattern: D = "wave",
|
|
5518
5522
|
backgroundImage: m,
|
|
5519
|
-
topRight:
|
|
5523
|
+
topRight: w,
|
|
5520
5524
|
width: H = 348,
|
|
5521
5525
|
className: g = ""
|
|
5522
5526
|
}) => {
|
|
5523
|
-
const [B, S] =
|
|
5527
|
+
const [B, S] = O(!0), [Z, M] = O(!1), $ = () => {
|
|
5524
5528
|
S(!B), n && n();
|
|
5525
|
-
}, p = c ?? d,
|
|
5526
|
-
var
|
|
5527
|
-
const
|
|
5528
|
-
if (
|
|
5529
|
+
}, p = c ?? d, L = p != null && p !== "", k = typeof b == "number" ? `clamp(${Math.max(18, Math.round(b * 0.7))}px, 6vw, ${b}px)` : b, y = async () => {
|
|
5530
|
+
var R;
|
|
5531
|
+
const E = v ?? (p !== void 0 ? String(p) : "");
|
|
5532
|
+
if (E)
|
|
5529
5533
|
try {
|
|
5530
|
-
typeof navigator < "u" && ((
|
|
5534
|
+
typeof navigator < "u" && ((R = navigator.clipboard) != null && R.writeText) && await navigator.clipboard.writeText(E), M(!0), setTimeout(() => M(!1), 1500), u == null || u(E);
|
|
5531
5535
|
} catch {
|
|
5532
|
-
u == null || u(
|
|
5536
|
+
u == null || u(E);
|
|
5533
5537
|
}
|
|
5534
|
-
},
|
|
5538
|
+
}, x = /* @__PURE__ */ i("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
|
|
5535
5539
|
/* @__PURE__ */ e("rect", { x: "3", y: "6", width: "18", height: "12", rx: "2", stroke: "currentColor", strokeWidth: "2" }),
|
|
5536
5540
|
/* @__PURE__ */ e("path", { d: "M3 10h18M7 14h4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
5537
5541
|
] });
|
|
5538
5542
|
return /* @__PURE__ */ i(
|
|
5539
5543
|
"div",
|
|
5540
5544
|
{
|
|
5541
|
-
className: `relative overflow-hidden flex flex-col rounded-[20px] px-3 sm:px-[18px] pt-3 transition-all duration-300 ease-in-out hover:-translate-y-1 cursor-pointer self-start ${
|
|
5545
|
+
className: `relative overflow-hidden flex flex-col rounded-[20px] px-3 sm:px-[18px] pt-3 transition-all duration-300 ease-in-out hover:-translate-y-1 cursor-pointer self-start ${L ? "pb-1" : "pb-3"} ${g}`,
|
|
5542
5546
|
style: {
|
|
5543
5547
|
background: m ? `url(${m}) center / cover no-repeat` : "radial-gradient(circle at 50% 136%, #7A7F7A 0%, #181918 100%)",
|
|
5544
5548
|
width: typeof H == "number" ? `${H}px` : H,
|
|
@@ -5546,14 +5550,14 @@ const ue = {
|
|
|
5546
5550
|
boxShadow: "0 0 0 0 rgba(0, 0, 0, 0)",
|
|
5547
5551
|
transition: "all 0.3s ease-in-out"
|
|
5548
5552
|
},
|
|
5549
|
-
onMouseEnter: (
|
|
5550
|
-
|
|
5553
|
+
onMouseEnter: (E) => {
|
|
5554
|
+
E.currentTarget.style.boxShadow = "0 0 24px 0 rgba(0, 0, 0, 0.15)";
|
|
5551
5555
|
},
|
|
5552
|
-
onMouseLeave: (
|
|
5553
|
-
|
|
5556
|
+
onMouseLeave: (E) => {
|
|
5557
|
+
E.currentTarget.style.boxShadow = "0 0 0 0 rgba(0, 0, 0, 0)";
|
|
5554
5558
|
},
|
|
5555
5559
|
children: [
|
|
5556
|
-
|
|
5560
|
+
D !== "none" && /* @__PURE__ */ e(
|
|
5557
5561
|
"div",
|
|
5558
5562
|
{
|
|
5559
5563
|
className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full h-full pointer-events-none transition-opacity duration-300",
|
|
@@ -5567,8 +5571,8 @@ const ue = {
|
|
|
5567
5571
|
),
|
|
5568
5572
|
/* @__PURE__ */ i("div", { className: "relative z-10 min-w-0", children: [
|
|
5569
5573
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-2 mb-4", children: [
|
|
5570
|
-
/* @__PURE__ */ e("div", { className: "w-9 h-9 sm:w-10 sm:h-10 bg-[#616161] rounded-full flex items-center justify-center text-white transition-transform duration-300 ease-in-out hover:scale-110 shrink-0", children: s ||
|
|
5571
|
-
|
|
5574
|
+
/* @__PURE__ */ e("div", { className: "w-9 h-9 sm:w-10 sm:h-10 bg-[#616161] rounded-full flex items-center justify-center text-white transition-transform duration-300 ease-in-out hover:scale-110 shrink-0", children: s || x }),
|
|
5575
|
+
w && /* @__PURE__ */ e("div", { className: "shrink-0", children: w })
|
|
5572
5576
|
] }),
|
|
5573
5577
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2 mt-3 min-w-0", children: [
|
|
5574
5578
|
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm text-[#E6E6E6] font-light transition-colors duration-200 truncate", children: t }),
|
|
@@ -5576,7 +5580,7 @@ const ue = {
|
|
|
5576
5580
|
"button",
|
|
5577
5581
|
{
|
|
5578
5582
|
className: "bg-transparent border-none cursor-pointer p-1 flex items-center justify-center text-white hover:text-white/80 transition-colors duration-200",
|
|
5579
|
-
onClick:
|
|
5583
|
+
onClick: $,
|
|
5580
5584
|
"aria-label": B ? "Hide value" : "Show value",
|
|
5581
5585
|
children: B ? /* @__PURE__ */ i(
|
|
5582
5586
|
"svg",
|
|
@@ -5647,11 +5651,11 @@ const ue = {
|
|
|
5647
5651
|
"div",
|
|
5648
5652
|
{
|
|
5649
5653
|
className: "font-bold text-white transition-all duration-200 break-words leading-tight",
|
|
5650
|
-
style: { fontSize:
|
|
5654
|
+
style: { fontSize: k },
|
|
5651
5655
|
children: B ? `${a} ${r}` : "****"
|
|
5652
5656
|
}
|
|
5653
5657
|
),
|
|
5654
|
-
|
|
5658
|
+
L && /* @__PURE__ */ i("div", { className: "mt-1.5 mb-1", children: [
|
|
5655
5659
|
/* @__PURE__ */ e("div", { className: "w-full h-px bg-white/10 mb-1.5 transition-opacity duration-300" }),
|
|
5656
5660
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-2 transition-all duration-200", children: [
|
|
5657
5661
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
@@ -5679,7 +5683,7 @@ const ue = {
|
|
|
5679
5683
|
"span",
|
|
5680
5684
|
{
|
|
5681
5685
|
className: "text-xs font-light transition-all duration-200 truncate",
|
|
5682
|
-
style: { color:
|
|
5686
|
+
style: { color: F ?? "#E6E6E6" },
|
|
5683
5687
|
children: B ? h ? `${l} ${a} ${p}` : `${l}${p !== void 0 && p !== "" ? ` ${p}` : ""}` : "****"
|
|
5684
5688
|
}
|
|
5685
5689
|
)
|
|
@@ -5688,11 +5692,11 @@ const ue = {
|
|
|
5688
5692
|
"button",
|
|
5689
5693
|
{
|
|
5690
5694
|
type: "button",
|
|
5691
|
-
onClick:
|
|
5692
|
-
"aria-label":
|
|
5695
|
+
onClick: y,
|
|
5696
|
+
"aria-label": Z ? "Copied" : "Copy",
|
|
5693
5697
|
className: "bg-transparent border-none cursor-pointer p-0.5 flex items-center justify-center transition-colors duration-200 shrink-0 hover:opacity-80",
|
|
5694
5698
|
style: { color: f ?? "#EC615B" },
|
|
5695
|
-
children:
|
|
5699
|
+
children: Z ? /* @__PURE__ */ e("svg", { width: "20", height: "20", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M3.3335 8.33594L6.66683 11.6693L13.3335 4.33594", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */ i("svg", { width: "20", height: "20", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
5696
5700
|
/* @__PURE__ */ e("rect", { x: "5.33594", y: "5.33594", width: "8.66667", height: "8.66667", rx: "1.5", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
5697
5701
|
/* @__PURE__ */ e("path", { d: "M10.6693 5.33594V4.16927C10.6693 3.05036 10.6693 2.4909 10.4515 2.0633C10.2598 1.68723 9.95418 1.3816 9.57811 1.18987C9.15051 0.972097 8.59105 0.972097 7.47214 0.972097H4.16927C3.05036 0.972097 2.4909 0.972097 2.0633 1.18987C1.68723 1.3816 1.3816 1.68723 1.18987 2.0633C0.972097 2.4909 0.972097 3.05036 0.972097 4.16927V7.47214C0.972097 8.59105 0.972097 9.15051 1.18987 9.57811C1.3816 9.95418 1.68723 10.2598 2.0633 10.4515C2.4909 10.6693 3.05036 10.6693 4.16927 10.6693H5.33594", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
5698
5702
|
] })
|
|
@@ -5798,18 +5802,18 @@ const ue = {
|
|
|
5798
5802
|
borderColor: c = "#E6E6E6",
|
|
5799
5803
|
animated: h = !0
|
|
5800
5804
|
}) => {
|
|
5801
|
-
var
|
|
5802
|
-
const C = (
|
|
5805
|
+
var Z;
|
|
5806
|
+
const C = (Z = t[0]) == null ? void 0 : Z.key, [_, v] = O(r ?? C ?? ""), u = s ?? _, f = u2(u), F = u2(null), b = u2({}), [D, m] = O({
|
|
5803
5807
|
left: 0,
|
|
5804
5808
|
width: 0,
|
|
5805
5809
|
ready: !1
|
|
5806
|
-
}), [
|
|
5807
|
-
const M =
|
|
5808
|
-
if (!M ||
|
|
5809
|
-
const p =
|
|
5810
|
+
}), [w, H] = O(null), g = () => {
|
|
5811
|
+
const M = b.current[u], $ = F.current;
|
|
5812
|
+
if (!M || !$) return;
|
|
5813
|
+
const p = $.getBoundingClientRect(), L = M.getBoundingClientRect();
|
|
5810
5814
|
m({
|
|
5811
|
-
left:
|
|
5812
|
-
width:
|
|
5815
|
+
left: L.left - p.left,
|
|
5816
|
+
width: L.width,
|
|
5813
5817
|
ready: !0
|
|
5814
5818
|
});
|
|
5815
5819
|
};
|
|
@@ -5821,11 +5825,11 @@ const ue = {
|
|
|
5821
5825
|
}, [u]), v2(() => {
|
|
5822
5826
|
const M = f.current;
|
|
5823
5827
|
if (M === u) return;
|
|
5824
|
-
const
|
|
5825
|
-
H(p >
|
|
5828
|
+
const $ = t.findIndex((L) => L.key === M), p = t.findIndex((L) => L.key === u);
|
|
5829
|
+
H(p > $ ? "right" : "left"), f.current = u;
|
|
5826
5830
|
}, [u]);
|
|
5827
|
-
const B = (M,
|
|
5828
|
-
|
|
5831
|
+
const B = (M, $) => {
|
|
5832
|
+
$ || (s === void 0 && v(M), o == null || o(M));
|
|
5829
5833
|
}, S = t.find((M) => M.key === u);
|
|
5830
5834
|
return /* @__PURE__ */ i("div", { className: n, children: [
|
|
5831
5835
|
/* @__PURE__ */ e("style", { children: `
|
|
@@ -5843,35 +5847,35 @@ const ue = {
|
|
|
5843
5847
|
/* @__PURE__ */ i(
|
|
5844
5848
|
"div",
|
|
5845
5849
|
{
|
|
5846
|
-
ref:
|
|
5850
|
+
ref: F,
|
|
5847
5851
|
role: "tablist",
|
|
5848
5852
|
className: `shekel-tabs-bar relative flex items-stretch gap-6 overflow-x-auto overflow-y-hidden flex-nowrap ${a}`,
|
|
5849
5853
|
style: { borderBottom: `1px solid ${c}` },
|
|
5850
5854
|
children: [
|
|
5851
5855
|
t.map((M) => {
|
|
5852
|
-
const
|
|
5856
|
+
const $ = M.key === u;
|
|
5853
5857
|
return /* @__PURE__ */ e(
|
|
5854
5858
|
"button",
|
|
5855
5859
|
{
|
|
5856
5860
|
ref: (p) => {
|
|
5857
|
-
|
|
5861
|
+
b.current[M.key] = p;
|
|
5858
5862
|
},
|
|
5859
5863
|
type: "button",
|
|
5860
5864
|
role: "tab",
|
|
5861
|
-
"aria-selected":
|
|
5865
|
+
"aria-selected": $,
|
|
5862
5866
|
disabled: M.disabled,
|
|
5863
5867
|
onClick: () => B(M.key, M.disabled),
|
|
5864
5868
|
className: "shrink-0 whitespace-nowrap relative text-sm font-medium transition-colors duration-200 bg-transparent outline-none",
|
|
5865
5869
|
style: {
|
|
5866
5870
|
padding: "10px 0",
|
|
5867
|
-
color: M.disabled ? "#BFBFBF" :
|
|
5871
|
+
color: M.disabled ? "#BFBFBF" : $ ? l : "#181918",
|
|
5868
5872
|
cursor: M.disabled ? "not-allowed" : "pointer"
|
|
5869
5873
|
},
|
|
5870
5874
|
onMouseEnter: (p) => {
|
|
5871
|
-
!M.disabled &&
|
|
5875
|
+
!M.disabled && !$ && (p.currentTarget.style.color = l);
|
|
5872
5876
|
},
|
|
5873
5877
|
onMouseLeave: (p) => {
|
|
5874
|
-
!M.disabled &&
|
|
5878
|
+
!M.disabled && !$ && (p.currentTarget.style.color = "#181918");
|
|
5875
5879
|
},
|
|
5876
5880
|
children: M.label
|
|
5877
5881
|
},
|
|
@@ -5885,13 +5889,13 @@ const ue = {
|
|
|
5885
5889
|
className: "absolute bottom-0",
|
|
5886
5890
|
style: {
|
|
5887
5891
|
left: 0,
|
|
5888
|
-
transform: `translateX(${
|
|
5889
|
-
width:
|
|
5892
|
+
transform: `translateX(${D.left}px)`,
|
|
5893
|
+
width: D.width,
|
|
5890
5894
|
height: 2,
|
|
5891
5895
|
backgroundColor: l,
|
|
5892
5896
|
borderRadius: 2,
|
|
5893
|
-
transition:
|
|
5894
|
-
opacity:
|
|
5897
|
+
transition: D.ready && h ? "transform 280ms cubic-bezier(0.645, 0.045, 0.355, 1), width 280ms cubic-bezier(0.645, 0.045, 0.355, 1)" : "none",
|
|
5898
|
+
opacity: D.ready ? 1 : 0
|
|
5895
5899
|
}
|
|
5896
5900
|
}
|
|
5897
5901
|
)
|
|
@@ -5902,7 +5906,7 @@ const ue = {
|
|
|
5902
5906
|
"div",
|
|
5903
5907
|
{
|
|
5904
5908
|
role: "tabpanel",
|
|
5905
|
-
className: `pt-4 ${h ?
|
|
5909
|
+
className: `pt-4 ${h ? w === "right" ? "shekel-tab-panel-right" : w === "left" ? "shekel-tab-panel-left" : "shekel-tab-panel-fade" : ""} ${d}`,
|
|
5906
5910
|
children: S == null ? void 0 : S.children
|
|
5907
5911
|
},
|
|
5908
5912
|
u
|