@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
@@ -12,8 +12,10 @@ import { LitElement } from "lit";
12
12
  * ```
13
13
  *
14
14
  * With `layout="rows"` each fact is one line: label, value and the `actions` of the item at the inline end,
15
- * with a hairline between the rows (a summary list, "check your answers"). When a row is narrower than the label plus
16
- * `--bk-facts-rows-min`, the value moves below the label. Name each action with its row ("Change name"). A bare "Change" has no context.
15
+ * with a hairline between the rows (a summary list, "check your answers"). All rows share one label column, as wide as the widest label up to `--bk-facts-label-width`.
16
+ * In a list narrower than 24rem (a container query on the list, fixed because a query cannot read a token) the value moves
17
+ * below its label at full width, and the actions stay at the end of the label line.
18
+ * `data-type="number"` on an item aligns its value to the end with tabular figures. Name each action with its row ("Change name"). A bare "Change" has no context.
17
19
  *
18
20
  * ```html
19
21
  * <bk-facts layout="rows">
@@ -27,8 +29,8 @@ import { LitElement } from "lit";
27
29
  * @cssprop --bk-facts-min - Minimum column width (default 160px). The `min` attribute sets it.
28
30
  * @cssprop --bk-facts-gap-block - Space between rows (default --bk-space-4).
29
31
  * @cssprop --bk-facts-gap-inline - Space between columns (default --bk-space-5).
30
- * @cssprop --bk-facts-label-width - Width of the label column with `layout="rows"` (default 30%).
31
- * @cssprop --bk-facts-rows-min - Minimum width of a value with `layout="rows"`. Below this width the value moves under the label (default --bk-measure-min).
32
+ * @cssprop --bk-facts-label-width - Widest the label column gets with `layout="rows"` (default 60%). The column is as wide as the widest label, up to this width. A longer label wraps.
33
+ * @cssprop --bk-facts-rows-min - Width that the label column leaves for the value with `layout="rows"` (default --bk-measure-min). In a list wider than 24rem the label column shrinks to keep it.
32
34
  * @cssprop --bk-facts-row-gap - Space above and below the content of a row with `layout="rows"` (default --bk-space-3).
33
35
  * @cssprop --bk-facts-row-divider - Hairline between rows with `layout="rows"` (default --bk-line).
34
36
  *
@@ -1,5 +1,6 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { define } from "../internal/define.js";
3
+ import { setHostVars } from "../internal/host-vars.js";
3
4
  import { base } from "../internal/styles.js";
