@envive-ai/react-toolkit 0.1.1 → 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/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 -8
- package/src/components/common/ButtonBase/ButtonBase.tsx +2 -2
- package/src/components/common/ButtonBase/types.ts +2 -3
- 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.d.ts +0 -6
- 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.d.ts +0 -24
- 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/src/index.ts +0 -59
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { TextVariantMap } from './textVariantClasses';
|
|
4
|
-
export const Text = ({ children, className, style, noOfLines, testId, type = 'span', variant = 'body3', }) => {
|
|
5
|
-
const variantClassNames = variant ? TextVariantMap[variant] : {};
|
|
6
|
-
const textClassNames = classNames(className, variantClassNames, {
|
|
7
|
-
'spiffy-tw-font-["Inter Variable,sans-serif"]': true,
|
|
8
|
-
'spiffy-tw-line-clamp-1': noOfLines === 1,
|
|
9
|
-
'spiffy-tw-line-clamp-2': noOfLines === 2,
|
|
10
|
-
'spiffy-tw-line-clamp-3': noOfLines === 3,
|
|
11
|
-
'spiffy-tw-line-clamp-4': noOfLines === 4,
|
|
12
|
-
'spiffy-tw-line-clamp-5': noOfLines === 5,
|
|
13
|
-
'spiffy-tw-line-clamp-6': noOfLines === 6,
|
|
14
|
-
'spiffy-tw-line-clamp-7': noOfLines === 7,
|
|
15
|
-
});
|
|
16
|
-
switch (type) {
|
|
17
|
-
case 'p':
|
|
18
|
-
return (_jsx("p", { "data-testid": testId, className: textClassNames, style: style, children: children }));
|
|
19
|
-
case 'span':
|
|
20
|
-
return (_jsx("span", { "data-testid": testId, className: textClassNames, style: style, children: children }));
|
|
21
|
-
case 'sub':
|
|
22
|
-
return (_jsx("sub", { "data-testid": testId, className: textClassNames, style: style, children: children }));
|
|
23
|
-
default:
|
|
24
|
-
throw new Error(`Invalid text type: ${type}`);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
export declare const HeadlineVariantMap: {
|
|
2
|
-
t1: {
|
|
3
|
-
'spiffy-headline': boolean;
|
|
4
|
-
'spiffy-headline-1': boolean;
|
|
5
|
-
'spiffy-tw-text-[32px]': boolean;
|
|
6
|
-
'spiffy-tw-font-medium': boolean;
|
|
7
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
8
|
-
};
|
|
9
|
-
t2: {
|
|
10
|
-
'spiffy-headline': boolean;
|
|
11
|
-
'spiffy-headline-1': boolean;
|
|
12
|
-
'spiffy-tw-text-[16px]': boolean;
|
|
13
|
-
'spiffy-tw-font-medium': boolean;
|
|
14
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
15
|
-
};
|
|
16
|
-
t3: {
|
|
17
|
-
'spiffy-headline': boolean;
|
|
18
|
-
'spiffy-headline-1': boolean;
|
|
19
|
-
'spiffy-tw-text-[24px]': boolean;
|
|
20
|
-
'spiffy-tw-leading-[120%]': boolean;
|
|
21
|
-
};
|
|
22
|
-
h1: {
|
|
23
|
-
'spiffy-headline': boolean;
|
|
24
|
-
'spiffy-headline-1': boolean;
|
|
25
|
-
'spiffy-tw-text-[20px]': boolean;
|
|
26
|
-
'spiffy-tw-font-normal': boolean;
|
|
27
|
-
'spiffy-tw-leading-[120%]': boolean;
|
|
28
|
-
};
|
|
29
|
-
h2: {
|
|
30
|
-
'spiffy-headline': boolean;
|
|
31
|
-
'spiffy-headline-2': boolean;
|
|
32
|
-
'spiffy-tw-text-[16px]': boolean;
|
|
33
|
-
'spiffy-tw-font-normal': boolean;
|
|
34
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
35
|
-
};
|
|
36
|
-
h3: {
|
|
37
|
-
'spiffy-headline': boolean;
|
|
38
|
-
'spiffy-headline-3': boolean;
|
|
39
|
-
'spiffy-tw-text-[15px]': boolean;
|
|
40
|
-
'spiffy-tw-font-medium': boolean;
|
|
41
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
42
|
-
};
|
|
43
|
-
h4: {
|
|
44
|
-
'spiffy-headline': boolean;
|
|
45
|
-
'spiffy-headline-4': boolean;
|
|
46
|
-
'spiffy-tw-text-[14px]': boolean;
|
|
47
|
-
'spiffy-tw-font-medium': boolean;
|
|
48
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
export declare const TextVariantMap: {
|
|
52
|
-
body1: {
|
|
53
|
-
'spiffy-body-text': boolean;
|
|
54
|
-
'spiffy-body-1': boolean;
|
|
55
|
-
'spiffy-tw-text-[20px]': boolean;
|
|
56
|
-
'spiffy-tw-font-normal': boolean;
|
|
57
|
-
'spiffy-tw-line-height-[120%]': boolean;
|
|
58
|
-
};
|
|
59
|
-
body2: {
|
|
60
|
-
'spiffy-body-text': boolean;
|
|
61
|
-
'spiffy-body-2': boolean;
|
|
62
|
-
'spiffy-tw-text-[16px]': boolean;
|
|
63
|
-
'spiffy-tw-font-normal': boolean;
|
|
64
|
-
'spiffy-tw-line-height-[148%]': boolean;
|
|
65
|
-
};
|
|
66
|
-
body3: {
|
|
67
|
-
'spiffy-body-text': boolean;
|
|
68
|
-
'spiffy-body-3': boolean;
|
|
69
|
-
'spiffy-tw-text-sm': boolean;
|
|
70
|
-
'spiffy-tw-font-normal': boolean;
|
|
71
|
-
'spiffy-tw-leading-[140%]': boolean;
|
|
72
|
-
};
|
|
73
|
-
body4: {
|
|
74
|
-
'spiffy-body-text': boolean;
|
|
75
|
-
'spiffy-body-4': boolean;
|
|
76
|
-
'spiffy-tw-text-xs': boolean;
|
|
77
|
-
'spiffy-tw-font-medium': boolean;
|
|
78
|
-
'spiffy-tw-leading-[130%]': boolean;
|
|
79
|
-
};
|
|
80
|
-
body5: {
|
|
81
|
-
'spiffy-body-text': boolean;
|
|
82
|
-
'spiffy-body-5': boolean;
|
|
83
|
-
'spiffy-tw-text-[10px]': boolean;
|
|
84
|
-
'spiffy-tw-font-normal': boolean;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
export declare const TextStyleVariantMap: {
|
|
88
|
-
t1: {
|
|
89
|
-
'spiffy-headline': boolean;
|
|
90
|
-
'spiffy-headline-1': boolean;
|
|
91
|
-
'spiffy-tw-text-[32px]': boolean;
|
|
92
|
-
'spiffy-tw-font-medium': boolean;
|
|
93
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
94
|
-
};
|
|
95
|
-
t2: {
|
|
96
|
-
'spiffy-headline': boolean;
|
|
97
|
-
'spiffy-headline-1': boolean;
|
|
98
|
-
'spiffy-tw-text-[16px]': boolean;
|
|
99
|
-
'spiffy-tw-font-medium': boolean;
|
|
100
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
101
|
-
};
|
|
102
|
-
t3: {
|
|
103
|
-
'spiffy-headline': boolean;
|
|
104
|
-
'spiffy-headline-1': boolean;
|
|
105
|
-
'spiffy-tw-text-[24px]': boolean;
|
|
106
|
-
'spiffy-tw-leading-[120%]': boolean;
|
|
107
|
-
};
|
|
108
|
-
h1: {
|
|
109
|
-
'spiffy-headline': boolean;
|
|
110
|
-
'spiffy-headline-1': boolean;
|
|
111
|
-
'spiffy-tw-text-[20px]': boolean;
|
|
112
|
-
'spiffy-tw-font-normal': boolean;
|
|
113
|
-
'spiffy-tw-leading-[120%]': boolean;
|
|
114
|
-
};
|
|
115
|
-
h2: {
|
|
116
|
-
'spiffy-headline': boolean;
|
|
117
|
-
'spiffy-headline-2': boolean;
|
|
118
|
-
'spiffy-tw-text-[16px]': boolean;
|
|
119
|
-
'spiffy-tw-font-normal': boolean;
|
|
120
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
121
|
-
};
|
|
122
|
-
h3: {
|
|
123
|
-
'spiffy-headline': boolean;
|
|
124
|
-
'spiffy-headline-3': boolean;
|
|
125
|
-
'spiffy-tw-text-[15px]': boolean;
|
|
126
|
-
'spiffy-tw-font-medium': boolean;
|
|
127
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
128
|
-
};
|
|
129
|
-
h4: {
|
|
130
|
-
'spiffy-headline': boolean;
|
|
131
|
-
'spiffy-headline-4': boolean;
|
|
132
|
-
'spiffy-tw-text-[14px]': boolean;
|
|
133
|
-
'spiffy-tw-font-medium': boolean;
|
|
134
|
-
'spiffy-tw-leading-[124%]': boolean;
|
|
135
|
-
};
|
|
136
|
-
body1: {
|
|
137
|
-
'spiffy-body-text': boolean;
|
|
138
|
-
'spiffy-body-1': boolean;
|
|
139
|
-
'spiffy-tw-text-[20px]': boolean;
|
|
140
|
-
'spiffy-tw-font-normal': boolean;
|
|
141
|
-
'spiffy-tw-line-height-[120%]': boolean;
|
|
142
|
-
};
|
|
143
|
-
body2: {
|
|
144
|
-
'spiffy-body-text': boolean;
|
|
145
|
-
'spiffy-body-2': boolean;
|
|
146
|
-
'spiffy-tw-text-[16px]': boolean;
|
|
147
|
-
'spiffy-tw-font-normal': boolean;
|
|
148
|
-
'spiffy-tw-line-height-[148%]': boolean;
|
|
149
|
-
};
|
|
150
|
-
body3: {
|
|
151
|
-
'spiffy-body-text': boolean;
|
|
152
|
-
'spiffy-body-3': boolean;
|
|
153
|
-
'spiffy-tw-text-sm': boolean;
|
|
154
|
-
'spiffy-tw-font-normal': boolean;
|
|
155
|
-
'spiffy-tw-leading-[140%]': boolean;
|
|
156
|
-
};
|
|
157
|
-
body4: {
|
|
158
|
-
'spiffy-body-text': boolean;
|
|
159
|
-
'spiffy-body-4': boolean;
|
|
160
|
-
'spiffy-tw-text-xs': boolean;
|
|
161
|
-
'spiffy-tw-font-medium': boolean;
|
|
162
|
-
'spiffy-tw-leading-[130%]': boolean;
|
|
163
|
-
};
|
|
164
|
-
body5: {
|
|
165
|
-
'spiffy-body-text': boolean;
|
|
166
|
-
'spiffy-body-5': boolean;
|
|
167
|
-
'spiffy-tw-text-[10px]': boolean;
|
|
168
|
-
'spiffy-tw-font-normal': boolean;
|
|
169
|
-
};
|
|
170
|
-
};
|
|
171
|
-
export declare const getVariantPlaceholderClassNames: (classes: Record<string, boolean>) => Record<string, boolean>;
|
|
@@ -1,103 +0,0 @@
|
|
|
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
|
-
h3: {
|
|
38
|
-
'spiffy-headline': true,
|
|
39
|
-
'spiffy-headline-3': true,
|
|
40
|
-
'spiffy-tw-text-[15px]': true,
|
|
41
|
-
'spiffy-tw-font-medium': true,
|
|
42
|
-
'spiffy-tw-leading-[124%]': true,
|
|
43
|
-
},
|
|
44
|
-
h4: {
|
|
45
|
-
'spiffy-headline': true,
|
|
46
|
-
'spiffy-headline-4': true,
|
|
47
|
-
'spiffy-tw-text-[14px]': true,
|
|
48
|
-
'spiffy-tw-font-medium': true,
|
|
49
|
-
'spiffy-tw-leading-[124%]': true,
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
// TODO: add the rest of the variants as needed
|
|
53
|
-
export const TextVariantMap = {
|
|
54
|
-
body1: {
|
|
55
|
-
'spiffy-body-text': true,
|
|
56
|
-
'spiffy-body-1': true,
|
|
57
|
-
'spiffy-tw-text-[20px]': true,
|
|
58
|
-
'spiffy-tw-font-normal': true,
|
|
59
|
-
'spiffy-tw-line-height-[120%]': true,
|
|
60
|
-
},
|
|
61
|
-
body2: {
|
|
62
|
-
'spiffy-body-text': true,
|
|
63
|
-
'spiffy-body-2': true,
|
|
64
|
-
'spiffy-tw-text-[16px]': true,
|
|
65
|
-
'spiffy-tw-font-normal': true,
|
|
66
|
-
'spiffy-tw-line-height-[148%]': true,
|
|
67
|
-
},
|
|
68
|
-
body3: {
|
|
69
|
-
'spiffy-body-text': true,
|
|
70
|
-
'spiffy-body-3': true,
|
|
71
|
-
'spiffy-tw-text-sm': true,
|
|
72
|
-
'spiffy-tw-font-normal': true,
|
|
73
|
-
'spiffy-tw-leading-[140%]': true,
|
|
74
|
-
},
|
|
75
|
-
body4: {
|
|
76
|
-
'spiffy-body-text': true,
|
|
77
|
-
'spiffy-body-4': true,
|
|
78
|
-
'spiffy-tw-text-xs': true,
|
|
79
|
-
'spiffy-tw-font-medium': true,
|
|
80
|
-
'spiffy-tw-leading-[130%]': true,
|
|
81
|
-
},
|
|
82
|
-
body5: {
|
|
83
|
-
'spiffy-body-text': true,
|
|
84
|
-
'spiffy-body-5': true,
|
|
85
|
-
'spiffy-tw-text-[10px]': true,
|
|
86
|
-
'spiffy-tw-font-normal': true,
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
export const TextStyleVariantMap = {
|
|
90
|
-
...TextVariantMap,
|
|
91
|
-
...HeadlineVariantMap,
|
|
92
|
-
};
|
|
93
|
-
export const getVariantPlaceholderClassNames = (classes) => {
|
|
94
|
-
return Object.keys(classes).reduce((acc, key) => {
|
|
95
|
-
if (key.includes('spiffy-tw')) {
|
|
96
|
-
acc[`placeholder:${key}`] = classes[key];
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
acc[`${key}-placeholder`] = classes[key];
|
|
100
|
-
}
|
|
101
|
-
return acc;
|
|
102
|
-
}, {});
|
|
103
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare enum ExpandableTextOverrides {
|
|
2
|
-
EXPANDABLE_TEXT_CONTAINER = "spiffy-expandable-text-container",
|
|
3
|
-
EXPANDABLE_TEXT = "spiffy-expandable-text",
|
|
4
|
-
EXPANDABLE_BUTTON = "spiffy-expandable-button"
|
|
5
|
-
}
|
|
6
|
-
export type TextVariant = 'body1' | 'body2' | 'body3' | 'body4' | 'body5';
|
|
7
|
-
export type TextType = 'p' | 'span' | 'sub';
|
|
8
|
-
export type HeadlineProps = {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
className?: string;
|
|
11
|
-
style?: React.CSSProperties;
|
|
12
|
-
variant?: HeadlineVariant;
|
|
13
|
-
testId?: string;
|
|
14
|
-
id?: string;
|
|
15
|
-
};
|
|
16
|
-
export type HeadlineVariant = 't1' | 't2' | 't3' | 'h1' | 'h2' | 'h3' | 'h4';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export var ExpandableTextOverrides;
|
|
2
|
-
(function (ExpandableTextOverrides) {
|
|
3
|
-
ExpandableTextOverrides["EXPANDABLE_TEXT_CONTAINER"] = "spiffy-expandable-text-container";
|
|
4
|
-
ExpandableTextOverrides["EXPANDABLE_TEXT"] = "spiffy-expandable-text";
|
|
5
|
-
ExpandableTextOverrides["EXPANDABLE_BUTTON"] = "spiffy-expandable-button";
|
|
6
|
-
})(ExpandableTextOverrides || (ExpandableTextOverrides = {}));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextStyleVariantMap } from '../Text/textVariantClasses';
|
|
3
|
-
export interface TextInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
-
borderRadius: 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
-
borderColorClass?: string;
|
|
6
|
-
placeholderVariant?: keyof typeof TextStyleVariantMap;
|
|
7
|
-
}
|
|
8
|
-
export declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// Disabling this prevents an otherwise simple wrapper around input
|
|
3
|
-
// from becoming needlessly verbose while maintaining flexibility.
|
|
4
|
-
// Keeping it enabled requires listing every possible prop.
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import classNames from 'classnames';
|
|
7
|
-
import { getVariantPlaceholderClassNames, TextStyleVariantMap } from '../Text/textVariantClasses';
|
|
8
|
-
export const TextInput = React.forwardRef(({ className, borderRadius, borderColorClass, placeholderVariant, ...rest }, ref) => {
|
|
9
|
-
const variantClassNames = placeholderVariant ? TextStyleVariantMap[placeholderVariant] : {};
|
|
10
|
-
const placeholderVariantClassNames = getVariantPlaceholderClassNames(variantClassNames);
|
|
11
|
-
const inputClasses = classNames([
|
|
12
|
-
{
|
|
13
|
-
'spiffy-text-input': true,
|
|
14
|
-
'spiffy-tw-outline-none': true,
|
|
15
|
-
'spiffy-tw-rounded-[64px]': borderRadius === 'xl',
|
|
16
|
-
'spiffy-tw-rounded-[20px]': borderRadius === 'lg',
|
|
17
|
-
'spiffy-tw-rounded-[8px]': borderRadius === 'md',
|
|
18
|
-
'spiffy-tw-rounded-[0px]': borderRadius === 'sm',
|
|
19
|
-
...placeholderVariantClassNames,
|
|
20
|
-
},
|
|
21
|
-
borderColorClass,
|
|
22
|
-
className,
|
|
23
|
-
]);
|
|
24
|
-
return _jsx("input", { ref: ref, ...rest, className: inputClasses });
|
|
25
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
declare 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
|
-
type ColorMapping = {
|
|
22
|
-
[key in ColorNames]: string;
|
|
23
|
-
};
|
|
24
|
-
declare const colorVar: (color: ColorNames) => string;
|
|
25
|
-
export { ColorNames, colorVar };
|
|
26
|
-
export type { ColorMapping };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var ColorNames;
|
|
2
|
-
(function (ColorNames) {
|
|
3
|
-
ColorNames["TextPrimary"] = "text-primary";
|
|
4
|
-
ColorNames["TextSecondary"] = "text-secondary";
|
|
5
|
-
ColorNames["TextAccent"] = "text-accent";
|
|
6
|
-
ColorNames["TextLink"] = "text-link";
|
|
7
|
-
ColorNames["TextLight"] = "text-light";
|
|
8
|
-
ColorNames["BackgroundPrimary"] = "background-primary";
|
|
9
|
-
ColorNames["BackgroundSecondary"] = "background-secondary";
|
|
10
|
-
ColorNames["BackgroundSecondaryDark"] = "background-secondary-dark";
|
|
11
|
-
ColorNames["BackgroundTertiary"] = "background-tertiary";
|
|
12
|
-
ColorNames["BackgroundDark"] = "background-dark";
|
|
13
|
-
ColorNames["BackgroundLight"] = "background-light";
|
|
14
|
-
ColorNames["BackgroundSaturated"] = "background-saturated";
|
|
15
|
-
ColorNames["BorderLight"] = "border-light";
|
|
16
|
-
ColorNames["BorderMedium"] = "border-medium";
|
|
17
|
-
ColorNames["BorderDark"] = "border-dark";
|
|
18
|
-
ColorNames["BorderOutline"] = "border-outline";
|
|
19
|
-
ColorNames["AccentPrimary"] = "accent-primary";
|
|
20
|
-
ColorNames["AccentSecondary"] = "accent-secondary";
|
|
21
|
-
})(ColorNames || (ColorNames = {}));
|
|
22
|
-
const colorVar = (color) => `var(--spiffy-colors-${color})`;
|
|
23
|
-
export { ColorNames, colorVar };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { SelectedFilterOption } from '../../../atoms/search/types';
|
|
2
|
-
interface AppliedFiltersScrollbarProps {
|
|
3
|
-
selectedFilterOptions: SelectedFilterOption[];
|
|
4
|
-
filterBarClassNames: string;
|
|
5
|
-
filterDefaultClasses: string;
|
|
6
|
-
filterHoverClasses: string;
|
|
7
|
-
appliedFilterBackgroundClasses: string;
|
|
8
|
-
onRemoveFilter: (filter: SelectedFilterOption) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare const AppliedFiltersScrollbar: ({ selectedFilterOptions, filterBarClassNames, filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses, onRemoveFilter, }: AppliedFiltersScrollbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import ScrollContainer from 'react-indiana-drag-scroll';
|
|
4
|
-
import { Text } from '../../../components/common/Text/Text';
|
|
5
|
-
export const AppliedFiltersScrollbar = ({ selectedFilterOptions, filterBarClassNames, filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses, onRemoveFilter, }) => {
|
|
6
|
-
if (selectedFilterOptions.length === 0) {
|
|
7
|
-
return null;
|
|
8
|
-
}
|
|
9
|
-
// Extract border and text classes from filterDefaultClasses, excluding background because everything is shared between filters except for the applied filters background
|
|
10
|
-
const filterDefaultWithoutBg = filterDefaultClasses
|
|
11
|
-
.replace(/spiffy-tw-bg-\[--spiffy-colors-[^\]]+\]/g, '')
|
|
12
|
-
.trim();
|
|
13
|
-
const buttonClasses = classNames(' spiffy-tw-flex spiffy-tw-items-center spiffy-tw-rounded-full spiffy-tw-px-[8px] spiffy-tw-py-[4px] spiffy-tw-whitespace-nowrap', filterHoverClasses, filterDefaultWithoutBg, appliedFilterBackgroundClasses);
|
|
14
|
-
const iconColor = 'currentColor'; // match with text color
|
|
15
|
-
return (_jsx(ScrollContainer, { className: filterBarClassNames, hideScrollbars: true, children: selectedFilterOptions.map((filter) => {
|
|
16
|
-
return (_jsx("button", { className: buttonClasses, type: "button", onClick: () => onRemoveFilter(filter), "aria-label": `Remove filter: ${filter.displayName}`, children: _jsxs("div", { className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-[8px]", children: [_jsx(Text, { variant: "body3", children: filter.displayName }), _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: _jsx("path", { d: "M4.59766 4.29297L8.48535 0.405273L9.19238 1.1123L5.30469 5L9.19238 8.8877L8.48535 9.59473L4.59766 5.70703L0.707031 9.59766L0 8.89062L3.89062 5L0 1.10938L0.707031 0.402344L4.59766 4.29297Z", fill: iconColor }) })] }) }, filter.id));
|
|
17
|
-
}) }));
|
|
18
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
interface DynamicFiltersScrollbarProps {
|
|
2
|
-
availableDynamicFilters: {
|
|
3
|
-
name: string;
|
|
4
|
-
displayName: string;
|
|
5
|
-
}[];
|
|
6
|
-
filterBarClassNames: string;
|
|
7
|
-
filterDefaultClasses: string;
|
|
8
|
-
filterHoverClasses: string;
|
|
9
|
-
onToggleDynamicFilter: ({ filter, dynamicFilterDisplayName, }: {
|
|
10
|
-
filter: string;
|
|
11
|
-
dynamicFilterDisplayName: string;
|
|
12
|
-
}) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const DynamicFiltersScrollbar: ({ availableDynamicFilters, filterBarClassNames, filterDefaultClasses, filterHoverClasses, onToggleDynamicFilter, }: DynamicFiltersScrollbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import ScrollContainer from 'react-indiana-drag-scroll';
|
|
4
|
-
import { Text } from '../../../components/common/Text/Text';
|
|
5
|
-
export const DynamicFiltersScrollbar = ({ availableDynamicFilters, filterBarClassNames, filterDefaultClasses, filterHoverClasses, onToggleDynamicFilter, }) => {
|
|
6
|
-
return (_jsx(ScrollContainer, { className: filterBarClassNames, hideScrollbars: true, children: availableDynamicFilters.map(({ name, displayName }) => {
|
|
7
|
-
const buttonClasses = classNames('spiffy-tw-px-[12px] spiffy-tw-py-2 spiffy-tw-rounded-full spiffy-tw-border spiffy-tw-whitespace-nowrap ', filterHoverClasses, filterDefaultClasses);
|
|
8
|
-
return (_jsx("button", { type: "button", className: buttonClasses, onClick: () => {
|
|
9
|
-
onToggleDynamicFilter({
|
|
10
|
-
filter: name,
|
|
11
|
-
dynamicFilterDisplayName: displayName,
|
|
12
|
-
});
|
|
13
|
-
}, children: _jsx(Text, { variant: "body3", children: displayName }) }, name));
|
|
14
|
-
}) }));
|
|
15
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { SearchFilterProps } from './types';
|
|
2
|
-
export declare const SearchFilter: ({ isOpen, setIsOpen, filters, selectFilterItem, clearAllFilters, filterButtonText, radioButtonFillColor, radioButtonHoverColor, radioButtonUncheckedBorderColor, headerContent, }: SearchFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { SearchFilterItem } from './SearchFilterItem';
|
|
4
|
-
import { Text } from '../../../components/common/Text/Text';
|
|
5
|
-
import { ButtonBase } from '../../../components/common/ButtonBase/ButtonBase';
|
|
6
|
-
export const SearchFilter = ({ isOpen, setIsOpen, filters,
|
|
7
|
-
// productCount,
|
|
8
|
-
selectFilterItem, clearAllFilters,
|
|
9
|
-
// applyFiltersUnchangedClasses,
|
|
10
|
-
// applyFiltersChangedClasses,
|
|
11
|
-
filterButtonText, radioButtonFillColor, radioButtonHoverColor, radioButtonUncheckedBorderColor,
|
|
12
|
-
// filterCloseIconVariant,
|
|
13
|
-
headerContent, }) => {
|
|
14
|
-
const modalClasses = classNames('spiffy-tw-fixed spiffy-tw-inset-0 spiffy-tw-z-50 spiffy-tw-flex spiffy-tw-transform spiffy-tw-transition-all', {
|
|
15
|
-
'spiffy-tw-translate-x-full': !isOpen,
|
|
16
|
-
'spiffy-tw-translate-x-0': isOpen,
|
|
17
|
-
});
|
|
18
|
-
const overlayClasses = classNames('spiffy-tw-absolute spiffy-tw-inset-0 spiffy-tw-bg-black spiffy-tw-bg-opacity-50', {
|
|
19
|
-
'spiffy-tw-opacity-0': !isOpen,
|
|
20
|
-
'spiffy-tw-opacity-100': isOpen,
|
|
21
|
-
});
|
|
22
|
-
const sidebarClasses = classNames('spiffy-tw-relative spiffy-tw-ml-auto spiffy-tw-flex spiffy-tw-h-full spiffy-tw-w-full spiffy-tw-max-w-xs spiffy-tw-flex-col spiffy-tw-overflow-y-auto spiffy-tw-bg-[--spiffy-colors-background-light] spiffy-tw-py-4 spiffy-tw-shadow-xl');
|
|
23
|
-
return (_jsxs("div", { className: modalClasses, children: [_jsx("div", { className: overlayClasses, onClick: () => setIsOpen(false) }), _jsxs("div", { className: sidebarClasses, children: [headerContent, _jsx("div", { className: "spiffy-tw-flex-1 spiffy-tw-px-4 spiffy-tw-py-6", children: filters.map((filter) => (_jsxs("div", { className: "spiffy-tw-mb-6", children: [_jsx(Text, { variant: "body2", className: "spiffy-tw-font-medium spiffy-tw-mb-3", children: filter.displayName }), _jsx("ul", { children: filter.items.map((item) => (_jsx(SearchFilterItem, { filterItem: item, onSelectFilterItem: selectFilterItem, radioButtonFillColor: radioButtonFillColor, radioButtonHoverColor: radioButtonHoverColor, radioButtonUncheckedBorderColor: radioButtonUncheckedBorderColor }, item.id))) })] }, filter.id))) }), _jsxs("div", { className: "spiffy-tw-border-t spiffy-tw-border-[--spiffy-colors-border-light] spiffy-tw-px-4 spiffy-tw-py-3", children: [_jsx(ButtonBase, { onClick: clearAllFilters, text: "Clear All", buttonClass: "spiffy-tw-w-full spiffy-tw-mb-2" }), _jsx(ButtonBase, { onClick: () => setIsOpen(false), text: filterButtonText, buttonClass: "spiffy-tw-w-full" })] })] })] }));
|
|
24
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { Text } from '../../../components/common/Text/Text';
|
|
4
|
-
export const SearchFilterHeader = ({ closeModal, productCount, headerClassName, filterCloseIconVariant, }) => {
|
|
5
|
-
const closeIconColor = filterCloseIconVariant === 'dark'
|
|
6
|
-
? 'var(--spiffy-colors-text-primary)'
|
|
7
|
-
: 'var(--spiffy-colors-text-light)';
|
|
8
|
-
return (_jsxs("div", { className: classNames('spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-px-4 spiffy-tw-py-3', headerClassName), children: [_jsxs(Text, { variant: "body2", className: "spiffy-tw-font-medium", children: ["Filters (", productCount, ")"] }), _jsx("button", { onClick: closeModal, className: "spiffy-tw-p-2", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: _jsx("path", { d: "M13.7071 1.70711C14.0976 1.31658 14.0976 0.683417 13.7071 0.292893C13.3166 -0.0976311 12.6834 -0.0976311 12.2929 0.292893L7 5.58579L1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L5.58579 7L0.292893 12.2929C-0.0976311 12.6834 -0.0976311 13.3166 0.292893 13.7071C0.683417 14.0976 1.31658 14.0976 1.70711 13.7071L7 8.41421L12.2929 13.7071C12.6834 14.0976 13.3166 14.0976 13.7071 13.7071C14.0976 13.3166 14.0976 12.6834 13.7071 12.2929L8.41421 7L13.7071 1.70711Z", fill: closeIconColor }) }) })] }));
|
|
9
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { Text } from '../../../components/common/Text/Text';
|
|
4
|
-
export const SearchFilterItem = ({ filterItem, onSelectFilterItem, radioButtonFillColor, radioButtonHoverColor, radioButtonUncheckedBorderColor, }) => {
|
|
5
|
-
const { displayName, isSelected } = filterItem;
|
|
6
|
-
const radioClasses = classNames('spiffy-tw-w-4 spiffy-tw-h-4 spiffy-tw-rounded-full spiffy-tw-border-2', 'spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-center', radioButtonUncheckedBorderColor, radioButtonHoverColor, {
|
|
7
|
-
[radioButtonFillColor]: isSelected,
|
|
8
|
-
});
|
|
9
|
-
return (_jsxs("li", { className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-py-2 spiffy-tw-cursor-pointer", onClick: () => onSelectFilterItem(filterItem), children: [_jsx(Text, { variant: "body3", children: displayName }), _jsx("div", { className: radioClasses, children: isSelected && (_jsx("div", { className: classNames('spiffy-tw-w-2 spiffy-tw-h-2 spiffy-tw-rounded-full', {
|
|
10
|
-
'spiffy-tw-bg-white': radioButtonFillColor.includes('spiffy-tw-bg-'),
|
|
11
|
-
'spiffy-tw-bg-black': radioButtonFillColor.includes('spiffy-tw-bg-white'),
|
|
12
|
-
}) })) })] }));
|
|
13
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
export type SearchFilterItem = {
|
|
3
|
-
id: string;
|
|
4
|
-
displayName: string;
|
|
5
|
-
value: string;
|
|
6
|
-
isSelected: boolean;
|
|
7
|
-
};
|
|
8
|
-
export type SearchFilter = {
|
|
9
|
-
id: string;
|
|
10
|
-
displayName: string;
|
|
11
|
-
items: SearchFilterItem[];
|
|
12
|
-
};
|
|
13
|
-
export type SelectFilterItem = (filterItem: SearchFilterItem) => void;
|
|
14
|
-
export interface SearchFilterItemProps {
|
|
15
|
-
filterItem: SearchFilterItem;
|
|
16
|
-
onSelectFilterItem: SelectFilterItem;
|
|
17
|
-
radioButtonFillColor: string;
|
|
18
|
-
radioButtonHoverColor: string;
|
|
19
|
-
radioButtonUncheckedBorderColor: string;
|
|
20
|
-
}
|
|
21
|
-
export interface SearchFilterHeaderProps {
|
|
22
|
-
closeModal: () => void;
|
|
23
|
-
productCount: number;
|
|
24
|
-
headerClassName: string;
|
|
25
|
-
filterCloseIconVariant: 'dark' | 'light' | 'tertiary';
|
|
26
|
-
}
|
|
27
|
-
export interface SearchFilterProps {
|
|
28
|
-
isOpen: boolean;
|
|
29
|
-
setIsOpen: (isOpen: boolean) => void;
|
|
30
|
-
filters: SearchFilter[];
|
|
31
|
-
productCount: number;
|
|
32
|
-
selectFilterItem: SelectFilterItem;
|
|
33
|
-
clearAllFilters: () => void;
|
|
34
|
-
applyFiltersUnchangedClasses: string;
|
|
35
|
-
applyFiltersChangedClasses: string;
|
|
36
|
-
filterButtonText: string;
|
|
37
|
-
radioButtonFillColor: string;
|
|
38
|
-
radioButtonHoverColor: string;
|
|
39
|
-
radioButtonUncheckedBorderColor: string;
|
|
40
|
-
filterCloseIconVariant: 'dark' | 'light' | 'tertiary';
|
|
41
|
-
headerContent: ReactNode;
|
|
42
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { SearchInputVariant } from '../SearchInputForm/types';
|
|
3
|
-
export interface SearchInputProps {
|
|
4
|
-
searchInputVariant?: SearchInputVariant;
|
|
5
|
-
value: string;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
suggestions?: string[];
|
|
8
|
-
className?: string;
|
|
9
|
-
dataTestId?: string;
|
|
10
|
-
ariaActivedescendant?: string;
|
|
11
|
-
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
12
|
-
onChange: (newValue: string) => void;
|
|
13
|
-
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
14
|
-
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
|