@boostdev/design-system-components 2.15.0 → 2.17.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 (299) hide show
  1. package/AGENTS.md +22 -15
  2. package/dist/client.cjs +271 -205
  3. package/dist/client.css +813 -650
  4. package/dist/client.d.cts +19 -4
  5. package/dist/client.d.ts +19 -4
  6. package/dist/client.js +206 -139
  7. package/dist/index.cjs +271 -205
  8. package/dist/index.css +813 -650
  9. package/dist/index.d.cts +19 -4
  10. package/dist/index.d.ts +19 -4
  11. package/dist/index.js +206 -139
  12. package/dist/web-components/chunk-2DHW2WJZ.js +154 -0
  13. package/dist/web-components/{chunk-3WAV6MDN.js → chunk-3FSGP35V.js} +1 -0
  14. package/dist/web-components/{chunk-SYNLFKD3.js → chunk-3LQKFSMR.js} +6 -0
  15. package/dist/web-components/{chunk-KA3VPKMY.js → chunk-4MB2ICSK.js} +1 -0
  16. package/dist/web-components/{chunk-6G22I2CK.js → chunk-5ATTKUCP.js} +33 -3
  17. package/dist/web-components/{chunk-IDSM74LM.js → chunk-6XL5P76D.js} +3 -3
  18. package/dist/web-components/{chunk-P24JYC5V.js → chunk-7VXRMCAL.js} +10 -4
  19. package/dist/web-components/{chunk-CUKQ2L5B.js → chunk-AGI6YQRC.js} +9 -16
  20. package/dist/web-components/chunk-BDRV452N.js +51 -0
  21. package/dist/web-components/{chunk-3AY2YKCM.js → chunk-CKCPV347.js} +1 -0
  22. package/dist/web-components/{chunk-HBLJ4SLY.js → chunk-DD3OUXNG.js} +5 -5
  23. package/dist/web-components/{chunk-RVF7W653.js → chunk-DGOCPKHI.js} +30 -10
  24. package/dist/web-components/{chunk-2OLVQUBU.js → chunk-EYCW7TKB.js} +8 -15
  25. package/dist/web-components/{chunk-VANAKB6D.js → chunk-GPJWLAKU.js} +33 -16
  26. package/dist/web-components/{chunk-VED2DFJ6.js → chunk-GQNQBEYR.js} +8 -15
  27. package/dist/web-components/{chunk-WFVKU4GX.js → chunk-IKAJLROF.js} +49 -4
  28. package/dist/web-components/{chunk-RSZ3BWBK.js → chunk-KSK4RZZQ.js} +30 -7
  29. package/dist/web-components/{chunk-FEDABOR5.js → chunk-LHFUXZ52.js} +7 -15
  30. package/dist/web-components/{chunk-M3ECULRH.js → chunk-RBF7WPLI.js} +10 -8
  31. package/dist/web-components/{chunk-BPYKZVDK.js → chunk-SJLMW2VR.js} +2 -2
  32. package/dist/web-components/chunk-SRKQ6GST.js +40 -0
  33. package/dist/web-components/{chunk-5HUAFCU6.js → chunk-TJV7UIXC.js} +7 -0
  34. package/dist/web-components/{chunk-LDIPCTRN.js → chunk-WWWJCSXN.js} +50 -4
  35. package/dist/web-components/{chunk-J3HVUIUH.js → chunk-XI2U6U26.js} +8 -15
  36. package/dist/web-components/{chunk-JH6LQKLK.js → chunk-XJU7KITO.js} +8 -15
  37. package/dist/web-components/{chunk-JV5QT2OU.js → chunk-YLDQOESI.js} +27 -13
  38. package/dist/web-components/globals.js +1 -1
  39. package/dist/web-components/index.d.ts +1 -0
  40. package/dist/web-components/index.js +35 -30
  41. package/dist/web-components/interaction/bds-dropdown-menu-group.d.ts +41 -0
  42. package/dist/web-components/interaction/bds-dropdown-menu-group.js +7 -0
  43. package/dist/web-components/interaction/bds-dropdown-menu-item.d.ts +14 -1
  44. package/dist/web-components/interaction/bds-dropdown-menu-item.js +1 -1
  45. package/dist/web-components/interaction/bds-dropdown-menu.d.ts +2 -1
  46. package/dist/web-components/interaction/bds-dropdown-menu.js +1 -1
  47. package/dist/web-components/interaction/bds-tab.d.ts +5 -0
  48. package/dist/web-components/interaction/bds-tab.js +1 -1
  49. package/dist/web-components/interaction/bds-tooltip.js +1 -1
  50. package/dist/web-components/interaction/form/bds-checkbox-group.d.ts +6 -0
  51. package/dist/web-components/interaction/form/bds-checkbox-group.js +2 -1
  52. package/dist/web-components/interaction/form/bds-checkbox.js +1 -1
  53. package/dist/web-components/interaction/form/bds-combobox.js +2 -1
  54. package/dist/web-components/interaction/form/bds-form-input.js +2 -1
  55. package/dist/web-components/interaction/form/bds-number-input.js +2 -1
  56. package/dist/web-components/interaction/form/bds-radio-group.d.ts +5 -0
  57. package/dist/web-components/interaction/form/bds-radio-group.js +2 -1
  58. package/dist/web-components/interaction/form/bds-radio.js +1 -1
  59. package/dist/web-components/interaction/form/bds-select.js +2 -1
  60. package/dist/web-components/interaction/form/bds-slider.js +2 -1
  61. package/dist/web-components/interaction/form/bds-switch.js +1 -1
  62. package/dist/web-components/interaction/form/bds-textarea.js +2 -1
  63. package/dist/web-components/ui/bds-alert.d.ts +8 -1
  64. package/dist/web-components/ui/bds-alert.js +1 -1
  65. package/dist/web-components/ui/bds-avatar.d.ts +11 -0
  66. package/dist/web-components/ui/bds-avatar.js +1 -1
  67. package/dist/web-components/ui/bds-badge.js +1 -1
  68. package/dist/web-components/ui/bds-notification-banner.d.ts +14 -1
  69. package/dist/web-components/ui/bds-notification-banner.js +1 -1
  70. package/dist/web-components/ui/bds-rating.js +1 -1
  71. package/dist/web-components/ui/bds-section-header.d.ts +6 -0
  72. package/dist/web-components/ui/bds-section-header.js +1 -1
  73. package/dist/web-components/ui/bds-separator.js +1 -1
  74. package/dist/web-components/ui/bds-table.js +1 -1
  75. package/package.json +6 -2
  76. package/src/components/interaction/DropdownMenu/DropdownMenu.mdx +35 -4
  77. package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +58 -10
  78. package/src/components/interaction/DropdownMenu/DropdownMenu.spec.tsx +114 -1
  79. package/src/components/interaction/DropdownMenu/DropdownMenu.stories.tsx +25 -0
  80. package/src/components/interaction/DropdownMenu/DropdownMenu.tsx +69 -17
  81. package/src/components/interaction/Rating/Rating.mdx +4 -1
  82. package/src/components/interaction/Rating/Rating.module.css +9 -0
  83. package/src/components/interaction/Rating/Rating.spec.tsx +9 -0
  84. package/src/components/interaction/form/Checkbox/Checkbox.module.css +1 -0
  85. package/src/components/interaction/form/Checkbox/Checkbox.spec.tsx +7 -0
  86. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.mdx +2 -1
  87. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.module.css +8 -1
  88. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.spec.tsx +27 -0
  89. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx +1 -1
  90. package/src/components/interaction/form/Combobox/Combobox.module.css +1 -0
  91. package/src/components/interaction/form/Combobox/Combobox.spec.tsx +7 -0
  92. package/src/components/interaction/form/FormInput/FormInput.mdx +9 -0
  93. package/src/components/interaction/form/FormInput/FormInput.module.css +1 -0
  94. package/src/components/interaction/form/FormInput/FormInput.spec.tsx +7 -0
  95. package/src/components/interaction/form/NumberInput/NumberInput.module.css +1 -0
  96. package/src/components/interaction/form/NumberInput/NumberInput.spec.tsx +7 -0
  97. package/src/components/interaction/form/Radio/Radio.module.css +1 -0
  98. package/src/components/interaction/form/Radio/Radio.spec.tsx +7 -0
  99. package/src/components/interaction/form/RadioGroup/RadioGroup.mdx +2 -1
  100. package/src/components/interaction/form/RadioGroup/RadioGroup.module.css +8 -1
  101. package/src/components/interaction/form/RadioGroup/RadioGroup.spec.tsx +27 -0
  102. package/src/components/interaction/form/RadioGroup/RadioGroup.tsx +1 -1
  103. package/src/components/interaction/form/Select/Select.module.css +1 -0
  104. package/src/components/interaction/form/Select/Select.spec.tsx +7 -0
  105. package/src/components/interaction/form/Switch/Switch.module.css +1 -0
  106. package/src/components/interaction/form/Switch/Switch.spec.tsx +7 -0
  107. package/src/components/interaction/form/Textarea/Textarea.module.css +1 -0
  108. package/src/components/interaction/form/Textarea/Textarea.spec.tsx +7 -0
  109. package/src/components/interaction/form/atoms/Message.module.css +14 -3
  110. package/src/components/interaction/form/atoms/Message.spec.tsx +22 -0
  111. package/src/components/interaction/form/atoms/Message.tsx +5 -0
  112. package/src/components/layout/SectionHeader/SectionHeader.mdx +18 -5
  113. package/src/components/layout/SectionHeader/SectionHeader.module.css +35 -14
  114. package/src/components/layout/SectionHeader/SectionHeader.spec.tsx +44 -0
  115. package/src/components/layout/SectionHeader/SectionHeader.stories.tsx +5 -0
  116. package/src/components/layout/SectionHeader/SectionHeader.tsx +3 -1
  117. package/src/components/ui/Alert/Alert.mdx +12 -1
  118. package/src/components/ui/Alert/Alert.module.css +32 -3
  119. package/src/components/ui/Alert/Alert.spec.tsx +27 -0
  120. package/src/components/ui/Alert/Alert.stories.tsx +20 -0
  121. package/src/components/ui/Alert/Alert.tsx +8 -1
  122. package/src/components/ui/Avatar/Avatar.mdx +22 -2
  123. package/src/components/ui/Avatar/Avatar.module.css +29 -2
  124. package/src/components/ui/Avatar/Avatar.spec.tsx +26 -0
  125. package/src/components/ui/Avatar/Avatar.stories.tsx +23 -0
  126. package/src/components/ui/Avatar/Avatar.tsx +4 -2
  127. package/src/components/ui/Avatar/avatarTone.spec.ts +41 -0
  128. package/src/components/ui/Avatar/avatarTone.ts +22 -0
  129. package/src/components/ui/Badge/Badge.mdx +1 -1
  130. package/src/components/ui/Badge/Badge.module.css +2 -2
  131. package/src/components/ui/Badge/Badge.spec.tsx +8 -0
  132. package/src/components/ui/Collapsible/Collapsible.module.css +1 -2
  133. package/src/components/ui/NotificationBanner/NotificationBanner.mdx +27 -1
  134. package/src/components/ui/NotificationBanner/NotificationBanner.module.css +33 -3
  135. package/src/components/ui/NotificationBanner/NotificationBanner.spec.tsx +35 -0
  136. package/src/components/ui/NotificationBanner/NotificationBanner.stories.tsx +25 -0
  137. package/src/components/ui/NotificationBanner/NotificationBanner.tsx +15 -1
  138. package/src/components/ui/Separator/Separator.mdx +1 -0
  139. package/src/components/ui/Separator/Separator.module.css +6 -0
  140. package/src/components/ui/Separator/Separator.spec.tsx +19 -0
  141. package/src/components/ui/Separator/Separator.stories.tsx +15 -0
  142. package/src/components/ui/Table/Table.mdx +4 -1
  143. package/src/components/ui/Table/Table.module.css +7 -7
  144. package/src/components/ui/Table/Table.spec.tsx +11 -0
  145. package/src/components/ui/Tabs/Tabs.mdx +11 -5
  146. package/src/components/ui/Tabs/Tabs.module.css +23 -5
  147. package/src/components/ui/Tabs/Tabs.spec.tsx +39 -0
  148. package/src/components/ui/Tabs/Tabs.tsx +2 -1
  149. package/src/components/ui/Tabs/getNodeText.spec.tsx +23 -0
  150. package/src/components/ui/Tabs/getNodeText.ts +13 -0
  151. package/src/components/ui/Tooltip/Tooltip.mdx +6 -3
  152. package/src/components/ui/Tooltip/Tooltip.module.css +6 -2
  153. package/src/components/ui/Tooltip/Tooltip.spec.tsx +10 -0
  154. package/src/components/ui/Tooltip/Tooltip.stories.tsx +13 -0
  155. package/src/css/bdc.css +5 -2
  156. package/src/css/bdc.spec.ts +65 -0
  157. package/src/stories/DesignSystem/Borders.mdx +17 -9
  158. package/src/test/token-contract.spec.ts +1 -0
  159. package/src/web-components/globals.ts +10 -4
  160. package/src/web-components/index.ts +1 -0
  161. package/src/web-components/interaction/BdsAccordion.mdx +1 -1
  162. package/src/web-components/interaction/BdsAccordion.stories.tsx +1 -1
  163. package/src/web-components/interaction/BdsButton.mdx +1 -1
  164. package/src/web-components/interaction/BdsButton.stories.tsx +1 -1
  165. package/src/web-components/interaction/BdsCollapsible.mdx +1 -1
  166. package/src/web-components/interaction/BdsCollapsible.stories.tsx +1 -1
  167. package/src/web-components/interaction/BdsDialog.mdx +1 -1
  168. package/src/web-components/interaction/BdsDialog.stories.tsx +1 -1
  169. package/src/web-components/interaction/BdsDrawer.mdx +1 -1
  170. package/src/web-components/interaction/BdsDrawer.stories.tsx +1 -1
  171. package/src/web-components/interaction/BdsDropdownMenu.mdx +62 -6
  172. package/src/web-components/interaction/BdsDropdownMenu.stories.tsx +32 -7
  173. package/src/web-components/interaction/BdsPopover.mdx +1 -1
  174. package/src/web-components/interaction/BdsPopover.stories.tsx +1 -1
  175. package/src/web-components/interaction/BdsSkipLink.mdx +1 -1
  176. package/src/web-components/interaction/BdsSkipLink.stories.tsx +1 -1
  177. package/src/web-components/interaction/BdsTabs.mdx +10 -1
  178. package/src/web-components/interaction/BdsTabs.stories.tsx +1 -1
  179. package/src/web-components/interaction/BdsToastProvider.mdx +1 -1
  180. package/src/web-components/interaction/BdsToastProvider.stories.tsx +1 -1
  181. package/src/web-components/interaction/BdsTooltip.mdx +13 -5
  182. package/src/web-components/interaction/BdsTooltip.stories.tsx +12 -12
  183. package/src/web-components/interaction/bds-dropdown-menu-group.ts +72 -0
  184. package/src/web-components/interaction/bds-dropdown-menu-item.ts +65 -17
  185. package/src/web-components/interaction/bds-dropdown-menu.spec.ts +135 -0
  186. package/src/web-components/interaction/bds-dropdown-menu.ts +5 -4
  187. package/src/web-components/interaction/bds-tab.spec.ts +34 -2
  188. package/src/web-components/interaction/bds-tab.ts +31 -6
  189. package/src/web-components/interaction/bds-tooltip.spec.ts +16 -0
  190. package/src/web-components/interaction/bds-tooltip.ts +10 -8
  191. package/src/web-components/interaction/form/BdsCheckbox.mdx +5 -1
  192. package/src/web-components/interaction/form/BdsCheckbox.stories.tsx +1 -1
  193. package/src/web-components/interaction/form/BdsCheckboxGroup.mdx +5 -1
  194. package/src/web-components/interaction/form/BdsCheckboxGroup.stories.tsx +1 -1
  195. package/src/web-components/interaction/form/BdsCombobox.mdx +5 -1
  196. package/src/web-components/interaction/form/BdsCombobox.stories.tsx +1 -1
  197. package/src/web-components/interaction/form/BdsFieldGroup.stories.tsx +1 -1
  198. package/src/web-components/interaction/form/BdsFileInput.mdx +1 -1
  199. package/src/web-components/interaction/form/BdsFileInput.stories.tsx +1 -1
  200. package/src/web-components/interaction/form/BdsFormInput.mdx +8 -1
  201. package/src/web-components/interaction/form/BdsFormInput.stories.tsx +1 -1
  202. package/src/web-components/interaction/form/BdsNumberInput.mdx +5 -1
  203. package/src/web-components/interaction/form/BdsNumberInput.stories.tsx +1 -1
  204. package/src/web-components/interaction/form/BdsRadio.mdx +5 -1
  205. package/src/web-components/interaction/form/BdsRadio.stories.tsx +1 -1
  206. package/src/web-components/interaction/form/BdsRadioGroup.mdx +5 -1
  207. package/src/web-components/interaction/form/BdsRadioGroup.stories.tsx +1 -1
  208. package/src/web-components/interaction/form/BdsSegmentedControl.mdx +1 -1
  209. package/src/web-components/interaction/form/BdsSegmentedControl.stories.tsx +1 -1
  210. package/src/web-components/interaction/form/BdsSelect.mdx +5 -1
  211. package/src/web-components/interaction/form/BdsSelect.stories.tsx +1 -1
  212. package/src/web-components/interaction/form/BdsSlider.mdx +5 -1
  213. package/src/web-components/interaction/form/BdsSlider.stories.tsx +1 -1
  214. package/src/web-components/interaction/form/BdsSwitch.mdx +5 -1
  215. package/src/web-components/interaction/form/BdsSwitch.stories.tsx +1 -1
  216. package/src/web-components/interaction/form/BdsTextarea.mdx +5 -1
  217. package/src/web-components/interaction/form/BdsTextarea.stories.tsx +1 -1
  218. package/src/web-components/interaction/form/bds-checkbox-group.spec.ts +32 -3
  219. package/src/web-components/interaction/form/bds-checkbox-group.ts +33 -17
  220. package/src/web-components/interaction/form/bds-checkbox.ts +1 -0
  221. package/src/web-components/interaction/form/bds-combobox.ts +6 -16
  222. package/src/web-components/interaction/form/bds-form-input.ts +6 -16
  223. package/src/web-components/interaction/form/bds-number-input.ts +6 -16
  224. package/src/web-components/interaction/form/bds-radio-group.spec.ts +32 -3
  225. package/src/web-components/interaction/form/bds-radio-group.ts +26 -14
  226. package/src/web-components/interaction/form/bds-radio.ts +1 -0
  227. package/src/web-components/interaction/form/bds-select.ts +6 -16
  228. package/src/web-components/interaction/form/bds-slider.ts +5 -16
  229. package/src/web-components/interaction/form/bds-switch.ts +1 -0
  230. package/src/web-components/interaction/form/bds-textarea.ts +6 -16
  231. package/src/web-components/interaction/form/field-message.spec.ts +62 -0
  232. package/src/web-components/interaction/form/field-message.ts +55 -0
  233. package/src/web-components/layout/BdsGrid.mdx +1 -1
  234. package/src/web-components/layout/BdsGrid.stories.tsx +1 -1
  235. package/src/web-components/layout/BdsGridItem.mdx +1 -1
  236. package/src/web-components/layout/BdsGridItem.stories.tsx +1 -1
  237. package/src/web-components/ui/BdsAlert.mdx +20 -1
  238. package/src/web-components/ui/BdsAlert.stories.tsx +29 -3
  239. package/src/web-components/ui/BdsAvatar.mdx +20 -3
  240. package/src/web-components/ui/BdsAvatar.stories.tsx +25 -2
  241. package/src/web-components/ui/BdsBadge.mdx +2 -1
  242. package/src/web-components/ui/BdsBadge.stories.tsx +1 -1
  243. package/src/web-components/ui/BdsBreadcrumb.mdx +1 -1
  244. package/src/web-components/ui/BdsBreadcrumb.stories.tsx +1 -1
  245. package/src/web-components/ui/BdsButtonContainer.mdx +1 -1
  246. package/src/web-components/ui/BdsButtonContainer.stories.tsx +1 -1
  247. package/src/web-components/ui/BdsCalendar.mdx +1 -1
  248. package/src/web-components/ui/BdsCalendar.stories.tsx +1 -1
  249. package/src/web-components/ui/BdsCalendarRange.mdx +1 -1
  250. package/src/web-components/ui/BdsCalendarRange.stories.tsx +1 -1
  251. package/src/web-components/ui/BdsCard.mdx +1 -1
  252. package/src/web-components/ui/BdsCard.stories.tsx +1 -1
  253. package/src/web-components/ui/BdsCarousel.mdx +1 -1
  254. package/src/web-components/ui/BdsCarousel.stories.tsx +1 -1
  255. package/src/web-components/ui/BdsDescriptionList.mdx +1 -1
  256. package/src/web-components/ui/BdsDescriptionList.stories.tsx +1 -1
  257. package/src/web-components/ui/BdsIconWrapper.mdx +1 -1
  258. package/src/web-components/ui/BdsIconWrapper.stories.tsx +1 -1
  259. package/src/web-components/ui/BdsLink.mdx +1 -1
  260. package/src/web-components/ui/BdsLink.stories.tsx +1 -1
  261. package/src/web-components/ui/BdsLoading.mdx +1 -1
  262. package/src/web-components/ui/BdsLoading.stories.tsx +1 -1
  263. package/src/web-components/ui/BdsNotificationBanner.mdx +11 -2
  264. package/src/web-components/ui/BdsNotificationBanner.stories.tsx +29 -2
  265. package/src/web-components/ui/BdsPagination.mdx +1 -1
  266. package/src/web-components/ui/BdsPagination.stories.tsx +1 -1
  267. package/src/web-components/ui/BdsProgress.mdx +1 -1
  268. package/src/web-components/ui/BdsProgress.stories.tsx +1 -1
  269. package/src/web-components/ui/BdsProgressCircle.mdx +1 -1
  270. package/src/web-components/ui/BdsProgressCircle.stories.tsx +1 -1
  271. package/src/web-components/ui/BdsRating.mdx +5 -2
  272. package/src/web-components/ui/BdsRating.stories.tsx +1 -1
  273. package/src/web-components/ui/BdsSectionHeader.mdx +18 -6
  274. package/src/web-components/ui/BdsSectionHeader.stories.tsx +10 -2
  275. package/src/web-components/ui/BdsSeparator.mdx +2 -1
  276. package/src/web-components/ui/BdsSeparator.stories.tsx +13 -1
  277. package/src/web-components/ui/BdsSkeleton.mdx +1 -1
  278. package/src/web-components/ui/BdsSkeleton.stories.tsx +1 -1
  279. package/src/web-components/ui/BdsTable.mdx +5 -1
  280. package/src/web-components/ui/BdsTable.stories.tsx +1 -1
  281. package/src/web-components/ui/BdsTypography.mdx +1 -1
  282. package/src/web-components/ui/BdsTypography.stories.tsx +1 -1
  283. package/src/web-components/ui/bds-alert.spec.ts +34 -0
  284. package/src/web-components/ui/bds-alert.ts +36 -3
  285. package/src/web-components/ui/bds-avatar.spec.ts +47 -0
  286. package/src/web-components/ui/bds-avatar.ts +36 -3
  287. package/src/web-components/ui/bds-badge.spec.ts +6 -0
  288. package/src/web-components/ui/bds-badge.ts +2 -2
  289. package/src/web-components/ui/bds-notification-banner.spec.ts +52 -0
  290. package/src/web-components/ui/bds-notification-banner.ts +55 -3
  291. package/src/web-components/ui/bds-rating.spec.ts +7 -0
  292. package/src/web-components/ui/bds-rating.ts +6 -0
  293. package/src/web-components/ui/bds-section-header.spec.ts +36 -3
  294. package/src/web-components/ui/bds-section-header.ts +32 -10
  295. package/src/web-components/ui/bds-separator.spec.ts +8 -0
  296. package/src/web-components/ui/bds-separator.ts +7 -0
  297. package/src/web-components/ui/bds-table.spec.ts +11 -0
  298. package/src/web-components/ui/bds-table.ts +5 -5
  299. package/dist/web-components/chunk-QZAIRJ75.js +0 -111
