@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,514 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Stack } from '@mantine/core';
3
+ import { Inline, Kbd, Title, Text } from '@appdirect/design-system';
4
+
5
+ const meta: Meta<typeof Kbd> = {
6
+ title: 'Design System/Typography/Kbd',
7
+ component: Kbd,
8
+ parameters: {
9
+ layout: 'centered',
10
+ docs: {
11
+ description: {
12
+ component: 'Kbd component for displaying keyboard shortcuts and key combinations with consistent styling.',
13
+ },
14
+ },
15
+ },
16
+ tags: ['autodocs', 'code-connected'],
17
+ argTypes: {
18
+ size: {
19
+ control: 'select',
20
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
21
+ description: 'Size of the keyboard key',
22
+ },
23
+ children: {
24
+ control: 'text',
25
+ description: 'Keyboard key or combination to display',
26
+ },
27
+ },
28
+ };
29
+
30
+ export default meta;
31
+ type Story = StoryObj<typeof meta>;
32
+
33
+ export const Default: Story = {
34
+ args: {
35
+ children: '⌘K',
36
+ },
37
+ };
38
+
39
+ export const Sizes: Story = {
40
+ render: () => (
41
+ <Stack gap="md" align="flex-start">
42
+ <div>
43
+ <Text size="sm" fw={500} mb="xs">Extra Small (xs):</Text>
44
+ <Kbd size="xs">Esc</Kbd>
45
+ </div>
46
+
47
+ <div>
48
+ <Text size="sm" fw={500} mb="xs">Small (sm) - Default:</Text>
49
+ <Kbd size="sm">⌘K</Kbd>
50
+ </div>
51
+
52
+ <div>
53
+ <Text size="sm" fw={500} mb="xs">Medium (md):</Text>
54
+ <Kbd size="md">Ctrl+C</Kbd>
55
+ </div>
56
+
57
+ <div>
58
+ <Text size="sm" fw={500} mb="xs">Large (lg):</Text>
59
+ <Kbd size="lg">Enter</Kbd>
60
+ </div>
61
+
62
+ <div>
63
+ <Text size="sm" fw={500} mb="xs">Extra Large (xl):</Text>
64
+ <Kbd size="xl">Space</Kbd>
65
+ </div>
66
+ </Stack>
67
+ ),
68
+ parameters: {
69
+ docs: {
70
+ description: {
71
+ story: 'Different sizes for the Kbd component.',
72
+ },
73
+ },
74
+ },
75
+ };
76
+
77
+ export const CommonKeys: Story = {
78
+ render: () => (
79
+ <Stack gap="md" align="flex-start">
80
+ <div>
81
+ <Text size="sm" fw={500} mb="xs">Single Keys:</Text>
82
+ <Inline gap="sm">
83
+ <Kbd>Esc</Kbd>
84
+ <Kbd>Tab</Kbd>
85
+ <Kbd>Enter</Kbd>
86
+ <Kbd>Space</Kbd>
87
+ <Kbd>Delete</Kbd>
88
+ <Kbd>Backspace</Kbd>
89
+ </Inline>
90
+ </div>
91
+
92
+ <div>
93
+ <Text size="sm" fw={500} mb="xs">Arrow Keys:</Text>
94
+ <Inline gap="sm">
95
+ <Kbd>↑</Kbd>
96
+ <Kbd>↓</Kbd>
97
+ <Kbd>←</Kbd>
98
+ <Kbd>→</Kbd>
99
+ </Inline>
100
+ </div>
101
+
102
+ <div>
103
+ <Text size="sm" fw={500} mb="xs">Function Keys:</Text>
104
+ <Inline gap="sm">
105
+ <Kbd>F1</Kbd>
106
+ <Kbd>F2</Kbd>
107
+ <Kbd>F5</Kbd>
108
+ <Kbd>F12</Kbd>
109
+ </Inline>
110
+ </div>
111
+
112
+ <div>
113
+ <Text size="sm" fw={500} mb="xs">Modifier Keys:</Text>
114
+ <Inline gap="sm">
115
+ <Kbd>⌘</Kbd>
116
+ <Kbd>Ctrl</Kbd>
117
+ <Kbd>Alt</Kbd>
118
+ <Kbd>Shift</Kbd>
119
+ <Kbd>⌥</Kbd>
120
+ <Kbd>⇧</Kbd>
121
+ </Inline>
122
+ </div>
123
+ </Stack>
124
+ ),
125
+ parameters: {
126
+ docs: {
127
+ description: {
128
+ story: 'Common keyboard keys and modifiers.',
129
+ },
130
+ },
131
+ },
132
+ };
133
+
134
+ export const KeyCombinations: Story = {
135
+ render: () => (
136
+ <Stack gap="md" align="flex-start">
137
+ <div>
138
+ <Text size="sm" fw={500} mb="xs">Mac Shortcuts:</Text>
139
+ <Inline gap="sm">
140
+ <Kbd>⌘C</Kbd>
141
+ <Kbd>⌘V</Kbd>
142
+ <Kbd>⌘Z</Kbd>
143
+ <Kbd>⌘⇧Z</Kbd>
144
+ <Kbd>⌘K</Kbd>
145
+ <Kbd>⌘⇧P</Kbd>
146
+ </Inline>
147
+ </div>
148
+
149
+ <div>
150
+ <Text size="sm" fw={500} mb="xs">Windows/Linux Shortcuts:</Text>
151
+ <Inline gap="sm">
152
+ <Kbd>Ctrl+C</Kbd>
153
+ <Kbd>Ctrl+V</Kbd>
154
+ <Kbd>Ctrl+Z</Kbd>
155
+ <Kbd>Ctrl+Shift+Z</Kbd>
156
+ <Kbd>Ctrl+K</Kbd>
157
+ <Kbd>Ctrl+Shift+P</Kbd>
158
+ </Inline>
159
+ </div>
160
+
161
+ <div>
162
+ <Text size="sm" fw={500} mb="xs">Editor Shortcuts:</Text>
163
+ <Inline gap="sm">
164
+ <Kbd>Ctrl+/</Kbd>
165
+ <Kbd>Ctrl+D</Kbd>
166
+ <Kbd>Ctrl+F</Kbd>
167
+ <Kbd>Ctrl+H</Kbd>
168
+ <Kbd>Alt+↑</Kbd>
169
+ <Kbd>Alt+↓</Kbd>
170
+ </Inline>
171
+ </div>
172
+
173
+ <div>
174
+ <Text size="sm" fw={500} mb="xs">Browser Shortcuts:</Text>
175
+ <Inline gap="sm">
176
+ <Kbd>Ctrl+T</Kbd>
177
+ <Kbd>Ctrl+W</Kbd>
178
+ <Kbd>Ctrl+R</Kbd>
179
+ <Kbd>Ctrl+Shift+T</Kbd>
180
+ <Kbd>F5</Kbd>
181
+ <Kbd>F12</Kbd>
182
+ </Inline>
183
+ </div>
184
+ </Stack>
185
+ ),
186
+ parameters: {
187
+ docs: {
188
+ description: {
189
+ story: 'Common keyboard shortcuts and key combinations.',
190
+ },
191
+ },
192
+ },
193
+ };
194
+
195
+ export const InMenuItems: Story = {
196
+ render: () => (
197
+ <Stack gap="md" w={300}>
198
+ <div style={{
199
+ border: '1px solid var(--mantine-color-gray-3)',
200
+ borderRadius: '6px',
201
+ overflow: 'hidden'
202
+ }}>
203
+ <div style={{
204
+ padding: '8px 12px',
205
+ display: 'flex',
206
+ justifyContent: 'space-between',
207
+ alignItems: 'center',
208
+ borderBottom: '1px solid var(--mantine-color-gray-2)',
209
+ cursor: 'pointer'
210
+ }}>
211
+ <Inline gap="sm">
212
+ <span>🔍</span>
213
+ <Text size="sm">Search</Text>
214
+ </Inline>
215
+ <Kbd size="xs">⌘K</Kbd>
216
+ </div>
217
+
218
+ <div style={{
219
+ padding: '8px 12px',
220
+ display: 'flex',
221
+ justifyContent: 'space-between',
222
+ alignItems: 'center',
223
+ borderBottom: '1px solid var(--mantine-color-gray-2)',
224
+ cursor: 'pointer'
225
+ }}>
226
+ <Inline gap="sm">
227
+ <span>📋</span>
228
+ <Text size="sm">Command Palette</Text>
229
+ </Inline>
230
+ <Kbd size="xs">⌘⇧P</Kbd>
231
+ </div>
232
+
233
+ <div style={{
234
+ padding: '8px 12px',
235
+ display: 'flex',
236
+ justifyContent: 'space-between',
237
+ alignItems: 'center',
238
+ borderBottom: '1px solid var(--mantine-color-gray-2)',
239
+ cursor: 'pointer'
240
+ }}>
241
+ <Inline gap="sm">
242
+ <span>📁</span>
243
+ <Text size="sm">Open File</Text>
244
+ </Inline>
245
+ <Kbd size="xs">⌘O</Kbd>
246
+ </div>
247
+
248
+ <div style={{
249
+ padding: '8px 12px',
250
+ display: 'flex',
251
+ justifyContent: 'space-between',
252
+ alignItems: 'center',
253
+ cursor: 'pointer'
254
+ }}>
255
+ <Inline gap="sm">
256
+ <span>💾</span>
257
+ <Text size="sm">Save</Text>
258
+ </Inline>
259
+ <Kbd size="xs">⌘S</Kbd>
260
+ </div>
261
+ </div>
262
+ </Stack>
263
+ ),
264
+ parameters: {
265
+ docs: {
266
+ description: {
267
+ story: 'Kbd component used in menu items to show keyboard shortcuts.',
268
+ },
269
+ },
270
+ },
271
+ };
272
+
273
+ export const InInstructions: Story = {
274
+ render: () => (
275
+ <Stack gap="md" w={500}>
276
+ <Text>
277
+ Press <Kbd>⌘K</Kbd> to open the search dialog, or use <Kbd>Ctrl+K</Kbd> on Windows/Linux.
278
+ </Text>
279
+
280
+ <Text>
281
+ Use <Kbd>Tab</Kbd> to navigate between form fields and <Kbd>Enter</Kbd> to submit.
282
+ </Text>
283
+
284
+ <Text>
285
+ Copy text with <Kbd>⌘C</Kbd> and paste with <Kbd>⌘V</Kbd>. Use <Kbd>⌘Z</Kbd> to undo changes.
286
+ </Text>
287
+
288
+ <Text>
289
+ Navigate through your browser history with <Kbd>⌘←</Kbd> and <Kbd>⌘→</Kbd>.
290
+ </Text>
291
+
292
+ <Text>
293
+ Press <Kbd>Esc</Kbd> to close dialogs or cancel operations.
294
+ </Text>
295
+ </Stack>
296
+ ),
297
+ parameters: {
298
+ docs: {
299
+ description: {
300
+ story: 'Kbd component used inline within instructional text.',
301
+ },
302
+ },
303
+ },
304
+ };
305
+
306
+ export const HelpDocumentation: Story = {
307
+ render: () => (
308
+ <Stack gap="lg" w={600}>
309
+ <div>
310
+ <Title order={4} size="sm" fw={500} mb="sm">Navigation</Title>
311
+ <Stack gap="xs">
312
+ <Inline gap="md" justify="space-between">
313
+ <Text size="sm">Go to dashboard</Text>
314
+ <Kbd size="xs">G D</Kbd>
315
+ </Inline>
316
+ <Inline gap="md" justify="space-between">
317
+ <Text size="sm">Go to settings</Text>
318
+ <Kbd size="xs">G S</Kbd>
319
+ </Inline>
320
+ <Inline gap="md" justify="space-between">
321
+ <Text size="sm">Go to profile</Text>
322
+ <Kbd size="xs">G P</Kbd>
323
+ </Inline>
324
+ </Stack>
325
+ </div>
326
+
327
+ <div>
328
+ <Title order={4} size="sm" fw={500} mb="sm">Actions</Title>
329
+ <Stack gap="xs">
330
+ <Inline gap="md" justify="space-between">
331
+ <Text size="sm">Create new item</Text>
332
+ <Kbd size="xs">C</Kbd>
333
+ </Inline>
334
+ <Inline gap="md" justify="space-between">
335
+ <Text size="sm">Edit selected item</Text>
336
+ <Kbd size="xs">E</Kbd>
337
+ </Inline>
338
+ <Inline gap="md" justify="space-between">
339
+ <Text size="sm">Delete selected item</Text>
340
+ <Kbd size="xs">Del</Kbd>
341
+ </Inline>
342
+ </Stack>
343
+ </div>
344
+
345
+ <div>
346
+ <Title order={4} size="sm" fw={500} mb="sm">Search & Filter</Title>
347
+ <Stack gap="xs">
348
+ <Inline gap="md" justify="space-between">
349
+ <Text size="sm">Global search</Text>
350
+ <Kbd size="xs">⌘K</Kbd>
351
+ </Inline>
352
+ <Inline gap="md" justify="space-between">
353
+ <Text size="sm">Filter current view</Text>
354
+ <Kbd size="xs">F</Kbd>
355
+ </Inline>
356
+ <Inline gap="md" justify="space-between">
357
+ <Text size="sm">Clear filters</Text>
358
+ <Kbd size="xs">⌘⌫</Kbd>
359
+ </Inline>
360
+ </Stack>
361
+ </div>
362
+ </Stack>
363
+ ),
364
+ parameters: {
365
+ docs: {
366
+ description: {
367
+ story: 'Kbd component used in help documentation and keyboard shortcut guides.',
368
+ },
369
+ },
370
+ },
371
+ };
372
+
373
+ export const GameControls: Story = {
374
+ render: () => (
375
+ <Stack gap="lg" w={500}>
376
+ <div>
377
+ <Title order={4} size="sm" fw={500} mb="sm">Movement</Title>
378
+ <Inline gap="sm" justify="center">
379
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: '4px', width: 'fit-content' }}>
380
+ <div></div>
381
+ <Kbd>W</Kbd>
382
+ <div></div>
383
+ <Kbd>A</Kbd>
384
+ <Kbd>S</Kbd>
385
+ <Kbd>D</Kbd>
386
+ </div>
387
+ </Inline>
388
+ <Text size="sm" ta="center" c="dimmed" mt="xs">
389
+ Use WASD keys to move your character
390
+ </Text>
391
+ </div>
392
+
393
+ <div>
394
+ <Title order={4} size="sm" fw={500} mb="sm">Actions</Title>
395
+ <Inline gap="md" justify="space-between">
396
+ <Text size="sm">Jump</Text>
397
+ <Kbd>Space</Kbd>
398
+ </Inline>
399
+ <Inline gap="md" justify="space-between">
400
+ <Text size="sm">Run</Text>
401
+ <Kbd>Shift</Kbd>
402
+ </Inline>
403
+ <Inline gap="md" justify="space-between">
404
+ <Text size="sm">Interact</Text>
405
+ <Kbd>E</Kbd>
406
+ </Inline>
407
+ <Inline gap="md" justify="space-between">
408
+ <Text size="sm">Inventory</Text>
409
+ <Kbd>I</Kbd>
410
+ </Inline>
411
+ </div>
412
+
413
+ <div>
414
+ <Title order={4} size="sm" fw={500} mb="sm">Combat</Title>
415
+ <Inline gap="md" justify="space-between">
416
+ <Text size="sm">Attack</Text>
417
+ <Kbd>Left Click</Kbd>
418
+ </Inline>
419
+ <Inline gap="md" justify="space-between">
420
+ <Text size="sm">Block</Text>
421
+ <Kbd>Right Click</Kbd>
422
+ </Inline>
423
+ <Inline gap="md" justify="space-between">
424
+ <Text size="sm">Special ability</Text>
425
+ <Kbd>Q</Kbd>
426
+ </Inline>
427
+ </div>
428
+ </Stack>
429
+ ),
430
+ parameters: {
431
+ docs: {
432
+ description: {
433
+ story: 'Kbd component used for game controls and interactive applications.',
434
+ },
435
+ },
436
+ },
437
+ };
438
+
439
+ export const UseCases: Story = {
440
+ render: () => (
441
+ <Stack gap="xl" w={700}>
442
+ <Title order={3} size="md" fw={500} mb="xs">Common Use Cases</Title>
443
+
444
+ <div>
445
+ <Text size="sm" fw={500} mb="sm">1. Application Shortcuts:</Text>
446
+ <Stack gap="sm">
447
+ <Text>
448
+ Open quick search with <Kbd>⌘K</Kbd> or access the command palette using <Kbd>⌘⇧P</Kbd>.
449
+ </Text>
450
+ <Text>
451
+ Save your work with <Kbd>⌘S</Kbd> and create new documents with <Kbd>⌘N</Kbd>.
452
+ </Text>
453
+ </Stack>
454
+ </div>
455
+
456
+ <div>
457
+ <Text size="sm" fw={500} mb="sm">2. Form Navigation:</Text>
458
+ <Stack gap="sm">
459
+ <Text>
460
+ Use <Kbd>Tab</Kbd> to move to the next field and <Kbd>Shift+Tab</Kbd> to go back.
461
+ </Text>
462
+ <Text>
463
+ Press <Kbd>Enter</Kbd> to submit the form or <Kbd>Esc</Kbd> to cancel.
464
+ </Text>
465
+ </Stack>
466
+ </div>
467
+
468
+ <div>
469
+ <Text size="sm" fw={500} mb="sm">3. Text Editing:</Text>
470
+ <Stack gap="sm">
471
+ <Text>
472
+ Select all text with <Kbd>⌘A</Kbd> and find text using <Kbd>⌘F</Kbd>.
473
+ </Text>
474
+ <Text>
475
+ Undo changes with <Kbd>⌘Z</Kbd> and redo with <Kbd>⌘⇧Z</Kbd>.
476
+ </Text>
477
+ </Stack>
478
+ </div>
479
+
480
+ <div>
481
+ <Text size="sm" fw={500} mb="sm">4. Browser Navigation:</Text>
482
+ <Stack gap="sm">
483
+ <Text>
484
+ Open a new tab with <Kbd>⌘T</Kbd> and close it with <Kbd>⌘W</Kbd>.
485
+ </Text>
486
+ <Text>
487
+ Refresh the page using <Kbd>⌘R</Kbd> or open developer tools with <Kbd>F12</Kbd>.
488
+ </Text>
489
+ </Stack>
490
+ </div>
491
+ </Stack>
492
+ ),
493
+ parameters: {
494
+ docs: {
495
+ description: {
496
+ story: 'Real-world examples of Kbd component usage in different contexts.',
497
+ },
498
+ },
499
+ },
500
+ };
501
+
502
+ export const Interactive: Story = {
503
+ args: {
504
+ children: '⌘K',
505
+ size: 'sm',
506
+ },
507
+ parameters: {
508
+ docs: {
509
+ description: {
510
+ story: 'Use the controls below to interact with the Kbd component and see different combinations.',
511
+ },
512
+ },
513
+ },
514
+ };
@@ -0,0 +1,117 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Stack } from '@mantine/core';
3
+ import { Text } from '@appdirect/design-system';
4
+
5
+ const meta: Meta<typeof Text> = {
6
+ title: 'Design System/Typography/Text',
7
+ component: Text,
8
+ parameters: {
9
+ layout: 'centered',
10
+ docs: {
11
+ description: {
12
+ component: 'Text component with t-shirt sizing and ability to override with custom font sizes.',
13
+ },
14
+ },
15
+ },
16
+ tags: ['autodocs', 'code-connected'],
17
+ argTypes: {
18
+ size: {
19
+ control: 'select',
20
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
21
+ description: 'T-shirt size for the text',
22
+ },
23
+ children: {
24
+ control: 'text',
25
+ description: 'Text content',
26
+ },
27
+ fw: {
28
+ control: 'select',
29
+ options: [400, 500, 600, 700],
30
+ description: 'Font weight',
31
+ },
32
+ fs: {
33
+ control: 'select',
34
+ options: ['normal', 'italic'],
35
+ description: 'Font style',
36
+ },
37
+ td: {
38
+ control: 'select',
39
+ options: ['none', 'underline', 'line-through'],
40
+ description: 'Text decoration',
41
+ },
42
+ c: {
43
+ control: 'text',
44
+ description: 'Text color',
45
+ },
46
+ },
47
+ };
48
+
49
+ export default meta;
50
+ type Story = StoryObj<typeof meta>;
51
+
52
+ export const Default: Story = {
53
+ args: {
54
+ children: 'This is default text',
55
+ },
56
+ };
57
+
58
+ export const Sizes: Story = {
59
+ render: () => (
60
+ <Stack gap="xs">
61
+ <Text size="xs">Extra small text</Text>
62
+ <Text size="sm">Small text</Text>
63
+ <Text size="md">Medium text (default)</Text>
64
+ <Text size="lg">Large text</Text>
65
+ <Text size="xl">Extra large text</Text>
66
+ </Stack>
67
+ ),
68
+ };
69
+
70
+ export const FontWeights: Story = {
71
+ render: () => (
72
+ <Stack gap="xs">
73
+ <Text fw={400}>Normal weight (400)</Text>
74
+ <Text fw={500}>Medium weight (500)</Text>
75
+ <Text fw={600}>Semibold weight (600)</Text>
76
+ <Text fw={700}>Bold weight (700)</Text>
77
+ </Stack>
78
+ ),
79
+ };
80
+
81
+ export const Colors: Story = {
82
+ render: () => (
83
+ <Stack gap="xs">
84
+ <Text c="blue">Blue text</Text>
85
+ <Text c="red">Red text</Text>
86
+ <Text c="green">Green text</Text>
87
+ <Text c="dimmed">Dimmed text</Text>
88
+ </Stack>
89
+ ),
90
+ };
91
+
92
+ export const Styles: Story = {
93
+ render: () => (
94
+ <Stack gap="xs">
95
+ <Text>Normal text</Text>
96
+ <Text fs="italic">Italic text</Text>
97
+ <Text td="underline">Underlined text</Text>
98
+ <Text td="line-through">Strikethrough text</Text>
99
+ <Text c="blue">Blue colored text</Text>
100
+ <Text c="dimmed">Dimmed text</Text>
101
+ </Stack>
102
+ ),
103
+ };
104
+
105
+ export const CustomSize: Story = {
106
+ args: {
107
+ children: 'Custom font size using fz prop',
108
+ fz: '24px',
109
+ },
110
+ parameters: {
111
+ docs: {
112
+ description: {
113
+ story: 'You can override the t-shirt size with a custom font size using the `fz` prop.',
114
+ },
115
+ },
116
+ },
117
+ };