@envive-ai/react-toolkit 0.1.1 → 0.1.3
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/AppliedFiltersScrollbar-Cd6jgn-c.cjs +53 -0
- package/dist/AppliedFiltersScrollbar-CeMmITGf.d.cts +22 -0
- package/dist/AppliedFiltersScrollbar-DUo5NSwQ.js +44 -0
- package/dist/AppliedFiltersScrollbar-DrcrTkwX.d.ts +22 -0
- package/dist/ButtonBase-2R-hB-y8.d.cts +43 -0
- package/dist/ButtonBase-DVBSlvQv.d.ts +43 -0
- package/dist/ButtonBase-Dk_5Bxe0.js +60 -0
- package/dist/ButtonBase-RIYFAcSy.cjs +75 -0
- package/dist/DynamicFiltersScrollbar-BbgfsOpt.js +32 -0
- package/dist/DynamicFiltersScrollbar-CHI1YQZ7.d.cts +28 -0
- package/dist/DynamicFiltersScrollbar-DMuCZcGH.d.ts +28 -0
- package/dist/DynamicFiltersScrollbar-FKO8Qb5u.cjs +41 -0
- package/dist/Headline-B8ivXd0O.d.cts +21 -0
- package/dist/Headline-CRQSK38D.d.ts +21 -0
- package/dist/Headline-L7w3BsBF.cjs +72 -0
- package/dist/Headline-ro_Nigw5.js +64 -0
- package/dist/ImageWithFallback-CfmkC58B.js +42 -0
- package/dist/ImageWithFallback-D70hTBkZ.d.cts +26 -0
- package/dist/ImageWithFallback-P3AjyL2Y.cjs +51 -0
- package/dist/ImageWithFallback-xikP8SY4.d.ts +26 -0
- package/dist/NoSearchResultsFound-C25AsQAI.d.ts +17 -0
- package/dist/NoSearchResultsFound-jT3JwiYm.cjs +34 -0
- package/dist/NoSearchResultsFound-lpvz_Gq-.d.cts +17 -0
- package/dist/NoSearchResultsFound-q-DgYpjR.js +25 -0
- package/dist/ProductCard-CLLIICuS.js +172 -0
- package/dist/ProductCard-CPOXS9kz.d.ts +91 -0
- package/dist/ProductCard-CTm2sGVZ.d.cts +91 -0
- package/dist/ProductCard-DSmiLLCO.cjs +199 -0
- package/dist/ProductCardSkeleton-BD-4l9Ym.d.ts +12 -0
- package/dist/ProductCardSkeleton-CgpRxzKt.d.cts +12 -0
- package/dist/ProductCardSkeleton-Pp0UQG-h.cjs +63 -0
- package/dist/ProductCardSkeleton-lKjP9IjT.js +43 -0
- package/dist/ProductGrid-CGKgdAK7.js +69 -0
- package/dist/ProductGrid-CocLTY7Q.cjs +83 -0
- package/dist/ProductGrid-DDhSKNBT.d.ts +26 -0
- package/dist/ProductGrid-Lts9Xv83.d.cts +26 -0
- package/dist/SearchAutocomplete-5gSMPXfM.d.cts +13 -0
- package/dist/SearchAutocomplete-CIsbwN0M.cjs +62 -0
- package/dist/SearchAutocomplete-D4LkC6bS.js +51 -0
- package/dist/SearchAutocomplete-I5DJkfmd.d.ts +13 -0
- package/dist/SearchFilter-BoCnqT8O.d.ts +18 -0
- package/dist/SearchFilter-D9_2Bdu0.cjs +70 -0
- package/dist/SearchFilter-DK7f_J7J.d.cts +18 -0
- package/dist/SearchFilter-qTwBmFt1.js +62 -0
- package/dist/SearchFilterHeader-C4D38iyw.d.ts +12 -0
- package/dist/SearchFilterHeader-CcHU0lN_.cjs +45 -0
- package/dist/SearchFilterHeader-DRA6XMMY.js +37 -0
- package/dist/SearchFilterHeader-TQ_MapZI.d.cts +12 -0
- package/dist/SearchFilterItem-C3F8x3M3.d.cts +13 -0
- package/dist/SearchFilterItem-CsrO3Om5.js +26 -0
- package/dist/SearchFilterItem-DJrPcYtU.cjs +34 -0
- package/dist/SearchFilterItem-sOBAQLPQ.d.ts +13 -0
- package/dist/SearchInput-Cxg1t9H8.js +89 -0
- package/dist/SearchInput-D2yMIYtf.cjs +106 -0
- package/dist/SearchInput-DzLynEd6.d.cts +20 -0
- package/dist/SearchInput-zggwSGKj.d.ts +20 -0
- package/dist/SearchInputForm-BWMdfatv.d.cts +32 -0
- package/dist/SearchInputForm-D4qh2b7S.d.ts +32 -0
- package/dist/SearchInputForm-DNEkauQ5.js +33 -0
- package/dist/SearchInputForm-z5RFjdh2.cjs +40 -0
- package/dist/SearchResultsFilter-3U3u9E4U.d.ts +28 -0
- package/dist/SearchResultsFilter-CVFVMTUO.js +45 -0
- package/dist/SearchResultsFilter-DdF8BeDA.cjs +53 -0
- package/dist/SearchResultsFilter-RuaEmhp5.d.cts +28 -0
- package/dist/SearchResultsGrid-B7bjLKye.cjs +62 -0
- package/dist/SearchResultsGrid-BXyk2cMd.js +53 -0
- package/dist/SearchResultsGrid-CLldvt66.d.cts +41 -0
- package/dist/SearchResultsGrid-CoWZNxWh.d.ts +41 -0
- package/dist/SearchResultsLoadingGrid-4QzwkBiT.cjs +55 -0
- package/dist/SearchResultsLoadingGrid-BiZ11r8B.js +47 -0
- package/dist/SearchResultsLoadingGrid-DN3MQxZi.d.ts +15 -0
- package/dist/SearchResultsLoadingGrid-XA5pUZAz.d.cts +15 -0
- package/dist/SparkleAnimation-BStwzL9T.d.ts +15 -0
- package/dist/SparkleAnimation-CVu9vUAb.cjs +102 -0
- package/dist/SparkleAnimation-DKhQSeVg.d.cts +15 -0
- package/dist/SparkleAnimation-Df_wUFfB.js +85 -0
- package/dist/Spinner-79PaZrmy.d.cts +11 -0
- package/dist/Spinner-BZ-kTOpm.js +38 -0
- package/dist/Spinner-CfQ85Ajl.cjs +46 -0
- package/dist/Spinner-De8NVcZz.d.ts +11 -0
- package/dist/SuggestionButton-BVzBCzmQ.cjs +206 -0
- package/dist/SuggestionButton-BoKmwMb3.d.ts +35 -0
- package/dist/SuggestionButton-C4p08bZv.js +178 -0
- package/dist/SuggestionButton-CNwyzi1V.d.cts +35 -0
- package/dist/Text-Bdv7F5-u.js +42 -0
- package/dist/Text-C04c4Z93.cjs +50 -0
- package/dist/Text-D8WEjUal.d.ts +41 -0
- package/dist/Text-D8bCCNPT.d.cts +41 -0
- package/dist/TextInput-BZSsdOtq.js +31 -0
- package/dist/TextInput-CZogcpzR.cjs +40 -0
- package/dist/TextInput-CtSUuczk.d.ts +98 -0
- package/dist/TextInput-QqdJV52m.d.cts +98 -0
- package/dist/chunk-CUT6urMc.cjs +30 -0
- package/dist/colorsConfig-TCONYTQ7.cjs +38 -0
- package/dist/colorsConfig-l0ODUVhu.js +26 -0
- package/dist/components/common/ButtonBase/ButtonBase.cjs +5 -0
- package/dist/components/common/ButtonBase/ButtonBase.d.cts +3 -0
- package/dist/components/common/ButtonBase/ButtonBase.d.ts +3 -0
- package/dist/components/common/ButtonBase/ButtonBase.js +5 -0
- package/dist/components/common/Headline/Headline.cjs +4 -0
- package/dist/components/common/Headline/Headline.d.cts +2 -0
- package/dist/components/common/Headline/Headline.d.ts +2 -0
- package/dist/components/common/Headline/Headline.js +4 -0
- package/dist/components/common/ImageWithFallback/ImageWithFallback.cjs +3 -0
- package/dist/components/common/ImageWithFallback/ImageWithFallback.d.cts +2 -0
- package/dist/components/common/ImageWithFallback/ImageWithFallback.d.ts +2 -0
- package/dist/components/common/ImageWithFallback/ImageWithFallback.js +3 -0
- package/dist/components/common/ProductCard/ProductCard.cjs +11 -0
- package/dist/components/common/ProductCard/ProductCard.d.cts +4 -0
- package/dist/components/common/ProductCard/ProductCard.d.ts +4 -0
- package/dist/components/common/ProductCard/ProductCard.js +9 -0
- package/dist/components/common/ProductCard/ProductCardSkeleton.cjs +4 -0
- package/dist/components/common/ProductCard/ProductCardSkeleton.d.cts +3 -0
- package/dist/components/common/ProductCard/ProductCardSkeleton.d.ts +3 -0
- package/dist/components/common/ProductCard/ProductCardSkeleton.js +4 -0
- package/dist/components/common/ProductGrid/ProductGrid.cjs +11 -0
- package/dist/components/common/ProductGrid/ProductGrid.d.cts +3 -0
- package/dist/components/common/ProductGrid/ProductGrid.d.ts +3 -0
- package/dist/components/common/ProductGrid/ProductGrid.js +11 -0
- package/dist/components/common/SparkleAnimation/SparkleAnimation.cjs +3 -0
- package/dist/components/common/SparkleAnimation/SparkleAnimation.d.cts +2 -0
- package/dist/components/common/SparkleAnimation/SparkleAnimation.d.ts +2 -0
- package/dist/components/common/SparkleAnimation/SparkleAnimation.js +3 -0
- package/dist/components/common/Spinner/Spinner.cjs +3 -0
- package/dist/components/common/Spinner/Spinner.d.cts +2 -0
- package/dist/components/common/Spinner/Spinner.d.ts +2 -0
- package/dist/components/common/Spinner/Spinner.js +3 -0
- package/dist/components/common/SuggestionButton/SuggestionButton.cjs +9 -0
- package/dist/components/common/SuggestionButton/SuggestionButton.d.cts +3 -0
- package/dist/components/common/SuggestionButton/SuggestionButton.d.ts +3 -0
- package/dist/components/common/SuggestionButton/SuggestionButton.js +6 -0
- package/dist/components/common/Text/Text.cjs +4 -0
- package/dist/components/common/Text/Text.d.cts +2 -0
- package/dist/components/common/Text/Text.d.ts +2 -0
- package/dist/components/common/Text/Text.js +4 -0
- package/dist/components/common/TextInput/TextInput.cjs +4 -0
- package/dist/components/common/TextInput/TextInput.d.cts +2 -0
- package/dist/components/common/TextInput/TextInput.d.ts +2 -0
- package/dist/components/common/TextInput/TextInput.js +4 -0
- package/dist/components/search/FilterScrollbar/AppliedFiltersScrollbar.cjs +5 -0
- package/dist/components/search/FilterScrollbar/AppliedFiltersScrollbar.d.cts +3 -0
- package/dist/components/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +3 -0
- package/dist/components/search/FilterScrollbar/AppliedFiltersScrollbar.js +5 -0
- package/dist/components/search/FilterScrollbar/DynamicFiltersScrollbar.cjs +5 -0
- package/dist/components/search/FilterScrollbar/DynamicFiltersScrollbar.d.cts +2 -0
- package/dist/components/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +2 -0
- package/dist/components/search/FilterScrollbar/DynamicFiltersScrollbar.js +5 -0
- package/dist/components/search/SearchFilter/SearchFilter.cjs +7 -0
- package/dist/components/search/SearchFilter/SearchFilter.d.cts +3 -0
- package/dist/components/search/SearchFilter/SearchFilter.d.ts +3 -0
- package/dist/components/search/SearchFilter/SearchFilter.js +7 -0
- package/dist/components/search/SearchFilter/SearchFilterHeader.cjs +5 -0
- package/dist/components/search/SearchFilter/SearchFilterHeader.d.cts +3 -0
- package/dist/components/search/SearchFilter/SearchFilterHeader.d.ts +3 -0
- package/dist/components/search/SearchFilter/SearchFilterHeader.js +5 -0
- package/dist/components/search/SearchFilter/SearchFilterItem.cjs +5 -0
- package/dist/components/search/SearchFilter/SearchFilterItem.d.cts +3 -0
- package/dist/components/search/SearchFilter/SearchFilterItem.d.ts +3 -0
- package/dist/components/search/SearchFilter/SearchFilterItem.js +5 -0
- package/dist/components/search/SearchInput/SearchInput.cjs +6 -0
- package/dist/components/search/SearchInput/SearchInput.d.cts +3 -0
- package/dist/components/search/SearchInput/SearchInput.d.ts +3 -0
- package/dist/components/search/SearchInput/SearchInput.js +6 -0
- package/dist/components/search/SearchInputAutocomplete/SearchAutocomplete.cjs +3 -0
- package/dist/components/search/SearchInputAutocomplete/SearchAutocomplete.d.cts +2 -0
- package/dist/components/search/SearchInputAutocomplete/SearchAutocomplete.d.ts +2 -0
- package/dist/components/search/SearchInputAutocomplete/SearchAutocomplete.js +3 -0
- package/dist/components/search/SearchInputForm/SearchInputForm.cjs +8 -0
- package/dist/components/search/SearchInputForm/SearchInputForm.d.cts +3 -0
- package/dist/components/search/SearchInputForm/SearchInputForm.d.ts +3 -0
- package/dist/components/search/SearchInputForm/SearchInputForm.js +8 -0
- package/dist/components/search/SearchResultsFilterSidebar/SearchResultsFilter.cjs +11 -0
- package/dist/components/search/SearchResultsFilterSidebar/SearchResultsFilter.d.cts +4 -0
- package/dist/components/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +4 -0
- package/dist/components/search/SearchResultsFilterSidebar/SearchResultsFilter.js +11 -0
- package/dist/components/search/SearchResultsStates/NoSearchResultsFound.cjs +5 -0
- package/dist/components/search/SearchResultsStates/NoSearchResultsFound.d.cts +2 -0
- package/dist/components/search/SearchResultsStates/NoSearchResultsFound.d.ts +2 -0
- package/dist/components/search/SearchResultsStates/NoSearchResultsFound.js +5 -0
- package/dist/components/search/SearchResultsStates/SearchResultsGrid.cjs +16 -0
- package/dist/components/search/SearchResultsStates/SearchResultsGrid.d.cts +5 -0
- package/dist/components/search/SearchResultsStates/SearchResultsGrid.d.ts +5 -0
- package/dist/components/search/SearchResultsStates/SearchResultsGrid.js +16 -0
- package/dist/components/search/SearchResultsStates/SearchResultsLoadingGrid.cjs +9 -0
- package/dist/components/search/SearchResultsStates/SearchResultsLoadingGrid.d.cts +3 -0
- package/dist/components/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +3 -0
- package/dist/components/search/SearchResultsStates/SearchResultsLoadingGrid.js +9 -0
- package/dist/index.cjs +80 -0
- package/dist/index.d.cts +75 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.js +48 -0
- package/dist/productCardVariants-C_QIZ-KF.js +45 -0
- package/dist/productCardVariants-Dd-wrJKP.cjs +69 -0
- package/dist/productGridVariants-BNX4YlRK.js +20 -0
- package/dist/productGridVariants-CsNV0ACt.cjs +26 -0
- package/dist/searchFilterSidebarVariants-2hFLDP6e.cjs +39 -0
- package/dist/searchFilterSidebarVariants-ClPVoN5E.js +34 -0
- package/dist/textVariantClasses-5t3OricK.js +101 -0
- package/dist/textVariantClasses-Bhf4VY5z.cjs +125 -0
- package/dist/types--SBcFTJX.d.cts +289 -0
- package/dist/types-BKI60fVP.d.ts +5 -0
- package/dist/types-CmjqQWAG.d.ts +289 -0
- package/dist/types-CrKSiwfx.d.ts +8 -0
- package/dist/types-D2gzKgxc.d.cts +5 -0
- package/dist/types-DBFHTDLN.d.cts +8 -0
- package/dist/types-DIFUT33A.d.ts +4 -0
- package/dist/types-DSduYC0Z.d.ts +46 -0
- package/dist/types-TYhhwWZw.d.cts +6 -0
- package/dist/types-Y0WKFOqS.d.ts +6 -0
- package/dist/types-ZUUsuyGT.d.cts +4 -0
- package/dist/types-pOHvi423.d.cts +46 -0
- package/package.json +8 -8
- package/src/components/common/ButtonBase/ButtonBase.tsx +2 -2
- package/src/components/common/ButtonBase/types.ts +2 -3
- package/src/index.ts +14 -15
- package/dist/src/atoms/search/types.d.ts +0 -5
- package/dist/src/atoms/search/types.js +0 -1
- package/dist/src/components/common/ButtonBase/ButtonBase.d.ts +0 -2
- package/dist/src/components/common/ButtonBase/ButtonBase.js +0 -41
- package/dist/src/components/common/ButtonBase/types.d.ts +0 -24
- package/dist/src/components/common/ButtonBase/types.js +0 -6
- package/dist/src/components/common/Headline/Headline.d.ts +0 -10
- package/dist/src/components/common/Headline/Headline.js +0 -34
- package/dist/src/components/common/ImageWithFallback/ImageWithFallback.d.ts +0 -12
- package/dist/src/components/common/ImageWithFallback/ImageWithFallback.js +0 -26
- package/dist/src/components/common/ProductCard/ProductCard.d.ts +0 -39
- package/dist/src/components/common/ProductCard/ProductCard.js +0 -84
- package/dist/src/components/common/ProductCard/ProductCardSkeleton.d.ts +0 -9
- package/dist/src/components/common/ProductCard/ProductCardSkeleton.js +0 -15
- package/dist/src/components/common/ProductCard/productCardVariants.d.ts +0 -8
- package/dist/src/components/common/ProductCard/productCardVariants.js +0 -50
- package/dist/src/components/common/ProductCard/types.d.ts +0 -39
- package/dist/src/components/common/ProductCard/types.js +0 -10
- package/dist/src/components/common/ProductGrid/ProductGrid.d.ts +0 -14
- package/dist/src/components/common/ProductGrid/ProductGrid.js +0 -13
- package/dist/src/components/common/ProductGrid/productGridVariants.d.ts +0 -10
- package/dist/src/components/common/ProductGrid/productGridVariants.js +0 -16
- package/dist/src/components/common/SparkleAnimation/SparkleAnimation.d.ts +0 -7
- package/dist/src/components/common/SparkleAnimation/SparkleAnimation.js +0 -40
- package/dist/src/components/common/SparkleAnimation/types.d.ts +0 -6
- package/dist/src/components/common/SparkleAnimation/types.js +0 -7
- package/dist/src/components/common/Spinner/Spinner.d.ts +0 -5
- package/dist/src/components/common/Spinner/Spinner.js +0 -16
- package/dist/src/components/common/SuggestionButton/SuggestionButton.d.ts +0 -18
- package/dist/src/components/common/SuggestionButton/SuggestionButton.js +0 -210
- package/dist/src/components/common/SuggestionButton/types.d.ts +0 -1
- package/dist/src/components/common/SuggestionButton/types.js +0 -1
- package/dist/src/components/common/Text/Text.d.ts +0 -12
- package/dist/src/components/common/Text/Text.js +0 -26
- package/dist/src/components/common/Text/textVariantClasses.d.ts +0 -171
- package/dist/src/components/common/Text/textVariantClasses.js +0 -103
- package/dist/src/components/common/Text/types.d.ts +0 -16
- package/dist/src/components/common/Text/types.js +0 -6
- package/dist/src/components/common/TextInput/TextInput.d.ts +0 -8
- package/dist/src/components/common/TextInput/TextInput.js +0 -25
- package/dist/src/components/models/colorsConfig.d.ts +0 -26
- package/dist/src/components/models/colorsConfig.js +0 -23
- package/dist/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +0 -11
- package/dist/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.js +0 -18
- package/dist/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +0 -15
- package/dist/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.js +0 -15
- package/dist/src/components/search/SearchFilter/SearchFilter.d.ts +0 -2
- package/dist/src/components/search/SearchFilter/SearchFilter.js +0 -24
- package/dist/src/components/search/SearchFilter/SearchFilterHeader.d.ts +0 -2
- package/dist/src/components/search/SearchFilter/SearchFilterHeader.js +0 -9
- package/dist/src/components/search/SearchFilter/SearchFilterItem.d.ts +0 -2
- package/dist/src/components/search/SearchFilter/SearchFilterItem.js +0 -13
- package/dist/src/components/search/SearchFilter/types.d.ts +0 -42
- package/dist/src/components/search/SearchFilter/types.js +0 -1
- package/dist/src/components/search/SearchInput/SearchInput.d.ts +0 -16
- package/dist/src/components/search/SearchInput/SearchInput.js +0 -38
- package/dist/src/components/search/SearchInput/searchInputVariants.d.ts +0 -13
- package/dist/src/components/search/SearchInput/searchInputVariants.js +0 -12
- package/dist/src/components/search/SearchInputAutocomplete/SearchAutocomplete.d.ts +0 -10
- package/dist/src/components/search/SearchInputAutocomplete/SearchAutocomplete.js +0 -14
- package/dist/src/components/search/SearchInputForm/SearchInputForm.d.ts +0 -16
- package/dist/src/components/search/SearchInputForm/SearchInputForm.js +0 -13
- package/dist/src/components/search/SearchInputForm/types.d.ts +0 -1
- package/dist/src/components/search/SearchInputForm/types.js +0 -1
- package/dist/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +0 -14
- package/dist/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.js +0 -15
- package/dist/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts +0 -16
- package/dist/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.js +0 -29
- package/dist/src/components/search/SearchResultsFilterSidebar/types.d.ts +0 -2
- package/dist/src/components/search/SearchResultsFilterSidebar/types.js +0 -1
- package/dist/src/components/search/SearchResultsStates/NoSearchResultsFound.d.ts +0 -8
- package/dist/src/components/search/SearchResultsStates/NoSearchResultsFound.js +0 -10
- package/dist/src/components/search/SearchResultsStates/SearchResultsGrid.d.ts +0 -24
- package/dist/src/components/search/SearchResultsStates/SearchResultsGrid.js +0 -19
- package/dist/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +0 -6
- package/dist/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.js +0 -10
- package/dist/src/components/search/types.d.ts +0 -5
- package/dist/src/components/search/types.js +0 -6
- package/dist/src/components/test/types.d.ts +0 -3
- package/dist/src/components/test/types.js +0 -1
- package/dist/src/config/chatElementDisplayLocation.d.ts +0 -21
- package/dist/src/config/chatElementDisplayLocation.js +0 -23
- package/dist/src/index.d.ts +0 -45
- package/dist/src/index.js +0 -49
- package/dist/src/logging/logger.d.ts +0 -7
- package/dist/src/logging/logger.js +0 -16
- package/dist/src/types/external.d.ts +0 -21
- package/dist/src/types/external.js +0 -5
- package/dist/src/util/camelCase.d.ts +0 -65
- package/dist/src/util/camelCase.js +0 -2
- package/dist/src/util/camelCasedPropertiesDeep.d.ts +0 -53
- package/dist/src/util/camelCasedPropertiesDeep.js +0 -1
- package/dist/src/util/formatPrice.d.ts +0 -1
- package/dist/src/util/formatPrice.js +0 -11
- package/dist/src/util/internal.d.ts +0 -27
- package/dist/src/util/internal.js +0 -4
- package/dist/src/util/primitive.d.ts +0 -6
- package/dist/src/util/primitive.js +0 -2
- package/dist/src/util/splitWords.d.ts +0 -55
- package/dist/src/util/splitWords.js +0 -2
- package/dist/src/util/trim.d.ts +0 -24
- package/dist/src/util/trim.js +0 -2
- package/dist/src/util/unknownArray.d.ts +0 -25
- package/dist/src/util/unknownArray.js +0 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { HeadlineVariantMap } from "./textVariantClasses-5t3OricK.js";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/common/Headline/Headline.tsx
|
|
6
|
+
const Headline = ({ children, className, style, testId, variant = "h1" }) => {
|
|
7
|
+
const variantClassNames = variant ? HeadlineVariantMap[variant] : {};
|
|
8
|
+
const textClassNames = classNames(className, variantClassNames, { "spiffy-tw-font-[Poppins,sans-serif]": true });
|
|
9
|
+
const T1 = () => /* @__PURE__ */ jsx("h1", {
|
|
10
|
+
"data-testid": testId,
|
|
11
|
+
className: textClassNames,
|
|
12
|
+
style,
|
|
13
|
+
children
|
|
14
|
+
});
|
|
15
|
+
const T2 = () => /* @__PURE__ */ jsx("h2", {
|
|
16
|
+
"data-testid": testId,
|
|
17
|
+
className: textClassNames,
|
|
18
|
+
style,
|
|
19
|
+
children
|
|
20
|
+
});
|
|
21
|
+
const T3 = () => /* @__PURE__ */ jsx("h3", {
|
|
22
|
+
"data-testid": testId,
|
|
23
|
+
className: textClassNames,
|
|
24
|
+
style,
|
|
25
|
+
children
|
|
26
|
+
});
|
|
27
|
+
const H1 = () => /* @__PURE__ */ jsx("h1", {
|
|
28
|
+
"data-testid": testId,
|
|
29
|
+
className: textClassNames,
|
|
30
|
+
style,
|
|
31
|
+
children
|
|
32
|
+
});
|
|
33
|
+
const H2 = () => /* @__PURE__ */ jsx("h2", {
|
|
34
|
+
"data-testid": testId,
|
|
35
|
+
className: textClassNames,
|
|
36
|
+
style,
|
|
37
|
+
children
|
|
38
|
+
});
|
|
39
|
+
const H3 = () => /* @__PURE__ */ jsx("h3", {
|
|
40
|
+
"data-testid": testId,
|
|
41
|
+
className: textClassNames,
|
|
42
|
+
style,
|
|
43
|
+
children
|
|
44
|
+
});
|
|
45
|
+
const H4 = () => /* @__PURE__ */ jsx("h4", {
|
|
46
|
+
"data-testid": testId,
|
|
47
|
+
className: textClassNames,
|
|
48
|
+
style,
|
|
49
|
+
children
|
|
50
|
+
});
|
|
51
|
+
switch (variant) {
|
|
52
|
+
case "t1": return T1();
|
|
53
|
+
case "t2": return T2();
|
|
54
|
+
case "t3": return T3();
|
|
55
|
+
case "h1": return H1();
|
|
56
|
+
case "h2": return H2();
|
|
57
|
+
case "h3": return H3();
|
|
58
|
+
case "h4": return H4();
|
|
59
|
+
default: throw new Error(`Invalid variant: ${variant}`);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
export { Headline };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/common/ImageWithFallback/ImageWithFallback.tsx
|
|
6
|
+
const ImageWithFallback = ({ src, alt, dataTestId, fallbackClassnames, fallback, imageClassnames, onLoad, onError }) => {
|
|
7
|
+
const [isLoaded, setIsLoaded] = useState(false);
|
|
8
|
+
const [isError, setIsError] = useState(false);
|
|
9
|
+
const imageExtraClassnames = classNames(imageClassnames, {
|
|
10
|
+
"spiffy-tw-block": isLoaded,
|
|
11
|
+
"spiffy-tw-hidden": !isLoaded
|
|
12
|
+
});
|
|
13
|
+
const fallbackMergedClassNames = classNames({
|
|
14
|
+
"spiffy-tw-flex": true,
|
|
15
|
+
"spiffy-tw-flex-col": true,
|
|
16
|
+
"spiffy-tw-items-center": true
|
|
17
|
+
}, fallbackClassnames);
|
|
18
|
+
if (isError) return /* @__PURE__ */ jsx("div", {
|
|
19
|
+
className: fallbackMergedClassNames,
|
|
20
|
+
children: fallback
|
|
21
|
+
});
|
|
22
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [!isLoaded && /* @__PURE__ */ jsx("div", {
|
|
23
|
+
className: fallbackMergedClassNames,
|
|
24
|
+
children: fallback
|
|
25
|
+
}), /* @__PURE__ */ jsx("img", {
|
|
26
|
+
src,
|
|
27
|
+
className: imageExtraClassnames,
|
|
28
|
+
"data-testid": dataTestId,
|
|
29
|
+
alt,
|
|
30
|
+
onLoad: () => {
|
|
31
|
+
setIsLoaded(true);
|
|
32
|
+
onLoad?.();
|
|
33
|
+
},
|
|
34
|
+
onError: () => {
|
|
35
|
+
setIsError(true);
|
|
36
|
+
onError?.();
|
|
37
|
+
}
|
|
38
|
+
})] });
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { ImageWithFallback };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/common/ImageWithFallback/ImageWithFallback.d.ts
|
|
5
|
+
interface ImageWithFallbackProps {
|
|
6
|
+
src: string | undefined;
|
|
7
|
+
alt: string;
|
|
8
|
+
fallbackClassnames?: string;
|
|
9
|
+
fallback: React.ReactNode;
|
|
10
|
+
dataTestId?: string;
|
|
11
|
+
imageClassnames: string;
|
|
12
|
+
onLoad?: () => void;
|
|
13
|
+
onError?: () => void;
|
|
14
|
+
}
|
|
15
|
+
declare const ImageWithFallback: ({
|
|
16
|
+
src,
|
|
17
|
+
alt,
|
|
18
|
+
dataTestId,
|
|
19
|
+
fallbackClassnames,
|
|
20
|
+
fallback,
|
|
21
|
+
imageClassnames,
|
|
22
|
+
onLoad,
|
|
23
|
+
onError
|
|
24
|
+
}: ImageWithFallbackProps) => react_jsx_runtime16.JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { ImageWithFallback, ImageWithFallbackProps };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
let classnames = require("classnames");
|
|
3
|
+
classnames = require_chunk.__toESM(classnames);
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_chunk.__toESM(react);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
8
|
+
|
|
9
|
+
//#region src/components/common/ImageWithFallback/ImageWithFallback.tsx
|
|
10
|
+
const ImageWithFallback = ({ src, alt, dataTestId, fallbackClassnames, fallback, imageClassnames, onLoad, onError }) => {
|
|
11
|
+
const [isLoaded, setIsLoaded] = (0, react.useState)(false);
|
|
12
|
+
const [isError, setIsError] = (0, react.useState)(false);
|
|
13
|
+
const imageExtraClassnames = (0, classnames.default)(imageClassnames, {
|
|
14
|
+
"spiffy-tw-block": isLoaded,
|
|
15
|
+
"spiffy-tw-hidden": !isLoaded
|
|
16
|
+
});
|
|
17
|
+
const fallbackMergedClassNames = (0, classnames.default)({
|
|
18
|
+
"spiffy-tw-flex": true,
|
|
19
|
+
"spiffy-tw-flex-col": true,
|
|
20
|
+
"spiffy-tw-items-center": true
|
|
21
|
+
}, fallbackClassnames);
|
|
22
|
+
if (isError) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
23
|
+
className: fallbackMergedClassNames,
|
|
24
|
+
children: fallback
|
|
25
|
+
});
|
|
26
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [!isLoaded && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
27
|
+
className: fallbackMergedClassNames,
|
|
28
|
+
children: fallback
|
|
29
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
30
|
+
src,
|
|
31
|
+
className: imageExtraClassnames,
|
|
32
|
+
"data-testid": dataTestId,
|
|
33
|
+
alt,
|
|
34
|
+
onLoad: () => {
|
|
35
|
+
setIsLoaded(true);
|
|
36
|
+
onLoad?.();
|
|
37
|
+
},
|
|
38
|
+
onError: () => {
|
|
39
|
+
setIsError(true);
|
|
40
|
+
onError?.();
|
|
41
|
+
}
|
|
42
|
+
})] });
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
Object.defineProperty(exports, 'ImageWithFallback', {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () {
|
|
49
|
+
return ImageWithFallback;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/common/ImageWithFallback/ImageWithFallback.d.ts
|
|
5
|
+
interface ImageWithFallbackProps {
|
|
6
|
+
src: string | undefined;
|
|
7
|
+
alt: string;
|
|
8
|
+
fallbackClassnames?: string;
|
|
9
|
+
fallback: React.ReactNode;
|
|
10
|
+
dataTestId?: string;
|
|
11
|
+
imageClassnames: string;
|
|
12
|
+
onLoad?: () => void;
|
|
13
|
+
onError?: () => void;
|
|
14
|
+
}
|
|
15
|
+
declare const ImageWithFallback: ({
|
|
16
|
+
src,
|
|
17
|
+
alt,
|
|
18
|
+
dataTestId,
|
|
19
|
+
fallbackClassnames,
|
|
20
|
+
fallback,
|
|
21
|
+
imageClassnames,
|
|
22
|
+
onLoad,
|
|
23
|
+
onError
|
|
24
|
+
}: ImageWithFallbackProps) => react_jsx_runtime0.JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { ImageWithFallback, ImageWithFallbackProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/search/SearchResultsStates/NoSearchResultsFound.d.ts
|
|
4
|
+
interface NoSearchResultsFoundProps {
|
|
5
|
+
containerPaddingClasses: string;
|
|
6
|
+
includeBottomMargin?: boolean;
|
|
7
|
+
noResultsFoundText?: string;
|
|
8
|
+
sparkleIconColor?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const NoSearchResultsFound: ({
|
|
11
|
+
containerPaddingClasses,
|
|
12
|
+
includeBottomMargin,
|
|
13
|
+
noResultsFoundText,
|
|
14
|
+
sparkleIconColor
|
|
15
|
+
}: NoSearchResultsFoundProps) => react_jsx_runtime19.JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { NoSearchResultsFound };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
const require_Text = require('./Text-C04c4Z93.cjs');
|
|
3
|
+
let classnames = require("classnames");
|
|
4
|
+
classnames = require_chunk.__toESM(classnames);
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
7
|
+
let __envive_ai_react_icons_src_Sparkles = require("@envive-ai/react-icons/src/Sparkles");
|
|
8
|
+
__envive_ai_react_icons_src_Sparkles = require_chunk.__toESM(__envive_ai_react_icons_src_Sparkles);
|
|
9
|
+
|
|
10
|
+
//#region src/components/search/SearchResultsStates/NoSearchResultsFound.tsx
|
|
11
|
+
const NoSearchResultsFound = ({ containerPaddingClasses, includeBottomMargin = false, noResultsFoundText, sparkleIconColor = "var(--spiffy-colors-accent-primary)" }) => {
|
|
12
|
+
const containerClasses = (0, classnames.default)(containerPaddingClasses, includeBottomMargin ? "spiffy-tw-mb-[100vh]" : "", "spiffy-tw-mt-6");
|
|
13
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
14
|
+
className: containerClasses,
|
|
15
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
16
|
+
className: "spiffy-tw-flex spiffy-tw-items-start spiffy-tw-gap-2",
|
|
17
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_src_Sparkles.default, {
|
|
18
|
+
className: "spiffy-tw-w-[24px] spiffy-tw-h-[24px]",
|
|
19
|
+
style: { color: sparkleIconColor }
|
|
20
|
+
}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
21
|
+
variant: "body2",
|
|
22
|
+
children: noResultsFoundText || "I’m sorry, I wasn’t able to find an exact match. Try changing your filters or adjusting your search query."
|
|
23
|
+
})]
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
Object.defineProperty(exports, 'NoSearchResultsFound', {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () {
|
|
32
|
+
return NoSearchResultsFound;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/search/SearchResultsStates/NoSearchResultsFound.d.ts
|
|
4
|
+
interface NoSearchResultsFoundProps {
|
|
5
|
+
containerPaddingClasses: string;
|
|
6
|
+
includeBottomMargin?: boolean;
|
|
7
|
+
noResultsFoundText?: string;
|
|
8
|
+
sparkleIconColor?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const NoSearchResultsFound: ({
|
|
11
|
+
containerPaddingClasses,
|
|
12
|
+
includeBottomMargin,
|
|
13
|
+
noResultsFoundText,
|
|
14
|
+
sparkleIconColor
|
|
15
|
+
}: NoSearchResultsFoundProps) => react_jsx_runtime11.JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { NoSearchResultsFound };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Text } from "./Text-Bdv7F5-u.js";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import Sparkles from "@envive-ai/react-icons/src/Sparkles";
|
|
5
|
+
|
|
6
|
+
//#region src/components/search/SearchResultsStates/NoSearchResultsFound.tsx
|
|
7
|
+
const NoSearchResultsFound = ({ containerPaddingClasses, includeBottomMargin = false, noResultsFoundText, sparkleIconColor = "var(--spiffy-colors-accent-primary)" }) => {
|
|
8
|
+
const containerClasses = classNames(containerPaddingClasses, includeBottomMargin ? "spiffy-tw-mb-[100vh]" : "", "spiffy-tw-mt-6");
|
|
9
|
+
return /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className: containerClasses,
|
|
11
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
12
|
+
className: "spiffy-tw-flex spiffy-tw-items-start spiffy-tw-gap-2",
|
|
13
|
+
children: [/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Sparkles, {
|
|
14
|
+
className: "spiffy-tw-w-[24px] spiffy-tw-h-[24px]",
|
|
15
|
+
style: { color: sparkleIconColor }
|
|
16
|
+
}) }), /* @__PURE__ */ jsx(Text, {
|
|
17
|
+
variant: "body2",
|
|
18
|
+
children: noResultsFoundText || "I’m sorry, I wasn’t able to find an exact match. Try changing your filters or adjusting your search query."
|
|
19
|
+
})]
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { NoSearchResultsFound };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { Text } from "./Text-Bdv7F5-u.js";
|
|
2
|
+
import { Headline } from "./Headline-ro_Nigw5.js";
|
|
3
|
+
import { ImageWithFallback } from "./ImageWithFallback-CfmkC58B.js";
|
|
4
|
+
import { productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap } from "./productCardVariants-C_QIZ-KF.js";
|
|
5
|
+
import { Spinner } from "./Spinner-BZ-kTOpm.js";
|
|
6
|
+
import classNames from "classnames";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { MdStar } from "react-icons/md";
|
|
9
|
+
|
|
10
|
+
//#region src/logging/logger.ts
|
|
11
|
+
var Logger = class {
|
|
12
|
+
static logInfo(message, ...args) {
|
|
13
|
+
console.info(`INFO: ${message}`, ...args);
|
|
14
|
+
}
|
|
15
|
+
static logDebug(message, ...args) {
|
|
16
|
+
console.debug(`DEBUG: ${message}`, ...args);
|
|
17
|
+
}
|
|
18
|
+
static logError(message, error, ...args) {
|
|
19
|
+
console.error(`ERROR: ${message} error=${error}`, args);
|
|
20
|
+
}
|
|
21
|
+
static logWarn(message, error, ...args) {
|
|
22
|
+
console.warn(`WARN: ${message} error=${error}`, args);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
var logger_default = Logger;
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/util/formatPrice.ts
|
|
29
|
+
const formatPrice = (price, currency = "$") => {
|
|
30
|
+
if (price == null) return "";
|
|
31
|
+
const options = {};
|
|
32
|
+
if (!Number.isInteger(price)) {
|
|
33
|
+
options.minimumFractionDigits = 2;
|
|
34
|
+
options.maximumFractionDigits = 2;
|
|
35
|
+
}
|
|
36
|
+
return `${currency}${price.toLocaleString("en-US", options)}`;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/components/common/ProductCard/ProductCard.tsx
|
|
41
|
+
const formatReviews = (stars) => String(Number(stars).toLocaleString("en-US", {
|
|
42
|
+
minimumFractionDigits: 1,
|
|
43
|
+
maximumFractionDigits: 1
|
|
44
|
+
}));
|
|
45
|
+
const RatingSummary = ({ stars, reviewCount, className }) => {
|
|
46
|
+
const group = classNames("spiffy-product-card-rating", "spiffy-product-card-text-color", "spiffy-tw-flex", "spiffy-tw-flex-row", "spiffy-tw-items-center", "spiffy-tw-gap-1", "spiffy-tw-text-[--spiffy-colors-text-primary]", "spiffy-tw-tracking-[0.8px]");
|
|
47
|
+
const starClassnames = classNames("spiffy-product-card-rating-star-color", "spiffy-tw-fill-[--spiffy-colors-accent-primary]", "spiffy-tw-w-[14px]", "spiffy-tw-h-[14px]");
|
|
48
|
+
return /* @__PURE__ */ jsx("div", {
|
|
49
|
+
className,
|
|
50
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
51
|
+
className: group,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ jsx(MdStar, { className: starClassnames }),
|
|
54
|
+
/* @__PURE__ */ jsx(Text, {
|
|
55
|
+
variant: "body3",
|
|
56
|
+
children: formatReviews(stars)
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ jsxs(Text, {
|
|
59
|
+
variant: "body3",
|
|
60
|
+
children: [
|
|
61
|
+
"(",
|
|
62
|
+
reviewCount,
|
|
63
|
+
")"
|
|
64
|
+
]
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
const PriceSection = ({ originalPrice, salePrice, pricePrefix }) => {
|
|
71
|
+
if (!originalPrice) return null;
|
|
72
|
+
const priceClassName = classNames("spiffy-product-card-price", "spiffy-product-card-text-color", "spiffy-tw-font-regular", "spiffy-tw-flex", "spiffy-tw-flex-wrap", "spiffy-tw-gap-1", "spiffy-tw-text-sm", "spiffy-tw-font-[400]", "spiffy-tw-leading-[100%]", "spiffy-tw-tracking-[0.8px]", "spiffy-tw-text-[--spiffy-colors-text-primary]");
|
|
73
|
+
const showSalePrice = salePrice && originalPrice !== salePrice;
|
|
74
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
75
|
+
className: priceClassName,
|
|
76
|
+
children: [
|
|
77
|
+
pricePrefix && /* @__PURE__ */ jsx(Text, { children: pricePrefix }),
|
|
78
|
+
showSalePrice && /* @__PURE__ */ jsx(Text, { children: salePrice }),
|
|
79
|
+
/* @__PURE__ */ jsx(Text, {
|
|
80
|
+
className: showSalePrice ? "spiffy-tw-line-through" : "",
|
|
81
|
+
children: originalPrice
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, url, originalPrice, averageRating, numberReviews, salePrice, variant, hoverVariant, dataTestId, layoutVariant = "normal", zoomOnHover = false, aspectRatio = "none", growWithContainer = false, handleClick }) => {
|
|
87
|
+
const finalVariant = variant ?? productCardConfig?.variant ?? "filled";
|
|
88
|
+
const finalHoverVariant = hoverVariant ?? productCardConfig?.hoverVariant ?? "backgroundDark";
|
|
89
|
+
const finalLayoutVariant = layoutVariant ?? productCardConfig?.layoutVariant ?? "normal";
|
|
90
|
+
const pricePrefix = productCardConfig?.pricePrefix;
|
|
91
|
+
if (productCardConfig == null) {
|
|
92
|
+
logger_default.logError("[ProductCard] productCardConfig is null", void 0, { merchant: merchantShortName });
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
const layoutClasses = productCardLayoutVariantClasses[finalLayoutVariant];
|
|
96
|
+
const containerClassnames = classNames("spiffy-tw-cursor-pointer", "spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-inherit", "spiffy-tw-overflow-hidden", {
|
|
97
|
+
"spiffy-tw-h-full": growWithContainer,
|
|
98
|
+
"spiffy-tw-w-full": growWithContainer,
|
|
99
|
+
"spiffy-tw-max-w-full": growWithContainer
|
|
100
|
+
}, !growWithContainer && layoutClasses.container, variantClassMap.get(finalVariant) ?? [], variantHoverClassMap.get(finalHoverVariant) ?? []);
|
|
101
|
+
const verticalContainerVariantClasses = productCardLayoutVariantClasses[layoutVariant].verticalContainer;
|
|
102
|
+
const verticalContainerClassnames = classNames("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-overflow-hidden", "spiffy-tw-gap-inherit", {
|
|
103
|
+
"spiffy-tw-h-full": growWithContainer,
|
|
104
|
+
"spiffy-tw-w-full": growWithContainer,
|
|
105
|
+
"spiffy-tw-flex-1": growWithContainer
|
|
106
|
+
}, ...!growWithContainer && layoutVariant ? verticalContainerVariantClasses : []);
|
|
107
|
+
const linkClassnames = classNames({
|
|
108
|
+
"spiffy-tw-w-full": true,
|
|
109
|
+
"spiffy-tw-h-full": true,
|
|
110
|
+
"spiffy-tw-overflow-hidden": true,
|
|
111
|
+
"spiffy-tw-select-none": true
|
|
112
|
+
});
|
|
113
|
+
const imageClipContainerClassnames = classNames("spiffy-tw-w-full", "spiffy-tw-overflow-hidden", {
|
|
114
|
+
"spiffy-tw-flex-shrink-0": growWithContainer,
|
|
115
|
+
"spiffy-tw-tw-h-full": !growWithContainer
|
|
116
|
+
}, aspectRatio === "3:4" ? "spiffy-tw-aspect-[3/4]" : "", aspectRatio === "square" ? "spiffy-tw-aspect-square" : "");
|
|
117
|
+
const imageContainerClassnames = classNames(linkClassnames, zoomOnHover ? [
|
|
118
|
+
"spiffy-tw-transition-transform",
|
|
119
|
+
"spiffy-tw-duration-200",
|
|
120
|
+
"spiffy-tw-origin-top",
|
|
121
|
+
"hover:spiffy-tw-scale-105"
|
|
122
|
+
] : []);
|
|
123
|
+
const contentClassnames = classNames("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" });
|
|
124
|
+
const productTitleClassnames = classNames("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);
|
|
125
|
+
const priceAndRatingContainerClassnames = classNames("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");
|
|
126
|
+
const imageClassnames = classNames("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");
|
|
127
|
+
return /* @__PURE__ */ jsx("div", {
|
|
128
|
+
className: containerClassnames,
|
|
129
|
+
"data-testid": dataTestId,
|
|
130
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
131
|
+
href: url,
|
|
132
|
+
onClick: () => handleClick(url || ""),
|
|
133
|
+
target: "_self",
|
|
134
|
+
draggable: false,
|
|
135
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
136
|
+
className: verticalContainerClassnames,
|
|
137
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
138
|
+
className: imageClipContainerClassnames,
|
|
139
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
140
|
+
className: imageContainerClassnames,
|
|
141
|
+
children: imageUrl && /* @__PURE__ */ jsx(ImageWithFallback, {
|
|
142
|
+
src: imageUrl,
|
|
143
|
+
alt: title,
|
|
144
|
+
fallback: /* @__PURE__ */ jsx(Spinner, { className: "spiffy-tw-w-6 spiffy-tw-h-6" }),
|
|
145
|
+
imageClassnames
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
149
|
+
className: contentClassnames,
|
|
150
|
+
children: [/* @__PURE__ */ jsx(Headline, {
|
|
151
|
+
variant: "h4",
|
|
152
|
+
className: productTitleClassnames,
|
|
153
|
+
children: title
|
|
154
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
155
|
+
className: priceAndRatingContainerClassnames,
|
|
156
|
+
children: [(originalPrice || salePrice) && /* @__PURE__ */ jsx(PriceSection, {
|
|
157
|
+
originalPrice: formatPrice(originalPrice),
|
|
158
|
+
salePrice: formatPrice(salePrice),
|
|
159
|
+
pricePrefix
|
|
160
|
+
}), averageRating && numberReviews && /* @__PURE__ */ jsx(RatingSummary, {
|
|
161
|
+
stars: averageRating,
|
|
162
|
+
reviewCount: numberReviews
|
|
163
|
+
})]
|
|
164
|
+
})]
|
|
165
|
+
})]
|
|
166
|
+
})
|
|
167
|
+
})
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
//#endregion
|
|
172
|
+
export { PriceSection, ProductCard, RatingSummary, formatPrice };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { TestProps } from "./types-Y0WKFOqS.js";
|
|
2
|
+
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant } from "./types-CmjqQWAG.js";
|
|
3
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/config/chatElementDisplayLocation.d.ts
|
|
6
|
+
declare enum ChatElementDisplayLocation {
|
|
7
|
+
IN_CHAT = "in_chat",
|
|
8
|
+
CHAT_PREVIEW = "chat_preview",
|
|
9
|
+
FLOATING_BUTTON = "floating_button",
|
|
10
|
+
HELP_ME_CHOOSE = "help_me_choose",
|
|
11
|
+
PLP_IMAGE_BANNER = "plp_image_banner",
|
|
12
|
+
TOP_REVIEWS_SNIPPET = "top_reviews_snippet",
|
|
13
|
+
BOTTOM_REVIEWS_SNIPPET = "bottom_reviews_snippet",
|
|
14
|
+
BLOCK_BACK_BUTTON = "block_back_button",
|
|
15
|
+
SWITCH_TO_AGENT = "switch_to_agent",
|
|
16
|
+
CONVERSATIONAL_SEARCH = "conversational_search",
|
|
17
|
+
GLOBAL_SEARCH_ENTRYPOINT = "global_search_entrypoint",
|
|
18
|
+
SEARCH_NAV_ENTRYPOINT = "search_nav_entrypoint",
|
|
19
|
+
SEARCH_PROMPT = "search_prompt",
|
|
20
|
+
SEARCH_PROMPT_BUTTON = "search_prompt_button",
|
|
21
|
+
PRODUCT_GRID = "product_grid",
|
|
22
|
+
UNSPECIFIED = "unspecified",
|
|
23
|
+
FILTER_MODAL = "filter_modal",
|
|
24
|
+
PROMPT_CARD = "prompt_card",
|
|
25
|
+
WINDOW_API_CALL = "window_api_call",
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/components/common/ProductCard/ProductCard.d.ts
|
|
29
|
+
interface RatingSummaryProps {
|
|
30
|
+
stars: number;
|
|
31
|
+
reviewCount: number;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
declare const RatingSummary: ({
|
|
35
|
+
stars,
|
|
36
|
+
reviewCount,
|
|
37
|
+
className
|
|
38
|
+
}: RatingSummaryProps) => react_jsx_runtime12.JSX.Element;
|
|
39
|
+
interface PriceSectionProps {
|
|
40
|
+
originalPrice?: string;
|
|
41
|
+
salePrice?: string;
|
|
42
|
+
pricePrefix?: string;
|
|
43
|
+
}
|
|
44
|
+
declare const PriceSection: ({
|
|
45
|
+
originalPrice,
|
|
46
|
+
salePrice,
|
|
47
|
+
pricePrefix
|
|
48
|
+
}: PriceSectionProps) => react_jsx_runtime12.JSX.Element;
|
|
49
|
+
interface ProductCardProps extends TestProps {
|
|
50
|
+
productCardConfig?: ProductCardConfig;
|
|
51
|
+
merchantShortName: string;
|
|
52
|
+
title: string;
|
|
53
|
+
url?: string;
|
|
54
|
+
searchResponseId?: string;
|
|
55
|
+
productResponseId?: string;
|
|
56
|
+
cardDisplayLocation: ChatElementDisplayLocation.IN_CHAT | ChatElementDisplayLocation.PRODUCT_GRID;
|
|
57
|
+
imageUrl?: string;
|
|
58
|
+
originalPrice?: number;
|
|
59
|
+
averageRating?: number;
|
|
60
|
+
numberReviews?: number;
|
|
61
|
+
salePrice?: number;
|
|
62
|
+
variant?: ProductCardVariant;
|
|
63
|
+
hoverVariant?: ProductCardHoverVariant;
|
|
64
|
+
layoutVariant?: ProductCardLayoutVariant;
|
|
65
|
+
zoomOnHover?: boolean;
|
|
66
|
+
aspectRatio?: '3:4' | 'square' | 'none';
|
|
67
|
+
clickPosition?: number | null;
|
|
68
|
+
growWithContainer?: boolean;
|
|
69
|
+
handleClick: (clickedUrl: string) => void;
|
|
70
|
+
}
|
|
71
|
+
declare const ProductCard: ({
|
|
72
|
+
productCardConfig,
|
|
73
|
+
merchantShortName,
|
|
74
|
+
imageUrl,
|
|
75
|
+
title,
|
|
76
|
+
url,
|
|
77
|
+
originalPrice,
|
|
78
|
+
averageRating,
|
|
79
|
+
numberReviews,
|
|
80
|
+
salePrice,
|
|
81
|
+
variant,
|
|
82
|
+
hoverVariant,
|
|
83
|
+
dataTestId,
|
|
84
|
+
layoutVariant,
|
|
85
|
+
zoomOnHover,
|
|
86
|
+
aspectRatio,
|
|
87
|
+
growWithContainer,
|
|
88
|
+
handleClick
|
|
89
|
+
}: ProductCardProps) => react_jsx_runtime12.JSX.Element;
|
|
90
|
+
//#endregion
|
|
91
|
+
export { ChatElementDisplayLocation, PriceSection, ProductCard, RatingSummary };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { TestProps } from "./types-TYhhwWZw.cjs";
|
|
2
|
+
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant } from "./types--SBcFTJX.cjs";
|
|
3
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/config/chatElementDisplayLocation.d.ts
|
|
6
|
+
declare enum ChatElementDisplayLocation {
|
|
7
|
+
IN_CHAT = "in_chat",
|
|
8
|
+
CHAT_PREVIEW = "chat_preview",
|
|
9
|
+
FLOATING_BUTTON = "floating_button",
|
|
10
|
+
HELP_ME_CHOOSE = "help_me_choose",
|
|
11
|
+
PLP_IMAGE_BANNER = "plp_image_banner",
|
|
12
|
+
TOP_REVIEWS_SNIPPET = "top_reviews_snippet",
|
|
13
|
+
BOTTOM_REVIEWS_SNIPPET = "bottom_reviews_snippet",
|
|
14
|
+
BLOCK_BACK_BUTTON = "block_back_button",
|
|
15
|
+
SWITCH_TO_AGENT = "switch_to_agent",
|
|
16
|
+
CONVERSATIONAL_SEARCH = "conversational_search",
|
|
17
|
+
GLOBAL_SEARCH_ENTRYPOINT = "global_search_entrypoint",
|
|
18
|
+
SEARCH_NAV_ENTRYPOINT = "search_nav_entrypoint",
|
|
19
|
+
SEARCH_PROMPT = "search_prompt",
|
|
20
|
+
SEARCH_PROMPT_BUTTON = "search_prompt_button",
|
|
21
|
+
PRODUCT_GRID = "product_grid",
|
|
22
|
+
UNSPECIFIED = "unspecified",
|
|
23
|
+
FILTER_MODAL = "filter_modal",
|
|
24
|
+
PROMPT_CARD = "prompt_card",
|
|
25
|
+
WINDOW_API_CALL = "window_api_call",
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/components/common/ProductCard/ProductCard.d.ts
|
|
29
|
+
interface RatingSummaryProps {
|
|
30
|
+
stars: number;
|
|
31
|
+
reviewCount: number;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
declare const RatingSummary: ({
|
|
35
|
+
stars,
|
|
36
|
+
reviewCount,
|
|
37
|
+
className
|
|
38
|
+
}: RatingSummaryProps) => react_jsx_runtime1.JSX.Element;
|
|
39
|
+
interface PriceSectionProps {
|
|
40
|
+
originalPrice?: string;
|
|
41
|
+
salePrice?: string;
|
|
42
|
+
pricePrefix?: string;
|
|
43
|
+
}
|
|
44
|
+
declare const PriceSection: ({
|
|
45
|
+
originalPrice,
|
|
46
|
+
salePrice,
|
|
47
|
+
pricePrefix
|
|
48
|
+
}: PriceSectionProps) => react_jsx_runtime1.JSX.Element;
|
|
49
|
+
interface ProductCardProps extends TestProps {
|
|
50
|
+
productCardConfig?: ProductCardConfig;
|
|
51
|
+
merchantShortName: string;
|
|
52
|
+
title: string;
|
|
53
|
+
url?: string;
|
|
54
|
+
searchResponseId?: string;
|
|
55
|
+
productResponseId?: string;
|
|
56
|
+
cardDisplayLocation: ChatElementDisplayLocation.IN_CHAT | ChatElementDisplayLocation.PRODUCT_GRID;
|
|
57
|
+
imageUrl?: string;
|
|
58
|
+
originalPrice?: number;
|
|
59
|
+
averageRating?: number;
|
|
60
|
+
numberReviews?: number;
|
|
61
|
+
salePrice?: number;
|
|
62
|
+
variant?: ProductCardVariant;
|
|
63
|
+
hoverVariant?: ProductCardHoverVariant;
|
|
64
|
+
layoutVariant?: ProductCardLayoutVariant;
|
|
65
|
+
zoomOnHover?: boolean;
|
|
66
|
+
aspectRatio?: '3:4' | 'square' | 'none';
|
|
67
|
+
clickPosition?: number | null;
|
|
68
|
+
growWithContainer?: boolean;
|
|
69
|
+
handleClick: (clickedUrl: string) => void;
|
|
70
|
+
}
|
|
71
|
+
declare const ProductCard: ({
|
|
72
|
+
productCardConfig,
|
|
73
|
+
merchantShortName,
|
|
74
|
+
imageUrl,
|
|
75
|
+
title,
|
|
76
|
+
url,
|
|
77
|
+
originalPrice,
|
|
78
|
+
averageRating,
|
|
79
|
+
numberReviews,
|
|
80
|
+
salePrice,
|
|
81
|
+
variant,
|
|
82
|
+
hoverVariant,
|
|
83
|
+
dataTestId,
|
|
84
|
+
layoutVariant,
|
|
85
|
+
zoomOnHover,
|
|
86
|
+
aspectRatio,
|
|
87
|
+
growWithContainer,
|
|
88
|
+
handleClick
|
|
89
|
+
}: ProductCardProps) => react_jsx_runtime1.JSX.Element;
|
|
90
|
+
//#endregion
|
|
91
|
+
export { ChatElementDisplayLocation, PriceSection, ProductCard, RatingSummary };
|