@envive-ai/react-toolkit-v3 0.3.32 → 0.3.33

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 (276) hide show
  1. package/dist/AnimatedText/AnimatedText.d.cts +3 -3
  2. package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.cts +2 -2
  3. package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.ts +2 -2
  4. package/dist/CSSVariablesEditor/hooks/useGetCssVariablesOptions.cjs +1 -1
  5. package/dist/CSSVariablesEditor/hooks/useGetCssVariablesOptions.js +1 -1
  6. package/dist/CSSVariablesEditor/hooks/useGetCurrentMerchantColors.cjs +1 -1
  7. package/dist/CSSVariablesEditor/hooks/useGetCurrentMerchantColors.js +1 -1
  8. package/dist/CSSVariablesEditor/hooks/useGetDefaultCssVariables.cjs +166 -61
  9. package/dist/CSSVariablesEditor/hooks/useGetDefaultCssVariables.js +166 -61
  10. package/dist/CSSVariablesEditor/hooks/useHandleUpdateCssVars.cjs +31 -16
  11. package/dist/CSSVariablesEditor/hooks/useHandleUpdateCssVars.js +31 -16
  12. package/dist/Carousel/Carousel.d.cts +2 -2
  13. package/dist/Carousel/components/Badge.cjs +1 -1
  14. package/dist/Carousel/components/Badge.js +1 -1
  15. package/dist/Carousel/components/Container.cjs +1 -1
  16. package/dist/Carousel/components/Container.js +1 -1
  17. package/dist/ChatFooter/ChatFooter.cjs +1 -1
  18. package/dist/ChatFooter/ChatFooter.d.cts +2 -2
  19. package/dist/ChatFooter/ChatFooter.d.ts +2 -2
  20. package/dist/ChatFooter/ChatFooter.js +1 -1
  21. package/dist/ChatFooter/components/Layout.cjs +1 -1
  22. package/dist/ChatFooter/components/Layout.js +1 -1
  23. package/dist/ChatFooter/components/index.d.cts +5 -5
  24. package/dist/ChatFooter/components/index.d.ts +5 -5
  25. package/dist/ChatHeader/ChatHeader.d.ts +2 -2
  26. package/dist/ChatHeader/hooks/useGetHandleProperties.cjs +1 -1
  27. package/dist/ChatHeader/hooks/useGetHandleProperties.js +1 -1
  28. package/dist/ChatHeader/hooks/useGetLayoutProperties.cjs +1 -1
  29. package/dist/ChatHeader/hooks/useGetLayoutProperties.js +1 -1
  30. package/dist/ChatPreview/ChatPreview.d.cts +2 -2
  31. package/dist/ChatPreview/ChatPreview.d.ts +2 -2
  32. package/dist/ChatPreviewComparison/ChatPreviewComparison.d.cts +2 -2
  33. package/dist/ChatPreviewComparison/ChatPreviewComparison.d.ts +2 -2
  34. package/dist/ChatPreviewComparison/components/Layout.cjs +2 -2
  35. package/dist/ChatPreviewComparison/components/Layout.js +2 -2
  36. package/dist/ChatPreviewLoading/ChatPreviewLoading.d.cts +2 -2
  37. package/dist/ChatPreviewLoading/ChatPreviewLoading.d.ts +2 -2
  38. package/dist/Container/Container.d.cts +172 -172
  39. package/dist/Container/Container.d.ts +172 -172
  40. package/dist/DesignTokens/DesignTokensComponent.d.cts +2 -2
  41. package/dist/DesignTokens/DesignTokensComponent.d.ts +2 -2
  42. package/dist/DesignTokens/components/FontFamily.cjs +1 -1
  43. package/dist/DesignTokens/components/FontFamily.js +1 -1
  44. package/dist/DesignTokens/components/FontSize.cjs +1 -1
  45. package/dist/DesignTokens/components/FontSize.js +1 -1
  46. package/dist/DesignTokens/components/FontWeight.cjs +5 -4
  47. package/dist/DesignTokens/components/FontWeight.js +5 -4
  48. package/dist/DesignTokens/components/LetterSpacing.cjs +16 -2
  49. package/dist/DesignTokens/components/LetterSpacing.js +16 -2
  50. package/dist/DesignTokens/components/LineHeight.cjs +14 -9
  51. package/dist/DesignTokens/components/LineHeight.js +14 -9
  52. package/dist/DesignTokens/components/Typography.cjs +1 -1
  53. package/dist/DesignTokens/components/Typography.js +1 -1
  54. package/dist/Disclaimer/components/Container.cjs +1 -1
  55. package/dist/Disclaimer/components/Container.js +1 -1
  56. package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.cts +2 -2
  57. package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.ts +2 -2
  58. package/dist/DocumentRetrievalCard/components/Image.cjs +1 -1
  59. package/dist/DocumentRetrievalCard/components/Image.js +1 -1
  60. package/dist/DocumentRetrievalCard/components/Layout.cjs +1 -1
  61. package/dist/DocumentRetrievalCard/components/Layout.js +1 -1
  62. package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Icon.cjs +1 -1
  63. package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Icon.js +1 -1
  64. package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Label.cjs +1 -1
  65. package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Label.js +1 -1
  66. package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Layout.cjs +1 -1
  67. package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Layout.js +1 -1
  68. package/dist/FloatingButton/FloatingButton.d.cts +2 -2
  69. package/dist/FloatingButton/FloatingButton.d.ts +2 -2
  70. package/dist/FloatingButton/components/Button.cjs +1 -1
  71. package/dist/FloatingButton/components/Button.js +1 -1
  72. package/dist/FloatingButton/components/Container.cjs +1 -1
  73. package/dist/FloatingButton/components/Container.js +1 -1
  74. package/dist/FloatingButton/components/Wrapper.cjs +1 -1
  75. package/dist/FloatingButton/components/Wrapper.js +1 -1
  76. package/dist/FloatingChat/FloatingChat.d.cts +2 -2
  77. package/dist/FloatingChat/FloatingChat.d.ts +2 -2
  78. package/dist/FloatingChat/components/ChatMessages.cjs +1 -1
  79. package/dist/FloatingChat/components/ChatMessages.js +1 -1
  80. package/dist/FloatingChat/components/Layout.cjs +1 -1
  81. package/dist/FloatingChat/components/Layout.js +1 -1
  82. package/dist/FloatingChat/components/ProductResultsModal.cjs +1 -1
  83. package/dist/FloatingChat/components/ProductResultsModal.js +1 -1
  84. package/dist/FloatingChat/components/ResultsGridView.cjs +1 -1
  85. package/dist/FloatingChat/components/ResultsGridView.js +1 -1
  86. package/dist/FloatingChat/components/SalesAgentBadgeContent.cjs +4 -4
  87. package/dist/FloatingChat/components/SalesAgentBadgeContent.js +4 -4
  88. package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.cjs +6 -3
  89. package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.js +6 -3
  90. package/dist/FloatingChat/utils/functions.cjs +2 -1
  91. package/dist/FloatingChat/utils/functions.js +2 -1
  92. package/dist/Form/Form.cjs +1 -1
  93. package/dist/Form/Form.js +1 -1
  94. package/dist/Form/components/Layout.cjs +1 -1
  95. package/dist/Form/components/Layout.js +1 -1
  96. package/dist/Form/components/SubmitButtonItem.cjs +1 -1
  97. package/dist/Form/components/SubmitButtonItem.js +1 -1
  98. package/dist/Form/components/TextFieldItem.cjs +1 -1
  99. package/dist/Form/components/TextFieldItem.js +1 -1
  100. package/dist/FullPageSalesAgent/FullPageSalesAgent.d.cts +2 -2
  101. package/dist/FullPageSalesAgent/FullPageSalesAgent.d.ts +2 -2
  102. package/dist/FullPageSalesAgent/components/Layout.cjs +1 -1
  103. package/dist/FullPageSalesAgent/components/Layout.js +1 -1
  104. package/dist/FullPageSalesAgent/components/WelcomeOverlay.cjs +1 -1
  105. package/dist/FullPageSalesAgent/components/WelcomeOverlay.js +1 -1
  106. package/dist/Image/Image.cjs +1 -1
  107. package/dist/Image/Image.d.cts +2 -2
  108. package/dist/Image/Image.d.ts +2 -2
  109. package/dist/Image/Image.js +1 -1
  110. package/dist/ImageGallery/ImageGallery.d.cts +2 -2
  111. package/dist/ImageGallery/ImageGallery.d.ts +2 -2
  112. package/dist/ImageGallery/components/Layout.cjs +1 -1
  113. package/dist/ImageGallery/components/Layout.js +1 -1
  114. package/dist/ImageGallery/utils/functions.cjs +1 -1
  115. package/dist/ImageGallery/utils/functions.js +1 -1
  116. package/dist/MarkdownProcessor/MarkdownProcessor.d.cts +2 -2
  117. package/dist/MarkdownProcessor/MarkdownProcessor.d.ts +2 -2
  118. package/dist/Message/components/Layout.cjs +1 -1
  119. package/dist/Message/components/Layout.js +1 -1
  120. package/dist/OrderLookupCard/OrderLookupCard.cjs +1 -1
  121. package/dist/OrderLookupCard/OrderLookupCard.js +1 -1
  122. package/dist/OrderLookupCard/components/Layout.cjs +1 -1
  123. package/dist/OrderLookupCard/components/Layout.js +1 -1
  124. package/dist/OrderLookupCard/components/MoreProductsOverlay.cjs +1 -1
  125. package/dist/OrderLookupCard/components/MoreProductsOverlay.js +1 -1
  126. package/dist/OrderLookupCard/components/ProductImageGridItem.cjs +1 -1
  127. package/dist/OrderLookupCard/components/ProductImageGridItem.js +1 -1
  128. package/dist/OrderLookupCard/components/ProductImageItem.cjs +1 -1
  129. package/dist/OrderLookupCard/components/ProductImageItem.js +1 -1
  130. package/dist/OrderLookupCard/components/ProductImagesGrid.cjs +1 -1
  131. package/dist/OrderLookupCard/components/ProductImagesGrid.js +1 -1
  132. package/dist/OrderLookupCard/components/StatusLabel.cjs +1 -1
  133. package/dist/OrderLookupCard/components/StatusLabel.js +1 -1
  134. package/dist/OrderLookupCard/components/TrackOrderLink.cjs +1 -1
  135. package/dist/OrderLookupCard/components/TrackOrderLink.js +1 -1
  136. package/dist/ProductCard/ProductCard.cjs +14 -8
  137. package/dist/ProductCard/ProductCard.d.cts +3 -2
  138. package/dist/ProductCard/ProductCard.d.ts +3 -2
  139. package/dist/ProductCard/ProductCard.js +10 -4
  140. package/dist/ProductCard/components/Header.cjs +7 -5
  141. package/dist/ProductCard/components/Header.js +7 -5
  142. package/dist/ProductCard/components/Poster.cjs +3 -2
  143. package/dist/ProductCard/components/Poster.js +3 -2
  144. package/dist/ProductCard/hooks/useGetPosterProperties.cjs +5 -3
  145. package/dist/ProductCard/hooks/useGetPosterProperties.js +6 -3
  146. package/dist/ProductCard/index.cjs +3 -1
  147. package/dist/ProductCard/index.d.cts +2 -2
  148. package/dist/ProductCard/index.d.ts +2 -2
  149. package/dist/ProductCard/index.js +2 -1
  150. package/dist/ProductCard/types/index.cjs +10 -0
  151. package/dist/ProductCard/types/index.d.cts +13 -3
  152. package/dist/ProductCard/types/index.d.ts +13 -3
  153. package/dist/ProductCard/types/index.js +9 -0
  154. package/dist/PromptButton/PromptButton.cjs +1 -1
  155. package/dist/PromptButton/PromptButton.d.cts +2 -2
  156. package/dist/PromptButton/PromptButton.d.ts +2 -2
  157. package/dist/PromptButton/PromptButton.js +1 -1
  158. package/dist/PromptButton/components/Layout.cjs +1 -1
  159. package/dist/PromptButton/components/Layout.js +1 -1
  160. package/dist/PromptButton/components/Loading.cjs +1 -1
  161. package/dist/PromptButton/components/Loading.js +1 -1
  162. package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.cts +2 -2
  163. package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts +2 -2
  164. package/dist/PromptButtonCarouselWithImage/components/Layout.cjs +1 -1
  165. package/dist/PromptButtonCarouselWithImage/components/Layout.js +1 -1
  166. package/dist/PromptButtonCarouselWithImage/components/Skeleton.cjs +1 -1
  167. package/dist/PromptButtonCarouselWithImage/components/Skeleton.js +1 -1
  168. package/dist/PromptCarousel/PromptCarousel.cjs +1 -1
  169. package/dist/PromptCarousel/PromptCarousel.d.cts +2 -2
  170. package/dist/PromptCarousel/PromptCarousel.d.ts +2 -2
  171. package/dist/PromptCarousel/PromptCarousel.js +1 -1
  172. package/dist/ReviewCard/ReviewCard.d.cts +2 -2
  173. package/dist/ReviewCard/ReviewCard.d.ts +2 -2
  174. package/dist/ReviewCard/components/Container.cjs +1 -1
  175. package/dist/ReviewCard/components/Container.js +1 -1
  176. package/dist/ReviewCard/components/Rating.cjs +1 -1
  177. package/dist/ReviewCard/components/Rating.js +1 -1
  178. package/dist/ReviewCard/components/ReadMoreButton.cjs +1 -1
  179. package/dist/ReviewCard/components/ReadMoreButton.js +1 -1
  180. package/dist/ReviewCard/components/index.d.cts +6 -6
  181. package/dist/ReviewCard/components/index.d.ts +6 -6
  182. package/dist/SalesAgentProductCard/SalesAgentProductCard.d.cts +2 -2
  183. package/dist/SalesAgentProductCard/SalesAgentProductCard.d.ts +2 -2
  184. package/dist/SalesAgentProductCard/components/Container.cjs +1 -1
  185. package/dist/SalesAgentProductCard/components/Container.js +1 -1
  186. package/dist/SalesAgentProductCard/components/ProductImage.cjs +1 -1
  187. package/dist/SalesAgentProductCard/components/ProductImage.js +1 -1
  188. package/dist/SalesAgentProductCard/components/ProductName.cjs +1 -1
  189. package/dist/SalesAgentProductCard/components/ProductName.js +1 -1
  190. package/dist/SalesAgentProductCard/components/index.d.cts +8 -8
  191. package/dist/SalesAgentProductCard/components/index.d.ts +8 -8
  192. package/dist/SocialProof/SocialProof.d.cts +2 -2
  193. package/dist/SocialProof/SocialProof.d.ts +2 -2
  194. package/dist/SocialProof/components/Headline.cjs +1 -1
  195. package/dist/SocialProof/components/Headline.js +1 -1
  196. package/dist/SocialProof/components/LayoutFourHorizontal.cjs +1 -1
  197. package/dist/SocialProof/components/LayoutFourHorizontal.js +1 -1
  198. package/dist/SparkleAnimation/SparkleAnimation.d.cts +2 -2
  199. package/dist/Stack/Stack.d.cts +2 -2
  200. package/dist/Stack/Stack.d.ts +2 -2
  201. package/dist/TextField/TextField.cjs +1 -1
  202. package/dist/TextField/TextField.js +1 -1
  203. package/dist/TextField/components/Input.cjs +1 -1
  204. package/dist/TextField/components/Input.js +1 -1
  205. package/dist/TextField/components/Layout.cjs +1 -1
  206. package/dist/TextField/components/Layout.js +1 -1
  207. package/dist/TextField/components/SendIcon.cjs +1 -1
  208. package/dist/TextField/components/SendIcon.js +1 -1
  209. package/dist/Title/Title.cjs +1 -1
  210. package/dist/Title/Title.js +1 -1
  211. package/dist/Title/components/Layout.cjs +1 -1
  212. package/dist/Title/components/Layout.js +1 -1
  213. package/dist/TitledPromptCarousel/TitledPromptCarousel.cjs +1 -1
  214. package/dist/TitledPromptCarousel/TitledPromptCarousel.d.cts +2 -2
  215. package/dist/TitledPromptCarousel/TitledPromptCarousel.d.ts +2 -2
  216. package/dist/TitledPromptCarousel/TitledPromptCarousel.js +1 -1
  217. package/dist/Tokens/index.cjs +2 -2
  218. package/dist/Tokens/index.js +2 -2
  219. package/dist/TypingAnimation/TypingAnimation.d.cts +2 -2
  220. package/dist/TypingAnimation/TypingAnimation.d.ts +2 -2
  221. package/dist/Typography/Typography.d.ts +4 -4
  222. package/dist/WelcomeMessage/components/Container.cjs +1 -1
  223. package/dist/WelcomeMessage/components/Container.js +1 -1
  224. package/dist/WidgetTextField/WidgetTextField.cjs +3 -2
  225. package/dist/WidgetTextField/WidgetTextField.d.cts +1 -0
  226. package/dist/WidgetTextField/WidgetTextField.d.ts +1 -0
  227. package/dist/WidgetTextField/WidgetTextField.js +3 -2
  228. package/dist/WidgetTextField/components/Container.cjs +4 -3
  229. package/dist/WidgetTextField/components/Container.js +4 -3
  230. package/dist/WidgetTextField/components/Skeleton.cjs +1 -1
  231. package/dist/WidgetTextField/components/Skeleton.js +1 -1
  232. package/dist/WidgetTextField/hooks/useGetContainerProperties.cjs +7 -3
  233. package/dist/WidgetTextField/hooks/useGetContainerProperties.js +7 -3
  234. package/dist/WidgetTextField/types/types.d.cts +2 -0
  235. package/dist/WidgetTextField/types/types.d.ts +2 -0
  236. package/dist/WidgetWrapper/WidgetWrapper.cjs +1 -1
  237. package/dist/WidgetWrapper/WidgetWrapper.d.cts +2 -2
  238. package/dist/WidgetWrapper/WidgetWrapper.js +1 -1
  239. package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.cts +2 -2
  240. package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.ts +2 -2
  241. package/dist/packages/components-v3/tokens/typography/fontWeight.cjs +12 -9
  242. package/dist/packages/components-v3/tokens/typography/fontWeight.d.ts +4 -3
  243. package/dist/packages/components-v3/tokens/typography/fontWeight.js +12 -9
  244. package/dist/packages/components-v3/tokens/typography/letterSpacing.cjs +39 -6
  245. package/dist/packages/components-v3/tokens/typography/letterSpacing.d.ts +13 -2
  246. package/dist/packages/components-v3/tokens/typography/letterSpacing.js +39 -6
  247. package/dist/packages/components-v3/tokens/typography/lineHeight.cjs +39 -30
  248. package/dist/packages/components-v3/tokens/typography/lineHeight.d.ts +15 -12
  249. package/dist/packages/components-v3/tokens/typography/lineHeight.js +39 -30
  250. package/dist/packages/components-v3/tokens/typography/typography.cjs +63 -63
  251. package/dist/packages/components-v3/tokens/typography/typography.js +63 -63
  252. package/dist/styles.css +1 -1
  253. package/dist/tokens/typography/fontWeight.d.cts +4 -3
  254. package/dist/tokens/typography/letterSpacing.d.cts +13 -2
  255. package/dist/tokens/typography/lineHeight.d.cts +15 -12
  256. package/dist/utils/resolveTheme.cjs +1 -1
  257. package/dist/utils/resolveTheme.js +1 -1
  258. package/package.json +1 -1
  259. package/src/components/CSSVariablesEditor/hooks/useGetDefaultCssVariables.ts +165 -60
  260. package/src/components/CSSVariablesEditor/hooks/useHandleUpdateCssVars.ts +30 -15
  261. package/src/components/DesignTokens/components/FontWeight.tsx +4 -3
  262. package/src/components/DesignTokens/components/LetterSpacing.tsx +13 -1
  263. package/src/components/DesignTokens/components/LineHeight.tsx +13 -8
  264. package/src/components/FloatingChat/components/SalesAgentBadgeContent.tsx +8 -2
  265. package/src/components/FloatingChat/components/SalesAgentProductCardsCarousel.tsx +5 -2
  266. package/src/components/FloatingChat/utils/functions.ts +2 -3
  267. package/src/components/ProductCard/ProductCard.tsx +8 -4
  268. package/src/components/ProductCard/components/Header.tsx +11 -5
  269. package/src/components/ProductCard/components/Poster.tsx +12 -3
  270. package/src/components/ProductCard/hooks/useGetPosterProperties.ts +15 -3
  271. package/src/components/ProductCard/index.ts +1 -0
  272. package/src/components/ProductCard/types/index.ts +13 -1
  273. package/src/components/WidgetTextField/WidgetTextField.tsx +2 -0
  274. package/src/components/WidgetTextField/components/Container.tsx +3 -0
  275. package/src/components/WidgetTextField/hooks/useGetContainerProperties.ts +8 -2
  276. package/src/components/WidgetTextField/types/types.ts +2 -0
