@envive-ai/react-toolkit-v3 0.3.15 → 0.3.16
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/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/ChatFooter/hooks/useGetContainerProperties.cjs +1 -1
- package/dist/ChatFooter/hooks/useGetContainerProperties.js +1 -1
- package/dist/ChatHeader/ChatHeader.d.cts +2 -2
- package/dist/ChatHeader/components/Handle.cjs +8 -6
- package/dist/ChatHeader/components/Handle.js +8 -6
- package/dist/ChatHeader/components/Toggle.cjs +3 -3
- package/dist/ChatHeader/components/Toggle.js +3 -3
- package/dist/ChatPreview/ChatPreview.cjs +15 -6
- package/dist/ChatPreview/ChatPreview.d.cts +2 -2
- package/dist/ChatPreview/ChatPreview.d.ts +2 -2
- package/dist/ChatPreview/ChatPreview.js +15 -6
- package/dist/ChatPreview/components/Message.cjs +3 -2
- package/dist/ChatPreview/components/Message.js +3 -2
- package/dist/ChatPreview/types/types.d.cts +34 -2
- package/dist/ChatPreview/types/types.d.ts +34 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.cjs +12 -5
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.cts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.ts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.js +12 -5
- 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 +5 -4
- package/dist/ChatPreviewComparison/components/Message.js +5 -4
- package/dist/ChatPreviewComparison/types/types.d.cts +34 -1
- package/dist/ChatPreviewComparison/types/types.d.ts +34 -1
- package/dist/ChatPreviewLoading/ChatPreviewLoading.cjs +1 -1
- package/dist/ChatPreviewLoading/ChatPreviewLoading.d.cts +2 -2
- package/dist/ChatPreviewLoading/ChatPreviewLoading.d.ts +2 -2
- package/dist/ChatPreviewLoading/ChatPreviewLoading.js +1 -1
- package/dist/Container/Container.d.cts +173 -173
- package/dist/Container/Container.d.ts +173 -173
- 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.cjs +4 -8
- package/dist/FloatingChat/FloatingChat.d.cts +2 -2
- package/dist/FloatingChat/FloatingChat.d.ts +2 -2
- package/dist/FloatingChat/FloatingChat.js +4 -8
- package/dist/FloatingChat/components/AgentMessage.cjs +1 -2
- package/dist/FloatingChat/components/AgentMessage.js +1 -2
- package/dist/FloatingChat/components/ChatMessages.cjs +2 -3
- package/dist/FloatingChat/components/ChatMessages.js +2 -3
- package/dist/FloatingChat/components/Layout.cjs +3 -3
- package/dist/FloatingChat/components/Layout.js +3 -3
- package/dist/FloatingChat/components/ModalSheet.cjs +13 -3
- package/dist/FloatingChat/components/ModalSheet.js +14 -4
- package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.cjs +2 -3
- package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.js +2 -3
- package/dist/FloatingChat/hooks/useFilteredChatMessages.cjs +1 -1
- package/dist/FloatingChat/hooks/useFilteredChatMessages.js +1 -1
- package/dist/FloatingChat/hooks/useSnapControl.cjs +17 -16
- package/dist/FloatingChat/hooks/useSnapControl.js +17 -16
- package/dist/FloatingChat/hooks/useSnapSetup.cjs +9 -27
- package/dist/FloatingChat/hooks/useSnapSetup.js +10 -28
- package/dist/FloatingChat/snapConstants.cjs +10 -0
- package/dist/FloatingChat/snapConstants.js +7 -0
- package/dist/FullPageSalesAgent/FullPageSalesAgent.cjs +6 -3
- package/dist/FullPageSalesAgent/FullPageSalesAgent.d.ts +2 -2
- package/dist/FullPageSalesAgent/FullPageSalesAgent.js +6 -3
- package/dist/FullPageSalesAgent/components/Layout.cjs +3 -1
- package/dist/FullPageSalesAgent/components/Layout.js +3 -1
- package/dist/FullPageSalesAgent/hooks/useGetFooterStyles.cjs +2 -1
- package/dist/FullPageSalesAgent/hooks/useGetFooterStyles.js +2 -1
- package/dist/FullPageSalesAgent/hooks/useGetMessagesStyles.cjs +10 -0
- package/dist/FullPageSalesAgent/hooks/useGetMessagesStyles.js +10 -0
- package/dist/FullPageSalesAgent/hooks/useGetScrollContentStyles.cjs +4 -2
- package/dist/FullPageSalesAgent/hooks/useGetScrollContentStyles.js +4 -2
- 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/components/Layout.cjs +1 -1
- package/dist/ImageGallery/components/Layout.js +1 -1
- package/dist/MarkdownProcessor/MarkdownProcessor.cjs +2 -1
- package/dist/MarkdownProcessor/MarkdownProcessor.d.cts +2 -2
- package/dist/MarkdownProcessor/MarkdownProcessor.d.ts +2 -2
- package/dist/MarkdownProcessor/MarkdownProcessor.js +2 -1
- 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 +10 -4
- package/dist/ProductCard/ProductCard.d.cts +8 -2
- package/dist/ProductCard/ProductCard.d.ts +8 -2
- package/dist/ProductCard/ProductCard.js +10 -4
- package/dist/ProductCard/components/Carousel.cjs +9 -3
- package/dist/ProductCard/components/Carousel.js +9 -3
- package/dist/ProductCard/types/index.d.cts +34 -0
- package/dist/ProductCard/types/index.d.ts +34 -0
- 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.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 +6 -6
- package/dist/SalesAgentProductCard/components/index.d.ts +6 -6
- package/dist/SocialProof/SocialProof.cjs +5 -5
- package/dist/SocialProof/SocialProof.d.cts +2 -2
- package/dist/SocialProof/SocialProof.d.ts +2 -2
- package/dist/SocialProof/SocialProof.js +2 -2
- 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/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.ts +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 +9 -3
- package/dist/TypingAnimation/TypingAnimation.d.cts +2 -2
- package/dist/TypingAnimation/TypingAnimation.d.ts +2 -2
- package/dist/TypingAnimation/TypingAnimation.js +9 -3
- package/dist/TypingAnimation/hooks/useGetTypographyVariant.cjs +1 -1
- package/dist/TypingAnimation/hooks/useGetTypographyVariant.js +1 -1
- package/dist/TypingAnimation/types/index.d.cts +28 -0
- package/dist/TypingAnimation/types/index.d.ts +28 -0
- 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 +1 -1
- 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 +3 -3
- package/dist/WidgetTextField/components/Icon.js +3 -3
- 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/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.ts +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/ChatFooter/__tests__/ChatFooter.test.tsx +3 -0
- package/src/components/ChatFooter/hooks/useGetContainerProperties.ts +1 -1
- package/src/components/ChatHeader/components/Handle.tsx +14 -4
- package/src/components/ChatPreview/ChatPreview.tsx +27 -6
- package/src/components/ChatPreview/__tests__/ChatPreview.test.tsx +16 -5
- package/src/components/ChatPreview/components/Message.tsx +3 -1
- package/src/components/ChatPreview/types/types.ts +35 -2
- package/src/components/ChatPreviewComparison/ChatPreviewComparison.tsx +23 -6
- package/src/components/ChatPreviewComparison/__tests__/ChatPreviewComparison.test.tsx +16 -5
- package/src/components/ChatPreviewComparison/components/Message.tsx +7 -1
- package/src/components/ChatPreviewComparison/types/types.ts +35 -1
- package/src/components/FloatingChat/FloatingChat.tsx +3 -9
- package/src/components/FloatingChat/components/AgentMessage.tsx +0 -3
- package/src/components/FloatingChat/components/ChatMessages.tsx +0 -3
- package/src/components/FloatingChat/components/ModalSheet.tsx +18 -10
- package/src/components/FloatingChat/components/SalesAgentProductCardsCarousel.tsx +1 -5
- package/src/components/FloatingChat/hooks/useFilteredChatMessages.ts +2 -2
- package/src/components/FloatingChat/hooks/useScrollToBottom.ts +1 -0
- package/src/components/FloatingChat/hooks/useSnapControl.ts +17 -22
- package/src/components/FloatingChat/hooks/useSnapSetup.ts +16 -37
- package/src/components/FloatingChat/snapConstants.ts +7 -0
- package/src/components/FullPageSalesAgent/FullPageSalesAgent.tsx +5 -2
- package/src/components/FullPageSalesAgent/components/Layout.tsx +3 -1
- package/src/components/FullPageSalesAgent/hooks/useGetFooterStyles.ts +7 -2
- package/src/components/FullPageSalesAgent/hooks/useGetMessagesStyles.ts +11 -0
- package/src/components/FullPageSalesAgent/hooks/useGetScrollContentStyles.ts +5 -1
- package/src/components/MarkdownProcessor/MarkdownProcessor.tsx +1 -1
- package/src/components/Message/__tests__/Message.test.tsx +3 -3
- package/src/components/ProductCard/ProductCard.tsx +13 -1
- package/src/components/ProductCard/__tests__/ProductCard.test.tsx +73 -1
- package/src/components/ProductCard/components/Carousel.tsx +13 -1
- package/src/components/ProductCard/types/index.ts +34 -0
- package/src/components/TypingAnimation/TypingAnimation.tsx +22 -7
- package/src/components/TypingAnimation/types/index.ts +29 -0
- package/src/components/WidgetTextField/components/Icon.tsx +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Theme } from "../packages/components-v3/tokens/theme/theme.js";
|
|
2
|
-
import { resolveTheme } from "../utils/resolveTheme.js";
|
|
3
2
|
import "../Tokens/index.js";
|
|
3
|
+
import { resolveTheme } from "../utils/resolveTheme.js";
|
|
4
4
|
import { usePromptCarouselAnalytics } from "../PromptCarousel/hooks/usePromptCarouselAnalytics.js";
|
|
5
5
|
import { PromptButtonVariant } from "../PromptButton/types/index.js";
|
|
6
6
|
import "../PromptButton/index.js";
|
|
@@ -19,6 +19,7 @@ import "../WelcomeMessage/index.js";
|
|
|
19
19
|
import { useIsMobile } from "./hooks/useIsMobile.js";
|
|
20
20
|
import { useGetFooterStyles } from "./hooks/useGetFooterStyles.js";
|
|
21
21
|
import { FullPageSAComponents } from "./components/index.js";
|
|
22
|
+
import { useGetMessagesStyles } from "./hooks/useGetMessagesStyles.js";
|
|
22
23
|
import { useRef, useState } from "react";
|
|
23
24
|
import { jsx } from "react/jsx-runtime";
|
|
24
25
|
import { EnviveMetricsEventName } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
@@ -33,7 +34,8 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
|
|
|
33
34
|
const salesAgentData = useSalesAgent(WidgetInteractionComponent.FULL_PAGE_SALES_AGENT);
|
|
34
35
|
const [query, setQuery] = useState("");
|
|
35
36
|
const chatMessagesRef = useRef(null);
|
|
36
|
-
const { footerStyles } = useGetFooterStyles();
|
|
37
|
+
const { footerStyles, footerClasses } = useGetFooterStyles();
|
|
38
|
+
const { messageClasses } = useGetMessagesStyles();
|
|
37
39
|
const { isMobile } = useIsMobile();
|
|
38
40
|
const { trackWidgetInteraction } = useWidgetInteraction();
|
|
39
41
|
const { onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = usePromptCarouselAnalytics(WidgetInteractionComponent.FULL_PAGE_SALES_AGENT, (text) => text);
|
|
@@ -84,7 +86,7 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
|
|
|
84
86
|
theme: resolvedTheme
|
|
85
87
|
});
|
|
86
88
|
const footer = /* @__PURE__ */ jsx(ChatFooter, {
|
|
87
|
-
className:
|
|
89
|
+
className: footerClasses,
|
|
88
90
|
style: footerStyles,
|
|
89
91
|
theme: resolvedTheme,
|
|
90
92
|
isScrolled: isMobile ? isFloatingLayout : false,
|
|
@@ -114,6 +116,7 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
|
|
|
114
116
|
parentWidget: WidgetInteractionComponent.FULL_PAGE_SALES_AGENT
|
|
115
117
|
});
|
|
116
118
|
const chatMessages = /* @__PURE__ */ jsx(FloatingChatComponents.ChatMessages, {
|
|
119
|
+
className: messageClasses,
|
|
117
120
|
theme: resolvedTheme,
|
|
118
121
|
ref: chatMessagesRef,
|
|
119
122
|
isLoading: isPendingResponse && !isResponseStreaming,
|
|
@@ -3,6 +3,7 @@ const require_theme = require('../../packages/components-v3/tokens/theme/theme.c
|
|
|
3
3
|
const require_Stack = require('../../Stack/Stack.cjs');
|
|
4
4
|
require('../../Stack/index.cjs');
|
|
5
5
|
const require_useGetContainerStyles = require('../hooks/useGetContainerStyles.cjs');
|
|
6
|
+
const require_useIsMobile = require('../hooks/useIsMobile.cjs');
|
|
6
7
|
const require_useGetFooterStyles = require('../hooks/useGetFooterStyles.cjs');
|
|
7
8
|
const require_useGetScrollContentStyles = require('../hooks/useGetScrollContentStyles.cjs');
|
|
8
9
|
let react = require("react");
|
|
@@ -14,6 +15,7 @@ classnames = require_rolldown_runtime.__toESM(classnames);
|
|
|
14
15
|
const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions, scrollToBottomButton, disclaimer, headerContainer, autoHeight }) => {
|
|
15
16
|
const hasWelcomeMessage = (0, react.isValidElement)(welcomeMessage);
|
|
16
17
|
const hasAnswerSuggestions = (0, react.isValidElement)(answerSuggestions);
|
|
18
|
+
const { isMobile } = require_useIsMobile.useIsMobile();
|
|
17
19
|
const { contentClasses, messageContainerClasses } = require_useGetScrollContentStyles.useGetScrollContentStyles();
|
|
18
20
|
const { footerContainerClasses } = require_useGetFooterStyles.useGetFooterStyles();
|
|
19
21
|
const { containerClasses, containerStyles } = require_useGetContainerStyles.useGetContainerStyles({
|
|
@@ -33,7 +35,7 @@ const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions
|
|
|
33
35
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Stack.Stack, {
|
|
34
36
|
direction: "column",
|
|
35
37
|
gap: "0",
|
|
36
|
-
className: (0, classnames.default)((!hasWelcomeMessage || hasWelcomeMessage && theme === require_theme.Theme.STANDARD) && !hasAnswerSuggestions && "envive-tw-pb-4", "envive-tw-pt-4"),
|
|
38
|
+
className: (0, classnames.default)((!hasWelcomeMessage || hasWelcomeMessage && theme === require_theme.Theme.STANDARD) && !hasAnswerSuggestions && "envive-tw-pb-4", isMobile ? "envive-tw-pt-4" : "envive-tw-pt-6"),
|
|
37
39
|
children: [chatMessages, answerSuggestions]
|
|
38
40
|
})]
|
|
39
41
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -2,6 +2,7 @@ import { Theme } from "../../packages/components-v3/tokens/theme/theme.js";
|
|
|
2
2
|
import { Stack } from "../../Stack/Stack.js";
|
|
3
3
|
import "../../Stack/index.js";
|
|
4
4
|
import { useGetContainerStyles } from "../hooks/useGetContainerStyles.js";
|
|
5
|
+
import { useIsMobile } from "../hooks/useIsMobile.js";
|
|
5
6
|
import { useGetFooterStyles } from "../hooks/useGetFooterStyles.js";
|
|
6
7
|
import { useGetScrollContentStyles } from "../hooks/useGetScrollContentStyles.js";
|
|
7
8
|
import { isValidElement } from "react";
|
|
@@ -12,6 +13,7 @@ import classNames from "classnames";
|
|
|
12
13
|
const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions, scrollToBottomButton, disclaimer, headerContainer, autoHeight }) => {
|
|
13
14
|
const hasWelcomeMessage = isValidElement(welcomeMessage);
|
|
14
15
|
const hasAnswerSuggestions = isValidElement(answerSuggestions);
|
|
16
|
+
const { isMobile } = useIsMobile();
|
|
15
17
|
const { contentClasses, messageContainerClasses } = useGetScrollContentStyles();
|
|
16
18
|
const { footerContainerClasses } = useGetFooterStyles();
|
|
17
19
|
const { containerClasses, containerStyles } = useGetContainerStyles({
|
|
@@ -31,7 +33,7 @@ const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions
|
|
|
31
33
|
}), /* @__PURE__ */ jsxs(Stack, {
|
|
32
34
|
direction: "column",
|
|
33
35
|
gap: "0",
|
|
34
|
-
className: classNames((!hasWelcomeMessage || hasWelcomeMessage && theme === Theme.STANDARD) && !hasAnswerSuggestions && "envive-tw-pb-4", "envive-tw-pt-4"),
|
|
36
|
+
className: classNames((!hasWelcomeMessage || hasWelcomeMessage && theme === Theme.STANDARD) && !hasAnswerSuggestions && "envive-tw-pb-4", isMobile ? "envive-tw-pt-4" : "envive-tw-pt-6"),
|
|
35
37
|
children: [chatMessages, answerSuggestions]
|
|
36
38
|
})]
|
|
37
39
|
}), /* @__PURE__ */ jsxs("div", {
|
|
@@ -8,7 +8,8 @@ const useGetFooterStyles = () => {
|
|
|
8
8
|
boxShadow: "0px 2px 10px 0px rgba(0, 0, 0, 0.2)",
|
|
9
9
|
borderWidth: "1px"
|
|
10
10
|
} : null,
|
|
11
|
-
|
|
11
|
+
footerClasses: isMobile ? "envive-tw-rounded-t-[var(--envive-global-custom-border-radius)]" : "envive-tw-rounded-[var(--envive-global-custom-border-radius)]",
|
|
12
|
+
footerContainerClasses: isMobile ? "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-[0] envive-tw-left-[0] envive-tw-right-[0]" : "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-5 envive-tw-left-[calc((100vw-768px)/2)] envive-tw-right-[calc((100vw-768px)/2)] envive-tw-max-w-[768px]"
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
15
|
|
|
@@ -8,7 +8,8 @@ const useGetFooterStyles = () => {
|
|
|
8
8
|
boxShadow: "0px 2px 10px 0px rgba(0, 0, 0, 0.2)",
|
|
9
9
|
borderWidth: "1px"
|
|
10
10
|
} : null,
|
|
11
|
-
|
|
11
|
+
footerClasses: isMobile ? "envive-tw-rounded-t-[var(--envive-global-custom-border-radius)]" : "envive-tw-rounded-[var(--envive-global-custom-border-radius)]",
|
|
12
|
+
footerContainerClasses: isMobile ? "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-[0] envive-tw-left-[0] envive-tw-right-[0]" : "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-5 envive-tw-left-[calc((100vw-768px)/2)] envive-tw-right-[calc((100vw-768px)/2)] envive-tw-max-w-[768px]"
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
15
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const require_useIsMobile = require('./useIsMobile.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/components/FullPageSalesAgent/hooks/useGetMessagesStyles.ts
|
|
4
|
+
const useGetMessagesStyles = () => {
|
|
5
|
+
const { isMobile } = require_useIsMobile.useIsMobile();
|
|
6
|
+
return { messageClasses: !isMobile ? "!envive-tw-gap-6" : "" };
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.useGetMessagesStyles = useGetMessagesStyles;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useIsMobile } from "./useIsMobile.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/FullPageSalesAgent/hooks/useGetMessagesStyles.ts
|
|
4
|
+
const useGetMessagesStyles = () => {
|
|
5
|
+
const { isMobile } = useIsMobile();
|
|
6
|
+
return { messageClasses: !isMobile ? "!envive-tw-gap-6" : "" };
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { useGetMessagesStyles };
|
|
@@ -9,9 +9,11 @@ const useGetScrollContentStyles = () => {
|
|
|
9
9
|
return {
|
|
10
10
|
contentClasses: (0, classnames.default)({
|
|
11
11
|
"envive-tw-flex-1 envive-tw-overflow-y-auto envive-tw-overflow-x-hidden envive-tw-transition-all envive-tw-duration-300 envive-tw-ease-in-out": true,
|
|
12
|
-
"envive-tw-
|
|
12
|
+
"envive-tw-mb-5": !isMobile,
|
|
13
|
+
"envive-tw-pb-[131px]": isMobile,
|
|
14
|
+
"envive-tw-pb-[150px]": !isMobile
|
|
13
15
|
}),
|
|
14
|
-
messageContainerClasses: !isMobile ? "envive-tw-
|
|
16
|
+
messageContainerClasses: !isMobile ? "envive-tw-rounded-[var(--envive-global-custom-border-radius)] envive-tw-mt-4 envive-tw-overflow-hidden" : "envive-tw-rounded-[var(--envive-global-custom-border-radius)] envive-tw-mx-4 envive-tw-overflow-hidden"
|
|
15
17
|
};
|
|
16
18
|
};
|
|
17
19
|
|
|
@@ -7,9 +7,11 @@ const useGetScrollContentStyles = () => {
|
|
|
7
7
|
return {
|
|
8
8
|
contentClasses: classNames({
|
|
9
9
|
"envive-tw-flex-1 envive-tw-overflow-y-auto envive-tw-overflow-x-hidden envive-tw-transition-all envive-tw-duration-300 envive-tw-ease-in-out": true,
|
|
10
|
-
"envive-tw-
|
|
10
|
+
"envive-tw-mb-5": !isMobile,
|
|
11
|
+
"envive-tw-pb-[131px]": isMobile,
|
|
12
|
+
"envive-tw-pb-[150px]": !isMobile
|
|
11
13
|
}),
|
|
12
|
-
messageContainerClasses: !isMobile ? "envive-tw-
|
|
14
|
+
messageContainerClasses: !isMobile ? "envive-tw-rounded-[var(--envive-global-custom-border-radius)] envive-tw-mt-4 envive-tw-overflow-hidden" : "envive-tw-rounded-[var(--envive-global-custom-border-radius)] envive-tw-mx-4 envive-tw-overflow-hidden"
|
|
13
15
|
};
|
|
14
16
|
};
|
|
15
17
|
|
package/dist/Image/Image.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Image/Image.d.ts
|
|
5
5
|
|
|
@@ -25,6 +25,6 @@ declare const Image: ({
|
|
|
25
25
|
role,
|
|
26
26
|
"aria-hidden": ariaHidden,
|
|
27
27
|
...rest
|
|
28
|
-
}: ImageProps) =>
|
|
28
|
+
}: ImageProps) => react_jsx_runtime2.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Image };
|
package/dist/Image/Image.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageProps } from "./types/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime30 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Image/Image.d.ts
|
|
5
5
|
|
|
@@ -25,6 +25,6 @@ declare const Image: ({
|
|
|
25
25
|
role,
|
|
26
26
|
"aria-hidden": ariaHidden,
|
|
27
27
|
...rest
|
|
28
|
-
}: ImageProps) =>
|
|
28
|
+
}: ImageProps) => react_jsx_runtime30.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Image };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageGalleryProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ImageGallery/ImageGallery.d.ts
|
|
5
5
|
|
|
@@ -40,6 +40,6 @@ declare const ImageGallery: ({
|
|
|
40
40
|
"aria-describedby": ariaDescribedBy,
|
|
41
41
|
role,
|
|
42
42
|
"aria-hidden": ariaHidden
|
|
43
|
-
}: ImageGalleryProps) =>
|
|
43
|
+
}: ImageGalleryProps) => react_jsx_runtime10.JSX.Element;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { ImageGallery };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_theme = require('../../packages/components-v3/tokens/theme/theme.cjs');
|
|
3
|
-
const require_useResponsiveValue = require('../../utils/useResponsiveValue.cjs');
|
|
4
3
|
const require_Container = require('../../Container/Container.cjs');
|
|
4
|
+
const require_useResponsiveValue = require('../../utils/useResponsiveValue.cjs');
|
|
5
5
|
const require_useCheckIsMobile = require('../../utils/useCheckIsMobile.cjs');
|
|
6
6
|
const require_types = require('../types/types.cjs');
|
|
7
7
|
const require_useGetContainerProperties = require('../hooks/useGetContainerProperties.cjs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Theme } from "../../packages/components-v3/tokens/theme/theme.js";
|
|
2
|
-
import { useResponsiveValue } from "../../utils/useResponsiveValue.js";
|
|
3
2
|
import { Container } from "../../Container/Container.js";
|
|
3
|
+
import { useResponsiveValue } from "../../utils/useResponsiveValue.js";
|
|
4
4
|
import { useCheckIsMobile } from "../../utils/useCheckIsMobile.js";
|
|
5
5
|
import { ImageGalleryLayout } from "../types/types.js";
|
|
6
6
|
import { useGetContainerProperties } from "../hooks/useGetContainerProperties.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarkdownProcessorProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/MarkdownProcessor/MarkdownProcessor.d.ts
|
|
5
5
|
declare const MarkdownProcessor: ({
|
|
@@ -8,6 +8,6 @@ declare const MarkdownProcessor: ({
|
|
|
8
8
|
textColor,
|
|
9
9
|
textVariant,
|
|
10
10
|
onLinkClick
|
|
11
|
-
}: MarkdownProcessorProps) =>
|
|
11
|
+
}: MarkdownProcessorProps) => react_jsx_runtime15.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { MarkdownProcessor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarkdownProcessorProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/MarkdownProcessor/MarkdownProcessor.d.ts
|
|
5
5
|
declare const MarkdownProcessor: ({
|
|
@@ -8,6 +8,6 @@ declare const MarkdownProcessor: ({
|
|
|
8
8
|
textColor,
|
|
9
9
|
textVariant,
|
|
10
10
|
onLinkClick
|
|
11
|
-
}: MarkdownProcessorProps) =>
|
|
11
|
+
}: MarkdownProcessorProps) => react_jsx_runtime22.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { MarkdownProcessor };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_CustomIcon = require('../../utils/CustomIcon.cjs');
|
|
2
3
|
const require_index = require('../../Typography/types/index.cjs');
|
|
3
4
|
const require_Typography = require('../../Typography/Typography.cjs');
|
|
4
5
|
require('../../Typography/index.cjs');
|
|
5
|
-
const require_CustomIcon = require('../../utils/CustomIcon.cjs');
|
|
6
6
|
const require_useGetLinkButtonIconProperties = require('../hooks/useGetLinkButtonIconProperties.cjs');
|
|
7
7
|
const require_useGetLinkButtonProperties = require('../hooks/useGetLinkButtonProperties.cjs');
|
|
8
8
|
const require_openUrlInNewTab = require('../utils/openUrlInNewTab.cjs');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { CustomIcon } from "../../utils/CustomIcon.js";
|
|
1
2
|
import { TypographyColor, TypographyVariant } from "../../Typography/types/index.js";
|
|
2
3
|
import { Typography } from "../../Typography/Typography.js";
|
|
3
4
|
import "../../Typography/index.js";
|
|
4
|
-
import { CustomIcon } from "../../utils/CustomIcon.js";
|
|
5
5
|
import { useGetLinkButtonIconProperties } from "../hooks/useGetLinkButtonIconProperties.js";
|
|
6
6
|
import { useGetLinkButtonProperties } from "../hooks/useGetLinkButtonProperties.js";
|
|
7
7
|
import { openUrlInNewTab } from "../utils/openUrlInNewTab.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_theme = require('../packages/components-v3/tokens/theme/theme.cjs');
|
|
3
|
+
const require_resolveTheme = require('../utils/resolveTheme.cjs');
|
|
3
4
|
const require_Stack = require('../Stack/Stack.cjs');
|
|
4
5
|
require('../Stack/index.cjs');
|
|
5
|
-
const require_resolveTheme = require('../utils/resolveTheme.cjs');
|
|
6
6
|
const require_useGetImageBorderRadiusProperties = require('./hooks/useGetImageBorderRadiusProperties.cjs');
|
|
7
7
|
const require_index = require('./components/index.cjs');
|
|
8
8
|
const require_useGetContainerProperties = require('./hooks/useGetContainerProperties.cjs');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Theme } from "../packages/components-v3/tokens/theme/theme.js";
|
|
2
|
+
import { resolveTheme } from "../utils/resolveTheme.js";
|
|
2
3
|
import { Stack } from "../Stack/Stack.js";
|
|
3
4
|
import "../Stack/index.js";
|
|
4
|
-
import { resolveTheme } from "../utils/resolveTheme.js";
|
|
5
5
|
import { useGetImageBorderRadiusProperties } from "./hooks/useGetImageBorderRadiusProperties.js";
|
|
6
6
|
import { OrderLookupCardComponents } from "./components/index.js";
|
|
7
7
|
import { useGetContainerProperties } from "./hooks/useGetContainerProperties.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_theme = require('../packages/components-v3/tokens/theme/theme.cjs');
|
|
3
|
-
const require_index = require('../Typography/types/index.cjs');
|
|
4
|
-
const require_resolveTheme = require('../utils/resolveTheme.cjs');
|
|
5
3
|
require('../Tokens/index.cjs');
|
|
4
|
+
const require_resolveTheme = require('../utils/resolveTheme.cjs');
|
|
5
|
+
const require_index = require('../Typography/types/index.cjs');
|
|
6
6
|
const require_WidgetTextField = require('../WidgetTextField/WidgetTextField.cjs');
|
|
7
7
|
require('../WidgetTextField/index.cjs');
|
|
8
8
|
const require_index$1 = require('./components/index.cjs');
|
|
@@ -11,7 +11,7 @@ let classnames = require("classnames");
|
|
|
11
11
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
12
12
|
|
|
13
13
|
//#region src/components/ProductCard/ProductCard.tsx
|
|
14
|
-
const ProductCard = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, imageSrc, headline, italicizeHeadline, animatedText, prompts, promptButtonType, carouselId, fallbackColor, placeholder, textTypingDuration, textTransition, loop, onSelect, onInputClick }) => {
|
|
14
|
+
const ProductCard = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, imageSrc, headline, italicizeHeadline, animatedText, prompts, promptButtonType, carouselId, fallbackColor, placeholder, textTypingDuration, textTransition, loop, onSelect, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd, onInputClick }) => {
|
|
15
15
|
const resolvedTheme = require_resolveTheme.resolveTheme(theme);
|
|
16
16
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_index$1.ProductCardWidgetComponents.Poster, {
|
|
17
17
|
imageSrc,
|
|
@@ -30,7 +30,13 @@ const ProductCard = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, imageSrc, head
|
|
|
30
30
|
carouselId,
|
|
31
31
|
prompts,
|
|
32
32
|
promptButtonType,
|
|
33
|
-
onSelect
|
|
33
|
+
onSelect,
|
|
34
|
+
onDrag,
|
|
35
|
+
onHover,
|
|
36
|
+
onMouseDown,
|
|
37
|
+
onMouseUp,
|
|
38
|
+
onTouchStart,
|
|
39
|
+
onTouchEnd
|
|
34
40
|
}),
|
|
35
41
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WidgetTextField.WidgetTextField, {
|
|
36
42
|
theme: resolvedTheme,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProductCardProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ProductCard/ProductCard.d.ts
|
|
5
5
|
declare const ProductCard: ({
|
|
@@ -17,7 +17,13 @@ declare const ProductCard: ({
|
|
|
17
17
|
textTransition,
|
|
18
18
|
loop,
|
|
19
19
|
onSelect,
|
|
20
|
+
onDrag,
|
|
21
|
+
onHover,
|
|
22
|
+
onMouseDown,
|
|
23
|
+
onMouseUp,
|
|
24
|
+
onTouchStart,
|
|
25
|
+
onTouchEnd,
|
|
20
26
|
onInputClick
|
|
21
|
-
}: ProductCardProps) =>
|
|
27
|
+
}: ProductCardProps) => react_jsx_runtime20.JSX.Element;
|
|
22
28
|
//#endregion
|
|
23
29
|
export { ProductCard };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProductCardProps } from "./types/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime29 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ProductCard/ProductCard.d.ts
|
|
5
5
|
declare const ProductCard: ({
|
|
@@ -17,7 +17,13 @@ declare const ProductCard: ({
|
|
|
17
17
|
textTransition,
|
|
18
18
|
loop,
|
|
19
19
|
onSelect,
|
|
20
|
+
onDrag,
|
|
21
|
+
onHover,
|
|
22
|
+
onMouseDown,
|
|
23
|
+
onMouseUp,
|
|
24
|
+
onTouchStart,
|
|
25
|
+
onTouchEnd,
|
|
20
26
|
onInputClick
|
|
21
|
-
}: ProductCardProps) =>
|
|
27
|
+
}: ProductCardProps) => react_jsx_runtime29.JSX.Element;
|
|
22
28
|
//#endregion
|
|
23
29
|
export { ProductCard };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Theme } from "../packages/components-v3/tokens/theme/theme.js";
|
|
2
|
-
import { TypographyColor } from "../Typography/types/index.js";
|
|
3
|
-
import { resolveTheme } from "../utils/resolveTheme.js";
|
|
4
2
|
import "../Tokens/index.js";
|
|
3
|
+
import { resolveTheme } from "../utils/resolveTheme.js";
|
|
4
|
+
import { TypographyColor } from "../Typography/types/index.js";
|
|
5
5
|
import { WidgetTextField } from "../WidgetTextField/WidgetTextField.js";
|
|
6
6
|
import "../WidgetTextField/index.js";
|
|
7
7
|
import { ProductCardWidgetComponents } from "./components/index.js";
|
|
@@ -9,7 +9,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
import classNames from "classnames";
|
|
10
10
|
|
|
11
11
|
//#region src/components/ProductCard/ProductCard.tsx
|
|
12
|
-
const ProductCard = ({ theme = Theme.GLOBAL_CUSTOM, imageSrc, headline, italicizeHeadline, animatedText, prompts, promptButtonType, carouselId, fallbackColor, placeholder, textTypingDuration, textTransition, loop, onSelect, onInputClick }) => {
|
|
12
|
+
const ProductCard = ({ theme = Theme.GLOBAL_CUSTOM, imageSrc, headline, italicizeHeadline, animatedText, prompts, promptButtonType, carouselId, fallbackColor, placeholder, textTypingDuration, textTransition, loop, onSelect, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd, onInputClick }) => {
|
|
13
13
|
const resolvedTheme = resolveTheme(theme);
|
|
14
14
|
return /* @__PURE__ */ jsxs(ProductCardWidgetComponents.Poster, {
|
|
15
15
|
imageSrc,
|
|
@@ -28,7 +28,13 @@ const ProductCard = ({ theme = Theme.GLOBAL_CUSTOM, imageSrc, headline, italiciz
|
|
|
28
28
|
carouselId,
|
|
29
29
|
prompts,
|
|
30
30
|
promptButtonType,
|
|
31
|
-
onSelect
|
|
31
|
+
onSelect,
|
|
32
|
+
onDrag,
|
|
33
|
+
onHover,
|
|
34
|
+
onMouseDown,
|
|
35
|
+
onMouseUp,
|
|
36
|
+
onTouchStart,
|
|
37
|
+
onTouchEnd
|
|
32
38
|
}),
|
|
33
39
|
/* @__PURE__ */ jsx(WidgetTextField, {
|
|
34
40
|
theme: resolvedTheme,
|
|
@@ -7,17 +7,23 @@ const require_useGetCarouselProperties = require('../hooks/useGetCarouselPropert
|
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
|
|
9
9
|
//#region src/components/ProductCard/components/Carousel.tsx
|
|
10
|
-
const Carousel = ({ theme, carouselId, prompts, promptButtonType, onSelect }) => {
|
|
10
|
+
const Carousel = ({ theme, carouselId, prompts, promptButtonType, onSelect, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd }) => {
|
|
11
11
|
const resolvedTheme = require_resolveTheme.resolveTheme(theme);
|
|
12
12
|
const { carouselClasses } = require_useGetCarouselProperties.useGetCarouselProperties();
|
|
13
13
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PromptCarousel.PromptCarousel, {
|
|
14
14
|
className: carouselClasses,
|
|
15
|
-
handleButtonClick: onSelect,
|
|
16
15
|
id: carouselId,
|
|
17
16
|
promptCarouselRows: require_PromptCarousel_types_types.PromptCarouselRows.ALWAYS_TWO,
|
|
18
17
|
theme: resolvedTheme,
|
|
19
18
|
promptButtonType,
|
|
20
|
-
promptButtonTexts: prompts
|
|
19
|
+
promptButtonTexts: prompts,
|
|
20
|
+
handleButtonClick: onSelect,
|
|
21
|
+
handleButtonDrag: onDrag,
|
|
22
|
+
handleButtonHover: onHover,
|
|
23
|
+
handleButtonMouseDown: onMouseDown,
|
|
24
|
+
handleButtonMouseUp: onMouseUp,
|
|
25
|
+
handleButtonTouchStart: onTouchStart,
|
|
26
|
+
handleButtonTouchEnd: onTouchEnd
|
|
21
27
|
});
|
|
22
28
|
};
|
|
23
29
|
|
|
@@ -6,17 +6,23 @@ import { useGetCarouselProperties } from "../hooks/useGetCarouselProperties.js";
|
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/ProductCard/components/Carousel.tsx
|
|
9
|
-
const Carousel = ({ theme, carouselId, prompts, promptButtonType, onSelect }) => {
|
|
9
|
+
const Carousel = ({ theme, carouselId, prompts, promptButtonType, onSelect, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd }) => {
|
|
10
10
|
const resolvedTheme = resolveTheme(theme);
|
|
11
11
|
const { carouselClasses } = useGetCarouselProperties();
|
|
12
12
|
return /* @__PURE__ */ jsx(PromptCarousel, {
|
|
13
13
|
className: carouselClasses,
|
|
14
|
-
handleButtonClick: onSelect,
|
|
15
14
|
id: carouselId,
|
|
16
15
|
promptCarouselRows: PromptCarouselRows.ALWAYS_TWO,
|
|
17
16
|
theme: resolvedTheme,
|
|
18
17
|
promptButtonType,
|
|
19
|
-
promptButtonTexts: prompts
|
|
18
|
+
promptButtonTexts: prompts,
|
|
19
|
+
handleButtonClick: onSelect,
|
|
20
|
+
handleButtonDrag: onDrag,
|
|
21
|
+
handleButtonHover: onHover,
|
|
22
|
+
handleButtonMouseDown: onMouseDown,
|
|
23
|
+
handleButtonMouseUp: onMouseUp,
|
|
24
|
+
handleButtonTouchStart: onTouchStart,
|
|
25
|
+
handleButtonTouchEnd: onTouchEnd
|
|
20
26
|
});
|
|
21
27
|
};
|
|
22
28
|
|
|
@@ -20,6 +20,40 @@ interface CarouselProps {
|
|
|
20
20
|
* Callback function invoked when a prompt is selected.
|
|
21
21
|
*/
|
|
22
22
|
onSelect: (prompt: string) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Callback invoked when the user drags/swipes the carousel.
|
|
25
|
+
* Typically used for analytics or to pause other interactions while dragging.
|
|
26
|
+
*/
|
|
27
|
+
onDrag?: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Callback invoked when the user hovers a specific prompt item.
|
|
30
|
+
*
|
|
31
|
+
* @param prompt The prompt currently being hovered.
|
|
32
|
+
*/
|
|
33
|
+
onHover?: (prompt: string) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Callback invoked when the user presses down on a specific prompt item.
|
|
36
|
+
* Useful for distinguishing a click/tap from a drag and for interaction tracking.
|
|
37
|
+
*
|
|
38
|
+
* @param prompt The prompt the user pressed down on.
|
|
39
|
+
*/
|
|
40
|
+
onMouseDown?: (prompt: string) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Callback invoked when the user releases the mouse button after interacting
|
|
43
|
+
* with the carousel or a prompt item.
|
|
44
|
+
*/
|
|
45
|
+
onMouseUp?: () => void;
|
|
46
|
+
/**
|
|
47
|
+
* Callback invoked when the user starts a touch gesture on a specific prompt.
|
|
48
|
+
*
|
|
49
|
+
* @param prompt The prompt the user touched.
|
|
50
|
+
*/
|
|
51
|
+
onTouchStart?: (prompt: string) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Callback invoked when the user ends a touch gesture after interacting with
|
|
54
|
+
* the carousel or a prompt item.
|
|
55
|
+
*/
|
|
56
|
+
onTouchEnd?: () => void;
|
|
23
57
|
}
|
|
24
58
|
/**
|
|
25
59
|
* Props for the Header component.
|
|
@@ -20,6 +20,40 @@ interface CarouselProps {
|
|
|
20
20
|
* Callback function invoked when a prompt is selected.
|
|
21
21
|
*/
|
|
22
22
|
onSelect: (prompt: string) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Callback invoked when the user drags/swipes the carousel.
|
|
25
|
+
* Typically used for analytics or to pause other interactions while dragging.
|
|
26
|
+
*/
|
|
27
|
+
onDrag?: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Callback invoked when the user hovers a specific prompt item.
|
|
30
|
+
*
|
|
31
|
+
* @param prompt The prompt currently being hovered.
|
|
32
|
+
*/
|
|
33
|
+
onHover?: (prompt: string) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Callback invoked when the user presses down on a specific prompt item.
|
|
36
|
+
* Useful for distinguishing a click/tap from a drag and for interaction tracking.
|
|
37
|
+
*
|
|
38
|
+
* @param prompt The prompt the user pressed down on.
|
|
39
|
+
*/
|
|
40
|
+
onMouseDown?: (prompt: string) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Callback invoked when the user releases the mouse button after interacting
|
|
43
|
+
* with the carousel or a prompt item.
|
|
44
|
+
*/
|
|
45
|
+
onMouseUp?: () => void;
|
|
46
|
+
/**
|
|
47
|
+
* Callback invoked when the user starts a touch gesture on a specific prompt.
|
|
48
|
+
*
|
|
49
|
+
* @param prompt The prompt the user touched.
|
|
50
|
+
*/
|
|
51
|
+
onTouchStart?: (prompt: string) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Callback invoked when the user ends a touch gesture after interacting with
|
|
54
|
+
* the carousel or a prompt item.
|
|
55
|
+
*/
|
|
56
|
+
onTouchEnd?: () => void;
|
|
23
57
|
}
|
|
24
58
|
/**
|
|
25
59
|
* Props for the Header component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptButtonProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime24 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptButton/PromptButton.d.ts
|
|
5
5
|
declare const PromptButton: ({
|
|
@@ -22,6 +22,6 @@ declare const PromptButton: ({
|
|
|
22
22
|
onTouchEnd,
|
|
23
23
|
ariaLabel,
|
|
24
24
|
ariaDescribedBy
|
|
25
|
-
}: PromptButtonProps) =>
|
|
25
|
+
}: PromptButtonProps) => react_jsx_runtime24.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { PromptButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptButtonProps } from "./types/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptButton/PromptButton.d.ts
|
|
5
5
|
declare const PromptButton: ({
|
|
@@ -22,6 +22,6 @@ declare const PromptButton: ({
|
|
|
22
22
|
onTouchEnd,
|
|
23
23
|
ariaLabel,
|
|
24
24
|
ariaDescribedBy
|
|
25
|
-
}: PromptButtonProps) =>
|
|
25
|
+
}: PromptButtonProps) => react_jsx_runtime6.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { PromptButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptButtonCarouselWithImageProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts
|
|
5
5
|
declare const PromptButtonCarouselWithImage: ({
|
|
@@ -24,6 +24,6 @@ declare const PromptButtonCarouselWithImage: ({
|
|
|
24
24
|
handlePromptButtonTouchEnd,
|
|
25
25
|
textFieldPlaceholder,
|
|
26
26
|
handleTextFieldClick
|
|
27
|
-
}: PromptButtonCarouselWithImageProps) =>
|
|
27
|
+
}: PromptButtonCarouselWithImageProps) => react_jsx_runtime1.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { PromptButtonCarouselWithImage };
|