@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
@@ -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) {
@@ -38,8 +38,11 @@ type Row = ComboboxOption & {
38
38
  * `usage: "search"`: "zurich" finds "Zürich", but in Swedish "a" does not find "å"). It needs every typed word. `filter` replaces it.
39
39
  * - **Async**: set `search` to `async (query, signal) => options`. It runs debounced (`debounce`
40
40
  * ms) when the query changes and when the list opens. Its result replaces the options. The combobox aborts outdated
41
- * calls, and a spinner row shows while it runs. Apps that load options themselves
42
- * set `loading` and `options`.
41
+ * calls. The list is busy (`aria-busy`) from the keystroke until the search for the newest query ends, and it shows
42
+ * the empty row only for a query that a search answered. The spinner row waits for `--bk-loading-delay` and stays at
43
+ * least `--bk-loading-min`. In search mode, `options` and `<option>` children give the labels of the current value
44
+ * (for example a value from the server), but the list shows only the results. Apps that load options themselves set
45
+ * `loading` and `options`.
43
46
  * - **Custom rows**: `renderOption` draws the label part of each row, `(option, label) => html\`…\``, as in
44
47
  * `<bk-listbox>`. `label` is the label with the matched text marked. The row keeps its role, id, marks and keys.
45
48
  * The filter matches the `label` text, and the field shows the label text. The "Add" row of `allow-custom` keeps its text.
@@ -120,7 +123,7 @@ type Row = ComboboxOption & {
120
123
  * @cssprop --bk-combobox-status-color - Text colour of the loading and empty rows (default --bk-text-muted).
121
124
  * @cssprop --bk-combobox-popup-bg - Popup background (default --bk-layer-overlay-bg).
122
125
  * @cssprop --bk-combobox-popup-border - Popup border colour (default --bk-layer-overlay-border).
123
- * @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).
124
127
  * @cssprop --bk-combobox-popup-shadow - Popup shadow (default --bk-layer-overlay-shadow).
125
128
  * @cssprop --bk-combobox-popup-padding - Space between popup edge and options (default --bk-space-1).
126
129
  * @cssprop --bk-combobox-popup-offset - Gap between box and popup, read on open (default --bk-space-1).
@@ -265,6 +268,9 @@ export declare class BkCombobox extends ChoiceField {
265
268
  text: {
266
269
  state: boolean;
267
270
  };
271
+ searching: {
272
+ state: boolean;
273
+ };
268
274
  };
269
275
  /** Shows the value, but the user cannot change it. */
270
276
  readonly: boolean;
@@ -281,7 +287,7 @@ export declare class BkCombobox extends ChoiceField {
281
287
  max: number | undefined;
282
288
  /** Label of the Enter key on a phone keyboard, like the native `enterkeyhint`: `enter`, `done`, `go`, `next`, `previous`, `search`, `send`. */
283
289
  enterKeyHint: string;
284
- /** Shows the loading row in the list. Set by `search` while it runs; apps that load options themselves set it too. */
290
+ /** Shows the loading row in the list. The combobox sets it while `search` runs; apps that load options themselves set it too. */
285
291
  loading: boolean;
286
292
  /** Async option provider, see the class description. */
287
293
  search: ComboboxSearch | undefined;
@@ -298,6 +304,14 @@ export declare class BkCombobox extends ChoiceField {
298
304
  private results;
299
305
  /** Content of the text field. */
300
306
  private text;
307
+ /** A search is scheduled or runs: from the keystroke until the search for the newest query ends. */
308
+ private searching;
309
+ /** The query of the last search that ended (undefined before the first one). */
310
+ private searched?;
311
+ /** The label that the field put in the text. Other text is typed text, and new options do not replace it. */
312
+ private shownLabel;
313
+ /** The spinner row: it waits for `--bk-loading-delay` and stays at least `--bk-loading-min`. */
314
+ private loader;
301
315
  /** Options that pass the filter, in list order (indexes of `activeIndex`). */
302
316
  private visible;
303
317
  /** Labels of values that the user chose earlier, also when the option list has changed since then (async results). */
@@ -311,13 +325,17 @@ export declare class BkCombobox extends ChoiceField {
311
325
  protected get leadIcon(): string | undefined;
312
326
  /** A search combobox always has the clear button. */
313
327
  protected get hasClear(): boolean;
314
- /** All options: the `search` results if a provider is set, else the children, else `options`. */
328
+ /** All options: the `search` results if a provider is set, else the children, else `options`. In search mode, the children and `options` give only labels (`labelOf`). */
315
329
  get allOptions(): ComboboxOption[];
316
330
  protected get rows(): Row[];
317
331
  disconnectedCallback(): void;
332
+ /** The list waits for options: a search is scheduled or runs, or the app set `loading`. */
333
+ private get busy();
318
334
  static styles: import("lit").CSSResultGroup[];
319
335
  protected get control(): HTMLInputElement | null;
320
336
  protected resetValue(): void;
337
+ /** Puts the label of the value in the text field. */
338
+ private showLabel;
321
339
  protected get changeable(): boolean;
322
340
  /** There is typed text or a chosen value: the clear button of `clearable` shows. */
323
341
  protected get filled(): boolean;
@@ -328,6 +346,7 @@ export declare class BkCombobox extends ChoiceField {
328
346
  showPicker(): void;
329
347
  /** Opens the list; `move` 1 highlights the chosen or first option, -1 the last, 0 the chosen one only. */
330
348
  private openList;
349
+ /** The label of value `v`. In search mode, the children and `options` give the label of a value that no result has. */
331
350
  protected labelOf(v: string): string;
332
351
  private remember;
333
352
  private get maxed();
@@ -358,7 +377,12 @@ export declare class BkCombobox extends ChoiceField {
358
377
  private onFocusOut;
359
378
  private onBoxClick;
360
379
  private onTagRemove;
361
- /** Something to show: options, the loading row, or the empty row. */
380
+ /**
381
+ * The empty row shows: no option matches the query, and the answer is complete. With `search`, a search for this
382
+ * query has ended. Before that, the list is busy and shows no empty row.
383
+ */
384
+ private get noResults();
385
+ /** Something to show: options, the spinner row, or the empty row. */
362
386
  private get hasContent();
363
387
  protected get popupShown(): boolean;
364
388
  /** The label with the matched text marked, in the app's `renderOption` when it has one. The "Add" row keeps its text. */