@envive-ai/react-toolkit 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (404) hide show
  1. package/LICENSE +2 -0
  2. package/dist/AppliedFiltersScrollbar-BlcyhZkZ.cjs +53 -0
  3. package/dist/AppliedFiltersScrollbar-DFGzRemu.js +44 -0
  4. package/dist/ButtonBase-C1rsL9gO.js +60 -0
  5. package/dist/ButtonBase-a8uj6c2f.cjs +69 -0
  6. package/dist/DynamicFiltersScrollbar-B2Rr1KnJ.cjs +41 -0
  7. package/dist/DynamicFiltersScrollbar-Dys6geP0.js +32 -0
  8. package/dist/Headline-L7w3BsBF.cjs +72 -0
  9. package/dist/Headline-ro_Nigw5.js +64 -0
  10. package/dist/ImageWithFallback-CfmkC58B.js +42 -0
  11. package/dist/ImageWithFallback-P3AjyL2Y.cjs +51 -0
  12. package/dist/ProductCard-Btg8tHGc.js +172 -0
  13. package/dist/ProductCard-CS6DZAwO.cjs +193 -0
  14. package/dist/ProductCardSkeleton-BPfp6IOp.js +38 -0
  15. package/dist/ProductCardSkeleton-BgvDlaty.cjs +46 -0
  16. package/dist/ProductGrid-B7QZfW-v.cjs +77 -0
  17. package/dist/ProductGrid-DB_Uq5F-.js +69 -0
  18. package/dist/SearchAutocomplete-C5FL82xC.js +51 -0
  19. package/dist/SearchAutocomplete-wr18dJ8L.cjs +62 -0
  20. package/dist/SearchFilter-D-2IdBKS.js +62 -0
  21. package/dist/SearchFilter-D0IzBlG5.cjs +70 -0
  22. package/dist/SearchFilterHeader-BQT0-ssS.js +37 -0
  23. package/dist/SearchFilterHeader-C3EklfoO.cjs +45 -0
  24. package/dist/SearchFilterItem-BodtWLoP.js +26 -0
  25. package/dist/SearchFilterItem-DmMkiqNC.cjs +34 -0
  26. package/dist/SearchInput-BrcAgcvI.js +89 -0
  27. package/dist/SearchInput-DSB9CwIq.cjs +106 -0
  28. package/dist/SparkleAnimation-BpLwrEqM.cjs +96 -0
  29. package/dist/SparkleAnimation-CXs58sFd.js +85 -0
  30. package/dist/Spinner-BZ-kTOpm.js +38 -0
  31. package/dist/Spinner-CfQ85Ajl.cjs +46 -0
  32. package/dist/Text-Bdv7F5-u.js +42 -0
  33. package/dist/Text-C04c4Z93.cjs +50 -0
  34. package/dist/TextInput-BO80ixsV.cjs +40 -0
  35. package/dist/TextInput-CEGWfdPC.js +31 -0
  36. package/dist/chunk-CUT6urMc.cjs +30 -0
  37. package/dist/colorsConfig-TCONYTQ7.cjs +38 -0
  38. package/dist/colorsConfig-l0ODUVhu.js +26 -0
  39. package/dist/common/ButtonBase/ButtonBase.cjs +5 -0
  40. package/dist/common/ButtonBase/ButtonBase.d.cts +35 -0
  41. package/dist/common/ButtonBase/ButtonBase.d.ts +35 -0
  42. package/dist/common/ButtonBase/ButtonBase.js +5 -0
  43. package/dist/common/Headline/Headline.cjs +4 -0
  44. package/dist/common/Headline/Headline.d.cts +21 -0
  45. package/dist/common/Headline/Headline.d.ts +21 -0
  46. package/dist/common/Headline/Headline.js +4 -0
  47. package/dist/common/ImageWithFallback/ImageWithFallback.cjs +3 -0
  48. package/dist/common/ImageWithFallback/ImageWithFallback.d.cts +26 -0
  49. package/dist/common/ImageWithFallback/ImageWithFallback.d.ts +26 -0
  50. package/dist/common/ImageWithFallback/ImageWithFallback.js +3 -0
  51. package/dist/common/ProductCard/ProductCard.cjs +11 -0
  52. package/dist/common/ProductCard/ProductCard.d.cts +91 -0
  53. package/dist/common/ProductCard/ProductCard.d.ts +91 -0
  54. package/dist/common/ProductCard/ProductCard.js +9 -0
  55. package/dist/common/ProductCard/ProductCardSkeleton.cjs +4 -0
  56. package/dist/common/ProductCard/ProductCardSkeleton.d.cts +12 -0
  57. package/dist/common/ProductCard/ProductCardSkeleton.d.ts +12 -0
  58. package/dist/common/ProductCard/ProductCardSkeleton.js +4 -0
  59. package/dist/common/ProductGrid/ProductGrid.cjs +11 -0
  60. package/dist/common/ProductGrid/ProductGrid.d.cts +26 -0
  61. package/dist/common/ProductGrid/ProductGrid.d.ts +26 -0
  62. package/dist/common/ProductGrid/ProductGrid.js +11 -0
  63. package/dist/common/SparkleAnimation/SparkleAnimation.cjs +3 -0
  64. package/dist/common/SparkleAnimation/SparkleAnimation.d.cts +15 -0
  65. package/dist/common/SparkleAnimation/SparkleAnimation.d.ts +15 -0
  66. package/dist/common/SparkleAnimation/SparkleAnimation.js +3 -0
  67. package/dist/common/Spinner/Spinner.cjs +3 -0
  68. package/dist/common/Spinner/Spinner.d.cts +11 -0
  69. package/dist/common/Spinner/Spinner.d.ts +11 -0
  70. package/dist/common/Spinner/Spinner.js +3 -0
  71. package/dist/common/SuggestionButton/SuggestionButton.cjs +188 -0
  72. package/dist/common/SuggestionButton/SuggestionButton.d.cts +35 -0
  73. package/dist/common/SuggestionButton/SuggestionButton.d.ts +35 -0
  74. package/dist/common/SuggestionButton/SuggestionButton.js +180 -0
  75. package/dist/common/Text/Text.cjs +4 -0
  76. package/dist/common/Text/Text.d.cts +28 -0
  77. package/dist/common/Text/Text.d.ts +28 -0
  78. package/dist/common/Text/Text.js +4 -0
  79. package/dist/common/TextInput/TextInput.cjs +4 -0
  80. package/dist/common/TextInput/TextInput.d.cts +98 -0
  81. package/dist/common/TextInput/TextInput.d.ts +98 -0
  82. package/dist/common/TextInput/TextInput.js +4 -0
  83. package/dist/productCardVariants-C_QIZ-KF.js +45 -0
  84. package/dist/productCardVariants-Dd-wrJKP.cjs +69 -0
  85. package/dist/productGridVariants-CxCKx5Fq.js +20 -0
  86. package/dist/productGridVariants-DVzvjK9i.cjs +26 -0
  87. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.cjs +5 -0
  88. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.d.cts +22 -0
  89. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +22 -0
  90. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.js +5 -0
  91. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.cjs +5 -0
  92. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.d.cts +28 -0
  93. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +28 -0
  94. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.js +5 -0
  95. package/dist/search/SearchFilter/SearchFilter.cjs +7 -0
  96. package/dist/search/SearchFilter/SearchFilter.d.cts +18 -0
  97. package/dist/search/SearchFilter/SearchFilter.d.ts +18 -0
  98. package/dist/search/SearchFilter/SearchFilter.js +7 -0
  99. package/dist/search/SearchFilter/SearchFilterHeader.cjs +5 -0
  100. package/dist/search/SearchFilter/SearchFilterHeader.d.cts +12 -0
  101. package/dist/search/SearchFilter/SearchFilterHeader.d.ts +12 -0
  102. package/dist/search/SearchFilter/SearchFilterHeader.js +5 -0
  103. package/dist/search/SearchFilter/SearchFilterItem.cjs +5 -0
  104. package/dist/search/SearchFilter/SearchFilterItem.d.cts +13 -0
  105. package/dist/search/SearchFilter/SearchFilterItem.d.ts +13 -0
  106. package/dist/search/SearchFilter/SearchFilterItem.js +5 -0
  107. package/dist/search/SearchInput/SearchInput.cjs +6 -0
  108. package/dist/search/SearchInput/SearchInput.d.cts +20 -0
  109. package/dist/search/SearchInput/SearchInput.d.ts +20 -0
  110. package/dist/search/SearchInput/SearchInput.js +6 -0
  111. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.cjs +3 -0
  112. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.d.cts +13 -0
  113. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.d.ts +13 -0
  114. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.js +3 -0
  115. package/dist/search/SearchInputForm/SearchInputForm.cjs +38 -0
  116. package/dist/search/SearchInputForm/SearchInputForm.d.cts +32 -0
  117. package/dist/search/SearchInputForm/SearchInputForm.d.ts +32 -0
  118. package/dist/search/SearchInputForm/SearchInputForm.js +36 -0
  119. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.cjs +52 -0
  120. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.d.cts +28 -0
  121. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +28 -0
  122. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.js +49 -0
  123. package/dist/search/SearchResultsStates/NoSearchResultsFound.cjs +30 -0
  124. package/dist/search/SearchResultsStates/NoSearchResultsFound.d.cts +17 -0
  125. package/dist/search/SearchResultsStates/NoSearchResultsFound.d.ts +17 -0
  126. package/dist/search/SearchResultsStates/NoSearchResultsFound.js +26 -0
  127. package/dist/search/SearchResultsStates/SearchResultsGrid.cjs +66 -0
  128. package/dist/search/SearchResultsStates/SearchResultsGrid.d.cts +41 -0
  129. package/dist/search/SearchResultsStates/SearchResultsGrid.d.ts +41 -0
  130. package/dist/search/SearchResultsStates/SearchResultsGrid.js +62 -0
  131. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.cjs +52 -0
  132. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.d.cts +15 -0
  133. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +15 -0
  134. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.js +49 -0
  135. package/dist/searchFilterSidebarVariants-GfFbQzGf.cjs +39 -0
  136. package/dist/searchFilterSidebarVariants-lJVVZT_2.js +34 -0
  137. package/dist/textVariantClasses-5t3OricK.js +101 -0
  138. package/dist/textVariantClasses-Bhf4VY5z.cjs +125 -0
  139. package/dist/types-53zIialA.d.ts +35 -0
  140. package/dist/types-B4BGZSlV.d.cts +4 -0
  141. package/dist/types-BQNqA5xL.d.ts +46 -0
  142. package/dist/types-BRLWwGMI.d.ts +4 -0
  143. package/dist/types-CImLkcNh.d.cts +46 -0
  144. package/dist/types-Cph97xkm.d.ts +6 -0
  145. package/dist/types-CpiJO5UH.d.ts +4 -0
  146. package/dist/types-DFetqNL2.d.ts +8 -0
  147. package/dist/types-DaSkJnT_.d.cts +8 -0
  148. package/dist/types-Dy4_w6Cf.d.cts +4 -0
  149. package/dist/types-TYhhwWZw.d.cts +6 -0
  150. package/dist/types-aa4flfRE.d.cts +35 -0
  151. package/package.json +8 -5
  152. package/src/atoms/search/types.ts +5 -0
  153. package/src/components/common/ButtonBase/ButtonBase.tsx +70 -0
  154. package/src/components/common/ButtonBase/types.ts +26 -0
  155. package/src/components/common/Headline/Headline.tsx +81 -0
  156. package/src/components/common/ImageWithFallback/ImageWithFallback.tsx +66 -0
  157. package/src/components/common/ProductCard/ProductCard.tsx +305 -0
  158. package/src/components/common/ProductCard/ProductCardSkeleton.tsx +83 -0
  159. package/src/components/common/ProductCard/productCardVariants.ts +63 -0
  160. package/src/components/common/ProductCard/types.ts +49 -0
  161. package/src/components/common/ProductGrid/ProductGrid.tsx +73 -0
  162. package/src/components/common/ProductGrid/productGridVariants.ts +31 -0
  163. package/src/components/common/SparkleAnimation/SparkleAnimation.tsx +105 -0
  164. package/src/components/common/SparkleAnimation/types.ts +6 -0
  165. package/src/components/common/Spinner/Spinner.tsx +30 -0
  166. package/src/components/common/SuggestionButton/SuggestionButton.tsx +258 -0
  167. package/src/components/common/SuggestionButton/types.ts +14 -0
  168. package/src/components/common/Text/Text.tsx +58 -0
  169. package/src/components/common/Text/textVariantClasses.ts +106 -0
  170. package/src/components/common/Text/types.ts +23 -0
  171. package/src/components/common/TextInput/TextInput.tsx +34 -0
  172. package/src/components/models/colorsConfig.ts +28 -0
  173. package/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.tsx +70 -0
  174. package/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.tsx +52 -0
  175. package/src/components/search/SearchFilter/SearchFilter.tsx +84 -0
  176. package/src/components/search/SearchFilter/SearchFilterHeader.tsx +42 -0
  177. package/src/components/search/SearchFilter/SearchFilterItem.tsx +42 -0
  178. package/src/components/search/SearchFilter/types.ts +48 -0
  179. package/src/components/search/SearchInput/SearchInput.tsx +135 -0
  180. package/src/components/search/SearchInput/searchInputVariants.ts +27 -0
  181. package/src/components/search/SearchInputAutocomplete/SearchAutocomplete.tsx +62 -0
  182. package/src/components/search/SearchInputForm/SearchInputForm.tsx +66 -0
  183. package/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.tsx +82 -0
  184. package/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +45 -0
  185. package/{dist/packages/components/src/components/search/SearchResultsFilterSidebar/types.d.ts → src/components/search/SearchResultsFilterSidebar/types.ts} +1 -1
  186. package/src/components/search/SearchResultsStates/NoSearchResultsFound.tsx +41 -0
  187. package/src/components/search/SearchResultsStates/SearchResultsGrid.tsx +105 -0
  188. package/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.tsx +50 -0
  189. package/src/components/search/types.ts +5 -0
  190. package/{dist/packages/components/src/components/test/types.d.ts → src/components/test/types.ts} +1 -1
  191. package/src/config/chatElementDisplayLocation.ts +22 -0
  192. package/src/logging/logger.ts +21 -0
  193. package/src/types/external.ts +24 -0
  194. package/{dist/packages/components/src/util/camelCase.d.ts → src/util/camelCase.ts} +33 -11
  195. package/src/util/camelCasedPropertiesDeep.ts +81 -0
  196. package/src/util/formatPrice.ts +14 -0
  197. package/src/util/internal.ts +95 -0
  198. package/{dist/src/util/primitive.d.ts → src/util/primitive.ts} +2 -0
  199. package/src/util/splitWords.ts +72 -0
  200. package/{dist/src/util/trim.d.ts → src/util/trim.ts} +5 -1
  201. package/dist/packages/components/src/atoms/search/types.d.ts +0 -5
  202. package/dist/packages/components/src/atoms/search/types.js +0 -1
  203. package/dist/packages/components/src/components/common/ButtonBase/ButtonBase.d.ts +0 -2
  204. package/dist/packages/components/src/components/common/ButtonBase/ButtonBase.js +0 -41
  205. package/dist/packages/components/src/components/common/ButtonBase/types.d.ts +0 -24
  206. package/dist/packages/components/src/components/common/ButtonBase/types.js +0 -6
  207. package/dist/packages/components/src/components/common/Headline/Headline.d.ts +0 -10
  208. package/dist/packages/components/src/components/common/Headline/Headline.js +0 -34
  209. package/dist/packages/components/src/components/common/ImageWithFallback/ImageWithFallback.d.ts +0 -12
  210. package/dist/packages/components/src/components/common/ImageWithFallback/ImageWithFallback.js +0 -26
  211. package/dist/packages/components/src/components/common/ProductCard/ProductCard.d.ts +0 -39
  212. package/dist/packages/components/src/components/common/ProductCard/ProductCard.js +0 -83
  213. package/dist/packages/components/src/components/common/ProductCard/ProductCardSkeleton.d.ts +0 -9
  214. package/dist/packages/components/src/components/common/ProductCard/ProductCardSkeleton.js +0 -15
  215. package/dist/packages/components/src/components/common/ProductCard/productCardVariants.d.ts +0 -8
  216. package/dist/packages/components/src/components/common/ProductCard/productCardVariants.js +0 -50
  217. package/dist/packages/components/src/components/common/ProductCard/types.d.ts +0 -39
  218. package/dist/packages/components/src/components/common/ProductCard/types.js +0 -10
  219. package/dist/packages/components/src/components/common/ProductGrid/ProductGrid.d.ts +0 -14
  220. package/dist/packages/components/src/components/common/ProductGrid/ProductGrid.js +0 -13
  221. package/dist/packages/components/src/components/common/ProductGrid/productGridVariants.d.ts +0 -10
  222. package/dist/packages/components/src/components/common/ProductGrid/productGridVariants.js +0 -16
  223. package/dist/packages/components/src/components/common/SparkleAnimation/SparkleAnimation.d.ts +0 -7
  224. package/dist/packages/components/src/components/common/SparkleAnimation/SparkleAnimation.js +0 -40
  225. package/dist/packages/components/src/components/common/SparkleAnimation/types.d.ts +0 -6
  226. package/dist/packages/components/src/components/common/SparkleAnimation/types.js +0 -7
  227. package/dist/packages/components/src/components/common/Spinner/Spinner.d.ts +0 -5
  228. package/dist/packages/components/src/components/common/Spinner/Spinner.js +0 -16
  229. package/dist/packages/components/src/components/common/SuggestionButton/SuggestionButton.d.ts +0 -18
  230. package/dist/packages/components/src/components/common/SuggestionButton/SuggestionButton.js +0 -210
  231. package/dist/packages/components/src/components/common/SuggestionButton/types.d.ts +0 -1
  232. package/dist/packages/components/src/components/common/SuggestionButton/types.js +0 -1
  233. package/dist/packages/components/src/components/common/Text/Text.d.ts +0 -12
  234. package/dist/packages/components/src/components/common/Text/Text.js +0 -26
  235. package/dist/packages/components/src/components/common/Text/textVariantClasses.d.ts +0 -171
  236. package/dist/packages/components/src/components/common/Text/textVariantClasses.js +0 -103
  237. package/dist/packages/components/src/components/common/Text/types.d.ts +0 -16
  238. package/dist/packages/components/src/components/common/Text/types.js +0 -6
  239. package/dist/packages/components/src/components/common/TextInput/TextInput.d.ts +0 -8
  240. package/dist/packages/components/src/components/common/TextInput/TextInput.js +0 -25
  241. package/dist/packages/components/src/components/models/colorsConfig.d.ts +0 -26
  242. package/dist/packages/components/src/components/models/colorsConfig.js +0 -23
  243. package/dist/packages/components/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +0 -11
  244. package/dist/packages/components/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.js +0 -18
  245. package/dist/packages/components/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +0 -15
  246. package/dist/packages/components/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.js +0 -15
  247. package/dist/packages/components/src/components/search/SearchFilter/SearchFilter.d.ts +0 -2
  248. package/dist/packages/components/src/components/search/SearchFilter/SearchFilter.js +0 -24
  249. package/dist/packages/components/src/components/search/SearchFilter/SearchFilterHeader.d.ts +0 -2
  250. package/dist/packages/components/src/components/search/SearchFilter/SearchFilterHeader.js +0 -9
  251. package/dist/packages/components/src/components/search/SearchFilter/SearchFilterItem.d.ts +0 -2
  252. package/dist/packages/components/src/components/search/SearchFilter/SearchFilterItem.js +0 -13
  253. package/dist/packages/components/src/components/search/SearchFilter/types.d.ts +0 -42
  254. package/dist/packages/components/src/components/search/SearchFilter/types.js +0 -1
  255. package/dist/packages/components/src/components/search/SearchInput/SearchInput.d.ts +0 -16
  256. package/dist/packages/components/src/components/search/SearchInput/SearchInput.js +0 -38
  257. package/dist/packages/components/src/components/search/SearchInput/searchInputVariants.d.ts +0 -13
  258. package/dist/packages/components/src/components/search/SearchInput/searchInputVariants.js +0 -12
  259. package/dist/packages/components/src/components/search/SearchInputAutocomplete/SearchAutocomplete.d.ts +0 -10
  260. package/dist/packages/components/src/components/search/SearchInputAutocomplete/SearchAutocomplete.js +0 -14
  261. package/dist/packages/components/src/components/search/SearchInputForm/SearchInputForm.d.ts +0 -16
  262. package/dist/packages/components/src/components/search/SearchInputForm/SearchInputForm.js +0 -13
  263. package/dist/packages/components/src/components/search/SearchInputForm/types.js +0 -1
  264. package/dist/packages/components/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +0 -14
  265. package/dist/packages/components/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.js +0 -15
  266. package/dist/packages/components/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts +0 -16
  267. package/dist/packages/components/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.js +0 -29
  268. package/dist/packages/components/src/components/search/SearchResultsFilterSidebar/types.js +0 -1
  269. package/dist/packages/components/src/components/search/SearchResultsStates/NoSearchResultsFound.d.ts +0 -8
  270. package/dist/packages/components/src/components/search/SearchResultsStates/NoSearchResultsFound.js +0 -10
  271. package/dist/packages/components/src/components/search/SearchResultsStates/SearchResultsGrid.d.ts +0 -24
  272. package/dist/packages/components/src/components/search/SearchResultsStates/SearchResultsGrid.js +0 -19
  273. package/dist/packages/components/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +0 -6
  274. package/dist/packages/components/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.js +0 -10
  275. package/dist/packages/components/src/components/search/types.d.ts +0 -5
  276. package/dist/packages/components/src/components/search/types.js +0 -6
  277. package/dist/packages/components/src/components/test/types.js +0 -1
  278. package/dist/packages/components/src/config/chatElementDisplayLocation.d.ts +0 -21
  279. package/dist/packages/components/src/config/chatElementDisplayLocation.js +0 -23
  280. package/dist/packages/components/src/index.d.ts +0 -45
  281. package/dist/packages/components/src/index.js +0 -49
  282. package/dist/packages/components/src/logging/logger.d.ts +0 -7
  283. package/dist/packages/components/src/logging/logger.js +0 -16
  284. package/dist/packages/components/src/types/external.d.ts +0 -21
  285. package/dist/packages/components/src/types/external.js +0 -5
  286. package/dist/packages/components/src/util/camelCase.js +0 -2
  287. package/dist/packages/components/src/util/camelCasedPropertiesDeep.d.ts +0 -53
  288. package/dist/packages/components/src/util/camelCasedPropertiesDeep.js +0 -1
  289. package/dist/packages/components/src/util/formatPrice.d.ts +0 -1
  290. package/dist/packages/components/src/util/formatPrice.js +0 -11
  291. package/dist/packages/components/src/util/internal.d.ts +0 -27
  292. package/dist/packages/components/src/util/internal.js +0 -4
  293. package/dist/packages/components/src/util/primitive.d.ts +0 -6
  294. package/dist/packages/components/src/util/primitive.js +0 -2
  295. package/dist/packages/components/src/util/splitWords.d.ts +0 -55
  296. package/dist/packages/components/src/util/splitWords.js +0 -2
  297. package/dist/packages/components/src/util/trim.d.ts +0 -24
  298. package/dist/packages/components/src/util/trim.js +0 -2
  299. package/dist/packages/components/src/util/unknownArray.js +0 -1
  300. package/dist/src/atoms/search/types.d.ts +0 -5
  301. package/dist/src/atoms/search/types.js +0 -1
  302. package/dist/src/components/common/ButtonBase/ButtonBase.d.ts +0 -2
  303. package/dist/src/components/common/ButtonBase/ButtonBase.js +0 -41
  304. package/dist/src/components/common/ButtonBase/types.d.ts +0 -24
  305. package/dist/src/components/common/ButtonBase/types.js +0 -6
  306. package/dist/src/components/common/Headline/Headline.d.ts +0 -10
  307. package/dist/src/components/common/Headline/Headline.js +0 -34
  308. package/dist/src/components/common/ImageWithFallback/ImageWithFallback.d.ts +0 -12
  309. package/dist/src/components/common/ImageWithFallback/ImageWithFallback.js +0 -26
  310. package/dist/src/components/common/ProductCard/ProductCard.d.ts +0 -39
  311. package/dist/src/components/common/ProductCard/ProductCard.js +0 -84
  312. package/dist/src/components/common/ProductCard/ProductCardSkeleton.d.ts +0 -9
  313. package/dist/src/components/common/ProductCard/ProductCardSkeleton.js +0 -15
  314. package/dist/src/components/common/ProductCard/productCardVariants.d.ts +0 -8
  315. package/dist/src/components/common/ProductCard/productCardVariants.js +0 -50
  316. package/dist/src/components/common/ProductCard/types.d.ts +0 -39
  317. package/dist/src/components/common/ProductCard/types.js +0 -10
  318. package/dist/src/components/common/ProductGrid/ProductGrid.d.ts +0 -14
  319. package/dist/src/components/common/ProductGrid/ProductGrid.js +0 -13
  320. package/dist/src/components/common/ProductGrid/productGridVariants.d.ts +0 -10
  321. package/dist/src/components/common/ProductGrid/productGridVariants.js +0 -16
  322. package/dist/src/components/common/SparkleAnimation/SparkleAnimation.d.ts +0 -7
  323. package/dist/src/components/common/SparkleAnimation/SparkleAnimation.js +0 -40
  324. package/dist/src/components/common/SparkleAnimation/types.d.ts +0 -6
  325. package/dist/src/components/common/SparkleAnimation/types.js +0 -7
  326. package/dist/src/components/common/Spinner/Spinner.d.ts +0 -5
  327. package/dist/src/components/common/Spinner/Spinner.js +0 -16
  328. package/dist/src/components/common/SuggestionButton/SuggestionButton.d.ts +0 -18
  329. package/dist/src/components/common/SuggestionButton/SuggestionButton.js +0 -210
  330. package/dist/src/components/common/SuggestionButton/types.d.ts +0 -1
  331. package/dist/src/components/common/SuggestionButton/types.js +0 -1
  332. package/dist/src/components/common/Text/Text.d.ts +0 -12
  333. package/dist/src/components/common/Text/Text.js +0 -26
  334. package/dist/src/components/common/Text/textVariantClasses.d.ts +0 -171
  335. package/dist/src/components/common/Text/textVariantClasses.js +0 -103
  336. package/dist/src/components/common/Text/types.d.ts +0 -16
  337. package/dist/src/components/common/Text/types.js +0 -6
  338. package/dist/src/components/common/TextInput/TextInput.d.ts +0 -8
  339. package/dist/src/components/common/TextInput/TextInput.js +0 -25
  340. package/dist/src/components/models/colorsConfig.d.ts +0 -26
  341. package/dist/src/components/models/colorsConfig.js +0 -23
  342. package/dist/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +0 -11
  343. package/dist/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.js +0 -18
  344. package/dist/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +0 -15
  345. package/dist/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.js +0 -15
  346. package/dist/src/components/search/SearchFilter/SearchFilter.d.ts +0 -2
  347. package/dist/src/components/search/SearchFilter/SearchFilter.js +0 -24
  348. package/dist/src/components/search/SearchFilter/SearchFilterHeader.d.ts +0 -2
  349. package/dist/src/components/search/SearchFilter/SearchFilterHeader.js +0 -9
  350. package/dist/src/components/search/SearchFilter/SearchFilterItem.d.ts +0 -2
  351. package/dist/src/components/search/SearchFilter/SearchFilterItem.js +0 -13
  352. package/dist/src/components/search/SearchFilter/types.d.ts +0 -42
  353. package/dist/src/components/search/SearchFilter/types.js +0 -1
  354. package/dist/src/components/search/SearchInput/SearchInput.d.ts +0 -16
  355. package/dist/src/components/search/SearchInput/SearchInput.js +0 -38
  356. package/dist/src/components/search/SearchInput/searchInputVariants.d.ts +0 -13
  357. package/dist/src/components/search/SearchInput/searchInputVariants.js +0 -12
  358. package/dist/src/components/search/SearchInputAutocomplete/SearchAutocomplete.d.ts +0 -10
  359. package/dist/src/components/search/SearchInputAutocomplete/SearchAutocomplete.js +0 -14
  360. package/dist/src/components/search/SearchInputForm/SearchInputForm.d.ts +0 -16
  361. package/dist/src/components/search/SearchInputForm/SearchInputForm.js +0 -13
  362. package/dist/src/components/search/SearchInputForm/types.d.ts +0 -1
  363. package/dist/src/components/search/SearchInputForm/types.js +0 -1
  364. package/dist/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +0 -14
  365. package/dist/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.js +0 -15
  366. package/dist/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts +0 -16
  367. package/dist/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.js +0 -29
  368. package/dist/src/components/search/SearchResultsFilterSidebar/types.d.ts +0 -2
  369. package/dist/src/components/search/SearchResultsFilterSidebar/types.js +0 -1
  370. package/dist/src/components/search/SearchResultsStates/NoSearchResultsFound.d.ts +0 -8
  371. package/dist/src/components/search/SearchResultsStates/NoSearchResultsFound.js +0 -10
  372. package/dist/src/components/search/SearchResultsStates/SearchResultsGrid.d.ts +0 -24
  373. package/dist/src/components/search/SearchResultsStates/SearchResultsGrid.js +0 -19
  374. package/dist/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +0 -6
  375. package/dist/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.js +0 -10
  376. package/dist/src/components/search/types.d.ts +0 -5
  377. package/dist/src/components/search/types.js +0 -6
  378. package/dist/src/components/test/types.d.ts +0 -3
  379. package/dist/src/components/test/types.js +0 -1
  380. package/dist/src/config/chatElementDisplayLocation.d.ts +0 -21
  381. package/dist/src/config/chatElementDisplayLocation.js +0 -23
  382. package/dist/src/index.d.ts +0 -45
  383. package/dist/src/index.js +0 -49
  384. package/dist/src/logging/logger.d.ts +0 -7
  385. package/dist/src/logging/logger.js +0 -16
  386. package/dist/src/types/external.d.ts +0 -21
  387. package/dist/src/types/external.js +0 -5
  388. package/dist/src/util/camelCase.d.ts +0 -65
  389. package/dist/src/util/camelCase.js +0 -2
  390. package/dist/src/util/camelCasedPropertiesDeep.d.ts +0 -53
  391. package/dist/src/util/camelCasedPropertiesDeep.js +0 -1
  392. package/dist/src/util/formatPrice.d.ts +0 -1
  393. package/dist/src/util/formatPrice.js +0 -11
  394. package/dist/src/util/internal.d.ts +0 -27
  395. package/dist/src/util/internal.js +0 -4
  396. package/dist/src/util/primitive.js +0 -2
  397. package/dist/src/util/splitWords.d.ts +0 -55
  398. package/dist/src/util/splitWords.js +0 -2
  399. package/dist/src/util/trim.js +0 -2
  400. package/dist/src/util/unknownArray.d.ts +0 -25
  401. package/dist/src/util/unknownArray.js +0 -1
  402. package/dist/tsconfig.tsbuildinfo +0 -1
  403. /package/{dist/packages/components/src/components/search/SearchInputForm/types.d.ts → src/components/search/SearchInputForm/types.ts} +0 -0
  404. /package/{dist/packages/components/src/util/unknownArray.d.ts → src/util/unknownArray.ts} +0 -0
