@envive-ai/react-toolkit-v3 0.3.31 → 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 (219) 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/useGetDefaultCssVariables.cjs +165 -60
  5. package/dist/CSSVariablesEditor/hooks/useGetDefaultCssVariables.js +165 -60
  6. package/dist/CSSVariablesEditor/hooks/useHandleUpdateCssVars.cjs +30 -15
  7. package/dist/CSSVariablesEditor/hooks/useHandleUpdateCssVars.js +30 -15
  8. package/dist/Carousel/Carousel.cjs +1 -1
  9. package/dist/Carousel/Carousel.d.cts +2 -2
  10. package/dist/Carousel/Carousel.d.ts +2 -2
  11. package/dist/Carousel/Carousel.js +1 -1
  12. package/dist/Carousel/components/Container.cjs +2 -2
  13. package/dist/Carousel/components/Container.js +2 -2
  14. package/dist/ChatFooter/ChatFooter.cjs +1 -1
  15. package/dist/ChatFooter/ChatFooter.d.cts +2 -2
  16. package/dist/ChatFooter/ChatFooter.d.ts +2 -2
  17. package/dist/ChatFooter/ChatFooter.js +1 -1
  18. package/dist/ChatFooter/components/Layout.cjs +2 -2
  19. package/dist/ChatFooter/components/Layout.js +2 -2
  20. package/dist/ChatFooter/components/index.d.cts +5 -5
  21. package/dist/ChatFooter/components/index.d.ts +5 -5
  22. package/dist/ChatHeader/ChatHeader.d.cts +2 -2
  23. package/dist/ChatHeader/ChatHeader.d.ts +2 -2
  24. package/dist/ChatHeader/components/Handle.cjs +2 -2
  25. package/dist/ChatHeader/components/Handle.js +2 -2
  26. package/dist/ChatHeader/components/Toggle.cjs +3 -3
  27. package/dist/ChatHeader/components/Toggle.js +3 -3
  28. package/dist/ChatPreview/ChatPreview.cjs +1 -1
  29. package/dist/ChatPreview/ChatPreview.d.cts +2 -2
  30. package/dist/ChatPreview/ChatPreview.d.ts +2 -2
  31. package/dist/ChatPreview/ChatPreview.js +1 -1
  32. package/dist/ChatPreviewComparison/ChatPreviewComparison.cjs +1 -1
  33. package/dist/ChatPreviewComparison/ChatPreviewComparison.d.cts +2 -2
  34. package/dist/ChatPreviewComparison/ChatPreviewComparison.d.ts +2 -2
  35. package/dist/ChatPreviewComparison/ChatPreviewComparison.js +1 -1
  36. package/dist/ChatPreviewComparison/components/Headline.cjs +2 -2
  37. package/dist/ChatPreviewComparison/components/Headline.js +2 -2
  38. package/dist/ChatPreviewComparison/components/Layout.cjs +4 -4
  39. package/dist/ChatPreviewComparison/components/Layout.js +4 -4
  40. package/dist/ChatPreviewComparison/components/Message.cjs +2 -2
  41. package/dist/ChatPreviewComparison/components/Message.js +2 -2
  42. package/dist/ChatPreviewLoading/ChatPreviewLoading.d.cts +2 -2
  43. package/dist/ChatPreviewLoading/ChatPreviewLoading.d.ts +2 -2
  44. package/dist/Container/Container.d.cts +175 -175
  45. package/dist/Container/Container.d.ts +175 -175
  46. package/dist/DesignTokens/DesignTokensComponent.d.cts +2 -2
  47. package/dist/DesignTokens/DesignTokensComponent.d.ts +2 -2
  48. package/dist/DesignTokens/components/FontWeight.cjs +4 -3
  49. package/dist/DesignTokens/components/FontWeight.js +4 -3
  50. package/dist/DesignTokens/components/LetterSpacing.cjs +15 -1
  51. package/dist/DesignTokens/components/LetterSpacing.js +15 -1
  52. package/dist/DesignTokens/components/LineHeight.cjs +13 -8
  53. package/dist/DesignTokens/components/LineHeight.js +13 -8
  54. package/dist/Disclaimer/components/Container.cjs +2 -2
  55. package/dist/Disclaimer/components/Container.js +2 -2
  56. package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.cts +2 -2
  57. package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.ts +2 -2
  58. package/dist/DocumentRetrievalCard/components/Layout.cjs +2 -2
  59. package/dist/DocumentRetrievalCard/components/Layout.js +2 -2
  60. package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Icon.cjs +1 -1
  61. package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Icon.js +1 -1
  62. package/dist/FloatingButton/FloatingButton.d.cts +2 -2
  63. package/dist/FloatingButton/FloatingButton.d.ts +2 -2
  64. package/dist/FloatingChat/FloatingChat.d.cts +2 -2
  65. package/dist/FloatingChat/FloatingChat.d.ts +2 -2
  66. package/dist/FloatingChat/components/ChatMessages.cjs +1 -1
  67. package/dist/FloatingChat/components/ChatMessages.js +1 -1
  68. package/dist/FloatingChat/components/Layout.cjs +3 -3
  69. package/dist/FloatingChat/components/Layout.js +3 -3
  70. package/dist/FloatingChat/components/ResultsGridView.cjs +1 -1
  71. package/dist/FloatingChat/components/ResultsGridView.js +1 -1
  72. package/dist/FloatingChat/components/SalesAgentBadgeContent.cjs +4 -4
  73. package/dist/FloatingChat/components/SalesAgentBadgeContent.js +4 -4
  74. package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.cjs +6 -3
  75. package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.js +6 -3
  76. package/dist/FloatingChat/utils/functions.cjs +2 -1
  77. package/dist/FloatingChat/utils/functions.js +2 -1
  78. package/dist/FullPageSalesAgent/FullPageSalesAgent.cjs +1 -1
  79. package/dist/FullPageSalesAgent/FullPageSalesAgent.d.cts +2 -2
  80. package/dist/FullPageSalesAgent/FullPageSalesAgent.d.ts +2 -2
  81. package/dist/FullPageSalesAgent/FullPageSalesAgent.js +1 -1
  82. package/dist/Image/Image.d.cts +2 -2
  83. package/dist/Image/Image.d.ts +2 -2
  84. package/dist/ImageGallery/ImageGallery.d.cts +2 -2
  85. package/dist/ImageGallery/ImageGallery.d.ts +2 -2
  86. package/dist/ImageGallery/components/Layout.cjs +1 -1
  87. package/dist/ImageGallery/components/Layout.js +1 -1
  88. package/dist/MarkdownProcessor/MarkdownProcessor.d.cts +2 -2
  89. package/dist/MarkdownProcessor/MarkdownProcessor.d.ts +2 -2
  90. package/dist/Message/components/LinkButton.cjs +1 -1
  91. package/dist/Message/components/LinkButton.js +1 -1
  92. package/dist/OrderLookupCard/OrderLookupCard.cjs +1 -1
  93. package/dist/OrderLookupCard/OrderLookupCard.js +1 -1
  94. package/dist/ProductCard/ProductCard.cjs +15 -9
  95. package/dist/ProductCard/ProductCard.d.cts +3 -2
  96. package/dist/ProductCard/ProductCard.d.ts +3 -2
  97. package/dist/ProductCard/ProductCard.js +11 -5
  98. package/dist/ProductCard/components/Header.cjs +7 -5
  99. package/dist/ProductCard/components/Header.js +7 -5
  100. package/dist/ProductCard/components/Poster.cjs +3 -2
  101. package/dist/ProductCard/components/Poster.js +3 -2
  102. package/dist/ProductCard/hooks/useGetPosterProperties.cjs +5 -3
  103. package/dist/ProductCard/hooks/useGetPosterProperties.js +6 -3
  104. package/dist/ProductCard/index.cjs +3 -1
  105. package/dist/ProductCard/index.d.cts +2 -2
  106. package/dist/ProductCard/index.d.ts +2 -2
  107. package/dist/ProductCard/index.js +2 -1
  108. package/dist/ProductCard/types/index.cjs +10 -0
  109. package/dist/ProductCard/types/index.d.cts +13 -3
  110. package/dist/ProductCard/types/index.d.ts +13 -3
  111. package/dist/ProductCard/types/index.js +9 -0
  112. package/dist/PromptButton/PromptButton.d.cts +2 -2
  113. package/dist/PromptButton/PromptButton.d.ts +2 -2
  114. package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.cts +2 -2
  115. package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts +2 -2
  116. package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.cjs +1 -1
  117. package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.js +1 -1
  118. package/dist/PromptCarousel/PromptCarousel.cjs +3 -3
  119. package/dist/PromptCarousel/PromptCarousel.d.cts +2 -2
  120. package/dist/PromptCarousel/PromptCarousel.d.ts +2 -2
  121. package/dist/PromptCarousel/PromptCarousel.js +3 -3
  122. package/dist/ReviewCard/ReviewCard.d.cts +2 -2
  123. package/dist/ReviewCard/ReviewCard.d.ts +2 -2
  124. package/dist/ReviewCard/components/Container.cjs +2 -2
  125. package/dist/ReviewCard/components/Container.js +2 -2
  126. package/dist/ReviewCard/components/ReadMoreButton.cjs +1 -1
  127. package/dist/ReviewCard/components/ReadMoreButton.js +1 -1
  128. package/dist/ReviewCard/components/index.d.cts +6 -6
  129. package/dist/ReviewCard/components/index.d.ts +6 -6
  130. package/dist/SalesAgentProductCard/SalesAgentProductCard.d.cts +2 -2
  131. package/dist/SalesAgentProductCard/SalesAgentProductCard.d.ts +2 -2
  132. package/dist/SalesAgentProductCard/components/Container.cjs +2 -2
  133. package/dist/SalesAgentProductCard/components/Container.js +2 -2
  134. package/dist/SalesAgentProductCard/components/index.d.cts +8 -8
  135. package/dist/SalesAgentProductCard/components/index.d.ts +8 -8
  136. package/dist/SocialProof/SocialProof.cjs +1 -1
  137. package/dist/SocialProof/SocialProof.d.cts +2 -2
  138. package/dist/SocialProof/SocialProof.d.ts +2 -2
  139. package/dist/SocialProof/SocialProof.js +1 -1
  140. package/dist/SocialProof/components/Headline.cjs +3 -3
  141. package/dist/SocialProof/components/Headline.js +3 -3
  142. package/dist/SocialProof/components/LayoutFourHorizontal.cjs +1 -1
  143. package/dist/SocialProof/components/LayoutFourHorizontal.js +1 -1
  144. package/dist/SocialProof/components/Subheadline.cjs +1 -1
  145. package/dist/SocialProof/components/Subheadline.js +1 -1
  146. package/dist/SocialProof/hooks/useSocialProofCount.cjs +2 -1
  147. package/dist/SocialProof/hooks/useSocialProofCount.js +2 -1
  148. package/dist/SparkleAnimation/SparkleAnimation.d.cts +2 -2
  149. package/dist/SparkleAnimation/SparkleAnimation.d.ts +2 -2
  150. package/dist/Stack/Stack.d.cts +2 -2
  151. package/dist/Stack/Stack.d.ts +2 -2
  152. package/dist/TitledPromptCarousel/TitledPromptCarousel.cjs +1 -1
  153. package/dist/TitledPromptCarousel/TitledPromptCarousel.d.cts +2 -2
  154. package/dist/TitledPromptCarousel/TitledPromptCarousel.d.ts +2 -2
  155. package/dist/TitledPromptCarousel/TitledPromptCarousel.js +1 -1
  156. package/dist/Tokens/index.cjs +1 -1
  157. package/dist/Tokens/index.js +1 -1
  158. package/dist/TypingAnimation/TypingAnimation.cjs +1 -1
  159. package/dist/TypingAnimation/TypingAnimation.d.cts +2 -2
  160. package/dist/TypingAnimation/TypingAnimation.d.ts +2 -2
  161. package/dist/TypingAnimation/TypingAnimation.js +1 -1
  162. package/dist/TypingAnimation/hooks/useGetTypographyVariant.cjs +1 -1
  163. package/dist/TypingAnimation/hooks/useGetTypographyVariant.js +1 -1
  164. package/dist/Typography/Typography.d.cts +4 -4
  165. package/dist/Typography/Typography.d.ts +4 -4
  166. package/dist/WelcomeMessage/components/Container.cjs +2 -2
  167. package/dist/WelcomeMessage/components/Container.js +2 -2
  168. package/dist/WidgetTextField/WidgetTextField.cjs +5 -4
  169. package/dist/WidgetTextField/WidgetTextField.d.cts +3 -2
  170. package/dist/WidgetTextField/WidgetTextField.d.ts +3 -2
  171. package/dist/WidgetTextField/WidgetTextField.js +3 -2
  172. package/dist/WidgetTextField/components/Container.cjs +5 -4
  173. package/dist/WidgetTextField/components/Container.js +5 -4
  174. package/dist/WidgetTextField/components/Icon.cjs +1 -1
  175. package/dist/WidgetTextField/components/Icon.js +1 -1
  176. package/dist/WidgetTextField/hooks/useGetContainerProperties.cjs +7 -3
  177. package/dist/WidgetTextField/hooks/useGetContainerProperties.js +7 -3
  178. package/dist/WidgetTextField/types/types.d.cts +2 -0
  179. package/dist/WidgetTextField/types/types.d.ts +2 -0
  180. package/dist/WidgetWrapper/WidgetWrapper.d.cts +2 -2
  181. package/dist/WidgetWrapper/WidgetWrapper.d.ts +2 -2
  182. package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.cts +2 -2
  183. package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.ts +2 -2
  184. package/dist/packages/components-v3/tokens/typography/fontWeight.cjs +12 -9
  185. package/dist/packages/components-v3/tokens/typography/fontWeight.d.ts +4 -3
  186. package/dist/packages/components-v3/tokens/typography/fontWeight.js +12 -9
  187. package/dist/packages/components-v3/tokens/typography/letterSpacing.cjs +39 -6
  188. package/dist/packages/components-v3/tokens/typography/letterSpacing.d.ts +13 -2
  189. package/dist/packages/components-v3/tokens/typography/letterSpacing.js +39 -6
  190. package/dist/packages/components-v3/tokens/typography/lineHeight.cjs +39 -30
  191. package/dist/packages/components-v3/tokens/typography/lineHeight.d.ts +15 -12
  192. package/dist/packages/components-v3/tokens/typography/lineHeight.js +39 -30
  193. package/dist/packages/components-v3/tokens/typography/typography.cjs +63 -63
  194. package/dist/packages/components-v3/tokens/typography/typography.js +63 -63
  195. package/dist/styles.css +1 -1
  196. package/dist/tokens/typography/fontWeight.d.cts +4 -3
  197. package/dist/tokens/typography/letterSpacing.d.cts +13 -2
  198. package/dist/tokens/typography/lineHeight.d.cts +15 -12
  199. package/package.json +1 -1
  200. package/src/components/CSSVariablesEditor/hooks/useGetDefaultCssVariables.ts +165 -60
  201. package/src/components/CSSVariablesEditor/hooks/useHandleUpdateCssVars.ts +30 -15
  202. package/src/components/DesignTokens/components/FontWeight.tsx +4 -3
  203. package/src/components/DesignTokens/components/LetterSpacing.tsx +13 -1
  204. package/src/components/DesignTokens/components/LineHeight.tsx +13 -8
  205. package/src/components/FloatingChat/components/SalesAgentBadgeContent.tsx +8 -2
  206. package/src/components/FloatingChat/components/SalesAgentProductCardsCarousel.tsx +5 -2
  207. package/src/components/FloatingChat/utils/functions.ts +2 -3
  208. package/src/components/ProductCard/ProductCard.tsx +8 -4
  209. package/src/components/ProductCard/components/Header.tsx +11 -5
  210. package/src/components/ProductCard/components/Poster.tsx +12 -3
  211. package/src/components/ProductCard/hooks/useGetPosterProperties.ts +15 -3
  212. package/src/components/ProductCard/index.ts +1 -0
  213. package/src/components/ProductCard/types/index.ts +13 -1
  214. package/src/components/SocialProof/components/Headline.tsx +1 -1
  215. package/src/components/SocialProof/hooks/useSocialProofCount.ts +5 -2
  216. package/src/components/WidgetTextField/WidgetTextField.tsx +2 -0
  217. package/src/components/WidgetTextField/components/Container.tsx +3 -0
  218. package/src/components/WidgetTextField/hooks/useGetContainerProperties.ts +8 -2
  219. package/src/components/WidgetTextField/types/types.ts +2 -0
