@boostdev/design-system-components 2.15.0 → 2.16.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 (284) hide show
  1. package/AGENTS.md +19 -14
  2. package/dist/client.cjs +271 -205
  3. package/dist/client.css +801 -642
  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 +801 -642
  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-LDIPCTRN.js → chunk-2MJTO2IW.js} +48 -2
  14. package/dist/web-components/{chunk-3WAV6MDN.js → chunk-3FSGP35V.js} +1 -0
  15. package/dist/web-components/{chunk-KA3VPKMY.js → chunk-4MB2ICSK.js} +1 -0
  16. package/dist/web-components/{chunk-IDSM74LM.js → chunk-6XL5P76D.js} +3 -3
  17. package/dist/web-components/{chunk-P24JYC5V.js → chunk-7VXRMCAL.js} +10 -4
  18. package/dist/web-components/{chunk-CUKQ2L5B.js → chunk-AGI6YQRC.js} +9 -16
  19. package/dist/web-components/chunk-BDRV452N.js +51 -0
  20. package/dist/web-components/{chunk-3AY2YKCM.js → chunk-CKCPV347.js} +1 -0
  21. package/dist/web-components/{chunk-HBLJ4SLY.js → chunk-DD3OUXNG.js} +5 -5
  22. package/dist/web-components/{chunk-RVF7W653.js → chunk-DGOCPKHI.js} +30 -10
  23. package/dist/web-components/{chunk-2OLVQUBU.js → chunk-EYCW7TKB.js} +8 -15
  24. package/dist/web-components/{chunk-VANAKB6D.js → chunk-GPJWLAKU.js} +33 -16
  25. package/dist/web-components/{chunk-VED2DFJ6.js → chunk-GQNQBEYR.js} +8 -15
  26. package/dist/web-components/{chunk-WFVKU4GX.js → chunk-IKAJLROF.js} +49 -4
  27. package/dist/web-components/{chunk-RSZ3BWBK.js → chunk-KSK4RZZQ.js} +30 -7
  28. package/dist/web-components/{chunk-FEDABOR5.js → chunk-LHFUXZ52.js} +7 -15
  29. package/dist/web-components/{chunk-M3ECULRH.js → chunk-RBF7WPLI.js} +10 -8
  30. package/dist/web-components/{chunk-6G22I2CK.js → chunk-RZH5IVB5.js} +31 -1
  31. package/dist/web-components/chunk-SRKQ6GST.js +40 -0
  32. package/dist/web-components/{chunk-5HUAFCU6.js → chunk-TJV7UIXC.js} +7 -0
  33. package/dist/web-components/{chunk-J3HVUIUH.js → chunk-XI2U6U26.js} +8 -15
  34. package/dist/web-components/{chunk-JH6LQKLK.js → chunk-XJU7KITO.js} +8 -15
  35. package/dist/web-components/{chunk-JV5QT2OU.js → chunk-YLDQOESI.js} +27 -13
  36. package/dist/web-components/globals.js +1 -1
  37. package/dist/web-components/index.d.ts +1 -0
  38. package/dist/web-components/index.js +33 -28
  39. package/dist/web-components/interaction/bds-dropdown-menu-group.d.ts +41 -0
  40. package/dist/web-components/interaction/bds-dropdown-menu-group.js +7 -0
  41. package/dist/web-components/interaction/bds-dropdown-menu-item.d.ts +14 -1
  42. package/dist/web-components/interaction/bds-dropdown-menu-item.js +1 -1
  43. package/dist/web-components/interaction/bds-dropdown-menu.d.ts +2 -1
  44. package/dist/web-components/interaction/bds-dropdown-menu.js +1 -1
  45. package/dist/web-components/interaction/bds-tab.d.ts +5 -0
  46. package/dist/web-components/interaction/bds-tab.js +1 -1
  47. package/dist/web-components/interaction/bds-tooltip.js +1 -1
  48. package/dist/web-components/interaction/form/bds-checkbox-group.d.ts +6 -0
  49. package/dist/web-components/interaction/form/bds-checkbox-group.js +2 -1
  50. package/dist/web-components/interaction/form/bds-checkbox.js +1 -1
  51. package/dist/web-components/interaction/form/bds-combobox.js +2 -1
  52. package/dist/web-components/interaction/form/bds-form-input.js +2 -1
  53. package/dist/web-components/interaction/form/bds-number-input.js +2 -1
  54. package/dist/web-components/interaction/form/bds-radio-group.d.ts +5 -0
  55. package/dist/web-components/interaction/form/bds-radio-group.js +2 -1
  56. package/dist/web-components/interaction/form/bds-radio.js +1 -1
  57. package/dist/web-components/interaction/form/bds-select.js +2 -1
  58. package/dist/web-components/interaction/form/bds-slider.js +2 -1
  59. package/dist/web-components/interaction/form/bds-switch.js +1 -1
  60. package/dist/web-components/interaction/form/bds-textarea.js +2 -1
  61. package/dist/web-components/ui/bds-alert.d.ts +8 -1
  62. package/dist/web-components/ui/bds-alert.js +1 -1
  63. package/dist/web-components/ui/bds-avatar.d.ts +11 -0
  64. package/dist/web-components/ui/bds-avatar.js +1 -1
  65. package/dist/web-components/ui/bds-notification-banner.d.ts +14 -1
  66. package/dist/web-components/ui/bds-notification-banner.js +1 -1
  67. package/dist/web-components/ui/bds-section-header.d.ts +6 -0
  68. package/dist/web-components/ui/bds-section-header.js +1 -1
  69. package/dist/web-components/ui/bds-separator.js +1 -1
  70. package/dist/web-components/ui/bds-table.js +1 -1
  71. package/package.json +6 -2
  72. package/src/components/interaction/DropdownMenu/DropdownMenu.mdx +35 -4
  73. package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +58 -10
  74. package/src/components/interaction/DropdownMenu/DropdownMenu.spec.tsx +114 -1
  75. package/src/components/interaction/DropdownMenu/DropdownMenu.stories.tsx +25 -0
  76. package/src/components/interaction/DropdownMenu/DropdownMenu.tsx +69 -17
  77. package/src/components/interaction/form/Checkbox/Checkbox.module.css +1 -0
  78. package/src/components/interaction/form/Checkbox/Checkbox.spec.tsx +7 -0
  79. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.mdx +1 -0
  80. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.module.css +7 -0
  81. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.spec.tsx +22 -0
  82. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx +1 -1
  83. package/src/components/interaction/form/Combobox/Combobox.module.css +1 -0
  84. package/src/components/interaction/form/Combobox/Combobox.spec.tsx +7 -0
  85. package/src/components/interaction/form/FormInput/FormInput.mdx +9 -0
  86. package/src/components/interaction/form/FormInput/FormInput.module.css +1 -0
  87. package/src/components/interaction/form/FormInput/FormInput.spec.tsx +7 -0
  88. package/src/components/interaction/form/NumberInput/NumberInput.module.css +1 -0
  89. package/src/components/interaction/form/NumberInput/NumberInput.spec.tsx +7 -0
  90. package/src/components/interaction/form/Radio/Radio.module.css +1 -0
  91. package/src/components/interaction/form/Radio/Radio.spec.tsx +7 -0
  92. package/src/components/interaction/form/RadioGroup/RadioGroup.mdx +1 -0
  93. package/src/components/interaction/form/RadioGroup/RadioGroup.module.css +7 -0
  94. package/src/components/interaction/form/RadioGroup/RadioGroup.spec.tsx +22 -0
  95. package/src/components/interaction/form/RadioGroup/RadioGroup.tsx +1 -1
  96. package/src/components/interaction/form/Select/Select.module.css +1 -0
  97. package/src/components/interaction/form/Select/Select.spec.tsx +7 -0
  98. package/src/components/interaction/form/Switch/Switch.module.css +1 -0
  99. package/src/components/interaction/form/Switch/Switch.spec.tsx +7 -0
  100. package/src/components/interaction/form/Textarea/Textarea.module.css +1 -0
  101. package/src/components/interaction/form/Textarea/Textarea.spec.tsx +7 -0
  102. package/src/components/interaction/form/atoms/Message.module.css +14 -3
  103. package/src/components/interaction/form/atoms/Message.spec.tsx +22 -0
  104. package/src/components/interaction/form/atoms/Message.tsx +5 -0
  105. package/src/components/layout/SectionHeader/SectionHeader.mdx +18 -5
  106. package/src/components/layout/SectionHeader/SectionHeader.module.css +35 -14
  107. package/src/components/layout/SectionHeader/SectionHeader.spec.tsx +44 -0
  108. package/src/components/layout/SectionHeader/SectionHeader.stories.tsx +5 -0
  109. package/src/components/layout/SectionHeader/SectionHeader.tsx +3 -1
  110. package/src/components/ui/Alert/Alert.mdx +11 -0
  111. package/src/components/ui/Alert/Alert.module.css +30 -1
  112. package/src/components/ui/Alert/Alert.spec.tsx +21 -0
  113. package/src/components/ui/Alert/Alert.stories.tsx +20 -0
  114. package/src/components/ui/Alert/Alert.tsx +8 -1
  115. package/src/components/ui/Avatar/Avatar.mdx +22 -2
  116. package/src/components/ui/Avatar/Avatar.module.css +29 -2
  117. package/src/components/ui/Avatar/Avatar.spec.tsx +26 -0
  118. package/src/components/ui/Avatar/Avatar.stories.tsx +23 -0
  119. package/src/components/ui/Avatar/Avatar.tsx +4 -2
  120. package/src/components/ui/Avatar/avatarTone.spec.ts +41 -0
  121. package/src/components/ui/Avatar/avatarTone.ts +22 -0
  122. package/src/components/ui/Collapsible/Collapsible.module.css +1 -2
  123. package/src/components/ui/NotificationBanner/NotificationBanner.mdx +14 -0
  124. package/src/components/ui/NotificationBanner/NotificationBanner.module.css +31 -1
  125. package/src/components/ui/NotificationBanner/NotificationBanner.spec.tsx +29 -0
  126. package/src/components/ui/NotificationBanner/NotificationBanner.stories.tsx +25 -0
  127. package/src/components/ui/NotificationBanner/NotificationBanner.tsx +15 -1
  128. package/src/components/ui/Separator/Separator.mdx +1 -0
  129. package/src/components/ui/Separator/Separator.module.css +6 -0
  130. package/src/components/ui/Separator/Separator.spec.tsx +19 -0
  131. package/src/components/ui/Separator/Separator.stories.tsx +15 -0
  132. package/src/components/ui/Table/Table.mdx +4 -1
  133. package/src/components/ui/Table/Table.module.css +7 -7
  134. package/src/components/ui/Table/Table.spec.tsx +11 -0
  135. package/src/components/ui/Tabs/Tabs.mdx +11 -5
  136. package/src/components/ui/Tabs/Tabs.module.css +23 -5
  137. package/src/components/ui/Tabs/Tabs.spec.tsx +39 -0
  138. package/src/components/ui/Tabs/Tabs.tsx +2 -1
  139. package/src/components/ui/Tabs/getNodeText.spec.tsx +23 -0
  140. package/src/components/ui/Tabs/getNodeText.ts +13 -0
  141. package/src/components/ui/Tooltip/Tooltip.mdx +6 -3
  142. package/src/components/ui/Tooltip/Tooltip.module.css +6 -2
  143. package/src/components/ui/Tooltip/Tooltip.spec.tsx +10 -0
  144. package/src/components/ui/Tooltip/Tooltip.stories.tsx +13 -0
  145. package/src/css/bdc.css +5 -2
  146. package/src/css/bdc.spec.ts +65 -0
  147. package/src/stories/DesignSystem/Borders.mdx +17 -9
  148. package/src/web-components/globals.ts +10 -4
  149. package/src/web-components/index.ts +1 -0
  150. package/src/web-components/interaction/BdsAccordion.mdx +1 -1
  151. package/src/web-components/interaction/BdsAccordion.stories.tsx +1 -1
  152. package/src/web-components/interaction/BdsButton.mdx +1 -1
  153. package/src/web-components/interaction/BdsButton.stories.tsx +1 -1
  154. package/src/web-components/interaction/BdsCollapsible.mdx +1 -1
  155. package/src/web-components/interaction/BdsCollapsible.stories.tsx +1 -1
  156. package/src/web-components/interaction/BdsDialog.mdx +1 -1
  157. package/src/web-components/interaction/BdsDialog.stories.tsx +1 -1
  158. package/src/web-components/interaction/BdsDrawer.mdx +1 -1
  159. package/src/web-components/interaction/BdsDrawer.stories.tsx +1 -1
  160. package/src/web-components/interaction/BdsDropdownMenu.mdx +62 -6
  161. package/src/web-components/interaction/BdsDropdownMenu.stories.tsx +32 -7
  162. package/src/web-components/interaction/BdsPopover.mdx +1 -1
  163. package/src/web-components/interaction/BdsPopover.stories.tsx +1 -1
  164. package/src/web-components/interaction/BdsSkipLink.mdx +1 -1
  165. package/src/web-components/interaction/BdsSkipLink.stories.tsx +1 -1
  166. package/src/web-components/interaction/BdsTabs.mdx +10 -1
  167. package/src/web-components/interaction/BdsTabs.stories.tsx +1 -1
  168. package/src/web-components/interaction/BdsToastProvider.mdx +1 -1
  169. package/src/web-components/interaction/BdsToastProvider.stories.tsx +1 -1
  170. package/src/web-components/interaction/BdsTooltip.mdx +13 -5
  171. package/src/web-components/interaction/BdsTooltip.stories.tsx +12 -12
  172. package/src/web-components/interaction/bds-dropdown-menu-group.ts +72 -0
  173. package/src/web-components/interaction/bds-dropdown-menu-item.ts +65 -17
  174. package/src/web-components/interaction/bds-dropdown-menu.spec.ts +135 -0
  175. package/src/web-components/interaction/bds-dropdown-menu.ts +5 -4
  176. package/src/web-components/interaction/bds-tab.spec.ts +34 -2
  177. package/src/web-components/interaction/bds-tab.ts +31 -6
  178. package/src/web-components/interaction/bds-tooltip.spec.ts +16 -0
  179. package/src/web-components/interaction/bds-tooltip.ts +10 -8
  180. package/src/web-components/interaction/form/BdsCheckbox.mdx +5 -1
  181. package/src/web-components/interaction/form/BdsCheckbox.stories.tsx +1 -1
  182. package/src/web-components/interaction/form/BdsCheckboxGroup.mdx +5 -1
  183. package/src/web-components/interaction/form/BdsCheckboxGroup.stories.tsx +1 -1
  184. package/src/web-components/interaction/form/BdsCombobox.mdx +5 -1
  185. package/src/web-components/interaction/form/BdsCombobox.stories.tsx +1 -1
  186. package/src/web-components/interaction/form/BdsFieldGroup.stories.tsx +1 -1
  187. package/src/web-components/interaction/form/BdsFileInput.mdx +1 -1
  188. package/src/web-components/interaction/form/BdsFileInput.stories.tsx +1 -1
  189. package/src/web-components/interaction/form/BdsFormInput.mdx +8 -1
  190. package/src/web-components/interaction/form/BdsFormInput.stories.tsx +1 -1
  191. package/src/web-components/interaction/form/BdsNumberInput.mdx +5 -1
  192. package/src/web-components/interaction/form/BdsNumberInput.stories.tsx +1 -1
  193. package/src/web-components/interaction/form/BdsRadio.mdx +5 -1
  194. package/src/web-components/interaction/form/BdsRadio.stories.tsx +1 -1
  195. package/src/web-components/interaction/form/BdsRadioGroup.mdx +5 -1
  196. package/src/web-components/interaction/form/BdsRadioGroup.stories.tsx +1 -1
  197. package/src/web-components/interaction/form/BdsSegmentedControl.mdx +1 -1
  198. package/src/web-components/interaction/form/BdsSegmentedControl.stories.tsx +1 -1
  199. package/src/web-components/interaction/form/BdsSelect.mdx +5 -1
  200. package/src/web-components/interaction/form/BdsSelect.stories.tsx +1 -1
  201. package/src/web-components/interaction/form/BdsSlider.mdx +5 -1
  202. package/src/web-components/interaction/form/BdsSlider.stories.tsx +1 -1
  203. package/src/web-components/interaction/form/BdsSwitch.mdx +5 -1
  204. package/src/web-components/interaction/form/BdsSwitch.stories.tsx +1 -1
  205. package/src/web-components/interaction/form/BdsTextarea.mdx +5 -1
  206. package/src/web-components/interaction/form/BdsTextarea.stories.tsx +1 -1
  207. package/src/web-components/interaction/form/bds-checkbox-group.spec.ts +32 -3
  208. package/src/web-components/interaction/form/bds-checkbox-group.ts +33 -17
  209. package/src/web-components/interaction/form/bds-checkbox.ts +1 -0
  210. package/src/web-components/interaction/form/bds-combobox.ts +6 -16
  211. package/src/web-components/interaction/form/bds-form-input.ts +6 -16
  212. package/src/web-components/interaction/form/bds-number-input.ts +6 -16
  213. package/src/web-components/interaction/form/bds-radio-group.spec.ts +32 -3
  214. package/src/web-components/interaction/form/bds-radio-group.ts +26 -14
  215. package/src/web-components/interaction/form/bds-radio.ts +1 -0
  216. package/src/web-components/interaction/form/bds-select.ts +6 -16
  217. package/src/web-components/interaction/form/bds-slider.ts +5 -16
  218. package/src/web-components/interaction/form/bds-switch.ts +1 -0
  219. package/src/web-components/interaction/form/bds-textarea.ts +6 -16
  220. package/src/web-components/interaction/form/field-message.spec.ts +62 -0
  221. package/src/web-components/interaction/form/field-message.ts +55 -0
  222. package/src/web-components/layout/BdsGrid.mdx +1 -1
  223. package/src/web-components/layout/BdsGrid.stories.tsx +1 -1
  224. package/src/web-components/layout/BdsGridItem.mdx +1 -1
  225. package/src/web-components/layout/BdsGridItem.stories.tsx +1 -1
  226. package/src/web-components/ui/BdsAlert.mdx +19 -1
  227. package/src/web-components/ui/BdsAlert.stories.tsx +29 -3
  228. package/src/web-components/ui/BdsAvatar.mdx +20 -3
  229. package/src/web-components/ui/BdsAvatar.stories.tsx +25 -2
  230. package/src/web-components/ui/BdsBadge.mdx +1 -1
  231. package/src/web-components/ui/BdsBadge.stories.tsx +1 -1
  232. package/src/web-components/ui/BdsBreadcrumb.mdx +1 -1
  233. package/src/web-components/ui/BdsBreadcrumb.stories.tsx +1 -1
  234. package/src/web-components/ui/BdsButtonContainer.mdx +1 -1
  235. package/src/web-components/ui/BdsButtonContainer.stories.tsx +1 -1
  236. package/src/web-components/ui/BdsCalendar.mdx +1 -1
  237. package/src/web-components/ui/BdsCalendar.stories.tsx +1 -1
  238. package/src/web-components/ui/BdsCalendarRange.mdx +1 -1
  239. package/src/web-components/ui/BdsCalendarRange.stories.tsx +1 -1
  240. package/src/web-components/ui/BdsCard.mdx +1 -1
  241. package/src/web-components/ui/BdsCard.stories.tsx +1 -1
  242. package/src/web-components/ui/BdsCarousel.mdx +1 -1
  243. package/src/web-components/ui/BdsCarousel.stories.tsx +1 -1
  244. package/src/web-components/ui/BdsDescriptionList.mdx +1 -1
  245. package/src/web-components/ui/BdsDescriptionList.stories.tsx +1 -1
  246. package/src/web-components/ui/BdsIconWrapper.mdx +1 -1
  247. package/src/web-components/ui/BdsIconWrapper.stories.tsx +1 -1
  248. package/src/web-components/ui/BdsLink.mdx +1 -1
  249. package/src/web-components/ui/BdsLink.stories.tsx +1 -1
  250. package/src/web-components/ui/BdsLoading.mdx +1 -1
  251. package/src/web-components/ui/BdsLoading.stories.tsx +1 -1
  252. package/src/web-components/ui/BdsNotificationBanner.mdx +10 -1
  253. package/src/web-components/ui/BdsNotificationBanner.stories.tsx +29 -2
  254. package/src/web-components/ui/BdsPagination.mdx +1 -1
  255. package/src/web-components/ui/BdsPagination.stories.tsx +1 -1
  256. package/src/web-components/ui/BdsProgress.mdx +1 -1
  257. package/src/web-components/ui/BdsProgress.stories.tsx +1 -1
  258. package/src/web-components/ui/BdsProgressCircle.mdx +1 -1
  259. package/src/web-components/ui/BdsProgressCircle.stories.tsx +1 -1
  260. package/src/web-components/ui/BdsRating.mdx +1 -1
  261. package/src/web-components/ui/BdsRating.stories.tsx +1 -1
  262. package/src/web-components/ui/BdsSectionHeader.mdx +18 -6
  263. package/src/web-components/ui/BdsSectionHeader.stories.tsx +10 -2
  264. package/src/web-components/ui/BdsSeparator.mdx +2 -1
  265. package/src/web-components/ui/BdsSeparator.stories.tsx +13 -1
  266. package/src/web-components/ui/BdsSkeleton.mdx +1 -1
  267. package/src/web-components/ui/BdsSkeleton.stories.tsx +1 -1
  268. package/src/web-components/ui/BdsTable.mdx +5 -1
  269. package/src/web-components/ui/BdsTable.stories.tsx +1 -1
  270. package/src/web-components/ui/BdsTypography.mdx +1 -1
  271. package/src/web-components/ui/BdsTypography.stories.tsx +1 -1
  272. package/src/web-components/ui/bds-alert.spec.ts +27 -0
  273. package/src/web-components/ui/bds-alert.ts +34 -1
  274. package/src/web-components/ui/bds-avatar.spec.ts +47 -0
  275. package/src/web-components/ui/bds-avatar.ts +36 -3
  276. package/src/web-components/ui/bds-notification-banner.spec.ts +45 -0
  277. package/src/web-components/ui/bds-notification-banner.ts +53 -1
  278. package/src/web-components/ui/bds-section-header.spec.ts +36 -3
  279. package/src/web-components/ui/bds-section-header.ts +32 -10
  280. package/src/web-components/ui/bds-separator.spec.ts +8 -0
  281. package/src/web-components/ui/bds-separator.ts +7 -0
  282. package/src/web-components/ui/bds-table.spec.ts +11 -0
  283. package/src/web-components/ui/bds-table.ts +5 -5
  284. package/dist/web-components/chunk-QZAIRJ75.js +0 -111
