@envive-ai/react-toolkit 0.1.13 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/package.json +13 -12
  2. package/src/atoms/search/types.ts +1 -5
  3. package/src/components/Accordion/Accordion.tsx +3 -3
  4. package/src/components/AnimatedChevron/index.ts +1 -0
  5. package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +2 -2
  6. package/src/components/ButtonBase/ButtonBase.tsx +2 -2
  7. package/src/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.tsx +2 -2
  8. package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +2 -2
  9. package/src/components/FilterScrollbar/DynamicFiltersScrollbar.tsx +2 -2
  10. package/src/components/ProductCard/ProductCard.tsx +10 -9
  11. package/src/components/RadioButton/RadioButton.tsx +2 -2
  12. package/src/components/SearchFilter/SearchFilterHeader.tsx +3 -3
  13. package/src/components/SearchFilter/SearchFilterItem.tsx +2 -2
  14. package/src/components/SearchFilter/index.ts +4 -2
  15. package/src/components/SearchInput/SearchInput.tsx +1 -1
  16. package/src/components/SearchInput/searchInputVariants.ts +3 -3
  17. package/src/components/SearchInputForm/SearchInputForm.tsx +1 -1
  18. package/src/components/SearchInputForm/index.ts +1 -1
  19. package/src/components/SearchResultsStates/NoSearchResultsFound.tsx +3 -3
  20. package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +2 -2
  21. package/src/components/TextInput/TextInput.tsx +4 -3
  22. package/src/components/ToggleButton/ToggleButton.tsx +5 -5
  23. package/src/components/Typography/Typography.spec.tsx +22 -0
  24. package/src/components/Typography/Typography.tsx +73 -0
  25. package/src/components/Typography/index.ts +2 -0
  26. package/src/components/{Text/textVariantClasses.ts → Typography/typographyVariantClasses.ts} +36 -38
  27. package/src/components/Typography/util.ts +19 -0
  28. package/dist/Accordion/index.cjs +0 -6
  29. package/dist/Accordion/index.d.cts +0 -13
  30. package/dist/Accordion/index.d.ts +0 -13
  31. package/dist/Accordion/index.js +0 -6
  32. package/dist/Accordion-D9gO9_y3.cjs +0 -88
  33. package/dist/Accordion-ZEdp99Ph.js +0 -77
  34. package/dist/AppliedFiltersScrollbar/index.cjs +0 -48
  35. package/dist/AppliedFiltersScrollbar/index.d.cts +0 -22
  36. package/dist/AppliedFiltersScrollbar/index.d.ts +0 -22
  37. package/dist/AppliedFiltersScrollbar/index.js +0 -44
  38. package/dist/ButtonBase/index.cjs +0 -7
  39. package/dist/ButtonBase/index.d.cts +0 -42
  40. package/dist/ButtonBase/index.d.ts +0 -42
  41. package/dist/ButtonBase/index.js +0 -6
  42. package/dist/ButtonBase-0NN6wmX-.js +0 -1
  43. package/dist/ButtonBase-BIXx56hq.cjs +0 -0
  44. package/dist/ButtonBase-DgRupM53.js +0 -60
  45. package/dist/ButtonBase-DrIwVGTR.cjs +0 -75
  46. package/dist/DynamicFiltersScrollbar/index.cjs +0 -36
  47. package/dist/DynamicFiltersScrollbar/index.d.cts +0 -28
  48. package/dist/DynamicFiltersScrollbar/index.d.ts +0 -28
  49. package/dist/DynamicFiltersScrollbar/index.js +0 -32
  50. package/dist/DynamicFiltersScrollbar-B1j53y2q.cjs +0 -81
  51. package/dist/DynamicFiltersScrollbar-D7WYp6x9.js +0 -66
  52. package/dist/FilterScrollbar/index.cjs +0 -6
  53. package/dist/FilterScrollbar/index.d.cts +0 -47
  54. package/dist/FilterScrollbar/index.d.ts +0 -47
  55. package/dist/FilterScrollbar/index.js +0 -5
  56. package/dist/Headline/index.cjs +0 -4
  57. package/dist/Headline/index.d.cts +0 -21
  58. package/dist/Headline/index.d.ts +0 -21
  59. package/dist/Headline/index.js +0 -4
  60. package/dist/Headline-COv0Jbn8.js +0 -64
  61. package/dist/Headline-Cp79THVF.cjs +0 -72
  62. package/dist/ImageWithFallback/index.cjs +0 -3
  63. package/dist/ImageWithFallback/index.d.cts +0 -26
  64. package/dist/ImageWithFallback/index.d.ts +0 -26
  65. package/dist/ImageWithFallback/index.js +0 -3
  66. package/dist/ImageWithFallback-Cx-KNi-D.cjs +0 -51
  67. package/dist/ImageWithFallback-DqxjwO3i.js +0 -42
  68. package/dist/ModalSheet/index.cjs +0 -3
  69. package/dist/ModalSheet/index.d.cts +0 -38
  70. package/dist/ModalSheet/index.d.ts +0 -38
  71. package/dist/ModalSheet/index.js +0 -3
  72. package/dist/ModalSheet-01pxpy_K.js +0 -326
  73. package/dist/ModalSheet-Csz8HIxs.cjs +0 -337
  74. package/dist/ProductCard/index.cjs +0 -17
  75. package/dist/ProductCard/index.d.cts +0 -2
  76. package/dist/ProductCard/index.d.ts +0 -2
  77. package/dist/ProductCard/index.js +0 -8
  78. package/dist/ProductCard-CNwmHggx.js +0 -255
  79. package/dist/ProductCard-EmdDy2af.cjs +0 -319
  80. package/dist/ProductGrid/index.cjs +0 -10
  81. package/dist/ProductGrid/index.d.cts +0 -33
  82. package/dist/ProductGrid/index.d.ts +0 -33
  83. package/dist/ProductGrid/index.js +0 -9
  84. package/dist/ProductGrid-CMoomZLc.cjs +0 -74
  85. package/dist/ProductGrid-nmWSp0qX.js +0 -60
  86. package/dist/RadioButton/index.cjs +0 -6
  87. package/dist/RadioButton/index.d.cts +0 -32
  88. package/dist/RadioButton/index.d.ts +0 -32
  89. package/dist/RadioButton/index.js +0 -6
  90. package/dist/RadioButton-BdKJRzLM.cjs +0 -84
  91. package/dist/RadioButton-S5dALI2f.js +0 -75
  92. package/dist/RadioButtonGroup/index.cjs +0 -8
  93. package/dist/RadioButtonGroup/index.d.cts +0 -36
  94. package/dist/RadioButtonGroup/index.d.ts +0 -36
  95. package/dist/RadioButtonGroup/index.js +0 -7
  96. package/dist/RadioButtonGroup-BipNsoHL.js +0 -38
  97. package/dist/RadioButtonGroup-TAJMA1j_.cjs +0 -52
  98. package/dist/SearchAutocomplete/index.cjs +0 -57
  99. package/dist/SearchAutocomplete/index.d.cts +0 -13
  100. package/dist/SearchAutocomplete/index.d.ts +0 -13
  101. package/dist/SearchAutocomplete/index.js +0 -51
  102. package/dist/SearchFilter/index.cjs +0 -15
  103. package/dist/SearchFilter/index.d.cts +0 -77
  104. package/dist/SearchFilter/index.d.ts +0 -77
  105. package/dist/SearchFilter/index.js +0 -13
  106. package/dist/SearchFilter-BcLc0TMq.cjs +0 -289
  107. package/dist/SearchFilter-w-0s2YVu.js +0 -268
  108. package/dist/SearchInput/index.cjs +0 -97
  109. package/dist/SearchInput/index.d.cts +0 -33
  110. package/dist/SearchInput/index.d.ts +0 -33
  111. package/dist/SearchInput/index.js +0 -90
  112. package/dist/SearchInputForm/index.cjs +0 -0
  113. package/dist/SearchInputForm/index.d.cts +0 -2
  114. package/dist/SearchInputForm/index.d.ts +0 -2
  115. package/dist/SearchInputForm/index.js +0 -1
  116. package/dist/SearchResultsContent/index.cjs +0 -47
  117. package/dist/SearchResultsContent/index.d.cts +0 -48
  118. package/dist/SearchResultsContent/index.d.ts +0 -48
  119. package/dist/SearchResultsContent/index.js +0 -44
  120. package/dist/SearchResultsFilterSidebar/index.cjs +0 -61
  121. package/dist/SearchResultsFilterSidebar/index.d.cts +0 -2
  122. package/dist/SearchResultsFilterSidebar/index.d.ts +0 -2
  123. package/dist/SearchResultsFilterSidebar/index.js +0 -56
  124. package/dist/SearchResultsStates/index.cjs +0 -17
  125. package/dist/SearchResultsStates/index.d.cts +0 -69
  126. package/dist/SearchResultsStates/index.d.ts +0 -69
  127. package/dist/SearchResultsStates/index.js +0 -15
  128. package/dist/SearchResultsStates-DlZz14yy.js +0 -110
  129. package/dist/SearchResultsStates-DwcPrsdd.cjs +0 -132
  130. package/dist/SparkleAnimation/index.cjs +0 -4
  131. package/dist/SparkleAnimation/index.d.cts +0 -23
  132. package/dist/SparkleAnimation/index.d.ts +0 -23
  133. package/dist/SparkleAnimation/index.js +0 -3
  134. package/dist/SparkleAnimation-CvGlWUqv.cjs +0 -101
  135. package/dist/SparkleAnimation-paLhSu5E.js +0 -84
  136. package/dist/Spinner/index.cjs +0 -3
  137. package/dist/Spinner/index.d.cts +0 -11
  138. package/dist/Spinner/index.d.ts +0 -11
  139. package/dist/Spinner/index.js +0 -3
  140. package/dist/Spinner-CjGLIRgs.js +0 -38
  141. package/dist/Spinner-DFor2Szi.cjs +0 -46
  142. package/dist/SuggestionButton/index.cjs +0 -188
  143. package/dist/SuggestionButton/index.d.cts +0 -35
  144. package/dist/SuggestionButton/index.d.ts +0 -35
  145. package/dist/SuggestionButton/index.js +0 -180
  146. package/dist/Text/index.cjs +0 -10
  147. package/dist/Text/index.d.cts +0 -42
  148. package/dist/Text/index.d.ts +0 -42
  149. package/dist/Text/index.js +0 -5
  150. package/dist/Text-BLzNhX4H.js +0 -42
  151. package/dist/Text-BMsncrpY.js +0 -10
  152. package/dist/Text-C8t_iEj6.cjs +0 -16
  153. package/dist/Text-DllCE9_D.cjs +0 -50
  154. package/dist/TextInput/index.cjs +0 -4
  155. package/dist/TextInput/index.d.cts +0 -12
  156. package/dist/TextInput/index.d.ts +0 -12
  157. package/dist/TextInput/index.js +0 -4
  158. package/dist/TextInput-DmsOxxPN.js +0 -31
  159. package/dist/TextInput-HMW0hxLI.cjs +0 -40
  160. package/dist/ToggleButton/index.cjs +0 -6
  161. package/dist/ToggleButton/index.d.cts +0 -30
  162. package/dist/ToggleButton/index.d.ts +0 -30
  163. package/dist/ToggleButton/index.js +0 -6
  164. package/dist/ToggleButton-DblAj4Cd.cjs +0 -68
  165. package/dist/ToggleButton-r7Y7Kzzo.js +0 -60
  166. package/dist/chunk-CUT6urMc.cjs +0 -30
  167. package/dist/colorsConfig-B3-SMUSx.cjs +0 -38
  168. package/dist/colorsConfig-DZ-GSPWy.js +0 -26
  169. package/dist/index-BKvXn5sj.d.ts +0 -4
  170. package/dist/index-Br1B7Jta.d.cts +0 -46
  171. package/dist/index-DADHwW6M.d.ts +0 -325
  172. package/dist/index-DDp-fLgm.d.cts +0 -325
  173. package/dist/index-Dh8rcWev.d.ts +0 -46
  174. package/dist/index-W1wCDiw_.d.cts +0 -4
  175. package/dist/searchFilterSidebarVariants-J0FJ8pck.js +0 -34
  176. package/dist/searchFilterSidebarVariants-kkTjYEIF.cjs +0 -39
  177. package/dist/textVariantClasses-B0gNjzl4.d.cts +0 -174
  178. package/dist/textVariantClasses-C8OCWZAw.d.ts +0 -174
  179. package/dist/textVariantClasses-CBre7vXv.cjs +0 -123
  180. package/dist/textVariantClasses-CRrTb43V.js +0 -99
  181. package/src/components/Headline/Headline.tsx +0 -81
  182. package/src/components/Headline/index.ts +0 -1
  183. package/src/components/SearchInputForm/types.ts +0 -1
  184. package/src/components/Text/Text.tsx +0 -58
  185. package/src/components/Text/index.ts +0 -3
  186. package/src/components/Text/types.ts +0 -23
