@boostdev/design-system-components 0.1.12 → 0.1.14

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 (121) hide show
  1. package/AGENTS.md +14 -2
  2. package/README.md +35 -5
  3. package/dist/client.cjs +54 -50
  4. package/dist/client.css +498 -509
  5. package/dist/client.d.cts +5 -3
  6. package/dist/client.d.ts +5 -3
  7. package/dist/client.js +54 -50
  8. package/dist/index.cjs +54 -50
  9. package/dist/index.css +498 -509
  10. package/dist/index.d.cts +5 -3
  11. package/dist/index.d.ts +5 -3
  12. package/dist/index.js +54 -50
  13. package/package.json +6 -2
  14. package/src/components/interaction/Button/Button.mdx +73 -0
  15. package/src/components/interaction/Button/Button.module.css +12 -20
  16. package/src/components/interaction/Button/Button.stories.tsx +0 -1
  17. package/src/components/interaction/Command/Command.mdx +28 -0
  18. package/src/components/interaction/Command/Command.module.css +2 -1
  19. package/src/components/interaction/Command/Command.stories.tsx +3 -3
  20. package/src/components/interaction/Dialog/Dialog.mdx +57 -0
  21. package/src/components/interaction/Dialog/Dialog.module.css +6 -0
  22. package/src/components/interaction/Dialog/Dialog.stories.tsx +0 -1
  23. package/src/components/interaction/Drawer/Drawer.mdx +35 -0
  24. package/src/components/interaction/Drawer/Drawer.module.css +3 -9
  25. package/src/components/interaction/Drawer/Drawer.stories.tsx +3 -3
  26. package/src/components/interaction/Drawer/Drawer.tsx +5 -3
  27. package/src/components/interaction/DropdownMenu/DropdownMenu.mdx +40 -0
  28. package/src/components/interaction/DropdownMenu/DropdownMenu.stories.tsx +5 -5
  29. package/src/components/interaction/Popover/Popover.mdx +34 -0
  30. package/src/components/interaction/Popover/Popover.stories.tsx +3 -3
  31. package/src/components/interaction/Rating/Rating.mdx +38 -0
  32. package/src/components/interaction/Rating/Rating.stories.tsx +0 -1
  33. package/src/components/interaction/Toast/Toast.mdx +78 -0
  34. package/src/components/interaction/Toast/Toast.module.css +21 -7
  35. package/src/components/interaction/Toast/Toast.stories.tsx +0 -1
  36. package/src/components/interaction/form/Checkbox/Checkbox.mdx +57 -0
  37. package/src/components/interaction/form/Checkbox/Checkbox.stories.tsx +0 -1
  38. package/src/components/interaction/form/Combobox/Combobox.mdx +37 -0
  39. package/src/components/interaction/form/Combobox/Combobox.stories.tsx +0 -1
  40. package/src/components/interaction/form/FileInput/FileInput.mdx +38 -0
  41. package/src/components/interaction/form/FileInput/FileInput.stories.tsx +0 -1
  42. package/src/components/interaction/form/FormInput/FormInput.mdx +54 -0
  43. package/src/components/interaction/form/FormInput/FormInput.stories.tsx +0 -1
  44. package/src/components/interaction/form/NumberInput/NumberInput.mdx +38 -0
  45. package/src/components/interaction/form/NumberInput/NumberInput.stories.tsx +0 -1
  46. package/src/components/interaction/form/Radio/Radio.mdx +60 -0
  47. package/src/components/interaction/form/Radio/Radio.module.css +24 -11
  48. package/src/components/interaction/form/Radio/Radio.stories.tsx +5 -5
  49. package/src/components/interaction/form/Radio/Radio.tsx +6 -2
  50. package/src/components/interaction/form/Select/Select.mdx +58 -0
  51. package/src/components/interaction/form/Select/Select.stories.tsx +0 -1
  52. package/src/components/interaction/form/Slider/Slider.mdx +58 -0
  53. package/src/components/interaction/form/Slider/Slider.stories.tsx +0 -1
  54. package/src/components/interaction/form/Switch/Switch.mdx +61 -0
  55. package/src/components/interaction/form/Switch/Switch.module.css +6 -10
  56. package/src/components/interaction/form/Switch/Switch.stories.tsx +0 -1
  57. package/src/components/interaction/form/Textarea/Textarea.mdx +41 -0
  58. package/src/components/interaction/form/Textarea/Textarea.stories.tsx +0 -1
  59. package/src/components/layout/ButtonGroup/ButtonGroup.mdx +47 -0
  60. package/src/components/layout/ButtonGroup/ButtonGroup.module.css +10 -10
  61. package/src/components/layout/ButtonGroup/ButtonGroup.stories.tsx +1 -2
  62. package/src/components/layout/Card/Card.mdx +58 -0
  63. package/src/components/layout/Card/Card.stories.tsx +0 -1
  64. package/src/components/layout/IconWrapper/IconWrapper.mdx +39 -0
  65. package/src/components/layout/IconWrapper/IconWrapper.stories.tsx +0 -1
  66. package/src/components/layout/SectionHeader/SectionHeader.mdx +38 -0
  67. package/src/components/layout/SectionHeader/SectionHeader.stories.tsx +0 -1
  68. package/src/components/ui/Accordion/Accordion.mdx +40 -0
  69. package/src/components/ui/Accordion/Accordion.stories.tsx +0 -1
  70. package/src/components/ui/Alert/Alert.mdx +63 -0
  71. package/src/components/ui/Alert/Alert.module.css +3 -7
  72. package/src/components/ui/Alert/Alert.stories.tsx +0 -1
  73. package/src/components/ui/Avatar/Avatar.mdx +53 -0
  74. package/src/components/ui/Avatar/Avatar.module.css +4 -8
  75. package/src/components/ui/Avatar/Avatar.stories.tsx +0 -1
  76. package/src/components/ui/Badge/Badge.mdx +62 -0
  77. package/src/components/ui/Badge/Badge.module.css +4 -10
  78. package/src/components/ui/Badge/Badge.stories.tsx +0 -1
  79. package/src/components/ui/Breadcrumb/Breadcrumb.mdx +36 -0
  80. package/src/components/ui/Breadcrumb/Breadcrumb.stories.tsx +0 -1
  81. package/src/components/ui/Calendar/Calendar.mdx +34 -0
  82. package/src/components/ui/Calendar/Calendar.stories.tsx +0 -1
  83. package/src/components/ui/Carousel/Carousel.mdx +31 -0
  84. package/src/components/ui/Carousel/Carousel.stories.tsx +0 -1
  85. package/src/components/ui/DescriptionList/DescriptionList.mdx +28 -0
  86. package/src/components/ui/DescriptionList/DescriptionList.stories.tsx +0 -1
  87. package/src/components/ui/Link/Link.mdx +44 -0
  88. package/src/components/ui/Link/Link.module.css +2 -5
  89. package/src/components/ui/Link/Link.stories.tsx +0 -1
  90. package/src/components/ui/Loading/Loading.mdx +52 -0
  91. package/src/components/ui/Loading/Loading.stories.tsx +0 -1
  92. package/src/components/ui/NotificationBanner/NotificationBanner.mdx +45 -0
  93. package/src/components/ui/NotificationBanner/NotificationBanner.module.css +3 -7
  94. package/src/components/ui/NotificationBanner/NotificationBanner.stories.tsx +2 -2
  95. package/src/components/ui/Pagination/Pagination.mdx +39 -0
  96. package/src/components/ui/Pagination/Pagination.module.css +3 -7
  97. package/src/components/ui/Pagination/Pagination.stories.tsx +0 -1
  98. package/src/components/ui/Progress/Progress.mdx +52 -0
  99. package/src/components/ui/Progress/Progress.module.css +1 -3
  100. package/src/components/ui/Progress/Progress.stories.tsx +0 -1
  101. package/src/components/ui/ProgressCircle/ProgressCircle.mdx +46 -0
  102. package/src/components/ui/ProgressCircle/ProgressCircle.stories.tsx +0 -1
  103. package/src/components/ui/Separator/Separator.mdx +29 -0
  104. package/src/components/ui/Separator/Separator.stories.tsx +0 -1
  105. package/src/components/ui/Skeleton/Skeleton.mdx +36 -0
  106. package/src/components/ui/Skeleton/Skeleton.stories.tsx +0 -1
  107. package/src/components/ui/SkipLink/SkipLink.mdx +34 -0
  108. package/src/components/ui/SkipLink/SkipLink.stories.tsx +0 -1
  109. package/src/components/ui/Table/Table.mdx +38 -0
  110. package/src/components/ui/Table/Table.stories.tsx +0 -1
  111. package/src/components/ui/Tabs/Tabs.mdx +40 -0
  112. package/src/components/ui/Tabs/Tabs.module.css +2 -5
  113. package/src/components/ui/Tabs/Tabs.stories.tsx +0 -1
  114. package/src/components/ui/Tooltip/Tooltip.mdx +43 -0
  115. package/src/components/ui/Tooltip/Tooltip.module.css +2 -5
  116. package/src/components/ui/Tooltip/Tooltip.stories.tsx +6 -6
  117. package/src/components/ui/Typography/Typography.mdx +41 -0
  118. package/src/components/ui/Typography/Typography.stories.tsx +0 -1
  119. package/src/static/logo.svg +8 -0
  120. package/src/stories/Introduction.css +17 -0
  121. package/src/stories/Introduction.mdx +129 -0
