@envive-ai/react-widgets 0.1.2-arthur-3 → 0.1.3

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 (297) hide show
  1. package/dist/SearchResults/SearchResults.cjs +86 -0
  2. package/dist/SearchResults/SearchResults.js +84 -0
  3. package/dist/SearchResults/SearchResultsWidget.cjs +34 -0
  4. package/dist/SearchResults/SearchResultsWidget.js +33 -0
  5. package/dist/SearchResults/index.cjs +2 -122
  6. package/dist/SearchResults/index.d.cts +2 -0
  7. package/dist/SearchResults/index.d.ts +2 -0
  8. package/dist/SearchResults/index.js +1 -119
  9. package/dist/SearchResults/withSearchResults.cjs +18 -0
  10. package/dist/SearchResults/withSearchResults.js +17 -0
  11. package/dist/SearchZeroState/SearchIcon.cjs +48 -0
  12. package/dist/SearchZeroState/SearchIcon.js +45 -0
  13. package/dist/SearchZeroState/SearchOverlay.cjs +42 -0
  14. package/dist/SearchZeroState/SearchOverlay.js +39 -0
  15. package/dist/SearchZeroState/SearchZeroState.cjs +173 -0
  16. package/dist/SearchZeroState/SearchZeroState.d.cts +7 -0
  17. package/dist/SearchZeroState/SearchZeroState.d.ts +7 -0
  18. package/dist/SearchZeroState/SearchZeroState.js +171 -0
  19. package/dist/SearchZeroState/SearchZeroStateWidget.cjs +23 -0
  20. package/dist/SearchZeroState/SearchZeroStateWidget.d.cts +15 -0
  21. package/dist/SearchZeroState/SearchZeroStateWidget.d.ts +15 -0
  22. package/dist/SearchZeroState/SearchZeroStateWidget.js +22 -0
  23. package/dist/SearchZeroState/components/RecommendedProducts.cjs +74 -0
  24. package/dist/SearchZeroState/components/RecommendedProducts.js +72 -0
  25. package/dist/SearchZeroState/index.cjs +4 -2996
  26. package/dist/SearchZeroState/index.d.cts +4 -0
  27. package/dist/SearchZeroState/index.d.ts +4 -0
  28. package/dist/SearchZeroState/index.js +2 -2991
  29. package/dist/SearchZeroState/overlay/overlayHostLocator.cjs +21 -0
  30. package/dist/SearchZeroState/overlay/overlayHostLocator.js +20 -0
  31. package/dist/SearchZeroState/types.d.cts +10 -0
  32. package/dist/SearchZeroState/types.d.ts +10 -0
  33. package/dist/SearchZeroState/zeroStateSearchVariants.cjs +21 -0
  34. package/dist/SearchZeroState/zeroStateSearchVariants.js +20 -0
  35. package/dist/SuggestionBar/SuggestionBar.cjs +74 -0
  36. package/dist/SuggestionBar/{index-DZU9kbWS.d.cts → SuggestionBar.d.cts} +4 -9
  37. package/dist/SuggestionBar/{index-DyXd4-b7.d.ts → SuggestionBar.d.ts} +6 -11
  38. package/dist/SuggestionBar/SuggestionBar.js +72 -0
  39. package/dist/SuggestionBar/index.cjs +3 -3
  40. package/dist/SuggestionBar/index.d.cts +3 -0
  41. package/dist/SuggestionBar/index.d.ts +3 -0
  42. package/dist/SuggestionBar/index.js +2 -2
  43. package/dist/SuggestionBar/types.cjs +10 -0
  44. package/dist/SuggestionBar/types.d.cts +7 -0
  45. package/dist/SuggestionBar/types.d.ts +7 -0
  46. package/dist/SuggestionBar/types.js +9 -0
  47. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.cjs +76 -0
  48. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.cts +6 -0
  49. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.ts +6 -0
  50. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.js +75 -0
  51. package/dist/SuggestionButtonContainer/index.cjs +1 -1
  52. package/dist/SuggestionButtonContainer/index.d.cts +3 -0
  53. package/dist/SuggestionButtonContainer/index.d.ts +3 -0
  54. package/dist/SuggestionButtonContainer/index.js +1 -1
  55. package/dist/SuggestionButtonContainer/{index-B_X537jw.d.cts → types.d.cts} +1 -4
  56. package/dist/SuggestionButtonContainer/{index-vwelzDzM.d.ts → types.d.ts} +1 -4
  57. package/dist/_virtual/rolldown_runtime.cjs +33 -0
  58. package/dist/node_modules/react-icons/lib/iconBase.cjs +121 -0
  59. package/dist/node_modules/react-icons/lib/iconBase.js +119 -0
  60. package/dist/node_modules/react-icons/lib/iconContext.cjs +17 -0
  61. package/dist/node_modules/react-icons/lib/iconContext.js +14 -0
  62. package/dist/node_modules/react-icons/md/index.cjs +35 -0
  63. package/dist/node_modules/react-icons/md/index.js +35 -0
  64. package/dist/{SuggestionBar-BOThXJvJ.cjs → node_modules/react-indiana-drag-scroll/dist/index.cjs} +6 -139
  65. package/dist/node_modules/uuid/dist/native.js +6 -0
  66. package/dist/node_modules/uuid/dist/rng.js +13 -0
  67. package/dist/node_modules/uuid/dist/stringify.js +9 -0
  68. package/dist/node_modules/uuid/dist/v4.js +27 -0
  69. package/dist/node_modules/uuid/dist-node/native.cjs +8 -0
  70. package/dist/node_modules/uuid/dist-node/rng.cjs +16 -0
  71. package/dist/node_modules/uuid/dist-node/stringify.cjs +10 -0
  72. package/dist/node_modules/uuid/dist-node/v4.cjs +27 -0
  73. package/dist/packages/components/dist/components/Accordion/Accordion.cjs +80 -0
  74. package/dist/packages/components/dist/components/Accordion/Accordion.js +78 -0
  75. package/dist/packages/components/dist/components/Accordion/index.cjs +1 -0
  76. package/dist/packages/components/dist/components/Accordion/index.js +1 -0
  77. package/dist/packages/components/dist/components/AnimatedChevron/AnimatedChevron.cjs +30 -0
  78. package/dist/packages/components/dist/components/AnimatedChevron/AnimatedChevron.js +29 -0
  79. package/dist/packages/components/dist/components/ButtonBase/ButtonBase.cjs +56 -0
  80. package/dist/packages/components/dist/components/ButtonBase/ButtonBase.js +54 -0
  81. package/dist/packages/components/dist/components/ButtonBase/index.cjs +2 -0
  82. package/dist/packages/components/dist/components/ButtonBase/index.js +2 -0
  83. package/dist/packages/components/dist/components/ButtonBase/types.cjs +11 -0
  84. package/dist/packages/components/dist/components/ButtonBase/types.js +10 -0
  85. package/dist/packages/components/dist/components/FilterScrollbar/AppliedFiltersScrollbar.cjs +45 -0
  86. package/dist/packages/components/dist/components/FilterScrollbar/AppliedFiltersScrollbar.js +42 -0
  87. package/dist/packages/components/dist/components/FilterScrollbar/DynamicFiltersScrollbar.cjs +33 -0
  88. package/dist/packages/components/dist/components/FilterScrollbar/DynamicFiltersScrollbar.js +30 -0
  89. package/dist/packages/components/dist/components/ImageWithFallback/ImageWithFallback.cjs +45 -0
  90. package/dist/packages/components/dist/components/ImageWithFallback/ImageWithFallback.js +42 -0
  91. package/dist/packages/components/dist/components/ImageWithFallback/index.cjs +1 -0
  92. package/dist/packages/components/dist/components/ImageWithFallback/index.js +1 -0
  93. package/dist/packages/components/dist/components/ModalSheet/ModalSheet.cjs +30 -0
  94. package/dist/packages/components/dist/components/ModalSheet/ModalSheet.js +29 -0
  95. package/dist/packages/components/dist/components/ModalSheet/desktop/desktopHeader.cjs +26 -0
  96. package/dist/packages/components/dist/components/ModalSheet/desktop/desktopHeader.js +24 -0
  97. package/dist/packages/components/dist/components/ModalSheet/desktop/index.cjs +122 -0
  98. package/dist/packages/components/dist/components/ModalSheet/desktop/index.js +120 -0
  99. package/dist/packages/components/dist/components/ModalSheet/index.cjs +1 -0
  100. package/dist/packages/components/dist/components/ModalSheet/index.js +1 -0
  101. package/dist/packages/components/dist/components/ModalSheet/mobile/index.cjs +116 -0
  102. package/dist/packages/components/dist/components/ModalSheet/mobile/index.js +114 -0
  103. package/dist/packages/components/dist/components/ModalSheet/mobile/mobileHeader.cjs +38 -0
  104. package/dist/packages/components/dist/components/ModalSheet/mobile/mobileHeader.js +36 -0
  105. package/dist/packages/components/dist/components/ProductCard/ProductCard.cjs +153 -0
  106. package/dist/packages/components/dist/components/ProductCard/ProductCard.js +149 -0
  107. package/dist/packages/components/dist/components/ProductCard/ProductCardSkeleton.cjs +33 -0
  108. package/dist/packages/components/dist/components/ProductCard/ProductCardSkeleton.js +31 -0
  109. package/dist/packages/components/dist/components/ProductCard/index.cjs +4 -0
  110. package/dist/packages/components/dist/components/ProductCard/index.js +4 -0
  111. package/dist/packages/components/dist/components/ProductCard/productCardVariants.cjs +49 -0
  112. package/dist/packages/components/dist/components/ProductCard/productCardVariants.js +45 -0
  113. package/dist/packages/components/dist/components/ProductCard/types.cjs +10 -0
  114. package/dist/packages/components/dist/components/ProductCard/types.js +9 -0
  115. package/dist/packages/components/dist/components/ProductGrid/ProductGrid.cjs +43 -0
  116. package/dist/packages/components/dist/components/ProductGrid/ProductGrid.js +41 -0
  117. package/dist/packages/components/dist/components/ProductGrid/index.cjs +2 -0
  118. package/dist/packages/components/dist/components/ProductGrid/index.js +2 -0
  119. package/dist/packages/components/dist/components/ProductGrid/productGridVariants.cjs +21 -0
  120. package/dist/packages/components/dist/components/ProductGrid/productGridVariants.js +20 -0
  121. package/dist/packages/components/dist/components/RadioButton/RadioButton.cjs +74 -0
  122. package/dist/packages/components/dist/components/RadioButton/RadioButton.js +72 -0
  123. package/dist/packages/components/dist/components/RadioButton/index.cjs +1 -0
  124. package/dist/packages/components/dist/components/RadioButton/index.js +1 -0
  125. package/dist/packages/components/dist/components/RadioButtonGroup/RadioButtonGroup.cjs +42 -0
  126. package/dist/packages/components/dist/components/RadioButtonGroup/RadioButtonGroup.js +39 -0
  127. package/dist/packages/components/dist/components/RadioButtonGroup/index.cjs +1 -0
  128. package/dist/packages/components/dist/components/RadioButtonGroup/index.js +1 -0
  129. package/dist/packages/components/dist/components/RecommendedProducts/RecommendedProducts.cjs +53 -0
  130. package/dist/packages/components/dist/components/RecommendedProducts/RecommendedProducts.js +51 -0
  131. package/dist/packages/components/dist/components/RecommendedProducts/index.cjs +3 -0
  132. package/dist/packages/components/dist/components/RecommendedProducts/index.js +3 -0
  133. package/dist/packages/components/dist/components/SearchAutocomplete/SearchAutocomplete.cjs +72 -0
  134. package/dist/packages/components/dist/components/SearchAutocomplete/SearchAutocomplete.js +69 -0
  135. package/dist/packages/components/dist/components/SearchAutocomplete/index.cjs +1 -0
  136. package/dist/packages/components/dist/components/SearchAutocomplete/index.js +1 -0
  137. package/dist/packages/components/dist/components/SearchFilter/SearchFilter.cjs +134 -0
  138. package/dist/packages/components/dist/components/SearchFilter/SearchFilter.js +132 -0
  139. package/dist/packages/components/dist/components/SearchFilter/SearchFilterFooter.cjs +48 -0
  140. package/dist/packages/components/dist/components/SearchFilter/SearchFilterFooter.js +46 -0
  141. package/dist/packages/components/dist/components/SearchFilter/SearchFilterHeader.cjs +42 -0
  142. package/dist/packages/components/dist/components/SearchFilter/SearchFilterHeader.js +40 -0
  143. package/dist/packages/components/dist/components/SearchFilter/SearchFilterItem.cjs +6 -0
  144. package/dist/packages/components/dist/components/SearchFilter/SearchFilterItem.js +4 -0
  145. package/dist/packages/components/dist/components/SearchFilter/index.cjs +5 -0
  146. package/dist/packages/components/dist/components/SearchFilter/index.js +5 -0
  147. package/dist/packages/components/dist/components/SearchFilter/useHasFilterStateChanged.cjs +27 -0
  148. package/dist/packages/components/dist/components/SearchFilter/useHasFilterStateChanged.js +26 -0
  149. package/dist/packages/components/dist/components/SearchFilter/utils.cjs +11 -0
  150. package/dist/packages/components/dist/components/SearchFilter/utils.js +9 -0
  151. package/dist/packages/components/dist/components/SearchInput/SearchInput.cjs +81 -0
  152. package/dist/packages/components/dist/components/SearchInput/SearchInput.js +78 -0
  153. package/dist/packages/components/dist/components/SearchInput/index.cjs +2 -0
  154. package/dist/packages/components/dist/components/SearchInput/index.js +2 -0
  155. package/dist/packages/components/dist/components/SearchInput/searchInputVariants.cjs +15 -0
  156. package/dist/packages/components/dist/components/SearchInput/searchInputVariants.js +15 -0
  157. package/dist/packages/components/dist/components/SearchInputForm/SearchInputForm.cjs +57 -0
  158. package/dist/packages/components/dist/components/SearchInputForm/SearchInputForm.js +55 -0
  159. package/dist/packages/components/dist/components/SearchInputForm/index.cjs +1 -0
  160. package/dist/packages/components/dist/components/SearchInputForm/index.js +1 -0
  161. package/dist/packages/components/dist/components/SearchResultsContent/SearchResultsContent.cjs +52 -0
  162. package/dist/packages/components/dist/components/SearchResultsContent/SearchResultsContent.js +50 -0
  163. package/dist/packages/components/dist/components/SearchResultsContent/index.cjs +1 -0
  164. package/dist/packages/components/dist/components/SearchResultsContent/index.js +1 -0
  165. package/dist/packages/components/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.cjs +24 -0
  166. package/dist/packages/components/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.js +23 -0
  167. package/dist/packages/components/dist/components/SearchResultsFilterButton/index.cjs +3 -0
  168. package/dist/packages/components/dist/components/SearchResultsFilterButton/index.js +3 -0
  169. package/dist/packages/components/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.cjs +36 -0
  170. package/dist/packages/components/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.js +35 -0
  171. package/dist/packages/components/dist/components/SearchResultsFilterModal/index.cjs +3 -0
  172. package/dist/packages/components/dist/components/SearchResultsFilterModal/index.js +3 -0
  173. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.cjs +9 -0
  174. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.js +9 -0
  175. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/index.cjs +2 -0
  176. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/index.js +2 -0
  177. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.cjs +34 -0
  178. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.js +34 -0
  179. package/dist/packages/components/dist/components/SearchResultsStates/NoSearchResultsFound.cjs +56 -0
  180. package/dist/packages/components/dist/components/SearchResultsStates/NoSearchResultsFound.js +54 -0
  181. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsGrid.cjs +53 -0
  182. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsGrid.js +51 -0
  183. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsLoadingGrid.cjs +52 -0
  184. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsLoadingGrid.js +51 -0
  185. package/dist/packages/components/dist/components/SearchResultsStates/index.cjs +3 -0
  186. package/dist/packages/components/dist/components/SearchResultsStates/index.js +3 -0
  187. package/dist/packages/components/dist/components/SearchResultsToolbar/SearchResultsToolbar.cjs +60 -0
  188. package/dist/packages/components/dist/components/SearchResultsToolbar/SearchResultsToolbar.js +57 -0
  189. package/dist/packages/components/dist/components/SearchResultsToolbar/index.cjs +3 -0
  190. package/dist/packages/components/dist/components/SearchResultsToolbar/index.js +3 -0
  191. package/dist/packages/components/dist/components/SparkleAnimation/SparkleAnimation.cjs +77 -0
  192. package/dist/packages/components/dist/components/SparkleAnimation/SparkleAnimation.js +75 -0
  193. package/dist/packages/components/dist/components/SparkleAnimation/index.cjs +2 -0
  194. package/dist/packages/components/dist/components/SparkleAnimation/index.js +2 -0
  195. package/dist/packages/components/dist/components/SparkleAnimation/types.cjs +12 -0
  196. package/dist/packages/components/dist/components/SparkleAnimation/types.js +11 -0
  197. package/dist/packages/components/dist/components/Spinner/Spinner.cjs +40 -0
  198. package/dist/packages/components/dist/components/Spinner/Spinner.js +38 -0
  199. package/dist/packages/components/dist/components/Spinner/index.cjs +1 -0
  200. package/dist/packages/components/dist/components/Spinner/index.js +1 -0
  201. package/dist/packages/components/dist/components/SuggestionButton/SuggestionButton.cjs +193 -0
  202. package/dist/packages/components/dist/components/SuggestionButton/SuggestionButton.js +188 -0
  203. package/dist/packages/components/dist/components/SuggestionButton/index.cjs +1 -0
  204. package/dist/packages/components/dist/components/SuggestionButton/index.js +1 -0
  205. package/dist/packages/components/dist/components/TextInput/TextInput.cjs +34 -0
  206. package/dist/packages/components/dist/components/TextInput/TextInput.js +31 -0
  207. package/dist/packages/components/dist/components/TextInput/index.cjs +1 -0
  208. package/dist/packages/components/dist/components/TextInput/index.js +1 -0
  209. package/dist/packages/components/dist/components/ToggleButton/ToggleButton.cjs +63 -0
  210. package/dist/packages/components/dist/components/ToggleButton/ToggleButton.js +61 -0
  211. package/dist/packages/components/dist/components/ToggleButton/index.cjs +1 -0
  212. package/dist/packages/components/dist/components/ToggleButton/index.js +1 -0
  213. package/dist/packages/components/dist/components/Typography/Typography.cjs +53 -0
  214. package/dist/packages/components/dist/components/Typography/Typography.js +50 -0
  215. package/dist/packages/components/dist/components/Typography/index.cjs +2 -0
  216. package/dist/packages/components/dist/components/Typography/index.js +2 -0
  217. package/dist/packages/components/dist/components/Typography/typographyVariantClasses.cjs +99 -0
  218. package/dist/packages/components/dist/components/Typography/typographyVariantClasses.js +96 -0
  219. package/dist/packages/components/dist/components/Typography/util.cjs +10 -0
  220. package/dist/packages/components/dist/components/Typography/util.js +10 -0
  221. package/dist/packages/components/dist/logging/logger.cjs +20 -0
  222. package/dist/packages/components/dist/logging/logger.js +19 -0
  223. package/dist/packages/components/dist/models/colorsConfig.cjs +28 -0
  224. package/dist/packages/components/dist/models/colorsConfig.js +26 -0
  225. package/dist/packages/components/dist/util/formatPrice.cjs +14 -0
  226. package/dist/packages/components/dist/util/formatPrice.js +13 -0
  227. package/dist/packages/components/dist/util/index.cjs +3 -0
  228. package/dist/packages/components/dist/util/index.js +3 -0
  229. package/dist/packages/components/dist/util/useScrollDirection.cjs +39 -0
  230. package/dist/packages/components/dist/util/useScrollDirection.js +38 -0
  231. package/dist/packages/components/dist/util/useStickyVisibility.cjs +38 -0
  232. package/dist/packages/components/dist/util/useStickyVisibility.js +37 -0
  233. package/dist/packages/icons/dist/AiSearchBold.cjs +38 -0
  234. package/dist/packages/icons/dist/AiSearchBold.js +38 -0
  235. package/dist/packages/icons/dist/AiSearchThin.cjs +35 -0
  236. package/dist/packages/icons/dist/AiSearchThin.js +35 -0
  237. package/dist/packages/icons/dist/ChevronDown.cjs +23 -0
  238. package/dist/packages/icons/dist/ChevronDown.js +23 -0
  239. package/dist/packages/icons/dist/FourPointStar.cjs +22 -0
  240. package/dist/packages/icons/dist/FourPointStar.js +22 -0
  241. package/dist/packages/icons/dist/IconClose.cjs +26 -0
  242. package/dist/packages/icons/dist/IconClose.js +26 -0
  243. package/dist/packages/icons/dist/IconCloseVariant.cjs +22 -0
  244. package/dist/packages/icons/dist/IconCloseVariant.js +22 -0
  245. package/dist/packages/icons/dist/MagnifyingGlassStarVariant.cjs +39 -0
  246. package/dist/packages/icons/dist/MagnifyingGlassStarVariant.js +39 -0
  247. package/dist/packages/icons/dist/OutlinedStar.cjs +22 -0
  248. package/dist/packages/icons/dist/OutlinedStar.js +22 -0
  249. package/dist/packages/icons/dist/SettingsVariant.cjs +72 -0
  250. package/dist/packages/icons/dist/SettingsVariant.js +72 -0
  251. package/dist/packages/icons/dist/Sparkles.cjs +43 -0
  252. package/dist/packages/icons/dist/Sparkles.js +43 -0
  253. package/dist/{chunk-DWy1uDak.cjs → packages/icons/dist/_virtual/rolldown_runtime.cjs} +4 -14
  254. package/dist/packages/icons/dist/_virtual/rolldown_runtime.js +27 -0
  255. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +696 -0
  256. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.js +696 -0
  257. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs +43 -0
  258. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +43 -0
  259. package/dist/packages/icons/dist/node_modules/react/cjs/react.development.cjs +1528 -0
  260. package/dist/packages/icons/dist/node_modules/react/cjs/react.development.js +1528 -0
  261. package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.cjs +329 -0
  262. package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.js +329 -0
  263. package/dist/packages/icons/dist/node_modules/react/index.cjs +13 -0
  264. package/dist/packages/icons/dist/node_modules/react/index.js +13 -0
  265. package/dist/packages/icons/dist/node_modules/react/jsx-runtime.cjs +13 -0
  266. package/dist/packages/icons/dist/node_modules/react/jsx-runtime.js +13 -0
  267. package/dist/util/useHorizontalScrollAnimation.cjs +88 -0
  268. package/dist/util/useHorizontalScrollAnimation.js +87 -0
  269. package/dist/util/useReducedMotionWithOverride.cjs +15 -0
  270. package/dist/util/useReducedMotionWithOverride.js +14 -0
  271. package/package.json +14 -8
  272. package/src/SearchResults/SearchResults.tsx +2 -4
  273. package/src/SearchResults/SearchResultsWidget.tsx +1 -1
  274. package/src/SearchResults/types.ts +0 -3
  275. package/src/SearchZeroState/SearchIcon.tsx +16 -9
  276. package/src/SearchZeroState/SearchOverlay.tsx +3 -2
  277. package/src/SearchZeroState/SearchZeroState.tsx +15 -18
  278. package/src/SearchZeroState/SearchZeroStateWidget.tsx +17 -8
  279. package/src/SearchZeroState/components/RecommendedProducts.tsx +8 -3
  280. package/src/SearchZeroState/overlay/overlayHostLocator.ts +2 -4
  281. package/src/SearchZeroState/types.ts +4 -1
  282. package/src/SearchZeroState/zeroStateSearchVariants.ts +14 -5
  283. package/src/SuggestionBar/SuggestionBar.tsx +12 -20
  284. package/src/SuggestionBar/types.ts +3 -3
  285. package/src/SuggestionButtonContainer/SuggestionButtonContainer.tsx +8 -17
  286. package/src/SuggestionButtonContainer/types.ts +3 -4
  287. package/src/stories/SearchResults.stories.tsx +1 -1
  288. package/src/stories/SearchZeroState.stories.tsx +10 -2
  289. package/src/stories/SuggestionBar.stories.tsx +1 -2
  290. package/src/util/useHorizontalScrollAnimation.ts +1 -1
  291. package/dist/SearchZeroState/index-19CiYvee.d.cts +0 -27
  292. package/dist/SearchZeroState/index-6EaGWYP4.d.ts +0 -27
  293. package/dist/SuggestionBar-DeMmAK4M.js +0 -131
  294. package/dist/SuggestionButtonContainer-BeWPpeQk.cjs +0 -173
  295. package/dist/SuggestionButtonContainer-CZhOkZaJ.js +0 -167
  296. /package/dist/SearchResults/{index-D8nrHueo.d.ts → SearchResultsWidget.d.cts} +0 -0
  297. /package/dist/SearchResults/{index-D52sX_I2.d.cts → SearchResultsWidget.d.ts} +0 -0
