qaema-ui 0.0.52 → 0.0.54

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 (63) hide show
  1. package/dist/_virtual/index.js +5 -5
  2. package/dist/_virtual/index2.js +4 -4
  3. package/dist/_virtual/index3.js +5 -5
  4. package/dist/_virtual/index4.js +4 -4
  5. package/dist/components/Divider.d.ts +1 -0
  6. package/dist/components/Divider.js +6 -5
  7. package/dist/components/DropDown.js +25 -25
  8. package/dist/components/InputField.js +20 -18
  9. package/dist/components/PhoneInputField.js +3 -2
  10. package/dist/components/Sidemenu.js +79 -62
  11. package/dist/components/StatCard.js +46 -38
  12. package/dist/components/Table/Table.styles.js +1 -1
  13. package/dist/components/Tabs.js +5 -4
  14. package/dist/node_modules/react-bootstrap/esm/Alert.js +1 -1
  15. package/dist/node_modules/react-bootstrap/esm/AlertHeading.js +1 -1
  16. package/dist/node_modules/react-bootstrap/esm/AlertLink.js +1 -1
  17. package/dist/node_modules/react-bootstrap/esm/Button.js +1 -1
  18. package/dist/node_modules/react-bootstrap/esm/CloseButton.js +2 -2
  19. package/dist/node_modules/react-bootstrap/esm/Col.js +1 -1
  20. package/dist/node_modules/react-bootstrap/esm/Collapse.js +1 -1
  21. package/dist/node_modules/react-bootstrap/esm/Dropdown.js +1 -1
  22. package/dist/node_modules/react-bootstrap/esm/DropdownDivider.js +1 -1
  23. package/dist/node_modules/react-bootstrap/esm/DropdownHeader.js +1 -1
  24. package/dist/node_modules/react-bootstrap/esm/DropdownItem.js +1 -1
  25. package/dist/node_modules/react-bootstrap/esm/DropdownItemText.js +1 -1
  26. package/dist/node_modules/react-bootstrap/esm/DropdownMenu.js +1 -1
  27. package/dist/node_modules/react-bootstrap/esm/DropdownToggle.js +1 -1
  28. package/dist/node_modules/react-bootstrap/esm/Fade.js +1 -1
  29. package/dist/node_modules/react-bootstrap/esm/Feedback.js +2 -2
  30. package/dist/node_modules/react-bootstrap/esm/FloatingLabel.js +1 -1
  31. package/dist/node_modules/react-bootstrap/esm/Form.js +2 -2
  32. package/dist/node_modules/react-bootstrap/esm/FormCheck.js +1 -1
  33. package/dist/node_modules/react-bootstrap/esm/FormCheckInput.js +1 -1
  34. package/dist/node_modules/react-bootstrap/esm/FormCheckLabel.js +1 -1
  35. package/dist/node_modules/react-bootstrap/esm/FormControl.js +1 -1
  36. package/dist/node_modules/react-bootstrap/esm/FormFloating.js +1 -1
  37. package/dist/node_modules/react-bootstrap/esm/FormLabel.js +1 -1
  38. package/dist/node_modules/react-bootstrap/esm/FormRange.js +1 -1
  39. package/dist/node_modules/react-bootstrap/esm/FormSelect.js +1 -1
  40. package/dist/node_modules/react-bootstrap/esm/FormText.js +1 -1
  41. package/dist/node_modules/react-bootstrap/esm/Image.js +2 -2
  42. package/dist/node_modules/react-bootstrap/esm/Nav.js +1 -1
  43. package/dist/node_modules/react-bootstrap/esm/NavItem.js +1 -1
  44. package/dist/node_modules/react-bootstrap/esm/NavLink.js +1 -1
  45. package/dist/node_modules/react-bootstrap/esm/Navbar.js +1 -1
  46. package/dist/node_modules/react-bootstrap/esm/NavbarBrand.js +1 -1
  47. package/dist/node_modules/react-bootstrap/esm/NavbarText.js +1 -1
  48. package/dist/node_modules/react-bootstrap/esm/NavbarToggle.js +1 -1
  49. package/dist/node_modules/react-bootstrap/esm/Offcanvas.js +1 -1
  50. package/dist/node_modules/react-bootstrap/esm/OffcanvasBody.js +1 -1
  51. package/dist/node_modules/react-bootstrap/esm/OffcanvasHeader.js +1 -1
  52. package/dist/node_modules/react-bootstrap/esm/OffcanvasTitle.js +1 -1
  53. package/dist/node_modules/react-bootstrap/esm/OffcanvasToggling.js +1 -1
  54. package/dist/node_modules/react-bootstrap/esm/Toast.js +1 -1
  55. package/dist/node_modules/react-bootstrap/esm/ToastBody.js +1 -1
  56. package/dist/node_modules/react-bootstrap/esm/ToastHeader.js +1 -1
  57. package/dist/node_modules/react-bootstrap/esm/divWithClassName.js +1 -1
  58. package/dist/node_modules/react-helmet-async/lib/index.esm.js +2 -2
  59. package/dist/node_modules/react-smooth/es6/Animate.js +1 -1
  60. package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
  61. package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +1 -1
  62. package/dist/theme/colors.d.ts +1 -0
  63. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
