@zenpatient-org/healthspan-marketing-ui 0.2.65 → 0.2.66

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 e=require("react/jsx-runtime"),m=require("react"),q=require("swiper/modules"),d=require("swiper/react"),y=require("../../utils/useSwiper/useSwiper.cjs.js"),j=require("../../utils/cn/cn.cjs.js");;/* empty css */;/* empty css */;/* empty css */const w=require("../GalleryPagination/GalleryPagination.cjs.js"),u=require("../../src/styles/utils.module.css"),a=require("../../src/components/AdvancedGallery/advancedGallery.module.css"),x=require("../Label/Label.cjs.js"),v=require("./components/VideoSlide/VideoSlide.cjs.js"),P=require("./components/ImageGalleryPagination/ImageGalleryPagination.cjs.js"),_=[q.Navigation],b=({items:r,label:l,className:S})=>{const{activeIndex:s,handleSlideTo:o,handleSlideChange:p,onSwiperInit:g,handleSwiperResize:h,handleUserInteraction:i}=y.useSwiperWithAutoPlay(5e3),c=m.useCallback(n=>{i(),o(n)},[i,o]);return e.jsxs("div",{className:j.cn(a.root,S),children:[l&&e.jsx("div",{className:a.labelWrap,children:e.jsx(x.Label,{color:"black",size:"sm",children:l})}),e.jsx(d.Swiper,{onSwiper:g,onResize:h,onSlideChange:p,onTouchStart:i,onTouchEnd:i,modules:_,spaceBetween:0,slidesPerView:1,className:a.swiper,children:r.map((n,t)=>e.jsxs(d.SwiperSlide,{children:[n.mediaType==="image"&&e.jsx("div",{className:a.imageWrapper,children:e.jsx("img",{src:n.url,alt:"product image",className:a.image,onClick:i})}),n.mediaType==="video"&&e.jsx(v.VideoSlide,{item:n,isActive:s===t,onClick:i})]},t))}),e.jsx(P.ImageGalleryPagination,{items:r,activeIndex:s,className:u.hideOnMobile,onSelect:c}),e.jsx(w.GalleryPagination,{count:r.length,activeIndex:s,className:u.hideOnDesktop,onSelect:c})]})};exports.AdvancedGallery=b;
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"),i=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:r,label:l,className:u})=>{const{activeIndex:s,handleSlideTo:o,handleSlideChange:S,onSwiperInit:p,handleSwiperResize:g,handleUserInteraction:n}=q.useSwiperWithAutoPlay(5e3),c=h.useCallback(a=>{n(),o(a)},[n,o]);return e.jsxs("div",{className:y.cn(i.root,u),children:[l&&e.jsx("div",{className:i.labelWrap,children:e.jsx(w.Label,{color:"black",size:"sm",children:l})}),e.jsx(d.Swiper,{onSwiper:p,onResize:g,onSlideChange:S,onTouchStart:n,onTouchEnd:n,modules:P,spaceBetween:0,slidesPerView:1,className:i.swiper,children:r.map((a,t)=>e.jsxs(d.SwiperSlide,{children:[a.mediaType==="image"&&e.jsx("div",{className:i.imageWrapper,children:e.jsx("img",{src:a.url,alt:"product image",className:i.image,onClick:n})}),a.mediaType==="video"&&e.jsx(x.VideoSlide,{item:a,isActive:s===t,onClick:n})]},t))}),e.jsx(v.ImageGalleryPagination,{items:r,activeIndex:s,className:i.hideOnMobile,onSelect:c}),e.jsx(j.GalleryPagination,{count:r.length,activeIndex:s,className:i.hideOnDesktop,onSelect:c})]})};exports.AdvancedGallery=_;
@@ -1,74 +1,73 @@
1
1
  "use client";
2
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
3
- import { useCallback as f } from "react";
4
- import { Navigation as u } from "swiper/modules";
5
- import { Swiper as w, SwiperSlide as v } from "swiper/react";
6
- import { useSwiperWithAutoPlay as y } from "../../utils/useSwiper/useSwiper.es.js";
2
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
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
7
  import { cn as N } from "../../utils/cn/cn.es.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
- import { GalleryPagination as P } from "../GalleryPagination/GalleryPagination.es.js";
12
- import p from "../../styles/utils.module.css";
13
- import r from "../../components/AdvancedGallery/advancedGallery.module.css";
14
- import { Label as k } from "../Label/Label.es.js";
15
- import { VideoSlide as C } from "./components/VideoSlide/VideoSlide.es.js";
16
- import { ImageGalleryPagination as I } from "./components/ImageGalleryPagination/ImageGalleryPagination.es.js";
17
- const T = [u], B = ({ items: a, label: n, className: d }) => {
18
- const { activeIndex: l, handleSlideTo: t, handleSlideChange: h, onSwiperInit: S, handleSwiperResize: g, handleUserInteraction: i } = y(5e3), m = f(
19
- (o) => {
20
- i(), t(o);
11
+ import { GalleryPagination as y } from "../GalleryPagination/GalleryPagination.es.js";
12
+ import i from "../../components/AdvancedGallery/advancedGallery.module.css";
13
+ import { Label as P } from "../Label/Label.es.js";
14
+ import { VideoSlide as k } from "./components/VideoSlide/VideoSlide.es.js";
15
+ import { ImageGalleryPagination as C } from "./components/ImageGalleryPagination/ImageGalleryPagination.es.js";
16
+ const I = [f], U = ({ items: a, label: n, className: d }) => {
17
+ const { activeIndex: l, handleSlideTo: t, handleSlideChange: p, onSwiperInit: h, handleSwiperResize: S, handleUserInteraction: o } = v(5e3), m = g(
18
+ (r) => {
19
+ o(), t(r);
21
20
  },
22
- [i, t]
21
+ [o, t]
23
22
  );
24
- return /* @__PURE__ */ c("div", { className: N(r.root, d), children: [
25
- n && /* @__PURE__ */ e("div", { className: r.labelWrap, children: /* @__PURE__ */ e(k, { color: "black", size: "sm", children: n }) }),
23
+ return /* @__PURE__ */ s("div", { className: N(i.root, d), children: [
24
+ n && /* @__PURE__ */ e("div", { className: i.labelWrap, children: /* @__PURE__ */ e(P, { color: "black", size: "sm", children: n }) }),
26
25
  /* @__PURE__ */ e(
27
- w,
26
+ u,
28
27
  {
29
- onSwiper: S,
30
- onResize: g,
31
- onSlideChange: h,
32
- onTouchStart: i,
33
- onTouchEnd: i,
34
- modules: T,
28
+ onSwiper: h,
29
+ onResize: S,
30
+ onSlideChange: p,
31
+ onTouchStart: o,
32
+ onTouchEnd: o,
33
+ modules: I,
35
34
  spaceBetween: 0,
36
35
  slidesPerView: 1,
37
- className: r.swiper,
38
- children: a.map((o, s) => /* @__PURE__ */ c(v, { children: [
39
- o.mediaType === "image" && /* @__PURE__ */ e("div", { className: r.imageWrapper, children: /* @__PURE__ */ e(
36
+ className: i.swiper,
37
+ children: a.map((r, c) => /* @__PURE__ */ s(w, { children: [
38
+ r.mediaType === "image" && /* @__PURE__ */ e("div", { className: i.imageWrapper, children: /* @__PURE__ */ e(
40
39
  "img",
41
40
  {
42
- src: o.url,
41
+ src: r.url,
43
42
  alt: "product image",
44
- className: r.image,
45
- onClick: i
43
+ className: i.image,
44
+ onClick: o
46
45
  }
47
46
  ) }),
48
- o.mediaType === "video" && /* @__PURE__ */ e(C, { item: o, isActive: l === s, onClick: i })
49
- ] }, s))
47
+ r.mediaType === "video" && /* @__PURE__ */ e(k, { item: r, isActive: l === c, onClick: o })
48
+ ] }, c))
50
49
  }
51
50
  ),
52
51
  /* @__PURE__ */ e(
53
- I,
52
+ C,
54
53
  {
55
54
  items: a,
56
55
  activeIndex: l,
57
- className: p.hideOnMobile,
56
+ className: i.hideOnMobile,
58
57
  onSelect: m
59
58
  }
60
59
  ),
61
60
  /* @__PURE__ */ e(
62
- P,
61
+ y,
63
62
  {
64
63
  count: a.length,
65
64
  activeIndex: l,
66
- className: p.hideOnDesktop,
65
+ className: i.hideOnDesktop,
67
66
  onSelect: m
68
67
  }
69
68
  )
70
69
  ] });
71
70
  };
72
71
  export {
73
- B as AdvancedGallery
72
+ U as AdvancedGallery
74
73
  };
@@ -62,3 +62,18 @@
62
62
  aspect-ratio: 1 / 1;
63
63
  }
64
64
  }
65
+
66
+ .hideOnDesktop {
67
+ display: none;
68
+ }
69
+ .hideOnMobile {
70
+ display: inherit;
71
+ }
72
+ @media (width <= 768px) {
73
+ .hideOnDesktop {
74
+ display: inherit;
75
+ }
76
+ .hideOnMobile {
77
+ display: none;
78
+ }
79
+ }
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),q=require("swiper/modules"),u=require("swiper/react"),x=require("../../utils/useSwiper/useSwiper.cjs.js"),w=require("../../utils/cn/cn.cjs.js");;/* empty css */;/* empty css */;/* empty css */const i=require("../../src/components/ImageGallery/imageGallery.module.css"),d=require("../../src/styles/utils.module.css"),P=require("../Label/Label.cjs.js"),N=require("./components/ImageGalleryPagination/ImageGalleryPagination.cjs.js"),m=require("../GalleryPagination/GalleryPagination.cjs.js"),_=[q.Navigation],b=({images:a,label:c,className:h,type:r="primary"})=>{const{activeIndex:s,handleSlideTo:o,handleSlideChange:g,onSwiperInit:S,handleSwiperResize:p,handleUserInteraction:n}=x.useSwiperWithAutoPlay(3e3),l=j.useCallback(t=>{n(),o(t)},[n,o]);return e.jsxs("div",{className:w.cn(i.root,h,{[i.primary]:r==="primary",[i.secondary]:r==="secondary"}),children:[c&&e.jsx("div",{className:i.labelWrap,children:e.jsx(P.Label,{color:"black",size:"sm",children:c})}),e.jsx(u.Swiper,{onSwiper:S,onResize:p,onSlideChange:g,onTouchStart:n,onTouchEnd:n,modules:_,spaceBetween:0,slidesPerView:1,className:i.swiper,children:a.map((t,y)=>e.jsx(u.SwiperSlide,{children:e.jsx("div",{className:i.imageContainer,children:e.jsx("div",{className:i.imageWrapper,children:e.jsx("img",{src:t,alt:"product image",width:r==="primary"?600:492,height:r==="primary"?600:389,className:i.image,onClick:n})})})},y))}),r==="primary"?e.jsxs(e.Fragment,{children:[e.jsx(N.ImageGalleryPagination,{images:a,className:d.hideOnMobile,activeIndex:s,onSelect:l}),e.jsx(m.GalleryPagination,{count:a.length,activeIndex:s,className:d.hideOnDesktop,onSelect:l})]}):e.jsx(m.GalleryPagination,{count:a.length,activeIndex:s,onSelect:l})]})};exports.ImageGallery=b;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("react"),j=require("swiper/modules"),d=require("swiper/react"),x=require("../../utils/useSwiper/useSwiper.cjs.js"),q=require("../../utils/cn/cn.cjs.js");;/* empty css */;/* empty css */;/* empty css */const i=require("../../src/components/ImageGallery/imageGallery.module.css"),w=require("../Label/Label.cjs.js"),P=require("./components/ImageGalleryPagination/ImageGalleryPagination.cjs.js"),u=require("../GalleryPagination/GalleryPagination.cjs.js"),N=[j.Navigation],_=({images:a,label:o,className:m,type:r="primary"})=>{const{activeIndex:s,handleSlideTo:t,handleSlideChange:h,onSwiperInit:g,handleSwiperResize:p,handleUserInteraction:n}=x.useSwiperWithAutoPlay(3e3),l=y.useCallback(c=>{n(),t(c)},[n,t]);return e.jsxs("div",{className:q.cn(i.root,m,{[i.primary]:r==="primary",[i.secondary]:r==="secondary"}),children:[o&&e.jsx("div",{className:i.labelWrap,children:e.jsx(w.Label,{color:"black",size:"sm",children:o})}),e.jsx(d.Swiper,{onSwiper:g,onResize:p,onSlideChange:h,onTouchStart:n,onTouchEnd:n,modules:N,spaceBetween:0,slidesPerView:1,className:i.swiper,children:a.map((c,S)=>e.jsx(d.SwiperSlide,{children:e.jsx("div",{className:i.imageContainer,children:e.jsx("div",{className:i.imageWrapper,children:e.jsx("img",{src:c,alt:"product image",width:r==="primary"?600:492,height:r==="primary"?600:389,className:i.image,onClick:n})})})},S))}),r==="primary"?e.jsxs(e.Fragment,{children:[e.jsx(P.ImageGalleryPagination,{images:a,className:i.hideOnMobile,activeIndex:s,onSelect:l}),e.jsx(u.GalleryPagination,{count:a.length,activeIndex:s,className:i.hideOnDesktop,onSelect:l})]}):e.jsx(u.GalleryPagination,{count:a.length,activeIndex:s,onSelect:l})]})};exports.ImageGallery=_;
@@ -1,47 +1,46 @@
1
1
  "use client";
2
- import { jsxs as s, jsx as e, Fragment as w } from "react/jsx-runtime";
3
- import { useCallback as y } from "react";
4
- import { Navigation as N } from "swiper/modules";
5
- import { Swiper as v, SwiperSlide as I } from "swiper/react";
6
- import { useSwiperWithAutoPlay as P } from "../../utils/useSwiper/useSwiper.es.js";
7
- import { cn as C } from "../../utils/cn/cn.es.js";
2
+ import { jsxs as s, jsx as e, Fragment as f } from "react/jsx-runtime";
3
+ import { useCallback as w } from "react";
4
+ import { Navigation as y } from "swiper/modules";
5
+ import { Swiper as N, SwiperSlide as v } from "swiper/react";
6
+ import { useSwiperWithAutoPlay as I } from "../../utils/useSwiper/useSwiper.es.js";
7
+ import { cn as P } from "../../utils/cn/cn.es.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import r from "../../components/ImageGallery/imageGallery.module.css";
12
- import d from "../../styles/utils.module.css";
13
- import { Label as b } from "../Label/Label.es.js";
14
- import { ImageGalleryPagination as k } from "./components/ImageGalleryPagination/ImageGalleryPagination.es.js";
15
- import { GalleryPagination as p } from "../GalleryPagination/GalleryPagination.es.js";
16
- const x = [N], F = ({ images: a, label: m, className: h, type: i = "primary" }) => {
17
- const { activeIndex: n, handleSlideTo: c, handleSlideChange: S, onSwiperInit: g, handleSwiperResize: u, handleUserInteraction: o } = P(3e3), l = y(
12
+ import { Label as C } from "../Label/Label.es.js";
13
+ import { ImageGalleryPagination as b } from "./components/ImageGalleryPagination/ImageGalleryPagination.es.js";
14
+ import { GalleryPagination as d } from "../GalleryPagination/GalleryPagination.es.js";
15
+ const k = [y], A = ({ images: o, label: m, className: p, type: i = "primary" }) => {
16
+ const { activeIndex: n, handleSlideTo: c, handleSlideChange: h, onSwiperInit: S, handleSwiperResize: g, handleUserInteraction: a } = I(3e3), l = w(
18
17
  (t) => {
19
- o(), c(t);
18
+ a(), c(t);
20
19
  },
21
- [o, c]
20
+ [a, c]
22
21
  );
23
22
  return /* @__PURE__ */ s(
24
23
  "div",
25
24
  {
26
- className: C(r.root, h, {
25
+ className: P(r.root, p, {
27
26
  [r.primary]: i === "primary",
28
27
  [r.secondary]: i === "secondary"
29
28
  }),
30
29
  children: [
31
- m && /* @__PURE__ */ e("div", { className: r.labelWrap, children: /* @__PURE__ */ e(b, { color: "black", size: "sm", children: m }) }),
30
+ m && /* @__PURE__ */ e("div", { className: r.labelWrap, children: /* @__PURE__ */ e(C, { color: "black", size: "sm", children: m }) }),
32
31
  /* @__PURE__ */ e(
33
- v,
32
+ N,
34
33
  {
35
- onSwiper: g,
36
- onResize: u,
37
- onSlideChange: S,
38
- onTouchStart: o,
39
- onTouchEnd: o,
40
- modules: x,
34
+ onSwiper: S,
35
+ onResize: g,
36
+ onSlideChange: h,
37
+ onTouchStart: a,
38
+ onTouchEnd: a,
39
+ modules: k,
41
40
  spaceBetween: 0,
42
41
  slidesPerView: 1,
43
42
  className: r.swiper,
44
- children: a.map((t, f) => /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e("div", { className: r.imageContainer, children: /* @__PURE__ */ e("div", { className: r.imageWrapper, children: /* @__PURE__ */ e(
43
+ children: o.map((t, u) => /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e("div", { className: r.imageContainer, children: /* @__PURE__ */ e("div", { className: r.imageWrapper, children: /* @__PURE__ */ e(
45
44
  "img",
46
45
  {
47
46
  src: t,
@@ -49,35 +48,35 @@ const x = [N], F = ({ images: a, label: m, className: h, type: i = "primary" })
49
48
  width: i === "primary" ? 600 : 492,
50
49
  height: i === "primary" ? 600 : 389,
51
50
  className: r.image,
52
- onClick: o
51
+ onClick: a
53
52
  }
54
- ) }) }) }, f))
53
+ ) }) }) }, u))
55
54
  }
56
55
  ),
57
- i === "primary" ? /* @__PURE__ */ s(w, { children: [
56
+ i === "primary" ? /* @__PURE__ */ s(f, { children: [
58
57
  /* @__PURE__ */ e(
59
- k,
58
+ b,
60
59
  {
61
- images: a,
62
- className: d.hideOnMobile,
60
+ images: o,
61
+ className: r.hideOnMobile,
63
62
  activeIndex: n,
64
63
  onSelect: l
65
64
  }
66
65
  ),
67
66
  /* @__PURE__ */ e(
68
- p,
67
+ d,
69
68
  {
70
- count: a.length,
69
+ count: o.length,
71
70
  activeIndex: n,
72
- className: d.hideOnDesktop,
71
+ className: r.hideOnDesktop,
73
72
  onSelect: l
74
73
  }
75
74
  )
76
- ] }) : /* @__PURE__ */ e(p, { count: a.length, activeIndex: n, onSelect: l })
75
+ ] }) : /* @__PURE__ */ e(d, { count: o.length, activeIndex: n, onSelect: l })
77
76
  ]
78
77
  }
79
78
  );
80
79
  };
81
80
  export {
82
- F as ImageGallery
81
+ A as ImageGallery
83
82
  };
@@ -77,3 +77,18 @@
77
77
  aspect-ratio: 1 / 1;
78
78
  }
79
79
  }
80
+
81
+ .hideOnDesktop {
82
+ display: none;
83
+ }
84
+ .hideOnMobile {
85
+ display: inherit;
86
+ }
87
+ @media (width <= 768px) {
88
+ .hideOnDesktop {
89
+ display: inherit;
90
+ }
91
+ .hideOnMobile {
92
+ display: none;
93
+ }
94
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenpatient-org/healthspan-marketing-ui",
3
- "version": "0.2.65",
3
+ "version": "0.2.66",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -1,14 +0,0 @@
1
- .hideOnDesktop {
2
- display: none;
3
- }
4
- .hideOnMobile {
5
- display: inherit;
6
- }
7
- @media (width <= 768px) {
8
- .hideOnDesktop {
9
- display: inherit;
10
- }
11
- .hideOnMobile {
12
- display: none;
13
- }
14
- }