@zenpatient-org/healthspan-marketing-ui 0.1.64 → 0.1.65
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/components/ProgramCard/ProgramCard.cjs.js +1 -1
- package/dist/components/ProgramCard/ProgramCard.d.ts +2 -8
- package/dist/components/ProgramCard/ProgramCard.es.js +26 -36
- package/dist/components/ProgramCard/programCard.module.css.cjs.js +1 -1
- package/dist/components/ProgramCard/programCard.module.css.es.js +3 -1
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/CallToAction/CallToAction.cjs.js +1 -1
- package/dist/modules/CallToAction/CallToAction.es.js +1 -1
- package/package.json +11 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),c=require("../../utils/cn/cn.cjs.js"),s=require("../Typography/Typography.cjs.js"),u=require("../Icon/Icon.cjs.js"),d=require("../Icon/constants.cjs.js"),m=require("./assets/program_card_bg.png.cjs.js"),t=require("./programCard.module.css.cjs.js"),g=a=>{if(a.type==="coming_soon")return{title:{label:a.label||"Coming Soon",variant:"headingLg",mobileVariant:"headingXxs"}};if(a.type==="active"){const{label:e,image:r,link:i,isRounded:o,withArrow:l}=a;return{title:{label:e,variant:"displayXs",mobileVariant:"headingSm"},image:r||m.default,isRounded:o,withArrow:l,link:i}}return null};function y(a){const e=g(a);if(!e)return null;const r=e.link?"a":"div";return n.jsxs(r,{href:e.link||"",className:c.cn(t.default.card,{[t.default.cardRounded]:e.isRounded}),"data-type":a.type,style:{backgroundImage:e.image?`url(${e.image})`:void 0},children:[n.jsx(s.Typography,{as:"p",defaultVariant:e.title.variant,mobileVariant:e.title.mobileVariant,children:e.title.label}),e.withArrow&&n.jsx(u.Icon,{name:d.EIconName.ARROW_FORWARD_THIN,className:t.default.arrow})]})}exports.ProgramCard=y;
|
|
@@ -9,14 +9,8 @@ type CardProps = {
|
|
|
9
9
|
image?: string | null;
|
|
10
10
|
link?: string | null;
|
|
11
11
|
withArrow?: boolean;
|
|
12
|
+
isRounded?: boolean;
|
|
12
13
|
};
|
|
13
|
-
type
|
|
14
|
-
type: 'rounded';
|
|
15
|
-
label: string;
|
|
16
|
-
image?: string | null;
|
|
17
|
-
link?: string | null;
|
|
18
|
-
withArrow?: boolean;
|
|
19
|
-
};
|
|
20
|
-
export type ProgramCardProps = EmptyCardProps | CardProps | RoundedCardProps;
|
|
14
|
+
export type ProgramCardProps = EmptyCardProps | CardProps;
|
|
21
15
|
export declare function ProgramCard(props: ProgramCardProps): import("react/jsx-runtime").JSX.Element | null;
|
|
22
16
|
export {};
|
|
@@ -1,66 +1,56 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as d } from "../../utils/cn/cn.es.js";
|
|
3
|
+
import { Typography as s } from "../Typography/Typography.es.js";
|
|
4
|
+
import { Icon as c } from "../Icon/Icon.es.js";
|
|
5
|
+
import { EIconName as g } from "../Icon/constants.es.js";
|
|
6
|
+
import u from "./assets/program_card_bg.png.es.js";
|
|
7
|
+
import t from "./programCard.module.css.es.js";
|
|
8
|
+
const f = (r) => {
|
|
9
|
+
if (r.type === "coming_soon")
|
|
9
10
|
return {
|
|
10
11
|
title: {
|
|
11
|
-
label:
|
|
12
|
+
label: r.label || "Coming Soon",
|
|
12
13
|
variant: "headingLg",
|
|
13
14
|
mobileVariant: "headingXxs"
|
|
14
15
|
}
|
|
15
16
|
};
|
|
16
|
-
if (
|
|
17
|
-
const { label: a, image:
|
|
17
|
+
if (r.type === "active") {
|
|
18
|
+
const { label: a, image: i, link: n, isRounded: o, withArrow: m } = r;
|
|
18
19
|
return {
|
|
19
20
|
title: {
|
|
20
21
|
label: a,
|
|
21
22
|
variant: "displayXs",
|
|
22
23
|
mobileVariant: "headingSm"
|
|
23
24
|
},
|
|
24
|
-
image:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (i.type === "rounded") {
|
|
29
|
-
const { label: a, image: t, link: e } = i;
|
|
30
|
-
return {
|
|
31
|
-
title: {
|
|
32
|
-
label: a,
|
|
33
|
-
variant: "displayXs",
|
|
34
|
-
mobileVariant: "headingSm"
|
|
35
|
-
},
|
|
36
|
-
image: t || n,
|
|
37
|
-
withArrow: !0,
|
|
38
|
-
link: e
|
|
25
|
+
image: i || u,
|
|
26
|
+
isRounded: o,
|
|
27
|
+
withArrow: m,
|
|
28
|
+
link: n
|
|
39
29
|
};
|
|
40
30
|
}
|
|
41
31
|
return null;
|
|
42
32
|
};
|
|
43
|
-
function
|
|
44
|
-
const a =
|
|
33
|
+
function V(r) {
|
|
34
|
+
const a = f(r);
|
|
45
35
|
if (!a)
|
|
46
36
|
return null;
|
|
47
|
-
const
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
-
|
|
37
|
+
const i = a.link ? "a" : "div";
|
|
38
|
+
return /* @__PURE__ */ l(
|
|
39
|
+
i,
|
|
50
40
|
{
|
|
51
41
|
href: a.link || "",
|
|
52
|
-
className:
|
|
53
|
-
"data-type":
|
|
42
|
+
className: d(t.card, { [t.cardRounded]: a.isRounded }),
|
|
43
|
+
"data-type": r.type,
|
|
54
44
|
style: {
|
|
55
45
|
backgroundImage: a.image ? `url(${a.image})` : void 0
|
|
56
46
|
},
|
|
57
47
|
children: [
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
a.withArrow && /* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ e(s, { as: "p", defaultVariant: a.title.variant, mobileVariant: a.title.mobileVariant, children: a.title.label }),
|
|
49
|
+
a.withArrow && /* @__PURE__ */ e(c, { name: g.ARROW_FORWARD_THIN, className: t.arrow })
|
|
60
50
|
]
|
|
61
51
|
}
|
|
62
52
|
);
|
|
63
53
|
}
|
|
64
54
|
export {
|
|
65
|
-
|
|
55
|
+
V as ProgramCard
|
|
66
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r="programCard-module__card___PuYN2",
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r="programCard-module__card___PuYN2",d="programCard-module__cardRounded___dLhp3",o="programCard-module__arrow___kP19I",a={card:r,cardRounded:d,arrow:o};exports.arrow=o;exports.card=r;exports.cardRounded=d;exports.default=a;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const r = "programCard-module__card___PuYN2", a = "programCard-module__arrow___kP19I", o = {
|
|
1
|
+
const r = "programCard-module__card___PuYN2", d = "programCard-module__cardRounded___dLhp3", a = "programCard-module__arrow___kP19I", o = {
|
|
2
2
|
card: r,
|
|
3
|
+
cardRounded: d,
|
|
3
4
|
arrow: a
|
|
4
5
|
};
|
|
5
6
|
export {
|
|
6
7
|
a as arrow,
|
|
7
8
|
r as card,
|
|
9
|
+
d as cardRounded,
|
|
8
10
|
o as default
|
|
9
11
|
};
|