@boostdev/design-system-components 1.0.2 → 1.1.0

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 (268) hide show
  1. package/AGENTS.md +20 -18
  2. package/dist/client.cjs +236 -153
  3. package/dist/client.css +785 -702
  4. package/dist/client.d.cts +53 -94
  5. package/dist/client.d.ts +53 -94
  6. package/dist/client.js +237 -163
  7. package/dist/index.cjs +236 -153
  8. package/dist/index.css +785 -702
  9. package/dist/index.d.cts +53 -94
  10. package/dist/index.d.ts +53 -94
  11. package/dist/index.js +237 -163
  12. package/dist/native/index.cjs +991 -0
  13. package/dist/native/index.d.cts +208 -0
  14. package/dist/native/index.d.ts +208 -0
  15. package/dist/native/index.js +968 -0
  16. package/dist/web-components.d.ts +303 -0
  17. package/dist/web-components.js +1968 -0
  18. package/package.json +29 -7
  19. package/src/components/interaction/Button/Button.module.css +14 -11
  20. package/src/components/interaction/Button/Button.native.spec.tsx +35 -0
  21. package/src/components/interaction/Button/Button.native.stories.tsx +42 -0
  22. package/src/components/interaction/Button/Button.native.tsx +95 -0
  23. package/src/components/interaction/Button/Button.stories.tsx +1 -1
  24. package/src/components/interaction/Button/Button.tsx +2 -2
  25. package/src/components/interaction/Command/Command.mdx +16 -0
  26. package/src/components/interaction/Command/Command.module.css +12 -12
  27. package/src/components/interaction/Command/Command.stories.tsx +1 -1
  28. package/src/components/interaction/Command/Command.tsx +2 -2
  29. package/src/components/interaction/Dialog/Dialog.module.css +3 -3
  30. package/src/components/interaction/Dialog/Dialog.stories.tsx +1 -1
  31. package/src/components/interaction/Dialog/Dialog.tsx +2 -2
  32. package/src/components/interaction/Drawer/Drawer.mdx +14 -0
  33. package/src/components/interaction/Drawer/Drawer.module.css +3 -3
  34. package/src/components/interaction/Drawer/Drawer.stories.tsx +1 -1
  35. package/src/components/interaction/Drawer/Drawer.tsx +2 -2
  36. package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +3 -3
  37. package/src/components/interaction/DropdownMenu/DropdownMenu.stories.tsx +1 -1
  38. package/src/components/interaction/DropdownMenu/DropdownMenu.tsx +2 -2
  39. package/src/components/interaction/Popover/Popover.mdx +17 -0
  40. package/src/components/interaction/Popover/Popover.module.css +72 -15
  41. package/src/components/interaction/Popover/Popover.spec.tsx +68 -4
  42. package/src/components/interaction/Popover/Popover.stories.tsx +1 -1
  43. package/src/components/interaction/Popover/Popover.tsx +76 -20
  44. package/src/components/interaction/Rating/Rating.module.css +2 -2
  45. package/src/components/interaction/Rating/Rating.stories.tsx +1 -1
  46. package/src/components/interaction/Rating/Rating.tsx +2 -2
  47. package/src/components/interaction/Toast/Toast.module.css +16 -11
  48. package/src/components/interaction/Toast/Toast.spec.tsx +21 -0
  49. package/src/components/interaction/Toast/Toast.stories.tsx +1 -1
  50. package/src/components/interaction/Toast/Toast.tsx +22 -2
  51. package/src/components/interaction/form/Checkbox/Checkbox.mdx +2 -2
  52. package/src/components/interaction/form/Checkbox/Checkbox.module.css +5 -5
  53. package/src/components/interaction/form/Checkbox/Checkbox.native.spec.tsx +42 -0
  54. package/src/components/interaction/form/Checkbox/Checkbox.native.stories.tsx +36 -0
  55. package/src/components/interaction/form/Checkbox/Checkbox.native.tsx +80 -0
  56. package/src/components/interaction/form/Checkbox/Checkbox.stories.tsx +1 -1
  57. package/src/components/interaction/form/Checkbox/Checkbox.tsx +2 -2
  58. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.mdx +44 -0
  59. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.module.css +2 -2
  60. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.stories.tsx +1 -1
  61. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx +2 -2
  62. package/src/components/interaction/form/Combobox/Combobox.mdx +21 -0
  63. package/src/components/interaction/form/Combobox/Combobox.module.css +8 -8
  64. package/src/components/interaction/form/Combobox/Combobox.stories.tsx +1 -1
  65. package/src/components/interaction/form/Combobox/Combobox.tsx +2 -2
  66. package/src/components/interaction/form/FileInput/FileInput.mdx +14 -0
  67. package/src/components/interaction/form/FileInput/FileInput.module.css +8 -8
  68. package/src/components/interaction/form/FileInput/FileInput.stories.tsx +1 -1
  69. package/src/components/interaction/form/FileInput/FileInput.tsx +2 -2
  70. package/src/components/interaction/form/FormInput/FormInput.module.css +2 -2
  71. package/src/components/interaction/form/FormInput/FormInput.stories.tsx +1 -1
  72. package/src/components/interaction/form/FormInput/FormInput.tsx +2 -2
  73. package/src/components/interaction/form/NumberInput/NumberInput.mdx +16 -0
  74. package/src/components/interaction/form/NumberInput/NumberInput.module.css +4 -4
  75. package/src/components/interaction/form/NumberInput/NumberInput.stories.tsx +1 -1
  76. package/src/components/interaction/form/NumberInput/NumberInput.tsx +2 -2
  77. package/src/components/interaction/form/Radio/Radio.mdx +3 -3
  78. package/src/components/interaction/form/Radio/Radio.module.css +6 -6
  79. package/src/components/interaction/form/Radio/Radio.native.stories.tsx +46 -0
  80. package/src/components/interaction/form/Radio/Radio.native.tsx +79 -0
  81. package/src/components/interaction/form/Radio/Radio.stories.tsx +1 -1
  82. package/src/components/interaction/form/Radio/Radio.tsx +2 -2
  83. package/src/components/interaction/form/RadioGroup/RadioGroup.mdx +45 -0
  84. package/src/components/interaction/form/RadioGroup/RadioGroup.module.css +2 -2
  85. package/src/components/interaction/form/RadioGroup/RadioGroup.stories.tsx +1 -1
  86. package/src/components/interaction/form/RadioGroup/RadioGroup.tsx +2 -2
  87. package/src/components/interaction/form/SegmentedControl/SegmentedControl.module.css +5 -5
  88. package/src/components/interaction/form/SegmentedControl/SegmentedControl.stories.tsx +1 -1
  89. package/src/components/interaction/form/SegmentedControl/SegmentedControl.tsx +2 -2
  90. package/src/components/interaction/form/Select/Select.module.css +3 -3
  91. package/src/components/interaction/form/Select/Select.stories.tsx +1 -1
  92. package/src/components/interaction/form/Select/Select.tsx +2 -2
  93. package/src/components/interaction/form/Slider/Slider.mdx +1 -1
  94. package/src/components/interaction/form/Slider/Slider.module.css +14 -14
  95. package/src/components/interaction/form/Slider/Slider.stories.tsx +1 -1
  96. package/src/components/interaction/form/Slider/Slider.tsx +2 -2
  97. package/src/components/interaction/form/Switch/Switch.mdx +4 -4
  98. package/src/components/interaction/form/Switch/Switch.module.css +8 -8
  99. package/src/components/interaction/form/Switch/Switch.native.spec.tsx +60 -0
  100. package/src/components/interaction/form/Switch/Switch.native.stories.tsx +35 -0
  101. package/src/components/interaction/form/Switch/Switch.native.tsx +59 -0
  102. package/src/components/interaction/form/Switch/Switch.stories.tsx +1 -1
  103. package/src/components/interaction/form/Switch/Switch.tsx +2 -2
  104. package/src/components/interaction/form/Textarea/Textarea.mdx +17 -0
  105. package/src/components/interaction/form/Textarea/Textarea.module.css +2 -2
  106. package/src/components/interaction/form/Textarea/Textarea.stories.tsx +1 -1
  107. package/src/components/interaction/form/Textarea/Textarea.tsx +2 -2
  108. package/src/components/interaction/form/atoms/InputContainer.tsx +2 -1
  109. package/src/components/interaction/form/atoms/Label.module.css +1 -1
  110. package/src/components/interaction/form/atoms/Label.native.stories.tsx +18 -0
  111. package/src/components/interaction/form/atoms/Label.native.tsx +29 -0
  112. package/src/components/interaction/form/atoms/Label.tsx +5 -3
  113. package/src/components/interaction/form/atoms/Message.native.spec.tsx +30 -0
  114. package/src/components/interaction/form/atoms/Message.native.stories.tsx +22 -0
  115. package/src/components/interaction/form/atoms/Message.native.tsx +34 -0
  116. package/src/components/interaction/form/atoms/Message.tsx +5 -3
  117. package/src/components/layout/ButtonGroup/ButtonGroup.native.stories.tsx +50 -0
  118. package/src/components/layout/ButtonGroup/ButtonGroup.native.tsx +34 -0
  119. package/src/components/layout/ButtonGroup/ButtonGroup.stories.tsx +1 -1
  120. package/src/components/layout/ButtonGroup/ButtonGroup.tsx +2 -2
  121. package/src/components/layout/Card/Card.module.css +2 -2
  122. package/src/components/layout/Card/Card.native.stories.tsx +53 -0
  123. package/src/components/layout/Card/Card.native.tsx +89 -0
  124. package/src/components/layout/Card/Card.stories.tsx +1 -1
  125. package/src/components/layout/Card/Card.tsx +2 -2
  126. package/src/components/layout/IconWrapper/IconWrapper.mdx +2 -2
  127. package/src/components/layout/IconWrapper/IconWrapper.module.css +3 -3
  128. package/src/components/layout/IconWrapper/IconWrapper.native.spec.tsx +39 -0
  129. package/src/components/layout/IconWrapper/IconWrapper.native.stories.tsx +41 -0
  130. package/src/components/layout/IconWrapper/IconWrapper.native.tsx +20 -0
  131. package/src/components/layout/IconWrapper/IconWrapper.stories.tsx +1 -1
  132. package/src/components/layout/IconWrapper/IconWrapper.tsx +2 -2
  133. package/src/components/layout/SectionHeader/SectionHeader.mdx +13 -0
  134. package/src/components/layout/SectionHeader/SectionHeader.module.css +2 -2
  135. package/src/components/layout/SectionHeader/SectionHeader.native.stories.tsx +38 -0
  136. package/src/components/layout/SectionHeader/SectionHeader.native.tsx +79 -0
  137. package/src/components/layout/SectionHeader/SectionHeader.stories.tsx +1 -1
  138. package/src/components/layout/SectionHeader/SectionHeader.tsx +2 -2
  139. package/src/components/ui/Accordion/Accordion.mdx +14 -0
  140. package/src/components/ui/Accordion/Accordion.module.css +5 -5
  141. package/src/components/ui/Accordion/Accordion.stories.tsx +1 -1
  142. package/src/components/ui/Accordion/Accordion.tsx +2 -2
  143. package/src/components/ui/Alert/Alert.module.css +15 -15
  144. package/src/components/ui/Alert/Alert.native.stories.tsx +43 -0
  145. package/src/components/ui/Alert/Alert.native.tsx +94 -0
  146. package/src/components/ui/Alert/Alert.stories.tsx +1 -1
  147. package/src/components/ui/Alert/Alert.tsx +2 -2
  148. package/src/components/ui/Avatar/Avatar.module.css +2 -2
  149. package/src/components/ui/Avatar/Avatar.native.spec.tsx +47 -0
  150. package/src/components/ui/Avatar/Avatar.native.stories.tsx +34 -0
  151. package/src/components/ui/Avatar/Avatar.native.tsx +85 -0
  152. package/src/components/ui/Avatar/Avatar.stories.tsx +1 -1
  153. package/src/components/ui/Avatar/Avatar.tsx +2 -2
  154. package/src/components/ui/Badge/Badge.mdx +2 -2
  155. package/src/components/ui/Badge/Badge.module.css +12 -12
  156. package/src/components/ui/Badge/Badge.native.stories.tsx +36 -0
  157. package/src/components/ui/Badge/Badge.native.tsx +50 -0
  158. package/src/components/ui/Badge/Badge.stories.tsx +1 -1
  159. package/src/components/ui/Badge/Badge.tsx +2 -2
  160. package/src/components/ui/Breadcrumb/Breadcrumb.module.css +2 -2
  161. package/src/components/ui/Breadcrumb/Breadcrumb.stories.tsx +1 -1
  162. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +2 -2
  163. package/src/components/ui/Calendar/Calendar.mdx +16 -0
  164. package/src/components/ui/Calendar/Calendar.module.css +11 -11
  165. package/src/components/ui/Calendar/Calendar.stories.tsx +1 -1
  166. package/src/components/ui/Calendar/Calendar.tsx +2 -2
  167. package/src/components/ui/Carousel/Carousel.module.css +4 -4
  168. package/src/components/ui/Carousel/Carousel.stories.tsx +1 -1
  169. package/src/components/ui/Carousel/Carousel.tsx +2 -2
  170. package/src/components/ui/Collapsible/Collapsible.module.css +6 -6
  171. package/src/components/ui/Collapsible/Collapsible.stories.tsx +1 -1
  172. package/src/components/ui/Collapsible/Collapsible.tsx +2 -2
  173. package/src/components/ui/DescriptionList/DescriptionList.module.css +3 -3
  174. package/src/components/ui/DescriptionList/DescriptionList.stories.tsx +1 -1
  175. package/src/components/ui/DescriptionList/DescriptionList.tsx +2 -2
  176. package/src/components/ui/Link/Link.mdx +14 -0
  177. package/src/components/ui/Link/Link.module.css +4 -4
  178. package/src/components/ui/Link/Link.stories.tsx +1 -1
  179. package/src/components/ui/Link/Link.tsx +2 -2
  180. package/src/components/ui/Loading/Loading.module.css +2 -2
  181. package/src/components/ui/Loading/Loading.native.spec.tsx +24 -0
  182. package/src/components/ui/Loading/Loading.native.stories.tsx +33 -0
  183. package/src/components/ui/Loading/Loading.native.tsx +29 -0
  184. package/src/components/ui/Loading/Loading.stories.tsx +1 -1
  185. package/src/components/ui/Loading/Loading.tsx +2 -2
  186. package/src/components/ui/NotificationBanner/NotificationBanner.module.css +15 -15
  187. package/src/components/ui/NotificationBanner/NotificationBanner.native.stories.tsx +39 -0
  188. package/src/components/ui/NotificationBanner/NotificationBanner.native.tsx +76 -0
  189. package/src/components/ui/NotificationBanner/NotificationBanner.stories.tsx +1 -1
  190. package/src/components/ui/NotificationBanner/NotificationBanner.tsx +2 -2
  191. package/src/components/ui/Pagination/Pagination.module.css +8 -8
  192. package/src/components/ui/Pagination/Pagination.stories.tsx +1 -1
  193. package/src/components/ui/Pagination/Pagination.tsx +2 -2
  194. package/src/components/ui/Progress/Progress.mdx +1 -1
  195. package/src/components/ui/Progress/Progress.module.css +3 -3
  196. package/src/components/ui/Progress/Progress.native.stories.tsx +34 -0
  197. package/src/components/ui/Progress/Progress.native.tsx +84 -0
  198. package/src/components/ui/Progress/Progress.stories.tsx +1 -1
  199. package/src/components/ui/Progress/Progress.tsx +2 -2
  200. package/src/components/ui/ProgressCircle/ProgressCircle.module.css +3 -3
  201. package/src/components/ui/ProgressCircle/ProgressCircle.stories.tsx +1 -1
  202. package/src/components/ui/ProgressCircle/ProgressCircle.tsx +2 -2
  203. package/src/components/ui/Separator/Separator.mdx +14 -0
  204. package/src/components/ui/Separator/Separator.module.css +1 -1
  205. package/src/components/ui/Separator/Separator.native.stories.tsx +42 -0
  206. package/src/components/ui/Separator/Separator.native.tsx +32 -0
  207. package/src/components/ui/Separator/Separator.stories.tsx +1 -1
  208. package/src/components/ui/Separator/Separator.tsx +2 -2
  209. package/src/components/ui/Skeleton/Skeleton.module.css +3 -3
  210. package/src/components/ui/Skeleton/Skeleton.native.stories.tsx +33 -0
  211. package/src/components/ui/Skeleton/Skeleton.native.tsx +41 -0
  212. package/src/components/ui/Skeleton/Skeleton.stories.tsx +1 -1
  213. package/src/components/ui/Skeleton/Skeleton.tsx +2 -3
  214. package/src/components/ui/SkipLink/SkipLink.module.css +3 -3
  215. package/src/components/ui/SkipLink/SkipLink.stories.tsx +1 -1
  216. package/src/components/ui/SkipLink/SkipLink.tsx +5 -3
  217. package/src/components/ui/Table/Table.mdx +14 -0
  218. package/src/components/ui/Table/Table.module.css +11 -11
  219. package/src/components/ui/Table/Table.stories.tsx +1 -1
  220. package/src/components/ui/Table/Table.tsx +2 -2
  221. package/src/components/ui/Tabs/Tabs.module.css +3 -3
  222. package/src/components/ui/Tabs/Tabs.stories.tsx +1 -1
  223. package/src/components/ui/Tabs/Tabs.tsx +2 -2
  224. package/src/components/ui/Tooltip/Tooltip.mdx +14 -0
  225. package/src/components/ui/Tooltip/Tooltip.module.css +2 -2
  226. package/src/components/ui/Tooltip/Tooltip.stories.tsx +1 -1
  227. package/src/components/ui/Tooltip/Tooltip.tsx +2 -2
  228. package/src/components/ui/Typography/Typography.mdx +13 -0
  229. package/src/components/ui/Typography/Typography.module.css +1 -1
  230. package/src/components/ui/Typography/Typography.native.stories.tsx +38 -0
  231. package/src/components/ui/Typography/Typography.native.tsx +65 -0
  232. package/src/components/ui/Typography/Typography.stories.tsx +1 -1
  233. package/src/components/ui/Typography/Typography.tsx +2 -2
  234. package/src/css/bdc.css +10 -2
  235. package/src/index.ts +3 -0
  236. package/src/native/ThemeContext.tsx +28 -0
  237. package/src/native/tokens.ts +13 -0
  238. package/src/native.ts +39 -0
  239. package/src/react-augment.d.ts +13 -0
  240. package/src/stories/DesignSystem/Borders.mdx +7 -7
  241. package/src/stories/DesignSystem/Colors.mdx +28 -29
  242. package/src/stories/DesignSystem/DarkMode.mdx +130 -0
  243. package/src/stories/DesignSystem/Elevation.mdx +4 -4
  244. package/src/stories/DesignSystem/Grid.mdx +5 -5
  245. package/src/stories/DesignSystem/Motion.mdx +2 -2
  246. package/src/stories/DesignSystem/Overview.mdx +1 -1
  247. package/src/stories/DesignSystem/Spacing.mdx +3 -3
  248. package/src/stories/DesignSystem/Typography.mdx +6 -6
  249. package/src/types.ts +2 -0
  250. package/src/typings.d.ts +3 -0
  251. package/src/web-components/globals.ts +61 -0
  252. package/src/web-components/index.ts +12 -0
  253. package/src/web-components/interaction/BdsButton.stories.tsx +60 -0
  254. package/src/web-components/interaction/BdsPopover.stories.tsx +70 -0
  255. package/src/web-components/interaction/BdsToastProvider.stories.tsx +73 -0
  256. package/src/web-components/interaction/bds-button.spec.ts +95 -0
  257. package/src/web-components/interaction/bds-button.ts +293 -0
  258. package/src/web-components/interaction/bds-popover.spec.ts +126 -0
  259. package/src/web-components/interaction/bds-popover.ts +217 -0
  260. package/src/web-components/interaction/bds-toast-provider.spec.ts +122 -0
  261. package/src/web-components/interaction/bds-toast-provider.ts +211 -0
  262. package/src/web-components/test/helpers.ts +14 -0
  263. package/src/web-components/ui/BdsAlert.stories.tsx +60 -0
  264. package/src/web-components/ui/BdsBadge.stories.tsx +37 -0
  265. package/src/web-components/ui/bds-alert.spec.ts +109 -0
  266. package/src/web-components/ui/bds-alert.ts +209 -0
  267. package/src/web-components/ui/bds-badge.spec.ts +51 -0
  268. package/src/web-components/ui/bds-badge.ts +88 -0
