@zenpatient-org/healthspan-marketing-ui 0.2.72 → 0.2.74

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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),N=require("react"),B=require("../../utils/cn/cn.cjs.js"),n=require("../../src/components/Button/button.module.css"),r=require("../Icon/Icon.cjs.js"),d=N.forwardRef(({variant:u="primary",size:m="md",as:j="button",disabled:s=!1,children:v,prefixIcon:c,suffixIcon:a,analyticsProps:i,...t},b)=>{const x=n[u]||"",y=n[m]||"",C=s?n.disabled:"",h=q=>{var o,l;i&&((o=window.eventBus)==null||o.emit("analytics",i)),(l=t.onClick)==null||l.call(t,q)};return e.jsx(j,{ref:b,...t,className:B.cn(n.button,x,y,C),disabled:s,onClick:h,"data-type":"button",children:e.jsxs("div",{className:n.content,children:[c&&e.jsx("div",{className:n.iconWrap,children:e.jsx(r.Icon,{name:c})}),e.jsx("div",{children:v}),a&&e.jsx("div",{className:n.iconWrap,children:e.jsx(r.Icon,{name:a})})]})})});d.displayName="Button";exports.Button=d;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),B=require("react"),_=require("../../utils/cn/cn.cjs.js"),e=require("../../src/components/Button/button.module.css"),d=require("../Icon/Icon.cjs.js"),r=B.forwardRef(({variant:u="primary",size:m="md",as:j="button",disabled:s=!1,children:v,prefixIcon:c,suffixIcon:a,analyticsProps:i,loading:b,...t},x)=>{const y=e[u]||"",C=e[m]||"",h=s?e.disabled:"",q=N=>{var o,l;i&&((o=window.eventBus)==null||o.emit("analytics",i)),(l=t.onClick)==null||l.call(t,N)};return n.jsx(j,{ref:x,...t,className:_.cn(e.button,y,C,h),disabled:s,onClick:q,"data-type":"button","data-loading":b,children:n.jsxs("div",{className:e.content,children:[c&&n.jsx("div",{className:e.iconWrap,children:n.jsx(d.Icon,{name:c})}),n.jsx("div",{children:v}),a&&n.jsx("div",{className:e.iconWrap,children:n.jsx(d.Icon,{name:a})})]})})});r.displayName="Button";exports.Button=r;
@@ -11,6 +11,7 @@ interface BaseButtonProps {
11
11
  prefixIcon?: EIconName;
12
12
  suffixIcon?: EIconName;
13
13
  analyticsProps?: TAnalyticsEvent;
14
+ loading?: boolean;
14
15
  onClick?: (event: React.MouseEvent<HTMLButtonElement> | React.MouseEvent<HTMLAnchorElement>) => void;
15
16
  }
16
17
  export type ButtonProps = BaseButtonProps & ButtonHTMLAttributes<HTMLButtonElement> & AnchorHTMLAttributes<HTMLAnchorElement>;
@@ -1,44 +1,46 @@
1
1
  "use client";
2
- import { jsx as n, jsxs as k } from "react/jsx-runtime";
3
- import { forwardRef as w } from "react";
4
- import { cn as B } from "../../utils/cn/cn.es.js";
2
+ import { jsx as a, jsxs as w } from "react/jsx-runtime";
3
+ import { forwardRef as B } from "react";
4
+ import { cn as j } from "../../utils/cn/cn.es.js";
5
5
  import t from "../../components/Button/button.module.css";
6
6
  import { Icon as m } from "../Icon/Icon.es.js";