@@ -0,0 +1,21 @@
1
+
2
+ //#region src/SearchZeroState/overlay/overlayHostLocator.ts
3
+ const SEARCH_OVERLAY_ENTRYPOINT_ID = "spiffy-ai-search-overlay-entrypoint";
4
+ const SEARCH_OVERLAY_PORTAL_ID = "spiffy-ai-search-overlay-portal";
5
+ /**
6
+ * Find the portal target inside the overlay host's ShadowRoot.
7
+ */
8
+ function getOverlayPortalTarget(hostId = SEARCH_OVERLAY_ENTRYPOINT_ID) {
9
+ const bareMount = document.getElementById(SEARCH_OVERLAY_PORTAL_ID);
10
+ if (bareMount) return bareMount;
11
+ const host = document.getElementById(hostId);
12
+ if (!host) throw new Error(`[Overlay] Host #${hostId} not found`);
13
+ const sr = host.shadowRoot;
14
+ if (!sr) throw new Error("[Overlay] Host has no shadowRoot (was it initialized?)");
15
+ const mount = sr.getElementById(SEARCH_OVERLAY_PORTAL_ID);
16
+ if (!mount) throw new Error("[Overlay] Portal mount missing inside ShadowRoot");
17
+ return mount;
18
+ }
19
+
20
+ //#endregion
21
+ exports.getOverlayPortalTarget = getOverlayPortalTarget;
@@ -0,0 +1,20 @@
1
+ //#region src/SearchZeroState/overlay/overlayHostLocator.ts
2
+ const SEARCH_OVERLAY_ENTRYPOINT_ID = "spiffy-ai-search-overlay-entrypoint";
3
+ const SEARCH_OVERLAY_PORTAL_ID = "spiffy-ai-search-overlay-portal";
4
+ /**
5
+ * Find the portal target inside the overlay host's ShadowRoot.
6
+ */
7
+ function getOverlayPortalTarget(hostId = SEARCH_OVERLAY_ENTRYPOINT_ID) {
8
+ const bareMount = document.getElementById(SEARCH_OVERLAY_PORTAL_ID);
9
+ if (bareMount) return bareMount;
10
+ const host = document.getElementById(hostId);
11
+ if (!host) throw new Error(`[Overlay] Host #${hostId} not found`);
12
+ const sr = host.shadowRoot;
13
+ if (!sr) throw new Error("[Overlay] Host has no shadowRoot (was it initialized?)");
14
+ const mount = sr.getElementById(SEARCH_OVERLAY_PORTAL_ID);
15
+ if (!mount) throw new Error("[Overlay] Portal mount missing inside ShadowRoot");
16
+ return mount;
17
+ }
18
+
19
+ //#endregion
20
+ export { getOverlayPortalTarget };
@@ -0,0 +1,10 @@
1
+ import { SearchEntryPointWidgetConfig, SearchInputVariant } from "@envive-ai/react-hooks/contexts/types";
2
+
3
+ //#region src/SearchZeroState/types.d.ts
4
+ interface SearchZeroStateProps {
5
+ widgetConfig: SearchEntryPointWidgetConfig;
6
+ initialIsOpen?: boolean;
7
+ entryPointRef?: React.Ref<HTMLButtonElement>;
8
+ }
9
+ //#endregion
10
+ export { type SearchEntryPointWidgetConfig, type SearchInputVariant, SearchZeroStateProps };
@@ -0,0 +1,10 @@
1
+ import { SearchEntryPointWidgetConfig, SearchInputVariant } from "@envive-ai/react-hooks/contexts/types";
2
+
3
+ //#region src/SearchZeroState/types.d.ts
4
+ interface SearchZeroStateProps {
5
+ widgetConfig: SearchEntryPointWidgetConfig;
6
+ initialIsOpen?: boolean;
7
+ entryPointRef?: React.Ref<HTMLButtonElement>;
8
+ }
9
+ //#endregion
10
+ export { type SearchEntryPointWidgetConfig, type SearchInputVariant, SearchZeroStateProps };
@@ -0,0 +1,21 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ let __envive_ai_react_hooks_contexts_types = require("@envive-ai/react-hooks/contexts/types");
3
+
4
+ //#region src/SearchZeroState/zeroStateSearchVariants.ts
5
+ const searchZeroStateVariantClasses = {
6
+ backgroundTertiary: {
7
+ overlayBackgroundClasses: "spiffy-tw-bg-[--spiffy-colors-background-tertiary] spiffy-tw-text-[--spiffy-colors-text-primary] spiffy-tw-bg-opacity-90 spiffy-tw-backdrop-blur-20",
8
+ sparklesIconColor: (0, __envive_ai_react_hooks_contexts_types.colorVar)(__envive_ai_react_hooks_contexts_types.ColorNames.AccentPrimary)
9
+ },
10
+ backgroundDark: {
11
+ overlayBackgroundClasses: "spiffy-tw-bg-[--spiffy-colors-background-dark] spiffy-tw-text-[--spiffy-colors-text-light] spiffy-tw-bg-opacity-90 spiffy-tw-backdrop-blur-20",
12
+ sparklesIconColor: (0, __envive_ai_react_hooks_contexts_types.colorVar)(__envive_ai_react_hooks_contexts_types.ColorNames.AccentPrimary)
13
+ },
14
+ backgroundPrimary: {
15
+ overlayBackgroundClasses: "spiffy-tw-bg-[--spiffy-colors-background-primary] spiffy-tw-text-[--spiffy-colors-text-primary] spiffy-tw-bg-opacity-90 spiffy-tw-backdrop-blur-20",
16
+ sparklesIconColor: (0, __envive_ai_react_hooks_contexts_types.colorVar)(__envive_ai_react_hooks_contexts_types.ColorNames.AccentPrimary)
17
+ }
18
+ };
19
+
20
+ //#endregion
21
+ exports.searchZeroStateVariantClasses = searchZeroStateVariantClasses;
@@ -0,0 +1,20 @@
1
+ import { ColorNames, colorVar } from "@envive-ai/react-hooks/contexts/types";
2
+
3
+ //#region src/SearchZeroState/zeroStateSearchVariants.ts
4
+ const searchZeroStateVariantClasses = {
5
+ backgroundTertiary: {
6
+ overlayBackgroundClasses: "spiffy-tw-bg-[--spiffy-colors-background-tertiary] spiffy-tw-text-[--spiffy-colors-text-primary] spiffy-tw-bg-opacity-90 spiffy-tw-backdrop-blur-20",
7
+ sparklesIconColor: colorVar(ColorNames.AccentPrimary)
8
+ },
9
+ backgroundDark: {
10
+ overlayBackgroundClasses: "spiffy-tw-bg-[--spiffy-colors-background-dark] spiffy-tw-text-[--spiffy-colors-text-light] spiffy-tw-bg-opacity-90 spiffy-tw-backdrop-blur-20",
11
+ sparklesIconColor: colorVar(ColorNames.AccentPrimary)
12
+ },
13
+ backgroundPrimary: {
14
+ overlayBackgroundClasses: "spiffy-tw-bg-[--spiffy-colors-background-primary] spiffy-tw-text-[--spiffy-colors-text-primary] spiffy-tw-bg-opacity-90 spiffy-tw-backdrop-blur-20",
15
+ sparklesIconColor: colorVar(ColorNames.AccentPrimary)
16
+ }
17
+ };
18
+
19
+ //#endregion
20
+ export { searchZeroStateVariantClasses };
@@ -0,0 +1,74 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ const require_index = require('../node_modules/react-indiana-drag-scroll/dist/index.cjs');
3
+ const require_v4 = require('../node_modules/uuid/dist-node/v4.cjs');
4
+ const require_types = require('./types.cjs');
5
+ const require_SuggestionButtonContainer = require('../SuggestionButtonContainer/SuggestionButtonContainer.cjs');
6
+ require('../SuggestionButtonContainer/index.cjs');
7
+ let react = require("react");
8
+ let jotai = require("jotai");
9
+ let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
10
+ let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
11
+ let __envive_ai_react_hooks_config = require("@envive-ai/react-hooks/config");
12
+ let __envive_ai_react_hooks_hooks_IsSmallScreen = require("@envive-ai/react-hooks/hooks/IsSmallScreen");
13
+ let __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent = require("@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent");
14
+ let react_jsx_runtime = require("react/jsx-runtime");
15
+
16
+ //#region src/SuggestionBar/SuggestionBar.tsx
17
+ var import_dist = require_index.default;
18
+ function SuggestionBar({ id, locationForMetrics, buttonTexts, buttonVariation, hoverButtonVariation, boldFirstButton = false, twoRowsOnMobile = false, animationSpeed = "none", buttonBorderRadius = "lg", handleReply, dataTestId }) {
19
+ const componentVisibleTriggerRef = (0, react.useRef)(null);
20
+ const containerRef = (0, react.useRef)(null);
21
+ const { ref } = (0, import_dist.useScrollContainer)();
22
+ const isSmallScreen = (0, __envive_ai_react_hooks_hooks_IsSmallScreen.useIsSmallScreen)();
23
+ const logPerfMetric = (0, jotai.useSetAtom)(__envive_ai_react_hooks_atoms_chat.logPerfMetricAtom);
24
+ const isAnimated = animationSpeed !== "none";
25
+ (0, __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent.useTrackComponentVisibleEvent)(__envive_ai_react_hooks_application_models.SpiffyWidgets.SuggestionBar, componentVisibleTriggerRef, { animated: isAnimated });
26
+ const handleClickSuggestion = (0, react.useCallback)((buttonText) => {
27
+ handleReply({
28
+ id: require_v4.default(),
29
+ role: __envive_ai_react_hooks_application_models.MessageRole.User,
30
+ type: __envive_ai_react_hooks_application_models.MessageType.QueryTyped,
31
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
32
+ metadata: { content: buttonText }
33
+ });
34
+ }, [handleReply]);
35
+ const setRefs = (0, react.useCallback)((el) => {
36
+ if (typeof ref === "function") ref(el);
37
+ containerRef.current = el;
38
+ }, [ref]);
39
+ const handleContainerRef = (0, react.useCallback)((el) => {
40
+ if (el) logPerfMetric(locationForMetrics === require_types.SuggestionBarLocationForMetrics.SUGGESTION_BAR_TOP ? __envive_ai_react_hooks_atoms_chat.PerfMetricsEvents.TopSuggestionsBarRendered : __envive_ai_react_hooks_atoms_chat.PerfMetricsEvents.BottomSuggestionsBarRendered);
41
+ setRefs(el);
42
+ }, [
43
+ locationForMetrics,
44
+ logPerfMetric,
45
+ setRefs
46
+ ]);
47
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
48
+ id,
49
+ className: "spiffy-tw-w-full spiffy-tw-justify-center spiffy-tw-overflow-hidden",
50
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
51
+ className: `spiffy-tw-no-scrollbar spiffy-tw-relative spiffy-tw-w-full spiffy-tw-overflow-y-hidden spiffy-tw-overflow-x-scroll ${twoRowsOnMobile && isSmallScreen ? "spiffy-tw-h-20" : "spiffy-tw-h-9"} `,
52
+ ref: handleContainerRef,
53
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
54
+ className: "spiffy-tw-relative spiffy-tw-inline-block spiffy-tw-whitespace-nowrap",
55
+ ref: componentVisibleTriggerRef,
56
+ "data-testid": dataTestId || __envive_ai_react_hooks_config.SUGGESTION_BAR_TESTID,
57
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SuggestionButtonContainer.SuggestionButtonContainer, {
58
+ buttonVariation,
59
+ hoverButtonVariation,
60
+ buttonTexts,
61
+ onButtonClick: handleClickSuggestion,
62
+ scrollContainerRef: containerRef,
63
+ boldFirstButton,
64
+ twoRowsOnMobile,
65
+ animationSpeed,
66
+ buttonBorderRadius
67
+ })
68
+ })
69
+ })
70
+ });
71
+ }
72
+
73
+ //#endregion
74
+ exports.SuggestionBar = SuggestionBar;
@@ -1,16 +1,10 @@
1
+ import { SuggestionBarLocationForMetrics } from "./types.cjs";
1
2
  import * as react_jsx_runtime0 from "react/jsx-runtime";
