@zenpatient-org/healthspan-marketing-ui 0.1.43 → 0.1.44
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/ComplexCarousel/ComplexCarousel.cjs.js +1 -0
- package/dist/components/ComplexImageCarousel/ComplexCarousel/ComplexCarousel.d.ts +5 -0
- package/dist/components/ComplexImageCarousel/ComplexCarousel/ComplexCarousel.es.js +57 -0
- package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.cjs.js +1 -0
- package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.es.js +24 -0
- package/dist/components/ComplexImageCarousel/ComplexCarousel/index.d.ts +1 -0
- 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 +5 -55
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/SimpleImageCarousel.cjs.js +1 -0
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/SimpleImageCarousel.d.ts +5 -0
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/SimpleImageCarousel.es.js +76 -0
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/index.d.ts +1 -0
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/simpleImageCarousel.module.css.cjs.js +1 -0
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/simpleImageCarousel.module.css.es.js +15 -0
- package/dist/components/ComplexTooltip/ComplexTooltip.cjs.js +1 -1
- package/dist/components/ComplexTooltip/ComplexTooltip.d.ts +5 -2
- package/dist/components/ComplexTooltip/ComplexTooltip.es.js +34 -29
- package/dist/components/InfiniteScroll/InfiniteScroll.cjs.js +1 -1
- package/dist/components/InfiniteScroll/InfiniteScroll.d.ts +1 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.es.js +61 -46
- package/dist/components/StudyGridCard/StudyGridCard.cjs.js +1 -1
- package/dist/components/StudyGridCard/StudyGridCard.d.ts +10 -2
- package/dist/components/StudyGridCard/StudyGridCard.es.js +115 -60
- package/dist/components/StudyGridCard/studyGridCard.module.css.cjs.js +1 -1
- package/dist/components/StudyGridCard/studyGridCard.module.css.es.js +24 -12
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/ExpandingDetails/ExpandingDetails.cjs.js +1 -0
- package/dist/modules/ExpandingDetails/ExpandingDetails.d.ts +3 -0
- package/dist/modules/ExpandingDetails/ExpandingDetails.es.js +157 -0
- package/dist/modules/ExpandingDetails/expandingDetails.module.css.cjs.js +1 -0
- package/dist/modules/ExpandingDetails/expandingDetails.module.css.es.js +47 -0
- package/dist/modules/ExpandingDetails/index.d.ts +1 -0
- package/dist/modules/ExpandingDetails/types.d.ts +13 -0
- package/dist/modules/IndividualProductCard/IndividualProductCard.d.ts +2 -2
- package/package.json +6 -1
- package/dist/components/ComplexImageCarousel/complexImageCarousel.module.css.cjs.js +0 -1
- package/dist/components/ComplexImageCarousel/complexImageCarousel.module.css.es.js +0 -24
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../../utils/cn/cn.cjs.js"),N=require("../../ProgressButton/ProgressButton.cjs.js"),u=require("../../Typography/Typography.cjs.js"),v=require("../useComplexImageCarousel.cjs.js"),r=require("./complexImageCarousel.module.css.cjs.js"),b=({images:a})=>{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:a});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:i.cn(r.default.slideContainer,r.default[`size-${n[t]}`]),ref:c=>{c&&(p.current[t]=c)},"data-flip-id":`slide-${(j+t)%a.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:i.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:i.cn("progress-buttons",r.default.progressButton)})})]})})};exports.ComplexCarousel=b;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { cn as s } from "../../../utils/cn/cn.es.js";
|
|
3
|
+
import { ProgressButton as x } from "../../ProgressButton/ProgressButton.es.js";
|
|
4
|
+
import { Typography as f } from "../../Typography/Typography.es.js";
|
|
5
|
+
import { useComplexImageCarousel as y } from "../useComplexImageCarousel.es.js";
|
|
6
|
+
import e from "./complexImageCarousel.module.css.es.js";
|
|
7
|
+
const S = ({ images: o }) => {
|
|
8
|
+
const {
|
|
9
|
+
containerRef: p,
|
|
10
|
+
carouselRef: h,
|
|
11
|
+
imageRefs: u,
|
|
12
|
+
descriptionRef: g,
|
|
13
|
+
descriptionItemRef: C,
|
|
14
|
+
progressButtonContainerRef: N,
|
|
15
|
+
visible: r,
|
|
16
|
+
cardSizes: a,
|
|
17
|
+
handleCustomPrevClick: v,
|
|
18
|
+
handleCustomNextClick: w,
|
|
19
|
+
current: b,
|
|
20
|
+
mobileCardIndex: n,
|
|
21
|
+
xLargeCardIndex: d
|
|
22
|
+
} = y({ images: o });
|
|
23
|
+
return /* @__PURE__ */ i("div", { className: e.root, children: /* @__PURE__ */ m("div", { ref: p, className: e.container, children: [
|
|
24
|
+
/* @__PURE__ */ i("div", { ref: h, className: e.carouselArea, children: r.length > 0 && r.map((l, t) => /* @__PURE__ */ i(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
className: s(e.slideContainer, e[`size-${a[t]}`]),
|
|
28
|
+
ref: (c) => {
|
|
29
|
+
c && (u.current[t] = c);
|
|
30
|
+
},
|
|
31
|
+
"data-flip-id": `slide-${(b + t) % o.length}`,
|
|
32
|
+
"data-size": a[t],
|
|
33
|
+
children: /* @__PURE__ */ i("img", { src: l.image, alt: `Slide ${t + 1}`, className: e.image })
|
|
34
|
+
},
|
|
35
|
+
l.name
|
|
36
|
+
)) }),
|
|
37
|
+
/* @__PURE__ */ i("div", { ref: g, className: e.description, children: /* @__PURE__ */ m("div", { ref: C, className: s("description-item", e.descriptionItem), children: [
|
|
38
|
+
/* @__PURE__ */ i(f, { as: "h3", defaultVariant: "headingLg", mobileVariant: "headingXxs", children: typeof window < "u" && window.innerWidth <= 768 ? r[n].title : r[d].title }),
|
|
39
|
+
/* @__PURE__ */ i(f, { as: "p", defaultVariant: "bodyMd", mobileVariant: "bodySm", className: e.text, children: typeof window < "u" && window.innerWidth <= 768 ? r[n].description : r[d].description })
|
|
40
|
+
] }) }),
|
|
41
|
+
/* @__PURE__ */ i("div", { ref: N, className: e.progressButtonContainer, children: /* @__PURE__ */ i(
|
|
42
|
+
x,
|
|
43
|
+
{
|
|
44
|
+
left: {
|
|
45
|
+
onClick: v
|
|
46
|
+
},
|
|
47
|
+
right: {
|
|
48
|
+
onClick: w
|
|
49
|
+
},
|
|
50
|
+
className: s("progress-buttons", e.progressButton)
|
|
51
|
+
}
|
|
52
|
+
) })
|
|
53
|
+
] }) });
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
S as ComplexCarousel
|
|
57
|
+
};
|
package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.cjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="complexImageCarousel-module__container___kVKDY",o="complexImageCarousel-module__carouselArea___FSZ0C",s="complexImageCarousel-module__slideContainer___qYXXM",r="complexImageCarousel-module__description___QRpoA",_="complexImageCarousel-module__descriptionItem___X0E-4",l="complexImageCarousel-module__progressButtonContainer___XSlwf",t="complexImageCarousel-module__progressButton___G93Bn",a={container:e,carouselArea:o,slideContainer:s,"size-atom":"complexImageCarousel-module__size-atom___8IEXO","size-small":"complexImageCarousel-module__size-small___8Sjr3","size-medium":"complexImageCarousel-module__size-medium___Fi4B0","size-large":"complexImageCarousel-module__size-large___Kz59p","size-x-large":"complexImageCarousel-module__size-x-large___IGMf2",description:r,descriptionItem:_,progressButtonContainer:l,progressButton:t};exports.carouselArea=o;exports.container=e;exports.default=a;exports.description=r;exports.descriptionItem=_;exports.progressButton=t;exports.progressButtonContainer=l;exports.slideContainer=s;
|
package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.es.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const e = "complexImageCarousel-module__container___kVKDY", o = "complexImageCarousel-module__carouselArea___FSZ0C", _ = "complexImageCarousel-module__slideContainer___qYXXM", s = "complexImageCarousel-module__description___QRpoA", l = "complexImageCarousel-module__descriptionItem___X0E-4", r = "complexImageCarousel-module__progressButtonContainer___XSlwf", a = "complexImageCarousel-module__progressButton___G93Bn", m = {
|
|
2
|
+
container: e,
|
|
3
|
+
carouselArea: o,
|
|
4
|
+
slideContainer: _,
|
|
5
|
+
"size-atom": "complexImageCarousel-module__size-atom___8IEXO",
|
|
6
|
+
"size-small": "complexImageCarousel-module__size-small___8Sjr3",
|
|
7
|
+
"size-medium": "complexImageCarousel-module__size-medium___Fi4B0",
|
|
8
|
+
"size-large": "complexImageCarousel-module__size-large___Kz59p",
|
|
9
|
+
"size-x-large": "complexImageCarousel-module__size-x-large___IGMf2",
|
|
10
|
+
description: s,
|
|
11
|
+
descriptionItem: l,
|
|
12
|
+
progressButtonContainer: r,
|
|
13
|
+
progressButton: a
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
o as carouselArea,
|
|
17
|
+
e as container,
|
|
18
|
+
m as default,
|
|
19
|
+
s as description,
|
|
20
|
+
l as descriptionItem,
|
|
21
|
+
a as progressButton,
|
|
22
|
+
r as progressButtonContainer,
|
|
23
|
+
_ as slideContainer
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComplexCarousel } from './ComplexCarousel';
|
|
@@ -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 r=require("react/jsx-runtime"),o=require("./ComplexCarousel/ComplexCarousel.cjs.js"),s=require("./SimpleImageCarousel/SimpleImageCarousel.cjs.js"),u=({view:l,images:e})=>l==="simple"?r.jsx(s.SimpleImageCarousel,{images:e}):r.jsx(o.ComplexCarousel,{images:e});exports.ComplexImageCarousel=u;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TComplexImageCarouselView } from './types';
|
|
2
2
|
|
|
3
|
-
export declare const ComplexImageCarousel: ({ images }: TComplexImageCarouselView) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const ComplexImageCarousel: ({ view, images }: TComplexImageCarouselView) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,58 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
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,
|
|
44
|
-
{
|
|
45
|
-
left: {
|
|
46
|
-
onClick: v
|
|
47
|
-
},
|
|
48
|
-
right: {
|
|
49
|
-
onClick: w
|
|
50
|
-
},
|
|
51
|
-
className: s("progress-buttons", e.progressButton)
|
|
52
|
-
}
|
|
53
|
-
) })
|
|
54
|
-
] }) });
|
|
55
|
-
};
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { ComplexCarousel as m } from "./ComplexCarousel/ComplexCarousel.es.js";
|
|
4
|
+
import { SimpleImageCarousel as l } from "./SimpleImageCarousel/SimpleImageCarousel.es.js";
|
|
5
|
+
const i = ({ view: o, images: e }) => o === "simple" ? /* @__PURE__ */ r(l, { images: e }) : /* @__PURE__ */ r(m, { images: e });
|
|
56
6
|
export {
|
|
57
|
-
|
|
7
|
+
i as ComplexImageCarousel
|
|
58
8
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),c=require("react"),p=require("../../ComplexTooltip/ComplexTooltip.cjs.js");require("../../Icon/Icon.cjs.js");const o=require("../../Typography/Typography.cjs.js"),m=require("../../InfiniteScroll/InfiniteScroll.cjs.js"),e=require("./simpleImageCarousel.module.css.cjs.js"),d=({images:a})=>{const[l,r]=c.useState(null);return t.jsx("div",{className:e.default.simpleContainer,children:t.jsx(m.InfiniteScroll,{items:a,renderItem:(s,n)=>t.jsxs("div",{className:e.default.simpleItem,onMouseEnter:i=>{r({x:i.clientX,y:i.clientY})},onMouseMove:i=>{r({x:i.clientX,y:i.clientY})},children:[t.jsx(p.ComplexTooltip,{trigger:"hover",title:s.title||"",description:s.description||"",style:"light",transformMode:"absolute",transform:{top:(l==null?void 0:l.y)||0,left:l==null?void 0:l.x},children:t.jsx("img",{src:s.image,alt:s.title,className:e.default.simpleImage})}),t.jsx(o.Typography,{as:"h4",defaultVariant:"headingXs",mobileVariant:"bodyLg",className:e.default.simpleTitle,children:s.title}),t.jsx(o.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:e.default.simpleDescription,children:s.description})]},n),itemClassName:e.default.simpleItemWrapper,contentClassName:e.default.simpleContent,rootClassName:e.default.simpleRoot})})};exports.SimpleImageCarousel=d;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as l, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { useState as p } from "react";
|
|
4
|
+
import { ComplexTooltip as c } from "../../ComplexTooltip/ComplexTooltip.es.js";
|
|
5
|
+
import "../../Icon/Icon.es.js";
|
|
6
|
+
import { Typography as o } from "../../Typography/Typography.es.js";
|
|
7
|
+
import { InfiniteScroll as d } from "../../InfiniteScroll/InfiniteScroll.es.js";
|
|
8
|
+
import e from "./simpleImageCarousel.module.css.es.js";
|
|
9
|
+
const b = ({ images: m }) => {
|
|
10
|
+
const [t, s] = p(null);
|
|
11
|
+
return /* @__PURE__ */ l("div", { className: e.simpleContainer, children: /* @__PURE__ */ l(
|
|
12
|
+
d,
|
|
13
|
+
{
|
|
14
|
+
items: m,
|
|
15
|
+
renderItem: (i, a) => /* @__PURE__ */ n(
|
|
16
|
+
"div",
|
|
17
|
+
{
|
|
18
|
+
className: e.simpleItem,
|
|
19
|
+
onMouseEnter: (r) => {
|
|
20
|
+
s({
|
|
21
|
+
x: r.clientX,
|
|
22
|
+
y: r.clientY
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
onMouseMove: (r) => {
|
|
26
|
+
s({
|
|
27
|
+
x: r.clientX,
|
|
28
|
+
y: r.clientY
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ l(
|
|
33
|
+
c,
|
|
34
|
+
{
|
|
35
|
+
trigger: "hover",
|
|
36
|
+
title: i.title || "",
|
|
37
|
+
description: i.description || "",
|
|
38
|
+
style: "light",
|
|
39
|
+
transformMode: "absolute",
|
|
40
|
+
transform: { top: (t == null ? void 0 : t.y) || 0, left: t == null ? void 0 : t.x },
|
|
41
|
+
children: /* @__PURE__ */ l("img", { src: i.image, alt: i.title, className: e.simpleImage })
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ l(
|
|
45
|
+
o,
|
|
46
|
+
{
|
|
47
|
+
as: "h4",
|
|
48
|
+
defaultVariant: "headingXs",
|
|
49
|
+
mobileVariant: "bodyLg",
|
|
50
|
+
className: e.simpleTitle,
|
|
51
|
+
children: i.title
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ l(
|
|
55
|
+
o,
|
|
56
|
+
{
|
|
57
|
+
as: "p",
|
|
58
|
+
defaultVariant: "bodyMd",
|
|
59
|
+
mobileVariant: "bodySm",
|
|
60
|
+
className: e.simpleDescription,
|
|
61
|
+
children: i.description
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
a
|
|
67
|
+
),
|
|
68
|
+
itemClassName: e.simpleItemWrapper,
|
|
69
|
+
contentClassName: e.simpleContent,
|
|
70
|
+
rootClassName: e.simpleRoot
|
|
71
|
+
}
|
|
72
|
+
) });
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
b as SimpleImageCarousel
|
|
76
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SimpleImageCarousel } from './SimpleImageCarousel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="simpleImageCarousel-module__simpleContainer___ic1jr",s="simpleImageCarousel-module__simpleContent___FGCNH",m="simpleImageCarousel-module__simpleItemWrapper___Z9nwO",i="simpleImageCarousel-module__simpleItem___91wGk",l="simpleImageCarousel-module__simpleDescription___dV2Sv",t={simpleContainer:e,simpleContent:s,simpleItemWrapper:m,simpleItem:i,simpleDescription:l};exports.default=t;exports.simpleContainer=e;exports.simpleContent=s;exports.simpleDescription=l;exports.simpleItem=i;exports.simpleItemWrapper=m;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const e = "simpleImageCarousel-module__simpleContainer___ic1jr", s = "simpleImageCarousel-module__simpleContent___FGCNH", m = "simpleImageCarousel-module__simpleItemWrapper___Z9nwO", l = "simpleImageCarousel-module__simpleItem___91wGk", i = "simpleImageCarousel-module__simpleDescription___dV2Sv", p = {
|
|
2
|
+
simpleContainer: e,
|
|
3
|
+
simpleContent: s,
|
|
4
|
+
simpleItemWrapper: m,
|
|
5
|
+
simpleItem: l,
|
|
6
|
+
simpleDescription: i
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
p as default,
|
|
10
|
+
e as simpleContainer,
|
|
11
|
+
s as simpleContent,
|
|
12
|
+
i as simpleDescription,
|
|
13
|
+
l as simpleItem,
|
|
14
|
+
m as simpleItemWrapper
|
|
15
|
+
};
|
|
@@ -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 i=require("react/jsx-runtime"),e=require("react"),q=require("../../_virtual/Popover.cjs.js"),k=require("../../utils/useIsMobile.cjs.js"),P=require("./components/ComplexTooltipContent/ComplexTooltipContent.cjs.js"),E=require("./complexTooltip.module.css.cjs.js"),O=({trigger:n,title:a,description:m,link:v,transformMode:u="relative",transform:b={top:0,left:0},style:f="light",isBlurred:C=!1,children:c,positions:T=["top","bottom","left","right"],onClose:r})=>{const[d,l]=e.useState(!1),o=e.useRef(null),s=e.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>l(!0),200)},[]),t=e.useCallback(()=>{o.current=setTimeout(()=>{l(!1),r==null||r()},200)},[r]),p=e.useCallback(()=>l(h=>!h),[]),x=e.useMemo(()=>n==="hover"?{onMouseEnter:s,onMouseLeave:t}:{onClick:p},[n,s,t,p]),M=e.useMemo(()=>n==="hover"?{onMouseEnter:s,onMouseLeave:t}:{},[n,s,t]);return e.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]),k.useIsMobile()?c:i.jsx(q.PopoverExports.Popover,{isOpen:d,positions:T,padding:8,onClickOutside:t,containerClassName:E.default.popover,transformMode:u,transform:u==="absolute"?b:void 0,containerStyle:{pointerEvents:u==="absolute"?"none":"auto"},content:i.jsx(P.ComplexTooltipContent,{title:a,description:m,link:v,style:f,isBlurred:C,onClose:t,...M}),children:i.jsx("div",{...x,children:c})})};exports.ComplexTooltip=O;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { PopoverPosition } from 'react-tiny-popover';
|
|
2
|
+
import { PopoverPosition, PositionTransform } from 'react-tiny-popover';
|
|
3
3
|
import { CommonComplexTooltipProps } from './types';
|
|
4
4
|
|
|
5
5
|
type ComplexTooltipProps = {
|
|
6
6
|
children: ReactElement;
|
|
7
7
|
trigger: 'hover' | 'click';
|
|
8
8
|
positions?: Array<PopoverPosition>;
|
|
9
|
+
transformMode?: 'absolute' | 'relative';
|
|
10
|
+
transform?: PositionTransform;
|
|
11
|
+
onMouseEnter?: () => void;
|
|
9
12
|
} & CommonComplexTooltipProps;
|
|
10
|
-
export declare const ComplexTooltip: ({ trigger, title, description, link, style, isBlurred, children, positions, onClose, }: ComplexTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const ComplexTooltip: ({ trigger, title, description, link, transformMode, transform, style, isBlurred, children, positions, onClose, }: ComplexTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
14
|
export {};
|
|
@@ -1,62 +1,67 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { P as
|
|
5
|
-
import { useIsMobile as
|
|
6
|
-
import { ComplexTooltipContent as
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { useState as P, useRef as k, useCallback as l, useMemo as a, useEffect as O } from "react";
|
|
4
|
+
import { P as y } from "../../_virtual/Popover.es.js";
|
|
5
|
+
import { useIsMobile as L } from "../../utils/useIsMobile.es.js";
|
|
6
|
+
import { ComplexTooltipContent as S } from "./components/ComplexTooltipContent/ComplexTooltipContent.es.js";
|
|
7
7
|
import j from "./complexTooltip.module.css.es.js";
|
|
8
|
-
const
|
|
8
|
+
const B = ({
|
|
9
9
|
trigger: t,
|
|
10
10
|
title: m,
|
|
11
|
-
description:
|
|
12
|
-
link:
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
description: f,
|
|
12
|
+
link: v,
|
|
13
|
+
transformMode: s = "relative",
|
|
14
|
+
transform: b = { top: 0, left: 0 },
|
|
15
|
+
style: h = "light",
|
|
16
|
+
isBlurred: T = !1,
|
|
15
17
|
children: p,
|
|
16
18
|
positions: d = ["top", "bottom", "left", "right"],
|
|
17
19
|
onClose: r
|
|
18
20
|
}) => {
|
|
19
|
-
const [
|
|
20
|
-
e.current && clearTimeout(e.current), e.current = setTimeout(() =>
|
|
21
|
-
}, []), o =
|
|
21
|
+
const [C, i] = P(!1), e = k(null), n = l(() => {
|
|
22
|
+
e.current && clearTimeout(e.current), e.current = setTimeout(() => i(!0), 200);
|
|
23
|
+
}, []), o = l(() => {
|
|
22
24
|
e.current = setTimeout(() => {
|
|
23
|
-
|
|
25
|
+
i(!1), r == null || r();
|
|
24
26
|
}, 200);
|
|
25
|
-
}, [r]), c =
|
|
27
|
+
}, [r]), c = l(() => i((E) => !E), []), M = a(() => t === "hover" ? {
|
|
26
28
|
onMouseEnter: n,
|
|
27
29
|
onMouseLeave: o
|
|
28
30
|
} : {
|
|
29
31
|
onClick: c
|
|
30
|
-
}, [t, n, o, c]),
|
|
32
|
+
}, [t, n, o, c]), x = a(() => t === "hover" ? {
|
|
31
33
|
onMouseEnter: n,
|
|
32
34
|
onMouseLeave: o
|
|
33
35
|
} : {}, [t, n, o]);
|
|
34
|
-
return
|
|
36
|
+
return O(() => () => {
|
|
35
37
|
e.current && clearTimeout(e.current);
|
|
36
|
-
}, []),
|
|
37
|
-
|
|
38
|
+
}, []), L() ? p : /* @__PURE__ */ u(
|
|
39
|
+
y.Popover,
|
|
38
40
|
{
|
|
39
|
-
isOpen:
|
|
41
|
+
isOpen: C,
|
|
40
42
|
positions: d,
|
|
41
43
|
padding: 8,
|
|
42
44
|
onClickOutside: o,
|
|
43
45
|
containerClassName: j.popover,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
transformMode: s,
|
|
47
|
+
transform: s === "absolute" ? b : void 0,
|
|
48
|
+
containerStyle: { pointerEvents: s === "absolute" ? "none" : "auto" },
|
|
49
|
+
content: /* @__PURE__ */ u(
|
|
50
|
+
S,
|
|
46
51
|
{
|
|
47
52
|
title: m,
|
|
48
|
-
description:
|
|
49
|
-
link:
|
|
50
|
-
style:
|
|
51
|
-
isBlurred:
|
|
53
|
+
description: f,
|
|
54
|
+
link: v,
|
|
55
|
+
style: h,
|
|
56
|
+
isBlurred: T,
|
|
52
57
|
onClose: o,
|
|
53
|
-
...
|
|
58
|
+
...x
|
|
54
59
|
}
|
|
55
60
|
),
|
|
56
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ u("div", { ...M, children: p })
|
|
57
62
|
}
|
|
58
63
|
);
|
|
59
64
|
};
|
|
60
65
|
export {
|
|
61
|
-
|
|
66
|
+
B as ComplexTooltip
|
|
62
67
|
};
|
|
@@ -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 M=require("react/jsx-runtime"),e=require("react"),R=require("../../utils/cn/cn.cjs.js"),q=require("./infiniteScroll.module.css.cjs.js");function L({items:u,speed:d=50,direction:o="left",contentClassName:y,itemClassName:v,rootClassName:w,renderItem:b},A){const f=e.useRef(null),[i,p]=e.useState(0),[c,E]=e.useState(0),m=e.useRef(null),g=e.useRef(!1),h=e.useRef(performance.now()),[T,W]=e.useState(2);e.useEffect(()=>{f.current&&u.length>0&&setTimeout(()=>{var a,l,n;const r=((l=(a=f.current)==null?void 0:a.parentElement)==null?void 0:l.offsetWidth)||0,t=(((n=f.current)==null?void 0:n.scrollWidth)||0)/2,s=Math.ceil(r*2/t);W(Math.max(2,s%2===0?s:s+1)),E(t)},0)},[u]),e.useEffect(()=>{p(o==="right"?-c:0)},[c,o]);const S=e.useCallback(r=>{if(!g.current){const t=r??performance.now(),s=t-h.current||16.67;h.current=t,p(a=>{const l=o==="right"?-d:d,n=a-l*(s/1e3);if(o==="left"){if(n<=-c)return n+c}else if(o==="right"&&n>=0)return n-c;return n})}m.current=requestAnimationFrame(S)},[c,d,o]);e.useEffect(()=>(h.current=performance.now(),m.current=requestAnimationFrame(S),()=>{m.current&&cancelAnimationFrame(m.current)}),[S]);const F=e.useCallback(()=>{g.current=!0},[]),j=e.useCallback(()=>{g.current=!1,h.current=performance.now()},[]),C=e.useCallback((r,t=300)=>{const s=i,a=r-s,l=performance.now(),n=k=>{const I=k-l,x=Math.min(I/t,1),_=1-Math.pow(1-x,3);p(s+a*_),x<1&&requestAnimationFrame(n)};requestAnimationFrame(n)},[i]);return e.useImperativeHandle(A,()=>({scrollLeft:()=>{const r=i-200,t=Math.max(r,-c);C(t)},scrollRight:()=>{const r=i+200,t=Math.min(r,c);C(t)}})),M.jsx("div",{className:R.cn(q.default.root,w),onMouseEnter:F,onMouseLeave:j,children:M.jsx("div",{className:R.cn(q.default.content,y),style:{transform:`translate3D(${i}px, 0, 0)`},ref:f,children:Array.from({length:u.length*T},(r,t)=>M.jsx("div",{className:R.cn(q.default.item,v),children:b(u[t%u.length],t)},t))})})}const N=e.forwardRef(L);exports.InfiniteScroll=N;
|
|
@@ -1,67 +1,82 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { cn as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as H, useRef as h, useState as y, useEffect as C, useCallback as p, useImperativeHandle as P } from "react";
|
|
4
|
+
import { cn as R } from "../../utils/cn/cn.es.js";
|
|
5
|
+
import v from "./infiniteScroll.module.css.es.js";
|
|
6
|
+
function _({
|
|
7
|
+
items: l,
|
|
8
|
+
speed: d = 50,
|
|
9
|
+
direction: c = "left",
|
|
10
|
+
contentClassName: W,
|
|
11
|
+
itemClassName: q,
|
|
12
|
+
rootClassName: F,
|
|
13
|
+
renderItem: T
|
|
14
|
+
}, E) {
|
|
15
|
+
const i = h(null), [u, g] = y(0), [r, I] = y(0), m = h(null), M = h(!1), f = h(performance.now()), [L, N] = y(2);
|
|
16
|
+
C(() => {
|
|
17
|
+
i.current && l.length > 0 && setTimeout(() => {
|
|
18
|
+
var s, a, e;
|
|
19
|
+
const n = ((a = (s = i.current) == null ? void 0 : s.parentElement) == null ? void 0 : a.offsetWidth) || 0, t = (((e = i.current) == null ? void 0 : e.scrollWidth) || 0) / 2, o = Math.ceil(n * 2 / t);
|
|
20
|
+
N(Math.max(2, o % 2 === 0 ? o : o + 1)), I(t);
|
|
13
21
|
}, 0);
|
|
14
|
-
}, [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
}, [l]), C(() => {
|
|
23
|
+
g(c === "right" ? -r : 0);
|
|
24
|
+
}, [r, c]);
|
|
25
|
+
const w = p(
|
|
26
|
+
(n) => {
|
|
27
|
+
if (!M.current) {
|
|
28
|
+
const t = n ?? performance.now(), o = t - f.current || 16.67;
|
|
29
|
+
f.current = t, g((s) => {
|
|
30
|
+
const a = c === "right" ? -d : d, e = s - a * (o / 1e3);
|
|
31
|
+
if (c === "left") {
|
|
32
|
+
if (e <= -r)
|
|
33
|
+
return e + r;
|
|
34
|
+
} else if (c === "right" && e >= 0)
|
|
35
|
+
return e - r;
|
|
36
|
+
return e;
|
|
22
37
|
});
|
|
23
38
|
}
|
|
24
|
-
m.current = requestAnimationFrame(
|
|
39
|
+
m.current = requestAnimationFrame(w);
|
|
25
40
|
},
|
|
26
|
-
[
|
|
41
|
+
[r, d, c]
|
|
27
42
|
);
|
|
28
|
-
|
|
43
|
+
C(() => (f.current = performance.now(), m.current = requestAnimationFrame(w), () => {
|
|
29
44
|
m.current && cancelAnimationFrame(m.current);
|
|
30
|
-
}), [
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
}, []),
|
|
34
|
-
|
|
35
|
-
}, []),
|
|
36
|
-
(
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
|
|
45
|
+
}), [w]);
|
|
46
|
+
const X = p(() => {
|
|
47
|
+
M.current = !0;
|
|
48
|
+
}, []), b = p(() => {
|
|
49
|
+
M.current = !1, f.current = performance.now();
|
|
50
|
+
}, []), A = p(
|
|
51
|
+
(n, t = 300) => {
|
|
52
|
+
const o = u, s = n - o, a = performance.now(), e = (j) => {
|
|
53
|
+
const k = j - a, S = Math.min(k / t, 1), D = 1 - Math.pow(1 - S, 3);
|
|
54
|
+
g(o + s * D), S < 1 && requestAnimationFrame(e);
|
|
40
55
|
};
|
|
41
|
-
requestAnimationFrame(
|
|
56
|
+
requestAnimationFrame(e);
|
|
42
57
|
},
|
|
43
|
-
[
|
|
58
|
+
[u]
|
|
44
59
|
);
|
|
45
|
-
return
|
|
60
|
+
return P(E, () => ({
|
|
46
61
|
scrollLeft: () => {
|
|
47
|
-
const
|
|
48
|
-
|
|
62
|
+
const n = u - 200, t = Math.max(n, -r);
|
|
63
|
+
A(t);
|
|
49
64
|
},
|
|
50
65
|
scrollRight: () => {
|
|
51
|
-
const
|
|
52
|
-
|
|
66
|
+
const n = u + 200, t = Math.min(n, r);
|
|
67
|
+
A(t);
|
|
53
68
|
}
|
|
54
|
-
})), /* @__PURE__ */
|
|
69
|
+
})), /* @__PURE__ */ x("div", { className: R(v.root, F), onMouseEnter: X, onMouseLeave: b, children: /* @__PURE__ */ x(
|
|
55
70
|
"div",
|
|
56
71
|
{
|
|
57
|
-
className:
|
|
58
|
-
style: { transform: `translate3D(${
|
|
59
|
-
ref:
|
|
60
|
-
children: Array.from({ length:
|
|
72
|
+
className: R(v.content, W),
|
|
73
|
+
style: { transform: `translate3D(${u}px, 0, 0)` },
|
|
74
|
+
ref: i,
|
|
75
|
+
children: Array.from({ length: l.length * L }, (n, t) => /* @__PURE__ */ x("div", { className: R(v.item, q), children: T(l[t % l.length], t) }, t))
|
|
61
76
|
}
|
|
62
77
|
) });
|
|
63
78
|
}
|
|
64
|
-
const
|
|
79
|
+
const J = H(_);
|
|
65
80
|
export {
|
|
66
|
-
|
|
81
|
+
J as InfiniteScroll
|
|
67
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("../../utils/formatDate.cjs.js");require("../Icon/Icon.cjs.js");const l=require("../Icon/constants.cjs.js"),x=require("../Label/Label.cjs.js"),r=require("../TextButton/TextButton.cjs.js"),s=require("../Typography/Typography.cjs.js"),i=require("../../utils/cn/cn.cjs.js"),a=require("./studyGridCard.module.css.cjs.js");function b(d){if(d.compressed===!0){const{title:n,link:t,image:o}=d;return e.jsxs("div",{className:i.cn(a.default.study,a.default.studyCompressed),children:[e.jsx("div",{className:i.cn(a.default.imagePart,a.default.imagePartCompressed),style:{backgroundImage:`url(${o})`}}),e.jsxs("div",{className:i.cn(a.default.dataPart,a.default.dataPartCompressed),children:[e.jsx(s.Typography,{className:i.cn(a.default.title,a.default.titleCompressed),defaultVariant:"headingSm",mobileVariant:"bodySm",as:"h6",children:n}),e.jsxs("div",{className:a.default.button,children:[e.jsx(r.TextButton,{hideOn:"desktop",className:a.default.mobileButton,size:"sm",as:"a",href:t,suffixIcon:l.EIconName.ARROW_FORWARD,children:"READ MORE"}),e.jsx(r.TextButton,{hideOn:"mobile",className:a.default.desktopButton,size:"lg",as:"a",href:t,suffixIcon:l.EIconName.ARROW_FORWARD,children:"READ MORE"})]})]}),e.jsx("div",{className:a.default.borderLeft}),e.jsx("div",{className:a.default.borderRight})]})}else{const{title:n,link:t,image:o,inverted:c,date:m,label:u,readTime:f}=d;return e.jsxs("div",{className:a.default.study,"data-inverted":c,children:[e.jsx("div",{className:a.default.imagePart,style:{backgroundImage:`url(${o})`},children:u&&e.jsx(x.Label,{...u})}),e.jsxs("div",{className:a.default.dataPart,children:[e.jsxs("div",{className:a.default.info,children:[e.jsx(s.Typography,{defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"medium",color:"color-neutral-500",children:h.formatDate(m)}),e.jsxs(e.Fragment,{children:[e.jsx(s.Typography,{defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"medium",color:"color-neutral-500",children:"•"}),e.jsxs(s.Typography,{defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"medium",color:"color-neutral-500",children:[f," MIN READ"]})]})]}),e.jsx(s.Typography,{className:a.default.title,defaultVariant:"headingSm",mobileVariant:"bodySm",as:"h6",children:n}),e.jsxs("div",{className:a.default.button,children:[e.jsx(r.TextButton,{hideOn:"desktop",className:a.default.mobileButton,size:"sm",as:"a",href:t,suffixIcon:l.EIconName.ARROW_FORWARD,children:"READ MORE"}),e.jsx(r.TextButton,{hideOn:"mobile",className:a.default.desktopButton,size:"lg",as:"a",href:t,suffixIcon:l.EIconName.ARROW_FORWARD,children:"READ MORE"})]})]})]})}}exports.StudyGridCard=b;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { LabelProps } from '../Label';
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type CompressedStudyCardProps = {
|
|
4
|
+
compressed: true;
|
|
5
|
+
title: string;
|
|
6
|
+
link: string;
|
|
7
|
+
image: string;
|
|
8
|
+
};
|
|
9
|
+
export type CompleteStudyCardProps = {
|
|
10
|
+
compressed?: false;
|
|
4
11
|
title: string;
|
|
5
12
|
inverted?: boolean;
|
|
6
13
|
image: string;
|
|
@@ -9,4 +16,5 @@ export type StudyGridCardProps = {
|
|
|
9
16
|
readTime: number;
|
|
10
17
|
link: string;
|
|
11
18
|
};
|
|
12
|
-
export
|
|
19
|
+
export type StudyGridCardProps = CompressedStudyCardProps | CompleteStudyCardProps;
|
|
20
|
+
export declare function StudyGridCard(props: StudyGridCardProps): import("react/jsx-runtime").JSX.Element;
|