@boostdev/design-system-components 1.0.3 → 1.1.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 (262) hide show
  1. package/AGENTS.md +51 -10
  2. package/dist/client.cjs +350 -174
  3. package/dist/client.css +751 -647
  4. package/dist/client.d.cts +62 -97
  5. package/dist/client.d.ts +62 -97
  6. package/dist/client.js +377 -211
  7. package/dist/index.cjs +350 -174
  8. package/dist/index.css +751 -647
  9. package/dist/index.d.cts +62 -97
  10. package/dist/index.d.ts +62 -97
  11. package/dist/index.js +377 -211
  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 +304 -0
  17. package/dist/web-components.js +1978 -0
  18. package/package.json +27 -5
  19. package/src/components/interaction/Button/Button.module.css +11 -8
  20. package/src/components/interaction/Button/Button.native.mdx +72 -0
  21. package/src/components/interaction/Button/Button.native.spec.tsx +35 -0
  22. package/src/components/interaction/Button/Button.native.stories.tsx +42 -0
  23. package/src/components/interaction/Button/Button.native.tsx +95 -0
  24. package/src/components/interaction/Button/Button.stories.tsx +1 -1
  25. package/src/components/interaction/Button/Button.tsx +2 -2
  26. package/src/components/interaction/Command/Command.mdx +16 -0
  27. package/src/components/interaction/Command/Command.module.css +7 -7
  28. package/src/components/interaction/Command/Command.spec.tsx +37 -0
  29. package/src/components/interaction/Command/Command.stories.tsx +1 -1
  30. package/src/components/interaction/Command/Command.tsx +39 -4
  31. package/src/components/interaction/Dialog/Dialog.module.css +10 -13
  32. package/src/components/interaction/Dialog/Dialog.spec.tsx +53 -1
  33. package/src/components/interaction/Dialog/Dialog.stories.tsx +18 -1
  34. package/src/components/interaction/Dialog/Dialog.tsx +52 -18
  35. package/src/components/interaction/Drawer/Drawer.mdx +14 -0
  36. package/src/components/interaction/Drawer/Drawer.module.css +11 -11
  37. package/src/components/interaction/Drawer/Drawer.spec.tsx +48 -1
  38. package/src/components/interaction/Drawer/Drawer.stories.tsx +1 -1
  39. package/src/components/interaction/Drawer/Drawer.tsx +40 -6
  40. package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +6 -6
  41. package/src/components/interaction/DropdownMenu/DropdownMenu.stories.tsx +1 -1
  42. package/src/components/interaction/DropdownMenu/DropdownMenu.tsx +2 -2
  43. package/src/components/interaction/Popover/Popover.mdx +17 -0
  44. package/src/components/interaction/Popover/Popover.module.css +132 -16
  45. package/src/components/interaction/Popover/Popover.spec.tsx +119 -20
  46. package/src/components/interaction/Popover/Popover.stories.tsx +1 -1
  47. package/src/components/interaction/Popover/Popover.tsx +69 -29
  48. package/src/components/interaction/Rating/Rating.stories.tsx +1 -1
  49. package/src/components/interaction/Rating/Rating.tsx +2 -2
  50. package/src/components/interaction/Toast/Toast.module.css +13 -8
  51. package/src/components/interaction/Toast/Toast.spec.tsx +21 -0
  52. package/src/components/interaction/Toast/Toast.stories.tsx +1 -1
  53. package/src/components/interaction/Toast/Toast.tsx +22 -2
  54. package/src/components/interaction/form/Checkbox/Checkbox.mdx +2 -2
  55. package/src/components/interaction/form/Checkbox/Checkbox.module.css +9 -9
  56. package/src/components/interaction/form/Checkbox/Checkbox.native.mdx +74 -0
  57. package/src/components/interaction/form/Checkbox/Checkbox.native.spec.tsx +42 -0
  58. package/src/components/interaction/form/Checkbox/Checkbox.native.stories.tsx +36 -0
  59. package/src/components/interaction/form/Checkbox/Checkbox.native.tsx +80 -0
  60. package/src/components/interaction/form/Checkbox/Checkbox.stories.tsx +1 -1
  61. package/src/components/interaction/form/Checkbox/Checkbox.tsx +2 -2
  62. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.mdx +44 -0
  63. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.stories.tsx +1 -1
  64. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx +2 -2
  65. package/src/components/interaction/form/Combobox/Combobox.mdx +21 -0
  66. package/src/components/interaction/form/Combobox/Combobox.module.css +8 -9
  67. package/src/components/interaction/form/Combobox/Combobox.stories.tsx +1 -1
  68. package/src/components/interaction/form/Combobox/Combobox.tsx +2 -2
  69. package/src/components/interaction/form/FileInput/FileInput.mdx +14 -0
  70. package/src/components/interaction/form/FileInput/FileInput.module.css +5 -5
  71. package/src/components/interaction/form/FileInput/FileInput.stories.tsx +1 -1
  72. package/src/components/interaction/form/FileInput/FileInput.tsx +2 -2
  73. package/src/components/interaction/form/FormInput/FormInput.stories.tsx +1 -1
  74. package/src/components/interaction/form/FormInput/FormInput.tsx +2 -2
  75. package/src/components/interaction/form/NumberInput/NumberInput.mdx +16 -0
  76. package/src/components/interaction/form/NumberInput/NumberInput.module.css +1 -1
  77. package/src/components/interaction/form/NumberInput/NumberInput.stories.tsx +1 -1
  78. package/src/components/interaction/form/NumberInput/NumberInput.tsx +2 -2
  79. package/src/components/interaction/form/Radio/Radio.mdx +3 -3
  80. package/src/components/interaction/form/Radio/Radio.module.css +9 -9
  81. package/src/components/interaction/form/Radio/Radio.native.stories.tsx +46 -0
  82. package/src/components/interaction/form/Radio/Radio.native.tsx +79 -0
  83. package/src/components/interaction/form/Radio/Radio.stories.tsx +1 -1
  84. package/src/components/interaction/form/Radio/Radio.tsx +2 -2
  85. package/src/components/interaction/form/RadioGroup/RadioGroup.mdx +45 -0
  86. package/src/components/interaction/form/RadioGroup/RadioGroup.stories.tsx +1 -1
  87. package/src/components/interaction/form/RadioGroup/RadioGroup.tsx +2 -2
  88. package/src/components/interaction/form/SegmentedControl/SegmentedControl.module.css +5 -6
  89. package/src/components/interaction/form/SegmentedControl/SegmentedControl.stories.tsx +1 -1
  90. package/src/components/interaction/form/SegmentedControl/SegmentedControl.tsx +2 -2
  91. package/src/components/interaction/form/Select/Select.module.css +3 -3
  92. package/src/components/interaction/form/Select/Select.stories.tsx +1 -1
  93. package/src/components/interaction/form/Select/Select.tsx +2 -2
  94. package/src/components/interaction/form/Slider/Slider.mdx +1 -1
  95. package/src/components/interaction/form/Slider/Slider.module.css +10 -10
  96. package/src/components/interaction/form/Slider/Slider.stories.tsx +1 -1
  97. package/src/components/interaction/form/Slider/Slider.tsx +2 -2
  98. package/src/components/interaction/form/Switch/Switch.mdx +4 -4
  99. package/src/components/interaction/form/Switch/Switch.module.css +11 -11
  100. package/src/components/interaction/form/Switch/Switch.native.spec.tsx +60 -0
  101. package/src/components/interaction/form/Switch/Switch.native.stories.tsx +35 -0
  102. package/src/components/interaction/form/Switch/Switch.native.tsx +59 -0
  103. package/src/components/interaction/form/Switch/Switch.stories.tsx +1 -1
  104. package/src/components/interaction/form/Switch/Switch.tsx +2 -2
  105. package/src/components/interaction/form/Textarea/Textarea.mdx +17 -0
  106. package/src/components/interaction/form/Textarea/Textarea.module.css +1 -1
  107. package/src/components/interaction/form/Textarea/Textarea.stories.tsx +1 -1
  108. package/src/components/interaction/form/Textarea/Textarea.tsx +2 -2
  109. package/src/components/interaction/form/atoms/InputContainer.tsx +2 -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.native.stories.tsx +53 -0
  122. package/src/components/layout/Card/Card.native.tsx +89 -0
  123. package/src/components/layout/Card/Card.stories.tsx +1 -1
  124. package/src/components/layout/Card/Card.tsx +2 -2
  125. package/src/components/layout/IconWrapper/IconWrapper.mdx +2 -2
  126. package/src/components/layout/IconWrapper/IconWrapper.module.css +2 -2
  127. package/src/components/layout/IconWrapper/IconWrapper.native.spec.tsx +39 -0
  128. package/src/components/layout/IconWrapper/IconWrapper.native.stories.tsx +41 -0
  129. package/src/components/layout/IconWrapper/IconWrapper.native.tsx +20 -0
  130. package/src/components/layout/IconWrapper/IconWrapper.stories.tsx +1 -1
  131. package/src/components/layout/IconWrapper/IconWrapper.tsx +2 -2
  132. package/src/components/layout/SectionHeader/SectionHeader.mdx +13 -0
  133. package/src/components/layout/SectionHeader/SectionHeader.native.stories.tsx +38 -0
  134. package/src/components/layout/SectionHeader/SectionHeader.native.tsx +79 -0
  135. package/src/components/layout/SectionHeader/SectionHeader.stories.tsx +1 -1
  136. package/src/components/layout/SectionHeader/SectionHeader.tsx +2 -2
  137. package/src/components/ui/Accordion/Accordion.mdx +14 -0
  138. package/src/components/ui/Accordion/Accordion.module.css +5 -5
  139. package/src/components/ui/Accordion/Accordion.stories.tsx +1 -1
  140. package/src/components/ui/Accordion/Accordion.tsx +2 -2
  141. package/src/components/ui/Alert/Alert.native.mdx +62 -0
  142. package/src/components/ui/Alert/Alert.native.stories.tsx +43 -0
  143. package/src/components/ui/Alert/Alert.native.tsx +94 -0
  144. package/src/components/ui/Alert/Alert.stories.tsx +1 -1
  145. package/src/components/ui/Alert/Alert.tsx +2 -2
  146. package/src/components/ui/Avatar/Avatar.native.mdx +50 -0
  147. package/src/components/ui/Avatar/Avatar.native.spec.tsx +47 -0
  148. package/src/components/ui/Avatar/Avatar.native.stories.tsx +34 -0
  149. package/src/components/ui/Avatar/Avatar.native.tsx +85 -0
  150. package/src/components/ui/Avatar/Avatar.stories.tsx +1 -1
  151. package/src/components/ui/Avatar/Avatar.tsx +2 -2
  152. package/src/components/ui/Badge/Badge.mdx +2 -2
  153. package/src/components/ui/Badge/Badge.native.mdx +54 -0
  154. package/src/components/ui/Badge/Badge.native.stories.tsx +36 -0
  155. package/src/components/ui/Badge/Badge.native.tsx +50 -0
  156. package/src/components/ui/Badge/Badge.stories.tsx +1 -1
  157. package/src/components/ui/Badge/Badge.tsx +2 -2
  158. package/src/components/ui/Breadcrumb/Breadcrumb.stories.tsx +1 -1
  159. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +2 -2
  160. package/src/components/ui/Calendar/Calendar.mdx +16 -0
  161. package/src/components/ui/Calendar/Calendar.module.css +7 -7
  162. package/src/components/ui/Calendar/Calendar.stories.tsx +1 -1
  163. package/src/components/ui/Calendar/Calendar.tsx +2 -2
  164. package/src/components/ui/Carousel/Carousel.module.css +5 -5
  165. package/src/components/ui/Carousel/Carousel.stories.tsx +1 -1
  166. package/src/components/ui/Carousel/Carousel.tsx +2 -2
  167. package/src/components/ui/Collapsible/Collapsible.module.css +4 -4
  168. package/src/components/ui/Collapsible/Collapsible.stories.tsx +1 -1
  169. package/src/components/ui/Collapsible/Collapsible.tsx +2 -2
  170. package/src/components/ui/DescriptionList/DescriptionList.stories.tsx +1 -1
  171. package/src/components/ui/DescriptionList/DescriptionList.tsx +2 -2
  172. package/src/components/ui/Link/Link.mdx +14 -0
  173. package/src/components/ui/Link/Link.module.css +2 -2
  174. package/src/components/ui/Link/Link.stories.tsx +1 -1
  175. package/src/components/ui/Link/Link.tsx +2 -2
  176. package/src/components/ui/Loading/Loading.module.css +7 -7
  177. package/src/components/ui/Loading/Loading.native.spec.tsx +24 -0
  178. package/src/components/ui/Loading/Loading.native.stories.tsx +33 -0
  179. package/src/components/ui/Loading/Loading.native.tsx +29 -0
  180. package/src/components/ui/Loading/Loading.stories.tsx +1 -1
  181. package/src/components/ui/Loading/Loading.tsx +2 -2
  182. package/src/components/ui/NotificationBanner/NotificationBanner.module.css +3 -3
  183. package/src/components/ui/NotificationBanner/NotificationBanner.native.stories.tsx +39 -0
  184. package/src/components/ui/NotificationBanner/NotificationBanner.native.tsx +76 -0
  185. package/src/components/ui/NotificationBanner/NotificationBanner.stories.tsx +1 -1
  186. package/src/components/ui/NotificationBanner/NotificationBanner.tsx +2 -2
  187. package/src/components/ui/Pagination/Pagination.module.css +7 -7
  188. package/src/components/ui/Pagination/Pagination.stories.tsx +1 -1
  189. package/src/components/ui/Pagination/Pagination.tsx +2 -2
  190. package/src/components/ui/Progress/Progress.mdx +1 -1
  191. package/src/components/ui/Progress/Progress.module.css +6 -6
  192. package/src/components/ui/Progress/Progress.native.stories.tsx +34 -0
  193. package/src/components/ui/Progress/Progress.native.tsx +84 -0
  194. package/src/components/ui/Progress/Progress.stories.tsx +1 -1
  195. package/src/components/ui/Progress/Progress.tsx +2 -2
  196. package/src/components/ui/ProgressCircle/ProgressCircle.module.css +1 -1
  197. package/src/components/ui/ProgressCircle/ProgressCircle.stories.tsx +1 -1
  198. package/src/components/ui/ProgressCircle/ProgressCircle.tsx +2 -2
  199. package/src/components/ui/Separator/Separator.mdx +14 -0
  200. package/src/components/ui/Separator/Separator.module.css +3 -3
  201. package/src/components/ui/Separator/Separator.native.stories.tsx +42 -0
  202. package/src/components/ui/Separator/Separator.native.tsx +32 -0
  203. package/src/components/ui/Separator/Separator.stories.tsx +1 -1
  204. package/src/components/ui/Separator/Separator.tsx +2 -2
  205. package/src/components/ui/Skeleton/Skeleton.module.css +1 -1
  206. package/src/components/ui/Skeleton/Skeleton.native.stories.tsx +33 -0
  207. package/src/components/ui/Skeleton/Skeleton.native.tsx +41 -0
  208. package/src/components/ui/Skeleton/Skeleton.stories.tsx +1 -1
  209. package/src/components/ui/Skeleton/Skeleton.tsx +2 -3
  210. package/src/components/ui/SkipLink/SkipLink.stories.tsx +1 -1
  211. package/src/components/ui/SkipLink/SkipLink.tsx +5 -3
  212. package/src/components/ui/Table/Table.mdx +14 -0
  213. package/src/components/ui/Table/Table.module.css +9 -9
  214. package/src/components/ui/Table/Table.stories.tsx +1 -1
  215. package/src/components/ui/Table/Table.tsx +2 -2
  216. package/src/components/ui/Tabs/Tabs.module.css +3 -3
  217. package/src/components/ui/Tabs/Tabs.stories.tsx +1 -1
  218. package/src/components/ui/Tabs/Tabs.tsx +2 -2
  219. package/src/components/ui/Tooltip/Tooltip.mdx +14 -0
  220. package/src/components/ui/Tooltip/Tooltip.module.css +8 -8
  221. package/src/components/ui/Tooltip/Tooltip.stories.tsx +1 -1
  222. package/src/components/ui/Tooltip/Tooltip.tsx +2 -2
  223. package/src/components/ui/Typography/Typography.mdx +13 -0
  224. package/src/components/ui/Typography/Typography.native.mdx +56 -0
  225. package/src/components/ui/Typography/Typography.native.stories.tsx +38 -0
  226. package/src/components/ui/Typography/Typography.native.tsx +65 -0
  227. package/src/components/ui/Typography/Typography.stories.tsx +1 -1
  228. package/src/components/ui/Typography/Typography.tsx +2 -2
  229. package/src/css/bdc.css +8 -0
  230. package/src/index.ts +1 -0
  231. package/src/native/ThemeContext.tsx +28 -0
  232. package/src/native/tokens.ts +13 -0
  233. package/src/native.ts +39 -0
  234. package/src/polyfill-invoker-commands.ts +68 -0
  235. package/src/react-augment.d.ts +32 -0
  236. package/src/stories/DesignSystem/DarkMode.mdx +130 -0
  237. package/src/stories/ReactNative.mdx +121 -0
  238. package/src/types.ts +2 -0
  239. package/src/typings.d.ts +3 -0
  240. package/src/web-components/globals.ts +61 -0
  241. package/src/web-components/index.ts +12 -0
  242. package/src/web-components/interaction/BdsButton.mdx +106 -0
  243. package/src/web-components/interaction/BdsButton.stories.tsx +60 -0
  244. package/src/web-components/interaction/BdsPopover.mdx +120 -0
  245. package/src/web-components/interaction/BdsPopover.stories.tsx +70 -0
  246. package/src/web-components/interaction/BdsToastProvider.mdx +94 -0
  247. package/src/web-components/interaction/BdsToastProvider.stories.tsx +73 -0
  248. package/src/web-components/interaction/bds-button.spec.ts +95 -0
  249. package/src/web-components/interaction/bds-button.ts +293 -0
  250. package/src/web-components/interaction/bds-popover.spec.ts +174 -0
  251. package/src/web-components/interaction/bds-popover.ts +229 -0
  252. package/src/web-components/interaction/bds-toast-provider.spec.ts +122 -0
  253. package/src/web-components/interaction/bds-toast-provider.ts +211 -0
  254. package/src/web-components/test/helpers.ts +22 -0
  255. package/src/web-components/ui/BdsAlert.mdx +90 -0
  256. package/src/web-components/ui/BdsAlert.stories.tsx +60 -0
  257. package/src/web-components/ui/BdsBadge.mdx +74 -0
  258. package/src/web-components/ui/BdsBadge.stories.tsx +37 -0
  259. package/src/web-components/ui/bds-alert.spec.ts +109 -0
  260. package/src/web-components/ui/bds-alert.ts +209 -0
  261. package/src/web-components/ui/bds-badge.spec.ts +51 -0
  262. 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 {
@@ -9,7 +9,7 @@
9
9
  .track {
10
10
  display: flex;
11
11
  gap: var(--bds-space_m);
12
- overflow-x: auto;
12
+ overflow-inline: auto;
13
13
  scroll-snap-type: x mandatory;
14
14
  scrollbar-width: none;
15
15
  flex: 1;
@@ -30,8 +30,8 @@
30
30
  display: flex;
31
31
  align-items: center;
32
32
  justify-content: center;
33
- width: 2.5rem;
34
- height: 2.5rem;
33
+ inline-size: 2.5rem;
34
+ block-size: 2.5rem;
35
35
  border-radius: 50%;
36
36
  background-color: var(--bds-color_bg);
37
37
  color: var(--bds-color_on-bg);
@@ -48,8 +48,8 @@
48
48
  }
49
49
 
50
50
  .navBtn svg {
51
- width: 1.25rem;
52
- height: 1.25rem;
51
+ inline-size: 1.25rem;
52
+ block-size: 1.25rem;
53
53
  }
54
54
 
55
55
  .navBtn:focus-visible {
@@ -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>) {
@@ -48,10 +48,10 @@
48
48
 
49
49
  /* Chevron drawn with CSS borders */
50
50
  .icon {
51
- width: 0.5rem;
52
- height: 0.5rem;
53
- border-right: 2px solid currentcolor;
54
- border-bottom: 2px solid currentcolor;
51
+ inline-size: 0.5rem;
52
+ block-size: 0.5rem;
53
+ border-inline-end: 2px solid currentcolor;
54
+ border-block-end: 2px solid currentcolor;
55
55
  transform: rotate(45deg);
56
56
  flex-shrink: 0;
57
57
  transition: transform var(--bds-animation_transition-duration) var(--bds-animation_easing);
@@ -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({
@@ -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
@@ -49,8 +49,8 @@
49
49
 
50
50
  .externalLabel {
51
51
  position: absolute;
52
- width: 1px;
53
- height: 1px;
52
+ inline-size: 1px;
53
+ block-size: 1px;
54
54
  padding: 0;
55
55
  margin: -1px;
56
56
  overflow: hidden;
@@ -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> &
@@ -6,23 +6,23 @@
6
6
  }
7
7
 
8
8
  .spinner {
9
- width: 2.5em;
10
- height: 2.5em;
9
+ inline-size: 2.5em;
10
+ block-size: 2.5em;
11
11
  border: 4px solid var(--bds-color_bg);
12
- border-top: 4px solid var(--bds-color_interactive);
12
+ border-block-start: 4px solid var(--bds-color_interactive);
13
13
  border-radius: 50%;
14
14
  animation: spin 1s linear infinite;
15
15
  }
16
16
 
17
17
  .--size_small .spinner {
18
- width: 1.5em;
19
- height: 1.5em;
18
+ inline-size: 1.5em;
19
+ block-size: 1.5em;
20
20
  border-width: 2px;
21
21
  }
22
22
 
23
23
  .--size_large .spinner {
24
- width: 4em;
25
- height: 4em;
24
+ inline-size: 4em;
25
+ block-size: 4em;
26
26
  border-width: 6px;
27
27
  }
28
28
  }
@@ -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) {
@@ -9,7 +9,7 @@
9
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
- width: 100%;
12
+ inline-size: 100%;
13
13
  }
14
14
 
15
15
  .--variant_info {
@@ -62,8 +62,8 @@
62
62
  }
63
63
 
64
64
  .dismiss svg {
65
- width: 1rem;
66
- height: 1rem;
65
+ inline-size: 1rem;
66
+ block-size: 1rem;
67
67
  }
68
68
 
69
69
  .dismiss:focus-visible {
@@ -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({
@@ -18,8 +18,8 @@
18
18
  display: inline-flex;
19
19
  align-items: center;
20
20
  justify-content: center;
21
- min-width: 2.25rem;
22
- height: 2.25rem;
21
+ min-inline-size: 2.25rem;
22
+ block-size: 2.25rem;
23
23
  padding-inline: var(--bds-space_xs);
24
24
  border-radius: var(--bds-border_radius--xs);
25
25
  background-color: var(--btn_bg, transparent);
@@ -51,7 +51,7 @@
51
51
  @media (hover: hover) and (pointer: fine) {
52
52
  .button:not(:disabled, .--active):hover {
53
53
  --btn_bg: var(--bds-color_bg--subtle);
54
- --btn_color: var(--bds-color_interactive);
54
+ --btn_color: var(--bds-color_interactive_on-bg);
55
55
  }
56
56
  }
57
57
 
@@ -62,16 +62,16 @@
62
62
  }
63
63
 
64
64
  .button.--nav svg {
65
- width: 1rem;
66
- height: 1rem;
65
+ inline-size: 1rem;
66
+ block-size: 1rem;
67
67
  }
68
68
 
69
69
  .ellipsis {
70
70
  display: inline-flex;
71
71
  align-items: center;
72
72
  justify-content: center;
73
- min-width: 2.25rem;
74
- height: 2.25rem;
73
+ min-inline-size: 2.25rem;
74
+ block-size: 2.25rem;
75
75
  color: var(--bds-color_on-bg--subtle);
76
76
  font-size: var(--bds-font_size--body);
77
77
  user-select: none;
@@ -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
 
@@ -1,11 +1,11 @@
1
1
  import css from './Pagination.module.css';
2
2
  import { cn } from '@boostdev/design-system-foundation';
3
+ import type { WithClassName } from '../../../types';
3
4
 
4
- interface PaginationProps {
5
+ interface PaginationProps extends WithClassName {
5
6
  currentPage: number;
6
7
  totalPages: number;
7
8
  onPageChange: (page: number) => void;
8
- className?: string;
9
9
  }
10
10
 
11
11
  function getPageRange(current: number, total: number): (number | '...')[] {
@@ -40,7 +40,7 @@ Horizontal progress bar communicating completion towards a goal.
40
40
  <tr><th>Variable</th><th>Description</th></tr>
41
41
  </thead>
42
42
  <tbody>
43
- <tr><td>`--progress_color-active`</td><td>Filled track colour (defaults to `var(--bds-active)`)</td></tr>
43
+ <tr><td>`--progress_color-active`</td><td>Filled track colour (defaults to `var(--bdc-color_active)`)</td></tr>
44
44
  <tr><td>`--progress_color-track`</td><td>Empty track colour</td></tr>
45
45
  </tbody>
46
46
  </table>
@@ -3,7 +3,7 @@
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  gap: var(--bds-space_xxs);
6
- width: 100%;
6
+ inline-size: 100%;
7
7
  }
8
8
 
9
9
  .labelRow {
@@ -19,8 +19,8 @@
19
19
  }
20
20
 
21
21
  .track {
22
- width: 100%;
23
- height: var(--progress_height, var(--bds-space_xs));
22
+ inline-size: 100%;
23
+ block-size: var(--progress_height, var(--bds-space_xs));
24
24
  background-color: var(--bds-color_bg--subtle);
25
25
  border-radius: 999px;
26
26
  overflow: hidden;
@@ -31,10 +31,10 @@
31
31
  .track.--size_large { --progress_height: var(--bds-space_s); }
32
32
 
33
33
  .fill {
34
- height: 100%;
35
- background-color: var(--progress_color-active, var(--bds-color_green));
34
+ block-size: 100%;
35
+ background-color: var(--progress_color-active, var(--bdc-color_active));
36
36
  border-radius: 999px;
37
- transition: width var(--bds-animation_transition-duration) var(--bds-animation_easing);
37
+ transition: inline-size var(--bds-animation_transition-duration) var(--bds-animation_easing);
38
38
  }
39
39
 
40
40
  @media (prefers-reduced-motion: reduce) {