- import { getDefaultExportFromCjs as s } from "./_commonjsHelpers.js";
2
- import { __require as r } from "../node_modules/classnames/index.js";
3
- var a = r();
4
- const t = /* @__PURE__ */ s(a);
1
+ import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
+ import { __require as t } from "../node_modules/react-helmet-async/node_modules/react-fast-compare/index.js";
3
+ var a = t();
4
+ const m = /* @__PURE__ */ r(a);
5
5
  export {
6
- t as default
6
+ m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
- import { __require as o } from "../node_modules/prop-types/index.js";
3
- var p = /* @__PURE__ */ o();
4
- const s = /* @__PURE__ */ r(p);
2
+ import { __require as o } from "../node_modules/shallowequal/index.js";
3
+ var a = o();
4
+ const t = /* @__PURE__ */ r(a);
5
5
  export {
6
- s as default
6
+ t as default
7
7
  };
@@ -1,7 +1,7 @@
1
- import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
- import { __require as t } from "../node_modules/react-helmet-async/node_modules/react-fast-compare/index.js";
3
- var a = t();
4
- const m = /* @__PURE__ */ r(a);
1
+ import { getDefaultExportFromCjs as s } from "./_commonjsHelpers.js";
2
+ import { __require as r } from "../node_modules/classnames/index.js";
3
+ var a = r();
4
+ const t = /* @__PURE__ */ s(a);
5
5
  export {
6
- m as default
6
+ t as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
- import { __require as o } from "../node_modules/shallowequal/index.js";
3
- var a = o();
4
- const t = /* @__PURE__ */ r(a);
2
+ import { __require as o } from "../node_modules/prop-types/index.js";
3
+ var p = /* @__PURE__ */ o();
4
+ const s = /* @__PURE__ */ r(p);
5
5
  export {
6
- t as default
6
+ s as default
7
7
  };
@@ -1,5 +1,6 @@
1
1
  export type DividerProps = {
2
2
  marginVertical?: string;
3
+ color?: string;
3
4
  };
4
5
  declare const Divider: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
5
6
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
@@ -1,12 +1,13 @@
1
- import t from "styled-components";
2
- const e = t.div.attrs((r) => ({
3
- marginVertical: r.marginVertical
1
+ import o from "styled-components";
2
+ const a = o.div.attrs((r) => ({
3
+ marginVertical: r.marginVertical,
4
+ color: r.color
4
5
  }))`
5
6
  width: 100%;
6
7
  height: 0;
7
- border: 1px solid ${({ theme: r }) => r.colors.grey.n150};
8
+ border: 1px solid ${({ color: r, theme: i }) => r ?? i.colors.grey.n150};
8
9
  margin: ${({ marginVertical: r, theme: i }) => `${r ?? i.spacing.xxs} 0`};
9
10
  `;
10
11
  export {
11
- e as default
12
+ a as default
12
13
  };
@@ -10,14 +10,14 @@ import { HelperTextWrapper as pe } from "./PhoneInputField.js";
10
10
  import Se from "./SearchBar.js";
11
11
  import me from "./Spinner.js";
12
12
  import F from "./Typography.js";
13
- const Le = (f) => {
13
+ const Le = (i) => {
14
14
  const {
15
15
  label: b,
16
16
  options: m,
17
17
  // value,
18
18
  placeholder: H = "Select Something",
19
19
  optional: M = !1,
20
- error: s = "",
20
+ error: f = "",
21
21
  disabled: h = !1,
22
22
  selectIdentifier: D,
23
23
  keyIdentifier: v = "id",
@@ -27,21 +27,21 @@ const Le = (f) => {
27
27
  allowSearch: R,
28
28
  searchHandler: A,
29
29
  searchPlaceholder: B,
30
- onToggle: o,
31
- multiSelect: c = !1,
30
+ onToggle: s,
31
+ multiSelect: o = !1,
32
32
  isLoading: Q = !1,
33
33
  currentSelectedOptions: y = [],
34
34
  isInteractive: I = !1,
35
35
  endIcon: T
36
- } = f, u = g(null), p = g(null), d = te(), { t: k } = ae(), U = g(null), [a, x] = w(y), [i, O] = w(!1), [Z, q] = w(0), $ = P ?? /* @__PURE__ */ r.jsx(r.Fragment, {}), G = le("dropdown"), S = _(() => {
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 = _(() => {
37
37
  var e, n;
38
- (e = u == null ? void 0 : u.current) != null && e.offsetWidth && p.current && q(((n = u.current) == null ? void 0 : n.offsetWidth) / 16);
38
+ (e = c == null ? void 0 : c.current) != null && e.offsetWidth && p.current && q(((n = c.current) == null ? void 0 : n.offsetWidth) / 16);
39
39
  }, []);
40
- C(() => (i && (S(), window.addEventListener("resize", S)), () => window.removeEventListener("resize", S)), [i, S]), C(() => {
40
+ C(() => (d && (S(), window.addEventListener("resize", S)), () => window.removeEventListener("resize", S)), [d, S]), C(() => {
41
41
  x(y);
42
42
  }, [y]);
43
- const J = (e, n, t, l = "default") => t ? d.colors.grey.n400 : e ? d.colors.state.error.n450 : n ? d.colors.primary.dark.n600 : l === "light-primary" ? d.colors.primary.purple.n450 : d.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 (c) {
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
45
  const n = E(e);
46
46
  let t;
47
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));
@@ -52,17 +52,17 @@ const Le = (f) => {
52
52
  x(n), j(n.map((t) => t.value));
53
53
  }, X = () => {
54
54
  var e;
55
- return a.length === 0 ? H : c ? `${a.length} ${k("SELECTED")}` : (e = a[0]) == null ? void 0 : e.label;
55
+ return a.length === 0 ? H : o ? `${a.length} ${k("SELECTED")}` : (e = a[0]) == null ? void 0 : e.label;
56
56
  };
57
57
  C(() => {
58
58
  const e = (n) => {
59
- p.current && u.current && !p.current.contains(n.target) && !u.current.contains(n.target) && (O(!1), o == null || o(!1));
59
+ p.current && c.current && !p.current.contains(n.target) && !c.current.contains(n.target) && (O(!1), s == null || s(!1));
60
60
  };
61
- return i && document.addEventListener("mousedown", e), () => {
61
+ return d && document.addEventListener("mousedown", e), () => {
62
62
  document.removeEventListener("mousedown", e);
63
63
  };
64
- }, [i, o]);
65
- const Y = () => I || (s == null ? void 0 : s.length) === 0 ? null : /* @__PURE__ */ r.jsx(pe, { error: s, children: s });
64
+ }, [d, s]);
65
+ const Y = () => I ? null : /* @__PURE__ */ r.jsx(pe, { error: f || "", children: f && f });
66
66
  return /* @__PURE__ */ r.jsxs(se, { children: [
67
67
  b && /* @__PURE__ */ r.jsxs(oe, { children: [
68
68
  /* @__PURE__ */ r.jsx("label", { children: b }),
@@ -71,14 +71,14 @@ const Le = (f) => {
71
71
  /* @__PURE__ */ r.jsxs(
72
72
  ce,
73
73
  {
74
- show: i,
74
+ show: d,
75
75
  onToggle: () => {
76
- o == null || o(!i), O((e) => !e);
76
+ s == null || s(!d), O((e) => !e);
77
77
  },
78
78
  placement: "bottom-start",
79
- autoClose: c ? "outside" : !0,
79
+ autoClose: o ? "outside" : !0,
80
80
  children: [
81
- /* @__PURE__ */ r.jsx(ue, { disabled: h, ref: u, $valid: !s, $variant: f.variant || "default", children: /* @__PURE__ */ r.jsx(de, { $valid: !s, $isInteractive: I, $hasDyncWidth: !h, children: /* @__PURE__ */ r.jsxs("div", { className: "title-container", 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
82
  /* @__PURE__ */ r.jsxs("div", { className: "heading-container", children: [
83
83
  N && typeof $ == "function" && /* @__PURE__ */ r.jsx($, {}),
84
84
  /* @__PURE__ */ r.jsx(
@@ -86,26 +86,26 @@ const Le = (f) => {
86
86
  {
87
87
  component: "span",
88
88
  variant: "mdText",
89
- color: J(s, a.length > 0, h, f.variant || "default"),
89
+ color: J(f, a.length > 0, h, i.variant || "default"),
90
90
  children: X()
91
91
  }
92
92
  )
93
93
  ] }),
94
94
  (T || !h) && /* @__PURE__ */ r.jsxs(ie, { children: [
95
95
  T,
96
- !c && a.length > 0 && !h && /* @__PURE__ */ r.jsx(
96
+ !o && a.length > 0 && !h && /* @__PURE__ */ r.jsx(
97
97
  W,
98
98
  {
99
99
  style: { cursor: "pointer", marginLeft: "0.5rem" },
100
100
  onClick: (e) => {
101
- e.stopPropagation(), x([]), j(c ? [] : "");
101
+ e.stopPropagation(), x([]), j(o ? [] : "");
102
102
  }
103
103
  }
104
104
  ),
105
105
  !h && /* @__PURE__ */ r.jsx(ee, {})
106
106
  ] })
107
107
  ] }) }) }),
108
- i && /* @__PURE__ */ r.jsxs(fe, { ref: p, $menuWidth: Z, $zIndex: G, children: [
108
+ d && /* @__PURE__ */ r.jsxs(fe, { ref: p, $menuWidth: Z, $zIndex: G, children: [
109
109
  R && /* @__PURE__ */ r.jsx(he, { children: /* @__PURE__ */ r.jsx(Se, { placeholder: B, onSearch: A }) }),
110
110
  /* @__PURE__ */ r.jsxs(
111
111
  ve,
@@ -113,7 +113,7 @@ const Le = (f) => {
113
113
  ref: U,
114
114
  onScroll: (e) => {
115
115
  var n;
116
- (n = f.onScroll) == null || n.call(f, e);
116
+ (n = i.onScroll) == null || n.call(i, e);
117
117
  },
118
118
  children: [
119
119
  m == null ? void 0 : m.map((e) => {
@@ -125,7 +125,7 @@ const Le = (f) => {
125
125
  onClick: () => K(e),
126
126
  $selected: n,
127
127
  children: [
128
- c && (n ? /* @__PURE__ */ r.jsx(re, { color: d.colors.primary.purple.n500 }) : /* @__PURE__ */ r.jsx(ne, { color: d.colors.primary.purple.n450 })),
128
+ o && (n ? /* @__PURE__ */ r.jsx(re, { color: u.colors.primary.purple.n500 }) : /* @__PURE__ */ r.jsx(ne, { color: u.colors.primary.purple.n450 })),
129
129
  " ",
130
130
  /* @__PURE__ */ r.jsx(F, { variant: "smText", children: e == null ? void 0 : e.label })
131
131
  ]
@@ -141,7 +141,7 @@ const Le = (f) => {
141
141
  ]
142
142
  }
143
143
  ),
144
- c && a.length > 0 && /* @__PURE__ */ r.jsx(xe, { children: a.map((e) => {
144
+ o && a.length > 0 && /* @__PURE__ */ r.jsx(xe, { children: a.map((e) => {
145
145
  var n, t, l;
146
146
  return /* @__PURE__ */ r.jsxs(
147
147
  je,
@@ -120,7 +120,7 @@ const g = {
120
120
  &:-webkit-autofill {
121
121
  box-shadow: none;
122
122
  }
123
- `, b = i.span`
123
+ `, y = i.span`
124
124
  display: flex;
125
125
  align-items: center;
126
126
  justify-content: center;
@@ -153,11 +153,13 @@ const g = {
153
153
  gap: ${({ theme: o }) => o.spacing.xxs};
154
154
  font-size: ${({ theme: o }) => o.typography.sizes.s3};
155
155
  color: ${({ error: o, touched: r }) => o && r ? ({ theme: t }) => t.colors.state.error.n450 : ({ theme: t }) => t.colors.grey.n400};
156
- margin-top: ${({ theme: o }) => o.spacing.xxs};
156
+
157
157
  flex-direction: ${({ theme: o }) => o.dir === "rtl" ? "row-reverse" : "row"};
158
158
  justify-content: ${({ theme: o }) => o.dir === "rtl" ? "flex-end" : "flex-start"};
159
159
  text-align: ${({ theme: o }) => o.dir === "rtl" ? "right" : "left"};
160
- `, w = i.span`
160
+ min-height: 1.2rem;
161
+ visibility: ${({ error: o, touched: r }) => o && r ? "visible" : "hidden"};
162
+ `, m = i.span`
161
163
  color: ${({ theme: o }) => o.colors.primary.purple.n500};
162
164
  text-decoration: underline;
163
165
  cursor: pointer;
@@ -177,7 +179,7 @@ const g = {
177
179
  type: n = "text",
178
180
  disabled: u = !1,
179
181
  helperText: x,
180
- optional: m = !1,
182
+ optional: w = !1,
181
183
  helperTextLink: a,
182
184
  success: f = !1,
183
185
  error: l = "",
@@ -187,29 +189,29 @@ const g = {
187
189
  endIcon: h,
188
190
  onBlur: j = () => {
189
191
  },
190
- checked: S,
191
- name: y = "",
192
- isInteractive: k = !1,
193
- ...v
192
+ checked: v,
193
+ name: b = "",
194
+ isInteractive: S = !1,
195
+ ...k
194
196
  }) => {
195
197
  const z = H(), { t: C } = R(), F = () => l || (z.dir == "rtl" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
196
- a && /* @__PURE__ */ e.jsx(w, { onClick: a.onClick, children: a.text }),
198
+ a && /* @__PURE__ */ e.jsx(m, { onClick: a.onClick, children: a.text }),
197
199
  x
198
200
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
199
201
  x,
200
- a && /* @__PURE__ */ e.jsx(w, { onClick: a.onClick, children: a.text })
201
- ] })), A = () => k || !x && !a && (!l || !d) ? null : /* @__PURE__ */ e.jsx(N, { error: l, touched: d, children: F() });
202
+ a && /* @__PURE__ */ e.jsx(m, { onClick: a.onClick, children: a.text })
203
+ ] })), A = () => S ? null : /* @__PURE__ */ e.jsx(N, { error: l, touched: d, children: (x || a || l) && F() });
202
204
  return /* @__PURE__ */ e.jsxs(W, { children: [
203
205
  o && /* @__PURE__ */ e.jsxs(G, { children: [
204
206
  o,
205
207
  " ",
206
- m && /* @__PURE__ */ e.jsxs(O, { children: [
208
+ w && /* @__PURE__ */ e.jsxs(O, { children: [
207
209
  " ",
208
210
  C("OPTIONAL")
209
211
  ] })
210
212
  ] }),
211
213
  /* @__PURE__ */ e.jsxs(E, { success: f, readonly: $, disabled: u, touched: d, error: l, children: [
212
- p && /* @__PURE__ */ e.jsx(b, { success: f, error: l, touched: d, children: p }),
214
+ p && /* @__PURE__ */ e.jsx(y, { success: f, error: l, touched: d, children: p }),
213
215
  /* @__PURE__ */ e.jsx(
214
216
  I,
215
217
  {
@@ -217,19 +219,19 @@ const g = {
217
219
  error: l,
218
220
  readonly: $,
219
221
  onBlur: j,
220
- checked: S,
222
+ checked: v,
221
223
  touched: d,
222
224
  value: t,
223
- id: y,
225
+ id: b,
224
226
  onChange: s,
225
227
  type: n,
226
228
  disabled: u,
227
229
  placeholder: r,
228
- name: y,
229
- ...v
230
+ name: b,
231
+ ...k
230
232
  }
231
233
  ),
232
- h && /* @__PURE__ */ e.jsx(b, { success: f, error: l, touched: d, children: h })
234
+ h && /* @__PURE__ */ e.jsx(y, { success: f, error: l, touched: d, children: h })
233
235
  ] }),
234
236
  A()
235
237
  ] });
@@ -441,10 +441,11 @@ const _t = f.div`
441
441
  gap: ${({ theme: s }) => s.spacing.xxs};
442
442
  font-size: ${({ theme: s }) => s.typography.sizes.s3};
443
443
  color: ${({ error: s }) => s ? ({ theme: o }) => o.colors.state.error.n450 : ({ theme: o }) => o.colors.grey.n400};
444
- margin-top: ${({ theme: s }) => s.spacing.xxs};
445
444
  flex-direction: ${({ theme: s }) => s.dir === "rtl" ? "row-reverse" : "row"};
446
445
  justify-content: ${({ theme: s }) => s.dir === "rtl" ? "flex-end" : "flex-start"};
447
446
  text-align: ${({ theme: s }) => s.dir === "rtl" ? "right" : "left"};
447
+ min-height: 1.2rem;
448
+ visibility: ${({ error: s }) => s ? "visible" : "hidden"};
448
449
  `, fg = ({
449
450
  label: s,
450
451
  value: o,
@@ -458,7 +459,7 @@ const _t = f.div`
458
459
  name: j = "",
459
460
  maxLength: e
460
461
  }) => {
461
- const z = w.find((l) => l.code === k) ?? w.find((l) => l.code === "SA"), [d, c] = x(z), [i, b] = x(o), $ = () => t ? /* @__PURE__ */ r.jsx(Qt, { error: t, children: t }) : null;
462
+ const z = w.find((l) => l.code === k) ?? w.find((l) => l.code === "SA"), [d, c] = x(z), [i, b] = x(o), $ = () => /* @__PURE__ */ r.jsx(Qt, { error: t || "", children: t && t });
462
463
  return /* @__PURE__ */ r.jsxs(Mt, { children: [
463
464
  /* @__PURE__ */ r.jsx(Nt, { label: s, optional: m }),
464
465
  /* @__PURE__ */ r.jsx(
@@ -1,17 +1,18 @@
1
- import { j as o } from "../_virtual/jsx-runtime.js";
2
- import { useState as y, useEffect as H } from "react";
1
+ import { j as i } from "../_virtual/jsx-runtime.js";
2
+ import { useState as m, useEffect as H } from "react";
3
3
  import { FaTimesCircle as O, FaSearch as R } from "../node_modules/react-icons/fa/index.js";
4
- import s, { useTheme as X } from "styled-components";
5
- import { device as w } from "../constants/breakPoints.constant.js";
4
+ import o, { useTheme as X } from "styled-components";
5
+ import { device as S } from "../constants/breakPoints.constant.js";
6
6
  import K from "../hooks/useZIndex.js";
7
- import { useQaemaCoreTranslation as U } from "../i18n/i18n.js";
7
+ import { useQaemaCoreTranslation as M } from "../i18n/i18n.js";
8
+ import U from "./Divider.js";
8
9
  import V from "./Image.js";
9
10
  import j from "./Link.js";
10
- import S from "./NavItem.js";
11
- import k from "./Typography.js";
11
+ import b from "./NavItem.js";
12
+ import w from "./Typography.js";
12
13
  import Z from "../node_modules/react-bootstrap/esm/Button.js";
13
14
  import _ from "../node_modules/react-bootstrap/esm/Form.js";
14
- const A = s.div`
15
+ const v = o.div`
15
16
  direction: ${({ theme: r }) => r == null ? void 0 : r.dir};
16
17
  position: fixed;
17
18
  top: 0;
@@ -28,7 +29,7 @@ const A = s.div`
28
29
  flex-direction: column;
29
30
  gap: 1rem;
30
31
 
31
- @media ${w.tablet} {
32
+ @media ${S.tablet} {
32
33
  transform: ${({ theme: r }) => r.dir === "ltr" ? "translateX(-100%)" : "translateX(100%)"}; /* Hide menu off-screen */
33
34
  margin-left: 0;
34
35
 
@@ -42,19 +43,19 @@ const A = s.div`
42
43
  ${({ theme: r }) => {
43
44
  if ((r == null ? void 0 : r.dir) === "rtl") return `padding-left: 0 !important;padding-right: ${r.spacing.xs};`;
44
45
  }}
45
- `, J = s.div`
46
+ `, A = o.div`
46
47
  display: flex;
47
48
  flex-direction: row;
48
49
  width: 100%;
49
50
  justify-content: space-between;
50
- `, Q = s.div`
51
+ `, J = o.div`
51
52
  padding-right: ${({ theme: r }) => r.spacing.sm};
52
53
  padding-left: ${({ theme: r }) => r.spacing.sm};
53
54
  cursor: pointer;
54
- `, q = s.div`
55
+ `, Q = o.div`
55
56
  display: none;
56
57
 
57
- @media ${w.tablet} {
58
+ @media ${S.tablet} {
58
59
  display: unset;
59
60
  padding-right: ${({ theme: r }) => r.spacing.s};
60
61
  padding-left: ${({ theme: r }) => r.spacing.s};
@@ -63,41 +64,42 @@ const A = s.div`
63
64
  height: 1.5rem;
64
65
  }
65
66
  }
66
- `, G = s.div`
67
+ `, q = o.div`
67
68
  padding-right: ${({ theme: r }) => r.spacing.s};
68
69
  padding-left: ${({ theme: r }) => r.spacing.s};
69
- `, Y = s.div`
70
+ `, G = o.div`
70
71
  justify-content: space-between;
71
72
  display: flex;
72
73
  flex-direction: column;
73
74
  height: 100%;
74
- `, v = s.div`
75
+ `, Y = o.div`
75
76
  display: flex;
76
77
  flex-direction: row;
77
78
  gap: ${({ theme: r }) => r.spacing.xxs};
78
79
  padding: ${({ theme: r }) => r.spacing.xs};
79
- background-color: ${({ theme: r }) => r.colors.grey.n100};
80
+ background-color: ${({ theme: r }) => r.colors.grey.n150};
80
81
  border: 1px solid transparent;
81
82
  border-radius: ${({ theme: r }) => r.borderRadius.lg};
82
- `, P = s(Z)`
83
+ `, P = o(Z)`
83
84
  border: none;
84
85
  padding: 0;
85
86
  margin-top: ${({ theme: r }) => r.spacing.xxs};
86
- background-color: ${({ theme: r }) => r.colors.grey.n100};
87
+ background-color: ${({ theme: r }) => r.colors.grey.n150};
87
88
  font-family: ${({ theme: r }) => r.dir === "rtl" ? r.fonts.arabic : r.fonts.english} !important;
88
89
  direction: ${({ theme: r }) => r.dir} !important;
89
90
  svg {
90
- background-color: ${({ theme: r }) => r.colors.grey.n100};
91
+ background-color: ${({ theme: r }) => r.colors.grey.n150};
91
92
  }
92
- `, I = s(_.Control)`
93
+ `, I = o(_.Control)`
93
94
  padding: ${({ theme: r }) => r.spacing.xxs};
94
95
  border: none;
95
- background-color: ${({ theme: r }) => r.colors.grey.n100};
96
+ background-color: ${({ theme: r }) => r.colors.grey.n150};
97
+ color: ${({ theme: r }) => r.colors.grey.n350};
96
98
 
97
99
  &:focus-visible {
98
100
  outline: none;
99
101
  }
100
- `, b = s.div`
102
+ `, rr = o.div`
101
103
  padding-right: ${({ theme: r }) => r.spacing.s};
102
104
  button {
103
105
  width: 100%;
@@ -106,74 +108,89 @@ const A = s.div`
106
108
  ${({ theme: r }) => {
107
109
  if ((r == null ? void 0 : r.dir) === "rtl") return `padding-right: 0 !important;padding-left: ${r.spacing.s};`;
108
110
  }}
109
- `, rr = s(k)`
111
+ `, nr = o(w)`
110
112
  padding-right: ${({ theme: r }) => r.spacing.s};
111
113
  padding-left: ${({ theme: r }) => r.spacing.s};
112
114
  margin-top: 0;
113
115
  margin-bottom: ${({ theme: r }) => r.spacing.xs};
114
- `, nr = s.div`
116
+ `, ir = o.div`
115
117
  padding: ${({ theme: r }) => r.spacing.m};
116
118
  text-align: center;
117
- `, ur = (r) => {
118
- const { logoSrc: C, searchPlaceHolder: T, categories: c, linkComponent: f, open: E, setOpen: L, currentPath: u, extraSideMenuItems: p, onLogoClick: B } = r, a = X(), { t: D } = U(), F = K("sidemenu"), [l, M] = y(""), [t, N] = y(c), g = (n) => {
119
- const e = [];
120
- c == null || c.forEach((d) => {
119
+ `, or = o.div`
120
+ button {
121
+ width: 100%;
122
+ border-radius: ${({ theme: r }) => r.spacing.xxs};
123
+ }
124
+ `, sr = o(U)`
125
+ margin-left: -${({ theme: r }) => r.spacing.xs};
126
+ width: calc(100% + ${({ theme: r }) => r.spacing.xs});
127
+ ${({ theme: r }) => {
128
+ if ((r == null ? void 0 : r.dir) === "rtl") return `margin-left: 0; margin-right: -${r.spacing.xs}; width: calc(100% + ${r.spacing.xs});`;
129
+ }}
130
+ margin-bottom: ${({ theme: r }) => r.spacing.sm};
131
+ `, mr = (r) => {
132
+ const { logoSrc: C, searchPlaceHolder: k, categories: a, linkComponent: f, open: T, setOpen: E, currentPath: u, extraSideMenuItems: l, onLogoClick: D } = r, p = X(), { t: L } = M(), B = K("sidemenu"), [c, F] = m(""), [e, W] = m(a), g = (n) => {
133
+ const t = [];
134
+ a == null || a.forEach((d) => {
121
135
  var h;
122
- const i = (h = d == null ? void 0 : d.navItems) == null ? void 0 : h.filter((x) => {
123
- var $, m;
124
- return (m = ($ = x == null ? void 0 : x.title) == null ? void 0 : $.toLowerCase()) == null ? void 0 : m.includes(n == null ? void 0 : n.toLowerCase());
136
+ const s = (h = d == null ? void 0 : d.navItems) == null ? void 0 : h.filter((x) => {
137
+ var $, y;
138
+ return (y = ($ = x == null ? void 0 : x.title) == null ? void 0 : $.toLowerCase()) == null ? void 0 : y.includes(n == null ? void 0 : n.toLowerCase());
125
139
  });
126
- (i == null ? void 0 : i.length) > 0 && e.push({ ...d, navItems: i });
127
- }), N(e);
128
- }, W = (n) => {
129
- n.key === "Enter" && g(l);
140
+ (s == null ? void 0 : s.length) > 0 && t.push({ ...d, navItems: s });
141
+ }), W(t);
142
+ }, N = (n) => {
143
+ n.key === "Enter" && g(c);
130
144
  };
131
145
  H(() => {
132
- l === "" && g(l);
133
- }, [l]);
134
- const z = (n, e) => n ? e === n || (e == null ? void 0 : e.startsWith(n + "/")) : !1;
135
- return /* @__PURE__ */ o.jsxs(A, { className: E ? "active" : "", $zIndex: F, children: [
136
- /* @__PURE__ */ o.jsxs(J, { children: [
137
- /* @__PURE__ */ o.jsx(Q, { onClick: B, children: /* @__PURE__ */ o.jsx(V, { src: C, width: "6.336rem", height: "2rem" }) }),
138
- /* @__PURE__ */ o.jsx(q, { onClick: () => L(!1), children: /* @__PURE__ */ o.jsx(O, { color: a.colors.primary.purple.n450 }) })
146
+ c === "" && g(c);
147
+ }, [c]);
148
+ const z = (n, t) => n ? t === n || (t == null ? void 0 : t.startsWith(n + "/")) : !1;
149
+ return /* @__PURE__ */ i.jsxs(v, { className: T ? "active" : "", $zIndex: B, children: [
150
+ /* @__PURE__ */ i.jsxs(A, { children: [
151
+ /* @__PURE__ */ i.jsx(J, { onClick: D, children: /* @__PURE__ */ i.jsx(V, { src: C, width: "6.336rem", height: "2rem" }) }),
152
+ /* @__PURE__ */ i.jsx(Q, { onClick: () => E(!1), children: /* @__PURE__ */ i.jsx(O, { color: p.colors.primary.purple.n450 }) })
139
153
  ] }),
140
- /* @__PURE__ */ o.jsx(G, { children: /* @__PURE__ */ o.jsxs(v, { children: [
141
- /* @__PURE__ */ o.jsx(
154
+ /* @__PURE__ */ i.jsx(q, { children: /* @__PURE__ */ i.jsxs(Y, { children: [
155
+ /* @__PURE__ */ i.jsx(
142
156
  P,
143
157
  {
144
158
  onClick: () => {
145
- g(l);
159
+ g(c);
146
160
  },
147
- children: /* @__PURE__ */ o.jsx(R, { color: a.colors.grey.n400 })
161
+ children: /* @__PURE__ */ i.jsx(R, { color: p.colors.grey.n350 })
148
162
  }
149
163
  ),
150
- /* @__PURE__ */ o.jsx(
164
+ /* @__PURE__ */ i.jsx(
151
165
  I,
152
166
  {
153
- placeholder: T ?? "Search",
154
- value: l,
167
+ placeholder: k ?? "Search",
168
+ value: c,
155
169
  onChange: (n) => {
156
- M(n.target.value);
170
+ F(n.target.value);
157
171
  },
158
- onKeyDown: W
172
+ onKeyDown: N
159
173
  }
160
174
  )
161
175
  ] }) }),
162
- /* @__PURE__ */ o.jsxs(Y, { children: [
163
- /* @__PURE__ */ o.jsxs("div", { children: [
164
- (t == null ? void 0 : t.length) === 0 && /* @__PURE__ */ o.jsx(nr, { children: /* @__PURE__ */ o.jsx(k, { variant: "smText", children: D("NO_RESULTS_FOUND") }) }),
165
- (t == null ? void 0 : t.length) > 0 && (t == null ? void 0 : t.map((n) => {
166
- var e, d;
167
- return ((e = n == null ? void 0 : n.navItems) == null ? void 0 : e.length) === 0 ? null : /* @__PURE__ */ o.jsxs(b, { children: [
168
- /* @__PURE__ */ o.jsx(rr, { variant: "xsText", color: a.colors.grey.n300, children: n == null ? void 0 : n.title }),
169
- (d = n == null ? void 0 : n.navItems) == null ? void 0 : d.map((i) => /* @__PURE__ */ o.jsx(j, { to: (i == null ? void 0 : i.path) ?? "/", component: f, wrapper: !0, children: /* @__PURE__ */ o.jsx(S, { item: { variant: "normal", active: z(i.path, u), ...i } }) }, i == null ? void 0 : i.path))
176
+ /* @__PURE__ */ i.jsxs(G, { children: [
177
+ /* @__PURE__ */ i.jsxs("div", { children: [
178
+ (e == null ? void 0 : e.length) === 0 && /* @__PURE__ */ i.jsx(ir, { children: /* @__PURE__ */ i.jsx(w, { variant: "smText", children: L("NO_RESULTS_FOUND") }) }),
179
+ (e == null ? void 0 : e.length) > 0 && (e == null ? void 0 : e.map((n) => {
180
+ var t, d;
181
+ return ((t = n == null ? void 0 : n.navItems) == null ? void 0 : t.length) === 0 ? null : /* @__PURE__ */ i.jsxs(rr, { children: [
182
+ /* @__PURE__ */ i.jsx(nr, { variant: "xsText", color: p.colors.grey.n300, children: n == null ? void 0 : n.title }),
183
+ (d = n == null ? void 0 : n.navItems) == null ? void 0 : d.map((s) => /* @__PURE__ */ i.jsx(j, { to: (s == null ? void 0 : s.path) ?? "/", component: f, wrapper: !0, children: /* @__PURE__ */ i.jsx(b, { item: { variant: "normal", active: z(s.path, u), ...s } }) }, s == null ? void 0 : s.path))
170
184
  ] }, n == null ? void 0 : n.title);
171
185
  }))
172
186
  ] }),
173
- /* @__PURE__ */ o.jsx(b, { children: p == null ? void 0 : p.map((n) => /* @__PURE__ */ o.jsx(j, { to: (n == null ? void 0 : n.path) ?? "/", component: f, wrapper: !0, children: /* @__PURE__ */ o.jsx(S, { item: { variant: "normal", active: u === n.path, ...n } }) }, n == null ? void 0 : n.path)) })
187
+ /* @__PURE__ */ i.jsxs(or, { children: [
188
+ (l == null ? void 0 : l.length) > 0 && /* @__PURE__ */ i.jsx(sr, { color: p.colors.grey.n150 }),
189
+ l == null ? void 0 : l.map((n) => /* @__PURE__ */ i.jsx(j, { to: (n == null ? void 0 : n.path) ?? "/", component: f, wrapper: !0, children: /* @__PURE__ */ i.jsx(b, { item: { variant: "normal", active: u === n.path, ...n } }) }, n == null ? void 0 : n.path))
190
+ ] })
174
191
  ] })
175
192
  ] });
176
193
  };
177
194
  export {
178
- ur as default
195
+ mr as default
179
196
  };