@envive-ai/react-toolkit-v3 0.3.32 → 0.3.33
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/CSSVariablesEditor/hooks/useGetCssVariablesOptions.cjs +1 -1
- package/dist/CSSVariablesEditor/hooks/useGetCssVariablesOptions.js +1 -1
- package/dist/CSSVariablesEditor/hooks/useGetCurrentMerchantColors.cjs +1 -1
- package/dist/CSSVariablesEditor/hooks/useGetCurrentMerchantColors.js +1 -1
- package/dist/CSSVariablesEditor/hooks/useGetDefaultCssVariables.cjs +166 -61
- package/dist/CSSVariablesEditor/hooks/useGetDefaultCssVariables.js +166 -61
- package/dist/CSSVariablesEditor/hooks/useHandleUpdateCssVars.cjs +31 -16
- package/dist/CSSVariablesEditor/hooks/useHandleUpdateCssVars.js +31 -16
- package/dist/Carousel/Carousel.d.cts +2 -2
- package/dist/Carousel/components/Badge.cjs +1 -1
- package/dist/Carousel/components/Badge.js +1 -1
- package/dist/Carousel/components/Container.cjs +1 -1
- package/dist/Carousel/components/Container.js +1 -1
- 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 +1 -1
- package/dist/ChatFooter/components/Layout.js +1 -1
- package/dist/ChatFooter/components/index.d.cts +5 -5
- package/dist/ChatFooter/components/index.d.ts +5 -5
- package/dist/ChatHeader/ChatHeader.d.ts +2 -2
- package/dist/ChatHeader/hooks/useGetHandleProperties.cjs +1 -1
- package/dist/ChatHeader/hooks/useGetHandleProperties.js +1 -1
- package/dist/ChatHeader/hooks/useGetLayoutProperties.cjs +1 -1
- package/dist/ChatHeader/hooks/useGetLayoutProperties.js +1 -1
- package/dist/ChatPreview/ChatPreview.d.cts +2 -2
- package/dist/ChatPreview/ChatPreview.d.ts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.cts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.ts +2 -2
- package/dist/ChatPreviewComparison/components/Layout.cjs +2 -2
- package/dist/ChatPreviewComparison/components/Layout.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 +172 -172
- package/dist/Container/Container.d.ts +172 -172
- package/dist/DesignTokens/DesignTokensComponent.d.cts +2 -2
- package/dist/DesignTokens/DesignTokensComponent.d.ts +2 -2
- package/dist/DesignTokens/components/FontFamily.cjs +1 -1
- package/dist/DesignTokens/components/FontFamily.js +1 -1
- package/dist/DesignTokens/components/FontSize.cjs +1 -1
- package/dist/DesignTokens/components/FontSize.js +1 -1
- package/dist/DesignTokens/components/FontWeight.cjs +5 -4
- package/dist/DesignTokens/components/FontWeight.js +5 -4
- package/dist/DesignTokens/components/LetterSpacing.cjs +16 -2
- package/dist/DesignTokens/components/LetterSpacing.js +16 -2
- package/dist/DesignTokens/components/LineHeight.cjs +14 -9
- package/dist/DesignTokens/components/LineHeight.js +14 -9
- package/dist/DesignTokens/components/Typography.cjs +1 -1
- package/dist/DesignTokens/components/Typography.js +1 -1
- package/dist/Disclaimer/components/Container.cjs +1 -1
- package/dist/Disclaimer/components/Container.js +1 -1
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.cts +2 -2
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.ts +2 -2
- package/dist/DocumentRetrievalCard/components/Image.cjs +1 -1
- package/dist/DocumentRetrievalCard/components/Image.js +1 -1
- package/dist/DocumentRetrievalCard/components/Layout.cjs +1 -1
- package/dist/DocumentRetrievalCard/components/Layout.js +1 -1
- 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/components/Label.cjs +1 -1
- package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Label.js +1 -1
- package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Layout.cjs +1 -1
- package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Layout.js +1 -1
- package/dist/FloatingButton/FloatingButton.d.cts +2 -2
- package/dist/FloatingButton/FloatingButton.d.ts +2 -2
- package/dist/FloatingButton/components/Button.cjs +1 -1
- package/dist/FloatingButton/components/Button.js +1 -1
- package/dist/FloatingButton/components/Container.cjs +1 -1
- package/dist/FloatingButton/components/Container.js +1 -1
- package/dist/FloatingButton/components/Wrapper.cjs +1 -1
- package/dist/FloatingButton/components/Wrapper.js +1 -1
- 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 +1 -1
- package/dist/FloatingChat/components/Layout.js +1 -1
- package/dist/FloatingChat/components/ProductResultsModal.cjs +1 -1
- package/dist/FloatingChat/components/ProductResultsModal.js +1 -1
- package/dist/FloatingChat/components/ResultsGridView.cjs +1 -1
- package/dist/FloatingChat/components/ResultsGridView.js +1 -1
- package/dist/FloatingChat/components/SalesAgentBadgeContent.cjs +4 -4
- package/dist/FloatingChat/components/SalesAgentBadgeContent.js +4 -4
- package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.cjs +6 -3
- package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.js +6 -3
- package/dist/FloatingChat/utils/functions.cjs +2 -1
- package/dist/FloatingChat/utils/functions.js +2 -1
- package/dist/Form/Form.cjs +1 -1
- package/dist/Form/Form.js +1 -1
- package/dist/Form/components/Layout.cjs +1 -1
- package/dist/Form/components/Layout.js +1 -1
- package/dist/Form/components/SubmitButtonItem.cjs +1 -1
- package/dist/Form/components/SubmitButtonItem.js +1 -1
- package/dist/Form/components/TextFieldItem.cjs +1 -1
- package/dist/Form/components/TextFieldItem.js +1 -1
- package/dist/FullPageSalesAgent/FullPageSalesAgent.d.cts +2 -2
- package/dist/FullPageSalesAgent/FullPageSalesAgent.d.ts +2 -2
- package/dist/FullPageSalesAgent/components/Layout.cjs +1 -1
- package/dist/FullPageSalesAgent/components/Layout.js +1 -1
- package/dist/FullPageSalesAgent/components/WelcomeOverlay.cjs +1 -1
- package/dist/FullPageSalesAgent/components/WelcomeOverlay.js +1 -1
- package/dist/Image/Image.cjs +1 -1
- package/dist/Image/Image.d.cts +2 -2
- package/dist/Image/Image.d.ts +2 -2
- package/dist/Image/Image.js +1 -1
- 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/ImageGallery/utils/functions.cjs +1 -1
- package/dist/ImageGallery/utils/functions.js +1 -1
- package/dist/MarkdownProcessor/MarkdownProcessor.d.cts +2 -2
- package/dist/MarkdownProcessor/MarkdownProcessor.d.ts +2 -2
- package/dist/Message/components/Layout.cjs +1 -1
- package/dist/Message/components/Layout.js +1 -1
- package/dist/OrderLookupCard/OrderLookupCard.cjs +1 -1
- package/dist/OrderLookupCard/OrderLookupCard.js +1 -1
- package/dist/OrderLookupCard/components/Layout.cjs +1 -1
- package/dist/OrderLookupCard/components/Layout.js +1 -1
- package/dist/OrderLookupCard/components/MoreProductsOverlay.cjs +1 -1
- package/dist/OrderLookupCard/components/MoreProductsOverlay.js +1 -1
- package/dist/OrderLookupCard/components/ProductImageGridItem.cjs +1 -1
- package/dist/OrderLookupCard/components/ProductImageGridItem.js +1 -1
- package/dist/OrderLookupCard/components/ProductImageItem.cjs +1 -1
- package/dist/OrderLookupCard/components/ProductImageItem.js +1 -1
- package/dist/OrderLookupCard/components/ProductImagesGrid.cjs +1 -1
- package/dist/OrderLookupCard/components/ProductImagesGrid.js +1 -1
- package/dist/OrderLookupCard/components/StatusLabel.cjs +1 -1
- package/dist/OrderLookupCard/components/StatusLabel.js +1 -1
- package/dist/OrderLookupCard/components/TrackOrderLink.cjs +1 -1
- package/dist/OrderLookupCard/components/TrackOrderLink.js +1 -1
- package/dist/ProductCard/ProductCard.cjs +14 -8
- package/dist/ProductCard/ProductCard.d.cts +3 -2
- package/dist/ProductCard/ProductCard.d.ts +3 -2
- package/dist/ProductCard/ProductCard.js +10 -4
- package/dist/ProductCard/components/Header.cjs +7 -5
- package/dist/ProductCard/components/Header.js +7 -5
- package/dist/ProductCard/components/Poster.cjs +3 -2
- package/dist/ProductCard/components/Poster.js +3 -2
- package/dist/ProductCard/hooks/useGetPosterProperties.cjs +5 -3
- package/dist/ProductCard/hooks/useGetPosterProperties.js +6 -3
- package/dist/ProductCard/index.cjs +3 -1
- package/dist/ProductCard/index.d.cts +2 -2
- package/dist/ProductCard/index.d.ts +2 -2
- package/dist/ProductCard/index.js +2 -1
- package/dist/ProductCard/types/index.cjs +10 -0
- package/dist/ProductCard/types/index.d.cts +13 -3
- package/dist/ProductCard/types/index.d.ts +13 -3
- package/dist/ProductCard/types/index.js +9 -0
- package/dist/PromptButton/PromptButton.cjs +1 -1
- package/dist/PromptButton/PromptButton.d.cts +2 -2
- package/dist/PromptButton/PromptButton.d.ts +2 -2
- package/dist/PromptButton/PromptButton.js +1 -1
- package/dist/PromptButton/components/Layout.cjs +1 -1
- package/dist/PromptButton/components/Layout.js +1 -1
- package/dist/PromptButton/components/Loading.cjs +1 -1
- package/dist/PromptButton/components/Loading.js +1 -1
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.cts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts +2 -2
- package/dist/PromptButtonCarouselWithImage/components/Layout.cjs +1 -1
- package/dist/PromptButtonCarouselWithImage/components/Layout.js +1 -1
- package/dist/PromptButtonCarouselWithImage/components/Skeleton.cjs +1 -1
- package/dist/PromptButtonCarouselWithImage/components/Skeleton.js +1 -1
- package/dist/PromptCarousel/PromptCarousel.cjs +1 -1
- package/dist/PromptCarousel/PromptCarousel.d.cts +2 -2
- package/dist/PromptCarousel/PromptCarousel.d.ts +2 -2
- package/dist/PromptCarousel/PromptCarousel.js +1 -1
- package/dist/ReviewCard/ReviewCard.d.cts +2 -2
- package/dist/ReviewCard/ReviewCard.d.ts +2 -2
- package/dist/ReviewCard/components/Container.cjs +1 -1
- package/dist/ReviewCard/components/Container.js +1 -1
- package/dist/ReviewCard/components/Rating.cjs +1 -1
- package/dist/ReviewCard/components/Rating.js +1 -1
- 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 +1 -1
- package/dist/SalesAgentProductCard/components/Container.js +1 -1
- package/dist/SalesAgentProductCard/components/ProductImage.cjs +1 -1
- package/dist/SalesAgentProductCard/components/ProductImage.js +1 -1
- package/dist/SalesAgentProductCard/components/ProductName.cjs +1 -1
- package/dist/SalesAgentProductCard/components/ProductName.js +1 -1
- package/dist/SalesAgentProductCard/components/index.d.cts +8 -8
- package/dist/SalesAgentProductCard/components/index.d.ts +8 -8
- package/dist/SocialProof/SocialProof.d.cts +2 -2
- package/dist/SocialProof/SocialProof.d.ts +2 -2
- package/dist/SocialProof/components/Headline.cjs +1 -1
- package/dist/SocialProof/components/Headline.js +1 -1
- package/dist/SocialProof/components/LayoutFourHorizontal.cjs +1 -1
- package/dist/SocialProof/components/LayoutFourHorizontal.js +1 -1
- package/dist/SparkleAnimation/SparkleAnimation.d.cts +2 -2
- package/dist/Stack/Stack.d.cts +2 -2
- package/dist/Stack/Stack.d.ts +2 -2
- package/dist/TextField/TextField.cjs +1 -1
- package/dist/TextField/TextField.js +1 -1
- package/dist/TextField/components/Input.cjs +1 -1
- package/dist/TextField/components/Input.js +1 -1
- package/dist/TextField/components/Layout.cjs +1 -1
- package/dist/TextField/components/Layout.js +1 -1
- package/dist/TextField/components/SendIcon.cjs +1 -1
- package/dist/TextField/components/SendIcon.js +1 -1
- package/dist/Title/Title.cjs +1 -1
- package/dist/Title/Title.js +1 -1
- package/dist/Title/components/Layout.cjs +1 -1
- package/dist/Title/components/Layout.js +1 -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 +2 -2
- package/dist/Tokens/index.js +2 -2
- package/dist/TypingAnimation/TypingAnimation.d.cts +2 -2
- package/dist/TypingAnimation/TypingAnimation.d.ts +2 -2
- package/dist/Typography/Typography.d.ts +4 -4
- package/dist/WelcomeMessage/components/Container.cjs +1 -1
- package/dist/WelcomeMessage/components/Container.js +1 -1
- package/dist/WidgetTextField/WidgetTextField.cjs +3 -2
- package/dist/WidgetTextField/WidgetTextField.d.cts +1 -0
- package/dist/WidgetTextField/WidgetTextField.d.ts +1 -0
- package/dist/WidgetTextField/WidgetTextField.js +3 -2
- package/dist/WidgetTextField/components/Container.cjs +4 -3
- package/dist/WidgetTextField/components/Container.js +4 -3
- package/dist/WidgetTextField/components/Skeleton.cjs +1 -1
- package/dist/WidgetTextField/components/Skeleton.js +1 -1
- package/dist/WidgetTextField/hooks/useGetContainerProperties.cjs +7 -3
- package/dist/WidgetTextField/hooks/useGetContainerProperties.js +7 -3
- package/dist/WidgetTextField/types/types.d.cts +2 -0
- package/dist/WidgetTextField/types/types.d.ts +2 -0
- package/dist/WidgetWrapper/WidgetWrapper.cjs +1 -1
- package/dist/WidgetWrapper/WidgetWrapper.d.cts +2 -2
- package/dist/WidgetWrapper/WidgetWrapper.js +1 -1
- package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.cts +2 -2
- package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.ts +2 -2
- package/dist/packages/components-v3/tokens/typography/fontWeight.cjs +12 -9
- package/dist/packages/components-v3/tokens/typography/fontWeight.d.ts +4 -3
- package/dist/packages/components-v3/tokens/typography/fontWeight.js +12 -9
- package/dist/packages/components-v3/tokens/typography/letterSpacing.cjs +39 -6
- package/dist/packages/components-v3/tokens/typography/letterSpacing.d.ts +13 -2
- package/dist/packages/components-v3/tokens/typography/letterSpacing.js +39 -6
- package/dist/packages/components-v3/tokens/typography/lineHeight.cjs +39 -30
- package/dist/packages/components-v3/tokens/typography/lineHeight.d.ts +15 -12
- package/dist/packages/components-v3/tokens/typography/lineHeight.js +39 -30
- package/dist/packages/components-v3/tokens/typography/typography.cjs +63 -63
- package/dist/packages/components-v3/tokens/typography/typography.js +63 -63
- package/dist/styles.css +1 -1
- package/dist/tokens/typography/fontWeight.d.cts +4 -3
- package/dist/tokens/typography/letterSpacing.d.cts +13 -2
- package/dist/tokens/typography/lineHeight.d.cts +15 -12
- package/dist/utils/resolveTheme.cjs +1 -1
- package/dist/utils/resolveTheme.js +1 -1
- package/package.json +1 -1
- package/src/components/CSSVariablesEditor/hooks/useGetDefaultCssVariables.ts +165 -60
- package/src/components/CSSVariablesEditor/hooks/useHandleUpdateCssVars.ts +30 -15
- package/src/components/DesignTokens/components/FontWeight.tsx +4 -3
- package/src/components/DesignTokens/components/LetterSpacing.tsx +13 -1
- package/src/components/DesignTokens/components/LineHeight.tsx +13 -8
- package/src/components/FloatingChat/components/SalesAgentBadgeContent.tsx +8 -2
- package/src/components/FloatingChat/components/SalesAgentProductCardsCarousel.tsx +5 -2
- package/src/components/FloatingChat/utils/functions.ts +2 -3
- package/src/components/ProductCard/ProductCard.tsx +8 -4
- package/src/components/ProductCard/components/Header.tsx +11 -5
- package/src/components/ProductCard/components/Poster.tsx +12 -3
- package/src/components/ProductCard/hooks/useGetPosterProperties.ts +15 -3
- package/src/components/ProductCard/index.ts +1 -0
- package/src/components/ProductCard/types/index.ts +13 -1
- package/src/components/WidgetTextField/WidgetTextField.tsx +2 -0
- package/src/components/WidgetTextField/components/Container.tsx +3 -0
- package/src/components/WidgetTextField/hooks/useGetContainerProperties.ts +8 -2
- package/src/components/WidgetTextField/types/types.ts +2 -0
|
@@ -2,6 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { Theme } from '../../../../tokens/theme/theme';
|
|
3
3
|
import { PromptButtonVariant } from '../../PromptButton';
|
|
4
4
|
|
|
5
|
+
export enum ProductCardVariant {
|
|
6
|
+
DARK = 'dark',
|
|
7
|
+
LIGHT = 'light',
|
|
8
|
+
}
|
|
9
|
+
|
|
5
10
|
/**
|
|
6
11
|
* Props for the Carousel component.
|
|
7
12
|
*/
|
|
@@ -70,6 +75,8 @@ export interface HeaderProps {
|
|
|
70
75
|
textTransition?: number;
|
|
71
76
|
/** Whether the animation should loop continuously. */
|
|
72
77
|
loop?: boolean;
|
|
78
|
+
/** Controls text color: dark uses text-light (white), light uses text-primary. */
|
|
79
|
+
variant?: ProductCardVariant;
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
/**
|
|
@@ -82,6 +89,8 @@ export interface PosterProps {
|
|
|
82
89
|
imageSrc: string;
|
|
83
90
|
/** Fallback background color to display if the image fails to load. */
|
|
84
91
|
fallbackColor?: string;
|
|
92
|
+
/** Controls overlay color on the image: dark uses black overlay, light uses white overlay. */
|
|
93
|
+
variant?: ProductCardVariant;
|
|
85
94
|
}
|
|
86
95
|
|
|
87
96
|
/**
|
|
@@ -116,4 +125,7 @@ export interface InputIconProps {
|
|
|
116
125
|
* Excludes the 'children' prop from PosterProps.
|
|
117
126
|
*/
|
|
118
127
|
export interface ProductCardProps
|
|
119
|
-
extends InputProps, CarouselProps, HeaderProps, Omit<PosterProps, 'children'> {
|
|
128
|
+
extends InputProps, CarouselProps, HeaderProps, Omit<PosterProps, 'children'> {
|
|
129
|
+
/** Controls text color: dark uses text-light (white), light uses text-primary. Defaults to dark. */
|
|
130
|
+
variant?: ProductCardVariant;
|
|
131
|
+
}
|
|
@@ -19,6 +19,7 @@ export const WidgetTextField = ({
|
|
|
19
19
|
voiceInputClassName,
|
|
20
20
|
theme = Theme.GLOBAL_CUSTOM,
|
|
21
21
|
minimalFrame = 'full',
|
|
22
|
+
minimalBorderVariant,
|
|
22
23
|
iconVariant = IconVariant.DEFAULT,
|
|
23
24
|
textColor = TypographyColor.TEXT_SECONDARY,
|
|
24
25
|
placeholder,
|
|
@@ -80,6 +81,7 @@ export const WidgetTextField = ({
|
|
|
80
81
|
className={className}
|
|
81
82
|
theme={resolvedTheme}
|
|
82
83
|
minimalFrame={minimalFrame}
|
|
84
|
+
minimalBorderVariant={minimalBorderVariant}
|
|
83
85
|
disabled={disabled}
|
|
84
86
|
ariaLabel={ariaLabel}
|
|
85
87
|
icon={
|
|
@@ -12,6 +12,7 @@ type ContainerProps = {
|
|
|
12
12
|
className?: string;
|
|
13
13
|
theme: Theme;
|
|
14
14
|
minimalFrame?: 'full' | 'bottom-only';
|
|
15
|
+
minimalBorderVariant?: 'light' | 'primary';
|
|
15
16
|
ariaLabel?: string;
|
|
16
17
|
icon: React.ReactNode;
|
|
17
18
|
text: React.ReactNode;
|
|
@@ -27,6 +28,7 @@ export const Container = ({
|
|
|
27
28
|
className,
|
|
28
29
|
theme,
|
|
29
30
|
minimalFrame,
|
|
31
|
+
minimalBorderVariant,
|
|
30
32
|
ariaLabel,
|
|
31
33
|
icon,
|
|
32
34
|
text,
|
|
@@ -38,6 +40,7 @@ export const Container = ({
|
|
|
38
40
|
useGetContainerProperties({
|
|
39
41
|
theme,
|
|
40
42
|
minimalFrame,
|
|
43
|
+
minimalBorderVariant,
|
|
41
44
|
});
|
|
42
45
|
|
|
43
46
|
const { handleKeyDown } = useHandleKeyboard({ onClick });
|
|
@@ -4,19 +4,25 @@ import { Theme } from '../../../../tokens/theme/theme';
|
|
|
4
4
|
export type UseGetContainerPropertiesProps = {
|
|
5
5
|
theme: Theme;
|
|
6
6
|
minimalFrame?: 'full' | 'bottom-only';
|
|
7
|
+
minimalBorderVariant?: 'light' | 'primary';
|
|
7
8
|
};
|
|
8
9
|
|
|
9
10
|
export const useGetContainerProperties = ({
|
|
10
11
|
theme,
|
|
11
12
|
minimalFrame = 'full',
|
|
13
|
+
minimalBorderVariant = 'light',
|
|
12
14
|
}: UseGetContainerPropertiesProps) => {
|
|
13
15
|
const baseClassName =
|
|
14
16
|
'envive-tw-cursor-text envive-tw-border-solid envive-tw-px-4 envive-tw-py-2 envive-tw-bg-[--envive-colors-background-light]';
|
|
15
17
|
|
|
16
18
|
const themeContainerClassName = useMemo(() => {
|
|
19
|
+
const borderColorClass =
|
|
20
|
+
minimalBorderVariant === 'primary'
|
|
21
|
+
? 'envive-tw-border-text-primary'
|
|
22
|
+
: 'envive-tw-border-text-light';
|
|
17
23
|
const minimalBorderClass =
|
|
18
24
|
minimalFrame === 'bottom-only'
|
|
19
|
-
?
|
|
25
|
+
? `envive-tw-border-b-[1px] ${borderColorClass}`
|
|
20
26
|
: 'envive-tw-border-[1px] envive-tw-border-border-light';
|
|
21
27
|
|
|
22
28
|
const themeCotainerMap = {
|
|
@@ -27,7 +33,7 @@ export const useGetContainerProperties = ({
|
|
|
27
33
|
[Theme.GLOBAL_CUSTOM]: '',
|
|
28
34
|
};
|
|
29
35
|
return themeCotainerMap[theme] ?? '';
|
|
30
|
-
}, [theme, minimalFrame]);
|
|
36
|
+
}, [theme, minimalFrame, minimalBorderVariant]);
|
|
31
37
|
|
|
32
38
|
const containerWrapperClassName =
|
|
33
39
|
'envive-tw-gap-4 envive-tw-flex envive-tw-w-full envive-tw-flex-row';
|
|
@@ -36,6 +36,8 @@ export type WidgetTextFieldProps = {
|
|
|
36
36
|
* @default 'full'
|
|
37
37
|
*/
|
|
38
38
|
minimalFrame?: 'full' | 'bottom-only';
|
|
39
|
+
/** Border color for the bottom-only minimal frame. `light` = text-light (white), `primary` = text-primary. @default 'light' */
|
|
40
|
+
minimalBorderVariant?: 'light' | 'primary';
|
|
39
41
|
/** Placeholder text displayed in the text field. */
|
|
40
42
|
placeholder?: string;
|
|
41
43
|
/** Accessible label for screen readers. If not provided, the placeholder will be used. */
|