@bk2k/ui 0.6.8 → 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 (471) hide show
  1. package/BUILDING.md +56 -2
  2. package/CHANGELOG.md +136 -0
  3. package/USAGE.md +89 -26
  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.js +2 -1
  9. package/dist/clipboard.js +1 -0
  10. package/dist/components/bk-alert.js +2 -1
  11. package/dist/components/bk-avatar-group.js +4 -6
  12. package/dist/components/bk-avatar.d.ts +10 -0
  13. package/dist/components/bk-avatar.js +17 -0
  14. package/dist/components/bk-bar.js +2 -0
  15. package/dist/components/bk-button-group.js +1 -1
  16. package/dist/components/bk-button-top.js +2 -1
  17. package/dist/components/bk-button.d.ts +37 -14
  18. package/dist/components/bk-button.js +52 -16
  19. package/dist/components/bk-card.d.ts +4 -0
  20. package/dist/components/bk-card.js +15 -2
  21. package/dist/components/bk-carousel-controls.d.ts +2 -0
  22. package/dist/components/bk-carousel-controls.js +4 -2
  23. package/dist/components/bk-chart-area.d.ts +6 -0
  24. package/dist/components/bk-chart-bar.d.ts +17 -0
  25. package/dist/components/bk-chart-bar.js +25 -4
  26. package/dist/components/bk-chart-line.d.ts +13 -0
  27. package/dist/components/bk-chart-line.js +11 -1
  28. package/dist/components/bk-chip-group.d.ts +2 -2
  29. package/dist/components/bk-chip-group.js +4 -0
  30. package/dist/components/bk-chip.d.ts +53 -8
  31. package/dist/components/bk-chip.js +43 -7
  32. package/dist/components/bk-code.js +6 -2
  33. package/dist/components/bk-columns.d.ts +11 -0
  34. package/dist/components/bk-columns.js +8 -1
  35. package/dist/components/bk-combobox.d.ts +1 -1
  36. package/dist/components/bk-combobox.js +2 -1
  37. package/dist/components/bk-delta.d.ts +10 -0
  38. package/dist/components/bk-delta.js +8 -6
  39. package/dist/components/bk-dialog.d.ts +12 -5
  40. package/dist/components/bk-dialog.js +14 -6
  41. package/dist/components/bk-disclosure.js +4 -2
  42. package/dist/components/bk-drop-target.d.ts +7 -1
  43. package/dist/components/bk-drop-target.js +20 -4
  44. package/dist/components/bk-error-summary.d.ts +5 -0
  45. package/dist/components/bk-error-summary.js +13 -4
  46. package/dist/components/bk-facts.js +3 -2
  47. package/dist/components/bk-footnote.d.ts +73 -0
  48. package/dist/components/bk-footnote.js +97 -0
  49. package/dist/components/bk-footnotes-item.d.ts +92 -0
  50. package/dist/components/bk-footnotes-item.js +139 -0
  51. package/dist/components/bk-footnotes.d.ts +51 -0
  52. package/dist/components/bk-footnotes.js +43 -0
  53. package/dist/components/bk-icon.js +2 -2
  54. package/dist/components/bk-image-compare.d.ts +33 -5
  55. package/dist/components/bk-image-compare.js +72 -24
  56. package/dist/components/bk-image-crop.d.ts +3 -3
  57. package/dist/components/bk-image-editor.d.ts +1 -1
  58. package/dist/components/bk-image-viewer.d.ts +107 -11
  59. package/dist/components/bk-image-viewer.js +205 -34
  60. package/dist/components/bk-input-inline.d.ts +15 -6
  61. package/dist/components/bk-input-inline.js +22 -6
  62. package/dist/components/bk-input-number.js +2 -1
  63. package/dist/components/bk-input-search.d.ts +1 -1
  64. package/dist/components/bk-input-search.js +2 -1
  65. package/dist/components/bk-input-text.d.ts +11 -0
  66. package/dist/components/bk-input-text.js +17 -3
  67. package/dist/components/bk-input-time.js +2 -1
  68. package/dist/components/bk-item.js +2 -1
  69. package/dist/components/bk-lightbox.d.ts +12 -3
  70. package/dist/components/bk-lightbox.js +6 -3
  71. package/dist/components/bk-link.d.ts +9 -1
  72. package/dist/components/bk-link.js +14 -4
  73. package/dist/components/bk-menu-item.d.ts +40 -0
  74. package/dist/components/bk-menu-item.js +57 -9
  75. package/dist/components/bk-menu-label.js +2 -1
  76. package/dist/components/bk-menu-list.d.ts +1 -0
  77. package/dist/components/bk-menu-list.js +10 -0
  78. package/dist/components/bk-menu.d.ts +8 -1
  79. package/dist/components/bk-menu.js +16 -5
  80. package/dist/components/bk-message-feedback.d.ts +4 -3
  81. package/dist/components/bk-message-feedback.js +7 -5
  82. package/dist/components/bk-message-list.js +2 -1
  83. package/dist/components/bk-message-source.d.ts +1 -2
  84. package/dist/components/bk-message-source.js +3 -11
  85. package/dist/components/bk-message.js +2 -0
  86. package/dist/components/bk-nav-group.js +1 -1
  87. package/dist/components/bk-nav-item.d.ts +18 -0
  88. package/dist/components/bk-nav-item.js +18 -5
  89. package/dist/components/bk-nav.d.ts +1 -1
  90. package/dist/components/bk-page-cta.js +2 -0
  91. package/dist/components/bk-page-section.d.ts +1 -1
  92. package/dist/components/bk-page-section.js +3 -9
  93. package/dist/components/bk-pane.d.ts +1 -0
  94. package/dist/components/bk-pane.js +7 -5
  95. package/dist/components/bk-panel.d.ts +1 -1
  96. package/dist/components/bk-panel.js +6 -5
  97. package/dist/components/bk-picture.d.ts +17 -4
  98. package/dist/components/bk-picture.js +8 -1
  99. package/dist/components/bk-segmented-item.d.ts +24 -4
  100. package/dist/components/bk-segmented-item.js +37 -5
  101. package/dist/components/bk-segmented.js +2 -13
  102. package/dist/components/bk-select-cascade.d.ts +1 -1
  103. package/dist/components/bk-select-tree.d.ts +1 -1
  104. package/dist/components/bk-select.d.ts +1 -1
  105. package/dist/components/bk-shell-app.d.ts +10 -4
  106. package/dist/components/bk-shell-app.js +32 -9
  107. package/dist/components/bk-shell-sites.d.ts +2 -1
  108. package/dist/components/bk-shell-sites.js +3 -5
  109. package/dist/components/bk-sortable.js +7 -17
  110. package/dist/components/bk-split-grid.d.ts +104 -3
  111. package/dist/components/bk-split-grid.js +425 -2
  112. package/dist/components/bk-stat-group.js +2 -1
  113. package/dist/components/bk-stat.d.ts +17 -0
  114. package/dist/components/bk-stat.js +7 -3
  115. package/dist/components/bk-steps.js +2 -1
  116. package/dist/components/bk-surface.d.ts +2 -0
  117. package/dist/components/bk-surface.js +6 -3
  118. package/dist/components/bk-table.d.ts +1 -1
  119. package/dist/components/bk-table.js +9 -12
  120. package/dist/components/bk-tabs-item.d.ts +45 -7
  121. package/dist/components/bk-tabs-item.js +51 -20
  122. package/dist/components/bk-tabs-panel.d.ts +6 -3
  123. package/dist/components/bk-tabs-panel.js +6 -0
  124. package/dist/components/bk-tabs.d.ts +50 -7
  125. package/dist/components/bk-tabs.js +168 -96
  126. package/dist/components/bk-text.js +2 -1
  127. package/dist/components/bk-toast-group.d.ts +3 -1
  128. package/dist/components/bk-toast-group.js +11 -1
  129. package/dist/components/bk-tooltip.d.ts +3 -1
  130. package/dist/components/bk-tooltip.js +2 -1
  131. package/dist/components/bk-video.js +2 -2
  132. package/dist/components/bk-zoom.d.ts +3 -1
  133. package/dist/components/confirm.d.ts +15 -0
  134. package/dist/components/confirm.js +27 -4
  135. package/dist/i18n/de.js +12 -1
  136. package/dist/i18n/en.d.ts +2 -0
  137. package/dist/i18n/en.js +3 -0
  138. package/dist/i18n.d.ts +16 -2
  139. package/dist/i18n.js +28 -4
  140. package/dist/icons/brands-static.d.ts +3 -0
  141. package/dist/icons/brands-static.js +5 -0
  142. package/dist/icons/core.d.ts +1 -0
  143. package/dist/icons/core.js +2 -0
  144. package/dist/icons/load-static.d.ts +3 -0
  145. package/dist/icons/load-static.js +5 -0
  146. package/dist/icons/load.js +1 -0
  147. package/dist/icons/registry.js +1 -1
  148. package/dist/icons/set/save-as.d.ts +3 -0
  149. package/dist/icons/set/save-as.js +7 -0
  150. package/dist/index.d.ts +3 -0
  151. package/dist/index.js +3 -0
  152. package/dist/internal/announcer.d.ts +8 -1
  153. package/dist/internal/announcer.js +26 -10
  154. package/dist/internal/backdrop.d.ts +19 -0
  155. package/dist/internal/backdrop.js +29 -0
  156. package/dist/internal/busy.d.ts +3 -2
  157. package/dist/internal/busy.js +4 -5
  158. package/dist/internal/choice-field.js +1 -1
  159. package/dist/internal/choice-item.d.ts +17 -6
  160. package/dist/internal/choice-item.js +20 -9
  161. package/dist/internal/cloak.js +3 -0
  162. package/dist/internal/crop-frame.d.ts +1 -1
  163. package/dist/internal/crop-frame.js +2 -7
  164. package/dist/internal/date-field.js +2 -1
  165. package/dist/internal/drag.d.ts +11 -0
  166. package/dist/internal/drag.js +23 -0
  167. package/dist/internal/english-static.d.ts +3 -0
  168. package/dist/internal/english-static.js +5 -0
  169. package/dist/internal/english.d.ts +8 -0
  170. package/dist/internal/english.js +6 -0
  171. package/dist/internal/footnotes.d.ts +56 -0
  172. package/dist/internal/footnotes.js +143 -0
  173. package/dist/internal/handle-menu.js +2 -5
  174. package/dist/internal/late/bk-shell-app.d.ts +4 -0
  175. package/dist/internal/late/bk-shell-app.js +7 -0
  176. package/dist/internal/late/bk-table.d.ts +4 -0
  177. package/dist/internal/late/bk-table.js +17 -0
  178. package/dist/internal/late/handle-menu.d.ts +4 -0
  179. package/dist/internal/late/handle-menu.js +9 -0
  180. package/dist/internal/late/static.d.ts +7 -0
  181. package/dist/internal/late/static.js +5 -0
  182. package/dist/internal/late.d.ts +8 -3
  183. package/dist/internal/late.js +19 -4
  184. package/dist/internal/link.d.ts +2 -0
  185. package/dist/internal/link.js +11 -1
  186. package/dist/internal/own-text.d.ts +8 -0
  187. package/dist/internal/own-text.js +7 -0
  188. package/dist/internal/scope.js +1 -1
  189. package/dist/internal/scroll-lock.d.ts +4 -1
  190. package/dist/internal/scroll-lock.js +17 -4
  191. package/dist/internal/slider.js +2 -1
  192. package/dist/internal/styles.js +3 -0
  193. package/dist/internal/submit.d.ts +23 -0
  194. package/dist/internal/submit.js +57 -0
  195. package/dist/jsx.d.ts +141 -52
  196. package/dist/reset.css +10 -0
  197. package/dist/standalone/all.js +226 -222
  198. package/dist/standalone/appearance.js +1 -1
  199. package/dist/standalone/bk-accordion-item.js +4 -4
  200. package/dist/standalone/bk-accordion.js +2 -2
  201. package/dist/standalone/bk-action-bar.js +3 -3
  202. package/dist/standalone/bk-alert-offline.js +1 -2
  203. package/dist/standalone/bk-alert.js +13 -12
  204. package/dist/standalone/bk-app-state.js +1 -1
  205. package/dist/standalone/bk-attachment.js +4 -4
  206. package/dist/standalone/bk-avatar-group.js +12 -10
  207. package/dist/standalone/bk-avatar.js +14 -4
  208. package/dist/standalone/bk-badge.js +2 -2
  209. package/dist/standalone/bk-bar.js +3 -1
  210. package/dist/standalone/bk-brand.js +3 -3
  211. package/dist/standalone/bk-breadcrumbs.js +5 -5
  212. package/dist/standalone/bk-button-copy.js +5 -5
  213. package/dist/standalone/bk-button-group.js +5 -5
  214. package/dist/standalone/bk-button-share.js +5 -5
  215. package/dist/standalone/bk-button-top.js +9 -8
  216. package/dist/standalone/bk-button.js +62 -30
  217. package/dist/standalone/bk-calendar-event.js +1 -1
  218. package/dist/standalone/bk-calendar-week.js +3 -3
  219. package/dist/standalone/bk-calendar.js +4 -4
  220. package/dist/standalone/bk-card.js +20 -7
  221. package/dist/standalone/bk-carousel-controls.js +7 -6
  222. package/dist/standalone/bk-carousel-item.js +2 -2
  223. package/dist/standalone/bk-carousel.js +1 -1
  224. package/dist/standalone/bk-chart-area.js +1 -1
  225. package/dist/standalone/bk-chart-bar-list.js +8 -8
  226. package/dist/standalone/bk-chart-bar.js +145 -117
  227. package/dist/standalone/bk-chart-bridge.js +7 -7
  228. package/dist/standalone/bk-chart-bullet.js +6 -6
  229. package/dist/standalone/bk-chart-calendar.js +7 -7
  230. package/dist/standalone/bk-chart-heatmap.js +7 -7
  231. package/dist/standalone/bk-chart-histogram.js +5 -5
  232. package/dist/standalone/bk-chart-legend.js +6 -6
  233. package/dist/standalone/bk-chart-line.js +116 -103
  234. package/dist/standalone/bk-chart-mark.js +1 -1
  235. package/dist/standalone/bk-chart-scatter.js +6 -6
  236. package/dist/standalone/bk-chart-sparkline.js +6 -6
  237. package/dist/standalone/bk-chart-stacked-bar.js +7 -7
  238. package/dist/standalone/bk-chart-tracker.js +6 -6
  239. package/dist/standalone/bk-chart-waterfall.js +6 -6
  240. package/dist/standalone/bk-checkbox-group.js +4 -4
  241. package/dist/standalone/bk-checkbox.js +4 -4
  242. package/dist/standalone/bk-chip-group.js +9 -5
  243. package/dist/standalone/bk-chip.js +56 -17
  244. package/dist/standalone/bk-cluster.js +1 -1
  245. package/dist/standalone/bk-code-diff.js +4 -4
  246. package/dist/standalone/bk-code-stack.js +4 -4
  247. package/dist/standalone/bk-code.js +10 -6
  248. package/dist/standalone/bk-color-panel.js +5 -5
  249. package/dist/standalone/bk-columns.js +13 -5
  250. package/dist/standalone/bk-combobox.js +9 -8
  251. package/dist/standalone/bk-command-menu.js +6 -6
  252. package/dist/standalone/bk-command-palette.js +6 -5
  253. package/dist/standalone/bk-composer.js +6 -6
  254. package/dist/standalone/bk-delta.js +11 -10
  255. package/dist/standalone/bk-diagram.js +1 -1
  256. package/dist/standalone/bk-dialog.js +1 -1
  257. package/dist/standalone/bk-disclosure.js +7 -5
  258. package/dist/standalone/bk-divider.js +2 -2
  259. package/dist/standalone/bk-drawer.js +3 -3
  260. package/dist/standalone/bk-drop-target.js +12 -6
  261. package/dist/standalone/bk-empty-state.js +3 -3
  262. package/dist/standalone/bk-error-summary.js +9 -6
  263. package/dist/standalone/bk-facts-item.js +2 -2
  264. package/dist/standalone/bk-facts.js +9 -8
  265. package/dist/standalone/bk-feature.js +3 -3
  266. package/dist/standalone/bk-fieldset.js +3 -3
  267. package/dist/standalone/bk-filter-bar.js +4 -4
  268. package/dist/standalone/bk-folder-browser.js +4 -4
  269. package/dist/standalone/bk-footnote.js +82 -0
  270. package/dist/standalone/bk-footnotes-item.js +122 -0
  271. package/dist/standalone/bk-footnotes.js +37 -0
  272. package/dist/standalone/bk-form-guard.js +2 -2
  273. package/dist/standalone/bk-form-steps.js +3 -3
  274. package/dist/standalone/bk-grid.js +1 -1
  275. package/dist/standalone/bk-icon-tile.js +3 -3
  276. package/dist/standalone/bk-icon.js +1 -1
  277. package/dist/standalone/bk-image-compare.js +88 -47
  278. package/dist/standalone/bk-image-crop.js +6 -6
  279. package/dist/standalone/bk-image-editor.js +1 -1
  280. package/dist/standalone/bk-image-viewer.js +180 -59
  281. package/dist/standalone/bk-input-code.js +4 -4
  282. package/dist/standalone/bk-input-color.js +4 -4
  283. package/dist/standalone/bk-input-date-range.js +2 -2
  284. package/dist/standalone/bk-input-date.js +2 -2
  285. package/dist/standalone/bk-input-file.js +5 -5
  286. package/dist/standalone/bk-input-group.js +4 -4
  287. package/dist/standalone/bk-input-inline.js +17 -10
  288. package/dist/standalone/bk-input-number.js +9 -8
  289. package/dist/standalone/bk-input-rating.js +6 -6
  290. package/dist/standalone/bk-input-rich.js +1 -1
  291. package/dist/standalone/bk-input-search.js +23 -22
  292. package/dist/standalone/bk-input-slider-range.js +5 -5
  293. package/dist/standalone/bk-input-slider.js +5 -5
  294. package/dist/standalone/bk-input-text.js +1 -1
  295. package/dist/standalone/bk-input-time-zone.js +1 -1
  296. package/dist/standalone/bk-input-time.js +29 -28
  297. package/dist/standalone/bk-item-group.js +3 -3
  298. package/dist/standalone/bk-item.js +12 -11
  299. package/dist/standalone/bk-kbd-shortcuts.js +4 -3
  300. package/dist/standalone/bk-kbd.js +68 -1
  301. package/dist/standalone/bk-lightbox.js +11 -7
  302. package/dist/standalone/bk-lines.js +1 -1
  303. package/dist/standalone/bk-link.js +33 -19
  304. package/dist/standalone/bk-listbox-columns.js +6 -6
  305. package/dist/standalone/bk-listbox-item.js +1 -1
  306. package/dist/standalone/bk-listbox-search.js +7 -7
  307. package/dist/standalone/bk-listbox-transfer.js +6 -6
  308. package/dist/standalone/bk-listbox.js +7 -7
  309. package/dist/standalone/bk-logo-wall.js +2 -2
  310. package/dist/standalone/bk-logo.js +3 -3
  311. package/dist/standalone/bk-menu-bar.js +3 -3
  312. package/dist/standalone/bk-menu-context.js +1 -1
  313. package/dist/standalone/bk-menu-divider.js +2 -2
  314. package/dist/standalone/bk-menu-item.js +73 -29
  315. package/dist/standalone/bk-menu-label.js +7 -6
  316. package/dist/standalone/bk-menu-list.js +10 -4
  317. package/dist/standalone/bk-menu.js +19 -10
  318. package/dist/standalone/bk-message-approval.js +4 -4
  319. package/dist/standalone/bk-message-branches.js +3 -3
  320. package/dist/standalone/bk-message-citation.js +10 -10
  321. package/dist/standalone/bk-message-feedback.js +10 -6
  322. package/dist/standalone/bk-message-list.js +6 -5
  323. package/dist/standalone/bk-message-reasoning.js +5 -5
  324. package/dist/standalone/bk-message-source.js +13 -21
  325. package/dist/standalone/bk-message-tool-group.js +5 -5
  326. package/dist/standalone/bk-message-tool.js +5 -5
  327. package/dist/standalone/bk-message.js +6 -4
  328. package/dist/standalone/bk-meter.js +3 -3
  329. package/dist/standalone/bk-model-viewer.js +1 -1
  330. package/dist/standalone/bk-nav-divider.js +2 -2
  331. package/dist/standalone/bk-nav-group.js +6 -6
  332. package/dist/standalone/bk-nav-item.js +31 -23
  333. package/dist/standalone/bk-nav-toc.js +3 -3
  334. package/dist/standalone/bk-nav.js +3 -3
  335. package/dist/standalone/bk-overflow.js +3 -3
  336. package/dist/standalone/bk-page-cta.js +5 -3
  337. package/dist/standalone/bk-page-footer-column.js +2 -2
  338. package/dist/standalone/bk-page-footer.js +3 -3
  339. package/dist/standalone/bk-page-header.js +3 -3
  340. package/dist/standalone/bk-page-hero.js +3 -3
  341. package/dist/standalone/bk-page-pager.js +5 -5
  342. package/dist/standalone/bk-page-section.js +6 -6
  343. package/dist/standalone/bk-pagination.js +6 -6
  344. package/dist/standalone/bk-pane.js +10 -9
  345. package/dist/standalone/bk-panel.js +9 -10
  346. package/dist/standalone/bk-period-nav.js +4 -4
  347. package/dist/standalone/bk-picture.js +24 -15
  348. package/dist/standalone/bk-popover-help.js +3 -3
  349. package/dist/standalone/bk-popover.js +2 -2
  350. package/dist/standalone/bk-presence-cursor.js +2 -2
  351. package/dist/standalone/bk-preview.js +4 -4
  352. package/dist/standalone/bk-progress.js +3 -3
  353. package/dist/standalone/bk-prose.js +3 -3
  354. package/dist/standalone/bk-qr-code.js +1 -1
  355. package/dist/standalone/bk-radio-group.js +4 -4
  356. package/dist/standalone/bk-radio.js +3 -3
  357. package/dist/standalone/bk-rating.js +5 -5
  358. package/dist/standalone/bk-scroll.js +3 -3
  359. package/dist/standalone/bk-segmented-item.js +40 -16
  360. package/dist/standalone/bk-segmented.js +15 -13
  361. package/dist/standalone/bk-select-cascade.js +3 -3
  362. package/dist/standalone/bk-select-tree.js +4 -4
  363. package/dist/standalone/bk-select.js +5 -5
  364. package/dist/standalone/bk-shell-app.js +1 -1221
  365. package/dist/standalone/bk-shell-centered.js +2 -2
  366. package/dist/standalone/bk-shell-sites.js +5 -7
  367. package/dist/standalone/bk-skeleton.js +2 -2
  368. package/dist/standalone/bk-sortable.js +55 -60
  369. package/dist/standalone/bk-spinner.js +2 -2
  370. package/dist/standalone/bk-split-grid.js +318 -41
  371. package/dist/standalone/bk-split.js +4 -4
  372. package/dist/standalone/bk-stack.js +1 -1
  373. package/dist/standalone/bk-stat-group.js +8 -7
  374. package/dist/standalone/bk-stat.js +11 -8
  375. package/dist/standalone/bk-status-dot.js +3 -3
  376. package/dist/standalone/bk-steps-item.js +5 -5
  377. package/dist/standalone/bk-steps.js +8 -7
  378. package/dist/standalone/bk-surface.js +1 -1
  379. package/dist/standalone/bk-swatch-group.js +4 -4
  380. package/dist/standalone/bk-swatch-palette.js +1 -1
  381. package/dist/standalone/bk-swatch.js +2 -2
  382. package/dist/standalone/bk-switch.js +4 -4
  383. package/dist/standalone/bk-table.js +1 -1937
  384. package/dist/standalone/bk-tabs-item.js +58 -35
  385. package/dist/standalone/bk-tabs-panel.js +7 -3
  386. package/dist/standalone/bk-tabs.js +160 -98
  387. package/dist/standalone/bk-tasks-item.js +4 -4
  388. package/dist/standalone/bk-tasks.js +2 -2
  389. package/dist/standalone/bk-testimonial.js +3 -3
  390. package/dist/standalone/bk-text.js +19 -18
  391. package/dist/standalone/bk-time-countdown.js +4 -4
  392. package/dist/standalone/bk-time-relative.js +3 -3
  393. package/dist/standalone/bk-timeline-item.js +4 -4
  394. package/dist/standalone/bk-timeline.js +2 -2
  395. package/dist/standalone/bk-toast-group.js +1 -1
  396. package/dist/standalone/bk-toast.js +4 -4
  397. package/dist/standalone/bk-toolbar.js +2 -2
  398. package/dist/standalone/bk-tooltip.js +8 -7
  399. package/dist/standalone/bk-tree-item.js +6 -6
  400. package/dist/standalone/bk-tree.js +3 -3
  401. package/dist/standalone/bk-video.js +6 -6
  402. package/dist/standalone/bk-visually-hidden.js +2 -2
  403. package/dist/standalone/bk-zoom.js +5 -5
  404. package/dist/standalone/chunks/announcer-D1zrRWwO.js +36 -0
  405. package/dist/standalone/chunks/{appearance-waHnV0kk.js → appearance-CBOJXbmC.js} +1 -1
  406. package/dist/standalone/chunks/{bk-alert-offline-B1bQxOZp.js → bk-alert-offline-Clw0ZSsH.js} +3 -3
  407. package/dist/standalone/chunks/{bk-carousel-BCwIQhG5.js → bk-carousel-Biz7t8sL.js} +4 -4
  408. package/dist/standalone/chunks/{bk-diagram-DWK8CvRZ.js → bk-diagram-D_fQf6SF.js} +5 -5
  409. package/dist/standalone/chunks/{bk-dialog-DX0cPJ1o.js → bk-dialog-DwZyUUHh.js} +59 -25
  410. package/dist/standalone/chunks/{bk-icon-DssFsNuB.js → bk-icon-Bp_flKdv.js} +4 -3
  411. package/dist/standalone/chunks/{bk-image-editor-DXEj9gCu.js → bk-image-editor-BADsoLRL.js} +5 -5
  412. package/dist/standalone/chunks/{bk-input-date-range-Cbx_lpf0.js → bk-input-date-range-DHcJ8-5g.js} +2 -2
  413. package/dist/standalone/chunks/{bk-input-rich-ZB68vziu.js → bk-input-rich-CFhW6vRa.js} +6 -6
  414. package/dist/standalone/chunks/{bk-input-text-DD32uWNO.js → bk-input-text-DviyLBqj.js} +63 -54
  415. package/dist/standalone/chunks/{bk-model-viewer-Dr81ahVv.js → bk-model-viewer-w_Ah4Tvs.js} +4 -4
  416. package/dist/standalone/chunks/{bk-qr-code-QaYvZwOR.js → bk-qr-code-CYMovNVl.js} +3 -3
  417. package/dist/standalone/chunks/bk-shell-app-B2lxHit8.js +1235 -0
  418. package/dist/standalone/chunks/{bk-surface-DkIhrWMt.js → bk-surface-D7e0tErs.js} +9 -7
  419. package/dist/standalone/chunks/{bk-swatch-palette-BNNXTP3w.js → bk-swatch-palette-x13JgJQi.js} +6 -6
  420. package/dist/standalone/chunks/bk-table-CP8n_jy7.js +1944 -0
  421. package/dist/standalone/chunks/{bk-toast-group-BSeO_rPs.js → bk-toast-group-CoL6W7uk.js} +27 -24
  422. package/dist/standalone/chunks/{brush-Bn3lPdHN.js → brush-DALmXSru.js} +18 -2
  423. package/dist/standalone/chunks/{busy-B7Mxemwm.js → busy-BUB22mGY.js} +5 -4
  424. package/dist/standalone/chunks/{chart-tokens-D1Exf7BW.js → chart-tokens-DQ4hVSmn.js} +2 -2
  425. package/dist/standalone/chunks/{choice-field-CGvE4tyb.js → choice-field-poOTerh1.js} +6 -6
  426. package/dist/standalone/chunks/{choice-item-B6-9ZRlf.js → choice-item-Cx-nm1js.js} +17 -8
  427. package/dist/standalone/chunks/{clipboard-Crzt1Sh9.js → clipboard-RqIeP9Uz.js} +1 -1
  428. package/dist/standalone/chunks/{clipboard-BKlrP5rj.js → clipboard-UVLSkL4C.js} +1 -1
  429. package/dist/standalone/chunks/{crop-frame-poLCGrBG.js → crop-frame-Z9N0QML4.js} +1 -11
  430. package/dist/standalone/chunks/{date-field-BlI6grfT.js → date-field-B-fCXa2D.js} +48 -47
  431. package/dist/standalone/chunks/{define-CzVPD4Zi.js → define-DkVeu7e9.js} +1 -1
  432. package/dist/standalone/chunks/drag-DT4__0t9.js +12 -0
  433. package/dist/standalone/chunks/footnotes-BeisMxLk.js +94 -0
  434. package/dist/standalone/chunks/{form-control-CyXQIJ2x.js → form-control-CHpfKAKa.js} +2 -2
  435. package/dist/standalone/chunks/{frame-abXBnl8a.js → frame-xIMVEUCi.js} +5 -4
  436. package/dist/standalone/chunks/{handle-menu-ZVR_msk2.js → handle-menu-BgYUbGO2.js} +26 -19
  437. package/dist/standalone/chunks/{heading-text-CV5gBf7k.js → heading-text-CgnCa_q2.js} +1 -1
  438. package/dist/standalone/chunks/{i18n-B6Al9xCK.js → i18n-DFfGgd3d.js} +49 -34
  439. package/dist/standalone/chunks/{i18n-BI16HQmm.js → i18n-DQAcbHkY.js} +1 -1
  440. package/dist/standalone/chunks/link--YWr8exL.js +69 -0
  441. package/dist/standalone/chunks/{marks-0kbeB4n8.js → marks-pOUDNUf1.js} +2 -2
  442. package/dist/standalone/chunks/{options-DMEc8rQt.js → options-BdC8-KKM.js} +2 -2
  443. package/dist/standalone/chunks/own-text-mpZVnMyX.js +5 -0
  444. package/dist/standalone/chunks/{palettes-CKLHSIPx.js → palettes-J4bQ21ks.js} +2 -2
  445. package/dist/standalone/chunks/{popover-base-ac49G87f.js → popover-base-hxo-Vh6E.js} +2 -2
  446. package/dist/standalone/chunks/{prose-BG4oQH-i.js → prose-BiuJgiah.js} +1 -1
  447. package/dist/standalone/chunks/{ramp-ggoyjMvC.js → ramp-CGDOcqBZ.js} +1 -1
  448. package/dist/standalone/chunks/save-as-DBGZjczB.js +6 -0
  449. package/dist/standalone/chunks/shortcuts-DPxCSO4M.js +210 -0
  450. package/dist/standalone/chunks/{slider-BWT8Fmwz.js → slider-jp3d-Ld-.js} +15 -14
  451. package/dist/standalone/chunks/{stars-BN9M_9Q1.js → stars-BgKEjDQx.js} +1 -1
  452. package/dist/standalone/chunks/{styles-DwSR-9a3.js → styles-CaeyhYDA.js} +3 -0
  453. package/dist/standalone/chunks/submit-BjBGB8OW.js +42 -0
  454. package/dist/standalone/chunks/{summary-BK-B4m5A.js → summary-W5s0TFqV.js} +1 -1
  455. package/dist/standalone/chunks/{text-field-4IUUpRHE.js → text-field-CqhJSAwZ.js} +4 -4
  456. package/dist/standalone/chunks/{toggle-control-ioV2jhNY.js → toggle-control-lvZbQtGW.js} +2 -2
  457. package/dist/standalone/chunks/{tokens-BuahF1lF.js → tokens-C_ul7pL9.js} +4 -3
  458. package/dist/standalone/chunks/{virtual-B-1oN14Y.js → virtual-C_h6sHnm.js} +1 -1
  459. package/dist/standalone/confirm.js +27 -14
  460. package/dist/standalone/i18n-de.js +13 -2
  461. package/dist/standalone/icons.js +100 -98
  462. package/dist/standalone/links.js +1 -1
  463. package/dist/standalone/reset.css +10 -0
  464. package/dist/standalone/toast.js +1 -1
  465. package/dist/standalone/tokens.css +6 -5
  466. package/dist/tokens.css +6 -5
  467. package/dist/tokens.js +4 -3
  468. package/package.json +25 -2
  469. package/dist/standalone/chunks/announcer-haFcvqbe.js +0 -25
  470. package/dist/standalone/chunks/bk-kbd-B_TlKzWj.js +0 -275
  471. package/dist/standalone/chunks/link-CWSMsx04.js +0 -60