@@ -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';
@@ -2,6 +2,11 @@ import React from 'react';
2
2
  import { Theme } from '../../../../tokens/theme/theme';
3
3
  import { PromptButtonVariant } from '../../PromptButton';
4
4
 
5
+ export enum ProductCardVariant {
6
+ DARK = 'dark',
7
+ LIGHT = 'light',
8
+ }
9
+
5
10
  /**
6
11
  * Props for the Carousel component.
7
12
  */
@@ -70,6 +75,8 @@ export interface HeaderProps {
70
75
  textTransition?: number;
71
76
  /** Whether the animation should loop continuously. */
72
77
  loop?: boolean;
78
+ /** Controls text color: dark uses text-light (white), light uses text-primary. */
79
+ variant?: ProductCardVariant;
73
80
  }
74
81
 
75
82
  /**
@@ -82,6 +89,8 @@ export interface PosterProps {
82
89
  imageSrc: string;
83
90
  /** Fallback background color to display if the image fails to load. */
84
91
  fallbackColor?: string;
92
+ /** Controls overlay color on the image: dark uses black overlay, light uses white overlay. */
93
+ variant?: ProductCardVariant;
85
94
  }
86
95
 
87
96
  /**
@@ -116,4 +125,7 @@ export interface InputIconProps {
116
125
  * Excludes the 'children' prop from PosterProps.
117
126
  */
