@envive-ai/react-toolkit 0.1.4 → 0.1.5

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 (267) hide show
  1. package/dist/ButtonBase/index.cjs +6 -0
  2. package/dist/ButtonBase/index.d.cts +43 -0
  3. package/dist/{common/ButtonBase/ButtonBase.d.ts → ButtonBase/index.d.ts} +14 -6
  4. package/dist/ButtonBase/index.js +5 -0
  5. package/dist/{ButtonBase-C1rsL9gO.js → ButtonBase-CpmFsiUf.js} +4 -4
  6. package/dist/{ButtonBase-a8uj6c2f.cjs → ButtonBase-Dlh3bpR3.cjs} +9 -3
  7. package/dist/{AppliedFiltersScrollbar-BlcyhZkZ.cjs → DynamicFiltersScrollbar-D8Lms7Ox.cjs} +34 -2
  8. package/dist/{AppliedFiltersScrollbar-DFGzRemu.js → DynamicFiltersScrollbar-t_JASmYC.js} +29 -3
  9. package/dist/FilterScrollbar/index.cjs +6 -0
  10. package/dist/FilterScrollbar/index.d.cts +47 -0
  11. package/dist/FilterScrollbar/index.d.ts +47 -0
  12. package/dist/FilterScrollbar/index.js +5 -0
  13. package/dist/Headline/index.cjs +4 -0
  14. package/dist/{common/Headline/Headline.d.ts → Headline/index.d.cts} +3 -3
  15. package/dist/{common/Headline/Headline.d.cts → Headline/index.d.ts} +1 -1
  16. package/dist/Headline/index.js +4 -0
  17. package/dist/{Headline-8on6ZB9e.js → Headline-COAnonc2.js} +2 -2
  18. package/dist/{Headline-CcWn0w-a.cjs → Headline-CdddUGwy.cjs} +2 -2
  19. package/dist/ImageWithFallback/index.cjs +3 -0
  20. package/dist/{common/ImageWithFallback/ImageWithFallback.d.cts → ImageWithFallback/index.d.cts} +1 -1
  21. package/dist/{common/ImageWithFallback/ImageWithFallback.d.ts → ImageWithFallback/index.d.ts} +3 -3
  22. package/dist/ImageWithFallback/index.js +3 -0
  23. package/dist/{ImageWithFallback-ioeMFrTf.cjs → ImageWithFallback-By6QdlCR.cjs} +1 -1
  24. package/dist/{ImageWithFallback-gN5HDS9L.js → ImageWithFallback-DtUrq_bk.js} +1 -1
  25. package/dist/ProductCard/index.cjs +18 -0
  26. package/dist/{common/ProductCard/ProductCard.d.ts → ProductCard/index.d.cts} +26 -8
  27. package/dist/{common/ProductCard/ProductCard.d.cts → ProductCard/index.d.ts} +22 -4
  28. package/dist/ProductCard/index.js +9 -0
  29. package/dist/{ProductCard-C7WUShhN.cjs → ProductCard-CvTRvhm7.cjs} +77 -10
  30. package/dist/{ProductCard-B5wnOeR9.js → ProductCard-aJbQz6Q7.js} +50 -7
  31. package/dist/{ProductCardSkeleton-BPfp6IOp.js → ProductCardSkeleton-B6YetUCT.js} +9 -4
  32. package/dist/{ProductCardSkeleton-BgvDlaty.cjs → ProductCardSkeleton-BzBK36m-.cjs} +21 -4
  33. package/dist/ProductGrid/index.cjs +10 -0
  34. package/dist/ProductGrid/index.d.cts +36 -0
  35. package/dist/ProductGrid/index.d.ts +36 -0
  36. package/dist/ProductGrid/index.js +9 -0
  37. package/dist/{ProductGrid-DZgwGPSQ.cjs → ProductGrid-CSIH2_G9.cjs} +28 -4
  38. package/dist/{ProductGrid-wnSc9bXT.js → ProductGrid-NOCayW9O.js} +22 -4
  39. package/dist/{SearchAutocomplete-BrF2SMoZ.cjs → SearchAutocomplete-CQxxe5Op.cjs} +1 -1
  40. package/dist/{SearchAutocomplete-B8mO03Rr.js → SearchAutocomplete-DCu9-Yfk.js} +1 -1
  41. package/dist/SearchFilter/index.cjs +8 -0
  42. package/dist/SearchFilter/index.d.cts +35 -0
  43. package/dist/SearchFilter/index.d.ts +35 -0
  44. package/dist/SearchFilter/index.js +6 -0
  45. package/dist/SearchFilterHeader-BDEcDc_4.js +114 -0
  46. package/dist/SearchFilterHeader-qkRVfAB5.cjs +134 -0
  47. package/dist/SearchInput/index.cjs +7 -0
  48. package/dist/SearchInput/index.d.cts +33 -0
  49. package/dist/SearchInput/index.d.ts +33 -0
  50. package/dist/SearchInput/index.js +6 -0
  51. package/dist/{SearchInput-mLPisqFO.cjs → SearchInput-Cdpwswyv.cjs} +4 -4
  52. package/dist/{SearchInput-CzVUsUSb.js → SearchInput-DxGvYGZO.js} +4 -4
  53. package/dist/SearchInputAutocomplete/index.cjs +3 -0
  54. package/dist/{search/SearchInputAutocomplete/SearchAutocomplete.d.cts → SearchInputAutocomplete/index.d.cts} +1 -1
  55. package/dist/{search/SearchInputAutocomplete/SearchAutocomplete.d.ts → SearchInputAutocomplete/index.d.ts} +1 -1
  56. package/dist/SearchInputAutocomplete/index.js +3 -0
  57. package/dist/{search/SearchInputForm/SearchInputForm.cjs → SearchInputForm/index.cjs} +7 -7
  58. package/dist/{search/SearchInputForm/SearchInputForm.d.ts → SearchInputForm/index.d.cts} +5 -5
  59. package/dist/{search/SearchInputForm/SearchInputForm.d.cts → SearchInputForm/index.d.ts} +5 -5
  60. package/dist/{search/SearchInputForm/SearchInputForm.js → SearchInputForm/index.js} +6 -6
  61. package/dist/{search/SearchResultsFilterSidebar/SearchResultsFilter.cjs → SearchResultsFilterSidebar/index.cjs} +11 -12
  62. package/dist/SearchResultsFilterSidebar/index.d.cts +44 -0
  63. package/dist/SearchResultsFilterSidebar/index.d.ts +44 -0
  64. package/dist/{search/SearchResultsFilterSidebar/SearchResultsFilter.js → SearchResultsFilterSidebar/index.js} +8 -10
  65. package/dist/SearchResultsStates/index.cjs +127 -0
  66. package/dist/SearchResultsStates/index.d.cts +66 -0
  67. package/dist/SearchResultsStates/index.d.ts +66 -0
  68. package/dist/SearchResultsStates/index.js +120 -0
  69. package/dist/SparkleAnimation/index.cjs +4 -0
  70. package/dist/SparkleAnimation/index.d.cts +23 -0
  71. package/dist/SparkleAnimation/index.d.ts +23 -0
  72. package/dist/SparkleAnimation/index.js +3 -0
  73. package/dist/{SparkleAnimation-Qs17S1rn.js → SparkleAnimation-DfMCtvAQ.js} +3 -3
  74. package/dist/{SparkleAnimation-Ba5G4MIQ.cjs → SparkleAnimation-j-mAMEZZ.cjs} +8 -2
  75. package/dist/Spinner/index.cjs +3 -0
  76. package/dist/Spinner/index.d.cts +11 -0
  77. package/dist/Spinner/index.d.ts +11 -0
  78. package/dist/Spinner/index.js +3 -0
  79. package/dist/{Spinner-BZ-kTOpm.js → Spinner-D9kkaM9d.js} +1 -1
  80. package/dist/{Spinner-CfQ85Ajl.cjs → Spinner-DX35Epv3.cjs} +1 -1
  81. package/dist/{common/SuggestionButton/SuggestionButton.cjs → SuggestionButton/index.cjs} +7 -7
  82. package/dist/{common/SuggestionButton/SuggestionButton.d.cts → SuggestionButton/index.d.cts} +6 -6
  83. package/dist/{common/SuggestionButton/SuggestionButton.d.ts → SuggestionButton/index.d.ts} +6 -6
  84. package/dist/{common/SuggestionButton/SuggestionButton.js → SuggestionButton/index.js} +5 -5
  85. package/dist/Text/index.cjs +18 -0
  86. package/dist/Text/index.d.cts +42 -0
  87. package/dist/Text/index.d.ts +42 -0
  88. package/dist/Text/index.js +13 -0
  89. package/dist/{Text-Bdv7F5-u.js → Text-BMg3d10t.js} +2 -2
  90. package/dist/{Text-C04c4Z93.cjs → Text-CgOYTs8D.cjs} +2 -2
  91. package/dist/TextInput/index.cjs +4 -0
  92. package/dist/TextInput/index.d.cts +12 -0
  93. package/dist/TextInput/index.d.ts +12 -0
  94. package/dist/TextInput/index.js +4 -0
  95. package/dist/{TextInput-BO80ixsV.cjs → TextInput-CObd_Wcw.cjs} +2 -2
  96. package/dist/{TextInput-CEGWfdPC.js → TextInput-ChPhL54o.js} +2 -2
  97. package/dist/{colorsConfig-BKBZfFq1.js → colorsConfig-CKiMYHO_.js} +1 -1
  98. package/dist/{colorsConfig-vunsVTFC.cjs → colorsConfig-DulwYRIk.cjs} +1 -1
  99. package/dist/{searchFilterSidebarVariants-eoyfoWA8.js → searchFilterSidebarVariants-C_UTEIpZ.js} +2 -2
  100. package/dist/{searchFilterSidebarVariants-L1rn5Ift.cjs → searchFilterSidebarVariants-DcQLi_TT.cjs} +2 -2
  101. package/dist/{textVariantClasses-Bhf4VY5z.cjs → textVariantClasses-BnV4wXaw.cjs} +1 -1
  102. package/dist/{textVariantClasses-5t3OricK.js → textVariantClasses-CnjwO2Fv.js} +1 -1
  103. package/dist/textVariantClasses-DwnnFNBf.d.cts +174 -0
  104. package/dist/textVariantClasses-sT9E8Uty.d.ts +174 -0
  105. package/dist/types-5luH4G-3.d.cts +5 -0
  106. package/dist/types-B7hf-Lif.d.ts +272 -0
  107. package/dist/{types-BQNqA5xL.d.ts → types-BCAU5OQD.d.cts} +1 -1
  108. package/dist/types-BIPqyTOJ.d.ts +5 -0
  109. package/dist/types-BQYpWDJ4.d.cts +6 -0
  110. package/dist/{types-CImLkcNh.d.cts → types-BwPquD10.d.ts} +1 -1
  111. package/dist/types-CosVh8Hj.d.cts +4 -0
  112. package/dist/types-DpfHwTzY.d.ts +6 -0
  113. package/dist/types-Dvgr3ZeV.d.cts +272 -0
  114. package/dist/types-nR3jHgIO.d.ts +4 -0
  115. package/package.json +58 -85
  116. package/src/components/ButtonBase/index.ts +2 -0
  117. package/src/components/{common/ButtonBase → ButtonBase}/types.ts +1 -1
  118. package/src/components/{search/FilterScrollbar → FilterScrollbar}/AppliedFiltersScrollbar.tsx +1 -1
  119. package/src/components/{search/FilterScrollbar → FilterScrollbar}/DynamicFiltersScrollbar.tsx +1 -1
  120. package/src/components/FilterScrollbar/index.ts +2 -0
  121. package/src/components/Headline/index.ts +1 -0
  122. package/src/components/ImageWithFallback/index.ts +1 -0
  123. package/src/components/{common/ProductCard → ProductCard}/ProductCard.tsx +3 -3
  124. package/src/components/ProductCard/index.ts +4 -0
  125. package/src/components/ProductGrid/index.ts +2 -0
  126. package/src/components/{search/SearchFilter → SearchFilter}/SearchFilter.tsx +2 -2
  127. package/src/components/{search/SearchFilter → SearchFilter}/SearchFilterHeader.tsx +1 -1
  128. package/src/components/{search/SearchFilter → SearchFilter}/SearchFilterItem.tsx +1 -1
  129. package/src/components/SearchFilter/index.ts +4 -0
  130. package/src/components/{search/SearchInput → SearchInput}/SearchInput.tsx +1 -1
  131. package/src/components/SearchInput/index.ts +2 -0
  132. package/src/components/{search/SearchInput → SearchInput}/searchInputVariants.ts +2 -2
  133. package/src/components/SearchInputAutocomplete/index.ts +1 -0
  134. package/src/components/SearchInputForm/index.ts +2 -0
  135. package/src/components/{search/SearchResultsFilterSidebar → SearchResultsFilterSidebar}/SearchResultsFilter.tsx +1 -1
  136. package/src/components/SearchResultsFilterSidebar/index.ts +3 -0
  137. package/src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +58 -0
  138. package/src/components/{search/SearchResultsStates → SearchResultsStates}/NoSearchResultsFound.tsx +1 -1
  139. package/src/components/{search/SearchResultsStates → SearchResultsStates}/SearchResultsGrid.tsx +2 -2
  140. package/src/components/{search/SearchResultsStates → SearchResultsStates}/SearchResultsLoadingGrid.tsx +5 -5
  141. package/src/components/SearchResultsStates/index.ts +3 -0
  142. package/src/components/SparkleAnimation/index.ts +2 -0
  143. package/src/components/Spinner/index.ts +1 -0
  144. package/src/components/SuggestionButton/index.ts +2 -0
  145. package/src/components/Text/index.ts +3 -0
  146. package/src/components/TextInput/index.ts +1 -0
  147. package/dist/DynamicFiltersScrollbar-B2Rr1KnJ.cjs +0 -41
  148. package/dist/DynamicFiltersScrollbar-Dys6geP0.js +0 -32
  149. package/dist/SearchFilter-D-2IdBKS.js +0 -62
  150. package/dist/SearchFilter-D0IzBlG5.cjs +0 -70
  151. package/dist/SearchFilterHeader-BQT0-ssS.js +0 -37
  152. package/dist/SearchFilterHeader-C3EklfoO.cjs +0 -45
  153. package/dist/SearchFilterItem-BodtWLoP.js +0 -26
  154. package/dist/SearchFilterItem-DmMkiqNC.cjs +0 -34
  155. package/dist/common/ButtonBase/ButtonBase.cjs +0 -5
  156. package/dist/common/ButtonBase/ButtonBase.d.cts +0 -35
  157. package/dist/common/ButtonBase/ButtonBase.js +0 -5
  158. package/dist/common/Headline/Headline.cjs +0 -4
  159. package/dist/common/Headline/Headline.js +0 -4
  160. package/dist/common/ImageWithFallback/ImageWithFallback.cjs +0 -3
  161. package/dist/common/ImageWithFallback/ImageWithFallback.js +0 -3
  162. package/dist/common/ProductCard/ProductCard.cjs +0 -11
  163. package/dist/common/ProductCard/ProductCard.js +0 -9
  164. package/dist/common/ProductCard/ProductCardSkeleton.cjs +0 -4
  165. package/dist/common/ProductCard/ProductCardSkeleton.d.cts +0 -12
  166. package/dist/common/ProductCard/ProductCardSkeleton.d.ts +0 -12
  167. package/dist/common/ProductCard/ProductCardSkeleton.js +0 -4
  168. package/dist/common/ProductGrid/ProductGrid.cjs +0 -11
  169. package/dist/common/ProductGrid/ProductGrid.d.cts +0 -26
  170. package/dist/common/ProductGrid/ProductGrid.d.ts +0 -26
  171. package/dist/common/ProductGrid/ProductGrid.js +0 -11
  172. package/dist/common/SparkleAnimation/SparkleAnimation.cjs +0 -3
  173. package/dist/common/SparkleAnimation/SparkleAnimation.d.cts +0 -15
  174. package/dist/common/SparkleAnimation/SparkleAnimation.d.ts +0 -15
  175. package/dist/common/SparkleAnimation/SparkleAnimation.js +0 -3
  176. package/dist/common/Spinner/Spinner.cjs +0 -3
  177. package/dist/common/Spinner/Spinner.d.cts +0 -11
  178. package/dist/common/Spinner/Spinner.d.ts +0 -11
  179. package/dist/common/Spinner/Spinner.js +0 -3
  180. package/dist/common/Text/Text.cjs +0 -4
  181. package/dist/common/Text/Text.d.cts +0 -28
  182. package/dist/common/Text/Text.d.ts +0 -28
  183. package/dist/common/Text/Text.js +0 -4
  184. package/dist/common/TextInput/TextInput.cjs +0 -4
  185. package/dist/common/TextInput/TextInput.d.cts +0 -98
  186. package/dist/common/TextInput/TextInput.d.ts +0 -98
  187. package/dist/common/TextInput/TextInput.js +0 -4
  188. package/dist/productCardVariants-C_QIZ-KF.js +0 -45
  189. package/dist/productCardVariants-Dd-wrJKP.cjs +0 -69
  190. package/dist/productGridVariants-BNX4YlRK.js +0 -20
  191. package/dist/productGridVariants-CsNV0ACt.cjs +0 -26
  192. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.cjs +0 -5
  193. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.d.cts +0 -22
  194. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.d.ts +0 -22
  195. package/dist/search/FilterScrollbar/AppliedFiltersScrollbar.js +0 -5
  196. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.cjs +0 -5
  197. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.d.cts +0 -28
  198. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.d.ts +0 -28
  199. package/dist/search/FilterScrollbar/DynamicFiltersScrollbar.js +0 -5
  200. package/dist/search/SearchFilter/SearchFilter.cjs +0 -7
  201. package/dist/search/SearchFilter/SearchFilter.d.cts +0 -18
  202. package/dist/search/SearchFilter/SearchFilter.d.ts +0 -18
  203. package/dist/search/SearchFilter/SearchFilter.js +0 -7
  204. package/dist/search/SearchFilter/SearchFilterHeader.cjs +0 -5
  205. package/dist/search/SearchFilter/SearchFilterHeader.d.cts +0 -12
  206. package/dist/search/SearchFilter/SearchFilterHeader.d.ts +0 -12
  207. package/dist/search/SearchFilter/SearchFilterHeader.js +0 -5
  208. package/dist/search/SearchFilter/SearchFilterItem.cjs +0 -5
  209. package/dist/search/SearchFilter/SearchFilterItem.d.cts +0 -13
  210. package/dist/search/SearchFilter/SearchFilterItem.d.ts +0 -13
  211. package/dist/search/SearchFilter/SearchFilterItem.js +0 -5
  212. package/dist/search/SearchInput/SearchInput.cjs +0 -6
  213. package/dist/search/SearchInput/SearchInput.d.cts +0 -20
  214. package/dist/search/SearchInput/SearchInput.d.ts +0 -20
  215. package/dist/search/SearchInput/SearchInput.js +0 -6
  216. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.cjs +0 -3
  217. package/dist/search/SearchInputAutocomplete/SearchAutocomplete.js +0 -3
  218. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.d.cts +0 -28
  219. package/dist/search/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +0 -28
  220. package/dist/search/SearchResultsStates/NoSearchResultsFound.cjs +0 -30
  221. package/dist/search/SearchResultsStates/NoSearchResultsFound.d.cts +0 -17
  222. package/dist/search/SearchResultsStates/NoSearchResultsFound.d.ts +0 -17
  223. package/dist/search/SearchResultsStates/NoSearchResultsFound.js +0 -26
  224. package/dist/search/SearchResultsStates/SearchResultsGrid.cjs +0 -66
  225. package/dist/search/SearchResultsStates/SearchResultsGrid.d.cts +0 -41
  226. package/dist/search/SearchResultsStates/SearchResultsGrid.d.ts +0 -41
  227. package/dist/search/SearchResultsStates/SearchResultsGrid.js +0 -62
  228. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.cjs +0 -52
  229. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.d.cts +0 -15
  230. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.d.ts +0 -15
  231. package/dist/search/SearchResultsStates/SearchResultsLoadingGrid.js +0 -49
  232. package/dist/types-53zIialA.d.ts +0 -35
  233. package/dist/types-B4BGZSlV.d.cts +0 -4
  234. package/dist/types-BRLWwGMI.d.ts +0 -4
  235. package/dist/types-Cph97xkm.d.ts +0 -6
  236. package/dist/types-CpiJO5UH.d.ts +0 -4
  237. package/dist/types-Dy4_w6Cf.d.cts +0 -4
  238. package/dist/types-TYhhwWZw.d.cts +0 -6
  239. package/dist/types-aa4flfRE.d.cts +0 -35
  240. package/src/components/search/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +0 -45
  241. package/src/components/search/types.ts +0 -5
  242. /package/dist/{types-DFetqNL2.d.ts → types-B19i3fxM.d.ts} +0 -0
  243. /package/dist/{types-DaSkJnT_.d.cts → types-C-Jrlw5Z.d.cts} +0 -0
  244. /package/src/components/{common/ButtonBase → ButtonBase}/ButtonBase.tsx +0 -0
  245. /package/src/components/{common/Headline → Headline}/Headline.tsx +0 -0
  246. /package/src/components/{common/ImageWithFallback → ImageWithFallback}/ImageWithFallback.tsx +0 -0
  247. /package/src/components/{common/ProductCard → ProductCard}/ProductCardSkeleton.tsx +0 -0
  248. /package/src/components/{common/ProductCard → ProductCard}/productCardVariants.ts +0 -0
  249. /package/src/components/{common/ProductCard → ProductCard}/types.ts +0 -0
  250. /package/src/components/{common/ProductGrid → ProductGrid}/ProductGrid.tsx +0 -0
  251. /package/src/components/{common/ProductGrid → ProductGrid}/productGridVariants.ts +0 -0
  252. /package/src/components/{search/SearchFilter → SearchFilter}/types.ts +0 -0
  253. /package/src/components/{search/SearchInputAutocomplete → SearchInputAutocomplete}/SearchAutocomplete.tsx +0 -0
  254. /package/src/components/{search/SearchInputForm → SearchInputForm}/SearchInputForm.tsx +0 -0
  255. /package/src/components/{search/SearchInputForm → SearchInputForm}/types.ts +0 -0
  256. /package/src/components/{search/SearchResultsFilterSidebar → SearchResultsFilterSidebar}/types.ts +0 -0
  257. /package/src/components/{common/SparkleAnimation → SparkleAnimation}/SparkleAnimation.tsx +0 -0
  258. /package/src/components/{common/SparkleAnimation → SparkleAnimation}/types.ts +0 -0
  259. /package/src/components/{common/Spinner → Spinner}/Spinner.tsx +0 -0
  260. /package/src/components/{common/SuggestionButton → SuggestionButton}/SuggestionButton.tsx +0 -0
  261. /package/src/components/{common/SuggestionButton → SuggestionButton}/types.ts +0 -0
  262. /package/src/components/{common/Text → Text}/Text.tsx +0 -0
  263. /package/src/components/{common/Text → Text}/textVariantClasses.ts +0 -0
  264. /package/src/components/{common/Text → Text}/types.ts +0 -0
  265. /package/src/components/{common/TextInput → TextInput}/TextInput.tsx +0 -0
  266. /package/src/{components/models → models}/colorsConfig.ts +0 -0
  267. /package/src/{components/test → test}/types.ts +0 -0
