qaema-ui 0.0.37 → 0.0.38

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.
@@ -24,9 +24,18 @@ export type PriceCardProps = {
24
24
  variant?: PriceCardVariant;
25
25
  badges?: PriceCardBadge[];
26
26
  showPrimaryAction?: boolean;
27
- primaryActionLabel?: string;
28
- onPrimaryActionClick?: () => void;
27
+ primaryAction?: {
28
+ label: string;
29
+ variant?: 'primary' | 'secondary' | 'light-primary' | 'light-secondary' | 'outline-primary' | 'outline-secondary';
30
+ onPrimaryActionClick?: () => void;
31
+ };
29
32
  showSecondaryAction?: boolean;
33
+ secondaryAction?: {
34
+ label: string;
35
+ variant?: 'primary' | 'secondary' | 'light-primary' | 'light-secondary' | 'outline-primary' | 'outline-secondary';
36
+ onSecondaryActionClick?: () => void;
37
+ };
38
+ showFeatures?: boolean;
30
39
  featuresTitle?: string;
31
40
  featuresDescription?: string;
32
41
  };
@@ -1,46 +1,46 @@
1
1
  import { j as o } from "../_virtual/jsx-runtime.js";
2
- import { useState as b } from "react";
3
- import { FiCheck as v, FiX as z } from "../node_modules/react-icons/fi/index.js";
4
- import i, { css as t } from "styled-components";
5
- import { CurrencyContainer as F } from "../styles/Currency.styles.js";
6
- import k from "../assets/svg/Riyal.svg.js";
7
- import C from "./Badge.js";
8
- import d from "./Button.js";
9
- import s from "./Typography.js";
10
- const B = {
11
- transparent: t`
2
+ import "react";
3
+ import { FiCheck as j, FiX as w } from "../node_modules/react-icons/fi/index.js";
4
+ import i, { css as a } from "styled-components";
5
+ import { CurrencyContainer as v } from "../styles/Currency.styles.js";
6
+ import z from "../assets/svg/Riyal.svg.js";
7
+ import k from "./Badge.js";
8
+ import g from "./Button.js";
9
+ import t from "./Typography.js";
10
+ const C = {
11
+ transparent: a`
12
12
  background: rgba(255, 255, 255, 0.72);
13
13
  border: 1px solid ${({ theme: e }) => e.colors.grey.n200};
14
14
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
15
15
  `,
16
- purple: t`
16
+ purple: a`
17
17
  background: linear-gradient(360deg, #ffffff 63.12%, #f1eeff 100%);
18
18
  border: 1px solid #e3deff;
19
19
  box-shadow:
20
20
  0px 4px 6px -2px #10182808,
21
21
  0px 12px 16px -4px #10182814;
22
22
  `
23
- }, R = i.div`
23
+ }, F = i.div`
24
24
  width: 100%;
25
25
  max-width: 28.458rem;
26
26
  border-radius: ${({ theme: e }) => e.borderRadius.xl};
27
27
  overflow: hidden;
28
28
  display: flex;
29
29
  flex-direction: column;
30
- ${({ $variant: e }) => B[e]};
31
- `, T = i.div`
30
+ ${({ $variant: e }) => C[e]};
31
+ `, B = i.div`
32
32
  padding: 2rem;
33
33
  display: flex;
34
34
  flex-direction: column;
35
35
  gap: ${({ theme: e }) => e.spacing.sm};
36
36
  border-bottom: 1px solid ${({ theme: e }) => e.colors.grey.n200};
37
- `, S = i.div`
37
+ `, R = i.div`
38
38
  display: flex;
39
39
  align-items: center;
40
40
  justify-content: space-between;
41
41
  gap: ${({ theme: e }) => e.spacing.m};
42
42
  flex-wrap: wrap;
43
- `, H = i(s)`
43
+ `, T = i(t)`
44
44
  font-family: ${({ theme: e }) => e.fonts.arabic};
45
45
  font-weight: 600;