@@ -0,0 +1,58 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Slider.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Slider
7
+
8
+ Range input for selecting a numeric value within a bounded range.
9
+
10
+ ## When to use
11
+ - Volume, brightness, price range — any continuously variable numeric value
12
+ - When approximate values are acceptable and a visual range is helpful
13
+
14
+ ## When not to use
15
+ - Precise numeric entry — use `NumberInput` instead
16
+
17
+ ## Examples
18
+
19
+ ### Default
20
+ <Canvas of={Stories.Default} />
21
+
22
+ ### With value display
23
+ <Canvas of={Stories.WithValue} />
24
+
25
+ ### Custom range
26
+ <Canvas of={Stories.CustomRange} />
27
+
28
+ ### With hint
29
+ <Canvas of={Stories.WithHint} />
30
+
31
+ ### With error
32
+ <Canvas of={Stories.WithError} />
33
+
34
+ ### Disabled
35
+ <Canvas of={Stories.Disabled} />
36
+
37
+ ## Props
38
+
39
+ <ArgTypes of={Stories} />
40
+
41
+ ## CSS variables
42
+
43
+
44
+ <table>
45
+ <thead>
46
+ <tr><th>Variable</th><th>Default</th><th>Description</th></tr>
47
+ </thead>
48
+ <tbody>
49
+ <tr><td>`--slider_color-active`</td><td>`var(--color_active)`</td><td>Filled track and thumb colour</td></tr>
50
+ </tbody>
51
+ </table>
52
+
53
+
54
+ ## Accessibility
55
+
56
+ - Native `<input type="range">` with `aria-valuemin`, `aria-valuemax`, `aria-valuenow`
57
+ - Label linked via `id`/`htmlFor`
58
+ - Arrow keys adjust value by `step`; `Home`/`End` jump to min/max
@@ -4,7 +4,6 @@ import { Slider } from './Slider';
4
4
  const meta = {
5
5
  title: 'Form/Slider',
6
6
  component: Slider,
7
- tags: ['autodocs'],
8
7
  } satisfies Meta<typeof Slider>;
