@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.
Files changed (257) hide show
  1. package/dist/AppliedFiltersScrollbar-BlcyhZkZ.cjs +53 -0
  2. package/dist/AppliedFiltersScrollbar-DFGzRemu.js +44 -0
  3. package/dist/ButtonBase-C1rsL9gO.js +60 -0
  4. package/dist/ButtonBase-a8uj6c2f.cjs +69 -0
  5. package/dist/DynamicFiltersScrollbar-B2Rr1KnJ.cjs +41 -0
  6. package/dist/DynamicFiltersScrollbar-Dys6geP0.js +32 -0
  7. package/dist/Headline-L7w3BsBF.cjs +72 -0
  8. package/dist/Headline-ro_Nigw5.js +64 -0
  9. package/dist/ImageWithFallback-CfmkC58B.js +42 -0
  10. package/dist/ImageWithFallback-P3AjyL2Y.cjs +51 -0
  11. package/dist/ProductCard-Btg8tHGc.js +172 -0
  12. package/dist/ProductCard-CS6DZAwO.cjs +193 -0
  13. package/dist/ProductCardSkeleton-BPfp6IOp.js +38 -0
  14. package/dist/ProductCardSkeleton-BgvDlaty.cjs +46 -0
  15. package/dist/ProductGrid-B7QZfW-v.cjs +77 -0
  16. package/dist/ProductGrid-DB_Uq5F-.js +69 -0
  17. package/dist/SearchAutocomplete-C5FL82xC.js +51 -0
  18. package/dist/SearchAutocomplete-wr18dJ8L.cjs +62 -0
  19. package/dist/SearchFilter-D-2IdBKS.js +62 -0
  20. package/dist/SearchFilter-D0IzBlG5.cjs +70 -0
  21. package/dist/SearchFilterHeader-BQT0-ssS.js +37 -0
  22. package/dist/SearchFilterHeader-C3EklfoO.cjs +45 -0
  23. package/dist/SearchFilterItem-BodtWLoP.js +26 -0
  24. package/dist/SearchFilterItem-DmMkiqNC.cjs +34 -0
  25. package/dist/SearchInput-BrcAgcvI.js +89 -0
  26. package/dist/SearchInput-DSB9CwIq.cjs +106 -0
  27. package/dist/SparkleAnimation-BpLwrEqM.cjs +96 -0
  28. package/dist/SparkleAnimation-CXs58sFd.js +85 -0
  29. package/dist/Spinner-BZ-kTOpm.js +38 -0
  30. package/dist/Spinner-CfQ85Ajl.cjs +46 -0
  31. package/dist/Text-Bdv7F5-u.js +42 -0
  32. package/dist/Text-C04c4Z93.cjs +50 -0
  33. package/dist/TextInput-BO80ixsV.cjs +40 -0
  34. package/dist/TextInput-CEGWfdPC.js +31 -0
  35. package/dist/chunk-CUT6urMc.cjs +30 -0
  36. package/dist/colorsConfig-TCONYTQ7.cjs +38 -0
  37. package/dist/colorsConfig-l0ODUVhu.js +26 -0
  38. package/dist/common/ButtonBase/ButtonBase.cjs +5 -0
  39. package/dist/common/ButtonBase/ButtonBase.d.cts +35 -0
  40. package/dist/common/ButtonBase/ButtonBase.d.ts +35 -0
  41. package/dist/common/ButtonBase/ButtonBase.js +5 -0
  42. package/dist/common/Headline/Headline.cjs +4 -0
  43. package/dist/common/Headline/Headline.d.cts +21 -0
  44. package/dist/common/Headline/Headline.d.ts +21 -0
  45. package/dist/common/Headline/Headline.js +4 -0
  46. package/dist/common/ImageWithFallback/ImageWithFallback.cjs +3 -0
  47. package/dist/common/ImageWithFallback/ImageWithFallback.d.cts +26 -0
  48. package/dist/common/ImageWithFallback/ImageWithFallback.d.ts +26 -0
  49. package/dist/common/ImageWithFallback/ImageWithFallback.js +3 -0
  50. package/dist/common/ProductCard/ProductCard.cjs +11 -0
  51. package/dist/common/ProductCard/ProductCard.d.cts +91 -0
  52. package/dist/common/ProductCard/ProductCard.d.ts +91 -0
  53. package/dist/common/ProductCard/ProductCard.js +9 -0
  54. package/dist/common/ProductCard/ProductCardSkeleton.cjs +4 -0
  55. package/dist/common/ProductCard/ProductCardSkeleton.d.cts +12 -0
  56. package/dist/common/ProductCard/ProductCardSkeleton.d.ts +12 -0
  57. package/dist/common/ProductCard/ProductCardSkeleton.js +4 -0
  58. package/dist/common/ProductGrid/ProductGrid.cjs +11 -0
  59. package/dist/common/ProductGrid/ProductGrid.d.cts +26 -0
  60. package/dist/common/ProductGrid/ProductGrid.d.ts +26 -0
  61. package/dist/common/ProductGrid/ProductGrid.js +11 -0
  62. package/dist/common/SparkleAnimation/SparkleAnimation.cjs +3 -0
  63. package/dist/common/SparkleAnimation/SparkleAnimation.d.cts +15 -0
  64. package/dist/common/SparkleAnimation/SparkleAnimation.d.ts +15 -0
  65. package/dist/common/SparkleAnimation/SparkleAnimation.js +3 -0
  66. package/dist/common/Spinner/Spinner.cjs +3 -0
  67. package/dist/common/Spinner/Spinner.d.cts +11 -0
  68. package/dist/common/Spinner/Spinner.d.ts +11 -0
  69. package/dist/common/Spinner/Spinner.js +3 -0
  70. package/dist/common/SuggestionButton/SuggestionButton.cjs +188 -0
  71. package/dist/common/SuggestionButton/SuggestionButton.d.cts +35 -0
  72. package/dist/common/SuggestionButton/SuggestionButton.d.ts +35 -0
  73. package/dist/common/SuggestionButton/SuggestionButton.js +180 -0
  74. package/dist/common/Text/Text.cjs +4 -0
  75. package/dist/common/Text/Text.d.cts +28 -0
  76. package/dist/common/Text/Text.d.ts +28 -0
  77. package/dist/common/Text/Text.js +4 -0
  78. package/dist/common/TextInput/TextInput.cjs +4 -0
  79. package/dist/common/TextInput/TextInput.d.cts +98 -0
  80. package/dist/common/TextInput/TextInput.d.ts +98 -0
  81. package/dist/common/TextInput/TextInput.js +4 -0
  82. package/dist/productCardVariants-C_QIZ-KF.js +45 -0
  83. package/dist/productCardVariants-Dd-wrJKP.cjs +69 -0
  84. package/dist/productGridVariants-CxCKx5Fq.js +20 -0
  85. package/dist/productGridVariants-DVzvjK9i.cjs +26 -0
  86. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.cjs +5 -0
  87. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.d.cts +22 -0
  88. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +22 -0
  89. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.js +5 -0
  90. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.cjs +5 -0
  91. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.d.cts +28 -0
  92. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +28 -0
  93. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.js +5 -0
  94. package/dist/search/SearchFilter/SearchFilter.cjs +7 -0
  95. package/dist/search/SearchFilter/SearchFilter.d.cts +18 -0
  96. package/dist/search/SearchFilter/SearchFilter.d.ts +18 -0
  97. package/dist/search/SearchFilter/SearchFilter.js +7 -0
  98. package/dist/search/SearchFilter/SearchFilterHeader.cjs +5 -0
  99. package/dist/search/SearchFilter/SearchFilterHeader.d.cts +12 -0
  100. package/dist/search/SearchFilter/SearchFilterHeader.d.ts +12 -0
  101. package/dist/search/SearchFilter/SearchFilterHeader.js +5 -0
  102. package/dist/search/SearchFilter/SearchFilterItem.cjs +5 -0
  103. package/dist/search/SearchFilter/SearchFilterItem.d.cts +13 -0
  104. package/dist/search/SearchFilter/SearchFilterItem.d.ts +13 -0
  105. package/dist/search/SearchFilter/SearchFilterItem.js +5 -0
  106. package/dist/search/SearchInput/SearchInput.cjs +6 -0
  107. package/dist/search/SearchInput/SearchInput.d.cts +20 -0
  108. package/dist/search/SearchInput/SearchInput.d.ts +20 -0
  109. package/dist/search/SearchInput/SearchInput.js +6 -0
  110. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.cjs +3 -0
  111. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.d.cts +13 -0
  112. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.d.ts +13 -0
  113. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.js +3 -0
  114. package/dist/search/SearchInputForm/SearchInputForm.cjs +38 -0
  115. package/dist/search/SearchInputForm/SearchInputForm.d.cts +32 -0
  116. package/dist/search/SearchInputForm/SearchInputForm.d.ts +32 -0
  117. package/dist/search/SearchInputForm/SearchInputForm.js +36 -0
  118. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.cjs +52 -0
  119. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.d.cts +28 -0
  120. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +28 -0
  121. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.js +49 -0
  122. package/dist/search/SearchResultsStates/NoSearchResultsFound.cjs +30 -0
  123. package/dist/search/SearchResultsStates/NoSearchResultsFound.d.cts +17 -0
  124. package/dist/search/SearchResultsStates/NoSearchResultsFound.d.ts +17 -0
  125. package/dist/search/SearchResultsStates/NoSearchResultsFound.js +26 -0
  126. package/dist/search/SearchResultsStates/SearchResultsGrid.cjs +66 -0
  127. package/dist/search/SearchResultsStates/SearchResultsGrid.d.cts +41 -0
  128. package/dist/search/SearchResultsStates/SearchResultsGrid.d.ts +41 -0
  129. package/dist/search/SearchResultsStates/SearchResultsGrid.js +62 -0
  130. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.cjs +52 -0
  131. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.d.cts +15 -0
  132. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +15 -0
  133. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.js +49 -0
  134. package/dist/searchFilterSidebarVariants-GfFbQzGf.cjs +39 -0
  135. package/dist/searchFilterSidebarVariants-lJVVZT_2.js +34 -0
  136. package/dist/textVariantClasses-5t3OricK.js +101 -0
  137. package/dist/textVariantClasses-Bhf4VY5z.cjs +125 -0
  138. package/dist/types-53zIialA.d.ts +35 -0
  139. package/dist/types-B4BGZSlV.d.cts +4 -0
  140. package/dist/types-BQNqA5xL.d.ts +46 -0
  141. package/dist/types-BRLWwGMI.d.ts +4 -0
  142. package/dist/types-CImLkcNh.d.cts +46 -0
  143. package/dist/types-Cph97xkm.d.ts +6 -0
  144. package/dist/types-CpiJO5UH.d.ts +4 -0
  145. package/dist/types-DFetqNL2.d.ts +8 -0
  146. package/dist/types-DaSkJnT_.d.cts +8 -0
  147. package/dist/types-Dy4_w6Cf.d.cts +4 -0
  148. package/dist/types-TYhhwWZw.d.cts +6 -0
  149. package/dist/types-aa4flfRE.d.cts +35 -0
  150. package/package.json +8 -8
  151. package/src/components/common/ButtonBase/ButtonBase.tsx +2 -2
  152. package/src/components/common/ButtonBase/types.ts +2 -3
  153. package/dist/src/atoms/search/types.d.ts +0 -5
  154. package/dist/src/atoms/search/types.js +0 -1
  155. package/dist/src/components/common/ButtonBase/ButtonBase.d.ts +0 -2
  156. package/dist/src/components/common/ButtonBase/ButtonBase.js +0 -41
  157. package/dist/src/components/common/ButtonBase/types.d.ts +0 -24
  158. package/dist/src/components/common/ButtonBase/types.js +0 -6
  159. package/dist/src/components/common/Headline/Headline.d.ts +0 -10
  160. package/dist/src/components/common/Headline/Headline.js +0 -34
  161. package/dist/src/components/common/ImageWithFallback/ImageWithFallback.d.ts +0 -12
  162. package/dist/src/components/common/ImageWithFallback/ImageWithFallback.js +0 -26
  163. package/dist/src/components/common/ProductCard/ProductCard.d.ts +0 -39
  164. package/dist/src/components/common/ProductCard/ProductCard.js +0 -84
  165. package/dist/src/components/common/ProductCard/ProductCardSkeleton.d.ts +0 -9
  166. package/dist/src/components/common/ProductCard/ProductCardSkeleton.js +0 -15
  167. package/dist/src/components/common/ProductCard/productCardVariants.d.ts +0 -8
  168. package/dist/src/components/common/ProductCard/productCardVariants.js +0 -50
  169. package/dist/src/components/common/ProductCard/types.d.ts +0 -39
  170. package/dist/src/components/common/ProductCard/types.js +0 -10
  171. package/dist/src/components/common/ProductGrid/ProductGrid.d.ts +0 -14
  172. package/dist/src/components/common/ProductGrid/ProductGrid.js +0 -13
  173. package/dist/src/components/common/ProductGrid/productGridVariants.d.ts +0 -10
  174. package/dist/src/components/common/ProductGrid/productGridVariants.js +0 -16
  175. package/dist/src/components/common/SparkleAnimation/SparkleAnimation.d.ts +0 -7
  176. package/dist/src/components/common/SparkleAnimation/SparkleAnimation.js +0 -40
  177. package/dist/src/components/common/SparkleAnimation/types.d.ts +0 -6
  178. package/dist/src/components/common/SparkleAnimation/types.js +0 -7
  179. package/dist/src/components/common/Spinner/Spinner.d.ts +0 -5
  180. package/dist/src/components/common/Spinner/Spinner.js +0 -16
  181. package/dist/src/components/common/SuggestionButton/SuggestionButton.d.ts +0 -18
  182. package/dist/src/components/common/SuggestionButton/SuggestionButton.js +0 -210
  183. package/dist/src/components/common/SuggestionButton/types.d.ts +0 -1
  184. package/dist/src/components/common/SuggestionButton/types.js +0 -1
  185. package/dist/src/components/common/Text/Text.d.ts +0 -12
  186. package/dist/src/components/common/Text/Text.js +0 -26
  187. package/dist/src/components/common/Text/textVariantClasses.d.ts +0 -171
  188. package/dist/src/components/common/Text/textVariantClasses.js +0 -103
  189. package/dist/src/components/common/Text/types.d.ts +0 -16
  190. package/dist/src/components/common/Text/types.js +0 -6
  191. package/dist/src/components/common/TextInput/TextInput.d.ts +0 -8
  192. package/dist/src/components/common/TextInput/TextInput.js +0 -25
  193. package/dist/src/components/models/colorsConfig.d.ts +0 -26
  194. package/dist/src/components/models/colorsConfig.js +0 -23
  195. package/dist/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +0 -11
  196. package/dist/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.js +0 -18
  197. package/dist/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +0 -15
  198. package/dist/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.js +0 -15
  199. package/dist/src/components/search/SearchFilter/SearchFilter.d.ts +0 -2
  200. package/dist/src/components/search/SearchFilter/SearchFilter.js +0 -24
  201. package/dist/src/components/search/SearchFilter/SearchFilterHeader.d.ts +0 -2
  202. package/dist/src/components/search/SearchFilter/SearchFilterHeader.js +0 -9
  203. package/dist/src/components/search/SearchFilter/SearchFilterItem.d.ts +0 -2
  204. package/dist/src/components/search/SearchFilter/SearchFilterItem.js +0 -13
  205. package/dist/src/components/search/SearchFilter/types.d.ts +0 -42
  206. package/dist/src/components/search/SearchFilter/types.js +0 -1
  207. package/dist/src/components/search/SearchInput/SearchInput.d.ts +0 -16
  208. package/dist/src/components/search/SearchInput/SearchInput.js +0 -38
  209. package/dist/src/components/search/SearchInput/searchInputVariants.d.ts +0 -13
  210. package/dist/src/components/search/SearchInput/searchInputVariants.js +0 -12
  211. package/dist/src/components/search/SearchInputAutocomplete/SearchAutocomplete.d.ts +0 -10
  212. package/dist/src/components/search/SearchInputAutocomplete/SearchAutocomplete.js +0 -14
  213. package/dist/src/components/search/SearchInputForm/SearchInputForm.d.ts +0 -16
  214. package/dist/src/components/search/SearchInputForm/SearchInputForm.js +0 -13
  215. package/dist/src/components/search/SearchInputForm/types.d.ts +0 -1
  216. package/dist/src/components/search/SearchInputForm/types.js +0 -1
  217. package/dist/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +0 -14
  218. package/dist/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.js +0 -15
  219. package/dist/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts +0 -16
  220. package/dist/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.js +0 -29
  221. package/dist/src/components/search/SearchResultsFilterSidebar/types.d.ts +0 -2
  222. package/dist/src/components/search/SearchResultsFilterSidebar/types.js +0 -1
  223. package/dist/src/components/search/SearchResultsStates/NoSearchResultsFound.d.ts +0 -8
  224. package/dist/src/components/search/SearchResultsStates/NoSearchResultsFound.js +0 -10
  225. package/dist/src/components/search/SearchResultsStates/SearchResultsGrid.d.ts +0 -24
  226. package/dist/src/components/search/SearchResultsStates/SearchResultsGrid.js +0 -19
  227. package/dist/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +0 -6
  228. package/dist/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.js +0 -10
  229. package/dist/src/components/search/types.d.ts +0 -5
  230. package/dist/src/components/search/types.js +0 -6
  231. package/dist/src/components/test/types.d.ts +0 -3
  232. package/dist/src/components/test/types.js +0 -1
  233. package/dist/src/config/chatElementDisplayLocation.d.ts +0 -21
  234. package/dist/src/config/chatElementDisplayLocation.js +0 -23
  235. package/dist/src/index.d.ts +0 -45
  236. package/dist/src/index.js +0 -49
  237. package/dist/src/logging/logger.d.ts +0 -7
  238. package/dist/src/logging/logger.js +0 -16
  239. package/dist/src/types/external.d.ts +0 -21
  240. package/dist/src/types/external.js +0 -5
  241. package/dist/src/util/camelCase.d.ts +0 -65
  242. package/dist/src/util/camelCase.js +0 -2
  243. package/dist/src/util/camelCasedPropertiesDeep.d.ts +0 -53
  244. package/dist/src/util/camelCasedPropertiesDeep.js +0 -1
  245. package/dist/src/util/formatPrice.d.ts +0 -1
  246. package/dist/src/util/formatPrice.js +0 -11
  247. package/dist/src/util/internal.d.ts +0 -27
  248. package/dist/src/util/internal.js +0 -4
  249. package/dist/src/util/primitive.d.ts +0 -6
  250. package/dist/src/util/primitive.js +0 -2
  251. package/dist/src/util/splitWords.d.ts +0 -55
  252. package/dist/src/util/splitWords.js +0 -2
  253. package/dist/src/util/trim.d.ts +0 -24
  254. package/dist/src/util/trim.js +0 -2
  255. package/dist/src/util/unknownArray.d.ts +0 -25
  256. package/dist/src/util/unknownArray.js +0 -1
  257. package/src/index.ts +0 -59
