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,CAAC;IACzB,KAAK,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,M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,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,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 t } from "../_virtual/jsx-runtime.js";
1
+ import { j as i } from "../_virtual/jsx-runtime.js";
2
2
  import "react";
3
- import i from "styled-components";
4
- import w from "./Button.js";
5
- import { device as k } from "../constants/breakPoints.constant.js";
6
- import v from "../assets/svg/Riyal.svg.js";
7
- import { TrackingWrap as a, TrackingHeader as z, ProgressBar as R, StatusText as B } from "./RequestCard.js";
8
- const S = i.article`
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 ${k.laptop} {
22
+ @media ${v.laptop} {
23
23
  grid-template-columns: 1fr;
24
24
  height: auto;
25
25
  }
26
- `, H = i.div`
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
- `, T = i.div`
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
- `, E = i.h3`
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
- `, F = i.p`
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 = i.ul`
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 = i.li`
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 = i.span`
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 = i.div`
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
- `, P = i.img`
123
+ `, D = t.img`
123
124
  width: 0.875rem;
124
125
  height: 0.9375rem;
125
126
  opacity: 1;
126
127
  display: inline-block;
127
- `, D = (e) => {
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
- }, K = ({
139
+ }, M = ({
139
140
  state: e,
140
141
  title: l,
141
142
  description: n,
142
- features: r,
143
+ features: o,
143
144
  price: s,
144
- progress: g = 0,
145
- statusText: d,
146
- image: c,
147
- primaryCta: o,
148
- primaryCtaVariant: p = "primary",
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: f = ""
154
+ trackingLabel: $ = "",
155
+ imgPadding: f
154
156
  }) => {
155
- const $ = e === "rejected" ? "Your request is Rejected" : "Your request is Accepted", x = D(y);
156
- return /* @__PURE__ */ t.jsxs(S, { className: h, style: m, "aria-live": "polite", children: [
157
- /* @__PURE__ */ t.jsx(H, { children: c }),
158
- /* @__PURE__ */ t.jsxs(T, { children: [
159
- /* @__PURE__ */ t.jsx(E, { children: l }),
160
- n ? /* @__PURE__ */ t.jsx(F, { children: n }) : null,
161
- r && r.length > 0 ? /* @__PURE__ */ t.jsx(q, { children: r.map((b, j) => /* @__PURE__ */ t.jsxs(A, { children: [
162
- /* @__PURE__ */ t.jsx(C, {}),
163
- /* @__PURE__ */ t.jsx("span", { children: b.label })
164
- ] }, j)) }) : null,
165
- s && /* @__PURE__ */ t.jsxs(N, { children: [
166
- /* @__PURE__ */ t.jsx(P, { src: v, alt: "SAR" }),
167
- s != null && s.amount ? /* @__PURE__ */ t.jsx("span", { className: "amount", children: s.amount }) : null,
168
- s != null && s.suffix ? /* @__PURE__ */ t.jsx("span", { className: "suffix", children: s.suffix }) : null
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__ */ t.jsxs(a, { children: [
171
- /* @__PURE__ */ t.jsx(z, { children: f }),
172
- /* @__PURE__ */ t.jsx(R, { $value: g, $color: x.bar }),
173
- /* @__PURE__ */ t.jsx(B, { children: d ?? $ })
174
- ] }) : /* @__PURE__ */ t.jsx(a, {}),
175
- o ? /* @__PURE__ */ t.jsx(w, { style: { marginTop: "auto" }, variant: p, size: "md", width: "100%", onClick: o.onClick, children: o.label }) : null
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
- K as default
185
+ M as default
184
186
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qaema-ui",
3
3
  "private": false,
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"