9
8
 
10
9
  export default meta;
@@ -0,0 +1,61 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Switch.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Switch
7
+
8
+ Toggle control for binary settings that take immediate effect — without requiring a form submit.
9
+
10
+ ## When to use
11
+ - Enabling/disabling a feature or preference that applies instantly (dark mode, notifications)
12
+
13
+ ## When not to use
14
+ - Choices that require a form submit to apply — use `Checkbox`
15
+ - Choices within a multi-select group — use `Checkbox`
16
+
17
+ ## Examples
18
+
19
+ ### Default
20
+ <Canvas of={Stories.Default} />
21
+
22
+ ### Checked (on)
23
+ <Canvas of={Stories.Checked} />
24
+
25
+ ### All sizes
26
+ <Canvas of={Stories.AllSizes} />
27
+
28
+ ### With hint
29
+ <Canvas of={Stories.WithHint} />
30
+
31
+ ### With error
32
+ <Canvas of={Stories.WithError} />
33
+
34
+ ### Disabled
35
+ <Canvas of={Stories.Disabled} />
36
+
37
+ ### Disabled + checked
38
+ <Canvas of={Stories.DisabledChecked} />
39
+
40
+ ## Props
41
+
42
+ <ArgTypes of={Stories} />
43
+
44
+ ## CSS variables
45
+
46
+
47
+ <table>
48
+ <thead>
49
+ <tr><th>Variable</th><th>Default</th><th>Description</th></tr>
50
+ </thead>
51
+ <tbody>
52
+ <tr><td>`--switch_color-active`</td><td>`var(--color_active--subtle)`</td><td>Track colour when on</td></tr>
53
+ <tr><td>`--switch_color-thumb`</td><td>`var(--color_active--strong)`</td><td>Thumb colour when on</td></tr>
54
+ </tbody>
55
+ </table>
56
+
57
+
58
+ ## Accessibility
59
+
60
+ - Renders `<input type="checkbox">` with `role="switch"` and `aria-checked`
61
+ - Label is always associated; state is communicated via the accessible name
@@ -4,10 +4,6 @@
4
4
  --switch_track-pad: var(--space_xxxs);
