@zenpatient-org/healthspan-marketing-ui 0.1.130 → 0.1.131
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/ProductGallery/ProductGallery.cjs.js +1 -1
- package/dist/components/ProductGallery/ProductGallery.d.ts +2 -1
- package/dist/components/ProductGallery/ProductGallery.es.js +57 -47
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/ImageWithText/ImageWithText.cjs.js +1 -1
- package/dist/modules/ImageWithText/ImageWithText.d.ts +1 -1
- package/dist/modules/ImageWithText/ImageWithText.es.js +28 -14
- package/dist/modules/ImageWithText/imageWithText.module.css.cjs.js +1 -1
- package/dist/modules/ImageWithText/imageWithText.module.css.es.js +5 -3
- package/dist/modules/ImageWithText/types.d.ts +3 -0
- package/dist/modules/ProductsDisplay/ProductsDisplay.cjs.js +1 -1
- package/dist/modules/ProductsDisplay/ProductsDisplay.es.js +15 -16
- package/dist/modules/ProductsDisplay/useProductsData.cjs.js +1 -1
- package/dist/modules/ProductsDisplay/useProductsData.es.js +13 -12
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),h=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),d=require("../../components/Typography/Typography.cjs.js"),m=require("../../utils/cn/cn.cjs.js"),e=require("./imageWithText.module.css.cjs.js"),g=({image:n,text:t,title:l,view:i,colorScheme:s,textColor:r,mobileTextColor:o,mobileImage:c})=>a.jsx("section",{className:e.default.root,"data-scheme":s,children:a.jsxs("div",{className:e.default.container,"data-view":i,children:[a.jsxs("div",{className:e.default.imageContainer,children:[a.jsx("img",{src:n,alt:"background image",className:e.default.image,"data-color":r}),a.jsx("img",{src:c||n,alt:"mobile background image",className:e.default.mobileImage})]}),a.jsxs("div",{className:m.cn(e.default.content,{[e.default.textAlignLeft]:i==="plain"||i==="plain_with_title",[e.default.textAlignRight]:i==="complex"}),"data-view":i,"data-text-color":r,"data-mobile-text-color":o,children:[i==="complex"&&a.jsxs("div",{className:e.default.richTextContainer,children:[l&&a.jsx(h.HighlightedTitle,{colorScheme:"dark",title:l,defaultVariant:"displayXs",mobileVariant:"headingLg"}),t&&a.jsx(d.Typography,{defaultVariant:"bodyMd",mobileVariant:"bodySm",children:t})]}),i==="plain"&&t&&a.jsx("div",{className:e.default.textContainer,children:a.jsx(d.Typography,{defaultVariant:"displayXs",mobileVariant:"headingXs",children:t})}),i==="plain_with_title"&&a.jsxs("div",{className:e.default.plainWithTitleContainer,children:[l&&a.jsx(d.Typography,{defaultVariant:"displayMd",mobileVariant:"headingLg",children:l}),t&&a.jsx(d.Typography,{defaultVariant:"bodyMd",mobileVariant:"bodyMd",children:t})]})]})]})});exports.ImageWithText=g;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TImageWithTextProps } from './types';
|
|
2
2
|
|
|
3
|
-
export declare const ImageWithText: ({ image, text, title, view, colorScheme }: TImageWithTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const ImageWithText: ({ image, text, title, view, colorScheme, textColor, mobileTextColor, mobileImage, }: TImageWithTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,40 +1,54 @@
|
|
|
1
1
|
import { jsx as i, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import { HighlightedTitle as
|
|
3
|
-
import { Typography as
|
|
4
|
-
import { cn as
|
|
2
|
+
import { HighlightedTitle as h } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
|
|
3
|
+
import { Typography as t } from "../../components/Typography/Typography.es.js";
|
|
4
|
+
import { cn as g } from "../../utils/cn/cn.es.js";
|
|
5
5
|
import a from "./imageWithText.module.css.es.js";
|
|
6
|
-
const
|
|
7
|
-
|
|
6
|
+
const N = ({
|
|
7
|
+
image: d,
|
|
8
|
+
text: l,
|
|
9
|
+
title: n,
|
|
10
|
+
view: e,
|
|
11
|
+
colorScheme: m,
|
|
12
|
+
textColor: o,
|
|
13
|
+
mobileTextColor: c,
|
|
14
|
+
mobileImage: s
|
|
15
|
+
}) => /* @__PURE__ */ i("section", { className: a.root, "data-scheme": m, children: /* @__PURE__ */ r("div", { className: a.container, "data-view": e, children: [
|
|
16
|
+
/* @__PURE__ */ r("div", { className: a.imageContainer, children: [
|
|
17
|
+
/* @__PURE__ */ i("img", { src: d, alt: "background image", className: a.image, "data-color": o }),
|
|
18
|
+
/* @__PURE__ */ i("img", { src: s || d, alt: "mobile background image", className: a.mobileImage })
|
|
19
|
+
] }),
|
|
8
20
|
/* @__PURE__ */ r(
|
|
9
21
|
"div",
|
|
10
22
|
{
|
|
11
|
-
className:
|
|
23
|
+
className: g(a.content, {
|
|
12
24
|
[a.textAlignLeft]: e === "plain" || e === "plain_with_title",
|
|
13
25
|
[a.textAlignRight]: e === "complex"
|
|
14
26
|
}),
|
|
15
27
|
"data-view": e,
|
|
28
|
+
"data-text-color": o,
|
|
29
|
+
"data-mobile-text-color": c,
|
|
16
30
|
children: [
|
|
17
31
|
e === "complex" && /* @__PURE__ */ r("div", { className: a.richTextContainer, children: [
|
|
18
|
-
|
|
19
|
-
|
|
32
|
+
n && /* @__PURE__ */ i(
|
|
33
|
+
h,
|
|
20
34
|
{
|
|
21
35
|
colorScheme: "dark",
|
|
22
|
-
title:
|
|
36
|
+
title: n,
|
|
23
37
|
defaultVariant: "displayXs",
|
|
24
38
|
mobileVariant: "headingLg"
|
|
25
39
|
}
|
|
26
40
|
),
|
|
27
|
-
|
|
41
|
+
l && /* @__PURE__ */ i(t, { defaultVariant: "bodyMd", mobileVariant: "bodySm", children: l })
|
|
28
42
|
] }),
|
|
29
|
-
e === "plain" &&
|
|
43
|
+
e === "plain" && l && /* @__PURE__ */ i("div", { className: a.textContainer, children: /* @__PURE__ */ i(t, { defaultVariant: "displayXs", mobileVariant: "headingXs", children: l }) }),
|
|
30
44
|
e === "plain_with_title" && /* @__PURE__ */ r("div", { className: a.plainWithTitleContainer, children: [
|
|
31
|
-
|
|
32
|
-
|
|
45
|
+
n && /* @__PURE__ */ i(t, { defaultVariant: "displayMd", mobileVariant: "headingLg", children: n }),
|
|
46
|
+
l && /* @__PURE__ */ i(t, { defaultVariant: "bodyMd", mobileVariant: "bodyMd", children: l })
|
|
33
47
|
] })
|
|
34
48
|
]
|
|
35
49
|
}
|
|
36
50
|
)
|
|
37
51
|
] }) });
|
|
38
52
|
export {
|
|
39
|
-
|
|
53
|
+
N as ImageWithText
|
|
40
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="imageWithText-module__root___Uq9G7",e="imageWithText-module__container___aRFfK",i="imageWithText-module__content___IKyX1",n="imageWithText-module__textAlignLeft___nxRQf",o="imageWithText-module__textAlignRight___ldGBP",_="imageWithText-module__textContainer___m5Jfs",a="imageWithText-module__richTextContainer___ochKF",
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="imageWithText-module__root___Uq9G7",e="imageWithText-module__container___aRFfK",i="imageWithText-module__content___IKyX1",n="imageWithText-module__textAlignLeft___nxRQf",o="imageWithText-module__textAlignRight___ldGBP",_="imageWithText-module__textContainer___m5Jfs",a="imageWithText-module__richTextContainer___ochKF",m="imageWithText-module__plainWithTitleContainer___VPVtI",l="imageWithText-module__imageContainer___bcAmi",g="imageWithText-module__image___paWe4",r="imageWithText-module__mobileImage___hA0RB",c={root:t,container:e,content:i,textAlignLeft:n,textAlignRight:o,textContainer:_,richTextContainer:a,plainWithTitleContainer:m,imageContainer:l,image:g,mobileImage:r};exports.container=e;exports.content=i;exports.default=c;exports.image=g;exports.imageContainer=l;exports.mobileImage=r;exports.plainWithTitleContainer=m;exports.richTextContainer=a;exports.root=t;exports.textAlignLeft=n;exports.textAlignRight=o;exports.textContainer=_;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const t = "imageWithText-module__root___Uq9G7", e = "imageWithText-module__container___aRFfK", i = "imageWithText-module__content___IKyX1", n = "imageWithText-module__textAlignLeft___nxRQf", _ = "imageWithText-module__textAlignRight___ldGBP", o = "imageWithText-module__textContainer___m5Jfs", a = "imageWithText-module__richTextContainer___ochKF", m = "imageWithText-module__plainWithTitleContainer___VPVtI", g = "imageWithText-module__imageContainer___bcAmi", l = "imageWithText-module__image___paWe4", x = {
|
|
1
|
+
const t = "imageWithText-module__root___Uq9G7", e = "imageWithText-module__container___aRFfK", i = "imageWithText-module__content___IKyX1", n = "imageWithText-module__textAlignLeft___nxRQf", _ = "imageWithText-module__textAlignRight___ldGBP", o = "imageWithText-module__textContainer___m5Jfs", a = "imageWithText-module__richTextContainer___ochKF", m = "imageWithText-module__plainWithTitleContainer___VPVtI", g = "imageWithText-module__imageContainer___bcAmi", l = "imageWithText-module__image___paWe4", x = "imageWithText-module__mobileImage___hA0RB", c = {
|
|
2
2
|
root: t,
|
|
3
3
|
container: e,
|
|
4
4
|
content: i,
|
|
@@ -8,14 +8,16 @@ const t = "imageWithText-module__root___Uq9G7", e = "imageWithText-module__conta
|
|
|
8
8
|
richTextContainer: a,
|
|
9
9
|
plainWithTitleContainer: m,
|
|
10
10
|
imageContainer: g,
|
|
11
|
-
image: l
|
|
11
|
+
image: l,
|
|
12
|
+
mobileImage: x
|
|
12
13
|
};
|
|
13
14
|
export {
|
|
14
15
|
e as container,
|
|
15
16
|
i as content,
|
|
16
|
-
|
|
17
|
+
c as default,
|
|
17
18
|
l as image,
|
|
18
19
|
g as imageContainer,
|
|
20
|
+
x as mobileImage,
|
|
19
21
|
m as plainWithTitleContainer,
|
|
20
22
|
a as richTextContainer,
|
|
21
23
|
t as root,
|
|
@@ -4,6 +4,9 @@ import { TColorScheme } from '../../types/common';
|
|
|
4
4
|
export type TImageWithTextView = 'plain' | 'complex' | 'plain_with_title';
|
|
5
5
|
export type TImageWithTextProps = {
|
|
6
6
|
image: string;
|
|
7
|
+
mobileImage?: string;
|
|
8
|
+
textColor?: 'black' | 'white' | 'solar' | 'indigo';
|
|
9
|
+
mobileTextColor?: 'black' | 'white' | 'solar' | 'indigo';
|
|
7
10
|
title?: ReactNode;
|
|
8
11
|
text?: ReactNode;
|
|
9
12
|
view: TImageWithTextView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),h=require("../../components/ProductGallery/ProductGallery.cjs.js"),i=require("../../components/Typography/Typography.cjs.js"),T=require("./components/ProductsDisplayTabs/ProductsDisplayTabs.cjs.js"),s=require("./productsDisplay.module.css.cjs.js"),g=require("./useProductsData.cjs.js"),m=({labelText:c,productDisplays:l})=>{var o;const{isTabbed:a,title:d,description:u,tabs:t,slidesByTabs:n}=g.useProductsData({productDisplays:l}),[r,y]=b.useState(((o=t[0])==null?void 0:o.value)??""),p=a?e.jsx(T.ProductsDisplayTabs,{label:c,tabs:t,activeTab:r,onTabChange:y}):e.jsxs("div",{className:s.default.header,children:[e.jsx(i.Typography,{className:s.default.headerTitle,defaultVariant:"displayMd",mobileVariant:"headingLg",children:d}),e.jsx(i.Typography,{defaultVariant:"bodyLg",mobileVariant:"bodySm",children:u})]});return e.jsx("section",{className:s.default.root,children:e.jsx(h.ProductGallery,{header:p,slides:n[r],isTabbed:a})})};exports.ProductsDisplay=m;
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { ProductGallery as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
const B = ({ labelText: d, productDisplays: m }) => {
|
|
2
|
+
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
3
|
+
import { useState as h } from "react";
|
|
4
|
+
import { ProductGallery as y } from "../../components/ProductGallery/ProductGallery.es.js";
|
|
5
|
+
import { Typography as o } from "../../components/Typography/Typography.es.js";
|
|
6
|
+
import { ProductsDisplayTabs as f } from "./components/ProductsDisplayTabs/ProductsDisplayTabs.es.js";
|
|
7
|
+
import a from "./productsDisplay.module.css.es.js";
|
|
8
|
+
import { useProductsData as T } from "./useProductsData.es.js";
|
|
9
|
+
const j = ({ labelText: l, productDisplays: d }) => {
|
|
11
10
|
var i;
|
|
12
|
-
const { isTabbed:
|
|
13
|
-
productDisplays:
|
|
14
|
-
}), [
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
11
|
+
const { isTabbed: t, title: c, description: m, tabs: r, slidesByTabs: n } = T({
|
|
12
|
+
productDisplays: d
|
|
13
|
+
}), [s, p] = h(((i = r[0]) == null ? void 0 : i.value) ?? ""), b = t ? /* @__PURE__ */ e(f, { label: l, tabs: r, activeTab: s, onTabChange: p }) : /* @__PURE__ */ u("div", { className: a.header, children: [
|
|
14
|
+
/* @__PURE__ */ e(o, { className: a.headerTitle, defaultVariant: "displayMd", mobileVariant: "headingLg", children: c }),
|
|
15
|
+
/* @__PURE__ */ e(o, { defaultVariant: "bodyLg", mobileVariant: "bodySm", children: m })
|
|
17
16
|
] });
|
|
18
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ e("section", { className: a.root, children: /* @__PURE__ */ e(y, { header: b, slides: n[s], isTabbed: t }) });
|
|
19
18
|
};
|
|
20
19
|
export {
|
|
21
|
-
|
|
20
|
+
j as ProductsDisplay
|
|
22
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),f=({productDisplays:e})=>{const a=e.length>1,o=e[0],l=o.title,u=o.description??"",n=i.useMemo(()=>e.map(t=>({value:t.title.replace(" ","_").toLocaleLowerCase(),label:t.title})),[e]),b=i.useMemo(()=>n.reduce((t,r)=>{const s=e.find(d=>d.title===r.label),c=s==null?void 0:s.productCards;return c&&(t[r.value]=c),t},{}),[n,e]);return{isTabbed:a,title:l,description:u,tabs:n,slidesByTabs:b}};exports.useProductsData=f;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { useMemo as c } from "react";
|
|
3
|
+
const m = ({ productDisplays: e }) => {
|
|
4
|
+
const l = e.length > 1, r = e[0], a = r.title, b = r.description ?? "", n = c(() => e.map((t) => ({
|
|
5
|
+
value: t.title.replace(" ", "_").toLocaleLowerCase(),
|
|
6
|
+
label: t.title
|
|
7
|
+
})), [e]), u = c(() => n.reduce((t, s) => {
|
|
8
|
+
const o = e.find((d) => d.title === s.label), i = o == null ? void 0 : o.productCards;
|
|
9
|
+
return i && (t[s.value] = i), t;
|
|
10
|
+
}, {}), [n, e]);
|
|
10
11
|
return {
|
|
11
12
|
isTabbed: l,
|
|
12
13
|
title: a,
|
|
13
|
-
description:
|
|
14
|
-
tabs:
|
|
15
|
-
slidesByTabs:
|
|
14
|
+
description: b,
|
|
15
|
+
tabs: n,
|
|
16
|
+
slidesByTabs: u
|
|
16
17
|
};
|
|
17
18
|
};
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
m as useProductsData
|
|
20
21
|
};
|