qaema-ui 0.0.55 → 0.0.57

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.
@@ -9,6 +9,7 @@ export type BadgeProps = {
9
9
  variant?: BadgeVariant;
10
10
  children?: ReactNode;
11
11
  onClose?: () => void;
12
+ image?: string;
12
13
  };
13
- declare const Badge: ({ bgColor, color, label, weight, variant, onClose, children }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const Badge: ({ bgColor, color, label, weight, variant, onClose, children, image }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
14
15
  export default Badge;
@@ -1,9 +1,9 @@
1
- import { j as t } from "../_virtual/jsx-runtime.js";
2
- import { IoClose as l } from "../node_modules/react-icons/io5/index.js";
1
+ import { j as e } from "../_virtual/jsx-runtime.js";
2
+ import { IoClose as p } from "../node_modules/react-icons/io5/index.js";
3
3
  import i from "styled-components";
4
- import p from "../hooks/useBadgeVariant.js";
4
+ import g from "../hooks/useBadgeVariant.js";
5
5
  import m from "./Typography.js";
6
- const g = i.div`
6
+ const u = i.div`
7
7
  display: flex;
8
8
  align-items: center;
9
9
  justify-content: space-between;
@@ -12,7 +12,7 @@ const g = i.div`
12
12
  background-color: ${({ bgColor: r, $variantStyles: o }) => r ?? o.backgroundColor};
13
13
  gap: ${({ theme: r }) => r.spacing.xs};
14
14
  height: 1.5rem;
15
- `, u = i.div`
15
+ `, h = i.div`
16
16
  display: flex;
17
17
  align-items: center;
18
18
  justify-content: center;
@@ -23,14 +23,26 @@ const g = i.div`
23
23
  &:hover {
24
24
  opacity: 0.8;
25
25
  }
26
- `, b = ({ bgColor: r, color: o, label: s, weight: n, variant: c, onClose: a, children: d }) => {
27
- const e = p(c ?? "default");
28
- return /* @__PURE__ */ t.jsxs(g, { bgColor: r, $variantStyles: e, children: [
29
- s && /* @__PURE__ */ t.jsx(m, { variant: "span", color: o ?? e.color, weight: n, children: s }),
30
- d,
31
- a && /* @__PURE__ */ t.jsx(u, { onClick: a, $variantStyles: e, children: /* @__PURE__ */ t.jsx(l, { color: o ?? e.color, size: "0.75rem" }) })
26
+ svg {
27
+ width: ${({ theme: r }) => r.spacing.s} !important;
28
+ height: ${({ theme: r }) => r.spacing.s} !important;
29
+ color: ${({ $variantStyles: r }) => r.color} !important;
30
+ }
31
+ `, f = i.img`
32
+ width: 1.25rem;
33
+ height: 1.25rem;
34
+ border-radius: ${({ theme: r }) => r.borderRadius.circle};
35
+ object-fit: cover;
36
+ flex-shrink: 0;
37
+ `, v = ({ bgColor: r, color: o, label: s, weight: c, variant: d, onClose: a, children: l, image: n }) => {
38
+ const t = g(d ?? "default");
39
+ return /* @__PURE__ */ e.jsxs(u, { bgColor: r, $variantStyles: t, children: [
40
+ n && /* @__PURE__ */ e.jsx(f, { src: n, alt: "badge-image" }),
41
+ s && /* @__PURE__ */ e.jsx(m, { variant: "span", color: o ?? t.color, weight: c, children: s }),
42
+ l,
43
+ a && /* @__PURE__ */ e.jsx(h, { onClick: a, $variantStyles: t, children: /* @__PURE__ */ e.jsx(p, { color: o ?? t.color, size: "0.75rem" }) })
32
44
  ] });
33
45
  };
34
46
  export {
35
- b as default
47
+ v as default
36
48
  };
@@ -1,139 +1,147 @@
1
1
  import { j as r } from "../_virtual/jsx-runtime.js";
2
- import { useRef as g, useState as w, useCallback as _, useEffect as C } from "react";
3
- import { FaTimes as W, FaAngleDown as ee } from "../node_modules/react-icons/fa/index.js";
2
+ import { useRef as g, useState as b, useCallback as Y, useEffect as w } from "react";
3
+ import { FaTimes as _, FaAngleDown as ee } from "../node_modules/react-icons/fa/index.js";
4
4
  import { ImCheckboxChecked as re, ImCheckboxUnchecked as ne } from "../node_modules/react-icons/im/index.js";
5
5
  import { useTheme as te } from "styled-components";
6
6
  import le from "../hooks/useZIndex.js";
7
- import { useQaemaCoreTranslation as ae } from "../i18n/i18n.js";
8
- import { StyledDropDownContainer as se, StyledlabelContainer as oe, StyledDropDown as ce, StyledDropDownToggle as ue, StyledDropDownTitle as de, IconsContainer as ie, StyledDropDownMenu as fe, SearchContainer as he, StyledOptionsContainer as ve, StyledDropItem as z, SelectedTagsContainer as xe, SelectedTag as je } from "../styles/Dropdown.styles.js";
9
- import { HelperTextWrapper as pe } from "./PhoneInputField.js";
10
- import Se from "./SearchBar.js";
7
+ import { useQaemaCoreTranslation as oe } from "../i18n/i18n.js";
8
+ import { StyledDropDownContainer as ae, StyledlabelContainer as se, StyledDropDown as ce, StyledDropDownToggle as ie, StyledDropDownTitle as ue, IconsContainer as de, StyledDropDownMenu as fe, SearchContainer as pe, StyledOptionsContainer as he, StyledDropItem as L } from "../styles/Dropdown.styles.js";
9
+ import ve from "./Badge.js";
10
+ import { HelperTextWrapper as xe } from "./PhoneInputField.js";
11
+ import je from "./SearchBar.js";
11
12
  import me from "./Spinner.js";
12
- import F from "./Typography.js";
13
- const Le = (i) => {
13
+ import W from "./Typography.js";
14
+ const Le = (f) => {
14
15
  const {
15
- label: b,
16
- options: m,
16
+ label: C,
17
+ options: y,
17
18
  // value,
18
- placeholder: H = "Select Something",
19
- optional: M = !1,
20
- error: f = "",
21
- disabled: h = !1,
22
- selectIdentifier: D,
23
- keyIdentifier: v = "id",
24
- selectCallBack: j,
25
- showLeadIcon: N,
26
- icon: P,
27
- allowSearch: R,
28
- searchHandler: A,
29
- searchPlaceholder: B,
30
- onToggle: s,
31
- multiSelect: o = !1,
32
- isLoading: Q = !1,
33
- currentSelectedOptions: y = [],
34
- isInteractive: I = !1,
35
- endIcon: T
36
- } = i, c = g(null), p = g(null), u = te(), { t: k } = ae(), U = g(null), [a, x] = w(y), [d, O] = w(!1), [Z, q] = w(0), $ = P ?? /* @__PURE__ */ r.jsx(r.Fragment, {}), G = le("dropdown"), S = _(() => {
19
+ placeholder: z = "Select Something",
20
+ optional: P = !1,
21
+ error: s = "",
22
+ disabled: p = !1,
23
+ selectIdentifier: B,
24
+ keyIdentifier: h = "id",
25
+ selectCallBack: x,
26
+ showLeadIcon: F,
27
+ icon: H,
28
+ allowSearch: M,
29
+ searchHandler: N,
30
+ searchPlaceholder: R,
31
+ onToggle: c,
32
+ multiSelect: i = !1,
33
+ isLoading: A = !1,
34
+ currentSelectedOptions: S = [],
35
+ isInteractive: D = !1,
36
+ endIcon: I
37
+ } = f, u = g(null), j = g(null), o = te(), { t: k } = oe(), Q = g(null), [l, v] = b(S), [d, O] = b(!1), [U, Z] = b(0), T = H ?? /* @__PURE__ */ r.jsx(r.Fragment, {}), q = le("dropdown"), m = Y(() => {
37
38
  var e, n;
38
- (e = c == null ? void 0 : c.current) != null && e.offsetWidth && p.current && q(((n = c.current) == null ? void 0 : n.offsetWidth) / 16);
39
+ (e = u == null ? void 0 : u.current) != null && e.offsetWidth && j.current && Z(((n = u.current) == null ? void 0 : n.offsetWidth) / 16);
39
40
  }, []);
40
- C(() => (d && (S(), window.addEventListener("resize", S)), () => window.removeEventListener("resize", S)), [d, S]), C(() => {
41
- x(y);
42
- }, [y]);
43
- const J = (e, n, t, l = "default") => t ? u.colors.grey.n400 : e ? u.colors.state.error.n450 : n ? u.colors.primary.dark.n600 : l === "light-primary" ? u.colors.primary.purple.n450 : u.colors.grey.n300, E = (e) => a.some((n) => typeof n.value == "object" && typeof e.value == "object" ? n.value[v] === e.value[v] : n.value === e.value), K = (e) => {
44
- if (o) {
45
- const n = E(e);
41
+ w(() => (d && (m(), window.addEventListener("resize", m)), () => window.removeEventListener("resize", m)), [d, m]), w(() => {
42
+ v(S);
43
+ }, [S]);
44
+ const G = (e, n, t, a = "default") => t ? o.colors.grey.n400 : e ? o.colors.state.error.n450 : n ? o.colors.primary.dark.n600 : a === "light-primary" ? o.colors.primary.purple.n450 : o.colors.grey.n300, $ = (e) => l.some((n) => typeof n.value == "object" && typeof e.value == "object" ? n.value[h] === e.value[h] : n.value === e.value), J = (e) => {
45
+ if (i) {
46
+ const n = $(e);
46
47
  let t;
47
- n ? t = a.filter((l) => typeof l.value == "object" && typeof e.value == "object" ? l.value[v] !== e.value[v] : l.value !== e.value) : t = [...a, e], x(t), j(t.map((l) => l.value));
48
+ n ? t = l.filter((a) => typeof a.value == "object" && typeof e.value == "object" ? a.value[h] !== e.value[h] : a.value !== e.value) : t = [...l, e], v(t), x(t.map((a) => a.value));
48
49
  } else
49
- x([e]), j(e.value);
50
- }, V = (e) => {
51
- const n = a.filter((t) => typeof t.value == "object" && typeof e.value == "object" ? t.value[v] !== e.value[v] : t.value !== e.value);
52
- x(n), j(n.map((t) => t.value));
53
- }, X = () => {
50
+ v([e]), x(e.value);
51
+ }, K = (e) => {
52
+ const n = l.filter((t) => typeof t.value == "object" && typeof e.value == "object" ? t.value[h] !== e.value[h] : t.value !== e.value);
53
+ v(n), x(n.map((t) => t.value));
54
+ }, V = () => {
54
55
  var e;
55
- return a.length === 0 ? H : o ? `${a.length} ${k("SELECTED")}` : (e = a[0]) == null ? void 0 : e.label;
56
+ return l.length === 0 ? z : i ? `${l.length} ${k("SELECTED")}` : (e = l[0]) == null ? void 0 : e.label;
56
57
  };
57
- C(() => {
58
+ w(() => {
58
59
  const e = (n) => {
59
- p.current && c.current && !p.current.contains(n.target) && !c.current.contains(n.target) && (O(!1), s == null || s(!1));
60
+ j.current && u.current && !j.current.contains(n.target) && !u.current.contains(n.target) && (O(!1), c == null || c(!1));
60
61
  };
61
62
  return d && document.addEventListener("mousedown", e), () => {
62
63
  document.removeEventListener("mousedown", e);
63
64
  };
64
- }, [d, s]);
65
- const Y = () => I ? null : /* @__PURE__ */ r.jsx(pe, { error: f || "", children: f && f });
66
- return /* @__PURE__ */ r.jsxs(se, { children: [
67
- b && /* @__PURE__ */ r.jsxs(oe, { children: [
68
- /* @__PURE__ */ r.jsx("label", { children: b }),
69
- M && /* @__PURE__ */ r.jsx("span", { children: k("OPTIONAL") })
65
+ }, [d, c]);
66
+ const X = () => D ? null : /* @__PURE__ */ r.jsx(xe, { error: s || "", children: s && s });
67
+ return /* @__PURE__ */ r.jsxs(ae, { children: [
68
+ C && /* @__PURE__ */ r.jsxs(se, { children: [
69
+ /* @__PURE__ */ r.jsx("label", { children: C }),
70
+ P && /* @__PURE__ */ r.jsx("span", { children: k("OPTIONAL") })
70
71
  ] }),
71
72
  /* @__PURE__ */ r.jsxs(
72
73
  ce,
73
74
  {
74
75
  show: d,
75
76
  onToggle: () => {
76
- s == null || s(!d), O((e) => !e);
77
+ c == null || c(!d), O((e) => !e);
77
78
  },
78
79
  placement: "bottom-start",
79
- autoClose: o ? "outside" : !0,
80
+ autoClose: i ? "outside" : !0,
80
81
  children: [
81
- /* @__PURE__ */ r.jsx(ue, { disabled: h, ref: c, $valid: !f, $variant: i.variant || "default", children: /* @__PURE__ */ r.jsx(de, { $valid: !f, $isInteractive: I, $hasDyncWidth: !h, children: /* @__PURE__ */ r.jsxs("div", { className: "title-container", children: [
82
+ /* @__PURE__ */ r.jsx(ie, { disabled: p, ref: u, $valid: !s, $variant: f.variant || "default", children: /* @__PURE__ */ r.jsx(ue, { $valid: !s, $isInteractive: D, $hasDyncWidth: !p, children: /* @__PURE__ */ r.jsxs("div", { className: "title-container", children: [
82
83
  /* @__PURE__ */ r.jsxs("div", { className: "heading-container", children: [
83
- N && typeof $ == "function" && /* @__PURE__ */ r.jsx($, {}),
84
- /* @__PURE__ */ r.jsx(
85
- F,
84
+ F && typeof T == "function" && /* @__PURE__ */ r.jsx(T, {}),
85
+ i && l.length > 0 ? /* @__PURE__ */ r.jsx(
86
+ "div",
87
+ {
88
+ style: { display: "flex", gap: o.spacing.sm, alignItems: "center", flexWrap: "wrap" },
89
+ onClick: (e) => e.stopPropagation(),
90
+ children: l.map((e) => /* @__PURE__ */ r.jsx(ve, { variant: "black", label: e.label, onClose: () => K(e) }, e.label))
91
+ }
92
+ ) : /* @__PURE__ */ r.jsx(
93
+ W,
86
94
  {
87
95
  component: "span",
88
96
  variant: "mdText",
89
- color: J(f, a.length > 0, h, i.variant || "default"),
90
- children: X()
97
+ color: G(s, l.length > 0, p, f.variant || "default"),
98
+ children: V()
91
99
  }
92
100
  )
93
101
  ] }),
94
- (T || !h) && /* @__PURE__ */ r.jsxs(ie, { children: [
95
- T,
96
- !o && a.length > 0 && !h && /* @__PURE__ */ r.jsx(
97
- W,
102
+ (I || !p) && /* @__PURE__ */ r.jsxs(de, { children: [
103
+ I,
104
+ !i && l.length > 0 && !p && /* @__PURE__ */ r.jsx(
105
+ _,
98
106
  {
99
107
  style: { cursor: "pointer", marginLeft: "0.5rem" },
100
108
  onClick: (e) => {
101
- e.stopPropagation(), x([]), j(o ? [] : "");
109
+ e.stopPropagation(), v([]), x(i ? [] : "");
102
110
  }
103
111
  }
104
112
  ),
105
- !h && /* @__PURE__ */ r.jsx(ee, {})
113
+ !p && /* @__PURE__ */ r.jsx(ee, { color: s ? o.colors.state.error.n450 : o.colors.grey.n300 })
106
114
  ] })
107
115
  ] }) }) }),
108
- d && /* @__PURE__ */ r.jsxs(fe, { ref: p, $menuWidth: Z, $zIndex: G, children: [
109
- R && /* @__PURE__ */ r.jsx(he, { children: /* @__PURE__ */ r.jsx(Se, { placeholder: B, onSearch: A }) }),
116
+ d && /* @__PURE__ */ r.jsxs(fe, { ref: j, $menuWidth: U, $zIndex: q, children: [
117
+ M && /* @__PURE__ */ r.jsx(pe, { children: /* @__PURE__ */ r.jsx(je, { placeholder: R, onSearch: N }) }),
110
118
  /* @__PURE__ */ r.jsxs(
111
- ve,
119
+ he,
112
120
  {
113
- ref: U,
121
+ ref: Q,
114
122
  onScroll: (e) => {
115
123
  var n;
116
- (n = i.onScroll) == null || n.call(i, e);
124
+ (n = f.onScroll) == null || n.call(f, e);
117
125
  },
118
126
  children: [
119
- m == null ? void 0 : m.map((e) => {
120
- var t, l, L;
121
- const n = E(e);
127
+ y == null ? void 0 : y.map((e) => {
128
+ var t, a, E;
129
+ const n = $(e);
122
130
  return /* @__PURE__ */ r.jsxs(
123
- z,
131
+ L,
124
132
  {
125
- onClick: () => K(e),
133
+ onClick: () => J(e),
126
134
  $selected: n,
127
135
  children: [
128
- o && (n ? /* @__PURE__ */ r.jsx(re, { color: u.colors.primary.purple.n500 }) : /* @__PURE__ */ r.jsx(ne, { color: u.colors.primary.purple.n450 })),
136
+ i && (n ? /* @__PURE__ */ r.jsx(re, { color: o.colors.primary.purple.n500 }) : /* @__PURE__ */ r.jsx(ne, { color: o.colors.primary.purple.n450 })),
129
137
  " ",
130
- /* @__PURE__ */ r.jsx(F, { variant: "smText", children: e == null ? void 0 : e.label })
138
+ /* @__PURE__ */ r.jsx(W, { variant: "smText", children: e == null ? void 0 : e.label })
131
139
  ]
132
140
  },
133
- typeof (e == null ? void 0 : e.value) == "object" && (e == null ? void 0 : e.value) !== null ? (l = (t = e == null ? void 0 : e.value) == null ? void 0 : t[D]) == null ? void 0 : l.toString() : (L = e == null ? void 0 : e.value) == null ? void 0 : L.toString()
141
+ typeof (e == null ? void 0 : e.value) == "object" && (e == null ? void 0 : e.value) !== null ? (a = (t = e == null ? void 0 : e.value) == null ? void 0 : t[B]) == null ? void 0 : a.toString() : (E = e == null ? void 0 : e.value) == null ? void 0 : E.toString()
134
142
  );
135
143
  }),
136
- Q && /* @__PURE__ */ r.jsx(z, { $selected: !1, children: /* @__PURE__ */ r.jsx(me, {}) })
144
+ A && /* @__PURE__ */ r.jsx(L, { $selected: !1, children: /* @__PURE__ */ r.jsx(me, {}) })
137
145
  ]
138
146
  }
139
147
  )
@@ -141,20 +149,7 @@ const Le = (i) => {
141
149
  ]
142
150
  }
143
151
  ),
144
- o && a.length > 0 && /* @__PURE__ */ r.jsx(xe, { children: a.map((e) => {
145
- var n, t, l;
146
- return /* @__PURE__ */ r.jsxs(
147
- je,
148
- {
149
- children: [
150
- e.label,
151
- /* @__PURE__ */ r.jsx(W, { onClick: () => V(e) })
152
- ]
153
- },
154
- typeof (e == null ? void 0 : e.value) == "object" ? (t = (n = e == null ? void 0 : e.value) == null ? void 0 : n[D]) == null ? void 0 : t.toString() : (l = e == null ? void 0 : e.value) == null ? void 0 : l.toString()
155
- );
156
- }) }),
157
- Y()
152
+ X()
158
153
  ] });
159
154
  };
160
155
  export {
@@ -17,6 +17,13 @@ export type NavItemType = {
17
17
  onClick?: (value: unknown) => void;
18
18
  linkComponent?: React.ElementType;
19
19
  active?: boolean;
20
+ badge?: {
21
+ label?: string;
22
+ variant?: string;
23
+ color?: string;
24
+ bgColor?: string;
25
+ image?: string;
26
+ };
20
27
  };
21
28
  export type NavItemProps = {
22
29
  item: NavItemType;
@@ -1,9 +1,10 @@
1
1
  import { j as r } from "../_virtual/jsx-runtime.js";
2
- import s, { useTheme as g, css as c } from "styled-components";
3
- import { useNavItemVariant as u } from "../hooks/useNavItemVariant.js";
4
- import h from "./Link.js";
5
- import v from "./Typography.js";
6
- const b = {
2
+ import a, { useTheme as h, css as c } from "styled-components";
3
+ import { useNavItemVariant as v } from "../hooks/useNavItemVariant.js";
4
+ import x from "./Badge.js";
5
+ import u from "./Link.js";
6
+ import $ from "./Typography.js";
7
+ const f = {
7
8
  bullet: c`
8
9
  border-radius: ${({ theme: o }) => o.borderRadius.circle};
9
10
  background-color: ${({ theme: o }) => o.colors.secondary.pink.n450};
@@ -13,18 +14,16 @@ const b = {
13
14
  border-radius: ${({ theme: o }) => o.borderRadius.sm};
14
15
  background-color: ${({ theme: o }) => o.colors.primary.purple.n450};
15
16
  `
16
- }, x = s.div`
17
+ }, y = a.div`
17
18
  display: flex;
18
19
  flex-direction: row;
19
20
  align-items: center;
20
21
  gap: ${({ theme: o }) => o.spacing.xs};
21
- border: none;
22
22
 
23
- background-color: transparent;
24
- cursor: pointer;
25
23
  svg {
26
24
  width: 1.5rem;
27
25
  height: 1.5rem;
26
+ flex-shrink: 0;
28
27
  }
29
28
 
30
29
  p {
@@ -32,7 +31,11 @@ const b = {
32
31
  margin: 0;
33
32
  white-space: nowrap;
34
33
  }
35
- `, $ = s.div`
34
+ `, p = a.div`
35
+ display: flex;
36
+ align-items: center;
37
+ gap: ${({ theme: o }) => o.spacing.xs};
38
+ `, C = a.div`
36
39
  display: flex;
37
40
  flex-direction: row;
38
41
  justify-content: space-between;
@@ -53,48 +56,73 @@ const b = {
53
56
  border-radius: ${o.theme.borderRadius.sm};
54
57
  background-color: ${o.$activeBgColor};
55
58
  `}
56
- `, y = s.div`
59
+ `, j = a.div`
57
60
  width: 1.5rem;
58
61
  height: 1.5rem;
59
62
  text-align: center;
60
63
  color: ${({ theme: o }) => o.colors.grey.n50};
61
64
  font-weight: ${({ theme: o }) => o.typography.weights.semiBold};
62
- ${({ $variant: o }) => b[o]}
63
- `, B = ({ item: o }) => {
64
- const e = o == null ? void 0 : o.icon, n = g(), { color: t, bgColor: p, activeBgColor: a, activeColor: l } = u(o == null ? void 0 : o.variant), d = /* @__PURE__ */ r.jsxs(x, { children: [
65
- /* @__PURE__ */ r.jsxs("div", { style: { display: "flex", alignItems: "center", gap: n.spacing.xs }, children: [
66
- e && /* @__PURE__ */ r.jsx(e, { color: o.active ? l : t, size: 20 }),
67
- /* @__PURE__ */ r.jsx(v, { component: "p", variant: "smText", color: o.active ? l : t, children: o == null ? void 0 : o.title })
68
- ] }),
69
- (o == null ? void 0 : o.count) && /* @__PURE__ */ r.jsx(y, { $variant: (o == null ? void 0 : o.notificationVariant) ?? "badge", children: /* @__PURE__ */ r.jsx("span", { children: o.count }) })
70
- ] }), i = {
65
+ ${({ $variant: o }) => f[o]}
66
+ `, R = ({ item: o }) => {
67
+ const e = o == null ? void 0 : o.icon, n = h(), { color: l, bgColor: b, activeBgColor: s, activeColor: t } = v(o == null ? void 0 : o.variant), d = /* @__PURE__ */ r.jsxs(y, { children: [
68
+ e && /* @__PURE__ */ r.jsx(e, { color: o.active ? t : l, size: 20 }),
69
+ /* @__PURE__ */ r.jsx($, { component: "p", variant: "smText", color: o.active ? t : l, children: o == null ? void 0 : o.title })
70
+ ] }), i = o != null && o.badge ? /* @__PURE__ */ r.jsx(
71
+ x,
72
+ {
73
+ label: o.badge.label,
74
+ variant: o.badge.variant,
75
+ color: o.badge.color,
76
+ bgColor: o.badge.bgColor,
77
+ image: o.badge.image
78
+ }
79
+ ) : o != null && o.count ? /* @__PURE__ */ r.jsx(j, { $variant: (o == null ? void 0 : o.notificationVariant) ?? "badge", children: /* @__PURE__ */ r.jsx("span", { children: o.count }) }) : null, g = {
71
80
  padding: `${n.spacing.xs} ${n.spacing.sm}`,
72
81
  width: "100%",
73
- hoverBgColor: a,
74
- activeBgColor: a
82
+ hoverBgColor: s,
83
+ activeBgColor: s
75
84
  };
76
85
  return /* @__PURE__ */ r.jsx(
77
- $,
86
+ C,
78
87
  {
79
88
  $variant: (o == null ? void 0 : o.variant) ?? "normal",
80
- $bgColor: p,
81
- $activeBgColor: a ?? "",
89
+ $bgColor: b,
90
+ $activeBgColor: s ?? "",
82
91
  $active: !!(o != null && o.active),
83
- children: (o == null ? void 0 : o.component) === "link" && o.path ? /* @__PURE__ */ r.jsx(h, { to: o.path, state: o.state, component: o.linkComponent, ...i, children: d }) : /* @__PURE__ */ r.jsx(
92
+ children: (o == null ? void 0 : o.component) === "link" && o.path ? /* @__PURE__ */ r.jsx(u, { to: o.path, state: o.state, component: o.linkComponent, ...g, children: /* @__PURE__ */ r.jsxs(
93
+ "div",
94
+ {
95
+ style: {
96
+ display: "flex",
97
+ justifyContent: "space-between",
98
+ alignItems: "center",
99
+ width: "100%",
100
+ gap: n.spacing.sm
101
+ },
102
+ children: [
103
+ d,
104
+ /* @__PURE__ */ r.jsx(p, { children: i })
105
+ ]
106
+ }
107
+ ) }) : /* @__PURE__ */ r.jsxs(
84
108
  "button",
85
109
  {
86
110
  onClick: o.onClick,
87
111
  style: {
88
- ...i,
112
+ ...g,
89
113
  border: "none",
90
114
  background: "transparent",
91
115
  cursor: "pointer",
92
116
  display: "flex",
93
117
  justifyContent: "space-between",
94
118
  alignItems: "center",
95
- width: "100%"
119
+ width: "100%",
120
+ gap: n.spacing.sm
96
121
  },
97
- children: d
122
+ children: [
123
+ d,
124
+ /* @__PURE__ */ r.jsx(p, { children: i })
125
+ ]
98
126
  }
99
127
  )
100
128
  },
@@ -102,5 +130,5 @@ const b = {
102
130
  );
103
131
  };
104
132
  export {
105
- B as default
133
+ R as default
106
134
  };
@@ -1,6 +1,6 @@
1
1
  import { useMemo as a } from "react";
2
2
  import { useTheme as p } from "styled-components";
3
- const y = (n) => {
3
+ const u = (n) => {
4
4
  const r = p(), e = a(() => {
5
5
  const o = (l, s, c) => ({
6
6
  backgroundColor: l,
@@ -15,11 +15,11 @@ const y = (n) => {
15
15
  pink: o(r.colors.secondary.pink.n100, r.colors.secondary.pink.n450),
16
16
  yellow: o(r.colors.secondary.orange.n100, r.colors.secondary.orange.n500),
17
17
  green: o(r.colors.primary.green.n100, r.colors.primary.green.n500),
18
- black: o(r.colors.grey.n100, r.colors.grey.n650)
18
+ black: o(r.colors.grey.n100, r.colors.grey.n650, r.colors.grey.n200)
19
19
  };
20
20
  }, [r]);
21
21
  return e[n] ?? e.default;
22
22
  };
23
23
  export {
24
- y as default
24
+ u as default
25
25
  };
@@ -106,7 +106,7 @@ const x = r.div`
106
106
  align-items: center;
107
107
  gap: ${({ theme: o }) => `${o.spacing.s}`};
108
108
  width: ${({ $hasDyncWidth: o }) => o ? "calc(100% - 2.688rem)" : "100%"};
109
- span {
109
+ > span {
110
110
  display: block;
111
111
  width: 100%;
112
112
  margin: 0px;
@@ -115,7 +115,7 @@ const x = r.div`
115
115
  text-overflow: ellipsis;
116
116
  text-align: start;
117
117
  }
118
- svg {
118
+ > svg {
119
119
  width: 1.5rem;
120
120
  height: 1.5rem;
121
121
  color: ${({ theme: o, $valid: e }) => `${e ? o.colors.grey.n300 : o.colors.state.error.n450}`} !important;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qaema-ui",
3
3
  "private": false,
4
- "version": "0.0.55",
4
+ "version": "0.0.57",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"