5
5
  --switch_track-height: calc(var(--switch_thumb-size) + var(--switch_track-pad) * 2);
6
6
  --switch_track-width: calc(var(--switch_thumb-size) * 2 + var(--switch_track-pad) * 2);
7
- --track_bg: var(--color_grey--subtle);
8
- --track_active: var(--color_active--subtle);
9
- --thumb_bg: var(--color_grey);
10
- --thumb_bg--active: var(--color_active--strong);
11
7
 
12
8
  color: var(--switch_color, var(--color_on-bg));
13
9
  display: flex;
@@ -57,11 +53,11 @@
57
53
  width: var(--switch_track-width);
58
54
  height: var(--switch_track-height);
59
55
  border-radius: 999px;
60
- background-color: var(--track_bg);
56
+ background-color: var(--track_bg, var(--color_grey--subtle));
61
57
  padding-inline: var(--switch_track-pad);
62
58
  pointer-events: none;
63
59
  transition: var(--animation_transition);
64
- outline: 1px solid var(--thumb_bg);
60
+ outline: 1px solid var(--thumb_bg, var(--color_grey));
65
61
  outline-offset: var(--outline_offset);
66
62
  }
67
63
 
@@ -71,7 +67,7 @@
71
67
  width: var(--switch_thumb-size);
72
68
  height: var(--switch_thumb-size);
73
69
  border-radius: 50%;
74
- background-color: var(--thumb_bg);
70
+ background-color: var(--thumb_bg, var(--color_grey));
75
71
  box-shadow: var(--shadow_s);
76
72
  transition: var(--animation_transition);
77
73
  transform: translateX(0);
@@ -84,12 +80,12 @@
84
80
 
85
81
  /* Checked state via CSS sibling combinator */
86
82
  .switch:checked + .track {
87
- background-color: var(--track_active);
88
- outline-color: var(--thumb_bg--active);
83
+ background-color: var(--track_active, var(--color_active--subtle));
84
+ outline-color: var(--thumb_bg--active, var(--color_active--strong));
89
85
  }
90
86
 
91
87
  .switch:checked + .track .thumb {
92
- background-color: var(--thumb_bg--active);
88
+ background-color: var(--thumb_bg--active, var(--color_active--strong));
93
89
  transform: translateX(var(--switch_thumb-size));
94
90
  }
95
91
 
