qaema-ui 0.0.7 → 0.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.
@@ -53,7 +53,7 @@ const a = (r) => {
53
53
  }
54
54
  `, S = s.div`
55
55
  display: flex;
56
- gap: 0.5rem;
56
+ gap: 1rem;
57
57
  cursor: pointer;
58
58
  ${({ $center: r }) => r ? "align-items: center" : ""}
59
59
  `, T = s.div`
@@ -13,6 +13,7 @@ export type SidemenuProps = {
13
13
  setOpen: (value: boolean) => void;
14
14
  currentPath: string;
15
15
  extraSideMenuItems: Array<NavItemType>;
16
+ onLogoClick: () => void;
16
17
  };
17
18
  declare const Sidemenu: React.FC<SidemenuProps>;
18
19
  export default Sidemenu;
@@ -1 +1 @@
1
- {"version":3,"file":"Sidemenu.d.ts","sourceRoot":"","sources":["../../src/lib/components/Sidemenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AA2H7C,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;CAC9B,CAAC;AACF,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAChC,aAAa,EAAE,KAAK,CAAC,WAAW,CAAC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;CACxC,CAAC;AAEF,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmFrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Sidemenu.d.ts","sourceRoot":"","sources":["../../src/lib/components/Sidemenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AA4H7C,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;CAC9B,CAAC;AACF,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAChC,aAAa,EAAE,KAAK,CAAC,WAAW,CAAC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACvC,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmFrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,16 +1,16 @@
1
- import { j as n } from "../_virtual/jsx-runtime.js";
1
+ import { j as o } from "../_virtual/jsx-runtime.js";
2
2
  import { useState as m } from "react";
3
- import { FaTimesCircle as F, FaSearch as H } from "../node_modules/react-icons/fa/index.js";
4
- import s, { useTheme as P } from "styled-components";
3
+ import { FaTimesCircle as H, FaSearch as P } from "../node_modules/react-icons/fa/index.js";
4
+ import s, { useTheme as X } from "styled-components";
5
5
  import { device as w } from "../constants/breakPoints.constant.js";
6
- import X from "../hooks/useZIndex.js";
7
- import D from "./Image.js";
6
+ import D from "../hooks/useZIndex.js";
7
+ import K from "./Image.js";
8
8
  import j from "./Link.js";
9
9
  import b from "./NavItem.js";
10
- import K from "./Typography.js";
11
- import R from "../node_modules/react-bootstrap/esm/Button.js";
12
- import V from "../node_modules/react-bootstrap/esm/Form.js";
13
- const W = s.div`
10
+ import R from "./Typography.js";
11
+ import V from "../node_modules/react-bootstrap/esm/Button.js";
12
+ import W from "../node_modules/react-bootstrap/esm/Form.js";
13
+ const Z = s.div`
14
14
  direction: ${({ theme: r }) => r == null ? void 0 : r.dir};
15
15
  position: fixed;
16
16
  top: 0;
@@ -41,15 +41,16 @@ const W = s.div`
41
41
  ${({ theme: r }) => {
42
42
  if ((r == null ? void 0 : r.dir) === "rtl") return `padding-left: 0 !important;padding-right: ${r.spacing.xs};`;
43
43
  }}
44
- `, Z = s.div`
44
+ `, J = s.div`
45
45
  display: flex;
46
46
  flex-direction: row;
47
47
  width: 100%;
48
48
  justify-content: space-between;
49
- `, J = s.div`
49
+ `, N = s.div`
50
50
  padding-right: ${({ theme: r }) => r.spacing.sm};
51
51
  padding-left: ${({ theme: r }) => r.spacing.sm};
52
- `, N = s.div`
52
+ cursor: pointer;
53
+ `, O = s.div`
53
54
  display: none;
54
55
 
55
56
  @media ${w.tablet} {
@@ -61,15 +62,15 @@ const W = s.div`
61
62
  height: 1.5rem;
62
63
  }
63
64
  }
64
- `, O = s.div`
65
+ `, q = s.div`
65
66
  padding-right: ${({ theme: r }) => r.spacing.s};
66
67
  padding-left: ${({ theme: r }) => r.spacing.s};
67
- `, q = s.div`
68
+ `, v = s.div`
68
69
  justify-content: space-between;
69
70
  display: flex;
70
71
  flex-direction: column;
71
72
  height: 100%;
72
- `, v = s.div`
73
+ `, A = s.div`
73
74
  display: flex;
74
75
  flex-direction: row;
75
76
  gap: ${({ theme: r }) => r.spacing.xxs};
@@ -77,7 +78,7 @@ const W = s.div`
77
78
  background-color: ${({ theme: r }) => r.colors.grey.n100};
78
79
  border: 1px solid transparent;
79
80
  border-radius: ${({ theme: r }) => r.borderRadius.lg};
80
- `, A = s(R)`
81
+ `, G = s(V)`
81
82
  border: none;
82
83
  padding: 0;
83
84
  margin-top: ${({ theme: r }) => r.spacing.xxs};
@@ -87,7 +88,7 @@ const W = s.div`
87
88
  svg {
88
89
  background-color: ${({ theme: r }) => r.colors.grey.n100};
89
90
  }
90
- `, G = s(V.Control)`
91
+ `, Q = s(W.Control)`
91
92
  padding: ${({ theme: r }) => r.spacing.xxs};
92
93
  border: none;
93
94
  background-color: ${({ theme: r }) => r.colors.grey.n100};
@@ -104,62 +105,62 @@ const W = s.div`
104
105
  ${({ theme: r }) => {
105
106
  if ((r == null ? void 0 : r.dir) === "rtl") return `padding-right: 0 !important;padding-left: ${r.spacing.s};`;
106
107
  }}
107
- `, Q = s(K)`
108
+ `, U = s(R)`
108
109
  padding-right: ${({ theme: r }) => r.spacing.s};
109
110
  padding-left: ${({ theme: r }) => r.spacing.s};
110
111
  margin-top: 0;
111
112
  margin-bottom: ${({ theme: r }) => r.spacing.xs};
112
- `, lr = (r) => {
113
- const { logoSrc: C, searchPlaceHolder: k, categories: l, linkComponent: x, open: B, setOpen: T, currentPath: h, extraSideMenuItems: a } = r, p = P(), E = X("sidemenu"), [c, L] = m(""), [d, M] = m(l), f = (i) => {
113
+ `, ar = (r) => {
114
+ const { logoSrc: C, searchPlaceHolder: k, categories: l, linkComponent: x, open: B, setOpen: L, currentPath: h, extraSideMenuItems: a, onLogoClick: T } = r, c = X(), E = D("sidemenu"), [p, M] = m(""), [d, z] = m(l), f = (i) => {
114
115
  const t = [];
115
116
  l == null || l.forEach((e) => {
116
117
  var u;
117
- const o = (u = e == null ? void 0 : e.navItems) == null ? void 0 : u.filter((g) => {
118
+ const n = (u = e == null ? void 0 : e.navItems) == null ? void 0 : u.filter((g) => {
118
119
  var $, y;
119
120
  return (y = ($ = g == null ? void 0 : g.title) == null ? void 0 : $.toLowerCase()) == null ? void 0 : y.includes(i == null ? void 0 : i.toLowerCase());
120
121
  });
121
- (o == null ? void 0 : o.length) > 0 && t.push({ ...e, navItems: o });
122
- }), M(t);
123
- }, z = (i) => {
124
- i.key === "Enter" && f(c);
122
+ (n == null ? void 0 : n.length) > 0 && t.push({ ...e, navItems: n });
123
+ }), z(t);
124
+ }, F = (i) => {
125
+ i.key === "Enter" && f(p);
125
126
  };
126
- return /* @__PURE__ */ n.jsxs(W, { className: B ? "active" : "", $zIndex: E, children: [
127
- /* @__PURE__ */ n.jsxs(Z, { children: [
128
- /* @__PURE__ */ n.jsx(J, { children: /* @__PURE__ */ n.jsx(D, { src: C, width: "6.336rem", height: "2rem" }) }),
129
- /* @__PURE__ */ n.jsx(N, { onClick: () => T(!1), children: /* @__PURE__ */ n.jsx(F, { color: p.colors.primary.purple.n450 }) })
127
+ return /* @__PURE__ */ o.jsxs(Z, { className: B ? "active" : "", $zIndex: E, children: [
128
+ /* @__PURE__ */ o.jsxs(J, { children: [
129
+ /* @__PURE__ */ o.jsx(N, { onClick: T, children: /* @__PURE__ */ o.jsx(K, { src: C, width: "6.336rem", height: "2rem" }) }),
130
+ /* @__PURE__ */ o.jsx(O, { onClick: () => L(!1), children: /* @__PURE__ */ o.jsx(H, { color: c.colors.primary.purple.n450 }) })
130
131
  ] }),
131
- /* @__PURE__ */ n.jsx(O, { children: /* @__PURE__ */ n.jsxs(v, { children: [
132
- /* @__PURE__ */ n.jsx(
133
- A,
132
+ /* @__PURE__ */ o.jsx(q, { children: /* @__PURE__ */ o.jsxs(A, { children: [
133
+ /* @__PURE__ */ o.jsx(
134
+ G,
134
135
  {
135
136
  onClick: () => {
136
- f(c);
137
+ f(p);
137
138
  },
138
- children: /* @__PURE__ */ n.jsx(H, { color: p.colors.grey.n400 })
139
+ children: /* @__PURE__ */ o.jsx(P, { color: c.colors.grey.n400 })
139
140
  }
140
141
  ),
141
- /* @__PURE__ */ n.jsx(
142
- G,
142
+ /* @__PURE__ */ o.jsx(
143
+ Q,
143
144
  {
144
145
  placeholder: k ?? "Search",
145
- value: c,
146
- onChange: (i) => L(i.target.value),
147
- onKeyDown: z
146
+ value: p,
147
+ onChange: (i) => M(i.target.value),
148
+ onKeyDown: F
148
149
  }
149
150
  )
150
151
  ] }) }),
151
- /* @__PURE__ */ n.jsxs(q, { children: [
152
- /* @__PURE__ */ n.jsx("div", { children: (d == null ? void 0 : d.length) > 0 && (d == null ? void 0 : d.map((i) => {
152
+ /* @__PURE__ */ o.jsxs(v, { children: [
153
+ /* @__PURE__ */ o.jsx("div", { children: (d == null ? void 0 : d.length) > 0 && (d == null ? void 0 : d.map((i) => {
153
154
  var t, e;
154
- return ((t = i == null ? void 0 : i.navItems) == null ? void 0 : t.length) === 0 ? null : /* @__PURE__ */ n.jsxs(S, { children: [
155
- /* @__PURE__ */ n.jsx(Q, { variant: "xsText", color: p.colors.grey.n300, children: i == null ? void 0 : i.title }),
156
- (e = i == null ? void 0 : i.navItems) == null ? void 0 : e.map((o) => /* @__PURE__ */ n.jsx(j, { to: (o == null ? void 0 : o.path) ?? "/", component: x, wrapper: !0, children: /* @__PURE__ */ n.jsx(b, { item: { variant: "normal", active: h === o.path, ...o } }) }, o == null ? void 0 : o.path))
155
+ return ((t = i == null ? void 0 : i.navItems) == null ? void 0 : t.length) === 0 ? null : /* @__PURE__ */ o.jsxs(S, { children: [
156
+ /* @__PURE__ */ o.jsx(U, { variant: "xsText", color: c.colors.grey.n300, children: i == null ? void 0 : i.title }),
157
+ (e = i == null ? void 0 : i.navItems) == null ? void 0 : e.map((n) => /* @__PURE__ */ o.jsx(j, { to: (n == null ? void 0 : n.path) ?? "/", component: x, wrapper: !0, children: /* @__PURE__ */ o.jsx(b, { item: { variant: "normal", active: h === n.path, ...n } }) }, n == null ? void 0 : n.path))
157
158
  ] }, i == null ? void 0 : i.title);
158
159
  })) }),
159
- /* @__PURE__ */ n.jsx(S, { children: a == null ? void 0 : a.map((i) => /* @__PURE__ */ n.jsx(j, { to: (i == null ? void 0 : i.path) ?? "/", component: x, wrapper: !0, children: /* @__PURE__ */ n.jsx(b, { item: { variant: "normal", active: h === i.path, ...i } }) }, i == null ? void 0 : i.path)) })
160
+ /* @__PURE__ */ o.jsx(S, { children: a == null ? void 0 : a.map((i) => /* @__PURE__ */ o.jsx(j, { to: (i == null ? void 0 : i.path) ?? "/", component: x, wrapper: !0, children: /* @__PURE__ */ o.jsx(b, { item: { variant: "normal", active: h === i.path, ...i } }) }, i == null ? void 0 : i.path)) })
160
161
  ] })
161
162
  ] });
162
163
  };
163
164
  export {
164
- lr as default
165
+ ar as default
165
166
  };