@envive-ai/react-toolkit-v3 0.3.40 → 0.3.41

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 (156) hide show
  1. package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.cts +2 -2
  2. package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.ts +2 -2
  3. package/dist/Carousel/Carousel.cjs +1 -1
  4. package/dist/Carousel/Carousel.d.cts +2 -2
  5. package/dist/Carousel/Carousel.d.ts +2 -2
  6. package/dist/Carousel/Carousel.js +1 -1
  7. package/dist/Carousel/components/Container.cjs +2 -2
  8. package/dist/Carousel/components/Container.js +2 -2
  9. package/dist/ChatFooter/ChatFooter.cjs +1 -1
  10. package/dist/ChatFooter/ChatFooter.d.cts +2 -2
  11. package/dist/ChatFooter/ChatFooter.d.ts +2 -2
  12. package/dist/ChatFooter/ChatFooter.js +1 -1
  13. package/dist/ChatFooter/components/Layout.cjs +2 -2
  14. package/dist/ChatFooter/components/Layout.js +2 -2
  15. package/dist/ChatFooter/components/index.d.cts +5 -5
  16. package/dist/ChatFooter/components/index.d.ts +5 -5
  17. package/dist/ChatHeader/ChatHeader.d.cts +2 -2
  18. package/dist/ChatHeader/ChatHeader.d.ts +2 -2
  19. package/dist/ChatHeader/components/Handle.cjs +2 -2
  20. package/dist/ChatHeader/components/Handle.js +2 -2
  21. package/dist/ChatHeader/components/Toggle.cjs +3 -3
  22. package/dist/ChatHeader/components/Toggle.js +3 -3
  23. package/dist/ChatPreview/ChatPreview.cjs +1 -1
  24. package/dist/ChatPreview/ChatPreview.d.cts +2 -2
  25. package/dist/ChatPreview/ChatPreview.d.ts +2 -2
  26. package/dist/ChatPreview/ChatPreview.js +1 -1
  27. package/dist/ChatPreviewComparison/ChatPreviewComparison.cjs +1 -1
  28. package/dist/ChatPreviewComparison/ChatPreviewComparison.d.cts +2 -2
  29. package/dist/ChatPreviewComparison/ChatPreviewComparison.d.ts +2 -2
  30. package/dist/ChatPreviewComparison/ChatPreviewComparison.js +1 -1
  31. package/dist/ChatPreviewComparison/components/Headline.cjs +2 -2
  32. package/dist/ChatPreviewComparison/components/Headline.js +2 -2
  33. package/dist/ChatPreviewComparison/components/Layout.cjs +4 -4
  34. package/dist/ChatPreviewComparison/components/Layout.js +4 -4
  35. package/dist/ChatPreviewComparison/components/Message.cjs +2 -2
  36. package/dist/ChatPreviewComparison/components/Message.js +2 -2
  37. package/dist/ChatPreviewLoading/ChatPreviewLoading.d.cts +2 -2
  38. package/dist/ChatPreviewLoading/ChatPreviewLoading.d.ts +2 -2
  39. package/dist/Container/Container.d.cts +174 -174
  40. package/dist/Container/Container.d.ts +174 -174
  41. package/dist/DesignTokens/DesignTokensComponent.d.cts +2 -2
  42. package/dist/DesignTokens/DesignTokensComponent.d.ts +2 -2
  43. package/dist/Disclaimer/components/Container.cjs +2 -2
  44. package/dist/Disclaimer/components/Container.js +2 -2
  45. package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.cts +2 -2
  46. package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.ts +2 -2
  47. package/dist/DocumentRetrievalCard/components/Layout.cjs +2 -2
  48. package/dist/DocumentRetrievalCard/components/Layout.js +2 -2
  49. package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Icon.cjs +1 -1
  50. package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Icon.js +1 -1
  51. package/dist/FloatingButton/FloatingButton.d.cts +2 -2
  52. package/dist/FloatingButton/FloatingButton.d.ts +2 -2
  53. package/dist/FloatingChat/FloatingChat.d.cts +2 -2
  54. package/dist/FloatingChat/FloatingChat.d.ts +2 -2
  55. package/dist/FloatingChat/components/ChatMessages.cjs +1 -1
  56. package/dist/FloatingChat/components/ChatMessages.js +1 -1
  57. package/dist/FloatingChat/components/Layout.cjs +3 -3
  58. package/dist/FloatingChat/components/Layout.js +3 -3
  59. package/dist/FloatingChat/components/ResultsGridView.cjs +1 -1
  60. package/dist/FloatingChat/components/ResultsGridView.js +1 -1
  61. package/dist/FloatingChat/components/SalesAgentBadgeContent.cjs +1 -1
  62. package/dist/FloatingChat/components/SalesAgentBadgeContent.js +1 -1
  63. package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.cjs +1 -1
  64. package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.js +1 -1
  65. package/dist/FullPageSalesAgent/FullPageSalesAgent.cjs +1 -1
  66. package/dist/FullPageSalesAgent/FullPageSalesAgent.d.cts +2 -2
  67. package/dist/FullPageSalesAgent/FullPageSalesAgent.js +1 -1
  68. package/dist/Image/Image.d.cts +2 -2
  69. package/dist/Image/Image.d.ts +2 -2
  70. package/dist/ImageGallery/ImageGallery.d.cts +2 -2
  71. package/dist/ImageGallery/ImageGallery.d.ts +2 -2
  72. package/dist/ImageGallery/components/Layout.cjs +1 -1
  73. package/dist/ImageGallery/components/Layout.js +1 -1
  74. package/dist/MarkdownProcessor/MarkdownProcessor.d.cts +2 -2
  75. package/dist/MarkdownProcessor/MarkdownProcessor.d.ts +2 -2
  76. package/dist/Message/components/LinkButton.cjs +1 -1
  77. package/dist/Message/components/LinkButton.js +1 -1
  78. package/dist/OrderLookupCard/OrderLookupCard.cjs +1 -1
  79. package/dist/OrderLookupCard/OrderLookupCard.js +1 -1
  80. package/dist/ProductCard/ProductCard.cjs +2 -2
  81. package/dist/ProductCard/ProductCard.d.cts +2 -2
  82. package/dist/ProductCard/ProductCard.d.ts +2 -2
  83. package/dist/ProductCard/ProductCard.js +2 -2
  84. package/dist/PromptButton/PromptButton.d.cts +2 -2
  85. package/dist/PromptButton/PromptButton.d.ts +2 -2
  86. package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.cjs +2 -0
  87. package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.cts +2 -2
  88. package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.js +2 -0
  89. package/dist/PromptButtonCarouselWithImage/components/Layout.cjs +9 -4
  90. package/dist/PromptButtonCarouselWithImage/components/Layout.js +11 -6
  91. package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.cjs +2 -2
  92. package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.js +2 -2
  93. package/dist/PromptCarousel/PromptCarousel.cjs +3 -3
  94. package/dist/PromptCarousel/PromptCarousel.d.cts +2 -2
  95. package/dist/PromptCarousel/PromptCarousel.d.ts +2 -2
  96. package/dist/PromptCarousel/PromptCarousel.js +3 -3
  97. package/dist/ReviewCard/ReviewCard.d.cts +2 -2
  98. package/dist/ReviewCard/ReviewCard.d.ts +2 -2
  99. package/dist/ReviewCard/components/Container.cjs +2 -2
  100. package/dist/ReviewCard/components/Container.js +2 -2
  101. package/dist/ReviewCard/components/ReadMoreButton.cjs +1 -1
  102. package/dist/ReviewCard/components/ReadMoreButton.js +1 -1
  103. package/dist/ReviewCard/components/index.d.cts +6 -6
  104. package/dist/ReviewCard/components/index.d.ts +4 -4
  105. package/dist/SalesAgentProductCard/SalesAgentProductCard.d.cts +2 -2
  106. package/dist/SalesAgentProductCard/SalesAgentProductCard.d.ts +2 -2
  107. package/dist/SalesAgentProductCard/components/Container.cjs +2 -2
  108. package/dist/SalesAgentProductCard/components/Container.js +2 -2
  109. package/dist/SalesAgentProductCard/components/index.d.cts +8 -8
  110. package/dist/SalesAgentProductCard/components/index.d.ts +6 -6
  111. package/dist/SocialProof/SocialProof.cjs +41 -54
  112. package/dist/SocialProof/SocialProof.d.cts +2 -2
  113. package/dist/SocialProof/SocialProof.d.ts +2 -2
  114. package/dist/SocialProof/SocialProof.js +41 -54
  115. package/dist/SocialProof/components/Headline.cjs +3 -3
  116. package/dist/SocialProof/components/Headline.js +3 -3
  117. package/dist/SocialProof/components/LayoutFourHorizontal.cjs +4 -5
  118. package/dist/SocialProof/components/LayoutFourHorizontal.js +4 -5
  119. package/dist/SocialProof/components/LayoutSingle.cjs +5 -4
  120. package/dist/SocialProof/components/LayoutSingle.js +5 -4
  121. package/dist/SocialProof/components/Subheadline.cjs +1 -1
  122. package/dist/SocialProof/components/Subheadline.js +1 -1
  123. package/dist/SparkleAnimation/SparkleAnimation.d.cts +2 -2
  124. package/dist/SparkleAnimation/SparkleAnimation.d.ts +2 -2
  125. package/dist/Stack/Stack.d.cts +2 -2
  126. package/dist/TitledPromptCarousel/TitledPromptCarousel.cjs +1 -1
  127. package/dist/TitledPromptCarousel/TitledPromptCarousel.d.cts +2 -2
  128. package/dist/TitledPromptCarousel/TitledPromptCarousel.js +1 -1
  129. package/dist/Tokens/index.cjs +1 -1
  130. package/dist/Tokens/index.js +1 -1
  131. package/dist/TypingAnimation/TypingAnimation.cjs +1 -1
  132. package/dist/TypingAnimation/TypingAnimation.d.cts +2 -2
  133. package/dist/TypingAnimation/TypingAnimation.d.ts +2 -2
  134. package/dist/TypingAnimation/TypingAnimation.js +1 -1
  135. package/dist/TypingAnimation/hooks/useGetTypographyVariant.cjs +1 -1
  136. package/dist/TypingAnimation/hooks/useGetTypographyVariant.js +1 -1
  137. package/dist/Typography/Typography.d.cts +4 -4
  138. package/dist/WelcomeMessage/components/Container.cjs +2 -2
  139. package/dist/WelcomeMessage/components/Container.js +2 -2
  140. package/dist/WidgetTextField/WidgetTextField.cjs +4 -4
  141. package/dist/WidgetTextField/WidgetTextField.d.cts +2 -2
  142. package/dist/WidgetTextField/WidgetTextField.d.ts +2 -2
  143. package/dist/WidgetTextField/WidgetTextField.js +1 -1
  144. package/dist/WidgetTextField/components/Container.cjs +2 -2
  145. package/dist/WidgetTextField/components/Container.js +2 -2
  146. package/dist/WidgetTextField/components/Icon.cjs +1 -1
  147. package/dist/WidgetTextField/components/Icon.js +1 -1
  148. package/dist/WidgetWrapper/WidgetWrapper.d.ts +2 -2
  149. package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.cts +2 -2
  150. package/package.json +1 -1
  151. package/src/components/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.tsx +2 -0
  152. package/src/components/PromptButtonCarouselWithImage/components/Layout.tsx +17 -10
  153. package/src/components/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.tsx +1 -1
  154. package/src/components/SocialProof/SocialProof.tsx +41 -48
  155. package/src/components/SocialProof/components/LayoutFourHorizontal.tsx +5 -3
  156. package/src/components/SocialProof/components/LayoutSingle.tsx +6 -3
