@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.
- package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.cts +2 -2
- package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.ts +2 -2
- package/dist/Carousel/Carousel.cjs +1 -1
- package/dist/Carousel/Carousel.d.cts +2 -2
- package/dist/Carousel/Carousel.d.ts +2 -2
- package/dist/Carousel/Carousel.js +1 -1
- package/dist/Carousel/components/Container.cjs +2 -2
- package/dist/Carousel/components/Container.js +2 -2
- package/dist/ChatFooter/ChatFooter.cjs +1 -1
- package/dist/ChatFooter/ChatFooter.d.cts +2 -2
- package/dist/ChatFooter/ChatFooter.d.ts +2 -2
- package/dist/ChatFooter/ChatFooter.js +1 -1
- package/dist/ChatFooter/components/Layout.cjs +2 -2
- package/dist/ChatFooter/components/Layout.js +2 -2
- package/dist/ChatFooter/components/index.d.cts +5 -5
- package/dist/ChatFooter/components/index.d.ts +5 -5
- package/dist/ChatHeader/ChatHeader.d.cts +2 -2
- package/dist/ChatHeader/ChatHeader.d.ts +2 -2
- package/dist/ChatHeader/components/Handle.cjs +2 -2
- package/dist/ChatHeader/components/Handle.js +2 -2
- package/dist/ChatHeader/components/Toggle.cjs +3 -3
- package/dist/ChatHeader/components/Toggle.js +3 -3
- package/dist/ChatPreview/ChatPreview.cjs +1 -1
- package/dist/ChatPreview/ChatPreview.d.cts +2 -2
- package/dist/ChatPreview/ChatPreview.d.ts +2 -2
- package/dist/ChatPreview/ChatPreview.js +1 -1
- package/dist/ChatPreviewComparison/ChatPreviewComparison.cjs +1 -1
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.cts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.ts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.js +1 -1
- package/dist/ChatPreviewComparison/components/Headline.cjs +2 -2
- package/dist/ChatPreviewComparison/components/Headline.js +2 -2
- package/dist/ChatPreviewComparison/components/Layout.cjs +4 -4
- package/dist/ChatPreviewComparison/components/Layout.js +4 -4
- package/dist/ChatPreviewComparison/components/Message.cjs +2 -2
- package/dist/ChatPreviewComparison/components/Message.js +2 -2
- package/dist/ChatPreviewLoading/ChatPreviewLoading.d.cts +2 -2
- package/dist/ChatPreviewLoading/ChatPreviewLoading.d.ts +2 -2
- package/dist/Container/Container.d.cts +174 -174
- package/dist/Container/Container.d.ts +174 -174
- package/dist/DesignTokens/DesignTokensComponent.d.cts +2 -2
- package/dist/DesignTokens/DesignTokensComponent.d.ts +2 -2
- package/dist/Disclaimer/components/Container.cjs +2 -2
- package/dist/Disclaimer/components/Container.js +2 -2
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.cts +2 -2
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.ts +2 -2
- package/dist/DocumentRetrievalCard/components/Layout.cjs +2 -2
- package/dist/DocumentRetrievalCard/components/Layout.js +2 -2
- package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Icon.cjs +1 -1
- package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Icon.js +1 -1
- package/dist/FloatingButton/FloatingButton.d.cts +2 -2
- package/dist/FloatingButton/FloatingButton.d.ts +2 -2
- package/dist/FloatingChat/FloatingChat.d.cts +2 -2
- package/dist/FloatingChat/FloatingChat.d.ts +2 -2
- package/dist/FloatingChat/components/ChatMessages.cjs +1 -1
- package/dist/FloatingChat/components/ChatMessages.js +1 -1
- package/dist/FloatingChat/components/Layout.cjs +3 -3
- package/dist/FloatingChat/components/Layout.js +3 -3
- package/dist/FloatingChat/components/ResultsGridView.cjs +1 -1
- package/dist/FloatingChat/components/ResultsGridView.js +1 -1
- package/dist/FloatingChat/components/SalesAgentBadgeContent.cjs +1 -1
- package/dist/FloatingChat/components/SalesAgentBadgeContent.js +1 -1
- package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.cjs +1 -1
- package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.js +1 -1
- package/dist/FullPageSalesAgent/FullPageSalesAgent.cjs +1 -1
- package/dist/FullPageSalesAgent/FullPageSalesAgent.d.cts +2 -2
- package/dist/FullPageSalesAgent/FullPageSalesAgent.js +1 -1
- package/dist/Image/Image.d.cts +2 -2
- package/dist/Image/Image.d.ts +2 -2
- package/dist/ImageGallery/ImageGallery.d.cts +2 -2
- package/dist/ImageGallery/ImageGallery.d.ts +2 -2
- package/dist/ImageGallery/components/Layout.cjs +1 -1
- package/dist/ImageGallery/components/Layout.js +1 -1
- package/dist/MarkdownProcessor/MarkdownProcessor.d.cts +2 -2
- package/dist/MarkdownProcessor/MarkdownProcessor.d.ts +2 -2
- package/dist/Message/components/LinkButton.cjs +1 -1
- package/dist/Message/components/LinkButton.js +1 -1
- package/dist/OrderLookupCard/OrderLookupCard.cjs +1 -1
- package/dist/OrderLookupCard/OrderLookupCard.js +1 -1
- package/dist/ProductCard/ProductCard.cjs +2 -2
- package/dist/ProductCard/ProductCard.d.cts +2 -2
- package/dist/ProductCard/ProductCard.d.ts +2 -2
- package/dist/ProductCard/ProductCard.js +2 -2
- package/dist/PromptButton/PromptButton.d.cts +2 -2
- package/dist/PromptButton/PromptButton.d.ts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.cjs +2 -0
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.cts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.js +2 -0
- package/dist/PromptButtonCarouselWithImage/components/Layout.cjs +9 -4
- package/dist/PromptButtonCarouselWithImage/components/Layout.js +11 -6
- package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.cjs +2 -2
- package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.js +2 -2
- package/dist/PromptCarousel/PromptCarousel.cjs +3 -3
- package/dist/PromptCarousel/PromptCarousel.d.cts +2 -2
- package/dist/PromptCarousel/PromptCarousel.d.ts +2 -2
- package/dist/PromptCarousel/PromptCarousel.js +3 -3
- package/dist/ReviewCard/ReviewCard.d.cts +2 -2
- package/dist/ReviewCard/ReviewCard.d.ts +2 -2
- package/dist/ReviewCard/components/Container.cjs +2 -2
- package/dist/ReviewCard/components/Container.js +2 -2
- package/dist/ReviewCard/components/ReadMoreButton.cjs +1 -1
- package/dist/ReviewCard/components/ReadMoreButton.js +1 -1
- package/dist/ReviewCard/components/index.d.cts +6 -6
- package/dist/ReviewCard/components/index.d.ts +4 -4
- package/dist/SalesAgentProductCard/SalesAgentProductCard.d.cts +2 -2
- package/dist/SalesAgentProductCard/SalesAgentProductCard.d.ts +2 -2
- package/dist/SalesAgentProductCard/components/Container.cjs +2 -2
- package/dist/SalesAgentProductCard/components/Container.js +2 -2
- package/dist/SalesAgentProductCard/components/index.d.cts +8 -8
- package/dist/SalesAgentProductCard/components/index.d.ts +6 -6
- package/dist/SocialProof/SocialProof.cjs +41 -54
- package/dist/SocialProof/SocialProof.d.cts +2 -2
- package/dist/SocialProof/SocialProof.d.ts +2 -2
- package/dist/SocialProof/SocialProof.js +41 -54
- package/dist/SocialProof/components/Headline.cjs +3 -3
- package/dist/SocialProof/components/Headline.js +3 -3
- package/dist/SocialProof/components/LayoutFourHorizontal.cjs +4 -5
- package/dist/SocialProof/components/LayoutFourHorizontal.js +4 -5
- package/dist/SocialProof/components/LayoutSingle.cjs +5 -4
- package/dist/SocialProof/components/LayoutSingle.js +5 -4
- package/dist/SocialProof/components/Subheadline.cjs +1 -1
- package/dist/SocialProof/components/Subheadline.js +1 -1
- package/dist/SparkleAnimation/SparkleAnimation.d.cts +2 -2
- package/dist/SparkleAnimation/SparkleAnimation.d.ts +2 -2
- package/dist/Stack/Stack.d.cts +2 -2
- package/dist/TitledPromptCarousel/TitledPromptCarousel.cjs +1 -1
- package/dist/TitledPromptCarousel/TitledPromptCarousel.d.cts +2 -2
- package/dist/TitledPromptCarousel/TitledPromptCarousel.js +1 -1
- package/dist/Tokens/index.cjs +1 -1
- package/dist/Tokens/index.js +1 -1
- package/dist/TypingAnimation/TypingAnimation.cjs +1 -1
- package/dist/TypingAnimation/TypingAnimation.d.cts +2 -2
- package/dist/TypingAnimation/TypingAnimation.d.ts +2 -2
- package/dist/TypingAnimation/TypingAnimation.js +1 -1
- package/dist/TypingAnimation/hooks/useGetTypographyVariant.cjs +1 -1
- package/dist/TypingAnimation/hooks/useGetTypographyVariant.js +1 -1
- package/dist/Typography/Typography.d.cts +4 -4
- package/dist/WelcomeMessage/components/Container.cjs +2 -2
- package/dist/WelcomeMessage/components/Container.js +2 -2
- package/dist/WidgetTextField/WidgetTextField.cjs +4 -4
- package/dist/WidgetTextField/WidgetTextField.d.cts +2 -2
- package/dist/WidgetTextField/WidgetTextField.d.ts +2 -2
- package/dist/WidgetTextField/WidgetTextField.js +1 -1
- package/dist/WidgetTextField/components/Container.cjs +2 -2
- package/dist/WidgetTextField/components/Container.js +2 -2
- package/dist/WidgetTextField/components/Icon.cjs +1 -1
- package/dist/WidgetTextField/components/Icon.js +1 -1
- package/dist/WidgetWrapper/WidgetWrapper.d.ts +2 -2
- package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.cts +2 -2
- package/package.json +1 -1
- package/src/components/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.tsx +2 -0
- package/src/components/PromptButtonCarouselWithImage/components/Layout.tsx +17 -10
- package/src/components/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.tsx +1 -1
- package/src/components/SocialProof/SocialProof.tsx +41 -48
- package/src/components/SocialProof/components/LayoutFourHorizontal.tsx +5 -3
- 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 {
|
|
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 {
|
|
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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
157
151
|
|
|
158
|
-
|
|
159
|
-
|
|
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
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
162
|
+
);
|
|
163
|
+
}
|
|
181
164
|
|
|
182
|
-
|
|
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
|
-
|
|
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
|
|
29
|
+
const isMobile = containerWidth !== undefined && containerWidth < screensBreakpointsVariables.sm;
|
|
28
30
|
const isTablet =
|
|
29
|
-
!isMobile &&
|
|
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 {
|
|
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
|
|
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 {
|
|
37
|
+
const { ref } = useGetContentSize({
|
|
35
38
|
heightDefault: 245,
|
|
36
39
|
});
|
|
37
40
|
|