2
3
  import { SuggestionButtonVariant } from "@envive-ai/react-hooks/contexts/types";
3
- import { TestProps } from "@envive-ai/react-hooks/types";
4
4
  import { Message } from "postcss";
5
5
 
6
- //#region src/SuggestionBar/types.d.ts
7
- declare enum SuggestionBarLocationForMetrics {
8
- SUGGESTION_BAR_TOP = "top",
9
- SUGGESTION_BAR_BOTTOM = "bottom",
10
- }
11
- //#endregion
12
6
  //#region src/SuggestionBar/SuggestionBar.d.ts
13
- interface SuggestionBarProps extends TestProps {
7
+ interface SuggestionBarProps {
14
8
  id: string;
15
9
  locationForMetrics: SuggestionBarLocationForMetrics;
16
10
  buttonTexts: string[];
@@ -21,6 +15,7 @@ interface SuggestionBarProps extends TestProps {
21
15
  twoRowsOnMobile?: boolean | undefined;
22
16
  animationSpeed?: 'standard' | 'slow' | 'none';
23
17
  buttonBorderRadius?: 'sm' | 'md' | 'lg';
18
+ dataTestId?: string;
24
19
  }
25
20
  declare function SuggestionBar({
26
21
  id,
@@ -36,4 +31,4 @@ declare function SuggestionBar({
36
31
  dataTestId
37
32
  }: Readonly<SuggestionBarProps>): react_jsx_runtime0.JSX.Element;
38
33
  //#endregion
39
- export { SuggestionBar, SuggestionBarLocationForMetrics };
34
+ export { SuggestionBar };
@@ -1,16 +1,10 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
- import { TestProps } from "@envive-ai/react-hooks/types";
1
+ import { SuggestionBarLocationForMetrics } from "./types.js";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
  import { SuggestionButtonVariant } from "@envive-ai/react-hooks/contexts/types";
4
4
  import { Message } from "postcss";
5
5
 
6
- //#region src/SuggestionBar/types.d.ts
7
- declare enum SuggestionBarLocationForMetrics {
8
- SUGGESTION_BAR_TOP = "top",
9
- SUGGESTION_BAR_BOTTOM = "bottom",
10
- }
11
- //#endregion
12
6
  //#region src/SuggestionBar/SuggestionBar.d.ts
13
- interface SuggestionBarProps extends TestProps {
7
+ interface SuggestionBarProps {
14
8
  id: string;
15
9
  locationForMetrics: SuggestionBarLocationForMetrics;
16
10
  buttonTexts: string[];
@@ -21,6 +15,7 @@ interface SuggestionBarProps extends TestProps {
21
15
  twoRowsOnMobile?: boolean | undefined;
22
16
  animationSpeed?: 'standard' | 'slow' | 'none';
23
17
  buttonBorderRadius?: 'sm' | 'md' | 'lg';
18
+ dataTestId?: string;
24
19
  }
25
20
  declare function SuggestionBar({
26
21
  id,
@@ -34,6 +29,6 @@ declare function SuggestionBar({
34
29
  buttonBorderRadius,
35
30
  handleReply,
36
31
  dataTestId
37
- }: Readonly<SuggestionBarProps>): react_jsx_runtime0.JSX.Element;
32
+ }: Readonly<SuggestionBarProps>): react_jsx_runtime1.JSX.Element;
38
33
  //#endregion
39
- export { SuggestionBar, SuggestionBarLocationForMetrics };
34
+ export { SuggestionBar };
@@ -0,0 +1,72 @@
1
+ import v4_default from "../node_modules/uuid/dist/v4.js";
2
+ import { SuggestionBarLocationForMetrics } from "./types.js";
3
+ import { SuggestionButtonContainer } from "../SuggestionButtonContainer/SuggestionButtonContainer.js";
4
+ import "../SuggestionButtonContainer/index.js";
5
+ import { useCallback, useRef } from "react";
6
+ import { useScrollContainer } from "react-indiana-drag-scroll";
7
+ import { useSetAtom } from "jotai";
8
+ import { MessageRole, MessageType, SpiffyWidgets } from "@envive-ai/react-hooks/application/models";
9
+ import { PerfMetricsEvents, logPerfMetricAtom } from "@envive-ai/react-hooks/atoms/chat";
10
+ import { SUGGESTION_BAR_TESTID } from "@envive-ai/react-hooks/config";
11
+ import { useIsSmallScreen } from "@envive-ai/react-hooks/hooks/IsSmallScreen";
12
+ import { useTrackComponentVisibleEvent } from "@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent";
13
+ import { jsx } from "react/jsx-runtime";
14
+
15
+ //#region src/SuggestionBar/SuggestionBar.tsx
16
+ function SuggestionBar({ id, locationForMetrics, buttonTexts, buttonVariation, hoverButtonVariation, boldFirstButton = false, twoRowsOnMobile = false, animationSpeed = "none", buttonBorderRadius = "lg", handleReply, dataTestId }) {
17
+ const componentVisibleTriggerRef = useRef(null);
18
+ const containerRef = useRef(null);
19
+ const { ref } = useScrollContainer();
20
+ const isSmallScreen = useIsSmallScreen();
21
+ const logPerfMetric = useSetAtom(logPerfMetricAtom);
22
+ const isAnimated = animationSpeed !== "none";
23
+ useTrackComponentVisibleEvent(SpiffyWidgets.SuggestionBar, componentVisibleTriggerRef, { animated: isAnimated });
24
+ const handleClickSuggestion = useCallback((buttonText) => {
25
+ handleReply({
26
+ id: v4_default(),
27
+ role: MessageRole.User,
28
+ type: MessageType.QueryTyped,
29
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
30
+ metadata: { content: buttonText }
31
+ });
32
+ }, [handleReply]);
33
+ const setRefs = useCallback((el) => {
34
+ if (typeof ref === "function") ref(el);
35
+ containerRef.current = el;
36
+ }, [ref]);
37
+ const handleContainerRef = useCallback((el) => {
38
+ if (el) logPerfMetric(locationForMetrics === SuggestionBarLocationForMetrics.SUGGESTION_BAR_TOP ? PerfMetricsEvents.TopSuggestionsBarRendered : PerfMetricsEvents.BottomSuggestionsBarRendered);
39
+ setRefs(el);
40
+ }, [
41
+ locationForMetrics,
42
+ logPerfMetric,
43
+ setRefs
44
+ ]);
45
+ return /* @__PURE__ */ jsx("div", {
46
+ id,
47
+ className: "spiffy-tw-w-full spiffy-tw-justify-center spiffy-tw-overflow-hidden",
48
+ children: /* @__PURE__ */ jsx("div", {
49
+ className: `spiffy-tw-no-scrollbar spiffy-tw-relative spiffy-tw-w-full spiffy-tw-overflow-y-hidden spiffy-tw-overflow-x-scroll ${twoRowsOnMobile && isSmallScreen ? "spiffy-tw-h-20" : "spiffy-tw-h-9"} `,
50
+ ref: handleContainerRef,
51
+ children: /* @__PURE__ */ jsx("div", {
52
+ className: "spiffy-tw-relative spiffy-tw-inline-block spiffy-tw-whitespace-nowrap",
53
+ ref: componentVisibleTriggerRef,
54
+ "data-testid": dataTestId || SUGGESTION_BAR_TESTID,
55
+ children: /* @__PURE__ */ jsx(SuggestionButtonContainer, {
56
+ buttonVariation,
57
+ hoverButtonVariation,
58
+ buttonTexts,
59
+ onButtonClick: handleClickSuggestion,
60
+ scrollContainerRef: containerRef,
61
+ boldFirstButton,
62
+ twoRowsOnMobile,
63
+ animationSpeed,
64
+ buttonBorderRadius
65
+ })
66
+ })
67
+ })
68
+ });
69
+ }
70
+
71
+ //#endregion
72
+ export { SuggestionBar };
@@ -1,5 +1,5 @@
1
- const require_SuggestionBar = require('../SuggestionBar-BOThXJvJ.cjs');
2
- require('../SuggestionButtonContainer-BeWPpeQk.cjs');
1
+ const require_types = require('./types.cjs');
2
+ const require_SuggestionBar = require('./SuggestionBar.cjs');
3
3
 
4
4
  exports.SuggestionBar = require_SuggestionBar.SuggestionBar;
5
- exports.SuggestionBarLocationForMetrics = require_SuggestionBar.SuggestionBarLocationForMetrics;
5
+ exports.SuggestionBarLocationForMetrics = require_types.SuggestionBarLocationForMetrics;
@@ -0,0 +1,3 @@
1
+ import { SuggestionBarLocationForMetrics } from "./types.cjs";
2
+ import { SuggestionBar } from "./SuggestionBar.cjs";
3
+ export { SuggestionBar, SuggestionBarLocationForMetrics };
@@ -0,0 +1,3 @@
1
+ import { SuggestionBarLocationForMetrics } from "./types.js";
2
+ import { SuggestionBar } from "./SuggestionBar.js";
3
+ export { SuggestionBar, SuggestionBarLocationForMetrics };
@@ -1,4 +1,4 @@
1
- import { n as SuggestionBarLocationForMetrics, t as SuggestionBar } from "../SuggestionBar-DeMmAK4M.js";
2
- import "../SuggestionButtonContainer-CZhOkZaJ.js";
1
+ import { SuggestionBarLocationForMetrics } from "./types.js";
2
+ import { SuggestionBar } from "./SuggestionBar.js";
3
3
 
4
4
  export { SuggestionBar, SuggestionBarLocationForMetrics };
@@ -0,0 +1,10 @@
1
+
2
+ //#region src/SuggestionBar/types.ts
3
+ let SuggestionBarLocationForMetrics = /* @__PURE__ */ function(SuggestionBarLocationForMetrics$1) {
4
+ SuggestionBarLocationForMetrics$1["SUGGESTION_BAR_TOP"] = "top";
5
+ SuggestionBarLocationForMetrics$1["SUGGESTION_BAR_BOTTOM"] = "bottom";
6
+ return SuggestionBarLocationForMetrics$1;
7
+ }({});
8
+
9
+ //#endregion
10
+ exports.SuggestionBarLocationForMetrics = SuggestionBarLocationForMetrics;
@@ -0,0 +1,7 @@
1
+ //#region src/SuggestionBar/types.d.ts
2
+ declare enum SuggestionBarLocationForMetrics {
3
+ SUGGESTION_BAR_TOP = "top",
4
+ SUGGESTION_BAR_BOTTOM = "bottom",
5
+ }
6
+ //#endregion
7
+ export { SuggestionBarLocationForMetrics };
@@ -0,0 +1,7 @@
1
+ //#region src/SuggestionBar/types.d.ts
2
+ declare enum SuggestionBarLocationForMetrics {
3
+ SUGGESTION_BAR_TOP = "top",
4
+ SUGGESTION_BAR_BOTTOM = "bottom",
5
+ }
6
+ //#endregion
7
+ export { SuggestionBarLocationForMetrics };
@@ -0,0 +1,9 @@
1
+ //#region src/SuggestionBar/types.ts
2
+ let SuggestionBarLocationForMetrics = /* @__PURE__ */ function(SuggestionBarLocationForMetrics$1) {
3
+ SuggestionBarLocationForMetrics$1["SUGGESTION_BAR_TOP"] = "top";
4
+ SuggestionBarLocationForMetrics$1["SUGGESTION_BAR_BOTTOM"] = "bottom";
5
+ return SuggestionBarLocationForMetrics$1;
6
+ }({});
7
+
8
+ //#endregion
9
+ export { SuggestionBarLocationForMetrics };
@@ -0,0 +1,76 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ const require_SuggestionButton = require('../packages/components/dist/components/SuggestionButton/SuggestionButton.cjs');
3
+ require('../packages/components/dist/components/SuggestionButton/index.cjs');
4
+ const require_useHorizontalScrollAnimation = require('../util/useHorizontalScrollAnimation.cjs');
5
+ let react = require("react");
6
+ let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
7
+ let __envive_ai_react_hooks_config = require("@envive-ai/react-hooks/config");
8
+ let __envive_ai_react_hooks_hooks_IsSmallScreen = require("@envive-ai/react-hooks/hooks/IsSmallScreen");
9
+ let __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent = require("@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent");
10
+ let react_jsx_runtime = require("react/jsx-runtime");
11
+
12
+ //#region src/SuggestionButtonContainer/SuggestionButtonContainer.tsx
13
+ function ButtonContainer({ children }) {
14
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15
+ className: "spiffy-tw-pl-0 spiffy-tw-flex spiffy-tw-h-full spiffy-tw-flex-row spiffy-tw-items-center spiffy-tw-space-x-2",
16
+ children
17
+ });
18
+ }
19
+ const SuggestionButtonContainer = ({ buttonVariation, hoverButtonVariation, buttonTexts, boldFirstButton = false, twoRowsOnMobile = false, animationSpeed = "none", buttonBorderRadius = "lg", scrollContainerRef, onButtonClick }) => {
20
+ const componentVisibleTriggerRef = (0, react.useRef)(null);
21
+ require_useHorizontalScrollAnimation.useHorizontalScrollAnimation({
22
+ scrollContainerRef,
23
+ animationSpeed
24
+ });
25
+ const isSmallScreen = (0, __envive_ai_react_hooks_hooks_IsSmallScreen.useIsSmallScreen)();
26
+ const isAnimated = animationSpeed !== "none";
27
+ (0, __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent.useTrackComponentVisibleEvent)(__envive_ai_react_hooks_application_models.SpiffyWidgets.SuggestionBar, componentVisibleTriggerRef, { animated: isAnimated });
28
+ const visibleButtonsFirstRow = buttonTexts.slice(0, twoRowsOnMobile && isSmallScreen ? Math.ceil((buttonTexts.length + 1) / 2) : void 0);
29
+ const visibleButtonsSecondRow = buttonTexts.slice(Math.ceil((buttonTexts.length + 1) / 2), buttonTexts.length);
30
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
31
+ className: "spiffy-tw-no-scrollbar spiffy-tw-w-full spiffy-tw-overflow-x-scroll spiffy-tw-whitespace-nowrap",
32
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ButtonContainer, { children: [visibleButtonsFirstRow.map((suggestion, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SuggestionButton.SuggestionButton, {
33
+ variant: buttonVariation,
34
+ hoverVariant: hoverButtonVariation,
35
+ isDisabled: false,
36
+ content: suggestion,
37
+ boldText: boldFirstButton && i === 0,
38
+ borderRadius: buttonBorderRadius,
39
+ onClick: () => onButtonClick(suggestion),
40
+ dataTestId: __envive_ai_react_hooks_config.SUGGESTION_BAR_BUTTON_TESTID
41
+ }, i)), isAnimated && buttonTexts.map((suggestion, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SuggestionButton.SuggestionButton, {
42
+ variant: buttonVariation,
43
+ hoverVariant: hoverButtonVariation,
44
+ isDisabled: false,
45
+ content: suggestion,
46
+ boldText: boldFirstButton && i === 0,
47
+ borderRadius: buttonBorderRadius,
48
+ onClick: () => onButtonClick(suggestion),
49
+ dataTestId: __envive_ai_react_hooks_config.SUGGESTION_BAR_BUTTON_TESTID
50
+ }, `animation-dupe-${i}`))] }), twoRowsOnMobile && isSmallScreen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
51
+ className: "spiffy-tw-mt-1.5",
52
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ButtonContainer, { children: [visibleButtonsSecondRow.map((suggestion, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SuggestionButton.SuggestionButton, {
53
+ variant: buttonVariation,
54
+ hoverVariant: hoverButtonVariation,
55
+ isDisabled: false,
56
+ content: suggestion,
57
+ boldText: boldFirstButton && i === 0,
58
+ borderRadius: buttonBorderRadius,
59
+ onClick: () => onButtonClick(suggestion),
60
+ dataTestId: __envive_ai_react_hooks_config.SUGGESTION_BAR_BUTTON_TESTID
61
+ }, i)), isAnimated && visibleButtonsSecondRow.map((suggestion, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SuggestionButton.SuggestionButton, {
62
+ variant: buttonVariation,
63
+ hoverVariant: hoverButtonVariation,
64
+ isDisabled: false,
65
+ content: suggestion,
66
+ boldText: boldFirstButton && i === 0,
67
+ borderRadius: buttonBorderRadius,
68
+ onClick: () => onButtonClick(suggestion),
69
+ dataTestId: __envive_ai_react_hooks_config.SUGGESTION_BAR_BUTTON_TESTID
70
+ }, `animation-dupe-${i}`))] })
71
+ })]
72
+ });
73
+ };
74
+
75
+ //#endregion
76
+ exports.SuggestionButtonContainer = SuggestionButtonContainer;
@@ -0,0 +1,6 @@
1
+ import { SuggestionButtonContainerProps } from "./types.cjs";
2
+
3
+ //#region src/SuggestionButtonContainer/SuggestionButtonContainer.d.ts
4
+ declare const SuggestionButtonContainer: React.FC<SuggestionButtonContainerProps>;
5
+ //#endregion
6
+ export { SuggestionButtonContainer };
@@ -0,0 +1,6 @@
1
+ import { SuggestionButtonContainerProps } from "./types.js";
2
+
3
+ //#region src/SuggestionButtonContainer/SuggestionButtonContainer.d.ts
4
+ declare const SuggestionButtonContainer: React.FC<SuggestionButtonContainerProps>;
5
+ //#endregion
6
+ export { SuggestionButtonContainer };
@@ -0,0 +1,75 @@
1
+ import { SuggestionButton } from "../packages/components/dist/components/SuggestionButton/SuggestionButton.js";
2
+ import "../packages/components/dist/components/SuggestionButton/index.js";
3
+ import { useHorizontalScrollAnimation } from "../util/useHorizontalScrollAnimation.js";
4
+ import { useRef } from "react";
5
+ import { SpiffyWidgets } from "@envive-ai/react-hooks/application/models";
6
+ import { SUGGESTION_BAR_BUTTON_TESTID } from "@envive-ai/react-hooks/config";
7
+ import { useIsSmallScreen } from "@envive-ai/react-hooks/hooks/IsSmallScreen";
8
+ import { useTrackComponentVisibleEvent } from "@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+
11
+ //#region src/SuggestionButtonContainer/SuggestionButtonContainer.tsx
12
+ function ButtonContainer({ children }) {
13
+ return /* @__PURE__ */ jsx("div", {
14
+ className: "spiffy-tw-pl-0 spiffy-tw-flex spiffy-tw-h-full spiffy-tw-flex-row spiffy-tw-items-center spiffy-tw-space-x-2",
15
+ children
16
+ });
17
+ }
18
+ const SuggestionButtonContainer = ({ buttonVariation, hoverButtonVariation, buttonTexts, boldFirstButton = false, twoRowsOnMobile = false, animationSpeed = "none", buttonBorderRadius = "lg", scrollContainerRef, onButtonClick }) => {
19
+ const componentVisibleTriggerRef = useRef(null);
20
+ useHorizontalScrollAnimation({
21
+ scrollContainerRef,
22
+ animationSpeed
23
+ });
24
+ const isSmallScreen = useIsSmallScreen();
25
+ const isAnimated = animationSpeed !== "none";
26
+ useTrackComponentVisibleEvent(SpiffyWidgets.SuggestionBar, componentVisibleTriggerRef, { animated: isAnimated });
27
+ const visibleButtonsFirstRow = buttonTexts.slice(0, twoRowsOnMobile && isSmallScreen ? Math.ceil((buttonTexts.length + 1) / 2) : void 0);
28
+ const visibleButtonsSecondRow = buttonTexts.slice(Math.ceil((buttonTexts.length + 1) / 2), buttonTexts.length);
29
+ return /* @__PURE__ */ jsxs("div", {
30
+ className: "spiffy-tw-no-scrollbar spiffy-tw-w-full spiffy-tw-overflow-x-scroll spiffy-tw-whitespace-nowrap",
31
+ children: [/* @__PURE__ */ jsxs(ButtonContainer, { children: [visibleButtonsFirstRow.map((suggestion, i) => /* @__PURE__ */ jsx(SuggestionButton, {
32
+ variant: buttonVariation,
33
+ hoverVariant: hoverButtonVariation,
34
+ isDisabled: false,
35
+ content: suggestion,
36
+ boldText: boldFirstButton && i === 0,
37
+ borderRadius: buttonBorderRadius,
38
+ onClick: () => onButtonClick(suggestion),
39
+ dataTestId: SUGGESTION_BAR_BUTTON_TESTID
40
+ }, i)), isAnimated && buttonTexts.map((suggestion, i) => /* @__PURE__ */ jsx(SuggestionButton, {
41
+ variant: buttonVariation,
42
+ hoverVariant: hoverButtonVariation,
43
+ isDisabled: false,
44
+ content: suggestion,
45
+ boldText: boldFirstButton && i === 0,
46
+ borderRadius: buttonBorderRadius,
47
+ onClick: () => onButtonClick(suggestion),
48
+ dataTestId: SUGGESTION_BAR_BUTTON_TESTID
49
+ }, `animation-dupe-${i}`))] }), twoRowsOnMobile && isSmallScreen && /* @__PURE__ */ jsx("div", {
50
+ className: "spiffy-tw-mt-1.5",
51
+ children: /* @__PURE__ */ jsxs(ButtonContainer, { children: [visibleButtonsSecondRow.map((suggestion, i) => /* @__PURE__ */ jsx(SuggestionButton, {
52
+ variant: buttonVariation,
53
+ hoverVariant: hoverButtonVariation,
54
+ isDisabled: false,
55
+ content: suggestion,
56
+ boldText: boldFirstButton && i === 0,
57
+ borderRadius: buttonBorderRadius,
58
+ onClick: () => onButtonClick(suggestion),
59
+ dataTestId: SUGGESTION_BAR_BUTTON_TESTID
60
+ }, i)), isAnimated && visibleButtonsSecondRow.map((suggestion, i) => /* @__PURE__ */ jsx(SuggestionButton, {
61
+ variant: buttonVariation,
62
+ hoverVariant: hoverButtonVariation,
63
+ isDisabled: false,
64
+ content: suggestion,
65
+ boldText: boldFirstButton && i === 0,
66
+ borderRadius: buttonBorderRadius,
67
+ onClick: () => onButtonClick(suggestion),
68
+ dataTestId: SUGGESTION_BAR_BUTTON_TESTID
69
+ }, `animation-dupe-${i}`))] })
70
+ })]
71
+ });
72
+ };
73
+
74
+ //#endregion
75
+ export { SuggestionButtonContainer };
@@ -1,3 +1,3 @@
1
- const require_SuggestionButtonContainer = require('../SuggestionButtonContainer-BeWPpeQk.cjs');
1
+ const require_SuggestionButtonContainer = require('./SuggestionButtonContainer.cjs');
2
2
 
