@envive-ai/react-toolkit 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/dist/AppliedFiltersScrollbar-BlcyhZkZ.cjs +53 -0
  2. package/dist/AppliedFiltersScrollbar-DFGzRemu.js +44 -0
  3. package/dist/ButtonBase-C1rsL9gO.js +60 -0
  4. package/dist/ButtonBase-a8uj6c2f.cjs +69 -0
  5. package/dist/DynamicFiltersScrollbar-B2Rr1KnJ.cjs +41 -0
  6. package/dist/DynamicFiltersScrollbar-Dys6geP0.js +32 -0
  7. package/dist/Headline-L7w3BsBF.cjs +72 -0
  8. package/dist/Headline-ro_Nigw5.js +64 -0
  9. package/dist/ImageWithFallback-CfmkC58B.js +42 -0
  10. package/dist/ImageWithFallback-P3AjyL2Y.cjs +51 -0
  11. package/dist/ProductCard-Btg8tHGc.js +172 -0
  12. package/dist/ProductCard-CS6DZAwO.cjs +193 -0
  13. package/dist/ProductCardSkeleton-BPfp6IOp.js +38 -0
  14. package/dist/ProductCardSkeleton-BgvDlaty.cjs +46 -0
  15. package/dist/ProductGrid-B7QZfW-v.cjs +77 -0
  16. package/dist/ProductGrid-DB_Uq5F-.js +69 -0
  17. package/dist/SearchAutocomplete-C5FL82xC.js +51 -0
  18. package/dist/SearchAutocomplete-wr18dJ8L.cjs +62 -0
  19. package/dist/SearchFilter-D-2IdBKS.js +62 -0
  20. package/dist/SearchFilter-D0IzBlG5.cjs +70 -0
  21. package/dist/SearchFilterHeader-BQT0-ssS.js +37 -0
  22. package/dist/SearchFilterHeader-C3EklfoO.cjs +45 -0
  23. package/dist/SearchFilterItem-BodtWLoP.js +26 -0
  24. package/dist/SearchFilterItem-DmMkiqNC.cjs +34 -0
  25. package/dist/SearchInput-BrcAgcvI.js +89 -0
  26. package/dist/SearchInput-DSB9CwIq.cjs +106 -0
  27. package/dist/SparkleAnimation-BpLwrEqM.cjs +96 -0
  28. package/dist/SparkleAnimation-CXs58sFd.js +85 -0
  29. package/dist/Spinner-BZ-kTOpm.js +38 -0
  30. package/dist/Spinner-CfQ85Ajl.cjs +46 -0
  31. package/dist/Text-Bdv7F5-u.js +42 -0
  32. package/dist/Text-C04c4Z93.cjs +50 -0
  33. package/dist/TextInput-BO80ixsV.cjs +40 -0
  34. package/dist/TextInput-CEGWfdPC.js +31 -0
  35. package/dist/chunk-CUT6urMc.cjs +30 -0
  36. package/dist/colorsConfig-TCONYTQ7.cjs +38 -0
  37. package/dist/colorsConfig-l0ODUVhu.js +26 -0
  38. package/dist/common/ButtonBase/ButtonBase.cjs +5 -0
  39. package/dist/common/ButtonBase/ButtonBase.d.cts +35 -0
  40. package/dist/common/ButtonBase/ButtonBase.d.ts +35 -0
  41. package/dist/common/ButtonBase/ButtonBase.js +5 -0
  42. package/dist/common/Headline/Headline.cjs +4 -0
  43. package/dist/common/Headline/Headline.d.cts +21 -0
  44. package/dist/common/Headline/Headline.d.ts +21 -0
  45. package/dist/common/Headline/Headline.js +4 -0
  46. package/dist/common/ImageWithFallback/ImageWithFallback.cjs +3 -0
  47. package/dist/common/ImageWithFallback/ImageWithFallback.d.cts +26 -0
  48. package/dist/common/ImageWithFallback/ImageWithFallback.d.ts +26 -0
  49. package/dist/common/ImageWithFallback/ImageWithFallback.js +3 -0
  50. package/dist/common/ProductCard/ProductCard.cjs +11 -0
  51. package/dist/common/ProductCard/ProductCard.d.cts +91 -0
  52. package/dist/common/ProductCard/ProductCard.d.ts +91 -0
  53. package/dist/common/ProductCard/ProductCard.js +9 -0
  54. package/dist/common/ProductCard/ProductCardSkeleton.cjs +4 -0
  55. package/dist/common/ProductCard/ProductCardSkeleton.d.cts +12 -0
  56. package/dist/common/ProductCard/ProductCardSkeleton.d.ts +12 -0
  57. package/dist/common/ProductCard/ProductCardSkeleton.js +4 -0
  58. package/dist/common/ProductGrid/ProductGrid.cjs +11 -0
  59. package/dist/common/ProductGrid/ProductGrid.d.cts +26 -0
  60. package/dist/common/ProductGrid/ProductGrid.d.ts +26 -0
  61. package/dist/common/ProductGrid/ProductGrid.js +11 -0
  62. package/dist/common/SparkleAnimation/SparkleAnimation.cjs +3 -0
  63. package/dist/common/SparkleAnimation/SparkleAnimation.d.cts +15 -0
  64. package/dist/common/SparkleAnimation/SparkleAnimation.d.ts +15 -0
  65. package/dist/common/SparkleAnimation/SparkleAnimation.js +3 -0
  66. package/dist/common/Spinner/Spinner.cjs +3 -0
  67. package/dist/common/Spinner/Spinner.d.cts +11 -0
  68. package/dist/common/Spinner/Spinner.d.ts +11 -0
  69. package/dist/common/Spinner/Spinner.js +3 -0
  70. package/dist/common/SuggestionButton/SuggestionButton.cjs +188 -0
  71. package/dist/common/SuggestionButton/SuggestionButton.d.cts +35 -0
  72. package/dist/common/SuggestionButton/SuggestionButton.d.ts +35 -0
  73. package/dist/common/SuggestionButton/SuggestionButton.js +180 -0
  74. package/dist/common/Text/Text.cjs +4 -0
  75. package/dist/common/Text/Text.d.cts +28 -0
  76. package/dist/common/Text/Text.d.ts +28 -0
  77. package/dist/common/Text/Text.js +4 -0
  78. package/dist/common/TextInput/TextInput.cjs +4 -0
  79. package/dist/common/TextInput/TextInput.d.cts +98 -0
  80. package/dist/common/TextInput/TextInput.d.ts +98 -0
  81. package/dist/common/TextInput/TextInput.js +4 -0
  82. package/dist/productCardVariants-C_QIZ-KF.js +45 -0
  83. package/dist/productCardVariants-Dd-wrJKP.cjs +69 -0
  84. package/dist/productGridVariants-CxCKx5Fq.js +20 -0
  85. package/dist/productGridVariants-DVzvjK9i.cjs +26 -0
  86. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.cjs +5 -0
  87. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.d.cts +22 -0
  88. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +22 -0
  89. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.js +5 -0
  90. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.cjs +5 -0
  91. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.d.cts +28 -0
  92. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +28 -0
  93. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.js +5 -0
  94. package/dist/search/SearchFilter/SearchFilter.cjs +7 -0
  95. package/dist/search/SearchFilter/SearchFilter.d.cts +18 -0
  96. package/dist/search/SearchFilter/SearchFilter.d.ts +18 -0
  97. package/dist/search/SearchFilter/SearchFilter.js +7 -0
  98. package/dist/search/SearchFilter/SearchFilterHeader.cjs +5 -0
  99. package/dist/search/SearchFilter/SearchFilterHeader.d.cts +12 -0
  100. package/dist/search/SearchFilter/SearchFilterHeader.d.ts +12 -0
  101. package/dist/search/SearchFilter/SearchFilterHeader.js +5 -0
  102. package/dist/search/SearchFilter/SearchFilterItem.cjs +5 -0
  103. package/dist/search/SearchFilter/SearchFilterItem.d.cts +13 -0
  104. package/dist/search/SearchFilter/SearchFilterItem.d.ts +13 -0
  105. package/dist/search/SearchFilter/SearchFilterItem.js +5 -0
  106. package/dist/search/SearchInput/SearchInput.cjs +6 -0
  107. package/dist/search/SearchInput/SearchInput.d.cts +20 -0
  108. package/dist/search/SearchInput/SearchInput.d.ts +20 -0
  109. package/dist/search/SearchInput/SearchInput.js +6 -0
  110. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.cjs +3 -0
  111. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.d.cts +13 -0
  112. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.d.ts +13 -0
  113. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.js +3 -0
  114. package/dist/search/SearchInputForm/SearchInputForm.cjs +38 -0
  115. package/dist/search/SearchInputForm/SearchInputForm.d.cts +32 -0
  116. package/dist/search/SearchInputForm/SearchInputForm.d.ts +32 -0
  117. package/dist/search/SearchInputForm/SearchInputForm.js +36 -0
  118. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.cjs +52 -0
  119. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.d.cts +28 -0
  120. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +28 -0
  121. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.js +49 -0
  122. package/dist/search/SearchResultsStates/NoSearchResultsFound.cjs +30 -0
  123. package/dist/search/SearchResultsStates/NoSearchResultsFound.d.cts +17 -0
  124. package/dist/search/SearchResultsStates/NoSearchResultsFound.d.ts +17 -0
  125. package/dist/search/SearchResultsStates/NoSearchResultsFound.js +26 -0
  126. package/dist/search/SearchResultsStates/SearchResultsGrid.cjs +66 -0
  127. package/dist/search/SearchResultsStates/SearchResultsGrid.d.cts +41 -0
  128. package/dist/search/SearchResultsStates/SearchResultsGrid.d.ts +41 -0
  129. package/dist/search/SearchResultsStates/SearchResultsGrid.js +62 -0
  130. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.cjs +52 -0
  131. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.d.cts +15 -0
  132. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +15 -0
  133. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.js +49 -0
  134. package/dist/searchFilterSidebarVariants-GfFbQzGf.cjs +39 -0
  135. package/dist/searchFilterSidebarVariants-lJVVZT_2.js +34 -0
  136. package/dist/textVariantClasses-5t3OricK.js +101 -0
  137. package/dist/textVariantClasses-Bhf4VY5z.cjs +125 -0
  138. package/dist/types-53zIialA.d.ts +35 -0
  139. package/dist/types-B4BGZSlV.d.cts +4 -0
  140. package/dist/types-BQNqA5xL.d.ts +46 -0
  141. package/dist/types-BRLWwGMI.d.ts +4 -0
  142. package/dist/types-CImLkcNh.d.cts +46 -0
  143. package/dist/types-Cph97xkm.d.ts +6 -0
  144. package/dist/types-CpiJO5UH.d.ts +4 -0
  145. package/dist/types-DFetqNL2.d.ts +8 -0
  146. package/dist/types-DaSkJnT_.d.cts +8 -0
  147. package/dist/types-Dy4_w6Cf.d.cts +4 -0
  148. package/dist/types-TYhhwWZw.d.cts +6 -0
  149. package/dist/types-aa4flfRE.d.cts +35 -0
  150. package/package.json +8 -8
  151. package/src/components/common/ButtonBase/ButtonBase.tsx +2 -2
  152. package/src/components/common/ButtonBase/types.ts +2 -3
  153. package/dist/src/atoms/search/types.d.ts +0 -5
  154. package/dist/src/atoms/search/types.js +0 -1
  155. package/dist/src/components/common/ButtonBase/ButtonBase.d.ts +0 -2
  156. package/dist/src/components/common/ButtonBase/ButtonBase.js +0 -41
  157. package/dist/src/components/common/ButtonBase/types.d.ts +0 -24
  158. package/dist/src/components/common/ButtonBase/types.js +0 -6
  159. package/dist/src/components/common/Headline/Headline.d.ts +0 -10
  160. package/dist/src/components/common/Headline/Headline.js +0 -34
  161. package/dist/src/components/common/ImageWithFallback/ImageWithFallback.d.ts +0 -12
  162. package/dist/src/components/common/ImageWithFallback/ImageWithFallback.js +0 -26
  163. package/dist/src/components/common/ProductCard/ProductCard.d.ts +0 -39
  164. package/dist/src/components/common/ProductCard/ProductCard.js +0 -84
  165. package/dist/src/components/common/ProductCard/ProductCardSkeleton.d.ts +0 -9
  166. package/dist/src/components/common/ProductCard/ProductCardSkeleton.js +0 -15
  167. package/dist/src/components/common/ProductCard/productCardVariants.d.ts +0 -8
  168. package/dist/src/components/common/ProductCard/productCardVariants.js +0 -50
  169. package/dist/src/components/common/ProductCard/types.d.ts +0 -39
  170. package/dist/src/components/common/ProductCard/types.js +0 -10
  171. package/dist/src/components/common/ProductGrid/ProductGrid.d.ts +0 -14
  172. package/dist/src/components/common/ProductGrid/ProductGrid.js +0 -13
  173. package/dist/src/components/common/ProductGrid/productGridVariants.d.ts +0 -10
  174. package/dist/src/components/common/ProductGrid/productGridVariants.js +0 -16
  175. package/dist/src/components/common/SparkleAnimation/SparkleAnimation.d.ts +0 -7
  176. package/dist/src/components/common/SparkleAnimation/SparkleAnimation.js +0 -40
  177. package/dist/src/components/common/SparkleAnimation/types.d.ts +0 -6
  178. package/dist/src/components/common/SparkleAnimation/types.js +0 -7
  179. package/dist/src/components/common/Spinner/Spinner.d.ts +0 -5
  180. package/dist/src/components/common/Spinner/Spinner.js +0 -16
  181. package/dist/src/components/common/SuggestionButton/SuggestionButton.d.ts +0 -18
  182. package/dist/src/components/common/SuggestionButton/SuggestionButton.js +0 -210
  183. package/dist/src/components/common/SuggestionButton/types.d.ts +0 -1
  184. package/dist/src/components/common/SuggestionButton/types.js +0 -1
  185. package/dist/src/components/common/Text/Text.d.ts +0 -12
  186. package/dist/src/components/common/Text/Text.js +0 -26
  187. package/dist/src/components/common/Text/textVariantClasses.d.ts +0 -171
  188. package/dist/src/components/common/Text/textVariantClasses.js +0 -103
  189. package/dist/src/components/common/Text/types.d.ts +0 -16
  190. package/dist/src/components/common/Text/types.js +0 -6
  191. package/dist/src/components/common/TextInput/TextInput.d.ts +0 -8
  192. package/dist/src/components/common/TextInput/TextInput.js +0 -25
  193. package/dist/src/components/models/colorsConfig.d.ts +0 -26
  194. package/dist/src/components/models/colorsConfig.js +0 -23
  195. package/dist/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +0 -11
  196. package/dist/src/components/search/FilterScrollbar/AppliedFiltersScrollbar.js +0 -18
  197. package/dist/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +0 -15
  198. package/dist/src/components/search/FilterScrollbar/DynamicFiltersScrollbar.js +0 -15
  199. package/dist/src/components/search/SearchFilter/SearchFilter.d.ts +0 -2
  200. package/dist/src/components/search/SearchFilter/SearchFilter.js +0 -24
  201. package/dist/src/components/search/SearchFilter/SearchFilterHeader.d.ts +0 -2
  202. package/dist/src/components/search/SearchFilter/SearchFilterHeader.js +0 -9
  203. package/dist/src/components/search/SearchFilter/SearchFilterItem.d.ts +0 -2
  204. package/dist/src/components/search/SearchFilter/SearchFilterItem.js +0 -13
  205. package/dist/src/components/search/SearchFilter/types.d.ts +0 -42
  206. package/dist/src/components/search/SearchFilter/types.js +0 -1
  207. package/dist/src/components/search/SearchInput/SearchInput.d.ts +0 -16
  208. package/dist/src/components/search/SearchInput/SearchInput.js +0 -38
  209. package/dist/src/components/search/SearchInput/searchInputVariants.d.ts +0 -13
  210. package/dist/src/components/search/SearchInput/searchInputVariants.js +0 -12
  211. package/dist/src/components/search/SearchInputAutocomplete/SearchAutocomplete.d.ts +0 -10
  212. package/dist/src/components/search/SearchInputAutocomplete/SearchAutocomplete.js +0 -14
  213. package/dist/src/components/search/SearchInputForm/SearchInputForm.d.ts +0 -16
  214. package/dist/src/components/search/SearchInputForm/SearchInputForm.js +0 -13
  215. package/dist/src/components/search/SearchInputForm/types.d.ts +0 -1
  216. package/dist/src/components/search/SearchInputForm/types.js +0 -1
  217. package/dist/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +0 -14
  218. package/dist/src/components/search/SearchResultsFilterSidebar/SearchResultsFilter.js +0 -15
  219. package/dist/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts +0 -16
  220. package/dist/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.js +0 -29
  221. package/dist/src/components/search/SearchResultsFilterSidebar/types.d.ts +0 -2
  222. package/dist/src/components/search/SearchResultsFilterSidebar/types.js +0 -1
  223. package/dist/src/components/search/SearchResultsStates/NoSearchResultsFound.d.ts +0 -8
  224. package/dist/src/components/search/SearchResultsStates/NoSearchResultsFound.js +0 -10
  225. package/dist/src/components/search/SearchResultsStates/SearchResultsGrid.d.ts +0 -24
  226. package/dist/src/components/search/SearchResultsStates/SearchResultsGrid.js +0 -19
  227. package/dist/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +0 -6
  228. package/dist/src/components/search/SearchResultsStates/SearchResultsLoadingGrid.js +0 -10
  229. package/dist/src/components/search/types.d.ts +0 -5
  230. package/dist/src/components/search/types.js +0 -6
  231. package/dist/src/components/test/types.d.ts +0 -3
  232. package/dist/src/components/test/types.js +0 -1
  233. package/dist/src/config/chatElementDisplayLocation.d.ts +0 -21
  234. package/dist/src/config/chatElementDisplayLocation.js +0 -23
  235. package/dist/src/index.d.ts +0 -45
  236. package/dist/src/index.js +0 -49
  237. package/dist/src/logging/logger.d.ts +0 -7
  238. package/dist/src/logging/logger.js +0 -16
  239. package/dist/src/types/external.d.ts +0 -21
  240. package/dist/src/types/external.js +0 -5
  241. package/dist/src/util/camelCase.d.ts +0 -65
  242. package/dist/src/util/camelCase.js +0 -2
  243. package/dist/src/util/camelCasedPropertiesDeep.d.ts +0 -53
  244. package/dist/src/util/camelCasedPropertiesDeep.js +0 -1
  245. package/dist/src/util/formatPrice.d.ts +0 -1
  246. package/dist/src/util/formatPrice.js +0 -11
  247. package/dist/src/util/internal.d.ts +0 -27
  248. package/dist/src/util/internal.js +0 -4
  249. package/dist/src/util/primitive.d.ts +0 -6
  250. package/dist/src/util/primitive.js +0 -2
  251. package/dist/src/util/splitWords.d.ts +0 -55
  252. package/dist/src/util/splitWords.js +0 -2
  253. package/dist/src/util/trim.d.ts +0 -24
  254. package/dist/src/util/trim.js +0 -2
  255. package/dist/src/util/unknownArray.d.ts +0 -25
  256. package/dist/src/util/unknownArray.js +0 -1
  257. package/src/index.ts +0 -59