118
127
  export interface ProductCardProps
119
- extends InputProps, CarouselProps, HeaderProps, Omit<PosterProps, 'children'> {}
128
+ extends InputProps, CarouselProps, HeaderProps, Omit<PosterProps, 'children'> {
129
+ /** Controls text color: dark uses text-light (white), light uses text-primary. Defaults to dark. */
130
+ variant?: ProductCardVariant;
131
+ }
@@ -11,7 +11,7 @@ export type HeadlineProps = {
11
11
  theme: Theme;
12
12
  isLoading?: boolean;
13
13
  className?: string;
14
- socialProofCounter: string;
14
+ socialProofCounter: string | string[];
15
15
  socialProofHeadline: string;
16
16
  primaryPromptButtonText: string;
17
17
  primaryPromptButtonVariant: PromptButtonVariant;
@@ -67,8 +67,11 @@ export const useSocialProofCount = ({
67
67
  }, [pageVariant, countKey, id]);
68
68
 
69
69
  // For safety ensure that the replacement string occurs in the string for now
70
- const finalCustomerText = numberOfCustomersText.includes('{count}')
71
- ? numberOfCustomersText
70
+ const numberOfCustomerString = Array.isArray(numberOfCustomersText)
71
+ ? numberOfCustomersText[0]
72
+ : numberOfCustomersText;
73
+ const finalCustomerText = numberOfCustomerString.includes('{count}')
74
+ ? numberOfCustomerString
72
75
  : DEFAULT_CUSTOMER_TEXT;
73
76
  return finalCustomerText.replace('{count}', customerCount.toString());
74
77
  };
