@boostdev/design-system-components 0.1.13 → 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 +1 -1
  2. package/README.md +1 -1
  3. package/dist/client.cjs +54 -50
  4. package/dist/client.css +495 -511
  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 +495 -511
  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 +4 -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 +1 -1
  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,53 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Avatar.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Avatar
7
+
8
+ Circular user representation. Displays a profile image when available, falling back to initials derived from `name`, then a generic placeholder.
9
+
10
+ ## When to use
11
+ - User identity in comments, messages, or list items
12
+ - Profile headers
13
+
14
+ ## Examples
15
+
16
+ ### With image
17
+ <Canvas of={Stories.WithImage} />
18
+
19
+ ### With initials
20
+ <Canvas of={Stories.WithInitials} />
21
+
22
+ ### All sizes
23
+ <Canvas of={Stories.AllSizes} />
24
+
25
+ ### Single name (one initial)
26
+ <Canvas of={Stories.SingleName} />
27
+
28
+ ### No name fallback
29
+ <Canvas of={Stories.NoName} />
30
+
31
+ ## Props
32
+
33
+ <ArgTypes of={Stories} />
34
+
35
+ ## CSS variables
36
+
37
+
38
+ <table>
39
+ <thead>
40
+ <tr><th>Variable</th><th>Description</th></tr>
41
+ </thead>
42
+ <tbody>
43
+ <tr><td>`--avatar_color`</td><td>Background colour for initials fallback</td></tr>
44
+ <tr><td>`--avatar_on-color`</td><td>Text colour for initials</td></tr>
45
+ </tbody>
46
+ </table>
47
+
48
+
49
+ ## Accessibility
50
+
51
+ - Always provide a meaningful `alt` when passing `src`
52
+ - When no image is shown, `aria-label` is derived from `name` to describe the avatar to screen readers
53
+ - Touch target meets 44×44px minimum at `medium` size and above
@@ -1,22 +1,18 @@
1
1
  @layer component {
2
2
  .avatar {
3
- --avatar_size: 3em;
4
- --avatar_bg: var(--color_blue);
5
- --avatar_text: var(--color_on-blue);
6
-
7
3
  display: inline-flex;
8
4
  align-items: center;
9
5
  justify-content: center;
10
- width: var(--avatar_size);
11
- height: var(--avatar_size);
6
+ width: var(--avatar_size, 3em);
7
+ height: var(--avatar_size, 3em);
12
8
  border-radius: 50%;
13
9
  overflow: hidden;
14
10
  flex-shrink: 0;
15
11
  }
16
12
 
17
13
  .avatar.--fallback {
18
- background-color: var(--avatar_bg);
19
- color: var(--avatar_text);
14
+ background-color: var(--avatar_bg, var(--color_blue));
15
+ color: var(--avatar_text, var(--color_on-blue));
20
16
  font-weight: var(--font_weight--semibold);
21
17
  }
22
18
 
@@ -4,7 +4,6 @@ import { Avatar } from './Avatar';
4
4
  const meta = {
5
5
  title: 'UI/Avatar',
6
6
  component: Avatar,
7
- tags: ['autodocs'],
8
7
  argTypes: {
9
8
  size: { control: 'radio', options: ['small', 'medium', 'large'] },
10
9
  },
@@ -0,0 +1,62 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Badge.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Badge
7
+
8
+ Compact inline label for status, category, or count. Renders a `<span>` with a semantic variant colour.
9
+
10
+ ## When to use
11
+ - Highlight status on a record (active, error, draft)
12
+ - Show a count alongside a navigation item
13
+ - Label items in a list by category
14
+
15
+ ## When not to use
16
+ - As a call-to-action — use `Button` instead
17
+ - For long text — badges are single words or short phrases
18
+
19
+ ## Examples
20
+
21
+ ### Variants
22
+ <Canvas of={Stories.AllVariants} />
23
+
24
+ ### Primary
25
+ <Canvas of={Stories.Primary} />
26
+
27
+ ### Secondary
28
+ <Canvas of={Stories.Secondary} />
29
+
30
+ ### Success
31
+ <Canvas of={Stories.Success} />
32
+
33
+ ### Error
34
+ <Canvas of={Stories.Error} />
35
+
36
+ ### Warning
37
+ <Canvas of={Stories.Warning} />
38
+
39
+ ## Props
40
+
41
+ <ArgTypes of={Stories} />
42
+
43
+ ## CSS variables
44
+
45
+ Override these on a parent element to customise the badge without touching global tokens:
46
+
47
+
48
+ <table>
49
+ <thead>
50
+ <tr><th>Variable</th><th>Default</th><th>Description</th></tr>
51
+ </thead>
52
+ <tbody>
53
+ <tr><td>`--badge_color`</td><td>`var(--color_cta--subtle)`</td><td>Background colour</td></tr>
54
+ <tr><td>`--badge_on-color`</td><td>`var(--color_on-cta--subtle)`</td><td>Text colour</td></tr>
55
+ </tbody>
56
+ </table>
57
+
58
+
59
+ ## Accessibility
60
+
61
+ - Renders as `<span>` — purely decorative/informational, no interactive role
62
+ - Ensure the badge text is meaningful without surrounding context, or supplement it with a visually-hidden description for screen readers
@@ -1,22 +1,16 @@
1
1
  @layer component {
2
2
  .badge {
3
- /* Component tokens — override from a parent context or inline style */
4
- --badge_bg: var(--color_blue);
5
- --badge_text: var(--color_on-blue);
6
- --badge_radius: 2em;
7
- --badge_font-size: var(--font_size--body--s);
8
-
9
3
  display: inline-flex;
10
4
  align-items: center;
11
5
  justify-content: center;
12
6
  padding: var(--space_xxs) var(--space_xs);
13
- border-radius: var(--badge_radius);
14
- font-size: var(--badge_font-size);
7
+ border-radius: var(--badge_radius, 2em);
8
+ font-size: var(--badge_font-size, var(--font_size--body--s));
15
9
  font-weight: var(--font_weight--semibold);
16
10
  line-height: 1;
17
11
  white-space: nowrap;
18
- background-color: var(--badge_bg);
19
- color: var(--badge_text);
12
+ background-color: var(--badge_bg, var(--color_blue));
13
+ color: var(--badge_text, var(--color_on-blue));
20
14
  }
21
15
 
22
16
  .--variant_primary {
@@ -4,7 +4,6 @@ import { Badge } from './Badge';
4
4
  const meta = {
5
5
  title: 'UI/Badge',
6
6
  component: Badge,
7
- tags: ['autodocs'],
8
7
  argTypes: {
9
8
  variant: { control: 'select', options: ['primary', 'secondary', 'success', 'error', 'warning'] },
10
9
  },
@@ -0,0 +1,36 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Breadcrumb.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Breadcrumb
7
+
8
+ Hierarchical navigation trail showing the user's location within the site structure.
9
+
10
+ ## When to use
11
+ - Multi-level site structures (3+ levels deep)
12
+ - Pages where users may arrive directly and benefit from context
13
+
14
+ ## Examples
15
+
16
+ ### Default
17
+ <Canvas of={Stories.Default} />
18
+
19
+ ### Single level
20
+ <Canvas of={Stories.SingleLevel} />
21
+
22
+ ### Two levels
23
+ <Canvas of={Stories.TwoLevels} />
24
+
25
+ ### Deep nested
26
+ <Canvas of={Stories.DeepNested} />
27
+
28
+ ## Props
29
+
30
+ <ArgTypes of={Stories} />
31
+
32
+ ## Accessibility
33
+
34
+ - Wraps in `<nav aria-label="Breadcrumb">`
35
+ - The current page item has `aria-current="page"`
36
+ - Separator glyphs are `aria-hidden="true"`
@@ -4,7 +4,6 @@ import { Breadcrumb } from './Breadcrumb';
4
4
  const meta = {
5
5
  title: 'UI/Breadcrumb',
6
6
  component: Breadcrumb,
7
- tags: ['autodocs'],
8
7
  } satisfies Meta<typeof Breadcrumb>;
9
8
 
10
9
  export default meta;
@@ -0,0 +1,34 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Calendar.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Calendar
7
+
8
+ Date picker calendar grid. Use standalone or as the popover content inside a date input.
9
+
10
+ ## When to use
11
+ - Date selection in forms where a visual calendar improves comprehension
12
+ - Booking flows, scheduling tools, date range pickers
13
+
14
+ ## Examples
15
+
16
+ ### Default (uncontrolled)
17
+ <Canvas of={Stories.Default} />
18
+
19
+ ### With default value
20
+ <Canvas of={Stories.WithDefaultValue} />
21
+
22
+ ### With min/max constraints
23
+ <Canvas of={Stories.WithMinMax} />
24
+
25
+ ## Props
26
+
27
+ <ArgTypes of={Stories} />
28
+
29
+ ## Accessibility
30
+
31
+ - Grid uses `role="grid"` with `role="gridcell"` for each day
32
+ - Selected date has `aria-selected="true"`; disabled dates have `aria-disabled="true"`
33
+ - Month navigation buttons have descriptive `aria-label` values
34
+ - Arrow keys move focus within the grid; `Enter`/`Space` select a date
@@ -5,7 +5,6 @@ import { Calendar } from './Calendar';
5
5
  const meta = {
6
6
  title: 'UI/Calendar',
7
7
  component: Calendar,
8
- tags: ['autodocs'],
9
8
  decorators: [
10
9
  Story => (
11
10
  <div style={{ display: 'flex', justifyContent: 'center', padding: '2rem' }}>
@@ -0,0 +1,31 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Carousel.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Carousel
7
+
8
+ Horizontally scrollable slide container with previous/next navigation.
9
+
10
+ ## When to use
11
+ - Image galleries, featured content, or step-by-step flows where all items share equal priority
12
+ - When screen space is limited and items benefit from a browse interaction
13
+
14
+ ## When not to use
15
+ - Critical content — most users do not interact with carousels; place key content outside
16
+ - More than 5–6 slides — consider a grid or tabbed layout
17
+
18
+ ## Examples
19
+
20
+ ### Default
21
+ <Canvas of={Stories.Default} />
22
+
23
+ ## Props
24
+
25
+ <ArgTypes of={Stories} />
26
+
27
+ ## Accessibility
28
+
29
+ - Prev/next buttons have `aria-label="Previous"` / `"Next"`
30
+ - The slide container has `aria-live="polite"` to announce slide changes
31
+ - Fully keyboard navigable: buttons receive focus, slides are accessible via arrow keys
@@ -4,7 +4,6 @@ import { Carousel } from './Carousel';
4
4
  const meta = {
5
5
  title: 'UI/Carousel',
6
6
  component: Carousel,
7
- tags: ['autodocs'],
8
7
  } satisfies Meta<typeof Carousel>;
9
8
 
10
9
  export default meta;
@@ -0,0 +1,28 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './DescriptionList.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # DescriptionList
7
+
8
+ Key-value pairs rendered as a semantic `<dl>` element. Supports stacked and inline layouts.
9
+
10
+ ## When to use
11
+ - Product details, order summaries, profile information
12
+ - Any list of labelled values where semantic key-value association matters
13
+
14
+ ## Examples
15
+
16
+ ### Stacked (default)
17
+ <Canvas of={Stories.Stacked} />
18
+
19
+ ### Inline
20
+ <Canvas of={Stories.Inline} />
21
+
22
+ ## Props
23
+
24
+ <ArgTypes of={Stories} />
25
+
26
+ ## Accessibility
27
+
28
+ - Uses native `<dl>`, `<dt>`, `<dd>` — correct semantics without extra ARIA
@@ -4,7 +4,6 @@ import { DescriptionList } from './DescriptionList';
4
4
  const meta = {
5
5
  title: 'UI/DescriptionList',
6
6
  component: DescriptionList,
7
- tags: ['autodocs'],
8
7
  } satisfies Meta<typeof DescriptionList>;
9
8
 
10
9
  export default meta;
@@ -0,0 +1,44 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Link.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Link
7
+
8
+ Styled anchor element with three visual variants. Renders as `<a>` by default, but can be rendered as a `<button>` or any other element via the `component` prop.
9
+
10
+ ## When to use
11
+ - Navigation to another page or route
12
+ - Inline text links within paragraphs
13
+
14
+ ## When not to use
15
+ - An action that does not navigate — use `Button` instead
16
+
17
+ ## Examples
18
+
19
+ ### Default
20
+ <Canvas of={Stories.Default} />
21
+
22
+ ### Subtle
23
+ <Canvas of={Stories.Subtle} />
24
+
25
+ ### Standalone
26
+ <Canvas of={Stories.Standalone} />
27
+
28
+ ### External
29
+ <Canvas of={Stories.External} />
30
+
31
+ ### All variants
32
+ <Canvas of={Stories.AllVariants} />
33
+
34
+ ### Inline usage
35
+ <Canvas of={Stories.InlineUsage} />
36
+
37
+ ## Props
38
+
39
+ <ArgTypes of={Stories} />
40
+
41
+ ## Accessibility
42
+
43
+ - External links add `target="_blank"` with `rel="noopener noreferrer"` and a visually-hidden "(opens in new tab)" label
44
+ - The `as` prop allows any element while maintaining link semantics via `role`
@@ -1,9 +1,6 @@
1
1
  @layer component {
2
2
  .link {
3
- --link_color: var(--color_interactive);
4
- --link_color-hover: var(--color_blue--strong);
5
-
6
- color: var(--link_color);
3
+ color: var(--link_color, var(--color_interactive));
7
4
  text-decoration: underline;
8
5
  text-underline-offset: 0.2em;
9
6
  transition: var(--animation_transition);
@@ -18,7 +15,7 @@
18
15
 
19
16
  @media (hover: hover) and (pointer: fine) {
20
17
  .link:hover {
21
- --link_color: var(--link_color-hover);
18
+ --link_color: var(--link_color-hover, var(--color_blue--strong));
22
19
  }
23
20
  }
24
21
 
@@ -4,7 +4,6 @@ import { Link } from './Link';
4
4
  const meta = {
5
5
  title: 'UI/Link',
6
6
  component: Link,
7
- tags: ['autodocs'],
8
7
  argTypes: {
9
8
  variant: { control: 'radio', options: ['default', 'subtle', 'standalone'] },
10
9
  },
@@ -0,0 +1,52 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Loading.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Loading
7
+
8
+ Animated spinner that communicates an in-progress operation.
9
+
10
+ ## When to use
11
+ - Inline within a button, card, or container while content is being fetched
12
+ - As a full-section overlay during page transitions
13
+
14
+ ## When not to use
15
+ - When the loading duration exceeds ~10 seconds — consider a progress bar instead
16
+ - As a skeleton replacement — use `Skeleton` for layout-preserving placeholders
17
+
18
+ ## Examples
19
+
20
+ ### Sizes
21
+ <Canvas of={Stories.AllSizes} />
22
+
23
+ ### Small
24
+ <Canvas of={Stories.Small} />
25
+
26
+ ### Medium
27
+ <Canvas of={Stories.Medium} />
28
+
29
+ ### Large
30
+ <Canvas of={Stories.Large} />
31
+
32
+ ## Props
33
+
34
+ <ArgTypes of={Stories} />
35
+
36
+ ## CSS variables
37
+
38
+
39
+ <table>
40
+ <thead>
41
+ <tr><th>Variable</th><th>Description</th></tr>
42
+ </thead>
43
+ <tbody>
44
+ <tr><td>`--loading_color`</td><td>Spinner stroke colour (defaults to `currentcolor`)</td></tr>
45
+ </tbody>
46
+ </table>
47
+
48
+
49
+ ## Accessibility
50
+
51
+ - Renders with `role="status"` and a visually-hidden "Loading…" label
52
+ - Animation respects `prefers-reduced-motion` — the spinner fades instead of spinning
@@ -4,7 +4,6 @@ import { Loading } from './Loading';
4
4
  const meta = {
5
5
  title: 'UI/Loading',
6
6
  component: Loading,
7
- tags: ['autodocs'],
8
7
  argTypes: {
9
8
  size: { control: 'select', options: ['small', 'medium', 'large'] },
10
9
  },
@@ -0,0 +1,45 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './NotificationBanner.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # NotificationBanner
7
+
8
+ Full-width banner for page-level system messages. Sits at the top of the page or a major section.
9
+
10
+ ## When to use
11
+ - Maintenance windows, feature announcements, or system-wide errors
12
+ - When the message applies to the entire page rather than a specific component
13
+
14
+ ## When not to use
15
+ - Inline content feedback — use `Alert` instead
16
+ - Transient feedback after a user action — use `Toast`
17
+
18
+ ## Examples
19
+
20
+ ### Info
21
+ <Canvas of={Stories.Info} />
22
+
23
+ ### Success
24
+ <Canvas of={Stories.Success} />
25
+
26
+ ### Warning
27
+ <Canvas of={Stories.Warning} />
28
+
29
+ ### Error
30
+ <Canvas of={Stories.Error} />
31
+
32
+ ### With action
33
+ <Canvas of={Stories.WithAction} />
34
+
35
+ ### Dismissible
36
+ <Canvas of={Stories.Dismissible} />
37
+
38
+ ## Props
39
+
40
+ <ArgTypes of={Stories} />
41
+
42
+ ## Accessibility
43
+
44
+ - Uses `role="alert"` for error/warning variants and `role="status"` for info/success
45
+ - Dismiss button has `aria-label="Dismiss notification"`
@@ -1,16 +1,12 @@
1
1
  @layer component {
2
2
  .banner {
3
- --banner_bg: var(--color_blue--subtle);
4
- --banner_text: var(--color_on-blue--subtle);
5
- --banner_border: var(--color_blue);
6
-
7
3
  display: flex;
8
4
  align-items: center;
9
5
  gap: var(--space_m);
10
6
  padding: var(--space_s) var(--space_m);
11
- background-color: var(--banner_bg);
12
- color: var(--banner_text);
13
- border-block-end: 3px solid var(--banner_border);
7
+ background-color: var(--banner_bg, var(--color_blue--subtle));
8
+ color: var(--banner_text, var(--color_on-blue--subtle));
9
+ border-block-end: 3px solid var(--banner_border, var(--color_blue));
14
10
  font-size: var(--font_size--body);
15
11
  line-height: var(--font_line-height--body);
16
12
  width: 100%;
@@ -1,10 +1,10 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { NotificationBanner } from './NotificationBanner';
3
+ import { Button } from '../../interaction/Button/Button';
3
4
 
4
5
  const meta = {
5
6
  title: 'UI/NotificationBanner',
6
7
  component: NotificationBanner,
7
- tags: ['autodocs'],
8
8
  } satisfies Meta<typeof NotificationBanner>;
9
9
 
10
10
  export default meta;
@@ -18,7 +18,7 @@ export const WithAction: Story = {
18
18
  args: {
19
19
  variant: 'info',
20
20
  children: 'A new version is available.',
21
- action: <button type="button">Update now</button>,
21
+ action: <Button size="small">Update now</Button>,
22
22
  },
23
23
  };
24
24
  export const Dismissible: Story = {
@@ -0,0 +1,39 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './Pagination.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # Pagination
7
+
8
+ Navigation control for paged data sets. Renders prev/next buttons plus numbered page links.
9
+
10
+ ## When to use
11
+ - Tables, lists, and search results with more items than fit on one screen
12
+ - When infinite scroll is not appropriate (e.g. users need to return to a specific page)
13
+
14
+ ## Examples
15
+
16
+ ### Default
17
+ <Canvas of={Stories.Default} />
18
+
19
+ ### First page
20
+ <Canvas of={Stories.FirstPage} />
21
+
22
+ ### Last page
23
+ <Canvas of={Stories.LastPage} />
24
+
25
+ ### Many pages
26
+ <Canvas of={Stories.ManyPages} />
27
+
28
+ ### Interactive
29
+ <Canvas of={Stories.Interactive} />
30
+
31
+ ## Props
32
+
33
+ <ArgTypes of={Stories} />
34
+
35
+ ## Accessibility
36
+
37
+ - Wraps in `<nav aria-label="Pagination">`
38
+ - Current page button has `aria-current="page"`
39
+ - Prev/next buttons are disabled (not just hidden) when at the boundary
@@ -14,10 +14,6 @@
14
14
  }
15
15
 
16
16
  .button {
17
- --btn_bg: transparent;
18
- --btn_color: var(--color_on-bg);
19
- --btn_border: var(--color_bg--subtle);
20
-
21
17
  all: unset;
22
18
  display: inline-flex;
23
19
  align-items: center;
@@ -26,9 +22,9 @@
26
22
  height: 2.25rem;
27
23
  padding-inline: var(--space_xs);
28
24
  border-radius: var(--border_radius--xs);
29
- border: 1px solid var(--btn_border);
30
- background-color: var(--btn_bg);
31
- color: var(--btn_color);
25
+ border: 1px solid var(--btn_border, var(--color_bg--subtle));
26
+ background-color: var(--btn_bg, transparent);
27
+ color: var(--btn_color, var(--color_on-bg));
32
28
  font-family: var(--font_family--body);
33
29
  font-size: var(--font_size--body);
34
30
  font-variant-numeric: tabular-nums;
@@ -5,7 +5,6 @@ import { Pagination } from './Pagination';
5
5
  const meta = {
6
6
  title: 'UI/Pagination',
7
7
  component: Pagination,
8
- tags: ['autodocs'],
9
8
  } satisfies Meta<typeof Pagination>;
10
9
 
11
10
  export default meta;