qaema-ui 0.0.59 → 0.0.61
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 +4 -4
- package/dist/_virtual/index7.js +2 -3
- package/dist/_virtual/index8.js +3 -2
- package/dist/components/DropDownWithTable/Table/Table.js +35 -34
- package/dist/components/DropDownWithTable/Table/Table.types.d.ts +1 -0
- package/dist/components/PriceCard.d.ts +13 -0
- package/dist/components/PriceCard.js +170 -91
- package/dist/components/StatCard.js +8 -7
- package/dist/components/Table/Table.js +39 -38
- package/dist/components/Table/Table.types.d.ts +1 -0
- package/dist/components/Table/components/CellComponents.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/node_modules/react-bootstrap/esm/FloatingLabel.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Form.js +1 -1
- 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 +1 -1
- 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-is/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
- package/package.json +1 -1
|
@@ -1,149 +1,149 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as i } from "../_virtual/jsx-runtime.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import { FiCheck as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { CurrencyContainer as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
3
|
+
import { FiCheck as B, FiX as T } from "../node_modules/react-icons/fi/index.js";
|
|
4
|
+
import o, { css as p } from "styled-components";
|
|
5
|
+
import m from "../assets/icons/RiyalIcon.js";
|
|
6
|
+
import { CurrencyContainer as H } from "../styles/Currency.styles.js";
|
|
7
|
+
import I from "../assets/svg/Riyal.svg.js";
|
|
8
|
+
import P from "./Badge.js";
|
|
9
9
|
import d from "./Button.js";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
transparent:
|
|
10
|
+
import a from "./Typography.js";
|
|
11
|
+
const W = {
|
|
12
|
+
transparent: p`
|
|
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: p`
|
|
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
|
+
}, E = 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 }) => W[e]};
|
|
32
|
+
`, L = o.div`
|
|
33
33
|
padding: 2rem;
|
|
34
34
|
display: flex;
|
|
35
35
|
flex-direction: column;
|
|
36
36
|
gap: ${({ theme: e }) => e.spacing.sm};
|
|
37
37
|
border-bottom: 1px solid ${({ theme: e }) => e.colors.grey.n200};
|
|
38
|
-
`,
|
|
38
|
+
`, D = o.div`
|
|
39
39
|
display: flex;
|
|
40
40
|
align-items: center;
|
|
41
41
|
justify-content: space-between;
|
|
42
42
|
gap: ${({ theme: e }) => e.spacing.m};
|
|
43
43
|
flex-wrap: wrap;
|
|
44
|
-
`,
|
|
44
|
+
`, V = o(a)`
|
|
45
45
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
46
46
|
font-weight: 600;
|
|
47
47
|
font-size: ${({ theme: e }) => {
|
|
48
|
-
var
|
|
49
|
-
return (
|
|
48
|
+
var r;
|
|
49
|
+
return (r = e.typography.sizes) == null ? void 0 : r.s5;
|
|
50
50
|
}};
|
|
51
51
|
line-height: 1.75rem;
|
|
52
52
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
53
|
-
`,
|
|
53
|
+
`, M = o.div`
|
|
54
54
|
display: flex;
|
|
55
55
|
flex-direction: column;
|
|
56
56
|
gap: 0.85rem;
|
|
57
|
-
`,
|
|
57
|
+
`, N = 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
|
+
`, U = o.div`
|
|
63
63
|
display: flex;
|
|
64
64
|
align-items: baseline;
|
|
65
65
|
gap: ${({ theme: e }) => e.spacing.xxs};
|
|
66
|
-
`,
|
|
66
|
+
`, X = o(m).attrs(({ theme: e }) => ({
|
|
67
67
|
color: e.colors.grey.n350,
|
|
68
68
|
width: "18",
|
|
69
69
|
height: "20"
|
|
70
|
-
}))``,
|
|
70
|
+
}))``, q = o.span`
|
|
71
71
|
font-family: ${({ theme: e }) => e.fonts.english};
|
|
72
72
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
73
73
|
font-size: 2.706rem;
|
|
74
74
|
line-height: 3.158rem;
|
|
75
|
-
color: ${({ $color: e, theme:
|
|
76
|
-
`,
|
|
75
|
+
color: ${({ $color: e, theme: r }) => e ?? r.colors.grey.n800};
|
|
76
|
+
`, G = o.span`
|
|
77
77
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
78
78
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
79
79
|
font-size: ${({ theme: e }) => {
|
|
80
|
-
var
|
|
81
|
-
return (
|
|
80
|
+
var r;
|
|
81
|
+
return (r = e.typography.sizes) == null ? void 0 : r.s5;
|
|
82
82
|
}};
|
|
83
83
|
line-height: 1.804rem;
|
|
84
|
-
color: ${({ $color: e, theme:
|
|
85
|
-
`,
|
|
84
|
+
color: ${({ $color: e, theme: r }) => e ?? r.colors.grey.n800};
|
|
85
|
+
`, J = o(a)`
|
|
86
86
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
87
87
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
88
88
|
font-size: ${({ theme: e }) => {
|
|
89
|
-
var
|
|
90
|
-
return (
|
|
89
|
+
var r;
|
|
90
|
+
return (r = e.typography.sizes) == null ? void 0 : r.s4;
|
|
91
91
|
}};
|
|
92
92
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
93
93
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
94
|
-
`,
|
|
94
|
+
`, K = o.div`
|
|
95
95
|
padding: 2rem 2rem 2.5rem 2rem;
|
|
96
96
|
display: flex;
|
|
97
97
|
flex-direction: column;
|
|
98
98
|
gap: ${({ theme: e }) => e.spacing.m};
|
|
99
|
-
`,
|
|
99
|
+
`, Q = o(a)`
|
|
100
100
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
101
101
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
102
102
|
font-size: ${({ theme: e }) => {
|
|
103
|
-
var
|
|
104
|
-
return (
|
|
103
|
+
var r;
|
|
104
|
+
return (r = e.typography.sizes) == null ? void 0 : r.s4;
|
|
105
105
|
}};
|
|
106
106
|
line-height: 0.7rem;
|
|
107
107
|
color: ${({ theme: e }) => e.colors.grey.n650};
|
|
108
108
|
text-transform: uppercase;
|
|
109
|
-
`,
|
|
109
|
+
`, Y = o(a)`
|
|
110
110
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
111
111
|
font-weight: 500;
|
|
112
112
|
font-size: ${({ theme: e }) => {
|
|
113
|
-
var
|
|
114
|
-
return (
|
|
113
|
+
var r;
|
|
114
|
+
return (r = e.typography.sizes) == null ? void 0 : r.s4;
|
|
115
115
|
}};
|
|
116
116
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
117
117
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
118
|
-
`,
|
|
118
|
+
`, Z = o.div`
|
|
119
119
|
display: flex;
|
|
120
120
|
align-items: center;
|
|
121
121
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
122
|
-
`,
|
|
122
|
+
`, _ = o.span`
|
|
123
123
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
124
124
|
font-weight: ${({ theme: e }) => e.typography.weights.bold};
|
|
125
125
|
font-size: ${({ theme: e }) => e.typography.sizes.s9};
|
|
126
126
|
line-height: ${({ theme: e }) => e.typography.lineHeights.xl};
|
|
127
127
|
letter-spacing: ${({ theme: e }) => e.typography.letterSpacings.balancedNarrow};
|
|
128
128
|
color: ${({ theme: e }) => e.colors.grey.n350};
|
|
129
|
-
`,
|
|
129
|
+
`, O = o.span`
|
|
130
130
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
131
131
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
132
132
|
font-size: ${({ theme: e }) => e.typography.sizes.s4};
|
|
133
133
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
134
134
|
color: ${({ theme: e }) => e.colors.grey.n350};
|
|
135
|
-
`,
|
|
135
|
+
`, A = o.ul`
|
|
136
136
|
list-style: none;
|
|
137
137
|
margin: 0;
|
|
138
138
|
padding: 0;
|
|
139
139
|
display: flex;
|
|
140
140
|
flex-direction: column;
|
|
141
141
|
gap: ${({ theme: e }) => e.spacing.s};
|
|
142
|
-
`,
|
|
142
|
+
`, ee = o.li`
|
|
143
143
|
display: flex;
|
|
144
144
|
align-items: center;
|
|
145
145
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
146
|
-
`,
|
|
146
|
+
`, ie = o.span`
|
|
147
147
|
width: 1rem;
|
|
148
148
|
height: 1rem;
|
|
149
149
|
border-radius: 50%;
|
|
@@ -157,23 +157,23 @@ const F = {
|
|
|
157
157
|
height: 0.7rem;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
${({ theme: e, $variant:
|
|
160
|
+
${({ theme: e, $variant: r }) => r === "included" ? p`
|
|
161
161
|
border: 1px solid ${e.colors.secondary.green.n450};
|
|
162
162
|
color: ${e.colors.secondary.green.n450};
|
|
163
|
-
` :
|
|
163
|
+
` : p`
|
|
164
164
|
border: 1px solid ${e.colors.secondary.pink.n450};
|
|
165
165
|
color: ${e.colors.secondary.pink.n450};
|
|
166
166
|
`}
|
|
167
|
-
`,
|
|
167
|
+
`, re = o(a)`
|
|
168
168
|
font-family: ${({ theme: e }) => e.fonts.arabic};
|
|
169
169
|
font-weight: 400;
|
|
170
170
|
font-size: ${({ theme: e }) => {
|
|
171
|
-
var
|
|
172
|
-
return (
|
|
171
|
+
var r;
|
|
172
|
+
return (r = e.typography.sizes) == null ? void 0 : r.s3;
|
|
173
173
|
}};
|
|
174
174
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
175
175
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
176
|
-
`,
|
|
176
|
+
`, oe = o.div`
|
|
177
177
|
width: 100%;
|
|
178
178
|
margin-top: 1rem;
|
|
179
179
|
display: flex;
|
|
@@ -183,57 +183,136 @@ const F = {
|
|
|
183
183
|
button {
|
|
184
184
|
width: 100%;
|
|
185
185
|
}
|
|
186
|
-
`,
|
|
186
|
+
`, xe = ({
|
|
187
187
|
title: e,
|
|
188
|
-
price:
|
|
189
|
-
description:
|
|
190
|
-
secondaryPrice:
|
|
191
|
-
features:
|
|
192
|
-
variant:
|
|
193
|
-
badges:
|
|
194
|
-
showPrimaryAction:
|
|
188
|
+
price: r,
|
|
189
|
+
description: y,
|
|
190
|
+
secondaryPrice: c,
|
|
191
|
+
features: $,
|
|
192
|
+
variant: u = "transparent",
|
|
193
|
+
badges: h = [],
|
|
194
|
+
showPrimaryAction: b = !1,
|
|
195
195
|
primaryAction: s,
|
|
196
|
-
showSecondaryAction:
|
|
197
|
-
secondaryAction:
|
|
198
|
-
showFeatures:
|
|
199
|
-
featuresTitle:
|
|
200
|
-
featuresDescription:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
196
|
+
showSecondaryAction: j = !1,
|
|
197
|
+
secondaryAction: l,
|
|
198
|
+
showFeatures: w = !0,
|
|
199
|
+
featuresTitle: v = "FEATURES",
|
|
200
|
+
featuresDescription: z = "Everything in our free plan plus.....",
|
|
201
|
+
showAddons: C = !1,
|
|
202
|
+
selectedAddon: k = "Without",
|
|
203
|
+
setSelectedAddon: g,
|
|
204
|
+
addOnsData: f = [],
|
|
205
|
+
addonsTitle: F = "Personal Accountant",
|
|
206
|
+
addonsOptionalLabel: R = "optional",
|
|
207
|
+
addonsMonthlyLabel: S = "monthly"
|
|
208
|
+
}) => /* @__PURE__ */ i.jsxs(E, { $variant: u, children: [
|
|
209
|
+
/* @__PURE__ */ i.jsxs(L, { children: [
|
|
210
|
+
/* @__PURE__ */ i.jsxs(D, { children: [
|
|
211
|
+
/* @__PURE__ */ i.jsx(V, { children: e }),
|
|
212
|
+
h.length > 0 && /* @__PURE__ */ i.jsx(N, { children: h.map((t, n) => /* @__PURE__ */ i.jsx(P, { label: t.label, bgColor: t.bgColor, color: t.color }, `${t.label}-${n}`)) })
|
|
206
213
|
] }),
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ i.jsxs(U, { children: [
|
|
215
|
+
/* @__PURE__ */ i.jsx(H, { src: I, alt: "Riyal" }),
|
|
216
|
+
/* @__PURE__ */ i.jsx(q, { $color: r.color, children: r.amount }),
|
|
217
|
+
/* @__PURE__ */ i.jsx(G, { $color: r.periodColor, children: r.period ?? "/ Month" })
|
|
211
218
|
] }),
|
|
212
|
-
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
219
|
+
c && /* @__PURE__ */ i.jsxs(Z, { children: [
|
|
220
|
+
/* @__PURE__ */ i.jsx(X, {}),
|
|
221
|
+
/* @__PURE__ */ i.jsx(_, { children: c.amount }),
|
|
222
|
+
/* @__PURE__ */ i.jsx(O, { children: c.label })
|
|
216
223
|
] }),
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
/* @__PURE__ */
|
|
219
|
-
|
|
220
|
-
|
|
224
|
+
/* @__PURE__ */ i.jsx(J, { children: y }),
|
|
225
|
+
/* @__PURE__ */ i.jsxs(oe, { children: [
|
|
226
|
+
b && /* @__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 }),
|
|
227
|
+
j && /* @__PURE__ */ i.jsx(d, { variant: (l == null ? void 0 : l.variant) ?? "light-primary", onClick: l == null ? void 0 : l.onSecondaryActionClick, children: l == null ? void 0 : l.label })
|
|
228
|
+
] }),
|
|
229
|
+
C && f.length > 0 && /* @__PURE__ */ i.jsxs("div", { children: [
|
|
230
|
+
/* @__PURE__ */ i.jsx("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "10px" }, children: /* @__PURE__ */ i.jsxs("div", { children: [
|
|
231
|
+
/* @__PURE__ */ i.jsx("span", { style: { fontSize: "13px", fontWeight: 600, color: "#111827" }, children: F }),
|
|
232
|
+
/* @__PURE__ */ i.jsx("span", { style: { fontSize: "11px", color: "#9ca3af", marginLeft: "6px" }, children: R })
|
|
233
|
+
] }) }),
|
|
234
|
+
/* @__PURE__ */ i.jsx(
|
|
235
|
+
"div",
|
|
236
|
+
{
|
|
237
|
+
style: {
|
|
238
|
+
backgroundColor: "#f2f4f7",
|
|
239
|
+
borderRadius: "9px",
|
|
240
|
+
padding: "4px",
|
|
241
|
+
display: "grid",
|
|
242
|
+
gridTemplateColumns: "repeat(3, minmax(0, 1fr))",
|
|
243
|
+
gap: "4px"
|
|
244
|
+
},
|
|
245
|
+
children: f.map((t) => {
|
|
246
|
+
const n = k === t.id;
|
|
247
|
+
return /* @__PURE__ */ i.jsxs(
|
|
248
|
+
"button",
|
|
249
|
+
{
|
|
250
|
+
type: "button",
|
|
251
|
+
onClick: () => g == null ? void 0 : g(t.id),
|
|
252
|
+
style: {
|
|
253
|
+
padding: "8px 6px 7px",
|
|
254
|
+
border: n ? "1px solid #d0d5dd" : "1px solid transparent",
|
|
255
|
+
backgroundColor: n ? "#ffffff" : "transparent",
|
|
256
|
+
color: n ? "#1d2939" : "#98a2b3",
|
|
257
|
+
borderRadius: "6px",
|
|
258
|
+
cursor: "pointer",
|
|
259
|
+
fontWeight: n ? 700 : 600,
|
|
260
|
+
fontSize: "12px",
|
|
261
|
+
lineHeight: 1.1,
|
|
262
|
+
transition: "all 0.18s ease",
|
|
263
|
+
display: "flex",
|
|
264
|
+
flexDirection: "column",
|
|
265
|
+
alignItems: "center",
|
|
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
|
+
]
|
|
294
|
+
},
|
|
295
|
+
t.id
|
|
296
|
+
);
|
|
297
|
+
})
|
|
298
|
+
}
|
|
299
|
+
)
|
|
221
300
|
] })
|
|
222
301
|
] }),
|
|
223
|
-
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
/* @__PURE__ */
|
|
302
|
+
w && /* @__PURE__ */ i.jsxs(K, { children: [
|
|
303
|
+
/* @__PURE__ */ i.jsxs(M, { children: [
|
|
304
|
+
/* @__PURE__ */ i.jsx(Q, { children: v }),
|
|
305
|
+
/* @__PURE__ */ i.jsx(Y, { children: z })
|
|
227
306
|
] }),
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
const
|
|
230
|
-
return /* @__PURE__ */
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
] }, `${
|
|
307
|
+
/* @__PURE__ */ i.jsx(A, { children: $.map((t, n) => {
|
|
308
|
+
const x = t.variant ?? "included";
|
|
309
|
+
return /* @__PURE__ */ i.jsxs(ee, { children: [
|
|
310
|
+
/* @__PURE__ */ i.jsx(ie, { $variant: x, children: x === "included" ? /* @__PURE__ */ i.jsx(B, {}) : /* @__PURE__ */ i.jsx(T, {}) }),
|
|
311
|
+
/* @__PURE__ */ i.jsx(re, { children: t.label })
|
|
312
|
+
] }, `${t.label}-${n}`);
|
|
234
313
|
}) })
|
|
235
314
|
] })
|
|
236
315
|
] });
|
|
237
316
|
export {
|
|
238
|
-
|
|
317
|
+
xe as default
|
|
239
318
|
};
|
|
@@ -7,10 +7,11 @@ import j from "../assets/svg/Riyal.svg.js";
|
|
|
7
7
|
const w = s.div`
|
|
8
8
|
display: flex;
|
|
9
9
|
width: 100%;
|
|
10
|
-
height:
|
|
10
|
+
height: 5rem;
|
|
11
11
|
border-radius: ${({ theme: r }) => r.borderRadius.md};
|
|
12
12
|
border: 1px solid ${({ theme: r }) => r.colors.grey.n100};
|
|
13
|
-
overflow:
|
|
13
|
+
overflow-x: auto;
|
|
14
|
+
overflow-y: hidden;
|
|
14
15
|
background-color: ${({ theme: r }) => r.colors.grey.n50};
|
|
15
16
|
`, b = s.div`
|
|
16
17
|
/* border: 1px solid ${({ theme: r }) => r.colors.grey.n150}; */
|
|
@@ -19,7 +20,7 @@ const w = s.div`
|
|
|
19
20
|
flex-direction: column;
|
|
20
21
|
justify-content: center;
|
|
21
22
|
padding: 0.625rem ${({ theme: r }) => r.spacing.s};
|
|
22
|
-
|
|
23
|
+
|
|
23
24
|
background-color: ${({ theme: r }) => r.colors.grey.n50};
|
|
24
25
|
@media ${t.tablet} {
|
|
25
26
|
padding: ${({ theme: r }) => r.spacing.xxs} ${({ theme: r }) => r.spacing.xs};
|
|
@@ -108,11 +109,11 @@ const w = s.div`
|
|
|
108
109
|
state: n,
|
|
109
110
|
indicators: h,
|
|
110
111
|
variant: g = "currency",
|
|
111
|
-
icon:
|
|
112
|
-
$isLast:
|
|
112
|
+
icon: y,
|
|
113
|
+
$isLast: x
|
|
113
114
|
}) => {
|
|
114
115
|
const { arrow: c = !0, sign: l = !0, percentage: d = !0 } = h || {};
|
|
115
|
-
return /* @__PURE__ */ o.jsxs(b, { $isLast:
|
|
116
|
+
return /* @__PURE__ */ o.jsxs(b, { $isLast: x, children: [
|
|
116
117
|
/* @__PURE__ */ o.jsxs(v, { children: [
|
|
117
118
|
/* @__PURE__ */ o.jsx("span", { children: r }),
|
|
118
119
|
(c || l || d) && /* @__PURE__ */ o.jsx(z, { state: n, children: n === "positive" ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
@@ -126,7 +127,7 @@ const w = s.div`
|
|
|
126
127
|
] }) })
|
|
127
128
|
] }),
|
|
128
129
|
/* @__PURE__ */ o.jsxs(I, { children: [
|
|
129
|
-
g === "icon" ? /* @__PURE__ */ o.jsx(C, { children:
|
|
130
|
+
g === "icon" ? /* @__PURE__ */ o.jsx(C, { children: y }) : /* @__PURE__ */ o.jsx(k, { src: j, alt: "Riyal" }),
|
|
130
131
|
/* @__PURE__ */ o.jsxs(A, { children: [
|
|
131
132
|
e,
|
|
132
133
|
g !== "icon" && i && /* @__PURE__ */ o.jsxs(R, { children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as t } from "../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useState as v, useEffect as E, useMemo as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import
|
|
2
|
+
import { useState as v, useEffect as E, useMemo as q } from "react";
|
|
3
|
+
import { useTranslation as G } from "react-i18next";
|
|
4
|
+
import J from "../Spinner.js";
|
|
5
5
|
import Q from "../Pagination.js";
|
|
6
6
|
import U from "../Typography.js";
|
|
7
7
|
import L, { CheckboxCell as X } from "./components/CellComponents.js";
|
|
@@ -9,22 +9,22 @@ import O from "./components/TableHead.js";
|
|
|
9
9
|
import { TableContainer as Y, LoadingOverlay as Z, TablesWrapper as H, DataScrollBox as D, StyledTable as k, TableBody as z, EmptyState as F, TableRow as W, TableCellContainer as b, ActionsTable as R, TableFooter as w } from "./Table.styles.js";
|
|
10
10
|
function de({
|
|
11
11
|
columns: T,
|
|
12
|
-
data:
|
|
12
|
+
data: c,
|
|
13
13
|
keyField: r,
|
|
14
|
-
selectable:
|
|
15
|
-
onRowSelect:
|
|
16
|
-
rowActions:
|
|
14
|
+
selectable: j = !1,
|
|
15
|
+
onRowSelect: m,
|
|
16
|
+
rowActions: x,
|
|
17
17
|
stickyHeader: $ = !1,
|
|
18
18
|
loading: a = !1,
|
|
19
19
|
emptyStateMessage: y,
|
|
20
20
|
pagination: n,
|
|
21
21
|
onRowClick: f,
|
|
22
|
-
rowClassName:
|
|
22
|
+
rowClassName: u,
|
|
23
23
|
isRowDisabled: d,
|
|
24
24
|
breakpoint: I = "md",
|
|
25
25
|
alignHeader: C = "start"
|
|
26
26
|
}) {
|
|
27
|
-
const [h, p] = v([]), [S, g] = v(I), [
|
|
27
|
+
const [h, p] = v([]), [S, g] = v(I), [N, B] = v(null), { t: _ } = G();
|
|
28
28
|
E(() => {
|
|
29
29
|
const e = () => {
|
|
30
30
|
B(null);
|
|
@@ -39,36 +39,36 @@ function de({
|
|
|
39
39
|
};
|
|
40
40
|
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
41
41
|
}, []);
|
|
42
|
-
const P =
|
|
43
|
-
h.length ===
|
|
44
|
-
},
|
|
42
|
+
const P = q(() => T.filter((e) => typeof e.hidden == "function" ? !e.hidden(S) : !e.hidden), [T, S]), K = () => {
|
|
43
|
+
h.length === c.length ? p([]) : p([...c]), m && m(h.length === c.length ? [] : [...c]);
|
|
44
|
+
}, M = (e) => {
|
|
45
45
|
const l = h.filter((s) => e[r] === s[r]);
|
|
46
46
|
return l && l.length > 0;
|
|
47
|
-
},
|
|
47
|
+
}, V = (e) => {
|
|
48
48
|
const l = h.some((o) => o[r] === e[r]);
|
|
49
49
|
let s;
|
|
50
|
-
l ? s = h.filter((o) => o[r] !== e[r]) : s = [...h, e], p(s),
|
|
50
|
+
l ? s = h.filter((o) => o[r] !== e[r]) : s = [...h, e], p(s), m && m(s);
|
|
51
51
|
};
|
|
52
52
|
return /* @__PURE__ */ t.jsxs(Y, { children: [
|
|
53
|
-
a && /* @__PURE__ */ t.jsx(Z, { children: /* @__PURE__ */ t.jsx(
|
|
53
|
+
a && /* @__PURE__ */ t.jsx(Z, { children: /* @__PURE__ */ t.jsx(J, { size: "3rem" }) }),
|
|
54
54
|
/* @__PURE__ */ t.jsxs(H, { children: [
|
|
55
55
|
/* @__PURE__ */ t.jsx(D, { children: /* @__PURE__ */ t.jsxs(k, { children: [
|
|
56
56
|
/* @__PURE__ */ t.jsx(
|
|
57
57
|
O,
|
|
58
58
|
{
|
|
59
|
-
data:
|
|
60
|
-
handleSelectAll:
|
|
59
|
+
data: c,
|
|
60
|
+
handleSelectAll: K,
|
|
61
61
|
selectedRows: h,
|
|
62
62
|
visibleColumns: P,
|
|
63
63
|
alignHeader: C,
|
|
64
64
|
rowActions: void 0,
|
|
65
65
|
stickyHeader: $,
|
|
66
|
-
selectable:
|
|
66
|
+
selectable: j,
|
|
67
67
|
loading: a
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
|
-
/* @__PURE__ */ t.jsx(z, { children:
|
|
71
|
-
const s = (d == null ? void 0 : d(e)) ?? !1, o = h.some((
|
|
70
|
+
/* @__PURE__ */ t.jsx(z, { children: c.length === 0 ? /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx("td", { colSpan: (j ? 1 : 0) + P.length, children: /* @__PURE__ */ t.jsx(F, { children: /* @__PURE__ */ t.jsx(U, { variant: "mdText", children: y ?? _("NO_DATA_AVAILABLE") }) }) }) }) : c.map((e, l) => {
|
|
71
|
+
const s = (d == null ? void 0 : d(e)) ?? !1, o = h.some((i) => i[r] === e[r]), A = e[r];
|
|
72
72
|
return /* @__PURE__ */ t.jsxs(
|
|
73
73
|
W,
|
|
74
74
|
{
|
|
@@ -76,55 +76,56 @@ function de({
|
|
|
76
76
|
$disabled: s,
|
|
77
77
|
$clickable: !!f && !s,
|
|
78
78
|
onClick: () => !s && (f == null ? void 0 : f(e)),
|
|
79
|
-
className: (
|
|
79
|
+
className: (u == null ? void 0 : u(e, l)) ?? "",
|
|
80
80
|
children: [
|
|
81
|
-
|
|
81
|
+
j && /* @__PURE__ */ t.jsx(b, { $align: "center", $isFirstColumn: !0, children: /* @__PURE__ */ t.jsx(
|
|
82
82
|
X,
|
|
83
83
|
{
|
|
84
84
|
checkBoxOptions: {
|
|
85
|
-
checked:
|
|
85
|
+
checked: M(e),
|
|
86
86
|
$variant: "primary",
|
|
87
87
|
$disabled: s,
|
|
88
88
|
$size: "sm",
|
|
89
|
-
onChange: () => !s &&
|
|
89
|
+
onChange: () => !s && V(e)
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
) }),
|
|
93
|
-
P.map((
|
|
93
|
+
P.map((i) => /* @__PURE__ */ t.jsx(b, { $align: i.align, children: /* @__PURE__ */ t.jsx(
|
|
94
94
|
L,
|
|
95
95
|
{
|
|
96
|
-
column:
|
|
96
|
+
column: i,
|
|
97
97
|
row: e,
|
|
98
|
-
type:
|
|
99
|
-
align:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
type: i.cellType ?? "text",
|
|
99
|
+
align: i.align,
|
|
100
|
+
className: i.className,
|
|
101
|
+
width: i.width ?? "",
|
|
102
|
+
minWidth: i.minWidth ?? "",
|
|
103
|
+
maxWidth: i.maxWidth ?? ""
|
|
103
104
|
}
|
|
104
|
-
) }, `${A}-${
|
|
105
|
+
) }, `${A}-${i.id}`))
|
|
105
106
|
]
|
|
106
107
|
},
|
|
107
108
|
A
|
|
108
109
|
);
|
|
109
110
|
}) })
|
|
110
111
|
] }) }),
|
|
111
|
-
|
|
112
|
+
x && x.length > 0 && /* @__PURE__ */ t.jsxs(R, { children: [
|
|
112
113
|
/* @__PURE__ */ t.jsx(
|
|
113
114
|
O,
|
|
114
115
|
{
|
|
115
|
-
data:
|
|
116
|
+
data: c,
|
|
116
117
|
handleSelectAll: () => {
|
|
117
118
|
},
|
|
118
119
|
selectedRows: h,
|
|
119
120
|
visibleColumns: [],
|
|
120
121
|
alignHeader: C,
|
|
121
|
-
rowActions:
|
|
122
|
+
rowActions: x,
|
|
122
123
|
stickyHeader: $,
|
|
123
124
|
selectable: !1,
|
|
124
125
|
loading: a
|
|
125
126
|
}
|
|
126
127
|
),
|
|
127
|
-
/* @__PURE__ */ t.jsx(z, { children:
|
|
128
|
+
/* @__PURE__ */ t.jsx(z, { children: c.length === 0 ? /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsx("div", { style: { height: "3.5rem" } }) }) }) : c.map((e) => {
|
|
128
129
|
const l = (d == null ? void 0 : d(e)) ?? !1;
|
|
129
130
|
return /* @__PURE__ */ t.jsx(W, { $disabled: l, children: /* @__PURE__ */ t.jsx(b, { $align: "center", $isActionCell: !0, children: /* @__PURE__ */ t.jsx(
|
|
130
131
|
L,
|
|
@@ -133,8 +134,8 @@ function de({
|
|
|
133
134
|
type: "icon",
|
|
134
135
|
iconOptions: {
|
|
135
136
|
keyField: r,
|
|
136
|
-
rowActions:
|
|
137
|
-
activeDropdown:
|
|
137
|
+
rowActions: x,
|
|
138
|
+
activeDropdown: N,
|
|
138
139
|
setActiveDropdown: B
|
|
139
140
|
}
|
|
140
141
|
}
|
|
@@ -25,7 +25,7 @@ const i = g.div`
|
|
|
25
25
|
duplicate: /* @__PURE__ */ r.jsx(j, {}),
|
|
26
26
|
approve: /* @__PURE__ */ r.jsx(u, {}),
|
|
27
27
|
print: /* @__PURE__ */ r.jsx(u, {})
|
|
28
|
-
}, R = (e) => E[e.toLowerCase()] ?? null, D = ({ data: e, type: t, width: s, maxWidth: n, minWidth: o }) => /* @__PURE__ */ r.jsx(i, { width: s, maxWidth: n, minWidth: o, children: e && /* @__PURE__ */ r.jsx(d, { data: e, type: t, width: s }) }), L = ({ data: e, type: t, width: s, maxWidth: n, minWidth: o }) => /* @__PURE__ */ r.jsx(i, { width: s, maxWidth: n, minWidth: o, children: e && /* @__PURE__ */ r.jsx(d, { data: e, type: t, width: s }) }), M = ({ data: e, type: t, width: s, maxWidth: n, minWidth: o }) => /* @__PURE__ */ r.jsx(i, { width: s, maxWidth: n, minWidth: o, children: e && /* @__PURE__ */ r.jsx(d, { data: e, type: t, width: s }) }), S = ({ data: e, type: t, width: s, maxWidth: n, minWidth: o }) => /* @__PURE__ */ r.jsx(i, { width: s, maxWidth: n, minWidth: o, children: e && /* @__PURE__ */ r.jsx(d, { data: e, type: t, width: s }) }), V = ({ data: e, type: t, width: s, maxWidth: n, minWidth: o }) => /* @__PURE__ */ r.jsx(i, { width: s, maxWidth: n, minWidth: o, children: e && /* @__PURE__ */ r.jsx(b, { data: e, type: t, width: s }) }), H = ({ data: e, width: t, maxWidth: s, minWidth: n }) => /* @__PURE__ */ r.jsx(i, { width: t, maxWidth: s, minWidth: n, children: /* @__PURE__ */ r.jsx($, { value: e.value, direction: e.transactionType }) }), K = ({ checkBoxOptions: e, width: t, maxWidth: s, minWidth: n }) => {
|
|
28
|
+
}, R = (e) => E[e.toLowerCase()] ?? null, D = ({ data: e, type: t, width: s, maxWidth: n, minWidth: o }) => /* @__PURE__ */ r.jsx(i, { width: s, maxWidth: n, minWidth: o, children: e && /* @__PURE__ */ r.jsx(d, { data: e, type: t, width: s }) }), L = ({ data: e, type: t, width: s, maxWidth: n, minWidth: o }) => /* @__PURE__ */ r.jsx(i, { width: s, maxWidth: n, minWidth: o, children: e && /* @__PURE__ */ r.jsx(d, { data: e, type: t, width: s }) }), M = ({ data: e, type: t, width: s, maxWidth: n, minWidth: o }) => /* @__PURE__ */ r.jsx(i, { width: s, maxWidth: n, minWidth: o, children: e && /* @__PURE__ */ r.jsx(d, { data: e, type: t, width: s }) }), S = ({ data: e, type: t, width: s, maxWidth: n, minWidth: o, className: c }) => /* @__PURE__ */ r.jsx(i, { className: c, width: s, maxWidth: n, minWidth: o, children: e && /* @__PURE__ */ r.jsx(d, { data: e, type: t, width: s }) }), V = ({ data: e, type: t, width: s, maxWidth: n, minWidth: o }) => /* @__PURE__ */ r.jsx(i, { width: s, maxWidth: n, minWidth: o, children: e && /* @__PURE__ */ r.jsx(b, { data: e, type: t, width: s }) }), H = ({ data: e, width: t, maxWidth: s, minWidth: n }) => /* @__PURE__ */ r.jsx(i, { width: t, maxWidth: s, minWidth: n, children: /* @__PURE__ */ r.jsx($, { value: e.value, direction: e.transactionType }) }), K = ({ checkBoxOptions: e, width: t, maxWidth: s, minWidth: n }) => {
|
|
29
29
|
const o = e ? { ...e, name: e.name ?? "" } : void 0;
|
|
30
30
|
return /* @__PURE__ */ r.jsx(i, { width: t, maxWidth: s, minWidth: n, children: /* @__PURE__ */ r.jsx(F, { ...o }) });
|
|
31
31
|
}, P = ({ radioButtonOptions: e, width: t, maxWidth: s, minWidth: n }) => {
|