@beydesign/storybook 0.1.20 → 0.2.0
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/App.js +65 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/stories/Agent/AgentCard.js +9 -9
- package/dist/stories/Agent/AgentCardSkeleton.js +1 -1
- package/dist/stories/Agent/CreateNewCard.js +4 -4
- package/dist/stories/Buttons/MainButton.js +51 -51
- package/dist/stories/Buttons/ToggleButtonGroup.js +4 -4
- package/dist/stories/Credits/CreditsCard.js +4 -4
- package/dist/stories/Credits/CreditsCardSkeleton.js +2 -2
- package/dist/stories/EntityCard/EntityCard.js +3 -3
- package/dist/stories/EntityCard/EntityCardSkeleton.js +1 -1
- package/dist/stories/Form/AutoComplete.js +10 -10
- package/dist/stories/Form/Checkbox.js +7 -7
- package/dist/stories/Form/Dropdown.js +16 -16
- package/dist/stories/Form/FileUpload/FileUpload.js +15 -15
- package/dist/stories/Form/FileUpload/FileUploading.js +8 -8
- package/dist/stories/Form/FileUpload/UploadedFile.js +2 -2
- package/dist/stories/Form/TextArea.js +7 -7
- package/dist/stories/Form/TextInput.js +10 -10
- package/dist/stories/Form/Toggle.js +5 -5
- package/dist/stories/Form/Toggle.stories.js +1 -1
- package/dist/stories/Foundations/Colors.js +69 -71
- package/dist/stories/Navigation/ComplexHeader.js +1 -1
- package/dist/stories/Navigation/Header.js +1 -1
- package/dist/stories/Navigation/NavItem.js +9 -9
- package/dist/stories/Navigation/NavItem.stories.js +2 -2
- package/dist/stories/Navigation/Sidebar.js +7 -8
- package/dist/stories/Navigation/Sidebar.stories.js +1 -1
- package/dist/stories/PlanCard/PlanCard.d.ts +3 -0
- package/dist/stories/PlanCard/PlanCard.js +13 -0
- package/dist/stories/PlanCard/PlanCard.stories.d.ts +9 -0
- package/dist/stories/PlanCard/PlanCard.stories.js +125 -0
- package/dist/stories/PlanCard/PlanCardSkeleton.d.ts +3 -0
- package/dist/stories/PlanCard/PlanCardSkeleton.js +6 -0
- package/dist/stories/PlanCard/PlanCardSkeleton.stories.d.ts +7 -0
- package/dist/stories/PlanCard/PlanCardSkeleton.stories.js +40 -0
- package/dist/stories/PlanCard/index.d.ts +3 -0
- package/dist/stories/PlanCard/index.js +3 -0
- package/dist/stories/PlanCard/types.d.ts +61 -0
- package/dist/stories/PlanCard/types.js +1 -0
- package/dist/stories/StripeProduct/StripeProduct.js +5 -7
- package/dist/stories/StripeProduct/StripeProductCardSkeleton.js +1 -1
- package/dist/stories/Typography/Typography.js +1 -1
- package/dist/stories/UI/Avatar.js +6 -6
- package/dist/stories/UI/Badge.js +4 -4
- package/dist/stories/UI/CheckIcon.d.ts +3 -0
- package/dist/stories/UI/CheckIcon.js +36 -0
- package/dist/stories/UI/CheckIcon.stories.d.ts +7 -0
- package/dist/stories/UI/CheckIcon.stories.js +48 -0
- package/dist/stories/UI/FeatureBanner.js +2 -2
- package/dist/stories/UI/HintBubble.js +3 -3
- package/dist/stories/UI/Logo.js +1 -1
- package/dist/stories/UI/Logo.stories.js +1 -1
- package/dist/stories/UI/Menu.js +10 -3
- package/dist/stories/UI/ProgressIndicator.js +1 -1
- package/dist/stories/UI/PromoBanner.js +6 -3
- package/dist/stories/UI/SkeletonLoader.js +1 -1
- package/dist/stories/UI/Stepper.js +12 -12
- package/dist/stories/UI/index.d.ts +1 -0
- package/dist/stories/UI/index.js +1 -0
- package/dist/stories/UI/types.d.ts +42 -0
- package/dist/stories/UI/types.js +30 -0
- package/package.json +2 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BadgeColor } from '../UI';
|
|
3
|
+
import { ButtonHierarchy } from '../Buttons';
|
|
4
|
+
/**
|
|
5
|
+
* Plan card component props — a compact, in-app subscription plan card.
|
|
6
|
+
*/
|
|
7
|
+
export interface PlanCardProps {
|
|
8
|
+
/** Plan name (e.g. "Pro") */
|
|
9
|
+
title: string;
|
|
10
|
+
/** Short plan description */
|
|
11
|
+
description?: string;
|
|
12
|
+
/** Price text (e.g. "€210" or "Custom") */
|
|
13
|
+
price?: string;
|
|
14
|
+
/** Price suffix shown next to the price (e.g. "/month") */
|
|
15
|
+
priceSuffix?: string;
|
|
16
|
+
/** Badge text (e.g. "Most Popular", "Current Plan") */
|
|
17
|
+
badgeText?: string;
|
|
18
|
+
/** Badge color (defaults to Lemon) */
|
|
19
|
+
badgeColor?: BadgeColor;
|
|
20
|
+
/** Highlights the card with a brand background + border */
|
|
21
|
+
highlighted?: boolean;
|
|
22
|
+
/** Heading above the feature list */
|
|
23
|
+
featuresTitle?: string;
|
|
24
|
+
/** Feature list */
|
|
25
|
+
features?: string[];
|
|
26
|
+
/** Action button label (defaults to "Upgrade"); hidden when omitted */
|
|
27
|
+
buttonText?: string;
|
|
28
|
+
/** Action button click handler */
|
|
29
|
+
onButtonClick?: () => void;
|
|
30
|
+
/** Disable the action button (e.g. for the current plan) */
|
|
31
|
+
buttonDisabled?: boolean;
|
|
32
|
+
/** Action button hierarchy (defaults to Primary) */
|
|
33
|
+
buttonHierarchy?: ButtonHierarchy;
|
|
34
|
+
/** Show a loading spinner on the action button */
|
|
35
|
+
buttonLoading?: boolean;
|
|
36
|
+
/** Width of the card */
|
|
37
|
+
width?: string | number;
|
|
38
|
+
/** Custom style */
|
|
39
|
+
style?: React.CSSProperties;
|
|
40
|
+
/** Test id */
|
|
41
|
+
testId?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Plan card skeleton props
|
|
45
|
+
*/
|
|
46
|
+
export interface PlanCardSkeletonProps {
|
|
47
|
+
/** Whether to show the badge placeholder */
|
|
48
|
+
showBadge?: boolean;
|
|
49
|
+
/** Whether to show the button placeholder */
|
|
50
|
+
showButton?: boolean;
|
|
51
|
+
/** Whether to show the features placeholder */
|
|
52
|
+
showFeatures?: boolean;
|
|
53
|
+
/** Number of feature placeholders */
|
|
54
|
+
featuresCount?: number;
|
|
55
|
+
/** Width of the card */
|
|
56
|
+
width?: string | number;
|
|
57
|
+
/** Custom style */
|
|
58
|
+
style?: React.CSSProperties;
|
|
59
|
+
/** Test id */
|
|
60
|
+
testId?: string;
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,12 +7,10 @@ import React from 'react';
|
|
|
7
7
|
import { Badge, BadgeColor, BadgeSize } from '../UI';
|
|
8
8
|
export const StripeProduct = ({ className, description, features, isMostPopular, isEnterprisePlan, style, title, duration, price, buttonProps, bubbleText, bubbleTooltip, bubbleTopOffset, testId, }) => {
|
|
9
9
|
return (_jsxs(Box, { display: 'flex', flexDirection: 'column', borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)', paddingY: 'var(--spacing-tokens-size-in-px-spacing-spacing-2xl)', paddingX: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', bgcolor: isMostPopular
|
|
10
|
-
? 'var(--
|
|
11
|
-
: 'var(--
|
|
12
|
-
? '1.5px solid var(--colors-light-border-border-brand)'
|
|
13
|
-
: 'none', position: 'relative', boxShadow: '0px 0px 10px 0px rgba(0, 0, 0, 0.1)', style: style, className: className, "data-testid": testId, children: [bubbleText && (_jsx(Box, { position: 'absolute', top: bubbleTopOffset || '-4%', right: 0, left: 0, children: _jsx(Badge, { text: bubbleText, color: BadgeColor.Yellow, children: bubbleTooltip, size: BadgeSize.xs, fill: true }) })), _jsxs(Box, { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', children: [_jsx(Typography, { size: TypographySize.HeadingM, weight: TypographyWeight.Bold, color: 'var(--colors-light-text-text-title)', children: title }), isMostPopular && (_jsx(Box, { display: 'flex', justifyContent: 'center', alignItems: 'center', paddingX: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', paddingY: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs)', bgcolor: 'var(--primitives-desktop-primary-brand-violet-200)', borderRadius: 'var(--spacing-tokens-size-in-px-radius-radius-sm)', children: _jsx(Typography, { size: TypographySize.HeadingXS, weight: TypographyWeight.Regular, color: 'var(--colors-light-text-text-accent)', children: "Most popular" }) }))] }), _jsx(Typography, { size: TypographySize.HeadingM, weight: TypographyWeight.Regular, color: 'var(--colors-light-text-text-paragraph)', textStyle: { textAlign: 'left', minHeight: '100px' }, children: description }), _jsx(Box, { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'end', children: isEnterprisePlan ? (_jsx(Typography, { size: TypographySize.HeadingL, weight: TypographyWeight.Bold, color: 'var(--colors-light-text-text-title)', children: "Custom" })) : (_jsxs(React.Fragment, { children: [_jsx(Typography, { size: TypographySize.HeadingL, weight: TypographyWeight.Bold, color: 'var(--colors-light-text-text-title)', children: price }), _jsxs(Typography, { size: TypographySize.HeadingXS, weight: TypographyWeight.Regular, color: 'var(--colors-light-text-text-paragraph)', children: ["/", duration] })] })) }), buttonProps && (_jsx(MainButton, { disabled: buttonProps?.disabled, loading: buttonProps?.loading, onClick: buttonProps?.onClick, text: buttonProps?.text, size: buttonProps?.size || ButtonSize.lg, hierarchy: buttonProps?.hierarchy || ButtonHierarchy.Primary, style: {
|
|
10
|
+
? 'var(--color-background-bg-card-highlight)'
|
|
11
|
+
: 'var(--color-background-bg-component)', border: isMostPopular ? '1.5px solid var(--color-border-border-brand)' : 'none', position: 'relative', boxShadow: '0px 0px 10px 0px rgba(0, 0, 0, 0.1)', style: style, className: className, "data-testid": testId, children: [bubbleText && (_jsx(Box, { position: 'absolute', top: bubbleTopOffset || '-4%', right: 0, left: 0, children: _jsx(Badge, { text: bubbleText, color: BadgeColor.Yellow, children: bubbleTooltip, size: BadgeSize.xs, fill: true }) })), _jsxs(Box, { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', children: [_jsx(Typography, { size: TypographySize.HeadingM, weight: TypographyWeight.Bold, color: 'var(--color-text-text-title)', children: title }), isMostPopular && (_jsx(Box, { display: 'flex', justifyContent: 'center', alignItems: 'center', paddingX: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', paddingY: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs)', bgcolor: 'var(--color-background-bg-badge-accent-brand-violet)', borderRadius: 'var(--spacing-tokens-size-in-px-radius-radius-sm)', children: _jsx(Typography, { size: TypographySize.HeadingXS, weight: TypographyWeight.Regular, color: 'var(--color-text-text-accent)', children: "Most popular" }) }))] }), _jsx(Typography, { size: TypographySize.HeadingM, weight: TypographyWeight.Regular, color: 'var(--color-text-text-paragraph)', textStyle: { textAlign: 'left', minHeight: '100px' }, children: description }), _jsx(Box, { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'end', children: isEnterprisePlan ? (_jsx(Typography, { size: TypographySize.HeadingL, weight: TypographyWeight.Bold, color: 'var(--color-text-text-title)', children: "Custom" })) : (_jsxs(React.Fragment, { children: [_jsx(Typography, { size: TypographySize.HeadingL, weight: TypographyWeight.Bold, color: 'var(--color-text-text-title)', children: price }), _jsxs(Typography, { size: TypographySize.HeadingXS, weight: TypographyWeight.Regular, color: 'var(--color-text-text-paragraph)', children: ["/", duration] })] })) }), buttonProps && (_jsx(MainButton, { disabled: buttonProps?.disabled, loading: buttonProps?.loading, onClick: buttonProps?.onClick, text: buttonProps?.text, size: buttonProps?.size || ButtonSize.lg, hierarchy: buttonProps?.hierarchy || ButtonHierarchy.Primary, style: {
|
|
14
12
|
margin: 'var(--spacing-tokens-size-in-px-spacing-spacing-3xl) 0',
|
|
15
|
-
} })), features && features?.length > 0 && (_jsxs(Box, { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', alignItems: 'flex-start', children: [_jsx(Typography, { size: TypographySize.TextM, weight: TypographyWeight.Medium, color: 'var(--
|
|
13
|
+
} })), features && features?.length > 0 && (_jsxs(Box, { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', alignItems: 'flex-start', children: [_jsx(Typography, { size: TypographySize.TextM, weight: TypographyWeight.Medium, color: 'var(--color-text-text-title)', children: "This includes:" }), features.map((feature, index) => {
|
|
16
14
|
const isHeading = feature?.startsWith('-');
|
|
17
15
|
return (_jsxs(Box, { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', children: [!isHeading && (_jsx(Box, { width: '18px', height: '18px', bgcolor: 'var(--primitives-desktop-primary-brand-violet-100)', borderRadius: 'var(--spacing-tokens-size-in-px-radius-radius-full)', display: 'flex', justifyContent: 'center', alignItems: 'center', children: getIconComponent('Check', {
|
|
18
16
|
size: '12px',
|
|
@@ -20,7 +18,7 @@ export const StripeProduct = ({ className, description, features, isMostPopular,
|
|
|
20
18
|
}) })), _jsx(Typography, { size: TypographySize.TextS, weight: isHeading
|
|
21
19
|
? TypographyWeight.Medium
|
|
22
20
|
: TypographyWeight.Regular, color: isHeading
|
|
23
|
-
? 'var(--
|
|
24
|
-
: 'var(--
|
|
21
|
+
? 'var(--color-text-text-title)'
|
|
22
|
+
: 'var(--color-text-text-paragraph)', textStyle: { textAlign: 'left' }, children: isHeading ? feature?.slice(1)?.trim() : feature })] }, `${index}`));
|
|
25
23
|
})] }))] }));
|
|
26
24
|
};
|
|
@@ -2,5 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box } from '@mui/material';
|
|
3
3
|
import { SkeletonLoader } from '../UI';
|
|
4
4
|
export const StripeProductCardSkeleton = ({ width = 'auto', showMostPopular = false, showBubble = false, showButton = true, showFeatures = true, featuresCount = 5, style, testId, }) => {
|
|
5
|
-
return (_jsxs(Box, { width: width, display: "flex", flexDirection: "column", borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)', paddingY: 'var(--spacing-tokens-size-in-px-spacing-spacing-2xl)', paddingX: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', bgcolor: "var(--
|
|
5
|
+
return (_jsxs(Box, { width: width, display: "flex", flexDirection: "column", borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)', paddingY: 'var(--spacing-tokens-size-in-px-spacing-spacing-2xl)', paddingX: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', bgcolor: "var(--color-background-bg-component)", position: "relative", boxShadow: '0px 0px 10px 0px rgba(0, 0, 0, 0.1)', style: style, "data-testid": testId, children: [showBubble && (_jsx(Box, { position: "absolute", top: "-4%", left: "50%", sx: { transform: 'translateX(-50%)' }, width: "50%", children: _jsx(SkeletonLoader, { height: "24px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }) })), _jsxs(Box, { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", children: [_jsx(SkeletonLoader, { width: "40%", height: "28px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), showMostPopular && (_jsx(SkeletonLoader, { width: "100px", height: "28px", borderRadius: "var(--spacing-tokens-size-in-px-radius-radius-sm)" }))] }), _jsxs(Box, { display: "flex", flexDirection: "column", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-sm)", minHeight: "100px", children: [_jsx(SkeletonLoader, { width: "100%", height: "20px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), _jsx(SkeletonLoader, { width: "95%", height: "20px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), _jsx(SkeletonLoader, { width: "80%", height: "20px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" })] }), _jsxs(Box, { display: "flex", flexDirection: "row", alignItems: "end", gap: "4px", children: [_jsx(SkeletonLoader, { width: "80px", height: "36px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), _jsx(SkeletonLoader, { width: "60px", height: "20px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" })] }), showButton && (_jsx(Box, { margin: 'var(--spacing-tokens-size-in-px-spacing-spacing-3xl) 0', children: _jsx(SkeletonLoader, { width: "100%", height: "44px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-md)" }) })), showFeatures && (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-xl)", alignItems: "flex-start", children: [_jsx(SkeletonLoader, { width: "120px", height: "20px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), Array.from({ length: featuresCount }).map((_, index) => (_jsxs(Box, { display: "flex", flexDirection: "row", alignItems: "flex-start", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-md)", width: "100%", children: [_jsx(SkeletonLoader, { width: "18px", height: "18px", borderRadius: "var(--spacing-tokens-size-in-px-radius-radius-full)" }), _jsx(SkeletonLoader, { width: index % 3 === 0 ? '85%' : index % 3 === 1 ? '75%' : '90%', height: "18px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" })] }, index)))] }))] }));
|
|
6
6
|
};
|
|
@@ -5,7 +5,7 @@ export const Typography = ({ text, color, size = TypographySize.HeadingL, weight
|
|
|
5
5
|
const sizeToken = getTypographySizeToken(size);
|
|
6
6
|
const weightToken = getTypographyWeightToken(weight);
|
|
7
7
|
const { fontSize, fontWeight, fontFamily, lineHeight, letterSpacing, paragraphIndent, paragraphSpacing, textDecoration, textTransform, } = getTextStyles(sizeToken, weightToken);
|
|
8
|
-
const requiredColor = 'var(--
|
|
8
|
+
const requiredColor = 'var(--color-text-text-error)';
|
|
9
9
|
return (_jsxs("span", { className: className, style: {
|
|
10
10
|
fontSize: fontSize,
|
|
11
11
|
fontWeight: fontWeight,
|
|
@@ -26,13 +26,13 @@ export const Avatar = ({ avatarStyle = AvatarStyle.Placeholder, border = false,
|
|
|
26
26
|
const getColor = (avatarStyle) => {
|
|
27
27
|
switch (avatarStyle) {
|
|
28
28
|
case AvatarStyle.Letters:
|
|
29
|
-
return 'var(--
|
|
29
|
+
return 'var(--color-foreground-fg-primary)';
|
|
30
30
|
case AvatarStyle.Placeholder:
|
|
31
|
-
return 'var(--
|
|
31
|
+
return 'var(--color-foreground-fg-tertiary)';
|
|
32
32
|
case AvatarStyle.Picture:
|
|
33
|
-
return 'var(--
|
|
33
|
+
return 'var(--color-foreground-fg-secondary)';
|
|
34
34
|
default:
|
|
35
|
-
return 'var(--
|
|
35
|
+
return 'var(--color-foreground-fg-tertiary)';
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
const getTextSize = () => {
|
|
@@ -55,9 +55,9 @@ export const Avatar = ({ avatarStyle = AvatarStyle.Placeholder, border = false,
|
|
|
55
55
|
width: dimensions,
|
|
56
56
|
height: dimensions,
|
|
57
57
|
border: border
|
|
58
|
-
? '1px solid var(--
|
|
58
|
+
? '1px solid var(--color-border-border-component)'
|
|
59
59
|
: 'none',
|
|
60
|
-
backgroundColor: 'var(--
|
|
60
|
+
backgroundColor: 'var(--color-background-bg-card-highlight)',
|
|
61
61
|
color: getColor(avatarStyle),
|
|
62
62
|
fontSize: getTextSize(),
|
|
63
63
|
borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-11xl)',
|
package/dist/stories/UI/Badge.js
CHANGED
|
@@ -7,7 +7,7 @@ export const Badge = ({ color = BadgeColor.Default, size = BadgeSize.md, text, c
|
|
|
7
7
|
const getBackgroundColor = (color) => {
|
|
8
8
|
switch (color) {
|
|
9
9
|
case BadgeColor.Default:
|
|
10
|
-
return 'var(--
|
|
10
|
+
return 'var(--color-background-bg-badge-accent-gray)';
|
|
11
11
|
case BadgeColor.Violet:
|
|
12
12
|
return 'var(--primitives-desktop-primary-brand-violet-100)';
|
|
13
13
|
case BadgeColor.Lemon:
|
|
@@ -31,7 +31,7 @@ export const Badge = ({ color = BadgeColor.Default, size = BadgeSize.md, text, c
|
|
|
31
31
|
const getTextColor = () => {
|
|
32
32
|
switch (color) {
|
|
33
33
|
case BadgeColor.Default:
|
|
34
|
-
return 'var(--
|
|
34
|
+
return 'var(--color-text-text-title)';
|
|
35
35
|
case BadgeColor.Violet:
|
|
36
36
|
return 'var(--primitives-desktop-primary-brand-violet-800)';
|
|
37
37
|
case BadgeColor.Lemon:
|
|
@@ -49,7 +49,7 @@ export const Badge = ({ color = BadgeColor.Default, size = BadgeSize.md, text, c
|
|
|
49
49
|
case BadgeColor.Pink:
|
|
50
50
|
return 'var(--primitives-desktop-secondary-pink-800)';
|
|
51
51
|
case BadgeColor.DarkTransparent:
|
|
52
|
-
return 'var(--
|
|
52
|
+
return 'var(--color-text-text-white)';
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
const getBorder = (color) => {
|
|
@@ -73,7 +73,7 @@ export const Badge = ({ color = BadgeColor.Default, size = BadgeSize.md, text, c
|
|
|
73
73
|
case BadgeColor.Pink:
|
|
74
74
|
return '1px solid var(--primitives-desktop-secondary-pink-300)';
|
|
75
75
|
case BadgeColor.DarkTransparent:
|
|
76
|
-
return '1px solid rgba(var(--
|
|
76
|
+
return '1px solid rgba(var(--color-background-bg-component-dark), 0.9)';
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
const getPadding = (size) => {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
import { CheckIconColor, CheckIconSize, CheckIconType, } from './types';
|
|
4
|
+
import { getIconComponent } from '../../utils';
|
|
5
|
+
const WHITE = 'var(--color-foreground-fg-on-primary-accent-color)';
|
|
6
|
+
const COLOR_MAP = {
|
|
7
|
+
[CheckIconColor.Violet]: {
|
|
8
|
+
accent: 'var(--color-foreground-fg-accent-violet)',
|
|
9
|
+
subtle: 'var(--color-background-bg-badge-accent-brand-violet)',
|
|
10
|
+
},
|
|
11
|
+
[CheckIconColor.Green]: {
|
|
12
|
+
accent: 'var(--color-foreground-fg-success)',
|
|
13
|
+
subtle: 'var(--color-background-bg-badge-accent-success)',
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
const SIZE_MAP = {
|
|
17
|
+
[CheckIconSize.xs]: { container: 16, check: 11, border: 1.5 },
|
|
18
|
+
[CheckIconSize.sm]: { container: 20, check: 13, border: 1.5 },
|
|
19
|
+
[CheckIconSize.md]: { container: 24, check: 16, border: 2 },
|
|
20
|
+
[CheckIconSize.lg]: { container: 28, check: 18, border: 2 },
|
|
21
|
+
};
|
|
22
|
+
export const CheckIcon = ({ color = CheckIconColor.Violet, size = CheckIconSize.md, type = CheckIconType.Duotone, style, testId, }) => {
|
|
23
|
+
const { accent, subtle } = COLOR_MAP[color];
|
|
24
|
+
const { container, check, border } = SIZE_MAP[size];
|
|
25
|
+
const background = type === CheckIconType.Filled
|
|
26
|
+
? accent
|
|
27
|
+
: type === CheckIconType.Duotone
|
|
28
|
+
? subtle
|
|
29
|
+
: 'transparent';
|
|
30
|
+
const checkColor = type === CheckIconType.Filled ? WHITE : accent;
|
|
31
|
+
return (_jsx(Box, { width: `${container}px`, height: `${container}px`, flexShrink: 0, boxSizing: 'border-box', display: 'flex', alignItems: 'center', justifyContent: 'center', borderRadius: 'var(--spacing-tokens-size-in-px-radius-radius-full)', bgcolor: background, border: type === CheckIconType.Line ? `${border}px solid ${accent}` : undefined, style: style, "data-testid": testId, children: getIconComponent('Check', {
|
|
32
|
+
size: `${check}px`,
|
|
33
|
+
weight: 'bold',
|
|
34
|
+
color: checkColor,
|
|
35
|
+
}) }));
|
|
36
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CheckIcon } from './CheckIcon';
|
|
3
|
+
declare const meta: Meta<typeof CheckIcon>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof CheckIcon>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const AllVariants: Story;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
import { CheckIcon } from './CheckIcon';
|
|
4
|
+
import { CheckIconColor, CheckIconSize, CheckIconType } from './types';
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Design System/Components/UI/CheckIcon',
|
|
7
|
+
component: CheckIcon,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
design: {
|
|
11
|
+
type: 'figspec',
|
|
12
|
+
url: 'https://www.figma.com/design/mIhjz2yJjcpLlIqw6oUivt/Beyond-Presence?node-id=4781-5580',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
tags: ['autodocs'],
|
|
16
|
+
argTypes: {
|
|
17
|
+
color: {
|
|
18
|
+
control: 'select',
|
|
19
|
+
options: Object.values(CheckIconColor),
|
|
20
|
+
table: { defaultValue: { summary: CheckIconColor.Violet } },
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
control: 'select',
|
|
24
|
+
options: Object.values(CheckIconSize),
|
|
25
|
+
table: { defaultValue: { summary: CheckIconSize.md } },
|
|
26
|
+
},
|
|
27
|
+
type: {
|
|
28
|
+
control: 'select',
|
|
29
|
+
options: Object.values(CheckIconType),
|
|
30
|
+
table: { defaultValue: { summary: CheckIconType.Duotone } },
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
export default meta;
|
|
35
|
+
export const Default = {
|
|
36
|
+
args: {
|
|
37
|
+
color: CheckIconColor.Violet,
|
|
38
|
+
size: CheckIconSize.md,
|
|
39
|
+
type: CheckIconType.Duotone,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export const AllVariants = {
|
|
43
|
+
render: () => (_jsx(Box, { display: "flex", flexDirection: "column", gap: 3, children: Object.values(CheckIconType).map((type) => (_jsxs(Box, { display: "flex", flexDirection: "column", gap: 1, children: [_jsx("span", { style: {
|
|
44
|
+
fontFamily: 'Figtree, sans-serif',
|
|
45
|
+
fontSize: 12,
|
|
46
|
+
color: 'var(--color-text-text-subtle)',
|
|
47
|
+
}, children: type }), Object.values(CheckIconColor).map((color) => (_jsx(Box, { display: "flex", alignItems: "center", gap: 2, children: Object.values(CheckIconSize).map((size) => (_jsx(CheckIcon, { color: color, type: type, size: size }, `${color}-${type}-${size}`))) }, color)))] }, type))) })),
|
|
48
|
+
};
|
|
@@ -13,7 +13,7 @@ export const FeatureBanner = ({ title, description, actions = [], media = Featur
|
|
|
13
13
|
: ButtonHierarchy.SecondaryColor, onClick: action.onClick, style: action.primary
|
|
14
14
|
? undefined
|
|
15
15
|
: {
|
|
16
|
-
border: '1px solid var(--
|
|
16
|
+
border: '1px solid var(--color-border-border-component)',
|
|
17
17
|
}, testId: testId ? `${testId}-action-${index}` : undefined }, `${action.text}-${index}`));
|
|
18
18
|
const renderMedia = () => {
|
|
19
19
|
if (media === FeatureBannerMedia.None || !mediaImage)
|
|
@@ -30,5 +30,5 @@ export const FeatureBanner = ({ title, description, actions = [], media = Featur
|
|
|
30
30
|
background: bannerBackground,
|
|
31
31
|
boxSizing: 'border-box',
|
|
32
32
|
...customStyle,
|
|
33
|
-
}, "data-testid": testId, children: [_jsxs(Box, { display: "flex", flexDirection: "column", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-xl)", flex: 1, minWidth: 0, children: [_jsxs(Box, { display: "flex", flexDirection: "column", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-md)", children: [title && (_jsx(Typography, { size: TypographySize.HeadingM, weight: TypographyWeight.Bold, color: "var(--
|
|
33
|
+
}, "data-testid": testId, children: [_jsxs(Box, { display: "flex", flexDirection: "column", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-xl)", flex: 1, minWidth: 0, children: [_jsxs(Box, { display: "flex", flexDirection: "column", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-md)", children: [title && (_jsx(Typography, { size: TypographySize.HeadingM, weight: TypographyWeight.Bold, color: "var(--color-text-text-title)", children: title })), description && (_jsx(Typography, { size: TypographySize.TextXS, weight: TypographyWeight.Regular, color: "var(--color-text-text-label)", children: description }))] }), actions.length > 0 && (_jsx(Box, { display: "flex", alignItems: "center", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-md)", children: actions.map(renderAction) }))] }), renderMedia()] }));
|
|
34
34
|
};
|
|
@@ -21,8 +21,8 @@ export const HintBubble = ({ text, size = HintBubbleSize.md, type = HintBubbleTy
|
|
|
21
21
|
};
|
|
22
22
|
const getTypographyColor = () => {
|
|
23
23
|
if (type === HintBubbleType.Error)
|
|
24
|
-
return 'var(--
|
|
25
|
-
return 'var(--
|
|
24
|
+
return 'var(--color-text-text-error)';
|
|
25
|
+
return 'var(--color-text-text-title)';
|
|
26
26
|
};
|
|
27
|
-
return (_jsx(Box, { borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', bgcolor: 'var(--
|
|
27
|
+
return (_jsx(Box, { borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', bgcolor: 'var(--color-background-bg-card-highlight)', padding: getPadding(), gap: '10px', sx: style, children: _jsx(Typography, { size: getTypographySize(), weight: getTypographyWeight(), color: getTypographyColor(), children: text }) }));
|
|
28
28
|
};
|
package/dist/stories/UI/Logo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { LogoVariant } from './types';
|
|
3
|
-
export const Logo = ({ variant = LogoVariant.Horizontal, color = 'var(--
|
|
3
|
+
export const Logo = ({ variant = LogoVariant.Horizontal, color = 'var(--color-background-bg-brand-primary)', gradient, className = '', svgUrl, }) => {
|
|
4
4
|
const logoColor = gradient ? 'url(#gradient)' : color;
|
|
5
5
|
if (svgUrl) {
|
|
6
6
|
const maxDimensions = {
|
package/dist/stories/UI/Menu.js
CHANGED
|
@@ -21,8 +21,8 @@ export const Menu = ({ icon = 'DotsThree', items, style, testKey, size = ButtonS
|
|
|
21
21
|
};
|
|
22
22
|
const getColor = (action) => {
|
|
23
23
|
if (action?.destructive)
|
|
24
|
-
return 'var(--
|
|
25
|
-
return 'var(--
|
|
24
|
+
return 'var(--color-text-text-error)';
|
|
25
|
+
return 'var(--color-text-text-title)';
|
|
26
26
|
};
|
|
27
27
|
return (_jsxs(Fragment, { children: [_jsx(MainButton, { displayIcon: icon, onClick: handleClick, type: ButtonType.Button, displayIconMode: ButtonDisplayMode.Only, hierarchy: hierarchy, size: size, style: style, testId: `${testKey}-menu-button` }), _jsx(MuiMenu, { id: "basic-menu", "data-testid": `${testKey}-menu`, anchorEl: anchorEl, open: open, onClose: handleClose, MenuListProps: {
|
|
28
28
|
'aria-labelledby': 'basic-button',
|
|
@@ -33,12 +33,19 @@ export const Menu = ({ icon = 'DotsThree', items, style, testKey, size = ButtonS
|
|
|
33
33
|
paper: {
|
|
34
34
|
style: {
|
|
35
35
|
borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)',
|
|
36
|
+
backgroundColor: 'var(--color-background-bg-component)',
|
|
37
|
+
border: '1px solid var(--color-border-border-component)',
|
|
36
38
|
},
|
|
37
39
|
},
|
|
38
40
|
root: { style: { gap: '4px' } },
|
|
39
41
|
}, children: items?.map((action, index) => {
|
|
40
42
|
if (action) {
|
|
41
|
-
return (_jsxs(MuiMenuItem, { onClick: (e) => handleMenuItemClick(action, e), sx: {
|
|
43
|
+
return (_jsxs(MuiMenuItem, { onClick: (e) => handleMenuItemClick(action, e), sx: {
|
|
44
|
+
gap: '8px',
|
|
45
|
+
'&:hover': {
|
|
46
|
+
backgroundColor: 'var(--color-background-bg-component-hover)',
|
|
47
|
+
},
|
|
48
|
+
}, disableRipple: true, "data-testid": `${testKey}-menu-item-${index}`, children: [action?.icon &&
|
|
42
49
|
getIconComponent(action.icon, {
|
|
43
50
|
width: '20px',
|
|
44
51
|
height: '20px',
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { ProgressIndicatorMode } from './types';
|
|
3
3
|
import { Box } from '@mui/material';
|
|
4
4
|
import { Typography, TypographySize, TypographyWeight } from '../Typography';
|
|
5
|
-
export const ProgressIndicator = ({ mode = ProgressIndicatorMode.Value, overriddenText = null, currentValue = 40, maxValue = 100, fillColor = 'var(--
|
|
5
|
+
export const ProgressIndicator = ({ mode = ProgressIndicatorMode.Value, overriddenText = null, currentValue = 40, maxValue = 100, fillColor = 'var(--color-background-bg-brand-primary)', backgroundColor = 'var(--color-background-bg-component)', text = 'used', textColor = 'var(--color-text-text-title)', style, textStyle, testId, }) => {
|
|
6
6
|
let errorText = '';
|
|
7
7
|
const calculateFill = () => {
|
|
8
8
|
if (currentValue > maxValue)
|
|
@@ -24,8 +24,11 @@ export const PromoBanner = ({ title = 'Real-time AI avatars for every conversati
|
|
|
24
24
|
return null;
|
|
25
25
|
return (_jsx(Box, { component: "img", src: image, alt: "", height: "100%", flexShrink: 0, sx: { objectFit: 'contain' } }));
|
|
26
26
|
};
|
|
27
|
-
return (_jsxs(Box, { display: "flex", alignItems: "center", justifyContent: "center", gap: "40px", height: "220px", width: "100%", overflow: "hidden", borderRadius: "var(--spacing-tokens-size-in-px-radius-radius-lg)", paddingX: "var(--spacing-tokens-size-in-px-spacing-spacing-2xl)", sx: { background, boxSizing: 'border-box', ...customStyle }, "data-testid": testId, children: [renderSideImage(leftImage), _jsxs(Box, { display: "flex", flexDirection: "column", alignItems: "center", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-2xl)", flex: 1, minWidth: 0, paddingY: "var(--spacing-tokens-size-in-px-spacing-spacing-3xl)", children: [_jsxs(Box, { display: "flex", flexDirection: "column", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-md)", width: "100%", children: [title && (_jsx(Typography, { size: TypographySize.HeadingM, weight: TypographyWeight.Bold, color: "var(--
|
|
28
|
-
border: '1px dashed var(--
|
|
27
|
+
return (_jsxs(Box, { display: "flex", alignItems: "center", justifyContent: "center", gap: "40px", height: "220px", width: "100%", overflow: "hidden", borderRadius: "var(--spacing-tokens-size-in-px-radius-radius-lg)", paddingX: "var(--spacing-tokens-size-in-px-spacing-spacing-2xl)", sx: { background, boxSizing: 'border-box', ...customStyle }, "data-testid": testId, children: [renderSideImage(leftImage), _jsxs(Box, { display: "flex", flexDirection: "column", alignItems: "center", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-2xl)", flex: 1, minWidth: 0, paddingY: "var(--spacing-tokens-size-in-px-spacing-spacing-3xl)", children: [_jsxs(Box, { display: "flex", flexDirection: "column", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-md)", width: "100%", children: [title && (_jsx(Typography, { size: TypographySize.HeadingM, weight: TypographyWeight.Bold, color: "var(--color-text-text-title)", textStyle: { textAlign: 'center' }, children: title })), (description || featuresText) && (_jsxs(Box, { display: "flex", flexDirection: "column", children: [description && (_jsx(Typography, { size: TypographySize.TextXS, weight: TypographyWeight.Regular, color: "var(--color-text-text-title)", children: description })), featuresText && (_jsx(Typography, { size: TypographySize.TextXS, weight: TypographyWeight.Bold, color: "var(--color-text-text-title)", children: featuresText }))] }))] }), (promoCode || ctaText) && (_jsxs(Box, { display: "flex", justifyContent: "center", alignItems: "stretch", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-md)", children: [promoCode && (_jsxs(Box, { position: "relative", display: "flex", children: [_jsx(MainButton, { text: promoCode, size: ButtonSize.md, hierarchy: ButtonHierarchy.SecondaryColor, showTrailingIcon: true, trailingIcon: "Copy", onClick: handleCopyPromoCode, style: {
|
|
28
|
+
border: '1px dashed var(--color-border-border-component)',
|
|
29
29
|
height: '100%',
|
|
30
|
-
}, testId: testId ? `${testId}-promo-code` : undefined }), promoCodeLabel && (_jsx(Box, { position: "absolute", top: "-13px", left: "-8px", bgcolor: "var(--
|
|
30
|
+
}, testId: testId ? `${testId}-promo-code` : undefined }), promoCodeLabel && (_jsx(Box, { position: "absolute", top: "-13px", left: "-8px", bgcolor: "var(--color-background-bg-icon-badge)", borderRadius: "var(--spacing-tokens-size-in-px-radius-radius-xs)", padding: "var(--spacing-tokens-size-in-px-spacing-spacing-xxs) var(--spacing-tokens-size-in-px-spacing-spacing-sm)", whiteSpace: "nowrap", zIndex: 1, children: _jsx(Typography, { size: TypographySize.Text2XS, weight: TypographyWeight.SemiBold,
|
|
31
|
+
// Invariant violet label (bg-icon-badge) -> pin to the
|
|
32
|
+
// invariant dark text so it stays legible in both themes.
|
|
33
|
+
color: "var(--color-text-text-dark)", children: promoCodeLabel }) }))] })), ctaText && (_jsx(MainButton, { text: ctaText, size: ButtonSize.md, hierarchy: ButtonHierarchy.Primary, onClick: onCtaClick, testId: testId ? `${testId}-cta` : undefined }))] })), footerText && (_jsx(Typography, { size: TypographySize.TextXS, weight: TypographyWeight.Regular, color: "var(--color-text-text-title)", textStyle: { width: '100%' }, children: footerText }))] }), renderSideImage(rightImage)] }));
|
|
31
34
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box } from '@mui/material';
|
|
3
3
|
export const SkeletonLoader = ({ width = '100%', height = '100%', borderRadius = 'var(--spacing-tokens-size-in-px-spacing-sm)', animationDuration = 1.5, style, }) => {
|
|
4
4
|
return (_jsx(Box, { width: width, height: height, borderRadius: borderRadius, sx: {
|
|
5
|
-
background: 'linear-gradient(90deg, var(--
|
|
5
|
+
background: 'linear-gradient(90deg, var(--color-background-bg-element) 25%, var(--color-background-bg-component) 50%, var(--color-background-bg-element) 75%)',
|
|
6
6
|
backgroundSize: '200% 100%',
|
|
7
7
|
animation: `shimmer ${animationDuration}s infinite linear`,
|
|
8
8
|
...style,
|
|
@@ -12,23 +12,23 @@ const Step = ({ currentStep, totalSteps, index, title, onClick, connectorWidth =
|
|
|
12
12
|
const isCompleted = currentStep > thisStep;
|
|
13
13
|
const getTextColor = () => {
|
|
14
14
|
if (isDisabled)
|
|
15
|
-
return 'var(--
|
|
15
|
+
return 'var(--color-text-text-paragraph)';
|
|
16
16
|
else if (isCurrent)
|
|
17
|
-
return 'var(--
|
|
17
|
+
return 'var(--color-text-text-clicable)';
|
|
18
18
|
else if (isCompleted)
|
|
19
|
-
return 'var(--
|
|
19
|
+
return 'var(--color-text-text-title)';
|
|
20
20
|
else
|
|
21
|
-
return 'var(--
|
|
21
|
+
return 'var(--color-text-text-paragraph)';
|
|
22
22
|
};
|
|
23
23
|
const getIconColor = () => {
|
|
24
24
|
if (isDisabled)
|
|
25
|
-
return 'var(--
|
|
25
|
+
return 'var(--color-foreground-fg-disabled)';
|
|
26
26
|
else if (isCurrent)
|
|
27
|
-
return 'var(--
|
|
27
|
+
return 'var(--color-background-bg-brand-primary)';
|
|
28
28
|
else if (isCompleted)
|
|
29
|
-
return 'var(--
|
|
29
|
+
return 'var(--color-background-bg-brand-primary)';
|
|
30
30
|
else
|
|
31
|
-
return 'var(--
|
|
31
|
+
return 'var(--color-foreground-fg-secondary)';
|
|
32
32
|
};
|
|
33
33
|
const IconComponent = getIconComponent('CheckCircle', {
|
|
34
34
|
size: '24px',
|
|
@@ -42,17 +42,17 @@ const Step = ({ currentStep, totalSteps, index, title, onClick, connectorWidth =
|
|
|
42
42
|
if (thisStep === 1)
|
|
43
43
|
return 'transparent';
|
|
44
44
|
else if (thisStep <= currentStep)
|
|
45
|
-
return 'var(--
|
|
45
|
+
return 'var(--color-background-bg-brand-primary)';
|
|
46
46
|
else
|
|
47
|
-
return 'var(--
|
|
47
|
+
return 'var(--color-foreground-fg-disabled)';
|
|
48
48
|
}
|
|
49
49
|
else if (position === 'right') {
|
|
50
50
|
if (thisStep === totalSteps)
|
|
51
51
|
return 'transparent';
|
|
52
52
|
else if (thisStep < currentStep)
|
|
53
|
-
return 'var(--
|
|
53
|
+
return 'var(--color-background-bg-brand-primary)';
|
|
54
54
|
else
|
|
55
|
-
return 'var(--
|
|
55
|
+
return 'var(--color-foreground-fg-disabled)';
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
return (_jsxs(Box, { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', paddingY: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', onClick: onClick ? () => onClick() : undefined, sx: {
|
package/dist/stories/UI/index.js
CHANGED
|
@@ -169,6 +169,48 @@ export type MenuProps = {
|
|
|
169
169
|
/** Hierarchy of the trigger button */
|
|
170
170
|
hierarchy?: ButtonHierarchy;
|
|
171
171
|
};
|
|
172
|
+
/**
|
|
173
|
+
* Check icon color variants
|
|
174
|
+
*/
|
|
175
|
+
export declare enum CheckIconColor {
|
|
176
|
+
Violet = "Violet",
|
|
177
|
+
Green = "Green"
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Check icon size variants (xs = 16px, sm = 20px, md = 24px, lg = 28px)
|
|
181
|
+
*/
|
|
182
|
+
export declare enum CheckIconSize {
|
|
183
|
+
xs = "xs",
|
|
184
|
+
sm = "sm",
|
|
185
|
+
md = "md",
|
|
186
|
+
lg = "lg"
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Check icon type variants.
|
|
190
|
+
* - `Filled`: solid accent background + white check
|
|
191
|
+
* - `Line`: transparent background, accent ring + accent check
|
|
192
|
+
* - `Duotone`: light badge background + accent-colored check
|
|
193
|
+
*/
|
|
194
|
+
export declare enum CheckIconType {
|
|
195
|
+
Filled = "Filled",
|
|
196
|
+
Line = "Line",
|
|
197
|
+
Duotone = "Duotone"
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Check icon component props
|
|
201
|
+
*/
|
|
202
|
+
export interface CheckIconProps {
|
|
203
|
+
/** Color variant */
|
|
204
|
+
color?: CheckIconColor;
|
|
205
|
+
/** Size variant (xs = 16px, md = 24px) */
|
|
206
|
+
size?: CheckIconSize;
|
|
207
|
+
/** Fill style */
|
|
208
|
+
type?: CheckIconType;
|
|
209
|
+
/** Custom style */
|
|
210
|
+
style?: React.CSSProperties;
|
|
211
|
+
/** Test id */
|
|
212
|
+
testId?: string;
|
|
213
|
+
}
|
|
172
214
|
/**
|
|
173
215
|
* Progress indicator mode variants
|
|
174
216
|
*/
|
package/dist/stories/UI/types.js
CHANGED
|
@@ -61,6 +61,36 @@ export var LogoVariant;
|
|
|
61
61
|
LogoVariant["Vertical"] = "vertical";
|
|
62
62
|
LogoVariant["Icon"] = "icon";
|
|
63
63
|
})(LogoVariant || (LogoVariant = {}));
|
|
64
|
+
/**
|
|
65
|
+
* Check icon color variants
|
|
66
|
+
*/
|
|
67
|
+
export var CheckIconColor;
|
|
68
|
+
(function (CheckIconColor) {
|
|
69
|
+
CheckIconColor["Violet"] = "Violet";
|
|
70
|
+
CheckIconColor["Green"] = "Green";
|
|
71
|
+
})(CheckIconColor || (CheckIconColor = {}));
|
|
72
|
+
/**
|
|
73
|
+
* Check icon size variants (xs = 16px, sm = 20px, md = 24px, lg = 28px)
|
|
74
|
+
*/
|
|
75
|
+
export var CheckIconSize;
|
|
76
|
+
(function (CheckIconSize) {
|
|
77
|
+
CheckIconSize["xs"] = "xs";
|
|
78
|
+
CheckIconSize["sm"] = "sm";
|
|
79
|
+
CheckIconSize["md"] = "md";
|
|
80
|
+
CheckIconSize["lg"] = "lg";
|
|
81
|
+
})(CheckIconSize || (CheckIconSize = {}));
|
|
82
|
+
/**
|
|
83
|
+
* Check icon type variants.
|
|
84
|
+
* - `Filled`: solid accent background + white check
|
|
85
|
+
* - `Line`: transparent background, accent ring + accent check
|
|
86
|
+
* - `Duotone`: light badge background + accent-colored check
|
|
87
|
+
*/
|
|
88
|
+
export var CheckIconType;
|
|
89
|
+
(function (CheckIconType) {
|
|
90
|
+
CheckIconType["Filled"] = "Filled";
|
|
91
|
+
CheckIconType["Line"] = "Line";
|
|
92
|
+
CheckIconType["Duotone"] = "Duotone";
|
|
93
|
+
})(CheckIconType || (CheckIconType = {}));
|
|
64
94
|
/**
|
|
65
95
|
* Progress indicator mode variants
|
|
66
96
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beydesign/storybook",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@beydesign/tokens": "^0.
|
|
28
|
+
"@beydesign/tokens": "^0.1.1",
|
|
29
29
|
"@emotion/react": "^11.14.0",
|
|
30
30
|
"@emotion/styled": "^11.14.1",
|
|
31
31
|
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|