shekel-fe-shared-lib 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +25 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +785 -779
- package/dist/index.mjs.map +1 -1
- package/dist/shekel-fe-shared-lib.css +1 -1
- package/dist/types/components/StatCard/StatCard.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Button as E2, Card as U2, Input as q, Select as
|
|
1
|
+
import { jsxs as C, Fragment as t2, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Button as E2, Card as U2, Input as q, Select as b2, Avatar as X, Dropdown as B2, Tabs as G2, ConfigProvider as Z2 } from "antd";
|
|
3
3
|
import V, { useState as O, useRef as e2, useEffect as R } from "react";
|
|
4
4
|
import { UserOutlined as z2 } from "@ant-design/icons";
|
|
5
5
|
const V0 = ({
|
|
@@ -9,7 +9,7 @@ const V0 = ({
|
|
|
9
9
|
children: n,
|
|
10
10
|
...s
|
|
11
11
|
}) => {
|
|
12
|
-
const
|
|
12
|
+
const i = () => {
|
|
13
13
|
switch (r) {
|
|
14
14
|
case "xsmall":
|
|
15
15
|
return "32px";
|
|
@@ -23,7 +23,7 @@ const V0 = ({
|
|
|
23
23
|
return "52px";
|
|
24
24
|
}
|
|
25
25
|
}, l = () => {
|
|
26
|
-
const c =
|
|
26
|
+
const c = i();
|
|
27
27
|
switch (e) {
|
|
28
28
|
case "primary":
|
|
29
29
|
return {
|
|
@@ -60,14 +60,14 @@ const V0 = ({
|
|
|
60
60
|
default:
|
|
61
61
|
return {};
|
|
62
62
|
}
|
|
63
|
-
},
|
|
63
|
+
}, a = s.disabled && e === "primary" ? {
|
|
64
64
|
backgroundColor: "#F9CECC",
|
|
65
65
|
borderColor: "#F9CECC",
|
|
66
66
|
color: "#FFFFFF",
|
|
67
67
|
cursor: "not-allowed",
|
|
68
68
|
opacity: 1
|
|
69
69
|
} : {};
|
|
70
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ C(t2, { children: [
|
|
71
71
|
/* @__PURE__ */ t("style", { children: e === "primary" && `
|
|
72
72
|
.ant-btn-default:disabled,
|
|
73
73
|
.ant-btn-default:disabled:hover {
|
|
@@ -85,21 +85,21 @@ const V0 = ({
|
|
|
85
85
|
...s,
|
|
86
86
|
style: {
|
|
87
87
|
...l(),
|
|
88
|
-
...
|
|
88
|
+
...a,
|
|
89
89
|
userSelect: "none",
|
|
90
90
|
...s.style
|
|
91
91
|
},
|
|
92
92
|
onMouseEnter: (c) => {
|
|
93
|
-
var
|
|
94
|
-
s.disabled || (e === "primary" ? c.target.style.backgroundColor = "#D8524D" : e === "secondary" ? c.target.style.backgroundColor = "#4B5563" : e === "outline" ? c.target.style.backgroundColor = "#F3F4F6" : e === "ghost" && (c.target.style.backgroundColor = "#E1E4E6")), (
|
|
93
|
+
var m;
|
|
94
|
+
s.disabled || (e === "primary" ? c.target.style.backgroundColor = "#D8524D" : e === "secondary" ? c.target.style.backgroundColor = "#4B5563" : e === "outline" ? c.target.style.backgroundColor = "#F3F4F6" : e === "ghost" && (c.target.style.backgroundColor = "#E1E4E6")), (m = s.onMouseEnter) == null || m.call(s, c);
|
|
95
95
|
},
|
|
96
96
|
onMouseLeave: (c) => {
|
|
97
|
-
var
|
|
97
|
+
var m;
|
|
98
98
|
if (!s.disabled) {
|
|
99
|
-
const
|
|
100
|
-
c.target.style.backgroundColor =
|
|
99
|
+
const u = l();
|
|
100
|
+
c.target.style.backgroundColor = u.backgroundColor || "";
|
|
101
101
|
}
|
|
102
|
-
(
|
|
102
|
+
(m = s.onMouseLeave) == null || m.call(s, c);
|
|
103
103
|
},
|
|
104
104
|
children: n
|
|
105
105
|
}
|
|
@@ -111,17 +111,19 @@ const V0 = ({
|
|
|
111
111
|
icon: o,
|
|
112
112
|
iconBackgroundColor: n = "#E8F4FD",
|
|
113
113
|
iconColor: s = "#4A9FD8",
|
|
114
|
-
valuePrefix:
|
|
114
|
+
valuePrefix: i = "₦",
|
|
115
115
|
progressText: l,
|
|
116
|
-
badge:
|
|
117
|
-
width: c =
|
|
118
|
-
className:
|
|
119
|
-
selected:
|
|
120
|
-
onClick:
|
|
121
|
-
size:
|
|
122
|
-
rounded: L = "2xl"
|
|
116
|
+
badge: a,
|
|
117
|
+
width: c = 200,
|
|
118
|
+
className: m = "",
|
|
119
|
+
selected: u = !1,
|
|
120
|
+
onClick: x,
|
|
121
|
+
size: v = "md",
|
|
122
|
+
rounded: L = "2xl",
|
|
123
|
+
detailed: g = !1,
|
|
124
|
+
minHeight: w = 120
|
|
123
125
|
}) => {
|
|
124
|
-
const
|
|
126
|
+
const f = v === "sm" ? "p-3" : v === "lg" ? "p-6" : "p-4", y = {
|
|
125
127
|
none: "rounded-none",
|
|
126
128
|
sm: "rounded-sm",
|
|
127
129
|
md: "rounded-md",
|
|
@@ -129,29 +131,30 @@ const V0 = ({
|
|
|
129
131
|
xl: "rounded-xl",
|
|
130
132
|
"2xl": "rounded-2xl",
|
|
131
133
|
full: "rounded-full"
|
|
132
|
-
}[L] ?? "rounded-2xl",
|
|
134
|
+
}[L] ?? "rounded-2xl", h = /* @__PURE__ */ C("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
|
|
133
135
|
/* @__PURE__ */ t("rect", { x: "3", y: "6", width: "18", height: "12", rx: "2", stroke: "currentColor", strokeWidth: "2" }),
|
|
134
136
|
/* @__PURE__ */ t("path", { d: "M3 10h18M7 14h4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
135
|
-
] });
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
+
] }), k = g ? `bg-white justify-between hover:border-gray-300 ${u ? "border-[#EC615B]" : "border-[#E6E6E6]"}` : `bg-[#FDFDFD] hover:bg-[#F4F4F4] focus:bg-[#F4F4F4] hover:border-[#181918] focus:border-[#181918] ${u ? "bg-[#F4F4F4] border-[#181918]" : "border-[#EEEEEE]"}`, p = g ? "0 0 0 1px #EC615B" : "0 0 0 1px #181918";
|
|
138
|
+
return /* @__PURE__ */ t(
|
|
137
139
|
"div",
|
|
138
140
|
{
|
|
139
|
-
className: `
|
|
141
|
+
className: `border flex flex-col transition-all duration-300 ease-in-out hover:-translate-y-1 cursor-pointer ${k} ${f} ${y} ${m}`,
|
|
140
142
|
style: {
|
|
141
|
-
width: typeof c == "number" ? `${c}px` : c,
|
|
142
|
-
|
|
143
|
+
width: typeof c == "number" ? `${c}px` : c || "96px",
|
|
144
|
+
minHeight: typeof w == "number" ? `${w}px` : w,
|
|
145
|
+
boxShadow: u ? p : "0 0 0 0 rgba(0, 0, 0, 0)",
|
|
143
146
|
transition: "all 0.3s ease-in-out"
|
|
144
147
|
},
|
|
145
|
-
onClick:
|
|
146
|
-
onMouseEnter: (
|
|
147
|
-
|
|
148
|
+
onClick: x,
|
|
149
|
+
onMouseEnter: (d) => {
|
|
150
|
+
d.currentTarget.style.boxShadow = u ? p : "0 0 20px 0 rgba(0, 0, 0, 0.1)";
|
|
148
151
|
},
|
|
149
|
-
onMouseLeave: (
|
|
150
|
-
|
|
152
|
+
onMouseLeave: (d) => {
|
|
153
|
+
d.currentTarget.style.boxShadow = u ? p : "0 0 0 0 rgba(0, 0, 0, 0)";
|
|
151
154
|
},
|
|
152
|
-
children: [
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
+
children: g ? /* @__PURE__ */ C(t2, { children: [
|
|
156
|
+
/* @__PURE__ */ C("div", { children: [
|
|
157
|
+
/* @__PURE__ */ C("div", { className: "flex items-center justify-between mb-6", children: [
|
|
155
158
|
/* @__PURE__ */ t(
|
|
156
159
|
"div",
|
|
157
160
|
{
|
|
@@ -160,20 +163,23 @@ const V0 = ({
|
|
|
160
163
|
backgroundColor: n,
|
|
161
164
|
color: s
|
|
162
165
|
},
|
|
163
|
-
children: o ||
|
|
166
|
+
children: o || h
|
|
164
167
|
}
|
|
165
168
|
),
|
|
166
|
-
|
|
169
|
+
a && a
|
|
167
170
|
] }),
|
|
168
171
|
/* @__PURE__ */ t("div", { className: "text-sm text-[#181918] font-light transition-colors duration-200", children: e }),
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
|
|
172
|
+
/* @__PURE__ */ C("div", { className: "text-[20px] font-bold text-[#181918] transition-all duration-200", children: [
|
|
173
|
+
i,
|
|
171
174
|
" ",
|
|
172
175
|
r
|
|
173
176
|
] })
|
|
174
177
|
] }),
|
|
175
178
|
l && /* @__PURE__ */ t("div", { className: "text-xs text-gray-400 font-normal mt-4 transition-colors duration-200", children: l })
|
|
176
|
-
]
|
|
179
|
+
] }) : /* @__PURE__ */ C("div", { className: "mt-auto flex flex-col", children: [
|
|
180
|
+
/* @__PURE__ */ t("div", { className: "text-lg sm:text-xl text-[#181918] font-normal transition-colors duration-200 truncate", children: e }),
|
|
181
|
+
/* @__PURE__ */ t("div", { className: "text-2xl sm:text-3xl font-bold text-[#181918] transition-all duration-200 break-words leading-tight", children: i ? `${i} ${r}` : r })
|
|
182
|
+
] })
|
|
177
183
|
}
|
|
178
184
|
);
|
|
179
185
|
}, H0 = ({
|
|
@@ -182,45 +188,45 @@ const V0 = ({
|
|
|
182
188
|
size: o = "md",
|
|
183
189
|
fullWidth: n = !1,
|
|
184
190
|
className: s = "",
|
|
185
|
-
onIconClick:
|
|
191
|
+
onIconClick: i,
|
|
186
192
|
bgColor: l,
|
|
187
|
-
borderColor:
|
|
193
|
+
borderColor: a,
|
|
188
194
|
focusBorderColor: c,
|
|
189
|
-
iconColor:
|
|
190
|
-
textColor:
|
|
191
|
-
placeholderColor:
|
|
192
|
-
rounded:
|
|
195
|
+
iconColor: m,
|
|
196
|
+
textColor: u,
|
|
197
|
+
placeholderColor: x,
|
|
198
|
+
rounded: v = "md",
|
|
193
199
|
style: L,
|
|
194
|
-
...
|
|
200
|
+
...g
|
|
195
201
|
}) => {
|
|
196
202
|
process.env.NODE_ENV !== "production" && console.warn(
|
|
197
203
|
"[Shekel Shared Lib] SearchInput is deprecated as of v1.0.11. Please use the new Input component instead for better functionality and consistent styling."
|
|
198
204
|
);
|
|
199
|
-
const w = "relative inline-flex items-center",
|
|
205
|
+
const w = "relative inline-flex items-center", f = "border focus:outline-none focus:ring-1 transition-all duration-200 ease-in-out", b = {
|
|
200
206
|
sm: "px-3 py-1.5 text-sm",
|
|
201
207
|
md: "px-4 py-2 text-base",
|
|
202
208
|
lg: "px-5 py-3 text-lg",
|
|
203
209
|
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"
|
|
204
|
-
},
|
|
210
|
+
}, y = {
|
|
205
211
|
sm: "w-4 h-4",
|
|
206
212
|
md: "w-5 h-5",
|
|
207
213
|
lg: "w-6 h-6",
|
|
208
214
|
responsive: "w-4 sm:w-5 md:w-6 h-4 sm:h-5 md:h-6"
|
|
209
|
-
},
|
|
215
|
+
}, h = {
|
|
210
216
|
none: "rounded-none",
|
|
211
217
|
sm: "rounded-sm",
|
|
212
218
|
md: "rounded-lg",
|
|
213
219
|
lg: "rounded-xl",
|
|
214
220
|
full: "rounded-full"
|
|
215
|
-
}, k = r === "left" ? o === "sm" ? "pl-9" : o === "md" ? "pl-10" : o === "lg" ? "pl-12" : "pl-9 sm:pl-10 md:pl-12" : o === "sm" ? "pr-9" : o === "md" ? "pr-10" : o === "lg" ? "pr-12" : "pr-9 sm:pr-10 md:pr-12",
|
|
221
|
+
}, k = r === "left" ? o === "sm" ? "pl-9" : o === "md" ? "pl-10" : o === "lg" ? "pl-12" : "pl-9 sm:pl-10 md:pl-12" : o === "sm" ? "pr-9" : o === "md" ? "pr-10" : o === "lg" ? "pr-12" : "pr-9 sm:pr-10 md:pr-12", p = n ? "w-full" : "", d = {
|
|
216
222
|
backgroundColor: l,
|
|
217
|
-
borderColor:
|
|
218
|
-
color:
|
|
223
|
+
borderColor: a || "#D1D5DB",
|
|
224
|
+
color: u,
|
|
219
225
|
...L
|
|
220
|
-
}, _ =
|
|
226
|
+
}, _ = x ? "" : "placeholder:text-gray-400", B = a ? "" : "border-gray-300", H = u ? "" : "text-gray-900", Z = c ? "" : "focus:ring-[#EC615B] focus:border-[#EC615B]", S = `${f} ${!s.includes("px-") && !s.includes("py-") ? b[o] : ""} ${e ? k : ""} ${p} ${s.includes("rounded") ? "" : h[v]} ${s.includes("border-") ? "" : B} ${H} ${Z} ${_} ${s}`, U = r === "left" ? "left-3" : "right-3", E = m || "text-gray-400", M = m ? "" : "hover:text-gray-600", $ = /* @__PURE__ */ t(
|
|
221
227
|
"svg",
|
|
222
228
|
{
|
|
223
|
-
className: `${
|
|
229
|
+
className: `${y[o]} ${E}`,
|
|
224
230
|
xmlns: "http://www.w3.org/2000/svg",
|
|
225
231
|
fill: "none",
|
|
226
232
|
viewBox: "0 0 24 24",
|
|
@@ -236,30 +242,30 @@ const V0 = ({
|
|
|
236
242
|
)
|
|
237
243
|
}
|
|
238
244
|
);
|
|
239
|
-
return /* @__PURE__ */
|
|
245
|
+
return /* @__PURE__ */ C("div", { className: `${w} ${p}`, children: [
|
|
240
246
|
e && /* @__PURE__ */ t(
|
|
241
247
|
"div",
|
|
242
248
|
{
|
|
243
|
-
className: `absolute ${U} ${E} ${
|
|
244
|
-
onClick:
|
|
245
|
-
children: e === !0 ?
|
|
249
|
+
className: `absolute ${U} ${E} ${i ? "cursor-pointer" : ""} ${M}`,
|
|
250
|
+
onClick: i,
|
|
251
|
+
children: e === !0 ? $ : e
|
|
246
252
|
}
|
|
247
253
|
),
|
|
248
254
|
/* @__PURE__ */ t(
|
|
249
255
|
"input",
|
|
250
256
|
{
|
|
251
257
|
type: "text",
|
|
252
|
-
className:
|
|
258
|
+
className: S,
|
|
253
259
|
style: {
|
|
254
|
-
...
|
|
260
|
+
...d,
|
|
255
261
|
...c && {
|
|
256
262
|
"--focus-border-color": c
|
|
257
263
|
},
|
|
258
|
-
...
|
|
259
|
-
"--placeholder-color":
|
|
264
|
+
...x && {
|
|
265
|
+
"--placeholder-color": x
|
|
260
266
|
}
|
|
261
267
|
},
|
|
262
|
-
...
|
|
268
|
+
...g
|
|
263
269
|
}
|
|
264
270
|
)
|
|
265
271
|
] });
|
|
@@ -269,7 +275,7 @@ const V0 = ({
|
|
|
269
275
|
children: o,
|
|
270
276
|
...n
|
|
271
277
|
}) => {
|
|
272
|
-
const
|
|
278
|
+
const i = `${{
|
|
273
279
|
sm: "shadow-sm",
|
|
274
280
|
md: "shadow-md",
|
|
275
281
|
lg: "shadow-lg",
|
|
@@ -278,49 +284,49 @@ const V0 = ({
|
|
|
278
284
|
return /* @__PURE__ */ t(
|
|
279
285
|
U2,
|
|
280
286
|
{
|
|
281
|
-
className:
|
|
287
|
+
className: i,
|
|
282
288
|
...n,
|
|
283
289
|
children: o
|
|
284
290
|
}
|
|
285
291
|
);
|
|
286
|
-
},
|
|
292
|
+
}, $0 = ({
|
|
287
293
|
items: e,
|
|
288
294
|
trigger: r = "click",
|
|
289
295
|
placement: o = "bottomLeft",
|
|
290
296
|
children: n,
|
|
291
297
|
className: s = "",
|
|
292
|
-
overlayClassName:
|
|
298
|
+
overlayClassName: i = "",
|
|
293
299
|
disabled: l = !1,
|
|
294
|
-
size:
|
|
300
|
+
size: a = "md",
|
|
295
301
|
menuBgColor: c,
|
|
296
|
-
menuItemHoverColor:
|
|
297
|
-
dangerColor:
|
|
298
|
-
borderColor:
|
|
299
|
-
style:
|
|
302
|
+
menuItemHoverColor: m,
|
|
303
|
+
dangerColor: u,
|
|
304
|
+
borderColor: x,
|
|
305
|
+
style: v
|
|
300
306
|
}) => {
|
|
301
|
-
const [L,
|
|
307
|
+
const [L, g] = O(!1), w = e2(null);
|
|
302
308
|
R(() => {
|
|
303
309
|
const N = (G) => {
|
|
304
|
-
w.current && !w.current.contains(G.target) &&
|
|
310
|
+
w.current && !w.current.contains(G.target) && g(!1);
|
|
305
311
|
};
|
|
306
312
|
return L && document.addEventListener("mousedown", N), () => {
|
|
307
313
|
document.removeEventListener("mousedown", N);
|
|
308
314
|
};
|
|
309
315
|
}, [L]);
|
|
310
|
-
const
|
|
311
|
-
!l && r === "click" &&
|
|
312
|
-
},
|
|
313
|
-
!l && r === "hover" &&
|
|
314
|
-
},
|
|
315
|
-
!l && r === "hover" &&
|
|
316
|
-
},
|
|
317
|
-
!N.disabled && N.onClick && N.onClick(),
|
|
316
|
+
const f = () => {
|
|
317
|
+
!l && r === "click" && g(!L);
|
|
318
|
+
}, b = () => {
|
|
319
|
+
!l && r === "hover" && g(!0);
|
|
320
|
+
}, y = () => {
|
|
321
|
+
!l && r === "hover" && g(!1);
|
|
322
|
+
}, h = (N) => {
|
|
323
|
+
!N.disabled && N.onClick && N.onClick(), g(!1);
|
|
318
324
|
}, k = {
|
|
319
325
|
bottomLeft: "top-full left-0 mt-1",
|
|
320
326
|
bottomRight: "top-full right-0 mt-1",
|
|
321
327
|
topLeft: "bottom-full left-0 mb-1",
|
|
322
328
|
topRight: "bottom-full right-0 mb-1"
|
|
323
|
-
},
|
|
329
|
+
}, p = o.startsWith("bottom") ? "dropdown-slide-down" : "dropdown-slide-up", d = {
|
|
324
330
|
sm: "min-w-[120px] text-xs",
|
|
325
331
|
md: "min-w-[160px] text-sm",
|
|
326
332
|
lg: "min-w-[220px] text-base",
|
|
@@ -330,20 +336,20 @@ const V0 = ({
|
|
|
330
336
|
md: "px-4 py-2 text-sm gap-2",
|
|
331
337
|
lg: "px-5 py-3 text-base gap-2.5",
|
|
332
338
|
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"
|
|
333
|
-
}, B = "hover:bg-gray-50", H = "border-gray-200", Z = "text-red-600",
|
|
334
|
-
return /* @__PURE__ */
|
|
339
|
+
}, B = "hover:bg-gray-50", H = "border-gray-200", Z = "text-red-600", S = m ? { backgroundColor: m } : {}, U = m ? "" : B, E = u ? { color: u } : {}, M = u ? { backgroundColor: u + "15" } : {}, $ = x || H;
|
|
340
|
+
return /* @__PURE__ */ C(
|
|
335
341
|
"div",
|
|
336
342
|
{
|
|
337
343
|
ref: w,
|
|
338
344
|
className: `relative inline-block ${s}`,
|
|
339
|
-
onMouseEnter:
|
|
340
|
-
onMouseLeave:
|
|
341
|
-
style:
|
|
345
|
+
onMouseEnter: b,
|
|
346
|
+
onMouseLeave: y,
|
|
347
|
+
style: v,
|
|
342
348
|
children: [
|
|
343
349
|
/* @__PURE__ */ t(
|
|
344
350
|
"div",
|
|
345
351
|
{
|
|
346
|
-
onClick:
|
|
352
|
+
onClick: f,
|
|
347
353
|
className: `inline-flex ${l ? "cursor-not-allowed opacity-50" : "cursor-pointer"}`,
|
|
348
354
|
children: n
|
|
349
355
|
}
|
|
@@ -351,27 +357,27 @@ const V0 = ({
|
|
|
351
357
|
L && !l && /* @__PURE__ */ t(
|
|
352
358
|
"div",
|
|
353
359
|
{
|
|
354
|
-
className: `absolute ${k[o]} ${
|
|
360
|
+
className: `absolute ${k[o]} ${p} z-50 ${d[a]} ${i}`,
|
|
355
361
|
children: /* @__PURE__ */ t(
|
|
356
362
|
"div",
|
|
357
363
|
{
|
|
358
|
-
className: `dropdown-menu rounded-lg shadow-lg border py-1 overflow-hidden ${
|
|
364
|
+
className: `dropdown-menu rounded-lg shadow-lg border py-1 overflow-hidden ${$}`,
|
|
359
365
|
style: { backgroundColor: c || "#ffffff" },
|
|
360
366
|
children: e.map((N) => {
|
|
361
367
|
let G = {};
|
|
362
368
|
return N.disabled || (N.danger ? G = {
|
|
363
369
|
...E,
|
|
364
370
|
...M
|
|
365
|
-
} :
|
|
371
|
+
} : m && (G = S)), /* @__PURE__ */ C(
|
|
366
372
|
"div",
|
|
367
373
|
{
|
|
368
|
-
onClick: () =>
|
|
374
|
+
onClick: () => h(N),
|
|
369
375
|
className: `
|
|
370
376
|
dropdown-menu-item
|
|
371
377
|
flex items-center cursor-pointer transition-all duration-200 ease-out
|
|
372
|
-
${!
|
|
378
|
+
${!i.includes("px-") && !i.includes("py-") ? _[a] : ""}
|
|
373
379
|
${N.disabled ? "opacity-50 cursor-not-allowed" : U}
|
|
374
|
-
${N.danger ?
|
|
380
|
+
${N.danger ? u ? "" : Z : "text-gray-700"}
|
|
375
381
|
`,
|
|
376
382
|
style: G,
|
|
377
383
|
children: [
|
|
@@ -391,8 +397,8 @@ const V0 = ({
|
|
|
391
397
|
);
|
|
392
398
|
};
|
|
393
399
|
var O2 = (e) => e.type === "checkbox", K = (e) => e instanceof Date, l2 = (e) => e == null;
|
|
394
|
-
const
|
|
395
|
-
var I = (e) => !l2(e) && !Array.isArray(e) &&
|
|
400
|
+
const v2 = (e) => typeof e == "object";
|
|
401
|
+
var I = (e) => !l2(e) && !Array.isArray(e) && v2(e) && !K(e), D2 = (e) => I(e) && e.target ? O2(e.target) ? e.target.checked : e.target.value : e, P2 = (e, r) => r.split(".").some((o, n, s) => !isNaN(Number(o)) && e.has(s.slice(0, n).join("."))), R2 = (e) => {
|
|
396
402
|
const r = e.constructor && e.constructor.prototype;
|
|
397
403
|
return I(r) && r.hasOwnProperty("isPrototypeOf");
|
|
398
404
|
}, I2 = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
@@ -410,27 +416,27 @@ function w2(e) {
|
|
|
410
416
|
Object.prototype.hasOwnProperty.call(e, s) && (n[s] = w2(e[s]));
|
|
411
417
|
return n;
|
|
412
418
|
}
|
|
413
|
-
var k2 = (e) => /^\w*$/.test(e),
|
|
419
|
+
var k2 = (e) => /^\w*$/.test(e), a2 = (e) => e === void 0, A2 = (e) => Array.isArray(e) ? e.filter(Boolean) : [], _2 = (e) => A2(e.replace(/["|']|\]/g, "").split(/\.|\[/)), z = (e, r, o) => {
|
|
414
420
|
if (!r || !I(e))
|
|
415
421
|
return o;
|
|
416
|
-
const n = (k2(r) ? [r] : _2(r)).reduce((s,
|
|
417
|
-
return
|
|
418
|
-
},
|
|
422
|
+
const n = (k2(r) ? [r] : _2(r)).reduce((s, i) => l2(s) ? s : s[i], e);
|
|
423
|
+
return a2(n) || n === e ? a2(e[r]) ? o : e[r] : n;
|
|
424
|
+
}, n2 = (e) => typeof e == "boolean", J = (e) => typeof e == "function", m2 = (e, r, o) => {
|
|
419
425
|
let n = -1;
|
|
420
|
-
const s = k2(r) ? [r] : _2(r),
|
|
421
|
-
for (; ++n <
|
|
422
|
-
const
|
|
426
|
+
const s = k2(r) ? [r] : _2(r), i = s.length, l = i - 1;
|
|
427
|
+
for (; ++n < i; ) {
|
|
428
|
+
const a = s[n];
|
|
423
429
|
let c = o;
|
|
424
430
|
if (n !== l) {
|
|
425
|
-
const
|
|
426
|
-
c = I(
|
|
431
|
+
const m = e[a];
|
|
432
|
+
c = I(m) || Array.isArray(m) ? m : isNaN(+s[n + 1]) ? {} : [];
|
|
427
433
|
}
|
|
428
|
-
if (
|
|
434
|
+
if (a === "__proto__" || a === "constructor" || a === "prototype")
|
|
429
435
|
return;
|
|
430
|
-
e[
|
|
436
|
+
e[a] = c, e = e[a];
|
|
431
437
|
}
|
|
432
438
|
};
|
|
433
|
-
const
|
|
439
|
+
const h2 = {
|
|
434
440
|
BLUR: "blur",
|
|
435
441
|
CHANGE: "change"
|
|
436
442
|
}, g2 = {
|
|
@@ -442,10 +448,10 @@ var j2 = (e, r, o, n = !0) => {
|
|
|
442
448
|
const s = {
|
|
443
449
|
defaultValues: r._defaultValues
|
|
444
450
|
};
|
|
445
|
-
for (const
|
|
446
|
-
Object.defineProperty(s,
|
|
451
|
+
for (const i in e)
|
|
452
|
+
Object.defineProperty(s, i, {
|
|
447
453
|
get: () => {
|
|
448
|
-
const l =
|
|
454
|
+
const l = i;
|
|
449
455
|
return r._proxyFormState[l] !== g2.all && (r._proxyFormState[l] = !n || g2.all), o && (o[l] = !0), e[l];
|
|
450
456
|
}
|
|
451
457
|
});
|
|
@@ -453,7 +459,7 @@ var j2 = (e, r, o, n = !0) => {
|
|
|
453
459
|
};
|
|
454
460
|
const F2 = typeof window < "u" ? V.useLayoutEffect : V.useEffect;
|
|
455
461
|
function T2(e) {
|
|
456
|
-
const r = c2(), { control: o = r, disabled: n, name: s, exact:
|
|
462
|
+
const r = c2(), { control: o = r, disabled: n, name: s, exact: i } = e || {}, [l, a] = V.useState(o._formState), c = V.useRef({
|
|
457
463
|
isDirty: !1,
|
|
458
464
|
isLoading: !1,
|
|
459
465
|
dirtyFields: !1,
|
|
@@ -466,18 +472,18 @@ function T2(e) {
|
|
|
466
472
|
return F2(() => o._subscribe({
|
|
467
473
|
name: s,
|
|
468
474
|
formState: c.current,
|
|
469
|
-
exact:
|
|
470
|
-
callback: (
|
|
471
|
-
!n &&
|
|
475
|
+
exact: i,
|
|
476
|
+
callback: (m) => {
|
|
477
|
+
!n && a({
|
|
472
478
|
...o._formState,
|
|
473
|
-
...
|
|
479
|
+
...m
|
|
474
480
|
});
|
|
475
481
|
}
|
|
476
|
-
}), [s, n,
|
|
482
|
+
}), [s, n, i]), V.useEffect(() => {
|
|
477
483
|
c.current.isValid && o._setValid(!0);
|
|
478
484
|
}, [o]), V.useMemo(() => j2(l, o, c.current, !1), [l, o]);
|
|
479
485
|
}
|
|
480
|
-
var W2 = (e) => typeof e == "string", x2 = (e, r, o, n, s) => W2(e) ? z(o, e, s) : Array.isArray(e) ? e.map((
|
|
486
|
+
var W2 = (e) => typeof e == "string", x2 = (e, r, o, n, s) => W2(e) ? z(o, e, s) : Array.isArray(e) ? e.map((i) => z(o, i)) : o, y2 = (e) => l2(e) || !v2(e);
|
|
481
487
|
function Y(e, r, o = /* @__PURE__ */ new WeakSet()) {
|
|
482
488
|
if (y2(e) || y2(r))
|
|
483
489
|
return Object.is(e, r);
|
|
@@ -489,147 +495,147 @@ function Y(e, r, o = /* @__PURE__ */ new WeakSet()) {
|
|
|
489
495
|
if (o.has(e) || o.has(r))
|
|
490
496
|
return !0;
|
|
491
497
|
o.add(e), o.add(r);
|
|
492
|
-
for (const
|
|
493
|
-
const l = e[
|
|
494
|
-
if (!s.includes(
|
|
498
|
+
for (const i of n) {
|
|
499
|
+
const l = e[i];
|
|
500
|
+
if (!s.includes(i))
|
|
495
501
|
return !1;
|
|
496
|
-
if (
|
|
497
|
-
const
|
|
498
|
-
if (K(l) && K(
|
|
502
|
+
if (i !== "ref") {
|
|
503
|
+
const a = r[i];
|
|
504
|
+
if (K(l) && K(a) || (I(l) || Array.isArray(l)) && (I(a) || Array.isArray(a)) ? !Y(l, a, o) : !Object.is(l, a))
|
|
499
505
|
return !1;
|
|
500
506
|
}
|
|
501
507
|
}
|
|
502
508
|
return !0;
|
|
503
509
|
}
|
|
504
510
|
function K2(e) {
|
|
505
|
-
const r = c2(), { control: o = r, name: n, defaultValue: s, disabled:
|
|
506
|
-
|
|
507
|
-
const [L,
|
|
511
|
+
const r = c2(), { control: o = r, name: n, defaultValue: s, disabled: i, exact: l, compute: a } = e || {}, c = V.useRef(s), m = V.useRef(a), u = V.useRef(void 0), x = V.useRef(o), v = V.useRef(n);
|
|
512
|
+
m.current = a;
|
|
513
|
+
const [L, g] = V.useState(() => {
|
|
508
514
|
const k = o._getWatch(n, c.current);
|
|
509
|
-
return
|
|
515
|
+
return m.current ? m.current(k) : k;
|
|
510
516
|
}), w = V.useCallback((k) => {
|
|
511
|
-
const
|
|
512
|
-
return
|
|
513
|
-
}, [o._formValues, o._names, n]),
|
|
514
|
-
if (!
|
|
515
|
-
const
|
|
516
|
-
if (
|
|
517
|
-
const
|
|
518
|
-
Y(
|
|
517
|
+
const p = x2(n, o._names, k || o._formValues, !1, c.current);
|
|
518
|
+
return m.current ? m.current(p) : p;
|
|
519
|
+
}, [o._formValues, o._names, n]), f = V.useCallback((k) => {
|
|
520
|
+
if (!i) {
|
|
521
|
+
const p = x2(n, o._names, k || o._formValues, !1, c.current);
|
|
522
|
+
if (m.current) {
|
|
523
|
+
const d = m.current(p);
|
|
524
|
+
Y(d, u.current) || (g(d), u.current = d);
|
|
519
525
|
} else
|
|
520
|
-
|
|
526
|
+
g(p);
|
|
521
527
|
}
|
|
522
|
-
}, [o._formValues, o._names,
|
|
523
|
-
F2(() => ((
|
|
528
|
+
}, [o._formValues, o._names, i, n]);
|
|
529
|
+
F2(() => ((x.current !== o || !Y(v.current, n)) && (x.current = o, v.current = n, f()), o._subscribe({
|
|
524
530
|
name: n,
|
|
525
531
|
formState: {
|
|
526
532
|
values: !0
|
|
527
533
|
},
|
|
528
534
|
exact: l,
|
|
529
535
|
callback: (k) => {
|
|
530
|
-
|
|
536
|
+
f(k.values);
|
|
531
537
|
}
|
|
532
|
-
})), [o, l, n,
|
|
533
|
-
const
|
|
534
|
-
if (
|
|
538
|
+
})), [o, l, n, f]), V.useEffect(() => o._removeUnmounted());
|
|
539
|
+
const b = x.current !== o, y = v.current, h = V.useMemo(() => {
|
|
540
|
+
if (i)
|
|
535
541
|
return null;
|
|
536
|
-
const k = !
|
|
537
|
-
return
|
|
538
|
-
}, [
|
|
539
|
-
return
|
|
542
|
+
const k = !b && !Y(y, n);
|
|
543
|
+
return b || k ? w() : null;
|
|
544
|
+
}, [i, b, n, y, w]);
|
|
545
|
+
return h !== null ? h : L;
|
|
540
546
|
}
|
|
541
547
|
function A(e) {
|
|
542
|
-
const r = c2(), { name: o, disabled: n, control: s = r, shouldUnregister:
|
|
548
|
+
const r = c2(), { name: o, disabled: n, control: s = r, shouldUnregister: i, defaultValue: l, exact: a = !0 } = e, c = P2(s._names.array, o), m = V.useMemo(() => z(s._formValues, o, z(s._defaultValues, o, l)), [s, o, l]), u = K2({
|
|
543
549
|
control: s,
|
|
544
550
|
name: o,
|
|
545
|
-
defaultValue:
|
|
546
|
-
exact:
|
|
547
|
-
}),
|
|
551
|
+
defaultValue: m,
|
|
552
|
+
exact: a
|
|
553
|
+
}), x = T2({
|
|
548
554
|
control: s,
|
|
549
555
|
name: o,
|
|
550
|
-
exact:
|
|
551
|
-
}),
|
|
556
|
+
exact: a
|
|
557
|
+
}), v = V.useRef(e), L = V.useRef(void 0), g = V.useRef(s.register(o, {
|
|
552
558
|
...e.rules,
|
|
553
|
-
value:
|
|
554
|
-
...
|
|
559
|
+
value: u,
|
|
560
|
+
...n2(e.disabled) ? { disabled: e.disabled } : {}
|
|
555
561
|
}));
|
|
556
|
-
|
|
562
|
+
v.current = e;
|
|
557
563
|
const w = V.useMemo(() => Object.defineProperties({}, {
|
|
558
564
|
invalid: {
|
|
559
565
|
enumerable: !0,
|
|
560
|
-
get: () => !!z(
|
|
566
|
+
get: () => !!z(x.errors, o)
|
|
561
567
|
},
|
|
562
568
|
isDirty: {
|
|
563
569
|
enumerable: !0,
|
|
564
|
-
get: () => !!z(
|
|
570
|
+
get: () => !!z(x.dirtyFields, o)
|
|
565
571
|
},
|
|
566
572
|
isTouched: {
|
|
567
573
|
enumerable: !0,
|
|
568
|
-
get: () => !!z(
|
|
574
|
+
get: () => !!z(x.touchedFields, o)
|
|
569
575
|
},
|
|
570
576
|
isValidating: {
|
|
571
577
|
enumerable: !0,
|
|
572
|
-
get: () => !!z(
|
|
578
|
+
get: () => !!z(x.validatingFields, o)
|
|
573
579
|
},
|
|
574
580
|
error: {
|
|
575
581
|
enumerable: !0,
|
|
576
|
-
get: () => z(
|
|
582
|
+
get: () => z(x.errors, o)
|
|
577
583
|
}
|
|
578
|
-
}), [
|
|
584
|
+
}), [x, o]), f = V.useCallback((k) => g.current.onChange({
|
|
579
585
|
target: {
|
|
580
586
|
value: D2(k),
|
|
581
587
|
name: o
|
|
582
588
|
},
|
|
583
|
-
type:
|
|
584
|
-
}), [o]),
|
|
589
|
+
type: h2.CHANGE
|
|
590
|
+
}), [o]), b = V.useCallback(() => g.current.onBlur({
|
|
585
591
|
target: {
|
|
586
592
|
value: z(s._formValues, o),
|
|
587
593
|
name: o
|
|
588
594
|
},
|
|
589
|
-
type:
|
|
590
|
-
}), [o, s._formValues]),
|
|
591
|
-
const
|
|
592
|
-
|
|
595
|
+
type: h2.BLUR
|
|
596
|
+
}), [o, s._formValues]), y = V.useCallback((k) => {
|
|
597
|
+
const p = z(s._fields, o);
|
|
598
|
+
p && p._f && k && (p._f.ref = {
|
|
593
599
|
focus: () => J(k.focus) && k.focus(),
|
|
594
600
|
select: () => J(k.select) && k.select(),
|
|
595
|
-
setCustomValidity: (
|
|
601
|
+
setCustomValidity: (d) => J(k.setCustomValidity) && k.setCustomValidity(d),
|
|
596
602
|
reportValidity: () => J(k.reportValidity) && k.reportValidity()
|
|
597
603
|
});
|
|
598
|
-
}, [s._fields, o]),
|
|
604
|
+
}, [s._fields, o]), h = V.useMemo(() => ({
|
|
599
605
|
name: o,
|
|
600
|
-
value:
|
|
601
|
-
...
|
|
602
|
-
onChange:
|
|
603
|
-
onBlur:
|
|
604
|
-
ref:
|
|
605
|
-
}), [o, n,
|
|
606
|
+
value: u,
|
|
607
|
+
...n2(n) || x.disabled ? { disabled: x.disabled || n } : {},
|
|
608
|
+
onChange: f,
|
|
609
|
+
onBlur: b,
|
|
610
|
+
ref: y
|
|
611
|
+
}), [o, n, x.disabled, f, b, y, u]);
|
|
606
612
|
return V.useEffect(() => {
|
|
607
|
-
const k = s._options.shouldUnregister ||
|
|
608
|
-
|
|
609
|
-
...
|
|
610
|
-
...
|
|
613
|
+
const k = s._options.shouldUnregister || i, p = L.current;
|
|
614
|
+
p && p !== o && !c && s.unregister(p), s.register(o, {
|
|
615
|
+
...v.current.rules,
|
|
616
|
+
...n2(v.current.disabled) ? { disabled: v.current.disabled } : {}
|
|
611
617
|
});
|
|
612
|
-
const
|
|
618
|
+
const d = (_, B) => {
|
|
613
619
|
const H = z(s._fields, _);
|
|
614
620
|
H && H._f && (H._f.mount = B);
|
|
615
621
|
};
|
|
616
|
-
if (
|
|
617
|
-
const _ = w2(z(s._options.defaultValues, o,
|
|
618
|
-
|
|
622
|
+
if (d(o, !0), k) {
|
|
623
|
+
const _ = w2(z(s._options.defaultValues, o, v.current.defaultValue));
|
|
624
|
+
m2(s._defaultValues, o, _), a2(z(s._formValues, o)) && m2(s._formValues, o, _);
|
|
619
625
|
}
|
|
620
626
|
return !c && s.register(o), L.current = o, () => {
|
|
621
|
-
(c ? k && !s._state.action : k) ? s.unregister(o) :
|
|
627
|
+
(c ? k && !s._state.action : k) ? s.unregister(o) : d(o, !1);
|
|
622
628
|
};
|
|
623
|
-
}, [o, s, c,
|
|
629
|
+
}, [o, s, c, i]), V.useEffect(() => {
|
|
624
630
|
s._setDisabledField({
|
|
625
631
|
disabled: n,
|
|
626
632
|
name: o
|
|
627
633
|
});
|
|
628
634
|
}, [n, o, s]), V.useMemo(() => ({
|
|
629
|
-
field:
|
|
630
|
-
formState:
|
|
635
|
+
field: h,
|
|
636
|
+
formState: x,
|
|
631
637
|
fieldState: w
|
|
632
|
-
}), [
|
|
638
|
+
}), [h, x, w]);
|
|
633
639
|
}
|
|
634
640
|
const q2 = V.createContext(null);
|
|
635
641
|
q2.displayName = "HookFormContext";
|
|
@@ -639,43 +645,43 @@ const V2 = ({
|
|
|
639
645
|
defaultValue: o,
|
|
640
646
|
placeholder: n = "Select an option",
|
|
641
647
|
onChange: s,
|
|
642
|
-
onBlur:
|
|
648
|
+
onBlur: i,
|
|
643
649
|
name: l,
|
|
644
|
-
disabled:
|
|
650
|
+
disabled: a = !1,
|
|
645
651
|
size: c = "md",
|
|
646
|
-
fullWidth:
|
|
647
|
-
className:
|
|
648
|
-
allowClear:
|
|
649
|
-
showSearch:
|
|
652
|
+
fullWidth: m = !1,
|
|
653
|
+
className: u = "",
|
|
654
|
+
allowClear: x = !1,
|
|
655
|
+
showSearch: v = !1,
|
|
650
656
|
searchPlaceholder: L = "Search...",
|
|
651
|
-
bgColor:
|
|
657
|
+
bgColor: g,
|
|
652
658
|
borderColor: w,
|
|
653
|
-
focusBorderColor:
|
|
654
|
-
selectedBgColor:
|
|
655
|
-
selectedTextColor:
|
|
656
|
-
hoverBgColor:
|
|
659
|
+
focusBorderColor: f = "#EC615B",
|
|
660
|
+
selectedBgColor: b,
|
|
661
|
+
selectedTextColor: y,
|
|
662
|
+
hoverBgColor: h,
|
|
657
663
|
rounded: k = "lg",
|
|
658
|
-
style:
|
|
659
|
-
label:
|
|
664
|
+
style: p,
|
|
665
|
+
label: d,
|
|
660
666
|
error: _,
|
|
661
667
|
helperText: B
|
|
662
668
|
}) => {
|
|
663
|
-
const [H, Z] = O(!1), [
|
|
669
|
+
const [H, Z] = O(!1), [S, U] = O(o), [E, M] = O(""), $ = e2(null), N = e2(null), G = r !== void 0 ? r : S;
|
|
664
670
|
R(() => {
|
|
665
671
|
const F = (W) => {
|
|
666
|
-
|
|
672
|
+
$.current && !$.current.contains(W.target) && (Z(!1), M(""), H && (i == null || i()));
|
|
667
673
|
};
|
|
668
|
-
return H && (document.addEventListener("mousedown", F),
|
|
674
|
+
return H && (document.addEventListener("mousedown", F), v && N.current && N.current.focus()), () => {
|
|
669
675
|
document.removeEventListener("mousedown", F);
|
|
670
676
|
};
|
|
671
|
-
}, [H,
|
|
672
|
-
const
|
|
677
|
+
}, [H, v]);
|
|
678
|
+
const o2 = (F) => {
|
|
673
679
|
r === void 0 && U(F), s == null || s(F), Z(!1), M("");
|
|
674
680
|
}, D = (F) => {
|
|
675
681
|
F.stopPropagation(), r === void 0 && U(void 0), s == null || s("");
|
|
676
|
-
}, j = e.find((F) => F.value === G), T =
|
|
682
|
+
}, j = e.find((F) => F.value === G), T = v ? e.filter(
|
|
677
683
|
(F) => F.label.toLowerCase().includes(E.toLowerCase())
|
|
678
|
-
) : e,
|
|
684
|
+
) : e, r2 = {
|
|
679
685
|
sm: "px-3 py-1.5 text-sm",
|
|
680
686
|
md: "px-4 py-2 text-base",
|
|
681
687
|
lg: "px-5 py-3 text-lg",
|
|
@@ -686,13 +692,13 @@ const V2 = ({
|
|
|
686
692
|
md: "rounded-md",
|
|
687
693
|
lg: "rounded-lg",
|
|
688
694
|
full: "rounded-full"
|
|
689
|
-
}, H2 =
|
|
695
|
+
}, H2 = m ? "w-full" : "min-w-[200px]", s2 = () => {
|
|
690
696
|
const F = {};
|
|
691
|
-
return
|
|
697
|
+
return g && (F.backgroundColor = g), w && (F.borderColor = w), F;
|
|
692
698
|
}, N2 = () => {
|
|
693
699
|
const F = {};
|
|
694
|
-
return
|
|
695
|
-
},
|
|
700
|
+
return b && (F.backgroundColor = b), y && (F.color = y), F;
|
|
701
|
+
}, $2 = /* @__PURE__ */ t(
|
|
696
702
|
"svg",
|
|
697
703
|
{
|
|
698
704
|
className: `w-4 h-4 transition-transform duration-200 ease-out ${H ? "rotate-180" : ""}`,
|
|
@@ -701,61 +707,61 @@ const V2 = ({
|
|
|
701
707
|
viewBox: "0 0 24 24",
|
|
702
708
|
children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
|
|
703
709
|
}
|
|
704
|
-
),
|
|
705
|
-
return /* @__PURE__ */
|
|
706
|
-
|
|
707
|
-
/* @__PURE__ */
|
|
710
|
+
), S2 = /* @__PURE__ */ t("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) });
|
|
711
|
+
return /* @__PURE__ */ C("div", { className: `relative inline-block ${H2}`, style: p, children: [
|
|
712
|
+
d && /* @__PURE__ */ t("label", { className: "block text-sm font-medium mb-2", style: { color: _ ? "#C21919" : "#181918" }, children: d }),
|
|
713
|
+
/* @__PURE__ */ C("div", { ref: $, className: "relative", children: [
|
|
708
714
|
/* @__PURE__ */ t("input", { type: "hidden", name: l, value: G ?? "", readOnly: !0 }),
|
|
709
|
-
/* @__PURE__ */
|
|
715
|
+
/* @__PURE__ */ C(
|
|
710
716
|
"div",
|
|
711
717
|
{
|
|
712
|
-
onClick: () => !
|
|
718
|
+
onClick: () => !a && Z(!H),
|
|
713
719
|
className: `
|
|
714
720
|
select-trigger
|
|
715
721
|
flex items-center justify-between gap-2
|
|
716
722
|
border transition-all duration-200 ease-out
|
|
717
|
-
${!
|
|
718
|
-
${
|
|
719
|
-
${
|
|
723
|
+
${!u.includes("px-") && !u.includes("py-") && !u.includes("h-") ? r2[c] : ""}
|
|
724
|
+
${u.includes("rounded") ? "" : f2[k]}
|
|
725
|
+
${a ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
720
726
|
${H ? "ring-2 ring-opacity-20" : ""}
|
|
721
|
-
${
|
|
727
|
+
${u}
|
|
722
728
|
`,
|
|
723
729
|
style: {
|
|
724
|
-
...
|
|
725
|
-
backgroundColor:
|
|
726
|
-
borderColor: _ ? "#C21919" : w ||
|
|
730
|
+
...s2(),
|
|
731
|
+
backgroundColor: g || s2().backgroundColor || "#FFFFFF",
|
|
732
|
+
borderColor: _ ? "#C21919" : w || s2().borderColor || "#D1D5DB",
|
|
727
733
|
...H && {
|
|
728
|
-
borderColor: _ ? "#C21919" :
|
|
729
|
-
boxShadow: `0 0 0 2px ${_ ? "#C21919" :
|
|
734
|
+
borderColor: _ ? "#C21919" : f,
|
|
735
|
+
boxShadow: `0 0 0 2px ${_ ? "#C21919" : f}20`
|
|
730
736
|
},
|
|
731
|
-
...!
|
|
737
|
+
...!a && !H && h && {
|
|
732
738
|
cursor: "pointer"
|
|
733
739
|
}
|
|
734
740
|
},
|
|
735
741
|
onMouseEnter: (F) => {
|
|
736
|
-
!
|
|
742
|
+
!a && h && (F.currentTarget.style.backgroundColor = h);
|
|
737
743
|
},
|
|
738
744
|
onMouseLeave: (F) => {
|
|
739
|
-
|
|
745
|
+
g ? F.currentTarget.style.backgroundColor = g : F.currentTarget.style.backgroundColor = "#FFFFFF";
|
|
740
746
|
},
|
|
741
747
|
children: [
|
|
742
748
|
/* @__PURE__ */ t("span", { className: j ? "text-gray-900" : "text-gray-400", children: j ? j.label : n }),
|
|
743
|
-
/* @__PURE__ */
|
|
744
|
-
|
|
749
|
+
/* @__PURE__ */ C("div", { className: "flex items-center gap-1", children: [
|
|
750
|
+
x && G && !a && /* @__PURE__ */ t(
|
|
745
751
|
"span",
|
|
746
752
|
{
|
|
747
753
|
onClick: D,
|
|
748
754
|
className: "text-gray-400 hover:text-gray-600 transition-colors duration-200 ease-out",
|
|
749
|
-
children:
|
|
755
|
+
children: S2
|
|
750
756
|
}
|
|
751
757
|
),
|
|
752
|
-
/* @__PURE__ */ t("span", { className: "text-gray-400", children:
|
|
758
|
+
/* @__PURE__ */ t("span", { className: "text-gray-400", children: $2 })
|
|
753
759
|
] })
|
|
754
760
|
]
|
|
755
761
|
}
|
|
756
762
|
),
|
|
757
|
-
H && !
|
|
758
|
-
|
|
763
|
+
H && !a && /* @__PURE__ */ t("div", { className: "absolute top-full left-0 right-0 mt-1 z-50 dropdown-slide-down", children: /* @__PURE__ */ C("div", { className: `select-dropdown bg-white shadow-lg border border-gray-200 py-1 max-h-[300px] overflow-auto ${f2[k]}`, children: [
|
|
764
|
+
v && /* @__PURE__ */ t("div", { className: "px-2 py-2 border-b border-gray-200", children: /* @__PURE__ */ t(
|
|
759
765
|
"input",
|
|
760
766
|
{
|
|
761
767
|
ref: N,
|
|
@@ -766,7 +772,7 @@ const V2 = ({
|
|
|
766
772
|
className: "w-full px-3 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:ring-2 transition-all duration-200 ease-out",
|
|
767
773
|
style: {
|
|
768
774
|
borderColor: w,
|
|
769
|
-
boxShadow: `0 0 0 2px ${
|
|
775
|
+
boxShadow: `0 0 0 2px ${f}20`
|
|
770
776
|
},
|
|
771
777
|
onClick: (F) => F.stopPropagation()
|
|
772
778
|
}
|
|
@@ -774,7 +780,7 @@ const V2 = ({
|
|
|
774
780
|
T.length === 0 ? /* @__PURE__ */ t("div", { className: "px-4 py-3 text-sm text-gray-500 text-center", children: "No results found" }) : T.map((F) => /* @__PURE__ */ t(
|
|
775
781
|
"div",
|
|
776
782
|
{
|
|
777
|
-
onClick: () => !F.disabled &&
|
|
783
|
+
onClick: () => !F.disabled && o2(F.value),
|
|
778
784
|
className: `
|
|
779
785
|
select-option
|
|
780
786
|
px-4 py-2 text-sm transition-all duration-200 ease-out
|
|
@@ -782,12 +788,12 @@ const V2 = ({
|
|
|
782
788
|
`,
|
|
783
789
|
style: {
|
|
784
790
|
...F.value === G ? N2() : {},
|
|
785
|
-
backgroundColor: F.value === G ?
|
|
786
|
-
color: F.value === G ?
|
|
791
|
+
backgroundColor: F.value === G ? b || "#FCEAE9" : void 0,
|
|
792
|
+
color: F.value === G ? y || "#EC615B" : "#181918",
|
|
787
793
|
fontWeight: F.value === G ? "medium" : void 0
|
|
788
794
|
},
|
|
789
795
|
onMouseEnter: (W) => {
|
|
790
|
-
!F.disabled && F.value !== G && (W.currentTarget.style.backgroundColor =
|
|
796
|
+
!F.disabled && F.value !== G && (W.currentTarget.style.backgroundColor = h || "#F3F4F6");
|
|
791
797
|
},
|
|
792
798
|
onMouseLeave: (W) => {
|
|
793
799
|
F.value !== G && (W.currentTarget.style.backgroundColor = "transparent");
|
|
@@ -798,7 +804,7 @@ const V2 = ({
|
|
|
798
804
|
))
|
|
799
805
|
] }) })
|
|
800
806
|
] }),
|
|
801
|
-
_ && /* @__PURE__ */
|
|
807
|
+
_ && /* @__PURE__ */ C("div", { className: "flex items-center mt-1 text-xs text-[#C21919]", children: [
|
|
802
808
|
/* @__PURE__ */ t("svg", { className: "w-3 h-3 mr-1", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ t(
|
|
803
809
|
"path",
|
|
804
810
|
{
|
|
@@ -818,7 +824,7 @@ const V2 = ({
|
|
|
818
824
|
...n
|
|
819
825
|
}) => {
|
|
820
826
|
var l;
|
|
821
|
-
const { field: s, fieldState:
|
|
827
|
+
const { field: s, fieldState: i } = A({ control: e, name: r });
|
|
822
828
|
return /* @__PURE__ */ t(
|
|
823
829
|
V2,
|
|
824
830
|
{
|
|
@@ -827,33 +833,33 @@ const V2 = ({
|
|
|
827
833
|
onChange: s.onChange,
|
|
828
834
|
onBlur: s.onBlur,
|
|
829
835
|
name: r,
|
|
830
|
-
error: o ?? ((l =
|
|
836
|
+
error: o ?? ((l = i.error) == null ? void 0 : l.message)
|
|
831
837
|
}
|
|
832
838
|
);
|
|
833
|
-
}, Q2 = ({ control: e, name: r, ...o }) => e && r ? /* @__PURE__ */ t(J2, { control: e, name: r, ...o }) : /* @__PURE__ */ t(V2, { name: r, ...o }),
|
|
839
|
+
}, Q2 = ({ control: e, name: r, ...o }) => e && r ? /* @__PURE__ */ t(J2, { control: e, name: r, ...o }) : /* @__PURE__ */ t(V2, { name: r, ...o }), S0 = ({
|
|
834
840
|
columns: e,
|
|
835
841
|
dataSource: r,
|
|
836
842
|
rowKey: o = "id",
|
|
837
843
|
pagination: n,
|
|
838
844
|
loading: s = !1,
|
|
839
|
-
onRow:
|
|
845
|
+
onRow: i,
|
|
840
846
|
className: l = "",
|
|
841
|
-
bordered:
|
|
847
|
+
bordered: a = !1,
|
|
842
848
|
striped: c = !1,
|
|
843
|
-
size:
|
|
844
|
-
headerBgColor:
|
|
845
|
-
headerTextColor:
|
|
846
|
-
rowHoverColor:
|
|
849
|
+
size: m = "md",
|
|
850
|
+
headerBgColor: u,
|
|
851
|
+
headerTextColor: x,
|
|
852
|
+
rowHoverColor: v,
|
|
847
853
|
borderColor: L,
|
|
848
|
-
stripedRowColor:
|
|
854
|
+
stripedRowColor: g,
|
|
849
855
|
rounded: w = "md",
|
|
850
|
-
style:
|
|
856
|
+
style: f
|
|
851
857
|
}) => {
|
|
852
|
-
const [
|
|
858
|
+
const [b, y] = O(
|
|
853
859
|
n && typeof n == "object" && n.current || 1
|
|
854
|
-
), [
|
|
860
|
+
), [h, k] = O(
|
|
855
861
|
n && typeof n == "object" && n.pageSize || 10
|
|
856
|
-
),
|
|
862
|
+
), p = {
|
|
857
863
|
sm: {
|
|
858
864
|
headerPadding: "px-3 py-2",
|
|
859
865
|
headerFontSize: "text-xs",
|
|
@@ -882,40 +888,40 @@ const V2 = ({
|
|
|
882
888
|
rowFontSize: "text-xs sm:text-xs md:text-sm",
|
|
883
889
|
containerRounded: "rounded-md sm:rounded-lg md:rounded-lg"
|
|
884
890
|
}
|
|
885
|
-
},
|
|
891
|
+
}, d = {
|
|
886
892
|
none: "",
|
|
887
893
|
sm: "rounded-sm",
|
|
888
894
|
md: "rounded-md",
|
|
889
895
|
lg: "rounded-lg",
|
|
890
896
|
xl: "rounded-xl",
|
|
891
897
|
"2xl": "rounded-2xl"
|
|
892
|
-
}, _ =
|
|
893
|
-
|
|
898
|
+
}, _ = p[m], B = d[w], H = (M, $) => typeof o == "function" ? o(M) : M[o] || String($), Z = (M, $) => $ ? $.split(".").reduce((N, G) => N == null ? void 0 : N[G], M) : M, S = n === !1 ? r : r.slice((b - 1) * h, b * h), U = (M) => {
|
|
899
|
+
y(M), n && typeof n == "object" && n.onChange && n.onChange(M, h);
|
|
894
900
|
}, E = (M) => {
|
|
895
|
-
k(M),
|
|
901
|
+
k(M), y(1), n && typeof n == "object" && n.onChange && n.onChange(1, M);
|
|
896
902
|
};
|
|
897
|
-
return /* @__PURE__ */
|
|
903
|
+
return /* @__PURE__ */ C("div", { className: "w-full", style: f, children: [
|
|
898
904
|
/* @__PURE__ */ t(
|
|
899
905
|
"div",
|
|
900
906
|
{
|
|
901
907
|
className: `overflow-x-auto ${B || "rounded-2xl"} border`,
|
|
902
908
|
style: { borderColor: L || "#EEEEEE" },
|
|
903
|
-
children: /* @__PURE__ */
|
|
909
|
+
children: /* @__PURE__ */ C("table", { className: `w-full ${a ? "border-collapse" : ""} ${l}`, children: [
|
|
904
910
|
/* @__PURE__ */ t(
|
|
905
911
|
"thead",
|
|
906
912
|
{
|
|
907
913
|
style: {
|
|
908
|
-
backgroundColor:
|
|
909
|
-
color:
|
|
914
|
+
backgroundColor: u || "#F5F6F7",
|
|
915
|
+
color: x || "#333333"
|
|
910
916
|
},
|
|
911
|
-
children: /* @__PURE__ */ t("tr", { children: e.map((M,
|
|
917
|
+
children: /* @__PURE__ */ t("tr", { children: e.map((M, $) => /* @__PURE__ */ t(
|
|
912
918
|
"th",
|
|
913
919
|
{
|
|
914
|
-
className: `${_.headerPadding} text-left ${_.headerFontSize} font-medium uppercase tracking-wider ${
|
|
920
|
+
className: `${_.headerPadding} text-left ${_.headerFontSize} font-medium uppercase tracking-wider ${a && $ !== e.length - 1 ? "border-r" : ""} ${M.align === "center" ? "text-center" : M.align === "right" ? "text-right" : ""}`,
|
|
915
921
|
style: {
|
|
916
922
|
width: M.width,
|
|
917
923
|
borderColor: L || "#EEEEEE",
|
|
918
|
-
color:
|
|
924
|
+
color: x || "#333333"
|
|
919
925
|
},
|
|
920
926
|
children: M.title
|
|
921
927
|
},
|
|
@@ -934,8 +940,8 @@ const V2 = ({
|
|
|
934
940
|
colSpan: e.length,
|
|
935
941
|
className: `${_.rowPadding} py-8 text-center`,
|
|
936
942
|
style: { color: "#333333" },
|
|
937
|
-
children: /* @__PURE__ */
|
|
938
|
-
/* @__PURE__ */
|
|
943
|
+
children: /* @__PURE__ */ C("div", { className: "flex justify-center items-center", children: [
|
|
944
|
+
/* @__PURE__ */ C(
|
|
939
945
|
"svg",
|
|
940
946
|
{
|
|
941
947
|
className: "animate-spin h-5 w-5 mr-2",
|
|
@@ -968,7 +974,7 @@ const V2 = ({
|
|
|
968
974
|
"Loading..."
|
|
969
975
|
] })
|
|
970
976
|
}
|
|
971
|
-
) }) :
|
|
977
|
+
) }) : S.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t(
|
|
972
978
|
"td",
|
|
973
979
|
{
|
|
974
980
|
colSpan: e.length,
|
|
@@ -976,8 +982,8 @@ const V2 = ({
|
|
|
976
982
|
style: { color: "#333333" },
|
|
977
983
|
children: "No data"
|
|
978
984
|
}
|
|
979
|
-
) }) :
|
|
980
|
-
const N =
|
|
985
|
+
) }) : S.map((M, $) => {
|
|
986
|
+
const N = i ? i(M, $) : {}, G = c && $ % 2 === 1 ? g || "#F5F6F7" : "transparent", o2 = v || "#f3f4f6";
|
|
981
987
|
return /* @__PURE__ */ t(
|
|
982
988
|
"tr",
|
|
983
989
|
{
|
|
@@ -986,28 +992,28 @@ const V2 = ({
|
|
|
986
992
|
backgroundColor: G
|
|
987
993
|
},
|
|
988
994
|
onMouseEnter: (D) => {
|
|
989
|
-
(
|
|
995
|
+
(v || !c || $ % 2 === 0) && (D.currentTarget.style.backgroundColor = o2);
|
|
990
996
|
},
|
|
991
997
|
onMouseLeave: (D) => {
|
|
992
998
|
D.currentTarget.style.backgroundColor = G;
|
|
993
999
|
},
|
|
994
1000
|
...N,
|
|
995
1001
|
children: e.map((D, j) => {
|
|
996
|
-
const T = Z(M, D.dataIndex),
|
|
1002
|
+
const T = Z(M, D.dataIndex), r2 = D.render ? D.render(T, M, $) : T;
|
|
997
1003
|
return /* @__PURE__ */ t(
|
|
998
1004
|
"td",
|
|
999
1005
|
{
|
|
1000
|
-
className: `${_.rowPadding} ${_.rowFontSize} text-gray-900 ${
|
|
1006
|
+
className: `${_.rowPadding} ${_.rowFontSize} text-gray-900 ${a && j !== e.length - 1 ? "border-r" : ""} ${D.align === "center" ? "text-center" : D.align === "right" ? "text-right" : ""}`,
|
|
1001
1007
|
style: {
|
|
1002
1008
|
borderColor: L || "#EEEEEE"
|
|
1003
1009
|
},
|
|
1004
|
-
children:
|
|
1010
|
+
children: r2
|
|
1005
1011
|
},
|
|
1006
1012
|
D.key
|
|
1007
1013
|
);
|
|
1008
1014
|
})
|
|
1009
1015
|
},
|
|
1010
|
-
H(M,
|
|
1016
|
+
H(M, $)
|
|
1011
1017
|
);
|
|
1012
1018
|
})
|
|
1013
1019
|
}
|
|
@@ -1018,15 +1024,15 @@ const V2 = ({
|
|
|
1018
1024
|
n !== !1 && /* @__PURE__ */ t(
|
|
1019
1025
|
Y2,
|
|
1020
1026
|
{
|
|
1021
|
-
current:
|
|
1022
|
-
pageSize:
|
|
1027
|
+
current: b,
|
|
1028
|
+
pageSize: h,
|
|
1023
1029
|
total: r.length,
|
|
1024
1030
|
onChange: U,
|
|
1025
1031
|
onPageSizeChange: E,
|
|
1026
1032
|
showSizeChanger: n && typeof n == "object" ? n.showSizeChanger : !0,
|
|
1027
1033
|
pageSizeOptions: n && typeof n == "object" ? n.pageSizeOptions : [10, 20, 50, 100],
|
|
1028
1034
|
showTotal: n && typeof n == "object" ? n.showTotal : !0,
|
|
1029
|
-
size: n && typeof n == "object" && n.size ? n.size :
|
|
1035
|
+
size: n && typeof n == "object" && n.size ? n.size : m === "responsive" ? "md" : m
|
|
1030
1036
|
}
|
|
1031
1037
|
)
|
|
1032
1038
|
] });
|
|
@@ -1036,12 +1042,12 @@ const V2 = ({
|
|
|
1036
1042
|
total: o,
|
|
1037
1043
|
onChange: n,
|
|
1038
1044
|
onPageSizeChange: s,
|
|
1039
|
-
showSizeChanger:
|
|
1045
|
+
showSizeChanger: i = !0,
|
|
1040
1046
|
pageSizeOptions: l = [10, 20, 50, 100],
|
|
1041
|
-
showTotal:
|
|
1047
|
+
showTotal: a = !0,
|
|
1042
1048
|
size: c = "md"
|
|
1043
1049
|
}) => {
|
|
1044
|
-
const
|
|
1050
|
+
const m = Math.ceil(o / r), u = (e - 1) * r + 1, x = Math.min(e * r, o), v = {
|
|
1045
1051
|
sm: {
|
|
1046
1052
|
button: "px-2.5 py-1 text-xs",
|
|
1047
1053
|
icon: "h-3.5 w-3.5",
|
|
@@ -1058,54 +1064,54 @@ const V2 = ({
|
|
|
1058
1064
|
nav: "px-3 py-3"
|
|
1059
1065
|
}
|
|
1060
1066
|
}, L = () => {
|
|
1061
|
-
const
|
|
1062
|
-
if (
|
|
1063
|
-
for (let
|
|
1064
|
-
|
|
1067
|
+
const g = [];
|
|
1068
|
+
if (m <= 7)
|
|
1069
|
+
for (let f = 1; f <= m; f++)
|
|
1070
|
+
g.push(f);
|
|
1065
1071
|
else if (e <= 3) {
|
|
1066
|
-
for (let
|
|
1067
|
-
|
|
1068
|
-
} else if (e >=
|
|
1069
|
-
|
|
1070
|
-
for (let
|
|
1072
|
+
for (let f = 1; f <= 5; f++) g.push(f);
|
|
1073
|
+
g.push("..."), g.push(m);
|
|
1074
|
+
} else if (e >= m - 2) {
|
|
1075
|
+
g.push(1), g.push("...");
|
|
1076
|
+
for (let f = m - 4; f <= m; f++) g.push(f);
|
|
1071
1077
|
} else {
|
|
1072
|
-
|
|
1073
|
-
for (let
|
|
1074
|
-
|
|
1078
|
+
g.push(1), g.push("...");
|
|
1079
|
+
for (let f = e - 1; f <= e + 1; f++) g.push(f);
|
|
1080
|
+
g.push("..."), g.push(m);
|
|
1075
1081
|
}
|
|
1076
|
-
return
|
|
1082
|
+
return g;
|
|
1077
1083
|
};
|
|
1078
|
-
return /* @__PURE__ */
|
|
1079
|
-
|
|
1080
|
-
|
|
1084
|
+
return /* @__PURE__ */ C("div", { className: "flex items-center justify-between px-4 py-3 border-t border-[#EEEEEE] sm:px-6 mt-4", children: [
|
|
1085
|
+
a && /* @__PURE__ */ C("div", { className: "text-sm text-[#181918]", children: [
|
|
1086
|
+
u,
|
|
1081
1087
|
"-",
|
|
1082
|
-
|
|
1088
|
+
x,
|
|
1083
1089
|
" of ",
|
|
1084
1090
|
o,
|
|
1085
1091
|
" items"
|
|
1086
1092
|
] }),
|
|
1087
|
-
/* @__PURE__ */
|
|
1088
|
-
|
|
1093
|
+
/* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
|
|
1094
|
+
i && /* @__PURE__ */ t(
|
|
1089
1095
|
Q2,
|
|
1090
1096
|
{
|
|
1091
1097
|
value: r.toString(),
|
|
1092
|
-
onChange: (
|
|
1093
|
-
options: l.map((
|
|
1094
|
-
value:
|
|
1095
|
-
label: `${
|
|
1098
|
+
onChange: (g) => s(Number(g)),
|
|
1099
|
+
options: l.map((g) => ({
|
|
1100
|
+
value: g.toString(),
|
|
1101
|
+
label: `${g} / page`
|
|
1096
1102
|
})),
|
|
1097
1103
|
size: "sm",
|
|
1098
1104
|
className: "w-32"
|
|
1099
1105
|
}
|
|
1100
1106
|
),
|
|
1101
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ C("nav", { className: "inline-flex gap-1 items-center", "aria-label": "Pagination", children: [
|
|
1102
1108
|
/* @__PURE__ */ t(
|
|
1103
1109
|
"button",
|
|
1104
1110
|
{
|
|
1105
1111
|
onClick: () => n(e - 1),
|
|
1106
1112
|
disabled: e === 1,
|
|
1107
|
-
className: `relative inline-flex items-center justify-center rounded-md ${
|
|
1108
|
-
children: /* @__PURE__ */ t("svg", { className:
|
|
1113
|
+
className: `relative inline-flex items-center justify-center rounded-md ${v[c].nav} text-[#181918] hover:bg-gray-100 focus:z-20 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-all duration-300 ease-out hover:scale-110 active:scale-95`,
|
|
1114
|
+
children: /* @__PURE__ */ t("svg", { className: v[c].icon, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ t(
|
|
1109
1115
|
"path",
|
|
1110
1116
|
{
|
|
1111
1117
|
strokeLinecap: "round",
|
|
@@ -1116,29 +1122,29 @@ const V2 = ({
|
|
|
1116
1122
|
) })
|
|
1117
1123
|
}
|
|
1118
1124
|
),
|
|
1119
|
-
L().map((
|
|
1125
|
+
L().map((g, w) => g === "..." ? /* @__PURE__ */ t(
|
|
1120
1126
|
"span",
|
|
1121
1127
|
{
|
|
1122
|
-
className: `relative inline-flex items-center justify-center ${
|
|
1128
|
+
className: `relative inline-flex items-center justify-center ${v[c].button} font-normal text-[#181918]`,
|
|
1123
1129
|
children: "..."
|
|
1124
1130
|
},
|
|
1125
1131
|
`ellipsis-${w}`
|
|
1126
1132
|
) : /* @__PURE__ */ t(
|
|
1127
1133
|
"button",
|
|
1128
1134
|
{
|
|
1129
|
-
onClick: () => n(
|
|
1130
|
-
className: `relative inline-flex items-center justify-center rounded-md ${
|
|
1131
|
-
children:
|
|
1135
|
+
onClick: () => n(g),
|
|
1136
|
+
className: `relative inline-flex items-center justify-center rounded-md ${v[c].button} font-medium transition-all duration-300 ease-out focus:z-20 hover:scale-105 active:scale-95 ${e === g ? "bg-[#EC615B] text-white shadow-sm" : "text-[#181918] hover:bg-gray-100"}`,
|
|
1137
|
+
children: g
|
|
1132
1138
|
},
|
|
1133
|
-
|
|
1139
|
+
g
|
|
1134
1140
|
)),
|
|
1135
1141
|
/* @__PURE__ */ t(
|
|
1136
1142
|
"button",
|
|
1137
1143
|
{
|
|
1138
1144
|
onClick: () => n(e + 1),
|
|
1139
|
-
disabled: e ===
|
|
1140
|
-
className: `relative inline-flex items-center justify-center rounded-md ${
|
|
1141
|
-
children: /* @__PURE__ */ t("svg", { className:
|
|
1145
|
+
disabled: e === m,
|
|
1146
|
+
className: `relative inline-flex items-center justify-center rounded-md ${v[c].nav} text-[#181918] hover:bg-gray-100 focus:z-20 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-all duration-300 ease-out hover:scale-110 active:scale-95`,
|
|
1147
|
+
children: /* @__PURE__ */ t("svg", { className: v[c].icon, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ t(
|
|
1142
1148
|
"path",
|
|
1143
1149
|
{
|
|
1144
1150
|
strokeLinecap: "round",
|
|
@@ -1158,22 +1164,22 @@ const V2 = ({
|
|
|
1158
1164
|
searchPlaceholder: o = "Search...",
|
|
1159
1165
|
onSearch: n,
|
|
1160
1166
|
actions: s,
|
|
1161
|
-
filters:
|
|
1167
|
+
filters: i,
|
|
1162
1168
|
className: l = "",
|
|
1163
|
-
size:
|
|
1169
|
+
size: a = "responsive",
|
|
1164
1170
|
titleColor: c,
|
|
1165
|
-
descriptionColor:
|
|
1166
|
-
searchBgColor:
|
|
1167
|
-
searchBorderColor:
|
|
1168
|
-
searchFocusBorderColor:
|
|
1171
|
+
descriptionColor: m,
|
|
1172
|
+
searchBgColor: u = "white",
|
|
1173
|
+
searchBorderColor: x = "#d1d5db",
|
|
1174
|
+
searchFocusBorderColor: v = "#3b82f6",
|
|
1169
1175
|
rounded: L = "md",
|
|
1170
|
-
style:
|
|
1176
|
+
style: g,
|
|
1171
1177
|
hideActionButtons: w = !1,
|
|
1172
|
-
selectedActionButton:
|
|
1178
|
+
selectedActionButton: f
|
|
1173
1179
|
}) => {
|
|
1174
|
-
const
|
|
1180
|
+
const b = (_) => {
|
|
1175
1181
|
n == null || n(_.target.value);
|
|
1176
|
-
},
|
|
1182
|
+
}, h = {
|
|
1177
1183
|
sm: {
|
|
1178
1184
|
titleSize: "text-lg",
|
|
1179
1185
|
titleWeight: "font-semibold",
|
|
@@ -1226,27 +1232,27 @@ const V2 = ({
|
|
|
1226
1232
|
maxWidth: "max-w-sm md:max-w-md lg:max-w-lg",
|
|
1227
1233
|
descriptionMargin: "mt-0.5 sm:mt-1 md:mt-2"
|
|
1228
1234
|
}
|
|
1229
|
-
}[
|
|
1235
|
+
}[a], p = {
|
|
1230
1236
|
none: "rounded-none",
|
|
1231
1237
|
sm: "rounded-sm",
|
|
1232
1238
|
md: "rounded-md",
|
|
1233
1239
|
lg: "rounded-lg",
|
|
1234
1240
|
full: "rounded-full"
|
|
1235
|
-
}[L],
|
|
1236
|
-
backgroundColor:
|
|
1237
|
-
borderColor:
|
|
1241
|
+
}[L], d = {
|
|
1242
|
+
backgroundColor: u,
|
|
1243
|
+
borderColor: x
|
|
1238
1244
|
};
|
|
1239
|
-
return /* @__PURE__ */
|
|
1245
|
+
return /* @__PURE__ */ C(
|
|
1240
1246
|
"div",
|
|
1241
1247
|
{
|
|
1242
|
-
className: `${
|
|
1243
|
-
style:
|
|
1248
|
+
className: `${h.spacing} mb-4 ${l}`,
|
|
1249
|
+
style: g,
|
|
1244
1250
|
children: [
|
|
1245
|
-
(e || r) && /* @__PURE__ */
|
|
1251
|
+
(e || r) && /* @__PURE__ */ C("div", { children: [
|
|
1246
1252
|
e && /* @__PURE__ */ t(
|
|
1247
1253
|
"h2",
|
|
1248
1254
|
{
|
|
1249
|
-
className: `${
|
|
1255
|
+
className: `${h.titleSize} ${h.titleWeight}`,
|
|
1250
1256
|
style: { color: c || "#111827" },
|
|
1251
1257
|
children: e
|
|
1252
1258
|
}
|
|
@@ -1254,18 +1260,18 @@ const V2 = ({
|
|
|
1254
1260
|
r && /* @__PURE__ */ t(
|
|
1255
1261
|
"p",
|
|
1256
1262
|
{
|
|
1257
|
-
className: `${
|
|
1258
|
-
style: { color:
|
|
1263
|
+
className: `${h.descriptionSize} ${h.descriptionMargin}`,
|
|
1264
|
+
style: { color: m || "#6b7280" },
|
|
1259
1265
|
children: r
|
|
1260
1266
|
}
|
|
1261
1267
|
)
|
|
1262
1268
|
] }),
|
|
1263
|
-
/* @__PURE__ */
|
|
1264
|
-
n && /* @__PURE__ */ t("div", { className: `flex-1 ${
|
|
1269
|
+
/* @__PURE__ */ C("div", { className: `flex flex-col sm:flex-row items-stretch sm:items-center justify-between ${h.gap}`, children: [
|
|
1270
|
+
n && /* @__PURE__ */ t("div", { className: `flex-1 ${h.maxWidth}`, children: /* @__PURE__ */ C("div", { className: "relative", children: [
|
|
1265
1271
|
/* @__PURE__ */ t("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ t(
|
|
1266
1272
|
"svg",
|
|
1267
1273
|
{
|
|
1268
|
-
className: `${
|
|
1274
|
+
className: `${h.iconSize} text-gray-400`,
|
|
1269
1275
|
fill: "none",
|
|
1270
1276
|
stroke: "currentColor",
|
|
1271
1277
|
viewBox: "0 0 24 24",
|
|
@@ -1285,21 +1291,21 @@ const V2 = ({
|
|
|
1285
1291
|
{
|
|
1286
1292
|
type: "text",
|
|
1287
1293
|
placeholder: o,
|
|
1288
|
-
onChange:
|
|
1289
|
-
className: `block w-full ${
|
|
1290
|
-
style:
|
|
1294
|
+
onChange: b,
|
|
1295
|
+
className: `block w-full ${h.searchPaddingLeft} pr-3 ${h.searchInputPy} border ${p} focus:outline-none focus:ring-2 focus:ring-opacity-50 ${h.searchInputSize} transition-colors duration-200`,
|
|
1296
|
+
style: d,
|
|
1291
1297
|
onFocus: (_) => {
|
|
1292
|
-
_.currentTarget.style.borderColor =
|
|
1298
|
+
_.currentTarget.style.borderColor = v, _.currentTarget.style.boxShadow = "0 0 0 2px rgba(59, 130, 246, 0.1)";
|
|
1293
1299
|
},
|
|
1294
1300
|
onBlur: (_) => {
|
|
1295
|
-
_.currentTarget.style.borderColor =
|
|
1301
|
+
_.currentTarget.style.borderColor = x, _.currentTarget.style.boxShadow = "none";
|
|
1296
1302
|
}
|
|
1297
1303
|
}
|
|
1298
1304
|
)
|
|
1299
1305
|
] }) }),
|
|
1300
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 w-full sm:w-auto", children: w &&
|
|
1306
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 w-full sm:w-auto", children: w && f ? f : s })
|
|
1301
1307
|
] }),
|
|
1302
|
-
|
|
1308
|
+
i && /* @__PURE__ */ t("div", { className: `flex flex-wrap items-center ${h.gap}`, children: i })
|
|
1303
1309
|
]
|
|
1304
1310
|
}
|
|
1305
1311
|
);
|
|
@@ -1316,52 +1322,52 @@ const V2 = ({
|
|
|
1316
1322
|
title: o,
|
|
1317
1323
|
children: n,
|
|
1318
1324
|
footer: s,
|
|
1319
|
-
width:
|
|
1325
|
+
width: i,
|
|
1320
1326
|
size: l = "md",
|
|
1321
|
-
closable:
|
|
1327
|
+
closable: a = !0,
|
|
1322
1328
|
maskClosable: c = !0,
|
|
1323
|
-
centered:
|
|
1324
|
-
className:
|
|
1325
|
-
bgColor:
|
|
1326
|
-
headerBgColor:
|
|
1329
|
+
centered: m = !0,
|
|
1330
|
+
className: u = "",
|
|
1331
|
+
bgColor: x = "#ffffff",
|
|
1332
|
+
headerBgColor: v = "#ffffff",
|
|
1327
1333
|
overlayColor: L = "rgba(0, 0, 0, 0.5)",
|
|
1328
|
-
bodyClassName:
|
|
1334
|
+
bodyClassName: g = "",
|
|
1329
1335
|
headerClassName: w = "",
|
|
1330
|
-
maxHeight:
|
|
1336
|
+
maxHeight: f = "70vh"
|
|
1331
1337
|
}) => {
|
|
1332
|
-
const [
|
|
1333
|
-
width: typeof
|
|
1338
|
+
const [b, y] = O(!1), [h, k] = O(!1), p = i || X2[l], _ = {
|
|
1339
|
+
width: typeof p == "number" ? `${p}px` : p,
|
|
1334
1340
|
maxWidth: "90vw",
|
|
1335
|
-
backgroundColor:
|
|
1341
|
+
backgroundColor: x
|
|
1336
1342
|
}, B = {
|
|
1337
|
-
backgroundColor:
|
|
1343
|
+
backgroundColor: v
|
|
1338
1344
|
}, H = {
|
|
1339
1345
|
backgroundColor: L
|
|
1340
1346
|
};
|
|
1341
1347
|
if (R(() => {
|
|
1342
1348
|
if (e)
|
|
1343
|
-
|
|
1349
|
+
y(!0), setTimeout(() => k(!0), 10), document.body.style.overflow = "hidden";
|
|
1344
1350
|
else {
|
|
1345
1351
|
k(!1);
|
|
1346
1352
|
const U = setTimeout(() => {
|
|
1347
|
-
|
|
1353
|
+
y(!1);
|
|
1348
1354
|
}, 200);
|
|
1349
1355
|
return document.body.style.overflow = "unset", () => clearTimeout(U);
|
|
1350
1356
|
}
|
|
1351
1357
|
}, [e]), R(() => {
|
|
1352
1358
|
const U = (E) => {
|
|
1353
|
-
E.key === "Escape" &&
|
|
1359
|
+
E.key === "Escape" && a && e && r();
|
|
1354
1360
|
};
|
|
1355
1361
|
return e && document.addEventListener("keydown", U), () => {
|
|
1356
1362
|
document.removeEventListener("keydown", U);
|
|
1357
1363
|
};
|
|
1358
|
-
}, [e, r,
|
|
1364
|
+
}, [e, r, a]), !b) return null;
|
|
1359
1365
|
const Z = () => {
|
|
1360
1366
|
c && r();
|
|
1361
|
-
},
|
|
1367
|
+
}, S = (U) => {
|
|
1362
1368
|
U.stopPropagation();
|
|
1363
1369
|
};
|
|
1364
|
-
return /* @__PURE__ */
|
|
1370
|
+
return /* @__PURE__ */ C(
|
|
1365
1371
|
"div",
|
|
1366
1372
|
{
|
|
1367
1373
|
className: "fixed inset-0 z-50 overflow-y-auto",
|
|
@@ -1370,25 +1376,25 @@ const V2 = ({
|
|
|
1370
1376
|
/* @__PURE__ */ t(
|
|
1371
1377
|
"div",
|
|
1372
1378
|
{
|
|
1373
|
-
className: `fixed inset-0 transition-opacity duration-200 ease-out ${
|
|
1379
|
+
className: `fixed inset-0 transition-opacity duration-200 ease-out ${h ? "opacity-100" : "opacity-0"}`,
|
|
1374
1380
|
style: H
|
|
1375
1381
|
}
|
|
1376
1382
|
),
|
|
1377
|
-
/* @__PURE__ */ t("div", { className: `flex min-h-full items-center justify-center p-4 ${
|
|
1383
|
+
/* @__PURE__ */ t("div", { className: `flex min-h-full items-center justify-center p-4 ${m ? "items-center" : "items-start pt-20"}`, children: /* @__PURE__ */ C(
|
|
1378
1384
|
"div",
|
|
1379
1385
|
{
|
|
1380
|
-
className: `relative rounded-lg shadow-xl transition-all duration-200 ease-out overflow-y-auto ${
|
|
1381
|
-
style: { ..._, maxHeight: typeof
|
|
1382
|
-
onClick:
|
|
1386
|
+
className: `relative rounded-lg shadow-xl transition-all duration-200 ease-out overflow-y-auto ${h ? "opacity-100 scale-100 translate-y-0" : "opacity-0 scale-95 -translate-y-4"} ${u}`,
|
|
1387
|
+
style: { ..._, maxHeight: typeof f == "number" ? `${f}px` : f },
|
|
1388
|
+
onClick: S,
|
|
1383
1389
|
children: [
|
|
1384
|
-
(o ||
|
|
1390
|
+
(o || a) && /* @__PURE__ */ C(
|
|
1385
1391
|
"div",
|
|
1386
1392
|
{
|
|
1387
1393
|
className: `flex items-center justify-between px-6 py-4 border-b border-gray-200 ${w}`,
|
|
1388
1394
|
style: B,
|
|
1389
1395
|
children: [
|
|
1390
1396
|
o && /* @__PURE__ */ t("h3", { className: "text-lg font-semibold text-gray-900", children: o }),
|
|
1391
|
-
|
|
1397
|
+
a && /* @__PURE__ */ t(
|
|
1392
1398
|
"button",
|
|
1393
1399
|
{
|
|
1394
1400
|
onClick: r,
|
|
@@ -1419,7 +1425,7 @@ const V2 = ({
|
|
|
1419
1425
|
/* @__PURE__ */ t(
|
|
1420
1426
|
"div",
|
|
1421
1427
|
{
|
|
1422
|
-
className: `px-6 py-4 ${
|
|
1428
|
+
className: `px-6 py-4 ${g}`,
|
|
1423
1429
|
children: n
|
|
1424
1430
|
}
|
|
1425
1431
|
),
|
|
@@ -1436,15 +1442,15 @@ const V2 = ({
|
|
|
1436
1442
|
size: o = "md",
|
|
1437
1443
|
dot: n = !1,
|
|
1438
1444
|
icon: s,
|
|
1439
|
-
iconPosition:
|
|
1445
|
+
iconPosition: i = "left",
|
|
1440
1446
|
className: l = "",
|
|
1441
|
-
bgColor:
|
|
1447
|
+
bgColor: a,
|
|
1442
1448
|
textColor: c,
|
|
1443
|
-
borderColor:
|
|
1444
|
-
rounded:
|
|
1445
|
-
style:
|
|
1449
|
+
borderColor: m,
|
|
1450
|
+
rounded: u = "full",
|
|
1451
|
+
style: x
|
|
1446
1452
|
}) => {
|
|
1447
|
-
const
|
|
1453
|
+
const v = {
|
|
1448
1454
|
default: "bg-gray-100 text-[#181918]",
|
|
1449
1455
|
primary: "bg-[#FCEAE9] text-[#EC615B]",
|
|
1450
1456
|
success: "bg-green-100 text-green-800",
|
|
@@ -1456,7 +1462,7 @@ const V2 = ({
|
|
|
1456
1462
|
md: "px-2.5 py-1 text-sm",
|
|
1457
1463
|
lg: "px-3 py-1.5 text-base",
|
|
1458
1464
|
responsive: "px-1.5 py-0.5 text-[10px] sm:px-2 sm:py-0.5 sm:text-xs md:px-2.5 md:py-1 md:text-sm lg:px-3 lg:py-1.5 lg:text-base"
|
|
1459
|
-
},
|
|
1465
|
+
}, g = {
|
|
1460
1466
|
sm: "w-1.5 h-1.5",
|
|
1461
1467
|
md: "w-2 h-2",
|
|
1462
1468
|
lg: "w-2.5 h-2.5",
|
|
@@ -1468,33 +1474,33 @@ const V2 = ({
|
|
|
1468
1474
|
warning: "bg-yellow-600",
|
|
1469
1475
|
danger: "bg-red-600",
|
|
1470
1476
|
info: "bg-cyan-600"
|
|
1471
|
-
},
|
|
1477
|
+
}, f = {
|
|
1472
1478
|
sm: "w-3 h-3",
|
|
1473
1479
|
md: "w-3.5 h-3.5",
|
|
1474
1480
|
lg: "w-4 h-4",
|
|
1475
1481
|
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"
|
|
1476
|
-
},
|
|
1482
|
+
}, b = {
|
|
1477
1483
|
none: "rounded-none",
|
|
1478
1484
|
sm: "rounded-sm",
|
|
1479
1485
|
md: "rounded-md",
|
|
1480
1486
|
lg: "rounded-lg",
|
|
1481
1487
|
full: "rounded-full"
|
|
1482
|
-
},
|
|
1483
|
-
...
|
|
1488
|
+
}, y = {
|
|
1489
|
+
...a && { backgroundColor: a },
|
|
1484
1490
|
...c && { color: c },
|
|
1485
|
-
...
|
|
1486
|
-
...
|
|
1491
|
+
...m && { borderColor: m, borderWidth: "1px", borderStyle: "solid" },
|
|
1492
|
+
...x
|
|
1487
1493
|
};
|
|
1488
|
-
return /* @__PURE__ */
|
|
1494
|
+
return /* @__PURE__ */ C(
|
|
1489
1495
|
"span",
|
|
1490
1496
|
{
|
|
1491
|
-
className: `inline-flex items-center gap-1.5 font-medium transition-all duration-200 ${
|
|
1492
|
-
style:
|
|
1497
|
+
className: `inline-flex items-center gap-1.5 font-medium transition-all duration-200 ${a ? "" : v[r]} ${L[o]} ${b[u]} ${l}`,
|
|
1498
|
+
style: y,
|
|
1493
1499
|
children: [
|
|
1494
|
-
n && /* @__PURE__ */ t("span", { className: `rounded-full ${
|
|
1495
|
-
s &&
|
|
1500
|
+
n && /* @__PURE__ */ t("span", { className: `rounded-full ${g[o]} ${w[r]}` }),
|
|
1501
|
+
s && i === "left" && /* @__PURE__ */ t("span", { className: `inline-flex items-center ${f[o]}`, children: s }),
|
|
1496
1502
|
e,
|
|
1497
|
-
s &&
|
|
1503
|
+
s && i === "right" && /* @__PURE__ */ t("span", { className: `inline-flex items-center ${f[o]}`, children: s })
|
|
1498
1504
|
]
|
|
1499
1505
|
}
|
|
1500
1506
|
);
|
|
@@ -1504,20 +1510,20 @@ const V2 = ({
|
|
|
1504
1510
|
direction: o = "vertical",
|
|
1505
1511
|
size: n = "md",
|
|
1506
1512
|
variant: s = "default",
|
|
1507
|
-
className:
|
|
1513
|
+
className: i = "",
|
|
1508
1514
|
style: l,
|
|
1509
|
-
finishColor:
|
|
1515
|
+
finishColor: a,
|
|
1510
1516
|
processColor: c,
|
|
1511
|
-
waitColor:
|
|
1512
|
-
errorColor:
|
|
1513
|
-
lineColor:
|
|
1517
|
+
waitColor: m,
|
|
1518
|
+
errorColor: u,
|
|
1519
|
+
lineColor: x
|
|
1514
1520
|
}) => {
|
|
1515
|
-
const
|
|
1521
|
+
const v = (y, h) => h.status ? h.status : y < r ? "finish" : y === r ? "process" : "wait", L = {
|
|
1516
1522
|
sm: "w-6 h-6",
|
|
1517
1523
|
md: "w-8 h-8",
|
|
1518
1524
|
lg: "w-10 h-10",
|
|
1519
1525
|
responsive: "w-6 h-6 sm:w-7 sm:h-7 md:w-8 md:h-8 lg:w-10 lg:h-10"
|
|
1520
|
-
},
|
|
1526
|
+
}, g = {
|
|
1521
1527
|
sm: "text-sm",
|
|
1522
1528
|
md: "text-base",
|
|
1523
1529
|
lg: "text-lg",
|
|
@@ -1527,130 +1533,130 @@ const V2 = ({
|
|
|
1527
1533
|
md: "text-sm",
|
|
1528
1534
|
lg: "text-base",
|
|
1529
1535
|
responsive: "text-xs sm:text-xs md:text-sm lg:text-base"
|
|
1530
|
-
},
|
|
1536
|
+
}, f = (y, h) => h || (y === "finish" ? /* @__PURE__ */ t("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ t(
|
|
1531
1537
|
"path",
|
|
1532
1538
|
{
|
|
1533
1539
|
fillRule: "evenodd",
|
|
1534
1540
|
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
1535
1541
|
clipRule: "evenodd"
|
|
1536
1542
|
}
|
|
1537
|
-
) }) :
|
|
1543
|
+
) }) : y === "error" ? /* @__PURE__ */ t("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ t(
|
|
1538
1544
|
"path",
|
|
1539
1545
|
{
|
|
1540
1546
|
fillRule: "evenodd",
|
|
1541
1547
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
1542
1548
|
clipRule: "evenodd"
|
|
1543
1549
|
}
|
|
1544
|
-
) }) : null),
|
|
1545
|
-
const
|
|
1546
|
-
switch (
|
|
1550
|
+
) }) : null), b = (y) => {
|
|
1551
|
+
const h = s === "outline";
|
|
1552
|
+
switch (y) {
|
|
1547
1553
|
case "finish":
|
|
1548
1554
|
return {
|
|
1549
|
-
icon:
|
|
1555
|
+
icon: h ? `bg-white text-white border ${a ? `border-[${a}]` : "border-green-500"}` : `${a ? `bg-[${a}]` : "bg-green-500"} text-white ${a ? `border-[${a}]` : "border-green-500"}`,
|
|
1550
1556
|
title: "text-[#181918]",
|
|
1551
1557
|
description: "text-gray-600",
|
|
1552
|
-
line:
|
|
1553
|
-
iconColor:
|
|
1558
|
+
line: x ? `bg-[${x}]` : "bg-green-500",
|
|
1559
|
+
iconColor: a
|
|
1554
1560
|
};
|
|
1555
1561
|
case "process":
|
|
1556
1562
|
return {
|
|
1557
|
-
icon:
|
|
1563
|
+
icon: h ? `bg-white text-white border ${c ? `border-[${c}]` : "border-[#EC615B]"}` : `${c ? `bg-[${c}]` : "bg-[#EC615B]"} text-white ${c ? `border-[${c}]` : "border-[#EC615B]"}`,
|
|
1558
1564
|
title: "text-[#181918] font-semibold",
|
|
1559
1565
|
description: "text-gray-700",
|
|
1560
|
-
line:
|
|
1566
|
+
line: x ? `bg-[${x}]` : "bg-gray-300",
|
|
1561
1567
|
iconColor: c
|
|
1562
1568
|
};
|
|
1563
1569
|
case "error":
|
|
1564
1570
|
return {
|
|
1565
|
-
icon:
|
|
1571
|
+
icon: h ? `bg-white text-white border ${u ? `border-[${u}]` : "border-red-500"}` : `${u ? `bg-[${u}]` : "bg-red-500"} text-white ${u ? `border-[${u}]` : "border-red-500"}`,
|
|
1566
1572
|
title: "text-red-600",
|
|
1567
1573
|
description: "text-red-500",
|
|
1568
|
-
line:
|
|
1569
|
-
iconColor:
|
|
1574
|
+
line: x ? `bg-[${x}]` : "bg-gray-300",
|
|
1575
|
+
iconColor: u
|
|
1570
1576
|
};
|
|
1571
1577
|
default:
|
|
1572
1578
|
return {
|
|
1573
1579
|
icon: "bg-white text-gray-400 border-gray-300",
|
|
1574
1580
|
title: "text-gray-500",
|
|
1575
1581
|
description: "text-gray-400",
|
|
1576
|
-
line:
|
|
1577
|
-
iconColor:
|
|
1582
|
+
line: x ? `bg-[${x}]` : "bg-gray-300",
|
|
1583
|
+
iconColor: m
|
|
1578
1584
|
};
|
|
1579
1585
|
}
|
|
1580
1586
|
};
|
|
1581
|
-
return o === "horizontal" ? /* @__PURE__ */ t("div", { className: `flex items-start ${
|
|
1582
|
-
const k =
|
|
1583
|
-
return
|
|
1584
|
-
/* @__PURE__ */
|
|
1587
|
+
return o === "horizontal" ? /* @__PURE__ */ t("div", { className: `flex items-start ${i}`, style: l, children: e.map((y, h) => {
|
|
1588
|
+
const k = v(h, y), p = b(k), d = h === e.length - 1, _ = {};
|
|
1589
|
+
return p.iconColor && (_.color = p.iconColor), /* @__PURE__ */ C("div", { className: "flex flex-1 items-start", children: [
|
|
1590
|
+
/* @__PURE__ */ C("div", { className: "flex flex-col items-center", children: [
|
|
1585
1591
|
/* @__PURE__ */ t(
|
|
1586
1592
|
"div",
|
|
1587
1593
|
{
|
|
1588
|
-
className: `flex items-center justify-center ${L[n]} rounded-full border transition-all duration-300 ${
|
|
1594
|
+
className: `flex items-center justify-center ${L[n]} rounded-full border transition-all duration-300 ${p.icon}`,
|
|
1589
1595
|
style: _,
|
|
1590
|
-
children:
|
|
1596
|
+
children: f(k, y.icon)
|
|
1591
1597
|
}
|
|
1592
1598
|
),
|
|
1593
|
-
/* @__PURE__ */
|
|
1599
|
+
/* @__PURE__ */ C("div", { className: "mt-2 text-center", children: [
|
|
1594
1600
|
/* @__PURE__ */ t(
|
|
1595
1601
|
"div",
|
|
1596
1602
|
{
|
|
1597
|
-
className: `${
|
|
1598
|
-
children:
|
|
1603
|
+
className: `${g[n]} ${p.title} transition-colors duration-300`,
|
|
1604
|
+
children: y.title
|
|
1599
1605
|
}
|
|
1600
1606
|
),
|
|
1601
|
-
|
|
1607
|
+
y.description && /* @__PURE__ */ t(
|
|
1602
1608
|
"div",
|
|
1603
1609
|
{
|
|
1604
|
-
className: `${w[n]} ${
|
|
1605
|
-
children:
|
|
1610
|
+
className: `${w[n]} ${p.description} mt-1 transition-colors duration-300`,
|
|
1611
|
+
children: y.description
|
|
1606
1612
|
}
|
|
1607
1613
|
)
|
|
1608
1614
|
] })
|
|
1609
1615
|
] }),
|
|
1610
|
-
!
|
|
1616
|
+
!d && /* @__PURE__ */ t(
|
|
1611
1617
|
"div",
|
|
1612
1618
|
{
|
|
1613
|
-
className: `flex-1 h-0.5 mt-4 mx-2 ${
|
|
1619
|
+
className: `flex-1 h-0.5 mt-4 mx-2 ${p.line} transition-colors duration-300`
|
|
1614
1620
|
}
|
|
1615
1621
|
)
|
|
1616
|
-
] },
|
|
1617
|
-
}) }) : /* @__PURE__ */ t("div", { className: `flex flex-col ${
|
|
1618
|
-
const k =
|
|
1619
|
-
return
|
|
1620
|
-
/* @__PURE__ */
|
|
1622
|
+
] }, h);
|
|
1623
|
+
}) }) : /* @__PURE__ */ t("div", { className: `flex flex-col ${i}`, style: l, children: e.map((y, h) => {
|
|
1624
|
+
const k = v(h, y), p = b(k), d = h === e.length - 1, _ = {};
|
|
1625
|
+
return p.iconColor && (_.color = p.iconColor), /* @__PURE__ */ C("div", { className: "flex", children: [
|
|
1626
|
+
/* @__PURE__ */ C("div", { className: "flex flex-col items-center mr-4", children: [
|
|
1621
1627
|
/* @__PURE__ */ t(
|
|
1622
1628
|
"div",
|
|
1623
1629
|
{
|
|
1624
|
-
className: `flex items-center justify-center ${L[n]} rounded-full border transition-all duration-300 ${
|
|
1630
|
+
className: `flex items-center justify-center ${L[n]} rounded-full border transition-all duration-300 ${p.icon}`,
|
|
1625
1631
|
style: _,
|
|
1626
|
-
children:
|
|
1632
|
+
children: f(k, y.icon)
|
|
1627
1633
|
}
|
|
1628
1634
|
),
|
|
1629
|
-
!
|
|
1635
|
+
!d && /* @__PURE__ */ t(
|
|
1630
1636
|
"div",
|
|
1631
1637
|
{
|
|
1632
|
-
className: `w-0.5 flex-1 my-1 ${
|
|
1638
|
+
className: `w-0.5 flex-1 my-1 ${p.line} transition-colors duration-300`,
|
|
1633
1639
|
style: { minHeight: "20px" }
|
|
1634
1640
|
}
|
|
1635
1641
|
)
|
|
1636
1642
|
] }),
|
|
1637
|
-
/* @__PURE__ */
|
|
1643
|
+
/* @__PURE__ */ C("div", { className: "flex-1 pb-6", children: [
|
|
1638
1644
|
/* @__PURE__ */ t(
|
|
1639
1645
|
"div",
|
|
1640
1646
|
{
|
|
1641
|
-
className: `${
|
|
1642
|
-
children:
|
|
1647
|
+
className: `${g[n]} ${p.title} transition-colors duration-300`,
|
|
1648
|
+
children: y.title
|
|
1643
1649
|
}
|
|
1644
1650
|
),
|
|
1645
|
-
|
|
1651
|
+
y.description && /* @__PURE__ */ t(
|
|
1646
1652
|
"div",
|
|
1647
1653
|
{
|
|
1648
|
-
className: `${w[n]} ${
|
|
1649
|
-
children:
|
|
1654
|
+
className: `${w[n]} ${p.description} mt-1 transition-colors duration-300`,
|
|
1655
|
+
children: y.description
|
|
1650
1656
|
}
|
|
1651
1657
|
)
|
|
1652
1658
|
] })
|
|
1653
|
-
] },
|
|
1659
|
+
] }, h);
|
|
1654
1660
|
}) });
|
|
1655
1661
|
}, Z0 = ({
|
|
1656
1662
|
percent: e = 0,
|
|
@@ -1658,16 +1664,16 @@ const V2 = ({
|
|
|
1658
1664
|
showInfo: o = !0,
|
|
1659
1665
|
strokeColor: n,
|
|
1660
1666
|
strokeWidth: s,
|
|
1661
|
-
size:
|
|
1667
|
+
size: i = "md",
|
|
1662
1668
|
className: l = "",
|
|
1663
|
-
format:
|
|
1669
|
+
format: a,
|
|
1664
1670
|
bgColor: c,
|
|
1665
|
-
successColor:
|
|
1666
|
-
exceptionColor:
|
|
1667
|
-
trackColor:
|
|
1668
|
-
rounded:
|
|
1671
|
+
successColor: m,
|
|
1672
|
+
exceptionColor: u,
|
|
1673
|
+
trackColor: x,
|
|
1674
|
+
rounded: v = "full"
|
|
1669
1675
|
}) => {
|
|
1670
|
-
const L = Math.min(100, Math.max(0, e)),
|
|
1676
|
+
const L = Math.min(100, Math.max(0, e)), g = {
|
|
1671
1677
|
sm: "h-1.5",
|
|
1672
1678
|
md: "h-2",
|
|
1673
1679
|
lg: "h-3",
|
|
@@ -1677,25 +1683,25 @@ const V2 = ({
|
|
|
1677
1683
|
md: "text-sm",
|
|
1678
1684
|
lg: "text-base",
|
|
1679
1685
|
responsive: "text-xs sm:text-sm md:text-base lg:text-lg"
|
|
1680
|
-
},
|
|
1686
|
+
}, f = {
|
|
1681
1687
|
none: "rounded-none",
|
|
1682
1688
|
sm: "rounded-sm",
|
|
1683
1689
|
md: "rounded-md",
|
|
1684
1690
|
lg: "rounded-lg",
|
|
1685
1691
|
full: "rounded-full"
|
|
1686
|
-
},
|
|
1692
|
+
}, b = () => {
|
|
1687
1693
|
if (n) return n;
|
|
1688
1694
|
switch (r) {
|
|
1689
1695
|
case "success":
|
|
1690
|
-
return
|
|
1696
|
+
return m || "bg-green-500";
|
|
1691
1697
|
case "exception":
|
|
1692
|
-
return
|
|
1698
|
+
return u || "bg-red-500";
|
|
1693
1699
|
case "active":
|
|
1694
1700
|
return c || "bg-[#EC615B]";
|
|
1695
1701
|
default:
|
|
1696
|
-
return L === 100 ?
|
|
1702
|
+
return L === 100 ? m || "bg-green-500" : c || "bg-[#EC615B]";
|
|
1697
1703
|
}
|
|
1698
|
-
},
|
|
1704
|
+
}, y = () => x || "bg-gray-200", h = () => r === "success" || L === 100 ? /* @__PURE__ */ t("svg", { className: "w-4 h-4 text-green-500", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ t(
|
|
1699
1705
|
"path",
|
|
1700
1706
|
{
|
|
1701
1707
|
fillRule: "evenodd",
|
|
@@ -1709,26 +1715,26 @@ const V2 = ({
|
|
|
1709
1715
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",
|
|
1710
1716
|
clipRule: "evenodd"
|
|
1711
1717
|
}
|
|
1712
|
-
) }) : null, k = () =>
|
|
1713
|
-
return /* @__PURE__ */
|
|
1718
|
+
) }) : null, k = () => a ? a(L) : `${Math.round(L)}%`, p = s ? `${s}px` : void 0;
|
|
1719
|
+
return /* @__PURE__ */ C("div", { className: `flex items-center gap-2 ${l}`, children: [
|
|
1714
1720
|
/* @__PURE__ */ t("div", { className: "flex-1", children: /* @__PURE__ */ t(
|
|
1715
1721
|
"div",
|
|
1716
1722
|
{
|
|
1717
|
-
className: `w-full overflow-hidden ${
|
|
1718
|
-
style: { height:
|
|
1723
|
+
className: `w-full overflow-hidden ${g[i]} ${f[v]} ${y()}`,
|
|
1724
|
+
style: { height: p },
|
|
1719
1725
|
children: /* @__PURE__ */ t(
|
|
1720
1726
|
"div",
|
|
1721
1727
|
{
|
|
1722
|
-
className: `${
|
|
1728
|
+
className: `${b()} ${g[i]} ${f[v]} transition-all duration-300 ease-out ${r === "active" ? "progress-active" : ""}`,
|
|
1723
1729
|
style: {
|
|
1724
1730
|
width: `${L}%`,
|
|
1725
|
-
height:
|
|
1731
|
+
height: p
|
|
1726
1732
|
}
|
|
1727
1733
|
}
|
|
1728
1734
|
)
|
|
1729
1735
|
}
|
|
1730
1736
|
) }),
|
|
1731
|
-
o && /* @__PURE__ */ t("div", { className: `flex items-center gap-1 ${w[
|
|
1737
|
+
o && /* @__PURE__ */ t("div", { className: `flex items-center gap-1 ${w[i]} text-gray-600 font-normal`, children: h() || k() })
|
|
1732
1738
|
] });
|
|
1733
1739
|
}, z0 = ({
|
|
1734
1740
|
checked: e,
|
|
@@ -1736,90 +1742,90 @@ const V2 = ({
|
|
|
1736
1742
|
onChange: o,
|
|
1737
1743
|
disabled: n = !1,
|
|
1738
1744
|
indeterminate: s = !1,
|
|
1739
|
-
size:
|
|
1745
|
+
size: i = "md",
|
|
1740
1746
|
variant: l = "filled",
|
|
1741
|
-
className:
|
|
1747
|
+
className: a = "",
|
|
1742
1748
|
id: c,
|
|
1743
|
-
name:
|
|
1744
|
-
value:
|
|
1745
|
-
checkedColor:
|
|
1746
|
-
uncheckedColor:
|
|
1749
|
+
name: m,
|
|
1750
|
+
value: u,
|
|
1751
|
+
checkedColor: x = "#EC615B",
|
|
1752
|
+
uncheckedColor: v = "#ffffff",
|
|
1747
1753
|
checkedBorderColor: L = "#EC615B",
|
|
1748
|
-
style:
|
|
1754
|
+
style: g
|
|
1749
1755
|
}) => {
|
|
1750
|
-
const [w,
|
|
1756
|
+
const [w, f] = O(r), b = e !== void 0, y = b ? e : w, h = (Z) => {
|
|
1751
1757
|
if (n) return;
|
|
1752
|
-
const
|
|
1753
|
-
|
|
1758
|
+
const S = Z.target.checked;
|
|
1759
|
+
b || f(S), o == null || o(S);
|
|
1754
1760
|
}, k = {
|
|
1755
1761
|
sm: "w-4 h-4",
|
|
1756
1762
|
md: "w-5 h-5",
|
|
1757
1763
|
lg: "w-6 h-6",
|
|
1758
1764
|
responsive: "w-4 h-4 sm:w-5 sm:h-5 lg:w-6 lg:h-6"
|
|
1759
|
-
},
|
|
1765
|
+
}, p = {
|
|
1760
1766
|
sm: "w-3 h-3",
|
|
1761
1767
|
md: "w-3.5 h-3.5",
|
|
1762
1768
|
lg: "w-4 h-4",
|
|
1763
1769
|
responsive: "w-2.5 h-2.5 sm:w-3.5 sm:h-3.5 lg:w-4 lg:h-4"
|
|
1764
|
-
},
|
|
1765
|
-
if (!n && !(!
|
|
1766
|
-
return
|
|
1770
|
+
}, d = l === "filled", _ = () => n ? "cursor-not-allowed opacity-50 border-gray-300 bg-gray-100" : !y && !s ? "border-gray-300 bg-white hover:border-gray-400" : "", B = () => {
|
|
1771
|
+
if (!n && !(!y && !s))
|
|
1772
|
+
return d ? {
|
|
1767
1773
|
borderColor: L,
|
|
1768
|
-
backgroundColor:
|
|
1774
|
+
backgroundColor: x
|
|
1769
1775
|
} : {
|
|
1770
1776
|
borderColor: L,
|
|
1771
|
-
backgroundColor:
|
|
1777
|
+
backgroundColor: v
|
|
1772
1778
|
};
|
|
1773
|
-
}, H = () =>
|
|
1774
|
-
return /* @__PURE__ */
|
|
1779
|
+
}, H = () => d && (y || s) ? "text-white" : "";
|
|
1780
|
+
return /* @__PURE__ */ C("div", { className: "inline-flex items-center", style: g, children: [
|
|
1775
1781
|
/* @__PURE__ */ t(
|
|
1776
1782
|
"input",
|
|
1777
1783
|
{
|
|
1778
1784
|
type: "checkbox",
|
|
1779
1785
|
id: c,
|
|
1780
|
-
name:
|
|
1781
|
-
value:
|
|
1782
|
-
checked:
|
|
1783
|
-
onChange:
|
|
1786
|
+
name: m,
|
|
1787
|
+
value: u,
|
|
1788
|
+
checked: y,
|
|
1789
|
+
onChange: h,
|
|
1784
1790
|
disabled: n,
|
|
1785
1791
|
className: "sr-only"
|
|
1786
1792
|
}
|
|
1787
1793
|
),
|
|
1788
|
-
/* @__PURE__ */
|
|
1794
|
+
/* @__PURE__ */ C(
|
|
1789
1795
|
"label",
|
|
1790
1796
|
{
|
|
1791
1797
|
htmlFor: c,
|
|
1792
1798
|
className: `
|
|
1793
1799
|
relative flex items-center justify-center
|
|
1794
|
-
${k[
|
|
1800
|
+
${k[i]}
|
|
1795
1801
|
${l === "outline" ? "border" : "border-2"}
|
|
1796
1802
|
rounded
|
|
1797
1803
|
transition-all duration-200 ease-out
|
|
1798
1804
|
cursor-pointer
|
|
1799
1805
|
${_()}
|
|
1800
|
-
${
|
|
1806
|
+
${a}
|
|
1801
1807
|
`,
|
|
1802
1808
|
style: B(),
|
|
1803
1809
|
children: [
|
|
1804
|
-
|
|
1810
|
+
y && !s && /* @__PURE__ */ t(
|
|
1805
1811
|
"svg",
|
|
1806
1812
|
{
|
|
1807
|
-
className: `${
|
|
1813
|
+
className: `${p[i]} ${H()}`,
|
|
1808
1814
|
fill: "none",
|
|
1809
1815
|
stroke: "currentColor",
|
|
1810
1816
|
viewBox: "0 0 24 24",
|
|
1811
1817
|
strokeWidth: 3,
|
|
1812
|
-
style: !
|
|
1818
|
+
style: !d && (y || s) ? { color: x } : void 0,
|
|
1813
1819
|
children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })
|
|
1814
1820
|
}
|
|
1815
1821
|
),
|
|
1816
1822
|
s && /* @__PURE__ */ t(
|
|
1817
1823
|
"svg",
|
|
1818
1824
|
{
|
|
1819
|
-
className: `${
|
|
1825
|
+
className: `${p[i]} ${H()}`,
|
|
1820
1826
|
fill: "currentColor",
|
|
1821
1827
|
viewBox: "0 0 24 24",
|
|
1822
|
-
style: !
|
|
1828
|
+
style: !d && (y || s) ? { color: x } : void 0,
|
|
1823
1829
|
children: /* @__PURE__ */ t("rect", { x: "4", y: "11", width: "16", height: "2", rx: "1" })
|
|
1824
1830
|
}
|
|
1825
1831
|
)
|
|
@@ -1872,25 +1878,25 @@ const V2 = ({
|
|
|
1872
1878
|
emptyMessage: o = "No items selected",
|
|
1873
1879
|
className: n = "",
|
|
1874
1880
|
itemClassName: s = "",
|
|
1875
|
-
maxHeight:
|
|
1881
|
+
maxHeight: i = "300px",
|
|
1876
1882
|
size: l = "md",
|
|
1877
|
-
bgColor:
|
|
1883
|
+
bgColor: a,
|
|
1878
1884
|
hoverBgColor: c,
|
|
1879
|
-
textColor:
|
|
1880
|
-
sublabelColor:
|
|
1881
|
-
removeButtonColor:
|
|
1882
|
-
removeButtonHoverColor:
|
|
1885
|
+
textColor: m,
|
|
1886
|
+
sublabelColor: u,
|
|
1887
|
+
removeButtonColor: x,
|
|
1888
|
+
removeButtonHoverColor: v,
|
|
1883
1889
|
rounded: L = "md",
|
|
1884
|
-
style:
|
|
1890
|
+
style: g
|
|
1885
1891
|
}) => {
|
|
1886
|
-
const w = e0(l),
|
|
1892
|
+
const w = e0(l), f = t0(L), b = "#F4F4F4", y = "#EBEBEB", h = "#181918", k = "#999999", p = "#9CA3AF", d = "#EC615B", _ = a || b, B = c || y, H = m || h, Z = u || k, S = x || p, U = v || d;
|
|
1887
1893
|
return e.length === 0 ? /* @__PURE__ */ t(
|
|
1888
1894
|
"div",
|
|
1889
1895
|
{
|
|
1890
1896
|
className: `text-center py-8 text-gray-500 text-sm ${n}`,
|
|
1891
1897
|
style: {
|
|
1892
1898
|
color: Z,
|
|
1893
|
-
...
|
|
1899
|
+
...g
|
|
1894
1900
|
},
|
|
1895
1901
|
children: o
|
|
1896
1902
|
}
|
|
@@ -1898,13 +1904,13 @@ const V2 = ({
|
|
|
1898
1904
|
"div",
|
|
1899
1905
|
{
|
|
1900
1906
|
className: `overflow-y-auto ${w.container} ${n}`,
|
|
1901
|
-
style: { maxHeight:
|
|
1902
|
-
children: e.map((E, M) => /* @__PURE__ */
|
|
1907
|
+
style: { maxHeight: i, ...g },
|
|
1908
|
+
children: e.map((E, M) => /* @__PURE__ */ C(
|
|
1903
1909
|
"div",
|
|
1904
1910
|
{
|
|
1905
1911
|
className: `
|
|
1906
1912
|
group flex items-center justify-between
|
|
1907
|
-
${
|
|
1913
|
+
${f}
|
|
1908
1914
|
transition-all duration-300 ease-out
|
|
1909
1915
|
hover:shadow-sm
|
|
1910
1916
|
animate-slide-in-item
|
|
@@ -1914,14 +1920,14 @@ const V2 = ({
|
|
|
1914
1920
|
backgroundColor: _,
|
|
1915
1921
|
animationDelay: `${M * 50}ms`
|
|
1916
1922
|
},
|
|
1917
|
-
onMouseEnter: (
|
|
1918
|
-
|
|
1923
|
+
onMouseEnter: ($) => {
|
|
1924
|
+
$.currentTarget.style.backgroundColor = B;
|
|
1919
1925
|
},
|
|
1920
|
-
onMouseLeave: (
|
|
1921
|
-
|
|
1926
|
+
onMouseLeave: ($) => {
|
|
1927
|
+
$.currentTarget.style.backgroundColor = _;
|
|
1922
1928
|
},
|
|
1923
1929
|
children: [
|
|
1924
|
-
/* @__PURE__ */
|
|
1930
|
+
/* @__PURE__ */ C("div", { className: `flex-1 min-w-0 ${w.item}`, children: [
|
|
1925
1931
|
E.sublabel && /* @__PURE__ */ t(
|
|
1926
1932
|
"div",
|
|
1927
1933
|
{
|
|
@@ -1953,13 +1959,13 @@ const V2 = ({
|
|
|
1953
1959
|
${w.button}
|
|
1954
1960
|
`,
|
|
1955
1961
|
style: {
|
|
1956
|
-
color:
|
|
1962
|
+
color: S
|
|
1957
1963
|
},
|
|
1958
|
-
onMouseEnter: (
|
|
1959
|
-
|
|
1964
|
+
onMouseEnter: ($) => {
|
|
1965
|
+
$.currentTarget.style.backgroundColor = "white", $.currentTarget.style.color = U;
|
|
1960
1966
|
},
|
|
1961
|
-
onMouseLeave: (
|
|
1962
|
-
|
|
1967
|
+
onMouseLeave: ($) => {
|
|
1968
|
+
$.currentTarget.style.backgroundColor = "transparent", $.currentTarget.style.color = S;
|
|
1963
1969
|
},
|
|
1964
1970
|
"aria-label": `Remove ${E.label}`,
|
|
1965
1971
|
children: /* @__PURE__ */ t(
|
|
@@ -1994,12 +2000,12 @@ const V2 = ({
|
|
|
1994
2000
|
helperText: o,
|
|
1995
2001
|
className: n = "",
|
|
1996
2002
|
status: s,
|
|
1997
|
-
required:
|
|
2003
|
+
required: i,
|
|
1998
2004
|
...l
|
|
1999
|
-
},
|
|
2000
|
-
e && /* @__PURE__ */
|
|
2005
|
+
}, a) => /* @__PURE__ */ C("div", { className: "w-full", children: [
|
|
2006
|
+
e && /* @__PURE__ */ C("label", { className: "block text-sm font-medium mb-2", style: { color: r ? "#C21919" : "#181918" }, children: [
|
|
2001
2007
|
e,
|
|
2002
|
-
|
|
2008
|
+
i && /* @__PURE__ */ t("span", { style: { color: "#C21919" }, children: "*" })
|
|
2003
2009
|
] }),
|
|
2004
2010
|
/* @__PURE__ */ t("style", { children: r && `
|
|
2005
2011
|
.input-error-state .ant-input-group-addon {
|
|
@@ -2020,7 +2026,7 @@ const V2 = ({
|
|
|
2020
2026
|
/* @__PURE__ */ t(
|
|
2021
2027
|
q,
|
|
2022
2028
|
{
|
|
2023
|
-
ref:
|
|
2029
|
+
ref: a,
|
|
2024
2030
|
className: `${n} ${r ? "input-error-state" : ""}`,
|
|
2025
2031
|
status: r ? "error" : s,
|
|
2026
2032
|
...l,
|
|
@@ -2032,7 +2038,7 @@ const V2 = ({
|
|
|
2032
2038
|
}
|
|
2033
2039
|
}
|
|
2034
2040
|
),
|
|
2035
|
-
r && /* @__PURE__ */
|
|
2041
|
+
r && /* @__PURE__ */ C("div", { className: "flex items-center mt-1 text-xs text-[#C21919]", children: [
|
|
2036
2042
|
/* @__PURE__ */ t(
|
|
2037
2043
|
"svg",
|
|
2038
2044
|
{
|
|
@@ -2061,13 +2067,13 @@ const o0 = ({
|
|
|
2061
2067
|
...n
|
|
2062
2068
|
}) => {
|
|
2063
2069
|
var l;
|
|
2064
|
-
const { field: s, fieldState:
|
|
2070
|
+
const { field: s, fieldState: i } = A({ control: e, name: r });
|
|
2065
2071
|
return /* @__PURE__ */ t(
|
|
2066
2072
|
d2,
|
|
2067
2073
|
{
|
|
2068
2074
|
...n,
|
|
2069
2075
|
...s,
|
|
2070
|
-
error: o ?? ((l =
|
|
2076
|
+
error: o ?? ((l = i.error) == null ? void 0 : l.message)
|
|
2071
2077
|
}
|
|
2072
2078
|
);
|
|
2073
2079
|
}, r0 = V.forwardRef(({ control: e, name: r, ...o }, n) => e && r ? /* @__PURE__ */ t(o0, { control: e, name: r, ...o }) : /* @__PURE__ */ t(d2, { ref: n, name: r, ...o }));
|
|
@@ -2078,14 +2084,14 @@ const p2 = V.forwardRef(({
|
|
|
2078
2084
|
helperText: o,
|
|
2079
2085
|
className: n = "",
|
|
2080
2086
|
status: s,
|
|
2081
|
-
required:
|
|
2087
|
+
required: i,
|
|
2082
2088
|
...l
|
|
2083
|
-
},
|
|
2084
|
-
const
|
|
2085
|
-
return /* @__PURE__ */
|
|
2086
|
-
e && /* @__PURE__ */
|
|
2089
|
+
}, a) => {
|
|
2090
|
+
const m = `password-input-custom ${n} ${r ? "password-input-error-state" : ""}`;
|
|
2091
|
+
return /* @__PURE__ */ C("div", { className: "w-full", children: [
|
|
2092
|
+
e && /* @__PURE__ */ C("label", { className: "block text-sm font-medium mb-2", style: { color: r ? "#C21919" : "#181918" }, children: [
|
|
2087
2093
|
e,
|
|
2088
|
-
|
|
2094
|
+
i && /* @__PURE__ */ t("span", { style: { color: "#C21919" }, children: "*" })
|
|
2089
2095
|
] }),
|
|
2090
2096
|
/* @__PURE__ */ t("style", { children: r && `
|
|
2091
2097
|
.password-input-error-state .ant-input-group-addon {
|
|
@@ -2108,8 +2114,8 @@ const p2 = V.forwardRef(({
|
|
|
2108
2114
|
/* @__PURE__ */ t(
|
|
2109
2115
|
q.Password,
|
|
2110
2116
|
{
|
|
2111
|
-
ref:
|
|
2112
|
-
className:
|
|
2117
|
+
ref: a,
|
|
2118
|
+
className: m,
|
|
2113
2119
|
status: r ? "error" : s,
|
|
2114
2120
|
...l,
|
|
2115
2121
|
style: {
|
|
@@ -2119,7 +2125,7 @@ const p2 = V.forwardRef(({
|
|
|
2119
2125
|
}
|
|
2120
2126
|
}
|
|
2121
2127
|
),
|
|
2122
|
-
r && /* @__PURE__ */
|
|
2128
|
+
r && /* @__PURE__ */ C("div", { className: "flex items-center mt-1 text-xs text-[#C21919]", children: [
|
|
2123
2129
|
/* @__PURE__ */ t(
|
|
2124
2130
|
"svg",
|
|
2125
2131
|
{
|
|
@@ -2149,13 +2155,13 @@ const s0 = ({
|
|
|
2149
2155
|
...n
|
|
2150
2156
|
}) => {
|
|
2151
2157
|
var l;
|
|
2152
|
-
const { field: s, fieldState:
|
|
2158
|
+
const { field: s, fieldState: i } = A({ control: e, name: r });
|
|
2153
2159
|
return /* @__PURE__ */ t(
|
|
2154
2160
|
p2,
|
|
2155
2161
|
{
|
|
2156
2162
|
...n,
|
|
2157
2163
|
...s,
|
|
2158
|
-
error: o ?? ((l =
|
|
2164
|
+
error: o ?? ((l = i.error) == null ? void 0 : l.message)
|
|
2159
2165
|
}
|
|
2160
2166
|
);
|
|
2161
2167
|
}, n0 = V.forwardRef(({ control: e, name: r, ...o }, n) => e && r ? /* @__PURE__ */ t(s0, { control: e, name: r, ...o }) : /* @__PURE__ */ t(p2, { ref: n, name: r, ...o }));
|
|
@@ -2166,67 +2172,67 @@ const M2 = ({
|
|
|
2166
2172
|
onChange: o,
|
|
2167
2173
|
onBlur: n,
|
|
2168
2174
|
onComplete: s,
|
|
2169
|
-
error:
|
|
2175
|
+
error: i = !1,
|
|
2170
2176
|
errorMessage: l,
|
|
2171
|
-
disabled:
|
|
2177
|
+
disabled: a = !1,
|
|
2172
2178
|
className: c = ""
|
|
2173
2179
|
}) => {
|
|
2174
|
-
const [
|
|
2180
|
+
const [m, u] = O(Array(e).fill("")), x = e2([]);
|
|
2175
2181
|
R(() => {
|
|
2176
2182
|
if (r) {
|
|
2177
|
-
const w = r.split("").slice(0, e),
|
|
2178
|
-
f
|
|
2183
|
+
const w = r.split("").slice(0, e), f = [...w, ...Array(e - w.length).fill("")];
|
|
2184
|
+
u(f);
|
|
2179
2185
|
}
|
|
2180
2186
|
}, [r, e]);
|
|
2181
|
-
const
|
|
2182
|
-
var
|
|
2183
|
-
if (
|
|
2184
|
-
const
|
|
2185
|
-
|
|
2186
|
-
const
|
|
2187
|
-
o == null || o(
|
|
2188
|
-
}, L = (w,
|
|
2189
|
-
var
|
|
2190
|
-
|
|
2191
|
-
},
|
|
2192
|
-
var
|
|
2187
|
+
const v = (w, f) => {
|
|
2188
|
+
var h;
|
|
2189
|
+
if (f && !/^\d+$/.test(f)) return;
|
|
2190
|
+
const b = [...m];
|
|
2191
|
+
b[w] = f.slice(-1), u(b);
|
|
2192
|
+
const y = b.join("");
|
|
2193
|
+
o == null || o(y), f && w < e - 1 && ((h = x.current[w + 1]) == null || h.focus()), b.every((k) => k !== "") && (s == null || s(y));
|
|
2194
|
+
}, L = (w, f) => {
|
|
2195
|
+
var b;
|
|
2196
|
+
f.key === "Backspace" && !m[w] && w > 0 && ((b = x.current[w - 1]) == null || b.focus());
|
|
2197
|
+
}, g = (w) => {
|
|
2198
|
+
var p;
|
|
2193
2199
|
w.preventDefault();
|
|
2194
|
-
const
|
|
2195
|
-
if (!/^\d+$/.test(
|
|
2196
|
-
const
|
|
2197
|
-
|
|
2198
|
-
const
|
|
2199
|
-
o == null || o(
|
|
2200
|
-
const k = Math.min(
|
|
2201
|
-
(
|
|
2200
|
+
const f = w.clipboardData.getData("text/plain");
|
|
2201
|
+
if (!/^\d+$/.test(f)) return;
|
|
2202
|
+
const b = f.split("").slice(0, e), y = [...b, ...Array(e - b.length).fill("")];
|
|
2203
|
+
u(y);
|
|
2204
|
+
const h = y.join("");
|
|
2205
|
+
o == null || o(h);
|
|
2206
|
+
const k = Math.min(b.length, e - 1);
|
|
2207
|
+
(p = x.current[k]) == null || p.focus(), y.every((d) => d !== "") && (s == null || s(h));
|
|
2202
2208
|
};
|
|
2203
|
-
return /* @__PURE__ */
|
|
2204
|
-
/* @__PURE__ */ t("div", { className: `flex gap-2 justify-center ${c}`, onBlur: n, children:
|
|
2209
|
+
return /* @__PURE__ */ C("div", { className: "w-full", children: [
|
|
2210
|
+
/* @__PURE__ */ t("div", { className: `flex gap-2 justify-center ${c}`, onBlur: n, children: m.map((w, f) => /* @__PURE__ */ C(V.Fragment, { children: [
|
|
2205
2211
|
/* @__PURE__ */ t(
|
|
2206
2212
|
q,
|
|
2207
2213
|
{
|
|
2208
|
-
ref: (
|
|
2209
|
-
|
|
2214
|
+
ref: (b) => {
|
|
2215
|
+
x.current[f] = b;
|
|
2210
2216
|
},
|
|
2211
2217
|
placeholder: "",
|
|
2212
2218
|
value: w,
|
|
2213
|
-
onChange: (
|
|
2214
|
-
onKeyDown: (
|
|
2215
|
-
onPaste:
|
|
2216
|
-
disabled:
|
|
2219
|
+
onChange: (b) => v(f, b.target.value),
|
|
2220
|
+
onKeyDown: (b) => L(f, b),
|
|
2221
|
+
onPaste: g,
|
|
2222
|
+
disabled: a,
|
|
2217
2223
|
maxLength: 1,
|
|
2218
2224
|
className: "text-center text-lg font-semibold otp-input-field",
|
|
2219
2225
|
style: {
|
|
2220
2226
|
width: "63px",
|
|
2221
2227
|
height: "44px",
|
|
2222
2228
|
borderRadius: "12px",
|
|
2223
|
-
borderColor:
|
|
2229
|
+
borderColor: i ? "#C21919" : "#D1D1D1"
|
|
2224
2230
|
}
|
|
2225
2231
|
}
|
|
2226
2232
|
),
|
|
2227
|
-
|
|
2228
|
-
] },
|
|
2229
|
-
|
|
2233
|
+
f === Math.floor(e / 2) - 1 && /* @__PURE__ */ t("div", { className: "flex items-center justify-center px-1", children: /* @__PURE__ */ t("span", { className: "text-gray-400 text-xl", children: "—" }) })
|
|
2234
|
+
] }, f)) }),
|
|
2235
|
+
i && l && /* @__PURE__ */ C("div", { className: "flex items-center justify-center mt-2 text-xs text-[#C21919]", children: [
|
|
2230
2236
|
/* @__PURE__ */ t("svg", { className: "w-3 h-3 mr-1", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ t(
|
|
2231
2237
|
"path",
|
|
2232
2238
|
{
|
|
@@ -2246,15 +2252,15 @@ const M2 = ({
|
|
|
2246
2252
|
...s
|
|
2247
2253
|
}) => {
|
|
2248
2254
|
var c;
|
|
2249
|
-
const { field:
|
|
2255
|
+
const { field: i, fieldState: l } = A({ control: e, name: r }), a = o ?? !!l.error;
|
|
2250
2256
|
return /* @__PURE__ */ t(
|
|
2251
2257
|
M2,
|
|
2252
2258
|
{
|
|
2253
2259
|
...s,
|
|
2254
|
-
value:
|
|
2255
|
-
onChange:
|
|
2256
|
-
onBlur:
|
|
2257
|
-
error:
|
|
2260
|
+
value: i.value,
|
|
2261
|
+
onChange: i.onChange,
|
|
2262
|
+
onBlur: i.onBlur,
|
|
2263
|
+
error: a,
|
|
2258
2264
|
errorMessage: n ?? ((c = l.error) == null ? void 0 : c.message)
|
|
2259
2265
|
}
|
|
2260
2266
|
);
|
|
@@ -2264,74 +2270,74 @@ const M2 = ({
|
|
|
2264
2270
|
helperText: o,
|
|
2265
2271
|
className: n = "",
|
|
2266
2272
|
countryCode: s = "+234",
|
|
2267
|
-
onCountryCodeChange:
|
|
2273
|
+
onCountryCodeChange: i,
|
|
2268
2274
|
countryCodes: l = [
|
|
2269
2275
|
{ value: "+234", label: "+234" },
|
|
2270
2276
|
{ value: "+1", label: "+1" },
|
|
2271
2277
|
{ value: "+44", label: "+44" },
|
|
2272
2278
|
{ value: "+91", label: "+91" }
|
|
2273
2279
|
],
|
|
2274
|
-
showCountryCodeDropdown:
|
|
2280
|
+
showCountryCodeDropdown: a = !0,
|
|
2275
2281
|
format: c = "spaced",
|
|
2276
|
-
customFormat:
|
|
2277
|
-
value:
|
|
2278
|
-
onChange:
|
|
2279
|
-
...
|
|
2282
|
+
customFormat: m,
|
|
2283
|
+
value: u,
|
|
2284
|
+
onChange: x,
|
|
2285
|
+
...v
|
|
2280
2286
|
}, L) => {
|
|
2281
|
-
const
|
|
2287
|
+
const g = r ? "phone-input-error-state" : "", [w, f] = O("");
|
|
2282
2288
|
R(() => {
|
|
2283
|
-
if (
|
|
2284
|
-
const
|
|
2285
|
-
|
|
2289
|
+
if (u !== void 0) {
|
|
2290
|
+
const p = String(u).replace(/\D/g, ""), d = b(p);
|
|
2291
|
+
f(d);
|
|
2286
2292
|
}
|
|
2287
|
-
}, [
|
|
2288
|
-
const
|
|
2289
|
-
const
|
|
2290
|
-
if (
|
|
2291
|
-
return
|
|
2293
|
+
}, [u, c, s]);
|
|
2294
|
+
const b = (p) => {
|
|
2295
|
+
const d = p.replace(/\D/g, "");
|
|
2296
|
+
if (m)
|
|
2297
|
+
return m(d);
|
|
2292
2298
|
if (c === "none")
|
|
2293
|
-
return
|
|
2299
|
+
return d;
|
|
2294
2300
|
let _ = "";
|
|
2295
|
-
return c === "spaced" ?
|
|
2296
|
-
},
|
|
2297
|
-
var
|
|
2298
|
-
!/^\d$/.test(
|
|
2299
|
-
},
|
|
2300
|
-
const
|
|
2301
|
-
|
|
2301
|
+
return c === "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)}` : c === "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)}` : s === "+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)}`, _;
|
|
2302
|
+
}, y = (p) => {
|
|
2303
|
+
var d;
|
|
2304
|
+
!/^\d$/.test(p.key) && p.key !== "Backspace" && p.key !== "Delete" && p.key !== "Tab" && p.key !== "ArrowLeft" && p.key !== "ArrowRight" && p.key !== "Home" && p.key !== "End" && p.preventDefault(), (d = v.onKeyDown) == null || d.call(v, p);
|
|
2305
|
+
}, h = (p) => {
|
|
2306
|
+
const d = p.target, _ = d.selectionStart || 0, B = d.value.replace(/\D/g, ""), H = b(B);
|
|
2307
|
+
f(H);
|
|
2302
2308
|
const Z = w.length, U = H.length - Z;
|
|
2303
2309
|
if (requestAnimationFrame(() => {
|
|
2304
2310
|
const E = Math.max(0, Math.min(_ + U, H.length));
|
|
2305
|
-
|
|
2306
|
-
}),
|
|
2311
|
+
d.setSelectionRange(E, E);
|
|
2312
|
+
}), x) {
|
|
2307
2313
|
const E = {
|
|
2308
|
-
...
|
|
2309
|
-
target: { ...
|
|
2314
|
+
...p,
|
|
2315
|
+
target: { ...p.target, value: B }
|
|
2310
2316
|
};
|
|
2311
|
-
|
|
2317
|
+
x(E);
|
|
2312
2318
|
}
|
|
2313
|
-
}, k = (
|
|
2319
|
+
}, k = (p) => {
|
|
2314
2320
|
var E;
|
|
2315
|
-
|
|
2316
|
-
const _ =
|
|
2317
|
-
if (
|
|
2321
|
+
p.preventDefault();
|
|
2322
|
+
const _ = p.clipboardData.getData("text/plain").replace(/\D/g, ""), H = p.target.selectionStart || 0, S = w.replace(/\D/g, "").slice(0, H) + _, U = b(S);
|
|
2323
|
+
if (f(U), x) {
|
|
2318
2324
|
const M = {
|
|
2319
|
-
...
|
|
2320
|
-
target: { ...
|
|
2325
|
+
...p,
|
|
2326
|
+
target: { ...p.target, value: S }
|
|
2321
2327
|
};
|
|
2322
|
-
|
|
2328
|
+
x(M);
|
|
2323
2329
|
}
|
|
2324
|
-
(E =
|
|
2330
|
+
(E = v.onPaste) == null || E.call(v, p);
|
|
2325
2331
|
};
|
|
2326
|
-
return /* @__PURE__ */
|
|
2327
|
-
e && /* @__PURE__ */
|
|
2332
|
+
return /* @__PURE__ */ C("div", { className: "w-full", children: [
|
|
2333
|
+
e && /* @__PURE__ */ C(
|
|
2328
2334
|
"label",
|
|
2329
2335
|
{
|
|
2330
2336
|
className: "block text-sm font-medium mb-2",
|
|
2331
2337
|
style: { color: r ? "#C21919" : "#181918" },
|
|
2332
2338
|
children: [
|
|
2333
2339
|
e,
|
|
2334
|
-
|
|
2340
|
+
v.required && /* @__PURE__ */ t("span", { style: { color: "#C21919" }, children: "*" })
|
|
2335
2341
|
]
|
|
2336
2342
|
}
|
|
2337
2343
|
),
|
|
@@ -2376,20 +2382,20 @@ const M2 = ({
|
|
|
2376
2382
|
border-color: #C21919 !important;
|
|
2377
2383
|
}
|
|
2378
2384
|
` }),
|
|
2379
|
-
/* @__PURE__ */
|
|
2380
|
-
|
|
2381
|
-
|
|
2385
|
+
/* @__PURE__ */ C("div", { className: `phone-input-container ${g}`, children: [
|
|
2386
|
+
a ? /* @__PURE__ */ t(
|
|
2387
|
+
b2,
|
|
2382
2388
|
{
|
|
2383
2389
|
value: s,
|
|
2384
|
-
onChange:
|
|
2390
|
+
onChange: i,
|
|
2385
2391
|
options: l,
|
|
2386
2392
|
style: {
|
|
2387
2393
|
width: "85px",
|
|
2388
2394
|
borderRadius: "12px"
|
|
2389
2395
|
},
|
|
2390
|
-
className:
|
|
2396
|
+
className: g,
|
|
2391
2397
|
popupClassName: "country-code-dropdown",
|
|
2392
|
-
disabled:
|
|
2398
|
+
disabled: v.disabled
|
|
2393
2399
|
}
|
|
2394
2400
|
) : /* @__PURE__ */ t(
|
|
2395
2401
|
"div",
|
|
@@ -2397,8 +2403,8 @@ const M2 = ({
|
|
|
2397
2403
|
className: "phone-input-country-code-static",
|
|
2398
2404
|
style: {
|
|
2399
2405
|
borderColor: r ? "#C21919" : "#D1D1D1",
|
|
2400
|
-
color:
|
|
2401
|
-
backgroundColor:
|
|
2406
|
+
color: v.disabled ? "#00000040" : "#000000",
|
|
2407
|
+
backgroundColor: v.disabled ? "#f5f5f5" : "#FAFAFA"
|
|
2402
2408
|
},
|
|
2403
2409
|
children: s
|
|
2404
2410
|
}
|
|
@@ -2406,24 +2412,24 @@ const M2 = ({
|
|
|
2406
2412
|
/* @__PURE__ */ t(
|
|
2407
2413
|
q,
|
|
2408
2414
|
{
|
|
2409
|
-
...
|
|
2415
|
+
...v,
|
|
2410
2416
|
ref: L,
|
|
2411
2417
|
value: w,
|
|
2412
2418
|
className: n,
|
|
2413
|
-
onKeyDown:
|
|
2414
|
-
onChange:
|
|
2419
|
+
onKeyDown: y,
|
|
2420
|
+
onChange: h,
|
|
2415
2421
|
onPaste: k,
|
|
2416
2422
|
style: {
|
|
2417
2423
|
flex: 1,
|
|
2418
2424
|
height: "44px",
|
|
2419
2425
|
borderRadius: "12px",
|
|
2420
2426
|
borderColor: r ? "#C21919" : "#D1D1D1",
|
|
2421
|
-
...
|
|
2427
|
+
...v.style
|
|
2422
2428
|
}
|
|
2423
2429
|
}
|
|
2424
2430
|
)
|
|
2425
2431
|
] }),
|
|
2426
|
-
r && /* @__PURE__ */
|
|
2432
|
+
r && /* @__PURE__ */ C("div", { className: "flex items-center mt-1 text-xs text-[#C21919]", children: [
|
|
2427
2433
|
/* @__PURE__ */ t("svg", { className: "w-3 h-3 mr-1", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ t(
|
|
2428
2434
|
"path",
|
|
2429
2435
|
{
|
|
@@ -2445,15 +2451,15 @@ const a0 = ({
|
|
|
2445
2451
|
...n
|
|
2446
2452
|
}) => {
|
|
2447
2453
|
var l;
|
|
2448
|
-
const { field: s, fieldState:
|
|
2454
|
+
const { field: s, fieldState: i } = A({ control: e, name: r });
|
|
2449
2455
|
return /* @__PURE__ */ t(
|
|
2450
2456
|
C2,
|
|
2451
2457
|
{
|
|
2452
2458
|
...n,
|
|
2453
2459
|
value: s.value,
|
|
2454
|
-
onChange: (
|
|
2460
|
+
onChange: (a) => s.onChange(a.target.value),
|
|
2455
2461
|
onBlur: s.onBlur,
|
|
2456
|
-
error: o ?? ((l =
|
|
2462
|
+
error: o ?? ((l = i.error) == null ? void 0 : l.message)
|
|
2457
2463
|
}
|
|
2458
2464
|
);
|
|
2459
2465
|
}, l0 = V.forwardRef(({ control: e, name: r, ...o }, n) => e && r ? /* @__PURE__ */ t(a0, { control: e, name: r, ...o }) : /* @__PURE__ */ t(C2, { ref: n, name: r, ...o }));
|
|
@@ -2464,39 +2470,39 @@ const u2 = V.forwardRef(({
|
|
|
2464
2470
|
helperText: o,
|
|
2465
2471
|
className: n = "",
|
|
2466
2472
|
status: s,
|
|
2467
|
-
currencySymbol:
|
|
2473
|
+
currencySymbol: i = "₦",
|
|
2468
2474
|
formatAmount: l = !1,
|
|
2469
|
-
onChange:
|
|
2475
|
+
onChange: a,
|
|
2470
2476
|
value: c,
|
|
2471
|
-
...
|
|
2472
|
-
},
|
|
2473
|
-
const
|
|
2474
|
-
const
|
|
2475
|
-
return
|
|
2476
|
-
}, w = (
|
|
2477
|
+
...m
|
|
2478
|
+
}, u) => {
|
|
2479
|
+
const x = r ? "currency-input-error-state" : "", [v, L] = O(""), g = (b) => {
|
|
2480
|
+
const h = b.replace(/[^\d.]/g, "").split("."), k = h[0], p = h[1], d = k.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
2481
|
+
return p !== void 0 ? `${d}.${p}` : d;
|
|
2482
|
+
}, w = (b) => b.replace(/,/g, "");
|
|
2477
2483
|
R(() => {
|
|
2478
2484
|
if (c !== void 0) {
|
|
2479
|
-
const
|
|
2480
|
-
L(l ?
|
|
2485
|
+
const b = String(c);
|
|
2486
|
+
L(l ? g(b) : b);
|
|
2481
2487
|
}
|
|
2482
2488
|
}, [c, l]);
|
|
2483
|
-
const
|
|
2484
|
-
const
|
|
2489
|
+
const f = (b) => {
|
|
2490
|
+
const y = b.target.value;
|
|
2485
2491
|
if (l) {
|
|
2486
|
-
const
|
|
2487
|
-
L(k),
|
|
2492
|
+
const h = w(y), k = g(h);
|
|
2493
|
+
L(k), a && a(h, b);
|
|
2488
2494
|
} else
|
|
2489
|
-
L(
|
|
2495
|
+
L(y), a && a(y, b);
|
|
2490
2496
|
};
|
|
2491
|
-
return /* @__PURE__ */
|
|
2492
|
-
e && /* @__PURE__ */
|
|
2497
|
+
return /* @__PURE__ */ C("div", { className: "w-full", children: [
|
|
2498
|
+
e && /* @__PURE__ */ C(
|
|
2493
2499
|
"label",
|
|
2494
2500
|
{
|
|
2495
2501
|
className: "block text-sm font-medium mb-2",
|
|
2496
2502
|
style: { color: r ? "#C21919" : "#181918" },
|
|
2497
2503
|
children: [
|
|
2498
2504
|
e,
|
|
2499
|
-
|
|
2505
|
+
m.required && /* @__PURE__ */ t("span", { style: { color: "#C21919" }, children: "*" })
|
|
2500
2506
|
]
|
|
2501
2507
|
}
|
|
2502
2508
|
),
|
|
@@ -2541,20 +2547,20 @@ const u2 = V.forwardRef(({
|
|
|
2541
2547
|
/* @__PURE__ */ t(
|
|
2542
2548
|
q,
|
|
2543
2549
|
{
|
|
2544
|
-
ref:
|
|
2545
|
-
className: `currency-input-wrapper ${n} ${
|
|
2550
|
+
ref: u,
|
|
2551
|
+
className: `currency-input-wrapper ${n} ${x}`,
|
|
2546
2552
|
status: r ? "error" : s,
|
|
2547
|
-
prefix: /* @__PURE__ */ t("span", { children:
|
|
2548
|
-
...
|
|
2549
|
-
value: l ?
|
|
2550
|
-
onChange:
|
|
2553
|
+
prefix: /* @__PURE__ */ t("span", { children: i }),
|
|
2554
|
+
...m,
|
|
2555
|
+
value: l ? v : c,
|
|
2556
|
+
onChange: f,
|
|
2551
2557
|
style: {
|
|
2552
2558
|
borderColor: r ? "#C21919" : "#D1D1D1",
|
|
2553
|
-
...
|
|
2559
|
+
...m.style
|
|
2554
2560
|
}
|
|
2555
2561
|
}
|
|
2556
2562
|
),
|
|
2557
|
-
r && /* @__PURE__ */
|
|
2563
|
+
r && /* @__PURE__ */ C("div", { className: "flex items-center mt-1 text-xs text-[#C21919]", children: [
|
|
2558
2564
|
/* @__PURE__ */ t("svg", { className: "w-3 h-3 mr-1", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ t(
|
|
2559
2565
|
"path",
|
|
2560
2566
|
{
|
|
@@ -2576,15 +2582,15 @@ const c0 = ({
|
|
|
2576
2582
|
...n
|
|
2577
2583
|
}) => {
|
|
2578
2584
|
var l;
|
|
2579
|
-
const { field: s, fieldState:
|
|
2585
|
+
const { field: s, fieldState: i } = A({ control: e, name: r });
|
|
2580
2586
|
return /* @__PURE__ */ t(
|
|
2581
2587
|
u2,
|
|
2582
2588
|
{
|
|
2583
2589
|
...n,
|
|
2584
2590
|
value: s.value,
|
|
2585
|
-
onChange: (
|
|
2591
|
+
onChange: (a) => s.onChange(a),
|
|
2586
2592
|
onBlur: s.onBlur,
|
|
2587
|
-
error: o ?? ((l =
|
|
2593
|
+
error: o ?? ((l = i.error) == null ? void 0 : l.message)
|
|
2588
2594
|
}
|
|
2589
2595
|
);
|
|
2590
2596
|
}, d0 = V.forwardRef(({ control: e, name: r, ...o }, n) => e && r ? /* @__PURE__ */ t(c0, { control: e, name: r, ...o }) : /* @__PURE__ */ t(u2, { ref: n, name: r, ...o }));
|
|
@@ -2594,7 +2600,7 @@ const P0 = ({
|
|
|
2594
2600
|
subtitle: r,
|
|
2595
2601
|
avatar: o,
|
|
2596
2602
|
className: n = ""
|
|
2597
|
-
}) => /* @__PURE__ */
|
|
2603
|
+
}) => /* @__PURE__ */ C(
|
|
2598
2604
|
"div",
|
|
2599
2605
|
{
|
|
2600
2606
|
className: `flex items-center ${n}`,
|
|
@@ -2607,7 +2613,7 @@ const P0 = ({
|
|
|
2607
2613
|
},
|
|
2608
2614
|
children: [
|
|
2609
2615
|
o ? /* @__PURE__ */ t(X, { src: o, size: 30 }) : /* @__PURE__ */ t(X, { icon: /* @__PURE__ */ t(z2, {}), size: 30, style: { backgroundColor: "#6B7280" } }),
|
|
2610
|
-
/* @__PURE__ */
|
|
2616
|
+
/* @__PURE__ */ C("div", { className: "flex flex-col", children: [
|
|
2611
2617
|
/* @__PURE__ */ t(
|
|
2612
2618
|
"span",
|
|
2613
2619
|
{
|
|
@@ -2642,7 +2648,7 @@ const P0 = ({
|
|
|
2642
2648
|
role: o,
|
|
2643
2649
|
avatar: n,
|
|
2644
2650
|
className: s = ""
|
|
2645
|
-
}) => /* @__PURE__ */
|
|
2651
|
+
}) => /* @__PURE__ */ C(
|
|
2646
2652
|
"div",
|
|
2647
2653
|
{
|
|
2648
2654
|
style: {
|
|
@@ -2665,7 +2671,7 @@ const P0 = ({
|
|
|
2665
2671
|
}
|
|
2666
2672
|
}
|
|
2667
2673
|
),
|
|
2668
|
-
/* @__PURE__ */
|
|
2674
|
+
/* @__PURE__ */ C(
|
|
2669
2675
|
"div",
|
|
2670
2676
|
{
|
|
2671
2677
|
className: `flex gap-4 items-center relative ${s}`,
|
|
@@ -2678,10 +2684,10 @@ const P0 = ({
|
|
|
2678
2684
|
{
|
|
2679
2685
|
size: 80,
|
|
2680
2686
|
style: { backgroundColor: "#181918", fontSize: "32px", fontWeight: 600 },
|
|
2681
|
-
children: e.split(" ").map((
|
|
2687
|
+
children: e.split(" ").map((i) => i[0]).join("").toUpperCase()
|
|
2682
2688
|
}
|
|
2683
2689
|
),
|
|
2684
|
-
/* @__PURE__ */
|
|
2690
|
+
/* @__PURE__ */ C("div", { className: "flex flex-col", children: [
|
|
2685
2691
|
/* @__PURE__ */ t(
|
|
2686
2692
|
"span",
|
|
2687
2693
|
{
|
|
@@ -2726,12 +2732,12 @@ const P0 = ({
|
|
|
2726
2732
|
)
|
|
2727
2733
|
]
|
|
2728
2734
|
}
|
|
2729
|
-
), C0 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%2085.5%20513%20342'%3e%3cpath%20fill='%23FFF'%20d='M0%2085.5h513v342H0z'/%3e%3cg%20fill='%23007b23'%3e%3cpath%20d='M0%2085.5h171v342H0zM342%2085.5h171v342H342z'/%3e%3c/g%3e%3c/svg%3e", u0 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20513%20342'%3e%3cpath%20fill='%23FFF'%20d='M0%200h513v342H0z'/%3e%3cg%20fill='%23D80027'%3e%3cpath%20d='M0%200h513v26.3H0zM0%2052.6h513v26.3H0zM0%20105.2h513v26.3H0zM0%20157.8h513v26.3H0zM0%20210.5h513v26.3H0zM0%20263.1h513v26.3H0zM0%20315.7h513V342H0z'/%3e%3c/g%3e%3cpath%20fill='%232E52B2'%20d='M0%200h256.5v184.1H0z'/%3e%3cg%20fill='%23FFF'%3e%3cpath%20d='m47.8%20138.9-4-12.8-4.4%2012.8H26.2l10.7%207.7-4%2012.8%2010.9-7.9%2010.6%207.9-4.1-12.8%2010.9-7.7zM104.1%20138.9l-4.1-12.8-4.2%2012.8H82.6l10.7%207.7-4%2012.8%2010.7-7.9%2010.8%207.9-4-12.8%2010.7-7.7zM160.6%20138.9l-4.3-12.8-4%2012.8h-13.5l11%207.7-4.2%2012.8%2010.7-7.9%2011%207.9-4.2-12.8%2010.7-7.7zM216.8%20138.9l-4-12.8-4.2%2012.8h-13.3l10.8%207.7-4%2012.8%2010.7-7.9%2010.8%207.9-4.3-12.8%2011-7.7zM100%2075.3l-4.2%2012.8H82.6L93.3%2096l-4%2012.6%2010.7-7.8%2010.8%207.8-4-12.6%2010.7-7.9h-13.4zM43.8%2075.3l-4.4%2012.8H26.2L36.9%2096l-4%2012.6%2010.9-7.8%2010.6%207.8L50.3%2096l10.9-7.9H47.8zM156.3%2075.3l-4%2012.8h-13.5l11%207.9-4.2%2012.6%2010.7-7.8%2011%207.8-4.2-12.6%2010.7-7.9h-13.2zM212.8%2075.3l-4.2%2012.8h-13.3l10.8%207.9-4%2012.6%2010.7-7.8%2010.8%207.8-4.3-12.6%2011-7.9h-13.5zM43.8%2024.7l-4.4%2012.6H26.2l10.7%207.9-4%2012.7L43.8%2050l10.6%207.9-4.1-12.7%2010.9-7.9H47.8zM100%2024.7l-4.2%2012.6H82.6l10.7%207.9-4%2012.7L100%2050l10.8%207.9-4-12.7%2010.7-7.9h-13.4zM156.3%2024.7l-4%2012.6h-13.5l11%207.9-4.2%2012.7%2010.7-7.9%2011%207.9-4.2-12.7%2010.7-7.9h-13.2zM212.8%2024.7l-4.2%2012.6h-13.3l10.8%207.9-4%2012.7%2010.7-7.9%2010.8%207.9-4.3-12.7%2011-7.9h-13.5z'/%3e%3c/g%3e%3c/svg%3e", f0 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20513%20342'%3e%3cg%20fill='%23FFF'%3e%3cpath%20d='M0%200h513v341.3H0V0z'/%3e%3cpath%20d='M311.7%20230%20513%20341.3v-31.5L369.3%20230h-57.6zM200.3%20111.3%200%200v31.5l143.7%2079.8h56.6z'/%3e%3c/g%3e%3cg%20fill='%230052B4'%3e%3cpath%20d='M393.8%20230%20513%20295.7V230H393.8zm-82.1%200L513%20341.3v-31.5L369.3%20230h-57.6zm146.9%20111.3-147-81.7v81.7h147zM90.3%20230%200%20280.2V230h90.3zm110%2014.2v97.2H25.5l174.8-97.2zM118.2%20111.3%200%2045.6v65.7h118.2zm82.1%200L0%200v31.5l143.7%2079.8h56.6zM53.4%200l147%2081.7V0h-147zM421.7%20111.3%20513%2061.1v50.2h-91.3zm-110-14.2V0h174.9L311.7%2097.1z'/%3e%3c/g%3e%3cg%20fill='%23D80027'%3e%3cpath%20d='M288%200h-64v138.7H0v64h224v138.7h64V202.7h224v-64H288V0z'/%3e%3cpath%20d='M311.7%20230%20513%20341.3v-31.5L369.3%20230h-57.6zM143.7%20230%200%20309.9v31.5L200.3%20230h-56.6zM200.3%20111.3%200%200v31.5l143.7%2079.8h56.6zM368.3%20111.3%20513%2031.5V0L311.7%20111.3h56.6z'/%3e%3c/g%3e%3c/svg%3e",
|
|
2735
|
+
), C0 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%2085.5%20513%20342'%3e%3cpath%20fill='%23FFF'%20d='M0%2085.5h513v342H0z'/%3e%3cg%20fill='%23007b23'%3e%3cpath%20d='M0%2085.5h171v342H0zM342%2085.5h171v342H342z'/%3e%3c/g%3e%3c/svg%3e", u0 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20513%20342'%3e%3cpath%20fill='%23FFF'%20d='M0%200h513v342H0z'/%3e%3cg%20fill='%23D80027'%3e%3cpath%20d='M0%200h513v26.3H0zM0%2052.6h513v26.3H0zM0%20105.2h513v26.3H0zM0%20157.8h513v26.3H0zM0%20210.5h513v26.3H0zM0%20263.1h513v26.3H0zM0%20315.7h513V342H0z'/%3e%3c/g%3e%3cpath%20fill='%232E52B2'%20d='M0%200h256.5v184.1H0z'/%3e%3cg%20fill='%23FFF'%3e%3cpath%20d='m47.8%20138.9-4-12.8-4.4%2012.8H26.2l10.7%207.7-4%2012.8%2010.9-7.9%2010.6%207.9-4.1-12.8%2010.9-7.7zM104.1%20138.9l-4.1-12.8-4.2%2012.8H82.6l10.7%207.7-4%2012.8%2010.7-7.9%2010.8%207.9-4-12.8%2010.7-7.7zM160.6%20138.9l-4.3-12.8-4%2012.8h-13.5l11%207.7-4.2%2012.8%2010.7-7.9%2011%207.9-4.2-12.8%2010.7-7.7zM216.8%20138.9l-4-12.8-4.2%2012.8h-13.3l10.8%207.7-4%2012.8%2010.7-7.9%2010.8%207.9-4.3-12.8%2011-7.7zM100%2075.3l-4.2%2012.8H82.6L93.3%2096l-4%2012.6%2010.7-7.8%2010.8%207.8-4-12.6%2010.7-7.9h-13.4zM43.8%2075.3l-4.4%2012.8H26.2L36.9%2096l-4%2012.6%2010.9-7.8%2010.6%207.8L50.3%2096l10.9-7.9H47.8zM156.3%2075.3l-4%2012.8h-13.5l11%207.9-4.2%2012.6%2010.7-7.8%2011%207.8-4.2-12.6%2010.7-7.9h-13.2zM212.8%2075.3l-4.2%2012.8h-13.3l10.8%207.9-4%2012.6%2010.7-7.8%2010.8%207.8-4.3-12.6%2011-7.9h-13.5zM43.8%2024.7l-4.4%2012.6H26.2l10.7%207.9-4%2012.7L43.8%2050l10.6%207.9-4.1-12.7%2010.9-7.9H47.8zM100%2024.7l-4.2%2012.6H82.6l10.7%207.9-4%2012.7L100%2050l10.8%207.9-4-12.7%2010.7-7.9h-13.4zM156.3%2024.7l-4%2012.6h-13.5l11%207.9-4.2%2012.7%2010.7-7.9%2011%207.9-4.2-12.7%2010.7-7.9h-13.2zM212.8%2024.7l-4.2%2012.6h-13.3l10.8%207.9-4%2012.7%2010.7-7.9%2010.8%207.9-4.3-12.7%2011-7.9h-13.5z'/%3e%3c/g%3e%3c/svg%3e", f0 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20513%20342'%3e%3cg%20fill='%23FFF'%3e%3cpath%20d='M0%200h513v341.3H0V0z'/%3e%3cpath%20d='M311.7%20230%20513%20341.3v-31.5L369.3%20230h-57.6zM200.3%20111.3%200%200v31.5l143.7%2079.8h56.6z'/%3e%3c/g%3e%3cg%20fill='%230052B4'%3e%3cpath%20d='M393.8%20230%20513%20295.7V230H393.8zm-82.1%200L513%20341.3v-31.5L369.3%20230h-57.6zm146.9%20111.3-147-81.7v81.7h147zM90.3%20230%200%20280.2V230h90.3zm110%2014.2v97.2H25.5l174.8-97.2zM118.2%20111.3%200%2045.6v65.7h118.2zm82.1%200L0%200v31.5l143.7%2079.8h56.6zM53.4%200l147%2081.7V0h-147zM421.7%20111.3%20513%2061.1v50.2h-91.3zm-110-14.2V0h174.9L311.7%2097.1z'/%3e%3c/g%3e%3cg%20fill='%23D80027'%3e%3cpath%20d='M288%200h-64v138.7H0v64h224v138.7h64V202.7h224v-64H288V0z'/%3e%3cpath%20d='M311.7%20230%20513%20341.3v-31.5L369.3%20230h-57.6zM143.7%20230%200%20309.9v31.5L200.3%20230h-56.6zM200.3%20111.3%200%200v31.5l143.7%2079.8h56.6zM368.3%20111.3%20513%2031.5V0L311.7%20111.3h56.6z'/%3e%3c/g%3e%3c/svg%3e", m0 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20513%20342'%3e%3cpath%20fill='%23FFDA44'%20d='M0%200h513v342H0z'/%3e%3cpath%20fill='%23D80027'%20d='M0%200h513v114H0z'/%3e%3cpath%20fill='%23496E2D'%20d='M0%20228h513v114H0z'/%3e%3cpath%20d='m255.9%20113.8%2014.1%2043.4%2040.4%203.2-37%2026.9%2019.5%2040.3-37-26.9-37%2026.9%2014.1-43.5-36.9-26.9h45.7z'/%3e%3c/svg%3e", h0 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%2085.333%20512%20341.333'%3e%3cpath%20fill='%23FFF'%20d='M0%2085.331h512v341.337H0z'/%3e%3cpath%20d='M0%2085.331h512v90.579H0z'/%3e%3cpath%20fill='%23496E2D'%20d='M0%20336.089h512v90.568H0z'/%3e%3cpath%20fill='%23A2001D'%20d='M0%20198.606h512v114.799H0z'/%3e%3cg%20fill='%23FFF'%3e%3cpath%20d='m323.265%20139.803-25.583-11.809L256%20222.376l-41.682-94.382-25.583%2011.809%2051.749%20116.191-51.749%20116.192%2025.583%2011.808L256%20289.613l41.682%2094.381%2025.583-11.808-51.749-116.192z'/%3e%3cpath%20d='M273.376%20150.931C263.472%20140.115%20256%20133.898%20256%20133.898s-7.472%206.216-17.376%2017.032v210.127C248.528%20371.873%20256%20378.091%20256%20378.091s7.472-6.216%2017.376-17.033V150.931z'/%3e%3c/g%3e%3cg%20fill='%23A2001D'%3e%3cpath%20d='M209.04%20191.226v129.535c10.465%2018.542%2023.274%2033.742%2032.872%2043.818V147.408c-9.599%2010.076-22.408%2025.275-32.872%2043.818zM302.96%20191.226c-10.465-18.543-23.274-33.742-32.872-43.818V364.58c9.599-10.077%2022.407-25.276%2032.872-43.818V191.226z'/%3e%3c/g%3e%3cpath%20d='M302.96%20191.226v129.535c10.594-18.774%2018.784-40.973%2018.784-64.767s-8.19-45.993-18.784-64.768zM209.04%20191.226v129.535c-10.594-18.774-18.784-40.973-18.784-64.767s8.19-45.993%2018.784-64.768z'/%3e%3c/svg%3e", g0 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%2085.333%20512%20341.333'%3e%3cpath%20fill='%23FFF'%20d='M0%2085.337h512v341.326H0z'/%3e%3cpath%20d='M114.024%20256.001%200%20141.926v228.17z'/%3e%3cpath%20fill='%23ffb915'%20d='M161.192%20256%200%2094.7v47.226l114.024%20114.075L0%20370.096v47.138z'/%3e%3cpath%20fill='%23007847'%20d='M509.833%20289.391c.058-.44.804-.878%202.167-1.318v-65.464H222.602L85.33%2085.337H0V94.7L161.192%20256%200%20417.234v9.429h85.33l137.272-137.272h287.231z'/%3e%3cpath%20fill='%23000c8a'%20d='M503.181%20322.783H236.433l-103.881%20103.88H512v-103.88z'/%3e%3cpath%20fill='%23e1392d'%20d='M503.181%20189.217H512V85.337H132.552l103.881%20103.88z'/%3e%3c/svg%3e", x0 = [
|
|
2730
2736
|
{ code: "NG", name: "Nigeria", flag: C0 },
|
|
2731
2737
|
{ code: "US", name: "United States", flag: u0 },
|
|
2732
2738
|
{ code: "GB", name: "United Kingdom", flag: f0 },
|
|
2733
|
-
{ code: "GH", name: "Ghana", flag:
|
|
2734
|
-
{ code: "KE", name: "Kenya", flag:
|
|
2739
|
+
{ code: "GH", name: "Ghana", flag: m0 },
|
|
2740
|
+
{ code: "KE", name: "Kenya", flag: h0 },
|
|
2735
2741
|
{ code: "ZA", name: "South Africa", flag: g0 }
|
|
2736
2742
|
], I0 = ({
|
|
2737
2743
|
countries: e = x0,
|
|
@@ -2739,31 +2745,31 @@ const P0 = ({
|
|
|
2739
2745
|
onCountryChange: o,
|
|
2740
2746
|
showSearch: n = !1,
|
|
2741
2747
|
className: s = "",
|
|
2742
|
-
...
|
|
2748
|
+
...i
|
|
2743
2749
|
}) => {
|
|
2744
|
-
const l = (
|
|
2745
|
-
o && o(
|
|
2746
|
-
},
|
|
2750
|
+
const l = (u) => {
|
|
2751
|
+
o && o(u);
|
|
2752
|
+
}, a = (u) => /* @__PURE__ */ t(
|
|
2747
2753
|
"img",
|
|
2748
2754
|
{
|
|
2749
|
-
src:
|
|
2755
|
+
src: u,
|
|
2750
2756
|
alt: "flag",
|
|
2751
2757
|
className: "w-7 h-7 rounded-full object-cover",
|
|
2752
2758
|
style: { width: "28px", height: "28px" }
|
|
2753
2759
|
}
|
|
2754
|
-
), c = e.map((
|
|
2755
|
-
value:
|
|
2756
|
-
label: /* @__PURE__ */
|
|
2757
|
-
|
|
2758
|
-
/* @__PURE__ */ t("span", { children:
|
|
2760
|
+
), c = e.map((u) => ({
|
|
2761
|
+
value: u.code,
|
|
2762
|
+
label: /* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
|
|
2763
|
+
a(u.flag),
|
|
2764
|
+
/* @__PURE__ */ t("span", { children: u.code })
|
|
2759
2765
|
] }),
|
|
2760
2766
|
// Add searchable text for filtering
|
|
2761
|
-
searchLabel: `${
|
|
2762
|
-
})),
|
|
2763
|
-
var
|
|
2764
|
-
return ((
|
|
2767
|
+
searchLabel: `${u.name} ${u.code}`.toLowerCase()
|
|
2768
|
+
})), m = (u, x) => {
|
|
2769
|
+
var v;
|
|
2770
|
+
return ((v = x == null ? void 0 : x.searchLabel) == null ? void 0 : v.includes(u.toLowerCase())) || !1;
|
|
2765
2771
|
};
|
|
2766
|
-
return /* @__PURE__ */
|
|
2772
|
+
return /* @__PURE__ */ C(t2, { children: [
|
|
2767
2773
|
/* @__PURE__ */ t("style", { children: `
|
|
2768
2774
|
.country-selector.ant-select {
|
|
2769
2775
|
min-width: 90px;
|
|
@@ -2808,14 +2814,14 @@ const P0 = ({
|
|
|
2808
2814
|
}
|
|
2809
2815
|
` }),
|
|
2810
2816
|
/* @__PURE__ */ t(
|
|
2811
|
-
|
|
2817
|
+
b2,
|
|
2812
2818
|
{
|
|
2813
2819
|
className: `country-selector ${s}`,
|
|
2814
2820
|
defaultValue: r,
|
|
2815
2821
|
onChange: l,
|
|
2816
2822
|
options: c,
|
|
2817
2823
|
showSearch: n,
|
|
2818
|
-
filterOption:
|
|
2824
|
+
filterOption: m,
|
|
2819
2825
|
placeholder: "Search country...",
|
|
2820
2826
|
suffixIcon: /* @__PURE__ */ t("svg", { width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", children: /* @__PURE__ */ t(
|
|
2821
2827
|
"path",
|
|
@@ -2827,7 +2833,7 @@ const P0 = ({
|
|
|
2827
2833
|
strokeLinejoin: "round"
|
|
2828
2834
|
}
|
|
2829
2835
|
) }),
|
|
2830
|
-
...
|
|
2836
|
+
...i
|
|
2831
2837
|
}
|
|
2832
2838
|
)
|
|
2833
2839
|
] });
|
|
@@ -2837,10 +2843,10 @@ const P0 = ({
|
|
|
2837
2843
|
avatarUrl: o,
|
|
2838
2844
|
menuItems: n,
|
|
2839
2845
|
onMenuClick: s,
|
|
2840
|
-
className:
|
|
2846
|
+
className: i = "",
|
|
2841
2847
|
width: l
|
|
2842
2848
|
}) => {
|
|
2843
|
-
const
|
|
2849
|
+
const a = [
|
|
2844
2850
|
{
|
|
2845
2851
|
key: "profile",
|
|
2846
2852
|
label: "My Profile"
|
|
@@ -2857,13 +2863,13 @@ const P0 = ({
|
|
|
2857
2863
|
label: "Logout",
|
|
2858
2864
|
danger: !0
|
|
2859
2865
|
}
|
|
2860
|
-
], c = ({ key:
|
|
2861
|
-
s && s(
|
|
2862
|
-
},
|
|
2863
|
-
const
|
|
2864
|
-
return
|
|
2866
|
+
], c = ({ key: u }) => {
|
|
2867
|
+
s && s(u);
|
|
2868
|
+
}, m = (u) => {
|
|
2869
|
+
const x = u.split(" ");
|
|
2870
|
+
return x.length >= 2 ? `${x[0][0]}${x[1][0]}`.toUpperCase() : u.substring(0, 2).toUpperCase();
|
|
2865
2871
|
};
|
|
2866
|
-
return /* @__PURE__ */
|
|
2872
|
+
return /* @__PURE__ */ C(t2, { children: [
|
|
2867
2873
|
/* @__PURE__ */ t("style", { children: `
|
|
2868
2874
|
.user-profile-dropdown {
|
|
2869
2875
|
cursor: pointer;
|
|
@@ -2945,19 +2951,19 @@ const P0 = ({
|
|
|
2945
2951
|
B2,
|
|
2946
2952
|
{
|
|
2947
2953
|
menu: {
|
|
2948
|
-
items: n ||
|
|
2954
|
+
items: n || a,
|
|
2949
2955
|
onClick: c
|
|
2950
2956
|
},
|
|
2951
2957
|
trigger: ["click"],
|
|
2952
2958
|
placement: "bottomRight",
|
|
2953
|
-
children: /* @__PURE__ */
|
|
2959
|
+
children: /* @__PURE__ */ C(
|
|
2954
2960
|
"div",
|
|
2955
2961
|
{
|
|
2956
|
-
className: `user-profile-dropdown ${
|
|
2962
|
+
className: `user-profile-dropdown ${i}`,
|
|
2957
2963
|
style: { width: typeof l == "number" ? `${l}px` : l },
|
|
2958
2964
|
children: [
|
|
2959
|
-
/* @__PURE__ */ t("div", { className: "user-profile-avatar", children: o ? /* @__PURE__ */ t("img", { src: o, alt: e }) :
|
|
2960
|
-
/* @__PURE__ */
|
|
2965
|
+
/* @__PURE__ */ t("div", { className: "user-profile-avatar", children: o ? /* @__PURE__ */ t("img", { src: o, alt: e }) : m(e) }),
|
|
2966
|
+
/* @__PURE__ */ C("div", { className: "user-profile-info", children: [
|
|
2961
2967
|
/* @__PURE__ */ t("div", { className: "user-profile-name", children: e }),
|
|
2962
2968
|
r && /* @__PURE__ */ t("div", { className: "user-profile-role", children: r })
|
|
2963
2969
|
] }),
|
|
@@ -2993,9 +2999,9 @@ const P0 = ({
|
|
|
2993
2999
|
iconColor: o = "blue",
|
|
2994
3000
|
onClick: n,
|
|
2995
3001
|
disabled: s = !1,
|
|
2996
|
-
className:
|
|
3002
|
+
className: i = ""
|
|
2997
3003
|
}) => {
|
|
2998
|
-
const
|
|
3004
|
+
const a = {
|
|
2999
3005
|
red: {
|
|
3000
3006
|
background: "#FFEAE8",
|
|
3001
3007
|
color: "#EC615B"
|
|
@@ -3021,10 +3027,10 @@ const P0 = ({
|
|
|
3021
3027
|
color: "#F5D742"
|
|
3022
3028
|
}
|
|
3023
3029
|
}[o];
|
|
3024
|
-
return /* @__PURE__ */
|
|
3030
|
+
return /* @__PURE__ */ C(
|
|
3025
3031
|
"button",
|
|
3026
3032
|
{
|
|
3027
|
-
className: `bg-[#FDFDFD] border border-[#E6E6E6] rounded-[14px] p-4 md:py-2.5 md:px-[18px] flex flex-col md:flex-row items-start md:items-center justify-start gap-2 md:gap-4 cursor-pointer transition-all duration-300 ease-in-out w-full md:h-[60px] hover:border-gray-300 hover:-translate-y-1 active:translate-y-0 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:border-[#E6E6E6] disabled:hover:translate-y-0 ${
|
|
3033
|
+
className: `bg-[#FDFDFD] border border-[#E6E6E6] rounded-[14px] p-4 md:py-2.5 md:px-[18px] flex flex-col md:flex-row items-start md:items-center justify-start gap-2 md:gap-4 cursor-pointer transition-all duration-300 ease-in-out w-full md:h-[60px] hover:border-gray-300 hover:-translate-y-1 active:translate-y-0 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:border-[#E6E6E6] disabled:hover:translate-y-0 ${i}`,
|
|
3028
3034
|
style: {
|
|
3029
3035
|
boxShadow: "0 0 0 0 rgba(0, 0, 0, 0)",
|
|
3030
3036
|
transition: "all 0.3s ease-in-out"
|
|
@@ -3043,8 +3049,8 @@ const P0 = ({
|
|
|
3043
3049
|
{
|
|
3044
3050
|
className: "w-10 h-10 rounded-full flex items-center justify-center shrink-0 [&>svg]:w-6 [&>svg]:h-6 transition-transform duration-300 ease-in-out",
|
|
3045
3051
|
style: {
|
|
3046
|
-
backgroundColor:
|
|
3047
|
-
color:
|
|
3052
|
+
backgroundColor: a.background,
|
|
3053
|
+
color: a.color
|
|
3048
3054
|
},
|
|
3049
3055
|
children: r
|
|
3050
3056
|
}
|
|
@@ -3059,45 +3065,45 @@ const P0 = ({
|
|
|
3059
3065
|
icon: o,
|
|
3060
3066
|
showVisibilityToggle: n = !0,
|
|
3061
3067
|
onVisibilityToggle: s,
|
|
3062
|
-
valuePrefix:
|
|
3068
|
+
valuePrefix: i = "₦",
|
|
3063
3069
|
ledgerBalance: l,
|
|
3064
|
-
bottomLabel:
|
|
3070
|
+
bottomLabel: a = "Ledger Balance",
|
|
3065
3071
|
bottomValue: c,
|
|
3066
|
-
showLedgerValuePrefix:
|
|
3067
|
-
bottomIcon:
|
|
3068
|
-
showCopyButton:
|
|
3069
|
-
copyValue:
|
|
3072
|
+
showLedgerValuePrefix: m = !0,
|
|
3073
|
+
bottomIcon: u,
|
|
3074
|
+
showCopyButton: x = !1,
|
|
3075
|
+
copyValue: v,
|
|
3070
3076
|
onCopy: L,
|
|
3071
|
-
copyIconColor:
|
|
3077
|
+
copyIconColor: g,
|
|
3072
3078
|
bottomTextColor: w,
|
|
3073
|
-
valueFontSize:
|
|
3074
|
-
backgroundPattern:
|
|
3075
|
-
backgroundImage:
|
|
3076
|
-
topRight:
|
|
3079
|
+
valueFontSize: f = 32,
|
|
3080
|
+
backgroundPattern: b = "wave",
|
|
3081
|
+
backgroundImage: y,
|
|
3082
|
+
topRight: h,
|
|
3077
3083
|
width: k = 348,
|
|
3078
|
-
className:
|
|
3084
|
+
className: p = ""
|
|
3079
3085
|
}) => {
|
|
3080
|
-
const [
|
|
3081
|
-
_(!
|
|
3082
|
-
},
|
|
3086
|
+
const [d, _] = O(!0), [B, H] = O(!1), Z = () => {
|
|
3087
|
+
_(!d), s && s();
|
|
3088
|
+
}, S = c ?? l, U = S != null && S !== "", E = typeof f == "number" ? `clamp(${Math.max(18, Math.round(f * 0.7))}px, 6vw, ${f}px)` : f, M = async () => {
|
|
3083
3089
|
var G;
|
|
3084
|
-
const N =
|
|
3090
|
+
const N = v ?? (S !== void 0 ? String(S) : "");
|
|
3085
3091
|
if (N)
|
|
3086
3092
|
try {
|
|
3087
3093
|
typeof navigator < "u" && ((G = navigator.clipboard) != null && G.writeText) && await navigator.clipboard.writeText(N), H(!0), setTimeout(() => H(!1), 1500), L == null || L(N);
|
|
3088
3094
|
} catch {
|
|
3089
3095
|
L == null || L(N);
|
|
3090
3096
|
}
|
|
3091
|
-
},
|
|
3097
|
+
}, $ = /* @__PURE__ */ C("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
|
|
3092
3098
|
/* @__PURE__ */ t("rect", { x: "3", y: "6", width: "18", height: "12", rx: "2", stroke: "currentColor", strokeWidth: "2" }),
|
|
3093
3099
|
/* @__PURE__ */ t("path", { d: "M3 10h18M7 14h4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
3094
3100
|
] });
|
|
3095
|
-
return /* @__PURE__ */
|
|
3101
|
+
return /* @__PURE__ */ C(
|
|
3096
3102
|
"div",
|
|
3097
3103
|
{
|
|
3098
|
-
className: `relative overflow-hidden flex flex-col rounded-[20px] px-3 sm:px-[18px] pt-3 transition-all duration-300 ease-in-out hover:-translate-y-1 cursor-pointer self-start ${U ? "pb-
|
|
3104
|
+
className: `relative overflow-hidden flex flex-col rounded-[20px] px-3 sm:px-[18px] pt-3 transition-all duration-300 ease-in-out hover:-translate-y-1 cursor-pointer self-start ${U ? "pb-1" : "pb-3"} ${p}`,
|
|
3099
3105
|
style: {
|
|
3100
|
-
background:
|
|
3106
|
+
background: y ? `url(${y}) center / cover no-repeat` : "radial-gradient(circle at 50% 136%, #7A7F7A 0%, #181918 100%)",
|
|
3101
3107
|
width: typeof k == "number" ? `${k}px` : k,
|
|
3102
3108
|
maxWidth: "100%",
|
|
3103
3109
|
boxShadow: "0 0 0 0 rgba(0, 0, 0, 0)",
|
|
@@ -3110,7 +3116,7 @@ const P0 = ({
|
|
|
3110
3116
|
N.currentTarget.style.boxShadow = "0 0 0 0 rgba(0, 0, 0, 0)";
|
|
3111
3117
|
},
|
|
3112
3118
|
children: [
|
|
3113
|
-
|
|
3119
|
+
b !== "none" && /* @__PURE__ */ t(
|
|
3114
3120
|
"div",
|
|
3115
3121
|
{
|
|
3116
3122
|
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",
|
|
@@ -3122,12 +3128,12 @@ const P0 = ({
|
|
|
3122
3128
|
}
|
|
3123
3129
|
}
|
|
3124
3130
|
),
|
|
3125
|
-
/* @__PURE__ */
|
|
3126
|
-
/* @__PURE__ */
|
|
3127
|
-
/* @__PURE__ */ t("div", { className: "w-9 h-9 sm:w-10 sm:h-10 bg-[#616161] rounded-full flex items-center justify-center text-white transition-transform duration-300 ease-in-out hover:scale-110 shrink-0", children: o ||
|
|
3128
|
-
|
|
3131
|
+
/* @__PURE__ */ C("div", { className: "relative z-10 min-w-0", children: [
|
|
3132
|
+
/* @__PURE__ */ C("div", { className: "flex items-center justify-between gap-2 mb-4", children: [
|
|
3133
|
+
/* @__PURE__ */ t("div", { className: "w-9 h-9 sm:w-10 sm:h-10 bg-[#616161] rounded-full flex items-center justify-center text-white transition-transform duration-300 ease-in-out hover:scale-110 shrink-0", children: o || $ }),
|
|
3134
|
+
h && /* @__PURE__ */ t("div", { className: "shrink-0", children: h })
|
|
3129
3135
|
] }),
|
|
3130
|
-
/* @__PURE__ */
|
|
3136
|
+
/* @__PURE__ */ C("div", { className: "flex items-center gap-2 mt-3 min-w-0", children: [
|
|
3131
3137
|
/* @__PURE__ */ t("span", { className: "text-xs sm:text-sm text-[#E6E6E6] font-light transition-colors duration-200 truncate", children: e }),
|
|
3132
3138
|
n && /* @__PURE__ */ t(
|
|
3133
3139
|
"button",
|
|
@@ -3135,7 +3141,7 @@ const P0 = ({
|
|
|
3135
3141
|
className: "bg-transparent border-none cursor-pointer p-1 flex items-center justify-center text-white hover:text-white/80 transition-colors duration-200",
|
|
3136
3142
|
onClick: Z,
|
|
3137
3143
|
"aria-label": "Toggle visibility",
|
|
3138
|
-
children: /* @__PURE__ */
|
|
3144
|
+
children: /* @__PURE__ */ C(
|
|
3139
3145
|
"svg",
|
|
3140
3146
|
{
|
|
3141
3147
|
width: "16",
|
|
@@ -3175,14 +3181,14 @@ const P0 = ({
|
|
|
3175
3181
|
{
|
|
3176
3182
|
className: "font-bold text-white transition-all duration-200 break-words leading-tight",
|
|
3177
3183
|
style: { fontSize: E },
|
|
3178
|
-
children:
|
|
3184
|
+
children: d ? `${i} ${r}` : "****"
|
|
3179
3185
|
}
|
|
3180
3186
|
),
|
|
3181
|
-
U && /* @__PURE__ */
|
|
3182
|
-
/* @__PURE__ */ t("div", { className: "w-full h-px bg-white/10 mb-1 transition-opacity duration-300" }),
|
|
3183
|
-
/* @__PURE__ */
|
|
3184
|
-
/* @__PURE__ */
|
|
3185
|
-
|
|
3187
|
+
U && /* @__PURE__ */ C("div", { className: "mt-1.5 mb-1", children: [
|
|
3188
|
+
/* @__PURE__ */ t("div", { className: "w-full h-px bg-white/10 mb-1.5 transition-opacity duration-300" }),
|
|
3189
|
+
/* @__PURE__ */ C("div", { className: "flex items-center justify-between gap-2 transition-all duration-200", children: [
|
|
3190
|
+
/* @__PURE__ */ C("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
3191
|
+
u === void 0 ? /* @__PURE__ */ t(
|
|
3186
3192
|
"svg",
|
|
3187
3193
|
{
|
|
3188
3194
|
width: "16",
|
|
@@ -3201,25 +3207,25 @@ const P0 = ({
|
|
|
3201
3207
|
}
|
|
3202
3208
|
)
|
|
3203
3209
|
}
|
|
3204
|
-
) :
|
|
3210
|
+
) : u,
|
|
3205
3211
|
/* @__PURE__ */ t(
|
|
3206
3212
|
"span",
|
|
3207
3213
|
{
|
|
3208
3214
|
className: "text-xs font-light transition-all duration-200 truncate",
|
|
3209
3215
|
style: { color: w ?? "#E6E6E6" },
|
|
3210
|
-
children:
|
|
3216
|
+
children: d ? m ? `${a} ${i} ${S}` : `${a}${S !== void 0 && S !== "" ? ` ${S}` : ""}` : "****"
|
|
3211
3217
|
}
|
|
3212
3218
|
)
|
|
3213
3219
|
] }),
|
|
3214
|
-
|
|
3220
|
+
x && /* @__PURE__ */ t(
|
|
3215
3221
|
"button",
|
|
3216
3222
|
{
|
|
3217
3223
|
type: "button",
|
|
3218
3224
|
onClick: M,
|
|
3219
3225
|
"aria-label": B ? "Copied" : "Copy",
|
|
3220
|
-
className: "bg-transparent border-none cursor-pointer p-0 flex items-center justify-center transition-colors duration-200 shrink-0 hover:opacity-80",
|
|
3221
|
-
style: { color:
|
|
3222
|
-
children: B ? /* @__PURE__ */ t("svg", { width: "20", height: "20", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M3.3335 8.33594L6.66683 11.6693L13.3335 4.33594", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */
|
|
3226
|
+
className: "bg-transparent border-none cursor-pointer p-0.5 flex items-center justify-center transition-colors duration-200 shrink-0 hover:opacity-80",
|
|
3227
|
+
style: { color: g ?? "#EC615B" },
|
|
3228
|
+
children: B ? /* @__PURE__ */ t("svg", { width: "20", height: "20", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M3.3335 8.33594L6.66683 11.6693L13.3335 4.33594", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */ C("svg", { width: "20", height: "20", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
3223
3229
|
/* @__PURE__ */ t("rect", { x: "5.33594", y: "5.33594", width: "8.66667", height: "8.66667", rx: "1.5", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
3224
3230
|
/* @__PURE__ */ t("path", { d: "M10.6693 5.33594V4.16927C10.6693 3.05036 10.6693 2.4909 10.4515 2.0633C10.2598 1.68723 9.95418 1.3816 9.57811 1.18987C9.15051 0.972097 8.59105 0.972097 7.47214 0.972097H4.16927C3.05036 0.972097 2.4909 0.972097 2.0633 1.18987C1.68723 1.3816 1.3816 1.68723 1.18987 2.0633C0.972097 2.4909 0.972097 3.05036 0.972097 4.16927V7.47214C0.972097 8.59105 0.972097 9.15051 1.18987 9.57811C1.3816 9.95418 1.68723 10.2598 2.0633 10.4515C2.4909 10.6693 3.05036 10.6693 4.16927 10.6693H5.33594", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
3225
3231
|
] })
|
|
@@ -3231,26 +3237,26 @@ const P0 = ({
|
|
|
3231
3237
|
]
|
|
3232
3238
|
}
|
|
3233
3239
|
);
|
|
3234
|
-
},
|
|
3240
|
+
}, b0 = "data:image/svg+xml,%3csvg%20width='41'%20height='54'%20viewBox='0%200%2041%2054'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.5'%20d='M31.6185%2035.0654C24.3544%2030.874%2012.6094%2030.874%205.39141%2035.0654C-1.82664%2039.2567%20-1.79374%2046.0496%205.47036%2050.2344C12.741%2054.4257%2024.486%2054.4257%2031.7106%2050.2344C38.9286%2046.043%2038.8892%2039.2567%2031.6185%2035.0654Z'%20fill='%23AFAAA1'/%3e%3cpath%20d='M25.4769%2028.1137C25.4769%2028.1137%2025.4243%2028.0809%2025.398%2028.0677C24.5557%2027.5816%2023.1937%2027.5816%2022.3581%2028.0677L7.60617%2036.6278C7.15875%2036.884%206.92188%2037.2322%206.92188%2037.5804L7.57328%2048.6106L22.3252%2040.0505C23.1608%2039.5644%2024.5228%2039.5644%2025.3651%2040.0505C25.3914%2040.0636%2025.4177%2040.0834%2025.444%2040.0965C25.8059%2040.3264%2025.9704%2040.6155%2025.9704%2040.9045L26.0033%2028.9218C26.0033%2028.6327%2025.8322%2028.3437%2025.4769%2028.1137Z'%20fill='url(%23paint0_linear_3503_145677)'/%3e%3cpath%20d='M31.3807%2031.5213C31.3807%2031.5213%2031.3281%2031.4885%2031.3018%2031.4753C30.4267%2031.0221%2029.0778%2031.0943%2028.2619%2031.5739L23.9061%2034.1032C23.0968%2034.5696%2021.7874%2034.5696%2020.9781%2034.1032C20.5701%2033.8666%2020.3662%2033.5579%2020.3727%2033.2557L20.3398%2045.2385C20.3398%2045.5472%2020.5438%2045.856%2020.9452%2046.0859C21.7545%2046.5524%2023.0705%2046.5524%2023.8732%2046.0859L28.229%2043.5567C29.0449%2043.0837%2030.4004%2043.0114%2031.2689%2043.4581C31.2952%2043.4713%2031.3215%2043.491%2031.3478%2043.5041C31.769%2043.7472%2031.9795%2044.0691%2031.9795%2044.391L32.0124%2032.4082C32.0124%2032.0863%2031.8019%2031.7644%2031.3807%2031.5213Z'%20fill='url(%23paint1_linear_3503_145677)'/%3e%3cpath%20d='M37.4468%2035.02C37.4468%2035.02%2037.3941%2034.9871%2037.3678%2034.974C36.5256%2034.4878%2035.1636%2034.4878%2034.3279%2034.974L29.8866%2037.5558C29.0772%2038.0222%2027.7679%2038.0222%2026.9586%2037.5558C26.5506%2037.3193%2026.3466%2037.0105%2026.3532%2036.7083L26.3203%2048.6911C26.3203%2048.9999%2026.5243%2049.3086%2026.9257%2049.5386C27.735%2050.005%2029.0509%2050.005%2029.8537%2049.5386L34.295%2046.9568C35.1307%2046.4706%2036.4927%2046.4706%2037.3349%2046.9568C37.3612%2046.9699%2037.3875%2046.9896%2037.4139%2047.0027C37.7692%2047.2327%2037.9402%2047.5217%2037.9402%2047.8174L37.9731%2035.8346C37.9731%2035.5455%2037.8021%2035.2499%2037.4468%2035.02Z'%20fill='url(%23paint2_linear_3503_145677)'/%3e%3cpath%20d='M11.3281%2040.1915L12.9336%2048.7647C13.2363%2050.3677%2015.0391%2051.1954%2016.4538%2050.3743L17.9145%2049.5268C18.3159%2049.2969%2018.5133%2048.9947%2018.5133%2048.6859L18.5462%2036.7031L11.3281%2040.185V40.1915Z'%20fill='%23CFCFC7'/%3e%3cpath%20d='M23.9383%2041.0037L19.5561%2042.8892C19.1087%2043.1454%2018.3783%2043.5987%2018.3783%2043.9403C16.7531%2046.4367%2019.6285%2049.8791%2023.9054%2052.9799C24.3067%2052.75%2024.5041%2052.4478%2024.5041%2052.139L24.537%2040.1562C24.537%2040.4584%2024.3396%2040.7606%2023.9383%2040.9971V41.0037Z'%20fill='%23CFCFC7'/%3e%3cpath%20d='M35.6108%2044.29C28.3928%2048.4814%2016.6413%2048.4814%209.37059%2044.29C5.71222%2042.1812%203.88962%2039.4154%203.8962%2036.6562L3.8633%2042.5162C3.85672%2045.282%205.67932%2048.0478%209.33769%2050.15C16.6084%2054.3413%2028.3533%2054.3413%2035.5779%2050.15C39.1639%2048.0675%2040.9602%2045.3477%2040.9668%2042.6214L40.9997%2036.7614C40.9931%2039.4877%2039.1968%2042.214%2035.6108%2044.29Z'%20fill='url(%23paint3_linear_3503_145677)'/%3e%3cpath%20d='M35.5194%2029.1123C42.7901%2033.3036%2042.8296%2040.0965%2035.6115%2044.2812C28.3935%2048.4726%2016.642%2048.4726%209.37128%2044.2812C2.10718%2040.0899%202.0677%2033.297%209.29232%2029.1123C16.5104%2024.9209%2028.2553%2024.9209%2035.5194%2029.1123ZM22.544%2045.3324L37.2959%2036.7723C38.1118%2036.2993%2038.2303%2035.511%2037.4539%2035.0117C37.4275%2034.9985%2037.4012%2034.9788%2037.3749%2034.9657C36.5327%2034.4795%2035.1707%2034.4795%2034.335%2034.9657L29.8937%2037.5475C29.0844%2038.0139%2027.775%2038.0139%2026.9657%2037.5475C26.1563%2037.0811%2026.1563%2036.3256%2026.9657%2035.8526L31.407%2033.2708C32.2427%2032.7846%2032.2361%2031.9963%2031.3939%2031.5101C31.3675%2031.497%2031.3412%2031.4773%2031.3149%2031.4641C30.4464%2031.0108%2029.0909%2031.0831%2028.275%2031.5627L23.9192%2034.0919C23.1099%2034.5584%2021.8005%2034.5584%2020.9912%2034.0919C20.1819%2033.6255%2020.1819%2032.87%2020.9912%2032.397L25.347%2029.8677C26.1629%2029.3947%2026.2814%2028.613%2025.5049%2028.1071C25.4786%2028.094%2025.4523%2028.0743%2025.426%2028.0611C24.5838%2027.575%2023.2218%2027.575%2022.3861%2028.0611L7.63421%2036.6212C6.81173%2037.1008%206.6933%2037.8825%207.47629%2038.3818C7.50261%2038.395%207.52893%2038.4147%207.55525%2038.4278C8.39747%2038.914%209.75948%2038.914%2010.5951%2038.4278L15.0365%2035.846C15.8392%2035.3796%2017.1486%2035.3796%2017.9579%2035.846C18.7672%2036.3124%2018.7738%2037.0745%2017.9711%2037.5409L13.6152%2040.0702C12.7928%2040.5498%2012.6743%2041.3315%2013.4573%2041.8308C13.4837%2041.844%2013.51%2041.8637%2013.5363%2041.8768C14.3785%2042.3629%2015.7405%2042.3629%2016.5762%2041.8768L21.0175%2039.295C21.8203%2038.8285%2023.1296%2038.8285%2023.939%2039.295C24.7483%2039.7614%2024.7548%2040.5235%2023.9521%2040.9899L19.5963%2043.5192C18.7738%2043.9987%2018.6554%2044.7805%2019.4384%2045.2798C19.4647%2045.2929%2019.491%2045.3126%2019.5173%2045.3258C20.3595%2045.8119%2021.7216%2045.8119%2022.5638%2045.3258L22.544%2045.3324Z'%20fill='url(%23paint4_linear_3503_145677)'/%3e%3cpath%20d='M20.9974%2039.3094C21.5435%2038.994%2022.3199%2038.8955%2023.0174%2039.0072V9.10938H19.1484V40.3802L20.9908%2039.3094H20.9974Z'%20fill='%23403636'/%3e%3cpath%20d='M26.534%201.85938H15.7431C14.2429%203.28496%2013.3086%205.28865%2013.3086%207.51572C13.3086%2011.8319%2016.8156%2015.3334%2021.1386%2015.3334C25.4615%2015.3334%2028.9685%2011.8319%2028.9685%207.51572C28.9685%205.28865%2028.0276%203.28496%2026.534%201.85938Z'%20fill='url(%23paint5_radial_3503_145677)'/%3e%3cpath%20d='M25.5151%201.04455C27.9365%202.43728%2027.9365%204.69719%2025.5151%206.08993C23.0938%207.48266%2019.1788%207.48266%2016.7574%206.08993C14.3361%204.69719%2014.3361%202.43728%2016.7574%201.04455C19.1788%20-0.348184%2023.0938%20-0.348184%2025.5151%201.04455Z'%20fill='%23504444'/%3e%3cpath%20d='M24.6314%201.55925C22.7036%200.449001%2019.5847%200.449001%2017.6568%201.55925C15.729%202.66949%2015.729%204.46954%2017.6568%205.57978C19.5847%206.69003%2022.7036%206.69003%2024.6314%205.57978C26.5593%204.46954%2026.5593%202.66949%2024.6314%201.55925ZM24.1511%205.30386C22.4864%206.26301%2019.7953%206.26301%2018.1372%205.30386C16.4725%204.34472%2016.4725%202.79431%2018.1372%201.83517C19.8019%200.876019%2022.493%200.876019%2024.1511%201.83517C25.8158%202.79431%2025.8158%204.34472%2024.1511%205.30386Z'%20fill='%23FFCC33'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_3503_145677'%20x1='25.977'%20y1='38.1585'%20x2='14.8834'%20y2='38.1585'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B2B1AB'/%3e%3cstop%20offset='1'%20stop-color='%23CFCFC7'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_3503_145677'%20x1='32.4862'%20y1='38.8069'%20x2='14.4443'%20y2='38.8069'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B2B1AB'/%3e%3cstop%20offset='1'%20stop-color='%23CFCFC7'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_3503_145677'%20x1='38.006'%20y1='42.2464'%20x2='26.4519'%20y2='42.2464'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B2B1AB'/%3e%3cstop%20offset='1'%20stop-color='%23CFCFC7'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_3503_145677'%20x1='3.8633'%20y1='44.9732'%20x2='40.9997'%20y2='44.9732'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B2B1AB'/%3e%3cstop%20offset='1'%20stop-color='%23CFCFC7'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint4_linear_3503_145677'%20x1='3.89688'%20y1='36.7'%20x2='41.0004'%20y2='36.7'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.61'%20stop-color='%23DCDCD3'/%3e%3cstop%20offset='0.62'%20stop-color='%23ECECE2'/%3e%3c/linearGradient%3e%3cradialGradient%20id='paint5_radial_3503_145677'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(23.2244%200.499489)%20scale(16.4956%2016.4697)'%3e%3cstop%20stop-color='%233F3535'/%3e%3cstop%20offset='1'%20stop-color='%23332C2C'/%3e%3c/radialGradient%3e%3c/defs%3e%3c/svg%3e", W0 = ({
|
|
3235
3241
|
count: e,
|
|
3236
3242
|
notifications: r,
|
|
3237
3243
|
onViewMore: o,
|
|
3238
3244
|
className: n = "",
|
|
3239
3245
|
width: s = 380,
|
|
3240
|
-
maxHeight:
|
|
3246
|
+
maxHeight: i = 400
|
|
3241
3247
|
}) => {
|
|
3242
|
-
const l = /* @__PURE__ */
|
|
3248
|
+
const l = /* @__PURE__ */ C("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
3243
3249
|
/* @__PURE__ */ t("circle", { cx: "10", cy: "10", r: "9", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
3244
3250
|
/* @__PURE__ */ t("path", { d: "M10 6v4M10 14h.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
3245
3251
|
] });
|
|
3246
|
-
return /* @__PURE__ */
|
|
3252
|
+
return /* @__PURE__ */ C(
|
|
3247
3253
|
"div",
|
|
3248
3254
|
{
|
|
3249
3255
|
className: `bg-white rounded-2xl shadow-lg border border-gray-100 overflow-hidden ${n}`,
|
|
3250
3256
|
style: { width: typeof s == "number" ? `${s}px` : s },
|
|
3251
3257
|
children: [
|
|
3252
|
-
/* @__PURE__ */
|
|
3253
|
-
/* @__PURE__ */
|
|
3258
|
+
/* @__PURE__ */ C("div", { className: "flex items-center justify-between px-4 py-3 bg-gray-50", children: [
|
|
3259
|
+
/* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
|
|
3254
3260
|
/* @__PURE__ */ t("span", { className: "text-sm font-medium text-[#181918]", children: "Issues" }),
|
|
3255
3261
|
e !== void 0 && /* @__PURE__ */ t("span", { className: "flex flex-col items-center justify-center h-[22px] w-[22px] bg-[#FAE5B7] text-[#6C4D0B] border border-[#EFAC18] text-[11px] font-medium px-2 py-0.5 rounded-full", children: e })
|
|
3256
3262
|
] }),
|
|
@@ -3267,22 +3273,22 @@ const P0 = ({
|
|
|
3267
3273
|
"div",
|
|
3268
3274
|
{
|
|
3269
3275
|
className: "overflow-y-auto",
|
|
3270
|
-
style: { maxHeight: typeof
|
|
3271
|
-
children: r.length === 0 ? /* @__PURE__ */
|
|
3276
|
+
style: { maxHeight: typeof i == "number" ? `${i}px` : i },
|
|
3277
|
+
children: r.length === 0 ? /* @__PURE__ */ C("div", { className: "px-4 py-16 flex flex-col items-center justify-center", children: [
|
|
3272
3278
|
/* @__PURE__ */ t(
|
|
3273
3279
|
"img",
|
|
3274
3280
|
{
|
|
3275
|
-
src:
|
|
3281
|
+
src: b0,
|
|
3276
3282
|
alt: "No notifications",
|
|
3277
3283
|
className: "w-16 h-16 mb-4"
|
|
3278
3284
|
}
|
|
3279
3285
|
),
|
|
3280
3286
|
/* @__PURE__ */ t("h4", { className: "text-sm font-medium text-[#181918] mb-1", children: "No issues available" }),
|
|
3281
3287
|
/* @__PURE__ */ t("p", { className: "text-xs text-gray-500 font-light", children: "All recent activities will appear here" })
|
|
3282
|
-
] }) : r.map((
|
|
3288
|
+
] }) : r.map((a) => /* @__PURE__ */ C(
|
|
3283
3289
|
"div",
|
|
3284
3290
|
{
|
|
3285
|
-
onClick:
|
|
3291
|
+
onClick: a.onClick,
|
|
3286
3292
|
className: "flex gap-3 px-4 py-3 border-b border-[#E6E6E6] hover:bg-[#FDEFEF] transition-colors duration-200 cursor-pointer",
|
|
3287
3293
|
children: [
|
|
3288
3294
|
/* @__PURE__ */ t(
|
|
@@ -3290,20 +3296,20 @@ const P0 = ({
|
|
|
3290
3296
|
{
|
|
3291
3297
|
className: "flex items-center justify-center h-10 w-10 rounded-full flex-shrink-0 [&>svg]:w-5 [&>svg]:h-5",
|
|
3292
3298
|
style: {
|
|
3293
|
-
backgroundColor:
|
|
3294
|
-
color:
|
|
3299
|
+
backgroundColor: a.iconBackgroundColor || "#FCE7E6",
|
|
3300
|
+
color: a.iconColor || "#EC615B"
|
|
3295
3301
|
},
|
|
3296
|
-
children:
|
|
3302
|
+
children: a.icon || l
|
|
3297
3303
|
}
|
|
3298
3304
|
),
|
|
3299
|
-
/* @__PURE__ */
|
|
3300
|
-
/* @__PURE__ */ t("h4", { className: "text-sm font-medium text-[#181918] mb-1", children:
|
|
3301
|
-
/* @__PURE__ */ t("p", { className: "text-xs text-[#181918] font-light line-clamp-2", children:
|
|
3305
|
+
/* @__PURE__ */ C("div", { className: "flex-1 min-w-0", children: [
|
|
3306
|
+
/* @__PURE__ */ t("h4", { className: "text-sm font-medium text-[#181918] mb-1", children: a.title }),
|
|
3307
|
+
/* @__PURE__ */ t("p", { className: "text-xs text-[#181918] font-light line-clamp-2", children: a.description })
|
|
3302
3308
|
] }),
|
|
3303
|
-
/* @__PURE__ */ t("div", { className: "flex-shrink-0", children:
|
|
3309
|
+
/* @__PURE__ */ t("div", { className: "flex-shrink-0", children: a.isNew ? /* @__PURE__ */ t("span", { className: "text-[#EC615B] text-xs font-medium px-2 py-1 rounded", children: "New" }) : /* @__PURE__ */ t("span", { className: "text-xs text-gray-400", children: a.timestamp }) })
|
|
3304
3310
|
]
|
|
3305
3311
|
},
|
|
3306
|
-
|
|
3312
|
+
a.id
|
|
3307
3313
|
))
|
|
3308
3314
|
}
|
|
3309
3315
|
)
|
|
@@ -3316,7 +3322,7 @@ const P0 = ({
|
|
|
3316
3322
|
activeKey: o,
|
|
3317
3323
|
onChange: n,
|
|
3318
3324
|
className: s = ""
|
|
3319
|
-
}) => /* @__PURE__ */
|
|
3325
|
+
}) => /* @__PURE__ */ C("div", { className: s, children: [
|
|
3320
3326
|
/* @__PURE__ */ t("style", { children: `
|
|
3321
3327
|
.custom-tabs .ant-tabs-nav {
|
|
3322
3328
|
margin-bottom: 0 !important;
|
|
@@ -3367,22 +3373,22 @@ const P0 = ({
|
|
|
3367
3373
|
onChange: n
|
|
3368
3374
|
}
|
|
3369
3375
|
)
|
|
3370
|
-
] }), P = "#EC615B",
|
|
3376
|
+
] }), P = "#EC615B", i2 = "rgba(236, 97, 91, 0.2)", v0 = "'Plus Jakarta Sans', sans-serif", Q = {
|
|
3371
3377
|
token: {
|
|
3372
3378
|
colorPrimary: P,
|
|
3373
|
-
fontFamily:
|
|
3379
|
+
fontFamily: v0,
|
|
3374
3380
|
borderRadius: 8
|
|
3375
3381
|
},
|
|
3376
3382
|
components: {
|
|
3377
3383
|
Input: {
|
|
3378
3384
|
hoverBorderColor: P,
|
|
3379
3385
|
activeBorderColor: P,
|
|
3380
|
-
activeShadow: `0 0 0 2px ${
|
|
3386
|
+
activeShadow: `0 0 0 2px ${i2}`
|
|
3381
3387
|
},
|
|
3382
3388
|
InputNumber: {
|
|
3383
3389
|
hoverBorderColor: P,
|
|
3384
3390
|
activeBorderColor: P,
|
|
3385
|
-
activeShadow: `0 0 0 2px ${
|
|
3391
|
+
activeShadow: `0 0 0 2px ${i2}`
|
|
3386
3392
|
},
|
|
3387
3393
|
Select: {
|
|
3388
3394
|
colorPrimaryHover: P,
|
|
@@ -3395,7 +3401,7 @@ const P0 = ({
|
|
|
3395
3401
|
DatePicker: {
|
|
3396
3402
|
hoverBorderColor: P,
|
|
3397
3403
|
activeBorderColor: P,
|
|
3398
|
-
activeShadow: `0 0 0 2px ${
|
|
3404
|
+
activeShadow: `0 0 0 2px ${i2}`
|
|
3399
3405
|
}
|
|
3400
3406
|
}
|
|
3401
3407
|
}, w0 = (e) => e ? {
|
|
@@ -3413,7 +3419,7 @@ export {
|
|
|
3413
3419
|
I0 as CountrySelector,
|
|
3414
3420
|
d0 as CurrencyInput,
|
|
3415
3421
|
T0 as DashboardCard,
|
|
3416
|
-
|
|
3422
|
+
$0 as Dropdown,
|
|
3417
3423
|
r0 as Input,
|
|
3418
3424
|
U0 as Modal,
|
|
3419
3425
|
W0 as NotificationDropdown,
|
|
@@ -3427,7 +3433,7 @@ export {
|
|
|
3427
3433
|
q0 as ShekelProvider,
|
|
3428
3434
|
M0 as StatCard,
|
|
3429
3435
|
G0 as Steps,
|
|
3430
|
-
|
|
3436
|
+
S0 as Table,
|
|
3431
3437
|
E0 as TableTop,
|
|
3432
3438
|
K0 as TabsComponent,
|
|
3433
3439
|
R0 as UserCard,
|