@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.
- package/README.md +2 -0
- package/dist/ComplexComponents/PageContentHeader/PageContentHeader.tsx +24 -34
- package/dist/ComplexComponents/PageContentHeader/index.ts +0 -2
- package/dist/contracts/PageContentHeader.json +10 -5
- package/dist/contracts/index.json +1 -1
- package/dist/index.ts +3 -4
- package/dist/stories/Buttons/ActionIcon.stories.tsx +159 -0
- package/dist/stories/Buttons/Button.stories.tsx +145 -0
- package/dist/stories/Buttons/CloseButton.stories.tsx +121 -0
- package/dist/stories/Combobox/AutocompleteClearable.stories.tsx +554 -0
- package/dist/stories/Combobox/Combobox.stories.tsx +106 -0
- package/dist/stories/Combobox/Multiselect.stories.tsx +664 -0
- package/dist/stories/Combobox/SearchableSelect.stories.tsx +640 -0
- package/dist/stories/Combobox/Select.stories.tsx +311 -0
- package/dist/stories/ComplexComponents/DashboardWidget/DashboardWidget.stories.tsx +822 -0
- package/dist/stories/ComplexComponents/DataTable/DataTable.stories.tsx +502 -0
- package/dist/stories/ComplexComponents/KeyInsight/KeyInsights.stories.tsx +386 -0
- package/dist/stories/ComplexComponents/NameValue/NameValue.stories.tsx +405 -0
- package/dist/stories/ComplexComponents/PageContentHeader/PageContentHeader.stories.tsx +527 -0
- package/dist/stories/ComplexComponents/Placeholder/Placeholder.stories.tsx +76 -0
- package/dist/stories/ComplexComponents/Slat/Slat.stories.tsx +79 -0
- package/dist/stories/ComplexComponents/Utilities/CopyButton.stories.tsx +479 -0
- package/dist/stories/DataDisplay/Alert.stories.tsx +296 -0
- package/dist/stories/DataDisplay/Avatar.stories.tsx +251 -0
- package/dist/stories/DataDisplay/Badge.stories.tsx +176 -0
- package/dist/stories/DataDisplay/Card.stories.tsx +406 -0
- package/dist/stories/DataDisplay/Chip.stories.tsx +495 -0
- package/dist/stories/DataDisplay/Indicator.stories.tsx +571 -0
- package/dist/stories/DataDisplay/List.stories.tsx +376 -0
- package/dist/stories/DataDisplay/Pill.stories.tsx +506 -0
- package/dist/stories/DataDisplay/Progress.stories.tsx +352 -0
- package/dist/stories/DataDisplay/Table.stories.tsx +346 -0
- package/dist/stories/DataDisplay/ThemeIcon.stories.tsx +125 -0
- package/dist/stories/Inputs/Checkbox.stories.tsx +263 -0
- package/dist/stories/Inputs/ColorInput.stories.tsx +434 -0
- package/dist/stories/Inputs/DropZone.stories.tsx +401 -0
- package/dist/stories/Inputs/FileInput.stories.tsx +383 -0
- package/dist/stories/Inputs/NumberInput.stories.tsx +342 -0
- package/dist/stories/Inputs/Radio.stories.tsx +437 -0
- package/dist/stories/Inputs/RadioGroup.stories.tsx +526 -0
- package/dist/stories/Inputs/SegmentedControl.stories.tsx +60 -0
- package/dist/stories/Inputs/Slider.stories.tsx +22 -0
- package/dist/stories/Inputs/SliderWithLabel.stories.tsx +37 -0
- package/dist/stories/Inputs/Switch.stories.tsx +361 -0
- package/dist/stories/Inputs/TextArea.stories.tsx +355 -0
- package/dist/stories/Inputs/TextInput.stories.tsx +266 -0
- package/dist/stories/Misc/Divider.stories.tsx +581 -0
- package/dist/stories/Misc/Paper.stories.tsx +557 -0
- package/dist/stories/Navigation/Breadcrumb.stories.tsx +489 -0
- package/dist/stories/Navigation/NavLink.stories.tsx +601 -0
- package/dist/stories/Navigation/Stepper.stories.tsx +413 -0
- package/dist/stories/Navigation/Tabs.stories.tsx +528 -0
- package/dist/stories/Overlays/Drawer.stories.tsx +802 -0
- package/dist/stories/Overlays/Menu.stories.tsx +941 -0
- package/dist/stories/Overlays/Modal.stories.tsx +249 -0
- package/dist/stories/Overlays/Popover.stories.tsx +780 -0
- package/dist/stories/Overlays/Tooltip.stories.tsx +52 -0
- package/dist/stories/Typography/Code.stories.tsx +368 -0
- package/dist/stories/Typography/Kbd.stories.tsx +514 -0
- package/dist/stories/Typography/Text.stories.tsx +117 -0
- package/dist/stories/Typography/Title.stories.tsx +112 -0
- package/dist/stories/index.json +1435 -0
- package/package.json +5 -3
- package/dist/ComplexComponents/PageContentHeader/DescriptionBlock.tsx +0 -65
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/nextjs-vite';
|
|
2
|
+
import { Stack, Inline, Breadcrumb, BackBreadcrumb, Title, Text } from '@appdirect/design-system';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Breadcrumb> = {
|
|
6
|
+
title: 'Design System/Navigation/Breadcrumb',
|
|
7
|
+
component: Breadcrumb,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: 'Breadcrumb component for navigation hierarchies with clickable links and current page indication.',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
tags: ['autodocs', 'code-connected'],
|
|
17
|
+
argTypes: {
|
|
18
|
+
separator: {
|
|
19
|
+
control: 'text',
|
|
20
|
+
description: 'Custom separator between breadcrumb items',
|
|
21
|
+
},
|
|
22
|
+
items: {
|
|
23
|
+
control: 'object',
|
|
24
|
+
description: 'Array of breadcrumb items',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default meta;
|
|
30
|
+
type Story = StoryObj<typeof meta>;
|
|
31
|
+
|
|
32
|
+
export const Default: Story = {
|
|
33
|
+
args: {
|
|
34
|
+
items: [
|
|
35
|
+
{ label: 'Home', href: '/' },
|
|
36
|
+
{ label: 'Products', href: '/products' },
|
|
37
|
+
{ label: 'Electronics', href: '/products/electronics' },
|
|
38
|
+
{ label: 'Smartphones' },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const SimpleBreadcrumb: Story = {
|
|
44
|
+
render: () => (
|
|
45
|
+
<Breadcrumb
|
|
46
|
+
items={[
|
|
47
|
+
{ label: 'Home', onClick: () => console.log('Navigate to Home') },
|
|
48
|
+
{ label: 'Current Page' },
|
|
49
|
+
]}
|
|
50
|
+
/>
|
|
51
|
+
),
|
|
52
|
+
parameters: {
|
|
53
|
+
docs: {
|
|
54
|
+
description: {
|
|
55
|
+
story: 'Simple breadcrumb with just two levels.',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const WithCustomSeparator: Story = {
|
|
62
|
+
render: () => (
|
|
63
|
+
<Stack gap="lg" align="flex-start">
|
|
64
|
+
<div>
|
|
65
|
+
<Text size="sm" fw={500} mb="xs">Arrow Separator:</Text>
|
|
66
|
+
<Breadcrumb
|
|
67
|
+
separator="→"
|
|
68
|
+
items={[
|
|
69
|
+
{ label: 'Dashboard', href: '/dashboard' },
|
|
70
|
+
{ label: 'Analytics', href: '/analytics' },
|
|
71
|
+
{ label: 'Reports' },
|
|
72
|
+
]}
|
|
73
|
+
/>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<div>
|
|
77
|
+
<Text size="sm" fw={500} mb="xs">Chevron Separator:</Text>
|
|
78
|
+
<Breadcrumb
|
|
79
|
+
separator="›"
|
|
80
|
+
items={[
|
|
81
|
+
{ label: 'Settings', href: '/settings' },
|
|
82
|
+
{ label: 'Account', href: '/settings/account' },
|
|
83
|
+
{ label: 'Profile' },
|
|
84
|
+
]}
|
|
85
|
+
/>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div>
|
|
89
|
+
<Text size="sm" fw={500} mb="xs">Dot Separator:</Text>
|
|
90
|
+
<Breadcrumb
|
|
91
|
+
separator="•"
|
|
92
|
+
items={[
|
|
93
|
+
{ label: 'Blog', href: '/blog' },
|
|
94
|
+
{ label: 'Technology', href: '/blog/technology' },
|
|
95
|
+
{ label: 'React Tips' },
|
|
96
|
+
]}
|
|
97
|
+
/>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div>
|
|
101
|
+
<Text size="sm" fw={500} mb="xs">Pipe Separator:</Text>
|
|
102
|
+
<Breadcrumb
|
|
103
|
+
separator="|"
|
|
104
|
+
items={[
|
|
105
|
+
{ label: 'Documentation', href: '/docs' },
|
|
106
|
+
{ label: 'Components', href: '/docs/components' },
|
|
107
|
+
{ label: 'Breadcrumb' },
|
|
108
|
+
]}
|
|
109
|
+
/>
|
|
110
|
+
</div>
|
|
111
|
+
</Stack>
|
|
112
|
+
),
|
|
113
|
+
parameters: {
|
|
114
|
+
docs: {
|
|
115
|
+
description: {
|
|
116
|
+
story: 'Breadcrumbs with different custom separators.',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export const DifferentLengths: Story = {
|
|
123
|
+
render: () => (
|
|
124
|
+
<Stack gap="lg" align="flex-start">
|
|
125
|
+
<div>
|
|
126
|
+
<Text size="sm" fw={500} mb="xs">Two Levels:</Text>
|
|
127
|
+
<Breadcrumb
|
|
128
|
+
items={[
|
|
129
|
+
{ label: 'Home', href: '/' },
|
|
130
|
+
{ label: 'About' },
|
|
131
|
+
]}
|
|
132
|
+
/>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<div>
|
|
136
|
+
<Text size="sm" fw={500} mb="xs">Three Levels:</Text>
|
|
137
|
+
<Breadcrumb
|
|
138
|
+
items={[
|
|
139
|
+
{ label: 'Home', href: '/' },
|
|
140
|
+
{ label: 'Products', href: '/products' },
|
|
141
|
+
{ label: 'Laptops' },
|
|
142
|
+
]}
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<div>
|
|
147
|
+
<Text size="sm" fw={500} mb="xs">Four Levels:</Text>
|
|
148
|
+
<Breadcrumb
|
|
149
|
+
items={[
|
|
150
|
+
{ label: 'Home', href: '/' },
|
|
151
|
+
{ label: 'Categories', href: '/categories' },
|
|
152
|
+
{ label: 'Electronics', href: '/categories/electronics' },
|
|
153
|
+
{ label: 'Smartphones' },
|
|
154
|
+
]}
|
|
155
|
+
/>
|
|
156
|
+
</div>
|
|
157
|
+
|
|
158
|
+
<div>
|
|
159
|
+
<Text size="sm" fw={500} mb="xs">Five Levels:</Text>
|
|
160
|
+
<Breadcrumb
|
|
161
|
+
items={[
|
|
162
|
+
{ label: 'Dashboard', href: '/dashboard' },
|
|
163
|
+
{ label: 'Projects', href: '/projects' },
|
|
164
|
+
{ label: 'Web App', href: '/projects/webapp' },
|
|
165
|
+
{ label: 'Components', href: '/projects/webapp/components' },
|
|
166
|
+
{ label: 'Navigation' },
|
|
167
|
+
]}
|
|
168
|
+
/>
|
|
169
|
+
</div>
|
|
170
|
+
</Stack>
|
|
171
|
+
),
|
|
172
|
+
parameters: {
|
|
173
|
+
docs: {
|
|
174
|
+
description: {
|
|
175
|
+
story: 'Breadcrumbs with different numbers of levels.',
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
export const InteractiveBreadcrumb: Story = {
|
|
182
|
+
render: () => {
|
|
183
|
+
const [currentPath, setCurrentPath] = useState(['Home', 'Products', 'Electronics', 'Smartphones']);
|
|
184
|
+
|
|
185
|
+
const navigateToLevel = (index: number) => {
|
|
186
|
+
setCurrentPath(prev => prev.slice(0, index + 1));
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
const breadcrumbItems = currentPath.map((item, index) => ({
|
|
190
|
+
label: item,
|
|
191
|
+
onClick: index < currentPath.length - 1 ? () => navigateToLevel(index) : undefined,
|
|
192
|
+
}));
|
|
193
|
+
|
|
194
|
+
return (
|
|
195
|
+
<Stack gap="md" align="flex-start">
|
|
196
|
+
<Breadcrumb items={breadcrumbItems} />
|
|
197
|
+
<Text size="sm" c="dimmed">
|
|
198
|
+
Click on any breadcrumb item to navigate back to that level
|
|
199
|
+
</Text>
|
|
200
|
+
<Text size="sm">
|
|
201
|
+
Current path: {currentPath.join(' / ')}
|
|
202
|
+
</Text>
|
|
203
|
+
</Stack>
|
|
204
|
+
);
|
|
205
|
+
},
|
|
206
|
+
parameters: {
|
|
207
|
+
docs: {
|
|
208
|
+
description: {
|
|
209
|
+
story: 'Interactive breadcrumb that responds to clicks and updates the navigation path.',
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
export const BackBreadcrumbs: Story = {
|
|
216
|
+
render: () => (
|
|
217
|
+
<Stack gap="lg" align="flex-start">
|
|
218
|
+
<div>
|
|
219
|
+
<Text size="sm" fw={500} mb="xs">Default Back Button:</Text>
|
|
220
|
+
<BackBreadcrumb onClick={() => console.log('Navigate back')} />
|
|
221
|
+
</div>
|
|
222
|
+
|
|
223
|
+
<div>
|
|
224
|
+
<Text size="sm" fw={500} mb="xs">Custom Label:</Text>
|
|
225
|
+
<BackBreadcrumb
|
|
226
|
+
label="Back to Products"
|
|
227
|
+
onClick={() => console.log('Back to products')}
|
|
228
|
+
/>
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
<div>
|
|
232
|
+
<Text size="sm" fw={500} mb="xs">With Href:</Text>
|
|
233
|
+
<BackBreadcrumb
|
|
234
|
+
label="Back to Dashboard"
|
|
235
|
+
href="/dashboard"
|
|
236
|
+
/>
|
|
237
|
+
</div>
|
|
238
|
+
|
|
239
|
+
<div>
|
|
240
|
+
<Text size="sm" fw={500} mb="xs">Long Label:</Text>
|
|
241
|
+
<BackBreadcrumb
|
|
242
|
+
label="Back to User Management Settings"
|
|
243
|
+
onClick={() => console.log('Back to user management')}
|
|
244
|
+
/>
|
|
245
|
+
</div>
|
|
246
|
+
</Stack>
|
|
247
|
+
),
|
|
248
|
+
parameters: {
|
|
249
|
+
docs: {
|
|
250
|
+
description: {
|
|
251
|
+
story: 'BackBreadcrumb component variations with different labels and navigation methods.',
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
export const EcommerceBreadcrumbs: Story = {
|
|
258
|
+
render: () => (
|
|
259
|
+
<Stack gap="lg" align="flex-start">
|
|
260
|
+
<div>
|
|
261
|
+
<Text size="sm" fw={500} mb="xs">Product Category Navigation:</Text>
|
|
262
|
+
<Breadcrumb
|
|
263
|
+
items={[
|
|
264
|
+
{ label: 'Home', href: '/' },
|
|
265
|
+
{ label: 'Electronics', href: '/electronics' },
|
|
266
|
+
{ label: 'Computers', href: '/electronics/computers' },
|
|
267
|
+
{ label: 'Laptops', href: '/electronics/computers/laptops' },
|
|
268
|
+
{ label: 'MacBook Pro 16"' },
|
|
269
|
+
]}
|
|
270
|
+
/>
|
|
271
|
+
</div>
|
|
272
|
+
|
|
273
|
+
<div>
|
|
274
|
+
<Text size="sm" fw={500} mb="xs">Shopping Cart Flow:</Text>
|
|
275
|
+
<Breadcrumb
|
|
276
|
+
items={[
|
|
277
|
+
{ label: 'Cart', href: '/cart' },
|
|
278
|
+
{ label: 'Shipping', href: '/checkout/shipping' },
|
|
279
|
+
{ label: 'Payment', href: '/checkout/payment' },
|
|
280
|
+
{ label: 'Review Order' },
|
|
281
|
+
]}
|
|
282
|
+
/>
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
<div>
|
|
286
|
+
<Text size="sm" fw={500} mb="xs">Account Management:</Text>
|
|
287
|
+
<Breadcrumb
|
|
288
|
+
items={[
|
|
289
|
+
{ label: 'My Account', href: '/account' },
|
|
290
|
+
{ label: 'Orders', href: '/account/orders' },
|
|
291
|
+
{ label: 'Order #12345' },
|
|
292
|
+
]}
|
|
293
|
+
/>
|
|
294
|
+
</div>
|
|
295
|
+
</Stack>
|
|
296
|
+
),
|
|
297
|
+
parameters: {
|
|
298
|
+
docs: {
|
|
299
|
+
description: {
|
|
300
|
+
story: 'E-commerce specific breadcrumb examples.',
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
export const AdminDashboardBreadcrumbs: Story = {
|
|
307
|
+
render: () => (
|
|
308
|
+
<Stack gap="lg" align="flex-start">
|
|
309
|
+
<div>
|
|
310
|
+
<Text size="sm" fw={500} mb="xs">User Management:</Text>
|
|
311
|
+
<Breadcrumb
|
|
312
|
+
items={[
|
|
313
|
+
{ label: 'Dashboard', href: '/admin' },
|
|
314
|
+
{ label: 'Users', href: '/admin/users' },
|
|
315
|
+
{ label: 'Edit User', href: '/admin/users/edit' },
|
|
316
|
+
{ label: 'John Doe' },
|
|
317
|
+
]}
|
|
318
|
+
/>
|
|
319
|
+
</div>
|
|
320
|
+
|
|
321
|
+
<div>
|
|
322
|
+
<Text size="sm" fw={500} mb="xs">Content Management:</Text>
|
|
323
|
+
<Breadcrumb
|
|
324
|
+
items={[
|
|
325
|
+
{ label: 'Admin', href: '/admin' },
|
|
326
|
+
{ label: 'Content', href: '/admin/content' },
|
|
327
|
+
{ label: 'Blog Posts', href: '/admin/content/blog' },
|
|
328
|
+
{ label: 'Create New Post' },
|
|
329
|
+
]}
|
|
330
|
+
/>
|
|
331
|
+
</div>
|
|
332
|
+
|
|
333
|
+
<div>
|
|
334
|
+
<Text size="sm" fw={500} mb="xs">System Settings:</Text>
|
|
335
|
+
<Breadcrumb
|
|
336
|
+
items={[
|
|
337
|
+
{ label: 'Dashboard', href: '/admin' },
|
|
338
|
+
{ label: 'Settings', href: '/admin/settings' },
|
|
339
|
+
{ label: 'Security', href: '/admin/settings/security' },
|
|
340
|
+
{ label: 'API Keys' },
|
|
341
|
+
]}
|
|
342
|
+
/>
|
|
343
|
+
</div>
|
|
344
|
+
</Stack>
|
|
345
|
+
),
|
|
346
|
+
parameters: {
|
|
347
|
+
docs: {
|
|
348
|
+
description: {
|
|
349
|
+
story: 'Admin dashboard breadcrumb examples.',
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
export const DocumentationBreadcrumbs: Story = {
|
|
356
|
+
render: () => (
|
|
357
|
+
<Stack gap="lg" align="flex-start">
|
|
358
|
+
<div>
|
|
359
|
+
<Text size="sm" fw={500} mb="xs">API Documentation:</Text>
|
|
360
|
+
<Breadcrumb
|
|
361
|
+
separator="›"
|
|
362
|
+
items={[
|
|
363
|
+
{ label: 'Docs', href: '/docs' },
|
|
364
|
+
{ label: 'API Reference', href: '/docs/api' },
|
|
365
|
+
{ label: 'Authentication', href: '/docs/api/auth' },
|
|
366
|
+
{ label: 'OAuth 2.0' },
|
|
367
|
+
]}
|
|
368
|
+
/>
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
<div>
|
|
372
|
+
<Text size="sm" fw={500} mb="xs">Component Library:</Text>
|
|
373
|
+
<Breadcrumb
|
|
374
|
+
separator="›"
|
|
375
|
+
items={[
|
|
376
|
+
{ label: 'Documentation', href: '/docs' },
|
|
377
|
+
{ label: 'Components', href: '/docs/components' },
|
|
378
|
+
{ label: 'Navigation', href: '/docs/components/navigation' },
|
|
379
|
+
{ label: 'Breadcrumb' },
|
|
380
|
+
]}
|
|
381
|
+
/>
|
|
382
|
+
</div>
|
|
383
|
+
|
|
384
|
+
<div>
|
|
385
|
+
<Text size="sm" fw={500} mb="xs">Tutorial Series:</Text>
|
|
386
|
+
<Breadcrumb
|
|
387
|
+
separator="›"
|
|
388
|
+
items={[
|
|
389
|
+
{ label: 'Learn', href: '/learn' },
|
|
390
|
+
{ label: 'React Basics', href: '/learn/react' },
|
|
391
|
+
{ label: 'Components', href: '/learn/react/components' },
|
|
392
|
+
{ label: 'Props and State' },
|
|
393
|
+
]}
|
|
394
|
+
/>
|
|
395
|
+
</div>
|
|
396
|
+
</Stack>
|
|
397
|
+
),
|
|
398
|
+
parameters: {
|
|
399
|
+
docs: {
|
|
400
|
+
description: {
|
|
401
|
+
story: 'Documentation and learning platform breadcrumb examples.',
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
export const UseCases: Story = {
|
|
408
|
+
render: () => (
|
|
409
|
+
<Stack gap="xl" w={700}>
|
|
410
|
+
<Title order={3} size="md" fw={500} mb="xs">Common Use Cases</Title>
|
|
411
|
+
|
|
412
|
+
<div>
|
|
413
|
+
<Text size="sm" fw={500} mb="sm">1. File System Navigation:</Text>
|
|
414
|
+
<Breadcrumb
|
|
415
|
+
separator="/"
|
|
416
|
+
items={[
|
|
417
|
+
{ label: 'Documents', href: '/documents' },
|
|
418
|
+
{ label: 'Projects', href: '/documents/projects' },
|
|
419
|
+
{ label: 'Website', href: '/documents/projects/website' },
|
|
420
|
+
{ label: 'src', href: '/documents/projects/website/src' },
|
|
421
|
+
{ label: 'components' },
|
|
422
|
+
]}
|
|
423
|
+
/>
|
|
424
|
+
</div>
|
|
425
|
+
|
|
426
|
+
<div>
|
|
427
|
+
<Text size="sm" fw={500} mb="sm">2. Multi-step Process:</Text>
|
|
428
|
+
<Breadcrumb
|
|
429
|
+
items={[
|
|
430
|
+
{ label: 'Account Setup', href: '/signup' },
|
|
431
|
+
{ label: 'Personal Info', href: '/signup/personal' },
|
|
432
|
+
{ label: 'Verification', href: '/signup/verify' },
|
|
433
|
+
{ label: 'Complete' },
|
|
434
|
+
]}
|
|
435
|
+
/>
|
|
436
|
+
</div>
|
|
437
|
+
|
|
438
|
+
<div>
|
|
439
|
+
<Text size="sm" fw={500} mb="sm">3. Content Hierarchy:</Text>
|
|
440
|
+
<Breadcrumb
|
|
441
|
+
items={[
|
|
442
|
+
{ label: 'Knowledge Base', href: '/kb' },
|
|
443
|
+
{ label: 'Getting Started', href: '/kb/getting-started' },
|
|
444
|
+
{ label: 'Installation Guide' },
|
|
445
|
+
]}
|
|
446
|
+
/>
|
|
447
|
+
</div>
|
|
448
|
+
|
|
449
|
+
<div>
|
|
450
|
+
<Text size="sm" fw={500} mb="sm">4. Back Navigation:</Text>
|
|
451
|
+
<Inline gap="lg">
|
|
452
|
+
<BackBreadcrumb
|
|
453
|
+
label="Back to Search Results"
|
|
454
|
+
onClick={() => console.log('Back to search')}
|
|
455
|
+
/>
|
|
456
|
+
<BackBreadcrumb
|
|
457
|
+
label="Back"
|
|
458
|
+
onClick={() => console.log('Go back')}
|
|
459
|
+
/>
|
|
460
|
+
</Inline>
|
|
461
|
+
</div>
|
|
462
|
+
</Stack>
|
|
463
|
+
),
|
|
464
|
+
parameters: {
|
|
465
|
+
docs: {
|
|
466
|
+
description: {
|
|
467
|
+
story: 'Real-world examples of Breadcrumb usage in different application contexts.',
|
|
468
|
+
},
|
|
469
|
+
},
|
|
470
|
+
},
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
export const Interactive: Story = {
|
|
474
|
+
args: {
|
|
475
|
+
items: [
|
|
476
|
+
{ label: 'Home', href: '/' },
|
|
477
|
+
{ label: 'Products', href: '/products' },
|
|
478
|
+
{ label: 'Current Page' },
|
|
479
|
+
],
|
|
480
|
+
separator: '/',
|
|
481
|
+
},
|
|
482
|
+
parameters: {
|
|
483
|
+
docs: {
|
|
484
|
+
description: {
|
|
485
|
+
story: 'Use the controls below to interact with the Breadcrumb and see different combinations.',
|
|
486
|
+
},
|
|
487
|
+
},
|
|
488
|
+
},
|
|
489
|
+
};
|