am-shared-assets 1.0.9 → 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.
@@ -11,7 +11,7 @@ interface IAutocompleteProps {
11
11
  variant?: "flat" | "faded" | "bordered";
12
12
  options: {
13
13
  data: any;
14
- element: ReactNode;
14
+ itemElement: ReactNode;
15
15
  }[];
16
16
  iconOnClick?: () => void;
17
17
  endIconOnClick?: () => void;
@@ -1,4 +1,4 @@
1
- import { jsxs as b, jsx as a, Fragment as Y } from "react/jsx-runtime";
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: u
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 u ? /* @__PURE__ */ b(
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
- u
113
+ b
114
114
  ]
115
115
  }
116
- ) : /* @__PURE__ */ b("div", { className: `relative flex justify-between p-3 ${g}`, children: [
117
- /* @__PURE__ */ b(
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__ */ b("div", { children: [
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__ */ b("div", { className: "flex items-center", children: [
130
+ l ? /* @__PURE__ */ u("div", { className: "flex items-center", children: [
131
131
  /* @__PURE__ */ a(
132
132
  "button",
133
133
  {
@@ -260,7 +260,7 @@ const X = {
260
260
  ce[n],
261
261
  ue(r, s, e)
262
262
  );
263
- return /* @__PURE__ */ b(
263
+ return /* @__PURE__ */ u(
264
264
  "button",
265
265
  {
266
266
  type: t,
@@ -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__ */ b(Y, { children: [
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: u,
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__ */ b("label", { className: "flex flex-col w-full", children: [
439
- r && /* @__PURE__ */ b(
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__ */ b(
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
- u,
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__ */ b(
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
- }, R = {
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
- R[r],
606
+ E[r],
607
607
  Se[s],
608
608
  ze[n]
609
609
  );
610
- return /* @__PURE__ */ b("div", { className: "relative", children: [
610
+ return /* @__PURE__ */ u("div", { className: "relative", children: [
611
611
  /* @__PURE__ */ a(
612
612
  "div",
613
613
  {
@@ -618,11 +618,11 @@ 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)} ${R[r]}`
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
  ] });
625
- }, E = {
625
+ }, R = {
626
626
  foreground: "#000000",
627
627
  primary: "#112E62",
628
628
  secondary: "#C59C4E",
@@ -675,7 +675,7 @@ const X = {
675
675
  width: "16px",
676
676
  height: "16px",
677
677
  border: "2px solid",
678
- borderColor: E[d],
678
+ borderColor: R[d],
679
679
  color: "#fff"
680
680
  },
681
681
  "& .MuiSlider-thumb.Mui-focusVisible": {
@@ -688,7 +688,7 @@ const X = {
688
688
  boxShadow: `0 0 0 4px ${N[d]}`
689
689
  },
690
690
  "& .MuiSlider-track": {
691
- color: E[d]
691
+ color: R[d]
692
692
  },
693
693
  "& .MuiSlider-valueLabel": {
694
694
  backgroundColor: "transparent"
@@ -800,7 +800,7 @@ const X = {
800
800
  t ? Pe[d] : "bg-default-700",
801
801
  o && "cursor-auto"
802
802
  );
803
- return /* @__PURE__ */ b("div", { className: `flex items-center gap-2 ${i}`, children: [
803
+ return /* @__PURE__ */ u("div", { className: `flex items-center gap-2 ${i}`, children: [
804
804
  /* @__PURE__ */ a(
805
805
  "button",
806
806
  {
@@ -828,7 +828,7 @@ const X = {
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
- }, Re = ({
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__ */ b("div", { ref: o, className: "relative", children: [
843
+ }) => /* @__PURE__ */ u("div", { ref: o, className: "relative", children: [
844
844
  e && /* @__PURE__ */ a(
845
845
  "button",
846
846
  {
@@ -882,7 +882,7 @@ const X = {
882
882
  iconOnClick: p,
883
883
  endIconOnClick: m
884
884
  }) => {
885
- const x = l.map((u, g) => ({ ...u, optionIndex: g })), h = l.map((u, g) => (delete u.element, { ...u, optionIndex: g }));
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: (u, g) => o && o(g),
905
+ onChange: (b, g) => o && o(g),
906
906
  getOptionLabel: () => "",
907
- renderOption: (u, g) => /* @__PURE__ */ a("li", { ...u, children: x.find(
907
+ renderOption: (b, g) => /* @__PURE__ */ a("li", { ...b, children: x.find(
908
908
  ({ optionIndex: v }) => v === g.optionIndex
909
- )?.element }),
910
- renderInput: (u) => /* @__PURE__ */ b("div", { children: [
909
+ )?.itemElement }),
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
- Re,
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: u.slotProps.htmlInput,
921
- inputRef: u.slotProps.input.ref,
920
+ inputProps: b.slotProps.htmlInput,
921
+ inputRef: b.slotProps.input.ref,
922
922
  size: i,
923
923
  variant: c,
924
924
  iconOnClick: p,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "am-shared-assets",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "",