@zenpatient-org/healthspan-marketing-ui 0.1.17 → 0.1.18
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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../_virtual/jsx-runtime.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../_virtual/jsx-runtime.cjs.js"),u=require("react"),g=require("../../node_modules/swiper/modules/navigation.cjs.js"),c=require("../../node_modules/swiper/swiper-react.cjs.js"),x=require("../../utils/cn.cjs.js"),C=require("../../utils/useSwiper.cjs.js"),p=require("../ProgressButton/ProgressButton.cjs.js");;/* empty css */;/* empty css */;/* empty css */const e=require("./productGallery.module.css.cjs.js"),q=[g.default],v=({slides:t,header:m,isTabbed:i=!1})=>{const{swiper:r,activeIndex:n,isEnd:l,setIsEnd:j,hideNav:f,handleSlideChange:h,handlePrevClick:o,handleNextClick:a,onSwiperInit:R,handleSwiperResize:w,handleSlideTo:d}=C.useSwiper();return u.useEffect(()=>{r==null||r.setProgress(0,300)},[r]),u.useEffect(()=>{t.length&&d(0)},[t,d]),s.jsxRuntimeExports.jsxs("div",{className:e.default.root,children:[s.jsxRuntimeExports.jsxs("div",{className:x.cn(e.default.topRow,{[e.default.topRowTabbed]:i}),children:[s.jsxRuntimeExports.jsx("div",{className:e.default.headerWrapper,children:m}),s.jsxRuntimeExports.jsx("div",{className:x.cn(e.default.swiperControlsDesktop,{[e.default.swiperControlsHidden]:f,[e.default.swiperControlsTabbed]:i}),children:s.jsxRuntimeExports.jsx(p.ProgressButton,{left:{disabled:n<=0,onClick:o},right:{disabled:l,onClick:a}})})]}),s.jsxRuntimeExports.jsx("div",{className:e.default.carouselArea,children:s.jsxRuntimeExports.jsx(c.Swiper,{onSwiper:R,onResize:w,onSlideChange:h,onReachEnd:()=>j(!0),modules:q,spaceBetween:0,slidesPerView:"auto",className:e.default.swiper,children:t.map((E,S)=>s.jsxRuntimeExports.jsx(c.SwiperSlide,{className:e.default.swiperSlide,children:E},S))})}),s.jsxRuntimeExports.jsx("div",{className:e.default.swiperControlsMobile,children:s.jsxRuntimeExports.jsx(p.ProgressButton,{left:{disabled:n<=0,onClick:o},right:{disabled:l,onClick:a}})})]})};exports.ProductGallery=v;
|
|
@@ -1,58 +1,61 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import
|
|
4
|
-
import { Swiper as
|
|
5
|
-
import { cn as
|
|
1
|
+
import { j as i } from "../../_virtual/jsx-runtime.es.js";
|
|
2
|
+
import { useEffect as c } from "react";
|
|
3
|
+
import u from "../../node_modules/swiper/modules/navigation.es.js";
|
|
4
|
+
import { Swiper as v, SwiperSlide as g } from "../../node_modules/swiper/swiper-react.es.js";
|
|
5
|
+
import { cn as p } from "../../utils/cn.es.js";
|
|
6
6
|
import { useSwiper as b } from "../../utils/useSwiper.es.js";
|
|
7
|
-
import { ProgressButton as
|
|
7
|
+
import { ProgressButton as m } from "../ProgressButton/ProgressButton.es.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
11
|
import e from "./productGallery.module.css.es.js";
|
|
12
|
-
const
|
|
13
|
-
slides:
|
|
14
|
-
header:
|
|
15
|
-
isTabbed:
|
|
12
|
+
const k = [u], A = ({
|
|
13
|
+
slides: s,
|
|
14
|
+
header: h,
|
|
15
|
+
isTabbed: o = !1
|
|
16
16
|
}) => {
|
|
17
17
|
const {
|
|
18
|
-
swiper:
|
|
19
|
-
activeIndex:
|
|
20
|
-
isEnd:
|
|
21
|
-
setIsEnd:
|
|
22
|
-
hideNav:
|
|
23
|
-
handleSlideChange:
|
|
24
|
-
handlePrevClick:
|
|
18
|
+
swiper: r,
|
|
19
|
+
activeIndex: l,
|
|
20
|
+
isEnd: t,
|
|
21
|
+
setIsEnd: w,
|
|
22
|
+
hideNav: x,
|
|
23
|
+
handleSlideChange: f,
|
|
24
|
+
handlePrevClick: n,
|
|
25
25
|
handleNextClick: a,
|
|
26
|
-
onSwiperInit:
|
|
27
|
-
handleSwiperResize:
|
|
26
|
+
onSwiperInit: S,
|
|
27
|
+
handleSwiperResize: j,
|
|
28
|
+
handleSlideTo: d
|
|
28
29
|
} = b();
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
}, [
|
|
32
|
-
|
|
30
|
+
return c(() => {
|
|
31
|
+
r == null || r.setProgress(0, 300);
|
|
32
|
+
}, [r]), c(() => {
|
|
33
|
+
s.length && d(0);
|
|
34
|
+
}, [s, d]), /* @__PURE__ */ i.jsxs("div", { className: e.root, children: [
|
|
35
|
+
/* @__PURE__ */ i.jsxs(
|
|
33
36
|
"div",
|
|
34
37
|
{
|
|
35
|
-
className:
|
|
36
|
-
[e.topRowTabbed]:
|
|
38
|
+
className: p(e.topRow, {
|
|
39
|
+
[e.topRowTabbed]: o
|
|
37
40
|
}),
|
|
38
41
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ i.jsx("div", { className: e.headerWrapper, children: h }),
|
|
43
|
+
/* @__PURE__ */ i.jsx(
|
|
41
44
|
"div",
|
|
42
45
|
{
|
|
43
|
-
className:
|
|
44
|
-
[e.swiperControlsHidden]:
|
|
45
|
-
[e.swiperControlsTabbed]:
|
|
46
|
+
className: p(e.swiperControlsDesktop, {
|
|
47
|
+
[e.swiperControlsHidden]: x,
|
|
48
|
+
[e.swiperControlsTabbed]: o
|
|
46
49
|
}),
|
|
47
|
-
children: /* @__PURE__ */
|
|
48
|
-
|
|
50
|
+
children: /* @__PURE__ */ i.jsx(
|
|
51
|
+
m,
|
|
49
52
|
{
|
|
50
53
|
left: {
|
|
51
|
-
disabled:
|
|
52
|
-
onClick:
|
|
54
|
+
disabled: l <= 0,
|
|
55
|
+
onClick: n
|
|
53
56
|
},
|
|
54
57
|
right: {
|
|
55
|
-
disabled:
|
|
58
|
+
disabled: t,
|
|
56
59
|
onClick: a
|
|
57
60
|
}
|
|
58
61
|
}
|
|
@@ -62,29 +65,29 @@ const g = [N], A = ({
|
|
|
62
65
|
]
|
|
63
66
|
}
|
|
64
67
|
),
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
|
|
68
|
+
/* @__PURE__ */ i.jsx("div", { className: e.carouselArea, children: /* @__PURE__ */ i.jsx(
|
|
69
|
+
v,
|
|
67
70
|
{
|
|
68
|
-
onSwiper:
|
|
69
|
-
onResize:
|
|
70
|
-
onSlideChange:
|
|
71
|
-
onReachEnd: () =>
|
|
72
|
-
modules:
|
|
71
|
+
onSwiper: S,
|
|
72
|
+
onResize: j,
|
|
73
|
+
onSlideChange: f,
|
|
74
|
+
onReachEnd: () => w(!0),
|
|
75
|
+
modules: k,
|
|
73
76
|
spaceBetween: 0,
|
|
74
77
|
slidesPerView: "auto",
|
|
75
78
|
className: e.swiper,
|
|
76
|
-
children:
|
|
79
|
+
children: s.map((C, N) => /* @__PURE__ */ i.jsx(g, { className: e.swiperSlide, children: C }, N))
|
|
77
80
|
}
|
|
78
81
|
) }),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
82
|
+
/* @__PURE__ */ i.jsx("div", { className: e.swiperControlsMobile, children: /* @__PURE__ */ i.jsx(
|
|
83
|
+
m,
|
|
81
84
|
{
|
|
82
85
|
left: {
|
|
83
|
-
disabled:
|
|
84
|
-
onClick:
|
|
86
|
+
disabled: l <= 0,
|
|
87
|
+
onClick: n
|
|
85
88
|
},
|
|
86
89
|
right: {
|
|
87
|
-
disabled:
|
|
90
|
+
disabled: t,
|
|
88
91
|
onClick: a
|
|
89
92
|
}
|
|
90
93
|
}
|