@@ -51,13 +51,15 @@ export class BdsTooltip extends LitElement {
51
51
  .tooltip {
52
52
  position: absolute;
53
53
  z-index: var(--bds-z-index_popover);
54
- padding: var(--bds-space_xxs) var(--bds-space_xs);
55
- border-radius: var(--tooltip_radius, var(--bds-border_radius--full));
54
+ padding: var(--tooltip_padding, var(--bds-space_xxs) var(--bds-space_s));
55
+ border-radius: var(--tooltip_radius, var(--bds-border_radius--xs));
56
56
  background-color: var(--tooltip_bg, var(--bds-color_on-bg));
57
57
  color: var(--tooltip_text, var(--bds-color_bg));
58
- font-size: var(--bds-font_size--body--s);
58
+ font-size: var(--tooltip_font-size, var(--bds-font_size--body--s));
59
59
  line-height: var(--bds-font_line-height--body);
60
- white-space: nowrap;
60
+ inline-size: max-content;
61
+ max-inline-size: var(--tooltip_max-inline-size, 20rem);
62
+ white-space: normal;
61
63
  pointer-events: none;
62
64
 
63
65
  /* Hidden by default */
@@ -75,28 +77,28 @@ export class BdsTooltip extends LitElement {
75
77
 
76
78
  /* Placement: top (default) */
77
79
  .tooltip.--placement_top {
78
- inset-block-end: calc(100% + var(--bds-space_xs));
80
+ inset-block-end: calc(100% + var(--tooltip_offset, var(--bds-space_xs)));
79
81
  inset-inline-start: 50%;
80
82
  transform: translateX(-50%);
81
83
  }
82
84
 
83
85
  /* Placement: bottom */
84
86
  .tooltip.--placement_bottom {
85
- inset-block-start: calc(100% + var(--bds-space_xs));
87
+ inset-block-start: calc(100% + var(--tooltip_offset, var(--bds-space_xs)));
86
88
  inset-inline-start: 50%;
87
89
  transform: translateX(-50%);
88
90
  }
89
91
 
90
92
  /* Placement: left */
91
93
  .tooltip.--placement_left {
92
- inset-inline-end: calc(100% + var(--bds-space_xs));
94
+ inset-inline-end: calc(100% + var(--tooltip_offset, var(--bds-space_xs)));
93
95
  inset-block-start: 50%;
94
96
  transform: translateY(-50%);
95
97
  }
96
98
 
97
99
  /* Placement: right */
98
100
  .tooltip.--placement_right {
99
- inset-inline-start: calc(100% + var(--bds-space_xs));
101
+ inset-inline-start: calc(100% + var(--tooltip_offset, var(--bds-space_xs)));
100
102
  inset-block-start: 50%;
101
103
  transform: translateY(-50%);
102
104
  }
@@ -7,7 +7,7 @@ import * as Stories from './BdsCheckbox.stories';
7
7
 
8
8
  Form-associated checkbox custom element. Participates in HTML forms via the Form-Associated Custom Elements API — native browser validation (required, etc.) works without any wrapper.
9
9
 
10
- > **Status: experimental** — API may change before stable release.
10
+ > **Status: alpha** — API may change before stable release.
11
11
 
12
12
  ## Installation
13
13
 
@@ -86,6 +86,10 @@ Use `<bds-checkbox>` whenever you need a single boolean toggle that participates
86
86
  <bds-checkbox name="agree" value="yes" required>I agree to the terms</bds-checkbox>
87
87
  ```
88
88
 
89
+ ## Error state
90
+
91
+ With `error`, the checkbox ring widens to `--bdc-outline_width--error` (2px) in `--bdc_color--error`. Message hooks (`--formMessage_*`: font-size, gap, icon-size, color--error, font-weight--error, color--hint, font-style--hint) are listed on `<bds-form-input>`.
92
+
89
93
  ## Accessibility
90
94
 
91
95
  - The inner `<input type="checkbox">` is associated with a `<label>` via matching `id`/`for` attributes
@@ -36,7 +36,7 @@ function BdsCheckbox({
36
36
  const meta = {
37
37
  title: 'Web Components/Form/Checkbox',
38
38
  component: BdsCheckbox,
39
- tags: ['!stable', 'experimental'],
39
+ tags: ['!stable', 'alpha'],
40
40
  parameters: { layout: 'centered' },
41
41
  argTypes: {
42
42
  checked: { control: 'boolean' },
@@ -7,7 +7,7 @@ import * as Stories from './BdsCheckboxGroup.stories';
7
7
 
8
8
  Groups related checkboxes with a shared label, hint, and error message. Renders a `<fieldset>` with a `<legend>` for accessible grouping.
9
9
 
10
- > **Status: experimental** — API may change before stable release.
10
+ > **Status: alpha** — API may change before stable release.
11
11
 
12
12
  ## Installation
13
13
 
@@ -62,6 +62,10 @@ Use `<bds-checkbox-group>` when you have multiple related checkboxes that belong
62
62
  </bds-checkbox-group>
63
63
  ```
64
64
 
65
+ ## Error state
66
+
67
+ With `error`, the message gets a warning icon and the slotted `<bds-checkbox>` elements get `error` too, so they show the error ring (`--bdc-outline_width--error`, `--bdc_color--error`). A checkbox marked `error` in markup keeps it when the group error clears. Message hooks (`--formMessage_*`: font-size, gap, icon-size, color--error, font-weight--error, color--hint, font-style--hint) are listed on `<bds-form-input>`.
68
+
65
69
  ## Accessibility
66
70
 
67
71
  - Renders a `<fieldset>` with a `<legend>`, which is announced as a group by screen readers
@@ -33,7 +33,7 @@ function BdsCheckboxGroup({
33
33
  const meta = {
34
34
  title: 'Web Components/Form/CheckboxGroup',
35
35
  component: BdsCheckboxGroup,
36
- tags: ['!stable', 'experimental'],
36
+ tags: ['!stable', 'alpha'],
37
37
  parameters: { layout: 'centered' },
38
38
  argTypes: {
39
39
  required: { control: 'boolean' },
@@ -7,7 +7,7 @@ import * as Stories from './BdsCombobox.stories';
7
7
 
8
8
  Form-associated autocomplete combobox. Renders a text input with a filterable dropdown. Keyboard navigation: `ArrowDown`/`ArrowUp` to move focus, `Enter` to select, `Escape` to close.
9
9
 
10
- > **Status: experimental** — API may change before stable release.
10
+ > **Status: alpha** — API may change before stable release.
11
11
 
12
12
  ## Installation
13
13
 
@@ -96,6 +96,10 @@ _None._
96
96
  ></bds-combobox>
97
97
  ```
98
98
 
99
+ ## Error state
100
+
101
+ With `error`, the message gets a warning icon and the field ring widens to `--bdc-outline_width--error` (2px). Message hooks (`--formMessage_*`: font-size, gap, icon-size, color--error, font-weight--error, color--hint, font-style--hint) are listed on `<bds-form-input>`.
102
+
99
103
  ## Accessibility
100
104
 
101
105
  - `<label>` is associated with the inner input via matching `id`/`for` attributes when `label` is set
@@ -51,7 +51,7 @@ function BdsCombobox({
51
51
  const meta = {
52
52
  title: 'Web Components/Form/Combobox',
53
53
  component: BdsCombobox,
54
- tags: ['!stable', 'experimental'],
54
+ tags: ['!stable', 'alpha'],
55
55
  parameters: { layout: 'centered' },
56
56
  argTypes: {
57
57
  disabled: { control: 'boolean' },
@@ -27,7 +27,7 @@ function BdsFieldGroup({
27
27
  const meta = {
28
28
  title: 'Web Components/Form/FieldGroup',
29
29
  component: BdsFieldGroup,
30
- tags: ['!stable', 'experimental'],
30
+ tags: ['!stable', 'alpha'],
31
31
  parameters: {
32
32
  layout: 'padded',
33
33
  docs: {
@@ -7,7 +7,7 @@ import * as Stories from './BdsFileInput.stories';
7
7
 
8
8
  Form-associated file upload zone with drag-and-drop support. Renders a styled drop zone that opens the native file picker on click or keyboard activation.
9
9
 
10
- > **Status: experimental** — API may change before stable release.
10
+ > **Status: alpha** — API may change before stable release.
11
11
 
12
12
  ## Installation
13
13
 
@@ -30,7 +30,7 @@ function BdsFileInput({
30
30
  const meta = {
31
31
  title: 'Web Components/Form/FileInput',
32
32
  component: BdsFileInput,
33
- tags: ['!stable', 'experimental'],
33
+ tags: ['!stable', 'alpha'],
34
34
  parameters: { layout: 'centered' },
35
35
  argTypes: {
36
36
  multiple: { control: 'boolean' },
@@ -7,7 +7,7 @@ import * as Stories from './BdsFormInput.stories';
7
7
 
8
8
  Form-associated text input with label, hint, error, and prefix/suffix slot support. Participates in HTML forms via the Form-Associated Custom Elements API.
9
9
 
10
- > **Status: experimental** — API may change before stable release.
10
+ > **Status: alpha** — API may change before stable release.
11
11
 
12
12
  ## Installation
13
13
 
@@ -88,6 +88,13 @@ Token names mirror the React `FormInput` component so themes carry over between
88
88
  | `--formInput_border` | `none` | Border (layered on top of the inset focus/error ring) |
89
89
  | `--formInput_radius` | `var(--bds-border_radius--full)` | Corner radius |
90
90
  | `--formInput_shadow` | `var(--bdc-outline_shadow)` | Box shadow |
91
+ | `--formMessage_font-size` | `var(--bds-font_size--body--s)` | Font size of the error and hint message (shared by all form controls) |
92
+ | `--formMessage_gap` | `var(--bds-space_xxs)` | Gap between the error icon and the error text |
93
+ | `--formMessage_icon-size` | `1.15em` | Size of the error icon |
94
+ | `--formMessage_color--error` | `var(--bds-color_error_on-bg)` | Error message colour |
95
+ | `--formMessage_font-weight--error` | `var(--bds-font_weight--semibold)` | Error message weight |
96
+ | `--formMessage_color--hint` | `inherit` | Hint colour |
97
+ | `--formMessage_font-style--hint` | `italic` | Hint font style |
91
98
 
92
99
  `--input_*` (e.g. `--input_border`, `--input_radius`, `--input_shadow`, `--input_color`, `--input_color_bg`) are deprecated aliases for the `--formInput_*` tokens above — they still work but `--formInput_*` is the documented, forward-compatible name. `--formInput_border-color` is a web-component-only legacy override for the inset ring colour (fallback `currentcolor`); prefer `--formInput_border` for adding a visible border.
93
100
 
@@ -55,7 +55,7 @@ function BdsFormInput({
55
55
  const meta = {
56
56
  title: 'Web Components/Form/FormInput',
57
57
  component: BdsFormInput,
58
- tags: ['!stable', 'experimental'],
58
+ tags: ['!stable', 'alpha'],
59
59
  parameters: { layout: 'centered' },
60
60
  argTypes: {
61
61
  type: {
@@ -7,7 +7,7 @@ import * as Stories from './BdsNumberInput.stories';
7
7
 
8
8
  Form-associated number input with increment and decrement stepper buttons. Hides the browser's native spinners and provides styled stepper controls instead.
9
9
 
10
- > **Status: experimental** — API may change before stable release.
10
+ > **Status: alpha** — API may change before stable release.
11
11
 
12
12
  ## Installation
13
13
 
@@ -73,6 +73,10 @@ Use `<bds-number-input>` for quantity selectors, counters, or any numeric field
73
73
  <bds-number-input name="qty" label="Quantity" value="1" min="0" max="99" step="1"></bds-number-input>
74
74
  ```
75
75
 
76
+ ## Error state
77
+
78
+ With `error`, the message gets a warning icon and the field ring widens to `--bdc-outline_width--error` (2px). Message hooks (`--formMessage_*`: font-size, gap, icon-size, color--error, font-weight--error, color--hint, font-style--hint) are listed on `<bds-form-input>`.
79
+
76
80
  ## Accessibility
77
81
 
78
82
  - `label` renders a shadow `<label for>` wired to the inner input's `id`, so the field always has an accessible name when a label is provided — leaving `label` unset renders no label element and no accessible name
@@ -39,7 +39,7 @@ function BdsNumberInput({
39
39
  const meta = {
40
40
  title: 'Web Components/Form/NumberInput',
41
41
  component: BdsNumberInput,
42
- tags: ['!stable', 'experimental'],
42
+ tags: ['!stable', 'alpha'],
43
43
  parameters: { layout: 'centered' },
44
44
  argTypes: {
45
45
  disabled: { control: 'boolean' },
@@ -7,7 +7,7 @@ import * as Stories from './BdsRadio.stories';
7
7
 
8
8
  Form-associated radio button custom element. Use multiple `<bds-radio>` elements with the same `name` to form a mutually exclusive group. For a labelled group with error/hint support, use `<bds-radio-group>`.
9
9
 
10
- > **Status: experimental** — API may change before stable release.
10
+ > **Status: alpha** — API may change before stable release.
11
11
 
12
12
  ## Installation
13
13
 
@@ -89,6 +89,10 @@ Use `<bds-radio>` for single-choice selection from a set of options. Always grou
89
89
  <bds-radio name="size" value="l">Large</bds-radio>
90
90
  ```
91
91
 
92
+ ## Error state
93
+
94
+ With `error`, the radio ring widens to `--bdc-outline_width--error` (2px) in `--bdc_color--error`. Message hooks (`--formMessage_*`: font-size, gap, icon-size, color--error, font-weight--error, color--hint, font-style--hint) are listed on `<bds-form-input>`.
95
+
92
96
  ## Accessibility
93
97
 
94
98
  - The inner `<input type="radio">` is associated with a `<label>` via matching `id`/`for` attributes
@@ -39,7 +39,7 @@ function BdsRadio({
39
39
  const meta = {
40
40
  title: 'Web Components/Form/Radio',
41
41
  component: BdsRadio,
42
- tags: ['!stable', 'experimental'],
42
+ tags: ['!stable', 'alpha'],
43
43
  parameters: { layout: 'centered' },
44
44
  argTypes: {
45
45
  checked: { control: 'boolean' },
@@ -7,7 +7,7 @@ import * as Stories from './BdsRadioGroup.stories';
7
7
 
8
8
  Groups related radio buttons with a shared label and name. Renders a `<fieldset>` with a `<legend>`, and propagates the `name` attribute to all slotted `<bds-radio>` children so they form a mutually exclusive set.
9
9
 
10
- > **Status: experimental** — API may change before stable release.
10
+ > **Status: alpha** — API may change before stable release.
11
11
 
12
12
  ## Installation
13
13
 
@@ -68,6 +68,10 @@ The legend uses `var(--bds-font_weight--medium)` (matching the React `RadioGroup
68
68
  </bds-radio-group>
69
69
  ```
70
70
 
71
+ ## Error state
72
+
73
+ With `error`, the message gets a warning icon and the slotted `<bds-radio>` elements get `error` too, so they show the error ring (`--bdc-outline_width--error`, `--bdc_color--error`). A radio marked `error` in markup keeps it when the group error clears. Message hooks (`--formMessage_*`: font-size, gap, icon-size, color--error, font-weight--error, color--hint, font-style--hint) are listed on `<bds-form-input>`.
74
+
71
75
  ## Accessibility
72
76
 
73
77
  - Renders a `<fieldset>` with a `<legend>`, which is announced as a group by screen readers
@@ -36,7 +36,7 @@ function BdsRadioGroup({
36
36
  const meta = {
37
37
  title: 'Web Components/Form/RadioGroup',
38
38
  component: BdsRadioGroup,
39
- tags: ['!stable', 'experimental'],
39
+ tags: ['!stable', 'alpha'],
40
40
  parameters: { layout: 'centered' },
41
41
  argTypes: {
42
42
  required: { control: 'boolean' },
@@ -7,7 +7,7 @@ import * as Stories from './BdsSegmentedControl.stories';
7
7
 
8
8
  Form-associated segmented control. Renders a group of radio buttons (or anchor links) styled as a unified segmented bar. Supports two visual variants: `outline` (sliding inset-border indicator) and `filled` (sliding filled thumb).
9
9
 
10
- > **Status: experimental** — API may change before stable release.
10
+ > **Status: alpha** — API may change before stable release.
11
11
 
12
12
  ## Installation
13
13
 
@@ -45,7 +45,7 @@ function BdsSegmentedControl({
45
45
  const meta = {
46
46
  title: 'Web Components/Form/SegmentedControl',
47
47
  component: BdsSegmentedControl,
48
- tags: ['!stable', 'experimental'],
48
+ tags: ['!stable', 'alpha'],
49
49
  parameters: { layout: 'centered' },
50
50
  argTypes: {
51
51
  variant: { control: 'select', options: ['outline', 'filled'] },
@@ -7,7 +7,7 @@ import * as Stories from './BdsSelect.stories';
7
7
 
8
8
  Form-associated select custom element. Wraps a native `<select>` with consistent styling. Options are passed as a JSON attribute because slotting `<option>` elements into shadow DOM is not supported cross-browser.
9
9
 
10
- > **Status: experimental** — API may change before stable release.
10
+ > **Status: alpha** — API may change before stable release.
11
11
 
12
12
  ## Installation
13
13
 
@@ -82,6 +82,10 @@ When `label` is omitted, set `aria-label` on the host element (`<bds-select aria
82
82
  ></bds-select>
83
83
  ```
84
84
 
85
+ ## Error state
86
+
87
+ With `error`, the message gets a warning icon and the field ring widens to `--bdc-outline_width--error` (2px). Message hooks (`--formMessage_*`: font-size, gap, icon-size, color--error, font-weight--error, color--hint, font-style--hint) are listed on `<bds-form-input>`.
88
+
85
89
  ## Accessibility
86
90
 
87
91
  - Wraps a native `<select>` which has full browser and assistive technology support
@@ -54,7 +54,7 @@ function BdsSelect({
54
54
  const meta = {
55
55
  title: 'Web Components/Form/Select',
56
56
  component: BdsSelect,
57
- tags: ['!stable', 'experimental'],
57
+ tags: ['!stable', 'alpha'],
58
58
  parameters: { layout: 'centered' },
59
59
  argTypes: {
60
60
  required: { control: 'boolean' },
@@ -7,7 +7,7 @@ import * as Stories from './BdsSlider.stories';
7
7
 
8
8
  Form-associated range slider. Wraps a native `<input type="range">` with a styled fill track driven by the `--slider_fill` CSS custom property, plus label/hint/error wiring matching the other form web components.
9
9
 
10
- > **Status: experimental** — API may change before stable release.
10
+ > **Status: alpha** — API may change before stable release.
11
11
 
12
12
  ## Installation
13
13
 
@@ -84,6 +84,10 @@ Use `<bds-slider>` for continuous or stepped numeric ranges — volume controls,
84
84
  <bds-slider name="volume" label="Volume" value="50" min="0" max="100" step="5" show-value></bds-slider>
85
85
  ```
86
86
 
87
+ ## Error state
88
+
89
+ With `error`, the message gets a warning icon. Message hooks (`--formMessage_*`: font-size, gap, icon-size, color--error, font-weight--error, color--hint, font-style--hint) are listed on `<bds-form-input>`.
90
+
87
91
  ## Accessibility
88
92
 
89
93
  - Wraps a native `<input type="range">` which has full browser and assistive technology support
@@ -42,7 +42,7 @@ function BdsSlider({
42
42
  const meta = {
43
43
  title: 'Web Components/Form/Slider',
44
44
  component: BdsSlider,
45
- tags: ['!stable', 'experimental'],
45
+ tags: ['!stable', 'alpha'],
46
46
  parameters: { layout: 'centered' },
47
47
  argTypes: {
48
48
  value: { control: 'number' },
@@ -7,7 +7,7 @@ import * as Stories from './BdsSwitch.stories';
7
7
 
8
8
  Form-associated toggle switch. Visually a sliding toggle but semantically equivalent to a checkbox (`role="switch"`). Participates in HTML forms via the Form-Associated Custom Elements API.
9
9
 
10
- > **Status: experimental** — API may change before stable release.
10
+ > **Status: alpha** — API may change before stable release.
11
11
 
12
12
  ## Installation
13
13
 
@@ -89,6 +89,10 @@ Use `<bds-switch>` for binary on/off settings where the change takes immediate e
89
89
  | `--switch_border-color--error` | `var(--bds-color_error)` | Track border colour when `error` is set |
90
90
  | `--switch_shadow` | `var(--bdc-outline_shadow)` | Track box-shadow tail |
91
91
 
92
+ ## Error state
93
+
94
+ With `error`, the track ring widens to `--bdc-outline_width--error` (2px). Message hooks (`--formMessage_*`: font-size, gap, icon-size, color--error, font-weight--error, color--hint, font-style--hint) are listed on `<bds-form-input>`.
95
+
92
96
  ## Accessibility
93
97
 
94
98
  - Uses `role="switch"` on the inner `<input type="checkbox">` for correct screen reader announcement
@@ -39,7 +39,7 @@ function BdsSwitch({
39
39
  const meta = {
40
40
  title: 'Web Components/Form/Switch',
41
41
  component: BdsSwitch,
42
- tags: ['!stable', 'experimental'],
42
+ tags: ['!stable', 'alpha'],
43
43
  parameters: { layout: 'centered' },
44
44
  argTypes: {
45
45
  checked: { control: 'boolean' },
@@ -7,7 +7,7 @@ import * as Stories from './BdsTextarea.stories';
7
7
 
8
8
  Form-associated multiline text input. Wraps a native `<textarea>` with consistent styling while participating in HTML forms via the Form-Associated Custom Elements API.
9
9
 
10
- > **Status: experimental** — API may change before stable release.
10
+ > **Status: alpha** — API may change before stable release.
11
11
 
12
12
  ## Installation
13
13
 
@@ -88,6 +88,10 @@ Use `<bds-textarea>` for multiline text entry — messages, comments, descriptio
88
88
  <bds-textarea name="feedback" label="Feedback" error="Feedback is required"></bds-textarea>
89
89
  ```
90
90
 
91
+ ## Error state
92
+
93
+ With `error`, the message gets a warning icon and the field ring widens to `--bdc-outline_width--error` (2px). Message hooks (`--formMessage_*`: font-size, gap, icon-size, color--error, font-weight--error, color--hint, font-style--hint) are listed on `<bds-form-input>`.
94
+
91
95
  ## Accessibility
92
96
 
93
97
  - Wraps a native `<textarea>` which has full browser and assistive technology support
@@ -39,7 +39,7 @@ function BdsTextarea({
39
39
  const meta = {
40
40
  title: 'Web Components/Form/Textarea',
41
41
  component: BdsTextarea,
42
- tags: ['!stable', 'experimental'],
42
+ tags: ['!stable', 'alpha'],
43
43
  parameters: { layout: 'centered' },
44
44
  argTypes: {
45
45
  rows: { control: 'number' },
@@ -137,9 +137,9 @@ describe('bds-checkbox-group', () => {
137
137
  });
138
138
 
139
139
  it('uses medium font-weight token for the legend (not semibold)', () => {
140
- const styles = BdsCheckboxGroup.styles.toString();
141
- expect(styles).toContain('--bds-font_weight--medium');
142
- expect(styles).not.toContain('--bds-font_weight--semibold');
140
+ const legendRule = BdsCheckboxGroup.styles.toString().match(/\.legend \{[^}]*\}/)?.[0] ?? '';
141
+ expect(legendRule).toContain('--bds-font_weight--medium');
142
+ expect(legendRule).not.toContain('--bds-font_weight--semibold');
143
143
  });
144
144
 
145
145
  it('uses the on-bg error color token for the error message (not the raw error token)', () => {
@@ -151,4 +151,33 @@ describe('bds-checkbox-group', () => {
151
151
  const styles = BdsCheckboxGroup.styles.toString();
152
152
  expect(styles).toContain(':host([disabled])');
153
153
  });
154
+
155
+ it('shows the error icon in the message', async () => {
156
+ const el = await fixture('<bds-checkbox-group label="Test" error="Required field"></bds-checkbox-group>');
157
+ const message = el.shadowRoot!.querySelector('.message--error')!;
158
+ expect(message.querySelector('svg')?.getAttribute('aria-hidden')).toBe('true');
159
+ expect(message.textContent).toContain('Required field');
160
+ cleanup(el);
161
+ });
162
+
163
+ it('propagates error to slotted bds-checkbox elements', async () => {
164
+ const el = await fixture(
165
+ '<bds-checkbox-group label="Test" error="Required field"><bds-checkbox value="a">A</bds-checkbox><bds-checkbox value="b">B</bds-checkbox></bds-checkbox-group>',
166
+ );
167
+ const children = Array.from(el.querySelectorAll('bds-checkbox'));
168
+ expect(children.every(child => child.hasAttribute('error'))).toBe(true);
169
+ cleanup(el);
170
+ });
171
+
172
+ it('removes propagated error when the group error clears, keeping an individual error', async () => {
173
+ const el = await fixture(
174
+ '<bds-checkbox-group label="Test" error="Required field"><bds-checkbox value="a">A</bds-checkbox><bds-checkbox value="b" error>B</bds-checkbox></bds-checkbox-group>',
175
+ ) as BdsCheckboxGroup;
176
+ el.error = undefined;
177
+ await el.updateComplete;
178
+ const [first, second] = Array.from(el.querySelectorAll('bds-checkbox'));
179
+ expect(first.hasAttribute('error')).toBe(false);
180
+ expect(second.hasAttribute('error')).toBe(true);
181
+ cleanup(el);
182
+ });
154
183
  });
@@ -1,4 +1,5 @@
1
1
  import { LitElement, css, html, nothing } from 'lit';
2
+ import { fieldMessageStyles, renderFieldMessage } from './field-message';
2
3
 
3
4
  /**
4
5
  * `<bds-checkbox-group>` — groups related checkboxes with a shared label.
@@ -96,19 +97,10 @@ export class BdsCheckboxGroup extends LitElement {
96
97
  gap: var(--bds-space_xs);
97
98
  }
98
99
 
100
+ ${fieldMessageStyles}
101
+
99
102
  .message {
100
103
  margin-block-start: var(--bds-space_xs);
101
- font-size: var(--bds-font_size--body--s);
102
- font-family: var(--bds-font_family--body);
103
- }
104
-
105
- .message--error {
106
- color: var(--bds-color_error_on-bg);
107
- }
108
-
109
- .message--hint {
110
- color: var(--bds-color_on-bg--subtle);
111
- font-style: italic;
112
104
  }
113
105
  `;
114
106
 
@@ -156,16 +148,40 @@ export class BdsCheckboxGroup extends LitElement {
156
148
  });
157
149
  };
158
150
 
151
+ /**
152
+ * Propagates the group's `error` to slotted `<bds-checkbox>` elements so they
153
+ * show the error ring. A checkbox individually marked `error` in markup keeps it.
154
+ */
155
+ private _propagateError = () => {
156
+ this.querySelectorAll('bds-checkbox').forEach(checkbox => {
157
+ const el = checkbox as HTMLElement;
158
+ if (this.error) {
159
+ if (!el.hasAttribute('error')) {
160
+ el.setAttribute('data-bds-group-error', '');
161
+ }
162
+ el.setAttribute('error', '');
163
+ } else if (el.hasAttribute('data-bds-group-error')) {
164
+ el.removeAttribute('error');
165
+ el.removeAttribute('data-bds-group-error');
166
+ }
167
+ });
168
+ };
169
+
170
+ private _propagateToCheckboxes = () => {
171
+ this._propagateDisabled();
172
+ this._propagateError();
173
+ };
174
+
159
175
  connectedCallback() {
160
176
  super.connectedCallback();
161
177
  // Propagate after slot content has been parsed
162
- Promise.resolve().then(this._propagateDisabled);
178
+ Promise.resolve().then(this._propagateToCheckboxes);
163
179
  }
164
180
 
165
181
  updated(changed: Map<string, unknown>) {
166
182
  super.updated(changed);
167
- if (changed.has('disabled')) {
168
- this._propagateDisabled();
183
+ if (changed.has('disabled') || changed.has('error')) {
184
+ this._propagateToCheckboxes();
169
185
  }
170
186
  }
171
187
 
@@ -183,12 +199,12 @@ export class BdsCheckboxGroup extends LitElement {
183
199
  : ''}
184
200
  </legend>
185
201
  <div class="items">
186
- <slot @slotchange=${this._propagateDisabled}></slot>
202
+ <slot @slotchange=${this._propagateToCheckboxes}></slot>
187
203
  </div>
188
204
  ${this.error
189
- ? html`<p id=${errorId} class="message message--error" role="alert">${this.error}</p>`
205
+ ? renderFieldMessage('error', errorId, this.error)
190
206
  : this.hint
191
- ? html`<p id=${hintId} class="message message--hint">${this.hint}</p>`
207
+ ? renderFieldMessage('hint', hintId, this.hint)
192
208
  : ''}
193
209
  </fieldset>
194
210
  `;
@@ -103,6 +103,7 @@ export class BdsCheckbox extends LitElement {
103
103
 
104
104
  :host([error]) .input {
105
105
  --bdc_color: var(--bdc_color--error);
106
+ --bdc-outline_width: var(--bdc-outline_width--error, 2px);
106
107
  }
107
108
 
108
109
  label {
@@ -1,4 +1,5 @@
1
1
  import { LitElement, css, html, nothing } from 'lit';
2
+ import { fieldMessageStyles, renderFieldMessage } from './field-message';
2
3
 
3
4
  export interface ComboboxOption {
4
5
  value: string;
@@ -99,10 +100,12 @@ export class BdsCombobox extends LitElement {
99
100
 
100
101
  :host([error]) .input {
101
102
  --bdc_color: var(--bdc_color--error);
103
+ --bdc-outline_width: var(--bdc-outline_width--error, 2px);
102
104
  }
103
105
 
104
106
  :host([error]) .input:focus {
105
107
  --bdc_color: var(--bdc_color--error);
108
+ --bdc-outline_width: var(--bdc-outline_width--error, 2px);
106
109
  }
107
110
 
108
111
  .chevron {
@@ -176,20 +179,7 @@ export class BdsCombobox extends LitElement {
176
179
  color: var(--bds-color_on-bg--subtle);
177
180
  }
178
181
 
179
- .message {
180
- margin-block-start: var(--bds-space_xxs);
181
- font-size: var(--bds-font_size--body--s);
182
- font-family: var(--bds-font_family--body);
183
- }
184
-
185
- .message--error {
186
- color: var(--bds-color_error);
187
- }
188
-
189
- .message--hint {
190
- color: var(--bds-color_on-bg--subtle);
191
- font-style: italic;
192
- }
182
+ ${fieldMessageStyles}
193
183
  `;
194
184
 
195
185
  static properties = {
@@ -402,9 +392,9 @@ export class BdsCombobox extends LitElement {
402
392
  ` : ''}
403
393
  </div>
404
394
  ${this.error
405
- ? html`<p id=${errorId} class="message message--error" role="alert">${this.error}</p>`
395
+ ? renderFieldMessage('error', errorId, this.error)
406
396
  : this.hint
407
- ? html`<p id=${hintId} class="message message--hint">${this.hint}</p>`
397
+ ? renderFieldMessage('hint', hintId, this.hint)
408
398
  : ''}
409
399
  `;
410
400
  }