@@ -1,4 +1,5 @@
1
1
  import { LitElement, css, html, nothing } from 'lit';
2
+ import { resolveAvatarTone, type AvatarTone } from '../../components/ui/Avatar/avatarTone';
2
3
 
3
4
  /**
4
5
  * `<bds-avatar>` — framework-agnostic Avatar custom element.
@@ -11,6 +12,8 @@ import { LitElement, css, html, nothing } from 'lit';
11
12
  * explicitly to mark the image as decorative (silences the accessible name).
12
13
  * name — full name; used to compute initials and as fallback aria-label
13
14
  * size — "small" | "medium" (default) | "large"
15
+ * tone — "auto" (default, picked from `name`) | "primary" | "secondary" |
16
+ * "accent-1" | "accent-2" | "accent-3"; colours the initials fallback
14
17
  *
15
18
  * @example
16
19
  * <bds-avatar src="/photo.jpg" name="Jane Doe"></bds-avatar>
@@ -53,11 +56,38 @@ export class BdsAvatar extends LitElement {
53
56
  justify-content: center;
54
57
  inline-size: 100%;
55
58
  block-size: 100%;
56
- background-color: var(--avatar_bg, var(--bds-color_blue));
57
- color: var(--avatar_text, var(--bds-color_on-blue));
59
+ background-color: var(--avatar_bg, var(--avatar_bg--variant));
60
+ color: var(--avatar_text, var(--avatar_text--variant));
58
61
  font-weight: var(--bds-font_weight--semibold);
59
62
  }
60
63
 
64
+ /* Tone slots (mirrors the React Avatar): outer --avatar_bg / --avatar_text
65
+ still win, each tone has its own public hook. */
66
+ .fallback.tone_primary {
67
+ --avatar_bg--variant: var(--avatar_bg--primary, var(--bds-color_primary--subtle, var(--bds-color_blue--subtle)));
68
+ --avatar_text--variant: var(--avatar_text--primary, var(--bds-color_on-primary--subtle, var(--bds-color_on-blue--subtle)));
69
+ }
70
+
71
+ .fallback.tone_secondary {
72
+ --avatar_bg--variant: var(--avatar_bg--secondary, var(--bds-color_secondary--subtle, var(--bds-color_blue--subtle)));
73
+ --avatar_text--variant: var(--avatar_text--secondary, var(--bds-color_on-secondary--subtle, var(--bds-color_on-blue--subtle)));
74
+ }
75
+
76
+ .fallback.tone_accent-1 {
77
+ --avatar_bg--variant: var(--avatar_bg--accent-1, var(--bds-color_accent-1--subtle, var(--bds-color_green--subtle)));
78
+ --avatar_text--variant: var(--avatar_text--accent-1, var(--bds-color_on-accent-1--subtle, var(--bds-color_on-green--subtle)));
79
+ }
80
+
81
+ .fallback.tone_accent-2 {
82
+ --avatar_bg--variant: var(--avatar_bg--accent-2, var(--bds-color_accent-2--subtle, var(--bds-color_orange--subtle)));
83
+ --avatar_text--variant: var(--avatar_text--accent-2, var(--bds-color_on-accent-2--subtle, var(--bds-color_on-orange--subtle)));
84
+ }
85
+
86
+ .fallback.tone_accent-3 {
87
+ --avatar_bg--variant: var(--avatar_bg--accent-3, var(--bds-color_accent-3--subtle, var(--bds-color_blue--subtle)));
88
+ --avatar_text--variant: var(--avatar_text--accent-3, var(--bds-color_on-accent-3--subtle, var(--bds-color_on-blue--subtle)));
89
+ }
90
+
61
91
  .initials {
62
92
  line-height: 1;
63
93
  user-select: none;
@@ -80,12 +110,14 @@ export class BdsAvatar extends LitElement {
80
110
  alt: { type: String },
81
111
  name: { type: String },
82
112
  size: { type: String, reflect: true },
113
+ tone: { type: String, reflect: true },
83
114
  };
84
115
 
85
116
  declare src: string;
86
117
  declare alt: string;
87
118
  declare name: string;
88
119
  declare size: 'small' | 'medium' | 'large';
120
+ declare tone: AvatarTone;
89
121
 
90
122
  constructor() {
91
123
  super();
@@ -93,6 +125,7 @@ export class BdsAvatar extends LitElement {
93
125
  this.alt = '';
94
126
  this.name = '';
95
127
  this.size = 'medium';
128
+ this.tone = 'auto';
96
129
  }
97
130
 
98
131
  private get _initials(): string {
@@ -119,7 +152,7 @@ export class BdsAvatar extends LitElement {
119
152
 
120
153
  return html`
121
154
  <span
122
- class="fallback"
155
+ class="fallback tone_${resolveAvatarTone(this.tone, this.name)}"
123
156
  role="img"
124
157
  aria-label=${this.name || 'User avatar'}
125
158
  >
@@ -92,4 +92,49 @@ describe('bds-notification-banner', () => {
92
92
  /--bdc_color:\s*var\(--banner_dismiss-border-color,\s*var\(--notification-banner_dismiss-border-color,\s*currentcolor\)\)/,
93
93
  );
94
94
  });
95
+
96
+ it('defaults to appearance="default"', async () => {
97
+ const el = await fixture('<bds-notification-banner>Message</bds-notification-banner>');
98
+ expect(el.getAttribute('appearance')).toBe('default');
99
+ cleanup(el);
100
+ });
101
+
102
+ it('reflects appearance="gradient"', async () => {
103
+ const el = await fixture('<bds-notification-banner appearance="gradient">Message</bds-notification-banner>') as BdsNotificationBanner;
104
+ expect(el.appearance).toBe('gradient');
105
+ el.appearance = 'default';
106
+ await el.updateComplete;
107
+ expect(el.getAttribute('appearance')).toBe('default');
108
+ cleanup(el);
109
+ });
110
+
111
+ it('wires the gradient hooks in the styles', () => {
112
+ const styles = String(BdsNotificationBanner.styles);
113
+ expect(styles).toContain(":host([appearance='gradient']) .banner");
114
+ expect(styles).toMatch(/background-image:\s*var\(--banner_gradient,\s*linear-gradient\(100deg/);
115
+ expect(styles).toMatch(/box-shadow:\s*var\(--banner_shadow,\s*var\(--bds-shadow_s\)\)/);
116
+ expect(styles).toMatch(/border-block-end:\s*var\(--banner_border-width,\s*3px\)/);
117
+ ['info', 'success', 'warning', 'error'].forEach(v => {
118
+ expect(styles).toContain(`--banner_accent--${v}`);
119
+ });
120
+ });
121
+
122
+ it('renders an aria-hidden icon wrapper around the icon slot', async () => {
123
+ const el = await fixture('<bds-notification-banner>Message<svg slot="icon"></svg></bds-notification-banner>');
124
+ const icon = el.shadowRoot!.querySelector('.icon');
125
+ expect(icon).not.toBeNull();
126
+ expect(icon!.getAttribute('aria-hidden')).toBe('true');
127
+ expect(icon!.querySelector('slot[name="icon"]')).not.toBeNull();
128
+ cleanup(el);
129
+ });
130
+
131
+ it('shows the icon wrapper only when the icon slot has content', async () => {
132
+ const el = await fixture('<bds-notification-banner>Message<svg slot="icon"></svg></bds-notification-banner>') as BdsNotificationBanner;
133
+ await el.updateComplete;
134
+ expect(el.shadowRoot!.querySelector('.icon')!.classList.contains('has-content')).toBe(true);
135
+ cleanup(el);
136
+ const plain = await fixture('<bds-notification-banner>Message</bds-notification-banner>') as BdsNotificationBanner;
137
+ expect(plain.shadowRoot!.querySelector('.icon')!.classList.contains('has-content')).toBe(false);
138
+ cleanup(plain);
139
+ });
95
140
  });
@@ -1,17 +1,20 @@
1
1
  import { LitElement, css, html, nothing } from 'lit';
2
2
 
3
3
  export type NotificationBannerVariant = 'info' | 'success' | 'warning' | 'error';
4
+ export type NotificationBannerAppearance = 'default' | 'gradient';
4
5
 
5
6
  /**
6
7
  * `<bds-notification-banner>` — framework-agnostic Notification Banner custom element.
7
8
  *
8
9
  * Attributes:
9
10
  * variant — "info" (default) | "success" | "warning" | "error"
11
+ * appearance — "default" | "gradient" (fades the tint to the surface, accent line, shadow)
10
12
  * dismissible — boolean; shows a dismiss button when present
11
13
  * dismiss-label — aria-label for the dismiss button (default: "Dismiss notification")
12
14
  *
13
15
  * Slots:
14
16
  * (default) — banner body content
17
+ * icon — optional icon displayed before the content
15
18
  * action — optional action area (e.g. a button)
16
19
  *
17
20
  * Events:
@@ -46,7 +49,7 @@ export class BdsNotificationBanner extends LitElement {
46
49
  padding: var(--bds-space_s) var(--bds-space_m);
47
50
  background-color: var(--banner_bg, var(--banner_bg--variant, var(--bds-color_blue--subtle)));
48
51
  color: var(--banner_text, var(--banner_text--variant, var(--bds-color_on-blue--subtle)));
49
- border-block-end: 3px solid var(--banner_border, var(--banner_border--variant, var(--bds-color_blue)));
52
+ border-block-end: var(--banner_border-width, 3px) solid var(--banner_border, var(--banner_border--variant, var(--bds-color_blue)));
50
53
  font-size: var(--bds-font_size--body);
51
54
  line-height: var(--bds-font_line-height--body);
52
55
  inline-size: 100%;
@@ -77,6 +80,41 @@ export class BdsNotificationBanner extends LitElement {
77
80
  --banner_border--variant: var(--banner_border--error, var(--bds-color_error));
78
81
  }
79
82
 
83
+ /* Gradient appearance: the variant background stays the base colour and a
84
+ gradient fades it to the surface. The accent line uses a per-variant
85
+ accent slot; --banner_border still wins over it. */
86
+ :host([appearance='gradient']) .banner {
87
+ background-image: var(--banner_gradient, linear-gradient(100deg, transparent 35%, var(--bds-color_bg--strong, var(--bds-color_bg)) 100%));
88
+ box-shadow: var(--banner_shadow, var(--bds-shadow_s));
89
+ }
90
+
91
+ :host([appearance='gradient'][variant='info']) .banner {
92
+ --banner_border--variant: var(--banner_border--info, var(--banner_accent--info, var(--bds-color_on-blue--subtle)));
93
+ }
94
+
95
+ :host([appearance='gradient'][variant='success']) .banner {
96
+ --banner_border--variant: var(--banner_border--success, var(--banner_accent--success, var(--bds-color_on-success--subtle)));
97
+ }
98
+
99
+ :host([appearance='gradient'][variant='warning']) .banner {
100
+ --banner_border--variant: var(--banner_border--warning, var(--banner_accent--warning, var(--bds-color_warning)));
101
+ }
102
+
103
+ :host([appearance='gradient'][variant='error']) .banner {
104
+ --banner_border--variant: var(--banner_border--error, var(--banner_accent--error, var(--bds-color_error)));
105
+ }
106
+
107
+ /* Icon slot wrapper — hidden unless slot has content */
108
+ .icon {
109
+ display: none;
110
+ align-items: center;
111
+ flex-shrink: 0;
112
+ }
113
+
114
+ .icon.has-content {
115
+ display: flex;
116
+ }
117
+
80
118
  .content {
81
119
  flex: 1;
82
120
  }
@@ -131,22 +169,33 @@ export class BdsNotificationBanner extends LitElement {
131
169
 
132
170
  static properties = {
133
171
  variant: { type: String, reflect: true },
172
+ appearance: { type: String, reflect: true },
134
173
  dismissible: { type: Boolean, reflect: true },
135
174
  dismissLabel: { type: String, attribute: 'dismiss-label' },
136
175
  _actionFilled: { state: true },
176
+ _iconFilled: { state: true },
137
177
  };
138
178
 
139
179
  declare variant: NotificationBannerVariant;
180
+ declare appearance: NotificationBannerAppearance;
140
181
  declare dismissible: boolean;
141
182
  declare dismissLabel: string;
142
183
  declare private _actionFilled: boolean;
184
+ declare private _iconFilled: boolean;
143
185
 
144
186
  constructor() {
145
187
  super();
146
188
  this.variant = 'info';
189
+ this.appearance = 'default';
147
190
  this.dismissible = false;
148
191
  this.dismissLabel = 'Dismiss notification';
149
192
  this._actionFilled = false;
193
+ this._iconFilled = false;
194
+ }
195
+
196
+ private _onIconSlotChange(e: Event) {
197
+ const slot = e.target as HTMLSlotElement;
198
+ this._iconFilled = slot.assignedNodes({ flatten: true }).length > 0;
150
199
  }
151
200
 
152
201
  private _onActionSlotChange(e: Event) {
@@ -170,6 +219,9 @@ export class BdsNotificationBanner extends LitElement {
170
219
  aria-live=${this._isUrgent ? 'assertive' : 'polite'}
171
220
  aria-atomic="true"
172
221
  >
222
+ <span class="icon ${this._iconFilled ? 'has-content' : ''}" aria-hidden="true">
223
+ <slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
224
+ </span>
173
225
  <div class="content"><slot></slot></div>
174
226
  <div class="action ${this._actionFilled ? 'has-content' : ''}">
175
227
  <slot name="action" @slotchange=${this._onActionSlotChange}></slot>
@@ -80,9 +80,42 @@ describe('bds-section-header', () => {
80
80
  cleanup(el);
81
81
  });
82
82
 
83
- it('mirrors React size-token fallbacks for the xs variant', () => {
83
+ it('mirrors the size table: each size has its own title and subtitle token', () => {
84
84
  const cssText = BdsSectionHeader.styles.cssText;
85
- expect(cssText).toMatch(/\.header\.--xs\s+\.title\s*{[^}]*font-size:\s*var\(--sectionHeader_title-size,\s*var\(--bds-font_size--heading-2\)\)/);
86
- expect(cssText).toMatch(/\.header\.--xs\s+\.subtitle\s*{[^}]*font-size:\s*var\(--sectionHeader_subtitle-size,\s*var\(--bds-font_size--body\)\)/);
85
+ const table: Record<string, [string, string]> = {
86
+ xs: ['body', 'body--s'],
87
+ small: ['heading-3', 'body'],
88
+ medium: ['heading-2', 'body'],
89
+ large: ['heading-1', 'heading-3'],
90
+ };
91
+ Object.entries(table).forEach(([size, [title, subtitle]]) => {
92
+ expect(cssText).toMatch(new RegExp(`\\.header\\.--${size}\\s+\\.title\\s*{[^}]*font-size:\\s*var\\(--sectionHeader_title-size,\\s*var\\(--bds-font_size--${title}\\)\\)`));
93
+ expect(cssText).toMatch(new RegExp(`\\.header\\.--${size}\\s+\\.subtitle\\s*{[^}]*font-size:\\s*var\\(--sectionHeader_subtitle-size,\\s*var\\(--bds-font_size--${subtitle}\\)\\)`));
94
+ });
95
+ });
96
+
97
+ it('uses the heading font family and muted subtitle colour by default', () => {
98
+ const cssText = BdsSectionHeader.styles.cssText;
99
+ expect(cssText).toMatch(/\.title\s*{[^}]*font-family:\s*var\(--sectionHeader_title-font-family,\s*var\(--bds-font_family--heading\)\)/);
100
+ expect(cssText).toMatch(/--sectionHeader_subtitle-color,\s*var\(--bds-color_on-bg--muted,\s*var\(--bds-color_grey--strong\)\)/);
101
+ });
102
+
103
+ it('defaults appearance to default without a gradient class', async () => {
104
+ const el = await fixture('<bds-section-header heading="Hello"></bds-section-header>');
105
+ expect(el.shadowRoot!.querySelector('.header')!.classList.contains('--gradient')).toBe(false);
106
+ cleanup(el);
107
+ });
108
+
109
+ it('adds the gradient class for appearance="gradient"', async () => {
110
+ const el = await fixture('<bds-section-header heading="Hello" appearance="gradient"></bds-section-header>');
111
+ expect(el.shadowRoot!.querySelector('.header')!.classList.contains('--gradient')).toBe(true);
112
+ expect(el.getAttribute('appearance')).toBe('gradient');
113
+ cleanup(el);
114
+ });
115
+
116
+ it('styles the gradient title behind @supports with a forced-colors fallback', () => {
117
+ const cssText = BdsSectionHeader.styles.cssText;
118
+ expect(cssText).toMatch(/@supports \(background-clip: text\)[^]*--sectionHeader_title-gradient/);
119
+ expect(cssText).toMatch(/@media \(forced-colors: active\)[^]*CanvasText/);
87
120
  });
88
121
  });
@@ -13,6 +13,7 @@ import { html as staticHtml, unsafeStatic } from 'lit/static-html.js';
13
13
  * subtitle — optional subheading text
14
14
  * alignment — "start" (default) | "center" | "end"
15
15
  * size — "xs" | "small" | "medium" (default) | "large"
16
+ * appearance — "default" | "gradient" (gradient-filled title)
16
17
  * title-as — tag name for the title element (default: "h2")
17
18
  *
18
19
  * @example
@@ -45,11 +46,11 @@ export class BdsSectionHeader extends LitElement {
45
46
  /* --sectionHeader-title-color (kebab delimiter) is deprecated -- use --sectionHeader_title-color */
46
47
  color: var(--sectionHeader_title-color, var(--sectionHeader-title-color, var(--bds-color_on-bg)));
47
48
  margin: 0;
48
- font-family: var(--bds-font_family--body);
49
+ font-family: var(--sectionHeader_title-font-family, var(--bds-font_family--heading));
49
50
  }
50
51
 
51
52
  .subtitle {
52
- color: var(--sectionHeader_subtitle-color, var(--bds-color_grey--strong));
53
+ color: var(--sectionHeader_subtitle-color, var(--bds-color_on-bg--muted, var(--bds-color_grey--strong)));
53
54
  margin: 0;
54
55
  font-family: var(--bds-font_family--body);
55
56
  font-weight: var(--bds-font_weight--medium);
@@ -60,17 +61,35 @@ export class BdsSectionHeader extends LitElement {
60
61
  .header.--end { align-items: flex-end; text-align: end; }
61
62
 
62
63
  /* medium first -- default size, so MCP extraction picks up its fallbacks */
63
- .header.--medium .title { font-size: var(--sectionHeader_title-size, var(--bds-font_size--heading-1)); line-height: var(--sectionHeader_title-line-height, var(--bds-font_line-height--heading)); font-weight: var(--sectionHeader_title-weight, var(--bds-font_weight--bold)); }
64
- .header.--medium .subtitle { font-size: var(--sectionHeader_subtitle-size, var(--bds-font_size--heading-3)); line-height: var(--sectionHeader_subtitle-line-height, 1.3); }
64
+ .header.--medium .title { font-size: var(--sectionHeader_title-size, var(--bds-font_size--heading-2)); line-height: var(--sectionHeader_title-line-height, var(--bds-font_line-height--heading)); font-weight: var(--sectionHeader_title-weight, var(--bds-font_weight--heading, var(--bds-font_weight--bold))); }
65
+ .header.--medium .subtitle { font-size: var(--sectionHeader_subtitle-size, var(--bds-font_size--body)); line-height: var(--sectionHeader_subtitle-line-height, 1.3); }
65
66
 
66
- .header.--xs .title { font-size: var(--sectionHeader_title-size, var(--bds-font_size--heading-2)); line-height: var(--sectionHeader_title-line-height, var(--bds-font_line-height--heading)); font-weight: var(--sectionHeader_title-weight, var(--bds-font_weight--bold)); }
67
- .header.--xs .subtitle { font-size: var(--sectionHeader_subtitle-size, var(--bds-font_size--body)); line-height: var(--sectionHeader_subtitle-line-height, 1.4); }
67
+ .header.--xs .title { font-size: var(--sectionHeader_title-size, var(--bds-font_size--body)); line-height: var(--sectionHeader_title-line-height, var(--bds-font_line-height--heading)); font-weight: var(--sectionHeader_title-weight, var(--bds-font_weight--heading, var(--bds-font_weight--bold))); }
68
+ .header.--xs .subtitle { font-size: var(--sectionHeader_subtitle-size, var(--bds-font_size--body--s)); line-height: var(--sectionHeader_subtitle-line-height, 1.4); }
68
69
 
69
- .header.--small .title { font-size: var(--sectionHeader_title-size, var(--bds-font_size--heading-1)); line-height: var(--sectionHeader_title-line-height, var(--bds-font_line-height--heading)); font-weight: var(--sectionHeader_title-weight, var(--bds-font_weight--bold)); }
70
+ .header.--small .title { font-size: var(--sectionHeader_title-size, var(--bds-font_size--heading-3)); line-height: var(--sectionHeader_title-line-height, var(--bds-font_line-height--heading)); font-weight: var(--sectionHeader_title-weight, var(--bds-font_weight--heading, var(--bds-font_weight--bold))); }
70
71
  .header.--small .subtitle { font-size: var(--sectionHeader_subtitle-size, var(--bds-font_size--body)); line-height: var(--sectionHeader_subtitle-line-height, 1.4); }
71
72
 
72
- .header.--large .title { font-size: var(--sectionHeader_title-size, var(--bds-font_size--display)); line-height: var(--sectionHeader_title-line-height, var(--bds-font_line-height--display)); font-weight: var(--sectionHeader_title-weight, var(--bds-font_weight--bold)); letter-spacing: var(--bds-font_tracking--tight); }
73
- .header.--large .subtitle { font-size: var(--sectionHeader_subtitle-size, var(--bds-font_size--heading-2)); line-height: var(--sectionHeader_subtitle-line-height, 1.3); font-weight: var(--bds-font_weight--medium); }
73
+ .header.--large .title { font-size: var(--sectionHeader_title-size, var(--bds-font_size--heading-1)); line-height: var(--sectionHeader_title-line-height, var(--bds-font_line-height--heading)); font-weight: var(--sectionHeader_title-weight, var(--bds-font_weight--heading, var(--bds-font_weight--bold))); letter-spacing: var(--bds-font_tracking--tight); }
74
+ .header.--large .subtitle { font-size: var(--sectionHeader_subtitle-size, var(--bds-font_size--heading-3)); line-height: var(--sectionHeader_subtitle-line-height, 1.3); font-weight: var(--bds-font_weight--medium); }
75
+
76
+ /* Gradient only where background-clip: text is supported; elsewhere the title keeps its normal colour */
77
+ @supports (background-clip: text) {
78
+ .header.--gradient .title {
79
+ inline-size: fit-content;
80
+ max-inline-size: 100%;
81
+ background-image: var(--sectionHeader_title-gradient, linear-gradient(90deg, var(--bds-color_primary--strong, var(--bds-color_blue--strong)), var(--bds-color_accent-3--strong, var(--bds-color_blue--strong))));
82
+ background-clip: text;
83
+ color: transparent;
84
+ }
85
+ }
86
+
87
+ @media (forced-colors: active) {
88
+ .header.--gradient .title {
89
+ background-image: none;
90
+ color: CanvasText;
91
+ }
92
+ }
74
93
  `;
75
94
 
76
95
  static properties = {
@@ -79,6 +98,7 @@ export class BdsSectionHeader extends LitElement {
79
98
  subtitle: { type: String },
80
99
  alignment: { type: String, reflect: true },
81
100
  size: { type: String, reflect: true },
101
+ appearance: { type: String, reflect: true },
82
102
  titleAs: { type: String, attribute: 'title-as' },
83
103
  };
84
104
 
@@ -94,6 +114,7 @@ export class BdsSectionHeader extends LitElement {
94
114
  declare subtitle: string;
95
115
  declare alignment: 'start' | 'center' | 'end';
96
116
  declare size: 'xs' | 'small' | 'medium' | 'large';
117
+ declare appearance: 'default' | 'gradient';
97
118
  declare titleAs: string;
98
119
 
99
120
  constructor() {
@@ -103,6 +124,7 @@ export class BdsSectionHeader extends LitElement {
103
124
  this.subtitle = '';
104
125
  this.alignment = 'start';
105
126
  this.size = 'medium';
127
+ this.appearance = 'default';
106
128
  this.titleAs = 'h2';
107
129
  }
108
130
 
@@ -113,7 +135,7 @@ export class BdsSectionHeader extends LitElement {
113
135
  render() {
114
136
  const tag = unsafeStatic(this.titleAs || 'h2');
115
137
  return html`
116
- <div class="header --${this.alignment} --${this.size}">
138
+ <div class="header --${this.alignment} --${this.size}${this.appearance === 'gradient' ? ' --gradient' : ''}">
117
139
  ${staticHtml`<${tag} class="title">${this._headingText}</${tag}>`}
118
140
  ${this.subtitle ? html`<p class="subtitle">${this.subtitle}</p>` : nothing}
119
141
  </div>
@@ -48,6 +48,14 @@ describe('bds-separator', () => {
48
48
  cleanup(el);
49
49
  });
50
50
 
51
+ it('spaces the line through --separator_spacing with content-box padding', () => {
52
+ const cssText = BdsSeparator.styles.cssText;
53
+ expect(cssText).toContain('padding-block: var(--separator_spacing, 0)');
54
+ expect(cssText).toContain('padding-inline: var(--separator_spacing, var(--bds-space_s))');
55
+ expect(cssText).toContain('background-clip: content-box');
56
+ expect(cssText).toMatch(/\.separator\s*\{[^}]*box-sizing:\s*content-box/);
57
+ });
58
+
51
59
  it('paints the line with the non-text member of the colour set', () => {
52
60
  const cssText = BdsSeparator.styles.cssText;
53
61
  expect(cssText).toMatch(
@@ -37,11 +37,18 @@ export class BdsSeparator extends LitElement {
37
37
  display: block;
38
38
  inline-size: 100%;
39
39
  block-size: var(--separator_thickness, 1px);
40
+ /* The padding is the space around the line; content-box keeps the line at the
41
+ thickness and background-clip stops the colour from painting into the padding. */
42
+ box-sizing: content-box;
43
+ padding-block: var(--separator_spacing, 0);
44
+ background-clip: content-box;
40
45
  }
41
46
 
42
47
  :host([orientation='vertical']) .separator {
43
48
  inline-size: var(--separator_thickness, 1px);
44
49
  block-size: 100%;
50
+ padding-block: 0;
51
+ padding-inline: var(--separator_spacing, var(--bds-space_s));
45
52
  }
46
53
  `;
47
54
 
@@ -97,6 +97,17 @@ describe('bds-table', () => {
97
97
  cleanup(el);
98
98
  });
99
99
 
100
+ it('styles header cells through the --table_header-* hooks', () => {
101
+ const cssText = Array.from(document.adoptedStyleSheets ?? [])
102
+ .flatMap((sheet) => Array.from(sheet.cssRules))
103
+ .map((rule) => rule.cssText)
104
+ .join('\n');
105
+ expect(cssText).toContain('var(--table_header-font-size, var(--bds-font_size--body))');
106
+ expect(cssText).toContain('var(--table_header-font-weight, var(--bds-font_weight--bold))');
107
+ expect(cssText).toContain('var(--table_header-color, var(--bds-color_on-bg--subtle))');
108
+ expect(cssText).toContain('var(--table_header-bg, var(--bds-color_bg--subtle))');
109
+ });
110
+
100
111
  it('ships a --table_row-bg--hover token for slotted row hover, matching React Table', () => {
101
112
  const cssText = Array.from(document.adoptedStyleSheets ?? [])
102
113
  .flatMap((sheet) => Array.from(sheet.cssRules))
@@ -11,15 +11,15 @@ import { LitElement, css, html, nothing } from 'lit';
11
11
  const tableLightDomCss = `
12
12
  @layer boostdev.component {
13
13
  bds-table > table thead {
14
- background-color: var(--bds-color_bg--subtle);
14
+ background-color: var(--table_header-bg, var(--bds-color_bg--subtle));
15
15
  }
16
16
 
17
17
  bds-table > table th {
18
18
  padding: var(--bds-space_s) var(--bds-space_m);
19
- font-weight: var(--bds-font_weight--semibold);
20
- font-size: var(--bds-font_size--body--s);
19
+ font-weight: var(--table_header-font-weight, var(--bds-font_weight--bold));
20
+ font-size: var(--table_header-font-size, var(--bds-font_size--body));
21
21
  text-align: start;
22
- color: var(--bds-color_on-bg--subtle);
22
+ color: var(--table_header-color, var(--bds-color_on-bg--subtle));
23
23
  border-block-end: 1px solid var(--table_divider-color, var(--bds-color_on-bg--as-surface, var(--bds-color_on-bg--border, var(--bds-color_bg--subtle))));
24
24
  white-space: nowrap;
25
25
  }
@@ -37,7 +37,7 @@ const tableLightDomCss = `
37
37
  bds-table[sticky-header] > table thead th {
38
38
  position: sticky;
39
39
  inset-block-start: 0;
40
- background-color: var(--bds-color_bg--subtle);
40
+ background-color: var(--table_header-bg, var(--bds-color_bg--subtle));
41
41
  }
42
42
 
43
43
  @media (hover: hover) and (pointer: fine) {
@@ -1,111 +0,0 @@
1
- import {
2
- T,
3
- i,
4
- i2
5
- } from "./chunk-LGEZYFUU.js";
6
-
7
- // src/web-components/interaction/bds-dropdown-menu-item.ts
8
- var BdsDropdownMenuItem = class extends i2 {
9
- static styles = i`
10
- /* Shadow DOM does not inherit the global box-sizing reset, so set it
11
- here; otherwise elements with an explicit size + padding size as
12
- content-box and layouts drift from the React (light-DOM) versions. */
13
- :host,
14
- *,
15
- *::before,
16
- *::after {
17
- box-sizing: border-box;
18
- }
19
-
20
- :host {
21
- display: block;
22
- }
23
-
24
- :host([disabled]) {
25
- opacity: 0.5;
26
- pointer-events: none;
27
- }
28
-
29
- .item {
30
- display: flex;
31
- align-items: center;
32
- gap: var(--bds-space_xs);
33
- inline-size: 100%;
34
- padding: var(--bds-space_xs) var(--bds-space_s);
35
- font-size: var(--bds-font_size--body);
36
- font-family: var(--bds-font_family--body);
37
- color: var(--bds-color_on-bg);
38
- background: none;
39
- border: none;
40
- text-align: start;
41
- cursor: pointer;
42
- border-radius: var(--bds-border_radius--xs);
43
- transition: var(--bds-animation_transition);
44
- }
45
-
46
- :host([destructive]) .item {
47
- color: var(--bds-color_error);
48
- }
49
-
50
- @media (hover: hover) and (pointer: fine) {
51
- .item:hover {
52
- background-color: var(--dropdown_item-bg--hover, var(--bds-color_bg--subtle));
53
- color: var(--dropdown_item-color--hover, var(--bds-color_interactive_on-bg));
54
- }
55
-
56
- :host([destructive]) .item:hover {
57
- background-color: color-mix(in srgb, var(--bds-color_error) 10%, transparent);
58
- }
59
- }
60
-
61
- .item:focus-visible {
62
- outline: var(--bds-outline_default);
63
- outline-offset: var(--bds-outline_offset);
64
- }
65
- `;
66
- static properties = {
67
- value: { type: String, reflect: true },
68
- disabled: { type: Boolean, reflect: true },
69
- destructive: { type: Boolean, reflect: true }
70
- };
71
- constructor() {
72
- super();
73
- this.value = "";
74
- this.disabled = false;
75
- this.destructive = false;
76
- }
77
- _handleClick() {
78
- if (this.disabled) return;
79
- this.dispatchEvent(new CustomEvent("bds-select", {
80
- detail: { value: this.value },
81
- bubbles: true,
82
- composed: true
83
- }));
84
- }
85
- _handleKeydown(e) {
86
- if (e.key === "Enter" || e.key === " ") {
87
- e.preventDefault();
88
- this._handleClick();
89
- }
90
- }
91
- render() {
92
- return T`
93
- <button
94
- class="item"
95
- type="button"
96
- role="menuitem"
97
- tabindex=${this.disabled ? "-1" : "0"}
98
- ?disabled=${this.disabled}
99
- @click=${this._handleClick}
100
- @keydown=${this._handleKeydown}
101
- >
102
- <slot></slot>
103
- </button>
104
- `;
105
- }
106
- };
107
- customElements.define("bds-dropdown-menu-item", BdsDropdownMenuItem);
108
-
109
- export {
110
- BdsDropdownMenuItem
111
- };