@zenpatient-org/healthspan-marketing-ui 0.1.119 → 0.1.120
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/Cursor/components/ClientCursor.cjs.js +1 -1
- package/dist/components/Cursor/components/ClientCursor.es.js +18 -18
- package/dist/components/HighlightedTitle/HighlightedTitle.cjs.js +1 -1
- package/dist/components/HighlightedTitle/HighlightedTitle.es.js +14 -14
- package/dist/components/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/TextInput/TextInput.es.js +31 -31
- package/dist/components/TextInput/textInput.module.css.cjs.js +1 -1
- package/dist/components/TextInput/textInput.module.css.es.js +20 -18
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/pageComponents/Footer/components/TopTreatmentsSlider/TopTreatmentsSlider.cjs.js +1 -1
- package/dist/pageComponents/Footer/components/TopTreatmentsSlider/TopTreatmentsSlider.es.js +6 -6
- package/package.json +1 -1
package/dist/pageComponents/Footer/components/TopTreatmentsSlider/TopTreatmentsSlider.cjs.js
CHANGED
|
@@ -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"),l=require("react"),k=require("../../../../components/Button/Button.cjs.js"),u=require("../../../../components/Icon/constants.cjs.js"),d=require("../../../../components/Typography/Typography.cjs.js"),x=require("../../../../components/Icon/Icon.cjs.js"),a=require("./topTreatmentsSlider.module.css.cjs.js"),p=({title:g,products:n})=>{const[t,m]=l.useState(0),[r,c]=l.useState(1),[i,o]=l.useState(!1),j=l.useMemo(()=>{if(n.length===2){const h=(t-1+n.length)%n.length,f=(t+1)%n.length;return[n[h],n[t===h?f:t],n[f]].filter((T,S,_)=>_.findIndex(C=>C.name===T.name)===S)}const s=(t-1+n.length)%n.length,I=(t+1)%n.length;return[n[s],n[t],n[I]]},[t,n]),v=l.useCallback(()=>{i||(o(!0),c(2))},[i]),N=l.useCallback(()=>{i||(o(!0),c(0))},[i]),y=()=>{r===2?m(s=>(s+1)%n.length):r===0&&m(s=>(s-1+n.length)%n.length),c(1),o(!1)},b=l.useCallback(()=>{const s=n[t];s!=null&&s.link&&window.open(s.link,"_blank")},[n,t]);return e.jsxs("div",{className:a.default.root,children:[e.jsx(d.Typography,{as:"span",defaultVariant:"labelSm",mobileVariant:"labelXs",weight:"regular",emphasis:!0,className:a.default.title,children:g}),e.jsxs("div",{className:a.default.sliderContainer,children:[e.jsx("div",{className:a.default.sliderTrack,style:{transform:`translateX(calc(-${r*100}% - ${r*10}px))`,transition:i?"transform 0.3s cubic-bezier(0.4,0,0.2,1)":"none"},onTransitionEnd:y,children:j.map(s=>e.jsx("div",{className:a.default.slide,children:e.jsxs("div",{className:a.default.productCard,children:[e.jsx("div",{className:a.default.imageWrapper,children:e.jsx("img",{src:s.image,alt:s.name,className:a.default.image})}),e.jsxs("div",{className:a.default.rightSide,children:[e.jsxs("div",{className:a.default.headerSplit,children:[e.jsx("div",{className:a.default.nameContainer,children:e.jsx(d.Typography,{defaultVariant:"headingXs",children:s.name})}),e.jsx(d.Typography,{defaultVariant:"bodyMd",mobileVariant:"bodySm",className:a.default.price,children:`Starting at ${s.price}/mo`})]}),e.jsx("div",{className:a.default.actions,children:e.jsx("div",{className:a.default.btnLearnMore,children:e.jsx(k.Button,{size:"sm",variant:"primary-invert",onClick:b,children:"Learn More"})})})]})]})},s.name))}),e.jsxs("div",{className:a.default.switchers,children:[e.jsx("div",{className:a.default.arrowIcon,onClick:N,children:e.jsx(x.Icon,{name:u.EIconName.ARROW_BACK})}),e.jsx("div",{className:a.default.arrowIcon,onClick:v,children:e.jsx(x.Icon,{name:u.EIconName.ARROW_FORWARD})})]})]})]})};exports.TopTreatmentsSlider=p;
|
|
@@ -6,16 +6,16 @@ import { EIconName as N } from "../../../../components/Icon/constants.es.js";
|
|
|
6
6
|
import { Typography as h } from "../../../../components/Typography/Typography.es.js";
|
|
7
7
|
import { Icon as x } from "../../../../components/Icon/Icon.es.js";
|
|
8
8
|
import n from "./topTreatmentsSlider.module.css.es.js";
|
|
9
|
-
const
|
|
9
|
+
const j = ({ title: b, products: e }) => {
|
|
10
10
|
const [l, f] = o(0), [t, m] = o(1), [s, c] = o(!1), I = V(() => {
|
|
11
11
|
if (e.length === 2) {
|
|
12
12
|
const g = (l - 1 + e.length) % e.length, v = (l + 1) % e.length;
|
|
13
13
|
return [e[g], e[l === g ? v : l], e[v]].filter(
|
|
14
|
-
(
|
|
14
|
+
(A, R, T) => T.findIndex((M) => M.name === A.name) === R
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
|
-
const a = (l - 1 + e.length) % e.length,
|
|
18
|
-
return [e[a], e[l], e[
|
|
17
|
+
const a = (l - 1 + e.length) % e.length, S = (l + 1) % e.length;
|
|
18
|
+
return [e[a], e[l], e[S]];
|
|
19
19
|
}, [l, e]), w = d(() => {
|
|
20
20
|
s || (c(!0), m(2));
|
|
21
21
|
}, [s]), C = d(() => {
|
|
@@ -60,7 +60,7 @@ const z = ({ title: b, products: e }) => {
|
|
|
60
60
|
defaultVariant: "bodyMd",
|
|
61
61
|
mobileVariant: "bodySm",
|
|
62
62
|
className: n.price,
|
|
63
|
-
children: a.price
|
|
63
|
+
children: `Starting at ${a.price}/mo`
|
|
64
64
|
}
|
|
65
65
|
)
|
|
66
66
|
] }),
|
|
@@ -77,5 +77,5 @@ const z = ({ title: b, products: e }) => {
|
|
|
77
77
|
] });
|
|
78
78
|
};
|
|
79
79
|
export {
|
|
80
|
-
|
|
80
|
+
j as TopTreatmentsSlider
|
|
81
81
|
};
|