@@ -19,6 +19,7 @@ export const WidgetTextField = ({
19
19
  voiceInputClassName,
20
20
  theme = Theme.GLOBAL_CUSTOM,
21
21
  minimalFrame = 'full',
22
+ minimalBorderVariant,
22
23
  iconVariant = IconVariant.DEFAULT,
23
24
  textColor = TypographyColor.TEXT_SECONDARY,
24
25
  placeholder,
@@ -80,6 +81,7 @@ export const WidgetTextField = ({
80
81
  className={className}
81
82
  theme={resolvedTheme}
82
83
  minimalFrame={minimalFrame}
84
+ minimalBorderVariant={minimalBorderVariant}
83
85
  disabled={disabled}
84
86
  ariaLabel={ariaLabel}
85
87
  icon={
@@ -12,6 +12,7 @@ type ContainerProps = {
12
12
  className?: string;
13
13
  theme: Theme;
14
14
  minimalFrame?: 'full' | 'bottom-only';
15
+ minimalBorderVariant?: 'light' | 'primary';
15
16
  ariaLabel?: string;
16
17
  icon: React.ReactNode;
17
18
  text: React.ReactNode;
@@ -27,6 +28,7 @@ export const Container = ({
27
28
  className,
28
29
  theme,
29
30
  minimalFrame,
31
+ minimalBorderVariant,
30
32
  ariaLabel,
31
33
  icon,
32
34
  text,
@@ -38,6 +40,7 @@ export const Container = ({
38
40
  useGetContainerProperties({
39
41
  theme,
40
42
  minimalFrame,
43
+ minimalBorderVariant,
41
44
  });
42
45
 
43
46
  const { handleKeyDown } = useHandleKeyboard({ onClick });
@@ -4,19 +4,25 @@ import { Theme } from '../../../../tokens/theme/theme';
4
4
  export type UseGetContainerPropertiesProps = {
5
5
  theme: Theme;
6
6
  minimalFrame?: 'full' | 'bottom-only';
7
+ minimalBorderVariant?: 'light' | 'primary';
7
8
  };
8
9
 
9
10
  export const useGetContainerProperties = ({
10
11
  theme,
11
12
  minimalFrame = 'full',
13
+ minimalBorderVariant = 'light',
12
14
  }: UseGetContainerPropertiesProps) => {
13
15
  const baseClassName =
14
16
  'envive-tw-cursor-text envive-tw-border-solid envive-tw-px-4 envive-tw-py-2 envive-tw-bg-[--envive-colors-background-light]';
15
17
 
16
18
  const themeContainerClassName = useMemo(() => {
19
+ const borderColorClass =
20
+ minimalBorderVariant === 'primary'
21
+ ? 'envive-tw-border-text-primary'
22
+ : 'envive-tw-border-text-light';
17
23
  const minimalBorderClass =
18
24
  minimalFrame === 'bottom-only'
19
- ? 'envive-tw-border-b-[1px] envive-tw-border-text-light'
25
+ ? `envive-tw-border-b-[1px] ${borderColorClass}`
20
26
  : 'envive-tw-border-[1px] envive-tw-border-border-light';
21
27
 
22
28
  const themeCotainerMap = {
@@ -27,7 +33,7 @@ export const useGetContainerProperties = ({
27
33
  [Theme.GLOBAL_CUSTOM]: '',
28
34
  };
29
35
  return themeCotainerMap[theme] ?? '';
30
- }, [theme, minimalFrame]);
36
+ }, [theme, minimalFrame, minimalBorderVariant]);
31
37
 
32
38
  const containerWrapperClassName =
33
39
  'envive-tw-gap-4 envive-tw-flex envive-tw-w-full envive-tw-flex-row';
@@ -36,6 +36,8 @@ export type WidgetTextFieldProps = {
36
36
  * @default 'full'
37
37
  */
38
38
  minimalFrame?: 'full' | 'bottom-only';
39
+ /** Border color for the bottom-only minimal frame. `light` = text-light (white), `primary` = text-primary. @default 'light' */
40
+ minimalBorderVariant?: 'light' | 'primary';
39
41
  /** Placeholder text displayed in the text field. */
40
42
  placeholder?: string;
41
43
  /** Accessible label for screen readers. If not provided, the placeholder will be used. */