qaema-ui 0.0.56 → 0.0.58

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.
@@ -1,5 +1,4 @@
1
- import { __require as r } from "../node_modules/recharts/node_modules/react-is/index.js";
2
- var a = r();
1
+ var e = { exports: {} };
3
2
  export {
4
- a as r
3
+ e as __module
5
4
  };
@@ -1,4 +1,5 @@
1
- var e = { exports: {} };
1
+ import { __require as r } from "../node_modules/recharts/node_modules/react-is/index.js";
2
+ var a = r();
2
3
  export {
3
- e as __module
4
+ a as r
4
5
  };
@@ -1,8 +1,8 @@
1
1
  import { j as e } from "../_virtual/jsx-runtime.js";
2
2
  import { IoClose as p } from "../node_modules/react-icons/io5/index.js";
3
3
  import i from "styled-components";
4
- import m from "../hooks/useBadgeVariant.js";
5
- import g from "./Typography.js";
4
+ import g from "../hooks/useBadgeVariant.js";
5
+ import m from "./Typography.js";
6
6
  const u = i.div`
7
7
  display: flex;
8
8
  align-items: center;
@@ -12,7 +12,7 @@ const u = 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
- `, f = i.div`
15
+ `, h = i.div`
16
16
  display: flex;
17
17
  align-items: center;
18
18
  justify-content: center;
@@ -23,19 +23,24 @@ const u = i.div`
23
23
  &:hover {
24
24
  opacity: 0.8;
25
25
  }
