@bk2k/ui 0.6.7 → 0.7.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 (487) hide show
  1. package/BUILDING.md +88 -2
  2. package/CHANGELOG.md +193 -0
  3. package/USAGE.md +102 -33
  4. package/custom-elements.json +1 -1
  5. package/dist/charts/chart-tokens.js +1 -1
  6. package/dist/charts/fields.d.ts +20 -0
  7. package/dist/charts/fields.js +27 -0
  8. package/dist/charts/frame.d.ts +2 -0
  9. package/dist/charts/frame.js +4 -2
  10. package/dist/clipboard.js +1 -0
  11. package/dist/components/bk-alert.js +2 -1
  12. package/dist/components/bk-avatar-group.js +4 -6
  13. package/dist/components/bk-avatar.d.ts +10 -0
  14. package/dist/components/bk-avatar.js +17 -0
  15. package/dist/components/bk-bar.js +2 -0
  16. package/dist/components/bk-button-group.js +1 -1
  17. package/dist/components/bk-button-top.js +2 -1
  18. package/dist/components/bk-button.d.ts +55 -17
  19. package/dist/components/bk-button.js +71 -24
  20. package/dist/components/bk-card.d.ts +4 -0
  21. package/dist/components/bk-card.js +15 -2
  22. package/dist/components/bk-carousel-controls.d.ts +2 -0
  23. package/dist/components/bk-carousel-controls.js +4 -2
  24. package/dist/components/bk-chart-area.d.ts +6 -0
  25. package/dist/components/bk-chart-bar.d.ts +63 -9
  26. package/dist/components/bk-chart-bar.js +152 -41
  27. package/dist/components/bk-chart-line.d.ts +13 -0
  28. package/dist/components/bk-chart-line.js +11 -1
  29. package/dist/components/bk-chip-group.d.ts +2 -2
  30. package/dist/components/bk-chip-group.js +4 -0
  31. package/dist/components/bk-chip.d.ts +53 -8
  32. package/dist/components/bk-chip.js +43 -7
  33. package/dist/components/bk-code.js +6 -2
  34. package/dist/components/bk-columns.d.ts +11 -0
  35. package/dist/components/bk-columns.js +8 -1
  36. package/dist/components/bk-combobox.d.ts +30 -6
  37. package/dist/components/bk-combobox.js +63 -20
  38. package/dist/components/bk-delta.d.ts +10 -0
  39. package/dist/components/bk-delta.js +8 -6
  40. package/dist/components/bk-dialog.d.ts +16 -6
  41. package/dist/components/bk-dialog.js +20 -8
  42. package/dist/components/bk-disclosure.js +4 -2
  43. package/dist/components/bk-drop-target.d.ts +7 -1
  44. package/dist/components/bk-drop-target.js +20 -4
  45. package/dist/components/bk-error-summary.d.ts +5 -0
  46. package/dist/components/bk-error-summary.js +13 -4
  47. package/dist/components/bk-facts-item.js +8 -6
  48. package/dist/components/bk-facts.d.ts +6 -4
  49. package/dist/components/bk-facts.js +22 -10
  50. package/dist/components/bk-footnote.d.ts +73 -0
  51. package/dist/components/bk-footnote.js +97 -0
  52. package/dist/components/bk-footnotes-item.d.ts +92 -0
  53. package/dist/components/bk-footnotes-item.js +139 -0
  54. package/dist/components/bk-footnotes.d.ts +51 -0
  55. package/dist/components/bk-footnotes.js +43 -0
  56. package/dist/components/bk-icon.js +2 -2
  57. package/dist/components/bk-image-compare.d.ts +33 -5
  58. package/dist/components/bk-image-compare.js +72 -24
  59. package/dist/components/bk-image-crop.d.ts +3 -3
  60. package/dist/components/bk-image-editor.d.ts +1 -1
  61. package/dist/components/bk-image-viewer.d.ts +107 -11
  62. package/dist/components/bk-image-viewer.js +205 -34
  63. package/dist/components/bk-input-inline.d.ts +15 -6
  64. package/dist/components/bk-input-inline.js +22 -6
  65. package/dist/components/bk-input-number.js +2 -1
  66. package/dist/components/bk-input-search.d.ts +1 -1
  67. package/dist/components/bk-input-search.js +2 -1
  68. package/dist/components/bk-input-text.d.ts +11 -0
  69. package/dist/components/bk-input-text.js +17 -3
  70. package/dist/components/bk-input-time-zone.d.ts +3 -0
  71. package/dist/components/bk-input-time.js +2 -1
  72. package/dist/components/bk-item.js +2 -1
  73. package/dist/components/bk-lightbox.d.ts +12 -3
  74. package/dist/components/bk-lightbox.js +6 -3
  75. package/dist/components/bk-link.d.ts +9 -1
  76. package/dist/components/bk-link.js +14 -4
  77. package/dist/components/bk-menu-item.d.ts +40 -0
  78. package/dist/components/bk-menu-item.js +57 -9
  79. package/dist/components/bk-menu-label.js +2 -1
  80. package/dist/components/bk-menu-list.d.ts +1 -0
  81. package/dist/components/bk-menu-list.js +10 -0
  82. package/dist/components/bk-menu.d.ts +8 -1
  83. package/dist/components/bk-menu.js +16 -5
  84. package/dist/components/bk-message-feedback.d.ts +4 -3
  85. package/dist/components/bk-message-feedback.js +7 -5
  86. package/dist/components/bk-message-list.js +2 -1
  87. package/dist/components/bk-message-source.d.ts +1 -2
  88. package/dist/components/bk-message-source.js +3 -11
  89. package/dist/components/bk-message.js +2 -0
  90. package/dist/components/bk-model-viewer.d.ts +12 -1
  91. package/dist/components/bk-model-viewer.js +15 -2
  92. package/dist/components/bk-nav-group.js +1 -1
  93. package/dist/components/bk-nav-item.d.ts +18 -0
  94. package/dist/components/bk-nav-item.js +18 -5
  95. package/dist/components/bk-nav.d.ts +1 -1
  96. package/dist/components/bk-page-cta.js +2 -0
  97. package/dist/components/bk-page-section.d.ts +1 -1
  98. package/dist/components/bk-page-section.js +3 -9
  99. package/dist/components/bk-pane.d.ts +1 -0
  100. package/dist/components/bk-pane.js +7 -5
  101. package/dist/components/bk-panel.d.ts +1 -1
  102. package/dist/components/bk-panel.js +6 -5
  103. package/dist/components/bk-period-nav.d.ts +102 -0
  104. package/dist/components/bk-period-nav.js +69 -0
  105. package/dist/components/bk-picture.d.ts +17 -4
  106. package/dist/components/bk-picture.js +8 -1
  107. package/dist/components/bk-segmented-item.d.ts +24 -4
  108. package/dist/components/bk-segmented-item.js +37 -5
  109. package/dist/components/bk-segmented.js +2 -13
  110. package/dist/components/bk-select-cascade.d.ts +1 -1
  111. package/dist/components/bk-select-tree.d.ts +1 -1
  112. package/dist/components/bk-select.d.ts +1 -1
  113. package/dist/components/bk-select.js +2 -1
  114. package/dist/components/bk-shell-app.d.ts +13 -6
  115. package/dist/components/bk-shell-app.js +47 -11
  116. package/dist/components/bk-shell-sites.d.ts +2 -1
  117. package/dist/components/bk-shell-sites.js +3 -5
  118. package/dist/components/bk-sortable.d.ts +3 -0
  119. package/dist/components/bk-sortable.js +10 -17
  120. package/dist/components/bk-split-grid.d.ts +104 -3
  121. package/dist/components/bk-split-grid.js +425 -2
  122. package/dist/components/bk-split.d.ts +3 -0
  123. package/dist/components/bk-split.js +3 -0
  124. package/dist/components/bk-stat-group.js +2 -1
  125. package/dist/components/bk-stat.d.ts +17 -0
  126. package/dist/components/bk-stat.js +7 -3
  127. package/dist/components/bk-steps.js +2 -1
  128. package/dist/components/bk-surface.d.ts +2 -0
  129. package/dist/components/bk-surface.js +6 -3
  130. package/dist/components/bk-table.d.ts +17 -13
  131. package/dist/components/bk-table.js +94 -15
  132. package/dist/components/bk-tabs-item.d.ts +45 -7
  133. package/dist/components/bk-tabs-item.js +51 -20
  134. package/dist/components/bk-tabs-panel.d.ts +6 -3
  135. package/dist/components/bk-tabs-panel.js +6 -0
  136. package/dist/components/bk-tabs.d.ts +50 -7
  137. package/dist/components/bk-tabs.js +168 -96
  138. package/dist/components/bk-text.js +2 -1
  139. package/dist/components/bk-toast-group.d.ts +3 -1
  140. package/dist/components/bk-toast-group.js +11 -1
  141. package/dist/components/bk-tooltip.d.ts +3 -1
  142. package/dist/components/bk-tooltip.js +2 -1
  143. package/dist/components/bk-video.js +2 -2
  144. package/dist/components/bk-zoom.d.ts +3 -1
  145. package/dist/components/confirm.d.ts +15 -0
  146. package/dist/components/confirm.js +27 -4
  147. package/dist/i18n/de.js +19 -1
  148. package/dist/i18n/en.d.ts +2 -0
  149. package/dist/i18n/en.js +3 -0
  150. package/dist/i18n.d.ts +23 -2
  151. package/dist/i18n.js +35 -4
  152. package/dist/icons/brands-static.d.ts +3 -0
  153. package/dist/icons/brands-static.js +5 -0
  154. package/dist/icons/core.d.ts +1 -0
  155. package/dist/icons/core.js +2 -0
  156. package/dist/icons/load-static.d.ts +3 -0
  157. package/dist/icons/load-static.js +5 -0
  158. package/dist/icons/load.js +1 -0
  159. package/dist/icons/registry.js +1 -1
  160. package/dist/icons/set/save-as.d.ts +3 -0
  161. package/dist/icons/set/save-as.js +7 -0
  162. package/dist/index.d.ts +4 -0
  163. package/dist/index.js +4 -0
  164. package/dist/internal/announcer.d.ts +8 -1
  165. package/dist/internal/announcer.js +26 -10
  166. package/dist/internal/backdrop.d.ts +19 -0
  167. package/dist/internal/backdrop.js +29 -0
  168. package/dist/internal/busy.d.ts +3 -2
  169. package/dist/internal/busy.js +4 -5
  170. package/dist/internal/choice-field.js +1 -1
  171. package/dist/internal/choice-item.d.ts +17 -6
  172. package/dist/internal/choice-item.js +20 -9
  173. package/dist/internal/cloak.d.ts +3 -0
  174. package/dist/internal/cloak.js +7 -0
  175. package/dist/internal/crop-frame.d.ts +1 -1
  176. package/dist/internal/crop-frame.js +2 -7
  177. package/dist/internal/date-field.js +2 -1
  178. package/dist/internal/drag.d.ts +11 -0
  179. package/dist/internal/drag.js +23 -0
  180. package/dist/internal/english-static.d.ts +3 -0
  181. package/dist/internal/english-static.js +5 -0
  182. package/dist/internal/english.d.ts +8 -0
  183. package/dist/internal/english.js +6 -0
  184. package/dist/internal/footnotes.d.ts +56 -0
  185. package/dist/internal/footnotes.js +143 -0
  186. package/dist/internal/handle-menu.d.ts +2 -3
  187. package/dist/internal/handle-menu.js +11 -3
  188. package/dist/internal/late/bk-shell-app.d.ts +4 -0
  189. package/dist/internal/late/bk-shell-app.js +7 -0
  190. package/dist/internal/late/bk-table.d.ts +4 -0
  191. package/dist/internal/late/bk-table.js +17 -0
  192. package/dist/internal/late/handle-menu.d.ts +4 -0
  193. package/dist/internal/late/handle-menu.js +9 -0
  194. package/dist/internal/late/static.d.ts +7 -0
  195. package/dist/internal/late/static.js +5 -0
  196. package/dist/internal/late.d.ts +20 -0
  197. package/dist/internal/late.js +45 -0
  198. package/dist/internal/link.d.ts +2 -0
  199. package/dist/internal/link.js +11 -1
  200. package/dist/internal/own-text.d.ts +8 -0
  201. package/dist/internal/own-text.js +7 -0
  202. package/dist/internal/scope.js +1 -1
  203. package/dist/internal/scroll-lock.d.ts +4 -1
  204. package/dist/internal/scroll-lock.js +17 -4
  205. package/dist/internal/slider.js +2 -1
  206. package/dist/internal/styles.js +3 -0
  207. package/dist/internal/submit.d.ts +23 -0
  208. package/dist/internal/submit.js +57 -0
  209. package/dist/jsx.d.ts +176 -56
  210. package/dist/reset.css +10 -0
  211. package/dist/standalone/all.js +226 -221
  212. package/dist/standalone/appearance.js +1 -1
  213. package/dist/standalone/bk-accordion-item.js +4 -4
  214. package/dist/standalone/bk-accordion.js +2 -2
  215. package/dist/standalone/bk-action-bar.js +3 -3
  216. package/dist/standalone/bk-alert-offline.js +1 -2
  217. package/dist/standalone/bk-alert.js +13 -12
  218. package/dist/standalone/bk-app-state.js +1 -1
  219. package/dist/standalone/bk-attachment.js +4 -4
  220. package/dist/standalone/bk-avatar-group.js +12 -10
  221. package/dist/standalone/bk-avatar.js +14 -4
  222. package/dist/standalone/bk-badge.js +2 -2
  223. package/dist/standalone/bk-bar.js +3 -1
  224. package/dist/standalone/bk-brand.js +3 -3
  225. package/dist/standalone/bk-breadcrumbs.js +5 -5
  226. package/dist/standalone/bk-button-copy.js +5 -5
  227. package/dist/standalone/bk-button-group.js +5 -5
  228. package/dist/standalone/bk-button-share.js +5 -5
  229. package/dist/standalone/bk-button-top.js +9 -8
  230. package/dist/standalone/bk-button.js +74 -34
  231. package/dist/standalone/bk-calendar-event.js +1 -1
  232. package/dist/standalone/bk-calendar-week.js +3 -3
  233. package/dist/standalone/bk-calendar.js +4 -4
  234. package/dist/standalone/bk-card.js +20 -7
  235. package/dist/standalone/bk-carousel-controls.js +7 -6
  236. package/dist/standalone/bk-carousel-item.js +2 -2
  237. package/dist/standalone/bk-carousel.js +1 -1
  238. package/dist/standalone/bk-chart-area.js +1 -1
  239. package/dist/standalone/bk-chart-bar-list.js +8 -8
  240. package/dist/standalone/bk-chart-bar.js +253 -166
  241. package/dist/standalone/bk-chart-bridge.js +7 -7
  242. package/dist/standalone/bk-chart-bullet.js +6 -6
  243. package/dist/standalone/bk-chart-calendar.js +7 -7
  244. package/dist/standalone/bk-chart-heatmap.js +7 -7
  245. package/dist/standalone/bk-chart-histogram.js +5 -5
  246. package/dist/standalone/bk-chart-legend.js +6 -6
  247. package/dist/standalone/bk-chart-line.js +116 -103
  248. package/dist/standalone/bk-chart-mark.js +1 -1
  249. package/dist/standalone/bk-chart-scatter.js +6 -6
  250. package/dist/standalone/bk-chart-sparkline.js +6 -6
  251. package/dist/standalone/bk-chart-stacked-bar.js +7 -7
  252. package/dist/standalone/bk-chart-tracker.js +6 -6
  253. package/dist/standalone/bk-chart-waterfall.js +6 -6
  254. package/dist/standalone/bk-checkbox-group.js +4 -4
  255. package/dist/standalone/bk-checkbox.js +4 -4
  256. package/dist/standalone/bk-chip-group.js +9 -5
  257. package/dist/standalone/bk-chip.js +56 -17
  258. package/dist/standalone/bk-cluster.js +1 -1
  259. package/dist/standalone/bk-code-diff.js +4 -4
  260. package/dist/standalone/bk-code-stack.js +4 -4
  261. package/dist/standalone/bk-code.js +10 -6
  262. package/dist/standalone/bk-color-panel.js +5 -5
  263. package/dist/standalone/bk-columns.js +13 -5
  264. package/dist/standalone/bk-combobox.js +53 -33
  265. package/dist/standalone/bk-command-menu.js +6 -6
  266. package/dist/standalone/bk-command-palette.js +6 -5
  267. package/dist/standalone/bk-composer.js +6 -6
  268. package/dist/standalone/bk-delta.js +11 -10
  269. package/dist/standalone/bk-diagram.js +1 -1
  270. package/dist/standalone/bk-dialog.js +1 -1
  271. package/dist/standalone/bk-disclosure.js +7 -5
  272. package/dist/standalone/bk-divider.js +2 -2
  273. package/dist/standalone/bk-drawer.js +3 -3
  274. package/dist/standalone/bk-drop-target.js +12 -6
  275. package/dist/standalone/bk-empty-state.js +3 -3
  276. package/dist/standalone/bk-error-summary.js +9 -6
  277. package/dist/standalone/bk-facts-item.js +10 -8
  278. package/dist/standalone/bk-facts.js +28 -16
  279. package/dist/standalone/bk-feature.js +3 -3
  280. package/dist/standalone/bk-fieldset.js +3 -3
  281. package/dist/standalone/bk-filter-bar.js +4 -4
  282. package/dist/standalone/bk-folder-browser.js +4 -4
  283. package/dist/standalone/bk-footnote.js +82 -0
  284. package/dist/standalone/bk-footnotes-item.js +122 -0
  285. package/dist/standalone/bk-footnotes.js +37 -0
  286. package/dist/standalone/bk-form-guard.js +2 -2
  287. package/dist/standalone/bk-form-steps.js +3 -3
  288. package/dist/standalone/bk-grid.js +1 -1
  289. package/dist/standalone/bk-icon-tile.js +3 -3
  290. package/dist/standalone/bk-icon.js +1 -1
  291. package/dist/standalone/bk-image-compare.js +88 -47
  292. package/dist/standalone/bk-image-crop.js +6 -6
  293. package/dist/standalone/bk-image-editor.js +2 -1
  294. package/dist/standalone/bk-image-viewer.js +180 -59
  295. package/dist/standalone/bk-input-code.js +4 -4
  296. package/dist/standalone/bk-input-color.js +4 -4
  297. package/dist/standalone/bk-input-date-range.js +2 -2
  298. package/dist/standalone/bk-input-date.js +2 -2
  299. package/dist/standalone/bk-input-file.js +5 -5
  300. package/dist/standalone/bk-input-group.js +4 -4
  301. package/dist/standalone/bk-input-inline.js +17 -10
  302. package/dist/standalone/bk-input-number.js +9 -8
  303. package/dist/standalone/bk-input-rating.js +6 -6
  304. package/dist/standalone/bk-input-rich.js +1 -1
  305. package/dist/standalone/bk-input-search.js +23 -22
  306. package/dist/standalone/bk-input-slider-range.js +5 -5
  307. package/dist/standalone/bk-input-slider.js +5 -5
  308. package/dist/standalone/bk-input-text.js +1 -1
  309. package/dist/standalone/bk-input-time-zone.js +1 -1
  310. package/dist/standalone/bk-input-time.js +29 -28
  311. package/dist/standalone/bk-item-group.js +3 -3
  312. package/dist/standalone/bk-item.js +12 -11
  313. package/dist/standalone/bk-kbd-shortcuts.js +4 -3
  314. package/dist/standalone/bk-kbd.js +68 -1
  315. package/dist/standalone/bk-lightbox.js +11 -7
  316. package/dist/standalone/bk-lines.js +1 -1
  317. package/dist/standalone/bk-link.js +33 -19
  318. package/dist/standalone/bk-listbox-columns.js +6 -6
  319. package/dist/standalone/bk-listbox-item.js +1 -1
  320. package/dist/standalone/bk-listbox-search.js +7 -7
  321. package/dist/standalone/bk-listbox-transfer.js +6 -6
  322. package/dist/standalone/bk-listbox.js +7 -7
  323. package/dist/standalone/bk-logo-wall.js +2 -2
  324. package/dist/standalone/bk-logo.js +3 -3
  325. package/dist/standalone/bk-menu-bar.js +3 -3
  326. package/dist/standalone/bk-menu-context.js +1 -1
  327. package/dist/standalone/bk-menu-divider.js +2 -2
  328. package/dist/standalone/bk-menu-item.js +73 -29
  329. package/dist/standalone/bk-menu-label.js +7 -6
  330. package/dist/standalone/bk-menu-list.js +10 -4
  331. package/dist/standalone/bk-menu.js +19 -10
  332. package/dist/standalone/bk-message-approval.js +4 -4
  333. package/dist/standalone/bk-message-branches.js +3 -3
  334. package/dist/standalone/bk-message-citation.js +10 -10
  335. package/dist/standalone/bk-message-feedback.js +10 -6
  336. package/dist/standalone/bk-message-list.js +6 -5
  337. package/dist/standalone/bk-message-reasoning.js +5 -5
  338. package/dist/standalone/bk-message-source.js +13 -21
  339. package/dist/standalone/bk-message-tool-group.js +5 -5
  340. package/dist/standalone/bk-message-tool.js +5 -5
  341. package/dist/standalone/bk-message.js +6 -4
  342. package/dist/standalone/bk-meter.js +3 -3
  343. package/dist/standalone/bk-model-viewer.js +1 -1
  344. package/dist/standalone/bk-nav-divider.js +2 -2
  345. package/dist/standalone/bk-nav-group.js +6 -6
  346. package/dist/standalone/bk-nav-item.js +31 -23
  347. package/dist/standalone/bk-nav-toc.js +3 -3
  348. package/dist/standalone/bk-nav.js +3 -3
  349. package/dist/standalone/bk-overflow.js +3 -3
  350. package/dist/standalone/bk-page-cta.js +5 -3
  351. package/dist/standalone/bk-page-footer-column.js +2 -2
  352. package/dist/standalone/bk-page-footer.js +3 -3
  353. package/dist/standalone/bk-page-header.js +3 -3
  354. package/dist/standalone/bk-page-hero.js +3 -3
  355. package/dist/standalone/bk-page-pager.js +5 -5
  356. package/dist/standalone/bk-page-section.js +6 -6
  357. package/dist/standalone/bk-pagination.js +6 -6
  358. package/dist/standalone/bk-pane.js +10 -9
  359. package/dist/standalone/bk-panel.js +9 -10
  360. package/dist/standalone/bk-period-nav.js +69 -0
  361. package/dist/standalone/bk-picture.js +24 -15
  362. package/dist/standalone/bk-popover-help.js +3 -3
  363. package/dist/standalone/bk-popover.js +2 -2
  364. package/dist/standalone/bk-presence-cursor.js +2 -2
  365. package/dist/standalone/bk-preview.js +4 -4
  366. package/dist/standalone/bk-progress.js +3 -3
  367. package/dist/standalone/bk-prose.js +3 -3
  368. package/dist/standalone/bk-qr-code.js +1 -1
  369. package/dist/standalone/bk-radio-group.js +4 -4
  370. package/dist/standalone/bk-radio.js +3 -3
  371. package/dist/standalone/bk-rating.js +5 -5
  372. package/dist/standalone/bk-scroll.js +3 -3
  373. package/dist/standalone/bk-segmented-item.js +40 -16
  374. package/dist/standalone/bk-segmented.js +15 -13
  375. package/dist/standalone/bk-select-cascade.js +3 -3
  376. package/dist/standalone/bk-select-tree.js +4 -4
  377. package/dist/standalone/bk-select.js +7 -6
  378. package/dist/standalone/bk-shell-app.js +1 -1217
  379. package/dist/standalone/bk-shell-centered.js +2 -2
  380. package/dist/standalone/bk-shell-sites.js +5 -7
  381. package/dist/standalone/bk-skeleton.js +2 -2
  382. package/dist/standalone/bk-sortable.js +58 -60
  383. package/dist/standalone/bk-spinner.js +2 -2
  384. package/dist/standalone/bk-split-grid.js +318 -41
  385. package/dist/standalone/bk-split.js +9 -6
  386. package/dist/standalone/bk-stack.js +1 -1
  387. package/dist/standalone/bk-stat-group.js +8 -7
  388. package/dist/standalone/bk-stat.js +11 -8
  389. package/dist/standalone/bk-status-dot.js +3 -3
  390. package/dist/standalone/bk-steps-item.js +5 -5
  391. package/dist/standalone/bk-steps.js +8 -7
  392. package/dist/standalone/bk-surface.js +1 -1
  393. package/dist/standalone/bk-swatch-group.js +4 -4
  394. package/dist/standalone/bk-swatch-palette.js +1 -1
  395. package/dist/standalone/bk-swatch.js +2 -2
  396. package/dist/standalone/bk-switch.js +4 -4
  397. package/dist/standalone/bk-table.js +1 -1887
  398. package/dist/standalone/bk-tabs-item.js +58 -35
  399. package/dist/standalone/bk-tabs-panel.js +7 -3
  400. package/dist/standalone/bk-tabs.js +160 -98
  401. package/dist/standalone/bk-tasks-item.js +4 -4
  402. package/dist/standalone/bk-tasks.js +2 -2
  403. package/dist/standalone/bk-testimonial.js +3 -3
  404. package/dist/standalone/bk-text.js +19 -18
  405. package/dist/standalone/bk-time-countdown.js +4 -4
  406. package/dist/standalone/bk-time-relative.js +3 -3
  407. package/dist/standalone/bk-timeline-item.js +4 -4
  408. package/dist/standalone/bk-timeline.js +2 -2
  409. package/dist/standalone/bk-toast-group.js +1 -1
  410. package/dist/standalone/bk-toast.js +4 -4
  411. package/dist/standalone/bk-toolbar.js +2 -2
  412. package/dist/standalone/bk-tooltip.js +8 -7
  413. package/dist/standalone/bk-tree-item.js +6 -6
  414. package/dist/standalone/bk-tree.js +3 -3
  415. package/dist/standalone/bk-video.js +6 -6
  416. package/dist/standalone/bk-visually-hidden.js +2 -2
  417. package/dist/standalone/bk-zoom.js +5 -5
  418. package/dist/standalone/chunks/announcer-D1zrRWwO.js +36 -0
  419. package/dist/standalone/chunks/{appearance-waHnV0kk.js → appearance-CBOJXbmC.js} +1 -1
  420. package/dist/standalone/chunks/{bk-alert-offline-BoMEYxnE.js → bk-alert-offline-Clw0ZSsH.js} +3 -3
  421. package/dist/standalone/chunks/{bk-carousel-B7-9OanA.js → bk-carousel-Biz7t8sL.js} +4 -4
  422. package/dist/standalone/chunks/{bk-diagram-CpOpicmo.js → bk-diagram-D_fQf6SF.js} +5 -5
  423. package/dist/standalone/chunks/{bk-dialog-a2BtUBf2.js → bk-dialog-DwZyUUHh.js} +65 -27
  424. package/dist/standalone/chunks/{bk-icon-DssFsNuB.js → bk-icon-Bp_flKdv.js} +4 -3
  425. package/dist/standalone/chunks/{bk-image-editor-z_Uj83fy.js → bk-image-editor-BADsoLRL.js} +5 -5
  426. package/dist/standalone/chunks/{bk-input-date-range-BQkbPlSJ.js → bk-input-date-range-DHcJ8-5g.js} +2 -2
  427. package/dist/standalone/chunks/{bk-input-rich-Dte_b4Ev.js → bk-input-rich-CFhW6vRa.js} +6 -6
  428. package/dist/standalone/chunks/{bk-input-text-CUNQG1ah.js → bk-input-text-DviyLBqj.js} +63 -54
  429. package/dist/standalone/chunks/{bk-model-viewer-D1XJPgAG.js → bk-model-viewer-w_Ah4Tvs.js} +22 -8
  430. package/dist/standalone/chunks/{bk-qr-code-CbI9rdOK.js → bk-qr-code-CYMovNVl.js} +3 -3
  431. package/dist/standalone/chunks/bk-shell-app-B2lxHit8.js +1235 -0
  432. package/dist/standalone/chunks/{bk-surface-DkIhrWMt.js → bk-surface-D7e0tErs.js} +9 -7
  433. package/dist/standalone/chunks/{bk-swatch-palette-BNNXTP3w.js → bk-swatch-palette-x13JgJQi.js} +6 -6
  434. package/dist/standalone/chunks/bk-table-CP8n_jy7.js +1944 -0
  435. package/dist/standalone/chunks/{bk-toast-group-Cix-Urgi.js → bk-toast-group-CoL6W7uk.js} +27 -24
  436. package/dist/standalone/chunks/{brush-Bn3lPdHN.js → brush-DALmXSru.js} +18 -2
  437. package/dist/standalone/chunks/{busy-B7Mxemwm.js → busy-BUB22mGY.js} +5 -4
  438. package/dist/standalone/chunks/{chart-tokens-D1Exf7BW.js → chart-tokens-DQ4hVSmn.js} +2 -2
  439. package/dist/standalone/chunks/{choice-field-BnuK9mp_.js → choice-field-poOTerh1.js} +6 -6
  440. package/dist/standalone/chunks/{choice-item-B6-9ZRlf.js → choice-item-Cx-nm1js.js} +17 -8
  441. package/dist/standalone/chunks/clipboard-RqIeP9Uz.js +29 -0
  442. package/dist/standalone/chunks/clipboard-UVLSkL4C.js +34 -0
  443. package/dist/standalone/chunks/{crop-frame-poLCGrBG.js → crop-frame-Z9N0QML4.js} +1 -11
  444. package/dist/standalone/chunks/{date-field-BQ5k-DDL.js → date-field-B-fCXa2D.js} +48 -47
  445. package/dist/standalone/chunks/{define-CzVPD4Zi.js → define-DkVeu7e9.js} +1 -1
  446. package/dist/standalone/chunks/drag-DT4__0t9.js +12 -0
  447. package/dist/standalone/chunks/footnotes-BeisMxLk.js +94 -0
  448. package/dist/standalone/chunks/{form-control-D7dqSP9M.js → form-control-CHpfKAKa.js} +2 -2
  449. package/dist/standalone/chunks/{frame-BW1nKuoM.js → frame-xIMVEUCi.js} +7 -4
  450. package/dist/standalone/chunks/handle-menu-BgYUbGO2.js +56 -0
  451. package/dist/standalone/chunks/{heading-text-CV5gBf7k.js → heading-text-CgnCa_q2.js} +1 -1
  452. package/dist/standalone/chunks/{i18n-CNsBRNPu.js → i18n-DFfGgd3d.js} +56 -34
  453. package/dist/standalone/chunks/{i18n-CrZgrRu9.js → i18n-DQAcbHkY.js} +1 -1
  454. package/dist/standalone/chunks/link--YWr8exL.js +69 -0
  455. package/dist/standalone/chunks/{marks-CdqbbJpM.js → marks-pOUDNUf1.js} +2 -2
  456. package/dist/standalone/chunks/{options-DMEc8rQt.js → options-BdC8-KKM.js} +2 -2
  457. package/dist/standalone/chunks/own-text-mpZVnMyX.js +5 -0
  458. package/dist/standalone/chunks/{palettes-CKLHSIPx.js → palettes-J4bQ21ks.js} +2 -2
  459. package/dist/standalone/chunks/{popover-base-oDhxsYMr.js → popover-base-hxo-Vh6E.js} +2 -2
  460. package/dist/standalone/chunks/{prose-BG4oQH-i.js → prose-BiuJgiah.js} +1 -1
  461. package/dist/standalone/chunks/{ramp-EclrETaQ.js → ramp-CGDOcqBZ.js} +1 -1
  462. package/dist/standalone/chunks/save-as-DBGZjczB.js +6 -0
  463. package/dist/standalone/chunks/shortcuts-DPxCSO4M.js +210 -0
  464. package/dist/standalone/chunks/{slider-BWT8Fmwz.js → slider-jp3d-Ld-.js} +15 -14
  465. package/dist/standalone/chunks/{stars-BN9M_9Q1.js → stars-BgKEjDQx.js} +1 -1
  466. package/dist/standalone/chunks/{styles-DwSR-9a3.js → styles-CaeyhYDA.js} +3 -0
  467. package/dist/standalone/chunks/submit-BjBGB8OW.js +42 -0
  468. package/dist/standalone/chunks/{summary-BwL-Gp8w.js → summary-W5s0TFqV.js} +1 -1
  469. package/dist/standalone/chunks/{text-field-CTp2b-Ai.js → text-field-CqhJSAwZ.js} +4 -4
  470. package/dist/standalone/chunks/{toggle-control-DXkgmz7R.js → toggle-control-lvZbQtGW.js} +2 -2
  471. package/dist/standalone/chunks/{tokens-BuahF1lF.js → tokens-C_ul7pL9.js} +4 -3
  472. package/dist/standalone/chunks/{virtual-B-1oN14Y.js → virtual-C_h6sHnm.js} +1 -1
  473. package/dist/standalone/confirm.js +27 -14
  474. package/dist/standalone/i18n-de.js +20 -2
  475. package/dist/standalone/icons.js +100 -98
  476. package/dist/standalone/links.js +1 -1
  477. package/dist/standalone/reset.css +10 -0
  478. package/dist/standalone/toast.js +1 -1
  479. package/dist/standalone/tokens.css +9 -5
  480. package/dist/tokens.css +9 -5
  481. package/dist/tokens.js +4 -3
  482. package/package.json +25 -2
  483. package/dist/standalone/chunks/announcer-haFcvqbe.js +0 -25
  484. package/dist/standalone/chunks/bk-kbd-B7bz8hmV.js +0 -275
  485. package/dist/standalone/chunks/clipboard-DBGdJ-1S.js +0 -61
  486. package/dist/standalone/chunks/handle-menu-DsxWvv4D.js +0 -22
  487. package/dist/standalone/chunks/link-CWSMsx04.js +0 -60