@@ -0,0 +1,125 @@
1
+
2
+ //#region src/components/common/Text/textVariantClasses.ts
3
+ const HeadlineVariantMap = {
4
+ t1: {
5
+ "spiffy-headline": true,
6
+ "spiffy-headline-1": true,
7
+ "spiffy-tw-text-[32px]": true,
8
+ "spiffy-tw-font-medium": true,
9
+ "spiffy-tw-leading-[124%]": true
10
+ },
11
+ t2: {
12
+ "spiffy-headline": true,
13
+ "spiffy-headline-1": true,
14
+ "spiffy-tw-text-[16px]": true,
15
+ "spiffy-tw-font-medium": true,
16
+ "spiffy-tw-leading-[124%]": true
17
+ },
18
+ t3: {
19
+ "spiffy-headline": true,
20
+ "spiffy-headline-1": true,
21
+ "spiffy-tw-text-[24px]": true,
22
+ "spiffy-tw-leading-[120%]": true
23
+ },
24
+ h1: {
25
+ "spiffy-headline": true,
26
+ "spiffy-headline-1": true,
27
+ "spiffy-tw-text-[20px]": true,
28
+ "spiffy-tw-font-normal": true,
29
+ "spiffy-tw-leading-[120%]": true
30
+ },
31
+ h2: {
32
+ "spiffy-headline": true,
33
+ "spiffy-headline-2": true,
34
+ "spiffy-tw-text-[16px]": true,
35
+ "spiffy-tw-font-normal": true,
36
+ "spiffy-tw-leading-[124%]": true
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
+ 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
+ const TextStyleVariantMap = {
90
+ ...TextVariantMap,
91
+ ...HeadlineVariantMap
92
+ };
93
+ const getVariantPlaceholderClassNames = (classes) => {
94
+ return Object.keys(classes).reduce((acc, key) => {
95
+ if (key.includes("spiffy-tw")) acc[`placeholder:${key}`] = classes[key];
96
+ else acc[`${key}-placeholder`] = classes[key];
97
+ return acc;
98
+ }, {});
99
+ };
100
+
101
+ //#endregion
102
+ Object.defineProperty(exports, 'HeadlineVariantMap', {
103
+ enumerable: true,
104
+ get: function () {
105
+ return HeadlineVariantMap;
106
+ }
107
+ });
108
+ Object.defineProperty(exports, 'TextStyleVariantMap', {
109
+ enumerable: true,
110
+ get: function () {
111
+ return TextStyleVariantMap;
112
+ }
113
+ });
114
+ Object.defineProperty(exports, 'TextVariantMap', {
115
+ enumerable: true,
116
+ get: function () {
117
+ return TextVariantMap;
118
+ }
119
+ });
120
+ Object.defineProperty(exports, 'getVariantPlaceholderClassNames', {
121
+ enumerable: true,
122
+ get: function () {
123
+ return getVariantPlaceholderClassNames;
124
+ }
125
+ });
@@ -0,0 +1,35 @@
1
+ //#region src/types/external.d.ts
2
+
3
+ interface SearchResponseProduct {
4
+ id: string;
5
+ title: string;
6
+ description?: string;
7
+ price?: number;
8
+ currency?: string;
9
+ imageUrl?: string;
10
+ brand?: string;
11
+ category?: string;
12
+ availability?: string;
13
+ url?: string;
14
+ responseId?: string;
15
+ originalPrice?: number;
16
+ salePrice?: number;
17
+ averageRating?: number;
18
+ numberReviews?: number;
19
+ [key: string]: unknown;
20
+ }
21
+ //#endregion
22
+ //#region src/components/common/ProductCard/types.d.ts
23
+
24
+ type ProductGridVariant = 'standard' | 'square';
25
+ type ProductCardVariant = 'filled' | 'bordered' | 'minimal' | 'transparentBordered';
26
+ type ProductCardHoverVariant = 'backgroundDark' | 'none';
27
+ type ProductCardLayoutVariant = 'normal' | 'tall' | 'square';
28
+ interface ProductCardConfig {
29
+ variant: ProductCardVariant;
30
+ hoverVariant: ProductCardHoverVariant;
31
+ layoutVariant: ProductCardLayoutVariant;
32
+ pricePrefix?: string;
33
+ }
34
+ //#endregion
35
+ export { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant, ProductGridVariant, SearchResponseProduct };
@@ -0,0 +1,4 @@
1
+ //#region src/components/search/SearchResultsFilterSidebar/types.d.ts
2
+ type SearchFilterSidebarVariant = 'darkButton' | 'lightButton';
3
+ //#endregion
4
+ export { SearchFilterSidebarVariant };
@@ -0,0 +1,46 @@
1
+ import { ReactNode } from "react";
2
+
3
+ //#region src/components/search/SearchFilter/types.d.ts
4
+ type SearchFilterItem = {
5
+ id: string;
6
+ displayName: string;
7
+ value: string;
8
+ isSelected: boolean;
9
+ };
10
+ type SearchFilter = {
11
+ id: string;
12
+ displayName: string;
13
+ items: SearchFilterItem[];
14
+ };
15
+ type SelectFilterItem = (filterItem: SearchFilterItem) => void;
16
+ interface SearchFilterItemProps {
17
+ filterItem: SearchFilterItem;
18
+ onSelectFilterItem: SelectFilterItem;
19
+ radioButtonFillColor: string;
20
+ radioButtonHoverColor: string;
21
+ radioButtonUncheckedBorderColor: string;
22
+ }
23
+ interface SearchFilterHeaderProps {
24
+ closeModal: () => void;
25
+ productCount: number;
26
+ headerClassName: string;
27
+ filterCloseIconVariant: 'dark' | 'light' | 'tertiary';
28
+ }
29
+ interface SearchFilterProps {
30
+ isOpen: boolean;
31
+ setIsOpen: (isOpen: boolean) => void;
32
+ filters: SearchFilter[];
33
+ productCount: number;
34
+ selectFilterItem: SelectFilterItem;
35
+ clearAllFilters: () => void;
36
+ applyFiltersUnchangedClasses: string;
37
+ applyFiltersChangedClasses: string;
38
+ filterButtonText: string;
39
+ radioButtonFillColor: string;
40
+ radioButtonHoverColor: string;
41
+ radioButtonUncheckedBorderColor: string;
42
+ filterCloseIconVariant: 'dark' | 'light' | 'tertiary';
43
+ headerContent: ReactNode;
44
+ }
45
+ //#endregion
46
+ export { SearchFilter, SearchFilterHeaderProps, SearchFilterItemProps, SearchFilterProps, SelectFilterItem };
@@ -0,0 +1,4 @@
1
+ //#region src/components/search/SearchInputForm/types.d.ts
2
+ type SearchInputVariant = 'standard';
3
+ //#endregion
4
+ export { SearchInputVariant };
@@ -0,0 +1,46 @@
1
+ import { ReactNode } from "react";
2
+
3
+ //#region src/components/search/SearchFilter/types.d.ts
4
+ type SearchFilterItem = {
5
+ id: string;
6
+ displayName: string;
7
+ value: string;
8
+ isSelected: boolean;
9
+ };
10
+ type SearchFilter = {
11
+ id: string;
12
+ displayName: string;
13
+ items: SearchFilterItem[];
14
+ };
15
+ type SelectFilterItem = (filterItem: SearchFilterItem) => void;
16
+ interface SearchFilterItemProps {
17
+ filterItem: SearchFilterItem;
18
+ onSelectFilterItem: SelectFilterItem;
19
+ radioButtonFillColor: string;
20
+ radioButtonHoverColor: string;
21
+ radioButtonUncheckedBorderColor: string;
22
+ }
23
+ interface SearchFilterHeaderProps {
24
+ closeModal: () => void;
25
+ productCount: number;
26
+ headerClassName: string;
27
+ filterCloseIconVariant: 'dark' | 'light' | 'tertiary';
28
+ }
29
+ interface SearchFilterProps {
30
+ isOpen: boolean;
31
+ setIsOpen: (isOpen: boolean) => void;
32
+ filters: SearchFilter[];
33
+ productCount: number;
34
+ selectFilterItem: SelectFilterItem;
35
+ clearAllFilters: () => void;
36
+ applyFiltersUnchangedClasses: string;
37
+ applyFiltersChangedClasses: string;
38
+ filterButtonText: string;
39
+ radioButtonFillColor: string;
40
+ radioButtonHoverColor: string;
41
+ radioButtonUncheckedBorderColor: string;
42
+ filterCloseIconVariant: 'dark' | 'light' | 'tertiary';
43
+ headerContent: ReactNode;
44
+ }
45
+ //#endregion
46
+ export { SearchFilter, SearchFilterHeaderProps, SearchFilterItemProps, SearchFilterProps, SelectFilterItem };
@@ -0,0 +1,6 @@
1
+ //#region src/components/test/types.d.ts
2
+ interface TestProps {
3
+ dataTestId?: string;
4
+ }
5
+ //#endregion
6
+ export { TestProps };
@@ -0,0 +1,4 @@
1
+ //#region src/components/search/SearchResultsFilterSidebar/types.d.ts
2
+ type SearchFilterSidebarVariant = 'darkButton' | 'lightButton';
3
+ //#endregion
4
+ export { SearchFilterSidebarVariant };
@@ -0,0 +1,8 @@
1
+ //#region src/atoms/search/types.d.ts
2
+ type SelectedFilterOption = {
3
+ id: string;
4
+ displayName: string;
5
+ value: string;
6
+ };
7
+ //#endregion
8
+ export { SelectedFilterOption };
@@ -0,0 +1,8 @@
1
+ //#region src/atoms/search/types.d.ts
2
+ type SelectedFilterOption = {
3
+ id: string;
4
+ displayName: string;
5
+ value: string;
6
+ };
7
+ //#endregion
8
+ export { SelectedFilterOption };
@@ -0,0 +1,4 @@
1
+ //#region src/components/search/SearchInputForm/types.d.ts
2
+ type SearchInputVariant = 'standard';
3
+ //#endregion
4
+ export { SearchInputVariant };
@@ -0,0 +1,6 @@
1
+ //#region src/components/test/types.d.ts
2
+ interface TestProps {
3
+ dataTestId?: string;
4
+ }
5
+ //#endregion
6
+ export { TestProps };
@@ -0,0 +1,35 @@
1
+ //#region src/types/external.d.ts
2
+
3
+ interface SearchResponseProduct {
4
+ id: string;
5
+ title: string;
6
+ description?: string;
7
+ price?: number;
8
+ currency?: string;
9
+ imageUrl?: string;
10
+ brand?: string;
11
+ category?: string;
12
+ availability?: string;
13
+ url?: string;
14
+ responseId?: string;
15
+ originalPrice?: number;
16
+ salePrice?: number;
17
+ averageRating?: number;
18
+ numberReviews?: number;
19
+ [key: string]: unknown;
20
+ }
21
+ //#endregion
22
+ //#region src/components/common/ProductCard/types.d.ts
23
+
24
+ type ProductGridVariant = 'standard' | 'square';
25
+ type ProductCardVariant = 'filled' | 'bordered' | 'minimal' | 'transparentBordered';
26
+ type ProductCardHoverVariant = 'backgroundDark' | 'none';
27
+ type ProductCardLayoutVariant = 'normal' | 'tall' | 'square';
28
+ interface ProductCardConfig {
29
+ variant: ProductCardVariant;
30
+ hoverVariant: ProductCardHoverVariant;
31
+ layoutVariant: ProductCardLayoutVariant;
32
+ pricePrefix?: string;
33
+ }
34
+ //#endregion
35
+ export { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant, ProductGridVariant, SearchResponseProduct };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@envive-ai/react-toolkit",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "React component library for Envive services.",
5
5
  "keywords": [
6
6
  "react",
@@ -11,25 +11,25 @@
11
11
  "author": "Envive AI",
12
12
  "license": "UNLICENSED",
13
13
  "type": "module",
14
- "main": "dist/src/index.js",
15
- "module": "dist/src/index.js",
16
- "types": "dist/src/index.d.ts",
14
+ "main": "dist/index.cjs",
15
+ "module": "dist/index.js",
16
+ "types": "dist/index.d.ts",
17
17
  "files": [
18
18
  "dist",
19
19
  "src",
20
20
  "!**/*.tsbuildinfo"
21
21
  ],
22
22
  "scripts": {
23
- "build": "tsc -p tsconfig.lib.json && tsc-alias -p tsconfig.lib.json",
23
+ "build": "tsdown",
24
24
  "prepublish": "npm run build"
25
25
  },
26
26
  "dependencies": {
27
+ "@envive-ai/react-icons": "0.1.0",
27
28
  "classnames": "^2.5.1",
28
29
  "framer-motion": "^12.23.12",
29
30
  "react-icons": "^5.0.1",
30
31
  "react-indiana-drag-scroll": "^3.0.3-alpha",
31
- "vite-plugin-svgr": "^4.5.0",
32
- "@envive-ai/react-icons": "0.1.0"
32
+ "vite-plugin-svgr": "^4.5.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": "^18.3.1",
@@ -38,7 +38,7 @@
38
38
  "devDependencies": {
39
39
  "@svgr/cli": "^8.1.0",
40
40
  "copyfiles": "^2.4.1",
41
- "tsc-alias": "^1.8.16",
41
+ "tsdown": "^0.14.2",
42
42
  "typescript": "~5.8.3"
43
43
  }
44
44
  }
@@ -1,7 +1,7 @@
1
1
  import classNames from 'classnames';
2
2
  import { createElement, useEffect, useRef } from 'react';
3
- import { ButtonBaseOverrides, type ButtonBaseProps } from './types';
4
- import { Text } from 'src/components/common/Text/Text';
3
+ import { ButtonBaseOverrides, ButtonBaseProps } from './types';
4
+ import { Text } from '../Text/Text';
5
5
 
6
6
  export const ButtonBase = ({
7
7
  type = 'button',
@@ -1,5 +1,5 @@
1
- import type { ButtonHTMLAttributes, CSSProperties } from 'react';
2
- import type { TestProps } from 'src/components/test/types';
1
+ import { ButtonHTMLAttributes, CSSProperties } from 'react';
2
+ import { TestProps } from 'src/components/test/types';
3
3
 
4
4
  export interface ButtonHoverStyles extends CSSProperties {
5
5
  backgroundColor?: string;
@@ -17,7 +17,6 @@ export interface ButtonBaseProps extends TestProps {
17
17
  iconClass?: string;
18
18
  onClick?: () => void;
19
19
  disablePadding?: boolean;
20
- dataTestId?: string;
21
20
  }
22
21
 
23
22
  export enum ButtonBaseOverrides {
@@ -1,5 +0,0 @@
1
- export type SelectedFilterOption = {
2
- id: string;
3
- displayName: string;
4
- value: string;
5
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import { type ButtonBaseProps } from './types';
2
- export declare const ButtonBase: ({ type, isDisabled, dataAttributes, buttonClass, text, textClass, icon, iconClass, dataTestId, onClick, disablePadding, }: ButtonBaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,41 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import classNames from 'classnames';
3
- import { createElement, useEffect, useRef } from 'react';
4
- import { ButtonBaseOverrides } from './types';
5
- import { Text } from '../../../components/common/Text/Text';
6
- export const ButtonBase = ({ type = 'button', isDisabled = false, dataAttributes, buttonClass, text, textClass, icon, iconClass = 'spiffy-tw-w-[21px] spiffy-tw-h-[21px]', dataTestId, onClick, disablePadding = false, }) => {
7
- const buttonRef = useRef(null);
8
- const buttonClassName = classNames({
9
- [ButtonBaseOverrides.BUTTON]: true,
10
- 'spiffy-tw-flex': true,
11
- 'spiffy-tw-min-h-[36px]': true,
12
- 'spiffy-tw-cursor-pointer': true,
13
- 'spiffy-tw-items-center': true,
14
- 'spiffy-tw-gap-2': true,
15
- 'spiffy-tw-px-4': !disablePadding,
16
- 'spiffy-tw-transition-colors': true,
17
- 'spiffy-tw-opacity-40': isDisabled,
18
- 'spiffy-tw-cursor-not-allowed': isDisabled,
19
- [`${buttonClass}`]: buttonClass != null,
20
- });
21
- const textClassName = classNames({
22
- [ButtonBaseOverrides.BUTTON_TEXT]: true,
23
- 'spiffy-tw-whitespace-nowrap': true,
24
- [`${textClass}`]: textClass != null,
25
- });
26
- const iconClassName = classNames({
27
- [ButtonBaseOverrides.BUTTON_ICON]: true,
28
- [`${iconClass}`]: iconClass != null,
29
- });
30
- useEffect(() => {
31
- if (dataAttributes && buttonRef.current) {
32
- Object.entries(dataAttributes).forEach(([key, value]) => {
33
- buttonRef.current?.setAttribute(key, value);
34
- });
35
- }
36
- }, [dataAttributes]);
37
- return (_jsxs("button", { type: type, ref: buttonRef, className: buttonClassName, disabled: isDisabled, "data-testid": dataTestId, onClick: onClick, children: [icon &&
38
- createElement(icon, {
39
- className: iconClassName,
40
- }), _jsx(Text, { className: textClassName, children: text })] }));
41
- };
@@ -1,24 +0,0 @@
1
- import type { ButtonHTMLAttributes, CSSProperties } from 'react';
2
- import type { TestProps } from '../../../components/test/types';
3
- export interface ButtonHoverStyles extends CSSProperties {
4
- backgroundColor?: string;
5
- color?: string;
6
- }
7
- export interface ButtonBaseProps extends TestProps {
8
- type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
9
- isDisabled?: boolean;
10
- dataAttributes?: Record<string, string>;
11
- buttonClass?: string;
12
- text: string;
13
- textClass?: string;
14
- icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
15
- iconClass?: string;
16
- onClick?: () => void;
17
- disablePadding?: boolean;
18
- dataTestId?: string;
19
- }
20
- export declare enum ButtonBaseOverrides {
21
- BUTTON = "spiffy-button-base-button",
22
- BUTTON_TEXT = "spiffy-button-base-button-text",
23
- BUTTON_ICON = "spiffy-button-base-button-icon"
24
- }
@@ -1,6 +0,0 @@
1
- export var ButtonBaseOverrides;
2
- (function (ButtonBaseOverrides) {
3
- ButtonBaseOverrides["BUTTON"] = "spiffy-button-base-button";
4
- ButtonBaseOverrides["BUTTON_TEXT"] = "spiffy-button-base-button-text";
5
- ButtonBaseOverrides["BUTTON_ICON"] = "spiffy-button-base-button-icon";
6
- })(ButtonBaseOverrides || (ButtonBaseOverrides = {}));
@@ -1,10 +0,0 @@
1
- export type HeadlineVariant = 't1' | 't2' | 't3' | 'h1' | 'h2' | 'h3' | 'h4';
2
- export type HeadlineProps = {
3
- children: React.ReactNode;
4
- className?: string;
5
- style?: React.CSSProperties;
6
- variant?: HeadlineVariant;
7
- testId?: string;
8
- id?: string;
9
- };
10
- export declare const Headline: ({ children, className, style, testId, variant }: HeadlineProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,34 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import classNames from 'classnames';
3
- import { HeadlineVariantMap } from '../Text/textVariantClasses';
4
- export const Headline = ({ children, className, style, testId, variant = 'h1' }) => {
5
- const variantClassNames = variant ? HeadlineVariantMap[variant] : {};
6
- const textClassNames = classNames(className, variantClassNames, {
7
- 'spiffy-tw-font-[Poppins,sans-serif]': true,
8
- });
9
- const T1 = () => (_jsx("h1", { "data-testid": testId, className: textClassNames, style: style, children: children }));
10
- const T2 = () => (_jsx("h2", { "data-testid": testId, className: textClassNames, style: style, children: children }));
11
- const T3 = () => (_jsx("h3", { "data-testid": testId, className: textClassNames, style: style, children: children }));
12
- const H1 = () => (_jsx("h1", { "data-testid": testId, className: textClassNames, style: style, children: children }));
13
- const H2 = () => (_jsx("h2", { "data-testid": testId, className: textClassNames, style: style, children: children }));
14
- const H3 = () => (_jsx("h3", { "data-testid": testId, className: textClassNames, style: style, children: children }));
15
- const H4 = () => (_jsx("h4", { "data-testid": testId, className: textClassNames, style: style, children: children }));
16
- switch (variant) {
17
- case 't1':
18
- return T1();
19
- case 't2':
20
- return T2();
21
- case 't3':
22
- return T3();
23
- case 'h1':
24
- return H1();
25
- case 'h2':
26
- return H2();
27
- case 'h3':
28
- return H3();
29
- case 'h4':
30
- return H4();
31
- default:
32
- throw new Error(`Invalid variant: ${variant}`);
33
- }
34
- };
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- export interface ImageWithFallbackProps {
3
- src: string | undefined;
4
- alt: string;
5
- fallbackClassnames?: string;
6
- fallback: React.ReactNode;
7
- dataTestId?: string;
8
- imageClassnames: string;
9
- onLoad?: () => void;
10
- onError?: () => void;
11
- }
12
- export declare const ImageWithFallback: ({ src, alt, dataTestId, fallbackClassnames, fallback, imageClassnames, onLoad, onError, }: ImageWithFallbackProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,26 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import classNames from 'classnames';
3
- import { useState } from 'react';
4
- export const ImageWithFallback = ({ src, alt, dataTestId, fallbackClassnames, fallback, imageClassnames, onLoad, onError, }) => {
5
- const [isLoaded, setIsLoaded] = useState(false);
6
- const [isError, setIsError] = useState(false);
7
- const imageExtraClassnames = classNames(imageClassnames, {
8
- 'spiffy-tw-block': isLoaded,
9
- 'spiffy-tw-hidden': !isLoaded,
10
- });
11
- const fallbackMergedClassNames = classNames({
12
- 'spiffy-tw-flex': true,
13
- 'spiffy-tw-flex-col': true,
14
- 'spiffy-tw-items-center': true,
15
- }, fallbackClassnames);
16
- if (isError) {
17
- return _jsx("div", { className: fallbackMergedClassNames, children: fallback });
18
- }
19
- return (_jsxs(_Fragment, { children: [!isLoaded && _jsx("div", { className: fallbackMergedClassNames, children: fallback }), _jsx("img", { src: src, className: imageExtraClassnames, "data-testid": dataTestId, alt: alt, onLoad: () => {
20
- setIsLoaded(true);
21
- onLoad?.();
22
- }, onError: () => {
23
- setIsError(true);
24
- onError?.();
25
- } })] }));
26
- };
@@ -1,39 +0,0 @@
1
- import type { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant } from './types';
2
- import type { TestProps } from '../../../components/test/types';
3
- import type { ChatElementDisplayLocation } from '../../../config/chatElementDisplayLocation';
4
- interface RatingSummaryProps {
5
- stars: number;
6
- reviewCount: number;
7
- className?: string;
8
- }
9
- export declare const RatingSummary: ({ stars, reviewCount, className }: RatingSummaryProps) => import("react/jsx-runtime").JSX.Element;
10
- interface PriceSectionProps {
11
- originalPrice?: string;
12
- salePrice?: string;
13
- pricePrefix?: string;
14
- }
15
- export declare const PriceSection: ({ originalPrice, salePrice, pricePrefix }: PriceSectionProps) => import("react/jsx-runtime").JSX.Element;
16
- interface ProductCardProps extends TestProps {
17
- productCardConfig?: ProductCardConfig;
18
- merchantShortName: string;
19
- title: string;
20
- url?: string;
21
- searchResponseId?: string;
22
- productResponseId?: string;
23
- cardDisplayLocation: ChatElementDisplayLocation.IN_CHAT | ChatElementDisplayLocation.PRODUCT_GRID;
24
- imageUrl?: string;
25
- originalPrice?: number;
26
- averageRating?: number;
27
- numberReviews?: number;
28
- salePrice?: number;
29
- variant?: ProductCardVariant;
30
- hoverVariant?: ProductCardHoverVariant;
31
- layoutVariant?: ProductCardLayoutVariant;
32
- zoomOnHover?: boolean;
33
- aspectRatio?: '3:4' | 'square' | 'none';
34
- clickPosition?: number | null;
35
- growWithContainer?: boolean;
36
- handleClick: (clickedUrl: string) => void;
37
- }
38
- export declare const ProductCard: ({ productCardConfig, merchantShortName, imageUrl, title, url, originalPrice, averageRating, numberReviews, salePrice, variant, hoverVariant, dataTestId, layoutVariant, zoomOnHover, aspectRatio, growWithContainer, handleClick, }: ProductCardProps) => import("react/jsx-runtime").JSX.Element;
39
- export {};