@bk2k/ui 0.6.8 → 0.7.1

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 (503) hide show
  1. package/BUILDING.md +56 -2
  2. package/CHANGELOG.md +199 -0
  3. package/USAGE.md +102 -28
  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 +2 -1
  10. package/dist/clipboard.js +1 -0
  11. package/dist/components/bk-alert.js +3 -2
  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 +42 -14
  19. package/dist/components/bk-button.js +67 -20
  20. package/dist/components/bk-card.d.ts +7 -0
  21. package/dist/components/bk-card.js +21 -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 +10 -0
  25. package/dist/components/bk-chart-bar.d.ts +17 -0
  26. package/dist/components/bk-chart-bar.js +25 -4
  27. package/dist/components/bk-chart-line.d.ts +28 -0
  28. package/dist/components/bk-chart-line.js +27 -7
  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 +55 -8
  32. package/dist/components/bk-chip.js +46 -8
  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 +3 -3
  37. package/dist/components/bk-combobox.js +9 -21
  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 +12 -5
  41. package/dist/components/bk-dialog.js +14 -6
  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.js +3 -2
  48. package/dist/components/bk-footnote.d.ts +73 -0
  49. package/dist/components/bk-footnote.js +97 -0
  50. package/dist/components/bk-footnotes-item.d.ts +92 -0
  51. package/dist/components/bk-footnotes-item.js +139 -0
  52. package/dist/components/bk-footnotes.d.ts +51 -0
  53. package/dist/components/bk-footnotes.js +43 -0
  54. package/dist/components/bk-icon.js +2 -2
  55. package/dist/components/bk-image-compare.d.ts +69 -6
  56. package/dist/components/bk-image-compare.js +116 -32
  57. package/dist/components/bk-image-crop.d.ts +3 -3
  58. package/dist/components/bk-image-editor.d.ts +1 -1
  59. package/dist/components/bk-image-viewer.d.ts +178 -11
  60. package/dist/components/bk-image-viewer.js +310 -52
  61. package/dist/components/bk-input-color.d.ts +2 -5
  62. package/dist/components/bk-input-color.js +0 -14
  63. package/dist/components/bk-input-file.d.ts +17 -0
  64. package/dist/components/bk-input-file.js +18 -8
  65. package/dist/components/bk-input-inline.d.ts +15 -6
  66. package/dist/components/bk-input-inline.js +22 -6
  67. package/dist/components/bk-input-number.js +2 -1
  68. package/dist/components/bk-input-search.d.ts +1 -1
  69. package/dist/components/bk-input-search.js +2 -1
  70. package/dist/components/bk-input-tags.d.ts +219 -0
  71. package/dist/components/bk-input-tags.js +293 -0
  72. package/dist/components/bk-input-text.d.ts +20 -0
  73. package/dist/components/bk-input-text.js +34 -4
  74. package/dist/components/bk-input-time.js +2 -1
  75. package/dist/components/bk-item.js +2 -1
  76. package/dist/components/bk-lightbox.d.ts +37 -4
  77. package/dist/components/bk-lightbox.js +13 -3
  78. package/dist/components/bk-link.d.ts +9 -1
  79. package/dist/components/bk-link.js +14 -4
  80. package/dist/components/bk-menu-item.d.ts +40 -0
  81. package/dist/components/bk-menu-item.js +57 -9
  82. package/dist/components/bk-menu-label.js +2 -1
  83. package/dist/components/bk-menu-list.d.ts +1 -0
  84. package/dist/components/bk-menu-list.js +10 -0
  85. package/dist/components/bk-menu.d.ts +8 -1
  86. package/dist/components/bk-menu.js +16 -5
  87. package/dist/components/bk-message-feedback.d.ts +4 -3
  88. package/dist/components/bk-message-feedback.js +7 -5
  89. package/dist/components/bk-message-list.js +2 -1
  90. package/dist/components/bk-message-source.d.ts +1 -2
  91. package/dist/components/bk-message-source.js +3 -11
  92. package/dist/components/bk-message.js +2 -0
  93. package/dist/components/bk-nav-group.js +1 -1
  94. package/dist/components/bk-nav-item.d.ts +18 -0
  95. package/dist/components/bk-nav-item.js +18 -5
  96. package/dist/components/bk-nav.d.ts +1 -1
  97. package/dist/components/bk-page-cta.d.ts +2 -0
  98. package/dist/components/bk-page-cta.js +10 -1
  99. package/dist/components/bk-page-section.d.ts +1 -1
  100. package/dist/components/bk-page-section.js +3 -9
  101. package/dist/components/bk-pane.d.ts +1 -0
  102. package/dist/components/bk-pane.js +7 -5
  103. package/dist/components/bk-panel.d.ts +1 -1
  104. package/dist/components/bk-panel.js +6 -5
  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-shell-app.d.ts +10 -4
  114. package/dist/components/bk-shell-app.js +32 -9
  115. package/dist/components/bk-shell-sites.d.ts +2 -1
  116. package/dist/components/bk-shell-sites.js +3 -5
  117. package/dist/components/bk-sortable.js +7 -17
  118. package/dist/components/bk-split-grid.d.ts +104 -3
  119. package/dist/components/bk-split-grid.js +430 -2
  120. package/dist/components/bk-stat-group.js +2 -1
  121. package/dist/components/bk-stat.d.ts +19 -0
  122. package/dist/components/bk-stat.js +8 -4
  123. package/dist/components/bk-steps.js +2 -1
  124. package/dist/components/bk-surface.d.ts +2 -0
  125. package/dist/components/bk-surface.js +6 -3
  126. package/dist/components/bk-table.d.ts +3 -1
  127. package/dist/components/bk-table.js +10 -13
  128. package/dist/components/bk-tabs-item.d.ts +45 -7
  129. package/dist/components/bk-tabs-item.js +51 -20
  130. package/dist/components/bk-tabs-panel.d.ts +6 -3
  131. package/dist/components/bk-tabs-panel.js +6 -0
  132. package/dist/components/bk-tabs.d.ts +52 -8
  133. package/dist/components/bk-tabs.js +181 -97
  134. package/dist/components/bk-text.js +2 -1
  135. package/dist/components/bk-toast-group.d.ts +3 -1
  136. package/dist/components/bk-toast-group.js +11 -1
  137. package/dist/components/bk-tooltip.d.ts +3 -1
  138. package/dist/components/bk-tooltip.js +2 -1
  139. package/dist/components/bk-video.js +2 -2
  140. package/dist/components/bk-zoom.d.ts +3 -1
  141. package/dist/components/confirm.d.ts +15 -0
  142. package/dist/components/confirm.js +27 -4
  143. package/dist/i18n/de.js +12 -1
  144. package/dist/i18n/en.d.ts +2 -0
  145. package/dist/i18n/en.js +3 -0
  146. package/dist/i18n.d.ts +16 -2
  147. package/dist/i18n.js +28 -4
  148. package/dist/icons/brands-static.d.ts +3 -0
  149. package/dist/icons/brands-static.js +5 -0
  150. package/dist/icons/core.d.ts +1 -0
  151. package/dist/icons/core.js +2 -0
  152. package/dist/icons/load-static.d.ts +3 -0
  153. package/dist/icons/load-static.js +5 -0
  154. package/dist/icons/load.js +1 -0
  155. package/dist/icons/registry.js +1 -1
  156. package/dist/icons/set/save-as.d.ts +3 -0
  157. package/dist/icons/set/save-as.js +7 -0
  158. package/dist/index.d.ts +4 -0
  159. package/dist/index.js +4 -0
  160. package/dist/internal/announcer.d.ts +14 -1
  161. package/dist/internal/announcer.js +33 -12
  162. package/dist/internal/backdrop.d.ts +19 -0
  163. package/dist/internal/backdrop.js +29 -0
  164. package/dist/internal/busy.d.ts +3 -2
  165. package/dist/internal/busy.js +4 -5
  166. package/dist/internal/choice-field.js +1 -1
  167. package/dist/internal/choice-item.d.ts +17 -6
  168. package/dist/internal/choice-item.js +20 -9
  169. package/dist/internal/cloak.js +4 -0
  170. package/dist/internal/crop-frame.d.ts +1 -1
  171. package/dist/internal/crop-frame.js +2 -7
  172. package/dist/internal/date-field.js +2 -1
  173. package/dist/internal/define.d.ts +9 -0
  174. package/dist/internal/define.js +47 -1
  175. package/dist/internal/drag.d.ts +11 -0
  176. package/dist/internal/drag.js +23 -0
  177. package/dist/internal/elements.d.ts +6 -0
  178. package/dist/internal/elements.js +5 -0
  179. package/dist/internal/english-static.d.ts +3 -0
  180. package/dist/internal/english-static.js +5 -0
  181. package/dist/internal/english.d.ts +8 -0
  182. package/dist/internal/english.js +6 -0
  183. package/dist/internal/footnotes.d.ts +56 -0
  184. package/dist/internal/footnotes.js +143 -0
  185. package/dist/internal/handle-menu.js +2 -5
  186. package/dist/internal/hue.d.ts +8 -0
  187. package/dist/internal/hue.js +15 -4
  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/bk-tabs.d.ts +4 -0
  193. package/dist/internal/late/bk-tabs.js +8 -0
  194. package/dist/internal/late/handle-menu.d.ts +4 -0
  195. package/dist/internal/late/handle-menu.js +9 -0
  196. package/dist/internal/late/static.d.ts +7 -0
  197. package/dist/internal/late/static.js +5 -0
  198. package/dist/internal/late.d.ts +8 -3
  199. package/dist/internal/late.js +19 -4
  200. package/dist/internal/link.d.ts +2 -0
  201. package/dist/internal/link.js +11 -1
  202. package/dist/internal/own-text.d.ts +8 -0
  203. package/dist/internal/own-text.js +7 -0
  204. package/dist/internal/scope.js +1 -1
  205. package/dist/internal/scroll-lock.d.ts +4 -1
  206. package/dist/internal/scroll-lock.js +17 -4
  207. package/dist/internal/slider.js +2 -1
  208. package/dist/internal/styles.js +3 -0
  209. package/dist/internal/submit.d.ts +23 -0
  210. package/dist/internal/submit.js +57 -0
  211. package/dist/internal/tags.d.ts +15 -0
  212. package/dist/internal/tags.js +44 -0
  213. package/dist/internal/text-field.d.ts +2 -0
  214. package/dist/internal/text-field.js +8 -0
  215. package/dist/internal/toggle-control.js +3 -1
  216. package/dist/jsx.d.ts +222 -54
  217. package/dist/kit.d.ts +1 -0
  218. package/dist/kit.js +3 -0
  219. package/dist/reset.css +10 -0
  220. package/dist/standalone/all.js +226 -221
  221. package/dist/standalone/appearance.js +1 -1
  222. package/dist/standalone/bk-accordion-item.js +4 -4
  223. package/dist/standalone/bk-accordion.js +2 -2
  224. package/dist/standalone/bk-action-bar.js +3 -3
  225. package/dist/standalone/bk-alert-offline.js +1 -2
  226. package/dist/standalone/bk-alert.js +17 -13
  227. package/dist/standalone/bk-app-state.js +1 -1
  228. package/dist/standalone/bk-attachment.js +4 -4
  229. package/dist/standalone/bk-avatar-group.js +12 -10
  230. package/dist/standalone/bk-avatar.js +15 -5
  231. package/dist/standalone/bk-badge.js +2 -2
  232. package/dist/standalone/bk-bar.js +3 -1
  233. package/dist/standalone/bk-brand.js +3 -3
  234. package/dist/standalone/bk-breadcrumbs.js +5 -5
  235. package/dist/standalone/bk-button-copy.js +7 -7
  236. package/dist/standalone/bk-button-group.js +5 -5
  237. package/dist/standalone/bk-button-share.js +7 -7
  238. package/dist/standalone/bk-button-top.js +9 -8
  239. package/dist/standalone/bk-button.js +74 -34
  240. package/dist/standalone/bk-calendar-event.js +1 -1
  241. package/dist/standalone/bk-calendar-week.js +3 -3
  242. package/dist/standalone/bk-calendar.js +4 -4
  243. package/dist/standalone/bk-card.js +26 -7
  244. package/dist/standalone/bk-carousel-controls.js +7 -6
  245. package/dist/standalone/bk-carousel-item.js +2 -2
  246. package/dist/standalone/bk-carousel.js +1 -1
  247. package/dist/standalone/bk-chart-area.js +1 -1
  248. package/dist/standalone/bk-chart-bar-list.js +8 -8
  249. package/dist/standalone/bk-chart-bar.js +145 -117
  250. package/dist/standalone/bk-chart-bridge.js +7 -7
  251. package/dist/standalone/bk-chart-bullet.js +6 -6
  252. package/dist/standalone/bk-chart-calendar.js +7 -7
  253. package/dist/standalone/bk-chart-heatmap.js +7 -7
  254. package/dist/standalone/bk-chart-histogram.js +5 -5
  255. package/dist/standalone/bk-chart-legend.js +6 -6
  256. package/dist/standalone/bk-chart-line.js +128 -107
  257. package/dist/standalone/bk-chart-mark.js +1 -1
  258. package/dist/standalone/bk-chart-scatter.js +6 -6
  259. package/dist/standalone/bk-chart-sparkline.js +6 -6
  260. package/dist/standalone/bk-chart-stacked-bar.js +7 -7
  261. package/dist/standalone/bk-chart-tracker.js +6 -6
  262. package/dist/standalone/bk-chart-waterfall.js +6 -6
  263. package/dist/standalone/bk-checkbox-group.js +7 -7
  264. package/dist/standalone/bk-checkbox.js +4 -4
  265. package/dist/standalone/bk-chip-group.js +11 -7
  266. package/dist/standalone/bk-chip.js +59 -18
  267. package/dist/standalone/bk-cluster.js +1 -1
  268. package/dist/standalone/bk-code-diff.js +4 -4
  269. package/dist/standalone/bk-code-stack.js +4 -4
  270. package/dist/standalone/bk-code.js +10 -6
  271. package/dist/standalone/bk-color-panel.js +5 -5
  272. package/dist/standalone/bk-columns.js +13 -5
  273. package/dist/standalone/bk-combobox.js +23 -31
  274. package/dist/standalone/bk-command-menu.js +6 -6
  275. package/dist/standalone/bk-command-palette.js +8 -7
  276. package/dist/standalone/bk-composer.js +6 -6
  277. package/dist/standalone/bk-delta.js +11 -10
  278. package/dist/standalone/bk-diagram.js +1 -1
  279. package/dist/standalone/bk-dialog.js +1 -1
  280. package/dist/standalone/bk-disclosure.js +7 -5
  281. package/dist/standalone/bk-divider.js +5 -5
  282. package/dist/standalone/bk-drawer.js +3 -3
  283. package/dist/standalone/bk-drop-target.js +12 -6
  284. package/dist/standalone/bk-empty-state.js +3 -3
  285. package/dist/standalone/bk-error-summary.js +9 -6
  286. package/dist/standalone/bk-facts-item.js +2 -2
  287. package/dist/standalone/bk-facts.js +9 -8
  288. package/dist/standalone/bk-feature.js +3 -3
  289. package/dist/standalone/bk-fieldset.js +3 -3
  290. package/dist/standalone/bk-filter-bar.js +4 -4
  291. package/dist/standalone/bk-folder-browser.js +4 -4
  292. package/dist/standalone/bk-footnote.js +82 -0
  293. package/dist/standalone/bk-footnotes-item.js +122 -0
  294. package/dist/standalone/bk-footnotes.js +37 -0
  295. package/dist/standalone/bk-form-guard.js +2 -2
  296. package/dist/standalone/bk-form-steps.js +3 -3
  297. package/dist/standalone/bk-grid.js +1 -1
  298. package/dist/standalone/bk-icon-tile.js +3 -3
  299. package/dist/standalone/bk-icon.js +1 -1
  300. package/dist/standalone/bk-image-compare.js +127 -58
  301. package/dist/standalone/bk-image-crop.js +6 -6
  302. package/dist/standalone/bk-image-editor.js +1 -1
  303. package/dist/standalone/bk-image-viewer.js +283 -92
  304. package/dist/standalone/bk-input-code.js +4 -4
  305. package/dist/standalone/bk-input-color.js +4 -14
  306. package/dist/standalone/bk-input-date-range.js +2 -2
  307. package/dist/standalone/bk-input-date.js +2 -2
  308. package/dist/standalone/bk-input-file.js +22 -15
  309. package/dist/standalone/bk-input-group.js +4 -4
  310. package/dist/standalone/bk-input-inline.js +17 -10
  311. package/dist/standalone/bk-input-number.js +9 -8
  312. package/dist/standalone/bk-input-rating.js +6 -6
  313. package/dist/standalone/bk-input-rich.js +1 -1
  314. package/dist/standalone/bk-input-search.js +23 -22
  315. package/dist/standalone/bk-input-slider-range.js +5 -5
  316. package/dist/standalone/bk-input-slider.js +5 -5
  317. package/dist/standalone/bk-input-tags.js +224 -0
  318. package/dist/standalone/bk-input-text.js +1 -1
  319. package/dist/standalone/bk-input-time-zone.js +1 -1
  320. package/dist/standalone/bk-input-time.js +29 -28
  321. package/dist/standalone/bk-item-group.js +3 -3
  322. package/dist/standalone/bk-item.js +12 -11
  323. package/dist/standalone/bk-kbd-shortcuts.js +4 -3
  324. package/dist/standalone/bk-kbd.js +68 -1
  325. package/dist/standalone/bk-lightbox.js +24 -7
  326. package/dist/standalone/bk-lines.js +1 -1
  327. package/dist/standalone/bk-link.js +33 -19
  328. package/dist/standalone/bk-listbox-columns.js +8 -8
  329. package/dist/standalone/bk-listbox-item.js +1 -1
  330. package/dist/standalone/bk-listbox-search.js +7 -7
  331. package/dist/standalone/bk-listbox-transfer.js +6 -6
  332. package/dist/standalone/bk-listbox.js +7 -7
  333. package/dist/standalone/bk-logo-wall.js +2 -2
  334. package/dist/standalone/bk-logo.js +4 -4
  335. package/dist/standalone/bk-menu-bar.js +3 -3
  336. package/dist/standalone/bk-menu-context.js +1 -1
  337. package/dist/standalone/bk-menu-divider.js +2 -2
  338. package/dist/standalone/bk-menu-item.js +73 -29
  339. package/dist/standalone/bk-menu-label.js +7 -6
  340. package/dist/standalone/bk-menu-list.js +10 -4
  341. package/dist/standalone/bk-menu.js +19 -10
  342. package/dist/standalone/bk-message-approval.js +4 -4
  343. package/dist/standalone/bk-message-branches.js +3 -3
  344. package/dist/standalone/bk-message-citation.js +10 -10
  345. package/dist/standalone/bk-message-feedback.js +10 -6
  346. package/dist/standalone/bk-message-list.js +6 -5
  347. package/dist/standalone/bk-message-reasoning.js +5 -5
  348. package/dist/standalone/bk-message-source.js +13 -21
  349. package/dist/standalone/bk-message-tool-group.js +5 -5
  350. package/dist/standalone/bk-message-tool.js +5 -5
  351. package/dist/standalone/bk-message.js +6 -4
  352. package/dist/standalone/bk-meter.js +3 -3
  353. package/dist/standalone/bk-model-viewer.js +1 -1
  354. package/dist/standalone/bk-nav-divider.js +2 -2
  355. package/dist/standalone/bk-nav-group.js +9 -9
  356. package/dist/standalone/bk-nav-item.js +31 -23
  357. package/dist/standalone/bk-nav-toc.js +3 -3
  358. package/dist/standalone/bk-nav.js +3 -3
  359. package/dist/standalone/bk-overflow.js +3 -3
  360. package/dist/standalone/bk-page-cta.js +13 -4
  361. package/dist/standalone/bk-page-footer-column.js +2 -2
  362. package/dist/standalone/bk-page-footer.js +3 -3
  363. package/dist/standalone/bk-page-header.js +3 -3
  364. package/dist/standalone/bk-page-hero.js +3 -3
  365. package/dist/standalone/bk-page-pager.js +5 -5
  366. package/dist/standalone/bk-page-section.js +6 -6
  367. package/dist/standalone/bk-pagination.js +6 -6
  368. package/dist/standalone/bk-pane.js +10 -9
  369. package/dist/standalone/bk-panel.js +9 -10
  370. package/dist/standalone/bk-period-nav.js +4 -4
  371. package/dist/standalone/bk-picture.js +1 -166
  372. package/dist/standalone/bk-popover-help.js +3 -3
  373. package/dist/standalone/bk-popover.js +2 -2
  374. package/dist/standalone/bk-presence-cursor.js +3 -3
  375. package/dist/standalone/bk-preview.js +4 -4
  376. package/dist/standalone/bk-progress.js +3 -3
  377. package/dist/standalone/bk-prose.js +3 -3
  378. package/dist/standalone/bk-qr-code.js +1 -1
  379. package/dist/standalone/bk-radio-group.js +7 -7
  380. package/dist/standalone/bk-radio.js +3 -3
  381. package/dist/standalone/bk-rating.js +5 -5
  382. package/dist/standalone/bk-scroll.js +3 -3
  383. package/dist/standalone/bk-segmented-item.js +40 -16
  384. package/dist/standalone/bk-segmented.js +17 -15
  385. package/dist/standalone/bk-select-cascade.js +3 -3
  386. package/dist/standalone/bk-select-tree.js +4 -4
  387. package/dist/standalone/bk-select.js +5 -5
  388. package/dist/standalone/bk-shell-app.js +1 -1221
  389. package/dist/standalone/bk-shell-centered.js +2 -2
  390. package/dist/standalone/bk-shell-sites.js +5 -7
  391. package/dist/standalone/bk-skeleton.js +2 -2
  392. package/dist/standalone/bk-sortable.js +55 -60
  393. package/dist/standalone/bk-spinner.js +2 -2
  394. package/dist/standalone/bk-split-grid.js +324 -44
  395. package/dist/standalone/bk-split.js +8 -8
  396. package/dist/standalone/bk-stack.js +1 -1
  397. package/dist/standalone/bk-stat-group.js +8 -7
  398. package/dist/standalone/bk-stat.js +12 -9
  399. package/dist/standalone/bk-status-dot.js +3 -3
  400. package/dist/standalone/bk-steps-item.js +5 -5
  401. package/dist/standalone/bk-steps.js +8 -7
  402. package/dist/standalone/bk-surface.js +1 -1
  403. package/dist/standalone/bk-swatch-group.js +8 -8
  404. package/dist/standalone/bk-swatch-palette.js +1 -1
  405. package/dist/standalone/bk-swatch.js +2 -2
  406. package/dist/standalone/bk-switch.js +4 -4
  407. package/dist/standalone/bk-table.js +1 -1937
  408. package/dist/standalone/bk-tabs-item.js +58 -35
  409. package/dist/standalone/bk-tabs-panel.js +7 -3
  410. package/dist/standalone/bk-tabs.js +3 -352
  411. package/dist/standalone/bk-tasks-item.js +4 -4
  412. package/dist/standalone/bk-tasks.js +2 -2
  413. package/dist/standalone/bk-testimonial.js +3 -3
  414. package/dist/standalone/bk-text.js +21 -20
  415. package/dist/standalone/bk-time-countdown.js +4 -4
  416. package/dist/standalone/bk-time-relative.js +3 -3
  417. package/dist/standalone/bk-timeline-item.js +4 -4
  418. package/dist/standalone/bk-timeline.js +2 -2
  419. package/dist/standalone/bk-toast-group.js +1 -1
  420. package/dist/standalone/bk-toast.js +4 -4
  421. package/dist/standalone/bk-toolbar.js +2 -2
  422. package/dist/standalone/bk-tooltip.js +8 -7
  423. package/dist/standalone/bk-tree-item.js +6 -6
  424. package/dist/standalone/bk-tree.js +5 -5
  425. package/dist/standalone/bk-video.js +6 -6
  426. package/dist/standalone/bk-visually-hidden.js +2 -2
  427. package/dist/standalone/bk-zoom.js +5 -5
  428. package/dist/standalone/chunks/announcer-6tMlCOq1.js +41 -0
  429. package/dist/standalone/chunks/{appearance-waHnV0kk.js → appearance-CBOJXbmC.js} +1 -1
  430. package/dist/standalone/chunks/{bk-alert-offline-B1bQxOZp.js → bk-alert-offline-hCLuG-RM.js} +3 -3
  431. package/dist/standalone/chunks/{bk-carousel-BCwIQhG5.js → bk-carousel-_dudBMVq.js} +4 -4
  432. package/dist/standalone/chunks/{bk-diagram-DWK8CvRZ.js → bk-diagram-BB2odomE.js} +5 -5
  433. package/dist/standalone/chunks/{bk-dialog-DX0cPJ1o.js → bk-dialog-DcvwnOtN.js} +59 -25
  434. package/dist/standalone/chunks/{bk-icon-DssFsNuB.js → bk-icon-D4kI4F18.js} +4 -3
  435. package/dist/standalone/chunks/{bk-image-editor-DXEj9gCu.js → bk-image-editor-SRVkHI-4.js} +5 -5
  436. package/dist/standalone/chunks/{bk-input-date-range-Cbx_lpf0.js → bk-input-date-range-C0Vd-p0T.js} +2 -2
  437. package/dist/standalone/chunks/{bk-input-rich-ZB68vziu.js → bk-input-rich-AmDv87E5.js} +6 -6
  438. package/dist/standalone/chunks/{bk-input-text-DD32uWNO.js → bk-input-text-2n89GDIT.js} +73 -54
  439. package/dist/standalone/chunks/{bk-model-viewer-Dr81ahVv.js → bk-model-viewer-BoNYBd6W.js} +4 -4
  440. package/dist/standalone/chunks/bk-picture-CA5gLxgZ.js +186 -0
  441. package/dist/standalone/chunks/{bk-qr-code-QaYvZwOR.js → bk-qr-code-CSFfc8As.js} +3 -3
  442. package/dist/standalone/chunks/bk-shell-app-BlCOG25y.js +1236 -0
  443. package/dist/standalone/chunks/{bk-surface-DkIhrWMt.js → bk-surface-BULRdKam.js} +9 -7
  444. package/dist/standalone/chunks/{bk-swatch-palette-BNNXTP3w.js → bk-swatch-palette-Cqj85tSW.js} +6 -6
  445. package/dist/standalone/chunks/bk-table-DWlD7yoM.js +1945 -0
  446. package/dist/standalone/chunks/bk-tabs-STkr3-E1.js +422 -0
  447. package/dist/standalone/chunks/{bk-toast-group-BSeO_rPs.js → bk-toast-group-5nZg7BaJ.js} +27 -24
  448. package/dist/standalone/chunks/{brush-Bn3lPdHN.js → brush-DALmXSru.js} +18 -2
  449. package/dist/standalone/chunks/{busy-B7Mxemwm.js → busy-eG3uHonz.js} +5 -4
  450. package/dist/standalone/chunks/{chart-tokens-D1Exf7BW.js → chart-tokens-DQ4hVSmn.js} +2 -2
  451. package/dist/standalone/chunks/{choice-field-CGvE4tyb.js → choice-field-B0oe_9fI.js} +6 -6
  452. package/dist/standalone/chunks/{choice-item-B6-9ZRlf.js → choice-item-Cx-nm1js.js} +17 -8
  453. package/dist/standalone/chunks/{clipboard-Crzt1Sh9.js → clipboard-RqIeP9Uz.js} +1 -1
  454. package/dist/standalone/chunks/{clipboard-BKlrP5rj.js → clipboard-UVLSkL4C.js} +1 -1
  455. package/dist/standalone/chunks/{crop-frame-poLCGrBG.js → crop-frame-Z9N0QML4.js} +1 -11
  456. package/dist/standalone/chunks/{date-field-BlI6grfT.js → date-field-Dy1_qxNv.js} +48 -47
  457. package/dist/standalone/chunks/define-6OfuRn5c.js +60 -0
  458. package/dist/standalone/chunks/drag-DT4__0t9.js +12 -0
  459. package/dist/standalone/chunks/footnotes-BeisMxLk.js +94 -0
  460. package/dist/standalone/chunks/{form-control-CyXQIJ2x.js → form-control-Bmk0SRDX.js} +2 -2
  461. package/dist/standalone/chunks/{frame-abXBnl8a.js → frame-xIMVEUCi.js} +5 -4
  462. package/dist/standalone/chunks/{handle-menu-ZVR_msk2.js → handle-menu-BAe9fPYJ.js} +14 -33
  463. package/dist/standalone/chunks/{heading-text-CV5gBf7k.js → heading-text-B2kF-b8p.js} +1 -1
  464. package/dist/standalone/chunks/hue-vLbNdAEl.js +20 -0
  465. package/dist/standalone/chunks/{i18n-B6Al9xCK.js → i18n-DFfGgd3d.js} +49 -34
  466. package/dist/standalone/chunks/{i18n-BI16HQmm.js → i18n-DQAcbHkY.js} +1 -1
  467. package/dist/standalone/chunks/late-CPQ_RbU-.js +30 -0
  468. package/dist/standalone/chunks/link--YWr8exL.js +69 -0
  469. package/dist/standalone/chunks/{marks-0kbeB4n8.js → marks-pOUDNUf1.js} +2 -2
  470. package/dist/standalone/chunks/{options-DMEc8rQt.js → options-ySaDL-dW.js} +2 -2
  471. package/dist/standalone/chunks/own-text-mpZVnMyX.js +5 -0
  472. package/dist/standalone/chunks/{palettes-CKLHSIPx.js → palettes-J4bQ21ks.js} +2 -2
  473. package/dist/standalone/chunks/{popover-base-ac49G87f.js → popover-base-hxo-Vh6E.js} +2 -2
  474. package/dist/standalone/chunks/{prose-BG4oQH-i.js → prose-BiuJgiah.js} +1 -1
  475. package/dist/standalone/chunks/{ramp-ggoyjMvC.js → ramp-CGDOcqBZ.js} +1 -1
  476. package/dist/standalone/chunks/save-as-DBGZjczB.js +6 -0
  477. package/dist/standalone/chunks/shortcuts-DPxCSO4M.js +210 -0
  478. package/dist/standalone/chunks/{slider-BWT8Fmwz.js → slider-jp3d-Ld-.js} +15 -14
  479. package/dist/standalone/chunks/{stars-BN9M_9Q1.js → stars-BAUc_LqI.js} +1 -1
  480. package/dist/standalone/chunks/{styles-DwSR-9a3.js → styles-CaeyhYDA.js} +3 -0
  481. package/dist/standalone/chunks/submit-BjBGB8OW.js +42 -0
  482. package/dist/standalone/chunks/{summary-BK-B4m5A.js → summary-W5s0TFqV.js} +1 -1
  483. package/dist/standalone/chunks/tags-CMLAGsVw.js +37 -0
  484. package/dist/standalone/chunks/{text-field-4IUUpRHE.js → text-field-CufOGdfr.js} +17 -11
  485. package/dist/standalone/chunks/{toggle-control-ioV2jhNY.js → toggle-control-Cgqp1jhf.js} +5 -3
  486. package/dist/standalone/chunks/{tokens-BuahF1lF.js → tokens-C_ul7pL9.js} +4 -3
  487. package/dist/standalone/chunks/{virtual-B-1oN14Y.js → virtual-D-qgACnE.js} +1 -1
  488. package/dist/standalone/confirm.js +27 -14
  489. package/dist/standalone/i18n-de.js +13 -2
  490. package/dist/standalone/icons.js +100 -98
  491. package/dist/standalone/links.js +1 -1
  492. package/dist/standalone/reset.css +10 -0
  493. package/dist/standalone/toast.js +1 -1
  494. package/dist/standalone/tokens.css +6 -5
  495. package/dist/tokens.css +6 -5
  496. package/dist/tokens.js +4 -3
  497. package/package.json +25 -2
  498. package/dist/standalone/chunks/announcer-haFcvqbe.js +0 -25
  499. package/dist/standalone/chunks/bk-kbd-B_TlKzWj.js +0 -275
  500. package/dist/standalone/chunks/define-CzVPD4Zi.js +0 -30
  501. package/dist/standalone/chunks/hue-Jvb-141g.js +0 -14
  502. package/dist/standalone/chunks/keyed-CZ2AaouM.js +0 -16
  503. package/dist/standalone/chunks/link-CWSMsx04.js +0 -60
