@zenpatient-org/healthspan-marketing-ui 0.1.33 → 0.1.35
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/_virtual/_commonjsHelpers.cjs.js +1 -0
- package/dist/_virtual/_commonjsHelpers.es.js +6 -0
- package/dist/_virtual/browser.cjs.js +1 -0
- package/dist/_virtual/browser.es.js +4 -0
- package/dist/_virtual/debug.cjs.js +1 -0
- package/dist/_virtual/debug.es.js +4 -0
- package/dist/_virtual/index.cjs.js +1 -0
- package/dist/_virtual/index.cjs2.js +1 -0
- package/dist/_virtual/index.cjs3.js +1 -0
- package/dist/_virtual/index.cjs4.js +1 -0
- package/dist/_virtual/index.es.js +7 -0
- package/dist/_virtual/index.es2.js +7 -0
- package/dist/_virtual/index.es3.js +4 -0
- package/dist/_virtual/index.es4.js +4 -0
- package/dist/_virtual/react-is.development.cjs.js +1 -0
- package/dist/_virtual/react-is.development.es.js +4 -0
- package/dist/_virtual/react-is.production.min.cjs.js +1 -0
- package/dist/_virtual/react-is.production.min.es.js +4 -0
- package/dist/_virtual/to-querystring.min.cjs.js +1 -0
- package/dist/_virtual/to-querystring.min.cjs2.js +1 -0
- package/dist/_virtual/to-querystring.min.es.js +7 -0
- package/dist/_virtual/to-querystring.min.es2.js +4 -0
- package/dist/components/Accordion/components/AccordionItem/index.d.ts +1 -1
- package/dist/components/CircleHighlights/CircleHighlights.cjs.js +1 -0
- package/dist/components/CircleHighlights/CircleHighlights.d.ts +10 -0
- package/dist/components/CircleHighlights/CircleHighlights.es.js +20 -0
- package/dist/components/CircleHighlights/circleHighlights.module.css.cjs.js +1 -0
- package/dist/components/CircleHighlights/circleHighlights.module.css.es.js +19 -0
- package/dist/components/CircleHighlights/index.d.ts +1 -0
- package/dist/components/ComplexImageCarousel/ComplexImageCarousel.cjs.js +1 -1
- package/dist/components/ComplexImageCarousel/ComplexImageCarousel.d.ts +1 -1
- package/dist/components/ComplexImageCarousel/ComplexImageCarousel.es.js +46 -123
- package/dist/components/ComplexImageCarousel/complexImageCarousel.module.css.cjs.js +1 -1
- package/dist/components/ComplexImageCarousel/complexImageCarousel.module.css.es.js +19 -14
- package/dist/components/ComplexImageCarousel/useComplexImageCarousel.cjs.js +1 -0
- package/dist/components/ComplexImageCarousel/useComplexImageCarousel.d.ts +19 -0
- package/dist/components/ComplexImageCarousel/useComplexImageCarousel.es.js +133 -0
- package/dist/components/FilterMenu/FilterMenu.cjs.js +1 -1
- package/dist/components/FilterMenu/FilterMenu.d.ts +4 -1
- package/dist/components/FilterMenu/FilterMenu.es.js +51 -38
- package/dist/components/FilterMenu/filterMenu.module.css.cjs.js +1 -1
- package/dist/components/FilterMenu/filterMenu.module.css.es.js +8 -6
- package/dist/components/Pagination/Pagination.cjs.js +1 -1
- package/dist/components/Pagination/Pagination.es.js +24 -24
- package/dist/components/RatingStars/RatingStars.cjs.js +1 -1
- package/dist/components/RatingStars/RatingStars.es.js +10 -16
- package/dist/components/RatingStars/ratingStars.module.css.cjs.js +1 -1
- package/dist/components/RatingStars/ratingStars.module.css.es.js +3 -5
- package/dist/components/StudyGridCard/StudyGridCard.cjs.js +1 -1
- package/dist/components/StudyGridCard/StudyGridCard.es.js +24 -30
- package/dist/components/TextInput/TextInput.cjs.js +1 -0
- package/dist/components/TextInput/TextInput.d.ts +20 -0
- package/dist/components/TextInput/TextInput.es.js +86 -0
- package/dist/components/TextInput/index.d.ts +1 -0
- package/dist/components/TextInput/textInput.module.css.cjs.js +1 -0
- package/dist/components/TextInput/textInput.module.css.es.js +32 -0
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/icons/social/star-half.svg.cjs.js +1 -1
- package/dist/icons/social/star-half.svg.es.js +2 -2
- package/dist/modules/ResearchEssentialReadings/ResearchEssentialReadings.cjs.js +1 -0
- package/dist/modules/ResearchEssentialReadings/ResearchEssentialReadings.d.ts +3 -0
- package/dist/modules/ResearchEssentialReadings/ResearchEssentialReadings.es.js +89 -0
- package/dist/modules/ResearchEssentialReadings/components/ReadingCard/ReadingCard.cjs.js +1 -0
- package/dist/modules/ResearchEssentialReadings/components/ReadingCard/ReadingCard.d.ts +3 -0
- package/dist/modules/ResearchEssentialReadings/components/ReadingCard/ReadingCard.es.js +26 -0
- package/dist/modules/ResearchEssentialReadings/components/ReadingCard/index.d.ts +2 -0
- package/dist/modules/ResearchEssentialReadings/components/ReadingCard/readingCard.module.css.cjs.js +1 -0
- package/dist/modules/ResearchEssentialReadings/components/ReadingCard/readingCard.module.css.es.js +17 -0
- package/dist/modules/ResearchEssentialReadings/components/ReadingCard/types.d.ts +10 -0
- package/dist/modules/ResearchEssentialReadings/components/index.d.ts +2 -0
- package/dist/modules/ResearchEssentialReadings/index.d.ts +1 -0
- package/dist/modules/ResearchEssentialReadings/researchEssentialReadings.module.css.cjs.js +1 -0
- package/dist/modules/ResearchEssentialReadings/researchEssentialReadings.module.css.es.js +27 -0
- package/dist/modules/ResearchEssentialReadings/types.d.ts +5 -0
- package/dist/modules/ResearchFeatured/ResearchFeatured.cjs.js +1 -0
- package/dist/modules/ResearchFeatured/ResearchFeatured.d.ts +3 -0
- package/dist/modules/ResearchFeatured/ResearchFeatured.es.js +16 -0
- package/dist/modules/ResearchFeatured/components/FeaturedArticle/FeaturedArticle.cjs.js +1 -0
- package/dist/modules/ResearchFeatured/components/FeaturedArticle/FeaturedArticle.d.ts +3 -0
- package/dist/modules/ResearchFeatured/components/FeaturedArticle/FeaturedArticle.es.js +37 -0
- package/dist/modules/ResearchFeatured/components/FeaturedArticle/featuredArticle.module.css.cjs.js +1 -0
- package/dist/modules/ResearchFeatured/components/FeaturedArticle/featuredArticle.module.css.es.js +19 -0
- package/dist/modules/ResearchFeatured/components/FeaturedArticle/index.d.ts +2 -0
- package/dist/modules/ResearchFeatured/components/FeaturedArticle/types.d.ts +7 -0
- package/dist/modules/ResearchFeatured/components/HighlightedArticle/HighlightedArticle.cjs.js +1 -0
- package/dist/modules/ResearchFeatured/components/HighlightedArticle/HighlightedArticle.d.ts +3 -0
- package/dist/modules/ResearchFeatured/components/HighlightedArticle/HighlightedArticle.es.js +15 -0
- package/dist/modules/ResearchFeatured/components/HighlightedArticle/highlightedArticle.module.css.cjs.js +1 -0
- package/dist/modules/ResearchFeatured/components/HighlightedArticle/highlightedArticle.module.css.es.js +15 -0
- package/dist/modules/ResearchFeatured/components/HighlightedArticle/index.d.ts +1 -0
- package/dist/modules/ResearchFeatured/components/HighlightedArticle/types.d.ts +9 -0
- package/dist/modules/ResearchFeatured/components/index.d.ts +4 -0
- package/dist/modules/ResearchFeatured/index.d.ts +1 -0
- package/dist/modules/ResearchFeatured/researchFeatured.module.css.cjs.js +1 -0
- package/dist/modules/ResearchFeatured/researchFeatured.module.css.es.js +15 -0
- package/dist/modules/ResearchFeatured/types.d.ts +6 -0
- package/dist/modules/ResearchStudies/ResearchStudies.cjs.js +1 -0
- package/dist/modules/ResearchStudies/ResearchStudies.d.ts +3 -0
- package/dist/modules/ResearchStudies/ResearchStudies.es.js +16 -0
- package/dist/modules/ResearchStudies/components/StudyCard/StudyCard.cjs.js +1 -0
- package/dist/modules/ResearchStudies/components/StudyCard/StudyCard.d.ts +3 -0
- package/dist/modules/ResearchStudies/components/StudyCard/StudyCard.es.js +30 -0
- package/dist/modules/ResearchStudies/components/StudyCard/index.d.ts +2 -0
- package/dist/modules/ResearchStudies/components/StudyCard/studyCard.module.css.cjs.js +1 -0
- package/dist/modules/ResearchStudies/components/StudyCard/studyCard.module.css.es.js +21 -0
- package/dist/modules/ResearchStudies/components/StudyCard/types.d.ts +10 -0
- package/dist/modules/ResearchStudies/components/index.d.ts +2 -0
- package/dist/modules/ResearchStudies/index.d.ts +1 -0
- package/dist/modules/ResearchStudies/researchStudies.module.css.cjs.js +1 -0
- package/dist/modules/ResearchStudies/researchStudies.module.css.es.js +13 -0
- package/dist/modules/ResearchStudies/types.d.ts +5 -0
- package/dist/node_modules/jsonp/index.cjs.js +1 -0
- package/dist/node_modules/jsonp/index.es.js +31 -0
- package/dist/node_modules/jsonp/node_modules/debug/src/browser.cjs.js +1 -0
- package/dist/node_modules/jsonp/node_modules/debug/src/browser.es.js +67 -0
- package/dist/node_modules/jsonp/node_modules/debug/src/debug.cjs.js +1 -0
- package/dist/node_modules/jsonp/node_modules/debug/src/debug.es.js +64 -0
- package/dist/node_modules/jsonp/node_modules/ms/index.cjs.js +1 -0
- package/dist/node_modules/jsonp/node_modules/ms/index.es.js +79 -0
- package/dist/node_modules/object-assign/index.cjs.js +5 -0
- package/dist/node_modules/object-assign/index.es.js +54 -0
- package/dist/node_modules/prop-types/checkPropTypes.cjs.js +1 -0
- package/dist/node_modules/prop-types/checkPropTypes.es.js +54 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.cjs.js +1 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.es.js +52 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.cjs.js +2 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.es.js +329 -0
- package/dist/node_modules/prop-types/index.cjs.js +1 -0
- package/dist/node_modules/prop-types/index.es.js +17 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.cjs.js +1 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.es.js +10 -0
- package/dist/node_modules/prop-types/lib/has.cjs.js +1 -0
- package/dist/node_modules/prop-types/lib/has.es.js +7 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.cjs.js +8 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.es.js +95 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.cjs.js +8 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.es.js +78 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.cjs.js +1 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.es.js +10 -0
- package/dist/node_modules/react-mailchimp-subscribe/es/SimpleForm.cjs.js +1 -0
- package/dist/node_modules/react-mailchimp-subscribe/es/SimpleForm.es.js +40 -0
- package/dist/node_modules/react-mailchimp-subscribe/es/index.cjs.js +1 -0
- package/dist/node_modules/react-mailchimp-subscribe/es/index.es.js +81 -0
- package/dist/node_modules/to-querystring/lib/to-querystring.min.cjs.js +1 -0
- package/dist/node_modules/to-querystring/lib/to-querystring.min.es.js +54 -0
- package/dist/pageComponents/ContactUs/ContactUs.cjs.js +1 -0
- package/dist/pageComponents/ContactUs/ContactUs.d.ts +1 -0
- package/dist/pageComponents/ContactUs/ContactUs.es.js +79 -0
- package/dist/pageComponents/ContactUs/contactUs.module.css.cjs.js +1 -0
- package/dist/pageComponents/ContactUs/contactUs.module.css.es.js +37 -0
- package/dist/pageComponents/ContactUs/index.d.ts +1 -0
- package/dist/pageComponents/Footer/Footer.cjs.js +1 -0
- package/dist/pageComponents/Footer/Footer.d.ts +17 -0
- package/dist/pageComponents/Footer/Footer.es.js +63 -0
- package/dist/pageComponents/Footer/assets/CompanyName.svg.cjs.js +1 -0
- package/dist/pageComponents/Footer/assets/CompanyName.svg.es.js +5 -0
- package/dist/pageComponents/Footer/assets/logo.png.cjs.js +1 -0
- package/dist/pageComponents/Footer/assets/logo.png.es.js +4 -0
- package/dist/pageComponents/Footer/components/AccordionFooter/AccordionFooter.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/AccordionFooter/AccordionFooter.d.ts +13 -0
- package/dist/pageComponents/Footer/components/AccordionFooter/AccordionFooter.es.js +24 -0
- package/dist/pageComponents/Footer/components/AccordionFooter/accordionFooter.module.css.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/AccordionFooter/accordionFooter.module.css.es.js +7 -0
- package/dist/pageComponents/Footer/components/AccordionFooter/index.d.ts +1 -0
- package/dist/pageComponents/Footer/components/AccordionFooterItem/AccordionFooterItem.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/AccordionFooterItem/AccordionFooterItem.d.ts +14 -0
- package/dist/pageComponents/Footer/components/AccordionFooterItem/AccordionFooterItem.es.js +29 -0
- package/dist/pageComponents/Footer/components/AccordionFooterItem/accordionFooterItem.module.css.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/AccordionFooterItem/accordionFooterItem.module.css.es.js +27 -0
- package/dist/pageComponents/Footer/components/AccordionFooterItem/index.d.ts +1 -0
- package/dist/pageComponents/Footer/components/FooterAbout/FooterAbout.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/FooterAbout/FooterAbout.d.ts +1 -0
- package/dist/pageComponents/Footer/components/FooterAbout/FooterAbout.es.js +42 -0
- package/dist/pageComponents/Footer/components/FooterAbout/footerAbout.module.css.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/FooterAbout/footerAbout.module.css.es.js +11 -0
- package/dist/pageComponents/Footer/components/FooterAbout/index.d.ts +1 -0
- package/dist/pageComponents/Footer/components/FooterLinksBlock/FooterLinksBlock.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/FooterLinksBlock/FooterLinksBlock.d.ts +5 -0
- package/dist/pageComponents/Footer/components/FooterLinksBlock/FooterLinksBlock.es.js +47 -0
- package/dist/pageComponents/Footer/components/FooterLinksBlock/footerLinksBlock.module.css.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/FooterLinksBlock/footerLinksBlock.module.css.es.js +11 -0
- package/dist/pageComponents/Footer/components/FooterLinksBlock/index.d.ts +1 -0
- package/dist/pageComponents/Footer/components/LinksColumn/LinksColumn.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/LinksColumn/LinksColumn.d.ts +11 -0
- package/dist/pageComponents/Footer/components/LinksColumn/LinksColumn.es.js +15 -0
- package/dist/pageComponents/Footer/components/LinksColumn/index.d.ts +1 -0
- package/dist/pageComponents/Footer/components/LinksColumn/linksColumn.module.css.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/LinksColumn/linksColumn.module.css.es.js +17 -0
- package/dist/pageComponents/Footer/components/NewsLetter/NewsLetter.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/NewsLetter/NewsLetter.d.ts +1 -0
- package/dist/pageComponents/Footer/components/NewsLetter/NewsLetter.es.js +69 -0
- package/dist/pageComponents/Footer/components/NewsLetter/index.d.ts +1 -0
- package/dist/pageComponents/Footer/components/NewsLetter/newsLetter.module.css.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/NewsLetter/newsLetter.module.css.es.js +17 -0
- package/dist/pageComponents/Footer/components/TopTreatmentsCard/TopTreatmentsCard.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/TopTreatmentsCard/TopTreatmentsCard.d.ts +11 -0
- package/dist/pageComponents/Footer/components/TopTreatmentsCard/TopTreatmentsCard.es.js +47 -0
- package/dist/pageComponents/Footer/components/TopTreatmentsCard/index.d.ts +1 -0
- package/dist/pageComponents/Footer/components/TopTreatmentsCard/topTreatmentsCard.module.css.cjs.js +1 -0
- package/dist/pageComponents/Footer/components/TopTreatmentsCard/topTreatmentsCard.module.css.es.js +33 -0
- package/dist/pageComponents/Footer/components/index.d.ts +5 -0
- package/dist/pageComponents/Footer/footer.module.css.cjs.js +1 -0
- package/dist/pageComponents/Footer/footer.module.css.es.js +25 -0
- package/dist/pageComponents/Footer/index.d.ts +1 -0
- package/dist/utils/formatDate.cjs.js +1 -0
- package/dist/utils/formatDate.d.ts +1 -0
- package/dist/utils/formatDate.es.js +10 -0
- package/dist/utils/isValidEmail.cjs.js +1 -0
- package/dist/utils/isValidEmail.d.ts +1 -0
- package/dist/utils/isValidEmail.es.js +4 -0
- package/package.json +42 -5
- package/dist/components/Accordion/components/index.d.ts +0 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
1
3
|
type TOption<T extends string | number> = {
|
|
2
4
|
label: string;
|
|
3
5
|
value: T;
|
|
@@ -11,6 +13,7 @@ type FilterMenuProps<T extends string | number> = {
|
|
|
11
13
|
open?: boolean;
|
|
12
14
|
multiple?: boolean;
|
|
13
15
|
options: ReadonlyArray<TOptionGroup<T>>;
|
|
16
|
+
headerNode?: React.ReactNode;
|
|
14
17
|
onSelect: (value: T, optionGroup: TOptionGroup<T>) => void;
|
|
15
18
|
} & ({
|
|
16
19
|
multiple: true;
|
|
@@ -19,5 +22,5 @@ type FilterMenuProps<T extends string | number> = {
|
|
|
19
22
|
multiple?: false;
|
|
20
23
|
selectedValue?: T;
|
|
21
24
|
});
|
|
22
|
-
export declare function FilterMenu<T extends string | number>({ label, open, multiple, options, selectedValue, onSelect, }: FilterMenuProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function FilterMenu<T extends string | number>({ label, open, multiple, options, selectedValue, headerNode, onSelect, }: FilterMenuProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
23
26
|
export {};
|
|
@@ -1,48 +1,61 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
2
|
+
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { useState as y } from "react";
|
|
4
4
|
import { cn as o } from "../../utils/cn/cn.es.js";
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { EIconName as
|
|
5
|
+
import { Icon as L } from "../Icon/Icon.es.js";
|
|
6
|
+
import { EIconName as d } from "../Icon/constants.es.js";
|
|
7
7
|
import { Typography as m } from "../Typography/Typography.es.js";
|
|
8
8
|
import i from "./filterMenu.module.css.es.js";
|
|
9
9
|
function w({
|
|
10
|
-
label:
|
|
11
|
-
open:
|
|
12
|
-
multiple:
|
|
13
|
-
options:
|
|
14
|
-
selectedValue:
|
|
15
|
-
|
|
10
|
+
label: p,
|
|
11
|
+
open: h = !1,
|
|
12
|
+
multiple: f,
|
|
13
|
+
options: b,
|
|
14
|
+
selectedValue: l,
|
|
15
|
+
headerNode: t,
|
|
16
|
+
onSelect: u
|
|
16
17
|
}) {
|
|
17
|
-
const [
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */ a(m, { defaultVariant: "labelLg", emphasis: !0, children:
|
|
21
|
-
/* @__PURE__ */ a(
|
|
18
|
+
const [c, N] = y(h), g = () => N((e) => !e);
|
|
19
|
+
return /* @__PURE__ */ r("div", { className: i.root, children: [
|
|
20
|
+
/* @__PURE__ */ r("button", { className: i.toggleButton, onClick: g, children: [
|
|
21
|
+
/* @__PURE__ */ a(m, { defaultVariant: "labelLg", emphasis: !0, children: p }),
|
|
22
|
+
/* @__PURE__ */ a(L, { name: c ? d.REMOVE : d.PLUS, className: i.toggleIcon })
|
|
22
23
|
] }),
|
|
23
|
-
/* @__PURE__ */ a("div", { className: o(i.menu,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
24
|
+
/* @__PURE__ */ a("div", { className: o(i.menu, c && i.isOpen), role: "menu", children: /* @__PURE__ */ r("div", { className: i.menuContent, children: [
|
|
25
|
+
t,
|
|
26
|
+
b.map((e, s) => /* @__PURE__ */ r("ul", { className: i.subOptions, children: [
|
|
27
|
+
e.label && /* @__PURE__ */ a(
|
|
28
|
+
"li",
|
|
29
|
+
{
|
|
30
|
+
className: o(i.divider, {
|
|
31
|
+
[i.dividerLine]: !!(t || s !== 0)
|
|
32
|
+
}),
|
|
33
|
+
children: /* @__PURE__ */ a(
|
|
34
|
+
m,
|
|
35
|
+
{
|
|
36
|
+
as: "div",
|
|
37
|
+
defaultVariant: "bodyMd",
|
|
38
|
+
weight: "medium",
|
|
39
|
+
className: i.dividerLabel,
|
|
40
|
+
children: e.label
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
},
|
|
44
|
+
s
|
|
45
|
+
),
|
|
46
|
+
e.values.map(({ value: n, label: v }) => /* @__PURE__ */ a("li", { className: i.option, onClick: () => u(n, e), children: /* @__PURE__ */ a(
|
|
47
|
+
m,
|
|
48
|
+
{
|
|
49
|
+
as: "div",
|
|
50
|
+
defaultVariant: "bodyMd",
|
|
51
|
+
className: o(i.optionLabel, {
|
|
52
|
+
[i.selected]: f ? l == null ? void 0 : l.includes(n) : n === l
|
|
53
|
+
}),
|
|
54
|
+
children: v
|
|
55
|
+
}
|
|
56
|
+
) }, n))
|
|
57
|
+
] }, `${e.label}_${s}`))
|
|
58
|
+
] }) })
|
|
46
59
|
] });
|
|
47
60
|
}
|
|
48
61
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="filterMenu-module__root___2bQXW",o="filterMenu-module__toggleButton___tuQZ8",t="filterMenu-module__toggleIcon___q7eVA",
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="filterMenu-module__root___2bQXW",o="filterMenu-module__toggleButton___tuQZ8",t="filterMenu-module__toggleIcon___q7eVA",n="filterMenu-module__menu___a0R5E",_="filterMenu-module__subOptions___4CcnK",i="filterMenu-module__option___Qo7qU",l="filterMenu-module__selected___ixmVF",u="filterMenu-module__divider___6UuTw",d="filterMenu-module__optionLabel___C99H6",s="filterMenu-module__dividerLabel___93rPp",r="filterMenu-module__dividerLine___WPDHB",c="filterMenu-module__isOpen___65MDX",m="filterMenu-module__menuContent___a3NE8",g={root:e,toggleButton:o,toggleIcon:t,menu:n,subOptions:_,option:i,selected:l,divider:u,optionLabel:d,dividerLabel:s,dividerLine:r,isOpen:c,menuContent:m};exports.default=g;exports.divider=u;exports.dividerLabel=s;exports.dividerLine=r;exports.isOpen=c;exports.menu=n;exports.menuContent=m;exports.option=i;exports.optionLabel=d;exports.root=e;exports.selected=l;exports.subOptions=_;exports.toggleButton=o;exports.toggleIcon=t;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "filterMenu-module__root___2bQXW", o = "filterMenu-module__toggleButton___tuQZ8", _ = "filterMenu-module__toggleIcon___q7eVA", t = "filterMenu-module__menu___a0R5E", n = "filterMenu-module__subOptions___4CcnK", i = "filterMenu-module__option___Qo7qU", l = "filterMenu-module__selected___ixmVF", u = "filterMenu-module__divider___6UuTw", d = "filterMenu-module__optionLabel___C99H6", s = "filterMenu-module__dividerLabel___93rPp", r = "filterMenu-
|
|
1
|
+
const e = "filterMenu-module__root___2bQXW", o = "filterMenu-module__toggleButton___tuQZ8", _ = "filterMenu-module__toggleIcon___q7eVA", t = "filterMenu-module__menu___a0R5E", n = "filterMenu-module__subOptions___4CcnK", i = "filterMenu-module__option___Qo7qU", l = "filterMenu-module__selected___ixmVF", u = "filterMenu-module__divider___6UuTw", d = "filterMenu-module__optionLabel___C99H6", s = "filterMenu-module__dividerLabel___93rPp", r = "filterMenu-module__dividerLine___WPDHB", c = "filterMenu-module__isOpen___65MDX", m = "filterMenu-module__menuContent___a3NE8", f = {
|
|
2
2
|
root: e,
|
|
3
3
|
toggleButton: o,
|
|
4
4
|
toggleIcon: _,
|
|
@@ -9,16 +9,18 @@ const e = "filterMenu-module__root___2bQXW", o = "filterMenu-module__toggleButto
|
|
|
9
9
|
divider: u,
|
|
10
10
|
optionLabel: d,
|
|
11
11
|
dividerLabel: s,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
dividerLine: r,
|
|
13
|
+
isOpen: c,
|
|
14
|
+
menuContent: m
|
|
14
15
|
};
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
+
f as default,
|
|
17
18
|
u as divider,
|
|
18
19
|
s as dividerLabel,
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
r as dividerLine,
|
|
21
|
+
c as isOpen,
|
|
21
22
|
t as menu,
|
|
23
|
+
m as menuContent,
|
|
22
24
|
i as option,
|
|
23
25
|
d as optionLabel,
|
|
24
26
|
e as root,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),m=require("react"),d=require("../../utils/cn/cn.cjs.js"),i=require("../Icon/Icon.cjs.js"),f=require("../Icon/constants.cjs.js"),_=require("../Typography/Typography.cjs.js"),e=require("./pagination.module.css.cjs.js"),h=(r,t,a)=>{if(t<=a)return Array.from({length:t},(c,u)=>u+1);const s=Math.floor(a/2);let n=Math.max(1,r-s),l=n+a-1;return l>t&&(l=t,n=l-a+1),Array.from({length:a},(c,u)=>n+u)},N=({page:r,pagesCount:t,visiblePagesLimit:a,disabled:s,onPageChange:n})=>{const l=m.useMemo(()=>h(r,t,a),[r,t,a]);return o.jsxs("div",{className:e.default.root,children:[o.jsx("button",{className:d.cn(e.default.arrow,e.default.arrowPrev),onClick:()=>n(r-1),disabled:s||r<=1,"aria-label":"Previous page",children:o.jsx(i.Icon,{name:f.EIconName.ARROW_BACK,className:e.default.icon})}),l.map(c=>o.jsx("button",{className:d.cn(e.default.page,c===r&&e.default.activePage),onClick:()=>n(c),children:o.jsx(_.Typography,{defaultVariant:"labelXl",weight:"regular",children:c.toString().padStart(2,"0")})},c)),o.jsx("button",{className:d.cn(e.default.arrow,e.default.arrowNext),onClick:()=>n(r+1),disabled:s||r>=t,"aria-label":"Next page",children:o.jsx(i.Icon,{name:f.EIconName.ARROW_FORWARD,className:e.default.icon})})]})};exports.Pagination=N;
|
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useMemo as
|
|
2
|
+
import { jsxs as N, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as h } from "react";
|
|
4
4
|
import { cn as s } from "../../utils/cn/cn.es.js";
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { EIconName as
|
|
5
|
+
import { Icon as d } from "../Icon/Icon.es.js";
|
|
6
|
+
import { EIconName as i } from "../Icon/constants.es.js";
|
|
7
7
|
import { Typography as x } from "../Typography/Typography.es.js";
|
|
8
8
|
import o from "./pagination.module.css.es.js";
|
|
9
9
|
const A = (r, t, a) => {
|
|
10
10
|
if (t <= a)
|
|
11
|
-
return Array.from({ length: t }, (
|
|
11
|
+
return Array.from({ length: t }, (c, f) => f + 1);
|
|
12
12
|
const n = Math.floor(a / 2);
|
|
13
|
-
let
|
|
14
|
-
return m > t && (m = t,
|
|
15
|
-
},
|
|
16
|
-
const m =
|
|
13
|
+
let l = Math.max(1, r - n), m = l + a - 1;
|
|
14
|
+
return m > t && (m = t, l = m - a + 1), Array.from({ length: a }, (c, f) => l + f);
|
|
15
|
+
}, k = ({ page: r, pagesCount: t, visiblePagesLimit: a, disabled: n, onPageChange: l }) => {
|
|
16
|
+
const m = h(
|
|
17
17
|
() => A(r, t, a),
|
|
18
18
|
[r, t, a]
|
|
19
19
|
);
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
20
|
+
return /* @__PURE__ */ N("div", { className: o.root, children: [
|
|
21
|
+
/* @__PURE__ */ e(
|
|
22
22
|
"button",
|
|
23
23
|
{
|
|
24
24
|
className: s(o.arrow, o.arrowPrev),
|
|
25
|
-
onClick: () =>
|
|
26
|
-
disabled: n,
|
|
25
|
+
onClick: () => l(r - 1),
|
|
26
|
+
disabled: n || r <= 1,
|
|
27
27
|
"aria-label": "Previous page",
|
|
28
|
-
children: /* @__PURE__ */ e(
|
|
28
|
+
children: /* @__PURE__ */ e(d, { name: i.ARROW_BACK, className: o.icon })
|
|
29
29
|
}
|
|
30
30
|
),
|
|
31
|
-
m.map((
|
|
31
|
+
m.map((c) => /* @__PURE__ */ e(
|
|
32
32
|
"button",
|
|
33
33
|
{
|
|
34
|
-
className: s(o.page,
|
|
35
|
-
onClick: () => c
|
|
36
|
-
children: /* @__PURE__ */ e(x, { defaultVariant: "labelXl", weight: "regular", children:
|
|
34
|
+
className: s(o.page, c === r && o.activePage),
|
|
35
|
+
onClick: () => l(c),
|
|
36
|
+
children: /* @__PURE__ */ e(x, { defaultVariant: "labelXl", weight: "regular", children: c.toString().padStart(2, "0") })
|
|
37
37
|
},
|
|
38
|
-
|
|
38
|
+
c
|
|
39
39
|
)),
|
|
40
|
-
|
|
40
|
+
/* @__PURE__ */ e(
|
|
41
41
|
"button",
|
|
42
42
|
{
|
|
43
43
|
className: s(o.arrow, o.arrowNext),
|
|
44
|
-
onClick: () =>
|
|
45
|
-
disabled: n,
|
|
44
|
+
onClick: () => l(r + 1),
|
|
45
|
+
disabled: n || r >= t,
|
|
46
46
|
"aria-label": "Next page",
|
|
47
|
-
children: /* @__PURE__ */ e(
|
|
47
|
+
children: /* @__PURE__ */ e(d, { name: i.ARROW_FORWARD, className: o.icon })
|
|
48
48
|
}
|
|
49
49
|
)
|
|
50
50
|
] });
|
|
51
51
|
};
|
|
52
52
|
export {
|
|
53
|
-
|
|
53
|
+
k as Pagination
|
|
54
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("../../utils/cn/cn.cjs.js"),u=require("../Icon/Icon.cjs.js"),s=require("../Icon/constants.cjs.js"),a=require("./ratingStars.module.css.cjs.js"),i=(e,t)=>{const n=t<Math.floor(e),o=!n&&t<e;return n?s.EIconName.STAR_FILL:o?s.EIconName.STAR_HALF:s.EIconName.STAR_OUTLINE},m=({rating:e,className:t,size:n})=>r.jsx("div",{className:l.cn(a.default.stars,t),"data-size":n,children:Array.from({length:5}).map((o,c)=>r.jsx("div",{className:a.default.starContainer,children:r.jsx(u.Icon,{name:i(e,c),className:a.default.starIcon})},c))});exports.RatingStars=m;
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import { jsx as a
|
|
2
|
-
import { cn as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { EIconName as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
},
|
|
10
|
-
const l = N(t, c);
|
|
11
|
-
return /* @__PURE__ */ a("div", { className: s.starContainer, children: l === r.STAR_HALF ? /* @__PURE__ */ i(f, { children: [
|
|
12
|
-
/* @__PURE__ */ a(n, { name: r.STAR_OUTLINE, className: s.starIcon }),
|
|
13
|
-
/* @__PURE__ */ a(n, { name: r.STAR_HALF, className: s.starIconHalf })
|
|
14
|
-
] }) : /* @__PURE__ */ a(n, { name: l, className: s.starIcon }) }, c);
|
|
15
|
-
}) });
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as c } from "../../utils/cn/cn.es.js";
|
|
3
|
+
import { Icon as l } from "../Icon/Icon.es.js";
|
|
4
|
+
import { EIconName as s } from "../Icon/constants.es.js";
|
|
5
|
+
import e from "./ratingStars.module.css.es.js";
|
|
6
|
+
const f = (r, t) => {
|
|
7
|
+
const o = t < Math.floor(r), m = !o && t < r;
|
|
8
|
+
return o ? s.STAR_FILL : m ? s.STAR_HALF : s.STAR_OUTLINE;
|
|
9
|
+
}, u = ({ rating: r, className: t, size: o }) => /* @__PURE__ */ a("div", { className: c(e.stars, t), "data-size": o, children: Array.from({ length: 5 }).map((m, n) => /* @__PURE__ */ a("div", { className: e.starContainer, children: /* @__PURE__ */ a(l, { name: f(r, n), className: e.starIcon }) }, n)) });
|
|
16
10
|
export {
|
|
17
|
-
|
|
11
|
+
u as RatingStars
|
|
18
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="ratingStars-module__stars___s-x3L",s="ratingStars-module__starContainer___2ch9S",
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="ratingStars-module__stars___s-x3L",s="ratingStars-module__starContainer___2ch9S",r="ratingStars-module__starIcon___skV9D",a={stars:t,starContainer:s,starIcon:r};exports.default=a;exports.starContainer=s;exports.starIcon=r;exports.stars=t;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
const t = "ratingStars-module__stars___s-x3L", s = "ratingStars-module__starContainer___2ch9S", a = "ratingStars-module__starIcon___skV9D", r =
|
|
1
|
+
const t = "ratingStars-module__stars___s-x3L", s = "ratingStars-module__starContainer___2ch9S", a = "ratingStars-module__starIcon___skV9D", r = {
|
|
2
2
|
stars: t,
|
|
3
3
|
starContainer: s,
|
|
4
|
-
starIcon: a
|
|
5
|
-
starIconHalf: r
|
|
4
|
+
starIcon: a
|
|
6
5
|
};
|
|
7
6
|
export {
|
|
8
|
-
|
|
7
|
+
r as default,
|
|
9
8
|
s as starContainer,
|
|
10
9
|
a as starIcon,
|
|
11
|
-
r as starIconHalf,
|
|
12
10
|
t as stars
|
|
13
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("../Icon/Icon.cjs.js");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("../../utils/formatDate.cjs.js");require("../Icon/Icon.cjs.js");const o=require("../Icon/constants.cjs.js"),h=require("../Label/Label.cjs.js"),i=require("../TextButton/TextButton.cjs.js"),t=require("../Typography/Typography.cjs.js"),a=require("./studyGridCard.module.css.cjs.js");function f({title:n,link:r,inverted:d,image:u,date:c,label:s,readTime:l}){return e.jsxs("div",{className:a.default.study,"data-inverted":d,children:[e.jsx("div",{className:a.default.imagePart,style:{backgroundImage:`url(${u})`},children:s&&e.jsx(h.Label,{...s})}),e.jsxs("div",{className:a.default.dataPart,children:[e.jsxs("div",{className:a.default.info,children:[e.jsx(t.Typography,{defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"medium",color:"color-neutral-500",children:m.formatDate(c)}),!!l&&e.jsxs(e.Fragment,{children:[e.jsx(t.Typography,{defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"medium",color:"color-neutral-500",children:"•"}),e.jsxs(t.Typography,{defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"medium",color:"color-neutral-500",children:[l," MIN READ"]})]})]}),e.jsx(t.Typography,{className:a.default.title,defaultVariant:"headingSm",mobileVariant:"bodySm",as:"h6",children:n}),e.jsxs("div",{className:a.default.button,children:[e.jsx(i.TextButton,{hideOn:"desktop",className:a.default.mobileButton,size:"sm",as:"a",href:r,suffixIcon:o.EIconName.ARROW_FORWARD,children:"READ MORE"}),e.jsx(i.TextButton,{hideOn:"mobile",className:a.default.desktopButton,size:"lg",as:"a",href:r,suffixIcon:o.EIconName.ARROW_FORWARD,children:"READ MORE"})]})]})]})}exports.StudyGridCard=f;
|
|
@@ -1,36 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as r, jsx as a, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import { formatDate as f } from "../../utils/formatDate.es.js";
|
|
2
3
|
import "../Icon/Icon.es.js";
|
|
3
|
-
import { EIconName as
|
|
4
|
-
import { Label as
|
|
4
|
+
import { EIconName as m } from "../Icon/constants.es.js";
|
|
5
|
+
import { Label as p } from "../Label/Label.es.js";
|
|
5
6
|
import { TextButton as s } from "../TextButton/TextButton.es.js";
|
|
6
|
-
import { Typography as
|
|
7
|
+
import { Typography as i } from "../Typography/Typography.es.js";
|
|
7
8
|
import e from "./studyGridCard.module.css.es.js";
|
|
8
|
-
function
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}).replace(/\//g, " / ");
|
|
14
|
-
}
|
|
15
|
-
function S({ title: i, link: l, inverted: o, image: c, date: u, label: n, readTime: m }) {
|
|
16
|
-
return /* @__PURE__ */ t("div", { className: e.study, "data-inverted": o, children: [
|
|
17
|
-
/* @__PURE__ */ a("div", { className: e.imagePart, style: { backgroundImage: `url(${c})` }, children: n && /* @__PURE__ */ a(f, { ...n }) }),
|
|
18
|
-
/* @__PURE__ */ t("div", { className: e.dataPart, children: [
|
|
19
|
-
/* @__PURE__ */ t("div", { className: e.info, children: [
|
|
9
|
+
function v({ title: n, link: t, inverted: d, image: c, date: h, label: l, readTime: o }) {
|
|
10
|
+
return /* @__PURE__ */ r("div", { className: e.study, "data-inverted": d, children: [
|
|
11
|
+
/* @__PURE__ */ a("div", { className: e.imagePart, style: { backgroundImage: `url(${c})` }, children: l && /* @__PURE__ */ a(p, { ...l }) }),
|
|
12
|
+
/* @__PURE__ */ r("div", { className: e.dataPart, children: [
|
|
13
|
+
/* @__PURE__ */ r("div", { className: e.info, children: [
|
|
20
14
|
/* @__PURE__ */ a(
|
|
21
|
-
|
|
15
|
+
i,
|
|
22
16
|
{
|
|
23
17
|
defaultVariant: "labelSm",
|
|
24
18
|
mobileVariant: "labelXs",
|
|
25
19
|
emphasis: !0,
|
|
26
20
|
weight: "medium",
|
|
27
21
|
color: "color-neutral-500",
|
|
28
|
-
children:
|
|
22
|
+
children: f(h)
|
|
29
23
|
}
|
|
30
24
|
),
|
|
31
|
-
!!
|
|
25
|
+
!!o && /* @__PURE__ */ r(u, { children: [
|
|
32
26
|
/* @__PURE__ */ a(
|
|
33
|
-
|
|
27
|
+
i,
|
|
34
28
|
{
|
|
35
29
|
defaultVariant: "labelSm",
|
|
36
30
|
mobileVariant: "labelXs",
|
|
@@ -40,8 +34,8 @@ function S({ title: i, link: l, inverted: o, image: c, date: u, label: n, readTi
|
|
|
40
34
|
children: "•"
|
|
41
35
|
}
|
|
42
36
|
),
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
37
|
+
/* @__PURE__ */ r(
|
|
38
|
+
i,
|
|
45
39
|
{
|
|
46
40
|
defaultVariant: "labelSm",
|
|
47
41
|
mobileVariant: "labelXs",
|
|
@@ -49,15 +43,15 @@ function S({ title: i, link: l, inverted: o, image: c, date: u, label: n, readTi
|
|
|
49
43
|
weight: "medium",
|
|
50
44
|
color: "color-neutral-500",
|
|
51
45
|
children: [
|
|
52
|
-
|
|
46
|
+
o,
|
|
53
47
|
" MIN READ"
|
|
54
48
|
]
|
|
55
49
|
}
|
|
56
50
|
)
|
|
57
51
|
] })
|
|
58
52
|
] }),
|
|
59
|
-
/* @__PURE__ */ a(
|
|
60
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ a(i, { className: e.title, defaultVariant: "headingSm", mobileVariant: "bodySm", as: "h6", children: n }),
|
|
54
|
+
/* @__PURE__ */ r("div", { className: e.button, children: [
|
|
61
55
|
/* @__PURE__ */ a(
|
|
62
56
|
s,
|
|
63
57
|
{
|
|
@@ -65,8 +59,8 @@ function S({ title: i, link: l, inverted: o, image: c, date: u, label: n, readTi
|
|
|
65
59
|
className: e.mobileButton,
|
|
66
60
|
size: "sm",
|
|
67
61
|
as: "a",
|
|
68
|
-
href:
|
|
69
|
-
suffixIcon:
|
|
62
|
+
href: t,
|
|
63
|
+
suffixIcon: m.ARROW_FORWARD,
|
|
70
64
|
children: "READ MORE"
|
|
71
65
|
}
|
|
72
66
|
),
|
|
@@ -77,8 +71,8 @@ function S({ title: i, link: l, inverted: o, image: c, date: u, label: n, readTi
|
|
|
77
71
|
className: e.desktopButton,
|
|
78
72
|
size: "lg",
|
|
79
73
|
as: "a",
|
|
80
|
-
href:
|
|
81
|
-
suffixIcon:
|
|
74
|
+
href: t,
|
|
75
|
+
suffixIcon: m.ARROW_FORWARD,
|
|
82
76
|
children: "READ MORE"
|
|
83
77
|
}
|
|
84
78
|
)
|
|
@@ -87,5 +81,5 @@ function S({ title: i, link: l, inverted: o, image: c, date: u, label: n, readTi
|
|
|
87
81
|
] });
|
|
88
82
|
}
|
|
89
83
|
export {
|
|
90
|
-
|
|
84
|
+
v as StudyGridCard
|
|
91
85
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),x=require("react"),e=require("./textInput.module.css.cjs.js"),l=require("../../utils/cn/cn.cjs.js"),g=require("../Button/Button.cjs.js"),E=require("../Icon/Icon.cjs.js"),B=require("../Icon/constants.cjs.js"),V=({placeholder:y,variant:u="primary",handleChange:o,handleKeyDown:r,disabled:i=!1,buttonText:j="SUBMIT",onButtonClick:s,error:c=!1,errorText:d,active:f=!1,value:m,label:p,type:v="button",showButton:N=!1})=>{const[h,I]=x.useState(!1),[q,b]=x.useState(""),_=typeof m=="string"&&typeof o=="function",a=_?m:q,R=n=>{_?o&&o(n):b(n.target.value)},S=()=>{s&&s(a||"")},T=n=>{n.key==="Enter"&&s&&s(a||""),r&&r(n)};return t.jsxs("div",{className:e.default.root,children:[p&&t.jsx("div",{className:l.cn(e.default.label,a&&e.default.hidden),children:p}),t.jsxs("div",{className:l.cn(e.default.container,e.default[u],{[e.default.focused]:h},{[e.default.disabled]:i},{[e.default.error]:c},{[e.default.active]:f}),children:[t.jsx("div",{className:e.default.input_container,children:t.jsx("input",{className:l.cn(e.default.input,e.default[`input_${u}`],{[e.default.error]:c},{[e.default.active]:f}),disabled:i,placeholder:y,onChange:R,onKeyDown:T,onFocus:()=>I(!0),onBlur:()=>I(!1),value:a,style:{outline:"none"}})}),N&&t.jsx("div",{className:e.default.button_container,children:t.jsx(g.Button,{variant:u==="primary"?"primary":"primary-invert",as:"button",size:"sm",type:v,onClick:S,children:j})})]}),c&&d&&t.jsxs("div",{className:e.default.errorText,children:[t.jsx(E.Icon,{name:B.EIconName.ALERT_ERROR,className:e.default.errorIcon}),d]})]})};exports.TextInput=V;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ChangeEvent, KeyboardEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
type TTextInputProps = {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
variant?: 'primary' | 'primary-invert';
|
|
6
|
+
handleChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
handleKeyDown?: (e: KeyboardEvent<HTMLElement>) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
buttonText?: string;
|
|
10
|
+
onButtonClick?: (value: string) => void;
|
|
11
|
+
error?: boolean;
|
|
12
|
+
errorText?: string;
|
|
13
|
+
active?: boolean;
|
|
14
|
+
value?: string;
|
|
15
|
+
label?: string;
|
|
16
|
+
type?: 'button' | 'submit' | 'reset';
|
|
17
|
+
showButton?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const TextInput: ({ placeholder, variant, handleChange, handleKeyDown, disabled, buttonText, onButtonClick, error, errorText, active, value, label, type, showButton, }: TTextInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v } from "react";
|
|
3
|
+
import e from "./textInput.module.css.es.js";
|
|
4
|
+
import { cn as l } from "../../utils/cn/cn.es.js";
|
|
5
|
+
import { Button as F } from "../Button/Button.es.js";
|
|
6
|
+
import { Icon as S } from "../Icon/Icon.es.js";
|
|
7
|
+
import { EIconName as w } from "../Icon/constants.es.js";
|
|
8
|
+
const O = ({
|
|
9
|
+
placeholder: I,
|
|
10
|
+
variant: r = "primary",
|
|
11
|
+
handleChange: i,
|
|
12
|
+
handleKeyDown: m,
|
|
13
|
+
disabled: u = !1,
|
|
14
|
+
buttonText: x = "SUBMIT",
|
|
15
|
+
onButtonClick: s,
|
|
16
|
+
error: a = !1,
|
|
17
|
+
errorText: f,
|
|
18
|
+
active: p = !1,
|
|
19
|
+
value: d,
|
|
20
|
+
label: y,
|
|
21
|
+
type: E = "button",
|
|
22
|
+
showButton: R = !1
|
|
23
|
+
}) => {
|
|
24
|
+
const [_, N] = v(!1), [b, T] = v(""), h = typeof d == "string" && typeof i == "function", o = h ? d : b, V = (t) => {
|
|
25
|
+
h ? i && i(t) : T(t.target.value);
|
|
26
|
+
}, g = () => {
|
|
27
|
+
s && s(o || "");
|
|
28
|
+
}, j = (t) => {
|
|
29
|
+
t.key === "Enter" && s && s(o || ""), m && m(t);
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ c("div", { className: e.root, children: [
|
|
32
|
+
y && /* @__PURE__ */ n("div", { className: l(e.label, o && e.hidden), children: y }),
|
|
33
|
+
/* @__PURE__ */ c(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: l(
|
|
37
|
+
e.container,
|
|
38
|
+
e[r],
|
|
39
|
+
{ [e.focused]: _ },
|
|
40
|
+
{ [e.disabled]: u },
|
|
41
|
+
{ [e.error]: a },
|
|
42
|
+
{ [e.active]: p }
|
|
43
|
+
),
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ n("div", { className: e.input_container, children: /* @__PURE__ */ n(
|
|
46
|
+
"input",
|
|
47
|
+
{
|
|
48
|
+
className: l(
|
|
49
|
+
e.input,
|
|
50
|
+
e[`input_${r}`],
|
|
51
|
+
{ [e.error]: a },
|
|
52
|
+
{ [e.active]: p }
|
|
53
|
+
),
|
|
54
|
+
disabled: u,
|
|
55
|
+
placeholder: I,
|
|
56
|
+
onChange: V,
|
|
57
|
+
onKeyDown: j,
|
|
58
|
+
onFocus: () => N(!0),
|
|
59
|
+
onBlur: () => N(!1),
|
|
60
|
+
value: o,
|
|
61
|
+
style: { outline: "none" }
|
|
62
|
+
}
|
|
63
|
+
) }),
|
|
64
|
+
R && /* @__PURE__ */ n("div", { className: e.button_container, children: /* @__PURE__ */ n(
|
|
65
|
+
F,
|
|
66
|
+
{
|
|
67
|
+
variant: r === "primary" ? "primary" : "primary-invert",
|
|
68
|
+
as: "button",
|
|
69
|
+
size: "sm",
|
|
70
|
+
type: E,
|
|
71
|
+
onClick: g,
|
|
72
|
+
children: x
|
|
73
|
+
}
|
|
74
|
+
) })
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
a && f && /* @__PURE__ */ c("div", { className: e.errorText, children: [
|
|
79
|
+
/* @__PURE__ */ n(S, { name: w.ALERT_ERROR, className: e.errorIcon }),
|
|
80
|
+
f
|
|
81
|
+
] })
|
|
82
|
+
] });
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
O as TextInput
|
|
86
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TextInput } from './TextInput';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="textInput-module__root___9OIkh",e="textInput-module__container___VFWsU",_="textInput-module__primary___LR6zA",o="textInput-module__errorIcon___AEDWP",r="textInput-module__focused___VSXU0",n="textInput-module__active___7nRCI",u="textInput-module__error___MSPiu",i="textInput-module__disabled___Q659x",d="textInput-module__input_container___WJvjK",c="textInput-module__input___64sMa",l="textInput-module__errorText___BLzki",a="textInput-module__label___WVtXN",s="textInput-module__hidden___7s9pj",p={root:t,container:e,primary:_,"primary-invert":"textInput-module__primary-invert___6u0f5",errorIcon:o,focused:r,active:n,error:u,disabled:i,input_container:d,input:c,errorText:l,label:a,hidden:s};exports.active=n;exports.container=e;exports.default=p;exports.disabled=i;exports.error=u;exports.errorIcon=o;exports.errorText=l;exports.focused=r;exports.hidden=s;exports.input=c;exports.input_container=d;exports.label=a;exports.primary=_;exports.root=t;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const t = "textInput-module__root___9OIkh", _ = "textInput-module__container___VFWsU", e = "textInput-module__primary___LR6zA", o = "textInput-module__errorIcon___AEDWP", n = "textInput-module__focused___VSXU0", r = "textInput-module__active___7nRCI", u = "textInput-module__error___MSPiu", d = "textInput-module__disabled___Q659x", i = "textInput-module__input_container___WJvjK", c = "textInput-module__input___64sMa", p = "textInput-module__errorText___BLzki", s = "textInput-module__label___WVtXN", l = "textInput-module__hidden___7s9pj", a = {
|
|
2
|
+
root: t,
|
|
3
|
+
container: _,
|
|
4
|
+
primary: e,
|
|
5
|
+
"primary-invert": "textInput-module__primary-invert___6u0f5",
|
|
6
|
+
errorIcon: o,
|
|
7
|
+
focused: n,
|
|
8
|
+
active: r,
|
|
9
|
+
error: u,
|
|
10
|
+
disabled: d,
|
|
11
|
+
input_container: i,
|
|
12
|
+
input: c,
|
|
13
|
+
errorText: p,
|
|
14
|
+
label: s,
|
|
15
|
+
hidden: l
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
r as active,
|
|
19
|
+
_ as container,
|
|
20
|
+
a as default,
|
|
21
|
+
d as disabled,
|
|
22
|
+
u as error,
|
|
23
|
+
o as errorIcon,
|
|
24
|
+
p as errorText,
|
|
25
|
+
n as focused,
|
|
26
|
+
l as hidden,
|
|
27
|
+
c as input,
|
|
28
|
+
i as input_container,
|
|
29
|
+
s as label,
|
|
30
|
+
e as primary,
|
|
31
|
+
t as root
|
|
32
|
+
};
|