@@ -4,7 +4,6 @@ import { Switch } from './Switch';
4
4
  const meta = {
5
5
  title: 'Form/Switch',
6
6
  component: Switch,
7
- tags: ['autodocs'],
8
7
  argTypes: {
9
8
  size: { control: 'radio', options: ['small', 'medium', 'large'] },
10
9
  },
@@ -0,0 +1,41 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Textarea.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Textarea
7
+
8
+ Multi-line text input with label, hint, and error support.
9
+
10
+ ## When to use
11
+ - Free-form text input where content is expected to span multiple lines (comments, descriptions, notes)
12
+
13
+ ## Examples
14
+
15
+ ### Default
16
+ <Canvas of={Stories.Default} />
17
+
18
+ ### With value
19
+ <Canvas of={Stories.WithValue} />
20
+
21
+ ### With hint
22
+ <Canvas of={Stories.WithHint} />
23
+
24
+ ### With error
25
+ <Canvas of={Stories.WithError} />
26
+
27
+ ### Tall (8 rows)
28
+ <Canvas of={Stories.Tall} />
29
+
30
+ ### Disabled
31
+ <Canvas of={Stories.Disabled} />
32
+
33
+ ## Props
34
+
35
+ <ArgTypes of={Stories} />
36
+
37
+ ## Accessibility
38
+
39
+ - Native `<textarea>` with label linked via `id`/`htmlFor`
40
+ - Error message linked via `aria-describedby`
41
+ - `rows` controls the visible height — does not limit character count
@@ -4,7 +4,6 @@ import { Textarea } from './Textarea';
4
4
  const meta = {
5
5
  title: 'Form/Textarea',
6
6
  component: Textarea,
7
- tags: ['autodocs'],
8
7
  } satisfies Meta<typeof Textarea>;
9
8
 
10
9
  export default meta;
@@ -0,0 +1,47 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './ButtonGroup.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # ButtonGroup
7
+
8
+ Layout wrapper that arranges `Button` children according to a contextual variant. Handles spacing, alignment, and direction.
9
+
10
+ ## Variants
11
+
12
+
13
+ <table>
14
+ <thead>
15
+ <tr><th>Variant</th><th>Layout</th><th>Use case</th></tr>
16
+ </thead>
17
+ <tbody>
18
+ <tr><td>`flow`</td><td>Horizontal, space-between</td><td>Form step navigation (Back / Next)</td></tr>
19
+ <tr><td>`card`</td><td>Horizontal, end-aligned</td><td>Card footer actions</td></tr>
20
+ <tr><td>`modal`</td><td>Horizontal, end-aligned, compact</td><td>Dialog footer</td></tr>
21
+ <tr><td>`content`</td><td>Horizontal, start-aligned</td><td>Inline action groups</td></tr>
22
+ </tbody>
23
+ </table>
24
+
25
+
26
+ ## Examples
27
+
28
+ ### Flow
29
+ <Canvas of={Stories.Flow} />
30
+
31
+ ### Card
32
+ <Canvas of={Stories.Card} />
33
+
34
+ ### Modal
35
+ <Canvas of={Stories.Modal} />
36
+
37
+ ### Content
38
+ <Canvas of={Stories.Content} />
39
+
40
+ ## Props
41
+
42
+ <ArgTypes of={Stories} />
43
+
44
+ ## Accessibility
45
+
46
+ - Renders as `<div role="group">` — no additional ARIA needed for the wrapper
47
+ - Individual buttons inside retain their own accessible names
@@ -13,16 +13,16 @@
13
13
  align-items: center;
14
14
  }
15
15
 
