qaema-ui 0.0.2 → 0.0.3
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.
|
@@ -29,6 +29,7 @@ export type RequestSummaryCardProps = {
|
|
|
29
29
|
showTracking?: boolean;
|
|
30
30
|
variant?: RequestCardVariant;
|
|
31
31
|
trackingLabel?: string;
|
|
32
|
+
imgPadding?: string;
|
|
32
33
|
};
|
|
33
34
|
export declare const FeatureList: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, never>> & string;
|
|
34
35
|
export declare const FeatureRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSummaryCard.d.ts","sourceRoot":"","sources":["../../src/lib/components/RequestSummaryCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAI7D,OAAO,EAAe,KAAK,kBAAkB,EAA4C,MAAM,eAAe,CAAC;AAE/G,KAAK,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5C,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,KAAK,CAAC;AAE/C,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAA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IAC9B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IAC9D,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAqEF,eAAO,MAAM,WAAW,6MAOvB,CAAC;AAEF,eAAO,MAAM,UAAU,yMAOtB,CAAC;AAEF,eAAO,MAAM,MAAM;cAA2B,OAAO;YA0BpD,CAAC;AAyCF,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAiEzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as i } from "../_virtual/jsx-runtime.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { device as
|
|
6
|
-
import
|
|
7
|
-
import { TrackingWrap as a, TrackingHeader as
|
|
8
|
-
const
|
|
3
|
+
import t from "styled-components";
|
|
4
|
+
import k from "./Button.js";
|
|
5
|
+
import { device as v } from "../constants/breakPoints.constant.js";
|
|
6
|
+
import z from "../assets/svg/Riyal.svg.js";
|
|
7
|
+
import { TrackingWrap as a, TrackingHeader as R, ProgressBar as B, StatusText as S } from "./RequestCard.js";
|
|
8
|
+
const H = t.article`
|
|
9
9
|
width: ${({ $fixed: e }) => e ? "1053px" : "100%"};
|
|
10
10
|
min-width: 11.1875rem;
|
|
11
11
|
border-radius: ${({ theme: e }) => e.borderRadius.md};
|
|
@@ -19,11 +19,11 @@ const S = i.article`
|
|
|
19
19
|
grid-template-columns: 24.75rem 1fr;
|
|
20
20
|
align-items: start;
|
|
21
21
|
gap: ${({ theme: e }) => e.spacing.m};
|
|
22
|
-
@media ${
|
|
22
|
+
@media ${v.laptop} {
|
|
23
23
|
grid-template-columns: 1fr;
|
|
24
24
|
height: auto;
|
|
25
25
|
}
|
|
26
|
-
`,
|
|
26
|
+
`, T = t.div`
|
|
27
27
|
width: 100%;
|
|
28
28
|
height: 100%;
|
|
29
29
|
align-self: start;
|
|
@@ -43,13 +43,14 @@ const S = i.article`
|
|
|
43
43
|
height: 100%;
|
|
44
44
|
object-fit: contain;
|
|
45
45
|
display: block;
|
|
46
|
+
padding: ${({ $imgPadding: e }) => e ?? "none"};
|
|
46
47
|
}
|
|
47
|
-
`,
|
|
48
|
+
`, E = t.div`
|
|
48
49
|
display: grid;
|
|
49
50
|
grid-template-rows: auto auto auto auto auto auto;
|
|
50
51
|
gap: ${({ theme: e }) => e.spacing.s};
|
|
51
52
|
height: 100%;
|
|
52
|
-
`,
|
|
53
|
+
`, F = t.h3`
|
|
53
54
|
margin: 0;
|
|
54
55
|
font-family: ${({ theme: e }) => e.dir === "rtl" ? e.fonts.arabic : e.fonts.english};
|
|
55
56
|
font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
|
|
@@ -57,26 +58,26 @@ const S = i.article`
|
|
|
57
58
|
line-height: ${({ theme: e }) => e.typography.lineHeights.m};
|
|
58
59
|
letter-spacing: ${({ theme: e }) => e.typography.letterSpacings.balancedNarrow};
|
|
59
60
|
color: ${({ theme: e }) => e.colors.grey.n800};
|
|
60
|
-
`,
|
|
61
|
+
`, P = t.p`
|
|
61
62
|
margin: 0;
|
|
62
63
|
color: ${({ theme: e }) => e.colors.grey.n400};
|
|
63
64
|
font-size: ${({ theme: e }) => e.typography.sizes.s3};
|
|
64
65
|
line-height: ${({ theme: e }) => e.typography.lineHeights.s};
|
|
65
|
-
`, q =
|
|
66
|
+
`, q = t.ul`
|
|
66
67
|
margin: 0;
|
|
67
68
|
padding: 0;
|
|
68
69
|
list-style: none;
|
|
69
70
|
display: flex;
|
|
70
71
|
flex-direction: column;
|
|
71
72
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
72
|
-
`, A =
|
|
73
|
+
`, A = t.li`
|
|
73
74
|
display: flex;
|
|
74
75
|
align-items: center;
|
|
75
76
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
76
77
|
color: ${({ theme: e }) => e.colors.grey.n800};
|
|
77
78
|
font-size: ${({ theme: e }) => e.typography.sizes.s3};
|
|
78
79
|
line-height: ${({ theme: e }) => e.typography.lineHeights.s};
|
|
79
|
-
`, C =
|
|
80
|
+
`, C = t.span`
|
|
80
81
|
position: relative;
|
|
81
82
|
display: inline-block;
|
|
82
83
|
width: 0.5625rem;
|
|
@@ -102,7 +103,7 @@ const S = i.article`
|
|
|
102
103
|
box-shadow: inset 0 0 0 0.063rem ${({ theme: e }) => `${e.colors.primary.purple.n450}26`};
|
|
103
104
|
display: ${({ $stroke: e }) => e ? "block" : "none"};
|
|
104
105
|
}
|
|
105
|
-
`, N =
|
|
106
|
+
`, N = t.div`
|
|
106
107
|
display: flex;
|
|
107
108
|
align-items: baseline;
|
|
108
109
|
gap: ${({ theme: e }) => e.spacing.xs};
|
|
@@ -119,12 +120,12 @@ const S = i.article`
|
|
|
119
120
|
font-size: ${({ theme: e }) => e.typography.sizes.s3};
|
|
120
121
|
line-height: ${({ theme: e }) => e.typography.lineHeights.s};
|
|
121
122
|
}
|
|
122
|
-
`,
|
|
123
|
+
`, D = t.img`
|
|
123
124
|
width: 0.875rem;
|
|
124
125
|
height: 0.9375rem;
|
|
125
126
|
opacity: 1;
|
|
126
127
|
display: inline-block;
|
|
127
|
-
`,
|
|
128
|
+
`, I = (e) => {
|
|
128
129
|
switch (e) {
|
|
129
130
|
case "accepted":
|
|
130
131
|
return { bar: "#1DBA63" };
|
|
@@ -135,44 +136,45 @@ const S = i.article`
|
|
|
135
136
|
default:
|
|
136
137
|
return { bar: "#EEF0F2" };
|
|
137
138
|
}
|
|
138
|
-
},
|
|
139
|
+
}, M = ({
|
|
139
140
|
state: e,
|
|
140
141
|
title: l,
|
|
141
142
|
description: n,
|
|
142
|
-
features:
|
|
143
|
+
features: o,
|
|
143
144
|
price: s,
|
|
144
|
-
progress:
|
|
145
|
-
statusText:
|
|
146
|
-
image:
|
|
147
|
-
primaryCta:
|
|
148
|
-
primaryCtaVariant:
|
|
145
|
+
progress: d = 0,
|
|
146
|
+
statusText: g,
|
|
147
|
+
image: p,
|
|
148
|
+
primaryCta: r,
|
|
149
|
+
primaryCtaVariant: c = "primary",
|
|
149
150
|
className: h,
|
|
150
151
|
style: m,
|
|
151
152
|
showTracking: u = !1,
|
|
152
153
|
variant: y = "hidden",
|
|
153
|
-
trackingLabel:
|
|
154
|
+
trackingLabel: $ = "",
|
|
155
|
+
imgPadding: f
|
|
154
156
|
}) => {
|
|
155
|
-
const
|
|
156
|
-
return /* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
n ? /* @__PURE__ */
|
|
161
|
-
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
] },
|
|
165
|
-
s && /* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
s != null && s.amount ? /* @__PURE__ */
|
|
168
|
-
s != null && s.suffix ? /* @__PURE__ */
|
|
157
|
+
const x = e === "rejected" ? "Your request is Rejected" : "Your request is Accepted", b = I(y);
|
|
158
|
+
return /* @__PURE__ */ i.jsxs(H, { className: h, style: m, "aria-live": "polite", children: [
|
|
159
|
+
/* @__PURE__ */ i.jsx(T, { $imgPadding: f, children: p }),
|
|
160
|
+
/* @__PURE__ */ i.jsxs(E, { children: [
|
|
161
|
+
/* @__PURE__ */ i.jsx(F, { children: l }),
|
|
162
|
+
n ? /* @__PURE__ */ i.jsx(P, { children: n }) : null,
|
|
163
|
+
o && o.length > 0 ? /* @__PURE__ */ i.jsx(q, { children: o.map((j, w) => /* @__PURE__ */ i.jsxs(A, { children: [
|
|
164
|
+
/* @__PURE__ */ i.jsx(C, {}),
|
|
165
|
+
/* @__PURE__ */ i.jsx("span", { children: j.label })
|
|
166
|
+
] }, w)) }) : null,
|
|
167
|
+
s && /* @__PURE__ */ i.jsxs(N, { children: [
|
|
168
|
+
/* @__PURE__ */ i.jsx(D, { src: z, alt: "SAR" }),
|
|
169
|
+
s != null && s.amount ? /* @__PURE__ */ i.jsx("span", { className: "amount", children: s.amount }) : null,
|
|
170
|
+
s != null && s.suffix ? /* @__PURE__ */ i.jsx("span", { className: "suffix", children: s.suffix }) : null
|
|
169
171
|
] }),
|
|
170
|
-
u ? /* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
] }) : /* @__PURE__ */
|
|
175
|
-
|
|
172
|
+
u ? /* @__PURE__ */ i.jsxs(a, { children: [
|
|
173
|
+
/* @__PURE__ */ i.jsx(R, { children: $ }),
|
|
174
|
+
/* @__PURE__ */ i.jsx(B, { $value: d, $color: b.bar }),
|
|
175
|
+
/* @__PURE__ */ i.jsx(S, { children: g ?? x })
|
|
176
|
+
] }) : /* @__PURE__ */ i.jsx(a, {}),
|
|
177
|
+
r ? /* @__PURE__ */ i.jsx(k, { style: { marginTop: "auto" }, variant: c, size: "md", width: "100%", onClick: r.onClick, children: r.label }) : null
|
|
176
178
|
] })
|
|
177
179
|
] });
|
|
178
180
|
};
|
|
@@ -180,5 +182,5 @@ export {
|
|
|
180
182
|
C as Bullet,
|
|
181
183
|
q as FeatureList,
|
|
182
184
|
A as FeatureRow,
|
|
183
|
-
|
|
185
|
+
M as default
|
|
184
186
|
};
|