@appdirect/design-system 0.0.10 → 0.0.11

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.
Files changed (64) hide show
  1. package/README.md +2 -0
  2. package/dist/ComplexComponents/PageContentHeader/PageContentHeader.tsx +24 -34
  3. package/dist/ComplexComponents/PageContentHeader/index.ts +0 -2
  4. package/dist/contracts/PageContentHeader.json +10 -5
  5. package/dist/contracts/index.json +1 -1
  6. package/dist/index.ts +3 -4
  7. package/dist/stories/Buttons/ActionIcon.stories.tsx +159 -0
  8. package/dist/stories/Buttons/Button.stories.tsx +145 -0
  9. package/dist/stories/Buttons/CloseButton.stories.tsx +121 -0
  10. package/dist/stories/Combobox/AutocompleteClearable.stories.tsx +554 -0
  11. package/dist/stories/Combobox/Combobox.stories.tsx +106 -0
  12. package/dist/stories/Combobox/Multiselect.stories.tsx +664 -0
  13. package/dist/stories/Combobox/SearchableSelect.stories.tsx +640 -0
  14. package/dist/stories/Combobox/Select.stories.tsx +311 -0
  15. package/dist/stories/ComplexComponents/DashboardWidget/DashboardWidget.stories.tsx +822 -0
  16. package/dist/stories/ComplexComponents/DataTable/DataTable.stories.tsx +502 -0
  17. package/dist/stories/ComplexComponents/KeyInsight/KeyInsights.stories.tsx +386 -0
  18. package/dist/stories/ComplexComponents/NameValue/NameValue.stories.tsx +405 -0
  19. package/dist/stories/ComplexComponents/PageContentHeader/PageContentHeader.stories.tsx +527 -0
  20. package/dist/stories/ComplexComponents/Placeholder/Placeholder.stories.tsx +76 -0
  21. package/dist/stories/ComplexComponents/Slat/Slat.stories.tsx +79 -0
  22. package/dist/stories/ComplexComponents/Utilities/CopyButton.stories.tsx +479 -0
  23. package/dist/stories/DataDisplay/Alert.stories.tsx +296 -0
  24. package/dist/stories/DataDisplay/Avatar.stories.tsx +251 -0
  25. package/dist/stories/DataDisplay/Badge.stories.tsx +176 -0
  26. package/dist/stories/DataDisplay/Card.stories.tsx +406 -0
  27. package/dist/stories/DataDisplay/Chip.stories.tsx +495 -0
  28. package/dist/stories/DataDisplay/Indicator.stories.tsx +571 -0
  29. package/dist/stories/DataDisplay/List.stories.tsx +376 -0
  30. package/dist/stories/DataDisplay/Pill.stories.tsx +506 -0
  31. package/dist/stories/DataDisplay/Progress.stories.tsx +352 -0
  32. package/dist/stories/DataDisplay/Table.stories.tsx +346 -0
  33. package/dist/stories/DataDisplay/ThemeIcon.stories.tsx +125 -0
  34. package/dist/stories/Inputs/Checkbox.stories.tsx +263 -0
  35. package/dist/stories/Inputs/ColorInput.stories.tsx +434 -0
  36. package/dist/stories/Inputs/DropZone.stories.tsx +401 -0
  37. package/dist/stories/Inputs/FileInput.stories.tsx +383 -0
  38. package/dist/stories/Inputs/NumberInput.stories.tsx +342 -0
  39. package/dist/stories/Inputs/Radio.stories.tsx +437 -0
  40. package/dist/stories/Inputs/RadioGroup.stories.tsx +526 -0
  41. package/dist/stories/Inputs/SegmentedControl.stories.tsx +60 -0
  42. package/dist/stories/Inputs/Slider.stories.tsx +22 -0
  43. package/dist/stories/Inputs/SliderWithLabel.stories.tsx +37 -0
  44. package/dist/stories/Inputs/Switch.stories.tsx +361 -0
  45. package/dist/stories/Inputs/TextArea.stories.tsx +355 -0
  46. package/dist/stories/Inputs/TextInput.stories.tsx +266 -0
  47. package/dist/stories/Misc/Divider.stories.tsx +581 -0
  48. package/dist/stories/Misc/Paper.stories.tsx +557 -0
  49. package/dist/stories/Navigation/Breadcrumb.stories.tsx +489 -0
  50. package/dist/stories/Navigation/NavLink.stories.tsx +601 -0
  51. package/dist/stories/Navigation/Stepper.stories.tsx +413 -0
  52. package/dist/stories/Navigation/Tabs.stories.tsx +528 -0
  53. package/dist/stories/Overlays/Drawer.stories.tsx +802 -0
  54. package/dist/stories/Overlays/Menu.stories.tsx +941 -0
  55. package/dist/stories/Overlays/Modal.stories.tsx +249 -0
  56. package/dist/stories/Overlays/Popover.stories.tsx +780 -0
  57. package/dist/stories/Overlays/Tooltip.stories.tsx +52 -0
  58. package/dist/stories/Typography/Code.stories.tsx +368 -0
  59. package/dist/stories/Typography/Kbd.stories.tsx +514 -0
  60. package/dist/stories/Typography/Text.stories.tsx +117 -0
  61. package/dist/stories/Typography/Title.stories.tsx +112 -0
  62. package/dist/stories/index.json +1435 -0
  63. package/package.json +5 -3
  64. package/dist/ComplexComponents/PageContentHeader/DescriptionBlock.tsx +0 -65
