am-shared-assets 1.0.10 → 1.0.11
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.js +39 -39
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as u, jsx as a, Fragment as Y } from "react/jsx-runtime";
|
|
2
2
|
import { I as S, b as z, a as W, W as q, T as V, C as G } from "./ChevronBottomIcon-BM6pUrh1.js";
|
|
3
3
|
import { Slider as J, MenuItem as K } from "@mui/material";
|
|
4
4
|
import Q from "@mui/material/Select";
|
|
@@ -96,7 +96,7 @@ const X = {
|
|
|
96
96
|
buttonTextColor: m = "black",
|
|
97
97
|
buttonClickHandler: x,
|
|
98
98
|
closeAlertHandler: h,
|
|
99
|
-
children:
|
|
99
|
+
children: b
|
|
100
100
|
}) => {
|
|
101
101
|
const g = f(
|
|
102
102
|
Z[n],
|
|
@@ -104,30 +104,30 @@ const X = {
|
|
|
104
104
|
ae[d],
|
|
105
105
|
H[s]
|
|
106
106
|
);
|
|
107
|
-
return
|
|
107
|
+
return b ? /* @__PURE__ */ u(
|
|
108
108
|
"div",
|
|
109
109
|
{
|
|
110
110
|
className: `flex p-3 ${g} ${o && M[o]}`,
|
|
111
111
|
children: [
|
|
112
112
|
/* @__PURE__ */ a("div", { className: "mt-[1px]", children: i || !$[s] ? /* @__PURE__ */ a(S, { color: B[s] }) : $[s] }),
|
|
113
|
-
|
|
113
|
+
b
|
|
114
114
|
]
|
|
115
115
|
}
|
|
116
|
-
) : /* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
116
|
+
) : /* @__PURE__ */ u("div", { className: `relative flex justify-between p-3 ${g}`, children: [
|
|
117
|
+
/* @__PURE__ */ u(
|
|
118
118
|
"div",
|
|
119
119
|
{
|
|
120
120
|
className: `flex ${o ? M[o] : l ? "items-center" : t && r ? "items-start" : "items-center"} gap-3`,
|
|
121
121
|
children: [
|
|
122
122
|
/* @__PURE__ */ a("div", { className: "mt-[1px]", children: i || !$[s] ? /* @__PURE__ */ a(S, { color: B[s] }) : $[s] }),
|
|
123
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ u("div", { children: [
|
|
124
124
|
t && /* @__PURE__ */ a("h2", { className: `font-semibold ${ee[s]}`, children: t }),
|
|
125
125
|
r && /* @__PURE__ */ a("p", { className: re[s], children: r })
|
|
126
126
|
] })
|
|
127
127
|
]
|
|
128
128
|
}
|
|
129
129
|
),
|
|
130
|
-
l ? /* @__PURE__ */
|
|
130
|
+
l ? /* @__PURE__ */ u("div", { className: "flex items-center", children: [
|
|
131
131
|
/* @__PURE__ */ a(
|
|
132
132
|
"button",
|
|
133
133
|
{
|
|
@@ -203,7 +203,7 @@ const X = {
|
|
|
203
203
|
success: "border-base-success",
|
|
204
204
|
warning: "border-base-warning",
|
|
205
205
|
danger: "border-base-danger"
|
|
206
|
-
},
|
|
206
|
+
}, j = {
|
|
207
207
|
default: "bg-default-100",
|
|
208
208
|
primary: "bg-primary-100",
|
|
209
209
|
secondary: "bg-secondary-100",
|
|
@@ -229,10 +229,10 @@ const X = {
|
|
|
229
229
|
e = y[r];
|
|
230
230
|
break;
|
|
231
231
|
case "flat":
|
|
232
|
-
e = `${
|
|
232
|
+
e = `${j[r]} ${y[r]}`;
|
|
233
233
|
break;
|
|
234
234
|
case "faded":
|
|
235
|
-
e = `border-2 ${P.default} ${
|
|
235
|
+
e = `border-2 ${P.default} ${j.default} ${y[r]}`;
|
|
236
236
|
break;
|
|
237
237
|
case "shadow":
|
|
238
238
|
e = `shadow-lg ${I[r]} ${y[s]}`;
|
|
@@ -260,7 +260,7 @@ const X = {
|
|
|
260
260
|
ce[n],
|
|
261
261
|
ue(r, s, e)
|
|
262
262
|
);
|
|
263
|
-
return /* @__PURE__ */
|
|
263
|
+
return /* @__PURE__ */ u(
|
|
264
264
|
"button",
|
|
265
265
|
{
|
|
266
266
|
type: t,
|
|
@@ -283,7 +283,7 @@ const X = {
|
|
|
283
283
|
md: "rounded-md",
|
|
284
284
|
lg: "rounded-lg",
|
|
285
285
|
full: "rounded-full"
|
|
286
|
-
},
|
|
286
|
+
}, D = {
|
|
287
287
|
default: "bg-default-200",
|
|
288
288
|
primary: "bg-base-primary",
|
|
289
289
|
secondary: "bg-base-secondary",
|
|
@@ -324,7 +324,7 @@ const X = {
|
|
|
324
324
|
let e = "";
|
|
325
325
|
switch (t) {
|
|
326
326
|
case "solid":
|
|
327
|
-
e = `${
|
|
327
|
+
e = `${D[r]} ${w[s]}`;
|
|
328
328
|
break;
|
|
329
329
|
case "bordered":
|
|
330
330
|
e = `border-2 ${C[r]} ${w[r]}`;
|
|
@@ -339,7 +339,7 @@ const X = {
|
|
|
339
339
|
e = `border-2 ${C.default} bg-default-100 ${w[r]}`;
|
|
340
340
|
break;
|
|
341
341
|
case "shadow":
|
|
342
|
-
e = `shadow-lg ${
|
|
342
|
+
e = `shadow-lg ${D[r]} ${w[s]}`;
|
|
343
343
|
break;
|
|
344
344
|
case "dot":
|
|
345
345
|
e = `border-2 ${C.default} ${w.black}`;
|
|
@@ -360,7 +360,7 @@ const X = {
|
|
|
360
360
|
be[n],
|
|
361
361
|
me(t, r, s)
|
|
362
362
|
);
|
|
363
|
-
return /* @__PURE__ */ a("div", { className: `w-fit flex items-center justify-center gap-1 px-2 ${i}`, children: o || /* @__PURE__ */
|
|
363
|
+
return /* @__PURE__ */ a("div", { className: `w-fit flex items-center justify-center gap-1 px-2 ${i}`, children: o || /* @__PURE__ */ u(Y, { children: [
|
|
364
364
|
/* @__PURE__ */ a("p", { children: e }),
|
|
365
365
|
t === "dot" && /* @__PURE__ */ a("div", { className: `size-2 rounded-full ${fe[r]}` })
|
|
366
366
|
] }) });
|
|
@@ -429,14 +429,14 @@ const X = {
|
|
|
429
429
|
size: m = "sm",
|
|
430
430
|
rounded: x = "sm",
|
|
431
431
|
description: h = "",
|
|
432
|
-
icon:
|
|
432
|
+
icon: b,
|
|
433
433
|
endIcon: g,
|
|
434
434
|
errorMsg: v = "",
|
|
435
435
|
hasError: F = !1
|
|
436
436
|
}) => {
|
|
437
437
|
const T = f($e[x], Ce(l, p, F)), _ = f(xe[m]);
|
|
438
|
-
return /* @__PURE__ */
|
|
439
|
-
r && /* @__PURE__ */
|
|
438
|
+
return /* @__PURE__ */ u("label", { className: "flex flex-col w-full", children: [
|
|
439
|
+
r && /* @__PURE__ */ u(
|
|
440
440
|
"div",
|
|
441
441
|
{
|
|
442
442
|
className: `h-4 text-xs mb-2 ${F ? "text-base-danger" : he[p]}`,
|
|
@@ -446,12 +446,12 @@ const X = {
|
|
|
446
446
|
]
|
|
447
447
|
}
|
|
448
448
|
),
|
|
449
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ u(
|
|
450
450
|
"div",
|
|
451
451
|
{
|
|
452
452
|
className: `${T} flex items-center px-1.5 transition-all duration-200`,
|
|
453
453
|
children: [
|
|
454
|
-
|
|
454
|
+
b,
|
|
455
455
|
e ? /* @__PURE__ */ a(
|
|
456
456
|
"input",
|
|
457
457
|
{
|
|
@@ -513,7 +513,7 @@ const X = {
|
|
|
513
513
|
ke[d],
|
|
514
514
|
s ? Ne[o] : "border-base-default hover:bg-default-100 transition-all duration-200"
|
|
515
515
|
);
|
|
516
|
-
return /* @__PURE__ */
|
|
516
|
+
return /* @__PURE__ */ u(
|
|
517
517
|
"label",
|
|
518
518
|
{
|
|
519
519
|
className: `flex items-center gap-2 ${e ? "opacity-50" : "cursor-pointer"}`,
|
|
@@ -550,7 +550,7 @@ const X = {
|
|
|
550
550
|
sm: "min-h-6 text-xs",
|
|
551
551
|
md: "min-h-7 text-sm",
|
|
552
552
|
lg: "min-h-8 text-base"
|
|
553
|
-
},
|
|
553
|
+
}, E = {
|
|
554
554
|
default: "bg-content-1",
|
|
555
555
|
primary: "bg-layout-focus",
|
|
556
556
|
secondary: "bg-base-secondary",
|
|
@@ -603,11 +603,11 @@ const X = {
|
|
|
603
603
|
}) => {
|
|
604
604
|
const i = f(
|
|
605
605
|
_e[e],
|
|
606
|
-
|
|
606
|
+
E[r],
|
|
607
607
|
Se[s],
|
|
608
608
|
ze[n]
|
|
609
609
|
);
|
|
610
|
-
return /* @__PURE__ */
|
|
610
|
+
return /* @__PURE__ */ u("div", { className: "relative", children: [
|
|
611
611
|
/* @__PURE__ */ a(
|
|
612
612
|
"div",
|
|
613
613
|
{
|
|
@@ -618,7 +618,7 @@ const X = {
|
|
|
618
618
|
/* @__PURE__ */ a(
|
|
619
619
|
"div",
|
|
620
620
|
{
|
|
621
|
-
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] ${Ae(d, o)} ${
|
|
621
|
+
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] ${Ae(d, o)} ${E[r]}`
|
|
622
622
|
}
|
|
623
623
|
)
|
|
624
624
|
] });
|
|
@@ -800,7 +800,7 @@ const X = {
|
|
|
800
800
|
t ? Pe[d] : "bg-default-700",
|
|
801
801
|
o && "cursor-auto"
|
|
802
802
|
);
|
|
803
|
-
return /* @__PURE__ */
|
|
803
|
+
return /* @__PURE__ */ u("div", { className: `flex items-center gap-2 ${i}`, children: [
|
|
804
804
|
/* @__PURE__ */ a(
|
|
805
805
|
"button",
|
|
806
806
|
{
|
|
@@ -821,14 +821,14 @@ const X = {
|
|
|
821
821
|
),
|
|
822
822
|
s && /* @__PURE__ */ a("p", { className: `text-default-600 ${n === "sm" && "text-sm"}`, children: s })
|
|
823
823
|
] });
|
|
824
|
-
},
|
|
824
|
+
}, je = {
|
|
825
825
|
sm: "h-8 py-1",
|
|
826
826
|
lg: "h-10 py-2"
|
|
827
|
-
},
|
|
827
|
+
}, De = {
|
|
828
828
|
flat: "bg-default-100 hover:bg-default-200 focus:bg-transparent focus:border-2 border-[#11181C]",
|
|
829
829
|
faded: "bg-default-100 hover:bg-default-200 focus:bg-transparent border-2 border-default-200 hover:border-default-400 focus:border-[#11181C]",
|
|
830
830
|
bordered: "bg-transparent border-2 border-default-200 hover:border-default-400 focus:border-[#11181C]"
|
|
831
|
-
},
|
|
831
|
+
}, Ee = ({
|
|
832
832
|
value: t,
|
|
833
833
|
onInputChange: r,
|
|
834
834
|
placeHolder: s,
|
|
@@ -840,7 +840,7 @@ const X = {
|
|
|
840
840
|
variant: c,
|
|
841
841
|
iconOnClick: l,
|
|
842
842
|
endIconOnClick: p
|
|
843
|
-
}) => /* @__PURE__ */
|
|
843
|
+
}) => /* @__PURE__ */ u("div", { ref: o, className: "relative", children: [
|
|
844
844
|
e && /* @__PURE__ */ a(
|
|
845
845
|
"button",
|
|
846
846
|
{
|
|
@@ -857,7 +857,7 @@ const X = {
|
|
|
857
857
|
value: t,
|
|
858
858
|
onChange: (m) => r && r(m.target.value),
|
|
859
859
|
placeholder: s,
|
|
860
|
-
className: `${
|
|
860
|
+
className: `${De[c]} ${je[i]} transition-all duration-300 w-full px-3 text-sm outline-none rounded-sm ${n && "pl-[30px]"} ${e && "pr-[30px]"}`
|
|
861
861
|
}
|
|
862
862
|
),
|
|
863
863
|
n && /* @__PURE__ */ a(
|
|
@@ -882,7 +882,7 @@ const X = {
|
|
|
882
882
|
iconOnClick: p,
|
|
883
883
|
endIconOnClick: m
|
|
884
884
|
}) => {
|
|
885
|
-
const x = l.map((
|
|
885
|
+
const x = l.map((b, g) => ({ ...b, optionIndex: g })), h = l.map((b, g) => ({ data: b.data, optionIndex: g }));
|
|
886
886
|
return /* @__PURE__ */ a(
|
|
887
887
|
U,
|
|
888
888
|
{
|
|
@@ -902,23 +902,23 @@ const X = {
|
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
904
|
},
|
|
905
|
-
onChange: (
|
|
905
|
+
onChange: (b, g) => o && o(g),
|
|
906
906
|
getOptionLabel: () => "",
|
|
907
|
-
renderOption: (
|
|
907
|
+
renderOption: (b, g) => /* @__PURE__ */ a("li", { ...b, children: x.find(
|
|
908
908
|
({ optionIndex: v }) => v === g.optionIndex
|
|
909
909
|
)?.itemElement }),
|
|
910
|
-
renderInput: (
|
|
910
|
+
renderInput: (b) => /* @__PURE__ */ u("div", { children: [
|
|
911
911
|
t && /* @__PURE__ */ a("div", { className: "h-4 text-xs mb-2 text-default-600", children: t }),
|
|
912
912
|
/* @__PURE__ */ a(
|
|
913
|
-
|
|
913
|
+
Ee,
|
|
914
914
|
{
|
|
915
915
|
value: n,
|
|
916
916
|
onInputChange: d,
|
|
917
917
|
placeHolder: r,
|
|
918
918
|
inputIcon: s,
|
|
919
919
|
inputEndIcon: e,
|
|
920
|
-
inputProps:
|
|
921
|
-
inputRef:
|
|
920
|
+
inputProps: b.slotProps.htmlInput,
|
|
921
|
+
inputRef: b.slotProps.input.ref,
|
|
922
922
|
size: i,
|
|
923
923
|
variant: c,
|
|
924
924
|
iconOnClick: p,
|