@envive-ai/react-toolkit 0.2.10 → 0.2.12
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-RpyCFs2a.cjs → Accordion-B0TzPN3m.cjs} +2 -5
- package/dist/{Accordion-DxtXK__u.js → Accordion-D8Vm8J1y.js} +3 -3
- package/dist/{AnimatedChevron-Q96FneFy.cjs → AnimatedChevron-9xf90bpP.cjs} +0 -2
- package/dist/{AnimatedChevron-Bik7GMSe.js → AnimatedChevron-DghLnmlM.js} +1 -1
- package/dist/{ButtonBase-AU23oGQr.cjs → ButtonBase-BMEAmPnS.cjs} +1 -3
- package/dist/{ButtonBase-6wjsZ1tU.js → ButtonBase-CT397aT3.js} +2 -2
- package/dist/{DynamicFiltersScrollbar-CJG4K0PH.js → DynamicFiltersScrollbar-CibstqNd.js} +4 -6
- package/dist/{DynamicFiltersScrollbar-DgS9gpdg.cjs → DynamicFiltersScrollbar-DqIydLJu.cjs} +3 -6
- package/dist/{ImageWithFallback-Bx17VPmQ.cjs → ImageWithFallback-CuPe6XF6.cjs} +0 -1
- package/dist/{ImageWithFallback-c-DTsBH-.js → ImageWithFallback-_QZT0EKI.js} +1 -1
- package/dist/{ModalSheet-CcthFeMD.cjs → ModalSheet-Be7-bkXK.cjs} +10 -15
- package/dist/{ModalSheet-BSj_g9JF.js → ModalSheet-DVrY7Mw0.js} +11 -12
- package/dist/{ProductCard-C-8ie9Lf.cjs → ProductCard-BeY85PBf.cjs} +8 -25
- package/dist/{ProductCard-n-PAth5m.js → ProductCard-BoyYu6mI.js} +7 -20
- package/dist/{ProductGrid-Ba2tUgmC.cjs → ProductGrid-CxKK7w_X.cjs} +1 -2
- package/dist/{ProductGrid-xXkWzvR2.js → ProductGrid-DmtSXfyE.js} +2 -2
- package/dist/{RadioButton-gnFz0TWN.js → RadioButton-Bm0qK3bX.js} +2 -2
- package/dist/{RadioButton-BBc1b5vX.cjs → RadioButton-Dcdj8pNp.cjs} +1 -3
- package/dist/{RadioButtonGroup-DxOtcIdO.cjs → RadioButtonGroup-BnnMx8sE.cjs} +1 -2
- package/dist/{RadioButtonGroup-DLLleeDX.js → RadioButtonGroup-hme7gSiQ.js} +2 -2
- package/dist/RecommendedProducts-C2eNVrLo.cjs +56 -0
- package/dist/RecommendedProducts-LalI8aVC.js +49 -0
- package/dist/{SearchAutocomplete-DAEDHeqr.cjs → SearchAutocomplete-A3HXkHwK.cjs} +3 -6
- package/dist/{SearchAutocomplete-B690CIZB.js → SearchAutocomplete-Rza3A-gs.js} +4 -5
- package/dist/{SearchFilter-Bi0zqO3-.js → SearchFilter-CYY5sNXV.js} +39 -43
- package/dist/{SearchFilter-ylBowO7T.cjs → SearchFilter-DxrQOLx0.cjs} +38 -44
- package/dist/{SearchInput-Yy6NIiSk.cjs → SearchInput-3ppsm2Ke.cjs} +2 -3
- package/dist/{SearchInput-Q3knp7tj.js → SearchInput-DE9Iz7A8.js} +3 -3
- package/dist/{SearchInputForm/index.cjs → SearchInputForm-CZz62rOX.cjs} +9 -9
- package/dist/{SearchInputForm/index.js → SearchInputForm-DrI4WHDt.js} +3 -6
- package/dist/SearchResultsFilterButton-BedTofz5.cjs +29 -0
- package/dist/SearchResultsFilterButton-CV11UTGi.js +22 -0
- package/dist/{SearchResultsFilterSidebar/index.js → SearchResultsFilterSidebar-Bvpk7Uoo.js} +4 -13
- package/dist/{SearchResultsFilterSidebar/index.cjs → SearchResultsFilterSidebar-Dgz98oyD.cjs} +10 -17
- package/dist/{SearchResultsStates-BjFB9Qo9.cjs → SearchResultsStates-D37wFr9h.cjs} +42 -16
- package/dist/{SearchResultsStates-D8Uz39yp.js → SearchResultsStates-DrGtw0pM.js} +43 -15
- package/dist/{SparkleAnimation-CvGlWUqv.cjs → SparkleAnimation-B5A_NCuy.cjs} +1 -4
- package/dist/{SparkleAnimation-paLhSu5E.js → SparkleAnimation-BSI_34HX.js} +2 -2
- package/dist/{Spinner-BqTt55uu.js → Spinner-CDDFWySo.js} +1 -1
- package/dist/{Spinner-DjK8ts9E.cjs → Spinner-FQpy5bGu.cjs} +0 -1
- package/dist/{TextInput-B70n36-J.cjs → TextInput-Do5-j1V_.cjs} +3 -5
- package/dist/{TextInput-y6nNxaTI.js → TextInput-PtrUXoZo.js} +4 -5
- package/dist/{ToggleButton-Br6MgjiG.js → ToggleButton-BTz_zIdc.js} +2 -2
- package/dist/{ToggleButton-CJ74eu-N.cjs → ToggleButton-CmxTz-ou.cjs} +1 -2
- package/dist/{Typography-D3vDkBMS.js → Typography-xehJH05l.js} +1 -1
- package/dist/{colorsConfig-DZ-GSPWy.js → colorsConfig-BjdoRtRK.js} +1 -1
- package/dist/{Accordion/index.d.ts → components/Accordion/index-BPofgdcd.d.cts} +2 -2
- package/dist/{Accordion/index.d.cts → components/Accordion/index-DBEaF9x5.d.ts} +2 -2
- package/dist/components/Accordion/index.cjs +4 -0
- package/dist/components/Accordion/index.js +4 -0
- package/dist/{AnimatedChevron/index.d.cts → components/AnimatedChevron/index-Bvff3AGS.d.ts} +2 -2
- package/dist/{AnimatedChevron/index.d.ts → components/AnimatedChevron/index-BwQ6tJL8.d.cts} +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-BKNoroAl.d.ts} +2 -2
- package/dist/{AppliedFiltersScrollbar/index.d.cts → components/AppliedFiltersScrollbar/index-DADY550R.d.cts} +2 -2
- package/dist/{AppliedFiltersScrollbar → components/AppliedFiltersScrollbar}/index.cjs +3 -5
- package/dist/{AppliedFiltersScrollbar → components/AppliedFiltersScrollbar}/index.js +2 -3
- package/dist/{ButtonBase/index.d.ts → components/ButtonBase/index-BCw2WQ-2.d.ts} +2 -2
- package/dist/{ButtonBase/index.d.cts → components/ButtonBase/index-pBSmWoqg.d.cts} +2 -2
- package/dist/components/ButtonBase/index.cjs +6 -0
- package/dist/components/ButtonBase/index.js +5 -0
- package/dist/{DynamicFiltersScrollbar/index.d.ts → components/DynamicFiltersScrollbar/index-BvAT64cX.d.ts} +2 -2
- package/dist/{DynamicFiltersScrollbar/index.d.cts → components/DynamicFiltersScrollbar/index-X--ALCSa.d.cts} +2 -2
- package/dist/{DynamicFiltersScrollbar → components/DynamicFiltersScrollbar}/index.cjs +3 -5
- package/dist/{DynamicFiltersScrollbar → components/DynamicFiltersScrollbar}/index.js +2 -3
- package/dist/{FilterScrollbar/index.d.ts → components/FilterScrollbar/index-DgxXE1ff.d.cts} +3 -3
- package/dist/{FilterScrollbar/index.d.cts → components/FilterScrollbar/index-xlg1Q06Q.d.ts} +3 -3
- 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-C8Fqb7AQ.d.cts} +2 -2
- package/dist/{ImageWithFallback/index.d.ts → components/ImageWithFallback/index-yxDWrUCQ.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-Cp_h5dbe.d.ts} +2 -2
- package/dist/{ModalSheet/index.d.ts → components/ModalSheet/index-Dnt-aUte.d.cts} +2 -2
- package/dist/components/ModalSheet/index.cjs +4 -0
- package/dist/components/ModalSheet/index.js +4 -0
- package/dist/components/ProductCard/index-BF8pv46P.d.ts +2 -0
- package/dist/components/ProductCard/index-C6TLdXjC.d.cts +2 -0
- package/dist/{ProductCard → components/ProductCard}/index.cjs +5 -4
- package/dist/components/ProductCard/index.js +7 -0
- package/dist/{ProductGrid/index.d.cts → components/ProductGrid/index-B1eVXjB4.d.cts} +3 -3
- package/dist/{ProductGrid/index.d.ts → components/ProductGrid/index-CyDy1V6o.d.ts} +3 -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-BHl3dM6k.d.cts} +2 -2
- package/dist/{RadioButton/index.d.ts → components/RadioButton/index-BZrcz8-J.d.ts} +2 -2
- 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-DdyMuFCX.d.ts} +2 -2
- package/dist/{RadioButtonGroup/index.d.ts → components/RadioButtonGroup/index-DtdjcXo-.d.cts} +2 -2
- 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.ts → components/SearchAutocomplete/index-Br_POGOz.d.ts} +2 -2
- package/dist/{SearchAutocomplete/index.d.cts → components/SearchAutocomplete/index-Ce9gkkbU.d.cts} +2 -2
- package/dist/components/SearchAutocomplete/index.cjs +4 -0
- package/dist/components/SearchAutocomplete/index.js +4 -0
- package/dist/{SearchFilter/index.d.cts → components/SearchFilter/index-DAR4UKSA.d.cts} +5 -5
- package/dist/{SearchFilter/index.d.ts → components/SearchFilter/index-VygXUBM9.d.ts} +5 -5
- package/dist/components/SearchFilter/index.cjs +17 -0
- package/dist/components/SearchFilter/index.js +12 -0
- package/dist/{SearchInput/index.d.ts → components/SearchInput/index-UY0W77Y0.d.ts} +2 -2
- package/dist/{SearchInput/index.d.cts → components/SearchInput/index-rFDdhvqg.d.cts} +2 -2
- package/dist/components/SearchInput/index.cjs +7 -0
- package/dist/components/SearchInput/index.js +6 -0
- package/dist/{SearchInputForm/index.d.cts → components/SearchInputForm/index-_sR_KugL.d.ts} +3 -3
- package/dist/{SearchInputForm/index.d.ts → components/SearchInputForm/index-dlLBivQA.d.cts} +1 -1
- package/dist/components/SearchInputForm/index.cjs +8 -0
- package/dist/components/SearchInputForm/index.js +8 -0
- package/dist/{SearchResultsContent/index.d.cts → components/SearchResultsContent/index-B_6-7-t-.d.ts} +18 -9
- package/dist/{SearchResultsContent/index.d.ts → components/SearchResultsContent/index-CayvNVCK.d.cts} +18 -9
- package/dist/components/SearchResultsContent/index.cjs +60 -0
- package/dist/components/SearchResultsContent/index.js +58 -0
- package/dist/components/SearchResultsFilterButton/index-D_u8PzTc.d.cts +13 -0
- package/dist/components/SearchResultsFilterButton/index-DuTGqa7-.d.ts +13 -0
- package/dist/components/SearchResultsFilterButton/index.cjs +9 -0
- package/dist/components/SearchResultsFilterButton/index.js +9 -0
- package/dist/components/SearchResultsFilterModal/index-BNZEJiXR.d.cts +27 -0
- package/dist/components/SearchResultsFilterModal/index-CXBAA2-F.d.ts +27 -0
- package/dist/components/SearchResultsFilterModal/index.cjs +47 -0
- package/dist/components/SearchResultsFilterModal/index.js +46 -0
- package/dist/components/SearchResultsFilterSidebar/index-BDcl27l4.d.ts +2 -0
- package/dist/components/SearchResultsFilterSidebar/index-DgPB1knO.d.cts +2 -0
- package/dist/components/SearchResultsFilterSidebar/index.cjs +16 -0
- package/dist/components/SearchResultsFilterSidebar/index.js +15 -0
- package/dist/{SearchResultsStates/index.d.ts → components/SearchResultsStates/index-CjYl1v-v.d.cts} +19 -10
- package/dist/{SearchResultsStates/index.d.cts → components/SearchResultsStates/index-DJaUfKjE.d.ts} +19 -10
- package/dist/components/SearchResultsStates/index.cjs +16 -0
- package/dist/components/SearchResultsStates/index.js +14 -0
- package/dist/components/SearchResultsToolbar/index-CVstdvRQ.d.cts +49 -0
- package/dist/components/SearchResultsToolbar/index-tAB6lEUm.d.ts +49 -0
- package/dist/components/SearchResultsToolbar/index.cjs +66 -0
- package/dist/components/SearchResultsToolbar/index.js +63 -0
- package/dist/{SparkleAnimation/index.d.ts → components/SparkleAnimation/index-BQOC3G_6.d.cts} +2 -2
- package/dist/{SparkleAnimation/index.d.cts → components/SparkleAnimation/index-DjRK3Dys.d.ts} +2 -2
- package/dist/{SparkleAnimation → components/SparkleAnimation}/index.cjs +1 -1
- package/dist/components/SparkleAnimation/index.js +3 -0
- package/dist/{Spinner/index.d.cts → components/Spinner/index-C0pGovHC.d.cts} +2 -2
- package/dist/{Spinner/index.d.ts → components/Spinner/index-CIr1izou.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-B4J70IPS.d.cts} +2 -2
- package/dist/{SuggestionButton/index.d.ts → components/SuggestionButton/index-D6_y1hTj.d.ts} +2 -2
- package/dist/{SuggestionButton → components/SuggestionButton}/index.cjs +5 -7
- package/dist/{SuggestionButton → components/SuggestionButton}/index.js +4 -5
- package/dist/{TextInput/index.d.cts → components/TextInput/index-CRJMRe-b.d.cts} +2 -2
- package/dist/{TextInput/index.d.ts → components/TextInput/index-CkQtHiR9.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-Dc-cs_tK.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-DE1Nhjra.d.ts +3 -0
- package/dist/components/Typography/index-DzSBreyM.d.cts +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-DmvaMYbj.d.ts → index-8cIrhPDk.d.ts} +3 -3
- package/dist/{index-Dfe_lkL2.d.cts → index-BKYA7uMB.d.cts} +1 -1
- package/dist/{index-Qtr26aUO.d.ts → index-Bw6lDfEp.d.cts} +2 -2
- package/dist/{index-BqARXvZ6.d.cts → index-CqfgJHj8.d.cts} +5 -5
- package/dist/{index-BMHF0IWd.d.cts → index-Cr8VXccr.d.ts} +2 -2
- package/dist/{index-BB4Qbpmg.d.ts → index-Cz6qxTZG.d.ts} +5 -5
- package/dist/{searchFilterSidebarVariants-DzCf_sfh.cjs → searchFilterSidebarVariants-C61Byr1S.cjs} +1 -1
- package/dist/{searchFilterSidebarVariants-f9PS9fl6.js → searchFilterSidebarVariants-DcwlBfvY.js} +2 -2
- package/dist/{types-BhGjnuWx.d.cts → types--eyQnaEA.d.cts} +1 -1
- package/dist/{types-DlqhqT_S.d.ts → types-CQpdBL3M.d.ts} +1 -1
- package/dist/{typographyVariantClasses-B6wiawat.d.ts → typographyVariantClasses-CoRhazCU.d.cts} +1 -1
- package/dist/{typographyVariantClasses-DTSltxPN.d.cts → typographyVariantClasses-CrT5OfVw.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 -52
- package/src/components/RecommendedProducts/RecommendedProducts.tsx +97 -0
- package/src/components/RecommendedProducts/index.ts +3 -0
- package/src/components/SearchResultsContent/SearchResultsContent.tsx +68 -35
- 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/SearchResultsStates/NoSearchResultsFound.tsx +43 -11
- package/src/components/SearchResultsStates/SearchResultsGrid.tsx +5 -1
- package/src/components/SearchResultsToolbar/SearchResultsToolbar.tsx +111 -0
- package/src/components/SearchResultsToolbar/index.ts +3 -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/colorVar.ts +3 -0
- package/src/util/index.ts +4 -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 -2
- package/dist/ProductCard/index.d.ts +0 -2
- 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.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/SearchResultsFilterSidebar/index.d.cts +0 -2
- package/dist/SearchResultsFilterSidebar/index.d.ts +0 -2
- package/dist/SearchResultsStates/index.cjs +0 -14
- package/dist/SearchResultsStates/index.js +0 -12
- 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/{ButtonBase-DbWQ25n-.cjs → ButtonBase-BIXx56hq.cjs} +0 -0
- /package/dist/{ButtonBase-C_uKnl48.js → ButtonBase-C9fn-c5h.js} +0 -0
- /package/dist/{Typography-CFNWgbM5.cjs → Typography-Ds4gfOJz.cjs} +0 -0
- /package/dist/{colorsConfig-B3-SMUSx.cjs → colorsConfig-D-MZuBvt.cjs} +0 -0
- /package/dist/{ToggleButton/index.d.ts → components/ToggleButton/index-B2rBwaVX.d.cts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime29 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Spinner/Spinner.d.ts
|
|
4
4
|
type SpinnerProps = {
|
|
@@ -6,6 +6,6 @@ type SpinnerProps = {
|
|
|
6
6
|
};
|
|
7
7
|
declare const Spinner: ({
|
|
8
8
|
className
|
|
9
|
-
}: SpinnerProps) =>
|
|
9
|
+
}: SpinnerProps) => react_jsx_runtime29.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Spinner };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime31 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Spinner/Spinner.d.ts
|
|
4
4
|
type SpinnerProps = {
|
|
@@ -6,6 +6,6 @@ type SpinnerProps = {
|
|
|
6
6
|
};
|
|
7
7
|
declare const Spinner: ({
|
|
8
8
|
className
|
|
9
|
-
}: SpinnerProps) =>
|
|
9
|
+
}: SpinnerProps) => react_jsx_runtime31.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Spinner };
|
package/dist/{SuggestionButton/index.d.cts → components/SuggestionButton/index-B4J70IPS.d.cts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime28 from "react/jsx-runtime";
|
|
2
2
|
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SuggestionButton/types.d.ts
|
|
@@ -30,6 +30,6 @@ declare const SuggestionButton: ({
|
|
|
30
30
|
dataAttributes,
|
|
31
31
|
dataTestId,
|
|
32
32
|
onClick
|
|
33
|
-
}: SuggestionButtonProps) =>
|
|
33
|
+
}: SuggestionButtonProps) => react_jsx_runtime28.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton, SuggestionButtonVariant };
|
package/dist/{SuggestionButton/index.d.ts → components/SuggestionButton/index-D6_y1hTj.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
2
2
|
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SuggestionButton/types.d.ts
|
|
@@ -30,6 +30,6 @@ declare const SuggestionButton: ({
|
|
|
30
30
|
dataAttributes,
|
|
31
31
|
dataTestId,
|
|
32
32
|
onClick
|
|
33
|
-
}: SuggestionButtonProps) =>
|
|
33
|
+
}: SuggestionButtonProps) => react_jsx_runtime5.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton, SuggestionButtonVariant };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
const require_chunk = require('
|
|
2
|
-
require('
|
|
3
|
-
const require_ButtonBase = require('
|
|
1
|
+
const require_chunk = require('../../chunk-CUT6urMc.cjs');
|
|
2
|
+
require('../../Typography-Ds4gfOJz.cjs');
|
|
3
|
+
const require_ButtonBase = require('../../ButtonBase-BMEAmPnS.cjs');
|
|
4
4
|
let classnames = require("classnames");
|
|
5
5
|
classnames = require_chunk.__toESM(classnames);
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
8
7
|
let __envive_ai_react_icons_OutlinedStar = require("@envive-ai/react-icons/OutlinedStar");
|
|
9
8
|
__envive_ai_react_icons_OutlinedStar = require_chunk.__toESM(__envive_ai_react_icons_OutlinedStar);
|
|
10
9
|
let __envive_ai_react_icons_FourPointStar = require("@envive-ai/react-icons/FourPointStar");
|
|
@@ -163,13 +162,12 @@ const SuggestionButton = ({ variant, hoverVariant, isDisabled, content, boldText
|
|
|
163
162
|
const baseNonBorderClasses = baseClasses.filter((cls) => !cls.includes("border"));
|
|
164
163
|
const hoverBorderClasses = hoverClasses.filter((cls) => cls.includes("border"));
|
|
165
164
|
const hoverNonBorderClasses = hoverClasses.filter((cls) => !cls.includes("border"));
|
|
166
|
-
const
|
|
165
|
+
const buttonClass = `${buttonClassName} ${[
|
|
167
166
|
...baseNonBorderClasses,
|
|
168
167
|
...hoverTransform(hoverNonBorderClasses),
|
|
169
168
|
...baseBorderClasses,
|
|
170
169
|
...hoverTransform(hoverBorderClasses)
|
|
171
|
-
]
|
|
172
|
-
const buttonClass = `${buttonClassName} ${variantClasses.join(" ")}`;
|
|
170
|
+
].join(" ")}`;
|
|
173
171
|
const getIcon = () => {
|
|
174
172
|
if (isAnswer) return void 0;
|
|
175
173
|
if (variant === "transparentDark") return __envive_ai_react_icons_OutlinedStar.default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import { ButtonBase } from "
|
|
1
|
+
import "../../Typography-xehJH05l.js";
|
|
2
|
+
import { t as ButtonBase } from "../../ButtonBase-CT397aT3.js";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import OutlinedStar from "@envive-ai/react-icons/OutlinedStar";
|
|
@@ -158,13 +158,12 @@ const SuggestionButton = ({ variant, hoverVariant, isDisabled, content, boldText
|
|
|
158
158
|
const baseNonBorderClasses = baseClasses.filter((cls) => !cls.includes("border"));
|
|
159
159
|
const hoverBorderClasses = hoverClasses.filter((cls) => cls.includes("border"));
|
|
160
160
|
const hoverNonBorderClasses = hoverClasses.filter((cls) => !cls.includes("border"));
|
|
161
|
-
const
|
|
161
|
+
const buttonClass = `${buttonClassName} ${[
|
|
162
162
|
...baseNonBorderClasses,
|
|
163
163
|
...hoverTransform(hoverNonBorderClasses),
|
|
164
164
|
...baseBorderClasses,
|
|
165
165
|
...hoverTransform(hoverBorderClasses)
|
|
166
|
-
]
|
|
167
|
-
const buttonClass = `${buttonClassName} ${variantClasses.join(" ")}`;
|
|
166
|
+
].join(" ")}`;
|
|
168
167
|
const getIcon = () => {
|
|
169
168
|
if (isAnswer) return void 0;
|
|
170
169
|
if (variant === "transparentDark") return OutlinedStar;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TypographyVariantMap } from "
|
|
2
|
-
import "
|
|
1
|
+
import { r as TypographyVariantMap } from "../../typographyVariantClasses-CoRhazCU.cjs";
|
|
2
|
+
import "../../index-Bw6lDfEp.cjs";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/TextInput/TextInput.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TypographyVariantMap } from "
|
|
2
|
-
import "
|
|
1
|
+
import { r as TypographyVariantMap } from "../../typographyVariantClasses-CrT5OfVw.js";
|
|
2
|
+
import "../../index-Cr8VXccr.js";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/TextInput/TextInput.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/ToggleButton/ToggleButton.d.ts
|
|
4
4
|
type ToggleButtonProps = {
|
|
@@ -25,6 +25,6 @@ declare const ToggleButton: ({
|
|
|
25
25
|
icon,
|
|
26
26
|
iconClassName,
|
|
27
27
|
variant
|
|
28
|
-
}: ToggleButtonProps) =>
|
|
28
|
+
}: ToggleButtonProps) => react_jsx_runtime1.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { ToggleButton, ToggleButtonProps, ToggleButtonVariant };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { i as getVariantPlaceholderClassNames, n as TypographyDomVariantMap, r as TypographyVariantMap, t as ElementTypes } from "../../typographyVariantClasses-CrT5OfVw.js";
|
|
2
|
+
import { n as TypographyProps, t as Typography } from "../../index-Cr8VXccr.js";
|
|
3
|
+
export { ElementTypes, Typography, TypographyDomVariantMap, TypographyProps, TypographyVariantMap, getVariantPlaceholderClassNames };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { i as getVariantPlaceholderClassNames, n as TypographyDomVariantMap, r as TypographyVariantMap, t as ElementTypes } from "../../typographyVariantClasses-CoRhazCU.cjs";
|
|
2
|
+
import { n as TypographyProps, t as Typography } from "../../index-Bw6lDfEp.cjs";
|
|
3
|
+
export { ElementTypes, Typography, TypographyDomVariantMap, TypographyProps, TypographyVariantMap, getVariantPlaceholderClassNames };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_Typography = require('
|
|
1
|
+
const require_Typography = require('../../Typography-Ds4gfOJz.cjs');
|
|
2
2
|
|
|
3
3
|
exports.Typography = require_Typography.Typography;
|
|
4
4
|
exports.TypographyDomVariantMap = require_Typography.TypographyDomVariantMap;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/util/formatPrice.ts
|
|
3
|
+
const formatPrice = (price, currency = "$") => {
|
|
4
|
+
if (price == null) return "";
|
|
5
|
+
const options = {};
|
|
6
|
+
if (!Number.isInteger(price)) {
|
|
7
|
+
options.minimumFractionDigits = 2;
|
|
8
|
+
options.maximumFractionDigits = 2;
|
|
9
|
+
}
|
|
10
|
+
return `${currency}${price.toLocaleString("en-US", options)}`;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
Object.defineProperty(exports, 'formatPrice', {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return formatPrice;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/util/formatPrice.ts
|
|
2
|
+
const formatPrice = (price, currency = "$") => {
|
|
3
|
+
if (price == null) return "";
|
|
4
|
+
const options = {};
|
|
5
|
+
if (!Number.isInteger(price)) {
|
|
6
|
+
options.minimumFractionDigits = 2;
|
|
7
|
+
options.maximumFractionDigits = 2;
|
|
8
|
+
}
|
|
9
|
+
return `${currency}${price.toLocaleString("en-US", options)}`;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { formatPrice as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
2
2
|
import { SearchFilterDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SearchResultsFilterSidebar/types.d.ts
|
|
@@ -41,6 +41,6 @@ declare const SearchResultsFilter: ({
|
|
|
41
41
|
onSelectFilterItem,
|
|
42
42
|
onClearAllFilters,
|
|
43
43
|
filterButtonText
|
|
44
|
-
}: SearchResultsFilterProps) =>
|
|
44
|
+
}: SearchResultsFilterProps) => react_jsx_runtime13.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
|
-
export { CloseIconVariant$1 as
|
|
46
|
+
export { SearchFilterSidebarVariant as a, CloseIconVariant$1 as i, SearchResultsFilterProps as n, searchFilterSidebarVariantClasses as r, SearchResultsFilter as t };
|
|
@@ -43,4 +43,4 @@ declare const SearchResultsFilter: ({
|
|
|
43
43
|
filterButtonText
|
|
44
44
|
}: SearchResultsFilterProps) => react_jsx_runtime1.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
|
-
export { CloseIconVariant$1 as
|
|
46
|
+
export { SearchFilterSidebarVariant as a, CloseIconVariant$1 as i, SearchResultsFilterProps as n, searchFilterSidebarVariantClasses as r, SearchResultsFilter as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as TypographyVariantMap, t as ElementTypes } from "./typographyVariantClasses-CoRhazCU.cjs";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Typography/Typography.d.ts
|
|
@@ -28,4 +28,4 @@ declare const Typography: ({
|
|
|
28
28
|
id: string;
|
|
29
29
|
}, HTMLElement>;
|
|
30
30
|
//#endregion
|
|
31
|
-
export {
|
|
31
|
+
export { TypographyProps as n, Typography as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
2
2
|
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
3
|
import { FC } from "react";
|
|
4
4
|
import { ResponseCategory, SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
@@ -261,7 +261,7 @@ declare const RatingSummary: ({
|
|
|
261
261
|
stars,
|
|
262
262
|
reviewCount,
|
|
263
263
|
className
|
|
264
|
-
}: RatingSummaryProps) =>
|
|
264
|
+
}: RatingSummaryProps) => react_jsx_runtime15.JSX.Element;
|
|
265
265
|
interface PriceSectionProps {
|
|
266
266
|
originalPrice?: string;
|
|
267
267
|
salePrice?: string;
|
|
@@ -271,7 +271,7 @@ declare const PriceSection: ({
|
|
|
271
271
|
originalPrice,
|
|
272
272
|
salePrice,
|
|
273
273
|
pricePrefix
|
|
274
|
-
}: PriceSectionProps) =>
|
|
274
|
+
}: PriceSectionProps) => react_jsx_runtime15.JSX.Element;
|
|
275
275
|
interface ProductCardProps extends TestProps {
|
|
276
276
|
productCardConfig?: ProductCardConfig;
|
|
277
277
|
merchantShortName: string;
|
|
@@ -308,7 +308,7 @@ declare const ProductCard: ({
|
|
|
308
308
|
aspectRatio,
|
|
309
309
|
growWithContainer,
|
|
310
310
|
onClick
|
|
311
|
-
}: ProductCardProps) =>
|
|
311
|
+
}: ProductCardProps) => react_jsx_runtime15.JSX.Element;
|
|
312
312
|
//#endregion
|
|
313
313
|
//#region src/components/ProductCard/ProductCardSkeleton.d.ts
|
|
314
314
|
declare const ProductCardSkeleton: FC<ProductCardSkeletonProps>;
|
|
@@ -322,4 +322,4 @@ declare const variantHoverClassMap: Map<ProductCardHoverVariant, string[]>;
|
|
|
322
322
|
declare const variantTitleColorMap: Map<ProductCardVariant, string>;
|
|
323
323
|
declare const productCardLayoutVariantClasses: Record<ProductCardLayoutVariant, Record<string, string[]>>;
|
|
324
324
|
//#endregion
|
|
325
|
-
export {
|
|
325
|
+
export { ProductCardVariant as _, ProductCardSkeleton as a, SearchResponseProductAttributes as b, RatingSummary as c, ProductCardConfig as d, ProductCardHoverVariant as f, ProductCardSkeletonProps as g, ProductCardSkeletonOverrides as h, variantTitleColorMap as i, RatingSummaryProps as l, ProductCardLayoutVariant as m, variantClassMap as n, PriceSection as o, ProductCardImageAspectRatio as p, variantHoverClassMap as r, ProductCard as s, productCardLayoutVariantClasses as t, AnimatedProductCardOverrides as u, ProductGridProps as v, ProductGridVariant as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as TypographyVariantMap, t as ElementTypes } from "./typographyVariantClasses-CrT5OfVw.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Typography/Typography.d.ts
|
|
@@ -28,4 +28,4 @@ declare const Typography: ({
|
|
|
28
28
|
id: string;
|
|
29
29
|
}, HTMLElement>;
|
|
30
30
|
//#endregion
|
|
31
|
-
export {
|
|
31
|
+
export { TypographyProps as n, Typography as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
3
3
|
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
4
4
|
import { ResponseCategory, SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
5
5
|
|
|
@@ -261,7 +261,7 @@ declare const RatingSummary: ({
|
|
|
261
261
|
stars,
|
|
262
262
|
reviewCount,
|
|
263
263
|
className
|
|
264
|
-
}: RatingSummaryProps) =>
|
|
264
|
+
}: RatingSummaryProps) => react_jsx_runtime26.JSX.Element;
|
|
265
265
|
interface PriceSectionProps {
|
|
266
266
|
originalPrice?: string;
|
|
267
267
|
salePrice?: string;
|
|
@@ -271,7 +271,7 @@ declare const PriceSection: ({
|
|
|
271
271
|
originalPrice,
|
|
272
272
|
salePrice,
|
|
273
273
|
pricePrefix
|
|
274
|
-
}: PriceSectionProps) =>
|
|
274
|
+
}: PriceSectionProps) => react_jsx_runtime26.JSX.Element;
|
|
275
275
|
interface ProductCardProps extends TestProps {
|
|
276
276
|
productCardConfig?: ProductCardConfig;
|
|
277
277
|
merchantShortName: string;
|
|
@@ -308,7 +308,7 @@ declare const ProductCard: ({
|
|
|
308
308
|
aspectRatio,
|
|
309
309
|
growWithContainer,
|
|
310
310
|
onClick
|
|
311
|
-
}: ProductCardProps) =>
|
|
311
|
+
}: ProductCardProps) => react_jsx_runtime26.JSX.Element;
|
|
312
312
|
//#endregion
|
|
313
313
|
//#region src/components/ProductCard/ProductCardSkeleton.d.ts
|
|
314
314
|
declare const ProductCardSkeleton: FC<ProductCardSkeletonProps>;
|
|
@@ -322,4 +322,4 @@ declare const variantHoverClassMap: Map<ProductCardHoverVariant, string[]>;
|
|
|
322
322
|
declare const variantTitleColorMap: Map<ProductCardVariant, string>;
|
|
323
323
|
declare const productCardLayoutVariantClasses: Record<ProductCardLayoutVariant, Record<string, string[]>>;
|
|
324
324
|
//#endregion
|
|
325
|
-
export {
|
|
325
|
+
export { ProductCardVariant as _, ProductCardSkeleton as a, SearchResponseProductAttributes as b, RatingSummary as c, ProductCardConfig as d, ProductCardHoverVariant as f, ProductCardSkeletonProps as g, ProductCardSkeletonOverrides as h, variantTitleColorMap as i, RatingSummaryProps as l, ProductCardLayoutVariant as m, variantClassMap as n, PriceSection as o, ProductCardImageAspectRatio as p, variantHoverClassMap as r, ProductCard as s, productCardLayoutVariantClasses as t, AnimatedProductCardOverrides as u, ProductGridProps as v, ProductGridVariant as y };
|
package/dist/{searchFilterSidebarVariants-DzCf_sfh.cjs → searchFilterSidebarVariants-C61Byr1S.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_colorsConfig = require('./colorsConfig-
|
|
1
|
+
const require_colorsConfig = require('./colorsConfig-D-MZuBvt.cjs');
|
|
2
2
|
|
|
3
3
|
//#region src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts
|
|
4
4
|
const searchFilterSidebarVariantClasses = {
|
package/dist/{searchFilterSidebarVariants-f9PS9fl6.js → searchFilterSidebarVariants-DcwlBfvY.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as colorVar, t as ColorNames } from "./colorsConfig-BjdoRtRK.js";
|
|
2
2
|
|
|
3
3
|
//#region src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts
|
|
4
4
|
const searchFilterSidebarVariantClasses = {
|
|
@@ -31,4 +31,4 @@ const searchFilterSidebarVariantClasses = {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
34
|
-
export { searchFilterSidebarVariantClasses };
|
|
34
|
+
export { searchFilterSidebarVariantClasses as t };
|
package/dist/{typographyVariantClasses-B6wiawat.d.ts → typographyVariantClasses-CoRhazCU.d.cts}
RENAMED
|
@@ -116,4 +116,4 @@ declare const TypographyVariantMap: {
|
|
|
116
116
|
};
|
|
117
117
|
declare const getVariantPlaceholderClassNames: (classes: Record<string, boolean>) => Record<string, boolean>;
|
|
118
118
|
//#endregion
|
|
119
|
-
export {
|
|
119
|
+
export { getVariantPlaceholderClassNames as i, TypographyDomVariantMap as n, TypographyVariantMap as r, ElementTypes as t };
|
package/dist/{typographyVariantClasses-DTSltxPN.d.cts → typographyVariantClasses-CrT5OfVw.d.ts}
RENAMED
|
@@ -116,4 +116,4 @@ declare const TypographyVariantMap: {
|
|
|
116
116
|
};
|
|
117
117
|
declare const getVariantPlaceholderClassNames: (classes: Record<string, boolean>) => Record<string, boolean>;
|
|
118
118
|
//#endregion
|
|
119
|
-
export {
|
|
119
|
+
export { getVariantPlaceholderClassNames as i, TypographyDomVariantMap as n, TypographyVariantMap as r, ElementTypes as t };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react0 from "react";
|
|
2
|
+
import { ColorNames } from "@envive-ai/react-hooks/contexts/types";
|
|
3
|
+
|
|
4
|
+
//#region src/util/formatPrice.d.ts
|
|
5
|
+
declare const formatPrice: (price?: number, currency?: string) => string;
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/util/useScrollDirection.d.ts
|
|
8
|
+
type ScrollDirection = 'up' | 'down';
|
|
9
|
+
declare const useScrollDirection: (scrollContainerRef?: React.RefObject<HTMLElement>) => ScrollDirection;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/util/useStickyVisibility.d.ts
|
|
12
|
+
declare const useStickyVisibility: () => {
|
|
13
|
+
toolbarRef: react0.RefObject<HTMLDivElement>;
|
|
14
|
+
isVisible: boolean;
|
|
15
|
+
toolbarHeight: number;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/util/colorVar.d.ts
|
|
19
|
+
declare const colorVar: (color: ColorNames) => string;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ScrollDirection, colorVar, formatPrice, useScrollDirection, useStickyVisibility };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react0 from "react";
|
|
2
|
+
import { ColorNames } from "@envive-ai/react-hooks/contexts/types";
|
|
3
|
+
|
|
4
|
+
//#region src/util/formatPrice.d.ts
|
|
5
|
+
declare const formatPrice: (price?: number, currency?: string) => string;
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/util/useScrollDirection.d.ts
|
|
8
|
+
type ScrollDirection = 'up' | 'down';
|
|
9
|
+
declare const useScrollDirection: (scrollContainerRef?: React.RefObject<HTMLElement>) => ScrollDirection;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/util/useStickyVisibility.d.ts
|
|
12
|
+
declare const useStickyVisibility: () => {
|
|
13
|
+
toolbarRef: react0.RefObject<HTMLDivElement>;
|
|
14
|
+
isVisible: boolean;
|
|
15
|
+
toolbarHeight: number;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/util/colorVar.d.ts
|
|
19
|
+
declare const colorVar: (color: ColorNames) => string;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ScrollDirection, colorVar, formatPrice, useScrollDirection, useStickyVisibility };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
|
+
const require_formatPrice = require('../formatPrice-CyfkjZ3R.cjs');
|
|
3
|
+
let react = require("react");
|
|
4
|
+
|
|
5
|
+
//#region src/util/useScrollDirection.ts
|
|
6
|
+
const useScrollDirection = (scrollContainerRef) => {
|
|
7
|
+
const [scrollDirection, setScrollDirection] = (0, react.useState)(null);
|
|
8
|
+
const touchStartY = (0, react.useRef)(0);
|
|
9
|
+
(0, react.useEffect)(() => {
|
|
10
|
+
const container = scrollContainerRef?.current || window;
|
|
11
|
+
const touchTarget = scrollContainerRef?.current || document;
|
|
12
|
+
const handleWheel = (e) => {
|
|
13
|
+
if (e.deltaY > 0) setScrollDirection("down");
|
|
14
|
+
else setScrollDirection("up");
|
|
15
|
+
};
|
|
16
|
+
const handleTouchStart = (e) => {
|
|
17
|
+
touchStartY.current = e.touches[0].clientY;
|
|
18
|
+
};
|
|
19
|
+
const handleTouchMove = (e) => {
|
|
20
|
+
const currentTouchY = e.touches[0].clientY;
|
|
21
|
+
const deltaY = touchStartY.current - currentTouchY;
|
|
22
|
+
if (Math.abs(deltaY) < 10) return;
|
|
23
|
+
if (deltaY > 0) setScrollDirection("down");
|
|
24
|
+
else setScrollDirection("up");
|
|
25
|
+
touchStartY.current = currentTouchY;
|
|
26
|
+
};
|
|
27
|
+
container.addEventListener("wheel", handleWheel, { passive: true });
|
|
28
|
+
touchTarget.addEventListener("touchstart", handleTouchStart, { passive: true });
|
|
29
|
+
touchTarget.addEventListener("touchmove", handleTouchMove, { passive: true });
|
|
30
|
+
return () => {
|
|
31
|
+
container.removeEventListener("wheel", handleWheel);
|
|
32
|
+
touchTarget.removeEventListener("touchstart", handleTouchStart);
|
|
33
|
+
touchTarget.removeEventListener("touchmove", handleTouchMove);
|
|
34
|
+
};
|
|
35
|
+
}, [scrollContainerRef]);
|
|
36
|
+
return scrollDirection;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/util/useStickyVisibility.ts
|
|
41
|
+
const useStickyVisibility = () => {
|
|
42
|
+
const [isVisible, setIsVisible] = (0, react.useState)(true);
|
|
43
|
+
const toolbarRef = (0, react.useRef)(null);
|
|
44
|
+
const [toolbarHeight, setToolbarHeight] = (0, react.useState)(0);
|
|
45
|
+
const [scrollY, setScrollY] = (0, react.useState)(0);
|
|
46
|
+
const scrollDirection = useScrollDirection();
|
|
47
|
+
(0, react.useEffect)(() => {
|
|
48
|
+
const handleScroll = () => {
|
|
49
|
+
setScrollY(window.scrollY);
|
|
50
|
+
};
|
|
51
|
+
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
52
|
+
return () => window.removeEventListener("scroll", handleScroll);
|
|
53
|
+
}, []);
|
|
54
|
+
(0, react.useEffect)(() => {
|
|
55
|
+
if (toolbarRef.current) setToolbarHeight(toolbarRef.current.offsetHeight);
|
|
56
|
+
}, []);
|
|
57
|
+
(0, react.useEffect)(() => {
|
|
58
|
+
if (scrollDirection === "down" && scrollY > toolbarHeight && toolbarHeight > 0) setIsVisible(false);
|
|
59
|
+
else setIsVisible(true);
|
|
60
|
+
}, [
|
|
61
|
+
scrollDirection,
|
|
62
|
+
toolbarHeight,
|
|
63
|
+
scrollY
|
|
64
|
+
]);
|
|
65
|
+
return {
|
|
66
|
+
toolbarRef,
|
|
67
|
+
isVisible,
|
|
68
|
+
toolbarHeight
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/util/colorVar.ts
|
|
74
|
+
const colorVar = (color) => `var(--spiffy-colors-${color})`;
|
|
75
|
+
|
|
76
|
+
//#endregion
|
|
77
|
+
exports.colorVar = colorVar;
|
|
78
|
+
exports.formatPrice = require_formatPrice.formatPrice;
|
|
79
|
+
exports.useScrollDirection = useScrollDirection;
|
|
80
|
+
exports.useStickyVisibility = useStickyVisibility;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { t as formatPrice } from "../formatPrice-DexQu2aZ.js";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/util/useScrollDirection.ts
|
|
5
|
+
const useScrollDirection = (scrollContainerRef) => {
|
|
6
|
+
const [scrollDirection, setScrollDirection] = useState(null);
|
|
7
|
+
const touchStartY = useRef(0);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const container = scrollContainerRef?.current || window;
|
|
10
|
+
const touchTarget = scrollContainerRef?.current || document;
|
|
11
|
+
const handleWheel = (e) => {
|
|
12
|
+
if (e.deltaY > 0) setScrollDirection("down");
|
|
13
|
+
else setScrollDirection("up");
|
|
14
|
+
};
|
|
15
|
+
const handleTouchStart = (e) => {
|
|
16
|
+
touchStartY.current = e.touches[0].clientY;
|
|
17
|
+
};
|
|
18
|
+
const handleTouchMove = (e) => {
|
|
19
|
+
const currentTouchY = e.touches[0].clientY;
|
|
20
|
+
const deltaY = touchStartY.current - currentTouchY;
|
|
21
|
+
if (Math.abs(deltaY) < 10) return;
|
|
22
|
+
if (deltaY > 0) setScrollDirection("down");
|
|
23
|
+
else setScrollDirection("up");
|
|
24
|
+
touchStartY.current = currentTouchY;
|
|
25
|
+
};
|
|
26
|
+
container.addEventListener("wheel", handleWheel, { passive: true });
|
|
27
|
+
touchTarget.addEventListener("touchstart", handleTouchStart, { passive: true });
|
|
28
|
+
touchTarget.addEventListener("touchmove", handleTouchMove, { passive: true });
|
|
29
|
+
return () => {
|
|
30
|
+
container.removeEventListener("wheel", handleWheel);
|
|
31
|
+
touchTarget.removeEventListener("touchstart", handleTouchStart);
|
|
32
|
+
touchTarget.removeEventListener("touchmove", handleTouchMove);
|
|
33
|
+
};
|
|
34
|
+
}, [scrollContainerRef]);
|
|
35
|
+
return scrollDirection;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/util/useStickyVisibility.ts
|
|
40
|
+
const useStickyVisibility = () => {
|
|
41
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
42
|
+
const toolbarRef = useRef(null);
|
|
43
|
+
const [toolbarHeight, setToolbarHeight] = useState(0);
|
|
44
|
+
const [scrollY, setScrollY] = useState(0);
|
|
45
|
+
const scrollDirection = useScrollDirection();
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
const handleScroll = () => {
|
|
48
|
+
setScrollY(window.scrollY);
|
|
49
|
+
};
|
|
50
|
+
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
51
|
+
return () => window.removeEventListener("scroll", handleScroll);
|
|
52
|
+
}, []);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (toolbarRef.current) setToolbarHeight(toolbarRef.current.offsetHeight);
|
|
55
|
+
}, []);
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
if (scrollDirection === "down" && scrollY > toolbarHeight && toolbarHeight > 0) setIsVisible(false);
|
|
58
|
+
else setIsVisible(true);
|
|
59
|
+
}, [
|
|
60
|
+
scrollDirection,
|
|
61
|
+
toolbarHeight,
|
|
62
|
+
scrollY
|
|
63
|
+
]);
|
|
64
|
+
return {
|
|
65
|
+
toolbarRef,
|
|
66
|
+
isVisible,
|
|
67
|
+
toolbarHeight
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/util/colorVar.ts
|
|
73
|
+
const colorVar = (color) => `var(--spiffy-colors-${color})`;
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
export { colorVar, formatPrice, useScrollDirection, useStickyVisibility };
|