am-shared-assets 1.0.8 → 1.0.9

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.
Files changed (2) hide show
  1. package/dist/components.js +93 -77
  2. package/package.json +1 -1
@@ -1,20 +1,20 @@
1
- import { jsxs as b, jsx as a, Fragment as W } from "react/jsx-runtime";
2
- import { I as S, b as z, a as q, W as V, T as Y, C as G } from "./ChevronBottomIcon-BM6pUrh1.js";
1
+ import { jsxs as b, jsx as a, Fragment as Y } from "react/jsx-runtime";
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";
5
5
  import U from "@mui/material/Autocomplete";
6
6
  import "react";
7
- function T(t) {
7
+ function L(t) {
8
8
  var r, s, e = "";
9
9
  if (typeof t == "string" || typeof t == "number") e += t;
10
10
  else if (typeof t == "object") if (Array.isArray(t)) {
11
11
  var n = t.length;
12
- for (r = 0; r < n; r++) t[r] && (s = T(t[r])) && (e && (e += " "), e += s);
12
+ for (r = 0; r < n; r++) t[r] && (s = L(t[r])) && (e && (e += " "), e += s);
13
13
  } else for (s in t) t[s] && (e && (e += " "), e += s);
14
14
  return e;
15
15
  }
16
16
  function f() {
17
- for (var t, r, s = 0, e = "", n = arguments.length; s < n; s++) (t = arguments[s]) && (r = T(t)) && (e && (e += " "), e += r);
17
+ for (var t, r, s = 0, e = "", n = arguments.length; s < n; s++) (t = arguments[s]) && (r = L(t)) && (e && (e += " "), e += r);
18
18
  return e;
19
19
  }
20
20
  const X = {
@@ -64,7 +64,7 @@ const X = {
64
64
  }, M = {
65
65
  start: "items-start",
66
66
  center: "items-center"
67
- }, I = {
67
+ }, B = {
68
68
  default: "#000",
69
69
  primary: "#112E62",
70
70
  secondary: "#C59C4E",
@@ -72,16 +72,16 @@ const X = {
72
72
  warning: "#f5a524",
73
73
  danger: "#f31260"
74
74
  }, $ = {
75
- success: /* @__PURE__ */ a(Y, { color: "#17C964", size: 24 }),
76
- warning: /* @__PURE__ */ a(V, { color: "#F5A524", size: 24 }),
77
- danger: /* @__PURE__ */ a(q, { color: "#F31260", size: 24 })
75
+ success: /* @__PURE__ */ a(V, { color: "#17C964", size: 24 }),
76
+ warning: /* @__PURE__ */ a(q, { color: "#F5A524", size: 24 }),
77
+ danger: /* @__PURE__ */ a(W, { color: "#F31260", size: 24 })
78
78
  }, ae = {
79
79
  none: "rounded-none",
80
80
  sm: "rounded-md",
81
81
  md: "rounded-xl",
82
82
  lg: "rounded-[22px]",
83
83
  full: "rounded-full"
84
- }, Ve = ({
84
+ }, qe = ({
85
85
  title: t,
86
86
  description: r,
87
87
  color: s = "default",
@@ -89,8 +89,8 @@ const X = {
89
89
  width: n = "default",
90
90
  rounded: d = "none",
91
91
  infoIconAlignment: o,
92
- isInfoIcon: c = !0,
93
- hasCloseButton: i = !0,
92
+ isInfoIcon: i = !0,
93
+ hasCloseButton: c = !0,
94
94
  hasButton: l = !1,
95
95
  buttonTitle: p,
96
96
  buttonTextColor: m = "black",
@@ -109,7 +109,7 @@ const X = {
109
109
  {
110
110
  className: `flex p-3 ${g} ${o && M[o]}`,
111
111
  children: [
112
- /* @__PURE__ */ a("div", { className: "mt-[1px]", children: c || !$[s] ? /* @__PURE__ */ a(S, { color: I[s] }) : $[s] }),
112
+ /* @__PURE__ */ a("div", { className: "mt-[1px]", children: i || !$[s] ? /* @__PURE__ */ a(S, { color: B[s] }) : $[s] }),
113
113
  u
114
114
  ]
115
115
  }
@@ -119,7 +119,7 @@ const X = {
119
119
  {
120
120
  className: `flex ${o ? M[o] : l ? "items-center" : t && r ? "items-start" : "items-center"} gap-3`,
121
121
  children: [
122
- /* @__PURE__ */ a("div", { className: "mt-[1px]", children: c || !$[s] ? /* @__PURE__ */ a(S, { color: I[s] }) : $[s] }),
122
+ /* @__PURE__ */ a("div", { className: "mt-[1px]", children: i || !$[s] ? /* @__PURE__ */ a(S, { color: B[s] }) : $[s] }),
123
123
  /* @__PURE__ */ b("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 })
@@ -136,7 +136,7 @@ const X = {
136
136
  children: p
137
137
  }
138
138
  ),
139
- i && /* @__PURE__ */ a(
139
+ c && /* @__PURE__ */ a(
140
140
  "button",
141
141
  {
142
142
  onClick: h,
@@ -144,7 +144,7 @@ const X = {
144
144
  children: /* @__PURE__ */ a(z, { color: A.default, size: 14 })
145
145
  }
146
146
  )
147
- ] }) : i && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("button", { onClick: h, children: /* @__PURE__ */ a(z, { color: A[s] }) }) })
147
+ ] }) : c && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("button", { onClick: h, children: /* @__PURE__ */ a(z, { color: A[s] }) }) })
148
148
  ] });
