@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,303 @@
|
|
|
1
|
+
import { AgentCard } from './AgentCard';
|
|
2
|
+
import { AgentState } from './types';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Design System/Components/Agent/AgentCard',
|
|
5
|
+
component: AgentCard,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'centered',
|
|
8
|
+
design: {
|
|
9
|
+
type: 'figspec',
|
|
10
|
+
url: 'https://www.figma.com/design/mIhjz2yJjcpLlIqw6oUivt/Beyond-Presence?node-id=5155-1047&t=qmLHvTvP8XX3NuUh-1',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
argTypes: {
|
|
15
|
+
agentId: {
|
|
16
|
+
control: 'text',
|
|
17
|
+
description: 'The id of the agent',
|
|
18
|
+
table: {
|
|
19
|
+
type: { summary: 'string' },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
agentImage: {
|
|
23
|
+
control: 'text',
|
|
24
|
+
description: 'Image of the agent',
|
|
25
|
+
table: {
|
|
26
|
+
type: { summary: 'string' },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
showDate: {
|
|
30
|
+
control: 'boolean',
|
|
31
|
+
description: 'Whether to show the date',
|
|
32
|
+
table: {
|
|
33
|
+
type: { summary: 'boolean' },
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
badges: {
|
|
37
|
+
description: 'Badges of the agent',
|
|
38
|
+
table: {
|
|
39
|
+
type: { summary: 'array' },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
showBadges: {
|
|
43
|
+
control: 'boolean',
|
|
44
|
+
description: 'Whether to show the badges',
|
|
45
|
+
table: {
|
|
46
|
+
type: { summary: 'boolean' },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
showTimeBadge: {
|
|
50
|
+
control: 'boolean',
|
|
51
|
+
description: 'Whether to show the time badge',
|
|
52
|
+
table: {
|
|
53
|
+
type: { summary: 'boolean' },
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
showDescription: {
|
|
57
|
+
control: 'boolean',
|
|
58
|
+
description: 'Whether to show the description',
|
|
59
|
+
table: {
|
|
60
|
+
type: { summary: 'boolean' },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
showMenu: {
|
|
64
|
+
control: 'boolean',
|
|
65
|
+
description: 'Whether to show the menu',
|
|
66
|
+
table: {
|
|
67
|
+
type: { summary: 'boolean' },
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
active: {
|
|
71
|
+
control: 'boolean',
|
|
72
|
+
description: 'Whether the agent is active',
|
|
73
|
+
table: {
|
|
74
|
+
type: { summary: 'boolean' },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
activeToggleDisabled: {
|
|
78
|
+
control: 'boolean',
|
|
79
|
+
description: 'Whether the active toggle is disabled',
|
|
80
|
+
table: {
|
|
81
|
+
type: { summary: 'boolean' },
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
showActiveToggle: {
|
|
85
|
+
control: 'boolean',
|
|
86
|
+
description: 'Whether to show the active toggle',
|
|
87
|
+
table: {
|
|
88
|
+
type: { summary: 'boolean' },
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
onActiveToggleChange: {
|
|
92
|
+
description: 'Callback function for active toggle change',
|
|
93
|
+
table: {
|
|
94
|
+
type: { summary: 'function' },
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
date: {
|
|
98
|
+
control: 'text',
|
|
99
|
+
description: 'Date of the agent',
|
|
100
|
+
table: {
|
|
101
|
+
type: { summary: 'string' },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
description: {
|
|
105
|
+
control: 'text',
|
|
106
|
+
description: 'Description of the agent',
|
|
107
|
+
table: {
|
|
108
|
+
type: { summary: 'string' },
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
title: {
|
|
112
|
+
control: 'text',
|
|
113
|
+
description: 'Title of the agent',
|
|
114
|
+
table: {
|
|
115
|
+
type: { summary: 'string' },
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
agentState: {
|
|
119
|
+
control: 'select',
|
|
120
|
+
description: 'State of the agent',
|
|
121
|
+
options: Object.values(AgentState),
|
|
122
|
+
table: {
|
|
123
|
+
type: { summary: 'string' },
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
previewButtonText: {
|
|
127
|
+
control: 'text',
|
|
128
|
+
description: 'Text for the preview button',
|
|
129
|
+
table: {
|
|
130
|
+
type: { summary: 'string' },
|
|
131
|
+
defaultValue: { summary: 'Preview' },
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
showStatusBadge: {
|
|
135
|
+
control: 'boolean',
|
|
136
|
+
description: 'Whether to show the status badge',
|
|
137
|
+
table: {
|
|
138
|
+
type: { summary: 'boolean' },
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
statusBadgeText: {
|
|
142
|
+
control: 'text',
|
|
143
|
+
description: 'Text to display in the status badge',
|
|
144
|
+
table: {
|
|
145
|
+
type: { summary: 'string' },
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
showProgressIndicator: {
|
|
149
|
+
control: 'boolean',
|
|
150
|
+
description: 'Whether to show the progress indicator in processing state',
|
|
151
|
+
table: {
|
|
152
|
+
type: { summary: 'boolean' },
|
|
153
|
+
defaultValue: { summary: 'true' },
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
progressValue: {
|
|
157
|
+
control: 'number',
|
|
158
|
+
description: 'Current progress value (0-100)',
|
|
159
|
+
table: {
|
|
160
|
+
type: { summary: 'number' },
|
|
161
|
+
defaultValue: { summary: '50' },
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
processingText: {
|
|
165
|
+
control: 'text',
|
|
166
|
+
description: 'Text to display in processing state',
|
|
167
|
+
table: {
|
|
168
|
+
type: { summary: 'string' },
|
|
169
|
+
defaultValue: { summary: 'Agent creation in progress' },
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
export default meta;
|
|
175
|
+
export const Placeholder = {
|
|
176
|
+
args: {
|
|
177
|
+
title: 'Agent Card Title',
|
|
178
|
+
active: true,
|
|
179
|
+
showActiveToggle: true,
|
|
180
|
+
showDate: true,
|
|
181
|
+
date: '2024-01-01',
|
|
182
|
+
badges: ['HR', 'Sales', 'Marketing'],
|
|
183
|
+
showBadges: true,
|
|
184
|
+
showDescription: true,
|
|
185
|
+
description: 'This is a very long description that will wrap to the next line',
|
|
186
|
+
agentImage: 'https://images.unsplash.com/photo-1575936123452-b67c3203c357?fm=jpg&q=60&w=3000&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8aW1hZ2V8ZW58MHx8MHx8fDA%3D',
|
|
187
|
+
showTimeBadge: true,
|
|
188
|
+
time: '10:00',
|
|
189
|
+
onPreview: () => { },
|
|
190
|
+
previewButtonText: 'Preview',
|
|
191
|
+
menuItems: [
|
|
192
|
+
{ label: 'Edit', icon: 'Pencil', onClick: () => { } },
|
|
193
|
+
{ label: 'Delete', icon: 'Trash', onClick: () => { }, destructive: true },
|
|
194
|
+
],
|
|
195
|
+
showMenu: true,
|
|
196
|
+
agentState: AgentState.ready,
|
|
197
|
+
showStatusBadge: true,
|
|
198
|
+
statusBadgeText: 'Active',
|
|
199
|
+
agentId: '112657154',
|
|
200
|
+
onClickAgentId: () => { },
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
export const CustomPreviewText = {
|
|
204
|
+
args: {
|
|
205
|
+
...Placeholder.args,
|
|
206
|
+
previewButtonText: 'View Agent',
|
|
207
|
+
agentState: AgentState.ready,
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
export const LoadingPreview = {
|
|
211
|
+
args: {
|
|
212
|
+
...Placeholder.args,
|
|
213
|
+
title: 'Loading Preview Example',
|
|
214
|
+
// Using a non-existent image to force loading state
|
|
215
|
+
agentImage: 'https://example.com/non-existent-image.jpg',
|
|
216
|
+
active: false,
|
|
217
|
+
},
|
|
218
|
+
parameters: {
|
|
219
|
+
docs: {
|
|
220
|
+
description: {
|
|
221
|
+
story: 'This example demonstrates the loading state of the agent card image.',
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
};
|
|
226
|
+
export const NoImage = {
|
|
227
|
+
args: {
|
|
228
|
+
...Placeholder.args,
|
|
229
|
+
title: 'No Image Example',
|
|
230
|
+
agentImage: undefined,
|
|
231
|
+
},
|
|
232
|
+
parameters: {
|
|
233
|
+
docs: {
|
|
234
|
+
description: {
|
|
235
|
+
story: 'This example demonstrates the agent card when no image is provided.',
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
export const WithStatusBadge = {
|
|
241
|
+
args: {
|
|
242
|
+
...Placeholder.args,
|
|
243
|
+
title: 'Status Badge Example',
|
|
244
|
+
showStatusBadge: true,
|
|
245
|
+
statusBadgeText: 'Draft',
|
|
246
|
+
agentState: AgentState.pending,
|
|
247
|
+
},
|
|
248
|
+
parameters: {
|
|
249
|
+
docs: {
|
|
250
|
+
description: {
|
|
251
|
+
story: 'This example demonstrates the agent card with a status badge in the top-left corner.',
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
};
|
|
256
|
+
export const NoStatusBadge = {
|
|
257
|
+
args: {
|
|
258
|
+
...Placeholder.args,
|
|
259
|
+
title: 'No Status Badge Example',
|
|
260
|
+
showStatusBadge: false,
|
|
261
|
+
statusBadgeText: '',
|
|
262
|
+
},
|
|
263
|
+
parameters: {
|
|
264
|
+
docs: {
|
|
265
|
+
description: {
|
|
266
|
+
story: 'This example demonstrates the agent card without a status badge.',
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
};
|
|
271
|
+
export const Processing = {
|
|
272
|
+
args: {
|
|
273
|
+
...Placeholder.args,
|
|
274
|
+
title: 'Processing Example',
|
|
275
|
+
agentState: AgentState.processing,
|
|
276
|
+
showProgressIndicator: true,
|
|
277
|
+
progressValue: 75,
|
|
278
|
+
processingText: 'Training in progress',
|
|
279
|
+
},
|
|
280
|
+
parameters: {
|
|
281
|
+
docs: {
|
|
282
|
+
description: {
|
|
283
|
+
story: 'This example demonstrates the agent card in processing state with a custom progress value and text.',
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
};
|
|
288
|
+
export const ProcessingWithoutProgress = {
|
|
289
|
+
args: {
|
|
290
|
+
...Placeholder.args,
|
|
291
|
+
title: 'Processing Without Progress',
|
|
292
|
+
agentState: AgentState.processing,
|
|
293
|
+
showProgressIndicator: false,
|
|
294
|
+
processingText: 'Please wait...',
|
|
295
|
+
},
|
|
296
|
+
parameters: {
|
|
297
|
+
docs: {
|
|
298
|
+
description: {
|
|
299
|
+
story: 'This example shows the processing state without the progress indicator.',
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
import { SkeletonLoader } from '../UI';
|
|
4
|
+
export const AgentCardSkeleton = ({ width = 'auto', showDate = false, showBadges = false, showDescription = false, style, }) => {
|
|
5
|
+
return (_jsxs(Box, { width: width, display: "flex", flexDirection: "column", borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', padding: "var(--spacing-tokens-size-in-px-spacing-spacing-xl)", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-lg)", bgcolor: "var(--color-background-bg-component)", boxShadow: `var(--global-shadows-shadow-xs-offset-x) var(--global-shadows-shadow-xs-offset-y) var(--global-shadows-shadow-xs-blur) var(--global-shadows-shadow-xs-spread) var(--global-shadows-shadow-xs-color)`, style: style, children: [_jsx(Box, { width: "100%", height: "268px", sx: { aspectRatio: 1 }, borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-sm)", overflow: "hidden", children: _jsx(SkeletonLoader, {}) }), _jsx(SkeletonLoader, { width: "70%", height: "24px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), showDate && (_jsx(SkeletonLoader, { width: "100%", height: "20px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" })), showBadges && (_jsxs(Box, { display: "flex", flexDirection: "row", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-md)", children: [_jsx(SkeletonLoader, { width: "60px", height: "24px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), _jsx(SkeletonLoader, { width: "80px", height: "24px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" })] })), showDescription && (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "var(--spacing-tokens-size-in-px-spacing-spacing-sm)", children: [_jsx(SkeletonLoader, { width: "100%", height: "16px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" }), _jsx(SkeletonLoader, { width: "80%", height: "16px", borderRadius: "var(--spacing-tokens-size-in-px-spacing-spacing-xs)" })] }))] }));
|
|
6
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { AgentCardSkeleton } from './AgentCardSkeleton';
|
|
3
|
+
declare const meta: Meta<typeof AgentCardSkeleton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AgentCardSkeleton>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithDate: Story;
|
|
8
|
+
export declare const WithBadges: Story;
|
|
9
|
+
export declare const WithDescription: Story;
|
|
10
|
+
export declare const Complete: Story;
|
|
11
|
+
export declare const CustomWidth: Story;
|
|
12
|
+
export declare const Grid: Story;
|
|
13
|
+
export declare const LoadingState: Story;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
import { AgentCardSkeleton } from './AgentCardSkeleton';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Design System/Components/Agent/AgentCardSkeleton',
|
|
6
|
+
component: AgentCardSkeleton,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
},
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {
|
|
12
|
+
width: {
|
|
13
|
+
control: 'text',
|
|
14
|
+
description: 'Width of the card',
|
|
15
|
+
table: {
|
|
16
|
+
type: { summary: 'string | number' },
|
|
17
|
+
defaultValue: { summary: '300px' },
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
showDate: {
|
|
21
|
+
control: 'boolean',
|
|
22
|
+
description: 'Show date placeholder',
|
|
23
|
+
table: {
|
|
24
|
+
type: { summary: 'boolean' },
|
|
25
|
+
defaultValue: { summary: 'false' },
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
showBadges: {
|
|
29
|
+
control: 'boolean',
|
|
30
|
+
description: 'Show badges placeholder',
|
|
31
|
+
table: {
|
|
32
|
+
type: { summary: 'boolean' },
|
|
33
|
+
defaultValue: { summary: 'false' },
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
showDescription: {
|
|
37
|
+
control: 'boolean',
|
|
38
|
+
description: 'Show description placeholder',
|
|
39
|
+
table: {
|
|
40
|
+
type: { summary: 'boolean' },
|
|
41
|
+
defaultValue: { summary: 'false' },
|
|
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: '300px',
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
export const WithDate = {
|
|
61
|
+
args: {
|
|
62
|
+
width: '300px',
|
|
63
|
+
showDate: true,
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
export const WithBadges = {
|
|
67
|
+
args: {
|
|
68
|
+
width: '300px',
|
|
69
|
+
showBadges: true,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
export const WithDescription = {
|
|
73
|
+
args: {
|
|
74
|
+
width: '300px',
|
|
75
|
+
showDescription: true,
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
export const Complete = {
|
|
79
|
+
args: {
|
|
80
|
+
width: '300px',
|
|
81
|
+
showDate: true,
|
|
82
|
+
showBadges: true,
|
|
83
|
+
showDescription: true,
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
export const CustomWidth = {
|
|
87
|
+
args: {
|
|
88
|
+
width: '400px',
|
|
89
|
+
showDate: true,
|
|
90
|
+
showBadges: true,
|
|
91
|
+
showDescription: true,
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
export const Grid = {
|
|
95
|
+
render: () => (_jsxs(Box, { display: "flex", flexWrap: "wrap", gap: 2, children: [_jsx(AgentCardSkeleton, { showDate: true }), _jsx(AgentCardSkeleton, { showBadges: true }), _jsx(AgentCardSkeleton, { showDescription: true }), _jsx(AgentCardSkeleton, { showDate: true, showBadges: true, showDescription: true })] })),
|
|
96
|
+
};
|
|
97
|
+
export const LoadingState = {
|
|
98
|
+
render: () => (_jsxs(Box, { display: "flex", flexDirection: "column", gap: 3, children: [_jsxs(Box, { children: [_jsx("h3", { children: "Loading state example" }), _jsx("p", { children: "This demonstrates how multiple skeletons might appear during a loading state" })] }), _jsx(Box, { display: "flex", flexWrap: "wrap", gap: 2, children: Array(6)
|
|
99
|
+
.fill(0)
|
|
100
|
+
.map((_, index) => (_jsx(AgentCardSkeleton, { showDate: index % 2 === 0, showBadges: index % 3 === 0, showDescription: index % 2 !== 0 }, index))) })] })),
|
|
101
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CreateNewCardProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* CreateNewCard component that displays a card with a plus icon and text
|
|
5
|
+
* Used for "Create New" actions in a grid of cards
|
|
6
|
+
*/
|
|
7
|
+
export declare const CreateNewCard: React.FC<CreateNewCardProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { Plus } from '@phosphor-icons/react';
|
|
5
|
+
/**
|
|
6
|
+
* CreateNewCard component that displays a card with a plus icon and text
|
|
7
|
+
* Used for "Create New" actions in a grid of cards
|
|
8
|
+
*/
|
|
9
|
+
export const CreateNewCard = ({ text, onClick, }) => {
|
|
10
|
+
return (_jsx(Box, { width: 'auto', height: 'auto', sx: {
|
|
11
|
+
backgroundColor: 'var(--color-background-bg-element)',
|
|
12
|
+
cursor: 'pointer',
|
|
13
|
+
transition: 'all 0.2s ease-in-out',
|
|
14
|
+
borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)',
|
|
15
|
+
'&:hover': {
|
|
16
|
+
backgroundColor: 'var(--color-background-bg-card-highlight-hover)',
|
|
17
|
+
},
|
|
18
|
+
position: 'relative',
|
|
19
|
+
overflow: 'hidden',
|
|
20
|
+
boxShadow: `var(--global-shadows-shadow-xs-offset-x) var(--global-shadows-shadow-xs-offset-y) var(--global-shadows-shadow-xs-blur) var(--global-shadows-shadow-xs-spread) var(--global-shadows-shadow-xs-color)`,
|
|
21
|
+
}, onClick: onClick, children: _jsxs(Box, { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', height: '100%', padding: '24px', sx: { gap: '16px' }, children: [_jsx(Typography, { size: TypographySize.HeadingXS, weight: TypographyWeight.SemiBold, color: 'var(--color-background-bg-brand-primary)', children: text }), _jsx(Box, { display: 'flex', width: '48px', height: '48px', borderRadius: '50%', sx: {
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
justifyContent: 'center',
|
|
24
|
+
}, children: _jsx(Plus, { size: 36, weight: "fill", color: 'var(--color-background-bg-brand-primary)' }) })] }) }));
|
|
25
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CreateNewCard } from './CreateNewCard';
|
|
3
|
+
declare const meta: Meta<typeof CreateNewCard>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof CreateNewCard>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const CustomText: Story;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CreateNewCard } from './CreateNewCard';
|
|
2
|
+
import { action } from '@storybook/addon-actions';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Design System/Components/Agent/CreateNewCard',
|
|
5
|
+
component: CreateNewCard,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'centered',
|
|
8
|
+
},
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export const Default = {
|
|
13
|
+
args: {
|
|
14
|
+
text: 'New Text-to-Video',
|
|
15
|
+
onClick: action('clicked'),
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export const CustomText = {
|
|
19
|
+
args: {
|
|
20
|
+
text: 'Add new item',
|
|
21
|
+
onClick: action('clicked'),
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { MenuItemProps } from '../UI';
|
|
2
|
+
export declare enum AgentState {
|
|
3
|
+
pending = "pending",
|
|
4
|
+
processing = "processing",
|
|
5
|
+
error = "error",
|
|
6
|
+
ready = "ready"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Agent card component props
|
|
10
|
+
*/
|
|
11
|
+
export type AgentCardProps = {
|
|
12
|
+
/** Agent id */
|
|
13
|
+
agentId?: string;
|
|
14
|
+
/** On click agent id */
|
|
15
|
+
onClickAgentId?: (agentId: string) => void;
|
|
16
|
+
/** Agent image */
|
|
17
|
+
agentImage?: string;
|
|
18
|
+
/** Show date */
|
|
19
|
+
showDate?: boolean;
|
|
20
|
+
/** Badges */
|
|
21
|
+
badges?: string[];
|
|
22
|
+
/** Show badges */
|
|
23
|
+
showBadges?: boolean;
|
|
24
|
+
/** Time */
|
|
25
|
+
time?: string;
|
|
26
|
+
/** Show time badge */
|
|
27
|
+
showTimeBadge?: boolean;
|
|
28
|
+
/** Show description */
|
|
29
|
+
showDescription?: boolean;
|
|
30
|
+
/** Menu items */
|
|
31
|
+
menuItems?: MenuItemProps[];
|
|
32
|
+
/** Show menu */
|
|
33
|
+
showMenu?: boolean;
|
|
34
|
+
/** Description */
|
|
35
|
+
description?: string;
|
|
36
|
+
/** Title */
|
|
37
|
+
title: string;
|
|
38
|
+
/** Date */
|
|
39
|
+
date?: string;
|
|
40
|
+
/** Active */
|
|
41
|
+
active?: boolean;
|
|
42
|
+
/** Show active toggle */
|
|
43
|
+
showActiveToggle?: boolean;
|
|
44
|
+
/** On active toggle change */
|
|
45
|
+
onActiveToggleChange?: (active: boolean) => void;
|
|
46
|
+
/** Active toggle disabled */
|
|
47
|
+
activeToggleDisabled?: boolean;
|
|
48
|
+
/** On preview */
|
|
49
|
+
onPreview?: () => void;
|
|
50
|
+
/** Agent state */
|
|
51
|
+
agentState?: AgentState;
|
|
52
|
+
/** Preview button text */
|
|
53
|
+
previewButtonText?: string;
|
|
54
|
+
/** Show status badge */
|
|
55
|
+
showStatusBadge?: boolean;
|
|
56
|
+
/** Status badge text */
|
|
57
|
+
statusBadgeText?: string;
|
|
58
|
+
/** Show progress indicator in processing state */
|
|
59
|
+
showProgressIndicator?: boolean;
|
|
60
|
+
/** Current progress value (0-100) */
|
|
61
|
+
progressValue?: number;
|
|
62
|
+
/** Processing state text */
|
|
63
|
+
processingText?: string;
|
|
64
|
+
};
|
|
65
|
+
export interface AgentCardSkeletonProps {
|
|
66
|
+
/**
|
|
67
|
+
* Width of the card
|
|
68
|
+
*/
|
|
69
|
+
width?: string | number;
|
|
70
|
+
/**
|
|
71
|
+
* Show date placeholder
|
|
72
|
+
*/
|
|
73
|
+
showDate?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Show badges placeholder
|
|
76
|
+
*/
|
|
77
|
+
showBadges?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Show description placeholder
|
|
80
|
+
*/
|
|
81
|
+
showDescription?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Custom style for the skeleton
|
|
84
|
+
*/
|
|
85
|
+
style?: React.CSSProperties;
|
|
86
|
+
}
|
|
87
|
+
export interface CreateNewCardProps {
|
|
88
|
+
/**
|
|
89
|
+
* The text to display on the card
|
|
90
|
+
*/
|
|
91
|
+
text: string;
|
|
92
|
+
/**
|
|
93
|
+
* Optional click handler
|
|
94
|
+
*/
|
|
95
|
+
onClick?: () => void;
|
|
96
|
+
}
|