16
- .buttonGroup.--variant__card .container {
16
+ .buttonGroup.--variant_card .container {
17
17
  align-items: stretch;
18
18
  }
19
19
 
20
- .buttonGroup.--variant__flow .container,
21
- .buttonGroup.--variant__modal .container {
20
+ .buttonGroup.--variant_flow .container,
21
+ .buttonGroup.--variant_modal .container {
22
22
  align-items: center;
23
23
  }
24
24
 
25
- .buttonGroup.--variant__content .container {
25
+ .buttonGroup.--variant_content .container {
26
26
  align-items: flex-start;
27
27
  }
28
28
 
@@ -33,25 +33,25 @@
33
33
  justify-content: space-between;
34
34
  }
35
35
 
36
- .buttonGroup.--variant__modal .container > :first-child:last-child,
37
- .buttonGroup.--variant__flow .container > :first-child:last-child {
36
+ .buttonGroup.--variant_modal .container > :first-child:last-child,
37
+ .buttonGroup.--variant_flow .container > :first-child:last-child {
38
38
  margin-inline-start: auto;
39
39
  }
40
40
 
41
- .buttonGroup.--variant__card .container {
41
+ .buttonGroup.--variant_card .container {
42
42
  justify-content: center;
43
43
  }
44
44
 
45
- .buttonGroup.--variant__modal .container {
45
+ .buttonGroup.--variant_modal .container {
46
46
  justify-content: flex-end;
47
47
  }
48
48
 
49
- .buttonGroup.--variant__content .container {
49
+ .buttonGroup.--variant_content .container {
50
50
  justify-content: flex-start;
51
51
  align-items: center;
52
52
  }
53
53
 
54
- .buttonGroup.--variant__grid .container {
54
+ .buttonGroup.--variant_grid .container {
55
55
  justify-content: center;
56
56
  }
57
57
  }
@@ -1,11 +1,10 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { ButtonGroup } from './ButtonGroup';
3
- import { Button } from '../../interaction/Button/Button';
3
+ import { Button } from '../../interaction/Button';
4
4
 
5
5
  const meta = {
6
6
  title: 'Layout/ButtonGroup',
7
7
  component: ButtonGroup,
8
- tags: ['autodocs'],
9
8
  argTypes: {
10
9
  variant: { control: 'select', options: ['flow', 'card', 'modal', 'content', undefined] },
11
10
  },
@@ -0,0 +1,58 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Card.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Card
7
+
8
+ Contained surface for grouping related content. Three visual variants provide different levels of elevation. When `onClick` is supplied, renders as a `<button>`.
9
+
10
+ ## When to use
11
+ - Group content that belongs together (product listing, profile summary, dashboard widget)
12
+ - Clickable card navigating to a detail view
13
+
14
+ ## Examples
15
+
16
+ ### Default
17
+ <Canvas of={Stories.Default} />
18
+
19
+ ### Elevated
20
+ <Canvas of={Stories.Elevated} />
21
+
22
+ ### Outlined
23
+ <Canvas of={Stories.Outlined} />
24
+
25
+ ### All variants
26
+ <Canvas of={Stories.AllVariants} />
27
+
28
+ ### Centered text
29
+ <Canvas of={Stories.Centered} />
30
+
31
+ ### Clickable
32
+ <Canvas of={Stories.Clickable} />
33
+
34
+ ## Props
35
+
36
+ <ArgTypes of={Stories} />
37
+
38
+ ## CSS variables
39
+
40
+
41
+ <table>
42
+ <thead>
43
+ <tr><th>Variable</th><th>Description</th></tr>
44
+ </thead>
45
+ <tbody>
46
+ <tr><td>`--card_bg`</td><td>Card background colour</td></tr>
47
+ <tr><td>`--card_on-bg`</td><td>Card text colour</td></tr>
48
+ <tr><td>`--card_border-color`</td><td>Border colour (outlined variant)</td></tr>
49
+ <tr><td>`--card_shadow`</td><td>Box shadow (elevated variant)</td></tr>
50
+ </tbody>
51
+ </table>
52
+
53
+
54
+ ## Accessibility
55
+
56
+ - Static card renders as `<div>` — no interactive role
57
+ - Clickable card renders as `<button>` — keyboard and screen reader accessible
58
+ - Ensure clickable cards have a meaningful accessible name (via visible text content)
@@ -4,7 +4,6 @@ import { Card } from './Card';
4
4
  const meta = {
5
5
  title: 'Layout/Card',
6
6
  component: Card,
7
- tags: ['autodocs'],
8
7
  argTypes: {
9
8
  variant: { control: 'select', options: ['default', 'elevated', 'outlined'] },
10
9
  padding: { control: 'select', options: ['none', 'small', 'medium', 'large'] },
@@ -0,0 +1,39 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './IconWrapper.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # IconWrapper
7
+
8
+ Circular container that sizes to its own `font-size`. Use to give an SVG icon a consistent background pill in lists, cards, and badges.
9
+
10
+ ## When to use
11
+ - Icon + background in feature lists or empty states
12
+ - Avatar-like icon representations
13
+
14
+ ## Examples
15
+
16
+ ### Default
17
+ <Canvas of={Stories.Default} />
18
+
19
+ ## Props
20
+
21
+ <ArgTypes of={Stories} />
22
+
23
+ ## CSS variables
24
+
25
+
26
+ <table>
27
+ <thead>
28
+ <tr><th>Variable</th><th>Default</th><th>Description</th></tr>
29
+ </thead>
30
+ <tbody>
31
+ <tr><td>`--icon-wrapper_color`</td><td>`var(--color_cta--subtle)`</td><td>Background colour</td></tr>
32
+ <tr><td>`--icon-wrapper_on-color`</td><td>`var(--color_on-cta--subtle)`</td><td>Icon colour</td></tr>
33
+ </tbody>
34
+ </table>
35
+
36
+
37
+ ## Accessibility
38
+
39
+ - Purely decorative wrapper — the icon inside should carry its own `aria-label` or be `aria-hidden` with a sibling visible label
@@ -4,7 +4,6 @@ import { IconWrapper } from './IconWrapper';
4
4
  const meta = {
5
5
  title: 'Layout/IconWrapper',
6
6
  component: IconWrapper,
7
- tags: ['autodocs'],
8
7
  } satisfies Meta<typeof IconWrapper>;
9
8
 
10
9
  export default meta;
@@ -0,0 +1,38 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './SectionHeader.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # SectionHeader
7
+
8
+ Heading block with optional subtitle for introducing a content section.
9
+
10
+ ## When to use
11
+ - Above a grid of cards, a data table, or any content region that needs a title
12
+ - Marketing and landing page sections
13
+
14
+ ## Examples
15
+
16
+ ### Default
17
+ <Canvas of={Stories.Default} />
18
+
19
+ ### Without subtitle
20
+ <Canvas of={Stories.WithoutSubtitle} />
21
+
22
+ ### Large
23
+ <Canvas of={Stories.Large} />
24
+
25
+ ### Small
26
+ <Canvas of={Stories.Small} />
27
+
28
+ ### Centered
29
+ <Canvas of={Stories.Centered} />
30
+
31
+ ## Props
32
+
33
+ <ArgTypes of={Stories} />
34
+
35
+ ## Accessibility
36
+
37
+ - Title renders as `<h2>` by default — override with `titleAs` to fit document outline
38
+ - Subtitle is a `<p>` following the heading — no additional ARIA needed
@@ -4,7 +4,6 @@ import { SectionHeader } from './SectionHeader';
4
4
  const meta = {
5
5
  title: 'Layout/SectionHeader',
6
6
  component: SectionHeader,
7
- tags: ['autodocs'],
8
7
  argTypes: {
9
8
  alignment: { control: 'select', options: ['start', 'center', 'end'] },
10
9
  size: { control: 'select', options: ['small', 'medium', 'large'] },
@@ -0,0 +1,40 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Accordion.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Accordion
7
+
8
+ Vertically stacked sections that can be expanded and collapsed independently.
9
+
10
+ ## When to use
11
+ - FAQs, glossaries, and settings panels with many optional details
12
+ - Reducing vertical space when most users need only a few items
13
+
14
+ ## When not to use
15
+ - When users need to compare multiple sections simultaneously — show them all by default
16
+ - When there are fewer than 3 items — just show the content
17
+
18
+ ## Examples
19
+
20
+ ### Default
21
+ <Canvas of={Stories.Default} />
22
+
23
+ ### With default open item
24
+ <Canvas of={Stories.WithDefaultOpen} />
25
+
26
+ ### Allow multiple open
27
+ <Canvas of={Stories.AllowMultiple} />
28
+
29
+ ### With disabled item
30
+ <Canvas of={Stories.WithDisabledItem} />
31
+
32
+ ## Props
33
+
34
+ <ArgTypes of={Stories} />
35
+
36
+ ## Accessibility
37
+
38
+ - Implements ARIA disclosure pattern: trigger buttons use `aria-expanded` and `aria-controls`
39
+ - Content panels use `role="region"` with `aria-labelledby`
40
+ - Disabled items have `aria-disabled="true"` and are excluded from keyboard focus
@@ -4,7 +4,6 @@ import { Accordion } from './Accordion';
4
4
  const meta = {
5
5
  title: 'UI/Accordion',
6
6
  component: Accordion,
7
- tags: ['autodocs'],
8
7
  } satisfies Meta<typeof Accordion>;
9
8
 
10
9
  export default meta;
@@ -0,0 +1,63 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Alert.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Alert
7
+
8
+ Inline contextual feedback message. Use for confirmations, warnings, errors, and informational notices inline within page content.
9
+
10
+ ## When to use
11
+ - Feedback that is directly related to an action on the current page
12
+ - Persistent notices that must remain visible while the user takes action
13
+
14
+ ## When not to use
15
+ - Transient feedback after an action — use `Toast` instead
16
+ - Page-level banners that span the full width — use `NotificationBanner`
17
+
18
+ ## Examples
19
+
20
+ ### All variants
21
+ <Canvas of={Stories.AllVariants} />
22
+
23
+ ### Success
24
+ <Canvas of={Stories.Success} />
25
+
26
+ ### Error
27
+ <Canvas of={Stories.Error} />
28
+
29
+ ### Warning
30
+ <Canvas of={Stories.Warning} />
31
+
32
+ ### Info
33
+ <Canvas of={Stories.Info} />
34
+
35
+ ### With title
36
+ <Canvas of={Stories.WithTitle} />
37
+
38
+ ### Dismissible
39
+ <Canvas of={Stories.Dismissible} />
40
+
41
+ ## Props
42
+
43
+ <ArgTypes of={Stories} />
44
+
45
+ ## CSS variables
46
+
47
+
48
+ <table>
49
+ <thead>
50
+ <tr><th>Variable</th><th>Description</th></tr>
51
+ </thead>
52
+ <tbody>
53
+ <tr><td>`--alert_color`</td><td>Background colour (defaults to variant semantic token)</td></tr>
54
+ <tr><td>`--alert_on-color`</td><td>Text and icon colour</td></tr>
55
+ </tbody>
56
+ </table>
57
+
58
+
59
+ ## Accessibility
60
+
61
+ - Uses `role="alert"` to announce content to screen readers immediately on mount
62
+ - `onDismiss` close button has `aria-label="Dismiss"` — ensure the label is meaningful in context
63
+ - Colour alone is not used to convey meaning: each variant includes an icon
@@ -1,17 +1,13 @@
1
1
  @layer component {
2
2
  .alert {
3
- --alert_bg: var(--color_blue--subtle);
4
- --alert_text: var(--color_on-blue--subtle);
5
- --alert_border: var(--color_blue);
6
-
7
3
  display: flex;
8
4
  align-items: flex-start;
9
5
  gap: var(--space_s);
10
6
  padding: var(--space_m);
11
7
  border-radius: var(--border_radius--s);
12
- border-inline-start: var(--space_s) solid var(--alert_border);
13
- background-color: var(--alert_bg);
14
- color: var(--alert_text);
8
+ border-inline-start: var(--space_s) solid var(--alert_border, var(--color_blue));
9
+ background-color: var(--alert_bg, var(--color_blue--subtle));
10
+ color: var(--alert_text, var(--color_on-blue--subtle));
15
11
  font-size: var(--font_size--body);
16
12
  line-height: var(--font_line-height--body);
17
13
  }
@@ -5,7 +5,6 @@ import { Alert } from './Alert';
5
5
  const meta = {
6
6
  title: 'UI/Alert',
7
7
  component: Alert,
8
- tags: ['autodocs'],
9
8
  argTypes: {
10
9
  variant: { control: 'select', options: ['info', 'success', 'warning', 'error'] },
11
10
  },