@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
package/dist/{common/ImageWithFallback/ImageWithFallback.d.ts → ImageWithFallback/index.d.cts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
1
2
|
import React from "react";
|
|
2
|
-
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
|
-
//#region src/components/
|
|
4
|
+
//#region src/components/ImageWithFallback/ImageWithFallback.d.ts
|
|
5
5
|
interface ImageWithFallbackProps {
|
|
6
6
|
src: string | undefined;
|
|
7
7
|
alt: string;
|
|
@@ -21,6 +21,6 @@ declare const ImageWithFallback: ({
|
|
|
21
21
|
imageClassnames,
|
|
22
22
|
onLoad,
|
|
23
23
|
onError
|
|
24
|
-
}: ImageWithFallbackProps) =>
|
|
24
|
+
}: ImageWithFallbackProps) => react_jsx_runtime15.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { ImageWithFallback, ImageWithFallbackProps };
|
package/dist/{common/ImageWithFallback/ImageWithFallback.d.cts → ImageWithFallback/index.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
|
-
//#region src/components/
|
|
4
|
+
//#region src/components/ImageWithFallback/ImageWithFallback.d.ts
|
|
5
5
|
interface ImageWithFallbackProps {
|
|
6
6
|
src: string | undefined;
|
|
7
7
|
alt: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
let classnames = require("classnames");
|
|
3
|
-
classnames = require_chunk.__toESM(classnames);
|
|
4
2
|
let react = require("react");
|
|
5
3
|
react = require_chunk.__toESM(react);
|
|
4
|
+
let classnames = require("classnames");
|
|
5
|
+
classnames = require_chunk.__toESM(classnames);
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
8
8
|
|
|
9
|
-
//#region src/components/
|
|
9
|
+
//#region src/components/ImageWithFallback/ImageWithFallback.tsx
|
|
10
10
|
const ImageWithFallback = ({ src, alt, dataTestId, fallbackClassnames, fallback, imageClassnames, onLoad, onError }) => {
|
|
11
11
|
const [isLoaded, setIsLoaded] = (0, react.useState)(false);
|
|
12
12
|
const [isError, setIsError] = (0, react.useState)(false);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import classNames from "classnames";
|
|
2
1
|
import React, { useState } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
|
-
//#region src/components/
|
|
5
|
+
//#region src/components/ImageWithFallback/ImageWithFallback.tsx
|
|
6
6
|
const ImageWithFallback = ({ src, alt, dataTestId, fallbackClassnames, fallback, imageClassnames, onLoad, onError }) => {
|
|
7
7
|
const [isLoaded, setIsLoaded] = useState(false);
|
|
8
8
|
const [isError, setIsError] = useState(false);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('../textVariantClasses-BnV4wXaw.cjs');
|
|
2
|
+
require('../Text-CgOYTs8D.cjs');
|
|
3
|
+
require('../Headline-iP_MckEO.cjs');
|
|
4
|
+
require('../ImageWithFallback-1LqhQK1q.cjs');
|
|
5
|
+
const require_ProductCard = require('../ProductCard-DZZKutY-.cjs');
|
|
6
|
+
require('../Spinner-DzdIkS6t.cjs');
|
|
7
|
+
|
|
8
|
+
exports.AnimatedProductCardOverrides = require_ProductCard.AnimatedProductCardOverrides;
|
|
9
|
+
exports.PriceSection = require_ProductCard.PriceSection;
|
|
10
|
+
exports.ProductCard = require_ProductCard.ProductCard;
|
|
11
|
+
exports.ProductCardSkeleton = require_ProductCard.ProductCardSkeleton;
|
|
12
|
+
exports.ProductCardSkeletonOverrides = require_ProductCard.ProductCardSkeletonOverrides;
|
|
13
|
+
exports.RatingSummary = require_ProductCard.RatingSummary;
|
|
14
|
+
exports.productCardLayoutVariantClasses = require_ProductCard.productCardLayoutVariantClasses;
|
|
15
|
+
exports.variantClassMap = require_ProductCard.variantClassMap;
|
|
16
|
+
exports.variantHoverClassMap = require_ProductCard.variantHoverClassMap;
|
|
17
|
+
exports.variantTitleColorMap = require_ProductCard.variantTitleColorMap;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import "../types-BQYpWDJ4.cjs";
|
|
2
|
+
import { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, RatingSummary, SearchResponseProductAttributes, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap } from "../index-wYn2mEDm.cjs";
|
|
3
|
+
export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, RatingSummary, SearchResponseProductAttributes, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import "../types-BruEHw-X.js";
|
|
2
|
+
import { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, RatingSummary, SearchResponseProductAttributes, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap } from "../index-CcnuEYQN.js";
|
|
3
|
+
export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, RatingSummary, SearchResponseProductAttributes, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "../textVariantClasses-CnjwO2Fv.js";
|
|
2
|
+
import "../Text-BMg3d10t.js";
|
|
3
|
+
import "../Headline-XpaAeTSR.js";
|
|
4
|
+
import "../ImageWithFallback-Ckwsmd8P.js";
|
|
5
|
+
import { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardSkeleton, ProductCardSkeletonOverrides, RatingSummary, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap } from "../ProductCard-SF8-lXlT.js";
|
|
6
|
+
import "../Spinner-BgGihEfJ.js";
|
|
7
|
+
|
|
8
|
+
export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardSkeleton, ProductCardSkeletonOverrides, RatingSummary, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap };
|
|
@@ -1,16 +1,61 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_Text = require('./Text-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const require_Spinner = require('./Spinner-CfQ85Ajl.cjs');
|
|
2
|
+
const require_Text = require('./Text-CgOYTs8D.cjs');
|
|
3
|
+
const require_Headline = require('./Headline-iP_MckEO.cjs');
|
|
4
|
+
const require_ImageWithFallback = require('./ImageWithFallback-1LqhQK1q.cjs');
|
|
5
|
+
const require_Spinner = require('./Spinner-DzdIkS6t.cjs');
|
|
7
6
|
let classnames = require("classnames");
|
|
8
7
|
classnames = require_chunk.__toESM(classnames);
|
|
9
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
9
|
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
11
10
|
let react_icons_md = require("react-icons/md");
|
|
12
11
|
react_icons_md = require_chunk.__toESM(react_icons_md);
|
|
12
|
+
let __envive_ai_react_hooks_hooks = require("@envive-ai/react-hooks/hooks");
|
|
13
|
+
__envive_ai_react_hooks_hooks = require_chunk.__toESM(__envive_ai_react_hooks_hooks);
|
|
13
14
|
|
|
15
|
+
//#region src/components/ProductCard/productCardVariants.ts
|
|
16
|
+
/**
|
|
17
|
+
* Shared variant mapping configurations for ProductCard components
|
|
18
|
+
*/
|
|
19
|
+
const variantClassMap = new Map([
|
|
20
|
+
["filled", ["spiffy-tw-bg-[--spiffy-colors-background-secondary]", "spiffy-tw-shadow-md"]],
|
|
21
|
+
["bordered", [
|
|
22
|
+
"spiffy-tw-bg-[--spiffy-colors-background-secondary]",
|
|
23
|
+
"spiffy-tw-border",
|
|
24
|
+
"spiffy-tw-border-[--spiffy-colors-border-light]"
|
|
25
|
+
]],
|
|
26
|
+
["minimal", ["spiffy-tw-bg-transparent"]],
|
|
27
|
+
["transparentBordered", [
|
|
28
|
+
"spiffy-tw-bg-transparent",
|
|
29
|
+
"spiffy-tw-border",
|
|
30
|
+
"spiffy-tw-border-[--spiffy-colors-border-light]"
|
|
31
|
+
]]
|
|
32
|
+
]);
|
|
33
|
+
const variantHoverClassMap = new Map([["backgroundDark", ["hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]"]], ["none", []]]);
|
|
34
|
+
const variantTitleColorMap = new Map([
|
|
35
|
+
["filled", "spiffy-tw-text-[--spiffy-colors-text-link]"],
|
|
36
|
+
["bordered", "spiffy-tw-text-[--spiffy-colors-text-primary]"],
|
|
37
|
+
["minimal", "spiffy-tw-text-[--spiffy-colors-text-primary]"],
|
|
38
|
+
["transparentBordered", "spiffy-tw-text-[--spiffy-colors-text-primary]"]
|
|
39
|
+
]);
|
|
40
|
+
const productCardLayoutVariantClasses = {
|
|
41
|
+
normal: {
|
|
42
|
+
productTitle: ["spiffy-product-card-title"],
|
|
43
|
+
container: ["spiffy-tw-w-[208px]"],
|
|
44
|
+
verticalContainer: ["spiffy-tw-rounded-[8px]", "spiffy-tw-h-[268px]"]
|
|
45
|
+
},
|
|
46
|
+
tall: {
|
|
47
|
+
productTitle: ["spiffy-product-card-title-tall", "spiffy-tw-pt-[8px]"],
|
|
48
|
+
container: ["spiffy-tw-w-[160px] lg:spiffy-tw-w-[300px]"],
|
|
49
|
+
verticalContainer: ["lg:spiffy-tw-h-[496px]"]
|
|
50
|
+
},
|
|
51
|
+
square: {
|
|
52
|
+
productTitle: ["spiffy-product-card-title-tall", "spiffy-tw-pt-[8px]"],
|
|
53
|
+
container: ["spiffy-tw-w-[160px] lg:spiffy-tw-w-[280px]"],
|
|
54
|
+
verticalContainer: ["lg:spiffy-tw-h-[400px]"]
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
14
59
|
//#region src/logging/logger.ts
|
|
15
60
|
var Logger = class {
|
|
16
61
|
static logInfo(message, ...args) {
|
|
@@ -41,7 +86,7 @@ const formatPrice = (price, currency = "$") => {
|
|
|
41
86
|
};
|
|
42
87
|
|
|
43
88
|
//#endregion
|
|
44
|
-
//#region src/components/
|
|
89
|
+
//#region src/components/ProductCard/ProductCard.tsx
|
|
45
90
|
const formatReviews = (stars) => String(Number(stars).toLocaleString("en-US", {
|
|
46
91
|
minimumFractionDigits: 1,
|
|
47
92
|
maximumFractionDigits: 1
|
|
@@ -88,6 +133,7 @@ const PriceSection = ({ originalPrice, salePrice, pricePrefix }) => {
|
|
|
88
133
|
});
|
|
89
134
|
};
|
|
90
135
|
const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, url, originalPrice, averageRating, numberReviews, salePrice, variant, hoverVariant, dataTestId, layoutVariant = "normal", zoomOnHover = false, aspectRatio = "none", growWithContainer = false, handleClick }) => {
|
|
136
|
+
const { resolve } = (0, __envive_ai_react_hooks_hooks.useImageResolver)();
|
|
91
137
|
const finalVariant = variant ?? productCardConfig?.variant ?? "filled";
|
|
92
138
|
const finalHoverVariant = hoverVariant ?? productCardConfig?.hoverVariant ?? "backgroundDark";
|
|
93
139
|
const finalLayoutVariant = layoutVariant ?? productCardConfig?.layoutVariant ?? "normal";
|
|
@@ -96,13 +142,13 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
96
142
|
logger_default.logError("[ProductCard] productCardConfig is null", void 0, { merchant: merchantShortName });
|
|
97
143
|
return null;
|
|
98
144
|
}
|
|
99
|
-
const layoutClasses =
|
|
145
|
+
const layoutClasses = productCardLayoutVariantClasses[finalLayoutVariant];
|
|
100
146
|
const containerClassnames = (0, classnames.default)("spiffy-tw-cursor-pointer", "spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-inherit", "spiffy-tw-overflow-hidden", {
|
|
101
147
|
"spiffy-tw-h-full": growWithContainer,
|
|
102
148
|
"spiffy-tw-w-full": growWithContainer,
|
|
103
149
|
"spiffy-tw-max-w-full": growWithContainer
|
|
104
|
-
}, !growWithContainer && layoutClasses.container,
|
|
105
|
-
const verticalContainerVariantClasses =
|
|
150
|
+
}, !growWithContainer && layoutClasses.container, variantClassMap.get(finalVariant) ?? [], variantHoverClassMap.get(finalHoverVariant) ?? []);
|
|
151
|
+
const verticalContainerVariantClasses = productCardLayoutVariantClasses[layoutVariant].verticalContainer;
|
|
106
152
|
const verticalContainerClassnames = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-overflow-hidden", "spiffy-tw-gap-inherit", {
|
|
107
153
|
"spiffy-tw-h-full": growWithContainer,
|
|
108
154
|
"spiffy-tw-w-full": growWithContainer,
|
|
@@ -125,7 +171,7 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
125
171
|
"hover:spiffy-tw-scale-105"
|
|
126
172
|
] : []);
|
|
127
173
|
const contentClassnames = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-p-2", "spiffy-tw-pr-2", "spiffy-tw-items-start", "spiffy-tw-justify-end", { "spiffy-tw-flex-grow-0": layoutVariant === "tall" || layoutVariant === "square" });
|
|
128
|
-
const productTitleClassnames = (0, classnames.default)("spiffy-tw-line-clamp-2", "spiffy-tw-overflow-clip", "spiffy-tw-tracking-[0.8px]", "spiffy-tw-whitespace-normal", "spiffy-tw-normal-case",
|
|
174
|
+
const productTitleClassnames = (0, classnames.default)("spiffy-tw-line-clamp-2", "spiffy-tw-overflow-clip", "spiffy-tw-tracking-[0.8px]", "spiffy-tw-whitespace-normal", "spiffy-tw-normal-case", variantTitleColorMap.get(finalVariant) ?? "spiffy-tw-text-[--spiffy-colors-text-primary]", ...layoutClasses.productTitle);
|
|
129
175
|
const priceAndRatingContainerClassnames = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-row", "spiffy-tw-justify-between", "spiffy-tw-items-center", "spiffy-tw-w-full", "spiffy-tw-pt-2", "spiffy-tw-gap-2");
|
|
130
176
|
const imageClassnames = (0, classnames.default)("spiffy-tw-bg-transparent", "spiffy-tw-w-full", "spiffy-tw-h-full", "spiffy-tw-object-cover", "spiffy-tw-object-top", "spiffy-tw-select-none", "spiffy-tw-pointer-events-none");
|
|
131
177
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -133,7 +179,7 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
133
179
|
"data-testid": dataTestId,
|
|
134
180
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
135
181
|
href: url,
|
|
136
|
-
onClick: () => handleClick(url
|
|
182
|
+
onClick: () => handleClick(url),
|
|
137
183
|
target: "_self",
|
|
138
184
|
draggable: false,
|
|
139
185
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -143,7 +189,7 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
143
189
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
144
190
|
className: imageContainerClassnames,
|
|
145
191
|
children: imageUrl && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ImageWithFallback.ImageWithFallback, {
|
|
146
|
-
src: imageUrl,
|
|
192
|
+
src: resolve(imageUrl, layoutVariant === "tall" ? 300 : 178),
|
|
147
193
|
alt: title,
|
|
148
194
|
fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Spinner.Spinner, { className: "spiffy-tw-w-6 spiffy-tw-h-6" }),
|
|
149
195
|
imageClassnames
|
|
@@ -173,6 +219,50 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
173
219
|
};
|
|
174
220
|
|
|
175
221
|
//#endregion
|
|
222
|
+
//#region src/components/ProductCard/types.ts
|
|
223
|
+
let ProductCardSkeletonOverrides = /* @__PURE__ */ function(ProductCardSkeletonOverrides$1) {
|
|
224
|
+
ProductCardSkeletonOverrides$1["PRODUCT_CARD_SKELETON_CONTAINER"] = "spiffy-product-card-skeleton-container";
|
|
225
|
+
ProductCardSkeletonOverrides$1["PRODUCT_CARD_SKELETON"] = "spiffy-product-card-skeleton";
|
|
226
|
+
return ProductCardSkeletonOverrides$1;
|
|
227
|
+
}({});
|
|
228
|
+
let AnimatedProductCardOverrides = /* @__PURE__ */ function(AnimatedProductCardOverrides$1) {
|
|
229
|
+
AnimatedProductCardOverrides$1["PRODUCT_CARD_ANIMATED_CONTAINER"] = "spiffy-product-card-animated-container";
|
|
230
|
+
AnimatedProductCardOverrides$1["PRODUCT_CARD_ANIMATED_IMAGE_CONTAINER"] = "spiffy-product-card-animated";
|
|
231
|
+
return AnimatedProductCardOverrides$1;
|
|
232
|
+
}({});
|
|
233
|
+
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region src/components/ProductCard/ProductCardSkeleton.tsx
|
|
236
|
+
const ProductCardSkeleton = ({ layoutVariant, aspectRatio, growWithContainer = false }) => {
|
|
237
|
+
const layoutClasses = productCardLayoutVariantClasses[layoutVariant || "normal"];
|
|
238
|
+
const containerClasses = (0, classnames.default)(ProductCardSkeletonOverrides.PRODUCT_CARD_SKELETON_CONTAINER, "spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-inherit", "spiffy-tw-bg-transparent", !growWithContainer ? layoutClasses.container : "");
|
|
239
|
+
const verticalContainerClasses = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-overflow-hidden", "spiffy-tw-gap-inherit", !growWithContainer ? layoutClasses.verticalContainer : "");
|
|
240
|
+
const imageClipContainerClasses = (0, classnames.default)("spiffy-tw-w-full", aspectRatio === "3:4" ? "spiffy-tw-aspect-[3/4]" : "", aspectRatio === "square" ? "spiffy-tw-aspect-square" : "", "spiffy-tw-overflow-hidden");
|
|
241
|
+
const imageSkeletonClasses = (0, classnames.default)("spiffy-tw-bg-[#F4F4F6]", "spiffy-tw-animate-pulse", "spiffy-tw-opacity-70", "spiffy-tw-w-full", "spiffy-tw-h-full");
|
|
242
|
+
const contentContainerClasses = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-2", "spiffy-tw-w-full", "spiffy-tw-p-2");
|
|
243
|
+
const textSkeletonClasses = (0, classnames.default)(ProductCardSkeletonOverrides.PRODUCT_CARD_SKELETON, "spiffy-tw-h-[15px]", "spiffy-tw-block", "spiffy-tw-rounded-sm", "spiffy-tw-animate-pulse", "spiffy-tw-opacity-70", "spiffy-tw-bg-[#F4F4F6]");
|
|
244
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
245
|
+
className: containerClasses,
|
|
246
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
247
|
+
className: verticalContainerClasses,
|
|
248
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
249
|
+
className: imageClipContainerClasses,
|
|
250
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: imageSkeletonClasses })
|
|
251
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
252
|
+
className: contentContainerClasses,
|
|
253
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, classnames.default)(textSkeletonClasses, "spiffy-tw-w-full") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, classnames.default)(textSkeletonClasses, "spiffy-tw-w-[60%]") })]
|
|
254
|
+
})]
|
|
255
|
+
})
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
//#endregion
|
|
260
|
+
Object.defineProperty(exports, 'AnimatedProductCardOverrides', {
|
|
261
|
+
enumerable: true,
|
|
262
|
+
get: function () {
|
|
263
|
+
return AnimatedProductCardOverrides;
|
|
264
|
+
}
|
|
265
|
+
});
|
|
176
266
|
Object.defineProperty(exports, 'PriceSection', {
|
|
177
267
|
enumerable: true,
|
|
178
268
|
get: function () {
|
|
@@ -185,9 +275,45 @@ Object.defineProperty(exports, 'ProductCard', {
|
|
|
185
275
|
return ProductCard;
|
|
186
276
|
}
|
|
187
277
|
});
|
|
278
|
+
Object.defineProperty(exports, 'ProductCardSkeleton', {
|
|
279
|
+
enumerable: true,
|
|
280
|
+
get: function () {
|
|
281
|
+
return ProductCardSkeleton;
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
Object.defineProperty(exports, 'ProductCardSkeletonOverrides', {
|
|
285
|
+
enumerable: true,
|
|
286
|
+
get: function () {
|
|
287
|
+
return ProductCardSkeletonOverrides;
|
|
288
|
+
}
|
|
289
|
+
});
|
|
188
290
|
Object.defineProperty(exports, 'RatingSummary', {
|
|
189
291
|
enumerable: true,
|
|
190
292
|
get: function () {
|
|
191
293
|
return RatingSummary;
|
|
192
294
|
}
|
|
295
|
+
});
|
|
296
|
+
Object.defineProperty(exports, 'productCardLayoutVariantClasses', {
|
|
297
|
+
enumerable: true,
|
|
298
|
+
get: function () {
|
|
299
|
+
return productCardLayoutVariantClasses;
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
Object.defineProperty(exports, 'variantClassMap', {
|
|
303
|
+
enumerable: true,
|
|
304
|
+
get: function () {
|
|
305
|
+
return variantClassMap;
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
Object.defineProperty(exports, 'variantHoverClassMap', {
|
|
309
|
+
enumerable: true,
|
|
310
|
+
get: function () {
|
|
311
|
+
return variantHoverClassMap;
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
Object.defineProperty(exports, 'variantTitleColorMap', {
|
|
315
|
+
enumerable: true,
|
|
316
|
+
get: function () {
|
|
317
|
+
return variantTitleColorMap;
|
|
318
|
+
}
|
|
193
319
|
});
|
|
@@ -1,12 +1,56 @@
|
|
|
1
|
-
import { Text } from "./Text-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Spinner } from "./Spinner-BZ-kTOpm.js";
|
|
1
|
+
import { Text } from "./Text-BMg3d10t.js";
|
|
2
|
+
import { Headline } from "./Headline-XpaAeTSR.js";
|
|
3
|
+
import { ImageWithFallback } from "./ImageWithFallback-Ckwsmd8P.js";
|
|
4
|
+
import { Spinner } from "./Spinner-BgGihEfJ.js";
|
|
6
5
|
import classNames from "classnames";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { MdStar } from "react-icons/md";
|
|
8
|
+
import { useImageResolver } from "@envive-ai/react-hooks/hooks";
|
|
9
9
|
|
|
10
|
+
//#region src/components/ProductCard/productCardVariants.ts
|
|
11
|
+
/**
|
|
12
|
+
* Shared variant mapping configurations for ProductCard components
|
|
13
|
+
*/
|
|
14
|
+
const variantClassMap = new Map([
|
|
15
|
+
["filled", ["spiffy-tw-bg-[--spiffy-colors-background-secondary]", "spiffy-tw-shadow-md"]],
|
|
16
|
+
["bordered", [
|
|
17
|
+
"spiffy-tw-bg-[--spiffy-colors-background-secondary]",
|
|
18
|
+
"spiffy-tw-border",
|
|
19
|
+
"spiffy-tw-border-[--spiffy-colors-border-light]"
|
|
20
|
+
]],
|
|
21
|
+
["minimal", ["spiffy-tw-bg-transparent"]],
|
|
22
|
+
["transparentBordered", [
|
|
23
|
+
"spiffy-tw-bg-transparent",
|
|
24
|
+
"spiffy-tw-border",
|
|
25
|
+
"spiffy-tw-border-[--spiffy-colors-border-light]"
|
|
26
|
+
]]
|
|
27
|
+
]);
|
|
28
|
+
const variantHoverClassMap = new Map([["backgroundDark", ["hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]"]], ["none", []]]);
|
|
29
|
+
const variantTitleColorMap = new Map([
|
|
30
|
+
["filled", "spiffy-tw-text-[--spiffy-colors-text-link]"],
|
|
31
|
+
["bordered", "spiffy-tw-text-[--spiffy-colors-text-primary]"],
|
|
32
|
+
["minimal", "spiffy-tw-text-[--spiffy-colors-text-primary]"],
|
|
33
|
+
["transparentBordered", "spiffy-tw-text-[--spiffy-colors-text-primary]"]
|
|
34
|
+
]);
|
|
35
|
+
const productCardLayoutVariantClasses = {
|
|
36
|
+
normal: {
|
|
37
|
+
productTitle: ["spiffy-product-card-title"],
|
|
38
|
+
container: ["spiffy-tw-w-[208px]"],
|
|
39
|
+
verticalContainer: ["spiffy-tw-rounded-[8px]", "spiffy-tw-h-[268px]"]
|
|
40
|
+
},
|
|
41
|
+
tall: {
|
|
42
|
+
productTitle: ["spiffy-product-card-title-tall", "spiffy-tw-pt-[8px]"],
|
|
43
|
+
container: ["spiffy-tw-w-[160px] lg:spiffy-tw-w-[300px]"],
|
|
44
|
+
verticalContainer: ["lg:spiffy-tw-h-[496px]"]
|
|
45
|
+
},
|
|
46
|
+
square: {
|
|
47
|
+
productTitle: ["spiffy-product-card-title-tall", "spiffy-tw-pt-[8px]"],
|
|
48
|
+
container: ["spiffy-tw-w-[160px] lg:spiffy-tw-w-[280px]"],
|
|
49
|
+
verticalContainer: ["lg:spiffy-tw-h-[400px]"]
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
10
54
|
//#region src/logging/logger.ts
|
|
11
55
|
var Logger = class {
|
|
12
56
|
static logInfo(message, ...args) {
|
|
@@ -37,7 +81,7 @@ const formatPrice = (price, currency = "$") => {
|
|
|
37
81
|
};
|
|
38
82
|
|
|
39
83
|
//#endregion
|
|
40
|
-
//#region src/components/
|
|
84
|
+
//#region src/components/ProductCard/ProductCard.tsx
|
|
41
85
|
const formatReviews = (stars) => String(Number(stars).toLocaleString("en-US", {
|
|
42
86
|
minimumFractionDigits: 1,
|
|
43
87
|
maximumFractionDigits: 1
|
|
@@ -84,6 +128,7 @@ const PriceSection = ({ originalPrice, salePrice, pricePrefix }) => {
|
|
|
84
128
|
});
|
|
85
129
|
};
|
|
86
130
|
const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, url, originalPrice, averageRating, numberReviews, salePrice, variant, hoverVariant, dataTestId, layoutVariant = "normal", zoomOnHover = false, aspectRatio = "none", growWithContainer = false, handleClick }) => {
|
|
131
|
+
const { resolve } = useImageResolver();
|
|
87
132
|
const finalVariant = variant ?? productCardConfig?.variant ?? "filled";
|
|
88
133
|
const finalHoverVariant = hoverVariant ?? productCardConfig?.hoverVariant ?? "backgroundDark";
|
|
89
134
|
const finalLayoutVariant = layoutVariant ?? productCardConfig?.layoutVariant ?? "normal";
|
|
@@ -129,7 +174,7 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
129
174
|
"data-testid": dataTestId,
|
|
130
175
|
children: /* @__PURE__ */ jsx("a", {
|
|
131
176
|
href: url,
|
|
132
|
-
onClick: () => handleClick(url
|
|
177
|
+
onClick: () => handleClick(url),
|
|
133
178
|
target: "_self",
|
|
134
179
|
draggable: false,
|
|
135
180
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -139,7 +184,7 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
139
184
|
children: /* @__PURE__ */ jsx("div", {
|
|
140
185
|
className: imageContainerClassnames,
|
|
141
186
|
children: imageUrl && /* @__PURE__ */ jsx(ImageWithFallback, {
|
|
142
|
-
src: imageUrl,
|
|
187
|
+
src: resolve(imageUrl, layoutVariant === "tall" ? 300 : 178),
|
|
143
188
|
alt: title,
|
|
144
189
|
fallback: /* @__PURE__ */ jsx(Spinner, { className: "spiffy-tw-w-6 spiffy-tw-h-6" }),
|
|
145
190
|
imageClassnames
|
|
@@ -169,4 +214,42 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
169
214
|
};
|
|
170
215
|
|
|
171
216
|
//#endregion
|
|
172
|
-
|
|
217
|
+
//#region src/components/ProductCard/types.ts
|
|
218
|
+
let ProductCardSkeletonOverrides = /* @__PURE__ */ function(ProductCardSkeletonOverrides$1) {
|
|
219
|
+
ProductCardSkeletonOverrides$1["PRODUCT_CARD_SKELETON_CONTAINER"] = "spiffy-product-card-skeleton-container";
|
|
220
|
+
ProductCardSkeletonOverrides$1["PRODUCT_CARD_SKELETON"] = "spiffy-product-card-skeleton";
|
|
221
|
+
return ProductCardSkeletonOverrides$1;
|
|
222
|
+
}({});
|
|
223
|
+
let AnimatedProductCardOverrides = /* @__PURE__ */ function(AnimatedProductCardOverrides$1) {
|
|
224
|
+
AnimatedProductCardOverrides$1["PRODUCT_CARD_ANIMATED_CONTAINER"] = "spiffy-product-card-animated-container";
|
|
225
|
+
AnimatedProductCardOverrides$1["PRODUCT_CARD_ANIMATED_IMAGE_CONTAINER"] = "spiffy-product-card-animated";
|
|
226
|
+
return AnimatedProductCardOverrides$1;
|
|
227
|
+
}({});
|
|
228
|
+
|
|
229
|
+
//#endregion
|
|
230
|
+
//#region src/components/ProductCard/ProductCardSkeleton.tsx
|
|
231
|
+
const ProductCardSkeleton = ({ layoutVariant, aspectRatio, growWithContainer = false }) => {
|
|
232
|
+
const layoutClasses = productCardLayoutVariantClasses[layoutVariant || "normal"];
|
|
233
|
+
const containerClasses = classNames(ProductCardSkeletonOverrides.PRODUCT_CARD_SKELETON_CONTAINER, "spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-inherit", "spiffy-tw-bg-transparent", !growWithContainer ? layoutClasses.container : "");
|
|
234
|
+
const verticalContainerClasses = classNames("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-overflow-hidden", "spiffy-tw-gap-inherit", !growWithContainer ? layoutClasses.verticalContainer : "");
|
|
235
|
+
const imageClipContainerClasses = classNames("spiffy-tw-w-full", aspectRatio === "3:4" ? "spiffy-tw-aspect-[3/4]" : "", aspectRatio === "square" ? "spiffy-tw-aspect-square" : "", "spiffy-tw-overflow-hidden");
|
|
236
|
+
const imageSkeletonClasses = classNames("spiffy-tw-bg-[#F4F4F6]", "spiffy-tw-animate-pulse", "spiffy-tw-opacity-70", "spiffy-tw-w-full", "spiffy-tw-h-full");
|
|
237
|
+
const contentContainerClasses = classNames("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-2", "spiffy-tw-w-full", "spiffy-tw-p-2");
|
|
238
|
+
const textSkeletonClasses = classNames(ProductCardSkeletonOverrides.PRODUCT_CARD_SKELETON, "spiffy-tw-h-[15px]", "spiffy-tw-block", "spiffy-tw-rounded-sm", "spiffy-tw-animate-pulse", "spiffy-tw-opacity-70", "spiffy-tw-bg-[#F4F4F6]");
|
|
239
|
+
return /* @__PURE__ */ jsx("div", {
|
|
240
|
+
className: containerClasses,
|
|
241
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
242
|
+
className: verticalContainerClasses,
|
|
243
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
244
|
+
className: imageClipContainerClasses,
|
|
245
|
+
children: /* @__PURE__ */ jsx("div", { className: imageSkeletonClasses })
|
|
246
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
247
|
+
className: contentContainerClasses,
|
|
248
|
+
children: [/* @__PURE__ */ jsx("div", { className: classNames(textSkeletonClasses, "spiffy-tw-w-full") }), /* @__PURE__ */ jsx("div", { className: classNames(textSkeletonClasses, "spiffy-tw-w-[60%]") })]
|
|
249
|
+
})]
|
|
250
|
+
})
|
|
251
|
+
});
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
//#endregion
|
|
255
|
+
export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardSkeleton, ProductCardSkeletonOverrides, RatingSummary, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
require('../textVariantClasses-BnV4wXaw.cjs');
|
|
2
|
+
require('../Text-CgOYTs8D.cjs');
|
|
3
|
+
require('../Headline-iP_MckEO.cjs');
|
|
4
|
+
require('../ImageWithFallback-1LqhQK1q.cjs');
|
|
5
|
+
require('../ProductCard-DZZKutY-.cjs');
|
|
6
|
+
require('../Spinner-DzdIkS6t.cjs');
|
|
7
|
+
const require_ProductGrid = require('../ProductGrid-BSSmPr7K.cjs');
|
|
8
|
+
|
|
9
|
+
exports.ProductGrid = require_ProductGrid.ProductGrid;
|
|
10
|
+
exports.productGridVariantClasses = require_ProductGrid.productGridVariantClasses;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "../types-BQYpWDJ4.cjs";
|
|
2
|
+
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant, ProductGridVariant } from "../index-wYn2mEDm.cjs";
|
|
3
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
4
|
+
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ProductGrid/ProductGrid.d.ts
|
|
7
|
+
interface ProductGridProps {
|
|
8
|
+
productList: SearchResponseProduct[];
|
|
9
|
+
productGridVariant: ProductGridVariant;
|
|
10
|
+
productGridClasses: string;
|
|
11
|
+
productCardConfig?: ProductCardConfig;
|
|
12
|
+
merchantShortName: string;
|
|
13
|
+
searchResponseId: string;
|
|
14
|
+
cardsGrowWithContainer?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const ProductGrid: ({
|
|
17
|
+
productList,
|
|
18
|
+
productGridVariant,
|
|
19
|
+
productGridClasses,
|
|
20
|
+
productCardConfig,
|
|
21
|
+
merchantShortName,
|
|
22
|
+
searchResponseId,
|
|
23
|
+
cardsGrowWithContainer
|
|
24
|
+
}: ProductGridProps) => react_jsx_runtime20.JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/ProductGrid/productGridVariants.d.ts
|
|
27
|
+
interface ProductGridVariantClasses {
|
|
28
|
+
productCardVariant: ProductCardVariant;
|
|
29
|
+
productCardHoverVariant: ProductCardHoverVariant;
|
|
30
|
+
productCardLayoutVariant: ProductCardLayoutVariant;
|
|
31
|
+
productCardImageAspectRatio: '3:4' | 'square' | 'none';
|
|
32
|
+
zoomOnHover: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare const productGridVariantClasses: Record<ProductGridVariant, ProductGridVariantClasses>;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { ProductGrid, productGridVariantClasses };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "../types-BruEHw-X.js";
|
|
2
|
+
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant, ProductGridVariant } from "../index-CcnuEYQN.js";
|
|
3
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
4
|
+
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ProductGrid/ProductGrid.d.ts
|
|
7
|
+
interface ProductGridProps {
|
|
8
|
+
productList: SearchResponseProduct[];
|
|
9
|
+
productGridVariant: ProductGridVariant;
|
|
10
|
+
productGridClasses: string;
|
|
11
|
+
productCardConfig?: ProductCardConfig;
|
|
12
|
+
merchantShortName: string;
|
|
13
|
+
searchResponseId: string;
|
|
14
|
+
cardsGrowWithContainer?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const ProductGrid: ({
|
|
17
|
+
productList,
|
|
18
|
+
productGridVariant,
|
|
19
|
+
productGridClasses,
|
|
20
|
+
productCardConfig,
|
|
21
|
+
merchantShortName,
|
|
22
|
+
searchResponseId,
|
|
23
|
+
cardsGrowWithContainer
|
|
24
|
+
}: ProductGridProps) => react_jsx_runtime11.JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/ProductGrid/productGridVariants.d.ts
|
|
27
|
+
interface ProductGridVariantClasses {
|
|
28
|
+
productCardVariant: ProductCardVariant;
|
|
29
|
+
productCardHoverVariant: ProductCardHoverVariant;
|
|
30
|
+
productCardLayoutVariant: ProductCardLayoutVariant;
|
|
31
|
+
productCardImageAspectRatio: '3:4' | 'square' | 'none';
|
|
32
|
+
zoomOnHover: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare const productGridVariantClasses: Record<ProductGridVariant, ProductGridVariantClasses>;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { ProductGrid, productGridVariantClasses };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "../textVariantClasses-CnjwO2Fv.js";
|
|
2
|
+
import "../Text-BMg3d10t.js";
|
|
3
|
+
import "../Headline-XpaAeTSR.js";
|
|
4
|
+
import "../ImageWithFallback-Ckwsmd8P.js";
|
|
5
|
+
import "../ProductCard-SF8-lXlT.js";
|
|
6
|
+
import "../Spinner-BgGihEfJ.js";
|
|
7
|
+
import { ProductGrid, productGridVariantClasses } from "../ProductGrid-DTUhH219.js";
|
|
8
|
+
|
|
9
|
+
export { ProductGrid, productGridVariantClasses };
|