qaema-ui 0.0.38 → 0.0.40
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/_virtual/index2.js +4 -4
- package/dist/_virtual/index3.js +4 -4
- package/dist/_virtual/index4.js +4 -4
- package/dist/_virtual/index7.js +3 -2
- package/dist/_virtual/index8.js +2 -3
- package/dist/components/CallOutBox.d.ts +14 -0
- package/dist/components/CallOutBox.js +87 -0
- package/dist/components/PhoneInputField.d.ts +3 -0
- package/dist/components/PhoneInputField.js +348 -341
- package/dist/components/PriceCard.d.ts +5 -0
- package/dist/components/PriceCard.js +99 -71
- package/dist/components/SummaryCard.js +51 -127
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +40 -38
- package/dist/node_modules/react-bootstrap/esm/CloseButton.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Feedback.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Form.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Image.js +1 -1
- package/dist/node_modules/react-helmet-async/lib/index.esm.js +2 -2
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-smooth/es6/Animate.js +1 -1
- package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
- package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +1 -1
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,10 @@ export type PriceCardFeature = {
|
|
|
10
10
|
label: string;
|
|
11
11
|
variant?: FeatureVariant;
|
|
12
12
|
};
|
|
13
|
+
export type SecondaryPrice = {
|
|
14
|
+
amount: string;
|
|
15
|
+
label: string;
|
|
16
|
+
};
|
|
13
17
|
export type PriceCardPrice = {
|
|
14
18
|
amount: string;
|
|
15
19
|
period?: string;
|
|
@@ -19,6 +23,7 @@ export type PriceCardPrice = {
|
|
|
19
23
|
export type PriceCardProps = {
|
|
20
24
|
title: string;
|
|
21
25
|
price: PriceCardPrice;
|
|
26
|
+
secondaryPrice?: SecondaryPrice;
|
|
22
27
|
description: string;
|
|
23
28
|
features: PriceCardFeature[];
|
|
24
29
|
variant?: PriceCardVariant;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as r } from "../_virtual/jsx-runtime.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import { FiCheck as j, FiX as
|
|
3
|
+
import { FiCheck as j, FiX as v } from "../node_modules/react-icons/fi/index.js";
|
|
4
4
|
import i, { css as a } from "styled-components";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
5
|
+
import z from "../assets/icons/RiyalIcon.js";
|
|
6
|
+
import { CurrencyContainer as k } from "../styles/Currency.styles.js";
|
|
7
|
+
import C from "../assets/svg/Riyal.svg.js";
|
|
8
|
+
import R from "./Badge.js";
|
|
9
|
+
import d from "./Button.js";
|
|
10
|
+
import n from "./Typography.js";
|
|
11
|
+
const F = {
|
|
11
12
|
transparent: a`
|
|
12
13
|
background: rgba(255, 255, 255, 0.72);
|
|
13
14
|
border: 1px solid ${({ theme: e }) => e.colors.grey.n200};
|
|
@@ -20,32 +21,32 @@ const C = {
|
|
|
20
21
|
0px 4px 6px -2px #10182808,
|
|
21
22
|
0px 12px 16px -4px #10182814;
|
|
22
23
|
`
|
|
23
|
-
},
|
|
24
|
+
}, S = i.div`
|
|
24
25
|
width: 100%;
|
|
25
26
|
max-width: 28.458rem;
|
|
26
27
|
border-radius: ${({ theme: e }) => e.borderRadius.xl};
|
|
27
28
|
overflow: hidden;
|
|
28
29
|
display: flex;
|
|
29
30
|
flex-direction: column;
|
|
30
|
-
${({ $variant: e }) =>
|
|
31
|
+
${({ $variant: e }) => F[e]};
|
|
31
32
|
`, B = i.div`
|
|
32
33
|
padding: 2rem;
|
|
33
34
|
display: flex;
|
|
34
35
|
flex-direction: column;
|
|
35
36
|
gap: ${({ theme: e }) => e.spacing.sm};
|
|
36
37
|
border-bottom: 1px solid ${({ theme: e }) => e.colors.grey.n200};
|
|
37
|
-
`,
|
|
38
|
+
`, T = i.div`
|
|
38
39
|
display: flex;
|
|
39
40
|
align-items: center;
|
|
40
41
|
justify-content: space-between;
|
|
41
42
|
gap: ${({ theme: e }) => e.spacing.m};
|
|
42
43
|
flex-wrap: wrap;
|
|
43
|
-
`,
|
|
44
|
+
`, H = i(n)`
|
|
44
45
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
45
46
|
font-weight: 600;
|
|
46
47
|
font-size: ${({ theme: e }) => {
|
|
47
|
-
var
|
|
48
|
-
return (
|
|
48
|
+
var o;
|
|
49
|
+
return (o = e.typography.sizes) == null ? void 0 : o.s5;
|
|
49
50
|
}};
|
|
50
51
|
line-height: 1.75rem;
|
|
51
52
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
@@ -58,70 +59,91 @@ const C = {
|
|
|
58
59
|
align-items: center;
|
|
59
60
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
60
61
|
flex-wrap: wrap;
|
|
61
|
-
`,
|
|
62
|
+
`, I = i.div`
|
|
62
63
|
display: flex;
|
|
63
64
|
align-items: baseline;
|
|
64
65
|
gap: ${({ theme: e }) => e.spacing.xxs};
|
|
65
|
-
`,
|
|
66
|
+
`, D = i(z).attrs(({ theme: e }) => ({
|
|
67
|
+
color: e.colors.grey.n350,
|
|
68
|
+
width: "18",
|
|
69
|
+
height: "20"
|
|
70
|
+
}))``, L = i.span`
|
|
66
71
|
font-family: ${({ theme: e }) => e.fonts.english};
|
|
67
72
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
68
73
|
font-size: 2.706rem;
|
|
69
74
|
line-height: 3.158rem;
|
|
70
|
-
color: ${({ $color: e, theme:
|
|
71
|
-
`,
|
|
75
|
+
color: ${({ $color: e, theme: o }) => e ?? o.colors.grey.n800};
|
|
76
|
+
`, V = i.span`
|
|
72
77
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
73
78
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
74
79
|
font-size: ${({ theme: e }) => {
|
|
75
|
-
var
|
|
76
|
-
return (
|
|
80
|
+
var o;
|
|
81
|
+
return (o = e.typography.sizes) == null ? void 0 : o.s5;
|
|
77
82
|
}};
|
|
78
83
|
line-height: 1.804rem;
|
|
79
|
-
color: ${({ $color: e, theme:
|
|
80
|
-
`,
|
|
84
|
+
color: ${({ $color: e, theme: o }) => e ?? o.colors.grey.n800};
|
|
85
|
+
`, W = i(n)`
|
|
81
86
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
82
87
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
83
88
|
font-size: ${({ theme: e }) => {
|
|
84
|
-
var
|
|
85
|
-
return (
|
|
89
|
+
var o;
|
|
90
|
+
return (o = e.typography.sizes) == null ? void 0 : o.s4;
|
|
86
91
|
}};
|
|
87
92
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
88
93
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
89
|
-
`,
|
|
94
|
+
`, M = i.div`
|
|
90
95
|
padding: 2rem 2rem 2.5rem 2rem;
|
|
91
96
|
display: flex;
|
|
92
97
|
flex-direction: column;
|
|
93
98
|
gap: ${({ theme: e }) => e.spacing.m};
|
|
94
|
-
`,
|
|
99
|
+
`, N = i(n)`
|
|
95
100
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
96
101
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
97
102
|
font-size: ${({ theme: e }) => {
|
|
98
|
-
var
|
|
99
|
-
return (
|
|
103
|
+
var o;
|
|
104
|
+
return (o = e.typography.sizes) == null ? void 0 : o.s4;
|
|
100
105
|
}};
|
|
101
106
|
line-height: 0.7rem;
|
|
102
107
|
color: ${({ theme: e }) => e.colors.grey.n650};
|
|
103
108
|
text-transform: uppercase;
|
|
104
|
-
`,
|
|
109
|
+
`, U = i(n)`
|
|
105
110
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
106
111
|
font-weight: 500;
|
|
107
112
|
font-size: ${({ theme: e }) => {
|
|
108
|
-
var
|
|
109
|
-
return (
|
|
113
|
+
var o;
|
|
114
|
+
return (o = e.typography.sizes) == null ? void 0 : o.s4;
|
|
110
115
|
}};
|
|
111
116
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
112
117
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
113
|
-
`,
|
|
118
|
+
`, X = i.div`
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
gap: ${({ theme: e }) => e.spacing.xs};
|
|
122
|
+
`, q = i.span`
|
|
123
|
+
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
124
|
+
font-weight: ${({ theme: e }) => e.typography.weights.bold};
|
|
125
|
+
font-size: ${({ theme: e }) => e.typography.sizes.s9};
|
|
126
|
+
line-height: ${({ theme: e }) => e.typography.lineHeights.xl};
|
|
127
|
+
letter-spacing: ${({ theme: e }) => e.typography.letterSpacings.balancedNarrow};
|
|
128
|
+
color: ${({ theme: e }) => e.colors.grey.n350};
|
|
129
|
+
`, G = i.span`
|
|
130
|
+
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
131
|
+
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
132
|
+
font-size: ${({ theme: e }) => e.typography.sizes.s4};
|
|
133
|
+
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
134
|
+
color: ${({ theme: e }) => e.colors.grey.n350};
|
|
135
|
+
`, J = i.ul`
|
|
114
136
|
list-style: none;
|
|
115
137
|
margin: 0;
|
|
116
138
|
padding: 0;
|
|
117
139
|
display: flex;
|
|
118
140
|
flex-direction: column;
|
|
119
141
|
gap: ${({ theme: e }) => e.spacing.s};
|
|
120
|
-
`,
|
|
142
|
+
`, K = i.li`
|
|
121
143
|
display: flex;
|
|
122
144
|
align-items: center;
|
|
123
145
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
124
|
-
`,
|
|
146
|
+
`, O = i.span`
|
|
125
147
|
width: 1rem;
|
|
126
148
|
height: 1rem;
|
|
127
149
|
border-radius: 50%;
|
|
@@ -135,23 +157,23 @@ const C = {
|
|
|
135
157
|
height: 0.7rem;
|
|
136
158
|
}
|
|
137
159
|
|
|
138
|
-
${({ theme: e, $variant:
|
|
160
|
+
${({ theme: e, $variant: o }) => o === "included" ? a`
|
|
139
161
|
border: 1px solid ${e.colors.secondary.green.n450};
|
|
140
162
|
color: ${e.colors.secondary.green.n450};
|
|
141
163
|
` : a`
|
|
142
164
|
border: 1px solid ${e.colors.secondary.pink.n450};
|
|
143
165
|
color: ${e.colors.secondary.pink.n450};
|
|
144
166
|
`}
|
|
145
|
-
`,
|
|
167
|
+
`, Q = i(n)`
|
|
146
168
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
147
169
|
font-weight: 400;
|
|
148
170
|
font-size: ${({ theme: e }) => {
|
|
149
|
-
var
|
|
150
|
-
return (
|
|
171
|
+
var o;
|
|
172
|
+
return (o = e.typography.sizes) == null ? void 0 : o.s3;
|
|
151
173
|
}};
|
|
152
174
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
153
175
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
154
|
-
`,
|
|
176
|
+
`, Y = i.div`
|
|
155
177
|
width: 100%;
|
|
156
178
|
margin-top: 1rem;
|
|
157
179
|
display: flex;
|
|
@@ -161,51 +183,57 @@ const C = {
|
|
|
161
183
|
button {
|
|
162
184
|
width: 100%;
|
|
163
185
|
}
|
|
164
|
-
`,
|
|
186
|
+
`, ne = ({
|
|
165
187
|
title: e,
|
|
166
|
-
price:
|
|
188
|
+
price: o,
|
|
167
189
|
description: f,
|
|
168
|
-
|
|
169
|
-
|
|
190
|
+
secondaryPrice: p,
|
|
191
|
+
features: x,
|
|
192
|
+
variant: y = "transparent",
|
|
170
193
|
badges: c = [],
|
|
171
194
|
showPrimaryAction: m = !1,
|
|
172
195
|
primaryAction: s,
|
|
173
196
|
showSecondaryAction: $ = !1,
|
|
174
|
-
secondaryAction:
|
|
175
|
-
showFeatures:
|
|
176
|
-
featuresTitle:
|
|
177
|
-
featuresDescription:
|
|
178
|
-
}) => /* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
c.length > 0 && /* @__PURE__ */
|
|
197
|
+
secondaryAction: t,
|
|
198
|
+
showFeatures: u = !0,
|
|
199
|
+
featuresTitle: b = "FEATURES",
|
|
200
|
+
featuresDescription: w = "Everything in our free plan plus....."
|
|
201
|
+
}) => /* @__PURE__ */ r.jsxs(S, { $variant: y, children: [
|
|
202
|
+
/* @__PURE__ */ r.jsxs(B, { children: [
|
|
203
|
+
/* @__PURE__ */ r.jsxs(T, { children: [
|
|
204
|
+
/* @__PURE__ */ r.jsx(H, { children: e }),
|
|
205
|
+
c.length > 0 && /* @__PURE__ */ r.jsx(E, { children: c.map((l, g) => /* @__PURE__ */ r.jsx(R, { label: l.label, bgColor: l.bgColor, color: l.color }, `${l.label}-${g}`)) })
|
|
206
|
+
] }),
|
|
207
|
+
/* @__PURE__ */ r.jsxs(I, { children: [
|
|
208
|
+
/* @__PURE__ */ r.jsx(k, { src: C, alt: "Riyal" }),
|
|
209
|
+
/* @__PURE__ */ r.jsx(L, { $color: o.color, children: o.amount }),
|
|
210
|
+
/* @__PURE__ */ r.jsx(V, { $color: o.periodColor, children: o.period ?? "/ Month" })
|
|
183
211
|
] }),
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
/* @__PURE__ */
|
|
212
|
+
p && /* @__PURE__ */ r.jsxs(X, { children: [
|
|
213
|
+
/* @__PURE__ */ r.jsx(D, {}),
|
|
214
|
+
/* @__PURE__ */ r.jsx(q, { children: p.amount }),
|
|
215
|
+
/* @__PURE__ */ r.jsx(G, { children: p.label })
|
|
188
216
|
] }),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
m && /* @__PURE__ */
|
|
192
|
-
$ && /* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ r.jsx(W, { children: f }),
|
|
218
|
+
/* @__PURE__ */ r.jsxs(Y, { children: [
|
|
219
|
+
m && /* @__PURE__ */ r.jsx(d, { variant: (s == null ? void 0 : s.variant) ?? "primary", onClick: s == null ? void 0 : s.onPrimaryActionClick, children: s == null ? void 0 : s.label }),
|
|
220
|
+
$ && /* @__PURE__ */ r.jsx(d, { variant: (t == null ? void 0 : t.variant) ?? "light-primary", onClick: t == null ? void 0 : t.onSecondaryActionClick, children: t == null ? void 0 : t.label })
|
|
193
221
|
] })
|
|
194
222
|
] }),
|
|
195
|
-
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */
|
|
223
|
+
u && /* @__PURE__ */ r.jsxs(M, { children: [
|
|
224
|
+
/* @__PURE__ */ r.jsxs(P, { children: [
|
|
225
|
+
/* @__PURE__ */ r.jsx(N, { children: b }),
|
|
226
|
+
/* @__PURE__ */ r.jsx(U, { children: w })
|
|
199
227
|
] }),
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
const
|
|
202
|
-
return /* @__PURE__ */
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
] }, `${
|
|
228
|
+
/* @__PURE__ */ r.jsx(J, { children: x.map((l, g) => {
|
|
229
|
+
const h = l.variant ?? "included";
|
|
230
|
+
return /* @__PURE__ */ r.jsxs(K, { children: [
|
|
231
|
+
/* @__PURE__ */ r.jsx(O, { $variant: h, children: h === "included" ? /* @__PURE__ */ r.jsx(j, {}) : /* @__PURE__ */ r.jsx(v, {}) }),
|
|
232
|
+
/* @__PURE__ */ r.jsx(Q, { children: l.label })
|
|
233
|
+
] }, `${l.label}-${g}`);
|
|
206
234
|
}) })
|
|
207
235
|
] })
|
|
208
236
|
] });
|
|
209
237
|
export {
|
|
210
|
-
|
|
238
|
+
ne as default
|
|
211
239
|
};
|
|
@@ -1,173 +1,97 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import { j as e } from "../_virtual/jsx-runtime.js";
|
|
2
|
+
import d, { useTheme as f } from "styled-components";
|
|
3
|
+
import v from "./Badge.js";
|
|
4
|
+
import j from "./Button.js";
|
|
5
|
+
import w from "./CallOutBox.js";
|
|
6
|
+
import { Card as T } from "./Card.js";
|
|
7
|
+
import a from "./Typography.js";
|
|
8
|
+
const $ = d.div`
|
|
8
9
|
padding-bottom: ${(r) => r.theme.spacing.s};
|
|
9
10
|
border-bottom: 1px solid ${(r) => r.theme.colors.grey.n100};
|
|
10
11
|
caption {
|
|
11
12
|
display: inline-block;
|
|
12
13
|
text-align: start;
|
|
13
14
|
}
|
|
14
|
-
`,
|
|
15
|
-
font-family: ${({ theme: r }) => r.fonts.arabic};
|
|
16
|
-
font-weight: ${({ theme: r }) => r.typography.weights.semiBold};
|
|
17
|
-
font-size: 15px;
|
|
18
|
-
line-height: ${({ theme: r }) => r.typography.lineHeights.s};
|
|
19
|
-
letter-spacing: 0%;
|
|
20
|
-
vertical-align: middle;
|
|
21
|
-
color: ${({ theme: r }) => r.colors.grey.n650};
|
|
22
|
-
display: inline-block;
|
|
23
|
-
`, B = a.div`
|
|
24
|
-
margin-top: ${({ theme: r }) => r.spacing.m};
|
|
25
|
-
padding: ${({ theme: r }) => r.spacing.sm};
|
|
26
|
-
border-radius: ${({ theme: r }) => r.borderRadius.md};
|
|
27
|
-
display: flex;
|
|
28
|
-
justify-content: space-between;
|
|
29
|
-
align-items: center;
|
|
30
|
-
|
|
31
|
-
${({ $variant: r, theme: e }) => {
|
|
32
|
-
switch (r) {
|
|
33
|
-
case "information":
|
|
34
|
-
return `
|
|
35
|
-
background: ${e.colors.primary.purple.n150};
|
|
36
|
-
border-bottom: 2px solid ${e.colors.primary.purple.n450};
|
|
37
|
-
`;
|
|
38
|
-
case "error":
|
|
39
|
-
return `
|
|
40
|
-
background: ${e.colors.state.error.n150};
|
|
41
|
-
border-bottom: 2px solid ${e.colors.state.error.n450};
|
|
42
|
-
`;
|
|
43
|
-
case "success":
|
|
44
|
-
return `
|
|
45
|
-
background: ${e.colors.state.success.n100};
|
|
46
|
-
border-bottom: 2px solid ${e.colors.state.success.n450};
|
|
47
|
-
`;
|
|
48
|
-
case "warning":
|
|
49
|
-
default:
|
|
50
|
-
return `
|
|
51
|
-
background: ${e.colors.secondary.orange.n150};
|
|
52
|
-
border-bottom: 2px solid ${e.colors.secondary.orange.n450};
|
|
53
|
-
`;
|
|
54
|
-
}
|
|
55
|
-
}}
|
|
56
|
-
`, T = a.button`
|
|
57
|
-
padding: 0.75rem;
|
|
58
|
-
border-radius: 0.25rem;
|
|
59
|
-
border: none;
|
|
60
|
-
cursor: pointer;
|
|
61
|
-
${({ $variant: r, theme: e }) => `
|
|
62
|
-
background: transparent;
|
|
63
|
-
color: ${r === "information" ? e.colors.primary.purple.n450 : r === "error" ? e.colors.state.error.n450 : r === "success" ? e.colors.state.success.n450 : e.colors.secondary.orange.n450};
|
|
64
|
-
`}
|
|
65
|
-
|
|
66
|
-
font-weight: ${({ theme: r }) => r.typography.weights.semiBold};
|
|
67
|
-
font-size: ${({ theme: r }) => r.typography.sizes.s2};
|
|
68
|
-
line-height: ${({ theme: r }) => r.typography.lineHeights.xs};
|
|
69
|
-
text-align: center;
|
|
70
|
-
vertical-align: middle;
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: center;
|
|
73
|
-
justify-content: center;
|
|
74
|
-
&:hover {
|
|
75
|
-
opacity: 0.9;
|
|
76
|
-
}
|
|
77
|
-
`, S = a.div`
|
|
15
|
+
`, S = d.div`
|
|
78
16
|
width: 100%;
|
|
79
17
|
display: flex;
|
|
80
18
|
flex-direction: row;
|
|
81
19
|
justify-content: space-between;
|
|
82
20
|
align-items: center;
|
|
83
|
-
`,
|
|
21
|
+
`, B = d.div`
|
|
84
22
|
margin-top: ${(r) => r.theme.spacing.s};
|
|
85
23
|
display: flex;
|
|
86
24
|
flex-direction: column;
|
|
87
25
|
gap: ${(r) => r.theme.spacing.s};
|
|
88
|
-
`,
|
|
89
|
-
font-family: ${({ theme: r }) => r.fonts.arabic};
|
|
90
|
-
font-weight: ${({ theme: r }) => r.typography.weights.regular};
|
|
91
|
-
font-size: ${({ theme: r }) => r.typography.sizes.s2};
|
|
92
|
-
line-height: ${({ theme: r }) => r.typography.lineHeights.xs};
|
|
93
|
-
letter-spacing: ${({ theme: r }) => r.typography.letterSpacings.normal};
|
|
94
|
-
vertical-align: middle;
|
|
95
|
-
color: ${({ theme: r }) => r.colors.grey.n600};
|
|
96
|
-
`, C = a.div`
|
|
26
|
+
`, R = d.div`
|
|
97
27
|
display: flex;
|
|
98
28
|
flex-direction: column;
|
|
99
29
|
gap: ${(r) => r.theme.spacing.s};
|
|
100
|
-
`,
|
|
30
|
+
`, g = d.div`
|
|
101
31
|
display: flex;
|
|
102
32
|
justify-content: space-between;
|
|
103
33
|
align-items: center;
|
|
104
|
-
`,
|
|
34
|
+
`, E = d(g)``, y = ({
|
|
105
35
|
variant: r = "text",
|
|
106
|
-
label:
|
|
107
|
-
value:
|
|
108
|
-
color:
|
|
36
|
+
label: o,
|
|
37
|
+
value: l,
|
|
38
|
+
color: m
|
|
109
39
|
}) => {
|
|
110
|
-
const
|
|
40
|
+
const x = f();
|
|
111
41
|
let c = null;
|
|
112
42
|
if (r === "badge") {
|
|
113
|
-
const
|
|
114
|
-
c = /* @__PURE__ */
|
|
43
|
+
const n = l;
|
|
44
|
+
c = /* @__PURE__ */ e.jsx(v, { ...n });
|
|
115
45
|
} else if (r === "trend") {
|
|
116
|
-
const
|
|
117
|
-
c = /* @__PURE__ */
|
|
46
|
+
const n = typeof l == "object" && l !== null ? l : { value: l }, i = n.direction ?? "neutral", t = x.colors.state.success.n450, s = x.colors.state.error.n450, h = i === "up" ? t : i === "down" ? s : m;
|
|
47
|
+
c = /* @__PURE__ */ e.jsx(a, { variant: "smText", color: h, children: typeof n.value == "number" ? n.value.toString() : n.value });
|
|
118
48
|
} else if (r === "component")
|
|
119
|
-
c =
|
|
49
|
+
c = l;
|
|
120
50
|
else {
|
|
121
|
-
const
|
|
122
|
-
c = /* @__PURE__ */
|
|
51
|
+
const n = l;
|
|
52
|
+
c = /* @__PURE__ */ e.jsx(a, { variant: "smText", color: m, children: typeof n == "number" ? n.toString() : n });
|
|
123
53
|
}
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
-
r !== "component" && /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
55
|
+
r !== "component" && /* @__PURE__ */ e.jsx(a, { variant: "smText", weight: "semiBold", children: o }),
|
|
126
56
|
c
|
|
127
57
|
] });
|
|
128
58
|
};
|
|
129
|
-
function
|
|
59
|
+
function q({
|
|
130
60
|
sections: r,
|
|
131
|
-
total:
|
|
132
|
-
title:
|
|
133
|
-
subtitle:
|
|
134
|
-
btnLabel:
|
|
61
|
+
total: o,
|
|
62
|
+
title: l,
|
|
63
|
+
subtitle: m,
|
|
64
|
+
btnLabel: x,
|
|
135
65
|
btnConfig: c,
|
|
136
|
-
trailingActionsConfig:
|
|
137
|
-
callout:
|
|
66
|
+
trailingActionsConfig: n,
|
|
67
|
+
callout: i
|
|
138
68
|
}) {
|
|
139
|
-
const
|
|
140
|
-
return /* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
c && /* @__PURE__ */
|
|
145
|
-
|
|
69
|
+
const t = f();
|
|
70
|
+
return /* @__PURE__ */ e.jsxs(T, { padding: "2rem", shadowVariant: "none", hoverEffect: !1, border: `1px solid ${t.colors.grey.n100}`, children: [
|
|
71
|
+
/* @__PURE__ */ e.jsxs($, { children: [
|
|
72
|
+
/* @__PURE__ */ e.jsxs(S, { children: [
|
|
73
|
+
/* @__PURE__ */ e.jsx(a, { variant: "h6", weight: "semiBold", children: l }),
|
|
74
|
+
c && /* @__PURE__ */ e.jsxs(j, { ...c, children: [
|
|
75
|
+
x ?? "",
|
|
146
76
|
" "
|
|
147
77
|
] })
|
|
148
78
|
] }),
|
|
149
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ e.jsx(a, { variant: "caption", color: t.colors.grey.n400, children: m })
|
|
150
80
|
] }),
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
r.map((
|
|
81
|
+
/* @__PURE__ */ e.jsxs(B, { children: [
|
|
82
|
+
r.map((s, u) => {
|
|
153
83
|
var h;
|
|
154
|
-
return ((h =
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
|
|
157
|
-
] },
|
|
84
|
+
return ((h = s == null ? void 0 : s.items) == null ? void 0 : h.length) === 0 ? null : /* @__PURE__ */ e.jsxs(R, { children: [
|
|
85
|
+
/* @__PURE__ */ e.jsx(a, { variant: "span", weight: "regular", color: t.colors.grey.n400, children: s.title }),
|
|
86
|
+
s.items.map((p, b) => /* @__PURE__ */ e.jsx(g, { children: /* @__PURE__ */ e.jsx(y, { variant: p == null ? void 0 : p.variant, label: p.label, value: p.value, color: t.colors.grey.n400 }) }, `${u}-${b}`))
|
|
87
|
+
] }, s.title);
|
|
158
88
|
}),
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
163
|
-
/* @__PURE__ */ n.jsx(k, { variant: "span", weight: "semiBold", children: t.title }),
|
|
164
|
-
t.description && /* @__PURE__ */ n.jsx(z, { variant: "caption", children: t.description })
|
|
165
|
-
] }),
|
|
166
|
-
t.action && /* @__PURE__ */ n.jsx(T, { $variant: t.variant ?? "warning", onClick: t.action.onClick, children: t.action.label })
|
|
167
|
-
] })
|
|
89
|
+
o && /* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsx(y, { variant: o == null ? void 0 : o.variant, label: (o == null ? void 0 : o.label) ?? "", value: (o == null ? void 0 : o.value) ?? "", color: t.colors.grey.n400 }) }),
|
|
90
|
+
n && (n == null ? void 0 : n.length) > 0 && n.map((s) => /* @__PURE__ */ e.jsx(j, { ...s == null ? void 0 : s.btnConfig, children: (s == null ? void 0 : s.label) ?? "" })),
|
|
91
|
+
i && /* @__PURE__ */ e.jsx(w, { callout: i })
|
|
168
92
|
] })
|
|
169
93
|
] });
|
|
170
94
|
}
|
|
171
95
|
export {
|
|
172
|
-
|
|
96
|
+
q as default
|
|
173
97
|
};
|
|
@@ -155,3 +155,5 @@ export { default as NextActionBox } from './NextActionBox';
|
|
|
155
155
|
export type { NextActionBoxProps, NextActionItem } from './NextActionBox';
|
|
156
156
|
export { default as PriceCard } from './PriceCard';
|
|
157
157
|
export type { PriceCardProps, PriceCardFeature, PriceCardBadge } from './PriceCard';
|
|
158
|
+
export { default as CallOutBox } from './CallOutBox';
|
|
159
|
+
export type { CalloutConfig, CalloutVariant } from './CallOutBox';
|