@envive-ai/react-toolkit 0.2.13-arthur-1 → 0.2.14
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-CUT6urMc.cjs → _virtual/rolldown_runtime.cjs} +11 -12
- package/dist/{types--eyQnaEA.d.cts → atoms/search/types.d.cts} +1 -1
- package/dist/{types-D6fl4HOx.d.ts → atoms/search/types.d.ts} +1 -1
- package/dist/{Accordion-DPUaEXiE.cjs → components/Accordion/Accordion.cjs} +8 -30
- package/dist/components/Accordion/{index-D_7-KJa0.d.cts → Accordion.d.cts} +2 -2
- package/dist/components/Accordion/{index-Dd_9XeqA.d.ts → Accordion.d.ts} +2 -2
- package/dist/{Accordion-8zFBEEaN.js → components/Accordion/Accordion.js} +5 -23
- package/dist/components/Accordion/index.cjs +1 -3
- 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 -3
- package/dist/{AnimatedChevron-CPW5KPLr.cjs → components/AnimatedChevron/AnimatedChevron.cjs} +2 -7
- package/dist/components/AnimatedChevron/{index-BwQ6tJL8.d.cts → AnimatedChevron.d.cts} +2 -2
- package/dist/components/AnimatedChevron/{index-DZdGWikh.d.ts → AnimatedChevron.d.ts} +2 -2
- package/dist/{AnimatedChevron-DO_jcnJg.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/AppliedFiltersScrollbar.d.cts +22 -0
- package/dist/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.d.ts +22 -0
- 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-C44g6llb.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-Cjo-fBg2.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-Bxdhf_O8.d.cts → types.d.cts} +4 -19
- package/dist/components/ButtonBase/{index-VoanK6Pr.d.ts → 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-CHzxQmaW.d.cts → DynamicFiltersScrollbar.d.cts} +2 -2
- package/dist/components/DynamicFiltersScrollbar/{index-vVNOOaOF.d.ts → 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-IO886VXD.cjs → components/FilterScrollbar/AppliedFiltersScrollbar.cjs} +6 -39
- package/dist/components/{AppliedFiltersScrollbar/index-Dcyc-5Bv.d.ts → FilterScrollbar/AppliedFiltersScrollbar.d.cts} +1 -1
- package/dist/components/{AppliedFiltersScrollbar/index-VbXAIfym.d.cts → FilterScrollbar/AppliedFiltersScrollbar.d.ts} +1 -1
- package/dist/{DynamicFiltersScrollbar-s5yfmMau.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-C-ZQn7tR.cjs → components/ImageWithFallback/ImageWithFallback.cjs} +4 -9
- package/dist/components/ImageWithFallback/{index-NJZsMOXc.d.ts → ImageWithFallback.d.ts} +2 -2
- package/dist/{ImageWithFallback-DjDNefaG.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-B5q4MHdq.d.cts → types.d.cts} +1 -14
- package/dist/components/ModalSheet/{index-BN20-QS0.d.ts → types.d.ts} +1 -14
- package/dist/{ProductCard-C7rZyWpj.cjs → components/ProductCard/ProductCard.cjs} +20 -172
- package/dist/components/ProductCard/ProductCard.d.cts +64 -0
- package/dist/components/ProductCard/ProductCard.d.ts +64 -0
- package/dist/{ProductCard-GxpFxjh0.js → components/ProductCard/ProductCard.js} +11 -106
- 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-0A8vml2y.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-DAwc9dKV.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-DpF1wymL.cjs → components/RadioButton/RadioButton.cjs} +5 -9
- package/dist/components/RadioButton/{index-BeOT_AlW.d.cts → RadioButton.d.cts} +2 -2
- package/dist/components/RadioButton/{index-CxluCaJw.d.ts → RadioButton.d.ts} +2 -2
- package/dist/{RadioButton-DOc8g47U.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-ByzTXNAb.cjs → components/RadioButtonGroup/RadioButtonGroup.cjs} +6 -15
- package/dist/components/RadioButtonGroup/{index-KeOIiYNW.d.ts → RadioButtonGroup.d.ts} +2 -2
- package/dist/{RadioButtonGroup-YQIxmR7j.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-qkPxXVJn.cjs → components/RecommendedProducts/RecommendedProducts.cjs} +7 -10
- package/dist/{RecommendedProducts-C6dLpLPP.js → components/RecommendedProducts/RecommendedProducts.js} +5 -3
- package/dist/components/RecommendedProducts/index.cjs +1 -8
- 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 -8
- package/dist/{SearchAutocomplete-BdTWETDB.cjs → components/SearchAutocomplete/SearchAutocomplete.cjs} +10 -13
- package/dist/components/SearchAutocomplete/{index-BcnHcv7Q.d.cts → SearchAutocomplete.d.cts} +2 -2
- package/dist/components/SearchAutocomplete/{index-Br_POGOz.d.ts → SearchAutocomplete.d.ts} +2 -2
- package/dist/{SearchAutocomplete-DNe193EV.js → components/SearchAutocomplete/SearchAutocomplete.js} +6 -5
- package/dist/components/SearchAutocomplete/index.cjs +1 -4
- 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 -4
- 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 -16
- 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 -11
- 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/components/SearchInput/SearchInput.cjs +83 -0
- package/dist/components/SearchInput/{index-C0H51Flv.d.ts → SearchInput.d.cts} +1 -15
- package/dist/components/SearchInput/{index-rFDdhvqg.d.cts → SearchInput.d.ts} +1 -15
- package/dist/components/SearchInput/SearchInput.js +78 -0
- package/dist/components/SearchInput/index.cjs +3 -6
- 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 -5
- 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-ZgNNEX6E.cjs → components/SearchInputForm/SearchInputForm.cjs} +8 -11
- package/dist/components/SearchInputForm/{index-DjjoY7MQ.d.ts → SearchInputForm.d.cts} +3 -3
- package/dist/components/SearchInputForm/{index-Cleto06d.d.cts → SearchInputForm.d.ts} +1 -1
- package/dist/{SearchInputForm-CFm_hUvX.js → components/SearchInputForm/SearchInputForm.js} +5 -3
- package/dist/components/SearchInputForm/index.cjs +1 -8
- 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 -8
- package/dist/components/SearchResultsContent/SearchResultsContent.cjs +52 -0
- package/dist/components/SearchResultsContent/{index-C4qsTFUd.d.cts → SearchResultsContent.d.cts} +4 -4
- package/dist/components/SearchResultsContent/{index-KdFf9yzs.d.ts → SearchResultsContent.d.ts} +4 -4
- package/dist/components/SearchResultsContent/SearchResultsContent.js +50 -0
- package/dist/components/SearchResultsContent/index.cjs +2 -61
- 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 -58
- package/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.cjs +25 -0
- package/dist/components/SearchResultsFilterButton/{index-BvntKdyC.d.ts → SearchResultsFilterButton.d.cts} +2 -2
- package/dist/components/SearchResultsFilterButton/{index-zgQsT6vz.d.cts → SearchResultsFilterButton.d.ts} +2 -2
- package/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.js +23 -0
- package/dist/components/SearchResultsFilterButton/index.cjs +1 -6
- 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 -6
- package/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.cjs +36 -0
- package/dist/components/SearchResultsFilterModal/{index-CNBQ1ikL.d.ts → SearchResultsFilterModal.d.cts} +3 -3
- package/dist/components/SearchResultsFilterModal/{index-mRcnKysU.d.cts → SearchResultsFilterModal.d.ts} +3 -3
- package/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.js +35 -0
- package/dist/components/SearchResultsFilterModal/index.cjs +2 -45
- 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 -43
- 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-DLzQoFGD.js → components/SearchResultsFilterSidebar/SearchResultsFilter.js} +9 -72
- package/dist/components/SearchResultsFilterSidebar/index.cjs +3 -15
- 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 -14
- package/dist/{searchFilterSidebarVariants-CjyRGKK_.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-gkgkflXx.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 -17
- 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 -14
- package/dist/components/SearchResultsToolbar/SearchResultsToolbar.cjs +60 -0
- package/dist/components/SearchResultsToolbar/{index-CIvuccni.d.ts → SearchResultsToolbar.d.cts} +2 -2
- package/dist/components/SearchResultsToolbar/{index-PYr086HM.d.cts → SearchResultsToolbar.d.ts} +2 -2
- package/dist/components/SearchResultsToolbar/SearchResultsToolbar.js +57 -0
- package/dist/components/SearchResultsToolbar/index.cjs +2 -65
- 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 -61
- package/dist/components/SparkleAnimation/SparkleAnimation.cjs +78 -0
- package/dist/components/SparkleAnimation/SparkleAnimation.d.cts +15 -0
- package/dist/components/SparkleAnimation/SparkleAnimation.d.ts +15 -0
- package/dist/{SparkleAnimation-szzXiTam.js → components/SparkleAnimation/SparkleAnimation.js} +11 -20
- package/dist/components/SparkleAnimation/index.cjs +3 -4
- 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 -3
- 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-7HblFCja.cjs → components/Spinner/Spinner.cjs} +3 -8
- package/dist/components/Spinner/{index-TKsPifGM.d.ts → Spinner.d.cts} +2 -2
- package/dist/components/Spinner/{index-DrYhRG9D.d.cts → Spinner.d.ts} +2 -2
- package/dist/{Spinner-OFbXMms8.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-BioM3QHW.d.ts → SuggestionButton.d.cts} +6 -8
- package/dist/components/SuggestionButton/{index-CjV6Ar4Y.d.cts → SuggestionButton.d.ts} +6 -8
- package/dist/components/SuggestionButton/SuggestionButton.js +188 -0
- package/dist/components/SuggestionButton/index.cjs +5 -191
- 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 -185
- package/dist/components/SuggestionButton/types.d.cts +4 -0
- package/dist/components/SuggestionButton/types.d.ts +4 -0
- package/dist/{TextInput-CaynCoDf.cjs → components/TextInput/TextInput.cjs} +7 -11
- package/dist/components/TextInput/{index-DAhxej1K.d.ts → TextInput.d.cts} +1 -2
- package/dist/components/TextInput/{index-CRJMRe-b.d.cts → TextInput.d.ts} +1 -2
- package/dist/{TextInput-CsdOvLBQ.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-Dxk3U1hR.cjs → components/ToggleButton/ToggleButton.cjs} +5 -9
- package/dist/components/ToggleButton/{index-pFQuGdoj.d.ts → ToggleButton.d.cts} +2 -2
- package/dist/components/ToggleButton/{index-eLDrp4ic.d.cts → ToggleButton.d.ts} +2 -2
- package/dist/{ToggleButton-D8--AKKK.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-DXGw5Z56.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-_oNpv-aN.d.ts → components/Typography/typographyVariantClasses.d.ts} +1 -1
- package/dist/{Typography-Ds4gfOJz.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/logging/logger.cjs +20 -0
- package/dist/logging/logger.js +19 -0
- package/dist/{colorsConfig-Dp7w5LPb.cjs → models/colorsConfig.cjs} +2 -12
- package/dist/{colorsConfig-CFI1KN8R.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 +14 -2
- package/src/components/Accordion/Accordion.tsx +4 -1
- package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +5 -2
- package/src/components/ButtonBase/ButtonBase.tsx +3 -5
- package/src/components/ButtonBase/types.ts +3 -3
- package/src/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.tsx +4 -1
- package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +5 -2
- package/src/components/FilterScrollbar/DynamicFiltersScrollbar.tsx +4 -1
- package/src/components/ModalSheet/common/closeIcon.tsx +8 -7
- package/src/components/ModalSheet/desktop/index.tsx +1 -1
- package/src/components/ModalSheet/mobile/index.tsx +1 -1
- package/src/components/ModalSheet/mobile/mobileHeader.tsx +4 -1
- package/src/components/ProductCard/ProductCard.tsx +28 -14
- package/src/components/ProductCard/productCardVariants.ts +1 -1
- package/src/components/ProductGrid/ProductGrid.tsx +5 -2
- package/src/components/RadioButton/RadioButton.tsx +15 -2
- package/src/components/RadioButtonGroup/RadioButtonGroup.tsx +1 -1
- package/src/components/RecommendedProducts/RecommendedProducts.tsx +11 -9
- package/src/components/RecommendedProducts/index.ts +1 -1
- package/src/components/SearchAutocomplete/SearchAutocomplete.tsx +25 -19
- package/src/components/SearchFilter/SearchFilter.tsx +24 -10
- package/src/components/SearchFilter/SearchFilterHeader.tsx +4 -1
- package/src/components/SearchFilter/SearchFilterItem.tsx +3 -3
- package/src/components/SearchFilter/types.ts +2 -0
- package/src/components/SearchFilter/useHasFilterStateChanged.tsx +4 -4
- package/src/components/SearchInput/SearchInput.tsx +6 -2
- package/src/components/SearchInput/searchInputVariants.ts +1 -1
- package/src/components/SearchInputForm/SearchInputForm.tsx +4 -7
- package/src/components/SearchResultsContent/SearchResultsContent.tsx +1 -1
- package/src/components/SearchResultsFilterButton/SearchResultsFilterButton.tsx +1 -1
- package/src/components/SearchResultsFilterModal/SearchResultsFilterModal.tsx +4 -1
- package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +2 -2
- package/src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +1 -1
- package/src/components/SearchResultsStates/NoSearchResultsFound.tsx +2 -2
- package/src/components/SearchResultsStates/SearchResultsGrid.tsx +2 -2
- package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +9 -5
- package/src/components/SearchResultsToolbar/SearchResultsToolbar.tsx +10 -7
- package/src/components/SparkleAnimation/SparkleAnimation.tsx +17 -8
- package/src/components/SuggestionButton/SuggestionButton.tsx +22 -17
- package/src/components/SuggestionButton/types.ts +1 -1
- package/src/components/TextInput/TextInput.tsx +9 -2
- package/src/components/ToggleButton/ToggleButton.tsx +13 -3
- package/src/components/Typography/Typography.spec.tsx +1 -1
- package/src/components/Typography/util.ts +2 -2
- package/src/models/colorsConfig.ts +2 -1
- package/src/stories/ButtonBase.stories.tsx +1 -1
- package/src/stories/NoSearchResultsFound.stories.tsx +7 -0
- package/src/stories/ProductCardSkeleton.stories.tsx +46 -16
- package/src/stories/SearchResultsFilter.stories.tsx +3 -3
- package/src/stories/SparkleAnimation.stories.tsx +5 -2
- package/src/util/camelCasedPropertiesDeep.ts +0 -1
- package/src/util/colorVar.ts +1 -1
- package/src/util/useScrollDirection.ts +1 -1
- package/src/util/useStickyVisibility.ts +1 -1
- package/dist/ButtonBase-Cb6Iec6f.cjs +0 -0
- package/dist/ButtonBase-D2eXuapk.js +0 -1
- package/dist/FourPointStar-3DqnYmfN.js +0 -21
- package/dist/FourPointStar-AQ9OSu0S.cjs +0 -26
- package/dist/ModalSheet-C5f5abw1.js +0 -301
- package/dist/ModalSheet-JZerJZ1T.cjs +0 -308
- package/dist/OutlinedStar-CC0V_jAK.cjs +0 -26
- package/dist/OutlinedStar-WWs3gRwt.js +0 -21
- package/dist/SearchFilter-BRtCSuAn.cjs +0 -301
- package/dist/SearchFilter-DvJx0b0W.js +0 -264
- package/dist/SearchInput-CImlqrau.cjs +0 -159
- package/dist/SearchInput-kLhxkpgq.js +0 -145
- package/dist/SearchResultsFilterButton-D929tRt9.cjs +0 -96
- package/dist/SearchResultsFilterButton-Dk7u7rgn.js +0 -90
- package/dist/SearchResultsFilterSidebar-BRFONIEq.cjs +0 -118
- package/dist/SearchResultsStates-CQR5Il4l.cjs +0 -196
- package/dist/SearchResultsStates-D7HfsLeZ.js +0 -177
- package/dist/SparkleAnimation-BikAiAmb.cjs +0 -97
- package/dist/components/FilterScrollbar/index-DXcZLcQi.d.cts +0 -47
- package/dist/components/FilterScrollbar/index-DwLyxqQl.d.ts +0 -47
- package/dist/components/ProductCard/index-CglXQ3wh.d.ts +0 -2
- package/dist/components/ProductCard/index-XVlN6iMl.d.cts +0 -2
- package/dist/components/ProductGrid/index-BPBgwFsa.d.cts +0 -35
- package/dist/components/ProductGrid/index-D_YpwJCd.d.ts +0 -35
- package/dist/components/SearchFilter/index-BbIqmoO8.d.ts +0 -91
- package/dist/components/SearchFilter/index-DAL3Wl6U.d.cts +0 -91
- package/dist/components/SearchResultsFilterSidebar/index-C7PE9z5a.d.ts +0 -2
- package/dist/components/SearchResultsFilterSidebar/index-DKzEKFV3.d.cts +0 -2
- package/dist/components/SearchResultsStates/index-Dugoegtn.d.ts +0 -78
- package/dist/components/SearchResultsStates/index-RVgPTFiH.d.cts +0 -78
- package/dist/components/SparkleAnimation/index-BFqUibyY.d.ts +0 -23
- package/dist/components/SparkleAnimation/index-CSBR76H5.d.cts +0 -23
- package/dist/components/Typography/index-DzSBreyM.d.cts +0 -3
- package/dist/components/Typography/index-ymH7f3jB.d.ts +0 -3
- package/dist/index-BCBtAzCc.d.ts +0 -325
- package/dist/index-BiKhzraQ.d.cts +0 -46
- package/dist/index-CzbumwVZ.d.cts +0 -325
- package/dist/index-DK0xpfMg.d.ts +0 -46
- package/dist/jsx-runtime-Dg2m6dxZ-B-pkyyHT.cjs +0 -2586
- package/dist/jsx-runtime-Dg2m6dxZ-CU_SzTu4.js +0 -2580
- package/dist/util/index-C2ueYGXh.d.ts +0 -21
- package/dist/util/index-DUzbpjPa.d.cts +0 -21
- /package/dist/components/ImageWithFallback/{index-BLbkDyG8.d.cts → ImageWithFallback.d.cts} +0 -0
- /package/dist/components/RadioButtonGroup/{index-BOhV-rG3.d.cts → RadioButtonGroup.d.cts} +0 -0
- /package/dist/components/RecommendedProducts/{index-BFM83Qu3.d.cts → RecommendedProducts.d.cts} +0 -0
- /package/dist/components/RecommendedProducts/{index-DlbCfGof.d.ts → RecommendedProducts.d.ts} +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/util/useScrollDirection.ts
|
|
4
|
+
const useScrollDirection = (scrollContainerRef) => {
|
|
5
|
+
const [scrollDirection, setScrollDirection] = useState(null);
|
|
6
|
+
const touchStartY = useRef(0);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const container = scrollContainerRef?.current || window;
|
|
9
|
+
const touchTarget = scrollContainerRef?.current || document;
|
|
10
|
+
const handleWheel = (e) => {
|
|
11
|
+
if (e.deltaY > 0) setScrollDirection("down");
|
|
12
|
+
else setScrollDirection("up");
|
|
13
|
+
};
|
|
14
|
+
const handleTouchStart = (e) => {
|
|
15
|
+
touchStartY.current = e.touches[0].clientY;
|
|
16
|
+
};
|
|
17
|
+
const handleTouchMove = (e) => {
|
|
18
|
+
const currentTouchY = e.touches[0].clientY;
|
|
19
|
+
const deltaY = touchStartY.current - currentTouchY;
|
|
20
|
+
if (Math.abs(deltaY) < 10) return;
|
|
21
|
+
if (deltaY > 0) setScrollDirection("down");
|
|
22
|
+
else setScrollDirection("up");
|
|
23
|
+
touchStartY.current = currentTouchY;
|
|
24
|
+
};
|
|
25
|
+
container.addEventListener("wheel", handleWheel, { passive: true });
|
|
26
|
+
touchTarget.addEventListener("touchstart", handleTouchStart, { passive: true });
|
|
27
|
+
touchTarget.addEventListener("touchmove", handleTouchMove, { passive: true });
|
|
28
|
+
return () => {
|
|
29
|
+
container.removeEventListener("wheel", handleWheel);
|
|
30
|
+
touchTarget.removeEventListener("touchstart", handleTouchStart);
|
|
31
|
+
touchTarget.removeEventListener("touchmove", handleTouchMove);
|
|
32
|
+
};
|
|
33
|
+
}, [scrollContainerRef]);
|
|
34
|
+
return scrollDirection;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { useScrollDirection };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_useScrollDirection = require('./useScrollDirection.cjs');
|
|
3
|
+
let react = require("react");
|
|
4
|
+
|
|
5
|
+
//#region src/util/useStickyVisibility.ts
|
|
6
|
+
const useStickyVisibility = () => {
|
|
7
|
+
const [isVisible, setIsVisible] = (0, react.useState)(true);
|
|
8
|
+
const toolbarRef = (0, react.useRef)(null);
|
|
9
|
+
const [toolbarHeight, setToolbarHeight] = (0, react.useState)(0);
|
|
10
|
+
const [scrollY, setScrollY] = (0, react.useState)(0);
|
|
11
|
+
const scrollDirection = require_useScrollDirection.useScrollDirection();
|
|
12
|
+
(0, react.useEffect)(() => {
|
|
13
|
+
const handleScroll = () => {
|
|
14
|
+
setScrollY(window.scrollY);
|
|
15
|
+
};
|
|
16
|
+
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
17
|
+
return () => window.removeEventListener("scroll", handleScroll);
|
|
18
|
+
}, []);
|
|
19
|
+
(0, react.useEffect)(() => {
|
|
20
|
+
if (toolbarRef.current) setToolbarHeight(toolbarRef.current.offsetHeight);
|
|
21
|
+
}, []);
|
|
22
|
+
(0, react.useEffect)(() => {
|
|
23
|
+
if (scrollDirection === "down" && scrollY > toolbarHeight && toolbarHeight > 0) setIsVisible(false);
|
|
24
|
+
else setIsVisible(true);
|
|
25
|
+
}, [
|
|
26
|
+
scrollDirection,
|
|
27
|
+
toolbarHeight,
|
|
28
|
+
scrollY
|
|
29
|
+
]);
|
|
30
|
+
return {
|
|
31
|
+
toolbarRef,
|
|
32
|
+
isVisible,
|
|
33
|
+
toolbarHeight
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
exports.useStickyVisibility = useStickyVisibility;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react0 from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/util/useStickyVisibility.d.ts
|
|
4
|
+
declare const useStickyVisibility: () => {
|
|
5
|
+
toolbarRef: react0.RefObject<HTMLDivElement>;
|
|
6
|
+
isVisible: boolean;
|
|
7
|
+
toolbarHeight: number;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { useStickyVisibility };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react0 from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/util/useStickyVisibility.d.ts
|
|
4
|
+
declare const useStickyVisibility: () => {
|
|
5
|
+
toolbarRef: react0.RefObject<HTMLDivElement>;
|
|
6
|
+
isVisible: boolean;
|
|
7
|
+
toolbarHeight: number;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { useStickyVisibility };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useScrollDirection } from "./useScrollDirection.js";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/util/useStickyVisibility.ts
|
|
5
|
+
const useStickyVisibility = () => {
|
|
6
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
7
|
+
const toolbarRef = useRef(null);
|
|
8
|
+
const [toolbarHeight, setToolbarHeight] = useState(0);
|
|
9
|
+
const [scrollY, setScrollY] = useState(0);
|
|
10
|
+
const scrollDirection = useScrollDirection();
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const handleScroll = () => {
|
|
13
|
+
setScrollY(window.scrollY);
|
|
14
|
+
};
|
|
15
|
+
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
16
|
+
return () => window.removeEventListener("scroll", handleScroll);
|
|
17
|
+
}, []);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (toolbarRef.current) setToolbarHeight(toolbarRef.current.offsetHeight);
|
|
20
|
+
}, []);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (scrollDirection === "down" && scrollY > toolbarHeight && toolbarHeight > 0) setIsVisible(false);
|
|
23
|
+
else setIsVisible(true);
|
|
24
|
+
}, [
|
|
25
|
+
scrollDirection,
|
|
26
|
+
toolbarHeight,
|
|
27
|
+
scrollY
|
|
28
|
+
]);
|
|
29
|
+
return {
|
|
30
|
+
toolbarRef,
|
|
31
|
+
isVisible,
|
|
32
|
+
toolbarHeight
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { useStickyVisibility };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@envive-ai/react-toolkit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "React component library for Envive services.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"test": "vitest"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@envive-ai/react-hooks": "0.2.8",
|
|
35
34
|
"@tailwindcss/typography": "^0.5.15",
|
|
36
35
|
"classnames": "^2.5.1",
|
|
37
36
|
"react-icons": "^5.0.1",
|
|
@@ -45,16 +44,29 @@
|
|
|
45
44
|
"devDependencies": {
|
|
46
45
|
"@chromatic-com/storybook": "^4.1.1",
|
|
47
46
|
"@spiffy-ai/commerce-api-client": "^1.1.0-SNAPSHOT.202510160819",
|
|
47
|
+
"@storybook/addon-a11y": "^9.1.4",
|
|
48
|
+
"@storybook/addon-docs": "^9.1.4",
|
|
49
|
+
"@storybook/addon-styling-webpack": "^2.0.0",
|
|
50
|
+
"@storybook/addon-vitest": "^9.1.10",
|
|
48
51
|
"@storybook/react-vite": "^9.1.4",
|
|
49
52
|
"@types/node": "^24.3.2",
|
|
50
53
|
"@types/react": "^19.1.12",
|
|
54
|
+
"@vitejs/plugin-react": "^5.0.0",
|
|
55
|
+
"@vitest/browser": "^3.2.4",
|
|
56
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
57
|
+
"autoprefixer": "^10.4.21",
|
|
58
|
+
"playwright": "^1.56.0",
|
|
51
59
|
"postcss": "^8.5.6",
|
|
52
60
|
"tailwindcss": "^3.4.17",
|
|
53
61
|
"tsdown": "^0.14.2",
|
|
54
62
|
"tsx": "^4.20.6",
|
|
55
63
|
"typescript": "^5.4.3",
|
|
64
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
56
65
|
"vitest": "^3.2.4"
|
|
57
66
|
},
|
|
67
|
+
"optionalDependencies": {
|
|
68
|
+
"@rollup/rollup-linux-x64-gnu": "*"
|
|
69
|
+
},
|
|
58
70
|
"exports": {
|
|
59
71
|
"./Accordion": {
|
|
60
72
|
"import": "./dist/components/Accordion/index.js",
|
|
@@ -46,7 +46,10 @@ export const Accordion = ({ title, content }: AccordionProps) => {
|
|
|
46
46
|
className={titleWrapperClasses}
|
|
47
47
|
onClick={() => setIsOpen(!isOpen)}
|
|
48
48
|
>
|
|
49
|
-
<Typography
|
|
49
|
+
<Typography
|
|
50
|
+
variant="body4"
|
|
51
|
+
className={titleClasses}
|
|
52
|
+
>
|
|
50
53
|
{title}
|
|
51
54
|
</Typography>
|
|
52
55
|
<motion.div
|
|
@@ -37,8 +37,11 @@ export const AppliedFiltersScrollbar = ({
|
|
|
37
37
|
const iconColor = 'currentColor'; // match with text color
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
|
-
<ScrollContainer
|
|
41
|
-
{
|
|
40
|
+
<ScrollContainer
|
|
41
|
+
className={filterBarClassNames}
|
|
42
|
+
hideScrollbars
|
|
43
|
+
>
|
|
44
|
+
{selectedFilterOptions.map(filter => (
|
|
42
45
|
<button
|
|
43
46
|
key={filter.id}
|
|
44
47
|
className={buttonClasses}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import {
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { ButtonBaseOverrides, ButtonBaseProps } from './types';
|
|
4
4
|
import { Typography } from '../Typography';
|
|
5
5
|
|
|
@@ -15,6 +15,7 @@ export const ButtonBase = ({
|
|
|
15
15
|
onClick,
|
|
16
16
|
disablePadding = false,
|
|
17
17
|
}: ButtonBaseProps) => {
|
|
18
|
+
const RenderedIcon = () => icon;
|
|
18
19
|
const buttonRef = useRef<HTMLButtonElement | null>(null);
|
|
19
20
|
|
|
20
21
|
const buttonClassName = classNames({
|
|
@@ -59,10 +60,7 @@ export const ButtonBase = ({
|
|
|
59
60
|
data-testid={dataTestId}
|
|
60
61
|
onClick={onClick}
|
|
61
62
|
>
|
|
62
|
-
{icon &&
|
|
63
|
-
createElement(icon, {
|
|
64
|
-
className: iconClassName,
|
|
65
|
-
})}
|
|
63
|
+
{icon && <RenderedIcon />}
|
|
66
64
|
<Typography className={textClassName}>{text}</Typography>
|
|
67
65
|
</button>
|
|
68
66
|
);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TestProps } from '@envive-ai/react-hooks/types';
|
|
2
1
|
import { ButtonHTMLAttributes, CSSProperties } from 'react';
|
|
3
2
|
|
|
4
3
|
export interface ButtonHoverStyles extends CSSProperties {
|
|
@@ -6,17 +5,18 @@ export interface ButtonHoverStyles extends CSSProperties {
|
|
|
6
5
|
color?: string;
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
export interface ButtonBaseProps
|
|
8
|
+
export interface ButtonBaseProps {
|
|
10
9
|
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
11
10
|
isDisabled?: boolean;
|
|
12
11
|
dataAttributes?: Record<string, string>;
|
|
13
12
|
buttonClass?: string;
|
|
14
13
|
text: string;
|
|
15
14
|
textClass?: string;
|
|
16
|
-
icon?: React.
|
|
15
|
+
icon?: React.ReactNode;
|
|
17
16
|
iconClass?: string;
|
|
18
17
|
onClick?: () => void;
|
|
19
18
|
disablePadding?: boolean;
|
|
19
|
+
dataTestId?: string;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export enum ButtonBaseOverrides {
|
|
@@ -23,7 +23,10 @@ export const DynamicFiltersScrollbar = ({
|
|
|
23
23
|
filterHoverClasses,
|
|
24
24
|
onToggleDynamicFilter,
|
|
25
25
|
}: DynamicFiltersScrollbarProps) => (
|
|
26
|
-
<ScrollContainer
|
|
26
|
+
<ScrollContainer
|
|
27
|
+
className={filterBarClassNames}
|
|
28
|
+
hideScrollbars
|
|
29
|
+
>
|
|
27
30
|
{availableDynamicFilters.map(({ name, displayName }) => {
|
|
28
31
|
const buttonClasses = classNames(
|
|
29
32
|
'spiffy-tw-px-[12px] spiffy-tw-py-2 spiffy-tw-rounded-full spiffy-tw-border spiffy-tw-whitespace-nowrap ',
|
|
@@ -37,8 +37,11 @@ export const AppliedFiltersScrollbar = ({
|
|
|
37
37
|
const iconColor = 'currentColor'; // match with text color
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
|
-
<ScrollContainer
|
|
41
|
-
{
|
|
40
|
+
<ScrollContainer
|
|
41
|
+
className={filterBarClassNames}
|
|
42
|
+
hideScrollbars
|
|
43
|
+
>
|
|
44
|
+
{selectedFilterOptions.map(filter => (
|
|
42
45
|
<button
|
|
43
46
|
key={filter.id}
|
|
44
47
|
className={buttonClasses}
|
|
@@ -23,7 +23,10 @@ export const DynamicFiltersScrollbar = ({
|
|
|
23
23
|
filterHoverClasses,
|
|
24
24
|
onToggleDynamicFilter,
|
|
25
25
|
}: DynamicFiltersScrollbarProps) => (
|
|
26
|
-
<ScrollContainer
|
|
26
|
+
<ScrollContainer
|
|
27
|
+
className={filterBarClassNames}
|
|
28
|
+
hideScrollbars
|
|
29
|
+
>
|
|
27
30
|
{availableDynamicFilters.map(({ name, displayName }) => {
|
|
28
31
|
const buttonClasses = classNames(
|
|
29
32
|
'spiffy-tw-px-[12px] spiffy-tw-py-2 spiffy-tw-rounded-full spiffy-tw-border spiffy-tw-whitespace-nowrap ',
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
1
|
import classNames from 'classnames';
|
|
3
|
-
import
|
|
4
|
-
import { IconContext } from 'react-icons/lib';
|
|
2
|
+
import IconCloseVariant from '@envive-ai/react-icons/IconCloseVariant';
|
|
5
3
|
import { ModalSheetCloseIconProps } from '../types';
|
|
6
4
|
|
|
7
5
|
const closeIconVariantMapping = {
|
|
@@ -21,7 +19,7 @@ const closeIconVariantMapping = {
|
|
|
21
19
|
|
|
22
20
|
export const ModalSheetCloseIcon = ({
|
|
23
21
|
closeIconVariant = 'tertiary',
|
|
24
|
-
closeIcon = <
|
|
22
|
+
closeIcon = <IconCloseVariant />,
|
|
25
23
|
iconSize = '20px',
|
|
26
24
|
closeModal,
|
|
27
25
|
}: ModalSheetCloseIconProps) => {
|
|
@@ -31,10 +29,13 @@ export const ModalSheetCloseIcon = ({
|
|
|
31
29
|
...closeIconVariantMapping[closeIconVariant],
|
|
32
30
|
});
|
|
33
31
|
|
|
34
|
-
const closeIconContextValue = useMemo(() => ({ size: iconSize }), [iconSize]);
|
|
35
32
|
return (
|
|
36
|
-
<button
|
|
37
|
-
|
|
33
|
+
<button
|
|
34
|
+
type="button"
|
|
35
|
+
className={closeIconClassNames}
|
|
36
|
+
onClick={closeModal}
|
|
37
|
+
>
|
|
38
|
+
{closeIcon || <IconCloseVariant style={{ width: iconSize, height: iconSize }} />}
|
|
38
39
|
</button>
|
|
39
40
|
);
|
|
40
41
|
};
|
|
@@ -97,7 +97,7 @@ export const ModalSheetDesktop = ({
|
|
|
97
97
|
exit={{ right, display: isHidden }}
|
|
98
98
|
transition={{ duration: animationDuration, ease: 'easeIn' }}
|
|
99
99
|
style={{ width: desktopWidth }}
|
|
100
|
-
onClick={
|
|
100
|
+
onClick={e => e.stopPropagation()}
|
|
101
101
|
>
|
|
102
102
|
<div className={contentClassNames}>
|
|
103
103
|
<div className={headerClassNames}>
|
|
@@ -94,7 +94,7 @@ export const ModalSheetMobile = ({
|
|
|
94
94
|
animate={{ bottom, display: isHidden }}
|
|
95
95
|
exit={{ bottom, display: isHidden }}
|
|
96
96
|
transition={{ duration: animationDuration, ease: 'easeIn' }}
|
|
97
|
-
onClick={
|
|
97
|
+
onClick={e => e.stopPropagation()}
|
|
98
98
|
>
|
|
99
99
|
<div className={contentClassNames}>
|
|
100
100
|
<div className={headerClassNames}>
|
|
@@ -35,7 +35,10 @@ export const ModalSheetMobileHeader = ({
|
|
|
35
35
|
onTouchStart={handleHeaderClick}
|
|
36
36
|
onMouseDown={handleHeaderClick}
|
|
37
37
|
>
|
|
38
|
-
<AnimatedChevron
|
|
38
|
+
<AnimatedChevron
|
|
39
|
+
animationKey={animationKey}
|
|
40
|
+
chevronColor={chevronColor}
|
|
41
|
+
/>
|
|
39
42
|
{headerContent}
|
|
40
43
|
</motion.div>
|
|
41
44
|
);
|
|
@@ -3,22 +3,21 @@ import { MdStar } from 'react-icons/md';
|
|
|
3
3
|
import Logger from 'src/logging/logger';
|
|
4
4
|
import { Typography } from 'src/components/Typography';
|
|
5
5
|
import { formatPrice } from 'src/util/formatPrice';
|
|
6
|
-
import { TestProps } from '@envive-ai/react-hooks/types';
|
|
7
6
|
import { useImageResolver } from '@envive-ai/react-hooks/hooks/ImageResolver';
|
|
8
7
|
import { PRODUCT_CARD_TESTID } from '@envive-ai/react-hooks/config';
|
|
9
8
|
import {
|
|
9
|
+
productCardLayoutVariantClasses,
|
|
10
10
|
variantClassMap,
|
|
11
11
|
variantHoverClassMap,
|
|
12
|
-
productCardLayoutVariantClasses,
|
|
13
12
|
variantTitleColorMap,
|
|
14
13
|
} from './productCardVariants';
|
|
15
14
|
import { ImageWithFallback } from '../ImageWithFallback';
|
|
16
15
|
import { Spinner } from '../Spinner';
|
|
17
16
|
import {
|
|
18
17
|
ProductCardConfig,
|
|
19
|
-
ProductCardVariant,
|
|
20
18
|
ProductCardHoverVariant,
|
|
21
19
|
ProductCardLayoutVariant,
|
|
20
|
+
ProductCardVariant,
|
|
22
21
|
} from './types';
|
|
23
22
|
|
|
24
23
|
const formatReviews = (stars: number) =>
|
|
@@ -97,7 +96,7 @@ export const PriceSection = ({ originalPrice, salePrice, pricePrefix }: PriceSec
|
|
|
97
96
|
);
|
|
98
97
|
};
|
|
99
98
|
|
|
100
|
-
interface ProductCardProps
|
|
99
|
+
interface ProductCardProps {
|
|
101
100
|
productCardConfig?: ProductCardConfig;
|
|
102
101
|
merchantShortName: string;
|
|
103
102
|
title: string;
|
|
@@ -114,6 +113,7 @@ interface ProductCardProps extends TestProps {
|
|
|
114
113
|
aspectRatio?: '3:4' | 'square' | 'none';
|
|
115
114
|
growWithContainer?: boolean;
|
|
116
115
|
onClick?: () => void;
|
|
116
|
+
dataTestId?: string;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
export const ProductCard = ({
|
|
@@ -213,11 +213,11 @@ export const ProductCard = ({
|
|
|
213
213
|
linkClassnames,
|
|
214
214
|
zoomOnHover
|
|
215
215
|
? [
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
'spiffy-tw-transition-transform',
|
|
217
|
+
'spiffy-tw-duration-200',
|
|
218
|
+
'spiffy-tw-origin-top',
|
|
219
|
+
'hover:spiffy-tw-scale-105',
|
|
220
|
+
]
|
|
221
221
|
: [],
|
|
222
222
|
);
|
|
223
223
|
|
|
@@ -264,8 +264,16 @@ export const ProductCard = ({
|
|
|
264
264
|
);
|
|
265
265
|
|
|
266
266
|
return (
|
|
267
|
-
<div
|
|
268
|
-
|
|
267
|
+
<div
|
|
268
|
+
className={containerClassnames}
|
|
269
|
+
data-testid={dataTestId ?? PRODUCT_CARD_TESTID}
|
|
270
|
+
>
|
|
271
|
+
<a
|
|
272
|
+
href={url}
|
|
273
|
+
onClick={() => handleClick()}
|
|
274
|
+
target="_self"
|
|
275
|
+
draggable={false}
|
|
276
|
+
>
|
|
269
277
|
<div className={verticalContainerClassnames}>
|
|
270
278
|
<div className={imageClipContainerClassnames}>
|
|
271
279
|
<div className={imageContainerClassnames}>
|
|
@@ -273,14 +281,17 @@ export const ProductCard = ({
|
|
|
273
281
|
<ImageWithFallback
|
|
274
282
|
src={resolve(imageUrl, layoutVariant === 'tall' ? 300 : 178)}
|
|
275
283
|
alt={title}
|
|
276
|
-
fallback={<Spinner className="spiffy-tw-
|
|
284
|
+
fallback={<Spinner className="spiffy-tw-h-6 spiffy-tw-w-6" />}
|
|
277
285
|
imageClassnames={imageClassnames}
|
|
278
286
|
/>
|
|
279
287
|
)}
|
|
280
288
|
</div>
|
|
281
289
|
</div>
|
|
282
290
|
<div className={contentClassnames}>
|
|
283
|
-
<Typography
|
|
291
|
+
<Typography
|
|
292
|
+
variant="h4"
|
|
293
|
+
className={productTitleClassnames}
|
|
294
|
+
>
|
|
284
295
|
{title}
|
|
285
296
|
</Typography>
|
|
286
297
|
<div className={priceAndRatingContainerClassnames}>
|
|
@@ -292,7 +303,10 @@ export const ProductCard = ({
|
|
|
292
303
|
/>
|
|
293
304
|
)}
|
|
294
305
|
{averageRating && numberReviews && (
|
|
295
|
-
<RatingSummary
|
|
306
|
+
<RatingSummary
|
|
307
|
+
stars={averageRating}
|
|
308
|
+
reviewCount={numberReviews}
|
|
309
|
+
/>
|
|
296
310
|
)}
|
|
297
311
|
</div>
|
|
298
312
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import { SearchResponseProductAttributes } from '@envive-ai/react-hooks/application/models';
|
|
3
3
|
import { productGridVariantClasses } from './productGridVariants';
|
|
4
|
-
import {
|
|
4
|
+
import { ProductCard, ProductCardConfig, ProductGridVariant } from '../ProductCard';
|
|
5
5
|
|
|
6
6
|
interface ProductGridProps {
|
|
7
7
|
productList: SearchResponseProductAttributes['attributes'][];
|
|
@@ -38,7 +38,10 @@ export const ProductGrid = ({
|
|
|
38
38
|
return (
|
|
39
39
|
<div className={productGridClasses}>
|
|
40
40
|
{productList.map((product: (typeof productList)[0], index: number) => (
|
|
41
|
-
<div
|
|
41
|
+
<div
|
|
42
|
+
key={product.id}
|
|
43
|
+
className={cardContainerClasses}
|
|
44
|
+
>
|
|
42
45
|
<ProductCard
|
|
43
46
|
productCardConfig={productCardConfig}
|
|
44
47
|
merchantShortName={merchantShortName}
|
|
@@ -82,9 +82,22 @@ export const RadioButton = ({
|
|
|
82
82
|
fill="none"
|
|
83
83
|
>
|
|
84
84
|
{/* Outer circle (border). Gray when unchecked */}
|
|
85
|
-
<circle
|
|
85
|
+
<circle
|
|
86
|
+
cx="12"
|
|
87
|
+
cy="12"
|
|
88
|
+
r="11.5"
|
|
89
|
+
fill="white"
|
|
90
|
+
stroke={getFillColor()}
|
|
91
|
+
/>
|
|
86
92
|
{/* Inner filled circle (when checked) */}
|
|
87
|
-
{checked &&
|
|
93
|
+
{checked && (
|
|
94
|
+
<circle
|
|
95
|
+
cx="12"
|
|
96
|
+
cy="12"
|
|
97
|
+
r="9"
|
|
98
|
+
fill={getFillColor()}
|
|
99
|
+
/>
|
|
100
|
+
)}
|
|
88
101
|
</svg>
|
|
89
102
|
</div>
|
|
90
103
|
<Typography variant="body3">{label}</Typography>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { SearchResponseProductAttributes } from
|
|
2
|
-
import { ProductCardConfig, ProductGridVariant } from
|
|
3
|
-
import classNames from
|
|
4
|
-
import { motion } from
|
|
5
|
-
import { ProductGrid } from
|
|
6
|
-
import { Typography } from
|
|
7
|
-
|
|
1
|
+
import { SearchResponseProductAttributes } from '@envive-ai/react-hooks/application/models';
|
|
2
|
+
import { ProductCardConfig, ProductGridVariant } from '@envive-ai/react-hooks/contexts/types';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { motion } from 'framer-motion';
|
|
5
|
+
import { ProductGrid } from '../ProductGrid';
|
|
6
|
+
import { Typography } from '../Typography';
|
|
8
7
|
|
|
9
8
|
interface RecommendedProductsProps {
|
|
10
9
|
retrievedProducts: SearchResponseProductAttributes['attributes'][];
|
|
@@ -79,7 +78,10 @@ export const RecommendedProducts: React.FC<RecommendedProductsProps> = ({
|
|
|
79
78
|
>
|
|
80
79
|
{heading && (
|
|
81
80
|
<div className={titleContainerClasses}>
|
|
82
|
-
<Typography
|
|
81
|
+
<Typography
|
|
82
|
+
variant="h1"
|
|
83
|
+
className="spiffy-tw-text-[--spiffy-colors-text-accent]"
|
|
84
|
+
>
|
|
83
85
|
{heading}
|
|
84
86
|
</Typography>
|
|
85
87
|
</div>
|
|
@@ -94,4 +96,4 @@ export const RecommendedProducts: React.FC<RecommendedProductsProps> = ({
|
|
|
94
96
|
/>
|
|
95
97
|
</motion.div>
|
|
96
98
|
);
|
|
97
|
-
};
|
|
99
|
+
};
|