@zenpatient-org/healthspan-marketing-ui 0.1.134 → 0.1.136
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/ImageGallery/ImageGallery.cjs.js +1 -1
- package/dist/components/ImageGallery/ImageGallery.es.js +36 -19
- package/dist/components/InfiniteScroll/InfiniteScroll.cjs.js +1 -1
- package/dist/components/InfiniteScroll/InfiniteScroll.d.ts +2 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.es.js +138 -67
- package/dist/components/InfiniteScroll/infiniteScroll.module.css.cjs.js +1 -1
- package/dist/components/InfiniteScroll/infiniteScroll.module.css.es.js +8 -6
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/lib/useSwiper.d.ts +9 -2
- package/dist/modules/Curiosity/Curiosity.cjs.js +1 -1
- package/dist/modules/Curiosity/Curiosity.es.js +15 -12
- package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.cjs.js +1 -1
- package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.d.ts +1 -1
- package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.es.js +11 -9
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.cjs.js +1 -1
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.d.ts +2 -1
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.es.js +41 -38
- package/dist/modules/HSModal/types.d.ts +1 -0
- package/dist/modules/HowItWorks/components/Content/Content.d.ts +2 -2
- package/dist/utils/useSwiper/useSwiper.cjs.js +1 -1
- package/dist/utils/useSwiper/useSwiper.es.js +66 -36
- package/package.json +1 -1
package/dist/lib/useSwiper.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Swiper as SwiperType } from 'swiper';
|
|
3
3
|
|
|
4
|
-
export type
|
|
4
|
+
export type BaseSwiperReturnProps = {
|
|
5
5
|
swiper: SwiperType | null;
|
|
6
6
|
setSwiper: React.Dispatch<React.SetStateAction<SwiperType | null>>;
|
|
7
7
|
activeIndex: number;
|
|
@@ -20,4 +20,11 @@ export type UseSwiperReturnProps = {
|
|
|
20
20
|
onSwiperInit: (swiper: SwiperType) => void;
|
|
21
21
|
handleSwiperResize: (swiper: SwiperType) => void;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type AutoPlaySwiperReturnProps = BaseSwiperReturnProps & {
|
|
24
|
+
isAutoPlay: boolean;
|
|
25
|
+
stopAutoPlay: () => void;
|
|
26
|
+
startAutoPlay: () => void;
|
|
27
|
+
handleUserInteraction: () => void;
|
|
28
|
+
};
|
|
29
|
+
export declare const useSwiper: () => BaseSwiperReturnProps;
|
|
30
|
+
export declare const useSwiperWithAutoPlay: (autoPlayInterval?: number) => AutoPlaySwiperReturnProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../components/Button/Button.cjs.js"),m=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),o=require("../../components/InfiniteScroll/InfiniteScroll.cjs.js"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../components/Button/Button.cjs.js"),m=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),o=require("../../components/InfiniteScroll/InfiniteScroll.cjs.js"),a=require("../../components/Typography/Typography.cjs.js"),d=require("../../components/StudyGridCard/StudyGridCard.cjs.js"),f=require("../../utils/cn/cn.cjs.js"),t=require("./curiosity.module.css.cjs.js"),h=({title:c,description:r,studies:s,indexed:i})=>e.jsxs("div",{className:f.cn(t.default.root,{[t.default.notIndexed]:!i}),children:[e.jsxs("div",{className:t.default.contentContainer,children:[e.jsxs("div",{className:t.default.containerHeader,children:[e.jsx(m.HighlightedTitle,{title:c,className:t.default.title,defaultVariant:"displayXl",mobileVariant:"displayXs"}),e.jsxs("div",{className:t.default.contentTextContainer,children:[r&&e.jsx(a.Typography,{defaultVariant:"bodyLg",mobileVariant:"bodySm",className:t.default.contentText,children:r}),e.jsx("div",{className:t.default.buttonContainer,children:e.jsx(u.Button,{as:"a",href:"/research",variant:"muted",size:"lg",children:"View all studies"})})]})]}),i&&e.jsxs("div",{className:t.default.dividerContainer,children:[e.jsx(a.Typography,{defaultVariant:"labelMd",children:i.number}),e.jsx("div",{className:t.default.divider}),e.jsx(a.Typography,{defaultVariant:"labelMd",emphasis:!0,children:i.label})]})]}),e.jsxs("div",{className:t.default.containerBottom,children:[e.jsx(o.InfiniteScroll,{items:s,speed:50,slowOnTouch:!0,enableManualScroll:!0,contentClassName:t.default.infiniteScrollContent,itemClassName:t.default.infiniteScrollItem,rootClassName:t.default.infiniteScrollRoot,renderItem:(l,n)=>e.jsx(d.StudyGridCard,{...l,compressed:!0},n)}),e.jsx(o.InfiniteScroll,{items:s,speed:50,direction:"right",slowOnTouch:!0,enableManualScroll:!0,contentClassName:t.default.infiniteScrollContent,itemClassName:t.default.infiniteScrollItemTwo,renderItem:(l,n)=>e.jsx(d.StudyGridCard,{...l,compressed:!0},n)})]})]});exports.Curiosity=h;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { Button as
|
|
3
|
+
import { Button as u } from "../../components/Button/Button.es.js";
|
|
4
4
|
import { HighlightedTitle as h } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
|
|
5
5
|
import { InfiniteScroll as m } from "../../components/InfiniteScroll/InfiniteScroll.es.js";
|
|
6
|
-
import { Typography as
|
|
6
|
+
import { Typography as n } from "../../components/Typography/Typography.es.js";
|
|
7
7
|
import { StudyGridCard as c } from "../../components/StudyGridCard/StudyGridCard.es.js";
|
|
8
|
+
import { cn as f } from "../../utils/cn/cn.es.js";
|
|
8
9
|
import e from "./curiosity.module.css.es.js";
|
|
9
|
-
|
|
10
|
-
const g = ({ title: d, description: o, studies: s, indexed: r }) => /* @__PURE__ */ i("div", { className: p(e.root, { [e.notIndexed]: !r }), children: [
|
|
10
|
+
const V = ({ title: d, description: o, studies: s, indexed: r }) => /* @__PURE__ */ i("div", { className: f(e.root, { [e.notIndexed]: !r }), children: [
|
|
11
11
|
/* @__PURE__ */ i("div", { className: e.contentContainer, children: [
|
|
12
12
|
/* @__PURE__ */ i("div", { className: e.containerHeader, children: [
|
|
13
13
|
/* @__PURE__ */ t(
|
|
@@ -20,14 +20,14 @@ const g = ({ title: d, description: o, studies: s, indexed: r }) => /* @__PURE__
|
|
|
20
20
|
}
|
|
21
21
|
),
|
|
22
22
|
/* @__PURE__ */ i("div", { className: e.contentTextContainer, children: [
|
|
23
|
-
o && /* @__PURE__ */ t(
|
|
24
|
-
/* @__PURE__ */ t("div", { className: e.buttonContainer, children: /* @__PURE__ */ t(
|
|
23
|
+
o && /* @__PURE__ */ t(n, { defaultVariant: "bodyLg", mobileVariant: "bodySm", className: e.contentText, children: o }),
|
|
24
|
+
/* @__PURE__ */ t("div", { className: e.buttonContainer, children: /* @__PURE__ */ t(u, { as: "a", href: "/research", variant: "muted", size: "lg", children: "View all studies" }) })
|
|
25
25
|
] })
|
|
26
26
|
] }),
|
|
27
27
|
r && /* @__PURE__ */ i("div", { className: e.dividerContainer, children: [
|
|
28
|
-
/* @__PURE__ */ t(
|
|
28
|
+
/* @__PURE__ */ t(n, { defaultVariant: "labelMd", children: r.number }),
|
|
29
29
|
/* @__PURE__ */ t("div", { className: e.divider }),
|
|
30
|
-
/* @__PURE__ */ t(
|
|
30
|
+
/* @__PURE__ */ t(n, { defaultVariant: "labelMd", emphasis: !0, children: r.label })
|
|
31
31
|
] })
|
|
32
32
|
] }),
|
|
33
33
|
/* @__PURE__ */ i("div", { className: e.containerBottom, children: [
|
|
@@ -36,10 +36,12 @@ const g = ({ title: d, description: o, studies: s, indexed: r }) => /* @__PURE__
|
|
|
36
36
|
{
|
|
37
37
|
items: s,
|
|
38
38
|
speed: 50,
|
|
39
|
+
slowOnTouch: !0,
|
|
40
|
+
enableManualScroll: !0,
|
|
39
41
|
contentClassName: e.infiniteScrollContent,
|
|
40
42
|
itemClassName: e.infiniteScrollItem,
|
|
41
43
|
rootClassName: e.infiniteScrollRoot,
|
|
42
|
-
renderItem: (a,
|
|
44
|
+
renderItem: (a, l) => /* @__PURE__ */ t(c, { ...a, compressed: !0 }, l)
|
|
43
45
|
}
|
|
44
46
|
),
|
|
45
47
|
/* @__PURE__ */ t(
|
|
@@ -48,14 +50,15 @@ const g = ({ title: d, description: o, studies: s, indexed: r }) => /* @__PURE__
|
|
|
48
50
|
items: s,
|
|
49
51
|
speed: 50,
|
|
50
52
|
direction: "right",
|
|
53
|
+
slowOnTouch: !0,
|
|
54
|
+
enableManualScroll: !0,
|
|
51
55
|
contentClassName: e.infiniteScrollContent,
|
|
52
56
|
itemClassName: e.infiniteScrollItemTwo,
|
|
53
|
-
|
|
54
|
-
renderItem: (a, n) => /* @__PURE__ */ t(c, { ...a, compressed: !0 }, n)
|
|
57
|
+
renderItem: (a, l) => /* @__PURE__ */ t(c, { ...a, compressed: !0 }, l)
|
|
55
58
|
}
|
|
56
59
|
)
|
|
57
60
|
] })
|
|
58
61
|
] });
|
|
59
62
|
export {
|
|
60
|
-
|
|
63
|
+
V as Curiosity
|
|
61
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../../../../components/Typography/Typography.cjs.js"),c=require("../../../../utils/cn/cn.cjs.js"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../../../../components/Typography/Typography.cjs.js"),c=require("../../../../utils/cn/cn.cjs.js"),f=require("./components/Newsletter/Newsletter.cjs.js"),a=require("./mailchimpModal.module.css.cjs.js"),j=({title:n,description:t,buttonText:d,image:s,layout:i="plain-column",colorScheme:l="light",onCloseCallback:o,onClickCallback:u,cancelButtonText:p="no, thanks",tags:m,placeholder:h})=>{const g=y=>{y.stopPropagation()};return e.jsxs("div",{className:c.cn(a.default.contentWrapper,a.default[l]),"data-image-position":i,onClick:g,children:[e.jsxs("div",{className:c.cn(a.default.content,a.default[l]),children:[(n||t)&&e.jsxs("div",{className:a.default.text,children:[n&&e.jsx(r.Typography,{defaultVariant:"headingLg",children:n}),t&&e.jsx(r.Typography,{defaultVariant:"bodySm",children:t})]}),e.jsx(f.Newsletter,{buttonText:d,cancelButtonText:p,colorScheme:l,onCloseCallback:o,onClickCallback:u,tags:m,placeholder:h})]}),s&&i!=="plain-column"&&e.jsx("div",{className:a.default.imageWrapper,children:e.jsx("div",{style:{backgroundImage:`url(${s})`},className:a.default.image})})]})};exports.MailchimpModal=j;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TMailchimpModal } from '../../types';
|
|
2
2
|
|
|
3
|
-
export declare const MailchimpModal: ({ title, description, buttonText, image, layout, colorScheme, onCloseCallback, onClickCallback, cancelButtonText, tags, }: Omit<TMailchimpModal, "id" | "type">) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const MailchimpModal: ({ title, description, buttonText, image, layout, colorScheme, onCloseCallback, onClickCallback, cancelButtonText, tags, placeholder, }: Omit<TMailchimpModal, "id" | "type">) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsxs as t, jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import { Typography as s } from "../../../../components/Typography/Typography.es.js";
|
|
4
4
|
import { cn as m } from "../../../../utils/cn/cn.es.js";
|
|
5
|
-
import { Newsletter as
|
|
5
|
+
import { Newsletter as v } from "./components/Newsletter/Newsletter.es.js";
|
|
6
6
|
import a from "./mailchimpModal.module.css.es.js";
|
|
7
|
-
const
|
|
7
|
+
const j = ({
|
|
8
8
|
title: i,
|
|
9
9
|
description: r,
|
|
10
10
|
buttonText: c,
|
|
@@ -14,17 +14,18 @@ const b = ({
|
|
|
14
14
|
onCloseCallback: d,
|
|
15
15
|
onClickCallback: p,
|
|
16
16
|
cancelButtonText: h = "no, thanks",
|
|
17
|
-
tags: g
|
|
17
|
+
tags: g,
|
|
18
|
+
placeholder: f
|
|
18
19
|
}) => {
|
|
19
|
-
const
|
|
20
|
-
|
|
20
|
+
const u = (N) => {
|
|
21
|
+
N.stopPropagation();
|
|
21
22
|
};
|
|
22
23
|
return /* @__PURE__ */ t(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
26
|
className: m(a.contentWrapper, a[e]),
|
|
26
27
|
"data-image-position": o,
|
|
27
|
-
onClick:
|
|
28
|
+
onClick: u,
|
|
28
29
|
children: [
|
|
29
30
|
/* @__PURE__ */ t("div", { className: m(a.content, a[e]), children: [
|
|
30
31
|
(i || r) && /* @__PURE__ */ t("div", { className: a.text, children: [
|
|
@@ -32,14 +33,15 @@ const b = ({
|
|
|
32
33
|
r && /* @__PURE__ */ n(s, { defaultVariant: "bodySm", children: r })
|
|
33
34
|
] }),
|
|
34
35
|
/* @__PURE__ */ n(
|
|
35
|
-
|
|
36
|
+
v,
|
|
36
37
|
{
|
|
37
38
|
buttonText: c,
|
|
38
39
|
cancelButtonText: h,
|
|
39
40
|
colorScheme: e,
|
|
40
41
|
onCloseCallback: d,
|
|
41
42
|
onClickCallback: p,
|
|
42
|
-
tags: g
|
|
43
|
+
tags: g,
|
|
44
|
+
placeholder: f
|
|
43
45
|
}
|
|
44
46
|
)
|
|
45
47
|
] }),
|
|
@@ -49,5 +51,5 @@ const b = ({
|
|
|
49
51
|
);
|
|
50
52
|
};
|
|
51
53
|
export {
|
|
52
|
-
|
|
54
|
+
j as MailchimpModal
|
|
53
55
|
};
|
package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react"),I=require("../../../../../../components/TextInput/TextInput.cjs.js"),B=require("../../../../../../node_modules/react-mailchimp-subscribe/es/index.cjs.js"),M=require("../../../../../../utils/isValidEmail.cjs.js"),x=require("../../../../../../components/Button/Button.cjs.js"),y=require("./newsletter.module.css.cjs.js"),N=e=>`//gethealthspan.us21.list-manage.com/subscribe/post?u=664ad54ec243b3582164cf116&id=2483a4d606&f_id=0050e6e6f0&tags=${e}`,P=({status:e,message:o,subscribe:c,buttonText:l,colorScheme:d,onCloseCallback:r,cancelButtonText:m,onClickCallback:a,placeholder:f})=>{const[i,p]=u.useState(""),[g,s]=u.useState(!1),[j,n]=u.useState(""),[q,h]=u.useState(!1),E=v=>{p(v.target.value),g&&(s(!1),n("")),h(v.target.value.length>0)},S=()=>{if(!i){s(!0),n("Please enter your email address");return}if(!M.isValidEmail(i)){s(!0),n("Please enter a valid email address");return}s(!1),n(""),c({EMAIL:i}),a==null||a()};u.useEffect(()=>{e==="success"&&(p(""),s(!1),n(""),h(!1),r==null||r()),e==="error"&&typeof o=="string"&&(s(!0),n("Subscription failed. Please try again."))},[e,o]);const T=d==="light"?"primary":"primary-invert",_=d==="light"?"primary":"primary-invert";return t.jsxs("div",{className:y.default.interface,children:[t.jsx(I.TextInput,{placeholder:f||"Email",variant:T,value:i,handleChange:E,error:g,errorText:j,active:q}),t.jsxs("div",{className:y.default.buttonContainer,children:[t.jsx(x.Button,{size:"md",variant:_,onClick:S,children:e==="sending"?"submitting…":l}),t.jsx(x.Button,{size:"md",variant:"ghost",onClick:r,children:m})]})]})},V=({buttonText:e,colorScheme:o,onCloseCallback:c,cancelButtonText:l,tags:d,onClickCallback:r,placeholder:m})=>t.jsx(B.default,{url:N(d),render:({subscribe:a,status:f,message:i})=>t.jsx(P,{status:f,message:i,subscribe:a,buttonText:e,colorScheme:o,onCloseCallback:c,onClickCallback:r,cancelButtonText:l,placeholder:m})});exports.Newsletter=V;
|
package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export declare const Newsletter: ({ buttonText, colorScheme, onCloseCallback, cancelButtonText, tags, onClickCallback, }: {
|
|
1
|
+
export declare const Newsletter: ({ buttonText, colorScheme, onCloseCallback, cancelButtonText, tags, onClickCallback, placeholder, }: {
|
|
2
2
|
buttonText: string;
|
|
3
3
|
colorScheme: "light" | "dark";
|
|
4
4
|
onCloseCallback?: () => void;
|
|
5
5
|
cancelButtonText: string;
|
|
6
6
|
tags: string;
|
|
7
7
|
onClickCallback?: () => void;
|
|
8
|
+
placeholder?: string;
|
|
8
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as n, jsxs as
|
|
3
|
-
import { useState as u, useEffect as
|
|
4
|
-
import { TextInput as
|
|
5
|
-
import
|
|
6
|
-
import { isValidEmail as
|
|
7
|
-
import { Button as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
2
|
+
import { jsx as n, jsxs as y } from "react/jsx-runtime";
|
|
3
|
+
import { useState as u, useEffect as V } from "react";
|
|
4
|
+
import { TextInput as j } from "../../../../../../components/TextInput/TextInput.es.js";
|
|
5
|
+
import z from "../../../../../../node_modules/react-mailchimp-subscribe/es/index.es.js";
|
|
6
|
+
import { isValidEmail as A } from "../../../../../../utils/isValidEmail.es.js";
|
|
7
|
+
import { Button as E } from "../../../../../../components/Button/Button.es.js";
|
|
8
|
+
import x from "./newsletter.module.css.es.js";
|
|
9
|
+
const b = (e) => `//gethealthspan.us21.list-manage.com/subscribe/post?u=664ad54ec243b3582164cf116&id=2483a4d606&f_id=0050e6e6f0&tags=${e}`, w = ({
|
|
10
10
|
status: e,
|
|
11
11
|
message: m,
|
|
12
12
|
subscribe: f,
|
|
@@ -14,16 +14,17 @@ const A = (e) => `//gethealthspan.us21.list-manage.com/subscribe/post?u=664ad54e
|
|
|
14
14
|
colorScheme: o,
|
|
15
15
|
onCloseCallback: r,
|
|
16
16
|
cancelButtonText: p,
|
|
17
|
-
onClickCallback: a
|
|
17
|
+
onClickCallback: a,
|
|
18
|
+
placeholder: c
|
|
18
19
|
}) => {
|
|
19
|
-
const [t,
|
|
20
|
-
|
|
21
|
-
},
|
|
20
|
+
const [t, l] = u(""), [h, i] = u(!1), [M, s] = u(""), [I, g] = u(!1), N = (v) => {
|
|
21
|
+
l(v.target.value), h && (i(!1), s("")), g(v.target.value.length > 0);
|
|
22
|
+
}, P = () => {
|
|
22
23
|
if (!t) {
|
|
23
24
|
i(!0), s("Please enter your email address");
|
|
24
25
|
return;
|
|
25
26
|
}
|
|
26
|
-
if (!
|
|
27
|
+
if (!A(t)) {
|
|
27
28
|
i(!0), s("Please enter a valid email address");
|
|
28
29
|
return;
|
|
29
30
|
}
|
|
@@ -31,58 +32,60 @@ const A = (e) => `//gethealthspan.us21.list-manage.com/subscribe/post?u=664ad54e
|
|
|
31
32
|
EMAIL: t
|
|
32
33
|
}), a == null || a();
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
-
e === "success" && (
|
|
35
|
+
V(() => {
|
|
36
|
+
e === "success" && (l(""), i(!1), s(""), g(!1), r == null || r()), e === "error" && typeof m == "string" && (i(!0), s("Subscription failed. Please try again."));
|
|
36
37
|
}, [e, m]);
|
|
37
|
-
const
|
|
38
|
-
return /* @__PURE__ */
|
|
38
|
+
const S = o === "light" ? "primary" : "primary-invert", T = o === "light" ? "primary" : "primary-invert";
|
|
39
|
+
return /* @__PURE__ */ y("div", { className: x.interface, children: [
|
|
39
40
|
/* @__PURE__ */ n(
|
|
40
|
-
|
|
41
|
+
j,
|
|
41
42
|
{
|
|
42
|
-
placeholder: "Email",
|
|
43
|
-
variant:
|
|
43
|
+
placeholder: c || "Email",
|
|
44
|
+
variant: S,
|
|
44
45
|
value: t,
|
|
45
|
-
handleChange:
|
|
46
|
-
error:
|
|
47
|
-
errorText:
|
|
48
|
-
active:
|
|
46
|
+
handleChange: N,
|
|
47
|
+
error: h,
|
|
48
|
+
errorText: M,
|
|
49
|
+
active: I
|
|
49
50
|
}
|
|
50
51
|
),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */ n(
|
|
53
|
-
/* @__PURE__ */ n(
|
|
52
|
+
/* @__PURE__ */ y("div", { className: x.buttonContainer, children: [
|
|
53
|
+
/* @__PURE__ */ n(E, { size: "md", variant: T, onClick: P, children: e === "sending" ? "submitting…" : d }),
|
|
54
|
+
/* @__PURE__ */ n(E, { size: "md", variant: "ghost", onClick: r, children: p })
|
|
54
55
|
] })
|
|
55
56
|
] });
|
|
56
|
-
},
|
|
57
|
+
}, D = ({
|
|
57
58
|
buttonText: e,
|
|
58
59
|
colorScheme: m,
|
|
59
60
|
onCloseCallback: f,
|
|
60
61
|
cancelButtonText: d,
|
|
61
62
|
tags: o,
|
|
62
|
-
onClickCallback: r
|
|
63
|
+
onClickCallback: r,
|
|
64
|
+
placeholder: p
|
|
63
65
|
}) => /* @__PURE__ */ n(
|
|
64
|
-
|
|
66
|
+
z,
|
|
65
67
|
{
|
|
66
|
-
url:
|
|
68
|
+
url: b(o),
|
|
67
69
|
render: ({
|
|
68
|
-
subscribe:
|
|
69
|
-
status:
|
|
70
|
+
subscribe: a,
|
|
71
|
+
status: c,
|
|
70
72
|
message: t
|
|
71
73
|
}) => /* @__PURE__ */ n(
|
|
72
|
-
|
|
74
|
+
w,
|
|
73
75
|
{
|
|
74
|
-
status:
|
|
76
|
+
status: c,
|
|
75
77
|
message: t,
|
|
76
|
-
subscribe:
|
|
78
|
+
subscribe: a,
|
|
77
79
|
buttonText: e,
|
|
78
80
|
colorScheme: m,
|
|
79
81
|
onCloseCallback: f,
|
|
80
82
|
onClickCallback: r,
|
|
81
|
-
cancelButtonText: d
|
|
83
|
+
cancelButtonText: d,
|
|
84
|
+
placeholder: p
|
|
82
85
|
}
|
|
83
86
|
)
|
|
84
87
|
}
|
|
85
88
|
);
|
|
86
89
|
export {
|
|
87
|
-
|
|
90
|
+
D as Newsletter
|
|
88
91
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseSwiperReturnProps } from '../../../../lib/useSwiper';
|
|
2
2
|
|
|
3
3
|
type ContentProps = {
|
|
4
4
|
items: Array<{
|
|
@@ -8,7 +8,7 @@ type ContentProps = {
|
|
|
8
8
|
}>;
|
|
9
9
|
colorScheme: 'light' | 'dark';
|
|
10
10
|
showBottomNav: boolean;
|
|
11
|
-
swiper:
|
|
11
|
+
swiper: BaseSwiperReturnProps;
|
|
12
12
|
};
|
|
13
13
|
export declare const Content: ({ items, colorScheme, showBottomNav, swiper }: ContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),h=()=>{const[n,s]=e.useState(null),[u,r]=e.useState(0),[a,l]=e.useState(!0),[f,c]=e.useState(!1),[d,o]=e.useState(!1),i=e.useCallback(t=>{r(t.activeIndex),c(t.isEnd),l(t.isBeginning)},[]),b=e.useCallback(()=>{n&&(n.slidePrev(),i(n))},[n,i]),v=e.useCallback(()=>{n&&(n.slideNext(),i(n))},[n,i]),S=e.useCallback(t=>{n&&(n.slideTo(t),i(n))},[n,i]),g=t=>{s(t),o(t==null?void 0:t.isLocked),i(t)},k=e.useCallback(t=>{c(t.isEnd),o(t==null?void 0:t.isLocked),i(t)},[i]),C=e.useCallback(()=>{c(!0),l(!1)},[]),E=e.useCallback(()=>{l(!0),c(!1)},[]);return{swiper:n,setSwiper:s,activeIndex:u,setActiveIndex:r,isEnd:f,setIsEnd:c,hideNav:d,handleSlideChange:i,handlePrevClick:b,handleNextClick:v,handleSlideTo:S,onSwiperInit:g,handleSwiperResize:k,isBeginning:a,setIsBeginning:l,handleReachEnd:C,handleReachBeginning:E}},y=(n=3e3)=>{const s=h(),[u,r]=e.useState(!0),a=e.useRef(null),l=e.useCallback(()=>{r(!1),a.current&&(clearInterval(a.current),a.current=null)},[]),f=e.useCallback(()=>{r(!0)},[]),c=e.useCallback(()=>{l()},[l]);return e.useEffect(()=>{if(!(!u||!s.swiper||s.swiper.slides.length<=1))return a.current=setInterval(()=>{s.swiper&&(s.isEnd?s.swiper.slideTo(0):s.swiper.slideNext())},n),()=>{a.current&&(clearInterval(a.current),a.current=null)}},[u,s.swiper,s.isEnd,n]),e.useEffect(()=>{const d=()=>l(),o=()=>{document.hidden&&l()};return window.addEventListener("beforeunload",d),document.addEventListener("visibilitychange",o),()=>{window.removeEventListener("beforeunload",d),document.removeEventListener("visibilitychange",o)}},[l]),{...s,isAutoPlay:u,stopAutoPlay:l,startAutoPlay:f,handleUserInteraction:c}};exports.useSwiper=h;exports.useSwiperWithAutoPlay=y;
|
|
@@ -1,48 +1,78 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
const
|
|
3
|
-
const [n,
|
|
4
|
-
|
|
5
|
-
}, []),
|
|
6
|
-
n && (n.slidePrev(),
|
|
7
|
-
}, [n,
|
|
8
|
-
n && (n.slideNext(),
|
|
9
|
-
}, [n,
|
|
1
|
+
import { useState as c, useCallback as r, useRef as y, useEffect as v } from "react";
|
|
2
|
+
const A = () => {
|
|
3
|
+
const [n, t] = c(null), [d, a] = c(0), [l, i] = c(!0), [h, o] = c(!1), [f, u] = c(!1), s = r((e) => {
|
|
4
|
+
a(e.activeIndex), o(e.isEnd), i(e.isBeginning);
|
|
5
|
+
}, []), g = r(() => {
|
|
6
|
+
n && (n.slidePrev(), s(n));
|
|
7
|
+
}, [n, s]), E = r(() => {
|
|
8
|
+
n && (n.slideNext(), s(n));
|
|
9
|
+
}, [n, s]), S = r(
|
|
10
10
|
(e) => {
|
|
11
|
-
n && (n.slideTo(e),
|
|
11
|
+
n && (n.slideTo(e), s(n));
|
|
12
12
|
},
|
|
13
|
-
[n,
|
|
14
|
-
),
|
|
15
|
-
|
|
16
|
-
},
|
|
13
|
+
[n, s]
|
|
14
|
+
), m = (e) => {
|
|
15
|
+
t(e), u(e == null ? void 0 : e.isLocked), s(e);
|
|
16
|
+
}, I = r(
|
|
17
17
|
(e) => {
|
|
18
|
-
|
|
18
|
+
o(e.isEnd), u(e == null ? void 0 : e.isLocked), s(e);
|
|
19
19
|
},
|
|
20
|
-
[
|
|
21
|
-
),
|
|
22
|
-
|
|
23
|
-
}, []),
|
|
24
|
-
|
|
20
|
+
[s]
|
|
21
|
+
), b = r(() => {
|
|
22
|
+
o(!0), i(!1);
|
|
23
|
+
}, []), x = r(() => {
|
|
24
|
+
i(!0), o(!1);
|
|
25
25
|
}, []);
|
|
26
26
|
return {
|
|
27
27
|
swiper: n,
|
|
28
|
-
setSwiper:
|
|
29
|
-
activeIndex:
|
|
30
|
-
setActiveIndex:
|
|
31
|
-
isEnd:
|
|
32
|
-
setIsEnd:
|
|
28
|
+
setSwiper: t,
|
|
29
|
+
activeIndex: d,
|
|
30
|
+
setActiveIndex: a,
|
|
31
|
+
isEnd: h,
|
|
32
|
+
setIsEnd: o,
|
|
33
33
|
hideNav: f,
|
|
34
|
-
handleSlideChange:
|
|
35
|
-
handlePrevClick:
|
|
36
|
-
handleNextClick:
|
|
37
|
-
handleSlideTo:
|
|
38
|
-
onSwiperInit:
|
|
39
|
-
handleSwiperResize:
|
|
40
|
-
isBeginning:
|
|
41
|
-
setIsBeginning:
|
|
42
|
-
handleReachEnd:
|
|
43
|
-
handleReachBeginning:
|
|
34
|
+
handleSlideChange: s,
|
|
35
|
+
handlePrevClick: g,
|
|
36
|
+
handleNextClick: E,
|
|
37
|
+
handleSlideTo: S,
|
|
38
|
+
onSwiperInit: m,
|
|
39
|
+
handleSwiperResize: I,
|
|
40
|
+
isBeginning: l,
|
|
41
|
+
setIsBeginning: i,
|
|
42
|
+
handleReachEnd: b,
|
|
43
|
+
handleReachBeginning: x
|
|
44
|
+
};
|
|
45
|
+
}, P = (n = 3e3) => {
|
|
46
|
+
const t = A(), [d, a] = c(!0), l = y(null), i = r(() => {
|
|
47
|
+
a(!1), l.current && (clearInterval(l.current), l.current = null);
|
|
48
|
+
}, []), h = r(() => {
|
|
49
|
+
a(!0);
|
|
50
|
+
}, []), o = r(() => {
|
|
51
|
+
i();
|
|
52
|
+
}, [i]);
|
|
53
|
+
return v(() => {
|
|
54
|
+
if (!(!d || !t.swiper || t.swiper.slides.length <= 1))
|
|
55
|
+
return l.current = setInterval(() => {
|
|
56
|
+
t.swiper && (t.isEnd ? t.swiper.slideTo(0) : t.swiper.slideNext());
|
|
57
|
+
}, n), () => {
|
|
58
|
+
l.current && (clearInterval(l.current), l.current = null);
|
|
59
|
+
};
|
|
60
|
+
}, [d, t.swiper, t.isEnd, n]), v(() => {
|
|
61
|
+
const f = () => i(), u = () => {
|
|
62
|
+
document.hidden && i();
|
|
63
|
+
};
|
|
64
|
+
return window.addEventListener("beforeunload", f), document.addEventListener("visibilitychange", u), () => {
|
|
65
|
+
window.removeEventListener("beforeunload", f), document.removeEventListener("visibilitychange", u);
|
|
66
|
+
};
|
|
67
|
+
}, [i]), {
|
|
68
|
+
...t,
|
|
69
|
+
isAutoPlay: d,
|
|
70
|
+
stopAutoPlay: i,
|
|
71
|
+
startAutoPlay: h,
|
|
72
|
+
handleUserInteraction: o
|
|
44
73
|
};
|
|
45
74
|
};
|
|
46
75
|
export {
|
|
47
|
-
|
|
76
|
+
A as useSwiper,
|
|
77
|
+
P as useSwiperWithAutoPlay
|
|
48
78
|
};
|