@zenpatient-org/healthspan-marketing-ui 0.1.36 → 0.1.37
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/Checkbox/Checkbox.cjs.js +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +14 -0
- package/dist/components/Checkbox/Checkbox.es.js +52 -0
- package/dist/components/Checkbox/assets/checkbox-checkmark.svg.cjs.js +1 -0
- package/dist/components/Checkbox/assets/checkbox-checkmark.svg.es.js +5 -0
- package/dist/components/Checkbox/assets/checkbox-dash.svg.cjs.js +1 -0
- package/dist/components/Checkbox/assets/checkbox-dash.svg.es.js +5 -0
- package/dist/components/Checkbox/assets/checkbox-error.svg.cjs.js +1 -0
- package/dist/components/Checkbox/assets/checkbox-error.svg.es.js +5 -0
- package/dist/components/Checkbox/checkbox.module.css.cjs.js +1 -0
- package/dist/components/Checkbox/checkbox.module.css.es.js +31 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/ColoredDivider/ColoredDivider.cjs.js +1 -0
- package/dist/components/ColoredDivider/ColoredDivider.d.ts +12 -0
- package/dist/components/ColoredDivider/ColoredDivider.es.js +17 -0
- package/dist/components/ColoredDivider/coloredDivider.module.css.cjs.js +1 -0
- package/dist/components/ColoredDivider/coloredDivider.module.css.es.js +21 -0
- package/dist/components/ColoredDivider/index.d.ts +1 -0
- package/dist/components/Tabs/Tabs.cjs.js +1 -1
- package/dist/components/Tabs/Tabs.d.ts +3 -20
- package/dist/components/Tabs/Tabs.es.js +7 -7
- package/dist/components/Tabs/TabsWithFade.cjs.js +1 -1
- package/dist/components/Tabs/TabsWithFade.d.ts +2 -8
- package/dist/components/Tabs/TabsWithFade.es.js +12 -21
- package/dist/components/Tabs/index.d.ts +1 -1
- package/dist/components/Tabs/tabs.module.css.cjs.js +1 -1
- package/dist/components/Tabs/tabs.module.css.es.js +26 -24
- package/dist/components/Tabs/types.d.ts +19 -0
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/ProductsDisplay/components/ProductsDisplayTabs/ProductsDisplayTabs.cjs.js +1 -1
- package/dist/modules/ProductsDisplay/components/ProductsDisplayTabs/ProductsDisplayTabs.d.ts +2 -2
- package/dist/modules/ProductsDisplay/components/ProductsDisplayTabs/ProductsDisplayTabs.es.js +8 -8
- package/dist/modules/ProductsDisplay/useProductsData.d.ts +2 -2
- package/dist/modules/ResearchFilters/ResearchFilters.cjs.js +1 -0
- package/dist/modules/ResearchFilters/ResearchFilters.d.ts +6 -0
- package/dist/modules/ResearchFilters/ResearchFilters.es.js +27 -0
- package/dist/modules/ResearchFilters/index.d.ts +2 -0
- package/dist/modules/ResearchFilters/researchFilters.module.css.cjs.js +1 -0
- package/dist/modules/ResearchFilters/researchFilters.module.css.es.js +13 -0
- package/dist/pageComponents/Footer/components/NewsLetter/NewsLetter.cjs.js +1 -1
- package/dist/pageComponents/Footer/components/NewsLetter/NewsLetter.es.js +32 -31
- package/package.json +16 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("../Typography/Typography.cjs.js"),m=require("./assets/checkbox-checkmark.svg.cjs.js"),p=require("./assets/checkbox-dash.svg.cjs.js"),k=require("./assets/checkbox-error.svg.cjs.js"),o=require("../../utils/cn/cn.cjs.js"),e=require("./checkbox.module.css.cjs.js"),y=({label:u,checkboxSize:n="lg",checkboxVariant:d="default",isError:c=!1,errorText:l,inverted:i=!1,disabled:r,checked:t,className:f,...h})=>{const x=b=>{switch(b){case"default":return a.jsx(m.default,{className:e.default.icon});case"undetermined":return a.jsx(p.default,{className:e.default.icon})}};return a.jsxs("label",{className:o.cn(e.default.root,i&&e.default.inverted,c&&e.default.error,r&&e.default.disabled,f),children:[a.jsx("input",{...h,type:"checkbox",disabled:r,checked:t,className:e.default.checkbox}),a.jsx("div",{className:o.cn(e.default.visibleCustomCheckbox,e.default[n]),children:t&&x(d)}),a.jsx(s.Typography,{defaultVariant:"labelSm",className:e.default.label,children:u}),c&&!!l&&a.jsxs("div",{className:e.default.errorTextContainer,children:[a.jsx(k.default,{className:e.default.errorIcon}),a.jsx(s.Typography,{defaultVariant:"labelSm",className:e.default.errorText,children:l})]})]})};exports.Checkbox=y;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export type TCheckboxSize = 'sm' | 'lg';
|
|
4
|
+
export type TCheckboxVariant = 'default' | 'undetermined';
|
|
5
|
+
export interface IBaseCheckboxProps {
|
|
6
|
+
label: string;
|
|
7
|
+
checkboxSize?: TCheckboxSize;
|
|
8
|
+
checkboxVariant?: TCheckboxVariant;
|
|
9
|
+
isError?: boolean;
|
|
10
|
+
errorText?: string;
|
|
11
|
+
inverted?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type TCheckboxProps = IBaseCheckboxProps & InputHTMLAttributes<HTMLInputElement>;
|
|
14
|
+
export declare const Checkbox: ({ label, checkboxSize, checkboxVariant, isError, errorText, inverted, disabled, checked, className, ...inputProps }: TCheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Typography as t } from "../Typography/Typography.es.js";
|
|
3
|
+
import u from "./assets/checkbox-checkmark.svg.es.js";
|
|
4
|
+
import k from "./assets/checkbox-dash.svg.es.js";
|
|
5
|
+
import N from "./assets/checkbox-error.svg.es.js";
|
|
6
|
+
import { cn as m } from "../../utils/cn/cn.es.js";
|
|
7
|
+
import e from "./checkbox.module.css.es.js";
|
|
8
|
+
const T = ({
|
|
9
|
+
label: i,
|
|
10
|
+
checkboxSize: n = "lg",
|
|
11
|
+
checkboxVariant: h = "default",
|
|
12
|
+
isError: a = !1,
|
|
13
|
+
errorText: o,
|
|
14
|
+
inverted: b = !1,
|
|
15
|
+
disabled: c,
|
|
16
|
+
checked: s,
|
|
17
|
+
className: d,
|
|
18
|
+
...f
|
|
19
|
+
}) => {
|
|
20
|
+
const p = (x) => {
|
|
21
|
+
switch (x) {
|
|
22
|
+
case "default":
|
|
23
|
+
return /* @__PURE__ */ r(u, { className: e.icon });
|
|
24
|
+
case "undetermined":
|
|
25
|
+
return /* @__PURE__ */ r(k, { className: e.icon });
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
return /* @__PURE__ */ l(
|
|
29
|
+
"label",
|
|
30
|
+
{
|
|
31
|
+
className: m(
|
|
32
|
+
e.root,
|
|
33
|
+
b && e.inverted,
|
|
34
|
+
a && e.error,
|
|
35
|
+
c && e.disabled,
|
|
36
|
+
d
|
|
37
|
+
),
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ r("input", { ...f, type: "checkbox", disabled: c, checked: s, className: e.checkbox }),
|
|
40
|
+
/* @__PURE__ */ r("div", { className: m(e.visibleCustomCheckbox, e[n]), children: s && p(h) }),
|
|
41
|
+
/* @__PURE__ */ r(t, { defaultVariant: "labelSm", className: e.label, children: i }),
|
|
42
|
+
a && !!o && /* @__PURE__ */ l("div", { className: e.errorTextContainer, children: [
|
|
43
|
+
/* @__PURE__ */ r(N, { className: e.errorIcon }),
|
|
44
|
+
/* @__PURE__ */ r(t, { defaultVariant: "labelSm", className: e.errorText, children: o })
|
|
45
|
+
] })
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
T as Checkbox
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react");function l(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const o=l(c),a=e=>o.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.createElement("path",{d:"M7.95836 14.7114L3.51294 10.266L4.40377 9.37499L7.95836 12.9296L15.5963 5.29166L16.4871 6.1827L7.95836 14.7114Z",fill:"currentColor"}));exports.default=a;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const o = (t) => /* @__PURE__ */ e.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M7.95836 14.7114L3.51294 10.266L4.40377 9.37499L7.95836 12.9296L15.5963 5.29166L16.4871 6.1827L7.95836 14.7114Z", fill: "currentColor" }));
|
|
3
|
+
export {
|
|
4
|
+
o as default
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react");function l(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const o=l(c),a=e=>o.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.createElement("path",{d:"M4.58337 10.625V9.375H15.4167V10.625H4.58337Z",fill:"currentColor"}));exports.default=a;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const o = (t) => /* @__PURE__ */ e.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M4.58337 10.625V9.375H15.4167V10.625H4.58337Z", fill: "currentColor" }));
|
|
3
|
+
export {
|
|
4
|
+
o as default
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react");function c(e){const C=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(C,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return C.default=e,Object.freeze(C)}const n=c(o),l=e=>n.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M6.56242 9.77081H7.43742V6.41665H6.56242V9.77081ZM6.99992 5.41827C7.13341 5.41827 7.24531 5.37311 7.33563 5.28279C7.42595 5.19247 7.47111 5.08057 7.47111 4.94708C7.47111 4.8136 7.42595 4.7017 7.33563 4.61138C7.24531 4.52115 7.13341 4.47604 6.99992 4.47604C6.86643 4.47604 6.75453 4.52115 6.66421 4.61138C6.57389 4.7017 6.52873 4.8136 6.52873 4.94708C6.52873 5.08057 6.57389 5.19247 6.66421 5.28279C6.75453 5.37311 6.86643 5.41827 6.99992 5.41827ZM7.00094 12.5416C6.23444 12.5416 5.51397 12.3962 4.83954 12.1053C4.16511 11.8144 3.57847 11.4197 3.07963 10.921C2.58078 10.4223 2.18581 9.83595 1.89473 9.16181C1.60374 8.48767 1.45825 7.7674 1.45825 7.001C1.45825 6.2345 1.6037 5.51404 1.89459 4.8396C2.18547 4.16517 2.58025 3.57854 3.0789 3.07969C3.57755 2.58084 4.16395 2.18588 4.83809 1.89479C5.51222 1.60381 6.2325 1.45831 6.9989 1.45831C7.7654 1.45831 8.48586 1.60376 9.16029 1.89465C9.83473 2.18554 10.4214 2.58031 10.9202 3.07896C11.4191 3.57761 11.814 4.16401 12.1051 4.83815C12.3961 5.51229 12.5416 6.23256 12.5416 6.99896C12.5416 7.76546 12.3961 8.48593 12.1053 9.16036C11.8144 9.83479 11.4196 10.4214 10.9209 10.9203C10.4223 11.4191 9.83589 11.8141 9.16175 12.1052C8.48761 12.3962 7.76734 12.5416 7.00094 12.5416ZM6.99992 11.6666C8.3027 11.6666 9.40617 11.2146 10.3103 10.3104C11.2145 9.40623 11.6666 8.30276 11.6666 6.99998C11.6666 5.6972 11.2145 4.59373 10.3103 3.68956C9.40617 2.7854 8.3027 2.33331 6.99992 2.33331C5.69714 2.33331 4.59367 2.7854 3.6895 3.68956C2.78534 4.59373 2.33325 5.6972 2.33325 6.99998C2.33325 8.30276 2.78534 9.40623 3.6895 10.3104C4.59367 11.2146 5.69714 11.6666 6.99992 11.6666Z",fill:"#E4271D"}));exports.default=l;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as C from "react";
|
|
2
|
+
const t = (e) => /* @__PURE__ */ C.createElement("svg", { width: 14, height: 14, viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ C.createElement("path", { d: "M6.56242 9.77081H7.43742V6.41665H6.56242V9.77081ZM6.99992 5.41827C7.13341 5.41827 7.24531 5.37311 7.33563 5.28279C7.42595 5.19247 7.47111 5.08057 7.47111 4.94708C7.47111 4.8136 7.42595 4.7017 7.33563 4.61138C7.24531 4.52115 7.13341 4.47604 6.99992 4.47604C6.86643 4.47604 6.75453 4.52115 6.66421 4.61138C6.57389 4.7017 6.52873 4.8136 6.52873 4.94708C6.52873 5.08057 6.57389 5.19247 6.66421 5.28279C6.75453 5.37311 6.86643 5.41827 6.99992 5.41827ZM7.00094 12.5416C6.23444 12.5416 5.51397 12.3962 4.83954 12.1053C4.16511 11.8144 3.57847 11.4197 3.07963 10.921C2.58078 10.4223 2.18581 9.83595 1.89473 9.16181C1.60374 8.48767 1.45825 7.7674 1.45825 7.001C1.45825 6.2345 1.6037 5.51404 1.89459 4.8396C2.18547 4.16517 2.58025 3.57854 3.0789 3.07969C3.57755 2.58084 4.16395 2.18588 4.83809 1.89479C5.51222 1.60381 6.2325 1.45831 6.9989 1.45831C7.7654 1.45831 8.48586 1.60376 9.16029 1.89465C9.83473 2.18554 10.4214 2.58031 10.9202 3.07896C11.4191 3.57761 11.814 4.16401 12.1051 4.83815C12.3961 5.51229 12.5416 6.23256 12.5416 6.99896C12.5416 7.76546 12.3961 8.48593 12.1053 9.16036C11.8144 9.83479 11.4196 10.4214 10.9209 10.9203C10.4223 11.4191 9.83589 11.8141 9.16175 12.1052C8.48761 12.3962 7.76734 12.5416 7.00094 12.5416ZM6.99992 11.6666C8.3027 11.6666 9.40617 11.2146 10.3103 10.3104C11.2145 9.40623 11.6666 8.30276 11.6666 6.99998C11.6666 5.6972 11.2145 4.59373 10.3103 3.68956C9.40617 2.7854 8.3027 2.33331 6.99992 2.33331C5.69714 2.33331 4.59367 2.7854 3.6895 3.68956C2.78534 4.59373 2.33325 5.6972 2.33325 6.99998C2.33325 8.30276 2.78534 9.40623 3.6895 10.3104C4.59367 11.2146 5.69714 11.6666 6.99992 11.6666Z", fill: "#E4271D" }));
|
|
3
|
+
export {
|
|
4
|
+
t as default
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="checkbox-module__root___-FW3O",o="checkbox-module__label___dV34E",_="checkbox-module__checkbox___rLEgd",r="checkbox-module__visibleCustomCheckbox___Rdikp",c="checkbox-module__errorTextContainer___TVSHW",t="checkbox-module__errorIcon___2kQKN",l="checkbox-module__errorText___fFW4I",n="checkbox-module__icon___TK3cZ",s="checkbox-module__sm___U0iG8",b="checkbox-module__lg___5OYlk",d="checkbox-module__inverted___2LLia",i="checkbox-module__error___8ZS3-",x="checkbox-module__disabled___E2BaQ",k={root:e,label:o,checkbox:_,visibleCustomCheckbox:r,errorTextContainer:c,errorIcon:t,errorText:l,icon:n,sm:s,lg:b,inverted:d,error:i,disabled:x};exports.checkbox=_;exports.default=k;exports.disabled=x;exports.error=i;exports.errorIcon=t;exports.errorText=l;exports.errorTextContainer=c;exports.icon=n;exports.inverted=d;exports.label=o;exports.lg=b;exports.root=e;exports.sm=s;exports.visibleCustomCheckbox=r;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const o = "checkbox-module__root___-FW3O", e = "checkbox-module__label___dV34E", _ = "checkbox-module__checkbox___rLEgd", c = "checkbox-module__visibleCustomCheckbox___Rdikp", r = "checkbox-module__errorTextContainer___TVSHW", t = "checkbox-module__errorIcon___2kQKN", l = "checkbox-module__errorText___fFW4I", n = "checkbox-module__icon___TK3cZ", s = "checkbox-module__sm___U0iG8", b = "checkbox-module__lg___5OYlk", d = "checkbox-module__inverted___2LLia", x = "checkbox-module__error___8ZS3-", k = "checkbox-module__disabled___E2BaQ", i = {
|
|
2
|
+
root: o,
|
|
3
|
+
label: e,
|
|
4
|
+
checkbox: _,
|
|
5
|
+
visibleCustomCheckbox: c,
|
|
6
|
+
errorTextContainer: r,
|
|
7
|
+
errorIcon: t,
|
|
8
|
+
errorText: l,
|
|
9
|
+
icon: n,
|
|
10
|
+
sm: s,
|
|
11
|
+
lg: b,
|
|
12
|
+
inverted: d,
|
|
13
|
+
error: x,
|
|
14
|
+
disabled: k
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
_ as checkbox,
|
|
18
|
+
i as default,
|
|
19
|
+
k as disabled,
|
|
20
|
+
x as error,
|
|
21
|
+
t as errorIcon,
|
|
22
|
+
l as errorText,
|
|
23
|
+
r as errorTextContainer,
|
|
24
|
+
n as icon,
|
|
25
|
+
d as inverted,
|
|
26
|
+
e as label,
|
|
27
|
+
b as lg,
|
|
28
|
+
o as root,
|
|
29
|
+
s as sm,
|
|
30
|
+
c as visibleCustomCheckbox
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),n=require("../Typography/Typography.cjs.js"),i=require("../../utils/cn/cn.cjs.js"),r=require("./coloredDivider.module.css.cjs.js");var s=(e=>(e.SENESCENCE="senescence",e.GREY="grey",e.LABS="labs",e.ENERGY="energy",e.METABOLISM="metabolism",e))(s||{});const l=({label:e,variant:t})=>a.jsxs("div",{className:r.default.root,children:[a.jsxs(n.Typography,{as:"h3",defaultVariant:"headingLg",mobileVariant:"headingSm",className:r.default.label,children:["(",e,")"]}),a.jsx("div",{className:i.cn(r.default.divider,r.default[t])})]});exports.ColoredDivider=l;exports.TDividerColor=s;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum TDividerColor {
|
|
2
|
+
SENESCENCE = "senescence",
|
|
3
|
+
GREY = "grey",
|
|
4
|
+
LABS = "labs",
|
|
5
|
+
ENERGY = "energy",
|
|
6
|
+
METABOLISM = "metabolism"
|
|
7
|
+
}
|
|
8
|
+
export type ColoredDividerProps = {
|
|
9
|
+
label: string;
|
|
10
|
+
variant: TDividerColor;
|
|
11
|
+
};
|
|
12
|
+
export declare const ColoredDivider: ({ label, variant }: ColoredDividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsxs as r, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { Typography as t } from "../Typography/Typography.es.js";
|
|
3
|
+
import { cn as n } from "../../utils/cn/cn.es.js";
|
|
4
|
+
import a from "./coloredDivider.module.css.es.js";
|
|
5
|
+
var i = /* @__PURE__ */ ((e) => (e.SENESCENCE = "senescence", e.GREY = "grey", e.LABS = "labs", e.ENERGY = "energy", e.METABOLISM = "metabolism", e))(i || {});
|
|
6
|
+
const d = ({ label: e, variant: s }) => /* @__PURE__ */ r("div", { className: a.root, children: [
|
|
7
|
+
/* @__PURE__ */ r(t, { as: "h3", defaultVariant: "headingLg", mobileVariant: "headingSm", className: a.label, children: [
|
|
8
|
+
"(",
|
|
9
|
+
e,
|
|
10
|
+
")"
|
|
11
|
+
] }),
|
|
12
|
+
/* @__PURE__ */ m("div", { className: n(a.divider, a[s]) })
|
|
13
|
+
] });
|
|
14
|
+
export {
|
|
15
|
+
d as ColoredDivider,
|
|
16
|
+
i as TDividerColor
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="coloredDivider-module__root___OxIDb",o="coloredDivider-module__label___kfTPD",_="coloredDivider-module__divider___kLQsX",l="coloredDivider-module__grey___LW-4N",r="coloredDivider-module__senescence___lB0ja",d="coloredDivider-module__metabolism___Q9Img",s="coloredDivider-module__energy___sBKuD",i="coloredDivider-module__labs___eu4Qr",c={root:e,label:o,divider:_,grey:l,senescence:r,metabolism:d,energy:s,labs:i};exports.default=c;exports.divider=_;exports.energy=s;exports.grey=l;exports.label=o;exports.labs=i;exports.metabolism=d;exports.root=e;exports.senescence=r;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "coloredDivider-module__root___OxIDb", o = "coloredDivider-module__label___kfTPD", _ = "coloredDivider-module__divider___kLQsX", d = "coloredDivider-module__grey___LW-4N", l = "coloredDivider-module__senescence___lB0ja", r = "coloredDivider-module__metabolism___Q9Img", s = "coloredDivider-module__energy___sBKuD", i = "coloredDivider-module__labs___eu4Qr", c = {
|
|
2
|
+
root: e,
|
|
3
|
+
label: o,
|
|
4
|
+
divider: _,
|
|
5
|
+
grey: d,
|
|
6
|
+
senescence: l,
|
|
7
|
+
metabolism: r,
|
|
8
|
+
energy: s,
|
|
9
|
+
labs: i
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
c as default,
|
|
13
|
+
_ as divider,
|
|
14
|
+
s as energy,
|
|
15
|
+
d as grey,
|
|
16
|
+
o as label,
|
|
17
|
+
i as labs,
|
|
18
|
+
r as metabolism,
|
|
19
|
+
e as root,
|
|
20
|
+
l as senescence
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ColoredDivider } from './ColoredDivider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),t=require("react"),f=require("../../utils/cn/cn.cjs.js"),i=require("../Icon/Icon.cjs.js"),n=require("./tabs.module.css.cjs.js");function m({activeTab:c,tabs:l,onTabClick:r,size:a="sm",activeLinePosition:d="bottom",inverted:o},u){return s.jsx("div",{ref:u,className:n.default.container,children:l.map(e=>s.jsxs("button",{className:f.cn(n.default.tab,n.default[a],{[n.default.inverted]:o,[n.default.activeTab]:c===e.value,[n.default.disabled]:e.disabled,[n.default.brackets]:a!=="sm"&&c===e.value&&l.length>1},n.default[d],e.className),disabled:e.disabled,onClick:()=>r(e.value),children:[e.prefixIcon&&s.jsx("div",{className:n.default.iconWrap,children:s.jsx(i.Icon,{name:e.prefixIcon})}),s.jsx("div",{children:e.label}),e.suffixIcon&&s.jsx("div",{className:n.default.iconWrap,children:s.jsx(i.Icon,{name:e.suffixIcon})})]},String(e.value)))})}const x=t.forwardRef(m);exports.Tabs=x;
|
|
@@ -1,23 +1,6 @@
|
|
|
1
|
-
import { ForwardedRef, ReactElement
|
|
2
|
-
import {
|
|
1
|
+
import { ForwardedRef, ReactElement } from 'react';
|
|
2
|
+
import { TTabs } from './types';
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
value: T;
|
|
6
|
-
label: ReactNode;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
className?: string;
|
|
9
|
-
prefixIcon?: EIconName;
|
|
10
|
-
suffixIcon?: EIconName;
|
|
11
|
-
};
|
|
12
|
-
type Props<T extends string | number> = {
|
|
13
|
-
activeTab: T;
|
|
14
|
-
tabs: ReadonlyArray<Tab<T>>;
|
|
15
|
-
size?: 'sm' | 'lg';
|
|
16
|
-
activeLinePosition?: 'top' | 'bottom';
|
|
17
|
-
inverted?: boolean;
|
|
18
|
-
onTabClick: (value: T) => void;
|
|
19
|
-
};
|
|
20
|
-
export declare const Tabs: <T extends string | number>(props: Props<T> & {
|
|
4
|
+
export declare const Tabs: <T extends string | number>(props: TTabs<T> & {
|
|
21
5
|
ref?: ForwardedRef<HTMLDivElement>;
|
|
22
6
|
}) => ReactElement;
|
|
23
|
-
export {};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsx as n, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p } from "react";
|
|
3
3
|
import { cn as t } from "../../utils/cn/cn.es.js";
|
|
4
|
-
import { Icon as
|
|
4
|
+
import { Icon as c } from "../Icon/Icon.es.js";
|
|
5
5
|
import i from "./tabs.module.css.es.js";
|
|
6
|
-
function u({ activeTab: o, tabs: r, onTabClick:
|
|
6
|
+
function u({ activeTab: o, tabs: r, onTabClick: l, size: s = "sm", activeLinePosition: m = "bottom", inverted: d }, a) {
|
|
7
7
|
return /* @__PURE__ */ n("div", { ref: a, className: i.container, children: r.map((e) => /* @__PURE__ */ f(
|
|
8
8
|
"button",
|
|
9
9
|
{
|
|
10
10
|
className: t(
|
|
11
11
|
i.tab,
|
|
12
|
-
i[
|
|
12
|
+
i[s],
|
|
13
13
|
{
|
|
14
14
|
[i.inverted]: d,
|
|
15
15
|
[i.activeTab]: o === e.value,
|
|
16
16
|
[i.disabled]: e.disabled,
|
|
17
|
-
[i.brackets]:
|
|
17
|
+
[i.brackets]: s !== "sm" && o === e.value && r.length > 1
|
|
18
18
|
},
|
|
19
19
|
i[m],
|
|
20
20
|
e.className
|
|
21
21
|
),
|
|
22
22
|
disabled: e.disabled,
|
|
23
|
-
onClick: () =>
|
|
23
|
+
onClick: () => l(e.value),
|
|
24
24
|
children: [
|
|
25
|
-
e.prefixIcon && /* @__PURE__ */ n("div", { className: i.iconWrap, children: /* @__PURE__ */ n(
|
|
25
|
+
e.prefixIcon && /* @__PURE__ */ n("div", { className: i.iconWrap, children: /* @__PURE__ */ n(c, { name: e.prefixIcon }) }),
|
|
26
26
|
/* @__PURE__ */ n("div", { children: e.label }),
|
|
27
|
-
e.suffixIcon && /* @__PURE__ */ n("div", { className: i.iconWrap, children: /* @__PURE__ */ n(
|
|
27
|
+
e.suffixIcon && /* @__PURE__ */ n("div", { className: i.iconWrap, children: /* @__PURE__ */ n(c, { name: e.suffixIcon }) })
|
|
28
28
|
]
|
|
29
29
|
},
|
|
30
30
|
String(e.value)
|
|
@@ -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 c=require("react/jsx-runtime"),s=require("react"),d=require("../../utils/cn/cn.cjs.js"),f=require("./Tabs.cjs.js"),r=require("./tabs.module.css.cjs.js");function h(a){const n=s.useRef(null),[l,o]=s.useState(!1),[i,u]=s.useState(!1),t=s.useCallback(()=>{const e=n.current;e&&(o(e.scrollLeft>0),u(e.scrollLeft+e.clientWidth<e.scrollWidth))},[]);return s.useEffect(()=>{const e=n.current;if(e)return t(),e.addEventListener("scroll",t),window.addEventListener("resize",t),()=>{e.removeEventListener("scroll",t),window.removeEventListener("resize",t)}},[t]),c.jsx("div",{className:d.cn(r.default.tabsWrapper,{[r.default.showFadeLeft]:l,[r.default.showFadeRight]:i}),children:c.jsx("div",{ref:n,className:r.default.tabsTape,children:c.jsx(f.Tabs,{...a})})})}exports.TabsWithFade=h;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TTabs } from './types';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
tabs: Tab<T>[];
|
|
5
|
-
activeTab: T;
|
|
6
|
-
onTabChange: (tab: T) => void;
|
|
7
|
-
};
|
|
8
|
-
export declare function TabsWithFade<T extends string>({ tabs, activeTab, onTabChange }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
3
|
+
export declare function TabsWithFade<T extends string>(tabsProps: TTabs<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Tabs as
|
|
3
|
+
import { useRef as d, useState as n, useCallback as h, useEffect as m } from "react";
|
|
4
|
+
import { cn as u } from "../../utils/cn/cn.es.js";
|
|
5
|
+
import { Tabs as p } from "./Tabs.es.js";
|
|
6
6
|
import r from "./tabs.module.css.es.js";
|
|
7
|
-
function
|
|
8
|
-
const s =
|
|
7
|
+
function R(i) {
|
|
8
|
+
const s = d(null), [l, c] = n(!1), [a, f] = n(!1), t = h(() => {
|
|
9
9
|
const e = s.current;
|
|
10
|
-
e && (
|
|
10
|
+
e && (c(e.scrollLeft > 0), f(e.scrollLeft + e.clientWidth < e.scrollWidth));
|
|
11
11
|
}, []);
|
|
12
|
-
return
|
|
12
|
+
return m(() => {
|
|
13
13
|
const e = s.current;
|
|
14
14
|
if (e)
|
|
15
15
|
return t(), e.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
|
|
@@ -18,23 +18,14 @@ function g({ tabs: n, activeTab: l, onTabChange: c }) {
|
|
|
18
18
|
}, [t]), /* @__PURE__ */ o(
|
|
19
19
|
"div",
|
|
20
20
|
{
|
|
21
|
-
className:
|
|
22
|
-
[r.showFadeLeft]:
|
|
23
|
-
[r.showFadeRight]:
|
|
21
|
+
className: u(r.tabsWrapper, {
|
|
22
|
+
[r.showFadeLeft]: l,
|
|
23
|
+
[r.showFadeRight]: a
|
|
24
24
|
}),
|
|
25
|
-
children: /* @__PURE__ */ o("div", { ref: s, className: r.tabsTape, children: /* @__PURE__ */ o(
|
|
26
|
-
L,
|
|
27
|
-
{
|
|
28
|
-
activeTab: l,
|
|
29
|
-
tabs: n,
|
|
30
|
-
size: "lg",
|
|
31
|
-
activeLinePosition: "bottom",
|
|
32
|
-
onTabClick: c
|
|
33
|
-
}
|
|
34
|
-
) })
|
|
25
|
+
children: /* @__PURE__ */ o("div", { ref: s, className: r.tabsTape, children: /* @__PURE__ */ o(p, { ...i }) })
|
|
35
26
|
}
|
|
36
27
|
);
|
|
37
28
|
}
|
|
38
29
|
export {
|
|
39
|
-
|
|
30
|
+
R as TabsWithFade
|
|
40
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="tabs-module__container___NRX40",
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="tabs-module__container___NRX40",_="tabs-module__tab___McM3m",e="tabs-module__sm___m4fiR",a="tabs-module__md___Va2xk",o="tabs-module__lg___SVeHo",s="tabs-module__inverted___CBzom",b="tabs-module__disabled___AXCIC",d="tabs-module__bottom___Ho7ee",c="tabs-module__top___jthT8",n="tabs-module__activeTab___MHq7V",m="tabs-module__brackets___37Jhe",l="tabs-module__iconWrap___RY5wP",r="tabs-module__tabsTape___wsU1y",i="tabs-module__tabsWrapper___MLrX-",u="tabs-module__showFadeLeft___GGn8-",p="tabs-module__showFadeRight___a90mU",h={container:t,tab:_,sm:e,md:a,lg:o,inverted:s,disabled:b,bottom:d,top:c,activeTab:n,brackets:m,iconWrap:l,tabsTape:r,tabsWrapper:i,showFadeLeft:u,showFadeRight:p};exports.activeTab=n;exports.bottom=d;exports.brackets=m;exports.container=t;exports.default=h;exports.disabled=b;exports.iconWrap=l;exports.inverted=s;exports.lg=o;exports.md=a;exports.showFadeLeft=u;exports.showFadeRight=p;exports.sm=e;exports.tab=_;exports.tabsTape=r;exports.tabsWrapper=i;exports.top=c;
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
const _ = "tabs-module__container___NRX40", t = "tabs-module__tab___McM3m", a = "tabs-module__sm___m4fiR", o = "tabs-
|
|
1
|
+
const _ = "tabs-module__container___NRX40", t = "tabs-module__tab___McM3m", a = "tabs-module__sm___m4fiR", o = "tabs-module__md___Va2xk", s = "tabs-module__lg___SVeHo", e = "tabs-module__inverted___CBzom", b = "tabs-module__disabled___AXCIC", d = "tabs-module__bottom___Ho7ee", c = "tabs-module__top___jthT8", n = "tabs-module__activeTab___MHq7V", m = "tabs-module__brackets___37Jhe", l = "tabs-module__iconWrap___RY5wP", r = "tabs-module__tabsTape___wsU1y", i = "tabs-module__tabsWrapper___MLrX-", u = "tabs-module__showFadeLeft___GGn8-", p = "tabs-module__showFadeRight___a90mU", h = {
|
|
2
2
|
container: _,
|
|
3
3
|
tab: t,
|
|
4
4
|
sm: a,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
md: o,
|
|
6
|
+
lg: s,
|
|
7
|
+
inverted: e,
|
|
8
|
+
disabled: b,
|
|
9
|
+
bottom: d,
|
|
10
|
+
top: c,
|
|
11
|
+
activeTab: n,
|
|
12
|
+
brackets: m,
|
|
13
|
+
iconWrap: l,
|
|
14
|
+
tabsTape: r,
|
|
15
|
+
tabsWrapper: i,
|
|
16
|
+
showFadeLeft: u,
|
|
16
17
|
showFadeRight: p
|
|
17
18
|
};
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
n as activeTab,
|
|
21
|
+
d as bottom,
|
|
22
|
+
m as brackets,
|
|
22
23
|
_ as container,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
h as default,
|
|
25
|
+
b as disabled,
|
|
26
|
+
l as iconWrap,
|
|
27
|
+
e as inverted,
|
|
28
|
+
s as lg,
|
|
29
|
+
o as md,
|
|
30
|
+
u as showFadeLeft,
|
|
29
31
|
p as showFadeRight,
|
|
30
32
|
a as sm,
|
|
31
33
|
t as tab,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
r as tabsTape,
|
|
35
|
+
i as tabsWrapper,
|
|
36
|
+
c as top
|
|
35
37
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { EIconName } from '../Icon';
|
|
3
|
+
|
|
4
|
+
export type TTab<T extends string | number> = {
|
|
5
|
+
value: T;
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
prefixIcon?: EIconName;
|
|
10
|
+
suffixIcon?: EIconName;
|
|
11
|
+
};
|
|
12
|
+
export type TTabs<T extends string | number> = {
|
|
13
|
+
activeTab: T;
|
|
14
|
+
tabs: ReadonlyArray<TTab<T>>;
|
|
15
|
+
size?: 'sm' | 'md' | 'lg';
|
|
16
|
+
activeLinePosition?: 'top' | 'bottom';
|
|
17
|
+
inverted?: boolean;
|
|
18
|
+
onTabClick: (value: T) => void;
|
|
19
|
+
};
|