@@ -0,0 +1,293 @@
1
+ import { css, html, nothing } from "lit";
2
+ import { ifDefined } from "lit/directives/if-defined.js";
3
+ import { live } from "lit/directives/live.js";
4
+ import { define } from "../internal/define.js";
5
+ import { emit, emitDetail } from "../internal/events.js";
6
+ import { lightDom, mutationObserver } from "../internal/server.js";
7
+ import { submitImplicitly } from "../internal/submit.js";
8
+ import { pastedTags, tagFieldStyles } from "../internal/tags.js";
9
+ import { TextField } from "../internal/text-field.js";
10
+ import "./bk-chip.js";
11
+ function chipText(chip) {
12
+ return [...chip.childNodes].filter((n) => !(n instanceof Element && n.slot)).map((n) => n.textContent ?? "").join("").trim();
13
+ }
14
+ const listFormats = /* @__PURE__ */ new Map();
15
+ function listFormat(locale) {
16
+ let f = listFormats.get(locale);
17
+ if (!f)
18
+ listFormats.set(locale, f = new Intl.ListFormat(locale, { type: "unit", style: "short" }));
19
+ return f;
20
+ }
21
+ class BkInputTags extends TextField {
22
+ static properties = {
23
+ ...TextField.properties,
24
+ values: { attribute: false, noAccessor: true },
25
+ placeholder: {},
26
+ readonly: { type: Boolean, reflect: true },
27
+ enterKeyHint: { attribute: "enterkeyhint" },
28
+ text: { state: true }
29
+ };
30
+ static styles = [TextField.styles, tagFieldStyles("input-tags"), css`
31
+ :host { --_bk-text-field-font-size: var(--bk-input-tags-font-size); }
32
+ `];
33
+ /** The values of the field when it has no slotted chips. */
34
+ own = [];
35
+ /** The values at the first connection, restored on form reset. */
36
+ defaultValues = [];
37
+ connectedOnce = false;
38
+ observer = mutationObserver(() => this.requestUpdate());
39
+ constructor() {
40
+ super();
41
+ this.readonly = false;
42
+ this.enterKeyHint = "";
43
+ this.text = "";
44
+ }
45
+ /** The slotted `<bk-chip>` elements, in their order. */
46
+ get chips() {
47
+ const host = lightDom(this);
48
+ return host ? [...host.children].filter((c) => c.localName === "bk-chip" && !c.slot) : [];
49
+ }
50
+ /** The app controls the chips: the default slot has `<bk-chip>` elements. */
51
+ get controlled() {
52
+ return this.chips.length > 0;
53
+ }
54
+ /** The values: the text of the slotted chips that are not `removed`, else the values of the field. */
55
+ get values() {
56
+ const chips = this.chips;
57
+ return chips.length ? chips.filter((c) => !c.hasAttribute("removed")).map(chipText) : [...this.own];
58
+ }
59
+ set values(v) {
60
+ const old = this.values;
61
+ this.own = [...new Set((v ?? []).map(String).filter(Boolean))];
62
+ this.requestUpdate("values", old);
63
+ }
64
+ connectedCallback() {
65
+ super.connectedCallback();
66
+ if (!this.connectedOnce) {
67
+ this.connectedOnce = true;
68
+ if (!this.defaultValues.length)
69
+ this.defaultValues = [...this.own];
70
+ }
71
+ this.observer.observe(this, { childList: true, subtree: true, characterData: true, attributes: true, attributeFilter: ["removed", "slot"] });
72
+ }
73
+ disconnectedCallback() {
74
+ super.disconnectedCallback();
75
+ this.observer.disconnect();
76
+ }
77
+ get control() {
78
+ return this.renderRoot?.querySelector("input") ?? null;
79
+ }
80
+ focus(options) {
81
+ this.control?.focus(options);
82
+ }
83
+ blur() {
84
+ this.control?.blur();
85
+ }
86
+ get changeable() {
87
+ return super.changeable && !this.readonly;
88
+ }
89
+ /* ---------- form ---------- */
90
+ formValue() {
91
+ const values = this.values;
92
+ if (!this.name || !values.length)
93
+ return null;
94
+ const data = new FormData();
95
+ for (const v of values)
96
+ data.append(this.name, v);
97
+ return data;
98
+ }
99
+ formState() {
100
+ return JSON.stringify(this.values);
101
+ }
102
+ resetValue() {
103
+ this.values = [...this.defaultValues];
104
+ this.text = "";
105
+ }
106
+ restoreValue(state) {
107
+ try {
108
+ const list = JSON.parse(state);
109
+ if (Array.isArray(list))
110
+ this.values = list;
111
+ } catch {
112
+ }
113
+ }
114
+ computeValidity() {
115
+ return this.required && !this.values.length ? { flags: { valueMissing: true }, message: this.i18n.t("valueRequired") } : { flags: {}, message: "" };
116
+ }
117
+ /* ---------- clear button ---------- */
118
+ get filled() {
119
+ return !!this.text || !this.controlled && this.own.length > 0;
120
+ }
121
+ emptyValue() {
122
+ this.text = "";
123
+ if (this.controlled || !this.own.length)
124
+ return false;
125
+ this.values = [];
126
+ }
127
+ /* ---------- value ---------- */
128
+ /** Sets the values of the field after a user action; fires `input` and `change` when they changed. */
129
+ commit(next) {
130
+ const old = this.own;
131
+ if (next.join("\0") === old.join("\0"))
132
+ return;
133
+ this.own = next;
134
+ this.requestUpdate("values", old);
135
+ emit(this, "input");
136
+ emit(this, "change");
137
+ }
138
+ /**
139
+ * Asks to add each of `values`: a cancelable `add` for each value that is not in the list yet. Without slotted
140
+ * chips the field adds the values that nobody cancelled. Returns the cancelled values.
141
+ */
142
+ addValues(values) {
143
+ const rejected = [];
144
+ let next = this.own;
145
+ for (const value of values) {
146
+ if ((this.controlled ? this.values : next).includes(value))
147
+ continue;
148
+ if (!emitDetail(this, "add", { value }, true))
149
+ rejected.push(value);
150
+ else if (!this.controlled)
151
+ next = [...next, value];
152
+ }
153
+ if (!this.controlled)
154
+ this.commit(next);
155
+ return rejected;
156
+ }
157
+ /** Adds the typed text as a tag. A cancelled `add` keeps the text in the field. */
158
+ addTyped() {
159
+ const t = this.text.trim();
160
+ if (!t) {
161
+ this.text = "";
162
+ return;
163
+ }
164
+ if (!this.addValues([t]).length)
165
+ this.text = "";
166
+ }
167
+ /** Asks to remove `value`: a cancelable `remove`. Without slotted chips the field removes it. */
168
+ removeValue(value, chip) {
169
+ if (!emitDetail(this, "remove", { value, chip }, true) || this.controlled)
170
+ return;
171
+ this.commit(this.own.filter((v) => v !== value));
172
+ }
173
+ /** The last tag that is not `removed`: the value and the slotted chip. */
174
+ get lastTag() {
175
+ if (!this.controlled)
176
+ return this.own.length ? { value: this.own[this.own.length - 1] } : void 0;
177
+ const chip = this.chips.filter((c) => !c.hasAttribute("removed")).pop();
178
+ return chip ? { value: chipText(chip), chip } : void 0;
179
+ }
180
+ /* ---------- events ---------- */
181
+ onInput(e) {
182
+ e.stopPropagation();
183
+ this.text = e.target.value;
184
+ }
185
+ onKeydown(e) {
186
+ if (!this.changeable || e.isComposing)
187
+ return;
188
+ switch (e.key) {
189
+ case "Enter": {
190
+ if (this.text.trim()) {
191
+ e.preventDefault();
192
+ this.addTyped();
193
+ return;
194
+ }
195
+ const form = this.internals.form;
196
+ if (form)
197
+ setTimeout(() => submitImplicitly(form));
198
+ return;
199
+ }
200
+ case ",":
201
+ e.preventDefault();
202
+ this.addTyped();
203
+ return;
204
+ case "Backspace": {
205
+ const last = this.text ? void 0 : this.lastTag;
206
+ if (!last)
207
+ return;
208
+ e.preventDefault();
209
+ this.removeValue(last.value, last.chip);
210
+ return;
211
+ }
212
+ }
213
+ }
214
+ /** A pasted list adds one tag for each part. The parts with a cancelled `add` stay in the field as text. */
215
+ onPaste(e) {
216
+ if (!this.changeable)
217
+ return;
218
+ const parts = pastedTags(e, this.text);
219
+ if (parts)
220
+ this.text = this.addValues(parts).join(", ");
221
+ }
222
+ onFocusOut(e) {
223
+ const to = e.relatedTarget;
224
+ if (to && (this.renderRoot.contains(to) || this.contains(to)))
225
+ return;
226
+ if (this.changeable && this.text.trim())
227
+ this.addTyped();
228
+ }
229
+ /** A click in the box puts the caret into the text. Chips, the clear button and the `end` slot content have their own action. */
230
+ onBoxClick(e) {
231
+ if (this.isDisabled)
232
+ return;
233
+ const own = (n) => n instanceof Element && (n.localName === "bk-chip" || n.classList.contains("clear") || n.parentElement === this && n.slot === "end");
234
+ if (e.composedPath().some(own))
235
+ return;
236
+ this.control?.focus();
237
+ }
238
+ /** The remove button of a slotted chip: the field stops the event of the chip and fires its own `remove`. */
239
+ onSlottedRemove(e) {
240
+ const chip = e.target;
241
+ if (chip.localName !== "bk-chip" || chip.parentElement !== this)
242
+ return;
243
+ e.stopPropagation();
244
+ if (this.changeable)
245
+ this.removeValue(chipText(chip), chip);
246
+ }
247
+ onTagRemove(e, value) {
248
+ e.stopPropagation();
249
+ if (!this.changeable)
250
+ return;
251
+ this.removeValue(value);
252
+ this.control?.focus();
253
+ }
254
+ /* ---------- render ---------- */
255
+ willUpdate(changed) {
256
+ super.willUpdate(changed);
257
+ if ((changed.has("readonly") || changed.has("disabled")) && !this.changeable)
258
+ this.text = "";
259
+ }
260
+ render() {
261
+ const controlled = this.controlled;
262
+ const values = this.values;
263
+ const tags = controlled || values.length > 0;
264
+ const desc = this.descriptionIds(values.length ? "tags-text" : void 0);
265
+ const removable = this.changeable;
266
+ const invalid = this.showInvalid;
267
+ return html`<div @focusout=${this.onFocusOut}>
268
+ ${this.renderField(html`<div class="${this.boxClass}${tags ? " has-tags" : ""}${tags && !this.hasLead ? " tags-first" : ""}" part="box" @click=${this.onBoxClick}>
269
+ ${this.renderStart()}
270
+ ${this.renderPrefix()}
271
+ <div class="values">
272
+ <span class="tags">${controlled ? nothing : this.own.map((v) => html`<bk-chip part="tag" size=${this.size} ?removable=${removable}
273
+ @remove=${(e) => this.onTagRemove(e, v)}>${v}</bk-chip>`)}<slot @remove=${this.onSlottedRemove}></slot></span>
274
+ <input part="input" id="control" type="text" autocomplete="off" autocapitalize="off" spellcheck="false"
275
+ enterkeyhint=${ifDefined(this.enterKeyHint || void 0)} .value=${live(this.text)}
276
+ placeholder=${ifDefined(tags ? void 0 : this.placeholder)} ?disabled=${this.isDisabled} ?readonly=${this.readonly}
277
+ aria-label=${ifDefined(this.label ? void 0 : this.forwardedName)} aria-describedby=${ifDefined(desc)}
278
+ aria-required=${this.required ? "true" : "false"} aria-invalid=${invalid ? "true" : "false"}
279
+ @input=${this.onInput} @paste=${this.onPaste} @change=${(e) => e.stopPropagation()} @keydown=${this.onKeydown} />
280
+ ${values.length ? html`<span class="sr-only" id="tags-text">${listFormat(this.i18n.locale).format(values)}</span>` : nothing}
281
+ </div>
282
+ ${this.renderSuffix()}
283
+ ${this.renderClear()}
284
+ ${this.renderEnd()}
285
+ </div>`)}
286
+ </div>`;
287
+ }
288
+ }
289
+ define("bk-input-tags", BkInputTags);
290
+ export {
291
+ BkInputTags
292
+ };
293
+ //# sourceMappingURL=bk-input-tags.js.map
@@ -61,6 +61,10 @@ import "../icons/set/visibility-off.js";
61
61
  * @csspart field - Wrapper of label, box and hint.
