@zenpatient-org/healthspan-marketing-ui 0.2.52 → 0.2.54

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 n=require("react/jsx-runtime"),s=require("react"),x=require("../../../../utils/cn/cn.cjs.js"),r=require("../../../../src/components/AdvancedGallery/components/VideoSlide/videoSlide.module.css"),h=require("../../../Icon/Icon.cjs.js"),j=require("../../../Icon/constants.cjs.js"),P=require("../../../AudioButton/AudioButton.cjs.js"),I=({item:o,isActive:l,onClick:a})=>{const[c,u]=s.useState(!1),[p,i]=s.useState(!0),e=s.useRef(null),f=s.useRef(null);s.useEffect(()=>{const t=e.current;if(!t)return;const d=()=>{u(!1)};return l?(t.muted=!0,i(!0),t.play().then(()=>{u(!0)})):(t.pause(),t.currentTime=0,u(!1)),t.addEventListener("ended",d),()=>{t.removeEventListener("ended",d)}},[l]);const m=s.useCallback(t=>{t.stopPropagation(),e.current&&(e.current.play(),u(!0)),a()},[a]),v=s.useCallback(t=>{t.stopPropagation(),e.current&&(e.current.muted=!e.current.muted,i(e.current.muted))},[]),y=s.useCallback(()=>{e.current&&o.videoType==="complex"&&(c?(e.current.pause(),u(!1)):(e.current.play(),u(!0))),a()},[o.videoType,c,a]);return n.jsx("div",{className:r.root,ref:f,onClick:y,children:n.jsxs("div",{className:r.videoContainer,children:[n.jsx("video",{ref:e,src:o.url,playsInline:!0,autoPlay:!0,muted:!0,controls:!1,poster:o.preview,className:x.cn(r.video,!c&&r.mediaHidden)}),o.videoType==="complex"&&!c&&n.jsx("div",{className:r.playButton,children:n.jsx("button",{className:r.customPlayButton,onClick:m,children:n.jsx(h.Icon,{className:r.icon,name:j.EIconName.ALT_PLAY})})}),o.videoType==="complex"&&c&&n.jsx("div",{className:r.audioButton,children:n.jsx(P.AudioButton,{isMuted:p,onClick:v})})]})})};exports.VideoSlide=I;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),s=require("react"),x=require("../../../../utils/cn/cn.cjs.js"),r=require("../../../../src/components/AdvancedGallery/components/VideoSlide/videoSlide.module.css"),h=require("../../../Icon/Icon.cjs.js"),j=require("../../../Icon/constants.cjs.js"),P=require("../../../AudioButton/AudioButton.cjs.js"),I=({item:o,isActive:l,onClick:a})=>{const[c,u]=s.useState(!1),[p,i]=s.useState(!0),e=s.useRef(null),f=s.useRef(null);s.useEffect(()=>{const t=e.current;if(!t)return;const d=()=>{u(!1)};return l?(t.muted=!0,i(!0),t.play().then(()=>{u(!0)})):(t.pause(),t.currentTime=0,u(!1)),t.addEventListener("ended",d),()=>{t.removeEventListener("ended",d)}},[l]);const m=s.useCallback(t=>{t.stopPropagation(),e.current&&(e.current.play(),u(!0)),a()},[a]),v=s.useCallback(t=>{t.stopPropagation(),e.current&&(e.current.muted=!e.current.muted,i(e.current.muted))},[]),y=s.useCallback(()=>{e.current&&o.videoType==="complex"&&(c?(e.current.pause(),u(!1)):(e.current.play(),u(!0))),a()},[o.videoType,c,a]);return n.jsx("div",{className:r.root,ref:f,onClick:y,children:n.jsxs("div",{className:r.videoContainer,children:[n.jsx("video",{ref:e,src:o.url,playsInline:!0,autoPlay:!0,muted:!0,loop:!0,controls:!1,poster:o.preview,className:x.cn(r.video,!c&&r.mediaHidden)}),o.videoType==="complex"&&!c&&n.jsx("div",{className:r.playButton,children:n.jsx("button",{className:r.customPlayButton,onClick:m,children:n.jsx(h.Icon,{className:r.icon,name:j.EIconName.ALT_PLAY})})}),o.videoType==="complex"&&c&&n.jsx("div",{className:r.audioButton,children:n.jsx(P.AudioButton,{isMuted:p,onClick:v})})]})})};exports.VideoSlide=I;
@@ -6,8 +6,8 @@ import r from "../../../../components/AdvancedGallery/components/VideoSlide/vide
6
6
  import { Icon as E } from "../../../Icon/Icon.es.js";
