@envive-ai/react-toolkit 0.2.13 → 0.3.0
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/{chunk-CbDLau6x.cjs → _virtual/rolldown_runtime.cjs} +1 -6
- package/dist/{types--eyQnaEA.d.cts → atoms/search/types.d.cts} +1 -1
- package/dist/{types-CQpdBL3M.d.ts → atoms/search/types.d.ts} +1 -1
- package/dist/{Accordion-Bc3o-NjV.cjs → components/Accordion/Accordion.cjs} +6 -10
- package/dist/components/Accordion/{index-DJOd-3Pi.d.ts → Accordion.d.cts} +2 -2
- package/dist/components/Accordion/{index-D_7-KJa0.d.cts → Accordion.d.ts} +2 -2
- package/dist/{Accordion-D8Vm8J1y.js → components/Accordion/Accordion.js} +3 -2
- package/dist/components/Accordion/index.cjs +1 -2
- package/dist/components/Accordion/index.d.cts +2 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Accordion/index.js +1 -2
- package/dist/{AnimatedChevron-BKQrUKb5.cjs → components/AnimatedChevron/AnimatedChevron.cjs} +2 -7
- package/dist/components/AnimatedChevron/{index-BfdaL9eW.d.cts → AnimatedChevron.d.cts} +2 -2
- package/dist/components/AnimatedChevron/{index-bNdUYDzX.d.ts → AnimatedChevron.d.ts} +2 -2
- package/dist/{AnimatedChevron-DghLnmlM.js → components/AnimatedChevron/AnimatedChevron.js} +1 -1
- package/dist/components/AnimatedChevron/index.cjs +1 -1
- package/dist/components/AnimatedChevron/index.d.cts +2 -0
- package/dist/components/AnimatedChevron/index.d.ts +2 -0
- package/dist/components/AnimatedChevron/index.js +1 -1
- package/dist/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.cjs +45 -0
- package/dist/components/AppliedFiltersScrollbar/{index-B68Mx16E.d.cts → AppliedFiltersScrollbar.d.cts} +3 -3
- package/dist/components/AppliedFiltersScrollbar/{index-B9u7XRmf.d.ts → AppliedFiltersScrollbar.d.ts} +3 -3
- package/dist/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.js +42 -0
- package/dist/components/AppliedFiltersScrollbar/index.cjs +2 -43
- package/dist/components/AppliedFiltersScrollbar/index.d.cts +2 -0
- package/dist/components/AppliedFiltersScrollbar/index.d.ts +2 -0
- package/dist/components/AppliedFiltersScrollbar/index.js +1 -39
- package/dist/{ButtonBase-Bm_QOyM1.cjs → components/ButtonBase/ButtonBase.cjs} +12 -29
- package/dist/components/ButtonBase/ButtonBase.d.cts +18 -0
- package/dist/components/ButtonBase/ButtonBase.d.ts +18 -0
- package/dist/{ButtonBase-CT397aT3.js → components/ButtonBase/ButtonBase.js} +8 -14
- package/dist/components/ButtonBase/index.cjs +3 -4
- package/dist/components/ButtonBase/index.d.cts +3 -0
- package/dist/components/ButtonBase/index.d.ts +3 -0
- package/dist/components/ButtonBase/index.js +2 -3
- package/dist/components/ButtonBase/types.cjs +11 -0
- package/dist/components/ButtonBase/{index-3ltL6jhO.d.ts → types.d.cts} +4 -19
- package/dist/components/ButtonBase/{index-CcVRnbuQ.d.cts → types.d.ts} +4 -19
- package/dist/components/ButtonBase/types.js +10 -0
- package/dist/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.cjs +33 -0
- package/dist/components/DynamicFiltersScrollbar/{index-B_a6Oebn.d.ts → DynamicFiltersScrollbar.d.cts} +2 -2
- package/dist/components/DynamicFiltersScrollbar/{index-B483Jhki.d.cts → DynamicFiltersScrollbar.d.ts} +2 -2
- package/dist/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.js +30 -0
- package/dist/components/DynamicFiltersScrollbar/index.cjs +2 -31
- package/dist/components/DynamicFiltersScrollbar/index.d.cts +2 -0
- package/dist/components/DynamicFiltersScrollbar/index.d.ts +2 -0
- package/dist/components/DynamicFiltersScrollbar/index.js +1 -27
- package/dist/{DynamicFiltersScrollbar-bT3VoG-D.cjs → components/FilterScrollbar/AppliedFiltersScrollbar.cjs} +6 -39
- package/dist/components/FilterScrollbar/AppliedFiltersScrollbar.d.cts +22 -0
- package/dist/components/FilterScrollbar/AppliedFiltersScrollbar.d.ts +22 -0
- package/dist/{DynamicFiltersScrollbar-CibstqNd.js → components/FilterScrollbar/AppliedFiltersScrollbar.js} +3 -25
- package/dist/components/FilterScrollbar/DynamicFiltersScrollbar.cjs +33 -0
- package/dist/components/FilterScrollbar/DynamicFiltersScrollbar.d.cts +28 -0
- package/dist/components/FilterScrollbar/DynamicFiltersScrollbar.d.ts +28 -0
- package/dist/components/FilterScrollbar/DynamicFiltersScrollbar.js +30 -0
- package/dist/components/FilterScrollbar/index.cjs +3 -3
- package/dist/components/FilterScrollbar/index.d.cts +3 -0
- package/dist/components/FilterScrollbar/index.d.ts +3 -0
- package/dist/components/FilterScrollbar/index.js +2 -2
- package/dist/{ImageWithFallback-BiBjNK-9.cjs → components/ImageWithFallback/ImageWithFallback.cjs} +4 -9
- package/dist/components/ImageWithFallback/{index-Dk89vxqv.d.cts → ImageWithFallback.d.cts} +2 -2
- package/dist/components/ImageWithFallback/{index-CCWzf6ZV.d.ts → ImageWithFallback.d.ts} +2 -2
- package/dist/{ImageWithFallback-_QZT0EKI.js → components/ImageWithFallback/ImageWithFallback.js} +1 -1
- package/dist/components/ImageWithFallback/index.cjs +1 -1
- package/dist/components/ImageWithFallback/index.d.cts +2 -0
- package/dist/components/ImageWithFallback/index.d.ts +2 -0
- package/dist/components/ImageWithFallback/index.js +1 -1
- package/dist/components/ModalSheet/ModalSheet.cjs +30 -0
- package/dist/components/ModalSheet/ModalSheet.d.cts +15 -0
- package/dist/components/ModalSheet/ModalSheet.d.ts +15 -0
- package/dist/components/ModalSheet/ModalSheet.js +29 -0
- package/dist/components/ModalSheet/desktop/desktopHeader.cjs +26 -0
- package/dist/components/ModalSheet/desktop/desktopHeader.js +24 -0
- package/dist/components/ModalSheet/desktop/index.cjs +122 -0
- package/dist/components/ModalSheet/desktop/index.js +120 -0
- package/dist/components/ModalSheet/index.cjs +1 -2
- package/dist/components/ModalSheet/index.d.cts +2 -0
- package/dist/components/ModalSheet/index.d.ts +2 -0
- package/dist/components/ModalSheet/index.js +1 -2
- package/dist/components/ModalSheet/mobile/index.cjs +116 -0
- package/dist/components/ModalSheet/mobile/index.js +114 -0
- package/dist/components/ModalSheet/mobile/mobileHeader.cjs +38 -0
- package/dist/components/ModalSheet/mobile/mobileHeader.js +36 -0
- package/dist/components/ModalSheet/{index-C_8baIZK.d.cts → types.d.cts} +1 -14
- package/dist/components/ModalSheet/{index-CI0qFVA7.d.ts → types.d.ts} +1 -14
- package/dist/{ProductCard-C3seoFWE.cjs → components/ProductCard/ProductCard.cjs} +19 -171
- package/dist/components/ProductCard/ProductCard.d.cts +64 -0
- package/dist/components/ProductCard/ProductCard.d.ts +64 -0
- package/dist/{ProductCard-ChitHvuc.js → components/ProductCard/ProductCard.js} +10 -105
- package/dist/components/ProductCard/ProductCardSkeleton.cjs +33 -0
- package/dist/components/ProductCard/ProductCardSkeleton.d.cts +7 -0
- package/dist/components/ProductCard/ProductCardSkeleton.d.ts +7 -0
- package/dist/components/ProductCard/ProductCardSkeleton.js +31 -0
- package/dist/components/ProductCard/index.cjs +11 -12
- package/dist/components/ProductCard/index.d.cts +5 -0
- package/dist/components/ProductCard/index.d.ts +5 -0
- package/dist/components/ProductCard/index.js +4 -5
- package/dist/components/ProductCard/productCardVariants.cjs +49 -0
- package/dist/components/ProductCard/productCardVariants.d.cts +13 -0
- package/dist/components/ProductCard/productCardVariants.d.ts +13 -0
- package/dist/components/ProductCard/productCardVariants.js +45 -0
- package/dist/components/ProductCard/types.cjs +16 -0
- package/dist/components/ProductCard/types.d.cts +43 -0
- package/dist/components/ProductCard/types.d.ts +43 -0
- package/dist/components/ProductCard/types.js +14 -0
- package/dist/{ProductGrid-Ct2DvLGf.cjs → components/ProductGrid/ProductGrid.cjs} +7 -35
- package/dist/components/ProductGrid/ProductGrid.d.cts +25 -0
- package/dist/components/ProductGrid/ProductGrid.d.ts +25 -0
- package/dist/{ProductGrid-DukHo_KY.js → components/ProductGrid/ProductGrid.js} +4 -21
- package/dist/components/ProductGrid/index.cjs +3 -7
- package/dist/components/ProductGrid/index.d.cts +3 -0
- package/dist/components/ProductGrid/index.d.ts +3 -0
- package/dist/components/ProductGrid/index.js +2 -6
- package/dist/components/ProductGrid/productGridVariants.cjs +21 -0
- package/dist/components/ProductGrid/productGridVariants.d.cts +13 -0
- package/dist/components/ProductGrid/productGridVariants.d.ts +13 -0
- package/dist/components/ProductGrid/productGridVariants.js +20 -0
- package/dist/{RadioButton-D4TPq1Aa.cjs → components/RadioButton/RadioButton.cjs} +5 -9
- package/dist/components/RadioButton/{index-BWo-a19v.d.ts → RadioButton.d.cts} +3 -3
- package/dist/components/RadioButton/{index-DsVASVAv.d.cts → RadioButton.d.ts} +3 -3
- package/dist/{RadioButton-C1w7N40t.js → components/RadioButton/RadioButton.js} +3 -2
- package/dist/components/RadioButton/index.cjs +1 -2
- package/dist/components/RadioButton/index.d.cts +2 -0
- package/dist/components/RadioButton/index.d.ts +2 -0
- package/dist/components/RadioButton/index.js +1 -2
- package/dist/{RadioButtonGroup-BhZloLH6.cjs → components/RadioButtonGroup/RadioButtonGroup.cjs} +6 -15
- package/dist/components/RadioButtonGroup/{index-CiljmnzJ.d.cts → RadioButtonGroup.d.cts} +3 -3
- package/dist/components/RadioButtonGroup/{index-DdyMuFCX.d.ts → RadioButtonGroup.d.ts} +3 -3
- package/dist/{RadioButtonGroup-BWQ4-m2M.js → components/RadioButtonGroup/RadioButtonGroup.js} +3 -2
- package/dist/components/RadioButtonGroup/index.cjs +1 -3
- package/dist/components/RadioButtonGroup/index.d.cts +2 -0
- package/dist/components/RadioButtonGroup/index.d.ts +2 -0
- package/dist/components/RadioButtonGroup/index.js +1 -3
- package/dist/{RecommendedProducts-Cy-1szYc.cjs → components/RecommendedProducts/RecommendedProducts.cjs} +7 -10
- package/dist/components/RecommendedProducts/{index-DlbCfGof.d.ts → RecommendedProducts.d.cts} +2 -2
- package/dist/components/RecommendedProducts/{index-BFM83Qu3.d.cts → RecommendedProducts.d.ts} +2 -2
- package/dist/{RecommendedProducts-DooGvLFT.js → components/RecommendedProducts/RecommendedProducts.js} +5 -3
- package/dist/components/RecommendedProducts/index.cjs +1 -7
- package/dist/components/RecommendedProducts/index.d.cts +2 -0
- package/dist/components/RecommendedProducts/index.d.ts +2 -0
- package/dist/components/RecommendedProducts/index.js +1 -7
- package/dist/{SearchAutocomplete-C1XH39Xx.cjs → components/SearchAutocomplete/SearchAutocomplete.cjs} +7 -11
- package/dist/components/SearchAutocomplete/{index-OVMqT8K4.d.cts → SearchAutocomplete.d.cts} +2 -2
- package/dist/components/SearchAutocomplete/{index-BBUrFTl5.d.ts → SearchAutocomplete.d.ts} +2 -2
- package/dist/{SearchAutocomplete-CuuN0cDu.js → components/SearchAutocomplete/SearchAutocomplete.js} +3 -2
- package/dist/components/SearchAutocomplete/index.cjs +1 -2
- package/dist/components/SearchAutocomplete/index.d.cts +2 -0
- package/dist/components/SearchAutocomplete/index.d.ts +2 -0
- package/dist/components/SearchAutocomplete/index.js +1 -2
- package/dist/components/SearchFilter/SearchFilter.cjs +134 -0
- package/dist/components/SearchFilter/SearchFilter.d.cts +23 -0
- package/dist/components/SearchFilter/SearchFilter.d.ts +23 -0
- package/dist/components/SearchFilter/SearchFilter.js +132 -0
- package/dist/components/SearchFilter/SearchFilterFooter.cjs +48 -0
- package/dist/components/SearchFilter/SearchFilterFooter.d.cts +14 -0
- package/dist/components/SearchFilter/SearchFilterFooter.d.ts +14 -0
- package/dist/components/SearchFilter/SearchFilterFooter.js +46 -0
- package/dist/components/SearchFilter/SearchFilterHeader.cjs +42 -0
- package/dist/components/SearchFilter/SearchFilterHeader.d.cts +12 -0
- package/dist/components/SearchFilter/SearchFilterHeader.d.ts +12 -0
- package/dist/components/SearchFilter/SearchFilterHeader.js +40 -0
- package/dist/components/SearchFilter/SearchFilterItem.cjs +41 -0
- package/dist/components/SearchFilter/SearchFilterItem.d.cts +13 -0
- package/dist/components/SearchFilter/SearchFilterItem.d.ts +13 -0
- package/dist/components/SearchFilter/SearchFilterItem.js +39 -0
- package/dist/components/SearchFilter/index.cjs +10 -15
- package/dist/components/SearchFilter/index.d.cts +6 -0
- package/dist/components/SearchFilter/index.d.ts +6 -0
- package/dist/components/SearchFilter/index.js +5 -10
- package/dist/components/SearchFilter/types.d.cts +42 -0
- package/dist/components/SearchFilter/types.d.ts +42 -0
- package/dist/components/SearchFilter/useHasFilterStateChanged.cjs +27 -0
- package/dist/components/SearchFilter/useHasFilterStateChanged.js +26 -0
- package/dist/components/SearchFilter/utils.cjs +11 -0
- package/dist/components/SearchFilter/utils.d.cts +7 -0
- package/dist/components/SearchFilter/utils.d.ts +7 -0
- package/dist/components/SearchFilter/utils.js +9 -0
- package/dist/{SearchInput-Cgsjew8Q.cjs → components/SearchInput/SearchInput.cjs} +10 -32
- package/dist/components/SearchInput/SearchInput.d.cts +20 -0
- package/dist/components/SearchInput/SearchInput.d.ts +20 -0
- package/dist/{SearchInput-DE9Iz7A8.js → components/SearchInput/SearchInput.js} +4 -15
- package/dist/components/SearchInput/index.cjs +3 -5
- package/dist/components/SearchInput/index.d.cts +3 -0
- package/dist/components/SearchInput/index.d.ts +3 -0
- package/dist/components/SearchInput/index.js +2 -4
- package/dist/components/SearchInput/searchInputVariants.cjs +15 -0
- package/dist/components/SearchInput/searchInputVariants.d.cts +16 -0
- package/dist/components/SearchInput/searchInputVariants.d.ts +16 -0
- package/dist/components/SearchInput/searchInputVariants.js +15 -0
- package/dist/{SearchInputForm-CSd4tjts.cjs → components/SearchInputForm/SearchInputForm.cjs} +8 -11
- package/dist/components/SearchInputForm/{index-D1F37qNH.d.ts → SearchInputForm.d.cts} +3 -3
- package/dist/components/SearchInputForm/{index-B3A17s3e.d.cts → SearchInputForm.d.ts} +3 -3
- package/dist/{SearchInputForm--CvVrjwl.js → components/SearchInputForm/SearchInputForm.js} +5 -3
- package/dist/components/SearchInputForm/index.cjs +1 -6
- package/dist/components/SearchInputForm/index.d.cts +2 -0
- package/dist/components/SearchInputForm/index.d.ts +2 -0
- package/dist/components/SearchInputForm/index.js +1 -6
- package/dist/components/SearchResultsContent/SearchResultsContent.cjs +52 -0
- package/dist/components/SearchResultsContent/{index-B66EnbgF.d.cts → SearchResultsContent.d.cts} +6 -6
- package/dist/components/SearchResultsContent/{index-BI4Dm7mI.d.ts → SearchResultsContent.d.ts} +6 -6
- package/dist/components/SearchResultsContent/SearchResultsContent.js +50 -0
- package/dist/components/SearchResultsContent/index.cjs +2 -59
- package/dist/components/SearchResultsContent/index.d.cts +2 -0
- package/dist/components/SearchResultsContent/index.d.ts +2 -0
- package/dist/components/SearchResultsContent/index.js +1 -56
- package/dist/{SearchResultsFilterButton-BQqm4icD.cjs → components/SearchResultsFilterButton/SearchResultsFilterButton.cjs} +6 -10
- package/dist/components/SearchResultsFilterButton/{index-CCVZZUTR.d.cts → SearchResultsFilterButton.d.cts} +2 -2
- package/dist/{SearchResultsFilterButton-CV11UTGi.js → components/SearchResultsFilterButton/SearchResultsFilterButton.js} +4 -3
- package/dist/components/SearchResultsFilterButton/index.cjs +1 -4
- package/dist/components/SearchResultsFilterButton/index.d.cts +2 -0
- package/dist/components/SearchResultsFilterButton/index.d.ts +2 -0
- package/dist/components/SearchResultsFilterButton/index.js +1 -4
- package/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.cjs +36 -0
- package/dist/components/SearchResultsFilterModal/{index-CMWDFJWT.d.cts → SearchResultsFilterModal.d.cts} +4 -4
- package/dist/components/SearchResultsFilterModal/{index-Ba84MNoM.d.ts → SearchResultsFilterModal.d.ts} +4 -4
- package/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.js +35 -0
- package/dist/components/SearchResultsFilterModal/index.cjs +2 -43
- package/dist/components/SearchResultsFilterModal/index.d.cts +2 -0
- package/dist/components/SearchResultsFilterModal/index.d.ts +2 -0
- package/dist/components/SearchResultsFilterModal/index.js +1 -41
- package/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.cjs +51 -0
- package/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.d.cts +27 -0
- package/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +27 -0
- package/dist/{SearchResultsFilterSidebar-ydSo1S6h.js → components/SearchResultsFilterSidebar/SearchResultsFilter.js} +9 -72
- package/dist/components/SearchResultsFilterSidebar/index.cjs +3 -14
- package/dist/components/SearchResultsFilterSidebar/index.d.cts +4 -0
- package/dist/components/SearchResultsFilterSidebar/index.d.ts +4 -0
- package/dist/components/SearchResultsFilterSidebar/index.js +2 -13
- package/dist/{searchFilterSidebarVariants-C61Byr1S.cjs → components/SearchResultsFilterSidebar/searchFilterSidebarVariants.cjs} +2 -7
- package/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.cts +19 -0
- package/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts +19 -0
- package/dist/{searchFilterSidebarVariants-DcwlBfvY.js → components/SearchResultsFilterSidebar/searchFilterSidebarVariants.js} +2 -2
- package/dist/components/SearchResultsFilterSidebar/types.d.cts +5 -0
- package/dist/components/SearchResultsFilterSidebar/types.d.ts +5 -0
- package/dist/components/SearchResultsStates/NoSearchResultsFound.cjs +57 -0
- package/dist/components/SearchResultsStates/NoSearchResultsFound.d.cts +25 -0
- package/dist/components/SearchResultsStates/NoSearchResultsFound.d.ts +25 -0
- package/dist/components/SearchResultsStates/NoSearchResultsFound.js +54 -0
- package/dist/components/SearchResultsStates/SearchResultsGrid.cjs +53 -0
- package/dist/components/SearchResultsStates/SearchResultsGrid.d.cts +46 -0
- package/dist/components/SearchResultsStates/SearchResultsGrid.d.ts +46 -0
- package/dist/components/SearchResultsStates/SearchResultsGrid.js +51 -0
- package/dist/components/SearchResultsStates/SearchResultsLoadingGrid.cjs +52 -0
- package/dist/components/SearchResultsStates/SearchResultsLoadingGrid.d.cts +15 -0
- package/dist/components/SearchResultsStates/SearchResultsLoadingGrid.d.ts +15 -0
- package/dist/components/SearchResultsStates/SearchResultsLoadingGrid.js +51 -0
- package/dist/components/SearchResultsStates/index.cjs +6 -15
- package/dist/components/SearchResultsStates/index.d.cts +4 -0
- package/dist/components/SearchResultsStates/index.d.ts +4 -0
- package/dist/components/SearchResultsStates/index.js +3 -12
- package/dist/components/SearchResultsToolbar/SearchResultsToolbar.cjs +60 -0
- package/dist/components/SearchResultsToolbar/{index-M8RkRW3H.d.cts → SearchResultsToolbar.d.cts} +3 -3
- package/dist/components/SearchResultsToolbar/{index-_hxKcDDT.d.ts → SearchResultsToolbar.d.ts} +3 -3
- package/dist/components/SearchResultsToolbar/SearchResultsToolbar.js +57 -0
- package/dist/components/SearchResultsToolbar/index.cjs +2 -64
- package/dist/components/SearchResultsToolbar/index.d.cts +2 -0
- package/dist/components/SearchResultsToolbar/index.d.ts +2 -0
- package/dist/components/SearchResultsToolbar/index.js +1 -60
- package/dist/{SparkleAnimation-Bg5qax1t.cjs → components/SparkleAnimation/SparkleAnimation.cjs} +9 -29
- package/dist/components/SparkleAnimation/SparkleAnimation.d.cts +15 -0
- package/dist/components/SparkleAnimation/SparkleAnimation.d.ts +15 -0
- package/dist/{SparkleAnimation-HY4cgwE3.js → components/SparkleAnimation/SparkleAnimation.js} +2 -11
- package/dist/components/SparkleAnimation/index.cjs +3 -2
- package/dist/components/SparkleAnimation/index.d.cts +3 -0
- package/dist/components/SparkleAnimation/index.d.ts +3 -0
- package/dist/components/SparkleAnimation/index.js +2 -1
- package/dist/components/SparkleAnimation/types.cjs +12 -0
- package/dist/components/SparkleAnimation/types.d.cts +9 -0
- package/dist/components/SparkleAnimation/types.d.ts +9 -0
- package/dist/components/SparkleAnimation/types.js +11 -0
- package/dist/{Spinner-CUrXDajS.cjs → components/Spinner/Spinner.cjs} +3 -8
- package/dist/components/Spinner/{index-C876igqb.d.ts → Spinner.d.cts} +2 -2
- package/dist/components/Spinner/{index-DrYhRG9D.d.cts → Spinner.d.ts} +2 -2
- package/dist/{Spinner-CDDFWySo.js → components/Spinner/Spinner.js} +1 -1
- package/dist/components/Spinner/index.cjs +1 -1
- package/dist/components/Spinner/index.d.cts +2 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/SuggestionButton/SuggestionButton.cjs +195 -0
- package/dist/components/SuggestionButton/{index-CrGSb18s.d.ts → SuggestionButton.d.cts} +6 -8
- package/dist/components/SuggestionButton/{index-DfQRQGev.d.cts → SuggestionButton.d.ts} +6 -8
- package/dist/components/SuggestionButton/SuggestionButton.js +188 -0
- package/dist/components/SuggestionButton/index.cjs +5 -192
- package/dist/components/SuggestionButton/index.d.cts +3 -0
- package/dist/components/SuggestionButton/index.d.ts +3 -0
- package/dist/components/SuggestionButton/index.js +1 -184
- package/dist/components/SuggestionButton/types.d.cts +4 -0
- package/dist/components/SuggestionButton/types.d.ts +4 -0
- package/dist/{TextInput-DfCocKVm.cjs → components/TextInput/TextInput.cjs} +7 -11
- package/dist/components/TextInput/{index-CkQtHiR9.d.ts → TextInput.d.cts} +1 -2
- package/dist/components/TextInput/{index-CRJMRe-b.d.cts → TextInput.d.ts} +1 -2
- package/dist/{TextInput-PtrUXoZo.js → components/TextInput/TextInput.js} +3 -2
- package/dist/components/TextInput/index.cjs +1 -2
- package/dist/components/TextInput/index.d.cts +2 -0
- package/dist/components/TextInput/index.d.ts +2 -0
- package/dist/components/TextInput/index.js +1 -2
- package/dist/{ToggleButton-BhBEOjxO.cjs → components/ToggleButton/ToggleButton.cjs} +5 -9
- package/dist/components/ToggleButton/{index-CpURpMq5.d.cts → ToggleButton.d.ts} +2 -2
- package/dist/{ToggleButton-BTz_zIdc.js → components/ToggleButton/ToggleButton.js} +3 -2
- package/dist/components/ToggleButton/index.cjs +1 -2
- package/dist/components/ToggleButton/index.d.cts +2 -0
- package/dist/components/ToggleButton/index.d.ts +2 -0
- package/dist/components/ToggleButton/index.js +1 -2
- package/dist/components/Typography/Typography.cjs +53 -0
- package/dist/{index-Cr8VXccr.d.ts → components/Typography/Typography.d.cts} +2 -2
- package/dist/{index-Bw6lDfEp.d.cts → components/Typography/Typography.d.ts} +2 -2
- package/dist/components/Typography/Typography.js +50 -0
- package/dist/components/Typography/index.cjs +5 -4
- package/dist/components/Typography/index.d.cts +3 -0
- package/dist/components/Typography/index.d.ts +3 -0
- package/dist/components/Typography/index.js +2 -1
- package/dist/{Typography-xehJH05l.js → components/Typography/typographyVariantClasses.cjs} +3 -54
- package/dist/{typographyVariantClasses-CoRhazCU.d.cts → components/Typography/typographyVariantClasses.d.cts} +1 -1
- package/dist/{typographyVariantClasses-CrT5OfVw.d.ts → components/Typography/typographyVariantClasses.d.ts} +1 -1
- package/dist/{Typography-Csg-nd_w.cjs → components/Typography/typographyVariantClasses.js} +1 -81
- package/dist/components/Typography/util.cjs +10 -0
- package/dist/components/Typography/util.js +10 -0
- package/dist/hooks/dist/application/models/api/response.d.cts +11 -0
- package/dist/hooks/dist/application/models/api/response.d.ts +11 -0
- package/dist/hooks/dist/application/models/colorsConfig.d.cts +24 -0
- package/dist/hooks/dist/application/models/colorsConfig.d.ts +24 -0
- package/dist/hooks/dist/application/models/utilityTypes/camelCase.d.cts +71 -0
- package/dist/hooks/dist/application/models/utilityTypes/camelCase.d.ts +71 -0
- package/dist/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.cts +58 -0
- package/dist/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts +58 -0
- package/dist/hooks/dist/application/models/utilityTypes/internal.d.cts +22 -0
- package/dist/hooks/dist/application/models/utilityTypes/internal.d.ts +22 -0
- package/dist/hooks/dist/application/models/utilityTypes/splitWords.d.cts +31 -0
- package/dist/hooks/dist/application/models/utilityTypes/splitWords.d.ts +31 -0
- package/dist/hooks/dist/application/models/utilityTypes/trim.d.cts +30 -0
- package/dist/hooks/dist/application/models/utilityTypes/trim.d.ts +30 -0
- package/dist/hooks/dist/application/models/utilityTypes/unknownArray.d.cts +30 -0
- package/dist/hooks/dist/application/models/utilityTypes/unknownArray.d.ts +30 -0
- package/dist/hooks/dist/atoms/search/searchAPI.d.cts +11 -0
- package/dist/hooks/dist/atoms/search/searchAPI.d.ts +11 -0
- package/dist/hooks/dist/contexts/types.d.cts +17 -0
- package/dist/hooks/dist/contexts/types.d.ts +17 -0
- package/dist/hooks/dist/hooks/utils.d.cts +9 -0
- package/dist/hooks/dist/hooks/utils.d.ts +9 -0
- package/dist/hooks/dist/types/search-filter-types.d.cts +36 -0
- package/dist/hooks/dist/types/search-filter-types.d.ts +36 -0
- package/dist/hooks/dist/types/test-types.d.cts +8 -0
- package/dist/hooks/dist/types/test-types.d.ts +8 -0
- package/dist/logging/logger.cjs +20 -0
- package/dist/logging/logger.js +19 -0
- package/dist/{colorsConfig-D-MZuBvt.cjs → models/colorsConfig.cjs} +2 -12
- package/dist/{colorsConfig-BjdoRtRK.js → models/colorsConfig.js} +1 -1
- package/dist/util/camelCase.d.cts +69 -0
- package/dist/util/camelCase.d.ts +69 -0
- package/dist/util/camelCasedPropertiesDeep.d.cts +55 -0
- package/dist/util/camelCasedPropertiesDeep.d.ts +55 -0
- package/dist/util/colorVar.cjs +6 -0
- package/dist/util/colorVar.d.cts +6 -0
- package/dist/util/colorVar.d.ts +6 -0
- package/dist/util/colorVar.js +5 -0
- package/dist/{formatPrice-CyfkjZ3R.cjs → util/formatPrice.cjs} +1 -6
- package/dist/util/formatPrice.d.cts +4 -0
- package/dist/util/formatPrice.d.ts +4 -0
- package/dist/{formatPrice-DexQu2aZ.js → util/formatPrice.js} +1 -1
- package/dist/util/index.cjs +7 -78
- package/dist/util/index.d.cts +5 -0
- package/dist/util/index.d.ts +5 -0
- package/dist/util/index.js +4 -74
- package/dist/util/internal.d.cts +22 -0
- package/dist/util/internal.d.ts +22 -0
- package/dist/util/splitWords.d.cts +28 -0
- package/dist/util/splitWords.d.ts +28 -0
- package/dist/util/trim.d.cts +28 -0
- package/dist/util/trim.d.ts +28 -0
- package/dist/util/unknownArray.d.cts +28 -0
- package/dist/util/unknownArray.d.ts +28 -0
- package/dist/util/useScrollDirection.cjs +39 -0
- package/dist/util/useScrollDirection.d.cts +5 -0
- package/dist/util/useScrollDirection.d.ts +5 -0
- package/dist/util/useScrollDirection.js +38 -0
- package/dist/util/useStickyVisibility.cjs +38 -0
- package/dist/util/useStickyVisibility.d.cts +10 -0
- package/dist/util/useStickyVisibility.d.ts +10 -0
- package/dist/util/useStickyVisibility.js +37 -0
- package/package.json +3 -2
- package/src/components/ButtonBase/ButtonBase.tsx +3 -5
- package/src/components/ButtonBase/types.ts +3 -3
- package/src/components/ModalSheet/common/closeIcon.tsx +3 -6
- package/src/components/ProductCard/ProductCard.tsx +2 -2
- package/src/components/SearchFilter/types.ts +2 -0
- package/src/components/SearchResultsFilterButton/SearchResultsFilterButton.tsx +1 -1
- package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +2 -2
- package/src/components/SuggestionButton/SuggestionButton.tsx +17 -12
- package/src/stories/ButtonBase.stories.tsx +1 -1
- package/src/stories/ProductCardSkeleton.stories.tsx +46 -16
- package/src/stories/SearchResultsFilter.stories.tsx +2 -2
- package/dist/ButtonBase-BIXx56hq.cjs +0 -0
- package/dist/ButtonBase-C9fn-c5h.js +0 -1
- package/dist/ModalSheet-BuCtRDnQ.cjs +0 -308
- package/dist/ModalSheet-DVrY7Mw0.js +0 -301
- package/dist/SearchFilter-CnP71PTj.cjs +0 -301
- package/dist/SearchFilter-DsYF1A5n.js +0 -264
- package/dist/SearchResultsFilterSidebar-U6dFy-Jo.cjs +0 -118
- package/dist/SearchResultsStates-BCeqeo9y.js +0 -138
- package/dist/SearchResultsStates-Dp-AsmH8.cjs +0 -158
- package/dist/components/FilterScrollbar/index-BmHm47DA.d.cts +0 -47
- package/dist/components/FilterScrollbar/index-CISEdkBM.d.ts +0 -47
- package/dist/components/ProductCard/index-D5om2RVT.d.ts +0 -2
- package/dist/components/ProductCard/index-Djjvdeh7.d.cts +0 -2
- package/dist/components/ProductGrid/index-AxMBGLVk.d.ts +0 -35
- package/dist/components/ProductGrid/index-C4Tz_KWs.d.cts +0 -35
- package/dist/components/SearchFilter/index-BDaLJW2Q.d.cts +0 -91
- package/dist/components/SearchFilter/index-DESOqSJQ.d.ts +0 -91
- package/dist/components/SearchInput/index-UY0W77Y0.d.ts +0 -34
- package/dist/components/SearchInput/index-rFDdhvqg.d.cts +0 -34
- package/dist/components/SearchResultsFilterSidebar/index-DmO55w4A.d.ts +0 -2
- package/dist/components/SearchResultsFilterSidebar/index-Dtr9q9hT.d.cts +0 -2
- package/dist/components/SearchResultsStates/index-Ba3tQMCI.d.ts +0 -78
- package/dist/components/SearchResultsStates/index-DN1-g87W.d.cts +0 -78
- package/dist/components/SparkleAnimation/index-BMrS1PDU.d.cts +0 -23
- package/dist/components/SparkleAnimation/index-t59eI0td.d.ts +0 -23
- package/dist/components/Typography/index-DE1Nhjra.d.ts +0 -3
- package/dist/components/Typography/index-DzSBreyM.d.cts +0 -3
- package/dist/index-1GZFptEC.d.cts +0 -325
- package/dist/index-CBI4Lqsm.d.cts +0 -46
- package/dist/index-pZZXXUG_.d.ts +0 -46
- package/dist/index-yDKT5Bem.d.ts +0 -325
- package/dist/util/index-C2ueYGXh.d.ts +0 -21
- package/dist/util/index-DUzbpjPa.d.cts +0 -21
- /package/dist/components/SearchResultsFilterButton/{index-Cjq_NOxx.d.ts → SearchResultsFilterButton.d.ts} +0 -0
- /package/dist/components/ToggleButton/{index-DFz4kch0.d.ts → ToggleButton.d.cts} +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AnimatedChevron } from "../../AnimatedChevron/AnimatedChevron.js";
|
|
2
|
+
import { motion, useMotionValue } from "framer-motion";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ModalSheet/mobile/mobileHeader.tsx
|
|
7
|
+
const modalSheetVariants = { primary: {
|
|
8
|
+
"spiffy-tw-bg-[--spiffy-colors-background-primary]": true,
|
|
9
|
+
"spiffy-tw-text-[--spiffy-colors-text-light]": true
|
|
10
|
+
} };
|
|
11
|
+
const ModalSheetMobileHeader = ({ headerVariant = "primary", headerContent, handleHeaderClick, chevronColor }) => {
|
|
12
|
+
const animationKey = useMotionValue(-1);
|
|
13
|
+
const headerClassName = classNames({
|
|
14
|
+
"spiffy-modal-sheet-header": true,
|
|
15
|
+
"spiffy-tw-flex": true,
|
|
16
|
+
"spiffy-tw-items-center": true,
|
|
17
|
+
"spiffy-tw-justify-between": true,
|
|
18
|
+
"spiffy-tw-w-full": true,
|
|
19
|
+
"spiffy-tw-flex-col": true,
|
|
20
|
+
"spiffy-tw-pt-[16px]": true,
|
|
21
|
+
"spiffy-tw-shadow-[0px_-8px_16px_0px_#0000001A]": true,
|
|
22
|
+
...modalSheetVariants[headerVariant]
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ jsxs(motion.div, {
|
|
25
|
+
className: headerClassName,
|
|
26
|
+
onTouchStart: handleHeaderClick,
|
|
27
|
+
onMouseDown: handleHeaderClick,
|
|
28
|
+
children: [/* @__PURE__ */ jsx(AnimatedChevron, {
|
|
29
|
+
animationKey,
|
|
30
|
+
chevronColor
|
|
31
|
+
}), headerContent]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { ModalSheetMobileHeader };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
1
|
//#region src/components/ModalSheet/types.d.ts
|
|
4
2
|
type ModalSheetProps = {
|
|
5
3
|
children: React.ReactNode;
|
|
@@ -24,15 +22,4 @@ type ModalSheetFooterProps = {
|
|
|
24
22
|
};
|
|
25
23
|
type ModalSheetHeaderVariant = 'primary';
|
|
26
24
|
//#endregion
|
|
27
|
-
|
|
28
|
-
declare const ModalSheet: ({
|
|
29
|
-
children,
|
|
30
|
-
isOpen,
|
|
31
|
-
closeModal,
|
|
32
|
-
animationDuration,
|
|
33
|
-
desktopWidth,
|
|
34
|
-
headerProps,
|
|
35
|
-
footerProps
|
|
36
|
-
}: ModalSheetProps) => react_jsx_runtime3.JSX.Element;
|
|
37
|
-
//#endregion
|
|
38
|
-
export { ModalSheet };
|
|
25
|
+
export { ModalSheetProps };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime25 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
1
|
//#region src/components/ModalSheet/types.d.ts
|
|
4
2
|
type ModalSheetProps = {
|
|
5
3
|
children: React.ReactNode;
|
|
@@ -24,15 +22,4 @@ type ModalSheetFooterProps = {
|
|
|
24
22
|
};
|
|
25
23
|
type ModalSheetHeaderVariant = 'primary';
|
|
26
24
|
//#endregion
|
|
27
|
-
|
|
28
|
-
declare const ModalSheet: ({
|
|
29
|
-
children,
|
|
30
|
-
isOpen,
|
|
31
|
-
closeModal,
|
|
32
|
-
animationDuration,
|
|
33
|
-
desktopWidth,
|
|
34
|
-
headerProps,
|
|
35
|
-
footerProps
|
|
36
|
-
}: ModalSheetProps) => react_jsx_runtime25.JSX.Element;
|
|
37
|
-
//#endregion
|
|
38
|
-
export { ModalSheet };
|
|
25
|
+
export { ModalSheetProps };
|
|
@@ -1,77 +1,20 @@
|
|
|
1
|
-
const
|
|
2
|
-
const require_formatPrice = require('
|
|
3
|
-
const require_Typography = require('
|
|
4
|
-
|
|
5
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_formatPrice = require('../../util/formatPrice.cjs');
|
|
3
|
+
const require_Typography = require('../Typography/Typography.cjs');
|
|
4
|
+
require('../Typography/index.cjs');
|
|
5
|
+
const require_logger = require('../../logging/logger.cjs');
|
|
6
|
+
const require_productCardVariants = require('./productCardVariants.cjs');
|
|
7
|
+
const require_ImageWithFallback = require('../ImageWithFallback/ImageWithFallback.cjs');
|
|
8
|
+
require('../ImageWithFallback/index.cjs');
|
|
9
|
+
const require_Spinner = require('../Spinner/Spinner.cjs');
|
|
10
|
+
require('../Spinner/index.cjs');
|
|
6
11
|
let classnames = require("classnames");
|
|
7
|
-
classnames =
|
|
12
|
+
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
8
13
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
14
|
let react_icons_md = require("react-icons/md");
|
|
10
15
|
let __envive_ai_react_hooks_hooks_ImageResolver = require("@envive-ai/react-hooks/hooks/ImageResolver");
|
|
11
16
|
let __envive_ai_react_hooks_config = require("@envive-ai/react-hooks/config");
|
|
12
17
|
|
|
13
|
-
//#region src/logging/logger.ts
|
|
14
|
-
var Logger = class {
|
|
15
|
-
static logInfo(message, ...args) {
|
|
16
|
-
console.info(`INFO: ${message}`, ...args);
|
|
17
|
-
}
|
|
18
|
-
static logDebug(message, ...args) {
|
|
19
|
-
console.debug(`DEBUG: ${message}`, ...args);
|
|
20
|
-
}
|
|
21
|
-
static logError(message, error, ...args) {
|
|
22
|
-
console.error(`ERROR: ${message} error=${error}`, args);
|
|
23
|
-
}
|
|
24
|
-
static logWarn(message, error, ...args) {
|
|
25
|
-
console.warn(`WARN: ${message} error=${error}`, args);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
var logger_default = Logger;
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region src/components/ProductCard/productCardVariants.ts
|
|
32
|
-
/**
|
|
33
|
-
* Shared variant mapping configurations for ProductCard components
|
|
34
|
-
*/
|
|
35
|
-
const variantClassMap = new Map([
|
|
36
|
-
["filled", ["spiffy-tw-bg-[--spiffy-colors-background-secondary]", "spiffy-tw-shadow-md"]],
|
|
37
|
-
["bordered", [
|
|
38
|
-
"spiffy-tw-bg-[--spiffy-colors-background-secondary]",
|
|
39
|
-
"spiffy-tw-border",
|
|
40
|
-
"spiffy-tw-border-[--spiffy-colors-border-light]"
|
|
41
|
-
]],
|
|
42
|
-
["minimal", ["spiffy-tw-bg-transparent"]],
|
|
43
|
-
["transparentBordered", [
|
|
44
|
-
"spiffy-tw-bg-transparent",
|
|
45
|
-
"spiffy-tw-border",
|
|
46
|
-
"spiffy-tw-border-[--spiffy-colors-border-light]"
|
|
47
|
-
]]
|
|
48
|
-
]);
|
|
49
|
-
const variantHoverClassMap = new Map([["backgroundDark", ["hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]"]], ["none", []]]);
|
|
50
|
-
const variantTitleColorMap = new Map([
|
|
51
|
-
["filled", "spiffy-tw-text-[--spiffy-colors-text-link]"],
|
|
52
|
-
["bordered", "spiffy-tw-text-[--spiffy-colors-text-primary]"],
|
|
53
|
-
["minimal", "spiffy-tw-text-[--spiffy-colors-text-primary]"],
|
|
54
|
-
["transparentBordered", "spiffy-tw-text-[--spiffy-colors-text-primary]"]
|
|
55
|
-
]);
|
|
56
|
-
const productCardLayoutVariantClasses = {
|
|
57
|
-
normal: {
|
|
58
|
-
productTitle: ["spiffy-product-card-title"],
|
|
59
|
-
container: ["spiffy-tw-w-[208px]"],
|
|
60
|
-
verticalContainer: ["spiffy-tw-rounded-[8px]", "spiffy-tw-h-[268px]"]
|
|
61
|
-
},
|
|
62
|
-
tall: {
|
|
63
|
-
productTitle: ["spiffy-product-card-title-tall", "spiffy-tw-pt-[8px]"],
|
|
64
|
-
container: ["spiffy-tw-w-[160px] lg:spiffy-tw-w-[300px]"],
|
|
65
|
-
verticalContainer: ["lg:spiffy-tw-h-[496px]"]
|
|
66
|
-
},
|
|
67
|
-
square: {
|
|
68
|
-
productTitle: ["spiffy-product-card-title-tall", "spiffy-tw-pt-[8px]"],
|
|
69
|
-
container: ["spiffy-tw-w-[160px] lg:spiffy-tw-w-[280px]"],
|
|
70
|
-
verticalContainer: ["lg:spiffy-tw-h-[400px]"]
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
//#endregion
|
|
75
18
|
//#region src/components/ProductCard/ProductCard.tsx
|
|
76
19
|
const formatReviews = (stars) => String(Number(stars).toLocaleString("en-US", {
|
|
77
20
|
minimumFractionDigits: 1,
|
|
@@ -124,17 +67,17 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
124
67
|
const pricePrefix = productCardConfig?.pricePrefix;
|
|
125
68
|
const handleClick = () => onClick();
|
|
126
69
|
if (productCardConfig == null) {
|
|
127
|
-
|
|
70
|
+
require_logger.default.logError("[ProductCard] productCardConfig is null", void 0, { merchant: merchantShortName });
|
|
128
71
|
return null;
|
|
129
72
|
}
|
|
130
|
-
const layoutClasses = productCardLayoutVariantClasses[finalLayoutVariant];
|
|
73
|
+
const layoutClasses = require_productCardVariants.productCardLayoutVariantClasses[finalLayoutVariant];
|
|
131
74
|
const containerClassnames = (0, classnames.default)("spiffy-tw-cursor-pointer", "spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-inherit", "spiffy-tw-overflow-hidden", {
|
|
132
75
|
"spiffy-tw-h-full": growWithContainer,
|
|
133
76
|
"spiffy-tw-w-full": growWithContainer,
|
|
134
77
|
"spiffy-tw-max-w-full": growWithContainer,
|
|
135
78
|
"spiffy-tw-rounded-[8px]": layoutVariant === "normal"
|
|
136
|
-
}, !growWithContainer && layoutClasses.container, variantClassMap.get(finalVariant) ?? [], variantHoverClassMap.get(finalHoverVariant) ?? []);
|
|
137
|
-
const verticalContainerVariantClasses = productCardLayoutVariantClasses[layoutVariant].verticalContainer;
|
|
79
|
+
}, !growWithContainer && layoutClasses.container, require_productCardVariants.variantClassMap.get(finalVariant) ?? [], require_productCardVariants.variantHoverClassMap.get(finalHoverVariant) ?? []);
|
|
80
|
+
const verticalContainerVariantClasses = require_productCardVariants.productCardLayoutVariantClasses[layoutVariant].verticalContainer;
|
|
138
81
|
const verticalContainerClassnames = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-overflow-hidden", "spiffy-tw-gap-inherit", {
|
|
139
82
|
"spiffy-tw-h-full": growWithContainer,
|
|
140
83
|
"spiffy-tw-w-full": growWithContainer,
|
|
@@ -157,7 +100,7 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
157
100
|
"hover:spiffy-tw-scale-105"
|
|
158
101
|
] : []);
|
|
159
102
|
const contentClassnames = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-p-2", "spiffy-tw-pr-2", "spiffy-tw-items-start", "spiffy-tw-justify-end", { "spiffy-tw-flex-grow-0": layoutVariant === "tall" || layoutVariant === "square" });
|
|
160
|
-
const productTitleClassnames = (0, classnames.default)("spiffy-tw-line-clamp-2", "spiffy-tw-overflow-clip", "spiffy-tw-tracking-[0.8px]", "spiffy-tw-whitespace-normal", "spiffy-tw-normal-case", variantTitleColorMap.get(finalVariant) ?? "spiffy-tw-text-[--spiffy-colors-text-primary]", ...layoutClasses.productTitle);
|
|
103
|
+
const productTitleClassnames = (0, classnames.default)("spiffy-tw-line-clamp-2", "spiffy-tw-overflow-clip", "spiffy-tw-tracking-[0.8px]", "spiffy-tw-whitespace-normal", "spiffy-tw-normal-case", require_productCardVariants.variantTitleColorMap.get(finalVariant) ?? "spiffy-tw-text-[--spiffy-colors-text-primary]", ...layoutClasses.productTitle);
|
|
161
104
|
const priceAndRatingContainerClassnames = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-row", "spiffy-tw-justify-between", "spiffy-tw-items-center", "spiffy-tw-w-full", "spiffy-tw-pt-2", "spiffy-tw-gap-2");
|
|
162
105
|
const imageClassnames = (0, classnames.default)("spiffy-tw-bg-transparent", "spiffy-tw-w-full", "spiffy-tw-h-full", "spiffy-tw-object-cover", "spiffy-tw-object-top", "spiffy-tw-select-none", "spiffy-tw-pointer-events-none");
|
|
163
106
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -205,101 +148,6 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
205
148
|
};
|
|
206
149
|
|
|
207
150
|
//#endregion
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
ProductCardSkeletonOverrides$1["PRODUCT_CARD_SKELETON"] = "spiffy-product-card-skeleton";
|
|
212
|
-
return ProductCardSkeletonOverrides$1;
|
|
213
|
-
}({});
|
|
214
|
-
let AnimatedProductCardOverrides = /* @__PURE__ */ function(AnimatedProductCardOverrides$1) {
|
|
215
|
-
AnimatedProductCardOverrides$1["PRODUCT_CARD_ANIMATED_CONTAINER"] = "spiffy-product-card-animated-container";
|
|
216
|
-
AnimatedProductCardOverrides$1["PRODUCT_CARD_ANIMATED_IMAGE_CONTAINER"] = "spiffy-product-card-animated";
|
|
217
|
-
return AnimatedProductCardOverrides$1;
|
|
218
|
-
}({});
|
|
219
|
-
|
|
220
|
-
//#endregion
|
|
221
|
-
//#region src/components/ProductCard/ProductCardSkeleton.tsx
|
|
222
|
-
const ProductCardSkeleton = ({ layoutVariant, aspectRatio, growWithContainer = false }) => {
|
|
223
|
-
const layoutClasses = productCardLayoutVariantClasses[layoutVariant || "normal"];
|
|
224
|
-
const containerClasses = (0, classnames.default)(ProductCardSkeletonOverrides.PRODUCT_CARD_SKELETON_CONTAINER, "spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-inherit", "spiffy-tw-bg-transparent", !growWithContainer ? layoutClasses.container : "");
|
|
225
|
-
const verticalContainerClasses = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-overflow-hidden", "spiffy-tw-gap-inherit", !growWithContainer ? layoutClasses.verticalContainer : "");
|
|
226
|
-
const imageClipContainerClasses = (0, classnames.default)("spiffy-tw-w-full", aspectRatio === "3:4" ? "spiffy-tw-aspect-[3/4]" : "", aspectRatio === "square" ? "spiffy-tw-aspect-square" : "", "spiffy-tw-overflow-hidden");
|
|
227
|
-
const imageSkeletonClasses = (0, classnames.default)("spiffy-tw-bg-[#F4F4F6]", "spiffy-tw-animate-pulse", "spiffy-tw-opacity-70", "spiffy-tw-w-full", "spiffy-tw-h-full");
|
|
228
|
-
const contentContainerClasses = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-2", "spiffy-tw-w-full", "spiffy-tw-p-2");
|
|
229
|
-
const textSkeletonClasses = (0, classnames.default)(ProductCardSkeletonOverrides.PRODUCT_CARD_SKELETON, "spiffy-tw-h-[15px]", "spiffy-tw-block", "spiffy-tw-rounded-sm", "spiffy-tw-animate-pulse", "spiffy-tw-opacity-70", "spiffy-tw-bg-[#F4F4F6]");
|
|
230
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
231
|
-
className: containerClasses,
|
|
232
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
233
|
-
className: verticalContainerClasses,
|
|
234
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
235
|
-
className: imageClipContainerClasses,
|
|
236
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: imageSkeletonClasses })
|
|
237
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
238
|
-
className: contentContainerClasses,
|
|
239
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, classnames.default)(textSkeletonClasses, "spiffy-tw-w-full") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, classnames.default)(textSkeletonClasses, "spiffy-tw-w-[60%]") })]
|
|
240
|
-
})]
|
|
241
|
-
})
|
|
242
|
-
});
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
//#endregion
|
|
246
|
-
Object.defineProperty(exports, 'AnimatedProductCardOverrides', {
|
|
247
|
-
enumerable: true,
|
|
248
|
-
get: function () {
|
|
249
|
-
return AnimatedProductCardOverrides;
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
Object.defineProperty(exports, 'PriceSection', {
|
|
253
|
-
enumerable: true,
|
|
254
|
-
get: function () {
|
|
255
|
-
return PriceSection;
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
Object.defineProperty(exports, 'ProductCard', {
|
|
259
|
-
enumerable: true,
|
|
260
|
-
get: function () {
|
|
261
|
-
return ProductCard;
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
Object.defineProperty(exports, 'ProductCardSkeleton', {
|
|
265
|
-
enumerable: true,
|
|
266
|
-
get: function () {
|
|
267
|
-
return ProductCardSkeleton;
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
Object.defineProperty(exports, 'ProductCardSkeletonOverrides', {
|
|
271
|
-
enumerable: true,
|
|
272
|
-
get: function () {
|
|
273
|
-
return ProductCardSkeletonOverrides;
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
Object.defineProperty(exports, 'RatingSummary', {
|
|
277
|
-
enumerable: true,
|
|
278
|
-
get: function () {
|
|
279
|
-
return RatingSummary;
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
Object.defineProperty(exports, 'productCardLayoutVariantClasses', {
|
|
283
|
-
enumerable: true,
|
|
284
|
-
get: function () {
|
|
285
|
-
return productCardLayoutVariantClasses;
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
Object.defineProperty(exports, 'variantClassMap', {
|
|
289
|
-
enumerable: true,
|
|
290
|
-
get: function () {
|
|
291
|
-
return variantClassMap;
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
Object.defineProperty(exports, 'variantHoverClassMap', {
|
|
295
|
-
enumerable: true,
|
|
296
|
-
get: function () {
|
|
297
|
-
return variantHoverClassMap;
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
Object.defineProperty(exports, 'variantTitleColorMap', {
|
|
301
|
-
enumerable: true,
|
|
302
|
-
get: function () {
|
|
303
|
-
return variantTitleColorMap;
|
|
304
|
-
}
|
|
305
|
-
});
|
|
151
|
+
exports.PriceSection = PriceSection;
|
|
152
|
+
exports.ProductCard = ProductCard;
|
|
153
|
+
exports.RatingSummary = RatingSummary;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant } from "./types.cjs";
|
|
2
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ProductCard/ProductCard.d.ts
|
|
5
|
+
interface RatingSummaryProps {
|
|
6
|
+
stars: number;
|
|
7
|
+
reviewCount: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const RatingSummary: ({
|
|
11
|
+
stars,
|
|
12
|
+
reviewCount,
|
|
13
|
+
className
|
|
14
|
+
}: RatingSummaryProps) => react_jsx_runtime13.JSX.Element;
|
|
15
|
+
interface PriceSectionProps {
|
|
16
|
+
originalPrice?: string;
|
|
17
|
+
salePrice?: string;
|
|
18
|
+
pricePrefix?: string;
|
|
19
|
+
}
|
|
20
|
+
declare const PriceSection: ({
|
|
21
|
+
originalPrice,
|
|
22
|
+
salePrice,
|
|
23
|
+
pricePrefix
|
|
24
|
+
}: PriceSectionProps) => react_jsx_runtime13.JSX.Element;
|
|
25
|
+
interface ProductCardProps {
|
|
26
|
+
productCardConfig?: ProductCardConfig;
|
|
27
|
+
merchantShortName: string;
|
|
28
|
+
title: string;
|
|
29
|
+
url: string;
|
|
30
|
+
imageUrl?: string;
|
|
31
|
+
originalPrice?: number;
|
|
32
|
+
averageRating?: number;
|
|
33
|
+
numberReviews?: number;
|
|
34
|
+
salePrice?: number;
|
|
35
|
+
variant?: ProductCardVariant;
|
|
36
|
+
hoverVariant?: ProductCardHoverVariant;
|
|
37
|
+
layoutVariant?: ProductCardLayoutVariant;
|
|
38
|
+
zoomOnHover?: boolean;
|
|
39
|
+
aspectRatio?: '3:4' | 'square' | 'none';
|
|
40
|
+
growWithContainer?: boolean;
|
|
41
|
+
onClick?: () => void;
|
|
42
|
+
dataTestId?: string;
|
|
43
|
+
}
|
|
44
|
+
declare const ProductCard: ({
|
|
45
|
+
productCardConfig,
|
|
46
|
+
merchantShortName,
|
|
47
|
+
imageUrl,
|
|
48
|
+
title,
|
|
49
|
+
url,
|
|
50
|
+
originalPrice,
|
|
51
|
+
averageRating,
|
|
52
|
+
numberReviews,
|
|
53
|
+
salePrice,
|
|
54
|
+
variant,
|
|
55
|
+
hoverVariant,
|
|
56
|
+
dataTestId,
|
|
57
|
+
layoutVariant,
|
|
58
|
+
zoomOnHover,
|
|
59
|
+
aspectRatio,
|
|
60
|
+
growWithContainer,
|
|
61
|
+
onClick
|
|
62
|
+
}: ProductCardProps) => react_jsx_runtime13.JSX.Element;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { PriceSection, ProductCard, RatingSummary, RatingSummaryProps };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant } from "./types.js";
|
|
2
|
+
import * as react_jsx_runtime21 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ProductCard/ProductCard.d.ts
|
|
5
|
+
interface RatingSummaryProps {
|
|
6
|
+
stars: number;
|
|
7
|
+
reviewCount: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const RatingSummary: ({
|
|
11
|
+
stars,
|
|
12
|
+
reviewCount,
|
|
13
|
+
className
|
|
14
|
+
}: RatingSummaryProps) => react_jsx_runtime21.JSX.Element;
|
|
15
|
+
interface PriceSectionProps {
|
|
16
|
+
originalPrice?: string;
|
|
17
|
+
salePrice?: string;
|
|
18
|
+
pricePrefix?: string;
|
|
19
|
+
}
|
|
20
|
+
declare const PriceSection: ({
|
|
21
|
+
originalPrice,
|
|
22
|
+
salePrice,
|
|
23
|
+
pricePrefix
|
|
24
|
+
}: PriceSectionProps) => react_jsx_runtime21.JSX.Element;
|
|
25
|
+
interface ProductCardProps {
|
|
26
|
+
productCardConfig?: ProductCardConfig;
|
|
27
|
+
merchantShortName: string;
|
|
28
|
+
title: string;
|
|
29
|
+
url: string;
|
|
30
|
+
imageUrl?: string;
|
|
31
|
+
originalPrice?: number;
|
|
32
|
+
averageRating?: number;
|
|
33
|
+
numberReviews?: number;
|
|
34
|
+
salePrice?: number;
|
|
35
|
+
variant?: ProductCardVariant;
|
|
36
|
+
hoverVariant?: ProductCardHoverVariant;
|
|
37
|
+
layoutVariant?: ProductCardLayoutVariant;
|
|
38
|
+
zoomOnHover?: boolean;
|
|
39
|
+
aspectRatio?: '3:4' | 'square' | 'none';
|
|
40
|
+
growWithContainer?: boolean;
|
|
41
|
+
onClick?: () => void;
|
|
42
|
+
dataTestId?: string;
|
|
43
|
+
}
|
|
44
|
+
declare const ProductCard: ({
|
|
45
|
+
productCardConfig,
|
|
46
|
+
merchantShortName,
|
|
47
|
+
imageUrl,
|
|
48
|
+
title,
|
|
49
|
+
url,
|
|
50
|
+
originalPrice,
|
|
51
|
+
averageRating,
|
|
52
|
+
numberReviews,
|
|
53
|
+
salePrice,
|
|
54
|
+
variant,
|
|
55
|
+
hoverVariant,
|
|
56
|
+
dataTestId,
|
|
57
|
+
layoutVariant,
|
|
58
|
+
zoomOnHover,
|
|
59
|
+
aspectRatio,
|
|
60
|
+
growWithContainer,
|
|
61
|
+
onClick
|
|
62
|
+
}: ProductCardProps) => react_jsx_runtime21.JSX.Element;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { PriceSection, ProductCard, RatingSummary, RatingSummaryProps };
|
|
@@ -1,75 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { formatPrice } from "../../util/formatPrice.js";
|
|
2
|
+
import { Typography } from "../Typography/Typography.js";
|
|
3
|
+
import "../Typography/index.js";
|
|
4
|
+
import logger_default from "../../logging/logger.js";
|
|
5
|
+
import { productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap } from "./productCardVariants.js";
|
|
6
|
+
import { ImageWithFallback } from "../ImageWithFallback/ImageWithFallback.js";
|
|
7
|
+
import "../ImageWithFallback/index.js";
|
|
8
|
+
import { Spinner } from "../Spinner/Spinner.js";
|
|
9
|
+
import "../Spinner/index.js";
|
|
5
10
|
import classNames from "classnames";
|
|
6
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
12
|
import { MdStar } from "react-icons/md";
|
|
8
13
|
import { useImageResolver } from "@envive-ai/react-hooks/hooks/ImageResolver";
|
|
9
14
|
import { PRODUCT_CARD_TESTID } from "@envive-ai/react-hooks/config";
|
|
10
15
|
|
|
11
|
-
//#region src/logging/logger.ts
|
|
12
|
-
var Logger = class {
|
|
13
|
-
static logInfo(message, ...args) {
|
|
14
|
-
console.info(`INFO: ${message}`, ...args);
|
|
15
|
-
}
|
|
16
|
-
static logDebug(message, ...args) {
|
|
17
|
-
console.debug(`DEBUG: ${message}`, ...args);
|
|
18
|
-
}
|
|
19
|
-
static logError(message, error, ...args) {
|
|
20
|
-
console.error(`ERROR: ${message} error=${error}`, args);
|
|
21
|
-
}
|
|
22
|
-
static logWarn(message, error, ...args) {
|
|
23
|
-
console.warn(`WARN: ${message} error=${error}`, args);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
var logger_default = Logger;
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region src/components/ProductCard/productCardVariants.ts
|
|
30
|
-
/**
|
|
31
|
-
* Shared variant mapping configurations for ProductCard components
|
|
32
|
-
*/
|
|
33
|
-
const variantClassMap = new Map([
|
|
34
|
-
["filled", ["spiffy-tw-bg-[--spiffy-colors-background-secondary]", "spiffy-tw-shadow-md"]],
|
|
35
|
-
["bordered", [
|
|
36
|
-
"spiffy-tw-bg-[--spiffy-colors-background-secondary]",
|
|
37
|
-
"spiffy-tw-border",
|
|
38
|
-
"spiffy-tw-border-[--spiffy-colors-border-light]"
|
|
39
|
-
]],
|
|
40
|
-
["minimal", ["spiffy-tw-bg-transparent"]],
|
|
41
|
-
["transparentBordered", [
|
|
42
|
-
"spiffy-tw-bg-transparent",
|
|
43
|
-
"spiffy-tw-border",
|
|
44
|
-
"spiffy-tw-border-[--spiffy-colors-border-light]"
|
|
45
|
-
]]
|
|
46
|
-
]);
|
|
47
|
-
const variantHoverClassMap = new Map([["backgroundDark", ["hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]"]], ["none", []]]);
|
|
48
|
-
const variantTitleColorMap = new Map([
|
|
49
|
-
["filled", "spiffy-tw-text-[--spiffy-colors-text-link]"],
|
|
50
|
-
["bordered", "spiffy-tw-text-[--spiffy-colors-text-primary]"],
|
|
51
|
-
["minimal", "spiffy-tw-text-[--spiffy-colors-text-primary]"],
|
|
52
|
-
["transparentBordered", "spiffy-tw-text-[--spiffy-colors-text-primary]"]
|
|
53
|
-
]);
|
|
54
|
-
const productCardLayoutVariantClasses = {
|
|
55
|
-
normal: {
|
|
56
|
-
productTitle: ["spiffy-product-card-title"],
|
|
57
|
-
container: ["spiffy-tw-w-[208px]"],
|
|
58
|
-
verticalContainer: ["spiffy-tw-rounded-[8px]", "spiffy-tw-h-[268px]"]
|
|
59
|
-
},
|
|
60
|
-
tall: {
|
|
61
|
-
productTitle: ["spiffy-product-card-title-tall", "spiffy-tw-pt-[8px]"],
|
|
62
|
-
container: ["spiffy-tw-w-[160px] lg:spiffy-tw-w-[300px]"],
|
|
63
|
-
verticalContainer: ["lg:spiffy-tw-h-[496px]"]
|
|
64
|
-
},
|
|
65
|
-
square: {
|
|
66
|
-
productTitle: ["spiffy-product-card-title-tall", "spiffy-tw-pt-[8px]"],
|
|
67
|
-
container: ["spiffy-tw-w-[160px] lg:spiffy-tw-w-[280px]"],
|
|
68
|
-
verticalContainer: ["lg:spiffy-tw-h-[400px]"]
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
//#endregion
|
|
73
16
|
//#region src/components/ProductCard/ProductCard.tsx
|
|
74
17
|
const formatReviews = (stars) => String(Number(stars).toLocaleString("en-US", {
|
|
75
18
|
minimumFractionDigits: 1,
|
|
@@ -203,42 +146,4 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
203
146
|
};
|
|
204
147
|
|
|
205
148
|
//#endregion
|
|
206
|
-
|
|
207
|
-
let ProductCardSkeletonOverrides = /* @__PURE__ */ function(ProductCardSkeletonOverrides$1) {
|
|
208
|
-
ProductCardSkeletonOverrides$1["PRODUCT_CARD_SKELETON_CONTAINER"] = "spiffy-product-card-skeleton-container";
|
|
209
|
-
ProductCardSkeletonOverrides$1["PRODUCT_CARD_SKELETON"] = "spiffy-product-card-skeleton";
|
|
210
|
-
return ProductCardSkeletonOverrides$1;
|
|
211
|
-
}({});
|
|
212
|
-
let AnimatedProductCardOverrides = /* @__PURE__ */ function(AnimatedProductCardOverrides$1) {
|
|
213
|
-
AnimatedProductCardOverrides$1["PRODUCT_CARD_ANIMATED_CONTAINER"] = "spiffy-product-card-animated-container";
|
|
214
|
-
AnimatedProductCardOverrides$1["PRODUCT_CARD_ANIMATED_IMAGE_CONTAINER"] = "spiffy-product-card-animated";
|
|
215
|
-
return AnimatedProductCardOverrides$1;
|
|
216
|
-
}({});
|
|
217
|
-
|
|
218
|
-
//#endregion
|
|
219
|
-
//#region src/components/ProductCard/ProductCardSkeleton.tsx
|
|
220
|
-
const ProductCardSkeleton = ({ layoutVariant, aspectRatio, growWithContainer = false }) => {
|
|
221
|
-
const layoutClasses = productCardLayoutVariantClasses[layoutVariant || "normal"];
|
|
222
|
-
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 : "");
|
|
223
|
-
const verticalContainerClasses = classNames("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-overflow-hidden", "spiffy-tw-gap-inherit", !growWithContainer ? layoutClasses.verticalContainer : "");
|
|
224
|
-
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");
|
|
225
|
-
const imageSkeletonClasses = classNames("spiffy-tw-bg-[#F4F4F6]", "spiffy-tw-animate-pulse", "spiffy-tw-opacity-70", "spiffy-tw-w-full", "spiffy-tw-h-full");
|
|
226
|
-
const contentContainerClasses = classNames("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-2", "spiffy-tw-w-full", "spiffy-tw-p-2");
|
|
227
|
-
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]");
|
|
228
|
-
return /* @__PURE__ */ jsx("div", {
|
|
229
|
-
className: containerClasses,
|
|
230
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
231
|
-
className: verticalContainerClasses,
|
|
232
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
233
|
-
className: imageClipContainerClasses,
|
|
234
|
-
children: /* @__PURE__ */ jsx("div", { className: imageSkeletonClasses })
|
|
235
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
236
|
-
className: contentContainerClasses,
|
|
237
|
-
children: [/* @__PURE__ */ jsx("div", { className: classNames(textSkeletonClasses, "spiffy-tw-w-full") }), /* @__PURE__ */ jsx("div", { className: classNames(textSkeletonClasses, "spiffy-tw-w-[60%]") })]
|
|
238
|
-
})]
|
|
239
|
-
})
|
|
240
|
-
});
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
//#endregion
|
|
244
|
-
export { ProductCard as a, variantClassMap as c, PriceSection as i, variantHoverClassMap as l, AnimatedProductCardOverrides as n, RatingSummary as o, ProductCardSkeletonOverrides as r, productCardLayoutVariantClasses as s, ProductCardSkeleton as t, variantTitleColorMap as u };
|
|
149
|
+
export { PriceSection, ProductCard, RatingSummary };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_productCardVariants = require('./productCardVariants.cjs');
|
|
3
|
+
const require_types = require('./types.cjs');
|
|
4
|
+
let classnames = require("classnames");
|
|
5
|
+
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
|
|
8
|
+
//#region src/components/ProductCard/ProductCardSkeleton.tsx
|
|
9
|
+
const ProductCardSkeleton = ({ layoutVariant, aspectRatio, growWithContainer = false }) => {
|
|
10
|
+
const layoutClasses = require_productCardVariants.productCardLayoutVariantClasses[layoutVariant || "normal"];
|
|
11
|
+
const containerClasses = (0, classnames.default)(require_types.ProductCardSkeletonOverrides.PRODUCT_CARD_SKELETON_CONTAINER, "spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-inherit", "spiffy-tw-bg-transparent", !growWithContainer ? layoutClasses.container : "");
|
|
12
|
+
const verticalContainerClasses = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-overflow-hidden", "spiffy-tw-gap-inherit", !growWithContainer ? layoutClasses.verticalContainer : "");
|
|
13
|
+
const imageClipContainerClasses = (0, classnames.default)("spiffy-tw-w-full", aspectRatio === "3:4" ? "spiffy-tw-aspect-[3/4]" : "", aspectRatio === "square" ? "spiffy-tw-aspect-square" : "", "spiffy-tw-overflow-hidden");
|
|
14
|
+
const imageSkeletonClasses = (0, classnames.default)("spiffy-tw-bg-[#F4F4F6]", "spiffy-tw-animate-pulse", "spiffy-tw-opacity-70", "spiffy-tw-w-full", "spiffy-tw-h-full");
|
|
15
|
+
const contentContainerClasses = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-2", "spiffy-tw-w-full", "spiffy-tw-p-2");
|
|
16
|
+
const textSkeletonClasses = (0, classnames.default)(require_types.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]");
|
|
17
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
18
|
+
className: containerClasses,
|
|
19
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
20
|
+
className: verticalContainerClasses,
|
|
21
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
22
|
+
className: imageClipContainerClasses,
|
|
23
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: imageSkeletonClasses })
|
|
24
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
25
|
+
className: contentContainerClasses,
|
|
26
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, classnames.default)(textSkeletonClasses, "spiffy-tw-w-full") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, classnames.default)(textSkeletonClasses, "spiffy-tw-w-[60%]") })]
|
|
27
|
+
})]
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
exports.ProductCardSkeleton = ProductCardSkeleton;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { productCardLayoutVariantClasses } from "./productCardVariants.js";
|
|
2
|
+
import { ProductCardSkeletonOverrides } from "./types.js";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ProductCard/ProductCardSkeleton.tsx
|
|
7
|
+
const ProductCardSkeleton = ({ layoutVariant, aspectRatio, growWithContainer = false }) => {
|
|
8
|
+
const layoutClasses = productCardLayoutVariantClasses[layoutVariant || "normal"];
|
|
9
|
+
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 : "");
|
|
10
|
+
const verticalContainerClasses = classNames("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-overflow-hidden", "spiffy-tw-gap-inherit", !growWithContainer ? layoutClasses.verticalContainer : "");
|
|
11
|
+
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");
|
|
12
|
+
const imageSkeletonClasses = classNames("spiffy-tw-bg-[#F4F4F6]", "spiffy-tw-animate-pulse", "spiffy-tw-opacity-70", "spiffy-tw-w-full", "spiffy-tw-h-full");
|
|
13
|
+
const contentContainerClasses = classNames("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-2", "spiffy-tw-w-full", "spiffy-tw-p-2");
|
|
14
|
+
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]");
|
|
15
|
+
return /* @__PURE__ */ jsx("div", {
|
|
16
|
+
className: containerClasses,
|
|
17
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
18
|
+
className: verticalContainerClasses,
|
|
19
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
20
|
+
className: imageClipContainerClasses,
|
|
21
|
+
children: /* @__PURE__ */ jsx("div", { className: imageSkeletonClasses })
|
|
22
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
23
|
+
className: contentContainerClasses,
|
|
24
|
+
children: [/* @__PURE__ */ jsx("div", { className: classNames(textSkeletonClasses, "spiffy-tw-w-full") }), /* @__PURE__ */ jsx("div", { className: classNames(textSkeletonClasses, "spiffy-tw-w-[60%]") })]
|
|
25
|
+
})]
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { ProductCardSkeleton };
|