@@ -1,9 +1,9 @@
1
1
  import { ImageGalleryLayout } from '../ImageGallery/types/types';
2
2
  import { PromptButtonVariant } from '../PromptButton';
3
3
  import { PromptCarouselRows } from '../PromptCarousel';
4
- import { Theme } from '../Tokens';
4
+ import { Theme, screensBreakpointsVariables } from '../Tokens';
5
5
  import { resolveTheme } from '../utils/resolveTheme';
6
- import { useCheckIsMobile } from '../utils/useCheckIsMobile';
6
+ import { useGetContentSize } from '../utils/useGetContentSize';
7
7
  import { IconVariant } from '../WidgetTextField/types/types';
8
8
  import { WidgetWrapperVariant } from '../WidgetWrapper';
9
9
  import { WidgetWrapperWithTitle } from '../WidgetWrapperWithTitle/WidgetWrapperWithTitle';
@@ -72,7 +72,12 @@ export const SocialProof = ({
72
72
 
73
73
  const finalTheme = resolveTheme(theme);
74
74
 
75
- const { isMobile } = useCheckIsMobile('sm');
75
+ const { width: containerWidth, ref: containerRef } = useGetContentSize({});
76
+
77
+ const isMobile =
78
+ containerWidth !== undefined
79
+ ? containerWidth < screensBreakpointsVariables.sm
80
+ : typeof window !== 'undefined' && window.innerWidth < screensBreakpointsVariables.sm;
76
81
 
77
82
  const hasDynamicLayout = kind === WidgetKind.DYNAMIC || dynamicLayout !== undefined;
78
83
 
@@ -131,19 +136,9 @@ export const SocialProof = ({
131
136
  />
132
137
  );
133
138
 
134
- if (isFourGridLayout) {
135
- return (
136
- <WidgetWrapperWithTitle
137
- id={id}
138
- testId={testId}
139
- variant={variant}
140
- className={className}
141
- style={style}
142
- titleLabel={titleLabel}
143
- logoSrc={logoSrc}
144
- hexCardColor={hexCardColor}
145
- hideLogo={hideLogo}
146
- >
139
+ const layoutContent = (() => {
140
+ if (isFourGridLayout) {
141
+ return (
147
142
  <SocialProofComponents.LayoutFourGrid
148
143
  hideImage={hideImageGallery}
149
144
  images={images}
@@ -151,46 +146,23 @@ export const SocialProof = ({
151
146
  subheadline={subheadline}
152
147
  textfield={!hideTextField && textfield}
153
148
  />
154
- </WidgetWrapperWithTitle>
155
- );
156
- }
149
+ );
150
+ }
157
151
 
158
- if (isFourHorizontalLayout) {
159
- return (
160
- <WidgetWrapperWithTitle
161
- id={id}
162
- testId={testId}
163
- variant={variant}
164
- className={className}
165
- style={style}
166
- titleLabel={titleLabel}
167
- logoSrc={logoSrc}
168
- hexCardColor={hexCardColor}
169
- hideLogo={hideLogo}
170
- >
152
+ if (isFourHorizontalLayout) {
153
+ return (
171
154
  <SocialProofComponents.LayoutFourHorizontal
172
155
  hideImage={hideImageGallery}
173
156
  images={images}
174
157
  headline={headline}
175
158
  subheadline={subheadline}
176
159
  textfield={!hideTextField && textfield}
160
+ containerWidth={containerWidth}
177
161
  />
178
- </WidgetWrapperWithTitle>
179
- );
180
- }
162
+ );
163
+ }
181
164
 
182
- return (
183
- <WidgetWrapperWithTitle
184
- id={id}
185
- testId={testId}
186
- variant={variant}
187
- className={className}
188
- style={style}
189
- titleLabel={titleLabel}
190
- logoSrc={logoSrc}
191
- hexCardColor={hexCardColor}
192
- hideLogo={hideLogo}
193
- >
165
+ return (
194
166
  <SocialProofComponents.LayoutSingle
195
167
  hideImage={hideImageGallery}
196
168
  dynamicLayout={dynamicLayout}
@@ -198,7 +170,28 @@ export const SocialProof = ({
198
170
  headline={headline}
199
171
  subheadline={subheadline}
200
172
  textfield={!hideTextField && textfield}
173
+ containerWidth={containerWidth}
201
174
  />
202
- </WidgetWrapperWithTitle>
175
+ );
176
+ })();
177
+
178
+ return (
179
+ <div
180
+ ref={containerRef}
181
+ style={style}
182
+ className={className}
183
+ >
184
+ <WidgetWrapperWithTitle
185
+ id={id}
186
+ testId={testId}
187
+ variant={variant}
188
+ titleLabel={titleLabel}
189
+ logoSrc={logoSrc}
190
+ hexCardColor={hexCardColor}
191
+ hideLogo={hideLogo}
192
+ >
193
+ {layoutContent}
194
+ </WidgetWrapperWithTitle>
195
+ </div>
203
196
  );
204
197
  };
@@ -1,5 +1,4 @@
1
1
  import classNames from 'classnames';
2
- import { useCheckIsMobile } from '../../utils/useCheckIsMobile';
3
2
  import { ImageGalleryImage, ImageGalleryLayout } from '../../ImageGallery/types/types';
4
3
  import { useGetContentSize } from '../../utils/useGetContentSize';
5
4
  import { screensBreakpointsVariables } from '../../Tokens';
@@ -15,6 +14,8 @@ export type LayoutFourHorizontalProps = {
15
14
  headline?: React.ReactNode;
16
15
  subheadline?: React.ReactNode;
17
16
  textfield?: React.ReactNode;
17
+
18
+ containerWidth?: number;
18
19
  };
19
20
 
20
21
  export const LayoutFourHorizontal = ({
@@ -23,10 +24,11 @@ export const LayoutFourHorizontal = ({
23
24
  headline,
24
25
  subheadline,
25
26
  textfield,
27
+ containerWidth,
26
28
  }: LayoutFourHorizontalProps) => {
27
- const { isMobile, viewportWidth } = useCheckIsMobile('sm');
29
+ const isMobile = containerWidth !== undefined && containerWidth < screensBreakpointsVariables.sm;
28
30
  const isTablet =
29
- !isMobile && viewportWidth !== undefined && viewportWidth < screensBreakpointsVariables.xl;
31
+ !isMobile && containerWidth !== undefined && containerWidth < screensBreakpointsVariables.xl;
30
32
 
31
33
  const { height, ref } = useGetContentSize({ heightDefault: 170 });
32
34
  const imageGalleryWidth = calculateWidthImageGallery(height, 4, 1);
@@ -1,7 +1,7 @@
1
1
  import { cloneElement } from 'react';
2
2
  import { ImageGalleryImage, ImageGalleryLayout } from '../../ImageGallery/types/types';
3
3
  import { Stack } from '../../Stack';
4
- import { useCheckIsMobile } from '../../utils/useCheckIsMobile';
4
+ import { screensBreakpointsVariables } from '../../Tokens';
5
5
  import { useGetContentSize } from '../../utils/useGetContentSize';
6
6
  import { DynamicLayout } from '../types/types';
7
7
  import { HeadlineProps } from './Headline';
@@ -16,6 +16,8 @@ export type LayoutSingleProps = {
16
16
  headline?: React.ReactNode;
17
17
  subheadline?: React.ReactNode;
18
18
  textfield?: React.ReactNode;
19
+
20
+ containerWidth?: number;
19
21
  };
20
22
 
21
23
  export const LayoutSingle = ({
@@ -25,13 +27,14 @@ export const LayoutSingle = ({
25
27
  headline,
26
28
  subheadline,
27
29
  textfield,
30
+ containerWidth,
28
31
  }: LayoutSingleProps) => {
29
- const { isMobile } = useCheckIsMobile('sm');
32
+ const isMobile = containerWidth !== undefined && containerWidth < screensBreakpointsVariables.sm;
30
33
 
31
34
  const isNarrowLayout =
32
35
  dynamicLayout === DynamicLayout.NARROW || (isMobile && dynamicLayout !== DynamicLayout.WIDE);
33
36
 
34
- const { height, ref } = useGetContentSize({
37
+ const { ref } = useGetContentSize({
35
38
  heightDefault: 245,
36
39
  });
37
40