@@ -0,0 +1,82 @@
1
+ import { useCallback } from 'react';
2
+
3
+ import { SearchFilter } from '../SearchFilter/SearchFilter';
4
+ import { SearchFilterHeader } from '../SearchFilter/SearchFilterHeader';
5
+ import type { SearchFilter as SearchFilterType, SelectFilterItem } from '../SearchFilter/types';
6
+ import type { SearchFilterSidebarVariant } from './types';
7
+ import { searchFilterSidebarVariantClasses } from './searchFilterSidebarVariants';
8
+ import { ButtonBase } from 'src/components/common/ButtonBase/ButtonBase';
9
+
10
+ export type SearchResultsFilterProps = {
11
+ productCount: number;
12
+ isOpen: boolean;
13
+ setIsOpen: (isOpen: boolean) => void;
14
+ searchFilters: SearchFilterType[];
15
+ searchFilterSidebarVariant: SearchFilterSidebarVariant;
16
+ searchText: string;
17
+ onSelectFilterItem: SelectFilterItem;
18
+ onClearAllFilters: () => void;
19
+ filterButtonText: string;
20
+ };
21
+
22
+ export const SearchResultsFilter = ({
23
+ productCount,
24
+ isOpen,
25
+ setIsOpen,
26
+ searchFilters,
27
+ searchFilterSidebarVariant,
28
+ onSelectFilterItem,
29
+ onClearAllFilters,
30
+ filterButtonText,
31
+ }: SearchResultsFilterProps) => {
32
+ const {
33
+ applyFiltersUnchangedClasses,
34
+ applyFiltersChangedClasses,
35
+ searchFilterHeaderClasses,
36
+ radioButtonFillColor,
37
+ radioButtonHoverColor,
38
+ radioButtonUncheckedBorderColor,
39
+ filterCloseIconVariant,
40
+ } = searchFilterSidebarVariantClasses[searchFilterSidebarVariant];
41
+
42
+ const openFilter = useCallback(() => {
43
+ setIsOpen(true);
44
+ }, [setIsOpen]);
45
+
46
+ return (
47
+ <>
48
+ <SearchFilter
49
+ isOpen={isOpen}
50
+ setIsOpen={setIsOpen}
51
+ filters={searchFilters}
52
+ productCount={productCount}
53
+ selectFilterItem={onSelectFilterItem}
54
+ clearAllFilters={onClearAllFilters}
55
+ applyFiltersUnchangedClasses={applyFiltersUnchangedClasses}
56
+ applyFiltersChangedClasses={applyFiltersChangedClasses}
57
+ filterButtonText={filterButtonText}
58
+ radioButtonFillColor={radioButtonFillColor}
59
+ radioButtonHoverColor={radioButtonHoverColor}
60
+ radioButtonUncheckedBorderColor={radioButtonUncheckedBorderColor}
61
+ filterCloseIconVariant={filterCloseIconVariant}
62
+ headerContent={
63
+ <SearchFilterHeader
64
+ closeModal={() => setIsOpen(false)}
65
+ productCount={productCount}
66
+ headerClassName={searchFilterHeaderClasses}
67
+ filterCloseIconVariant={filterCloseIconVariant}
68
+ />
69
+ }
70
+ />
71
+ <ButtonBase
72
+ onClick={openFilter}
73
+ // icon={SettingsVariant} // Icon is handled by user
74
+ iconClass="spiffy-tw-w-[28px] spiffy-tw-h-[28px] spiffy-tw-object-center"
75
+ text={filterButtonText}
76
+ textClass="spiffy-tw-uppercase spiffy-tw-text-[--spiffy-colors-text-primary] spiffy-tw-hidden md:spiffy-tw-block"
77
+ buttonClass="spiffy-tw-flex-row spiffy-tw-pl-[16px] sm:spiffy-tw-pl-0 sm:spiffy-tw-px-4 sm:spiffy-tw-gap-[8px]"
78
+ disablePadding
79
+ />
80
+ </>
81
+ );
82
+ };
@@ -0,0 +1,45 @@
1
+ import type { SearchFilterSidebarVariant, CloseIconVariant } from './types';
2
+ import { ColorNames, colorVar } from 'src/components/models/colorsConfig';
3
+
4
+ interface SearchFilterSidebarVariantClasses {
5
+ searchFilterHeaderClasses: string;
6
+ radioButtonFillColor: string;
7
+ radioButtonHoverColor: string;
8
+ radioButtonUncheckedBorderColor: string;
9
+ filterDefaultClasses: string;
10
+ filterActiveClasses: string;
11
+ filterHoverClasses: string;
12
+ appliedFilterBackgroundClasses: string;
13
+ applyFiltersUnchangedClasses: string;
14
+ applyFiltersChangedClasses: string;
15
+ filterCloseIconVariant: CloseIconVariant;
16
+ }
17
+
18
+ export const searchFilterSidebarVariantClasses: Record<SearchFilterSidebarVariant, SearchFilterSidebarVariantClasses> = {
19
+ darkButton: {
20
+ radioButtonFillColor: colorVar(ColorNames.BackgroundDark),
21
+ radioButtonHoverColor: colorVar(ColorNames.BackgroundSecondaryDark),
22
+ radioButtonUncheckedBorderColor: colorVar(ColorNames.BorderMedium),
23
+ searchFilterHeaderClasses: 'spiffy-tw-text-[--spiffy-colors-text-light]',
24
+ filterDefaultClasses: 'spiffy-tw-border-[--spiffy-colors-border-medium] spiffy-tw-bg-[--spiffy-colors-background-light] spiffy-tw-text-[--spiffy-colors-text-secondary]',
25
+ filterHoverClasses: 'hover:spiffy-tw-border-[--spiffy-colors-background-secondary-dark] hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark] hover:spiffy-tw-text-[--spiffy-colors-text-primary]',
26
+ filterActiveClasses: 'spiffy-tw-border-[--spiffy-colors-border-outline] spiffy-tw-bg-[--spiffy-colors-background-dark] spiffy-tw-text-[--spiffy-colors-text-light]',
27
+ appliedFilterBackgroundClasses: 'spiffy-tw-bg-[--spiffy-colors-border-light]',
28
+ applyFiltersUnchangedClasses: 'spiffy-tw-bg-[--spiffy-colors-border-light] spiffy-tw-text-[--spiffy-colors-text-secondary]',
29
+ applyFiltersChangedClasses: 'spiffy-tw-bg-[--spiffy-colors-background-dark] spiffy-tw-text-[--spiffy-colors-text-light]',
30
+ filterCloseIconVariant: 'light',
31
+ },
32
+ lightButton: {
33
+ radioButtonFillColor: colorVar(ColorNames.BackgroundDark),
34
+ radioButtonHoverColor: colorVar(ColorNames.BackgroundSecondaryDark),
35
+ radioButtonUncheckedBorderColor: colorVar(ColorNames.BorderMedium),
36
+ searchFilterHeaderClasses: 'spiffy-tw-text-[--spiffy-colors-text-primary]',
37
+ filterDefaultClasses: 'spiffy-tw-border-[--spiffy-colors-border-medium] spiffy-tw-bg-[--spiffy-colors-background-light] spiffy-tw-text-[--spiffy-colors-text-secondary]',
38
+ filterHoverClasses: 'hover:spiffy-tw-border-[--spiffy-colors-background-secondary-dark] hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark] hover:spiffy-tw-text-[--spiffy-colors-text-primary]',
39
+ filterActiveClasses: 'spiffy-tw-border-[--spiffy-colors-border-outline] spiffy-tw-bg-[--spiffy-colors-background-dark] spiffy-tw-text-[--spiffy-colors-text-light]',
40
+ appliedFilterBackgroundClasses: 'spiffy-tw-bg-[--spiffy-colors-border-light]',
41
+ applyFiltersUnchangedClasses: 'spiffy-tw-bg-[--spiffy-colors-border-light] spiffy-tw-text-[--spiffy-colors-text-secondary]',
42
+ applyFiltersChangedClasses: 'spiffy-tw-bg-[--spiffy-colors-background-primary] spiffy-tw-text-[--spiffy-colors-text-link]',
43
+ filterCloseIconVariant: 'dark',
44
+ },
45
+ };
@@ -1,2 +1,2 @@
1
1
  export type SearchFilterSidebarVariant = 'darkButton' | 'lightButton';