7
7
  import { EIconName as I } from "../../../Icon/constants.es.js";
8
8
  import { AudioButton as g } from "../../../AudioButton/AudioButton.es.js";
9
- const k = ({ item: n, isActive: c, onClick: u }) => {
10
- const [a, s] = m(!1), [f, i] = m(!0), e = p(null), v = p(null);
9
+ const k = ({ item: n, isActive: c, onClick: a }) => {
10
+ const [u, s] = m(!1), [f, i] = m(!0), e = p(null), v = p(null);
11
11
  x(() => {
12
12
  const t = e.current;
13
13
  if (!t) return;
@@ -22,14 +22,14 @@ const k = ({ item: n, isActive: c, onClick: u }) => {
22
22
  }, [c]);
23
23
  const y = l(
24
24
  (t) => {
25
- t.stopPropagation(), e.current && (e.current.play(), s(!0)), u();
25
+ t.stopPropagation(), e.current && (e.current.play(), s(!0)), a();
26
26
  },
27
- [u]
27
+ [a]
28
28
  ), h = l((t) => {
29
29
  t.stopPropagation(), e.current && (e.current.muted = !e.current.muted, i(e.current.muted));
30
30
  }, []), N = l(() => {
31
- e.current && n.videoType === "complex" && (a ? (e.current.pause(), s(!1)) : (e.current.play(), s(!0))), u();
32
- }, [n.videoType, a, u]);
31
+ e.current && n.videoType === "complex" && (u ? (e.current.pause(), s(!1)) : (e.current.play(), s(!0))), a();
32
+ }, [n.videoType, u, a]);
33
33
  return /* @__PURE__ */ o("div", { className: r.root, ref: v, onClick: N, children: /* @__PURE__ */ P("div", { className: r.videoContainer, children: [
34
34
  /* @__PURE__ */ o(
35
35
  "video",
@@ -39,13 +39,14 @@ const k = ({ item: n, isActive: c, onClick: u }) => {
39
39
  playsInline: !0,
40
40
  autoPlay: !0,
41
41
  muted: !0,
42
+ loop: !0,
42
43
  controls: !1,
43
44
  poster: n.preview,
44
- className: T(r.video, !a && r.mediaHidden)
45
+ className: T(r.video, !u && r.mediaHidden)
45
46
  }
46
47
  ),
47
- n.videoType === "complex" && !a && /* @__PURE__ */ o("div", { className: r.playButton, children: /* @__PURE__ */ o("button", { className: r.customPlayButton, onClick: y, children: /* @__PURE__ */ o(E, { className: r.icon, name: I.ALT_PLAY }) }) }),
48
- n.videoType === "complex" && a && /* @__PURE__ */ o("div", { className: r.audioButton, children: /* @__PURE__ */ o(g, { isMuted: f, onClick: h }) })
48
+ n.videoType === "complex" && !u && /* @__PURE__ */ o("div", { className: r.playButton, children: /* @__PURE__ */ o("button", { className: r.customPlayButton, onClick: y, children: /* @__PURE__ */ o(E, { className: r.icon, name: I.ALT_PLAY }) }) }),
49
+ n.videoType === "complex" && u && /* @__PURE__ */ o("div", { className: r.audioButton, children: /* @__PURE__ */ o(g, { isMuted: f, onClick: h }) })
49
50
  ] }) });
50
51
  };