@@ -1,4 +1,5 @@
1
1
  import { LitElement, type PropertyValues, type TemplateResult } from "lit";
2
+ import { type ChartField } from "../charts/fields.js";
2
3
  import { type ChartRow, type ChartSeries } from "../charts/frame.js";
3
4
  import "./bk-chart-legend.js";
4
5
  import "../icons/set/grid.js";
@@ -204,6 +205,12 @@ export declare class BkChartBar extends LitElement {
204
205
  attribute: string;
205
206
  type: ObjectConstructor;
206
207
  };
208
+ tooltipFields: {
209
+ attribute: string;
210
+ converter: {
211
+ fromAttribute(value: string | null): ChartField[];
212
+ };
213
+ };
207
214
  };
208
215
  /** Rows, one per category. */
209
216
  data: ChartRow[];
@@ -274,6 +281,12 @@ export declare class BkChartBar extends LitElement {
274
281
  variant: "default" | "minimal";
275
282
  /** Intl.NumberFormat options for values (`{"style":"currency","currency":"EUR"}`). */
276
283
  valueFormat: Intl.NumberFormatOptions | undefined;
284
+ /**
285
+ * Fields of the row that the tooltip, the data table and the name of each bar list without drawing them.
286
+ * The attribute lists the keys (`tooltip-fields="prints likes"`). The property takes keys or
287
+ * `{ key, label, format }` objects, where `label` names the field and `format` are `Intl.NumberFormat` options.
288
+ */
289
+ tooltipFields: (string | ChartField)[] | undefined;
277
290
  private i18n;
278
291
  private chart;
279
292
  private hot;
@@ -318,6 +331,10 @@ export declare class BkChartBar extends LitElement {
318
331
  protected willUpdate(changed: PropertyValues): void;
319
332
  private layout;
320
333
  private markLabel;
334
+ /** The extra fields of the tooltip (`tooltip-fields`). */
335
+ private get extraFields();
336
+ /** The extra fields of a row as one text: "Prints 12, Likes 3". */
337
+ private extraText;
321
338
  private tooltipFor;
322
339
  private enter;
323
340
  private onFocus;
@@ -8,6 +8,7 @@ import { emitDetail } from "../internal/events.js";
8
8
  import { LinkController } from "../internal/link.js";
9
9
  import { adoptChartTokens } from "../charts/chart-tokens.js";
10
10
  import { chartT } from "../charts/i18n.js";
11
+ import { resolveFields, fieldLabel, fieldValue, tooltipFieldsConverter } from "../charts/fields.js";
11
12
  import { axisFormatter, formatPercent, formatTime, formatValue } from "../charts/format.js";
12
13
  import { bandScale, linearScale, niceTicks } from "../charts/scale.js";
13
14
  import { Brush } from "../charts/brush.js";
@@ -47,7 +48,8 @@ class BkChartBar extends LitElement {
47
48
  table: { type: Boolean, reflect: true },
48
49
  bare: { type: Boolean, reflect: true },
49
50
  variant: { reflect: true, useDefault: true },
50
- valueFormat: { attribute: "value-format", type: Object }
51
+ valueFormat: { attribute: "value-format", type: Object },
52
+ tooltipFields: { attribute: "tooltip-fields", converter: tooltipFieldsConverter }
51
53
  };
52
54
  i18n = new LocalizeController(this);
53
55
  chart = new ChartController(this);
@@ -170,7 +172,8 @@ class BkChartBar extends LitElement {
170
172
  /** The name of the link or button of a category: the category and its values. */
171
173
  categoryLabel(i) {
172
174
  const bars = this.layoutCache?.bars.filter((b) => b.i === i) ?? [];
173
- return bars.map((b) => this.markLabel(b)).join("; ");
175
+ const text = bars.map((b) => this.markLabel(b, false)).join("; ");
176
+ return this.extraFields.length && bars.length ? `${text}; ${this.extraText(this.viewRows[i])}` : text;
174
177
  }
175
178
  static styles = [base, ...chartStyles, css`
176
179
  .plot { height: var(--bk-chart-height); }
@@ -326,6 +329,8 @@ class BkChartBar extends LitElement {
326
329
  seriesLabels = series.map((se, j) => ({ j, y: 0, text: se.label }));
327
330
  }
328
331
  }
332
+ if (this.variant === "minimal" && !percent && hi > lo)
333
+ ticks = { ...ticks, min: Math.min(0, lo), max: Math.max(0, hi) };
329
334
  const valueScale = horizontal ? linearScale([ticks.min, ticks.max], [x0, x1]) : linearScale([ticks.min, ticks.max], [y1, y0]);
330
335
  const bands = horizontal ? bandScale(n, [y0, y1]) : bandScale(n, [x0, x1]);
331
336
  const { t, groupW } = groupThick(bands.width);
@@ -410,11 +415,20 @@ class BkChartBar extends LitElement {
410
415
  return { H, x0, x1, y0, y1, ticks, fmtTick, valueScale, bands, bars, ghosts, marks, cmp: !!cmpRows, t, zero, cats, details, hasDetail, empty, lineStep, values, totals, seriesLabels, horizontal, stacked, percent, series, n, k };
411
416
  }
412
417
  /* ---------------------------------------------------------------- interaction */
413
- markLabel(b) {
418
+ markLabel(b, extras = true) {
414
419
  const se = this.effectiveSeries[b.j];
415
420
  const cat = this.categoryName(this.viewRows[b.i]);
416
421
  const value = b.value === null ? chartT(this.i18n.locale, "chartNoValue") : this.mode === "percent" ? `${formatPercent(this.i18n.locale, b.share, 1)} (${this.fmt(b.value)})` : this.fmt(b.value);
417
- return chartT(this.i18n.locale, "chartMark", { category: cat, series: se?.label ?? "", value });
422
+ const text = chartT(this.i18n.locale, "chartMark", { category: cat, series: se?.label ?? "", value });
423
+ return extras && this.extraFields.length ? `${text}; ${this.extraText(this.viewRows[b.i])}` : text;
424
+ }
425
+ /** The extra fields of the tooltip (`tooltip-fields`). */
426
+ get extraFields() {
427
+ return resolveFields(this.tooltipFields);
428
+ }
429
+ /** The extra fields of a row as one text: "Prints 12, Likes 3". */
430
+ extraText(row) {
431
+ return this.extraFields.map((f) => `${fieldLabel(f)} ${fieldValue(this.i18n.locale, row, f)}`).join(", ");
418
432
  }
419
433
  tooltipFor(b) {
420
434
  const series = this.effectiveSeries;
@@ -437,6 +451,8 @@ class BkChartBar extends LitElement {
437
451
  }
438
452
  if (this.mode !== "grouped" && series.length > 1)
439
453
  rows.push({ label: chartT(locale, "chartTotal"), value: this.fmt(total), color: "", marker: "rect", active: false });
454
+ for (const f of this.extraFields)
455
+ rows.push({ label: fieldLabel(f), value: fieldValue(locale, row, f), color: "", marker: "rect", active: false });
440
456
  return { title: this.categoryName(row), rows, x: b.ax, y: b.ay };
441
457
  }
442
458
  enter(b) {
@@ -603,6 +619,9 @@ class BkChartBar extends LitElement {
603
619
  columns.push(se.label, ...cmp ? [`${se.label} \xB7 ${cmpLabel}`, `${se.label} \xB7 ${chartT(locale, "chartChange")}`] : []);
604
620
  if (stacked)
605
621
  columns.push(chartT(locale, "chartTotal"));
622
+ const extra = this.extraFields;
623
+ for (const f of extra)
624
+ columns.push(fieldLabel(f));
606
625
  const rows = (this.data ?? []).map((r, i) => {
607
626
  const vs = series.map((s) => num(r[s.key]));
608
627
  const cells = [this.category(r)];
@@ -617,6 +636,8 @@ class BkChartBar extends LitElement {
617
636
  });
618
637
  if (stacked)
619
638
  cells.push(this.fmt(vs.reduce((a, v) => a + (v ?? 0), 0)));
639
+ for (const f of extra)
640
+ cells.push(fieldValue(locale, r, f));
620
641
  return cells;
621
642
  });
622
643
  return { caption: this.heading || chartT(locale, "chartData"), columns, rows };
@@ -1,4 +1,5 @@
1
1
  import { LitElement, type PropertyValues, type TemplateResult } from "lit";
2
+ import { type ChartField } from "../charts/fields.js";
2
3
  import { type ChartRow, type ChartSeries } from "../charts/frame.js";
3
4
  import "./bk-chart-legend.js";
4
5
  import "../icons/set/compare.js";
@@ -197,6 +198,12 @@ export declare class BkChartLine extends LitElement {
197
198
  attribute: string;
198
199
  type: ObjectConstructor;
199
200
  };
201
+ tooltipFields: {
202
+ attribute: string;
203
+ converter: {
204
+ fromAttribute(value: string | null): ChartField[];
205
+ };
206
+ };
200
207
  yDirection: {
201
208
  attribute: string;
202
209
  reflect: boolean;
@@ -257,6 +264,12 @@ export declare class BkChartLine extends LitElement {
257
264
  bare: boolean;
258
265
  /** Intl.NumberFormat options for values. */
259
266
  valueFormat: Intl.NumberFormatOptions | undefined;
267
+ /**
268
+ * Fields of the row that the tooltip, the data table and the name of each point list without drawing them.
269
+ * The attribute lists the keys (`tooltip-fields="prints likes"`). The property takes keys or
270
+ * `{ key, label, format }` objects, where `label` names the field and `format` are `Intl.NumberFormat` options.
271
+ */
272
+ tooltipFields: (string | ChartField)[] | undefined;
260
273
  /** `up` (default): larger values are higher. `down`: the value axis runs down. The smallest value is at the top and is the best (a rank). Lines only. */
261
274
  yDirection: "up" | "down";
262
275
  /** The start of the value axis, for example `1` for ranks. Default: a round value below the data (zero with `zero`). With `y-direction="down"` and whole numbers, the default is the smallest value. */
@@ -6,6 +6,7 @@ import { base } from "../internal/styles.js";
6
6
  import { emitDetail } from "../internal/events.js";
7
7
  import { adoptChartTokens } from "../charts/chart-tokens.js";
8
8
  import { chartT } from "../charts/i18n.js";
9
+ import { resolveFields, fieldLabel, fieldValue, tooltipFieldsConverter } from "../charts/fields.js";
9
10
  import { axisFormatter, formatPercent, formatTime, formatValue, timeTickFormatter } from "../charts/format.js";
10
11
  import { linearScale, nearestIndex, niceTicks, ticksFrom, timeTicks } from "../charts/scale.js";
11
12
  import { Brush } from "../charts/brush.js";
@@ -50,6 +51,7 @@ class BkChartLine extends LitElement {
50
51
  table: { type: Boolean, reflect: true },
51
52
  bare: { type: Boolean, reflect: true },
52
53
  valueFormat: { attribute: "value-format", type: Object },
54
+ tooltipFields: { attribute: "tooltip-fields", converter: tooltipFieldsConverter },
53
55
  yDirection: { attribute: "y-direction", reflect: true, useDefault: true },
54
56
  min: { type: Number },
55
57
  toggleable: { type: Boolean, reflect: true },
@@ -435,7 +437,8 @@ class BkChartLine extends LitElement {
435
437
  const row = this.data[this.view[idx]];
436
438
  const shown = new Set(this.visibleKeys);
437
439
  const parts = this.effectiveSeries.filter((se) => shown.has(se.key)).map((se) => `${se.label} ${this.fmt(num(row[se.key]))}`);
438
- return `${this.xText(row)}: ${parts.join(", ")}`;
440
+ const extra = resolveFields(this.tooltipFields).map((f) => `${fieldLabel(f)} ${fieldValue(this.i18n.locale, row, f)}`);
441
+ return `${this.xText(row)}: ${parts.concat(extra).join(", ")}`;
439
442
  }
440
443
  tooltipAt(idx, L) {
441
444
  const locale = this.i18n.locale;
@@ -460,6 +463,8 @@ class BkChartLine extends LitElement {
460
463
  });
461
464
  if (L.stack !== "none" && series.length > 1)
462
465
  rows.push({ label: chartT(locale, "chartTotal"), value: this.fmt(L.totals[idx]) });
466
+ for (const f of resolveFields(this.tooltipFields))
467
+ rows.push({ label: fieldLabel(f), value: fieldValue(locale, row, f) });
463
468
  return { title: this.xText(row), rows, x: L.xScale(L.xs[idx]), y: L.y0, placement: "beside" };
464
469
  }
465
470
  /** The point index nearest to a pointer event. */
@@ -688,6 +693,9 @@ class BkChartLine extends LitElement {
688
693
  }
689
694
  if (stacked)
690
695
  columns.push(chartT(locale, "chartTotal"));
696
+ const extra = resolveFields(this.tooltipFields);
697
+ for (const f of extra)
698
+ columns.push(fieldLabel(f));
691
699
  const rows = this.order.map((i, p) => {
692
700
  const cells = [this.xText(this.data[i])];
693
701
  series.forEach((se, j) => {
@@ -700,6 +708,8 @@ class BkChartLine extends LitElement {
700
708
  });
701
709
  if (stacked)
702
710
  cells.push(this.fmt(series.reduce((a, se) => a + Math.max(0, num(this.data[i][se.key]) ?? 0), 0)));
711
+ for (const f of extra)
712
+ cells.push(fieldValue(locale, this.data[i], f));
703
713
  return cells;
704
714
  });
705
715
  return { caption: this.heading || chartT(locale, "chartData"), columns, rows };
@@ -15,7 +15,7 @@ import "./bk-button.js";
15
15
  * - **Keyboard**: Tab enters the group at the chosen chip (otherwise the chip used last, otherwise the first) and leaves
16
16
  * the group. ←/→ (and ↑/↓) move between the chips. Home/End move to the first and last chip.
17
17
  * Backspace or Delete on a `removable` chip fires the `remove` event of that chip. The app removes the chip then,
18
- * and the focus moves to the next chip. Without `selection` and without a removable chip the
18
+ * and the focus moves to the next chip. On a `removed` chip the same keys fire `restore`. Without `selection` and without a removable chip the
19
19
  * chips are not focusable. They are a list (`role="list"`).
20
20
  * - **Filter chips**: `selection="multiple"` makes every chip a toggle button (`aria-pressed`, the
21
21
  * group a `role="toolbar"`). `selection="single"` makes the group a listbox and every chip an
@@ -52,7 +52,7 @@ import "./bk-button.js";
52
52
  * @keyboard ←, →, ↑, ↓ - Move to the previous or next chip. ← and → follow the writing direction.
53
53
  * @keyboard Home, End - Move to the first or last chip.
54
54
  * @keyboard Space, Enter - With `selection`: choose the focused chip.
55
- * @keyboard Backspace, Delete - Remove a removable chip. The focus moves to the next chip.
55
+ * @keyboard Backspace, Delete - Remove a removable chip. The focus moves to the next chip. On a `removed` chip they restore it (`restore`), and the focus stays.
56
56
  * @a11y With a removable chip or `selection` the group is one stop in the tab order. `selection="single"` makes it a `listbox` and each chip an `option` with `aria-selected`; `selection="multiple"` makes it a `toolbar` of toggle buttons (`aria-pressed`). Without both, the group is a `list` and the chips are not focusable.
57
57
  */
58
58
  export declare class BkChipGroup extends FormControl {
@@ -284,6 +284,10 @@ class BkChipGroup extends FormControl {
284
284
  if (!chip.removable)
285
285
  return;
286
286
  e.preventDefault();
287
+ if (chip.removed) {
288
+ emit(chip, "restore");
289
+ return;
290
+ }
287
291
  this.removedAt = at;
288
292
  emit(chip, "remove");
289
293
  queueMicrotask(() => {
@@ -8,6 +8,7 @@ import "../icons/set/error.js";
8
8
  import "../icons/set/info.js";
9
9
  import "../icons/set/label.js";
10
10
  import "../icons/set/remove.js";
11
+ import "../icons/set/undo.js";
11
12
  import "../icons/set/warning.js";
12
13
  export type ChipTone = "neutral" | "accent" | "success" | "warning" | "danger" | "attention" | "info";
13
14
  /**
@@ -27,26 +28,50 @@ export type ChipTone = "neutral" | "accent" | "success" | "warning" | "danger" |
27
28
  *
28
29
  * With `copy` the chip is a copy button. A click, Enter or Space copies `copy-text` (default: the text of the chip) to the
29
30
  * clipboard, with the fallback of `bk-button-copy`. The icon changes to a check for two seconds, and screen readers announce
30
- * "Copied". A failed copy shows an error mark, announces "Cannot copy." and fires `copyfailed`. `count` shows a number at the end.
31
+ * "Copied". A failed copy shows an error mark, announces "Cannot copy." and fires `copyfailed`. `count` shows a number after the text.
31
32
  * `variant="dashed"` marks a suggestion that nobody has accepted yet.
32
33
  *
33
34
  * ```html
34
- * <bk-chip copy count="12" variant="dashed">Benchy</bk-chip>
35
+ * <bk-chip copy count="12" variant="dashed">Bracket</bk-chip>
35
36
  * ```
36
37
  *
37
- * i18n keys: `copyItem` (name, "Copy {item}"), `copied`, `copyFailed`. `copy-label` overrides the name.
38
+ * `removed` marks a chip that the user took out but the page still shows, for example in a diff of tags. The text is struck
39
+ * through in a muted look, and a screen reader hears "Removed". With `removable`, the button then restores the chip: it shows the `undo`
40
+ * icon, is named "Restore {item}" and fires `restore` instead of `remove`. The app clears `removed`. It works with every variant.
41
+ *
42
+ * ```html
43
+ * <bk-chip removable removed>design</bk-chip>
44
+ * ```
45
+ *
46
+ * `variant="text"` is a plain status label: no fill, no border and no inline padding, only the tone colour as text.
47
+ * The dot, `count`, the `end` slot, the remove button and `copy` work as in the other variants. A `copy` chip, a chip with
48
+ * `href` and a removable chip keep a hit area of at least `--bk-target-min` and the visible focus ring.
49
+ *
50
+ * `count` and the `end` slot both come after the text, and `count` comes first. Use `count` for a number or a short text.
51
+ * Use the `end` slot for rich content, for example a coloured `<span>` with a rank. A `copy` chip includes the text of
52
+ * the `end` slot in its accessible name, after the text and the count, and does not copy it.
53
+ *
54
+ * ```html
55
+ * <bk-chip tone="success" variant="text" dot>Online</bk-chip>
56
+ * <bk-chip>Bracket <span slot="end">#3</span></bk-chip>
57
+ * ```
58
+ *
59
+ * i18n keys: `copyItem` (name, "Copy {item}"), `copied`, `copyFailed`, `removed`, `restoreItem`. `copy-label` overrides the name of a copy chip, `restore-label` the name of the restore button.
38
60
  *
39
61
  * @slot - Text.
40
62
  * @slot start - Leading content, for example a `<bk-icon>` or `<bk-avatar>`.
63
+ * @slot end - Trailing content after the text and the `count`, before the remove button, for example a coloured rank. An empty slot uses no space.
41
64
  * @csspart base - The chip box.
42
65
  * @csspart link - The `<a>` with `href`.
43
- * @csspart remove - The remove button.
66
+ * @csspart end - The wrapper of the `end` slot.
67
+ * @csspart remove - The remove button, or the restore button of a `removed` chip.
44
68
  * @cssprop --bk-chip-accent-fill - Background of a solid accent chip, any background value (default: flat, or a gradient to --bk-accent-2 with the gradient knob).
45
69
  * @cssprop --bk-chip-gradient - The gradient knob for chips only (default --bk-gradient).
46
70
  * @cssprop --bk-chip-radius - Corner radius (default --bk-radius-chip, else --bk-radius-sm).
47
71
  * @cssprop --bk-chip-height - Height at every size (overrides the per-size tokens).
48
72
  * @cssprop --bk-chip-height-{sm|md|lg} - Height per size, derived from the control scale (default 20px / 24px / --bk-control-sm at text scale 1).
49
73
  * @cssprop --bk-chip-padding-{sm|md|lg} - Inline padding per size (default --bk-space-1-5 / --bk-space-2 / --bk-space-2-5).
74
+ * @cssprop --bk-chip-text-padding-inline - Inline padding of variant `text` at every size (default 0).
50
75
  * @cssprop --bk-chip-border - Border colour (default transparent; `outline`: the text colour at 40%).
51
76
  * @cssprop --bk-chip-gap - Space between dot, icon, text and remove button (default --bk-space-1).
52
77
  * @cssprop --bk-chip-font-size - Text size at every size (default --bk-text-2xs / --bk-text-xs / --bk-text-sm by size).
@@ -64,13 +89,17 @@ export type ChipTone = "neutral" | "accent" | "success" | "warning" | "danger" |
64
89
  * @cssprop --bk-chip-pressed-bg - Pressed tint of a chip with `href` (default --bk-pressed).
65
90
  * @cssprop --bk-chip-on - Text colour on solid chips (default --bk-on-solid; warning: --bk-chip-warning-on / --bk-on-warning; accent: --bk-chip-accent-on / --bk-on-accent).
66
91
  * @cssprop --bk-chip-{accent|warning}-on - Text colour on a solid accent or warning chip (default --bk-on-accent, --bk-on-warning).
92
+ * @cssprop --bk-chip-removed-fg - Text colour of a `removed` chip (default --bk-text-muted).
93
+ * @cssprop --bk-chip-removed-bg - Background of a `removed` chip (default transparent).
94
+ * @cssprop --bk-chip-removed-decoration - Text decoration of a `removed` chip (default line-through).
67
95
  * @cssprop --bk-chip-count-fg - Colour of the `count` (default: the chip text colour).
68
96
  * @fires {CustomEvent<CopyFailedDetail>} copyfailed - The copy of a `copy` chip failed. The event bubbles and is composed. `detail.error` is the reason.
69
97
  * @fires {Event} remove - The element fires this event when the user clicks the remove button.
98
+ * @fires {Event} restore - The element fires this event when the user clicks the restore button of a `removed` chip. The event bubbles and is composed. The app clears `removed`.
70
99
  *
71
100
  * @fires {CustomEvent<NavigateDetail>} navigate - A plain click on the 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 handles the navigation.
72
101
  * @tag bk-chip
73
- * @a11y Static text. The remove button of `removable` is a native button whose name includes the chip that it removes. A `copy` chip is a native button named "Copy {text} {count}", and a live region announces the result. A status dot is decoration: the label gives the meaning.
102
+ * @a11y Static text. The remove button of `removable` is a native button whose name includes the chip that it removes. A `copy` chip is a native button named "Copy {text} {count} {end text}", and a live region announces the result. A status dot is decoration: the label gives the meaning.
74
103
  */
75
104
  export declare class BkChip extends LitElement {
76
105
  static properties: {
@@ -122,6 +151,13 @@ export declare class BkChip extends LitElement {
122
151
  removeLabel: {
123
152
  attribute: string;
124
153
  };
154
+ removed: {
155
+ type: BooleanConstructor;
156
+ reflect: boolean;
157
+ };
158
+ restoreLabel: {
159
+ attribute: string;
160
+ };
125
161
  href: {};
126
162
  target: {};
127
163
  rel: {};
@@ -131,8 +167,8 @@ export declare class BkChip extends LitElement {
131
167
  tone: ChipTone;
132
168
  /** Category colour `1` to `8` (identity: a label, a project, a person), from `--bk-hue-N-*`. It has priority over `tone` for the colour. */
133
169
  hue: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | undefined;
134
- /** Weight: `soft` (default, tinted), `solid` (filled), `outline`, `dashed` (outline with a dashed border: a suggestion). */
135
- variant: "soft" | "solid" | "outline" | "dashed";
170
+ /** Weight: `soft` (default, tinted), `solid` (filled), `outline`, `dashed` (outline with a dashed border: a suggestion), `text` (no fill, no border, no inline padding: the tone colour as text). */
171
+ variant: "soft" | "solid" | "outline" | "dashed" | "text";
136
172
  /** `ellipsis`: the chip can become narrower than its text, and the text then ends in an ellipsis. In a `bk-cluster nowrap` the chip shrinks first and the other items keep their width. It has the same name and value as `bk-text`. */
137
173
  overflow: "ellipsis" | undefined;
138
174
  /** `sm`, `md` (default) or `lg`. */
@@ -151,7 +187,7 @@ export declare class BkChip extends LitElement {
151
187
  copyText: string | undefined;
152
188
  /** Accessible name of a `copy` chip (default: i18n `copyItem`, "Copy {item}" with the chip text and the count). */
153
189
  copyLabel: string | undefined;
154
- /** A number or short text at the end of the chip, for example the uses of a tag. */
190
+ /** A number or short text after the text of the chip, for example the uses of a tag. It comes before the `end` slot. */
155
191
  count: string | undefined;
156
192
  /** The chip is in a `bk-chip-group`: its remove button is not a Tab stop. */
157
193
  protected grouped: boolean;
@@ -163,20 +199,29 @@ export declare class BkChip extends LitElement {
163
199
  rel: string | undefined;
164
200
  /** File name for a download. The chip passes it to the inner `<a>` when `href` is set. */
165
201
  download: string | undefined;
202
+ /** Shows the chip as taken out: struck-through, muted text and a hidden "Removed". With `removable`, the button restores the chip and fires `restore`. */
203
+ removed: boolean;
204
+ /** Accessible name of the restore button of a `removed` chip (default: i18n `restoreItem`, "Restore {item}" with the chip text). */
205
+ restoreLabel: string;
166
206
  /** Accessible name of the remove button (default: i18n `removeItem`, "Remove {item}" with the chip text). */
167
207
  removeLabel: string;
208
+ private slots;
168
209
  private links;
169
210
  private clip;
170
211
  constructor();
171
212
  connectedCallback(): void;
172
213
  static styles: import("lit").CSSResult[];
173
214
  private i18n;
215
+ private get restoreName();
174
216
  private get removeName();
217
+ /** The text of the chip: the default slot, without the `start` and `end` slots. */
218
+ private slotText;
175
219
  private get itemText();
176
220
  /** Copies `copy-text`, or the text of the chip. Resolves `true` when the copy succeeds. */
177
221
  copyToClipboard(text?: string): Promise<boolean>;
178
222
  private renderCopy;
179
223
  private renderCount;
224
+ private renderEnd;
180
225
  private renderLink;
181
226
  render(): import("lit-html").TemplateResult<1>;
182
227
  }
@@ -8,12 +8,14 @@ import { ifDefined } from "lit/directives/if-defined.js";
8
8
  import { base, focusRing, srOnly, hueStyles, hueSelector } from "../internal/styles.js";
9
9
  import "./bk-icon.js";
10
10
  import { lightDom } from "../internal/server.js";
11
+ import { SlotController } from "../internal/slots.js";
11
12
  import "../icons/set/check.js";
12
13
  import "../icons/set/close.js";
13
14
  import "../icons/set/error.js";
14
15
  import "../icons/set/info.js";
15
16
  import "../icons/set/label.js";
16
17
  import "../icons/set/remove.js";
18
+ import "../icons/set/undo.js";
17
19
  import "../icons/set/warning.js";
18
20
  class BkChip extends LitElement {
19
21
  static properties = {
@@ -32,11 +34,14 @@ class BkChip extends LitElement {
32
34
  count: {},
33
35
  grouped: { state: true },
34
36
  removeLabel: { attribute: "remove-label" },
37
+ removed: { type: Boolean, reflect: true },
38
+ restoreLabel: { attribute: "restore-label" },
35
39
  href: {},
36
40
  target: {},
37
41
  rel: {},
38
42
  download: {}
39
43
  };
44
+ slots = new SlotController(this);
40
45
  links = new LinkController(this);
41
46
  clip = new CopyController(this, void 0, (error) => emitDetail(this, "copyfailed", { error }));
42
47
  constructor() {
@@ -50,6 +55,8 @@ class BkChip extends LitElement {
50
55
  this.copy = false;
51
56
  this.grouped = false;
52
57
  this.removeLabel = "";
58
+ this.removed = false;
59
+ this.restoreLabel = "";
53
60
  }
54
61
  connectedCallback() {
55
62
  super.connectedCallback();
@@ -97,12 +104,27 @@ class BkChip extends LitElement {
97
104
  :host([variant="solid"]) .chip { background: var(--_bk-chip-fill, var(--_bk-chip-solid)); color: var(--_bk-chip-on); }
98
105
  :host([variant="outline"]) .chip { background: transparent; border-color: var(--bk-chip-border, color-mix(in oklab, var(--_bk-chip-fg) 40%, transparent)); }
99
106
  :host([variant="dashed"]) .chip { background: transparent; border-style: dashed; border-color: var(--bk-chip-border, color-mix(in oklab, var(--_bk-chip-fg) 60%, transparent)); }
107
+ :host([variant="text"]) .chip { background: transparent; border-color: transparent; padding-inline: var(--bk-chip-text-padding-inline, 0); }
108
+ :host([variant="text"][selected]) .chip { background: transparent; border-color: transparent; }
109
+ :host([variant="text"]) .remove { margin-inline-end: 0; }
110
+ /* Without padding the visible chip can be narrower than --bk-target-min: the hit area of a link or copy chip grows. */
111
+ :host([variant="text"]) .link::after {
112
+ inset-block: min(calc(-1 * var(--bk-border-width)), calc((100% - var(--bk-target-min)) / 2));
113
+ inset-inline: min(calc(-1 * var(--bk-border-width)), calc((100% - var(--bk-target-min)) / 2));
114
+ }
115
+ .end { display: inline-flex; align-items: center; gap: inherit; min-width: 0; }
116
+ .end[hidden] { display: none; }
100
117
  .count { color: var(--bk-chip-count-fg, inherit); font-variant-numeric: tabular-nums; }
101
118
  button.link { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
102
119
  :host([selected]) .chip {
103
120
  background: var(--bk-chip-selected-bg, var(--bk-accent-soft)); color: var(--bk-chip-selected-fg, var(--bk-accent-text));
104
121
  border-color: var(--bk-chip-selected-border, var(--bk-accent-solid));
105
122
  }
123
+ /* removed: a muted chip without fill, text struck through. It comes after the variants, so it wins for all of them. */
124
+ :host([removed]) .chip { background: var(--bk-chip-removed-bg, transparent); color: var(--bk-chip-removed-fg, var(--bk-text-muted)); }
125
+ :host([removed][variant="dashed"]) .chip, :host([removed][variant="outline"]) .chip { border-color: var(--bk-chip-border, color-mix(in oklab, var(--bk-chip-removed-fg, var(--bk-text-muted)) 40%, transparent)); }
126
+ :host([removed][selected]) .chip { border-color: var(--bk-chip-border, transparent); }
127
+ :host([removed]) .label, :host([removed]) .count { text-decoration: var(--bk-chip-removed-decoration, line-through); }
106
128
  :host([overflow="ellipsis"]) { min-width: 0; }
107
129
  /* href: the link covers the chip; the remove button sits above it. */
108
130
  .chip { position: relative; }
@@ -130,26 +152,38 @@ class BkChip extends LitElement {
130
152
  .remove:focus-visible { outline: var(--bk-focus-ring); outline-offset: var(--bk-focus-offset); }
131
153
  `];
132
154
  i18n = new LocalizeController(this);
155
+ get restoreName() {
156
+ const item = this.itemText;
157
+ return this.restoreLabel || (item ? this.i18n.t("restoreItem", { item }) : this.i18n.t("restore"));
158
+ }
133
159
  get removeName() {
134
- const item = lightDom(this)?.textContent?.trim();
160
+ const item = this.itemText;
135
161
  return this.removeLabel || (item ? this.i18n.t("removeItem", { item }) : this.i18n.t("remove"));
136
162
  }
163
+ /** The text of the chip: the default slot, without the `start` and `end` slots. */
164
+ slotText(inEnd) {
165
+ const nodes = [...lightDom(this)?.childNodes ?? []].filter((n) => (n instanceof Element && n.getAttribute("slot") === "end") === inEnd && !(!inEnd && n instanceof Element && n.hasAttribute("slot")));
166
+ return nodes.map((n) => n.textContent ?? "").join(" ").replace(/\s+/g, " ").trim();
167
+ }
137
168
  get itemText() {
138
- return (lightDom(this)?.textContent ?? "").replace(/\s+/g, " ").trim();
169
+ return this.slotText(false);
139
170
  }
140
171
  /** Copies `copy-text`, or the text of the chip. Resolves `true` when the copy succeeds. */
141
172
  async copyToClipboard(text = this.copyText ?? this.itemText) {
142
173
  return this.clip.copy(text);
143
174
  }
144
175
  renderCopy() {
145
- const item = [this.itemText, this.count].filter(Boolean).join(" ");
176
+ const item = [this.itemText, this.count, this.slotText(true)].filter(Boolean).join(" ");
146
177
  const state = this.clip.failed ? this.i18n.t("copyFailed") : this.clip.copied ? this.i18n.t("copied") : "";
147
178
  return html`<button class="link" part="copy" type="button" aria-label=${this.copyLabel || this.i18n.t("copyItem", { item })}
148
- @click=${() => this.copyToClipboard()}><span class="label"><slot></slot></span></button>${this.count ? html`<span class="count" part="count" aria-hidden="true" @click=${() => this.copyToClipboard()}>${this.count}</span>` : nothing}<span class="sr-only" aria-live="polite">${state}</span>`;
179
+ @click=${() => this.copyToClipboard()}><span class="label"><slot></slot></span></button>${this.count ? html`<span class="count" part="count" aria-hidden="true" @click=${() => this.copyToClipboard()}>${this.count}</span>` : nothing}${this.renderEnd(true)}<span class="sr-only" aria-live="polite">${state}</span>`;
149
180
  }
150
181
  renderCount() {
151
182
  return this.count ? html`<span class="count" part="count">${this.count}</span>` : nothing;
152
183
  }
184
+ renderEnd(copy = false) {
185
+ return html`<span class="end" part="end" ?hidden=${!this.slots.has("end")} aria-hidden=${ifDefined(copy ? "true" : void 0)} @click=${copy ? () => this.copyToClipboard() : nothing}><slot name="end"></slot></span>`;
186
+ }
153
187
  renderLink() {
154
188
  return html`<a class="link" part="link" href=${this.links.href(this.href)} @click=${this.links.click} target=${ifDefined(this.target)}
155
189
  rel=${ifDefined(this.rel ?? (this.target === "_blank" ? "noopener noreferrer" : void 0))} download=${ifDefined(this.download)}><span class="label"><slot></slot></span>${this.target === "_blank" ? html`<span class="sr-only">${this.i18n.t("opensInNewTab")}</span>` : nothing}</a>`;
@@ -159,9 +193,11 @@ class BkChip extends LitElement {
159
193
  ${this.dot ? html`<span class="dot"></span>` : nothing}
160
194
  ${this.selected ? html`<bk-icon class="check" name="check"></bk-icon>` : nothing}
161
195
  <slot name="start">${this.copy && this.clip.failed ? html`<bk-icon name="error"></bk-icon>` : this.copy && this.clip.copied ? html`<bk-icon name="check"></bk-icon>` : this.icon ? html`<bk-icon name=${this.icon}></bk-icon>` : nothing}</slot>
162
- ${this.copy ? this.renderCopy() : this.href ? html`${this.renderLink()}${this.renderCount()}` : html`<span class="label"><slot></slot></span>${this.renderCount()}`}
163
- ${this.removable ? html`<button class="remove focusable" part="remove" type="button" tabindex=${this.grouped ? "-1" : nothing} aria-label=${this.removeName} title=${this.removeName}
164
- @click=${() => emit(this, "remove")}><bk-icon name="close"></bk-icon></button>` : nothing}
196
+ ${this.copy ? this.renderCopy() : this.href ? html`${this.renderLink()}${this.renderCount()}${this.renderEnd()}` : html`<span class="label"><slot></slot></span>${this.renderCount()}${this.renderEnd()}`}
197
+ ${this.removed ? html`<span class="sr-only">${this.i18n.t("removed")}</span>` : nothing}
198
+ ${this.removable ? this.removed ? html`<button class="remove focusable" part="remove" type="button" tabindex=${this.grouped ? "-1" : nothing} aria-label=${this.restoreName} title=${this.restoreName}
199
+ @click=${() => emit(this, "restore")}><bk-icon name="undo"></bk-icon></button>` : html`<button class="remove focusable" part="remove" type="button" tabindex=${this.grouped ? "-1" : nothing} aria-label=${this.removeName} title=${this.removeName}
200
+ @click=${() => emit(this, "remove")}><bk-icon name="close"></bk-icon></button>` : nothing}
165
201
  </span>`;
166
202
  }
167
203
  }
@@ -337,7 +337,11 @@ class BkCode extends LitElement {
337
337
  pre:focus-visible { outline: var(--bk-focus-ring); outline-offset: var(--bk-focus-offset-inset); }
338
338
  /* Without a header the copy button floats in the top end corner; the text keeps clear of it. */
339
339
  .float { position: absolute; inset-block-start: max(var(--bk-space-1), calc(var(--_bk-code-pad-b) + round(calc((var(--bk-code-line-height, var(--bk-line-height-body)) - var(--bk-control-sm)) / 2), 1px))); inset-inline-end: var(--bk-space-1); }
340
- .float ~ pre { padding-inline-end: calc(var(--bk-control-sm) + var(--bk-space-2)); min-block-size: calc(var(--bk-control-sm) + 2 * var(--bk-space-1)); }
340
+ .float ~ pre { --_bk-code-float: calc(var(--bk-control-sm) + var(--bk-space-2)); min-block-size: calc(var(--bk-control-sm) + 2 * var(--bk-space-1)); }
341
+ /* A block that scrolls ends before the button, so a long line scrolls beside it and not under it. A block that wraps keeps the
342
+ space as padding: the text breaks before the button. */
343
+ :host(:not([wrap])) .float ~ pre { margin-inline-end: var(--_bk-code-float); }
344
+ :host([wrap]) .float ~ pre { padding-inline-end: var(--_bk-code-float); }
341
345
  code { font: inherit; }
342
346
  /* Lines: each line is a block as wide as the longest line, so a mark reaches the end of a line that scrolls. The
343
347
  pre gives its inline padding to the lines, so a mark fills the block from edge to edge. */
@@ -345,7 +349,7 @@ class BkCode extends LitElement {
345
349
  code.lines { display: grid; min-inline-size: 100%; inline-size: max-content; counter-reset: bk-code-line var(--_bk-code-first); }
346
350
  :host([wrap]) code.lines { inline-size: auto; }
347
351
  .line { display: block; min-block-size: 1lh; padding-inline: var(--_bk-code-pad-i); }
348
- .float ~ pre .line { padding-inline-end: calc(var(--bk-control-sm) + var(--bk-space-2)); }
352
+ :host([wrap]) .float ~ pre .line { padding-inline-end: var(--_bk-code-float); }
349
353
  .line.mark { background: var(--_bk-code-mark); }
350
354
  /* The numbers are generated content: no part of a selection, of the copied text or of what screen readers read. */
351
355
  code.numbered .line { counter-increment: bk-code-line; padding-inline-start: calc(var(--_bk-code-pad-i) + var(--_bk-code-digits) * 1ch + var(--bk-code-line-number-gap, var(--bk-space-3))); text-indent: 0; position: relative; }
@@ -20,6 +20,11 @@ export type ColumnsMode = "split" | "stack" | "flow";
20
20
  * height of the element (`mode="stack"`);
21
21
  * - below that they stack in the normal document flow, and the page scrolls (`mode="flow"`).
22
22
  *
23
+ * Directly in a `<bk-shell-app>`, the columns also flow while the shell is narrow (`:state(narrow)`, the shell shows
24
+ * its navigation in a drawer). So the columns and the drawer change at the same width. While the columns flow, the
25
+ * shell is a page, not a workspace: the document scrolls, the header stays in view, and `scroll-key` restores the
26
+ * position of the document.
27
+ *
23
28
  * With `scroll-key` the element saves the scroll position of every column per key in the app state (entry
24
29
  * `columns:<key>`, session scope, see `<bk-app-state>`; for example the history key of the router).
25
30
  * A key that the element saw before restores its positions. A new key starts at the top.
@@ -84,6 +89,10 @@ export declare class BkColumns extends LitElement {
84
89
  reflect: boolean;
85
90
  useDefault: boolean;
86
91
  };
92
+ narrow: {
93
+ type: BooleanConstructor;
94
+ attribute: boolean;
95
+ };
87
96
  scrolling: {
88
97
  state: boolean;
89
98
  };
@@ -112,6 +121,8 @@ export declare class BkColumns extends LitElement {
112
121
  endLabel: string | undefined;
113
122
  /** The current layout, set from the element's width (read-only; reflected for styling). */
114
123
  mode: ColumnsMode;
124
+ /** Set by `<bk-shell-app>` while the shell around the element is narrow: the columns flow in the document. */
125
+ narrow: boolean;
115
126
  private collapsedSides;
116
127
  private panelSides;
117
128
  /** Scroll containers whose content overflows right now (they become focusable regions). */
@@ -21,6 +21,7 @@ class BkColumns extends LitElement {
21
21
  mainLabel: { attribute: "main-label" },
22
22
  endLabel: { attribute: "end-label" },
23
23
  mode: { reflect: true, useDefault: true },
24
+ narrow: { type: Boolean, attribute: false },
24
25
  scrolling: { state: true },
25
26
  collapsedSides: { state: true },
26
27
  panelSides: { state: true }
@@ -39,6 +40,7 @@ class BkColumns extends LitElement {
39
40
  this.splitAbove = 1024;
40
41
  this.stackAbove = 768;
41
42
  this.mode = "flow";
43
+ this.narrow = false;
42
44
  this.collapsedSides = /* @__PURE__ */ new Set();
43
45
  this.panelSides = /* @__PURE__ */ new Set();
44
46
  this.scrolling = /* @__PURE__ */ new Set();
@@ -150,6 +152,11 @@ class BkColumns extends LitElement {
150
152
  }
151
153
  updateMode() {
152
154
  const w = this.width;
155
+ if (this.narrow) {
156
+ if (this.mode !== "flow")
157
+ this.mode = "flow";
158
+ return;
159
+ }
153
160
  if (w <= 0)
154
161
  return;
155
162
  const mode = w >= this.splitAbove ? "split" : w >= this.stackAbove ? "stack" : "flow";
@@ -188,7 +195,7 @@ class BkColumns extends LitElement {
188
195
  return null;
189
196
  }
190
197
  willUpdate(changed) {
191
- if (changed.has("splitAbove") || changed.has("stackAbove"))
198
+ if (changed.has("splitAbove") || changed.has("stackAbove") || changed.has("narrow"))
192
199
  this.updateMode();
193
200
  }
194
201
  updated(changed) {
@@ -123,7 +123,7 @@ type Row = ComboboxOption & {
123
123
  * @cssprop --bk-combobox-status-color - Text colour of the loading and empty rows (default --bk-text-muted).
124
124
  * @cssprop --bk-combobox-popup-bg - Popup background (default --bk-layer-overlay-bg).
125
125
  * @cssprop --bk-combobox-popup-border - Popup border colour (default --bk-layer-overlay-border).
126
- * @cssprop --bk-combobox-popup-radius - Popup corner radius (default --bk-radius-md).
126
+ * @cssprop --bk-combobox-popup-radius - Popup corner radius (default --bk-row-radius + the padding + the border: concentric with the rows).
127
127
  * @cssprop --bk-combobox-popup-shadow - Popup shadow (default --bk-layer-overlay-shadow).
128
128
  * @cssprop --bk-combobox-popup-padding - Space between popup edge and options (default --bk-space-1).
129
129
  * @cssprop --bk-combobox-popup-offset - Gap between box and popup, read on open (default --bk-space-1).
@@ -9,6 +9,7 @@ import { edgeOption, matchRanges, sameText } from "../internal/options.js";
9
9
  import "./bk-chip.js";
10
10
  import "./bk-icon.js";
11
11
  import "./bk-spinner.js";
12
+ import { submitImplicitly } from "../internal/submit.js";
12
13
  import "../icons/set/add.js";
13
14
  import "../icons/set/chevron-down.js";
14
15
  import "../icons/set/search.js";
@@ -433,7 +434,7 @@ class BkCombobox extends ChoiceField {
433
434
  }
434
435
  const form = this.internals.form;
435
436
  if (form)
436
- setTimeout(() => form.requestSubmit());
437
+ setTimeout(() => submitImplicitly(form));
437
438
  return;
438
439
  }
439
440
  case ",":