2
- export type CloseIconVariant = 'light' | 'tertiary' | 'dark';
2
+ export type CloseIconVariant = 'light' | 'tertiary' | 'dark';
@@ -0,0 +1,41 @@
1
+ import classNames from 'classnames';
2
+ import Sparkles from '@envive-ai/react-icons/src/Sparkles';
3
+ import { Text } from 'src/components/common/Text/Text';
4
+
5
+ interface NoSearchResultsFoundProps {
6
+ containerPaddingClasses: string;
7
+ includeBottomMargin?: boolean; // manually add about a page of bottom margin to push unsupressed content down
8
+ noResultsFoundText?: string;
9
+ sparkleIconColor?: string; // example format: var(--spiffy-colors-accent-primary)
10
+ }
11
+
12
+ export const NoSearchResultsFound = ({
13
+ containerPaddingClasses,
14
+ includeBottomMargin = false,
15
+ noResultsFoundText,
16
+ sparkleIconColor = 'var(--spiffy-colors-accent-primary)',
17
+ }: NoSearchResultsFoundProps) => {
18
+ const containerClasses = classNames(
19
+ containerPaddingClasses,
20
+ includeBottomMargin ? 'spiffy-tw-mb-[100vh]' : '',
21
+ 'spiffy-tw-mt-6',
22
+ );
23
+
24
+ const textPrompt =
25
+ noResultsFoundText ||
26
+ 'I’m sorry, I wasn’t able to find an exact match. Try changing your filters or adjusting your search query.';
27
+
28
+ return (
29
+ <div className={containerClasses}>
30
+ <div className="spiffy-tw-flex spiffy-tw-items-start spiffy-tw-gap-2">
31
+ <div>
32
+ <Sparkles
33
+ className="spiffy-tw-w-[24px] spiffy-tw-h-[24px]"
34
+ style={{ color: sparkleIconColor }}
35
+ />
36
+ </div>
37
+ <Text variant="body2">{textPrompt}</Text>
38
+ </div>
39
+ </div>
40
+ );
41
+ };
@@ -0,0 +1,105 @@
1
+ import { motion } from 'framer-motion';
2
+ import type { SelectedFilterOption } from 'src/atoms/search/types';
3
+ import classNames from 'classnames';
4
+ import type { SearchResponseProduct } from 'src/types/external';
5
+ import { ProductGrid } from 'src/components/common/ProductGrid/ProductGrid';
6
+ import { AppliedFiltersScrollbar } from '../FilterScrollbar/AppliedFiltersScrollbar';
7
+ import { DynamicFiltersScrollbar } from '../FilterScrollbar/DynamicFiltersScrollbar';
8
+ import { searchFilterSidebarVariantClasses } from '../SearchResultsFilterSidebar/searchFilterSidebarVariants';
9
+ import type { SearchFilterSidebarVariant } from '../SearchResultsFilterSidebar/types';
10
+ import { ProductGridVariant } from 'src/components/common/ProductCard/types';
11
+
12
+ interface SearchResultsGridProps {
13
+ productList: SearchResponseProduct[];
14
+ availableDynamicFilters: { name: string; displayName: string }[];
15
+ searchFilterSidebarVariant: SearchFilterSidebarVariant;
16
+ productGridVariant: ProductGridVariant;
17
+ selectedFilterOptions: SelectedFilterOption[];
18
+ searchResponseId: string;
19
+ containerXPaddingClasses: string;
20
+ productGridClasses: string;
21
+ onRemoveFilter: (filter: SelectedFilterOption) => void;
22
+ onToggleDynamicFilter: ({
23
+ filter,
24
+ dynamicFilterDisplayName,
25
+ }: {
26
+ filter: string;
27
+ dynamicFilterDisplayName: string;
28
+ }) => void;
29
+ }
30
+
31
+ export const SearchResultsGrid = ({
32
+ productList,
33
+ availableDynamicFilters,
34
+ searchFilterSidebarVariant,
35
+ productGridVariant,
36
+ selectedFilterOptions,
37
+ searchResponseId,
38
+ containerXPaddingClasses,
39
+ productGridClasses,
40
+ onRemoveFilter,
41
+ onToggleDynamicFilter,
42
+ }: SearchResultsGridProps) => {
43
+ const sharedFilterBarClasses = classNames(
44
+ 'spiffy-suggestion-bar',
45
+ 'spiffy-tw-no-scrollbar',
46
+ 'spiffy-tw-flex',
47
+ 'spiffy-tw-flex-row',
48
+ 'spiffy-tw-gap-2',
49
+ 'spiffy-tw-mb-[16px]',
50
+ 'spiffy-tw-overflow-x-scroll',
51
+ containerXPaddingClasses,
52
+ );
53
+
54
+ const filterBarClasses = classNames(sharedFilterBarClasses, 'spiffy-tw-mt-[24px]');
55
+
56
+ const appliedFilterBarClasses = classNames(
57
+ sharedFilterBarClasses,
58
+ 'spiffy-tw-mb-[32px]',
59
+ 'spiffy-tw-mt-[8px]',
60
+ );
61
+
62
+ const {
63
+ // We may want to pull these into their own variant separated from the filter sidebar (but also used in it) In this case, we need them for dynamic filters
64
+ filterDefaultClasses,
65
+ filterHoverClasses,
66
+ appliedFilterBackgroundClasses,
67
+ } = searchFilterSidebarVariantClasses[searchFilterSidebarVariant];
68
+
69
+ return (
70
+ <motion.div
71
+ className="spiffy-tw-justify-center spiffy-tw-w-full spiffy-tw-overflow-hidden"
72
+ initial={{ opacity: 0 }}
73
+ animate={{ opacity: 1 }}
74
+ exit={{ opacity: 0 }}
75
+ transition={{ duration: 0.2 }}
76
+ >
77
+ <AppliedFiltersScrollbar
78
+ selectedFilterOptions={selectedFilterOptions}
79
+ filterBarClassNames={appliedFilterBarClasses}
80
+ filterDefaultClasses={filterDefaultClasses}
81
+ filterHoverClasses={filterHoverClasses}
82
+ appliedFilterBackgroundClasses={appliedFilterBackgroundClasses}
83
+ onRemoveFilter={onRemoveFilter}
84
+ />
85
+ <DynamicFiltersScrollbar
86
+ availableDynamicFilters={availableDynamicFilters}
87
+ filterBarClassNames={filterBarClasses}
88
+ filterDefaultClasses={filterDefaultClasses}
89
+ filterHoverClasses={filterHoverClasses}
90
+ onToggleDynamicFilter={onToggleDynamicFilter}
91
+ />
92
+ <ProductGrid
93
+ productList={productList}
94
+ productGridVariant={productGridVariant}
95
+ productGridClasses={productGridClasses}
96
+ searchResponseId={searchResponseId}
97
+ merchantShortName={''}
98
+ handleClick={function (clickedUrl: string): void {
99
+ console.log(clickedUrl);
100
+ throw new Error('Function not implemented.');
101
+ }}
102
+ />
103
+ </motion.div>
104
+ );
105
+ };
@@ -0,0 +1,50 @@
1
+ import { Text } from 'src/components/common/Text/Text';
2
+ import { SparkleAnimation } from 'src/components/common/SparkleAnimation/SparkleAnimation';
3
+ import { motion } from 'framer-motion';
4
+ import { ProductGridVariant } from 'src/components/common/ProductCard/types';
5
+ import { ProductCardSkeleton } from 'src/components/common/ProductCard/ProductCardSkeleton';
6
+ import { productGridVariantClasses } from 'src/components/common/ProductGrid/productGridVariants';
7
+
8
+ export const SearchResultsLoadingGrid = ({
9
+ productGridVariant,
10
+ productGridClasses,
11
+ sparkleIconColor = 'var(--spiffy-colors-accent-primary)',
12
+ }: {
13
+ productGridVariant: ProductGridVariant;
14
+ productGridClasses: string;
15
+ sparkleIconColor?: string;
16
+ }) => {
17
+ const { productCardLayoutVariant, productCardImageAspectRatio } =
18
+ productGridVariantClasses[productGridVariant];
19
+
20
+ return (
21
+ <motion.div
22
+ className="spiffy-tw-justify-center spiffy-tw-w-full spiffy-tw-overflow-hidden"
23
+ initial={{ opacity: 0 }}
24
+ animate={{ opacity: 1 }}
25
+ exit={{ opacity: 0 }}
26
+ transition={{ duration: 0.2 }}
27
+ >
28
+ <div className="spiffy-tw-mt-6 spiffy-tw-w-full">
29
+ <div className="spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-mb-4">
30
+ <div className="spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-2 spiffy-tw-ml-[16px] md:spiffy-tw-ml-[80px]">
31
+ <div className="spiffy-tw-width-[24px]">
32
+ <SparkleAnimation color={sparkleIconColor} animate={true} />
33
+ </div>
34
+ <Text variant="body2">Finding the best options for you...</Text>
35
+ </div>
36
+ </div>
37
+ <div className={productGridClasses}>
38
+ {Array.from({ length: 8 }).map((_, index) => (
39
+ <ProductCardSkeleton
40
+ key={index}
41
+ layoutVariant={productCardLayoutVariant}
42
+ aspectRatio={productCardImageAspectRatio}
43
+ growWithContainer={true}
44
+ />
45
+ ))}
46
+ </div>
47
+ </div>
48
+ </motion.div>
49
+ );
50
+ };
@@ -0,0 +1,5 @@
1
+ export enum SearchResultsState {
2
+ NoResults = 'noResults',
3
+ Results = 'results',
4
+ Loading = 'loading',
5
+ }
@@ -1,3 +1,3 @@
1
1
  export interface TestProps {
2
- dataTestId?: string;
2
+ dataTestId?: string;
3
3
  }
