am-shared-assets 1.0.3 → 1.0.4
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/components/index.d.ts +1 -0
- package/dist/components.js +316 -226
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -1,55 +1,57 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as u, jsx as t, Fragment as O } from "react/jsx-runtime";
|
|
2
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
3
|
import { Slider as G, MenuItem as J } from "@mui/material";
|
|
4
4
|
import K from "@mui/material/Select";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import Q from "@mui/material/Autocomplete";
|
|
6
|
+
import "react";
|
|
7
|
+
function E(a) {
|
|
8
|
+
var r, s, e = "";
|
|
9
|
+
if (typeof a == "string" || typeof a == "number") e += a;
|
|
8
10
|
else if (typeof a == "object") if (Array.isArray(a)) {
|
|
9
11
|
var n = a.length;
|
|
10
|
-
for (
|
|
11
|
-
} else for (s in a) a[s] && (
|
|
12
|
-
return
|
|
12
|
+
for (r = 0; r < n; r++) a[r] && (s = E(a[r])) && (e && (e += " "), e += s);
|
|
13
|
+
} else for (s in a) a[s] && (e && (e += " "), e += s);
|
|
14
|
+
return e;
|
|
13
15
|
}
|
|
14
|
-
function
|
|
15
|
-
for (var a,
|
|
16
|
-
return
|
|
16
|
+
function g() {
|
|
17
|
+
for (var a, r, s = 0, e = "", n = arguments.length; s < n; s++) (a = arguments[s]) && (r = E(a)) && (e && (e += " "), e += r);
|
|
18
|
+
return e;
|
|
17
19
|
}
|
|
18
|
-
const
|
|
20
|
+
const U = {
|
|
19
21
|
sm: "text-xs",
|
|
20
22
|
md: "text-sm"
|
|
21
|
-
},
|
|
23
|
+
}, X = {
|
|
22
24
|
default: "w-[342px] min-w-[342px]",
|
|
23
25
|
full: "w-full"
|
|
24
|
-
},
|
|
26
|
+
}, Z = {
|
|
25
27
|
default: "bg-default-100",
|
|
26
28
|
primary: "bg-primary-50",
|
|
27
29
|
secondary: "bg-secondary-50",
|
|
28
30
|
success: "bg-success-50",
|
|
29
31
|
warning: "bg-warning-50",
|
|
30
32
|
danger: "bg-danger-50"
|
|
31
|
-
},
|
|
33
|
+
}, H = {
|
|
32
34
|
default: "text-default-900",
|
|
33
35
|
primary: "text-base-primary",
|
|
34
36
|
secondary: "text-base-secondary",
|
|
35
37
|
success: "text-base-success",
|
|
36
38
|
warning: "text-default-900",
|
|
37
39
|
danger: "text-base-danger"
|
|
38
|
-
},
|
|
40
|
+
}, ee = {
|
|
39
41
|
default: "text-default-600",
|
|
40
42
|
primary: "text-base-primary",
|
|
41
43
|
secondary: "text-base-secondary",
|
|
42
44
|
success: "text-base-success",
|
|
43
45
|
warning: "text-default-600",
|
|
44
46
|
danger: "text-base-danger"
|
|
45
|
-
},
|
|
47
|
+
}, re = {
|
|
46
48
|
default: "bg-default-300",
|
|
47
49
|
primary: "bg-base-primary",
|
|
48
50
|
secondary: "bg-base-secondary",
|
|
49
51
|
success: "bg-base-success",
|
|
50
52
|
warning: "bg-base-warning",
|
|
51
53
|
danger: "bg-base-danger"
|
|
52
|
-
},
|
|
54
|
+
}, se = {
|
|
53
55
|
white: "text-white",
|
|
54
56
|
black: "text-default-900"
|
|
55
57
|
}, z = {
|
|
@@ -69,116 +71,116 @@ const Q = {
|
|
|
69
71
|
success: "#17c964",
|
|
70
72
|
warning: "#f5a524",
|
|
71
73
|
danger: "#f31260"
|
|
72
|
-
},
|
|
74
|
+
}, v = {
|
|
73
75
|
success: /* @__PURE__ */ t(V, { color: "#17C964", size: 24 }),
|
|
74
76
|
warning: /* @__PURE__ */ t(q, { color: "#F5A524", size: 24 }),
|
|
75
77
|
danger: /* @__PURE__ */ t(W, { color: "#F31260", size: 24 })
|
|
76
|
-
},
|
|
78
|
+
}, ae = {
|
|
77
79
|
none: "rounded-none",
|
|
78
80
|
sm: "rounded-md",
|
|
79
81
|
md: "rounded-xl",
|
|
80
82
|
lg: "rounded-[22px]",
|
|
81
83
|
full: "rounded-full"
|
|
82
|
-
},
|
|
84
|
+
}, qe = ({
|
|
83
85
|
title: a,
|
|
84
|
-
description:
|
|
86
|
+
description: r,
|
|
85
87
|
color: s = "default",
|
|
86
|
-
size:
|
|
88
|
+
size: e = "md",
|
|
87
89
|
width: n = "default",
|
|
88
90
|
rounded: o = "none",
|
|
89
91
|
infoIconAlignment: d,
|
|
90
92
|
isInfoIcon: c = !0,
|
|
91
93
|
hasCloseButton: i = !0,
|
|
92
|
-
hasButton:
|
|
93
|
-
buttonTitle:
|
|
94
|
-
buttonTextColor:
|
|
95
|
-
buttonClickHandler:
|
|
96
|
-
closeAlertHandler:
|
|
97
|
-
children:
|
|
94
|
+
hasButton: l = !1,
|
|
95
|
+
buttonTitle: f,
|
|
96
|
+
buttonTextColor: p = "black",
|
|
97
|
+
buttonClickHandler: b,
|
|
98
|
+
closeAlertHandler: x,
|
|
99
|
+
children: h
|
|
98
100
|
}) => {
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
const w = g(
|
|
102
|
+
X[n],
|
|
103
|
+
U[e],
|
|
104
|
+
ae[o],
|
|
105
|
+
Z[s]
|
|
104
106
|
);
|
|
105
|
-
return
|
|
107
|
+
return h ? /* @__PURE__ */ u(
|
|
106
108
|
"div",
|
|
107
109
|
{
|
|
108
|
-
className: `flex p-3 ${
|
|
110
|
+
className: `flex p-3 ${w} ${d && A[d]}`,
|
|
109
111
|
children: [
|
|
110
|
-
/* @__PURE__ */ t("div", { className: "mt-[1px]", children: c ||
|
|
111
|
-
|
|
112
|
+
/* @__PURE__ */ t("div", { className: "mt-[1px]", children: c || !v[s] ? /* @__PURE__ */ t(F, { color: M[s] }) : v[s] }),
|
|
113
|
+
h
|
|
112
114
|
]
|
|
113
115
|
}
|
|
114
|
-
) : /* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
+
) : /* @__PURE__ */ u("div", { className: `relative flex justify-between p-3 ${w}`, children: [
|
|
117
|
+
/* @__PURE__ */ u(
|
|
116
118
|
"div",
|
|
117
119
|
{
|
|
118
|
-
className: `flex ${d ? A[d] :
|
|
120
|
+
className: `flex ${d ? A[d] : l ? "items-center" : a && r ? "items-start" : "items-center"} gap-3`,
|
|
119
121
|
children: [
|
|
120
|
-
/* @__PURE__ */ t("div", { className: "mt-[1px]", children: c ||
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
a && /* @__PURE__ */ t("h2", { className: `font-semibold ${
|
|
123
|
-
|
|
122
|
+
/* @__PURE__ */ t("div", { className: "mt-[1px]", children: c || !v[s] ? /* @__PURE__ */ t(F, { color: M[s] }) : v[s] }),
|
|
123
|
+
/* @__PURE__ */ u("div", { children: [
|
|
124
|
+
a && /* @__PURE__ */ t("h2", { className: `font-semibold ${H[s]}`, children: a }),
|
|
125
|
+
r && /* @__PURE__ */ t("p", { className: ee[s], children: r })
|
|
124
126
|
] })
|
|
125
127
|
]
|
|
126
128
|
}
|
|
127
129
|
),
|
|
128
|
-
|
|
130
|
+
l ? /* @__PURE__ */ u("div", { className: "flex items-center", children: [
|
|
129
131
|
/* @__PURE__ */ t(
|
|
130
132
|
"button",
|
|
131
133
|
{
|
|
132
|
-
onClick:
|
|
133
|
-
className: `h-8 px-3 rounded-md ${
|
|
134
|
-
children:
|
|
134
|
+
onClick: b,
|
|
135
|
+
className: `h-8 px-3 rounded-md ${re[s]} ${se[p]}`,
|
|
136
|
+
children: f
|
|
135
137
|
}
|
|
136
138
|
),
|
|
137
139
|
i && /* @__PURE__ */ t(
|
|
138
140
|
"button",
|
|
139
141
|
{
|
|
140
|
-
onClick:
|
|
142
|
+
onClick: x,
|
|
141
143
|
className: "absolute -top-1 -left-1 border border-default-300 bg-default-100 rounded-full",
|
|
142
144
|
children: /* @__PURE__ */ t(S, { color: z.default, size: 14 })
|
|
143
145
|
}
|
|
144
146
|
)
|
|
145
|
-
] }) : i && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("button", { onClick:
|
|
147
|
+
] }) : i && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("button", { onClick: x, children: /* @__PURE__ */ t(S, { color: z[s] }) }) })
|
|
146
148
|
] });
|
|
147
|
-
},
|
|
149
|
+
}, te = {
|
|
148
150
|
sm: "h-5 text-xs px-2",
|
|
149
151
|
md: "h-6 text-sm px-2.5",
|
|
150
152
|
lg: "h-7 text-sm px-3"
|
|
151
|
-
},
|
|
153
|
+
}, ne = {
|
|
152
154
|
neutral: "bg-default-500",
|
|
153
155
|
default: "bg-default-200",
|
|
154
156
|
primary: "bg-layout-focus",
|
|
155
157
|
danger: "bg-base-danger",
|
|
156
158
|
success: "bg-base-success"
|
|
157
|
-
},
|
|
159
|
+
}, oe = {
|
|
158
160
|
white: "text-content-1",
|
|
159
161
|
black: "text-layout-fg"
|
|
160
|
-
},
|
|
162
|
+
}, de = {
|
|
161
163
|
pill: "rounded-full",
|
|
162
164
|
Rectangle: "rounded-xxs"
|
|
163
|
-
},
|
|
165
|
+
}, Ve = ({
|
|
164
166
|
label: a,
|
|
165
|
-
color:
|
|
167
|
+
color: r = "default",
|
|
166
168
|
type: s = "pill",
|
|
167
|
-
size:
|
|
169
|
+
size: e = "md",
|
|
168
170
|
textColor: n = "black"
|
|
169
171
|
}) => {
|
|
170
|
-
const o =
|
|
172
|
+
const o = g(
|
|
173
|
+
ne[r],
|
|
174
|
+
oe[n],
|
|
171
175
|
te[e],
|
|
172
|
-
|
|
173
|
-
ae[r],
|
|
174
|
-
oe[s]
|
|
176
|
+
de[s]
|
|
175
177
|
);
|
|
176
178
|
return /* @__PURE__ */ t("div", { className: `flex justify-center items-center ${o}`, children: a });
|
|
177
|
-
},
|
|
179
|
+
}, ce = {
|
|
178
180
|
sm: "h-8 text-xs px-3",
|
|
179
181
|
md: "h-10 text-sm px-4",
|
|
180
182
|
lg: "h-12 text-base px-6"
|
|
181
|
-
},
|
|
183
|
+
}, y = {
|
|
182
184
|
white: "text-white",
|
|
183
185
|
black: "text-default-900",
|
|
184
186
|
default: "text-default-900",
|
|
@@ -201,94 +203,94 @@ const Q = {
|
|
|
201
203
|
success: "border-base-success",
|
|
202
204
|
warning: "border-base-warning",
|
|
203
205
|
danger: "border-base-danger"
|
|
204
|
-
},
|
|
206
|
+
}, j = {
|
|
205
207
|
default: "bg-default-100",
|
|
206
208
|
primary: "bg-primary-100",
|
|
207
209
|
secondary: "bg-secondary-100",
|
|
208
210
|
success: "bg-success-100",
|
|
209
211
|
warning: "bg-warning-100",
|
|
210
212
|
danger: "bg-danger-100"
|
|
211
|
-
},
|
|
213
|
+
}, ie = {
|
|
212
214
|
none: "rounded-none",
|
|
213
215
|
sm: "rounded-sm",
|
|
214
216
|
md: "rounded-md",
|
|
215
217
|
lg: "rounded-lg",
|
|
216
218
|
full: "rounded-full"
|
|
217
|
-
},
|
|
218
|
-
let
|
|
219
|
+
}, le = (a, r, s) => {
|
|
220
|
+
let e = "";
|
|
219
221
|
switch (a) {
|
|
220
222
|
case "solid":
|
|
221
|
-
|
|
223
|
+
e = `${B[r]} ${y[s]}`;
|
|
222
224
|
break;
|
|
223
225
|
case "bordered":
|
|
224
|
-
|
|
226
|
+
e = `border-2 ${I[r]} ${y[r]}`;
|
|
225
227
|
break;
|
|
226
228
|
case "light":
|
|
227
|
-
|
|
229
|
+
e = y[r];
|
|
228
230
|
break;
|
|
229
231
|
case "flat":
|
|
230
|
-
|
|
232
|
+
e = `${j[r]} ${y[r]}`;
|
|
231
233
|
break;
|
|
232
234
|
case "faded":
|
|
233
|
-
|
|
235
|
+
e = `border-2 ${I.default} ${j.default} ${y[r]}`;
|
|
234
236
|
break;
|
|
235
237
|
case "shadow":
|
|
236
|
-
|
|
238
|
+
e = `shadow-lg ${B[r]} ${y[s]}`;
|
|
237
239
|
break;
|
|
238
240
|
}
|
|
239
|
-
return
|
|
240
|
-
},
|
|
241
|
+
return e;
|
|
242
|
+
}, Ye = ({
|
|
241
243
|
type: a = "button",
|
|
242
|
-
variant:
|
|
244
|
+
variant: r = "solid",
|
|
243
245
|
color: s = "default",
|
|
244
|
-
textColor:
|
|
246
|
+
textColor: e = "black",
|
|
245
247
|
size: n = "md",
|
|
246
248
|
rounded: o = "none",
|
|
247
249
|
label: d,
|
|
248
250
|
icon: c,
|
|
249
251
|
iconPosition: i = "left",
|
|
250
|
-
width:
|
|
251
|
-
disabled:
|
|
252
|
-
onClick:
|
|
252
|
+
width: l = "auto",
|
|
253
|
+
disabled: f = !1,
|
|
254
|
+
onClick: p
|
|
253
255
|
}) => {
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
+
const b = g(
|
|
257
|
+
l === "full" ? "w-full" : "w-auto",
|
|
256
258
|
i === "right" ? "flex-row" : "flex-row-reverse",
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
259
|
+
ie[o],
|
|
260
|
+
ce[n],
|
|
261
|
+
le(r, s, e)
|
|
260
262
|
);
|
|
261
|
-
return /* @__PURE__ */
|
|
263
|
+
return /* @__PURE__ */ u(
|
|
262
264
|
"button",
|
|
263
265
|
{
|
|
264
266
|
type: a,
|
|
265
|
-
className: "flex items-center justify-center gap-2 font-semibold transition-all duration-300 " +
|
|
266
|
-
onClick:
|
|
267
|
-
disabled:
|
|
267
|
+
className: "flex items-center justify-center gap-2 font-semibold transition-all duration-300 " + b,
|
|
268
|
+
onClick: p,
|
|
269
|
+
disabled: f,
|
|
268
270
|
children: [
|
|
269
271
|
c,
|
|
270
272
|
d && /* @__PURE__ */ t("p", { children: d })
|
|
271
273
|
]
|
|
272
274
|
}
|
|
273
275
|
);
|
|
274
|
-
},
|
|
276
|
+
}, ue = {
|
|
275
277
|
sm: "h-6 text-xs",
|
|
276
278
|
md: "h-7 text-sm",
|
|
277
279
|
lg: "h-8 text-base"
|
|
278
|
-
},
|
|
280
|
+
}, be = {
|
|
279
281
|
none: "rounded-none",
|
|
280
282
|
sm: "rounded-sm",
|
|
281
283
|
md: "rounded-md",
|
|
282
284
|
lg: "rounded-lg",
|
|
283
285
|
full: "rounded-full"
|
|
284
|
-
},
|
|
286
|
+
}, D = {
|
|
285
287
|
default: "bg-default-200",
|
|
286
288
|
primary: "bg-base-primary",
|
|
287
289
|
secondary: "bg-base-secondary",
|
|
288
290
|
success: "bg-base-success",
|
|
289
291
|
warning: "bg-base-warning",
|
|
290
292
|
danger: "bg-base-danger"
|
|
291
|
-
},
|
|
293
|
+
}, m = {
|
|
292
294
|
white: "text-content-1",
|
|
293
295
|
black: "text-layout-fg",
|
|
294
296
|
default: "text-layout-fg",
|
|
@@ -297,85 +299,85 @@ const Q = {
|
|
|
297
299
|
success: "text-base-success",
|
|
298
300
|
warning: "text-base-warning",
|
|
299
301
|
danger: "text-base-danger"
|
|
300
|
-
},
|
|
302
|
+
}, $ = {
|
|
301
303
|
default: "border-default-200",
|
|
302
304
|
primary: "border-base-primary",
|
|
303
305
|
secondary: "border-base-secondary",
|
|
304
306
|
success: "border-base-success",
|
|
305
307
|
warning: "border-base-warning",
|
|
306
308
|
danger: "border-base-danger"
|
|
307
|
-
},
|
|
309
|
+
}, ge = {
|
|
308
310
|
default: "bg-default-200",
|
|
309
311
|
primary: "bg-primary-100",
|
|
310
312
|
secondary: "bg-secondary-100",
|
|
311
313
|
success: "bg-success-100",
|
|
312
314
|
warning: "bg-warning-100",
|
|
313
315
|
danger: "bg-danger-100"
|
|
314
|
-
},
|
|
316
|
+
}, fe = {
|
|
315
317
|
default: "bg-default-400",
|
|
316
318
|
primary: "bg-base-primary",
|
|
317
319
|
secondary: "bg-base-secondary",
|
|
318
320
|
success: "bg-base-success",
|
|
319
321
|
warning: "bg-base-warning",
|
|
320
322
|
danger: "bg-base-danger"
|
|
321
|
-
},
|
|
322
|
-
let
|
|
323
|
+
}, pe = (a, r, s) => {
|
|
324
|
+
let e = "";
|
|
323
325
|
switch (a) {
|
|
324
326
|
case "solid":
|
|
325
|
-
|
|
327
|
+
e = `${D[r]} ${m[s]}`;
|
|
326
328
|
break;
|
|
327
329
|
case "bordered":
|
|
328
|
-
|
|
330
|
+
e = `border-2 ${$[r]} ${m[r]}`;
|
|
329
331
|
break;
|
|
330
332
|
case "light":
|
|
331
|
-
|
|
333
|
+
e = m[r];
|
|
332
334
|
break;
|
|
333
335
|
case "flat":
|
|
334
|
-
|
|
336
|
+
e = `${ge[r]} ${m[r]}`;
|
|
335
337
|
break;
|
|
336
338
|
case "faded":
|
|
337
|
-
|
|
339
|
+
e = `border-2 ${$.default} bg-default-100 ${m[r]}`;
|
|
338
340
|
break;
|
|
339
341
|
case "shadow":
|
|
340
|
-
|
|
342
|
+
e = `shadow-lg ${D[r]} ${m[s]}`;
|
|
341
343
|
break;
|
|
342
344
|
case "dot":
|
|
343
|
-
|
|
345
|
+
e = `border-2 ${$.default} ${m.black}`;
|
|
344
346
|
break;
|
|
345
347
|
}
|
|
346
|
-
return
|
|
347
|
-
},
|
|
348
|
+
return e;
|
|
349
|
+
}, Ge = ({
|
|
348
350
|
variant: a = "solid",
|
|
349
|
-
color:
|
|
351
|
+
color: r = "default",
|
|
350
352
|
textColor: s = "black",
|
|
351
|
-
label:
|
|
353
|
+
label: e,
|
|
352
354
|
size: n = "md",
|
|
353
355
|
rounded: o = "none",
|
|
354
356
|
children: d
|
|
355
357
|
}) => {
|
|
356
|
-
const c =
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
358
|
+
const c = g(
|
|
359
|
+
be[o],
|
|
360
|
+
ue[n],
|
|
361
|
+
pe(a, r, s)
|
|
360
362
|
);
|
|
361
|
-
return /* @__PURE__ */ t("div", { className: `w-fit flex items-center justify-center gap-1 px-2 ${c}`, children: d || /* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */ t("p", { children:
|
|
363
|
-
a === "dot" && /* @__PURE__ */ t("div", { className: `size-2 rounded-full ${
|
|
363
|
+
return /* @__PURE__ */ t("div", { className: `w-fit flex items-center justify-center gap-1 px-2 ${c}`, children: d || /* @__PURE__ */ u(O, { children: [
|
|
364
|
+
/* @__PURE__ */ t("p", { children: e }),
|
|
365
|
+
a === "dot" && /* @__PURE__ */ t("div", { className: `size-2 rounded-full ${fe[r]}` })
|
|
364
366
|
] }) });
|
|
365
|
-
},
|
|
367
|
+
}, me = {
|
|
366
368
|
sm: "h-8 py-1",
|
|
367
369
|
lg: "h-10 py-2"
|
|
368
|
-
},
|
|
370
|
+
}, xe = {
|
|
369
371
|
default: "text-default-600",
|
|
370
372
|
primary: "text-base-primary",
|
|
371
373
|
success: "text-base-success",
|
|
372
374
|
warning: "text-base-warning",
|
|
373
375
|
danger: "text-base-danger"
|
|
374
|
-
},
|
|
376
|
+
}, he = {
|
|
375
377
|
primary: "text-base-primary hover:text-base-primary",
|
|
376
378
|
success: "text-base-success hover:text-base-success",
|
|
377
379
|
warning: "text-base-warning hover:text-base-warning"
|
|
378
|
-
},
|
|
380
|
+
}, we = {
|
|
379
381
|
default: "bg-default-100 hover:bg-default-200 focus-within:hover:bg-transparent",
|
|
380
382
|
primary: "bg-primary-100 hover:bg-primary-50 focus-within:hover:bg-transparent",
|
|
381
383
|
success: "bg-success-100 hover:bg-success-50 focus-within:hover:bg-transparent",
|
|
@@ -387,76 +389,76 @@ const Q = {
|
|
|
387
389
|
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
390
|
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
391
|
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
|
-
},
|
|
392
|
+
}, ye = {
|
|
391
393
|
default: "hover:border-default-400",
|
|
392
394
|
primary: "hover:border-base-primary",
|
|
393
395
|
success: "hover:border-base-success",
|
|
394
396
|
warning: "hover:border-base-warning",
|
|
395
397
|
danger: "hover:border-base-danger"
|
|
396
|
-
},
|
|
398
|
+
}, ve = {
|
|
397
399
|
sm: "rounded-sm",
|
|
398
400
|
full: "rounded-full"
|
|
399
|
-
}, $e = (a,
|
|
400
|
-
let
|
|
401
|
+
}, $e = (a, r, s) => {
|
|
402
|
+
let e = "";
|
|
401
403
|
if (s)
|
|
402
|
-
return
|
|
404
|
+
return e = "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
405
|
switch (a) {
|
|
404
406
|
case "flat":
|
|
405
|
-
|
|
407
|
+
e = `${we[r]} ${C[r]} ${he[r]} focus-within:text-layout-fg`;
|
|
406
408
|
break;
|
|
407
409
|
case "bordered":
|
|
408
|
-
|
|
410
|
+
e = `bg-transparent border border-default-200 hover:border-default-400 ${C[r]}`;
|
|
409
411
|
break;
|
|
410
412
|
case "faded":
|
|
411
|
-
|
|
413
|
+
e = `border border-default-200 bg-default-100 hover:bg-default-200 ${ye[r]} ${C[r]}`;
|
|
412
414
|
break;
|
|
413
415
|
}
|
|
414
|
-
return
|
|
415
|
-
},
|
|
416
|
+
return e;
|
|
417
|
+
}, Je = ({
|
|
416
418
|
id: a,
|
|
417
|
-
label:
|
|
419
|
+
label: r,
|
|
418
420
|
required: s = !1,
|
|
419
|
-
register:
|
|
421
|
+
register: e,
|
|
420
422
|
name: n,
|
|
421
423
|
value: o,
|
|
422
424
|
onChange: d,
|
|
423
425
|
placeHolder: c,
|
|
424
426
|
variant: i = "flat",
|
|
425
|
-
color:
|
|
426
|
-
size:
|
|
427
|
-
rounded:
|
|
428
|
-
description:
|
|
429
|
-
icon:
|
|
430
|
-
endIcon:
|
|
431
|
-
errorMsg:
|
|
432
|
-
hasError:
|
|
427
|
+
color: l = "default",
|
|
428
|
+
size: f = "sm",
|
|
429
|
+
rounded: p = "sm",
|
|
430
|
+
description: b = "",
|
|
431
|
+
icon: x,
|
|
432
|
+
endIcon: h,
|
|
433
|
+
errorMsg: w = "",
|
|
434
|
+
hasError: N = !1
|
|
433
435
|
}) => {
|
|
434
|
-
const
|
|
435
|
-
return /* @__PURE__ */
|
|
436
|
-
|
|
436
|
+
const T = g(ve[p], $e(i, l, N)), _ = g(me[f]);
|
|
437
|
+
return /* @__PURE__ */ u("label", { className: "flex flex-col w-full", children: [
|
|
438
|
+
r && /* @__PURE__ */ u(
|
|
437
439
|
"div",
|
|
438
440
|
{
|
|
439
|
-
className: `h-4 text-xs mb-2 ${
|
|
441
|
+
className: `h-4 text-xs mb-2 ${N ? "text-base-danger" : xe[l]}`,
|
|
440
442
|
children: [
|
|
441
|
-
|
|
443
|
+
r,
|
|
442
444
|
s && /* @__PURE__ */ t("span", { className: "text-base-danger text-sm", children: "*" })
|
|
443
445
|
]
|
|
444
446
|
}
|
|
445
447
|
),
|
|
446
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ u(
|
|
447
449
|
"div",
|
|
448
450
|
{
|
|
449
|
-
className: `${
|
|
451
|
+
className: `${T} flex items-center px-1.5 transition-all duration-200`,
|
|
450
452
|
children: [
|
|
451
|
-
|
|
452
|
-
|
|
453
|
+
x,
|
|
454
|
+
e ? /* @__PURE__ */ t(
|
|
453
455
|
"input",
|
|
454
456
|
{
|
|
455
457
|
id: `${a}`,
|
|
456
458
|
type: "text",
|
|
457
|
-
...
|
|
459
|
+
...e(n),
|
|
458
460
|
placeholder: c,
|
|
459
|
-
className: `${
|
|
461
|
+
className: `${_} bg-transparent w-full px-1.5 text-sm outline-none`
|
|
460
462
|
}
|
|
461
463
|
) : /* @__PURE__ */ t(
|
|
462
464
|
"input",
|
|
@@ -464,64 +466,64 @@ const Q = {
|
|
|
464
466
|
id: `${a}`,
|
|
465
467
|
type: "text",
|
|
466
468
|
value: o,
|
|
467
|
-
onChange: (
|
|
469
|
+
onChange: (L) => d && d(L.target.value),
|
|
468
470
|
placeholder: c,
|
|
469
|
-
className: `${
|
|
471
|
+
className: `${_} bg-transparent w-full px-1.5 text-sm outline-none`
|
|
470
472
|
}
|
|
471
473
|
),
|
|
472
|
-
|
|
474
|
+
h
|
|
473
475
|
]
|
|
474
476
|
}
|
|
475
477
|
),
|
|
476
|
-
|
|
477
|
-
|
|
478
|
+
b && !w && /* @__PURE__ */ t("p", { className: "mt-1 text-xs text-default-400", children: b }),
|
|
479
|
+
w && /* @__PURE__ */ t("p", { className: "mt-1 mr-1 text-xs text-base-danger", children: w })
|
|
478
480
|
] });
|
|
479
|
-
},
|
|
481
|
+
}, Ce = {
|
|
480
482
|
sm: "size-4 min-w-4 p-[3px]",
|
|
481
483
|
md: "size-5 min-w-5 p-1",
|
|
482
484
|
lg: "size-6 min-w-6 p-[5px]"
|
|
483
|
-
},
|
|
485
|
+
}, ke = {
|
|
484
486
|
primary: "border-base-primary",
|
|
485
487
|
secondary: "border-base-secondary",
|
|
486
488
|
success: "border-base-success",
|
|
487
489
|
warning: "border-base-warning",
|
|
488
490
|
danger: "border-base-danger",
|
|
489
491
|
neutral: "border-default-500"
|
|
490
|
-
},
|
|
492
|
+
}, Ne = {
|
|
491
493
|
primary: "bg-base-primary",
|
|
492
494
|
secondary: "bg-base-secondary",
|
|
493
495
|
success: "bg-base-success",
|
|
494
496
|
warning: "bg-base-warning",
|
|
495
497
|
danger: "bg-base-danger",
|
|
496
498
|
neutral: "bg-default-500"
|
|
497
|
-
},
|
|
499
|
+
}, Ke = ({
|
|
498
500
|
name: a,
|
|
499
|
-
value:
|
|
501
|
+
value: r,
|
|
500
502
|
checked: s,
|
|
501
|
-
disabled:
|
|
503
|
+
disabled: e = !1,
|
|
502
504
|
onChange: n,
|
|
503
505
|
size: o = "md",
|
|
504
506
|
color: d = "primary",
|
|
505
507
|
children: c
|
|
506
508
|
}) => {
|
|
507
|
-
const i =
|
|
508
|
-
|
|
509
|
-
s ?
|
|
509
|
+
const i = g(
|
|
510
|
+
Ce[o],
|
|
511
|
+
s ? ke[d] : "border-base-default hover:bg-default-100 transition-all duration-200"
|
|
510
512
|
);
|
|
511
|
-
return /* @__PURE__ */
|
|
513
|
+
return /* @__PURE__ */ u(
|
|
512
514
|
"label",
|
|
513
515
|
{
|
|
514
|
-
className: `flex items-center gap-2 ${
|
|
516
|
+
className: `flex items-center gap-2 ${e ? "opacity-50" : "cursor-pointer"}`,
|
|
515
517
|
children: [
|
|
516
518
|
/* @__PURE__ */ t(
|
|
517
519
|
"input",
|
|
518
520
|
{
|
|
519
521
|
name: a,
|
|
520
522
|
type: "radio",
|
|
521
|
-
value:
|
|
523
|
+
value: r,
|
|
522
524
|
checked: s,
|
|
523
|
-
onChange: (
|
|
524
|
-
disabled:
|
|
525
|
+
onChange: (l) => n && n(l.target.value),
|
|
526
|
+
disabled: e,
|
|
525
527
|
style: { display: "none" }
|
|
526
528
|
}
|
|
527
529
|
),
|
|
@@ -532,7 +534,7 @@ const Q = {
|
|
|
532
534
|
children: s && /* @__PURE__ */ t(
|
|
533
535
|
"span",
|
|
534
536
|
{
|
|
535
|
-
className: `block w-full h-full rounded-full ${
|
|
537
|
+
className: `block w-full h-full rounded-full ${Ne[d]}`
|
|
536
538
|
}
|
|
537
539
|
)
|
|
538
540
|
}
|
|
@@ -545,25 +547,25 @@ const Q = {
|
|
|
545
547
|
sm: "min-h-6 text-xs",
|
|
546
548
|
md: "min-h-7 text-sm",
|
|
547
549
|
lg: "min-h-8 text-base"
|
|
548
|
-
},
|
|
550
|
+
}, P = {
|
|
549
551
|
default: "bg-content-1",
|
|
550
552
|
primary: "bg-layout-focus",
|
|
551
553
|
secondary: "bg-base-secondary",
|
|
552
554
|
success: "bg-base-success",
|
|
553
555
|
warning: "bg-base-warning",
|
|
554
556
|
danger: "bg-base-danger"
|
|
555
|
-
},
|
|
557
|
+
}, Fe = {
|
|
556
558
|
white: "text-content-1",
|
|
557
559
|
black: "text-default-900"
|
|
558
|
-
},
|
|
560
|
+
}, Se = {
|
|
559
561
|
none: "rounded-none",
|
|
560
562
|
sm: "rounded-sm",
|
|
561
563
|
md: "rounded-md",
|
|
562
564
|
lg: "rounded-lg",
|
|
563
565
|
full: "rounded-full"
|
|
564
|
-
},
|
|
566
|
+
}, ze = (a, r) => {
|
|
565
567
|
let s = "";
|
|
566
|
-
const
|
|
568
|
+
const e = {
|
|
567
569
|
start: "left-4",
|
|
568
570
|
center: "left-1/2 -translate-x-1/2",
|
|
569
571
|
end: "right-4"
|
|
@@ -574,35 +576,35 @@ const Q = {
|
|
|
574
576
|
};
|
|
575
577
|
switch (a) {
|
|
576
578
|
case "top":
|
|
577
|
-
s = "top-[-3px] " + r
|
|
579
|
+
s = "top-[-3px] " + e[r];
|
|
578
580
|
break;
|
|
579
581
|
case "right":
|
|
580
|
-
s = "right-[-3px] " + n[
|
|
582
|
+
s = "right-[-3px] " + n[r];
|
|
581
583
|
break;
|
|
582
584
|
case "bottom":
|
|
583
|
-
s = "bottom-[-3px] " + r
|
|
585
|
+
s = "bottom-[-3px] " + e[r];
|
|
584
586
|
break;
|
|
585
587
|
case "left":
|
|
586
|
-
s = "left-[-3px] " + n[
|
|
588
|
+
s = "left-[-3px] " + n[r];
|
|
587
589
|
break;
|
|
588
590
|
}
|
|
589
591
|
return s;
|
|
590
|
-
},
|
|
592
|
+
}, Ae = ({
|
|
591
593
|
label: a,
|
|
592
|
-
color:
|
|
594
|
+
color: r = "default",
|
|
593
595
|
textColor: s = "black",
|
|
594
|
-
size:
|
|
596
|
+
size: e = "md",
|
|
595
597
|
rounded: n = "md",
|
|
596
598
|
direction: o = "bottom",
|
|
597
599
|
position: d = "center"
|
|
598
600
|
}) => {
|
|
599
|
-
const c =
|
|
600
|
-
_e[
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
601
|
+
const c = g(
|
|
602
|
+
_e[e],
|
|
603
|
+
P[r],
|
|
604
|
+
Fe[s],
|
|
605
|
+
Se[n]
|
|
604
606
|
);
|
|
605
|
-
return /* @__PURE__ */
|
|
607
|
+
return /* @__PURE__ */ u("div", { className: "relative", children: [
|
|
606
608
|
/* @__PURE__ */ t(
|
|
607
609
|
"div",
|
|
608
610
|
{
|
|
@@ -613,7 +615,7 @@ const Q = {
|
|
|
613
615
|
/* @__PURE__ */ t(
|
|
614
616
|
"div",
|
|
615
617
|
{
|
|
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] ${
|
|
618
|
+
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] ${ze(o, d)} ${P[r]}`
|
|
617
619
|
}
|
|
618
620
|
)
|
|
619
621
|
] });
|
|
@@ -631,11 +633,11 @@ const Q = {
|
|
|
631
633
|
success: "#d1f4e0",
|
|
632
634
|
warning: "#fdedd3",
|
|
633
635
|
danger: "#fdd0df"
|
|
634
|
-
},
|
|
636
|
+
}, Qe = ({
|
|
635
637
|
value: a,
|
|
636
|
-
setValue:
|
|
638
|
+
setValue: r,
|
|
637
639
|
min: s = 0,
|
|
638
|
-
max:
|
|
640
|
+
max: e = 100,
|
|
639
641
|
step: n = 1,
|
|
640
642
|
color: o = "primary",
|
|
641
643
|
tooltipColor: d = "primary",
|
|
@@ -645,15 +647,15 @@ const Q = {
|
|
|
645
647
|
{
|
|
646
648
|
value: a,
|
|
647
649
|
min: s,
|
|
648
|
-
max:
|
|
650
|
+
max: e,
|
|
649
651
|
step: n,
|
|
650
|
-
onChange: (i,
|
|
651
|
-
|
|
652
|
+
onChange: (i, l) => {
|
|
653
|
+
r(l);
|
|
652
654
|
},
|
|
653
655
|
onChangeCommitted: (i) => {
|
|
654
656
|
},
|
|
655
657
|
valueLabelFormat: (i) => /* @__PURE__ */ t(
|
|
656
|
-
|
|
658
|
+
Ae,
|
|
657
659
|
{
|
|
658
660
|
color: d,
|
|
659
661
|
textColor: c,
|
|
@@ -690,7 +692,7 @@ const Q = {
|
|
|
690
692
|
}
|
|
691
693
|
}
|
|
692
694
|
}
|
|
693
|
-
),
|
|
695
|
+
), Me = () => /* @__PURE__ */ t("div", { className: "custom-select-icon", children: /* @__PURE__ */ t(Y, {}) }), Ue = ({ options: a, value: r, onChange: s }) => /* @__PURE__ */ t(
|
|
694
696
|
K,
|
|
695
697
|
{
|
|
696
698
|
MenuProps: {
|
|
@@ -710,7 +712,7 @@ const Q = {
|
|
|
710
712
|
}
|
|
711
713
|
}
|
|
712
714
|
},
|
|
713
|
-
IconComponent:
|
|
715
|
+
IconComponent: Me,
|
|
714
716
|
sx: {
|
|
715
717
|
width: "100%",
|
|
716
718
|
height: 34,
|
|
@@ -736,9 +738,9 @@ const Q = {
|
|
|
736
738
|
transform: "rotate(180deg)"
|
|
737
739
|
}
|
|
738
740
|
},
|
|
739
|
-
value:
|
|
740
|
-
onChange: (
|
|
741
|
-
children: a.map(({ title:
|
|
741
|
+
value: r,
|
|
742
|
+
onChange: (e) => s(e.target.value),
|
|
743
|
+
children: a.map(({ title: e, value: n }, o) => /* @__PURE__ */ t(
|
|
742
744
|
J,
|
|
743
745
|
{
|
|
744
746
|
sx: {
|
|
@@ -762,44 +764,44 @@ const Q = {
|
|
|
762
764
|
}
|
|
763
765
|
},
|
|
764
766
|
value: n,
|
|
765
|
-
children:
|
|
767
|
+
children: e
|
|
766
768
|
},
|
|
767
769
|
o
|
|
768
770
|
))
|
|
769
771
|
}
|
|
770
|
-
),
|
|
772
|
+
), Be = {
|
|
771
773
|
sm: "min-w-10 min-h-6",
|
|
772
774
|
md: "min-w-12 min-h-7",
|
|
773
775
|
lg: "min-w-14 min-h-8"
|
|
774
|
-
},
|
|
776
|
+
}, Ie = {
|
|
775
777
|
default: "bg-default-400",
|
|
776
778
|
primary: "bg-layout-focus",
|
|
777
779
|
secondary: "bg-base-secondary",
|
|
778
780
|
success: "bg-base-success",
|
|
779
781
|
warning: "bg-base-warning",
|
|
780
782
|
danger: "bg-base-danger"
|
|
781
|
-
},
|
|
783
|
+
}, Xe = ({
|
|
782
784
|
enabled: a,
|
|
783
|
-
onChange:
|
|
785
|
+
onChange: r,
|
|
784
786
|
label: s,
|
|
785
|
-
labelPosition:
|
|
787
|
+
labelPosition: e = "left",
|
|
786
788
|
size: n = "md",
|
|
787
789
|
color: o = "default",
|
|
788
790
|
disabled: d = !1
|
|
789
791
|
}) => {
|
|
790
|
-
const c =
|
|
791
|
-
|
|
792
|
+
const c = g(
|
|
793
|
+
e === "left" ? "flex-row" : "flex-row-reverse",
|
|
792
794
|
d && "opacity-50"
|
|
793
|
-
), i =
|
|
794
|
-
|
|
795
|
-
a ?
|
|
795
|
+
), i = g(
|
|
796
|
+
Be[n],
|
|
797
|
+
a ? Ie[o] : "bg-default-700",
|
|
796
798
|
d && "cursor-auto"
|
|
797
799
|
);
|
|
798
|
-
return /* @__PURE__ */
|
|
800
|
+
return /* @__PURE__ */ u("div", { className: `flex items-center gap-2 ${c}`, children: [
|
|
799
801
|
/* @__PURE__ */ t(
|
|
800
802
|
"button",
|
|
801
803
|
{
|
|
802
|
-
onClick:
|
|
804
|
+
onClick: r,
|
|
803
805
|
className: `relative rounded-full transition-colors duration-300 p-1 ${i}`,
|
|
804
806
|
disabled: d,
|
|
805
807
|
children: /* @__PURE__ */ t(
|
|
@@ -816,16 +818,104 @@ const Q = {
|
|
|
816
818
|
),
|
|
817
819
|
s && /* @__PURE__ */ t("p", { className: `text-default-600 ${n === "sm" && "text-sm"}`, children: s })
|
|
818
820
|
] });
|
|
819
|
-
}
|
|
821
|
+
}, je = {
|
|
822
|
+
sm: "h-8 py-1",
|
|
823
|
+
lg: "h-10 py-2"
|
|
824
|
+
}, De = {
|
|
825
|
+
flat: "bg-default-100 hover:bg-default-200 focus:bg-transparent focus:border-2 border-[#11181C]",
|
|
826
|
+
faded: "bg-default-100 hover:bg-default-200 focus:bg-transparent border-2 border-default-200 hover:border-default-400 focus:border-[#11181C]",
|
|
827
|
+
bordered: "bg-transparent border-2 border-default-200 hover:border-default-400 focus:border-[#11181C]"
|
|
828
|
+
}, Pe = ({
|
|
829
|
+
value: a,
|
|
830
|
+
onChange: r,
|
|
831
|
+
placeHolder: s,
|
|
832
|
+
inputIcon: e,
|
|
833
|
+
inputEndIcon: n,
|
|
834
|
+
inputProps: o,
|
|
835
|
+
inputRef: d,
|
|
836
|
+
size: c,
|
|
837
|
+
variant: i,
|
|
838
|
+
iconOnClick: l,
|
|
839
|
+
endIconOnClick: f
|
|
840
|
+
}) => /* @__PURE__ */ u("div", { ref: d, className: "relative", children: [
|
|
841
|
+
e && /* @__PURE__ */ t(
|
|
842
|
+
"button",
|
|
843
|
+
{
|
|
844
|
+
onClick: l,
|
|
845
|
+
className: "absolute top-1/2 -translate-y-1/2 right-2",
|
|
846
|
+
children: e
|
|
847
|
+
}
|
|
848
|
+
),
|
|
849
|
+
/* @__PURE__ */ t(
|
|
850
|
+
"input",
|
|
851
|
+
{
|
|
852
|
+
...o,
|
|
853
|
+
type: "text",
|
|
854
|
+
value: a,
|
|
855
|
+
onChange: (p) => r && r(p.target.value),
|
|
856
|
+
placeholder: s,
|
|
857
|
+
className: `${De[i]} ${je[c]} transition-all duration-300 w-full px-3 text-sm outline-none rounded-sm ${n && "pl-[30px]"} ${e && "pr-[30px]"}`
|
|
858
|
+
}
|
|
859
|
+
),
|
|
860
|
+
n && /* @__PURE__ */ t(
|
|
861
|
+
"button",
|
|
862
|
+
{
|
|
863
|
+
onClick: f,
|
|
864
|
+
className: "absolute top-1/2 -translate-y-1/2 left-2",
|
|
865
|
+
children: n
|
|
866
|
+
}
|
|
867
|
+
)
|
|
868
|
+
] }), Ze = ({
|
|
869
|
+
label: a,
|
|
870
|
+
placeHolder: r,
|
|
871
|
+
inputIcon: s,
|
|
872
|
+
inputEndIcon: e,
|
|
873
|
+
value: n,
|
|
874
|
+
onChange: o,
|
|
875
|
+
size: d = "sm",
|
|
876
|
+
variant: c = "flat",
|
|
877
|
+
options: i,
|
|
878
|
+
optionsUI: l,
|
|
879
|
+
iconOnClick: f,
|
|
880
|
+
endIconOnClick: p
|
|
881
|
+
}) => /* @__PURE__ */ t(
|
|
882
|
+
Q,
|
|
883
|
+
{
|
|
884
|
+
disablePortal: !0,
|
|
885
|
+
options: i,
|
|
886
|
+
sx: { width: "100%" },
|
|
887
|
+
renderOption: (b, x) => /* @__PURE__ */ t("li", { ...b, children: l.find(({ id: h }) => h === x.id)?.element }),
|
|
888
|
+
renderInput: (b) => /* @__PURE__ */ u("div", { children: [
|
|
889
|
+
a && /* @__PURE__ */ t("div", { className: "h-4 text-xs mb-2 text-default-600", children: a }),
|
|
890
|
+
/* @__PURE__ */ t(
|
|
891
|
+
Pe,
|
|
892
|
+
{
|
|
893
|
+
value: n,
|
|
894
|
+
onChange: o,
|
|
895
|
+
placeHolder: r,
|
|
896
|
+
inputIcon: s,
|
|
897
|
+
inputEndIcon: e,
|
|
898
|
+
inputProps: b.slotProps.htmlInput,
|
|
899
|
+
inputRef: b.slotProps.input.ref,
|
|
900
|
+
size: d,
|
|
901
|
+
variant: c,
|
|
902
|
+
iconOnClick: f,
|
|
903
|
+
endIconOnClick: p
|
|
904
|
+
}
|
|
905
|
+
)
|
|
906
|
+
] })
|
|
907
|
+
}
|
|
908
|
+
);
|
|
820
909
|
export {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
910
|
+
qe as Alert,
|
|
911
|
+
Ze as Autocomplete,
|
|
912
|
+
Ve as Badge,
|
|
913
|
+
Ye as Button,
|
|
914
|
+
Ge as Chip,
|
|
915
|
+
Je as Input,
|
|
916
|
+
Ke as Radio,
|
|
917
|
+
Qe as RangeSlider,
|
|
918
|
+
Ue as Select,
|
|
919
|
+
Xe as Switch,
|
|
920
|
+
Ae as Tooltip
|
|
831
921
|
};
|