51
52
  export {
@@ -2,7 +2,7 @@ import { default as React, ElementType, ButtonHTMLAttributes, AnchorHTMLAttribut
2
2
  import { EIconName } from '../Icon';
3
3
  import { TAnalyticsEvent } from '../../types/analytics';
4
4
 
5
- type ButtonVariant = 'primary' | 'primary-invert' | 'secondary' | 'muted' | 'muted-invert' | 'ghost';
5
+ export type ButtonVariant = 'primary' | 'primary-invert' | 'secondary' | 'muted' | 'muted-invert' | 'ghost';
6
6
  type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
7
7
  interface BaseButtonProps {
8
8
  variant?: ButtonVariant;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("../../src/modules/ImageWithBenefits/imageWithBenefits.module.css"),t=require("../../components/Typography/Typography.cjs.js"),p=require("../../components/TypeBadge/TypeBadge.cjs.js"),b=({image:i,label:l,title:o,benefits:r,benefitsColor:n,mobileLabelColor:c,mobileTitleColor:d,mobileBenefitsColor:m,mobileImage:g})=>e.jsx("section",{className:a.root,children:e.jsxs("div",{className:a.container,children:[e.jsxs("div",{className:a.imageContainer,children:[e.jsx("img",{src:i,alt:"background image",className:a.image}),e.jsx("img",{src:g||i,alt:"mobile background image",className:a.mobileImage})]}),e.jsxs("div",{className:a.content,"data-label-color":l.color,"data-mobile-label-color":c,"data-title-color":o.color,"data-mobile-title-color":d,"data-benefits-color":n,"data-mobile-benefits-color":m,children:[e.jsx(t.Typography,{as:"p",defaultVariant:"labelXs",emphasis:!0,className:a.label,children:l.text}),e.jsx(t.Typography,{as:"h2",defaultVariant:"headingXl",mobileVariant:"headingMd",className:a.title,children:o.text}),e.jsx("div",{className:a.benefitContainer,children:r.map(s=>e.jsxs("div",{className:a.benefitItem,children:[e.jsx(p.TypeBadge,{type:s.badge}),e.jsx(t.Typography,{as:"p",defaultVariant:"bodyLg",mobileVariant:"bodyMd",className:a.benefitText,children:s.text})]},s.text))})]})]})});exports.ImageWithBenefits=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("../../src/modules/ImageWithBenefits/imageWithBenefits.module.css"),s=require("../../components/Typography/Typography.cjs.js"),p=require("../../components/TypeBadge/TypeBadge.cjs.js"),b=require("../ImageWithText/components/ButtonWithColors/ButtonWithColors.cjs.js"),x=({image:o,label:i,title:l,benefits:r,benefitsColor:n,mobileLabelColor:c,mobileTitleColor:d,mobileBenefitsColor:m,mobileImage:g,button:h})=>e.jsx("section",{className:a.root,children:e.jsxs("div",{className:a.container,children:[e.jsxs("div",{className:a.imageContainer,children:[e.jsx("img",{src:o,alt:"background image",className:a.image}),e.jsx("img",{src:g||o,alt:"mobile background image",className:a.mobileImage})]}),e.jsxs("div",{className:a.content,"data-label-color":i.color,"data-mobile-label-color":c,"data-title-color":l.color,"data-mobile-title-color":d,"data-benefits-color":n,"data-mobile-benefits-color":m,children:[e.jsx(s.Typography,{as:"p",defaultVariant:"labelXs",emphasis:!0,className:a.label,children:i.text}),e.jsx(s.Typography,{as:"h2",defaultVariant:"headingXl",mobileVariant:"headingMd",className:a.title,children:l.text}),e.jsx("div",{className:a.benefitContainer,children:r.map(t=>e.jsxs("div",{className:a.benefitItem,children:[e.jsx(p.TypeBadge,{type:t.badge}),e.jsx(s.Typography,{as:"p",defaultVariant:"bodyLg",mobileVariant:"bodyMd",className:a.benefitText,children:t.text})]},t.text))}),e.jsx(b.ButtonWithColors,{...h})]})]})});exports.ImageWithBenefits=x;
@@ -1,4 +1,5 @@
1
1
  import { ETypeBadge } from '../../components/TypeBadge';
2
+ import { TButtonWithColors } from '../ImageWithText/types';
2
3
 
3
4
  type TColor = 'black' | 'white' | 'solar' | 'indigo';
4
5
  export type ImageWithBenefitsProps = {
@@ -20,6 +21,7 @@ export type ImageWithBenefitsProps = {
20
21
  mobileTitleColor?: TColor;
21
22
  mobileBenefitsColor?: TColor;
22
23
  mobileImage?: string;
24
+ button?: TButtonWithColors;
23
25
  };
24
- export declare const ImageWithBenefits: ({ image, label, title, benefits, benefitsColor, mobileLabelColor, mobileTitleColor, mobileBenefitsColor, mobileImage, }: ImageWithBenefitsProps) => import("react/jsx-runtime").JSX.Element;
26
+ export declare const ImageWithBenefits: ({ image, label, title, benefits, benefitsColor, mobileLabelColor, mobileTitleColor, mobileBenefitsColor, mobileImage, button, }: ImageWithBenefitsProps) => import("react/jsx-runtime").JSX.Element;
25
27
  export {};
@@ -1,52 +1,55 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
2
  import a from "../../modules/ImageWithBenefits/imageWithBenefits.module.css";
3
- import { Typography as i } from "../../components/Typography/Typography.es.js";
4
- import { TypeBadge as h } from "../../components/TypeBadge/TypeBadge.es.js";
5
- const u = ({
3
+ import { Typography as l } from "../../components/Typography/Typography.es.js";
4
+ import { TypeBadge as p } from "../../components/TypeBadge/TypeBadge.es.js";
5
+ import { ButtonWithColors as f } from "../ImageWithText/components/ButtonWithColors/ButtonWithColors.es.js";
6
+ const V = ({
6
7
  image: o,
7
8
  label: r,
8
9
  title: s,
9
- benefits: c,
10
- benefitsColor: m,
11
- mobileLabelColor: d,
12
- mobileTitleColor: n,
10
+ benefits: m,
11
+ benefitsColor: c,
12
+ mobileLabelColor: n,
13
+ mobileTitleColor: d,
13
14
  mobileBenefitsColor: b,
14
- mobileImage: g
15
+ mobileImage: h,
16
+ button: g
15
17
  }) => /* @__PURE__ */ e("section", { className: a.root, children: /* @__PURE__ */ t("div", { className: a.container, children: [
16
18
  /* @__PURE__ */ t("div", { className: a.imageContainer, children: [
17
19
  /* @__PURE__ */ e("img", { src: o, alt: "background image", className: a.image }),
18
- /* @__PURE__ */ e("img", { src: g || o, alt: "mobile background image", className: a.mobileImage })
20
+ /* @__PURE__ */ e("img", { src: h || o, alt: "mobile background image", className: a.mobileImage })
19
21
  ] }),
20
22
  /* @__PURE__ */ t(
21
23
  "div",
22
24
  {
23
25
  className: a.content,
24
26
  "data-label-color": r.color,
25
- "data-mobile-label-color": d,
27
+ "data-mobile-label-color": n,
26
28
  "data-title-color": s.color,
27
- "data-mobile-title-color": n,
28
- "data-benefits-color": m,
29
+ "data-mobile-title-color": d,
30
+ "data-benefits-color": c,
29
31
  "data-mobile-benefits-color": b,
30
32
  children: [
31
- /* @__PURE__ */ e(i, { as: "p", defaultVariant: "labelXs", emphasis: !0, className: a.label, children: r.text }),
32
- /* @__PURE__ */ e(i, { as: "h2", defaultVariant: "headingXl", mobileVariant: "headingMd", className: a.title, children: s.text }),
33
- /* @__PURE__ */ e("div", { className: a.benefitContainer, children: c.map((l) => /* @__PURE__ */ t("div", { className: a.benefitItem, children: [
34
- /* @__PURE__ */ e(h, { type: l.badge }),
33
+ /* @__PURE__ */ e(l, { as: "p", defaultVariant: "labelXs", emphasis: !0, className: a.label, children: r.text }),
34
+ /* @__PURE__ */ e(l, { as: "h2", defaultVariant: "headingXl", mobileVariant: "headingMd", className: a.title, children: s.text }),
35
+ /* @__PURE__ */ e("div", { className: a.benefitContainer, children: m.map((i) => /* @__PURE__ */ t("div", { className: a.benefitItem, children: [
36
+ /* @__PURE__ */ e(p, { type: i.badge }),
35
37
  /* @__PURE__ */ e(
36
- i,
38
+ l,
37
39
  {
38
40
  as: "p",
39
41
  defaultVariant: "bodyLg",
40
42
  mobileVariant: "bodyMd",
41
43
  className: a.benefitText,
42
- children: l.text
44
+ children: i.text
43
45
  }
44
46
  )
45
- ] }, l.text)) })
47
+ ] }, i.text)) }),
48
+ /* @__PURE__ */ e(f, { ...g })
46
49
  ]
47
50
  }
48
51
  )
49
52
  ] }) });
50
53
  export {
51
- u as ImageWithBenefits
54
+ V as ImageWithBenefits
52
55
  };
@@ -120,6 +120,18 @@
120
120
  color: var(--color-text-primary-brand-indigo);
121
121
  }
122
122
 
123
+ @media (width <= 1024px) and (width >= 820px) {
124
+ .content {
125
+ padding: 60px 40px;
126
+ }
127
+ }
128
+
129
+ @media (width < 820px) and (width >= 768px) {
130
+ .content {
131
+ padding: 32px 48px;
132
+ }
133
+ }
134
+
123
135
  @media (width <= 768px) {
124
136
  .container {
125
137
  padding: 40px 20px 40px;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),y=require("../../utils/cn/cn.cjs.js"),n=require("./constants.cjs.js"),e=require("../../src/modules/ImageWithText/imageWithText.module.css"),x=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),l=require("../../components/Typography/Typography.cjs.js"),b=({image:h,text:t,title:s,view:i,colorScheme:g,textColor:m,mobileTextColor:p,titleColor:c,mobileTitleColor:r,titleHighlightColor:d,mobileTitleHighlightColor:o,mobileImage:u})=>a.jsx("section",{className:e.root,"data-scheme":g,children:a.jsxs("div",{className:e.container,"data-view":i,children:[a.jsxs("div",{className:e.imageContainer,children:[a.jsx("img",{src:h,alt:"background image",className:e.image,"data-color":m}),a.jsx("img",{src:u||h,alt:"mobile background image",className:e.mobileImage})]}),a.jsxs("div",{className:y.cn(e.content,{[e.textAlignLeft]:i==="plain"||i==="plain_with_title",[e.textAlignRight]:i==="complex"}),"data-view":i,"data-text-color":m,"data-mobile-text-color":p,"data-title-color":c,"data-mobile-title-color":r,"data-title-highlight-color":d,"data-mobile-title-highlight-color":o,children:[i==="complex"&&a.jsxs("div",{className:e.richTextContainer,style:{"--highlight-color-custom":n.COLORS[c||"white"],"--highlight-emphasize-custom":n.COLORS[d||"white"],"--highlight-color-custom-mobile":n.COLORS[r||"white"],"--highlight-emphasize-custom-mobile":n.COLORS[o||"white"]},children:[s&&a.jsx(x.HighlightedTitle,{colorScheme:c||d||r||o?"custom":"dark",title:s,defaultVariant:"displayXs",mobileVariant:"headingLg"}),t&&a.jsx(l.Typography,{defaultVariant:"bodyMd",mobileVariant:"bodySm",children:t})]}),i==="plain"&&t&&a.jsx("div",{className:e.textContainer,children:a.jsx(l.Typography,{defaultVariant:"displayXs",mobileVariant:"headingXs",children:t})}),i==="plain_with_title"&&a.jsxs("div",{className:e.plainWithTitleContainer,children:[s&&a.jsx(l.Typography,{defaultVariant:"displayMd",mobileVariant:"headingLg",className:e.titleOfPlainWithTitle,children:s}),t&&a.jsx(l.Typography,{defaultVariant:"bodyMd",mobileVariant:"bodyMd",className:e.textOfPlainWithTitle,children:t})]})]})]})});exports.ImageWithText=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),j=require("../../utils/cn/cn.cjs.js"),n=require("./constants.cjs.js"),i=require("../../src/modules/ImageWithText/imageWithText.module.css"),b=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),l=require("../../components/Typography/Typography.cjs.js"),m=require("./components/ButtonWithColors/ButtonWithColors.cjs.js"),T=({image:g,text:t,title:s,view:e,colorScheme:u,textColor:p,mobileTextColor:x,titleColor:c,mobileTitleColor:o,titleHighlightColor:r,mobileTitleHighlightColor:h,mobileImage:y,button:d})=>a.jsx("section",{className:i.root,"data-scheme":u,children:a.jsxs("div",{className:i.container,"data-view":e,children:[a.jsxs("div",{className:i.imageContainer,children:[a.jsx("img",{src:g,alt:"background image",className:i.image,"data-color":p}),a.jsx("img",{src:y||g,alt:"mobile background image",className:i.mobileImage})]}),a.jsxs("div",{className:j.cn(i.content,{[i.textAlignLeft]:e==="plain"||e==="plain_with_title",[i.textAlignRight]:e==="complex"}),"data-view":e,"data-text-color":p,"data-mobile-text-color":x,"data-title-color":c,"data-mobile-title-color":o,"data-title-highlight-color":r,"data-mobile-title-highlight-color":h,children:[e==="complex"&&a.jsxs("div",{className:i.richTextContainer,style:{"--highlight-color-custom":n.COLORS[c||"white"],"--highlight-emphasize-custom":n.COLORS[r||"white"],"--highlight-color-custom-mobile":n.COLORS[o||"white"],"--highlight-emphasize-custom-mobile":n.COLORS[h||"white"]},children:[s&&a.jsx(b.HighlightedTitle,{colorScheme:c||r||o||h?"custom":"dark",title:s,defaultVariant:"displayXs",mobileVariant:"headingLg"}),t&&a.jsx(l.Typography,{defaultVariant:"bodyMd",mobileVariant:"bodySm",children:t}),a.jsx(m.ButtonWithColors,{...d})]}),e==="plain"&&t&&a.jsxs("div",{className:i.textContainer,children:[a.jsx(l.Typography,{defaultVariant:"displayXs",mobileVariant:"headingXs",children:t}),a.jsx(m.ButtonWithColors,{...d})]}),e==="plain_with_title"&&a.jsxs("div",{className:i.plainWithTitleContainer,children:[s&&a.jsx(l.Typography,{defaultVariant:"displayMd",mobileVariant:"headingLg",className:i.titleOfPlainWithTitle,children:s}),t&&a.jsx(l.Typography,{defaultVariant:"bodyMd",mobileVariant:"bodyMd",className:i.textOfPlainWithTitle,children:t}),a.jsx(m.ButtonWithColors,{...d})]})]})]})});exports.ImageWithText=T;
@@ -1,3 +1,3 @@
1
1
  import { TImageWithTextProps } from './types';
2
2
 
3
- export declare const ImageWithText: ({ image, text, title, view, colorScheme, textColor, mobileTextColor, titleColor, mobileTitleColor, titleHighlightColor, mobileTitleHighlightColor, mobileImage, }: TImageWithTextProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const ImageWithText: ({ image, text, title, view, colorScheme, textColor, mobileTextColor, titleColor, mobileTitleColor, titleHighlightColor, mobileTitleHighlightColor, mobileImage, button, }: TImageWithTextProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,39 +1,41 @@
1
1
  import { jsx as i, jsxs as l } from "react/jsx-runtime";
2
- import { cn as u } from "../../utils/cn/cn.es.js";
3
- import { COLORS as n } from "./constants.es.js";
2
+ import { cn as N } from "../../utils/cn/cn.es.js";
3
+ import { COLORS as m } from "./constants.es.js";
4
4
  import a from "../../modules/ImageWithText/imageWithText.module.css";
5
- import { HighlightedTitle as y } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
6
- import { Typography as d } from "../../components/Typography/Typography.es.js";
7
- const W = ({
8
- image: h,
5
+ import { HighlightedTitle as V } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
6
+ import { Typography as c } from "../../components/Typography/Typography.es.js";
7
+ import { ButtonWithColors as g } from "./components/ButtonWithColors/ButtonWithColors.es.js";
8
+ const S = ({
9
+ image: p,
9
10
  text: e,
10
- title: c,
11
+ title: r,
11
12
  view: t,
12
- colorScheme: p,
13
- textColor: g,
14
- mobileTextColor: b,
15
- titleColor: m,
16
- mobileTitleColor: r,
13
+ colorScheme: b,
14
+ textColor: f,
15
+ mobileTextColor: u,
16
+ titleColor: d,
17
+ mobileTitleColor: n,
17
18
  titleHighlightColor: o,
18
19
  mobileTitleHighlightColor: s,
19
- mobileImage: f
20
- }) => /* @__PURE__ */ i("section", { className: a.root, "data-scheme": p, children: /* @__PURE__ */ l("div", { className: a.container, "data-view": t, children: [
20
+ mobileImage: y,
21
+ button: h
22
+ }) => /* @__PURE__ */ i("section", { className: a.root, "data-scheme": b, children: /* @__PURE__ */ l("div", { className: a.container, "data-view": t, children: [
21
23
  /* @__PURE__ */ l("div", { className: a.imageContainer, children: [
22
- /* @__PURE__ */ i("img", { src: h, alt: "background image", className: a.image, "data-color": g }),
23
- /* @__PURE__ */ i("img", { src: f || h, alt: "mobile background image", className: a.mobileImage })
24
+ /* @__PURE__ */ i("img", { src: p, alt: "background image", className: a.image, "data-color": f }),
25
+ /* @__PURE__ */ i("img", { src: y || p, alt: "mobile background image", className: a.mobileImage })
24
26
  ] }),
25
27
  /* @__PURE__ */ l(
26
28
  "div",
27
29
  {
28
- className: u(a.content, {
30
+ className: N(a.content, {
29
31
  [a.textAlignLeft]: t === "plain" || t === "plain_with_title",
30
32
  [a.textAlignRight]: t === "complex"
31
33
  }),
32
34
  "data-view": t,
33
- "data-text-color": g,
34
- "data-mobile-text-color": b,
35
- "data-title-color": m,
36
- "data-mobile-title-color": r,
35
+ "data-text-color": f,
36
+ "data-mobile-text-color": u,
37
+ "data-title-color": d,
38
+ "data-mobile-title-color": n,
37
39
  "data-title-highlight-color": o,
38
40
  "data-mobile-title-highlight-color": s,
39
41
  children: [
@@ -42,50 +44,55 @@ const W = ({
42
44
  {
43
45
  className: a.richTextContainer,
44
46
  style: {
45
- "--highlight-color-custom": n[m || "white"],
46
- "--highlight-emphasize-custom": n[o || "white"],
47
- "--highlight-color-custom-mobile": n[r || "white"],
48
- "--highlight-emphasize-custom-mobile": n[s || "white"]
47
+ "--highlight-color-custom": m[d || "white"],
48
+ "--highlight-emphasize-custom": m[o || "white"],
49
+ "--highlight-color-custom-mobile": m[n || "white"],
50
+ "--highlight-emphasize-custom-mobile": m[s || "white"]
49
51
  },
50
52
  children: [
51
- c && /* @__PURE__ */ i(
52
- y,
53
+ r && /* @__PURE__ */ i(
54
+ V,
53
55
  {
54
- colorScheme: m || o || r || s ? "custom" : "dark",
55
- title: c,
56
+ colorScheme: d || o || n || s ? "custom" : "dark",
57
+ title: r,
56
58
  defaultVariant: "displayXs",
57
59
  mobileVariant: "headingLg"
58
60
  }
59
61
  ),
60
- e && /* @__PURE__ */ i(d, { defaultVariant: "bodyMd", mobileVariant: "bodySm", children: e })
62
+ e && /* @__PURE__ */ i(c, { defaultVariant: "bodyMd", mobileVariant: "bodySm", children: e }),
63
+ /* @__PURE__ */ i(g, { ...h })
61
64
  ]
62
65
  }
63
66
  ),
64
- t === "plain" && e && /* @__PURE__ */ i("div", { className: a.textContainer, children: /* @__PURE__ */ i(d, { defaultVariant: "displayXs", mobileVariant: "headingXs", children: e }) }),
67
+ t === "plain" && e && /* @__PURE__ */ l("div", { className: a.textContainer, children: [
68
+ /* @__PURE__ */ i(c, { defaultVariant: "displayXs", mobileVariant: "headingXs", children: e }),
69
+ /* @__PURE__ */ i(g, { ...h })
70
+ ] }),
65
71
  t === "plain_with_title" && /* @__PURE__ */ l("div", { className: a.plainWithTitleContainer, children: [
66
- c && /* @__PURE__ */ i(
67
- d,
72
+ r && /* @__PURE__ */ i(
73
+ c,
68
74
  {
69
75
  defaultVariant: "displayMd",
70
76
  mobileVariant: "headingLg",
71
77
  className: a.titleOfPlainWithTitle,
72
- children: c
78
+ children: r
73
79
  }
74
80
  ),
75
81
  e && /* @__PURE__ */ i(
76
- d,
82
+ c,
77
83
  {
78
84
  defaultVariant: "bodyMd",
79
85
  mobileVariant: "bodyMd",
80
86
  className: a.textOfPlainWithTitle,
81
87
  children: e
82
88
  }
83
- )
89
+ ),
90
+ /* @__PURE__ */ i(g, { ...h })
84
91
  ] })
85
92
  ]
86
93
  }
87
94
  )
88
95
  ] }) });
89
96
  export {
90
- W as ImageWithText
97
+ S as ImageWithText
91
98
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("../../../../src/modules/ImageWithText/components/ButtonWithColors/buttonWithColors.module.css"),i=require("../../../../components/Button/Button.cjs.js"),s=e=>!e||!e.label||!e.link?null:r.jsxs("div",{className:t.buttonContainer,children:[r.jsx("div",{className:t.desktopButton,children:r.jsx(i.Button,{variant:e.variant||"primary-invert",as:"a",size:"lg",href:e.link||"#",children:e.label||"Get Started"})}),r.jsx("div",{className:t.mobileButton,children:r.jsx(i.Button,{variant:"primary",as:"a",size:"lg",href:e.link||"#",children:e.label||"Get Started"})})]});exports.ButtonWithColors=s;
@@ -0,0 +1,3 @@
1
+ import { TButtonWithColors } from '../../types';
2
+
3
+ export declare const ButtonWithColors: (button: TButtonWithColors) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,10 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import i from "../../../../modules/ImageWithText/components/ButtonWithColors/buttonWithColors.module.css";
3
+ import { Button as a } from "../../../../components/Button/Button.es.js";
4
+ const m = (r) => !r || !r.label || !r.link ? null : /* @__PURE__ */ l("div", { className: i.buttonContainer, children: [
5
+ /* @__PURE__ */ e("div", { className: i.desktopButton, children: /* @__PURE__ */ e(a, { variant: r.variant || "primary-invert", as: "a", size: "lg", href: r.link || "#", children: r.label || "Get Started" }) }),
6
+ /* @__PURE__ */ e("div", { className: i.mobileButton, children: /* @__PURE__ */ e(a, { variant: "primary", as: "a", size: "lg", href: r.link || "#", children: r.label || "Get Started" }) })
7
+ ] });
8
+ export {
9
+ m as ButtonWithColors
10
+ };
@@ -0,0 +1,32 @@
1
+ .buttonContainer {
2
+ margin-top: 32px;
3
+ max-width: fit-content;
4
+ }
5
+
6
+ .desktopButton {
7
+ display: block;
8
+ }
9
+
10
+ .mobileButton {
11
+ display: none;
12
+ }
13
+
14
+ @media (width <= 1090px) and (width >= 768px) {
15
+ .buttonContainer {
16
+ margin-top: 24px;
17
+ }
18
+ }
19
+
20
+ @media (width < 768px) {
21
+ .buttonContainer {
22
+ max-width: 100%;
23
+ }
24
+
25
+ .desktopButton {
26
+ display: none;
27
+ }
28
+
29
+ .mobileButton {
30
+ display: block;
31
+ }
32
+ }
@@ -0,0 +1 @@
1
+ export { ButtonWithColors } from './ButtonWithColors';
@@ -37,15 +37,17 @@
37
37
  }
38
38
 
39
39
  .textAlignLeft {
40
- left: 80px;
40
+ left: 60px;
41
41
  }
42
42
 
43
43
  .textAlignRight {
44
- right: 80px;
44
+ right: 60px;
45
45
  }
46
46
 
47
47
  .textContainer {
48
- max-width: 572px;
48
+ max-width: 55%;
49
+ text-wrap: pretty;
50
+ font-weight: medium;
49
51
  color: var(--color-text-primary-inverted);
50
52
  }
51
53
 
@@ -90,16 +92,21 @@
90
92
  display: none;
91
93
  }
92
94
 
93
- @media (width <= 1024px) and (width >= 768px) {
95
+ @media (width <= 1090px) and (width >= 820px) {
94
96
  .content {
95
97
  padding: 40px;
96
98
  }
99
+ .textContainer span {
100
+ font-size: var(--font-size-heading-lg);
101
+ }
102
+ }
97
103
 
98
- .textContainer {
99
- max-width: 472px;
104
+ @media (width < 820px) and (width >= 768px) {
105
+ .content {
106
+ padding: 40px 20px;
100
107
  }
101
108
  .textContainer span {
102
- font-size: var(--font-size-heading-xl);
109
+ font-size: var(--font-size-heading-md);
103
110
  }
104
111
  }
105
112
 
@@ -1,7 +1,13 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { TColorScheme } from '../../types/common';
3
+ import { ButtonVariant } from '../../components/Button/Button';
3
4
 
4
5
  export type TImageWithTextView = 'plain' | 'complex' | 'plain_with_title';
6
+ export type TButtonWithColors = {
7
+ label?: string;
8
+ link?: string;
9
+ variant?: ButtonVariant;
10
+ };
5
11
  export type TImageWithTextProps = {
6
12
  image: string;
7
13
  mobileImage?: string;
@@ -11,6 +17,7 @@ export type TImageWithTextProps = {
11
17
  mobileTitleColor?: 'black' | 'white' | 'solar' | 'indigo';
12
18
  titleHighlightColor?: 'black' | 'white' | 'solar' | 'indigo';
13
19
  mobileTitleHighlightColor?: 'black' | 'white' | 'solar' | 'indigo';
20
+ button?: TButtonWithColors;
14
21
  title?: ReactNode;
15
22
  text?: ReactNode;
16
23
  view: TImageWithTextView;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenpatient-org/healthspan-marketing-ui",
3
- "version": "0.2.52",
3
+ "version": "0.2.54",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",