@envive-ai/react-toolkit 0.2.11 → 0.2.13-arthur-1
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/{Accordion-B8aUlf0q.js → Accordion-8zFBEEaN.js} +25 -6
- package/dist/{Accordion-FyCFBOen.cjs → Accordion-DPUaEXiE.cjs} +23 -8
- package/dist/{AnimatedChevron-wpcAHp6d.cjs → AnimatedChevron-CPW5KPLr.cjs} +0 -2
- package/dist/{AnimatedChevron-Dee6Pe81.js → AnimatedChevron-DO_jcnJg.js} +1 -1
- package/dist/{ButtonBase-B6vDKbGQ.cjs → ButtonBase-C44g6llb.cjs} +1 -3
- package/dist/{ButtonBase-Bpc7nOpz.js → ButtonBase-Cjo-fBg2.js} +3 -3
- package/dist/{DynamicFiltersScrollbar-DIwHWq6v.cjs → DynamicFiltersScrollbar-IO886VXD.cjs} +3 -6
- package/dist/{DynamicFiltersScrollbar-D8OqC4DA.js → DynamicFiltersScrollbar-s5yfmMau.js} +5 -7
- package/dist/FourPointStar-3DqnYmfN.js +21 -0
- package/dist/FourPointStar-AQ9OSu0S.cjs +26 -0
- package/dist/{ImageWithFallback-DvaVpR6v.cjs → ImageWithFallback-C-ZQn7tR.cjs} +1 -2
- package/dist/{ImageWithFallback-BW57cQw-.js → ImageWithFallback-DjDNefaG.js} +2 -2
- package/dist/{ModalSheet-DFva7krP.js → ModalSheet-C5f5abw1.js} +12 -13
- package/dist/{ModalSheet-BvM2PJbH.cjs → ModalSheet-JZerJZ1T.cjs} +11 -16
- package/dist/OutlinedStar-CC0V_jAK.cjs +26 -0
- package/dist/OutlinedStar-WWs3gRwt.js +21 -0
- package/dist/{ProductCard-C2KvH4MN.cjs → ProductCard-C7rZyWpj.cjs} +31 -28
- package/dist/{ProductCard-BiWAcPO4.js → ProductCard-GxpFxjh0.js} +19 -24
- package/dist/{ProductGrid-DkOyRAEg.cjs → ProductGrid-0A8vml2y.cjs} +2 -3
- package/dist/{ProductGrid-B1RtE58G.js → ProductGrid-DAwc9dKV.js} +3 -3
- package/dist/{RadioButton-CQ6qOvBl.js → RadioButton-DOc8g47U.js} +3 -3
- package/dist/{RadioButton-DP-qs5cy.cjs → RadioButton-DpF1wymL.cjs} +1 -3
- package/dist/{RadioButtonGroup-CJPWfAaA.cjs → RadioButtonGroup-ByzTXNAb.cjs} +2 -3
- package/dist/{RadioButtonGroup-Ce8cKqYw.js → RadioButtonGroup-YQIxmR7j.js} +3 -3
- package/dist/RecommendedProducts-C6dLpLPP.js +49 -0
- package/dist/RecommendedProducts-qkPxXVJn.cjs +56 -0
- package/dist/{SearchAutocomplete-bbMvWWjI.cjs → SearchAutocomplete-BdTWETDB.cjs} +5 -9
- package/dist/{SearchAutocomplete-CjjL2_lm.js → SearchAutocomplete-DNe193EV.js} +7 -8
- package/dist/{SearchFilter-BLi6E9Wx.cjs → SearchFilter-BRtCSuAn.cjs} +38 -44
- package/dist/{SearchFilter-wHwOym_n.js → SearchFilter-DvJx0b0W.js} +40 -44
- package/dist/{SearchInput-BA6bepV_.cjs → SearchInput-CImlqrau.cjs} +64 -13
- package/dist/{SearchInput-C3nNkmBm.js → SearchInput-kLhxkpgq.js} +64 -9
- package/dist/{SearchInputForm/index.js → SearchInputForm-CFm_hUvX.js} +7 -9
- package/dist/{SearchInputForm/index.cjs → SearchInputForm-ZgNNEX6E.cjs} +13 -12
- package/dist/SearchResultsFilterButton-D929tRt9.cjs +96 -0
- package/dist/SearchResultsFilterButton-Dk7u7rgn.js +90 -0
- package/dist/{SearchResultsFilterSidebar/index.cjs → SearchResultsFilterSidebar-BRFONIEq.cjs} +11 -18
- package/dist/{SearchResultsFilterSidebar/index.js → SearchResultsFilterSidebar-DLzQoFGD.js} +5 -14
- package/dist/SearchResultsStates-CQR5Il4l.cjs +196 -0
- package/dist/SearchResultsStates-D7HfsLeZ.js +177 -0
- package/dist/{SparkleAnimation-BFAj73CF.cjs → SparkleAnimation-BikAiAmb.cjs} +20 -15
- package/dist/{SparkleAnimation-BYDUEqWX.js → SparkleAnimation-szzXiTam.js} +15 -12
- package/dist/{Spinner-Ccy6VFEp.cjs → Spinner-7HblFCja.cjs} +1 -2
- package/dist/{Spinner-D2HbRsuw.js → Spinner-OFbXMms8.js} +2 -2
- package/dist/{TextInput-CYTko3-n.cjs → TextInput-CaynCoDf.cjs} +3 -5
- package/dist/{TextInput-CmxnphaT.js → TextInput-CsdOvLBQ.js} +5 -6
- package/dist/{ToggleButton-V9Qsaks7.js → ToggleButton-D8--AKKK.js} +3 -3
- package/dist/{ToggleButton-CvxNLMe_.cjs → ToggleButton-Dxk3U1hR.cjs} +1 -2
- package/dist/{Typography-C3QmJzFK.js → Typography-xehJH05l.js} +1 -1
- package/dist/colorsConfig-CFI1KN8R.js +26 -0
- package/dist/colorsConfig-Dp7w5LPb.cjs +38 -0
- package/dist/{Accordion/index.d.ts → components/Accordion/index-D_7-KJa0.d.cts} +2 -2
- package/dist/{Accordion/index.d.cts → components/Accordion/index-Dd_9XeqA.d.ts} +2 -2
- package/dist/components/Accordion/index.cjs +5 -0
- package/dist/components/Accordion/index.js +5 -0
- package/dist/{AnimatedChevron/index.d.cts → components/AnimatedChevron/index-BwQ6tJL8.d.cts} +2 -2
- package/dist/{AnimatedChevron/index.d.ts → components/AnimatedChevron/index-DZdGWikh.d.ts} +2 -2
- package/dist/components/AnimatedChevron/index.cjs +3 -0
- package/dist/components/AnimatedChevron/index.js +3 -0
- package/dist/{AppliedFiltersScrollbar/index.d.ts → components/AppliedFiltersScrollbar/index-Dcyc-5Bv.d.ts} +3 -3
- package/dist/{AppliedFiltersScrollbar/index.d.cts → components/AppliedFiltersScrollbar/index-VbXAIfym.d.cts} +3 -3
- package/dist/{AppliedFiltersScrollbar → components/AppliedFiltersScrollbar}/index.cjs +4 -6
- package/dist/{AppliedFiltersScrollbar → components/AppliedFiltersScrollbar}/index.js +3 -4
- package/dist/{ButtonBase/index.d.ts → components/ButtonBase/index-Bxdhf_O8.d.cts} +3 -3
- package/dist/{ButtonBase/index.d.cts → components/ButtonBase/index-VoanK6Pr.d.ts} +3 -3
- package/dist/components/ButtonBase/index.cjs +6 -0
- package/dist/components/ButtonBase/index.js +5 -0
- package/dist/{DynamicFiltersScrollbar/index.d.cts → components/DynamicFiltersScrollbar/index-CHzxQmaW.d.cts} +2 -2
- package/dist/{DynamicFiltersScrollbar/index.d.ts → components/DynamicFiltersScrollbar/index-vVNOOaOF.d.ts} +2 -2
- package/dist/{DynamicFiltersScrollbar → components/DynamicFiltersScrollbar}/index.cjs +4 -6
- package/dist/{DynamicFiltersScrollbar → components/DynamicFiltersScrollbar}/index.js +3 -4
- package/dist/{FilterScrollbar/index.d.cts → components/FilterScrollbar/index-DXcZLcQi.d.cts} +4 -4
- package/dist/{FilterScrollbar/index.d.ts → components/FilterScrollbar/index-DwLyxqQl.d.ts} +4 -4
- package/dist/components/FilterScrollbar/index.cjs +5 -0
- package/dist/components/FilterScrollbar/index.js +4 -0
- package/dist/{ImageWithFallback/index.d.cts → components/ImageWithFallback/index-BLbkDyG8.d.cts} +2 -2
- package/dist/{ImageWithFallback/index.d.ts → components/ImageWithFallback/index-NJZsMOXc.d.ts} +2 -2
- package/dist/components/ImageWithFallback/index.cjs +3 -0
- package/dist/components/ImageWithFallback/index.js +3 -0
- package/dist/{ModalSheet/index.d.cts → components/ModalSheet/index-B5q4MHdq.d.cts} +2 -2
- package/dist/{ModalSheet/index.d.ts → components/ModalSheet/index-BN20-QS0.d.ts} +2 -2
- package/dist/components/ModalSheet/index.cjs +4 -0
- package/dist/components/ModalSheet/index.js +4 -0
- package/dist/components/ProductCard/index-CglXQ3wh.d.ts +2 -0
- package/dist/components/ProductCard/index-XVlN6iMl.d.cts +2 -0
- package/dist/{ProductCard → components/ProductCard}/index.cjs +7 -4
- package/dist/components/ProductCard/index.js +7 -0
- package/dist/{ProductGrid/index.d.ts → components/ProductGrid/index-BPBgwFsa.d.cts} +4 -3
- package/dist/{ProductGrid/index.d.cts → components/ProductGrid/index-D_YpwJCd.d.ts} +4 -3
- package/dist/components/ProductGrid/index.cjs +9 -0
- package/dist/components/ProductGrid/index.js +8 -0
- package/dist/{RadioButton/index.d.cts → components/RadioButton/index-BeOT_AlW.d.cts} +3 -3
- package/dist/{RadioButton/index.d.ts → components/RadioButton/index-CxluCaJw.d.ts} +3 -3
- package/dist/components/RadioButton/index.cjs +4 -0
- package/dist/components/RadioButton/index.js +4 -0
- package/dist/{RadioButtonGroup/index.d.cts → components/RadioButtonGroup/index-BOhV-rG3.d.cts} +3 -3
- package/dist/{RadioButtonGroup/index.d.ts → components/RadioButtonGroup/index-KeOIiYNW.d.ts} +3 -3
- package/dist/components/RadioButtonGroup/index.cjs +6 -0
- package/dist/components/RadioButtonGroup/index.js +5 -0
- package/dist/components/RecommendedProducts/index-BFM83Qu3.d.cts +15 -0
- package/dist/components/RecommendedProducts/index-DlbCfGof.d.ts +15 -0
- package/dist/components/RecommendedProducts/index.cjs +12 -0
- package/dist/components/RecommendedProducts/index.js +12 -0
- package/dist/{SearchAutocomplete/index.d.cts → components/SearchAutocomplete/index-BcnHcv7Q.d.cts} +2 -2
- package/dist/{SearchAutocomplete/index.d.ts → components/SearchAutocomplete/index-Br_POGOz.d.ts} +2 -2
- package/dist/components/SearchAutocomplete/index.cjs +6 -0
- package/dist/components/SearchAutocomplete/index.js +6 -0
- package/dist/components/SearchFilter/index-BbIqmoO8.d.ts +91 -0
- package/dist/components/SearchFilter/index-DAL3Wl6U.d.cts +91 -0
- package/dist/components/SearchFilter/index.cjs +18 -0
- package/dist/components/SearchFilter/index.js +13 -0
- package/dist/{SearchInput/index.d.cts → components/SearchInput/index-C0H51Flv.d.ts} +4 -3
- package/dist/{SearchInput/index.d.ts → components/SearchInput/index-rFDdhvqg.d.cts} +4 -3
- package/dist/components/SearchInput/index.cjs +8 -0
- package/dist/components/SearchInput/index.js +7 -0
- package/dist/{SearchInputForm/index.d.cts → components/SearchInputForm/index-Cleto06d.d.cts} +4 -2
- package/dist/{SearchInputForm/index.d.ts → components/SearchInputForm/index-DjjoY7MQ.d.ts} +6 -4
- package/dist/components/SearchInputForm/index.cjs +10 -0
- package/dist/components/SearchInputForm/index.js +10 -0
- package/dist/{SearchResultsContent/index.d.ts → components/SearchResultsContent/index-C4qsTFUd.d.cts} +19 -7
- package/dist/{SearchResultsContent/index.d.cts → components/SearchResultsContent/index-KdFf9yzs.d.ts} +17 -5
- package/dist/components/SearchResultsContent/index.cjs +62 -0
- package/dist/components/SearchResultsContent/index.js +60 -0
- package/dist/components/SearchResultsFilterButton/index-BvntKdyC.d.ts +13 -0
- package/dist/components/SearchResultsFilterButton/index-zgQsT6vz.d.cts +13 -0
- package/dist/components/SearchResultsFilterButton/index.cjs +10 -0
- package/dist/components/SearchResultsFilterButton/index.js +10 -0
- package/dist/components/SearchResultsFilterModal/index-CNBQ1ikL.d.ts +27 -0
- package/dist/components/SearchResultsFilterModal/index-mRcnKysU.d.cts +27 -0
- package/dist/components/SearchResultsFilterModal/index.cjs +48 -0
- package/dist/components/SearchResultsFilterModal/index.js +47 -0
- package/dist/components/SearchResultsFilterSidebar/index-C7PE9z5a.d.ts +2 -0
- package/dist/components/SearchResultsFilterSidebar/index-DKzEKFV3.d.cts +2 -0
- package/dist/components/SearchResultsFilterSidebar/index.cjs +17 -0
- package/dist/components/SearchResultsFilterSidebar/index.js +16 -0
- package/dist/{SearchResultsStates/index.d.ts → components/SearchResultsStates/index-Dugoegtn.d.ts} +20 -9
- package/dist/{SearchResultsStates/index.d.cts → components/SearchResultsStates/index-RVgPTFiH.d.cts} +16 -5
- package/dist/components/SearchResultsStates/index.cjs +18 -0
- package/dist/components/SearchResultsStates/index.js +16 -0
- package/dist/components/SearchResultsToolbar/index-CIvuccni.d.ts +49 -0
- package/dist/components/SearchResultsToolbar/index-PYr086HM.d.cts +49 -0
- package/dist/components/SearchResultsToolbar/index.cjs +68 -0
- package/dist/components/SearchResultsToolbar/index.js +65 -0
- package/dist/components/SparkleAnimation/index-BFqUibyY.d.ts +23 -0
- package/dist/components/SparkleAnimation/index-CSBR76H5.d.cts +23 -0
- package/dist/components/SparkleAnimation/index.cjs +6 -0
- package/dist/components/SparkleAnimation/index.js +5 -0
- package/dist/{Spinner/index.d.cts → components/Spinner/index-DrYhRG9D.d.cts} +2 -2
- package/dist/{Spinner/index.d.ts → components/Spinner/index-TKsPifGM.d.ts} +2 -2
- package/dist/components/Spinner/index.cjs +3 -0
- package/dist/components/Spinner/index.js +3 -0
- package/dist/{SuggestionButton/index.d.cts → components/SuggestionButton/index-BioM3QHW.d.ts} +3 -3
- package/dist/{SuggestionButton/index.d.ts → components/SuggestionButton/index-CjV6Ar4Y.d.cts} +3 -3
- package/dist/{SuggestionButton → components/SuggestionButton}/index.cjs +11 -14
- package/dist/{SuggestionButton → components/SuggestionButton}/index.js +10 -10
- package/dist/{TextInput/index.d.cts → components/TextInput/index-CRJMRe-b.d.cts} +2 -2
- package/dist/{TextInput/index.d.ts → components/TextInput/index-DAhxej1K.d.ts} +2 -2
- package/dist/components/TextInput/index.cjs +4 -0
- package/dist/components/TextInput/index.js +4 -0
- package/dist/{ToggleButton/index.d.cts → components/ToggleButton/index-eLDrp4ic.d.cts} +2 -2
- package/dist/{ToggleButton/index.d.ts → components/ToggleButton/index-pFQuGdoj.d.ts} +2 -2
- package/dist/components/ToggleButton/index.cjs +4 -0
- package/dist/components/ToggleButton/index.js +4 -0
- package/dist/components/Typography/index-DzSBreyM.d.cts +3 -0
- package/dist/components/Typography/index-ymH7f3jB.d.ts +3 -0
- package/dist/{Typography → components/Typography}/index.cjs +1 -1
- package/dist/components/Typography/index.js +3 -0
- package/dist/formatPrice-CyfkjZ3R.cjs +19 -0
- package/dist/formatPrice-DexQu2aZ.js +13 -0
- package/dist/index-BCBtAzCc.d.ts +325 -0
- package/dist/{SearchResultsFilterSidebar/index.d.ts → index-BiKhzraQ.d.cts} +9 -5
- package/dist/{index-DoTNu3mL.d.cts → index-Bw6lDfEp.d.cts} +2 -2
- package/dist/index-CzbumwVZ.d.cts +325 -0
- package/dist/{SearchResultsFilterSidebar/index.d.cts → index-DK0xpfMg.d.ts} +9 -5
- package/dist/{index-C5iOTsRG.d.ts → index-DXGw5Z56.d.ts} +2 -2
- package/dist/jsx-runtime-Dg2m6dxZ-B-pkyyHT.cjs +2586 -0
- package/dist/jsx-runtime-Dg2m6dxZ-CU_SzTu4.js +2580 -0
- package/dist/{searchFilterSidebarVariants-BQ7OC862.cjs → searchFilterSidebarVariants-CjyRGKK_.cjs} +7 -10
- package/dist/{searchFilterSidebarVariants-C_rWIcxf.js → searchFilterSidebarVariants-gkgkflXx.js} +2 -3
- package/dist/types--eyQnaEA.d.cts +4 -0
- package/dist/types-D6fl4HOx.d.ts +4 -0
- package/dist/{typographyVariantClasses-BFRoEloZ.d.cts → typographyVariantClasses-CoRhazCU.d.cts} +1 -1
- package/dist/{typographyVariantClasses-D7h3ACAj.d.ts → typographyVariantClasses-_oNpv-aN.d.ts} +1 -1
- package/dist/util/index-C2ueYGXh.d.ts +21 -0
- package/dist/util/index-DUzbpjPa.d.cts +21 -0
- package/dist/util/index.cjs +80 -0
- package/dist/util/index.js +76 -0
- package/package.json +79 -53
- package/src/atoms/search/types.ts +1 -0
- package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +1 -1
- package/src/components/ButtonBase/types.ts +1 -1
- package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +1 -1
- package/src/components/ProductCard/ProductCard.tsx +12 -12
- package/src/components/ProductCard/ProductCardSkeleton.tsx +1 -13
- package/src/components/ProductCard/index.ts +1 -0
- package/src/components/ProductCard/productCardVariants.ts +1 -1
- package/src/components/ProductCard/types.ts +49 -0
- package/src/components/ProductGrid/ProductGrid.tsx +2 -6
- package/src/components/ProductGrid/productGridVariants.ts +1 -1
- package/src/components/RadioButton/RadioButton.tsx +1 -1
- package/src/components/RadioButtonGroup/RadioButtonGroup.tsx +1 -1
- package/src/components/RecommendedProducts/RecommendedProducts.tsx +97 -0
- package/src/components/RecommendedProducts/index.ts +3 -0
- package/src/components/SearchFilter/SearchFilter.tsx +2 -1
- package/src/components/SearchFilter/SearchFilterFooter.tsx +1 -1
- package/src/components/SearchFilter/SearchFilterHeader.tsx +1 -1
- package/src/components/SearchFilter/SearchFilterItem.tsx +1 -1
- package/src/components/SearchFilter/types.ts +45 -0
- package/src/components/SearchFilter/useHasFilterStateChanged.tsx +1 -1
- package/src/components/SearchFilter/utils.ts +1 -1
- package/src/components/SearchInput/SearchInput.tsx +1 -1
- package/src/components/SearchInput/searchInputVariants.ts +2 -2
- package/src/components/SearchInputForm/SearchInputForm.tsx +10 -4
- package/src/components/SearchResultsContent/SearchResultsContent.tsx +72 -39
- package/src/components/SearchResultsFilterButton/SearchResultsFilterButton.tsx +30 -0
- package/src/components/SearchResultsFilterButton/index.ts +3 -0
- package/src/components/SearchResultsFilterModal/SearchResultsFilterModal.tsx +61 -0
- package/src/components/SearchResultsFilterModal/index.ts +3 -0
- package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +2 -1
- package/src/components/SearchResultsFilterSidebar/index.ts +1 -0
- package/src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +2 -2
- package/src/components/SearchResultsFilterSidebar/types.ts +2 -0
- package/src/components/SearchResultsStates/NoSearchResultsFound.tsx +43 -11
- package/src/components/SearchResultsStates/SearchResultsGrid.tsx +8 -7
- package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +1 -2
- package/src/components/SearchResultsToolbar/SearchResultsToolbar.tsx +111 -0
- package/src/components/SearchResultsToolbar/index.ts +3 -0
- package/src/components/SparkleAnimation/SparkleAnimation.tsx +1 -7
- package/src/components/SparkleAnimation/index.ts +1 -0
- package/src/components/SparkleAnimation/types.ts +6 -0
- package/src/components/SuggestionButton/SuggestionButton.tsx +1 -1
- package/src/config/chatElementDisplayLocation.ts +23 -0
- package/src/models/colorsConfig.ts +28 -0
- package/src/stories/AppliedFiltersScrollbar.stories.tsx +42 -0
- package/src/stories/ButtonBase.stories.tsx +54 -0
- package/src/stories/DynamicFiltersScrollbar.stories.tsx +42 -0
- package/src/stories/NoSearchResultsFound.stories.tsx +30 -0
- package/src/stories/ProductCard.stories.tsx +78 -0
- package/src/stories/ProductCardSkeleton.stories.tsx +48 -0
- package/src/stories/ProductGrid.stories.tsx +82 -0
- package/src/stories/SearchInputForm.stories.tsx +39 -0
- package/src/stories/SearchResultsFilter.stories.tsx +56 -0
- package/src/stories/SearchResultsGrid.stories.tsx +98 -0
- package/src/stories/SearchResultsLoadingGrid.stories.tsx +30 -0
- package/src/stories/SparkleAnimation.stories.tsx +47 -0
- package/src/stories/Typography.stories.tsx +140 -0
- package/src/util/camelCase.ts +87 -0
- package/src/util/camelCasedPropertiesDeep.ts +81 -0
- package/src/util/colorVar.ts +1 -1
- package/src/util/index.ts +4 -0
- package/src/util/internal.ts +97 -0
- package/src/util/primitive.ts +8 -0
- package/src/util/splitWords.ts +76 -0
- package/src/util/trim.ts +28 -0
- package/src/util/unknownArray.ts +25 -0
- package/src/util/useScrollDirection.ts +60 -0
- package/src/util/useStickyVisibility.ts +37 -0
- package/dist/Accordion/index.cjs +0 -4
- package/dist/Accordion/index.js +0 -4
- package/dist/AnimatedChevron/index.cjs +0 -3
- package/dist/AnimatedChevron/index.js +0 -3
- package/dist/ButtonBase/index.cjs +0 -6
- package/dist/ButtonBase/index.js +0 -5
- package/dist/FilterScrollbar/index.cjs +0 -5
- package/dist/FilterScrollbar/index.js +0 -4
- package/dist/ImageWithFallback/index.cjs +0 -3
- package/dist/ImageWithFallback/index.js +0 -3
- package/dist/ModalSheet/index.cjs +0 -4
- package/dist/ModalSheet/index.js +0 -4
- package/dist/ProductCard/index.d.cts +0 -82
- package/dist/ProductCard/index.d.ts +0 -82
- package/dist/ProductCard/index.js +0 -6
- package/dist/ProductGrid/index.cjs +0 -8
- package/dist/ProductGrid/index.js +0 -7
- package/dist/RadioButton/index.cjs +0 -4
- package/dist/RadioButton/index.js +0 -4
- package/dist/RadioButtonGroup/index.cjs +0 -6
- package/dist/RadioButtonGroup/index.js +0 -5
- package/dist/SearchAutocomplete/index.cjs +0 -4
- package/dist/SearchAutocomplete/index.js +0 -4
- package/dist/SearchFilter/index.cjs +0 -17
- package/dist/SearchFilter/index.d.cts +0 -54
- package/dist/SearchFilter/index.d.ts +0 -54
- package/dist/SearchFilter/index.js +0 -12
- package/dist/SearchInput/index.cjs +0 -7
- package/dist/SearchInput/index.js +0 -6
- package/dist/SearchResultsContent/index.cjs +0 -44
- package/dist/SearchResultsContent/index.js +0 -41
- package/dist/SearchResultsStates/index.cjs +0 -14
- package/dist/SearchResultsStates/index.js +0 -12
- package/dist/SearchResultsStates-C-8fh8B9.cjs +0 -132
- package/dist/SearchResultsStates-D62WbDTD.js +0 -110
- package/dist/SparkleAnimation/index.cjs +0 -3
- package/dist/SparkleAnimation/index.d.cts +0 -15
- package/dist/SparkleAnimation/index.d.ts +0 -15
- package/dist/SparkleAnimation/index.js +0 -3
- package/dist/Spinner/index.cjs +0 -3
- package/dist/Spinner/index.js +0 -3
- package/dist/TextInput/index.cjs +0 -4
- package/dist/TextInput/index.js +0 -4
- package/dist/ToggleButton/index.cjs +0 -4
- package/dist/ToggleButton/index.js +0 -4
- package/dist/Typography/index.d.cts +0 -3
- package/dist/Typography/index.d.ts +0 -3
- package/dist/Typography/index.js +0 -3
- package/dist/colorVar-B5CLhSof.cjs +0 -11
- package/dist/colorVar-BJve0Z4_.js +0 -5
- /package/dist/{ButtonBase-DbWQ25n-.cjs → ButtonBase-Cb6Iec6f.cjs} +0 -0
- /package/dist/{ButtonBase-C_uKnl48.js → ButtonBase-D2eXuapk.js} +0 -0
|
@@ -1,29 +1,55 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import Sparkles from '@envive-ai/react-icons/Sparkles';
|
|
3
3
|
import { Typography } from 'src/components/Typography';
|
|
4
|
+
import { SearchResponseProductAttributes } from '@envive-ai/react-hooks/application/models';
|
|
5
|
+
import { RecommendedProducts } from '../RecommendedProducts';
|
|
6
|
+
import { ProductGridVariant } from '../ProductCard';
|
|
4
7
|
|
|
5
8
|
interface NoSearchResultsFoundProps {
|
|
6
9
|
containerPaddingClasses: string;
|
|
7
|
-
includeBottomMargin?: boolean; // manually add about a page of bottom margin to push unsupressed content down
|
|
10
|
+
// includeBottomMargin?: boolean; // manually add about a page of bottom margin to push unsupressed content down
|
|
8
11
|
noResultsFoundText?: string;
|
|
9
12
|
sparkleIconColor?: string; // example format: var(--spiffy-colors-accent-primary)
|
|
13
|
+
recommendedProducts: SearchResponseProductAttributes['attributes'][];
|
|
14
|
+
searchText: string;
|
|
15
|
+
merchantShortName: string;
|
|
16
|
+
productGridVariant: ProductGridVariant;
|
|
10
17
|
}
|
|
11
18
|
|
|
12
19
|
export const NoSearchResultsFound = ({
|
|
13
20
|
containerPaddingClasses,
|
|
14
|
-
includeBottomMargin = false,
|
|
15
21
|
noResultsFoundText,
|
|
16
22
|
sparkleIconColor = 'var(--spiffy-colors-accent-primary)',
|
|
23
|
+
recommendedProducts,
|
|
24
|
+
searchText,
|
|
25
|
+
merchantShortName,
|
|
26
|
+
productGridVariant,
|
|
17
27
|
}: NoSearchResultsFoundProps) => {
|
|
18
|
-
const containerClasses = classNames(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'spiffy-tw-mt-6',
|
|
22
|
-
);
|
|
28
|
+
const containerClasses = classNames(containerPaddingClasses, 'spiffy-tw-mt-6', {
|
|
29
|
+
'spiffy-tw-mb-[100vh]': recommendedProducts.length === 0,
|
|
30
|
+
});
|
|
23
31
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
let textPrompt: React.ReactNode;
|
|
33
|
+
if (recommendedProducts.length > 0) {
|
|
34
|
+
textPrompt = noResultsFoundText ? (
|
|
35
|
+
<span>{noResultsFoundText}</span>
|
|
36
|
+
) : (
|
|
37
|
+
<span>
|
|
38
|
+
I’m sorry, I wasn’t able to find an exact match for
|
|
39
|
+
<strong className="spiffy-tw-font-semibold"> {`"${searchText}".`}</strong> Try changing your
|
|
40
|
+
filters or adjusting your search query. In the meantime, explore some of our top-selling
|
|
41
|
+
products below.
|
|
42
|
+
</span>
|
|
43
|
+
);
|
|
44
|
+
} else {
|
|
45
|
+
textPrompt = (
|
|
46
|
+
<span>
|
|
47
|
+
I’m sorry, I wasn’t able to find an exact match for
|
|
48
|
+
<strong className="spiffy-tw-font-semibold"> {`"${searchText}."`}</strong> Try changing your
|
|
49
|
+
filters or adjusting your search query.
|
|
50
|
+
</span>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
27
53
|
|
|
28
54
|
return (
|
|
29
55
|
<div className={containerClasses}>
|
|
@@ -36,6 +62,12 @@ export const NoSearchResultsFound = ({
|
|
|
36
62
|
</div>
|
|
37
63
|
<Typography variant="body2">{textPrompt}</Typography>
|
|
38
64
|
</div>
|
|
65
|
+
<RecommendedProducts
|
|
66
|
+
retrievedProducts={recommendedProducts}
|
|
67
|
+
merchantShortName={merchantShortName}
|
|
68
|
+
productCardConfig={{ variant: 'minimal', hoverVariant: 'none', layoutVariant: 'square' }}
|
|
69
|
+
productGridVariant={productGridVariant}
|
|
70
|
+
/>
|
|
39
71
|
</div>
|
|
40
72
|
);
|
|
41
|
-
};
|
|
73
|
+
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { motion } from 'framer-motion';
|
|
2
|
+
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import { SearchResponseProduct } from '@spiffy-ai/commerce-api-client';
|
|
4
|
-
import {
|
|
5
|
-
ProductCardConfig,
|
|
6
|
-
ProductGridVariant,
|
|
7
|
-
SearchFilterSidebarVariant,
|
|
8
|
-
SelectedFilterOption,
|
|
9
|
-
} from '@envive-ai/types';
|
|
5
|
+
import { SelectedFilterOption } from '@envive-ai/react-hooks/atoms/search';
|
|
10
6
|
import { AppliedFiltersScrollbar } from '../FilterScrollbar/AppliedFiltersScrollbar';
|
|
11
7
|
import { DynamicFiltersScrollbar } from '../FilterScrollbar/DynamicFiltersScrollbar';
|
|
12
8
|
|
|
13
9
|
import { searchFilterSidebarVariantClasses } from '../SearchResultsFilterSidebar/searchFilterSidebarVariants';
|
|
10
|
+
import { ProductCardConfig, ProductGridVariant } from '../ProductCard';
|
|
14
11
|
import { ProductGrid } from '../ProductGrid';
|
|
12
|
+
import { SearchFilterSidebarVariant } from '../SearchResultsFilterSidebar';
|
|
15
13
|
|
|
16
14
|
interface SearchResultsGridProps {
|
|
17
15
|
productList: SearchResponseProduct[];
|
|
@@ -23,6 +21,7 @@ interface SearchResultsGridProps {
|
|
|
23
21
|
selectedFilterOptions: SelectedFilterOption[];
|
|
24
22
|
containerXPaddingClasses: string;
|
|
25
23
|
productGridClasses: string;
|
|
24
|
+
onProductClick?: () => void;
|
|
26
25
|
onRemoveFilter: (filter: SelectedFilterOption) => void;
|
|
27
26
|
onToggleDynamicFilter: ({
|
|
28
27
|
filter,
|
|
@@ -45,6 +44,7 @@ export const SearchResultsGrid = ({
|
|
|
45
44
|
productGridClasses,
|
|
46
45
|
onRemoveFilter,
|
|
47
46
|
onToggleDynamicFilter,
|
|
47
|
+
onProductClick,
|
|
48
48
|
}: SearchResultsGridProps) => {
|
|
49
49
|
const sharedFilterBarClasses = classNames(
|
|
50
50
|
'spiffy-suggestion-bar',
|
|
@@ -101,7 +101,8 @@ export const SearchResultsGrid = ({
|
|
|
101
101
|
productGridClasses={productGridClasses}
|
|
102
102
|
productCardConfig={productCardConfig}
|
|
103
103
|
merchantShortName={merchantShortName}
|
|
104
|
+
onProductClick={onProductClick}
|
|
104
105
|
/>
|
|
105
106
|
</motion.div>
|
|
106
107
|
);
|
|
107
|
-
};
|
|
108
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { motion } from 'framer-motion';
|
|
2
2
|
import { Typography } from 'src/components/Typography';
|
|
3
|
-
import { ProductGridVariant } from '
|
|
4
|
-
import { ProductCardSkeleton } from '../ProductCard';
|
|
3
|
+
import { ProductGridVariant, ProductCardSkeleton } from '../ProductCard';
|
|
5
4
|
import { productGridVariantClasses } from '../ProductGrid';
|
|
6
5
|
import { SparkleAnimation } from '../SparkleAnimation';
|
|
7
6
|
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { SearchInputVariant } from '@envive-ai/react-hooks/contexts/types';
|
|
4
|
+
import { SearchResultsFilterButton } from '../SearchResultsFilterButton';
|
|
5
|
+
import { SearchInputForm } from '../SearchInputForm';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
interface SearchResultsToolbarProps {
|
|
9
|
+
// From widgetConfig
|
|
10
|
+
searchInputVariant: SearchInputVariant;
|
|
11
|
+
searchBoxPlaceholder: string;
|
|
12
|
+
// From search hook
|
|
13
|
+
searchText: string;
|
|
14
|
+
focusedIndex: number;
|
|
15
|
+
focusedOptionId: string | undefined;
|
|
16
|
+
autocompleteResults: string[];
|
|
17
|
+
filterButtonText: string;
|
|
18
|
+
|
|
19
|
+
// From search input hook
|
|
20
|
+
shouldShowAutocomplete: boolean;
|
|
21
|
+
|
|
22
|
+
// Event handlers
|
|
23
|
+
onKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
24
|
+
onSearchInputChange: (value: string) => void;
|
|
25
|
+
onSubmitSearch: () => void;
|
|
26
|
+
onAutocompleteSelect: (suggestion: string, rankPosition?: number) => void;
|
|
27
|
+
onSearchInputFocus: () => void;
|
|
28
|
+
onSearchInputBlur: () => void;
|
|
29
|
+
setIsFilterOpen: (isOpen: boolean) => void;
|
|
30
|
+
|
|
31
|
+
// Styling
|
|
32
|
+
containerXPaddingClasses: string;
|
|
33
|
+
|
|
34
|
+
// Ref for sticky logic
|
|
35
|
+
toolbarRef: React.RefObject<HTMLDivElement> | null;
|
|
36
|
+
isVisible: boolean;
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const SearchResultsToolbar = ({
|
|
41
|
+
searchInputVariant,
|
|
42
|
+
searchBoxPlaceholder,
|
|
43
|
+
searchText,
|
|
44
|
+
focusedIndex,
|
|
45
|
+
focusedOptionId,
|
|
46
|
+
autocompleteResults,
|
|
47
|
+
filterButtonText,
|
|
48
|
+
onKeyDown,
|
|
49
|
+
onSearchInputChange,
|
|
50
|
+
onSubmitSearch,
|
|
51
|
+
onAutocompleteSelect,
|
|
52
|
+
onSearchInputFocus,
|
|
53
|
+
onSearchInputBlur,
|
|
54
|
+
shouldShowAutocomplete,
|
|
55
|
+
setIsFilterOpen,
|
|
56
|
+
containerXPaddingClasses,
|
|
57
|
+
toolbarRef,
|
|
58
|
+
isVisible,
|
|
59
|
+
className,
|
|
60
|
+
}: SearchResultsToolbarProps) => {
|
|
61
|
+
const [hasZIndex, setHasZIndex] = React.useState(false);
|
|
62
|
+
|
|
63
|
+
// The following is to ensure the z-index is applied after the animation is complete
|
|
64
|
+
// because otherwise the z-index would be applied instantly when the component is mounted
|
|
65
|
+
// which would cause the search toolbar to appear over the top of the merchant header
|
|
66
|
+
// in some cases
|
|
67
|
+
React.useEffect(() => {
|
|
68
|
+
let timer;
|
|
69
|
+
if (isVisible) {
|
|
70
|
+
timer = setTimeout(() => {
|
|
71
|
+
setHasZIndex(true);
|
|
72
|
+
}, 300); // Match the animation duration from parent
|
|
73
|
+
return () => clearTimeout(timer);
|
|
74
|
+
}
|
|
75
|
+
setHasZIndex(false);
|
|
76
|
+
return () => clearTimeout(timer);
|
|
77
|
+
}, [isVisible]);
|
|
78
|
+
const toolbarClasses = classNames('spiffy-tw-bg-white', 'spiffy-tw-w-full', className, {
|
|
79
|
+
'spiffy-tw-z-10': hasZIndex,
|
|
80
|
+
'spiffy-tw-translate-y-0': isVisible,
|
|
81
|
+
'-spiffy-tw-translate-y-full': !isVisible,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
const contentWrapperClasses = classNames('spiffy-tw-flex', containerXPaddingClasses);
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<div className={toolbarClasses} ref={toolbarRef}>
|
|
88
|
+
<div className={contentWrapperClasses}>
|
|
89
|
+
<SearchInputForm
|
|
90
|
+
searchInputVariant={searchInputVariant}
|
|
91
|
+
searchText={searchText}
|
|
92
|
+
focusedIndex={focusedIndex}
|
|
93
|
+
autocompleteResults={autocompleteResults}
|
|
94
|
+
searchBoxPlaceholder={searchBoxPlaceholder}
|
|
95
|
+
focusedOptionId={focusedOptionId}
|
|
96
|
+
onKeyDown={onKeyDown}
|
|
97
|
+
onSearchInputChange={onSearchInputChange}
|
|
98
|
+
onSearchInputFocus={onSearchInputFocus}
|
|
99
|
+
onSearchInputBlur={onSearchInputBlur}
|
|
100
|
+
shouldShowAutocomplete={shouldShowAutocomplete}
|
|
101
|
+
onSearchSubmit={onSubmitSearch}
|
|
102
|
+
onAutocompleteSelect={onAutocompleteSelect}
|
|
103
|
+
/>
|
|
104
|
+
<SearchResultsFilterButton
|
|
105
|
+
setIsOpen={setIsFilterOpen}
|
|
106
|
+
filterButtonText={filterButtonText}
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
);
|
|
111
|
+
};
|
|
@@ -3,18 +3,12 @@ import { type Transition, motion } from 'framer-motion';
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
|
|
5
5
|
import FourPointStar from '@envive-ai/react-icons/FourPointStar';
|
|
6
|
+
import { SparkleAnimationOverride } from './types';
|
|
6
7
|
|
|
7
8
|
// Animation timing constants
|
|
8
9
|
const ANIMATION_CYCLE_TIME = 1000; // 1 second between cycles
|
|
9
10
|
const STAR_DELAY_OFFSET = 250; // 250ms delay between each star
|
|
10
11
|
|
|
11
|
-
enum SparkleAnimationOverride {
|
|
12
|
-
CONTAINER = 'spiffy-sparkle-animation-container',
|
|
13
|
-
STAR_ONE_CONTAINER = 'spiffy-sparkle-animation-star-one-container',
|
|
14
|
-
STAR_TWO_CONTAINER = 'spiffy-sparkle-animation-star-two-container',
|
|
15
|
-
STAR_THREE_CONTAINER = 'spiffy-sparkle-animation-star-three-container',
|
|
16
|
-
}
|
|
17
|
-
|
|
18
12
|
interface SparkleAnimationProps {
|
|
19
13
|
color: string;
|
|
20
14
|
className?: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export enum SparkleAnimationOverride {
|
|
2
|
+
CONTAINER = 'spiffy-sparkle-animation-container',
|
|
3
|
+
STAR_ONE_CONTAINER = 'spiffy-sparkle-animation-star-one-container',
|
|
4
|
+
STAR_TWO_CONTAINER = 'spiffy-sparkle-animation-star-two-container',
|
|
5
|
+
STAR_THREE_CONTAINER = 'spiffy-sparkle-animation-star-three-container',
|
|
6
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
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/types';
|
|
4
|
+
import { TestProps } from '@envive-ai/react-hooks/types';
|
|
5
5
|
import type { SuggestionButtonVariant } from './types';
|
|
6
6
|
import { ButtonBase } from '../ButtonBase/ButtonBase';
|
|
7
7
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Chat element display location enum
|
|
2
|
+
export enum ChatElementDisplayLocation {
|
|
3
|
+
IN_CHAT = 'in_chat',
|
|
4
|
+
CHAT_PREVIEW = 'chat_preview',
|
|
5
|
+
FLOATING_BUTTON = 'floating_button',
|
|
6
|
+
HELP_ME_CHOOSE = 'help_me_choose',
|
|
7
|
+
PLP_IMAGE_BANNER = 'plp_image_banner',
|
|
8
|
+
TOP_REVIEWS_SNIPPET = 'top_reviews_snippet',
|
|
9
|
+
BOTTOM_REVIEWS_SNIPPET = 'bottom_reviews_snippet',
|
|
10
|
+
BLOCK_BACK_BUTTON = 'block_back_button',
|
|
11
|
+
SWITCH_TO_AGENT = 'switch_to_agent',
|
|
12
|
+
CONVERSATIONAL_SEARCH = 'conversational_search',
|
|
13
|
+
GLOBAL_SEARCH_ENTRYPOINT = 'global_search_entrypoint',
|
|
14
|
+
SEARCH_NAV_ENTRYPOINT = 'search_nav_entrypoint',
|
|
15
|
+
SEARCH_PROMPT = 'search_prompt',
|
|
16
|
+
SEARCH_PROMPT_BUTTON = 'search_prompt_button',
|
|
17
|
+
SEARCH_ZERO_STATE_SUGGESTED_PRODUCTS = 'search_zero_state_suggested_products',
|
|
18
|
+
PRODUCT_GRID = 'product_grid',
|
|
19
|
+
UNSPECIFIED = 'unspecified',
|
|
20
|
+
FILTER_MODAL = 'filter_modal',
|
|
21
|
+
PROMPT_CARD = 'prompt_card',
|
|
22
|
+
WINDOW_API_CALL = 'window_api_call',
|
|
23
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
enum ColorNames {
|
|
2
|
+
TextPrimary = 'text-primary',
|
|
3
|
+
TextSecondary = 'text-secondary',
|
|
4
|
+
TextAccent = 'text-accent',
|
|
5
|
+
TextLink = 'text-link',
|
|
6
|
+
TextLight = 'text-light',
|
|
7
|
+
BackgroundPrimary = 'background-primary',
|
|
8
|
+
BackgroundSecondary = 'background-secondary',
|
|
9
|
+
BackgroundSecondaryDark = 'background-secondary-dark',
|
|
10
|
+
BackgroundTertiary = 'background-tertiary',
|
|
11
|
+
BackgroundDark = 'background-dark',
|
|
12
|
+
BackgroundLight = 'background-light',
|
|
13
|
+
BackgroundSaturated = 'background-saturated',
|
|
14
|
+
BorderLight = 'border-light',
|
|
15
|
+
BorderMedium = 'border-medium',
|
|
16
|
+
BorderDark = 'border-dark',
|
|
17
|
+
BorderOutline = 'border-outline',
|
|
18
|
+
AccentPrimary = 'accent-primary',
|
|
19
|
+
AccentSecondary = 'accent-secondary',
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
type ColorMapping = {
|
|
23
|
+
[key in ColorNames]: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const colorVar = (color: ColorNames): string => `var(--spiffy-colors-${color})`;
|
|
27
|
+
export { ColorNames, colorVar };
|
|
28
|
+
export type { ColorMapping };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { SelectedFilterOption } from '@envive-ai/react-hooks/atoms/search';
|
|
3
|
+
import { AppliedFiltersScrollbar } from '@envive-ai/react-toolkit/AppliedFiltersScrollbar';
|
|
4
|
+
|
|
5
|
+
const mockSelectedFilterOptions: SelectedFilterOption[] = [
|
|
6
|
+
{ id: 'cat2', displayName: 'Category 2', filterId: 'category', filterItemId: 'cat2' },
|
|
7
|
+
{ id: 'brandA', displayName: 'Brand A', filterId: 'brand', filterItemId: 'brandA' },
|
|
8
|
+
{ id: 'colorRed', displayName: 'Color: Red', filterId: 'color', filterItemId: 'red' },
|
|
9
|
+
{ id: 'sizeM', displayName: 'Size: M', filterId: 'size', filterItemId: 'M' },
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
const meta: Meta<typeof AppliedFiltersScrollbar> = {
|
|
13
|
+
title: 'Search/AppliedFiltersScrollbar',
|
|
14
|
+
component: AppliedFiltersScrollbar,
|
|
15
|
+
parameters: {
|
|
16
|
+
layout: 'centered',
|
|
17
|
+
},
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof AppliedFiltersScrollbar>;
|
|
23
|
+
|
|
24
|
+
export const Default: Story = {
|
|
25
|
+
args: {
|
|
26
|
+
selectedFilterOptions: mockSelectedFilterOptions,
|
|
27
|
+
filterBarClassNames:
|
|
28
|
+
'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 spiffy-tw-px-[16px] sm:spiffy-tw-px-[46px]',
|
|
29
|
+
filterDefaultClasses:
|
|
30
|
+
'spiffy-tw-bg-[--spiffy-colors-background-light] spiffy-tw-border-[--spiffy-colors-border-light] spiffy-tw-text-[--spiffy-colors-text-primary]',
|
|
31
|
+
filterHoverClasses: 'hover:spiffy-tw-border-[--spiffy-colors-accent-primary]',
|
|
32
|
+
appliedFilterBackgroundClasses: 'spiffy-tw-bg-[--spiffy-colors-accent-primary]',
|
|
33
|
+
onRemoveFilter: () => {},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const NoFilters: Story = {
|
|
38
|
+
args: {
|
|
39
|
+
...Default.args,
|
|
40
|
+
selectedFilterOptions: [],
|
|
41
|
+
},
|
|
42
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ButtonBase } from '@envive-ai/react-toolkit/ButtonBase';
|
|
3
|
+
import SettingsVariant from '@envive-ai/react-icons/SettingsVariant';
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Common/ButtonBase',
|
|
7
|
+
component: ButtonBase,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
args: {
|
|
13
|
+
dataAttributes: undefined,
|
|
14
|
+
buttonClass: undefined,
|
|
15
|
+
textClass: undefined,
|
|
16
|
+
icon: undefined,
|
|
17
|
+
dataTestId: undefined,
|
|
18
|
+
onClick: undefined,
|
|
19
|
+
},
|
|
20
|
+
argTypes: {
|
|
21
|
+
onClick: { action: 'clicked' },
|
|
22
|
+
dataAttributes: { control: 'object' },
|
|
23
|
+
buttonClass: { control: 'text' },
|
|
24
|
+
textClass: { control: 'text' },
|
|
25
|
+
dataTestId: { control: 'text' },
|
|
26
|
+
type: { control: 'select', options: ['button', 'submit', 'reset'] },
|
|
27
|
+
isDisabled: { control: 'boolean' },
|
|
28
|
+
iconClass: { control: 'text' },
|
|
29
|
+
disablePadding: { control: 'boolean' },
|
|
30
|
+
},
|
|
31
|
+
} satisfies Meta<typeof ButtonBase>;
|
|
32
|
+
|
|
33
|
+
export default meta;
|
|
34
|
+
type Story = StoryObj<typeof meta>;
|
|
35
|
+
|
|
36
|
+
export const Primary: Story = {
|
|
37
|
+
args: {
|
|
38
|
+
text: 'Button',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const WithIcon: Story = {
|
|
43
|
+
args: {
|
|
44
|
+
text: 'Settings',
|
|
45
|
+
icon: SettingsVariant,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const Disabled: Story = {
|
|
50
|
+
args: {
|
|
51
|
+
text: 'Disabled Button',
|
|
52
|
+
isDisabled: true,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { DynamicFiltersScrollbar } from '@envive-ai/react-toolkit/DynamicFiltersScrollbar';
|
|
3
|
+
|
|
4
|
+
const mockAvailableDynamicFilters = [
|
|
5
|
+
{ name: 'color', displayName: 'Color' },
|
|
6
|
+
{ name: 'size', displayName: 'Size' },
|
|
7
|
+
{ name: 'material', displayName: 'Material' },
|
|
8
|
+
{ name: 'brand', displayName: 'Brand' },
|
|
9
|
+
{ name: 'price', displayName: 'Price Range' },
|
|
10
|
+
{ name: 'rating', displayName: 'Customer Rating' },
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
const meta: Meta<typeof DynamicFiltersScrollbar> = {
|
|
14
|
+
title: 'Search/DynamicFiltersScrollbar',
|
|
15
|
+
component: DynamicFiltersScrollbar,
|
|
16
|
+
parameters: {
|
|
17
|
+
layout: 'centered',
|
|
18
|
+
},
|
|
19
|
+
tags: ['autodocs'],
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof DynamicFiltersScrollbar>;
|
|
24
|
+
|
|
25
|
+
export const Default: Story = {
|
|
26
|
+
args: {
|
|
27
|
+
availableDynamicFilters: mockAvailableDynamicFilters,
|
|
28
|
+
filterBarClassNames:
|
|
29
|
+
'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 spiffy-tw-px-[16px] sm:spiffy-tw-px-[46px]',
|
|
30
|
+
filterDefaultClasses:
|
|
31
|
+
'spiffy-tw-bg-[--spiffy-colors-background-light] spiffy-tw-border-[--spiffy-colors-border-light] spiffy-tw-text-[--spiffy-colors-text-primary]',
|
|
32
|
+
filterHoverClasses: 'hover:spiffy-tw-border-[--spiffy-colors-accent-primary]',
|
|
33
|
+
onToggleDynamicFilter: () => {},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const NoFilters: Story = {
|
|
38
|
+
args: {
|
|
39
|
+
...Default.args,
|
|
40
|
+
availableDynamicFilters: [],
|
|
41
|
+
},
|
|
42
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { NoSearchResultsFound } from '@envive-ai/react-toolkit/SearchResultsStates';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof NoSearchResultsFound> = {
|
|
5
|
+
title: 'Search/NoSearchResultsFound',
|
|
6
|
+
component: NoSearchResultsFound,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
},
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof NoSearchResultsFound>;
|
|
15
|
+
|
|
16
|
+
export const Default: Story = {
|
|
17
|
+
args: {
|
|
18
|
+
containerPaddingClasses: 'spiffy-tw-px-[16px]',
|
|
19
|
+
noResultsFoundText:
|
|
20
|
+
'I’m sorry, I wasn’t able to find an exact match. Try changing your filters or adjusting your search query.',
|
|
21
|
+
sparkleIconColor: 'var(--spiffy-colors-accent-primary)',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const CustomText: Story = {
|
|
26
|
+
args: {
|
|
27
|
+
...Default.args,
|
|
28
|
+
noResultsFoundText: 'No items found matching your criteria. Please try again.',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ProductCard } from '@envive-ai/react-toolkit/ProductCard';
|
|
3
|
+
import { productGridVariantClasses } from '@envive-ai/react-toolkit/ProductGrid';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof ProductCard> = {
|
|
6
|
+
title: 'Common/ProductCard',
|
|
7
|
+
component: ProductCard,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
argTypes: {
|
|
13
|
+
layoutVariant: {
|
|
14
|
+
control: 'select',
|
|
15
|
+
options: Object.values(productGridVariantClasses),
|
|
16
|
+
},
|
|
17
|
+
variant: {
|
|
18
|
+
control: 'select',
|
|
19
|
+
options: Object.values(productGridVariantClasses),
|
|
20
|
+
},
|
|
21
|
+
hoverVariant: {
|
|
22
|
+
control: 'select',
|
|
23
|
+
options: Object.values(productGridVariantClasses),
|
|
24
|
+
},
|
|
25
|
+
aspectRatio: {
|
|
26
|
+
control: 'select',
|
|
27
|
+
options: Object.values(productGridVariantClasses),
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default meta;
|
|
33
|
+
type Story = StoryObj<typeof ProductCard>;
|
|
34
|
+
|
|
35
|
+
export const Default: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
productCardConfig: {
|
|
38
|
+
variant: 'minimal',
|
|
39
|
+
hoverVariant: 'backgroundDark',
|
|
40
|
+
layoutVariant: 'tall',
|
|
41
|
+
},
|
|
42
|
+
imageUrl: 'https://dummyimage.com/250x250/cccccc/aeaeae.jpg',
|
|
43
|
+
title: 'Example Product Title',
|
|
44
|
+
url: '#',
|
|
45
|
+
originalPrice: 25.0,
|
|
46
|
+
salePrice: 20.0,
|
|
47
|
+
averageRating: 4.5,
|
|
48
|
+
numberReviews: 120,
|
|
49
|
+
layoutVariant: 'tall',
|
|
50
|
+
variant: 'minimal',
|
|
51
|
+
hoverVariant: 'backgroundDark',
|
|
52
|
+
zoomOnHover: true,
|
|
53
|
+
aspectRatio: 'none',
|
|
54
|
+
growWithContainer: true,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const TallLayout: Story = {
|
|
59
|
+
args: {
|
|
60
|
+
...Default.args,
|
|
61
|
+
layoutVariant: 'tall',
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const NoSalePrice: Story = {
|
|
66
|
+
args: {
|
|
67
|
+
...Default.args,
|
|
68
|
+
salePrice: undefined,
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const NoRating: Story = {
|
|
73
|
+
args: {
|
|
74
|
+
...Default.args,
|
|
75
|
+
averageRating: undefined,
|
|
76
|
+
numberReviews: undefined,
|
|
77
|
+
},
|
|
78
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ProductCardSkeleton } from '@envive-ai/react-toolkit/ProductCard';
|
|
2
|
+
import { productGridVariantClasses } from '@envive-ai/react-toolkit/ProductGrid';
|
|
3
|
+
|
|
4
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof ProductCardSkeleton> = {
|
|
7
|
+
title: 'Common/ProductCardSkeleton',
|
|
8
|
+
component: ProductCardSkeleton,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'centered',
|
|
11
|
+
},
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
argTypes: {
|
|
14
|
+
layoutVariant: {
|
|
15
|
+
control: 'select',
|
|
16
|
+
options: Object.values(productGridVariantClasses),
|
|
17
|
+
},
|
|
18
|
+
aspectRatio: {
|
|
19
|
+
control: 'select',
|
|
20
|
+
options: Object.values(productGridVariantClasses),
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof ProductCardSkeleton>;
|
|
27
|
+
|
|
28
|
+
export const Default: Story = {
|
|
29
|
+
args: {
|
|
30
|
+
layoutVariant: 'normal',
|
|
31
|
+
aspectRatio: 'none',
|
|
32
|
+
growWithContainer: true,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const MinimalLayout: Story = {
|
|
37
|
+
args: {
|
|
38
|
+
...Default.args,
|
|
39
|
+
layoutVariant: 'normal',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const AspectRatio3x4: Story = {
|
|
44
|
+
args: {
|
|
45
|
+
...Default.args,
|
|
46
|
+
aspectRatio: '3:4',
|
|
47
|
+
},
|
|
48
|
+
};
|