46
46
  font-size: ${({ theme: e }) => {
@@ -58,17 +58,17 @@ const B = {
58
58
  align-items: center;
59
59
  gap: ${({ theme: e }) => e.spacing.xs};
60
60
  flex-wrap: wrap;
61
- `, D = i.div`
61
+ `, H = i.div`
62
62
  display: flex;
63
63
  align-items: baseline;
64
64
  gap: ${({ theme: e }) => e.spacing.xxs};
65
- `, I = i.span`
65
+ `, S = i.span`
66
66
  font-family: ${({ theme: e }) => e.fonts.english};
67
67
  font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
68
68
  font-size: 2.706rem;
69
69
  line-height: 3.158rem;
70
70
  color: ${({ $color: e, theme: r }) => e ?? r.colors.grey.n800};
71
- `, V = i.span`
71
+ `, D = i.span`
72
72
  font-family: ${({ theme: e }) => e.fonts.arabic};
73
73
  font-weight: ${({ theme: e }) => e.typography.weights.regular};
74
74
  font-size: ${({ theme: e }) => {
@@ -77,7 +77,7 @@ const B = {
77
77
  }};
78
78
  line-height: 1.804rem;
79
79
  color: ${({ $color: e, theme: r }) => e ?? r.colors.grey.n800};
80
- `, W = i(s)`
80
+ `, I = i(t)`
81
81
  font-family: ${({ theme: e }) => e.fonts.arabic};
82
82
  font-weight: ${({ theme: e }) => e.typography.weights.regular};
83
83
  font-size: ${({ theme: e }) => {
@@ -86,12 +86,12 @@ const B = {
86
86
  }};
87
87
  line-height: ${({ theme: e }) => e.typography.lineHeights.m};
88
88
  color: ${({ theme: e }) => e.colors.grey.n400};
89
- `, A = i.div`
89
+ `, V = i.div`
90
90
  padding: 2rem 2rem 2.5rem 2rem;
91
91
  display: flex;
92
92
  flex-direction: column;
93
93
  gap: ${({ theme: e }) => e.spacing.m};
94
- `, L = i(s)`
94
+ `, W = i(t)`
95
95
  font-family: ${({ theme: e }) => e.fonts.arabic};
96
96
  font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
97
97
  font-size: ${({ theme: e }) => {
@@ -101,7 +101,7 @@ const B = {
101
101
  line-height: 0.7rem;
102
102
  color: ${({ theme: e }) => e.colors.grey.n650};
103
103
  text-transform: uppercase;
104
- `, M = i(s)`
104
+ `, L = i(t)`
105
105
  font-family: ${({ theme: e }) => e.fonts.arabic};
106
106
  font-weight: 500;
107
107
  font-size: ${({ theme: e }) => {
@@ -110,18 +110,18 @@ const B = {
110
110
  }};
111
111
  line-height: ${({ theme: e }) => e.typography.lineHeights.m};
112
112
  color: ${({ theme: e }) => e.colors.grey.n400};
113
- `, U = i.ul`
113
+ `, M = i.ul`
114
114
  list-style: none;
115
115
  margin: 0;
116
116
  padding: 0;
117
117
  display: flex;
118
118
  flex-direction: column;
119
119
  gap: ${({ theme: e }) => e.spacing.s};
120
- `, X = i.li`
120
+ `, U = i.li`
121
121
  display: flex;
122
122
  align-items: center;
123
123
  gap: ${({ theme: e }) => e.spacing.xs};
124
- `, q = i.span`
124
+ `, X = i.span`
125
125
  width: 1rem;
126
126
  height: 1rem;
127
127
  border-radius: 50%;
@@ -135,14 +135,14 @@ const B = {
135
135
  height: 0.7rem;
136
136
  }
137
137
 
138
- ${({ theme: e, $variant: r }) => r === "included" ? t`
138
+ ${({ theme: e, $variant: r }) => r === "included" ? a`
139
139
  border: 1px solid ${e.colors.secondary.green.n450};
140
140
  color: ${e.colors.secondary.green.n450};
141
- ` : t`
141
+ ` : a`
142
142
  border: 1px solid ${e.colors.secondary.pink.n450};
143
143
  color: ${e.colors.secondary.pink.n450};
144
144
  `}
145
- `, G = i(s)`
145
+ `, q = i(t)`
146
146
  font-family: ${({ theme: e }) => e.fonts.arabic};
147
147
  font-weight: 400;
148
148
  font-size: ${({ theme: e }) => {
@@ -151,7 +151,7 @@ const B = {
151
151
  }};
152
152
  line-height: ${({ theme: e }) => e.typography.lineHeights.m};
153
153
  color: ${({ theme: e }) => e.colors.grey.n400};
154
- `, J = i.div`
154
+ `, G = i.div`
155
155
  width: 100%;
156
156
  margin-top: 1rem;
157
157
  display: flex;
@@ -161,53 +161,51 @@ const B = {
161
161
  button {
162
162
  width: 100%;
163
163
  }
164
- `, oe = ({
164
+ `, ee = ({
165
165
  title: e,
166
166
  price: r,
167
- description: g,
168
- features: f,
169
- variant: h = "transparent",
170
- badges: a = [],
171
- showPrimaryAction: x = !1,
172
- primaryActionLabel: m,
173
- onPrimaryActionClick: y,
167
+ description: f,
168
+ features: h,
169
+ variant: x = "transparent",
170
+ badges: c = [],
171
+ showPrimaryAction: m = !1,
172
+ primaryAction: s,
174
173
  showSecondaryAction: $ = !1,
174
+ secondaryAction: l,
175
+ showFeatures: y = !0,
175
176
  featuresTitle: u = "FEATURES",
176
- featuresDescription: w = "Everything in our free plan plus....."
177
- }) => {
178
- const [c, j] = b(!1);
179
- return /* @__PURE__ */ o.jsxs(R, { $variant: h, children: [
180
- /* @__PURE__ */ o.jsxs(T, { children: [
181
- /* @__PURE__ */ o.jsxs(S, { children: [
182
- /* @__PURE__ */ o.jsx(H, { children: e }),
183
- a.length > 0 && /* @__PURE__ */ o.jsx(E, { children: a.map((n, l) => /* @__PURE__ */ o.jsx(C, { label: n.label, bgColor: n.bgColor, color: n.color }, `${n.label}-${l}`)) })
184
- ] }),
185
- /* @__PURE__ */ o.jsxs(D, { children: [
186
- /* @__PURE__ */ o.jsx(F, { src: k, alt: "Riyal" }),
187
- /* @__PURE__ */ o.jsx(I, { $color: r.color, children: r.amount }),
188
- /* @__PURE__ */ o.jsx(V, { $color: r.periodColor, children: r.period ?? "/ Month" })
189
- ] }),
190
- /* @__PURE__ */ o.jsx(W, { children: g }),
191
- /* @__PURE__ */ o.jsxs(J, { children: [
192
- x && /* @__PURE__ */ o.jsx(d, { variant: "primary", onClick: y, children: m }),
193
- $ && /* @__PURE__ */ o.jsx(d, { variant: "light-primary", onClick: () => j((n) => !n), children: c ? "Hide" : "Show" })
194
- ] })
177
+ featuresDescription: b = "Everything in our free plan plus....."
178
+ }) => /* @__PURE__ */ o.jsxs(F, { $variant: x, children: [
179
+ /* @__PURE__ */ o.jsxs(B, { children: [
180
+ /* @__PURE__ */ o.jsxs(R, { children: [
181
+ /* @__PURE__ */ o.jsx(T, { children: e }),
182
+ c.length > 0 && /* @__PURE__ */ o.jsx(E, { children: c.map((n, p) => /* @__PURE__ */ o.jsx(k, { label: n.label, bgColor: n.bgColor, color: n.color }, `${n.label}-${p}`)) })
195
183
  ] }),
196
- c && /* @__PURE__ */ o.jsxs(A, { children: [
197
- /* @__PURE__ */ o.jsxs(P, { children: [
198
- /* @__PURE__ */ o.jsx(L, { children: u }),
199
- /* @__PURE__ */ o.jsx(M, { children: w })
200
- ] }),
201
- /* @__PURE__ */ o.jsx(U, { children: f.map((n, l) => {
202
- const p = n.variant ?? "included";
203
- return /* @__PURE__ */ o.jsxs(X, { children: [
204
- /* @__PURE__ */ o.jsx(q, { $variant: p, children: p === "included" ? /* @__PURE__ */ o.jsx(v, {}) : /* @__PURE__ */ o.jsx(z, {}) }),
205
- /* @__PURE__ */ o.jsx(G, { children: n.label })
206
- ] }, `${n.label}-${l}`);
207
- }) })
184
+ /* @__PURE__ */ o.jsxs(H, { children: [
185
+ /* @__PURE__ */ o.jsx(v, { src: z, alt: "Riyal" }),
186
+ /* @__PURE__ */ o.jsx(S, { $color: r.color, children: r.amount }),
187
+ /* @__PURE__ */ o.jsx(D, { $color: r.periodColor, children: r.period ?? "/ Month" })
188
+ ] }),
189
+ /* @__PURE__ */ o.jsx(I, { children: f }),
190
+ /* @__PURE__ */ o.jsxs(G, { children: [
191
+ m && /* @__PURE__ */ o.jsx(g, { variant: (s == null ? void 0 : s.variant) ?? "primary", onClick: s == null ? void 0 : s.onPrimaryActionClick, children: s == null ? void 0 : s.label }),
192
+ $ && /* @__PURE__ */ o.jsx(g, { variant: (l == null ? void 0 : l.variant) ?? "light-primary", onClick: l == null ? void 0 : l.onSecondaryActionClick, children: l == null ? void 0 : l.label })
208
193
  ] })
209
- ] });
210
- };
194
+ ] }),
195
+ y && /* @__PURE__ */ o.jsxs(V, { children: [
196
+ /* @__PURE__ */ o.jsxs(P, { children: [
197
+ /* @__PURE__ */ o.jsx(W, { children: u }),
198
+ /* @__PURE__ */ o.jsx(L, { children: b })
199
+ ] }),
200
+ /* @__PURE__ */ o.jsx(M, { children: h.map((n, p) => {
201
+ const d = n.variant ?? "included";
202
+ return /* @__PURE__ */ o.jsxs(U, { children: [
203
+ /* @__PURE__ */ o.jsx(X, { $variant: d, children: d === "included" ? /* @__PURE__ */ o.jsx(j, {}) : /* @__PURE__ */ o.jsx(w, {}) }),
204
+ /* @__PURE__ */ o.jsx(q, { children: n.label })
205
+ ] }, `${n.label}-${p}`);
206
+ }) })
207
+ ] })
208
+ ] });
211
209
  export {
212
- oe as default
210
+ ee as default
213
211
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qaema-ui",
3
3
  "private": false,
4
- "version": "0.0.37",
4
+ "version": "0.0.38",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"