@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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable react/no-array-index-key */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { motion } from 'framer-motion';
|
|
3
4
|
import classNames from 'classnames';
|
|
@@ -39,7 +40,10 @@ export const SearchAutocomplete = ({
|
|
|
39
40
|
{parts.map((part, index) => {
|
|
40
41
|
const isMatch = part.toLowerCase() === searchQuery.toLowerCase();
|
|
41
42
|
return isMatch ? (
|
|
42
|
-
<strong
|
|
43
|
+
<strong
|
|
44
|
+
key={index}
|
|
45
|
+
className="spiffy-tw-font-bold"
|
|
46
|
+
>
|
|
43
47
|
{part}
|
|
44
48
|
</strong>
|
|
45
49
|
) : (
|
|
@@ -50,21 +54,19 @@ export const SearchAutocomplete = ({
|
|
|
50
54
|
);
|
|
51
55
|
};
|
|
52
56
|
|
|
53
|
-
const containerClasses = classNames(
|
|
54
|
-
'spiffy-tw-mt-[16px]',
|
|
55
|
-
'spiffy-tw-mb-[8px]',
|
|
56
|
-
);
|
|
57
|
+
const containerClasses = classNames('spiffy-tw-mt-[16px]', 'spiffy-tw-mb-[8px]');
|
|
57
58
|
|
|
58
|
-
const getListElementClasses = (index: number) =>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
const getListElementClasses = (index: number) =>
|
|
60
|
+
classNames(
|
|
61
|
+
'spiffy-tw-flex',
|
|
62
|
+
'spiffy-tw-items-center',
|
|
63
|
+
'spiffy-tw-cursor-pointer',
|
|
64
|
+
'spiffy-tw-py-[8px]',
|
|
65
|
+
'spiffy-tw-pl-[16px]',
|
|
66
|
+
'spiffy-tw-text-[--spiffy-colors-text-primary]',
|
|
67
|
+
'hover:spiffy-tw-bg-neutral-100',
|
|
68
|
+
{ 'spiffy-tw-bg-neutral-200': focusedIndex === index },
|
|
69
|
+
);
|
|
68
70
|
|
|
69
71
|
return (
|
|
70
72
|
<motion.div
|
|
@@ -74,7 +76,11 @@ export const SearchAutocomplete = ({
|
|
|
74
76
|
exit={{ opacity: 0, y: -10 }}
|
|
75
77
|
transition={{ duration: 0.2 }}
|
|
76
78
|
>
|
|
77
|
-
<ul
|
|
79
|
+
<ul
|
|
80
|
+
id={id}
|
|
81
|
+
role="listbox"
|
|
82
|
+
className={containerClasses}
|
|
83
|
+
>
|
|
78
84
|
{results.map((result, index) => (
|
|
79
85
|
<li
|
|
80
86
|
key={index}
|
|
@@ -83,14 +89,14 @@ export const SearchAutocomplete = ({
|
|
|
83
89
|
aria-selected={index === focusedIndex}
|
|
84
90
|
className={getListElementClasses(index)}
|
|
85
91
|
onClick={() => onSuggestionSelect(result, index)}
|
|
86
|
-
onKeyDown={
|
|
92
|
+
onKeyDown={event => {
|
|
87
93
|
if (event.key === 'Enter' || event.keyCode === 13) {
|
|
88
94
|
onSuggestionSelect(result, index);
|
|
89
95
|
}
|
|
90
96
|
}}
|
|
91
97
|
>
|
|
92
98
|
<OutlinedStar
|
|
93
|
-
className="spiffy-tw-
|
|
99
|
+
className="spiffy-tw-mr-[16px] spiffy-tw-h-[16px] spiffy-tw-w-[16px]"
|
|
94
100
|
fill={iconColor}
|
|
95
101
|
/>
|
|
96
102
|
{highlightMatchingText(result, searchText)}
|
|
@@ -99,4 +105,4 @@ export const SearchAutocomplete = ({
|
|
|
99
105
|
</ul>
|
|
100
106
|
</motion.div>
|
|
101
107
|
);
|
|
102
|
-
};
|
|
108
|
+
};
|
|
@@ -20,7 +20,7 @@ const SortFilter = ({
|
|
|
20
20
|
}: FilterProps) => {
|
|
21
21
|
const filterTitle = filter.displayName;
|
|
22
22
|
|
|
23
|
-
const options = filter.items.map(
|
|
23
|
+
const options = filter.items.map(item => ({
|
|
24
24
|
label: item.displayName,
|
|
25
25
|
value: item.filterItemId,
|
|
26
26
|
isSelected: item.isSelected,
|
|
@@ -30,8 +30,8 @@ const SortFilter = ({
|
|
|
30
30
|
<RadioButtonGroup
|
|
31
31
|
options={options}
|
|
32
32
|
name={filterTitle}
|
|
33
|
-
onChange={
|
|
34
|
-
const selectedItem = filter.items.find(
|
|
33
|
+
onChange={value => {
|
|
34
|
+
const selectedItem = filter.items.find(item => item.filterItemId === value);
|
|
35
35
|
selectFilterItem({
|
|
36
36
|
filterId: filter.filterId,
|
|
37
37
|
filterItemId: value,
|
|
@@ -41,14 +41,19 @@ const SortFilter = ({
|
|
|
41
41
|
}}
|
|
42
42
|
gap="large"
|
|
43
43
|
textButtonGap="large"
|
|
44
|
-
value={filter.items.find(
|
|
44
|
+
value={filter.items.find(item => item.isSelected)?.filterItemId}
|
|
45
45
|
fillColor={radioButtonFillColor}
|
|
46
46
|
hoverColor={radioButtonHoverColor}
|
|
47
47
|
uncheckedBorderColor={radioButtonUncheckedBorderColor}
|
|
48
48
|
/>
|
|
49
49
|
);
|
|
50
50
|
|
|
51
|
-
return
|
|
51
|
+
return (
|
|
52
|
+
<Accordion
|
|
53
|
+
title={filterTitle}
|
|
54
|
+
content={content}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
52
57
|
};
|
|
53
58
|
|
|
54
59
|
const FilterItem = ({ filterId, filterItem, selectFilterItem }: FilterItemProps) => (
|
|
@@ -82,7 +87,7 @@ const Filter = ({ filter, selectFilterItem }: FilterProps) => {
|
|
|
82
87
|
selectedFilterItems > 0 ? `${filter.displayName} (${selectedFilterItems})` : filter.displayName;
|
|
83
88
|
const content = (
|
|
84
89
|
<div className={filterContentClassName}>
|
|
85
|
-
{filter.items.map(
|
|
90
|
+
{filter.items.map(item => (
|
|
86
91
|
<FilterItem
|
|
87
92
|
key={item.filterItemId}
|
|
88
93
|
filterId={filter.filterId}
|
|
@@ -92,7 +97,12 @@ const Filter = ({ filter, selectFilterItem }: FilterProps) => {
|
|
|
92
97
|
))}
|
|
93
98
|
</div>
|
|
94
99
|
);
|
|
95
|
-
return
|
|
100
|
+
return (
|
|
101
|
+
<Accordion
|
|
102
|
+
title={filterTitle}
|
|
103
|
+
content={content}
|
|
104
|
+
/>
|
|
105
|
+
);
|
|
96
106
|
};
|
|
97
107
|
|
|
98
108
|
export const SearchFilter = ({
|
|
@@ -157,8 +167,8 @@ export const SearchFilter = ({
|
|
|
157
167
|
>
|
|
158
168
|
<div className={filterWrapperClassName}>
|
|
159
169
|
{filters
|
|
160
|
-
.filter(
|
|
161
|
-
.map(
|
|
170
|
+
.filter(filter => filter.displayName !== '')
|
|
171
|
+
.map(filter => {
|
|
162
172
|
if (filter.filterId === 'sort') {
|
|
163
173
|
return (
|
|
164
174
|
<SortFilter
|
|
@@ -172,7 +182,11 @@ export const SearchFilter = ({
|
|
|
172
182
|
);
|
|
173
183
|
}
|
|
174
184
|
return (
|
|
175
|
-
<Filter
|
|
185
|
+
<Filter
|
|
186
|
+
key={filter.filterId}
|
|
187
|
+
filter={filter}
|
|
188
|
+
selectFilterItem={selectFilterItem}
|
|
189
|
+
/>
|
|
176
190
|
);
|
|
177
191
|
})}
|
|
178
192
|
</div>
|
|
@@ -20,7 +20,10 @@ export const SearchFilterHeader = ({
|
|
|
20
20
|
headerClassName,
|
|
21
21
|
)}
|
|
22
22
|
>
|
|
23
|
-
<Typography
|
|
23
|
+
<Typography
|
|
24
|
+
variant="body2"
|
|
25
|
+
className="spiffy-tw-font-medium"
|
|
26
|
+
>
|
|
24
27
|
Filters ({productCount})
|
|
25
28
|
</Typography>
|
|
26
29
|
<button
|
|
@@ -28,13 +28,13 @@ export const SearchFilterItem = ({
|
|
|
28
28
|
aria-selected={isSelected}
|
|
29
29
|
className="spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-py-2"
|
|
30
30
|
onClick={() => onSelectFilterItem(filterItem)}
|
|
31
|
-
onKeyDown={
|
|
31
|
+
onKeyDown={event => {
|
|
32
32
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
33
33
|
event.preventDefault();
|
|
34
34
|
onSelectFilterItem(filterItem);
|
|
35
35
|
}
|
|
36
36
|
}}
|
|
37
|
-
onKeyUp={
|
|
37
|
+
onKeyUp={event => {
|
|
38
38
|
if (event.key === ' ') {
|
|
39
39
|
event.preventDefault();
|
|
40
40
|
}
|
|
@@ -44,7 +44,7 @@ export const SearchFilterItem = ({
|
|
|
44
44
|
<div className={radioClasses}>
|
|
45
45
|
{isSelected && (
|
|
46
46
|
<div
|
|
47
|
-
className={classNames('spiffy-tw-
|
|
47
|
+
className={classNames('spiffy-tw-h-2 spiffy-tw-w-2 spiffy-tw-rounded-full', {
|
|
48
48
|
'spiffy-tw-bg-white': radioButtonFillColor.includes('spiffy-tw-bg-'),
|
|
49
49
|
'spiffy-tw-bg-black': radioButtonFillColor.includes('spiffy-tw-bg-white'),
|
|
50
50
|
})}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
2
2
|
import { SearchFilterDatum } from '@envive-ai/react-hooks/types';
|
|
3
3
|
|
|
4
4
|
export const useHasFilterStateChanged = (filters: SearchFilterDatum[], isOpen: boolean) => {
|
|
@@ -8,8 +8,8 @@ export const useHasFilterStateChanged = (filters: SearchFilterDatum[], isOpen: b
|
|
|
8
8
|
// Create current filter states map to check for filter changes
|
|
9
9
|
const currentFilterStates = useMemo(() => {
|
|
10
10
|
const states: Record<string, boolean> = {};
|
|
11
|
-
filters.forEach(
|
|
12
|
-
filter.items.forEach(
|
|
11
|
+
filters.forEach(filter => {
|
|
12
|
+
filter.items.forEach(item => {
|
|
13
13
|
states[`${filter.filterId}-${item.filterItemId}`] = item.isSelected;
|
|
14
14
|
});
|
|
15
15
|
});
|
|
@@ -24,7 +24,7 @@ export const useHasFilterStateChanged = (filters: SearchFilterDatum[], isOpen: b
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
const changed = Object.keys(currentFilterStates).some(
|
|
27
|
-
|
|
27
|
+
key => currentFilterStates[key] !== initialFilterStates[key],
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
return changed;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable react/display-name */
|
|
2
|
+
import React, { useImperativeHandle, useRef } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import MagnifyingGlassStarVariant from '@envive-ai/react-icons/MagnifyingGlassStarVariant';
|
|
4
5
|
import IconClose from '@envive-ai/react-icons/IconClose';
|
|
@@ -87,7 +88,10 @@ export const SearchInput = React.forwardRef<HTMLInputElement, SearchInputProps>(
|
|
|
87
88
|
]);
|
|
88
89
|
|
|
89
90
|
return (
|
|
90
|
-
<div
|
|
91
|
+
<div
|
|
92
|
+
className={containerClasses}
|
|
93
|
+
data-testid={dataTestId}
|
|
94
|
+
>
|
|
91
95
|
<div className="spiffy-tw-absolute spiffy-tw-left-3 spiffy-tw-top-1/2 spiffy-tw--translate-y-1/2">
|
|
92
96
|
<MagnifyingGlassStarVariant
|
|
93
97
|
className={
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColorNames, colorVar } from 'src/models/colorsConfig';
|
|
2
2
|
import { SearchInputVariant } from '../../atoms/search/types';
|
|
3
3
|
import { TypographyVariantMap } from '../Typography/typographyVariantClasses';
|
|
4
4
|
|
|
@@ -40,15 +40,12 @@ export const SearchInputForm = ({
|
|
|
40
40
|
}: SearchInputFormProps) => {
|
|
41
41
|
const { autocompleteIconColor } = searchInputVariantClasses[searchInputVariant];
|
|
42
42
|
|
|
43
|
-
const containerClasses = classNames(
|
|
44
|
-
'spiffy-tw-relative',
|
|
45
|
-
'spiffy-tw-w-full'
|
|
46
|
-
);
|
|
43
|
+
const containerClasses = classNames('spiffy-tw-relative', 'spiffy-tw-w-full');
|
|
47
44
|
|
|
48
45
|
const formClasses = classNames({
|
|
49
46
|
'spiffy-tw-grow': true,
|
|
50
47
|
'spiffy-tw-relative': true,
|
|
51
|
-
'spiffy-tw-z-20': shouldShowAutocomplete
|
|
48
|
+
'spiffy-tw-z-20': shouldShowAutocomplete,
|
|
52
49
|
});
|
|
53
50
|
|
|
54
51
|
const autocompleteContainerClasses = classNames(
|
|
@@ -62,13 +59,13 @@ export const SearchInputForm = ({
|
|
|
62
59
|
'spiffy-tw-rounded-b-lg',
|
|
63
60
|
'spiffy-tw-border',
|
|
64
61
|
'spiffy-tw-border-t-0',
|
|
65
|
-
'spiffy-tw-pt-4'
|
|
62
|
+
'spiffy-tw-pt-4',
|
|
66
63
|
);
|
|
67
64
|
|
|
68
65
|
return (
|
|
69
66
|
<div className={containerClasses}>
|
|
70
67
|
<form
|
|
71
|
-
onSubmit={
|
|
68
|
+
onSubmit={e => {
|
|
72
69
|
e.preventDefault();
|
|
73
70
|
onSearchSubmit();
|
|
74
71
|
}}
|
|
@@ -19,7 +19,7 @@ export const SearchResultsFilterButton = ({
|
|
|
19
19
|
return (
|
|
20
20
|
<ButtonBase
|
|
21
21
|
onClick={openFilter}
|
|
22
|
-
icon={SettingsVariant}
|
|
22
|
+
icon={<SettingsVariant />}
|
|
23
23
|
iconClass="spiffy-tw-w-[28px] spiffy-tw-h-[28px] spiffy-tw-object-center"
|
|
24
24
|
text={filterButtonText}
|
|
25
25
|
textClass="spiffy-tw-uppercase spiffy-tw-text-[--spiffy-colors-text-primary] spiffy-tw-hidden md:spiffy-tw-block"
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { SearchFilterDatum, SelectFilterItem } from '@envive-ai/react-hooks/types';
|
|
2
2
|
import { SearchFilter, SearchFilterHeader } from '../SearchFilter';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
SearchFilterSidebarVariant,
|
|
5
|
+
searchFilterSidebarVariantClasses,
|
|
6
|
+
} from '../SearchResultsFilterSidebar';
|
|
4
7
|
|
|
5
8
|
export type SearchResultsFilterModalProps = {
|
|
6
9
|
productCount: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback } from 'react';
|
|
2
2
|
|
|
3
3
|
import { SearchFilterDatum, SelectFilterItem } from '@envive-ai/react-hooks/types';
|
|
4
|
-
import SettingsVariant from '@envive-ai/react-icons/
|
|
4
|
+
import SettingsVariant from '@envive-ai/react-icons/SettingsVariant';
|
|
5
5
|
import { searchFilterSidebarVariantClasses } from './searchFilterSidebarVariants';
|
|
6
6
|
import { ButtonBase } from '../ButtonBase';
|
|
7
7
|
import { SearchFilter, SearchFilterHeader } from '../SearchFilter';
|
|
@@ -69,7 +69,7 @@ export const SearchResultsFilter = ({
|
|
|
69
69
|
/>
|
|
70
70
|
<ButtonBase
|
|
71
71
|
onClick={openFilter}
|
|
72
|
-
icon={SettingsVariant}
|
|
72
|
+
icon={<SettingsVariant />}
|
|
73
73
|
iconClass="spiffy-tw-w-[28px] spiffy-tw-h-[28px] spiffy-tw-object-center"
|
|
74
74
|
text={filterButtonText}
|
|
75
75
|
textClass="spiffy-tw-uppercase spiffy-tw-text-[--spiffy-colors-text-primary] spiffy-tw-hidden md:spiffy-tw-block"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColorNames, colorVar } from 'src/models/colorsConfig';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CloseIconVariant, SearchFilterSidebarVariant } from './types';
|
|
3
3
|
|
|
4
4
|
interface SearchFilterSidebarVariantClasses {
|
|
5
5
|
searchFilterHeaderClasses: string;
|
|
@@ -56,7 +56,7 @@ export const NoSearchResultsFound = ({
|
|
|
56
56
|
<div className="spiffy-tw-flex spiffy-tw-items-start spiffy-tw-gap-2">
|
|
57
57
|
<div>
|
|
58
58
|
<Sparkles
|
|
59
|
-
className="spiffy-tw-
|
|
59
|
+
className="spiffy-tw-h-[24px] spiffy-tw-w-[24px]"
|
|
60
60
|
style={{ color: sparkleIconColor }}
|
|
61
61
|
/>
|
|
62
62
|
</div>
|
|
@@ -70,4 +70,4 @@ export const NoSearchResultsFound = ({
|
|
|
70
70
|
/>
|
|
71
71
|
</div>
|
|
72
72
|
);
|
|
73
|
-
};
|
|
73
|
+
};
|
|
@@ -74,7 +74,7 @@ export const SearchResultsGrid = ({
|
|
|
74
74
|
|
|
75
75
|
return (
|
|
76
76
|
<motion.div
|
|
77
|
-
className="spiffy-tw-
|
|
77
|
+
className="spiffy-tw-w-full spiffy-tw-justify-center spiffy-tw-overflow-hidden"
|
|
78
78
|
initial={{ opacity: 0 }}
|
|
79
79
|
animate={{ opacity: 1 }}
|
|
80
80
|
exit={{ opacity: 0 }}
|
|
@@ -105,4 +105,4 @@ export const SearchResultsGrid = ({
|
|
|
105
105
|
/>
|
|
106
106
|
</motion.div>
|
|
107
107
|
);
|
|
108
|
-
};
|
|
108
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/* eslint-disable react/no-array-index-key */
|
|
1
2
|
import { motion } from 'framer-motion';
|
|
2
3
|
import { Typography } from 'src/components/Typography';
|
|
3
|
-
import {
|
|
4
|
+
import { ProductCardSkeleton, ProductGridVariant } from '../ProductCard';
|
|
4
5
|
import { productGridVariantClasses } from '../ProductGrid';
|
|
5
6
|
import { SparkleAnimation } from '../SparkleAnimation';
|
|
6
7
|
|
|
@@ -18,17 +19,20 @@ export const SearchResultsLoadingGrid = ({
|
|
|
18
19
|
|
|
19
20
|
return (
|
|
20
21
|
<motion.div
|
|
21
|
-
className="spiffy-tw-
|
|
22
|
+
className="spiffy-tw-w-full spiffy-tw-justify-center spiffy-tw-overflow-hidden"
|
|
22
23
|
initial={{ opacity: 0 }}
|
|
23
24
|
animate={{ opacity: 1 }}
|
|
24
25
|
exit={{ opacity: 0 }}
|
|
25
26
|
transition={{ duration: 0.2 }}
|
|
26
27
|
>
|
|
27
28
|
<div className="spiffy-tw-mt-6 spiffy-tw-w-full">
|
|
28
|
-
<div className="spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between
|
|
29
|
-
<div className="spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-2
|
|
29
|
+
<div className="spiffy-tw-mb-4 spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between">
|
|
30
|
+
<div className="spiffy-tw-ml-[16px] spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-2 md:spiffy-tw-ml-[80px]">
|
|
30
31
|
<div className="spiffy-tw-width-[24px]">
|
|
31
|
-
<SparkleAnimation
|
|
32
|
+
<SparkleAnimation
|
|
33
|
+
color={sparkleIconColor}
|
|
34
|
+
animate
|
|
35
|
+
/>
|
|
32
36
|
</div>
|
|
33
37
|
<Typography variant="body2">Finding the best options for you...</Typography>
|
|
34
38
|
</div>
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { SearchInputVariant } from '@envive-ai/react-hooks/contexts/types';
|
|
4
4
|
import { SearchResultsFilterButton } from '../SearchResultsFilterButton';
|
|
5
5
|
import { SearchInputForm } from '../SearchInputForm';
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
interface SearchResultsToolbarProps {
|
|
9
8
|
// From widgetConfig
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
searchInputVariant: SearchInputVariant;
|
|
10
|
+
searchBoxPlaceholder: string;
|
|
12
11
|
// From search hook
|
|
13
12
|
searchText: string;
|
|
14
13
|
focusedIndex: number;
|
|
@@ -59,7 +58,7 @@ export const SearchResultsToolbar = ({
|
|
|
59
58
|
className,
|
|
60
59
|
}: SearchResultsToolbarProps) => {
|
|
61
60
|
const [hasZIndex, setHasZIndex] = React.useState(false);
|
|
62
|
-
|
|
61
|
+
const searchInputRef = useRef<HTMLInputElement>(null);
|
|
63
62
|
// The following is to ensure the z-index is applied after the animation is complete
|
|
64
63
|
// because otherwise the z-index would be applied instantly when the component is mounted
|
|
65
64
|
// which would cause the search toolbar to appear over the top of the merchant header
|
|
@@ -84,7 +83,10 @@ export const SearchResultsToolbar = ({
|
|
|
84
83
|
const contentWrapperClasses = classNames('spiffy-tw-flex', containerXPaddingClasses);
|
|
85
84
|
|
|
86
85
|
return (
|
|
87
|
-
<div
|
|
86
|
+
<div
|
|
87
|
+
className={toolbarClasses}
|
|
88
|
+
ref={toolbarRef}
|
|
89
|
+
>
|
|
88
90
|
<div className={contentWrapperClasses}>
|
|
89
91
|
<SearchInputForm
|
|
90
92
|
searchInputVariant={searchInputVariant}
|
|
@@ -100,6 +102,7 @@ export const SearchResultsToolbar = ({
|
|
|
100
102
|
shouldShowAutocomplete={shouldShowAutocomplete}
|
|
101
103
|
onSearchSubmit={onSubmitSearch}
|
|
102
104
|
onAutocompleteSelect={onAutocompleteSelect}
|
|
105
|
+
searchInputRef={searchInputRef}
|
|
103
106
|
/>
|
|
104
107
|
<SearchResultsFilterButton
|
|
105
108
|
setIsOpen={setIsFilterOpen}
|
|
@@ -108,4 +111,4 @@ export const SearchResultsToolbar = ({
|
|
|
108
111
|
</div>
|
|
109
112
|
</div>
|
|
110
113
|
);
|
|
111
|
-
};
|
|
114
|
+
};
|
|
@@ -59,13 +59,16 @@ export const SparkleAnimation = ({ color, className, animate = true }: SparkleAn
|
|
|
59
59
|
<div
|
|
60
60
|
className={classNames(
|
|
61
61
|
SparkleAnimationOverride.STAR_ONE_CONTAINER,
|
|
62
|
-
'spiffy-tw-absolute -spiffy-tw-top-[2px]
|
|
62
|
+
'spiffy-tw-left-0 spiffy-tw-absolute -spiffy-tw-top-[2px]',
|
|
63
63
|
)}
|
|
64
64
|
>
|
|
65
|
-
<motion.div
|
|
65
|
+
<motion.div
|
|
66
|
+
animate={{ scale: mainStarScale }}
|
|
67
|
+
transition={starTransition}
|
|
68
|
+
>
|
|
66
69
|
<FourPointStar
|
|
67
70
|
fill={color}
|
|
68
|
-
className="spiffy-tw-
|
|
71
|
+
className="spiffy-tw-inline-block spiffy-tw-h-4 spiffy-tw-w-4"
|
|
69
72
|
/>
|
|
70
73
|
</motion.div>
|
|
71
74
|
</div>
|
|
@@ -77,10 +80,13 @@ export const SparkleAnimation = ({ color, className, animate = true }: SparkleAn
|
|
|
77
80
|
'spiffy-tw-absolute -spiffy-tw-top-[7px] spiffy-tw-left-[10px]',
|
|
78
81
|
)}
|
|
79
82
|
>
|
|
80
|
-
<motion.div
|
|
83
|
+
<motion.div
|
|
84
|
+
animate={{ scale: smallStar1Scale }}
|
|
85
|
+
transition={starTransition}
|
|
86
|
+
>
|
|
81
87
|
<FourPointStar
|
|
82
88
|
fill={color}
|
|
83
|
-
className="spiffy-tw-
|
|
89
|
+
className="spiffy-tw-inline-block spiffy-tw-h-2 spiffy-tw-w-2"
|
|
84
90
|
/>
|
|
85
91
|
</motion.div>
|
|
86
92
|
</div>
|
|
@@ -89,13 +95,16 @@ export const SparkleAnimation = ({ color, className, animate = true }: SparkleAn
|
|
|
89
95
|
<div
|
|
90
96
|
className={classNames(
|
|
91
97
|
SparkleAnimationOverride.STAR_THREE_CONTAINER,
|
|
92
|
-
'spiffy-tw-absolute spiffy-tw-
|
|
98
|
+
'spiffy-tw-absolute spiffy-tw-left-[12px] spiffy-tw-top-[1px]',
|
|
93
99
|
)}
|
|
94
100
|
>
|
|
95
|
-
<motion.div
|
|
101
|
+
<motion.div
|
|
102
|
+
animate={{ scale: smallStar2Scale }}
|
|
103
|
+
transition={starTransition}
|
|
104
|
+
>
|
|
96
105
|
<FourPointStar
|
|
97
106
|
fill={color}
|
|
98
|
-
className="spiffy-tw-
|
|
107
|
+
className="spiffy-tw-inline-block spiffy-tw-h-2 spiffy-tw-w-2"
|
|
99
108
|
/>
|
|
100
109
|
</motion.div>
|
|
101
110
|
</div>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import OutlinedStar from '@envive-ai/react-icons/OutlinedStar';
|
|
3
3
|
import FourPointStar from '@envive-ai/react-icons/FourPointStar';
|
|
4
|
-
import { TestProps } from '@envive-ai/react-hooks/types';
|
|
5
4
|
import type { SuggestionButtonVariant } from './types';
|
|
6
5
|
import { ButtonBase } from '../ButtonBase/ButtonBase';
|
|
7
6
|
|
|
@@ -163,7 +162,16 @@ const variantClassMap = new Map<SuggestionButtonVariant, string[]>([
|
|
|
163
162
|
],
|
|
164
163
|
]);
|
|
165
164
|
|
|
166
|
-
|
|
165
|
+
// Choose icon based on variant to match legacy exactly
|
|
166
|
+
const Icon = ({ isAnswer, variant }: { isAnswer: boolean; variant: SuggestionButtonVariant }) => {
|
|
167
|
+
if (isAnswer) return undefined;
|
|
168
|
+
if (variant === 'transparentDark') {
|
|
169
|
+
return <OutlinedStar />;
|
|
170
|
+
}
|
|
171
|
+
return <FourPointStar />;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
interface SuggestionButtonProps {
|
|
167
175
|
variant: SuggestionButtonVariant;
|
|
168
176
|
hoverVariant: SuggestionButtonVariant;
|
|
169
177
|
isDisabled: boolean;
|
|
@@ -173,6 +181,7 @@ interface SuggestionButtonProps extends TestProps {
|
|
|
173
181
|
isAnswer?: boolean;
|
|
174
182
|
dataAttributes?: Record<string, string>;
|
|
175
183
|
onClick: () => void;
|
|
184
|
+
dataTestId?: string;
|
|
176
185
|
}
|
|
177
186
|
|
|
178
187
|
const borderedVariants = [
|
|
@@ -193,7 +202,7 @@ const borderedVariants = [
|
|
|
193
202
|
];
|
|
194
203
|
|
|
195
204
|
const hoverTransform = (variantClass: string[]): string[] =>
|
|
196
|
-
variantClass?.map(
|
|
205
|
+
variantClass?.map(className => `hover:${className}`);
|
|
197
206
|
|
|
198
207
|
export const SuggestionButton = ({
|
|
199
208
|
variant,
|
|
@@ -233,10 +242,10 @@ export const SuggestionButton = ({
|
|
|
233
242
|
const hoverClasses = variantClassMap.get(hoverVariant) ?? [];
|
|
234
243
|
|
|
235
244
|
// Separate border classes for proper cascading
|
|
236
|
-
const baseBorderClasses = baseClasses.filter(
|
|
237
|
-
const baseNonBorderClasses = baseClasses.filter(
|
|
238
|
-
const hoverBorderClasses = hoverClasses.filter(
|
|
239
|
-
const hoverNonBorderClasses = hoverClasses.filter(
|
|
245
|
+
const baseBorderClasses = baseClasses.filter(cls => cls.includes('border'));
|
|
246
|
+
const baseNonBorderClasses = baseClasses.filter(cls => !cls.includes('border'));
|
|
247
|
+
const hoverBorderClasses = hoverClasses.filter(cls => cls.includes('border'));
|
|
248
|
+
const hoverNonBorderClasses = hoverClasses.filter(cls => !cls.includes('border'));
|
|
240
249
|
|
|
241
250
|
const variantClasses = [
|
|
242
251
|
...baseNonBorderClasses,
|
|
@@ -247,15 +256,6 @@ export const SuggestionButton = ({
|
|
|
247
256
|
|
|
248
257
|
const buttonClass = `${buttonClassName} ${variantClasses.join(' ')}`;
|
|
249
258
|
|
|
250
|
-
// Choose icon based on variant to match legacy exactly
|
|
251
|
-
const getIcon = () => {
|
|
252
|
-
if (isAnswer) return undefined;
|
|
253
|
-
if (variant === 'transparentDark') {
|
|
254
|
-
return OutlinedStar;
|
|
255
|
-
}
|
|
256
|
-
return FourPointStar;
|
|
257
|
-
};
|
|
258
|
-
|
|
259
259
|
return (
|
|
260
260
|
<ButtonBase
|
|
261
261
|
text={content}
|
|
@@ -263,7 +263,12 @@ export const SuggestionButton = ({
|
|
|
263
263
|
dataTestId={dataTestId}
|
|
264
264
|
isDisabled={isDisabled}
|
|
265
265
|
// we may want to support custom icons in the future
|
|
266
|
-
icon={
|
|
266
|
+
icon={
|
|
267
|
+
<Icon
|
|
268
|
+
isAnswer={isAnswer}
|
|
269
|
+
variant={variant}
|
|
270
|
+
/>
|
|
271
|
+
}
|
|
267
272
|
iconClass={isAnswer ? undefined : iconClass}
|
|
268
273
|
textClass={`${SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS} ${textClassName}`}
|
|
269
274
|
buttonClass={buttonClass}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/* eslint-disable react/display-name */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
|
|
4
|
-
import {
|
|
5
|
+
import { TypographyVariantMap, getVariantPlaceholderClassNames } from '../Typography';
|
|
5
6
|
|
|
6
7
|
export interface TextInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
7
8
|
borderRadius: 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -27,6 +28,12 @@ export const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
|
|
|
27
28
|
className,
|
|
28
29
|
]);
|
|
29
30
|
|
|
30
|
-
return
|
|
31
|
+
return (
|
|
32
|
+
<input
|
|
33
|
+
ref={ref}
|
|
34
|
+
{...rest}
|
|
35
|
+
className={inputClasses}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
31
38
|
},
|
|
32
39
|
);
|