@envive-ai/react-toolkit 0.1.10 → 0.1.11
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/Accordion/index.cjs +3 -82
- package/dist/Accordion/index.d.cts +2 -2
- package/dist/Accordion/index.d.ts +2 -2
- package/dist/Accordion/index.js +2 -75
- package/dist/Accordion-Cp3Hx2zm.js +77 -0
- package/dist/Accordion-DBZpiQe7.cjs +88 -0
- package/dist/AppliedFiltersScrollbar/index.d.cts +2 -2
- package/dist/AppliedFiltersScrollbar/index.d.ts +2 -2
- package/dist/ButtonBase/index.cjs +2 -2
- package/dist/ButtonBase/index.js +2 -2
- package/dist/DynamicFiltersScrollbar/index.d.cts +2 -2
- package/dist/DynamicFiltersScrollbar/index.d.ts +2 -2
- package/dist/FilterScrollbar/index.cjs +1 -1
- package/dist/FilterScrollbar/index.d.cts +3 -3
- package/dist/FilterScrollbar/index.d.ts +3 -3
- package/dist/FilterScrollbar/index.js +1 -1
- package/dist/Headline/index.cjs +1 -1
- package/dist/Headline/index.d.cts +2 -2
- package/dist/Headline/index.d.ts +2 -2
- package/dist/Headline/index.js +1 -1
- package/dist/ImageWithFallback/index.d.cts +2 -2
- package/dist/ImageWithFallback/index.d.ts +2 -2
- package/dist/ModalSheet/index.cjs +3 -0
- package/dist/ModalSheet/index.d.cts +38 -0
- package/dist/ModalSheet/index.d.ts +38 -0
- package/dist/ModalSheet/index.js +3 -0
- package/dist/ModalSheet-CXZgyZ4a.cjs +335 -0
- package/dist/ModalSheet-CZd5pssv.js +324 -0
- package/dist/ProductCard/index.cjs +3 -3
- package/dist/ProductCard/index.d.cts +1 -1
- package/dist/ProductCard/index.d.ts +1 -1
- package/dist/ProductCard/index.js +3 -3
- package/dist/{ProductCard-Dkkhl9pk.js → ProductCard-D-lyh8uV.js} +3 -3
- package/dist/{ProductCard-CymUvJnC.cjs → ProductCard-F49krjHk.cjs} +4 -4
- package/dist/ProductGrid/index.cjs +4 -4
- package/dist/ProductGrid/index.d.cts +3 -3
- package/dist/ProductGrid/index.d.ts +3 -3
- package/dist/ProductGrid/index.js +4 -4
- package/dist/{ProductGrid-B3Ypqh7j.js → ProductGrid-FIf5wFQx.js} +1 -1
- package/dist/{ProductGrid-ZNRujkuN.cjs → ProductGrid-QeoaIfcq.cjs} +1 -1
- package/dist/RadioButton/index.cjs +6 -0
- package/dist/RadioButton/index.d.cts +30 -0
- package/dist/RadioButton/index.d.ts +30 -0
- package/dist/RadioButton/index.js +6 -0
- package/dist/RadioButton-Bf68dZl7.js +68 -0
- package/dist/RadioButton-DZ6QXkrN.cjs +77 -0
- package/dist/RadioButtonGroup/index.cjs +8 -0
- package/dist/RadioButtonGroup/index.d.cts +36 -0
- package/dist/RadioButtonGroup/index.d.ts +36 -0
- package/dist/RadioButtonGroup/index.js +7 -0
- package/dist/RadioButtonGroup-8k7hkJYB.js +37 -0
- package/dist/RadioButtonGroup-Dc_n5amh.cjs +51 -0
- package/dist/SearchAutocomplete/index.cjs +1 -1
- package/dist/SearchAutocomplete/index.js +1 -1
- package/dist/SearchFilter/index.cjs +9 -2
- package/dist/SearchFilter/index.d.cts +15 -9
- package/dist/SearchFilter/index.d.ts +11 -5
- package/dist/SearchFilter/index.js +9 -2
- package/dist/SearchFilter-BOwErEyI.js +258 -0
- package/dist/SearchFilter-BtLKnFMm.cjs +279 -0
- package/dist/SearchInput/index.cjs +3 -3
- package/dist/SearchInput/index.d.cts +1 -1
- package/dist/SearchInput/index.d.ts +2 -2
- package/dist/SearchInput/index.js +3 -3
- package/dist/{SearchInput-BT1rrc4F.js → SearchInput-BBaYEwkR.js} +2 -2
- package/dist/{SearchInput-CdR_nsR3.cjs → SearchInput-BTNvgrIa.cjs} +2 -2
- package/dist/SearchInputForm/index.cjs +4 -4
- package/dist/SearchInputForm/index.d.cts +1 -1
- package/dist/SearchInputForm/index.d.ts +1 -1
- package/dist/SearchInputForm/index.js +4 -4
- package/dist/SearchResultsContent/index.cjs +9 -9
- package/dist/SearchResultsContent/index.d.cts +4 -4
- package/dist/SearchResultsContent/index.d.ts +4 -4
- package/dist/SearchResultsContent/index.js +9 -9
- package/dist/SearchResultsFilterSidebar/index.cjs +15 -8
- package/dist/SearchResultsFilterSidebar/index.d.cts +1 -1
- package/dist/SearchResultsFilterSidebar/index.d.ts +1 -1
- package/dist/SearchResultsFilterSidebar/index.js +13 -6
- package/dist/SearchResultsStates/index.cjs +9 -9
- package/dist/SearchResultsStates/index.d.cts +6 -6
- package/dist/SearchResultsStates/index.d.ts +6 -6
- package/dist/SearchResultsStates/index.js +9 -9
- package/dist/{SearchResultsStates-BxJphoL-.js → SearchResultsStates-CB5k1xkK.js} +5 -5
- package/dist/{SearchResultsStates-ESlrrf20.cjs → SearchResultsStates-DywK7vvp.cjs} +5 -5
- package/dist/SparkleAnimation/index.cjs +1 -1
- package/dist/SparkleAnimation/index.d.cts +2 -2
- package/dist/SparkleAnimation/index.d.ts +2 -2
- package/dist/SparkleAnimation/index.js +1 -1
- package/dist/Spinner/index.cjs +1 -1
- package/dist/Spinner/index.d.cts +2 -2
- package/dist/Spinner/index.d.ts +2 -2
- package/dist/Spinner/index.js +1 -1
- package/dist/SuggestionButton/index.cjs +1 -1
- package/dist/SuggestionButton/index.d.cts +2 -2
- package/dist/SuggestionButton/index.d.ts +2 -2
- package/dist/SuggestionButton/index.js +1 -1
- package/dist/Text/index.d.cts +2 -2
- package/dist/Text/index.d.ts +3 -3
- package/dist/TextInput/index.cjs +1 -1
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/ToggleButton/index.cjs +6 -0
- package/dist/ToggleButton/index.d.cts +30 -0
- package/dist/ToggleButton/index.d.ts +30 -0
- package/dist/ToggleButton/index.js +6 -0
- package/dist/ToggleButton-BKRR_-69.js +60 -0
- package/dist/ToggleButton-D90UO4qv.cjs +68 -0
- package/dist/{index-b4yAASuy.d.cts → index-1x_hMlEf.d.cts} +4 -4
- package/dist/{index-DV2K-9lE.d.cts → index-CgjZdKpL.d.cts} +5 -5
- package/dist/{index-agU5rfIs.d.ts → index-Cl4d_pDw.d.ts} +5 -5
- package/dist/{index-uU3sIiRx.d.ts → index-H_9LhS_1.d.cts} +2 -2
- package/dist/{index-DggZTKvc.d.ts → index-QMTPxKA9.d.ts} +4 -4
- package/dist/{index-Bpjv4lP2.d.cts → index-gfYBM7Ul.d.ts} +2 -2
- package/dist/{searchFilterSidebarVariants-BnIcOVWR.js → searchFilterSidebarVariants-CDFCHVeZ.js} +1 -1
- package/dist/{searchFilterSidebarVariants-DVZ7wRlb.cjs → searchFilterSidebarVariants-CtmuwSBQ.cjs} +1 -1
- package/package.json +20 -3
- package/src/components/AnimatedChevron/AnimatedChevron.tsx +37 -0
- package/src/components/ModalSheet/ModalSheet.tsx +42 -0
- package/src/components/ModalSheet/common/closeIcon.tsx +40 -0
- package/src/components/ModalSheet/common/enviveWatermark.tsx +30 -0
- package/src/components/ModalSheet/desktop/desktopHeader.tsx +24 -0
- package/src/components/ModalSheet/desktop/index.tsx +118 -0
- package/src/components/ModalSheet/index.ts +1 -0
- package/src/components/ModalSheet/mobile/index.tsx +117 -0
- package/src/components/ModalSheet/mobile/mobileHeader.tsx +42 -0
- package/src/components/ModalSheet/types.ts +33 -0
- package/src/components/RadioButton/RadioButton.tsx +88 -0
- package/src/components/RadioButton/index.ts +1 -0
- package/src/components/RadioButtonGroup/RadioButtonGroup.tsx +72 -0
- package/src/components/RadioButtonGroup/index.ts +1 -0
- package/src/components/SearchFilter/SearchFilter.tsx +161 -64
- package/src/components/SearchFilter/SearchFilterFooter.tsx +55 -0
- package/src/components/SearchFilter/types.ts +2 -1
- package/src/components/SearchFilter/useHasFilterStateChanged.tsx +40 -0
- package/src/components/SearchFilter/utils.ts +15 -0
- package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +2 -2
- package/src/components/ToggleButton/ToggleButton.tsx +98 -0
- package/src/components/ToggleButton/index.ts +1 -0
- package/dist/SearchFilter-CLYCSNAa.cjs +0 -137
- package/dist/SearchFilter-qQPpx-34.js +0 -117
- /package/dist/{ButtonBase-C_uKnl48.js → ButtonBase-0NN6wmX-.js} +0 -0
- /package/dist/{ButtonBase-DGbSm0SJ.js → ButtonBase-BAf-nlCm.js} +0 -0
- /package/dist/{ButtonBase-DbWQ25n-.cjs → ButtonBase-BIXx56hq.cjs} +0 -0
- /package/dist/{ButtonBase-DGpQBeLR.cjs → ButtonBase-Do88ndKa.cjs} +0 -0
- /package/dist/{DynamicFiltersScrollbar-Dev5vGsW.js → DynamicFiltersScrollbar-C4kdNSJ9.js} +0 -0
- /package/dist/{DynamicFiltersScrollbar-ChvmEiPB.cjs → DynamicFiltersScrollbar-CVw1PINp.cjs} +0 -0
- /package/dist/{Headline-DTaT30_m.js → Headline-DNEWF8ly.js} +0 -0
- /package/dist/{Headline-DSmu5Mg8.cjs → Headline-DTT4RSv2.cjs} +0 -0
- /package/dist/{SearchAutocomplete-C4RY0IoT.js → SearchAutocomplete-C6omCGJp.js} +0 -0
- /package/dist/{SearchAutocomplete-hQDnKtwQ.cjs → SearchAutocomplete-Cofuvwwp.cjs} +0 -0
- /package/dist/{SparkleAnimation-fQHP7b-R.js → SparkleAnimation-AM4XoegD.js} +0 -0
- /package/dist/{SparkleAnimation-BY5iw7s0.cjs → SparkleAnimation-Edzqyb48.cjs} +0 -0
- /package/dist/{Spinner-BqTt55uu.js → Spinner-CjGLIRgs.js} +0 -0
- /package/dist/{Spinner-DjK8ts9E.cjs → Spinner-DFor2Szi.cjs} +0 -0
- /package/dist/{TextInput-DIjjsSMg.js → TextInput-BVPdz7e8.js} +0 -0
- /package/dist/{TextInput-BJrdkZsM.cjs → TextInput-CnXhppYn.cjs} +0 -0
- /package/dist/{colorsConfig-CYZ8f_gj.js → colorsConfig-5Yf4nrEe.js} +0 -0
- /package/dist/{colorsConfig-CJTKbJsm.cjs → colorsConfig-DFL3mBwB.cjs} +0 -0
- /package/dist/{textVariantClasses-ypYGLq0h.d.ts → textVariantClasses-kyZtL8F5.d.ts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../textVariantClasses-D77TGEy1.js";
|
|
2
2
|
import "../Text-Bod4OMPk.js";
|
|
3
|
-
import "../Headline-
|
|
4
|
-
import { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardSkeleton, ProductCardSkeletonOverrides, RatingSummary, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap } from "../ProductCard-Dkkhl9pk.js";
|
|
3
|
+
import "../Headline-DNEWF8ly.js";
|
|
5
4
|
import "../ImageWithFallback-DqxjwO3i.js";
|
|
6
|
-
import "../
|
|
5
|
+
import { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardSkeleton, ProductCardSkeletonOverrides, RatingSummary, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap } from "../ProductCard-D-lyh8uV.js";
|
|
6
|
+
import "../Spinner-CjGLIRgs.js";
|
|
7
7
|
|
|
8
8
|
export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardSkeleton, ProductCardSkeletonOverrides, RatingSummary, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Text } from "./Text-Bod4OMPk.js";
|
|
2
|
-
import { Headline } from "./Headline-
|
|
2
|
+
import { Headline } from "./Headline-DNEWF8ly.js";
|
|
3
3
|
import { ImageWithFallback } from "./ImageWithFallback-DqxjwO3i.js";
|
|
4
|
-
import { Spinner } from "./Spinner-
|
|
4
|
+
import { Spinner } from "./Spinner-CjGLIRgs.js";
|
|
5
5
|
import classNames from "classnames";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { MdStar } from "react-icons/md";
|
|
8
7
|
import { useImageResolver } from "@envive-ai/react-hooks/hooks";
|
|
8
|
+
import { MdStar } from "react-icons/md";
|
|
9
9
|
|
|
10
10
|
//#region src/components/ProductCard/productCardVariants.ts
|
|
11
11
|
/**
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
2
|
const require_Text = require('./Text-MQjxqgZZ.cjs');
|
|
3
|
-
const require_Headline = require('./Headline-
|
|
3
|
+
const require_Headline = require('./Headline-DTT4RSv2.cjs');
|
|
4
4
|
const require_ImageWithFallback = require('./ImageWithFallback-Cx-KNi-D.cjs');
|
|
5
|
-
const require_Spinner = require('./Spinner-
|
|
5
|
+
const require_Spinner = require('./Spinner-DFor2Szi.cjs');
|
|
6
6
|
let classnames = require("classnames");
|
|
7
7
|
classnames = require_chunk.__toESM(classnames);
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
10
|
-
let react_icons_md = require("react-icons/md");
|
|
11
|
-
react_icons_md = require_chunk.__toESM(react_icons_md);
|
|
12
10
|
let __envive_ai_react_hooks_hooks = require("@envive-ai/react-hooks/hooks");
|
|
13
11
|
__envive_ai_react_hooks_hooks = require_chunk.__toESM(__envive_ai_react_hooks_hooks);
|
|
12
|
+
let react_icons_md = require("react-icons/md");
|
|
13
|
+
react_icons_md = require_chunk.__toESM(react_icons_md);
|
|
14
14
|
|
|
15
15
|
//#region src/components/ProductCard/productCardVariants.ts
|
|
16
16
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
require('../textVariantClasses-Dgz7Zaql.cjs');
|
|
2
2
|
require('../Text-MQjxqgZZ.cjs');
|
|
3
|
-
require('../Headline-
|
|
4
|
-
require('../ProductCard-CymUvJnC.cjs');
|
|
3
|
+
require('../Headline-DTT4RSv2.cjs');
|
|
5
4
|
require('../ImageWithFallback-Cx-KNi-D.cjs');
|
|
6
|
-
require('../
|
|
7
|
-
|
|
5
|
+
require('../ProductCard-F49krjHk.cjs');
|
|
6
|
+
require('../Spinner-DFor2Szi.cjs');
|
|
7
|
+
const require_ProductGrid = require('../ProductGrid-QeoaIfcq.cjs');
|
|
8
8
|
|
|
9
9
|
exports.ProductGrid = require_ProductGrid.ProductGrid;
|
|
10
10
|
exports.productGridVariantClasses = require_ProductGrid.productGridVariantClasses;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant, ProductGridVariant } from "../index-
|
|
2
|
-
import * as
|
|
1
|
+
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant, ProductGridVariant } from "../index-1x_hMlEf.cjs";
|
|
2
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
3
|
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ProductGrid/ProductGrid.d.ts
|
|
@@ -22,7 +22,7 @@ declare const ProductGrid: ({
|
|
|
22
22
|
searchResponseId,
|
|
23
23
|
cardsGrowWithContainer,
|
|
24
24
|
cardDisplayLocation
|
|
25
|
-
}: ProductGridProps) =>
|
|
25
|
+
}: ProductGridProps) => react_jsx_runtime3.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/components/ProductGrid/productGridVariants.d.ts
|
|
28
28
|
interface ProductGridVariantClasses {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant, ProductGridVariant } from "../index-
|
|
2
|
-
import * as
|
|
1
|
+
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant, ProductGridVariant } from "../index-QMTPxKA9.js";
|
|
2
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
3
3
|
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ProductGrid/ProductGrid.d.ts
|
|
@@ -22,7 +22,7 @@ declare const ProductGrid: ({
|
|
|
22
22
|
searchResponseId,
|
|
23
23
|
cardsGrowWithContainer,
|
|
24
24
|
cardDisplayLocation
|
|
25
|
-
}: ProductGridProps) =>
|
|
25
|
+
}: ProductGridProps) => react_jsx_runtime26.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/components/ProductGrid/productGridVariants.d.ts
|
|
28
28
|
interface ProductGridVariantClasses {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../textVariantClasses-D77TGEy1.js";
|
|
2
2
|
import "../Text-Bod4OMPk.js";
|
|
3
|
-
import "../Headline-
|
|
4
|
-
import "../ProductCard-Dkkhl9pk.js";
|
|
3
|
+
import "../Headline-DNEWF8ly.js";
|
|
5
4
|
import "../ImageWithFallback-DqxjwO3i.js";
|
|
6
|
-
import "../
|
|
7
|
-
import
|
|
5
|
+
import "../ProductCard-D-lyh8uV.js";
|
|
6
|
+
import "../Spinner-CjGLIRgs.js";
|
|
7
|
+
import { ProductGrid, productGridVariantClasses } from "../ProductGrid-FIf5wFQx.js";
|
|
8
8
|
|
|
9
9
|
export { ProductGrid, productGridVariantClasses };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_ProductCard = require('./ProductCard-
|
|
2
|
+
const require_ProductCard = require('./ProductCard-F49krjHk.cjs');
|
|
3
3
|
let classnames = require("classnames");
|
|
4
4
|
classnames = require_chunk.__toESM(classnames);
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
2
|
+
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
|
+
|
|
4
|
+
//#region src/components/RadioButton/RadioButton.d.ts
|
|
5
|
+
interface RadioButtonProps extends TestProps {
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
label: string;
|
|
8
|
+
name: string;
|
|
9
|
+
value: string;
|
|
10
|
+
textButtonGap?: 'small' | 'medium' | 'large';
|
|
11
|
+
fillColor?: string;
|
|
12
|
+
hoverColor?: string;
|
|
13
|
+
uncheckedBorderColor?: string;
|
|
14
|
+
checked?: boolean;
|
|
15
|
+
onChange: (value: string) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const RadioButton: ({
|
|
18
|
+
isDisabled,
|
|
19
|
+
label,
|
|
20
|
+
name,
|
|
21
|
+
value,
|
|
22
|
+
textButtonGap,
|
|
23
|
+
fillColor,
|
|
24
|
+
hoverColor,
|
|
25
|
+
uncheckedBorderColor,
|
|
26
|
+
checked,
|
|
27
|
+
onChange
|
|
28
|
+
}: RadioButtonProps) => react_jsx_runtime26.JSX.Element;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { RadioButton };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
2
|
+
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
|
+
|
|
4
|
+
//#region src/components/RadioButton/RadioButton.d.ts
|
|
5
|
+
interface RadioButtonProps extends TestProps {
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
label: string;
|
|
8
|
+
name: string;
|
|
9
|
+
value: string;
|
|
10
|
+
textButtonGap?: 'small' | 'medium' | 'large';
|
|
11
|
+
fillColor?: string;
|
|
12
|
+
hoverColor?: string;
|
|
13
|
+
uncheckedBorderColor?: string;
|
|
14
|
+
checked?: boolean;
|
|
15
|
+
onChange: (value: string) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const RadioButton: ({
|
|
18
|
+
isDisabled,
|
|
19
|
+
label,
|
|
20
|
+
name,
|
|
21
|
+
value,
|
|
22
|
+
textButtonGap,
|
|
23
|
+
fillColor,
|
|
24
|
+
hoverColor,
|
|
25
|
+
uncheckedBorderColor,
|
|
26
|
+
checked,
|
|
27
|
+
onChange
|
|
28
|
+
}: RadioButtonProps) => react_jsx_runtime2.JSX.Element;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { RadioButton };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Text } from "./Text-Bod4OMPk.js";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/RadioButton/RadioButton.tsx
|
|
7
|
+
const RadioButton = ({ isDisabled = false, label, name, value, textButtonGap = "medium", fillColor, hoverColor, uncheckedBorderColor, checked = false, onChange }) => {
|
|
8
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
9
|
+
const containerClassName = classNames({
|
|
10
|
+
"spiffy-tw-flex": true,
|
|
11
|
+
"spiffy-tw-items-center": true,
|
|
12
|
+
"spiffy-tw-group": true,
|
|
13
|
+
"spiffy-tw-gap-1": textButtonGap === "small",
|
|
14
|
+
"spiffy-tw-gap-2": textButtonGap === "medium",
|
|
15
|
+
"spiffy-tw-gap-4": textButtonGap === "large",
|
|
16
|
+
"spiffy-tw-cursor-pointer": !isDisabled,
|
|
17
|
+
"spiffy-tw-opacity-40": isDisabled
|
|
18
|
+
});
|
|
19
|
+
const getFillColor = () => {
|
|
20
|
+
if (isHovered && hoverColor) return hoverColor;
|
|
21
|
+
if (checked) return fillColor;
|
|
22
|
+
return uncheckedBorderColor;
|
|
23
|
+
};
|
|
24
|
+
const handleChange = () => {
|
|
25
|
+
if (!isDisabled) onChange(value);
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
28
|
+
className: containerClassName,
|
|
29
|
+
onMouseEnter: () => !isDisabled && setIsHovered(true),
|
|
30
|
+
onMouseLeave: () => setIsHovered(false),
|
|
31
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
32
|
+
className: "spiffy-tw-relative",
|
|
33
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
34
|
+
type: "radio",
|
|
35
|
+
name,
|
|
36
|
+
value,
|
|
37
|
+
checked,
|
|
38
|
+
disabled: isDisabled,
|
|
39
|
+
onChange: handleChange,
|
|
40
|
+
className: "spiffy-tw-sr-only"
|
|
41
|
+
}), /* @__PURE__ */ jsxs("svg", {
|
|
42
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
+
width: "24",
|
|
44
|
+
height: "24",
|
|
45
|
+
viewBox: "0 0 24 24",
|
|
46
|
+
fill: "none",
|
|
47
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
48
|
+
cx: "12",
|
|
49
|
+
cy: "12",
|
|
50
|
+
r: "11.5",
|
|
51
|
+
fill: "white",
|
|
52
|
+
stroke: getFillColor()
|
|
53
|
+
}), checked && /* @__PURE__ */ jsx("circle", {
|
|
54
|
+
cx: "12",
|
|
55
|
+
cy: "12",
|
|
56
|
+
r: "9",
|
|
57
|
+
fill: getFillColor()
|
|
58
|
+
})]
|
|
59
|
+
})]
|
|
60
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
61
|
+
variant: "body3",
|
|
62
|
+
children: label
|
|
63
|
+
})]
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
export { RadioButton };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
const require_Text = require('./Text-MQjxqgZZ.cjs');
|
|
3
|
+
let react = require("react");
|
|
4
|
+
react = require_chunk.__toESM(react);
|
|
5
|
+
let classnames = require("classnames");
|
|
6
|
+
classnames = require_chunk.__toESM(classnames);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
9
|
+
|
|
10
|
+
//#region src/components/RadioButton/RadioButton.tsx
|
|
11
|
+
const RadioButton = ({ isDisabled = false, label, name, value, textButtonGap = "medium", fillColor, hoverColor, uncheckedBorderColor, checked = false, onChange }) => {
|
|
12
|
+
const [isHovered, setIsHovered] = (0, react.useState)(false);
|
|
13
|
+
const containerClassName = (0, classnames.default)({
|
|
14
|
+
"spiffy-tw-flex": true,
|
|
15
|
+
"spiffy-tw-items-center": true,
|
|
16
|
+
"spiffy-tw-group": true,
|
|
17
|
+
"spiffy-tw-gap-1": textButtonGap === "small",
|
|
18
|
+
"spiffy-tw-gap-2": textButtonGap === "medium",
|
|
19
|
+
"spiffy-tw-gap-4": textButtonGap === "large",
|
|
20
|
+
"spiffy-tw-cursor-pointer": !isDisabled,
|
|
21
|
+
"spiffy-tw-opacity-40": isDisabled
|
|
22
|
+
});
|
|
23
|
+
const getFillColor = () => {
|
|
24
|
+
if (isHovered && hoverColor) return hoverColor;
|
|
25
|
+
if (checked) return fillColor;
|
|
26
|
+
return uncheckedBorderColor;
|
|
27
|
+
};
|
|
28
|
+
const handleChange = () => {
|
|
29
|
+
if (!isDisabled) onChange(value);
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
32
|
+
className: containerClassName,
|
|
33
|
+
onMouseEnter: () => !isDisabled && setIsHovered(true),
|
|
34
|
+
onMouseLeave: () => setIsHovered(false),
|
|
35
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
36
|
+
className: "spiffy-tw-relative",
|
|
37
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
38
|
+
type: "radio",
|
|
39
|
+
name,
|
|
40
|
+
value,
|
|
41
|
+
checked,
|
|
42
|
+
disabled: isDisabled,
|
|
43
|
+
onChange: handleChange,
|
|
44
|
+
className: "spiffy-tw-sr-only"
|
|
45
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
46
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47
|
+
width: "24",
|
|
48
|
+
height: "24",
|
|
49
|
+
viewBox: "0 0 24 24",
|
|
50
|
+
fill: "none",
|
|
51
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
52
|
+
cx: "12",
|
|
53
|
+
cy: "12",
|
|
54
|
+
r: "11.5",
|
|
55
|
+
fill: "white",
|
|
56
|
+
stroke: getFillColor()
|
|
57
|
+
}), checked && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
58
|
+
cx: "12",
|
|
59
|
+
cy: "12",
|
|
60
|
+
r: "9",
|
|
61
|
+
fill: getFillColor()
|
|
62
|
+
})]
|
|
63
|
+
})]
|
|
64
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
65
|
+
variant: "body3",
|
|
66
|
+
children: label
|
|
67
|
+
})]
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
Object.defineProperty(exports, 'RadioButton', {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return RadioButton;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
require('../textVariantClasses-Dgz7Zaql.cjs');
|
|
2
|
+
require('../Text-MQjxqgZZ.cjs');
|
|
3
|
+
require('../Text-C8t_iEj6.cjs');
|
|
4
|
+
require('../RadioButton-DZ6QXkrN.cjs');
|
|
5
|
+
const require_RadioButtonGroup = require('../RadioButtonGroup-Dc_n5amh.cjs');
|
|
6
|
+
|
|
7
|
+
exports.RadioButtonGroup = require_RadioButtonGroup.RadioButtonGroup;
|
|
8
|
+
exports.SPIFFY_RADIO_BUTTON_GROUP_CLASS = require_RadioButtonGroup.SPIFFY_RADIO_BUTTON_GROUP_CLASS;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
2
|
+
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
|
+
|
|
4
|
+
//#region src/components/RadioButtonGroup/RadioButtonGroup.d.ts
|
|
5
|
+
declare const SPIFFY_RADIO_BUTTON_GROUP_CLASS = "spiffy-radio-button-group-class";
|
|
6
|
+
interface RadioButtonOption {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface RadioButtonGroupProps extends TestProps {
|
|
12
|
+
name: string;
|
|
13
|
+
options: RadioButtonOption[];
|
|
14
|
+
fillColor?: string;
|
|
15
|
+
hoverColor?: string;
|
|
16
|
+
value?: string;
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
gap?: 'small' | 'medium' | 'large';
|
|
19
|
+
textButtonGap?: 'small' | 'medium' | 'large';
|
|
20
|
+
onChange: (value: string) => void;
|
|
21
|
+
uncheckedBorderColor?: string;
|
|
22
|
+
}
|
|
23
|
+
declare const RadioButtonGroup: ({
|
|
24
|
+
name,
|
|
25
|
+
options,
|
|
26
|
+
fillColor,
|
|
27
|
+
hoverColor,
|
|
28
|
+
uncheckedBorderColor,
|
|
29
|
+
value,
|
|
30
|
+
isDisabled,
|
|
31
|
+
gap,
|
|
32
|
+
textButtonGap,
|
|
33
|
+
onChange
|
|
34
|
+
}: RadioButtonGroupProps) => react_jsx_runtime14.JSX.Element;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { RadioButtonGroup, SPIFFY_RADIO_BUTTON_GROUP_CLASS };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
|
+
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
|
+
|
|
4
|
+
//#region src/components/RadioButtonGroup/RadioButtonGroup.d.ts
|
|
5
|
+
declare const SPIFFY_RADIO_BUTTON_GROUP_CLASS = "spiffy-radio-button-group-class";
|
|
6
|
+
interface RadioButtonOption {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface RadioButtonGroupProps extends TestProps {
|
|
12
|
+
name: string;
|
|
13
|
+
options: RadioButtonOption[];
|
|
14
|
+
fillColor?: string;
|
|
15
|
+
hoverColor?: string;
|
|
16
|
+
value?: string;
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
gap?: 'small' | 'medium' | 'large';
|
|
19
|
+
textButtonGap?: 'small' | 'medium' | 'large';
|
|
20
|
+
onChange: (value: string) => void;
|
|
21
|
+
uncheckedBorderColor?: string;
|
|
22
|
+
}
|
|
23
|
+
declare const RadioButtonGroup: ({
|
|
24
|
+
name,
|
|
25
|
+
options,
|
|
26
|
+
fillColor,
|
|
27
|
+
hoverColor,
|
|
28
|
+
uncheckedBorderColor,
|
|
29
|
+
value,
|
|
30
|
+
isDisabled,
|
|
31
|
+
gap,
|
|
32
|
+
textButtonGap,
|
|
33
|
+
onChange
|
|
34
|
+
}: RadioButtonGroupProps) => react_jsx_runtime1.JSX.Element;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { RadioButtonGroup, SPIFFY_RADIO_BUTTON_GROUP_CLASS };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../textVariantClasses-D77TGEy1.js";
|
|
2
|
+
import "../Text-Bod4OMPk.js";
|
|
3
|
+
import "../Text-BMsncrpY.js";
|
|
4
|
+
import "../RadioButton-Bf68dZl7.js";
|
|
5
|
+
import { RadioButtonGroup, SPIFFY_RADIO_BUTTON_GROUP_CLASS } from "../RadioButtonGroup-8k7hkJYB.js";
|
|
6
|
+
|
|
7
|
+
export { RadioButtonGroup, SPIFFY_RADIO_BUTTON_GROUP_CLASS };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { RadioButton } from "./RadioButton-Bf68dZl7.js";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/RadioButtonGroup/RadioButtonGroup.tsx
|
|
6
|
+
const SPIFFY_RADIO_BUTTON_GROUP_CLASS = "spiffy-radio-button-group-class";
|
|
7
|
+
const RadioButtonGroup = ({ name, options, fillColor, hoverColor, uncheckedBorderColor, value, isDisabled = false, gap = "medium", textButtonGap = "medium", onChange }) => {
|
|
8
|
+
const groupClassName = classNames({
|
|
9
|
+
[SPIFFY_RADIO_BUTTON_GROUP_CLASS]: true,
|
|
10
|
+
"spiffy-tw-flex": true,
|
|
11
|
+
"spiffy-tw-flex-col": true,
|
|
12
|
+
"spiffy-tw-gap-1": gap === "small",
|
|
13
|
+
"spiffy-tw-gap-2": gap === "medium",
|
|
14
|
+
"spiffy-tw-gap-4": gap === "large"
|
|
15
|
+
});
|
|
16
|
+
const handleChange = (selectedValue) => {
|
|
17
|
+
if (!isDisabled) onChange(selectedValue);
|
|
18
|
+
};
|
|
19
|
+
return /* @__PURE__ */ jsx("div", {
|
|
20
|
+
className: groupClassName,
|
|
21
|
+
children: options.map((option) => /* @__PURE__ */ jsx(RadioButton, {
|
|
22
|
+
name,
|
|
23
|
+
value: option.value,
|
|
24
|
+
fillColor,
|
|
25
|
+
hoverColor,
|
|
26
|
+
uncheckedBorderColor,
|
|
27
|
+
label: option.label,
|
|
28
|
+
checked: value === option.value,
|
|
29
|
+
isDisabled: isDisabled || option.disabled,
|
|
30
|
+
onChange: handleChange,
|
|
31
|
+
textButtonGap
|
|
32
|
+
}, option.value))
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { RadioButtonGroup, SPIFFY_RADIO_BUTTON_GROUP_CLASS };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
const require_RadioButton = require('./RadioButton-DZ6QXkrN.cjs');
|
|
3
|
+
let classnames = require("classnames");
|
|
4
|
+
classnames = require_chunk.__toESM(classnames);
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
7
|
+
|
|
8
|
+
//#region src/components/RadioButtonGroup/RadioButtonGroup.tsx
|
|
9
|
+
const SPIFFY_RADIO_BUTTON_GROUP_CLASS = "spiffy-radio-button-group-class";
|
|
10
|
+
const RadioButtonGroup = ({ name, options, fillColor, hoverColor, uncheckedBorderColor, value, isDisabled = false, gap = "medium", textButtonGap = "medium", onChange }) => {
|
|
11
|
+
const groupClassName = (0, classnames.default)({
|
|
12
|
+
[SPIFFY_RADIO_BUTTON_GROUP_CLASS]: true,
|
|
13
|
+
"spiffy-tw-flex": true,
|
|
14
|
+
"spiffy-tw-flex-col": true,
|
|
15
|
+
"spiffy-tw-gap-1": gap === "small",
|
|
16
|
+
"spiffy-tw-gap-2": gap === "medium",
|
|
17
|
+
"spiffy-tw-gap-4": gap === "large"
|
|
18
|
+
});
|
|
19
|
+
const handleChange = (selectedValue) => {
|
|
20
|
+
if (!isDisabled) onChange(selectedValue);
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
23
|
+
className: groupClassName,
|
|
24
|
+
children: options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_RadioButton.RadioButton, {
|
|
25
|
+
name,
|
|
26
|
+
value: option.value,
|
|
27
|
+
fillColor,
|
|
28
|
+
hoverColor,
|
|
29
|
+
uncheckedBorderColor,
|
|
30
|
+
label: option.label,
|
|
31
|
+
checked: value === option.value,
|
|
32
|
+
isDisabled: isDisabled || option.disabled,
|
|
33
|
+
onChange: handleChange,
|
|
34
|
+
textButtonGap
|
|
35
|
+
}, option.value))
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
Object.defineProperty(exports, 'RadioButtonGroup', {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () {
|
|
43
|
+
return RadioButtonGroup;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, 'SPIFFY_RADIO_BUTTON_GROUP_CLASS', {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () {
|
|
49
|
+
return SPIFFY_RADIO_BUTTON_GROUP_CLASS;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
require('../textVariantClasses-Dgz7Zaql.cjs');
|
|
2
2
|
require('../Text-MQjxqgZZ.cjs');
|
|
3
|
-
require('../
|
|
4
|
-
|
|
3
|
+
require('../Text-C8t_iEj6.cjs');
|
|
4
|
+
require('../Accordion-DBZpiQe7.cjs');
|
|
5
|
+
require('../ButtonBase-Do88ndKa.cjs');
|
|
6
|
+
require('../ButtonBase-BIXx56hq.cjs');
|
|
7
|
+
require('../ModalSheet-CXZgyZ4a.cjs');
|
|
8
|
+
require('../RadioButton-DZ6QXkrN.cjs');
|
|
9
|
+
require('../RadioButtonGroup-Dc_n5amh.cjs');
|
|
10
|
+
const require_SearchFilter = require('../SearchFilter-BtLKnFMm.cjs');
|
|
11
|
+
require('../ToggleButton-D90UO4qv.cjs');
|
|
5
12
|
|
|
6
13
|
exports.SearchFilter = require_SearchFilter.SearchFilter;
|
|
7
14
|
exports.SearchFilterHeader = require_SearchFilter.SearchFilterHeader;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { SearchFilterDatum, SearchFilterItemDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
|
|
1
|
+
import * as react_jsx_runtime23 from "react/jsx-runtime";
|
|
2
|
+
import { CloseIconVariant, SearchFilterDatum, SearchFilterItemDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SearchFilter/types.d.ts
|
|
5
5
|
interface SearchFilterItem$1 extends SearchFilterItemDatum {
|
|
@@ -35,21 +35,27 @@ type SearchFilterProps = {
|
|
|
35
35
|
radioButtonFillColor: string;
|
|
36
36
|
radioButtonHoverColor?: string;
|
|
37
37
|
radioButtonUncheckedBorderColor?: string;
|
|
38
|
+
filterCloseIconVariant: CloseIconVariant;
|
|
38
39
|
};
|
|
39
40
|
//#endregion
|
|
40
41
|
//#region src/components/SearchFilter/SearchFilter.d.ts
|
|
41
42
|
declare const SearchFilter: ({
|
|
42
|
-
isOpen,
|
|
43
|
-
setIsOpen,
|
|
44
43
|
filters,
|
|
44
|
+
productCount,
|
|
45
45
|
selectFilterItem,
|
|
46
46
|
clearAllFilters,
|
|
47
|
-
|
|
47
|
+
isOpen,
|
|
48
|
+
setIsOpen,
|
|
49
|
+
applyFiltersUnchangedClasses,
|
|
50
|
+
applyFiltersChangedClasses,
|
|
51
|
+
headerContent,
|
|
52
|
+
footerContent,
|
|
53
|
+
headerClassName,
|
|
48
54
|
radioButtonFillColor,
|
|
49
55
|
radioButtonHoverColor,
|
|
50
56
|
radioButtonUncheckedBorderColor,
|
|
51
|
-
|
|
52
|
-
}: SearchFilterProps) =>
|
|
57
|
+
filterCloseIconVariant
|
|
58
|
+
}: SearchFilterProps) => react_jsx_runtime23.JSX.Element;
|
|
53
59
|
//#endregion
|
|
54
60
|
//#region src/components/SearchFilter/SearchFilterHeader.d.ts
|
|
55
61
|
declare const SearchFilterHeader: ({
|
|
@@ -57,7 +63,7 @@ declare const SearchFilterHeader: ({
|
|
|
57
63
|
productCount,
|
|
58
64
|
headerClassName,
|
|
59
65
|
filterCloseIconVariant
|
|
60
|
-
}: SearchFilterHeaderProps) =>
|
|
66
|
+
}: SearchFilterHeaderProps) => react_jsx_runtime23.JSX.Element;
|
|
61
67
|
//#endregion
|
|
62
68
|
//#region src/components/SearchFilter/SearchFilterItem.d.ts
|
|
63
69
|
declare const SearchFilterItem: ({
|
|
@@ -66,6 +72,6 @@ declare const SearchFilterItem: ({
|
|
|
66
72
|
radioButtonFillColor,
|
|
67
73
|
radioButtonHoverColor,
|
|
68
74
|
radioButtonUncheckedBorderColor
|
|
69
|
-
}: SearchFilterItemProps) =>
|
|
75
|
+
}: SearchFilterItemProps) => react_jsx_runtime23.JSX.Element;
|
|
70
76
|
//#endregion
|
|
71
77
|
export { SearchFilter, SearchFilterHeader, SearchFilterItem };
|