package/USAGE.md CHANGED
@@ -23,6 +23,31 @@ import "@bk2k/ui/i18n/de.js"; // the German texts, for an app in German
23
23
  `import "@bk2k/ui"` (the whole library) still contains every icon.
24
24
  - **German.** A page in German without `@bk2k/ui/i18n/de.js` shows English texts and logs a warning with the line to
25
25
  add. `import "@bk2k/ui"` still contains German.
26
+ - **A bundle without code splitting** (one file for each page, for example an embedded web UI on a device with little
27
+ storage). Such a bundler puts each late load into the file: every icon, the elements of all optional features, and
28
+ the English texts. Build with the condition `bk-static` to remove them:
29
+
30
+ ```sh
31
+ esbuild page.js --bundle --minify --format=esm --conditions=bk-static
32
+ ```
33
+
34
+ Vite: `resolve: { conditions: ["bk-static", ...defaultClientConditions] }` (import `defaultClientConditions` from
35
+ `vite`). Rollup: `nodeResolve({ exportConditions: ["bk-static"] })`. webpack: `resolve.conditionNames`. The condition
36
+ selects other modules in the `imports` of the package. Without the condition, nothing changes. With it, the app
37
+ imports what the package does not load:
38
+
39
+ ```ts
40
+ import "@bk2k/ui/icons/home.js"; // each icon that the markup names
41
+ import "@bk2k/ui/bk-checkbox.js"; // each element of a feature in use (here: <bk-table selection="multiple">)
42
+ import "@bk2k/ui/i18n/de.js"; // each language of the app, English too ("@bk2k/ui/i18n/en.js")
43
+ ```
44
+
45
+ - A name without an icon import logs a warning and shows no icon. The icons that an element draws itself stay.
46
+ - A feature whose element no code defines logs a warning with the line to add, and the feature does not show. For
47
+ example, `bk-table` needs `bk-checkbox` for `selection`, and `bk-shell-app` needs `bk-drawer` on a narrow screen.
48
+ - English is not built in. A text that no loaded catalog contains shows its key and logs a warning.
49
+ - The brand marks (`github`, `linux`, …) are not registered. Register the marks that the page uses:
50
+ `registerIcons({ github: brandIcons.github })`, with `brandIcons` from `@bk2k/ui/icons/brands.js`.
26
51
  - **Pages without a bundler** load `icons.js` and `i18n-de.js` from `dist/standalone/` the same way.