4
5
  class BkFacts extends LitElement {
5
6
  static properties = { min: { reflect: true }, layout: { reflect: true, useDefault: true } };
@@ -12,25 +13,36 @@ class BkFacts extends LitElement {
12
13
  :host {
13
14
  display: grid; min-width: 0;
14
15
  gap: var(--bk-facts-gap-block, var(--bk-space-4)) var(--bk-facts-gap-inline, var(--bk-space-5));
15
- grid-template-columns: repeat(auto-fit, minmax(min(var(--bk-facts-min, 160px), 100%), 1fr));
16
+ grid-template-columns: repeat(auto-fit, minmax(min(var(--_bk-facts-min, var(--bk-facts-min, 160px)), 100%), 1fr));
16
17
  }
17
- :host([layout="rows"]) { display: block; }
18
- /* Private variables inherit into the items; an item reads them to lay out its row. The value wraps below the label
19
- when the row is narrower than the label plus --bk-facts-rows-min. */
18
+ /* One grid for all rows: the label column is as wide as the widest label, up to --bk-facts-label-width, and never
19
+ leaves less than --bk-facts-rows-min for the value. Each item spans the columns as a subgrid: label, value, actions. */
20
+ :host([layout="rows"]) { display: block; container-type: inline-size; }
21
+ .rows { display: contents; }
22
+ :host([layout="rows"]) .rows {
23
+ display: grid;
24
+ grid-template-columns: fit-content(max(min(var(--bk-facts-label-width, 60%), calc(100% - var(--bk-facts-rows-min, var(--bk-measure-min)))), var(--bk-measure-min) / 2)) minmax(0, 1fr) auto;
25
+ column-gap: 0; row-gap: 0;
26
+ }
27
+ /* Private variables inherit into the items; an item reads them to lay out its row. */
20
28
  :host([layout="rows"]) ::slotted(bk-facts-item) {
21
- --_bk-facts-display: flex;
22
- --_bk-facts-label-flex: 1 0 var(--bk-facts-label-width, 30%);
23
- --_bk-facts-value-flex: 1000 1 var(--bk-facts-rows-min, var(--bk-measure-min));
24
- --_bk-facts-pad: var(--bk-facts-row-gap, var(--bk-space-3));
29
+ --_bk-facts-subgrid: subgrid; --_bk-facts-span: 1 / -1;
25
30
  --_bk-facts-col-gap: var(--bk-facts-gap-inline, var(--bk-space-5));
31
+ --_bk-facts-pad: var(--bk-facts-row-gap, var(--bk-space-3));
26
32
  }
27
33
  :host([layout="rows"]) ::slotted(bk-facts-item:not(:first-child)) { border-block-start: var(--bk-border-width) solid var(--bk-facts-row-divider, var(--bk-line)); }
34
+ /* A narrow list: the label and the actions share the first line, the value takes the line below at full width.
35
+ A container query cannot read a token, so the breakpoint is fixed. */
36
+ @container (inline-size < 24rem) {
37
+ .rows { grid-template-columns: minmax(0, 1fr) auto !important; }
38
+ ::slotted(bk-facts-item) { --_bk-facts-label-area: 1 / 1; --_bk-facts-actions-area: 1 / 2; --_bk-facts-value-area: 2 / 1 / 3 / -1; }
39
+ }
28
40
  `];
29
41
  updated() {
30
- this.min ? this.style.setProperty("--bk-facts-min", this.min) : this.style.removeProperty("--bk-facts-min");
42
+ setHostVars(this, { "--_bk-facts-min": this.min || "" });
31
43
  }
32
44
  render() {
33
- return html`<slot></slot>`;
45
+ return html`<div class="rows"><slot></slot></div>`;
34
46
  }
35
47
  }
36
48
  define("bk-facts", BkFacts);
@@ -0,0 +1,73 @@
1
+ import { LitElement, nothing } from "lit";
2
+ import { type FootnoteMarker, type FootnoteRef } from "../internal/footnotes.js";
3
+ /**
4
+ * A footnote marker: a small raised number in a line of text that links to its note. The note is a
5
+ * `<bk-footnotes-item>` with the same `id` in a `<bk-footnotes>` list, for example at the end of the page.
6
+ *
7
+ * ```html
8
+ * <p>The plan costs up to 155 €<bk-footnote note="price"></bk-footnote> a month.</p>
9
+ * <bk-footnotes>
10
+ * <bk-footnotes-item id="price" href="https://example.com/prices" date="2026-11">Statistics office, price index.</bk-footnotes-item>
11
+ * </bk-footnotes>
12
+ * ```
13
+ *
14
+ * - The number comes from the page: each list numbers its notes in the order of their first marker. Several
15
+ * markers can refer to one note. They then show the same number, and the note has a back link to each of them.
16
+ * - The order is the order on the screen. A marker in a slot or in the shadow root of another element counts at
17
+ * its place there: in a value of a `bk-stat`, in a `bk-facts-item`, in a cell of a `bk-table`.
18
+ * - A click on the marker moves the focus to the note and marks it (`:state(target)`). The page scrolls to it.
19
+ * - A marker whose note is not on the page shows nothing. It shows its number when the note connects.
20
+ * - The browser numbers the markers. The HTML of a server has the link without a number.
21
+ *
22
+ * Inline content: it is in a line of text, like a link. Its hit area is at least `--bk-target-min`.
23
+ *
24
+ * @csspart marker - The raised box around the link (`<sup>`).
25
+ * @csspart link - The `<a>` with the number.
26
+ * @cssprop --bk-footnote-fg - Colour of the number (default --bk-link).
27
+ * @cssprop --bk-footnote-hover-fg - Colour of the number on hover (default --bk-link-hover).
28
+ * @cssprop --bk-footnote-font-size - Size of the number (default 0.75em, three quarters of the text around it).
29
+ * @cssprop --bk-footnote-font-weight - Weight of the number (default --bk-weight-medium).
30
+ * @cssprop --bk-footnote-padding-inline - Space before and after the number (default --bk-space-0).
31
+ * @cssprop --bk-footnote-radius - Corner radius of the focus ring and of the mark of a target (default --bk-radius-xs).
32
+ * @cssprop --bk-footnote-target-bg - Mark of the marker when a back link of its note jumped to it (default --bk-accent-soft).
33
+ * @cssprop --bk-footnote-scroll-margin - Space above the marker when a back link scrolls to it (default the header height plus --bk-space-4).
34
+ *
35
+ * @tag bk-footnote
36
+ * @keyboard Enter - Moves the focus to the note.
37
+ * @a11y The marker is a link with the name "Footnote {number}" (i18n `footnoteN`). The visible number is part of the name. Its note has a back link to it. A marker without a note is not in the accessibility tree.
38
+ */
39
+ export declare class BkFootnote extends LitElement implements FootnoteMarker {
40
+ static shadowRootOptions: ShadowRootInit;
41
+ static properties: {
42
+ note: {};
43
+ ref: {
44
+ state: boolean;
45
+ };
46
+ };
47
+ /** The `id` of the `<bk-footnotes-item>` of the note. */
48
+ note: string;
49
+ /** The place of the marker: its number and its note. The registry sets it. */
50
+ private ref;
51
+ private i18n;
52
+ private internals;
53
+ constructor();
54
+ connectedCallback(): void;
55
+ disconnectedCallback(): void;
56
+ /** The number of the note, after the page numbered the markers; `undefined` without a note. */
57
+ get number(): number | undefined;
58
+ /** @internal */
59
+ setFootnoteRef(ref: FootnoteRef | undefined): void;
60
+ /** Moves the focus to the marker, scrolls to it and marks it. A back link of the note calls it. */
61
+ reveal(): void;
62
+ protected willUpdate(changed: Map<PropertyKey, unknown>): void;
63
+ protected getUpdateComplete(): Promise<boolean>;
64
+ static styles: import("lit").CSSResult[];
65
+ private onClick;
66
+ render(): typeof nothing | import("lit-html").TemplateResult<1>;
67
+ }
68
+ declare global {
69
+ interface HTMLElementTagNameMap {
70
+ "bk-footnote": BkFootnote;
71
+ }
72
+ }
73
+ //# sourceMappingURL=bk-footnote.d.ts.map
@@ -0,0 +1,97 @@
1
+ import { LitElement, css, html, nothing } from "lit";
2
+ import { LocalizeController } from "../i18n.js";
3
+ import { define } from "../internal/define.js";
4
+ import { addFootnoteMarker, clearFootnoteTarget, footnotesSettled, isPlainClick, removeFootnoteMarker, revealFootnoteTarget, scheduleFootnotes } from "../internal/footnotes.js";
5
+ import { base } from "../internal/styles.js";
6
+ class BkFootnote extends LitElement {
7
+ static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true };
8
+ static properties = {
9
+ note: {},
10
+ ref: { state: true }
11
+ };
12
+ i18n = new LocalizeController(this);
13
+ internals = this.attachInternals();
14
+ constructor() {
15
+ super();
16
+ this.note = "";
17
+ }
18
+ connectedCallback() {
19
+ super.connectedCallback();
20
+ addFootnoteMarker(this);
21
+ }
22
+ disconnectedCallback() {
23
+ super.disconnectedCallback();
24
+ removeFootnoteMarker(this);
25
+ clearFootnoteTarget(this);
26
+ }
27
+ /** The number of the note, after the page numbered the markers; `undefined` without a note. */
28
+ get number() {
29
+ return this.ref?.number;
30
+ }
31
+ /** @internal */
32
+ setFootnoteRef(ref) {
33
+ const old = this.ref;
34
+ if (old?.number === ref?.number && old?.index === ref?.index && old?.count === ref?.count && old?.note === ref?.note)
35
+ return;
36
+ this.ref = ref;
37
+ }
38
+ /** Moves the focus to the marker, scrolls to it and marks it. A back link of the note calls it. */
39
+ reveal() {
40
+ revealFootnoteTarget(this, this.internals, this.renderRoot.querySelector("a"));
41
+ }
42
+ willUpdate(changed) {
43
+ if (changed.has("note") && this.hasUpdated)
44
+ scheduleFootnotes();
45
+ }
46
+ async getUpdateComplete() {
47
+ const done = await super.getUpdateComplete();
48
+ await footnotesSettled();
49
+ return await super.getUpdateComplete() && done;
50
+ }
51
+ static styles = [base, css`
52
+ :host {
53
+ display: inline;
54
+ scroll-margin-block: var(--bk-footnote-scroll-margin, calc(var(--bk-shell-app-sticky-top, var(--bk-height-header, calc(var(--bk-control-md) + var(--bk-space-5)))) + var(--bk-space-4)));
55
+ }
56
+ sup {
57
+ vertical-align: super; line-height: 0;
58
+ font-size: var(--bk-footnote-font-size, 0.75em); font-weight: var(--bk-footnote-font-weight, var(--bk-weight-medium));
59
+ font-variant-numeric: tabular-nums; font-style: normal; letter-spacing: normal;
60
+ }
61
+ a {
62
+ position: relative; padding-inline: var(--bk-footnote-padding-inline, var(--bk-space-0));
63
+ border-radius: var(--bk-footnote-radius, var(--bk-radius-xs));
64
+ color: var(--bk-footnote-fg, var(--bk-link)); text-decoration: none;
65
+ transition: background-color var(--bk-duration-slow) var(--bk-ease);
66
+ }
67
+ /* The hit area is at least --bk-target-min; the visible number stays small. */
68
+ a::before { content: ""; position: absolute; inset: min(0px, calc((100% - var(--bk-target-min)) / 2)); }
69
+ @media (hover: hover) {
70
+ a:hover { color: var(--bk-footnote-hover-fg, var(--bk-link-hover)); text-decoration: underline; }
71
+ }
72
+ a:focus { outline: none; }
73
+ a:focus-visible { outline: var(--bk-focus-ring); outline-offset: var(--bk-focus-offset); }
74
+ :host(:state(target)) a { background: var(--bk-footnote-target-bg, var(--bk-accent-soft)); }
75
+ @media (forced-colors: active) {
76
+ a { color: LinkText; }
77
+ :host(:state(target)) a { outline: var(--bk-border-width) solid Highlight; }
78
+ }
79
+ `];
80
+ onClick = (e) => {
81
+ if (!this.ref || !isPlainClick(e))
82
+ return;
83
+ e.preventDefault();
84
+ this.ref.note.reveal();
85
+ };
86
+ render() {
87
+ const ref = this.ref;
88
+ if (!ref)
89
+ return nothing;
90
+ return html`<sup part="marker"><a part="link" href="#${ref.note.id}" aria-label=${this.i18n.t("footnoteN", { number: ref.number })} @click=${this.onClick}>${ref.number}</a></sup>`;
91
+ }
92
+ }
93
+ define("bk-footnote", BkFootnote);
94
+ export {
95
+ BkFootnote
96
+ };
97
+ //# sourceMappingURL=bk-footnote.js.map
@@ -0,0 +1,92 @@
1
+ import { LitElement } from "lit";
2
+ import { type FootnoteMarker, type FootnoteNote } from "../internal/footnotes.js";
3
+ import "./bk-icon.js";
4
+ import "../icons/set/arrow-up.js";
5
+ export type { NavigateDetail } from "../internal/link.js";
6
+ /**
7
+ * One note in a `<bk-footnotes>` list: the source text, an optional link and an optional date. Its `id` is the
8
+ * id that the markers (`<bk-footnote note="…">`) name.
9
+ *
10
+ * ```html
11
+ * <bk-footnotes-item id="cpi" href="https://example.com/cpi" date="2026-11">Statistics office, consumer price index.</bk-footnotes-item>
12
+ * ```
13
+ *
14
+ * - The number comes from the first marker of the note on the page. The list shows the notes in the order of their
15
+ * numbers.
16
+ * - After the text, the note shows a back link to each marker: one arrow for one marker, the letters a, b, … for
17
+ * several markers. A back link moves the focus to its marker.
18
+ * - `href` adds a link to the source. Its text is the host of the address ("example.com"). Write a link with
19
+ * another text in the content.
20
+ * - `date` is the date of the data, as `YYYY`, `YYYY-MM` or `YYYY-MM-DD`. The note shows "As of {date}" (i18n
21
+ * `footnoteAsOf`), formatted in the language of the page.
22
+ * - A marker that jumps to the note marks it (`:state(target)`), as `:target` does for a fragment.
23
+ *
24
+ * @slot - The text of the note.
25
+ * @csspart number - The number.
26
+ * @csspart body - The text, the link, the date and the back links. It receives the focus from a marker.
27
+ * @csspart source - The link to the source.
28
+ * @csspart date - The date.
29
+ * @csspart back - Each back link.
30
+ * @cssprop --bk-footnotes-item-number-fg - Colour of the number (default --bk-text-muted).
31
+ * @cssprop --bk-footnotes-item-link-fg - Colour of the source link and of the back links (default --bk-link).
32
+ * @cssprop --bk-footnotes-item-link-hover-fg - Colour of the source link and of the back links on hover (default --bk-link-hover).
33
+ * @cssprop --bk-footnotes-item-target-bg - Mark of the note when a marker jumped to it (default --bk-accent-soft).
34
+ * @cssprop --bk-footnotes-item-radius - Corner radius of the mark and of the focus ring (default --bk-radius-xs).
35
+ * @cssprop --bk-footnotes-item-separator-gap - Space around the dot between the text, the link and the date (default --bk-space-1).
36
+ * @cssprop --bk-footnotes-item-scroll-margin - Space above the note when a marker scrolls to it (default the header height plus --bk-space-4).
37
+ *
38
+ * @fires {CustomEvent<NavigateDetail>} navigate - The user makes a plain click on the source link (primary button, no modifier key, no other `target`, no `download`). `detail.href` is the resolved address. The event bubbles, is composed and is cancelable. `preventDefault()` stops the browser, and the router of the app takes over.
39
+ * @tag bk-footnotes-item
40
+ * @keyboard Enter - On a back link: moves the focus to the marker.
41
+ * @a11y The note is a `listitem`. A marker moves the focus to it (the body has `tabindex="-1"`). Each back link has the name "Go back to reference {number}" (i18n `footnoteBack`), with the letter of the marker when the note has several markers ("1a").
42
+ */
43
+ export declare class BkFootnotesItem extends LitElement implements FootnoteNote {
44
+ static properties: {
45
+ href: {};
46
+ target: {};
47
+ rel: {};
48
+ date: {};
49
+ number: {
50
+ state: boolean;
51
+ };
52
+ markers: {
53
+ state: boolean;
54
+ };
55
+ };
56
+ /** Address of the source. */
57
+ href: string | undefined;
58
+ /** `target` of the source link. */
59
+ target: string | undefined;
60
+ /** `rel` of the source link. */
61
+ rel: string | undefined;
62
+ /** Date of the data: `YYYY`, `YYYY-MM` or `YYYY-MM-DD`. */
63
+ date: string | undefined;
64
+ /** The number of the note, after the page numbered the notes. The registry sets it. */
65
+ number: number | undefined;
66
+ /** The markers of the note, in the order of the page. */
67
+ private markers;
68
+ private i18n;
69
+ private links;
70
+ private internals;
71
+ /** The `id` is the name of the note: a new id numbers the page again. */
72
+ private ids;
73
+ constructor();
74
+ connectedCallback(): void;
75
+ disconnectedCallback(): void;
76
+ /** @internal */
77
+ setFootnoteState(number: number | undefined, markers: FootnoteMarker[]): void;
78
+ /** Moves the focus to the note, scrolls to it and marks it. A marker calls it. */
79
+ reveal(): void;
80
+ protected updated(): void;
81
+ protected getUpdateComplete(): Promise<boolean>;
82
+ static styles: import("lit").CSSResult[];
83
+ private onBack;
84
+ private renderBacks;
85
+ render(): import("lit-html").TemplateResult<1>;
86
+ }
87
+ declare global {
88
+ interface HTMLElementTagNameMap {
89
+ "bk-footnotes-item": BkFootnotesItem;
90
+ }
91
+ }
92
+ //# sourceMappingURL=bk-footnotes-item.d.ts.map
@@ -0,0 +1,139 @@
1
+ import { LitElement, css, html, nothing } from "lit";
2
+ import { ifDefined } from "lit/directives/if-defined.js";
3
+ import { LocalizeController } from "../i18n.js";
4
+ import { define } from "../internal/define.js";
5
+ import { addFootnoteNote, clearFootnoteTarget, footnoteLetter, footnotesSettled, isPlainClick, removeFootnoteNote, revealFootnoteTarget, scheduleFootnotes } from "../internal/footnotes.js";
6
+ import { setHostVars } from "../internal/host-vars.js";
7
+ import { LinkController, sourceHost } from "../internal/link.js";
8
+ import { mutationObserver } from "../internal/server.js";
9
+ import { base } from "../internal/styles.js";
10
+ import "./bk-icon.js";
11
+ import "../icons/set/arrow-up.js";
12
+ function formatNoteDate(value, locale) {
13
+ const m = /^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?$/.exec(value.trim());
14
+ if (!m)
15
+ return value;
16
+ const [, y, mo, d] = m;
17
+ const date = new Date(Date.UTC(Number(y), mo ? Number(mo) - 1 : 0, d ? Number(d) : 1));
18
+ const options = d ? { dateStyle: "medium" } : mo ? { month: "short", year: "numeric" } : { year: "numeric" };
19
+ return new Intl.DateTimeFormat(locale, { ...options, timeZone: "UTC" }).format(date);
20
+ }
21
+ class BkFootnotesItem extends LitElement {
22
+ static properties = {
23
+ href: {},
24
+ target: {},
25
+ rel: {},
26
+ date: {},
27
+ number: { state: true },
28
+ markers: { state: true }
29
+ };
30
+ i18n = new LocalizeController(this);
31
+ links = new LinkController(this);
32
+ internals = this.attachInternals();
33
+ /** The `id` is the name of the note: a new id numbers the page again. */
34
+ ids = mutationObserver(() => scheduleFootnotes());
35
+ constructor() {
36
+ super();
37
+ this.markers = [];
38
+ this.internals.role = "listitem";
39
+ }
40
+ connectedCallback() {
41
+ super.connectedCallback();
42
+ addFootnoteNote(this);
43
+ this.ids.observe(this, { attributes: true, attributeFilter: ["id"] });
44
+ }
45
+ disconnectedCallback() {
46
+ super.disconnectedCallback();
47
+ this.ids.disconnect();
48
+ removeFootnoteNote(this);
49
+ clearFootnoteTarget(this);
50
+ }
51
+ /** @internal */
52
+ setFootnoteState(number, markers) {
53
+ if (this.number !== number)
54
+ this.number = number;
55
+ if (markers.length !== this.markers.length || markers.some((m, i) => m !== this.markers[i]))
56
+ this.markers = markers;
57
+ }
58
+ /** Moves the focus to the note, scrolls to it and marks it. A marker calls it. */
59
+ reveal() {
60
+ revealFootnoteTarget(this, this.internals, this.renderRoot.querySelector(".body"));
61
+ }
62
+ updated() {
63
+ setHostVars(this, { "--_bk-footnotes-item-order": this.number === void 0 ? "" : String(this.number) });
64
+ }
65
+ async getUpdateComplete() {
66
+ const done = await super.getUpdateComplete();
67
+ await footnotesSettled();
68
+ return await super.getUpdateComplete() && done;
69
+ }
70
+ static styles = [base, css`
71
+ :host {
72
+ display: grid; grid-column: 1 / -1; align-items: baseline; min-width: 0;
73
+ grid-template-columns: var(--_bk-footnotes-subgrid, auto minmax(0, 1fr));
74
+ column-gap: var(--_bk-footnotes-gap, var(--bk-space-2));
75
+ order: var(--_bk-footnotes-item-order, 0);
76
+ border-radius: var(--bk-footnotes-item-radius, var(--bk-radius-xs));
77
+ scroll-margin-block: var(--bk-footnotes-item-scroll-margin, calc(var(--bk-shell-app-sticky-top, var(--bk-height-header, calc(var(--bk-control-md) + var(--bk-space-5)))) + var(--bk-space-4)));
78
+ transition: background-color var(--bk-duration-slow) var(--bk-ease), box-shadow var(--bk-duration-slow) var(--bk-ease);
79
+ }
80
+ /* The mark spreads around the note with a ring of its own colour: the text keeps its place. */
81
+ :host(:state(target)) {
82
+ background: var(--bk-footnotes-item-target-bg, var(--bk-accent-soft));
83
+ box-shadow: 0 0 0 var(--bk-space-1) var(--bk-footnotes-item-target-bg, var(--bk-accent-soft));
84
+ }
85
+ .number { color: var(--bk-footnotes-item-number-fg, var(--bk-text-muted)); font-variant-numeric: tabular-nums; text-align: end; }
86
+ .body { min-width: 0; overflow-wrap: break-word; border-radius: var(--bk-footnotes-item-radius, var(--bk-radius-xs)); }
87
+ .body:focus { outline: none; }
88
+ .body:focus-visible { outline: var(--bk-focus-ring); outline-offset: var(--bk-focus-offset); }
89
+ .part::before { content: "·" / ""; margin-inline: var(--bk-footnotes-item-separator-gap, var(--bk-space-1)); }
90
+ a { position: relative; color: var(--bk-footnotes-item-link-fg, var(--bk-link)); border-radius: var(--bk-radius-xs); }
91
+ .source { text-decoration: underline; text-underline-offset: 0.2em; }
92
+ @media (hover: hover) { a:hover { color: var(--bk-footnotes-item-link-hover-fg, var(--bk-link-hover)); } }
93
+ a:focus { outline: none; }
94
+ a:focus-visible { outline: var(--bk-focus-ring); outline-offset: var(--bk-focus-offset); }
95
+ /* The hit area is at least --bk-target-min; the visible arrow and letters stay small. */
96
+ .back::before { content: ""; position: absolute; inset: min(0px, calc((100% - var(--bk-target-min)) / 2)); }
97
+ .backs { display: inline-flex; align-items: baseline; margin-inline-start: var(--bk-space-1-5); white-space: nowrap; }
98
+ /* Each back link is as wide as the smallest target, so the letters a, b, … are targets that do not overlap. */
99
+ .back {
100
+ display: inline-flex; justify-content: center; align-self: center; min-inline-size: var(--bk-target-min);
101
+ text-decoration: none; font-weight: var(--bk-weight-medium);
102
+ }
103
+ @media (hover: hover) { .back:hover { text-decoration: underline; } }
104
+ bk-icon { --bk-icon-size: 1em; color: var(--bk-footnotes-item-number-fg, var(--bk-text-muted)); align-self: center; }
105
+ .back bk-icon { color: inherit; }
106
+ @media (forced-colors: active) {
107
+ a { color: LinkText; }
108
+ :host(:state(target)) { outline: var(--bk-border-width) solid Highlight; }
109
+ }
110
+ `];
111
+ onBack = (e) => {
112
+ if (!isPlainClick(e))
113
+ return;
114
+ e.preventDefault();
115
+ const i = Number(e.currentTarget.dataset.index);
116
+ this.markers[i]?.reveal();
117
+ };
118
+ renderBacks() {
119
+ const markers = this.markers;
120
+ if (!markers.length || this.number === void 0)
121
+ return nothing;
122
+ const label = (i) => this.i18n.t("footnoteBack", { label: markers.length > 1 ? `${this.number}${footnoteLetter(i)}` : String(this.number) });
123
+ if (markers.length === 1) {
124
+ return html`<span class="backs"><a class="back" part="back" href="#" data-index="0" aria-label=${label(0)} @click=${this.onBack}><bk-icon name="arrow-up"></bk-icon></a></span>`;
125
+ }
126
+ return html`<span class="backs"><bk-icon name="arrow-up"></bk-icon>${markers.map((_, i) => html`<a class="back" part="back" href="#" data-index=${i} aria-label=${label(i)} @click=${this.onBack}>${footnoteLetter(i)}</a>`)}</span>`;
127
+ }
128
+ render() {
129
+ const locale = this.i18n.locale;
130
+ const host = this.href ? sourceHost(this.href) || this.href : "";
131
+ return html`<span class="number" part="number">${this.number ?? nothing}</span>
132
+ <span class="body" part="body" tabindex="-1"><slot></slot>${this.href ? html`<span class="part"><a class="source" part="source" href=${this.links.href(this.href)} target=${ifDefined(this.target)} rel=${ifDefined(this.rel)} @click=${this.links.click}>${host}</a></span>` : nothing}${this.date ? html`<span class="part"><time part="date" datetime=${this.date}>${this.i18n.t("footnoteAsOf", { date: formatNoteDate(this.date, locale) })}</time></span>` : nothing}${this.renderBacks()}</span>`;
133
+ }
134
+ }
135
+ define("bk-footnotes-item", BkFootnotesItem);
136
+ export {
137
+ BkFootnotesItem
138
+ };
139
+ //# sourceMappingURL=bk-footnotes-item.js.map
@@ -0,0 +1,51 @@
1
+ import { LitElement } from "lit";
2
+ import "./bk-footnotes-item.js";
3
+ /**
4
+ * The list of the notes of a page or of a part of it: the sources and the remarks that the markers
5
+ * (`<bk-footnote>`) in the text refer to. Put it at the end of the content, in a `bk-page-section` or in the footer
6
+ * of the page, under a heading of the app ("Sources", "Notes").
7
+ *
8
+ * ```html
9
+ * <p>Prices rose by 2.1 %<bk-footnote note="cpi"></bk-footnote> in a year.</p>
10
+ * <bk-footnotes>
11
+ * <bk-footnotes-item id="cpi" href="https://example.com/cpi" date="2026-11">Statistics office, consumer price index.</bk-footnotes-item>
12
+ * </bk-footnotes>
13
+ * ```
14
+ *
15
+ * - Each list numbers its own notes from 1, in the order of their first marker on the page. A note without a marker
16
+ * gets a number after them. A second list (the notes of a table) starts again at 1.
17
+ * - The list shows the notes in the order of their numbers. Write them in this order too: screen readers and the
18
+ * Tab key follow the order of the markup.
19
+ * - The notes are smaller than the body text and muted.
20
+ *
21
+ * Content, no surface.
22
+ *
23
+ * @slot - The `<bk-footnotes-item>` elements.
24
+ * @cssprop --bk-footnotes-fg - Colour of the text of the notes (default --bk-text-muted).
25
+ * @cssprop --bk-footnotes-font-size - Text size of the notes (default --bk-type-small).
26
+ * @cssprop --bk-footnotes-gap - Space between the number and the text (default --bk-space-2).
27
+ * @cssprop --bk-footnotes-row-gap - Space between the notes (default --bk-space-1-5).
28
+ *
29
+ * @tag bk-footnotes
30
+ * @a11y The list is a `list` with the name "Footnotes" (i18n `footnotes`; `label` sets another name). Each note is a `listitem`.
31
+ */
32
+ export declare class BkFootnotes extends LitElement {
33
+ static properties: {
34
+ label: {};
35
+ };
36
+ /** Accessible name of the list (default: "Footnotes", i18n `footnotes`). */
37
+ label: string | undefined;
38
+ private i18n;
39
+ private internals;
40
+ constructor();
41
+ connectedCallback(): void;
42
+ protected willUpdate(): void;
43
+ static styles: import("lit").CSSResult[];
44
+ render(): import("lit-html").TemplateResult<1>;
45
+ }
46
+ declare global {
47
+ interface HTMLElementTagNameMap {
48
+ "bk-footnotes": BkFootnotes;
49
+ }
50
+ }
51
+ //# sourceMappingURL=bk-footnotes.d.ts.map
@@ -0,0 +1,43 @@
1
+ import { LitElement, css, html } from "lit";
2
+ import { LocalizeController } from "../i18n.js";
3
+ import { define } from "../internal/define.js";
4
+ import { scheduleFootnotes } from "../internal/footnotes.js";
5
+ import { base } from "../internal/styles.js";
6
+ import "./bk-footnotes-item.js";
7
+ class BkFootnotes extends LitElement {
8
+ static properties = {
9
+ label: {}
10
+ };
11
+ i18n = new LocalizeController(this);
12
+ internals = this.attachInternals();
13
+ constructor() {
14
+ super();
15
+ this.internals.role = "list";
16
+ }
17
+ connectedCallback() {
18
+ super.connectedCallback();
19
+ scheduleFootnotes();
20
+ }
21
+ willUpdate() {
22
+ this.internals.ariaLabel = this.label || this.i18n.t("footnotes");
23
+ }
24
+ static styles = [base, css`
25
+ :host {
26
+ display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; min-width: 0;
27
+ column-gap: var(--bk-footnotes-gap, var(--bk-space-2));
28
+ row-gap: var(--bk-footnotes-row-gap, var(--bk-space-1-5));
29
+ font-size: var(--bk-footnotes-font-size, var(--bk-type-small)); line-height: var(--bk-line-height-body);
30
+ color: var(--bk-footnotes-fg, var(--bk-text-muted));
31
+ }
32
+ /* The numbers of all notes share one column: the texts start on one line. */
33
+ ::slotted(bk-footnotes-item) { --_bk-footnotes-subgrid: subgrid; --_bk-footnotes-gap: var(--bk-footnotes-gap, var(--bk-space-2)); }
34
+ `];
35
+ render() {
36
+ return html`<slot></slot>`;
37
+ }
38
+ }
39
+ define("bk-footnotes", BkFootnotes);
40
+ export {
41
+ BkFootnotes
42
+ };
43
+ //# sourceMappingURL=bk-footnotes.js.map
@@ -2,7 +2,7 @@ import { LitElement, css, isServer, nothing } from "lit";
2
2
  import { define } from "../internal/define.js";
3
3
  import { base } from "../internal/styles.js";
4
4
  import { getIcon, onIconsChanged } from "../icons/registry.js";
5
- import { iconLoaders } from "../icons/load.js";
5
+ import { iconLoaders } from "#bk/icons/load.js";
6
6
  class BkIcon extends LitElement {
7
7
  static properties = {
8
8
  name: { reflect: true, useDefault: true },
@@ -83,7 +83,7 @@ function loadIcon(name) {
83
83
  load().catch(() => console.warn(`<bk-icon>: cannot load the icon "${name}".`));
84
84
  return;
85
85
  }
86
- console.warn(`<bk-icon>: unknown icon "${name}". Register it with registerIcons(): it is not in the core set of @bk2k/ui.`);
86
+ console.warn(`<bk-icon>: no code loaded the icon "${name}". For an icon of the core set, add: import "@bk2k/ui/icons/${name}.js"; for another icon, register it with registerIcons().`);
87
87
  }
88
88
  const templates = /* @__PURE__ */ new Map();
89
89
  function template(name) {