qaema-ui 0.0.68 → 0.0.71
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/PriceCard.js +38 -33
- package/package.json +1 -1
|
@@ -3,11 +3,11 @@ import "react";
|
|
|
3
3
|
import t, { css as u } from "styled-components";
|
|
4
4
|
import x from "../assets/icons/RiyalIcon.js";
|
|
5
5
|
import { CurrencyContainer as W } from "../styles/Currency.styles.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import L from "../assets/svg/Riyal.svg.js";
|
|
7
|
+
import M from "./Badge.js";
|
|
8
8
|
import b from "./Button.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import P from "./FeaturesList.js";
|
|
10
|
+
import h from "./Typography.js";
|
|
11
11
|
const N = {
|
|
12
12
|
transparent: u`
|
|
13
13
|
background: rgba(255, 255, 255, 0.72);
|
|
@@ -44,7 +44,7 @@ const N = {
|
|
|
44
44
|
gap: ${({ theme: e }) => e.spacing.s};
|
|
45
45
|
flex-wrap: wrap;
|
|
46
46
|
padding-right: ${({ $hasRibbon: e }) => e ? "8rem" : "0"};
|
|
47
|
-
`, q = t(
|
|
47
|
+
`, q = t(h)`
|
|
48
48
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
49
49
|
font-weight: 600;
|
|
50
50
|
font-size: ${({ theme: e }) => {
|
|
@@ -111,7 +111,7 @@ const N = {
|
|
|
111
111
|
}};
|
|
112
112
|
line-height: 1.804rem;
|
|
113
113
|
color: ${({ $color: e, theme: o }) => e ?? o.colors.grey.n800};
|
|
114
|
-
`, Z = t(
|
|
114
|
+
`, Z = t(h)`
|
|
115
115
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
116
116
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
117
117
|
font-size: ${({ theme: e }) => {
|
|
@@ -125,7 +125,7 @@ const N = {
|
|
|
125
125
|
display: flex;
|
|
126
126
|
flex-direction: column;
|
|
127
127
|
gap: ${({ theme: e }) => e.spacing.s};
|
|
128
|
-
`, A = t(
|
|
128
|
+
`, A = t(h)`
|
|
129
129
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
130
130
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
131
131
|
font-size: ${({ theme: e }) => {
|
|
@@ -135,7 +135,7 @@ const N = {
|
|
|
135
135
|
line-height: 0.7rem;
|
|
136
136
|
color: ${({ theme: e }) => e.colors.grey.n650};
|
|
137
137
|
text-transform: uppercase;
|
|
138
|
-
`, ee = t(
|
|
138
|
+
`, ee = t(h)`
|
|
139
139
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
140
140
|
font-weight: 500;
|
|
141
141
|
font-size: ${({ theme: e }) => {
|
|
@@ -151,12 +151,13 @@ const N = {
|
|
|
151
151
|
`, d = t.span`
|
|
152
152
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
153
153
|
font-weight: ${({ theme: e }) => e.typography.weights.bold};
|
|
154
|
-
font-size: ${({
|
|
154
|
+
font-size: ${({ $isDiscounted: e, theme: o }) => e ? "1.50rem" : o.typography.sizes.s9};
|
|
155
155
|
line-height: ${({ theme: e }) => e.typography.lineHeights.xl};
|
|
156
156
|
letter-spacing: ${({ theme: e }) => e.typography.letterSpacings.balancedNarrow};
|
|
157
157
|
color: ${({ theme: e }) => e.colors.grey.n350};
|
|
158
158
|
`, oe = t(d)`
|
|
159
159
|
text-decoration: line-through;
|
|
160
|
+
font-size: 1.5rem;
|
|
160
161
|
`, te = t.span`
|
|
161
162
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
162
163
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
@@ -176,6 +177,7 @@ const N = {
|
|
|
176
177
|
font-size: 16px;
|
|
177
178
|
`, ne = t(d)`
|
|
178
179
|
color: #17954f;
|
|
180
|
+
font-size: 16px;
|
|
179
181
|
`, se = t(x).attrs({
|
|
180
182
|
color: "#17954f",
|
|
181
183
|
width: "16",
|
|
@@ -195,8 +197,8 @@ const N = {
|
|
|
195
197
|
price: o,
|
|
196
198
|
description: z,
|
|
197
199
|
hintComponent: v,
|
|
198
|
-
secondaryPrice:
|
|
199
|
-
discount:
|
|
200
|
+
secondaryPrice: l,
|
|
201
|
+
discount: g,
|
|
200
202
|
discountLabel: m,
|
|
201
203
|
features: C,
|
|
202
204
|
variant: R = "transparent",
|
|
@@ -208,8 +210,8 @@ const N = {
|
|
|
208
210
|
showFeatures: S = !0,
|
|
209
211
|
featuresTitle: H = "FEATURES",
|
|
210
212
|
featuresDescription: T = "Everything in our free plan plus.....",
|
|
211
|
-
showAddons:
|
|
212
|
-
selectedAddon:
|
|
213
|
+
showAddons: D = !1,
|
|
214
|
+
selectedAddon: F = "Without",
|
|
213
215
|
setSelectedAddon: c,
|
|
214
216
|
addOnsData: y = [],
|
|
215
217
|
// addonsTitle = 'Personal Accountant',
|
|
@@ -223,8 +225,8 @@ const N = {
|
|
|
223
225
|
/* @__PURE__ */ i.jsxs(U, { children: [
|
|
224
226
|
/* @__PURE__ */ i.jsxs(V, { $hasRibbon: !!p, $hasMultipleBadges: f.length > 1, children: [
|
|
225
227
|
/* @__PURE__ */ i.jsx(q, { children: e }),
|
|
226
|
-
$.length > 0 && /* @__PURE__ */ i.jsx(J, { children: $.map((r,
|
|
227
|
-
|
|
228
|
+
$.length > 0 && /* @__PURE__ */ i.jsx(J, { children: $.map((r, a) => /* @__PURE__ */ i.jsx(
|
|
229
|
+
M,
|
|
228
230
|
{
|
|
229
231
|
label: r.label,
|
|
230
232
|
bgColor: r.bgColor,
|
|
@@ -233,30 +235,33 @@ const N = {
|
|
|
233
235
|
weight: r.weight,
|
|
234
236
|
variant: r.variant
|
|
235
237
|
},
|
|
236
|
-
`${r.label}-${
|
|
238
|
+
`${r.label}-${a}`
|
|
237
239
|
)) })
|
|
238
240
|
] }),
|
|
239
241
|
/* @__PURE__ */ i.jsxs(Q, { children: [
|
|
240
|
-
/* @__PURE__ */ i.jsx(W, { src:
|
|
242
|
+
/* @__PURE__ */ i.jsx(W, { src: L, alt: "Riyal" }),
|
|
241
243
|
/* @__PURE__ */ i.jsx(X, { $color: o.color, children: o.amount }),
|
|
242
244
|
/* @__PURE__ */ i.jsx(Y, { $color: o.periodColor, children: o.period ?? "/ Month" })
|
|
243
245
|
] }),
|
|
244
|
-
|
|
245
|
-
|
|
246
|
+
l && /* @__PURE__ */ i.jsxs(ie, { children: [
|
|
247
|
+
l.originalAmount && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
246
248
|
/* @__PURE__ */ i.jsx(w, {}),
|
|
247
|
-
/* @__PURE__ */ i.
|
|
249
|
+
/* @__PURE__ */ i.jsxs(oe, { children: [
|
|
250
|
+
l.originalAmount,
|
|
251
|
+
" "
|
|
252
|
+
] })
|
|
248
253
|
] }),
|
|
249
254
|
/* @__PURE__ */ i.jsx(w, {}),
|
|
250
|
-
/* @__PURE__ */ i.jsx(d, { children:
|
|
251
|
-
/* @__PURE__ */ i.jsx(te, { children:
|
|
255
|
+
/* @__PURE__ */ i.jsx(d, { $isDiscounted: !!(g && l.originalAmount), children: l.amount }),
|
|
256
|
+
/* @__PURE__ */ i.jsx(te, { children: l.label })
|
|
252
257
|
] }),
|
|
253
|
-
|
|
254
|
-
/* @__PURE__ */ i.jsx(j, { children:
|
|
255
|
-
/* @__PURE__ */ i.jsx(se, {}),
|
|
256
|
-
/* @__PURE__ */ i.jsx(ne, { children:
|
|
258
|
+
g ? /* @__PURE__ */ i.jsxs(re, { children: [
|
|
259
|
+
/* @__PURE__ */ i.jsx(j, { children: g.label }),
|
|
260
|
+
/* @__PURE__ */ i.jsx(se, { style: { width: "14px", height: "16px" } }),
|
|
261
|
+
/* @__PURE__ */ i.jsx(ne, { children: g.amount })
|
|
257
262
|
] }) : m && /* @__PURE__ */ i.jsx(j, { children: m }),
|
|
258
263
|
/* @__PURE__ */ i.jsx(Z, { children: z }),
|
|
259
|
-
|
|
264
|
+
D && y.length > 0 && /* @__PURE__ */ i.jsx("div", { style: { marginTop: "0.50rem" }, children: /* @__PURE__ */ i.jsx(
|
|
260
265
|
"div",
|
|
261
266
|
{
|
|
262
267
|
style: {
|
|
@@ -268,7 +273,7 @@ const N = {
|
|
|
268
273
|
gap: "4px"
|
|
269
274
|
},
|
|
270
275
|
children: y.map((r) => {
|
|
271
|
-
const
|
|
276
|
+
const a = F === r.id;
|
|
272
277
|
return /* @__PURE__ */ i.jsxs(
|
|
273
278
|
"button",
|
|
274
279
|
{
|
|
@@ -276,9 +281,9 @@ const N = {
|
|
|
276
281
|
onClick: () => c == null ? void 0 : c(r.id),
|
|
277
282
|
style: {
|
|
278
283
|
padding: "8px 6px 7px",
|
|
279
|
-
border:
|
|
280
|
-
backgroundColor:
|
|
281
|
-
color:
|
|
284
|
+
border: a ? "1px solid #e4e7ec" : "1px solid transparent",
|
|
285
|
+
backgroundColor: a ? "#ffffff" : "transparent",
|
|
286
|
+
color: a ? "#16181c" : "#72788e",
|
|
282
287
|
borderRadius: "6px",
|
|
283
288
|
cursor: "pointer",
|
|
284
289
|
fontWeight: 600,
|
|
@@ -291,7 +296,7 @@ const N = {
|
|
|
291
296
|
justifyContent: "center",
|
|
292
297
|
gap: "2px",
|
|
293
298
|
minHeight: "42px",
|
|
294
|
-
boxShadow:
|
|
299
|
+
boxShadow: a ? "0 1px 2px rgba(16, 24, 40, 0.08)" : "none"
|
|
295
300
|
},
|
|
296
301
|
children: [
|
|
297
302
|
/* @__PURE__ */ i.jsx("span", { children: r.titleEn }),
|
|
@@ -334,7 +339,7 @@ const N = {
|
|
|
334
339
|
/* @__PURE__ */ i.jsx(ee, { children: T })
|
|
335
340
|
] }),
|
|
336
341
|
v,
|
|
337
|
-
/* @__PURE__ */ i.jsx(
|
|
342
|
+
/* @__PURE__ */ i.jsx(P, { features: C })
|
|
338
343
|
] })
|
|
339
344
|
] });
|
|
340
345
|
};
|