@envive-ai/react-toolkit 0.2.13 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-CbDLau6x.cjs → _virtual/rolldown_runtime.cjs} +1 -6
- package/dist/{types--eyQnaEA.d.cts → atoms/search/types.d.cts} +1 -1
- package/dist/{types-CQpdBL3M.d.ts → atoms/search/types.d.ts} +1 -1
- package/dist/{Accordion-Bc3o-NjV.cjs → components/Accordion/Accordion.cjs} +6 -10
- package/dist/components/Accordion/{index-DJOd-3Pi.d.ts → Accordion.d.cts} +2 -2
- package/dist/components/Accordion/{index-D_7-KJa0.d.cts → Accordion.d.ts} +2 -2
- package/dist/{Accordion-D8Vm8J1y.js → components/Accordion/Accordion.js} +3 -2
- package/dist/components/Accordion/index.cjs +1 -2
- package/dist/components/Accordion/index.d.cts +2 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Accordion/index.js +1 -2
- package/dist/{AnimatedChevron-BKQrUKb5.cjs → components/AnimatedChevron/AnimatedChevron.cjs} +2 -7
- package/dist/components/AnimatedChevron/{index-BfdaL9eW.d.cts → AnimatedChevron.d.cts} +2 -2
- package/dist/components/AnimatedChevron/{index-bNdUYDzX.d.ts → AnimatedChevron.d.ts} +2 -2
- package/dist/{AnimatedChevron-DghLnmlM.js → components/AnimatedChevron/AnimatedChevron.js} +1 -1
- package/dist/components/AnimatedChevron/index.cjs +1 -1
- package/dist/components/AnimatedChevron/index.d.cts +2 -0
- package/dist/components/AnimatedChevron/index.d.ts +2 -0
- package/dist/components/AnimatedChevron/index.js +1 -1
- package/dist/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.cjs +45 -0
- package/dist/components/AppliedFiltersScrollbar/{index-B68Mx16E.d.cts → AppliedFiltersScrollbar.d.cts} +3 -3
- package/dist/components/AppliedFiltersScrollbar/{index-B9u7XRmf.d.ts → AppliedFiltersScrollbar.d.ts} +3 -3
- package/dist/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.js +42 -0
- package/dist/components/AppliedFiltersScrollbar/index.cjs +2 -43
- package/dist/components/AppliedFiltersScrollbar/index.d.cts +2 -0
- package/dist/components/AppliedFiltersScrollbar/index.d.ts +2 -0
- package/dist/components/AppliedFiltersScrollbar/index.js +1 -39
- package/dist/{ButtonBase-Bm_QOyM1.cjs → components/ButtonBase/ButtonBase.cjs} +12 -29
- package/dist/components/ButtonBase/ButtonBase.d.cts +18 -0
- package/dist/components/ButtonBase/ButtonBase.d.ts +18 -0
- package/dist/{ButtonBase-CT397aT3.js → components/ButtonBase/ButtonBase.js} +8 -14
- package/dist/components/ButtonBase/index.cjs +3 -4
- package/dist/components/ButtonBase/index.d.cts +3 -0
- package/dist/components/ButtonBase/index.d.ts +3 -0
- package/dist/components/ButtonBase/index.js +2 -3
- package/dist/components/ButtonBase/types.cjs +11 -0
- package/dist/components/ButtonBase/{index-3ltL6jhO.d.ts → types.d.cts} +4 -19
- package/dist/components/ButtonBase/{index-CcVRnbuQ.d.cts → types.d.ts} +4 -19
- package/dist/components/ButtonBase/types.js +10 -0
- package/dist/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.cjs +33 -0
- package/dist/components/DynamicFiltersScrollbar/{index-B_a6Oebn.d.ts → DynamicFiltersScrollbar.d.cts} +2 -2
- package/dist/components/DynamicFiltersScrollbar/{index-B483Jhki.d.cts → DynamicFiltersScrollbar.d.ts} +2 -2
- package/dist/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.js +30 -0
- package/dist/components/DynamicFiltersScrollbar/index.cjs +2 -31
- package/dist/components/DynamicFiltersScrollbar/index.d.cts +2 -0
- package/dist/components/DynamicFiltersScrollbar/index.d.ts +2 -0
- package/dist/components/DynamicFiltersScrollbar/index.js +1 -27
- package/dist/{DynamicFiltersScrollbar-bT3VoG-D.cjs → components/FilterScrollbar/AppliedFiltersScrollbar.cjs} +6 -39
- package/dist/components/FilterScrollbar/AppliedFiltersScrollbar.d.cts +22 -0
- package/dist/components/FilterScrollbar/AppliedFiltersScrollbar.d.ts +22 -0
- package/dist/{DynamicFiltersScrollbar-CibstqNd.js → components/FilterScrollbar/AppliedFiltersScrollbar.js} +3 -25
- package/dist/components/FilterScrollbar/DynamicFiltersScrollbar.cjs +33 -0
- package/dist/components/FilterScrollbar/DynamicFiltersScrollbar.d.cts +28 -0
- package/dist/components/FilterScrollbar/DynamicFiltersScrollbar.d.ts +28 -0
- package/dist/components/FilterScrollbar/DynamicFiltersScrollbar.js +30 -0
- package/dist/components/FilterScrollbar/index.cjs +3 -3
- package/dist/components/FilterScrollbar/index.d.cts +3 -0
- package/dist/components/FilterScrollbar/index.d.ts +3 -0
- package/dist/components/FilterScrollbar/index.js +2 -2
- package/dist/{ImageWithFallback-BiBjNK-9.cjs → components/ImageWithFallback/ImageWithFallback.cjs} +4 -9
- package/dist/components/ImageWithFallback/{index-Dk89vxqv.d.cts → ImageWithFallback.d.cts} +2 -2
- package/dist/components/ImageWithFallback/{index-CCWzf6ZV.d.ts → ImageWithFallback.d.ts} +2 -2
- package/dist/{ImageWithFallback-_QZT0EKI.js → components/ImageWithFallback/ImageWithFallback.js} +1 -1
- package/dist/components/ImageWithFallback/index.cjs +1 -1
- package/dist/components/ImageWithFallback/index.d.cts +2 -0
- package/dist/components/ImageWithFallback/index.d.ts +2 -0
- package/dist/components/ImageWithFallback/index.js +1 -1
- package/dist/components/ModalSheet/ModalSheet.cjs +30 -0
- package/dist/components/ModalSheet/ModalSheet.d.cts +15 -0
- package/dist/components/ModalSheet/ModalSheet.d.ts +15 -0
- package/dist/components/ModalSheet/ModalSheet.js +29 -0
- package/dist/components/ModalSheet/desktop/desktopHeader.cjs +26 -0
- package/dist/components/ModalSheet/desktop/desktopHeader.js +24 -0
- package/dist/components/ModalSheet/desktop/index.cjs +122 -0
- package/dist/components/ModalSheet/desktop/index.js +120 -0
- package/dist/components/ModalSheet/index.cjs +1 -2
- package/dist/components/ModalSheet/index.d.cts +2 -0
- package/dist/components/ModalSheet/index.d.ts +2 -0
- package/dist/components/ModalSheet/index.js +1 -2
- package/dist/components/ModalSheet/mobile/index.cjs +116 -0
- package/dist/components/ModalSheet/mobile/index.js +114 -0
- package/dist/components/ModalSheet/mobile/mobileHeader.cjs +38 -0
- package/dist/components/ModalSheet/mobile/mobileHeader.js +36 -0
- package/dist/components/ModalSheet/{index-C_8baIZK.d.cts → types.d.cts} +1 -14
- package/dist/components/ModalSheet/{index-CI0qFVA7.d.ts → types.d.ts} +1 -14
- package/dist/{ProductCard-C3seoFWE.cjs → components/ProductCard/ProductCard.cjs} +19 -171
- package/dist/components/ProductCard/ProductCard.d.cts +64 -0
- package/dist/components/ProductCard/ProductCard.d.ts +64 -0
- package/dist/{ProductCard-ChitHvuc.js → components/ProductCard/ProductCard.js} +10 -105
- package/dist/components/ProductCard/ProductCardSkeleton.cjs +33 -0
- package/dist/components/ProductCard/ProductCardSkeleton.d.cts +7 -0
- package/dist/components/ProductCard/ProductCardSkeleton.d.ts +7 -0
- package/dist/components/ProductCard/ProductCardSkeleton.js +31 -0
- package/dist/components/ProductCard/index.cjs +11 -12
- package/dist/components/ProductCard/index.d.cts +5 -0
- package/dist/components/ProductCard/index.d.ts +5 -0
- package/dist/components/ProductCard/index.js +4 -5
- package/dist/components/ProductCard/productCardVariants.cjs +49 -0
- package/dist/components/ProductCard/productCardVariants.d.cts +13 -0
- package/dist/components/ProductCard/productCardVariants.d.ts +13 -0
- package/dist/components/ProductCard/productCardVariants.js +45 -0
- package/dist/components/ProductCard/types.cjs +16 -0
- package/dist/components/ProductCard/types.d.cts +43 -0
- package/dist/components/ProductCard/types.d.ts +43 -0
- package/dist/components/ProductCard/types.js +14 -0
- package/dist/{ProductGrid-Ct2DvLGf.cjs → components/ProductGrid/ProductGrid.cjs} +7 -35
- package/dist/components/ProductGrid/ProductGrid.d.cts +25 -0
- package/dist/components/ProductGrid/ProductGrid.d.ts +25 -0
- package/dist/{ProductGrid-DukHo_KY.js → components/ProductGrid/ProductGrid.js} +4 -21
- package/dist/components/ProductGrid/index.cjs +3 -7
- package/dist/components/ProductGrid/index.d.cts +3 -0
- package/dist/components/ProductGrid/index.d.ts +3 -0
- package/dist/components/ProductGrid/index.js +2 -6
- package/dist/components/ProductGrid/productGridVariants.cjs +21 -0
- package/dist/components/ProductGrid/productGridVariants.d.cts +13 -0
- package/dist/components/ProductGrid/productGridVariants.d.ts +13 -0
- package/dist/components/ProductGrid/productGridVariants.js +20 -0
- package/dist/{RadioButton-D4TPq1Aa.cjs → components/RadioButton/RadioButton.cjs} +5 -9
- package/dist/components/RadioButton/{index-BWo-a19v.d.ts → RadioButton.d.cts} +3 -3
- package/dist/components/RadioButton/{index-DsVASVAv.d.cts → RadioButton.d.ts} +3 -3
- package/dist/{RadioButton-C1w7N40t.js → components/RadioButton/RadioButton.js} +3 -2
- package/dist/components/RadioButton/index.cjs +1 -2
- package/dist/components/RadioButton/index.d.cts +2 -0
- package/dist/components/RadioButton/index.d.ts +2 -0
- package/dist/components/RadioButton/index.js +1 -2
- package/dist/{RadioButtonGroup-BhZloLH6.cjs → components/RadioButtonGroup/RadioButtonGroup.cjs} +6 -15
- package/dist/components/RadioButtonGroup/{index-CiljmnzJ.d.cts → RadioButtonGroup.d.cts} +3 -3
- package/dist/components/RadioButtonGroup/{index-DdyMuFCX.d.ts → RadioButtonGroup.d.ts} +3 -3
- package/dist/{RadioButtonGroup-BWQ4-m2M.js → components/RadioButtonGroup/RadioButtonGroup.js} +3 -2
- package/dist/components/RadioButtonGroup/index.cjs +1 -3
- package/dist/components/RadioButtonGroup/index.d.cts +2 -0
- package/dist/components/RadioButtonGroup/index.d.ts +2 -0
- package/dist/components/RadioButtonGroup/index.js +1 -3
- package/dist/{RecommendedProducts-Cy-1szYc.cjs → components/RecommendedProducts/RecommendedProducts.cjs} +7 -10
- package/dist/components/RecommendedProducts/{index-DlbCfGof.d.ts → RecommendedProducts.d.cts} +2 -2
- package/dist/components/RecommendedProducts/{index-BFM83Qu3.d.cts → RecommendedProducts.d.ts} +2 -2
- package/dist/{RecommendedProducts-DooGvLFT.js → components/RecommendedProducts/RecommendedProducts.js} +5 -3
- package/dist/components/RecommendedProducts/index.cjs +1 -7
- package/dist/components/RecommendedProducts/index.d.cts +2 -0
- package/dist/components/RecommendedProducts/index.d.ts +2 -0
- package/dist/components/RecommendedProducts/index.js +1 -7
- package/dist/{SearchAutocomplete-C1XH39Xx.cjs → components/SearchAutocomplete/SearchAutocomplete.cjs} +7 -11
- package/dist/components/SearchAutocomplete/{index-OVMqT8K4.d.cts → SearchAutocomplete.d.cts} +2 -2
- package/dist/components/SearchAutocomplete/{index-BBUrFTl5.d.ts → SearchAutocomplete.d.ts} +2 -2
- package/dist/{SearchAutocomplete-CuuN0cDu.js → components/SearchAutocomplete/SearchAutocomplete.js} +3 -2
- package/dist/components/SearchAutocomplete/index.cjs +1 -2
- package/dist/components/SearchAutocomplete/index.d.cts +2 -0
- package/dist/components/SearchAutocomplete/index.d.ts +2 -0
- package/dist/components/SearchAutocomplete/index.js +1 -2
- package/dist/components/SearchFilter/SearchFilter.cjs +134 -0
- package/dist/components/SearchFilter/SearchFilter.d.cts +23 -0
- package/dist/components/SearchFilter/SearchFilter.d.ts +23 -0
- package/dist/components/SearchFilter/SearchFilter.js +132 -0
- package/dist/components/SearchFilter/SearchFilterFooter.cjs +48 -0
- package/dist/components/SearchFilter/SearchFilterFooter.d.cts +14 -0
- package/dist/components/SearchFilter/SearchFilterFooter.d.ts +14 -0
- package/dist/components/SearchFilter/SearchFilterFooter.js +46 -0
- package/dist/components/SearchFilter/SearchFilterHeader.cjs +42 -0
- package/dist/components/SearchFilter/SearchFilterHeader.d.cts +12 -0
- package/dist/components/SearchFilter/SearchFilterHeader.d.ts +12 -0
- package/dist/components/SearchFilter/SearchFilterHeader.js +40 -0
- package/dist/components/SearchFilter/SearchFilterItem.cjs +41 -0
- package/dist/components/SearchFilter/SearchFilterItem.d.cts +13 -0
- package/dist/components/SearchFilter/SearchFilterItem.d.ts +13 -0
- package/dist/components/SearchFilter/SearchFilterItem.js +39 -0
- package/dist/components/SearchFilter/index.cjs +10 -15
- package/dist/components/SearchFilter/index.d.cts +6 -0
- package/dist/components/SearchFilter/index.d.ts +6 -0
- package/dist/components/SearchFilter/index.js +5 -10
- package/dist/components/SearchFilter/types.d.cts +42 -0
- package/dist/components/SearchFilter/types.d.ts +42 -0
- package/dist/components/SearchFilter/useHasFilterStateChanged.cjs +27 -0
- package/dist/components/SearchFilter/useHasFilterStateChanged.js +26 -0
- package/dist/components/SearchFilter/utils.cjs +11 -0
- package/dist/components/SearchFilter/utils.d.cts +7 -0
- package/dist/components/SearchFilter/utils.d.ts +7 -0
- package/dist/components/SearchFilter/utils.js +9 -0
- package/dist/{SearchInput-Cgsjew8Q.cjs → components/SearchInput/SearchInput.cjs} +10 -32
- package/dist/components/SearchInput/SearchInput.d.cts +20 -0
- package/dist/components/SearchInput/SearchInput.d.ts +20 -0
- package/dist/{SearchInput-DE9Iz7A8.js → components/SearchInput/SearchInput.js} +4 -15
- package/dist/components/SearchInput/index.cjs +3 -5
- package/dist/components/SearchInput/index.d.cts +3 -0
- package/dist/components/SearchInput/index.d.ts +3 -0
- package/dist/components/SearchInput/index.js +2 -4
- package/dist/components/SearchInput/searchInputVariants.cjs +15 -0
- package/dist/components/SearchInput/searchInputVariants.d.cts +16 -0
- package/dist/components/SearchInput/searchInputVariants.d.ts +16 -0
- package/dist/components/SearchInput/searchInputVariants.js +15 -0
- package/dist/{SearchInputForm-CSd4tjts.cjs → components/SearchInputForm/SearchInputForm.cjs} +8 -11
- package/dist/components/SearchInputForm/{index-D1F37qNH.d.ts → SearchInputForm.d.cts} +3 -3
- package/dist/components/SearchInputForm/{index-B3A17s3e.d.cts → SearchInputForm.d.ts} +3 -3
- package/dist/{SearchInputForm--CvVrjwl.js → components/SearchInputForm/SearchInputForm.js} +5 -3
- package/dist/components/SearchInputForm/index.cjs +1 -6
- package/dist/components/SearchInputForm/index.d.cts +2 -0
- package/dist/components/SearchInputForm/index.d.ts +2 -0
- package/dist/components/SearchInputForm/index.js +1 -6
- package/dist/components/SearchResultsContent/SearchResultsContent.cjs +52 -0
- package/dist/components/SearchResultsContent/{index-B66EnbgF.d.cts → SearchResultsContent.d.cts} +6 -6
- package/dist/components/SearchResultsContent/{index-BI4Dm7mI.d.ts → SearchResultsContent.d.ts} +6 -6
- package/dist/components/SearchResultsContent/SearchResultsContent.js +50 -0
- package/dist/components/SearchResultsContent/index.cjs +2 -59
- package/dist/components/SearchResultsContent/index.d.cts +2 -0
- package/dist/components/SearchResultsContent/index.d.ts +2 -0
- package/dist/components/SearchResultsContent/index.js +1 -56
- package/dist/{SearchResultsFilterButton-BQqm4icD.cjs → components/SearchResultsFilterButton/SearchResultsFilterButton.cjs} +6 -10
- package/dist/components/SearchResultsFilterButton/{index-CCVZZUTR.d.cts → SearchResultsFilterButton.d.cts} +2 -2
- package/dist/{SearchResultsFilterButton-CV11UTGi.js → components/SearchResultsFilterButton/SearchResultsFilterButton.js} +4 -3
- package/dist/components/SearchResultsFilterButton/index.cjs +1 -4
- package/dist/components/SearchResultsFilterButton/index.d.cts +2 -0
- package/dist/components/SearchResultsFilterButton/index.d.ts +2 -0
- package/dist/components/SearchResultsFilterButton/index.js +1 -4
- package/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.cjs +36 -0
- package/dist/components/SearchResultsFilterModal/{index-CMWDFJWT.d.cts → SearchResultsFilterModal.d.cts} +4 -4
- package/dist/components/SearchResultsFilterModal/{index-Ba84MNoM.d.ts → SearchResultsFilterModal.d.ts} +4 -4
- package/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.js +35 -0
- package/dist/components/SearchResultsFilterModal/index.cjs +2 -43
- package/dist/components/SearchResultsFilterModal/index.d.cts +2 -0
- package/dist/components/SearchResultsFilterModal/index.d.ts +2 -0
- package/dist/components/SearchResultsFilterModal/index.js +1 -41
- package/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.cjs +51 -0
- package/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.d.cts +27 -0
- package/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +27 -0
- package/dist/{SearchResultsFilterSidebar-ydSo1S6h.js → components/SearchResultsFilterSidebar/SearchResultsFilter.js} +9 -72
- package/dist/components/SearchResultsFilterSidebar/index.cjs +3 -14
- package/dist/components/SearchResultsFilterSidebar/index.d.cts +4 -0
- package/dist/components/SearchResultsFilterSidebar/index.d.ts +4 -0
- package/dist/components/SearchResultsFilterSidebar/index.js +2 -13
- package/dist/{searchFilterSidebarVariants-C61Byr1S.cjs → components/SearchResultsFilterSidebar/searchFilterSidebarVariants.cjs} +2 -7
- package/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.cts +19 -0
- package/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts +19 -0
- package/dist/{searchFilterSidebarVariants-DcwlBfvY.js → components/SearchResultsFilterSidebar/searchFilterSidebarVariants.js} +2 -2
- package/dist/components/SearchResultsFilterSidebar/types.d.cts +5 -0
- package/dist/components/SearchResultsFilterSidebar/types.d.ts +5 -0
- package/dist/components/SearchResultsStates/NoSearchResultsFound.cjs +57 -0
- package/dist/components/SearchResultsStates/NoSearchResultsFound.d.cts +25 -0
- package/dist/components/SearchResultsStates/NoSearchResultsFound.d.ts +25 -0
- package/dist/components/SearchResultsStates/NoSearchResultsFound.js +54 -0
- package/dist/components/SearchResultsStates/SearchResultsGrid.cjs +53 -0
- package/dist/components/SearchResultsStates/SearchResultsGrid.d.cts +46 -0
- package/dist/components/SearchResultsStates/SearchResultsGrid.d.ts +46 -0
- package/dist/components/SearchResultsStates/SearchResultsGrid.js +51 -0
- package/dist/components/SearchResultsStates/SearchResultsLoadingGrid.cjs +52 -0
- package/dist/components/SearchResultsStates/SearchResultsLoadingGrid.d.cts +15 -0
- package/dist/components/SearchResultsStates/SearchResultsLoadingGrid.d.ts +15 -0
- package/dist/components/SearchResultsStates/SearchResultsLoadingGrid.js +51 -0
- package/dist/components/SearchResultsStates/index.cjs +6 -15
- package/dist/components/SearchResultsStates/index.d.cts +4 -0
- package/dist/components/SearchResultsStates/index.d.ts +4 -0
- package/dist/components/SearchResultsStates/index.js +3 -12
- package/dist/components/SearchResultsToolbar/SearchResultsToolbar.cjs +60 -0
- package/dist/components/SearchResultsToolbar/{index-M8RkRW3H.d.cts → SearchResultsToolbar.d.cts} +3 -3
- package/dist/components/SearchResultsToolbar/{index-_hxKcDDT.d.ts → SearchResultsToolbar.d.ts} +3 -3
- package/dist/components/SearchResultsToolbar/SearchResultsToolbar.js +57 -0
- package/dist/components/SearchResultsToolbar/index.cjs +2 -64
- package/dist/components/SearchResultsToolbar/index.d.cts +2 -0
- package/dist/components/SearchResultsToolbar/index.d.ts +2 -0
- package/dist/components/SearchResultsToolbar/index.js +1 -60
- package/dist/{SparkleAnimation-Bg5qax1t.cjs → components/SparkleAnimation/SparkleAnimation.cjs} +9 -29
- package/dist/components/SparkleAnimation/SparkleAnimation.d.cts +15 -0
- package/dist/components/SparkleAnimation/SparkleAnimation.d.ts +15 -0
- package/dist/{SparkleAnimation-HY4cgwE3.js → components/SparkleAnimation/SparkleAnimation.js} +2 -11
- package/dist/components/SparkleAnimation/index.cjs +3 -2
- package/dist/components/SparkleAnimation/index.d.cts +3 -0
- package/dist/components/SparkleAnimation/index.d.ts +3 -0
- package/dist/components/SparkleAnimation/index.js +2 -1
- package/dist/components/SparkleAnimation/types.cjs +12 -0
- package/dist/components/SparkleAnimation/types.d.cts +9 -0
- package/dist/components/SparkleAnimation/types.d.ts +9 -0
- package/dist/components/SparkleAnimation/types.js +11 -0
- package/dist/{Spinner-CUrXDajS.cjs → components/Spinner/Spinner.cjs} +3 -8
- package/dist/components/Spinner/{index-C876igqb.d.ts → Spinner.d.cts} +2 -2
- package/dist/components/Spinner/{index-DrYhRG9D.d.cts → Spinner.d.ts} +2 -2
- package/dist/{Spinner-CDDFWySo.js → components/Spinner/Spinner.js} +1 -1
- package/dist/components/Spinner/index.cjs +1 -1
- package/dist/components/Spinner/index.d.cts +2 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/SuggestionButton/SuggestionButton.cjs +195 -0
- package/dist/components/SuggestionButton/{index-CrGSb18s.d.ts → SuggestionButton.d.cts} +6 -8
- package/dist/components/SuggestionButton/{index-DfQRQGev.d.cts → SuggestionButton.d.ts} +6 -8
- package/dist/components/SuggestionButton/SuggestionButton.js +188 -0
- package/dist/components/SuggestionButton/index.cjs +5 -192
- package/dist/components/SuggestionButton/index.d.cts +3 -0
- package/dist/components/SuggestionButton/index.d.ts +3 -0
- package/dist/components/SuggestionButton/index.js +1 -184
- package/dist/components/SuggestionButton/types.d.cts +4 -0
- package/dist/components/SuggestionButton/types.d.ts +4 -0
- package/dist/{TextInput-DfCocKVm.cjs → components/TextInput/TextInput.cjs} +7 -11
- package/dist/components/TextInput/{index-CkQtHiR9.d.ts → TextInput.d.cts} +1 -2
- package/dist/components/TextInput/{index-CRJMRe-b.d.cts → TextInput.d.ts} +1 -2
- package/dist/{TextInput-PtrUXoZo.js → components/TextInput/TextInput.js} +3 -2
- package/dist/components/TextInput/index.cjs +1 -2
- package/dist/components/TextInput/index.d.cts +2 -0
- package/dist/components/TextInput/index.d.ts +2 -0
- package/dist/components/TextInput/index.js +1 -2
- package/dist/{ToggleButton-BhBEOjxO.cjs → components/ToggleButton/ToggleButton.cjs} +5 -9
- package/dist/components/ToggleButton/{index-CpURpMq5.d.cts → ToggleButton.d.ts} +2 -2
- package/dist/{ToggleButton-BTz_zIdc.js → components/ToggleButton/ToggleButton.js} +3 -2
- package/dist/components/ToggleButton/index.cjs +1 -2
- package/dist/components/ToggleButton/index.d.cts +2 -0
- package/dist/components/ToggleButton/index.d.ts +2 -0
- package/dist/components/ToggleButton/index.js +1 -2
- package/dist/components/Typography/Typography.cjs +53 -0
- package/dist/{index-Cr8VXccr.d.ts → components/Typography/Typography.d.cts} +2 -2
- package/dist/{index-Bw6lDfEp.d.cts → components/Typography/Typography.d.ts} +2 -2
- package/dist/components/Typography/Typography.js +50 -0
- package/dist/components/Typography/index.cjs +5 -4
- package/dist/components/Typography/index.d.cts +3 -0
- package/dist/components/Typography/index.d.ts +3 -0
- package/dist/components/Typography/index.js +2 -1
- package/dist/{Typography-xehJH05l.js → components/Typography/typographyVariantClasses.cjs} +3 -54
- package/dist/{typographyVariantClasses-CoRhazCU.d.cts → components/Typography/typographyVariantClasses.d.cts} +1 -1
- package/dist/{typographyVariantClasses-CrT5OfVw.d.ts → components/Typography/typographyVariantClasses.d.ts} +1 -1
- package/dist/{Typography-Csg-nd_w.cjs → components/Typography/typographyVariantClasses.js} +1 -81
- package/dist/components/Typography/util.cjs +10 -0
- package/dist/components/Typography/util.js +10 -0
- package/dist/hooks/dist/application/models/api/response.d.cts +11 -0
- package/dist/hooks/dist/application/models/api/response.d.ts +11 -0
- package/dist/hooks/dist/application/models/colorsConfig.d.cts +24 -0
- package/dist/hooks/dist/application/models/colorsConfig.d.ts +24 -0
- package/dist/hooks/dist/application/models/utilityTypes/camelCase.d.cts +71 -0
- package/dist/hooks/dist/application/models/utilityTypes/camelCase.d.ts +71 -0
- package/dist/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.cts +58 -0
- package/dist/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts +58 -0
- package/dist/hooks/dist/application/models/utilityTypes/internal.d.cts +22 -0
- package/dist/hooks/dist/application/models/utilityTypes/internal.d.ts +22 -0
- package/dist/hooks/dist/application/models/utilityTypes/splitWords.d.cts +31 -0
- package/dist/hooks/dist/application/models/utilityTypes/splitWords.d.ts +31 -0
- package/dist/hooks/dist/application/models/utilityTypes/trim.d.cts +30 -0
- package/dist/hooks/dist/application/models/utilityTypes/trim.d.ts +30 -0
- package/dist/hooks/dist/application/models/utilityTypes/unknownArray.d.cts +30 -0
- package/dist/hooks/dist/application/models/utilityTypes/unknownArray.d.ts +30 -0
- package/dist/hooks/dist/atoms/search/searchAPI.d.cts +11 -0
- package/dist/hooks/dist/atoms/search/searchAPI.d.ts +11 -0
- package/dist/hooks/dist/contexts/types.d.cts +17 -0
- package/dist/hooks/dist/contexts/types.d.ts +17 -0
- package/dist/hooks/dist/hooks/utils.d.cts +9 -0
- package/dist/hooks/dist/hooks/utils.d.ts +9 -0
- package/dist/hooks/dist/types/search-filter-types.d.cts +36 -0
- package/dist/hooks/dist/types/search-filter-types.d.ts +36 -0
- package/dist/hooks/dist/types/test-types.d.cts +8 -0
- package/dist/hooks/dist/types/test-types.d.ts +8 -0
- package/dist/logging/logger.cjs +20 -0
- package/dist/logging/logger.js +19 -0
- package/dist/{colorsConfig-D-MZuBvt.cjs → models/colorsConfig.cjs} +2 -12
- package/dist/{colorsConfig-BjdoRtRK.js → models/colorsConfig.js} +1 -1
- package/dist/util/camelCase.d.cts +69 -0
- package/dist/util/camelCase.d.ts +69 -0
- package/dist/util/camelCasedPropertiesDeep.d.cts +55 -0
- package/dist/util/camelCasedPropertiesDeep.d.ts +55 -0
- package/dist/util/colorVar.cjs +6 -0
- package/dist/util/colorVar.d.cts +6 -0
- package/dist/util/colorVar.d.ts +6 -0
- package/dist/util/colorVar.js +5 -0
- package/dist/{formatPrice-CyfkjZ3R.cjs → util/formatPrice.cjs} +1 -6
- package/dist/util/formatPrice.d.cts +4 -0
- package/dist/util/formatPrice.d.ts +4 -0
- package/dist/{formatPrice-DexQu2aZ.js → util/formatPrice.js} +1 -1
- package/dist/util/index.cjs +7 -78
- package/dist/util/index.d.cts +5 -0
- package/dist/util/index.d.ts +5 -0
- package/dist/util/index.js +4 -74
- package/dist/util/internal.d.cts +22 -0
- package/dist/util/internal.d.ts +22 -0
- package/dist/util/splitWords.d.cts +28 -0
- package/dist/util/splitWords.d.ts +28 -0
- package/dist/util/trim.d.cts +28 -0
- package/dist/util/trim.d.ts +28 -0
- package/dist/util/unknownArray.d.cts +28 -0
- package/dist/util/unknownArray.d.ts +28 -0
- package/dist/util/useScrollDirection.cjs +39 -0
- package/dist/util/useScrollDirection.d.cts +5 -0
- package/dist/util/useScrollDirection.d.ts +5 -0
- package/dist/util/useScrollDirection.js +38 -0
- package/dist/util/useStickyVisibility.cjs +38 -0
- package/dist/util/useStickyVisibility.d.cts +10 -0
- package/dist/util/useStickyVisibility.d.ts +10 -0
- package/dist/util/useStickyVisibility.js +37 -0
- package/package.json +3 -2
- package/src/components/ButtonBase/ButtonBase.tsx +3 -5
- package/src/components/ButtonBase/types.ts +3 -3
- package/src/components/ModalSheet/common/closeIcon.tsx +3 -6
- package/src/components/ProductCard/ProductCard.tsx +2 -2
- package/src/components/SearchFilter/types.ts +2 -0
- package/src/components/SearchResultsFilterButton/SearchResultsFilterButton.tsx +1 -1
- package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +2 -2
- package/src/components/SuggestionButton/SuggestionButton.tsx +17 -12
- package/src/stories/ButtonBase.stories.tsx +1 -1
- package/src/stories/ProductCardSkeleton.stories.tsx +46 -16
- package/src/stories/SearchResultsFilter.stories.tsx +2 -2
- package/dist/ButtonBase-BIXx56hq.cjs +0 -0
- package/dist/ButtonBase-C9fn-c5h.js +0 -1
- package/dist/ModalSheet-BuCtRDnQ.cjs +0 -308
- package/dist/ModalSheet-DVrY7Mw0.js +0 -301
- package/dist/SearchFilter-CnP71PTj.cjs +0 -301
- package/dist/SearchFilter-DsYF1A5n.js +0 -264
- package/dist/SearchResultsFilterSidebar-U6dFy-Jo.cjs +0 -118
- package/dist/SearchResultsStates-BCeqeo9y.js +0 -138
- package/dist/SearchResultsStates-Dp-AsmH8.cjs +0 -158
- package/dist/components/FilterScrollbar/index-BmHm47DA.d.cts +0 -47
- package/dist/components/FilterScrollbar/index-CISEdkBM.d.ts +0 -47
- package/dist/components/ProductCard/index-D5om2RVT.d.ts +0 -2
- package/dist/components/ProductCard/index-Djjvdeh7.d.cts +0 -2
- package/dist/components/ProductGrid/index-AxMBGLVk.d.ts +0 -35
- package/dist/components/ProductGrid/index-C4Tz_KWs.d.cts +0 -35
- package/dist/components/SearchFilter/index-BDaLJW2Q.d.cts +0 -91
- package/dist/components/SearchFilter/index-DESOqSJQ.d.ts +0 -91
- package/dist/components/SearchInput/index-UY0W77Y0.d.ts +0 -34
- package/dist/components/SearchInput/index-rFDdhvqg.d.cts +0 -34
- package/dist/components/SearchResultsFilterSidebar/index-DmO55w4A.d.ts +0 -2
- package/dist/components/SearchResultsFilterSidebar/index-Dtr9q9hT.d.cts +0 -2
- package/dist/components/SearchResultsStates/index-Ba3tQMCI.d.ts +0 -78
- package/dist/components/SearchResultsStates/index-DN1-g87W.d.cts +0 -78
- package/dist/components/SparkleAnimation/index-BMrS1PDU.d.cts +0 -23
- package/dist/components/SparkleAnimation/index-t59eI0td.d.ts +0 -23
- package/dist/components/Typography/index-DE1Nhjra.d.ts +0 -3
- package/dist/components/Typography/index-DzSBreyM.d.cts +0 -3
- package/dist/index-1GZFptEC.d.cts +0 -325
- package/dist/index-CBI4Lqsm.d.cts +0 -46
- package/dist/index-pZZXXUG_.d.ts +0 -46
- package/dist/index-yDKT5Bem.d.ts +0 -325
- package/dist/util/index-C2ueYGXh.d.ts +0 -21
- package/dist/util/index-DUzbpjPa.d.cts +0 -21
- /package/dist/components/SearchResultsFilterButton/{index-Cjq_NOxx.d.ts → SearchResultsFilterButton.d.ts} +0 -0
- /package/dist/components/ToggleButton/{index-DFz4kch0.d.ts → ToggleButton.d.cts} +0 -0
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { t as Typography } from "./Typography-xehJH05l.js";
|
|
2
|
-
import { t as Accordion } from "./Accordion-D8Vm8J1y.js";
|
|
3
|
-
import { t as ButtonBase } from "./ButtonBase-CT397aT3.js";
|
|
4
|
-
import { t as ModalSheet } from "./ModalSheet-DVrY7Mw0.js";
|
|
5
|
-
import { t as RadioButtonGroup } from "./RadioButtonGroup-BWQ4-m2M.js";
|
|
6
|
-
import { t as ToggleButton } from "./ToggleButton-BTz_zIdc.js";
|
|
7
|
-
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
8
|
-
import classNames from "classnames";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
|
|
11
|
-
//#region src/components/SearchFilter/SearchFilterHeader.tsx
|
|
12
|
-
const SearchFilterHeader = ({ closeModal, productCount, headerClassName, filterCloseIconVariant }) => {
|
|
13
|
-
const closeIconColor = filterCloseIconVariant === "dark" ? "var(--spiffy-colors-text-primary)" : "var(--spiffy-colors-text-light)";
|
|
14
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
15
|
-
className: classNames("spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-px-4 spiffy-tw-py-3", headerClassName),
|
|
16
|
-
children: [/* @__PURE__ */ jsxs(Typography, {
|
|
17
|
-
variant: "body2",
|
|
18
|
-
className: "spiffy-tw-font-medium",
|
|
19
|
-
children: [
|
|
20
|
-
"Filters (",
|
|
21
|
-
productCount,
|
|
22
|
-
")"
|
|
23
|
-
]
|
|
24
|
-
}), /* @__PURE__ */ jsx("button", {
|
|
25
|
-
onClick: closeModal,
|
|
26
|
-
className: "spiffy-tw-p-2",
|
|
27
|
-
type: "button",
|
|
28
|
-
"aria-label": "Open Filter Menu",
|
|
29
|
-
children: /* @__PURE__ */ jsx("svg", {
|
|
30
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
31
|
-
width: "14",
|
|
32
|
-
height: "14",
|
|
33
|
-
viewBox: "0 0 14 14",
|
|
34
|
-
fill: "none",
|
|
35
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
36
|
-
d: "M13.7071 1.70711C14.0976 1.31658 14.0976 0.683417 13.7071 0.292893C13.3166 -0.0976311 12.6834 -0.0976311 12.2929 0.292893L7 5.58579L1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L5.58579 7L0.292893 12.2929C-0.0976311 12.6834 -0.0976311 13.3166 0.292893 13.7071C0.683417 14.0976 1.31658 14.0976 1.70711 13.7071L7 8.41421L12.2929 13.7071C12.6834 14.0976 13.3166 14.0976 13.7071 13.7071C14.0976 13.3166 14.0976 12.6834 13.7071 12.2929L8.41421 7L13.7071 1.70711Z",
|
|
37
|
-
fill: closeIconColor
|
|
38
|
-
})
|
|
39
|
-
})
|
|
40
|
-
})]
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region src/components/SearchFilter/useHasFilterStateChanged.tsx
|
|
46
|
-
const useHasFilterStateChanged = (filters, isOpen) => {
|
|
47
|
-
const [initialFilterStates, setInitialFilterStates] = useState({});
|
|
48
|
-
const currentFilterStates = useMemo(() => {
|
|
49
|
-
const states = {};
|
|
50
|
-
filters.forEach((filter) => {
|
|
51
|
-
filter.items.forEach((item) => {
|
|
52
|
-
states[`${filter.filterId}-${item.filterItemId}`] = item.isSelected;
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
return states;
|
|
56
|
-
}, [filters]);
|
|
57
|
-
const hasFiltersChanged = useMemo(() => {
|
|
58
|
-
if (Object.keys(initialFilterStates).length === 0) return false;
|
|
59
|
-
return Object.keys(currentFilterStates).some((key) => currentFilterStates[key] !== initialFilterStates[key]);
|
|
60
|
-
}, [currentFilterStates, initialFilterStates]);
|
|
61
|
-
useEffect(() => {
|
|
62
|
-
if (isOpen) setInitialFilterStates(currentFilterStates);
|
|
63
|
-
}, [isOpen]);
|
|
64
|
-
return hasFiltersChanged;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
//#endregion
|
|
68
|
-
//#region src/components/SearchFilter/utils.ts
|
|
69
|
-
const getSelectedFilterItemsCount = (filter) => filter.items.filter((item) => item.isSelected).length;
|
|
70
|
-
const getTotalSelectedFilterItemsCount = (filters) => filters.reduce((acc, filter) => {
|
|
71
|
-
if (filter.filterId === "sort") return acc;
|
|
72
|
-
return acc + getSelectedFilterItemsCount(filter);
|
|
73
|
-
}, 0);
|
|
74
|
-
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/components/SearchFilter/SearchFilterFooter.tsx
|
|
77
|
-
const SearchFilterFooter = ({ closeModal, clearAllFilters, filterCount, applyFiltersUnchangedClasses, applyFiltersChangedClasses, hasFiltersChanged }) => {
|
|
78
|
-
const clearAllButtonEnabled = filterCount > 0;
|
|
79
|
-
const footerWrapperClassName = classNames({
|
|
80
|
-
"spiffy-tw-flex": true,
|
|
81
|
-
"spiffy-tw-flex-col": true,
|
|
82
|
-
"spiffy-tw-items-center": true,
|
|
83
|
-
"spiffy-tw-justify-between": true,
|
|
84
|
-
"spiffy-tw-w-full": true,
|
|
85
|
-
"spiffy-tw-border-t": true,
|
|
86
|
-
"spiffy-tw-border-t-[--spiffy-colors-border-light]": true,
|
|
87
|
-
"spiffy-tw-p-[16px]": true,
|
|
88
|
-
"spiffy-tw-gap-[16px]": true
|
|
89
|
-
});
|
|
90
|
-
const applyFilterButtonClassName = classNames("spiffy-tw-flex spiffy-tw-flex-row spiffy-tw-justify-center spiffy-tw-rounded-[8px] spiffy-tw-w-full", hasFiltersChanged ? applyFiltersChangedClasses : applyFiltersUnchangedClasses);
|
|
91
|
-
const clearAllButtonClassName = classNames({
|
|
92
|
-
"spiffy-tw-flex": true,
|
|
93
|
-
"spiffy-tw-flex-row": true,
|
|
94
|
-
"spiffy-tw-justify-center": true,
|
|
95
|
-
"spiffy-tw-w-full": true,
|
|
96
|
-
"spiffy-tw-text-[--spiffy-colors-text-primary]": clearAllButtonEnabled,
|
|
97
|
-
"spiffy-tw-text-[--spiffy-colors-text-secondary]": !clearAllButtonEnabled
|
|
98
|
-
});
|
|
99
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
100
|
-
className: footerWrapperClassName,
|
|
101
|
-
children: [/* @__PURE__ */ jsx(ButtonBase, {
|
|
102
|
-
isDisabled: !hasFiltersChanged,
|
|
103
|
-
buttonClass: applyFilterButtonClassName,
|
|
104
|
-
text: "Apply Filters",
|
|
105
|
-
onClick: closeModal
|
|
106
|
-
}), /* @__PURE__ */ jsx(ButtonBase, {
|
|
107
|
-
isDisabled: !clearAllButtonEnabled,
|
|
108
|
-
buttonClass: clearAllButtonClassName,
|
|
109
|
-
text: "Clear All",
|
|
110
|
-
onClick: clearAllFilters
|
|
111
|
-
})]
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
//#endregion
|
|
116
|
-
//#region src/components/SearchFilter/SearchFilter.tsx
|
|
117
|
-
const SortFilter = ({ filter, selectFilterItem, radioButtonFillColor, radioButtonHoverColor, radioButtonUncheckedBorderColor }) => {
|
|
118
|
-
const filterTitle = filter.displayName;
|
|
119
|
-
return /* @__PURE__ */ jsx(Accordion, {
|
|
120
|
-
title: filterTitle,
|
|
121
|
-
content: /* @__PURE__ */ jsx(RadioButtonGroup, {
|
|
122
|
-
options: filter.items.map((item) => ({
|
|
123
|
-
label: item.displayName,
|
|
124
|
-
value: item.filterItemId,
|
|
125
|
-
isSelected: item.isSelected
|
|
126
|
-
})),
|
|
127
|
-
name: filterTitle,
|
|
128
|
-
onChange: (value) => {
|
|
129
|
-
const selectedItem = filter.items.find((item) => item.filterItemId === value);
|
|
130
|
-
selectFilterItem({
|
|
131
|
-
filterId: filter.filterId,
|
|
132
|
-
filterItemId: value,
|
|
133
|
-
isSelected: true,
|
|
134
|
-
displayName: selectedItem?.displayName || value
|
|
135
|
-
});
|
|
136
|
-
},
|
|
137
|
-
gap: "large",
|
|
138
|
-
textButtonGap: "large",
|
|
139
|
-
value: filter.items.find((item) => item.isSelected)?.filterItemId,
|
|
140
|
-
fillColor: radioButtonFillColor,
|
|
141
|
-
hoverColor: radioButtonHoverColor,
|
|
142
|
-
uncheckedBorderColor: radioButtonUncheckedBorderColor
|
|
143
|
-
})
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
const FilterItem = ({ filterId, filterItem, selectFilterItem }) => /* @__PURE__ */ jsx(ToggleButton, {
|
|
147
|
-
label: filterItem.displayName,
|
|
148
|
-
secondaryLabel: `(${filterItem.productCount})`,
|
|
149
|
-
isSelected: filterItem.isSelected,
|
|
150
|
-
onClick: () => selectFilterItem({
|
|
151
|
-
filterId,
|
|
152
|
-
filterItemId: filterItem.filterItemId,
|
|
153
|
-
isSelected: !filterItem.isSelected,
|
|
154
|
-
displayName: filterItem.displayName
|
|
155
|
-
}),
|
|
156
|
-
variant: "default"
|
|
157
|
-
});
|
|
158
|
-
const Filter = ({ filter, selectFilterItem }) => {
|
|
159
|
-
const filterContentClassName = classNames({
|
|
160
|
-
"spiffy-tw-flex": true,
|
|
161
|
-
"spiffy-tw-flex-wrap": true,
|
|
162
|
-
"spiffy-tw-gap-[8px]": true,
|
|
163
|
-
"spiffy-tw-pb-[1px]": true
|
|
164
|
-
});
|
|
165
|
-
const selectedFilterItems = getSelectedFilterItemsCount(filter);
|
|
166
|
-
return /* @__PURE__ */ jsx(Accordion, {
|
|
167
|
-
title: selectedFilterItems > 0 ? `${filter.displayName} (${selectedFilterItems})` : filter.displayName,
|
|
168
|
-
content: /* @__PURE__ */ jsx("div", {
|
|
169
|
-
className: filterContentClassName,
|
|
170
|
-
children: filter.items.map((item) => /* @__PURE__ */ jsx(FilterItem, {
|
|
171
|
-
filterId: filter.filterId,
|
|
172
|
-
filterItem: item,
|
|
173
|
-
selectFilterItem
|
|
174
|
-
}, item.filterItemId))
|
|
175
|
-
})
|
|
176
|
-
});
|
|
177
|
-
};
|
|
178
|
-
const SearchFilter = ({ filters, productCount, selectFilterItem, clearAllFilters, isOpen, setIsOpen, applyFiltersUnchangedClasses, applyFiltersChangedClasses, headerContent, footerContent, headerClassName, radioButtonFillColor, radioButtonHoverColor, radioButtonUncheckedBorderColor, filterCloseIconVariant }) => {
|
|
179
|
-
const closeModal = useCallback(() => setIsOpen(false), [setIsOpen]);
|
|
180
|
-
const filterCount = getTotalSelectedFilterItemsCount(filters);
|
|
181
|
-
const hasFiltersChanged = useHasFilterStateChanged(filters, isOpen);
|
|
182
|
-
const filterWrapperClassName = classNames({
|
|
183
|
-
"spiffy-tw-flex": true,
|
|
184
|
-
"spiffy-tw-flex-col": true,
|
|
185
|
-
"spiffy-tw-gap-[16px]": true,
|
|
186
|
-
"spiffy-tw-px-[24px]": true,
|
|
187
|
-
"spiffy-tw-py-[16px]": true,
|
|
188
|
-
"spiffy-tw-max-h-screen": true,
|
|
189
|
-
"spiffy-tw-overflow-y-auto": true
|
|
190
|
-
});
|
|
191
|
-
return /* @__PURE__ */ jsx(ModalSheet, {
|
|
192
|
-
isOpen,
|
|
193
|
-
closeModal,
|
|
194
|
-
headerProps: {
|
|
195
|
-
headerContent: headerContent || /* @__PURE__ */ jsx(SearchFilterHeader, {
|
|
196
|
-
closeModal,
|
|
197
|
-
productCount,
|
|
198
|
-
headerClassName: headerClassName ?? "",
|
|
199
|
-
filterCloseIconVariant
|
|
200
|
-
}),
|
|
201
|
-
chevronColor: "#000"
|
|
202
|
-
},
|
|
203
|
-
footerProps: { footerContent: footerContent || /* @__PURE__ */ jsx(SearchFilterFooter, {
|
|
204
|
-
closeModal,
|
|
205
|
-
clearAllFilters,
|
|
206
|
-
filterCount,
|
|
207
|
-
hasFiltersChanged,
|
|
208
|
-
applyFiltersUnchangedClasses,
|
|
209
|
-
applyFiltersChangedClasses
|
|
210
|
-
}) },
|
|
211
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
212
|
-
className: filterWrapperClassName,
|
|
213
|
-
children: filters.filter((filter) => filter.displayName !== "").map((filter) => {
|
|
214
|
-
if (filter.filterId === "sort") return /* @__PURE__ */ jsx(SortFilter, {
|
|
215
|
-
filter,
|
|
216
|
-
selectFilterItem,
|
|
217
|
-
radioButtonFillColor,
|
|
218
|
-
radioButtonHoverColor,
|
|
219
|
-
radioButtonUncheckedBorderColor
|
|
220
|
-
}, filter.filterId);
|
|
221
|
-
return /* @__PURE__ */ jsx(Filter, {
|
|
222
|
-
filter,
|
|
223
|
-
selectFilterItem
|
|
224
|
-
}, filter.filterId);
|
|
225
|
-
})
|
|
226
|
-
})
|
|
227
|
-
});
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
//#endregion
|
|
231
|
-
//#region src/components/SearchFilter/SearchFilterItem.tsx
|
|
232
|
-
const SearchFilterItem = ({ filterItem, onSelectFilterItem, radioButtonFillColor, radioButtonHoverColor, radioButtonUncheckedBorderColor }) => {
|
|
233
|
-
const { displayName, isSelected } = filterItem;
|
|
234
|
-
const radioClasses = classNames("spiffy-tw-w-4 spiffy-tw-h-4 spiffy-tw-rounded-full spiffy-tw-border-2", "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-center", radioButtonUncheckedBorderColor, radioButtonHoverColor, { [radioButtonFillColor]: isSelected });
|
|
235
|
-
return /* @__PURE__ */ jsxs("button", {
|
|
236
|
-
type: "button",
|
|
237
|
-
role: "option",
|
|
238
|
-
"aria-selected": isSelected,
|
|
239
|
-
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-py-2",
|
|
240
|
-
onClick: () => onSelectFilterItem(filterItem),
|
|
241
|
-
onKeyDown: (event) => {
|
|
242
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
243
|
-
event.preventDefault();
|
|
244
|
-
onSelectFilterItem(filterItem);
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
onKeyUp: (event) => {
|
|
248
|
-
if (event.key === " ") event.preventDefault();
|
|
249
|
-
},
|
|
250
|
-
children: [/* @__PURE__ */ jsx(Typography, {
|
|
251
|
-
variant: "body3",
|
|
252
|
-
children: displayName
|
|
253
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
254
|
-
className: radioClasses,
|
|
255
|
-
children: isSelected && /* @__PURE__ */ jsx("div", { className: classNames("spiffy-tw-h-2 spiffy-tw-w-2 spiffy-tw-rounded-full", {
|
|
256
|
-
"spiffy-tw-bg-white": radioButtonFillColor.includes("spiffy-tw-bg-"),
|
|
257
|
-
"spiffy-tw-bg-black": radioButtonFillColor.includes("spiffy-tw-bg-white")
|
|
258
|
-
}) })
|
|
259
|
-
})]
|
|
260
|
-
});
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
//#endregion
|
|
264
|
-
export { getTotalSelectedFilterItemsCount as a, getSelectedFilterItemsCount as i, SearchFilter as n, SearchFilterHeader as o, SearchFilterFooter as r, SearchFilterItem as t };
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CbDLau6x.cjs');
|
|
2
|
-
const require_ButtonBase = require('./ButtonBase-Bm_QOyM1.cjs');
|
|
3
|
-
const require_SearchFilter = require('./SearchFilter-CnP71PTj.cjs');
|
|
4
|
-
const require_searchFilterSidebarVariants = require('./searchFilterSidebarVariants-C61Byr1S.cjs');
|
|
5
|
-
let react = require("react");
|
|
6
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
|
|
8
|
-
//#region ../icons/src/SettingsVariant.tsx
|
|
9
|
-
const SvgSettingsVariant = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
10
|
-
width: 28,
|
|
11
|
-
height: 28,
|
|
12
|
-
viewBox: "0 0 28 28",
|
|
13
|
-
fill: "none",
|
|
14
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
-
...props,
|
|
16
|
-
children: [
|
|
17
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
18
|
-
cx: 3.5,
|
|
19
|
-
cy: 3.5,
|
|
20
|
-
r: 3.03346,
|
|
21
|
-
transform: "matrix(-1 0 0 1 22.4004 0)",
|
|
22
|
-
stroke: "#767676",
|
|
23
|
-
strokeWidth: .933083
|
|
24
|
-
}),
|
|
25
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
26
|
-
d: "M14 3.5L0 3.5",
|
|
27
|
-
stroke: "#767676",
|
|
28
|
-
strokeWidth: .933083
|
|
29
|
-
}),
|
|
30
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
31
|
-
d: "M28 3.5L23.5 3.5",
|
|
32
|
-
stroke: "#767676",
|
|
33
|
-
strokeWidth: .933083
|
|
34
|
-
}),
|
|
35
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
36
|
-
cx: 9.09961,
|
|
37
|
-
cy: 13.5,
|
|
38
|
-
r: 3.03346,
|
|
39
|
-
stroke: "#767676",
|
|
40
|
-
strokeWidth: .933083
|
|
41
|
-
}),
|
|
42
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
43
|
-
d: "M14 13.5L28 13.5",
|
|
44
|
-
stroke: "#767676",
|
|
45
|
-
strokeWidth: .933083
|
|
46
|
-
}),
|
|
47
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
48
|
-
d: "M0 13.5L4.5 13.5",
|
|
49
|
-
stroke: "#767676",
|
|
50
|
-
strokeWidth: .933083
|
|
51
|
-
}),
|
|
52
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
53
|
-
cx: 3.5,
|
|
54
|
-
cy: 3.5,
|
|
55
|
-
r: 3.03346,
|
|
56
|
-
transform: "matrix(-1 0 0 1 22.4004 20)",
|
|
57
|
-
stroke: "#767676",
|
|
58
|
-
strokeWidth: .933083
|
|
59
|
-
}),
|
|
60
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
61
|
-
d: "M14 23.5H0",
|
|
62
|
-
stroke: "#767676",
|
|
63
|
-
strokeWidth: .933083
|
|
64
|
-
}),
|
|
65
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
66
|
-
d: "M28 23.5L23.5 23.5",
|
|
67
|
-
stroke: "#767676",
|
|
68
|
-
strokeWidth: .933083
|
|
69
|
-
})
|
|
70
|
-
]
|
|
71
|
-
});
|
|
72
|
-
var SettingsVariant_default = SvgSettingsVariant;
|
|
73
|
-
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx
|
|
76
|
-
const SearchResultsFilter = ({ productCount, isOpen, setIsOpen, searchFilters, searchFilterSidebarVariant, onSelectFilterItem, onClearAllFilters, filterButtonText }) => {
|
|
77
|
-
const { applyFiltersUnchangedClasses, applyFiltersChangedClasses, searchFilterHeaderClasses, radioButtonFillColor, radioButtonHoverColor, radioButtonUncheckedBorderColor, filterCloseIconVariant } = require_searchFilterSidebarVariants.searchFilterSidebarVariantClasses[searchFilterSidebarVariant];
|
|
78
|
-
const openFilter = (0, react.useCallback)(() => {
|
|
79
|
-
setIsOpen(true);
|
|
80
|
-
}, [setIsOpen]);
|
|
81
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SearchFilter.SearchFilter, {
|
|
82
|
-
isOpen,
|
|
83
|
-
setIsOpen,
|
|
84
|
-
filters: searchFilters,
|
|
85
|
-
productCount,
|
|
86
|
-
selectFilterItem: onSelectFilterItem,
|
|
87
|
-
clearAllFilters: onClearAllFilters,
|
|
88
|
-
applyFiltersUnchangedClasses,
|
|
89
|
-
applyFiltersChangedClasses,
|
|
90
|
-
filterButtonText,
|
|
91
|
-
radioButtonFillColor,
|
|
92
|
-
radioButtonHoverColor,
|
|
93
|
-
radioButtonUncheckedBorderColor,
|
|
94
|
-
filterCloseIconVariant,
|
|
95
|
-
headerContent: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SearchFilter.SearchFilterHeader, {
|
|
96
|
-
closeModal: () => setIsOpen(false),
|
|
97
|
-
productCount,
|
|
98
|
-
headerClassName: searchFilterHeaderClasses,
|
|
99
|
-
filterCloseIconVariant
|
|
100
|
-
})
|
|
101
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ButtonBase.ButtonBase, {
|
|
102
|
-
onClick: openFilter,
|
|
103
|
-
icon: SettingsVariant_default,
|
|
104
|
-
iconClass: "spiffy-tw-w-[28px] spiffy-tw-h-[28px] spiffy-tw-object-center",
|
|
105
|
-
text: filterButtonText,
|
|
106
|
-
textClass: "spiffy-tw-uppercase spiffy-tw-text-[--spiffy-colors-text-primary] spiffy-tw-hidden md:spiffy-tw-block",
|
|
107
|
-
buttonClass: "spiffy-tw-flex-row spiffy-tw-pl-[16px] sm:spiffy-tw-pl-0 sm:spiffy-tw-px-4 sm:spiffy-tw-gap-[8px]",
|
|
108
|
-
disablePadding: true
|
|
109
|
-
})] });
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
//#endregion
|
|
113
|
-
Object.defineProperty(exports, 'SearchResultsFilter', {
|
|
114
|
-
enumerable: true,
|
|
115
|
-
get: function () {
|
|
116
|
-
return SearchResultsFilter;
|
|
117
|
-
}
|
|
118
|
-
});
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { t as Typography } from "./Typography-xehJH05l.js";
|
|
2
|
-
import { n as AppliedFiltersScrollbar, t as DynamicFiltersScrollbar } from "./DynamicFiltersScrollbar-CibstqNd.js";
|
|
3
|
-
import { t as ProductCardSkeleton } from "./ProductCard-ChitHvuc.js";
|
|
4
|
-
import { n as productGridVariantClasses, t as ProductGrid } from "./ProductGrid-DukHo_KY.js";
|
|
5
|
-
import { t as RecommendedProducts } from "./RecommendedProducts-DooGvLFT.js";
|
|
6
|
-
import { t as searchFilterSidebarVariantClasses } from "./searchFilterSidebarVariants-DcwlBfvY.js";
|
|
7
|
-
import { t as SparkleAnimation } from "./SparkleAnimation-HY4cgwE3.js";
|
|
8
|
-
import { motion } from "framer-motion";
|
|
9
|
-
import classNames from "classnames";
|
|
10
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import Sparkles from "@envive-ai/react-icons/Sparkles";
|
|
12
|
-
|
|
13
|
-
//#region src/components/SearchResultsStates/NoSearchResultsFound.tsx
|
|
14
|
-
const NoSearchResultsFound = ({ containerPaddingClasses, noResultsFoundText, sparkleIconColor = "var(--spiffy-colors-accent-primary)", recommendedProducts, searchText, merchantShortName, productGridVariant }) => {
|
|
15
|
-
const containerClasses = classNames(containerPaddingClasses, "spiffy-tw-mt-6", { "spiffy-tw-mb-[100vh]": recommendedProducts.length === 0 });
|
|
16
|
-
let textPrompt;
|
|
17
|
-
if (recommendedProducts.length > 0) textPrompt = noResultsFoundText ? /* @__PURE__ */ jsx("span", { children: noResultsFoundText }) : /* @__PURE__ */ jsxs("span", { children: [
|
|
18
|
-
"I’m sorry, I wasn’t able to find an exact match for",
|
|
19
|
-
/* @__PURE__ */ jsxs("strong", {
|
|
20
|
-
className: "spiffy-tw-font-semibold",
|
|
21
|
-
children: [" ", `"${searchText}".`]
|
|
22
|
-
}),
|
|
23
|
-
" Try changing your filters or adjusting your search query. In the meantime, explore some of our top-selling products below."
|
|
24
|
-
] });
|
|
25
|
-
else textPrompt = /* @__PURE__ */ jsxs("span", { children: [
|
|
26
|
-
"I’m sorry, I wasn’t able to find an exact match for",
|
|
27
|
-
/* @__PURE__ */ jsxs("strong", {
|
|
28
|
-
className: "spiffy-tw-font-semibold",
|
|
29
|
-
children: [" ", `"${searchText}."`]
|
|
30
|
-
}),
|
|
31
|
-
" Try changing your filters or adjusting your search query."
|
|
32
|
-
] });
|
|
33
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
34
|
-
className: containerClasses,
|
|
35
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
36
|
-
className: "spiffy-tw-flex spiffy-tw-items-start spiffy-tw-gap-2",
|
|
37
|
-
children: [/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Sparkles, {
|
|
38
|
-
className: "spiffy-tw-h-[24px] spiffy-tw-w-[24px]",
|
|
39
|
-
style: { color: sparkleIconColor }
|
|
40
|
-
}) }), /* @__PURE__ */ jsx(Typography, {
|
|
41
|
-
variant: "body2",
|
|
42
|
-
children: textPrompt
|
|
43
|
-
})]
|
|
44
|
-
}), /* @__PURE__ */ jsx(RecommendedProducts, {
|
|
45
|
-
retrievedProducts: recommendedProducts,
|
|
46
|
-
merchantShortName,
|
|
47
|
-
productCardConfig: {
|
|
48
|
-
variant: "minimal",
|
|
49
|
-
hoverVariant: "none",
|
|
50
|
-
layoutVariant: "square"
|
|
51
|
-
},
|
|
52
|
-
productGridVariant
|
|
53
|
-
})]
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/components/SearchResultsStates/SearchResultsGrid.tsx
|
|
59
|
-
const SearchResultsGrid = ({ productList, productCardConfig, merchantShortName, availableDynamicFilters, searchFilterSidebarVariant, productGridVariant, selectedFilterOptions, containerXPaddingClasses, productGridClasses, onRemoveFilter, onToggleDynamicFilter, onProductClick }) => {
|
|
60
|
-
const sharedFilterBarClasses = classNames("spiffy-suggestion-bar", "spiffy-tw-no-scrollbar", "spiffy-tw-flex", "spiffy-tw-flex-row", "spiffy-tw-gap-2", "spiffy-tw-mb-[16px]", "spiffy-tw-overflow-x-scroll", containerXPaddingClasses);
|
|
61
|
-
const filterBarClasses = classNames(sharedFilterBarClasses, "spiffy-tw-mt-[24px]");
|
|
62
|
-
const appliedFilterBarClasses = classNames(sharedFilterBarClasses, "spiffy-tw-mb-[32px]", "spiffy-tw-mt-[8px]");
|
|
63
|
-
const { filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses } = searchFilterSidebarVariantClasses[searchFilterSidebarVariant];
|
|
64
|
-
return /* @__PURE__ */ jsxs(motion.div, {
|
|
65
|
-
className: "spiffy-tw-w-full spiffy-tw-justify-center spiffy-tw-overflow-hidden",
|
|
66
|
-
initial: { opacity: 0 },
|
|
67
|
-
animate: { opacity: 1 },
|
|
68
|
-
exit: { opacity: 0 },
|
|
69
|
-
transition: { duration: .2 },
|
|
70
|
-
children: [
|
|
71
|
-
/* @__PURE__ */ jsx(AppliedFiltersScrollbar, {
|
|
72
|
-
selectedFilterOptions,
|
|
73
|
-
filterBarClassNames: appliedFilterBarClasses,
|
|
74
|
-
filterDefaultClasses,
|
|
75
|
-
filterHoverClasses,
|
|
76
|
-
appliedFilterBackgroundClasses,
|
|
77
|
-
onRemoveFilter
|
|
78
|
-
}),
|
|
79
|
-
/* @__PURE__ */ jsx(DynamicFiltersScrollbar, {
|
|
80
|
-
availableDynamicFilters,
|
|
81
|
-
filterBarClassNames: filterBarClasses,
|
|
82
|
-
filterDefaultClasses,
|
|
83
|
-
filterHoverClasses,
|
|
84
|
-
onToggleDynamicFilter
|
|
85
|
-
}),
|
|
86
|
-
/* @__PURE__ */ jsx(ProductGrid, {
|
|
87
|
-
productList,
|
|
88
|
-
productGridVariant,
|
|
89
|
-
productGridClasses,
|
|
90
|
-
productCardConfig,
|
|
91
|
-
merchantShortName,
|
|
92
|
-
onProductClick
|
|
93
|
-
})
|
|
94
|
-
]
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
//#endregion
|
|
99
|
-
//#region src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx
|
|
100
|
-
const SearchResultsLoadingGrid = ({ productGridVariant, productGridClasses, sparkleIconColor = "var(--spiffy-colors-accent-primary)" }) => {
|
|
101
|
-
const { productCardLayoutVariant, productCardImageAspectRatio } = productGridVariantClasses[productGridVariant];
|
|
102
|
-
return /* @__PURE__ */ jsx(motion.div, {
|
|
103
|
-
className: "spiffy-tw-w-full spiffy-tw-justify-center spiffy-tw-overflow-hidden",
|
|
104
|
-
initial: { opacity: 0 },
|
|
105
|
-
animate: { opacity: 1 },
|
|
106
|
-
exit: { opacity: 0 },
|
|
107
|
-
transition: { duration: .2 },
|
|
108
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
109
|
-
className: "spiffy-tw-mt-6 spiffy-tw-w-full",
|
|
110
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
111
|
-
className: "spiffy-tw-mb-4 spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between",
|
|
112
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
113
|
-
className: "spiffy-tw-ml-[16px] spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-2 md:spiffy-tw-ml-[80px]",
|
|
114
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
115
|
-
className: "spiffy-tw-width-[24px]",
|
|
116
|
-
children: /* @__PURE__ */ jsx(SparkleAnimation, {
|
|
117
|
-
color: sparkleIconColor,
|
|
118
|
-
animate: true
|
|
119
|
-
})
|
|
120
|
-
}), /* @__PURE__ */ jsx(Typography, {
|
|
121
|
-
variant: "body2",
|
|
122
|
-
children: "Finding the best options for you..."
|
|
123
|
-
})]
|
|
124
|
-
})
|
|
125
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
126
|
-
className: productGridClasses,
|
|
127
|
-
children: Array.from({ length: 8 }).map((_, index) => /* @__PURE__ */ jsx(ProductCardSkeleton, {
|
|
128
|
-
layoutVariant: productCardLayoutVariant,
|
|
129
|
-
aspectRatio: productCardImageAspectRatio,
|
|
130
|
-
growWithContainer: true
|
|
131
|
-
}, index))
|
|
132
|
-
})]
|
|
133
|
-
})
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
//#endregion
|
|
138
|
-
export { SearchResultsGrid as n, NoSearchResultsFound as r, SearchResultsLoadingGrid as t };
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CbDLau6x.cjs');
|
|
2
|
-
const require_Typography = require('./Typography-Csg-nd_w.cjs');
|
|
3
|
-
const require_DynamicFiltersScrollbar = require('./DynamicFiltersScrollbar-bT3VoG-D.cjs');
|
|
4
|
-
const require_ProductCard = require('./ProductCard-C3seoFWE.cjs');
|
|
5
|
-
const require_ProductGrid = require('./ProductGrid-Ct2DvLGf.cjs');
|
|
6
|
-
const require_RecommendedProducts = require('./RecommendedProducts-Cy-1szYc.cjs');
|
|
7
|
-
const require_searchFilterSidebarVariants = require('./searchFilterSidebarVariants-C61Byr1S.cjs');
|
|
8
|
-
const require_SparkleAnimation = require('./SparkleAnimation-Bg5qax1t.cjs');
|
|
9
|
-
let framer_motion = require("framer-motion");
|
|
10
|
-
let classnames = require("classnames");
|
|
11
|
-
classnames = require_chunk.__toESM(classnames);
|
|
12
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
|
-
let __envive_ai_react_icons_Sparkles = require("@envive-ai/react-icons/Sparkles");
|
|
14
|
-
__envive_ai_react_icons_Sparkles = require_chunk.__toESM(__envive_ai_react_icons_Sparkles);
|
|
15
|
-
|
|
16
|
-
//#region src/components/SearchResultsStates/NoSearchResultsFound.tsx
|
|
17
|
-
const NoSearchResultsFound = ({ containerPaddingClasses, noResultsFoundText, sparkleIconColor = "var(--spiffy-colors-accent-primary)", recommendedProducts, searchText, merchantShortName, productGridVariant }) => {
|
|
18
|
-
const containerClasses = (0, classnames.default)(containerPaddingClasses, "spiffy-tw-mt-6", { "spiffy-tw-mb-[100vh]": recommendedProducts.length === 0 });
|
|
19
|
-
let textPrompt;
|
|
20
|
-
if (recommendedProducts.length > 0) textPrompt = noResultsFoundText ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: noResultsFoundText }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
21
|
-
"I’m sorry, I wasn’t able to find an exact match for",
|
|
22
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", {
|
|
23
|
-
className: "spiffy-tw-font-semibold",
|
|
24
|
-
children: [" ", `"${searchText}".`]
|
|
25
|
-
}),
|
|
26
|
-
" Try changing your filters or adjusting your search query. In the meantime, explore some of our top-selling products below."
|
|
27
|
-
] });
|
|
28
|
-
else textPrompt = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
29
|
-
"I’m sorry, I wasn’t able to find an exact match for",
|
|
30
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", {
|
|
31
|
-
className: "spiffy-tw-font-semibold",
|
|
32
|
-
children: [" ", `"${searchText}."`]
|
|
33
|
-
}),
|
|
34
|
-
" Try changing your filters or adjusting your search query."
|
|
35
|
-
] });
|
|
36
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
37
|
-
className: containerClasses,
|
|
38
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
39
|
-
className: "spiffy-tw-flex spiffy-tw-items-start spiffy-tw-gap-2",
|
|
40
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_Sparkles.default, {
|
|
41
|
-
className: "spiffy-tw-h-[24px] spiffy-tw-w-[24px]",
|
|
42
|
-
style: { color: sparkleIconColor }
|
|
43
|
-
}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
|
|
44
|
-
variant: "body2",
|
|
45
|
-
children: textPrompt
|
|
46
|
-
})]
|
|
47
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_RecommendedProducts.RecommendedProducts, {
|
|
48
|
-
retrievedProducts: recommendedProducts,
|
|
49
|
-
merchantShortName,
|
|
50
|
-
productCardConfig: {
|
|
51
|
-
variant: "minimal",
|
|
52
|
-
hoverVariant: "none",
|
|
53
|
-
layoutVariant: "square"
|
|
54
|
-
},
|
|
55
|
-
productGridVariant
|
|
56
|
-
})]
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region src/components/SearchResultsStates/SearchResultsGrid.tsx
|
|
62
|
-
const SearchResultsGrid = ({ productList, productCardConfig, merchantShortName, availableDynamicFilters, searchFilterSidebarVariant, productGridVariant, selectedFilterOptions, containerXPaddingClasses, productGridClasses, onRemoveFilter, onToggleDynamicFilter, onProductClick }) => {
|
|
63
|
-
const sharedFilterBarClasses = (0, classnames.default)("spiffy-suggestion-bar", "spiffy-tw-no-scrollbar", "spiffy-tw-flex", "spiffy-tw-flex-row", "spiffy-tw-gap-2", "spiffy-tw-mb-[16px]", "spiffy-tw-overflow-x-scroll", containerXPaddingClasses);
|
|
64
|
-
const filterBarClasses = (0, classnames.default)(sharedFilterBarClasses, "spiffy-tw-mt-[24px]");
|
|
65
|
-
const appliedFilterBarClasses = (0, classnames.default)(sharedFilterBarClasses, "spiffy-tw-mb-[32px]", "spiffy-tw-mt-[8px]");
|
|
66
|
-
const { filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses } = require_searchFilterSidebarVariants.searchFilterSidebarVariantClasses[searchFilterSidebarVariant];
|
|
67
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(framer_motion.motion.div, {
|
|
68
|
-
className: "spiffy-tw-w-full spiffy-tw-justify-center spiffy-tw-overflow-hidden",
|
|
69
|
-
initial: { opacity: 0 },
|
|
70
|
-
animate: { opacity: 1 },
|
|
71
|
-
exit: { opacity: 0 },
|
|
72
|
-
transition: { duration: .2 },
|
|
73
|
-
children: [
|
|
74
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DynamicFiltersScrollbar.AppliedFiltersScrollbar, {
|
|
75
|
-
selectedFilterOptions,
|
|
76
|
-
filterBarClassNames: appliedFilterBarClasses,
|
|
77
|
-
filterDefaultClasses,
|
|
78
|
-
filterHoverClasses,
|
|
79
|
-
appliedFilterBackgroundClasses,
|
|
80
|
-
onRemoveFilter
|
|
81
|
-
}),
|
|
82
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DynamicFiltersScrollbar.DynamicFiltersScrollbar, {
|
|
83
|
-
availableDynamicFilters,
|
|
84
|
-
filterBarClassNames: filterBarClasses,
|
|
85
|
-
filterDefaultClasses,
|
|
86
|
-
filterHoverClasses,
|
|
87
|
-
onToggleDynamicFilter
|
|
88
|
-
}),
|
|
89
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProductGrid.ProductGrid, {
|
|
90
|
-
productList,
|
|
91
|
-
productGridVariant,
|
|
92
|
-
productGridClasses,
|
|
93
|
-
productCardConfig,
|
|
94
|
-
merchantShortName,
|
|
95
|
-
onProductClick
|
|
96
|
-
})
|
|
97
|
-
]
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
//#endregion
|
|
102
|
-
//#region src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx
|
|
103
|
-
const SearchResultsLoadingGrid = ({ productGridVariant, productGridClasses, sparkleIconColor = "var(--spiffy-colors-accent-primary)" }) => {
|
|
104
|
-
const { productCardLayoutVariant, productCardImageAspectRatio } = require_ProductGrid.productGridVariantClasses[productGridVariant];
|
|
105
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
|
|
106
|
-
className: "spiffy-tw-w-full spiffy-tw-justify-center spiffy-tw-overflow-hidden",
|
|
107
|
-
initial: { opacity: 0 },
|
|
108
|
-
animate: { opacity: 1 },
|
|
109
|
-
exit: { opacity: 0 },
|
|
110
|
-
transition: { duration: .2 },
|
|
111
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
112
|
-
className: "spiffy-tw-mt-6 spiffy-tw-w-full",
|
|
113
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
114
|
-
className: "spiffy-tw-mb-4 spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between",
|
|
115
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
116
|
-
className: "spiffy-tw-ml-[16px] spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-2 md:spiffy-tw-ml-[80px]",
|
|
117
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
118
|
-
className: "spiffy-tw-width-[24px]",
|
|
119
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SparkleAnimation.SparkleAnimation, {
|
|
120
|
-
color: sparkleIconColor,
|
|
121
|
-
animate: true
|
|
122
|
-
})
|
|
123
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
|
|
124
|
-
variant: "body2",
|
|
125
|
-
children: "Finding the best options for you..."
|
|
126
|
-
})]
|
|
127
|
-
})
|
|
128
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
129
|
-
className: productGridClasses,
|
|
130
|
-
children: Array.from({ length: 8 }).map((_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProductCard.ProductCardSkeleton, {
|
|
131
|
-
layoutVariant: productCardLayoutVariant,
|
|
132
|
-
aspectRatio: productCardImageAspectRatio,
|
|
133
|
-
growWithContainer: true
|
|
134
|
-
}, index))
|
|
135
|
-
})]
|
|
136
|
-
})
|
|
137
|
-
});
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
//#endregion
|
|
141
|
-
Object.defineProperty(exports, 'NoSearchResultsFound', {
|
|
142
|
-
enumerable: true,
|
|
143
|
-
get: function () {
|
|
144
|
-
return NoSearchResultsFound;
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
Object.defineProperty(exports, 'SearchResultsGrid', {
|
|
148
|
-
enumerable: true,
|
|
149
|
-
get: function () {
|
|
150
|
-
return SearchResultsGrid;
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
Object.defineProperty(exports, 'SearchResultsLoadingGrid', {
|
|
154
|
-
enumerable: true,
|
|
155
|
-
get: function () {
|
|
156
|
-
return SearchResultsLoadingGrid;
|
|
157
|
-
}
|
|
158
|
-
});
|