@zenpatient-org/healthspan-marketing-ui 0.1.33 → 0.1.34
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/ComplexImageCarousel/ComplexImageCarousel.cjs.js +1 -1
- package/dist/components/ComplexImageCarousel/ComplexImageCarousel.d.ts +1 -1
- package/dist/components/ComplexImageCarousel/ComplexImageCarousel.es.js +46 -123
- package/dist/components/ComplexImageCarousel/complexImageCarousel.module.css.cjs.js +1 -1
- package/dist/components/ComplexImageCarousel/complexImageCarousel.module.css.es.js +19 -14
- package/dist/components/ComplexImageCarousel/useComplexImageCarousel.cjs.js +1 -0
- package/dist/components/ComplexImageCarousel/useComplexImageCarousel.d.ts +19 -0
- package/dist/components/ComplexImageCarousel/useComplexImageCarousel.es.js +133 -0
- package/dist/components/FilterMenu/FilterMenu.cjs.js +1 -1
- package/dist/components/FilterMenu/FilterMenu.d.ts +4 -1
- package/dist/components/FilterMenu/FilterMenu.es.js +51 -38
- package/dist/components/FilterMenu/filterMenu.module.css.cjs.js +1 -1
- package/dist/components/FilterMenu/filterMenu.module.css.es.js +8 -6
- package/dist/components/Pagination/Pagination.cjs.js +1 -1
- package/dist/components/Pagination/Pagination.es.js +24 -24
- package/dist/components/RatingStars/RatingStars.cjs.js +1 -1
- package/dist/components/RatingStars/RatingStars.es.js +10 -16
- package/dist/components/RatingStars/ratingStars.module.css.cjs.js +1 -1
- package/dist/components/RatingStars/ratingStars.module.css.es.js +3 -5
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/icons/social/star-half.svg.cjs.js +1 -1
- package/dist/icons/social/star-half.svg.es.js +2 -2
- package/dist/pageComponents/ContactUs/ContactUs.cjs.js +1 -0
- package/dist/pageComponents/ContactUs/ContactUs.d.ts +1 -0
- package/dist/pageComponents/ContactUs/ContactUs.es.js +79 -0
- package/dist/pageComponents/ContactUs/contactUs.module.css.cjs.js +1 -0
- package/dist/pageComponents/ContactUs/contactUs.module.css.es.js +37 -0
- package/dist/pageComponents/ContactUs/index.d.ts +1 -0
- package/package.json +6 -1
|
@@ -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 e=require("react/jsx-runtime"),a=require("../../utils/cn/cn.cjs.js"),N=require("../ProgressButton/ProgressButton.cjs.js"),u=require("../Typography/Typography.cjs.js"),r=require("./complexImageCarousel.module.css.cjs.js"),v=require("./useComplexImageCarousel.cjs.js"),b=({images:i})=>{const{containerRef:m,carouselRef:f,imageRefs:p,descriptionRef:g,descriptionItemRef:h,progressButtonContainerRef:C,visible:s,cardSizes:n,handleCustomPrevClick:x,handleCustomNextClick:y,current:j,mobileCardIndex:o,xLargeCardIndex:l}=v.useComplexImageCarousel({images:i});return e.jsx("div",{className:r.default.root,children:e.jsxs("div",{ref:m,className:r.default.container,children:[e.jsx("div",{ref:f,className:r.default.carouselArea,children:s.length>0&&s.map((d,t)=>e.jsx("div",{className:a.cn(r.default.slideContainer,r.default[`size-${n[t]}`]),ref:c=>{c&&(p.current[t]=c)},"data-flip-id":`slide-${(j+t)%i.length}`,"data-size":n[t],children:e.jsx("img",{src:d.image,alt:`Slide ${t+1}`,className:r.default.image})},d.name))}),e.jsx("div",{ref:g,className:r.default.description,children:e.jsxs("div",{ref:h,className:a.cn("description-item",r.default.descriptionItem),children:[e.jsx(u.Typography,{as:"h3",defaultVariant:"headingLg",mobileVariant:"headingXxs",children:typeof window<"u"&&window.innerWidth<=768?s[o].title:s[l].title}),e.jsx(u.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:r.default.text,children:typeof window<"u"&&window.innerWidth<=768?s[o].description:s[l].description})]})}),e.jsx("div",{ref:C,className:r.default.progressButtonContainer,children:e.jsx(N.ProgressButton,{left:{onClick:x},right:{onClick:y},className:a.cn("progress-buttons",r.default.progressButton)})})]})})};exports.ComplexImageCarousel=b;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TComplexImageCarouselView } from './types';
|
|
2
2
|
|
|
3
|
-
export declare const ComplexImageCarousel: ({
|
|
3
|
+
export declare const ComplexImageCarousel: ({ images }: TComplexImageCarouselView) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,135 +1,58 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}, C = () => {
|
|
45
|
-
if (!e || s <= 0)
|
|
46
|
-
return u(g.length - 1);
|
|
47
|
-
u(s - 1);
|
|
48
|
-
}, w = () => {
|
|
49
|
-
if (!e || s >= g.length - 1)
|
|
50
|
-
return u(0);
|
|
51
|
-
u(s + 1);
|
|
52
|
-
}, I = s - 1, N = s + 1, x = s - 2, P = s + 2;
|
|
53
|
-
return /* @__PURE__ */ E("div", { className: i.root, children: [
|
|
54
|
-
/* @__PURE__ */ o("div", { className: i.header, children: /* @__PURE__ */ o(
|
|
55
|
-
y,
|
|
2
|
+
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
3
|
+
import { cn as s } from "../../utils/cn/cn.es.js";
|
|
4
|
+
import { ProgressButton as x } from "../ProgressButton/ProgressButton.es.js";
|
|
5
|
+
import { Typography as f } from "../Typography/Typography.es.js";
|
|
6
|
+
import e from "./complexImageCarousel.module.css.es.js";
|
|
7
|
+
import { useComplexImageCarousel as y } from "./useComplexImageCarousel.es.js";
|
|
8
|
+
const S = ({ images: a }) => {
|
|
9
|
+
const {
|
|
10
|
+
containerRef: p,
|
|
11
|
+
carouselRef: h,
|
|
12
|
+
imageRefs: u,
|
|
13
|
+
descriptionRef: g,
|
|
14
|
+
descriptionItemRef: C,
|
|
15
|
+
progressButtonContainerRef: N,
|
|
16
|
+
visible: r,
|
|
17
|
+
cardSizes: n,
|
|
18
|
+
handleCustomPrevClick: v,
|
|
19
|
+
handleCustomNextClick: w,
|
|
20
|
+
current: b,
|
|
21
|
+
mobileCardIndex: o,
|
|
22
|
+
xLargeCardIndex: d
|
|
23
|
+
} = y({ images: a });
|
|
24
|
+
return /* @__PURE__ */ i("div", { className: e.root, children: /* @__PURE__ */ m("div", { ref: p, className: e.container, children: [
|
|
25
|
+
/* @__PURE__ */ i("div", { ref: h, className: e.carouselArea, children: r.length > 0 && r.map((l, t) => /* @__PURE__ */ i(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: s(e.slideContainer, e[`size-${n[t]}`]),
|
|
29
|
+
ref: (c) => {
|
|
30
|
+
c && (u.current[t] = c);
|
|
31
|
+
},
|
|
32
|
+
"data-flip-id": `slide-${(b + t) % a.length}`,
|
|
33
|
+
"data-size": n[t],
|
|
34
|
+
children: /* @__PURE__ */ i("img", { src: l.image, alt: `Slide ${t + 1}`, className: e.image })
|
|
35
|
+
},
|
|
36
|
+
l.name
|
|
37
|
+
)) }),
|
|
38
|
+
/* @__PURE__ */ i("div", { ref: g, className: e.description, children: /* @__PURE__ */ m("div", { ref: C, className: s("description-item", e.descriptionItem), children: [
|
|
39
|
+
/* @__PURE__ */ i(f, { as: "h3", defaultVariant: "headingLg", mobileVariant: "headingXxs", children: typeof window < "u" && window.innerWidth <= 768 ? r[o].title : r[d].title }),
|
|
40
|
+
/* @__PURE__ */ i(f, { as: "p", defaultVariant: "bodyMd", mobileVariant: "bodySm", className: e.text, children: typeof window < "u" && window.innerWidth <= 768 ? r[o].description : r[d].description })
|
|
41
|
+
] }) }),
|
|
42
|
+
/* @__PURE__ */ i("div", { ref: N, className: e.progressButtonContainer, children: /* @__PURE__ */ i(
|
|
43
|
+
x,
|
|
56
44
|
{
|
|
57
45
|
left: {
|
|
58
|
-
onClick:
|
|
46
|
+
onClick: v
|
|
59
47
|
},
|
|
60
48
|
right: {
|
|
61
49
|
onClick: w
|
|
62
50
|
},
|
|
63
|
-
className:
|
|
64
|
-
}
|
|
65
|
-
) }),
|
|
66
|
-
/* @__PURE__ */ o("div", { className: i.carouselArea, children: /* @__PURE__ */ o(
|
|
67
|
-
b,
|
|
68
|
-
{
|
|
69
|
-
onSwiper: v,
|
|
70
|
-
onSlideChange: m,
|
|
71
|
-
modules: j,
|
|
72
|
-
slidesPerView: 5,
|
|
73
|
-
speed: 300,
|
|
74
|
-
centeredSlides: !1,
|
|
75
|
-
className: i.swiper,
|
|
76
|
-
watchSlidesProgress: !0,
|
|
77
|
-
initialSlide: 0,
|
|
78
|
-
spaceBetween: 30,
|
|
79
|
-
threshold: 100,
|
|
80
|
-
onTouchEnd: () => {
|
|
81
|
-
setTimeout(() => {
|
|
82
|
-
r(!1), a(!0);
|
|
83
|
-
}, 200);
|
|
84
|
-
},
|
|
85
|
-
onTouchMove: () => {
|
|
86
|
-
r(!0), setTimeout(() => {
|
|
87
|
-
l && a(!1);
|
|
88
|
-
}, 10);
|
|
89
|
-
},
|
|
90
|
-
onSliderMove: () => {
|
|
91
|
-
r(!0);
|
|
92
|
-
},
|
|
93
|
-
onReachBeginning: () => {
|
|
94
|
-
r(!1), a(!0);
|
|
95
|
-
},
|
|
96
|
-
onReachEnd: () => {
|
|
97
|
-
r(!1), a(!0);
|
|
98
|
-
},
|
|
99
|
-
onTransitionStart: () => {
|
|
100
|
-
r(!0);
|
|
101
|
-
},
|
|
102
|
-
onTransitionEnd: () => {
|
|
103
|
-
setTimeout(() => {
|
|
104
|
-
r(!1), a(!0);
|
|
105
|
-
}, 200), e && (e.updateSize(), e.updateSlides(), e.updateProgress(), e.updateSlidesClasses());
|
|
106
|
-
},
|
|
107
|
-
children: g.map((n, t) => /* @__PURE__ */ o(
|
|
108
|
-
D,
|
|
109
|
-
{
|
|
110
|
-
className: L(i.swiperSlide, {
|
|
111
|
-
activeSlide: t === s,
|
|
112
|
-
prevSlide: t === I,
|
|
113
|
-
nextSlide: t === N,
|
|
114
|
-
prevPrevSlide: t === x,
|
|
115
|
-
nextNextSlide: t === P
|
|
116
|
-
}),
|
|
117
|
-
children: /* @__PURE__ */ o(
|
|
118
|
-
"div",
|
|
119
|
-
{
|
|
120
|
-
className: i.swiperSlideInner,
|
|
121
|
-
style: {
|
|
122
|
-
backgroundImage: `url(${n.image})`
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
},
|
|
127
|
-
t
|
|
128
|
-
))
|
|
51
|
+
className: s("progress-buttons", e.progressButton)
|
|
129
52
|
}
|
|
130
53
|
) })
|
|
131
|
-
] });
|
|
54
|
+
] }) });
|
|
132
55
|
};
|
|
133
56
|
export {
|
|
134
|
-
|
|
57
|
+
S as ComplexImageCarousel
|
|
135
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="complexImageCarousel-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="complexImageCarousel-module__container___uoYKj",o="complexImageCarousel-module__carouselArea___dqNWo",s="complexImageCarousel-module__slideContainer___H-r26",r="complexImageCarousel-module__description___R8XsG",t="complexImageCarousel-module__descriptionItem___SAPt8",_="complexImageCarousel-module__progressButtonContainer___l3Qih",l="complexImageCarousel-module__progressButton___b78tE",a={container:e,carouselArea:o,slideContainer:s,"size-atom":"complexImageCarousel-module__size-atom___t7PmI","size-small":"complexImageCarousel-module__size-small___mjSZM","size-medium":"complexImageCarousel-module__size-medium___M-0BQ","size-large":"complexImageCarousel-module__size-large___GITeg","size-x-large":"complexImageCarousel-module__size-x-large___e-BOY",description:r,descriptionItem:t,progressButtonContainer:_,progressButton:l};exports.carouselArea=o;exports.container=e;exports.default=a;exports.description=r;exports.descriptionItem=t;exports.progressButton=l;exports.progressButtonContainer=_;exports.slideContainer=s;
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
const e = "complexImageCarousel-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const e = "complexImageCarousel-module__container___uoYKj", o = "complexImageCarousel-module__carouselArea___dqNWo", s = "complexImageCarousel-module__slideContainer___H-r26", _ = "complexImageCarousel-module__description___R8XsG", l = "complexImageCarousel-module__descriptionItem___SAPt8", r = "complexImageCarousel-module__progressButtonContainer___l3Qih", a = "complexImageCarousel-module__progressButton___b78tE", m = {
|
|
2
|
+
container: e,
|
|
3
|
+
carouselArea: o,
|
|
4
|
+
slideContainer: s,
|
|
5
|
+
"size-atom": "complexImageCarousel-module__size-atom___t7PmI",
|
|
6
|
+
"size-small": "complexImageCarousel-module__size-small___mjSZM",
|
|
7
|
+
"size-medium": "complexImageCarousel-module__size-medium___M-0BQ",
|
|
8
|
+
"size-large": "complexImageCarousel-module__size-large___GITeg",
|
|
9
|
+
"size-x-large": "complexImageCarousel-module__size-x-large___e-BOY",
|
|
10
|
+
description: _,
|
|
11
|
+
descriptionItem: l,
|
|
4
12
|
progressButtonContainer: r,
|
|
5
|
-
|
|
6
|
-
swiper: _,
|
|
7
|
-
swiperSlide: l,
|
|
8
|
-
swiperSlideInner: a
|
|
13
|
+
progressButton: a
|
|
9
14
|
};
|
|
10
15
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
o as carouselArea,
|
|
17
|
+
e as container,
|
|
18
|
+
m as default,
|
|
19
|
+
_ as description,
|
|
20
|
+
l as descriptionItem,
|
|
21
|
+
a as progressButton,
|
|
14
22
|
r as progressButtonContainer,
|
|
15
|
-
|
|
16
|
-
_ as swiper,
|
|
17
|
-
l as swiperSlide,
|
|
18
|
-
a as swiperSlideInner
|
|
23
|
+
s as slideContainer
|
|
19
24
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("../../node_modules/@gsap/react/src/index.cjs.js"),c=require("../../node_modules/gsap/index.cjs.js"),x=require("../../node_modules/gsap/Flip.cjs.js"),r=require("react"),V=require("../../utils/debounce.cjs.js");c.gsap.registerPlugin(x.Flip);const D=({images:a})=>{const[d,E]=r.useState(0),[z,y]=r.useState(!1),W=r.useRef(null),o=r.useRef(null),f=r.useRef([]),m=r.useRef(null),q=r.useRef(null),C=r.useRef(null),R=r.useRef(null),u=["atom","small","medium","small","atom"],I=["atom","small","medium","large","x-large","large","medium","small","atom"],[l,A]=r.useState(typeof window<"u"&&window.innerWidth<=768?u:I),F=u.indexOf("medium"),P=l.indexOf("x-large"),w=r.useCallback(e=>{var L,b,v,B;if(!f.current.length)return;c.gsap.set(o.current,{height:((L=o.current)==null?void 0:L.offsetHeight)||"auto"});const g=(b=o.current)==null?void 0:b.querySelector('[data-size="x-large"]'),s=g==null?void 0:g.getBoundingClientRect(),n=(v=o.current)==null?void 0:v.querySelector('[data-size="medium"]'),h=n==null?void 0:n.getBoundingClientRect();if(window.innerWidth<=768){if(!h||!C.current)return;const t=window.innerWidth/2,i=h.left+h.width/2,p=t-i;c.gsap.set(o.current,{x:`+=${p}`});const S=C.current.querySelector(".progress-buttons");if(S){const $=S.getBoundingClientRect(),H=$.left+$.width/2,M=t-H;c.gsap.set(S,{x:`+=${M}`})}const G=t-h.width/2;c.gsap.set(m.current,{width:h.width,height:h.height/2,marginLeft:G})}else c.gsap.set(m.current,{width:s?s.width:"auto",height:s?s.height:"auto",marginLeft:s?s.left:0});(((B=m.current)==null?void 0:B.querySelectorAll(".description-item"))||[]).forEach((t,i)=>{t.style.zIndex=`${a.length-i}`}),y(!0),R.current=x.Flip.getState(f.current,{props:"width,height",simple:!0}),E(e),window.innerWidth<=768?f.current.forEach((t,i)=>{t&&i<u.length&&(u.forEach(p=>{t.classList.remove(`size-${p}`)}),t.classList.add(`size-${u[i]}`))}):f.current.forEach((t,i)=>{t&&i<l.length&&(l.forEach(p=>{t.classList.remove(`size-${p}`)}),t.classList.add(`size-${l[i]}`))}),requestAnimationFrame(()=>{x.Flip.from(R.current,{duration:.5,ease:"power3.out",targets:f.current,scale:!1,nested:!0,onComplete:()=>{y(!1)}}),c.gsap.fromTo(q.current,{opacity:0,y:20},{opacity:1,y:0,duration:.5,ease:"power3.out",onComplete:()=>{R.current=null}})})},[l,u,a.length]),k=()=>{if(z)return;const e=(d-1+a.length)%a.length;w(e)},O=()=>{if(z)return;const e=(d+1)%a.length;w(e)};function T(e,g){const s=[];if(typeof window<"u"&&window.innerWidth<=768)for(let n=0;n<u.length;n++)s.push(e[(g+n)%e.length]);else for(let n=0;n<l.length;n++)s.push(e[(g+n)%e.length]);return s}const j=T(a,d);return N.useGSAP(()=>{w(d),o.current&&c.gsap.set(o.current,{clearProps:"all"});const e=V.default(()=>{A(window.innerWidth<=768?u:I),w(d)},600);return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),{containerRef:W,carouselRef:o,imageRefs:f,descriptionRef:m,descriptionItemRef:q,progressButtonContainerRef:C,visible:j,cardSizes:l,handleCustomPrevClick:k,handleCustomNextClick:O,current:d,mobileCardIndex:F,xLargeCardIndex:P}};exports.useComplexImageCarousel=D;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TAdvancedImageView } from './types';
|
|
2
|
+
|
|
3
|
+
export declare const useComplexImageCarousel: ({ images }: {
|
|
4
|
+
images: TAdvancedImageView[];
|
|
5
|
+
}) => {
|
|
6
|
+
containerRef: import('react').RefObject<HTMLDivElement>;
|
|
7
|
+
carouselRef: import('react').RefObject<HTMLDivElement>;
|
|
8
|
+
imageRefs: import('react').MutableRefObject<HTMLDivElement[]>;
|
|
9
|
+
descriptionRef: import('react').RefObject<HTMLDivElement>;
|
|
10
|
+
descriptionItemRef: import('react').RefObject<HTMLDivElement>;
|
|
11
|
+
progressButtonContainerRef: import('react').RefObject<HTMLDivElement>;
|
|
12
|
+
visible: TAdvancedImageView[];
|
|
13
|
+
cardSizes: string[];
|
|
14
|
+
handleCustomPrevClick: () => void;
|
|
15
|
+
handleCustomNextClick: () => void;
|
|
16
|
+
current: number;
|
|
17
|
+
mobileCardIndex: number;
|
|
18
|
+
xLargeCardIndex: number;
|
|
19
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { useGSAP as D } from "../../node_modules/@gsap/react/src/index.es.js";
|
|
2
|
+
import { gsap as c } from "../../node_modules/gsap/index.es.js";
|
|
3
|
+
import { Flip as x } from "../../node_modules/gsap/Flip.es.js";
|
|
4
|
+
import { useState as S, useRef as l, useCallback as J } from "react";
|
|
5
|
+
import K from "../../utils/debounce.es.js";
|
|
6
|
+
c.registerPlugin(x);
|
|
7
|
+
const _ = ({ images: a }) => {
|
|
8
|
+
const [d, q] = S(0), [y, L] = S(!1), A = l(null), o = l(null), f = l([]), p = l(null), I = l(null), C = l(null), z = l(null), i = ["atom", "small", "medium", "small", "atom"], B = ["atom", "small", "medium", "large", "x-large", "large", "medium", "small", "atom"], [u, k] = S(
|
|
9
|
+
typeof window < "u" && window.innerWidth <= 768 ? i : B
|
|
10
|
+
), P = i.indexOf("medium"), O = u.indexOf("x-large"), w = J(
|
|
11
|
+
(e) => {
|
|
12
|
+
var b, v, E, W;
|
|
13
|
+
if (!f.current.length) return;
|
|
14
|
+
c.set(o.current, {
|
|
15
|
+
height: ((b = o.current) == null ? void 0 : b.offsetHeight) || "auto"
|
|
16
|
+
});
|
|
17
|
+
const h = (v = o.current) == null ? void 0 : v.querySelector('[data-size="x-large"]'), r = h == null ? void 0 : h.getBoundingClientRect(), n = (E = o.current) == null ? void 0 : E.querySelector('[data-size="medium"]'), m = n == null ? void 0 : n.getBoundingClientRect();
|
|
18
|
+
if (window.innerWidth <= 768) {
|
|
19
|
+
if (!m || !C.current) return;
|
|
20
|
+
const t = window.innerWidth / 2, s = m.left + m.width / 2, g = t - s;
|
|
21
|
+
c.set(o.current, {
|
|
22
|
+
x: `+=${g}`
|
|
23
|
+
});
|
|
24
|
+
const R = C.current.querySelector(
|
|
25
|
+
".progress-buttons"
|
|
26
|
+
);
|
|
27
|
+
if (R) {
|
|
28
|
+
const $ = R.getBoundingClientRect(), V = $.left + $.width / 2, j = t - V;
|
|
29
|
+
c.set(R, {
|
|
30
|
+
x: `+=${j}`
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
const N = t - m.width / 2;
|
|
34
|
+
c.set(p.current, {
|
|
35
|
+
width: m.width,
|
|
36
|
+
height: m.height / 2,
|
|
37
|
+
marginLeft: N
|
|
38
|
+
});
|
|
39
|
+
} else
|
|
40
|
+
c.set(p.current, {
|
|
41
|
+
width: r ? r.width : "auto",
|
|
42
|
+
height: r ? r.height : "auto",
|
|
43
|
+
marginLeft: r ? r.left : 0
|
|
44
|
+
});
|
|
45
|
+
(((W = p.current) == null ? void 0 : W.querySelectorAll(".description-item")) || []).forEach((t, s) => {
|
|
46
|
+
t.style.zIndex = `${a.length - s}`;
|
|
47
|
+
}), L(!0), z.current = x.getState(f.current, {
|
|
48
|
+
props: "width,height",
|
|
49
|
+
simple: !0
|
|
50
|
+
}), q(e), window.innerWidth <= 768 ? f.current.forEach((t, s) => {
|
|
51
|
+
t && s < i.length && (i.forEach((g) => {
|
|
52
|
+
t.classList.remove(`size-${g}`);
|
|
53
|
+
}), t.classList.add(`size-${i[s]}`));
|
|
54
|
+
}) : f.current.forEach((t, s) => {
|
|
55
|
+
t && s < u.length && (u.forEach((g) => {
|
|
56
|
+
t.classList.remove(`size-${g}`);
|
|
57
|
+
}), t.classList.add(`size-${u[s]}`));
|
|
58
|
+
}), requestAnimationFrame(() => {
|
|
59
|
+
x.from(z.current, {
|
|
60
|
+
duration: 0.5,
|
|
61
|
+
ease: "power3.out",
|
|
62
|
+
targets: f.current,
|
|
63
|
+
scale: !1,
|
|
64
|
+
nested: !0,
|
|
65
|
+
onComplete: () => {
|
|
66
|
+
L(!1);
|
|
67
|
+
}
|
|
68
|
+
}), c.fromTo(
|
|
69
|
+
I.current,
|
|
70
|
+
{
|
|
71
|
+
opacity: 0,
|
|
72
|
+
y: 20
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
opacity: 1,
|
|
76
|
+
y: 0,
|
|
77
|
+
duration: 0.5,
|
|
78
|
+
ease: "power3.out",
|
|
79
|
+
onComplete: () => {
|
|
80
|
+
z.current = null;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
[u, i, a.length]
|
|
87
|
+
), F = () => {
|
|
88
|
+
if (y) return;
|
|
89
|
+
const e = (d - 1 + a.length) % a.length;
|
|
90
|
+
w(e);
|
|
91
|
+
}, T = () => {
|
|
92
|
+
if (y) return;
|
|
93
|
+
const e = (d + 1) % a.length;
|
|
94
|
+
w(e);
|
|
95
|
+
};
|
|
96
|
+
function G(e, h) {
|
|
97
|
+
const r = [];
|
|
98
|
+
if (typeof window < "u" && window.innerWidth <= 768)
|
|
99
|
+
for (let n = 0; n < i.length; n++)
|
|
100
|
+
r.push(e[(h + n) % e.length]);
|
|
101
|
+
else
|
|
102
|
+
for (let n = 0; n < u.length; n++)
|
|
103
|
+
r.push(e[(h + n) % e.length]);
|
|
104
|
+
return r;
|
|
105
|
+
}
|
|
106
|
+
const H = G(a, d);
|
|
107
|
+
return D(() => {
|
|
108
|
+
w(d), o.current && c.set(o.current, { clearProps: "all" });
|
|
109
|
+
const e = K(() => {
|
|
110
|
+
k(window.innerWidth <= 768 ? i : B), w(d);
|
|
111
|
+
}, 600);
|
|
112
|
+
return window.addEventListener("resize", e), () => {
|
|
113
|
+
window.removeEventListener("resize", e);
|
|
114
|
+
};
|
|
115
|
+
}, []), {
|
|
116
|
+
containerRef: A,
|
|
117
|
+
carouselRef: o,
|
|
118
|
+
imageRefs: f,
|
|
119
|
+
descriptionRef: p,
|
|
120
|
+
descriptionItemRef: I,
|
|
121
|
+
progressButtonContainerRef: C,
|
|
122
|
+
visible: H,
|
|
123
|
+
cardSizes: u,
|
|
124
|
+
handleCustomPrevClick: F,
|
|
125
|
+
handleCustomNextClick: T,
|
|
126
|
+
current: d,
|
|
127
|
+
mobileCardIndex: P,
|
|
128
|
+
xLargeCardIndex: O
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
export {
|
|
132
|
+
_ as useComplexImageCarousel
|
|
133
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),j=require("react"),c=require("../../utils/cn/cn.cjs.js"),N=require("../Icon/Icon.cjs.js"),d=require("../Icon/constants.cjs.js"),i=require("../Typography/Typography.cjs.js"),e=require("./filterMenu.module.css.cjs.js");function _({label:u,open:m=!1,multiple:f,options:p,selectedValue:a,headerNode:r,onSelect:h}){const[o,g]=j.useState(m),y=()=>g(s=>!s);return n.jsxs("div",{className:e.default.root,children:[n.jsxs("button",{className:e.default.toggleButton,onClick:y,children:[n.jsx(i.Typography,{defaultVariant:"labelLg",emphasis:!0,children:u}),n.jsx(N.Icon,{name:o?d.EIconName.REMOVE:d.EIconName.PLUS,className:e.default.toggleIcon})]}),n.jsx("div",{className:c.cn(e.default.menu,o&&e.default.isOpen),role:"menu",children:n.jsxs("div",{className:e.default.menuContent,children:[r,p.map((s,t)=>n.jsxs("ul",{className:e.default.subOptions,children:[s.label&&n.jsx("li",{className:c.cn(e.default.divider,{[e.default.dividerLine]:!!(r||t!==0)}),children:n.jsx(i.Typography,{as:"div",defaultVariant:"bodyMd",weight:"medium",className:e.default.dividerLabel,children:s.label})},t),s.values.map(({value:l,label:b})=>n.jsx("li",{className:e.default.option,onClick:()=>h(l,s),children:n.jsx(i.Typography,{as:"div",defaultVariant:"bodyMd",className:c.cn(e.default.optionLabel,{[e.default.selected]:f?a==null?void 0:a.includes(l):l===a}),children:b})},l))]},`${s.label}_${t}`))]})})]})}exports.FilterMenu=_;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
1
3
|
type TOption<T extends string | number> = {
|
|
2
4
|
label: string;
|
|
3
5
|
value: T;
|
|
@@ -11,6 +13,7 @@ type FilterMenuProps<T extends string | number> = {
|
|
|
11
13
|
open?: boolean;
|
|
12
14
|
multiple?: boolean;
|
|
13
15
|
options: ReadonlyArray<TOptionGroup<T>>;
|
|
16
|
+
headerNode?: React.ReactNode;
|
|
14
17
|
onSelect: (value: T, optionGroup: TOptionGroup<T>) => void;
|
|
15
18
|
} & ({
|
|
16
19
|
multiple: true;
|
|
@@ -19,5 +22,5 @@ type FilterMenuProps<T extends string | number> = {
|
|
|
19
22
|
multiple?: false;
|
|
20
23
|
selectedValue?: T;
|
|
21
24
|
});
|
|
22
|
-
export declare function FilterMenu<T extends string | number>({ label, open, multiple, options, selectedValue, onSelect, }: FilterMenuProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function FilterMenu<T extends string | number>({ label, open, multiple, options, selectedValue, headerNode, onSelect, }: FilterMenuProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
23
26
|
export {};
|
|
@@ -1,48 +1,61 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
2
|
+
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { useState as y } from "react";
|
|
4
4
|
import { cn as o } from "../../utils/cn/cn.es.js";
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { EIconName as
|
|
5
|
+
import { Icon as L } from "../Icon/Icon.es.js";
|
|
6
|
+
import { EIconName as d } from "../Icon/constants.es.js";
|
|
7
7
|
import { Typography as m } from "../Typography/Typography.es.js";
|
|
8
8
|
import i from "./filterMenu.module.css.es.js";
|
|
9
9
|
function w({
|
|
10
|
-
label:
|
|
11
|
-
open:
|
|
12
|
-
multiple:
|
|
13
|
-
options:
|
|
14
|
-
selectedValue:
|
|
15
|
-
|
|
10
|
+
label: p,
|
|
11
|
+
open: h = !1,
|
|
12
|
+
multiple: f,
|
|
13
|
+
options: b,
|
|
14
|
+
selectedValue: l,
|
|
15
|
+
headerNode: t,
|
|
16
|
+
onSelect: u
|
|
16
17
|
}) {
|
|
17
|
-
const [
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */ a(m, { defaultVariant: "labelLg", emphasis: !0, children:
|
|
21
|
-
/* @__PURE__ */ a(
|
|
18
|
+
const [c, N] = y(h), g = () => N((e) => !e);
|
|
19
|
+
return /* @__PURE__ */ r("div", { className: i.root, children: [
|
|
20
|
+
/* @__PURE__ */ r("button", { className: i.toggleButton, onClick: g, children: [
|
|
21
|
+
/* @__PURE__ */ a(m, { defaultVariant: "labelLg", emphasis: !0, children: p }),
|
|
22
|
+
/* @__PURE__ */ a(L, { name: c ? d.REMOVE : d.PLUS, className: i.toggleIcon })
|
|
22
23
|
] }),
|
|
23
|
-
/* @__PURE__ */ a("div", { className: o(i.menu,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
24
|
+
/* @__PURE__ */ a("div", { className: o(i.menu, c && i.isOpen), role: "menu", children: /* @__PURE__ */ r("div", { className: i.menuContent, children: [
|
|
25
|
+
t,
|
|
26
|
+
b.map((e, s) => /* @__PURE__ */ r("ul", { className: i.subOptions, children: [
|
|
27
|
+
e.label && /* @__PURE__ */ a(
|
|
28
|
+
"li",
|
|
29
|
+
{
|
|
30
|
+
className: o(i.divider, {
|
|
31
|
+
[i.dividerLine]: !!(t || s !== 0)
|
|
32
|
+
}),
|
|
33
|
+
children: /* @__PURE__ */ a(
|
|
34
|
+
m,
|
|
35
|
+
{
|
|
36
|
+
as: "div",
|
|
37
|
+
defaultVariant: "bodyMd",
|
|
38
|
+
weight: "medium",
|
|
39
|
+
className: i.dividerLabel,
|
|
40
|
+
children: e.label
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
},
|
|
44
|
+
s
|
|
45
|
+
),
|
|
46
|
+
e.values.map(({ value: n, label: v }) => /* @__PURE__ */ a("li", { className: i.option, onClick: () => u(n, e), children: /* @__PURE__ */ a(
|
|
47
|
+
m,
|
|
48
|
+
{
|
|
49
|
+
as: "div",
|
|
50
|
+
defaultVariant: "bodyMd",
|
|
51
|
+
className: o(i.optionLabel, {
|
|
52
|
+
[i.selected]: f ? l == null ? void 0 : l.includes(n) : n === l
|
|
53
|
+
}),
|
|
54
|
+
children: v
|
|
55
|
+
}
|
|
56
|
+
) }, n))
|
|
57
|
+
] }, `${e.label}_${s}`))
|
|
58
|
+
] }) })
|
|
46
59
|
] });
|
|
47
60
|
}
|
|
48
61
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="filterMenu-module__root___2bQXW",o="filterMenu-module__toggleButton___tuQZ8",t="filterMenu-module__toggleIcon___q7eVA",
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="filterMenu-module__root___2bQXW",o="filterMenu-module__toggleButton___tuQZ8",t="filterMenu-module__toggleIcon___q7eVA",n="filterMenu-module__menu___a0R5E",_="filterMenu-module__subOptions___4CcnK",i="filterMenu-module__option___Qo7qU",l="filterMenu-module__selected___ixmVF",u="filterMenu-module__divider___6UuTw",d="filterMenu-module__optionLabel___C99H6",s="filterMenu-module__dividerLabel___93rPp",r="filterMenu-module__dividerLine___WPDHB",c="filterMenu-module__isOpen___65MDX",m="filterMenu-module__menuContent___a3NE8",g={root:e,toggleButton:o,toggleIcon:t,menu:n,subOptions:_,option:i,selected:l,divider:u,optionLabel:d,dividerLabel:s,dividerLine:r,isOpen:c,menuContent:m};exports.default=g;exports.divider=u;exports.dividerLabel=s;exports.dividerLine=r;exports.isOpen=c;exports.menu=n;exports.menuContent=m;exports.option=i;exports.optionLabel=d;exports.root=e;exports.selected=l;exports.subOptions=_;exports.toggleButton=o;exports.toggleIcon=t;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "filterMenu-module__root___2bQXW", o = "filterMenu-module__toggleButton___tuQZ8", _ = "filterMenu-module__toggleIcon___q7eVA", t = "filterMenu-module__menu___a0R5E", n = "filterMenu-module__subOptions___4CcnK", i = "filterMenu-module__option___Qo7qU", l = "filterMenu-module__selected___ixmVF", u = "filterMenu-module__divider___6UuTw", d = "filterMenu-module__optionLabel___C99H6", s = "filterMenu-module__dividerLabel___93rPp", r = "filterMenu-
|
|
1
|
+
const e = "filterMenu-module__root___2bQXW", o = "filterMenu-module__toggleButton___tuQZ8", _ = "filterMenu-module__toggleIcon___q7eVA", t = "filterMenu-module__menu___a0R5E", n = "filterMenu-module__subOptions___4CcnK", i = "filterMenu-module__option___Qo7qU", l = "filterMenu-module__selected___ixmVF", u = "filterMenu-module__divider___6UuTw", d = "filterMenu-module__optionLabel___C99H6", s = "filterMenu-module__dividerLabel___93rPp", r = "filterMenu-module__dividerLine___WPDHB", c = "filterMenu-module__isOpen___65MDX", m = "filterMenu-module__menuContent___a3NE8", f = {
|
|
2
2
|
root: e,
|
|
3
3
|
toggleButton: o,
|
|
4
4
|
toggleIcon: _,
|
|
@@ -9,16 +9,18 @@ const e = "filterMenu-module__root___2bQXW", o = "filterMenu-module__toggleButto
|
|
|
9
9
|
divider: u,
|
|
10
10
|
optionLabel: d,
|
|
11
11
|
dividerLabel: s,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
dividerLine: r,
|
|
13
|
+
isOpen: c,
|
|
14
|
+
menuContent: m
|
|
14
15
|
};
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
+
f as default,
|
|
17
18
|
u as divider,
|
|
18
19
|
s as dividerLabel,
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
r as dividerLine,
|
|
21
|
+
c as isOpen,
|
|
21
22
|
t as menu,
|
|
23
|
+
m as menuContent,
|
|
22
24
|
i as option,
|
|
23
25
|
d as optionLabel,
|
|
24
26
|
e as root,
|
|
@@ -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 o=require("react/jsx-runtime"),m=require("react"),d=require("../../utils/cn/cn.cjs.js"),i=require("../Icon/Icon.cjs.js"),f=require("../Icon/constants.cjs.js"),_=require("../Typography/Typography.cjs.js"),e=require("./pagination.module.css.cjs.js"),h=(r,t,a)=>{if(t<=a)return Array.from({length:t},(c,u)=>u+1);const s=Math.floor(a/2);let n=Math.max(1,r-s),l=n+a-1;return l>t&&(l=t,n=l-a+1),Array.from({length:a},(c,u)=>n+u)},N=({page:r,pagesCount:t,visiblePagesLimit:a,disabled:s,onPageChange:n})=>{const l=m.useMemo(()=>h(r,t,a),[r,t,a]);return o.jsxs("div",{className:e.default.root,children:[o.jsx("button",{className:d.cn(e.default.arrow,e.default.arrowPrev),onClick:()=>n(r-1),disabled:s||r<=1,"aria-label":"Previous page",children:o.jsx(i.Icon,{name:f.EIconName.ARROW_BACK,className:e.default.icon})}),l.map(c=>o.jsx("button",{className:d.cn(e.default.page,c===r&&e.default.activePage),onClick:()=>n(c),children:o.jsx(_.Typography,{defaultVariant:"labelXl",weight:"regular",children:c.toString().padStart(2,"0")})},c)),o.jsx("button",{className:d.cn(e.default.arrow,e.default.arrowNext),onClick:()=>n(r+1),disabled:s||r>=t,"aria-label":"Next page",children:o.jsx(i.Icon,{name:f.EIconName.ARROW_FORWARD,className:e.default.icon})})]})};exports.Pagination=N;
|