@envive-ai/react-toolkit 0.1.0 → 0.1.2
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/LICENSE +2 -0
- package/dist/AppliedFiltersScrollbar-BlcyhZkZ.cjs +53 -0
- package/dist/AppliedFiltersScrollbar-DFGzRemu.js +44 -0
- package/dist/ButtonBase-C1rsL9gO.js +60 -0
- package/dist/ButtonBase-a8uj6c2f.cjs +69 -0
- package/dist/DynamicFiltersScrollbar-B2Rr1KnJ.cjs +41 -0
- package/dist/DynamicFiltersScrollbar-Dys6geP0.js +32 -0
- package/dist/Headline-L7w3BsBF.cjs +72 -0
- package/dist/Headline-ro_Nigw5.js +64 -0
- package/dist/ImageWithFallback-CfmkC58B.js +42 -0
- package/dist/ImageWithFallback-P3AjyL2Y.cjs +51 -0
- package/dist/ProductCard-Btg8tHGc.js +172 -0
- package/dist/ProductCard-CS6DZAwO.cjs +193 -0
- package/dist/ProductCardSkeleton-BPfp6IOp.js +38 -0
- package/dist/ProductCardSkeleton-BgvDlaty.cjs +46 -0
- package/dist/ProductGrid-B7QZfW-v.cjs +77 -0
- package/dist/ProductGrid-DB_Uq5F-.js +69 -0
- package/dist/SearchAutocomplete-C5FL82xC.js +51 -0
- package/dist/SearchAutocomplete-wr18dJ8L.cjs +62 -0
- package/dist/SearchFilter-D-2IdBKS.js +62 -0
- package/dist/SearchFilter-D0IzBlG5.cjs +70 -0
- package/dist/SearchFilterHeader-BQT0-ssS.js +37 -0
- package/dist/SearchFilterHeader-C3EklfoO.cjs +45 -0
- package/dist/SearchFilterItem-BodtWLoP.js +26 -0
- package/dist/SearchFilterItem-DmMkiqNC.cjs +34 -0
- package/dist/SearchInput-BrcAgcvI.js +89 -0
- package/dist/SearchInput-DSB9CwIq.cjs +106 -0
- package/dist/SparkleAnimation-BpLwrEqM.cjs +96 -0
- package/dist/SparkleAnimation-CXs58sFd.js +85 -0
- package/dist/Spinner-BZ-kTOpm.js +38 -0
- package/dist/Spinner-CfQ85Ajl.cjs +46 -0
- package/dist/Text-Bdv7F5-u.js +42 -0
- package/dist/Text-C04c4Z93.cjs +50 -0
- package/dist/TextInput-BO80ixsV.cjs +40 -0
- package/dist/TextInput-CEGWfdPC.js +31 -0
- package/dist/chunk-CUT6urMc.cjs +30 -0
- package/dist/colorsConfig-TCONYTQ7.cjs +38 -0
- package/dist/colorsConfig-l0ODUVhu.js +26 -0
- package/dist/common/ButtonBase/ButtonBase.cjs +5 -0
- package/dist/common/ButtonBase/ButtonBase.d.cts +35 -0
- package/dist/common/ButtonBase/ButtonBase.d.ts +35 -0
- package/dist/common/ButtonBase/ButtonBase.js +5 -0
- package/dist/common/Headline/Headline.cjs +4 -0
- package/dist/common/Headline/Headline.d.cts +21 -0
- package/dist/common/Headline/Headline.d.ts +21 -0
- package/dist/common/Headline/Headline.js +4 -0
- package/dist/common/ImageWithFallback/ImageWithFallback.cjs +3 -0
- package/dist/common/ImageWithFallback/ImageWithFallback.d.cts +26 -0
- package/dist/common/ImageWithFallback/ImageWithFallback.d.ts +26 -0
- package/dist/common/ImageWithFallback/ImageWithFallback.js +3 -0
- package/dist/common/ProductCard/ProductCard.cjs +11 -0
- package/dist/common/ProductCard/ProductCard.d.cts +91 -0
- package/dist/common/ProductCard/ProductCard.d.ts +91 -0
- package/dist/common/ProductCard/ProductCard.js +9 -0
- package/dist/common/ProductCard/ProductCardSkeleton.cjs +4 -0
- package/dist/common/ProductCard/ProductCardSkeleton.d.cts +12 -0
- package/dist/common/ProductCard/ProductCardSkeleton.d.ts +12 -0
- package/dist/common/ProductCard/ProductCardSkeleton.js +4 -0
- package/dist/common/ProductGrid/ProductGrid.cjs +11 -0
- package/dist/common/ProductGrid/ProductGrid.d.cts +26 -0
- package/dist/common/ProductGrid/ProductGrid.d.ts +26 -0
- package/dist/common/ProductGrid/ProductGrid.js +11 -0
- package/dist/common/SparkleAnimation/SparkleAnimation.cjs +3 -0
- package/dist/common/SparkleAnimation/SparkleAnimation.d.cts +15 -0
- package/dist/common/SparkleAnimation/SparkleAnimation.d.ts +15 -0
- package/dist/common/SparkleAnimation/SparkleAnimation.js +3 -0
- package/dist/common/Spinner/Spinner.cjs +3 -0
- package/dist/common/Spinner/Spinner.d.cts +11 -0
- package/dist/common/Spinner/Spinner.d.ts +11 -0
- package/dist/common/Spinner/Spinner.js +3 -0
- package/dist/common/SuggestionButton/SuggestionButton.cjs +188 -0
- package/dist/common/SuggestionButton/SuggestionButton.d.cts +35 -0
- package/dist/common/SuggestionButton/SuggestionButton.d.ts +35 -0
- package/dist/common/SuggestionButton/SuggestionButton.js +180 -0
- package/dist/common/Text/Text.cjs +4 -0
- package/dist/common/Text/Text.d.cts +28 -0
- package/dist/common/Text/Text.d.ts +28 -0
- package/dist/common/Text/Text.js +4 -0
- package/dist/common/TextInput/TextInput.cjs +4 -0
- package/dist/common/TextInput/TextInput.d.cts +98 -0
- package/dist/common/TextInput/TextInput.d.ts +98 -0
- package/dist/common/TextInput/TextInput.js +4 -0
- package/dist/productCardVariants-C_QIZ-KF.js +45 -0
- package/dist/productCardVariants-Dd-wrJKP.cjs +69 -0
- package/dist/productGridVariants-CxCKx5Fq.js +20 -0
- package/dist/productGridVariants-DVzvjK9i.cjs +26 -0
- package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.cjs +5 -0
- package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.d.cts +22 -0
- package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +22 -0
- package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.js +5 -0
- package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.cjs +5 -0
- package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.d.cts +28 -0
- package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +28 -0
- package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.js +5 -0
- package/dist/search/SearchFilter/SearchFilter.cjs +7 -0
- package/dist/search/SearchFilter/SearchFilter.d.cts +18 -0
- package/dist/search/SearchFilter/SearchFilter.d.ts +18 -0
- package/dist/search/SearchFilter/SearchFilter.js +7 -0
- package/dist/search/SearchFilter/SearchFilterHeader.cjs +5 -0
- package/dist/search/SearchFilter/SearchFilterHeader.d.cts +12 -0
- package/dist/search/SearchFilter/SearchFilterHeader.d.ts +12 -0
- package/dist/search/SearchFilter/SearchFilterHeader.js +5 -0
- package/dist/search/SearchFilter/SearchFilterItem.cjs +5 -0
- package/dist/search/SearchFilter/SearchFilterItem.d.cts +13 -0
- package/dist/search/SearchFilter/SearchFilterItem.d.ts +13 -0
- package/dist/search/SearchFilter/SearchFilterItem.js +5 -0
- package/dist/search/SearchInput/SearchInput.cjs +6 -0
- package/dist/search/SearchInput/SearchInput.d.cts +20 -0
- package/dist/search/SearchInput/SearchInput.d.ts +20 -0
- package/dist/search/SearchInput/SearchInput.js +6 -0
- package/dist/search/SearchInputAutocomplete/SearchAutocomplete.cjs +3 -0
- package/dist/search/SearchInputAutocomplete/SearchAutocomplete.d.cts +13 -0
- package/dist/search/SearchInputAutocomplete/SearchAutocomplete.d.ts +13 -0
- package/dist/search/SearchInputAutocomplete/SearchAutocomplete.js +3 -0
- package/dist/search/SearchInputForm/SearchInputForm.cjs +38 -0
- package/dist/search/SearchInputForm/SearchInputForm.d.cts +32 -0
- package/dist/search/SearchInputForm/SearchInputForm.d.ts +32 -0
- package/dist/search/SearchInputForm/SearchInputForm.js +36 -0
- package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.cjs +52 -0
- package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.d.cts +28 -0
- package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +28 -0
- package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.js +49 -0
- package/dist/search/SearchResultsStates/NoSearchResultsFound.cjs +30 -0
- package/dist/search/SearchResultsStates/NoSearchResultsFound.d.cts +17 -0
- package/dist/search/SearchResultsStates/NoSearchResultsFound.d.ts +17 -0
- package/dist/search/SearchResultsStates/NoSearchResultsFound.js +26 -0
- package/dist/search/SearchResultsStates/SearchResultsGrid.cjs +66 -0
- package/dist/search/SearchResultsStates/SearchResultsGrid.d.cts +41 -0
- package/dist/search/SearchResultsStates/SearchResultsGrid.d.ts +41 -0
- package/dist/search/SearchResultsStates/SearchResultsGrid.js +62 -0
- package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.cjs +52 -0
- package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.d.cts +15 -0
- package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +15 -0
- package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.js +49 -0
- package/dist/searchFilterSidebarVariants-GfFbQzGf.cjs +39 -0
- package/dist/searchFilterSidebarVariants-lJVVZT_2.js +34 -0
- package/dist/textVariantClasses-5t3OricK.js +101 -0
- package/dist/textVariantClasses-Bhf4VY5z.cjs +125 -0
- package/dist/types-53zIialA.d.ts +35 -0
- package/dist/types-B4BGZSlV.d.cts +4 -0
- package/dist/types-BQNqA5xL.d.ts +46 -0
- package/dist/types-BRLWwGMI.d.ts +4 -0
- package/dist/types-CImLkcNh.d.cts +46 -0
- package/dist/types-Cph97xkm.d.ts +6 -0
- package/dist/types-CpiJO5UH.d.ts +4 -0
- package/dist/types-DFetqNL2.d.ts +8 -0
- package/dist/types-DaSkJnT_.d.cts +8 -0
- package/dist/types-Dy4_w6Cf.d.cts +4 -0
- package/dist/types-TYhhwWZw.d.cts +6 -0
- package/dist/types-aa4flfRE.d.cts +35 -0
- package/package.json +8 -5
- package/src/atoms/search/types.ts +5 -0
- package/src/components/common/ButtonBase/ButtonBase.tsx +70 -0
- package/src/components/common/ButtonBase/types.ts +26 -0
- package/src/components/common/Headline/Headline.tsx +81 -0
- package/src/components/common/ImageWithFallback/ImageWithFallback.tsx +66 -0
- package/src/components/common/ProductCard/ProductCard.tsx +305 -0
- package/src/components/common/ProductCard/ProductCardSkeleton.tsx +83 -0
- package/src/components/common/ProductCard/productCardVariants.ts +63 -0
- package/src/components/common/ProductCard/types.ts +49 -0
- package/src/components/common/ProductGrid/ProductGrid.tsx +73 -0
- package/src/components/common/ProductGrid/productGridVariants.ts +31 -0
- package/src/components/common/SparkleAnimation/SparkleAnimation.tsx +105 -0
- package/src/components/common/SparkleAnimation/types.ts +6 -0
- package/src/components/common/Spinner/Spinner.tsx +30 -0
- package/src/components/common/SuggestionButton/SuggestionButton.tsx +258 -0
- package/src/components/common/SuggestionButton/types.ts +14 -0
- package/src/components/common/Text/Text.tsx +58 -0
- package/src/components/common/Text/textVariantClasses.ts +106 -0
- package/src/components/common/Text/types.ts +23 -0
- package/src/components/common/TextInput/TextInput.tsx +34 -0
- package/src/components/models/colorsConfig.ts +28 -0
- package/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.tsx +70 -0
- package/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.tsx +52 -0
- package/src/components/search/SearchFilter/SearchFilter.tsx +84 -0
- package/src/components/search/SearchFilter/SearchFilterHeader.tsx +42 -0
- package/src/components/search/SearchFilter/SearchFilterItem.tsx +42 -0
- package/src/components/search/SearchFilter/types.ts +48 -0
- package/src/components/search/SearchInput/SearchInput.tsx +135 -0
- package/src/components/search/SearchInput/searchInputVariants.ts +27 -0
- package/src/components/search/SearchInputAutocomplete/SearchAutocomplete.tsx +62 -0
- package/src/components/search/SearchInputForm/SearchInputForm.tsx +66 -0
- package/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.tsx +82 -0
- package/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +45 -0
- package/{dist/packages/components/src/components/search/SearchResultsFilterSidebar/types.d.ts → src/components/search/SearchResultsFilterSidebar/types.ts} +1 -1
- package/src/components/search/SearchResultsStates/NoSearchResultsFound.tsx +41 -0
- package/src/components/search/SearchResultsStates/SearchResultsGrid.tsx +105 -0
- package/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.tsx +50 -0
- package/src/components/search/types.ts +5 -0
- package/{dist/packages/components/src/components/test/types.d.ts → src/components/test/types.ts} +1 -1
- package/src/config/chatElementDisplayLocation.ts +22 -0
- package/src/logging/logger.ts +21 -0
- package/src/types/external.ts +24 -0
- package/{dist/packages/components/src/util/camelCase.d.ts → src/util/camelCase.ts} +33 -11
- package/src/util/camelCasedPropertiesDeep.ts +81 -0
- package/src/util/formatPrice.ts +14 -0
- package/src/util/internal.ts +95 -0
- package/{dist/src/util/primitive.d.ts → src/util/primitive.ts} +2 -0
- package/src/util/splitWords.ts +72 -0
- package/{dist/src/util/trim.d.ts → src/util/trim.ts} +5 -1
- package/dist/packages/components/src/atoms/search/types.d.ts +0 -5
- package/dist/packages/components/src/atoms/search/types.js +0 -1
- package/dist/packages/components/src/components/common/ButtonBase/ButtonBase.d.ts +0 -2
- package/dist/packages/components/src/components/common/ButtonBase/ButtonBase.js +0 -41
- package/dist/packages/components/src/components/common/ButtonBase/types.d.ts +0 -24
- package/dist/packages/components/src/components/common/ButtonBase/types.js +0 -6
- package/dist/packages/components/src/components/common/Headline/Headline.d.ts +0 -10
- package/dist/packages/components/src/components/common/Headline/Headline.js +0 -34
- package/dist/packages/components/src/components/common/ImageWithFallback/ImageWithFallback.d.ts +0 -12
- package/dist/packages/components/src/components/common/ImageWithFallback/ImageWithFallback.js +0 -26
- package/dist/packages/components/src/components/common/ProductCard/ProductCard.d.ts +0 -39
- package/dist/packages/components/src/components/common/ProductCard/ProductCard.js +0 -83
- package/dist/packages/components/src/components/common/ProductCard/ProductCardSkeleton.d.ts +0 -9
- package/dist/packages/components/src/components/common/ProductCard/ProductCardSkeleton.js +0 -15
- package/dist/packages/components/src/components/common/ProductCard/productCardVariants.d.ts +0 -8
- package/dist/packages/components/src/components/common/ProductCard/productCardVariants.js +0 -50
- package/dist/packages/components/src/components/common/ProductCard/types.d.ts +0 -39
- package/dist/packages/components/src/components/common/ProductCard/types.js +0 -10
- package/dist/packages/components/src/components/common/ProductGrid/ProductGrid.d.ts +0 -14
- package/dist/packages/components/src/components/common/ProductGrid/ProductGrid.js +0 -13
- package/dist/packages/components/src/components/common/ProductGrid/productGridVariants.d.ts +0 -10
- package/dist/packages/components/src/components/common/ProductGrid/productGridVariants.js +0 -16
- package/dist/packages/components/src/components/common/SparkleAnimation/SparkleAnimation.d.ts +0 -7
- package/dist/packages/components/src/components/common/SparkleAnimation/SparkleAnimation.js +0 -40
- package/dist/packages/components/src/components/common/SparkleAnimation/types.d.ts +0 -6
- package/dist/packages/components/src/components/common/SparkleAnimation/types.js +0 -7
- package/dist/packages/components/src/components/common/Spinner/Spinner.d.ts +0 -5
- package/dist/packages/components/src/components/common/Spinner/Spinner.js +0 -16
- package/dist/packages/components/src/components/common/SuggestionButton/SuggestionButton.d.ts +0 -18
- package/dist/packages/components/src/components/common/SuggestionButton/SuggestionButton.js +0 -210
- package/dist/packages/components/src/components/common/SuggestionButton/types.d.ts +0 -1
- package/dist/packages/components/src/components/common/SuggestionButton/types.js +0 -1
- package/dist/packages/components/src/components/common/Text/Text.d.ts +0 -12
- package/dist/packages/components/src/components/common/Text/Text.js +0 -26
- package/dist/packages/components/src/components/common/Text/textVariantClasses.d.ts +0 -171
- package/dist/packages/components/src/components/common/Text/textVariantClasses.js +0 -103
- package/dist/packages/components/src/components/common/Text/types.d.ts +0 -16
- package/dist/packages/components/src/components/common/Text/types.js +0 -6
- package/dist/packages/components/src/components/common/TextInput/TextInput.d.ts +0 -8
- package/dist/packages/components/src/components/common/TextInput/TextInput.js +0 -25
- package/dist/packages/components/src/components/models/colorsConfig.d.ts +0 -26
- package/dist/packages/components/src/components/models/colorsConfig.js +0 -23
- package/dist/packages/components/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +0 -11
- package/dist/packages/components/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.js +0 -18
- package/dist/packages/components/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +0 -15
- package/dist/packages/components/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.js +0 -15
- package/dist/packages/components/src/components/search/SearchFilter/SearchFilter.d.ts +0 -2
- package/dist/packages/components/src/components/search/SearchFilter/SearchFilter.js +0 -24
- package/dist/packages/components/src/components/search/SearchFilter/SearchFilterHeader.d.ts +0 -2
- package/dist/packages/components/src/components/search/SearchFilter/SearchFilterHeader.js +0 -9
- package/dist/packages/components/src/components/search/SearchFilter/SearchFilterItem.d.ts +0 -2
- package/dist/packages/components/src/components/search/SearchFilter/SearchFilterItem.js +0 -13
- package/dist/packages/components/src/components/search/SearchFilter/types.d.ts +0 -42
- package/dist/packages/components/src/components/search/SearchFilter/types.js +0 -1
- package/dist/packages/components/src/components/search/SearchInput/SearchInput.d.ts +0 -16
- package/dist/packages/components/src/components/search/SearchInput/SearchInput.js +0 -38
- package/dist/packages/components/src/components/search/SearchInput/searchInputVariants.d.ts +0 -13
- package/dist/packages/components/src/components/search/SearchInput/searchInputVariants.js +0 -12
- package/dist/packages/components/src/components/search/SearchInputAutocomplete/SearchAutocomplete.d.ts +0 -10
- package/dist/packages/components/src/components/search/SearchInputAutocomplete/SearchAutocomplete.js +0 -14
- package/dist/packages/components/src/components/search/SearchInputForm/SearchInputForm.d.ts +0 -16
- package/dist/packages/components/src/components/search/SearchInputForm/SearchInputForm.js +0 -13
- package/dist/packages/components/src/components/search/SearchInputForm/types.js +0 -1
- package/dist/packages/components/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +0 -14
- package/dist/packages/components/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.js +0 -15
- package/dist/packages/components/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts +0 -16
- package/dist/packages/components/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.js +0 -29
- package/dist/packages/components/src/components/search/SearchResultsFilterSidebar/types.js +0 -1
- package/dist/packages/components/src/components/search/SearchResultsStates/NoSearchResultsFound.d.ts +0 -8
- package/dist/packages/components/src/components/search/SearchResultsStates/NoSearchResultsFound.js +0 -10
- package/dist/packages/components/src/components/search/SearchResultsStates/SearchResultsGrid.d.ts +0 -24
- package/dist/packages/components/src/components/search/SearchResultsStates/SearchResultsGrid.js +0 -19
- package/dist/packages/components/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +0 -6
- package/dist/packages/components/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.js +0 -10
- package/dist/packages/components/src/components/search/types.d.ts +0 -5
- package/dist/packages/components/src/components/search/types.js +0 -6
- package/dist/packages/components/src/components/test/types.js +0 -1
- package/dist/packages/components/src/config/chatElementDisplayLocation.d.ts +0 -21
- package/dist/packages/components/src/config/chatElementDisplayLocation.js +0 -23
- package/dist/packages/components/src/index.d.ts +0 -45
- package/dist/packages/components/src/index.js +0 -49
- package/dist/packages/components/src/logging/logger.d.ts +0 -7
- package/dist/packages/components/src/logging/logger.js +0 -16
- package/dist/packages/components/src/types/external.d.ts +0 -21
- package/dist/packages/components/src/types/external.js +0 -5
- package/dist/packages/components/src/util/camelCase.js +0 -2
- package/dist/packages/components/src/util/camelCasedPropertiesDeep.d.ts +0 -53
- package/dist/packages/components/src/util/camelCasedPropertiesDeep.js +0 -1
- package/dist/packages/components/src/util/formatPrice.d.ts +0 -1
- package/dist/packages/components/src/util/formatPrice.js +0 -11
- package/dist/packages/components/src/util/internal.d.ts +0 -27
- package/dist/packages/components/src/util/internal.js +0 -4
- package/dist/packages/components/src/util/primitive.d.ts +0 -6
- package/dist/packages/components/src/util/primitive.js +0 -2
- package/dist/packages/components/src/util/splitWords.d.ts +0 -55
- package/dist/packages/components/src/util/splitWords.js +0 -2
- package/dist/packages/components/src/util/trim.d.ts +0 -24
- package/dist/packages/components/src/util/trim.js +0 -2
- package/dist/packages/components/src/util/unknownArray.js +0 -1
- package/dist/src/atoms/search/types.d.ts +0 -5
- package/dist/src/atoms/search/types.js +0 -1
- package/dist/src/components/common/ButtonBase/ButtonBase.d.ts +0 -2
- package/dist/src/components/common/ButtonBase/ButtonBase.js +0 -41
- package/dist/src/components/common/ButtonBase/types.d.ts +0 -24
- package/dist/src/components/common/ButtonBase/types.js +0 -6
- package/dist/src/components/common/Headline/Headline.d.ts +0 -10
- package/dist/src/components/common/Headline/Headline.js +0 -34
- package/dist/src/components/common/ImageWithFallback/ImageWithFallback.d.ts +0 -12
- package/dist/src/components/common/ImageWithFallback/ImageWithFallback.js +0 -26
- package/dist/src/components/common/ProductCard/ProductCard.d.ts +0 -39
- package/dist/src/components/common/ProductCard/ProductCard.js +0 -84
- package/dist/src/components/common/ProductCard/ProductCardSkeleton.d.ts +0 -9
- package/dist/src/components/common/ProductCard/ProductCardSkeleton.js +0 -15
- package/dist/src/components/common/ProductCard/productCardVariants.d.ts +0 -8
- package/dist/src/components/common/ProductCard/productCardVariants.js +0 -50
- package/dist/src/components/common/ProductCard/types.d.ts +0 -39
- package/dist/src/components/common/ProductCard/types.js +0 -10
- package/dist/src/components/common/ProductGrid/ProductGrid.d.ts +0 -14
- package/dist/src/components/common/ProductGrid/ProductGrid.js +0 -13
- package/dist/src/components/common/ProductGrid/productGridVariants.d.ts +0 -10
- package/dist/src/components/common/ProductGrid/productGridVariants.js +0 -16
- package/dist/src/components/common/SparkleAnimation/SparkleAnimation.d.ts +0 -7
- package/dist/src/components/common/SparkleAnimation/SparkleAnimation.js +0 -40
- package/dist/src/components/common/SparkleAnimation/types.d.ts +0 -6
- package/dist/src/components/common/SparkleAnimation/types.js +0 -7
- package/dist/src/components/common/Spinner/Spinner.d.ts +0 -5
- package/dist/src/components/common/Spinner/Spinner.js +0 -16
- package/dist/src/components/common/SuggestionButton/SuggestionButton.d.ts +0 -18
- package/dist/src/components/common/SuggestionButton/SuggestionButton.js +0 -210
- package/dist/src/components/common/SuggestionButton/types.d.ts +0 -1
- package/dist/src/components/common/SuggestionButton/types.js +0 -1
- package/dist/src/components/common/Text/Text.d.ts +0 -12
- package/dist/src/components/common/Text/Text.js +0 -26
- package/dist/src/components/common/Text/textVariantClasses.d.ts +0 -171
- package/dist/src/components/common/Text/textVariantClasses.js +0 -103
- package/dist/src/components/common/Text/types.d.ts +0 -16
- package/dist/src/components/common/Text/types.js +0 -6
- package/dist/src/components/common/TextInput/TextInput.d.ts +0 -8
- package/dist/src/components/common/TextInput/TextInput.js +0 -25
- package/dist/src/components/models/colorsConfig.d.ts +0 -26
- package/dist/src/components/models/colorsConfig.js +0 -23
- package/dist/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +0 -11
- package/dist/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.js +0 -18
- package/dist/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +0 -15
- package/dist/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.js +0 -15
- package/dist/src/components/search/SearchFilter/SearchFilter.d.ts +0 -2
- package/dist/src/components/search/SearchFilter/SearchFilter.js +0 -24
- package/dist/src/components/search/SearchFilter/SearchFilterHeader.d.ts +0 -2
- package/dist/src/components/search/SearchFilter/SearchFilterHeader.js +0 -9
- package/dist/src/components/search/SearchFilter/SearchFilterItem.d.ts +0 -2
- package/dist/src/components/search/SearchFilter/SearchFilterItem.js +0 -13
- package/dist/src/components/search/SearchFilter/types.d.ts +0 -42
- package/dist/src/components/search/SearchFilter/types.js +0 -1
- package/dist/src/components/search/SearchInput/SearchInput.d.ts +0 -16
- package/dist/src/components/search/SearchInput/SearchInput.js +0 -38
- package/dist/src/components/search/SearchInput/searchInputVariants.d.ts +0 -13
- package/dist/src/components/search/SearchInput/searchInputVariants.js +0 -12
- package/dist/src/components/search/SearchInputAutocomplete/SearchAutocomplete.d.ts +0 -10
- package/dist/src/components/search/SearchInputAutocomplete/SearchAutocomplete.js +0 -14
- package/dist/src/components/search/SearchInputForm/SearchInputForm.d.ts +0 -16
- package/dist/src/components/search/SearchInputForm/SearchInputForm.js +0 -13
- package/dist/src/components/search/SearchInputForm/types.d.ts +0 -1
- package/dist/src/components/search/SearchInputForm/types.js +0 -1
- package/dist/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +0 -14
- package/dist/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.js +0 -15
- package/dist/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts +0 -16
- package/dist/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.js +0 -29
- package/dist/src/components/search/SearchResultsFilterSidebar/types.d.ts +0 -2
- package/dist/src/components/search/SearchResultsFilterSidebar/types.js +0 -1
- package/dist/src/components/search/SearchResultsStates/NoSearchResultsFound.d.ts +0 -8
- package/dist/src/components/search/SearchResultsStates/NoSearchResultsFound.js +0 -10
- package/dist/src/components/search/SearchResultsStates/SearchResultsGrid.d.ts +0 -24
- package/dist/src/components/search/SearchResultsStates/SearchResultsGrid.js +0 -19
- package/dist/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +0 -6
- package/dist/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.js +0 -10
- package/dist/src/components/search/types.d.ts +0 -5
- package/dist/src/components/search/types.js +0 -6
- package/dist/src/components/test/types.d.ts +0 -3
- package/dist/src/components/test/types.js +0 -1
- package/dist/src/config/chatElementDisplayLocation.d.ts +0 -21
- package/dist/src/config/chatElementDisplayLocation.js +0 -23
- package/dist/src/index.d.ts +0 -45
- package/dist/src/index.js +0 -49
- package/dist/src/logging/logger.d.ts +0 -7
- package/dist/src/logging/logger.js +0 -16
- package/dist/src/types/external.d.ts +0 -21
- package/dist/src/types/external.js +0 -5
- package/dist/src/util/camelCase.d.ts +0 -65
- package/dist/src/util/camelCase.js +0 -2
- package/dist/src/util/camelCasedPropertiesDeep.d.ts +0 -53
- package/dist/src/util/camelCasedPropertiesDeep.js +0 -1
- package/dist/src/util/formatPrice.d.ts +0 -1
- package/dist/src/util/formatPrice.js +0 -11
- package/dist/src/util/internal.d.ts +0 -27
- package/dist/src/util/internal.js +0 -4
- package/dist/src/util/primitive.js +0 -2
- package/dist/src/util/splitWords.d.ts +0 -55
- package/dist/src/util/splitWords.js +0 -2
- package/dist/src/util/trim.js +0 -2
- package/dist/src/util/unknownArray.d.ts +0 -25
- package/dist/src/util/unknownArray.js +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- /package/{dist/packages/components/src/components/search/SearchInputForm/types.d.ts → src/components/search/SearchInputForm/types.ts} +0 -0
- /package/{dist/packages/components/src/util/unknownArray.d.ts → src/util/unknownArray.ts} +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { type Transition, motion } from 'framer-motion';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
|
|
5
|
+
import FourPointStar from '@envive-ai/react-icons/src/FourPointStar';
|
|
6
|
+
import { SparkleAnimationOverride } from './types';
|
|
7
|
+
|
|
8
|
+
// Animation timing constants
|
|
9
|
+
const ANIMATION_CYCLE_TIME = 1000; // 1 second between cycles
|
|
10
|
+
const STAR_DELAY_OFFSET = 250; // 250ms delay between each star
|
|
11
|
+
|
|
12
|
+
interface SparkleAnimationProps {
|
|
13
|
+
color: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
animate?: boolean; // Whether to animate the sparkles, defaults to true
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const SparkleAnimation = ({ color, className, animate = true }: SparkleAnimationProps) => {
|
|
19
|
+
// Star visibility states - start visible if not animating, invisible if animating
|
|
20
|
+
const [mainStarScale, setMainStarScale] = useState(animate ? 0 : 1);
|
|
21
|
+
const [smallStar1Scale, setSmallStar1Scale] = useState(animate ? 0 : 1);
|
|
22
|
+
const [smallStar2Scale, setSmallStar2Scale] = useState(animate ? 0 : 1);
|
|
23
|
+
|
|
24
|
+
// Container: 24px x 24px with relative positioning
|
|
25
|
+
const containerClasses = classNames(
|
|
26
|
+
SparkleAnimationOverride.CONTAINER,
|
|
27
|
+
'spiffy-tw-w-6 spiffy-tw-h-6 spiffy-tw-relative',
|
|
28
|
+
className,
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
// When animation is disabled, ensure all stars are visible
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (!animate) {
|
|
34
|
+
setMainStarScale(1);
|
|
35
|
+
setSmallStar1Scale(1);
|
|
36
|
+
setSmallStar2Scale(1);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
}, [animate]);
|
|
40
|
+
|
|
41
|
+
// Animation cycle effect
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (!animate) return;
|
|
44
|
+
|
|
45
|
+
// Toggle between visible (1) and invisible (0)
|
|
46
|
+
const newScale = mainStarScale === 1 ? 0 : 1;
|
|
47
|
+
|
|
48
|
+
// Stagger the star animations
|
|
49
|
+
setTimeout(() => setMainStarScale(newScale), ANIMATION_CYCLE_TIME);
|
|
50
|
+
setTimeout(() => setSmallStar1Scale(newScale), ANIMATION_CYCLE_TIME + STAR_DELAY_OFFSET);
|
|
51
|
+
setTimeout(() => setSmallStar2Scale(newScale), ANIMATION_CYCLE_TIME + 2 * STAR_DELAY_OFFSET);
|
|
52
|
+
}, [mainStarScale, animate]);
|
|
53
|
+
|
|
54
|
+
// Animation transition settings
|
|
55
|
+
const starTransition: Transition = { duration: 0.3, ease: 'easeOut' };
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<div className={containerClasses}>
|
|
59
|
+
{/* Main star - center, slightly above container */}
|
|
60
|
+
<div
|
|
61
|
+
className={classNames(
|
|
62
|
+
SparkleAnimationOverride.STAR_ONE_CONTAINER,
|
|
63
|
+
'spiffy-tw-absolute -spiffy-tw-top-[2px] spiffy-tw-left-0',
|
|
64
|
+
)}
|
|
65
|
+
>
|
|
66
|
+
<motion.div animate={{ scale: mainStarScale }} transition={starTransition}>
|
|
67
|
+
<FourPointStar
|
|
68
|
+
fill={color}
|
|
69
|
+
className="spiffy-tw-w-4 spiffy-tw-h-4 spiffy-tw-inline-block"
|
|
70
|
+
/>
|
|
71
|
+
</motion.div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
{/* Small star 1 - upper right */}
|
|
75
|
+
<div
|
|
76
|
+
className={classNames(
|
|
77
|
+
SparkleAnimationOverride.STAR_TWO_CONTAINER,
|
|
78
|
+
'spiffy-tw-absolute -spiffy-tw-top-[7px] spiffy-tw-left-[10px]',
|
|
79
|
+
)}
|
|
80
|
+
>
|
|
81
|
+
<motion.div animate={{ scale: smallStar1Scale }} transition={starTransition}>
|
|
82
|
+
<FourPointStar
|
|
83
|
+
fill={color}
|
|
84
|
+
className="spiffy-tw-w-2 spiffy-tw-h-2 spiffy-tw-inline-block"
|
|
85
|
+
/>
|
|
86
|
+
</motion.div>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
{/* Small star 2 - lower right */}
|
|
90
|
+
<div
|
|
91
|
+
className={classNames(
|
|
92
|
+
SparkleAnimationOverride.STAR_THREE_CONTAINER,
|
|
93
|
+
'spiffy-tw-absolute spiffy-tw-top-[1px] spiffy-tw-left-[12px]',
|
|
94
|
+
)}
|
|
95
|
+
>
|
|
96
|
+
<motion.div animate={{ scale: smallStar2Scale }} transition={starTransition}>
|
|
97
|
+
<FourPointStar
|
|
98
|
+
fill={color}
|
|
99
|
+
className="spiffy-tw-w-2 spiffy-tw-h-2 spiffy-tw-inline-block"
|
|
100
|
+
/>
|
|
101
|
+
</motion.div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
);
|
|
105
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export enum SparkleAnimationOverride {
|
|
2
|
+
CONTAINER = 'spiffy-sparkle-animation-container',
|
|
3
|
+
STAR_ONE_CONTAINER = 'spiffy-sparkle-animation-star-one-container',
|
|
4
|
+
STAR_TWO_CONTAINER = 'spiffy-sparkle-animation-star-two-container',
|
|
5
|
+
STAR_THREE_CONTAINER = 'spiffy-sparkle-animation-star-three-container',
|
|
6
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
|
|
3
|
+
type SpinnerProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const Spinner = ({ className }: SpinnerProps) => {
|
|
8
|
+
const svgClassnames = classNames({
|
|
9
|
+
'spiffy-tw-w-4': true,
|
|
10
|
+
'spiffy-tw-h-4': true,
|
|
11
|
+
'spiffy-tw-text-gray-200': true,
|
|
12
|
+
'spiffy-tw-animate-spin': true,
|
|
13
|
+
'spiffy-tw-dark:text-gray-600': true,
|
|
14
|
+
'spiffy-tw-fill-black': true,
|
|
15
|
+
}, className);
|
|
16
|
+
|
|
17
|
+
const spanClassnames = classNames({
|
|
18
|
+
'spiffy-tw-sr-only': true,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div role="status">
|
|
23
|
+
<svg aria-hidden="true" className={svgClassnames} viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
24
|
+
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
|
|
25
|
+
<path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/>
|
|
26
|
+
</svg>
|
|
27
|
+
<span className={spanClassnames}>Loading...</span>
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import OutlinedStar from '@envive-ai/react-icons/src/OutlinedStar';
|
|
3
|
+
import FourPointStar from '@envive-ai/react-icons/src/FourPointStar';
|
|
4
|
+
import type { SuggestionButtonVariant } from './types';
|
|
5
|
+
import { ButtonBase } from '../ButtonBase/ButtonBase';
|
|
6
|
+
import { TestProps } from '../../test/types';
|
|
7
|
+
|
|
8
|
+
export const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = 'spiffy-suggestion-button-question-class';
|
|
9
|
+
export const SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = 'spiffy-suggestion-button-answer-class';
|
|
10
|
+
export const SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = 'spiffy-suggestion-button-text-class';
|
|
11
|
+
|
|
12
|
+
// Add a comment that includes the hover prefix so that tailwind will pickup and generate the right css
|
|
13
|
+
// Common class patterns to avoid duplication
|
|
14
|
+
const BORDER_CLASS = 'spiffy-tw-border'; // hover:spiffy-tw-border
|
|
15
|
+
const TEXT_LINK_CLASSES = [
|
|
16
|
+
'spiffy-tw-text-[--spiffy-colors-text-link]', // hover:spiffy-tw-text-[--spiffy-colors-text-link]
|
|
17
|
+
'spiffy-tw-fill-[--spiffy-colors-text-link]', // hover:spiffy-tw-fill-[--spiffy-colors-text-link]
|
|
18
|
+
'spiffy-tw-stroke-[--spiffy-colors-text-link]', // hover:spiffy-tw-stroke-[--spiffy-colors-text-link]
|
|
19
|
+
];
|
|
20
|
+
const TEXT_LIGHT_CLASSES = [
|
|
21
|
+
'spiffy-tw-text-[--spiffy-colors-text-light]', // hover:spiffy-tw-text-[--spiffy-colors-text-light]
|
|
22
|
+
'spiffy-tw-fill-[--spiffy-colors-text-light]', // hover:spiffy-tw-fill-[--spiffy-colors-text-light]
|
|
23
|
+
'spiffy-tw-stroke-[--spiffy-colors-text-light]', // hover:spiffy-tw-stroke-[--spiffy-colors-text-light]
|
|
24
|
+
];
|
|
25
|
+
const TEXT_PRIMARY_CLASSES = [
|
|
26
|
+
'spiffy-tw-text-[--spiffy-colors-text-primary]', // hover:spiffy-tw-text-[--spiffy-colors-text-primary]
|
|
27
|
+
'spiffy-tw-fill-[--spiffy-colors-text-primary]', // hover:spiffy-tw-fill-[--spiffy-colors-text-primary]
|
|
28
|
+
'spiffy-tw-stroke-[--spiffy-colors-text-primary]', // hover:spiffy-tw-stroke-[--spiffy-colors-text-primary]
|
|
29
|
+
];
|
|
30
|
+
const ACCENT_PRIMARY_CLASSES = [
|
|
31
|
+
'spiffy-tw-fill-[--spiffy-colors-accent-primary]', // hover:spiffy-tw-fill-[--spiffy-colors-accent-primary]
|
|
32
|
+
'spiffy-tw-stroke-[--spiffy-colors-accent-primary]', // hover:spiffy-tw-stroke-[--spiffy-colors-accent-primary]
|
|
33
|
+
];
|
|
34
|
+
const DARK_BACKGROUND_CLASSES = [
|
|
35
|
+
'spiffy-tw-bg-[--spiffy-colors-background-dark]', // hover:spiffy-tw-bg-[--spiffy-colors-background-dark]
|
|
36
|
+
'spiffy-tw-border-[--spiffy-colors-background-dark]', // hover:spiffy-tw-border-[--spiffy-colors-background-secondary]
|
|
37
|
+
];
|
|
38
|
+
const SECONDARY_DARK_BACKGROUND_CLASSES = [
|
|
39
|
+
'spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]', // hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]
|
|
40
|
+
'spiffy-tw-border-[--spiffy-colors-background-secondary-dark]', // hover:spiffy-tw-border-[--spiffy-colors-background-secondary-dark]
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
const variantClassMap = new Map<SuggestionButtonVariant, string[]>([
|
|
44
|
+
[
|
|
45
|
+
'outlined',
|
|
46
|
+
[
|
|
47
|
+
'spiffy-tw-border-[--spiffy-colors-border-outline]', // hover:spiffy-tw-border-[--spiffy-colors-border-outline]
|
|
48
|
+
...TEXT_LINK_CLASSES,
|
|
49
|
+
],
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
'outlinedLight',
|
|
53
|
+
[
|
|
54
|
+
'spiffy-tw-border-[--spiffy-colors-border-outline]', // hover:spiffy-tw-border-[--spiffy-colors-border-outline]
|
|
55
|
+
'spiffy-tw-bg-[--spiffy-colors-background-light]', // hover:spiffy-tw-bg-[--spiffy-colors-background-light]
|
|
56
|
+
...TEXT_LINK_CLASSES,
|
|
57
|
+
BORDER_CLASS,
|
|
58
|
+
],
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
'primary',
|
|
62
|
+
[
|
|
63
|
+
'spiffy-tw-bg-[--spiffy-colors-background-primary]', // hover:spiffy-tw-bg-[--spiffy-colors-background-primary]
|
|
64
|
+
'spiffy-tw-border-[--spiffy-colors-background-primary]', // hover:spiffy-tw-border-[--spiffy-colors-background-secondary]
|
|
65
|
+
...TEXT_LIGHT_CLASSES,
|
|
66
|
+
BORDER_CLASS,
|
|
67
|
+
],
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
'secondary',
|
|
71
|
+
[
|
|
72
|
+
'spiffy-tw-bg-[--spiffy-colors-background-secondary]', // hover:spiffy-tw-bg-[--spiffy-colors-background-secondary]
|
|
73
|
+
'spiffy-tw-text-[--spiffy-colors-text-link]', // hover:spiffy-tw-text-[--spiffy-colors-text-link]
|
|
74
|
+
'spiffy-tw-border-[--spiffy-colors-background-secondary]', // hover:spiffy-tw-border-[--spiffy-colors-background-secondary]
|
|
75
|
+
...ACCENT_PRIMARY_CLASSES,
|
|
76
|
+
BORDER_CLASS,
|
|
77
|
+
],
|
|
78
|
+
],
|
|
79
|
+
[
|
|
80
|
+
'tertiary',
|
|
81
|
+
[
|
|
82
|
+
'spiffy-tw-bg-[--spiffy-colors-background-tertiary]', // hover:spiffy-tw-bg-[--spiffy-colors-background-tertiary]
|
|
83
|
+
'spiffy-tw-border-[--spiffy-colors-background-tertiary]', // hover:spiffy-tw-border-[--spiffy-colors-background-secondary]
|
|
84
|
+
...TEXT_LINK_CLASSES,
|
|
85
|
+
BORDER_CLASS,
|
|
86
|
+
],
|
|
87
|
+
],
|
|
88
|
+
['dark', [...DARK_BACKGROUND_CLASSES, ...TEXT_LIGHT_CLASSES, BORDER_CLASS]],
|
|
89
|
+
[
|
|
90
|
+
'darkPrimary',
|
|
91
|
+
[
|
|
92
|
+
...DARK_BACKGROUND_CLASSES,
|
|
93
|
+
'spiffy-tw-text-[--spiffy-colors-text-light]', // hover:spiffy-tw-text-[--spiffy-colors-text-light]
|
|
94
|
+
...ACCENT_PRIMARY_CLASSES,
|
|
95
|
+
BORDER_CLASS,
|
|
96
|
+
],
|
|
97
|
+
],
|
|
98
|
+
[
|
|
99
|
+
'darkAccent',
|
|
100
|
+
[
|
|
101
|
+
...DARK_BACKGROUND_CLASSES,
|
|
102
|
+
'spiffy-tw-text-[--spiffy-colors-text-light]', // hover:spiffy-tw-text-[--spiffy-colors-text-light]
|
|
103
|
+
'spiffy-tw-fill-[--spiffy-colors-text-accent]', // hover:spiffy-tw-fill-[--spiffy-colors-text-accent]
|
|
104
|
+
'spiffy-tw-stroke-[--spiffy-colors-text-accent]', // hover:spiffy-tw-stroke-[--spiffy-colors-text-accent]
|
|
105
|
+
BORDER_CLASS,
|
|
106
|
+
],
|
|
107
|
+
],
|
|
108
|
+
[
|
|
109
|
+
'transparent',
|
|
110
|
+
[
|
|
111
|
+
'spiffy-tw-bg-transparent', // hover:spiffy-tw-bg-transparent
|
|
112
|
+
'spiffy-tw-border-[--spiffy-colors-background-light]', // hover:spiffy-tw-border-[--spiffy-colors-background-light]
|
|
113
|
+
'spiffy-tw-text-[--spiffy-colors-text-light]', // hover:spiffy-tw-text-[--spiffy-colors-text-light]
|
|
114
|
+
'spiffy-tw-fill-transparent', // hover:spiffy-tw-fill-transparent
|
|
115
|
+
'spiffy-tw-stroke-[--spiffy-colors-text-light]', // hover:spiffy-tw-stroke-[--spiffy-colors-text-light]
|
|
116
|
+
BORDER_CLASS,
|
|
117
|
+
],
|
|
118
|
+
],
|
|
119
|
+
[
|
|
120
|
+
'transparentDark',
|
|
121
|
+
[
|
|
122
|
+
'spiffy-tw-bg-transparent', // hover:spiffy-tw-bg-transparent
|
|
123
|
+
'spiffy-tw-border-[--spiffy-colors-border-light]', // hover:spiffy-tw-border-[--spiffy-colors-border-light]
|
|
124
|
+
'spiffy-tw-text-[--spiffy-colors-text-primary]', // hover:spiffy-tw-text-[--spiffy-colors-text-primary]
|
|
125
|
+
'spiffy-tw-fill-transparent', // hover:spiffy-tw-fill-transparent
|
|
126
|
+
'spiffy-tw-stroke-[--spiffy-colors-text-primary]', // hover:spiffy-tw-stroke-[--spiffy-colors-text-primary]
|
|
127
|
+
BORDER_CLASS,
|
|
128
|
+
],
|
|
129
|
+
],
|
|
130
|
+
// This is used as the hover state for transparent
|
|
131
|
+
['secondaryDark', [...SECONDARY_DARK_BACKGROUND_CLASSES, ...TEXT_LINK_CLASSES, BORDER_CLASS]],
|
|
132
|
+
[
|
|
133
|
+
'secondaryAccent',
|
|
134
|
+
[
|
|
135
|
+
...SECONDARY_DARK_BACKGROUND_CLASSES,
|
|
136
|
+
'spiffy-tw-text-[--spiffy-colors-text-link]', // hover:spiffy-tw-text-[--spiffy-colors-text-link]
|
|
137
|
+
...ACCENT_PRIMARY_CLASSES,
|
|
138
|
+
BORDER_CLASS,
|
|
139
|
+
],
|
|
140
|
+
],
|
|
141
|
+
[
|
|
142
|
+
'lightDark',
|
|
143
|
+
[
|
|
144
|
+
'spiffy-tw-bg-[--spiffy-colors-background-light]', // hover:spiffy-tw-bg-[--spiffy-colors-background-light]
|
|
145
|
+
'spiffy-tw-border-[--spiffy-colors-background-dark]', // hover:spiffy-tw-border-[--spiffy-colors-background-dark]
|
|
146
|
+
...TEXT_PRIMARY_CLASSES,
|
|
147
|
+
BORDER_CLASS,
|
|
148
|
+
],
|
|
149
|
+
],
|
|
150
|
+
]);
|
|
151
|
+
|
|
152
|
+
interface SuggestionButtonProps extends TestProps {
|
|
153
|
+
variant: SuggestionButtonVariant;
|
|
154
|
+
hoverVariant: SuggestionButtonVariant;
|
|
155
|
+
isDisabled: boolean;
|
|
156
|
+
content: string;
|
|
157
|
+
boldText?: boolean;
|
|
158
|
+
borderRadius?: 'sm' | 'md' | 'lg';
|
|
159
|
+
isAnswer?: boolean;
|
|
160
|
+
dataAttributes?: Record<string, string>;
|
|
161
|
+
onClick: () => void;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const borderedVariants = [
|
|
165
|
+
'outlined',
|
|
166
|
+
'outlinedLight',
|
|
167
|
+
'primary',
|
|
168
|
+
'secondary',
|
|
169
|
+
'tertiary',
|
|
170
|
+
'dark',
|
|
171
|
+
'darkAccent',
|
|
172
|
+
'darkPrimary',
|
|
173
|
+
'transparent',
|
|
174
|
+
'transparentDark',
|
|
175
|
+
'secondaryDark',
|
|
176
|
+
'secondaryAccent',
|
|
177
|
+
'lightDark',
|
|
178
|
+
];
|
|
179
|
+
|
|
180
|
+
const hoverTransform = (variantClass: string[]): string[] =>
|
|
181
|
+
variantClass?.map((className) => `hover:${className}`);
|
|
182
|
+
|
|
183
|
+
export const SuggestionButton = ({
|
|
184
|
+
variant,
|
|
185
|
+
hoverVariant,
|
|
186
|
+
isDisabled,
|
|
187
|
+
content,
|
|
188
|
+
boldText,
|
|
189
|
+
borderRadius = 'lg',
|
|
190
|
+
isAnswer = false,
|
|
191
|
+
dataAttributes,
|
|
192
|
+
dataTestId,
|
|
193
|
+
onClick,
|
|
194
|
+
}: SuggestionButtonProps) => {
|
|
195
|
+
const buttonClassName = classNames({
|
|
196
|
+
[SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS]: !isAnswer,
|
|
197
|
+
[SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS]: isAnswer,
|
|
198
|
+
'!spiffy-tw-rounded-[20px]': borderRadius === 'lg',
|
|
199
|
+
'!spiffy-tw-rounded-[8px]': borderRadius === 'md',
|
|
200
|
+
'!spiffy-tw-rounded-[0px]': borderRadius === 'sm',
|
|
201
|
+
'spiffy-tw-border-[1px]': borderedVariants.includes(variant),
|
|
202
|
+
'spiffy-tw-border-solid': borderedVariants.includes(variant),
|
|
203
|
+
});
|
|
204
|
+
const textClassName = classNames({
|
|
205
|
+
'spiffy-tw-text-[14px]': true,
|
|
206
|
+
'spiffy-tw-leading-[100%]': true,
|
|
207
|
+
'!spiffy-tw-font-bold': boldText,
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
const iconClass = classNames({
|
|
211
|
+
'spiffy-tw-w-[11px]': true,
|
|
212
|
+
'spiffy-tw-h-[11px]': true,
|
|
213
|
+
'spiffy-tw-stroke-inherit': true,
|
|
214
|
+
'spiffy-tw-fill-inherit': true,
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
const baseClasses = variantClassMap.get(variant) ?? [];
|
|
218
|
+
const hoverClasses = variantClassMap.get(hoverVariant) ?? [];
|
|
219
|
+
|
|
220
|
+
// Separate border classes for proper cascading
|
|
221
|
+
const baseBorderClasses = baseClasses.filter((cls) => cls.includes('border'));
|
|
222
|
+
const baseNonBorderClasses = baseClasses.filter((cls) => !cls.includes('border'));
|
|
223
|
+
const hoverBorderClasses = hoverClasses.filter((cls) => cls.includes('border'));
|
|
224
|
+
const hoverNonBorderClasses = hoverClasses.filter((cls) => !cls.includes('border'));
|
|
225
|
+
|
|
226
|
+
const variantClasses = [
|
|
227
|
+
...baseNonBorderClasses,
|
|
228
|
+
...hoverTransform(hoverNonBorderClasses),
|
|
229
|
+
...baseBorderClasses,
|
|
230
|
+
...hoverTransform(hoverBorderClasses),
|
|
231
|
+
];
|
|
232
|
+
|
|
233
|
+
const buttonClass = `${buttonClassName} ${variantClasses.join(' ')}`;
|
|
234
|
+
|
|
235
|
+
// Choose icon based on variant to match legacy exactly
|
|
236
|
+
const getIcon = () => {
|
|
237
|
+
if (isAnswer) return undefined;
|
|
238
|
+
if (variant === 'transparentDark') {
|
|
239
|
+
return OutlinedStar;
|
|
240
|
+
}
|
|
241
|
+
return FourPointStar;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
return (
|
|
245
|
+
<ButtonBase
|
|
246
|
+
text={content}
|
|
247
|
+
dataAttributes={dataAttributes}
|
|
248
|
+
dataTestId={dataTestId}
|
|
249
|
+
isDisabled={isDisabled}
|
|
250
|
+
// we may want to support custom icons in the future
|
|
251
|
+
icon={getIcon()}
|
|
252
|
+
iconClass={isAnswer ? undefined : iconClass}
|
|
253
|
+
textClass={`${SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS} ${textClassName}`}
|
|
254
|
+
buttonClass={buttonClass}
|
|
255
|
+
onClick={onClick}
|
|
256
|
+
/>
|
|
257
|
+
);
|
|
258
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type SuggestionButtonVariant =
|
|
2
|
+
| 'outlined'
|
|
3
|
+
| 'outlinedLight'
|
|
4
|
+
| 'primary'
|
|
5
|
+
| 'secondary'
|
|
6
|
+
| 'tertiary'
|
|
7
|
+
| 'dark'
|
|
8
|
+
| 'darkAccent'
|
|
9
|
+
| 'darkPrimary'
|
|
10
|
+
| 'secondaryDark'
|
|
11
|
+
| 'secondaryAccent'
|
|
12
|
+
| 'transparent'
|
|
13
|
+
| 'transparentDark'
|
|
14
|
+
| 'lightDark';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { type TextType, type TextVariant } from './types';
|
|
3
|
+
import { TextVariantMap } from './textVariantClasses';
|
|
4
|
+
|
|
5
|
+
type TextProps = {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
noOfLines?: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
variant?: TextVariant;
|
|
11
|
+
type?: TextType;
|
|
12
|
+
testId?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const Text = ({
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
style,
|
|
19
|
+
noOfLines,
|
|
20
|
+
testId,
|
|
21
|
+
type = 'span',
|
|
22
|
+
variant = 'body3',
|
|
23
|
+
}: TextProps) => {
|
|
24
|
+
const variantClassNames = variant ? TextVariantMap[variant] : {};
|
|
25
|
+
const textClassNames = classNames(className, variantClassNames, {
|
|
26
|
+
'spiffy-tw-font-["Inter Variable,sans-serif"]': true,
|
|
27
|
+
'spiffy-tw-line-clamp-1': noOfLines === 1,
|
|
28
|
+
'spiffy-tw-line-clamp-2': noOfLines === 2,
|
|
29
|
+
'spiffy-tw-line-clamp-3': noOfLines === 3,
|
|
30
|
+
'spiffy-tw-line-clamp-4': noOfLines === 4,
|
|
31
|
+
'spiffy-tw-line-clamp-5': noOfLines === 5,
|
|
32
|
+
'spiffy-tw-line-clamp-6': noOfLines === 6,
|
|
33
|
+
'spiffy-tw-line-clamp-7': noOfLines === 7,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
switch (type) {
|
|
37
|
+
case 'p':
|
|
38
|
+
return (
|
|
39
|
+
<p data-testid={testId} className={textClassNames} style={style}>
|
|
40
|
+
{children}
|
|
41
|
+
</p>
|
|
42
|
+
);
|
|
43
|
+
case 'span':
|
|
44
|
+
return (
|
|
45
|
+
<span data-testid={testId} className={textClassNames} style={style}>
|
|
46
|
+
{children}
|
|
47
|
+
</span>
|
|
48
|
+
);
|
|
49
|
+
case 'sub':
|
|
50
|
+
return (
|
|
51
|
+
<sub data-testid={testId} className={textClassNames} style={style}>
|
|
52
|
+
{children}
|
|
53
|
+
</sub>
|
|
54
|
+
);
|
|
55
|
+
default:
|
|
56
|
+
throw new Error(`Invalid text type: ${type}`);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// TODO: add the rest of the variants as needed
|
|
2
|
+
export const HeadlineVariantMap = {
|
|
3
|
+
t1: {
|
|
4
|
+
'spiffy-headline': true,
|
|
5
|
+
'spiffy-headline-1': true,
|
|
6
|
+
'spiffy-tw-text-[32px]': true,
|
|
7
|
+
'spiffy-tw-font-medium': true,
|
|
8
|
+
'spiffy-tw-leading-[124%]': true,
|
|
9
|
+
},
|
|
10
|
+
t2: {
|
|
11
|
+
'spiffy-headline': true,
|
|
12
|
+
'spiffy-headline-1': true,
|
|
13
|
+
'spiffy-tw-text-[16px]': true,
|
|
14
|
+
'spiffy-tw-font-medium': true,
|
|
15
|
+
'spiffy-tw-leading-[124%]': true,
|
|
16
|
+
},
|
|
17
|
+
t3: {
|
|
18
|
+
'spiffy-headline': true,
|
|
19
|
+
'spiffy-headline-1': true,
|
|
20
|
+
'spiffy-tw-text-[24px]': true,
|
|
21
|
+
'spiffy-tw-leading-[120%]': true,
|
|
22
|
+
},
|
|
23
|
+
h1: {
|
|
24
|
+
'spiffy-headline': true,
|
|
25
|
+
'spiffy-headline-1': true,
|
|
26
|
+
'spiffy-tw-text-[20px]': true,
|
|
27
|
+
'spiffy-tw-font-normal': true,
|
|
28
|
+
'spiffy-tw-leading-[120%]': true,
|
|
29
|
+
},
|
|
30
|
+
h2: {
|
|
31
|
+
'spiffy-headline': true,
|
|
32
|
+
'spiffy-headline-2': true,
|
|
33
|
+
'spiffy-tw-text-[16px]': true,
|
|
34
|
+
'spiffy-tw-font-normal': true,
|
|
35
|
+
'spiffy-tw-leading-[124%]': true,
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
h3: {
|
|
39
|
+
'spiffy-headline': true,
|
|
40
|
+
'spiffy-headline-3': true,
|
|
41
|
+
'spiffy-tw-text-[15px]': true,
|
|
42
|
+
'spiffy-tw-font-medium': true,
|
|
43
|
+
'spiffy-tw-leading-[124%]': true,
|
|
44
|
+
},
|
|
45
|
+
h4: {
|
|
46
|
+
'spiffy-headline': true,
|
|
47
|
+
'spiffy-headline-4': true,
|
|
48
|
+
'spiffy-tw-text-[14px]': true,
|
|
49
|
+
'spiffy-tw-font-medium': true,
|
|
50
|
+
'spiffy-tw-leading-[124%]': true,
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// TODO: add the rest of the variants as needed
|
|
55
|
+
export const TextVariantMap = {
|
|
56
|
+
body1: {
|
|
57
|
+
'spiffy-body-text': true,
|
|
58
|
+
'spiffy-body-1': true,
|
|
59
|
+
'spiffy-tw-text-[20px]': true,
|
|
60
|
+
'spiffy-tw-font-normal': true,
|
|
61
|
+
'spiffy-tw-line-height-[120%]': true,
|
|
62
|
+
},
|
|
63
|
+
body2: {
|
|
64
|
+
'spiffy-body-text': true,
|
|
65
|
+
'spiffy-body-2': true,
|
|
66
|
+
'spiffy-tw-text-[16px]': true,
|
|
67
|
+
'spiffy-tw-font-normal': true,
|
|
68
|
+
'spiffy-tw-line-height-[148%]': true,
|
|
69
|
+
},
|
|
70
|
+
body3: {
|
|
71
|
+
'spiffy-body-text': true,
|
|
72
|
+
'spiffy-body-3': true,
|
|
73
|
+
'spiffy-tw-text-sm': true,
|
|
74
|
+
'spiffy-tw-font-normal': true,
|
|
75
|
+
'spiffy-tw-leading-[140%]': true,
|
|
76
|
+
},
|
|
77
|
+
body4: {
|
|
78
|
+
'spiffy-body-text': true,
|
|
79
|
+
'spiffy-body-4': true,
|
|
80
|
+
'spiffy-tw-text-xs': true,
|
|
81
|
+
'spiffy-tw-font-medium': true,
|
|
82
|
+
'spiffy-tw-leading-[130%]': true,
|
|
83
|
+
},
|
|
84
|
+
body5: {
|
|
85
|
+
'spiffy-body-text': true,
|
|
86
|
+
'spiffy-body-5': true,
|
|
87
|
+
'spiffy-tw-text-[10px]': true,
|
|
88
|
+
'spiffy-tw-font-normal': true,
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const TextStyleVariantMap = {
|
|
93
|
+
...TextVariantMap,
|
|
94
|
+
...HeadlineVariantMap,
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const getVariantPlaceholderClassNames = (classes: Record<string, boolean>) => {
|
|
98
|
+
return Object.keys(classes).reduce((acc, key) => {
|
|
99
|
+
if(key.includes('spiffy-tw')){
|
|
100
|
+
acc[`placeholder:${key}`] = classes[key];
|
|
101
|
+
} else {
|
|
102
|
+
acc[`${key}-placeholder`] = classes[key];
|
|
103
|
+
}
|
|
104
|
+
return acc;
|
|
105
|
+
}, {} as Record<string, boolean>);
|
|
106
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export enum ExpandableTextOverrides {
|
|
2
|
+
EXPANDABLE_TEXT_CONTAINER = 'spiffy-expandable-text-container',
|
|
3
|
+
EXPANDABLE_TEXT = 'spiffy-expandable-text',
|
|
4
|
+
EXPANDABLE_BUTTON = 'spiffy-expandable-button',
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// This is an incomplete list of text variants
|
|
8
|
+
// TODO: add the rest of the variants as needed
|
|
9
|
+
export type TextVariant = 'body1' | 'body2' | 'body3' | 'body4' | 'body5';
|
|
10
|
+
export type TextType = 'p' | 'span' | 'sub';
|
|
11
|
+
|
|
12
|
+
export type HeadlineProps = {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
variant?: HeadlineVariant;
|
|
17
|
+
testId?: string;
|
|
18
|
+
id?: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// This is an incomplete list of text variants
|
|
22
|
+
// TODO: add the rest of the variants as needed
|
|
23
|
+
export type HeadlineVariant = 't1' | 't2' | 't3' | 'h1' | 'h2' | 'h3' | 'h4';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Disabling this prevents an otherwise simple wrapper around input
|
|
2
|
+
// from becoming needlessly verbose while maintaining flexibility.
|
|
3
|
+
// Keeping it enabled requires listing every possible prop.
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { getVariantPlaceholderClassNames, TextStyleVariantMap } from '../Text/textVariantClasses';
|
|
7
|
+
|
|
8
|
+
export interface TextInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
9
|
+
borderRadius: 'sm' | 'md' | 'lg' | 'xl';
|
|
10
|
+
borderColorClass?: string;
|
|
11
|
+
placeholderVariant?: keyof typeof TextStyleVariantMap;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
|
|
15
|
+
({ className, borderRadius, borderColorClass, placeholderVariant, ...rest }, ref) => {
|
|
16
|
+
const variantClassNames = placeholderVariant ? TextStyleVariantMap[placeholderVariant] : {};
|
|
17
|
+
const placeholderVariantClassNames = getVariantPlaceholderClassNames(variantClassNames);
|
|
18
|
+
const inputClasses = classNames([
|
|
19
|
+
{
|
|
20
|
+
'spiffy-text-input': true,
|
|
21
|
+
'spiffy-tw-outline-none': true,
|
|
22
|
+
'spiffy-tw-rounded-[64px]': borderRadius === 'xl',
|
|
23
|
+
'spiffy-tw-rounded-[20px]': borderRadius === 'lg',
|
|
24
|
+
'spiffy-tw-rounded-[8px]': borderRadius === 'md',
|
|
25
|
+
'spiffy-tw-rounded-[0px]': borderRadius === 'sm',
|
|
26
|
+
...placeholderVariantClassNames,
|
|
27
|
+
},
|
|
28
|
+
borderColorClass,
|
|
29
|
+
className,
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
return <input ref={ref} {...rest} className={inputClasses} />;
|
|
33
|
+
},
|
|
34
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
enum ColorNames {
|
|
2
|
+
TextPrimary = 'text-primary',
|
|
3
|
+
TextSecondary = 'text-secondary',
|
|
4
|
+
TextAccent = 'text-accent',
|
|
5
|
+
TextLink = 'text-link',
|
|
6
|
+
TextLight = 'text-light',
|
|
7
|
+
BackgroundPrimary = 'background-primary',
|
|
8
|
+
BackgroundSecondary = 'background-secondary',
|
|
9
|
+
BackgroundSecondaryDark = 'background-secondary-dark',
|
|
10
|
+
BackgroundTertiary = 'background-tertiary',
|
|
11
|
+
BackgroundDark = 'background-dark',
|
|
12
|
+
BackgroundLight = 'background-light',
|
|
13
|
+
BackgroundSaturated = 'background-saturated',
|
|
14
|
+
BorderLight = 'border-light',
|
|
15
|
+
BorderMedium = 'border-medium',
|
|
16
|
+
BorderDark = 'border-dark',
|
|
17
|
+
BorderOutline = 'border-outline',
|
|
18
|
+
AccentPrimary = 'accent-primary',
|
|
19
|
+
AccentSecondary = 'accent-secondary',
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
type ColorMapping = {
|
|
23
|
+
[key in ColorNames]: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const colorVar = (color: ColorNames): string => `var(--spiffy-colors-${color})`;
|
|
27
|
+
export { ColorNames, colorVar };
|
|
28
|
+
export type { ColorMapping };
|