27
52
  - **Use 0.6.1 or later.** In 0.6.0 a bundler (Vite, Rollup, webpack) removes the icons of the elements and the German
28
53
  texts.
@@ -218,7 +243,8 @@ scroll: its header and sidebar stay in view while the page moves. Print needs th
218
243
  put the whole page on paper. Do not set `html, body { overflow: hidden; height: 100% }` in the CSS of the
219
244
  app: the page then cannot scroll and its end is cut off. An app that must not scroll the document puts its
220
245
  content into a workspace. A `bk-pane` (or a `bk-split`, `bk-columns`) as the main content fills the viewport
221
- and scrolls inside.
246
+ and scrolls inside. A `bk-columns` that flows (a narrow shell, or columns narrower than `stack-above`) makes the
247
+ shell a page again: the document scrolls (`:state(flow)`).
222
248
 
223
249
  ## Pages without a bundler
224
250
 
@@ -374,12 +400,13 @@ import type { BkCombobox } from "@bk2k/ui/bk-combobox.js";
374
400
 
375
401
  ### Attributes that change the server HTML
376
402
 
377
- React warns in hydration when an element changed the HTML of the server before. The elements do not change the attributes of
378
- their hosts. A state that the element finds itself is a custom state (`bk-shell-app:state(sections)`,
379
- `bk-table:state(cards)`), not an attribute.
403
+ React warns in hydration when an element changed the HTML of the server before. Most elements do not change the
404
+ attributes of their hosts or of the children of the app. A state that the element finds itself is a custom state
405
+ (`bk-shell-app:state(sections)`, `bk-table:state(cards)`, `bk-segmented-item:state(checked)`), not an attribute.
406
+ BUILDING.md ("Server rendering and hydration") lists the elements that still write attributes, and when.
380
407
 
381
408
  - `bk-shell-app` measures its width and its content. It shows the result as the custom states `:state(narrow)`,
382
- `:state(aside-overlay)`, `:state(workspace)` and `:state(sections)`. Select `bk-shell-app:state(narrow)` in the CSS
409
+ `:state(aside-overlay)`, `:state(workspace)`, `:state(sections)` and `:state(flow)`. Select `bk-shell-app:state(narrow)` in the CSS
383
410
  of the app, not `bk-shell-app[narrow]`.
384
411
  - The shell sets the properties `collapsed` and `drawer` on the navs and brands in its sidebar and drawer. A `bk-nav`
385
412
  shows them as `:state(collapsed)` and `:state(drawer)`. The shell writes no attribute on them.
@@ -434,6 +461,8 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
434
461
  - Write an attribute with its name and its values (`variant="solid"`, `sticky-header`). React 19 sets a
435
462
  property when the element has a property of that name. Set data with the property (`rows={rows}`,
436
463
  `data={points}`, `renderRow={fn}`). A `ref` has the type of the element class.
464
+ - Write `prefix` text with the property `prefixText` (`prefixText="€"`). `prefix` is a read-only member of every
465
+ element: React sets it as a property, and the browser throws an error. The types do not have `prefix`.
437
466
  - Listen to an event with `on` and its exact name: `onchange`, `onselect`, `ontoggle`, `onsort`. The handler receives
438
467
  the native event (`event.detail`), also for an event that does not bubble.
439
468
  - `onChange` and `onInput` work too, but they receive a synthetic event without `detail`. `onSelect`,
@@ -447,23 +476,24 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
447
476
  | Tag | For |
448
477
  |---|---|
