@envive-ai/react-toolkit-v3 0.3.27 → 0.3.28
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 +2 -1
- package/dist/ChatFooter/ChatFooter.d.cts +2 -2
- package/dist/ChatFooter/ChatFooter.d.ts +2 -2
- package/dist/ChatFooter/ChatFooter.js +2 -1
- package/dist/ChatFooter/components/Layout.cjs +2 -2
- package/dist/ChatFooter/components/Layout.js +2 -2
- package/dist/ChatFooter/components/index.d.cts +6 -5
- package/dist/ChatFooter/components/index.d.ts +4 -3
- package/dist/ChatFooter/types/types.d.cts +3 -2
- package/dist/ChatFooter/types/types.d.ts +3 -2
- 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 +219 -219
- package/dist/Container/Container.d.ts +57 -57
- 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/DocumentRetrievalCard/components/ViewArticleButton.cjs +1 -1
- package/dist/DocumentRetrievalCard/components/ViewArticleButton.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/FullPageSalesAgent/FullPageSalesAgent.cjs +43 -8
- package/dist/FullPageSalesAgent/FullPageSalesAgent.d.cts +2 -2
- package/dist/FullPageSalesAgent/FullPageSalesAgent.d.ts +2 -2
- package/dist/FullPageSalesAgent/FullPageSalesAgent.js +43 -8
- package/dist/FullPageSalesAgent/components/WelcomeOverlay.cjs +10 -3
- package/dist/FullPageSalesAgent/components/WelcomeOverlay.js +10 -3
- package/dist/FullPageSalesAgent/hooks/useWelcomeOverlayProducts.cjs +1 -0
- package/dist/FullPageSalesAgent/hooks/useWelcomeOverlayProducts.js +1 -0
- 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 +2 -2
- package/dist/Message/components/LinkButton.js +2 -2
- 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.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/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 +8 -8
- 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/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/Stack/Stack.d.ts +2 -2
- package/dist/TextField/TextField.cjs +7 -3
- package/dist/TextField/TextField.d.cts +1 -0
- package/dist/TextField/TextField.d.ts +1 -0
- package/dist/TextField/TextField.js +7 -3
- package/dist/TextField/components/Input.cjs +31 -2
- package/dist/TextField/components/Input.js +31 -2
- package/dist/TextField/components/Layout.cjs +7 -2
- package/dist/TextField/components/Layout.js +7 -2
- package/dist/TextField/hooks/useAutoResize.cjs +17 -0
- package/dist/TextField/hooks/useAutoResize.js +16 -0
- package/dist/TextField/hooks/usePlaceholderAnimation.cjs +58 -0
- package/dist/TextField/hooks/usePlaceholderAnimation.js +57 -0
- package/dist/TextField/types/index.d.cts +7 -1
- package/dist/TextField/types/index.d.ts +7 -1
- 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.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/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/ChatFooter/ChatFooter.tsx +1 -0
- package/src/components/ChatFooter/components/TextField.tsx +4 -1
- package/src/components/ChatFooter/types/types.ts +3 -2
- package/src/components/FullPageSalesAgent/FullPageSalesAgent.tsx +75 -7
- package/src/components/FullPageSalesAgent/components/WelcomeOverlay.tsx +22 -0
- package/src/components/FullPageSalesAgent/hooks/useWelcomeOverlayProducts.ts +1 -0
- package/src/components/TextField/TextField.tsx +7 -1
- package/src/components/TextField/components/Input.tsx +43 -9
- package/src/components/TextField/components/Layout.tsx +7 -1
- package/src/components/TextField/hooks/useAutoResize.ts +14 -0
- package/src/components/TextField/hooks/usePlaceholderAnimation.ts +67 -0
- package/src/components/TextField/hooks/useTextFieldSubmit.ts +1 -1
- package/src/components/TextField/types/index.ts +7 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Theme } from "../../packages/components-v3/tokens/theme/theme.js";
|
|
2
|
+
import { CustomIcon } from "../../utils/CustomIcon.js";
|
|
2
3
|
import { TypographyColor } from "../../Typography/types/index.js";
|
|
3
4
|
import { Typography } from "../../Typography/Typography.js";
|
|
4
5
|
import "../../Typography/index.js";
|
|
5
|
-
import { CustomIcon } from "../../utils/CustomIcon.js";
|
|
6
6
|
import { useGetReadMoreTypographyProperties } from "../hooks/useGetReadMoreTypographyProperties.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import classNames from "classnames";
|
|
@@ -2,8 +2,8 @@ import { Theme } from "../../tokens/theme/theme.cjs";
|
|
|
2
2
|
import { ContainerProps } from "./Container.cjs";
|
|
3
3
|
import { RatingProps } from "./Rating.cjs";
|
|
4
4
|
import { ReadMoreButtonProps } from "./ReadMoreButton.cjs";
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
5
|
+
import * as react7 from "react";
|
|
6
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/ReviewCard/components/index.d.ts
|
|
9
9
|
declare const ReviewCardComponents: {
|
|
@@ -31,12 +31,12 @@ declare const ReviewCardComponents: {
|
|
|
31
31
|
verifiedBuyerLabel?: string;
|
|
32
32
|
className?: string;
|
|
33
33
|
style?: React.CSSProperties;
|
|
34
|
-
}) =>
|
|
34
|
+
}) => react_jsx_runtime16.JSX.Element;
|
|
35
35
|
Rating: ({
|
|
36
36
|
rating,
|
|
37
37
|
theme,
|
|
38
38
|
style
|
|
39
|
-
}: RatingProps) =>
|
|
39
|
+
}: RatingProps) => react_jsx_runtime16.JSX.Element;
|
|
40
40
|
StarIcon: ({
|
|
41
41
|
theme,
|
|
42
42
|
style,
|
|
@@ -45,7 +45,7 @@ declare const ReviewCardComponents: {
|
|
|
45
45
|
theme: Theme;
|
|
46
46
|
style?: React.CSSProperties;
|
|
47
47
|
className?: string;
|
|
48
|
-
}) =>
|
|
48
|
+
}) => react7.ReactElement<react7.SVGProps<SVGSVGElement>, string | react7.JSXElementConstructor<any>>;
|
|
49
49
|
ReviewText: ({
|
|
50
50
|
reviewText,
|
|
51
51
|
isExpanded,
|
|
@@ -56,7 +56,7 @@ declare const ReviewCardComponents: {
|
|
|
56
56
|
isExpanded: boolean;
|
|
57
57
|
className?: string;
|
|
58
58
|
style?: React.CSSProperties;
|
|
59
|
-
}) =>
|
|
59
|
+
}) => react_jsx_runtime16.JSX.Element;
|
|
60
60
|
ReadMoreButton: ({
|
|
61
61
|
isExpanded,
|
|
62
62
|
onToggle,
|
|
@@ -2,8 +2,8 @@ import { Theme } from "../../packages/components-v3/tokens/theme/theme.js";
|
|
|
2
2
|
import { ContainerProps } from "./Container.js";
|
|
3
3
|
import { RatingProps } from "./Rating.js";
|
|
4
4
|
import { ReadMoreButtonProps } from "./ReadMoreButton.js";
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
5
|
+
import * as react0 from "react";
|
|
6
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/ReviewCard/components/index.d.ts
|
|
9
9
|
declare const ReviewCardComponents: {
|
|
@@ -31,12 +31,12 @@ declare const ReviewCardComponents: {
|
|
|
31
31
|
verifiedBuyerLabel?: string;
|
|
32
32
|
className?: string;
|
|
33
33
|
style?: React.CSSProperties;
|
|
34
|
-
}) =>
|
|
34
|
+
}) => react_jsx_runtime1.JSX.Element;
|
|
35
35
|
Rating: ({
|
|
36
36
|
rating,
|
|
37
37
|
theme,
|
|
38
38
|
style
|
|
39
|
-
}: RatingProps) =>
|
|
39
|
+
}: RatingProps) => react_jsx_runtime1.JSX.Element;
|
|
40
40
|
StarIcon: ({
|
|
41
41
|
theme,
|
|
42
42
|
style,
|
|
@@ -45,7 +45,7 @@ declare const ReviewCardComponents: {
|
|
|
45
45
|
theme: Theme;
|
|
46
46
|
style?: React.CSSProperties;
|
|
47
47
|
className?: string;
|
|
48
|
-
}) =>
|
|
48
|
+
}) => react0.ReactElement<react0.SVGProps<SVGSVGElement>, string | react0.JSXElementConstructor<any>>;
|
|
49
49
|
ReviewText: ({
|
|
50
50
|
reviewText,
|
|
51
51
|
isExpanded,
|
|
@@ -56,7 +56,7 @@ declare const ReviewCardComponents: {
|
|
|
56
56
|
isExpanded: boolean;
|
|
57
57
|
className?: string;
|
|
58
58
|
style?: React.CSSProperties;
|
|
59
|
-
}) =>
|
|
59
|
+
}) => react_jsx_runtime1.JSX.Element;
|
|
60
60
|
ReadMoreButton: ({
|
|
61
61
|
isExpanded,
|
|
62
62
|
onToggle,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SalesAgentProductCardProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SalesAgentProductCard/SalesAgentProductCard.d.ts
|
|
5
5
|
|
|
@@ -30,6 +30,6 @@ declare const SalesAgentProductCard: ({
|
|
|
30
30
|
url,
|
|
31
31
|
target,
|
|
32
32
|
onClick
|
|
33
|
-
}: SalesAgentProductCardProps) =>
|
|
33
|
+
}: SalesAgentProductCardProps) => react_jsx_runtime7.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { SalesAgentProductCard };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SalesAgentProductCardProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SalesAgentProductCard/SalesAgentProductCard.d.ts
|
|
5
5
|
|
|
@@ -30,6 +30,6 @@ declare const SalesAgentProductCard: ({
|
|
|
30
30
|
url,
|
|
31
31
|
target,
|
|
32
32
|
onClick
|
|
33
|
-
}: SalesAgentProductCardProps) =>
|
|
33
|
+
}: SalesAgentProductCardProps) => react_jsx_runtime12.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { SalesAgentProductCard };
|
|
@@ -1,9 +1,9 @@
|
|
|
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_Stack = require('../../Stack/Stack.cjs');
|
|
4
|
-
require('../../Stack/index.cjs');
|
|
5
3
|
const require_Container = require('../../Container/Container.cjs');
|
|
6
4
|
require('../../Container/index.cjs');
|
|
5
|
+
const require_Stack = require('../../Stack/Stack.cjs');
|
|
6
|
+
require('../../Stack/index.cjs');
|
|
7
7
|
const require_types = require('../types/types.cjs');
|
|
8
8
|
const require_useGetContainerProperties = require('../hooks/useGetContainerProperties.cjs');
|
|
9
9
|
const require_useGetProductDescriptionProperties = require('../hooks/useGetProductDescriptionProperties.cjs');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Theme } from "../../packages/components-v3/tokens/theme/theme.js";
|
|
2
|
-
import { Stack } from "../../Stack/Stack.js";
|
|
3
|
-
import "../../Stack/index.js";
|
|
4
2
|
import { Container } from "../../Container/Container.js";
|
|
5
3
|
import "../../Container/index.js";
|
|
4
|
+
import { Stack } from "../../Stack/Stack.js";
|
|
5
|
+
import "../../Stack/index.js";
|
|
6
6
|
import { SalesAgentProductCardVariant } from "../types/types.js";
|
|
7
7
|
import { useGetContainerProperties } from "../hooks/useGetContainerProperties.js";
|
|
8
8
|
import { useGetProductDescriptionProperties } from "../hooks/useGetProductDescriptionProperties.js";
|
|
@@ -5,7 +5,7 @@ import { PriceProps } from "./Price.cjs";
|
|
|
5
5
|
import { RateProps } from "./Rate.cjs";
|
|
6
6
|
import { ProductImageProps } from "./ProductImage.cjs";
|
|
7
7
|
import * as react0 from "react";
|
|
8
|
-
import * as
|
|
8
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/components/SalesAgentProductCard/components/index.d.ts
|
|
11
11
|
declare const SalesAgentProductCardComponents: {
|
|
@@ -23,24 +23,24 @@ declare const SalesAgentProductCardComponents: {
|
|
|
23
23
|
url,
|
|
24
24
|
target,
|
|
25
25
|
onClick
|
|
26
|
-
}: ContainerProps) =>
|
|
26
|
+
}: ContainerProps) => react_jsx_runtime2.JSX.Element;
|
|
27
27
|
ProductName: ({
|
|
28
28
|
label,
|
|
29
29
|
theme,
|
|
30
30
|
style,
|
|
31
31
|
className
|
|
32
|
-
}: ProductNameProps) =>
|
|
32
|
+
}: ProductNameProps) => react_jsx_runtime2.JSX.Element;
|
|
33
33
|
Price: ({
|
|
34
34
|
previousPrice,
|
|
35
35
|
currentPrice,
|
|
36
36
|
pricePrefix,
|
|
37
37
|
forceShowCurrentPriceSpace
|
|
38
|
-
}: PriceProps) =>
|
|
38
|
+
}: PriceProps) => react_jsx_runtime2.JSX.Element;
|
|
39
39
|
Rate: ({
|
|
40
40
|
rate,
|
|
41
41
|
numberOfReviews,
|
|
42
42
|
theme
|
|
43
|
-
}: RateProps) =>
|
|
43
|
+
}: RateProps) => react_jsx_runtime2.JSX.Element;
|
|
44
44
|
ProductImage: ({
|
|
45
45
|
src,
|
|
46
46
|
alt,
|
|
@@ -48,7 +48,7 @@ declare const SalesAgentProductCardComponents: {
|
|
|
48
48
|
aspectRatio,
|
|
49
49
|
className,
|
|
50
50
|
...props
|
|
51
|
-
}: ProductImageProps) =>
|
|
51
|
+
}: ProductImageProps) => react_jsx_runtime2.JSX.Element;
|
|
52
52
|
StarIcon: ({
|
|
53
53
|
theme,
|
|
54
54
|
style
|
|
@@ -4,8 +4,8 @@ import { ProductNameProps } from "./ProductName.js";
|
|
|
4
4
|
import { PriceProps } from "./Price.js";
|
|
5
5
|
import { RateProps } from "./Rate.js";
|
|
6
6
|
import { ProductImageProps } from "./ProductImage.js";
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
7
|
+
import * as react2 from "react";
|
|
8
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/components/SalesAgentProductCard/components/index.d.ts
|
|
11
11
|
declare const SalesAgentProductCardComponents: {
|
|
@@ -23,24 +23,24 @@ declare const SalesAgentProductCardComponents: {
|
|
|
23
23
|
url,
|
|
24
24
|
target,
|
|
25
25
|
onClick
|
|
26
|
-
}: ContainerProps) =>
|
|
26
|
+
}: ContainerProps) => react_jsx_runtime7.JSX.Element;
|
|
27
27
|
ProductName: ({
|
|
28
28
|
label,
|
|
29
29
|
theme,
|
|
30
30
|
style,
|
|
31
31
|
className
|
|
32
|
-
}: ProductNameProps) =>
|
|
32
|
+
}: ProductNameProps) => react_jsx_runtime7.JSX.Element;
|
|
33
33
|
Price: ({
|
|
34
34
|
previousPrice,
|
|
35
35
|
currentPrice,
|
|
36
36
|
pricePrefix,
|
|
37
37
|
forceShowCurrentPriceSpace
|
|
38
|
-
}: PriceProps) =>
|
|
38
|
+
}: PriceProps) => react_jsx_runtime7.JSX.Element;
|
|
39
39
|
Rate: ({
|
|
40
40
|
rate,
|
|
41
41
|
numberOfReviews,
|
|
42
42
|
theme
|
|
43
|
-
}: RateProps) =>
|
|
43
|
+
}: RateProps) => react_jsx_runtime7.JSX.Element;
|
|
44
44
|
ProductImage: ({
|
|
45
45
|
src,
|
|
46
46
|
alt,
|
|
@@ -48,14 +48,14 @@ declare const SalesAgentProductCardComponents: {
|
|
|
48
48
|
aspectRatio,
|
|
49
49
|
className,
|
|
50
50
|
...props
|
|
51
|
-
}: ProductImageProps) =>
|
|
51
|
+
}: ProductImageProps) => react_jsx_runtime7.JSX.Element;
|
|
52
52
|
StarIcon: ({
|
|
53
53
|
theme,
|
|
54
54
|
style
|
|
55
55
|
}: {
|
|
56
56
|
theme: Theme;
|
|
57
57
|
style?: React.CSSProperties;
|
|
58
|
-
}) =>
|
|
58
|
+
}) => react2.ReactElement<react2.SVGProps<SVGSVGElement>, string | react2.JSXElementConstructor<any>>;
|
|
59
59
|
};
|
|
60
60
|
//#endregion
|
|
61
61
|
export { SalesAgentProductCardComponents };
|
|
@@ -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_resolveTheme = require('../utils/resolveTheme.cjs');
|
|
4
3
|
require('../Tokens/index.cjs');
|
|
4
|
+
const require_resolveTheme = require('../utils/resolveTheme.cjs');
|
|
5
5
|
const require_PromptButton_types_index = require('../PromptButton/types/index.cjs');
|
|
6
6
|
require('../PromptButton/index.cjs');
|
|
7
7
|
const require_utils_useCheckIsMobile = require('../utils/useCheckIsMobile.cjs');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SocialProofProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SocialProof/SocialProof.d.ts
|
|
5
5
|
declare const SocialProof: ({
|
|
@@ -7,6 +7,6 @@ declare const SocialProof: ({
|
|
|
7
7
|
widgetContentProps,
|
|
8
8
|
widgetStyleProps,
|
|
9
9
|
widgetEventProps
|
|
10
|
-
}: SocialProofProps) =>
|
|
10
|
+
}: SocialProofProps) => react_jsx_runtime11.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { SocialProof };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SocialProofProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SocialProof/SocialProof.d.ts
|
|
5
5
|
declare const SocialProof: ({
|
|
@@ -7,6 +7,6 @@ declare const SocialProof: ({
|
|
|
7
7
|
widgetContentProps,
|
|
8
8
|
widgetStyleProps,
|
|
9
9
|
widgetEventProps
|
|
10
|
-
}: SocialProofProps) =>
|
|
10
|
+
}: SocialProofProps) => react_jsx_runtime5.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { SocialProof };
|
|
@@ -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 { PromptButtonVariant } from "../PromptButton/types/index.js";
|
|
5
5
|
import "../PromptButton/index.js";
|
|
6
6
|
import { useCheckIsMobile } from "../utils/useCheckIsMobile.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
|
4
|
-
require('../../Stack/index.cjs');
|
|
3
|
+
const require_resolveTheme = require('../../utils/resolveTheme.cjs');
|
|
5
4
|
const require_Container = require('../../Container/Container.cjs');
|
|
6
5
|
require('../../Container/index.cjs');
|
|
6
|
+
const require_Stack = require('../../Stack/Stack.cjs');
|
|
7
|
+
require('../../Stack/index.cjs');
|
|
7
8
|
const require_index = require('../../Typography/types/index.cjs');
|
|
8
9
|
const require_Typography = require('../../Typography/Typography.cjs');
|
|
9
10
|
require('../../Typography/index.cjs');
|
|
10
|
-
const require_resolveTheme = require('../../utils/resolveTheme.cjs');
|
|
11
11
|
const require_PromptButton_types_index = require('../../PromptButton/types/index.cjs');
|
|
12
12
|
const require_PromptButton = require('../../PromptButton/PromptButton.cjs');
|
|
13
13
|
require('../../PromptButton/index.cjs');
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Theme } from "../../packages/components-v3/tokens/theme/theme.js";
|
|
2
|
-
import {
|
|
3
|
-
import "../../Stack/index.js";
|
|
2
|
+
import { resolveTheme } from "../../utils/resolveTheme.js";
|
|
4
3
|
import { Container } from "../../Container/Container.js";
|
|
5
4
|
import "../../Container/index.js";
|
|
5
|
+
import { Stack } from "../../Stack/Stack.js";
|
|
6
|
+
import "../../Stack/index.js";
|
|
6
7
|
import { TypographyColor, TypographyVariant } from "../../Typography/types/index.js";
|
|
7
8
|
import { Typography } from "../../Typography/Typography.js";
|
|
8
9
|
import "../../Typography/index.js";
|
|
9
|
-
import { resolveTheme } from "../../utils/resolveTheme.js";
|
|
10
10
|
import { PromptButtonVariant } from "../../PromptButton/types/index.js";
|
|
11
11
|
import { PromptButton } from "../../PromptButton/PromptButton.js";
|
|
12
12
|
import "../../PromptButton/index.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_breakpoints = require('../../packages/components-v3/tokens/breakpoints/breakpoints.cjs');
|
|
3
|
+
require('../../Tokens/index.cjs');
|
|
3
4
|
const require_Stack = require('../../Stack/Stack.cjs');
|
|
4
5
|
require('../../Stack/index.cjs');
|
|
5
|
-
require('../../Tokens/index.cjs');
|
|
6
6
|
const require_utils_useCheckIsMobile = require('../../utils/useCheckIsMobile.cjs');
|
|
7
7
|
const require_useGetContentSize = require('../../utils/useGetContentSize.cjs');
|
|
8
8
|
const require_types = require('../../ImageGallery/types/types.cjs');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { screensBreakpointsVariables } from "../../packages/components-v3/tokens/breakpoints/breakpoints.js";
|
|
2
|
+
import "../../Tokens/index.js";
|
|
2
3
|
import { Stack } from "../../Stack/Stack.js";
|
|
3
4
|
import "../../Stack/index.js";
|
|
4
|
-
import "../../Tokens/index.js";
|
|
5
5
|
import { useCheckIsMobile } from "../../utils/useCheckIsMobile.js";
|
|
6
6
|
import { useGetContentSize } from "../../utils/useGetContentSize.js";
|
|
7
7
|
import { ImageGalleryLayout } from "../../ImageGallery/types/types.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
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
6
|
const require_index = require('../../Typography/types/index.cjs');
|
|
6
7
|
const require_Typography = require('../../Typography/Typography.cjs');
|
|
7
8
|
require('../../Typography/index.cjs');
|
|
8
|
-
const require_resolveTheme = require('../../utils/resolveTheme.cjs');
|
|
9
9
|
const require_PromptButton_types_index = require('../../PromptButton/types/index.cjs');
|
|
10
10
|
require('../../PromptButton/index.cjs');
|
|
11
11
|
const require_PromptCarousel = require('../../PromptCarousel/PromptCarousel.cjs');
|
|
@@ -1,10 +1,10 @@
|
|
|
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
5
|
import { TypographyColor, TypographyVariant } from "../../Typography/types/index.js";
|
|
5
6
|
import { Typography } from "../../Typography/Typography.js";
|
|
6
7
|
import "../../Typography/index.js";
|
|
7
|
-
import { resolveTheme } from "../../utils/resolveTheme.js";
|
|
8
8
|
import { PromptButtonVariant } from "../../PromptButton/types/index.js";
|
|
9
9
|
import "../../PromptButton/index.js";
|
|
10
10
|
import { PromptCarousel } from "../../PromptCarousel/PromptCarousel.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime35 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/SparkleAnimation/SparkleAnimation.d.ts
|
|
4
4
|
interface SparkleAnimationProps {
|
|
@@ -10,6 +10,6 @@ declare const SparkleAnimation: ({
|
|
|
10
10
|
color,
|
|
11
11
|
className,
|
|
12
12
|
animate
|
|
13
|
-
}: SparkleAnimationProps) =>
|
|
13
|
+
}: SparkleAnimationProps) => react_jsx_runtime35.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { SparkleAnimation };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/SparkleAnimation/SparkleAnimation.d.ts
|
|
4
4
|
interface SparkleAnimationProps {
|
|
@@ -10,6 +10,6 @@ declare const SparkleAnimation: ({
|
|
|
10
10
|
color,
|
|
11
11
|
className,
|
|
12
12
|
animate
|
|
13
|
-
}: SparkleAnimationProps) =>
|
|
13
|
+
}: SparkleAnimationProps) => react_jsx_runtime20.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { SparkleAnimation };
|
package/dist/Stack/Stack.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { StackProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react2 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Stack/Stack.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Stack component for laying out children in a flexible container with gap.
|
|
7
7
|
*/
|
|
8
|
-
declare const Stack:
|
|
8
|
+
declare const Stack: react2.ForwardRefExoticComponent<StackProps & react2.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Stack };
|
package/dist/Stack/Stack.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { StackProps } from "./types/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react5 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Stack/Stack.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Stack component for laying out children in a flexible container with gap.
|
|
7
7
|
*/
|
|
8
|
-
declare const Stack:
|
|
8
|
+
declare const Stack: react5.ForwardRefExoticComponent<StackProps & react5.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Stack };
|
|
@@ -7,6 +7,7 @@ const require_useGetSkeletonProperties = require('./hooks/useGetSkeletonProperti
|
|
|
7
7
|
const require_useTextFieldFocus = require('./hooks/useTextFieldFocus.cjs');
|
|
8
8
|
const require_useTextFieldSubmit = require('./hooks/useTextFieldSubmit.cjs');
|
|
9
9
|
const require_useTextFieldValue = require('./hooks/useTextFieldValue.cjs');
|
|
10
|
+
const require_usePlaceholderAnimation = require('./hooks/usePlaceholderAnimation.cjs');
|
|
10
11
|
const require_useVoiceInput = require('./hooks/useVoiceInput.cjs');
|
|
11
12
|
let react = require("react");
|
|
12
13
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -18,7 +19,8 @@ classnames = require_rolldown_runtime.__toESM(classnames);
|
|
|
18
19
|
* Renders a text input field with a send icon.
|
|
19
20
|
* Supports three visual themes: Standard, Modern, and Minimal.
|
|
20
21
|
*/
|
|
21
|
-
const TextField = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, placeholder, value: controlledValue, onChange, onSubmit, onFocus, disabled = false, id, testId, className, inputClassName, style, ariaLabel, isLoading = false, enableVoiceInput = false, onTranscriptionStarted, onTranscriptionCompleted }) => {
|
|
22
|
+
const TextField = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, placeholder, value: controlledValue, onChange, onSubmit, onFocus, disabled = false, id, testId, className, inputClassName, style, ariaLabel, isLoading = false, multiline = false, enableVoiceInput = false, onTranscriptionStarted, onTranscriptionCompleted }) => {
|
|
23
|
+
const resolvedPlaceholder = require_usePlaceholderAnimation.usePlaceholderAnimation(placeholder);
|
|
22
24
|
const { currentValue, hasValue, handleChange, resetValue } = require_useTextFieldValue.useTextFieldValue(controlledValue, onChange);
|
|
23
25
|
const { isFocused, handleFocus, handleBlur } = require_useTextFieldFocus.useTextFieldFocus();
|
|
24
26
|
const { handleSubmit, handleKeyDown } = require_useTextFieldSubmit.useTextFieldSubmit(onSubmit, hasValue, disabled, isLoading, currentValue, resetValue);
|
|
@@ -47,7 +49,7 @@ const TextField = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, placeholder, val
|
|
|
47
49
|
const resolvedTheme = require_resolveTheme.resolveTheme(theme);
|
|
48
50
|
const input = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.TextFieldComponents.Input, {
|
|
49
51
|
theme: resolvedTheme,
|
|
50
|
-
placeholder: isLoading ? "" :
|
|
52
|
+
placeholder: isLoading ? "" : resolvedPlaceholder,
|
|
51
53
|
value: isLoading ? "" : currentValue,
|
|
52
54
|
onChange: handleChange,
|
|
53
55
|
onKeyDown: handleKeyDown,
|
|
@@ -55,7 +57,8 @@ const TextField = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, placeholder, val
|
|
|
55
57
|
onBlur: handleBlur,
|
|
56
58
|
disabled: disabled || isLoading,
|
|
57
59
|
ariaLabel,
|
|
58
|
-
className: inputClassName
|
|
60
|
+
className: inputClassName,
|
|
61
|
+
multiline
|
|
59
62
|
});
|
|
60
63
|
const sendIcon = !isLoading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.TextFieldComponents.SendIcon, {
|
|
61
64
|
theme: resolvedTheme,
|
|
@@ -85,6 +88,7 @@ const TextField = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, placeholder, val
|
|
|
85
88
|
isFocused,
|
|
86
89
|
hasValue,
|
|
87
90
|
disabled,
|
|
91
|
+
multiline,
|
|
88
92
|
id,
|
|
89
93
|
testId,
|
|
90
94
|
className: (0, classnames.default)(className, skeletonClass, disabled && "envive-tw-cursor-not-allowed"),
|
|
@@ -6,6 +6,7 @@ import { useGetSkeletonProperties } from "./hooks/useGetSkeletonProperties.js";
|
|
|
6
6
|
import { useTextFieldFocus } from "./hooks/useTextFieldFocus.js";
|
|
7
7
|
import { useTextFieldSubmit } from "./hooks/useTextFieldSubmit.js";
|
|
8
8
|
import { useTextFieldValue } from "./hooks/useTextFieldValue.js";
|
|
9
|
+
import { usePlaceholderAnimation } from "./hooks/usePlaceholderAnimation.js";
|
|
9
10
|
import { useVoiceInput } from "./hooks/useVoiceInput.js";
|
|
10
11
|
import { useCallback } from "react";
|
|
11
12
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -16,7 +17,8 @@ import classNames from "classnames";
|
|
|
16
17
|
* Renders a text input field with a send icon.
|
|
17
18
|
* Supports three visual themes: Standard, Modern, and Minimal.
|
|
18
19
|
*/
|
|
19
|
-
const TextField = ({ theme = Theme.GLOBAL_CUSTOM, placeholder, value: controlledValue, onChange, onSubmit, onFocus, disabled = false, id, testId, className, inputClassName, style, ariaLabel, isLoading = false, enableVoiceInput = false, onTranscriptionStarted, onTranscriptionCompleted }) => {
|
|
20
|
+
const TextField = ({ theme = Theme.GLOBAL_CUSTOM, placeholder, value: controlledValue, onChange, onSubmit, onFocus, disabled = false, id, testId, className, inputClassName, style, ariaLabel, isLoading = false, multiline = false, enableVoiceInput = false, onTranscriptionStarted, onTranscriptionCompleted }) => {
|
|
21
|
+
const resolvedPlaceholder = usePlaceholderAnimation(placeholder);
|
|
20
22
|
const { currentValue, hasValue, handleChange, resetValue } = useTextFieldValue(controlledValue, onChange);
|
|
21
23
|
const { isFocused, handleFocus, handleBlur } = useTextFieldFocus();
|
|
22
24
|
const { handleSubmit, handleKeyDown } = useTextFieldSubmit(onSubmit, hasValue, disabled, isLoading, currentValue, resetValue);
|
|
@@ -45,7 +47,7 @@ const TextField = ({ theme = Theme.GLOBAL_CUSTOM, placeholder, value: controlled
|
|
|
45
47
|
const resolvedTheme = resolveTheme(theme);
|
|
46
48
|
const input = /* @__PURE__ */ jsx(TextFieldComponents.Input, {
|
|
47
49
|
theme: resolvedTheme,
|
|
48
|
-
placeholder: isLoading ? "" :
|
|
50
|
+
placeholder: isLoading ? "" : resolvedPlaceholder,
|
|
49
51
|
value: isLoading ? "" : currentValue,
|
|
50
52
|
onChange: handleChange,
|
|
51
53
|
onKeyDown: handleKeyDown,
|
|
@@ -53,7 +55,8 @@ const TextField = ({ theme = Theme.GLOBAL_CUSTOM, placeholder, value: controlled
|
|
|
53
55
|
onBlur: handleBlur,
|
|
54
56
|
disabled: disabled || isLoading,
|
|
55
57
|
ariaLabel,
|
|
56
|
-
className: inputClassName
|
|
58
|
+
className: inputClassName,
|
|
59
|
+
multiline
|
|
57
60
|
});
|
|
58
61
|
const sendIcon = !isLoading ? /* @__PURE__ */ jsx(TextFieldComponents.SendIcon, {
|
|
59
62
|
theme: resolvedTheme,
|
|
@@ -83,6 +86,7 @@ const TextField = ({ theme = Theme.GLOBAL_CUSTOM, placeholder, value: controlled
|
|
|
83
86
|
isFocused,
|
|
84
87
|
hasValue,
|
|
85
88
|
disabled,
|
|
89
|
+
multiline,
|
|
86
90
|
id,
|
|
87
91
|
testId,
|
|
88
92
|
className: classNames(className, skeletonClass, disabled && "envive-tw-cursor-not-allowed"),
|
|
@@ -1,14 +1,43 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_getInputClasses = require('../utils/getInputClasses.cjs');
|
|
3
3
|
const require_createInputChangeHandler = require('../utils/createInputChangeHandler.cjs');
|
|
4
|
+
const require_useAutoResize = require('../hooks/useAutoResize.cjs');
|
|
4
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
6
|
let classnames = require("classnames");
|
|
6
7
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
7
8
|
|
|
8
9
|
//#region src/components/TextField/components/Input.tsx
|
|
9
|
-
const Input = ({ theme, placeholder, value, onChange, onKeyDown, onFocus, onBlur, disabled = false, id, testId, className, style, ariaLabel }) => {
|
|
10
|
+
const Input = ({ theme, placeholder, value, onChange, onKeyDown, onFocus, onBlur, disabled = false, multiline = false, id, testId, className, style, ariaLabel }) => {
|
|
10
11
|
const { inputClasses } = require_getInputClasses.getInputClasses(theme);
|
|
11
12
|
const handleChange = require_createInputChangeHandler.createInputChangeHandler(disabled, onChange);
|
|
13
|
+
const textareaRef = require_useAutoResize.useAutoResize(multiline ? value : void 0);
|
|
14
|
+
const sharedClasses = (0, classnames.default)(inputClasses, "focus-visible:envive-tw-shadow-none focus-visible:envive-tw-outline-none", className, disabled && "envive-tw-cursor-not-allowed");
|
|
15
|
+
if (multiline) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
16
|
+
ref: textareaRef,
|
|
17
|
+
id,
|
|
18
|
+
"data-testid": testId,
|
|
19
|
+
placeholder,
|
|
20
|
+
value,
|
|
21
|
+
rows: 1,
|
|
22
|
+
onChange: (e) => {
|
|
23
|
+
if (!disabled) onChange?.(e.target.value);
|
|
24
|
+
},
|
|
25
|
+
onKeyDown: (e) => {
|
|
26
|
+
if (e.key === "Enter" && !e.shiftKey) onKeyDown?.(e);
|
|
27
|
+
},
|
|
28
|
+
onFocus,
|
|
29
|
+
onBlur,
|
|
30
|
+
disabled,
|
|
31
|
+
className: sharedClasses,
|
|
32
|
+
style: {
|
|
33
|
+
resize: "none",
|
|
34
|
+
overflow: "hidden",
|
|
35
|
+
padding: 0,
|
|
36
|
+
...style
|
|
37
|
+
},
|
|
38
|
+
"aria-label": ariaLabel,
|
|
39
|
+
"aria-disabled": disabled
|
|
40
|
+
});
|
|
12
41
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
13
42
|
type: "text",
|
|
14
43
|
id,
|
|
@@ -20,7 +49,7 @@ const Input = ({ theme, placeholder, value, onChange, onKeyDown, onFocus, onBlur
|
|
|
20
49
|
onFocus,
|
|
21
50
|
onBlur,
|
|
22
51
|
disabled,
|
|
23
|
-
className:
|
|
52
|
+
className: sharedClasses,
|
|
24
53
|
style,
|
|
25
54
|
"aria-label": ariaLabel,
|
|
26
55
|
"aria-disabled": disabled
|