@@ -0,0 +1,272 @@
1
+ //#region src/types/external.d.ts
2
+ declare enum ResponseCategory {
3
+ Product = "product",
4
+ }
5
+ interface SearchResponseProduct {
6
+ id: string;
7
+ title: string;
8
+ description?: string;
9
+ price?: number;
10
+ currency?: string;
11
+ imageUrl?: string;
12
+ brand?: string;
13
+ category?: string;
14
+ availability?: string;
15
+ url?: string;
16
+ responseId?: string;
17
+ originalPrice?: number;
18
+ salePrice?: number;
19
+ averageRating?: number;
20
+ numberReviews?: number;
21
+ [key: string]: unknown;
22
+ }
23
+ //#endregion
24
+ //#region src/util/trim.d.ts
25
+ /**
26
+ * Remove spaces from the left side.
27
+ */
28
+ type TrimLeft<V extends string> = V extends `${Whitespace}${infer R}` ? TrimLeft<R> : V;
29
+ /**
30
+ * Remove spaces from the right side.
31
+ */
32
+ type TrimRight<V extends string> = V extends `${infer R}${Whitespace}` ? TrimRight<R> : V;
33
+ /**
34
+ * Remove leading and trailing spaces from a string.
35
+ * @example
36
+ * ```
37
+ * import type {Trim} from 'type-fest';
38
+ *
39
+ * Trim<' foo '>
40
+ * //=> 'foo'
41
+ * ```
42
+ *
43
+ * @category String
44
+ * @category Template literal
45
+ */
46
+ type Trim<V extends string> = TrimLeft<TrimRight<V>>;
47
+ //#endregion
48
+ //#region src/util/internal.d.ts
49
+ /**
50
+ * Returns a boolean for whether the string is numeric.
51
+ *
52
+ * This type is a workaround for [Microsoft/TypeScript#46109](https://github.com/microsoft/TypeScript/issues/46109#issuecomment-930307987).
53
+ */
54
+ type IsNumeric<T extends string> = T extends `${number}` ? Trim<T> extends T ? true : false : false;
55
+ /**
56
+ * Returns a boolean for whether the string is lowercased.
57
+ */
58
+ type IsLowerCase<T extends string> = T extends Lowercase<T> ? true : false;
59
+ /**
60
+ * Returns a boolean for whether the string is upper-cased.
61
+ */
62
+ type IsUpperCase<T extends string> = T extends Uppercase<T> ? true : false;
63
+ type WordSeparators = '-' | '_' | Whitespace;
64
+ type Whitespace = '\u{9}' | '\u{A}' | '\u{B}' | '\u{C}' | '\u{D}' | '\u{20}' | '\u{85}' | '\u{A0}' | '\u{1680}' | '\u{2000}' | '\u{2001}' | '\u{2002}' | '\u{2003}' | '\u{2004}' | '\u{2005}' | '\u{2006}' | '\u{2007}' | '\u{2008}' | '\u{2009}' | '\u{200A}' | '\u{2028}' | '\u{2029}' | '\u{202F}' | '\u{205F}' | '\u{3000}' | '\u{FEFF}';
65
+ //#endregion
66
+ //#region src/util/splitWords.d.ts
67
+ type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
68
+ type RemoveLastCharacter<Sentence extends string, Character extends string> = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
69
+ /**
70
+ * Split a string (almost) like Lodash's `_.words()` function.
71
+ *
72
+ * - Split on each word that begins with a capital letter.
73
+ * - Split on each {@link WordSeparators}.
74
+ * - Split on numeric sequence.
75
+ *
76
+ * @example
77
+ * ```
78
+ * type Words0 = SplitWords<'helloWorld'>; // ['hello', 'World']
79
+ * type Words1 = SplitWords<'helloWORLD'>; // ['hello', 'WORLD']
80
+ * type Words2 = SplitWords<'hello-world'>; // ['hello', 'world']
81
+ * type Words3 = SplitWords<'--hello the_world'>; // ['hello', 'the', 'world']
82
+ * type Words4 = SplitWords<'lifeIs42'>; // ['life', 'Is', '42']
83
+ * ```
84
+ *
85
+ * @internal
86
+ * @category Change case
87
+ * @category Template literal
88
+ */
89
+ type SplitWords<Sentence extends string, LastCharacter extends string = '', CurrentWord extends string = ''> = Sentence extends `${infer FirstCharacter}${infer RemainingCharacters}` ? FirstCharacter extends WordSeparators ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters>] : LastCharacter extends '' ? SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter> : [false, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, false] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [true, true] extends [IsLowerCase<LastCharacter>, IsUpperCase<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsUpperCase<LastCharacter>, IsLowerCase<FirstCharacter>] ? [...RemoveLastCharacter<CurrentWord, LastCharacter>, ...SplitWords<RemainingCharacters, FirstCharacter, `${LastCharacter}${FirstCharacter}`>] : SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [...SkipEmptyWord<CurrentWord>];
90
+ //#endregion
91
+ //#region src/util/camelCase.d.ts
92
+ /**
93
+ * CamelCase options.
94
+ *
95
+ * @see {@link CamelCase}
96
+ */
97
+ type CamelCaseOptions = {
98
+ /**
99
+ * Whether to preserved consecutive uppercase letter.
100
+ *
101
+ * @default true
102
+ */
103
+ preserveConsecutiveUppercase?: boolean;
104
+ };
105
+ /**
106
+ * Convert an array of words to camel-case.
107
+ */
108
+ 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;
109
+ /**
110
+ * Convert a string literal to camel-case.
111
+ *
112
+ * This can be useful when, for example, converting some kebab-cased command-line flags or a snake-cased database result.
113
+ *
114
+ * By default, consecutive uppercase letter are preserved. See {@link CamelCaseOptions.preserveConsecutiveUppercase preserveConsecutiveUppercase} option to change this behaviour.
115
+ *
116
+ * @example
117
+ * ```
118
+ * import type {CamelCase} from 'type-fest';
119
+ *
120
+ * // Simple
121
+ *
122
+ * const someVariable: CamelCase<'foo-bar'> = 'fooBar';
123
+ *
124
+ * // Advanced
125
+ *
126
+ * type CamelCasedProperties<T> = {
127
+ * [K in keyof T as CamelCase<K>]: T[K]
128
+ * };
129
+ *
130
+ * interface RawOptions {
131
+ * 'dry-run': boolean;
132
+ * 'full_family_name': string;
133
+ * foo: number;
134
+ * BAR: string;
135
+ * QUZ_QUX: number;
136
+ * 'OTHER-FIELD': boolean;
137
+ * }
138
+ *
139
+ * const dbResult: CamelCasedProperties<RawOptions> = {
140
+ * dryRun: true,
141
+ * fullFamilyName: 'bar.js',
142
+ * foo: 123,
143
+ * bar: 'foo',
144
+ * quzQux: 6,
145
+ * otherField: false
146
+ * };
147
+ * ```
148
+ *
149
+ * @category Change case
150
+ * @category Template literal
151
+ */
152
+ type CamelCase<Type, Options extends CamelCaseOptions = {
153
+ preserveConsecutiveUppercase: true;
154
+ }> = Type extends string ? string extends Type ? Type : Uncapitalize<CamelCaseFromArray<SplitWords<Type extends Uppercase<Type> ? Lowercase<Type> : Type>, Options>> : Type;
155
+ //#endregion
156
+ //#region src/util/unknownArray.d.ts
157
+ /**
158
+ * Represents an array with `unknown` value.
159
+ *
160
+ * Use case: You want a type that all arrays can be assigned to, but you don't care about the value.
161
+ *
162
+ * @example
163
+ * ```
164
+ * import type {UnknownArray} from 'type-fest';
165
+ *
166
+ * type IsArray<T> = T extends UnknownArray ? true : false;
167
+ *
168
+ * type A = IsArray<['foo']>;
169
+ * //=> true
170
+ *
171
+ * type B = IsArray<readonly number[]>;
172
+ * //=> true
173
+ *
174
+ * type C = IsArray<string>;
175
+ * //=> false
176
+ * ```
177
+ *
178
+ * @category Type
179
+ * @category Array
180
+ */
181
+ type UnknownArray = readonly unknown[];
182
+ //#endregion
183
+ //#region src/util/camelCasedPropertiesDeep.d.ts
184
+ /**
185
+ * Convert object properties to camel case recursively.
186
+ *
187
+ * This can be useful when, for example, converting some API types from a different style.
188
+ *
189
+ * @see CamelCasedProperties
190
+ * @see CamelCase
191
+ *
192
+ * @example
193
+ * ```
194
+ * import type {CamelCasedPropertiesDeep} from 'type-fest';
195
+ *
196
+ * interface User {
197
+ * UserId: number;
198
+ * UserName: string;
199
+ * }
200
+ *
201
+ * interface UserWithFriends {
202
+ * UserInfo: User;
203
+ * UserFriends: User[];
204
+ * }
205
+ *
206
+ * const result: CamelCasedPropertiesDeep<UserWithFriends> = {
207
+ * userInfo: {
208
+ * userId: 1,
209
+ * userName: 'Tom',
210
+ * },
211
+ * userFriends: [
212
+ * {
213
+ * userId: 2,
214
+ * userName: 'Jerry',
215
+ * },
216
+ * {
217
+ * userId: 3,
218
+ * userName: 'Spike',
219
+ * },
220
+ * ],
221
+ * };
222
+ * ```
223
+ *
224
+ * @category Change case
225
+ * @category Template literal
226
+ * @category Object
227
+ */
228
+ type CamelCasedPropertiesDeep<Value, Options extends CamelCaseOptions = {
229
+ preserveConsecutiveUppercase: true;
230
+ }> = Value extends Function ? Value : Value extends UnknownArray ? CamelCasedPropertiesArrayDeep<Value> : Value extends Set<infer U> ? Set<CamelCasedPropertiesDeep<U, Options>> : { [K in keyof Value as CamelCase<K, Options>]: CamelCasedPropertiesDeep<Value[K], Options> };
231
+ type CamelCasedPropertiesArrayDeep<Value extends UnknownArray> = Value extends [] ? [] : Value extends [infer U, ...infer V] ? [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [infer U, ...infer V] ? readonly [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? readonly [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends Array<infer U> ? Array<CamelCasedPropertiesDeep<U>> : Value extends ReadonlyArray<infer U> ? ReadonlyArray<CamelCasedPropertiesDeep<U>> : never;
232
+ //#endregion
233
+ //#region src/components/ProductCard/types.d.ts
234
+ declare enum ProductCardSkeletonOverrides {
235
+ PRODUCT_CARD_SKELETON_CONTAINER = "spiffy-product-card-skeleton-container",
236
+ PRODUCT_CARD_SKELETON = "spiffy-product-card-skeleton",
237
+ }
238
+ declare enum AnimatedProductCardOverrides {
239
+ PRODUCT_CARD_ANIMATED_CONTAINER = "spiffy-product-card-animated-container",
240
+ PRODUCT_CARD_ANIMATED_IMAGE_CONTAINER = "spiffy-product-card-animated",
241
+ }
242
+ type ProductGridVariant = 'standard' | 'square';
243
+ type ProductCardVariant = 'filled' | 'bordered' | 'minimal' | 'transparentBordered';
244
+ type ProductCardHoverVariant = 'backgroundDark' | 'none';
245
+ type ProductCardLayoutVariant = 'normal' | 'tall' | 'square';
246
+ type ProductCardImageAspectRatio = '1/1' | '4/3' | '3/4' | '16/9' | '9/16';
247
+ interface ProductCardConfig {
248
+ variant: ProductCardVariant;
249
+ hoverVariant: ProductCardHoverVariant;
250
+ layoutVariant: ProductCardLayoutVariant;
251
+ pricePrefix?: string;
252
+ }
253
+ interface SearchResponseProductAttributes {
254
+ category: ResponseCategory.Product;
255
+ attributes: CamelCasedPropertiesDeep<SearchResponseProduct>;
256
+ }
257
+ interface ProductCardSkeletonProps {
258
+ layoutVariant: ProductCardLayoutVariant;
259
+ aspectRatio: ProductCardImageAspectRatio;
260
+ growWithContainer?: boolean;
261
+ }
262
+ interface ProductGridProps {
263
+ productList: SearchResponseProductAttributes['attributes'][];
264
+ productGridVariant: ProductGridVariant;
265
+ productGridClasses: string;
266
+ productCardConfig?: ProductCardConfig;
267
+ merchantShortName: string;
268
+ searchResponseId: string;
269
+ cardsGrowWithContainer?: boolean;
270
+ }
271
+ //#endregion
272
+ export { AnimatedProductCardOverrides, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, SearchResponseProduct, SearchResponseProductAttributes };
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from "react";
2
2
 
3
- //#region src/components/search/SearchFilter/types.d.ts
3
+ //#region src/components/SearchFilter/types.d.ts
4
4
  type SearchFilterItem = {
5
5
  id: string;
6
6
  displayName: string;
@@ -0,0 +1,5 @@
1
+ //#region src/components/SearchResultsFilterSidebar/types.d.ts
2
+ type SearchFilterSidebarVariant = 'darkButton' | 'lightButton';
3
+ type CloseIconVariant = 'light' | 'tertiary' | 'dark';
4
+ //#endregion
5
+ export { CloseIconVariant, SearchFilterSidebarVariant };
@@ -0,0 +1,6 @@
1
+ //#region src/test/types.d.ts
2
+ interface TestProps {
3
+ dataTestId?: string;
4
+ }
5
+ //#endregion
6
+ export { TestProps };
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from "react";
2
2
 
3
- //#region src/components/search/SearchFilter/types.d.ts
3
+ //#region src/components/SearchFilter/types.d.ts
4
4
  type SearchFilterItem = {
5
5
  id: string;
6
6
  displayName: string;
@@ -0,0 +1,4 @@
1
+ //#region src/components/SearchInputForm/types.d.ts
2
+ type SearchInputVariant = 'standard';
3
+ //#endregion
4
+ export { SearchInputVariant };
@@ -0,0 +1,6 @@
1
+ //#region src/test/types.d.ts
2
+ interface TestProps {
3
+ dataTestId?: string;
4
+ }
5
+ //#endregion
6
+ export { TestProps };
@@ -0,0 +1,272 @@
1
+ //#region src/types/external.d.ts
2
+ declare enum ResponseCategory {
3
+ Product = "product",
4
+ }
5
+ interface SearchResponseProduct {
6
+ id: string;
7
+ title: string;
8
+ description?: string;
9
+ price?: number;
10
+ currency?: string;
11
+ imageUrl?: string;
12
+ brand?: string;
13
+ category?: string;
14
+ availability?: string;
15
+ url?: string;
16
+ responseId?: string;
17
+ originalPrice?: number;
18
+ salePrice?: number;
19
+ averageRating?: number;
20
+ numberReviews?: number;
21
+ [key: string]: unknown;
22
+ }
23
+ //#endregion
24
+ //#region src/util/trim.d.ts
25
+ /**
26
+ * Remove spaces from the left side.
27
+ */
28
+ type TrimLeft<V extends string> = V extends `${Whitespace}${infer R}` ? TrimLeft<R> : V;
29
+ /**
30
+ * Remove spaces from the right side.
31
+ */
32
+ type TrimRight<V extends string> = V extends `${infer R}${Whitespace}` ? TrimRight<R> : V;
33
+ /**
34
+ * Remove leading and trailing spaces from a string.
35
+ * @example
36
+ * ```
37
+ * import type {Trim} from 'type-fest';
38
+ *
39
+ * Trim<' foo '>
40
+ * //=> 'foo'
41
+ * ```
42
+ *
43
+ * @category String
44
+ * @category Template literal
45
+ */
46
+ type Trim<V extends string> = TrimLeft<TrimRight<V>>;
47
+ //#endregion
48
+ //#region src/util/internal.d.ts
49
+ /**
50
+ * Returns a boolean for whether the string is numeric.
51
+ *
52
+ * This type is a workaround for [Microsoft/TypeScript#46109](https://github.com/microsoft/TypeScript/issues/46109#issuecomment-930307987).
53
+ */
54
+ type IsNumeric<T extends string> = T extends `${number}` ? Trim<T> extends T ? true : false : false;
55
+ /**
56
+ * Returns a boolean for whether the string is lowercased.
57
+ */
58
+ type IsLowerCase<T extends string> = T extends Lowercase<T> ? true : false;
59
+ /**
60
+ * Returns a boolean for whether the string is upper-cased.
61
+ */
62
+ type IsUpperCase<T extends string> = T extends Uppercase<T> ? true : false;
63
+ type WordSeparators = '-' | '_' | Whitespace;
64
+ type Whitespace = '\u{9}' | '\u{A}' | '\u{B}' | '\u{C}' | '\u{D}' | '\u{20}' | '\u{85}' | '\u{A0}' | '\u{1680}' | '\u{2000}' | '\u{2001}' | '\u{2002}' | '\u{2003}' | '\u{2004}' | '\u{2005}' | '\u{2006}' | '\u{2007}' | '\u{2008}' | '\u{2009}' | '\u{200A}' | '\u{2028}' | '\u{2029}' | '\u{202F}' | '\u{205F}' | '\u{3000}' | '\u{FEFF}';
65
+ //#endregion
66
+ //#region src/util/splitWords.d.ts
67
+ type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
68
+ type RemoveLastCharacter<Sentence extends string, Character extends string> = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
69
+ /**
70
+ * Split a string (almost) like Lodash's `_.words()` function.
71
+ *
72
+ * - Split on each word that begins with a capital letter.
73
+ * - Split on each {@link WordSeparators}.
74
+ * - Split on numeric sequence.
75
+ *
76
+ * @example
77
+ * ```
78
+ * type Words0 = SplitWords<'helloWorld'>; // ['hello', 'World']
79
+ * type Words1 = SplitWords<'helloWORLD'>; // ['hello', 'WORLD']
80
+ * type Words2 = SplitWords<'hello-world'>; // ['hello', 'world']
81
+ * type Words3 = SplitWords<'--hello the_world'>; // ['hello', 'the', 'world']
82
+ * type Words4 = SplitWords<'lifeIs42'>; // ['life', 'Is', '42']
83
+ * ```
84
+ *
85
+ * @internal
86
+ * @category Change case
87
+ * @category Template literal
88
+ */
89
+ type SplitWords<Sentence extends string, LastCharacter extends string = '', CurrentWord extends string = ''> = Sentence extends `${infer FirstCharacter}${infer RemainingCharacters}` ? FirstCharacter extends WordSeparators ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters>] : LastCharacter extends '' ? SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter> : [false, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, false] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [true, true] extends [IsLowerCase<LastCharacter>, IsUpperCase<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsUpperCase<LastCharacter>, IsLowerCase<FirstCharacter>] ? [...RemoveLastCharacter<CurrentWord, LastCharacter>, ...SplitWords<RemainingCharacters, FirstCharacter, `${LastCharacter}${FirstCharacter}`>] : SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [...SkipEmptyWord<CurrentWord>];
90
+ //#endregion
91
+ //#region src/util/camelCase.d.ts
92
+ /**
93
+ * CamelCase options.
94
+ *
95
+ * @see {@link CamelCase}
96
+ */
97
+ type CamelCaseOptions = {
98
+ /**
99
+ * Whether to preserved consecutive uppercase letter.
100
+ *
101
+ * @default true
102
+ */
103
+ preserveConsecutiveUppercase?: boolean;
104
+ };
105
+ /**
106
+ * Convert an array of words to camel-case.
107
+ */
108
+ 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;
109
+ /**
110
+ * Convert a string literal to camel-case.
111
+ *
112
+ * This can be useful when, for example, converting some kebab-cased command-line flags or a snake-cased database result.
113
+ *
114
+ * By default, consecutive uppercase letter are preserved. See {@link CamelCaseOptions.preserveConsecutiveUppercase preserveConsecutiveUppercase} option to change this behaviour.
115
+ *
116
+ * @example
117
+ * ```
118
+ * import type {CamelCase} from 'type-fest';
119
+ *
120
+ * // Simple
121
+ *
122
+ * const someVariable: CamelCase<'foo-bar'> = 'fooBar';
123
+ *
124
+ * // Advanced
125
+ *
126
+ * type CamelCasedProperties<T> = {
127
+ * [K in keyof T as CamelCase<K>]: T[K]
128
+ * };
129
+ *
130
+ * interface RawOptions {
131
+ * 'dry-run': boolean;
132
+ * 'full_family_name': string;
133
+ * foo: number;
134
+ * BAR: string;
135
+ * QUZ_QUX: number;
136
+ * 'OTHER-FIELD': boolean;
137
+ * }
138
+ *
139
+ * const dbResult: CamelCasedProperties<RawOptions> = {
140
+ * dryRun: true,
141
+ * fullFamilyName: 'bar.js',
142
+ * foo: 123,
143
+ * bar: 'foo',
144
+ * quzQux: 6,
145
+ * otherField: false
146
+ * };
147
+ * ```
148
+ *
149
+ * @category Change case
150
+ * @category Template literal
151
+ */
152
+ type CamelCase<Type, Options extends CamelCaseOptions = {
153
+ preserveConsecutiveUppercase: true;
154
+ }> = Type extends string ? string extends Type ? Type : Uncapitalize<CamelCaseFromArray<SplitWords<Type extends Uppercase<Type> ? Lowercase<Type> : Type>, Options>> : Type;
155
+ //#endregion
156
+ //#region src/util/unknownArray.d.ts
157
+ /**
158
+ * Represents an array with `unknown` value.
159
+ *
160
+ * Use case: You want a type that all arrays can be assigned to, but you don't care about the value.
161
+ *
162
+ * @example
163
+ * ```
164
+ * import type {UnknownArray} from 'type-fest';
165
+ *
166
+ * type IsArray<T> = T extends UnknownArray ? true : false;
167
+ *
168
+ * type A = IsArray<['foo']>;
169
+ * //=> true
170
+ *
171
+ * type B = IsArray<readonly number[]>;
172
+ * //=> true
173
+ *
174
+ * type C = IsArray<string>;
175
+ * //=> false
176
+ * ```
177
+ *
178
+ * @category Type
179
+ * @category Array
180
+ */
181
+ type UnknownArray = readonly unknown[];
182
+ //#endregion
183
+ //#region src/util/camelCasedPropertiesDeep.d.ts
184
+ /**
185
+ * Convert object properties to camel case recursively.
186
+ *
187
+ * This can be useful when, for example, converting some API types from a different style.
188
+ *
189
+ * @see CamelCasedProperties
190
+ * @see CamelCase
191
+ *
192
+ * @example
193
+ * ```
194
+ * import type {CamelCasedPropertiesDeep} from 'type-fest';
195
+ *
196
+ * interface User {
197
+ * UserId: number;
198
+ * UserName: string;
199
+ * }
200
+ *
201
+ * interface UserWithFriends {
202
+ * UserInfo: User;
203
+ * UserFriends: User[];
204
+ * }
205
+ *
206
+ * const result: CamelCasedPropertiesDeep<UserWithFriends> = {
207
+ * userInfo: {
208
+ * userId: 1,
209
+ * userName: 'Tom',
210
+ * },
211
+ * userFriends: [
212
+ * {
213
+ * userId: 2,
214
+ * userName: 'Jerry',
215
+ * },
216
+ * {
217
+ * userId: 3,
218
+ * userName: 'Spike',
219
+ * },
220
+ * ],
221
+ * };
222
+ * ```
223
+ *
224
+ * @category Change case
225
+ * @category Template literal
226
+ * @category Object
227
+ */
228
+ type CamelCasedPropertiesDeep<Value, Options extends CamelCaseOptions = {
229
+ preserveConsecutiveUppercase: true;
230
+ }> = Value extends Function ? Value : Value extends UnknownArray ? CamelCasedPropertiesArrayDeep<Value> : Value extends Set<infer U> ? Set<CamelCasedPropertiesDeep<U, Options>> : { [K in keyof Value as CamelCase<K, Options>]: CamelCasedPropertiesDeep<Value[K], Options> };
231
+ type CamelCasedPropertiesArrayDeep<Value extends UnknownArray> = Value extends [] ? [] : Value extends [infer U, ...infer V] ? [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [infer U, ...infer V] ? readonly [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? readonly [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends Array<infer U> ? Array<CamelCasedPropertiesDeep<U>> : Value extends ReadonlyArray<infer U> ? ReadonlyArray<CamelCasedPropertiesDeep<U>> : never;
232
+ //#endregion
233
+ //#region src/components/ProductCard/types.d.ts
234
+ declare enum ProductCardSkeletonOverrides {
235
+ PRODUCT_CARD_SKELETON_CONTAINER = "spiffy-product-card-skeleton-container",
236
+ PRODUCT_CARD_SKELETON = "spiffy-product-card-skeleton",
237
+ }
238
+ declare enum AnimatedProductCardOverrides {
239
+ PRODUCT_CARD_ANIMATED_CONTAINER = "spiffy-product-card-animated-container",
240
+ PRODUCT_CARD_ANIMATED_IMAGE_CONTAINER = "spiffy-product-card-animated",
241
+ }
242
+ type ProductGridVariant = 'standard' | 'square';
243
+ type ProductCardVariant = 'filled' | 'bordered' | 'minimal' | 'transparentBordered';
244
+ type ProductCardHoverVariant = 'backgroundDark' | 'none';
245
+ type ProductCardLayoutVariant = 'normal' | 'tall' | 'square';
246
+ type ProductCardImageAspectRatio = '1/1' | '4/3' | '3/4' | '16/9' | '9/16';
247
+ interface ProductCardConfig {
248
+ variant: ProductCardVariant;
249
+ hoverVariant: ProductCardHoverVariant;
250
+ layoutVariant: ProductCardLayoutVariant;
251
+ pricePrefix?: string;
252
+ }
253
+ interface SearchResponseProductAttributes {
254
+ category: ResponseCategory.Product;
255
+ attributes: CamelCasedPropertiesDeep<SearchResponseProduct>;
256
+ }
257
+ interface ProductCardSkeletonProps {
258
+ layoutVariant: ProductCardLayoutVariant;
259
+ aspectRatio: ProductCardImageAspectRatio;
260
+ growWithContainer?: boolean;
261
+ }
262
+ interface ProductGridProps {
263
+ productList: SearchResponseProductAttributes['attributes'][];
264
+ productGridVariant: ProductGridVariant;
265
+ productGridClasses: string;
266
+ productCardConfig?: ProductCardConfig;
267
+ merchantShortName: string;
268
+ searchResponseId: string;
269
+ cardsGrowWithContainer?: boolean;
270
+ }
271
+ //#endregion
272
+ export { AnimatedProductCardOverrides, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, SearchResponseProduct, SearchResponseProductAttributes };
@@ -0,0 +1,4 @@
1
+ //#region src/components/SearchInputForm/types.d.ts
2
+ type SearchInputVariant = 'standard';
3
+ //#endregion
4
+ export { SearchInputVariant };