@zenpatient-org/healthspan-marketing-ui 0.2.63 → 0.2.65
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 +39 -22
- package/dist/components/AdvancedGallery/components/ImageGalleryPagination/ImageGalleryPagination.cjs.js +1 -1
- package/dist/components/AdvancedGallery/components/ImageGalleryPagination/ImageGalleryPagination.d.ts +1 -0
- package/dist/components/AdvancedGallery/components/ImageGalleryPagination/ImageGalleryPagination.es.js +14 -9
- package/dist/components/GalleryPagination/GalleryPagination.cjs.js +1 -1
- package/dist/components/GalleryPagination/GalleryPagination.d.ts +2 -1
- package/dist/components/GalleryPagination/GalleryPagination.es.js +3 -3
- package/dist/components/GalleryPagination/galleryPagination.module.css +32 -40
- package/dist/components/ImageGallery/ImageGallery.cjs.js +1 -1
- package/dist/components/ImageGallery/ImageGallery.d.ts +2 -2
- package/dist/components/ImageGallery/ImageGallery.es.js +73 -44
- package/dist/components/ImageGallery/components/ImageGalleryPagination/ImageGalleryPagination.cjs.js +1 -1
- package/dist/components/ImageGallery/components/ImageGalleryPagination/ImageGalleryPagination.d.ts +1 -0
- package/dist/components/ImageGallery/components/ImageGalleryPagination/ImageGalleryPagination.es.js +10 -5
- package/dist/components/ImageGallery/components/ImageGalleryPagination/imageGalleryPagination.module.css +0 -3
- package/dist/components/ImageGallery/imageGallery.module.css +24 -5
- package/dist/modules/ImageWithText/ImageWithText.cjs.js +1 -1
- package/dist/modules/ImageWithText/ImageWithText.es.js +43 -34
- package/dist/styles/utils.module.css +14 -0
- 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"),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,40 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { Navigation as
|
|
5
|
-
import { Swiper as
|
|
6
|
-
import { useSwiperWithAutoPlay as
|
|
7
|
-
import { cn as
|
|
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";
|
|
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
|
|
11
|
+
import { GalleryPagination as P } from "../GalleryPagination/GalleryPagination.es.js";
|
|
12
|
+
import p from "../../styles/utils.module.css";
|
|
12
13
|
import r from "../../components/AdvancedGallery/advancedGallery.module.css";
|
|
13
|
-
import { Label as
|
|
14
|
+
import { Label as k } from "../Label/Label.es.js";
|
|
14
15
|
import { VideoSlide as C } from "./components/VideoSlide/VideoSlide.es.js";
|
|
15
16
|
import { ImageGalleryPagination as I } from "./components/ImageGalleryPagination/ImageGalleryPagination.es.js";
|
|
16
|
-
const T = [
|
|
17
|
-
const { activeIndex: l, handleSlideTo: t, handleSlideChange:
|
|
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(
|
|
18
19
|
(o) => {
|
|
19
20
|
i(), t(o);
|
|
20
21
|
},
|
|
21
22
|
[i, t]
|
|
22
23
|
);
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
n && /* @__PURE__ */ e("div", { className: r.labelWrap, children: /* @__PURE__ */ e(
|
|
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 }) }),
|
|
25
26
|
/* @__PURE__ */ e(
|
|
26
|
-
|
|
27
|
+
w,
|
|
27
28
|
{
|
|
28
|
-
onSwiper:
|
|
29
|
-
onResize:
|
|
30
|
-
onSlideChange:
|
|
29
|
+
onSwiper: S,
|
|
30
|
+
onResize: g,
|
|
31
|
+
onSlideChange: h,
|
|
31
32
|
onTouchStart: i,
|
|
32
33
|
onTouchEnd: i,
|
|
33
34
|
modules: T,
|
|
34
35
|
spaceBetween: 0,
|
|
35
36
|
slidesPerView: 1,
|
|
36
37
|
className: r.swiper,
|
|
37
|
-
children: a.map((o,
|
|
38
|
+
children: a.map((o, s) => /* @__PURE__ */ c(v, { children: [
|
|
38
39
|
o.mediaType === "image" && /* @__PURE__ */ e("div", { className: r.imageWrapper, children: /* @__PURE__ */ e(
|
|
39
40
|
"img",
|
|
40
41
|
{
|
|
@@ -44,14 +45,30 @@ const T = [f], D = ({ items: a, label: n, className: p }) => {
|
|
|
44
45
|
onClick: i
|
|
45
46
|
}
|
|
46
47
|
) }),
|
|
47
|
-
o.mediaType === "video" && /* @__PURE__ */ e(C, { item: o, isActive: l ===
|
|
48
|
-
] },
|
|
48
|
+
o.mediaType === "video" && /* @__PURE__ */ e(C, { item: o, isActive: l === s, onClick: i })
|
|
49
|
+
] }, s))
|
|
49
50
|
}
|
|
50
51
|
),
|
|
51
|
-
/* @__PURE__ */ e(
|
|
52
|
-
|
|
52
|
+
/* @__PURE__ */ e(
|
|
53
|
+
I,
|
|
54
|
+
{
|
|
55
|
+
items: a,
|
|
56
|
+
activeIndex: l,
|
|
57
|
+
className: p.hideOnMobile,
|
|
58
|
+
onSelect: m
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
/* @__PURE__ */ e(
|
|
62
|
+
P,
|
|
63
|
+
{
|
|
64
|
+
count: a.length,
|
|
65
|
+
activeIndex: l,
|
|
66
|
+
className: p.hideOnDesktop,
|
|
67
|
+
onSelect: m
|
|
68
|
+
}
|
|
69
|
+
)
|
|
53
70
|
] });
|
|
54
71
|
};
|
|
55
72
|
export {
|
|
56
|
-
|
|
73
|
+
B as AdvancedGallery
|
|
57
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),o=require("../../../../utils/cn/cn.cjs.js"),e=require("../../../../src/components/AdvancedGallery/components/ImageGalleryPagination/imageGalleryPagination.module.css"),r=require("../../../Icon/Icon.cjs.js"),m=require("../../../Icon/constants.cjs.js"),u=({items:s,activeIndex:t,className:i,onSelect:l})=>a.jsx("div",{className:o.cn(e.root,i),children:s.map((n,c)=>a.jsxs("button",{type:"button",className:o.cn(e.thumbnailButton,{[e.active]:c===t}),onClick:()=>l(c),children:[a.jsx("img",{src:n.mediaType==="image"?n.url:n.preview,alt:`thumbnail ${c+1}`,className:e.thumbnailImage}),n.mediaType==="video"&&n.videoType==="complex"&&a.jsx("div",{className:e.customPlayButton,children:a.jsx(r.Icon,{className:e.icon,name:m.EIconName.ALT_PLAY})})]},c))});exports.ImageGalleryPagination=u;
|
|
@@ -3,6 +3,7 @@ import { TAdvancedGalleryView } from '../../types';
|
|
|
3
3
|
|
|
4
4
|
type ImageGalleryPaginationProps = TAdvancedGalleryView & {
|
|
5
5
|
activeIndex: number;
|
|
6
|
+
className?: string;
|
|
6
7
|
onSelect: (index: number) => void;
|
|
7
8
|
};
|
|
8
9
|
export declare const ImageGalleryPagination: React.FC<ImageGalleryPaginationProps>;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { jsx as m, jsxs as
|
|
2
|
-
import { cn as
|
|
1
|
+
import { jsx as m, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { cn as t } from "../../../../utils/cn/cn.es.js";
|
|
3
3
|
import a from "../../../../components/AdvancedGallery/components/ImageGalleryPagination/imageGalleryPagination.module.css";
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { EIconName as
|
|
6
|
-
const
|
|
4
|
+
import { Icon as s } from "../../../Icon/Icon.es.js";
|
|
5
|
+
import { EIconName as p } from "../../../Icon/constants.es.js";
|
|
6
|
+
const N = ({
|
|
7
|
+
items: r,
|
|
8
|
+
activeIndex: n,
|
|
9
|
+
className: l,
|
|
10
|
+
onSelect: c
|
|
11
|
+
}) => /* @__PURE__ */ m("div", { className: t(a.root, l), children: r.map((o, e) => /* @__PURE__ */ i(
|
|
7
12
|
"button",
|
|
8
13
|
{
|
|
9
14
|
type: "button",
|
|
10
|
-
className:
|
|
11
|
-
onClick: () =>
|
|
15
|
+
className: t(a.thumbnailButton, { [a.active]: e === n }),
|
|
16
|
+
onClick: () => c(e),
|
|
12
17
|
children: [
|
|
13
18
|
/* @__PURE__ */ m(
|
|
14
19
|
"img",
|
|
@@ -18,11 +23,11 @@ const v = ({ items: t, activeIndex: r, onSelect: n }) => /* @__PURE__ */ m("div"
|
|
|
18
23
|
className: a.thumbnailImage
|
|
19
24
|
}
|
|
20
25
|
),
|
|
21
|
-
o.mediaType === "video" && o.videoType === "complex" && /* @__PURE__ */ m("div", { className: a.customPlayButton, children: /* @__PURE__ */ m(
|
|
26
|
+
o.mediaType === "video" && o.videoType === "complex" && /* @__PURE__ */ m("div", { className: a.customPlayButton, children: /* @__PURE__ */ m(s, { className: a.icon, name: p.ALT_PLAY }) })
|
|
22
27
|
]
|
|
23
28
|
},
|
|
24
29
|
e
|
|
25
30
|
)) });
|
|
26
31
|
export {
|
|
27
|
-
|
|
32
|
+
N as ImageGalleryPagination
|
|
28
33
|
};
|
|
@@ -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 t=require("react/jsx-runtime"),s=require("../../utils/cn/cn.cjs.js"),e=require("../../src/components/GalleryPagination/galleryPagination.module.css"),c=({count:i,activeIndex:a,className:l,onSelect:n})=>t.jsx("div",{className:s.cn(e.root,l),children:Array.from({length:i}).map((o,r)=>t.jsx("button",{type:"button",className:e.lineWrap,onClick:()=>n==null?void 0:n(r),children:t.jsx("div",{className:s.cn(e.line,r===a&&e.active)})},r))});exports.GalleryPagination=c;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
type GalleryPaginationProps = {
|
|
2
2
|
count: number;
|
|
3
3
|
activeIndex: number;
|
|
4
|
+
className?: string;
|
|
4
5
|
onSelect: (index: number) => void;
|
|
5
6
|
};
|
|
6
|
-
export declare const GalleryPagination: ({ count, activeIndex, onSelect }: GalleryPaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const GalleryPagination: ({ count, activeIndex, className, onSelect }: GalleryPaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as m } from "../../utils/cn/cn.es.js";
|
|
4
4
|
import r from "../../components/GalleryPagination/galleryPagination.module.css";
|
|
5
|
-
const
|
|
5
|
+
const f = ({ count: o, activeIndex: s, className: n, onSelect: a }) => /* @__PURE__ */ i("div", { className: m(r.root, n), children: Array.from({ length: o }).map((l, t) => /* @__PURE__ */ i("button", { type: "button", className: r.lineWrap, onClick: () => a == null ? void 0 : a(t), children: /* @__PURE__ */ i("div", { className: m(r.line, t === s && r.active) }) }, t)) });
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
f as GalleryPagination
|
|
8
8
|
};
|
|
@@ -1,46 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.lineWrap {
|
|
13
|
-
width: 32px;
|
|
14
|
-
height: 32px;
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
padding: 0;
|
|
20
|
-
background: none;
|
|
21
|
-
border: none;
|
|
22
|
-
}
|
|
1
|
+
.root {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 8px;
|
|
4
|
+
width: 100%;
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
flex-wrap: nowrap;
|
|
9
|
+
}
|
|
23
10
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
.lineWrap {
|
|
12
|
+
width: 32px;
|
|
13
|
+
height: 32px;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
padding: 0;
|
|
19
|
+
background: none;
|
|
20
|
+
border: none;
|
|
21
|
+
}
|
|
31
22
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
.line {
|
|
24
|
+
height: var(--border-width-sm);
|
|
25
|
+
width: 100%;
|
|
26
|
+
background-color: var(--color-bg-fill-brand-disabled);
|
|
27
|
+
border-radius: var(--border-radius-xs);
|
|
28
|
+
transition: background-color 0.3s, height 0.3s, opacity 0.3s;
|
|
29
|
+
}
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
background-color: var(--color-bg-fill-primary);
|
|
39
|
-
}
|
|
31
|
+
.lineWrap:hover > .line:not(.active) {
|
|
32
|
+
opacity: 0.8;
|
|
40
33
|
}
|
|
41
34
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
35
|
+
.active {
|
|
36
|
+
height: var(--border-width-md);
|
|
37
|
+
background-color: var(--color-bg-fill-primary);
|
|
46
38
|
}
|
|
@@ -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"),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;
|
|
@@ -3,6 +3,6 @@ export type ImageGalleryProps = {
|
|
|
3
3
|
images: Array<string>;
|
|
4
4
|
label?: string;
|
|
5
5
|
className?: string;
|
|
6
|
-
|
|
6
|
+
type?: 'primary' | 'secondary';
|
|
7
7
|
};
|
|
8
|
-
export declare const ImageGallery: ({ images, label, className,
|
|
8
|
+
export declare const ImageGallery: ({ images, label, className, type }: ImageGalleryProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,54 +1,83 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useSwiperWithAutoPlay as
|
|
7
|
-
import { cn as
|
|
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";
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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(
|
|
18
|
+
(t) => {
|
|
19
|
+
o(), c(t);
|
|
19
20
|
},
|
|
20
|
-
[o,
|
|
21
|
+
[o, c]
|
|
21
22
|
);
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
spaceBetween: 0,
|
|
34
|
-
slidesPerView: 1,
|
|
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
|
-
"img",
|
|
23
|
+
return /* @__PURE__ */ s(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: C(r.root, h, {
|
|
27
|
+
[r.primary]: i === "primary",
|
|
28
|
+
[r.secondary]: i === "secondary"
|
|
29
|
+
}),
|
|
30
|
+
children: [
|
|
31
|
+
m && /* @__PURE__ */ e("div", { className: r.labelWrap, children: /* @__PURE__ */ e(b, { color: "black", size: "sm", children: m }) }),
|
|
32
|
+
/* @__PURE__ */ e(
|
|
33
|
+
v,
|
|
38
34
|
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
onSwiper: g,
|
|
36
|
+
onResize: u,
|
|
37
|
+
onSlideChange: S,
|
|
38
|
+
onTouchStart: o,
|
|
39
|
+
onTouchEnd: o,
|
|
40
|
+
modules: x,
|
|
41
|
+
spaceBetween: 0,
|
|
42
|
+
slidesPerView: 1,
|
|
43
|
+
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(
|
|
45
|
+
"img",
|
|
46
|
+
{
|
|
47
|
+
src: t,
|
|
48
|
+
alt: "product image",
|
|
49
|
+
width: i === "primary" ? 600 : 492,
|
|
50
|
+
height: i === "primary" ? 600 : 389,
|
|
51
|
+
className: r.image,
|
|
52
|
+
onClick: o
|
|
53
|
+
}
|
|
54
|
+
) }) }) }, f))
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
i === "primary" ? /* @__PURE__ */ s(w, { children: [
|
|
58
|
+
/* @__PURE__ */ e(
|
|
59
|
+
k,
|
|
60
|
+
{
|
|
61
|
+
images: a,
|
|
62
|
+
className: d.hideOnMobile,
|
|
63
|
+
activeIndex: n,
|
|
64
|
+
onSelect: l
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ e(
|
|
68
|
+
p,
|
|
69
|
+
{
|
|
70
|
+
count: a.length,
|
|
71
|
+
activeIndex: n,
|
|
72
|
+
className: d.hideOnDesktop,
|
|
73
|
+
onSelect: l
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
] }) : /* @__PURE__ */ e(p, { count: a.length, activeIndex: n, onSelect: l })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
);
|
|
51
80
|
};
|
|
52
81
|
export {
|
|
53
|
-
|
|
82
|
+
F as ImageGallery
|
|
54
83
|
};
|
package/dist/components/ImageGallery/components/ImageGalleryPagination/ImageGalleryPagination.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),s=require("../../../../utils/cn/cn.cjs.js"),t=require("../../../../src/components/ImageGallery/components/ImageGalleryPagination/imageGalleryPagination.module.css"),o=({images:l,activeIndex:c,className:i,onSelect:r})=>n.jsx("div",{className:s.cn(t.root,i),children:l.map((a,e)=>n.jsx("button",{type:"button",className:s.cn(t.thumbnailButton,{[t.active]:e===c}),onClick:()=>r(e),children:n.jsx("img",{src:a,alt:`thumbnail ${e+1}`,className:t.thumbnailImage})},a))});exports.ImageGalleryPagination=o;
|
package/dist/components/ImageGallery/components/ImageGalleryPagination/ImageGalleryPagination.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { default as React } from 'react';
|
|
|
3
3
|
type ImageGalleryPaginationProps = {
|
|
4
4
|
images: string[];
|
|
5
5
|
activeIndex: number;
|
|
6
|
+
className?: string;
|
|
6
7
|
onSelect: (index: number) => void;
|
|
7
8
|
};
|
|
8
9
|
export declare const ImageGalleryPagination: React.FC<ImageGalleryPaginationProps>;
|
package/dist/components/ImageGallery/components/ImageGalleryPagination/ImageGalleryPagination.es.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { cn as
|
|
2
|
+
import { cn as n } from "../../../../utils/cn/cn.es.js";
|
|
3
3
|
import t from "../../../../components/ImageGallery/components/ImageGalleryPagination/imageGalleryPagination.module.css";
|
|
4
|
-
const
|
|
4
|
+
const p = ({
|
|
5
|
+
images: r,
|
|
6
|
+
activeIndex: l,
|
|
7
|
+
className: e,
|
|
8
|
+
onSelect: i
|
|
9
|
+
}) => /* @__PURE__ */ m("div", { className: n(t.root, e), children: r.map((o, a) => /* @__PURE__ */ m(
|
|
5
10
|
"button",
|
|
6
11
|
{
|
|
7
12
|
type: "button",
|
|
8
|
-
className:
|
|
9
|
-
onClick: () =>
|
|
13
|
+
className: n(t.thumbnailButton, { [t.active]: a === l }),
|
|
14
|
+
onClick: () => i(a),
|
|
10
15
|
children: /* @__PURE__ */ m("img", { src: o, alt: `thumbnail ${a + 1}`, className: t.thumbnailImage })
|
|
11
16
|
},
|
|
12
17
|
o
|
|
13
18
|
)) });
|
|
14
19
|
export {
|
|
15
|
-
|
|
20
|
+
p as ImageGalleryPagination
|
|
16
21
|
};
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
.root {
|
|
2
2
|
position: relative;
|
|
3
|
-
padding: 18px 0 13px 0;
|
|
4
3
|
display: flex;
|
|
5
4
|
max-width: 100%;
|
|
6
5
|
flex-direction: column;
|
|
7
6
|
align-items: center;
|
|
8
7
|
justify-content: flex-start;
|
|
9
8
|
border-radius: var(--border-radius-md);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.primary {
|
|
12
|
+
padding: 18px 0 13px 0;
|
|
10
13
|
background-color: var(--color-bg-neutral-light);
|
|
11
14
|
}
|
|
12
15
|
|
|
16
|
+
.secondary {
|
|
17
|
+
padding: 10px 0 5px;
|
|
18
|
+
background-color: var(--color-bg-base-light);
|
|
19
|
+
border: 1px solid var(--color-neutral-200);
|
|
20
|
+
}
|
|
21
|
+
|
|
13
22
|
.labelWrap {
|
|
14
23
|
width: 100%;
|
|
15
24
|
display: flex;
|
|
@@ -26,34 +35,44 @@
|
|
|
26
35
|
padding: 18px 0 14px 0;
|
|
27
36
|
}
|
|
28
37
|
|
|
38
|
+
.secondary .imageContainer {
|
|
39
|
+
padding: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
29
42
|
.imageWrapper {
|
|
30
43
|
width: 100%;
|
|
31
44
|
aspect-ratio: 1;
|
|
32
45
|
}
|
|
33
46
|
|
|
47
|
+
.secondary .imageWrapper {
|
|
48
|
+
aspect-ratio: 1 / 0.8;
|
|
49
|
+
}
|
|
50
|
+
|
|
34
51
|
.image {
|
|
35
52
|
width: 100%;
|
|
36
53
|
height: 100%;
|
|
54
|
+
display: block;
|
|
55
|
+
margin: 0 auto;
|
|
37
56
|
object-fit: contain;
|
|
57
|
+
object-position: center;
|
|
38
58
|
}
|
|
39
59
|
|
|
40
60
|
@media (width <= 768px) {
|
|
41
61
|
.root {
|
|
42
62
|
padding: 16px 0;
|
|
43
63
|
}
|
|
44
|
-
|
|
64
|
+
.root.secondary {
|
|
65
|
+
padding: 10px 0 5px;
|
|
66
|
+
}
|
|
45
67
|
.labelWrap {
|
|
46
68
|
padding: 0 16px;
|
|
47
69
|
}
|
|
48
|
-
|
|
49
70
|
.swiper {
|
|
50
71
|
margin-bottom: 0;
|
|
51
72
|
}
|
|
52
|
-
|
|
53
73
|
.imageWrapper {
|
|
54
74
|
height: auto;
|
|
55
75
|
}
|
|
56
|
-
|
|
57
76
|
.image {
|
|
58
77
|
aspect-ratio: 1 / 1;
|
|
59
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),j=require("../../utils/cn/cn.cjs.js"),l=require("./constants.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),j=require("../../utils/cn/cn.cjs.js"),l=require("./constants.cjs.js"),i=require("../../src/modules/ImageWithText/imageWithText.module.css"),b=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),n=require("../../components/Typography/Typography.cjs.js"),m=require("./components/ButtonWithColors/ButtonWithColors.cjs.js"),T=({image:g,text:t,title:s,view:e,colorScheme:u,textColor:p,mobileTextColor:x,titleColor:c,mobileTitleColor:o,titleHighlightColor:r,mobileTitleHighlightColor:h,mobileImage:y,button:d})=>a.jsx("section",{className:i.root,"data-scheme":u,children:a.jsxs("div",{className:i.container,"data-view":e,children:[a.jsxs("div",{className:i.imageContainer,children:[a.jsx("img",{src:g,alt:"background image",className:i.image,"data-color":p}),a.jsx("img",{src:y||g,alt:"mobile background image",className:i.mobileImage})]}),a.jsxs("div",{className:j.cn(i.content,{[i.textAlignLeft]:e==="plain"||e==="plain_with_title",[i.textAlignRight]:e==="complex"}),"data-view":e,"data-text-color":p,"data-mobile-text-color":x,"data-title-color":c,"data-mobile-title-color":o,"data-title-highlight-color":r,"data-mobile-title-highlight-color":h,children:[e==="complex"&&a.jsxs("div",{className:i.richTextContainer,style:{"--highlight-color-custom":l.COLORS[c||"white"],"--highlight-emphasize-custom":l.COLORS[r||"white"],"--highlight-color-custom-mobile":l.COLORS[o||"white"],"--highlight-emphasize-custom-mobile":l.COLORS[h||"white"]},children:[s&&a.jsx(b.HighlightedTitle,{colorScheme:c||r||o||h?"custom":"dark",className:i.richTextTitle,title:s,as:"div",defaultVariant:"displayXs",mobileVariant:"headingXl"}),t&&a.jsx(n.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",children:t}),a.jsx(m.ButtonWithColors,{...d})]}),e==="plain"&&t&&a.jsxs("div",{className:i.textContainer,children:[a.jsx(n.Typography,{as:"p",defaultVariant:"headingXl",mobileVariant:"headingXs",className:i.textOfPlain,children:t}),a.jsx(m.ButtonWithColors,{...d})]}),e==="plain_with_title"&&a.jsxs("div",{className:i.plainWithTitleContainer,children:[s&&a.jsx(n.Typography,{as:"h3",defaultVariant:"displaySm",mobileVariant:"headingXl",className:i.titleOfPlainWithTitle,children:s}),t&&a.jsx(n.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodyMd",className:i.textOfPlainWithTitle,children:t}),a.jsx(m.ButtonWithColors,{...d})]})]})]})});exports.ImageWithText=T;
|
|
@@ -1,94 +1,103 @@
|
|
|
1
1
|
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { cn as y } from "../../utils/cn/cn.es.js";
|
|
3
|
-
import { COLORS as
|
|
3
|
+
import { COLORS as c } from "./constants.es.js";
|
|
4
4
|
import a from "../../modules/ImageWithText/imageWithText.module.css";
|
|
5
|
-
import { HighlightedTitle as
|
|
6
|
-
import { Typography as
|
|
5
|
+
import { HighlightedTitle as V } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
|
|
6
|
+
import { Typography as r } from "../../components/Typography/Typography.es.js";
|
|
7
7
|
import { ButtonWithColors as p } from "./components/ButtonWithColors/ButtonWithColors.es.js";
|
|
8
8
|
const k = ({
|
|
9
9
|
image: g,
|
|
10
|
-
text:
|
|
11
|
-
title:
|
|
12
|
-
view:
|
|
10
|
+
text: t,
|
|
11
|
+
title: m,
|
|
12
|
+
view: e,
|
|
13
13
|
colorScheme: N,
|
|
14
14
|
textColor: f,
|
|
15
|
-
mobileTextColor:
|
|
16
|
-
titleColor:
|
|
15
|
+
mobileTextColor: b,
|
|
16
|
+
titleColor: s,
|
|
17
17
|
mobileTitleColor: n,
|
|
18
18
|
titleHighlightColor: d,
|
|
19
19
|
mobileTitleHighlightColor: o,
|
|
20
|
-
mobileImage:
|
|
20
|
+
mobileImage: u,
|
|
21
21
|
button: h
|
|
22
|
-
}) => /* @__PURE__ */ i("section", { className: a.root, "data-scheme": N, children: /* @__PURE__ */ l("div", { className: a.container, "data-view":
|
|
22
|
+
}) => /* @__PURE__ */ i("section", { className: a.root, "data-scheme": N, children: /* @__PURE__ */ l("div", { className: a.container, "data-view": e, children: [
|
|
23
23
|
/* @__PURE__ */ l("div", { className: a.imageContainer, children: [
|
|
24
24
|
/* @__PURE__ */ i("img", { src: g, alt: "background image", className: a.image, "data-color": f }),
|
|
25
|
-
/* @__PURE__ */ i("img", { src:
|
|
25
|
+
/* @__PURE__ */ i("img", { src: u || g, alt: "mobile background image", className: a.mobileImage })
|
|
26
26
|
] }),
|
|
27
27
|
/* @__PURE__ */ l(
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
30
|
className: y(a.content, {
|
|
31
|
-
[a.textAlignLeft]:
|
|
32
|
-
[a.textAlignRight]:
|
|
31
|
+
[a.textAlignLeft]: e === "plain" || e === "plain_with_title",
|
|
32
|
+
[a.textAlignRight]: e === "complex"
|
|
33
33
|
}),
|
|
34
|
-
"data-view":
|
|
34
|
+
"data-view": e,
|
|
35
35
|
"data-text-color": f,
|
|
36
|
-
"data-mobile-text-color":
|
|
37
|
-
"data-title-color":
|
|
36
|
+
"data-mobile-text-color": b,
|
|
37
|
+
"data-title-color": s,
|
|
38
38
|
"data-mobile-title-color": n,
|
|
39
39
|
"data-title-highlight-color": d,
|
|
40
40
|
"data-mobile-title-highlight-color": o,
|
|
41
41
|
children: [
|
|
42
|
-
|
|
42
|
+
e === "complex" && /* @__PURE__ */ l(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
45
|
className: a.richTextContainer,
|
|
46
46
|
style: {
|
|
47
|
-
"--highlight-color-custom":
|
|
48
|
-
"--highlight-emphasize-custom":
|
|
49
|
-
"--highlight-color-custom-mobile":
|
|
50
|
-
"--highlight-emphasize-custom-mobile":
|
|
47
|
+
"--highlight-color-custom": c[s || "white"],
|
|
48
|
+
"--highlight-emphasize-custom": c[d || "white"],
|
|
49
|
+
"--highlight-color-custom-mobile": c[n || "white"],
|
|
50
|
+
"--highlight-emphasize-custom-mobile": c[o || "white"]
|
|
51
51
|
},
|
|
52
52
|
children: [
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
m && /* @__PURE__ */ i(
|
|
54
|
+
V,
|
|
55
55
|
{
|
|
56
|
-
colorScheme:
|
|
56
|
+
colorScheme: s || d || n || o ? "custom" : "dark",
|
|
57
57
|
className: a.richTextTitle,
|
|
58
|
-
title:
|
|
58
|
+
title: m,
|
|
59
59
|
as: "div",
|
|
60
60
|
defaultVariant: "displayXs",
|
|
61
61
|
mobileVariant: "headingXl"
|
|
62
62
|
}
|
|
63
63
|
),
|
|
64
|
-
|
|
64
|
+
t && /* @__PURE__ */ i(r, { as: "p", defaultVariant: "bodyMd", mobileVariant: "bodySm", children: t }),
|
|
65
65
|
/* @__PURE__ */ i(p, { ...h })
|
|
66
66
|
]
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
|
|
69
|
+
e === "plain" && t && /* @__PURE__ */ l("div", { className: a.textContainer, children: [
|
|
70
70
|
/* @__PURE__ */ i(
|
|
71
|
-
|
|
71
|
+
r,
|
|
72
72
|
{
|
|
73
73
|
as: "p",
|
|
74
74
|
defaultVariant: "headingXl",
|
|
75
75
|
mobileVariant: "headingXs",
|
|
76
76
|
className: a.textOfPlain,
|
|
77
|
-
children:
|
|
77
|
+
children: t
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
80
|
/* @__PURE__ */ i(p, { ...h })
|
|
81
81
|
] }),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
e === "plain_with_title" && /* @__PURE__ */ l("div", { className: a.plainWithTitleContainer, children: [
|
|
83
|
+
m && /* @__PURE__ */ i(
|
|
84
|
+
r,
|
|
85
|
+
{
|
|
86
|
+
as: "h3",
|
|
87
|
+
defaultVariant: "displaySm",
|
|
88
|
+
mobileVariant: "headingXl",
|
|
89
|
+
className: a.titleOfPlainWithTitle,
|
|
90
|
+
children: m
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
t && /* @__PURE__ */ i(
|
|
94
|
+
r,
|
|
86
95
|
{
|
|
87
96
|
as: "p",
|
|
88
97
|
defaultVariant: "bodyMd",
|
|
89
98
|
mobileVariant: "bodyMd",
|
|
90
99
|
className: a.textOfPlainWithTitle,
|
|
91
|
-
children:
|
|
100
|
+
children: t
|
|
92
101
|
}
|
|
93
102
|
),
|
|
94
103
|
/* @__PURE__ */ i(p, { ...h })
|