3
3
  exports.SuggestionButtonContainer = require_SuggestionButtonContainer.SuggestionButtonContainer;
@@ -0,0 +1,3 @@
1
+ import { SuggestionButtonContainerProps } from "./types.cjs";
2
+ import { SuggestionButtonContainer } from "./SuggestionButtonContainer.cjs";
3
+ export { SuggestionButtonContainer, SuggestionButtonContainerProps };
@@ -0,0 +1,3 @@
1
+ import { SuggestionButtonContainerProps } from "./types.js";
2
+ import { SuggestionButtonContainer } from "./SuggestionButtonContainer.js";
3
+ export { SuggestionButtonContainer, SuggestionButtonContainerProps };
@@ -1,3 +1,3 @@
1
- import { t as SuggestionButtonContainer } from "../SuggestionButtonContainer-CZhOkZaJ.js";
1
+ import { SuggestionButtonContainer } from "./SuggestionButtonContainer.js";
2
2
 
3
3
  export { SuggestionButtonContainer };
@@ -14,7 +14,4 @@ interface SuggestionButtonContainerProps extends TestProps {
14
14
  buttonBorderRadius?: 'sm' | 'md' | 'lg';
15
15
  }
16
16
  //#endregion
17
- //#region src/SuggestionButtonContainer/SuggestionButtonContainer.d.ts
18
- declare const SuggestionButtonContainer: React.FC<SuggestionButtonContainerProps>;
19
- //#endregion
20
- export { SuggestionButtonContainer, SuggestionButtonContainerProps };
17
+ export { SuggestionButtonContainerProps };
@@ -14,7 +14,4 @@ interface SuggestionButtonContainerProps extends TestProps {
14
14
  buttonBorderRadius?: 'sm' | 'md' | 'lg';
15
15
  }
16
16
  //#endregion
17
- //#region src/SuggestionButtonContainer/SuggestionButtonContainer.d.ts
18
- declare const SuggestionButtonContainer: React.FC<SuggestionButtonContainerProps>;
19
- //#endregion
20
- export { SuggestionButtonContainer, SuggestionButtonContainerProps };
17
+ export { SuggestionButtonContainerProps };
@@ -0,0 +1,33 @@
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod) => function() {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
14
+ key = keys[i];
15
+ if (!__hasOwnProp.call(to, key) && key !== except) {
16
+ __defProp(to, key, {
17
+ get: ((k) => from[k]).bind(null, key),
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ }
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
28
+ }) : target, mod));
29
+
30
+ //#endregion
31
+
32
+ exports.__commonJS = __commonJS;
33
+ exports.__toESM = __toESM;