@boostdev/design-system-components 1.1.1 → 1.2.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 (320) hide show
  1. package/AGENTS.md +13 -10
  2. package/dist/client.cjs +77 -99
  3. package/dist/client.css +611 -580
  4. package/dist/client.d.cts +13 -16
  5. package/dist/client.d.ts +13 -16
  6. package/dist/client.js +87 -109
  7. package/dist/index.cjs +77 -99
  8. package/dist/index.css +611 -580
  9. package/dist/index.d.cts +13 -16
  10. package/dist/index.d.ts +13 -16
  11. package/dist/index.js +87 -109
  12. package/dist/native/index.cjs +9 -8
  13. package/dist/native/index.d.cts +1 -1
  14. package/dist/native/index.d.ts +1 -1
  15. package/dist/native/index.js +9 -8
  16. package/dist/web-components/chunk-2QA62WCQ.js +48 -0
  17. package/dist/web-components/chunk-3REOIRDW.js +246 -0
  18. package/dist/web-components/chunk-57TRNCWQ.js +93 -0
  19. package/dist/web-components/chunk-5IPHEONG.js +139 -0
  20. package/dist/web-components/chunk-5R6IFELV.js +63 -0
  21. package/dist/web-components/chunk-5TFWOPLH.js +49 -0
  22. package/dist/web-components/chunk-6I3CFC26.js +89 -0
  23. package/dist/web-components/chunk-6MH5UWUD.js +226 -0
  24. package/dist/web-components/chunk-7FMR53BW.js +127 -0
  25. package/dist/web-components/chunk-AGKJTMJI.js +56 -0
  26. package/dist/web-components/chunk-AJSXNDAP.js +151 -0
  27. package/dist/web-components/chunk-BQLZ7I4G.js +56 -0
  28. package/dist/web-components/chunk-BX3IPVOB.js +167 -0
  29. package/dist/web-components/chunk-CR5PGUHV.js +109 -0
  30. package/dist/web-components/chunk-DI46Q2EA.js +278 -0
  31. package/dist/web-components/chunk-DZRSJGPB.js +53 -0
  32. package/dist/web-components/chunk-EBJM3VD4.js +107 -0
  33. package/dist/web-components/chunk-ECW3HHWA.js +185 -0
  34. package/dist/web-components/chunk-HGBNDR22.js +98 -0
  35. package/dist/web-components/chunk-HHHRF2PS.js +118 -0
  36. package/dist/web-components/chunk-ITHLKR7Q.js +105 -0
  37. package/dist/web-components/chunk-JUKB3BUP.js +186 -0
  38. package/dist/web-components/chunk-L3XHOMN6.js +111 -0
  39. package/dist/{web-components.js → web-components/chunk-LGEZYFUU.js} +62 -844
  40. package/dist/web-components/chunk-LY62SAVN.js +64 -0
  41. package/dist/web-components/chunk-N6IMUOY4.js +185 -0
  42. package/dist/web-components/chunk-OHUTLSIQ.js +69 -0
  43. package/dist/web-components/chunk-OQTRTMAB.js +27 -0
  44. package/dist/web-components/chunk-PY62FTRW.js +179 -0
  45. package/dist/web-components/chunk-Q4T5BJT6.js +94 -0
  46. package/dist/web-components/chunk-QDST57JC.js +119 -0
  47. package/dist/web-components/chunk-QLZ2362S.js +279 -0
  48. package/dist/web-components/chunk-QPOKHLMQ.js +45 -0
  49. package/dist/web-components/chunk-SOQQ7RVJ.js +88 -0
  50. package/dist/web-components/chunk-T6AETZRP.js +131 -0
  51. package/dist/web-components/chunk-UFFCKVZE.js +149 -0
  52. package/dist/web-components/chunk-VMMVWLXL.js +53 -0
  53. package/dist/web-components/chunk-X3FKVHLK.js +144 -0
  54. package/dist/web-components/chunk-XNA6WTXG.js +133 -0
  55. package/dist/web-components/chunk-Y4MAXTMA.js +80 -0
  56. package/dist/web-components/chunk-YLVTEY23.js +165 -0
  57. package/dist/web-components/chunk-YRXCVKHV.js +116 -0
  58. package/dist/web-components/chunk-ZTC6GRP7.js +64 -0
  59. package/dist/web-components/globals.d.ts +2 -0
  60. package/dist/web-components/globals.js +1 -0
  61. package/dist/web-components/index.d.ts +41 -0
  62. package/dist/web-components/index.js +165 -0
  63. package/dist/web-components/interaction/bds-accordion-item.d.ts +54 -0
  64. package/dist/web-components/interaction/bds-accordion-item.js +7 -0
  65. package/dist/web-components/interaction/bds-accordion.d.ts +50 -0
  66. package/dist/web-components/interaction/bds-accordion.js +7 -0
  67. package/dist/web-components/interaction/bds-button.d.ts +100 -0
  68. package/dist/web-components/interaction/bds-button.js +7 -0
  69. package/dist/web-components/interaction/bds-collapsible.d.ts +52 -0
  70. package/dist/web-components/interaction/bds-collapsible.js +7 -0
  71. package/dist/web-components/interaction/bds-dialog.d.ts +56 -0
  72. package/dist/web-components/interaction/bds-dialog.js +7 -0
  73. package/dist/web-components/interaction/bds-drawer.d.ts +64 -0
  74. package/dist/web-components/interaction/bds-drawer.js +7 -0
  75. package/dist/web-components/interaction/bds-popover.d.ts +62 -0
  76. package/dist/web-components/interaction/bds-popover.js +7 -0
  77. package/dist/web-components/interaction/bds-skip-link.d.ts +36 -0
  78. package/dist/web-components/interaction/bds-skip-link.js +7 -0
  79. package/dist/web-components/interaction/bds-tab-panel.d.ts +26 -0
  80. package/dist/web-components/interaction/bds-tab-panel.js +7 -0
  81. package/dist/web-components/interaction/bds-tab.d.ts +45 -0
  82. package/dist/web-components/interaction/bds-tab.js +7 -0
  83. package/dist/web-components/interaction/bds-tabs.d.ts +46 -0
  84. package/dist/web-components/interaction/bds-tabs.js +7 -0
  85. package/dist/web-components/interaction/bds-toast-provider.d.ts +57 -0
  86. package/dist/web-components/interaction/bds-toast-provider.js +7 -0
  87. package/dist/web-components/interaction/bds-tooltip.d.ts +50 -0
  88. package/dist/web-components/interaction/bds-tooltip.js +7 -0
  89. package/dist/web-components/interaction/form/bds-checkbox.d.ts +70 -0
  90. package/dist/web-components/interaction/form/bds-checkbox.js +7 -0
  91. package/dist/web-components/interaction/form/bds-combobox.d.ts +84 -0
  92. package/dist/web-components/interaction/form/bds-combobox.js +7 -0
  93. package/dist/web-components/interaction/form/bds-file-input.d.ts +62 -0
  94. package/dist/web-components/interaction/form/bds-file-input.js +7 -0
  95. package/dist/web-components/interaction/form/bds-number-input.d.ts +68 -0
  96. package/dist/web-components/interaction/form/bds-number-input.js +7 -0
  97. package/dist/web-components/interaction/form/bds-radio.d.ts +68 -0
  98. package/dist/web-components/interaction/form/bds-radio.js +7 -0
  99. package/dist/web-components/interaction/form/bds-segmented-control.d.ts +88 -0
  100. package/dist/web-components/interaction/form/bds-segmented-control.js +7 -0
  101. package/dist/web-components/interaction/form/bds-select.d.ts +79 -0
  102. package/dist/web-components/interaction/form/bds-select.js +7 -0
  103. package/dist/web-components/interaction/form/bds-slider.d.ts +70 -0
  104. package/dist/web-components/interaction/form/bds-slider.js +7 -0
  105. package/dist/web-components/interaction/form/bds-switch.d.ts +67 -0
  106. package/dist/web-components/interaction/form/bds-switch.js +7 -0
  107. package/dist/web-components/interaction/form/bds-textarea.d.ts +70 -0
  108. package/dist/web-components/interaction/form/bds-textarea.js +7 -0
  109. package/dist/web-components/ui/bds-alert.d.ts +66 -0
  110. package/dist/web-components/ui/bds-alert.js +7 -0
  111. package/dist/web-components/ui/bds-avatar.d.ts +50 -0
  112. package/dist/web-components/ui/bds-avatar.js +7 -0
  113. package/dist/web-components/ui/bds-badge.d.ts +35 -0
  114. package/dist/web-components/ui/bds-badge.js +7 -0
  115. package/dist/web-components/ui/bds-breadcrumb.d.ts +35 -0
  116. package/dist/web-components/ui/bds-breadcrumb.js +7 -0
  117. package/dist/web-components/ui/bds-card.d.ts +72 -0
  118. package/dist/web-components/ui/bds-card.js +7 -0
  119. package/dist/web-components/ui/bds-description-list.d.ts +42 -0
  120. package/dist/web-components/ui/bds-description-list.js +7 -0
  121. package/dist/web-components/ui/bds-icon-wrapper.d.ts +39 -0
  122. package/dist/web-components/ui/bds-icon-wrapper.js +7 -0
  123. package/dist/web-components/ui/bds-link.d.ts +59 -0
  124. package/dist/web-components/ui/bds-link.js +7 -0
  125. package/dist/web-components/ui/bds-loading.d.ts +32 -0
  126. package/dist/web-components/ui/bds-loading.js +7 -0
  127. package/dist/web-components/ui/bds-notification-banner.d.ts +61 -0
  128. package/dist/web-components/ui/bds-notification-banner.js +7 -0
  129. package/dist/web-components/ui/bds-progress-circle.d.ts +53 -0
  130. package/dist/web-components/ui/bds-progress-circle.js +7 -0
  131. package/dist/web-components/ui/bds-progress.d.ts +54 -0
  132. package/dist/web-components/ui/bds-progress.js +7 -0
  133. package/dist/web-components/ui/bds-rating.d.ts +36 -0
  134. package/dist/web-components/ui/bds-rating.js +7 -0
  135. package/dist/web-components/ui/bds-section-header.d.ts +53 -0
  136. package/dist/web-components/ui/bds-section-header.js +8 -0
  137. package/dist/web-components/ui/bds-separator.d.ts +32 -0
  138. package/dist/web-components/ui/bds-separator.js +7 -0
  139. package/dist/web-components/ui/bds-skeleton.d.ts +22 -0
  140. package/dist/web-components/ui/bds-skeleton.js +7 -0
  141. package/dist/web-components/ui/bds-typography.d.ts +44 -0
  142. package/dist/web-components/ui/bds-typography.js +8 -0
  143. package/package.json +170 -5
  144. package/src/components/interaction/Button/Button.module.css +12 -11
  145. package/src/components/interaction/Button/Button.native.tsx +10 -9
  146. package/src/components/interaction/Button/Button.tsx +1 -1
  147. package/src/components/interaction/Command/Command.module.css +3 -7
  148. package/src/components/interaction/Dialog/Dialog.module.css +7 -5
  149. package/src/components/interaction/Drawer/Drawer.module.css +49 -1
  150. package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +1 -3
  151. package/src/components/interaction/Popover/Popover.module.css +1 -3
  152. package/src/components/interaction/form/Checkbox/Checkbox.module.css +1 -3
  153. package/src/components/interaction/form/Combobox/Combobox.module.css +2 -6
  154. package/src/components/interaction/form/FormInput/FormInput.module.css +1 -3
  155. package/src/components/interaction/form/NumberInput/NumberInput.module.css +16 -4
  156. package/src/components/interaction/form/Radio/Radio.module.css +6 -16
  157. package/src/components/interaction/form/SegmentedControl/SegmentedControl.mdx +70 -25
  158. package/src/components/interaction/form/SegmentedControl/SegmentedControl.module.css +55 -33
  159. package/src/components/interaction/form/SegmentedControl/SegmentedControl.spec.tsx +127 -56
  160. package/src/components/interaction/form/SegmentedControl/SegmentedControl.stories.tsx +89 -72
  161. package/src/components/interaction/form/SegmentedControl/SegmentedControl.tsx +40 -62
  162. package/src/components/interaction/form/SegmentedControl/index.ts +1 -1
  163. package/src/components/interaction/form/Select/Select.module.css +2 -4
  164. package/src/components/interaction/form/Switch/Switch.module.css +5 -7
  165. package/src/components/interaction/form/Switch/Switch.native.spec.tsx +9 -9
  166. package/src/components/interaction/form/Switch/Switch.native.tsx +2 -2
  167. package/src/components/interaction/form/Textarea/Textarea.module.css +1 -3
  168. package/src/components/interaction/form/atoms/InputContainer.stories.tsx +64 -0
  169. package/src/components/interaction/form/atoms/Label.stories.tsx +33 -0
  170. package/src/components/interaction/form/atoms/Message.stories.tsx +33 -0
  171. package/src/components/layout/Card/Card.module.css +1 -3
  172. package/src/components/ui/Accordion/Accordion.module.css +1 -2
  173. package/src/components/ui/Alert/Alert.module.css +1 -2
  174. package/src/components/ui/Calendar/Calendar.module.css +2 -5
  175. package/src/components/ui/Carousel/Carousel.module.css +1 -3
  176. package/src/components/ui/NotificationBanner/NotificationBanner.module.css +1 -2
  177. package/src/components/ui/Pagination/Pagination.module.css +1 -2
  178. package/src/components/ui/SkipLink/SkipLink.module.css +1 -2
  179. package/src/components/ui/Table/Table.module.css +1 -2
  180. package/src/css/bdc.css +16 -11
  181. package/src/index.ts +1 -1
  182. package/src/web-components/globals.ts +3 -3
  183. package/src/web-components/index.ts +47 -0
  184. package/src/web-components/interaction/BdsAccordion.mdx +51 -0
  185. package/src/web-components/interaction/BdsAccordion.stories.tsx +85 -0
  186. package/src/web-components/interaction/BdsCollapsible.mdx +46 -0
  187. package/src/web-components/interaction/BdsCollapsible.stories.tsx +87 -0
  188. package/src/web-components/interaction/BdsDialog.mdx +49 -0
  189. package/src/web-components/interaction/BdsDialog.stories.tsx +75 -0
  190. package/src/web-components/interaction/BdsDrawer.mdx +50 -0
  191. package/src/web-components/interaction/BdsDrawer.stories.tsx +66 -0
  192. package/src/web-components/interaction/BdsSkipLink.mdx +34 -0
  193. package/src/web-components/interaction/BdsSkipLink.stories.tsx +55 -0
  194. package/src/web-components/interaction/BdsTabs.mdx +47 -0
  195. package/src/web-components/interaction/BdsTabs.stories.tsx +80 -0
  196. package/src/web-components/interaction/BdsTooltip.mdx +38 -0
  197. package/src/web-components/interaction/BdsTooltip.stories.tsx +68 -0
  198. package/src/web-components/interaction/bds-accordion-item.spec.ts +75 -0
  199. package/src/web-components/interaction/bds-accordion-item.ts +181 -0
  200. package/src/web-components/interaction/bds-accordion.spec.ts +73 -0
  201. package/src/web-components/interaction/bds-accordion.ts +98 -0
  202. package/src/web-components/interaction/bds-button.ts +15 -13
  203. package/src/web-components/interaction/bds-collapsible.spec.ts +56 -0
  204. package/src/web-components/interaction/bds-collapsible.ts +170 -0
  205. package/src/web-components/interaction/bds-dialog.spec.ts +119 -0
  206. package/src/web-components/interaction/bds-dialog.ts +221 -0
  207. package/src/web-components/interaction/bds-drawer.spec.ts +113 -0
  208. package/src/web-components/interaction/bds-drawer.ts +315 -0
  209. package/src/web-components/interaction/bds-skip-link.spec.ts +42 -0
  210. package/src/web-components/interaction/bds-skip-link.ts +74 -0
  211. package/src/web-components/interaction/bds-tab-panel.spec.ts +32 -0
  212. package/src/web-components/interaction/bds-tab-panel.ts +38 -0
  213. package/src/web-components/interaction/bds-tab.spec.ts +71 -0
  214. package/src/web-components/interaction/bds-tab.ts +110 -0
  215. package/src/web-components/interaction/bds-tabs.spec.ts +120 -0
  216. package/src/web-components/interaction/bds-tabs.ts +152 -0
  217. package/src/web-components/interaction/bds-tooltip.spec.ts +49 -0
  218. package/src/web-components/interaction/bds-tooltip.ts +127 -0
  219. package/src/web-components/interaction/form/BdsCheckbox.mdx +39 -0
  220. package/src/web-components/interaction/form/BdsCheckbox.stories.tsx +73 -0
  221. package/src/web-components/interaction/form/BdsCombobox.mdx +52 -0
  222. package/src/web-components/interaction/form/BdsCombobox.stories.tsx +91 -0
  223. package/src/web-components/interaction/form/BdsFileInput.mdx +44 -0
  224. package/src/web-components/interaction/form/BdsFileInput.stories.tsx +84 -0
  225. package/src/web-components/interaction/form/BdsNumberInput.mdx +41 -0
  226. package/src/web-components/interaction/form/BdsNumberInput.stories.tsx +90 -0
  227. package/src/web-components/interaction/form/BdsRadio.mdx +41 -0
  228. package/src/web-components/interaction/form/BdsRadio.stories.tsx +90 -0
  229. package/src/web-components/interaction/form/BdsSegmentedControl.mdx +42 -0
  230. package/src/web-components/interaction/form/BdsSegmentedControl.stories.tsx +92 -0
  231. package/src/web-components/interaction/form/BdsSelect.mdx +38 -0
  232. package/src/web-components/interaction/form/BdsSelect.stories.tsx +93 -0
  233. package/src/web-components/interaction/form/BdsSlider.mdx +49 -0
  234. package/src/web-components/interaction/form/BdsSlider.stories.tsx +89 -0
  235. package/src/web-components/interaction/form/BdsSwitch.mdx +39 -0
  236. package/src/web-components/interaction/form/BdsSwitch.stories.tsx +73 -0
  237. package/src/web-components/interaction/form/BdsTextarea.mdx +41 -0
  238. package/src/web-components/interaction/form/BdsTextarea.stories.tsx +79 -0
  239. package/src/web-components/interaction/form/bds-checkbox.spec.ts +63 -0
  240. package/src/web-components/interaction/form/bds-checkbox.ts +166 -0
  241. package/src/web-components/interaction/form/bds-combobox.spec.ts +117 -0
  242. package/src/web-components/interaction/form/bds-combobox.ts +334 -0
  243. package/src/web-components/interaction/form/bds-file-input.spec.ts +58 -0
  244. package/src/web-components/interaction/form/bds-file-input.ts +209 -0
  245. package/src/web-components/interaction/form/bds-number-input.spec.ts +87 -0
  246. package/src/web-components/interaction/form/bds-number-input.ts +220 -0
  247. package/src/web-components/interaction/form/bds-radio.spec.ts +70 -0
  248. package/src/web-components/interaction/form/bds-radio.ts +151 -0
  249. package/src/web-components/interaction/form/bds-segmented-control.spec.ts +74 -0
  250. package/src/web-components/interaction/form/bds-segmented-control.ts +282 -0
  251. package/src/web-components/interaction/form/bds-select.spec.ts +74 -0
  252. package/src/web-components/interaction/form/bds-select.ts +188 -0
  253. package/src/web-components/interaction/form/bds-slider.spec.ts +41 -0
  254. package/src/web-components/interaction/form/bds-slider.ts +162 -0
  255. package/src/web-components/interaction/form/bds-switch.spec.ts +62 -0
  256. package/src/web-components/interaction/form/bds-switch.ts +165 -0
  257. package/src/web-components/interaction/form/bds-textarea.spec.ts +55 -0
  258. package/src/web-components/interaction/form/bds-textarea.ts +141 -0
  259. package/src/web-components/ui/BdsAvatar.mdx +67 -0
  260. package/src/web-components/ui/BdsAvatar.stories.tsx +62 -0
  261. package/src/web-components/ui/BdsBreadcrumb.mdx +63 -0
  262. package/src/web-components/ui/BdsBreadcrumb.stories.tsx +59 -0
  263. package/src/web-components/ui/BdsCard.mdx +83 -0
  264. package/src/web-components/ui/BdsCard.stories.tsx +90 -0
  265. package/src/web-components/ui/BdsDescriptionList.mdx +67 -0
  266. package/src/web-components/ui/BdsDescriptionList.stories.tsx +79 -0
  267. package/src/web-components/ui/BdsIconWrapper.mdx +70 -0
  268. package/src/web-components/ui/BdsIconWrapper.stories.tsx +76 -0
  269. package/src/web-components/ui/BdsLink.mdx +75 -0
  270. package/src/web-components/ui/BdsLink.stories.tsx +64 -0
  271. package/src/web-components/ui/BdsLoading.mdx +62 -0
  272. package/src/web-components/ui/BdsLoading.stories.tsx +37 -0
  273. package/src/web-components/ui/BdsNotificationBanner.mdx +90 -0
  274. package/src/web-components/ui/BdsNotificationBanner.stories.tsx +93 -0
  275. package/src/web-components/ui/BdsProgress.mdx +63 -0
  276. package/src/web-components/ui/BdsProgress.stories.tsx +70 -0
  277. package/src/web-components/ui/BdsProgressCircle.mdx +64 -0
  278. package/src/web-components/ui/BdsProgressCircle.stories.tsx +69 -0
  279. package/src/web-components/ui/BdsRating.mdx +61 -0
  280. package/src/web-components/ui/BdsRating.stories.tsx +39 -0
  281. package/src/web-components/ui/BdsSectionHeader.mdx +69 -0
  282. package/src/web-components/ui/BdsSectionHeader.stories.tsx +56 -0
  283. package/src/web-components/ui/BdsSeparator.mdx +63 -0
  284. package/src/web-components/ui/BdsSeparator.stories.tsx +47 -0
  285. package/src/web-components/ui/BdsSkeleton.mdx +67 -0
  286. package/src/web-components/ui/BdsSkeleton.stories.tsx +50 -0
  287. package/src/web-components/ui/BdsTypography.mdx +83 -0
  288. package/src/web-components/ui/BdsTypography.stories.tsx +51 -0
  289. package/src/web-components/ui/bds-alert.ts +1 -2
  290. package/src/web-components/ui/bds-avatar.spec.ts +75 -0
  291. package/src/web-components/ui/bds-avatar.ts +122 -0
  292. package/src/web-components/ui/bds-breadcrumb.spec.ts +55 -0
  293. package/src/web-components/ui/bds-breadcrumb.ts +114 -0
  294. package/src/web-components/ui/bds-card.spec.ts +70 -0
  295. package/src/web-components/ui/bds-card.ts +154 -0
  296. package/src/web-components/ui/bds-description-list.spec.ts +36 -0
  297. package/src/web-components/ui/bds-description-list.ts +79 -0
  298. package/src/web-components/ui/bds-icon-wrapper.spec.ts +21 -0
  299. package/src/web-components/ui/bds-icon-wrapper.ts +68 -0
  300. package/src/web-components/ui/bds-link.spec.ts +72 -0
  301. package/src/web-components/ui/bds-link.ts +138 -0
  302. package/src/web-components/ui/bds-loading.spec.ts +38 -0
  303. package/src/web-components/ui/bds-loading.ts +76 -0
  304. package/src/web-components/ui/bds-notification-banner.spec.ts +82 -0
  305. package/src/web-components/ui/bds-notification-banner.ts +184 -0
  306. package/src/web-components/ui/bds-progress-circle.spec.ts +58 -0
  307. package/src/web-components/ui/bds-progress-circle.ts +142 -0
  308. package/src/web-components/ui/bds-progress.spec.ts +66 -0
  309. package/src/web-components/ui/bds-progress.ts +127 -0
  310. package/src/web-components/ui/bds-rating.spec.ts +70 -0
  311. package/src/web-components/ui/bds-rating.ts +80 -0
  312. package/src/web-components/ui/bds-section-header.spec.ts +57 -0
  313. package/src/web-components/ui/bds-section-header.ts +96 -0
  314. package/src/web-components/ui/bds-separator.spec.ts +50 -0
  315. package/src/web-components/ui/bds-separator.ts +66 -0
  316. package/src/web-components/ui/bds-skeleton.spec.ts +22 -0
  317. package/src/web-components/ui/bds-skeleton.ts +55 -0
  318. package/src/web-components/ui/bds-typography.spec.ts +76 -0
  319. package/src/web-components/ui/bds-typography.ts +112 -0
  320. package/dist/web-components.d.ts +0 -304