@@ -1,99 +0,0 @@
1
- //#region src/components/Text/textVariantClasses.ts
2
- 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
- const TextVariantMap = {
53
- body1: {
54
- "spiffy-body-text": true,
55
- "spiffy-body-1": true,
56
- "spiffy-tw-text-[20px]": true,
57
- "spiffy-tw-font-normal": true,
58
- "spiffy-tw-line-height-[120%]": true
59
- },
60
- body2: {
61
- "spiffy-body-text": true,
62
- "spiffy-body-2": true,
63
- "spiffy-tw-text-[16px]": true,
64
- "spiffy-tw-font-normal": true,
65
- "spiffy-tw-line-height-[148%]": true
66
- },
67
- body3: {
68
- "spiffy-body-text": true,
69
- "spiffy-body-3": true,
70
- "spiffy-tw-text-sm": true,
71
- "spiffy-tw-font-normal": true,
72
- "spiffy-tw-leading-[140%]": true
73
- },
74
- body4: {
75
- "spiffy-body-text": true,
76
- "spiffy-body-4": true,
77
- "spiffy-tw-text-xs": true,
78
- "spiffy-tw-font-medium": true,
79
- "spiffy-tw-leading-[130%]": true
80
- },
81
- body5: {
82
- "spiffy-body-text": true,
83
- "spiffy-body-5": true,
84
- "spiffy-tw-text-[10px]": true,
85
- "spiffy-tw-font-normal": true
86
- }
87
- };
88
- const TextStyleVariantMap = {
89
- ...TextVariantMap,
90
- ...HeadlineVariantMap
91
- };
92
- const getVariantPlaceholderClassNames = (classes) => Object.keys(classes).reduce((acc, key) => {
93
- if (key.includes("spiffy-tw")) acc[`placeholder:${key}`] = classes[key];
94
- else acc[`${key}-placeholder`] = classes[key];
95
- return acc;
96
- }, {});
97
-
98
- //#endregion
99
- export { HeadlineVariantMap, TextStyleVariantMap, TextVariantMap, getVariantPlaceholderClassNames };
@@ -1,81 +0,0 @@
1
- import classNames from 'classnames';
2
- import { HeadlineVariantMap } from '../Text/textVariantClasses';
3
-
4
- export type HeadlineVariant = 't1' | 't2' | 't3' | 'h1' | 'h2' | 'h3' | 'h4';
5
-
6
- export type HeadlineProps = {
7
- children: React.ReactNode;
8
- className?: string;
9
- style?: React.CSSProperties;
10
- variant?: HeadlineVariant;
11
- testId?: string;
12
- id?: string;
13
- };
14
-
15
- export const Headline = ({ children, className, style, testId, variant = 'h1' }: HeadlineProps) => {
16
- const variantClassNames = variant ? HeadlineVariantMap[variant] : {};
17
- const textClassNames = classNames(className, variantClassNames, {
18
- 'spiffy-tw-font-[Poppins,sans-serif]': true,
19
- });
20
-
21
- const T1 = () => (
22
- <h1 data-testid={testId} className={textClassNames} style={style}>
23
- {children}
24
- </h1>
25
- );
26
-
27
- const T2 = () => (
28
- <h2 data-testid={testId} className={textClassNames} style={style}>
29
- {children}
30
- </h2>
31
- );
32
-
33
- const T3 = () => (
34
- <h3 data-testid={testId} className={textClassNames} style={style}>
35
- {children}
36
- </h3>
37
- );
38
-
39
- const H1 = () => (
40
- <h1 data-testid={testId} className={textClassNames} style={style}>
41
- {children}
42
- </h1>
43
- );
44
-
45
- const H2 = () => (
46
- <h2 data-testid={testId} className={textClassNames} style={style}>
47
- {children}
48
- </h2>
49
- );
50
-
51
- const H3 = () => (
52
- <h3 data-testid={testId} className={textClassNames} style={style}>
53
- {children}
54
- </h3>
55
- );
56
-
57
- const H4 = () => (
58
- <h4 data-testid={testId} className={textClassNames} style={style}>
59
- {children}
60
- </h4>
61
- );
62
-
63
- switch (variant) {
64
- case 't1':
65
- return T1();
66
- case 't2':
67
- return T2();
68
- case 't3':
69
- return T3();
70
- case 'h1':
71
- return H1();
72
- case 'h2':
73
- return H2();
74
- case 'h3':
75
- return H3();
76
- case 'h4':
77
- return H4();
78
- default:
79
- throw new Error(`Invalid variant: ${variant}`);
80
- }
81
- };
@@ -1 +0,0 @@
1
- export * from './Headline';
@@ -1 +0,0 @@
1
- export type SearchInputVariant = 'standard';
@@ -1,58 +0,0 @@
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
- };
@@ -1,3 +0,0 @@
1
- export * from './Text';
2
- export * from './textVariantClasses';
3
- export * from './types';
@@ -1,23 +0,0 @@
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';