26
- `, x = i.img`
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`
27
32
  width: 1.25rem;
28
33
  height: 1.25rem;
29
34
  border-radius: ${({ theme: r }) => r.borderRadius.circle};
30
35
  object-fit: cover;
31
36
  flex-shrink: 0;
32
- `, v = ({ bgColor: r, color: o, label: s, weight: n, variant: d, onClose: a, children: l, image: c }) => {
33
- const t = m(d ?? "default");
37
+ `, v = ({ bgColor: r, color: o, label: s, weight: c, variant: d, onClose: a, children: l, image: n }) => {
38
+ const t = g(d ?? "default");
34
39
  return /* @__PURE__ */ e.jsxs(u, { bgColor: r, $variantStyles: t, children: [
35
- c && /* @__PURE__ */ e.jsx(x, { src: c, alt: "badge-image" }),
36
- s && /* @__PURE__ */ e.jsx(g, { variant: "span", color: o ?? t.color, weight: n, children: s }),
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 }),
37
42
  l,
38
- a && /* @__PURE__ */ e.jsx(f, { onClick: a, $variantStyles: t, children: /* @__PURE__ */ e.jsx(p, { color: o ?? t.color, size: "0.75rem" }) })
43
+ a && /* @__PURE__ */ e.jsx(h, { onClick: a, $variantStyles: t, children: /* @__PURE__ */ e.jsx(p, { color: o ?? t.color, size: "0.75rem" }) })
39
44
  ] });
40
45
  };
41
46
  export {
@@ -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 {
@@ -10,6 +10,7 @@ export type RequestCardProps = {
10
10
  variant?: RequestCardVariant;
11
11
  image?: React.ReactNode;
12
12
  title: React.ReactNode;
13
+ titleBadge?: BadgeProps;
13
14
  subtitle?: React.ReactNode;
14
15
  trackingLabel?: React.ReactNode;
15
16
  progress?: number;
@@ -1,31 +1,31 @@
1
1
  import { j as n } from "../_virtual/jsx-runtime.js";
2
2
  import "react";
3
- import s, { useTheme as F } from "styled-components";
4
- import A from "./Badge.js";
3
+ import e, { useTheme as H } from "styled-components";
4
+ import $ from "./Badge.js";
5
5
  import p from "./Button.js";
6
- import { useQaemaCoreTranslation as H } from "../i18n/i18n.js";
7
- import P from "../assets/svg/Riyal.svg.js";
8
- import { FeatureList as q, FeatureRow as W, Bullet as E } from "./RequestSummaryCard.js";
6
+ import { useQaemaCoreTranslation as P } from "../i18n/i18n.js";
7
+ import q from "../assets/svg/Riyal.svg.js";
8
+ import { FeatureList as W, FeatureRow as E, Bullet as M } from "./RequestSummaryCard.js";
9
9
  import h from "./Typography.js";
10
- const M = s.div`
10
+ const V = e.div`
11
11
  display: flex;
12
12
  flex-direction: column;
13
13
  justify-content: space-between;
14
- height: ${({ image: e, inModal: i }) => e ? i ? "65%" : "unset" : "100%"};
15
- `, V = s.div`
14
+ height: ${({ image: i, inModal: s }) => i ? s ? "65%" : "unset" : "100%"};
15
+ `, D = e.div`
16
16
  min-width: 9.0625rem;
17
17
  display: flex;
18
- aspect-ratio: ${({ $inModal: e }) => e ? "23/9" : "11/9"};
19
- background: ${({ $background: e, theme: i }) => e ?? `linear-gradient(
18
+ aspect-ratio: ${({ $inModal: i }) => i ? "23/9" : "11/9"};
19
+ background: ${({ $background: i, theme: s }) => i ?? `linear-gradient(
20
20
  180deg,
21
- ${i.colors.primary.purple.n100} 0%,
22
- ${i.colors.primary.purple.n300} 100%
21
+ ${s.colors.primary.purple.n100} 0%,
22
+ ${s.colors.primary.purple.n300} 100%
23
23
  )`};
24
- border-radius: ${({ theme: e }) => e.borderRadius.md};
24
+ border-radius: ${({ theme: i }) => i.borderRadius.md};
25
25
 
26
26
  place-items: center;
27
27
  overflow: hidden;
28
- height: ${({ $inModal: e }) => e ? "35%" : "unset"};
28
+ height: ${({ $inModal: i }) => i ? "35%" : "unset"};
29
29
  img,
30
30
  svg {
31
31
  width: 100%;
@@ -33,99 +33,104 @@ const M = s.div`
33
33
  object-fit: cover;
34
34
  display: block;
35
35
  }
36
- `, D = s.div`
36
+ `, I = e.div`
37
37
  display: grid;
38
38
  grid-template-columns: '1fr';
39
- gap: ${({ theme: e }) => e.spacing.xs};
40
- margin-top: ${({ theme: e }) => e.spacing.xxs};
39
+ gap: ${({ theme: i }) => i.spacing.xs};
40
+ margin-top: ${({ theme: i }) => i.spacing.xxs};
41
41
  justify-content: 'stretch';
42
42
  align-items: center;
43
- `, I = s(p)`
43
+ `, N = e(p)`
44
44
  min-width: 9.3125rem;
45
45
  min-height: 2rem;
46
- border-radius: ${({ theme: e }) => e.borderRadius.sm};
47
- box-shadow: ${({ theme: e }) => e.boxShadow.s3};
48
- `, N = s.h3`
46
+ border-radius: ${({ theme: i }) => i.borderRadius.sm};
47
+ box-shadow: ${({ theme: i }) => i.boxShadow.s3};
48
+ `, Q = e.div`
49
+ display: flex;
50
+ align-items: center;
51
+ gap: ${({ theme: i }) => i.spacing.xs};
52
+ margin-bottom: ${({ theme: i }) => i.spacing.xxs};
53
+ `, X = e.h3`
49
54
  margin: 0;
50
- font-family: ${({ theme: e }) => (e == null ? void 0 : e.dir) === "rtl" ? e.fonts.arabic : e.fonts.english};
51
- font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
52
- font-size: ${({ theme: e }) => {
53
- var i;
54
- return (i = e.typography.sizes) == null ? void 0 : i.s4;
55
+ font-family: ${({ theme: i }) => (i == null ? void 0 : i.dir) === "rtl" ? i.fonts.arabic : i.fonts.english};
56
+ font-weight: ${({ theme: i }) => i.typography.weights.semiBold};
57
+ font-size: ${({ theme: i }) => {
58
+ var s;
59
+ return (s = i.typography.sizes) == null ? void 0 : s.s4;
55
60
  }};
56
- line-height: ${({ theme: e }) => e.typography.lineHeights.m};
61
+ line-height: ${({ theme: i }) => i.typography.lineHeights.m};
57
62
  letter-spacing: -0.25px;
58
- color: ${({ theme: e }) => e.colors.grey.n800};
59
- `, Q = s.p`
63
+ color: ${({ theme: i }) => i.colors.grey.n800};
64
+ `, G = e.p`
60
65
  margin: 0;
61
- color: ${({ theme: e }) => e.colors.grey.n400};
62
- font-size: ${({ theme: e }) => {
63
- var i;
64
- return (i = e.typography.sizes) == null ? void 0 : i.s3;
66
+ color: ${({ theme: i }) => i.colors.grey.n400};
67
+ font-size: ${({ theme: i }) => {
68
+ var s;
69
+ return (s = i.typography.sizes) == null ? void 0 : s.s3;
65
70
  }};
66
- line-height: ${({ theme: e }) => e.typography.lineHeights.s};
67
- `, X = s.div`
71
+ line-height: ${({ theme: i }) => i.typography.lineHeights.s};
72
+ `, J = e.div`
68
73
  display: flex;
69
74
  flex-wrap: wrap;
70
- gap: ${({ theme: e }) => e.spacing.s};
71
- margin-top: ${({ theme: e }) => e.spacing.s};
72
- margin-bottom: ${({ theme: e }) => e.spacing.s};
73
- `, G = s.div`
75
+ gap: ${({ theme: i }) => i.spacing.s};
76
+ margin-top: ${({ theme: i }) => i.spacing.s};
77
+ margin-bottom: ${({ theme: i }) => i.spacing.s};
78
+ `, K = e.div`
74
79
  display: flex;
75
80
  flex-direction: column;
76
- gap: ${({ theme: e }) => e.spacing.xs};
77
- `, J = s.div`
78
- font-family: ${({ theme: e }) => (e == null ? void 0 : e.dir) === "rtl" ? e.fonts.arabic : e.fonts.english};
79
- font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
80
- font-size: ${({ theme: e }) => {
81
- var i;
82
- return (i = e.typography.sizes) == null ? void 0 : i.s2;
81
+ gap: ${({ theme: i }) => i.spacing.xs};
82
+ `, L = e.div`
83
+ font-family: ${({ theme: i }) => (i == null ? void 0 : i.dir) === "rtl" ? i.fonts.arabic : i.fonts.english};
84
+ font-weight: ${({ theme: i }) => i.typography.weights.semiBold};
85
+ font-size: ${({ theme: i }) => {
86
+ var s;
87
+ return (s = i.typography.sizes) == null ? void 0 : s.s2;
83
88
  }};
84
- line-height: ${({ theme: e }) => e.typography.lineHeights.xs};
89
+ line-height: ${({ theme: i }) => i.typography.lineHeights.xs};
85
90
  letter-spacing: 0;
86
91
  vertical-align: middle;
87
- color: ${({ theme: e }) => e.colors.grey.n650};
88
- `, K = s.div`
89
- width: ${({ $fixed: e }) => e ? "335px" : "100%"};
92
+ color: ${({ theme: i }) => i.colors.grey.n650};
93
+ `, O = e.div`
94
+ width: ${({ $fixed: i }) => i ? "335px" : "100%"};
90
95
  min-width: 11.1875rem;
91
96
  height: 100%;
92
- border-radius: ${({ theme: e }) => e.borderRadius.md};
93
- padding: ${({ theme: e }) => e.spacing.sm};
97
+ border-radius: ${({ theme: i }) => i.borderRadius.md};
98
+ padding: ${({ theme: i }) => i.spacing.sm};
94
99
 
95
- background: ${({ theme: e }) => e.colors.grey.n50};
96
- box-shadow: ${({ theme: e }) => e.boxShadow.s3};
100
+ background: ${({ theme: i }) => i.colors.grey.n50};
101
+ box-shadow: ${({ theme: i }) => i.boxShadow.s3};
97
102
  border: none;
98
103
  display: flex;
99
104
  flex-direction: column;
100
- gap: ${({ theme: e }) => e.spacing.s};
101
- `, L = s.div`
105
+ gap: ${({ theme: i }) => i.spacing.s};
106
+ `, U = e.div`
102
107
  position: relative;
103
108
  width: 100%;
104
109
  height: 0.5rem;
105
- background: ${({ theme: e }) => e.colors.grey.n100};
110
+ background: ${({ theme: i }) => i.colors.grey.n100};
106
111
  border-radius: 0;
107
112
  overflow: hidden;
108
113
  &::after {
109
114
  content: '';
110
115
  position: absolute;
111
116
  inset: 0;
112
- width: ${({ $value: e }) => Math.min(Math.max(e, 0), 100)}%;
113
- background: ${({ $color: e }) => e};
117
+ width: ${({ $value: i }) => Math.min(Math.max(i, 0), 100)}%;
118
+ background: ${({ $color: i }) => i};
114
119
  transition: width 250ms ease;
115
120
  border-radius: 0;
116
121
  }
117
- `, O = s.span`
118
- font-family: ${({ theme: e }) => (e == null ? void 0 : e.dir) === "rtl" ? e.fonts.arabic : e.fonts.english};
119
- font-weight: ${({ theme: e }) => e.typography.weights.regular};
120
- font-size: ${({ theme: e }) => {
121
- var i;
122
- return (i = e.typography.sizes) == null ? void 0 : i.s2;
122
+ `, Y = e.span`
123
+ font-family: ${({ theme: i }) => (i == null ? void 0 : i.dir) === "rtl" ? i.fonts.arabic : i.fonts.english};
124
+ font-weight: ${({ theme: i }) => i.typography.weights.regular};
125
+ font-size: ${({ theme: i }) => {
126
+ var s;
127
+ return (s = i.typography.sizes) == null ? void 0 : s.s2;
123
128
  }};
124
- line-height: ${({ theme: e }) => e.typography.lineHeights.xs};
129
+ line-height: ${({ theme: i }) => i.typography.lineHeights.xs};
125
130
  letter-spacing: 0;
126
- color: ${({ theme: e }) => e.colors.grey.n400};
127
- `, U = (e) => {
128
- switch (e) {
131
+ color: ${({ theme: i }) => i.colors.grey.n400};
132
+ `, Z = (i) => {
133
+ switch (i) {
129
134
  case "accepted":
130
135
  return { bar: "#1DBA63" };
131
136
  case "rejected":
@@ -135,7 +140,7 @@ const M = s.div`
135
140
  default:
136
141
  return { bar: "#7259ff" };
137
142
  }
138
- }, Y = s.div`
143
+ }, _ = e.div`
139
144
  display: flex;
140
145
  flex-direction: column;
141
146
  justify-content: space-between;
@@ -146,63 +151,67 @@ const M = s.div`
146
151
  @media (max-width: 375px) {
147
152
  align-items: center;
148
153
  }
149
- `, Z = s.div`
154
+ `, C = e.div`
150
155
  display: flex;
151
156
  align-items: baseline;
152
- color: ${({ theme: e }) => e.colors.grey.n650};
157
+ color: ${({ theme: i }) => i.colors.grey.n650};
153
158
 
154
159
  span {
155
- color: ${({ theme: e }) => e.colors.grey.n650};
160
+ color: ${({ theme: i }) => i.colors.grey.n650};
156
161
  }
157
162
 
158
163
  @media (max-width: 375px) {
159
164
  text-align: center;
160
165
  }
161
- `, _ = s.div`
166
+ `, ii = e.div`
162
167
  display: flex;
163
168
  align-items: center;
164
- `, C = s.img`
165
- width: ${({ $width: e = "1rem" }) => e};
169
+ `, ni = e.img`
170
+ width: ${({ $width: i = "1rem" }) => i};
166
171
  height: 1rem;
167
172
  object-fit: contain;
168
173
  flex-shrink: 0;
169
174
  margin-right: 2px;
170
- `, ce = ({
171
- variant: e = "hidden",
172
- image: i,
173
- title: f,
174
- subtitle: x,
175
- trackingLabel: $ = "Request Tracking",
176
- progress: y = 0,
177
- statusText: j,
175
+ `, gi = ({
176
+ variant: i = "hidden",
177
+ image: s,
178
+ title: y,
179
+ titleBadge: x,
180
+ subtitle: m,
181
+ trackingLabel: j = "Request Tracking",
182
+ progress: b = 0,
183
+ statusText: w,
178
184
  primaryCta: t,
179
185
  secondaryCta: l,
180
- className: b,
181
- style: w,
186
+ className: v,
187
+ style: k,
182
188
  features: a,
183
- featuresTitle: k,
189
+ featuresTitle: z,
184
190
  badgeList: c,
185
191
  price: o,
186
192
  inModal: u = !1,
187
- background: v
193
+ background: R
188
194
  }) => {
189
- const { t: r } = H(), z = U(e), B = e !== "hidden", R = r(e === "accepted" ? "accepted" : e === "rejected" ? "rejected" : "submitted"), m = e === "hidden" ? "primary" : e === "accepted" || e === "rejected" ? "light-primary" : "outline-primary", T = e === "rejected", S = F();
190
- return /* @__PURE__ */ n.jsxs(K, { className: b, style: w, children: [
191
- i ? /* @__PURE__ */ n.jsx(V, { $inModal: u, $background: v, children: i }) : null,
192
- /* @__PURE__ */ n.jsxs(M, { image: i, inModal: u, children: [
193
- /* @__PURE__ */ n.jsx(N, { children: f }),
194
- x ? /* @__PURE__ */ n.jsx(Q, { children: x }) : null,
195
- c && c.length > 0 && /* @__PURE__ */ n.jsx(X, { children: c.map((d, g) => /* @__PURE__ */ n.jsx(A, { ...d }, g)) }),
195
+ const { t: r } = P(), T = Z(i), B = i !== "hidden", S = r(i === "accepted" ? "accepted" : i === "rejected" ? "rejected" : "submitted"), f = i === "hidden" ? "primary" : i === "accepted" || i === "rejected" ? "light-primary" : "outline-primary", F = i === "rejected", A = H();
196
+ return /* @__PURE__ */ n.jsxs(O, { className: v, style: k, children: [
197
+ s ? /* @__PURE__ */ n.jsx(D, { $inModal: u, $background: R, children: s }) : null,
198
+ /* @__PURE__ */ n.jsxs(V, { image: s, inModal: u, children: [
199
+ /* @__PURE__ */ n.jsxs(Q, { children: [
200
+ /* @__PURE__ */ n.jsx(X, { children: y }),
201
+ x && /* @__PURE__ */ n.jsx($, { ...x })
202
+ ] }),
203
+ m ? /* @__PURE__ */ n.jsx(G, { children: m }) : null,
204
+ c && c.length > 0 && /* @__PURE__ */ n.jsx(J, { children: c.map((d, g) => /* @__PURE__ */ n.jsx($, { ...d }, g)) }),
196
205
  a && a.length > 0 ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
197
- /* @__PURE__ */ n.jsx(h, { variant: "h6", color: S.colors.grey.n400, children: k }),
198
- /* @__PURE__ */ n.jsx(q, { children: a.map((d, g) => /* @__PURE__ */ n.jsxs(W, { children: [
199
- /* @__PURE__ */ n.jsx(E, {}),
206
+ /* @__PURE__ */ n.jsx(h, { variant: "h6", color: A.colors.grey.n400, children: z }),
207
+ /* @__PURE__ */ n.jsx(W, { children: a.map((d, g) => /* @__PURE__ */ n.jsxs(E, { children: [
208
+ /* @__PURE__ */ n.jsx(M, {}),
200
209
  /* @__PURE__ */ n.jsx("span", { children: d.label })
201
210
  ] }, g)) })
202
211
  ] }) : null,
203
- o && /* @__PURE__ */ n.jsx(Y, { children: /* @__PURE__ */ n.jsxs(Z, { children: [
204
- /* @__PURE__ */ n.jsxs(_, { children: [
205
- /* @__PURE__ */ n.jsx(C, { src: P, alt: o == null ? void 0 : o.amount }),
212
+ o && /* @__PURE__ */ n.jsx(_, { children: /* @__PURE__ */ n.jsxs(C, { children: [
213
+ /* @__PURE__ */ n.jsxs(ii, { children: [
214
+ /* @__PURE__ */ n.jsx(ni, { src: q, alt: o == null ? void 0 : o.amount }),
206
215
  /* @__PURE__ */ n.jsx(h, { variant: "h5", weight: "bold", children: o == null ? void 0 : o.amount })
207
216
  ] }),
208
217
  /* @__PURE__ */ n.jsxs(h, { variant: "caption", children: [
@@ -210,23 +219,23 @@ const M = s.div`
210
219
  (o == null ? void 0 : o.unit) ?? r("year")
211
220
  ] })
212
221
  ] }) }),
