@beydesign/storybook 0.0.1 → 0.0.2
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/README.md +60 -40
- package/dist/App.js +161 -5
- package/dist/assets/animations/loading-animation.json +1 -0
- package/dist/index.d.ts +12 -2
- package/dist/index.js +12 -4
- package/dist/stories/Agent/AgentCard.d.ts +3 -0
- package/dist/stories/Agent/AgentCard.js +102 -0
- package/dist/stories/Agent/AgentCard.stories.d.ts +13 -0
- package/dist/stories/Agent/AgentCard.stories.js +303 -0
- package/dist/stories/Agent/AgentCardSkeleton.d.ts +2 -0
- package/dist/stories/Agent/AgentCardSkeleton.js +6 -0
- package/dist/stories/Agent/AgentCardSkeleton.stories.d.ts +13 -0
- package/dist/stories/Agent/AgentCardSkeleton.stories.js +101 -0
- package/dist/stories/Agent/CreateNewCard.d.ts +7 -0
- package/dist/stories/Agent/CreateNewCard.js +25 -0
- package/dist/stories/Agent/CreateNewCard.stories.d.ts +7 -0
- package/dist/stories/Agent/CreateNewCard.stories.js +23 -0
- package/dist/stories/Agent/index.d.ts +4 -0
- package/dist/stories/Agent/index.js +4 -0
- package/dist/stories/Agent/types.d.ts +96 -0
- package/dist/stories/Agent/types.js +7 -0
- package/dist/stories/Buttons/MainButton.d.ts +3 -0
- package/dist/stories/Buttons/MainButton.js +302 -0
- package/dist/stories/Buttons/MainButton.stories.d.ts +28 -0
- package/dist/stories/Buttons/MainButton.stories.js +299 -0
- package/dist/stories/Buttons/ToggleButtonGroup.d.ts +3 -0
- package/dist/stories/Buttons/ToggleButtonGroup.js +34 -0
- package/dist/stories/Buttons/ToggleButtonGroup.stories.d.ts +9 -0
- package/dist/stories/Buttons/ToggleButtonGroup.stories.js +78 -0
- package/dist/stories/Buttons/index.d.ts +3 -0
- package/dist/stories/Buttons/index.js +3 -0
- package/dist/stories/{types/button.d.ts → Buttons/types.d.ts} +37 -14
- package/dist/stories/{types/button.js → Buttons/types.js} +12 -2
- package/dist/stories/Credits/CreditsCard.d.ts +3 -0
- package/dist/stories/Credits/CreditsCard.js +53 -0
- package/dist/stories/Credits/CreditsCard.stories.d.ts +7 -0
- package/dist/stories/Credits/CreditsCard.stories.js +34 -0
- package/dist/stories/Credits/CreditsCardSkeleton.d.ts +3 -0
- package/dist/stories/Credits/CreditsCardSkeleton.js +30 -0
- package/dist/stories/Credits/CreditsCardSkeleton.stories.d.ts +7 -0
- package/dist/stories/Credits/CreditsCardSkeleton.stories.js +40 -0
- package/dist/stories/Credits/index.d.ts +3 -0
- package/dist/stories/Credits/index.js +3 -0
- package/dist/stories/Credits/types.d.ts +57 -0
- package/dist/stories/Credits/types.js +11 -0
- package/dist/stories/EntityCard/EntityCard.d.ts +3 -0
- package/dist/stories/EntityCard/EntityCard.js +22 -0
- package/dist/stories/EntityCard/EntityCard.stories.d.ts +10 -0
- package/dist/stories/EntityCard/EntityCard.stories.js +187 -0
- package/dist/stories/EntityCard/EntityCardSkeleton.d.ts +3 -0
- package/dist/stories/EntityCard/EntityCardSkeleton.js +9 -0
- package/dist/stories/EntityCard/EntityCardSkeleton.stories.d.ts +10 -0
- package/dist/stories/EntityCard/EntityCardSkeleton.stories.js +73 -0
- package/dist/stories/EntityCard/index.d.ts +3 -0
- package/dist/stories/EntityCard/index.js +3 -0
- package/dist/stories/EntityCard/types.d.ts +54 -0
- package/dist/stories/EntityCard/types.js +1 -0
- package/dist/stories/Form/AutoComplete.d.ts +3 -0
- package/dist/stories/Form/AutoComplete.js +163 -0
- package/dist/stories/Form/AutoComplete.stories.d.ts +6 -0
- package/dist/stories/Form/AutoComplete.stories.js +88 -0
- package/dist/stories/Form/Checkbox.d.ts +3 -0
- package/dist/stories/Form/Checkbox.js +65 -0
- package/dist/stories/Form/Checkbox.stories.d.ts +13 -0
- package/dist/stories/Form/Checkbox.stories.js +121 -0
- package/dist/stories/Form/Dropdown.d.ts +3 -0
- package/dist/stories/Form/Dropdown.js +183 -0
- package/dist/stories/Form/Dropdown.stories.d.ts +6 -0
- package/dist/stories/Form/Dropdown.stories.js +122 -0
- package/dist/stories/Form/FileUpload/FileUpload.d.ts +3 -0
- package/dist/stories/Form/FileUpload/FileUpload.js +128 -0
- package/dist/stories/Form/FileUpload/FileUpload.stories.d.ts +7 -0
- package/dist/stories/Form/FileUpload/FileUpload.stories.js +51 -0
- package/dist/stories/Form/FileUpload/FileUploading.d.ts +3 -0
- package/dist/stories/Form/FileUpload/FileUploading.js +49 -0
- package/dist/stories/Form/FileUpload/FileUploading.stories.d.ts +10 -0
- package/dist/stories/Form/FileUpload/FileUploading.stories.js +108 -0
- package/dist/stories/Form/FileUpload/UploadedFile.d.ts +3 -0
- package/dist/stories/Form/FileUpload/UploadedFile.js +12 -0
- package/dist/stories/Form/FileUpload/UploadedFile.stories.d.ts +7 -0
- package/dist/stories/Form/FileUpload/UploadedFile.stories.js +73 -0
- package/dist/stories/Form/FileUpload/index.d.ts +3 -0
- package/dist/stories/Form/FileUpload/index.js +3 -0
- package/dist/stories/Form/TextArea.d.ts +3 -0
- package/dist/stories/Form/TextArea.js +23 -0
- package/dist/stories/Form/TextArea.stories.d.ts +161 -0
- package/dist/stories/Form/TextArea.stories.js +142 -0
- package/dist/stories/Form/TextInput.d.ts +3 -0
- package/dist/stories/Form/TextInput.js +57 -0
- package/dist/stories/Form/TextInput.stories.d.ts +155 -0
- package/dist/stories/Form/TextInput.stories.js +155 -0
- package/dist/stories/Form/Toggle.d.ts +3 -0
- package/dist/stories/Form/Toggle.js +57 -0
- package/dist/stories/Form/Toggle.stories.d.ts +6 -0
- package/dist/stories/Form/Toggle.stories.js +79 -0
- package/dist/stories/Form/index.d.ts +8 -0
- package/dist/stories/Form/index.js +8 -0
- package/dist/stories/Form/types.d.ts +274 -0
- package/dist/stories/Form/types.js +46 -0
- package/dist/stories/Foundations/Colors.d.ts +2 -0
- package/dist/stories/Foundations/Colors.js +266 -0
- package/dist/stories/Foundations/Colors.stories.d.ts +6 -0
- package/dist/stories/Foundations/Colors.stories.js +15 -0
- package/dist/stories/Foundations/index.d.ts +1 -0
- package/dist/stories/Foundations/index.js +1 -0
- package/dist/stories/Navigation/ComplexHeader.d.ts +3 -0
- package/dist/stories/Navigation/ComplexHeader.js +21 -0
- package/dist/stories/Navigation/ComplexHeader.stories.d.ts +6 -0
- package/dist/stories/Navigation/ComplexHeader.stories.js +82 -0
- package/dist/stories/Navigation/Header.d.ts +3 -0
- package/dist/stories/Navigation/Header.js +9 -0
- package/dist/stories/Navigation/Header.stories.d.ts +7 -0
- package/dist/stories/Navigation/Header.stories.js +87 -0
- package/dist/stories/Navigation/NavItem.d.ts +3 -0
- package/dist/stories/Navigation/NavItem.js +66 -0
- package/dist/stories/Navigation/NavItem.stories.d.ts +14 -0
- package/dist/stories/Navigation/NavItem.stories.js +100 -0
- package/dist/stories/Navigation/ProcessHeader.d.ts +3 -0
- package/dist/stories/Navigation/ProcessHeader.js +11 -0
- package/dist/stories/Navigation/ProcessHeader.stories.d.ts +6 -0
- package/dist/stories/Navigation/ProcessHeader.stories.js +76 -0
- package/dist/stories/Navigation/Sidebar.d.ts +3 -0
- package/dist/stories/Navigation/Sidebar.js +115 -0
- package/dist/stories/Navigation/Sidebar.stories.d.ts +11 -0
- package/dist/stories/Navigation/Sidebar.stories.js +174 -0
- package/dist/stories/Navigation/index.d.ts +6 -0
- package/dist/stories/Navigation/index.js +6 -0
- package/dist/stories/Navigation/types.d.ts +186 -0
- package/dist/stories/Navigation/types.js +21 -0
- 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.d.ts +3 -0
- package/dist/stories/StripeProduct/StripeProduct.js +24 -0
- package/dist/stories/StripeProduct/StripeProduct.stories.d.ts +10 -0
- package/dist/stories/StripeProduct/StripeProduct.stories.js +110 -0
- package/dist/stories/StripeProduct/StripeProductCardSkeleton.d.ts +3 -0
- package/dist/stories/StripeProduct/StripeProductCardSkeleton.js +6 -0
- package/dist/stories/StripeProduct/StripeProductCardSkeleton.stories.d.ts +16 -0
- package/dist/stories/StripeProduct/StripeProductCardSkeleton.stories.js +137 -0
- package/dist/stories/StripeProduct/index.d.ts +3 -0
- package/dist/stories/StripeProduct/index.js +3 -0
- package/dist/stories/StripeProduct/types.d.ts +56 -0
- package/dist/stories/StripeProduct/types.js +1 -0
- package/dist/stories/Typography/Typography.d.ts +3 -0
- package/dist/stories/Typography/Typography.js +22 -0
- package/dist/stories/Typography/Typography.stories.d.ts +25 -0
- package/dist/stories/Typography/Typography.stories.js +225 -0
- package/dist/stories/Typography/index.d.ts +2 -0
- package/dist/stories/Typography/index.js +2 -0
- package/dist/stories/Typography/types.d.ts +46 -0
- package/dist/stories/Typography/types.js +27 -0
- package/dist/stories/UI/Avatar.d.ts +3 -0
- package/dist/stories/UI/Avatar.js +76 -0
- package/dist/stories/UI/Avatar.stories.d.ts +8 -0
- package/dist/stories/UI/Avatar.stories.js +76 -0
- package/dist/stories/UI/Badge.d.ts +3 -0
- package/dist/stories/UI/Badge.js +118 -0
- package/dist/stories/UI/Badge.stories.d.ts +11 -0
- package/dist/stories/UI/Badge.stories.js +107 -0
- 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.d.ts +3 -0
- package/dist/stories/UI/FeatureBanner.js +34 -0
- package/dist/stories/UI/FeatureBanner.stories.d.ts +9 -0
- package/dist/stories/UI/FeatureBanner.stories.js +131 -0
- package/dist/stories/UI/HintBubble.d.ts +3 -0
- package/dist/stories/UI/HintBubble.js +28 -0
- package/dist/stories/UI/HintBubble.stories.d.ts +9 -0
- package/dist/stories/UI/HintBubble.stories.js +68 -0
- package/dist/stories/UI/Logo.d.ts +3 -0
- package/dist/stories/UI/Logo.js +60 -0
- package/dist/stories/UI/Logo.stories.d.ts +11 -0
- package/dist/stories/UI/Logo.stories.js +65 -0
- package/dist/stories/UI/Menu.d.ts +3 -0
- package/dist/stories/UI/Menu.js +56 -0
- package/dist/stories/UI/Menu.stories.d.ts +7 -0
- package/dist/stories/UI/Menu.stories.js +80 -0
- package/dist/stories/UI/ProgressIndicator.d.ts +3 -0
- package/dist/stories/UI/ProgressIndicator.js +35 -0
- package/dist/stories/UI/ProgressIndicator.stories.d.ts +10 -0
- package/dist/stories/UI/ProgressIndicator.stories.js +98 -0
- package/dist/stories/UI/PromoBanner.d.ts +3 -0
- package/dist/stories/UI/PromoBanner.js +34 -0
- package/dist/stories/UI/PromoBanner.stories.d.ts +9 -0
- package/dist/stories/UI/PromoBanner.stories.js +159 -0
- package/dist/stories/UI/SkeletonLoader.d.ts +3 -0
- package/dist/stories/UI/SkeletonLoader.js +19 -0
- package/dist/stories/UI/SkeletonLoader.stories.d.ts +8 -0
- package/dist/stories/UI/SkeletonLoader.stories.js +74 -0
- package/dist/stories/UI/Stepper.d.ts +3 -0
- package/dist/stories/UI/Stepper.js +67 -0
- package/dist/stories/UI/Stepper.stories.d.ts +6 -0
- package/dist/stories/UI/Stepper.stories.js +65 -0
- package/dist/stories/UI/Topbar.d.ts +3 -0
- package/dist/stories/UI/Topbar.js +9 -0
- package/dist/stories/UI/Topbar.stories.d.ts +6 -0
- package/dist/stories/UI/Topbar.stories.js +71 -0
- package/dist/stories/UI/index.d.ts +13 -0
- package/dist/stories/UI/index.js +13 -0
- package/dist/stories/UI/types.d.ts +398 -0
- package/dist/stories/UI/types.js +110 -0
- package/dist/utils/common.d.ts +2 -0
- package/dist/utils/common.js +20 -0
- package/dist/utils/icon.d.ts +6 -0
- package/dist/utils/icon.js +6 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/typography.d.ts +14 -0
- package/dist/utils/typography.js +46 -0
- package/package.json +48 -42
- package/dist/stories/Button.d.ts +0 -4
- package/dist/stories/Button.js +0 -258
- package/dist/stories/Colors.d.ts +0 -5
- package/dist/stories/Colors.js +0 -9
- package/dist/stories/Header.d.ts +0 -12
- package/dist/stories/Header.js +0 -4
- package/dist/stories/Header.stories.d.ts +0 -18
- package/dist/stories/Header.stories.js +0 -26
- package/dist/stories/Page.d.ts +0 -3
- package/dist/stories/Page.js +0 -8
- package/dist/stories/Page.stories.d.ts +0 -12
- package/dist/stories/Page.stories.js +0 -24
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { SkeletonLoader } from './SkeletonLoader';
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Design System/Components/UI/SkeletonLoader',
|
|
4
|
+
component: SkeletonLoader,
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'centered',
|
|
7
|
+
},
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
argTypes: {
|
|
10
|
+
width: {
|
|
11
|
+
control: 'text',
|
|
12
|
+
description: 'Width of the skeleton',
|
|
13
|
+
table: {
|
|
14
|
+
type: { summary: 'string | number' },
|
|
15
|
+
defaultValue: { summary: '100%' },
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
height: {
|
|
19
|
+
control: 'text',
|
|
20
|
+
description: 'Height of the skeleton',
|
|
21
|
+
table: {
|
|
22
|
+
type: { summary: 'string | number' },
|
|
23
|
+
defaultValue: { summary: '100%' },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
borderRadius: {
|
|
27
|
+
control: 'text',
|
|
28
|
+
description: 'Border radius of the skeleton',
|
|
29
|
+
table: {
|
|
30
|
+
type: { summary: 'string' },
|
|
31
|
+
defaultValue: {
|
|
32
|
+
summary: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
animationDuration: {
|
|
37
|
+
control: 'number',
|
|
38
|
+
description: 'Animation duration in seconds',
|
|
39
|
+
table: {
|
|
40
|
+
type: { summary: 'number' },
|
|
41
|
+
defaultValue: { summary: '1.5' },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
style: {
|
|
45
|
+
control: 'object',
|
|
46
|
+
description: 'Custom style for the skeleton',
|
|
47
|
+
table: {
|
|
48
|
+
type: { summary: 'React.CSSProperties' },
|
|
49
|
+
defaultValue: { summary: 'undefined' },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
export default meta;
|
|
55
|
+
export const Default = {
|
|
56
|
+
args: {
|
|
57
|
+
width: 200,
|
|
58
|
+
height: 100,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
export const CustomAnimation = {
|
|
62
|
+
args: {
|
|
63
|
+
width: 200,
|
|
64
|
+
height: 100,
|
|
65
|
+
animationDuration: 3,
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
export const RoundedSkeleton = {
|
|
69
|
+
args: {
|
|
70
|
+
width: 100,
|
|
71
|
+
height: 100,
|
|
72
|
+
borderRadius: '50%',
|
|
73
|
+
},
|
|
74
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
import { Typography, TypographySize, TypographyWeight } from '../Typography';
|
|
4
|
+
import { getIconComponent } from '../../utils';
|
|
5
|
+
export const Stepper = ({ steps, currentStep, onStepClick, style, testId, connectorWidth, stepStyle, }) => {
|
|
6
|
+
return (_jsx(Box, { borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', sx: style, "data-testid": testId, display: 'flex', flexDirection: 'row', alignItems: 'center', children: steps.map((step, index) => (_jsx(Step, { currentStep: currentStep, index: index, title: step, onClick: onStepClick ? () => onStepClick(index + 1) : undefined, totalSteps: steps.length, connectorWidth: connectorWidth, stepStyle: stepStyle }, index))) }));
|
|
7
|
+
};
|
|
8
|
+
const Step = ({ currentStep, totalSteps, index, title, onClick, connectorWidth = '70px', stepStyle, }) => {
|
|
9
|
+
const thisStep = index + 1;
|
|
10
|
+
const isDisabled = currentStep < thisStep;
|
|
11
|
+
const isCurrent = currentStep === thisStep;
|
|
12
|
+
const isCompleted = currentStep > thisStep;
|
|
13
|
+
const getTextColor = () => {
|
|
14
|
+
if (isDisabled)
|
|
15
|
+
return 'var(--color-text-text-paragraph)';
|
|
16
|
+
else if (isCurrent)
|
|
17
|
+
return 'var(--color-text-text-clicable)';
|
|
18
|
+
else if (isCompleted)
|
|
19
|
+
return 'var(--color-text-text-title)';
|
|
20
|
+
else
|
|
21
|
+
return 'var(--color-text-text-paragraph)';
|
|
22
|
+
};
|
|
23
|
+
const getIconColor = () => {
|
|
24
|
+
if (isDisabled)
|
|
25
|
+
return 'var(--color-foreground-fg-disabled)';
|
|
26
|
+
else if (isCurrent)
|
|
27
|
+
return 'var(--color-background-bg-brand-primary)';
|
|
28
|
+
else if (isCompleted)
|
|
29
|
+
return 'var(--color-background-bg-brand-primary)';
|
|
30
|
+
else
|
|
31
|
+
return 'var(--color-foreground-fg-secondary)';
|
|
32
|
+
};
|
|
33
|
+
const IconComponent = getIconComponent('CheckCircle', {
|
|
34
|
+
size: '24px',
|
|
35
|
+
color: getIconColor(),
|
|
36
|
+
weight: isCompleted ? 'fill' : 'regular',
|
|
37
|
+
onClick: () => onClick?.(),
|
|
38
|
+
style: { cursor: onClick ? 'pointer' : 'default' },
|
|
39
|
+
});
|
|
40
|
+
const getConnectorColor = (position) => {
|
|
41
|
+
if (position === 'left') {
|
|
42
|
+
if (thisStep === 1)
|
|
43
|
+
return 'transparent';
|
|
44
|
+
else if (thisStep <= currentStep)
|
|
45
|
+
return 'var(--color-background-bg-brand-primary)';
|
|
46
|
+
else
|
|
47
|
+
return 'var(--color-foreground-fg-disabled)';
|
|
48
|
+
}
|
|
49
|
+
else if (position === 'right') {
|
|
50
|
+
if (thisStep === totalSteps)
|
|
51
|
+
return 'transparent';
|
|
52
|
+
else if (thisStep < currentStep)
|
|
53
|
+
return 'var(--color-background-bg-brand-primary)';
|
|
54
|
+
else
|
|
55
|
+
return 'var(--color-foreground-fg-disabled)';
|
|
56
|
+
}
|
|
57
|
+
};
|
|
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: {
|
|
59
|
+
cursor: onClick ? 'pointer' : 'default',
|
|
60
|
+
'&:hover': {
|
|
61
|
+
border: '1px solid #6938EF33',
|
|
62
|
+
borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)',
|
|
63
|
+
backgroundColor: '#6938EF1A',
|
|
64
|
+
},
|
|
65
|
+
...stepStyle,
|
|
66
|
+
}, children: [_jsxs(Box, { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', children: [_jsx(Box, { height: '1px', bgcolor: getConnectorColor('left'), width: connectorWidth, borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs)' }), IconComponent, _jsx(Box, { height: '1px', bgcolor: getConnectorColor('right'), width: connectorWidth, borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs)' })] }), _jsx(Typography, { size: TypographySize.TextM, weight: TypographyWeight.SemiBold, color: getTextColor(), children: title })] }));
|
|
67
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Stepper } from './Stepper';
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Design System/Components/UI/Stepper',
|
|
4
|
+
component: Stepper,
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'centered',
|
|
7
|
+
design: {
|
|
8
|
+
type: 'figspec',
|
|
9
|
+
url: '',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
argTypes: {
|
|
14
|
+
currentStep: {
|
|
15
|
+
control: 'number',
|
|
16
|
+
description: 'Current step of the stepper',
|
|
17
|
+
table: {
|
|
18
|
+
type: { summary: 'number' },
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
steps: {
|
|
22
|
+
control: 'object',
|
|
23
|
+
description: 'Steps of the stepper',
|
|
24
|
+
table: {
|
|
25
|
+
type: { summary: 'object' },
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
onStepClick: {
|
|
29
|
+
description: 'Function to call when a step is clicked',
|
|
30
|
+
table: {
|
|
31
|
+
type: { summary: 'function' },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
style: {
|
|
35
|
+
control: 'object',
|
|
36
|
+
description: 'Style of the stepper',
|
|
37
|
+
table: {
|
|
38
|
+
type: { summary: 'object' },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
testId: {
|
|
42
|
+
control: 'text',
|
|
43
|
+
description: 'Test ID of the stepper',
|
|
44
|
+
table: {
|
|
45
|
+
type: { summary: 'string' },
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
export default meta;
|
|
51
|
+
export const Default = {
|
|
52
|
+
args: {
|
|
53
|
+
currentStep: 1,
|
|
54
|
+
steps: [
|
|
55
|
+
'Lighting, Audio & Setup',
|
|
56
|
+
'Beginning',
|
|
57
|
+
'Speaking Phase',
|
|
58
|
+
'Ending',
|
|
59
|
+
'Final Checklist',
|
|
60
|
+
],
|
|
61
|
+
onStepClick: () => { },
|
|
62
|
+
style: {},
|
|
63
|
+
testId: 'stepper',
|
|
64
|
+
},
|
|
65
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { BadgeColor, BadgeSize } from './types';
|
|
3
|
+
import { Box } from '@mui/material';
|
|
4
|
+
import { Typography, TypographySize, TypographyWeight } from '../Typography';
|
|
5
|
+
import { Badge } from './Badge';
|
|
6
|
+
import { ButtonHierarchy, ButtonSize, MainButton } from '../Buttons';
|
|
7
|
+
export const Topbar = ({ title, badgeText, newButtonText, onNewButtonClick, newButtonHidden, className, style, }) => {
|
|
8
|
+
return (_jsxs(Box, { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', paddingX: 'var(--spacing-tokens-size-in-px-spacing-spacing-xl)', paddingY: 'var(--spacing-tokens-size-in-px-spacing-spacing-md)', className: className, sx: style, minWidth: '400px', children: [_jsxs(Box, { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', children: [_jsx(Typography, { size: TypographySize.HeadingS, weight: TypographyWeight.SemiBold, children: title }), badgeText && (_jsx(Badge, { text: badgeText, size: BadgeSize.xs, color: BadgeColor.Violet, style: { marginBottom: '10px' } }))] }), !newButtonHidden && (_jsx(MainButton, { size: ButtonSize.lg, text: newButtonText, onClick: onNewButtonClick, hierarchy: ButtonHierarchy.Primary, trailingIcon: 'Plus', showTrailingIcon: true }))] }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Topbar } from './Topbar';
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Design System/Components/UI/Topbar',
|
|
4
|
+
component: Topbar,
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'centered',
|
|
7
|
+
design: {
|
|
8
|
+
type: 'figspec',
|
|
9
|
+
url: 'https://www.figma.com/design/Ze4bBHgBQYinBDZr1COHuk/Agents?node-id=1006-13664&t=CyBQppCouqmiQpIk-1',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
argTypes: {
|
|
14
|
+
title: {
|
|
15
|
+
control: 'text',
|
|
16
|
+
description: 'Title of the topbar',
|
|
17
|
+
table: {
|
|
18
|
+
type: { summary: 'string' },
|
|
19
|
+
defaultValue: { summary: 'undefined' },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
badgeText: {
|
|
23
|
+
control: 'text',
|
|
24
|
+
description: 'Text of the badge',
|
|
25
|
+
table: {
|
|
26
|
+
type: { summary: 'string' },
|
|
27
|
+
defaultValue: { summary: 'undefined' },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
newButtonText: {
|
|
31
|
+
control: 'text',
|
|
32
|
+
description: 'Text of the new button',
|
|
33
|
+
table: {
|
|
34
|
+
type: { summary: 'string' },
|
|
35
|
+
defaultValue: { summary: 'undefined' },
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
onNewButtonClick: {
|
|
39
|
+
description: 'Function to call when the new button is clicked',
|
|
40
|
+
table: {
|
|
41
|
+
type: { summary: 'function' },
|
|
42
|
+
defaultValue: { summary: 'undefined' },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
style: {
|
|
46
|
+
control: 'object',
|
|
47
|
+
description: 'Style of the topbar',
|
|
48
|
+
table: {
|
|
49
|
+
type: { summary: 'object' },
|
|
50
|
+
defaultValue: { summary: 'undefined' },
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
className: {
|
|
54
|
+
control: 'text',
|
|
55
|
+
description: 'Class name of the topbar',
|
|
56
|
+
table: {
|
|
57
|
+
type: { summary: 'string' },
|
|
58
|
+
defaultValue: { summary: 'undefined' },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
export default meta;
|
|
64
|
+
export const Default = {
|
|
65
|
+
args: {
|
|
66
|
+
title: 'My Agents',
|
|
67
|
+
badgeText: '10',
|
|
68
|
+
newButtonText: 'New Agent',
|
|
69
|
+
onNewButtonClick: () => { },
|
|
70
|
+
},
|
|
71
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './Badge';
|
|
2
|
+
export * from './Avatar';
|
|
3
|
+
export * from './CheckIcon';
|
|
4
|
+
export * from './FeatureBanner';
|
|
5
|
+
export * from './HintBubble';
|
|
6
|
+
export * from './Logo';
|
|
7
|
+
export * from './Menu';
|
|
8
|
+
export * from './ProgressIndicator';
|
|
9
|
+
export * from './PromoBanner';
|
|
10
|
+
export * from './SkeletonLoader';
|
|
11
|
+
export * from './Topbar';
|
|
12
|
+
export * from './types';
|
|
13
|
+
export * from './Stepper';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './Badge';
|
|
2
|
+
export * from './Avatar';
|
|
3
|
+
export * from './CheckIcon';
|
|
4
|
+
export * from './FeatureBanner';
|
|
5
|
+
export * from './HintBubble';
|
|
6
|
+
export * from './Logo';
|
|
7
|
+
export * from './Menu';
|
|
8
|
+
export * from './ProgressIndicator';
|
|
9
|
+
export * from './PromoBanner';
|
|
10
|
+
export * from './SkeletonLoader';
|
|
11
|
+
export * from './Topbar';
|
|
12
|
+
export * from './types';
|
|
13
|
+
export * from './Stepper';
|