@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
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { HeadlineVariantMap } from '../Text/textVariantClasses';
|
|
4
|
-
export const Headline = ({ children, className, style, testId, variant = 'h1' }) => {
|
|
5
|
-
const variantClassNames = variant ? HeadlineVariantMap[variant] : {};
|
|
6
|
-
const textClassNames = classNames(className, variantClassNames, {
|
|
7
|
-
'spiffy-tw-font-[Poppins,sans-serif]': true,
|
|
8
|
-
});
|
|
9
|
-
const T1 = () => (_jsx("h1", { "data-testid": testId, className: textClassNames, style: style, children: children }));
|
|
10
|
-
const T2 = () => (_jsx("h2", { "data-testid": testId, className: textClassNames, style: style, children: children }));
|
|
11
|
-
const T3 = () => (_jsx("h3", { "data-testid": testId, className: textClassNames, style: style, children: children }));
|
|
12
|
-
const H1 = () => (_jsx("h1", { "data-testid": testId, className: textClassNames, style: style, children: children }));
|
|
13
|
-
const H2 = () => (_jsx("h2", { "data-testid": testId, className: textClassNames, style: style, children: children }));
|
|
14
|
-
const H3 = () => (_jsx("h3", { "data-testid": testId, className: textClassNames, style: style, children: children }));
|
|
15
|
-
const H4 = () => (_jsx("h4", { "data-testid": testId, className: textClassNames, style: style, children: children }));
|
|
16
|
-
switch (variant) {
|
|
17
|
-
case 't1':
|
|
18
|
-
return T1();
|
|
19
|
-
case 't2':
|
|
20
|
-
return T2();
|
|
21
|
-
case 't3':
|
|
22
|
-
return T3();
|
|
23
|
-
case 'h1':
|
|
24
|
-
return H1();
|
|
25
|
-
case 'h2':
|
|
26
|
-
return H2();
|
|
27
|
-
case 'h3':
|
|
28
|
-
return H3();
|
|
29
|
-
case 'h4':
|
|
30
|
-
return H4();
|
|
31
|
-
default:
|
|
32
|
-
throw new Error(`Invalid variant: ${variant}`);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface ImageWithFallbackProps {
|
|
3
|
-
src: string | undefined;
|
|
4
|
-
alt: string;
|
|
5
|
-
fallbackClassnames?: string;
|
|
6
|
-
fallback: React.ReactNode;
|
|
7
|
-
dataTestId?: string;
|
|
8
|
-
imageClassnames: string;
|
|
9
|
-
onLoad?: () => void;
|
|
10
|
-
onError?: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const ImageWithFallback: ({ src, alt, dataTestId, fallbackClassnames, fallback, imageClassnames, onLoad, onError, }: ImageWithFallbackProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
export const ImageWithFallback = ({ src, alt, dataTestId, fallbackClassnames, fallback, imageClassnames, onLoad, onError, }) => {
|
|
5
|
-
const [isLoaded, setIsLoaded] = useState(false);
|
|
6
|
-
const [isError, setIsError] = useState(false);
|
|
7
|
-
const imageExtraClassnames = classNames(imageClassnames, {
|
|
8
|
-
'spiffy-tw-block': isLoaded,
|
|
9
|
-
'spiffy-tw-hidden': !isLoaded,
|
|
10
|
-
});
|
|
11
|
-
const fallbackMergedClassNames = classNames({
|
|
12
|
-
'spiffy-tw-flex': true,
|
|
13
|
-
'spiffy-tw-flex-col': true,
|
|
14
|
-
'spiffy-tw-items-center': true,
|
|
15
|
-
}, fallbackClassnames);
|
|
16
|
-
if (isError) {
|
|
17
|
-
return _jsx("div", { className: fallbackMergedClassNames, children: fallback });
|
|
18
|
-
}
|
|
19
|
-
return (_jsxs(_Fragment, { children: [!isLoaded && _jsx("div", { className: fallbackMergedClassNames, children: fallback }), _jsx("img", { src: src, className: imageExtraClassnames, "data-testid": dataTestId, alt: alt, onLoad: () => {
|
|
20
|
-
setIsLoaded(true);
|
|
21
|
-
onLoad?.();
|
|
22
|
-
}, onError: () => {
|
|
23
|
-
setIsError(true);
|
|
24
|
-
onError?.();
|
|
25
|
-
} })] }));
|
|
26
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant } from './types';
|
|
2
|
-
import type { TestProps } from '../../../components/test/types';
|
|
3
|
-
import type { ChatElementDisplayLocation } from '../../../config/chatElementDisplayLocation';
|
|
4
|
-
interface RatingSummaryProps {
|
|
5
|
-
stars: number;
|
|
6
|
-
reviewCount: number;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const RatingSummary: ({ stars, reviewCount, className }: RatingSummaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
interface PriceSectionProps {
|
|
11
|
-
originalPrice?: string;
|
|
12
|
-
salePrice?: string;
|
|
13
|
-
pricePrefix?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const PriceSection: ({ originalPrice, salePrice, pricePrefix }: PriceSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
interface ProductCardProps extends TestProps {
|
|
17
|
-
productCardConfig?: ProductCardConfig;
|
|
18
|
-
merchantShortName: string;
|
|
19
|
-
title: string;
|
|
20
|
-
url?: string;
|
|
21
|
-
searchResponseId?: string;
|
|
22
|
-
productResponseId?: string;
|
|
23
|
-
cardDisplayLocation: ChatElementDisplayLocation.IN_CHAT | ChatElementDisplayLocation.PRODUCT_GRID;
|
|
24
|
-
imageUrl?: string;
|
|
25
|
-
originalPrice?: number;
|
|
26
|
-
averageRating?: number;
|
|
27
|
-
numberReviews?: number;
|
|
28
|
-
salePrice?: number;
|
|
29
|
-
variant?: ProductCardVariant;
|
|
30
|
-
hoverVariant?: ProductCardHoverVariant;
|
|
31
|
-
layoutVariant?: ProductCardLayoutVariant;
|
|
32
|
-
zoomOnHover?: boolean;
|
|
33
|
-
aspectRatio?: '3:4' | 'square' | 'none';
|
|
34
|
-
clickPosition?: number | null;
|
|
35
|
-
growWithContainer?: boolean;
|
|
36
|
-
handleClick: (clickedUrl: string) => void;
|
|
37
|
-
}
|
|
38
|
-
export declare const ProductCard: ({ productCardConfig, merchantShortName, imageUrl, title, url, originalPrice, averageRating, numberReviews, salePrice, variant, hoverVariant, dataTestId, layoutVariant, zoomOnHover, aspectRatio, growWithContainer, handleClick, }: ProductCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
-
export {};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { MdStar } from 'react-icons/md';
|
|
4
|
-
import { Text } from '../../../components/common/Text/Text';
|
|
5
|
-
import { variantClassMap, variantHoverClassMap, productCardLayoutVariantClasses, variantTitleColorMap, } from './productCardVariants';
|
|
6
|
-
import { Headline } from '../Headline/Headline';
|
|
7
|
-
import { ImageWithFallback } from '../../../components/common/ImageWithFallback/ImageWithFallback';
|
|
8
|
-
import Logger from '../../../logging/logger';
|
|
9
|
-
import { Spinner } from '../Spinner/Spinner';
|
|
10
|
-
import { formatPrice } from '../../../util/formatPrice';
|
|
11
|
-
const formatReviews = (stars) => String(Number(stars).toLocaleString('en-US', { minimumFractionDigits: 1, maximumFractionDigits: 1 }));
|
|
12
|
-
export const RatingSummary = ({ stars, reviewCount, className }) => {
|
|
13
|
-
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]');
|
|
14
|
-
const starClassnames = classNames('spiffy-product-card-rating-star-color', 'spiffy-tw-fill-[--spiffy-colors-accent-primary]', 'spiffy-tw-w-[14px]', 'spiffy-tw-h-[14px]');
|
|
15
|
-
return (_jsx("div", { className: className, children: _jsxs("div", { className: group, children: [_jsx(MdStar, { className: starClassnames }), _jsx(Text, { variant: "body3", children: formatReviews(stars) }), _jsxs(Text, { variant: "body3", children: ["(", reviewCount, ")"] })] }) }));
|
|
16
|
-
};
|
|
17
|
-
export const PriceSection = ({ originalPrice, salePrice, pricePrefix }) => {
|
|
18
|
-
if (!originalPrice)
|
|
19
|
-
return null;
|
|
20
|
-
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]');
|
|
21
|
-
const showSalePrice = salePrice && originalPrice !== salePrice;
|
|
22
|
-
return (_jsxs("div", { className: priceClassName, children: [pricePrefix && _jsx(Text, { children: pricePrefix }), showSalePrice && _jsx(Text, { children: salePrice }), _jsx(Text, { className: showSalePrice ? 'spiffy-tw-line-through' : '', children: originalPrice })] }));
|
|
23
|
-
};
|
|
24
|
-
export const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, url, originalPrice, averageRating, numberReviews, salePrice, variant, hoverVariant, dataTestId, layoutVariant = 'normal', zoomOnHover = false, aspectRatio = 'none', growWithContainer = false, handleClick, }) => {
|
|
25
|
-
// const orgUIConfig = useAtomValue(orgUIConfigAtom);
|
|
26
|
-
// const { productCardConfig } = orgUIConfig;
|
|
27
|
-
const finalVariant = variant ?? productCardConfig?.variant ?? 'filled';
|
|
28
|
-
const finalHoverVariant = hoverVariant ?? productCardConfig?.hoverVariant ?? 'backgroundDark';
|
|
29
|
-
const finalLayoutVariant = layoutVariant ?? productCardConfig?.layoutVariant ?? 'normal';
|
|
30
|
-
const pricePrefix = productCardConfig?.pricePrefix;
|
|
31
|
-
if (productCardConfig == null) {
|
|
32
|
-
Logger.logError('[ProductCard] productCardConfig is null', undefined, {
|
|
33
|
-
merchant: merchantShortName,
|
|
34
|
-
});
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
const layoutClasses = productCardLayoutVariantClasses[finalLayoutVariant];
|
|
38
|
-
const containerClassnames = classNames('spiffy-tw-cursor-pointer', 'spiffy-tw-flex', 'spiffy-tw-flex-col', 'spiffy-tw-gap-inherit', 'spiffy-tw-overflow-hidden', {
|
|
39
|
-
'spiffy-tw-h-full': growWithContainer,
|
|
40
|
-
'spiffy-tw-w-full': growWithContainer,
|
|
41
|
-
'spiffy-tw-max-w-full': growWithContainer,
|
|
42
|
-
}, !growWithContainer && layoutClasses.container, variantClassMap.get(finalVariant) ?? [], variantHoverClassMap.get(finalHoverVariant) ?? []);
|
|
43
|
-
const verticalContainerVariantClasses = productCardLayoutVariantClasses[layoutVariant].verticalContainer;
|
|
44
|
-
const verticalContainerClassnames = classNames('spiffy-tw-flex', 'spiffy-tw-flex-col', 'spiffy-tw-overflow-hidden', 'spiffy-tw-gap-inherit', {
|
|
45
|
-
'spiffy-tw-h-full': growWithContainer,
|
|
46
|
-
'spiffy-tw-w-full': growWithContainer,
|
|
47
|
-
'spiffy-tw-flex-1': growWithContainer,
|
|
48
|
-
}, ...(!growWithContainer && layoutVariant ? verticalContainerVariantClasses : []));
|
|
49
|
-
const linkClassnames = classNames({
|
|
50
|
-
'spiffy-tw-w-full': true,
|
|
51
|
-
'spiffy-tw-h-full': true,
|
|
52
|
-
'spiffy-tw-overflow-hidden': true,
|
|
53
|
-
'spiffy-tw-select-none': true,
|
|
54
|
-
});
|
|
55
|
-
// Fixed outer container that maintains size and clips overflow
|
|
56
|
-
// This is useful for zoomOnHover and aspect ratio enforcement
|
|
57
|
-
const imageClipContainerClassnames = classNames('spiffy-tw-w-full', 'spiffy-tw-overflow-hidden', // This clips any content that exceeds boundaries
|
|
58
|
-
{
|
|
59
|
-
'spiffy-tw-flex-shrink-0': growWithContainer,
|
|
60
|
-
'spiffy-tw-tw-h-full': !growWithContainer,
|
|
61
|
-
}, aspectRatio === '3:4' ? 'spiffy-tw-aspect-[3/4]' : '', aspectRatio === 'square' ? 'spiffy-tw-aspect-square' : '');
|
|
62
|
-
// Inner container that can scale for zoom effect
|
|
63
|
-
const imageContainerClassnames = classNames(linkClassnames, zoomOnHover
|
|
64
|
-
? [
|
|
65
|
-
'spiffy-tw-transition-transform',
|
|
66
|
-
'spiffy-tw-duration-200',
|
|
67
|
-
'spiffy-tw-origin-top',
|
|
68
|
-
'hover:spiffy-tw-scale-105',
|
|
69
|
-
]
|
|
70
|
-
: []);
|
|
71
|
-
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', {
|
|
72
|
-
'spiffy-tw-flex-grow-0': layoutVariant === 'tall' || layoutVariant === 'square',
|
|
73
|
-
});
|
|
74
|
-
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);
|
|
75
|
-
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');
|
|
76
|
-
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');
|
|
77
|
-
return (_jsx("div", { className: containerClassnames, "data-testid": dataTestId, children: _jsx("a", { href: url, onClick: () => handleClick(url || ''), target: "_self", draggable: false, children: _jsxs("div", { className: verticalContainerClassnames, children: [_jsx("div", { className: imageClipContainerClassnames, children: _jsx("div", { className: imageContainerClassnames, children: imageUrl && (_jsx(ImageWithFallback
|
|
78
|
-
// TODO: Fix once
|
|
79
|
-
// src={resolve(imageUrl, layoutVariant === 'tall' ? 300 : 178)}
|
|
80
|
-
, {
|
|
81
|
-
// TODO: Fix once
|
|
82
|
-
// src={resolve(imageUrl, layoutVariant === 'tall' ? 300 : 178)}
|
|
83
|
-
src: imageUrl, alt: title, fallback: _jsx(Spinner, { className: "spiffy-tw-w-6 spiffy-tw-h-6" }), imageClassnames: imageClassnames })) }) }), _jsxs("div", { className: contentClassnames, children: [_jsx(Headline, { variant: "h4", className: productTitleClassnames, children: title }), _jsxs("div", { className: priceAndRatingContainerClassnames, children: [(originalPrice || salePrice) && (_jsx(PriceSection, { originalPrice: formatPrice(originalPrice), salePrice: formatPrice(salePrice), pricePrefix: pricePrefix })), averageRating && numberReviews && (_jsx(RatingSummary, { stars: averageRating, reviewCount: numberReviews }))] })] })] }) }) }));
|
|
84
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
import { type ProductCardLayoutVariant } from './types';
|
|
3
|
-
interface ProductCardSkeletonProps {
|
|
4
|
-
layoutVariant: ProductCardLayoutVariant;
|
|
5
|
-
aspectRatio?: '3:4' | 'square' | 'none';
|
|
6
|
-
growWithContainer?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const ProductCardSkeleton: FC<ProductCardSkeletonProps>;
|
|
9
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { ProductCardSkeletonOverrides } from './types';
|
|
4
|
-
import { productCardLayoutVariantClasses } from './productCardVariants';
|
|
5
|
-
export const ProductCardSkeleton = ({ layoutVariant, aspectRatio, growWithContainer = false, }) => {
|
|
6
|
-
const finalLayoutVariant = layoutVariant || 'normal';
|
|
7
|
-
const layoutClasses = productCardLayoutVariantClasses[finalLayoutVariant];
|
|
8
|
-
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 : '');
|
|
9
|
-
const verticalContainerClasses = classNames('spiffy-tw-flex', 'spiffy-tw-flex-col', 'spiffy-tw-overflow-hidden', 'spiffy-tw-gap-inherit', !growWithContainer ? layoutClasses.verticalContainer : '');
|
|
10
|
-
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');
|
|
11
|
-
const imageSkeletonClasses = classNames('spiffy-tw-bg-[#F4F4F6]', 'spiffy-tw-animate-pulse', 'spiffy-tw-opacity-70', 'spiffy-tw-w-full', 'spiffy-tw-h-full');
|
|
12
|
-
const contentContainerClasses = classNames('spiffy-tw-flex', 'spiffy-tw-flex-col', 'spiffy-tw-gap-2', 'spiffy-tw-w-full', 'spiffy-tw-p-2');
|
|
13
|
-
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]');
|
|
14
|
-
return (_jsx("div", { className: containerClasses, children: _jsxs("div", { className: verticalContainerClasses, children: [_jsx("div", { className: imageClipContainerClasses, children: _jsx("div", { className: imageSkeletonClasses }) }), _jsxs("div", { className: contentContainerClasses, children: [_jsx("div", { className: classNames(textSkeletonClasses, 'spiffy-tw-w-full') }), _jsx("div", { className: classNames(textSkeletonClasses, 'spiffy-tw-w-[60%]') })] })] }) }));
|
|
15
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ProductCardVariant, ProductCardHoverVariant, ProductCardLayoutVariant } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Shared variant mapping configurations for ProductCard components
|
|
4
|
-
*/
|
|
5
|
-
export declare const variantClassMap: Map<ProductCardVariant, string[]>;
|
|
6
|
-
export declare const variantHoverClassMap: Map<ProductCardHoverVariant, string[]>;
|
|
7
|
-
export declare const variantTitleColorMap: Map<ProductCardVariant, string>;
|
|
8
|
-
export declare const productCardLayoutVariantClasses: Record<ProductCardLayoutVariant, Record<string, string[]>>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared variant mapping configurations for ProductCard components
|
|
3
|
-
*/
|
|
4
|
-
export const variantClassMap = new Map([
|
|
5
|
-
['filled', ['spiffy-tw-bg-[--spiffy-colors-background-secondary]', 'spiffy-tw-shadow-md']],
|
|
6
|
-
[
|
|
7
|
-
'bordered',
|
|
8
|
-
[
|
|
9
|
-
'spiffy-tw-bg-[--spiffy-colors-background-secondary]',
|
|
10
|
-
'spiffy-tw-border',
|
|
11
|
-
'spiffy-tw-border-[--spiffy-colors-border-light]',
|
|
12
|
-
],
|
|
13
|
-
],
|
|
14
|
-
['minimal', ['spiffy-tw-bg-transparent']],
|
|
15
|
-
[
|
|
16
|
-
'transparentBordered',
|
|
17
|
-
[
|
|
18
|
-
'spiffy-tw-bg-transparent',
|
|
19
|
-
'spiffy-tw-border',
|
|
20
|
-
'spiffy-tw-border-[--spiffy-colors-border-light]',
|
|
21
|
-
],
|
|
22
|
-
],
|
|
23
|
-
]);
|
|
24
|
-
export const variantHoverClassMap = new Map([
|
|
25
|
-
['backgroundDark', ['hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]']],
|
|
26
|
-
['none', []],
|
|
27
|
-
]);
|
|
28
|
-
export const variantTitleColorMap = new Map([
|
|
29
|
-
['filled', 'spiffy-tw-text-[--spiffy-colors-text-link]'],
|
|
30
|
-
['bordered', 'spiffy-tw-text-[--spiffy-colors-text-primary]'],
|
|
31
|
-
['minimal', 'spiffy-tw-text-[--spiffy-colors-text-primary]'],
|
|
32
|
-
['transparentBordered', 'spiffy-tw-text-[--spiffy-colors-text-primary]'],
|
|
33
|
-
]);
|
|
34
|
-
export const productCardLayoutVariantClasses = {
|
|
35
|
-
normal: {
|
|
36
|
-
productTitle: ['spiffy-product-card-title'],
|
|
37
|
-
container: ['spiffy-tw-w-[208px]'],
|
|
38
|
-
verticalContainer: ['spiffy-tw-rounded-[8px]', 'spiffy-tw-h-[268px]'],
|
|
39
|
-
},
|
|
40
|
-
tall: {
|
|
41
|
-
productTitle: ['spiffy-product-card-title-tall', 'spiffy-tw-pt-[8px]'],
|
|
42
|
-
container: ['spiffy-tw-w-[160px] lg:spiffy-tw-w-[300px]'],
|
|
43
|
-
verticalContainer: ['lg:spiffy-tw-h-[496px]'],
|
|
44
|
-
},
|
|
45
|
-
square: {
|
|
46
|
-
productTitle: ['spiffy-product-card-title-tall', 'spiffy-tw-pt-[8px]'],
|
|
47
|
-
container: ['spiffy-tw-w-[160px] lg:spiffy-tw-w-[280px]'],
|
|
48
|
-
verticalContainer: ['lg:spiffy-tw-h-[400px]'],
|
|
49
|
-
},
|
|
50
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { ResponseCategory, SearchResponseProduct } from '../../../types/external';
|
|
2
|
-
import type { CamelCasedPropertiesDeep } from '../../../util/camelCasedPropertiesDeep';
|
|
3
|
-
export declare enum ProductCardSkeletonOverrides {
|
|
4
|
-
PRODUCT_CARD_SKELETON_CONTAINER = "spiffy-product-card-skeleton-container",
|
|
5
|
-
PRODUCT_CARD_SKELETON = "spiffy-product-card-skeleton"
|
|
6
|
-
}
|
|
7
|
-
export declare enum AnimatedProductCardOverrides {
|
|
8
|
-
PRODUCT_CARD_ANIMATED_CONTAINER = "spiffy-product-card-animated-container",
|
|
9
|
-
PRODUCT_CARD_ANIMATED_IMAGE_CONTAINER = "spiffy-product-card-animated"
|
|
10
|
-
}
|
|
11
|
-
export type ProductGridVariant = 'standard' | 'square';
|
|
12
|
-
export type ProductCardVariant = 'filled' | 'bordered' | 'minimal' | 'transparentBordered';
|
|
13
|
-
export type ProductCardHoverVariant = 'backgroundDark' | 'none';
|
|
14
|
-
export type ProductCardLayoutVariant = 'normal' | 'tall' | 'square';
|
|
15
|
-
export type ProductCardImageAspectRatio = '1/1' | '4/3' | '3/4' | '16/9' | '9/16';
|
|
16
|
-
export interface ProductCardConfig {
|
|
17
|
-
variant: ProductCardVariant;
|
|
18
|
-
hoverVariant: ProductCardHoverVariant;
|
|
19
|
-
layoutVariant: ProductCardLayoutVariant;
|
|
20
|
-
pricePrefix?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface SearchResponseProductAttributes {
|
|
23
|
-
category: ResponseCategory.Product;
|
|
24
|
-
attributes: CamelCasedPropertiesDeep<SearchResponseProduct>;
|
|
25
|
-
}
|
|
26
|
-
export interface ProductCardSkeletonProps {
|
|
27
|
-
layoutVariant: ProductCardLayoutVariant;
|
|
28
|
-
aspectRatio: ProductCardImageAspectRatio;
|
|
29
|
-
growWithContainer?: boolean;
|
|
30
|
-
}
|
|
31
|
-
export interface ProductGridProps {
|
|
32
|
-
productList: SearchResponseProductAttributes['attributes'][];
|
|
33
|
-
productGridVariant: ProductGridVariant;
|
|
34
|
-
productGridClasses: string;
|
|
35
|
-
productCardConfig?: ProductCardConfig;
|
|
36
|
-
merchantShortName: string;
|
|
37
|
-
searchResponseId: string;
|
|
38
|
-
cardsGrowWithContainer?: boolean;
|
|
39
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export var ProductCardSkeletonOverrides;
|
|
2
|
-
(function (ProductCardSkeletonOverrides) {
|
|
3
|
-
ProductCardSkeletonOverrides["PRODUCT_CARD_SKELETON_CONTAINER"] = "spiffy-product-card-skeleton-container";
|
|
4
|
-
ProductCardSkeletonOverrides["PRODUCT_CARD_SKELETON"] = "spiffy-product-card-skeleton";
|
|
5
|
-
})(ProductCardSkeletonOverrides || (ProductCardSkeletonOverrides = {}));
|
|
6
|
-
export var AnimatedProductCardOverrides;
|
|
7
|
-
(function (AnimatedProductCardOverrides) {
|
|
8
|
-
AnimatedProductCardOverrides["PRODUCT_CARD_ANIMATED_CONTAINER"] = "spiffy-product-card-animated-container";
|
|
9
|
-
AnimatedProductCardOverrides["PRODUCT_CARD_ANIMATED_IMAGE_CONTAINER"] = "spiffy-product-card-animated";
|
|
10
|
-
})(AnimatedProductCardOverrides || (AnimatedProductCardOverrides = {}));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ProductCardConfig, ProductGridVariant } from '../ProductCard/types';
|
|
2
|
-
import { SearchResponseProduct } from '../../../types/external';
|
|
3
|
-
interface ProductGridProps {
|
|
4
|
-
productList: SearchResponseProduct[];
|
|
5
|
-
productGridVariant: ProductGridVariant;
|
|
6
|
-
productGridClasses: string;
|
|
7
|
-
productCardConfig?: ProductCardConfig;
|
|
8
|
-
merchantShortName: string;
|
|
9
|
-
searchResponseId: string;
|
|
10
|
-
cardsGrowWithContainer?: boolean;
|
|
11
|
-
handleClick: (clickedUrl: string) => void;
|
|
12
|
-
}
|
|
13
|
-
export declare const ProductGrid: ({ productList, productGridVariant, productGridClasses, productCardConfig, merchantShortName, searchResponseId, cardsGrowWithContainer, handleClick, }: ProductGridProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ProductCard } from '../ProductCard/ProductCard';
|
|
3
|
-
import { productGridVariantClasses } from './productGridVariants';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import { ChatElementDisplayLocation } from '../../../config/chatElementDisplayLocation';
|
|
6
|
-
export const ProductGrid = ({ productList, productGridVariant, productGridClasses, productCardConfig, merchantShortName, searchResponseId, cardsGrowWithContainer = true, handleClick, }) => {
|
|
7
|
-
const { productCardVariant, productCardHoverVariant, productCardLayoutVariant, productCardImageAspectRatio, zoomOnHover, } = productGridVariantClasses[productGridVariant];
|
|
8
|
-
const cardContainerClasses = classNames({
|
|
9
|
-
'spiffy-tw-w-full': cardsGrowWithContainer,
|
|
10
|
-
'spiffy-tw-h-full': cardsGrowWithContainer,
|
|
11
|
-
});
|
|
12
|
-
return (_jsx("div", { className: productGridClasses, children: productList.map((product, index) => (_jsx("div", { className: cardContainerClasses, children: _jsx(ProductCard, { productCardConfig: productCardConfig, merchantShortName: merchantShortName, imageUrl: product.imageUrl, searchResponseId: searchResponseId, productResponseId: product.responseId, title: product.title, url: product.url, originalPrice: product.originalPrice, salePrice: product.salePrice, averageRating: product.averageRating, numberReviews: product.numberReviews, cardDisplayLocation: ChatElementDisplayLocation.PRODUCT_GRID, layoutVariant: productCardLayoutVariant, variant: productCardVariant, hoverVariant: productCardHoverVariant, zoomOnHover: zoomOnHover, aspectRatio: productCardImageAspectRatio, clickPosition: index, growWithContainer: cardsGrowWithContainer, handleClick: handleClick }, product.id) }, product.id))) }));
|
|
13
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant, ProductGridVariant } from '../ProductCard/types';
|
|
2
|
-
interface ProductGridVariantClasses {
|
|
3
|
-
productCardVariant: ProductCardVariant;
|
|
4
|
-
productCardHoverVariant: ProductCardHoverVariant;
|
|
5
|
-
productCardLayoutVariant: ProductCardLayoutVariant;
|
|
6
|
-
productCardImageAspectRatio: '3:4' | 'square' | 'none';
|
|
7
|
-
zoomOnHover: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const productGridVariantClasses: Record<ProductGridVariant, ProductGridVariantClasses>;
|
|
10
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export const productGridVariantClasses = {
|
|
2
|
-
standard: {
|
|
3
|
-
productCardVariant: 'minimal',
|
|
4
|
-
productCardHoverVariant: 'backgroundDark',
|
|
5
|
-
productCardLayoutVariant: 'tall',
|
|
6
|
-
productCardImageAspectRatio: '3:4',
|
|
7
|
-
zoomOnHover: true,
|
|
8
|
-
},
|
|
9
|
-
square: {
|
|
10
|
-
productCardVariant: 'minimal',
|
|
11
|
-
productCardHoverVariant: 'backgroundDark',
|
|
12
|
-
productCardLayoutVariant: 'square',
|
|
13
|
-
productCardImageAspectRatio: 'square',
|
|
14
|
-
zoomOnHover: true,
|
|
15
|
-
},
|
|
16
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
|
-
import { motion } from 'framer-motion';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import FourPointStar from '@envive-ai/react-icons/src/FourPointStar';
|
|
6
|
-
import { SparkleAnimationOverride } from './types';
|
|
7
|
-
// Animation timing constants
|
|
8
|
-
const ANIMATION_CYCLE_TIME = 1000; // 1 second between cycles
|
|
9
|
-
const STAR_DELAY_OFFSET = 250; // 250ms delay between each star
|
|
10
|
-
export const SparkleAnimation = ({ color, className, animate = true }) => {
|
|
11
|
-
// Star visibility states - start visible if not animating, invisible if animating
|
|
12
|
-
const [mainStarScale, setMainStarScale] = useState(animate ? 0 : 1);
|
|
13
|
-
const [smallStar1Scale, setSmallStar1Scale] = useState(animate ? 0 : 1);
|
|
14
|
-
const [smallStar2Scale, setSmallStar2Scale] = useState(animate ? 0 : 1);
|
|
15
|
-
// Container: 24px x 24px with relative positioning
|
|
16
|
-
const containerClasses = classNames(SparkleAnimationOverride.CONTAINER, 'spiffy-tw-w-6 spiffy-tw-h-6 spiffy-tw-relative', className);
|
|
17
|
-
// When animation is disabled, ensure all stars are visible
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
if (!animate) {
|
|
20
|
-
setMainStarScale(1);
|
|
21
|
-
setSmallStar1Scale(1);
|
|
22
|
-
setSmallStar2Scale(1);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
}, [animate]);
|
|
26
|
-
// Animation cycle effect
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
if (!animate)
|
|
29
|
-
return;
|
|
30
|
-
// Toggle between visible (1) and invisible (0)
|
|
31
|
-
const newScale = mainStarScale === 1 ? 0 : 1;
|
|
32
|
-
// Stagger the star animations
|
|
33
|
-
setTimeout(() => setMainStarScale(newScale), ANIMATION_CYCLE_TIME);
|
|
34
|
-
setTimeout(() => setSmallStar1Scale(newScale), ANIMATION_CYCLE_TIME + STAR_DELAY_OFFSET);
|
|
35
|
-
setTimeout(() => setSmallStar2Scale(newScale), ANIMATION_CYCLE_TIME + 2 * STAR_DELAY_OFFSET);
|
|
36
|
-
}, [mainStarScale, animate]);
|
|
37
|
-
// Animation transition settings
|
|
38
|
-
const starTransition = { duration: 0.3, ease: 'easeOut' };
|
|
39
|
-
return (_jsxs("div", { className: containerClasses, children: [_jsx("div", { className: classNames(SparkleAnimationOverride.STAR_ONE_CONTAINER, 'spiffy-tw-absolute -spiffy-tw-top-[2px] spiffy-tw-left-0'), children: _jsx(motion.div, { animate: { scale: mainStarScale }, transition: starTransition, children: _jsx(FourPointStar, { fill: color, className: "spiffy-tw-w-4 spiffy-tw-h-4 spiffy-tw-inline-block" }) }) }), _jsx("div", { className: classNames(SparkleAnimationOverride.STAR_TWO_CONTAINER, 'spiffy-tw-absolute -spiffy-tw-top-[7px] spiffy-tw-left-[10px]'), children: _jsx(motion.div, { animate: { scale: smallStar1Scale }, transition: starTransition, children: _jsx(FourPointStar, { fill: color, className: "spiffy-tw-w-2 spiffy-tw-h-2 spiffy-tw-inline-block" }) }) }), _jsx("div", { className: classNames(SparkleAnimationOverride.STAR_THREE_CONTAINER, 'spiffy-tw-absolute spiffy-tw-top-[1px] spiffy-tw-left-[12px]'), children: _jsx(motion.div, { animate: { scale: smallStar2Scale }, transition: starTransition, children: _jsx(FourPointStar, { fill: color, className: "spiffy-tw-w-2 spiffy-tw-h-2 spiffy-tw-inline-block" }) }) })] }));
|
|
40
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare enum SparkleAnimationOverride {
|
|
2
|
-
CONTAINER = "spiffy-sparkle-animation-container",
|
|
3
|
-
STAR_ONE_CONTAINER = "spiffy-sparkle-animation-star-one-container",
|
|
4
|
-
STAR_TWO_CONTAINER = "spiffy-sparkle-animation-star-two-container",
|
|
5
|
-
STAR_THREE_CONTAINER = "spiffy-sparkle-animation-star-three-container"
|
|
6
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export var SparkleAnimationOverride;
|
|
2
|
-
(function (SparkleAnimationOverride) {
|
|
3
|
-
SparkleAnimationOverride["CONTAINER"] = "spiffy-sparkle-animation-container";
|
|
4
|
-
SparkleAnimationOverride["STAR_ONE_CONTAINER"] = "spiffy-sparkle-animation-star-one-container";
|
|
5
|
-
SparkleAnimationOverride["STAR_TWO_CONTAINER"] = "spiffy-sparkle-animation-star-two-container";
|
|
6
|
-
SparkleAnimationOverride["STAR_THREE_CONTAINER"] = "spiffy-sparkle-animation-star-three-container";
|
|
7
|
-
})(SparkleAnimationOverride || (SparkleAnimationOverride = {}));
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
export const Spinner = ({ className }) => {
|
|
4
|
-
const svgClassnames = classNames({
|
|
5
|
-
'spiffy-tw-w-4': true,
|
|
6
|
-
'spiffy-tw-h-4': true,
|
|
7
|
-
'spiffy-tw-text-gray-200': true,
|
|
8
|
-
'spiffy-tw-animate-spin': true,
|
|
9
|
-
'spiffy-tw-dark:text-gray-600': true,
|
|
10
|
-
'spiffy-tw-fill-black': true,
|
|
11
|
-
}, className);
|
|
12
|
-
const spanClassnames = classNames({
|
|
13
|
-
'spiffy-tw-sr-only': true,
|
|
14
|
-
});
|
|
15
|
-
return (_jsxs("div", { role: "status", children: [_jsxs("svg", { "aria-hidden": "true", className: svgClassnames, viewBox: "0 0 100 101", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z", fill: "currentColor" }), _jsx("path", { d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z", fill: "currentFill" })] }), _jsx("span", { className: spanClassnames, children: "Loading..." })] }));
|
|
16
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { SuggestionButtonVariant } from './types';
|
|
2
|
-
import { TestProps } from '../../test/types';
|
|
3
|
-
export declare const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = "spiffy-suggestion-button-question-class";
|
|
4
|
-
export declare const SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = "spiffy-suggestion-button-answer-class";
|
|
5
|
-
export declare const SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = "spiffy-suggestion-button-text-class";
|
|
6
|
-
interface SuggestionButtonProps extends TestProps {
|
|
7
|
-
variant: SuggestionButtonVariant;
|
|
8
|
-
hoverVariant: SuggestionButtonVariant;
|
|
9
|
-
isDisabled: boolean;
|
|
10
|
-
content: string;
|
|
11
|
-
boldText?: boolean;
|
|
12
|
-
borderRadius?: 'sm' | 'md' | 'lg';
|
|
13
|
-
isAnswer?: boolean;
|
|
14
|
-
dataAttributes?: Record<string, string>;
|
|
15
|
-
onClick: () => void;
|
|
16
|
-
}
|
|
17
|
-
export declare const SuggestionButton: ({ variant, hoverVariant, isDisabled, content, boldText, borderRadius, isAnswer, dataAttributes, dataTestId, onClick, }: SuggestionButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export {};
|