@seekora-ai/ui-sdk-react 0.0.0-stage-20260517092419

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 (357) hide show
  1. package/dist/components/Breadcrumb.d.ts +43 -0
  2. package/dist/components/Breadcrumb.d.ts.map +1 -0
  3. package/dist/components/Breadcrumb.js +119 -0
  4. package/dist/components/ClearRefinements.d.ts +42 -0
  5. package/dist/components/ClearRefinements.d.ts.map +1 -0
  6. package/dist/components/ClearRefinements.js +81 -0
  7. package/dist/components/CurrentRefinements.d.ts +63 -0
  8. package/dist/components/CurrentRefinements.d.ts.map +1 -0
  9. package/dist/components/CurrentRefinements.js +302 -0
  10. package/dist/components/FacetDropdown.d.ts +94 -0
  11. package/dist/components/FacetDropdown.d.ts.map +1 -0
  12. package/dist/components/FacetDropdown.js +396 -0
  13. package/dist/components/Facets.d.ts +118 -0
  14. package/dist/components/Facets.d.ts.map +1 -0
  15. package/dist/components/Facets.js +785 -0
  16. package/dist/components/FederatedDropdown.d.ts +98 -0
  17. package/dist/components/FederatedDropdown.d.ts.map +1 -0
  18. package/dist/components/FederatedDropdown.js +526 -0
  19. package/dist/components/HierarchicalMenu.d.ts +55 -0
  20. package/dist/components/HierarchicalMenu.d.ts.map +1 -0
  21. package/dist/components/HierarchicalMenu.js +276 -0
  22. package/dist/components/Highlight.d.ts +51 -0
  23. package/dist/components/Highlight.d.ts.map +1 -0
  24. package/dist/components/Highlight.js +155 -0
  25. package/dist/components/HitsPerPage.d.ts +41 -0
  26. package/dist/components/HitsPerPage.d.ts.map +1 -0
  27. package/dist/components/HitsPerPage.js +82 -0
  28. package/dist/components/InfiniteHits.d.ts +51 -0
  29. package/dist/components/InfiniteHits.d.ts.map +1 -0
  30. package/dist/components/InfiniteHits.js +173 -0
  31. package/dist/components/MobileFilters.d.ts +71 -0
  32. package/dist/components/MobileFilters.d.ts.map +1 -0
  33. package/dist/components/MobileFilters.js +242 -0
  34. package/dist/components/Pagination.d.ts +90 -0
  35. package/dist/components/Pagination.d.ts.map +1 -0
  36. package/dist/components/Pagination.js +298 -0
  37. package/dist/components/QuerySuggestions.d.ts +36 -0
  38. package/dist/components/QuerySuggestions.d.ts.map +1 -0
  39. package/dist/components/QuerySuggestions.js +71 -0
  40. package/dist/components/QuerySuggestionsDropdown.d.ts +82 -0
  41. package/dist/components/QuerySuggestionsDropdown.d.ts.map +1 -0
  42. package/dist/components/QuerySuggestionsDropdown.js +394 -0
  43. package/dist/components/RangeInput.d.ts +58 -0
  44. package/dist/components/RangeInput.d.ts.map +1 -0
  45. package/dist/components/RangeInput.js +203 -0
  46. package/dist/components/RangeSlider.d.ts +51 -0
  47. package/dist/components/RangeSlider.d.ts.map +1 -0
  48. package/dist/components/RangeSlider.js +262 -0
  49. package/dist/components/Recommendations.d.ts +89 -0
  50. package/dist/components/Recommendations.d.ts.map +1 -0
  51. package/dist/components/Recommendations.js +256 -0
  52. package/dist/components/RichQuerySuggestions.d.ts +88 -0
  53. package/dist/components/RichQuerySuggestions.d.ts.map +1 -0
  54. package/dist/components/RichQuerySuggestions.js +498 -0
  55. package/dist/components/SearchBar.d.ts +57 -0
  56. package/dist/components/SearchBar.d.ts.map +1 -0
  57. package/dist/components/SearchBar.js +361 -0
  58. package/dist/components/SearchBarWithSuggestions.d.ts +105 -0
  59. package/dist/components/SearchBarWithSuggestions.d.ts.map +1 -0
  60. package/dist/components/SearchBarWithSuggestions.js +275 -0
  61. package/dist/components/SearchLayout.d.ts +35 -0
  62. package/dist/components/SearchLayout.d.ts.map +1 -0
  63. package/dist/components/SearchLayout.js +61 -0
  64. package/dist/components/SearchProvider.d.ts +35 -0
  65. package/dist/components/SearchProvider.d.ts.map +1 -0
  66. package/dist/components/SearchProvider.js +53 -0
  67. package/dist/components/SearchResults.d.ts +57 -0
  68. package/dist/components/SearchResults.d.ts.map +1 -0
  69. package/dist/components/SearchResults.js +456 -0
  70. package/dist/components/SortBy.d.ts +84 -0
  71. package/dist/components/SortBy.d.ts.map +1 -0
  72. package/dist/components/SortBy.js +183 -0
  73. package/dist/components/Stats.d.ts +51 -0
  74. package/dist/components/Stats.d.ts.map +1 -0
  75. package/dist/components/Stats.js +201 -0
  76. package/dist/components/primitives/ActionButtons.d.ts +27 -0
  77. package/dist/components/primitives/ActionButtons.d.ts.map +1 -0
  78. package/dist/components/primitives/ActionButtons.js +102 -0
  79. package/dist/components/primitives/AnalyticsProvider.d.ts +22 -0
  80. package/dist/components/primitives/AnalyticsProvider.d.ts.map +1 -0
  81. package/dist/components/primitives/AnalyticsProvider.js +87 -0
  82. package/dist/components/primitives/BadgeList.d.ts +14 -0
  83. package/dist/components/primitives/BadgeList.d.ts.map +1 -0
  84. package/dist/components/primitives/BadgeList.js +65 -0
  85. package/dist/components/primitives/CustomSelect.d.ts +40 -0
  86. package/dist/components/primitives/CustomSelect.d.ts.map +1 -0
  87. package/dist/components/primitives/CustomSelect.js +196 -0
  88. package/dist/components/primitives/ImageDisplay.d.ts +28 -0
  89. package/dist/components/primitives/ImageDisplay.d.ts.map +1 -0
  90. package/dist/components/primitives/ImageDisplay.js +127 -0
  91. package/dist/components/primitives/ImageZoom.d.ts +33 -0
  92. package/dist/components/primitives/ImageZoom.d.ts.map +1 -0
  93. package/dist/components/primitives/ImageZoom.js +433 -0
  94. package/dist/components/primitives/PriceDisplay.d.ts +21 -0
  95. package/dist/components/primitives/PriceDisplay.d.ts.map +1 -0
  96. package/dist/components/primitives/PriceDisplay.js +44 -0
  97. package/dist/components/primitives/RatingDisplay.d.ts +43 -0
  98. package/dist/components/primitives/RatingDisplay.d.ts.map +1 -0
  99. package/dist/components/primitives/RatingDisplay.js +114 -0
  100. package/dist/components/primitives/VariantSelector.d.ts +30 -0
  101. package/dist/components/primitives/VariantSelector.d.ts.map +1 -0
  102. package/dist/components/primitives/VariantSelector.js +155 -0
  103. package/dist/components/primitives/VariantSwatches.d.ts +28 -0
  104. package/dist/components/primitives/VariantSwatches.d.ts.map +1 -0
  105. package/dist/components/primitives/VariantSwatches.js +188 -0
  106. package/dist/components/primitives/index.d.ts +12 -0
  107. package/dist/components/primitives/index.d.ts.map +1 -0
  108. package/dist/components/primitives/index.js +11 -0
  109. package/dist/components/primitives/withAnalytics.d.ts +24 -0
  110. package/dist/components/primitives/withAnalytics.d.ts.map +1 -0
  111. package/dist/components/primitives/withAnalytics.js +73 -0
  112. package/dist/components/product-page/ProductGallery.d.ts +26 -0
  113. package/dist/components/product-page/ProductGallery.d.ts.map +1 -0
  114. package/dist/components/product-page/ProductGallery.js +13 -0
  115. package/dist/components/product-page/ProductInfo.d.ts +44 -0
  116. package/dist/components/product-page/ProductInfo.d.ts.map +1 -0
  117. package/dist/components/product-page/ProductInfo.js +34 -0
  118. package/dist/components/product-page/ProductRecommendations.d.ts +21 -0
  119. package/dist/components/product-page/ProductRecommendations.d.ts.map +1 -0
  120. package/dist/components/product-page/ProductRecommendations.js +17 -0
  121. package/dist/components/product-page/index.d.ts +4 -0
  122. package/dist/components/product-page/index.d.ts.map +1 -0
  123. package/dist/components/product-page/index.js +3 -0
  124. package/dist/components/section-primitives/SectionError.d.ts +11 -0
  125. package/dist/components/section-primitives/SectionError.d.ts.map +1 -0
  126. package/dist/components/section-primitives/SectionError.js +13 -0
  127. package/dist/components/section-primitives/SectionItemGrid.d.ts +18 -0
  128. package/dist/components/section-primitives/SectionItemGrid.d.ts.map +1 -0
  129. package/dist/components/section-primitives/SectionItemGrid.js +14 -0
  130. package/dist/components/section-primitives/SectionLoading.d.ts +11 -0
  131. package/dist/components/section-primitives/SectionLoading.d.ts.map +1 -0
  132. package/dist/components/section-primitives/SectionLoading.js +11 -0
  133. package/dist/components/section-primitives/SectionSearchContext.d.ts +17 -0
  134. package/dist/components/section-primitives/SectionSearchContext.d.ts.map +1 -0
  135. package/dist/components/section-primitives/SectionSearchContext.js +17 -0
  136. package/dist/components/section-primitives/SectionSearchProvider.d.ts +25 -0
  137. package/dist/components/section-primitives/SectionSearchProvider.d.ts.map +1 -0
  138. package/dist/components/section-primitives/SectionSearchProvider.js +106 -0
  139. package/dist/components/section-primitives/index.d.ts +5 -0
  140. package/dist/components/section-primitives/index.d.ts.map +1 -0
  141. package/dist/components/section-primitives/index.js +4 -0
  142. package/dist/components/suggestions/AmazonDropdown.d.ts +30 -0
  143. package/dist/components/suggestions/AmazonDropdown.d.ts.map +1 -0
  144. package/dist/components/suggestions/AmazonDropdown.js +509 -0
  145. package/dist/components/suggestions/GoogleDropdown.d.ts +31 -0
  146. package/dist/components/suggestions/GoogleDropdown.d.ts.map +1 -0
  147. package/dist/components/suggestions/GoogleDropdown.js +349 -0
  148. package/dist/components/suggestions/MinimalDropdown.d.ts +24 -0
  149. package/dist/components/suggestions/MinimalDropdown.d.ts.map +1 -0
  150. package/dist/components/suggestions/MinimalDropdown.js +312 -0
  151. package/dist/components/suggestions/MobileSheetDropdown.d.ts +31 -0
  152. package/dist/components/suggestions/MobileSheetDropdown.d.ts.map +1 -0
  153. package/dist/components/suggestions/MobileSheetDropdown.js +483 -0
  154. package/dist/components/suggestions/PinterestDropdown.d.ts +29 -0
  155. package/dist/components/suggestions/PinterestDropdown.d.ts.map +1 -0
  156. package/dist/components/suggestions/PinterestDropdown.js +446 -0
  157. package/dist/components/suggestions/ShopifyDropdown.d.ts +27 -0
  158. package/dist/components/suggestions/ShopifyDropdown.d.ts.map +1 -0
  159. package/dist/components/suggestions/ShopifyDropdown.js +448 -0
  160. package/dist/components/suggestions/SpotlightDropdown.d.ts +33 -0
  161. package/dist/components/suggestions/SpotlightDropdown.d.ts.map +1 -0
  162. package/dist/components/suggestions/SpotlightDropdown.js +544 -0
  163. package/dist/components/suggestions/SuggestionSearchBar.d.ts +127 -0
  164. package/dist/components/suggestions/SuggestionSearchBar.d.ts.map +1 -0
  165. package/dist/components/suggestions/SuggestionSearchBar.js +644 -0
  166. package/dist/components/suggestions/index.d.ts +37 -0
  167. package/dist/components/suggestions/index.d.ts.map +1 -0
  168. package/dist/components/suggestions/index.js +59 -0
  169. package/dist/components/suggestions/styles/index.d.ts +11 -0
  170. package/dist/components/suggestions/styles/index.d.ts.map +1 -0
  171. package/dist/components/suggestions/styles/index.js +289 -0
  172. package/dist/components/suggestions/styles/responsive.d.ts +107 -0
  173. package/dist/components/suggestions/styles/responsive.d.ts.map +1 -0
  174. package/dist/components/suggestions/styles/responsive.js +237 -0
  175. package/dist/components/suggestions/types.d.ts +511 -0
  176. package/dist/components/suggestions/types.d.ts.map +1 -0
  177. package/dist/components/suggestions/types.js +6 -0
  178. package/dist/components/suggestions/utils.d.ts +259 -0
  179. package/dist/components/suggestions/utils.d.ts.map +1 -0
  180. package/dist/components/suggestions/utils.js +668 -0
  181. package/dist/components/suggestions-primitives/CategoriesTabs.d.ts +13 -0
  182. package/dist/components/suggestions-primitives/CategoriesTabs.d.ts.map +1 -0
  183. package/dist/components/suggestions-primitives/CategoriesTabs.js +35 -0
  184. package/dist/components/suggestions-primitives/DropdownPanel.d.ts +24 -0
  185. package/dist/components/suggestions-primitives/DropdownPanel.d.ts.map +1 -0
  186. package/dist/components/suggestions-primitives/DropdownPanel.js +67 -0
  187. package/dist/components/suggestions-primitives/ItemCard.d.ts +48 -0
  188. package/dist/components/suggestions-primitives/ItemCard.d.ts.map +1 -0
  189. package/dist/components/suggestions-primitives/ItemCard.js +103 -0
  190. package/dist/components/suggestions-primitives/ItemGrid.d.ts +28 -0
  191. package/dist/components/suggestions-primitives/ItemGrid.d.ts.map +1 -0
  192. package/dist/components/suggestions-primitives/ItemGrid.js +55 -0
  193. package/dist/components/suggestions-primitives/ProductCard.d.ts +45 -0
  194. package/dist/components/suggestions-primitives/ProductCard.d.ts.map +1 -0
  195. package/dist/components/suggestions-primitives/ProductCard.js +177 -0
  196. package/dist/components/suggestions-primitives/ProductCardLayouts.d.ts +44 -0
  197. package/dist/components/suggestions-primitives/ProductCardLayouts.d.ts.map +1 -0
  198. package/dist/components/suggestions-primitives/ProductCardLayouts.js +137 -0
  199. package/dist/components/suggestions-primitives/ProductGrid.d.ts +22 -0
  200. package/dist/components/suggestions-primitives/ProductGrid.d.ts.map +1 -0
  201. package/dist/components/suggestions-primitives/ProductGrid.js +41 -0
  202. package/dist/components/suggestions-primitives/RecentSearchesList.d.ts +17 -0
  203. package/dist/components/suggestions-primitives/RecentSearchesList.d.ts.map +1 -0
  204. package/dist/components/suggestions-primitives/RecentSearchesList.js +46 -0
  205. package/dist/components/suggestions-primitives/SearchInput.d.ts +23 -0
  206. package/dist/components/suggestions-primitives/SearchInput.d.ts.map +1 -0
  207. package/dist/components/suggestions-primitives/SearchInput.js +114 -0
  208. package/dist/components/suggestions-primitives/SuggestionItem.d.ts +31 -0
  209. package/dist/components/suggestions-primitives/SuggestionItem.d.ts.map +1 -0
  210. package/dist/components/suggestions-primitives/SuggestionItem.js +47 -0
  211. package/dist/components/suggestions-primitives/SuggestionList.d.ts +26 -0
  212. package/dist/components/suggestions-primitives/SuggestionList.d.ts.map +1 -0
  213. package/dist/components/suggestions-primitives/SuggestionList.js +35 -0
  214. package/dist/components/suggestions-primitives/SuggestionsContext.d.ts +44 -0
  215. package/dist/components/suggestions-primitives/SuggestionsContext.d.ts.map +1 -0
  216. package/dist/components/suggestions-primitives/SuggestionsContext.js +18 -0
  217. package/dist/components/suggestions-primitives/SuggestionsDropdownComposition.d.ts +24 -0
  218. package/dist/components/suggestions-primitives/SuggestionsDropdownComposition.d.ts.map +1 -0
  219. package/dist/components/suggestions-primitives/SuggestionsDropdownComposition.js +30 -0
  220. package/dist/components/suggestions-primitives/SuggestionsError.d.ts +11 -0
  221. package/dist/components/suggestions-primitives/SuggestionsError.d.ts.map +1 -0
  222. package/dist/components/suggestions-primitives/SuggestionsError.js +19 -0
  223. package/dist/components/suggestions-primitives/SuggestionsLoading.d.ts +11 -0
  224. package/dist/components/suggestions-primitives/SuggestionsLoading.d.ts.map +1 -0
  225. package/dist/components/suggestions-primitives/SuggestionsLoading.js +17 -0
  226. package/dist/components/suggestions-primitives/SuggestionsProvider.d.ts +38 -0
  227. package/dist/components/suggestions-primitives/SuggestionsProvider.d.ts.map +1 -0
  228. package/dist/components/suggestions-primitives/SuggestionsProvider.js +259 -0
  229. package/dist/components/suggestions-primitives/TrendingList.d.ts +17 -0
  230. package/dist/components/suggestions-primitives/TrendingList.d.ts.map +1 -0
  231. package/dist/components/suggestions-primitives/TrendingList.js +48 -0
  232. package/dist/components/suggestions-primitives/highlightMarkup.d.ts +31 -0
  233. package/dist/components/suggestions-primitives/highlightMarkup.d.ts.map +1 -0
  234. package/dist/components/suggestions-primitives/highlightMarkup.js +70 -0
  235. package/dist/components/suggestions-primitives/index.d.ts +39 -0
  236. package/dist/components/suggestions-primitives/index.d.ts.map +1 -0
  237. package/dist/components/suggestions-primitives/index.js +24 -0
  238. package/dist/docsearch/components/DocSearch.d.ts +4 -0
  239. package/dist/docsearch/components/DocSearch.d.ts.map +1 -0
  240. package/dist/docsearch/components/DocSearch.js +93 -0
  241. package/dist/docsearch/components/DocSearchButton.d.ts +4 -0
  242. package/dist/docsearch/components/DocSearchButton.d.ts.map +1 -0
  243. package/dist/docsearch/components/DocSearchButton.js +12 -0
  244. package/dist/docsearch/components/Footer.d.ts +8 -0
  245. package/dist/docsearch/components/Footer.d.ts.map +1 -0
  246. package/dist/docsearch/components/Footer.js +40 -0
  247. package/dist/docsearch/components/Highlight.d.ts +9 -0
  248. package/dist/docsearch/components/Highlight.d.ts.map +1 -0
  249. package/dist/docsearch/components/Highlight.js +48 -0
  250. package/dist/docsearch/components/Hit.d.ts +15 -0
  251. package/dist/docsearch/components/Hit.d.ts.map +1 -0
  252. package/dist/docsearch/components/Hit.js +96 -0
  253. package/dist/docsearch/components/Modal.d.ts +10 -0
  254. package/dist/docsearch/components/Modal.d.ts.map +1 -0
  255. package/dist/docsearch/components/Modal.js +57 -0
  256. package/dist/docsearch/components/Results.d.ts +23 -0
  257. package/dist/docsearch/components/Results.d.ts.map +1 -0
  258. package/dist/docsearch/components/Results.js +141 -0
  259. package/dist/docsearch/components/SearchBox.d.ts +11 -0
  260. package/dist/docsearch/components/SearchBox.d.ts.map +1 -0
  261. package/dist/docsearch/components/SearchBox.js +16 -0
  262. package/dist/docsearch/hooks/useDocSearch.d.ts +33 -0
  263. package/dist/docsearch/hooks/useDocSearch.d.ts.map +1 -0
  264. package/dist/docsearch/hooks/useDocSearch.js +224 -0
  265. package/dist/docsearch/hooks/useKeyboard.d.ts +17 -0
  266. package/dist/docsearch/hooks/useKeyboard.d.ts.map +1 -0
  267. package/dist/docsearch/hooks/useKeyboard.js +71 -0
  268. package/dist/docsearch/hooks/useSeekoraSearch.d.ts +27 -0
  269. package/dist/docsearch/hooks/useSeekoraSearch.d.ts.map +1 -0
  270. package/dist/docsearch/hooks/useSeekoraSearch.js +213 -0
  271. package/dist/docsearch/index.d.ts +13 -0
  272. package/dist/docsearch/index.d.ts.map +1 -0
  273. package/dist/docsearch/index.js +11 -0
  274. package/dist/docsearch/types.d.ts +175 -0
  275. package/dist/docsearch/types.d.ts.map +1 -0
  276. package/dist/docsearch/types.js +4 -0
  277. package/dist/docsearch.css +234 -0
  278. package/dist/hooks/useAnalytics.d.ts +24 -0
  279. package/dist/hooks/useAnalytics.d.ts.map +1 -0
  280. package/dist/hooks/useAnalytics.js +67 -0
  281. package/dist/hooks/useClickTracking.d.ts +36 -0
  282. package/dist/hooks/useClickTracking.d.ts.map +1 -0
  283. package/dist/hooks/useClickTracking.js +89 -0
  284. package/dist/hooks/useExperiment.d.ts +25 -0
  285. package/dist/hooks/useExperiment.d.ts.map +1 -0
  286. package/dist/hooks/useExperiment.js +123 -0
  287. package/dist/hooks/useFilters.d.ts +27 -0
  288. package/dist/hooks/useFilters.d.ts.map +1 -0
  289. package/dist/hooks/useFilters.js +86 -0
  290. package/dist/hooks/useKeyboardNavigation.d.ts +51 -0
  291. package/dist/hooks/useKeyboardNavigation.d.ts.map +1 -0
  292. package/dist/hooks/useKeyboardNavigation.js +113 -0
  293. package/dist/hooks/useNaturalLanguageFilters.d.ts +48 -0
  294. package/dist/hooks/useNaturalLanguageFilters.d.ts.map +1 -0
  295. package/dist/hooks/useNaturalLanguageFilters.js +221 -0
  296. package/dist/hooks/useProductAnalytics.d.ts +49 -0
  297. package/dist/hooks/useProductAnalytics.d.ts.map +1 -0
  298. package/dist/hooks/useProductAnalytics.js +116 -0
  299. package/dist/hooks/useQuerySuggestions.d.ts +21 -0
  300. package/dist/hooks/useQuerySuggestions.d.ts.map +1 -0
  301. package/dist/hooks/useQuerySuggestions.js +84 -0
  302. package/dist/hooks/useQuerySuggestionsEnhanced.d.ts +120 -0
  303. package/dist/hooks/useQuerySuggestionsEnhanced.d.ts.map +1 -0
  304. package/dist/hooks/useQuerySuggestionsEnhanced.js +444 -0
  305. package/dist/hooks/useSearchState.d.ts +35 -0
  306. package/dist/hooks/useSearchState.d.ts.map +1 -0
  307. package/dist/hooks/useSearchState.js +68 -0
  308. package/dist/hooks/useSeekoraSearch.d.ts +20 -0
  309. package/dist/hooks/useSeekoraSearch.d.ts.map +1 -0
  310. package/dist/hooks/useSeekoraSearch.js +63 -0
  311. package/dist/hooks/useSmartSuggestions.d.ts +55 -0
  312. package/dist/hooks/useSmartSuggestions.d.ts.map +1 -0
  313. package/dist/hooks/useSmartSuggestions.js +236 -0
  314. package/dist/hooks/useSuggestionsAnalytics.d.ts +93 -0
  315. package/dist/hooks/useSuggestionsAnalytics.d.ts.map +1 -0
  316. package/dist/hooks/useSuggestionsAnalytics.js +239 -0
  317. package/dist/hooks/useVariantSelection.d.ts +28 -0
  318. package/dist/hooks/useVariantSelection.d.ts.map +1 -0
  319. package/dist/hooks/useVariantSelection.js +44 -0
  320. package/dist/index.d.ts +105 -0
  321. package/dist/index.d.ts.map +1 -0
  322. package/dist/index.js +110 -0
  323. package/dist/index.umd.js +1 -0
  324. package/dist/src/index.d.ts +4469 -0
  325. package/dist/src/index.esm.js +18952 -0
  326. package/dist/src/index.esm.js.map +1 -0
  327. package/dist/src/index.js +19086 -0
  328. package/dist/src/index.js.map +1 -0
  329. package/dist/themes/createTheme.d.ts +8 -0
  330. package/dist/themes/createTheme.d.ts.map +1 -0
  331. package/dist/themes/createTheme.js +10 -0
  332. package/dist/themes/dark.d.ts +6 -0
  333. package/dist/themes/dark.d.ts.map +1 -0
  334. package/dist/themes/dark.js +34 -0
  335. package/dist/themes/default.d.ts +6 -0
  336. package/dist/themes/default.d.ts.map +1 -0
  337. package/dist/themes/default.js +71 -0
  338. package/dist/themes/mergeThemes.d.ts +7 -0
  339. package/dist/themes/mergeThemes.d.ts.map +1 -0
  340. package/dist/themes/mergeThemes.js +6 -0
  341. package/dist/themes/minimal.d.ts +6 -0
  342. package/dist/themes/minimal.d.ts.map +1 -0
  343. package/dist/themes/minimal.js +34 -0
  344. package/dist/themes/suggestions.d.ts +216 -0
  345. package/dist/themes/suggestions.d.ts.map +1 -0
  346. package/dist/themes/suggestions.js +546 -0
  347. package/dist/themes/types.d.ts +7 -0
  348. package/dist/themes/types.d.ts.map +1 -0
  349. package/dist/themes/types.js +6 -0
  350. package/dist/types/index.d.ts +33 -0
  351. package/dist/types/index.d.ts.map +1 -0
  352. package/dist/types/index.js +4 -0
  353. package/dist/utils/responsive.d.ts +130 -0
  354. package/dist/utils/responsive.d.ts.map +1 -0
  355. package/dist/utils/responsive.js +225 -0
  356. package/package.json +68 -0
  357. package/src/docsearch/docsearch.css +234 -0
