@boostdev/design-system-components 1.1.2 → 1.2.1

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 (213) hide show
  1. package/AGENTS.md +38 -14
  2. package/dist/client.cjs +85 -103
  3. package/dist/client.css +610 -601
  4. package/dist/client.d.cts +13 -16
  5. package/dist/client.d.ts +13 -16
  6. package/dist/client.js +95 -113
  7. package/dist/index.cjs +85 -103
  8. package/dist/index.css +610 -601
  9. package/dist/index.d.cts +13 -16
  10. package/dist/index.d.ts +13 -16
  11. package/dist/index.js +95 -113
  12. package/dist/native/index.cjs +9 -8
  13. package/dist/native/index.d.cts +1 -1
  14. package/dist/native/index.d.ts +1 -1
  15. package/dist/native/index.js +9 -8
  16. package/dist/web-components/{chunk-K5CE6HSB.js → chunk-2FGATTGT.js} +79 -17
  17. package/dist/web-components/{chunk-O4UFI2RX.js → chunk-3REOIRDW.js} +13 -11
  18. package/dist/web-components/{chunk-5IPHEONG.js → chunk-6I2DBFQ7.js} +1 -0
  19. package/dist/web-components/{chunk-VM3YHGQ2.js → chunk-AJSXNDAP.js} +1 -2
  20. package/dist/web-components/{chunk-LSC4N56Q.js → chunk-BX3IPVOB.js} +1 -2
  21. package/dist/web-components/{chunk-CAPI25CU.js → chunk-DZRSJGPB.js} +3 -3
  22. package/dist/web-components/{chunk-VSS5ITNE.js → chunk-EBJM3VD4.js} +1 -3
  23. package/dist/web-components/{chunk-O7I63SQX.js → chunk-HHHRF2PS.js} +6 -12
  24. package/dist/web-components/{chunk-OTX4COSV.js → chunk-JUKB3BUP.js} +3 -4
  25. package/dist/web-components/{chunk-IQGLIQSO.js → chunk-N6IMUOY4.js} +2 -5
  26. package/dist/web-components/{chunk-CJ5ZOO42.js → chunk-OCODKRVZ.js} +68 -44
  27. package/dist/web-components/{chunk-QDRH46TF.js → chunk-QLZ2362S.js} +1 -3
  28. package/dist/web-components/{chunk-IK3PTFZ4.js → chunk-T6AETZRP.js} +1 -3
  29. package/dist/web-components/{chunk-4BX6AWXX.js → chunk-X3FKVHLK.js} +2 -4
  30. package/dist/web-components/{chunk-A67LCT7C.js → chunk-XNA6WTXG.js} +3 -4
  31. package/dist/web-components/{chunk-XIENXR7H.js → chunk-YRXCVKHV.js} +1 -3
  32. package/dist/web-components/{chunk-6T3RKUKG.js → chunk-ZTC6GRP7.js} +1 -2
  33. package/dist/web-components/globals.js +1 -1
  34. package/dist/web-components/index.d.ts +571 -1
  35. package/dist/web-components/index.js +1515 -18
  36. package/dist/web-components/interaction/bds-accordion.js +1 -1
  37. package/dist/web-components/interaction/bds-button.d.ts +2 -2
  38. package/dist/web-components/interaction/bds-button.js +1 -1
  39. package/dist/web-components/interaction/bds-collapsible.js +1 -1
  40. package/dist/web-components/interaction/bds-dialog.js +1 -1
  41. package/dist/web-components/interaction/bds-drawer.js +1 -1
  42. package/dist/web-components/interaction/form/bds-checkbox.js +1 -1
  43. package/dist/web-components/interaction/form/bds-combobox.js +1 -1
  44. package/dist/web-components/interaction/form/bds-number-input.js +1 -1
  45. package/dist/web-components/interaction/form/bds-radio.js +1 -1
  46. package/dist/web-components/interaction/form/bds-segmented-control.d.ts +20 -3
  47. package/dist/web-components/interaction/form/bds-segmented-control.js +1 -1
  48. package/dist/web-components/interaction/form/bds-select.js +1 -1
  49. package/dist/web-components/interaction/form/bds-switch.js +1 -1
  50. package/dist/web-components/interaction/form/bds-textarea.js +1 -1
  51. package/dist/web-components/ui/bds-alert.js +1 -1
  52. package/dist/web-components/ui/bds-card.js +1 -1
  53. package/dist/web-components/ui/bds-notification-banner.js +1 -1
  54. package/package.json +2 -2
  55. package/src/components/interaction/Button/Button.module.css +12 -11
  56. package/src/components/interaction/Button/Button.native.tsx +10 -9
  57. package/src/components/interaction/Button/Button.tsx +1 -1
  58. package/src/components/interaction/Command/Command.module.css +3 -7
  59. package/src/components/interaction/Dialog/Dialog.module.css +7 -5
  60. package/src/components/interaction/Drawer/Drawer.module.css +48 -25
  61. package/src/components/interaction/Drawer/Drawer.tsx +21 -17
  62. package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +1 -3
  63. package/src/components/interaction/Popover/Popover.module.css +1 -3
  64. package/src/components/interaction/form/Checkbox/Checkbox.module.css +1 -3
  65. package/src/components/interaction/form/Combobox/Combobox.module.css +2 -6
  66. package/src/components/interaction/form/FormInput/FormInput.module.css +1 -3
  67. package/src/components/interaction/form/NumberInput/NumberInput.module.css +16 -4
  68. package/src/components/interaction/form/Radio/Radio.module.css +6 -16
  69. package/src/components/interaction/form/SegmentedControl/SegmentedControl.mdx +74 -25
  70. package/src/components/interaction/form/SegmentedControl/SegmentedControl.module.css +65 -36
  71. package/src/components/interaction/form/SegmentedControl/SegmentedControl.spec.tsx +127 -56
  72. package/src/components/interaction/form/SegmentedControl/SegmentedControl.stories.tsx +89 -72
  73. package/src/components/interaction/form/SegmentedControl/SegmentedControl.tsx +40 -62
  74. package/src/components/interaction/form/SegmentedControl/index.ts +1 -1
  75. package/src/components/interaction/form/Select/Select.module.css +2 -4
  76. package/src/components/interaction/form/Switch/Switch.module.css +5 -7
  77. package/src/components/interaction/form/Switch/Switch.native.spec.tsx +9 -9
  78. package/src/components/interaction/form/Switch/Switch.native.tsx +2 -2
  79. package/src/components/interaction/form/Textarea/Textarea.module.css +1 -3
  80. package/src/components/interaction/form/atoms/InputContainer.stories.tsx +64 -0
  81. package/src/components/interaction/form/atoms/Label.stories.tsx +33 -0
  82. package/src/components/interaction/form/atoms/Message.stories.tsx +33 -0
  83. package/src/components/layout/Card/Card.module.css +1 -3
  84. package/src/components/ui/Accordion/Accordion.module.css +1 -2
  85. package/src/components/ui/Alert/Alert.module.css +1 -2
  86. package/src/components/ui/Calendar/Calendar.module.css +2 -5
  87. package/src/components/ui/Carousel/Carousel.module.css +1 -3
  88. package/src/components/ui/NotificationBanner/NotificationBanner.module.css +1 -2
  89. package/src/components/ui/Pagination/Pagination.module.css +1 -2
  90. package/src/components/ui/SkipLink/SkipLink.module.css +1 -2
  91. package/src/components/ui/Table/Table.module.css +1 -2
  92. package/src/css/bdc.css +16 -11
  93. package/src/index.ts +1 -1
  94. package/src/stories/Introduction.mdx +2 -1
  95. package/src/web-components/globals.ts +3 -3
  96. package/src/web-components/index.ts +12 -0
  97. package/src/web-components/interaction/BdsAccordion.mdx +103 -0
  98. package/src/web-components/interaction/BdsAccordion.stories.tsx +94 -0
  99. package/src/web-components/interaction/BdsCollapsible.mdx +116 -0
  100. package/src/web-components/interaction/BdsCollapsible.stories.tsx +68 -0
  101. package/src/web-components/interaction/BdsDialog.mdx +110 -0
  102. package/src/web-components/interaction/BdsDialog.stories.tsx +157 -0
  103. package/src/web-components/interaction/BdsDrawer.mdx +108 -0
  104. package/src/web-components/interaction/BdsDrawer.stories.tsx +196 -0
  105. package/src/web-components/interaction/BdsDropdownMenu.mdx +108 -0
  106. package/src/web-components/interaction/BdsDropdownMenu.stories.tsx +91 -0
  107. package/src/web-components/interaction/BdsSkipLink.mdx +90 -0
  108. package/src/web-components/interaction/BdsSkipLink.stories.tsx +68 -0
  109. package/src/web-components/interaction/BdsTabs.mdx +117 -0
  110. package/src/web-components/interaction/BdsTabs.stories.tsx +94 -0
  111. package/src/web-components/interaction/BdsTooltip.mdx +104 -0
  112. package/src/web-components/interaction/BdsTooltip.stories.tsx +87 -0
  113. package/src/web-components/interaction/bds-accordion.ts +1 -2
  114. package/src/web-components/interaction/bds-button.ts +15 -13
  115. package/src/web-components/interaction/bds-collapsible.ts +1 -0
  116. package/src/web-components/interaction/bds-dialog.ts +2 -5
  117. package/src/web-components/interaction/bds-drawer.ts +70 -44
  118. package/src/web-components/interaction/bds-dropdown-menu-item.ts +124 -0
  119. package/src/web-components/interaction/bds-dropdown-menu.spec.ts +102 -0
  120. package/src/web-components/interaction/bds-dropdown-menu.ts +200 -0
  121. package/src/web-components/interaction/form/BdsCheckbox.mdx +76 -0
  122. package/src/web-components/interaction/form/BdsCheckbox.stories.tsx +72 -0
  123. package/src/web-components/interaction/form/BdsCheckboxGroup.mdx +70 -0
  124. package/src/web-components/interaction/form/BdsCheckboxGroup.stories.tsx +81 -0
  125. package/src/web-components/interaction/form/BdsCombobox.mdx +71 -0
  126. package/src/web-components/interaction/form/BdsCombobox.stories.tsx +93 -0
  127. package/src/web-components/interaction/form/BdsFileInput.mdx +79 -0
  128. package/src/web-components/interaction/form/BdsFileInput.stories.tsx +69 -0
  129. package/src/web-components/interaction/form/BdsFormInput.mdx +98 -0
  130. package/src/web-components/interaction/form/BdsFormInput.stories.tsx +139 -0
  131. package/src/web-components/interaction/form/BdsNumberInput.mdx +70 -0
  132. package/src/web-components/interaction/form/BdsNumberInput.stories.tsx +68 -0
  133. package/src/web-components/interaction/form/BdsRadio.mdx +72 -0
  134. package/src/web-components/interaction/form/BdsRadio.stories.tsx +58 -0
  135. package/src/web-components/interaction/form/BdsRadioGroup.mdx +73 -0
  136. package/src/web-components/interaction/form/BdsRadioGroup.stories.tsx +88 -0
  137. package/src/web-components/interaction/form/BdsSegmentedControl.mdx +95 -0
  138. package/src/web-components/interaction/form/BdsSegmentedControl.stories.tsx +102 -0
  139. package/src/web-components/interaction/form/BdsSelect.mdx +76 -0
  140. package/src/web-components/interaction/form/BdsSelect.stories.tsx +84 -0
  141. package/src/web-components/interaction/form/BdsSlider.mdx +77 -0
  142. package/src/web-components/interaction/form/BdsSlider.stories.tsx +68 -0
  143. package/src/web-components/interaction/form/BdsSwitch.mdx +72 -0
  144. package/src/web-components/interaction/form/BdsSwitch.stories.tsx +58 -0
  145. package/src/web-components/interaction/form/BdsTextarea.mdx +73 -0
  146. package/src/web-components/interaction/form/BdsTextarea.stories.tsx +70 -0
  147. package/src/web-components/interaction/form/bds-checkbox-group.spec.ts +55 -0
  148. package/src/web-components/interaction/form/bds-checkbox-group.ts +117 -0
  149. package/src/web-components/interaction/form/bds-checkbox.ts +1 -3
  150. package/src/web-components/interaction/form/bds-combobox.ts +1 -3
  151. package/src/web-components/interaction/form/bds-form-input.spec.ts +83 -0
  152. package/src/web-components/interaction/form/bds-form-input.ts +268 -0
  153. package/src/web-components/interaction/form/bds-number-input.ts +3 -4
  154. package/src/web-components/interaction/form/bds-radio-group.spec.ts +62 -0
  155. package/src/web-components/interaction/form/bds-radio-group.ts +142 -0
  156. package/src/web-components/interaction/form/bds-radio.ts +6 -12
  157. package/src/web-components/interaction/form/bds-segmented-control.ts +96 -20
  158. package/src/web-components/interaction/form/bds-select.ts +2 -4
  159. package/src/web-components/interaction/form/bds-switch.ts +3 -4
  160. package/src/web-components/interaction/form/bds-textarea.ts +1 -3
  161. package/src/web-components/ui/BdsAvatar.mdx +76 -0
  162. package/src/web-components/ui/BdsAvatar.stories.tsx +48 -0
  163. package/src/web-components/ui/BdsBreadcrumb.mdx +66 -0
  164. package/src/web-components/ui/BdsBreadcrumb.stories.tsx +49 -0
  165. package/src/web-components/ui/BdsButtonGroup.mdx +69 -0
  166. package/src/web-components/ui/BdsButtonGroup.stories.tsx +66 -0
  167. package/src/web-components/ui/BdsCalendar.mdx +93 -0
  168. package/src/web-components/ui/BdsCalendar.stories.tsx +63 -0
  169. package/src/web-components/ui/BdsCard.mdx +88 -0
  170. package/src/web-components/ui/BdsCard.stories.tsx +67 -0
  171. package/src/web-components/ui/BdsCarousel.mdx +83 -0
  172. package/src/web-components/ui/BdsCarousel.stories.tsx +96 -0
  173. package/src/web-components/ui/BdsDescriptionList.mdx +64 -0
  174. package/src/web-components/ui/BdsDescriptionList.stories.tsx +64 -0
  175. package/src/web-components/ui/BdsIconWrapper.mdx +70 -0
  176. package/src/web-components/ui/BdsIconWrapper.stories.tsx +81 -0
  177. package/src/web-components/ui/BdsLink.mdx +79 -0
  178. package/src/web-components/ui/BdsLink.stories.tsx +63 -0
  179. package/src/web-components/ui/BdsLoading.mdx +58 -0
  180. package/src/web-components/ui/BdsLoading.stories.tsx +35 -0
  181. package/src/web-components/ui/BdsNotificationBanner.mdx +85 -0
  182. package/src/web-components/ui/BdsNotificationBanner.stories.tsx +84 -0
  183. package/src/web-components/ui/BdsPagination.mdx +74 -0
  184. package/src/web-components/ui/BdsPagination.stories.tsx +36 -0
  185. package/src/web-components/ui/BdsProgress.mdx +70 -0
  186. package/src/web-components/ui/BdsProgress.stories.tsx +96 -0
  187. package/src/web-components/ui/BdsProgressCircle.mdx +70 -0
  188. package/src/web-components/ui/BdsProgressCircle.stories.tsx +57 -0
  189. package/src/web-components/ui/BdsRating.mdx +61 -0
  190. package/src/web-components/ui/BdsRating.stories.tsx +45 -0
  191. package/src/web-components/ui/BdsSectionHeader.mdx +72 -0
  192. package/src/web-components/ui/BdsSectionHeader.stories.tsx +54 -0
  193. package/src/web-components/ui/BdsSeparator.mdx +77 -0
  194. package/src/web-components/ui/BdsSeparator.stories.tsx +55 -0
  195. package/src/web-components/ui/BdsSkeleton.mdx +61 -0
  196. package/src/web-components/ui/BdsSkeleton.stories.tsx +50 -0
  197. package/src/web-components/ui/BdsTable.mdx +81 -0
  198. package/src/web-components/ui/BdsTable.stories.tsx +83 -0
  199. package/src/web-components/ui/BdsTypography.mdx +74 -0
  200. package/src/web-components/ui/BdsTypography.stories.tsx +52 -0
  201. package/src/web-components/ui/bds-alert.ts +1 -2
  202. package/src/web-components/ui/bds-button-group.spec.ts +40 -0
  203. package/src/web-components/ui/bds-button-group.ts +78 -0
  204. package/src/web-components/ui/bds-calendar.spec.ts +91 -0
  205. package/src/web-components/ui/bds-calendar.ts +427 -0
  206. package/src/web-components/ui/bds-card.ts +1 -3
  207. package/src/web-components/ui/bds-carousel.spec.ts +64 -0
  208. package/src/web-components/ui/bds-carousel.ts +296 -0
  209. package/src/web-components/ui/bds-notification-banner.ts +1 -2
  210. package/src/web-components/ui/bds-pagination.spec.ts +67 -0
  211. package/src/web-components/ui/bds-pagination.ts +197 -0
  212. package/src/web-components/ui/bds-table.spec.ts +45 -0
  213. package/src/web-components/ui/bds-table.ts +96 -0
