@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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),l=require("../Typography/Typography.cjs.js"),c=require("../Icon/Icon.cjs.js"),m=require("../Icon/constants.cjs.js"),i=require("./assets/program_card_bg.png.cjs.js"),o=require("./programCard.module.css.cjs.js"),s=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:t,link:r}=a;return{title:{label:e,variant:"displayXs",mobileVariant:"headingSm"},image:t||i.default,link:r}}if(a.type==="rounded"){const{label:e,image:t,link:r}=a;return{title:{label:e,variant:"displayXs",mobileVariant:"headingSm"},image:t||i.default,withArrow:!0,link:r}}return null};function u(a){const e=s(a);if(!e)return null;const t=e.link?"a":"div";return n.jsxs(t,{href:e.link||"",className:o.default.card,"data-type":a.type,style:{backgroundImage:e.image?`url(${e.image})`:void 0},children:[n.jsx(l.Typography,{as:"p",defaultVariant:e.title.variant,mobileVariant:e.title.mobileVariant,children:e.title.label}),e.withArrow&&n.jsx(c.Icon,{name:m.EIconName.ARROW_FORWARD_THIN,className:o.default.arrow})]})}exports.ProgramCard=u;
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 RoundedCardProps = {
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 m, jsx as r } from "react/jsx-runtime";
2
- import { Typography as o } from "../Typography/Typography.es.js";
3
- import { Icon as g } from "../Icon/Icon.es.js";
4
- import { EIconName as d } from "../Icon/constants.es.js";
5
- import n from "./assets/program_card_bg.png.es.js";
6
- import l from "./programCard.module.css.es.js";
7
- const s = (i) => {
8
- if (i.type === "coming_soon")
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: i.label || "Coming Soon",
12
+ label: r.label || "Coming Soon",
12
13
  variant: "headingLg",
13
14
  mobileVariant: "headingXxs"
14
15
  }
15
16
  };
16
- if (i.type === "active") {
17
- const { label: a, image: t, link: e } = i;
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: t || n,
25
- link: e
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 p(i) {
44
- const a = s(i);
33
+ function V(r) {
34
+ const a = f(r);
45
35
  if (!a)
46
36
  return null;
47
- const t = a.link ? "a" : "div";
48
- return /* @__PURE__ */ m(
49
- t,
37
+ const i = a.link ? "a" : "div";
38
+ return /* @__PURE__ */ l(
39
+ i,
50
40
  {
51
41
  href: a.link || "",
52
- className: l.card,
53
- "data-type": i.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__ */ r(o, { as: "p", defaultVariant: a.title.variant, mobileVariant: a.title.mobileVariant, children: a.title.label }),
59
- a.withArrow && /* @__PURE__ */ r(g, { name: d.ARROW_FORWARD_THIN, className: l.arrow })
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
- p as ProgramCard
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",a="programCard-module__arrow___kP19I",e={card:r,arrow:a};exports.arrow=a;exports.card=r;exports.default=e;
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
  };