shekel-fe-shared-lib 3.0.1 → 3.0.3
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 +17 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +966 -948
- package/dist/index.mjs.map +1 -1
- package/dist/types/components/Input/RadioCardGroup.d.ts +15 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as i, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { useController as
|
|
1
|
+
import { jsxs as i, Fragment as Z2, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import o2, { useState as O, useRef as f2, useEffect as F2, useCallback as A0, useMemo as O2, useLayoutEffect as Q0, createContext as e1 } from "react";
|
|
3
|
+
import { useController as T2 } from "react-hook-form";
|
|
4
4
|
import { createPortal as c0 } from "react-dom";
|
|
5
5
|
const t1 = {
|
|
6
6
|
xxsmall: 24,
|
|
@@ -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 = o2.forwardRef(
|
|
119
119
|
({
|
|
120
120
|
variant: t = "primary",
|
|
121
121
|
size: r = "large",
|
|
@@ -134,7 +134,7 @@ const t1 = {
|
|
|
134
134
|
disabled: f,
|
|
135
135
|
className: F = "",
|
|
136
136
|
style: b,
|
|
137
|
-
children:
|
|
137
|
+
children: U,
|
|
138
138
|
bgColor: m,
|
|
139
139
|
textColor: w,
|
|
140
140
|
borderColor: H,
|
|
@@ -143,29 +143,29 @@ const t1 = {
|
|
|
143
143
|
hoverBorderColor: S,
|
|
144
144
|
disabledBgColor: Z,
|
|
145
145
|
disabledTextColor: M,
|
|
146
|
-
focusRingColor:
|
|
146
|
+
focusRingColor: E,
|
|
147
147
|
...p
|
|
148
148
|
}, L) => {
|
|
149
|
-
const [k, y] = O(!1), [x,
|
|
150
|
-
var
|
|
151
|
-
if (
|
|
152
|
-
const
|
|
153
|
-
|
|
149
|
+
const [k, y] = O(!1), [x, $] = O(!1), [G, Q] = O(!1), [W, q] = O([]), P = f2(null), I = c1(C)[t], K = t1[r], s2 = r1[r], C2 = s1[r], e2 = s === "circle" || s === "square", d2 = e2 ? 0 : o1[r], h2 = o !== void 0 ? n1[o] : s === "circle" ? 9999 : 8, N = f || d, r2 = Math.max(12, Math.round(s2 * 1.2)), n2 = N ? Z ?? I.disabledBg : k ? g ?? I.hoverBg : m ?? I.bg, p2 = N ? Z ?? I.disabledBg : k ? S ?? I.hoverBorder ?? I.border : H ?? I.border, X = N ? M ?? I.disabledColor ?? I.color : k ? B ?? I.hoverColor ?? I.color : w ?? I.color, g2 = (j) => {
|
|
150
|
+
var Y;
|
|
151
|
+
if ($(!0), _ && !N && P.current) {
|
|
152
|
+
const a2 = P.current.getBoundingClientRect(), c2 = j.clientX - a2.left, l2 = j.clientY - a2.top, M2 = Math.max(a2.width, a2.height) * 2, H2 = Date.now() + Math.random();
|
|
153
|
+
q((L2) => [...L2, { id: H2, x: c2, y: l2, size: M2 }]), setTimeout(() => q((L2) => L2.filter((B2) => B2.id !== H2)), 600);
|
|
154
154
|
}
|
|
155
|
-
(
|
|
156
|
-
},
|
|
157
|
-
var
|
|
158
|
-
|
|
159
|
-
},
|
|
160
|
-
var
|
|
161
|
-
y(!0), (
|
|
162
|
-
},
|
|
163
|
-
var
|
|
164
|
-
y(!1),
|
|
165
|
-
},
|
|
166
|
-
v && k && !N &&
|
|
167
|
-
const
|
|
168
|
-
return /* @__PURE__ */ i(
|
|
155
|
+
(Y = p.onMouseDown) == null || Y.call(p, j);
|
|
156
|
+
}, V2 = (j) => {
|
|
157
|
+
var Y;
|
|
158
|
+
$(!1), (Y = p.onMouseUp) == null || Y.call(p, j);
|
|
159
|
+
}, R = (j) => {
|
|
160
|
+
var Y;
|
|
161
|
+
y(!0), (Y = p.onMouseEnter) == null || Y.call(p, j);
|
|
162
|
+
}, D = (j) => {
|
|
163
|
+
var Y;
|
|
164
|
+
y(!1), $(!1), (Y = p.onMouseLeave) == null || Y.call(p, j);
|
|
165
|
+
}, u2 = [];
|
|
166
|
+
v && k && !N && u2.push("translateY(-1px)"), u && x && !N && u2.push("scale(0.97)");
|
|
167
|
+
const v2 = u2.length ? u2.join(" ") : "none", b2 = G ? `0 0 0 3px ${E ?? I.focusRing}` : v && k && !N ? "0 4px 12px rgba(0,0,0,0.08)" : "none";
|
|
168
|
+
return /* @__PURE__ */ i(Z2, { children: [
|
|
169
169
|
/* @__PURE__ */ e("style", { children: `
|
|
170
170
|
@keyframes shekel-btn-spin { to { transform: rotate(360deg); } }
|
|
171
171
|
@keyframes shekel-btn-ripple { to { transform: scale(1); opacity: 0; } }
|
|
@@ -174,37 +174,37 @@ const t1 = {
|
|
|
174
174
|
"button",
|
|
175
175
|
{
|
|
176
176
|
ref: (j) => {
|
|
177
|
-
|
|
177
|
+
P.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
|
-
onMouseEnter:
|
|
183
|
-
onMouseLeave:
|
|
184
|
-
onMouseDown:
|
|
185
|
-
onMouseUp:
|
|
182
|
+
onMouseEnter: R,
|
|
183
|
+
onMouseLeave: D,
|
|
184
|
+
onMouseDown: g2,
|
|
185
|
+
onMouseUp: V2,
|
|
186
186
|
onFocus: (j) => {
|
|
187
|
-
var
|
|
188
|
-
const
|
|
189
|
-
(
|
|
187
|
+
var a2, c2;
|
|
188
|
+
const Y = j.target;
|
|
189
|
+
(a2 = Y.matches) != null && a2.call(Y, ":focus-visible") && Q(!0), (c2 = p.onFocus) == null || c2.call(p, j);
|
|
190
190
|
},
|
|
191
191
|
onBlur: (j) => {
|
|
192
|
-
var
|
|
193
|
-
|
|
192
|
+
var Y;
|
|
193
|
+
Q(!1), (Y = p.onBlur) == null || Y.call(p, j);
|
|
194
194
|
},
|
|
195
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
|
-
height:
|
|
198
|
-
width: e2 ?
|
|
199
|
-
padding: e2 ? 0 : `0 ${
|
|
200
|
-
borderRadius:
|
|
201
|
-
border: t === "link" || t === "text" ? "none" : `1px solid ${
|
|
202
|
-
backgroundColor:
|
|
197
|
+
height: K,
|
|
198
|
+
width: e2 ? K : a ? "100%" : void 0,
|
|
199
|
+
padding: e2 ? 0 : `0 ${d2}px`,
|
|
200
|
+
borderRadius: h2,
|
|
201
|
+
border: t === "link" || t === "text" ? "none" : `1px solid ${p2}`,
|
|
202
|
+
backgroundColor: n2,
|
|
203
203
|
color: X,
|
|
204
|
-
fontSize:
|
|
205
|
-
gap:
|
|
206
|
-
transform:
|
|
207
|
-
boxShadow:
|
|
204
|
+
fontSize: s2,
|
|
205
|
+
gap: C2,
|
|
206
|
+
transform: v2,
|
|
207
|
+
boxShadow: b2,
|
|
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
210
|
textDecoration: t === "link" && k && !N ? "underline" : void 0,
|
|
@@ -212,12 +212,12 @@ const t1 = {
|
|
|
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
|
-
!e2 && (d && l ? l :
|
|
218
|
-
e2 && !d && (c ??
|
|
219
|
-
!d && c && h === "right" && /* @__PURE__ */ e("span", { className: "inline-flex items-center", style: { width:
|
|
220
|
-
d && h === "right" && /* @__PURE__ */ e(H0, { size:
|
|
215
|
+
d && h === "left" && /* @__PURE__ */ e(H0, { size: r2 }),
|
|
216
|
+
!d && c && h === "left" && /* @__PURE__ */ e("span", { className: "inline-flex items-center", style: { width: r2, height: r2 }, children: c }),
|
|
217
|
+
!e2 && (d && l ? l : U),
|
|
218
|
+
e2 && !d && (c ?? U),
|
|
219
|
+
!d && c && h === "right" && /* @__PURE__ */ e("span", { className: "inline-flex items-center", style: { width: r2, height: r2 }, children: c }),
|
|
220
|
+
d && h === "right" && /* @__PURE__ */ e(H0, { size: r2 }),
|
|
221
221
|
_ && W.map((j) => /* @__PURE__ */ e(
|
|
222
222
|
"span",
|
|
223
223
|
{
|
|
@@ -292,7 +292,7 @@ const Se = ({
|
|
|
292
292
|
onMouseLeave: (B) => {
|
|
293
293
|
B.currentTarget.style.boxShadow = C ? g : "0 0 0 0 rgba(0, 0, 0, 0)";
|
|
294
294
|
},
|
|
295
|
-
children: f ? /* @__PURE__ */ i(
|
|
295
|
+
children: f ? /* @__PURE__ */ i(Z2, { children: [
|
|
296
296
|
/* @__PURE__ */ i("div", { children: [
|
|
297
297
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-6", children: [
|
|
298
298
|
/* @__PURE__ */ e(
|
|
@@ -322,7 +322,7 @@ const Se = ({
|
|
|
322
322
|
] })
|
|
323
323
|
}
|
|
324
324
|
);
|
|
325
|
-
},
|
|
325
|
+
}, $e = ({
|
|
326
326
|
icon: t,
|
|
327
327
|
iconPosition: r = "left",
|
|
328
328
|
size: s = "md",
|
|
@@ -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 F = "relative inline-flex items-center", b = "border focus:outline-none focus:ring-1 transition-all duration-200 ease-in-out",
|
|
345
|
+
const F = "relative inline-flex items-center", b = "border focus:outline-none focus:ring-1 transition-all duration-200 ease-in-out", U = {
|
|
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",
|
|
@@ -363,7 +363,7 @@ const Se = ({
|
|
|
363
363
|
borderColor: l || "#D1D5DB",
|
|
364
364
|
color: C,
|
|
365
365
|
...u
|
|
366
|
-
}, S = _ ? "" : "placeholder:text-gray-400", Z = l ? "" : "border-gray-300", M = C ? "" : "text-gray-900",
|
|
366
|
+
}, S = _ ? "" : "placeholder:text-gray-400", Z = l ? "" : "border-gray-300", M = C ? "" : "text-gray-900", E = c ? "" : "focus:ring-[#EC615B] focus:border-[#EC615B]", p = `${b} ${!n.includes("px-") && !n.includes("py-") ? U[s] : ""} ${t ? H : ""} ${g} ${n.includes("rounded") ? "" : w[v]} ${n.includes("border-") ? "" : Z} ${M} ${E} ${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
369
|
className: `${m[s]} ${k}`,
|
|
@@ -415,7 +415,7 @@ const Se = ({
|
|
|
415
415
|
md: "0 2px 8px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04)",
|
|
416
416
|
lg: "0 6px 16px rgba(0,0,0,0.08), 0 3px 6px rgba(0,0,0,0.04)",
|
|
417
417
|
xl: "0 12px 32px rgba(0,0,0,0.1), 0 6px 12px rgba(0,0,0,0.06)"
|
|
418
|
-
},
|
|
418
|
+
}, Ee = ({
|
|
419
419
|
title: t,
|
|
420
420
|
extra: r,
|
|
421
421
|
cover: s,
|
|
@@ -431,18 +431,18 @@ const Se = ({
|
|
|
431
431
|
children: v,
|
|
432
432
|
...u
|
|
433
433
|
}) => {
|
|
434
|
-
const [f, F] =
|
|
434
|
+
const [f, F] = o2.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: (U) => {
|
|
440
440
|
var m;
|
|
441
|
-
a && F(!0), (m = u.onMouseEnter) == null || m.call(u,
|
|
441
|
+
a && F(!0), (m = u.onMouseEnter) == null || m.call(u, U);
|
|
442
442
|
},
|
|
443
|
-
onMouseLeave: (
|
|
443
|
+
onMouseLeave: (U) => {
|
|
444
444
|
var m;
|
|
445
|
-
a && F(!1), (m = u.onMouseLeave) == null || m.call(u,
|
|
445
|
+
a && F(!1), (m = u.onMouseLeave) == null || m.call(u, U);
|
|
446
446
|
},
|
|
447
447
|
className: `bg-white rounded-xl overflow-hidden transition-shadow duration-200 ${o ? "border border-[#E6E6E6]" : ""} ${d}`,
|
|
448
448
|
style: {
|
|
@@ -481,23 +481,23 @@ const Se = ({
|
|
|
481
481
|
borderColor: _,
|
|
482
482
|
style: v
|
|
483
483
|
}) => {
|
|
484
|
-
const [u, f] = O(!1), F =
|
|
485
|
-
|
|
486
|
-
const
|
|
487
|
-
F.current && !F.current.contains(
|
|
484
|
+
const [u, f] = O(!1), F = f2(null);
|
|
485
|
+
F2(() => {
|
|
486
|
+
const $ = (G) => {
|
|
487
|
+
F.current && !F.current.contains(G.target) && f(!1);
|
|
488
488
|
};
|
|
489
|
-
return u && document.addEventListener("mousedown",
|
|
490
|
-
document.removeEventListener("mousedown",
|
|
489
|
+
return u && document.addEventListener("mousedown", $), () => {
|
|
490
|
+
document.removeEventListener("mousedown", $);
|
|
491
491
|
};
|
|
492
492
|
}, [u]);
|
|
493
493
|
const b = () => {
|
|
494
494
|
!d && r === "click" && f(!u);
|
|
495
|
-
},
|
|
495
|
+
}, U = () => {
|
|
496
496
|
!d && r === "hover" && f(!0);
|
|
497
497
|
}, m = () => {
|
|
498
498
|
!d && r === "hover" && f(!1);
|
|
499
|
-
}, w = (
|
|
500
|
-
|
|
499
|
+
}, w = ($) => {
|
|
500
|
+
!$.disabled && $.onClick && $.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,13 +513,13 @@ 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
|
-
}, Z = "hover:bg-gray-50", M = "border-gray-200",
|
|
516
|
+
}, Z = "hover:bg-gray-50", M = "border-gray-200", E = "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
520
|
ref: F,
|
|
521
521
|
className: `relative inline-block ${n}`,
|
|
522
|
-
onMouseEnter:
|
|
522
|
+
onMouseEnter: U,
|
|
523
523
|
onMouseLeave: m,
|
|
524
524
|
style: v,
|
|
525
525
|
children: [
|
|
@@ -541,29 +541,29 @@ const Se = ({
|
|
|
541
541
|
{
|
|
542
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
|
|
544
|
+
children: t.map(($) => {
|
|
545
|
+
let G = {};
|
|
546
|
+
return $.disabled || ($.danger ? G = {
|
|
547
547
|
...k,
|
|
548
548
|
...y
|
|
549
|
-
} : h && (
|
|
549
|
+
} : h && (G = p)), /* @__PURE__ */ i(
|
|
550
550
|
"div",
|
|
551
551
|
{
|
|
552
|
-
onClick: () => w(
|
|
552
|
+
onClick: () => w($),
|
|
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
|
+
${$.disabled ? "opacity-50 cursor-not-allowed" : L}
|
|
558
|
+
${$.danger ? C ? "" : E : "text-gray-700"}
|
|
559
559
|
`,
|
|
560
|
-
style:
|
|
560
|
+
style: G,
|
|
561
561
|
children: [
|
|
562
|
-
|
|
563
|
-
/* @__PURE__ */ e("span", { children:
|
|
562
|
+
$.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: $.icon }),
|
|
563
|
+
/* @__PURE__ */ e("span", { children: $.label })
|
|
564
564
|
]
|
|
565
565
|
},
|
|
566
|
-
|
|
566
|
+
$.key
|
|
567
567
|
);
|
|
568
568
|
})
|
|
569
569
|
}
|
|
@@ -591,7 +591,7 @@ const Se = ({
|
|
|
591
591
|
bgColor: f,
|
|
592
592
|
borderColor: F,
|
|
593
593
|
focusBorderColor: b = "#EC615B",
|
|
594
|
-
selectedBgColor:
|
|
594
|
+
selectedBgColor: U,
|
|
595
595
|
selectedTextColor: m,
|
|
596
596
|
hoverBgColor: w,
|
|
597
597
|
rounded: H = "lg",
|
|
@@ -600,39 +600,39 @@ const Se = ({
|
|
|
600
600
|
error: S,
|
|
601
601
|
helperText: Z
|
|
602
602
|
}) => {
|
|
603
|
-
const [M,
|
|
604
|
-
|
|
605
|
-
const N = (
|
|
606
|
-
x.current && !x.current.contains(
|
|
603
|
+
const [M, E] = O(!1), [p, L] = O(s), [k, y] = O(""), x = f2(null), $ = f2(null), G = r !== void 0 ? r : p;
|
|
604
|
+
F2(() => {
|
|
605
|
+
const N = (r2) => {
|
|
606
|
+
x.current && !x.current.contains(r2.target) && (E(!1), y(""), M && (a == null || a()));
|
|
607
607
|
};
|
|
608
|
-
return M && (document.addEventListener("mousedown", N), v &&
|
|
608
|
+
return M && (document.addEventListener("mousedown", N), v && $.current && $.current.focus()), () => {
|
|
609
609
|
document.removeEventListener("mousedown", N);
|
|
610
610
|
};
|
|
611
611
|
}, [M, v]);
|
|
612
|
-
const
|
|
613
|
-
r === void 0 && L(N), n == null || n(N),
|
|
612
|
+
const Q = (N) => {
|
|
613
|
+
r === void 0 && L(N), n == null || n(N), E(!1), y("");
|
|
614
614
|
}, W = (N) => {
|
|
615
615
|
N.stopPropagation(), r === void 0 && L(void 0), n == null || n("");
|
|
616
|
-
},
|
|
616
|
+
}, q = t.find((N) => N.value === G), P = v ? t.filter(
|
|
617
617
|
(N) => N.label.toLowerCase().includes(k.toLowerCase())
|
|
618
|
-
) : t,
|
|
618
|
+
) : t, I = {
|
|
619
619
|
sm: "px-3 py-1.5 text-sm",
|
|
620
620
|
md: "px-4 py-2 text-base",
|
|
621
621
|
lg: "px-5 py-3 text-lg",
|
|
622
622
|
responsive: "px-3 sm:px-4 md:px-5 py-1.5 sm:py-2 md:py-3 text-sm sm:text-base md:text-lg"
|
|
623
|
-
},
|
|
623
|
+
}, K = {
|
|
624
624
|
none: "rounded-none",
|
|
625
625
|
sm: "rounded-sm",
|
|
626
626
|
md: "rounded-md",
|
|
627
627
|
lg: "rounded-lg",
|
|
628
628
|
full: "rounded-full"
|
|
629
|
-
},
|
|
629
|
+
}, s2 = h ? "w-full" : "min-w-[200px]", C2 = () => {
|
|
630
630
|
const N = {};
|
|
631
631
|
return f && (N.backgroundColor = f), F && (N.borderColor = F), N;
|
|
632
632
|
}, e2 = () => {
|
|
633
633
|
const N = {};
|
|
634
|
-
return
|
|
635
|
-
},
|
|
634
|
+
return U && (N.backgroundColor = U), m && (N.color = m), N;
|
|
635
|
+
}, d2 = /* @__PURE__ */ e(
|
|
636
636
|
"svg",
|
|
637
637
|
{
|
|
638
638
|
className: `w-4 h-4 transition-transform duration-200 ease-out ${M ? "rotate-180" : ""}`,
|
|
@@ -641,29 +641,29 @@ const Se = ({
|
|
|
641
641
|
viewBox: "0 0 24 24",
|
|
642
642
|
children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
|
|
643
643
|
}
|
|
644
|
-
),
|
|
645
|
-
return /* @__PURE__ */ i("div", { className: `relative inline-block ${
|
|
644
|
+
), h2 = /* @__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
|
+
return /* @__PURE__ */ i("div", { className: `relative inline-block ${s2}`, 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
647
|
/* @__PURE__ */ i("div", { ref: x, className: "relative", children: [
|
|
648
|
-
/* @__PURE__ */ e("input", { type: "hidden", name: d, value:
|
|
648
|
+
/* @__PURE__ */ e("input", { type: "hidden", name: d, value: G ?? "", readOnly: !0 }),
|
|
649
649
|
/* @__PURE__ */ i(
|
|
650
650
|
"div",
|
|
651
651
|
{
|
|
652
|
-
onClick: () => !l &&
|
|
652
|
+
onClick: () => !l && E(!M),
|
|
653
653
|
className: `
|
|
654
654
|
select-trigger
|
|
655
655
|
flex items-center justify-between gap-2
|
|
656
656
|
border transition-all duration-200 ease-out
|
|
657
|
-
${!C.includes("px-") && !C.includes("py-") && !C.includes("h-") ?
|
|
658
|
-
${C.includes("rounded") ? "" :
|
|
657
|
+
${!C.includes("px-") && !C.includes("py-") && !C.includes("h-") ? I[c] : ""}
|
|
658
|
+
${C.includes("rounded") ? "" : K[H]}
|
|
659
659
|
${l ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
660
660
|
${M ? "ring-2 ring-opacity-20" : ""}
|
|
661
661
|
${C}
|
|
662
662
|
`,
|
|
663
663
|
style: {
|
|
664
|
-
...
|
|
665
|
-
backgroundColor: f ||
|
|
666
|
-
borderColor: S ? "#C21919" : F ||
|
|
664
|
+
...C2(),
|
|
665
|
+
backgroundColor: f || C2().backgroundColor || "#FFFFFF",
|
|
666
|
+
borderColor: S ? "#C21919" : F || C2().borderColor || "#D1D5DB",
|
|
667
667
|
...M && {
|
|
668
668
|
borderColor: S ? "#C21919" : b,
|
|
669
669
|
boxShadow: `0 0 0 2px ${S ? "#C21919" : b}20`
|
|
@@ -679,26 +679,26 @@ const Se = ({
|
|
|
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: q ? "text-gray-900" : "text-gray-400", children: q ? q.label : o }),
|
|
683
683
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
|
|
684
|
-
_ &&
|
|
684
|
+
_ && G && !l && /* @__PURE__ */ e(
|
|
685
685
|
"span",
|
|
686
686
|
{
|
|
687
687
|
onClick: W,
|
|
688
688
|
className: "text-gray-400 hover:text-gray-600 transition-colors duration-200 ease-out",
|
|
689
|
-
children:
|
|
689
|
+
children: h2
|
|
690
690
|
}
|
|
691
691
|
),
|
|
692
|
-
/* @__PURE__ */ e("span", { className: "text-gray-400", children:
|
|
692
|
+
/* @__PURE__ */ e("span", { className: "text-gray-400", children: d2 })
|
|
693
693
|
] })
|
|
694
694
|
]
|
|
695
695
|
}
|
|
696
696
|
),
|
|
697
|
-
M && !l && /* @__PURE__ */ e("div", { className: "absolute top-full left-0 right-0 mt-1 z-50 dropdown-slide-down", children: /* @__PURE__ */ i("div", { className: `select-dropdown bg-white shadow-lg border border-gray-200 py-1 max-h-[300px] overflow-auto ${
|
|
697
|
+
M && !l && /* @__PURE__ */ e("div", { className: "absolute top-full left-0 right-0 mt-1 z-50 dropdown-slide-down", children: /* @__PURE__ */ i("div", { className: `select-dropdown bg-white shadow-lg border border-gray-200 py-1 max-h-[300px] overflow-auto ${K[H]}`, children: [
|
|
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: $,
|
|
702
702
|
type: "text",
|
|
703
703
|
value: k,
|
|
704
704
|
onChange: (N) => y(N.target.value),
|
|
@@ -711,26 +711,26 @@ const Se = ({
|
|
|
711
711
|
onClick: (N) => N.stopPropagation()
|
|
712
712
|
}
|
|
713
713
|
) }),
|
|
714
|
-
|
|
714
|
+
P.length === 0 ? /* @__PURE__ */ e("div", { className: "px-4 py-3 text-sm text-gray-500 text-center", children: "No results found" }) : P.map((N) => /* @__PURE__ */ e(
|
|
715
715
|
"div",
|
|
716
716
|
{
|
|
717
|
-
onClick: () => !N.disabled &&
|
|
717
|
+
onClick: () => !N.disabled && Q(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 === G ? e2() : {},
|
|
725
|
+
backgroundColor: N.value === G ? U || "#FCEAE9" : void 0,
|
|
726
|
+
color: N.value === G ? m || "#EC615B" : "#181918",
|
|
727
|
+
fontWeight: N.value === G ? "medium" : void 0
|
|
728
728
|
},
|
|
729
|
-
onMouseEnter: (
|
|
730
|
-
!N.disabled && N.value !==
|
|
729
|
+
onMouseEnter: (r2) => {
|
|
730
|
+
!N.disabled && N.value !== G && (r2.currentTarget.style.backgroundColor = w || "#F3F4F6");
|
|
731
731
|
},
|
|
732
|
-
onMouseLeave: (
|
|
733
|
-
N.value !==
|
|
732
|
+
onMouseLeave: (r2) => {
|
|
733
|
+
N.value !== G && (r2.currentTarget.style.backgroundColor = "transparent");
|
|
734
734
|
},
|
|
735
735
|
children: N.label
|
|
736
736
|
},
|
|
@@ -758,7 +758,7 @@ const Se = ({
|
|
|
758
758
|
...o
|
|
759
759
|
}) => {
|
|
760
760
|
var d;
|
|
761
|
-
const { field: n, fieldState: a } =
|
|
761
|
+
const { field: n, fieldState: a } = T2({ control: t, name: r });
|
|
762
762
|
return /* @__PURE__ */ e(
|
|
763
763
|
W0,
|
|
764
764
|
{
|
|
@@ -789,7 +789,7 @@ const Se = ({
|
|
|
789
789
|
rounded: F = "md",
|
|
790
790
|
style: b
|
|
791
791
|
}) => {
|
|
792
|
-
const [
|
|
792
|
+
const [U, 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
|
|
@@ -829,7 +829,7 @@ const Se = ({
|
|
|
829
829
|
lg: "rounded-lg",
|
|
830
830
|
xl: "rounded-xl",
|
|
831
831
|
"2xl": "rounded-2xl"
|
|
832
|
-
}, S = g[h], Z = B[F], M = (y, x) => typeof s == "function" ? s(y) : y[s] || String(x),
|
|
832
|
+
}, S = g[h], Z = B[F], M = (y, x) => typeof s == "function" ? s(y) : y[s] || String(x), E = (y, x) => x ? x.split(".").reduce(($, G) => $ == null ? void 0 : $[G], y) : y, p = o === !1 ? r : r.slice((U - 1) * w, U * w), L = (y) => {
|
|
833
833
|
m(y), o && typeof o == "object" && o.onChange && o.onChange(y, w);
|
|
834
834
|
}, k = (y) => {
|
|
835
835
|
H(y), m(1), o && typeof o == "object" && o.onChange && o.onChange(1, y);
|
|
@@ -917,31 +917,31 @@ const Se = ({
|
|
|
917
917
|
children: "No data"
|
|
918
918
|
}
|
|
919
919
|
) }) : p.map((y, x) => {
|
|
920
|
-
const
|
|
920
|
+
const $ = a ? a(y, x) : {}, G = c && x % 2 === 1 ? f || "#F5F6F7" : "transparent", Q = 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: G
|
|
927
927
|
},
|
|
928
928
|
onMouseEnter: (W) => {
|
|
929
|
-
(v || !c || x % 2 === 0) && (W.currentTarget.style.backgroundColor =
|
|
929
|
+
(v || !c || x % 2 === 0) && (W.currentTarget.style.backgroundColor = Q);
|
|
930
930
|
},
|
|
931
931
|
onMouseLeave: (W) => {
|
|
932
|
-
W.currentTarget.style.backgroundColor =
|
|
932
|
+
W.currentTarget.style.backgroundColor = G;
|
|
933
933
|
},
|
|
934
|
-
|
|
935
|
-
children: t.map((W,
|
|
936
|
-
const
|
|
934
|
+
...$,
|
|
935
|
+
children: t.map((W, q) => {
|
|
936
|
+
const P = E(y, W.dataIndex), I = W.render ? W.render(P, y, x) : P;
|
|
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 && q !== 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
|
-
children:
|
|
944
|
+
children: I
|
|
945
945
|
},
|
|
946
946
|
W.key
|
|
947
947
|
);
|
|
@@ -958,7 +958,7 @@ const Se = ({
|
|
|
958
958
|
o !== !1 && /* @__PURE__ */ e(
|
|
959
959
|
C1,
|
|
960
960
|
{
|
|
961
|
-
current:
|
|
961
|
+
current: U,
|
|
962
962
|
pageSize: w,
|
|
963
963
|
total: r.length,
|
|
964
964
|
onChange: L,
|
|
@@ -1111,7 +1111,7 @@ const Se = ({
|
|
|
1111
1111
|
hideActionButtons: F = !1,
|
|
1112
1112
|
selectedActionButton: b
|
|
1113
1113
|
}) => {
|
|
1114
|
-
const
|
|
1114
|
+
const U = (S) => {
|
|
1115
1115
|
o == null || o(S.target.value);
|
|
1116
1116
|
}, w = {
|
|
1117
1117
|
sm: {
|
|
@@ -1225,7 +1225,7 @@ const Se = ({
|
|
|
1225
1225
|
{
|
|
1226
1226
|
type: "text",
|
|
1227
1227
|
placeholder: s,
|
|
1228
|
-
onChange:
|
|
1228
|
+
onChange: U,
|
|
1229
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) => {
|
|
@@ -1250,7 +1250,7 @@ const Se = ({
|
|
|
1250
1250
|
xl: "640px",
|
|
1251
1251
|
"2xl": "768px",
|
|
1252
1252
|
full: "100vw"
|
|
1253
|
-
},
|
|
1253
|
+
}, $0 = 'a[href], area[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]', E0 = ({ size: t = 20, color: r = "#181918" }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ e("path", { d: "M6 6l12 12M18 6L6 18", stroke: r, strokeWidth: "1.8", strokeLinecap: "round" }) }), B0 = ({ variant: t = "outline", loading: r, children: s, className: o = "", style: n, ...a }) => {
|
|
1254
1254
|
const d = {
|
|
1255
1255
|
primary: {
|
|
1256
1256
|
backgroundColor: a.disabled ? "#F9CECC" : "#EC615B",
|
|
@@ -1313,7 +1313,7 @@ const Se = ({
|
|
|
1313
1313
|
size: f = "md",
|
|
1314
1314
|
width: F,
|
|
1315
1315
|
maxHeight: b,
|
|
1316
|
-
placement:
|
|
1316
|
+
placement: U,
|
|
1317
1317
|
centered: m = !0,
|
|
1318
1318
|
edgeOffset: w = 40,
|
|
1319
1319
|
motion: H = "auto",
|
|
@@ -1322,95 +1322,95 @@ const Se = ({
|
|
|
1322
1322
|
submitOnEnter: S = !1,
|
|
1323
1323
|
bare: Z = !1,
|
|
1324
1324
|
noPadding: M = !1,
|
|
1325
|
-
closable:
|
|
1325
|
+
closable: E = !0,
|
|
1326
1326
|
maskClosable: p = !0,
|
|
1327
1327
|
closeOnEsc: L = !0,
|
|
1328
1328
|
destroyOnClose: k = !1,
|
|
1329
1329
|
lockScroll: y = !0,
|
|
1330
1330
|
bgColor: x = "#FFFFFF",
|
|
1331
|
-
overlayColor:
|
|
1332
|
-
borderRadius:
|
|
1333
|
-
shadow:
|
|
1331
|
+
overlayColor: $ = "rgba(0, 0, 0, 0.45)",
|
|
1332
|
+
borderRadius: G = 16,
|
|
1333
|
+
shadow: Q = "0 6px 16px rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05)",
|
|
1334
1334
|
animationDuration: W = 200,
|
|
1335
|
-
zIndex:
|
|
1336
|
-
className:
|
|
1337
|
-
style:
|
|
1338
|
-
headerClassName:
|
|
1339
|
-
headerStyle:
|
|
1340
|
-
bodyClassName:
|
|
1335
|
+
zIndex: q = 1e3,
|
|
1336
|
+
className: P = "",
|
|
1337
|
+
style: I,
|
|
1338
|
+
headerClassName: K = "",
|
|
1339
|
+
headerStyle: s2,
|
|
1340
|
+
bodyClassName: C2 = "",
|
|
1341
1341
|
bodyStyle: e2,
|
|
1342
|
-
footerClassName:
|
|
1343
|
-
footerStyle:
|
|
1342
|
+
footerClassName: d2 = "",
|
|
1343
|
+
footerStyle: h2,
|
|
1344
1344
|
ariaLabel: N,
|
|
1345
|
-
ariaLabelledBy:
|
|
1346
|
-
afterOpen:
|
|
1347
|
-
afterClose:
|
|
1345
|
+
ariaLabelledBy: r2,
|
|
1346
|
+
afterOpen: n2,
|
|
1347
|
+
afterClose: p2,
|
|
1348
1348
|
getContainer: X
|
|
1349
1349
|
}) => {
|
|
1350
|
-
const [
|
|
1350
|
+
const [g2, V2] = O(t), [R, D] = O(!1), [u2, v2] = O(!1), b2 = f2(null), j = f2(null), Y = f2(`shekel-modal-title-${Math.random().toString(36).slice(2, 8)}`), a2 = f2(null), c2 = A0(() => {
|
|
1351
1351
|
h == null || h(), r == null || r();
|
|
1352
1352
|
}, [h, r]);
|
|
1353
|
-
|
|
1353
|
+
F2(() => {
|
|
1354
1354
|
if (t) {
|
|
1355
|
-
|
|
1356
|
-
let
|
|
1357
|
-
const
|
|
1358
|
-
|
|
1359
|
-
|
|
1355
|
+
a2.current = typeof document < "u" ? document.activeElement : null, V2(!0);
|
|
1356
|
+
let J;
|
|
1357
|
+
const $2 = requestAnimationFrame(() => {
|
|
1358
|
+
J = requestAnimationFrame(() => {
|
|
1359
|
+
D(!0), n2 == null || n2();
|
|
1360
1360
|
});
|
|
1361
1361
|
});
|
|
1362
1362
|
return () => {
|
|
1363
|
-
cancelAnimationFrame(
|
|
1363
|
+
cancelAnimationFrame($2), J && cancelAnimationFrame(J);
|
|
1364
1364
|
};
|
|
1365
1365
|
} else {
|
|
1366
|
-
if (!
|
|
1367
|
-
|
|
1368
|
-
const
|
|
1369
|
-
|
|
1366
|
+
if (!g2) return;
|
|
1367
|
+
D(!1);
|
|
1368
|
+
const J = setTimeout(() => {
|
|
1369
|
+
V2(!1), p2 == null || p2(), a2.current && typeof a2.current.focus == "function" && a2.current.focus();
|
|
1370
1370
|
}, W);
|
|
1371
|
-
return () => clearTimeout(
|
|
1371
|
+
return () => clearTimeout(J);
|
|
1372
1372
|
}
|
|
1373
|
-
}, [t, W]),
|
|
1374
|
-
if (!y || !
|
|
1375
|
-
const
|
|
1376
|
-
return A > 0 && (
|
|
1377
|
-
|
|
1373
|
+
}, [t, W]), F2(() => {
|
|
1374
|
+
if (!y || !g2) return;
|
|
1375
|
+
const J = document.body, $2 = J.style.overflow, Y2 = J.style.paddingRight, A = window.innerWidth - document.documentElement.clientWidth;
|
|
1376
|
+
return A > 0 && (J.style.paddingRight = `${A}px`), J.style.overflow = "hidden", () => {
|
|
1377
|
+
J.style.overflow = $2, J.style.paddingRight = Y2;
|
|
1378
1378
|
};
|
|
1379
|
-
}, [
|
|
1380
|
-
if (!
|
|
1381
|
-
const
|
|
1382
|
-
if (L &&
|
|
1383
|
-
|
|
1379
|
+
}, [g2, y]), F2(() => {
|
|
1380
|
+
if (!g2) return;
|
|
1381
|
+
const J = ($2) => {
|
|
1382
|
+
if (L && $2.key === "Escape") {
|
|
1383
|
+
$2.stopPropagation(), c2();
|
|
1384
1384
|
return;
|
|
1385
1385
|
}
|
|
1386
|
-
if (
|
|
1387
|
-
const Y2 = j.current.querySelectorAll(
|
|
1386
|
+
if ($2.key !== "Tab" || !j.current) return;
|
|
1387
|
+
const Y2 = j.current.querySelectorAll($0);
|
|
1388
1388
|
if (Y2.length === 0) {
|
|
1389
|
-
|
|
1389
|
+
$2.preventDefault();
|
|
1390
1390
|
return;
|
|
1391
1391
|
}
|
|
1392
|
-
const A = Y2[0],
|
|
1393
|
-
|
|
1392
|
+
const A = Y2[0], y2 = Y2[Y2.length - 1], j2 = document.activeElement;
|
|
1393
|
+
$2.shiftKey && j2 === A ? ($2.preventDefault(), y2.focus()) : !$2.shiftKey && j2 === y2 && ($2.preventDefault(), A.focus());
|
|
1394
1394
|
};
|
|
1395
|
-
return document.addEventListener("keydown",
|
|
1396
|
-
}, [
|
|
1397
|
-
if (!
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1400
|
-
}, [
|
|
1401
|
-
const
|
|
1402
|
-
p &&
|
|
1403
|
-
},
|
|
1395
|
+
return document.addEventListener("keydown", J), () => document.removeEventListener("keydown", J);
|
|
1396
|
+
}, [g2, L, c2]), F2(() => {
|
|
1397
|
+
if (!R || !j.current) return;
|
|
1398
|
+
const $2 = j.current.querySelectorAll($0)[0];
|
|
1399
|
+
$2 ? $2.focus() : j.current.focus();
|
|
1400
|
+
}, [R]);
|
|
1401
|
+
const l2 = (J) => {
|
|
1402
|
+
p && J.target === b2.current && c2();
|
|
1403
|
+
}, M2 = async () => {
|
|
1404
1404
|
if (c)
|
|
1405
1405
|
try {
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1406
|
+
const J = c();
|
|
1407
|
+
J && typeof J.then == "function" && (v2(!0), await J);
|
|
1408
1408
|
} finally {
|
|
1409
|
-
|
|
1409
|
+
v2(!1);
|
|
1410
1410
|
}
|
|
1411
1411
|
};
|
|
1412
|
-
if (!
|
|
1413
|
-
const
|
|
1412
|
+
if (!g2) return null;
|
|
1413
|
+
const H2 = U ?? (m ? "center" : "top"), L2 = {
|
|
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" },
|
|
@@ -1420,7 +1420,7 @@ const Se = ({
|
|
|
1420
1420
|
"bottom-left": { justify: "flex-start", align: "flex-end" },
|
|
1421
1421
|
bottom: { justify: "center", align: "flex-end" },
|
|
1422
1422
|
"bottom-right": { justify: "flex-end", align: "flex-end" }
|
|
1423
|
-
}, { justify:
|
|
1423
|
+
}, { justify: B2, align: D2 } = L2[H2], A2 = H === "auto" ? {
|
|
1424
1424
|
"top-left": "slide-down",
|
|
1425
1425
|
top: "slide-down",
|
|
1426
1426
|
"top-right": "slide-down",
|
|
@@ -1430,48 +1430,48 @@ const Se = ({
|
|
|
1430
1430
|
"bottom-left": "slide-up",
|
|
1431
1431
|
bottom: "slide-up",
|
|
1432
1432
|
"bottom-right": "slide-up"
|
|
1433
|
-
}[
|
|
1433
|
+
}[H2] : H, P2 = {
|
|
1434
1434
|
fade: { closed: "none", open: "none" },
|
|
1435
1435
|
scale: { closed: "translateY(-10px) scale(0.96)", open: "translateY(0) scale(1)" },
|
|
1436
1436
|
"slide-up": { closed: "translateY(20px)", open: "translateY(0)" },
|
|
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 =
|
|
1441
|
-
backgroundColor:
|
|
1440
|
+
}, T = A2 === "auto" ? "scale" : A2, { closed: w2, open: _2 } = P2[T], E2 = typeof w == "number" ? `${w}px` : w, V = g === "none" ? { backgroundColor: "transparent" } : g === "blur" ? {
|
|
1441
|
+
backgroundColor: $,
|
|
1442
1442
|
backdropFilter: "blur(6px)",
|
|
1443
1443
|
WebkitBackdropFilter: "blur(6px)"
|
|
1444
|
-
} : { backgroundColor:
|
|
1445
|
-
!u && /* @__PURE__ */ e(B0, { variant: "outline", onClick: () =>
|
|
1444
|
+
} : { backgroundColor: $ }, t2 = F ?? h1[f], m2 = typeof G == "number" ? `${G}px` : G, x2 = b !== void 0 ? typeof b == "number" ? `${b}px` : b : f === "full" ? "100vh" : "calc(100vh - 40px)", k2 = a === null || a === !1 ? null : a === void 0 ? a === void 0 && (c || h) ? /* @__PURE__ */ i(Z2, { children: [
|
|
1445
|
+
!u && /* @__PURE__ */ e(B0, { variant: "outline", onClick: () => c2(), children: l }),
|
|
1446
1446
|
c && /* @__PURE__ */ e(
|
|
1447
1447
|
B0,
|
|
1448
1448
|
{
|
|
1449
1449
|
variant: _ ? "danger" : "primary",
|
|
1450
|
-
onClick:
|
|
1450
|
+
onClick: M2,
|
|
1451
1451
|
disabled: v,
|
|
1452
|
-
loading: C ??
|
|
1452
|
+
loading: C ?? u2,
|
|
1453
1453
|
children: d
|
|
1454
1454
|
}
|
|
1455
1455
|
)
|
|
1456
|
-
] }) : null : a,
|
|
1457
|
-
if (
|
|
1458
|
-
const
|
|
1456
|
+
] }) : null : a, N2 = r2 ?? (typeof s == "string" ? Y.current : void 0), U2 = X ? X() : typeof document < "u" ? document.body : null;
|
|
1457
|
+
if (!U2) return null;
|
|
1458
|
+
const W2 = /* @__PURE__ */ i(
|
|
1459
1459
|
"div",
|
|
1460
1460
|
{
|
|
1461
|
-
ref:
|
|
1462
|
-
onMouseDown:
|
|
1461
|
+
ref: b2,
|
|
1462
|
+
onMouseDown: l2,
|
|
1463
1463
|
role: "presentation",
|
|
1464
|
-
"aria-hidden": !
|
|
1464
|
+
"aria-hidden": !R,
|
|
1465
1465
|
className: "shekel-modal-overlay",
|
|
1466
1466
|
style: {
|
|
1467
1467
|
position: "fixed",
|
|
1468
1468
|
inset: 0,
|
|
1469
|
-
zIndex:
|
|
1469
|
+
zIndex: q,
|
|
1470
1470
|
display: "flex",
|
|
1471
|
-
alignItems:
|
|
1472
|
-
justifyContent:
|
|
1473
|
-
padding: f === "full" ? 0 :
|
|
1474
|
-
opacity:
|
|
1471
|
+
alignItems: D2,
|
|
1472
|
+
justifyContent: B2,
|
|
1473
|
+
padding: f === "full" ? 0 : E2,
|
|
1474
|
+
opacity: R ? 1 : 0,
|
|
1475
1475
|
transition: `opacity ${W}ms ease-out, backdrop-filter ${W}ms ease-out`,
|
|
1476
1476
|
overflowY: "auto",
|
|
1477
1477
|
willChange: "opacity",
|
|
@@ -1496,67 +1496,67 @@ const Se = ({
|
|
|
1496
1496
|
role: "dialog",
|
|
1497
1497
|
"aria-modal": "true",
|
|
1498
1498
|
"aria-label": N,
|
|
1499
|
-
"aria-labelledby":
|
|
1499
|
+
"aria-labelledby": N2,
|
|
1500
1500
|
tabIndex: -1,
|
|
1501
|
-
onMouseDown: (
|
|
1502
|
-
onKeyDown: (
|
|
1503
|
-
S &&
|
|
1501
|
+
onMouseDown: (J) => J.stopPropagation(),
|
|
1502
|
+
onKeyDown: (J) => {
|
|
1503
|
+
S && J.key === "Enter" && !J.shiftKey && J.target.tagName !== "TEXTAREA" && c && (J.preventDefault(), M2());
|
|
1504
1504
|
},
|
|
1505
|
-
className: `shekel-modal-panel ${
|
|
1505
|
+
className: `shekel-modal-panel ${P}`,
|
|
1506
1506
|
style: {
|
|
1507
1507
|
position: "relative",
|
|
1508
1508
|
width: "100%",
|
|
1509
1509
|
maxWidth: t2,
|
|
1510
|
-
maxHeight:
|
|
1510
|
+
maxHeight: x2,
|
|
1511
1511
|
backgroundColor: x,
|
|
1512
|
-
borderRadius: f === "full" ? 0 :
|
|
1513
|
-
boxShadow:
|
|
1512
|
+
borderRadius: f === "full" ? 0 : m2,
|
|
1513
|
+
boxShadow: Q,
|
|
1514
1514
|
display: "flex",
|
|
1515
1515
|
flexDirection: "column",
|
|
1516
|
-
opacity:
|
|
1517
|
-
transform:
|
|
1516
|
+
opacity: R ? 1 : 0,
|
|
1517
|
+
transform: R ? _2 : w2,
|
|
1518
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
|
+
...I
|
|
1521
1521
|
},
|
|
1522
|
-
children: Z ? /* @__PURE__ */ i(
|
|
1523
|
-
|
|
1522
|
+
children: Z ? /* @__PURE__ */ i(Z2, { children: [
|
|
1523
|
+
E && /* @__PURE__ */ e(
|
|
1524
1524
|
"button",
|
|
1525
1525
|
{
|
|
1526
1526
|
type: "button",
|
|
1527
1527
|
"aria-label": "Close",
|
|
1528
|
-
onClick:
|
|
1528
|
+
onClick: c2,
|
|
1529
1529
|
className: "absolute top-3 right-3 z-10 flex items-center justify-center w-8 h-8 rounded-md bg-white/80 hover:bg-white shadow-sm transition-colors",
|
|
1530
|
-
children: B ?? /* @__PURE__ */ e(
|
|
1530
|
+
children: B ?? /* @__PURE__ */ e(E0, {})
|
|
1531
1531
|
}
|
|
1532
1532
|
),
|
|
1533
1533
|
/* @__PURE__ */ e(
|
|
1534
1534
|
"div",
|
|
1535
1535
|
{
|
|
1536
|
-
className: `flex-1 overflow-auto ${
|
|
1536
|
+
className: `flex-1 overflow-auto ${C2}`,
|
|
1537
1537
|
style: e2,
|
|
1538
1538
|
children: n
|
|
1539
1539
|
}
|
|
1540
1540
|
)
|
|
1541
|
-
] }) : /* @__PURE__ */ i(
|
|
1542
|
-
(s ||
|
|
1541
|
+
] }) : /* @__PURE__ */ i(Z2, { children: [
|
|
1542
|
+
(s || E) && /* @__PURE__ */ i(
|
|
1543
1543
|
"div",
|
|
1544
1544
|
{
|
|
1545
|
-
className: `shekel-modal-header flex items-start justify-between gap-4 px-6 pt-5 pb-3 ${
|
|
1546
|
-
style:
|
|
1545
|
+
className: `shekel-modal-header flex items-start justify-between gap-4 px-6 pt-5 pb-3 ${K}`,
|
|
1546
|
+
style: s2,
|
|
1547
1547
|
children: [
|
|
1548
1548
|
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
|
|
1549
|
-
s && /* @__PURE__ */ e("div", { id:
|
|
1549
|
+
s && /* @__PURE__ */ e("div", { id: N2, 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
|
+
E && /* @__PURE__ */ e(
|
|
1553
1553
|
"button",
|
|
1554
1554
|
{
|
|
1555
1555
|
type: "button",
|
|
1556
1556
|
"aria-label": "Close",
|
|
1557
|
-
onClick:
|
|
1557
|
+
onClick: c2,
|
|
1558
1558
|
className: "shrink-0 flex items-center justify-center w-8 h-8 rounded-md hover:bg-[#F5F5F5] transition-colors",
|
|
1559
|
-
children: B ?? /* @__PURE__ */ e(
|
|
1559
|
+
children: B ?? /* @__PURE__ */ e(E0, {})
|
|
1560
1560
|
}
|
|
1561
1561
|
)
|
|
1562
1562
|
]
|
|
@@ -1565,17 +1565,17 @@ const Se = ({
|
|
|
1565
1565
|
/* @__PURE__ */ e(
|
|
1566
1566
|
"div",
|
|
1567
1567
|
{
|
|
1568
|
-
className: `shekel-modal-body flex-1 overflow-auto ${M ? "" : "px-6"} ${s ||
|
|
1568
|
+
className: `shekel-modal-body flex-1 overflow-auto ${M ? "" : "px-6"} ${s || E || M ? "" : "pt-5"} ${k2 || M ? "" : "pb-5"} ${C2}`,
|
|
1569
1569
|
style: e2,
|
|
1570
1570
|
children: n
|
|
1571
1571
|
}
|
|
1572
1572
|
),
|
|
1573
|
-
|
|
1573
|
+
k2 && /* @__PURE__ */ e(
|
|
1574
1574
|
"div",
|
|
1575
1575
|
{
|
|
1576
|
-
className: `shekel-modal-footer flex items-center justify-end gap-2 px-6 py-4 ${
|
|
1577
|
-
style:
|
|
1578
|
-
children:
|
|
1576
|
+
className: `shekel-modal-footer flex items-center justify-end gap-2 px-6 py-4 ${d2}`,
|
|
1577
|
+
style: h2,
|
|
1578
|
+
children: k2
|
|
1579
1579
|
}
|
|
1580
1580
|
)
|
|
1581
1581
|
] })
|
|
@@ -1584,7 +1584,7 @@ const Se = ({
|
|
|
1584
1584
|
]
|
|
1585
1585
|
}
|
|
1586
1586
|
);
|
|
1587
|
-
return c0(
|
|
1587
|
+
return c0(W2, U2);
|
|
1588
1588
|
}, Ie = ({
|
|
1589
1589
|
children: t,
|
|
1590
1590
|
variant: r = "default",
|
|
@@ -1628,7 +1628,7 @@ const Se = ({
|
|
|
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
|
+
}, U = {
|
|
1632
1632
|
none: "rounded-none",
|
|
1633
1633
|
sm: "rounded-sm",
|
|
1634
1634
|
md: "rounded-md",
|
|
@@ -1643,7 +1643,7 @@ 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]} ${U[C]} ${d}`,
|
|
1647
1647
|
style: m,
|
|
1648
1648
|
children: [
|
|
1649
1649
|
o && /* @__PURE__ */ e("span", { className: `rounded-full ${f[s]} ${F[r]}` }),
|
|
@@ -1700,16 +1700,16 @@ const Se = ({
|
|
|
1700
1700
|
iconSize: f,
|
|
1701
1701
|
checkSize: F,
|
|
1702
1702
|
borderWidth: b,
|
|
1703
|
-
checkStrokeWidth:
|
|
1703
|
+
checkStrokeWidth: U,
|
|
1704
1704
|
onStepClick: m
|
|
1705
1705
|
}) => {
|
|
1706
|
-
const w = f ?? (o === "sm" ? 28 : o === "lg" ? 44 : 36), H = F ?? (o === "sm" ? 18 : o === "lg" ? 30 : 24), g = b ?? 2, B =
|
|
1707
|
-
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 = U ?? 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", E = (x, $) => $.status ? $.status : x < r ? "finish" : x === r ? "process" : "wait", p = (x) => x === "error" ? c : x === "finish" ? d : l, L = (x, $) => $ || (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, $) => {
|
|
1707
|
+
const G = E($, x), Q = p(G), W = $ === t.length - 1, q = !!m;
|
|
1708
1708
|
return /* @__PURE__ */ i(
|
|
1709
1709
|
"div",
|
|
1710
1710
|
{
|
|
1711
|
-
className: `flex ${k ? "flex-row" : "flex-col items-center"} ${
|
|
1712
|
-
onClick:
|
|
1711
|
+
className: `flex ${k ? "flex-row" : "flex-col items-center"} ${q ? "cursor-pointer" : ""}`,
|
|
1712
|
+
onClick: q ? () => m($) : void 0,
|
|
1713
1713
|
style: W ? void 0 : { marginBottom: k ? M : 0, marginRight: k ? 0 : M },
|
|
1714
1714
|
children: [
|
|
1715
1715
|
/* @__PURE__ */ i("div", { className: `flex ${k ? "flex-col items-center" : "flex-row items-center"} shrink-0`, children: [
|
|
@@ -1720,10 +1720,10 @@ const Se = ({
|
|
|
1720
1720
|
style: {
|
|
1721
1721
|
width: w,
|
|
1722
1722
|
height: w,
|
|
1723
|
-
border: `${g}px solid ${
|
|
1723
|
+
border: `${g}px solid ${Q}`,
|
|
1724
1724
|
backgroundColor: "transparent"
|
|
1725
1725
|
},
|
|
1726
|
-
children: L(
|
|
1726
|
+
children: L(G, x.icon)
|
|
1727
1727
|
}
|
|
1728
1728
|
),
|
|
1729
1729
|
_ && !W && /* @__PURE__ */ e(
|
|
@@ -1753,7 +1753,7 @@ const Se = ({
|
|
|
1753
1753
|
style: {
|
|
1754
1754
|
fontSize: S,
|
|
1755
1755
|
lineHeight: `${w}px`,
|
|
1756
|
-
color:
|
|
1756
|
+
color: G === "wait" ? h : C
|
|
1757
1757
|
},
|
|
1758
1758
|
children: x.title
|
|
1759
1759
|
}
|
|
@@ -1775,7 +1775,7 @@ const Se = ({
|
|
|
1775
1775
|
)
|
|
1776
1776
|
]
|
|
1777
1777
|
},
|
|
1778
|
-
|
|
1778
|
+
$
|
|
1779
1779
|
);
|
|
1780
1780
|
};
|
|
1781
1781
|
return /* @__PURE__ */ e(
|
|
@@ -1817,7 +1817,7 @@ const Se = ({
|
|
|
1817
1817
|
md: "rounded-md",
|
|
1818
1818
|
lg: "rounded-lg",
|
|
1819
1819
|
full: "rounded-full"
|
|
1820
|
-
},
|
|
1820
|
+
}, U = () => {
|
|
1821
1821
|
if (o) return o;
|
|
1822
1822
|
switch (r) {
|
|
1823
1823
|
case "success":
|
|
@@ -1853,7 +1853,7 @@ const Se = ({
|
|
|
1853
1853
|
children: /* @__PURE__ */ e(
|
|
1854
1854
|
"div",
|
|
1855
1855
|
{
|
|
1856
|
-
className: `${
|
|
1856
|
+
className: `${U()} ${f[a]} ${b[v]} transition-all duration-300 ease-out ${r === "active" ? "progress-active" : ""}`,
|
|
1857
1857
|
style: {
|
|
1858
1858
|
width: `${u}%`,
|
|
1859
1859
|
height: g
|
|
@@ -1886,28 +1886,28 @@ const Se = ({
|
|
|
1886
1886
|
value: f,
|
|
1887
1887
|
accentColor: F = "#EC615B",
|
|
1888
1888
|
borderColor: b = "#181918",
|
|
1889
|
-
boxBgColor:
|
|
1889
|
+
boxBgColor: U = "#FFFFFF",
|
|
1890
1890
|
boxRadius: m = 6,
|
|
1891
1891
|
style: w,
|
|
1892
1892
|
required: H,
|
|
1893
1893
|
autoFocus: g,
|
|
1894
1894
|
tabIndex: B
|
|
1895
1895
|
}) => {
|
|
1896
|
-
const [S, Z] = O(r), M = t !== void 0,
|
|
1897
|
-
o || (M || Z(
|
|
1898
|
-
}, x = m1[a],
|
|
1896
|
+
const [S, Z] = O(r), M = t !== void 0, E = M ? !!t : S, p = o2.useId(), L = v ?? p, k = E || n, y = (s2) => {
|
|
1897
|
+
o || (M || Z(s2.target.checked), s == null || s(s2.target.checked, s2));
|
|
1898
|
+
}, x = m1[a], $ = typeof m == "number" ? `${m}px` : m, G = d === "filled", Q = G ? F : U, W = F, q = {
|
|
1899
1899
|
width: x.box,
|
|
1900
1900
|
height: x.box,
|
|
1901
|
-
borderRadius:
|
|
1901
|
+
borderRadius: $,
|
|
1902
1902
|
border: `1.5px solid ${k ? W : b}`,
|
|
1903
|
-
backgroundColor: o ? "#F5F5F5" : k ?
|
|
1903
|
+
backgroundColor: o ? "#F5F5F5" : k ? Q : U,
|
|
1904
1904
|
transition: "all 0.15s ease-out"
|
|
1905
|
-
},
|
|
1905
|
+
}, P = G ? "#FFFFFF" : F, I = /* @__PURE__ */ i(
|
|
1906
1906
|
"span",
|
|
1907
1907
|
{
|
|
1908
1908
|
"aria-hidden": !0,
|
|
1909
1909
|
className: "relative inline-flex items-center justify-center shrink-0",
|
|
1910
|
-
style:
|
|
1910
|
+
style: q,
|
|
1911
1911
|
children: [
|
|
1912
1912
|
/* @__PURE__ */ e(
|
|
1913
1913
|
"input",
|
|
@@ -1916,7 +1916,7 @@ const Se = ({
|
|
|
1916
1916
|
id: L,
|
|
1917
1917
|
name: u,
|
|
1918
1918
|
value: f,
|
|
1919
|
-
checked:
|
|
1919
|
+
checked: E,
|
|
1920
1920
|
onChange: y,
|
|
1921
1921
|
disabled: o,
|
|
1922
1922
|
required: H,
|
|
@@ -1931,15 +1931,15 @@ const Se = ({
|
|
|
1931
1931
|
{
|
|
1932
1932
|
className: "absolute inset-0 flex items-center justify-center pointer-events-none transition-opacity duration-150 ease-out",
|
|
1933
1933
|
style: {
|
|
1934
|
-
opacity: n ||
|
|
1935
|
-
transform: n ||
|
|
1934
|
+
opacity: n || E ? 1 : 0,
|
|
1935
|
+
transform: n || E ? "scale(1)" : "scale(0.6)",
|
|
1936
1936
|
transition: "opacity 150ms ease-out, transform 150ms ease-out"
|
|
1937
1937
|
},
|
|
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:
|
|
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: P, strokeWidth: "2.2", strokeLinecap: "round" }) }) : /* @__PURE__ */ e("svg", { width: x.icon, height: x.icon, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
1939
1939
|
"path",
|
|
1940
1940
|
{
|
|
1941
1941
|
d: "M3 8.5l3.2 3.2L13 5",
|
|
1942
|
-
stroke:
|
|
1942
|
+
stroke: P,
|
|
1943
1943
|
strokeWidth: "2",
|
|
1944
1944
|
strokeLinecap: "round",
|
|
1945
1945
|
strokeLinejoin: "round"
|
|
@@ -1949,20 +1949,20 @@ const Se = ({
|
|
|
1949
1949
|
)
|
|
1950
1950
|
]
|
|
1951
1951
|
}
|
|
1952
|
-
),
|
|
1952
|
+
), K = l ? /* @__PURE__ */ e("span", { className: `select-none ${c}`, style: { color: "#181918", ...h }, children: l }) : null;
|
|
1953
1953
|
return /* @__PURE__ */ i(
|
|
1954
1954
|
"label",
|
|
1955
1955
|
{
|
|
1956
1956
|
htmlFor: L,
|
|
1957
1957
|
className: `inline-flex items-center gap-2 align-middle ${o ? "cursor-not-allowed opacity-60" : "cursor-pointer"} ${_}`,
|
|
1958
1958
|
style: w,
|
|
1959
|
-
onMouseDown: (
|
|
1960
|
-
|
|
1959
|
+
onMouseDown: (s2) => {
|
|
1960
|
+
s2.detail > 1 && s2.preventDefault();
|
|
1961
1961
|
},
|
|
1962
1962
|
children: [
|
|
1963
|
-
C === "left" &&
|
|
1964
|
-
|
|
1965
|
-
C === "right" &&
|
|
1963
|
+
C === "left" && K,
|
|
1964
|
+
I,
|
|
1965
|
+
C === "right" && K
|
|
1966
1966
|
]
|
|
1967
1967
|
}
|
|
1968
1968
|
);
|
|
@@ -2022,13 +2022,13 @@ const Se = ({
|
|
|
2022
2022
|
rounded: u = "md",
|
|
2023
2023
|
style: f
|
|
2024
2024
|
}) => {
|
|
2025
|
-
const F = g1(d), b = x1(u),
|
|
2025
|
+
const F = g1(d), b = x1(u), U = "#F4F4F4", m = "#EBEBEB", w = "#181918", H = "#999999", g = "#9CA3AF", B = "#EC615B", S = l || U, Z = c || m, M = h || w, E = C || H, p = _ || g, L = v || B;
|
|
2026
2026
|
return t.length === 0 ? /* @__PURE__ */ e(
|
|
2027
2027
|
"div",
|
|
2028
2028
|
{
|
|
2029
2029
|
className: `text-center py-8 text-gray-500 text-sm ${o}`,
|
|
2030
2030
|
style: {
|
|
2031
|
-
color:
|
|
2031
|
+
color: E,
|
|
2032
2032
|
...f
|
|
2033
2033
|
},
|
|
2034
2034
|
children: s
|
|
@@ -2065,7 +2065,7 @@ const Se = ({
|
|
|
2065
2065
|
"div",
|
|
2066
2066
|
{
|
|
2067
2067
|
className: `font-normal mb-0.5 ${F.sublabel}`,
|
|
2068
|
-
style: { color:
|
|
2068
|
+
style: { color: E },
|
|
2069
2069
|
children: k.sublabel
|
|
2070
2070
|
}
|
|
2071
2071
|
),
|
|
@@ -2127,7 +2127,7 @@ const Se = ({
|
|
|
2127
2127
|
))
|
|
2128
2128
|
}
|
|
2129
2129
|
);
|
|
2130
|
-
},
|
|
2130
|
+
}, I2 = (t, r) => {
|
|
2131
2131
|
if (t.startsWith("rgb")) return t;
|
|
2132
2132
|
const s = t.replace("#", ""), o = s.length === 3 ? s.split("").map((l) => l + l).join("") : s, n = parseInt(o.slice(0, 2), 16), a = parseInt(o.slice(2, 4), 16), d = parseInt(o.slice(4, 6), 16);
|
|
2133
2133
|
return `rgba(${n}, ${a}, ${d}, ${r})`;
|
|
@@ -2152,7 +2152,7 @@ const Se = ({
|
|
|
2152
2152
|
}
|
|
2153
2153
|
)
|
|
2154
2154
|
}
|
|
2155
|
-
), U0 =
|
|
2155
|
+
), U0 = I2, f0 = o2.forwardRef(
|
|
2156
2156
|
(t, r) => {
|
|
2157
2157
|
const {
|
|
2158
2158
|
label: s,
|
|
@@ -2170,7 +2170,7 @@ const Se = ({
|
|
|
2170
2170
|
status: f,
|
|
2171
2171
|
className: F = "",
|
|
2172
2172
|
style: b,
|
|
2173
|
-
wrapperClassName:
|
|
2173
|
+
wrapperClassName: U = "",
|
|
2174
2174
|
wrapperStyle: m,
|
|
2175
2175
|
onClear: w,
|
|
2176
2176
|
required: H,
|
|
@@ -2179,62 +2179,62 @@ const Se = ({
|
|
|
2179
2179
|
id: S,
|
|
2180
2180
|
value: Z,
|
|
2181
2181
|
defaultValue: M,
|
|
2182
|
-
onChange:
|
|
2182
|
+
onChange: E,
|
|
2183
2183
|
accentColor: p = "#EC615B",
|
|
2184
2184
|
errorColor: L = "#C21919",
|
|
2185
2185
|
borderColor: k = "#D9D9D9",
|
|
2186
2186
|
filledBorderColor: y = "#181918",
|
|
2187
2187
|
addonBackgroundColor: x = "#FAFAFA",
|
|
2188
|
-
|
|
2189
|
-
} = t, [
|
|
2188
|
+
...$
|
|
2189
|
+
} = t, [G, Q] = o2.useState(
|
|
2190
2190
|
M
|
|
2191
|
-
), W = Z !== void 0,
|
|
2192
|
-
W ||
|
|
2193
|
-
},
|
|
2194
|
-
W ||
|
|
2195
|
-
const
|
|
2191
|
+
), W = Z !== void 0, q = W ? Z : G, P = o2.useId(), I = S ?? P, K = !!l || f === "error", s2 = f === "warning", C2 = d === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : d, e2 = (u2) => {
|
|
2192
|
+
W || Q(u2.target.value), E == null || E(u2);
|
|
2193
|
+
}, d2 = () => {
|
|
2194
|
+
W || Q("");
|
|
2195
|
+
const u2 = {
|
|
2196
2196
|
target: { value: "" },
|
|
2197
2197
|
currentTarget: { value: "" }
|
|
2198
2198
|
};
|
|
2199
|
-
|
|
2200
|
-
},
|
|
2199
|
+
E == null || E(u2), w == null || w();
|
|
2200
|
+
}, h2 = q !== void 0 && q !== "" && q !== null, N = K ? L : s2 ? "#FAAD14" : h2 ? y : k, r2 = K ? U0(L, 0.1) : s2 ? "rgba(250,173,20,0.1)" : U0(p, 0.2), n2 = {
|
|
2201
2201
|
"--shekel-accent": p,
|
|
2202
2202
|
"--shekel-border": N,
|
|
2203
|
-
"--shekel-focus-shadow":
|
|
2204
|
-
},
|
|
2203
|
+
"--shekel-focus-shadow": r2
|
|
2204
|
+
}, p2 = "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)]", g2 = g ? "opacity-60 cursor-not-allowed bg-[#F5F5F5]" : "bg-white", V2 = "flex items-center px-3 text-sm border border-[color:var(--shekel-border)]", R = {
|
|
2205
2205
|
backgroundColor: x,
|
|
2206
2206
|
color: "#181918",
|
|
2207
2207
|
whiteSpace: "nowrap"
|
|
2208
|
-
},
|
|
2209
|
-
return /* @__PURE__ */ i("div", { className: "w-full", style:
|
|
2208
|
+
}, D = u && h2 && !g && !B;
|
|
2209
|
+
return /* @__PURE__ */ i("div", { className: "w-full", style: n2, children: [
|
|
2210
2210
|
s && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
|
|
2211
2211
|
/* @__PURE__ */ i(
|
|
2212
2212
|
"label",
|
|
2213
2213
|
{
|
|
2214
|
-
htmlFor:
|
|
2214
|
+
htmlFor: I,
|
|
2215
2215
|
className: `block text-sm font-medium ${o}`,
|
|
2216
|
-
style: { color:
|
|
2216
|
+
style: { color: K ? L : "#181918", ...n },
|
|
2217
2217
|
children: [
|
|
2218
2218
|
s,
|
|
2219
|
-
H &&
|
|
2219
|
+
H && C2
|
|
2220
2220
|
]
|
|
2221
2221
|
}
|
|
2222
2222
|
),
|
|
2223
2223
|
a && /* @__PURE__ */ e("div", { className: "shrink-0", children: a })
|
|
2224
2224
|
] }),
|
|
2225
|
-
/* @__PURE__ */ i("div", { className: `flex w-full ${
|
|
2225
|
+
/* @__PURE__ */ i("div", { className: `flex w-full ${U}`, style: m, children: [
|
|
2226
2226
|
_ && /* @__PURE__ */ e(
|
|
2227
2227
|
"div",
|
|
2228
2228
|
{
|
|
2229
|
-
className: `${
|
|
2230
|
-
style:
|
|
2229
|
+
className: `${V2} border-r-0 rounded-l-[12px]`,
|
|
2230
|
+
style: R,
|
|
2231
2231
|
children: _
|
|
2232
2232
|
}
|
|
2233
2233
|
),
|
|
2234
2234
|
/* @__PURE__ */ i(
|
|
2235
2235
|
"div",
|
|
2236
2236
|
{
|
|
2237
|
-
className: `flex items-center flex-1 min-w-0 border transition-all duration-200 ${
|
|
2237
|
+
className: `flex items-center flex-1 min-w-0 border transition-all duration-200 ${p2} ${X} ${g2} ${_ ? "rounded-l-none" : "rounded-l-[12px]"} ${v ? "rounded-r-none" : "rounded-r-[12px]"}`,
|
|
2238
2238
|
style: { height: 44 },
|
|
2239
2239
|
children: [
|
|
2240
2240
|
h && /* @__PURE__ */ e("span", { className: "pl-3 flex items-center text-[#181918] shrink-0", children: h }),
|
|
@@ -2242,27 +2242,27 @@ const Se = ({
|
|
|
2242
2242
|
"input",
|
|
2243
2243
|
{
|
|
2244
2244
|
ref: r,
|
|
2245
|
-
id:
|
|
2245
|
+
id: I,
|
|
2246
2246
|
required: H,
|
|
2247
2247
|
disabled: g,
|
|
2248
2248
|
readOnly: B,
|
|
2249
|
-
value:
|
|
2249
|
+
value: q,
|
|
2250
2250
|
onChange: e2,
|
|
2251
2251
|
className: `flex-1 min-w-0 h-full bg-transparent outline-none text-sm text-[#181918] placeholder:text-[#8C8C8C] ${F}`,
|
|
2252
2252
|
style: {
|
|
2253
2253
|
padding: "4px 11px",
|
|
2254
2254
|
paddingLeft: h ? 8 : 11,
|
|
2255
|
-
paddingRight: C ||
|
|
2255
|
+
paddingRight: C || D ? 8 : 11,
|
|
2256
2256
|
...b
|
|
2257
2257
|
},
|
|
2258
|
-
|
|
2258
|
+
...$
|
|
2259
2259
|
}
|
|
2260
2260
|
),
|
|
2261
|
-
|
|
2261
|
+
D && /* @__PURE__ */ e(
|
|
2262
2262
|
"button",
|
|
2263
2263
|
{
|
|
2264
2264
|
type: "button",
|
|
2265
|
-
onClick:
|
|
2265
|
+
onClick: d2,
|
|
2266
2266
|
"aria-label": "Clear",
|
|
2267
2267
|
className: "flex items-center justify-center w-5 h-5 mr-2 text-[#BFBFBF] hover:text-[#595959] transition-colors shrink-0",
|
|
2268
2268
|
children: /* @__PURE__ */ i("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: [
|
|
@@ -2286,8 +2286,8 @@ const Se = ({
|
|
|
2286
2286
|
v && /* @__PURE__ */ e(
|
|
2287
2287
|
"div",
|
|
2288
2288
|
{
|
|
2289
|
-
className: `${
|
|
2290
|
-
style:
|
|
2289
|
+
className: `${V2} border-l-0 rounded-r-[12px]`,
|
|
2290
|
+
style: R,
|
|
2291
2291
|
children: v
|
|
2292
2292
|
}
|
|
2293
2293
|
)
|
|
@@ -2303,7 +2303,7 @@ const Se = ({
|
|
|
2303
2303
|
f0.displayName = "InputBase";
|
|
2304
2304
|
const y1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
2305
2305
|
var d;
|
|
2306
|
-
const { field: n, fieldState: a } =
|
|
2306
|
+
const { field: n, fieldState: a } = T2({ control: t, name: r });
|
|
2307
2307
|
return /* @__PURE__ */ e(
|
|
2308
2308
|
f0,
|
|
2309
2309
|
{
|
|
@@ -2322,7 +2322,7 @@ const y1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
2322
2322
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
2323
2323
|
}
|
|
2324
2324
|
);
|
|
2325
|
-
}, m0 =
|
|
2325
|
+
}, m0 = o2.forwardRef(
|
|
2326
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 })
|
|
2327
2327
|
);
|
|
2328
2328
|
m0.displayName = "Input";
|
|
@@ -2358,9 +2358,9 @@ const v1 = ({ visible: t }) => t ? /* @__PURE__ */ i("svg", { width: "16", heigh
|
|
|
2358
2358
|
strokeLinecap: "round"
|
|
2359
2359
|
}
|
|
2360
2360
|
)
|
|
2361
|
-
] }), g0 =
|
|
2361
|
+
] }), g0 = o2.forwardRef(
|
|
2362
2362
|
({ visibilityToggle: t = !0, ...r }, s) => {
|
|
2363
|
-
const [o, n] =
|
|
2363
|
+
const [o, n] = o2.useState(!1), a = /* @__PURE__ */ e(
|
|
2364
2364
|
"button",
|
|
2365
2365
|
{
|
|
2366
2366
|
type: "button",
|
|
@@ -2371,7 +2371,7 @@ const v1 = ({ visible: t }) => t ? /* @__PURE__ */ i("svg", { width: "16", heigh
|
|
|
2371
2371
|
children: /* @__PURE__ */ e(v1, { visible: o })
|
|
2372
2372
|
}
|
|
2373
2373
|
), d = !!r.error, l = r.errorColor ?? "#C21919";
|
|
2374
|
-
return /* @__PURE__ */ i(
|
|
2374
|
+
return /* @__PURE__ */ i(Z2, { children: [
|
|
2375
2375
|
/* @__PURE__ */ e("style", { children: `
|
|
2376
2376
|
.shekel-password-input::placeholder {
|
|
2377
2377
|
transform: translateY(-2px);
|
|
@@ -2400,7 +2400,7 @@ const v1 = ({ visible: t }) => t ? /* @__PURE__ */ i("svg", { width: "16", heigh
|
|
|
2400
2400
|
g0.displayName = "PasswordInputBase";
|
|
2401
2401
|
const b1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
2402
2402
|
var d;
|
|
2403
|
-
const { field: n, fieldState: a } =
|
|
2403
|
+
const { field: n, fieldState: a } = T2({ control: t, name: r });
|
|
2404
2404
|
return /* @__PURE__ */ e(
|
|
2405
2405
|
g0,
|
|
2406
2406
|
{
|
|
@@ -2419,7 +2419,7 @@ const b1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
2419
2419
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
2420
2420
|
}
|
|
2421
2421
|
);
|
|
2422
|
-
}, w1 =
|
|
2422
|
+
}, w1 = o2.forwardRef(
|
|
2423
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 })
|
|
2424
2424
|
);
|
|
2425
2425
|
w1.displayName = "PasswordInput";
|
|
@@ -2442,8 +2442,8 @@ const P0 = ({
|
|
|
2442
2442
|
boxWidth: F = 63,
|
|
2443
2443
|
boxHeight: b = 44
|
|
2444
2444
|
}) => {
|
|
2445
|
-
const [
|
|
2446
|
-
|
|
2445
|
+
const [U, m] = O(Array(t).fill("")), w = f2([]);
|
|
2446
|
+
F2(() => {
|
|
2447
2447
|
if (r) {
|
|
2448
2448
|
const p = r.split("").slice(0, t), L = [...p, ...Array(t - p.length).fill("")];
|
|
2449
2449
|
m(L);
|
|
@@ -2453,15 +2453,15 @@ const P0 = ({
|
|
|
2453
2453
|
const H = (p, L) => {
|
|
2454
2454
|
var x;
|
|
2455
2455
|
if (L && !/^\d+$/.test(L)) return;
|
|
2456
|
-
const k = [...
|
|
2456
|
+
const k = [...U];
|
|
2457
2457
|
k[p] = L.slice(-1), m(k);
|
|
2458
2458
|
const y = k.join("");
|
|
2459
|
-
s == null || s(y), L && p < t - 1 && ((x = w.current[p + 1]) == null || x.focus()), k.every((
|
|
2459
|
+
s == null || s(y), L && p < t - 1 && ((x = w.current[p + 1]) == null || x.focus()), k.every(($) => $ !== "") && (n == null || n(y));
|
|
2460
2460
|
}, g = (p, L) => {
|
|
2461
2461
|
var k, y, x;
|
|
2462
|
-
L.key === "Backspace" && !
|
|
2462
|
+
L.key === "Backspace" && !U[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());
|
|
2463
2463
|
}, B = (p) => {
|
|
2464
|
-
var
|
|
2464
|
+
var G;
|
|
2465
2465
|
p.preventDefault();
|
|
2466
2466
|
const L = p.clipboardData.getData("text/plain");
|
|
2467
2467
|
if (!/^\d+$/.test(L)) return;
|
|
@@ -2469,20 +2469,20 @@ const P0 = ({
|
|
|
2469
2469
|
m(y);
|
|
2470
2470
|
const x = y.join("");
|
|
2471
2471
|
s == null || s(x);
|
|
2472
|
-
const
|
|
2473
|
-
(
|
|
2474
|
-
}, S = (p) => a ? v : p ? f : u, Z = a ?
|
|
2472
|
+
const $ = Math.min(k.length, t - 1);
|
|
2473
|
+
(G = w.current[$]) == null || G.focus(), y.every((Q) => Q !== "") && (n == null || n(x));
|
|
2474
|
+
}, S = (p) => a ? v : p ? f : u, Z = a ? I2(v, 0.1) : I2(_, 0.2), M = "border-[color:var(--shekel-box-border)] hover:border-[color:var(--shekel-accent)] focus-within:border-[color:var(--shekel-accent)]", E = "focus-within:shadow-[0_0_0_2px_var(--shekel-focus-shadow)]";
|
|
2475
2475
|
return /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
2476
2476
|
/* @__PURE__ */ e(
|
|
2477
2477
|
"div",
|
|
2478
2478
|
{
|
|
2479
2479
|
className: `flex flex-nowrap gap-2 justify-center w-full ${c}`,
|
|
2480
2480
|
onBlur: o,
|
|
2481
|
-
children:
|
|
2481
|
+
children: U.map((p, L) => /* @__PURE__ */ i(o2.Fragment, { children: [
|
|
2482
2482
|
/* @__PURE__ */ e(
|
|
2483
2483
|
"div",
|
|
2484
2484
|
{
|
|
2485
|
-
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} ${E} ${l ? "opacity-60 cursor-not-allowed bg-[#F5F5F5]" : "bg-white"} ${h}`,
|
|
2486
2486
|
style: {
|
|
2487
2487
|
maxWidth: typeof F == "number" ? `${F}px` : F,
|
|
2488
2488
|
height: typeof b == "number" ? `${b}px` : b,
|
|
@@ -2521,7 +2521,7 @@ const P0 = ({
|
|
|
2521
2521
|
] });
|
|
2522
2522
|
}, k1 = ({ control: t, name: r, error: s, errorMessage: o, ...n }) => {
|
|
2523
2523
|
var c;
|
|
2524
|
-
const { field: a, fieldState: d } =
|
|
2524
|
+
const { field: a, fieldState: d } = T2({ control: t, name: r }), l = s ?? !!d.error;
|
|
2525
2525
|
return /* @__PURE__ */ e(
|
|
2526
2526
|
P0,
|
|
2527
2527
|
{
|
|
@@ -2542,13 +2542,13 @@ const P0 = ({
|
|
|
2542
2542
|
accentColor: a,
|
|
2543
2543
|
errorColor: d
|
|
2544
2544
|
}) => {
|
|
2545
|
-
const [l, c] = O(!1), [h, C] = O(-1), _ =
|
|
2546
|
-
|
|
2545
|
+
const [l, c] = O(!1), [h, C] = O(-1), _ = f2(null);
|
|
2546
|
+
F2(() => {
|
|
2547
2547
|
const m = (w) => {
|
|
2548
2548
|
_.current && !_.current.contains(w.target) && (c(!1), C(-1));
|
|
2549
2549
|
};
|
|
2550
2550
|
return l && document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
|
|
2551
|
-
}, [l]),
|
|
2551
|
+
}, [l]), F2(() => {
|
|
2552
2552
|
l && C(s.findIndex((m) => m.value === t));
|
|
2553
2553
|
}, [l, t, s]);
|
|
2554
2554
|
const v = (m) => {
|
|
@@ -2560,7 +2560,7 @@ const P0 = ({
|
|
|
2560
2560
|
}, u = s.find((m) => m.value === t) ?? s[0], F = {
|
|
2561
2561
|
height: 44,
|
|
2562
2562
|
borderColor: n ? d : l ? a : "#D9D9D9",
|
|
2563
|
-
boxShadow: l ? `0 0 0 2px ${
|
|
2563
|
+
boxShadow: l ? `0 0 0 2px ${I2(a, 0.2)}` : void 0
|
|
2564
2564
|
}, b = s.some((m) => !!m.flag);
|
|
2565
2565
|
return /* @__PURE__ */ i("div", { ref: _, className: "relative", style: { width: b ? 108 : 85 }, children: [
|
|
2566
2566
|
/* @__PURE__ */ i(
|
|
@@ -2638,7 +2638,7 @@ const P0 = ({
|
|
|
2638
2638
|
borderRadius: 4,
|
|
2639
2639
|
fontSize: 14,
|
|
2640
2640
|
lineHeight: "22px",
|
|
2641
|
-
backgroundColor: H ?
|
|
2641
|
+
backgroundColor: H ? I2(a, 0.08) : w === h ? "rgba(0, 0, 0, 0.04)" : "transparent",
|
|
2642
2642
|
color: H ? a : "#181918",
|
|
2643
2643
|
fontWeight: H ? 600 : 400
|
|
2644
2644
|
},
|
|
@@ -2674,7 +2674,7 @@ const P0 = ({
|
|
|
2674
2674
|
}
|
|
2675
2675
|
)
|
|
2676
2676
|
] });
|
|
2677
|
-
}, x0 =
|
|
2677
|
+
}, x0 = o2.forwardRef(
|
|
2678
2678
|
({
|
|
2679
2679
|
label: t,
|
|
2680
2680
|
labelClassName: r = "",
|
|
@@ -2698,7 +2698,7 @@ const P0 = ({
|
|
|
2698
2698
|
customFormat: f,
|
|
2699
2699
|
value: F,
|
|
2700
2700
|
onChange: b,
|
|
2701
|
-
required:
|
|
2701
|
+
required: U,
|
|
2702
2702
|
disabled: m,
|
|
2703
2703
|
id: w,
|
|
2704
2704
|
wrapperClassName: H = "",
|
|
@@ -2707,46 +2707,46 @@ const P0 = ({
|
|
|
2707
2707
|
onPaste: S,
|
|
2708
2708
|
accentColor: Z = "#EC615B",
|
|
2709
2709
|
errorColor: M = "#C21919",
|
|
2710
|
-
borderColor:
|
|
2710
|
+
borderColor: E = "#D9D9D9",
|
|
2711
2711
|
filledBorderColor: p = "#181918",
|
|
2712
2712
|
...L
|
|
2713
2713
|
}, k) => {
|
|
2714
|
-
const y =
|
|
2715
|
-
W ||
|
|
2714
|
+
const y = o2.useId(), x = w ?? y, [$, G] = O(""), Q = f2(null), W = c !== void 0, [q, P] = O(h), I = W ? c : q, K = (R) => {
|
|
2715
|
+
W || P(R), C == null || C(R);
|
|
2716
2716
|
};
|
|
2717
|
-
|
|
2717
|
+
F2(() => {
|
|
2718
2718
|
if (F !== void 0) {
|
|
2719
|
-
const
|
|
2720
|
-
|
|
2719
|
+
const R = String(F).replace(/\D/g, "");
|
|
2720
|
+
G(s2(R));
|
|
2721
2721
|
}
|
|
2722
|
-
}, [F, u,
|
|
2723
|
-
const
|
|
2724
|
-
const
|
|
2725
|
-
return f ? f(
|
|
2726
|
-
},
|
|
2727
|
-
!/^\d$/.test(
|
|
2728
|
-
}, e2 = (
|
|
2729
|
-
const
|
|
2730
|
-
if (
|
|
2731
|
-
const
|
|
2732
|
-
|
|
2722
|
+
}, [F, u, I]);
|
|
2723
|
+
const s2 = (R) => {
|
|
2724
|
+
const D = R.replace(/\D/g, "");
|
|
2725
|
+
return f ? f(D) : u === "none" ? D : u === "spaced" ? D.length <= 3 ? D : D.length <= 6 ? `${D.slice(0, 3)} ${D.slice(3)}` : `${D.slice(0, 3)} ${D.slice(3, 6)} ${D.slice(6, 10)}` : u === "dashed" ? D.length <= 3 ? D : D.length <= 6 ? `${D.slice(0, 3)}-${D.slice(3)}` : `${D.slice(0, 3)}-${D.slice(3, 6)}-${D.slice(6, 10)}` : I === "+1" ? D.length <= 3 ? D : D.length <= 6 ? `(${D.slice(0, 3)}) ${D.slice(3)}` : `(${D.slice(0, 3)}) ${D.slice(3, 6)}-${D.slice(6, 10)}` : D.length <= 3 ? D : D.length <= 6 ? `${D.slice(0, 3)} ${D.slice(3)}` : `${D.slice(0, 3)} ${D.slice(3, 6)} ${D.slice(6, 10)}`;
|
|
2726
|
+
}, C2 = (R) => {
|
|
2727
|
+
!/^\d$/.test(R.key) && !["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(R.key) && !(R.metaKey || R.ctrlKey) && R.preventDefault(), B == null || B(R);
|
|
2728
|
+
}, e2 = (R) => {
|
|
2729
|
+
const D = R.target, u2 = D.selectionStart || 0, v2 = D.value.replace(/\D/g, ""), b2 = s2(v2), j = $.length, a2 = b2.length - j;
|
|
2730
|
+
if (G(b2), requestAnimationFrame(() => {
|
|
2731
|
+
const c2 = Math.max(0, Math.min(u2 + a2, b2.length));
|
|
2732
|
+
D.setSelectionRange(c2, c2);
|
|
2733
2733
|
}), b) {
|
|
2734
|
-
const
|
|
2735
|
-
b(
|
|
2734
|
+
const c2 = { ...R, target: { ...R.target, value: v2 } };
|
|
2735
|
+
b(c2);
|
|
2736
2736
|
}
|
|
2737
|
-
},
|
|
2738
|
-
|
|
2739
|
-
const
|
|
2740
|
-
if (
|
|
2741
|
-
const
|
|
2742
|
-
b(
|
|
2737
|
+
}, d2 = (R) => {
|
|
2738
|
+
R.preventDefault();
|
|
2739
|
+
const D = R.clipboardData.getData("text/plain").replace(/\D/g, ""), v2 = R.target.selectionStart || 0, j = $.replace(/\D/g, "").slice(0, v2) + D, Y = s2(j);
|
|
2740
|
+
if (G(Y), b) {
|
|
2741
|
+
const a2 = { ...R, target: { ...R.target, value: j } };
|
|
2742
|
+
b(a2);
|
|
2743
2743
|
}
|
|
2744
|
-
S == null || S(
|
|
2745
|
-
},
|
|
2744
|
+
S == null || S(R);
|
|
2745
|
+
}, h2 = !!a, N = n === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : n, n2 = h2 ? M : $ !== "" ? p : E, p2 = h2 ? I2(M, 0.1) : I2(Z, 0.2);
|
|
2746
2746
|
return /* @__PURE__ */ i("div", { className: "w-full", style: {
|
|
2747
2747
|
"--shekel-accent": Z,
|
|
2748
|
-
"--shekel-border":
|
|
2749
|
-
"--shekel-focus-shadow":
|
|
2748
|
+
"--shekel-border": n2,
|
|
2749
|
+
"--shekel-focus-shadow": p2
|
|
2750
2750
|
}, children: [
|
|
2751
2751
|
t && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
|
|
2752
2752
|
/* @__PURE__ */ i(
|
|
@@ -2754,10 +2754,10 @@ const P0 = ({
|
|
|
2754
2754
|
{
|
|
2755
2755
|
htmlFor: x,
|
|
2756
2756
|
className: `block text-sm font-medium ${r}`,
|
|
2757
|
-
style: { color:
|
|
2757
|
+
style: { color: h2 ? M : "#181918", ...s },
|
|
2758
2758
|
children: [
|
|
2759
2759
|
t,
|
|
2760
|
-
|
|
2760
|
+
U && N
|
|
2761
2761
|
]
|
|
2762
2762
|
}
|
|
2763
2763
|
),
|
|
@@ -2767,11 +2767,11 @@ const P0 = ({
|
|
|
2767
2767
|
v ? /* @__PURE__ */ e(
|
|
2768
2768
|
F1,
|
|
2769
2769
|
{
|
|
2770
|
-
value:
|
|
2771
|
-
onChange:
|
|
2770
|
+
value: I,
|
|
2771
|
+
onChange: K,
|
|
2772
2772
|
options: _,
|
|
2773
2773
|
disabled: m,
|
|
2774
|
-
error:
|
|
2774
|
+
error: h2,
|
|
2775
2775
|
accentColor: Z,
|
|
2776
2776
|
errorColor: M
|
|
2777
2777
|
}
|
|
@@ -2782,11 +2782,11 @@ const P0 = ({
|
|
|
2782
2782
|
style: {
|
|
2783
2783
|
width: 61,
|
|
2784
2784
|
height: 44,
|
|
2785
|
-
borderColor:
|
|
2785
|
+
borderColor: h2 ? M : E,
|
|
2786
2786
|
backgroundColor: m ? "#F5F5F5" : "#FAFAFA",
|
|
2787
2787
|
color: m ? "#00000040" : "#000000"
|
|
2788
2788
|
},
|
|
2789
|
-
children:
|
|
2789
|
+
children: I
|
|
2790
2790
|
}
|
|
2791
2791
|
),
|
|
2792
2792
|
/* @__PURE__ */ e(
|
|
@@ -2797,18 +2797,18 @@ const P0 = ({
|
|
|
2797
2797
|
children: /* @__PURE__ */ e(
|
|
2798
2798
|
"input",
|
|
2799
2799
|
{
|
|
2800
|
-
ref: (
|
|
2801
|
-
|
|
2800
|
+
ref: (R) => {
|
|
2801
|
+
Q.current = R, typeof k == "function" ? k(R) : k && (k.current = R);
|
|
2802
2802
|
},
|
|
2803
2803
|
id: x,
|
|
2804
2804
|
type: "tel",
|
|
2805
2805
|
inputMode: "tel",
|
|
2806
|
-
required:
|
|
2806
|
+
required: U,
|
|
2807
2807
|
disabled: m,
|
|
2808
|
-
value:
|
|
2808
|
+
value: $,
|
|
2809
2809
|
onChange: e2,
|
|
2810
|
-
onKeyDown:
|
|
2811
|
-
onPaste:
|
|
2810
|
+
onKeyDown: C2,
|
|
2811
|
+
onPaste: d2,
|
|
2812
2812
|
className: `flex-1 min-w-0 h-full bg-transparent outline-none text-sm text-[#181918] placeholder:text-[#8C8C8C] ${l}`,
|
|
2813
2813
|
style: { padding: "4px 11px", ...g },
|
|
2814
2814
|
...L
|
|
@@ -2828,7 +2828,7 @@ const P0 = ({
|
|
|
2828
2828
|
x0.displayName = "PhoneInputBase";
|
|
2829
2829
|
const M1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
2830
2830
|
var d;
|
|
2831
|
-
const { field: n, fieldState: a } =
|
|
2831
|
+
const { field: n, fieldState: a } = T2({ control: t, name: r });
|
|
2832
2832
|
return /* @__PURE__ */ e(
|
|
2833
2833
|
x0,
|
|
2834
2834
|
{
|
|
@@ -2841,14 +2841,14 @@ const M1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
2841
2841
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
2842
2842
|
}
|
|
2843
2843
|
);
|
|
2844
|
-
}, L1 =
|
|
2844
|
+
}, L1 = o2.forwardRef(
|
|
2845
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 })
|
|
2846
2846
|
);
|
|
2847
2847
|
L1.displayName = "PhoneInput";
|
|
2848
2848
|
const z0 = (t) => {
|
|
2849
2849
|
const s = t.replace(/[^\d.]/g, "").split("."), o = s[0] ?? "", n = s[1], a = o.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
2850
2850
|
return n !== void 0 ? `${a}.${n}` : a;
|
|
2851
|
-
}, _1 = (t) => t.replace(/,/g, ""), y0 =
|
|
2851
|
+
}, _1 = (t) => t.replace(/,/g, ""), y0 = o2.forwardRef(
|
|
2852
2852
|
({
|
|
2853
2853
|
label: t,
|
|
2854
2854
|
labelClassName: r = "",
|
|
@@ -2867,28 +2867,28 @@ const z0 = (t) => {
|
|
|
2867
2867
|
className: f = "",
|
|
2868
2868
|
style: F,
|
|
2869
2869
|
wrapperClassName: b = "",
|
|
2870
|
-
addonAfter:
|
|
2870
|
+
addonAfter: U,
|
|
2871
2871
|
addonBefore: m,
|
|
2872
2872
|
currencyPillBgColor: w = "#F0F2F4",
|
|
2873
2873
|
currencyPillColor: H = "#000000",
|
|
2874
2874
|
hideCurrencyPill: g = !1,
|
|
2875
2875
|
...B
|
|
2876
2876
|
}, S) => {
|
|
2877
|
-
const [Z, M] = O(""),
|
|
2878
|
-
|
|
2877
|
+
const [Z, M] = O(""), E = o2.useId(), p = u ?? E;
|
|
2878
|
+
F2(() => {
|
|
2879
2879
|
if (h !== void 0) {
|
|
2880
|
-
const
|
|
2881
|
-
M(c ? z0(
|
|
2880
|
+
const G = String(h);
|
|
2881
|
+
M(c ? z0(G) : G);
|
|
2882
2882
|
}
|
|
2883
2883
|
}, [h, c]);
|
|
2884
|
-
const L = (
|
|
2885
|
-
const
|
|
2884
|
+
const L = (G) => {
|
|
2885
|
+
const Q = G.target.value;
|
|
2886
2886
|
if (c) {
|
|
2887
|
-
const W = _1(
|
|
2888
|
-
M(
|
|
2887
|
+
const W = _1(Q), q = z0(W);
|
|
2888
|
+
M(q), C == null || C(W, G);
|
|
2889
2889
|
} else
|
|
2890
|
-
M(
|
|
2891
|
-
}, k = !!a, y = Z !== "" && Z !== void 0, x = n === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : n,
|
|
2890
|
+
M(Q), C == null || C(Q, G);
|
|
2891
|
+
}, k = !!a, y = Z !== "" && Z !== void 0, x = n === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : n, $ = 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)]";
|
|
2892
2892
|
return /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
2893
2893
|
t && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
|
|
2894
2894
|
/* @__PURE__ */ i(
|
|
@@ -2908,7 +2908,7 @@ const z0 = (t) => {
|
|
|
2908
2908
|
/* @__PURE__ */ i(
|
|
2909
2909
|
"div",
|
|
2910
2910
|
{
|
|
2911
|
-
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 ${$} ${v ? "opacity-60 cursor-not-allowed bg-[#F5F5F5]" : "bg-white"} ${b}`,
|
|
2912
2912
|
style: { height: 44 },
|
|
2913
2913
|
children: [
|
|
2914
2914
|
m && /* @__PURE__ */ e(
|
|
@@ -2946,12 +2946,12 @@ const z0 = (t) => {
|
|
|
2946
2946
|
...B
|
|
2947
2947
|
}
|
|
2948
2948
|
),
|
|
2949
|
-
|
|
2949
|
+
U && /* @__PURE__ */ e(
|
|
2950
2950
|
"div",
|
|
2951
2951
|
{
|
|
2952
2952
|
className: "flex items-center justify-center shrink-0 px-3",
|
|
2953
2953
|
style: { backgroundColor: w },
|
|
2954
|
-
children:
|
|
2954
|
+
children: U
|
|
2955
2955
|
}
|
|
2956
2956
|
)
|
|
2957
2957
|
]
|
|
@@ -2968,7 +2968,7 @@ const z0 = (t) => {
|
|
|
2968
2968
|
y0.displayName = "CurrencyInputBase";
|
|
2969
2969
|
const N1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
2970
2970
|
var d;
|
|
2971
|
-
const { field: n, fieldState: a } =
|
|
2971
|
+
const { field: n, fieldState: a } = T2({ control: t, name: r });
|
|
2972
2972
|
return /* @__PURE__ */ e(
|
|
2973
2973
|
y0,
|
|
2974
2974
|
{
|
|
@@ -2981,7 +2981,7 @@ const N1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
2981
2981
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
2982
2982
|
}
|
|
2983
2983
|
);
|
|
2984
|
-
}, V1 =
|
|
2984
|
+
}, V1 = o2.forwardRef(
|
|
2985
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 })
|
|
2986
2986
|
);
|
|
2987
2987
|
V1.displayName = "CurrencyInput";
|
|
@@ -3004,10 +3004,10 @@ const H1 = (t, r, s = "label") => {
|
|
|
3004
3004
|
}
|
|
3005
3005
|
) })
|
|
3006
3006
|
}
|
|
3007
|
-
),
|
|
3007
|
+
), $1 = () => /* @__PURE__ */ i("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: [
|
|
3008
3008
|
/* @__PURE__ */ e("circle", { cx: "6", cy: "6", r: "6", fill: "currentColor" }),
|
|
3009
3009
|
/* @__PURE__ */ e("path", { d: "M4 4l4 4M8 4l-4 4", stroke: "#FFFFFF", strokeWidth: "1.2", strokeLinecap: "round" })
|
|
3010
|
-
] }),
|
|
3010
|
+
] }), E1 = ({ color: t = "#EC615B" }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "shrink-0 ml-2", children: /* @__PURE__ */ e(
|
|
3011
3011
|
"path",
|
|
3012
3012
|
{
|
|
3013
3013
|
d: "M3 8l3.5 3.5L13 5",
|
|
@@ -3016,7 +3016,7 @@ const H1 = (t, r, s = "label") => {
|
|
|
3016
3016
|
strokeLinecap: "round",
|
|
3017
3017
|
strokeLinejoin: "round"
|
|
3018
3018
|
}
|
|
3019
|
-
) }), v0 =
|
|
3019
|
+
) }), v0 = o2.forwardRef(
|
|
3020
3020
|
(t, r) => {
|
|
3021
3021
|
const {
|
|
3022
3022
|
label: s,
|
|
@@ -3034,7 +3034,7 @@ const H1 = (t, r, s = "label") => {
|
|
|
3034
3034
|
options: f = [],
|
|
3035
3035
|
placeholder: F = "Select an option",
|
|
3036
3036
|
showSearch: b = !0,
|
|
3037
|
-
searchPlaceholder:
|
|
3037
|
+
searchPlaceholder: U = "Search",
|
|
3038
3038
|
optionFilterProp: m = "label",
|
|
3039
3039
|
filterOption: w,
|
|
3040
3040
|
onSearch: H,
|
|
@@ -3043,150 +3043,150 @@ const H1 = (t, r, s = "label") => {
|
|
|
3043
3043
|
height: S = 44,
|
|
3044
3044
|
borderRadius: Z = 12,
|
|
3045
3045
|
className: M = "",
|
|
3046
|
-
style:
|
|
3046
|
+
style: E,
|
|
3047
3047
|
popupClassName: p = "",
|
|
3048
3048
|
popupStyle: L,
|
|
3049
3049
|
onBlur: k,
|
|
3050
3050
|
onFocus: y,
|
|
3051
3051
|
onDropdownVisibleChange: x,
|
|
3052
|
-
id:
|
|
3053
|
-
notFoundContent:
|
|
3054
|
-
status:
|
|
3052
|
+
id: $,
|
|
3053
|
+
notFoundContent: G = "No results found",
|
|
3054
|
+
status: Q,
|
|
3055
3055
|
optionRender: W,
|
|
3056
|
-
suffixIcon:
|
|
3057
|
-
prefixIcon:
|
|
3058
|
-
accentColor:
|
|
3059
|
-
errorColor:
|
|
3060
|
-
borderColor:
|
|
3061
|
-
filledBorderColor:
|
|
3056
|
+
suffixIcon: q,
|
|
3057
|
+
prefixIcon: P,
|
|
3058
|
+
accentColor: I = "#EC615B",
|
|
3059
|
+
errorColor: K = "#C21919",
|
|
3060
|
+
borderColor: s2 = "#D9D9D9",
|
|
3061
|
+
filledBorderColor: C2 = "#181918",
|
|
3062
3062
|
selectedBgColor: e2,
|
|
3063
|
-
selectedTextColor:
|
|
3064
|
-
optionHoverColor:
|
|
3063
|
+
selectedTextColor: d2,
|
|
3064
|
+
optionHoverColor: h2 = "rgba(0, 0, 0, 0.04)",
|
|
3065
3065
|
tagBgColor: N = "#F5F5F5",
|
|
3066
|
-
tagBorderColor:
|
|
3067
|
-
} = t,
|
|
3066
|
+
tagBorderColor: r2 = "#E8E8E8"
|
|
3067
|
+
} = t, n2 = e2 ?? I2(I, 0.08), p2 = d2 ?? I, X = _ !== void 0, [g2, V2] = O(
|
|
3068
3068
|
v ?? (g === "multiple" ? [] : void 0)
|
|
3069
|
-
),
|
|
3069
|
+
), R = X ? _ : g2, [D, u2] = O(!1), [v2, b2] = O(""), [j, Y] = O(-1), [a2, c2] = O(!1), l2 = o2.useId(), M2 = $ ?? l2, H2 = f2(null), L2 = f2(null), B2 = f2(null), [D2, q2] = O({
|
|
3070
3070
|
top: 0,
|
|
3071
3071
|
left: 0,
|
|
3072
3072
|
width: 0
|
|
3073
|
-
}),
|
|
3074
|
-
if (!
|
|
3075
|
-
const
|
|
3076
|
-
|
|
3073
|
+
}), A2 = () => {
|
|
3074
|
+
if (!L2.current) return;
|
|
3075
|
+
const z = L2.current.getBoundingClientRect(), i2 = 300, R2 = window.innerHeight - z.bottom, G2 = z.top, z2 = R2 < i2 && G2 > R2 ? z.top - i2 - 4 : z.bottom + 4;
|
|
3076
|
+
q2({ top: Math.max(4, z2), left: z.left, width: z.width });
|
|
3077
3077
|
};
|
|
3078
|
-
|
|
3079
|
-
if (!
|
|
3080
|
-
|
|
3081
|
-
const
|
|
3082
|
-
return window.addEventListener("resize",
|
|
3083
|
-
window.removeEventListener("resize",
|
|
3078
|
+
F2(() => {
|
|
3079
|
+
if (!D) return;
|
|
3080
|
+
A2();
|
|
3081
|
+
const z = () => A2();
|
|
3082
|
+
return window.addEventListener("resize", z), window.addEventListener("scroll", z, !0), () => {
|
|
3083
|
+
window.removeEventListener("resize", z), window.removeEventListener("scroll", z, !0);
|
|
3084
3084
|
};
|
|
3085
|
-
}, [
|
|
3086
|
-
const P2 =
|
|
3087
|
-
(
|
|
3085
|
+
}, [D]);
|
|
3086
|
+
const P2 = f2(null), T = f2(null), w2 = !!l || Q === "error", _2 = d === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : d, E2 = typeof S == "number" ? `${S}px` : S, V = typeof Z == "number" ? `${Z}px` : Z, t2 = A0(
|
|
3087
|
+
(z, i2) => w === !1 ? !0 : typeof w == "function" ? w(z, i2) : H1(z, i2, m),
|
|
3088
3088
|
[w, m]
|
|
3089
|
-
),
|
|
3090
|
-
C || (
|
|
3091
|
-
},
|
|
3092
|
-
|
|
3089
|
+
), m2 = O2(() => !b || !v2 ? f : f.filter((z) => t2(v2, z)), [f, v2, b, t2]), x2 = g === "multiple", S2 = x2 ? Array.isArray(R) ? R : [] : R != null && R !== "" ? [R] : [], k2 = S2.map((z) => f.find((i2) => i2.value === z)).filter(Boolean), N2 = S2.length > 0, U2 = () => {
|
|
3090
|
+
C || (u2(!0), x == null || x(!0), y == null || y());
|
|
3091
|
+
}, W2 = () => {
|
|
3092
|
+
u2(!1), b2(""), Y(-1), x == null || x(!1), k == null || k();
|
|
3093
3093
|
};
|
|
3094
|
-
|
|
3095
|
-
const
|
|
3094
|
+
F2(() => {
|
|
3095
|
+
const z = (i2) => {
|
|
3096
3096
|
var z2, V0;
|
|
3097
|
-
const
|
|
3098
|
-
!
|
|
3097
|
+
const R2 = i2.target, G2 = (z2 = H2.current) == null ? void 0 : z2.contains(R2), K2 = (V0 = B2.current) == null ? void 0 : V0.contains(R2);
|
|
3098
|
+
!G2 && !K2 && D && W2();
|
|
3099
3099
|
};
|
|
3100
|
-
return
|
|
3101
|
-
}, [
|
|
3102
|
-
if (
|
|
3103
|
-
const
|
|
3104
|
-
(
|
|
3100
|
+
return D && document.addEventListener("mousedown", z), () => document.removeEventListener("mousedown", z);
|
|
3101
|
+
}, [D]), F2(() => {
|
|
3102
|
+
if (D && b && (T.current ? T.current.focus() : P2.current && P2.current.focus()), D) {
|
|
3103
|
+
const z = m2.findIndex(
|
|
3104
|
+
(i2) => S2.includes(i2.value)
|
|
3105
3105
|
);
|
|
3106
|
-
|
|
3106
|
+
Y(z >= 0 ? z : 0);
|
|
3107
3107
|
}
|
|
3108
|
-
}, [
|
|
3109
|
-
const
|
|
3110
|
-
X ||
|
|
3111
|
-
},
|
|
3112
|
-
if (!
|
|
3113
|
-
if (
|
|
3114
|
-
const
|
|
3115
|
-
|
|
3108
|
+
}, [D]);
|
|
3109
|
+
const J = (z, i2) => {
|
|
3110
|
+
X || V2(z), u == null || u(z, i2);
|
|
3111
|
+
}, $2 = (z) => {
|
|
3112
|
+
if (!z.disabled)
|
|
3113
|
+
if (x2) {
|
|
3114
|
+
const i2 = Array.isArray(R) ? R : [], G2 = i2.includes(z.value) ? i2.filter((z2) => z2 !== z.value) : [...i2, z.value], K2 = f.filter((z2) => G2.includes(z2.value));
|
|
3115
|
+
J(G2, K2);
|
|
3116
3116
|
} else
|
|
3117
|
-
|
|
3118
|
-
}, Y2 = (
|
|
3119
|
-
|
|
3120
|
-
}, A = (
|
|
3121
|
-
if (
|
|
3122
|
-
const
|
|
3123
|
-
|
|
3124
|
-
},
|
|
3125
|
-
if (!
|
|
3126
|
-
["Enter", " ", "ArrowDown"].includes(
|
|
3117
|
+
J(z.value, z), W2();
|
|
3118
|
+
}, Y2 = (z) => {
|
|
3119
|
+
z.stopPropagation(), J(x2 ? [] : void 0, x2 ? [] : void 0);
|
|
3120
|
+
}, A = (z, i2) => {
|
|
3121
|
+
if (z.stopPropagation(), !x2) return;
|
|
3122
|
+
const G2 = (Array.isArray(R) ? R : []).filter((z2) => z2 !== i2), K2 = f.filter((z2) => G2.includes(z2.value));
|
|
3123
|
+
J(G2, K2);
|
|
3124
|
+
}, y2 = (z) => {
|
|
3125
|
+
if (!D) {
|
|
3126
|
+
["Enter", " ", "ArrowDown"].includes(z.key) && (z.preventDefault(), U2());
|
|
3127
3127
|
return;
|
|
3128
3128
|
}
|
|
3129
|
-
if (
|
|
3130
|
-
|
|
3131
|
-
else if (
|
|
3132
|
-
|
|
3133
|
-
else if (
|
|
3134
|
-
|
|
3135
|
-
else if (
|
|
3136
|
-
|
|
3137
|
-
else if (
|
|
3138
|
-
const
|
|
3139
|
-
|
|
3129
|
+
if (z.key === "Escape")
|
|
3130
|
+
z.preventDefault(), W2();
|
|
3131
|
+
else if (z.key === "ArrowDown")
|
|
3132
|
+
z.preventDefault(), Y((i2) => Math.min(m2.length - 1, i2 + 1));
|
|
3133
|
+
else if (z.key === "ArrowUp")
|
|
3134
|
+
z.preventDefault(), Y((i2) => Math.max(0, i2 - 1));
|
|
3135
|
+
else if (z.key === "Enter")
|
|
3136
|
+
z.preventDefault(), j >= 0 && m2[j] && $2(m2[j]);
|
|
3137
|
+
else if (z.key === "Backspace" && x2 && !v2 && S2.length > 0) {
|
|
3138
|
+
const i2 = S2[S2.length - 1], G2 = (Array.isArray(R) ? R : []).filter((z2) => z2 !== i2), K2 = f.filter((z2) => G2.includes(z2.value));
|
|
3139
|
+
J(G2, K2);
|
|
3140
3140
|
}
|
|
3141
|
-
},
|
|
3142
|
-
|
|
3143
|
-
},
|
|
3144
|
-
"--shekel-accent":
|
|
3145
|
-
}, o0 = B &&
|
|
3141
|
+
}, j2 = (z) => {
|
|
3142
|
+
b2(z.target.value), H == null || H(z.target.value), Y(0);
|
|
3143
|
+
}, X2 = w2 ? K : D ? I : N2 ? C2 : s2, d0 = D ? `0 0 0 2px ${I2(I, 0.2)}` : void 0, r0 = {
|
|
3144
|
+
"--shekel-accent": I
|
|
3145
|
+
}, o0 = B && N2 && !C;
|
|
3146
3146
|
return /* @__PURE__ */ i("div", { className: "w-full", ref: r, style: r0, children: [
|
|
3147
3147
|
s && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
|
|
3148
3148
|
/* @__PURE__ */ i(
|
|
3149
3149
|
"label",
|
|
3150
3150
|
{
|
|
3151
|
-
htmlFor:
|
|
3151
|
+
htmlFor: M2,
|
|
3152
3152
|
className: `block text-sm font-medium ${o}`,
|
|
3153
|
-
style: { color:
|
|
3153
|
+
style: { color: w2 ? K : "#181918", ...n },
|
|
3154
3154
|
children: [
|
|
3155
3155
|
s,
|
|
3156
|
-
h &&
|
|
3156
|
+
h && _2
|
|
3157
3157
|
]
|
|
3158
3158
|
}
|
|
3159
3159
|
),
|
|
3160
3160
|
a && /* @__PURE__ */ e("div", { className: "shrink-0", children: a })
|
|
3161
3161
|
] }),
|
|
3162
|
-
/* @__PURE__ */ i("div", { className: "relative", ref:
|
|
3162
|
+
/* @__PURE__ */ i("div", { className: "relative", ref: H2, children: [
|
|
3163
3163
|
/* @__PURE__ */ i(
|
|
3164
3164
|
"div",
|
|
3165
3165
|
{
|
|
3166
|
-
ref:
|
|
3167
|
-
id:
|
|
3166
|
+
ref: L2,
|
|
3167
|
+
id: M2,
|
|
3168
3168
|
role: "combobox",
|
|
3169
3169
|
"aria-haspopup": "listbox",
|
|
3170
|
-
"aria-expanded":
|
|
3170
|
+
"aria-expanded": D,
|
|
3171
3171
|
"aria-disabled": C,
|
|
3172
3172
|
tabIndex: C ? -1 : 0,
|
|
3173
|
-
onClick: () =>
|
|
3174
|
-
onKeyDown:
|
|
3175
|
-
onMouseEnter: () =>
|
|
3176
|
-
onMouseLeave: () =>
|
|
3173
|
+
onClick: () => D ? W2() : U2(),
|
|
3174
|
+
onKeyDown: y2,
|
|
3175
|
+
onMouseEnter: () => c2(!0),
|
|
3176
|
+
onMouseLeave: () => c2(!1),
|
|
3177
3177
|
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"} ${M}`,
|
|
3178
3178
|
style: {
|
|
3179
|
-
minHeight:
|
|
3179
|
+
minHeight: E2,
|
|
3180
3180
|
borderRadius: V,
|
|
3181
|
-
padding:
|
|
3182
|
-
borderColor:
|
|
3181
|
+
padding: x2 && S2.length > 0 ? "4px 8px 4px 8px" : "4px 11px",
|
|
3182
|
+
borderColor: X2,
|
|
3183
3183
|
boxShadow: d0,
|
|
3184
|
-
|
|
3184
|
+
...E
|
|
3185
3185
|
},
|
|
3186
3186
|
children: [
|
|
3187
|
-
|
|
3187
|
+
P && /* @__PURE__ */ e("span", { className: "shrink-0 mr-2 flex items-center text-[#8C8C8C]", children: P }),
|
|
3188
3188
|
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0 flex flex-wrap items-center gap-1 relative", children: [
|
|
3189
|
-
|
|
3189
|
+
x2 && k2.map((z) => /* @__PURE__ */ i(
|
|
3190
3190
|
"span",
|
|
3191
3191
|
{
|
|
3192
3192
|
className: "inline-flex items-center gap-1 rounded px-2 text-xs text-[#181918] border",
|
|
@@ -3194,15 +3194,15 @@ const H1 = (t, r, s = "label") => {
|
|
|
3194
3194
|
height: 24,
|
|
3195
3195
|
lineHeight: "22px",
|
|
3196
3196
|
backgroundColor: N,
|
|
3197
|
-
borderColor:
|
|
3197
|
+
borderColor: r2
|
|
3198
3198
|
},
|
|
3199
3199
|
children: [
|
|
3200
|
-
/* @__PURE__ */ e("span", { className: "truncate max-w-[140px]", children:
|
|
3200
|
+
/* @__PURE__ */ e("span", { className: "truncate max-w-[140px]", children: z.label }),
|
|
3201
3201
|
!C && /* @__PURE__ */ e(
|
|
3202
3202
|
"button",
|
|
3203
3203
|
{
|
|
3204
3204
|
type: "button",
|
|
3205
|
-
onClick: (
|
|
3205
|
+
onClick: (i2) => A(i2, z.value),
|
|
3206
3206
|
className: "flex items-center justify-center text-[#8C8C8C] hover:text-[#181918]",
|
|
3207
3207
|
"aria-label": "Remove",
|
|
3208
3208
|
children: /* @__PURE__ */ e("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ e(
|
|
@@ -3218,36 +3218,36 @@ const H1 = (t, r, s = "label") => {
|
|
|
3218
3218
|
)
|
|
3219
3219
|
]
|
|
3220
3220
|
},
|
|
3221
|
-
|
|
3221
|
+
z.value
|
|
3222
3222
|
)),
|
|
3223
|
-
|
|
3223
|
+
D && b ? /* @__PURE__ */ e(
|
|
3224
3224
|
"input",
|
|
3225
3225
|
{
|
|
3226
3226
|
ref: T,
|
|
3227
|
-
value:
|
|
3228
|
-
onChange:
|
|
3229
|
-
onKeyDown:
|
|
3230
|
-
onClick: (
|
|
3231
|
-
placeholder: !
|
|
3227
|
+
value: v2,
|
|
3228
|
+
onChange: j2,
|
|
3229
|
+
onKeyDown: y2,
|
|
3230
|
+
onClick: (z) => z.stopPropagation(),
|
|
3231
|
+
placeholder: !x2 && k2[0] && typeof k2[0].label == "string" ? k2[0].label : F,
|
|
3232
3232
|
className: "flex-1 min-w-[40px] outline-none bg-transparent text-sm text-[#181918] placeholder:text-[#8C8C8C]"
|
|
3233
3233
|
}
|
|
3234
|
-
) : !
|
|
3234
|
+
) : !x2 && k2[0] ? /* @__PURE__ */ e("span", { className: "truncate text-sm text-[#181918]", children: k2[0].label }) : k2.length === 0 ? /* @__PURE__ */ e("span", { className: "truncate text-sm text-[#8C8C8C]", children: F }) : null
|
|
3235
3235
|
] }),
|
|
3236
|
-
/* @__PURE__ */ e("div", { className: "flex items-center shrink-0 ml-2", children: o0 &&
|
|
3236
|
+
/* @__PURE__ */ e("div", { className: "flex items-center shrink-0 ml-2", children: o0 && a2 ? /* @__PURE__ */ e(
|
|
3237
3237
|
"button",
|
|
3238
3238
|
{
|
|
3239
3239
|
type: "button",
|
|
3240
3240
|
onClick: Y2,
|
|
3241
3241
|
"aria-label": "Clear",
|
|
3242
3242
|
className: "flex items-center justify-center w-4 h-4 text-[#BFBFBF] hover:text-[#595959] transition-colors",
|
|
3243
|
-
children: /* @__PURE__ */ e(
|
|
3243
|
+
children: /* @__PURE__ */ e($1, {})
|
|
3244
3244
|
}
|
|
3245
|
-
) :
|
|
3245
|
+
) : q !== void 0 ? /* @__PURE__ */ e("span", { className: "flex items-center text-[#8C8C8C]", children: q }) : /* @__PURE__ */ e(S1, { open: D }) })
|
|
3246
3246
|
]
|
|
3247
3247
|
}
|
|
3248
3248
|
),
|
|
3249
|
-
|
|
3250
|
-
/* @__PURE__ */ i(
|
|
3249
|
+
D && !C && typeof document < "u" && c0(
|
|
3250
|
+
/* @__PURE__ */ i(Z2, { children: [
|
|
3251
3251
|
/* @__PURE__ */ e("style", { children: `
|
|
3252
3252
|
@keyframes shekel-dropdown-in {
|
|
3253
3253
|
from { opacity: 0; transform: scaleY(0.9) translateY(-4px); }
|
|
@@ -3261,12 +3261,12 @@ const H1 = (t, r, s = "label") => {
|
|
|
3261
3261
|
/* @__PURE__ */ i(
|
|
3262
3262
|
"div",
|
|
3263
3263
|
{
|
|
3264
|
-
ref:
|
|
3264
|
+
ref: B2,
|
|
3265
3265
|
className: `fixed z-[1000] bg-white overflow-hidden shekel-dropdown-anim ${p}`,
|
|
3266
3266
|
style: {
|
|
3267
|
-
top:
|
|
3268
|
-
left:
|
|
3269
|
-
width:
|
|
3267
|
+
top: D2.top,
|
|
3268
|
+
left: D2.left,
|
|
3269
|
+
width: D2.width,
|
|
3270
3270
|
borderRadius: 8,
|
|
3271
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)",
|
|
3272
3272
|
...L
|
|
@@ -3277,46 +3277,46 @@ const H1 = (t, r, s = "label") => {
|
|
|
3277
3277
|
{
|
|
3278
3278
|
ref: P2,
|
|
3279
3279
|
type: "text",
|
|
3280
|
-
value:
|
|
3281
|
-
onChange:
|
|
3282
|
-
onKeyDown:
|
|
3283
|
-
placeholder:
|
|
3280
|
+
value: v2,
|
|
3281
|
+
onChange: j2,
|
|
3282
|
+
onKeyDown: y2,
|
|
3283
|
+
placeholder: U,
|
|
3284
3284
|
className: "w-full outline-none text-sm bg-transparent px-2 py-1 text-[#181918] placeholder:text-[#8C8C8C]",
|
|
3285
|
-
onClick: (
|
|
3285
|
+
onClick: (z) => z.stopPropagation()
|
|
3286
3286
|
}
|
|
3287
3287
|
) }),
|
|
3288
|
-
/* @__PURE__ */ e("div", { role: "listbox", className: "overflow-auto flex flex-col gap-0.5", style: { maxHeight: 256, padding: 4 }, children:
|
|
3289
|
-
const
|
|
3288
|
+
/* @__PURE__ */ e("div", { role: "listbox", className: "overflow-auto flex flex-col gap-0.5", style: { maxHeight: 256, padding: 4 }, children: m2.length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-3 text-sm text-[#8C8C8C] text-center", children: G }) : m2.map((z, i2) => {
|
|
3289
|
+
const R2 = S2.includes(z.value), G2 = i2 === j;
|
|
3290
3290
|
return /* @__PURE__ */ i(
|
|
3291
3291
|
"div",
|
|
3292
3292
|
{
|
|
3293
3293
|
role: "option",
|
|
3294
|
-
"aria-selected":
|
|
3295
|
-
"aria-disabled":
|
|
3296
|
-
onClick: (
|
|
3297
|
-
|
|
3294
|
+
"aria-selected": R2,
|
|
3295
|
+
"aria-disabled": z.disabled,
|
|
3296
|
+
onClick: (K2) => {
|
|
3297
|
+
K2.stopPropagation(), $2(z);
|
|
3298
3298
|
},
|
|
3299
|
-
onMouseEnter: () => !
|
|
3300
|
-
className: `flex items-center justify-between transition-colors duration-150 ${
|
|
3299
|
+
onMouseEnter: () => !z.disabled && Y(i2),
|
|
3300
|
+
className: `flex items-center justify-between transition-colors duration-150 ${z.disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer"}`,
|
|
3301
3301
|
style: {
|
|
3302
3302
|
padding: "10px 16px",
|
|
3303
3303
|
minHeight: 42,
|
|
3304
3304
|
borderRadius: 6,
|
|
3305
3305
|
fontSize: 14,
|
|
3306
3306
|
lineHeight: "22px",
|
|
3307
|
-
backgroundColor:
|
|
3308
|
-
color:
|
|
3309
|
-
fontWeight:
|
|
3307
|
+
backgroundColor: R2 ? n2 : G2 && !z.disabled ? h2 : "transparent",
|
|
3308
|
+
color: R2 ? p2 : "#181918",
|
|
3309
|
+
fontWeight: R2 ? 600 : 400
|
|
3310
3310
|
},
|
|
3311
3311
|
children: [
|
|
3312
|
-
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: W ? W(
|
|
3313
|
-
/* @__PURE__ */ e("div", { className: "truncate font-semibold", children:
|
|
3314
|
-
/* @__PURE__ */ e("div", { className: "truncate text-xs text-[#8C8C8C] font-normal mt-0.5", children:
|
|
3315
|
-
] }) : /* @__PURE__ */ e("span", { className: "truncate", children:
|
|
3316
|
-
|
|
3312
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: W ? W(z, { selected: R2 }) : z.description ? /* @__PURE__ */ i(Z2, { children: [
|
|
3313
|
+
/* @__PURE__ */ e("div", { className: "truncate font-semibold", children: z.label }),
|
|
3314
|
+
/* @__PURE__ */ e("div", { className: "truncate text-xs text-[#8C8C8C] font-normal mt-0.5", children: z.description })
|
|
3315
|
+
] }) : /* @__PURE__ */ e("span", { className: "truncate", children: z.label }) }),
|
|
3316
|
+
R2 && /* @__PURE__ */ e(E1, { color: p2 })
|
|
3317
3317
|
]
|
|
3318
3318
|
},
|
|
3319
|
-
|
|
3319
|
+
z.value
|
|
3320
3320
|
);
|
|
3321
3321
|
}) })
|
|
3322
3322
|
]
|
|
@@ -3326,8 +3326,8 @@ const H1 = (t, r, s = "label") => {
|
|
|
3326
3326
|
document.body
|
|
3327
3327
|
)
|
|
3328
3328
|
] }),
|
|
3329
|
-
l && /* @__PURE__ */ i("div", { className: "flex items-center mt-1 text-xs gap-1", style: { color:
|
|
3330
|
-
/* @__PURE__ */ e(J2, { color:
|
|
3329
|
+
l && /* @__PURE__ */ i("div", { className: "flex items-center mt-1 text-xs gap-1", style: { color: K }, children: [
|
|
3330
|
+
/* @__PURE__ */ e(J2, { color: K, size: 14 }),
|
|
3331
3331
|
l
|
|
3332
3332
|
] }),
|
|
3333
3333
|
!l && c && /* @__PURE__ */ e("div", { className: "mt-1 text-xs text-gray-500", children: c })
|
|
@@ -3337,7 +3337,7 @@ const H1 = (t, r, s = "label") => {
|
|
|
3337
3337
|
v0.displayName = "SelectInputBase";
|
|
3338
3338
|
const B1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
3339
3339
|
var d;
|
|
3340
|
-
const { field: n, fieldState: a } =
|
|
3340
|
+
const { field: n, fieldState: a } = T2({ control: t, name: r });
|
|
3341
3341
|
return /* @__PURE__ */ e(
|
|
3342
3342
|
v0,
|
|
3343
3343
|
{
|
|
@@ -3354,7 +3354,7 @@ const B1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
3354
3354
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
3355
3355
|
}
|
|
3356
3356
|
);
|
|
3357
|
-
}, O0 =
|
|
3357
|
+
}, O0 = o2.forwardRef(
|
|
3358
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 })
|
|
3359
3359
|
);
|
|
3360
3360
|
O0.displayName = "SelectInput";
|
|
@@ -3394,7 +3394,7 @@ const u0 = [
|
|
|
3394
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: [
|
|
3395
3395
|
/* @__PURE__ */ e("circle", { cx: "6", cy: "6", r: "6", fill: "currentColor" }),
|
|
3396
3396
|
/* @__PURE__ */ e("path", { d: "M4 4l4 4M8 4l-4 4", stroke: "#FFFFFF", strokeWidth: "1.2", strokeLinecap: "round" })
|
|
3397
|
-
] }), b0 =
|
|
3397
|
+
] }), b0 = o2.forwardRef(
|
|
3398
3398
|
(t, r) => {
|
|
3399
3399
|
const {
|
|
3400
3400
|
label: s,
|
|
@@ -3412,7 +3412,7 @@ const u0 = [
|
|
|
3412
3412
|
placeholder: f = "Select date",
|
|
3413
3413
|
format: F = "YYYY-MM-DD",
|
|
3414
3414
|
minDate: b,
|
|
3415
|
-
maxDate:
|
|
3415
|
+
maxDate: U,
|
|
3416
3416
|
disabledDate: m,
|
|
3417
3417
|
showToday: w = !0,
|
|
3418
3418
|
allowClear: H = !0,
|
|
@@ -3421,130 +3421,130 @@ const u0 = [
|
|
|
3421
3421
|
borderRadius: S = 12,
|
|
3422
3422
|
className: Z = "",
|
|
3423
3423
|
style: M,
|
|
3424
|
-
popupClassName:
|
|
3424
|
+
popupClassName: E = "",
|
|
3425
3425
|
onOpenChange: p,
|
|
3426
3426
|
id: L,
|
|
3427
3427
|
status: k,
|
|
3428
3428
|
accentColor: y = "#EC615B",
|
|
3429
3429
|
errorColor: x = "#C21919",
|
|
3430
|
-
borderColor:
|
|
3431
|
-
filledBorderColor:
|
|
3432
|
-
} = t,
|
|
3430
|
+
borderColor: $ = "#D9D9D9",
|
|
3431
|
+
filledBorderColor: G = "#181918"
|
|
3432
|
+
} = t, Q = _ !== void 0, [W, q] = O(s0(v)), P = Q ? s0(_) : W, [I, K] = O(!1), [s2, C2] = O(!1), [e2, d2] = O(P ?? /* @__PURE__ */ new Date()), h2 = o2.useId(), N = L ?? h2, r2 = f2(null), n2 = f2(null), p2 = f2(null), [X, g2] = O({
|
|
3433
3433
|
top: 0,
|
|
3434
3434
|
left: 0,
|
|
3435
3435
|
width: 280
|
|
3436
|
-
}),
|
|
3437
|
-
if (!
|
|
3438
|
-
const V =
|
|
3439
|
-
let
|
|
3440
|
-
|
|
3441
|
-
const
|
|
3442
|
-
let
|
|
3443
|
-
|
|
3436
|
+
}), V2 = () => {
|
|
3437
|
+
if (!n2.current) return;
|
|
3438
|
+
const V = n2.current.getBoundingClientRect(), t2 = 280, m2 = typeof window < "u" ? window.innerWidth : 0, x2 = typeof window < "u" ? window.innerHeight : 0;
|
|
3439
|
+
let S2 = V.left;
|
|
3440
|
+
S2 + t2 + 8 > m2 && (S2 = Math.max(8, m2 - t2 - 8));
|
|
3441
|
+
const k2 = 340;
|
|
3442
|
+
let N2 = V.bottom + 4;
|
|
3443
|
+
N2 + k2 + 8 > x2 && V.top > k2 + 8 && (N2 = V.top - k2 - 4), g2({ top: N2, left: S2, width: t2 });
|
|
3444
3444
|
};
|
|
3445
|
-
|
|
3446
|
-
if (!
|
|
3447
|
-
|
|
3448
|
-
const V = () =>
|
|
3445
|
+
F2(() => {
|
|
3446
|
+
if (!I) return;
|
|
3447
|
+
V2();
|
|
3448
|
+
const V = () => V2();
|
|
3449
3449
|
return window.addEventListener("resize", V), window.addEventListener("scroll", V, !0), () => {
|
|
3450
3450
|
window.removeEventListener("resize", V), window.removeEventListener("scroll", V, !0);
|
|
3451
3451
|
};
|
|
3452
|
-
}, [
|
|
3453
|
-
const
|
|
3452
|
+
}, [I]);
|
|
3453
|
+
const R = !!l || k === "error", D = P !== null, u2 = d === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : d, v2 = typeof B == "number" ? `${B}px` : B, b2 = typeof S == "number" ? `${S}px` : S, j = O2(() => b ? n0(s0(b)) : null, [b]), Y = O2(() => U ? n0(s0(U)) : null, [U]), a2 = (V) => {
|
|
3454
3454
|
const t2 = n0(V);
|
|
3455
|
-
return !!(j && t2 < j ||
|
|
3455
|
+
return !!(j && t2 < j || Y && t2 > Y || m && m(t2));
|
|
3456
3456
|
};
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
}, [
|
|
3457
|
+
F2(() => {
|
|
3458
|
+
P && d2(P);
|
|
3459
|
+
}, [P == null ? void 0 : P.getTime()]), F2(() => {
|
|
3460
3460
|
const V = (t2) => {
|
|
3461
|
-
var
|
|
3462
|
-
const
|
|
3463
|
-
!
|
|
3461
|
+
var k2, N2;
|
|
3462
|
+
const m2 = t2.target, x2 = (k2 = r2.current) == null ? void 0 : k2.contains(m2), S2 = (N2 = p2.current) == null ? void 0 : N2.contains(m2);
|
|
3463
|
+
!x2 && !S2 && I && (K(!1), p == null || p(!1));
|
|
3464
3464
|
};
|
|
3465
|
-
return
|
|
3466
|
-
}, [
|
|
3467
|
-
const
|
|
3468
|
-
|
|
3469
|
-
},
|
|
3465
|
+
return I && document.addEventListener("mousedown", V), () => document.removeEventListener("mousedown", V);
|
|
3466
|
+
}, [I, p]);
|
|
3467
|
+
const c2 = (V) => {
|
|
3468
|
+
Q || q(V), u == null || u(V, V ? R0(V, F) : "");
|
|
3469
|
+
}, l2 = () => {
|
|
3470
3470
|
if (C) return;
|
|
3471
|
-
const V = !
|
|
3472
|
-
|
|
3473
|
-
},
|
|
3474
|
-
|
|
3475
|
-
},
|
|
3476
|
-
V.stopPropagation(),
|
|
3477
|
-
},
|
|
3478
|
-
const V = e2.getFullYear(), t2 = e2.getMonth(),
|
|
3479
|
-
for (let
|
|
3480
|
-
|
|
3481
|
-
for (let
|
|
3482
|
-
|
|
3483
|
-
for (;
|
|
3484
|
-
const
|
|
3485
|
-
|
|
3471
|
+
const V = !I;
|
|
3472
|
+
K(V), p == null || p(V), V && P && d2(P);
|
|
3473
|
+
}, M2 = (V) => {
|
|
3474
|
+
a2(V) || (c2(V), K(!1), p == null || p(!1));
|
|
3475
|
+
}, H2 = (V) => {
|
|
3476
|
+
V.stopPropagation(), c2(null);
|
|
3477
|
+
}, L2 = O2(() => n0(/* @__PURE__ */ new Date()), []), B2 = R ? x : I ? y : D ? G : $, D2 = I ? `0 0 0 2px ${I2(y, 0.2)}` : void 0, q2 = { "--shekel-accent": y }, A2 = H && D && !C && s2, P2 = g === 1 ? U1 : D1, T = O2(() => {
|
|
3478
|
+
const V = e2.getFullYear(), t2 = e2.getMonth(), m2 = new Date(V, t2, 1).getDay(), x2 = g === 1 ? m2 === 0 ? 6 : m2 - 1 : m2, S2 = new Date(V, t2 + 1, 0).getDate(), k2 = new Date(V, t2, 0).getDate(), N2 = [];
|
|
3479
|
+
for (let U2 = x2 - 1; U2 >= 0; U2--)
|
|
3480
|
+
N2.push({ date: new Date(V, t2 - 1, k2 - U2), outside: !0 });
|
|
3481
|
+
for (let U2 = 1; U2 <= S2; U2++)
|
|
3482
|
+
N2.push({ date: new Date(V, t2, U2), outside: !1 });
|
|
3483
|
+
for (; N2.length < 42; ) {
|
|
3484
|
+
const U2 = N2[N2.length - 1].date, W2 = new Date(U2);
|
|
3485
|
+
W2.setDate(W2.getDate() + 1), N2.push({ date: W2, outside: !0 });
|
|
3486
3486
|
}
|
|
3487
|
-
return
|
|
3488
|
-
}, [e2, g]),
|
|
3489
|
-
|
|
3490
|
-
},
|
|
3491
|
-
|
|
3492
|
-
},
|
|
3493
|
-
return /* @__PURE__ */ i("div", { className: "w-full", ref: r, style:
|
|
3487
|
+
return N2;
|
|
3488
|
+
}, [e2, g]), w2 = (V) => {
|
|
3489
|
+
d2(new Date(e2.getFullYear(), e2.getMonth() + V, 1));
|
|
3490
|
+
}, _2 = (V) => {
|
|
3491
|
+
d2(new Date(e2.getFullYear() + V, e2.getMonth(), 1));
|
|
3492
|
+
}, E2 = P ? R0(P, F) : "";
|
|
3493
|
+
return /* @__PURE__ */ i("div", { className: "w-full", ref: r, style: q2, children: [
|
|
3494
3494
|
s && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
|
|
3495
3495
|
/* @__PURE__ */ i(
|
|
3496
3496
|
"label",
|
|
3497
3497
|
{
|
|
3498
3498
|
htmlFor: N,
|
|
3499
3499
|
className: `block text-sm font-medium ${o}`,
|
|
3500
|
-
style: { color:
|
|
3500
|
+
style: { color: R ? x : "#181918", ...n },
|
|
3501
3501
|
children: [
|
|
3502
3502
|
s,
|
|
3503
|
-
h &&
|
|
3503
|
+
h && u2
|
|
3504
3504
|
]
|
|
3505
3505
|
}
|
|
3506
3506
|
),
|
|
3507
3507
|
a && /* @__PURE__ */ e("div", { className: "shrink-0", children: a })
|
|
3508
3508
|
] }),
|
|
3509
|
-
/* @__PURE__ */ i("div", { className: "relative", ref:
|
|
3509
|
+
/* @__PURE__ */ i("div", { className: "relative", ref: r2, children: [
|
|
3510
3510
|
/* @__PURE__ */ i(
|
|
3511
3511
|
"div",
|
|
3512
3512
|
{
|
|
3513
|
-
ref:
|
|
3513
|
+
ref: n2,
|
|
3514
3514
|
id: N,
|
|
3515
3515
|
role: "combobox",
|
|
3516
3516
|
"aria-haspopup": "dialog",
|
|
3517
|
-
"aria-expanded":
|
|
3517
|
+
"aria-expanded": I,
|
|
3518
3518
|
"aria-disabled": C,
|
|
3519
3519
|
tabIndex: C ? -1 : 0,
|
|
3520
|
-
onClick:
|
|
3521
|
-
onMouseEnter: () =>
|
|
3522
|
-
onMouseLeave: () =>
|
|
3520
|
+
onClick: l2,
|
|
3521
|
+
onMouseEnter: () => C2(!0),
|
|
3522
|
+
onMouseLeave: () => C2(!1),
|
|
3523
3523
|
onKeyDown: (V) => {
|
|
3524
|
-
C || ((V.key === "Enter" || V.key === " " || V.key === "ArrowDown") && (V.preventDefault(),
|
|
3524
|
+
C || ((V.key === "Enter" || V.key === " " || V.key === "ArrowDown") && (V.preventDefault(), l2()), V.key === "Escape" && I && (V.preventDefault(), K(!1), p == null || p(!1)));
|
|
3525
3525
|
},
|
|
3526
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}`,
|
|
3527
3527
|
style: {
|
|
3528
|
-
height:
|
|
3529
|
-
borderRadius:
|
|
3528
|
+
height: v2,
|
|
3529
|
+
borderRadius: b2,
|
|
3530
3530
|
padding: "4px 11px",
|
|
3531
|
-
borderColor:
|
|
3532
|
-
boxShadow:
|
|
3531
|
+
borderColor: B2,
|
|
3532
|
+
boxShadow: D2,
|
|
3533
3533
|
...M
|
|
3534
3534
|
},
|
|
3535
3535
|
children: [
|
|
3536
3536
|
/* @__PURE__ */ e(
|
|
3537
3537
|
"span",
|
|
3538
3538
|
{
|
|
3539
|
-
className: `flex-1 min-w-0 truncate text-sm ${
|
|
3540
|
-
children:
|
|
3539
|
+
className: `flex-1 min-w-0 truncate text-sm ${P ? "text-[#181918]" : "text-[#8C8C8C]"}`,
|
|
3540
|
+
children: E2 || f
|
|
3541
3541
|
}
|
|
3542
3542
|
),
|
|
3543
|
-
/* @__PURE__ */ e("div", { className: "flex items-center shrink-0 ml-2", children:
|
|
3543
|
+
/* @__PURE__ */ e("div", { className: "flex items-center shrink-0 ml-2", children: A2 ? /* @__PURE__ */ e(
|
|
3544
3544
|
"button",
|
|
3545
3545
|
{
|
|
3546
3546
|
type: "button",
|
|
3547
|
-
onClick:
|
|
3547
|
+
onClick: H2,
|
|
3548
3548
|
"aria-label": "Clear",
|
|
3549
3549
|
className: "flex items-center justify-center w-4 h-4 text-[#BFBFBF] hover:text-[#595959] transition-colors",
|
|
3550
3550
|
children: /* @__PURE__ */ e(j1, {})
|
|
@@ -3553,8 +3553,8 @@ const u0 = [
|
|
|
3553
3553
|
]
|
|
3554
3554
|
}
|
|
3555
3555
|
),
|
|
3556
|
-
|
|
3557
|
-
/* @__PURE__ */ i(
|
|
3556
|
+
I && !C && typeof document < "u" && c0(
|
|
3557
|
+
/* @__PURE__ */ i(Z2, { children: [
|
|
3558
3558
|
/* @__PURE__ */ e("style", { children: `
|
|
3559
3559
|
@keyframes shekel-picker-in { from { opacity: 0; transform: scaleY(0.9) translateY(-4px); } to { opacity: 1; transform: scaleY(1) translateY(0); } }
|
|
3560
3560
|
.shekel-picker-anim { transform-origin: top center; animation: shekel-picker-in 180ms cubic-bezier(0.23, 1, 0.32, 1); }
|
|
@@ -3562,8 +3562,8 @@ const u0 = [
|
|
|
3562
3562
|
/* @__PURE__ */ i(
|
|
3563
3563
|
"div",
|
|
3564
3564
|
{
|
|
3565
|
-
ref:
|
|
3566
|
-
className: `fixed z-[1000] bg-white shekel-picker-anim ${
|
|
3565
|
+
ref: p2,
|
|
3566
|
+
className: `fixed z-[1000] bg-white shekel-picker-anim ${E}`,
|
|
3567
3567
|
style: {
|
|
3568
3568
|
top: X.top,
|
|
3569
3569
|
left: X.left,
|
|
@@ -3580,7 +3580,7 @@ const u0 = [
|
|
|
3580
3580
|
"button",
|
|
3581
3581
|
{
|
|
3582
3582
|
type: "button",
|
|
3583
|
-
onClick: () =>
|
|
3583
|
+
onClick: () => _2(-1),
|
|
3584
3584
|
"aria-label": "Previous year",
|
|
3585
3585
|
className: "w-7 h-7 flex items-center justify-center text-[#595959] hover:text-[color:var(--shekel-accent)] rounded transition-colors",
|
|
3586
3586
|
children: /* @__PURE__ */ e(G1, {})
|
|
@@ -3590,7 +3590,7 @@ const u0 = [
|
|
|
3590
3590
|
"button",
|
|
3591
3591
|
{
|
|
3592
3592
|
type: "button",
|
|
3593
|
-
onClick: () =>
|
|
3593
|
+
onClick: () => w2(-1),
|
|
3594
3594
|
"aria-label": "Previous month",
|
|
3595
3595
|
className: "w-7 h-7 flex items-center justify-center text-[#595959] hover:text-[color:var(--shekel-accent)] rounded transition-colors",
|
|
3596
3596
|
children: /* @__PURE__ */ e(I1, {})
|
|
@@ -3607,7 +3607,7 @@ const u0 = [
|
|
|
3607
3607
|
"button",
|
|
3608
3608
|
{
|
|
3609
3609
|
type: "button",
|
|
3610
|
-
onClick: () =>
|
|
3610
|
+
onClick: () => w2(1),
|
|
3611
3611
|
"aria-label": "Next month",
|
|
3612
3612
|
className: "w-7 h-7 flex items-center justify-center text-[#595959] hover:text-[color:var(--shekel-accent)] rounded transition-colors",
|
|
3613
3613
|
children: /* @__PURE__ */ e(R1, {})
|
|
@@ -3617,7 +3617,7 @@ const u0 = [
|
|
|
3617
3617
|
"button",
|
|
3618
3618
|
{
|
|
3619
3619
|
type: "button",
|
|
3620
|
-
onClick: () =>
|
|
3620
|
+
onClick: () => _2(1),
|
|
3621
3621
|
"aria-label": "Next year",
|
|
3622
3622
|
className: "w-7 h-7 flex items-center justify-center text-[#595959] hover:text-[color:var(--shekel-accent)] rounded transition-colors",
|
|
3623
3623
|
children: /* @__PURE__ */ e(Z1, {})
|
|
@@ -3634,14 +3634,14 @@ const u0 = [
|
|
|
3634
3634
|
},
|
|
3635
3635
|
V
|
|
3636
3636
|
)) }),
|
|
3637
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 px-1", children: T.map(({ date: V, outside: t2 },
|
|
3638
|
-
const
|
|
3637
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 px-1", children: T.map(({ date: V, outside: t2 }, m2) => {
|
|
3638
|
+
const x2 = P && G0(V, P), S2 = G0(V, L2), k2 = a2(V);
|
|
3639
3639
|
return /* @__PURE__ */ e(
|
|
3640
3640
|
"button",
|
|
3641
3641
|
{
|
|
3642
3642
|
type: "button",
|
|
3643
|
-
disabled:
|
|
3644
|
-
onClick: () =>
|
|
3643
|
+
disabled: k2,
|
|
3644
|
+
onClick: () => M2(V),
|
|
3645
3645
|
className: "flex items-center justify-center text-sm transition-colors",
|
|
3646
3646
|
style: {
|
|
3647
3647
|
height: 32,
|
|
@@ -3650,20 +3650,20 @@ const u0 = [
|
|
|
3650
3650
|
children: /* @__PURE__ */ e(
|
|
3651
3651
|
"span",
|
|
3652
3652
|
{
|
|
3653
|
-
className: `flex items-center justify-center rounded-full transition-colors ${
|
|
3653
|
+
className: `flex items-center justify-center rounded-full transition-colors ${k2 ? "text-[#D9D9D9] cursor-not-allowed" : t2 ? "text-[#BFBFBF] hover:bg-[#F5F5F5]" : "text-[#181918] hover:bg-[#F5F5F5]"}`,
|
|
3654
3654
|
style: {
|
|
3655
3655
|
width: 28,
|
|
3656
3656
|
height: 28,
|
|
3657
|
-
backgroundColor:
|
|
3658
|
-
color:
|
|
3659
|
-
fontWeight:
|
|
3660
|
-
border:
|
|
3657
|
+
backgroundColor: x2 ? y : void 0,
|
|
3658
|
+
color: x2 ? "#FFFFFF" : void 0,
|
|
3659
|
+
fontWeight: x2 ? 600 : 400,
|
|
3660
|
+
border: S2 && !x2 ? `1px solid ${y}` : void 0
|
|
3661
3661
|
},
|
|
3662
3662
|
children: V.getDate()
|
|
3663
3663
|
}
|
|
3664
3664
|
)
|
|
3665
3665
|
},
|
|
3666
|
-
|
|
3666
|
+
m2
|
|
3667
3667
|
);
|
|
3668
3668
|
}) }),
|
|
3669
3669
|
w && /* @__PURE__ */ e("div", { className: "border-t border-[#F0F0F0] mt-2 pt-2 text-center", children: /* @__PURE__ */ e(
|
|
@@ -3671,9 +3671,9 @@ const u0 = [
|
|
|
3671
3671
|
{
|
|
3672
3672
|
type: "button",
|
|
3673
3673
|
onClick: () => {
|
|
3674
|
-
|
|
3674
|
+
a2(L2) || M2(L2);
|
|
3675
3675
|
},
|
|
3676
|
-
disabled:
|
|
3676
|
+
disabled: a2(L2),
|
|
3677
3677
|
className: "text-sm hover:underline disabled:text-[#D9D9D9] disabled:no-underline",
|
|
3678
3678
|
style: { color: y },
|
|
3679
3679
|
children: "Today"
|
|
@@ -3697,7 +3697,7 @@ const u0 = [
|
|
|
3697
3697
|
b0.displayName = "DatePickerBase";
|
|
3698
3698
|
const T1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
3699
3699
|
var d;
|
|
3700
|
-
const { field: n, fieldState: a } =
|
|
3700
|
+
const { field: n, fieldState: a } = T2({ control: t, name: r });
|
|
3701
3701
|
return /* @__PURE__ */ e(
|
|
3702
3702
|
b0,
|
|
3703
3703
|
{
|
|
@@ -3710,7 +3710,7 @@ const T1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
3710
3710
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
3711
3711
|
}
|
|
3712
3712
|
);
|
|
3713
|
-
}, A1 =
|
|
3713
|
+
}, A1 = o2.forwardRef(
|
|
3714
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 })
|
|
3715
3715
|
);
|
|
3716
3716
|
A1.displayName = "DatePicker";
|
|
@@ -3770,10 +3770,10 @@ const C0 = [
|
|
|
3770
3770
|
rangeBgColor: u,
|
|
3771
3771
|
rangeTextColor: f
|
|
3772
3772
|
}) => {
|
|
3773
|
-
const F = l === 1 ? P1 : W1, b = O2(() => t0(/* @__PURE__ */ new Date()), []),
|
|
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(),
|
|
3773
|
+
const F = l === 1 ? P1 : W1, b = O2(() => t0(/* @__PURE__ */ new Date()), []), U = 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(), E = new Date(g, B, 0).getDate(), p = [];
|
|
3775
3775
|
for (let L = Z - 1; L >= 0; L--)
|
|
3776
|
-
p.push({ date: new Date(g, B - 1,
|
|
3776
|
+
p.push({ date: new Date(g, B - 1, E - L), outside: !0 });
|
|
3777
3777
|
for (let L = 1; L <= M; L++)
|
|
3778
3778
|
p.push({ date: new Date(g, B, L), outside: !1 });
|
|
3779
3779
|
for (; p.length < 42; ) {
|
|
@@ -3784,7 +3784,7 @@ const C0 = [
|
|
|
3784
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;
|
|
3785
3785
|
return /* @__PURE__ */ i("div", { style: { width: 280 }, children: [
|
|
3786
3786
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between px-2 py-1", children: [
|
|
3787
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-1", style: { minWidth: 64 }, children: c && /* @__PURE__ */ i(
|
|
3787
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-1", style: { minWidth: 64 }, children: c && /* @__PURE__ */ i(Z2, { children: [
|
|
3788
3788
|
/* @__PURE__ */ e(
|
|
3789
3789
|
"button",
|
|
3790
3790
|
{
|
|
@@ -3817,7 +3817,7 @@ const C0 = [
|
|
|
3817
3817
|
" ",
|
|
3818
3818
|
t.getFullYear()
|
|
3819
3819
|
] }),
|
|
3820
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-1 justify-end", style: { minWidth: 64 }, children: h && /* @__PURE__ */ i(
|
|
3820
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-1 justify-end", style: { minWidth: 64 }, children: h && /* @__PURE__ */ i(Z2, { children: [
|
|
3821
3821
|
/* @__PURE__ */ e(
|
|
3822
3822
|
"button",
|
|
3823
3823
|
{
|
|
@@ -3847,8 +3847,8 @@ const C0 = [
|
|
|
3847
3847
|
] }) })
|
|
3848
3848
|
] }),
|
|
3849
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:
|
|
3851
|
-
const Z = !!(r && e0(g, r)), M = !!(s && e0(g, s)),
|
|
3850
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 px-1", onMouseLeave: () => n(null), children: U.map(({ date: g, outside: B }, S) => {
|
|
3851
|
+
const Z = !!(r && e0(g, r)), M = !!(s && e0(g, s)), E = 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);
|
|
3852
3852
|
return /* @__PURE__ */ e(
|
|
3853
3853
|
"button",
|
|
3854
3854
|
{
|
|
@@ -3859,11 +3859,11 @@ const C0 = [
|
|
|
3859
3859
|
className: "flex items-center justify-center text-sm",
|
|
3860
3860
|
style: {
|
|
3861
3861
|
height: 32,
|
|
3862
|
-
backgroundColor:
|
|
3863
|
-
borderTopLeftRadius: p ? 999 :
|
|
3864
|
-
borderBottomLeftRadius: p ? 999 :
|
|
3865
|
-
borderTopRightRadius: L ? 999 :
|
|
3866
|
-
borderBottomRightRadius: L ? 999 :
|
|
3862
|
+
backgroundColor: E ? u : void 0,
|
|
3863
|
+
borderTopLeftRadius: p ? 999 : E ? 0 : 999,
|
|
3864
|
+
borderBottomLeftRadius: p ? 999 : E ? 0 : 999,
|
|
3865
|
+
borderTopRightRadius: L ? 999 : E ? 0 : 999,
|
|
3866
|
+
borderBottomRightRadius: L ? 999 : E ? 0 : 999
|
|
3867
3867
|
},
|
|
3868
3868
|
children: /* @__PURE__ */ e(
|
|
3869
3869
|
"span",
|
|
@@ -3873,7 +3873,7 @@ const C0 = [
|
|
|
3873
3873
|
width: 28,
|
|
3874
3874
|
height: 28,
|
|
3875
3875
|
backgroundColor: k ? v : void 0,
|
|
3876
|
-
color: k ? "#FFFFFF" : x ? "#D9D9D9" : B ? "#BFBFBF" :
|
|
3876
|
+
color: k ? "#FFFFFF" : x ? "#D9D9D9" : B ? "#BFBFBF" : E ? f : "#181918",
|
|
3877
3877
|
fontWeight: k ? 600 : 400,
|
|
3878
3878
|
border: y && !k ? `1px solid ${v}` : void 0
|
|
3879
3879
|
},
|
|
@@ -3885,7 +3885,7 @@ const C0 = [
|
|
|
3885
3885
|
);
|
|
3886
3886
|
}) })
|
|
3887
3887
|
] });
|
|
3888
|
-
}, w0 =
|
|
3888
|
+
}, w0 = o2.forwardRef(
|
|
3889
3889
|
(t, r) => {
|
|
3890
3890
|
const {
|
|
3891
3891
|
label: s,
|
|
@@ -3903,7 +3903,7 @@ const C0 = [
|
|
|
3903
3903
|
placeholder: f = ["Start date", "End date"],
|
|
3904
3904
|
format: F = "YYYY-MM-DD",
|
|
3905
3905
|
separator: b,
|
|
3906
|
-
minDate:
|
|
3906
|
+
minDate: U,
|
|
3907
3907
|
maxDate: m,
|
|
3908
3908
|
disabledDate: w,
|
|
3909
3909
|
allowClear: H = !0,
|
|
@@ -3912,75 +3912,75 @@ const C0 = [
|
|
|
3912
3912
|
borderRadius: S = 12,
|
|
3913
3913
|
className: Z = "",
|
|
3914
3914
|
style: M,
|
|
3915
|
-
popupClassName:
|
|
3915
|
+
popupClassName: E = "",
|
|
3916
3916
|
onOpenChange: p,
|
|
3917
3917
|
id: L,
|
|
3918
3918
|
status: k,
|
|
3919
3919
|
accentColor: y = "#EC615B",
|
|
3920
3920
|
errorColor: x = "#C21919",
|
|
3921
|
-
borderColor:
|
|
3922
|
-
filledBorderColor:
|
|
3923
|
-
rangeBgColor:
|
|
3921
|
+
borderColor: $ = "#D9D9D9",
|
|
3922
|
+
filledBorderColor: G = "#181918",
|
|
3923
|
+
rangeBgColor: Q,
|
|
3924
3924
|
rangeTextColor: W,
|
|
3925
|
-
singlePanel:
|
|
3926
|
-
presets:
|
|
3927
|
-
} = t,
|
|
3925
|
+
singlePanel: q = !1,
|
|
3926
|
+
presets: P
|
|
3927
|
+
} = t, I = Q ?? I2(y, 0.12), K = W ?? y, [s2, C2] = O(
|
|
3928
3928
|
typeof window < "u" ? window.innerWidth < 640 : !1
|
|
3929
3929
|
);
|
|
3930
|
-
|
|
3931
|
-
const A = () =>
|
|
3930
|
+
F2(() => {
|
|
3931
|
+
const A = () => C2(window.innerWidth < 640);
|
|
3932
3932
|
return window.addEventListener("resize", A), () => window.removeEventListener("resize", A);
|
|
3933
3933
|
}, []);
|
|
3934
|
-
const e2 =
|
|
3934
|
+
const e2 = q || s2, d2 = _ !== void 0, [h2, N] = O(() => [
|
|
3935
3935
|
Q2(v == null ? void 0 : v[0]),
|
|
3936
3936
|
Q2(v == null ? void 0 : v[1])
|
|
3937
|
-
]),
|
|
3938
|
-
if (!
|
|
3939
|
-
const A =
|
|
3940
|
-
let
|
|
3941
|
-
|
|
3942
|
-
},
|
|
3943
|
-
const
|
|
3944
|
-
return !!(
|
|
3937
|
+
]), r2 = d2 ? [Q2(_[0]), Q2(_[1])] : h2, [n2, p2] = r2, [X, g2] = O(!1), [V2, R] = O(!1), [D, u2] = O("from"), [v2, b2] = O(null), [j, Y] = O(n2 ?? /* @__PURE__ */ new Date()), a2 = o2.useId(), c2 = L ?? a2, l2 = f2(null), M2 = f2(null), H2 = f2(null), [L2, B2] = O({ top: 0, left: 0 }), D2 = () => {
|
|
3938
|
+
if (!M2.current) return;
|
|
3939
|
+
const A = M2.current.getBoundingClientRect(), y2 = typeof window < "u" ? window.innerWidth : 0, j2 = e2 ? 296 : 580;
|
|
3940
|
+
let X2 = A.left;
|
|
3941
|
+
X2 + j2 + 8 > y2 && (X2 = Math.max(8, y2 - j2 - 8)), B2({ top: A.bottom + 4, left: X2 });
|
|
3942
|
+
}, q2 = !!l || k === "error", A2 = !!n2 || !!p2, P2 = d === void 0 ? /* @__PURE__ */ e("span", { style: { color: "#C21919" }, children: "*" }) : d, T = typeof B == "number" ? `${B}px` : B, w2 = typeof S == "number" ? `${S}px` : S, _2 = O2(() => U ? t0(Q2(U)) : null, [U]), E2 = O2(() => m ? t0(Q2(m)) : null, [m]), V = (A) => {
|
|
3943
|
+
const y2 = t0(A);
|
|
3944
|
+
return !!(_2 && y2 < _2 || E2 && y2 > E2 || w && w(y2));
|
|
3945
3945
|
};
|
|
3946
|
-
|
|
3947
|
-
const A = (
|
|
3946
|
+
F2(() => {
|
|
3947
|
+
const A = (y2) => {
|
|
3948
3948
|
var r0, o0;
|
|
3949
|
-
const
|
|
3950
|
-
!
|
|
3949
|
+
const j2 = y2.target, X2 = (r0 = l2.current) == null ? void 0 : r0.contains(j2), d0 = (o0 = H2.current) == null ? void 0 : o0.contains(j2);
|
|
3950
|
+
!X2 && !d0 && X && (g2(!1), p == null || p(!1), b2(null));
|
|
3951
3951
|
};
|
|
3952
3952
|
return X && document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A);
|
|
3953
|
-
}, [X, p]),
|
|
3953
|
+
}, [X, p]), F2(() => {
|
|
3954
3954
|
if (!X) return;
|
|
3955
|
-
|
|
3956
|
-
const A = () =>
|
|
3955
|
+
D2();
|
|
3956
|
+
const A = () => D2();
|
|
3957
3957
|
return window.addEventListener("resize", A), window.addEventListener("scroll", A, !0), () => {
|
|
3958
3958
|
window.removeEventListener("resize", A), window.removeEventListener("scroll", A, !0);
|
|
3959
3959
|
};
|
|
3960
3960
|
}, [X, e2]);
|
|
3961
|
-
const t2 = (A,
|
|
3962
|
-
|
|
3963
|
-
[A,
|
|
3964
|
-
[A ? l0(A, F) : "",
|
|
3961
|
+
const t2 = (A, y2) => {
|
|
3962
|
+
d2 || N([A, y2]), u == null || u(
|
|
3963
|
+
[A, y2],
|
|
3964
|
+
[A ? l0(A, F) : "", y2 ? l0(y2, F) : ""]
|
|
3965
3965
|
);
|
|
3966
|
-
}, f2 = (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)));
|
|
3968
3966
|
}, m2 = (A) => {
|
|
3967
|
+
V(A) || (D === "from" || !n2 ? (t2(A, null), u2("to"), b2(null)) : (A.getTime() < n2.getTime() ? t2(A, n2) : t2(n2, A), u2("from"), g2(!1), p == null || p(!1), b2(null)));
|
|
3968
|
+
}, x2 = (A) => {
|
|
3969
3969
|
if (C) return;
|
|
3970
|
-
A &&
|
|
3971
|
-
const
|
|
3972
|
-
|
|
3973
|
-
},
|
|
3974
|
-
A.stopPropagation(), t2(null, null),
|
|
3975
|
-
},
|
|
3976
|
-
return /* @__PURE__ */ i("div", { className: "w-full", ref: r, style:
|
|
3970
|
+
A && u2(A);
|
|
3971
|
+
const y2 = !X;
|
|
3972
|
+
g2(y2), p == null || p(y2), y2 && (n2 || p2) && Y(n2 ?? p2 ?? /* @__PURE__ */ new Date());
|
|
3973
|
+
}, S2 = (A) => {
|
|
3974
|
+
A.stopPropagation(), t2(null, null), u2("from");
|
|
3975
|
+
}, k2 = q2 ? x : X ? y : A2 ? G : $, N2 = X ? `0 0 0 2px ${I2(y, 0.2)}` : void 0, U2 = { "--shekel-accent": y }, W2 = H && A2 && !C && V2, J = n2 ? l0(n2, F) : "", $2 = p2 ? l0(p2, 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" }) }) });
|
|
3976
|
+
return /* @__PURE__ */ i("div", { className: "w-full", ref: r, style: U2, children: [
|
|
3977
3977
|
s && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
|
|
3978
3978
|
/* @__PURE__ */ i(
|
|
3979
3979
|
"label",
|
|
3980
3980
|
{
|
|
3981
|
-
htmlFor:
|
|
3981
|
+
htmlFor: c2,
|
|
3982
3982
|
className: `block text-sm font-medium ${o}`,
|
|
3983
|
-
style: { color:
|
|
3983
|
+
style: { color: q2 ? x : "#181918", ...n },
|
|
3984
3984
|
children: [
|
|
3985
3985
|
s,
|
|
3986
3986
|
h && P2
|
|
@@ -3989,25 +3989,25 @@ const C0 = [
|
|
|
3989
3989
|
),
|
|
3990
3990
|
a && /* @__PURE__ */ e("div", { className: "shrink-0", children: a })
|
|
3991
3991
|
] }),
|
|
3992
|
-
/* @__PURE__ */ i("div", { className: "relative", ref:
|
|
3992
|
+
/* @__PURE__ */ i("div", { className: "relative", ref: l2, children: [
|
|
3993
3993
|
/* @__PURE__ */ i(
|
|
3994
3994
|
"div",
|
|
3995
3995
|
{
|
|
3996
|
-
ref:
|
|
3997
|
-
id:
|
|
3996
|
+
ref: M2,
|
|
3997
|
+
id: c2,
|
|
3998
3998
|
role: "combobox",
|
|
3999
3999
|
"aria-haspopup": "dialog",
|
|
4000
4000
|
"aria-expanded": X,
|
|
4001
4001
|
"aria-disabled": C,
|
|
4002
|
-
onMouseEnter: () =>
|
|
4003
|
-
onMouseLeave: () =>
|
|
4002
|
+
onMouseEnter: () => R(!0),
|
|
4003
|
+
onMouseLeave: () => R(!1),
|
|
4004
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}`,
|
|
4005
4005
|
style: {
|
|
4006
4006
|
height: T,
|
|
4007
|
-
borderRadius:
|
|
4007
|
+
borderRadius: w2,
|
|
4008
4008
|
padding: "4px 11px",
|
|
4009
|
-
borderColor:
|
|
4010
|
-
boxShadow:
|
|
4009
|
+
borderColor: k2,
|
|
4010
|
+
boxShadow: N2,
|
|
4011
4011
|
...M
|
|
4012
4012
|
},
|
|
4013
4013
|
children: [
|
|
@@ -4017,12 +4017,12 @@ const C0 = [
|
|
|
4017
4017
|
{
|
|
4018
4018
|
type: "button",
|
|
4019
4019
|
disabled: C,
|
|
4020
|
-
onClick: () =>
|
|
4021
|
-
className: `w-full text-left text-sm truncate ${
|
|
4022
|
-
children:
|
|
4020
|
+
onClick: () => x2("from"),
|
|
4021
|
+
className: `w-full text-left text-sm truncate ${J ? "text-[#181918]" : "text-[#8C8C8C]"}`,
|
|
4022
|
+
children: J || f[0]
|
|
4023
4023
|
}
|
|
4024
4024
|
),
|
|
4025
|
-
X &&
|
|
4025
|
+
X && D === "from" && /* @__PURE__ */ e("div", { className: "absolute left-0 right-2 bottom-[-6px] h-[2px] transition-all", style: { backgroundColor: y } })
|
|
4026
4026
|
] }),
|
|
4027
4027
|
b === void 0 ? Y2 : b,
|
|
4028
4028
|
/* @__PURE__ */ i("div", { className: "relative flex-1 min-w-0", children: [
|
|
@@ -4031,18 +4031,18 @@ const C0 = [
|
|
|
4031
4031
|
{
|
|
4032
4032
|
type: "button",
|
|
4033
4033
|
disabled: C,
|
|
4034
|
-
onClick: () =>
|
|
4035
|
-
className: `w-full text-left text-sm truncate ${
|
|
4036
|
-
children:
|
|
4034
|
+
onClick: () => x2("to"),
|
|
4035
|
+
className: `w-full text-left text-sm truncate ${$2 ? "text-[#181918]" : "text-[#8C8C8C]"}`,
|
|
4036
|
+
children: $2 || f[1]
|
|
4037
4037
|
}
|
|
4038
4038
|
),
|
|
4039
|
-
X &&
|
|
4039
|
+
X && D === "to" && /* @__PURE__ */ e("div", { className: "absolute left-0 right-2 bottom-[-6px] h-[2px] transition-all", style: { backgroundColor: y } })
|
|
4040
4040
|
] }),
|
|
4041
|
-
/* @__PURE__ */ e("div", { className: "flex items-center shrink-0 ml-2", children:
|
|
4041
|
+
/* @__PURE__ */ e("div", { className: "flex items-center shrink-0 ml-2", children: W2 ? /* @__PURE__ */ e(
|
|
4042
4042
|
"button",
|
|
4043
4043
|
{
|
|
4044
4044
|
type: "button",
|
|
4045
|
-
onClick:
|
|
4045
|
+
onClick: S2,
|
|
4046
4046
|
"aria-label": "Clear",
|
|
4047
4047
|
className: "flex items-center justify-center w-4 h-4 text-[#BFBFBF] hover:text-[#595959] transition-colors",
|
|
4048
4048
|
children: /* @__PURE__ */ e(K1, {})
|
|
@@ -4052,7 +4052,7 @@ const C0 = [
|
|
|
4052
4052
|
}
|
|
4053
4053
|
),
|
|
4054
4054
|
X && !C && typeof document < "u" && c0(
|
|
4055
|
-
/* @__PURE__ */ i(
|
|
4055
|
+
/* @__PURE__ */ i(Z2, { children: [
|
|
4056
4056
|
/* @__PURE__ */ e("style", { children: `
|
|
4057
4057
|
@keyframes shekel-range-in { from { opacity: 0; transform: scaleY(0.9) translateY(-4px); } to { opacity: 1; transform: scaleY(1) translateY(0); } }
|
|
4058
4058
|
.shekel-range-anim { transform-origin: top center; animation: shekel-range-in 180ms cubic-bezier(0.23, 1, 0.32, 1); }
|
|
@@ -4060,34 +4060,34 @@ const C0 = [
|
|
|
4060
4060
|
/* @__PURE__ */ i(
|
|
4061
4061
|
"div",
|
|
4062
4062
|
{
|
|
4063
|
-
ref:
|
|
4064
|
-
className: `fixed z-[1000] bg-white flex shekel-range-anim ${
|
|
4063
|
+
ref: H2,
|
|
4064
|
+
className: `fixed z-[1000] bg-white flex shekel-range-anim ${E}`,
|
|
4065
4065
|
style: {
|
|
4066
|
-
top:
|
|
4067
|
-
left:
|
|
4066
|
+
top: L2.top,
|
|
4067
|
+
left: L2.left,
|
|
4068
4068
|
maxWidth: "calc(100vw - 16px)",
|
|
4069
4069
|
borderRadius: 8,
|
|
4070
4070
|
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)",
|
|
4071
4071
|
padding: 8
|
|
4072
4072
|
},
|
|
4073
4073
|
children: [
|
|
4074
|
-
|
|
4074
|
+
P && P.length > 0 && /* @__PURE__ */ e(
|
|
4075
4075
|
"div",
|
|
4076
4076
|
{
|
|
4077
4077
|
className: "flex flex-col py-1 pr-2 mr-2 border-r border-[#F0F0F0]",
|
|
4078
4078
|
style: { minWidth: 120 },
|
|
4079
|
-
children:
|
|
4079
|
+
children: P.map((A, y2) => /* @__PURE__ */ e(
|
|
4080
4080
|
"button",
|
|
4081
4081
|
{
|
|
4082
4082
|
type: "button",
|
|
4083
4083
|
onClick: () => {
|
|
4084
|
-
const
|
|
4085
|
-
t2(
|
|
4084
|
+
const j2 = Q2(A.value[0]), X2 = Q2(A.value[1]);
|
|
4085
|
+
t2(j2, X2), g2(!1), p == null || p(!1);
|
|
4086
4086
|
},
|
|
4087
4087
|
className: "text-left px-3 py-1.5 text-sm text-[#181918] rounded hover:bg-[rgba(0,0,0,0.04)] transition-colors",
|
|
4088
4088
|
children: A.label
|
|
4089
4089
|
},
|
|
4090
|
-
|
|
4090
|
+
y2
|
|
4091
4091
|
))
|
|
4092
4092
|
}
|
|
4093
4093
|
),
|
|
@@ -4095,42 +4095,42 @@ const C0 = [
|
|
|
4095
4095
|
j0,
|
|
4096
4096
|
{
|
|
4097
4097
|
viewDate: j,
|
|
4098
|
-
from:
|
|
4099
|
-
to:
|
|
4100
|
-
hoverDate:
|
|
4101
|
-
onHoverDate:
|
|
4102
|
-
onDayClick:
|
|
4098
|
+
from: n2,
|
|
4099
|
+
to: p2,
|
|
4100
|
+
hoverDate: v2,
|
|
4101
|
+
onHoverDate: b2,
|
|
4102
|
+
onDayClick: m2,
|
|
4103
4103
|
isDisabledDate: V,
|
|
4104
4104
|
firstDayOfWeek: g,
|
|
4105
4105
|
showLeftArrows: !0,
|
|
4106
4106
|
showRightArrows: e2,
|
|
4107
|
-
onShiftMonth: (A) =>
|
|
4108
|
-
onShiftYear: (A) =>
|
|
4107
|
+
onShiftMonth: (A) => Y(new Date(j.getFullYear(), j.getMonth() + A, 1)),
|
|
4108
|
+
onShiftYear: (A) => Y(new Date(j.getFullYear() + A, j.getMonth(), 1)),
|
|
4109
4109
|
accentColor: y,
|
|
4110
|
-
rangeBgColor:
|
|
4111
|
-
rangeTextColor:
|
|
4110
|
+
rangeBgColor: I,
|
|
4111
|
+
rangeTextColor: K
|
|
4112
4112
|
}
|
|
4113
4113
|
),
|
|
4114
|
-
!e2 && /* @__PURE__ */ i(
|
|
4114
|
+
!e2 && /* @__PURE__ */ i(Z2, { children: [
|
|
4115
4115
|
/* @__PURE__ */ e("div", { className: "w-px bg-[#F0F0F0] mx-2" }),
|
|
4116
4116
|
/* @__PURE__ */ e(
|
|
4117
4117
|
j0,
|
|
4118
4118
|
{
|
|
4119
4119
|
viewDate: new Date(j.getFullYear(), j.getMonth() + 1, 1),
|
|
4120
|
-
from:
|
|
4121
|
-
to:
|
|
4122
|
-
hoverDate:
|
|
4123
|
-
onHoverDate:
|
|
4124
|
-
onDayClick:
|
|
4120
|
+
from: n2,
|
|
4121
|
+
to: p2,
|
|
4122
|
+
hoverDate: v2,
|
|
4123
|
+
onHoverDate: b2,
|
|
4124
|
+
onDayClick: m2,
|
|
4125
4125
|
isDisabledDate: V,
|
|
4126
4126
|
firstDayOfWeek: g,
|
|
4127
4127
|
showLeftArrows: !1,
|
|
4128
4128
|
showRightArrows: !0,
|
|
4129
|
-
onShiftMonth: (A) =>
|
|
4130
|
-
onShiftYear: (A) =>
|
|
4129
|
+
onShiftMonth: (A) => Y(new Date(j.getFullYear(), j.getMonth() + A, 1)),
|
|
4130
|
+
onShiftYear: (A) => Y(new Date(j.getFullYear() + A, j.getMonth(), 1)),
|
|
4131
4131
|
accentColor: y,
|
|
4132
|
-
rangeBgColor:
|
|
4133
|
-
rangeTextColor:
|
|
4132
|
+
rangeBgColor: I,
|
|
4133
|
+
rangeTextColor: K
|
|
4134
4134
|
}
|
|
4135
4135
|
)
|
|
4136
4136
|
] })
|
|
@@ -4152,7 +4152,7 @@ const C0 = [
|
|
|
4152
4152
|
w0.displayName = "DateRangePickerBase";
|
|
4153
4153
|
const q1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
4154
4154
|
var d;
|
|
4155
|
-
const { field: n, fieldState: a } =
|
|
4155
|
+
const { field: n, fieldState: a } = T2({ control: t, name: r });
|
|
4156
4156
|
return /* @__PURE__ */ e(
|
|
4157
4157
|
w0,
|
|
4158
4158
|
{
|
|
@@ -4165,7 +4165,7 @@ const q1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
4165
4165
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
4166
4166
|
}
|
|
4167
4167
|
);
|
|
4168
|
-
}, X1 =
|
|
4168
|
+
}, X1 = o2.forwardRef(
|
|
4169
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 })
|
|
4170
4170
|
);
|
|
4171
4171
|
X1.displayName = "DateRangePicker";
|
|
@@ -4183,7 +4183,7 @@ const J1 = (t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), a0 = (t, r) => {
|
|
|
4183
4183
|
const s = t.split("."), o = s[0] || "0";
|
|
4184
4184
|
let n = s[1] ?? "";
|
|
4185
4185
|
return n.length < r ? n = n.padEnd(r, "0") : n = n.slice(0, r), r > 0 ? `${o}.${n}` : o;
|
|
4186
|
-
}, k0 =
|
|
4186
|
+
}, k0 = o2.forwardRef(
|
|
4187
4187
|
({
|
|
4188
4188
|
value: t,
|
|
4189
4189
|
onChange: r,
|
|
@@ -4206,17 +4206,17 @@ const J1 = (t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), a0 = (t, r) => {
|
|
|
4206
4206
|
if (t == null || t === "") return "";
|
|
4207
4207
|
const H = String(t), g = o && n ? p0(H, s) : H;
|
|
4208
4208
|
return a0(g, v);
|
|
4209
|
-
}), b =
|
|
4209
|
+
}), b = f2(null), U = (H) => {
|
|
4210
4210
|
b.current = H, typeof _ == "function" ? _(H) : _ && (_.current = H);
|
|
4211
4211
|
};
|
|
4212
|
-
return
|
|
4212
|
+
return F2(() => {
|
|
4213
4213
|
if (t === void 0) return;
|
|
4214
4214
|
const H = t === null || t === "" ? "" : String(t), g = o && n && H ? p0(H, s) : H;
|
|
4215
4215
|
F(a0(g, v));
|
|
4216
4216
|
}, [t, o, n, s, a, d]), /* @__PURE__ */ e(
|
|
4217
4217
|
m0,
|
|
4218
4218
|
{
|
|
4219
|
-
ref:
|
|
4219
|
+
ref: U,
|
|
4220
4220
|
...C,
|
|
4221
4221
|
value: f,
|
|
4222
4222
|
onChange: (H) => {
|
|
@@ -4226,12 +4226,12 @@ const J1 = (t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), a0 = (t, r) => {
|
|
|
4226
4226
|
if (k.length === 0) return y;
|
|
4227
4227
|
const x = k.join("").replace(/\D/g, "").slice(0, s);
|
|
4228
4228
|
return `${y}.${x}`;
|
|
4229
|
-
})(),
|
|
4230
|
-
F(
|
|
4231
|
-
const p =
|
|
4229
|
+
})(), E = a0(M, v);
|
|
4230
|
+
F(E);
|
|
4231
|
+
const p = E.length - S.length;
|
|
4232
4232
|
requestAnimationFrame(() => {
|
|
4233
4233
|
if (!b.current) return;
|
|
4234
|
-
const L = Math.max(0, Math.min(
|
|
4234
|
+
const L = Math.max(0, Math.min(E.length, B + p));
|
|
4235
4235
|
b.current.setSelectionRange(L, L);
|
|
4236
4236
|
}), r == null || r(M, H);
|
|
4237
4237
|
},
|
|
@@ -4251,7 +4251,7 @@ const J1 = (t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), a0 = (t, r) => {
|
|
|
4251
4251
|
k0.displayName = "AmountInputBase";
|
|
4252
4252
|
const Q1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
4253
4253
|
var d;
|
|
4254
|
-
const { field: n, fieldState: a } =
|
|
4254
|
+
const { field: n, fieldState: a } = T2({ control: t, name: r });
|
|
4255
4255
|
return /* @__PURE__ */ e(
|
|
4256
4256
|
k0,
|
|
4257
4257
|
{
|
|
@@ -4264,7 +4264,7 @@ const Q1 = ({ control: t, name: r, error: s, ...o }) => {
|
|
|
4264
4264
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
4265
4265
|
}
|
|
4266
4266
|
);
|
|
4267
|
-
}, ee =
|
|
4267
|
+
}, ee = o2.forwardRef(
|
|
4268
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 })
|
|
4269
4269
|
);
|
|
4270
4270
|
ee.displayName = "AmountInput";
|
|
@@ -4317,7 +4317,7 @@ const h0 = (t) => {
|
|
|
4317
4317
|
"path",
|
|
4318
4318
|
{
|
|
4319
4319
|
d: "M8 4h14l6 6v22a2 2 0 01-2 2H8a2 2 0 01-2-2V6a2 2 0 012-2z",
|
|
4320
|
-
fill:
|
|
4320
|
+
fill: I2(o, 0.1),
|
|
4321
4321
|
stroke: o,
|
|
4322
4322
|
strokeWidth: "1.3"
|
|
4323
4323
|
}
|
|
@@ -4392,7 +4392,7 @@ const h0 = (t) => {
|
|
|
4392
4392
|
onChange: f,
|
|
4393
4393
|
onRemove: F,
|
|
4394
4394
|
onPreview: b,
|
|
4395
|
-
showPreviewAction:
|
|
4395
|
+
showPreviewAction: U = !0,
|
|
4396
4396
|
previewActionText: m = "View",
|
|
4397
4397
|
previewButtonVariant: w = "pill",
|
|
4398
4398
|
showRemove: H = !0,
|
|
@@ -4401,100 +4401,100 @@ const h0 = (t) => {
|
|
|
4401
4401
|
maxSize: S,
|
|
4402
4402
|
maxFiles: Z,
|
|
4403
4403
|
fileTypesLabel: M,
|
|
4404
|
-
uploadText:
|
|
4404
|
+
uploadText: E = "Drag and drop your document here or",
|
|
4405
4405
|
browseText: p = "Browse",
|
|
4406
4406
|
hintText: L,
|
|
4407
4407
|
dropZoneIcon: k,
|
|
4408
4408
|
onUpload: y,
|
|
4409
4409
|
showPreview: x = !0,
|
|
4410
|
-
previewLayout:
|
|
4411
|
-
keepInputOnUpload:
|
|
4412
|
-
className:
|
|
4410
|
+
previewLayout: $ = "list",
|
|
4411
|
+
keepInputOnUpload: G = !0,
|
|
4412
|
+
className: Q = "",
|
|
4413
4413
|
style: W,
|
|
4414
|
-
dropzoneClassName:
|
|
4415
|
-
dropzoneStyle:
|
|
4416
|
-
accentColor:
|
|
4417
|
-
errorColor:
|
|
4418
|
-
borderColor:
|
|
4419
|
-
dropzoneBgColor:
|
|
4414
|
+
dropzoneClassName: q = "",
|
|
4415
|
+
dropzoneStyle: P,
|
|
4416
|
+
accentColor: I = "#EC615B",
|
|
4417
|
+
errorColor: K = "#C21919",
|
|
4418
|
+
borderColor: s2 = "#D9D9D9",
|
|
4419
|
+
dropzoneBgColor: C2 = "#FFFFFF",
|
|
4420
4420
|
id: e2
|
|
4421
|
-
} = t,
|
|
4422
|
-
|
|
4423
|
-
},
|
|
4424
|
-
if (
|
|
4425
|
-
const
|
|
4426
|
-
return
|
|
4427
|
-
}),
|
|
4428
|
-
const
|
|
4429
|
-
f == null || f(
|
|
4421
|
+
} = t, d2 = o2.useId(), h2 = e2 ?? d2, N = f2(null), r2 = v !== void 0, [n2, p2] = O(u ?? []), X = r2 ? v : n2, [g2, V2] = O(!1), [R, D] = O(""), u2 = !!C || !!R, v2 = a === void 0 ? /* @__PURE__ */ e("span", { style: { color: K }, children: "*" }) : a, b2 = L ?? (M ? `Supported file types: ${M}${S ? `. Max file size, ${h0(S)}` : ""}` : null), j = (T) => {
|
|
4422
|
+
r2 || p2(T), f == null || f(T);
|
|
4423
|
+
}, Y = (T, w2) => {
|
|
4424
|
+
if (p2((_2) => {
|
|
4425
|
+
const E2 = _2.map((V) => V.id === T ? { ...V, ...w2 } : V);
|
|
4426
|
+
return r2 ? _2 : E2;
|
|
4427
|
+
}), r2 && v) {
|
|
4428
|
+
const _2 = v.map((E2) => E2.id === T ? { ...E2, ...w2 } : E2);
|
|
4429
|
+
f == null || f(_2);
|
|
4430
4430
|
}
|
|
4431
|
-
},
|
|
4431
|
+
}, a2 = (T) => {
|
|
4432
4432
|
if (S && T.size > S)
|
|
4433
4433
|
return `"${T.name}" exceeds max size of ${h0(S)}`;
|
|
4434
4434
|
if (g) {
|
|
4435
|
-
const
|
|
4436
|
-
if (!
|
|
4435
|
+
const w2 = g.split(",").map((V) => V.trim().toLowerCase()), _2 = "." + F0(T.name);
|
|
4436
|
+
if (!w2.some((V) => V.startsWith(".") ? V === _2 : V.endsWith("/*") ? T.type.startsWith(V.replace("/*", "/")) : T.type === V)) return `"${T.name}" is not an allowed file type`;
|
|
4437
4437
|
}
|
|
4438
4438
|
return null;
|
|
4439
|
-
},
|
|
4440
|
-
if (
|
|
4439
|
+
}, c2 = async (T) => {
|
|
4440
|
+
if (D(""), T.length === 0) return;
|
|
4441
4441
|
if (B || (T = T.slice(0, 1)), Z && X.length + T.length > Z) {
|
|
4442
|
-
|
|
4442
|
+
D(`Max ${Z} files allowed`);
|
|
4443
4443
|
return;
|
|
4444
4444
|
}
|
|
4445
|
-
const
|
|
4445
|
+
const w2 = [], _2 = [];
|
|
4446
4446
|
for (const V of T) {
|
|
4447
|
-
const t2 =
|
|
4447
|
+
const t2 = a2(V);
|
|
4448
4448
|
if (t2) {
|
|
4449
|
-
|
|
4449
|
+
w2.push(t2);
|
|
4450
4450
|
continue;
|
|
4451
4451
|
}
|
|
4452
|
-
const
|
|
4453
|
-
|
|
4452
|
+
const m2 = M0(V) ? URL.createObjectURL(V) : void 0;
|
|
4453
|
+
_2.push({
|
|
4454
4454
|
id: te(),
|
|
4455
4455
|
file: V,
|
|
4456
4456
|
name: V.name,
|
|
4457
4457
|
size: V.size,
|
|
4458
4458
|
type: V.type,
|
|
4459
|
-
thumbnailUrl:
|
|
4459
|
+
thumbnailUrl: m2,
|
|
4460
4460
|
status: y ? "uploading" : "done",
|
|
4461
4461
|
progress: y ? 0 : 100
|
|
4462
4462
|
});
|
|
4463
4463
|
}
|
|
4464
|
-
|
|
4465
|
-
let
|
|
4466
|
-
if (Z && (
|
|
4467
|
-
for (const V of
|
|
4464
|
+
w2.length > 0 && D(w2[0]);
|
|
4465
|
+
let E2 = B ? [...X, ..._2] : _2;
|
|
4466
|
+
if (Z && (E2 = E2.slice(0, Z)), j(E2), y)
|
|
4467
|
+
for (const V of _2)
|
|
4468
4468
|
try {
|
|
4469
4469
|
const t2 = await y(V.file, {
|
|
4470
|
-
onProgress: (
|
|
4470
|
+
onProgress: (m2) => Y(V.id, { progress: m2 })
|
|
4471
4471
|
});
|
|
4472
|
-
|
|
4472
|
+
Y(V.id, { status: "done", progress: 100, ...t2 ?? {} });
|
|
4473
4473
|
} catch (t2) {
|
|
4474
|
-
|
|
4474
|
+
Y(V.id, {
|
|
4475
4475
|
status: "error",
|
|
4476
4476
|
progress: 0,
|
|
4477
4477
|
error: (t2 == null ? void 0 : t2.message) ?? "Upload failed"
|
|
4478
4478
|
});
|
|
4479
4479
|
}
|
|
4480
|
-
},
|
|
4481
|
-
T.target.files && (
|
|
4482
|
-
},
|
|
4483
|
-
if (T.preventDefault(),
|
|
4484
|
-
const
|
|
4485
|
-
|
|
4486
|
-
},
|
|
4480
|
+
}, l2 = (T) => {
|
|
4481
|
+
T.target.files && (c2(Array.from(T.target.files)), !G && N.current && (N.current.value = ""));
|
|
4482
|
+
}, M2 = (T) => {
|
|
4483
|
+
if (T.preventDefault(), V2(!1), l) return;
|
|
4484
|
+
const w2 = T.dataTransfer;
|
|
4485
|
+
c2(Array.from(w2.files));
|
|
4486
|
+
}, H2 = (T) => {
|
|
4487
4487
|
T.thumbnailUrl && URL.revokeObjectURL(T.thumbnailUrl);
|
|
4488
|
-
const
|
|
4489
|
-
j(
|
|
4488
|
+
const w2 = X.filter((_2) => _2.id !== T.id);
|
|
4489
|
+
j(w2), F == null || F(T);
|
|
4490
4490
|
};
|
|
4491
|
-
|
|
4491
|
+
F2(() => () => {
|
|
4492
4492
|
X.forEach((T) => {
|
|
4493
4493
|
T.thumbnailUrl && URL.revokeObjectURL(T.thumbnailUrl);
|
|
4494
4494
|
});
|
|
4495
4495
|
}, []);
|
|
4496
|
-
const
|
|
4497
|
-
return /* @__PURE__ */ i("div", { className: `w-full ${
|
|
4496
|
+
const L2 = X.some((T) => T.status === "uploading"), B2 = !!c || L2, D2 = l || B2, q2 = u2 ? K : g2 || B2 ? I : s2, A2 = g2 ? I2(I, 0.04) : B2 ? I2(I, 0.02) : C2, P2 = !B && X.length > 0 && x && $ === "list";
|
|
4497
|
+
return /* @__PURE__ */ i("div", { className: `w-full ${Q}`, style: W, children: [
|
|
4498
4498
|
/* @__PURE__ */ e("style", { children: `
|
|
4499
4499
|
@keyframes shekel-spin { to { transform: rotate(360deg); } }
|
|
4500
4500
|
.shekel-spin { animation: shekel-spin 0.8s linear infinite; transform-origin: center; }
|
|
@@ -4503,12 +4503,12 @@ const h0 = (t) => {
|
|
|
4503
4503
|
/* @__PURE__ */ i(
|
|
4504
4504
|
"label",
|
|
4505
4505
|
{
|
|
4506
|
-
htmlFor:
|
|
4506
|
+
htmlFor: h2,
|
|
4507
4507
|
className: `block text-sm font-medium ${s}`,
|
|
4508
|
-
style: { color:
|
|
4508
|
+
style: { color: u2 ? K : "#181918", ...o },
|
|
4509
4509
|
children: [
|
|
4510
4510
|
r,
|
|
4511
|
-
d &&
|
|
4511
|
+
d && v2
|
|
4512
4512
|
]
|
|
4513
4513
|
}
|
|
4514
4514
|
),
|
|
@@ -4519,55 +4519,55 @@ const h0 = (t) => {
|
|
|
4519
4519
|
{
|
|
4520
4520
|
onClick: () => {
|
|
4521
4521
|
var T;
|
|
4522
|
-
return !
|
|
4522
|
+
return !D2 && ((T = N.current) == null ? void 0 : T.click());
|
|
4523
4523
|
},
|
|
4524
4524
|
onDragOver: (T) => {
|
|
4525
|
-
T.preventDefault(),
|
|
4525
|
+
T.preventDefault(), D2 || V2(!0);
|
|
4526
4526
|
},
|
|
4527
|
-
onDragLeave: () =>
|
|
4528
|
-
onDrop:
|
|
4529
|
-
"aria-busy":
|
|
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 ${
|
|
4527
|
+
onDragLeave: () => V2(!1),
|
|
4528
|
+
onDrop: M2,
|
|
4529
|
+
"aria-busy": B2,
|
|
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 ${D2 ? "cursor-not-allowed" : "cursor-pointer"} ${l ? "opacity-60" : ""} ${q}`,
|
|
4531
4531
|
style: {
|
|
4532
|
-
border: `1.5px dashed ${
|
|
4533
|
-
backgroundColor:
|
|
4534
|
-
...
|
|
4532
|
+
border: `1.5px dashed ${q2}`,
|
|
4533
|
+
backgroundColor: A2,
|
|
4534
|
+
...P
|
|
4535
4535
|
},
|
|
4536
4536
|
children: [
|
|
4537
|
-
/* @__PURE__ */ e("div", { className: "shrink-0", children:
|
|
4537
|
+
/* @__PURE__ */ e("div", { className: "shrink-0", children: B2 ? /* @__PURE__ */ e(oe, { size: 40, color: I }) : k ?? /* @__PURE__ */ e(re, { color: g2 ? I : "#181918", size: 20 }) }),
|
|
4538
4538
|
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0 text-center", children: [
|
|
4539
|
-
|
|
4540
|
-
|
|
4539
|
+
B2 ? /* @__PURE__ */ e("div", { className: "text-[#181918] text-sm", style: { color: I }, children: h }) : /* @__PURE__ */ i("div", { className: "text-[#181918] text-sm", children: [
|
|
4540
|
+
E,
|
|
4541
4541
|
" ",
|
|
4542
4542
|
/* @__PURE__ */ e(
|
|
4543
4543
|
"button",
|
|
4544
4544
|
{
|
|
4545
4545
|
type: "button",
|
|
4546
4546
|
onClick: (T) => {
|
|
4547
|
-
var
|
|
4548
|
-
T.stopPropagation(),
|
|
4547
|
+
var w2;
|
|
4548
|
+
T.stopPropagation(), D2 || (w2 = N.current) == null || w2.click();
|
|
4549
4549
|
},
|
|
4550
4550
|
className: "underline font-medium",
|
|
4551
|
-
style: { color:
|
|
4552
|
-
disabled:
|
|
4551
|
+
style: { color: I },
|
|
4552
|
+
disabled: D2,
|
|
4553
4553
|
children: p
|
|
4554
4554
|
}
|
|
4555
4555
|
),
|
|
4556
4556
|
" ",
|
|
4557
4557
|
"to upload"
|
|
4558
4558
|
] }),
|
|
4559
|
-
|
|
4559
|
+
b2 && !B2 && /* @__PURE__ */ e("div", { className: "text-xs text-[#616161] mt-1", children: b2 })
|
|
4560
4560
|
] }),
|
|
4561
4561
|
/* @__PURE__ */ e(
|
|
4562
4562
|
"input",
|
|
4563
4563
|
{
|
|
4564
4564
|
ref: N,
|
|
4565
|
-
id:
|
|
4565
|
+
id: h2,
|
|
4566
4566
|
type: "file",
|
|
4567
4567
|
accept: g,
|
|
4568
4568
|
multiple: B,
|
|
4569
|
-
disabled:
|
|
4570
|
-
onChange:
|
|
4569
|
+
disabled: D2,
|
|
4570
|
+
onChange: l2,
|
|
4571
4571
|
className: "hidden"
|
|
4572
4572
|
}
|
|
4573
4573
|
)
|
|
@@ -4577,20 +4577,20 @@ const h0 = (t) => {
|
|
|
4577
4577
|
x && X.length > 0 && /* @__PURE__ */ e(
|
|
4578
4578
|
"div",
|
|
4579
4579
|
{
|
|
4580
|
-
className:
|
|
4580
|
+
className: $ === "grid" ? "grid grid-cols-2 md:grid-cols-3 gap-3 mt-3" : "flex flex-col gap-2 mt-3",
|
|
4581
4581
|
children: X.map(
|
|
4582
|
-
(T) =>
|
|
4582
|
+
(T) => $ === "grid" ? /* @__PURE__ */ e(
|
|
4583
4583
|
ne,
|
|
4584
4584
|
{
|
|
4585
4585
|
file: T,
|
|
4586
|
-
onRemove:
|
|
4586
|
+
onRemove: H2,
|
|
4587
4587
|
onPreview: b,
|
|
4588
|
-
showPreviewAction:
|
|
4588
|
+
showPreviewAction: U,
|
|
4589
4589
|
previewActionText: m,
|
|
4590
4590
|
previewButtonVariant: w,
|
|
4591
4591
|
showRemove: H,
|
|
4592
|
-
accentColor:
|
|
4593
|
-
errorColor:
|
|
4592
|
+
accentColor: I,
|
|
4593
|
+
errorColor: K,
|
|
4594
4594
|
disabled: l
|
|
4595
4595
|
},
|
|
4596
4596
|
T.id
|
|
@@ -4598,14 +4598,14 @@ const h0 = (t) => {
|
|
|
4598
4598
|
se,
|
|
4599
4599
|
{
|
|
4600
4600
|
file: T,
|
|
4601
|
-
onRemove:
|
|
4601
|
+
onRemove: H2,
|
|
4602
4602
|
onPreview: b,
|
|
4603
|
-
showPreviewAction:
|
|
4603
|
+
showPreviewAction: U,
|
|
4604
4604
|
previewActionText: m,
|
|
4605
4605
|
previewButtonVariant: w,
|
|
4606
4606
|
showRemove: H,
|
|
4607
|
-
accentColor:
|
|
4608
|
-
errorColor:
|
|
4607
|
+
accentColor: I,
|
|
4608
|
+
errorColor: K,
|
|
4609
4609
|
disabled: l
|
|
4610
4610
|
},
|
|
4611
4611
|
T.id
|
|
@@ -4613,11 +4613,11 @@ const h0 = (t) => {
|
|
|
4613
4613
|
)
|
|
4614
4614
|
}
|
|
4615
4615
|
),
|
|
4616
|
-
(C ||
|
|
4617
|
-
/* @__PURE__ */ e(J2, { color:
|
|
4618
|
-
C ||
|
|
4616
|
+
(C || R) && /* @__PURE__ */ i("div", { className: "flex items-center mt-2 text-xs gap-1", style: { color: K }, children: [
|
|
4617
|
+
/* @__PURE__ */ e(J2, { color: K, size: 14 }),
|
|
4618
|
+
C || R
|
|
4619
4619
|
] }),
|
|
4620
|
-
!C && !
|
|
4620
|
+
!C && !R && _ && /* @__PURE__ */ e("div", { className: "mt-1 text-xs text-gray-500", children: _ })
|
|
4621
4621
|
] });
|
|
4622
4622
|
}, X0 = (t) => {
|
|
4623
4623
|
const r = t.url ?? t.thumbnailUrl;
|
|
@@ -4773,7 +4773,7 @@ const h0 = (t) => {
|
|
|
4773
4773
|
] });
|
|
4774
4774
|
}, le = ({ control: t, name: r, error: s, ...o }) => {
|
|
4775
4775
|
var d;
|
|
4776
|
-
const { field: n, fieldState: a } =
|
|
4776
|
+
const { field: n, fieldState: a } = T2({ control: t, name: r });
|
|
4777
4777
|
return /* @__PURE__ */ e(
|
|
4778
4778
|
q0,
|
|
4779
4779
|
{
|
|
@@ -4786,14 +4786,14 @@ const h0 = (t) => {
|
|
|
4786
4786
|
error: s ?? ((d = a.error) == null ? void 0 : d.message)
|
|
4787
4787
|
}
|
|
4788
4788
|
);
|
|
4789
|
-
}, Ae = ({ control: t, name: r, ...s }) => t && r ? /* @__PURE__ */ e(le, { control: t, name: r, ...s }) : /* @__PURE__ */ e(q0, { name: r, ...s }), ie = ({ selected: t, disabled: r, accentColor: s, size: o = 24 }) => t ? /* @__PURE__ */ e(
|
|
4789
|
+
}, Ae = ({ control: t, name: r, ...s }) => t && r ? /* @__PURE__ */ e(le, { control: t, name: r, ...s }) : /* @__PURE__ */ e(q0, { name: r, ...s }), ie = ({ selected: t, disabled: r, accentColor: s, size: o = 24, borderWidth: n = 1.5, borderColor: a = "#D1D1D1" }) => t ? /* @__PURE__ */ e(
|
|
4790
4790
|
"span",
|
|
4791
4791
|
{
|
|
4792
4792
|
className: "shrink-0 inline-flex items-center justify-center rounded-full",
|
|
4793
4793
|
style: {
|
|
4794
4794
|
width: o,
|
|
4795
4795
|
height: o,
|
|
4796
|
-
border:
|
|
4796
|
+
border: `${n}px solid ${s}`
|
|
4797
4797
|
},
|
|
4798
4798
|
children: /* @__PURE__ */ e(
|
|
4799
4799
|
"span",
|
|
@@ -4814,7 +4814,7 @@ const h0 = (t) => {
|
|
|
4814
4814
|
style: {
|
|
4815
4815
|
width: o,
|
|
4816
4816
|
height: o,
|
|
4817
|
-
border:
|
|
4817
|
+
border: `${n}px solid ${r ? "#D9D9D9" : a}`,
|
|
4818
4818
|
backgroundColor: "transparent"
|
|
4819
4819
|
}
|
|
4820
4820
|
}
|
|
@@ -4837,7 +4837,7 @@ function J0({
|
|
|
4837
4837
|
columns: f,
|
|
4838
4838
|
gap: F = 16,
|
|
4839
4839
|
equalWidth: b = !0,
|
|
4840
|
-
cardHeight:
|
|
4840
|
+
cardHeight: U = 94,
|
|
4841
4841
|
iconSize: m = 20,
|
|
4842
4842
|
titleSize: w = 12,
|
|
4843
4843
|
descriptionSize: H = 12,
|
|
@@ -4846,73 +4846,89 @@ function J0({
|
|
|
4846
4846
|
style: S,
|
|
4847
4847
|
cardClassName: Z = "",
|
|
4848
4848
|
cardStyle: M,
|
|
4849
|
-
accentColor:
|
|
4849
|
+
accentColor: E = "#EC615B",
|
|
4850
4850
|
errorColor: p = "#C21919",
|
|
4851
4851
|
borderColor: L = "#EEEEEE",
|
|
4852
4852
|
selectedBorderColor: k,
|
|
4853
4853
|
selectedGlowColor: y,
|
|
4854
|
-
|
|
4855
|
-
|
|
4854
|
+
textColor: x = "#131413",
|
|
4855
|
+
descriptionColor: $ = "#8C8C8C",
|
|
4856
|
+
cardBgColor: G = "white",
|
|
4857
|
+
selectedCardBgColor: Q,
|
|
4858
|
+
radioBorderWidth: W = 1.5,
|
|
4859
|
+
radioBorderColor: q = "#D1D1D1",
|
|
4860
|
+
variant: P = "border",
|
|
4861
|
+
cardBorderWidth: I = 1.5,
|
|
4862
|
+
cardBorderRadius: K = 16,
|
|
4863
|
+
cardShadow: s2,
|
|
4864
|
+
selectedCardShadow: C2,
|
|
4865
|
+
titleWeight: e2 = 600,
|
|
4866
|
+
descriptionWeight: d2 = 400,
|
|
4867
|
+
titleLineHeight: h2 = 1.3,
|
|
4868
|
+
descriptionLineHeight: N = 1.3,
|
|
4869
|
+
name: r2,
|
|
4870
|
+
id: n2
|
|
4856
4871
|
}) {
|
|
4857
|
-
const
|
|
4858
|
-
v ||
|
|
4859
|
-
},
|
|
4872
|
+
const p2 = r !== void 0, [X, g2] = o2.useState(s), V2 = p2 ? r : X, R = o2.useId(), D = n2 ?? R, u2 = !!C, v2 = c === void 0 ? /* @__PURE__ */ e("span", { style: { color: p }, children: "*" }) : c, b2 = typeof F == "number" ? `${F}px` : F, j = k ?? E, Y = y ?? I2(E, 0.2), a2 = (l2) => {
|
|
4873
|
+
v || l2.disabled || (p2 || g2(l2.value), o == null || o(l2.value, l2));
|
|
4874
|
+
}, c2 = {
|
|
4860
4875
|
display: "grid",
|
|
4861
|
-
gap:
|
|
4876
|
+
gap: b2,
|
|
4862
4877
|
gridTemplateColumns: f ? `repeat(${f}, minmax(0, 1fr))` : u === "row" ? b ? "repeat(auto-fit, minmax(180px, 1fr))" : `repeat(${t.length}, auto)` : "1fr",
|
|
4863
4878
|
...S
|
|
4864
4879
|
};
|
|
4865
|
-
return /* @__PURE__ */ i("div", { className: "w-full", id:
|
|
4880
|
+
return /* @__PURE__ */ i("div", { className: "w-full", id: D, children: [
|
|
4866
4881
|
n && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
|
|
4867
4882
|
/* @__PURE__ */ i(
|
|
4868
4883
|
"span",
|
|
4869
4884
|
{
|
|
4870
4885
|
className: `block text-sm font-medium ${a}`,
|
|
4871
|
-
style: { color:
|
|
4886
|
+
style: { color: u2 ? p : "#181918", ...d },
|
|
4872
4887
|
children: [
|
|
4873
4888
|
n,
|
|
4874
|
-
h &&
|
|
4889
|
+
h && v2
|
|
4875
4890
|
]
|
|
4876
4891
|
}
|
|
4877
4892
|
),
|
|
4878
4893
|
l && /* @__PURE__ */ e("div", { className: "shrink-0", children: l })
|
|
4879
4894
|
] }),
|
|
4880
|
-
/* @__PURE__ */ e("div", { role: "radiogroup", "aria-labelledby": n ?
|
|
4881
|
-
const
|
|
4895
|
+
/* @__PURE__ */ e("div", { role: "radiogroup", "aria-labelledby": n ? D : void 0, className: B, style: c2, children: t.map((l2) => {
|
|
4896
|
+
const M2 = V2 === l2.value, H2 = !!v || !!l2.disabled;
|
|
4882
4897
|
return /* @__PURE__ */ i(
|
|
4883
4898
|
"div",
|
|
4884
4899
|
{
|
|
4885
4900
|
role: "radio",
|
|
4886
|
-
"aria-checked":
|
|
4887
|
-
"aria-disabled":
|
|
4888
|
-
tabIndex:
|
|
4889
|
-
onClick: () => a2(
|
|
4890
|
-
onKeyDown: (
|
|
4891
|
-
(
|
|
4901
|
+
"aria-checked": M2,
|
|
4902
|
+
"aria-disabled": H2,
|
|
4903
|
+
tabIndex: H2 ? -1 : 0,
|
|
4904
|
+
onClick: () => a2(l2),
|
|
4905
|
+
onKeyDown: (L2) => {
|
|
4906
|
+
(L2.key === "Enter" || L2.key === " ") && (L2.preventDefault(), a2(l2));
|
|
4892
4907
|
},
|
|
4893
|
-
className: `relative
|
|
4908
|
+
className: `relative transition-all duration-200 ${H2 ? "opacity-60 cursor-not-allowed" : "cursor-pointer"} ${Z}`,
|
|
4894
4909
|
style: {
|
|
4895
|
-
height: typeof
|
|
4910
|
+
height: typeof U == "number" ? `${U}px` : U,
|
|
4896
4911
|
padding: "14px 16px",
|
|
4897
|
-
borderRadius:
|
|
4898
|
-
|
|
4899
|
-
|
|
4912
|
+
borderRadius: K,
|
|
4913
|
+
backgroundColor: M2 && Q ? Q : G,
|
|
4914
|
+
border: P === "shadow" ? "none" : `${I}px solid ${M2 ? j : L}`,
|
|
4915
|
+
boxShadow: M2 ? C2 ?? (P === "border" ? `0 0 0 4px ${Y}` : `0 4px 16px ${Y}`) : s2 ?? (P === "shadow" || P === "both" ? "0 1px 4px rgba(0,0,0,0.08)" : "none"),
|
|
4900
4916
|
...M
|
|
4901
4917
|
},
|
|
4902
4918
|
children: [
|
|
4903
4919
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-3 h-full", children: [
|
|
4904
4920
|
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0 flex flex-col justify-center", children: [
|
|
4905
|
-
|
|
4921
|
+
l2.icon && /* @__PURE__ */ e(
|
|
4906
4922
|
"div",
|
|
4907
4923
|
{
|
|
4908
|
-
className: "shrink-0
|
|
4909
|
-
style: { height: m },
|
|
4924
|
+
className: "shrink-0 flex items-center",
|
|
4925
|
+
style: { color: x, height: m },
|
|
4910
4926
|
children: /* @__PURE__ */ e(
|
|
4911
4927
|
"span",
|
|
4912
4928
|
{
|
|
4913
4929
|
className: "inline-flex items-center justify-center",
|
|
4914
4930
|
style: { width: m, height: m },
|
|
4915
|
-
children:
|
|
4931
|
+
children: l2.icon
|
|
4916
4932
|
}
|
|
4917
4933
|
)
|
|
4918
4934
|
}
|
|
@@ -4920,34 +4936,36 @@ function J0({
|
|
|
4920
4936
|
/* @__PURE__ */ e(
|
|
4921
4937
|
"div",
|
|
4922
4938
|
{
|
|
4923
|
-
className: "
|
|
4924
|
-
style: { fontSize: w, marginTop:
|
|
4925
|
-
children:
|
|
4939
|
+
className: "truncate",
|
|
4940
|
+
style: { color: x, fontSize: w, fontWeight: e2, marginTop: l2.icon ? 6 : 0, lineHeight: h2 },
|
|
4941
|
+
children: l2.label
|
|
4926
4942
|
}
|
|
4927
4943
|
),
|
|
4928
|
-
|
|
4944
|
+
l2.description && /* @__PURE__ */ e(
|
|
4929
4945
|
"div",
|
|
4930
4946
|
{
|
|
4931
|
-
className: "
|
|
4932
|
-
style: { fontSize: H, marginTop: 2, lineHeight:
|
|
4933
|
-
children:
|
|
4947
|
+
className: "truncate",
|
|
4948
|
+
style: { color: $, fontSize: H, fontWeight: d2, marginTop: 2, lineHeight: N },
|
|
4949
|
+
children: l2.description
|
|
4934
4950
|
}
|
|
4935
4951
|
)
|
|
4936
4952
|
] }),
|
|
4937
4953
|
/* @__PURE__ */ e("div", { className: "shrink-0 flex items-center", children: /* @__PURE__ */ e(
|
|
4938
4954
|
ie,
|
|
4939
4955
|
{
|
|
4940
|
-
selected:
|
|
4941
|
-
disabled:
|
|
4942
|
-
accentColor:
|
|
4943
|
-
size: g
|
|
4956
|
+
selected: M2,
|
|
4957
|
+
disabled: H2,
|
|
4958
|
+
accentColor: E,
|
|
4959
|
+
size: g,
|
|
4960
|
+
borderWidth: W,
|
|
4961
|
+
borderColor: q
|
|
4944
4962
|
}
|
|
4945
4963
|
) })
|
|
4946
4964
|
] }),
|
|
4947
|
-
|
|
4965
|
+
r2 && /* @__PURE__ */ e("input", { type: "hidden", name: r2, value: M2 ? String(l2.value) : "", readOnly: !0 })
|
|
4948
4966
|
]
|
|
4949
4967
|
},
|
|
4950
|
-
|
|
4968
|
+
l2.value
|
|
4951
4969
|
);
|
|
4952
4970
|
}) }),
|
|
4953
4971
|
C && /* @__PURE__ */ i("div", { className: "flex items-center mt-2 text-xs gap-1", style: { color: p }, children: [
|
|
@@ -4964,7 +4982,7 @@ function ae({
|
|
|
4964
4982
|
...o
|
|
4965
4983
|
}) {
|
|
4966
4984
|
var d;
|
|
4967
|
-
const { field: n, fieldState: a } =
|
|
4985
|
+
const { field: n, fieldState: a } = T2({ control: t, name: r });
|
|
4968
4986
|
return /* @__PURE__ */ e(
|
|
4969
4987
|
J0,
|
|
4970
4988
|
{
|
|
@@ -4990,7 +5008,7 @@ const ce = {
|
|
|
4990
5008
|
sm: { trackWidth: 28, trackHeight: 16, knobSize: 12 },
|
|
4991
5009
|
md: { trackWidth: 36, trackHeight: 20, knobSize: 16 },
|
|
4992
5010
|
lg: { trackWidth: 48, trackHeight: 26, knobSize: 22 }
|
|
4993
|
-
}, L0 =
|
|
5011
|
+
}, L0 = o2.forwardRef(
|
|
4994
5012
|
(t, r) => {
|
|
4995
5013
|
const {
|
|
4996
5014
|
checked: s,
|
|
@@ -5008,7 +5026,7 @@ const ce = {
|
|
|
5008
5026
|
knobSize: f,
|
|
5009
5027
|
onColor: F = "#EC615B",
|
|
5010
5028
|
offColor: b = "#8C9196",
|
|
5011
|
-
knobColor:
|
|
5029
|
+
knobColor: U = "#FFFFFF",
|
|
5012
5030
|
loadingColor: m,
|
|
5013
5031
|
checkedIcon: w,
|
|
5014
5032
|
uncheckedIcon: H,
|
|
@@ -5017,32 +5035,32 @@ const ce = {
|
|
|
5017
5035
|
className: S = "",
|
|
5018
5036
|
style: Z,
|
|
5019
5037
|
autoFocus: M,
|
|
5020
|
-
tabIndex:
|
|
5021
|
-
} = t, p = s !== void 0, [L, k] =
|
|
5038
|
+
tabIndex: E
|
|
5039
|
+
} = t, p = s !== void 0, [L, k] = o2.useState(o ?? !1), y = p ? !!s : L, x = o2.useId(), $ = B ?? x, { trackWidth: G, trackHeight: Q, knobSize: W } = ce[_], q = v ?? G, P = u ?? Q, I = f ?? W, K = (P - I) / 2, s2 = y ? q - I - K : K, C2 = (N) => {
|
|
5022
5040
|
if (h || C) return;
|
|
5023
|
-
const
|
|
5024
|
-
p || k(
|
|
5041
|
+
const r2 = !y;
|
|
5042
|
+
p || k(r2), n == null || n(r2, N);
|
|
5025
5043
|
}, e2 = (N) => {
|
|
5026
|
-
(N.key === " " || N.key === "Enter" || N.key === "ArrowRight" && !y || N.key === "ArrowLeft" && y) && (N.preventDefault(),
|
|
5027
|
-
},
|
|
5044
|
+
(N.key === " " || N.key === "Enter" || N.key === "ArrowRight" && !y || N.key === "ArrowLeft" && y) && (N.preventDefault(), C2(N));
|
|
5045
|
+
}, d2 = y ? F : b, h2 = /* @__PURE__ */ i(
|
|
5028
5046
|
"button",
|
|
5029
5047
|
{
|
|
5030
5048
|
ref: r,
|
|
5031
|
-
id:
|
|
5049
|
+
id: $,
|
|
5032
5050
|
type: "button",
|
|
5033
5051
|
role: "switch",
|
|
5034
5052
|
"aria-checked": y,
|
|
5035
5053
|
"aria-disabled": h || C,
|
|
5036
5054
|
disabled: h || C,
|
|
5037
5055
|
autoFocus: M,
|
|
5038
|
-
tabIndex:
|
|
5039
|
-
onClick:
|
|
5056
|
+
tabIndex: E,
|
|
5057
|
+
onClick: C2,
|
|
5040
5058
|
onKeyDown: e2,
|
|
5041
5059
|
className: `relative inline-flex items-center shrink-0 rounded-full transition-colors duration-200 ${h || C ? "opacity-60 cursor-not-allowed" : "cursor-pointer"} ${S}`,
|
|
5042
5060
|
style: {
|
|
5043
|
-
width:
|
|
5044
|
-
height:
|
|
5045
|
-
backgroundColor: C ? m ??
|
|
5061
|
+
width: q,
|
|
5062
|
+
height: P,
|
|
5063
|
+
backgroundColor: C ? m ?? d2 : d2,
|
|
5046
5064
|
...Z
|
|
5047
5065
|
},
|
|
5048
5066
|
children: [
|
|
@@ -5052,35 +5070,35 @@ const ce = {
|
|
|
5052
5070
|
"aria-hidden": !0,
|
|
5053
5071
|
className: "absolute top-1/2 rounded-full flex items-center justify-center transition-all duration-200",
|
|
5054
5072
|
style: {
|
|
5055
|
-
left:
|
|
5073
|
+
left: s2,
|
|
5056
5074
|
transform: "translateY(-50%)",
|
|
5057
|
-
width:
|
|
5058
|
-
height:
|
|
5059
|
-
backgroundColor:
|
|
5075
|
+
width: I,
|
|
5076
|
+
height: I,
|
|
5077
|
+
backgroundColor: U,
|
|
5060
5078
|
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.15)"
|
|
5061
5079
|
},
|
|
5062
5080
|
children: C ? /* @__PURE__ */ i(
|
|
5063
5081
|
"svg",
|
|
5064
5082
|
{
|
|
5065
|
-
width:
|
|
5066
|
-
height:
|
|
5083
|
+
width: I * 0.6,
|
|
5084
|
+
height: I * 0.6,
|
|
5067
5085
|
viewBox: "0 0 24 24",
|
|
5068
5086
|
fill: "none",
|
|
5069
5087
|
className: "shekel-toggle-spin",
|
|
5070
|
-
style: { color:
|
|
5088
|
+
style: { color: d2 },
|
|
5071
5089
|
children: [
|
|
5072
5090
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeOpacity: "0.25", strokeWidth: "2.5" }),
|
|
5073
5091
|
/* @__PURE__ */ e("path", { d: "M12 3a9 9 0 019 9", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" })
|
|
5074
5092
|
]
|
|
5075
5093
|
}
|
|
5076
|
-
) : y && w ? /* @__PURE__ */ e("span", { style: { color:
|
|
5094
|
+
) : y && w ? /* @__PURE__ */ e("span", { style: { color: d2, fontSize: I * 0.5, lineHeight: 1 }, children: w }) : !y && H ? /* @__PURE__ */ e("span", { style: { color: d2, fontSize: I * 0.5, lineHeight: 1 }, children: H }) : null
|
|
5077
5095
|
}
|
|
5078
5096
|
),
|
|
5079
5097
|
g && /* @__PURE__ */ e("input", { type: "hidden", name: g, value: y ? "true" : "false" })
|
|
5080
5098
|
]
|
|
5081
5099
|
}
|
|
5082
5100
|
);
|
|
5083
|
-
return a ? /* @__PURE__ */ i(
|
|
5101
|
+
return a ? /* @__PURE__ */ i(Z2, { children: [
|
|
5084
5102
|
/* @__PURE__ */ e("style", { children: `
|
|
5085
5103
|
@keyframes shekel-toggle-spin { to { transform: rotate(360deg); } }
|
|
5086
5104
|
.shekel-toggle-spin { animation: shekel-toggle-spin 0.8s linear infinite; transform-origin: center; }
|
|
@@ -5088,22 +5106,22 @@ const ce = {
|
|
|
5088
5106
|
/* @__PURE__ */ i(
|
|
5089
5107
|
"label",
|
|
5090
5108
|
{
|
|
5091
|
-
htmlFor:
|
|
5109
|
+
htmlFor: $,
|
|
5092
5110
|
className: `inline-flex items-center gap-3 ${h || C ? "cursor-not-allowed" : "cursor-pointer"} ${d}`,
|
|
5093
5111
|
style: l,
|
|
5094
5112
|
children: [
|
|
5095
5113
|
c === "left" && /* @__PURE__ */ e("span", { className: "text-base text-[#181918] select-none", children: a }),
|
|
5096
|
-
|
|
5114
|
+
h2,
|
|
5097
5115
|
c === "right" && /* @__PURE__ */ e("span", { className: "text-base text-[#181918] select-none", children: a })
|
|
5098
5116
|
]
|
|
5099
5117
|
}
|
|
5100
5118
|
)
|
|
5101
|
-
] }) :
|
|
5119
|
+
] }) : h2;
|
|
5102
5120
|
}
|
|
5103
5121
|
);
|
|
5104
5122
|
L0.displayName = "ToggleBase";
|
|
5105
5123
|
const de = ({ control: t, name: r, ...s }) => {
|
|
5106
|
-
const { field: o } =
|
|
5124
|
+
const { field: o } = T2({ control: t, name: r });
|
|
5107
5125
|
return /* @__PURE__ */ e(
|
|
5108
5126
|
L0,
|
|
5109
5127
|
{
|
|
@@ -5116,7 +5134,7 @@ const de = ({ control: t, name: r, ...s }) => {
|
|
|
5116
5134
|
}
|
|
5117
5135
|
}
|
|
5118
5136
|
);
|
|
5119
|
-
}, pe =
|
|
5137
|
+
}, pe = o2.forwardRef(
|
|
5120
5138
|
({ control: t, name: r, ...s }, o) => t && r ? /* @__PURE__ */ e(de, { control: t, name: r, ...s }) : /* @__PURE__ */ e(L0, { ref: o, name: r, ...s })
|
|
5121
5139
|
);
|
|
5122
5140
|
pe.displayName = "Toggle";
|
|
@@ -5337,8 +5355,8 @@ const ue = {
|
|
|
5337
5355
|
bgColor: l = "#EEEEEE",
|
|
5338
5356
|
hoverBgColor: c = "#E5E5E5"
|
|
5339
5357
|
}) => {
|
|
5340
|
-
const [h, C] = O(!1), _ =
|
|
5341
|
-
|
|
5358
|
+
const [h, C] = O(!1), _ = f2(null);
|
|
5359
|
+
F2(() => {
|
|
5342
5360
|
const u = (f) => {
|
|
5343
5361
|
_.current && !_.current.contains(f.target) && C(!1);
|
|
5344
5362
|
};
|
|
@@ -5518,22 +5536,22 @@ const ue = {
|
|
|
5518
5536
|
copyIconColor: f,
|
|
5519
5537
|
bottomTextColor: F,
|
|
5520
5538
|
valueFontSize: b = 32,
|
|
5521
|
-
backgroundPattern:
|
|
5539
|
+
backgroundPattern: U = "wave",
|
|
5522
5540
|
backgroundImage: m,
|
|
5523
5541
|
topRight: w,
|
|
5524
5542
|
width: H = 348,
|
|
5525
5543
|
className: g = ""
|
|
5526
5544
|
}) => {
|
|
5527
|
-
const [B, S] = O(!0), [Z, M] = O(!1),
|
|
5545
|
+
const [B, S] = O(!0), [Z, M] = O(!1), E = () => {
|
|
5528
5546
|
S(!B), n && n();
|
|
5529
5547
|
}, 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
|
|
5531
|
-
const
|
|
5532
|
-
if (
|
|
5548
|
+
var G;
|
|
5549
|
+
const $ = v ?? (p !== void 0 ? String(p) : "");
|
|
5550
|
+
if ($)
|
|
5533
5551
|
try {
|
|
5534
|
-
typeof navigator < "u" && ((
|
|
5552
|
+
typeof navigator < "u" && ((G = navigator.clipboard) != null && G.writeText) && await navigator.clipboard.writeText($), M(!0), setTimeout(() => M(!1), 1500), u == null || u($);
|
|
5535
5553
|
} catch {
|
|
5536
|
-
u == null || u(
|
|
5554
|
+
u == null || u($);
|
|
5537
5555
|
}
|
|
5538
5556
|
}, x = /* @__PURE__ */ i("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
|
|
5539
5557
|
/* @__PURE__ */ e("rect", { x: "3", y: "6", width: "18", height: "12", rx: "2", stroke: "currentColor", strokeWidth: "2" }),
|
|
@@ -5550,14 +5568,14 @@ const ue = {
|
|
|
5550
5568
|
boxShadow: "0 0 0 0 rgba(0, 0, 0, 0)",
|
|
5551
5569
|
transition: "all 0.3s ease-in-out"
|
|
5552
5570
|
},
|
|
5553
|
-
onMouseEnter: (
|
|
5554
|
-
|
|
5571
|
+
onMouseEnter: ($) => {
|
|
5572
|
+
$.currentTarget.style.boxShadow = "0 0 24px 0 rgba(0, 0, 0, 0.15)";
|
|
5555
5573
|
},
|
|
5556
|
-
onMouseLeave: (
|
|
5557
|
-
|
|
5574
|
+
onMouseLeave: ($) => {
|
|
5575
|
+
$.currentTarget.style.boxShadow = "0 0 0 0 rgba(0, 0, 0, 0)";
|
|
5558
5576
|
},
|
|
5559
5577
|
children: [
|
|
5560
|
-
|
|
5578
|
+
U !== "none" && /* @__PURE__ */ e(
|
|
5561
5579
|
"div",
|
|
5562
5580
|
{
|
|
5563
5581
|
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",
|
|
@@ -5580,7 +5598,7 @@ const ue = {
|
|
|
5580
5598
|
"button",
|
|
5581
5599
|
{
|
|
5582
5600
|
className: "bg-transparent border-none cursor-pointer p-1 flex items-center justify-center text-white hover:text-white/80 transition-colors duration-200",
|
|
5583
|
-
onClick:
|
|
5601
|
+
onClick: E,
|
|
5584
5602
|
"aria-label": B ? "Hide value" : "Show value",
|
|
5585
5603
|
children: B ? /* @__PURE__ */ i(
|
|
5586
5604
|
"svg",
|
|
@@ -5803,14 +5821,14 @@ const ue = {
|
|
|
5803
5821
|
animated: h = !0
|
|
5804
5822
|
}) => {
|
|
5805
5823
|
var Z;
|
|
5806
|
-
const C = (Z = t[0]) == null ? void 0 : Z.key, [_, v] = O(r ?? C ?? ""), u = s ?? _, f =
|
|
5824
|
+
const C = (Z = t[0]) == null ? void 0 : Z.key, [_, v] = O(r ?? C ?? ""), u = s ?? _, f = f2(u), F = f2(null), b = f2({}), [U, m] = O({
|
|
5807
5825
|
left: 0,
|
|
5808
5826
|
width: 0,
|
|
5809
5827
|
ready: !1
|
|
5810
5828
|
}), [w, H] = O(null), g = () => {
|
|
5811
|
-
const M = b.current[u],
|
|
5812
|
-
if (!M ||
|
|
5813
|
-
const p =
|
|
5829
|
+
const M = b.current[u], E = F.current;
|
|
5830
|
+
if (!M || !E) return;
|
|
5831
|
+
const p = E.getBoundingClientRect(), L = M.getBoundingClientRect();
|
|
5814
5832
|
m({
|
|
5815
5833
|
left: L.left - p.left,
|
|
5816
5834
|
width: L.width,
|
|
@@ -5819,17 +5837,17 @@ const ue = {
|
|
|
5819
5837
|
};
|
|
5820
5838
|
Q0(() => {
|
|
5821
5839
|
g();
|
|
5822
|
-
}, [u, t.length]),
|
|
5840
|
+
}, [u, t.length]), F2(() => {
|
|
5823
5841
|
const M = () => g();
|
|
5824
5842
|
return window.addEventListener("resize", M), () => window.removeEventListener("resize", M);
|
|
5825
|
-
}, [u]),
|
|
5843
|
+
}, [u]), F2(() => {
|
|
5826
5844
|
const M = f.current;
|
|
5827
5845
|
if (M === u) return;
|
|
5828
|
-
const
|
|
5829
|
-
H(p >
|
|
5846
|
+
const E = t.findIndex((L) => L.key === M), p = t.findIndex((L) => L.key === u);
|
|
5847
|
+
H(p > E ? "right" : "left"), f.current = u;
|
|
5830
5848
|
}, [u]);
|
|
5831
|
-
const B = (M,
|
|
5832
|
-
|
|
5849
|
+
const B = (M, E) => {
|
|
5850
|
+
E || (s === void 0 && v(M), o == null || o(M));
|
|
5833
5851
|
}, S = t.find((M) => M.key === u);
|
|
5834
5852
|
return /* @__PURE__ */ i("div", { className: n, children: [
|
|
5835
5853
|
/* @__PURE__ */ e("style", { children: `
|
|
@@ -5853,7 +5871,7 @@ const ue = {
|
|
|
5853
5871
|
style: { borderBottom: `1px solid ${c}` },
|
|
5854
5872
|
children: [
|
|
5855
5873
|
t.map((M) => {
|
|
5856
|
-
const
|
|
5874
|
+
const E = M.key === u;
|
|
5857
5875
|
return /* @__PURE__ */ e(
|
|
5858
5876
|
"button",
|
|
5859
5877
|
{
|
|
@@ -5862,20 +5880,20 @@ const ue = {
|
|
|
5862
5880
|
},
|
|
5863
5881
|
type: "button",
|
|
5864
5882
|
role: "tab",
|
|
5865
|
-
"aria-selected":
|
|
5883
|
+
"aria-selected": E,
|
|
5866
5884
|
disabled: M.disabled,
|
|
5867
5885
|
onClick: () => B(M.key, M.disabled),
|
|
5868
5886
|
className: "shrink-0 whitespace-nowrap relative text-sm font-medium transition-colors duration-200 bg-transparent outline-none",
|
|
5869
5887
|
style: {
|
|
5870
5888
|
padding: "10px 0",
|
|
5871
|
-
color: M.disabled ? "#BFBFBF" :
|
|
5889
|
+
color: M.disabled ? "#BFBFBF" : E ? l : "#181918",
|
|
5872
5890
|
cursor: M.disabled ? "not-allowed" : "pointer"
|
|
5873
5891
|
},
|
|
5874
5892
|
onMouseEnter: (p) => {
|
|
5875
|
-
!M.disabled &&
|
|
5893
|
+
!M.disabled && !E && (p.currentTarget.style.color = l);
|
|
5876
5894
|
},
|
|
5877
5895
|
onMouseLeave: (p) => {
|
|
5878
|
-
!M.disabled &&
|
|
5896
|
+
!M.disabled && !E && (p.currentTarget.style.color = "#181918");
|
|
5879
5897
|
},
|
|
5880
5898
|
children: M.label
|
|
5881
5899
|
},
|
|
@@ -5889,13 +5907,13 @@ const ue = {
|
|
|
5889
5907
|
className: "absolute bottom-0",
|
|
5890
5908
|
style: {
|
|
5891
5909
|
left: 0,
|
|
5892
|
-
transform: `translateX(${
|
|
5893
|
-
width:
|
|
5910
|
+
transform: `translateX(${U.left}px)`,
|
|
5911
|
+
width: U.width,
|
|
5894
5912
|
height: 2,
|
|
5895
5913
|
backgroundColor: l,
|
|
5896
5914
|
borderRadius: 2,
|
|
5897
|
-
transition:
|
|
5898
|
-
opacity:
|
|
5915
|
+
transition: U.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",
|
|
5916
|
+
opacity: U.ready ? 1 : 0
|
|
5899
5917
|
}
|
|
5900
5918
|
}
|
|
5901
5919
|
)
|
|
@@ -5943,7 +5961,7 @@ export {
|
|
|
5943
5961
|
ee as AmountInput,
|
|
5944
5962
|
Ie as Badge,
|
|
5945
5963
|
d1 as Button,
|
|
5946
|
-
|
|
5964
|
+
Ee as Card,
|
|
5947
5965
|
Ze as Checkbox,
|
|
5948
5966
|
Ye as CountrySelector,
|
|
5949
5967
|
V1 as CurrencyInput,
|
|
@@ -5960,7 +5978,7 @@ export {
|
|
|
5960
5978
|
L1 as PhoneInput,
|
|
5961
5979
|
Ge as Progress,
|
|
5962
5980
|
We as RadioCardGroup,
|
|
5963
|
-
|
|
5981
|
+
$e as SearchInput,
|
|
5964
5982
|
u1 as Select,
|
|
5965
5983
|
O0 as SelectInput,
|
|
5966
5984
|
je as SelectedItemsList,
|