@zenpatient-org/healthspan-marketing-ui 0.2.50 → 0.2.52
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/AdvancedGallery/AdvancedGallery.cjs.js +1 -1
- package/dist/components/AdvancedGallery/AdvancedGallery.es.js +28 -46
- package/dist/components/AdvancedGallery/components/VideoSlide/VideoSlide.cjs.js +1 -1
- package/dist/components/AdvancedGallery/components/VideoSlide/VideoSlide.d.ts +1 -3
- package/dist/components/AdvancedGallery/components/VideoSlide/VideoSlide.es.js +35 -35
- package/dist/modules/StillHaveQuestions/constants.cjs.js +1 -1
- package/dist/modules/StillHaveQuestions/constants.es.js +1 -1
- package/package.json +1 -1
|
@@ -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"),h=require("react"),m=require("swiper/modules"),d=require("swiper/react"),q=require("../../utils/useSwiper/useSwiper.cjs.js"),y=require("../../utils/cn/cn.cjs.js");;/* empty css */;/* empty css */;/* empty css */const j=require("../GalleryPagination/GalleryPagination.cjs.js"),r=require("../../src/components/AdvancedGallery/advancedGallery.module.css"),w=require("../Label/Label.cjs.js"),x=require("./components/VideoSlide/VideoSlide.cjs.js"),v=require("./components/ImageGalleryPagination/ImageGalleryPagination.cjs.js"),P=[m.Navigation],_=({items:a,label:s,className:u})=>{const{activeIndex:l,handleSlideTo:o,handleSlideChange:S,onSwiperInit:p,handleSwiperResize:g,handleUserInteraction:i}=q.useSwiperWithAutoPlay(5e3),c=h.useCallback(n=>{i(),o(n)},[i,o]);return e.jsxs("div",{className:y.cn(r.root,u),children:[s&&e.jsx("div",{className:r.labelWrap,children:e.jsx(w.Label,{color:"black",size:"sm",children:s})}),e.jsx(d.Swiper,{onSwiper:p,onResize:g,onSlideChange:S,onTouchStart:i,onTouchEnd:i,modules:P,spaceBetween:0,slidesPerView:1,className:r.swiper,children:a.map((n,t)=>e.jsxs(d.SwiperSlide,{children:[n.mediaType==="image"&&e.jsx("div",{className:r.imageWrapper,children:e.jsx("img",{src:n.url,alt:"product image",className:r.image,onClick:i})}),n.mediaType==="video"&&e.jsx(x.VideoSlide,{item:n,isActive:l===t,onClick:i})]},t))}),e.jsx(v.ImageGalleryPagination,{items:a,activeIndex:l,onSelect:c}),e.jsx(j.GalleryPagination,{count:a.length,activeIndex:l,onSelect:c})]})};exports.AdvancedGallery=_;
|
|
@@ -1,75 +1,57 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { Navigation as
|
|
5
|
-
import { Swiper as
|
|
6
|
-
import { useSwiperWithAutoPlay as
|
|
7
|
-
import { cn as
|
|
3
|
+
import { useCallback as g } from "react";
|
|
4
|
+
import { Navigation as f } from "swiper/modules";
|
|
5
|
+
import { Swiper as u, SwiperSlide as w } from "swiper/react";
|
|
6
|
+
import { useSwiperWithAutoPlay as v } from "../../utils/useSwiper/useSwiper.es.js";
|
|
7
|
+
import { cn as y } from "../../utils/cn/cn.es.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
|
-
import { GalleryPagination as
|
|
11
|
+
import { GalleryPagination as N } from "../GalleryPagination/GalleryPagination.es.js";
|
|
12
12
|
import r from "../../components/AdvancedGallery/advancedGallery.module.css";
|
|
13
|
-
import { Label as
|
|
14
|
-
import { VideoSlide as
|
|
15
|
-
import { ImageGalleryPagination as
|
|
16
|
-
const
|
|
17
|
-
const {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
handleSlideChange: d,
|
|
21
|
-
onSwiperInit: h,
|
|
22
|
-
handleSwiperResize: S,
|
|
23
|
-
handleUserInteraction: o,
|
|
24
|
-
startAutoPlay: g,
|
|
25
|
-
stopAutoPlay: u
|
|
26
|
-
} = P(3e3), m = f(
|
|
27
|
-
(i) => {
|
|
28
|
-
o(), t(i);
|
|
13
|
+
import { Label as P } from "../Label/Label.es.js";
|
|
14
|
+
import { VideoSlide as C } from "./components/VideoSlide/VideoSlide.es.js";
|
|
15
|
+
import { ImageGalleryPagination as I } from "./components/ImageGalleryPagination/ImageGalleryPagination.es.js";
|
|
16
|
+
const T = [f], D = ({ items: a, label: n, className: p }) => {
|
|
17
|
+
const { activeIndex: l, handleSlideTo: t, handleSlideChange: d, onSwiperInit: h, handleSwiperResize: S, handleUserInteraction: i } = v(5e3), m = g(
|
|
18
|
+
(o) => {
|
|
19
|
+
i(), t(o);
|
|
29
20
|
},
|
|
30
|
-
[
|
|
21
|
+
[i, t]
|
|
31
22
|
);
|
|
32
|
-
return /* @__PURE__ */ s("div", { className:
|
|
33
|
-
n && /* @__PURE__ */ e("div", { className: r.labelWrap, children: /* @__PURE__ */ e(
|
|
23
|
+
return /* @__PURE__ */ s("div", { className: y(r.root, p), children: [
|
|
24
|
+
n && /* @__PURE__ */ e("div", { className: r.labelWrap, children: /* @__PURE__ */ e(P, { color: "black", size: "sm", children: n }) }),
|
|
34
25
|
/* @__PURE__ */ e(
|
|
35
|
-
|
|
26
|
+
u,
|
|
36
27
|
{
|
|
37
28
|
onSwiper: h,
|
|
38
29
|
onResize: S,
|
|
39
30
|
onSlideChange: d,
|
|
40
|
-
onTouchStart:
|
|
41
|
-
onTouchEnd:
|
|
42
|
-
modules:
|
|
31
|
+
onTouchStart: i,
|
|
32
|
+
onTouchEnd: i,
|
|
33
|
+
modules: T,
|
|
43
34
|
spaceBetween: 0,
|
|
44
35
|
slidesPerView: 1,
|
|
45
36
|
className: r.swiper,
|
|
46
|
-
children: a.map((
|
|
47
|
-
|
|
37
|
+
children: a.map((o, c) => /* @__PURE__ */ s(w, { children: [
|
|
38
|
+
o.mediaType === "image" && /* @__PURE__ */ e("div", { className: r.imageWrapper, children: /* @__PURE__ */ e(
|
|
48
39
|
"img",
|
|
49
40
|
{
|
|
50
|
-
src:
|
|
41
|
+
src: o.url,
|
|
51
42
|
alt: "product image",
|
|
52
43
|
className: r.image,
|
|
53
|
-
onClick:
|
|
44
|
+
onClick: i
|
|
54
45
|
}
|
|
55
46
|
) }),
|
|
56
|
-
|
|
57
|
-
I,
|
|
58
|
-
{
|
|
59
|
-
item: i,
|
|
60
|
-
isActive: l === c,
|
|
61
|
-
onClick: o,
|
|
62
|
-
startAutoPlay: g,
|
|
63
|
-
stopAutoPlay: u
|
|
64
|
-
}
|
|
65
|
-
)
|
|
47
|
+
o.mediaType === "video" && /* @__PURE__ */ e(C, { item: o, isActive: l === c, onClick: i })
|
|
66
48
|
] }, c))
|
|
67
49
|
}
|
|
68
50
|
),
|
|
69
|
-
/* @__PURE__ */ e(
|
|
70
|
-
/* @__PURE__ */ e(
|
|
51
|
+
/* @__PURE__ */ e(I, { items: a, activeIndex: l, onSelect: m }),
|
|
52
|
+
/* @__PURE__ */ e(N, { count: a.length, activeIndex: l, onSelect: m })
|
|
71
53
|
] });
|
|
72
54
|
};
|
|
73
55
|
export {
|
|
74
|
-
|
|
56
|
+
D as AdvancedGallery
|
|
75
57
|
};
|
|
@@ -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 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;
|
|
@@ -6,8 +6,6 @@ type VideoSlideProps = {
|
|
|
6
6
|
};
|
|
7
7
|
isActive: boolean;
|
|
8
8
|
onClick: () => void;
|
|
9
|
-
startAutoPlay: () => void;
|
|
10
|
-
stopAutoPlay: () => void;
|
|
11
9
|
};
|
|
12
|
-
export declare const VideoSlide: ({ item, isActive, onClick
|
|
10
|
+
export declare const VideoSlide: ({ item, isActive, onClick }: VideoSlideProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
11
|
export {};
|
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { cn as
|
|
5
|
-
import
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { EIconName as
|
|
8
|
-
import { AudioButton as
|
|
9
|
-
const
|
|
10
|
-
const [
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
if (!
|
|
14
|
-
const
|
|
15
|
-
|
|
2
|
+
import { jsx as o, jsxs as P } from "react/jsx-runtime";
|
|
3
|
+
import { useState as m, useRef as p, useEffect as x, useCallback as l } from "react";
|
|
4
|
+
import { cn as T } from "../../../../utils/cn/cn.es.js";
|
|
5
|
+
import r from "../../../../components/AdvancedGallery/components/VideoSlide/videoSlide.module.css";
|
|
6
|
+
import { Icon as E } from "../../../Icon/Icon.es.js";
|
|
7
|
+
import { EIconName as I } from "../../../Icon/constants.es.js";
|
|
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);
|
|
11
|
+
x(() => {
|
|
12
|
+
const t = e.current;
|
|
13
|
+
if (!t) return;
|
|
14
|
+
const d = () => {
|
|
15
|
+
s(!1);
|
|
16
16
|
};
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
})) : (
|
|
20
|
-
|
|
17
|
+
return c ? (t.muted = !0, i(!0), t.play().then(() => {
|
|
18
|
+
s(!0);
|
|
19
|
+
})) : (t.pause(), t.currentTime = 0, s(!1)), t.addEventListener("ended", d), () => {
|
|
20
|
+
t.removeEventListener("ended", d);
|
|
21
21
|
};
|
|
22
|
-
}, [
|
|
22
|
+
}, [c]);
|
|
23
23
|
const y = l(
|
|
24
|
-
(
|
|
25
|
-
|
|
24
|
+
(t) => {
|
|
25
|
+
t.stopPropagation(), e.current && (e.current.play(), s(!0)), u();
|
|
26
26
|
},
|
|
27
|
-
[
|
|
28
|
-
),
|
|
29
|
-
|
|
30
|
-
}, []),
|
|
31
|
-
e.current &&
|
|
32
|
-
}, [
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
27
|
+
[u]
|
|
28
|
+
), h = l((t) => {
|
|
29
|
+
t.stopPropagation(), e.current && (e.current.muted = !e.current.muted, i(e.current.muted));
|
|
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]);
|
|
33
|
+
return /* @__PURE__ */ o("div", { className: r.root, ref: v, onClick: N, children: /* @__PURE__ */ P("div", { className: r.videoContainer, children: [
|
|
34
|
+
/* @__PURE__ */ o(
|
|
35
35
|
"video",
|
|
36
36
|
{
|
|
37
37
|
ref: e,
|
|
38
|
-
src:
|
|
38
|
+
src: n.url,
|
|
39
39
|
playsInline: !0,
|
|
40
40
|
autoPlay: !0,
|
|
41
41
|
muted: !0,
|
|
42
42
|
controls: !1,
|
|
43
|
-
poster:
|
|
44
|
-
className:
|
|
43
|
+
poster: n.preview,
|
|
44
|
+
className: T(r.video, !a && r.mediaHidden)
|
|
45
45
|
}
|
|
46
46
|
),
|
|
47
|
-
|
|
48
|
-
|
|
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 }) })
|
|
49
49
|
] }) });
|
|
50
50
|
};
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
k as VideoSlide
|
|
53
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e={StillHaveQuestions:{title:t.jsxs(t.Fragment,{children:["Still have ",t.jsx("b",{children:"questions?"})]}),button:{text:"Contact Us",link:"https://www.gethealthspan.com/contact-us"},image:"https://methodical-vitality-96814f361f.media.strapiapp.com/still_Have_Questions_e6cfc3cba3.jpg",titleHighlight:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e={StillHaveQuestions:{title:t.jsxs(t.Fragment,{children:["Still have ",t.jsx("b",{children:"questions?"})]}),button:{text:"Contact Us",link:"https://www.gethealthspan.com/contact-us"},image:"https://methodical-vitality-96814f361f.media.strapiapp.com/still_Have_Questions_e6cfc3cba3.jpg",titleHighlight:"dark",description:"",buttonColor:"secondary",colorScheme:"light"},JoinOurTeam:{title:t.jsxs(t.Fragment,{children:["Have a passion for ",t.jsx("b",{children:"longevity science?"})]}),button:{text:"Join Our Team",link:"https://careers.gethealthspan.com/"},image:"https://methodical-vitality-96814f361f.media.strapiapp.com/join_Our_Team_32a787012e.jpg",titleHighlight:"light",description:"",buttonColor:"secondary",colorScheme:"light"}};exports.LEGACY_CONFIG=e;
|
|
@@ -10,7 +10,7 @@ const a = {
|
|
|
10
10
|
link: "https://www.gethealthspan.com/contact-us"
|
|
11
11
|
},
|
|
12
12
|
image: "https://methodical-vitality-96814f361f.media.strapiapp.com/still_Have_Questions_e6cfc3cba3.jpg",
|
|
13
|
-
titleHighlight: "
|
|
13
|
+
titleHighlight: "dark",
|
|
14
14
|
description: "",
|
|
15
15
|
buttonColor: "secondary",
|
|
16
16
|
colorScheme: "light"
|