213
- B && /* @__PURE__ */ n.jsxs(G, { children: [
214
- /* @__PURE__ */ n.jsx(J, { children: $ }),
215
- /* @__PURE__ */ n.jsx(L, { $value: y, $color: z.bar }),
216
- /* @__PURE__ */ n.jsx(O, { children: j ?? R })
222
+ B && /* @__PURE__ */ n.jsxs(K, { children: [
223
+ /* @__PURE__ */ n.jsx(L, { children: j }),
224
+ /* @__PURE__ */ n.jsx(U, { $value: b, $color: T.bar }),
225
+ /* @__PURE__ */ n.jsx(Y, { children: w ?? S })
217
226
  ] }),
218
- /* @__PURE__ */ n.jsx(D, { children: T ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(I, { variant: m, size: "xs", onClick: t == null ? void 0 : t.onClick, children: (t == null ? void 0 : t.label) ?? "Send New Request" }) }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
219
- t && /* @__PURE__ */ n.jsx(p, { variant: m, size: "md", onClick: t.onClick, children: t.label }),
227
+ /* @__PURE__ */ n.jsx(I, { children: F ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(N, { variant: f, size: "xs", onClick: t == null ? void 0 : t.onClick, children: (t == null ? void 0 : t.label) ?? "Send New Request" }) }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
228
+ t && /* @__PURE__ */ n.jsx(p, { variant: f, size: "md", onClick: t.onClick, children: t.label }),
220
229
  l && /* @__PURE__ */ n.jsx(p, { variant: "light-secondary", size: "md", onClick: l.onClick, children: l.label })
221
230
  ] }) })