7
- const j = w(
7
+ const W = B(
8
8
  ({
9
- variant: r = "primary",
10
- size: d = "md",
9
+ variant: d = "primary",
10
+ size: r = "md",
11
11
  as: u = "button",
12
- disabled: e = !1,
12
+ disabled: i = !1,
13
13
  children: f,
14
- prefixIcon: i,
14
+ prefixIcon: e,
15
15
  suffixIcon: s,
16
16
  analyticsProps: o,
17
- ...a
18
- }, v) => {
19
- const C = t[r] || "", h = t[d] || "", N = e ? t.disabled : "", b = (y) => {
20
- var c, l;
21
- o && ((c = window.eventBus) == null || c.emit("analytics", o)), (l = a.onClick) == null || l.call(a, y);
17
+ loading: v,
18
+ ...n
19
+ }, C) => {
20
+ const h = t[d] || "", N = t[r] || "", b = i ? t.disabled : "", y = (k) => {
21
+ var l, c;
22
+ o && ((l = window.eventBus) == null || l.emit("analytics", o)), (c = n.onClick) == null || c.call(n, k);
22
23
  };
23
- return /* @__PURE__ */ n(
24
+ return /* @__PURE__ */ a(
24
25
  u,
25
26
  {
26
- ref: v,
27
- ...a,
28
- className: B(t.button, C, h, N),
29
- disabled: e,
30
- onClick: b,
27
+ ref: C,
28
+ ...n,
29
+ className: j(t.button, h, N, b),
30
+ disabled: i,
31
+ onClick: y,
31
32
  "data-type": "button",
32
- children: /* @__PURE__ */ k("div", { className: t.content, children: [
33
- i && /* @__PURE__ */ n("div", { className: t.iconWrap, children: /* @__PURE__ */ n(m, { name: i }) }),
34
- /* @__PURE__ */ n("div", { children: f }),
35
- s && /* @__PURE__ */ n("div", { className: t.iconWrap, children: /* @__PURE__ */ n(m, { name: s }) })
33
+ "data-loading": v,
34
+ children: /* @__PURE__ */ w("div", { className: t.content, children: [
35
+ e && /* @__PURE__ */ a("div", { className: t.iconWrap, children: /* @__PURE__ */ a(m, { name: e }) }),
36
+ /* @__PURE__ */ a("div", { children: f }),
37
+ s && /* @__PURE__ */ a("div", { className: t.iconWrap, children: /* @__PURE__ */ a(m, { name: s }) })
36
38
  ] })
37
39
  }
38
40
  );
39
41
  }
40
42
  );
41
- j.displayName = "Button";
43
+ W.displayName = "Button";
42
44
  export {
43
- j as Button
45
+ W as Button
44
46
  };
@@ -1,4 +1,5 @@
1
1
  .button {
2
+ position: relative;
2
3
  text-align: center;
3
4
  display: inline-flex;
4
5
  align-items: center;
@@ -18,6 +19,7 @@
18
19
  text-transform: uppercase;
19
20
  font-weight: var(--font-weight-regular);
20
21
  line-height: var(--line-height-xs);
22
+ --spinner-color: var(--color-text-primary);
21
23
  }
22
24
 
23
25
  .button:hover {
@@ -27,50 +29,59 @@
27
29
  .primary {
28
30
  background-color: var(--color-bg-fill-primary);
29
31
  color: var(--color-text-primary-inverted);
32
+ --spinner-color: var(--color-text-primary-inverted);
30
33
  }
31
34
 
32
35
  .primary-invert {
33
36
  background-color: var(--color-bg-fill-brand-inverse);
34
37
  color: var(--color-text-primary);
38
+ --spinner-color: var(--color-text-primary);
35
39
  }
36
40
 
37
41
  .secondary {
38
42
  background-color: var(--color-bg-fill-brand-solar);
39
43
  color: var(--color-text-primary);
44
+ --spinner-color: var(--color-text-primary);
40
45
  }
41
46
 
42
47
  .tertiary {
43
48
  background-color: var(--color-bg-fill-brand-indigo);
44
49
  color: var(--color-text-primary);
50
+ --spinner-color: var(--color-text-primary);
45
51
  }
46
52
 
47
53
  .muted {
48
54
  background-color: transparent;
49
55
  color: var(--color-text-primary);
50
56
  border-color: var(--border-color-alpha-black-20);
57
+ --spinner-color: var(--color-text-primary);
51
58
  }
52
59
 
53
60
  .muted:hover {
54
61
  background-color: var(--color-bg-fill-primary);
55
62
  border-color: var(--color-bg-fill-primary);
56
63
  color: var(--color-text-primary-inverted);
64
+ --spinner-color: var(--color-text-primary-inverted);
57
65
  }
58
66
 
59
67
  .muted-invert {
60
68
  background-color: transparent;
61
69
  color: var(--color-text-primary-inverted);
62
70
  border-color: var(--border-color-invert);
71
+ --spinner-color: var(--color-text-primary-inverted);
63
72
  }
64
73
 
65
74
  .muted-invert:hover {
66
75
  background-color: var(--color-bg-fill-brand-inverse);
67
76
  border-color: var(--border-color-invert);
68
77
  color: var(--color-text-primary);
78
+ --spinner-color: var(--color-text-primary);
69
79
  }
70
80
 
71
81
  .ghost {
72
82
  background-color: transparent;
73
83
  color: var(--color-text-primary);
84
+ --spinner-color: var(--color-text-primary);
74
85
  }
75
86
 
76
87
  .xs {
@@ -167,3 +178,39 @@
167
178
  height: 16px;
168
179
  max-height: 16px;
169
180
  }
181
+
182
+ .button[data-loading='true'] {
183
+ &, &:disabled, &:focus {
184
+ color: transparent;
185
+ pointer-events: none;
186
+ cursor: default;
187
+ }
188
+
189
+ &:after {
190
+ content: "";
191
+ position: absolute;
192
+ top: 0;
193
+ left: 0;
194
+ right: 0;
195
+ bottom: 0;
196
+ display: block;
197
+ width: 1.5em;
198
+ height: 1.5em;
199
+ border-radius: 50%;
200
+ border: var(--border-width-md) solid var(--spinner-color);
201
+ border-bottom-color: transparent;
202
+ opacity: 0.6;
203
+ animation: button-loading-spinner 1s ease infinite;
204
+ margin: auto;
205
+ }
206
+ }
207
+
208
+ @keyframes button-loading-spinner {
209
+ 0% {
210
+ transform: rotate(0deg);
211
+ }
212
+
213
+ 100% {
214
+ transform: rotate(360deg);
215
+ }
216
+ }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("../Icon/constants.cjs.js"),a=require("../../src/components/HighlightCard/highlightCard.module.css"),s=require("../Typography/Typography.cjs.js"),m=require("../IconButton/IconButton.cjs.js"),u=({image:g,eyebrow:i,title:r,description:o,link:t,colorScheme:n="light"})=>{const c=n==="light"?"muted-invert":"muted",l=e.jsxs(e.Fragment,{children:[i&&e.jsx(s.Typography,{as:"p",defaultVariant:"labelSm",emphasis:!0,className:a.eyebrow,children:i}),e.jsxs("div",{className:a.bottomContainer,children:[e.jsxs("div",{className:a.titleContainer,children:[r&&e.jsx(s.Typography,{as:"p",defaultVariant:"headingXl",mobileVariant:"headingLg",className:a.title,children:r}),t&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:a.desktop,children:e.jsx(m.IconButton,{variant:c,size:"lg",iconName:h.EIconName.ARROW_FORWARD})}),e.jsx("div",{className:a.mobile,children:e.jsx(m.IconButton,{variant:c,size:"md",iconName:h.EIconName.ARROW_FORWARD})})]})]}),o&&e.jsx(s.Typography,{as:"p",defaultVariant:"bodySm",className:a.description,children:o})]})]}),d={backgroundImage:`url(${g})`,backgroundSize:"cover",backgroundPosition:"center"};return t?e.jsx("a",{href:t,className:a.highlightCard,style:d,"data-scheme":n,children:l}):e.jsx("div",{className:a.highlightCard,style:d,"data-scheme":n,children:l})};exports.HighlightCard=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("../Icon/constants.cjs.js"),a=require("../../src/components/HighlightCard/highlightCard.module.css"),s=require("../Typography/Typography.cjs.js"),m=require("../IconButton/IconButton.cjs.js"),u=({image:g,eyebrow:i,title:r,description:o,link:t,colorScheme:n="light"})=>{const c=n==="light"?"muted-invert":"muted",l=e.jsxs(e.Fragment,{children:[i&&e.jsx(s.Typography,{as:"p",defaultVariant:"labelXs",emphasis:!0,className:a.eyebrow,children:i}),e.jsxs("div",{className:a.bottomContainer,children:[e.jsxs("div",{className:a.titleContainer,children:[r&&e.jsx(s.Typography,{as:"p",defaultVariant:"headingLg",mobileVariant:"headingLg",className:a.title,children:r}),t&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:a.desktop,children:e.jsx(m.IconButton,{variant:c,size:"lg",iconName:h.EIconName.ARROW_FORWARD})}),e.jsx("div",{className:a.mobile,children:e.jsx(m.IconButton,{variant:c,size:"md",iconName:h.EIconName.ARROW_FORWARD})})]})]}),o&&e.jsx(s.Typography,{as:"p",defaultVariant:"bodySm",className:a.description,children:o})]})]}),d={backgroundImage:`url(${g})`,backgroundSize:"cover",backgroundPosition:"center"};return t?e.jsx("a",{href:t,className:a.highlightCard,style:d,"data-scheme":n,children:l}):e.jsx("div",{className:a.highlightCard,style:d,"data-scheme":n,children:l})};exports.HighlightCard=u;
@@ -6,23 +6,23 @@ import { IconButton as p } from "../IconButton/IconButton.es.js";
6
6
  const y = ({
7
7
  image: u,
8
8
  eyebrow: s,
9
- title: l,
10
- description: d,
9
+ title: d,
10
+ description: l,
11
11
  link: i,
12
12
  colorScheme: r = "light"
13
13
  }) => {
14
14
  const c = r === "light" ? "muted-invert" : "muted", o = /* @__PURE__ */ t(h, { children: [
15
- s && /* @__PURE__ */ a(n, { as: "p", defaultVariant: "labelSm", emphasis: !0, className: e.eyebrow, children: s }),
15
+ s && /* @__PURE__ */ a(n, { as: "p", defaultVariant: "labelXs", emphasis: !0, className: e.eyebrow, children: s }),
16
16
  /* @__PURE__ */ t("div", { className: e.bottomContainer, children: [
17
17
  /* @__PURE__ */ t("div", { className: e.titleContainer, children: [
18
- l && /* @__PURE__ */ a(
18
+ d && /* @__PURE__ */ a(
19
19
  n,
20
20
  {
21
21
  as: "p",
22
- defaultVariant: "headingXl",
22
+ defaultVariant: "headingLg",
23
23
  mobileVariant: "headingLg",
24
24
  className: e.title,
25
- children: l
25
+ children: d
26
26
  }
27
27
  ),
28
28
  i && /* @__PURE__ */ t(h, { children: [
@@ -30,7 +30,7 @@ const y = ({
30
30
  /* @__PURE__ */ a("div", { className: e.mobile, children: /* @__PURE__ */ a(p, { variant: c, size: "md", iconName: g.ARROW_FORWARD }) })
31
31
  ] })
32
32
  ] }),
33
- d && /* @__PURE__ */ a(n, { as: "p", defaultVariant: "bodySm", className: e.description, children: d })
33
+ l && /* @__PURE__ */ a(n, { as: "p", defaultVariant: "bodySm", className: e.description, children: l })
34
34
  ] })
35
35
  ] }), m = { backgroundImage: `url(${u})`, backgroundSize: "cover", backgroundPosition: "center" };
36
36
  return i ? /* @__PURE__ */ a("a", { href: i, className: e.highlightCard, style: m, "data-scheme": r, children: o }) : /* @__PURE__ */ a("div", { className: e.highlightCard, style: m, "data-scheme": r, children: o });
@@ -7,7 +7,7 @@
7
7
  justify-content: space-between;
8
8
  padding: 32px;
9
9
  border-radius: var(--border-radius-lg);
10
- aspect-ratio: 389 / 483;
10
+ aspect-ratio: 309 / 383;
11
11
  color: var(--primary-inverted);
12
12
  text-decoration: none;
13
13
  }
@@ -58,19 +58,21 @@
58
58
  }
59
59
 
60
60
  @media (width <= 1200px) {
61
- .highlightCard {
62
- padding: 24px;
63
- }
64
-
65
61
  .bottomContainer {
66
62
  max-width: 321px;
67
- gap: 8px;
63
+ }
64
+ }
65
+
66
+ @media (width <= 930px) {
67
+ .highlightCard {
68
+ aspect-ratio: 380 / 397;
68
69
  }
69
70
  }
70
71
 
71
72
  @media (width <= 768px) {
72
73
  .highlightCard {
73
74
  padding: 24px;
75
+ aspect-ratio: 309 / 383;
74
76
  }
75
77
 
76
78
  .bottomContainer {
@@ -74,17 +74,15 @@
74
74
  width: 100%;
75
75
  }
76
76
 
77
- @media (min-width: 900px) and (max-width: 1200px) {
78
- .cardGridItem {
79
- max-width: 290px;
80
- width: 100%;
81
- }
82
- }
83
77
  @media (min-width: 769px) and (max-width: 1200px) {
84
78
  .cardGrid {
85
79
  max-width: 100%;
86
80
  }
87
81
 
82
+ .cardGridItem {
83
+ max-width: 309px;
84
+ }
85
+
88
86
  .title {
89
87
  font-size: 56px;
90
88
  letter-spacing: -2.24px;
@@ -96,15 +94,18 @@
96
94
 
97
95
  .container {
98
96
  padding: 64px 17px;
99
- gap: 32px;
100
97
  }
101
98
  }
102
99
 
103
- @media (max-width: 900px) {
100
+ @media (max-width: 930px) {
104
101
  .cardGrid {
105
102
  flex-direction: column;
106
103
  align-items: center;
107
104
  }
105
+
106
+ .cardGridItem {
107
+ max-width: 389px;
108
+ }
108
109
  }
109
110
 
110
111
  @media (max-width: 768px) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenpatient-org/healthspan-marketing-ui",
3
- "version": "0.2.72",
3
+ "version": "0.2.74",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",