62
62
  * @csspart label - The `<label>`.
63
63
  * @csspart box - The bordered box.
64
+ * The native `spellcheck` attribute of the host passes to the inner control: `spellcheck="false"` switches the
65
+ * browser spell checker off. With `mono` the checker is off by default, since code is not prose. `spellcheck="true"`
66
+ * switches it on again.
67
+ *
64
68
  * @csspart input - The native `<input>` or `<textarea>`.
65
69
  * @csspart prefix - The `prefix` text.
66
70
  * @csspart suffix - The `suffix` text.
@@ -183,6 +187,7 @@ export declare class BkInputText extends TextField {
183
187
  enterKeyHint: {
184
188
  attribute: string;
185
189
  };
190
+ shortcut: {};
186
191
  autofocus: {
187
192
  type: BooleanConstructor;
188
193
  };
@@ -236,6 +241,13 @@ export declare class BkInputText extends TextField {
236
241
  * `previous`, `search` or `send`.
237
242
  */
238
243
  enterKeyHint: string;
244
+ /**
245
+ * The keyboard shortcut that moves the focus into the field: the id of a shortcut in the registry
246
+ * (`registerShortcuts`) or a key combination (`Mod+K`). The field sets `aria-keyshortcuts` on its native control, so a
247
+ * screen reader says the keys. The field does not bind the keys: bind them with `onShortcut`. Show the keys with
248
+ * `<bk-kbd slot="end" shortcut="…">`.
249
+ */
250
+ shortcut: string | undefined;
239
251
  /** Input mask, see the class description: `9` digit, `a` letter, `*` any character, the rest is fixed text. */
240
252
  mask: string | undefined;
241
253
  /** Focuses the field when it connects. */
@@ -253,7 +265,15 @@ export declare class BkInputText extends TextField {
253
265
  /** Initial value, restored on form reset. Defaults to the `value` attribute. */
254
266
  defaultValue: string;
255
267
  constructor();
268
+ /** The host attribute `spellcheck` reaches the inner control. It is not a property: the platform has `HTMLElement.spellcheck`. */
269
+ static get observedAttributes(): string[];
270
+ attributeChangedCallback(name: string, old: string | null, value: string | null): void;
271
+ /** `spellcheck` of the inner control: the host attribute, else off for `mono`, else the default of the browser. */
272
+ private get spellcheckAttr();
273
+ /** Follows the registry: a shortcut can get other keys, or register after the field. */
274
+ private unsubscribeShortcuts?;
256
275
  connectedCallback(): void;
276
+ disconnectedCallback(): void;
257
277
  static styles: import("lit").CSSResultGroup[];
258
278
  protected get control(): HTMLInputElement | HTMLTextAreaElement | null;
259
279
  protected formValue(): string;
@@ -7,7 +7,9 @@ import { CounterState } from "../internal/counter.js";
7
7
  import { emit } from "../internal/events.js";
8
8
  import { maskCaret, maskFormat, maskIsNumeric, maskLength, maskRaw } from "../internal/mask.js";
9
9
  import { TextField } from "../internal/text-field.js";
10
+ import { ariaKeyShortcuts, subscribeShortcuts } from "../shortcuts.js";
10
11
  import "./bk-icon.js";
12
+ import { submitImplicitly } from "../internal/submit.js";
11
13
  import "../icons/set/search.js";
12
14
  import "../icons/set/visibility.js";
13
15
  import "../icons/set/visibility-off.js";
@@ -43,6 +45,7 @@ class BkInputText extends TextField {
43
45
  pattern: {},
44
46
  mask: {},
45
47
  enterKeyHint: { attribute: "enterkeyhint" },
48
+ shortcut: {},
46
49
  autofocus: { type: Boolean },
47
50
  revealLabel: { attribute: "reveal-label" },
48
51
  counter: { type: Boolean, reflect: true },
@@ -69,10 +72,36 @@ class BkInputText extends TextField {
69
72
  this.autogrow = false;
70
73
  this.revealed = false;
71
74
  }
75
+ /** The host attribute `spellcheck` reaches the inner control. It is not a property: the platform has `HTMLElement.spellcheck`. */
76
+ static get observedAttributes() {
77
+ return [...super.observedAttributes, "spellcheck"];
78
+ }
79
+ attributeChangedCallback(name, old, value) {
80
+ super.attributeChangedCallback(name, old, value);
81
+ if (name === "spellcheck")
82
+ this.requestUpdate();
83
+ }
84
+ /** `spellcheck` of the inner control: the host attribute, else off for `mono`, else the default of the browser. */
85
+ get spellcheckAttr() {
86
+ const a = this.getAttribute?.("spellcheck");
87
+ if (a != null)
88
+ return a === "false" ? "false" : "true";
89
+ return this.mono ? "false" : void 0;
90
+ }
91
+ /** Follows the registry: a shortcut can get other keys, or register after the field. */
92
+ unsubscribeShortcuts;
72
93
  connectedCallback() {
73
94
  super.connectedCallback();
74
95
  if (!this.defaultValue)
75
96
  this.defaultValue = this.getAttribute("value") ?? "";
97
+ this.unsubscribeShortcuts = subscribeShortcuts(() => {
98
+ if (this.shortcut)
99
+ this.requestUpdate();
100
+ });
101
+ }
102
+ disconnectedCallback() {
103
+ super.disconnectedCallback();
104
+ this.unsubscribeShortcuts?.();
76
105
  }
77
106
  static styles = [TextField.styles, css`
78
107
  :host { --_bk-text-field-font-size: var(--bk-input-font-size); }
@@ -266,7 +295,7 @@ class BkInputText extends TextField {
266
295
  const form = this.internals.form;
267
296
  if (!form)
268
297
  return;
269
- setTimeout(() => form.requestSubmit());
298
+ setTimeout(() => submitImplicitly(form));
270
299
  }
271
300
  onChange() {
272
301
  emit(this, "change");
@@ -280,18 +309,19 @@ class BkInputText extends TextField {
280
309
  const rows = this.autogrow ? { "--_bk-input-text-rows": String(this.rows ?? 2), "--_bk-input-text-max-rows": this.maxRows ? String(this.maxRows) : "none" } : {};
281
310
  const disabled = this.isDisabled;
282
311
  const invalid = this.showInvalid ? "true" : "false";
312
+ const keys = this.shortcut ? ariaKeyShortcuts(this.shortcut) || void 0 : void 0;
283
313
  const control = this.multiline ? html`<textarea part="input" id="control" .value=${live(this.value)} name=${ifDefined(this.name || void 0)}
284
314
  placeholder=${ifDefined(this.placeholder)} rows=${ifDefined(this.rows)} style=${styleMap(rows)} ?disabled=${disabled}
285
315
  ?readonly=${this.readonly} ?required=${this.required} ?autofocus=${this.autofocus}
286
316
  minlength=${ifDefined(this.minlength)} maxlength=${ifDefined(this.maxlength)}
287
- autocomplete=${ifDefined(this.autocomplete)} aria-invalid=${invalid}
317
+ autocomplete=${ifDefined(this.autocomplete)} aria-invalid=${invalid} spellcheck=${ifDefined(this.spellcheckAttr)}
288
318
  aria-describedby=${ifDefined(desc)} aria-label=${ifDefined(ariaLabel)} enterkeyhint=${ifDefined(this.enterKeyHint || void 0)}
289
- @input=${this.onInput} @change=${this.onChange}></textarea>` : html`<input part="input" id="control" .value=${live(this.formattedValue)} type=${type}
319
+ aria-keyshortcuts=${ifDefined(keys)} @input=${this.onInput} @change=${this.onChange}></textarea>` : html`<input part="input" id="control" .value=${live(this.formattedValue)} type=${type}
290
320
  placeholder=${ifDefined(this.placeholder)} ?disabled=${disabled} ?readonly=${this.readonly}
291
321
  ?required=${this.required} ?autofocus=${this.autofocus} minlength=${ifDefined(this.minlength)}
292
322
  maxlength=${ifDefined(this.mask ? void 0 : this.maxlength)} pattern=${ifDefined(this.pattern)} autocomplete=${ifDefined(this.autocomplete)}
293
323
  inputmode=${ifDefined(this.inputmode ?? this.maskInputmode)} enterkeyhint=${ifDefined(this.enterKeyHint || void 0)} aria-invalid=${invalid}
294
- aria-describedby=${ifDefined(desc)} aria-label=${ifDefined(ariaLabel)}
324
+ spellcheck=${ifDefined(this.spellcheckAttr)} aria-describedby=${ifDefined(desc)} aria-label=${ifDefined(ariaLabel)} aria-keyshortcuts=${ifDefined(keys)}
295
325
  @input=${this.onInput} @change=${this.onChange} @keydown=${this.onKeydown} />`;
296
326
  return this.renderField(html`<div class=${this.boxClass} part="box">
297
327
  ${this.renderStart()}
@@ -7,6 +7,7 @@ import { emit } from "../internal/events.js";
7
7
  import { asciiDigits } from "../internal/date-field.js";
8
8
  import { TextField } from "../internal/text-field.js";
9
9
  import "./bk-icon.js";
10
+ import { submitImplicitly } from "../internal/submit.js";
10
11
  const cache = /* @__PURE__ */ new Map();
11
12
  function timeLocale(locale, seconds, cycle) {
12
13
  const key = `${locale}|${seconds}|${cycle ?? ""}`;
@@ -307,7 +308,7 @@ class BkInputTime extends TextField {
307
308
  e.preventDefault();
308
309
  const form = this.internals.form;
309
310
  if (form)
310
- setTimeout(() => form.requestSubmit());
311
+ setTimeout(() => submitImplicitly(form));
311
312
  return;
312
313
  }
313
314
  const editable = !this.readonly && !this.isDisabled;
@@ -6,6 +6,7 @@ import { LinkController } from "../internal/link.js";
6
6
  import { SlotController } from "../internal/slots.js";
7
7
  import { base, srOnly } from "../internal/styles.js";
8
8
  import "./bk-icon.js";
9
+ import { ownText } from "../internal/own-text.js";
9
10
  import "../icons/set/check.js";
10
11
  import "../icons/set/description.js";
11
12
  const SPACED = /* @__PURE__ */ new Set(["bk-stack", "bk-lines"]);
@@ -62,7 +63,7 @@ class BkItem extends LitElement {
62
63
  }
63
64
  /** The value of the row: `value`, otherwise the title text. */
64
65
  get itemValue() {
65
- return this.value ?? [...this.childNodes].filter((n) => !(n instanceof Element && n.slot)).map((n) => n.textContent).join("").trim();
66
+ return this.value ?? ownText(this).trim();
66
67
  }
67
68
  /**
68
69
  * Makes the item a row of a selectable grid (`state`) or a list item again (null). `<bk-item-group>`
@@ -1,5 +1,5 @@
1
1
  import { LitElement, type PropertyValues } from "lit";
2
- import type { BkImageViewer, ImageViewerChangeDetail, ImageViewerItem } from "./bk-image-viewer.js";
2
+ import type { BkImageViewer, ImageViewerChangeDetail, ImageViewerItem, ImageViewerPageDetail } from "./bk-image-viewer.js";
3
3
  import "./bk-dialog.js";
4
4
  import "./bk-button.js";
5
5
  import "./bk-image-viewer.js";
@@ -8,6 +8,7 @@ import "../icons/set/grid.js";
8
8
  /** One image of the viewer. */
9
9
  export type LightboxItem = ImageViewerItem;
10
10
  export type LightboxChangeDetail = ImageViewerChangeDetail;
11
+ export type LightboxPageDetail = ImageViewerPageDetail;
11
12
  /**
12
13
  * A gallery that opens a full-screen `<bk-image-viewer>` (zoom, pan, swipe, counter, captions,
13
14
  * optional filmstrip) in a bare, modal `<bk-dialog>` (top layer, inert background, focus trap, Esc
@@ -49,7 +50,9 @@ export type LightboxChangeDetail = ImageViewerChangeDetail;
49
50
  * window controls (the header of the app), so the controls are on a bar and not over the image. In a browser tab
50
51
  * the title bar area has no height, so there is no band.
51
52
  *
52
- * For the keys and gestures of the viewer, see `<bk-image-viewer>`. Esc or a tap beside the image closes the viewer. The
53
+ * For the keys and gestures of the viewer, see `<bk-image-viewer>`. The lightbox sets `immersive` on it: the plain
54
+ * wheel zooms, a click steps the zoom, and the keys work from the close button and the actions too. Previous and
55
+ * next stop at the ends; `loop` lets them wrap around. Esc or a tap beside the image closes the viewer. The
53
56
  * `--bk-image-viewer-*` tokens style the viewer (they inherit into it). The close button looks
54
57
  * like the controls of the viewer.
55
58
  *
@@ -68,6 +71,10 @@ export type LightboxChangeDetail = ImageViewerChangeDetail;
68
71
  *
69
72
  * `openLightbox(items, index, { actions: [open] })` does the same appending in one step.
70
73
  *
74
+ * When the app has the list of pictures and shows one at a time, set `pageable` (and `first` or `last` at the ends of
75
+ * the list). The viewer then shows the previous and next buttons and fires `page`. Set `items` to the other picture in
76
+ * the handler. While it loads, the last picture stays in view.
77
+ *
71
78
  * @slot - The gallery: images, or links, buttons or figures that contain an image.
72
79
  * @slot actions - Extra buttons in the toolbar of the viewer, before the close button. They get the look of the controls of the viewer.
73
80
  * @csspart gallery - The grid around the slotted thumbnails.
@@ -95,6 +102,7 @@ export type LightboxChangeDetail = ImageViewerChangeDetail;
95
102
  * @fires {Event} open - Fires after the viewer opens. Does not bubble.
96
103
  * @fires {Event} close - Fires after the viewer closes (Esc, close button, tap beside the image, `close()`). Does not bubble.
97
104
  * @fires {CustomEvent<LightboxChangeDetail>} change - The user moves to another image. `event.detail.index` is the new index. The event bubbles (from the viewer).
105
+ * @fires {CustomEvent<LightboxPageDetail>} page - With `pageable`: the user asks for the previous or the next picture of the list of the app. `event.detail.direction` is `previous` or `next`. The event bubbles, is composed and is cancelable (from the viewer). See `<bk-image-viewer>`.
98
106
  *
99
107
  * @tag bk-lightbox
100
108
  * @keyboard Enter, Space - On an image of the gallery: open the image in the lightbox.
@@ -116,6 +124,22 @@ export declare class BkLightbox extends LitElement {
116
124
  type: BooleanConstructor;
117
125
  reflect: boolean;
118
126
  };
127
+ loop: {
128
+ type: BooleanConstructor;
129
+ reflect: boolean;
130
+ };
131
+ pageable: {
132
+ type: BooleanConstructor;
133
+ reflect: boolean;
134
+ };
135
+ first: {
136
+ type: BooleanConstructor;
137
+ reflect: boolean;
138
+ };
139
+ last: {
140
+ type: BooleanConstructor;
141
+ reflect: boolean;
142
+ };
119
143
  variant: {
120
144
  reflect: boolean;
121
145
  useDefault: boolean;
@@ -157,6 +181,14 @@ export declare class BkLightbox extends LitElement {
157
181
  items: LightboxItem[];
158
182
  /** Shows a row of thumbnails under the image. */
159
183
  filmstrip: boolean;
184
+ /** Previous and next wrap around: after the last image comes the first. Without it, they stop at the ends. */
185
+ loop: boolean;
186
+ /** The app has the list of pictures: the viewer shows previous and next also for one image and fires `page` beyond its own images. */
187
+ pageable: boolean;
188
+ /** With `pageable`: the shown picture is the first of the list of the app. The previous button is off. */
189
+ first: boolean;
190
+ /** With `pageable`: the shown picture is the last of the list of the app. The next button is off. */
191
+ last: boolean;
160
192
  /** `grid`: square thumbnails that fill the width. `strip`: a wrapping row of thumbnails at one height. */
161
193
  variant: "grid" | "strip";
162
194
  /** Accessible name of the viewer (default from i18n). */
@@ -191,9 +223,9 @@ export declare class BkLightbox extends LitElement {
191
223
  show(index?: number): void;
192
224
  /** Closes the viewer. The focus returns to the element that had it before. */
193
225
  close(): void;
194
- /** Moves to the previous image (wraps around). */
226
+ /** Moves to the previous image. It wraps around with `loop`, else it stops at the first image. */
195
227
  previous(): void;
196
- /** Moves to the next image (wraps around). */
228
+ /** Moves to the next image. It wraps around with `loop`, else it stops at the last image. */
197
229
  next(): void;
198
230
  protected getUpdateComplete(): Promise<boolean>;
199
231
  /** Direct children that are or contain an image. */
@@ -227,6 +259,7 @@ declare global {
227
259
  */
228
260
  export declare function openLightbox(items: LightboxItem[], startIndex?: number, options?: {
229
261
  filmstrip?: boolean;
262
+ loop?: boolean;
230
263
  actions?: HTMLElement[];
231
264
  }): BkLightbox;
232
265
  //# sourceMappingURL=bk-lightbox.d.ts.map
@@ -15,6 +15,10 @@ class BkLightbox extends LitElement {
15
15
  index: { type: Number },
16
16
  items: { attribute: false },
17
17
  filmstrip: { type: Boolean, reflect: true },
18
+ loop: { type: Boolean, reflect: true },
19
+ pageable: { type: Boolean, reflect: true },
20
+ first: { type: Boolean, reflect: true },
21
+ last: { type: Boolean, reflect: true },
18
22
  variant: { reflect: true, useDefault: true },
19
23
  label: {},
20
24
  closeLabel: { attribute: "close-label" },
@@ -35,6 +39,10 @@ class BkLightbox extends LitElement {
35
39
  this.index = 0;
36
40
  this.items = [];
37
41
  this.filmstrip = false;
42
+ this.loop = false;
43
+ this.pageable = false;
44
+ this.first = false;
45
+ this.last = false;
38
46
  this.variant = "grid";
39
47
  this.label = "";
40
48
  this.closeLabel = "";
@@ -145,11 +153,11 @@ class BkLightbox extends LitElement {
145
153
  close() {
146
154
  this.open = false;
147
155
  }
148
- /** Moves to the previous image (wraps around). */
156
+ /** Moves to the previous image. It wraps around with `loop`, else it stops at the first image. */
149
157
  previous() {
150
158
  this.viewer?.previous();
151
159
  }
152
- /** Moves to the next image (wraps around). */
160
+ /** Moves to the next image. It wraps around with `loop`, else it stops at the last image. */
153
161
  next() {
154
162
  this.viewer?.next();
155
163
  }
@@ -268,7 +276,8 @@ class BkLightbox extends LitElement {
268
276
  return html`<div class="gallery" part="gallery"><slot @slotchange=${this.onSlotChange}></slot></div>
269
277
  <bk-dialog bare exportparts="dialog" heading=${this.label || this.i18n.t("imageViewer")} .open=${this.open}
270
278
  @open=${this.onDialogOpen} @close=${this.onDialogClose}>
271
- <bk-image-viewer part="viewer" autofocus .items=${this.view} .index=${this.index} ?filmstrip=${this.filmstrip}
279
+ <bk-image-viewer part="viewer" autofocus immersive .items=${this.view} .index=${this.index} ?filmstrip=${this.filmstrip} ?loop=${this.loop}
280
+ ?pageable=${this.pageable} ?first=${this.first} ?last=${this.last}
272
281
  label=${this.label || this.i18n.t("imageViewer")} prev-label=${this.prevLabel} next-label=${this.nextLabel}
273
282
  zoom-in-label=${this.zoomInLabel} zoom-out-label=${this.zoomOutLabel} fit-label=${this.fitLabel}
274
283
  actual-size-label=${this.actualSizeLabel} error-label=${this.errorLabel}
@@ -286,6 +295,7 @@ function openLightbox(items, startIndex = 0, options = {}) {
286
295
  const el = document.createElement("bk-lightbox");
287
296
  el.items = items;
288
297
  el.filmstrip = !!options.filmstrip;
298
+ el.loop = !!options.loop;
289
299
  for (const action of options.actions ?? []) {
290
300
  action.slot = "actions";
291
301
  el.append(action);
@@ -1,5 +1,7 @@
1
1
  import { LitElement } from "lit";
2
2
  import { type AriaForwarding, type TriggerAria } from "../internal/anchor.js";
3
+ import "./bk-icon.js";
4
+ import "../icons/set/external.js";
3
5
  export type { NavigateDetail } from "../internal/link.js";
4
6
  /**
5
7
  * A text link: a real `<a>` in the text's size, for a link at the end of a row ("Open in the editor")
@@ -24,10 +26,13 @@ export type { NavigateDetail } from "../internal/link.js";
24
26
  * underline on hover. Put it in the heading: `<bk-text variant="h3" level="3"><bk-link variant="title">`.
25
27
  *
26
28
  * It uses the font size of the text around it and does not wrap (a `title` link wraps). With `target="_blank"` it
27
- * sets `rel="noopener noreferrer"` unless `rel` is set. Keyboard focus shows the focus ring.
29
+ * sets `rel="noopener noreferrer"` unless `rel` is set. It also shows the `external` icon after the text, and a screen
30
+ * reader hears "(opens in a new tab)". To hide the icon, set `bk-link::part(new-tab) { display: none }`; the text stays.
31
+ * Keyboard focus shows the focus ring.
28
32
  *
29
33
  * @slot - The link text.
30
34
  * @csspart link - The `<a>`.
35
+ * @csspart new-tab - The icon after the text of a link with `target="_blank"`.
31
36
  * @cssprop --bk-link-fg - Colour of a standalone link (default --bk-accent-text).
32
37
  * @cssprop --bk-link-hover-fg - Colour of a standalone link on hover (default --bk-link-fg).
33
38
  * @cssprop --bk-link-inline-fg - Colour of an inline link (default the colour of the text around it).
@@ -38,6 +43,8 @@ export type { NavigateDetail } from "../internal/link.js";
38
43
  * @cssprop --bk-link-underline - Underline colour of a standalone link at rest (default the link colour at 35 %).
39
44
  * @cssprop --bk-link-underline-offset - Space between the text and its underline (default 0.15em).
40
45
  * @cssprop --bk-link-radius - Corner radius of the focus ring (default --bk-radius-sm).
46
+ * @cssprop --bk-link-new-tab-gap - Space between the text and the icon of a link with `target="_blank"` (default --bk-space-1).
47
+ * @cssprop --bk-link-new-tab-size - Size of that icon (default --bk-icon-xs).
41
48
  *
42
49
  * @fires {CustomEvent<NavigateDetail>} navigate - The user makes a plain click on the link (primary button, no modifier key, no other `target`, no `download`). `detail.href` is the resolved address. Bubbles, composed, cancelable: `preventDefault()` stops the browser, and the router of the app handles the navigation.
43
50
  * @tag bk-link
@@ -70,6 +77,7 @@ export declare class BkLink extends LitElement implements AriaForwarding {
70
77
  download: string | undefined;
71
78
  private forwarded;
72
79
  private links;
80
+ private i18n;
73
81
  constructor();
74
82
  /** Trigger ARIA of a popover or tooltip goes on the inner `<a>` (see setTriggerAria). */
75
83
  forwardAria(aria: TriggerAria): void;