449
478
  | `bk-app-state` | root of an app; contains the central state store (the UI state of the components below and the app data); one adapter persists it (`localStorage` by default); see [State](#state); `persist-scope="url"` on an element with `persist-key` stores its entry in the query string; `urlAdapter({ keys })` does this for chosen keys |
450
- | `bk-shell-app` | app frame; slots `header`/`header-end`/`nav`/`sidebar`/`sidebar-header`/`sidebar-footer`/`aside`/`statusbar`/`banner` (a `bk-alert banner` or a `bk-shell-sites`)/`footer`; one flat surface with a line between the regions and no frame around the page; with a top nav and no sidebar it is also the frame of a public site; the global `--bk-app-*` tokens style it. Header: the header is `--bk-height-header` high; below the breakpoint it is the optional `--bk-height-header-narrow` high (a site sets a higher header on wide screens); a shell without header content shows no header; any `data-sidebar-toggle` element is the toggle. When the header does not fit: first a header search becomes narrower, down to `--bk-measure-min`; then header items with `data-header-priority="N"` are hidden (lowest first); then the `nav` moves into the drawer; hidden header items do not move into the drawer, so add a copy in the `drawer` slot if a narrow screen needs them; the shell measures again when the content of the header changes. Page modes: page mode needs the document to scroll (no `overflow: hidden` on `html`/`body`); the default is a page; it is a page of sections when the main content is only `bk-page-section`s and `bk-page-hero`s (no page padding, because the sections have it; custom state `:state(sections)`); it is a workspace (fills the viewport) when the main content is a `bk-pane`/`bk-split`/`bk-columns`. Features: collapsible rail (`sidebar-collapsed`, `persist-key`); mobile drawer; `aside-open` (+ `data-aside-toggle`); `aside-resizable` (drag, arrow keys, or a click on the inner edge for a menu of Wider/Narrower/Reset, between `--bk-app-aside-min` and `--bk-app-aside-max`; `aside-width`; persisted; fires `resize` with `detail.sizes` `[main, aside]`). Search: a `data-header-search` field in `header` (after the brand) or in `header-end` (before the end controls) collapses to an icon below the breakpoint (open: a full header row, Cancel, `search-scopes` slot); `search-shortcut` (default `Mod+K`, `none` turns it off) sets the focus in the field and opens it on a narrow screen; `<bk-kbd slot="end" shortcut="header-search">` in the field shows the keys. Other: `<bk-page-header snap>` shows its heading in the header when it scrolls out of view; `transitions` + `transition()` cross-fade the content; safe areas (`--bk-safe-*`, `viewport-fit=cover`) keep the regions out of the notch and the home bar; `nav-placement="bottom"` shows the `nav` items as a bar at the bottom of a phone (icon above label, 3–5 items; the drawer contains the other items); `nav-placement="below"` shows the `nav` in a second row of the header (`--bk-height-header-nav`; if unset, it is as high as the header band; `--bk-shell-app-sticky-top` includes it); the knob `--bk-app-nav-align: center` centres the `nav` in the header |
479
+ | `bk-shell-app` | app frame; slots `header`/`header-end`/`nav`/`sidebar`/`sidebar-header`/`sidebar-footer`/`aside`/`statusbar`/`banner` (a `bk-alert banner` or a `bk-shell-sites`)/`footer`; one flat surface with a line between the regions and no frame around the page; with a top nav and no sidebar it is also the frame of a public site; the global `--bk-app-*` tokens style it. Header: the header is `--bk-height-header` high; below the breakpoint it is the optional `--bk-height-header-narrow` high (a site sets a higher header on wide screens); a shell without header content shows no header; any `data-sidebar-toggle` element is the toggle. When the header does not fit: first a header search becomes narrower, down to `--bk-measure-min`; then header items with `data-header-priority="N"` are hidden (lowest first); then the `nav` moves into the drawer; hidden header items do not move into the drawer, so add a copy in the `drawer` slot if a narrow screen needs them; the shell measures again when the content of the header changes. Page modes: page mode needs the document to scroll (no `overflow: hidden` on `html`/`body`); the default is a page; it is a page of sections when the main content is only `bk-page-section`s and `bk-page-hero`s (no page padding, because the sections have it; custom state `:state(sections)`); it is a workspace (fills the viewport) when the main content is a `bk-pane`/`bk-split`/`bk-columns`; a `bk-columns` that flows (a narrow shell) makes it a page again (`:state(flow)`). Features: collapsible rail (`sidebar-collapsed`, `persist-key`); mobile drawer; `aside-open` (+ `data-aside-toggle`); `aside-resizable` (drag, arrow keys, or a click on the inner edge for a menu of Wider/Narrower/Reset, between `--bk-app-aside-min` and `--bk-app-aside-max`; `aside-width`; persisted; fires `resize` with `detail.sizes` `[main, aside]`). Search: a `data-header-search` field in `header` (after the brand) or in `header-end` (before the end controls) collapses to an icon below the breakpoint (open: a full header row, Cancel, `search-scopes` slot); `search-shortcut` (default `Mod+K`, `none` turns it off) sets the focus in the field and opens it on a narrow screen; `<bk-kbd slot="end" shortcut="header-search">` in the field shows the keys. Other: `<bk-page-header snap>` shows its heading in the header when it scrolls out of view; `transitions` + `transition()` cross-fade the content; safe areas (`--bk-safe-*`, `viewport-fit=cover`) keep the regions out of the notch and the home bar; `nav-placement="bottom"` shows the `nav` items as a bar at the bottom of a phone (icon above label, 3–5 items; the drawer contains the other items); `nav-placement="below"` shows the `nav` in a second row of the header (`--bk-height-header-nav`; if unset, it is as high as the header band; `--bk-shell-app-sticky-top` includes it); the knob `--bk-app-nav-align: center` centres the `nav` in the header |
451
480
  | `bk-shell-sites` | a dark row of links to the other sites of an organisation, in the `banner` slot of `bk-shell-app`; the links are plain `<a>` elements, the current site has `aria-current="page"`, tools and the account are in the `end` slot; one line as wide as the header; it scrolls sideways when the links do not fit; `label` (default i18n `sites`) |
452
481
  | `bk-shell-centered` | frame of a page with one task (sign in, onboarding, error page): `header`, centred content, `footer`, and an optional `media` slot beside the content from 900px up; the global `--bk-app-*` tokens style it |
453
- | `bk-nav` + `bk-nav-item` + `bk-nav-group` + `bk-nav-divider` | app navigation; an item with `href` is a link, an item without `href` is a button for an action. A nested collapsible group is a plain menu group (`--bk-nav-group-bg`, `-shadow`, `-padding`, `-inset`, `-spacing` set a surface for it). A row sets the colour under it for its content (`--bk-ground-tint`, read by `bk-badge`). Layout: vertical (sidebar, or rail with tooltips and flyouts) or `orientation="horizontal"` (tab row, groups as dropdowns; `variant` marks the current item: `underline`, `pills`, `solid`, `text`). Items: `current`, `count`, `icon`; the `description` of an item is a second line; its `actions` slot shows on hover and focus. Groups: groups nest (a sub-tree; in a rail one button with the whole tree in its flyout); a group has `href`/`current` (the name is a link, a separate chevron opens it), `count`, an `end` slot (a summary of what a closed group contains) and `actions`. `bk-nav-divider` is a decorative hairline between zones. In a horizontal nav, a group with a `panel` slot is a mega menu (a wide panel that opens on hover, one open at a time; a sub-tree in the drawer) |
482
+ | `bk-nav` + `bk-nav-item` + `bk-nav-group` + `bk-nav-divider` | app navigation; an item with `href` is a link, an item without `href` is a button for an action. A nested collapsible group is a plain menu group (`--bk-nav-group-bg`, `-shadow`, `-padding`, `-inset`, `-spacing` set a surface for it). A row sets the colour under it for its content (`--bk-ground-tint`, read by `bk-badge`). Layout: vertical (sidebar, or rail with tooltips and flyouts) or `orientation="horizontal"` (tab row, groups as dropdowns; `variant` marks the current item: `underline`, `pills`, `solid`, `text`). Items: `current`, `count`, `icon`; the `description` of an item is a second line; `hint` is a tooltip on hover and keyboard focus and the accessible description (in the rail under the label; never on touch, so put needed information into `description`); a link with `target="_blank"` shows the `external` icon and says "(opens in a new tab)", like `bk-link` and `bk-menu-item`; its `actions` slot shows on hover and focus. Groups: groups nest (a sub-tree; in a rail one button with the whole tree in its flyout); a group has `href`/`current` (the name is a link, a separate chevron opens it), `count`, an `end` slot (a summary of what a closed group contains) and `actions`. `bk-nav-divider` is a decorative hairline between zones. In a horizontal nav, a group with a `panel` slot is a mega menu (a wide panel that opens on hover, one open at a time; a sub-tree in the drawer) |
454
483
  | `bk-text` | text in a type register: `variant` (body, small, caption, lead, eyebrow, h3 … display), `muted`, `tone`, `mono`, `tabular`; `overflow` (`ellipsis` shows one line with an ellipsis, `ellipsis="start"` shows the end of a path; `lines` with `lines="3"`; `nowrap`; `pre` shows typed line breaks); `expandable` (a "Show more" button for text cut at `lines`; `expanded`, `toggle`); `highlight` (marks matches in `<mark>`, case and accent insensitive). `variant="inherit"` uses the type of the parent: `<bk-text variant="inherit" muted>` is the muted second half of a two-tone heading (in the `heading` slot of `bk-page-hero` or `bk-page-section`). With `level` it is a heading. An icon, spinner or status dot in `start` is before the text |
455
484
  | `bk-icon-tile` | icon on a small filled square (page header, card header, stat, row): `icon`, `tone`, `variant` soft/solid/outline (`outline` has a `--bk-line` hairline, no fill, and the icon in the colour of the tone), `size` |
456
- | `bk-facts` + `bk-facts-item` | list of label and value pairs in columns (`min`); `wide` makes an item use a full row; `layout="rows"` shows the label, the value and the `actions` slot of each item on one line (a summary list; name each action with its row) |
485
+ | `bk-facts` + `bk-facts-item` | list of label and value pairs in columns (`min`); `wide` makes an item use a full row; `layout="rows"` shows the label, the value and the `actions` slot of each item on one line, with one label column as wide as the widest label up to `--bk-facts-label-width` (a summary list; name each action with its row); `data-type="number"` on an item aligns its value at the end |
486
+ | `bk-footnote` + `bk-footnotes` + `bk-footnotes-item` | footnotes and source references: `<bk-footnote note="cpi">` is a raised, numbered link in the text ("up to 155 €¹"); `<bk-footnotes-item id="cpi">` is the note (the source text, `href` for a link that shows the host, `date` as `YYYY`, `YYYY-MM` or `YYYY-MM-DD` for "As of Nov 2026") in a `<bk-footnotes>` list at the end of the content or in the footer. Each list numbers its notes in the order of their first marker on the screen, also markers in slots and shadow roots (`bk-stat` `label`/`value` slots, `bk-facts-item`, `bk-table` cells). Several markers can refer to one note: the note has a back link to each (a, b, …). A click moves the focus to the target and marks it (`:state(target)`). The browser sets the numbers: the HTML of a server has none. A marker without a note shows nothing |
457
487
  | `bk-page-section` | a band of a page: edge to edge, with background and line, and the content in a shared width (`narrow`/`default`/`wide`/`full`). `prose` is a reading column of `--bk-measure-prose` at the body font size, as long as the lines of `bk-prose`; use it for a legal page or an article, where the head, a notice and the text share one column. Head: a head above the content with `heading` + `level`, `description` (lead), the `eyebrow` slot and `actions` at the end of the row. Space: `size="sm\|md\|lg"` sets the space above and below (`sm`: a short band, for example a legal row, a row of logos or results under a filter bar; `lg`: a larger band); a section after a section or a `bk-page-hero` on the same background has no space above; a section with a head starts a new topic and has its full space above the head (`--bk-page-section-joined-space` sets a smaller space). Aside: an `aside` slot beside the content with `aside-position="start\|end"` (`end`: a table of contents beside an article; the aside is wider than the content width; `--bk-page-section-aside-outset: 0px` sets it inside the content width, so a tool page has the same edges as the other bands; the app sets the aside size of a page with component tokens in a class of its bridge file, for example a tool page class with `--bk-page-section-aside-outset: 0px`, so tool pages and reading pages with a table of contents can both exist). Alignment: `align="start\|center"` (default `start`); `center` centres the head, the text, the wrapped rows of a `bk-cluster`, the items of a `bk-stack`, all rows of a `bk-stat`, and the quote mark, the quote and the person of a `bk-testimonial` (a block outside a stack, for example a table or a grid of cards, has the full width); centred rows come from a centred band or from the containers that centre (`bk-page-hero`, `bk-empty-state`, `bk-shell-centered`); an end-aligned sum or footnote is the `end` slot of a `bk-bar`. Other: `sticky` fixes a band (tabs, toolbar) below the header; `divider` draws a hairline below the band (`--bk-page-section-divider` sets the colour; a sticky band also has it). `layout="split"` shows the head in a start column (`--bk-page-section-split-head-width`, about one third) and the content in the end column; below `--bk-page-section-split-breakpoint` (default `--bk-width-narrow`) the head is above the content; an `aside` is beside the content in the end column. The footer of the app shell is a `bk-page-footer` or sections |
458
488
  | `bk-page-hero` | the opening band of a page: `width="narrow\|default\|wide\|prose\|full"` as on `bk-page-section` (`prose`: a reading column); slots `eyebrow`, `heading` (or `heading` + `level`, default 1), lead text, `actions`, `proof` (small proof points under the actions, each a short text with a small icon, in a row that wraps) and `media`; `align="center\|start"` (centred: the media is below the actions and has the content width, at most `--bk-page-hero-media-max-width`; a block such as a `bk-card` preview uses this width, and an image with its own width is centred); `--bk-page-hero-bg` sets the glow |
459
489
  | `bk-page-footer` + `bk-page-footer-column` | the footer of a site, in the `footer` slot of `bk-shell-app`: a band in the widths of `bk-page-section` (`width`; its edges are the same as the edges of the sections), `layer` for a background. Slots: `brand` (the start column: brand, a short text, a form); the default slot for `bk-page-footer-column`s (a `heading`, `level`, and quiet links; each column is a navigation named by its heading); the legal row under a hairline: `legal` (copyright, at the start), `notes` (short quiet notes after it), `legal-end` (legal links at the end, a navigation, `legal-label`, i18n `footerLegal`). The gaps separate the items; there are no separator characters. Below 40rem the brand uses the full width, the columns form rows with as many columns as fit `--bk-page-footer-column-min` (two on a phone), and the legal row stacks: copyright, notes, legal links |
460
490
  | `bk-page-cta` | narrow centred call-to-action box: `heading`, text, `actions` slot; `variant="card"` (default; a surface from the raised layer, `--bk-page-cta-bg`) or `variant="plain"` (no background, border or shadow; on the canvas or in a tinted `bk-page-section` band) |
461
491
  | `bk-brand` | app name with its mark (`start` slot), a link with `href`; in the rail of a collapsed `bk-shell-app` only the mark shows; add `translate="no"` to stop a page translator from changing the name |
462
492
  | `bk-panel` | pane frame for workspaces: heading, actions, toolbar, a body that scrolls on its own, footer, collapsible strip; in a `bk-split`, a collapsible panel collapses automatically while the `data-min` of the open panes do not fit, and opens again when they fit; `busy` shows a veil over the panel and blocks it while it reloads |
463
- | `bk-columns` | page of independently scrolling columns (`start` / default / `end` slots); the columns stack on narrow screens |
493
+ | `bk-columns` | page of independently scrolling columns (`start` / default / `end` slots); the columns stack on narrow screens; directly in `bk-shell-app` they flow in the document while the shell is narrow, and the shell is then a page |
464
494
  | `bk-pane` | uses the full size of its container: the `header`/`footer` regions stay in view, and the content scrolls or fills the rest (`bk-split`, `bk-tabs`, another pane); in a workspace `bk-shell-app` it is the page; `busy` shows a veil over the pane and blocks it while it reloads |
465
495
  | `bk-split` | resizable panes (`sizes`, `data-min`, `data-max`, `data-collapsible` (`="toggle"`: opens only through `toggle()`, no divider while closed), `data-keep-size` (keeps its px while the split resizes), `persist-key`); dividers that resize by keyboard (a click opens a menu of 25/50/75 %, collapse and reset, so no drag is needed); `orientation="auto"`; `float-below`: an end pane floats and closes on Escape or a press beside it; `toggle(pane)`, `release(pane)`; `stack-below` + `show="list\|detail"`: one pane at a time on a compact width, with a Back button (fires `change` with `detail.show`) |
466
- | `bk-split-grid` | panes of equal rank that fill it side by side, as a tiling window manager (conversations, documents, logs); each pane scrolls inside. Layout: as many columns as fit at `min`; `cols`/`rows`; an `areas` template ("a b, a c"; the app switches layouts by setting it). Resize: resizable columns and rows (`sizes`, `default-sizes`, `row-sizes`, `default-row-sizes`, `min-row`, `persist-key`); a divider runs only where two panes meet. A pane with `data-zoomed` fills the split; `leave(panes)` fades out; `stack-below`. For cards on a scrolling page, use `bk-grid` or `bk-sortable orientation="grid"` |
496
+ | `bk-split-grid` | panes of equal rank that fill it side by side, as a tiling window manager (conversations, documents, logs); each pane scrolls inside. Layout: as many columns as fit at `min`; `cols`/`rows`; an `areas` template ("a b, a c"; the app switches layouts by setting it). Resize: resizable columns and rows (`sizes`, `default-sizes`, `row-sizes`, `default-row-sizes`, `min-row`, `persist-key`); a divider runs only where two panes meet. Move: a `data-split-grid-handle` in a pane (a header) drags the pane; a drop on another pane fires the cancelable `reorder` (`detail` `{ pane, from, to, order }`, the app renders the order); outside the grid `dragoutside` (each frame, `inside: true` at the end) and `dropoutside`; Escape cancels; a focusable handle moves with Space and the arrow keys. A pane with `data-zoomed` fills the split; `leave(panes)` fades out; `stack-below`. For cards on a scrolling page, use `bk-grid` or `bk-sortable orientation="grid"` |
467
497
  | `bk-sortable` | reorders its children by pointer drag or keyboard (Space, arrows, Space; announced); handles (`data-sortable-handle`; a click on one opens a menu of moves, so no drag is needed); `orientation` vertical/horizontal/grid; `group` moves items between lists; items with `data-sortable-disabled` do not move; cancelable `reorder` `{ item, from, to, fromList, toList }`; the app renders again (or uses `move` for static markup) |
468
498
  | `bk-stack` | vertical layout, spaced by the global `--bk-space-flow` (no gap per element) |
469
499
  | `bk-lines` | lines that belong together (a caption over its content), spaced by `--bk-space-lines` |
@@ -474,16 +504,16 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
474
504
  | `bk-page-header` | page title with `eyebrow`, `description`, and slots `breadcrumbs`/`badges`/`meta`/`actions`; `snap` sets `collapsed` and fires `toggle` when the header scrolls out of view (a shell shows the heading in its header) |
475
505
  | `bk-breadcrumbs` | `<a>` children make a breadcrumb nav, and the last item is the current page; `<button>` children make a trail inside the page (a folder browser) |
476
506
  | `bk-folder-browser` | browses a folder tree: a trail of buttons, `places` to jump to, the `folders` of `path` as a menu list; the app controls the tree (cancelable `navigate` `{ path }`, then the app sets `path` and `folders`); `/` and `C:\` paths (`pathSteps()`); `empty` slot |
477
- | `bk-tabs` + `bk-tabs-item` + `bk-tabs-panel` | tabs paired by `value`; tabs that do not fit move into a "More" menu; `removable` on an item shows a close button and fires `remove` (Delete too); `addable` shows a plus button that fires `add` (saved views: the app asks for a name and appends an item); `variant="pills"`; `orientation="vertical"` (the tabs fill the width, a `dot` is before the label, the `count` is at the end of the row, so the counts have the same end edge); tabs with `href` become a link nav; a user switch first fires a cancelable `select` (cancel it to stay on the tab), then `change` (not cancelable) |
478
- | `bk-button` | button or link (`href`); `variant` (solid/soft/outline/ghost/quiet) × `tone` (neutral/accent/info/success/warning/danger); `type="submit"` works in forms; `type="file"` (+ `accept`, `multiple`) opens the file dialog, then sets `files` and fires `change`; `disabled-reason` disables the button, keeps it focusable and shows the reason (tooltip). Icon-only: `icon` + `label` and no text makes a square button (`label` is the name and the tooltip). A `<bk-avatar>` alone in the slot makes the round trigger of an account menu, named by the avatar. An icon-only button can have `count` (badge, `99+`) or `dot` (new activity) |
507
+ | `bk-tabs` + `bk-tabs-item` + `bk-tabs-panel` | tabs paired by `value`; tabs that do not fit move into a "More" menu (`overflow="menu"`, the default; the entries of link tabs are links), or the row scrolls sideways with `overflow="scroll"` (a narrow screen; the selected tab scrolls into view); `removable` on an item shows a close button and fires `remove` (Delete too); `addable` shows a plus button that fires `add` (saved views: the app asks for a name and appends an item); `variant="pills"`; `orientation="vertical"` (the tabs fill the width, a `dot` is before the label, the `count` is at the end of the row, so the counts have the same end edge); tabs with `href` become a link nav; the tabs write no attributes on the items (the items render their ARIA state; `:state(selected)` and `:state(overflow)` are for CSS); a user switch first fires a cancelable `select` (cancel it to stay on the tab), then `change` (not cancelable) |
508
+ | `bk-button` | button or link (`href`); `variant` (solid/soft/outline/ghost/quiet) × `tone` (neutral/accent/info/success/warning/danger/attention); `type="submit"` works in forms, and the first submit button of a form is its default button (Enter in a field clicks it; a disabled one blocks Enter); a disabled `<fieldset>` disables it; `pressed` makes a toggle (`pressed="false"` is an unpressed toggle; the pressed look follows `tone`); `type="file"` (+ `accept`, `multiple`) opens the file dialog, then sets `files` and fires `change`; `disabled-reason` disables the button, keeps it focusable and shows the reason (tooltip). Icon-only: `icon` + `label` and no text makes a square button (`label` is the name and the tooltip). A `<bk-avatar>` alone in the slot makes the round trigger of an account menu, named by the avatar. An icon-only button can have `count` (badge, `99+`) or `dot` (new activity) |
479
509
  | `bk-button-group` | combines `bk-button`s and `bk-menu` triggers into one shape (no gap, shared borders); `orientation="vertical"`; a split button is a button + a menu with an icon trigger; `selection="single\|multiple"` makes a toggle group (`aria-pressed`, arrow keys, `name`, `value`/`values`) |
480
510
  | `bk-icon` | registry icon (`name`), 1em, `currentColor`; `size` xs/sm/md/lg/xl; `spin` rotates it (busy); `tone` (the text colour of a meaning) or `muted`; the core set (Material Symbols) plus the brand marks `windows`, `linux`, `github`, `linkedin`, `mastodon`, `bluesky`, `youtube` and `rss` (a row of social links: icon buttons with `href` and `label` in a `bk-cluster` with `role="navigation"`) |
481
- | `bk-input-text` | text field with `label`, `hint` (attribute or slot) and `error`; `label-position="start"`; `type` allows only the text types (`text`, `email`, `password`, `search`, `url`, `tel`): other types render as text with a warning, so use the component for the value (`bk-input-number`, `bk-input-date`, `bk-input-time`, `bk-input-color`, `bk-input-slider`, `bk-input-file`, `bk-checkbox`, `bk-radio-group`); `multiline` makes a textarea (`autogrow`, `max-rows`); `mono` for codes and keys; `clearable`; `mask` (`9` digit, `a` letter, `*` any) with a raw value and `formattedValue`; `enterkeyhint` (also on `bk-input-number`); a reveal toggle for passwords; `prefix`/`suffix` text; `counter` with `maxlength`; slots `start`/`end` |
511
+ | `bk-input-text` | text field with `label`, `hint` (attribute or slot) and `error`; `label-position="start"`; `type` allows only the text types (`text`, `email`, `password`, `search`, `url`, `tel`): other types render as text with a warning, so use the component for the value (`bk-input-number`, `bk-input-date`, `bk-input-time`, `bk-input-color`, `bk-input-slider`, `bk-input-file`, `bk-checkbox`, `bk-radio-group`); `multiline` makes a textarea (`autogrow`, `max-rows`); `mono` for codes and keys; `clearable`; `mask` (`9` digit, `a` letter, `*` any) with a raw value and `formattedValue`; `enterkeyhint` (also on `bk-input-number`); a reveal toggle for passwords; `prefix`/`suffix` text; `counter` with `maxlength`; slots `start`/`end`; `shortcut` (a shortcut id of the registry or keys) sets `aria-keyshortcuts` on the input, show the keys with `<bk-kbd slot="end" shortcut="…">` |
482
512
  | `bk-input-rich` | light editor for formatted text: bold, italic, inline code, links, headings 2 and 3, quotes, lists. `value` is clean HTML (only these formats, safe links; show it with `bk-prose`); the editor cleans pasted and dropped text. Toolbar: a built-in `bk-toolbar` (a block type select for paragraph, heading 2 and heading 3, and toggle buttons for the rest) or your own in the `toolbar` slot (`data-command="bold\|italic\|code\|link\|p\|h2\|h3\|quote\|ul\|ol"` runs a command and receives `pressed`; a `bk-select` with `data-command="block"` and options `p`/`h2`/`h3` is the block type select). Shortcuts: Ctrl/⌘+B, I, K, Shift+7, Shift+8; Markdown at the start of a line (`## `, `- `, `1. `, `> `). `format="markdown"` makes `value` and the form value Markdown (`markdownToRichHtml` returns the HTML for `bk-prose`). Also: `execCommand()`/`queryCommandState()`; `placeholder`, `readonly`, `size`; form-associated (`input` on each edit, `change` on blur) |
483
513
  | `bk-select` | styled select; `<option>`/`<optgroup>` children or `.options`; `label-position="start"`; each option row has `data-value`; `placeholder`; `multiple` (`values`; the box lists the chosen labels); `clearable` (with `multiple`: empties all values); `prefix`/`suffix`; slots `start`/`end`; `collapse` (`sm`/`md`/`lg`) folds the box to its icon in a narrow size container, as `bk-button collapse` does; `select-all` with `multiple` (a tri-state row on top). Long lists render only the rows in view (above 100). Cancelable `loadmore` at the end of the list; `loading` (skeleton row). `.renderOption` renders the label part of each row, as in `bk-listbox`; `.renderValue = (option) => …` renders the chosen option in the closed box (for example a font in its own face). `open` (reflected) shows and sets the open state of the list; `toggle` fires after a change. A value that matches no option reads as `""`, as on a native select; if the app adds an option with that value later, the select chooses it |
484
514
  | `bk-select-tree` | a select whose popup is a `bk-tree`: nested `<bk-tree-item value label>` children as data; single (any node, also a branch) or `multiple` (check boxes, tri-state branches; the value is the checked leaves); `search` filters the rows; the focus moves into the popup (Escape returns it); form-associated, as `bk-select` is |
485
515
  | `bk-select-cascade` | a select whose popup is `bk-listbox-columns`: nested `<bk-listbox-item>` children or `.items`; the value is the chosen leaf, and `path`/`pathLabels` are the way down (the box shows "Germany / Bavaria / Munich"); form-associated, as `bk-select` is |
486
- | `bk-combobox` | searchable select (APG combobox): typing filters `<option>` children or `.options` (`Intl.Collator` in the locale: case and accents are ignored by the rules of the language, matches are marked; `matchRanges(label, query, locale)`). Options: `multiple` (tags, `max`); `allow-custom` (free text; with `multiple` a tag input); `clearable` (value, text and tags); `type="search"` (the look of a search field: a magnifier, no chevron, a clear button; the role stays combobox); `prefix`/`suffix` (the prefix is before the tags); slots `start`/`end`; async `.search(query, signal)` with `loading`. Long lists render only the rows in view; cancelable `loadmore` at the end (`loading` with options: a skeleton row). A pasted list makes one tag for each part. `data-avatar` on an option shows the picture of a person (empty: initials). `.renderOption = (option, label) => …` renders the label part of each row (`label` has the match marked), as in `bk-listbox`. `open` (reflected) shows and sets the open state of the list; `toggle` fires after a change |
516
+ | `bk-combobox` | searchable select (APG combobox): typing filters `<option>` children or `.options` (`Intl.Collator` in the locale: case and accents are ignored by the rules of the language, matches are marked; `matchRanges(label, query, locale)`). Options: `multiple` (tags, `max`); `allow-custom` (free text; with `multiple` a tag input); `clearable` (value, text and tags); `type="search"` (the look of a search field: a magnifier, no chevron, a clear button; the role stays combobox); `prefix`/`suffix` (the prefix is before the tags); slots `start`/`end`; async `.search(query, signal)` with `loading` (the list is busy from the keystroke until the newest search ends; in search mode, `options` and `<option>` children give the labels of the current value, and the list shows only the results). Long lists render only the rows in view; cancelable `loadmore` at the end (`loading` with options: a skeleton row). A pasted list makes one tag for each part. `data-avatar` on an option shows the picture of a person (empty: initials). `.renderOption = (option, label) => …` renders the label part of each row (`label` has the match marked), as in `bk-listbox`. `open` (reflected) shows and sets the open state of the list; `toggle` fires after a change |
487
517
  | `bk-input-number` | number field with − / + buttons (APG spinbutton); `label-position="start"`; `min`/`max`/`step`; typing in the format of the locale; the value is a plain number string; units and currency with `prefix`/`suffix` (`€`, `mm`); `clearable`; `scrub` changes the value when the user drags the label |
488
518
  | `bk-input-slider` | range slider (APG slider); `min`/`max`/`step`; `show-value` (`Intl`, `formatOptions`; `.valueFormatter = (value) => text` for a text that is not the value); `editable` adds a synced number field for exact entry (`input-position="start\|end"`, width `--bk-input-slider-input-width`); slots `start`/`end`; `input` fires while dragging, `change` on release; `marks` (`true` = every `step`, or `[{ value, label }]`) shows ticks on the track and labels under it |
489
519
  | `bk-input-slider-range` | two thumbs for a range (APG multi-thumb slider): `start-value`/`end-value`, `min`/`max`/`step`, `min-gap` (the thumbs never cross), `show-value` ("20–80" with `Intl`), `editable` (a number field before and after the track); submits `name=start&name=end`; the `--bk-input-slider-*` tokens style it; `marks` as on `bk-input-slider` |
@@ -503,7 +533,7 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
503
533
  | `bk-swatch-group` | a choice of one colour from a few that the app provides: a row of swatches (APG radio group), form-associated; `<option value="#e03131">Red</option>` children or `.colors`; `clearable` adds a swatch for no colour (`none-label`); `shape`, `size` |
504
534
  | `bk-color-panel` | inline colour picker: saturation/brightness area (2D slider), preview, hue and opacity sliders, format switch (`formats`), value field, swatches (also the content of `bk-input-color`) |
505
535
  | `bk-segmented` + `bk-segmented-item` | segmented control (one of a few options), form-associated; segments with `href` become a link nav; `count` badges; `collapse` on a segment folds it to its icon or dot and count in a narrow size container |
506
- | `bk-input-inline` | text that turns into a field; `save` event with `{ value, done(error?) }` for async saves; to edit any field in place, set a form control in the `edit` slot (select, date, text area) and the read view in the `display` slot |
536
+ | `bk-input-inline` | text that turns into a field; Enter, Tab out of it and a click outside save, Esc cancels; `save` event with `{ value, done(error?) }` for async saves (also for an empty value); to edit any field in place, set a form control in the `edit` slot (select, date, text area) and the read view in the `display` slot |
507
537
  | `bk-radio-group` + `bk-radio` | radio buttons (one of a few visible options), form-associated; `description` line; `start`/`end` slots; `orientation="horizontal"`; `variant="card"` for choice cards; `readonly` for an answer that is already set |
508
538
  | `bk-checkbox`, `bk-switch` | boolean fields; the label is the text content or `label`; `size="sm\|md\|lg"`; `label-position="start"` shows the label first and the control at the end; `state-labels` on a switch writes On/Off in the track |
509
539
  | `bk-checkbox-group` | several `bk-checkbox` as one field: one `name`, one value for each checked box; `label`/`hint`/`error`; `required` (at least one); `min`/`max`; `orientation="horizontal"`; `variant="card"` shows every box as a choice card (`start`/`end` slots, the hint as description); `readonly`; `select-all` (a tri-state box above the others) |
@@ -514,15 +544,16 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
514
544
  | `bk-form-guard` | behaviour around a `<form>`: warns on `beforeunload`, on in-app navigation, and before a `bk-dialog`/`bk-drawer` with a dirty form closes; `guardUnsaved(form)` for forms without markup; reflects `dirty` |
515
545
  | `bk-form-steps` | behaviour around a `<form>` with `data-step` elements: one step at a time, Back/Next, validation on Next, `data-when="field=value"` skips steps, progress text and a slotted `bk-steps`, cancelable `step` event, `persist-key`, `shortcuts` |
516
546
  | `bk-error-summary` | error summary of a form (GOV.UK pattern): after a failed submit it lists the invalid fields as links that focus them; it receives focus and updates while the user corrects the fields; `for` = the form id, else the closest form; `report()` for server-side errors |
517
- | `bk-chip` | status or tag; `tone` × `variant` (soft/solid/outline); `removable` fires `remove`; `href` (+ `target`/`rel`/`download`) makes it a real link |
518
- | `bk-chip-group` | chips as one Tab stop (arrow keys); Backspace/Delete fires the `remove` of a removable chip and moves the focus to the next chip; `selection="multiple"` (toggle buttons, `aria-pressed`) or `"single"` (listbox) for filter chips, which are then form-associated (`name`, `value`/`values`, `required`); the value of a chip is its `value` attribute, else its text |
547
+ | `bk-chip` | status or tag; `tone` × `variant` (soft/solid/outline/dashed/text; `text` is a plain label without fill, border and inline padding); `end` slot after the text and the `count`; `removable` fires `remove`; `removed` shows a taken-out chip (struck through, muted, hidden "Removed"; with `removable` the button restores it and fires `restore`, the app clears `removed`); `href` (+ `target`/`rel`/`download`) makes it a real link |
548
+ | `bk-chip-group` | chips as one Tab stop (arrow keys); Backspace/Delete fires the `remove` of a removable chip (`restore` on a `removed` one) and moves the focus to the next chip; `selection="multiple"` (toggle buttons, `aria-pressed`) or `"single"` (listbox) for filter chips, which are then form-associated (`name`, `value`/`values`, `required`); the value of a chip is its `value` attribute, else its text |
519
549
  | `bk-filter-bar` | the active filters as removable chips (a `bk-chip-group`) and Clear all; the app sets `items` (`{ key, label }`) and handles `remove` (`{ key }`) and `clear`; `start`/`end` slots (add filter, save view); announces the count; `bk-table` shows its filters in one |
520
550
  | `bk-attachment` | an attached file before it is sent: an image thumbnail (fires `select`) or an icon and name; `state` uploading/failed; `progress` (0..1) shows an upload bar and percent; `retryable` adds a retry button (fires `retry`); the remove button fires `remove`; use it in the `header` slot of `bk-composer` |
521
551
  | `bk-card` | surface with `media`/`header`/default/`footer` slots; `heading` (+ `level`) and `description` (a muted line under the heading, as in a chart card). `href` makes the card a link that covers the card (header `actions`, `footer`, overlays and `data-card-control` children stay clickable; `label` names the link). Media: `media-start`/`media-end` and `media-bottom-start`/`media-bottom-end` overlays; a `media-bottom` strip (`data-reveal` shows an item only on hover or focus); `media-ratio`. Also: `tone`, `selected`; `busy` (+ `busy-label`) covers a reloading card with a veil and a spinner, and the content is inert (`bk-panel` and `bk-pane` share this); `selectable` adds a checkbox for `selected` (fires `change`) |
522
552
  | `bk-item` + `bk-item-group` | content row: `start` visual (or `icon`; an `<img>` or `<bk-picture>` there is a thumbnail of `--bk-item-media-size` × `--bk-item-media-ratio`, covered), title, `description`, `end` meta or actions; `href` makes the row a link. The group adds list semantics, `divided` (lines also between link rows: their ends are on the edge of the group, and the hover fills the row; selectable and unread rows have a gap) and a visible `heading` (+ `level`). `selection="single\|multiple"` makes it a grid of rows to select (APG grid: one Tab stop, ↑/↓, Space/Enter, → into the `end` controls) with a cancelable `select` that has `{ values }` (the `value` of the items; in `single` the selected row fires it again). `unread` on an item (dot, tint, hidden "Unread"). `swipe-end`/`swipe-start` slots on an item (touch swipe, `openSwipe()`; offer the same actions in a menu). `editing` on a group (checkboxes with `selection="multiple"`, `handle` slot, announced, the focus moves in and back) |
523
- | `bk-table` | wraps a native `<table>`. Look: `variant` line/striped/grid; `surface` (the table has its own surface: background, border, radius, clipped corners; in card mode it has no surface; the pattern "a table as a card" is `<bk-table surface …>`, one element; a `bk-card` around a table is for a card with a heading and other content, and then the table has no `surface`); `sticky-header`; `hover-rows`; `data-type="number"` cells; `data-selected` rows. Sort: `sortable` + `th[data-sort]` add sort buttons (`sort-key`/`sort-dir`, cancelable `sort` event; the app sorts the rows). The table scrolls sideways as a focusable region. Selection: `selection="single\|multiple"` + `tr[data-key]` add checkboxes (cancelable `select` `{ keys }`, `selectedKeys`, Shift+click range; the table stays a native table, and the checkbox is the state of the row). Columns and rows: `th[data-resizable]` (drag, arrow keys, or a click on the handle for a Wider/Narrower/Reset menu; `persist-key`); `th[data-pin="start"]`; `tr[data-expandable]` + `tr[data-detail]`; the table announces sort and selection. Filters: `th[data-filter]` + `slot="filter-<key>"` (popover, cancelable `filter` `{ filters }`, chips in a `bk-filter-bar`). `column-menu` (sort, pin, move, hide; `columns` `{ hidden, pinned }`; `hiddenColumns`). States: `busy` (skeleton rows, veil); `slot="empty"`; `slot="error"`; `sticky-footer`; `th[data-pin="end"]`. Cards: `responsive="cards"` (a short text is at the end beside its label, a long text wraps under it at the start edge, and a number is always at the end; `th[data-card="block"]` shows the value of a column under its label; `th[data-card="meta"]` shows a short value (a position, a change, the disclosure button in the first cell) in the head of the card, next to the title, without its label; `th[data-card="hidden"]` hides the column in card mode only: its cells have `display: none` there and show in table mode). Filter by removing rows, not by hiding them: the empty state counts the rows in the body. Also: `navigation="cell"` (APG grid) + `td[data-editable]` (`edit` `{ key, column, value, oldValue }`); `reorderable` rows and `th[data-reorderable]` columns (`reorder`, keyboard, drag, menu); `toCSV()` and Ctrl+C; `virtual` + `rows`/`renderRow`/`rowKey` (`loadmore`); `tr[data-level]`/`tr[data-group]` (treegrid); `a[data-row-link]` in a cell makes the whole row a link (the controls of the row stay clickable; use `data-row-action` for others); `data-type="check"` cells show yes/no as a mark with a hidden "Yes"/"No" (other values of the column stay text, centred); `th[data-highlight]` marks a column (a comparison of plans) |
553
+ | `bk-table` | wraps a native `<table>`. Look: `variant` line/striped/grid; `surface` (the table has its own surface: background, border, radius, clipped corners; in card mode it has no surface; the pattern "a table as a card" is `<bk-table surface …>`, one element; a `bk-card` around a table is for a card with a heading and other content, and then the table has no `surface`); `sticky-header`; `hover-rows`; `data-type="number"` cells; `data-selected` rows. Sort: `sortable` + `th[data-sort]` add sort buttons (`sort-key`/`sort-dir`, cancelable `sort` event; the app sorts the rows). The table scrolls sideways as a focusable region. Selection: `selection="single\|multiple"` + `tr[data-key]` add checkboxes (cancelable `select` `{ keys }`, `selectedKeys`, Shift+click range; the table stays a native table, and the checkbox is the state of the row). Columns and rows: `th[data-resizable]` (drag, arrow keys, or a click on the handle for a Wider/Narrower/Reset menu; `persist-key`); `th[data-pin="start"]`; `tr[data-expandable]` + `tr[data-detail]`; the table announces sort and selection. Filters: `th[data-filter]` + `slot="filter-<key>"` (popover, cancelable `filter` `{ filters }`, chips in a `bk-filter-bar`). `column-menu` (sort, pin, move, hide; `columns` `{ hidden, pinned }`; `hiddenColumns`). States: `busy` (skeleton rows, veil); `slot="empty"`; `slot="error"`; `sticky-footer`; `th[data-pin="end"]`. Cards: `responsive="cards"` (a short text is at the end beside its label, a long text wraps under it at the start edge, and a number is always at the end; `th[data-card="block"]` shows the value of a column under its label; `th[data-card="meta"]` shows a short value (a position, a change, the disclosure button in the first cell) in the head of the card, next to the title, without its label; `th[data-card="hidden"]` hides the column in card mode only: its cells have `display: none` there and show in table mode; a sortable table sorts its cards with one "Sort by" select and a direction button above the table, part `card-sort`). Filter by removing rows, not by hiding them: the empty state counts the rows in the body. Also: `navigation="cell"` (APG grid) + `td[data-editable]` (`edit` `{ key, column, value, oldValue }`); `reorderable` rows and `th[data-reorderable]` columns (`reorder`, keyboard, drag, menu); `toCSV()` and Ctrl+C; `virtual` + `rows`/`renderRow`/`rowKey` (`loadmore`); `tr[data-level]`/`tr[data-group]` (treegrid); `a[data-row-link]` in a cell makes the whole row a link (the controls of the row stay clickable; use `data-row-action` for others); `data-type="check"` cells show yes/no as a mark with a hidden "Yes"/"No" (other values of the column stay text, centred); `th[data-highlight]` marks a column (a comparison of plans) |
524
554
  | `bk-pagination` | page navigation: `page`, `pages` or `total` + `page-size`, `siblings`, ellipsis; `href="?page={page}"` for links, else buttons; cancelable `select`, then `change` (both with `detail.page`); `show-summary` ("21–40 of 312"); in a narrow place it shows a compact form by itself; announces "Page 3 of 12" |
525
555
  | `bk-page-pager` | the link to the next page of a page that the user reads in order: `previous-href`/`next-href`, optional page titles `previous-label`/`next-label` (or slots); real links with `rel="prev"`/`rel="next"`, no boxes; for docs and guides |
556
+ | `bk-period-nav` | navigation between periods of a dashboard (day, week, month): `previous-href`, `next-href`, `current-href`; the range is the default slot and the state of the period is the `note` slot, both formatted by the app; real links through the link resolver; without `next-href` the next button is disabled (newest period); the current button shows only with `current-href`; `previous-label`/`next-label`/`current-label`, `label`, `size`; cancelable `navigate` |
526
557
  | `bk-accordion` + `bk-accordion-item` | sections that show and hide content (APG accordion); one is open at a time unless `multiple`; arrow keys; item `persist-key`; `description` (second line); `actions` slot beside the button; `variant="plain"` (rows without hairlines, the chevron is first); find-in-page finds closed items and opens them |
527
558
  | `bk-carousel` + `bk-carousel-item` | slides in a scroll-snap track (APG carousel): previous/next, dots as tabs, `loop`, `autoplay` with a pause button first in the tab order (it stops on hover and focus, and is off for reduced motion); other slides are `inert`; announces "Slide n of m"; `change` event, `index`, `goTo()` |
528
559
  | `bk-carousel-controls` | the previous and next buttons of the carousel with the `id` in `for`, in another place (the `actions` of a `bk-page-section`); the carousel then hides its own controls |
@@ -530,7 +561,7 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
530
561
  | `bk-logo` | the mark of a project, organisation or service: the whole image (never cropped), else up to two initials on a colour from `name`; `size` sm/md/lg |
531
562
  | `bk-logo-wall` | the logos of customers or partners in a row that wraps, each row in the centre, with an even space; the marks are muted and grey (`--bk-logo-wall-filter`); items are `bk-brand`, `bk-logo`, `img` or `svg` |
532
563
  | `bk-badge` | a visual with a small badge on its corner (for example, the owner on the logo of a project) |
533
- | `bk-lightbox` | image gallery and viewer (zoom, swipe, keyboard); the children are `<img>` or `<a>`; `variant="strip"` (a row at one height, for chat messages); with `items`, a child with `data-index` (a "+5" tile) opens that image; `openLightbox(items, index, { actions })` opens it from script; `actions` slot for toolbar buttons; `current` is the image that it shows |
564
+ | `bk-lightbox` | image gallery and viewer (zoom, swipe, keyboard); the children are `<img>` or `<a>`; `variant="strip"` (a row at one height, for chat messages); with `items`, a child with `data-index` (a "+5" tile) opens that image; `openLightbox(items, index, { actions, loop })` opens it from script; `actions` slot for toolbar buttons; `current` is the image that it shows; previous and next stop at the ends, `loop` wraps around; the viewer is `immersive` |
534
565
  | `bk-empty-state` | `icon`, `heading`, `size` (`lg` for a page that shows only this state), text, `actions` slot |
535
566
  | `bk-feature` | one feature of a product: `icon` (a neutral icon tile) or the `media` slot; `heading` + `level` (default 3) or the `heading` slot; a muted text; an `actions` slot (a `bk-link` "Learn more"); one gap, `--bk-feature-gap`. Put three or four in a `bk-grid`, or stack them in a column (`bk-stack`). In a column, each feature after the first adds `--bk-feature-spacing` above it (default `--bk-space-4`, in addition to the gap of the stack). A `bk-grid` uses only its gap |
536
567
  | `bk-spinner` | loading indicator (1em); `variant="pulse"`: a pulse line with a running beat, for something alive that works |
@@ -555,7 +586,7 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
555
586
  | `bk-button-share` | shares `url` (default the page) with the system share sheet, or copies the link if there is no share sheet (icon and name change to "Copy link", then "Link copied"); `heading`, `text`; slot text makes it a labelled button; `share` event with `{ method, url }` |
556
587
  | `bk-button-top` | floating back-to-top button: shows after `threshold` px of scrolling the document or the element in `for`; scrolls (instant with reduced motion); moves the focus to the start; avoids the safe areas, the keyboard, the status bar and the bottom nav |
557
588
  | `bk-status-dot` | status dot with `tone`, `pulse` |
558
- | `bk-delta` | a change inline in text or in a table cell, with tabular figures at the size of the text: `value` with a mark ("▲ 12"), green when good, `inverted` when down is good; 0 is a quiet "–"; `new` shows "New"; `notation="compact"` (12.3K; the exact value is for screen readers and in the tooltip); `variant="count"` for a figure that only grows ("+12") with `label` ("since midnight"); `variant="rank"`: `previous` → `value` ("#12 → #5 ▲ 7"; rank 1 is the best); `tiers="3 10 50"` colours the new rank by its tier |
589
+ | `bk-delta` | a change inline in text or in a table cell, with tabular figures at the size of the text: `value` with a mark ("▲ 12"), green when good, `inverted` when down is good; 0 is a quiet "–"; `new` shows "New"; `notation="compact"` (12.3K; the exact value is for screen readers and in the tooltip); `variant="count"` for a figure that only grows ("+12") with `label` ("since midnight"); `variant="rank"`: `previous` → `value` ("#12 → #5 ▲ 7"; rank 1 is the best); `tiers="3 10 50"` colours the new rank by its tier; `value-text="1.234"` shows a change that the app has formatted (the direction and the tone come from `value`; not for `rank`) |
559
590
  | `bk-steps` + `bk-steps-item` | progress or phase list: step `state` done, current, pending or error (check, spinner, number, cross); `heading`, `description`, `end` meta; `orientation="horizontal"` for a wizard row (with descriptions: columns of the same width; in a container narrower than 32rem the steps are in a column); tokens for a highlighted current row and a bare spinner; `href` (a real link) or `selectable` (a button) makes a step openable and fires a cancelable `select`; `disabled` makes it wait (wizard, task list, record path); states `skipped` and `cancelled`; an `output` slot (a `bk-code live`) that the title opens, open while the step is not done, for job runs (Patterns/Jobs) |
560
591
  | `bk-tasks` + `bk-tasks-item` | tasks with their state, each a row that opens to its output: the job history of an app, the steps of a job, background tasks. `state` pending, running, waiting, done, error, skipped or cancelled (a symbol; the state word for screen readers is `state-text`); `heading`, `description`, `end` (a duration), `level`, `open`; the content is a `bk-code variant="plain"` or a nested `bk-tasks` with the same indent as the row; `divided` for hairlines between the rows; arrow keys move between the rows (Patterns/Jobs) |
561
592
  | `bk-timeline` + `bk-timeline-item` | events on a line: `heading`, `description`, `time` (formatted with `Intl`) or `end`, `tone` dot or `marker` slot, `current`; the default slot is for content below, or a `bk-card` beside the marker (no heading; the current card uses the tone border); `time-zone` on an item writes its date-time in that zone |
@@ -569,18 +600,18 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
569
600
  | `bk-time-relative` | self-updating "3 minutes ago", durations and dates in the page locale; `time-zone` (IANA) writes the absolute date in that zone |
570
601
  | `bk-time-countdown` | time down to `to` (or up from `from`): `<time>` with `format="clock"` (04:12) or `text`; no live region for each second; polite announcements at 1 minute, 10 seconds and the end (`silent` turns them off); `end` event; `urgent` for the last minute; stops while the tab is hidden |
571
602
  | `bk-kbd` | keycaps, platform-aware: `<bk-kbd keys="Mod+K">` |
572
- | `bk-link` | text link, a real `<a>` in the size of the text around it: `variant="standalone"` (accent, faint underline, full underline on hover; for the end of a row), `inline` (the colour of the text, underlined; in a sentence) or `quiet` (muted, no underline at rest; for a list of links such as the link columns of a footer) |
603
+ | `bk-link` | text link, a real `<a>` in the size of the text around it: `variant="standalone"` (accent, faint underline, full underline on hover; for the end of a row), `inline` (the colour of the text, underlined; in a sentence) or `quiet` (muted, no underline at rest; for a list of links such as the link columns of a footer); `target="_blank"` shows the `external` icon and says "(opens in a new tab)" (`::part(new-tab)` hides the icon) |
573
604
  | `bk-alert` | inline message with `tone`, `heading`, actions, `dismissible`, `banner`; `variant="soft"` tints the whole box in the tone; `variant="inline"` has no box (icon and text in the tone), for a short status next to a button ("Saved.", with `live`); `live` announces it once when it is inserted and when the text changes; `autofocus` moves the focus to it once when it renders (after a redirect), as a named region |
574
605
  | `bk-alert-offline` | the band that says the connection is lost and, for 3 seconds, that it is back (a live `bk-alert banner`); put it in the `banner` slot; `OnlineController` is exported for your own components |
575
- | `bk-dialog` | modal; `open`, `show()`, `close(value)`; children with `data-close value="…"` close it; a `<form method="dialog">` inside closes it on submit (the value of the submit button is the return value); `role="alert"` makes it an alert dialog (`alertdialog`, focus on Cancel, no dismiss on the backdrop); `floating` (+ `resizable`, `persist-key`): a non-modal window that the user moves by its header (arrow keys and click-then-click are the single-pointer ways); `<button commandfor="id" command="show-modal">` opens it without script (also `close`, `request-close`, `--show`, `--hide`, `--toggle`) |
606
+ | `bk-dialog` | modal; `open`, `show()`, `close(value)`; children with `data-close value="…"` close it; a `<form method="dialog">` inside closes it on submit (the value of the submit button is the return value); `alert` (or `role="alert"`) makes it an alert dialog (`alertdialog`, focus on Cancel, no dismiss on the backdrop); `floating` (+ `resizable`, `persist-key`): a non-modal window that the user moves by its header (arrow keys and click-then-click are the single-pointer ways); `<button commandfor="id" command="show-modal">` opens it without script (also `close`, `request-close`, `--show`, `--hide`, `--toggle`); with `size="full"` (or `--bk-dialog-height`) the body takes the height that the header and the footer leave: content with `block-size: 100%` fills it, taller content scrolls in the body |
576
607
  | `bk-drawer` | modal panel that slides in from an edge (`placement` start, end, top or bottom; `size`); otherwise it is a `bk-dialog`; `swipe` with `placement="bottom"` makes a bottom sheet: drag handle (`handle` part), swipe down to close, snap to the heights of `--bk-drawer-detents`; the drawer avoids the safe areas of the device |
577
608
  | `bk-toast` | one notification as inline content (tone, heading, actions, dismiss) |
578
- | `bk-toast-group` + `toast()` | notifications; `toast("Saved", { tone: "success" })`; a toast with an `action` or `loading` stays until the user dismisses it or the app updates it (`duration` 0); inside an open modal dialog the toaster moves into the dialog; `toast()` returns a handle (call it or `close()` to hide, `update(message, options)` to change); `toast.promise(promise, { loading, success, error })`; `stacked` folds toasts into a deck that opens on hover and focus; `max` (default 5) limits the toasts on screen: a new toast dismisses the oldest toasts that have a timer, and toasts without a timer wait behind a line "N more notifications"; a swipe toward the edge dismisses a toast (the close button is the alternative); timers wait while the tab is hidden; the group avoids the notch and the keyboard (`--bk-safe-*`, `--bk-keyboard-inset`) |
609
+ | `bk-toast-group` + `toast()` | notifications; `toast("Saved", { tone: "success" })`; a toast with an `action` or `loading` stays until the user dismisses it or the app updates it (`duration` 0); inside an open modal dialog the toaster moves into the dialog (also a `bk-dialog` or `bk-drawer` in a shadow root, for example the navigation drawer of `bk-shell-app`, and also with toasts that show already), so the toasts are not inert; `toast()` returns a handle (call it or `close()` to hide, `update(message, options)` to change); `toast.promise(promise, { loading, success, error })`; `stacked` folds toasts into a deck that opens on hover and focus; `max` (default 5) limits the toasts on screen: a new toast dismisses the oldest toasts that have a timer, and toasts without a timer wait behind a line "N more notifications"; a swipe toward the edge dismisses a toast (the close button is the alternative); timers wait while the tab is hidden; the group avoids the notch and the keyboard (`--bk-safe-*`, `--bk-keyboard-inset`) |
579
610
  | `bk-popover` | non-modal panel: `<bk-button slot="trigger">` + content; `placement`; `for="<id>"` anchors it to an element by id without a trigger slot (a coachmark); `hover` (+ `delay`, `close-delay`): preview card for a link (WCAG 1.4.13); `selection-for="<id>"`: toolbar at the selected text; below `--bk-sheet-below` (40rem) it opens as a bottom sheet (`sheet="never\|always"`); `<button commandfor="id" command="--toggle">` works without script |
580
611
  | `bk-popover-help` | info button that opens a short note on click (toggletip): `heading`, `label`, default slot |
581
612
  | `bk-drop-target` | wraps content that accepts a drop: `accept` (data types), `effect`; dashed outline while an accepted drag is over it (`:state(receiving)`); the `drop` event is native |
582
613
  | `bk-menu-list` | inline menu of `bk-menu-item`s (for example, a list of actions in a sidebar); `bk-menu` shows the same in a popover; `variant="tiles"`: a grid of pictures (the `preview` of the items) with captions; an item with `current` marks what is open or entered now |
583
- | `bk-menu` + `bk-menu-item` (+ `-divider`, `-label`) | menu button; fires `select` with `{ value }`; items with `icon`, `tone="danger"`, a nested `bk-menu-list` in `slot="submenu"` (submenu), `type="checkbox"`, `href`, `shortcut`, `description` (second line); `filter` adds a search field (it searches label, description and section label; Enter selects the first match); the `footer` slot stays below the scrolling items; `variant="tiles"` |
614
+ | `bk-menu` + `bk-menu-item` (+ `-divider`, `-label`) | menu button; fires `select` with `{ value }`; items with `icon`, `tone="danger"`, a nested `bk-menu-list` in `slot="submenu"` (submenu), `type="checkbox"`, `href`, `shortcut`, `description` (second line); `removable` (a remove button and Delete fire `remove` with `{ value, item }`, the app removes the item); `filter` adds a search field (it searches label, description and section label; Enter selects the first match); the `header` slot stays above the scrolling items (for example who is signed in; plain text, not an item), the `footer` slot stays below them; `variant="tiles"` |
584
615
  | `bk-menu-context` | menu for right-click, long press or Shift+F10 on the area in `slot="target"`; the items are those of a `bk-menu`; `contextTarget` (set it before `open`), `showAt(x, y)`, `disabled`; the innermost menu has priority |
585
616
  | `bk-message` + `bk-message-list` | chat messages: `from` user, assistant or system; `variant` auto (user bubble at the end, others plain), bubble or plain; `author` + `time` (Intl) header; slots `start`, `header`, `meta`, `actions` (shown on hover or focus) and `status`; `status` sending, streaming or error (fires `retry`). The list is a scrolling `role="log"`. It keeps the newest message in view while the reader is at the end. It shows a floating "Go to latest" (with the count of new messages) above the list. With `pin-prompt`, it shows the latest user message as a bar at the top, above the visible part, while that message is out of view (the message that the visible part answers) |
586
617
  | `bk-message-tool` | a tool call in a message: `name`, `state` pending, running, waiting, done, error or denied (icon and text, announced on change; `error` opens it); it opens to the `input` and `output` slots |
@@ -592,19 +623,19 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
592
623
  | `bk-message-branches` | "‹ 2 of 3 ›" between the versions of an answer: `index`, `count`; fires `change`; the position is a polite status |
593
624
  | `bk-composer` | chat input: autogrowing field + toolbar (`start`, `end` and `header` slots; `above`: a strip with its own surface at the top of the box) + send button. Enter sends (`send-on="mod-enter"` for Ctrl/⌘+Enter). The cancelable `send` event has `{ value }` and empties the field. `busy` adds a stop button (`stop`). `sending` shows a spinner in the send button and sends nothing a second time (the app saves the message). `maxlength` limits the text. `triggers="/@"` + a `completions({ trigger, query, start })` function show option rows above the box (Enter and Tab choose; cancelable `complete`); with `inline`, they show in the box under the field (where a popup has no room). An option with `token: true` stays one unit (Backspace removes it whole; `tokens`; `send` detail `tokens`). `history` (+ `history-key`) recalls sent messages with ↑/↓. Pasted or dropped files fire `attach` with `{ files }` (put the chips in `header`). `optional` sends without text. It is form-associated |
594
625
  | `bk-command-menu` | inline command search + grouped results (content of the palette, usable anywhere) |
595
- | `bk-picture` | a picture in a layout: it fills its column (`--bk-picture-width` sets a fixed width for a thumbnail); `ratio` (`4/3` or `4:3`; `--bk-picture-ratio` from a stylesheet) and `fit`; container corners; lazy loading with a placeholder; an empty frame without `src` (`empty` slot); a quiet error icon in a small picture; `--bk-picture-loaded-bg` for transparent images; optional caption (a figure); `href` (+ `target`, `rel`, `download`) makes it a link named by `alt` |
626
+ | `bk-picture` | a picture in a layout (it fires `load` with `{ src, naturalWidth, naturalHeight }` and `error` with `{ src }`; both bubble): it fills its column (`--bk-picture-width` sets a fixed width for a thumbnail); `ratio` (`4/3` or `4:3`; `--bk-picture-ratio` from a stylesheet) and `fit`; container corners; lazy loading with a placeholder; an empty frame without `src` (`empty` slot); an error icon with an icon-only retry button in a small picture; `--bk-picture-loaded-bg` for transparent images; optional caption (a figure); `href` (+ `target`, `rel`, `download`) makes it a link named by `alt` |
596
627
  | `bk-testimonial` | a quote of a person (`<figure>`, `<blockquote>`, `<figcaption>`): `name`, `byline`, `avatar` and `logo` slots; `size` sm (dense grid), md (card) or lg (pull quote); a centred `bk-page-section` centres the mark, the quote and the person |
597
628
  | `bk-video` | a video with its own controls (play, position, time, mute, captions written above the controls, full screen); a `<video>` with sources and tracks in the slot, or `src`; `ambient` for a background video with only a pause button |
598
- | `bk-image-compare` | two pictures of the same subject (before and after): `before-src`, `after-src`, `before-label`, `after-label`; `variant="slider"` (a divider, `position` in percent, arrow keys), `side` (next to each other, captions) or `toggle` (one at a time, a segmented control, `show`); without `before-src` it shows the after picture alone; `zoomable`: Ctrl + wheel, pinch, double click, drag, keys and a `bk-zoom`; both pictures show the same part (`view`, `resetZoom()`); `input` and `change` |
599
- | `bk-image-viewer` | inline image viewer with zoom (level in real pixels, fit, actual size, sharp pixels from 300 %), swipe, keyboard, pan buttons while zoomed, filmstrip (content of the lightbox); the placeholder has the shape of the full image |
600
- | `bk-model-viewer` | a 3D model (STL, 3MF, OBJ; `type` for an address without an extension) on a print bed: drag, wheel and keys turn, tilt and zoom it; a button for each move; `color` of the part (it replaces the colours of a 3MF or OBJ file; without it the file keeps its colours); `items` + `index` with `change` and a status line ("2 of 9 · name"); `details` slot beside the view (under it below `--bk-model-viewer-stack-below`); needs the optional peer dependency `three` (see "3D models") |
629
+ | `bk-image-compare` | two pictures of the same subject (before and after): `before-src`, `after-src`, `before-label`, `after-label`; `variant="slider"` (a divider, `position` in percent, arrow keys), `side` (next to each other, captions) or `toggle` (one at a time, a segmented control, `show`); slots `before` and `after` take any content instead of pictures (two cards with the same layout; the larger side gives the size, no zoom, both sides stay readable, hidden ends are `inert`); without `before-src` it shows the after picture alone; `zoomable`: Ctrl + wheel, pinch, double click, drag, keys and a `bk-zoom`; both pictures show the same part, also `side` by side (`view`, `resetZoom()`); `viewchange` when the user zooms or pans; parts `before` and `after` for a ring on one side; `input` and `change` |
630
+ | `bk-image-viewer` | inline image viewer with zoom (level in real pixels, fit, actual size, sharp pixels from 300 %), swipe, keyboard, pan buttons while zoomed, filmstrip (content of the lightbox); the placeholder has the shape of the full image; without a height it takes the shape of the image (from `width`/`height`, the full image or the thumbnail), capped by `max-height` or `--bk-image-viewer-max-height`; Ctrl + wheel zooms, the plain wheel scrolls the page until the image is zoomed; previous and next stop at the ends, `loop` wraps around; `immersive` (main content of the screen or a dialog): the plain wheel zooms, a click steps the zoom 2×, 4×, fit, and the keys work from anywhere in the surrounding dialog; `view` (`{ zoom, x, y }` in fractions of the image) and `viewchange` mirror two viewers at different resolutions; `naturalWidth`, `naturalHeight` and `load` for a size chip in the `actions` slot |
631
+ | `bk-model-viewer` | a 3D model (STL, 3MF, OBJ; `type` for an address without an extension) on a print bed: drag, wheel and keys turn, tilt and zoom it; a button for each move; `color` of the part (it replaces the colours of a 3MF or OBJ file; without it the file keeps its colours); `items` + `index` with `change` and a status line ("2 of 9 · name"); `details` slot beside the view (under it below `--bk-model-viewer-stack-below`); `fill`: the viewer takes the height of its container (for example the body of `<bk-dialog size="full">`), the view takes what the row under it leaves, the details scroll on their own; without `fill` the view keeps `--bk-model-viewer-ratio` or `--bk-model-viewer-height`; needs the optional peer dependency `three` (see "3D models") |
601
632
  | `bk-surface` | the container primitive: a surface on one elevation layer (`layer`, `padding`, `radius`, `tone`); `layered` makes it the base of its content (a pane, a tool window): surfaces, fields and cards in it use the layer above its own colour |
602
633
  | `bk-command-palette` | ⌘K palette and global search: `items` and/or async `search(query)`; fires `select` |
603
634
  | `bk-kbd-shortcuts` | overview of all registered shortcuts (inline content; wrap it in `bk-dialog` for a dialog) |
604
635
  | `bk-swatch-palette` | a small picture of a palette (`palette` or `.colors`) in the scheme around it; its host is a scope root |
605
636
  | `bk-tooltip` | wraps the target or uses `for="id"`: `<bk-tooltip content="Copy"><bk-button variant="ghost" …></bk-tooltip>`; `shortcut="Mod+K"` adds keycaps and `aria-keyshortcuts` |
606
637
  | `bk-visually-hidden` | content for screen readers only; `focusable` shows it while the focus is inside, like a skip link (the move button of a pane) |
607
- | `confirmDialog()` | `await confirmDialog({ heading, message, danger, confirmLabel })` → boolean; `danger` opens an alert dialog |
638
+ | `confirmDialog()` | `await confirmDialog({ heading, message, danger, confirmLabel, action })` → boolean; `danger` opens an alert dialog (the focus starts on Cancel; Enter activates the focused button); `action: () => Promise` runs on confirm: the confirm button shows `loading`, Cancel is disabled, Esc and the backdrop do not dismiss, the dialog closes and resolves true when the action fulfils, and a rejection stays open with the error message in a `bk-alert` so the user can try again |
608
639
  | `chooseDialog()` | `await chooseDialog({ heading, message, confirmLabel, choices: [{ value, label, icon }] })` → the chosen `value`, `"confirm"` or `null` |
609
640
  | `promptDialog()` | `await promptDialog({ heading, label, value, hint, placeholder, required, trim, validate, confirmLabel })` → the text, or `null` for Cancel and Esc; Enter confirms; the text has no spaces at its ends (`trim`, default true); an empty required field (also one with only spaces) stays open; `validate(value)` returns a message that shows in the field, or null |
610
641
 
@@ -836,6 +867,8 @@ setting of an app. The app composes the control and applies the choice in `chang
836
867
  | Theme | `bk-segmented` with three `bk-segmented-item icon`, or a `bk-menu` of `bk-menu-item type="radio"` | `setTheme(value)` |
837
868
  | Palette | `bk-radio-group variant="card"`, each `bk-radio` with a `bk-swatch-palette` in `start` | `setPalette(value)` |
838
869
  | Text size | `bk-segmented` with the factors of the app | `setTextScale(value)` |
870
+ | Reduce animations | `bk-menu-item type="checkbox"` in the menu of the theme, or a `bk-switch` | `--bk-motion: 0` on `<html>` (all durations become 0) |
871
+ | Underline links | `bk-menu-item type="checkbox"` in the menu of the theme, or a `bk-switch` | `--bk-link-underline: currentColor` on `<html>` |
839
872
 
840
873
  **In the sidebar.** Put the theme in the footer row of `bk-shell-app`. A `bk-nav` in `sidebar-footer` contains a
841
874
  `bk-menu`, and its trigger is a `bk-nav-item`. The item is in line with Settings and with the collapse toggle of
@@ -849,10 +882,17 @@ the shell. In the rail it shows only its icon, with its label as a tooltip.
849
882
  <bk-menu-item type="radio" value="system" checked>System</bk-menu-item>
850
883
  <bk-menu-item type="radio" value="light">Light</bk-menu-item>
851
884
  <bk-menu-item type="radio" value="dark">Dark</bk-menu-item>
885
+ <bk-menu-divider></bk-menu-divider>
886
+ <bk-menu-item type="checkbox" value="motion">Reduce animations</bk-menu-item>
887
+ <bk-menu-item type="checkbox" value="underline">Underline links</bk-menu-item>
852
888
  </bk-menu>
853
889
  </bk-nav>
854
890
  ```
855
891
 
892
+ The menu of the theme is the place for the preferences of the look: the theme, then the preferences as checkbox
893
+ items. Apply a checkbox item in `select`: `event.detail.item.checked` is its new state. Store the choice as the app
894
+ stores its other settings.
895
+
856
896
  The test `src/tokens.test.ts` checks the contrast of every derived token for a range of brand colours.
857
897
 
858
898
  **Character knobs.** The default look is neutral. An app gives it a character with a few knobs.
@@ -951,6 +991,26 @@ Light/dark: the page follows the OS. Force one theme with `<html data-theme="dar
951
991
  subtree can set its own `data-theme`. Derived tokens use `light-dark()`, and overrides of derived
952
992
  tokens can use it too: `--bk-accent-solid: light-dark(#2457ff, #8aa4ff);`.
953
993
 
994
+ ### A CSS reset in the app
995
+
996
+ A global reset such as the preflight of Tailwind (`*, ::before, ::after { margin: 0; padding: 0; border: 0 solid }`)
997
+ is a rule of the page. A rule of the page beats the `:host` rules of a shadow root, whatever the layers. So the reset
998
+ removes the padding and border of `bk-surface`, the margin of `bk-empty-state` and the same of other elements.
999
+ `@bk2k/ui/reset.css` reverts the margin, padding and border of the reset on every element of the library. The
1000
+ `:host` rules apply again. The utilities of the app in later layers still win.
1001
+
1002
+ Import it after the reset, in the layer of the reset. Tailwind 4 declares `@layer theme, base, components, utilities;`
1003
+ and puts its reset in `base`, so the file (it uses `@layer base`) fits:
1004
+
1005
+ ```css
1006
+ @import "tailwindcss";
1007
+ @import "@bk2k/ui/reset.css";
1008
+ ```
1009
+
1010
+ The rule uses `:where()`, so it has no specificity. It wins over the reset by its order in the same layer. For a reset in
1011
+ another layer, copy the rule from the file and change the layer name. The file lists the tags of the library at build
1012
+ time, so a new element is in it at once.
1013
+
954
1014
  ### One scheme only
955
1015
 
956
1016
  An app can support only light or only dark. Write both of these, so the page is right before scripts run and on the server:
@@ -980,7 +1040,7 @@ adding the tokens a second time.
980
1040
 
981
1041
  These are content components. Put them in a `bk-surface` or a `bk-card`: `bk-chart-bar` (vertical/horizontal,
982
1042
  grouped/stacked/percent), `bk-chart-line` (+ `variant="area"`; reference lines are `bk-chart-mark` children), `bk-chart-sparkline`, `bk-chart-histogram`,
983
- `bk-chart-stacked-bar` (one whole split into parts: a segmented progress bar. `max` leaves the rest empty, `rest-label` names it, and `show-total` shows the sum after the bar. A part with `pattern: "hatched"` is striped, a part with `tone` uses the colour of its meaning, and a part with `caption` has a second line in the legend), `bk-chart-bridge` (a bridge, in finance often called a waterfall: a start, steps up and down, `kind: "total"` subtotals, and `end-label` for the end; `min` starts the scale above zero), `bk-chart-bar-list` (ranked rows with a bar, share and value: "where does it go"; a row can have an `icon`, its own `color` and an `href`), `bk-chart-bullet` (one value against a reference in one row: a bar, a marker, an optional band `band-from`/`band-to` and the deviation "+38 %"; `better="higher|lower"` sets the tone, and `neutral="0.1"` gives no verdict inside ±10 %; rows with the same `max` are in line), `bk-chart-waterfall` (nested spans of a run on a time line: a tree grid with bars and durations, `select`), `bk-stat` (KPI tile: value, unit, delta with trend, `start` slot, `order`; a centred `bk-page-section` centres all its rows),
1043
+ `bk-chart-stacked-bar` (one whole split into parts: a segmented progress bar. `max` leaves the rest empty, `rest-label` names it, and `show-total` shows the sum after the bar. A part with `pattern: "hatched"` is striped, a part with `tone` uses the colour of its meaning, and a part with `caption` has a second line in the legend), `bk-chart-bridge` (a bridge, in finance often called a waterfall: a start, steps up and down, `kind: "total"` subtotals, and `end-label` for the end; `min` starts the scale above zero), `bk-chart-bar-list` (ranked rows with a bar, share and value: "where does it go"; a row can have an `icon`, its own `color` and an `href`), `bk-chart-bullet` (one value against a reference in one row: a bar, a marker, an optional band `band-from`/`band-to` and the deviation "+38 %"; `better="higher|lower"` sets the tone, and `neutral="0.1"` gives no verdict inside ±10 %; rows with the same `max` are in line), `bk-chart-waterfall` (nested spans of a run on a time line: a tree grid with bars and durations, `select`), `bk-stat` (KPI tile: value, unit, delta with trend, `start` slot, `order`; `value-text`/`delta-text` show text that the app has formatted ("345.867"), as `aria-valuetext` does; the `label` and `value` slots take rich content instead of the attributes, for example a `bk-footnote` marker; a centred `bk-page-section` centres all its rows),
984
1044
  `bk-stat-group` (a wrapping row of stats, `divided` by hairlines),
985
1045
  `bk-chart-legend`.
986
1046
 
@@ -1015,9 +1075,18 @@ More charts: `bk-chart-area` (stacked layers over time, `variant="percent"` for
1015
1075
  - `variant="minimal"` on `bk-chart-bar` shows the baseline and the categories only, with no grid or value axis.
1016
1076
  This is the quiet form for small charts in the own layout of an app (use it with `labels`).
1017
1077
  - Clickable categories on `bk-chart-bar` (a week strip): `href="?day={x}"` makes each category a real link
1018
- (`{x}` is the category, `{<field>}` is a field of the row). A plain click fires `navigate`. `clickable` makes each
1019
- category a button that fires a cancelable `select` `{ category, index }`. `current` marks the chosen category.
1020
- The other bars use `--bk-chart-bar-rest`.
1078
+ (`{x}` is the category, `{<field>}` is a field of the row). `href="{url}"` takes the address of each row as it is.
1079
+ The link resolver resolves each address. A plain click fires `navigate`. `clickable` makes each category a button
1080
+ that fires a cancelable `select` `{ category, index }`. `current` marks the chosen category: a bold label and a mark
1081
+ under it. The other bars use `--bk-chart-bar-rest`.
1082
+ - `tooltip-fields="prints likes"` on `bk-chart-bar` and `bk-chart-line` (also `bk-chart-area`) lists more fields of the row in
1083
+ the tooltip, in the data table and in the screen-reader name of each mark, without drawing them. The property
1084
+ `tooltipFields` also takes `{ key, label, format }` objects: `label` names the field, and `format` are
1085
+ `Intl.NumberFormat` options (the default is the plain number format of the locale).
1086
+ - `detail="<field>"` on `bk-chart-bar` shows a second label under each category (a date, for example).
1087
+ `detail-label` names its column in the data table.
1088
+ - A null value on `bk-chart-bar` draws no bar, only a short outline at the baseline. A category without any value
1089
+ has no link or button, and its name says "no value".
1021
1090
  - `bk-stat` shows numbers in full (242,118). `notation="compact"` shortens them from 10,000 (242.1K).
1022
1091
  `variant="chip"` shows the change on a soft tone pill. Thin `bk-chart-stacked-bar`s list the numbers in
1023
1092
  their legend.