am-shared-assets 0.0.15 → 0.0.16
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/ChevronBottomIcon-BM6pUrh1.js +136 -0
- package/dist/components/index.d.ts +10 -1
- package/dist/components.d.ts +1 -0
- package/dist/components.js +831 -1
- package/dist/icons.js +86 -211
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -1 +1,831 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsxs as l, jsx as t, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { I as F, b as S, a as W, W as q, T as V, C as Y } from "./ChevronBottomIcon-BM6pUrh1.js";
|
|
3
|
+
import { Slider as G, MenuItem as J } from "@mui/material";
|
|
4
|
+
import K from "@mui/material/Select";
|
|
5
|
+
function T(a) {
|
|
6
|
+
var e, s, r = "";
|
|
7
|
+
if (typeof a == "string" || typeof a == "number") r += a;
|
|
8
|
+
else if (typeof a == "object") if (Array.isArray(a)) {
|
|
9
|
+
var n = a.length;
|
|
10
|
+
for (e = 0; e < n; e++) a[e] && (s = T(a[e])) && (r && (r += " "), r += s);
|
|
11
|
+
} else for (s in a) a[s] && (r && (r += " "), r += s);
|
|
12
|
+
return r;
|
|
13
|
+
}
|
|
14
|
+
function b() {
|
|
15
|
+
for (var a, e, s = 0, r = "", n = arguments.length; s < n; s++) (a = arguments[s]) && (e = T(a)) && (r && (r += " "), r += e);
|
|
16
|
+
return r;
|
|
17
|
+
}
|
|
18
|
+
const Q = {
|
|
19
|
+
sm: "text-xs",
|
|
20
|
+
md: "text-sm"
|
|
21
|
+
}, U = {
|
|
22
|
+
default: "w-[342px] min-w-[342px]",
|
|
23
|
+
full: "w-full"
|
|
24
|
+
}, X = {
|
|
25
|
+
default: "bg-default-100",
|
|
26
|
+
primary: "bg-primary-50",
|
|
27
|
+
secondary: "bg-secondary-50",
|
|
28
|
+
success: "bg-success-50",
|
|
29
|
+
warning: "bg-warning-50",
|
|
30
|
+
danger: "bg-danger-50"
|
|
31
|
+
}, Z = {
|
|
32
|
+
default: "text-default-900",
|
|
33
|
+
primary: "text-base-primary",
|
|
34
|
+
secondary: "text-base-secondary",
|
|
35
|
+
success: "text-base-success",
|
|
36
|
+
warning: "text-default-900",
|
|
37
|
+
danger: "text-base-danger"
|
|
38
|
+
}, H = {
|
|
39
|
+
default: "text-default-600",
|
|
40
|
+
primary: "text-base-primary",
|
|
41
|
+
secondary: "text-base-secondary",
|
|
42
|
+
success: "text-base-success",
|
|
43
|
+
warning: "text-default-600",
|
|
44
|
+
danger: "text-base-danger"
|
|
45
|
+
}, ee = {
|
|
46
|
+
default: "bg-default-300",
|
|
47
|
+
primary: "bg-base-primary",
|
|
48
|
+
secondary: "bg-base-secondary",
|
|
49
|
+
success: "bg-base-success",
|
|
50
|
+
warning: "bg-base-warning",
|
|
51
|
+
danger: "bg-base-danger"
|
|
52
|
+
}, re = {
|
|
53
|
+
white: "text-white",
|
|
54
|
+
black: "text-default-900"
|
|
55
|
+
}, z = {
|
|
56
|
+
default: "#a1a1aa",
|
|
57
|
+
primary: "#A9BCE3",
|
|
58
|
+
secondary: "#E2CDA6",
|
|
59
|
+
success: "#a2e9c1",
|
|
60
|
+
warning: "#fbdba7",
|
|
61
|
+
danger: "#faa0bf"
|
|
62
|
+
}, A = {
|
|
63
|
+
start: "items-start",
|
|
64
|
+
center: "items-center"
|
|
65
|
+
}, M = {
|
|
66
|
+
default: "#000",
|
|
67
|
+
primary: "#112E62",
|
|
68
|
+
secondary: "#C59C4E",
|
|
69
|
+
success: "#17c964",
|
|
70
|
+
warning: "#f5a524",
|
|
71
|
+
danger: "#f31260"
|
|
72
|
+
}, $ = {
|
|
73
|
+
success: /* @__PURE__ */ t(V, { color: "#17C964", size: 24 }),
|
|
74
|
+
warning: /* @__PURE__ */ t(q, { color: "#F5A524", size: 24 }),
|
|
75
|
+
danger: /* @__PURE__ */ t(W, { color: "#F31260", size: 24 })
|
|
76
|
+
}, se = {
|
|
77
|
+
none: "rounded-none",
|
|
78
|
+
sm: "rounded-md",
|
|
79
|
+
md: "rounded-xl",
|
|
80
|
+
lg: "rounded-[22px]",
|
|
81
|
+
full: "rounded-full"
|
|
82
|
+
}, Re = ({
|
|
83
|
+
title: a,
|
|
84
|
+
description: e,
|
|
85
|
+
color: s = "default",
|
|
86
|
+
size: r = "md",
|
|
87
|
+
width: n = "default",
|
|
88
|
+
rounded: o = "none",
|
|
89
|
+
infoIconAlignment: d,
|
|
90
|
+
isInfoIcon: c = !0,
|
|
91
|
+
hasCloseButton: i = !0,
|
|
92
|
+
hasButton: u = !1,
|
|
93
|
+
buttonTitle: x,
|
|
94
|
+
buttonTextColor: h = "black",
|
|
95
|
+
buttonClickHandler: f,
|
|
96
|
+
closeAlertHandler: w,
|
|
97
|
+
children: y
|
|
98
|
+
}) => {
|
|
99
|
+
const p = b(
|
|
100
|
+
U[n],
|
|
101
|
+
Q[r],
|
|
102
|
+
se[o],
|
|
103
|
+
X[s]
|
|
104
|
+
);
|
|
105
|
+
return y ? /* @__PURE__ */ l(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
className: `flex p-3 ${p} ${d && A[d]}`,
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ t("div", { className: "mt-[1px]", children: c || !$[s] ? /* @__PURE__ */ t(F, { color: M[s] }) : $[s] }),
|
|
111
|
+
y
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
) : /* @__PURE__ */ l("div", { className: `relative flex justify-between p-3 ${p}`, children: [
|
|
115
|
+
/* @__PURE__ */ l(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
className: `flex ${d ? A[d] : u ? "items-center" : a && e ? "items-start" : "items-center"} gap-3`,
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ t("div", { className: "mt-[1px]", children: c || !$[s] ? /* @__PURE__ */ t(F, { color: M[s] }) : $[s] }),
|
|
121
|
+
/* @__PURE__ */ l("div", { children: [
|
|
122
|
+
a && /* @__PURE__ */ t("h2", { className: `font-semibold ${Z[s]}`, children: a }),
|
|
123
|
+
e && /* @__PURE__ */ t("p", { className: H[s], children: e })
|
|
124
|
+
] })
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
u ? /* @__PURE__ */ l("div", { className: "flex items-center", children: [
|
|
129
|
+
/* @__PURE__ */ t(
|
|
130
|
+
"button",
|
|
131
|
+
{
|
|
132
|
+
onClick: f,
|
|
133
|
+
className: `h-8 px-3 rounded-md ${ee[s]} ${re[h]}`,
|
|
134
|
+
children: x
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
i && /* @__PURE__ */ t(
|
|
138
|
+
"button",
|
|
139
|
+
{
|
|
140
|
+
onClick: w,
|
|
141
|
+
className: "absolute -top-1 -left-1 border border-default-300 bg-default-100 rounded-full",
|
|
142
|
+
children: /* @__PURE__ */ t(S, { color: z.default, size: 14 })
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
] }) : i && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("button", { onClick: w, children: /* @__PURE__ */ t(S, { color: z[s] }) }) })
|
|
146
|
+
] });
|
|
147
|
+
}, ae = {
|
|
148
|
+
sm: "h-5 text-xs px-2",
|
|
149
|
+
md: "h-6 text-sm px-2.5",
|
|
150
|
+
lg: "h-7 text-sm px-3"
|
|
151
|
+
}, te = {
|
|
152
|
+
neutral: "bg-default-500",
|
|
153
|
+
default: "bg-default-200",
|
|
154
|
+
primary: "bg-layout-focus",
|
|
155
|
+
danger: "bg-base-danger",
|
|
156
|
+
success: "bg-base-success"
|
|
157
|
+
}, ne = {
|
|
158
|
+
white: "text-content-1",
|
|
159
|
+
black: "text-layout-fg"
|
|
160
|
+
}, oe = {
|
|
161
|
+
pill: "rounded-full",
|
|
162
|
+
Rectangle: "rounded-xxs"
|
|
163
|
+
}, Te = ({
|
|
164
|
+
label: a,
|
|
165
|
+
color: e = "default",
|
|
166
|
+
type: s = "pill",
|
|
167
|
+
size: r = "md",
|
|
168
|
+
textColor: n = "black"
|
|
169
|
+
}) => {
|
|
170
|
+
const o = b(
|
|
171
|
+
te[e],
|
|
172
|
+
ne[n],
|
|
173
|
+
ae[r],
|
|
174
|
+
oe[s]
|
|
175
|
+
);
|
|
176
|
+
return /* @__PURE__ */ t("div", { className: `flex justify-center items-center ${o}`, children: a });
|
|
177
|
+
}, de = {
|
|
178
|
+
sm: "h-8 text-xs px-3",
|
|
179
|
+
md: "h-10 text-sm px-4",
|
|
180
|
+
lg: "h-12 text-base px-6"
|
|
181
|
+
}, m = {
|
|
182
|
+
white: "text-white",
|
|
183
|
+
black: "text-default-900",
|
|
184
|
+
default: "text-default-900",
|
|
185
|
+
primary: "text-base-primary",
|
|
186
|
+
secondary: "text-base-secondary",
|
|
187
|
+
success: "text-base-success",
|
|
188
|
+
warning: "text-base-warning",
|
|
189
|
+
danger: "text-base-danger"
|
|
190
|
+
}, B = {
|
|
191
|
+
default: "bg-default-300",
|
|
192
|
+
primary: "bg-base-primary",
|
|
193
|
+
secondary: "bg-base-secondary",
|
|
194
|
+
success: "bg-base-success",
|
|
195
|
+
warning: "bg-base-warning",
|
|
196
|
+
danger: "bg-base-danger"
|
|
197
|
+
}, I = {
|
|
198
|
+
default: "border-default-300",
|
|
199
|
+
primary: "border-base-primary",
|
|
200
|
+
secondary: "border-base-secondary",
|
|
201
|
+
success: "border-base-success",
|
|
202
|
+
warning: "border-base-warning",
|
|
203
|
+
danger: "border-base-danger"
|
|
204
|
+
}, E = {
|
|
205
|
+
default: "bg-default-100",
|
|
206
|
+
primary: "bg-primary-100",
|
|
207
|
+
secondary: "bg-secondary-100",
|
|
208
|
+
success: "bg-success-100",
|
|
209
|
+
warning: "bg-warning-100",
|
|
210
|
+
danger: "bg-danger-100"
|
|
211
|
+
}, ce = {
|
|
212
|
+
none: "rounded-none",
|
|
213
|
+
sm: "rounded-sm",
|
|
214
|
+
md: "rounded-md",
|
|
215
|
+
lg: "rounded-lg",
|
|
216
|
+
full: "rounded-full"
|
|
217
|
+
}, ie = (a, e, s) => {
|
|
218
|
+
let r = "";
|
|
219
|
+
switch (a) {
|
|
220
|
+
case "solid":
|
|
221
|
+
r = `${B[e]} ${m[s]}`;
|
|
222
|
+
break;
|
|
223
|
+
case "bordered":
|
|
224
|
+
r = `border-2 ${I[e]} ${m[e]}`;
|
|
225
|
+
break;
|
|
226
|
+
case "light":
|
|
227
|
+
r = m[e];
|
|
228
|
+
break;
|
|
229
|
+
case "flat":
|
|
230
|
+
r = `${E[e]} ${m[e]}`;
|
|
231
|
+
break;
|
|
232
|
+
case "faded":
|
|
233
|
+
r = `border-2 ${I.default} ${E.default} ${m[e]}`;
|
|
234
|
+
break;
|
|
235
|
+
case "shadow":
|
|
236
|
+
r = `shadow-lg ${B[e]} ${m[s]}`;
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
return r;
|
|
240
|
+
}, Le = ({
|
|
241
|
+
type: a = "button",
|
|
242
|
+
variant: e = "solid",
|
|
243
|
+
color: s = "default",
|
|
244
|
+
textColor: r = "black",
|
|
245
|
+
size: n = "md",
|
|
246
|
+
rounded: o = "none",
|
|
247
|
+
label: d,
|
|
248
|
+
icon: c,
|
|
249
|
+
iconPosition: i = "left",
|
|
250
|
+
width: u = "auto",
|
|
251
|
+
disabled: x = !1,
|
|
252
|
+
onClick: h
|
|
253
|
+
}) => {
|
|
254
|
+
const f = b(
|
|
255
|
+
u === "full" ? "w-full" : "w-auto",
|
|
256
|
+
i === "right" ? "flex-row" : "flex-row-reverse",
|
|
257
|
+
ce[o],
|
|
258
|
+
de[n],
|
|
259
|
+
ie(e, s, r)
|
|
260
|
+
);
|
|
261
|
+
return /* @__PURE__ */ l(
|
|
262
|
+
"button",
|
|
263
|
+
{
|
|
264
|
+
type: a,
|
|
265
|
+
className: "flex items-center justify-center gap-2 font-semibold transition-all duration-300 " + f,
|
|
266
|
+
onClick: h,
|
|
267
|
+
disabled: x,
|
|
268
|
+
children: [
|
|
269
|
+
c,
|
|
270
|
+
d && /* @__PURE__ */ t("p", { children: d })
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
);
|
|
274
|
+
}, le = {
|
|
275
|
+
sm: "h-6 text-xs",
|
|
276
|
+
md: "h-7 text-sm",
|
|
277
|
+
lg: "h-8 text-base"
|
|
278
|
+
}, ue = {
|
|
279
|
+
none: "rounded-none",
|
|
280
|
+
sm: "rounded-sm",
|
|
281
|
+
md: "rounded-md",
|
|
282
|
+
lg: "rounded-lg",
|
|
283
|
+
full: "rounded-full"
|
|
284
|
+
}, j = {
|
|
285
|
+
default: "bg-default-200",
|
|
286
|
+
primary: "bg-base-primary",
|
|
287
|
+
secondary: "bg-base-secondary",
|
|
288
|
+
success: "bg-base-success",
|
|
289
|
+
warning: "bg-base-warning",
|
|
290
|
+
danger: "bg-base-danger"
|
|
291
|
+
}, g = {
|
|
292
|
+
white: "text-content-1",
|
|
293
|
+
black: "text-layout-fg",
|
|
294
|
+
default: "text-layout-fg",
|
|
295
|
+
primary: "text-base-primary",
|
|
296
|
+
secondary: "text-base-secondary",
|
|
297
|
+
success: "text-base-success",
|
|
298
|
+
warning: "text-base-warning",
|
|
299
|
+
danger: "text-base-danger"
|
|
300
|
+
}, v = {
|
|
301
|
+
default: "border-default-200",
|
|
302
|
+
primary: "border-base-primary",
|
|
303
|
+
secondary: "border-base-secondary",
|
|
304
|
+
success: "border-base-success",
|
|
305
|
+
warning: "border-base-warning",
|
|
306
|
+
danger: "border-base-danger"
|
|
307
|
+
}, be = {
|
|
308
|
+
default: "bg-default-200",
|
|
309
|
+
primary: "bg-primary-100",
|
|
310
|
+
secondary: "bg-secondary-100",
|
|
311
|
+
success: "bg-success-100",
|
|
312
|
+
warning: "bg-warning-100",
|
|
313
|
+
danger: "bg-danger-100"
|
|
314
|
+
}, ge = {
|
|
315
|
+
default: "bg-default-400",
|
|
316
|
+
primary: "bg-base-primary",
|
|
317
|
+
secondary: "bg-base-secondary",
|
|
318
|
+
success: "bg-base-success",
|
|
319
|
+
warning: "bg-base-warning",
|
|
320
|
+
danger: "bg-base-danger"
|
|
321
|
+
}, fe = (a, e, s) => {
|
|
322
|
+
let r = "";
|
|
323
|
+
switch (a) {
|
|
324
|
+
case "solid":
|
|
325
|
+
r = `${j[e]} ${g[s]}`;
|
|
326
|
+
break;
|
|
327
|
+
case "bordered":
|
|
328
|
+
r = `border-2 ${v[e]} ${g[e]}`;
|
|
329
|
+
break;
|
|
330
|
+
case "light":
|
|
331
|
+
r = g[e];
|
|
332
|
+
break;
|
|
333
|
+
case "flat":
|
|
334
|
+
r = `${be[e]} ${g[e]}`;
|
|
335
|
+
break;
|
|
336
|
+
case "faded":
|
|
337
|
+
r = `border-2 ${v.default} bg-default-100 ${g[e]}`;
|
|
338
|
+
break;
|
|
339
|
+
case "shadow":
|
|
340
|
+
r = `shadow-lg ${j[e]} ${g[s]}`;
|
|
341
|
+
break;
|
|
342
|
+
case "dot":
|
|
343
|
+
r = `border-2 ${v.default} ${g.black}`;
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
return r;
|
|
347
|
+
}, Pe = ({
|
|
348
|
+
variant: a = "solid",
|
|
349
|
+
color: e = "default",
|
|
350
|
+
textColor: s = "black",
|
|
351
|
+
label: r,
|
|
352
|
+
size: n = "md",
|
|
353
|
+
rounded: o = "none",
|
|
354
|
+
children: d
|
|
355
|
+
}) => {
|
|
356
|
+
const c = b(
|
|
357
|
+
ue[o],
|
|
358
|
+
le[n],
|
|
359
|
+
fe(a, e, s)
|
|
360
|
+
);
|
|
361
|
+
return /* @__PURE__ */ t("div", { className: `w-fit flex items-center justify-center gap-1 px-2 ${c}`, children: d || /* @__PURE__ */ l(O, { children: [
|
|
362
|
+
/* @__PURE__ */ t("p", { children: r }),
|
|
363
|
+
a === "dot" && /* @__PURE__ */ t("div", { className: `size-2 rounded-full ${ge[e]}` })
|
|
364
|
+
] }) });
|
|
365
|
+
}, pe = {
|
|
366
|
+
sm: "h-8 py-1",
|
|
367
|
+
lg: "h-10 py-2"
|
|
368
|
+
}, me = {
|
|
369
|
+
default: "text-default-600",
|
|
370
|
+
primary: "text-base-primary",
|
|
371
|
+
success: "text-base-success",
|
|
372
|
+
warning: "text-base-warning",
|
|
373
|
+
danger: "text-base-danger"
|
|
374
|
+
}, xe = {
|
|
375
|
+
primary: "text-base-primary hover:text-base-primary",
|
|
376
|
+
success: "text-base-success hover:text-base-success",
|
|
377
|
+
warning: "text-base-warning hover:text-base-warning"
|
|
378
|
+
}, he = {
|
|
379
|
+
default: "bg-default-100 hover:bg-default-200 focus-within:hover:bg-transparent",
|
|
380
|
+
primary: "bg-primary-100 hover:bg-primary-50 focus-within:hover:bg-transparent",
|
|
381
|
+
success: "bg-success-100 hover:bg-success-50 focus-within:hover:bg-transparent",
|
|
382
|
+
warning: "bg-warning-100 hover:bg-warning-50 focus-within:hover:bg-transparent",
|
|
383
|
+
danger: "bg-danger-100 hover:bg-danger-50 focus-within:hover:bg-transparent"
|
|
384
|
+
}, C = {
|
|
385
|
+
default: "focus-within:bg-transparent focus-within:border focus-within:border-layout-fg focus-within:hover:border-layout-fg focus-within:hover:bg-transparent",
|
|
386
|
+
primary: "focus-within:bg-transparent focus-within:border focus-within:border-base-primary focus-within:hover:border-base-primary focus-within:hover:bg-transparent",
|
|
387
|
+
success: "focus-within:bg-transparent focus-within:border focus-within:border-base-success focus-within:hover:border-base-success focus-within:hover:bg-transparent",
|
|
388
|
+
warning: "focus-within:bg-transparent focus-within:border focus-within:border-base-warning focus-within:hover:border-base-warning focus-within:hover:bg-transparent",
|
|
389
|
+
danger: "focus-within:bg-transparent focus-within:border focus-within:border-base-danger focus-within:hover:border-base-danger focus-within:hover:bg-transparent"
|
|
390
|
+
}, we = {
|
|
391
|
+
default: "hover:border-default-400",
|
|
392
|
+
primary: "hover:border-base-primary",
|
|
393
|
+
success: "hover:border-base-success",
|
|
394
|
+
warning: "hover:border-base-warning",
|
|
395
|
+
danger: "hover:border-base-danger"
|
|
396
|
+
}, ye = {
|
|
397
|
+
sm: "rounded-sm",
|
|
398
|
+
full: "rounded-full"
|
|
399
|
+
}, $e = (a, e, s) => {
|
|
400
|
+
let r = "";
|
|
401
|
+
if (s)
|
|
402
|
+
return r = "bg-danger-100 hover:bg-danger-50 focus-within:hover:bg-transparent focus-within:bg-transparent focus-within:border focus-within:border-base-danger";
|
|
403
|
+
switch (a) {
|
|
404
|
+
case "flat":
|
|
405
|
+
r = `${he[e]} ${C[e]} ${xe[e]} focus-within:text-layout-fg`;
|
|
406
|
+
break;
|
|
407
|
+
case "bordered":
|
|
408
|
+
r = `bg-transparent border border-default-200 hover:border-default-400 ${C[e]}`;
|
|
409
|
+
break;
|
|
410
|
+
case "faded":
|
|
411
|
+
r = `border border-default-200 bg-default-100 hover:bg-default-200 ${we[e]} ${C[e]}`;
|
|
412
|
+
break;
|
|
413
|
+
}
|
|
414
|
+
return r;
|
|
415
|
+
}, Oe = ({
|
|
416
|
+
id: a,
|
|
417
|
+
label: e,
|
|
418
|
+
required: s = !1,
|
|
419
|
+
register: r,
|
|
420
|
+
name: n,
|
|
421
|
+
value: o,
|
|
422
|
+
onChange: d,
|
|
423
|
+
placeHolder: c,
|
|
424
|
+
variant: i = "flat",
|
|
425
|
+
color: u = "default",
|
|
426
|
+
size: x = "sm",
|
|
427
|
+
rounded: h = "sm",
|
|
428
|
+
description: f = "",
|
|
429
|
+
icon: w,
|
|
430
|
+
endIcon: y,
|
|
431
|
+
errorMsg: p = "",
|
|
432
|
+
hasError: _ = !1
|
|
433
|
+
}) => {
|
|
434
|
+
const L = b(ye[h], $e(i, u, _)), N = b(pe[x]);
|
|
435
|
+
return /* @__PURE__ */ l("label", { className: "flex flex-col", children: [
|
|
436
|
+
e && /* @__PURE__ */ l(
|
|
437
|
+
"div",
|
|
438
|
+
{
|
|
439
|
+
className: `h-4 text-xs mb-2 ${_ ? "text-base-danger" : me[u]}`,
|
|
440
|
+
children: [
|
|
441
|
+
e,
|
|
442
|
+
s && /* @__PURE__ */ t("span", { className: "text-base-danger text-sm", children: "*" })
|
|
443
|
+
]
|
|
444
|
+
}
|
|
445
|
+
),
|
|
446
|
+
/* @__PURE__ */ l(
|
|
447
|
+
"div",
|
|
448
|
+
{
|
|
449
|
+
className: `${L} flex items-center px-1.5 transition-all duration-200`,
|
|
450
|
+
children: [
|
|
451
|
+
w,
|
|
452
|
+
r ? /* @__PURE__ */ t(
|
|
453
|
+
"input",
|
|
454
|
+
{
|
|
455
|
+
id: `${a}`,
|
|
456
|
+
type: "text",
|
|
457
|
+
...r(n),
|
|
458
|
+
placeholder: c,
|
|
459
|
+
className: `${N} bg-transparent w-full px-1.5 text-sm outline-none`
|
|
460
|
+
}
|
|
461
|
+
) : /* @__PURE__ */ t(
|
|
462
|
+
"input",
|
|
463
|
+
{
|
|
464
|
+
id: `${a}`,
|
|
465
|
+
type: "text",
|
|
466
|
+
value: o,
|
|
467
|
+
onChange: (P) => d && d(P.target.value),
|
|
468
|
+
placeholder: c,
|
|
469
|
+
className: `${N} bg-transparent w-full px-1.5 text-sm outline-none`
|
|
470
|
+
}
|
|
471
|
+
),
|
|
472
|
+
y
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
),
|
|
476
|
+
f && !p && /* @__PURE__ */ t("p", { className: "mt-1 text-xs text-default-400", children: f }),
|
|
477
|
+
p && /* @__PURE__ */ t("p", { className: "mt-1 mr-1 text-xs text-base-danger", children: p })
|
|
478
|
+
] });
|
|
479
|
+
}, ve = {
|
|
480
|
+
sm: "size-4 min-w-4 p-[3px]",
|
|
481
|
+
md: "size-5 min-w-5 p-1",
|
|
482
|
+
lg: "size-6 min-w-6 p-[5px]"
|
|
483
|
+
}, Ce = {
|
|
484
|
+
primary: "border-base-primary",
|
|
485
|
+
secondary: "border-base-secondary",
|
|
486
|
+
success: "border-base-success",
|
|
487
|
+
warning: "border-base-warning",
|
|
488
|
+
danger: "border-base-danger",
|
|
489
|
+
neutral: "border-default-500"
|
|
490
|
+
}, ke = {
|
|
491
|
+
primary: "bg-base-primary",
|
|
492
|
+
secondary: "bg-base-secondary",
|
|
493
|
+
success: "bg-base-success",
|
|
494
|
+
warning: "bg-base-warning",
|
|
495
|
+
danger: "bg-base-danger",
|
|
496
|
+
neutral: "bg-default-500"
|
|
497
|
+
}, We = ({
|
|
498
|
+
name: a,
|
|
499
|
+
value: e,
|
|
500
|
+
checked: s,
|
|
501
|
+
disabled: r = !1,
|
|
502
|
+
onChange: n,
|
|
503
|
+
size: o = "md",
|
|
504
|
+
color: d = "primary",
|
|
505
|
+
children: c
|
|
506
|
+
}) => {
|
|
507
|
+
const i = b(
|
|
508
|
+
ve[o],
|
|
509
|
+
s ? Ce[d] : "border-base-default hover:bg-default-100 transition-all duration-200"
|
|
510
|
+
);
|
|
511
|
+
return /* @__PURE__ */ l(
|
|
512
|
+
"label",
|
|
513
|
+
{
|
|
514
|
+
className: `flex items-center gap-2 ${r ? "opacity-50" : "cursor-pointer"}`,
|
|
515
|
+
children: [
|
|
516
|
+
/* @__PURE__ */ t(
|
|
517
|
+
"input",
|
|
518
|
+
{
|
|
519
|
+
name: a,
|
|
520
|
+
type: "radio",
|
|
521
|
+
value: e,
|
|
522
|
+
checked: s,
|
|
523
|
+
onChange: (u) => n && n(u.target.value),
|
|
524
|
+
disabled: r,
|
|
525
|
+
style: { display: "none" }
|
|
526
|
+
}
|
|
527
|
+
),
|
|
528
|
+
/* @__PURE__ */ t(
|
|
529
|
+
"div",
|
|
530
|
+
{
|
|
531
|
+
className: `flex justify-center items-center rounded-full border-2 ${i}`,
|
|
532
|
+
children: s && /* @__PURE__ */ t(
|
|
533
|
+
"span",
|
|
534
|
+
{
|
|
535
|
+
className: `block w-full h-full rounded-full ${ke[d]}`
|
|
536
|
+
}
|
|
537
|
+
)
|
|
538
|
+
}
|
|
539
|
+
),
|
|
540
|
+
/* @__PURE__ */ t("div", { children: c })
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
);
|
|
544
|
+
}, _e = {
|
|
545
|
+
sm: "min-h-6 text-xs",
|
|
546
|
+
md: "min-h-7 text-sm",
|
|
547
|
+
lg: "min-h-8 text-base"
|
|
548
|
+
}, D = {
|
|
549
|
+
default: "bg-content-1",
|
|
550
|
+
primary: "bg-layout-focus",
|
|
551
|
+
secondary: "bg-base-secondary",
|
|
552
|
+
success: "bg-base-success",
|
|
553
|
+
warning: "bg-base-warning",
|
|
554
|
+
danger: "bg-base-danger"
|
|
555
|
+
}, Ne = {
|
|
556
|
+
white: "text-content-1",
|
|
557
|
+
black: "text-default-900"
|
|
558
|
+
}, Fe = {
|
|
559
|
+
none: "rounded-none",
|
|
560
|
+
sm: "rounded-sm",
|
|
561
|
+
md: "rounded-md",
|
|
562
|
+
lg: "rounded-lg",
|
|
563
|
+
full: "rounded-full"
|
|
564
|
+
}, Se = (a, e) => {
|
|
565
|
+
let s = "";
|
|
566
|
+
const r = {
|
|
567
|
+
start: "left-4",
|
|
568
|
+
center: "left-1/2 -translate-x-1/2",
|
|
569
|
+
end: "right-4"
|
|
570
|
+
}, n = {
|
|
571
|
+
start: "top-[5px]",
|
|
572
|
+
center: "top-1/2 -translate-y-1/2",
|
|
573
|
+
end: "bottom-[5px]"
|
|
574
|
+
};
|
|
575
|
+
switch (a) {
|
|
576
|
+
case "top":
|
|
577
|
+
s = "top-[-3px] " + r[e];
|
|
578
|
+
break;
|
|
579
|
+
case "right":
|
|
580
|
+
s = "right-[-3px] " + n[e];
|
|
581
|
+
break;
|
|
582
|
+
case "bottom":
|
|
583
|
+
s = "bottom-[-3px] " + r[e];
|
|
584
|
+
break;
|
|
585
|
+
case "left":
|
|
586
|
+
s = "left-[-3px] " + n[e];
|
|
587
|
+
break;
|
|
588
|
+
}
|
|
589
|
+
return s;
|
|
590
|
+
}, ze = ({
|
|
591
|
+
label: a,
|
|
592
|
+
color: e = "default",
|
|
593
|
+
textColor: s = "black",
|
|
594
|
+
size: r = "md",
|
|
595
|
+
rounded: n = "md",
|
|
596
|
+
direction: o = "bottom",
|
|
597
|
+
position: d = "center"
|
|
598
|
+
}) => {
|
|
599
|
+
const c = b(
|
|
600
|
+
_e[r],
|
|
601
|
+
D[e],
|
|
602
|
+
Ne[s],
|
|
603
|
+
Fe[n]
|
|
604
|
+
);
|
|
605
|
+
return /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
606
|
+
/* @__PURE__ */ t(
|
|
607
|
+
"div",
|
|
608
|
+
{
|
|
609
|
+
className: `max-w-[180px] relative z-10 py-1 px-3 shadow-[0px_1px_2px_0px_#0000000F,0px_1px_3px_0px_#0000001A] ${c}`,
|
|
610
|
+
children: /* @__PURE__ */ t("p", { children: a })
|
|
611
|
+
}
|
|
612
|
+
),
|
|
613
|
+
/* @__PURE__ */ t(
|
|
614
|
+
"div",
|
|
615
|
+
{
|
|
616
|
+
className: `absolute size-2.5 rotate-45 rounded-[2px] shadow-[0px_0px_1px_0px_#0000004D,0px_2px_10px_0px_#0000000F,0px_0px_5px_0px_#00000005] ${Se(o, d)} ${D[e]}`
|
|
617
|
+
}
|
|
618
|
+
)
|
|
619
|
+
] });
|
|
620
|
+
}, R = {
|
|
621
|
+
foreground: "#000000",
|
|
622
|
+
primary: "#112E62",
|
|
623
|
+
secondary: "#C59C4E",
|
|
624
|
+
success: "#17C964",
|
|
625
|
+
warning: "#F5A524",
|
|
626
|
+
danger: "#F31260"
|
|
627
|
+
}, k = {
|
|
628
|
+
foreground: "#A1A1AA",
|
|
629
|
+
primary: "#D6E0F3",
|
|
630
|
+
secondary: "#EEE1C9",
|
|
631
|
+
success: "#d1f4e0",
|
|
632
|
+
warning: "#fdedd3",
|
|
633
|
+
danger: "#fdd0df"
|
|
634
|
+
}, qe = ({
|
|
635
|
+
value: a,
|
|
636
|
+
setValue: e,
|
|
637
|
+
min: s = 0,
|
|
638
|
+
max: r = 100,
|
|
639
|
+
step: n = 1,
|
|
640
|
+
color: o = "primary",
|
|
641
|
+
tooltipColor: d = "primary",
|
|
642
|
+
tooltipTextColor: c = "white"
|
|
643
|
+
}) => /* @__PURE__ */ t(
|
|
644
|
+
G,
|
|
645
|
+
{
|
|
646
|
+
value: a,
|
|
647
|
+
min: s,
|
|
648
|
+
max: r,
|
|
649
|
+
step: n,
|
|
650
|
+
onChange: (i, u) => {
|
|
651
|
+
e(u);
|
|
652
|
+
},
|
|
653
|
+
onChangeCommitted: (i) => {
|
|
654
|
+
},
|
|
655
|
+
valueLabelFormat: (i) => /* @__PURE__ */ t(
|
|
656
|
+
ze,
|
|
657
|
+
{
|
|
658
|
+
color: d,
|
|
659
|
+
textColor: c,
|
|
660
|
+
label: `${i.toLocaleString()}`
|
|
661
|
+
}
|
|
662
|
+
),
|
|
663
|
+
valueLabelDisplay: "auto",
|
|
664
|
+
sx: {
|
|
665
|
+
width: "100%",
|
|
666
|
+
height: "4px",
|
|
667
|
+
borderRadius: "8px",
|
|
668
|
+
color: "#D4D4D8",
|
|
669
|
+
"& .MuiSlider-thumb": {
|
|
670
|
+
width: "16px",
|
|
671
|
+
height: "16px",
|
|
672
|
+
border: "2px solid",
|
|
673
|
+
borderColor: R[o],
|
|
674
|
+
color: "#fff"
|
|
675
|
+
},
|
|
676
|
+
"& .MuiSlider-thumb.Mui-focusVisible": {
|
|
677
|
+
boxShadow: `0 0 0 4px ${k[o]}`
|
|
678
|
+
},
|
|
679
|
+
"& .MuiSlider-thumb.Mui-active": {
|
|
680
|
+
boxShadow: `0 0 0 4px ${k[o]}`
|
|
681
|
+
},
|
|
682
|
+
"& .MuiSlider-thumb:hover": {
|
|
683
|
+
boxShadow: `0 0 0 4px ${k[o]}`
|
|
684
|
+
},
|
|
685
|
+
"& .MuiSlider-track": {
|
|
686
|
+
color: R[o]
|
|
687
|
+
},
|
|
688
|
+
"& .MuiSlider-valueLabel": {
|
|
689
|
+
backgroundColor: "transparent"
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
), Ae = () => /* @__PURE__ */ t("div", { className: "custom-select-icon", children: /* @__PURE__ */ t(Y, {}) }), Ve = ({ options: a, value: e, onChange: s }) => /* @__PURE__ */ t(
|
|
694
|
+
K,
|
|
695
|
+
{
|
|
696
|
+
MenuProps: {
|
|
697
|
+
sx: {
|
|
698
|
+
direction: "rtl",
|
|
699
|
+
marginTop: "4px",
|
|
700
|
+
"& .MuiMenu-list": {
|
|
701
|
+
padding: 0
|
|
702
|
+
},
|
|
703
|
+
"& .MuiPaper-root": {
|
|
704
|
+
padding: "8px",
|
|
705
|
+
borderRadius: "8px",
|
|
706
|
+
boxShadow: `
|
|
707
|
+
0px 1px 2px 0px #0000000F,
|
|
708
|
+
0px 1px 3px 0px #0000001A
|
|
709
|
+
`
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
IconComponent: Ae,
|
|
714
|
+
sx: {
|
|
715
|
+
width: "100%",
|
|
716
|
+
height: 34,
|
|
717
|
+
padding: "0 12px",
|
|
718
|
+
borderRadius: "8px",
|
|
719
|
+
backgroundColor: "#F4F4F5",
|
|
720
|
+
transition: "background-color 0.2s ease",
|
|
721
|
+
"&:hover": {
|
|
722
|
+
backgroundColor: "#e0e0e0"
|
|
723
|
+
},
|
|
724
|
+
border: "none",
|
|
725
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
726
|
+
border: "none"
|
|
727
|
+
},
|
|
728
|
+
"& .MuiSelect-select": {
|
|
729
|
+
padding: "0 !important"
|
|
730
|
+
},
|
|
731
|
+
"& .MuiSelect-icon": {
|
|
732
|
+
transform: "rotate(180deg)",
|
|
733
|
+
transition: "transform 0.2s ease"
|
|
734
|
+
},
|
|
735
|
+
'& [aria-expanded="true"] + .custom-select-icon': {
|
|
736
|
+
transform: "rotate(180deg)"
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
value: e,
|
|
740
|
+
onChange: (r) => s(r.target.value),
|
|
741
|
+
children: a.map(({ title: r, value: n }, o) => /* @__PURE__ */ t(
|
|
742
|
+
J,
|
|
743
|
+
{
|
|
744
|
+
sx: {
|
|
745
|
+
fontFamily: "YekanBakh",
|
|
746
|
+
padding: "4px 8px",
|
|
747
|
+
marginBottom: "4px",
|
|
748
|
+
transition: "all 0.2s ease",
|
|
749
|
+
borderRadius: "8px",
|
|
750
|
+
fontSize: "14px",
|
|
751
|
+
"&:last-child": {
|
|
752
|
+
marginBottom: "0"
|
|
753
|
+
},
|
|
754
|
+
"&:hover": {
|
|
755
|
+
backgroundColor: "#FAFAFA"
|
|
756
|
+
},
|
|
757
|
+
"&.Mui-selected": {
|
|
758
|
+
backgroundColor: "#FFFFFF"
|
|
759
|
+
},
|
|
760
|
+
"&.Mui-selected:hover": {
|
|
761
|
+
backgroundColor: "#FAFAFA"
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
value: n,
|
|
765
|
+
children: r
|
|
766
|
+
},
|
|
767
|
+
o
|
|
768
|
+
))
|
|
769
|
+
}
|
|
770
|
+
), Me = {
|
|
771
|
+
sm: "min-w-10 min-h-6",
|
|
772
|
+
md: "min-w-12 min-h-7",
|
|
773
|
+
lg: "min-w-14 min-h-8"
|
|
774
|
+
}, Be = {
|
|
775
|
+
default: "bg-default-400",
|
|
776
|
+
primary: "bg-layout-focus",
|
|
777
|
+
secondary: "bg-base-secondary",
|
|
778
|
+
success: "bg-base-success",
|
|
779
|
+
warning: "bg-base-warning",
|
|
780
|
+
danger: "bg-base-danger"
|
|
781
|
+
}, Ye = ({
|
|
782
|
+
enabled: a,
|
|
783
|
+
onChange: e,
|
|
784
|
+
label: s,
|
|
785
|
+
labelPosition: r = "left",
|
|
786
|
+
size: n = "md",
|
|
787
|
+
color: o = "default",
|
|
788
|
+
disabled: d = !1
|
|
789
|
+
}) => {
|
|
790
|
+
const c = b(
|
|
791
|
+
r === "left" ? "flex-row" : "flex-row-reverse",
|
|
792
|
+
d && "opacity-50"
|
|
793
|
+
), i = b(
|
|
794
|
+
Me[n],
|
|
795
|
+
a ? Be[o] : "bg-default-700",
|
|
796
|
+
d && "cursor-auto"
|
|
797
|
+
);
|
|
798
|
+
return /* @__PURE__ */ l("div", { className: `flex items-center gap-2 ${c}`, children: [
|
|
799
|
+
/* @__PURE__ */ t(
|
|
800
|
+
"button",
|
|
801
|
+
{
|
|
802
|
+
onClick: e,
|
|
803
|
+
className: `relative rounded-full transition-colors duration-300 p-1 ${i}`,
|
|
804
|
+
disabled: d,
|
|
805
|
+
children: /* @__PURE__ */ t(
|
|
806
|
+
"span",
|
|
807
|
+
{
|
|
808
|
+
className: `
|
|
809
|
+
block h-[calc(100%-8px)] aspect-square rounded-full bg-content-1
|
|
810
|
+
transition-all duration-300 shadow-[0px_0px_1px_0px_#0000004D,0px_2px_10px_0px_#0000000F,0px_0px_5px_0px_#00000005]
|
|
811
|
+
absolute top-1 left-1 ${a && "translate-x-full"}
|
|
812
|
+
`
|
|
813
|
+
}
|
|
814
|
+
)
|
|
815
|
+
}
|
|
816
|
+
),
|
|
817
|
+
s && /* @__PURE__ */ t("p", { className: `text-default-600 ${n === "sm" && "text-sm"}`, children: s })
|
|
818
|
+
] });
|
|
819
|
+
};
|
|
820
|
+
export {
|
|
821
|
+
Re as Alert,
|
|
822
|
+
Te as Badge,
|
|
823
|
+
Le as Button,
|
|
824
|
+
Pe as Chip,
|
|
825
|
+
Oe as Input,
|
|
826
|
+
We as Radio,
|
|
827
|
+
qe as RangeSlider,
|
|
828
|
+
Ve as Select,
|
|
829
|
+
Ye as Switch,
|
|
830
|
+
ze as Tooltip
|
|
831
|
+
};
|