@@ -0,0 +1,22 @@
1
+ // Chat element display location enum
2
+ export enum ChatElementDisplayLocation {
3
+ IN_CHAT = 'in_chat',
4
+ CHAT_PREVIEW = 'chat_preview',
5
+ FLOATING_BUTTON = 'floating_button',
6
+ HELP_ME_CHOOSE = 'help_me_choose',
7
+ PLP_IMAGE_BANNER = 'plp_image_banner',
8
+ TOP_REVIEWS_SNIPPET = 'top_reviews_snippet',
9
+ BOTTOM_REVIEWS_SNIPPET = 'bottom_reviews_snippet',
10
+ BLOCK_BACK_BUTTON = 'block_back_button',
11
+ SWITCH_TO_AGENT = 'switch_to_agent',
12
+ CONVERSATIONAL_SEARCH = 'conversational_search',
13
+ GLOBAL_SEARCH_ENTRYPOINT = 'global_search_entrypoint',
14
+ SEARCH_NAV_ENTRYPOINT = 'search_nav_entrypoint',
15
+ SEARCH_PROMPT = 'search_prompt',
16
+ SEARCH_PROMPT_BUTTON = 'search_prompt_button',
17
+ PRODUCT_GRID = 'product_grid',
18
+ UNSPECIFIED = 'unspecified',
19
+ FILTER_MODAL = 'filter_modal',
20
+ PROMPT_CARD = 'prompt_card',
21
+ WINDOW_API_CALL = 'window_api_call',
22
+ }
@@ -0,0 +1,21 @@
1
+ /* eslint-disable no-console */
2
+
3
+ class Logger {
4
+ static logInfo(message: string, ...args: unknown[]): void {
5
+ console.info(`INFO: ${message}`, ...args);
6
+ }
7
+
8
+ static logDebug(message: string, ...args: unknown[]): void {
9
+ console.debug(`DEBUG: ${message}`, ...args);
10
+ }
11
+
12
+ static logError(message: string, error: unknown | undefined, ...args: unknown[]): void {
13
+ console.error(`ERROR: ${message} error=${error}`, args);
14
+ }
15
+
16
+ static logWarn(message: string, error: unknown | undefined, ...args: unknown[]): void {
17
+ console.warn(`WARN: ${message} error=${error}`, args);
18
+ }
19
+ }
20
+
21
+ export default Logger;
@@ -0,0 +1,24 @@
1
+ // Local type definitions for external dependencies that may not be available
2
+
3
+ export enum ResponseCategory {
4
+ Product = 'product',
5
+ }
6
+
7
+ export interface SearchResponseProduct {
8
+ id: string;
9
+ title: string;
10
+ description?: string;
11
+ price?: number;
12
+ currency?: string;
13
+ imageUrl?: string;
14
+ brand?: string;
15
+ category?: string;
16
+ availability?: string;
17
+ url?: string;
18
+ responseId?: string;
19
+ originalPrice?: number;
20
+ salePrice?: number;
21
+ averageRating?: number;
22
+ numberReviews?: number;
23
+ [key: string]: unknown;
24
+ }
@@ -1,21 +1,34 @@
1
+ // these types come from https://github.com/sindresorhus/type-fest/blob/main/source/camel-case.d.ts
2
+
1
3
  import type { SplitWords } from './splitWords';