@@ -0,0 +1,44 @@
1
+ /**
2
+ * ProductCardLayouts – internal layout sub-components for ProductCard
3
+ *
4
+ * Not exported from the package. Each layout renders the same product data
5
+ * with different visual emphasis.
6
+ */
7
+ import React from 'react';
8
+ import type { ActionButton } from '../primitives/ActionButtons';
9
+ import type { ProductItem, ProductBadge, PriceRange, ProductOption, ProductVariant } from '@seekora-ai/ui-sdk-types';
10
+ import type { ProductDisplayConfig } from '../suggestions/types';
11
+ export interface LayoutProps {
12
+ product: ProductItem;
13
+ images: string[];
14
+ title: string;
15
+ price: number | null;
16
+ comparePrice: number | null;
17
+ brand: string | null;
18
+ badges: ProductBadge[];
19
+ priceRange: PriceRange | null;
20
+ options: ProductOption[];
21
+ variants: ProductVariant[];
22
+ displayConfig: ProductDisplayConfig;
23
+ imageVariant: 'single' | 'carousel' | 'hover' | 'thumbStrip' | 'thumbList';
24
+ onVariantHover?: (optionName: string, value: string) => void;
25
+ onVariantClick?: (optionName: string, value: string) => void;
26
+ selectedVariants?: Record<string, string>;
27
+ actionButtons?: ActionButton[];
28
+ actionButtonsPosition?: 'overlay-top-right' | 'overlay-bottom' | 'inline';
29
+ showActionLabels?: boolean;
30
+ enableImageZoom?: boolean;
31
+ imageZoomMode?: 'hover' | 'lens' | 'click' | 'both';
32
+ imageZoomLevel?: number;
33
+ }
34
+ /** minimal: image, title, price (current default behavior) */
35
+ export declare function MinimalLayout({ images, title, price, product, imageVariant, displayConfig, enableImageZoom, imageZoomMode, imageZoomLevel }: LayoutProps): React.JSX.Element;
36
+ /** standard: image, badges, brand, title, price + compare price, color swatches */
37
+ export declare function StandardLayout({ images, title, price, comparePrice, brand, badges, options, variants, product, imageVariant, displayConfig, onVariantHover, onVariantClick, selectedVariants, actionButtons, actionButtonsPosition, showActionLabels, enableImageZoom, imageZoomMode, imageZoomLevel, }: LayoutProps): React.JSX.Element;
38
+ /** detailed: image, badges, brand, title, price + compare + discount, rating, all swatches, stock */
39
+ export declare function DetailedLayout({ images, title, price, comparePrice, brand, badges, priceRange, options, variants, product, imageVariant, displayConfig, onVariantHover, onVariantClick, selectedVariants, actionButtons, actionButtonsPosition, showActionLabels, enableImageZoom, imageZoomMode, imageZoomLevel, }: LayoutProps): React.JSX.Element;
40
+ /** compact: smaller image, 1-line title, price */
41
+ export declare function CompactLayout({ images, title, price, product, imageVariant, displayConfig, enableImageZoom, imageZoomMode, imageZoomLevel }: LayoutProps): React.JSX.Element;
42
+ /** horizontal: image left + content right (title, brand, price, swatches) */
43
+ export declare function HorizontalLayout({ images, title, price, comparePrice, brand, badges, options, variants, product, imageVariant, displayConfig, onVariantHover, onVariantClick, selectedVariants, actionButtons, actionButtonsPosition, showActionLabels, enableImageZoom, imageZoomMode, imageZoomLevel, }: LayoutProps): React.JSX.Element;
44
+ //# sourceMappingURL=ProductCardLayouts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductCardLayouts.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions-primitives/ProductCardLayouts.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACrH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAUjE,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,aAAa,EAAE,oBAAoB,CAAC;IACpC,YAAY,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,WAAW,CAAC;IAC3E,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,qBAAqB,CAAC,EAAE,mBAAmB,GAAG,gBAAgB,GAAG,QAAQ,CAAC;IAC1E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACpD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA2CD,8DAA8D;AAC9D,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,EAAE,WAAW,qBA2BxJ;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EACpE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EACtF,aAAa,EAAE,qBAAqB,EAAE,gBAAgB,EACtD,eAAe,EAAE,aAAa,EAAE,cAAc,GAC/C,EAAE,WAAW,qBA+Eb;AAED,qGAAqG;AACrG,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAChF,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EACtF,aAAa,EAAE,qBAAqB,EAAE,gBAAgB,EACtD,eAAe,EAAE,aAAa,EAAE,cAAc,GAC/C,EAAE,WAAW,qBA0Gb;AAED,kDAAkD;AAClD,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,EAAE,WAAW,qBA+BxJ;AAED,6EAA6E;AAC7E,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EACpE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EACtF,aAAa,EAAE,qBAAqB,EAAE,gBAAgB,EACtD,eAAe,EAAE,aAAa,EAAE,cAAc,GAC/C,EAAE,WAAW,qBAmFb"}
@@ -0,0 +1,137 @@
1
+ /**
2
+ * ProductCardLayouts – internal layout sub-components for ProductCard
3
+ *
4
+ * Not exported from the package. Each layout renders the same product data
5
+ * with different visual emphasis.
6
+ */
7
+ import React from 'react';
8
+ import { ImageDisplay } from '../primitives/ImageDisplay';
9
+ import { PriceDisplay } from '../primitives/PriceDisplay';
10
+ import { BadgeList } from '../primitives/BadgeList';
11
+ import { RatingDisplay } from '../primitives/RatingDisplay';
12
+ import { VariantSwatches } from '../primitives/VariantSwatches';
13
+ import { ActionButtons } from '../primitives/ActionButtons';
14
+ import { useIsMobile, useResponsiveGap } from '../../utils/responsive';
15
+ const BORDER_RADIUS = {
16
+ sm: 4,
17
+ md: 6,
18
+ lg: 8,
19
+ full: 9999,
20
+ };
21
+ const imgPlaceholderStyle = {
22
+ width: '100%',
23
+ aspectRatio: '1',
24
+ objectFit: 'cover',
25
+ borderRadius: BORDER_RADIUS.sm,
26
+ backgroundColor: 'var(--seekora-bg-secondary, rgba(0,0,0,0.04))',
27
+ };
28
+ function ImageBlock({ images, title, imageVariant, aspectRatio, objectFit, enableZoom, zoomMode, zoomLevel }) {
29
+ const ar = aspectRatio
30
+ ? (aspectRatio.includes(':') ? aspectRatio.replace(':', '/') : aspectRatio)
31
+ : '1';
32
+ if (images.length > 0) {
33
+ return (React.createElement("div", { className: "seekora-product-card__image", style: { position: 'relative', overflow: 'hidden', borderRadius: BORDER_RADIUS.sm } },
34
+ React.createElement(ImageDisplay, { images: images, variant: images.length > 1 ? imageVariant : 'single', alt: title, className: "seekora-suggestions-product-card-image", style: { aspectRatio: ar, ...(objectFit ? { objectFit } : {}) }, enableZoom: enableZoom, zoomMode: zoomMode, zoomLevel: zoomLevel })));
35
+ }
36
+ return React.createElement("div", { className: "seekora-product-card__image seekora-suggestions-product-card-placeholder", style: { ...imgPlaceholderStyle, aspectRatio: ar, ...(objectFit ? { objectFit } : {}) }, "aria-hidden": true });
37
+ }
38
+ /** minimal: image, title, price (current default behavior) */
39
+ export function MinimalLayout({ images, title, price, product, imageVariant, displayConfig, enableImageZoom, imageZoomMode, imageZoomLevel }) {
40
+ const isMobile = useIsMobile();
41
+ const titleFontSize = isMobile ? '0.9375rem' : '0.875rem'; // Slightly larger on mobile
42
+ const priceFontSize = isMobile ? '0.9375rem' : '0.875rem';
43
+ return (React.createElement(React.Fragment, null,
44
+ React.createElement(ImageBlock, { images: images, title: title, imageVariant: imageVariant, aspectRatio: displayConfig.imageAspectRatio, objectFit: displayConfig.imageObjectFit, enableZoom: enableImageZoom, zoomMode: imageZoomMode, zoomLevel: imageZoomLevel }),
45
+ React.createElement("span", { className: "seekora-product-card__title", style: { fontSize: titleFontSize, fontWeight: 500, lineHeight: 1.4, overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', WebkitLineClamp: 2, WebkitBoxOrient: 'vertical' } }, title),
46
+ price != null && !Number.isNaN(price) && (React.createElement("span", { className: "seekora-product-card__price seekora-suggestions-product-card-price", style: { fontSize: priceFontSize, color: 'inherit', opacity: 0.6 } },
47
+ product.currency ?? '$',
48
+ price.toFixed(2)))));
49
+ }
50
+ /** standard: image, badges, brand, title, price + compare price, color swatches */
51
+ export function StandardLayout({ images, title, price, comparePrice, brand, badges, options, variants, product, imageVariant, displayConfig, onVariantHover, onVariantClick, selectedVariants, actionButtons, actionButtonsPosition, showActionLabels, enableImageZoom, imageZoomMode, imageZoomLevel, }) {
52
+ const cfg = displayConfig;
53
+ const isMobile = useIsMobile();
54
+ const bodyGap = isMobile ? 6 : 4; // More gap on mobile
55
+ const titleFontSize = isMobile ? '0.9375rem' : '0.875rem';
56
+ const brandFontSize = isMobile ? '0.8125rem' : '0.75rem';
57
+ const priceFontSize = isMobile ? '0.9375rem' : '0.875rem';
58
+ // Normalize position: 'overlay-*' positions render over image, everything else renders inline
59
+ const isOverlayPosition = actionButtonsPosition?.startsWith('overlay');
60
+ return (React.createElement(React.Fragment, null,
61
+ React.createElement("div", { style: { position: 'relative' } },
62
+ React.createElement(ImageBlock, { images: images, title: title, imageVariant: imageVariant, aspectRatio: cfg.imageAspectRatio, objectFit: cfg.imageObjectFit, enableZoom: enableImageZoom, zoomMode: imageZoomMode, zoomLevel: imageZoomLevel }),
63
+ cfg.showBadges !== false && badges.length > 0 && (React.createElement(BadgeList, { badges: badges, position: "top-left", maxBadges: 2 })),
64
+ actionButtons && actionButtons.length > 0 && isOverlayPosition && (React.createElement(ActionButtons, { buttons: actionButtons, position: actionButtonsPosition === 'overlay-top-right' ? 'top-right' : 'bottom-center', showLabels: showActionLabels, size: "small" }))),
65
+ React.createElement("div", { className: "seekora-product-card__body", style: { display: 'flex', flexDirection: 'column', gap: bodyGap } },
66
+ cfg.showBrand !== false && brand && (React.createElement("span", { className: "seekora-product-card__brand", style: { fontSize: brandFontSize, color: 'inherit', opacity: 0.6, textTransform: 'uppercase', letterSpacing: '0.02em' } }, brand)),
67
+ React.createElement("span", { className: "seekora-product-card__title", style: { fontSize: titleFontSize, fontWeight: 500, lineHeight: 1.4, overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', WebkitLineClamp: 2, WebkitBoxOrient: 'vertical' } }, title),
68
+ React.createElement("div", { className: "seekora-product-card__price" },
69
+ React.createElement(PriceDisplay, { price: price ?? undefined, comparePrice: comparePrice ?? undefined, currency: cfg.currency ?? product.currency, currencyPosition: cfg.currencyPosition, priceDecimals: cfg.priceDecimals, showDiscount: cfg.showDiscount, style: { fontSize: priceFontSize } })),
70
+ cfg.showVariants !== false && options.length > 0 && (React.createElement(VariantSwatches, { options: options, visibleOptions: cfg.variantOptionsToShow, maxValues: cfg.maxVariantValues, selectedValues: selectedVariants, variants: variants, onSwatchHover: onVariantHover, onSwatchClick: onVariantClick })),
71
+ actionButtons && actionButtons.length > 0 && !isOverlayPosition && (React.createElement(ActionButtons, { buttons: actionButtons, position: "inline", showLabels: showActionLabels, size: "small", layout: "horizontal" })))));
72
+ }
73
+ /** detailed: image, badges, brand, title, price + compare + discount, rating, all swatches, stock */
74
+ export function DetailedLayout({ images, title, price, comparePrice, brand, badges, priceRange, options, variants, product, imageVariant, displayConfig, onVariantHover, onVariantClick, selectedVariants, actionButtons, actionButtonsPosition, showActionLabels, enableImageZoom, imageZoomMode, imageZoomLevel, }) {
75
+ const cfg = displayConfig;
76
+ const available = product.available;
77
+ // Normalize position: 'overlay-*' positions render over image, everything else renders inline
78
+ const isOverlayPosition = actionButtonsPosition?.startsWith('overlay');
79
+ return (React.createElement(React.Fragment, null,
80
+ React.createElement("div", { style: { position: 'relative' } },
81
+ React.createElement(ImageBlock, { images: images, title: title, imageVariant: imageVariant, aspectRatio: cfg.imageAspectRatio, objectFit: cfg.imageObjectFit, enableZoom: enableImageZoom, zoomMode: imageZoomMode, zoomLevel: imageZoomLevel }),
82
+ cfg.showBadges !== false && badges.length > 0 && (React.createElement(BadgeList, { badges: badges, position: "top-left" })),
83
+ actionButtons && actionButtons.length > 0 && isOverlayPosition && (React.createElement(ActionButtons, { buttons: actionButtons, position: actionButtonsPosition === 'overlay-top-right' ? 'top-right' : 'bottom-center', showLabels: showActionLabels, size: "small" }))),
84
+ React.createElement("div", { className: "seekora-product-card__body", style: { display: 'flex', flexDirection: 'column', gap: 4 } },
85
+ cfg.showBrand !== false && brand && (React.createElement("span", { className: "seekora-product-card__brand", style: { fontSize: '0.75rem', color: 'inherit', opacity: 0.6, textTransform: 'uppercase', letterSpacing: '0.02em' } }, brand)),
86
+ React.createElement("span", { className: "seekora-product-card__title", style: { fontSize: '0.875rem', fontWeight: 500, lineHeight: 1.4, overflow: 'hidden', textOverflow: 'ellipsis' } }, title),
87
+ cfg.showRating !== false && product.rating != null && (React.createElement(RatingDisplay, { rating: product.rating, reviewCount: product.reviewCount, variant: "compact", size: "small", showNumeric: false, showReviewCount: true, className: "seekora-product-card__rating" })),
88
+ React.createElement("div", { className: "seekora-product-card__price" }, cfg.showPriceRange && priceRange ? (React.createElement(PriceDisplay, { priceRange: priceRange, currency: cfg.currency ?? product.currency, currencyPosition: cfg.currencyPosition, priceDecimals: cfg.priceDecimals, style: { fontSize: '0.875rem' } })) : (React.createElement(PriceDisplay, { price: price ?? undefined, comparePrice: comparePrice ?? undefined, currency: cfg.currency ?? product.currency, currencyPosition: cfg.currencyPosition, priceDecimals: cfg.priceDecimals, showDiscount: cfg.showDiscount, style: { fontSize: '0.875rem' } }))),
89
+ cfg.showVariants !== false && options.length > 0 && (React.createElement(VariantSwatches, { options: options, visibleOptions: cfg.variantOptionsToShow, maxValues: cfg.maxVariantValues, selectedValues: selectedVariants, variants: variants, onSwatchHover: onVariantHover, onSwatchClick: onVariantClick })),
90
+ cfg.showStock !== false && available != null && (React.createElement("span", { className: "seekora-product-card__stock", style: {
91
+ fontSize: '0.75rem',
92
+ color: available ? 'var(--seekora-success, #22c55e)' : 'var(--seekora-error, #ef4444)',
93
+ } }, available ? 'In Stock' : 'Out of Stock')),
94
+ actionButtons && actionButtons.length > 0 && !isOverlayPosition && (React.createElement(ActionButtons, { buttons: actionButtons, position: "inline", showLabels: showActionLabels, size: "small", layout: "horizontal" })))));
95
+ }
96
+ /** compact: smaller image, 1-line title, price */
97
+ export function CompactLayout({ images, title, price, product, imageVariant, displayConfig, enableImageZoom, imageZoomMode, imageZoomLevel }) {
98
+ return (React.createElement(React.Fragment, null,
99
+ React.createElement(ImageBlock, { images: images, title: title, imageVariant: imageVariant, aspectRatio: displayConfig.imageAspectRatio ?? '1:1', enableZoom: enableImageZoom, zoomMode: imageZoomMode, zoomLevel: imageZoomLevel }),
100
+ React.createElement("span", { className: "seekora-product-card__title", style: {
101
+ fontSize: '0.8125rem',
102
+ fontWeight: 500,
103
+ overflow: 'hidden',
104
+ textOverflow: 'ellipsis',
105
+ whiteSpace: 'nowrap',
106
+ } }, title),
107
+ price != null && !Number.isNaN(price) && (React.createElement("span", { className: "seekora-product-card__price", style: { fontSize: '0.8125rem', color: 'inherit', opacity: 0.6 } },
108
+ product.currency ?? '$',
109
+ price.toFixed(2)))));
110
+ }
111
+ /** horizontal: image left + content right (title, brand, price, swatches) */
112
+ export function HorizontalLayout({ images, title, price, comparePrice, brand, badges, options, variants, product, imageVariant, displayConfig, onVariantHover, onVariantClick, selectedVariants, actionButtons, actionButtonsPosition, showActionLabels, enableImageZoom, imageZoomMode, imageZoomLevel, }) {
113
+ const cfg = displayConfig;
114
+ const isMobile = useIsMobile();
115
+ const containerGap = useResponsiveGap(12);
116
+ const bodyGap = isMobile ? 6 : 4;
117
+ // Responsive image dimensions
118
+ const imageMinWidth = isMobile ? 60 : 80;
119
+ const imageMaxWidth = isMobile ? 100 : 120;
120
+ const imageFlex = isMobile ? '20%' : '25%';
121
+ // Responsive font sizes
122
+ const brandFontSize = isMobile ? '0.6875rem' : '0.75rem';
123
+ const titleFontSize = isMobile ? '0.875rem' : '0.875rem';
124
+ const priceFontSize = isMobile ? '0.875rem' : '0.875rem';
125
+ return (React.createElement("div", { style: { display: 'flex', gap: containerGap, alignItems: 'flex-start' } },
126
+ React.createElement("div", { style: { position: 'relative', minWidth: imageMinWidth, flexBasis: imageFlex, maxWidth: imageMaxWidth, flexShrink: 0 } },
127
+ React.createElement(ImageBlock, { images: images, title: title, imageVariant: imageVariant, aspectRatio: "1:1", enableZoom: enableImageZoom, zoomMode: imageZoomMode, zoomLevel: imageZoomLevel }),
128
+ cfg.showBadges !== false && badges.length > 0 && (React.createElement(BadgeList, { badges: badges, position: "top-left", maxBadges: 1 })),
129
+ actionButtons && actionButtons.length > 0 && actionButtonsPosition?.startsWith('overlay') && (React.createElement(ActionButtons, { buttons: actionButtons, position: actionButtonsPosition === 'overlay-top-right' ? 'top-right' : 'bottom-center', showLabels: showActionLabels, size: "small" }))),
130
+ React.createElement("div", { className: "seekora-product-card__body", style: { display: 'flex', flexDirection: 'column', gap: bodyGap, flex: 1, minWidth: 0 } },
131
+ cfg.showBrand !== false && brand && (React.createElement("span", { className: "seekora-product-card__brand", style: { fontSize: brandFontSize, color: 'inherit', opacity: 0.6, textTransform: 'uppercase' } }, brand)),
132
+ React.createElement("span", { className: "seekora-product-card__title", style: { fontSize: titleFontSize, fontWeight: 500, lineHeight: 1.4, overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', WebkitLineClamp: isMobile ? 3 : 2, WebkitBoxOrient: 'vertical' } }, title),
133
+ React.createElement("div", { className: "seekora-product-card__price" },
134
+ React.createElement(PriceDisplay, { price: price ?? undefined, comparePrice: comparePrice ?? undefined, currency: cfg.currency ?? product.currency, currencyPosition: cfg.currencyPosition, priceDecimals: cfg.priceDecimals, showDiscount: cfg.showDiscount, style: { fontSize: priceFontSize } })),
135
+ cfg.showVariants !== false && options.length > 0 && (React.createElement(VariantSwatches, { options: options, visibleOptions: cfg.variantOptionsToShow, maxValues: cfg.maxVariantValues ?? 3, selectedValues: selectedVariants, variants: variants, onSwatchHover: onVariantHover, onSwatchClick: onVariantClick })),
136
+ actionButtons && actionButtons.length > 0 && actionButtonsPosition === 'inline' && (React.createElement(ActionButtons, { buttons: actionButtons, position: "inline", showLabels: showActionLabels, size: "small", layout: "horizontal" })))));
137
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * ProductGrid – grid of product cards from context (primitive)
3
+ *
4
+ * Uses trendingProducts or active tab products; each click calls context selectProduct.
5
+ */
6
+ import React from 'react';
7
+ import type { ProductDisplayConfig } from '../suggestions/types';
8
+ export interface ProductGridProps {
9
+ maxItems?: number;
10
+ /** 'trending' | tab id for filtered tab products */
11
+ source?: 'trending' | string;
12
+ columns?: number;
13
+ className?: string;
14
+ style?: React.CSSProperties;
15
+ gridClassName?: string;
16
+ /** Product display configuration passed through to each ProductCard */
17
+ displayConfig?: ProductDisplayConfig;
18
+ /** Callback when a variant swatch is hovered on a card */
19
+ onVariantHover?: (optionName: string, value: string) => void;
20
+ }
21
+ export declare function ProductGrid({ maxItems, source, columns, className, style, gridClassName, displayConfig, onVariantHover, }: ProductGridProps): React.JSX.Element | null;
22
+ //# sourceMappingURL=ProductGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductGrid.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions-primitives/ProductGrid.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAGjE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,0DAA0D;IAC1D,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9D;AAED,wBAAgB,WAAW,CAAC,EAC1B,QAAY,EACZ,MAAmB,EACnB,OAAW,EACX,SAAS,EACT,KAAK,EACL,aAAa,EACb,aAAa,EACb,cAAc,GACf,EAAE,gBAAgB,4BAwDlB"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * ProductGrid – grid of product cards from context (primitive)
3
+ *
4
+ * Uses trendingProducts or active tab products; each click calls context selectProduct.
5
+ */
6
+ import React, { useMemo } from 'react';
7
+ import { useSuggestionsContext } from './SuggestionsContext';
8
+ import { ProductCard } from './ProductCard';
9
+ import { clsx } from 'clsx';
10
+ import { useResponsiveColumns, useResponsiveGap, useResponsivePadding } from '../../utils/responsive';
11
+ export function ProductGrid({ maxItems = 8, source = 'trending', columns = 4, className, style, gridClassName, displayConfig, onVariantHover, }) {
12
+ const { trendingProducts, filteredTabs, activeTabId, selectProduct, getAllNavigableItems, } = useSuggestionsContext();
13
+ // Responsive columns and spacing
14
+ const responsiveColumns = useResponsiveColumns(columns);
15
+ const responsiveGap = useResponsiveGap(12);
16
+ const responsivePadding = useResponsivePadding(12);
17
+ const products = useMemo(() => {
18
+ if (source === 'trending')
19
+ return trendingProducts;
20
+ const tab = filteredTabs.find((t) => t.id === (source === 'tab' ? activeTabId : source));
21
+ return tab?.products ?? [];
22
+ }, [source, activeTabId, trendingProducts, filteredTabs]);
23
+ const items = products.slice(0, maxItems);
24
+ const navigableItems = getAllNavigableItems();
25
+ const productStartIndex = navigableItems.findIndex((n) => n.type === 'product');
26
+ if (items.length === 0)
27
+ return null;
28
+ const gridStyle = {
29
+ display: 'grid',
30
+ gridTemplateColumns: `repeat(${responsiveColumns}, minmax(0, 1fr))`,
31
+ gap: responsiveGap,
32
+ padding: responsivePadding,
33
+ };
34
+ return (React.createElement("div", { className: clsx('seekora-suggestions-product-grid', className), style: style },
35
+ React.createElement("div", { className: clsx('seekora-suggestions-product-grid-inner', gridClassName), style: gridStyle }, items.map((product, i) => {
36
+ const globalIndex = productStartIndex >= 0 ? productStartIndex + i : i;
37
+ const section = source === 'trending' ? 'products' : 'filtered_tab';
38
+ const tabId = source !== 'trending' ? (source === 'tab' ? activeTabId : source) : undefined;
39
+ return (React.createElement(ProductCard, { key: product.id ?? product.objectID ?? i, product: product, position: globalIndex, section: section, tabId: tabId, onSelect: () => selectProduct(product, globalIndex, section, tabId), displayConfig: displayConfig, onVariantHover: onVariantHover }));
40
+ }))));
41
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * RecentSearchesList – list of recent queries (primitive)
3
+ *
4
+ * Reads recentSearches from context; each click calls selectRecentSearch. Optional title/render.
5
+ */
6
+ import React from 'react';
7
+ import type { RecentSearch } from '@seekora-ai/ui-sdk-types';
8
+ export interface RecentSearchesListProps {
9
+ title?: string;
10
+ maxItems?: number;
11
+ className?: string;
12
+ style?: React.CSSProperties;
13
+ listClassName?: string;
14
+ renderItem?: (search: RecentSearch, index: number, onSelect: () => void) => React.ReactNode;
15
+ }
16
+ export declare function RecentSearchesList({ title, maxItems, className, style, listClassName, renderItem, }: RecentSearchesListProps): React.JSX.Element | null;
17
+ //# sourceMappingURL=RecentSearchesList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecentSearchesList.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions-primitives/RecentSearchesList.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC;CAC7F;AAwCD,wBAAgB,kBAAkB,CAAC,EACjC,KAAgB,EAChB,QAAY,EACZ,SAAS,EACT,KAAK,EACL,aAAa,EACb,UAAU,GACX,EAAE,uBAAuB,4BAiCzB"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * RecentSearchesList – list of recent queries (primitive)
3
+ *
4
+ * Reads recentSearches from context; each click calls selectRecentSearch. Optional title/render.
5
+ */
6
+ import React from 'react';
7
+ import { useSuggestionsContext } from './SuggestionsContext';
8
+ import { clsx } from 'clsx';
9
+ const itemStyle = {
10
+ padding: '10px 12px',
11
+ cursor: 'pointer',
12
+ border: 'none',
13
+ width: '100%',
14
+ textAlign: 'left',
15
+ fontSize: 'inherit',
16
+ fontFamily: 'inherit',
17
+ backgroundColor: 'transparent',
18
+ color: 'inherit',
19
+ transition: 'background-color 120ms ease',
20
+ };
21
+ function RecentSearchItem({ search, onSelect }) {
22
+ const [isHovered, setIsHovered] = React.useState(false);
23
+ return (React.createElement("li", null,
24
+ React.createElement("button", { type: "button", className: clsx('seekora-suggestions-recent-item', isHovered && 'seekora-suggestions-recent-item--hover'), style: {
25
+ ...itemStyle,
26
+ ...(isHovered ? { backgroundColor: 'var(--seekora-bg-hover, rgba(0,0,0,0.05))' } : {}),
27
+ }, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onMouseDown: (e) => {
28
+ e.preventDefault();
29
+ onSelect();
30
+ } }, search.query)));
31
+ }
32
+ export function RecentSearchesList({ title = 'Recent', maxItems = 8, className, style, listClassName, renderItem, }) {
33
+ const { recentSearches, query, selectRecentSearch } = useSuggestionsContext();
34
+ const items = recentSearches.slice(0, maxItems);
35
+ if (items.length === 0)
36
+ return null;
37
+ return (React.createElement("div", { className: clsx('seekora-suggestions-recent-list', className), style: style },
38
+ title ? (React.createElement("div", { className: "seekora-suggestions-recent-title", style: { padding: '8px 12px', fontSize: '0.75rem', fontWeight: 600, color: 'inherit', opacity: 0.6, textTransform: 'uppercase' } }, title)) : null,
39
+ React.createElement("ul", { className: clsx('seekora-suggestions-recent-ul', listClassName), style: { margin: 0, padding: 0, listStyle: 'none' } }, items.map((search, i) => {
40
+ const onSelect = () => selectRecentSearch(search);
41
+ if (renderItem) {
42
+ return React.createElement("li", { key: `${search.query}-${search.timestamp}` }, renderItem(search, i, onSelect));
43
+ }
44
+ return (React.createElement(RecentSearchItem, { key: `${search.query}-${search.timestamp}`, search: search, onSelect: onSelect }));
45
+ }))));
46
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * SearchInput – suggestion-scoped search input (primitive)
3
+ *
4
+ * Single input bound to suggestions context: query, setQuery, focus opens dropdown,
5
+ * keydown ArrowUp/Down/Enter/Escape delegates to context. Overridable via className/style.
6
+ */
7
+ import React from 'react';
8
+ export interface SearchInputProps {
9
+ placeholder?: string;
10
+ autoFocus?: boolean;
11
+ showClearButton?: boolean;
12
+ /** When false, blur does not close the dropdown (e.g. for overlay mode). Default true. */
13
+ closeOnBlur?: boolean;
14
+ /** Optional icon (e.g. magnifying glass) rendered to the left of the input */
15
+ leftIcon?: React.ReactNode;
16
+ className?: string;
17
+ style?: React.CSSProperties;
18
+ inputClassName?: string;
19
+ inputStyle?: React.CSSProperties;
20
+ ariaLabel?: string;
21
+ }
22
+ export declare function SearchInput({ placeholder, autoFocus, showClearButton, closeOnBlur, leftIcon, className, style, inputClassName, inputStyle, ariaLabel, }: SearchInputProps): React.JSX.Element;
23
+ //# sourceMappingURL=SearchInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions-primitives/SearchInput.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAyBnD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,0FAA0F;IAC1F,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA6BD,wBAAgB,WAAW,CAAC,EAC1B,WAAkC,EAClC,SAAiB,EACjB,eAAsB,EACtB,WAAkB,EAClB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,cAAc,EACd,UAAU,EACV,SAAoB,GACrB,EAAE,gBAAgB,qBA+GlB"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * SearchInput – suggestion-scoped search input (primitive)
3
+ *
4
+ * Single input bound to suggestions context: query, setQuery, focus opens dropdown,
5
+ * keydown ArrowUp/Down/Enter/Escape delegates to context. Overridable via className/style.
6
+ */
7
+ import React, { useRef, useCallback } from 'react';
8
+ import { useSuggestionsContext } from './SuggestionsContext';
9
+ import { clsx } from 'clsx';
10
+ const SPACING = {
11
+ xs: 4,
12
+ sm: 8,
13
+ md: 12,
14
+ lg: 16,
15
+ xl: 24,
16
+ };
17
+ const TRANSITIONS = {
18
+ fast: '150ms ease-in-out',
19
+ normal: '200ms ease-in-out',
20
+ slow: '300ms ease-in-out',
21
+ };
22
+ const BORDER_RADIUS = {
23
+ sm: 4,
24
+ md: 6,
25
+ lg: 8,
26
+ full: 9999,
27
+ };
28
+ const defaultStyles = {
29
+ position: 'relative',
30
+ width: '100%',
31
+ };
32
+ const inputWrapperStyles = {
33
+ display: 'flex',
34
+ alignItems: 'center',
35
+ gap: `${SPACING.sm}px`,
36
+ padding: `${SPACING.sm}px ${SPACING.md}px`,
37
+ border: '1px solid var(--seekora-border-color, rgba(0,0,0,0.1))',
38
+ borderRadius: `var(--seekora-border-radius, ${BORDER_RADIUS.md}px)`,
39
+ backgroundColor: 'var(--seekora-bg-surface, transparent)',
40
+ transition: `border-color ${TRANSITIONS.fast}, box-shadow ${TRANSITIONS.fast}`,
41
+ boxSizing: 'border-box',
42
+ };
43
+ const inputStyles = {
44
+ flex: 1,
45
+ minWidth: 0,
46
+ padding: `${SPACING.sm}px 0`,
47
+ border: 'none',
48
+ outline: 'none',
49
+ backgroundColor: 'transparent',
50
+ fontSize: 'inherit',
51
+ color: 'var(--seekora-text-primary, inherit)',
52
+ fontFamily: 'inherit',
53
+ };
54
+ export function SearchInput({ placeholder = 'Powered by Seekora', autoFocus = false, showClearButton = true, closeOnBlur = true, leftIcon, className, style, inputClassName, inputStyle, ariaLabel = 'Search', }) {
55
+ const { query, setQuery, isOpen, setIsOpen, navigateNext, navigatePrev, selectActive, close, } = useSuggestionsContext();
56
+ const inputRef = useRef(null);
57
+ const handleFocus = useCallback(() => {
58
+ setIsOpen(true);
59
+ }, [setIsOpen]);
60
+ const handleBlur = useCallback(() => {
61
+ if (!closeOnBlur)
62
+ return;
63
+ setTimeout(() => close(), 200);
64
+ }, [close, closeOnBlur]);
65
+ const handleChange = useCallback((e) => {
66
+ setQuery(e.target.value);
67
+ }, [setQuery]);
68
+ const handleKeyDown = useCallback((e) => {
69
+ if (e.key === 'ArrowDown') {
70
+ e.preventDefault();
71
+ navigateNext();
72
+ return;
73
+ }
74
+ if (e.key === 'ArrowUp') {
75
+ e.preventDefault();
76
+ navigatePrev();
77
+ return;
78
+ }
79
+ if (e.key === 'Enter') {
80
+ e.preventDefault();
81
+ selectActive();
82
+ return;
83
+ }
84
+ if (e.key === 'Escape') {
85
+ e.preventDefault();
86
+ close();
87
+ inputRef.current?.blur();
88
+ return;
89
+ }
90
+ }, [navigateNext, navigatePrev, selectActive, close]);
91
+ const handleClear = useCallback(() => {
92
+ setQuery('');
93
+ inputRef.current?.focus();
94
+ }, [setQuery]);
95
+ return (React.createElement("div", { className: clsx('seekora-suggestions-search-input-wrapper', className), style: { ...defaultStyles, ...style } },
96
+ React.createElement("div", { className: "seekora-suggestions-input-wrapper", style: inputWrapperStyles },
97
+ leftIcon ? (React.createElement("span", { className: "seekora-suggestions-input-left-icon", style: { display: 'flex', flexShrink: 0, color: 'inherit', opacity: 0.5 } }, leftIcon)) : null,
98
+ React.createElement("input", { ref: inputRef, type: "text", value: query, onChange: handleChange, onFocus: handleFocus, onBlur: handleBlur, onKeyDown: handleKeyDown, placeholder: placeholder, autoFocus: autoFocus, autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: false, "aria-label": ariaLabel, "aria-expanded": isOpen, "aria-haspopup": "listbox", "aria-autocomplete": "list", role: "combobox", className: clsx('seekora-suggestions-input', inputClassName), style: { ...inputStyles, ...inputStyle } }),
99
+ showClearButton && query ? (React.createElement("button", { type: "button", onClick: handleClear, className: "seekora-suggestions-input-clear", "aria-label": "Clear search", style: {
100
+ padding: 8,
101
+ border: 'none',
102
+ background: 'transparent',
103
+ cursor: 'pointer',
104
+ color: 'inherit', opacity: 0.5,
105
+ display: 'flex',
106
+ alignItems: 'center',
107
+ justifyContent: 'center',
108
+ } },
109
+ React.createElement(ClearIcon, null))) : null)));
110
+ }
111
+ function ClearIcon() {
112
+ return (React.createElement("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": true },
113
+ React.createElement("path", { fillRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z", clipRule: "evenodd" })));
114
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * SuggestionItem – single text suggestion row (primitive)
3
+ *
4
+ * Highlights when isActive; onClick calls context selectSuggestion.
5
+ * When enableHighlightMarkup is true (default), parses <mark>...</mark> in
6
+ * suggestion text and renders as highlighted <mark> elements. Overridable via
7
+ * renderHighlight, className/style.
8
+ */
9
+ import React from 'react';
10
+ import type { SuggestionItem as SuggestionItemType } from '@seekora-ai/ui-sdk-types';
11
+ import type { HighlightMarkupOptions } from './highlightMarkup';
12
+ export interface SuggestionItemProps {
13
+ suggestion: SuggestionItemType;
14
+ index: number;
15
+ isActive: boolean;
16
+ onSelect: () => void;
17
+ className?: string;
18
+ style?: React.CSSProperties;
19
+ /**
20
+ * When true (default), text containing <mark>...</mark> is rendered with
21
+ * those segments as highlighted <mark> elements. When false, plain query
22
+ * text is shown with no markup parsing.
23
+ */
24
+ enableHighlightMarkup?: boolean;
25
+ /** Options for the default highlight <mark> styling when enableHighlightMarkup is true. */
26
+ highlightMarkupOptions?: HighlightMarkupOptions;
27
+ /** Custom renderer for suggestion text; overrides default highlight parsing when provided. */
28
+ renderHighlight?: (text: string) => React.ReactNode;
29
+ }
30
+ export declare function SuggestionItem({ suggestion, index, isActive, onSelect, className, style, enableHighlightMarkup, highlightMarkupOptions, renderHighlight, }: SuggestionItemProps): React.JSX.Element;
31
+ //# sourceMappingURL=SuggestionItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuggestionItem.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions-primitives/SuggestionItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAErF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,2FAA2F;IAC3F,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD,8FAA8F;IAC9F,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;CACrD;AAmBD,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,KAAK,EACL,qBAA4B,EAC5B,sBAAsB,EACtB,eAAe,GAChB,EAAE,mBAAmB,qBA8CrB"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * SuggestionItem – single text suggestion row (primitive)
3
+ *
4
+ * Highlights when isActive; onClick calls context selectSuggestion.
5
+ * When enableHighlightMarkup is true (default), parses <mark>...</mark> in
6
+ * suggestion text and renders as highlighted <mark> elements. Overridable via
7
+ * renderHighlight, className/style.
8
+ */
9
+ import React from 'react';
10
+ import { clsx } from 'clsx';
11
+ import { parseHighlightMarkup } from './highlightMarkup';
12
+ const defaultItemStyle = {
13
+ padding: '10px 12px',
14
+ cursor: 'pointer',
15
+ listStyle: 'none',
16
+ border: 'none',
17
+ width: '100%',
18
+ textAlign: 'left',
19
+ fontSize: 'inherit',
20
+ fontFamily: 'inherit',
21
+ backgroundColor: 'transparent',
22
+ color: 'inherit',
23
+ transition: 'background-color 120ms ease',
24
+ overflow: 'hidden',
25
+ textOverflow: 'ellipsis',
26
+ whiteSpace: 'nowrap',
27
+ };
28
+ export function SuggestionItem({ suggestion, index, isActive, onSelect, className, style, enableHighlightMarkup = true, highlightMarkupOptions, renderHighlight, }) {
29
+ const [isHovered, setIsHovered] = React.useState(false);
30
+ const displayText = suggestion.highlightedQuery ?? suggestion.query;
31
+ const content = renderHighlight != null
32
+ ? renderHighlight(displayText)
33
+ : enableHighlightMarkup
34
+ ? parseHighlightMarkup(displayText ?? '', highlightMarkupOptions)
35
+ : (suggestion.query ?? displayText ?? '');
36
+ const showHighlight = isActive || isHovered;
37
+ return (React.createElement("li", { role: "option", "aria-selected": isActive, id: `seekora-suggestion-${index}`, className: clsx('seekora-suggestions-item', isActive && 'seekora-suggestions-item--active', isHovered && 'seekora-suggestions-item--hover', className), style: {
38
+ ...defaultItemStyle,
39
+ ...(showHighlight ? { backgroundColor: 'var(--seekora-bg-hover, rgba(0,0,0,0.05))' } : {}),
40
+ ...style,
41
+ }, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onMouseDown: (e) => {
42
+ e.preventDefault();
43
+ onSelect();
44
+ } },
45
+ content,
46
+ suggestion.count != null ? (React.createElement("span", { className: "seekora-suggestions-item-count", style: { marginLeft: 8, color: 'inherit', opacity: 0.6, fontSize: '0.875em' } }, suggestion.count)) : null));
47
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * SuggestionList – container for text suggestions (primitive)
3
+ *
4
+ * Renders list of SuggestionItem from context; uses activeIndex for highlight.
5
+ * Optional renderItem. When not using renderItem, enableHighlightMarkup and
6
+ * highlightMarkupOptions control parsing of <mark>...</mark> in suggestion text.
7
+ */
8
+ import React from 'react';
9
+ import type { HighlightMarkupOptions } from './highlightMarkup';
10
+ export interface SuggestionListProps {
11
+ maxItems?: number;
12
+ className?: string;
13
+ style?: React.CSSProperties;
14
+ listClassName?: string;
15
+ /**
16
+ * When true (default), suggestion text with <mark>...</mark> is rendered
17
+ * with those segments highlighted. When false, plain text is shown.
18
+ * Only applies when not using custom renderItem.
19
+ */
20
+ enableHighlightMarkup?: boolean;
21
+ /** Options for default highlight <mark> styling. Only applies when not using custom renderItem. */
22
+ highlightMarkupOptions?: HighlightMarkupOptions;
23
+ renderItem?: (suggestion: import('@seekora-ai/ui-sdk-types').SuggestionItem, index: number, isActive: boolean, onSelect: () => void) => React.ReactNode;
24
+ }
25
+ export declare function SuggestionList({ maxItems, className, style, listClassName, enableHighlightMarkup, highlightMarkupOptions, renderItem, }: SuggestionListProps): React.JSX.Element | null;
26
+ //# sourceMappingURL=SuggestionList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuggestionList.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions-primitives/SuggestionList.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,mGAAmG;IACnG,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD,UAAU,CAAC,EAAE,CACX,UAAU,EAAE,OAAO,0BAA0B,EAAE,cAAc,EAC7D,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,MAAM,IAAI,KACjB,KAAK,CAAC,SAAS,CAAC;CACtB;AAOD,wBAAgB,cAAc,CAAC,EAC7B,QAAa,EACb,SAAS,EACT,KAAK,EACL,aAAa,EACb,qBAA4B,EAC5B,sBAAsB,EACtB,UAAU,GACX,EAAE,mBAAmB,4BA+CrB"}