@@ -290,112 +290,217 @@ export const useGetDefaultCssVariables = ({
290
290
 
291
291
  // Font Weights
292
292
  {
293
- key: 'font-weight-rg',
294
- name: 'Font Weight Regular',
295
- variable: FontWeightCSSVar.RG,
296
- defaultValue: fontWeight.rg,
293
+ key: 'font-weight-title',
294
+ name: 'Font Weight Title',
295
+ variable: FontWeightCSSVar.Title,
296
+ defaultValue: fontWeight.title,
297
297
  category: 'Typography',
298
298
  },
299
299
  {
300
- key: 'font-weight-md',
301
- name: 'Font Weight Medium',
302
- variable: FontWeightCSSVar.MD,
303
- defaultValue: fontWeight.md,
300
+ key: 'font-weight-header',
301
+ name: 'Font Weight Header',
302
+ variable: FontWeightCSSVar.Header,
303
+ defaultValue: fontWeight.header,
304
304
  category: 'Typography',
305
305
  },
306
306
  {
307
- key: 'font-weight-sb',
308
- name: 'Font Weight Semi Bold',
309
- variable: FontWeightCSSVar.SB,
310
- defaultValue: fontWeight.sb,
307
+ key: 'font-weight-body-emphasis',
308
+ name: 'Font Weight Body Emphasis',
309
+ variable: FontWeightCSSVar.BodyEmphasis,
310
+ defaultValue: fontWeight.body_emphasis,
311
+ category: 'Typography',
312
+ },
313
+ {
314
+ key: 'font-weight-body-standard',
315
+ name: 'Font Weight Body Standard',
316
+ variable: FontWeightCSSVar.BodyStandard,
317
+ defaultValue: fontWeight.body_standard,
311
318
  category: 'Typography',
312
319
  },
313
320
 
314
321
  // Line Heights
315
322
  {
316
- key: 'line-height-124',
317
- name: 'Line Height 124%',
318
- variable: LineHeightCSSVar.LineHeight124,
319
- defaultValue: convertLineHeightToPercentage(lineHeight[124]),
323
+ key: 'line-height-t1',
324
+ name: 'Line Height T1',
325
+ variable: LineHeightCSSVar.T1,
326
+ defaultValue: convertLineHeightToPercentage(lineHeight.t1),
327
+ category: 'Typography',
328
+ },
329
+ {
330
+ key: 'line-height-t2',
331
+ name: 'Line Height T2',
332
+ variable: LineHeightCSSVar.T2,
333
+ defaultValue: convertLineHeightToPercentage(lineHeight.t2),
334
+ category: 'Typography',
335
+ },
336
+ {
337
+ key: 'line-height-t3',
338
+ name: 'Line Height T3',
339
+ variable: LineHeightCSSVar.T3,
340
+ defaultValue: convertLineHeightToPercentage(lineHeight.t3),
341
+ category: 'Typography',
342
+ },
343
+ {
344
+ key: 'line-height-h1',
345
+ name: 'Line Height H1',
346
+ variable: LineHeightCSSVar.H1,
347
+ defaultValue: convertLineHeightToPercentage(lineHeight.h1),
320
348
  category: 'Typography',
321
349
  },
322
350
  {
323
- key: 'line-height-120',
324
- name: 'Line Height 120%',
325
- variable: LineHeightCSSVar.LineHeight120,
326
- defaultValue: convertLineHeightToPercentage(lineHeight[120]),
351
+ key: 'line-height-h2',
352
+ name: 'Line Height H2',
353
+ variable: LineHeightCSSVar.H2,
354
+ defaultValue: convertLineHeightToPercentage(lineHeight.h2),
327
355
  category: 'Typography',
328
356
  },
329
357
  {
330
- key: 'line-height-118',
331
- name: 'Line Height 118%',
332
- variable: LineHeightCSSVar.LineHeight118,
333
- defaultValue: convertLineHeightToPercentage(lineHeight[118]),
358
+ key: 'line-height-h3',
359
+ name: 'Line Height H3',
360
+ variable: LineHeightCSSVar.H3,
361
+ defaultValue: convertLineHeightToPercentage(lineHeight.h3),
334
362
  category: 'Typography',
335
363
  },
336
364
  {
337
- key: 'line-height-116',
338
- name: 'Line Height 116%',
339
- variable: LineHeightCSSVar.LineHeight116,
340
- defaultValue: convertLineHeightToPercentage(lineHeight[116]),
365
+ key: 'line-height-b1',
366
+ name: 'Line Height B1',
367
+ variable: LineHeightCSSVar.B1,
368
+ defaultValue: convertLineHeightToPercentage(lineHeight.b1),
341
369
  category: 'Typography',
342
370
  },
343
371
  {
344
- key: 'line-height-114',
345
- name: 'Line Height 114%',
346
- variable: LineHeightCSSVar.LineHeight114,
347
- defaultValue: convertLineHeightToPercentage(lineHeight[114]),
372
+ key: 'line-height-b2',
373
+ name: 'Line Height B2',
374
+ variable: LineHeightCSSVar.B2,
375
+ defaultValue: convertLineHeightToPercentage(lineHeight.b2),
348
376
  category: 'Typography',
349
377
  },
350
378
  {
351
- key: 'line-height-148',
352
- name: 'Line Height 148%',
353
- variable: LineHeightCSSVar.LineHeight148,
354
- defaultValue: convertLineHeightToPercentage(lineHeight[148]),
379
+ key: 'line-height-b3',
380
+ name: 'Line Height B3',
381
+ variable: LineHeightCSSVar.B3,
382
+ defaultValue: convertLineHeightToPercentage(lineHeight.b3),
355
383
  category: 'Typography',
356
384
  },
357
385
  {
358
- key: 'line-height-140',
359
- name: 'Line Height 140%',
360
- variable: LineHeightCSSVar.LineHeight140,
361
- defaultValue: convertLineHeightToPercentage(lineHeight[140]),
386
+ key: 'line-height-b4',
387
+ name: 'Line Height B4',
388
+ variable: LineHeightCSSVar.B4,
389
+ defaultValue: convertLineHeightToPercentage(lineHeight.b4),
362
390
  category: 'Typography',
363
391
  },
364
392
  {
365
- key: 'line-height-128',
366
- name: 'Line Height 128%',
367
- variable: LineHeightCSSVar.LineHeight128,
368
- defaultValue: convertLineHeightToPercentage(lineHeight[128]),
393
+ key: 'line-height-b5',
394
+ name: 'Line Height B5',
395
+ variable: LineHeightCSSVar.B5,
396
+ defaultValue: convertLineHeightToPercentage(lineHeight.b5),
369
397
  category: 'Typography',
370
398
  },
371
399
  {
372
- key: 'line-height-130',
373
- name: 'Line Height 130%',
374
- variable: LineHeightCSSVar.LineHeight130,
375
- defaultValue: convertLineHeightToPercentage(lineHeight[130]),
400
+ key: 'line-height-l1',
401
+ name: 'Line Height L1',
402
+ variable: LineHeightCSSVar.L1,
403
+ defaultValue: convertLineHeightToPercentage(lineHeight.l1),
376
404
  category: 'Typography',
377
405
  },
378
406
  {
379
- key: 'line-height-133',
380
- name: 'Line Height 133%',
381
- variable: LineHeightCSSVar.LineHeight133,
382
- defaultValue: convertLineHeightToPercentage(lineHeight[133]),
407
+ key: 'line-height-l2',
408
+ name: 'Line Height L2',
409
+ variable: LineHeightCSSVar.L2,
410
+ defaultValue: convertLineHeightToPercentage(lineHeight.l2),
383
411
  category: 'Typography',
384
412
  },
385
413
 
386
414
  // Letter Spacing
387
415
  {
388
- key: 'letter-spacing-tight-0',
389
- name: 'Letter Spacing Tight 0',
390
- variable: LetterSpacingCSSVar.Tight0,
391
- defaultValue: letterSpacing['tight-0'],
416
+ key: 'letter-spacing-t1',
417
+ name: 'Letter Spacing T1',
418
+ variable: LetterSpacingCSSVar.T1,
419
+ defaultValue: letterSpacing.t1,
420
+ category: 'Typography',
421
+ },
422
+ {
423
+ key: 'letter-spacing-t2',
424
+ name: 'Letter Spacing T2',
425
+ variable: LetterSpacingCSSVar.T2,
426
+ defaultValue: letterSpacing.t2,
427
+ category: 'Typography',
428
+ },
429
+ {
430
+ key: 'letter-spacing-t3',
431
+ name: 'Letter Spacing T3',
432
+ variable: LetterSpacingCSSVar.T3,
433
+ defaultValue: letterSpacing.t3,
434
+ category: 'Typography',
435
+ },
436
+ {
437
+ key: 'letter-spacing-h1',
438
+ name: 'Letter Spacing H1',
439
+ variable: LetterSpacingCSSVar.H1,
440
+ defaultValue: letterSpacing.h1,
441
+ category: 'Typography',
442
+ },
443
+ {
444
+ key: 'letter-spacing-h2',
445
+ name: 'Letter Spacing H2',
446
+ variable: LetterSpacingCSSVar.H2,
447
+ defaultValue: letterSpacing.h2,
448
+ category: 'Typography',
449
+ },
450
+ {
451
+ key: 'letter-spacing-h3',
452
+ name: 'Letter Spacing H3',
453
+ variable: LetterSpacingCSSVar.H3,
454
+ defaultValue: letterSpacing.h3,
455
+ category: 'Typography',
456
+ },
457
+ {
458
+ key: 'letter-spacing-b1',
459
+ name: 'Letter Spacing B1',
460
+ variable: LetterSpacingCSSVar.B1,
461
+ defaultValue: letterSpacing.b1,
462
+ category: 'Typography',
463
+ },
464
+ {
465
+ key: 'letter-spacing-b2',
466
+ name: 'Letter Spacing B2',
467
+ variable: LetterSpacingCSSVar.B2,
468
+ defaultValue: letterSpacing.b2,
469
+ category: 'Typography',
470
+ },
471
+ {
472
+ key: 'letter-spacing-b3',
473
+ name: 'Letter Spacing B3',
474
+ variable: LetterSpacingCSSVar.B3,
475
+ defaultValue: letterSpacing.b3,
476
+ category: 'Typography',
477
+ },
478
+ {
479
+ key: 'letter-spacing-b4',
480
+ name: 'Letter Spacing B4',
481
+ variable: LetterSpacingCSSVar.B4,
482
+ defaultValue: letterSpacing.b4,
483
+ category: 'Typography',
484
+ },
485
+ {
486
+ key: 'letter-spacing-b5',
487
+ name: 'Letter Spacing B5',
488
+ variable: LetterSpacingCSSVar.B5,
489
+ defaultValue: letterSpacing.b5,
490
+ category: 'Typography',
491
+ },
492
+ {
493
+ key: 'letter-spacing-l1',
494
+ name: 'Letter Spacing L1',
495
+ variable: LetterSpacingCSSVar.L1,
496
+ defaultValue: letterSpacing.l1,
392
497
  category: 'Typography',
393
498
  },
394
499
  {
395
- key: 'letter-spacing-wide-1',
396
- name: 'Letter Spacing Wide 1',
397
- variable: LetterSpacingCSSVar.Wide1,
398
- defaultValue: letterSpacing['wide-1'],
500
+ key: 'letter-spacing-l2',
501
+ name: 'Letter Spacing L2',
502
+ variable: LetterSpacingCSSVar.L2,
503
+ defaultValue: letterSpacing.l2,
399
504
  category: 'Typography',
400
505
  },
401
506
 
@@ -32,23 +32,38 @@ export const useHandleUpdateCssVars = () => {
32
32
  --${FontSizeCSSVar.L1}: ${variables['font-size-l1']} !important;
33
33
  --${FontSizeCSSVar.L2}: ${variables['font-size-l2']} !important;
34
34
 
35
- --${FontWeightCSSVar.RG}: ${variables['font-weight-rg']} !important;
36
- --${FontWeightCSSVar.MD}: ${variables['font-weight-md']} !important;
37
- --${FontWeightCSSVar.SB}: ${variables['font-weight-sb']} !important;
35
+ --${FontWeightCSSVar.Title}: ${variables['font-weight-title']} !important;
36
+ --${FontWeightCSSVar.Header}: ${variables['font-weight-header']} !important;
37
+ --${FontWeightCSSVar.BodyEmphasis}: ${variables['font-weight-body-emphasis']} !important;
38
+ --${FontWeightCSSVar.BodyStandard}: ${variables['font-weight-body-standard']} !important;
38
39
 
39
- --${LineHeightCSSVar.LineHeight124}: ${convertPercentageTolineHeight(variables['line-height-124'])} !important;
40
- --${LineHeightCSSVar.LineHeight120}: ${convertPercentageTolineHeight(variables['line-height-120'])} !important;
41
- --${LineHeightCSSVar.LineHeight118}: ${convertPercentageTolineHeight(variables['line-height-118'])} !important;
42
- --${LineHeightCSSVar.LineHeight116}: ${convertPercentageTolineHeight(variables['line-height-116'])} !important;
43
- --${LineHeightCSSVar.LineHeight114}: ${convertPercentageTolineHeight(variables['line-height-114'])} !important;
44
- --${LineHeightCSSVar.LineHeight148}: ${convertPercentageTolineHeight(variables['line-height-148'])} !important;
45
- --${LineHeightCSSVar.LineHeight140}: ${convertPercentageTolineHeight(variables['line-height-140'])} !important;
46
- --${LineHeightCSSVar.LineHeight128}: ${convertPercentageTolineHeight(variables['line-height-128'])} !important;
47
- --${LineHeightCSSVar.LineHeight130}: ${convertPercentageTolineHeight(variables['line-height-130'])} !important;
48
- --${LineHeightCSSVar.LineHeight133}: ${convertPercentageTolineHeight(variables['line-height-133'])} !important;
40
+ --${LineHeightCSSVar.T1}: ${convertPercentageTolineHeight(variables['line-height-t1'])} !important;
41
+ --${LineHeightCSSVar.T2}: ${convertPercentageTolineHeight(variables['line-height-t2'])} !important;
42
+ --${LineHeightCSSVar.T3}: ${convertPercentageTolineHeight(variables['line-height-t3'])} !important;
43
+ --${LineHeightCSSVar.H1}: ${convertPercentageTolineHeight(variables['line-height-h1'])} !important;
44
+ --${LineHeightCSSVar.H2}: ${convertPercentageTolineHeight(variables['line-height-h2'])} !important;
45
+ --${LineHeightCSSVar.H3}: ${convertPercentageTolineHeight(variables['line-height-h3'])} !important;
46
+ --${LineHeightCSSVar.B1}: ${convertPercentageTolineHeight(variables['line-height-b1'])} !important;
47
+ --${LineHeightCSSVar.B2}: ${convertPercentageTolineHeight(variables['line-height-b2'])} !important;
48
+ --${LineHeightCSSVar.B3}: ${convertPercentageTolineHeight(variables['line-height-b3'])} !important;
49
+ --${LineHeightCSSVar.B4}: ${convertPercentageTolineHeight(variables['line-height-b4'])} !important;
50
+ --${LineHeightCSSVar.B5}: ${convertPercentageTolineHeight(variables['line-height-b5'])} !important;
51
+ --${LineHeightCSSVar.L1}: ${convertPercentageTolineHeight(variables['line-height-l1'])} !important;
52
+ --${LineHeightCSSVar.L2}: ${convertPercentageTolineHeight(variables['line-height-l2'])} !important;
49
53
 
50
- --${LetterSpacingCSSVar.Tight0}: ${variables['letter-spacing-tight-0']} !important;
51
- --${LetterSpacingCSSVar.Wide1}: ${variables['letter-spacing-wide-1']} !important;
54
+ --${LetterSpacingCSSVar.T1}: ${variables['letter-spacing-t1']} !important;
55
+ --${LetterSpacingCSSVar.T2}: ${variables['letter-spacing-t2']} !important;
56
+ --${LetterSpacingCSSVar.T3}: ${variables['letter-spacing-t3']} !important;
57
+ --${LetterSpacingCSSVar.H1}: ${variables['letter-spacing-h1']} !important;
58
+ --${LetterSpacingCSSVar.H2}: ${variables['letter-spacing-h2']} !important;
59
+ --${LetterSpacingCSSVar.H3}: ${variables['letter-spacing-h3']} !important;
60
+ --${LetterSpacingCSSVar.B1}: ${variables['letter-spacing-b1']} !important;
61
+ --${LetterSpacingCSSVar.B2}: ${variables['letter-spacing-b2']} !important;
62
+ --${LetterSpacingCSSVar.B3}: ${variables['letter-spacing-b3']} !important;
63
+ --${LetterSpacingCSSVar.B4}: ${variables['letter-spacing-b4']} !important;
64
+ --${LetterSpacingCSSVar.B5}: ${variables['letter-spacing-b5']} !important;
65
+ --${LetterSpacingCSSVar.L1}: ${variables['letter-spacing-l1']} !important;
66
+ --${LetterSpacingCSSVar.L2}: ${variables['letter-spacing-l2']} !important;
52
67
 
53
68
  --${FontFamilyCSSVar.Title}: ${variables['font-family-title']} !important;
54
69
  --${FontFamilyCSSVar.Header}: ${variables['font-family-header']} !important;
@@ -7,9 +7,10 @@ type FontWeightProps = {
7
7
 
8
8
  export const FontWeight = ({ fontWeightTokens }: FontWeightProps) => {
9
9
  const fontWeightTwMap = {
10
- rg: 'envive-tw-font-rg',
11
- md: 'envive-tw-font-md',
12
- sb: 'envive-tw-font-sb',
10
+ title: 'envive-tw-font-title',
11
+ header: 'envive-tw-font-header',
12
+ body_emphasis: 'envive-tw-font-body_emphasis',
13
+ body_standard: 'envive-tw-font-body_standard',
13
14
  };
14
15
 
15
16
  return (
@@ -7,7 +7,19 @@ type LetterSpacingProps = {
7
7
 
8
8
  export const LetterSpacing = ({ letterSpacingTokens }: LetterSpacingProps) => {
9
9
  const letterSpacingTwMap = {
10
- tight0: 'envive-tw-tracking-tight0',
10
+ t1: 'envive-tw-tracking-t1',
11
+ t2: 'envive-tw-tracking-t2',
12
+ t3: 'envive-tw-tracking-t3',
13
+ h1: 'envive-tw-tracking-h1',
14
+ h2: 'envive-tw-tracking-h2',
15
+ h3: 'envive-tw-tracking-h3',
16
+ b1: 'envive-tw-tracking-b1',
17
+ b2: 'envive-tw-tracking-b2',
18
+ b3: 'envive-tw-tracking-b3',
19
+ b4: 'envive-tw-tracking-b4',
20
+ b5: 'envive-tw-tracking-b5',
21
+ l1: 'envive-tw-tracking-l1',
22
+ l2: 'envive-tw-tracking-l2',
11
23
  };
12
24
 
13
25
  return (
@@ -7,14 +7,19 @@ type LineHeightProps = {
7
7
 
8
8
  export const LineHeight = ({ lineHeightTokens }: LineHeightProps) => {
9
9
  const lineHeightTwMap = {
10
- '124': 'envive-tw-leading-124',
11
- '120': 'envive-tw-leading-120',
12
- '118': 'envive-tw-leading-118',
13
- '116': 'envive-tw-leading-116',
14
- '114': 'envive-tw-leading-114',
15
- '148': 'envive-tw-leading-148',
16
- '140': 'envive-tw-leading-140',
17
- '130': 'envive-tw-leading-130',
10
+ t1: 'envive-tw-leading-t1',
11
+ t2: 'envive-tw-leading-t2',
12
+ t3: 'envive-tw-leading-t3',
13
+ h1: 'envive-tw-leading-h1',
14
+ h2: 'envive-tw-leading-h2',
15
+ h3: 'envive-tw-leading-h3',
16
+ b1: 'envive-tw-leading-b1',
17
+ b2: 'envive-tw-leading-b2',
18
+ b3: 'envive-tw-leading-b3',
19
+ b4: 'envive-tw-leading-b4',
20
+ b5: 'envive-tw-leading-b5',
21
+ l1: 'envive-tw-leading-l1',
22
+ l2: 'envive-tw-leading-l2',
18
23
  };
19
24
  return (
20
25
  <section>
@@ -59,6 +59,7 @@ export interface GetBadgeContentAndLabelParams {
59
59
  onExploreAllResults?: () => void;
60
60
  displayLimit?: number;
61
61
  hideBadgeCount?: boolean;
62
+ isMobile?: boolean;
62
63
  }
63
64
 
64
65
  export interface BadgeContentAndLabel {
@@ -72,6 +73,7 @@ export const getBadgeContentAndLabel = ({
72
73
  onExploreAllResults,
73
74
  hideBadgeCount,
74
75
  displayLimit = MOST_RELEVANT_DISPLAY_LIMIT,
76
+ isMobile = false,
75
77
  }: GetBadgeContentAndLabelParams): BadgeContentAndLabel => {
76
78
  if (hideBadgeCount) {
77
79
  return {
@@ -83,12 +85,16 @@ export const getBadgeContentAndLabel = ({
83
85
  <SalesAgentBadgeContent
84
86
  totalProducts={totalProducts}
85
87
  displayLimit={displayLimit}
86
- onExploreAllResults={onExploreAllResults}
88
+ onExploreAllResults={onExploreAllResults ?? (() => {})}
87
89
  />
88
90
  ) : null;
89
91
 
92
+ // Desktop: show count badge when totalProducts >= 4; Mobile: show when totalProducts >= 3
93
+ const badgeMinThreshold = isMobile ? 3 : 4;
90
94
  const badgeLabel =
91
- !areProductsMoreThanDisplayLimit && totalProducts > 1 ? `${totalProducts} Products` : null;
95
+ !areProductsMoreThanDisplayLimit && totalProducts >= badgeMinThreshold
96
+ ? `${totalProducts} Products`
97
+ : null;
92
98
 
93
99
  return { badgeContent, badgeLabel };
94
100
  };
@@ -6,6 +6,7 @@ import {
6
6
  SalesAgentProductCardVariant,
7
7
  } from '../../SalesAgentProductCard/types/types';
8
8
  import { resolveTheme } from '../../utils/resolveTheme';
9
+ import { useCheckIsMobile } from '../../utils/useCheckIsMobile';
9
10
  import { getProductCarouselDisplayInfo } from '../utils/functions';
10
11
  import { getBadgeContentAndLabel } from './SalesAgentBadgeContent';
11
12
 
@@ -32,6 +33,7 @@ export const SalesAgentProductCardsCarousel = ({
32
33
  onExploreAllResults,
33
34
  }: SalesAgentProductCardsCarouselProps) => {
34
35
  const finalTheme = resolveTheme(theme);
36
+ const { isMobile } = useCheckIsMobile('md');
35
37
  const { totalProducts, areProductsMoreThanDisplayLimit, displayedProducts } =
36
38
  getProductCarouselDisplayInfo(products, numberOfProducts);
37
39
 
@@ -44,13 +46,14 @@ export const SalesAgentProductCardsCarousel = ({
44
46
  totalProducts,
45
47
  areProductsMoreThanDisplayLimit,
46
48
  onExploreAllResults,
49
+ isMobile,
47
50
  });
48
51
 
49
52
  return (
50
53
  <Carousel
51
54
  hideNavigation={hideNavigation}
52
55
  badgeContent={badgeContent}
53
- badgeLabel={badgeLabel}
56
+ badgeLabel={badgeLabel ?? undefined}
54
57
  elements={displayedProducts.map((product, index) => (
55
58
  <SalesAgentProductCard
56
59
  key={product.id ?? `product-${index}`}
@@ -66,7 +69,7 @@ export const SalesAgentProductCardsCarousel = ({
66
69
  url={product.url}
67
70
  target="_blank"
68
71
  theme={finalTheme}
69
- onClick={() => onProductCardClick(product)}
72
+ onClick={() => onProductCardClick?.(product)}
70
73
  />
71
74
  ))}
72
75
  theme={finalTheme}
@@ -169,8 +169,7 @@ export const getProductCarouselDisplayInfo = <T>(
169
169
  } => {
170
170
  const totalProducts = numberOfProducts ?? products.length;
171
171
  const areProductsMoreThanDisplayLimit = totalProducts > displayLimit;
172
- const displayedProducts = areProductsMoreThanDisplayLimit
173
- ? products.slice(0, displayLimit)
174
- : products;
172
+ const maxDisplayed = areProductsMoreThanDisplayLimit ? displayLimit : totalProducts;
173
+ const displayedProducts = products.slice(0, maxDisplayed);
175
174
  return { totalProducts, areProductsMoreThanDisplayLimit, displayedProducts };
176
175
  };
@@ -4,10 +4,11 @@ import { TypographyColor } from '../Typography/types';
4
4
  import { resolveTheme } from '../utils/resolveTheme';
5
5
  import { WidgetTextField } from '../WidgetTextField';
6
6
  import { ProductCardWidgetComponents } from './components';
7
- import { ProductCardProps } from './types';
7
+ import { ProductCardProps, ProductCardVariant } from './types';
8
8
 
9
9
  export const ProductCard = ({
10
10
  theme = Theme.GLOBAL_CUSTOM,
11
+ variant = ProductCardVariant.DARK,
11
12
  imageSrc,
12
13
  headline,
13
14
  italicizeHeadline,
@@ -33,11 +34,14 @@ export const ProductCard = ({
33
34
  onTranscriptionCompleted,
34
35
  }: ProductCardProps) => {
35
36
  const resolvedTheme = resolveTheme(theme);
37
+ const isLight = variant === ProductCardVariant.LIGHT;
38
+ const minimalTextColor = isLight ? TypographyColor.TEXT_PRIMARY : TypographyColor.TEXT_LIGHT;
36
39
 
37
40
  return (
38
41
  <ProductCardWidgetComponents.Poster
39
42
  imageSrc={imageSrc}
40
43
  fallbackColor={fallbackColor}
44
+ variant={variant}
41
45
  >
42
46
  <ProductCardWidgetComponents.Header
43
47
  headline={headline}
@@ -46,6 +50,7 @@ export const ProductCard = ({
46
50
  textTypingDuration={textTypingDuration}
47
51
  textTransition={textTransition}
48
52
  loop={loop}
53
+ variant={variant}
49
54
  />
50
55
  <ProductCardWidgetComponents.Carousel
51
56
  theme={resolvedTheme}
@@ -63,15 +68,14 @@ export const ProductCard = ({
63
68
  <WidgetTextField
64
69
  theme={resolvedTheme}
65
70
  minimalFrame={resolvedTheme === Theme.MINIMAL ? 'bottom-only' : 'full'}
71
+ minimalBorderVariant={isLight ? 'primary' : 'light'}
66
72
  placeholder={placeholder}
67
73
  onClick={onInputClick}
68
74
  enableVoiceInput={voiceInputEnabled}
69
75
  onTranscriptionStarted={onTranscriptionStarted}
70
76
  onTranscriptionCompleted={onTranscriptionCompleted}
71
77
  textColor={
72
- resolvedTheme === Theme.MINIMAL
73
- ? TypographyColor.TEXT_LIGHT
74
- : TypographyColor.TEXT_SECONDARY
78
+ resolvedTheme === Theme.MINIMAL ? minimalTextColor : TypographyColor.TEXT_SECONDARY
75
79
  }
76
80
  className={classNames(
77
81
  resolvedTheme === Theme.MINIMAL
@@ -4,7 +4,7 @@ import { Stack } from '../../Stack';
4
4
  import { Typography, TypographyColor, TypographyVariant } from '../../Typography';
5
5
  import { useAnimatedTextMinHeight } from '../../utils/useAnimatedTextMinHeight';
6
6
  import { useGetHeaderProperties } from '../hooks/useGetHeaderProperties';
7
- import { HeaderProps } from '../types';
7
+ import { HeaderProps, ProductCardVariant } from '../types';
8
8
 
9
9
  export const Header = ({
10
10
  headline,
@@ -13,10 +13,16 @@ export const Header = ({
13
13
  textTypingDuration,
14
14
  textTransition,
15
15
  loop,
16
+ variant = ProductCardVariant.DARK,
16
17
  }: HeaderProps) => {
17
18
  const { stackClasses, headlineClasses } = useGetHeaderProperties(italicizeHeadline);
18
19
  const { measuringRef, minHeight } = useAnimatedTextMinHeight(animatedText);
19
20
 
21
+ const textColor =
22
+ variant === ProductCardVariant.LIGHT
23
+ ? TypographyColor.TEXT_PRIMARY
24
+ : TypographyColor.TEXT_LIGHT;
25
+
20
26
  const biggestText = useMemo(() => {
21
27
  return animatedText.reduce((maxText, currText) => {
22
28
  return currText.length > maxText.length ? currText : maxText;
@@ -27,12 +33,12 @@ export const Header = ({
27
33
  (text: string) => (
28
34
  <Typography
29
35
  variant={TypographyVariant.B3_MD}
30
- color={TypographyColor.TEXT_LIGHT}
36
+ color={textColor}
31
37
  >
32
38
  {text}
33
39
  </Typography>
34
40
  ),
35
- [],
41
+ [textColor],
36
42
  );
37
43
 
38
44
  return (
@@ -42,7 +48,7 @@ export const Header = ({
42
48
  >
43
49
  <Typography
44
50
  variant={TypographyVariant.H1_MD}
45
- color={TypographyColor.TEXT_LIGHT}
51
+ color={textColor}
46
52
  className={headlineClasses}
47
53
  numberOfLines={2}
48
54
  >
@@ -63,7 +69,7 @@ export const Header = ({
63
69
  <div>
64
70
  <Typography
65
71
  variant={TypographyVariant.B3_MD}
66
- color={TypographyColor.TEXT_LIGHT}
72
+ color={textColor}
67
73
  >
68
74
  {biggestText}
69
75
  </Typography>
@@ -1,9 +1,18 @@
1
1
  import { Container } from '../../Container';
2
2
  import { useGetPosterProperties } from '../hooks/useGetPosterProperties';
3
- import { PosterProps } from '../types';
3
+ import { PosterProps, ProductCardVariant } from '../types';
4
4
 
5
- export const Poster = ({ children, imageSrc, fallbackColor }: PosterProps) => {
6
- const { containerStyles, containerClasses } = useGetPosterProperties(imageSrc, fallbackColor);
5
+ export const Poster = ({
6
+ children,
7
+ imageSrc,
8
+ fallbackColor,
9
+ variant = ProductCardVariant.DARK,
10
+ }: PosterProps) => {
11
+ const { containerStyles, containerClasses } = useGetPosterProperties(
12
+ imageSrc,
13
+ fallbackColor,
14
+ variant,
15
+ );
7
16
  return (
8
17
  <Container
9
18
  className={containerClasses}
@@ -1,7 +1,19 @@
1
- const OVERLAY_OPACITY = '60'; // 60%
1
+ import { ProductCardVariant } from '../types';
2
2
 
3
- export const useGetPosterProperties = (imageSrc: string, fallbackColor: string) => {
4
- const overlayColor = `#000000${OVERLAY_OPACITY}`;
3
+ const DARK_OVERLAY_OPACITY = '60'; // ~38% opacity
4
+ const LIGHT_OVERLAY_OPACITY = 'CC'; // 80% opacity
5
+
6
+ export const useGetPosterProperties = (
7
+ imageSrc: string,
8
+ fallbackColor: string,
9
+ variant: ProductCardVariant = ProductCardVariant.DARK,
10
+ ) => {
11
+ const defaultOverlayColor =
12
+ variant === ProductCardVariant.LIGHT
13
+ ? `#FFFFFF${LIGHT_OVERLAY_OPACITY}`
14
+ : `#000000${DARK_OVERLAY_OPACITY}`;
15
+ // CSS variable allows external overrides (e.g. admin preview panel)
16
+ const overlayColor = `var(--envive-product-card-overlay, ${defaultOverlayColor})`;
5
17
  const bgColor = fallbackColor || 'black';
6
18
  const containerStyles: React.CSSProperties = {
7
19
  background: imageSrc
@@ -1,2 +1,3 @@
1
1
  export { ProductCard } from './ProductCard';
2
+ export { ProductCardVariant } from './types';
2
3
  export type { ProductCardProps, InputProps } from './types';