149
149
  }, ne = {
150
150
  sm: "h-5 text-xs px-2",
@@ -159,10 +159,10 @@ const X = {
159
159
  }, de = {
160
160
  white: "text-content-1",
161
161
  black: "text-layout-fg"
162
- }, ce = {
162
+ }, ie = {
163
163
  pill: "rounded-full",
164
164
  Rectangle: "rounded-xxs"
165
- }, Ye = ({
165
+ }, Ve = ({
166
166
  label: t,
167
167
  color: r = "default",
168
168
  type: s = "pill",
@@ -173,10 +173,10 @@ const X = {
173
173
  oe[r],
174
174
  de[n],
175
175
  ne[e],
176
- ce[s]
176
+ ie[s]
177
177
  );
178
178
  return /* @__PURE__ */ a("div", { className: `flex justify-center items-center ${d}`, children: t });
179
- }, ie = {
179
+ }, ce = {
180
180
  sm: "h-8 text-xs px-3",
181
181
  md: "h-10 text-sm px-4",
182
182
  lg: "h-12 text-base px-6"
@@ -189,7 +189,7 @@ const X = {
189
189
  success: "text-base-success",
190
190
  warning: "text-base-warning",
191
191
  danger: "text-base-danger"
192
- }, B = {
192
+ }, I = {
193
193
  default: "bg-default-300",
194
194
  primary: "bg-base-primary",
195
195
  secondary: "bg-base-secondary",
@@ -220,7 +220,7 @@ const X = {
220
220
  let e = "";
221
221
  switch (t) {
222
222
  case "solid":
223
- e = `${B[r]} ${y[s]}`;
223
+ e = `${I[r]} ${y[s]}`;
224
224
  break;
225
225
  case "bordered":
226
226
  e = `border-2 ${P[r]} ${y[r]}`;
@@ -235,7 +235,7 @@ const X = {
235
235
  e = `border-2 ${P.default} ${j.default} ${y[r]}`;
236
236
  break;
237
237
  case "shadow":
238
- e = `shadow-lg ${B[r]} ${y[s]}`;
238
+ e = `shadow-lg ${I[r]} ${y[s]}`;
239
239
  break;
240
240
  }
241
241
  return e;
@@ -247,17 +247,17 @@ const X = {
247
247
  size: n = "md",
248
248
  rounded: d = "none",
249
249
  label: o,
250
- icon: c,
251
- iconPosition: i = "left",
250
+ icon: i,
251
+ iconPosition: c = "left",
252
252
  width: l = "auto",
253
253
  disabled: p = !1,
254
254
  onClick: m
255
255
  }) => {
256
256
  const x = f(
257
257
  l === "full" ? "w-full" : "w-auto",
258
- i === "right" ? "flex-row" : "flex-row-reverse",
258
+ c === "right" ? "flex-row" : "flex-row-reverse",
259
259
  le[d],
260
- ie[n],
260
+ ce[n],
261
261
  ue(r, s, e)
262
262
  );
263
263
  return /* @__PURE__ */ b(
@@ -268,7 +268,7 @@ const X = {
268
268
  onClick: m,
269
269
  disabled: p,
270
270
  children: [
271
- c,
271
+ i,
272
272
  o && /* @__PURE__ */ a("p", { children: o })
273
273
  ]
274
274
  }
@@ -355,12 +355,12 @@ const X = {
355
355
  rounded: d = "none",
356
356
  children: o
357
357
  }) => {
358
- const c = f(
358
+ const i = f(
359
359
  ge[d],
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 ${c}`, children: o || /* @__PURE__ */ b(W, { children: [
363
+ return /* @__PURE__ */ a("div", { className: `w-fit flex items-center justify-center gap-1 px-2 ${i}`, children: o || /* @__PURE__ */ b(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
  ] }) });
@@ -422,8 +422,8 @@ const X = {
422
422
  name: n,
423
423
  value: d,
424
424
  onChange: o,
425
- isFocused: c = !1,
426
- placeHolder: i,
425
+ isFocused: i = !1,
426
+ placeHolder: c,
427
427
  variant: l = "flat",
428
428
  color: p = "default",
429
429
  size: m = "sm",
@@ -432,14 +432,14 @@ const X = {
432
432
  icon: u,
433
433
  endIcon: g,
434
434
  errorMsg: v = "",
435
- hasError: _ = !1
435
+ hasError: F = !1
436
436
  }) => {
437
- const L = f($e[x], Ce(l, p, _)), F = f(xe[m]);
437
+ const T = f($e[x], Ce(l, p, F)), _ = f(xe[m]);
438
438
  return /* @__PURE__ */ b("label", { className: "flex flex-col w-full", children: [
439
439
  r && /* @__PURE__ */ b(
440
440
  "div",
441
441
  {
442
- className: `h-4 text-xs mb-2 ${_ ? "text-base-danger" : he[p]}`,
442
+ className: `h-4 text-xs mb-2 ${F ? "text-base-danger" : he[p]}`,
443
443
  children: [
444
444
  r,
445
445
  s && /* @__PURE__ */ a("span", { className: "text-base-danger text-sm", children: "*" })
@@ -449,7 +449,7 @@ const X = {
449
449
  /* @__PURE__ */ b(
450
450
  "div",
451
451
  {
452
- className: `${L} flex items-center px-1.5 transition-all duration-200`,
452
+ className: `${T} flex items-center px-1.5 transition-all duration-200`,
453
453
  children: [
454
454
  u,
455
455
  e ? /* @__PURE__ */ a(
@@ -458,9 +458,9 @@ const X = {
458
458
  id: `${t}`,
459
459
  type: "text",
460
460
  ...e(n),
461
- placeholder: i,
462
- className: `${F} bg-transparent w-full px-1.5 text-sm outline-none`,
463
- autoFocus: c
461
+ placeholder: c,
462
+ className: `${_} bg-transparent w-full px-1.5 text-sm outline-none`,
463
+ autoFocus: i
464
464
  }
465
465
  ) : /* @__PURE__ */ a(
466
466
  "input",
@@ -469,9 +469,9 @@ const X = {
469
469
  type: "text",
470
470
  value: d,
471
471
  onChange: (O) => o && o(O.target.value),
472
- placeholder: i,
473
- className: `${F} bg-transparent w-full px-1.5 text-sm outline-none`,
474
- autoFocus: c
472
+ placeholder: c,
473
+ className: `${_} bg-transparent w-full px-1.5 text-sm outline-none`,
474
+ autoFocus: i
475
475
  }
476
476
  ),
477
477
  g
@@ -492,7 +492,7 @@ const X = {
492
492
  warning: "border-base-warning",
493
493
  danger: "border-base-danger",
494
494
  neutral: "border-default-500"
495
- }, _e = {
495
+ }, Fe = {
496
496
  primary: "bg-base-primary",
497
497
  secondary: "bg-base-secondary",
498
498
  success: "bg-base-success",
@@ -507,9 +507,9 @@ const X = {
507
507
  onChange: n,
508
508
  size: d = "md",
509
509
  color: o = "primary",
510
- children: c
510
+ children: i
511
511
  }) => {
512
- const i = f(
512
+ const c = f(
513
513
  ke[d],
514
514
  s ? Ne[o] : "border-base-default hover:bg-default-100 transition-all duration-200"
515
515
  );
@@ -533,20 +533,20 @@ const X = {
533
533
  /* @__PURE__ */ a(
534
534
  "div",
535
535
  {
536
- className: `flex justify-center items-center rounded-full border-2 ${i}`,
536
+ className: `flex justify-center items-center rounded-full border-2 ${c}`,
537
537
  children: s && /* @__PURE__ */ a(
538
538
  "span",
539
539
  {
540
- className: `block w-full h-full rounded-full ${_e[o]}`
540
+ className: `block w-full h-full rounded-full ${Fe[o]}`
541
541
  }
542
542
  )
543
543
  }
544
544
  ),
545
- /* @__PURE__ */ a("div", { children: c })
545
+ /* @__PURE__ */ a("div", { children: i })
546
546
  ]
547
547
  }
548
548
  );
549
- }, Fe = {
549
+ }, _e = {
550
550
  sm: "min-h-6 text-xs",
551
551
  md: "min-h-7 text-sm",
552
552
  lg: "min-h-8 text-base"
@@ -601,8 +601,8 @@ const X = {
601
601
  direction: d = "bottom",
602
602
  position: o = "center"
603
603
  }) => {
604
- const c = f(
605
- Fe[e],
604
+ const i = f(
605
+ _e[e],
606
606
  R[r],
607
607
  Se[s],
608
608
  ze[n]
@@ -611,7 +611,7 @@ const X = {
611
611
  /* @__PURE__ */ a(
612
612
  "div",
613
613
  {
614
- className: `max-w-[180px] relative z-10 py-1 px-3 shadow-[0px_1px_2px_0px_#0000000F,0px_1px_3px_0px_#0000001A] ${c}`,
614
+ className: `max-w-[180px] relative z-10 py-1 px-3 shadow-[0px_1px_2px_0px_#0000000F,0px_1px_3px_0px_#0000001A] ${i}`,
615
615
  children: /* @__PURE__ */ a("p", { children: t })
616
616
  }
617
617
  ),
@@ -644,7 +644,7 @@ const X = {
644
644
  step: n = 1,
645
645
  color: d = "primary",
646
646
  tooltipColor: o = "primary",
647
- tooltipTextColor: c = "white"
647
+ tooltipTextColor: i = "white"
648
648
  }) => /* @__PURE__ */ a(
649
649
  J,
650
650
  {
@@ -652,17 +652,17 @@ const X = {
652
652
  min: s,
653
653
  max: e,
654
654
  step: n,
655
- onChange: (i, l) => {
655
+ onChange: (c, l) => {
656
656
  r(l);
657
657
  },
658
- onChangeCommitted: (i) => {
658
+ onChangeCommitted: (c) => {
659
659
  },
660
- valueLabelFormat: (i) => /* @__PURE__ */ a(
660
+ valueLabelFormat: (c) => /* @__PURE__ */ a(
661
661
  Me,
662
662
  {
663
663
  color: o,
664
- textColor: c,
665
- label: `${i.toLocaleString()}`
664
+ textColor: i,
665
+ label: `${c.toLocaleString()}`
666
666
  }
667
667
  ),
668
668
  valueLabelDisplay: "auto",
@@ -695,7 +695,7 @@ const X = {
695
695
  }
696
696
  }
697
697
  }
698
- ), Ie = () => /* @__PURE__ */ a("div", { className: "custom-select-icon", children: /* @__PURE__ */ a(G, {}) }), Xe = ({ options: t, value: r, onChange: s }) => /* @__PURE__ */ a(
698
+ ), Be = () => /* @__PURE__ */ a("div", { className: "custom-select-icon", children: /* @__PURE__ */ a(G, {}) }), Xe = ({ options: t, value: r, onChange: s }) => /* @__PURE__ */ a(
699
699
  Q,
700
700
  {
701
701
  MenuProps: {
@@ -715,7 +715,7 @@ const X = {
715
715
  }
716
716
  }
717
717
  },
718
- IconComponent: Ie,
718
+ IconComponent: Be,
719
719
  sx: {
720
720
  width: "100%",
721
721
  height: 34,
@@ -772,7 +772,7 @@ const X = {
772
772
  d
773
773
  ))
774
774
  }
775
- ), Be = {
775
+ ), Ie = {
776
776
  sm: "min-w-10 min-h-6",
777
777
  md: "min-w-12 min-h-7",
778
778
  lg: "min-w-14 min-h-8"
@@ -792,20 +792,20 @@ const X = {
792
792
  color: d = "default",
793
793
  disabled: o = !1
794
794
  }) => {
795
- const c = f(
795
+ const i = f(
796
796
  e === "left" ? "flex-row" : "flex-row-reverse",
797
797
  o && "opacity-50"
798
- ), i = f(
799
- Be[n],
798
+ ), c = f(
799
+ Ie[n],
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 ${c}`, children: [
803
+ return /* @__PURE__ */ b("div", { className: `flex items-center gap-2 ${i}`, children: [
804
804
  /* @__PURE__ */ a(
805
805
  "button",
806
806
  {
807
807
  onClick: r,
808
- className: `relative rounded-full transition-colors duration-300 p-1 ${i}`,
808
+ className: `relative rounded-full transition-colors duration-300 p-1 ${c}`,
809
809
  disabled: o,
810
810
  children: /* @__PURE__ */ a(
811
811
  "span",
@@ -836,8 +836,8 @@ const X = {
836
836
  inputEndIcon: n,
837
837
  inputProps: d,
838
838
  inputRef: o,
839
- size: c,
840
- variant: i,
839
+ size: i,
840
+ variant: c,
841
841
  iconOnClick: l,
842
842
  endIconOnClick: p
843
843
  }) => /* @__PURE__ */ b("div", { ref: o, className: "relative", children: [
@@ -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: `${De[i]} ${je[c]} transition-all duration-300 w-full px-3 text-sm outline-none rounded-sm ${n && "pl-[30px]"} ${e && "pr-[30px]"}`
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(
@@ -876,8 +876,8 @@ const X = {
876
876
  value: n,
877
877
  onInputChange: d,
878
878
  onChange: o,
879
- size: c = "sm",
880
- variant: i = "flat",
879
+ size: i = "sm",
880
+ variant: c = "flat",
881
881
  options: l,
882
882
  iconOnClick: p,
883
883
  endIconOnClick: m
@@ -888,9 +888,25 @@ const X = {
888
888
  {
889
889
  disablePortal: !0,
890
890
  options: h,
891
- sx: { width: "100%" },
891
+ sx: {
892
+ width: "100%",
893
+ fontFamily: "YekanBakh",
894
+ "& .MuiInputBase-input": {
895
+ fontFamily: "YekanBakh"
896
+ }
897
+ },
898
+ slotProps: {
899
+ paper: {
900
+ sx: {
901
+ fontFamily: "YekanBakh"
902
+ }
903
+ }
904
+ },
892
905
  onChange: (u, g) => o && o(g),
893
- renderOption: (u, g) => /* @__PURE__ */ a("li", { ...u, children: x.find(({ optionIndex: v }) => v === g.optionIndex)?.element }),
906
+ getOptionLabel: () => "",
907
+ renderOption: (u, g) => /* @__PURE__ */ a("li", { ...u, children: x.find(
908
+ ({ optionIndex: v }) => v === g.optionIndex
909
+ )?.element }),
894
910
  renderInput: (u) => /* @__PURE__ */ b("div", { children: [
895
911
  t && /* @__PURE__ */ a("div", { className: "h-4 text-xs mb-2 text-default-600", children: t }),
896
912
  /* @__PURE__ */ a(
@@ -903,8 +919,8 @@ const X = {
903
919
  inputEndIcon: e,
904
920
  inputProps: u.slotProps.htmlInput,
905
921
  inputRef: u.slotProps.input.ref,
906
- size: c,
907
- variant: i,
922
+ size: i,
923
+ variant: c,
908
924
  iconOnClick: p,
909
925
  endIconOnClick: m
910
926
  }
@@ -914,9 +930,9 @@ const X = {
914
930
  );
915
931
  };
916
932
  export {
917
- Ve as Alert,
933
+ qe as Alert,
918
934
  He as Autocomplete,
919
- Ye as Badge,
935
+ Ve as Badge,
920
936
  Ge as Button,
921
937
  Je as Chip,
922
938
  Ke as Input,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "am-shared-assets",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "",