@zenpatient-org/healthspan-marketing-ui 0.2.45 → 0.2.46

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("swiper/modules"),u=require("swiper/react"),h=require("react"),q=require("../../utils/useSwiper/useSwiper.cjs.js"),j=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"),y=require("./components/ImageGalleryPagination/ImageGalleryPagination.cjs.js"),x=require("../GalleryPagination/GalleryPagination.cjs.js"),P=[m.Navigation],_=({images:r,label:l,className:d,pagination:I="plain"})=>{const{activeIndex:s,handleSlideTo:t,handleSlideChange:p,onSwiperInit:S,handleSwiperResize:g,handleUserInteraction:n}=q.useSwiperWithAutoPlay(3e3),o=h.useCallback(a=>{n(),t(a)},[n,t]);return e.jsxs("div",{className:j.cn(i.root,d),children:[l&&e.jsx("div",{className:i.labelWrap,children:e.jsx(w.Label,{color:"black",size:"sm",children:l})}),e.jsx(u.Swiper,{onSwiper:S,onResize:g,onSlideChange:p,onTouchStart:n,onTouchEnd:n,modules:P,spaceBetween:0,slidesPerView:1,className:i.swiper,children:r.map((a,c)=>e.jsx(u.SwiperSlide,{children:e.jsx("div",{className:i.imageWrapper,children:e.jsx("img",{src:a,alt:"product image",className:i.image,onClick:n},c)})},c))}),e.jsx(y.ImageGalleryPagination,{images:r,activeIndex:s,onSelect:o}),e.jsx(x.GalleryPagination,{count:r.length,activeIndex:s,onSelect:o})]})};exports.ImageGallery=_;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),S=require("swiper/modules"),u=require("swiper/react"),h=require("react"),q=require("../../utils/useSwiper/useSwiper.cjs.js"),j=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"),x=require("./components/ImageGalleryPagination/ImageGalleryPagination.cjs.js"),y=require("../GalleryPagination/GalleryPagination.cjs.js"),P=[S.Navigation],_=({images:a,label:l,className:d,pagination:I="plain"})=>{const{activeIndex:s,handleSlideTo:t,handleSlideChange:m,onSwiperInit:g,handleSwiperResize:p,handleUserInteraction:n}=q.useSwiperWithAutoPlay(3e3),o=h.useCallback(r=>{n(),t(r)},[n,t]);return e.jsxs("div",{className:j.cn(i.root,d),children:[l&&e.jsx("div",{className:i.labelWrap,children:e.jsx(w.Label,{color:"black",size:"sm",children:l})}),e.jsx(u.Swiper,{onSwiper:g,onResize:p,onSlideChange:m,onTouchStart:n,onTouchEnd:n,modules:P,spaceBetween:0,slidesPerView:1,className:i.swiper,children:a.map((r,c)=>e.jsx(u.SwiperSlide,{children:e.jsx("div",{className:i.imageContainer,children:e.jsx("div",{className:i.imageWrapper,children:e.jsx("img",{src:r,alt:"product image",className:i.image,onClick:n},c)})})},c))}),e.jsx(x.ImageGalleryPagination,{images:a,activeIndex:s,onSelect:o}),e.jsx(y.GalleryPagination,{count:a.length,activeIndex:s,onSelect:o})]})};exports.ImageGallery=_;
@@ -3,49 +3,49 @@ import { jsxs as S, jsx as e } from "react/jsx-runtime";
3
3
  import { Navigation as g } from "swiper/modules";
4
4
  import { Swiper as f, SwiperSlide as u } from "swiper/react";
5
5
  import { useCallback as w } from "react";
6
- import { useSwiperWithAutoPlay as I } from "../../utils/useSwiper/useSwiper.es.js";
7
- import { cn as N } from "../../utils/cn/cn.es.js";
6
+ import { useSwiperWithAutoPlay as N } from "../../utils/useSwiper/useSwiper.es.js";
7
+ import { cn as v } from "../../utils/cn/cn.es.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
- import o from "../../components/ImageGallery/imageGallery.module.css";
12
- import { Label as P } from "../Label/Label.es.js";
13
- import { ImageGalleryPagination as v } from "./components/ImageGalleryPagination/ImageGalleryPagination.es.js";
11
+ import i from "../../components/ImageGallery/imageGallery.module.css";
12
+ import { Label as I } from "../Label/Label.es.js";
13
+ import { ImageGalleryPagination as P } from "./components/ImageGalleryPagination/ImageGalleryPagination.es.js";
14
14
  import { GalleryPagination as y } from "../GalleryPagination/GalleryPagination.es.js";
15
15
  const C = [g], D = ({ images: r, label: n, className: s, pagination: W = "plain" }) => {
16
- const { activeIndex: l, handleSlideTo: t, handleSlideChange: p, onSwiperInit: d, handleSwiperResize: h, handleUserInteraction: i } = I(3e3), m = w(
16
+ const { activeIndex: l, handleSlideTo: t, handleSlideChange: p, onSwiperInit: d, handleSwiperResize: h, handleUserInteraction: o } = N(3e3), m = w(
17
17
  (a) => {
18
- i(), t(a);
18
+ o(), t(a);
19
19
  },
20
- [i, t]
20
+ [o, t]
21
21
  );
22
- return /* @__PURE__ */ S("div", { className: N(o.root, s), children: [
23
- n && /* @__PURE__ */ e("div", { className: o.labelWrap, children: /* @__PURE__ */ e(P, { color: "black", size: "sm", children: n }) }),
22
+ return /* @__PURE__ */ S("div", { className: v(i.root, s), children: [
23
+ n && /* @__PURE__ */ e("div", { className: i.labelWrap, children: /* @__PURE__ */ e(I, { color: "black", size: "sm", children: n }) }),
24
24
  /* @__PURE__ */ e(
25
25
  f,
26
26
  {
27
27
  onSwiper: d,
28
28
  onResize: h,
29
29
  onSlideChange: p,
30
- onTouchStart: i,
31
- onTouchEnd: i,
30
+ onTouchStart: o,
31
+ onTouchEnd: o,
32
32
  modules: C,
33
33
  spaceBetween: 0,
34
34
  slidesPerView: 1,
35
- className: o.swiper,
36
- children: r.map((a, c) => /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e("div", { className: o.imageWrapper, children: /* @__PURE__ */ e(
35
+ className: i.swiper,
36
+ children: r.map((a, c) => /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e("div", { className: i.imageContainer, children: /* @__PURE__ */ e("div", { className: i.imageWrapper, children: /* @__PURE__ */ e(
37
37
  "img",
38
38
  {
39
39
  src: a,
40
40
  alt: "product image",
41
- className: o.image,
42
- onClick: i
41
+ className: i.image,
42
+ onClick: o
43
43
  },
44
44
  c
45
- ) }) }, c))
45
+ ) }) }) }, c))
46
46
  }
47
47
  ),
48
- /* @__PURE__ */ e(v, { images: r, activeIndex: l, onSelect: m }),
48
+ /* @__PURE__ */ e(P, { images: r, activeIndex: l, onSelect: m }),
49
49
  /* @__PURE__ */ e(y, { count: r.length, activeIndex: l, onSelect: m })
50
50
  ] });
51
51
  };
@@ -1,31 +1,34 @@
1
1
  .root {
2
2
  position: relative;
3
- padding: 24px 0;
3
+ padding: 18px 0 13px 0;
4
4
  display: flex;
5
5
  max-width: 100%;
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  justify-content: flex-start;
9
- overflow: hidden;
10
9
  border-radius: var(--border-radius-md);
11
10
  background-color: var(--color-bg-neutral-light);
12
- gap: 24px;
13
11
  }
14
12
 
15
13
  .labelWrap {
16
14
  width: 100%;
17
15
  display: flex;
18
16
  align-items: flex-start;
19
- padding: 0 24px;
17
+ padding: 0 18px;
20
18
  }
21
19
 
22
20
  .swiper {
23
21
  width: 100%;
22
+ max-width: 566px;
23
+ }
24
+
25
+ .imageContainer {
26
+ padding: 18px 0 14px 0;
24
27
  }
25
28
 
26
29
  .imageWrapper {
27
30
  width: 100%;
28
- height: 480px;
31
+ aspect-ratio: 1;
29
32
  }
30
33
 
31
34
  .image {
@@ -34,16 +37,9 @@
34
37
  object-fit: contain;
35
38
  }
36
39
 
37
- @media (width <= 1024px) {
38
- .imageWrapper {
39
- height: 480px;
40
- }
41
- }
42
-
43
40
  @media (width <= 768px) {
44
41
  .root {
45
42
  padding: 16px 0;
46
- gap: 16px;
47
43
  }
48
44
 
49
45
  .labelWrap {
@@ -12,8 +12,8 @@
12
12
  display: flex;
13
13
  flex-direction: column;
14
14
  gap: 3rem;
15
- overflow: hidden;
16
15
  align-items: center;
16
+ min-width: 0;
17
17
  }
18
18
 
19
19
  .rightColumn {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenpatient-org/healthspan-marketing-ui",
3
- "version": "0.2.45",
3
+ "version": "0.2.46",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",