@zenpatient-org/healthspan-marketing-ui 0.1.21 → 0.1.23
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/README.md +11 -1
- package/dist/components/Button/Button.es.js +24 -6
- package/dist/components/ComplexTooltip/ComplexTooltip.cjs.js +1 -1
- package/dist/components/ComplexTooltip/ComplexTooltip.d.ts +5 -13
- package/dist/components/ComplexTooltip/ComplexTooltip.es.js +49 -59
- package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.cjs.js +1 -0
- package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.d.ts +10 -0
- package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.es.js +52 -0
- package/dist/components/ComplexTooltip/components/ComplexTooltipContent/complexTooltipContent.module.css.cjs.js +1 -0
- package/dist/components/ComplexTooltip/components/ComplexTooltipContent/complexTooltipContent.module.css.es.js +15 -0
- package/dist/components/ComplexTooltip/components/ComplexTooltipContent/index.d.ts +1 -0
- package/dist/components/ComplexTooltip/index.d.ts +1 -0
- package/dist/components/ComplexTooltip/types.d.ts +13 -0
- package/dist/components/FilterMenu/FilterMenu.d.ts +1 -1
- package/dist/components/FilterMenu/FilterMenu.es.js +17 -2
- package/dist/components/InfiniteScroll/InfiniteScroll.es.js +9 -1
- package/dist/components/Label/Label.es.js +9 -1
- package/dist/components/Pricing/Pricing.cjs.js +1 -0
- package/dist/components/Pricing/Pricing.d.ts +3 -0
- package/dist/components/Pricing/Pricing.es.js +41 -0
- package/dist/components/Pricing/components/BenefitItem/BenefitItem.cjs.js +1 -0
- package/dist/components/Pricing/components/BenefitItem/BenefitItem.d.ts +8 -0
- package/dist/components/Pricing/components/BenefitItem/BenefitItem.es.js +10 -0
- package/dist/components/Pricing/components/BenefitItem/benefitItem.module.css.cjs.js +1 -0
- package/dist/components/Pricing/components/BenefitItem/benefitItem.module.css.es.js +7 -0
- package/dist/components/Pricing/components/BenefitItem/index.d.ts +1 -0
- package/dist/components/Pricing/components/index.d.ts +1 -0
- package/dist/components/Pricing/index.d.ts +2 -0
- package/dist/components/Pricing/pricing.module.css.cjs.js +1 -0
- package/dist/components/Pricing/pricing.module.css.es.js +25 -0
- package/dist/components/Pricing/types.d.ts +17 -0
- package/dist/components/ProductGalleryCard/ProductGalleryCard.cjs.js +1 -1
- package/dist/components/ProductGalleryCard/ProductGalleryCard.d.ts +5 -1
- package/dist/components/ProductGalleryCard/ProductGalleryCard.es.js +37 -15
- package/dist/components/ProductGalleryCard/productGalleryCard.module.css.cjs.js +1 -1
- package/dist/components/ProductGalleryCard/productGalleryCard.module.css.es.js +14 -12
- package/dist/components/ProductPairs/ProductPairs.cjs.js +1 -0
- package/dist/components/ProductPairs/ProductPairs.d.ts +7 -0
- package/dist/components/ProductPairs/ProductPairs.es.js +55 -0
- package/dist/components/ProductPairs/index.d.ts +1 -0
- package/dist/components/ProductPairs/productPairs.module.css.cjs.js +1 -0
- package/dist/components/ProductPairs/productPairs.module.css.es.js +17 -0
- package/dist/components/ProgressButton/ProgressButton.es.js +9 -1
- package/dist/components/StepsCarousel/StepsCarousel.cjs.js +1 -1
- package/dist/components/StepsCarousel/StepsCarousel.es.js +110 -56
- package/dist/components/StudyGridCard/StudyGridCard.es.js +36 -6
- package/dist/components/Tabs/TabsWithFade.es.js +10 -1
- package/dist/components/Typography/Typography.es.js +8 -1
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/Benefits/Benefits.cjs.js +1 -0
- package/dist/modules/Benefits/Benefits.d.ts +14 -0
- package/dist/modules/Benefits/Benefits.es.js +30 -0
- package/dist/modules/Benefits/benefits.module.css.cjs.js +1 -0
- package/dist/modules/Benefits/benefits.module.css.es.js +25 -0
- package/dist/modules/Benefits/components/BenefitItem/BenefitItem.cjs.js +1 -0
- package/dist/modules/Benefits/components/BenefitItem/BenefitItem.d.ts +7 -0
- package/dist/modules/Benefits/components/BenefitItem/BenefitItem.es.js +13 -0
- package/dist/modules/Benefits/components/BenefitItem/benefitItem.module.css.cjs.js +1 -0
- package/dist/modules/Benefits/components/BenefitItem/benefitItem.module.css.es.js +11 -0
- package/dist/modules/Benefits/components/BenefitItem/index.d.ts +1 -0
- package/dist/modules/Benefits/components/BenefitTag/BenefitTag.cjs.js +1 -0
- package/dist/modules/Benefits/components/BenefitTag/BenefitTag.d.ts +6 -0
- package/dist/modules/Benefits/components/BenefitTag/BenefitTag.es.js +8 -0
- package/dist/modules/Benefits/components/BenefitTag/benefitTag.module.css.cjs.js +1 -0
- package/dist/modules/Benefits/components/BenefitTag/benefitTag.module.css.es.js +9 -0
- package/dist/modules/Benefits/components/BenefitTag/index.d.ts +1 -0
- package/dist/modules/Benefits/components/index.d.ts +2 -0
- package/dist/modules/Benefits/index.d.ts +1 -0
- package/dist/modules/Compare/Compare.d.ts +3 -0
- package/dist/modules/Compare/index.d.ts +1 -0
- package/dist/modules/Compare/types.d.ts +9 -0
- package/dist/modules/Comparison/Comparison.es.js +20 -5
- package/dist/modules/FeaturedIn/FeaturedIn.es.js +14 -5
- package/dist/modules/FeaturesGallery/FeaturesGallery.es.js +9 -1
- package/dist/modules/FeaturesGallery/components/FeatureGrid/FeatureGrid.es.js +32 -17
- package/dist/modules/FollowTheScience/FollowTheScience.es.js +21 -2
- package/dist/modules/OptimalHealth/OptimalHealth.cjs.js +1 -1
- package/dist/modules/OptimalHealth/OptimalHealth.es.js +6 -6
- package/dist/modules/OptimalHealth/components/ClockImages/ClockImages.cjs.js +1 -1
- package/dist/modules/OptimalHealth/components/ClockImages/ClockImages.es.js +53 -31
- package/dist/modules/OptimalHealth/components/ClockImages/clockImages.module.css.cjs.js +1 -1
- package/dist/modules/OptimalHealth/components/ClockImages/clockImages.module.css.es.js +25 -5
- package/dist/modules/OptimalHealth/optimalHealth.module.css.cjs.js +1 -1
- package/dist/modules/OptimalHealth/optimalHealth.module.css.es.js +17 -15
- package/dist/modules/OurProcess/OurProcess.cjs.js +1 -1
- package/dist/modules/OurProcess/OurProcess.d.ts +3 -2
- package/dist/modules/OurProcess/OurProcess.es.js +17 -8
- package/dist/modules/PairedProducts/PairedProducts.cjs.js +1 -0
- package/dist/modules/PairedProducts/PairedProducts.d.ts +12 -0
- package/dist/modules/PairedProducts/PairedProducts.es.js +17 -0
- package/dist/modules/PairedProducts/index.d.ts +1 -0
- package/dist/modules/PairedProducts/pairedProducts.module.css.cjs.js +1 -0
- package/dist/modules/PairedProducts/pairedProducts.module.css.es.js +17 -0
- package/dist/modules/ProductsDisplay/ProductsDisplay.cjs.js +1 -1
- package/dist/modules/ProductsDisplay/ProductsDisplay.d.ts +1 -1
- package/dist/modules/ProductsDisplay/ProductsDisplay.es.js +1 -1
- package/dist/modules/ProductsDisplay/types.d.ts +1 -1
- package/dist/modules/TypesOfTests/TypesOfTests.cjs.js +1 -0
- package/dist/modules/TypesOfTests/TypesOfTests.d.ts +10 -0
- package/dist/modules/TypesOfTests/TypesOfTests.es.js +106 -0
- package/dist/modules/TypesOfTests/index.d.ts +1 -0
- package/dist/modules/TypesOfTests/types.d.ts +8 -0
- package/dist/modules/TypesOfTests/typesOfTests.module.css.cjs.js +1 -0
- package/dist/modules/TypesOfTests/typesOfTests.module.css.es.js +31 -0
- package/dist/modules/YourProtocol/YourProtocol.es.js +19 -2
- package/dist/modules/YourProtocol/components/ProtocolTags/ProtocolTags.es.js +18 -5
- package/dist/node_modules/gsap/CSSPlugin.cjs.js +8 -0
- package/dist/node_modules/gsap/CSSPlugin.es.js +423 -0
- package/dist/node_modules/gsap/Observer.cjs.js +8 -0
- package/dist/node_modules/gsap/Observer.es.js +242 -0
- package/dist/node_modules/gsap/ScrollTrigger.cjs.js +8 -0
- package/dist/node_modules/gsap/ScrollTrigger.es.js +859 -0
- package/dist/node_modules/gsap/gsap-core.cjs.js +8 -0
- package/dist/node_modules/gsap/gsap-core.es.js +1651 -0
- package/dist/node_modules/gsap/index.cjs.js +1 -0
- package/dist/node_modules/gsap/index.es.js +13 -0
- package/dist/pageComponents/StillHaveQuestions/StillHaveQuestions.d.ts +1 -0
- package/dist/pageComponents/StillHaveQuestions/index.d.ts +1 -0
- package/dist/utils/useIsMobile.cjs.js +1 -0
- package/dist/utils/useIsMobile.d.ts +1 -0
- package/dist/utils/useIsMobile.es.js +12 -0
- package/package.json +44 -4
- package/dist/components/ComplexTooltip/complexTooltip.module.css.cjs.js +0 -1
- package/dist/components/ComplexTooltip/complexTooltip.module.css.es.js +0 -17
- package/dist/modules/OptimalHealth/components/ClockImages/hooks.cjs.js +0 -1
- package/dist/modules/OptimalHealth/components/ClockImages/hooks.es.js +0 -13
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@ npm install @zenpatient-org/healthspan-marketing-ui
|
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Development
|
|
12
|
+
|
|
12
13
|
Start the storybook:
|
|
13
14
|
|
|
14
15
|
```bash
|
|
@@ -21,7 +22,16 @@ When you create a new public component, you need to add it to the `components` s
|
|
|
21
22
|
|
|
22
23
|
Avoid using barrel exports. Instead, import the components directly from the `src` directory.
|
|
23
24
|
|
|
25
|
+
We use eslint and prettier, please ensure you have these lines in your IDE settings:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
"eslint.useFlatConfig": true,
|
|
29
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
30
|
+
"editor.formatOnSave": true,
|
|
31
|
+
```
|
|
32
|
+
|
|
24
33
|
## Importing the components and modules
|
|
34
|
+
|
|
25
35
|
```tsx
|
|
26
36
|
import { Button } from '@zenpatient-org/healthspan-marketing-ui/Button';
|
|
27
37
|
import { CallbackModule } from '@zenpatient-org/healthspan-marketing-ui/CallbackModule';
|
|
@@ -46,5 +56,5 @@ npm publish
|
|
|
46
56
|
Design tokens (colors, spacing, etc.) are injected via CSS variables globally. Just import the global styles once:
|
|
47
57
|
|
|
48
58
|
```tsx
|
|
49
|
-
import
|
|
59
|
+
import '@zenpatient-org/healthspan-marketing-ui/dist/healthspan-marketing-ui.css';
|
|
50
60
|
```
|
|
@@ -4,13 +4,31 @@ import { cn as u } from "../../utils/cn/cn.es.js";
|
|
|
4
4
|
import { Icon as n } from "../Icon/Icon.es.js";
|
|
5
5
|
import s from "./button.module.css.es.js";
|
|
6
6
|
const b = h(
|
|
7
|
-
({
|
|
7
|
+
({
|
|
8
|
+
variant: m = "primary",
|
|
9
|
+
size: e = "md",
|
|
10
|
+
as: i = "button",
|
|
11
|
+
disabled: r = !1,
|
|
12
|
+
children: c,
|
|
13
|
+
prefixIcon: t,
|
|
14
|
+
suffixIcon: o,
|
|
15
|
+
...l
|
|
16
|
+
}, d) => {
|
|
8
17
|
const p = s[m] || "", f = s[e] || "", v = r ? s.disabled : "";
|
|
9
|
-
return /* @__PURE__ */ a(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
return /* @__PURE__ */ a(
|
|
19
|
+
i,
|
|
20
|
+
{
|
|
21
|
+
ref: d,
|
|
22
|
+
...l,
|
|
23
|
+
className: u(s.button, p, f, v),
|
|
24
|
+
disabled: r,
|
|
25
|
+
children: /* @__PURE__ */ N("div", { className: s.content, children: [
|
|
26
|
+
t && /* @__PURE__ */ a("div", { className: s.iconWrap, children: /* @__PURE__ */ a(n, { name: t }) }),
|
|
27
|
+
/* @__PURE__ */ a("div", { children: c }),
|
|
28
|
+
o && /* @__PURE__ */ a("div", { className: s.iconWrap, children: /* @__PURE__ */ a(n, { name: o }) })
|
|
29
|
+
] })
|
|
30
|
+
}
|
|
31
|
+
);
|
|
14
32
|
}
|
|
15
33
|
);
|
|
16
34
|
b.displayName = "Button";
|
|
@@ -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"),x=require("../../_virtual/Popover.cjs.js"),h=require("../../utils/useIsMobile.cjs.js"),k=require("./components/ComplexTooltipContent/ComplexTooltipContent.cjs.js"),q=({trigger:n,title:p,description:a,link:m,style:f="light",isBlurred:M=!1,children:c,positions:b=["top","bottom","left","right"],onClose:r})=>{const[v,u]=e.useState(!1),o=e.useRef(null),s=e.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>u(!0),200)},[]),t=e.useCallback(()=>{o.current=setTimeout(()=>{u(!1),r==null||r()},200)},[r]),l=e.useCallback(()=>u(d=>!d),[]),C=e.useMemo(()=>n==="hover"?{onMouseEnter:s,onMouseLeave:t}:{onClick:l},[n,s,t,l]),T=e.useMemo(()=>n==="hover"?{onMouseEnter:s,onMouseLeave:t}:{},[n,s,t]);return e.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]),h.useIsMobile()?c:i.jsx(x.PopoverExports.Popover,{isOpen:v,positions:b,padding:8,onClickOutside:t,content:i.jsx(k.ComplexTooltipContent,{title:p,description:a,link:m,style:f,isBlurred:M,onClose:t,...T}),children:i.jsx("div",{...C,children:c})})};exports.ComplexTooltip=q;
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
2
|
import { PopoverPosition } from 'react-tiny-popover';
|
|
3
|
-
import {
|
|
3
|
+
import { CommonComplexTooltipProps } from './types';
|
|
4
4
|
|
|
5
5
|
type ComplexTooltipProps = {
|
|
6
|
+
children: ReactElement;
|
|
6
7
|
trigger: 'hover' | 'click';
|
|
7
|
-
title: string;
|
|
8
|
-
description: string;
|
|
9
|
-
link?: {
|
|
10
|
-
label: string;
|
|
11
|
-
url: string;
|
|
12
|
-
};
|
|
13
|
-
children: React.ReactElement;
|
|
14
|
-
style: Omit<TColorScheme, 'custom'>;
|
|
15
8
|
positions?: Array<PopoverPosition>;
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
export declare const ComplexTooltip: ({ trigger, title, description, link, style, isBlurred, children, positions, }: ComplexTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
} & CommonComplexTooltipProps;
|
|
10
|
+
export declare const ComplexTooltip: ({ trigger, title, description, link, style, isBlurred, children, positions, onClose, }: ComplexTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
11
|
export {};
|
|
@@ -1,70 +1,60 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { P as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
isBlurred: l = !1,
|
|
18
|
-
children: x,
|
|
19
|
-
positions: O = ["top", "bottom", "left", "right"]
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { useState as C, useRef as P, useCallback as i, useMemo as l, useEffect as k } from "react";
|
|
4
|
+
import { P as E } from "../../_virtual/Popover.es.js";
|
|
5
|
+
import { useIsMobile as O } from "../../utils/useIsMobile.es.js";
|
|
6
|
+
import { ComplexTooltipContent as L } from "./components/ComplexTooltipContent/ComplexTooltipContent.es.js";
|
|
7
|
+
const y = ({
|
|
8
|
+
trigger: t,
|
|
9
|
+
title: m,
|
|
10
|
+
description: a,
|
|
11
|
+
link: f,
|
|
12
|
+
style: v = "light",
|
|
13
|
+
isBlurred: M = !1,
|
|
14
|
+
children: c,
|
|
15
|
+
positions: d = ["top", "bottom", "left", "right"],
|
|
16
|
+
onClose: r
|
|
20
17
|
}) => {
|
|
21
|
-
const [
|
|
22
|
-
|
|
23
|
-
}, []),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
const [h, s] = C(!1), e = P(null), n = i(() => {
|
|
19
|
+
e.current && clearTimeout(e.current), e.current = setTimeout(() => s(!0), 200);
|
|
20
|
+
}, []), o = i(() => {
|
|
21
|
+
e.current = setTimeout(() => {
|
|
22
|
+
s(!1), r == null || r();
|
|
23
|
+
}, 200);
|
|
24
|
+
}, [r]), p = i(() => s((x) => !x), []), T = l(() => t === "hover" ? {
|
|
25
|
+
onMouseEnter: n,
|
|
26
|
+
onMouseLeave: o
|
|
28
27
|
} : {
|
|
29
28
|
onClick: p
|
|
30
|
-
}, [
|
|
31
|
-
onMouseEnter:
|
|
32
|
-
onMouseLeave:
|
|
33
|
-
} : {}, [
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
}, []), /* @__PURE__ */
|
|
37
|
-
|
|
29
|
+
}, [t, n, o, p]), b = l(() => t === "hover" ? {
|
|
30
|
+
onMouseEnter: n,
|
|
31
|
+
onMouseLeave: o
|
|
32
|
+
} : {}, [t, n, o]);
|
|
33
|
+
return k(() => () => {
|
|
34
|
+
e.current && clearTimeout(e.current);
|
|
35
|
+
}, []), O() ? c : /* @__PURE__ */ u(
|
|
36
|
+
E.Popover,
|
|
38
37
|
{
|
|
39
|
-
isOpen:
|
|
40
|
-
positions:
|
|
38
|
+
isOpen: h,
|
|
39
|
+
positions: d,
|
|
41
40
|
padding: 8,
|
|
42
|
-
onClickOutside:
|
|
43
|
-
content: /* @__PURE__ */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
suffixIcon: f.ARROW_FORWARD,
|
|
57
|
-
as: "a",
|
|
58
|
-
href: a.url,
|
|
59
|
-
inverted: c === "dark" && !l || c === "light" && l,
|
|
60
|
-
children: a.label
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
] }),
|
|
64
|
-
children: /* @__PURE__ */ o("div", { className: t.trigger, ...E, children: x })
|
|
41
|
+
onClickOutside: o,
|
|
42
|
+
content: /* @__PURE__ */ u(
|
|
43
|
+
L,
|
|
44
|
+
{
|
|
45
|
+
title: m,
|
|
46
|
+
description: a,
|
|
47
|
+
link: f,
|
|
48
|
+
style: v,
|
|
49
|
+
isBlurred: M,
|
|
50
|
+
onClose: o,
|
|
51
|
+
...b
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
children: /* @__PURE__ */ u("div", { ...T, children: c })
|
|
65
55
|
}
|
|
66
56
|
);
|
|
67
57
|
};
|
|
68
58
|
export {
|
|
69
|
-
|
|
59
|
+
y as ComplexTooltip
|
|
70
60
|
};
|
package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.cjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("../../../Icon/Icon.cjs.js"),a=require("../../../Icon/constants.cjs.js"),h=require("../../../TextButton/TextButton.cjs.js"),s=require("../../../Typography/Typography.cjs.js"),x=require("../../../../utils/cn/cn.cjs.js"),t=require("./complexTooltipContent.module.css.cjs.js"),_=({style:n,title:l,description:u,link:o,isBlurred:r,className:i,onMouseEnter:d,onMouseLeave:p,onClose:c})=>e.jsxs("div",{className:x.cn(t.default.content,r&&t.default.blurred,i),"data-style":n,onMouseEnter:d,onMouseLeave:p,children:[e.jsxs("div",{className:t.default.contentHeader,children:[e.jsx(s.Typography,{as:"h4",defaultVariant:"headingSm",children:l}),c&&e.jsxs("button",{className:t.default.closeButton,onClick:c,children:["(",e.jsx(m.Icon,{name:a.EIconName.CLOSE,className:t.default.closeIcon}),")"]})]}),e.jsx(s.Typography,{as:"p",defaultVariant:"bodySm",children:u}),o&&e.jsx(h.TextButton,{suffixIcon:a.EIconName.ARROW_FORWARD,as:"a",href:o.url,target:"_blank",rel:"noopener noreferrer",inverted:n==="dark"&&!r||n==="light"&&r,children:o.label})]});exports.ComplexTooltipContent=_;
|
package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CommonComplexTooltipProps } from '../../types';
|
|
2
|
+
|
|
3
|
+
type ComplexTooltipContentProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
onMouseEnter?: () => void;
|
|
6
|
+
onMouseLeave?: () => void;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
} & CommonComplexTooltipProps;
|
|
9
|
+
export declare const ComplexTooltipContent: ({ style, title, description, link, isBlurred, className, onMouseEnter, onMouseLeave, onClose, }: ComplexTooltipContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.es.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as h } from "../../../Icon/Icon.es.js";
|
|
3
|
+
import { EIconName as c } from "../../../Icon/constants.es.js";
|
|
4
|
+
import { TextButton as u } from "../../../TextButton/TextButton.es.js";
|
|
5
|
+
import { Typography as i } from "../../../Typography/Typography.es.js";
|
|
6
|
+
import { cn as x } from "../../../../utils/cn/cn.es.js";
|
|
7
|
+
import r from "./complexTooltipContent.module.css.es.js";
|
|
8
|
+
const C = ({
|
|
9
|
+
style: o,
|
|
10
|
+
title: l,
|
|
11
|
+
description: s,
|
|
12
|
+
link: t,
|
|
13
|
+
isBlurred: a,
|
|
14
|
+
className: d,
|
|
15
|
+
onMouseEnter: p,
|
|
16
|
+
onMouseLeave: f,
|
|
17
|
+
onClose: m
|
|
18
|
+
}) => /* @__PURE__ */ n(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: x(r.content, a && r.blurred, d),
|
|
22
|
+
"data-style": o,
|
|
23
|
+
onMouseEnter: p,
|
|
24
|
+
onMouseLeave: f,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ n("div", { className: r.contentHeader, children: [
|
|
27
|
+
/* @__PURE__ */ e(i, { as: "h4", defaultVariant: "headingSm", children: l }),
|
|
28
|
+
m && /* @__PURE__ */ n("button", { className: r.closeButton, onClick: m, children: [
|
|
29
|
+
"(",
|
|
30
|
+
/* @__PURE__ */ e(h, { name: c.CLOSE, className: r.closeIcon }),
|
|
31
|
+
")"
|
|
32
|
+
] })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ e(i, { as: "p", defaultVariant: "bodySm", children: s }),
|
|
35
|
+
t && /* @__PURE__ */ e(
|
|
36
|
+
u,
|
|
37
|
+
{
|
|
38
|
+
suffixIcon: c.ARROW_FORWARD,
|
|
39
|
+
as: "a",
|
|
40
|
+
href: t.url,
|
|
41
|
+
target: "_blank",
|
|
42
|
+
rel: "noopener noreferrer",
|
|
43
|
+
inverted: o === "dark" && !a || o === "light" && a,
|
|
44
|
+
children: t.label
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
export {
|
|
51
|
+
C as ComplexTooltipContent
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="complexTooltipContent-module__content___gGk3B",e="complexTooltipContent-module__blurred___5ZgFB",t="complexTooltipContent-module__contentHeader___zWu-A",n="complexTooltipContent-module__closeButton___LvHd5",l="complexTooltipContent-module__closeIcon___8Nx3Z",c={content:o,blurred:e,contentHeader:t,closeButton:n,closeIcon:l};exports.blurred=e;exports.closeButton=n;exports.closeIcon=l;exports.content=o;exports.contentHeader=t;exports.default=c;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const o = "complexTooltipContent-module__content___gGk3B", t = "complexTooltipContent-module__blurred___5ZgFB", e = "complexTooltipContent-module__contentHeader___zWu-A", n = "complexTooltipContent-module__closeButton___LvHd5", c = "complexTooltipContent-module__closeIcon___8Nx3Z", l = {
|
|
2
|
+
content: o,
|
|
3
|
+
blurred: t,
|
|
4
|
+
contentHeader: e,
|
|
5
|
+
closeButton: n,
|
|
6
|
+
closeIcon: c
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
t as blurred,
|
|
10
|
+
n as closeButton,
|
|
11
|
+
c as closeIcon,
|
|
12
|
+
o as content,
|
|
13
|
+
e as contentHeader,
|
|
14
|
+
l as default
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComplexTooltipContent } from './ComplexTooltipContent';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TColorScheme } from '../../types/common';
|
|
2
|
+
|
|
3
|
+
export type CommonComplexTooltipProps = {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
link?: {
|
|
7
|
+
label: string;
|
|
8
|
+
url: string;
|
|
9
|
+
};
|
|
10
|
+
style: Omit<TColorScheme, 'custom'>;
|
|
11
|
+
isBlurred?: boolean;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
};
|
|
@@ -13,5 +13,5 @@ type FilterMenuProps<T extends string | number> = {
|
|
|
13
13
|
options: ReadonlyArray<TOptionGroup<T>>;
|
|
14
14
|
onSelect: (value: T, optionGroup: TOptionGroup<T>) => void;
|
|
15
15
|
};
|
|
16
|
-
export declare function FilterMenu<T extends string | number>({ label, open, options, selectedValue, onSelect }: FilterMenuProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function FilterMenu<T extends string | number>({ label, open, options, selectedValue, onSelect, }: FilterMenuProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -6,7 +6,13 @@ import { Icon as v } from "../Icon/Icon.es.js";
|
|
|
6
6
|
import { EIconName as m } from "../Icon/constants.es.js";
|
|
7
7
|
import { Typography as o } from "../Typography/Typography.es.js";
|
|
8
8
|
import e from "./filterMenu.module.css.es.js";
|
|
9
|
-
function j({
|
|
9
|
+
function j({
|
|
10
|
+
label: c,
|
|
11
|
+
open: d = !1,
|
|
12
|
+
options: p,
|
|
13
|
+
selectedValue: u,
|
|
14
|
+
onSelect: h
|
|
15
|
+
}) {
|
|
10
16
|
const [t, f] = g(d), b = () => f((l) => !l);
|
|
11
17
|
return /* @__PURE__ */ r("div", { className: e.root, children: [
|
|
12
18
|
/* @__PURE__ */ r("button", { className: e.toggleButton, onClick: b, children: [
|
|
@@ -14,7 +20,16 @@ function j({ label: c, open: d = !1, options: p, selectedValue: u, onSelect: h }
|
|
|
14
20
|
/* @__PURE__ */ a(v, { name: t ? m.REMOVE : m.PLUS, className: e.toggleIcon })
|
|
15
21
|
] }),
|
|
16
22
|
/* @__PURE__ */ a("div", { className: n(e.menu, t && e.isOpen), role: "menu", children: p.map((l, s) => /* @__PURE__ */ r("ul", { className: e.subOptions, children: [
|
|
17
|
-
l.label && /* @__PURE__ */ a("li", { className: n(e.divider, s !== 0 && e.dividerLine), children: /* @__PURE__ */ a(
|
|
23
|
+
l.label && /* @__PURE__ */ a("li", { className: n(e.divider, s !== 0 && e.dividerLine), children: /* @__PURE__ */ a(
|
|
24
|
+
o,
|
|
25
|
+
{
|
|
26
|
+
as: "div",
|
|
27
|
+
defaultVariant: "bodyMd",
|
|
28
|
+
weight: "medium",
|
|
29
|
+
className: e.dividerLabel,
|
|
30
|
+
children: l.label
|
|
31
|
+
}
|
|
32
|
+
) }, s),
|
|
18
33
|
l.values.map(({ value: i, label: N }) => /* @__PURE__ */ a("li", { className: e.option, onClick: () => h(i, l), children: /* @__PURE__ */ a(
|
|
19
34
|
o,
|
|
20
35
|
{
|
|
@@ -51,7 +51,15 @@ function P({ items: c, speed: y = 50, contentClassName: W, itemClassName: q, roo
|
|
|
51
51
|
const t = s + 200, e = Math.min(t, 0);
|
|
52
52
|
R(e);
|
|
53
53
|
}
|
|
54
|
-
})), /* @__PURE__ */ M("div", { className: w(x.root, F), onMouseEnter: N, onMouseLeave: X, children: /* @__PURE__ */ M(
|
|
54
|
+
})), /* @__PURE__ */ M("div", { className: w(x.root, F), onMouseEnter: N, onMouseLeave: X, children: /* @__PURE__ */ M(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
className: w(x.content, W),
|
|
58
|
+
style: { transform: `translate3D(${s}px, 0, 0)` },
|
|
59
|
+
ref: l,
|
|
60
|
+
children: Array.from({ length: c.length * I }, (t, e) => /* @__PURE__ */ M("div", { className: w(x.item, q), children: S(c[e % c.length], e) }, e))
|
|
61
|
+
}
|
|
62
|
+
) });
|
|
55
63
|
}
|
|
56
64
|
const G = D(P);
|
|
57
65
|
export {
|
|
@@ -5,7 +5,15 @@ import e from "./label.module.css.es.js";
|
|
|
5
5
|
const p = {
|
|
6
6
|
sm: o.labelXs,
|
|
7
7
|
lg: o.labelSm
|
|
8
|
-
}, f = ({ children: m, color: t, size: r = "sm", className: a }) => /* @__PURE__ */ s(
|
|
8
|
+
}, f = ({ children: m, color: t, size: r = "sm", className: a }) => /* @__PURE__ */ s(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
className: l(e.root, o.labelEmphasis, p[r], a),
|
|
12
|
+
"data-size": r,
|
|
13
|
+
"data-color": t,
|
|
14
|
+
children: m
|
|
15
|
+
}
|
|
16
|
+
);
|
|
9
17
|
export {
|
|
10
18
|
f as Label
|
|
11
19
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("../../utils/cn/cn.cjs.js"),t=require("../Button/Button.cjs.js"),c=require("../Label/Label.cjs.js"),o=require("../Typography/Typography.cjs.js"),m=require("./components/BenefitItem/BenefitItem.cjs.js"),a=require("./pricing.module.css.cjs.js"),g=({label:i,price:d,items:u,link:r,button:s})=>e.jsxs("div",{className:a.default.root,children:[e.jsx(c.Label,{size:"lg",color:i.color,className:n.cn(a.default.pricingLabel,a.default.pricingLabelDesktop),children:i.label}),e.jsx(c.Label,{size:"sm",color:i.color,className:n.cn(a.default.pricingLabel,a.default.pricingLabelMobile),children:i.label}),e.jsxs("p",{className:a.default.pricing,children:[e.jsx(o.Typography,{as:"span",defaultVariant:"displayMd",mobileVariant:"displaySm",className:a.default.pricingTextPrimary,children:`$${d}`}),e.jsx(o.Typography,{as:"span",defaultVariant:"headingSm",mobileVariant:"headingXs",className:a.default.pricingTextSecondary,children:"/ mo"})]}),e.jsx("div",{className:a.default.benefits,children:u.map((l,p)=>e.jsx(m.BenefitItem,{badge:l.badge,label:l.label},p))}),e.jsx("div",{className:a.default.pricingButtonContainerDesktop,children:e.jsx(t.Button,{...s,size:"lg",as:"a",href:r,children:"GET STARTED"})}),e.jsx("div",{className:a.default.pricingButtonContainerMobile,children:e.jsx(t.Button,{...s,size:"md",as:"a",href:r,children:"GET STARTED"})}),e.jsx("div",{className:a.default.leftBorder}),e.jsx("div",{className:a.default.rightBorder})]});exports.Pricing=g;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as n } from "../../utils/cn/cn.es.js";
|
|
3
|
+
import { Button as c } from "../Button/Button.es.js";
|
|
4
|
+
import { Label as m } from "../Label/Label.es.js";
|
|
5
|
+
import { Typography as t } from "../Typography/Typography.es.js";
|
|
6
|
+
import { BenefitItem as h } from "./components/BenefitItem/BenefitItem.es.js";
|
|
7
|
+
import i from "./pricing.module.css.es.js";
|
|
8
|
+
const u = ({ label: r, price: d, items: p, link: a, button: s }) => /* @__PURE__ */ o("div", { className: i.root, children: [
|
|
9
|
+
/* @__PURE__ */ e(m, { size: "lg", color: r.color, className: n(i.pricingLabel, i.pricingLabelDesktop), children: r.label }),
|
|
10
|
+
/* @__PURE__ */ e(m, { size: "sm", color: r.color, className: n(i.pricingLabel, i.pricingLabelMobile), children: r.label }),
|
|
11
|
+
/* @__PURE__ */ o("p", { className: i.pricing, children: [
|
|
12
|
+
/* @__PURE__ */ e(
|
|
13
|
+
t,
|
|
14
|
+
{
|
|
15
|
+
as: "span",
|
|
16
|
+
defaultVariant: "displayMd",
|
|
17
|
+
mobileVariant: "displaySm",
|
|
18
|
+
className: i.pricingTextPrimary,
|
|
19
|
+
children: `$${d}`
|
|
20
|
+
}
|
|
21
|
+
),
|
|
22
|
+
/* @__PURE__ */ e(
|
|
23
|
+
t,
|
|
24
|
+
{
|
|
25
|
+
as: "span",
|
|
26
|
+
defaultVariant: "headingSm",
|
|
27
|
+
mobileVariant: "headingXs",
|
|
28
|
+
className: i.pricingTextSecondary,
|
|
29
|
+
children: "/ mo"
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ e("div", { className: i.benefits, children: p.map((l, g) => /* @__PURE__ */ e(h, { badge: l.badge, label: l.label }, g)) }),
|
|
34
|
+
/* @__PURE__ */ e("div", { className: i.pricingButtonContainerDesktop, children: /* @__PURE__ */ e(c, { ...s, size: "lg", as: "a", href: a, children: "GET STARTED" }) }),
|
|
35
|
+
/* @__PURE__ */ e("div", { className: i.pricingButtonContainerMobile, children: /* @__PURE__ */ e(c, { ...s, size: "md", as: "a", href: a, children: "GET STARTED" }) }),
|
|
36
|
+
/* @__PURE__ */ e("div", { className: i.leftBorder }),
|
|
37
|
+
/* @__PURE__ */ e("div", { className: i.rightBorder })
|
|
38
|
+
] });
|
|
39
|
+
export {
|
|
40
|
+
u as Pricing
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../../../TypeBadge/TypeBadge.cjs.js"),t=require("./benefitItem.module.css.cjs.js"),i=({badge:r,label:n})=>e.jsxs("div",{className:t.default.root,children:[e.jsx(s.TypeBadge,{type:r}),e.jsx("p",{className:t.default.benefitLabel,children:n})]});exports.BenefitItem=i;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { TypeBadge as m } from "../../../TypeBadge/TypeBadge.es.js";
|
|
3
|
+
import r from "./benefitItem.module.css.es.js";
|
|
4
|
+
const l = ({ badge: t, label: o }) => /* @__PURE__ */ s("div", { className: r.root, children: [
|
|
5
|
+
/* @__PURE__ */ e(m, { type: t }),
|
|
6
|
+
/* @__PURE__ */ e("p", { className: r.benefitLabel, children: o })
|
|
7
|
+
] });
|
|
8
|
+
export {
|
|
9
|
+
l as BenefitItem
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="benefitItem-module__root___2QX95",t={root:e};exports.default=t;exports.root=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BenefitItem } from './BenefitItem';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BenefitItem } from './BenefitItem';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i="pricing-module__root___alGxI",e="pricing-module__pricingLabel___BrDUJ",n="pricing-module__pricingLabelDesktop___7H4iO",o="pricing-module__pricingLabelMobile___dpLsD",r="pricing-module__pricing___h1pM-",t="pricing-module__benefits___X-1Oc",_="pricing-module__pricingButtonContainerDesktop___kW7G4",c="pricing-module__pricingButtonContainerMobile___I-OGE",p="pricing-module__leftBorder___84NLl",l="pricing-module__rightBorder___50VVT",g={root:i,pricingLabel:e,pricingLabelDesktop:n,pricingLabelMobile:o,pricing:r,benefits:t,pricingButtonContainerDesktop:_,pricingButtonContainerMobile:c,leftBorder:p,rightBorder:l};exports.benefits=t;exports.default=g;exports.leftBorder=p;exports.pricing=r;exports.pricingButtonContainerDesktop=_;exports.pricingButtonContainerMobile=c;exports.pricingLabel=e;exports.pricingLabelDesktop=n;exports.pricingLabelMobile=o;exports.rightBorder=l;exports.root=i;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const i = "pricing-module__root___alGxI", n = "pricing-module__pricingLabel___BrDUJ", o = "pricing-module__pricingLabelDesktop___7H4iO", e = "pricing-module__pricingLabelMobile___dpLsD", r = "pricing-module__pricing___h1pM-", t = "pricing-module__benefits___X-1Oc", _ = "pricing-module__pricingButtonContainerDesktop___kW7G4", c = "pricing-module__pricingButtonContainerMobile___I-OGE", p = "pricing-module__leftBorder___84NLl", l = "pricing-module__rightBorder___50VVT", g = {
|
|
2
|
+
root: i,
|
|
3
|
+
pricingLabel: n,
|
|
4
|
+
pricingLabelDesktop: o,
|
|
5
|
+
pricingLabelMobile: e,
|
|
6
|
+
pricing: r,
|
|
7
|
+
benefits: t,
|
|
8
|
+
pricingButtonContainerDesktop: _,
|
|
9
|
+
pricingButtonContainerMobile: c,
|
|
10
|
+
leftBorder: p,
|
|
11
|
+
rightBorder: l
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
t as benefits,
|
|
15
|
+
g as default,
|
|
16
|
+
p as leftBorder,
|
|
17
|
+
r as pricing,
|
|
18
|
+
_ as pricingButtonContainerDesktop,
|
|
19
|
+
c as pricingButtonContainerMobile,
|
|
20
|
+
n as pricingLabel,
|
|
21
|
+
o as pricingLabelDesktop,
|
|
22
|
+
e as pricingLabelMobile,
|
|
23
|
+
l as rightBorder,
|
|
24
|
+
i as root
|
|
25
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ButtonProps } from '../Button';
|
|
2
|
+
import { LabelColor } from '../Label';
|
|
3
|
+
import { ETypeBadge } from '../TypeBadge';
|
|
4
|
+
|
|
5
|
+
export type PricingElementView = {
|
|
6
|
+
label: {
|
|
7
|
+
label: string;
|
|
8
|
+
color: LabelColor;
|
|
9
|
+
};
|
|
10
|
+
items: Array<{
|
|
11
|
+
badge: ETypeBadge;
|
|
12
|
+
label: string;
|
|
13
|
+
}>;
|
|
14
|
+
price: number;
|
|
15
|
+
button: ButtonProps;
|
|
16
|
+
link: string;
|
|
17
|
+
};
|
|
@@ -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"),s=require("../Button/Button.cjs.js"),c=require("../Typography/Typography.cjs.js"),i=require("../../utils/cn/cn.cjs.js"),a=require("./productGalleryCard.module.css.cjs.js"),f=({name:u,price:d,image:p,link:m,buttons:r,isHoverable:n=!0})=>{const o=t=>{t.preventDefault(),t.stopPropagation()};return e.jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:a.default.root,children:[e.jsxs("div",{className:a.default.productInfo,children:[e.jsx(c.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:a.default.title,children:u}),e.jsx(c.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:a.default.price,children:d})]}),e.jsx("img",{src:p,alt:"product image",className:a.default.productImage}),e.jsx("div",{onClick:o,className:i.cn(a.default.buttonContainerDesktop,n&&a.default.hoverableButtons),children:r.map((t,l)=>e.jsx(s.Button,{size:"sm",...t,children:t.label},l))}),e.jsx("div",{onClick:o,className:i.cn(a.default.buttonContainerMobile,n&&a.default.hoverableButtons),children:r.map((t,l)=>e.jsx(s.Button,{size:"xs",...t,children:t.label},l))})]})};exports.ProductGalleryCard=f;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { TProductGalleryCardView } from './types';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
type ProductGalleryCardProps = {
|
|
4
|
+
isHoverable?: boolean;
|
|
5
|
+
} & TProductGalleryCardView;
|
|
6
|
+
export declare const ProductGalleryCard: ({ name, price, image, link, buttons, isHoverable, }: ProductGalleryCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|