@envive-ai/react-toolkit 0.1.4 → 0.1.6
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 +84 -0
- package/dist/Accordion/index.d.cts +13 -0
- package/dist/Accordion/index.d.ts +13 -0
- package/dist/Accordion/index.js +77 -0
- package/dist/ButtonBase/index.cjs +7 -0
- package/dist/ButtonBase/index.d.cts +43 -0
- package/dist/ButtonBase/index.d.ts +43 -0
- package/dist/ButtonBase/index.js +6 -0
- package/dist/{ButtonBase-C1rsL9gO.js → ButtonBase-BIAu5fIG.js} +5 -5
- package/dist/ButtonBase-BRfuPPzN.js +1 -0
- package/dist/ButtonBase-BleAVeo-.cjs +0 -0
- package/dist/{ButtonBase-a8uj6c2f.cjs → ButtonBase-DcyxOe2v.cjs} +11 -5
- package/dist/{AppliedFiltersScrollbar-BlcyhZkZ.cjs → DynamicFiltersScrollbar-BTopFhyl.cjs} +34 -2
- package/dist/{AppliedFiltersScrollbar-DFGzRemu.js → DynamicFiltersScrollbar-BmPTqym5.js} +29 -3
- package/dist/FilterScrollbar/index.cjs +6 -0
- package/dist/FilterScrollbar/index.d.cts +47 -0
- package/dist/FilterScrollbar/index.d.ts +47 -0
- package/dist/FilterScrollbar/index.js +5 -0
- package/dist/Headline/index.cjs +4 -0
- package/dist/{common/Headline/Headline.d.cts → Headline/index.d.cts} +3 -3
- package/dist/{common/Headline/Headline.d.ts → Headline/index.d.ts} +3 -3
- package/dist/Headline/index.js +4 -0
- package/dist/{Headline-8on6ZB9e.js → Headline-XpaAeTSR.js} +2 -2
- package/dist/{Headline-CcWn0w-a.cjs → Headline-iP_MckEO.cjs} +2 -2
- package/dist/ImageWithFallback/index.cjs +3 -0
- package/dist/{common/ImageWithFallback/ImageWithFallback.d.ts → ImageWithFallback/index.d.cts} +3 -3
- package/dist/{common/ImageWithFallback/ImageWithFallback.d.cts → ImageWithFallback/index.d.ts} +2 -2
- package/dist/ImageWithFallback/index.js +3 -0
- package/dist/{ImageWithFallback-ioeMFrTf.cjs → ImageWithFallback-1LqhQK1q.cjs} +3 -3
- package/dist/{ImageWithFallback-gN5HDS9L.js → ImageWithFallback-Ckwsmd8P.js} +2 -2
- package/dist/ProductCard/index.cjs +17 -0
- package/dist/ProductCard/index.d.cts +3 -0
- package/dist/ProductCard/index.d.ts +3 -0
- package/dist/ProductCard/index.js +8 -0
- package/dist/{ProductCard-C7WUShhN.cjs → ProductCard-DZZKutY-.cjs} +138 -12
- package/dist/{ProductCard-B5wnOeR9.js → ProductCard-SF8-lXlT.js} +92 -9
- package/dist/ProductGrid/index.cjs +10 -0
- package/dist/ProductGrid/index.d.cts +36 -0
- package/dist/ProductGrid/index.d.ts +36 -0
- package/dist/ProductGrid/index.js +9 -0
- package/dist/{ProductGrid-DZgwGPSQ.cjs → ProductGrid-BSSmPr7K.cjs} +56 -30
- package/dist/{ProductGrid-wnSc9bXT.js → ProductGrid-DTUhH219.js} +50 -30
- package/dist/SearchAutocomplete/index.cjs +3 -0
- package/dist/{search/SearchInputAutocomplete/SearchAutocomplete.d.cts → SearchAutocomplete/index.d.cts} +1 -1
- package/dist/{search/SearchInputAutocomplete/SearchAutocomplete.d.ts → SearchAutocomplete/index.d.ts} +1 -1
- package/dist/SearchAutocomplete/index.js +3 -0
- package/dist/{SearchAutocomplete-B8mO03Rr.js → SearchAutocomplete-BPjlo6qq.js} +4 -4
- package/dist/{SearchAutocomplete-BrF2SMoZ.cjs → SearchAutocomplete-BzaEXmRQ.cjs} +8 -8
- package/dist/SearchFilter/index.cjs +8 -0
- package/dist/SearchFilter/index.d.cts +2 -0
- package/dist/SearchFilter/index.d.ts +2 -0
- package/dist/SearchFilter/index.js +6 -0
- package/dist/SearchFilter-B15tybnV.cjs +134 -0
- package/dist/SearchFilter-D427M2UE.js +114 -0
- package/dist/SearchInput/index.cjs +7 -0
- package/dist/SearchInput/index.d.cts +33 -0
- package/dist/SearchInput/index.d.ts +33 -0
- package/dist/SearchInput/index.js +6 -0
- package/dist/{SearchInput-CzVUsUSb.js → SearchInput-C0wB4hSV.js} +8 -8
- package/dist/{SearchInput-mLPisqFO.cjs → SearchInput-D6UW79wT.cjs} +12 -12
- package/dist/{search/SearchInputForm/SearchInputForm.cjs → SearchInputForm/index.cjs} +9 -8
- package/dist/SearchInputForm/index.d.cts +2 -0
- package/dist/SearchInputForm/index.d.ts +2 -0
- package/dist/{search/SearchInputForm/SearchInputForm.js → SearchInputForm/index.js} +8 -7
- package/dist/{search/SearchResultsFilterSidebar/SearchResultsFilter.cjs → SearchResultsFilterSidebar/index.cjs} +15 -12
- package/dist/SearchResultsFilterSidebar/index.d.cts +3 -0
- package/dist/SearchResultsFilterSidebar/index.d.ts +3 -0
- package/dist/{search/SearchResultsFilterSidebar/SearchResultsFilter.js → SearchResultsFilterSidebar/index.js} +11 -10
- package/dist/SearchResultsStates/index.cjs +126 -0
- package/dist/SearchResultsStates/index.d.cts +73 -0
- package/dist/SearchResultsStates/index.d.ts +73 -0
- package/dist/SearchResultsStates/index.js +118 -0
- package/dist/SparkleAnimation/index.cjs +4 -0
- package/dist/SparkleAnimation/index.d.cts +23 -0
- package/dist/SparkleAnimation/index.d.ts +23 -0
- package/dist/SparkleAnimation/index.js +3 -0
- package/dist/{SparkleAnimation-Qs17S1rn.js → SparkleAnimation-BdOjC8l-.js} +5 -5
- package/dist/{SparkleAnimation-Ba5G4MIQ.cjs → SparkleAnimation-BhyeL26m.cjs} +12 -6
- package/dist/Spinner/index.cjs +3 -0
- package/dist/Spinner/index.d.cts +11 -0
- package/dist/Spinner/index.d.ts +11 -0
- package/dist/Spinner/index.js +3 -0
- package/dist/{Spinner-BZ-kTOpm.js → Spinner-BgGihEfJ.js} +1 -1
- package/dist/{Spinner-CfQ85Ajl.cjs → Spinner-DzdIkS6t.cjs} +1 -1
- package/dist/{common/SuggestionButton/SuggestionButton.cjs → SuggestionButton/index.cjs} +5 -5
- package/dist/{common/SuggestionButton/SuggestionButton.d.cts → SuggestionButton/index.d.cts} +6 -6
- package/dist/{common/SuggestionButton/SuggestionButton.d.ts → SuggestionButton/index.d.ts} +6 -6
- package/dist/{common/SuggestionButton/SuggestionButton.js → SuggestionButton/index.js} +4 -4
- package/dist/Text/index.cjs +10 -0
- package/dist/Text/index.d.cts +42 -0
- package/dist/Text/index.d.ts +42 -0
- package/dist/Text/index.js +5 -0
- package/dist/{Text-Bdv7F5-u.js → Text-BMg3d10t.js} +2 -2
- package/dist/Text-CV9pv8ds.js +10 -0
- package/dist/{Text-C04c4Z93.cjs → Text-CgOYTs8D.cjs} +2 -2
- package/dist/Text-DDT3sqY1.cjs +16 -0
- package/dist/TextInput/index.cjs +4 -0
- package/dist/TextInput/index.d.cts +12 -0
- package/dist/TextInput/index.d.ts +12 -0
- package/dist/TextInput/index.js +4 -0
- package/dist/{TextInput-BO80ixsV.cjs → TextInput-C6fF9cSB.cjs} +4 -4
- package/dist/{TextInput-CEGWfdPC.js → TextInput-CRMqBW3X.js} +3 -3
- package/dist/{colorsConfig-BKBZfFq1.js → colorsConfig-BQlaCfxi.js} +1 -1
- package/dist/{colorsConfig-vunsVTFC.cjs → colorsConfig-DCvy_dV4.cjs} +1 -1
- package/dist/index-B0oln9VD.d.ts +58 -0
- package/dist/index-B125udRj.d.cts +78 -0
- package/dist/{search/SearchInputForm/SearchInputForm.d.cts → index-BHNzU-Pc.d.ts} +10 -6
- package/dist/{search/SearchInputForm/SearchInputForm.d.ts → index-BNCrvswP.d.cts} +10 -6
- package/dist/index-CQlBDGTL.d.cts +58 -0
- package/dist/index-CcnuEYQN.d.ts +379 -0
- package/dist/index-DMXTg_9L.d.ts +78 -0
- package/dist/index-wYn2mEDm.d.cts +379 -0
- package/dist/{searchFilterSidebarVariants-eoyfoWA8.js → searchFilterSidebarVariants-BWQyiKwS.js} +2 -2
- package/dist/{searchFilterSidebarVariants-L1rn5Ift.cjs → searchFilterSidebarVariants-D08jyA7U.cjs} +2 -2
- package/dist/{textVariantClasses-Bhf4VY5z.cjs → textVariantClasses-BnV4wXaw.cjs} +1 -1
- package/dist/textVariantClasses-C8OCWZAw.d.ts +174 -0
- package/dist/textVariantClasses-Cdg-UUHi.d.cts +174 -0
- package/dist/{textVariantClasses-5t3OricK.js → textVariantClasses-CnjwO2Fv.js} +1 -1
- package/dist/types-BQYpWDJ4.d.cts +6 -0
- package/dist/types-BruEHw-X.d.ts +6 -0
- package/package.json +62 -84
- package/src/components/Accordion/Accordion.tsx +90 -0
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +70 -0
- package/src/components/ButtonBase/index.ts +2 -0
- package/src/components/{common/ButtonBase → ButtonBase}/types.ts +1 -1
- package/src/components/{search/FilterScrollbar → DynamicFiltersScrollbar}/DynamicFiltersScrollbar.tsx +1 -1
- package/src/components/{search/FilterScrollbar → FilterScrollbar}/AppliedFiltersScrollbar.tsx +1 -1
- package/src/components/FilterScrollbar/DynamicFiltersScrollbar.tsx +52 -0
- package/src/components/FilterScrollbar/index.ts +2 -0
- package/src/components/Headline/index.ts +1 -0
- package/src/components/ImageWithFallback/index.ts +1 -0
- package/src/components/{common/ProductCard → ProductCard}/ProductCard.tsx +34 -17
- package/src/components/ProductCard/index.ts +4 -0
- package/src/components/{common/ProductCard → ProductCard}/types.ts +1 -1
- package/src/components/ProductGrid/ProductGrid.tsx +73 -0
- package/src/components/ProductGrid/index.ts +2 -0
- package/src/components/{search/SearchInputAutocomplete → SearchAutocomplete}/SearchAutocomplete.tsx +1 -1
- package/src/components/SearchAutocomplete/index.ts +1 -0
- package/src/components/{search/SearchFilter → SearchFilter}/SearchFilter.tsx +2 -2
- package/src/components/{search/SearchFilter → SearchFilter}/SearchFilterHeader.tsx +1 -1
- package/src/components/{search/SearchFilter → SearchFilter}/SearchFilterItem.tsx +1 -1
- package/src/components/SearchFilter/index.ts +4 -0
- package/src/components/{search/SearchInput → SearchInput}/SearchInput.tsx +6 -6
- package/src/components/SearchInput/index.ts +2 -0
- package/src/components/{search/SearchInput → SearchInput}/searchInputVariants.ts +5 -5
- package/src/components/{search/SearchInputForm → SearchInputForm}/SearchInputForm.tsx +6 -4
- package/src/components/SearchInputForm/index.ts +2 -0
- package/src/components/SearchResultsContent/SearchResultsContent.tsx +87 -0
- package/src/components/SearchResultsContent/utils.ts +28 -0
- package/src/components/{search/SearchResultsFilterSidebar → SearchResultsFilterSidebar}/SearchResultsFilter.tsx +5 -6
- package/src/components/SearchResultsFilterSidebar/index.ts +3 -0
- package/src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +58 -0
- package/src/components/SearchResultsFilterSidebar/types.ts +15 -0
- package/src/components/{search/SearchResultsStates → SearchResultsStates}/NoSearchResultsFound.tsx +2 -2
- package/src/components/{search/SearchResultsStates → SearchResultsStates}/SearchResultsGrid.tsx +14 -12
- package/src/components/{search/SearchResultsStates → SearchResultsStates}/SearchResultsLoadingGrid.tsx +4 -5
- package/src/components/SearchResultsStates/index.ts +3 -0
- package/src/components/SparkleAnimation/index.ts +2 -0
- package/src/components/Spinner/index.ts +1 -0
- package/src/components/SuggestionButton/index.ts +2 -0
- package/src/components/Text/index.ts +3 -0
- package/src/components/TextInput/index.ts +1 -0
- package/dist/DynamicFiltersScrollbar-B2Rr1KnJ.cjs +0 -41
- package/dist/DynamicFiltersScrollbar-Dys6geP0.js +0 -32
- package/dist/ProductCardSkeleton-BPfp6IOp.js +0 -38
- package/dist/ProductCardSkeleton-BgvDlaty.cjs +0 -46
- package/dist/SearchFilter-D-2IdBKS.js +0 -62
- package/dist/SearchFilter-D0IzBlG5.cjs +0 -70
- package/dist/SearchFilterHeader-BQT0-ssS.js +0 -37
- package/dist/SearchFilterHeader-C3EklfoO.cjs +0 -45
- package/dist/SearchFilterItem-BodtWLoP.js +0 -26
- package/dist/SearchFilterItem-DmMkiqNC.cjs +0 -34
- package/dist/common/ButtonBase/ButtonBase.cjs +0 -5
- package/dist/common/ButtonBase/ButtonBase.d.cts +0 -35
- package/dist/common/ButtonBase/ButtonBase.d.ts +0 -35
- package/dist/common/ButtonBase/ButtonBase.js +0 -5
- package/dist/common/Headline/Headline.cjs +0 -4
- package/dist/common/Headline/Headline.js +0 -4
- package/dist/common/ImageWithFallback/ImageWithFallback.cjs +0 -3
- package/dist/common/ImageWithFallback/ImageWithFallback.js +0 -3
- package/dist/common/ProductCard/ProductCard.cjs +0 -11
- package/dist/common/ProductCard/ProductCard.d.cts +0 -91
- package/dist/common/ProductCard/ProductCard.d.ts +0 -91
- package/dist/common/ProductCard/ProductCard.js +0 -9
- package/dist/common/ProductCard/ProductCardSkeleton.cjs +0 -4
- package/dist/common/ProductCard/ProductCardSkeleton.d.cts +0 -12
- package/dist/common/ProductCard/ProductCardSkeleton.d.ts +0 -12
- package/dist/common/ProductCard/ProductCardSkeleton.js +0 -4
- package/dist/common/ProductGrid/ProductGrid.cjs +0 -11
- package/dist/common/ProductGrid/ProductGrid.d.cts +0 -26
- package/dist/common/ProductGrid/ProductGrid.d.ts +0 -26
- package/dist/common/ProductGrid/ProductGrid.js +0 -11
- package/dist/common/SparkleAnimation/SparkleAnimation.cjs +0 -3
- package/dist/common/SparkleAnimation/SparkleAnimation.d.cts +0 -15
- package/dist/common/SparkleAnimation/SparkleAnimation.d.ts +0 -15
- package/dist/common/SparkleAnimation/SparkleAnimation.js +0 -3
- package/dist/common/Spinner/Spinner.cjs +0 -3
- package/dist/common/Spinner/Spinner.d.cts +0 -11
- package/dist/common/Spinner/Spinner.d.ts +0 -11
- package/dist/common/Spinner/Spinner.js +0 -3
- package/dist/common/Text/Text.cjs +0 -4
- package/dist/common/Text/Text.d.cts +0 -28
- package/dist/common/Text/Text.d.ts +0 -28
- package/dist/common/Text/Text.js +0 -4
- package/dist/common/TextInput/TextInput.cjs +0 -4
- package/dist/common/TextInput/TextInput.d.cts +0 -98
- package/dist/common/TextInput/TextInput.d.ts +0 -98
- package/dist/common/TextInput/TextInput.js +0 -4
- package/dist/productCardVariants-C_QIZ-KF.js +0 -45
- package/dist/productCardVariants-Dd-wrJKP.cjs +0 -69
- package/dist/productGridVariants-BNX4YlRK.js +0 -20
- package/dist/productGridVariants-CsNV0ACt.cjs +0 -26
- package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.cjs +0 -5
- package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.d.cts +0 -22
- package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +0 -22
- package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.js +0 -5
- package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.cjs +0 -5
- package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.d.cts +0 -28
- package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +0 -28
- package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.js +0 -5
- package/dist/search/SearchFilter/SearchFilter.cjs +0 -7
- package/dist/search/SearchFilter/SearchFilter.d.cts +0 -18
- package/dist/search/SearchFilter/SearchFilter.d.ts +0 -18
- package/dist/search/SearchFilter/SearchFilter.js +0 -7
- package/dist/search/SearchFilter/SearchFilterHeader.cjs +0 -5
- package/dist/search/SearchFilter/SearchFilterHeader.d.cts +0 -12
- package/dist/search/SearchFilter/SearchFilterHeader.d.ts +0 -12
- package/dist/search/SearchFilter/SearchFilterHeader.js +0 -5
- package/dist/search/SearchFilter/SearchFilterItem.cjs +0 -5
- package/dist/search/SearchFilter/SearchFilterItem.d.cts +0 -13
- package/dist/search/SearchFilter/SearchFilterItem.d.ts +0 -13
- package/dist/search/SearchFilter/SearchFilterItem.js +0 -5
- package/dist/search/SearchInput/SearchInput.cjs +0 -6
- package/dist/search/SearchInput/SearchInput.d.cts +0 -20
- package/dist/search/SearchInput/SearchInput.d.ts +0 -20
- package/dist/search/SearchInput/SearchInput.js +0 -6
- package/dist/search/SearchInputAutocomplete/SearchAutocomplete.cjs +0 -3
- package/dist/search/SearchInputAutocomplete/SearchAutocomplete.js +0 -3
- package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.d.cts +0 -28
- package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +0 -28
- package/dist/search/SearchResultsStates/NoSearchResultsFound.cjs +0 -30
- package/dist/search/SearchResultsStates/NoSearchResultsFound.d.cts +0 -17
- package/dist/search/SearchResultsStates/NoSearchResultsFound.d.ts +0 -17
- package/dist/search/SearchResultsStates/NoSearchResultsFound.js +0 -26
- package/dist/search/SearchResultsStates/SearchResultsGrid.cjs +0 -66
- package/dist/search/SearchResultsStates/SearchResultsGrid.d.cts +0 -41
- package/dist/search/SearchResultsStates/SearchResultsGrid.d.ts +0 -41
- package/dist/search/SearchResultsStates/SearchResultsGrid.js +0 -62
- package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.cjs +0 -52
- package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.d.cts +0 -15
- package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +0 -15
- package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.js +0 -49
- package/dist/types-53zIialA.d.ts +0 -35
- package/dist/types-B4BGZSlV.d.cts +0 -4
- package/dist/types-BQNqA5xL.d.ts +0 -46
- package/dist/types-BRLWwGMI.d.ts +0 -4
- package/dist/types-CImLkcNh.d.cts +0 -46
- package/dist/types-Cph97xkm.d.ts +0 -6
- package/dist/types-CpiJO5UH.d.ts +0 -4
- package/dist/types-Dy4_w6Cf.d.cts +0 -4
- package/dist/types-TYhhwWZw.d.cts +0 -6
- package/dist/types-aa4flfRE.d.cts +0 -35
- package/src/components/common/ProductGrid/ProductGrid.tsx +0 -73
- package/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +0 -45
- package/src/components/search/SearchResultsFilterSidebar/types.ts +0 -2
- package/src/components/search/types.ts +0 -5
- package/src/types/external.ts +0 -24
- /package/dist/{types-DFetqNL2.d.ts → types-Bm-qQyO3.d.ts} +0 -0
- /package/dist/{types-DaSkJnT_.d.cts → types-C-Jrlw5Z.d.cts} +0 -0
- /package/src/components/{common/ButtonBase → ButtonBase}/ButtonBase.tsx +0 -0
- /package/src/components/{common/Headline → Headline}/Headline.tsx +0 -0
- /package/src/components/{common/ImageWithFallback → ImageWithFallback}/ImageWithFallback.tsx +0 -0
- /package/src/components/{common/ProductCard → ProductCard}/ProductCardSkeleton.tsx +0 -0
- /package/src/components/{common/ProductCard → ProductCard}/productCardVariants.ts +0 -0
- /package/src/components/{common/ProductGrid → ProductGrid}/productGridVariants.ts +0 -0
- /package/src/components/{search/SearchFilter → SearchFilter}/types.ts +0 -0
- /package/src/components/{search/SearchInputForm → SearchInputForm}/types.ts +0 -0
- /package/src/components/{common/SparkleAnimation → SparkleAnimation}/SparkleAnimation.tsx +0 -0
- /package/src/components/{common/SparkleAnimation → SparkleAnimation}/types.ts +0 -0
- /package/src/components/{common/Spinner → Spinner}/Spinner.tsx +0 -0
- /package/src/components/{common/SuggestionButton → SuggestionButton}/SuggestionButton.tsx +0 -0
- /package/src/components/{common/SuggestionButton → SuggestionButton}/types.ts +0 -0
- /package/src/components/{common/Text → Text}/Text.tsx +0 -0
- /package/src/components/{common/Text → Text}/textVariantClasses.ts +0 -0
- /package/src/components/{common/Text → Text}/types.ts +0 -0
- /package/src/components/{common/TextInput → TextInput}/TextInput.tsx +0 -0
- /package/src/{components/models → models}/colorsConfig.ts +0 -0
- /package/src/{components/test → test}/types.ts +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_ProductCard = require('./ProductCard-
|
|
3
|
-
const require_productGridVariants = require('./productGridVariants-CsNV0ACt.cjs');
|
|
2
|
+
const require_ProductCard = require('./ProductCard-DZZKutY-.cjs');
|
|
4
3
|
let classnames = require("classnames");
|
|
5
4
|
classnames = require_chunk.__toESM(classnames);
|
|
6
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -31,40 +30,61 @@ let ChatElementDisplayLocation = /* @__PURE__ */ function(ChatElementDisplayLoca
|
|
|
31
30
|
}({});
|
|
32
31
|
|
|
33
32
|
//#endregion
|
|
34
|
-
//#region src/components/
|
|
35
|
-
const
|
|
36
|
-
|
|
33
|
+
//#region src/components/ProductGrid/productGridVariants.ts
|
|
34
|
+
const productGridVariantClasses = {
|
|
35
|
+
standard: {
|
|
36
|
+
productCardVariant: "minimal",
|
|
37
|
+
productCardHoverVariant: "backgroundDark",
|
|
38
|
+
productCardLayoutVariant: "tall",
|
|
39
|
+
productCardImageAspectRatio: "3:4",
|
|
40
|
+
zoomOnHover: true
|
|
41
|
+
},
|
|
42
|
+
square: {
|
|
43
|
+
productCardVariant: "minimal",
|
|
44
|
+
productCardHoverVariant: "backgroundDark",
|
|
45
|
+
productCardLayoutVariant: "square",
|
|
46
|
+
productCardImageAspectRatio: "square",
|
|
47
|
+
zoomOnHover: true
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/components/ProductGrid/ProductGrid.tsx
|
|
53
|
+
const ProductGrid = ({ productList, productGridVariant, productGridClasses, productCardConfig, merchantShortName, searchResponseId, cardsGrowWithContainer = true }) => {
|
|
54
|
+
const { productCardVariant, productCardHoverVariant, productCardLayoutVariant, productCardImageAspectRatio, zoomOnHover } = productGridVariantClasses[productGridVariant];
|
|
37
55
|
const cardContainerClasses = (0, classnames.default)({
|
|
38
56
|
"spiffy-tw-w-full": cardsGrowWithContainer,
|
|
39
57
|
"spiffy-tw-h-full": cardsGrowWithContainer
|
|
40
58
|
});
|
|
41
59
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
42
60
|
className: productGridClasses,
|
|
43
|
-
children: productList.map((product, index) =>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
children: productList.map((product, index) => {
|
|
62
|
+
const camelCasedProduct = product;
|
|
63
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
64
|
+
className: cardContainerClasses,
|
|
65
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProductCard.ProductCard, {
|
|
66
|
+
productCardConfig,
|
|
67
|
+
merchantShortName,
|
|
68
|
+
imageUrl: camelCasedProduct.imageUrl,
|
|
69
|
+
searchResponseId,
|
|
70
|
+
productResponseId: camelCasedProduct.responseId,
|
|
71
|
+
title: camelCasedProduct.title,
|
|
72
|
+
url: camelCasedProduct.url,
|
|
73
|
+
originalPrice: camelCasedProduct.originalPrice,
|
|
74
|
+
salePrice: camelCasedProduct.salePrice,
|
|
75
|
+
averageRating: camelCasedProduct.averageRating,
|
|
76
|
+
numberReviews: camelCasedProduct.numberReviews,
|
|
77
|
+
cardDisplayLocation: ChatElementDisplayLocation.PRODUCT_GRID,
|
|
78
|
+
layoutVariant: productCardLayoutVariant,
|
|
79
|
+
variant: productCardVariant,
|
|
80
|
+
hoverVariant: productCardHoverVariant,
|
|
81
|
+
zoomOnHover,
|
|
82
|
+
aspectRatio: productCardImageAspectRatio,
|
|
83
|
+
clickPosition: index,
|
|
84
|
+
growWithContainer: cardsGrowWithContainer
|
|
85
|
+
}, camelCasedProduct.id)
|
|
86
|
+
}, camelCasedProduct.id);
|
|
87
|
+
})
|
|
68
88
|
});
|
|
69
89
|
};
|
|
70
90
|
|
|
@@ -74,4 +94,10 @@ Object.defineProperty(exports, 'ProductGrid', {
|
|
|
74
94
|
get: function () {
|
|
75
95
|
return ProductGrid;
|
|
76
96
|
}
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(exports, 'productGridVariantClasses', {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function () {
|
|
101
|
+
return productGridVariantClasses;
|
|
102
|
+
}
|
|
77
103
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ProductCard } from "./ProductCard-
|
|
2
|
-
import { productGridVariantClasses } from "./productGridVariants-BNX4YlRK.js";
|
|
1
|
+
import { ProductCard } from "./ProductCard-SF8-lXlT.js";
|
|
3
2
|
import classNames from "classnames";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
|
|
@@ -28,8 +27,27 @@ let ChatElementDisplayLocation = /* @__PURE__ */ function(ChatElementDisplayLoca
|
|
|
28
27
|
}({});
|
|
29
28
|
|
|
30
29
|
//#endregion
|
|
31
|
-
//#region src/components/
|
|
32
|
-
const
|
|
30
|
+
//#region src/components/ProductGrid/productGridVariants.ts
|
|
31
|
+
const productGridVariantClasses = {
|
|
32
|
+
standard: {
|
|
33
|
+
productCardVariant: "minimal",
|
|
34
|
+
productCardHoverVariant: "backgroundDark",
|
|
35
|
+
productCardLayoutVariant: "tall",
|
|
36
|
+
productCardImageAspectRatio: "3:4",
|
|
37
|
+
zoomOnHover: true
|
|
38
|
+
},
|
|
39
|
+
square: {
|
|
40
|
+
productCardVariant: "minimal",
|
|
41
|
+
productCardHoverVariant: "backgroundDark",
|
|
42
|
+
productCardLayoutVariant: "square",
|
|
43
|
+
productCardImageAspectRatio: "square",
|
|
44
|
+
zoomOnHover: true
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/components/ProductGrid/ProductGrid.tsx
|
|
50
|
+
const ProductGrid = ({ productList, productGridVariant, productGridClasses, productCardConfig, merchantShortName, searchResponseId, cardsGrowWithContainer = true }) => {
|
|
33
51
|
const { productCardVariant, productCardHoverVariant, productCardLayoutVariant, productCardImageAspectRatio, zoomOnHover } = productGridVariantClasses[productGridVariant];
|
|
34
52
|
const cardContainerClasses = classNames({
|
|
35
53
|
"spiffy-tw-w-full": cardsGrowWithContainer,
|
|
@@ -37,33 +55,35 @@ const ProductGrid = ({ productList, productGridVariant, productGridClasses, prod
|
|
|
37
55
|
});
|
|
38
56
|
return /* @__PURE__ */ jsx("div", {
|
|
39
57
|
className: productGridClasses,
|
|
40
|
-
children: productList.map((product, index) =>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
children: productList.map((product, index) => {
|
|
59
|
+
const camelCasedProduct = product;
|
|
60
|
+
return /* @__PURE__ */ jsx("div", {
|
|
61
|
+
className: cardContainerClasses,
|
|
62
|
+
children: /* @__PURE__ */ jsx(ProductCard, {
|
|
63
|
+
productCardConfig,
|
|
64
|
+
merchantShortName,
|
|
65
|
+
imageUrl: camelCasedProduct.imageUrl,
|
|
66
|
+
searchResponseId,
|
|
67
|
+
productResponseId: camelCasedProduct.responseId,
|
|
68
|
+
title: camelCasedProduct.title,
|
|
69
|
+
url: camelCasedProduct.url,
|
|
70
|
+
originalPrice: camelCasedProduct.originalPrice,
|
|
71
|
+
salePrice: camelCasedProduct.salePrice,
|
|
72
|
+
averageRating: camelCasedProduct.averageRating,
|
|
73
|
+
numberReviews: camelCasedProduct.numberReviews,
|
|
74
|
+
cardDisplayLocation: ChatElementDisplayLocation.PRODUCT_GRID,
|
|
75
|
+
layoutVariant: productCardLayoutVariant,
|
|
76
|
+
variant: productCardVariant,
|
|
77
|
+
hoverVariant: productCardHoverVariant,
|
|
78
|
+
zoomOnHover,
|
|
79
|
+
aspectRatio: productCardImageAspectRatio,
|
|
80
|
+
clickPosition: index,
|
|
81
|
+
growWithContainer: cardsGrowWithContainer
|
|
82
|
+
}, camelCasedProduct.id)
|
|
83
|
+
}, camelCasedProduct.id);
|
|
84
|
+
})
|
|
65
85
|
});
|
|
66
86
|
};
|
|
67
87
|
|
|
68
88
|
//#endregion
|
|
69
|
-
export { ProductGrid };
|
|
89
|
+
export { ProductGrid, productGridVariantClasses };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { motion } from "framer-motion";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import classNames from "classnames";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import
|
|
5
|
-
import OutlinedStar from "@envive-ai/react-icons/src/OutlinedStar";
|
|
5
|
+
import OutlinedStar from "@envive-ai/react-icons/OutlinedStar";
|
|
6
6
|
|
|
7
|
-
//#region src/components/
|
|
7
|
+
//#region src/components/SearchAutocomplete/SearchAutocomplete.tsx
|
|
8
8
|
const SearchAutocomplete = ({ id, results, focusedIndex, onSuggestionSelect, iconColor }) => {
|
|
9
9
|
if (results.length === 0) return null;
|
|
10
10
|
return /* @__PURE__ */ jsx(motion.div, {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
let
|
|
3
|
-
|
|
2
|
+
let framer_motion = require("framer-motion");
|
|
3
|
+
framer_motion = require_chunk.__toESM(framer_motion);
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_chunk.__toESM(react);
|
|
6
|
+
let classnames = require("classnames");
|
|
7
|
+
classnames = require_chunk.__toESM(classnames);
|
|
6
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
9
|
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
let __envive_ai_react_icons_src_OutlinedStar = require("@envive-ai/react-icons/src/OutlinedStar");
|
|
11
|
-
__envive_ai_react_icons_src_OutlinedStar = require_chunk.__toESM(__envive_ai_react_icons_src_OutlinedStar);
|
|
10
|
+
let __envive_ai_react_icons_OutlinedStar = require("@envive-ai/react-icons/OutlinedStar");
|
|
11
|
+
__envive_ai_react_icons_OutlinedStar = require_chunk.__toESM(__envive_ai_react_icons_OutlinedStar);
|
|
12
12
|
|
|
13
|
-
//#region src/components/
|
|
13
|
+
//#region src/components/SearchAutocomplete/SearchAutocomplete.tsx
|
|
14
14
|
const SearchAutocomplete = ({ id, results, focusedIndex, onSuggestionSelect, iconColor }) => {
|
|
15
15
|
if (results.length === 0) return null;
|
|
16
16
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
|
|
@@ -41,7 +41,7 @@ const SearchAutocomplete = ({ id, results, focusedIndex, onSuggestionSelect, ico
|
|
|
41
41
|
onKeyDown: (event) => {
|
|
42
42
|
if (event.key === "Enter" || event.keyCode === 13) onSuggestionSelect(result, index);
|
|
43
43
|
},
|
|
44
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
44
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_OutlinedStar.default, {
|
|
45
45
|
className: "spiffy-tw-w-[16px] spiffy-tw-h-[16px] spiffy-tw-mr-2",
|
|
46
46
|
fill: iconColor
|
|
47
47
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
require('../ButtonBase-DcyxOe2v.cjs');
|
|
2
|
+
require('../textVariantClasses-BnV4wXaw.cjs');
|
|
3
|
+
require('../Text-CgOYTs8D.cjs');
|
|
4
|
+
const require_SearchFilter = require('../SearchFilter-B15tybnV.cjs');
|
|
5
|
+
|
|
6
|
+
exports.SearchFilter = require_SearchFilter.SearchFilter;
|
|
7
|
+
exports.SearchFilterHeader = require_SearchFilter.SearchFilterHeader;
|
|
8
|
+
exports.SearchFilterItem = require_SearchFilter.SearchFilterItem;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { SearchFilter, SearchFilterHeader, SearchFilterHeaderProps, SearchFilterItem, SearchFilterItemProps, SearchFilterProps, SelectFilterItem } from "../index-B125udRj.cjs";
|
|
2
|
+
export { SearchFilter, SearchFilterHeader, SearchFilterHeaderProps, SearchFilterItem, SearchFilterItemProps, SearchFilterProps, SelectFilterItem };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { SearchFilter, SearchFilterHeader, SearchFilterHeaderProps, SearchFilterItem, SearchFilterItemProps, SearchFilterProps, SelectFilterItem } from "../index-DMXTg_9L.js";
|
|
2
|
+
export { SearchFilter, SearchFilterHeader, SearchFilterHeaderProps, SearchFilterItem, SearchFilterItemProps, SearchFilterProps, SelectFilterItem };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "../ButtonBase-BIAu5fIG.js";
|
|
2
|
+
import "../textVariantClasses-CnjwO2Fv.js";
|
|
3
|
+
import "../Text-BMg3d10t.js";
|
|
4
|
+
import { SearchFilter, SearchFilterHeader, SearchFilterItem } from "../SearchFilter-D427M2UE.js";
|
|
5
|
+
|
|
6
|
+
export { SearchFilter, SearchFilterHeader, SearchFilterItem };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
const require_ButtonBase = require('./ButtonBase-DcyxOe2v.cjs');
|
|
3
|
+
const require_Text = require('./Text-CgOYTs8D.cjs');
|
|
4
|
+
let classnames = require("classnames");
|
|
5
|
+
classnames = require_chunk.__toESM(classnames);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
8
|
+
|
|
9
|
+
//#region src/components/SearchFilter/SearchFilterItem.tsx
|
|
10
|
+
const SearchFilterItem = ({ filterItem, onSelectFilterItem, radioButtonFillColor, radioButtonHoverColor, radioButtonUncheckedBorderColor }) => {
|
|
11
|
+
const { displayName, isSelected } = filterItem;
|
|
12
|
+
const radioClasses = (0, classnames.default)("spiffy-tw-w-4 spiffy-tw-h-4 spiffy-tw-rounded-full spiffy-tw-border-2", "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-center", radioButtonUncheckedBorderColor, radioButtonHoverColor, { [radioButtonFillColor]: isSelected });
|
|
13
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
14
|
+
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-py-2 spiffy-tw-cursor-pointer",
|
|
15
|
+
onClick: () => onSelectFilterItem(filterItem),
|
|
16
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
17
|
+
variant: "body3",
|
|
18
|
+
children: displayName
|
|
19
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
20
|
+
className: radioClasses,
|
|
21
|
+
children: isSelected && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, classnames.default)("spiffy-tw-w-2 spiffy-tw-h-2 spiffy-tw-rounded-full", {
|
|
22
|
+
"spiffy-tw-bg-white": radioButtonFillColor.includes("spiffy-tw-bg-"),
|
|
23
|
+
"spiffy-tw-bg-black": radioButtonFillColor.includes("spiffy-tw-bg-white")
|
|
24
|
+
}) })
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/components/SearchFilter/SearchFilter.tsx
|
|
31
|
+
const SearchFilter = ({ isOpen, setIsOpen, filters, selectFilterItem, clearAllFilters, filterButtonText, radioButtonFillColor, radioButtonHoverColor, radioButtonUncheckedBorderColor, headerContent }) => {
|
|
32
|
+
const modalClasses = (0, classnames.default)("spiffy-tw-fixed spiffy-tw-inset-0 spiffy-tw-z-50 spiffy-tw-flex spiffy-tw-transform spiffy-tw-transition-all", {
|
|
33
|
+
"spiffy-tw-translate-x-full": !isOpen,
|
|
34
|
+
"spiffy-tw-translate-x-0": isOpen
|
|
35
|
+
});
|
|
36
|
+
const overlayClasses = (0, classnames.default)("spiffy-tw-absolute spiffy-tw-inset-0 spiffy-tw-bg-black spiffy-tw-bg-opacity-50", {
|
|
37
|
+
"spiffy-tw-opacity-0": !isOpen,
|
|
38
|
+
"spiffy-tw-opacity-100": isOpen
|
|
39
|
+
});
|
|
40
|
+
const sidebarClasses = (0, classnames.default)("spiffy-tw-relative spiffy-tw-ml-auto spiffy-tw-flex spiffy-tw-h-full spiffy-tw-w-full spiffy-tw-max-w-xs spiffy-tw-flex-col spiffy-tw-overflow-y-auto spiffy-tw-bg-[--spiffy-colors-background-light] spiffy-tw-py-4 spiffy-tw-shadow-xl");
|
|
41
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
42
|
+
className: modalClasses,
|
|
43
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
44
|
+
className: overlayClasses,
|
|
45
|
+
onClick: () => setIsOpen(false)
|
|
46
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
47
|
+
className: sidebarClasses,
|
|
48
|
+
children: [
|
|
49
|
+
headerContent,
|
|
50
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
51
|
+
className: "spiffy-tw-flex-1 spiffy-tw-px-4 spiffy-tw-py-6",
|
|
52
|
+
children: filters.map((filter) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
53
|
+
className: "spiffy-tw-mb-6",
|
|
54
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
55
|
+
variant: "body2",
|
|
56
|
+
className: "spiffy-tw-font-medium spiffy-tw-mb-3",
|
|
57
|
+
children: filter.displayName
|
|
58
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { children: filter.items.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchFilterItem, {
|
|
59
|
+
filterItem: item,
|
|
60
|
+
onSelectFilterItem: selectFilterItem,
|
|
61
|
+
radioButtonFillColor,
|
|
62
|
+
radioButtonHoverColor,
|
|
63
|
+
radioButtonUncheckedBorderColor
|
|
64
|
+
}, item.id)) })]
|
|
65
|
+
}, filter.id))
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
68
|
+
className: "spiffy-tw-border-t spiffy-tw-border-[--spiffy-colors-border-light] spiffy-tw-px-4 spiffy-tw-py-3",
|
|
69
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ButtonBase.ButtonBase, {
|
|
70
|
+
onClick: clearAllFilters,
|
|
71
|
+
text: "Clear All",
|
|
72
|
+
buttonClass: "spiffy-tw-w-full spiffy-tw-mb-2"
|
|
73
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ButtonBase.ButtonBase, {
|
|
74
|
+
onClick: () => setIsOpen(false),
|
|
75
|
+
text: filterButtonText,
|
|
76
|
+
buttonClass: "spiffy-tw-w-full"
|
|
77
|
+
})]
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
})]
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/components/SearchFilter/SearchFilterHeader.tsx
|
|
86
|
+
const SearchFilterHeader = ({ closeModal, productCount, headerClassName, filterCloseIconVariant }) => {
|
|
87
|
+
const closeIconColor = filterCloseIconVariant === "dark" ? "var(--spiffy-colors-text-primary)" : "var(--spiffy-colors-text-light)";
|
|
88
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
89
|
+
className: (0, classnames.default)("spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-px-4 spiffy-tw-py-3", headerClassName),
|
|
90
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Text.Text, {
|
|
91
|
+
variant: "body2",
|
|
92
|
+
className: "spiffy-tw-font-medium",
|
|
93
|
+
children: [
|
|
94
|
+
"Filters (",
|
|
95
|
+
productCount,
|
|
96
|
+
")"
|
|
97
|
+
]
|
|
98
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
99
|
+
onClick: closeModal,
|
|
100
|
+
className: "spiffy-tw-p-2",
|
|
101
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
102
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
103
|
+
width: "14",
|
|
104
|
+
height: "14",
|
|
105
|
+
viewBox: "0 0 14 14",
|
|
106
|
+
fill: "none",
|
|
107
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
108
|
+
d: "M13.7071 1.70711C14.0976 1.31658 14.0976 0.683417 13.7071 0.292893C13.3166 -0.0976311 12.6834 -0.0976311 12.2929 0.292893L7 5.58579L1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L5.58579 7L0.292893 12.2929C-0.0976311 12.6834 -0.0976311 13.3166 0.292893 13.7071C0.683417 14.0976 1.31658 14.0976 1.70711 13.7071L7 8.41421L12.2929 13.7071C12.6834 14.0976 13.3166 14.0976 13.7071 13.7071C14.0976 13.3166 14.0976 12.6834 13.7071 12.2929L8.41421 7L13.7071 1.70711Z",
|
|
109
|
+
fill: closeIconColor
|
|
110
|
+
})
|
|
111
|
+
})
|
|
112
|
+
})]
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
//#endregion
|
|
117
|
+
Object.defineProperty(exports, 'SearchFilter', {
|
|
118
|
+
enumerable: true,
|
|
119
|
+
get: function () {
|
|
120
|
+
return SearchFilter;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
Object.defineProperty(exports, 'SearchFilterHeader', {
|
|
124
|
+
enumerable: true,
|
|
125
|
+
get: function () {
|
|
126
|
+
return SearchFilterHeader;
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
Object.defineProperty(exports, 'SearchFilterItem', {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
get: function () {
|
|
132
|
+
return SearchFilterItem;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ButtonBase } from "./ButtonBase-BIAu5fIG.js";
|
|
2
|
+
import { Text } from "./Text-BMg3d10t.js";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/SearchFilter/SearchFilterItem.tsx
|
|
7
|
+
const SearchFilterItem = ({ filterItem, onSelectFilterItem, radioButtonFillColor, radioButtonHoverColor, radioButtonUncheckedBorderColor }) => {
|
|
8
|
+
const { displayName, isSelected } = filterItem;
|
|
9
|
+
const radioClasses = classNames("spiffy-tw-w-4 spiffy-tw-h-4 spiffy-tw-rounded-full spiffy-tw-border-2", "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-center", radioButtonUncheckedBorderColor, radioButtonHoverColor, { [radioButtonFillColor]: isSelected });
|
|
10
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
11
|
+
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-py-2 spiffy-tw-cursor-pointer",
|
|
12
|
+
onClick: () => onSelectFilterItem(filterItem),
|
|
13
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
14
|
+
variant: "body3",
|
|
15
|
+
children: displayName
|
|
16
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
17
|
+
className: radioClasses,
|
|
18
|
+
children: isSelected && /* @__PURE__ */ jsx("div", { className: classNames("spiffy-tw-w-2 spiffy-tw-h-2 spiffy-tw-rounded-full", {
|
|
19
|
+
"spiffy-tw-bg-white": radioButtonFillColor.includes("spiffy-tw-bg-"),
|
|
20
|
+
"spiffy-tw-bg-black": radioButtonFillColor.includes("spiffy-tw-bg-white")
|
|
21
|
+
}) })
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/components/SearchFilter/SearchFilter.tsx
|
|
28
|
+
const SearchFilter = ({ isOpen, setIsOpen, filters, selectFilterItem, clearAllFilters, filterButtonText, radioButtonFillColor, radioButtonHoverColor, radioButtonUncheckedBorderColor, headerContent }) => {
|
|
29
|
+
const modalClasses = classNames("spiffy-tw-fixed spiffy-tw-inset-0 spiffy-tw-z-50 spiffy-tw-flex spiffy-tw-transform spiffy-tw-transition-all", {
|
|
30
|
+
"spiffy-tw-translate-x-full": !isOpen,
|
|
31
|
+
"spiffy-tw-translate-x-0": isOpen
|
|
32
|
+
});
|
|
33
|
+
const overlayClasses = classNames("spiffy-tw-absolute spiffy-tw-inset-0 spiffy-tw-bg-black spiffy-tw-bg-opacity-50", {
|
|
34
|
+
"spiffy-tw-opacity-0": !isOpen,
|
|
35
|
+
"spiffy-tw-opacity-100": isOpen
|
|
36
|
+
});
|
|
37
|
+
const sidebarClasses = classNames("spiffy-tw-relative spiffy-tw-ml-auto spiffy-tw-flex spiffy-tw-h-full spiffy-tw-w-full spiffy-tw-max-w-xs spiffy-tw-flex-col spiffy-tw-overflow-y-auto spiffy-tw-bg-[--spiffy-colors-background-light] spiffy-tw-py-4 spiffy-tw-shadow-xl");
|
|
38
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
39
|
+
className: modalClasses,
|
|
40
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
41
|
+
className: overlayClasses,
|
|
42
|
+
onClick: () => setIsOpen(false)
|
|
43
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
44
|
+
className: sidebarClasses,
|
|
45
|
+
children: [
|
|
46
|
+
headerContent,
|
|
47
|
+
/* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: "spiffy-tw-flex-1 spiffy-tw-px-4 spiffy-tw-py-6",
|
|
49
|
+
children: filters.map((filter) => /* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: "spiffy-tw-mb-6",
|
|
51
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
52
|
+
variant: "body2",
|
|
53
|
+
className: "spiffy-tw-font-medium spiffy-tw-mb-3",
|
|
54
|
+
children: filter.displayName
|
|
55
|
+
}), /* @__PURE__ */ jsx("ul", { children: filter.items.map((item) => /* @__PURE__ */ jsx(SearchFilterItem, {
|
|
56
|
+
filterItem: item,
|
|
57
|
+
onSelectFilterItem: selectFilterItem,
|
|
58
|
+
radioButtonFillColor,
|
|
59
|
+
radioButtonHoverColor,
|
|
60
|
+
radioButtonUncheckedBorderColor
|
|
61
|
+
}, item.id)) })]
|
|
62
|
+
}, filter.id))
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ jsxs("div", {
|
|
65
|
+
className: "spiffy-tw-border-t spiffy-tw-border-[--spiffy-colors-border-light] spiffy-tw-px-4 spiffy-tw-py-3",
|
|
66
|
+
children: [/* @__PURE__ */ jsx(ButtonBase, {
|
|
67
|
+
onClick: clearAllFilters,
|
|
68
|
+
text: "Clear All",
|
|
69
|
+
buttonClass: "spiffy-tw-w-full spiffy-tw-mb-2"
|
|
70
|
+
}), /* @__PURE__ */ jsx(ButtonBase, {
|
|
71
|
+
onClick: () => setIsOpen(false),
|
|
72
|
+
text: filterButtonText,
|
|
73
|
+
buttonClass: "spiffy-tw-w-full"
|
|
74
|
+
})]
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/components/SearchFilter/SearchFilterHeader.tsx
|
|
83
|
+
const SearchFilterHeader = ({ closeModal, productCount, headerClassName, filterCloseIconVariant }) => {
|
|
84
|
+
const closeIconColor = filterCloseIconVariant === "dark" ? "var(--spiffy-colors-text-primary)" : "var(--spiffy-colors-text-light)";
|
|
85
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: classNames("spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-px-4 spiffy-tw-py-3", headerClassName),
|
|
87
|
+
children: [/* @__PURE__ */ jsxs(Text, {
|
|
88
|
+
variant: "body2",
|
|
89
|
+
className: "spiffy-tw-font-medium",
|
|
90
|
+
children: [
|
|
91
|
+
"Filters (",
|
|
92
|
+
productCount,
|
|
93
|
+
")"
|
|
94
|
+
]
|
|
95
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
96
|
+
onClick: closeModal,
|
|
97
|
+
className: "spiffy-tw-p-2",
|
|
98
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
99
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
100
|
+
width: "14",
|
|
101
|
+
height: "14",
|
|
102
|
+
viewBox: "0 0 14 14",
|
|
103
|
+
fill: "none",
|
|
104
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
105
|
+
d: "M13.7071 1.70711C14.0976 1.31658 14.0976 0.683417 13.7071 0.292893C13.3166 -0.0976311 12.6834 -0.0976311 12.2929 0.292893L7 5.58579L1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L5.58579 7L0.292893 12.2929C-0.0976311 12.6834 -0.0976311 13.3166 0.292893 13.7071C0.683417 14.0976 1.31658 14.0976 1.70711 13.7071L7 8.41421L12.2929 13.7071C12.6834 14.0976 13.3166 14.0976 13.7071 13.7071C14.0976 13.3166 14.0976 12.6834 13.7071 12.2929L8.41421 7L13.7071 1.70711Z",
|
|
106
|
+
fill: closeIconColor
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
})]
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
//#endregion
|
|
114
|
+
export { SearchFilter, SearchFilterHeader, SearchFilterItem };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
require('../textVariantClasses-BnV4wXaw.cjs');
|
|
2
|
+
require('../TextInput-C6fF9cSB.cjs');
|
|
3
|
+
require('../colorsConfig-DCvy_dV4.cjs');
|
|
4
|
+
const require_SearchInput = require('../SearchInput-D6UW79wT.cjs');
|
|
5
|
+
|
|
6
|
+
exports.SearchInput = require_SearchInput.SearchInput;
|
|
7
|
+
exports.searchInputVariantClasses = require_SearchInput.searchInputVariantClasses;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SearchInputVariant } from "../index-BNCrvswP.cjs";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { TextStyleVariantMap } from "dist/textVariantClasses-sT9E8Uty";
|
|
4
|
+
|
|
5
|
+
//#region src/components/SearchInput/SearchInput.d.ts
|
|
6
|
+
interface SearchInputProps {
|
|
7
|
+
searchInputVariant?: SearchInputVariant;
|
|
8
|
+
value: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
suggestions?: string[];
|
|
11
|
+
className?: string;
|
|
12
|
+
dataTestId?: string;
|
|
13
|
+
ariaActivedescendant?: string;
|
|
14
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
15
|
+
onChange: (newValue: string) => void;
|
|
16
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
17
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
18
|
+
}
|
|
19
|
+
declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/components/SearchInput/searchInputVariants.d.ts
|
|
22
|
+
interface SearchInputVariantClasses {
|
|
23
|
+
searchInputIconColor: string;
|
|
24
|
+
searchInputBorderColor: string;
|
|
25
|
+
searchInputCloseIconClasses: string;
|
|
26
|
+
searchInputActiveStarClasses: string;
|
|
27
|
+
autocompleteIconColor: string;
|
|
28
|
+
searchInputClasses: string;
|
|
29
|
+
placeholderVariant: keyof typeof TextStyleVariantMap;
|
|
30
|
+
}
|
|
31
|
+
declare const searchInputVariantClasses: Record<SearchInputVariant, SearchInputVariantClasses>;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { SearchInput, searchInputVariantClasses };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SearchInputVariant } from "../index-BHNzU-Pc.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { TextStyleVariantMap } from "dist/textVariantClasses-sT9E8Uty";
|
|
4
|
+
|
|
5
|
+
//#region src/components/SearchInput/SearchInput.d.ts
|
|
6
|
+
interface SearchInputProps {
|
|
7
|
+
searchInputVariant?: SearchInputVariant;
|
|
8
|
+
value: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
suggestions?: string[];
|
|
11
|
+
className?: string;
|
|
12
|
+
dataTestId?: string;
|
|
13
|
+
ariaActivedescendant?: string;
|
|
14
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
15
|
+
onChange: (newValue: string) => void;
|
|
16
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
17
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
18
|
+
}
|
|
19
|
+
declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/components/SearchInput/searchInputVariants.d.ts
|
|
22
|
+
interface SearchInputVariantClasses {
|
|
23
|
+
searchInputIconColor: string;
|
|
24
|
+
searchInputBorderColor: string;
|
|
25
|
+
searchInputCloseIconClasses: string;
|
|
26
|
+
searchInputActiveStarClasses: string;
|
|
27
|
+
autocompleteIconColor: string;
|
|
28
|
+
searchInputClasses: string;
|
|
29
|
+
placeholderVariant: keyof typeof TextStyleVariantMap;
|
|
30
|
+
}
|
|
31
|
+
declare const searchInputVariantClasses: Record<SearchInputVariant, SearchInputVariantClasses>;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { SearchInput, searchInputVariantClasses };
|