qaema-ui 0.0.62 → 0.0.64
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,10 +1,32 @@
|
|
|
1
1
|
export type PackageCardProps = {
|
|
2
2
|
planTitle: string;
|
|
3
3
|
planDescription: string;
|
|
4
|
+
variant?: PackageCardVariant;
|
|
4
5
|
offerBadgLabel?: string;
|
|
5
6
|
isPopular?: boolean;
|
|
7
|
+
isPersonalTier?: boolean;
|
|
6
8
|
popularBadgLabel?: string;
|
|
9
|
+
recommendeBadgLabel?: string;
|
|
7
10
|
bulletsList: string[];
|
|
11
|
+
features?: PackageCardFeature[];
|
|
12
|
+
showFeatures?: boolean;
|
|
13
|
+
featuresTitle?: string;
|
|
14
|
+
featuresDescription?: string;
|
|
15
|
+
hintComponent?: React.ReactNode;
|
|
16
|
+
showTabs?: boolean;
|
|
17
|
+
selectedTabId?: string;
|
|
18
|
+
tabs?: {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
amount?: string;
|
|
22
|
+
period?: string;
|
|
23
|
+
}[];
|
|
24
|
+
onTabChange?: (tabId: string) => void;
|
|
25
|
+
showAddons?: boolean;
|
|
26
|
+
selectedAddon?: string;
|
|
27
|
+
setSelectedAddon?: (addonId: string) => void;
|
|
28
|
+
addOnsData?: PackageCardAddon[];
|
|
29
|
+
addonsMonthlyLabel?: string;
|
|
8
30
|
primaryAction?: {
|
|
9
31
|
label: string;
|
|
10
32
|
onClick: () => void;
|
|
@@ -17,5 +39,17 @@ export type PackageCardProps = {
|
|
|
17
39
|
period?: string;
|
|
18
40
|
backgroundColor?: string;
|
|
19
41
|
};
|
|
42
|
+
export type PackageCardAddon = {
|
|
43
|
+
id: string;
|
|
44
|
+
titleEn: string;
|
|
45
|
+
baseFare: number;
|
|
46
|
+
color?: string;
|
|
47
|
+
};
|
|
48
|
+
export type PackageCardFeatureVariant = 'included' | 'excluded';
|
|
49
|
+
export type PackageCardFeature = {
|
|
50
|
+
label: string;
|
|
51
|
+
variant?: PackageCardFeatureVariant;
|
|
52
|
+
};
|
|
53
|
+
export type PackageCardVariant = 'transparent' | 'purple';
|
|
20
54
|
declare const PackageCard: (props: PackageCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
55
|
export default PackageCard;
|
|
@@ -1,13 +1,35 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
1
|
+
import { j as r } from "../_virtual/jsx-runtime.js";
|
|
2
|
+
import { FiCheck as G, FiX as J } from "../node_modules/react-icons/fi/index.js";
|
|
3
|
+
import { LuLayoutDashboard as K } from "../node_modules/react-icons/lu/index.js";
|
|
4
|
+
import n, { useTheme as N, css as w } from "styled-components";
|
|
5
|
+
import Q from "../assets/icons/RiyalIcon.js";
|
|
6
|
+
import k from "./Badge.js";
|
|
7
|
+
import C from "./Button.js";
|
|
8
|
+
import { Card as U } from "./Card.js";
|
|
9
|
+
import Y from "./PriceAmount.js";
|
|
10
|
+
import s from "./Typography.js";
|
|
11
|
+
const Z = {
|
|
12
|
+
transparent: w`
|
|
13
|
+
background: rgba(255, 255, 255, 0.72);
|
|
14
|
+
border: 1px solid ${({ theme: e }) => e.colors.grey.n200};
|
|
15
|
+
box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
|
|
16
|
+
`,
|
|
17
|
+
purple: w`
|
|
18
|
+
background: linear-gradient(360deg, #ffffff 63.12%, #f1eeff 100%);
|
|
19
|
+
border: 1px solid #e3deff;
|
|
20
|
+
box-shadow:
|
|
21
|
+
0px 4px 6px -2px #10182808,
|
|
22
|
+
0px 12px 16px -4px #10182814;
|
|
23
|
+
`
|
|
24
|
+
}, _ = n(U)`
|
|
25
|
+
${({ $variant: e }) => Z[e]};
|
|
26
|
+
|
|
27
|
+
${(e) => e.$isPersonalTier && `
|
|
28
|
+
position: relative;
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
`}
|
|
32
|
+
`, ee = n.div`
|
|
11
33
|
display: flex;
|
|
12
34
|
align-items: center;
|
|
13
35
|
gap: 1rem;
|
|
@@ -16,85 +38,287 @@ const $ = o.div`
|
|
|
16
38
|
@media (max-width: 480px) {
|
|
17
39
|
gap: 0.5rem;
|
|
18
40
|
}
|
|
19
|
-
`,
|
|
20
|
-
border: 1px solid ${(
|
|
21
|
-
padding: ${(
|
|
22
|
-
border-radius: ${(
|
|
41
|
+
`, re = n.div`
|
|
42
|
+
border: 1px solid ${(e) => e.theme.colors.grey.n300};
|
|
43
|
+
padding: ${(e) => e.theme.spacing.xs};
|
|
44
|
+
border-radius: ${(e) => e.theme.borderRadius.md};
|
|
23
45
|
width: 2rem;
|
|
24
46
|
height: 2rem;
|
|
25
47
|
display: flex;
|
|
26
48
|
justify-content: center;
|
|
27
49
|
align-items: center;
|
|
28
|
-
margin-bottom: ${(
|
|
50
|
+
margin-bottom: ${(e) => e.theme.spacing.s};
|
|
29
51
|
svg {
|
|
30
52
|
width: 1.3rem;
|
|
31
53
|
height: 1.3rem;
|
|
32
|
-
color: ${(
|
|
54
|
+
color: ${(e) => e.theme.colors.primary.purple.n450};
|
|
33
55
|
}
|
|
34
|
-
`,
|
|
56
|
+
`, ie = n.div`
|
|
57
|
+
padding: 0.75rem 0 0 0;
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: ${({ theme: e }) => e.spacing.s};
|
|
61
|
+
`, ne = n.div`
|
|
35
62
|
display: flex;
|
|
36
63
|
flex-direction: column;
|
|
37
|
-
margin-bottom: ${(r) => r.theme.spacing.sm};
|
|
38
64
|
gap: 0.5rem;
|
|
39
|
-
|
|
65
|
+
align-items: center;
|
|
66
|
+
text-align: center;
|
|
67
|
+
`, te = n(s)`
|
|
68
|
+
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
69
|
+
font-weight: 500;
|
|
70
|
+
font-size: ${({ theme: e }) => {
|
|
71
|
+
var o;
|
|
72
|
+
return (o = e.typography.sizes) == null ? void 0 : o.s4;
|
|
73
|
+
}};
|
|
74
|
+
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
75
|
+
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
76
|
+
text-align: center;
|
|
77
|
+
`, oe = n.div`
|
|
78
|
+
display: flex;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
`, se = n.ul`
|
|
81
|
+
display: grid;
|
|
82
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
83
|
+
margin: 0;
|
|
84
|
+
padding: 0;
|
|
85
|
+
list-style: none;
|
|
86
|
+
gap: ${({ theme: e }) => e.spacing.s};
|
|
87
|
+
|
|
88
|
+
@media (max-width: 900px) {
|
|
89
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@media (max-width: 560px) {
|
|
93
|
+
grid-template-columns: 1fr;
|
|
94
|
+
}
|
|
95
|
+
`, ae = n.li`
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
gap: ${({ theme: e }) => e.spacing.xs};
|
|
99
|
+
min-width: 0;
|
|
100
|
+
`, le = n.span`
|
|
101
|
+
width: 1rem;
|
|
102
|
+
height: 1rem;
|
|
103
|
+
border-radius: 50%;
|
|
104
|
+
display: inline-flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
flex-shrink: 0;
|
|
108
|
+
|
|
109
|
+
svg {
|
|
110
|
+
width: 0.7rem;
|
|
111
|
+
height: 0.7rem;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
${({ theme: e, $variant: o }) => o === "included" ? `
|
|
115
|
+
border: 1px solid ${e.colors.secondary.green.n450};
|
|
116
|
+
color: ${e.colors.secondary.green.n450};
|
|
117
|
+
` : `
|
|
118
|
+
border: 1px solid ${e.colors.secondary.pink.n450};
|
|
119
|
+
color: ${e.colors.secondary.pink.n450};
|
|
120
|
+
`}
|
|
121
|
+
`, ce = n(s)`
|
|
122
|
+
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
123
|
+
white-space: nowrap;
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
text-overflow: ellipsis;
|
|
126
|
+
`, de = n.div`
|
|
127
|
+
margin: 0 0 ${(e) => e.theme.spacing.s} 0;
|
|
128
|
+
padding: 0.25rem;
|
|
129
|
+
background-color: ${(e) => e.theme.colors.grey.n100};
|
|
130
|
+
border-radius: ${(e) => e.theme.borderRadius.md};
|
|
131
|
+
display: grid;
|
|
132
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
133
|
+
gap: 0.25rem;
|
|
134
|
+
`, pe = n.button`
|
|
135
|
+
border: 1px solid ${(e) => e.$isActive ? e.theme.colors.grey.n200 : "transparent"};
|
|
136
|
+
background-color: ${(e) => e.$isActive ? e.theme.colors.grey.n50 : "transparent"};
|
|
137
|
+
border-radius: ${(e) => e.theme.borderRadius.sm};
|
|
138
|
+
padding: 0.45rem 0.35rem;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
align-items: center;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
gap: 0.1rem;
|
|
145
|
+
box-shadow: ${(e) => e.$isActive ? "0 1px 2px rgba(16, 24, 40, 0.08)" : "none"};
|
|
146
|
+
`, me = n(s)`
|
|
147
|
+
color: ${(e) => e.$isActive ? e.theme.colors.grey.n800 : e.theme.colors.grey.n400};
|
|
148
|
+
font-size: 12px;
|
|
149
|
+
font-weight: ${(e) => e.$isActive ? 600 : 400};
|
|
150
|
+
line-height: 1;
|
|
151
|
+
`, he = n(s)`
|
|
152
|
+
color: ${(e) => e.$isActive ? e.theme.colors.grey.n800 : e.theme.colors.grey.n500};
|
|
153
|
+
font-size: 12px;
|
|
154
|
+
font-weight: 600;
|
|
155
|
+
line-height: 1;
|
|
156
|
+
`, xe = n.div`
|
|
40
157
|
display: flex;
|
|
41
158
|
width: 100%;
|
|
42
159
|
gap: 0.5rem;
|
|
43
|
-
`,
|
|
160
|
+
`, T = n.div`
|
|
44
161
|
display: flex;
|
|
45
162
|
width: 50%;
|
|
46
163
|
|
|
47
164
|
button {
|
|
48
165
|
width: 100%;
|
|
49
166
|
}
|
|
50
|
-
`,
|
|
167
|
+
`, ge = n.div`
|
|
51
168
|
display: flex;
|
|
52
169
|
justify-content: flex-end;
|
|
53
|
-
margin-bottom: ${(
|
|
54
|
-
`,
|
|
55
|
-
color: ${(
|
|
56
|
-
margin: ${(
|
|
170
|
+
margin-bottom: ${(e) => e.theme.spacing.xs};
|
|
171
|
+
`, ue = n(s)`
|
|
172
|
+
color: ${(e) => e.theme.colors.grey.n400};
|
|
173
|
+
margin: ${(e) => e.theme.spacing.xs} 0rem ${(e) => e.theme.spacing.s} 0;
|
|
57
174
|
display: inline-block;
|
|
58
175
|
text-align: start;
|
|
59
176
|
|
|
60
177
|
@media (max-width: 480px) {
|
|
61
178
|
width: 100%;
|
|
62
179
|
}
|
|
63
|
-
`,
|
|
180
|
+
`, Ae = (e) => {
|
|
64
181
|
const {
|
|
65
|
-
planTitle:
|
|
66
|
-
planDescription:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
182
|
+
planTitle: o,
|
|
183
|
+
planDescription: u,
|
|
184
|
+
variant: A,
|
|
185
|
+
offerBadgLabel: f,
|
|
186
|
+
popularBadgLabel: y,
|
|
187
|
+
recommendeBadgLabel: b,
|
|
188
|
+
isPopular: F,
|
|
189
|
+
isPersonalTier: B,
|
|
190
|
+
bulletsList: L,
|
|
191
|
+
features: d,
|
|
192
|
+
showFeatures: S = !0,
|
|
193
|
+
featuresDescription: P = "Everything in this plan plus...",
|
|
194
|
+
hintComponent: $,
|
|
195
|
+
showTabs: R = !1,
|
|
196
|
+
selectedTabId: z,
|
|
197
|
+
tabs: p = [],
|
|
198
|
+
onTabChange: m,
|
|
199
|
+
showAddons: I = !1,
|
|
200
|
+
selectedAddon: D = "Without",
|
|
201
|
+
setSelectedAddon: h,
|
|
202
|
+
addOnsData: j = [],
|
|
203
|
+
addonsMonthlyLabel: H = "monthly",
|
|
204
|
+
primaryAction: x,
|
|
205
|
+
secondaryAction: g,
|
|
206
|
+
period: W,
|
|
207
|
+
amount: E,
|
|
208
|
+
backgroundColor: V = ""
|
|
209
|
+
} = e, c = N(), a = B ?? o.trim().toLowerCase() === "personal account", M = A ?? (a || F ? "purple" : "transparent"), O = a && S, X = a && R && p.length > 0, q = a && I && j.length > 0, v = d && d.length > 0 ? d : (L ?? []).map((i) => ({
|
|
210
|
+
label: i,
|
|
211
|
+
variant: "included"
|
|
212
|
+
}));
|
|
213
|
+
return /* @__PURE__ */ r.jsxs(_, { width: "100%", backgroundColor: V, $isPersonalTier: a, $variant: M, children: [
|
|
214
|
+
/* @__PURE__ */ r.jsx(re, { children: /* @__PURE__ */ r.jsx(K, {}) }),
|
|
215
|
+
/* @__PURE__ */ r.jsxs("div", { children: [
|
|
216
|
+
/* @__PURE__ */ r.jsxs(ee, { children: [
|
|
217
|
+
/* @__PURE__ */ r.jsxs(s, { variant: "h6", weight: "bold", children: [
|
|
82
218
|
" ",
|
|
83
|
-
|
|
219
|
+
o
|
|
84
220
|
] }),
|
|
85
|
-
|
|
86
|
-
|
|
221
|
+
b && /* @__PURE__ */ r.jsx("span", { children: b }),
|
|
222
|
+
y && /* @__PURE__ */ r.jsx(k, { bgColor: c.colors.secondary.green.n100, color: c.colors.secondary.green.n550, label: y ?? "" }),
|
|
223
|
+
f && /* @__PURE__ */ r.jsx(k, { bgColor: c.colors.secondary.pink.n100, color: c.colors.secondary.pink.n450, label: f ?? "" })
|
|
87
224
|
] }),
|
|
88
|
-
|
|
89
|
-
|
|
225
|
+
u && /* @__PURE__ */ r.jsx(ue, { variant: "caption", children: u }),
|
|
226
|
+
X && /* @__PURE__ */ r.jsx(de, { children: p.map((i) => {
|
|
227
|
+
var l;
|
|
228
|
+
const t = (z ?? ((l = p[0]) == null ? void 0 : l.id)) === i.id;
|
|
229
|
+
return /* @__PURE__ */ r.jsxs(pe, { type: "button", $isActive: t, onClick: () => m == null ? void 0 : m(i.id), children: [
|
|
230
|
+
/* @__PURE__ */ r.jsx(me, { variant: "caption", $isActive: t, children: i.label }),
|
|
231
|
+
(i.amount || i.period) && /* @__PURE__ */ r.jsxs(he, { variant: "caption", $isActive: t, children: [
|
|
232
|
+
i.amount ? `${i.amount} ` : "",
|
|
233
|
+
i.period ?? ""
|
|
234
|
+
] })
|
|
235
|
+
] }, i.id);
|
|
236
|
+
}) }),
|
|
237
|
+
q && /* @__PURE__ */ r.jsx("div", { style: { marginTop: "0.50rem" }, children: /* @__PURE__ */ r.jsx(
|
|
238
|
+
"div",
|
|
239
|
+
{
|
|
240
|
+
style: {
|
|
241
|
+
backgroundColor: "#f5f7fb",
|
|
242
|
+
borderRadius: "9px",
|
|
243
|
+
padding: "4px",
|
|
244
|
+
display: "grid",
|
|
245
|
+
gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
|
|
246
|
+
gap: "4px"
|
|
247
|
+
},
|
|
248
|
+
children: j.map((i) => {
|
|
249
|
+
const t = D === i.id;
|
|
250
|
+
return /* @__PURE__ */ r.jsxs(
|
|
251
|
+
"button",
|
|
252
|
+
{
|
|
253
|
+
type: "button",
|
|
254
|
+
onClick: () => h == null ? void 0 : h(i.id),
|
|
255
|
+
style: {
|
|
256
|
+
padding: "8px 6px 7px",
|
|
257
|
+
border: t ? "1px solid #e4e7ec" : "1px solid transparent",
|
|
258
|
+
backgroundColor: t ? "#ffffff" : "transparent",
|
|
259
|
+
color: t ? "#16181c" : "#72788e",
|
|
260
|
+
borderRadius: "6px",
|
|
261
|
+
cursor: "pointer",
|
|
262
|
+
fontWeight: 600,
|
|
263
|
+
fontSize: "12.78px",
|
|
264
|
+
lineHeight: 1.1,
|
|
265
|
+
transition: "all 0.18s ease",
|
|
266
|
+
display: "flex",
|
|
267
|
+
flexDirection: "column",
|
|
268
|
+
alignItems: "center",
|
|
269
|
+
justifyContent: "center",
|
|
270
|
+
gap: "2px",
|
|
271
|
+
minHeight: "42px",
|
|
272
|
+
boxShadow: t ? "0 1px 2px rgba(16, 24, 40, 0.08)" : "none"
|
|
273
|
+
},
|
|
274
|
+
children: [
|
|
275
|
+
/* @__PURE__ */ r.jsx("span", { children: i.titleEn }),
|
|
276
|
+
/* @__PURE__ */ r.jsxs(
|
|
277
|
+
"span",
|
|
278
|
+
{
|
|
279
|
+
style: {
|
|
280
|
+
fontSize: "11px",
|
|
281
|
+
marginTop: "2px",
|
|
282
|
+
color: "#16181c",
|
|
283
|
+
fontWeight: 600,
|
|
284
|
+
display: "inline-flex",
|
|
285
|
+
alignItems: "center",
|
|
286
|
+
gap: "2px"
|
|
287
|
+
},
|
|
288
|
+
children: [
|
|
289
|
+
/* @__PURE__ */ r.jsx(Q, { width: "9", height: "9", color: "#16181c" }),
|
|
290
|
+
i.baseFare,
|
|
291
|
+
" ",
|
|
292
|
+
H
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
)
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
i.id
|
|
299
|
+
);
|
|
300
|
+
})
|
|
301
|
+
}
|
|
302
|
+
) }),
|
|
303
|
+
O && v.length > 0 && /* @__PURE__ */ r.jsxs(ie, { children: [
|
|
304
|
+
/* @__PURE__ */ r.jsx(ne, { children: /* @__PURE__ */ r.jsx(te, { children: P }) }),
|
|
305
|
+
$ && /* @__PURE__ */ r.jsx(oe, { children: $ }),
|
|
306
|
+
/* @__PURE__ */ r.jsx(se, { children: v.map((i, t) => {
|
|
307
|
+
const l = i.variant ?? "included";
|
|
308
|
+
return /* @__PURE__ */ r.jsxs(ae, { children: [
|
|
309
|
+
/* @__PURE__ */ r.jsx(le, { $variant: l, children: l === "included" ? /* @__PURE__ */ r.jsx(G, {}) : /* @__PURE__ */ r.jsx(J, {}) }),
|
|
310
|
+
/* @__PURE__ */ r.jsx(ce, { variant: "caption", children: i.label })
|
|
311
|
+
] }, `${i.label}-${t}`);
|
|
312
|
+
}) })
|
|
313
|
+
] })
|
|
90
314
|
] }),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ r.jsx(ge, { children: /* @__PURE__ */ r.jsx(Y, { amount: E, period: W }) }),
|
|
316
|
+
/* @__PURE__ */ r.jsxs(xe, { children: [
|
|
317
|
+
/* @__PURE__ */ r.jsx(T, { children: x && /* @__PURE__ */ r.jsx(C, { variant: "outline-primary", onClick: x.onClick, children: x.label }) }),
|
|
318
|
+
/* @__PURE__ */ r.jsx(T, { children: g && /* @__PURE__ */ r.jsx(C, { onClick: g.onClick, children: g.label }) })
|
|
95
319
|
] })
|
|
96
320
|
] });
|
|
97
321
|
};
|
|
98
322
|
export {
|
|
99
|
-
|
|
323
|
+
Ae as default
|
|
100
324
|
};
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { BadgeVariant } from '@hooks/useBadgeVariant';
|
|
4
|
+
import type { FontWeight } from '@theme/theme';
|
|
2
5
|
export type PriceCardVariant = 'transparent' | 'purple';
|
|
3
6
|
export type FeatureVariant = 'included' | 'excluded';
|
|
4
7
|
export type PriceCardBadge = {
|
|
5
8
|
label: string;
|
|
6
9
|
bgColor: string;
|
|
7
10
|
color: string;
|
|
11
|
+
weight?: FontWeight;
|
|
12
|
+
variant?: BadgeVariant;
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
onClose?: () => void;
|
|
15
|
+
image?: string;
|
|
8
16
|
};
|
|
9
17
|
export type PriceCardFeature = {
|
|
10
18
|
label: string;
|
|
@@ -31,6 +39,7 @@ export type PriceCardProps = {
|
|
|
31
39
|
price: PriceCardPrice;
|
|
32
40
|
secondaryPrice?: SecondaryPrice;
|
|
33
41
|
description: string;
|
|
42
|
+
hintComponent?: React.ReactNode;
|
|
34
43
|
features: PriceCardFeature[];
|
|
35
44
|
variant?: PriceCardVariant;
|
|
36
45
|
badges?: PriceCardBadge[];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { j as i } from "../_virtual/jsx-runtime.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import { FiCheck as
|
|
3
|
+
import { FiCheck as S, FiX as T } from "../node_modules/react-icons/fi/index.js";
|
|
4
4
|
import o, { css as p } from "styled-components";
|
|
5
5
|
import m from "../assets/icons/RiyalIcon.js";
|
|
6
6
|
import { CurrencyContainer as H } from "../styles/Currency.styles.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import B from "../assets/svg/Riyal.svg.js";
|
|
8
|
+
import I from "./Badge.js";
|
|
9
9
|
import d from "./Button.js";
|
|
10
10
|
import a from "./Typography.js";
|
|
11
|
-
const
|
|
11
|
+
const E = {
|
|
12
12
|
transparent: p`
|
|
13
13
|
background: rgba(255, 255, 255, 0.72);
|
|
14
14
|
border: 1px solid ${({ theme: e }) => e.colors.grey.n200};
|
|
@@ -21,15 +21,15 @@ const W = {
|
|
|
21
21
|
0px 4px 6px -2px #10182808,
|
|
22
22
|
0px 12px 16px -4px #10182814;
|
|
23
23
|
`
|
|
24
|
-
},
|
|
24
|
+
}, P = o.div`
|
|
25
25
|
width: 100%;
|
|
26
26
|
max-width: 28.458rem;
|
|
27
27
|
border-radius: ${({ theme: e }) => e.borderRadius.xl};
|
|
28
28
|
overflow: hidden;
|
|
29
29
|
display: flex;
|
|
30
30
|
flex-direction: column;
|
|
31
|
-
${({ $variant: e }) =>
|
|
32
|
-
`,
|
|
31
|
+
${({ $variant: e }) => E[e]};
|
|
32
|
+
`, W = o.div`
|
|
33
33
|
padding: 2rem;
|
|
34
34
|
display: flex;
|
|
35
35
|
flex-direction: column;
|
|
@@ -41,7 +41,7 @@ const W = {
|
|
|
41
41
|
justify-content: space-between;
|
|
42
42
|
gap: ${({ theme: e }) => e.spacing.m};
|
|
43
43
|
flex-wrap: wrap;
|
|
44
|
-
`,
|
|
44
|
+
`, L = o(a)`
|
|
45
45
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
46
46
|
font-weight: 600;
|
|
47
47
|
font-size: ${({ theme: e }) => {
|
|
@@ -50,30 +50,37 @@ const W = {
|
|
|
50
50
|
}};
|
|
51
51
|
line-height: 1.75rem;
|
|
52
52
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
53
|
-
`,
|
|
53
|
+
`, V = o.div`
|
|
54
54
|
display: flex;
|
|
55
55
|
flex-direction: column;
|
|
56
56
|
gap: 0.85rem;
|
|
57
|
-
`,
|
|
57
|
+
`, M = o.div`
|
|
58
58
|
display: flex;
|
|
59
59
|
align-items: center;
|
|
60
60
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
61
61
|
flex-wrap: wrap;
|
|
62
|
-
|
|
62
|
+
span {
|
|
63
|
+
font-size: ${({ theme: e }) => {
|
|
64
|
+
var r;
|
|
65
|
+
return (r = e.typography.sizes) == null ? void 0 : r.s2;
|
|
66
|
+
}};
|
|
67
|
+
line-height: ${({ theme: e }) => e.typography.lineHeights.xs};
|
|
68
|
+
}
|
|
69
|
+
`, N = o.div`
|
|
63
70
|
display: flex;
|
|
64
71
|
align-items: baseline;
|
|
65
72
|
gap: ${({ theme: e }) => e.spacing.xxs};
|
|
66
|
-
`,
|
|
73
|
+
`, U = o(m).attrs(({ theme: e }) => ({
|
|
67
74
|
color: e.colors.grey.n350,
|
|
68
75
|
width: "18",
|
|
69
76
|
height: "20"
|
|
70
|
-
}))``,
|
|
77
|
+
}))``, X = o.span`
|
|
71
78
|
font-family: ${({ theme: e }) => e.fonts.english};
|
|
72
79
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
73
80
|
font-size: 2.706rem;
|
|
74
81
|
line-height: 3.158rem;
|
|
75
82
|
color: ${({ $color: e, theme: r }) => e ?? r.colors.grey.n800};
|
|
76
|
-
`,
|
|
83
|
+
`, q = o.span`
|
|
77
84
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
78
85
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
79
86
|
font-size: ${({ theme: e }) => {
|
|
@@ -82,7 +89,7 @@ const W = {
|
|
|
82
89
|
}};
|
|
83
90
|
line-height: 1.804rem;
|
|
84
91
|
color: ${({ $color: e, theme: r }) => e ?? r.colors.grey.n800};
|
|
85
|
-
`,
|
|
92
|
+
`, G = o(a)`
|
|
86
93
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
87
94
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
88
95
|
font-size: ${({ theme: e }) => {
|
|
@@ -91,12 +98,12 @@ const W = {
|
|
|
91
98
|
}};
|
|
92
99
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
93
100
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
94
|
-
`,
|
|
101
|
+
`, J = o.div`
|
|
95
102
|
padding: 2rem 2rem 2.5rem 2rem;
|
|
96
103
|
display: flex;
|
|
97
104
|
flex-direction: column;
|
|
98
105
|
gap: ${({ theme: e }) => e.spacing.m};
|
|
99
|
-
`,
|
|
106
|
+
`, K = o(a)`
|
|
100
107
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
101
108
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
102
109
|
font-size: ${({ theme: e }) => {
|
|
@@ -106,7 +113,7 @@ const W = {
|
|
|
106
113
|
line-height: 0.7rem;
|
|
107
114
|
color: ${({ theme: e }) => e.colors.grey.n650};
|
|
108
115
|
text-transform: uppercase;
|
|
109
|
-
`,
|
|
116
|
+
`, Q = o(a)`
|
|
110
117
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
111
118
|
font-weight: 500;
|
|
112
119
|
font-size: ${({ theme: e }) => {
|
|
@@ -115,35 +122,35 @@ const W = {
|
|
|
115
122
|
}};
|
|
116
123
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
117
124
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
118
|
-
`,
|
|
125
|
+
`, Y = o.div`
|
|
119
126
|
display: flex;
|
|
120
127
|
align-items: center;
|
|
121
128
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
122
|
-
`,
|
|
129
|
+
`, Z = o.span`
|
|
123
130
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
124
131
|
font-weight: ${({ theme: e }) => e.typography.weights.bold};
|
|
125
132
|
font-size: ${({ theme: e }) => e.typography.sizes.s9};
|
|
126
133
|
line-height: ${({ theme: e }) => e.typography.lineHeights.xl};
|
|
127
134
|
letter-spacing: ${({ theme: e }) => e.typography.letterSpacings.balancedNarrow};
|
|
128
135
|
color: ${({ theme: e }) => e.colors.grey.n350};
|
|
129
|
-
`,
|
|
136
|
+
`, _ = o.span`
|
|
130
137
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
131
138
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
132
139
|
font-size: ${({ theme: e }) => e.typography.sizes.s4};
|
|
133
140
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
134
141
|
color: ${({ theme: e }) => e.colors.grey.n350};
|
|
135
|
-
`,
|
|
142
|
+
`, O = o.ul`
|
|
136
143
|
list-style: none;
|
|
137
144
|
margin: 0;
|
|
138
145
|
padding: 0;
|
|
139
146
|
display: flex;
|
|
140
147
|
flex-direction: column;
|
|
141
148
|
gap: ${({ theme: e }) => e.spacing.s};
|
|
142
|
-
`,
|
|
149
|
+
`, A = o.li`
|
|
143
150
|
display: flex;
|
|
144
151
|
align-items: center;
|
|
145
152
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
146
|
-
`,
|
|
153
|
+
`, ee = o.span`
|
|
147
154
|
width: 1rem;
|
|
148
155
|
height: 1rem;
|
|
149
156
|
border-radius: 50%;
|
|
@@ -164,7 +171,7 @@ const W = {
|
|
|
164
171
|
border: 1px solid ${e.colors.secondary.pink.n450};
|
|
165
172
|
color: ${e.colors.secondary.pink.n450};
|
|
166
173
|
`}
|
|
167
|
-
`,
|
|
174
|
+
`, ie = o(a)`
|
|
168
175
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
169
176
|
font-weight: 400;
|
|
170
177
|
font-size: ${({ theme: e }) => {
|
|
@@ -173,7 +180,7 @@ const W = {
|
|
|
173
180
|
}};
|
|
174
181
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
175
182
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
176
|
-
`,
|
|
183
|
+
`, re = o.div`
|
|
177
184
|
width: 100%;
|
|
178
185
|
margin-top: 1rem;
|
|
179
186
|
display: flex;
|
|
@@ -183,136 +190,143 @@ const W = {
|
|
|
183
190
|
button {
|
|
184
191
|
width: 100%;
|
|
185
192
|
}
|
|
186
|
-
`,
|
|
193
|
+
`, fe = ({
|
|
187
194
|
title: e,
|
|
188
195
|
price: r,
|
|
189
196
|
description: y,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
197
|
+
hintComponent: $,
|
|
198
|
+
secondaryPrice: g,
|
|
199
|
+
features: u,
|
|
200
|
+
variant: b = "transparent",
|
|
193
201
|
badges: h = [],
|
|
194
|
-
showPrimaryAction:
|
|
202
|
+
showPrimaryAction: j = !1,
|
|
195
203
|
primaryAction: s,
|
|
196
|
-
showSecondaryAction:
|
|
197
|
-
secondaryAction:
|
|
198
|
-
showFeatures:
|
|
199
|
-
featuresTitle:
|
|
200
|
-
featuresDescription:
|
|
201
|
-
showAddons:
|
|
202
|
-
selectedAddon:
|
|
203
|
-
setSelectedAddon:
|
|
204
|
+
showSecondaryAction: w = !1,
|
|
205
|
+
secondaryAction: n,
|
|
206
|
+
showFeatures: v = !0,
|
|
207
|
+
featuresTitle: z = "FEATURES",
|
|
208
|
+
featuresDescription: C = "Everything in our free plan plus.....",
|
|
209
|
+
showAddons: k = !1,
|
|
210
|
+
selectedAddon: R = "Without",
|
|
211
|
+
setSelectedAddon: c,
|
|
204
212
|
addOnsData: f = [],
|
|
205
|
-
addonsTitle
|
|
206
|
-
addonsOptionalLabel
|
|
207
|
-
addonsMonthlyLabel:
|
|
208
|
-
}) => /* @__PURE__ */ i.jsxs(
|
|
209
|
-
/* @__PURE__ */ i.jsxs(
|
|
213
|
+
// addonsTitle = 'Personal Accountant',
|
|
214
|
+
// addonsOptionalLabel = 'optional',
|
|
215
|
+
addonsMonthlyLabel: F = "monthly"
|
|
216
|
+
}) => /* @__PURE__ */ i.jsxs(P, { $variant: b, children: [
|
|
217
|
+
/* @__PURE__ */ i.jsxs(W, { children: [
|
|
210
218
|
/* @__PURE__ */ i.jsxs(D, { children: [
|
|
211
|
-
/* @__PURE__ */ i.jsx(
|
|
212
|
-
h.length > 0 && /* @__PURE__ */ i.jsx(
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
219
|
+
/* @__PURE__ */ i.jsx(L, { children: e }),
|
|
220
|
+
h.length > 0 && /* @__PURE__ */ i.jsx(M, { children: h.map((t, l) => /* @__PURE__ */ i.jsx(
|
|
221
|
+
I,
|
|
222
|
+
{
|
|
223
|
+
label: t.label,
|
|
224
|
+
bgColor: t.bgColor,
|
|
225
|
+
color: t.color,
|
|
226
|
+
image: t.image ?? "",
|
|
227
|
+
weight: t.weight,
|
|
228
|
+
variant: t.variant
|
|
229
|
+
},
|
|
230
|
+
`${t.label}-${l}`
|
|
231
|
+
)) })
|
|
218
232
|
] }),
|
|
219
|
-
|
|
220
|
-
/* @__PURE__ */ i.jsx(
|
|
221
|
-
/* @__PURE__ */ i.jsx(
|
|
222
|
-
/* @__PURE__ */ i.jsx(
|
|
233
|
+
/* @__PURE__ */ i.jsxs(N, { children: [
|
|
234
|
+
/* @__PURE__ */ i.jsx(H, { src: B, alt: "Riyal" }),
|
|
235
|
+
/* @__PURE__ */ i.jsx(X, { $color: r.color, children: r.amount }),
|
|
236
|
+
/* @__PURE__ */ i.jsx(q, { $color: r.periodColor, children: r.period ?? "/ Month" })
|
|
223
237
|
] }),
|
|
224
|
-
/* @__PURE__ */ i.
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
238
|
+
g && /* @__PURE__ */ i.jsxs(Y, { children: [
|
|
239
|
+
/* @__PURE__ */ i.jsx(U, {}),
|
|
240
|
+
/* @__PURE__ */ i.jsx(Z, { children: g.amount }),
|
|
241
|
+
/* @__PURE__ */ i.jsx(_, { children: g.label })
|
|
228
242
|
] }),
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
justifyContent: "center",
|
|
267
|
-
gap: t.baseFare > 0 ? "2px" : "0",
|
|
268
|
-
minHeight: "42px",
|
|
269
|
-
boxShadow: n ? "0 1px 2px rgba(16, 24, 40, 0.08)" : "none"
|
|
270
|
-
},
|
|
271
|
-
children: [
|
|
272
|
-
/* @__PURE__ */ i.jsx("span", { children: t.titleEn }),
|
|
273
|
-
t.baseFare > 0 && /* @__PURE__ */ i.jsxs(
|
|
274
|
-
"span",
|
|
275
|
-
{
|
|
276
|
-
style: {
|
|
277
|
-
fontSize: "10px",
|
|
278
|
-
marginTop: "2px",
|
|
279
|
-
color: n ? "#101828" : "#667085",
|
|
280
|
-
fontWeight: 700,
|
|
281
|
-
display: "inline-flex",
|
|
282
|
-
alignItems: "center",
|
|
283
|
-
gap: "2px"
|
|
284
|
-
},
|
|
285
|
-
children: [
|
|
286
|
-
/* @__PURE__ */ i.jsx(m, { width: "9", height: "9", color: n ? "#101828" : "#667085" }),
|
|
287
|
-
t.baseFare,
|
|
288
|
-
" ",
|
|
289
|
-
S
|
|
290
|
-
]
|
|
291
|
-
}
|
|
292
|
-
)
|
|
293
|
-
]
|
|
243
|
+
/* @__PURE__ */ i.jsx(G, { children: y }),
|
|
244
|
+
k && f.length > 0 && /* @__PURE__ */ i.jsx("div", { style: { marginTop: "0.50rem" }, children: /* @__PURE__ */ i.jsx(
|
|
245
|
+
"div",
|
|
246
|
+
{
|
|
247
|
+
style: {
|
|
248
|
+
backgroundColor: "#f5f7fb",
|
|
249
|
+
borderRadius: "9px",
|
|
250
|
+
padding: "4px",
|
|
251
|
+
display: "grid",
|
|
252
|
+
gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
|
|
253
|
+
gap: "4px"
|
|
254
|
+
},
|
|
255
|
+
children: f.map((t) => {
|
|
256
|
+
const l = R === t.id;
|
|
257
|
+
return /* @__PURE__ */ i.jsxs(
|
|
258
|
+
"button",
|
|
259
|
+
{
|
|
260
|
+
type: "button",
|
|
261
|
+
onClick: () => c == null ? void 0 : c(t.id),
|
|
262
|
+
style: {
|
|
263
|
+
padding: "8px 6px 7px",
|
|
264
|
+
border: l ? "1px solid #e4e7ec" : "1px solid transparent",
|
|
265
|
+
backgroundColor: l ? "#ffffff" : "transparent",
|
|
266
|
+
color: l ? "#16181c" : "#72788e",
|
|
267
|
+
borderRadius: "6px",
|
|
268
|
+
cursor: "pointer",
|
|
269
|
+
fontWeight: 600,
|
|
270
|
+
fontSize: "12.78px",
|
|
271
|
+
lineHeight: 1.1,
|
|
272
|
+
transition: "all 0.18s ease",
|
|
273
|
+
display: "flex",
|
|
274
|
+
flexDirection: "column",
|
|
275
|
+
alignItems: "center",
|
|
276
|
+
justifyContent: "center",
|
|
277
|
+
gap: "2px",
|
|
278
|
+
minHeight: "42px",
|
|
279
|
+
boxShadow: l ? "0 1px 2px rgba(16, 24, 40, 0.08)" : "none"
|
|
294
280
|
},
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ i.jsx("span", { children: t.titleEn }),
|
|
283
|
+
/* @__PURE__ */ i.jsxs(
|
|
284
|
+
"span",
|
|
285
|
+
{
|
|
286
|
+
style: {
|
|
287
|
+
fontSize: "11px",
|
|
288
|
+
marginTop: "2px",
|
|
289
|
+
color: "#16181c",
|
|
290
|
+
fontWeight: 600,
|
|
291
|
+
display: "inline-flex",
|
|
292
|
+
alignItems: "center",
|
|
293
|
+
gap: "2px"
|
|
294
|
+
},
|
|
295
|
+
children: [
|
|
296
|
+
/* @__PURE__ */ i.jsx(m, { width: "9", height: "9", color: "#16181c" }),
|
|
297
|
+
t.baseFare,
|
|
298
|
+
" ",
|
|
299
|
+
F
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
)
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
t.id
|
|
306
|
+
);
|
|
307
|
+
})
|
|
308
|
+
}
|
|
309
|
+
) }),
|
|
310
|
+
/* @__PURE__ */ i.jsxs(re, { children: [
|
|
311
|
+
j && /* @__PURE__ */ i.jsx(d, { variant: (s == null ? void 0 : s.variant) ?? "primary", onClick: s == null ? void 0 : s.onPrimaryActionClick, children: s == null ? void 0 : s.label }),
|
|
312
|
+
w && /* @__PURE__ */ i.jsx(d, { variant: (n == null ? void 0 : n.variant) ?? "light-primary", onClick: n == null ? void 0 : n.onSecondaryActionClick, children: n == null ? void 0 : n.label })
|
|
300
313
|
] })
|
|
301
314
|
] }),
|
|
302
|
-
|
|
303
|
-
/* @__PURE__ */ i.jsxs(
|
|
304
|
-
/* @__PURE__ */ i.jsx(
|
|
305
|
-
/* @__PURE__ */ i.jsx(
|
|
315
|
+
v && /* @__PURE__ */ i.jsxs(J, { children: [
|
|
316
|
+
/* @__PURE__ */ i.jsxs(V, { children: [
|
|
317
|
+
/* @__PURE__ */ i.jsx(K, { children: z }),
|
|
318
|
+
/* @__PURE__ */ i.jsx(Q, { children: C })
|
|
306
319
|
] }),
|
|
307
|
-
|
|
320
|
+
$,
|
|
321
|
+
/* @__PURE__ */ i.jsx(O, { children: u.map((t, l) => {
|
|
308
322
|
const x = t.variant ?? "included";
|
|
309
|
-
return /* @__PURE__ */ i.jsxs(
|
|
310
|
-
/* @__PURE__ */ i.jsx(
|
|
311
|
-
/* @__PURE__ */ i.jsx(
|
|
312
|
-
] }, `${t.label}-${
|
|
323
|
+
return /* @__PURE__ */ i.jsxs(A, { children: [
|
|
324
|
+
/* @__PURE__ */ i.jsx(ee, { $variant: x, children: x === "included" ? /* @__PURE__ */ i.jsx(S, {}) : /* @__PURE__ */ i.jsx(T, {}) }),
|
|
325
|
+
/* @__PURE__ */ i.jsx(ie, { children: t.label })
|
|
326
|
+
] }, `${t.label}-${l}`);
|
|
313
327
|
}) })
|
|
314
328
|
] })
|
|
315
329
|
] });
|
|
316
330
|
export {
|
|
317
|
-
|
|
331
|
+
fe as default
|
|
318
332
|
};
|
|
@@ -97,6 +97,7 @@ const v = n.div`
|
|
|
97
97
|
background-color: ${({ theme: r }) => r.colors.grey.n150};
|
|
98
98
|
color: ${({ theme: r }) => r.colors.grey.n350};
|
|
99
99
|
font-size: ${({ theme: r }) => r.typography.sizes.s4};
|
|
100
|
+
width: 100%;
|
|
100
101
|
|
|
101
102
|
&:focus-visible {
|
|
102
103
|
outline: none;
|
|
@@ -136,11 +137,11 @@ const v = n.div`
|
|
|
136
137
|
}}
|
|
137
138
|
margin-bottom: ${({ theme: r }) => r.spacing.sm};
|
|
138
139
|
`, jr = (r) => {
|
|
139
|
-
const { logoSrc: C, searchPlaceHolder: k, categories: p, linkComponent: f, open: z, setOpen: T, currentPath:
|
|
140
|
+
const { logoSrc: C, searchPlaceHolder: k, categories: p, linkComponent: f, open: z, setOpen: T, currentPath: h, extraSideMenuItems: l, onLogoClick: E } = r, a = X(), { t: D } = M(), L = K("sidemenu"), [c, B] = m(""), [t, F] = m(p), g = (i) => {
|
|
140
141
|
const e = [];
|
|
141
142
|
p == null || p.forEach((d) => {
|
|
142
|
-
var
|
|
143
|
-
const s = (
|
|
143
|
+
var u;
|
|
144
|
+
const s = (u = d == null ? void 0 : d.navItems) == null ? void 0 : u.filter((x) => {
|
|
144
145
|
var $, y;
|
|
145
146
|
return (y = ($ = x == null ? void 0 : x.title) == null ? void 0 : $.toLowerCase()) == null ? void 0 : y.includes(i == null ? void 0 : i.toLowerCase());
|
|
146
147
|
});
|
|
@@ -187,13 +188,13 @@ const v = n.div`
|
|
|
187
188
|
var e, d;
|
|
188
189
|
return ((e = i == null ? void 0 : i.navItems) == null ? void 0 : e.length) === 0 ? null : /* @__PURE__ */ o.jsxs(rr, { className: i == null ? void 0 : i.code, children: [
|
|
189
190
|
/* @__PURE__ */ o.jsx(ir, { variant: "xsText", color: a.colors.grey.n300, children: i == null ? void 0 : i.title }),
|
|
190
|
-
(d = i == null ? void 0 : i.navItems) == null ? void 0 : d.map((s) => /* @__PURE__ */ o.jsx(j, { to: (s == null ? void 0 : s.path) ?? "/", component: f, wrapper: !0, children: /* @__PURE__ */ o.jsx(b, { item: { variant: "normal", active: W(s.path,
|
|
191
|
+
(d = i == null ? void 0 : i.navItems) == null ? void 0 : d.map((s) => /* @__PURE__ */ o.jsx(j, { to: (s == null ? void 0 : s.path) ?? "/", component: f, wrapper: !0, children: /* @__PURE__ */ o.jsx(b, { item: { variant: "normal", active: W(s.path, h), ...s } }) }, s == null ? void 0 : s.path))
|
|
191
192
|
] }, i == null ? void 0 : i.title);
|
|
192
193
|
}))
|
|
193
194
|
] }),
|
|
194
195
|
/* @__PURE__ */ o.jsxs(nr, { children: [
|
|
195
196
|
(l == null ? void 0 : l.length) > 0 && /* @__PURE__ */ o.jsx(sr, { color: a.colors.grey.n150 }),
|
|
196
|
-
l == null ? void 0 : l.map((i) => /* @__PURE__ */ o.jsx(j, { to: (i == null ? void 0 : i.path) ?? "/", component: f, wrapper: !0, children: /* @__PURE__ */ o.jsx(b, { item: { variant: "normal", active:
|
|
197
|
+
l == null ? void 0 : l.map((i) => /* @__PURE__ */ o.jsx(j, { to: (i == null ? void 0 : i.path) ?? "/", component: f, wrapper: !0, children: /* @__PURE__ */ o.jsx(b, { item: { variant: "normal", active: h === i.path, ...i } }) }, i == null ? void 0 : i.path))
|
|
197
198
|
] })
|
|
198
199
|
] })
|
|
199
200
|
] });
|