qaema-ui 0.0.76 → 0.0.78
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,22 +1,22 @@
|
|
|
1
1
|
import { j as t } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useState as b, useId as X, useEffect as
|
|
2
|
+
import { useState as b, useId as X, useEffect as z, useMemo as Y } from "react";
|
|
3
3
|
import { useTranslation as H } from "react-i18next";
|
|
4
4
|
import { Tooltip as D } from "../../../node_modules/react-tooltip/dist/react-tooltip.min.js";
|
|
5
5
|
import k from "../../Spinner.js";
|
|
6
6
|
import F from "../../Pagination.js";
|
|
7
7
|
import R from "../../Typography.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { TableContainer as ee, LoadingOverlay as te, TablesWrapper as ne, DataScrollBox as se, StyledTable as re, TableBody as
|
|
11
|
-
function
|
|
8
|
+
import L, { CheckboxCell as w } from "./components/CellComponents.js";
|
|
9
|
+
import O from "./components/TableHead.js";
|
|
10
|
+
import { TableContainer as ee, LoadingOverlay as te, TablesWrapper as ne, DataScrollBox as se, StyledTable as re, TableBody as W, EmptyState as le, TableRow as N, TableCellContainer as C, ActionsTable as ie, TableFooter as ce } from "./Table.styles.js";
|
|
11
|
+
function $e({
|
|
12
12
|
columns: S,
|
|
13
13
|
data: n,
|
|
14
14
|
keyField: i,
|
|
15
15
|
selectable: p = !1,
|
|
16
16
|
onRowSelect: x,
|
|
17
|
-
rowActions:
|
|
17
|
+
rowActions: f,
|
|
18
18
|
stickyHeader: T = !1,
|
|
19
|
-
loading:
|
|
19
|
+
loading: u = !1,
|
|
20
20
|
emptyStateMessage: K,
|
|
21
21
|
pagination: l,
|
|
22
22
|
onRowClick: j,
|
|
@@ -26,40 +26,40 @@ function ge({
|
|
|
26
26
|
alignHeader: B = "start",
|
|
27
27
|
// Dropdown related props
|
|
28
28
|
isTableHeadVisible: M = !1,
|
|
29
|
-
isRowSelected:
|
|
29
|
+
isRowSelected: I,
|
|
30
30
|
getRowTooltip: m
|
|
31
31
|
}) {
|
|
32
|
-
const [h,
|
|
33
|
-
|
|
32
|
+
const [h, g] = b([]), [A, $] = b(_), [V, E] = b(null), { t: Z } = H(), y = X();
|
|
33
|
+
z(() => {
|
|
34
34
|
const e = () => {
|
|
35
|
-
|
|
35
|
+
E(null);
|
|
36
36
|
};
|
|
37
37
|
return document.addEventListener("click", e), () => {
|
|
38
38
|
document.removeEventListener("click", e);
|
|
39
39
|
};
|
|
40
|
-
}, []),
|
|
40
|
+
}, []), z(() => {
|
|
41
41
|
const e = () => {
|
|
42
42
|
const s = window.innerWidth;
|
|
43
|
-
s < 576 ?
|
|
43
|
+
s < 576 ? $("sm") : s < 992 ? $("md") : $("lg");
|
|
44
44
|
};
|
|
45
45
|
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
46
46
|
}, []);
|
|
47
|
-
const v = Y(() => S.filter((e) => typeof e.hidden == "function" ? !e.hidden(
|
|
48
|
-
h.length === n.length ?
|
|
47
|
+
const v = Y(() => S.filter((e) => typeof e.hidden == "function" ? !e.hidden(A) : !e.hidden), [S, A]), q = () => {
|
|
48
|
+
h.length === n.length ? g([]) : g([...n]), x && x(h.length === n.length ? [] : [...n]);
|
|
49
49
|
}, G = (e) => {
|
|
50
50
|
const s = h.filter((r) => e[i] === r[i]);
|
|
51
51
|
return s && s.length > 0;
|
|
52
52
|
}, J = (e) => {
|
|
53
53
|
const s = h.some((d) => d[i] === e[i]);
|
|
54
54
|
let r;
|
|
55
|
-
s ? r = h.filter((d) => d[i] !== e[i]) : r = [...h, e],
|
|
55
|
+
s ? r = h.filter((d) => d[i] !== e[i]) : r = [...h, e], g(r), x && x(r);
|
|
56
56
|
};
|
|
57
57
|
return /* @__PURE__ */ t.jsxs(ee, { children: [
|
|
58
|
-
|
|
58
|
+
u && /* @__PURE__ */ t.jsx(te, { children: /* @__PURE__ */ t.jsx(k, { size: "3rem" }) }),
|
|
59
59
|
/* @__PURE__ */ t.jsxs(ne, { children: [
|
|
60
60
|
/* @__PURE__ */ t.jsx(se, { children: /* @__PURE__ */ t.jsxs(re, { children: [
|
|
61
61
|
M && /* @__PURE__ */ t.jsx(
|
|
62
|
-
|
|
62
|
+
O,
|
|
63
63
|
{
|
|
64
64
|
data: n,
|
|
65
65
|
handleSelectAll: q,
|
|
@@ -69,11 +69,11 @@ function ge({
|
|
|
69
69
|
rowActions: void 0,
|
|
70
70
|
stickyHeader: T,
|
|
71
71
|
selectable: p,
|
|
72
|
-
loading:
|
|
72
|
+
loading: u
|
|
73
73
|
}
|
|
74
74
|
),
|
|
75
|
-
/* @__PURE__ */ t.jsx(
|
|
76
|
-
const r = (o == null ? void 0 : o(e)) ?? !1, d =
|
|
75
|
+
/* @__PURE__ */ t.jsx(W, { children: n.length === 0 ? /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx("td", { colSpan: (p ? 1 : 0) + v.length, children: /* @__PURE__ */ t.jsx(le, { children: /* @__PURE__ */ t.jsx(R, { variant: "mdText", children: K ?? Z("NO_DATA_AVAILABLE") }) }) }) }) : n == null ? void 0 : n.map((e, s) => {
|
|
76
|
+
const r = (o == null ? void 0 : o(e)) ?? !1, d = I ? I(e) : h.some((c) => c[i] === e[i]), P = e[i], Q = (a == null ? void 0 : a(e, s)) ?? "", U = (m == null ? void 0 : m(e)) ? `${y}-${String(P)}` : void 0;
|
|
77
77
|
return /* @__PURE__ */ t.jsxs(
|
|
78
78
|
N,
|
|
79
79
|
{
|
|
@@ -97,7 +97,7 @@ function ge({
|
|
|
97
97
|
}
|
|
98
98
|
) }),
|
|
99
99
|
v.map((c) => /* @__PURE__ */ t.jsx(C, { $align: c.align, children: /* @__PURE__ */ t.jsx(
|
|
100
|
-
|
|
100
|
+
L,
|
|
101
101
|
{
|
|
102
102
|
column: c,
|
|
103
103
|
row: e,
|
|
@@ -115,9 +115,9 @@ function ge({
|
|
|
115
115
|
);
|
|
116
116
|
}) })
|
|
117
117
|
] }) }),
|
|
118
|
-
|
|
118
|
+
f && f.length > 0 && /* @__PURE__ */ t.jsxs(ie, { children: [
|
|
119
119
|
/* @__PURE__ */ t.jsx(
|
|
120
|
-
|
|
120
|
+
O,
|
|
121
121
|
{
|
|
122
122
|
data: n,
|
|
123
123
|
handleSelectAll: () => {
|
|
@@ -125,24 +125,24 @@ function ge({
|
|
|
125
125
|
selectedRows: h,
|
|
126
126
|
visibleColumns: [],
|
|
127
127
|
alignHeader: B,
|
|
128
|
-
rowActions:
|
|
128
|
+
rowActions: f,
|
|
129
129
|
stickyHeader: T,
|
|
130
130
|
selectable: !1,
|
|
131
|
-
loading:
|
|
131
|
+
loading: u
|
|
132
132
|
}
|
|
133
133
|
),
|
|
134
|
-
/* @__PURE__ */ t.jsx(
|
|
134
|
+
/* @__PURE__ */ t.jsx(W, { children: n.length === 0 ? /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsx("div", { style: { height: "3.5rem" } }) }) }) : n == null ? void 0 : n.map((e) => {
|
|
135
135
|
const s = (o == null ? void 0 : o(e)) ?? !1;
|
|
136
136
|
return /* @__PURE__ */ t.jsx(N, { $disabled: s, children: /* @__PURE__ */ t.jsx(C, { $align: "center", $isActionCell: !0, children: /* @__PURE__ */ t.jsx(
|
|
137
|
-
|
|
137
|
+
L,
|
|
138
138
|
{
|
|
139
139
|
row: e,
|
|
140
140
|
type: "icon",
|
|
141
141
|
iconOptions: {
|
|
142
142
|
keyField: i,
|
|
143
|
-
rowActions:
|
|
143
|
+
rowActions: f,
|
|
144
144
|
activeDropdown: V,
|
|
145
|
-
setActiveDropdown:
|
|
145
|
+
setActiveDropdown: E
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
) }) }, `action-${e[i]}`);
|
|
@@ -152,8 +152,8 @@ function ge({
|
|
|
152
152
|
m && n.map((e) => {
|
|
153
153
|
const s = m(e);
|
|
154
154
|
if (!s) return null;
|
|
155
|
-
const r = e[i], d = `${
|
|
156
|
-
return /* @__PURE__ */ t.jsx(D, { id: d, content: s }, d);
|
|
155
|
+
const r = e[i], d = `${y}-${String(r)}`;
|
|
156
|
+
return /* @__PURE__ */ t.jsx(D, { id: d, content: s, positionStrategy: "fixed", style: { zIndex: 9999 } }, d);
|
|
157
157
|
}),
|
|
158
158
|
l && l.enabled && /* @__PURE__ */ t.jsx(ce, { children: /* @__PURE__ */ t.jsx(
|
|
159
159
|
F,
|
|
@@ -161,7 +161,7 @@ function ge({
|
|
|
161
161
|
currentPage: l.currentPage,
|
|
162
162
|
totalPages: l.totalPages,
|
|
163
163
|
onChange: l.onPageChange,
|
|
164
|
-
disabled:
|
|
164
|
+
disabled: u,
|
|
165
165
|
hidePrevButton: l.hidePrevButton,
|
|
166
166
|
hideNextButton: l.hideNextButton,
|
|
167
167
|
siblingCount: l.siblingCount,
|
|
@@ -175,5 +175,5 @@ function ge({
|
|
|
175
175
|
] });
|
|
176
176
|
}
|
|
177
177
|
export {
|
|
178
|
-
|
|
178
|
+
$e as default
|
|
179
179
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { j as i } from "../_virtual/jsx-runtime.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import
|
|
3
|
+
import o, { css as b } from "styled-components";
|
|
4
4
|
import x from "../assets/icons/RiyalIcon.js";
|
|
5
5
|
import { CurrencyContainer as W } from "../styles/Currency.styles.js";
|
|
6
6
|
import L from "../assets/svg/Riyal.svg.js";
|
|
7
7
|
import M from "./Badge.js";
|
|
8
|
-
import
|
|
8
|
+
import u from "./Button.js";
|
|
9
9
|
import P from "./FeaturesList.js";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
transparent:
|
|
10
|
+
import g from "./Typography.js";
|
|
11
|
+
const q = {
|
|
12
|
+
transparent: b`
|
|
13
13
|
background: rgba(255, 255, 255, 0.72);
|
|
14
14
|
border: 1px solid ${({ theme: e }) => e.colors.grey.n200};
|
|
15
15
|
box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
|
|
16
16
|
`,
|
|
17
|
-
purple:
|
|
17
|
+
purple: b`
|
|
18
18
|
background: linear-gradient(360deg, #ffffff 63.12%, #f1eeff 100%);
|
|
19
19
|
border: 1px solid #e3deff;
|
|
20
20
|
box-shadow:
|
|
21
21
|
0px 4px 6px -2px #10182808,
|
|
22
22
|
0px 12px 16px -4px #10182814;
|
|
23
23
|
`
|
|
24
|
-
},
|
|
24
|
+
}, N = o.div`
|
|
25
25
|
position: relative;
|
|
26
26
|
width: 100%;
|
|
27
27
|
max-width: 28.458rem;
|
|
@@ -30,51 +30,59 @@ const N = {
|
|
|
30
30
|
overflow: hidden;
|
|
31
31
|
display: flex;
|
|
32
32
|
flex-direction: column;
|
|
33
|
-
${({ $variant: e }) =>
|
|
34
|
-
`,
|
|
33
|
+
${({ $variant: e }) => q[e]};
|
|
34
|
+
`, O = o.div`
|
|
35
35
|
padding: 25px;
|
|
36
36
|
display: flex;
|
|
37
37
|
flex-direction: column;
|
|
38
38
|
gap: ${({ theme: e }) => e.spacing.sm};
|
|
39
39
|
border-bottom: 1px solid ${({ theme: e }) => e.colors.grey.n200};
|
|
40
|
-
`,
|
|
40
|
+
`, U = o.div`
|
|
41
41
|
display: flex;
|
|
42
42
|
align-items: center;
|
|
43
43
|
justify-content: ${({ $hasMultipleBadges: e }) => e ? "flex-start" : "space-between"};
|
|
44
44
|
gap: ${({ theme: e }) => e.spacing.s};
|
|
45
45
|
flex-wrap: wrap;
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
min-width: 0;
|
|
47
|
+
/* The ribbon is absolutely positioned at the top inline-end corner, so push
|
|
48
|
+
the whole header below it instead of squeezing the content beside it. */
|
|
49
|
+
padding-block-start: ${({ $hasRibbon: e }) => e ? "2rem" : "0"};
|
|
50
|
+
`, V = o(g)`
|
|
48
51
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
49
52
|
font-weight: 600;
|
|
50
53
|
font-size: ${({ theme: e }) => {
|
|
51
|
-
var
|
|
52
|
-
return (
|
|
54
|
+
var t;
|
|
55
|
+
return (t = e.typography.sizes) == null ? void 0 : t.s3;
|
|
53
56
|
}};
|
|
54
57
|
line-height: 1.75rem;
|
|
55
58
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
min-width: 0;
|
|
60
|
+
overflow-wrap: anywhere;
|
|
61
|
+
`, G = o.div`
|
|
58
62
|
display: flex;
|
|
59
63
|
flex-direction: column;
|
|
60
64
|
gap: 0.85rem;
|
|
61
|
-
`, J =
|
|
65
|
+
`, J = o.div`
|
|
62
66
|
display: flex;
|
|
63
67
|
align-items: center;
|
|
64
68
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
65
|
-
flex-wrap:
|
|
69
|
+
flex-wrap: wrap;
|
|
70
|
+
min-width: 0;
|
|
66
71
|
span {
|
|
67
72
|
font-size: ${({ theme: e }) => {
|
|
68
|
-
var
|
|
69
|
-
return (
|
|
73
|
+
var t;
|
|
74
|
+
return (t = e.typography.sizes) == null ? void 0 : t.s2;
|
|
70
75
|
}};
|
|
71
76
|
line-height: ${({ theme: e }) => e.typography.lineHeights.xs};
|
|
77
|
+
white-space: nowrap;
|
|
72
78
|
}
|
|
73
|
-
`, K =
|
|
79
|
+
`, K = o.div`
|
|
74
80
|
position: absolute;
|
|
75
81
|
top: 0;
|
|
76
82
|
inset-inline-end: 0;
|
|
77
|
-
|
|
83
|
+
z-index: 1;
|
|
84
|
+
min-width: 141px;
|
|
85
|
+
max-width: 70%;
|
|
78
86
|
height: 48px;
|
|
79
87
|
padding: 0 ${({ theme: e }) => e.spacing.m};
|
|
80
88
|
display: flex;
|
|
@@ -88,101 +96,101 @@ const N = {
|
|
|
88
96
|
font-size: ${({ theme: e }) => e.typography.sizes.s4};
|
|
89
97
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
90
98
|
white-space: nowrap;
|
|
91
|
-
`, Q =
|
|
99
|
+
`, Q = o.div`
|
|
92
100
|
display: flex;
|
|
93
101
|
align-items: baseline;
|
|
94
102
|
gap: ${({ theme: e }) => e.spacing.xxs};
|
|
95
|
-
`, w =
|
|
103
|
+
`, w = o(x).attrs(({ theme: e }) => ({
|
|
96
104
|
color: e.colors.grey.n350,
|
|
97
105
|
width: "18",
|
|
98
106
|
height: "20"
|
|
99
|
-
}))``, X =
|
|
107
|
+
}))``, X = o.span`
|
|
100
108
|
font-family: ${({ theme: e }) => e.fonts.english};
|
|
101
109
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
102
110
|
font-size: 2.25rem;
|
|
103
111
|
line-height: 2.5rem;
|
|
104
|
-
color: ${({ $color: e, theme:
|
|
105
|
-
`, Y =
|
|
112
|
+
color: ${({ $color: e, theme: t }) => e ?? t.colors.grey.n800};
|
|
113
|
+
`, Y = o.span`
|
|
106
114
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
107
115
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
108
116
|
font-size: ${({ theme: e }) => {
|
|
109
|
-
var
|
|
110
|
-
return (
|
|
117
|
+
var t;
|
|
118
|
+
return (t = e.typography.sizes) == null ? void 0 : t.s5;
|
|
111
119
|
}};
|
|
112
120
|
line-height: 1.804rem;
|
|
113
|
-
color: ${({ $color: e, theme:
|
|
114
|
-
`, Z =
|
|
121
|
+
color: ${({ $color: e, theme: t }) => e ?? t.colors.grey.n800};
|
|
122
|
+
`, Z = o(g)`
|
|
115
123
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
116
124
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
117
125
|
font-size: ${({ theme: e }) => {
|
|
118
|
-
var
|
|
119
|
-
return (
|
|
126
|
+
var t;
|
|
127
|
+
return (t = e.typography.sizes) == null ? void 0 : t.s2;
|
|
120
128
|
}};
|
|
121
129
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
122
130
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
123
|
-
`, _ =
|
|
131
|
+
`, _ = o.div`
|
|
124
132
|
padding: 2rem 2rem 2.5rem 2rem;
|
|
125
133
|
display: flex;
|
|
126
134
|
flex-direction: column;
|
|
127
135
|
gap: ${({ theme: e }) => e.spacing.s};
|
|
128
|
-
`, A =
|
|
136
|
+
`, A = o(g)`
|
|
129
137
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
130
138
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
131
139
|
font-size: ${({ theme: e }) => {
|
|
132
|
-
var
|
|
133
|
-
return (
|
|
140
|
+
var t;
|
|
141
|
+
return (t = e.typography.sizes) == null ? void 0 : t.s3;
|
|
134
142
|
}};
|
|
135
143
|
line-height: 0.7rem;
|
|
136
144
|
color: ${({ theme: e }) => e.colors.grey.n650};
|
|
137
145
|
text-transform: uppercase;
|
|
138
|
-
`, ee =
|
|
146
|
+
`, ee = o(g)`
|
|
139
147
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
140
148
|
font-weight: 500;
|
|
141
149
|
font-size: ${({ theme: e }) => {
|
|
142
|
-
var
|
|
143
|
-
return (
|
|
150
|
+
var t;
|
|
151
|
+
return (t = e.typography.sizes) == null ? void 0 : t.s2;
|
|
144
152
|
}};
|
|
145
153
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
146
154
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
147
|
-
`, ie =
|
|
155
|
+
`, ie = o.div`
|
|
148
156
|
display: flex;
|
|
149
157
|
align-items: center;
|
|
150
158
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
151
|
-
`, d =
|
|
159
|
+
`, d = o.span`
|
|
152
160
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
153
161
|
font-weight: ${({ theme: e }) => e.typography.weights.bold};
|
|
154
|
-
font-size: ${({ $isDiscounted: e, theme:
|
|
162
|
+
font-size: ${({ $isDiscounted: e, theme: t }) => e ? "1.50rem" : t.typography.sizes.s9};
|
|
155
163
|
line-height: ${({ theme: e }) => e.typography.lineHeights.xl};
|
|
156
164
|
letter-spacing: ${({ theme: e }) => e.typography.letterSpacings.balancedNarrow};
|
|
157
165
|
color: ${({ theme: e }) => e.colors.grey.n350};
|
|
158
|
-
`,
|
|
166
|
+
`, te = o(d)`
|
|
159
167
|
text-decoration: line-through !important;
|
|
160
168
|
font-size: 1.5rem;
|
|
161
|
-
`,
|
|
169
|
+
`, oe = o.span`
|
|
162
170
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
163
171
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
164
172
|
font-size: ${({ theme: e }) => e.typography.sizes.s4};
|
|
165
173
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
166
174
|
color: ${({ theme: e }) => e.colors.grey.n350};
|
|
167
|
-
`, j =
|
|
175
|
+
`, j = o.span`
|
|
168
176
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
169
177
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
170
178
|
font-size: ${({ theme: e }) => e.typography.sizes.s4};
|
|
171
179
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
172
180
|
color: #17954f;
|
|
173
|
-
`, ne =
|
|
181
|
+
`, ne = o.div`
|
|
174
182
|
display: flex;
|
|
175
183
|
align-items: center;
|
|
176
184
|
gap: 5px;
|
|
177
185
|
font-size: 16px;
|
|
178
|
-
`, re =
|
|
186
|
+
`, re = o(d)`
|
|
179
187
|
color: #17954f;
|
|
180
188
|
font-size: 16px;
|
|
181
|
-
`, se =
|
|
189
|
+
`, se = o(x).attrs({
|
|
182
190
|
color: "#17954f",
|
|
183
191
|
width: "16",
|
|
184
192
|
height: "18"
|
|
185
|
-
})``, le =
|
|
193
|
+
})``, le = o.div`
|
|
186
194
|
width: 100%;
|
|
187
195
|
margin-top: 1rem;
|
|
188
196
|
display: flex;
|
|
@@ -194,11 +202,11 @@ const N = {
|
|
|
194
202
|
}
|
|
195
203
|
`, $e = ({
|
|
196
204
|
title: e,
|
|
197
|
-
price:
|
|
205
|
+
price: t,
|
|
198
206
|
description: z,
|
|
199
207
|
hintComponent: v,
|
|
200
208
|
secondaryPrice: l,
|
|
201
|
-
discount:
|
|
209
|
+
discount: h,
|
|
202
210
|
discountLabel: m,
|
|
203
211
|
features: C,
|
|
204
212
|
variant: R = "transparent",
|
|
@@ -220,11 +228,11 @@ const N = {
|
|
|
220
228
|
mobileHintComponent: I
|
|
221
229
|
}) => {
|
|
222
230
|
const p = f.find((n) => n.ribbon), $ = f.filter((n) => !n.ribbon);
|
|
223
|
-
return /* @__PURE__ */ i.jsxs(
|
|
231
|
+
return /* @__PURE__ */ i.jsxs(N, { $variant: R, children: [
|
|
224
232
|
p && /* @__PURE__ */ i.jsx(K, { $bgColor: p.bgColor, $color: p.color, children: p.label }),
|
|
225
|
-
/* @__PURE__ */ i.jsxs(
|
|
226
|
-
/* @__PURE__ */ i.jsxs(
|
|
227
|
-
/* @__PURE__ */ i.jsx(
|
|
233
|
+
/* @__PURE__ */ i.jsxs(O, { children: [
|
|
234
|
+
/* @__PURE__ */ i.jsxs(U, { $hasRibbon: !!p, $hasMultipleBadges: f.length > 1, children: [
|
|
235
|
+
/* @__PURE__ */ i.jsx(V, { children: e }),
|
|
228
236
|
$.length > 0 && /* @__PURE__ */ i.jsx(J, { children: $.map((n, a) => /* @__PURE__ */ i.jsx(
|
|
229
237
|
M,
|
|
230
238
|
{
|
|
@@ -240,25 +248,25 @@ const N = {
|
|
|
240
248
|
] }),
|
|
241
249
|
/* @__PURE__ */ i.jsxs(Q, { children: [
|
|
242
250
|
/* @__PURE__ */ i.jsx(W, { src: L, alt: "Riyal" }),
|
|
243
|
-
/* @__PURE__ */ i.jsx(X, { $color:
|
|
244
|
-
/* @__PURE__ */ i.jsx(Y, { $color:
|
|
251
|
+
/* @__PURE__ */ i.jsx(X, { $color: t.color, children: t.amount }),
|
|
252
|
+
/* @__PURE__ */ i.jsx(Y, { $color: t.periodColor, children: t.period ?? "/ Month" })
|
|
245
253
|
] }),
|
|
246
254
|
l && /* @__PURE__ */ i.jsxs(ie, { children: [
|
|
247
255
|
l.originalAmount && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
248
256
|
/* @__PURE__ */ i.jsx(w, {}),
|
|
249
|
-
/* @__PURE__ */ i.jsxs(
|
|
257
|
+
/* @__PURE__ */ i.jsxs(te, { children: [
|
|
250
258
|
l.originalAmount,
|
|
251
259
|
" "
|
|
252
260
|
] })
|
|
253
261
|
] }),
|
|
254
262
|
/* @__PURE__ */ i.jsx(w, {}),
|
|
255
|
-
/* @__PURE__ */ i.jsx(d, { $isDiscounted: !!(
|
|
256
|
-
/* @__PURE__ */ i.jsx(
|
|
263
|
+
/* @__PURE__ */ i.jsx(d, { $isDiscounted: !!(h && l.originalAmount), children: l.amount }),
|
|
264
|
+
/* @__PURE__ */ i.jsx(oe, { children: l.label })
|
|
257
265
|
] }),
|
|
258
|
-
|
|
259
|
-
/* @__PURE__ */ i.jsx(j, { children:
|
|
266
|
+
h ? /* @__PURE__ */ i.jsxs(ne, { children: [
|
|
267
|
+
/* @__PURE__ */ i.jsx(j, { children: h.label }),
|
|
260
268
|
/* @__PURE__ */ i.jsx(se, { style: { width: "14px", height: "16px" } }),
|
|
261
|
-
/* @__PURE__ */ i.jsx(re, { children:
|
|
269
|
+
/* @__PURE__ */ i.jsx(re, { children: h.amount })
|
|
262
270
|
] }) : m && /* @__PURE__ */ i.jsx(j, { children: m }),
|
|
263
271
|
/* @__PURE__ */ i.jsx(Z, { children: z }),
|
|
264
272
|
D && y.length > 0 && /* @__PURE__ */ i.jsx("div", { style: { marginTop: "0.50rem" }, children: /* @__PURE__ */ i.jsx(
|
|
@@ -329,8 +337,8 @@ const N = {
|
|
|
329
337
|
) }),
|
|
330
338
|
I,
|
|
331
339
|
/* @__PURE__ */ i.jsxs(le, { children: [
|
|
332
|
-
B && /* @__PURE__ */ i.jsx(
|
|
333
|
-
k && /* @__PURE__ */ i.jsx(
|
|
340
|
+
B && /* @__PURE__ */ i.jsx(u, { variant: (r == null ? void 0 : r.variant) ?? "primary", onClick: r == null ? void 0 : r.onPrimaryActionClick, children: r == null ? void 0 : r.label }),
|
|
341
|
+
k && /* @__PURE__ */ i.jsx(u, { variant: (s == null ? void 0 : s.variant) ?? "light-primary", onClick: s == null ? void 0 : s.onSecondaryActionClick, children: s == null ? void 0 : s.label })
|
|
334
342
|
] })
|
|
335
343
|
] }),
|
|
336
344
|
S && /* @__PURE__ */ i.jsxs(_, { children: [
|