4
+
2
5
  /**
3
6
  * CamelCase options.
4
7
  *
5
8
  * @see {@link CamelCase}
6
9
  */
7
10
  export type CamelCaseOptions = {
8
- /**
9
- * Whether to preserved consecutive uppercase letter.
10
- *
11
- * @default true
12
- */
13
- preserveConsecutiveUppercase?: boolean;
11
+ /**
12
+ * Whether to preserved consecutive uppercase letter.
13
+ *
14
+ * @default true
15
+ */
16
+ preserveConsecutiveUppercase?: boolean;
14
17
  };
18
+
15
19
  /**
16
20
  * Convert an array of words to camel-case.
17
21
  */
18
- type CamelCaseFromArray<Words extends string[], Options extends CamelCaseOptions, OutputString extends string = ''> = Words extends [infer FirstWord extends string, ...infer RemainingWords extends string[]] ? Options['preserveConsecutiveUppercase'] extends true ? `${Capitalize<FirstWord>}${CamelCaseFromArray<RemainingWords, Options>}` : `${Capitalize<Lowercase<FirstWord>>}${CamelCaseFromArray<RemainingWords, Options>}` : OutputString;
22
+ type CamelCaseFromArray<
23
+ Words extends string[],
24
+ Options extends CamelCaseOptions,
25
+ OutputString extends string = '',
26
+ > = Words extends [infer FirstWord extends string, ...infer RemainingWords extends string[]]
27
+ ? Options['preserveConsecutiveUppercase'] extends true
28
+ ? `${Capitalize<FirstWord>}${CamelCaseFromArray<RemainingWords, Options>}`
29
+ : `${Capitalize<Lowercase<FirstWord>>}${CamelCaseFromArray<RemainingWords, Options>}`
30
+ : OutputString;
31
+
19
32
  /**
20
33
  * Convert a string literal to camel-case.
21
34
  *
@@ -59,7 +72,16 @@ type CamelCaseFromArray<Words extends string[], Options extends CamelCaseOptions
59
72
  * @category Change case
60
73
  * @category Template literal
61
74
  */
