@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
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_ButtonBase = require('../ButtonBase/ButtonBase.cjs');
|
|
3
|
+
let classnames = require("classnames");
|
|
4
|
+
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let __envive_ai_react_icons_OutlinedStar = require("@envive-ai/react-icons/OutlinedStar");
|
|
7
|
+
__envive_ai_react_icons_OutlinedStar = require_rolldown_runtime.__toESM(__envive_ai_react_icons_OutlinedStar);
|
|
8
|
+
let __envive_ai_react_icons_FourPointStar = require("@envive-ai/react-icons/FourPointStar");
|
|
9
|
+
__envive_ai_react_icons_FourPointStar = require_rolldown_runtime.__toESM(__envive_ai_react_icons_FourPointStar);
|
|
10
|
+
|
|
11
|
+
//#region src/components/SuggestionButton/SuggestionButton.tsx
|
|
12
|
+
const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = "spiffy-suggestion-button-question-class";
|
|
13
|
+
const SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = "spiffy-suggestion-button-answer-class";
|
|
14
|
+
const SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = "spiffy-suggestion-button-text-class";
|
|
15
|
+
const BORDER_CLASS = "spiffy-tw-border";
|
|
16
|
+
const TEXT_LINK_CLASSES = [
|
|
17
|
+
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
18
|
+
"spiffy-tw-fill-[--spiffy-colors-text-link]",
|
|
19
|
+
"spiffy-tw-stroke-[--spiffy-colors-text-link]"
|
|
20
|
+
];
|
|
21
|
+
const TEXT_LIGHT_CLASSES = [
|
|
22
|
+
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
23
|
+
"spiffy-tw-fill-[--spiffy-colors-text-light]",
|
|
24
|
+
"spiffy-tw-stroke-[--spiffy-colors-text-light]"
|
|
25
|
+
];
|
|
26
|
+
const TEXT_PRIMARY_CLASSES = [
|
|
27
|
+
"spiffy-tw-text-[--spiffy-colors-text-primary]",
|
|
28
|
+
"spiffy-tw-fill-[--spiffy-colors-text-primary]",
|
|
29
|
+
"spiffy-tw-stroke-[--spiffy-colors-text-primary]"
|
|
30
|
+
];
|
|
31
|
+
const ACCENT_PRIMARY_CLASSES = ["spiffy-tw-fill-[--spiffy-colors-accent-primary]", "spiffy-tw-stroke-[--spiffy-colors-accent-primary]"];
|
|
32
|
+
const DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-dark]", "spiffy-tw-border-[--spiffy-colors-background-dark]"];
|
|
33
|
+
const SECONDARY_DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]", "spiffy-tw-border-[--spiffy-colors-background-secondary-dark]"];
|
|
34
|
+
const variantClassMap = new Map([
|
|
35
|
+
["outlined", ["spiffy-tw-border-[--spiffy-colors-border-outline]", ...TEXT_LINK_CLASSES]],
|
|
36
|
+
["outlinedLight", [
|
|
37
|
+
"spiffy-tw-border-[--spiffy-colors-border-outline]",
|
|
38
|
+
"spiffy-tw-bg-[--spiffy-colors-background-light]",
|
|
39
|
+
...TEXT_LINK_CLASSES,
|
|
40
|
+
BORDER_CLASS
|
|
41
|
+
]],
|
|
42
|
+
["primary", [
|
|
43
|
+
"spiffy-tw-bg-[--spiffy-colors-background-primary]",
|
|
44
|
+
"spiffy-tw-border-[--spiffy-colors-background-primary]",
|
|
45
|
+
...TEXT_LIGHT_CLASSES,
|
|
46
|
+
BORDER_CLASS
|
|
47
|
+
]],
|
|
48
|
+
["secondary", [
|
|
49
|
+
"spiffy-tw-bg-[--spiffy-colors-background-secondary]",
|
|
50
|
+
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
51
|
+
"spiffy-tw-border-[--spiffy-colors-background-secondary]",
|
|
52
|
+
...ACCENT_PRIMARY_CLASSES,
|
|
53
|
+
BORDER_CLASS
|
|
54
|
+
]],
|
|
55
|
+
["tertiary", [
|
|
56
|
+
"spiffy-tw-bg-[--spiffy-colors-background-tertiary]",
|
|
57
|
+
"spiffy-tw-border-[--spiffy-colors-background-tertiary]",
|
|
58
|
+
...TEXT_LINK_CLASSES,
|
|
59
|
+
BORDER_CLASS
|
|
60
|
+
]],
|
|
61
|
+
["dark", [
|
|
62
|
+
...DARK_BACKGROUND_CLASSES,
|
|
63
|
+
...TEXT_LIGHT_CLASSES,
|
|
64
|
+
BORDER_CLASS
|
|
65
|
+
]],
|
|
66
|
+
["darkPrimary", [
|
|
67
|
+
...DARK_BACKGROUND_CLASSES,
|
|
68
|
+
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
69
|
+
...ACCENT_PRIMARY_CLASSES,
|
|
70
|
+
BORDER_CLASS
|
|
71
|
+
]],
|
|
72
|
+
["darkAccent", [
|
|
73
|
+
...DARK_BACKGROUND_CLASSES,
|
|
74
|
+
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
75
|
+
"spiffy-tw-fill-[--spiffy-colors-text-accent]",
|
|
76
|
+
"spiffy-tw-stroke-[--spiffy-colors-text-accent]",
|
|
77
|
+
BORDER_CLASS
|
|
78
|
+
]],
|
|
79
|
+
["darkAccentContrast", [
|
|
80
|
+
...DARK_BACKGROUND_CLASSES,
|
|
81
|
+
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
82
|
+
"spiffy-tw-fill-[--spiffy-colors-accent-primary]",
|
|
83
|
+
"spiffy-tw-stroke-[--spiffy-colors-accent-primary]",
|
|
84
|
+
BORDER_CLASS
|
|
85
|
+
]],
|
|
86
|
+
["transparent", [
|
|
87
|
+
"spiffy-tw-bg-transparent",
|
|
88
|
+
"spiffy-tw-border-[--spiffy-colors-background-light]",
|
|
89
|
+
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
90
|
+
"spiffy-tw-fill-transparent",
|
|
91
|
+
"spiffy-tw-stroke-[--spiffy-colors-text-light]",
|
|
92
|
+
BORDER_CLASS
|
|
93
|
+
]],
|
|
94
|
+
["transparentDark", [
|
|
95
|
+
"spiffy-tw-bg-transparent",
|
|
96
|
+
"spiffy-tw-border-[--spiffy-colors-border-light]",
|
|
97
|
+
"spiffy-tw-text-[--spiffy-colors-text-primary]",
|
|
98
|
+
"spiffy-tw-fill-transparent",
|
|
99
|
+
"spiffy-tw-stroke-[--spiffy-colors-text-primary]",
|
|
100
|
+
BORDER_CLASS
|
|
101
|
+
]],
|
|
102
|
+
["secondaryDark", [
|
|
103
|
+
...SECONDARY_DARK_BACKGROUND_CLASSES,
|
|
104
|
+
...TEXT_LINK_CLASSES,
|
|
105
|
+
BORDER_CLASS
|
|
106
|
+
]],
|
|
107
|
+
["secondaryAccent", [
|
|
108
|
+
...SECONDARY_DARK_BACKGROUND_CLASSES,
|
|
109
|
+
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
110
|
+
...ACCENT_PRIMARY_CLASSES,
|
|
111
|
+
BORDER_CLASS
|
|
112
|
+
]],
|
|
113
|
+
["lightDark", [
|
|
114
|
+
"spiffy-tw-bg-[--spiffy-colors-background-light]",
|
|
115
|
+
"spiffy-tw-border-[--spiffy-colors-background-dark]",
|
|
116
|
+
...TEXT_PRIMARY_CLASSES,
|
|
117
|
+
BORDER_CLASS
|
|
118
|
+
]]
|
|
119
|
+
]);
|
|
120
|
+
const Icon = ({ isAnswer, variant }) => {
|
|
121
|
+
if (isAnswer) return void 0;
|
|
122
|
+
if (variant === "transparentDark") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_OutlinedStar.default, {});
|
|
123
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_FourPointStar.default, {});
|
|
124
|
+
};
|
|
125
|
+
const borderedVariants = [
|
|
126
|
+
"outlined",
|
|
127
|
+
"outlinedLight",
|
|
128
|
+
"primary",
|
|
129
|
+
"secondary",
|
|
130
|
+
"tertiary",
|
|
131
|
+
"dark",
|
|
132
|
+
"darkAccent",
|
|
133
|
+
"darkAccentContrast",
|
|
134
|
+
"darkPrimary",
|
|
135
|
+
"transparent",
|
|
136
|
+
"transparentDark",
|
|
137
|
+
"secondaryDark",
|
|
138
|
+
"secondaryAccent",
|
|
139
|
+
"lightDark"
|
|
140
|
+
];
|
|
141
|
+
const hoverTransform = (variantClass) => variantClass?.map((className) => `hover:${className}`);
|
|
142
|
+
const SuggestionButton = ({ variant, hoverVariant, isDisabled, content, boldText, borderRadius = "lg", isAnswer = false, dataAttributes, dataTestId, onClick }) => {
|
|
143
|
+
const buttonClassName = (0, classnames.default)({
|
|
144
|
+
[SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS]: !isAnswer,
|
|
145
|
+
[SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS]: isAnswer,
|
|
146
|
+
"!spiffy-tw-rounded-[20px]": borderRadius === "lg",
|
|
147
|
+
"!spiffy-tw-rounded-[8px]": borderRadius === "md",
|
|
148
|
+
"!spiffy-tw-rounded-[0px]": borderRadius === "sm",
|
|
149
|
+
"spiffy-tw-border-[1px]": borderedVariants.includes(variant),
|
|
150
|
+
"spiffy-tw-border-solid": borderedVariants.includes(variant)
|
|
151
|
+
});
|
|
152
|
+
const textClassName = (0, classnames.default)({
|
|
153
|
+
"spiffy-tw-text-[14px]": true,
|
|
154
|
+
"spiffy-tw-leading-[100%]": true,
|
|
155
|
+
"!spiffy-tw-font-bold": boldText
|
|
156
|
+
});
|
|
157
|
+
const iconClass = (0, classnames.default)({
|
|
158
|
+
"spiffy-tw-w-[11px]": true,
|
|
159
|
+
"spiffy-tw-h-[11px]": true,
|
|
160
|
+
"spiffy-tw-stroke-inherit": true,
|
|
161
|
+
"spiffy-tw-fill-inherit": true
|
|
162
|
+
});
|
|
163
|
+
const baseClasses = variantClassMap.get(variant) ?? [];
|
|
164
|
+
const hoverClasses = variantClassMap.get(hoverVariant) ?? [];
|
|
165
|
+
const baseBorderClasses = baseClasses.filter((cls) => cls.includes("border"));
|
|
166
|
+
const baseNonBorderClasses = baseClasses.filter((cls) => !cls.includes("border"));
|
|
167
|
+
const hoverBorderClasses = hoverClasses.filter((cls) => cls.includes("border"));
|
|
168
|
+
const hoverNonBorderClasses = hoverClasses.filter((cls) => !cls.includes("border"));
|
|
169
|
+
const buttonClass = `${buttonClassName} ${[
|
|
170
|
+
...baseNonBorderClasses,
|
|
171
|
+
...hoverTransform(hoverNonBorderClasses),
|
|
172
|
+
...baseBorderClasses,
|
|
173
|
+
...hoverTransform(hoverBorderClasses)
|
|
174
|
+
].join(" ")}`;
|
|
175
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ButtonBase.ButtonBase, {
|
|
176
|
+
text: content,
|
|
177
|
+
dataAttributes,
|
|
178
|
+
dataTestId,
|
|
179
|
+
isDisabled,
|
|
180
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
181
|
+
isAnswer,
|
|
182
|
+
variant
|
|
183
|
+
}),
|
|
184
|
+
iconClass: isAnswer ? void 0 : iconClass,
|
|
185
|
+
textClass: `${SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS} ${textClassName}`,
|
|
186
|
+
buttonClass,
|
|
187
|
+
onClick
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
//#endregion
|
|
192
|
+
exports.SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS;
|
|
193
|
+
exports.SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS;
|
|
194
|
+
exports.SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS;
|
|
195
|
+
exports.SuggestionButton = SuggestionButton;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { SuggestionButtonVariant } from "./types.cjs";
|
|
2
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
|
-
//#region src/components/SuggestionButton/types.d.ts
|
|
5
|
-
type SuggestionButtonVariant = 'outlined' | 'outlinedLight' | 'primary' | 'secondary' | 'tertiary' | 'dark' | 'darkAccent' | 'darkAccentContrast' | 'darkPrimary' | 'secondaryDark' | 'secondaryAccent' | 'transparent' | 'transparentDark' | 'lightDark';
|
|
6
|
-
//#endregion
|
|
7
4
|
//#region src/components/SuggestionButton/SuggestionButton.d.ts
|
|
8
5
|
declare const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = "spiffy-suggestion-button-question-class";
|
|
9
6
|
declare const SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = "spiffy-suggestion-button-answer-class";
|
|
10
7
|
declare const SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = "spiffy-suggestion-button-text-class";
|
|
11
|
-
interface SuggestionButtonProps
|
|
8
|
+
interface SuggestionButtonProps {
|
|
12
9
|
variant: SuggestionButtonVariant;
|
|
13
10
|
hoverVariant: SuggestionButtonVariant;
|
|
14
11
|
isDisabled: boolean;
|
|
@@ -18,6 +15,7 @@ interface SuggestionButtonProps extends TestProps {
|
|
|
18
15
|
isAnswer?: boolean;
|
|
19
16
|
dataAttributes?: Record<string, string>;
|
|
20
17
|
onClick: () => void;
|
|
18
|
+
dataTestId?: string;
|
|
21
19
|
}
|
|
22
20
|
declare const SuggestionButton: ({
|
|
23
21
|
variant,
|
|
@@ -30,6 +28,6 @@ declare const SuggestionButton: ({
|
|
|
30
28
|
dataAttributes,
|
|
31
29
|
dataTestId,
|
|
32
30
|
onClick
|
|
33
|
-
}: SuggestionButtonProps) =>
|
|
31
|
+
}: SuggestionButtonProps) => react_jsx_runtime19.JSX.Element;
|
|
34
32
|
//#endregion
|
|
35
|
-
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton
|
|
33
|
+
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton };
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { SuggestionButtonVariant } from "./types.js";
|
|
2
|
+
import * as react_jsx_runtime28 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
|
-
//#region src/components/SuggestionButton/types.d.ts
|
|
5
|
-
type SuggestionButtonVariant = 'outlined' | 'outlinedLight' | 'primary' | 'secondary' | 'tertiary' | 'dark' | 'darkAccent' | 'darkAccentContrast' | 'darkPrimary' | 'secondaryDark' | 'secondaryAccent' | 'transparent' | 'transparentDark' | 'lightDark';
|
|
6
|
-
//#endregion
|
|
7
4
|
//#region src/components/SuggestionButton/SuggestionButton.d.ts
|
|
8
5
|
declare const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = "spiffy-suggestion-button-question-class";
|
|
9
6
|
declare const SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = "spiffy-suggestion-button-answer-class";
|
|
10
7
|
declare const SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = "spiffy-suggestion-button-text-class";
|
|
11
|
-
interface SuggestionButtonProps
|
|
8
|
+
interface SuggestionButtonProps {
|
|
12
9
|
variant: SuggestionButtonVariant;
|
|
13
10
|
hoverVariant: SuggestionButtonVariant;
|
|
14
11
|
isDisabled: boolean;
|
|
@@ -18,6 +15,7 @@ interface SuggestionButtonProps extends TestProps {
|
|
|
18
15
|
isAnswer?: boolean;
|
|
19
16
|
dataAttributes?: Record<string, string>;
|
|
20
17
|
onClick: () => void;
|
|
18
|
+
dataTestId?: string;
|
|
21
19
|
}
|
|
22
20
|
declare const SuggestionButton: ({
|
|
23
21
|
variant,
|
|
@@ -30,6 +28,6 @@ declare const SuggestionButton: ({
|
|
|
30
28
|
dataAttributes,
|
|
31
29
|
dataTestId,
|
|
32
30
|
onClick
|
|
33
|
-
}: SuggestionButtonProps) =>
|
|
31
|
+
}: SuggestionButtonProps) => react_jsx_runtime28.JSX.Element;
|
|
34
32
|
//#endregion
|
|
35
|
-
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton
|
|
33
|
+
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton };
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { ButtonBase } from "../ButtonBase/ButtonBase.js";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import OutlinedStar from "@envive-ai/react-icons/OutlinedStar";
|
|
5
|
+
import FourPointStar from "@envive-ai/react-icons/FourPointStar";
|
|
6
|
+
|
|
7
|
+
//#region src/components/SuggestionButton/SuggestionButton.tsx
|
|
8
|
+
const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = "spiffy-suggestion-button-question-class";
|
|
9
|
+
const SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = "spiffy-suggestion-button-answer-class";
|
|
10
|
+
const SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = "spiffy-suggestion-button-text-class";
|
|
11
|
+
const BORDER_CLASS = "spiffy-tw-border";
|
|
12
|
+
const TEXT_LINK_CLASSES = [
|
|
13
|
+
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
14
|
+
"spiffy-tw-fill-[--spiffy-colors-text-link]",
|
|
15
|
+
"spiffy-tw-stroke-[--spiffy-colors-text-link]"
|
|
16
|
+
];
|
|
17
|
+
const TEXT_LIGHT_CLASSES = [
|
|
18
|
+
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
19
|
+
"spiffy-tw-fill-[--spiffy-colors-text-light]",
|
|
20
|
+
"spiffy-tw-stroke-[--spiffy-colors-text-light]"
|
|
21
|
+
];
|
|
22
|
+
const TEXT_PRIMARY_CLASSES = [
|
|
23
|
+
"spiffy-tw-text-[--spiffy-colors-text-primary]",
|
|
24
|
+
"spiffy-tw-fill-[--spiffy-colors-text-primary]",
|
|
25
|
+
"spiffy-tw-stroke-[--spiffy-colors-text-primary]"
|
|
26
|
+
];
|
|
27
|
+
const ACCENT_PRIMARY_CLASSES = ["spiffy-tw-fill-[--spiffy-colors-accent-primary]", "spiffy-tw-stroke-[--spiffy-colors-accent-primary]"];
|
|
28
|
+
const DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-dark]", "spiffy-tw-border-[--spiffy-colors-background-dark]"];
|
|
29
|
+
const SECONDARY_DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]", "spiffy-tw-border-[--spiffy-colors-background-secondary-dark]"];
|
|
30
|
+
const variantClassMap = new Map([
|
|
31
|
+
["outlined", ["spiffy-tw-border-[--spiffy-colors-border-outline]", ...TEXT_LINK_CLASSES]],
|
|
32
|
+
["outlinedLight", [
|
|
33
|
+
"spiffy-tw-border-[--spiffy-colors-border-outline]",
|
|
34
|
+
"spiffy-tw-bg-[--spiffy-colors-background-light]",
|
|
35
|
+
...TEXT_LINK_CLASSES,
|
|
36
|
+
BORDER_CLASS
|
|
37
|
+
]],
|
|
38
|
+
["primary", [
|
|
39
|
+
"spiffy-tw-bg-[--spiffy-colors-background-primary]",
|
|
40
|
+
"spiffy-tw-border-[--spiffy-colors-background-primary]",
|
|
41
|
+
...TEXT_LIGHT_CLASSES,
|
|
42
|
+
BORDER_CLASS
|
|
43
|
+
]],
|
|
44
|
+
["secondary", [
|
|
45
|
+
"spiffy-tw-bg-[--spiffy-colors-background-secondary]",
|
|
46
|
+
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
47
|
+
"spiffy-tw-border-[--spiffy-colors-background-secondary]",
|
|
48
|
+
...ACCENT_PRIMARY_CLASSES,
|
|
49
|
+
BORDER_CLASS
|
|
50
|
+
]],
|
|
51
|
+
["tertiary", [
|
|
52
|
+
"spiffy-tw-bg-[--spiffy-colors-background-tertiary]",
|
|
53
|
+
"spiffy-tw-border-[--spiffy-colors-background-tertiary]",
|
|
54
|
+
...TEXT_LINK_CLASSES,
|
|
55
|
+
BORDER_CLASS
|
|
56
|
+
]],
|
|
57
|
+
["dark", [
|
|
58
|
+
...DARK_BACKGROUND_CLASSES,
|
|
59
|
+
...TEXT_LIGHT_CLASSES,
|
|
60
|
+
BORDER_CLASS
|
|
61
|
+
]],
|
|
62
|
+
["darkPrimary", [
|
|
63
|
+
...DARK_BACKGROUND_CLASSES,
|
|
64
|
+
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
65
|
+
...ACCENT_PRIMARY_CLASSES,
|
|
66
|
+
BORDER_CLASS
|
|
67
|
+
]],
|
|
68
|
+
["darkAccent", [
|
|
69
|
+
...DARK_BACKGROUND_CLASSES,
|
|
70
|
+
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
71
|
+
"spiffy-tw-fill-[--spiffy-colors-text-accent]",
|
|
72
|
+
"spiffy-tw-stroke-[--spiffy-colors-text-accent]",
|
|
73
|
+
BORDER_CLASS
|
|
74
|
+
]],
|
|
75
|
+
["darkAccentContrast", [
|
|
76
|
+
...DARK_BACKGROUND_CLASSES,
|
|
77
|
+
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
78
|
+
"spiffy-tw-fill-[--spiffy-colors-accent-primary]",
|
|
79
|
+
"spiffy-tw-stroke-[--spiffy-colors-accent-primary]",
|
|
80
|
+
BORDER_CLASS
|
|
81
|
+
]],
|
|
82
|
+
["transparent", [
|
|
83
|
+
"spiffy-tw-bg-transparent",
|
|
84
|
+
"spiffy-tw-border-[--spiffy-colors-background-light]",
|
|
85
|
+
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
86
|
+
"spiffy-tw-fill-transparent",
|
|
87
|
+
"spiffy-tw-stroke-[--spiffy-colors-text-light]",
|
|
88
|
+
BORDER_CLASS
|
|
89
|
+
]],
|
|
90
|
+
["transparentDark", [
|
|
91
|
+
"spiffy-tw-bg-transparent",
|
|
92
|
+
"spiffy-tw-border-[--spiffy-colors-border-light]",
|
|
93
|
+
"spiffy-tw-text-[--spiffy-colors-text-primary]",
|
|
94
|
+
"spiffy-tw-fill-transparent",
|
|
95
|
+
"spiffy-tw-stroke-[--spiffy-colors-text-primary]",
|
|
96
|
+
BORDER_CLASS
|
|
97
|
+
]],
|
|
98
|
+
["secondaryDark", [
|
|
99
|
+
...SECONDARY_DARK_BACKGROUND_CLASSES,
|
|
100
|
+
...TEXT_LINK_CLASSES,
|
|
101
|
+
BORDER_CLASS
|
|
102
|
+
]],
|
|
103
|
+
["secondaryAccent", [
|
|
104
|
+
...SECONDARY_DARK_BACKGROUND_CLASSES,
|
|
105
|
+
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
106
|
+
...ACCENT_PRIMARY_CLASSES,
|
|
107
|
+
BORDER_CLASS
|
|
108
|
+
]],
|
|
109
|
+
["lightDark", [
|
|
110
|
+
"spiffy-tw-bg-[--spiffy-colors-background-light]",
|
|
111
|
+
"spiffy-tw-border-[--spiffy-colors-background-dark]",
|
|
112
|
+
...TEXT_PRIMARY_CLASSES,
|
|
113
|
+
BORDER_CLASS
|
|
114
|
+
]]
|
|
115
|
+
]);
|
|
116
|
+
const Icon = ({ isAnswer, variant }) => {
|
|
117
|
+
if (isAnswer) return void 0;
|
|
118
|
+
if (variant === "transparentDark") return /* @__PURE__ */ jsx(OutlinedStar, {});
|
|
119
|
+
return /* @__PURE__ */ jsx(FourPointStar, {});
|
|
120
|
+
};
|
|
121
|
+
const borderedVariants = [
|
|
122
|
+
"outlined",
|
|
123
|
+
"outlinedLight",
|
|
124
|
+
"primary",
|
|
125
|
+
"secondary",
|
|
126
|
+
"tertiary",
|
|
127
|
+
"dark",
|
|
128
|
+
"darkAccent",
|
|
129
|
+
"darkAccentContrast",
|
|
130
|
+
"darkPrimary",
|
|
131
|
+
"transparent",
|
|
132
|
+
"transparentDark",
|
|
133
|
+
"secondaryDark",
|
|
134
|
+
"secondaryAccent",
|
|
135
|
+
"lightDark"
|
|
136
|
+
];
|
|
137
|
+
const hoverTransform = (variantClass) => variantClass?.map((className) => `hover:${className}`);
|
|
138
|
+
const SuggestionButton = ({ variant, hoverVariant, isDisabled, content, boldText, borderRadius = "lg", isAnswer = false, dataAttributes, dataTestId, onClick }) => {
|
|
139
|
+
const buttonClassName = classNames({
|
|
140
|
+
[SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS]: !isAnswer,
|
|
141
|
+
[SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS]: isAnswer,
|
|
142
|
+
"!spiffy-tw-rounded-[20px]": borderRadius === "lg",
|
|
143
|
+
"!spiffy-tw-rounded-[8px]": borderRadius === "md",
|
|
144
|
+
"!spiffy-tw-rounded-[0px]": borderRadius === "sm",
|
|
145
|
+
"spiffy-tw-border-[1px]": borderedVariants.includes(variant),
|
|
146
|
+
"spiffy-tw-border-solid": borderedVariants.includes(variant)
|
|
147
|
+
});
|
|
148
|
+
const textClassName = classNames({
|
|
149
|
+
"spiffy-tw-text-[14px]": true,
|
|
150
|
+
"spiffy-tw-leading-[100%]": true,
|
|
151
|
+
"!spiffy-tw-font-bold": boldText
|
|
152
|
+
});
|
|
153
|
+
const iconClass = classNames({
|
|
154
|
+
"spiffy-tw-w-[11px]": true,
|
|
155
|
+
"spiffy-tw-h-[11px]": true,
|
|
156
|
+
"spiffy-tw-stroke-inherit": true,
|
|
157
|
+
"spiffy-tw-fill-inherit": true
|
|
158
|
+
});
|
|
159
|
+
const baseClasses = variantClassMap.get(variant) ?? [];
|
|
160
|
+
const hoverClasses = variantClassMap.get(hoverVariant) ?? [];
|
|
161
|
+
const baseBorderClasses = baseClasses.filter((cls) => cls.includes("border"));
|
|
162
|
+
const baseNonBorderClasses = baseClasses.filter((cls) => !cls.includes("border"));
|
|
163
|
+
const hoverBorderClasses = hoverClasses.filter((cls) => cls.includes("border"));
|
|
164
|
+
const hoverNonBorderClasses = hoverClasses.filter((cls) => !cls.includes("border"));
|
|
165
|
+
const buttonClass = `${buttonClassName} ${[
|
|
166
|
+
...baseNonBorderClasses,
|
|
167
|
+
...hoverTransform(hoverNonBorderClasses),
|
|
168
|
+
...baseBorderClasses,
|
|
169
|
+
...hoverTransform(hoverBorderClasses)
|
|
170
|
+
].join(" ")}`;
|
|
171
|
+
return /* @__PURE__ */ jsx(ButtonBase, {
|
|
172
|
+
text: content,
|
|
173
|
+
dataAttributes,
|
|
174
|
+
dataTestId,
|
|
175
|
+
isDisabled,
|
|
176
|
+
icon: /* @__PURE__ */ jsx(Icon, {
|
|
177
|
+
isAnswer,
|
|
178
|
+
variant
|
|
179
|
+
}),
|
|
180
|
+
iconClass: isAnswer ? void 0 : iconClass,
|
|
181
|
+
textClass: `${SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS} ${textClassName}`,
|
|
182
|
+
buttonClass,
|
|
183
|
+
onClick
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
//#endregion
|
|
188
|
+
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton };
|
|
@@ -1,193 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
require('../../Typography-Csg-nd_w.cjs');
|
|
3
|
-
const require_ButtonBase = require('../../ButtonBase-Bm_QOyM1.cjs');
|
|
4
|
-
let classnames = require("classnames");
|
|
5
|
-
classnames = require_chunk.__toESM(classnames);
|
|
6
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
let __envive_ai_react_icons_OutlinedStar = require("@envive-ai/react-icons/OutlinedStar");
|
|
8
|
-
__envive_ai_react_icons_OutlinedStar = require_chunk.__toESM(__envive_ai_react_icons_OutlinedStar);
|
|
9
|
-
let __envive_ai_react_icons_FourPointStar = require("@envive-ai/react-icons/FourPointStar");
|
|
10
|
-
__envive_ai_react_icons_FourPointStar = require_chunk.__toESM(__envive_ai_react_icons_FourPointStar);
|
|
1
|
+
const require_SuggestionButton = require('./SuggestionButton.cjs');
|
|
11
2
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const BORDER_CLASS = "spiffy-tw-border";
|
|
17
|
-
const TEXT_LINK_CLASSES = [
|
|
18
|
-
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
19
|
-
"spiffy-tw-fill-[--spiffy-colors-text-link]",
|
|
20
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-link]"
|
|
21
|
-
];
|
|
22
|
-
const TEXT_LIGHT_CLASSES = [
|
|
23
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
24
|
-
"spiffy-tw-fill-[--spiffy-colors-text-light]",
|
|
25
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-light]"
|
|
26
|
-
];
|
|
27
|
-
const TEXT_PRIMARY_CLASSES = [
|
|
28
|
-
"spiffy-tw-text-[--spiffy-colors-text-primary]",
|
|
29
|
-
"spiffy-tw-fill-[--spiffy-colors-text-primary]",
|
|
30
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-primary]"
|
|
31
|
-
];
|
|
32
|
-
const ACCENT_PRIMARY_CLASSES = ["spiffy-tw-fill-[--spiffy-colors-accent-primary]", "spiffy-tw-stroke-[--spiffy-colors-accent-primary]"];
|
|
33
|
-
const DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-dark]", "spiffy-tw-border-[--spiffy-colors-background-dark]"];
|
|
34
|
-
const SECONDARY_DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]", "spiffy-tw-border-[--spiffy-colors-background-secondary-dark]"];
|
|
35
|
-
const variantClassMap = new Map([
|
|
36
|
-
["outlined", ["spiffy-tw-border-[--spiffy-colors-border-outline]", ...TEXT_LINK_CLASSES]],
|
|
37
|
-
["outlinedLight", [
|
|
38
|
-
"spiffy-tw-border-[--spiffy-colors-border-outline]",
|
|
39
|
-
"spiffy-tw-bg-[--spiffy-colors-background-light]",
|
|
40
|
-
...TEXT_LINK_CLASSES,
|
|
41
|
-
BORDER_CLASS
|
|
42
|
-
]],
|
|
43
|
-
["primary", [
|
|
44
|
-
"spiffy-tw-bg-[--spiffy-colors-background-primary]",
|
|
45
|
-
"spiffy-tw-border-[--spiffy-colors-background-primary]",
|
|
46
|
-
...TEXT_LIGHT_CLASSES,
|
|
47
|
-
BORDER_CLASS
|
|
48
|
-
]],
|
|
49
|
-
["secondary", [
|
|
50
|
-
"spiffy-tw-bg-[--spiffy-colors-background-secondary]",
|
|
51
|
-
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
52
|
-
"spiffy-tw-border-[--spiffy-colors-background-secondary]",
|
|
53
|
-
...ACCENT_PRIMARY_CLASSES,
|
|
54
|
-
BORDER_CLASS
|
|
55
|
-
]],
|
|
56
|
-
["tertiary", [
|
|
57
|
-
"spiffy-tw-bg-[--spiffy-colors-background-tertiary]",
|
|
58
|
-
"spiffy-tw-border-[--spiffy-colors-background-tertiary]",
|
|
59
|
-
...TEXT_LINK_CLASSES,
|
|
60
|
-
BORDER_CLASS
|
|
61
|
-
]],
|
|
62
|
-
["dark", [
|
|
63
|
-
...DARK_BACKGROUND_CLASSES,
|
|
64
|
-
...TEXT_LIGHT_CLASSES,
|
|
65
|
-
BORDER_CLASS
|
|
66
|
-
]],
|
|
67
|
-
["darkPrimary", [
|
|
68
|
-
...DARK_BACKGROUND_CLASSES,
|
|
69
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
70
|
-
...ACCENT_PRIMARY_CLASSES,
|
|
71
|
-
BORDER_CLASS
|
|
72
|
-
]],
|
|
73
|
-
["darkAccent", [
|
|
74
|
-
...DARK_BACKGROUND_CLASSES,
|
|
75
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
76
|
-
"spiffy-tw-fill-[--spiffy-colors-text-accent]",
|
|
77
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-accent]",
|
|
78
|
-
BORDER_CLASS
|
|
79
|
-
]],
|
|
80
|
-
["darkAccentContrast", [
|
|
81
|
-
...DARK_BACKGROUND_CLASSES,
|
|
82
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
83
|
-
"spiffy-tw-fill-[--spiffy-colors-accent-primary]",
|
|
84
|
-
"spiffy-tw-stroke-[--spiffy-colors-accent-primary]",
|
|
85
|
-
BORDER_CLASS
|
|
86
|
-
]],
|
|
87
|
-
["transparent", [
|
|
88
|
-
"spiffy-tw-bg-transparent",
|
|
89
|
-
"spiffy-tw-border-[--spiffy-colors-background-light]",
|
|
90
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
91
|
-
"spiffy-tw-fill-transparent",
|
|
92
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-light]",
|
|
93
|
-
BORDER_CLASS
|
|
94
|
-
]],
|
|
95
|
-
["transparentDark", [
|
|
96
|
-
"spiffy-tw-bg-transparent",
|
|
97
|
-
"spiffy-tw-border-[--spiffy-colors-border-light]",
|
|
98
|
-
"spiffy-tw-text-[--spiffy-colors-text-primary]",
|
|
99
|
-
"spiffy-tw-fill-transparent",
|
|
100
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-primary]",
|
|
101
|
-
BORDER_CLASS
|
|
102
|
-
]],
|
|
103
|
-
["secondaryDark", [
|
|
104
|
-
...SECONDARY_DARK_BACKGROUND_CLASSES,
|
|
105
|
-
...TEXT_LINK_CLASSES,
|
|
106
|
-
BORDER_CLASS
|
|
107
|
-
]],
|
|
108
|
-
["secondaryAccent", [
|
|
109
|
-
...SECONDARY_DARK_BACKGROUND_CLASSES,
|
|
110
|
-
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
111
|
-
...ACCENT_PRIMARY_CLASSES,
|
|
112
|
-
BORDER_CLASS
|
|
113
|
-
]],
|
|
114
|
-
["lightDark", [
|
|
115
|
-
"spiffy-tw-bg-[--spiffy-colors-background-light]",
|
|
116
|
-
"spiffy-tw-border-[--spiffy-colors-background-dark]",
|
|
117
|
-
...TEXT_PRIMARY_CLASSES,
|
|
118
|
-
BORDER_CLASS
|
|
119
|
-
]]
|
|
120
|
-
]);
|
|
121
|
-
const borderedVariants = [
|
|
122
|
-
"outlined",
|
|
123
|
-
"outlinedLight",
|
|
124
|
-
"primary",
|
|
125
|
-
"secondary",
|
|
126
|
-
"tertiary",
|
|
127
|
-
"dark",
|
|
128
|
-
"darkAccent",
|
|
129
|
-
"darkAccentContrast",
|
|
130
|
-
"darkPrimary",
|
|
131
|
-
"transparent",
|
|
132
|
-
"transparentDark",
|
|
133
|
-
"secondaryDark",
|
|
134
|
-
"secondaryAccent",
|
|
135
|
-
"lightDark"
|
|
136
|
-
];
|
|
137
|
-
const hoverTransform = (variantClass) => variantClass?.map((className) => `hover:${className}`);
|
|
138
|
-
const SuggestionButton = ({ variant, hoverVariant, isDisabled, content, boldText, borderRadius = "lg", isAnswer = false, dataAttributes, dataTestId, onClick }) => {
|
|
139
|
-
const buttonClassName = (0, classnames.default)({
|
|
140
|
-
[SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS]: !isAnswer,
|
|
141
|
-
[SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS]: isAnswer,
|
|
142
|
-
"!spiffy-tw-rounded-[20px]": borderRadius === "lg",
|
|
143
|
-
"!spiffy-tw-rounded-[8px]": borderRadius === "md",
|
|
144
|
-
"!spiffy-tw-rounded-[0px]": borderRadius === "sm",
|
|
145
|
-
"spiffy-tw-border-[1px]": borderedVariants.includes(variant),
|
|
146
|
-
"spiffy-tw-border-solid": borderedVariants.includes(variant)
|
|
147
|
-
});
|
|
148
|
-
const textClassName = (0, classnames.default)({
|
|
149
|
-
"spiffy-tw-text-[14px]": true,
|
|
150
|
-
"spiffy-tw-leading-[100%]": true,
|
|
151
|
-
"!spiffy-tw-font-bold": boldText
|
|
152
|
-
});
|
|
153
|
-
const iconClass = (0, classnames.default)({
|
|
154
|
-
"spiffy-tw-w-[11px]": true,
|
|
155
|
-
"spiffy-tw-h-[11px]": true,
|
|
156
|
-
"spiffy-tw-stroke-inherit": true,
|
|
157
|
-
"spiffy-tw-fill-inherit": true
|
|
158
|
-
});
|
|
159
|
-
const baseClasses = variantClassMap.get(variant) ?? [];
|
|
160
|
-
const hoverClasses = variantClassMap.get(hoverVariant) ?? [];
|
|
161
|
-
const baseBorderClasses = baseClasses.filter((cls) => cls.includes("border"));
|
|
162
|
-
const baseNonBorderClasses = baseClasses.filter((cls) => !cls.includes("border"));
|
|
163
|
-
const hoverBorderClasses = hoverClasses.filter((cls) => cls.includes("border"));
|
|
164
|
-
const hoverNonBorderClasses = hoverClasses.filter((cls) => !cls.includes("border"));
|
|
165
|
-
const buttonClass = `${buttonClassName} ${[
|
|
166
|
-
...baseNonBorderClasses,
|
|
167
|
-
...hoverTransform(hoverNonBorderClasses),
|
|
168
|
-
...baseBorderClasses,
|
|
169
|
-
...hoverTransform(hoverBorderClasses)
|
|
170
|
-
].join(" ")}`;
|
|
171
|
-
const getIcon = () => {
|
|
172
|
-
if (isAnswer) return void 0;
|
|
173
|
-
if (variant === "transparentDark") return __envive_ai_react_icons_OutlinedStar.default;
|
|
174
|
-
return __envive_ai_react_icons_FourPointStar.default;
|
|
175
|
-
};
|
|
176
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ButtonBase.ButtonBase, {
|
|
177
|
-
text: content,
|
|
178
|
-
dataAttributes,
|
|
179
|
-
dataTestId,
|
|
180
|
-
isDisabled,
|
|
181
|
-
icon: getIcon(),
|
|
182
|
-
iconClass: isAnswer ? void 0 : iconClass,
|
|
183
|
-
textClass: `${SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS} ${textClassName}`,
|
|
184
|
-
buttonClass,
|
|
185
|
-
onClick
|
|
186
|
-
});
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
//#endregion
|
|
190
|
-
exports.SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS;
|
|
191
|
-
exports.SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS;
|
|
192
|
-
exports.SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS;
|
|
193
|
-
exports.SuggestionButton = SuggestionButton;
|
|
3
|
+
exports.SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = require_SuggestionButton.SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS;
|
|
4
|
+
exports.SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = require_SuggestionButton.SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS;
|
|
5
|
+
exports.SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = require_SuggestionButton.SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS;
|
|
6
|
+
exports.SuggestionButton = require_SuggestionButton.SuggestionButton;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SuggestionButtonVariant } from "./types.cjs";
|
|
2
|
+
import { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton } from "./SuggestionButton.cjs";
|
|
3
|
+
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton, SuggestionButtonVariant };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SuggestionButtonVariant } from "./types.js";
|
|
2
|
+
import { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton } from "./SuggestionButton.js";
|
|
3
|
+
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton, SuggestionButtonVariant };
|