@@ -0,0 +1,296 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Stack } from '@mantine/core';
3
+ import { Alert, Title, Text } from '@appdirect/design-system';
4
+ import { useState } from 'react';
5
+ import { RiStarLine, RiShieldCheckLine, RiLightbulbLine, RiHeartLine } from '@remixicon/react';
6
+
7
+ const meta: Meta<typeof Alert> = {
8
+ title: 'Design System/Data Display/Alert',
9
+ component: Alert,
10
+ parameters: {
11
+ layout: 'centered',
12
+ docs: {
13
+ description: {
14
+ component: 'Alert component for displaying important messages with semantic types and consistent styling.',
15
+ },
16
+ },
17
+ },
18
+ tags: ['autodocs', 'code-connected'],
19
+ argTypes: {
20
+ type: {
21
+ control: 'select',
22
+ options: ['info', 'success', 'danger', 'pending', 'default'],
23
+ description: 'Alert semantic type',
24
+ },
25
+ title: {
26
+ control: 'text',
27
+ description: 'Alert title',
28
+ },
29
+ children: {
30
+ control: 'text',
31
+ description: 'Alert content',
32
+ },
33
+ withCloseButton: {
34
+ control: 'boolean',
35
+ description: 'Whether alert can be closed',
36
+ },
37
+ icon: {
38
+ control: false,
39
+ description: 'Custom icon (overrides default semantic icon)',
40
+ },
41
+ },
42
+ };
43
+
44
+ export default meta;
45
+ type Story = StoryObj<typeof meta>;
46
+
47
+ export const Default: Story = {
48
+ args: {
49
+ type: 'info',
50
+ title: 'Information',
51
+ children: 'This is an informational alert message.',
52
+ },
53
+ };
54
+
55
+ export const Types: Story = {
56
+ render: () => (
57
+ <Stack gap="md" w={500}>
58
+ <Alert type="info" title="Information">
59
+ This is an informational alert with helpful details.
60
+ </Alert>
61
+ <Alert type="success" title="Success">
62
+ Operation completed successfully! Your changes have been saved.
63
+ </Alert>
64
+ <Alert type="danger" title="Error">
65
+ Something went wrong. Please check your input and try again.
66
+ </Alert>
67
+ <Alert type="pending" title="Processing">
68
+ Your request is being processed. This may take a few moments.
69
+ </Alert>
70
+ <Alert type="default" title="Notice">
71
+ This is a general notice with neutral styling.
72
+ </Alert>
73
+ </Stack>
74
+ ),
75
+ parameters: {
76
+ docs: {
77
+ description: {
78
+ story: 'Different semantic types of alerts with appropriate colors and icons.',
79
+ },
80
+ },
81
+ },
82
+ };
83
+
84
+ export const WithoutTitles: Story = {
85
+ render: () => (
86
+ <Stack gap="md" w={500}>
87
+ <Alert type="info">
88
+ Quick info message without a title.
89
+ </Alert>
90
+ <Alert type="success">
91
+ Success message without a title.
92
+ </Alert>
93
+ <Alert type="danger">
94
+ Error message without a title.
95
+ </Alert>
96
+ <Alert type="pending">
97
+ Processing message without a title.
98
+ </Alert>
99
+ </Stack>
100
+ ),
101
+ parameters: {
102
+ docs: {
103
+ description: {
104
+ story: 'Alerts without titles for simpler, more compact messages.',
105
+ },
106
+ },
107
+ },
108
+ };
109
+
110
+ export const WithCloseButton: Story = {
111
+ render: () => {
112
+ const [alerts, setAlerts] = useState([
113
+ { id: 1, type: 'info' as const, title: 'Info Alert', message: 'This alert can be dismissed.' },
114
+ { id: 2, type: 'success' as const, title: 'Success Alert', message: 'This success alert can also be closed.' },
115
+ { id: 3, type: 'danger' as const, title: 'Error Alert', message: 'This error alert is dismissible.' },
116
+ ]);
117
+
118
+ const handleClose = (id: number) => {
119
+ setAlerts(alerts.filter(alert => alert.id !== id));
120
+ };
121
+
122
+ return (
123
+ <Stack gap="md" w={500}>
124
+ {alerts.map(alert => (
125
+ <Alert
126
+ key={alert.id}
127
+ type={alert.type}
128
+ title={alert.title}
129
+ withCloseButton
130
+ onClose={() => handleClose(alert.id)}
131
+ >
132
+ {alert.message}
133
+ </Alert>
134
+ ))}
135
+ {alerts.length === 0 && (
136
+ <Text size="sm" c="dimmed" ta="center">
137
+ All alerts have been dismissed. Refresh to see them again.
138
+ </Text>
139
+ )}
140
+ </Stack>
141
+ );
142
+ },
143
+ parameters: {
144
+ docs: {
145
+ description: {
146
+ story: 'Alerts with close buttons that can be dismissed by users.',
147
+ },
148
+ },
149
+ },
150
+ };
151
+
152
+ export const CustomIcons: Story = {
153
+ render: () => (
154
+ <Stack gap="md" w={500}>
155
+ <Alert type="info" title="Featured Content" icon={<RiStarLine size={20} />}>
156
+ This content has been featured and uses a custom star icon.
157
+ </Alert>
158
+ <Alert type="success" title="Secure Connection" icon={<RiShieldCheckLine size={20} />}>
159
+ Your connection is secure and protected.
160
+ </Alert>
161
+ <Alert type="pending" title="Pro Tip" icon={<RiLightbulbLine size={20} />}>
162
+ Here's a helpful tip to improve your workflow.
163
+ </Alert>
164
+ <Alert type="danger" title="Favorites" icon={<RiHeartLine size={20} />}>
165
+ This item has been added to your favorites.
166
+ </Alert>
167
+ </Stack>
168
+ ),
169
+ parameters: {
170
+ docs: {
171
+ description: {
172
+ story: 'Alerts with custom icons that override the default semantic icons.',
173
+ },
174
+ },
175
+ },
176
+ };
177
+
178
+ export const UseCases: Story = {
179
+ render: () => (
180
+ <Stack gap="lg" w={600}>
181
+ <Title order={3} size="md" fw={500} mb="xs">Common Use Cases</Title>
182
+
183
+ <Stack gap="md">
184
+ <Alert type="info" title="System Maintenance">
185
+ Scheduled maintenance will occur tonight from 2:00 AM to 4:00 AM EST. Some features may be temporarily unavailable.
186
+ </Alert>
187
+
188
+ <Alert type="success" title="Profile Updated" withCloseButton>
189
+ Your profile information has been successfully updated and saved.
190
+ </Alert>
191
+
192
+ <Alert type="danger" title="Payment Failed">
193
+ Your payment could not be processed. Please check your payment method and try again.
194
+ </Alert>
195
+
196
+ <Alert type="pending" title="File Upload in Progress">
197
+ Uploading your files... Please don't close this window until the upload is complete.
198
+ </Alert>
199
+
200
+ <Alert type="info" title="New Features Available" withCloseButton>
201
+ We've added new features to improve your experience. Check out the latest updates in your dashboard.
202
+ </Alert>
203
+
204
+ <Alert type="danger" title="Account Security Alert">
205
+ We detected unusual activity on your account. Please review your recent activity and update your password if necessary.
206
+ </Alert>
207
+ </Stack>
208
+ </Stack>
209
+ ),
210
+ parameters: {
211
+ docs: {
212
+ description: {
213
+ story: 'Real-world examples of Alert usage in different application contexts.',
214
+ },
215
+ },
216
+ },
217
+ };
218
+
219
+ export const FormValidation: Story = {
220
+ render: () => (
221
+ <Stack gap="md" w={500}>
222
+ <Title order={4} size="sm" fw={500} mb="xs">Form Validation Examples</Title>
223
+
224
+ <Alert type="danger" title="Form Validation Error">
225
+ Please correct the following errors before submitting:
226
+ <ul style={{ margin: '8px 0 0 0', paddingLeft: '20px' }}>
227
+ <li>Email address is required</li>
228
+ <li>Password must be at least 8 characters</li>
229
+ <li>Phone number format is invalid</li>
230
+ </ul>
231
+ </Alert>
232
+
233
+ <Alert type="success" title="Form Submitted Successfully">
234
+ Thank you! Your form has been submitted and we'll get back to you within 24 hours.
235
+ </Alert>
236
+
237
+ <Alert type="pending" title="Validating Information">
238
+ We're checking your information against our records. This may take a moment.
239
+ </Alert>
240
+
241
+ <Alert type="info" title="Required Fields">
242
+ Fields marked with an asterisk (*) are required to complete your registration.
243
+ </Alert>
244
+ </Stack>
245
+ ),
246
+ parameters: {
247
+ docs: {
248
+ description: {
249
+ story: 'Examples of alerts used for form validation and user feedback.',
250
+ },
251
+ },
252
+ },
253
+ };
254
+
255
+ export const LongContent: Story = {
256
+ render: () => (
257
+ <Stack gap="md" w={600}>
258
+ <Alert type="info" title="Terms of Service Update">
259
+ We've updated our Terms of Service to better protect your privacy and clarify our data usage policies.
260
+ The changes include new sections on data retention, third-party integrations, and user rights.
261
+ Please review the updated terms at your earliest convenience. By continuing to use our service,
262
+ you agree to the updated terms. If you have any questions or concerns, please contact our support team.
263
+ </Alert>
264
+
265
+ <Alert type="danger" title="Critical Security Update Required">
266
+ A critical security vulnerability has been discovered that affects your account.
267
+ To protect your data and maintain the security of our platform, you must update your password
268
+ and enable two-factor authentication immediately. Failure to complete these security measures
269
+ within 48 hours may result in temporary account suspension for your protection.
270
+ </Alert>
271
+ </Stack>
272
+ ),
273
+ parameters: {
274
+ docs: {
275
+ description: {
276
+ story: 'Examples of alerts with longer content that wrap appropriately.',
277
+ },
278
+ },
279
+ },
280
+ };
281
+
282
+ export const Interactive: Story = {
283
+ args: {
284
+ type: 'info',
285
+ title: 'Interactive Alert',
286
+ children: 'Use the controls below to customize this alert.',
287
+ withCloseButton: false,
288
+ },
289
+ parameters: {
290
+ docs: {
291
+ description: {
292
+ story: 'Use the controls below to interact with the Alert and see different combinations.',
293
+ },
294
+ },
295
+ },
296
+ };
@@ -0,0 +1,251 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Stack } from '@mantine/core';
3
+ import { Inline, Avatar, Title, Text } from '@appdirect/design-system';
4
+ import { useState } from 'react';
5
+ import { RiUserLine, RiAdminLine, RiVipCrownLine, RiRobotLine } from '@remixicon/react';
6
+
7
+ const meta: Meta<typeof Avatar> = {
8
+ title: 'Design System/Data Display/Avatar',
9
+ component: Avatar,
10
+ parameters: {
11
+ layout: 'centered',
12
+ docs: {
13
+ description: {
14
+ component: 'Avatar component with three variants: icon, image, and initials. Supports all t-shirt sizes and fallback handling.',
15
+ },
16
+ },
17
+ },
18
+ tags: ['autodocs', 'code-connected'],
19
+ argTypes: {
20
+ variant: {
21
+ control: 'select',
22
+ options: ['icon', 'image', 'initials'],
23
+ description: 'Avatar variant type',
24
+ },
25
+ size: {
26
+ control: 'select',
27
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
28
+ description: 'Avatar size',
29
+ },
30
+ src: {
31
+ control: 'text',
32
+ description: 'Image source URL (for image variant)',
33
+ },
34
+ alt: {
35
+ control: 'text',
36
+ description: 'Alt text for image',
37
+ },
38
+ initials: {
39
+ control: 'text',
40
+ description: 'Two character initials (for initials variant)',
41
+ },
42
+ fallback: {
43
+ control: 'select',
44
+ options: ['icon', 'initials'],
45
+ description: 'Fallback variant when image fails',
46
+ },
47
+ fallbackInitials: {
48
+ control: 'text',
49
+ description: 'Fallback initials when image fails',
50
+ },
51
+ },
52
+ };
53
+
54
+ export default meta;
55
+ type Story = StoryObj<typeof meta>;
56
+
57
+ export const Default: Story = {
58
+ args: {
59
+ variant: 'icon',
60
+ size: 'md',
61
+ },
62
+ };
63
+
64
+ export const Variants: Story = {
65
+ render: () => (
66
+ <Inline gap="lg" align="center">
67
+ <Avatar variant="image" src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=120&h=120&fit=crop&crop=face" alt="User" />
68
+ <Avatar variant="initials" initials="JD" />
69
+ <Avatar variant="icon" />
70
+ <Avatar variant="icon" icon={<span>🎨</span>} />
71
+ </Inline>
72
+ ),
73
+ };
74
+
75
+ export const Sizes: Story = {
76
+ render: () => (
77
+ <Stack gap="lg">
78
+ <Inline gap="md" align="center">
79
+ <Avatar variant="image" size="xs" src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=120&h=120&fit=crop&crop=face" alt="User" />
80
+ <Avatar variant="image" size="sm" src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=120&h=120&fit=crop&crop=face" alt="User" />
81
+ <Avatar variant="image" size="md" src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=120&h=120&fit=crop&crop=face" alt="User" />
82
+ <Avatar variant="image" size="lg" src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=120&h=120&fit=crop&crop=face" alt="User" />
83
+ <Avatar variant="image" size="xl" src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=120&h=120&fit=crop&crop=face" alt="User" />
84
+ </Inline>
85
+ <Inline gap="md" align="center">
86
+ <Avatar variant="initials" size="xs" initials="XS" />
87
+ <Avatar variant="initials" size="sm" initials="SM" />
88
+ <Avatar variant="initials" size="md" initials="MD" />
89
+ <Avatar variant="initials" size="lg" initials="LG" />
90
+ <Avatar variant="initials" size="xl" initials="XL" />
91
+ </Inline>
92
+ <Inline gap="md" align="center">
93
+ <Avatar variant="icon" size="xs" />
94
+ <Avatar variant="icon" size="sm" />
95
+ <Avatar variant="icon" size="md" />
96
+ <Avatar variant="icon" size="lg" />
97
+ <Avatar variant="icon" size="xl" />
98
+ </Inline>
99
+ </Stack>
100
+ ),
101
+ };
102
+
103
+ export const CustomIcons: Story = {
104
+ render: () => (
105
+ <Inline gap="lg" align="center">
106
+ <Avatar variant="icon" />
107
+ <Avatar variant="icon" icon={<span>🎨</span>} />
108
+ <Avatar variant="icon" icon={<span>💼</span>} />
109
+ <Avatar variant="icon" icon={<span>🚀</span>} />
110
+ </Inline>
111
+ ),
112
+ };
113
+
114
+ export const ImageFallbacks: Story = {
115
+ render: () => (
116
+ <Stack gap="lg">
117
+ <Inline gap="md" align="center">
118
+ <Avatar variant="image" src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=120&h=120&fit=crop&crop=face" alt="User" />
119
+ <Avatar variant="image" src="invalid-url.jpg" alt="User" fallback="initials" fallbackInitials="JD" />
120
+ <Avatar variant="initials" initials="AB" />
121
+ <Avatar variant="initials" initials="CD" />
122
+ </Inline>
123
+ </Stack>
124
+ ),
125
+ };
126
+
127
+ export const UserProfiles: Story = {
128
+ render: () => (
129
+ <Stack gap="lg" maw={400}>
130
+ <Title order={3} size="md" fw={500} mb="xs">Team Members</Title>
131
+ <Stack gap="md">
132
+ <Inline gap="sm" align="center">
133
+ <Avatar variant="image" src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=120&h=120&fit=crop&crop=face" size="md" alt="John Doe" />
134
+ <div>
135
+ <Text fw={500}>John Doe</Text>
136
+ <Text size="sm" c="dimmed">Product Manager</Text>
137
+ </div>
138
+ </Inline>
139
+ <Inline gap="sm" align="center">
140
+ <Avatar variant="initials" initials="JS" size="md" />
141
+ <div>
142
+ <Text fw={500}>Jane Smith</Text>
143
+ <Text size="sm" c="dimmed">UX Designer</Text>
144
+ </div>
145
+ </Inline>
146
+ <Inline gap="sm" align="center">
147
+ <Avatar variant="initials" initials="MJ" size="md" />
148
+ <div>
149
+ <Text fw={500}>Mike Johnson</Text>
150
+ <Text size="sm" c="dimmed">Developer</Text>
151
+ </div>
152
+ </Inline>
153
+ </Stack>
154
+ </Stack>
155
+ ),
156
+ };
157
+
158
+ export const AvatarGroup: Story = {
159
+ render: () => (
160
+ <Stack gap="lg">
161
+ <div>
162
+ <Text size="sm" fw={500} c="dimmed" mb="xs">Overlapping Avatars</Text>
163
+ <Inline gap="-xs">
164
+ <Avatar variant="image" src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=120&h=120&fit=crop&crop=face" alt="User" />
165
+ <Avatar variant="initials" initials="JS" />
166
+ <Avatar variant="initials" initials="MJ" />
167
+ <Avatar variant="initials" initials="+3" />
168
+ </Inline>
169
+ </div>
170
+
171
+ <div>
172
+ <Text size="sm" fw={500} c="dimmed" mb="xs">Team Collaboration</Text>
173
+ <Inline gap="-sm" align="center">
174
+ <Avatar variant="image" src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=120&h=120&fit=crop&crop=face" size="lg" alt="User" />
175
+ <Avatar variant="initials" initials="AB" size="lg" />
176
+ <Avatar variant="initials" initials="CD" size="lg" />
177
+ <Avatar variant="initials" initials="EF" size="lg" />
178
+ <Avatar variant="initials" initials="+5" size="lg" />
179
+ </Inline>
180
+ </div>
181
+ </Stack>
182
+ ),
183
+ };
184
+
185
+ export const StatusIndicators: Story = {
186
+ render: () => (
187
+ <Stack gap="lg">
188
+ <Title order={3} size="md" fw={500} mb="xs">Online Status</Title>
189
+ <Inline gap="lg" align="center">
190
+ <div style={{ position: 'relative' }}>
191
+ <Avatar variant="image" src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=120&h=120&fit=crop&crop=face" alt="User" />
192
+ <div style={{
193
+ position: 'absolute',
194
+ bottom: 0,
195
+ right: 0,
196
+ width: '12px',
197
+ height: '12px',
198
+ backgroundColor: 'green',
199
+ borderRadius: '50%',
200
+ border: '2px solid white'
201
+ }} />
202
+ </div>
203
+ <div style={{ position: 'relative' }}>
204
+ <Avatar variant="initials" initials="JS" />
205
+ <div style={{
206
+ position: 'absolute',
207
+ bottom: 0,
208
+ right: 0,
209
+ width: '12px',
210
+ height: '12px',
211
+ backgroundColor: 'orange',
212
+ borderRadius: '50%',
213
+ border: '2px solid white'
214
+ }} />
215
+ </div>
216
+ <div style={{ position: 'relative' }}>
217
+ <Avatar variant="initials" initials="MJ" />
218
+ <div style={{
219
+ position: 'absolute',
220
+ bottom: 0,
221
+ right: 0,
222
+ width: '12px',
223
+ height: '12px',
224
+ backgroundColor: 'gray',
225
+ borderRadius: '50%',
226
+ border: '2px solid white'
227
+ }} />
228
+ </div>
229
+ </Inline>
230
+ </Stack>
231
+ ),
232
+ };
233
+
234
+ export const Interactive: Story = {
235
+ args: {
236
+ variant: 'icon',
237
+ size: 'md',
238
+ src: '',
239
+ alt: '',
240
+ initials: '',
241
+ fallback: 'icon',
242
+ fallbackInitials: '',
243
+ },
244
+ parameters: {
245
+ docs: {
246
+ description: {
247
+ story: 'Use the controls below to interact with the Avatar and see different combinations.',
248
+ },
249
+ },
250
+ },
251
+ };