qaema-ui 0.0.1 → 0.0.2
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.
|
@@ -30,6 +30,7 @@ export type RequestCardProps = {
|
|
|
30
30
|
unit?: string;
|
|
31
31
|
};
|
|
32
32
|
inModal?: boolean;
|
|
33
|
+
background?: string;
|
|
33
34
|
};
|
|
34
35
|
export declare const ContentWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ContentWrapperProps>> & string;
|
|
35
36
|
export declare const TrackingWrap: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestCard.d.ts","sourceRoot":"","sources":["../../src/lib/components/RequestCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAU,KAAK,WAAW,EAA2B,MAAM,sBAAsB,CAAC;AAGzF,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,YAAY,CAAC;AAInF,KAAK,mBAAmB,GAAG;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAA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AE,KAAK,CAAC,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,UAAU,CAAC,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IAC9D,YAAY,CAAC,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,cAAc,oOAK1B,CAAC;AA6DF,eAAO,MAAM,YAAY,yMAIxB,CAAC;AAEF,eAAO,MAAM,cAAc,yMAQ1B,CAAC;AAiBF,eAAO,MAAM,WAAW;YAAwB,MAAM;YAAU,MAAM;YAgBrE,CAAC;AAEF,eAAO,MAAM,UAAU,2MAOtB,CAAC;AAqDF,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAqG3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { j as i } from "../_virtual/jsx-runtime.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import s, { useTheme as
|
|
3
|
+
import s, { useTheme as S } from "styled-components";
|
|
4
4
|
import d from "./Button.js";
|
|
5
|
-
import { useQaemaCoreTranslation as
|
|
6
|
-
import
|
|
7
|
-
import { FeatureList as
|
|
5
|
+
import { useQaemaCoreTranslation as F } from "../i18n/i18n.js";
|
|
6
|
+
import H from "../assets/svg/Riyal.svg.js";
|
|
7
|
+
import { FeatureList as A, FeatureRow as E, Bullet as P } from "./RequestSummaryCard.js";
|
|
8
8
|
import c from "./Typography.js";
|
|
9
|
-
const
|
|
9
|
+
const q = s.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
justify-content: space-between;
|
|
13
13
|
height: ${({ image: e, inModal: n }) => e ? n ? "65%" : "unset" : "100%"};
|
|
14
|
-
`,
|
|
14
|
+
`, W = s.div`
|
|
15
15
|
min-width: 9.0625rem;
|
|
16
16
|
display: flex;
|
|
17
17
|
aspect-ratio: ${({ $inModal: e }) => e ? "23/9" : "11/9"};
|
|
18
|
-
background: linear-gradient(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
background: ${({ $background: e, theme: n }) => e ?? `linear-gradient(
|
|
19
|
+
180deg,
|
|
20
|
+
${n.colors.primary.purple.n100} 0%,
|
|
21
|
+
${n.colors.primary.purple.n300} 100%
|
|
22
|
+
)`};
|
|
23
23
|
border-radius: ${({ theme: e }) => e.borderRadius.md};
|
|
24
24
|
|
|
25
25
|
place-items: center;
|
|
@@ -29,22 +29,22 @@ const P = s.div`
|
|
|
29
29
|
svg {
|
|
30
30
|
width: 100%;
|
|
31
31
|
height: 100%;
|
|
32
|
-
object-fit:
|
|
32
|
+
object-fit: cover;
|
|
33
33
|
display: block;
|
|
34
34
|
}
|
|
35
|
-
`,
|
|
35
|
+
`, M = s.div`
|
|
36
36
|
display: grid;
|
|
37
37
|
grid-template-columns: ${({ $isRow: e }) => e ? "auto auto" : "1fr"};
|
|
38
38
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
39
39
|
margin-top: ${({ theme: e }) => e.spacing.xxs};
|
|
40
40
|
justify-content: ${({ $isRow: e }) => e ? "space-between" : "stretch"};
|
|
41
41
|
align-items: center;
|
|
42
|
-
`,
|
|
42
|
+
`, V = s(d)`
|
|
43
43
|
min-width: 9.3125rem;
|
|
44
44
|
min-height: 2rem;
|
|
45
45
|
border-radius: ${({ theme: e }) => e.borderRadius.sm};
|
|
46
46
|
box-shadow: ${({ theme: e }) => e.boxShadow.s3};
|
|
47
|
-
`,
|
|
47
|
+
`, D = s.h3`
|
|
48
48
|
margin: 0;
|
|
49
49
|
font-family: ${({ theme: e }) => (e == null ? void 0 : e.dir) === "rtl" ? e.fonts.arabic : e.fonts.english};
|
|
50
50
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
@@ -55,7 +55,7 @@ const P = s.div`
|
|
|
55
55
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
56
56
|
letter-spacing: -0.25px;
|
|
57
57
|
color: ${({ theme: e }) => e.colors.grey.n800};
|
|
58
|
-
`,
|
|
58
|
+
`, I = s.p`
|
|
59
59
|
margin: 0;
|
|
60
60
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
61
61
|
font-size: ${({ theme: e }) => {
|
|
@@ -63,11 +63,11 @@ const P = s.div`
|
|
|
63
63
|
return (n = e.typography.sizes) == null ? void 0 : n.s3;
|
|
64
64
|
}};
|
|
65
65
|
line-height: ${({ theme: e }) => e.typography.lineHeights.s};
|
|
66
|
-
`,
|
|
66
|
+
`, L = s.div`
|
|
67
67
|
display: flex;
|
|
68
68
|
flex-direction: column;
|
|
69
69
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
70
|
-
`,
|
|
70
|
+
`, N = s.div`
|
|
71
71
|
font-family: ${({ theme: e }) => (e == null ? void 0 : e.dir) === "rtl" ? e.fonts.arabic : e.fonts.english};
|
|
72
72
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
73
73
|
font-size: ${({ theme: e }) => {
|
|
@@ -78,7 +78,7 @@ const P = s.div`
|
|
|
78
78
|
letter-spacing: 0;
|
|
79
79
|
vertical-align: middle;
|
|
80
80
|
color: ${({ theme: e }) => e.colors.grey.n650};
|
|
81
|
-
`,
|
|
81
|
+
`, Q = s.div`
|
|
82
82
|
width: ${({ $fixed: e }) => e ? "335px" : "100%"};
|
|
83
83
|
min-width: 11.1875rem;
|
|
84
84
|
height: 100%;
|
|
@@ -91,7 +91,7 @@ const P = s.div`
|
|
|
91
91
|
display: flex;
|
|
92
92
|
flex-direction: column;
|
|
93
93
|
gap: ${({ theme: e }) => e.spacing.s};
|
|
94
|
-
`,
|
|
94
|
+
`, X = s.div`
|
|
95
95
|
position: relative;
|
|
96
96
|
width: 100%;
|
|
97
97
|
height: 0.5rem;
|
|
@@ -107,7 +107,7 @@ const P = s.div`
|
|
|
107
107
|
transition: width 250ms ease;
|
|
108
108
|
border-radius: 0;
|
|
109
109
|
}
|
|
110
|
-
`,
|
|
110
|
+
`, G = s.span`
|
|
111
111
|
font-family: ${({ theme: e }) => (e == null ? void 0 : e.dir) === "rtl" ? e.fonts.arabic : e.fonts.english};
|
|
112
112
|
font-weight: ${({ theme: e }) => e.typography.weights.regular};
|
|
113
113
|
font-size: ${({ theme: e }) => {
|
|
@@ -117,7 +117,7 @@ const P = s.div`
|
|
|
117
117
|
line-height: ${({ theme: e }) => e.typography.lineHeights.xs};
|
|
118
118
|
letter-spacing: 0;
|
|
119
119
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
120
|
-
`,
|
|
120
|
+
`, J = (e) => {
|
|
121
121
|
switch (e) {
|
|
122
122
|
case "accepted":
|
|
123
123
|
return { bar: "#1DBA63" };
|
|
@@ -128,7 +128,7 @@ const P = s.div`
|
|
|
128
128
|
default:
|
|
129
129
|
return { bar: "#EEF0F2" };
|
|
130
130
|
}
|
|
131
|
-
},
|
|
131
|
+
}, K = s.div`
|
|
132
132
|
display: flex;
|
|
133
133
|
flex-direction: column;
|
|
134
134
|
justify-content: space-between;
|
|
@@ -139,7 +139,7 @@ const P = s.div`
|
|
|
139
139
|
@media (max-width: 375px) {
|
|
140
140
|
align-items: center;
|
|
141
141
|
}
|
|
142
|
-
`,
|
|
142
|
+
`, O = s.div`
|
|
143
143
|
display: flex;
|
|
144
144
|
align-items: baseline;
|
|
145
145
|
color: ${({ theme: e }) => e.colors.grey.n650};
|
|
@@ -151,48 +151,49 @@ const P = s.div`
|
|
|
151
151
|
@media (max-width: 375px) {
|
|
152
152
|
text-align: center;
|
|
153
153
|
}
|
|
154
|
-
`,
|
|
154
|
+
`, U = s.div`
|
|
155
155
|
display: flex;
|
|
156
156
|
align-items: center;
|
|
157
|
-
`,
|
|
157
|
+
`, Y = s.img`
|
|
158
158
|
width: ${({ $width: e = "1rem" }) => e};
|
|
159
159
|
height: 1rem;
|
|
160
160
|
object-fit: contain;
|
|
161
161
|
flex-shrink: 0;
|
|
162
162
|
margin-right: 2px;
|
|
163
|
-
`,
|
|
163
|
+
`, oe = ({
|
|
164
164
|
variant: e = "hidden",
|
|
165
165
|
image: n,
|
|
166
166
|
title: x,
|
|
167
167
|
subtitle: g,
|
|
168
168
|
trackingLabel: u = "Request Tracking",
|
|
169
|
-
progress:
|
|
170
|
-
statusText:
|
|
169
|
+
progress: f = 0,
|
|
170
|
+
statusText: m,
|
|
171
171
|
primaryCta: o,
|
|
172
172
|
secondaryCta: l,
|
|
173
|
-
className:
|
|
174
|
-
style:
|
|
173
|
+
className: $,
|
|
174
|
+
style: y,
|
|
175
175
|
features: a,
|
|
176
176
|
featuresTitle: b,
|
|
177
177
|
price: t,
|
|
178
|
-
inModal: h = !1
|
|
178
|
+
inModal: h = !1,
|
|
179
|
+
background: j
|
|
179
180
|
}) => {
|
|
180
|
-
const { t: r } =
|
|
181
|
-
return /* @__PURE__ */ i.jsxs(
|
|
182
|
-
n ? /* @__PURE__ */ i.jsx(
|
|
183
|
-
/* @__PURE__ */ i.jsxs(
|
|
184
|
-
/* @__PURE__ */ i.jsx(
|
|
185
|
-
g ? /* @__PURE__ */ i.jsx(
|
|
181
|
+
const { t: r } = F(), w = J(e), k = e !== "hidden", v = r(e === "accepted" ? "accepted" : e === "rejected" ? "rejected" : "submitted"), z = e === "hidden" ? "primary" : e === "accepted" ? "light-primary" : "outline-primary", p = e === "rejected", R = S();
|
|
182
|
+
return /* @__PURE__ */ i.jsxs(Q, { className: $, style: y, children: [
|
|
183
|
+
n ? /* @__PURE__ */ i.jsx(W, { $inModal: h, $background: j, children: n }) : null,
|
|
184
|
+
/* @__PURE__ */ i.jsxs(q, { image: n, inModal: h, children: [
|
|
185
|
+
/* @__PURE__ */ i.jsx(D, { children: x }),
|
|
186
|
+
g ? /* @__PURE__ */ i.jsx(I, { children: g }) : null,
|
|
186
187
|
a && a.length > 0 ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
187
|
-
/* @__PURE__ */ i.jsx(c, { variant: "h6", color:
|
|
188
|
-
/* @__PURE__ */ i.jsx(
|
|
189
|
-
/* @__PURE__ */ i.jsx(
|
|
190
|
-
/* @__PURE__ */ i.jsx("span", { children:
|
|
191
|
-
] },
|
|
188
|
+
/* @__PURE__ */ i.jsx(c, { variant: "h6", color: R.colors.grey.n400, children: b }),
|
|
189
|
+
/* @__PURE__ */ i.jsx(A, { children: a.map((T, B) => /* @__PURE__ */ i.jsxs(E, { children: [
|
|
190
|
+
/* @__PURE__ */ i.jsx(P, {}),
|
|
191
|
+
/* @__PURE__ */ i.jsx("span", { children: T.label })
|
|
192
|
+
] }, B)) })
|
|
192
193
|
] }) : null,
|
|
193
|
-
t && /* @__PURE__ */ i.jsx(
|
|
194
|
-
/* @__PURE__ */ i.jsxs(
|
|
195
|
-
/* @__PURE__ */ i.jsx(
|
|
194
|
+
t && /* @__PURE__ */ i.jsx(K, { children: /* @__PURE__ */ i.jsxs(O, { children: [
|
|
195
|
+
/* @__PURE__ */ i.jsxs(U, { children: [
|
|
196
|
+
/* @__PURE__ */ i.jsx(Y, { src: H, alt: t == null ? void 0 : t.amount }),
|
|
196
197
|
/* @__PURE__ */ i.jsx(c, { variant: "h5", weight: "bold", children: t == null ? void 0 : t.amount })
|
|
197
198
|
] }),
|
|
198
199
|
/* @__PURE__ */ i.jsxs(c, { variant: "caption", children: [
|
|
@@ -200,23 +201,23 @@ const P = s.div`
|
|
|
200
201
|
(t == null ? void 0 : t.unit) ?? r("year")
|
|
201
202
|
] })
|
|
202
203
|
] }) }),
|
|
203
|
-
|
|
204
|
-
/* @__PURE__ */ i.jsx(
|
|
205
|
-
/* @__PURE__ */ i.jsx(
|
|
206
|
-
/* @__PURE__ */ i.jsx(
|
|
204
|
+
k && /* @__PURE__ */ i.jsxs(L, { children: [
|
|
205
|
+
/* @__PURE__ */ i.jsx(N, { children: u }),
|
|
206
|
+
/* @__PURE__ */ i.jsx(X, { $value: f, $color: w.bar }),
|
|
207
|
+
/* @__PURE__ */ i.jsx(G, { children: m ?? v })
|
|
207
208
|
] }),
|
|
208
|
-
/* @__PURE__ */ i.jsx(
|
|
209
|
-
o && /* @__PURE__ */ i.jsx(d, { variant:
|
|
209
|
+
/* @__PURE__ */ i.jsx(M, { $isRow: p, children: p ? /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsx(V, { variant: "primary", size: "xs", onClick: o == null ? void 0 : o.onClick, children: (o == null ? void 0 : o.label) ?? "Send New Request" }) }) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
210
|
+
o && /* @__PURE__ */ i.jsx(d, { variant: z, size: "md", onClick: o.onClick, children: o.label }),
|
|
210
211
|
l && /* @__PURE__ */ i.jsx(d, { variant: "light-secondary", size: "md", onClick: l.onClick, children: l.label })
|
|
211
212
|
] }) })
|
|
212
213
|
] })
|
|
213
214
|
] });
|
|
214
215
|
};
|
|
215
216
|
export {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
217
|
+
q as ContentWrapper,
|
|
218
|
+
X as ProgressBar,
|
|
219
|
+
G as StatusText,
|
|
220
|
+
N as TrackingHeader,
|
|
221
|
+
L as TrackingWrap,
|
|
222
|
+
oe as default
|
|
222
223
|
};
|