@@ -0,0 +1,64 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './BdsDescriptionList.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # &lt;bds-description-list&gt;
7
+
8
+ Framework-agnostic Description List custom element. Wraps slotted `<dt>`/`<dd>` pairs in a styled `<dl>` with stacked or inline layout.
9
+
10
+ > **Status: experimental** — API may change before stable release.
11
+
12
+ ## Installation
13
+
14
+ ```js
15
+ import '@boostdev/components/web-components';
16
+ ```
17
+
18
+ ## When to use
19
+
20
+ - Displaying key–value data such as user profiles, settings summaries, or metadata panels
21
+ - Use `layout="inline"` to place term and value side-by-side on wider screens
22
+
23
+ ## Examples
24
+
25
+ ### Default (stacked)
26
+ <Canvas of={Stories.Default} />
27
+
28
+ ### Stacked
29
+ <Canvas of={Stories.Stacked} />
30
+
31
+ ### Inline
32
+ <Canvas of={Stories.Inline} />
33
+
34
+ ## Props
35
+
36
+ <ArgTypes of={Stories} />
37
+
38
+ ## Attributes
39
+
40
+ | Attribute | Type | Default | Description |
41
+ |-----------|------|---------|-------------|
42
+ | `layout` | `"stacked" \| "inline"` | `"stacked"` | Display mode — stacked places term above value; inline places them side-by-side |
43
+
44
+ ## Slots
45
+
46
+ | Slot | Description |
47
+ |------|-------------|
48
+ | `(default)` | `<dt>` and `<dd>` pairs |
49
+
50
+ ## Usage in plain HTML
51
+
52
+ ```html
53
+ <bds-description-list layout="inline">
54
+ <dt>Name</dt>
55
+ <dd>Jane Doe</dd>
56
+ <dt>Email</dt>
57
+ <dd>jane@example.com</dd>
58
+ </bds-description-list>
59
+ ```
60
+
61
+ ## Accessibility
62
+
63
+ - Renders a native `<dl>` element — screen readers announce it as a description list
64
+ - Ensure every `<dt>` has a corresponding `<dd>`
@@ -0,0 +1,64 @@
1
+ import React from 'react';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import '../index'; // auto-registers all custom elements
4
+
5
+ function BdsDescriptionList({
6
+ layout = 'stacked',
7
+ children,
8
+ }: {
9
+ layout?: 'stacked' | 'inline';
10
+ children?: React.ReactNode;
11
+ }) {
12
+ return React.createElement('bds-description-list', { layout }, children);
13
+ }
14
+
15
+ const meta = {
16
+ title: 'Web Components/UI/DescriptionList',
17
+ component: BdsDescriptionList,
18
+ tags: ['!stable', 'experimental'],
19
+ parameters: { layout: 'centered' },
20
+ argTypes: {
21
+ layout: { control: 'radio', options: ['stacked', 'inline'] },
22
+ },
23
+ } satisfies Meta<typeof BdsDescriptionList>;
24
+
25
+ export default meta;
26
+ type Story = StoryObj<typeof meta>;
27
+
28
+ export const Default: Story = {
29
+ render: () =>
30
+ React.createElement(
31
+ 'bds-description-list',
32
+ { layout: 'stacked' },
33
+ React.createElement('dt', null, 'Name'),
34
+ React.createElement('dd', null, 'Jane Doe'),
35
+ React.createElement('dt', null, 'Email'),
36
+ React.createElement('dd', null, 'jane@example.com'),
37
+ React.createElement('dt', null, 'Role'),
38
+ React.createElement('dd', null, 'Administrator'),
39
+ ),
40
+ };
41
+
42
+ export const Stacked: Story = {
43
+ render: () =>
44
+ React.createElement(
45
+ 'bds-description-list',
46
+ { layout: 'stacked' },
47
+ React.createElement('dt', null, 'Framework'),
48
+ React.createElement('dd', null, 'Lit'),
49
+ React.createElement('dt', null, 'Language'),
50
+ React.createElement('dd', null, 'TypeScript'),
51
+ ),
52
+ };
53
+
54
+ export const Inline: Story = {
55
+ render: () =>
56
+ React.createElement(
57
+ 'bds-description-list',
58
+ { layout: 'inline' },
59
+ React.createElement('dt', null, 'Status'),
60
+ React.createElement('dd', null, 'Active'),
61
+ React.createElement('dt', null, 'Plan'),
62
+ React.createElement('dd', null, 'Professional'),
63
+ ),
64
+ };
@@ -0,0 +1,70 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './BdsIconWrapper.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # &lt;bds-icon-wrapper&gt;
7
+
8
+ Framework-agnostic Icon Wrapper custom element. Displays a slotted icon inside a circular container with design-system background and foreground colour theming.
9
+
10
+ > **Status: experimental** — API may change before stable release.
11
+
12
+ ## Installation
13
+
14
+ ```js
15
+ import '@boostdev/components/web-components';
16
+ ```
17
+
18
+ ## When to use
19
+
20
+ - To visually highlight a feature icon in a card, empty state, or marketing section
21
+ - Use `aria-hidden="true"` when the icon is purely decorative and adjacent text provides the label
22
+
23
+ ## Examples
24
+
25
+ ### Default
26
+ <Canvas of={Stories.Default} />
27
+
28
+ ### With label
29
+ <Canvas of={Stories.WithLabel} />
30
+
31
+ ### Multiple
32
+ <Canvas of={Stories.Multiple} />
33
+
34
+ ## Props
35
+
36
+ <ArgTypes of={Stories} />
37
+
38
+ ## Attributes
39
+
40
+ | Attribute | Type | Default | Description |
41
+ |-----------|------|---------|-------------|
42
+ | `aria-hidden` | string | — | Set to `"true"` for decorative icons |
43
+
44
+ ## Slots
45
+
46
+ | Slot | Description |
47
+ |------|-------------|
48
+ | `(default)` | Icon content (SVG or `<img>`) |
49
+
50
+ ## CSS Custom Properties
51
+
52
+ | Property | Description |
53
+ |----------|-------------|
54
+ | `--icon-wrapper-color` | Background fill of the circular container |
55
+ | `--bds-on-icon-wrapper-color` | Icon/foreground colour inside the wrapper |
56
+
57
+ ## Usage in plain HTML
58
+
59
+ ```html
60
+ <bds-icon-wrapper aria-hidden="true">
61
+ <svg viewBox="0 0 24 24" fill="currentColor" width="24" height="24">
62
+ <path d="M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 21 12 17.77 5.82 21 7 14.14 2 9.27l6.91-1.01z"/>
63
+ </svg>
64
+ </bds-icon-wrapper>
65
+ ```
66
+
67
+ ## Accessibility
68
+
69
+ - Use `aria-hidden="true"` when the icon is decorative and the surrounding content provides context
70
+ - When the icon is standalone and meaningful, omit `aria-hidden` and provide a label via adjacent text or `aria-label` on the wrapper
@@ -0,0 +1,81 @@
1
+ import React from 'react';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import '../index'; // auto-registers all custom elements
4
+
5
+ // Simple star SVG for demonstration
6
+ const StarIcon = () =>
7
+ React.createElement(
8
+ 'svg',
9
+ { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24', fill: 'currentColor', width: 24, height: 24 },
10
+ React.createElement('path', {
11
+ d: 'M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z',
12
+ }),
13
+ );
14
+
15
+ function BdsIconWrapper({
16
+ ariaHidden,
17
+ children,
18
+ }: {
19
+ ariaHidden?: string;
20
+ children?: React.ReactNode;
21
+ }) {
22
+ return React.createElement('bds-icon-wrapper', { 'aria-hidden': ariaHidden }, children);
23
+ }
24
+
25
+ const meta = {
26
+ title: 'Web Components/UI/IconWrapper',
27
+ component: BdsIconWrapper,
28
+ tags: ['!stable', 'experimental'],
29
+ parameters: { layout: 'centered' },
30
+ argTypes: {
31
+ ariaHidden: { control: 'text' },
32
+ },
33
+ } satisfies Meta<typeof BdsIconWrapper>;
34
+
35
+ export default meta;
36
+ type Story = StoryObj<typeof meta>;
37
+
38
+ export const Default: Story = {
39
+ render: () =>
40
+ React.createElement(
41
+ 'bds-icon-wrapper',
42
+ { 'aria-hidden': 'true' },
43
+ React.createElement(StarIcon),
44
+ ),
45
+ };
46
+
47
+ export const Decorative: Story = {
48
+ render: () =>
49
+ React.createElement(
50
+ 'bds-icon-wrapper',
51
+ { 'aria-hidden': 'true' },
52
+ React.createElement(StarIcon),
53
+ ),
54
+ };
55
+
56
+ export const WithLabel: Story = {
57
+ render: () => (
58
+ <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 8 }}>
59
+ {React.createElement(
60
+ 'bds-icon-wrapper',
61
+ {},
62
+ React.createElement(StarIcon),
63
+ )}
64
+ <span>Favourites</span>
65
+ </div>
66
+ ),
67
+ };
68
+
69
+ export const Multiple: Story = {
70
+ render: () => (
71
+ <div style={{ display: 'flex', gap: 16 }}>
72
+ {[1, 2, 3].map(i =>
73
+ React.createElement(
74
+ 'bds-icon-wrapper',
75
+ { key: i, 'aria-hidden': 'true' },
76
+ React.createElement(StarIcon),
77
+ ),
78
+ )}
79
+ </div>
80
+ ),
81
+ };
@@ -0,0 +1,79 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './BdsLink.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # &lt;bds-link&gt;
7
+
8
+ Framework-agnostic Link custom element. Renders a styled `<a>` tag with three visual variants, automatic external link handling, and design-token colours.
9
+
10
+ > **Status: experimental** — API may change before stable release.
11
+
12
+ ## Installation
13
+
14
+ ```js
15
+ import '@boostdev/components/web-components';
16
+ ```
17
+
18
+ ## When to use
19
+
20
+ - Inline hyperlinks within body text (default or subtle)
21
+ - Standalone call-to-action links that should look more prominent (standalone)
22
+ - External links that automatically get `rel="noreferrer noopener"` and a screen reader suffix
23
+
24
+ ## Examples
25
+
26
+ ### All variants
27
+ <Canvas of={Stories.AllVariants} />
28
+
29
+ ### Default
30
+ <Canvas of={Stories.Default} />
31
+
32
+ ### Subtle
33
+ <Canvas of={Stories.Subtle} />
34
+
35
+ ### Standalone
36
+ <Canvas of={Stories.Standalone} />
37
+
38
+ ### External
39
+ <Canvas of={Stories.External} />
40
+
41
+ ## Props
42
+
43
+ <ArgTypes of={Stories} />
44
+
45
+ ## Attributes
46
+
47
+ | Attribute | Type | Default | Description |
48
+ |-----------|------|---------|-------------|
49
+ | `href` | string | — | Link destination URL |
50
+ | `target` | string | — | Standard `<a>` target attribute |
51
+ | `variant` | `"default" \| "subtle" \| "standalone"` | `"default"` | Visual style |
52
+ | `external` | boolean | `false` | Adds `rel="noreferrer noopener"`, forces `target="_blank"`, and appends a visually-hidden screen reader label |
53
+ | `external-label` | string | `"(opens in new tab)"` | Screen reader text appended when `external` is set |
54
+
55
+ ## Slots
56
+
57
+ | Slot | Description |
58
+ |------|-------------|
59
+ | `(default)` | Link text or content |
60
+
61
+ ## CSS Custom Properties
62
+
63
+ | Property | Description |
64
+ |----------|-------------|
65
+ | `--link_color` | Link colour |
66
+ | `--link_color-hover` | Link hover colour |
67
+
68
+ ## Usage in plain HTML
69
+
70
+ ```html
71
+ <bds-link href="https://example.com" external>Visit site</bds-link>
72
+ <p>Read our <bds-link href="/privacy">privacy policy</bds-link>.</p>
73
+ <bds-link href="/docs" variant="standalone">View documentation</bds-link>
74
+ ```
75
+
76
+ ## Accessibility
77
+
78
+ - When `external` is set, a visually-hidden `<span>` with configurable text is appended for screen readers
79
+ - Ensure `href` always points to a valid destination
@@ -0,0 +1,63 @@
1
+ import React from 'react';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import type { LinkVariant } from './bds-link';
4
+ import '../index'; // auto-registers all custom elements
5
+
6
+ function BdsLink({
7
+ href = '#',
8
+ target,
9
+ variant = 'default',
10
+ external,
11
+ externalLabel,
12
+ children,
13
+ }: {
14
+ href?: string;
15
+ target?: string;
16
+ variant?: LinkVariant;
17
+ external?: boolean;
18
+ externalLabel?: string;
19
+ children?: React.ReactNode;
20
+ }) {
21
+ return React.createElement(
22
+ 'bds-link',
23
+ {
24
+ href,
25
+ target,
26
+ variant,
27
+ external: external || undefined,
28
+ 'external-label': externalLabel,
29
+ },
30
+ children,
31
+ );
32
+ }
33
+
34
+ const meta = {
35
+ title: 'Web Components/UI/Link',
36
+ component: BdsLink,
37
+ tags: ['!stable', 'experimental'],
38
+ parameters: { layout: 'centered' },
39
+ argTypes: {
40
+ variant: { control: 'select', options: ['default', 'subtle', 'standalone'] },
41
+ external: { control: 'boolean' },
42
+ },
43
+ } satisfies Meta<typeof BdsLink>;
44
+
45
+ export default meta;
46
+ type Story = StoryObj<typeof meta>;
47
+
48
+ export const Default: Story = { args: { children: 'Default link', variant: 'default', href: '#' } };
49
+ export const Subtle: Story = { args: { children: 'Subtle link', variant: 'subtle', href: '#' } };
50
+ export const Standalone: Story = { args: { children: 'Standalone link', variant: 'standalone', href: '#' } };
51
+ export const External: Story = {
52
+ args: { children: 'Visit our website', href: 'https://example.com', external: true },
53
+ };
54
+
55
+ export const AllVariants: Story = {
56
+ render: () => (
57
+ <div style={{ display: 'flex', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
58
+ {React.createElement('bds-link', { href: '#', variant: 'default' }, 'Default')}
59
+ {React.createElement('bds-link', { href: '#', variant: 'subtle' }, 'Subtle')}
60
+ {React.createElement('bds-link', { href: '#', variant: 'standalone' }, 'Standalone')}
61
+ </div>
62
+ ),
63
+ };
@@ -0,0 +1,58 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './BdsLoading.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # &lt;bds-loading&gt;
7
+
8
+ Framework-agnostic Loading spinner custom element. Displays an animated circular spinner to indicate that a process is in progress.
9
+
10
+ > **Status: experimental** — API may change before stable release.
11
+
12
+ ## Installation
13
+
14
+ ```js
15
+ import '@boostdev/components/web-components';
16
+ ```
17
+
18
+ ## When to use
19
+
20
+ - While a page section or full page is loading content
21
+ - As inline feedback during form submission or data fetching
22
+
23
+ ## Examples
24
+
25
+ ### All sizes
26
+ <Canvas of={Stories.AllSizes} />
27
+
28
+ ### Small
29
+ <Canvas of={Stories.Small} />
30
+
31
+ ### Medium
32
+ <Canvas of={Stories.Medium} />
33
+
34
+ ### Large
35
+ <Canvas of={Stories.Large} />
36
+
37
+ ## Props
38
+
39
+ <ArgTypes of={Stories} />
40
+
41
+ ## Attributes
42
+
43
+ | Attribute | Type | Default | Description |
44
+ |-----------|------|---------|-------------|
45
+ | `size` | `"small" \| "medium" \| "large"` | `"medium"` | Spinner diameter |
46
+
47
+ ## Usage in plain HTML
48
+
49
+ ```html
50
+ <bds-loading></bds-loading>
51
+ <bds-loading size="small"></bds-loading>
52
+ <bds-loading size="large"></bds-loading>
53
+ ```
54
+
55
+ ## Accessibility
56
+
57
+ - Renders `role="status"` with `aria-label="Loading"` so screen readers announce the loading state
58
+ - The spin animation is suppressed when `prefers-reduced-motion: reduce` is set
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import '../index'; // auto-registers all custom elements
4
+
5
+ function BdsLoading({ size = 'medium' }: { size?: 'small' | 'medium' | 'large' }) {
6
+ return React.createElement('bds-loading', { size });
7
+ }
8
+
9
+ const meta = {
10
+ title: 'Web Components/UI/Loading',
11
+ component: BdsLoading,
12
+ tags: ['!stable', 'experimental'],
13
+ parameters: { layout: 'centered' },
14
+ argTypes: {
15
+ size: { control: 'select', options: ['small', 'medium', 'large'] },
16
+ },
17
+ } satisfies Meta<typeof BdsLoading>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ export const Default: Story = { args: { size: 'medium' } };
23
+ export const Small: Story = { args: { size: 'small' } };
24
+ export const Medium: Story = { args: { size: 'medium' } };
25
+ export const Large: Story = { args: { size: 'large' } };
26
+
27
+ export const AllSizes: Story = {
28
+ render: () => (
29
+ <div style={{ display: 'flex', gap: 24, alignItems: 'center' }}>
30
+ {React.createElement('bds-loading', { size: 'small' })}
31
+ {React.createElement('bds-loading', { size: 'medium' })}
32
+ {React.createElement('bds-loading', { size: 'large' })}
33
+ </div>
34
+ ),
35
+ };
@@ -0,0 +1,85 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as Stories from './BdsNotificationBanner.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # &lt;bds-notification-banner&gt;
7
+
8
+ Framework-agnostic Notification Banner custom element. Renders a full-width status banner at the top of a page or section with optional dismiss button and action slot.
9
+
10
+ > **Status: experimental** — API may change before stable release.
11
+
12
+ ## Installation
13
+
14
+ ```js
15
+ import '@boostdev/components/web-components';
16
+ ```
17
+
18
+ ## When to use
19
+
20
+ - To surface page-level status messages (success after save, system errors, maintenance warnings)
21
+ - Use `dismissible` when the user should be able to close the banner manually
22
+ - Place an action element in the `action` slot for in-line links or undo buttons
23
+
24
+ ## Examples
25
+
26
+ ### All variants
27
+ <Canvas of={Stories.AllVariants} />
28
+
29
+ ### Default (info)
30
+ <Canvas of={Stories.Default} />
31
+
32
+ ### Success
33
+ <Canvas of={Stories.Success} />
34
+
35
+ ### Warning
36
+ <Canvas of={Stories.Warning} />
37
+
38
+ ### Error
39
+ <Canvas of={Stories.Error} />
40
+
41
+ ### Dismissible
42
+ <Canvas of={Stories.Dismissible} />
43
+
44
+ ### With action
45
+ <Canvas of={Stories.WithAction} />
46
+
47
+ ## Props
48
+
49
+ <ArgTypes of={Stories} />
50
+
51
+ ## Attributes
52
+
53
+ | Attribute | Type | Default | Description |
54
+ |-----------|------|---------|-------------|
55
+ | `variant` | `"info" \| "success" \| "warning" \| "error"` | `"info"` | Visual style and semantic urgency |
56
+ | `dismissible` | boolean | `false` | Shows a dismiss (×) button |
57
+ | `dismiss-label` | string | `"Dismiss notification"` | `aria-label` for the dismiss button |
58
+
59
+ ## Slots
60
+
61
+ | Slot | Description |
62
+ |------|-------------|
63
+ | `(default)` | Banner body text or HTML |
64
+ | `action` | Optional action area (e.g. a `<button>` or `<a>`) |
65
+
66
+ ## Events
67
+
68
+ | Event | Detail | Description |
69
+ |-------|--------|-------------|
70
+ | `bds-dismiss` | — | Fired when the dismiss button is clicked |
71
+
72
+ ## Usage in plain HTML
73
+
74
+ ```html
75
+ <bds-notification-banner variant="success" dismissible>
76
+ Your changes have been saved.
77
+ <button slot="action" type="button">Undo</button>
78
+ </bds-notification-banner>
79
+ ```
80
+
81
+ ## Accessibility
82
+
83
+ - `error` and `warning` variants render `role="alert"` with `aria-live="assertive"`
84
+ - `info` and `success` variants render `role="status"` with `aria-live="polite"`
85
+ - The dismiss button has a configurable `aria-label` via `dismiss-label`
@@ -0,0 +1,84 @@
1
+ import React from 'react';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import type { NotificationBannerVariant } from './bds-notification-banner';
4
+ import '../index'; // auto-registers all custom elements
5
+
6
+ function BdsNotificationBanner({
7
+ variant = 'info',
8
+ dismissible,
9
+ dismissLabel,
10
+ children,
11
+ action,
12
+ }: {
13
+ variant?: NotificationBannerVariant;
14
+ dismissible?: boolean;
15
+ dismissLabel?: string;
16
+ children?: React.ReactNode;
17
+ action?: React.ReactNode;
18
+ }) {
19
+ return React.createElement(
20
+ 'bds-notification-banner',
21
+ {
22
+ variant,
23
+ dismissible: dismissible || undefined,
24
+ 'dismiss-label': dismissLabel,
25
+ },
26
+ children,
27
+ action
28
+ ? React.createElement('span', { slot: 'action' }, action)
29
+ : undefined,
30
+ );
31
+ }
32
+
33
+ const meta = {
34
+ title: 'Web Components/UI/NotificationBanner',
35
+ component: BdsNotificationBanner,
36
+ tags: ['!stable', 'experimental'],
37
+ parameters: { layout: 'fullscreen' },
38
+ argTypes: {
39
+ variant: { control: 'select', options: ['info', 'success', 'warning', 'error'] },
40
+ dismissible: { control: 'boolean' },
41
+ },
42
+ } satisfies Meta<typeof BdsNotificationBanner>;
43
+
44
+ export default meta;
45
+ type Story = StoryObj<typeof meta>;
46
+
47
+ export const Default: Story = {
48
+ args: { children: 'This is an informational banner.', variant: 'info' },
49
+ };
50
+ export const Success: Story = {
51
+ args: { children: 'Your changes have been saved successfully.', variant: 'success' },
52
+ };
53
+ export const Warning: Story = {
54
+ args: { children: 'Please review your settings before continuing.', variant: 'warning' },
55
+ };
56
+ export const Error: Story = {
57
+ args: { children: 'An error occurred. Please try again.', variant: 'error' },
58
+ };
59
+ export const Dismissible: Story = {
60
+ args: { children: 'You can dismiss this banner.', variant: 'info', dismissible: true },
61
+ };
62
+ export const WithAction: Story = {
63
+ render: () =>
64
+ React.createElement(
65
+ 'bds-notification-banner',
66
+ { variant: 'success' },
67
+ 'Your file has been uploaded.',
68
+ React.createElement('button', { slot: 'action', type: 'button' }, 'Undo'),
69
+ ),
70
+ };
71
+
72
+ export const AllVariants: Story = {
73
+ render: () => (
74
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 0 }}>
75
+ {(['info', 'success', 'warning', 'error'] as const).map(v =>
76
+ React.createElement(
77
+ 'bds-notification-banner',
78
+ { key: v, variant: v },
79
+ `This is a ${v} notification banner.`,
80
+ ),
81
+ )}
82
+ </div>
83
+ ),
84
+ };