62
- export type CamelCase<Type, Options extends CamelCaseOptions = {
63
- preserveConsecutiveUppercase: true;
64
- }> = Type extends string ? string extends Type ? Type : Uncapitalize<CamelCaseFromArray<SplitWords<Type extends Uppercase<Type> ? Lowercase<Type> : Type>, Options>> : Type;
65
- export {};
75
+ export type CamelCase<
76
+ Type,
77
+ Options extends CamelCaseOptions = { preserveConsecutiveUppercase: true },
78
+ > = Type extends string
79
+ ? string extends Type
80
+ ? Type
81
+ : Uncapitalize<
82
+ CamelCaseFromArray<
83
+ SplitWords<Type extends Uppercase<Type> ? Lowercase<Type> : Type>,
84
+ Options
85
+ >
86
+ >
87
+ : Type;
@@ -0,0 +1,81 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-function-type */
2
+ import type { CamelCase, CamelCaseOptions } from './camelCase';
3
+ import type { UnknownArray } from './unknownArray';
4
+
5
+ /**
6
+ * Convert object properties to camel case recursively.
7
+ *
8
+ * This can be useful when, for example, converting some API types from a different style.
9
+ *
10
+ * @see CamelCasedProperties
11
+ * @see CamelCase
12
+ *
13
+ * @example
14
+ * ```
15
+ * import type {CamelCasedPropertiesDeep} from 'type-fest';
16
+ *
17
+ * interface User {
18
+ * UserId: number;
19
+ * UserName: string;
20
+ * }
21
+ *
22
+ * interface UserWithFriends {
23
+ * UserInfo: User;
24
+ * UserFriends: User[];
25
+ * }
26
+ *
27
+ * const result: CamelCasedPropertiesDeep<UserWithFriends> = {
28
+ * userInfo: {
29
+ * userId: 1,
30
+ * userName: 'Tom',
31
+ * },
32
+ * userFriends: [
33
+ * {
34
+ * userId: 2,
35
+ * userName: 'Jerry',
36
+ * },
37
+ * {
38
+ * userId: 3,
39
+ * userName: 'Spike',
40
+ * },
41
+ * ],
42
+ * };
43
+ * ```
44
+ *
45
+ * @category Change case
46
+ * @category Template literal
47
+ * @category Object
48
+ */
49
+ export type CamelCasedPropertiesDeep<
50
+ Value,
51
+ Options extends CamelCaseOptions = { preserveConsecutiveUppercase: true },
52
+ > = Value extends Function
53
+ ? Value
54
+ : Value extends UnknownArray
55
+ ? CamelCasedPropertiesArrayDeep<Value>
56
+ : Value extends Set<infer U>
57
+ ? Set<CamelCasedPropertiesDeep<U, Options>>
58
+ : {
59
+ [K in keyof Value as CamelCase<K, Options>]: CamelCasedPropertiesDeep<Value[K], Options>;
60
+ };
61
+
62
+ // This is a copy of DelimiterCasedPropertiesArrayDeep (see: delimiter-cased-properties-deep.d.ts).
63
+ // These types should be kept in sync.
64
+ type CamelCasedPropertiesArrayDeep<Value extends UnknownArray> = Value extends []
65
+ ? []
66
+ : // Tailing spread array
67
+ Value extends [infer U, ...infer V]
68
+ ? [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>]
69
+ : Value extends readonly [infer U, ...infer V]
70
+ ? readonly [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>]
71
+ : // Leading spread array
72
+ Value extends readonly [...infer U, infer V]
73
+ ? [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>]
74
+ : Value extends readonly [...infer U, infer V]
75
+ ? readonly [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>]
76
+ : // Array
77
+ Value extends Array<infer U>
78
+ ? Array<CamelCasedPropertiesDeep<U>>
79
+ : Value extends ReadonlyArray<infer U>
80
+ ? ReadonlyArray<CamelCasedPropertiesDeep<U>>
81
+ : never;
@@ -0,0 +1,14 @@
1
+ export const formatPrice = (price?: number, currency: string = '$'): string => {
2
+ if (price == null) {
3
+ return '';
4
+ }
5
+
6
+ const options: Intl.NumberFormatOptions = {};
7
+
8
+ if (!Number.isInteger(price)) {
9
+ options.minimumFractionDigits = 2;
10
+ options.maximumFractionDigits = 2;
11
+ }
12
+
13
+ return `${currency}${price.toLocaleString('en-US', options)}`;
14
+ };
@@ -0,0 +1,95 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ /* eslint-disable @typescript-eslint/no-unsafe-function-type */
3
+ // these types come from https://github.com/sindresorhus/type-fest/blob/main/source/internal.d.ts
4
+
5
+ import type { Primitive } from './primitive';
6
+ import type { Trim } from './trim';
7
+
8
+ /**
9
+ * Matches any primitive, `void`, `Date`, or `RegExp` value.
10
+ */
11
+ export type BuiltIns = Primitive | void | Date | RegExp;
12
+
13
+ /**
14
+ * Matches non-recursive types.
15
+ */
16
+ export type NonRecursiveType = BuiltIns | Function | (new (...arguments_: any[]) => unknown);
17
+
18
+ /**
19
+ * Returns a boolean for whether the string is numeric.
20
+ *
21
+ * This type is a workaround for [Microsoft/TypeScript#46109](https://github.com/microsoft/TypeScript/issues/46109#issuecomment-930307987).
22
+ */
23
+ export type IsNumeric<T extends string> = T extends `${number}`
24
+ ? Trim<T> extends T
25
+ ? true
26
+ : false
27
+ : false;
28
+
29
+ /**
30
+ * Returns a boolean for whether the string is lowercased.
31
+ */
32
+ export type IsLowerCase<T extends string> = T extends Lowercase<T> ? true : false;
33
+
34
+ /**
35
+ * Returns a boolean for whether the string is upper-cased.
36
+ */
37
+ export type IsUpperCase<T extends string> = T extends Uppercase<T> ? true : false;
38
+
39
+ export type WordSeparators = '-' | '_' | Whitespace;
40
+
41
+ export type Whitespace =
42
+ | '\u{9}' // '\t'
43
+ | '\u{A}' // '\n'
44
+ | '\u{B}' // '\v'
45
+ | '\u{C}' // '\f'
46
+ | '\u{D}' // '\r'
47
+ | '\u{20}' // ' '
48
+ | '\u{85}'
49
+ | '\u{A0}'
50
+ | '\u{1680}'
51
+ | '\u{2000}'
52
+ | '\u{2001}'
53
+ | '\u{2002}'
54
+ | '\u{2003}'
55
+ | '\u{2004}'
56
+ | '\u{2005}'
57
+ | '\u{2006}'
58
+ | '\u{2007}'
59
+ | '\u{2008}'
60
+ | '\u{2009}'
61
+ | '\u{200A}'
62
+ | '\u{2028}'
63
+ | '\u{2029}'
64
+ | '\u{202F}'
65
+ | '\u{205F}'
66
+ | '\u{3000}'
67
+ | '\u{FEFF}';
68
+
69
+ export type UpperCaseCharacters =
70
+ | 'A'
71
+ | 'B'
72
+ | 'C'
73
+ | 'D'
74
+ | 'E'
75
+ | 'F'
76
+ | 'G'
77
+ | 'H'
78
+ | 'I'
79
+ | 'J'
80
+ | 'K'
81
+ | 'L'
82
+ | 'M'
83
+ | 'N'
84
+ | 'O'
85
+ | 'P'
86
+ | 'Q'
87
+ | 'R'
88
+ | 'S'
89
+ | 'T'
90
+ | 'U'
91
+ | 'V'
92
+ | 'W'
93
+ | 'X'
94
+ | 'Y'
95
+ | 'Z';
@@ -1,3 +1,5 @@
1
+ // this type comes from https://github.com/sindresorhus/type-fest/blob/main/source/primitive.d.ts
2
+
1
3
  /**
2
4
  * Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
3
5
  *