@@ -0,0 +1,315 @@
1
+ import { LitElement, css, html } from 'lit';
2
+
3
+ const FOCUSABLE = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
4
+
5
+ export type DrawerSide = 'left' | 'right';
6
+
7
+ /**
8
+ * `<bds-drawer>` — framework-agnostic Drawer (slide-in panel) custom element.
9
+ *
10
+ * Same modal infrastructure as `<bds-dialog>` but positioned as a side panel.
11
+ * Uses a native `<dialog>` element with a slide-in inner panel.
12
+ *
13
+ * Attributes:
14
+ * open — boolean; controlled open state
15
+ * side — "left" | "right" (default: "right")
16
+ *
17
+ * Slots:
18
+ * title — drawer title text
19
+ * (default) — drawer body content
20
+ *
21
+ * Events:
22
+ * bds-open — fired (bubbles, composed) when the drawer opens
23
+ * bds-close — fired (bubbles, composed) when the drawer closes
24
+ *
25
+ * @example
26
+ * <bds-drawer id="my-drawer" side="right">
27
+ * <span slot="title">Settings</span>
28
+ * <p>Drawer content</p>
29
+ * </bds-drawer>
30
+ * <button commandfor="my-drawer" command="show-modal">Open</button>
31
+ */
32
+ export class BdsDrawer extends LitElement {
33
+ static styles = css`
34
+ :host {
35
+ display: contents;
36
+ }
37
+
38
+ .drawer {
39
+ position: fixed;
40
+ inset: 0;
41
+ margin: 0;
42
+ padding: 0;
43
+ inline-size: 100%;
44
+ max-inline-size: 100%;
45
+ block-size: 100%;
46
+ max-block-size: 100%;
47
+ border: none;
48
+ background: transparent;
49
+ overflow: hidden;
50
+ transition:
51
+ display var(--bds-animation_transition-duration) allow-discrete,
52
+ overlay var(--bds-animation_transition-duration) allow-discrete;
53
+ }
54
+
55
+ .drawer::backdrop {
56
+ background-color: var(--color_backdrop, rgb(0 0 0 / 50%));
57
+ backdrop-filter: blur(3px);
58
+ transition:
59
+ display var(--bds-animation_transition-duration) allow-discrete,
60
+ overlay var(--bds-animation_transition-duration) allow-discrete,
61
+ background-color var(--bds-animation_transition-duration) var(--bds-animation_easing),
62
+ backdrop-filter var(--bds-animation_transition-duration) var(--bds-animation_easing);
63
+ }
64
+
65
+ @starting-style {
66
+ .drawer[open]::backdrop {
67
+ background-color: transparent;
68
+ backdrop-filter: blur(0);
69
+ }
70
+ }
71
+
72
+ .panel {
73
+ position: absolute;
74
+ inset-block: 0;
75
+ display: flex;
76
+ flex-direction: column;
77
+ inline-size: min(28rem, 90vw);
78
+ block-size: 100%;
79
+ background-color: var(--drawer_color, var(--bds-color_bg));
80
+ color: var(--drawer_on-color, var(--bds-color_on-bg));
81
+ box-shadow: var(--bds-shadow_xl);
82
+ overflow: hidden;
83
+ translate: 100% 0;
84
+ transition: translate var(--bds-animation_transition-duration) var(--bds-animation_easing);
85
+ }
86
+
87
+ :host([side='right']) .panel {
88
+ inset-inline-end: 0;
89
+ translate: 100% 0;
90
+ }
91
+
92
+ :host([side='left']) .panel,
93
+ :host(:not([side])) .panel {
94
+ inset-inline-start: 0;
95
+ translate: -100% 0;
96
+ }
97
+
98
+ .drawer[open] .panel {
99
+ translate: 0 0;
100
+ }
101
+
102
+ :host([side='right']) .drawer[open] .panel,
103
+ :host(:not([side])) .drawer[open] .panel {
104
+ animation: bds-drawer-slide-right var(--bds-animation_transition-duration) var(--bds-animation_easing) both;
105
+ }
106
+
107
+ :host([side='left']) .drawer[open] .panel {
108
+ animation: bds-drawer-slide-left var(--bds-animation_transition-duration) var(--bds-animation_easing) both;
109
+ }
110
+
111
+ @keyframes bds-drawer-slide-right {
112
+ from { translate: 100% 0; }
113
+ to { translate: 0 0; }
114
+ }
115
+
116
+ @keyframes bds-drawer-slide-left {
117
+ from { translate: -100% 0; }
118
+ to { translate: 0 0; }
119
+ }
120
+
121
+ .header {
122
+ display: flex;
123
+ align-items: center;
124
+ justify-content: space-between;
125
+ padding: var(--bds-space_m) var(--bds-space_l);
126
+ border-block-end: 1px solid currentcolor;
127
+ flex-shrink: 0;
128
+ }
129
+
130
+ .title {
131
+ font-weight: var(--bds-font_weight--semibold);
132
+ font-size: var(--bds-font_size--body);
133
+ }
134
+
135
+ .close-button {
136
+ all: unset;
137
+ display: flex;
138
+ align-items: center;
139
+ justify-content: center;
140
+ inline-size: 2rem;
141
+ block-size: 2rem;
142
+ border-radius: 50%;
143
+ cursor: pointer;
144
+ transition: var(--bds-animation_transition);
145
+ }
146
+
147
+ .close-button svg {
148
+ inline-size: 1.25rem;
149
+ block-size: 1.25rem;
150
+ }
151
+
152
+ .close-button:focus-visible {
153
+ outline: var(--bds-outline_default);
154
+ outline-offset: var(--bds-outline_offset);
155
+ }
156
+
157
+ @media (hover: hover) and (pointer: fine) {
158
+ .close-button:hover {
159
+ background-color: var(--bds-color_bg--subtle);
160
+ }
161
+ }
162
+
163
+ .body {
164
+ flex: 1;
165
+ overflow-block: auto;
166
+ padding: var(--bds-space_l);
167
+ display: flex;
168
+ flex-direction: column;
169
+ }
170
+
171
+ @media (prefers-reduced-motion: reduce) {
172
+ .drawer,
173
+ .drawer::backdrop,
174
+ .panel {
175
+ transition: none;
176
+ }
177
+
178
+ :host([side='right']) .drawer[open] .panel,
179
+ :host(:not([side])) .drawer[open] .panel,
180
+ :host([side='left']) .drawer[open] .panel {
181
+ animation: none;
182
+ }
183
+ }
184
+ `;
185
+
186
+ static properties = {
187
+ open: { type: Boolean, reflect: true },
188
+ side: { type: String, reflect: true },
189
+ };
190
+
191
+ declare open: boolean;
192
+ declare side: DrawerSide;
193
+
194
+ private _triggerEl: Element | null = null;
195
+
196
+ constructor() {
197
+ super();
198
+ this.open = false;
199
+ this.side = 'right';
200
+ }
201
+
202
+ connectedCallback() {
203
+ super.connectedCallback();
204
+ this.addEventListener('command', this._onCommand);
205
+ }
206
+
207
+ disconnectedCallback() {
208
+ super.disconnectedCallback();
209
+ this.removeEventListener('command', this._onCommand);
210
+ }
211
+
212
+ updated(changed: Map<string, unknown>) {
213
+ super.updated(changed);
214
+ if (changed.has('open')) {
215
+ const dialog = this._dialog;
216
+ if (!dialog) return;
217
+ if (this.open && !dialog.open) {
218
+ this._triggerEl = document.activeElement;
219
+ dialog.showModal();
220
+ document.body.style.overflow = 'hidden';
221
+ } else if (!this.open && dialog.open) {
222
+ dialog.close();
223
+ document.body.style.overflow = '';
224
+ (this._triggerEl as HTMLElement | null)?.focus();
225
+ this._triggerEl = null;
226
+ }
227
+ }
228
+ }
229
+
230
+ private get _dialog(): HTMLDialogElement | null {
231
+ return this.shadowRoot?.querySelector('dialog') ?? null;
232
+ }
233
+
234
+ private _onCommand = (e: Event) => {
235
+ const command = (e as CommandEvent).command;
236
+ if (command === 'show-modal') this._openDrawer();
237
+ else if (command === 'close') this._closeDrawer();
238
+ };
239
+
240
+ private _openDrawer() {
241
+ if (this.open) return;
242
+ this._triggerEl = document.activeElement;
243
+ this.open = true;
244
+ this.dispatchEvent(new CustomEvent('bds-open', { bubbles: true, composed: true }));
245
+ }
246
+
247
+ private _closeDrawer() {
248
+ if (!this.open) return;
249
+ this.open = false;
250
+ this.dispatchEvent(new CustomEvent('bds-close', { bubbles: true, composed: true }));
251
+ }
252
+
253
+ private _handleBackdropClick(e: MouseEvent) {
254
+ if (e.target === this._dialog) this._closeDrawer();
255
+ }
256
+
257
+ private _handleCancel(e: Event) {
258
+ e.preventDefault();
259
+ this._closeDrawer();
260
+ }
261
+
262
+ private _handleKeydown(e: KeyboardEvent) {
263
+ if (e.key !== 'Tab') return;
264
+ const dialog = this._dialog;
265
+ if (!dialog) return;
266
+ const focusable = Array.from(dialog.querySelectorAll<HTMLElement>(FOCUSABLE));
267
+ if (focusable.length === 0) return;
268
+ const first = focusable[0];
269
+ const last = focusable[focusable.length - 1];
270
+ if (e.shiftKey) {
271
+ if (document.activeElement === first) { e.preventDefault(); last.focus(); }
272
+ } else {
273
+ if (document.activeElement === last) { e.preventDefault(); first.focus(); }
274
+ }
275
+ }
276
+
277
+ render() {
278
+ return html`
279
+ <dialog
280
+ class="drawer"
281
+ aria-modal="true"
282
+ @click=${this._handleBackdropClick}
283
+ @cancel=${this._handleCancel}
284
+ @keydown=${this._handleKeydown}
285
+ >
286
+ <div class="panel">
287
+ <div class="header">
288
+ <span class="title"><slot name="title"></slot></span>
289
+ <button
290
+ type="button"
291
+ class="close-button"
292
+ aria-label="Close drawer"
293
+ @click=${this._closeDrawer}
294
+ >
295
+ <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
296
+ <path stroke-linecap="round" stroke-linejoin="round" d="M18 6L6 18M6 6l12 12" />
297
+ </svg>
298
+ </button>
299
+ </div>
300
+ <div class="body">
301
+ <slot></slot>
302
+ </div>
303
+ </div>
304
+ </dialog>
305
+ `;
306
+ }
307
+ }
308
+
309
+ customElements.define('bds-drawer', BdsDrawer);
310
+
311
+ declare global {
312
+ interface HTMLElementTagNameMap {
313
+ 'bds-drawer': BdsDrawer;
314
+ }
315
+ }
@@ -0,0 +1,42 @@
1
+ import { fixture, cleanup } from '../test/helpers';
2
+ import { BdsSkipLink } from './bds-skip-link';
3
+
4
+ describe('bds-skip-link', () => {
5
+ it('is registered as a custom element', () => {
6
+ expect(customElements.get('bds-skip-link')).toBe(BdsSkipLink);
7
+ });
8
+
9
+ it('defaults to href="#main"', async () => {
10
+ const el = await fixture('<bds-skip-link></bds-skip-link>') as BdsSkipLink;
11
+ expect(el.href).toBe('#main');
12
+ cleanup(el);
13
+ });
14
+
15
+ it('renders an <a> element in shadow DOM', async () => {
16
+ const el = await fixture('<bds-skip-link></bds-skip-link>');
17
+ const a = el.shadowRoot!.querySelector('a.skip-link');
18
+ expect(a).not.toBeNull();
19
+ cleanup(el);
20
+ });
21
+
22
+ it('uses the href attribute on the anchor', async () => {
23
+ const el = await fixture('<bds-skip-link href="#content"></bds-skip-link>');
24
+ const a = el.shadowRoot!.querySelector('a');
25
+ expect(a!.getAttribute('href')).toBe('#content');
26
+ cleanup(el);
27
+ });
28
+
29
+ it('renders default slot text "Skip to main content"', async () => {
30
+ const el = await fixture('<bds-skip-link></bds-skip-link>');
31
+ // The slot default content is not visible in textContent from light DOM.
32
+ // Verify the anchor exists and the slot is present.
33
+ expect(el.shadowRoot!.querySelector('slot')).not.toBeNull();
34
+ cleanup(el);
35
+ });
36
+
37
+ it('renders slotted link text', async () => {
38
+ const el = await fixture('<bds-skip-link href="#main">Go to main</bds-skip-link>');
39
+ expect(el.textContent?.trim()).toBe('Go to main');
40
+ cleanup(el);
41
+ });
42
+ });
@@ -0,0 +1,74 @@
1
+ import { LitElement, css, html } from 'lit';
2
+
3
+ /**
4
+ * `<bds-skip-link>` — framework-agnostic Skip Navigation Link custom element.
5
+ *
6
+ * Visually hidden until focused. Allows keyboard users to skip repetitive
7
+ * navigation and jump directly to main content.
8
+ *
9
+ * Attributes:
10
+ * href — the target anchor (default: "#main")
11
+ *
12
+ * Slots:
13
+ * (default) — link text (default: "Skip to main content")
14
+ *
15
+ * @example
16
+ * <bds-skip-link href="#main-content">Skip to main content</bds-skip-link>
17
+ */
18
+ export class BdsSkipLink extends LitElement {
19
+ static styles = css`
20
+ :host {
21
+ display: block;
22
+ }
23
+
24
+ .skip-link {
25
+ position: absolute;
26
+ inset-block-start: var(--bds-space_s);
27
+ inset-inline-start: var(--bds-space_s);
28
+ z-index: 9999;
29
+ padding: var(--bds-space_xs) var(--bds-space_m);
30
+ background-color: var(--bds-color_bg);
31
+ color: var(--bds-color_on-bg);
32
+ border-radius: var(--bds-border_radius--s);
33
+ font-weight: var(--bds-font_weight--semibold);
34
+ font-size: var(--bds-font_size--body);
35
+ text-decoration: none;
36
+ box-shadow: var(--bds-shadow_m);
37
+ transform: translateY(calc(-100% - var(--bds-space_s)));
38
+ transition: transform var(--bds-animation_transition-duration) var(--bds-animation_easing);
39
+ }
40
+
41
+ .skip-link:focus-visible {
42
+ transform: translateY(0);
43
+ outline: var(--bds-outline_default);
44
+ outline-offset: var(--bds-outline_offset);
45
+ }
46
+ `;
47
+
48
+ static properties = {
49
+ href: { type: String },
50
+ };
51
+
52
+ declare href: string;
53
+
54
+ constructor() {
55
+ super();
56
+ this.href = '#main';
57
+ }
58
+
59
+ render() {
60
+ return html`
61
+ <a class="skip-link" href=${this.href}>
62
+ <slot>Skip to main content</slot>
63
+ </a>
64
+ `;
65
+ }
66
+ }
67
+
68
+ customElements.define('bds-skip-link', BdsSkipLink);
69
+
70
+ declare global {
71
+ interface HTMLElementTagNameMap {
72
+ 'bds-skip-link': BdsSkipLink;
73
+ }
74
+ }
@@ -0,0 +1,32 @@
1
+ import { fixture, cleanup } from '../test/helpers';
2
+ import { BdsTabPanel } from './bds-tab-panel';
3
+
4
+ describe('bds-tab-panel', () => {
5
+ it('is registered as a custom element', () => {
6
+ expect(customElements.get('bds-tab-panel')).toBe(BdsTabPanel);
7
+ });
8
+
9
+ it('renders slotted content', async () => {
10
+ const el = await fixture('<bds-tab-panel>Panel content</bds-tab-panel>');
11
+ expect(el.textContent?.trim()).toBe('Panel content');
12
+ cleanup(el);
13
+ });
14
+
15
+ it('renders a slot in shadow DOM', async () => {
16
+ const el = await fixture('<bds-tab-panel>Content</bds-tab-panel>');
17
+ expect(el.shadowRoot!.querySelector('slot')).not.toBeNull();
18
+ cleanup(el);
19
+ });
20
+
21
+ it('is visible by default (no hidden attribute)', async () => {
22
+ const el = await fixture('<bds-tab-panel>Content</bds-tab-panel>');
23
+ expect(el.hasAttribute('hidden')).toBe(false);
24
+ cleanup(el);
25
+ });
26
+
27
+ it('applies hidden attribute when set externally', async () => {
28
+ const el = await fixture('<bds-tab-panel hidden>Content</bds-tab-panel>');
29
+ expect(el.hasAttribute('hidden')).toBe(true);
30
+ cleanup(el);
31
+ });
32
+ });
@@ -0,0 +1,38 @@
1
+ import { LitElement, css, html } from 'lit';
2
+
3
+ /**
4
+ * `<bds-tab-panel>` — child element of `<bds-tabs>`.
5
+ *
6
+ * Contains the content displayed for the associated tab. The `hidden`
7
+ * state is managed by the parent `<bds-tabs>` element.
8
+ *
9
+ * Slots:
10
+ * (default) — panel content
11
+ *
12
+ * @example
13
+ * <bds-tab-panel>Panel content here</bds-tab-panel>
14
+ */
15
+ export class BdsTabPanel extends LitElement {
16
+ static styles = css`
17
+ :host {
18
+ display: block;
19
+ padding-block-start: var(--bds-space_m);
20
+ }
21
+
22
+ :host([hidden]) {
23
+ display: none;
24
+ }
25
+ `;
26
+
27
+ render() {
28
+ return html`<slot></slot>`;
29
+ }
30
+ }
31
+
32
+ customElements.define('bds-tab-panel', BdsTabPanel);
33
+
34
+ declare global {
35
+ interface HTMLElementTagNameMap {
36
+ 'bds-tab-panel': BdsTabPanel;
37
+ }
38
+ }
@@ -0,0 +1,71 @@
1
+ import { fixture, cleanup } from '../test/helpers';
2
+ import { BdsTab } from './bds-tab';
3
+
4
+ describe('bds-tab', () => {
5
+ it('is registered as a custom element', () => {
6
+ expect(customElements.get('bds-tab')).toBe(BdsTab);
7
+ });
8
+
9
+ it('renders a button with role="tab"', async () => {
10
+ const el = await fixture('<bds-tab>Label</bds-tab>');
11
+ const btn = el.shadowRoot!.querySelector('button');
12
+ expect(btn).not.toBeNull();
13
+ expect(btn!.getAttribute('role')).toBe('tab');
14
+ cleanup(el);
15
+ });
16
+
17
+ it('is not selected by default', async () => {
18
+ const el = await fixture('<bds-tab>Label</bds-tab>') as BdsTab;
19
+ expect(el.selected).toBe(false);
20
+ expect(el.shadowRoot!.querySelector('button')!.getAttribute('aria-selected')).toBe('false');
21
+ cleanup(el);
22
+ });
23
+
24
+ it('has tabindex="-1" when not selected', async () => {
25
+ const el = await fixture('<bds-tab>Label</bds-tab>');
26
+ const btn = el.shadowRoot!.querySelector('button')!;
27
+ expect(btn.getAttribute('tabindex')).toBe('-1');
28
+ cleanup(el);
29
+ });
30
+
31
+ it('has tabindex="0" when selected', async () => {
32
+ const el = await fixture('<bds-tab selected>Label</bds-tab>');
33
+ const btn = el.shadowRoot!.querySelector('button')!;
34
+ expect(btn.getAttribute('tabindex')).toBe('0');
35
+ cleanup(el);
36
+ });
37
+
38
+ it('sets aria-selected="true" when selected', async () => {
39
+ const el = await fixture('<bds-tab selected>Label</bds-tab>');
40
+ const btn = el.shadowRoot!.querySelector('button')!;
41
+ expect(btn.getAttribute('aria-selected')).toBe('true');
42
+ cleanup(el);
43
+ });
44
+
45
+ it('fires bds-tab-select when clicked', async () => {
46
+ const el = await fixture('<bds-tab>Label</bds-tab>');
47
+ const btn = el.shadowRoot!.querySelector('button')!;
48
+ const handler = vi.fn();
49
+ el.addEventListener('bds-tab-select', handler);
50
+ btn.click();
51
+ expect(handler).toHaveBeenCalledOnce();
52
+ cleanup(el);
53
+ });
54
+
55
+ it('does not fire bds-tab-select when disabled', async () => {
56
+ const el = await fixture('<bds-tab disabled>Label</bds-tab>');
57
+ const btn = el.shadowRoot!.querySelector('button')!;
58
+ const handler = vi.fn();
59
+ el.addEventListener('bds-tab-select', handler);
60
+ btn.dispatchEvent(new MouseEvent('click', { bubbles: true, composed: true }));
61
+ expect(handler).not.toHaveBeenCalled();
62
+ cleanup(el);
63
+ });
64
+
65
+ it('button is disabled when disabled attribute is set', async () => {
66
+ const el = await fixture('<bds-tab disabled>Label</bds-tab>');
67
+ const btn = el.shadowRoot!.querySelector('button')!;
68
+ expect(btn.hasAttribute('disabled')).toBe(true);
69
+ cleanup(el);
70
+ });
71
+ });
@@ -0,0 +1,110 @@
1
+ import { LitElement, css, html } from 'lit';
2
+
3
+ /**
4
+ * `<bds-tab>` — child element of `<bds-tabs>`.
5
+ *
6
+ * Represents a single tab button. State (`selected`, `tabIndex`, `disabled`)
7
+ * is managed by the parent `<bds-tabs>` element.
8
+ *
9
+ * Slots:
10
+ * (default) — tab label
11
+ *
12
+ * Events:
13
+ * bds-tab-select — fired (bubbles, composed) when the tab is clicked
14
+ *
15
+ * @example
16
+ * <bds-tab>Overview</bds-tab>
17
+ */
18
+ export class BdsTab extends LitElement {
19
+ static styles = css`
20
+ :host {
21
+ display: inline-flex;
22
+ }
23
+
24
+ .tab {
25
+ all: unset;
26
+ display: inline-flex;
27
+ align-items: center;
28
+ padding: var(--bds-space_s) var(--bds-space_m);
29
+ font-family: var(--bds-font_family--body);
30
+ font-size: var(--bds-font_size--body);
31
+ font-weight: var(--bds-font_weight--semibold);
32
+ color: var(--tab_color, var(--bds-color_on-bg));
33
+ border-block-end: 2px solid var(--tab_border-color, transparent);
34
+ margin-block-end: -1px;
35
+ cursor: pointer;
36
+ transition: var(--bds-animation_transition);
37
+ white-space: nowrap;
38
+ }
39
+
40
+ :host([selected]) .tab {
41
+ --tab_color: var(--bds-color_interactive_on-bg);
42
+ --tab_border-color: var(--bds-color_interactive);
43
+ }
44
+
45
+ .tab:disabled {
46
+ opacity: 0.4;
47
+ cursor: not-allowed;
48
+ }
49
+
50
+ .tab:focus-visible {
51
+ outline: var(--bds-outline_default);
52
+ outline-offset: var(--bds-outline_offset);
53
+ border-radius: var(--bds-border_radius--xs);
54
+ }
55
+
56
+ @media (hover: hover) and (pointer: fine) {
57
+ .tab:not(:disabled, [aria-selected='true']):hover {
58
+ --tab_color: var(--bds-color_interactive_on-bg);
59
+ }
60
+ }
61
+ `;
62
+
63
+ static properties = {
64
+ selected: { type: Boolean, reflect: true },
65
+ disabled: { type: Boolean, reflect: true },
66
+ };
67
+
68
+ declare selected: boolean;
69
+ declare disabled: boolean;
70
+
71
+ constructor() {
72
+ super();
73
+ this.selected = false;
74
+ this.disabled = false;
75
+ }
76
+
77
+ /** Called by `bds-tabs` to focus the inner button for keyboard navigation. */
78
+ focusButton() {
79
+ this.shadowRoot?.querySelector<HTMLButtonElement>('button')?.focus();
80
+ }
81
+
82
+ private _handleClick() {
83
+ if (this.disabled) return;
84
+ this.dispatchEvent(new CustomEvent('bds-tab-select', { bubbles: true, composed: true }));
85
+ }
86
+
87
+ render() {
88
+ return html`
89
+ <button
90
+ type="button"
91
+ class="tab"
92
+ role="tab"
93
+ aria-selected=${this.selected}
94
+ tabindex=${this.selected ? 0 : -1}
95
+ ?disabled=${this.disabled}
96
+ @click=${this._handleClick}
97
+ >
98
+ <slot></slot>
99
+ </button>
100
+ `;
101
+ }
102
+ }
103
+
104
+ customElements.define('bds-tab', BdsTab);
105
+
106
+ declare global {
107
+ interface HTMLElementTagNameMap {
108
+ 'bds-tab': BdsTab;
109
+ }
110
+ }