qaema-ui 0.0.53 → 0.0.55
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.
- package/dist/components/Divider.d.ts +1 -0
- package/dist/components/Divider.js +6 -5
- package/dist/components/RequestCard.d.ts +2 -0
- package/dist/components/RequestCard.js +76 -67
- package/dist/components/Sidemenu.js +71 -55
- package/dist/components/Table/Table.styles.js +1 -1
- package/dist/components/Tabs.js +5 -4
- package/dist/theme/colors.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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
|
|
2
|
-
const
|
|
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 ${({
|
|
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
|
-
|
|
12
|
+
a as default
|
|
12
13
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type BadgeProps } from '@components/Badge';
|
|
2
3
|
import { type FeatureItem } from './RequestSummaryCard';
|
|
3
4
|
export type RequestCardVariant = 'hidden' | 'accepted' | 'rejected' | 'inProgress';
|
|
4
5
|
type ContentWrapperProps = {
|
|
@@ -25,6 +26,7 @@ export type RequestCardProps = {
|
|
|
25
26
|
style?: React.CSSProperties;
|
|
26
27
|
features?: FeatureItem[];
|
|
27
28
|
featuresTitle?: string;
|
|
29
|
+
badgeList?: BadgeProps[];
|
|
28
30
|
price?: {
|
|
29
31
|
amount?: string;
|
|
30
32
|
unit?: string;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { j as n } from "../_virtual/jsx-runtime.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import s, { useTheme as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
3
|
+
import s, { useTheme as F } from "styled-components";
|
|
4
|
+
import A from "./Badge.js";
|
|
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";
|
|
9
|
+
import h from "./Typography.js";
|
|
10
|
+
const M = s.div`
|
|
10
11
|
display: flex;
|
|
11
12
|
flex-direction: column;
|
|
12
13
|
justify-content: space-between;
|
|
13
14
|
height: ${({ image: e, inModal: i }) => e ? i ? "65%" : "unset" : "100%"};
|
|
14
|
-
`,
|
|
15
|
+
`, V = s.div`
|
|
15
16
|
min-width: 9.0625rem;
|
|
16
17
|
display: flex;
|
|
17
18
|
aspect-ratio: ${({ $inModal: e }) => e ? "23/9" : "11/9"};
|
|
@@ -32,19 +33,19 @@ const W = s.div`
|
|
|
32
33
|
object-fit: cover;
|
|
33
34
|
display: block;
|
|
34
35
|
}
|
|
35
|
-
`,
|
|
36
|
+
`, D = s.div`
|
|
36
37
|
display: grid;
|
|
37
38
|
grid-template-columns: '1fr';
|
|
38
39
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
39
40
|
margin-top: ${({ theme: e }) => e.spacing.xxs};
|
|
40
41
|
justify-content: 'stretch';
|
|
41
42
|
align-items: center;
|
|
42
|
-
`,
|
|
43
|
+
`, I = s(p)`
|
|
43
44
|
min-width: 9.3125rem;
|
|
44
45
|
min-height: 2rem;
|
|
45
46
|
border-radius: ${({ theme: e }) => e.borderRadius.sm};
|
|
46
47
|
box-shadow: ${({ theme: e }) => e.boxShadow.s3};
|
|
47
|
-
`,
|
|
48
|
+
`, N = s.h3`
|
|
48
49
|
margin: 0;
|
|
49
50
|
font-family: ${({ theme: e }) => (e == null ? void 0 : e.dir) === "rtl" ? e.fonts.arabic : e.fonts.english};
|
|
50
51
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
@@ -55,7 +56,7 @@ const W = s.div`
|
|
|
55
56
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
56
57
|
letter-spacing: -0.25px;
|
|
57
58
|
color: ${({ theme: e }) => e.colors.grey.n800};
|
|
58
|
-
`,
|
|
59
|
+
`, Q = s.p`
|
|
59
60
|
margin: 0;
|
|
60
61
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
61
62
|
font-size: ${({ theme: e }) => {
|
|
@@ -63,11 +64,17 @@ const W = s.div`
|
|
|
63
64
|
return (i = e.typography.sizes) == null ? void 0 : i.s3;
|
|
64
65
|
}};
|
|
65
66
|
line-height: ${({ theme: e }) => e.typography.lineHeights.s};
|
|
66
|
-
`,
|
|
67
|
+
`, X = s.div`
|
|
68
|
+
display: flex;
|
|
69
|
+
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`
|
|
67
74
|
display: flex;
|
|
68
75
|
flex-direction: column;
|
|
69
76
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
70
|
-
`,
|
|
77
|
+
`, J = s.div`
|
|
71
78
|
font-family: ${({ theme: e }) => (e == null ? void 0 : e.dir) === "rtl" ? e.fonts.arabic : e.fonts.english};
|
|
72
79
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
73
80
|
font-size: ${({ theme: e }) => {
|
|
@@ -78,7 +85,7 @@ const W = s.div`
|
|
|
78
85
|
letter-spacing: 0;
|
|
79
86
|
vertical-align: middle;
|
|
80
87
|
color: ${({ theme: e }) => e.colors.grey.n650};
|
|
81
|
-
`,
|
|
88
|
+
`, K = s.div`
|
|
82
89
|
width: ${({ $fixed: e }) => e ? "335px" : "100%"};
|
|
83
90
|
min-width: 11.1875rem;
|
|
84
91
|
height: 100%;
|
|
@@ -91,7 +98,7 @@ const W = s.div`
|
|
|
91
98
|
display: flex;
|
|
92
99
|
flex-direction: column;
|
|
93
100
|
gap: ${({ theme: e }) => e.spacing.s};
|
|
94
|
-
`,
|
|
101
|
+
`, L = s.div`
|
|
95
102
|
position: relative;
|
|
96
103
|
width: 100%;
|
|
97
104
|
height: 0.5rem;
|
|
@@ -107,7 +114,7 @@ const W = s.div`
|
|
|
107
114
|
transition: width 250ms ease;
|
|
108
115
|
border-radius: 0;
|
|
109
116
|
}
|
|
110
|
-
`,
|
|
117
|
+
`, O = s.span`
|
|
111
118
|
font-family: ${({ theme: e }) => (e == null ? void 0 : e.dir) === "rtl" ? e.fonts.arabic : e.fonts.english};
|
|
112
119
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
113
120
|
font-size: ${({ theme: e }) => {
|
|
@@ -117,7 +124,7 @@ const W = s.div`
|
|
|
117
124
|
line-height: ${({ theme: e }) => e.typography.lineHeights.xs};
|
|
118
125
|
letter-spacing: 0;
|
|
119
126
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
120
|
-
`,
|
|
127
|
+
`, U = (e) => {
|
|
121
128
|
switch (e) {
|
|
122
129
|
case "accepted":
|
|
123
130
|
return { bar: "#1DBA63" };
|
|
@@ -128,7 +135,7 @@ const W = s.div`
|
|
|
128
135
|
default:
|
|
129
136
|
return { bar: "#7259ff" };
|
|
130
137
|
}
|
|
131
|
-
},
|
|
138
|
+
}, Y = s.div`
|
|
132
139
|
display: flex;
|
|
133
140
|
flex-direction: column;
|
|
134
141
|
justify-content: space-between;
|
|
@@ -139,7 +146,7 @@ const W = s.div`
|
|
|
139
146
|
@media (max-width: 375px) {
|
|
140
147
|
align-items: center;
|
|
141
148
|
}
|
|
142
|
-
`,
|
|
149
|
+
`, Z = s.div`
|
|
143
150
|
display: flex;
|
|
144
151
|
align-items: baseline;
|
|
145
152
|
color: ${({ theme: e }) => e.colors.grey.n650};
|
|
@@ -151,73 +158,75 @@ const W = s.div`
|
|
|
151
158
|
@media (max-width: 375px) {
|
|
152
159
|
text-align: center;
|
|
153
160
|
}
|
|
154
|
-
`,
|
|
161
|
+
`, _ = s.div`
|
|
155
162
|
display: flex;
|
|
156
163
|
align-items: center;
|
|
157
|
-
`,
|
|
164
|
+
`, C = s.img`
|
|
158
165
|
width: ${({ $width: e = "1rem" }) => e};
|
|
159
166
|
height: 1rem;
|
|
160
167
|
object-fit: contain;
|
|
161
168
|
flex-shrink: 0;
|
|
162
169
|
margin-right: 2px;
|
|
163
|
-
`,
|
|
170
|
+
`, ce = ({
|
|
164
171
|
variant: e = "hidden",
|
|
165
172
|
image: i,
|
|
166
|
-
title:
|
|
167
|
-
subtitle:
|
|
168
|
-
trackingLabel:
|
|
169
|
-
progress:
|
|
170
|
-
statusText:
|
|
171
|
-
primaryCta:
|
|
173
|
+
title: f,
|
|
174
|
+
subtitle: x,
|
|
175
|
+
trackingLabel: $ = "Request Tracking",
|
|
176
|
+
progress: y = 0,
|
|
177
|
+
statusText: j,
|
|
178
|
+
primaryCta: t,
|
|
172
179
|
secondaryCta: l,
|
|
173
|
-
className:
|
|
174
|
-
style:
|
|
175
|
-
features:
|
|
176
|
-
featuresTitle:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
+
className: b,
|
|
181
|
+
style: w,
|
|
182
|
+
features: a,
|
|
183
|
+
featuresTitle: k,
|
|
184
|
+
badgeList: c,
|
|
185
|
+
price: o,
|
|
186
|
+
inModal: u = !1,
|
|
187
|
+
background: v
|
|
180
188
|
}) => {
|
|
181
|
-
const { t: r } =
|
|
182
|
-
return /* @__PURE__ */ n.jsxs(
|
|
183
|
-
i ? /* @__PURE__ */ n.jsx(
|
|
184
|
-
/* @__PURE__ */ n.jsxs(
|
|
185
|
-
/* @__PURE__ */ n.jsx(
|
|
186
|
-
|
|
187
|
-
c && c.length > 0
|
|
188
|
-
|
|
189
|
-
/* @__PURE__ */ n.jsx(
|
|
190
|
-
|
|
191
|
-
/* @__PURE__ */ n.jsx(
|
|
192
|
-
|
|
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)) }),
|
|
196
|
+
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, {}),
|
|
200
|
+
/* @__PURE__ */ n.jsx("span", { children: d.label })
|
|
201
|
+
] }, g)) })
|
|
193
202
|
] }) : null,
|
|
194
|
-
|
|
195
|
-
/* @__PURE__ */ n.jsxs(
|
|
196
|
-
/* @__PURE__ */ n.jsx(
|
|
197
|
-
/* @__PURE__ */ n.jsx(
|
|
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 }),
|
|
206
|
+
/* @__PURE__ */ n.jsx(h, { variant: "h5", weight: "bold", children: o == null ? void 0 : o.amount })
|
|
198
207
|
] }),
|
|
199
|
-
/* @__PURE__ */ n.jsxs(
|
|
208
|
+
/* @__PURE__ */ n.jsxs(h, { variant: "caption", children: [
|
|
200
209
|
"/",
|
|
201
|
-
(
|
|
210
|
+
(o == null ? void 0 : o.unit) ?? r("year")
|
|
202
211
|
] })
|
|
203
212
|
] }) }),
|
|
204
|
-
|
|
205
|
-
/* @__PURE__ */ n.jsx(
|
|
206
|
-
/* @__PURE__ */ n.jsx(
|
|
207
|
-
/* @__PURE__ */ n.jsx(
|
|
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 })
|
|
208
217
|
] }),
|
|
209
|
-
/* @__PURE__ */ n.jsx(
|
|
210
|
-
|
|
211
|
-
l && /* @__PURE__ */ n.jsx(
|
|
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 }),
|
|
220
|
+
l && /* @__PURE__ */ n.jsx(p, { variant: "light-secondary", size: "md", onClick: l.onClick, children: l.label })
|
|
212
221
|
] }) })
|
|
213
222
|
] })
|
|
214
223
|
] });
|
|
215
224
|
};
|
|
216
225
|
export {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
226
|
+
M as ContentWrapper,
|
|
227
|
+
L as ProgressBar,
|
|
228
|
+
O as StatusText,
|
|
229
|
+
J as TrackingHeader,
|
|
230
|
+
G as TrackingWrap,
|
|
231
|
+
ce as default
|
|
223
232
|
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as i } from "../_virtual/jsx-runtime.js";
|
|
2
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
|
|
5
|
-
import { device as
|
|
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
|
|
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
|
|
11
|
-
import
|
|
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
|
|
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 ${
|
|
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
|
-
`,
|
|
46
|
+
`, A = o.div`
|
|
46
47
|
display: flex;
|
|
47
48
|
flex-direction: row;
|
|
48
49
|
width: 100%;
|
|
49
50
|
justify-content: space-between;
|
|
50
|
-
`,
|
|
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
|
-
`,
|
|
55
|
+
`, Q = o.div`
|
|
55
56
|
display: none;
|
|
56
57
|
|
|
57
|
-
@media ${
|
|
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,15 +64,15 @@ const A = s.div`
|
|
|
63
64
|
height: 1.5rem;
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
|
-
`,
|
|
67
|
+
`, q = o.div`
|
|
67
68
|
padding-right: ${({ theme: r }) => r.spacing.s};
|
|
68
69
|
padding-left: ${({ theme: r }) => r.spacing.s};
|
|
69
|
-
`,
|
|
70
|
+
`, G = o.div`
|
|
70
71
|
justify-content: space-between;
|
|
71
72
|
display: flex;
|
|
72
73
|
flex-direction: column;
|
|
73
74
|
height: 100%;
|
|
74
|
-
`,
|
|
75
|
+
`, Y = o.div`
|
|
75
76
|
display: flex;
|
|
76
77
|
flex-direction: row;
|
|
77
78
|
gap: ${({ theme: r }) => r.spacing.xxs};
|
|
@@ -79,7 +80,7 @@ const A = s.div`
|
|
|
79
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 =
|
|
83
|
+
`, P = o(Z)`
|
|
83
84
|
border: none;
|
|
84
85
|
padding: 0;
|
|
85
86
|
margin-top: ${({ theme: r }) => r.spacing.xxs};
|
|
@@ -89,7 +90,7 @@ const A = s.div`
|
|
|
89
90
|
svg {
|
|
90
91
|
background-color: ${({ theme: r }) => r.colors.grey.n150};
|
|
91
92
|
}
|
|
92
|
-
`, I =
|
|
93
|
+
`, I = o(_.Control)`
|
|
93
94
|
padding: ${({ theme: r }) => r.spacing.xxs};
|
|
94
95
|
border: none;
|
|
95
96
|
background-color: ${({ theme: r }) => r.colors.grey.n150};
|
|
@@ -98,7 +99,7 @@ const A = s.div`
|
|
|
98
99
|
&:focus-visible {
|
|
99
100
|
outline: none;
|
|
100
101
|
}
|
|
101
|
-
`,
|
|
102
|
+
`, rr = o.div`
|
|
102
103
|
padding-right: ${({ theme: r }) => r.spacing.s};
|
|
103
104
|
button {
|
|
104
105
|
width: 100%;
|
|
@@ -107,74 +108,89 @@ const A = s.div`
|
|
|
107
108
|
${({ theme: r }) => {
|
|
108
109
|
if ((r == null ? void 0 : r.dir) === "rtl") return `padding-right: 0 !important;padding-left: ${r.spacing.s};`;
|
|
109
110
|
}}
|
|
110
|
-
`,
|
|
111
|
+
`, nr = o(w)`
|
|
111
112
|
padding-right: ${({ theme: r }) => r.spacing.s};
|
|
112
113
|
padding-left: ${({ theme: r }) => r.spacing.s};
|
|
113
114
|
margin-top: 0;
|
|
114
115
|
margin-bottom: ${({ theme: r }) => r.spacing.xs};
|
|
115
|
-
`,
|
|
116
|
+
`, ir = o.div`
|
|
116
117
|
padding: ${({ theme: r }) => r.spacing.m};
|
|
117
118
|
text-align: center;
|
|
118
|
-
`,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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) => {
|
|
122
135
|
var h;
|
|
123
|
-
const
|
|
136
|
+
const s = (h = d == null ? void 0 : d.navItems) == null ? void 0 : h.filter((x) => {
|
|
124
137
|
var $, y;
|
|
125
138
|
return (y = ($ = x == null ? void 0 : x.title) == null ? void 0 : $.toLowerCase()) == null ? void 0 : y.includes(n == null ? void 0 : n.toLowerCase());
|
|
126
139
|
});
|
|
127
|
-
(
|
|
128
|
-
}),
|
|
129
|
-
},
|
|
130
|
-
n.key === "Enter" && g(
|
|
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);
|
|
131
144
|
};
|
|
132
145
|
H(() => {
|
|
133
|
-
|
|
134
|
-
}, [
|
|
135
|
-
const z = (n,
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
/* @__PURE__ */
|
|
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 }) })
|
|
140
153
|
] }),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ i.jsx(q, { children: /* @__PURE__ */ i.jsxs(Y, { children: [
|
|
155
|
+
/* @__PURE__ */ i.jsx(
|
|
143
156
|
P,
|
|
144
157
|
{
|
|
145
158
|
onClick: () => {
|
|
146
|
-
g(
|
|
159
|
+
g(c);
|
|
147
160
|
},
|
|
148
|
-
children: /* @__PURE__ */
|
|
161
|
+
children: /* @__PURE__ */ i.jsx(R, { color: p.colors.grey.n350 })
|
|
149
162
|
}
|
|
150
163
|
),
|
|
151
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ i.jsx(
|
|
152
165
|
I,
|
|
153
166
|
{
|
|
154
|
-
placeholder:
|
|
155
|
-
value:
|
|
167
|
+
placeholder: k ?? "Search",
|
|
168
|
+
value: c,
|
|
156
169
|
onChange: (n) => {
|
|
157
|
-
|
|
170
|
+
F(n.target.value);
|
|
158
171
|
},
|
|
159
|
-
onKeyDown:
|
|
172
|
+
onKeyDown: N
|
|
160
173
|
}
|
|
161
174
|
)
|
|
162
175
|
] }) }),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
(
|
|
166
|
-
(
|
|
167
|
-
var
|
|
168
|
-
return ((
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
(d = n == null ? void 0 : n.navItems) == null ? void 0 : d.map((
|
|
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))
|
|
171
184
|
] }, n == null ? void 0 : n.title);
|
|
172
185
|
}))
|
|
173
186
|
] }),
|
|
174
|
-
/* @__PURE__ */
|
|
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
|
+
] })
|
|
175
191
|
] })
|
|
176
192
|
] });
|
|
177
193
|
};
|
|
178
194
|
export {
|
|
179
|
-
|
|
195
|
+
mr as default
|
|
180
196
|
};
|
|
@@ -259,7 +259,7 @@ const k = r.div`
|
|
|
259
259
|
/* position: sticky;
|
|
260
260
|
right: 0; */
|
|
261
261
|
flex: 0 0 auto;
|
|
262
|
-
width:
|
|
262
|
+
width: 6rem; /* adjust to your icon width */
|
|
263
263
|
table-layout: fixed;
|
|
264
264
|
background-color: ${({ theme: o }) => o.colors.grey.n50};
|
|
265
265
|
`;
|
package/dist/components/Tabs.js
CHANGED
|
@@ -42,7 +42,7 @@ const y = (r) => r === "active" ? a`
|
|
|
42
42
|
padding: ${({ theme: r }) => r.spacing.xxs};
|
|
43
43
|
border-radius: ${({ theme: r }) => r.borderRadius.lg};
|
|
44
44
|
background-color: ${({ theme: r }) => r.colors.grey.n100};
|
|
45
|
-
`,
|
|
45
|
+
`, $ = d(b)`
|
|
46
46
|
display: flex;
|
|
47
47
|
align-items: center;
|
|
48
48
|
justify-content: center;
|
|
@@ -71,13 +71,14 @@ const y = (r) => r === "active" ? a`
|
|
|
71
71
|
&:hover {
|
|
72
72
|
box-shadow: ${({ theme: r }) => r.boxShadow.s2};
|
|
73
73
|
border-color: transparent;
|
|
74
|
+
background-color: ${({ theme: r }) => r.colors.grey.n200};
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
&:active {
|
|
77
78
|
background-color: ${({ theme: r }) => r.colors.grey.n150};
|
|
78
79
|
border-color: transparent;
|
|
79
80
|
}
|
|
80
|
-
`,
|
|
81
|
+
`, f = d(h)`
|
|
81
82
|
@media ${e.tablet} {
|
|
82
83
|
font-size: ${({ theme: r }) => r.typography.sizes.s2};
|
|
83
84
|
}
|
|
@@ -89,7 +90,7 @@ const y = (r) => r === "active" ? a`
|
|
|
89
90
|
var l;
|
|
90
91
|
const { items: n, active: c, setActive: t } = r, p = (o, i) => i === (o == null ? void 0 : o.code) ? "active" : o != null && o.disabled ? "disabled" : "neutral";
|
|
91
92
|
return (n == null ? void 0 : n.length) === 0 ? null : /* @__PURE__ */ s.jsx(u, { variant: "pills", defaultActiveKey: (l = n[0]) == null ? void 0 : l.code, children: n == null ? void 0 : n.map((o) => o != null && o.hidden ? null : /* @__PURE__ */ s.jsx(
|
|
92
|
-
|
|
93
|
+
$,
|
|
93
94
|
{
|
|
94
95
|
title: o == null ? void 0 : o.title,
|
|
95
96
|
$mode: p(o, c),
|
|
@@ -97,7 +98,7 @@ const y = (r) => r === "active" ? a`
|
|
|
97
98
|
o != null && o.disabled || t(o == null ? void 0 : o.code);
|
|
98
99
|
},
|
|
99
100
|
disabled: (o == null ? void 0 : o.disabled) ?? !1,
|
|
100
|
-
children: /* @__PURE__ */ s.jsx(
|
|
101
|
+
children: /* @__PURE__ */ s.jsx(f, { variant: "mdText", children: o == null ? void 0 : o.title })
|
|
101
102
|
},
|
|
102
103
|
o == null ? void 0 : o.code
|
|
103
104
|
)) });
|
package/dist/theme/colors.d.ts
CHANGED