@envive-ai/react-toolkit-v3 0.3.43 → 0.3.44
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/AnimatedText/AnimatedText.d.cts +3 -3
- package/dist/AnimatedText/AnimatedText.d.ts +3 -3
- 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 +3 -3
- package/dist/Carousel/components/Container.js +3 -3
- package/dist/Carousel/components/Item.cjs +4 -1
- package/dist/Carousel/components/Item.js +4 -1
- package/dist/ChatFooter/ChatFooter.cjs +1 -1
- package/dist/ChatFooter/ChatFooter.d.cts +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/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 +56 -56
- package/dist/Container/Container.d.ts +223 -223
- 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 +22 -5
- package/dist/FullPageSalesAgent/FullPageSalesAgent.d.cts +5 -3
- package/dist/FullPageSalesAgent/FullPageSalesAgent.d.ts +5 -3
- package/dist/FullPageSalesAgent/FullPageSalesAgent.js +23 -6
- package/dist/FullPageSalesAgent/components/Layout.cjs +15 -7
- package/dist/FullPageSalesAgent/components/Layout.js +15 -7
- 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.d.cts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts +2 -2
- package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.cjs +1 -1
- package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.js +1 -1
- 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 +6 -6
- package/dist/SalesAgentProductCard/SalesAgentProductCard.d.cts +2 -2
- package/dist/SalesAgentProductCard/components/Container.cjs +16 -12
- package/dist/SalesAgentProductCard/components/Container.js +16 -12
- package/dist/SalesAgentProductCard/components/index.d.cts +8 -8
- package/dist/SalesAgentProductCard/hooks/useGetContainerProperties.cjs +3 -0
- package/dist/SalesAgentProductCard/hooks/useGetContainerProperties.js +3 -0
- package/dist/SalesAgentProductCard/hooks/useGetProductDescriptionProperties.cjs +3 -3
- package/dist/SalesAgentProductCard/hooks/useGetProductDescriptionProperties.js +3 -3
- package/dist/SocialProof/SocialProof.cjs +1 -1
- package/dist/SocialProof/SocialProof.d.cts +2 -2
- package/dist/SocialProof/SocialProof.d.ts +2 -2
- package/dist/SocialProof/SocialProof.js +1 -1
- package/dist/SocialProof/components/Headline.cjs +3 -3
- package/dist/SocialProof/components/Headline.js +3 -3
- package/dist/SocialProof/components/LayoutFourHorizontal.cjs +1 -1
- package/dist/SocialProof/components/LayoutFourHorizontal.js +1 -1
- package/dist/SocialProof/components/LayoutSingle.cjs +1 -1
- package/dist/SocialProof/components/LayoutSingle.js +1 -1
- 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.d.ts +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/Typography/Typography.d.ts +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.cts +2 -2
- package/dist/WidgetWrapper/WidgetWrapper.d.ts +2 -2
- package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.cts +2 -2
- package/package.json +1 -1
- package/src/components/Carousel/components/Container.tsx +1 -1
- package/src/components/Carousel/components/Item.tsx +1 -1
- package/src/components/FullPageSalesAgent/FullPageSalesAgent.tsx +38 -4
- package/src/components/FullPageSalesAgent/components/Layout.tsx +7 -0
- package/src/components/SalesAgentProductCard/components/Container.tsx +15 -5
- package/src/components/SalesAgentProductCard/hooks/useGetContainerProperties.ts +11 -1
- package/src/components/SalesAgentProductCard/hooks/useGetProductDescriptionProperties.ts +8 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WidgetWrapperProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/WidgetWrapper/WidgetWrapper.d.ts
|
|
5
5
|
|
|
@@ -16,6 +16,6 @@ declare const WidgetWrapper: ({
|
|
|
16
16
|
className,
|
|
17
17
|
style,
|
|
18
18
|
...containerProps
|
|
19
|
-
}: WidgetWrapperProps) =>
|
|
19
|
+
}: WidgetWrapperProps) => react_jsx_runtime8.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { WidgetWrapper };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WidgetWrapperWithTitleProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.ts
|
|
5
5
|
declare const WidgetWrapperWithTitle: ({
|
|
@@ -14,6 +14,6 @@ declare const WidgetWrapperWithTitle: ({
|
|
|
14
14
|
hexCardColor,
|
|
15
15
|
hideLogo,
|
|
16
16
|
fullIsLoading
|
|
17
|
-
}: WidgetWrapperWithTitleProps) =>
|
|
17
|
+
}: WidgetWrapperWithTitleProps) => react_jsx_runtime10.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { WidgetWrapperWithTitle };
|
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ChatElementDisplayLocationV3 } from '@envive-ai/react-hooks/application/models';
|
|
2
2
|
import { listeningToSpeechAtom } from '@envive-ai/react-hooks/atoms/chat';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
EnviveMetricsEventName,
|
|
5
|
+
useAmplitude,
|
|
6
|
+
} from '@envive-ai/react-hooks/contexts/amplitudeContext';
|
|
4
7
|
import { HardcopyResponse } from '@envive-ai/react-hooks/contexts/hardcopyContext';
|
|
5
8
|
import { useSalesAgent } from '@envive-ai/react-hooks/contexts/salesAgentContext';
|
|
6
9
|
import {
|
|
@@ -46,6 +49,7 @@ export interface FullPageSalesAgentProps {
|
|
|
46
49
|
widgetConfig: FullPageSalesAgentWidgetV3Config;
|
|
47
50
|
hardcopyContent: HardcopyResponse;
|
|
48
51
|
voiceInputEnabled?: boolean;
|
|
52
|
+
debugBar?: React.ReactNode;
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
export const FullPageSalesAgent = ({
|
|
@@ -55,6 +59,7 @@ export const FullPageSalesAgent = ({
|
|
|
55
59
|
widgetConfig,
|
|
56
60
|
hardcopyContent,
|
|
57
61
|
voiceInputEnabled,
|
|
62
|
+
debugBar,
|
|
58
63
|
}: FullPageSalesAgentProps) => {
|
|
59
64
|
const resolvedTheme = resolveTheme(theme);
|
|
60
65
|
const salesAgentData = useSalesAgent(WidgetInteractionComponent.FULL_PAGE_SALES_AGENT);
|
|
@@ -63,10 +68,11 @@ export const FullPageSalesAgent = ({
|
|
|
63
68
|
const { messageClasses } = useGetMessagesStyles();
|
|
64
69
|
const { isMobile } = useIsMobile();
|
|
65
70
|
const { trackWidgetInteraction } = useWidgetInteraction();
|
|
71
|
+
const { trackEvent } = useAmplitude();
|
|
66
72
|
const { onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } =
|
|
67
73
|
usePromptCarouselAnalytics(WidgetInteractionComponent.FULL_PAGE_SALES_AGENT, text => text);
|
|
68
|
-
const
|
|
69
|
-
(text: string) => {
|
|
74
|
+
const getOverlayStringId = useCallback(
|
|
75
|
+
(text: string): string | undefined => {
|
|
70
76
|
const rawValues = hardcopyContent?.rawValues;
|
|
71
77
|
if (rawValues) {
|
|
72
78
|
for (const raw of Object.values(rawValues)) {
|
|
@@ -75,10 +81,14 @@ export const FullPageSalesAgent = ({
|
|
|
75
81
|
if (found) return found.id;
|
|
76
82
|
}
|
|
77
83
|
}
|
|
78
|
-
return
|
|
84
|
+
return undefined;
|
|
79
85
|
},
|
|
80
86
|
[hardcopyContent?.rawValues],
|
|
81
87
|
);
|
|
88
|
+
const getOverlaySuggestionId = useCallback(
|
|
89
|
+
(text: string) => getOverlayStringId(text) ?? text,
|
|
90
|
+
[getOverlayStringId],
|
|
91
|
+
);
|
|
82
92
|
const {
|
|
83
93
|
onDrag: onOverlayDrag,
|
|
84
94
|
onHover: onOverlayHover,
|
|
@@ -108,6 +118,7 @@ export const FullPageSalesAgent = ({
|
|
|
108
118
|
mobileBackgroundImage,
|
|
109
119
|
desktopBackgroundImage,
|
|
110
120
|
backgroundColor,
|
|
121
|
+
chatBackgroundColor,
|
|
111
122
|
} = widgetConfig;
|
|
112
123
|
|
|
113
124
|
const backgroundStyle = useMemo((): React.CSSProperties => {
|
|
@@ -135,6 +146,13 @@ export const FullPageSalesAgent = ({
|
|
|
135
146
|
isMobile,
|
|
136
147
|
]);
|
|
137
148
|
|
|
149
|
+
const chatBackgroundStyle = useMemo((): React.CSSProperties | undefined => {
|
|
150
|
+
if (chatBackgroundColor) {
|
|
151
|
+
return { backgroundColor: chatBackgroundColor };
|
|
152
|
+
}
|
|
153
|
+
return undefined;
|
|
154
|
+
}, [chatBackgroundColor]);
|
|
155
|
+
|
|
138
156
|
const { agentName } = lookAndFeelConfig;
|
|
139
157
|
|
|
140
158
|
const {
|
|
@@ -292,6 +310,17 @@ export const FullPageSalesAgent = ({
|
|
|
292
310
|
},
|
|
293
311
|
},
|
|
294
312
|
});
|
|
313
|
+
// Also emit Widget Text Clicked so the AI-suggestions bandit attributes the
|
|
314
|
+
// click to the served chip (it joins on response_id + matches by text), the
|
|
315
|
+
// same contract PromptCarousel/SocialProof use.
|
|
316
|
+
trackEvent({
|
|
317
|
+
eventName: EnviveMetricsEventName.WidgetTextClicked,
|
|
318
|
+
eventProps: {
|
|
319
|
+
response_id: hardcopyContent?.responseId,
|
|
320
|
+
string_id: getOverlayStringId(buttonText),
|
|
321
|
+
text: buttonText,
|
|
322
|
+
},
|
|
323
|
+
});
|
|
295
324
|
onTypedMessageSubmitted({
|
|
296
325
|
query: buttonText,
|
|
297
326
|
userTyped: false,
|
|
@@ -304,7 +333,10 @@ export const FullPageSalesAgent = ({
|
|
|
304
333
|
},
|
|
305
334
|
[
|
|
306
335
|
getOverlaySuggestionId,
|
|
336
|
+
getOverlayStringId,
|
|
307
337
|
trackWidgetInteraction,
|
|
338
|
+
trackEvent,
|
|
339
|
+
hardcopyContent?.responseId,
|
|
308
340
|
onTypedMessageSubmitted,
|
|
309
341
|
setListeningToSpeech,
|
|
310
342
|
setAnswerSuggestions,
|
|
@@ -467,10 +499,12 @@ export const FullPageSalesAgent = ({
|
|
|
467
499
|
<FloatingChatComponents.ScrollToBottomButton onClick={handleScrollToBottom} />
|
|
468
500
|
) : undefined
|
|
469
501
|
}
|
|
502
|
+
chatBackgroundStyle={chatBackgroundStyle}
|
|
470
503
|
disclaimer={isResultsView ? null : disclaimer}
|
|
471
504
|
headerContainer={headerContainer}
|
|
472
505
|
autoHeight={autoHeight}
|
|
473
506
|
scrollContainerRef={scrollContainerRef}
|
|
507
|
+
debugBar={debugBar}
|
|
474
508
|
overlay={
|
|
475
509
|
overlayEnabled && showOverlay ? (
|
|
476
510
|
<WelcomeOverlay
|
|
@@ -23,6 +23,9 @@ export interface LayoutProps {
|
|
|
23
23
|
overlay?: React.ReactNode;
|
|
24
24
|
/** Background style applied to the container (background image or color). */
|
|
25
25
|
backgroundStyle?: React.CSSProperties;
|
|
26
|
+
/** Background style applied to the chat container (background image or color). */
|
|
27
|
+
chatBackgroundStyle?: React.CSSProperties;
|
|
28
|
+
debugBar?: React.ReactNode;
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
export const Layout = ({
|
|
@@ -38,6 +41,8 @@ export const Layout = ({
|
|
|
38
41
|
scrollContainerRef,
|
|
39
42
|
overlay,
|
|
40
43
|
backgroundStyle,
|
|
44
|
+
chatBackgroundStyle,
|
|
45
|
+
debugBar,
|
|
41
46
|
}: LayoutProps) => {
|
|
42
47
|
const hasWelcomeMessage = isValidElement(welcomeMessage);
|
|
43
48
|
const hasAnswerSuggestions = isValidElement(answerSuggestions);
|
|
@@ -72,6 +77,7 @@ export const Layout = ({
|
|
|
72
77
|
<Stack
|
|
73
78
|
direction="column"
|
|
74
79
|
gap="0"
|
|
80
|
+
style={{ ...chatBackgroundStyle }}
|
|
75
81
|
className={classNames(
|
|
76
82
|
(!hasWelcomeMessage || (hasWelcomeMessage && theme === Theme.STANDARD)) &&
|
|
77
83
|
!hasAnswerSuggestions &&
|
|
@@ -92,6 +98,7 @@ export const Layout = ({
|
|
|
92
98
|
</div>
|
|
93
99
|
)}
|
|
94
100
|
{footer}
|
|
101
|
+
{debugBar && <div className="envive-debug-bar">{debugBar}</div>}
|
|
95
102
|
</div>
|
|
96
103
|
</div>
|
|
97
104
|
);
|
|
@@ -37,8 +37,13 @@ export const Container = ({
|
|
|
37
37
|
target = '_self',
|
|
38
38
|
onClick,
|
|
39
39
|
}: ContainerProps) => {
|
|
40
|
-
const {
|
|
41
|
-
|
|
40
|
+
const {
|
|
41
|
+
baseClassName,
|
|
42
|
+
themeContainerClassNames,
|
|
43
|
+
containerDirection,
|
|
44
|
+
containerWidthClassName,
|
|
45
|
+
containerHeightClassName,
|
|
46
|
+
} = useGetContainerProperties({ theme, variant });
|
|
42
47
|
|
|
43
48
|
const {
|
|
44
49
|
themeProductDescriptionClassNames,
|
|
@@ -68,13 +73,18 @@ export const Container = ({
|
|
|
68
73
|
testId={testId}
|
|
69
74
|
component="a"
|
|
70
75
|
style={style}
|
|
71
|
-
className={className}
|
|
76
|
+
className={classNames(className, containerHeightClassName)}
|
|
72
77
|
{...(anchorProps as React.ComponentPropsWithoutRef<'a'>)}
|
|
73
78
|
>
|
|
74
79
|
<Stack
|
|
75
80
|
direction={containerDirection}
|
|
76
81
|
gap="0"
|
|
77
|
-
className={classNames(
|
|
82
|
+
className={classNames(
|
|
83
|
+
baseClassName,
|
|
84
|
+
themeContainerClassNames,
|
|
85
|
+
containerWidthClassName,
|
|
86
|
+
containerHeightClassName,
|
|
87
|
+
)}
|
|
78
88
|
>
|
|
79
89
|
{image}
|
|
80
90
|
<Stack
|
|
@@ -83,7 +93,7 @@ export const Container = ({
|
|
|
83
93
|
className={classNames(themeProductDescriptionClassNames, smallVariantClassName)}
|
|
84
94
|
justify={productDescriptionJustify}
|
|
85
95
|
>
|
|
86
|
-
{productName}
|
|
96
|
+
<div className="envive-tw-flex-1">{productName}</div>
|
|
87
97
|
<Stack
|
|
88
98
|
direction="row"
|
|
89
99
|
justify="between"
|
|
@@ -35,5 +35,15 @@ export const useGetContainerProperties = ({ theme, variant }: UseGetContainerPro
|
|
|
35
35
|
return containerWidthClassNameMap[variant] ?? '';
|
|
36
36
|
}, [variant]);
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
const containerHeightClassName = useMemo(() => {
|
|
39
|
+
return variant === SalesAgentProductCardVariant.LARGE ? 'envive-tw-h-full' : '';
|
|
40
|
+
}, [variant]);
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
themeContainerClassNames,
|
|
44
|
+
baseClassName,
|
|
45
|
+
containerDirection,
|
|
46
|
+
containerWidthClassName,
|
|
47
|
+
containerHeightClassName,
|
|
48
|
+
};
|
|
39
49
|
};
|
|
@@ -32,7 +32,11 @@ export const useGetProductDescriptionProperties = ({
|
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
return
|
|
35
|
+
return (
|
|
36
|
+
themeProductDescriptionClassNameMap[
|
|
37
|
+
theme as keyof typeof themeProductDescriptionClassNameMap
|
|
38
|
+
]?.[variant] ?? ''
|
|
39
|
+
);
|
|
36
40
|
}, [theme, variant]);
|
|
37
41
|
|
|
38
42
|
const productDescriptionGap = useMemo(() => {
|
|
@@ -40,12 +44,12 @@ export const useGetProductDescriptionProperties = ({
|
|
|
40
44
|
}, [variant]);
|
|
41
45
|
|
|
42
46
|
const productDescriptionJustify = useMemo(() => {
|
|
43
|
-
return (variant === SalesAgentProductCardVariant.LARGE ? '
|
|
47
|
+
return (variant === SalesAgentProductCardVariant.LARGE ? 'between' : 'center') as StackJustify;
|
|
44
48
|
}, [variant]);
|
|
45
49
|
|
|
46
50
|
const smallVariantClassName = useMemo(() => {
|
|
47
|
-
return
|
|
48
|
-
}, [
|
|
51
|
+
return 'envive-tw-flex-1';
|
|
52
|
+
}, []);
|
|
49
53
|
|
|
50
54
|
return {
|
|
51
55
|
themeProductDescriptionClassNames,
|