qaema-ui 0.0.62 → 0.0.63
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/index.js +5 -5
- package/dist/_virtual/index2.js +4 -4
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +4 -4
- package/dist/components/PackageCard.d.ts +34 -0
- package/dist/components/PackageCard.js +277 -53
- package/dist/components/PriceCard.d.ts +9 -0
- package/dist/components/PriceCard.js +153 -139
- package/dist/node_modules/react-bootstrap/esm/Alert.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/AlertHeading.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/AlertLink.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Button.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/CloseButton.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/Col.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Collapse.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Dropdown.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownDivider.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownHeader.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownItem.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownItemText.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownMenu.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownToggle.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Fade.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Feedback.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/FloatingLabel.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Form.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/FormCheck.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormCheckInput.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormCheckLabel.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormControl.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormFloating.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormLabel.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormRange.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormSelect.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormText.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Image.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/Nav.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavItem.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavLink.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Navbar.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavbarBrand.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavbarText.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavbarToggle.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Offcanvas.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasBody.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasHeader.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasTitle.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasToggling.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Toast.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/ToastBody.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/ToastHeader.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/divWithClassName.js +1 -1
- package/dist/node_modules/react-helmet-async/lib/index.esm.js +2 -2
- 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/package.json +1 -1
package/dist/_virtual/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as
|
|
3
|
-
var a =
|
|
4
|
-
const
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as t } from "../node_modules/react-helmet-async/node_modules/react-fast-compare/index.js";
|
|
3
|
+
var a = t();
|
|
4
|
+
const m = /* @__PURE__ */ r(a);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
package/dist/_virtual/index2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as o } from "../node_modules/
|
|
3
|
-
var
|
|
4
|
-
const
|
|
2
|
+
import { __require as o } from "../node_modules/shallowequal/index.js";
|
|
3
|
+
var a = o();
|
|
4
|
+
const t = /* @__PURE__ */ r(a);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
t as default
|
|
7
7
|
};
|
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as
|
|
3
|
-
var a =
|
|
4
|
-
const
|
|
1
|
+
import { getDefaultExportFromCjs as s } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as r } from "../node_modules/classnames/index.js";
|
|
3
|
+
var a = r();
|
|
4
|
+
const t = /* @__PURE__ */ s(a);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
t as default
|
|
7
7
|
};
|
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as o } from "../node_modules/
|
|
3
|
-
var
|
|
4
|
-
const
|
|
2
|
+
import { __require as o } from "../node_modules/prop-types/index.js";
|
|
3
|
+
var p = /* @__PURE__ */ o();
|
|
4
|
+
const s = /* @__PURE__ */ r(p);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -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[];
|