222
231
  ] })
223
232
  ] });
224
233
  };
225
234
  export {
226
- M as ContentWrapper,
227
- L as ProgressBar,
228
- O as StatusText,
229
- J as TrackingHeader,
230
- G as TrackingWrap,
231
- ce as default
235
+ V as ContentWrapper,
236
+ U as ProgressBar,
237
+ Y as StatusText,
238
+ L as TrackingHeader,
239
+ K as TrackingWrap,
240
+ gi as default
232
241
  };
@@ -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
  };
@@ -1,4 +1,4 @@
1
- import { __module as e } from "../../_virtual/index8.js";
1
+ import { __module as e } from "../../_virtual/index7.js";
2
2
  import { __require as o } from "./cjs/react-is.production.min.js";
3
3
  import { __require as t } from "./cjs/react-is.development.js";
4
4
  var r;
@@ -4,7 +4,7 @@ import P from "../../../../_virtual/isString.js";
4
4
  import D from "../../../../_virtual/isFunction.js";
5
5
  import j from "../../../../_virtual/isObject.js";
6
6
  import { Children as p, isValidElement as w } from "react";
7
- import { r as B } from "../../../../_virtual/index7.js";
7
+ import { r as B } from "../../../../_virtual/index8.js";
8
8
  import { isNumber as b } from "./DataUtils.js";
9
9
  import { shallowEqual as d } from "./ShallowEqual.js";
10
10
  import { SVGElementPropKeys as G, EventKeys as F, FilteredElementKeyMap as s } from "./types.js";
@@ -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.56",
4
+ "version": "0.0.58",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"