@@ -1,6 +1,7 @@
1
1
  import { useState, useId, KeyboardEvent } from 'react';
2
2
  import css from './Calendar.module.css';
3
3
  import { cn } from '@boostdev/design-system-foundation';
4
+ import type { WithClassName } from '../../../types';
4
5
 
5
6
  const DAYS = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
6
7
  const DAY_LABELS: Record<string, string> = {
@@ -12,13 +13,12 @@ const MONTHS = [
12
13
  'July', 'August', 'September', 'October', 'November', 'December',
13
14
  ];
14
15
 
15
- interface CalendarProps {
16
+ interface CalendarProps extends WithClassName {
16
17
  value?: Date;
17
18
  defaultValue?: Date;
18
19
  min?: Date;
19
20
  max?: Date;
20
21
  onChange?: (date: Date) => void;
21
- className?: string;
22
22
  }
23
23
 
24
24
  function isSameDay(a: Date, b: Date): boolean {
@@ -33,10 +33,10 @@
33
33
  width: 2.5rem;
34
34
  height: 2.5rem;
35
35
  border-radius: 50%;
36
- background-color: var(--bds-bg);
37
- color: var(--bds-on-bg);
36
+ background-color: var(--bds-color_bg);
37
+ color: var(--bds-color_on-bg);
38
38
 
39
- --bdc_color: var(--bds-on-bg);
39
+ --bdc_color: var(--bds-color_on-bg);
40
40
 
41
41
  border: none;
42
42
  outline: var(--bdc-outline_width) solid var(--bdc_color);
@@ -59,7 +59,7 @@
59
59
 
60
60
  @media (hover: hover) and (pointer: fine) {
61
61
  .navBtn:hover {
62
- background-color: var(--bds-bg--subtle);
62
+ background-color: var(--bds-color_bg--subtle);
63
63
  }
64
64
  }
65
65
 
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Carousel } from './Carousel';
3
3
 
4
4
  const meta = {
5
- title: 'UI/Carousel',
5
+ title: 'React/UI/Carousel',
6
6
  component: Carousel,
7
7
  } satisfies Meta<typeof Carousel>;
8
8
 
@@ -1,11 +1,11 @@
1
1
  import { ReactNode, useRef, useId } from 'react';
2
2
  import css from './Carousel.module.css';
3
3
  import { cn } from '@boostdev/design-system-foundation';
4
+ import type { WithClassName } from '../../../types';
4
5
 
5
- interface CarouselProps {
6
+ interface CarouselProps extends WithClassName {
6
7
  items: ReactNode[];
7
8
  label: string;
8
- className?: string;
9
9
  }
10
10
 
11
11
  export function Carousel({ items, label, className }: Readonly<CarouselProps>) {
@@ -1,6 +1,6 @@
1
1
  @layer component {
2
2
  .collapsible {
3
- border: var(--collapsible_border-width, 1px) solid var(--collapsible_border-color, var(--bds-bg--subtle));
3
+ border: var(--collapsible_border-width, 1px) solid var(--collapsible_border-color, var(--bds-color_bg--subtle));
4
4
  border-radius: var(--collapsible_border-radius, var(--bds-border_radius--m));
5
5
  overflow: hidden;
6
6
  }
@@ -15,8 +15,8 @@
15
15
  cursor: pointer;
16
16
  font-weight: var(--bds-font_weight--semibold);
17
17
  font-size: var(--bds-font_size--body);
18
- color: var(--collapsible_color, var(--bds-on-bg));
19
- background-color: var(--collapsible_bg, var(--bds-bg));
18
+ color: var(--collapsible_color, var(--bds-color_on-bg));
19
+ background-color: var(--collapsible_bg, var(--bds-color_bg));
20
20
  user-select: none;
21
21
  transition: var(--bds-animation_transition);
22
22
  }
@@ -33,13 +33,13 @@
33
33
 
34
34
  @media (hover: hover) and (pointer: fine) {
35
35
  .summary:hover {
36
- background-color: var(--collapsible_bg--hover, var(--bds-bg--subtle));
36
+ background-color: var(--collapsible_bg--hover, var(--bds-color_bg--subtle));
37
37
  }
38
38
  }
39
39
 
40
40
  /* Separator when open */
41
41
  .collapsible[open] > .summary {
42
- border-block-end: var(--collapsible_border-width, 1px) solid var(--collapsible_border-color, var(--bds-bg--subtle));
42
+ border-block-end: var(--collapsible_border-width, 1px) solid var(--collapsible_border-color, var(--bds-color_bg--subtle));
43
43
  }
44
44
 
45
45
  .summaryContent {
@@ -63,7 +63,7 @@
63
63
 
64
64
  .content {
65
65
  padding: var(--bds-space_m);
66
- color: var(--collapsible_on-color, var(--bds-on-bg));
66
+ color: var(--collapsible_on-color, var(--bds-color_on-bg));
67
67
  font-size: var(--bds-font_size--body);
68
68
  line-height: var(--bds-font_line-height--body);
69
69
  }
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Collapsible } from './Collapsible';
3
3
 
4
4
  const meta = {
5
- title: 'UI/Collapsible',
5
+ title: 'React/UI/Collapsible',
6
6
  component: Collapsible,
7
7
  } satisfies Meta<typeof Collapsible>;
8
8
 
@@ -1,8 +1,9 @@
1
1
  import { HTMLAttributes, ReactNode, SyntheticEvent } from 'react';
2
2
  import css from './Collapsible.module.css';
3
3
  import { cn } from '@boostdev/design-system-foundation';
4
+ import type { WithClassName } from '../../../types';
4
5
 
5
- export interface CollapsibleProps extends Omit<HTMLAttributes<HTMLDetailsElement>, 'onToggle'> {
6
+ export interface CollapsibleProps extends WithClassName, Omit<HTMLAttributes<HTMLDetailsElement>, 'onToggle'> {
6
7
  /** The trigger label — always visible */
7
8
  summary: ReactNode;
8
9
  /** The content revealed when expanded */
@@ -18,7 +19,6 @@ export interface CollapsibleProps extends Omit<HTMLAttributes<HTMLDetailsElement
18
19
  * (native <details name="…"> behaviour).
19
20
  */
20
21
  name?: string;
21
- className?: string;
22
22
  }
23
23
 
24
24
  export function Collapsible({
@@ -6,7 +6,7 @@
6
6
  margin: 0;
7
7
  padding: 0;
8
8
  font-size: var(--bds-font_size--body);
9
- color: var(--bds-on-bg);
9
+ color: var(--bds-color_on-bg);
10
10
  }
11
11
 
12
12
  .group {
@@ -17,12 +17,12 @@
17
17
 
18
18
  .term {
19
19
  font-weight: var(--bds-font_weight--semibold);
20
- color: var(--bds-on-bg);
20
+ color: var(--bds-color_on-bg);
21
21
  }
22
22
 
23
23
  .details {
24
24
  margin: 0;
25
- color: var(--bds-on-bg);
25
+ color: var(--bds-color_on-bg);
26
26
  }
27
27
 
28
28
  /* Inline layout */
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { DescriptionList } from './DescriptionList';
3
3
 
4
4
  const meta = {
5
- title: 'UI/DescriptionList',
5
+ title: 'React/UI/DescriptionList',
6
6
  component: DescriptionList,
7
7
  } satisfies Meta<typeof DescriptionList>;
8
8
 
@@ -1,16 +1,16 @@
1
1
  import { ReactNode } from 'react';
2
2
  import css from './DescriptionList.module.css';
3
3
  import { cn } from '@boostdev/design-system-foundation';
4
+ import type { WithClassName } from '../../../types';
4
5
 
5
6
  export interface DescriptionItem {
6
7
  term: ReactNode;
7
8
  details: ReactNode | ReactNode[];
8
9
  }
9
10
 
10
- interface DescriptionListProps {
11
+ interface DescriptionListProps extends WithClassName {
11
12
  items: DescriptionItem[];
12
13
  layout?: 'stacked' | 'inline';
13
- className?: string;
14
14
  }
15
15
 
16
16
  export function DescriptionList({ items, layout = 'stacked', className }: Readonly<DescriptionListProps>) {
@@ -38,6 +38,20 @@ Styled anchor element with three visual variants. Renders as `<a>` by default, b
38
38
 
39
39
  <ArgTypes of={Stories} />
40
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>`--link_color`</td><td>`var(--bds-color_interactive_on-bg)`</td><td>Link text colour</td></tr>
50
+ <tr><td>`--link_color-hover`</td><td>`var(--bds-color_blue--strong)`</td><td>Link text colour on hover</td></tr>
51
+ </tbody>
52
+ </table>
53
+
54
+
41
55
  ## Accessibility
42
56
 
43
57
  - External links add `target="_blank"` with `rel="noopener noreferrer"` and a visually-hidden "(opens in new tab)" label
@@ -15,23 +15,23 @@
15
15
 
16
16
  @media (hover: hover) and (pointer: fine) {
17
17
  .link:hover {
18
- --link_color: var(--link_color-hover, var(--bds-blue--strong));
18
+ --link_color: var(--link_color-hover, var(--bds-color_blue--strong));
19
19
  }
20
20
  }
21
21
 
22
22
  .--variant_default {
23
23
  --link_color: var(--bds-color_interactive_on-bg);
24
- --link_color-hover: var(--bds-blue--strong);
24
+ --link_color-hover: var(--bds-color_blue--strong);
25
25
  }
26
26
 
27
27
  .--variant_subtle {
28
- --link_color: var(--bds-on-bg);
28
+ --link_color: var(--bds-color_on-bg);
29
29
  --link_color-hover: var(--bds-color_interactive_on-bg);
30
30
  }
31
31
 
32
32
  .--variant_standalone {
33
33
  --link_color: var(--bds-color_interactive_on-bg);
34
- --link_color-hover: var(--bds-blue--strong);
34
+ --link_color-hover: var(--bds-color_blue--strong);
35
35
 
36
36
  display: inline-flex;
37
37
  align-items: center;
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Link } from './Link';
3
3
 
4
4
  const meta = {
5
- title: 'UI/Link',
5
+ title: 'React/UI/Link',
6
6
  component: Link,
7
7
  argTypes: {
8
8
  variant: { control: 'radio', options: ['default', 'subtle', 'standalone'] },
@@ -1,14 +1,14 @@
1
1
  import { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
2
2
  import css from './Link.module.css';
3
3
  import { cn } from '@boostdev/design-system-foundation';
4
+ import type { WithClassName } from '../../../types';
4
5
 
5
- type LinkOwnProps<T extends ElementType> = {
6
+ type LinkOwnProps<T extends ElementType> = WithClassName & {
6
7
  as?: T;
7
8
  children: ReactNode;
8
9
  variant?: 'default' | 'subtle' | 'standalone';
9
10
  external?: boolean;
10
11
  externalLabel?: string;
11
- className?: string;
12
12
  };
13
13
 
14
14
  type LinkProps<T extends ElementType = 'a'> = LinkOwnProps<T> &
@@ -8,8 +8,8 @@
8
8
  .spinner {
9
9
  width: 2.5em;
10
10
  height: 2.5em;
11
- border: 4px solid var(--bds-bg);
12
- border-top: 4px solid var(--bds-interactive);
11
+ border: 4px solid var(--bds-color_bg);
12
+ border-top: 4px solid var(--bds-color_interactive);
13
13
  border-radius: 50%;
14
14
  animation: spin 1s linear infinite;
15
15
  }
@@ -0,0 +1,24 @@
1
+ import { render, screen } from '@testing-library/react';
2
+ import { ThemeProvider } from '../../../native/ThemeContext';
3
+ import { Loading } from './Loading.native';
4
+
5
+ function renderWithTheme(ui: React.ReactElement) {
6
+ return render(<ThemeProvider>{ui}</ThemeProvider>);
7
+ }
8
+
9
+ describe('Loading (native)', () => {
10
+ it('has progressbar role', () => {
11
+ renderWithTheme(<Loading />);
12
+ expect(screen.getByRole('progressbar')).toBeInTheDocument();
13
+ });
14
+
15
+ it('has default accessible label "Loading"', () => {
16
+ renderWithTheme(<Loading />);
17
+ expect(screen.getByRole('progressbar', { name: 'Loading' })).toBeInTheDocument();
18
+ });
19
+
20
+ it('accepts a custom accessibilityLabel', () => {
21
+ renderWithTheme(<Loading accessibilityLabel="Laden…" />);
22
+ expect(screen.getByRole('progressbar', { name: 'Laden…' })).toBeInTheDocument();
23
+ });
24
+ });
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import { ThemeProvider } from '../../../native/ThemeContext';
4
+ import { Loading } from './Loading.native';
5
+
6
+ const meta = {
7
+ tags: ['!stable', 'alpha'],
8
+ title: 'React Native/UI/Loading',
9
+ component: Loading,
10
+ decorators: [(Story) => <ThemeProvider><Story /></ThemeProvider>],
11
+ parameters: { layout: 'centered' },
12
+ argTypes: {
13
+ size: { control: 'select', options: ['small', 'medium', 'large'] },
14
+ },
15
+ } satisfies Meta<typeof Loading>;
16
+
17
+ export default meta;
18
+ type Story = StoryObj<typeof meta>;
19
+
20
+ export const Small: Story = { args: { size: 'small' } };
21
+ export const Medium: Story = { args: { size: 'medium' } };
22
+ export const Large: Story = { args: { size: 'large' } };
23
+ export const AllSizes: Story = {
24
+ render: () => (
25
+ <ThemeProvider>
26
+ <div style={{ display: 'flex', gap: '24px', alignItems: 'center' }}>
27
+ <Loading size="small" />
28
+ <Loading size="medium" />
29
+ <Loading size="large" />
30
+ </div>
31
+ </ThemeProvider>
32
+ ),
33
+ };
@@ -0,0 +1,29 @@
1
+ import { ActivityIndicator, StyleProp, ViewStyle } from 'react-native';
2
+ import { useTheme } from '../../../native/ThemeContext';
3
+
4
+ type LoadingSize = 'small' | 'medium' | 'large';
5
+
6
+ interface LoadingProps {
7
+ size?: LoadingSize;
8
+ accessibilityLabel?: string;
9
+ style?: StyleProp<ViewStyle>;
10
+ }
11
+
12
+ const rnSize: Record<LoadingSize, 'small' | 'large'> = {
13
+ small: 'small',
14
+ medium: 'large',
15
+ large: 'large',
16
+ };
17
+
18
+ export function Loading({ size = 'medium', accessibilityLabel = 'Loading', style }: LoadingProps) {
19
+ const { colors } = useTheme();
20
+ return (
21
+ <ActivityIndicator
22
+ size={rnSize[size]}
23
+ color={colors.colorInteractive}
24
+ style={style}
25
+ accessibilityRole="progressbar"
26
+ accessibilityLabel={accessibilityLabel}
27
+ />
28
+ );
29
+ }
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Loading } from './Loading';
3
3
 
4
4
  const meta = {
5
- title: 'UI/Loading',
5
+ title: 'React/UI/Loading',
6
6
  component: Loading,
7
7
  argTypes: {
8
8
  size: { control: 'select', options: ['small', 'medium', 'large'] },
@@ -1,9 +1,9 @@
1
1
  import css from './Loading.module.css';
2
2
  import { cn } from '@boostdev/design-system-foundation';
3
+ import type { WithClassName } from '../../../types';
3
4
 
4
- interface LoadingProps {
5
+ interface LoadingProps extends WithClassName {
5
6
  size?: 'small' | 'medium' | 'large';
6
- className?: string;
7
7
  }
8
8
 
9
9
  export function Loading({ size = 'medium', className }: LoadingProps) {
@@ -4,36 +4,36 @@
4
4
  align-items: center;
5
5
  gap: var(--bds-space_m);
6
6
  padding: var(--bds-space_s) var(--bds-space_m);
7
- background-color: var(--banner_bg, var(--bds-blue--subtle));
8
- color: var(--banner_text, var(--bds-on-blue--subtle));
9
- border-block-end: 3px solid var(--banner_border, var(--bds-blue));
7
+ background-color: var(--banner_bg, var(--bds-color_blue--subtle));
8
+ color: var(--banner_text, var(--bds-color_on-blue--subtle));
9
+ border-block-end: 3px solid var(--banner_border, var(--bds-color_blue));
10
10
  font-size: var(--bds-font_size--body);
11
11
  line-height: var(--bds-font_line-height--body);
12
12
  width: 100%;
13
13
  }
14
14
 
15
15
  .--variant_info {
16
- --banner_bg: var(--bds-blue--subtle);
17
- --banner_text: var(--bds-on-blue--subtle);
18
- --banner_border: var(--bds-blue);
16
+ --banner_bg: var(--bds-color_blue--subtle);
17
+ --banner_text: var(--bds-color_on-blue--subtle);
18
+ --banner_border: var(--bds-color_blue);
19
19
  }
20
20
 
21
21
  .--variant_success {
22
- --banner_bg: var(--bds-success--subtle);
23
- --banner_text: var(--bds-on-success--subtle);
24
- --banner_border: var(--bds-success);
22
+ --banner_bg: var(--bds-color_success--subtle);
23
+ --banner_text: var(--bds-color_on-success--subtle);
24
+ --banner_border: var(--bds-color_success);
25
25
  }
26
26
 
27
27
  .--variant_warning {
28
- --banner_bg: var(--bds-orange--subtle);
29
- --banner_text: var(--bds-on-orange--subtle);
30
- --banner_border: var(--bds-warning);
28
+ --banner_bg: var(--bds-color_orange--subtle);
29
+ --banner_text: var(--bds-color_on-orange--subtle);
30
+ --banner_border: var(--bds-color_warning);
31
31
  }
32
32
 
33
33
  .--variant_error {
34
- --banner_bg: rgb(from var(--bds-error) r g b / 12%);
35
- --banner_text: var(--bds-on-bg);
36
- --banner_border: var(--bds-error);
34
+ --banner_bg: rgb(from var(--bds-color_error) r g b / 12%);
35
+ --banner_text: var(--bds-color_on-bg);
36
+ --banner_border: var(--bds-color_error);
37
37
  }
38
38
 
39
39
  .content {
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import { ThemeProvider } from '../../../native/ThemeContext';
4
+ import { NotificationBanner } from './NotificationBanner.native';
5
+
6
+ const meta = {
7
+ tags: ['!stable', 'alpha'],
8
+ title: 'React Native/UI/NotificationBanner',
9
+ component: NotificationBanner,
10
+ decorators: [(Story) => <ThemeProvider><Story /></ThemeProvider>],
11
+ parameters: { layout: 'padded' },
12
+ argTypes: {
13
+ variant: { control: 'select', options: ['info', 'success', 'warning', 'error'] },
14
+ },
15
+ } satisfies Meta<typeof NotificationBanner>;
16
+
17
+ export default meta;
18
+ type Story = StoryObj<typeof meta>;
19
+
20
+ export const Info: Story = { args: { children: 'New update available.', variant: 'info' } };
21
+ export const Success: Story = { args: { children: 'Changes saved successfully.', variant: 'success' } };
22
+ export const Warning: Story = { args: { children: 'Your session will expire soon.', variant: 'warning' } };
23
+ export const Error: Story = { args: { children: 'Failed to load data. Please retry.', variant: 'error' } };
24
+ export const Dismissible: Story = {
25
+ args: { children: 'You can dismiss this notification.', variant: 'info', onDismiss: () => {} },
26
+ };
27
+ export const AllVariants: Story = {
28
+ render: () => (
29
+ <ThemeProvider>
30
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
31
+ {(['info', 'success', 'warning', 'error'] as const).map(v => (
32
+ <NotificationBanner key={v} variant={v}>
33
+ {v.charAt(0).toUpperCase() + v.slice(1)} notification
34
+ </NotificationBanner>
35
+ ))}
36
+ </div>
37
+ </ThemeProvider>
38
+ ),
39
+ };
@@ -0,0 +1,76 @@
1
+ import { ReactNode } from 'react';
2
+ import { StyleSheet, View, Text, Pressable, StyleProp, ViewStyle } from 'react-native';
3
+ import { spacing, font, lineHeight } from '../../../native/tokens';
4
+ import { useTheme } from '../../../native/ThemeContext';
5
+
6
+ type BannerVariant = 'info' | 'success' | 'warning' | 'error';
7
+
8
+ interface NotificationBannerProps {
9
+ variant?: BannerVariant;
10
+ children: ReactNode;
11
+ action?: ReactNode;
12
+ onDismiss?: () => void;
13
+ style?: StyleProp<ViewStyle>;
14
+ }
15
+
16
+ const styles = StyleSheet.create({
17
+ banner: {
18
+ flexDirection: 'row',
19
+ alignItems: 'center',
20
+ paddingVertical: spacing.s,
21
+ paddingHorizontal: spacing.m,
22
+ gap: spacing.xs,
23
+ },
24
+ content: {
25
+ flex: 1,
26
+ fontSize: font.size.bodyS,
27
+ fontFamily: font.family.body,
28
+ lineHeight: lineHeight.bodyS,
29
+ },
30
+ dismiss: {
31
+ padding: spacing.xxs,
32
+ flexShrink: 0,
33
+ },
34
+ });
35
+
36
+ export function NotificationBanner({
37
+ variant = 'info',
38
+ children,
39
+ action,
40
+ onDismiss,
41
+ style,
42
+ }: Readonly<NotificationBannerProps>) {
43
+ const { colors } = useTheme();
44
+ const isUrgent = variant === 'error' || variant === 'warning';
45
+
46
+ const variantColors: Record<BannerVariant, { bg: string; text: string }> = {
47
+ info: { bg: colors.colorBlueSubtle, text: colors.colorOnBlueSubtle },
48
+ success: { bg: colors.colorSuccessSubtle, text: colors.colorOnSuccessSubtle },
49
+ warning: { bg: colors.colorOrangeSubtle, text: colors.colorOnOrangeSubtle },
50
+ error: { bg: colors.colorRedSubtle, text: colors.colorOnRedSubtle },
51
+ };
52
+
53
+ const { bg, text } = variantColors[variant];
54
+
55
+ return (
56
+ <View
57
+ accessibilityRole={isUrgent ? 'alert' : 'none'}
58
+ accessibilityLiveRegion={isUrgent ? 'assertive' : 'polite'}
59
+ style={[styles.banner, { backgroundColor: bg }, style]}
60
+ >
61
+ <Text style={[styles.content, { color: text }]}>{children}</Text>
62
+ {action}
63
+ {onDismiss && (
64
+ <Pressable
65
+ onPress={onDismiss}
66
+ style={styles.dismiss}
67
+ accessibilityLabel="Dismiss notification"
68
+ accessibilityRole="button"
69
+ hitSlop={8}
70
+ >
71
+ <Text style={{ color: text, fontSize: 16 }}>✕</Text>
72
+ </Pressable>
73
+ )}
74
+ </View>
75
+ );
76
+ }
@@ -3,7 +3,7 @@ import { NotificationBanner } from './NotificationBanner';
3
3
  import { Button } from '../../interaction/Button/Button';
4
4
 
5
5
  const meta = {
6
- title: 'UI/NotificationBanner',
6
+ title: 'React/UI/NotificationBanner',
7
7
  component: NotificationBanner,
8
8
  } satisfies Meta<typeof NotificationBanner>;
9
9
 
@@ -1,13 +1,13 @@
1
1
  import { ReactNode } from 'react';
2
2
  import css from './NotificationBanner.module.css';
3
3
  import { cn } from '@boostdev/design-system-foundation';
4
+ import type { WithClassName } from '../../../types';
4
5
 
5
- interface NotificationBannerProps {
6
+ interface NotificationBannerProps extends WithClassName {
6
7
  variant?: 'info' | 'success' | 'warning' | 'error';
7
8
  children: ReactNode;
8
9
  action?: ReactNode;
9
10
  onDismiss?: () => void;
10
- className?: string;
11
11
  }
12
12
 
13
13
  export function NotificationBanner({
@@ -24,12 +24,12 @@
24
24
  border-radius: var(--bds-border_radius--xs);
25
25
  background-color: var(--btn_bg, transparent);
26
26
 
27
- --bdc_color: var(--btn_border, var(--bds-bg--subtle));
27
+ --bdc_color: var(--btn_border, var(--bds-color_bg--subtle));
28
28
 
29
29
  border: none;
30
30
  outline: var(--bdc-outline_width) solid var(--bdc_color);
31
31
  outline-offset: var(--bdc-outline_offset);
32
- color: var(--btn_color, var(--bds-on-bg));
32
+ color: var(--btn_color, var(--bds-color_on-bg));
33
33
  font-family: var(--bds-font_family--body);
34
34
  font-size: var(--bds-font_size--body);
35
35
  font-variant-numeric: tabular-nums;
@@ -50,15 +50,15 @@
50
50
 
51
51
  @media (hover: hover) and (pointer: fine) {
52
52
  .button:not(:disabled, .--active):hover {
53
- --btn_bg: var(--bds-bg--subtle);
54
- --btn_color: var(--bds-interactive);
53
+ --btn_bg: var(--bds-color_bg--subtle);
54
+ --btn_color: var(--bds-color_interactive_on-bg);
55
55
  }
56
56
  }
57
57
 
58
58
  .button.--active {
59
- --btn_bg: var(--bds-interactive);
60
- --btn_color: var(--bds-on-interactive);
61
- --btn_border: var(--bds-interactive);
59
+ --btn_bg: var(--bds-color_interactive);
60
+ --btn_color: var(--bds-color_on-interactive);
61
+ --btn_border: var(--bds-color_interactive);
62
62
  }
63
63
 
64
64
  .button.--nav svg {
@@ -72,7 +72,7 @@
72
72
  justify-content: center;
73
73
  min-width: 2.25rem;
74
74
  height: 2.25rem;
75
- color: var(--bds-on-bg--subtle);
75
+ color: var(--bds-color_on-bg--subtle);
76
76
  font-size: var(--bds-font_size--body);
77
77
  user-select: none;
78
78
  }
@@ -3,7 +3,7 @@ import { useState } from 'react';
3
3
  import { Pagination } from './Pagination';
4
4
 
5
5
  const meta = {
6
- title: 'UI/Pagination',
6
+ title: 'React/UI/Pagination',
7
7
  component: Pagination,
8
8
  } satisfies Meta<typeof Pagination>;
9
9