@@ -1,38 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React, { useRef, useImperativeHandle } from 'react';
3
- import classNames from 'classnames';
4
- import MagnifyingGlassStarVariant from '@envive-ai/react-icons/src/MagnifyingGlassStarVariant';
5
- import CloseIcon from '@envive-ai/react-icons/src/IconClose';
6
- import { TextInput } from '../../../components/common/TextInput/TextInput';
7
- import { searchInputVariantClasses } from './searchInputVariants';
8
- export const SearchInput = React.forwardRef(({ searchInputVariant = 'standard', value, placeholder, suggestions, className, dataTestId, ariaActivedescendant, onKeyDown, onChange, onFocus, onBlur, }, ref) => {
9
- const localInputRef = useRef(null);
10
- const { searchInputClasses: inputClassName, searchInputIconColor: iconColor, searchInputBorderColor: borderColor, searchInputCloseIconClasses: closeIconClasses, searchInputActiveStarClasses, placeholderVariant, } = searchInputVariantClasses[searchInputVariant];
11
- // Expose the local ref through the forwarded ref
12
- useImperativeHandle(ref, () => localInputRef.current, []);
13
- const magnifyingGlassClassesBase = [
14
- 'spiffy-tw-w-[24px]',
15
- 'spiffy-tw-h-[32px]',
16
- 'spiffy-tw-stroke-width-1',
17
- 'sm:spiffy-tw-w-[32px]',
18
- ];
19
- const magnifyingGlassClassesInactive = classNames(magnifyingGlassClassesBase);
20
- const magnifyingGlassClassesActive = classNames([
21
- ...magnifyingGlassClassesBase,
22
- searchInputActiveStarClasses,
23
- ]);
24
- const containerClasses = classNames('spiffy-global-search-input-container', 'spiffy-tw-relative spiffy-tw-flex spiffy-tw-items-center', className);
25
- const inputClasses = classNames('spiffy-global-search-input', 'spiffy-tw-flex-grow spiffy-tw-p-2 spiffy-tw-px-[42px] sm:spiffy-tw-p-3 sm:spiffy-tw-px-[48px]', 'spiffy-tw-border', 'spiffy-tw-text-base', inputClassName);
26
- const closeButtonIconClassName = classNames([
27
- 'spiffy-tw-w-[16px]',
28
- 'spiffy-tw-h-[16px]',
29
- 'sm:spiffy-tw-w-[24px]',
30
- 'sm:spiffy-tw-h-[24px]',
31
- 'spiffy-tw-cursor-pointer',
32
- closeIconClasses,
33
- ]);
34
- return (_jsxs("div", { className: containerClasses, "data-testid": dataTestId, children: [_jsx("div", { className: "spiffy-tw-absolute spiffy-tw-left-3 spiffy-tw-top-1/2 spiffy-tw--translate-y-1/2", children: _jsx(MagnifyingGlassStarVariant, { className: value.length > 0 ? magnifyingGlassClassesActive : magnifyingGlassClassesInactive, stroke: iconColor, strokeWidth: "1px" }) }), _jsx(TextInput, { value: value, onChange: (event) => onChange(event.target.value), onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, placeholder: placeholder, className: inputClasses, placeholderVariant: placeholderVariant, "aria-label": "Search", "aria-autocomplete": "list", "aria-expanded": !!suggestions && suggestions.length > 0, "aria-controls": "autocomplete-results", "aria-activedescendant": ariaActivedescendant, borderRadius: "xl", borderColorClass: borderColor, ref: localInputRef }), value && (_jsx("button", { onClick: () => {
35
- onChange('');
36
- localInputRef.current?.focus();
37
- }, className: "spiffy-tw-absolute spiffy-tw-right-5 spiffy-tw-top-1/2 spiffy-tw--translate-y-1/2 spiffy-tw-text-neutral-500 hover:spiffy-tw-text-neutral-700", "aria-label": "Clear search input", type: "button", children: _jsx(CloseIcon, { className: closeButtonIconClassName }) }))] }));
38
- });
@@ -1,13 +0,0 @@
1
- import type { TextStyleVariantMap } from '../../../components/common/Text/textVariantClasses';
2
- import type { SearchInputVariant } from '../SearchInputForm/types';
3
- interface SearchInputVariantClasses {
4
- searchInputIconColor: string;
5
- searchInputBorderColor: string;
6
- searchInputCloseIconClasses: string;
7
- searchInputActiveStarClasses: string;
8
- autocompleteIconColor: string;
9
- searchInputClasses: string;
10
- placeholderVariant: keyof typeof TextStyleVariantMap;
11
- }
12
- export declare const searchInputVariantClasses: Record<SearchInputVariant, SearchInputVariantClasses>;
13
- export {};
@@ -1,12 +0,0 @@
1
- import { ColorNames, colorVar } from '../../../components/models/colorsConfig';
2
- export const searchInputVariantClasses = {
3
- standard: {
4
- searchInputIconColor: 'transparent', // colorVar(ColorNames.TextSecondary),
5
- searchInputBorderColor: 'spiffy-tw-border-[--spiffy-colors-border-medium]',
6
- searchInputCloseIconClasses: '[&>circle]:spiffy-tw-fill-[--spiffy-colors-text-secondary] [&>path]:spiffy-tw-fill-[#fff]',
7
- searchInputActiveStarClasses: `first:[&>path]:spiffy-tw-stroke-[--spiffy-colors-accent-primary] first:[&>path]:spiffy-tw-fill-[--spiffy-colors-accent-primary]`,
8
- autocompleteIconColor: colorVar(ColorNames.BackgroundPrimary),
9
- searchInputClasses: 'spiffy-tw-text-[--spiffy-colors-text-primary] placeholder:spiffy-tw-text-[--spiffy-colors-text-secondary] spiffy-tw-text-[16px] spiffy-tw-font-normal spiffy-tw-leading-[148%] placeholder:spiffy-tw-font-medium placeholder:spiffy-tw-leading-[124%]',
10
- placeholderVariant: 'h2',
11
- },
12
- };
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- interface GlobalSearchAutocompleteProps {
3
- id: string;
4
- results: string[];
5
- focusedIndex: number;
6
- onSuggestionSelect: (suggestion: string, rankPosition: number) => void;
7
- iconColor?: string;
8
- }
9
- export declare const SearchAutocomplete: React.FC<GlobalSearchAutocompleteProps>;
10
- export {};
@@ -1,14 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { motion } from 'framer-motion';
3
- import classNames from 'classnames';
4
- import OutlinedStar from '@envive-ai/react-icons/src/OutlinedStar';
5
- export const SearchAutocomplete = ({ id, results, focusedIndex, onSuggestionSelect, iconColor, }) => {
6
- if (results.length === 0) {
7
- return null;
8
- }
9
- return (_jsx(motion.div, { className: "spiffy-tw-h-full", initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 }, transition: { duration: 0.2 }, children: _jsx("ul", { id: id, role: "listbox", className: "spiffy-tw-mt-4 spiffy-tw-space-y-2", children: results.map((result, index) => (_jsxs("li", { id: `option-${index}`, role: "option", "aria-selected": index === focusedIndex, className: classNames('spiffy-tw-flex spiffy-tw-items-center spiffy-tw-cursor-pointer spiffy-tw-py-1', { 'spiffy-tw-bg-neutral-200': index === focusedIndex }, 'hover:spiffy-tw-bg-neutral-100'), onClick: () => onSuggestionSelect(result, index), onKeyDown: (event) => {
10
- if (event.key === 'Enter' || event.keyCode === 13) {
11
- onSuggestionSelect(result, index);
12
- }
13
- }, children: [_jsx(OutlinedStar, { className: "spiffy-tw-w-[16px] spiffy-tw-h-[16px] spiffy-tw-mr-2", fill: iconColor }), _jsx("span", { className: "spiffy-tw-font-bold", children: result })] }, index))) }) }));
14
- };
@@ -1,16 +0,0 @@
1
- import type { SearchInputVariant } from './types';
2
- interface SearchInputFormProps {
3
- searchInputVariant: SearchInputVariant;
4
- searchText: string;
5
- autocompleteResults: string[];
6
- searchBoxPlaceholder: string;
7
- focusedOptionId: string | undefined;
8
- isDirty: boolean;
9
- focusedIndex: number;
10
- onKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
11
- onAutocompleteSelect: (suggestion: string) => void;
12
- onSearchInputChange: (value: string) => void;
13
- onSearchSubmit: () => void;
14
- }
15
- export declare const SearchInputForm: ({ searchInputVariant, searchText, autocompleteResults, searchBoxPlaceholder, focusedOptionId, isDirty, focusedIndex, onKeyDown, onAutocompleteSelect, onSearchInputChange, onSearchSubmit, }: SearchInputFormProps) => import("react/jsx-runtime").JSX.Element;
16
- export {};
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { SearchAutocomplete } from '../SearchInputAutocomplete/SearchAutocomplete';
3
- import { searchInputVariantClasses } from '../SearchInput/searchInputVariants';
4
- import { SearchInput } from '../SearchInput/SearchInput';
5
- export const SearchInputForm = ({ searchInputVariant, searchText, autocompleteResults, searchBoxPlaceholder, focusedOptionId, isDirty, focusedIndex, onKeyDown, onAutocompleteSelect, onSearchInputChange, onSearchSubmit, }) => {
6
- const { searchInputIconColor } = searchInputVariantClasses[searchInputVariant];
7
- return (_jsxs(_Fragment, { children: [_jsx("form", { onSubmit: (e) => {
8
- e.preventDefault();
9
- onSearchSubmit();
10
- }, className: "spiffy-tw-grow", children: _jsx(SearchInput, { value: searchText, placeholder: searchBoxPlaceholder, suggestions: autocompleteResults, ariaActivedescendant: focusedOptionId, searchInputVariant: searchInputVariant,
11
- // dataTestId={SEARCH_INPUT_TESTID}
12
- onKeyDown: onKeyDown, onChange: onSearchInputChange }) }), isDirty && (_jsx(SearchAutocomplete, { id: "autocomplete-results", results: autocompleteResults, focusedIndex: focusedIndex, iconColor: searchInputIconColor, onSuggestionSelect: onAutocompleteSelect }))] }));
13
- };
@@ -1 +0,0 @@
1
- export type SearchInputVariant = 'standard';
@@ -1 +0,0 @@
1
- export {};
@@ -1,14 +0,0 @@
1
- import type { SearchFilter as SearchFilterType, SelectFilterItem } from '../SearchFilter/types';
2
- import type { SearchFilterSidebarVariant } from './types';
3
- export type SearchResultsFilterProps = {
4
- productCount: number;
5
- isOpen: boolean;
6
- setIsOpen: (isOpen: boolean) => void;
7
- searchFilters: SearchFilterType[];
8
- searchFilterSidebarVariant: SearchFilterSidebarVariant;
9
- searchText: string;
10
- onSelectFilterItem: SelectFilterItem;
11
- onClearAllFilters: () => void;
12
- filterButtonText: string;
13
- };
14
- export declare const SearchResultsFilter: ({ productCount, isOpen, setIsOpen, searchFilters, searchFilterSidebarVariant, onSelectFilterItem, onClearAllFilters, filterButtonText, }: SearchResultsFilterProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useCallback } from 'react';
3
- import { SearchFilter } from '../SearchFilter/SearchFilter';
4
- import { SearchFilterHeader } from '../SearchFilter/SearchFilterHeader';
5
- import { searchFilterSidebarVariantClasses } from './searchFilterSidebarVariants';
6
- import { ButtonBase } from '../../../components/common/ButtonBase/ButtonBase';
7
- export const SearchResultsFilter = ({ productCount, isOpen, setIsOpen, searchFilters, searchFilterSidebarVariant, onSelectFilterItem, onClearAllFilters, filterButtonText, }) => {
8
- const { applyFiltersUnchangedClasses, applyFiltersChangedClasses, searchFilterHeaderClasses, radioButtonFillColor, radioButtonHoverColor, radioButtonUncheckedBorderColor, filterCloseIconVariant, } = searchFilterSidebarVariantClasses[searchFilterSidebarVariant];
9
- const openFilter = useCallback(() => {
10
- setIsOpen(true);
11
- }, [setIsOpen]);
12
- return (_jsxs(_Fragment, { children: [_jsx(SearchFilter, { isOpen: isOpen, setIsOpen: setIsOpen, filters: searchFilters, productCount: productCount, selectFilterItem: onSelectFilterItem, clearAllFilters: onClearAllFilters, applyFiltersUnchangedClasses: applyFiltersUnchangedClasses, applyFiltersChangedClasses: applyFiltersChangedClasses, filterButtonText: filterButtonText, radioButtonFillColor: radioButtonFillColor, radioButtonHoverColor: radioButtonHoverColor, radioButtonUncheckedBorderColor: radioButtonUncheckedBorderColor, filterCloseIconVariant: filterCloseIconVariant, headerContent: _jsx(SearchFilterHeader, { closeModal: () => setIsOpen(false), productCount: productCount, headerClassName: searchFilterHeaderClasses, filterCloseIconVariant: filterCloseIconVariant }) }), _jsx(ButtonBase, { onClick: openFilter,
13
- // icon={SettingsVariant} // Icon is handled by user
14
- iconClass: "spiffy-tw-w-[28px] spiffy-tw-h-[28px] spiffy-tw-object-center", text: filterButtonText, textClass: "spiffy-tw-uppercase spiffy-tw-text-[--spiffy-colors-text-primary] spiffy-tw-hidden md:spiffy-tw-block", buttonClass: "spiffy-tw-flex-row spiffy-tw-pl-[16px] sm:spiffy-tw-pl-0 sm:spiffy-tw-px-4 sm:spiffy-tw-gap-[8px]", disablePadding: true })] }));
15
- };
@@ -1,16 +0,0 @@
1
- import type { SearchFilterSidebarVariant, CloseIconVariant } from './types';
2
- interface SearchFilterSidebarVariantClasses {
3
- searchFilterHeaderClasses: string;
4
- radioButtonFillColor: string;
5
- radioButtonHoverColor: string;
6
- radioButtonUncheckedBorderColor: string;
7
- filterDefaultClasses: string;
8
- filterActiveClasses: string;
9
- filterHoverClasses: string;
10
- appliedFilterBackgroundClasses: string;
11
- applyFiltersUnchangedClasses: string;
12
- applyFiltersChangedClasses: string;
13
- filterCloseIconVariant: CloseIconVariant;
14
- }
15
- export declare const searchFilterSidebarVariantClasses: Record<SearchFilterSidebarVariant, SearchFilterSidebarVariantClasses>;
16
- export {};
@@ -1,29 +0,0 @@
1
- import { ColorNames, colorVar } from '../../../components/models/colorsConfig';
2
- export const searchFilterSidebarVariantClasses = {
3
- darkButton: {
4
- radioButtonFillColor: colorVar(ColorNames.BackgroundDark),
5
- radioButtonHoverColor: colorVar(ColorNames.BackgroundSecondaryDark),
6
- radioButtonUncheckedBorderColor: colorVar(ColorNames.BorderMedium),
7
- searchFilterHeaderClasses: 'spiffy-tw-text-[--spiffy-colors-text-light]',
8
- filterDefaultClasses: 'spiffy-tw-border-[--spiffy-colors-border-medium] spiffy-tw-bg-[--spiffy-colors-background-light] spiffy-tw-text-[--spiffy-colors-text-secondary]',
9
- filterHoverClasses: 'hover:spiffy-tw-border-[--spiffy-colors-background-secondary-dark] hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark] hover:spiffy-tw-text-[--spiffy-colors-text-primary]',
10
- filterActiveClasses: 'spiffy-tw-border-[--spiffy-colors-border-outline] spiffy-tw-bg-[--spiffy-colors-background-dark] spiffy-tw-text-[--spiffy-colors-text-light]',
11
- appliedFilterBackgroundClasses: 'spiffy-tw-bg-[--spiffy-colors-border-light]',
12
- applyFiltersUnchangedClasses: 'spiffy-tw-bg-[--spiffy-colors-border-light] spiffy-tw-text-[--spiffy-colors-text-secondary]',
13
- applyFiltersChangedClasses: 'spiffy-tw-bg-[--spiffy-colors-background-dark] spiffy-tw-text-[--spiffy-colors-text-light]',
14
- filterCloseIconVariant: 'light',
15
- },
16
- lightButton: {
17
- radioButtonFillColor: colorVar(ColorNames.BackgroundDark),
18
- radioButtonHoverColor: colorVar(ColorNames.BackgroundSecondaryDark),
19
- radioButtonUncheckedBorderColor: colorVar(ColorNames.BorderMedium),
20
- searchFilterHeaderClasses: 'spiffy-tw-text-[--spiffy-colors-text-primary]',
21
- filterDefaultClasses: 'spiffy-tw-border-[--spiffy-colors-border-medium] spiffy-tw-bg-[--spiffy-colors-background-light] spiffy-tw-text-[--spiffy-colors-text-secondary]',
22
- filterHoverClasses: 'hover:spiffy-tw-border-[--spiffy-colors-background-secondary-dark] hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark] hover:spiffy-tw-text-[--spiffy-colors-text-primary]',
23
- filterActiveClasses: 'spiffy-tw-border-[--spiffy-colors-border-outline] spiffy-tw-bg-[--spiffy-colors-background-dark] spiffy-tw-text-[--spiffy-colors-text-light]',
24
- appliedFilterBackgroundClasses: 'spiffy-tw-bg-[--spiffy-colors-border-light]',
25
- applyFiltersUnchangedClasses: 'spiffy-tw-bg-[--spiffy-colors-border-light] spiffy-tw-text-[--spiffy-colors-text-secondary]',
26
- applyFiltersChangedClasses: 'spiffy-tw-bg-[--spiffy-colors-background-primary] spiffy-tw-text-[--spiffy-colors-text-link]',
27
- filterCloseIconVariant: 'dark',
28
- },
29
- };
@@ -1,2 +0,0 @@
1
- export type SearchFilterSidebarVariant = 'darkButton' | 'lightButton';
2
- export type CloseIconVariant = 'light' | 'tertiary' | 'dark';
@@ -1,8 +0,0 @@
1
- interface NoSearchResultsFoundProps {
2
- containerPaddingClasses: string;
3
- includeBottomMargin?: boolean;
4
- noResultsFoundText?: string;
5
- sparkleIconColor?: string;
6
- }
7
- export declare const NoSearchResultsFound: ({ containerPaddingClasses, includeBottomMargin, noResultsFoundText, sparkleIconColor, }: NoSearchResultsFoundProps) => import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import classNames from 'classnames';
3
- import Sparkles from '@envive-ai/react-icons/src/Sparkles';
4
- import { Text } from '../../../components/common/Text/Text';
5
- export const NoSearchResultsFound = ({ containerPaddingClasses, includeBottomMargin = false, noResultsFoundText, sparkleIconColor = 'var(--spiffy-colors-accent-primary)', }) => {
6
- const containerClasses = classNames(containerPaddingClasses, includeBottomMargin ? 'spiffy-tw-mb-[100vh]' : '', 'spiffy-tw-mt-6');
7
- const textPrompt = noResultsFoundText ||
8
- 'I’m sorry, I wasn’t able to find an exact match. Try changing your filters or adjusting your search query.';
9
- return (_jsx("div", { className: containerClasses, children: _jsxs("div", { className: "spiffy-tw-flex spiffy-tw-items-start spiffy-tw-gap-2", children: [_jsx("div", { children: _jsx(Sparkles, { className: "spiffy-tw-w-[24px] spiffy-tw-h-[24px]", style: { color: sparkleIconColor } }) }), _jsx(Text, { variant: "body2", children: textPrompt })] }) }));
10
- };
@@ -1,24 +0,0 @@
1
- import type { SelectedFilterOption } from '../../../atoms/search/types';
2
- import type { SearchResponseProduct } from '../../../types/external';
3
- import type { SearchFilterSidebarVariant } from '../SearchResultsFilterSidebar/types';
4
- import { ProductGridVariant } from '../../../components/common/ProductCard/types';
5
- interface SearchResultsGridProps {
6
- productList: SearchResponseProduct[];
7
- availableDynamicFilters: {
8
- name: string;
9
- displayName: string;
10
- }[];
11
- searchFilterSidebarVariant: SearchFilterSidebarVariant;
12
- productGridVariant: ProductGridVariant;
13
- selectedFilterOptions: SelectedFilterOption[];
14
- searchResponseId: string;
15
- containerXPaddingClasses: string;
16
- productGridClasses: string;
17
- onRemoveFilter: (filter: SelectedFilterOption) => void;
18
- onToggleDynamicFilter: ({ filter, dynamicFilterDisplayName, }: {
19
- filter: string;
20
- dynamicFilterDisplayName: string;
21
- }) => void;
22
- }
23
- export declare const SearchResultsGrid: ({ productList, availableDynamicFilters, searchFilterSidebarVariant, productGridVariant, selectedFilterOptions, searchResponseId, containerXPaddingClasses, productGridClasses, onRemoveFilter, onToggleDynamicFilter, }: SearchResultsGridProps) => import("react/jsx-runtime").JSX.Element;
24
- export {};
@@ -1,19 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { motion } from 'framer-motion';
3
- import classNames from 'classnames';
4
- import { ProductGrid } from '../../../components/common/ProductGrid/ProductGrid';
5
- import { AppliedFiltersScrollbar } from '../FilterScrollbar/AppliedFiltersScrollbar';
6
- import { DynamicFiltersScrollbar } from '../FilterScrollbar/DynamicFiltersScrollbar';
7
- import { searchFilterSidebarVariantClasses } from '../SearchResultsFilterSidebar/searchFilterSidebarVariants';
8
- export const SearchResultsGrid = ({ productList, availableDynamicFilters, searchFilterSidebarVariant, productGridVariant, selectedFilterOptions, searchResponseId, containerXPaddingClasses, productGridClasses, onRemoveFilter, onToggleDynamicFilter, }) => {
9
- const sharedFilterBarClasses = classNames('spiffy-suggestion-bar', 'spiffy-tw-no-scrollbar', 'spiffy-tw-flex', 'spiffy-tw-flex-row', 'spiffy-tw-gap-2', 'spiffy-tw-mb-[16px]', 'spiffy-tw-overflow-x-scroll', containerXPaddingClasses);
10
- const filterBarClasses = classNames(sharedFilterBarClasses, 'spiffy-tw-mt-[24px]');
11
- const appliedFilterBarClasses = classNames(sharedFilterBarClasses, 'spiffy-tw-mb-[32px]', 'spiffy-tw-mt-[8px]');
12
- const {
13
- // We may want to pull these into their own variant separated from the filter sidebar (but also used in it) In this case, we need them for dynamic filters
14
- filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses, } = searchFilterSidebarVariantClasses[searchFilterSidebarVariant];
15
- return (_jsxs(motion.div, { className: "spiffy-tw-justify-center spiffy-tw-w-full spiffy-tw-overflow-hidden", initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2 }, children: [_jsx(AppliedFiltersScrollbar, { selectedFilterOptions: selectedFilterOptions, filterBarClassNames: appliedFilterBarClasses, filterDefaultClasses: filterDefaultClasses, filterHoverClasses: filterHoverClasses, appliedFilterBackgroundClasses: appliedFilterBackgroundClasses, onRemoveFilter: onRemoveFilter }), _jsx(DynamicFiltersScrollbar, { availableDynamicFilters: availableDynamicFilters, filterBarClassNames: filterBarClasses, filterDefaultClasses: filterDefaultClasses, filterHoverClasses: filterHoverClasses, onToggleDynamicFilter: onToggleDynamicFilter }), _jsx(ProductGrid, { productList: productList, productGridVariant: productGridVariant, productGridClasses: productGridClasses, searchResponseId: searchResponseId, merchantShortName: '', handleClick: function (clickedUrl) {
16
- console.log(clickedUrl);
17
- throw new Error('Function not implemented.');
18
- } })] }));
19
- };
@@ -1,6 +0,0 @@
1
- import { ProductGridVariant } from '../../../components/common/ProductCard/types';
2
- export declare const SearchResultsLoadingGrid: ({ productGridVariant, productGridClasses, sparkleIconColor, }: {
3
- productGridVariant: ProductGridVariant;
4
- productGridClasses: string;
5
- sparkleIconColor?: string;
6
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Text } from '../../../components/common/Text/Text';
3
- import { SparkleAnimation } from '../../../components/common/SparkleAnimation/SparkleAnimation';
4
- import { motion } from 'framer-motion';
5
- import { ProductCardSkeleton } from '../../../components/common/ProductCard/ProductCardSkeleton';
6
- import { productGridVariantClasses } from '../../../components/common/ProductGrid/productGridVariants';
7
- export const SearchResultsLoadingGrid = ({ productGridVariant, productGridClasses, sparkleIconColor = 'var(--spiffy-colors-accent-primary)', }) => {
8
- const { productCardLayoutVariant, productCardImageAspectRatio } = productGridVariantClasses[productGridVariant];
9
- return (_jsx(motion.div, { className: "spiffy-tw-justify-center spiffy-tw-w-full spiffy-tw-overflow-hidden", initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2 }, children: _jsxs("div", { className: "spiffy-tw-mt-6 spiffy-tw-w-full", children: [_jsx("div", { className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-mb-4", children: _jsxs("div", { className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-2 spiffy-tw-ml-[16px] md:spiffy-tw-ml-[80px]", children: [_jsx("div", { className: "spiffy-tw-width-[24px]", children: _jsx(SparkleAnimation, { color: sparkleIconColor, animate: true }) }), _jsx(Text, { variant: "body2", children: "Finding the best options for you..." })] }) }), _jsx("div", { className: productGridClasses, children: Array.from({ length: 8 }).map((_, index) => (_jsx(ProductCardSkeleton, { layoutVariant: productCardLayoutVariant, aspectRatio: productCardImageAspectRatio, growWithContainer: true }, index))) })] }) }));
10
- };
@@ -1,5 +0,0 @@
1
- export declare enum SearchResultsState {
2
- NoResults = "noResults",
3
- Results = "results",
4
- Loading = "loading"
5
- }
@@ -1,6 +0,0 @@
1
- export var SearchResultsState;
2
- (function (SearchResultsState) {
3
- SearchResultsState["NoResults"] = "noResults";
4
- SearchResultsState["Results"] = "results";
5
- SearchResultsState["Loading"] = "loading";
6
- })(SearchResultsState || (SearchResultsState = {}));
@@ -1,3 +0,0 @@
1
- export interface TestProps {
2
- dataTestId?: string;
3
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,21 +0,0 @@
1
- export declare enum ChatElementDisplayLocation {
2
- IN_CHAT = "in_chat",
3
- CHAT_PREVIEW = "chat_preview",
4
- FLOATING_BUTTON = "floating_button",
5
- HELP_ME_CHOOSE = "help_me_choose",
6
- PLP_IMAGE_BANNER = "plp_image_banner",
7
- TOP_REVIEWS_SNIPPET = "top_reviews_snippet",
8
- BOTTOM_REVIEWS_SNIPPET = "bottom_reviews_snippet",
9
- BLOCK_BACK_BUTTON = "block_back_button",
10
- SWITCH_TO_AGENT = "switch_to_agent",
11
- CONVERSATIONAL_SEARCH = "conversational_search",
12
- GLOBAL_SEARCH_ENTRYPOINT = "global_search_entrypoint",
13
- SEARCH_NAV_ENTRYPOINT = "search_nav_entrypoint",
14
- SEARCH_PROMPT = "search_prompt",
15
- SEARCH_PROMPT_BUTTON = "search_prompt_button",
16
- PRODUCT_GRID = "product_grid",
17
- UNSPECIFIED = "unspecified",
18
- FILTER_MODAL = "filter_modal",
19
- PROMPT_CARD = "prompt_card",
20
- WINDOW_API_CALL = "window_api_call"
21
- }
@@ -1,23 +0,0 @@
1
- // Chat element display location enum
2
- export var ChatElementDisplayLocation;
3
- (function (ChatElementDisplayLocation) {
4
- ChatElementDisplayLocation["IN_CHAT"] = "in_chat";
5
- ChatElementDisplayLocation["CHAT_PREVIEW"] = "chat_preview";
6
- ChatElementDisplayLocation["FLOATING_BUTTON"] = "floating_button";
7
- ChatElementDisplayLocation["HELP_ME_CHOOSE"] = "help_me_choose";
8
- ChatElementDisplayLocation["PLP_IMAGE_BANNER"] = "plp_image_banner";
9
- ChatElementDisplayLocation["TOP_REVIEWS_SNIPPET"] = "top_reviews_snippet";
10
- ChatElementDisplayLocation["BOTTOM_REVIEWS_SNIPPET"] = "bottom_reviews_snippet";
11
- ChatElementDisplayLocation["BLOCK_BACK_BUTTON"] = "block_back_button";
12
- ChatElementDisplayLocation["SWITCH_TO_AGENT"] = "switch_to_agent";
13
- ChatElementDisplayLocation["CONVERSATIONAL_SEARCH"] = "conversational_search";
14
- ChatElementDisplayLocation["GLOBAL_SEARCH_ENTRYPOINT"] = "global_search_entrypoint";
15
- ChatElementDisplayLocation["SEARCH_NAV_ENTRYPOINT"] = "search_nav_entrypoint";
16
- ChatElementDisplayLocation["SEARCH_PROMPT"] = "search_prompt";
17
- ChatElementDisplayLocation["SEARCH_PROMPT_BUTTON"] = "search_prompt_button";
18
- ChatElementDisplayLocation["PRODUCT_GRID"] = "product_grid";
19
- ChatElementDisplayLocation["UNSPECIFIED"] = "unspecified";
20
- ChatElementDisplayLocation["FILTER_MODAL"] = "filter_modal";
21
- ChatElementDisplayLocation["PROMPT_CARD"] = "prompt_card";
22
- ChatElementDisplayLocation["WINDOW_API_CALL"] = "window_api_call";
23
- })(ChatElementDisplayLocation || (ChatElementDisplayLocation = {}));
@@ -1,45 +0,0 @@
1
- export { ButtonBase } from './components/common/ButtonBase/ButtonBase';
2
- export { Headline } from './components/common/Headline/Headline';
3
- export { ImageWithFallback } from './components/common/ImageWithFallback/ImageWithFallback';
4
- export { ProductCard } from './components/common/ProductCard/ProductCard';
5
- export { ProductCardSkeleton } from './components/common/ProductCard/ProductCardSkeleton';
6
- export { ProductGrid } from './components/common/ProductGrid/ProductGrid';
7
- export { SparkleAnimation } from './components/common/SparkleAnimation/SparkleAnimation';
8
- export { Spinner } from './components/common/Spinner/Spinner';
9
- export { SuggestionButton } from './components/common/SuggestionButton/SuggestionButton';
10
- export { Text } from './components/common/Text/Text';
11
- export { TextInput } from './components/common/TextInput/TextInput';
12
- export { AppliedFiltersScrollbar } from './components/search/FilterScrollbar/AppliedFiltersScrollbar';
13
- export { DynamicFiltersScrollbar } from './components/search/FilterScrollbar/DynamicFiltersScrollbar';
14
- export { SearchFilter } from './components/search/SearchFilter/SearchFilter';
15
- export { SearchFilterHeader } from './components/search/SearchFilter/SearchFilterHeader';
16
- export { SearchFilterItem } from './components/search/SearchFilter/SearchFilterItem';
17
- export { SearchInput } from './components/search/SearchInput/SearchInput';
18
- export { SearchAutocomplete } from './components/search/SearchInputAutocomplete/SearchAutocomplete';
19
- export { SearchInputForm } from './components/search/SearchInputForm/SearchInputForm';
20
- export { SearchResultsFilter } from './components/search/SearchResultsFilterSidebar/SearchResultsFilter';
21
- export { NoSearchResultsFound } from './components/search/SearchResultsStates/NoSearchResultsFound';
22
- export { SearchResultsGrid } from './components/search/SearchResultsStates/SearchResultsGrid';
23
- export { SearchResultsLoadingGrid } from './components/search/SearchResultsStates/SearchResultsLoadingGrid';
24
- export * from './util/camelCase';
25
- export * from './util/camelCasedPropertiesDeep';
26
- export * from './util/formatPrice';
27
- export * from './util/internal';
28
- export * from './util/primitive';
29
- export * from './util/splitWords';
30
- export * from './util/trim';
31
- export * from './util/unknownArray';
32
- export * from './components/common/ButtonBase/types';
33
- export * from './components/common/ProductCard/types';
34
- export * from './components/common/SparkleAnimation/types';
35
- export * from './components/common/SuggestionButton/types';
36
- export * from './components/common/Text/types';
37
- export type { HeadlineProps, HeadlineVariant } from './components/common/Text/types';
38
- export * from './components/search/types';
39
- export * from './components/search/SearchFilter/types';
40
- export * from './components/search/SearchInputForm/types';
41
- export type { SearchFilterSidebarVariant, CloseIconVariant as CloseIconVariantType, } from './components/search/SearchResultsFilterSidebar/types';
42
- export * from './atoms/search/types';
43
- export { ChatElementDisplayLocation } from './config/chatElementDisplayLocation';
44
- export { productGridVariantClasses } from './components/common/ProductGrid/productGridVariants';
45
- export { searchFilterSidebarVariantClasses } from './components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants';
package/dist/src/index.js DELETED
@@ -1,49 +0,0 @@
1
- // Common Components
2
- export { ButtonBase } from './components/common/ButtonBase/ButtonBase';
3
- export { Headline } from './components/common/Headline/Headline';
4
- export { ImageWithFallback } from './components/common/ImageWithFallback/ImageWithFallback';
5
- export { ProductCard } from './components/common/ProductCard/ProductCard';
6
- export { ProductCardSkeleton } from './components/common/ProductCard/ProductCardSkeleton';
7
- export { ProductGrid } from './components/common/ProductGrid/ProductGrid';
8
- export { SparkleAnimation } from './components/common/SparkleAnimation/SparkleAnimation';
9
- export { Spinner } from './components/common/Spinner/Spinner';
10
- export { SuggestionButton } from './components/common/SuggestionButton/SuggestionButton';
11
- export { Text } from './components/common/Text/Text';
12
- export { TextInput } from './components/common/TextInput/TextInput';
13
- // Search Components
14
- export { AppliedFiltersScrollbar } from './components/search/FilterScrollbar/AppliedFiltersScrollbar';
15
- export { DynamicFiltersScrollbar } from './components/search/FilterScrollbar/DynamicFiltersScrollbar';
16
- export { SearchFilter } from './components/search/SearchFilter/SearchFilter';
17
- export { SearchFilterHeader } from './components/search/SearchFilter/SearchFilterHeader';
18
- export { SearchFilterItem } from './components/search/SearchFilter/SearchFilterItem';
19
- export { SearchInput } from './components/search/SearchInput/SearchInput';
20
- export { SearchAutocomplete } from './components/search/SearchInputAutocomplete/SearchAutocomplete';
21
- export { SearchInputForm } from './components/search/SearchInputForm/SearchInputForm';
22
- export { SearchResultsFilter } from './components/search/SearchResultsFilterSidebar/SearchResultsFilter';
23
- export { NoSearchResultsFound } from './components/search/SearchResultsStates/NoSearchResultsFound';
24
- export { SearchResultsGrid } from './components/search/SearchResultsStates/SearchResultsGrid';
25
- export { SearchResultsLoadingGrid } from './components/search/SearchResultsStates/SearchResultsLoadingGrid';
26
- // Utilities
27
- export * from './util/camelCase';
28
- export * from './util/camelCasedPropertiesDeep';
29
- export * from './util/formatPrice';
30
- export * from './util/internal';
31
- export * from './util/primitive';
32
- export * from './util/splitWords';
33
- export * from './util/trim';
34
- export * from './util/unknownArray';
35
- // Types
36
- export * from './components/common/ButtonBase/types';
37
- export * from './components/common/ProductCard/types';
38
- export * from './components/common/SparkleAnimation/types';
39
- export * from './components/common/SuggestionButton/types';
40
- export * from './components/common/Text/types';
41
- export * from './components/search/types';
42
- export * from './components/search/SearchFilter/types';
43
- export * from './components/search/SearchInputForm/types';
44
- export * from './atoms/search/types';
45
- // Config exports
46
- export { ChatElementDisplayLocation } from './config/chatElementDisplayLocation';
47
- // Variants
48
- export { productGridVariantClasses } from './components/common/ProductGrid/productGridVariants';
49
- export { searchFilterSidebarVariantClasses } from './components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants';
@@ -1,7 +0,0 @@
1
- declare class Logger {
2
- static logInfo(message: string, ...args: unknown[]): void;
3
- static logDebug(message: string, ...args: unknown[]): void;
4
- static logError(message: string, error: unknown | undefined, ...args: unknown[]): void;
5
- static logWarn(message: string, error: unknown | undefined, ...args: unknown[]): void;
6
- }
7
- export default Logger;
@@ -1,16 +0,0 @@
1
- /* eslint-disable no-console */
2
- class Logger {
3
- static logInfo(message, ...args) {
4
- console.info(`INFO: ${message}`, ...args);
5
- }
6
- static logDebug(message, ...args) {
7
- console.debug(`DEBUG: ${message}`, ...args);
8
- }
9
- static logError(message, error, ...args) {
10
- console.error(`ERROR: ${message} error=${error}`, args);
11
- }
12
- static logWarn(message, error, ...args) {
13
- console.warn(`WARN: ${message} error=${error}`, args);
14
- }
15
- }
16
- export default Logger;
@@ -1,21 +0,0 @@
1
- export declare enum ResponseCategory {
2
- Product = "product"
3
- }
4
- export interface SearchResponseProduct {
5
- id: string;
6
- title: string;
7
- description?: string;
8
- price?: number;
9
- currency?: string;
10
- imageUrl?: string;
11
- brand?: string;
12
- category?: string;
13
- availability?: string;
14
- url?: string;
15
- responseId?: string;
16
- originalPrice?: number;
17
- salePrice?: number;
18
- averageRating?: number;
19
- numberReviews?: number;
20
- [key: string]: unknown;
21
- }
@@ -1,5 +0,0 @@
1
- // Local type definitions for external dependencies that may not be available
2
- export var ResponseCategory;
3
- (function (ResponseCategory) {
4
- ResponseCategory["Product"] = "product";
5
- })(ResponseCategory || (ResponseCategory = {}));
@@ -1,65 +0,0 @@
1
- import type { SplitWords } from './splitWords';
2
- /**
3
- * CamelCase options.
4
- *
5
- * @see {@link CamelCase}
6
- */
7
- export type CamelCaseOptions = {
8
- /**
9
- * Whether to preserved consecutive uppercase letter.
10
- *
11
- * @default true
12
- */
13
- preserveConsecutiveUppercase?: boolean;
14
- };
15
- /**
16
- * Convert an array of words to camel-case.
17
- */
18
- type CamelCaseFromArray<Words extends string[], Options extends CamelCaseOptions, OutputString extends string = ''> = Words extends [infer FirstWord extends string, ...infer RemainingWords extends string[]] ? Options['preserveConsecutiveUppercase'] extends true ? `${Capitalize<FirstWord>}${CamelCaseFromArray<RemainingWords, Options>}` : `${Capitalize<Lowercase<FirstWord>>}${CamelCaseFromArray<RemainingWords, Options>}` : OutputString;
19
- /**
20
- * Convert a string literal to camel-case.
21
- *
22
- * This can be useful when, for example, converting some kebab-cased command-line flags or a snake-cased database result.
23
- *
24
- * By default, consecutive uppercase letter are preserved. See {@link CamelCaseOptions.preserveConsecutiveUppercase preserveConsecutiveUppercase} option to change this behaviour.
25
- *
26
- * @example
27
- * ```
28
- * import type {CamelCase} from 'type-fest';
29
- *
30
- * // Simple
31
- *
32
- * const someVariable: CamelCase<'foo-bar'> = 'fooBar';
33
- *
34
- * // Advanced
35
- *
36
- * type CamelCasedProperties<T> = {
37
- * [K in keyof T as CamelCase<K>]: T[K]
38
- * };
39
- *
40
- * interface RawOptions {
41
- * 'dry-run': boolean;
42
- * 'full_family_name': string;
43
- * foo: number;
44
- * BAR: string;
45
- * QUZ_QUX: number;
46
- * 'OTHER-FIELD': boolean;
47
- * }
48
- *
49
- * const dbResult: CamelCasedProperties<RawOptions> = {
50
- * dryRun: true,
51
- * fullFamilyName: 'bar.js',
52
- * foo: 123,
53
- * bar: 'foo',
54
- * quzQux: 6,
55
- * otherField: false
56
- * };
57
- * ```
58
- *
59
- * @category Change case
60
- * @category Template literal
61
- */
62
- export type CamelCase<Type, Options extends CamelCaseOptions = {
63
- preserveConsecutiveUppercase: true;
64
- }> = Type extends string ? string extends Type ? Type : Uncapitalize<CamelCaseFromArray<SplitWords<Type extends Uppercase<Type> ? Lowercase<Type> : Type>, Options>> : Type;
65
- export {};
@@ -1,2 +0,0 @@
1
- // these types come from https://github.com/sindresorhus/type-fest/blob/main/source/camel-case.d.ts
2
- export {};