@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,1236 @@
1
+ import { a as e, d as t, n, t as r, u as i } from "./lit-D8x-qXgH.js";
2
+ import { t as a } from "./if-defined-z_20pBRr.js";
3
+ import { t as o } from "./style-map-BMvn17E7.js";
4
+ import { c as s } from "./anchor-CNX3nt2F.js";
5
+ import { i as c, r as l, t as u } from "./define-6OfuRn5c.js";
6
+ import { t as d } from "./link--YWr8exL.js";
7
+ import { t as f } from "./i18n-DFfGgd3d.js";
8
+ import { n as p, r as m } from "./events-DQ4e9cPN.js";
9
+ import { i as h, n as g, r as _, t as v } from "./handle-menu-BAe9fPYJ.js";
10
+ import { t as y } from "./state-XYmTmnOw.js";
11
+ import { d as b, p as x } from "./shortcuts-DPxCSO4M.js";
12
+ import { a as S, d as C, t as w, v as T } from "./styles-CaeyhYDA.js";
13
+ import { t as E } from "./late-CPQ_RbU-.js";
14
+ import "./bk-icon-D4kI4F18.js";
15
+ import "../bk-button.js";
16
+ import "../bk-nav-item.js";
17
+ import { t as D } from "./own-text-mpZVnMyX.js";
18
+ import "./close-CcDDKPf9.js";
19
+ import "./menu-BTWBQt5u.js";
20
+ import "./search-Cm9mOqRy.js";
21
+ import "./sidebar-collapse-uvu3jE3r.js";
22
+ import "./sidebar-expand-QkDkPjTV.js";
23
+ // dist/components/bk-shell-app.js
24
+ var O = new E({ "bk-drawer": () => import("../bk-drawer.js") }, "bk-drawer"), k = ToggleEvent, A = class extends k {
25
+ region;
26
+ constructor(e, t) {
27
+ super("toggle", {
28
+ oldState: t ? "closed" : "open",
29
+ newState: t ? "open" : "closed"
30
+ }), this.region = e;
31
+ }
32
+ get detail() {
33
+ return { region: this.region };
34
+ }
35
+ }, j = [
36
+ "sidebar-header",
37
+ "nav",
38
+ "sidebar",
39
+ "sidebar-footer",
40
+ "drawer"
41
+ ], M = [
42
+ "sidebar-header",
43
+ "sidebar",
44
+ "sidebar-footer"
45
+ ], N = /* @__PURE__ */ new Set([
46
+ "bk-pane",
47
+ "bk-split",
48
+ "bk-columns"
49
+ ]), P = /* @__PURE__ */ new Set(["bk-page-section", "bk-page-hero"]), F = /* @__PURE__ */ new Set([
50
+ "style",
51
+ "script",
52
+ "template",
53
+ "link",
54
+ "meta"
55
+ ]), I = "bk-input-search, bk-input-text[type=\"search\"], bk-combobox[type=\"search\"], [data-header-search]", L = "var(--bk-height-header, calc(var(--bk-control-md) + var(--bk-space-5)))", R = `var(--bk-height-header-nav, ${L})`, z = ["header", "header-end"], B = "bk-input-search, bk-input-text, bk-combobox, input", V = "header-search", H = class extends r {
56
+ static properties = {
57
+ sidebarCollapsed: {
58
+ type: Boolean,
59
+ reflect: !0,
60
+ attribute: "sidebar-collapsed"
61
+ },
62
+ persistKey: { attribute: "persist-key" },
63
+ breakpoint: { type: Number },
64
+ asideBreakpoint: {
65
+ type: Number,
66
+ attribute: "aside-breakpoint"
67
+ },
68
+ asideOpen: {
69
+ type: Boolean,
70
+ reflect: !0,
71
+ attribute: "aside-open"
72
+ },
73
+ asideResizable: {
74
+ type: Boolean,
75
+ reflect: !0,
76
+ attribute: "aside-resizable"
77
+ },
78
+ asideWidth: {
79
+ type: Number,
80
+ attribute: "aside-width"
81
+ },
82
+ navigationOpen: {
83
+ type: Boolean,
84
+ reflect: !0,
85
+ attribute: "navigation-open"
86
+ },
87
+ narrow: {
88
+ type: Boolean,
89
+ attribute: !1
90
+ },
91
+ workspace: {
92
+ type: Boolean,
93
+ attribute: !1
94
+ },
95
+ asideOverlay: {
96
+ type: Boolean,
97
+ attribute: !1
98
+ },
99
+ skipLabel: { attribute: "skip-label" },
100
+ asideLabel: { attribute: "aside-label" },
101
+ asideResizeLabel: { attribute: "aside-resize-label" },
102
+ navPlacement: {
103
+ attribute: "nav-placement",
104
+ reflect: !0,
105
+ useDefault: !0
106
+ },
107
+ transitions: {
108
+ type: Boolean,
109
+ reflect: !0
110
+ },
111
+ searchOpen: {
112
+ type: Boolean,
113
+ reflect: !0,
114
+ attribute: "search-open"
115
+ },
116
+ searchShortcut: { attribute: "search-shortcut" },
117
+ snapTitle: { state: !0 },
118
+ snapCollapsed: { state: !0 },
119
+ asideDrawerOpen: { state: !0 },
120
+ statusbarHeight: { state: !0 },
121
+ asideMoves: { state: !0 },
122
+ bottomNavHeight: { state: !0 }
123
+ };
124
+ get sections() {
125
+ return this.internals.states.has("sections");
126
+ }
127
+ internals = this.attachInternals();
128
+ pressAt = {
129
+ x: 0,
130
+ y: 0
131
+ };
132
+ paddingSheet;
133
+ i18n = new f(this);
134
+ links = new d(this);
135
+ used = /* @__PURE__ */ new Set();
136
+ authored;
137
+ fromState = /* @__PURE__ */ new Set();
138
+ persisted = {
139
+ sidebarCollapsed: this.persistedFlag("sidebarCollapsed", ""),
140
+ asideOpen: this.persistedFlag("asideOpen", ".aside")
141
+ };
142
+ authoredWidth;
143
+ storedWidth = new y(this, () => this.persistKey && `app-shell:${this.persistKey}.aside-width`, { onChange: (e) => {
144
+ this.authoredWidth ??= this.asideWidth ?? null, this.asideWidth = typeof e == "number" ? e : this.authoredWidth ?? void 0;
145
+ } });
146
+ draggingAside = !1;
147
+ resizeObserver;
148
+ children$ = c(() => this.requestUpdate());
149
+ childAttrs$ = c(() => this.requestUpdate());
150
+ asideTriggers = [];
151
+ sidebarTriggers = [];
152
+ persistedFlag(e, t) {
153
+ return new y(this, () => this.persistKey && `app-shell:${this.persistKey}${t}`, { onChange: (t) => {
154
+ this.authored ??= {
155
+ sidebarCollapsed: this.sidebarCollapsed,
156
+ asideOpen: this.asideOpen
157
+ };
158
+ let n = typeof t == "boolean" ? t : this.authored[e];
159
+ n !== this[e] && this.fromState.add(e), this[e] = n;
160
+ } });
161
+ }
162
+ constructor() {
163
+ super(), this.sidebarCollapsed = !1, this.breakpoint = 900, this.asideBreakpoint = 1200, this.asideOpen = !1, this.asideResizable = !1, this.navigationOpen = !1, this.narrow = !1, this.asideOverlay = !1, this.workspace = !1, this.asideDrawerOpen = !1, this.transitions = !1, this.searchOpen = !1, this.searchShortcut = "Mod+K", this.snapTitle = "", this.snapCollapsed = !1, this.statusbarHeight = 0, this.bottomNavHeight = 0, this.asideMoves = [], this.navPlacement = "top", this.addEventListener("click", this.onHostClick), this.addEventListener("toggle", this.onPageToggle, !0);
164
+ }
165
+ onPageToggle = (e) => {
166
+ let t = e.target;
167
+ t?.localName === "bk-page-header" && t.hasAttribute("snap") && (this.snapCollapsed = e.newState === "closed");
168
+ };
169
+ connectedCallback() {
170
+ super.connectedCallback(), this.children$.observe(this, { childList: !0 }), typeof ResizeObserver < "u" && (this.resizeObserver ??= new ResizeObserver(this.onResize), this.resizeObserver.observe(this), this.hasUpdated && this.observeStatusbar()), this.hasUpdated && (this.observeNav(), this.syncScrollPadding(), this.bindSearchShortcut());
171
+ }
172
+ disconnectedCallback() {
173
+ super.disconnectedCallback(), this.children$.disconnect(), this.childAttrs$.disconnect(), this.headerContent.disconnect(), this.watched = [], this.bottomItems.disconnect(), this.resizeObserver?.disconnect(), cancelAnimationFrame(this.fitFrame), this.bindSearchShortcut(), this.paddingSheet && (document.adoptedStyleSheets = document.adoptedStyleSheets.filter((e) => e !== this.paddingSheet));
174
+ }
175
+ headerHeight() {
176
+ return this.narrow ? `var(--bk-height-header-narrow, ${L})` : this.navRow ? `calc(${L} + ${R})` : L;
177
+ }
178
+ syncScrollPadding() {
179
+ if (!this.isConnected) return;
180
+ let e = this.paddingSheet ??= new CSSStyleSheet();
181
+ document.adoptedStyleSheets.includes(e) || (document.adoptedStyleSheets = [...document.adoptedStyleSheets, e]);
182
+ let t = this.showHeader ? `scroll-padding-top: calc(${this.headerHeight()} + var(--bk-safe-top));` : "", n = this.statusbarHeight + this.bottomNavHeight;
183
+ e.replaceSync(`:root { ${t} ${n ? `scroll-padding-bottom: ${n}px;` : ""} }`);
184
+ }
185
+ static styles = [
186
+ w,
187
+ S,
188
+ C,
189
+ T,
190
+ g,
191
+ i`
192
+ :host {
193
+ font-weight: var(--bk-weight-body, var(--bk-weight-regular)); font-feature-settings: var(--bk-features, normal);
194
+ --_bk-shell-app-vh: var(--bk-app-viewport-height); /* the screen the shell fills: the viewport, or a frame that sets the token */
195
+ /* The defaults of the optional app tokens. The shell sets no public token: a value of the app (in :root, on a scope
196
+ root or on the shell) reaches it through inheritance. */
197
+ --_bk-shell-app-header-height: ${t(L)};
198
+ --_bk-shell-app-bar-font-size: var(--bk-app-bar-font-size, var(--bk-type-small));
199
+ --_bk-shell-app-region-padding: var(--bk-app-region-padding, var(--bk-space-4));
200
+ --_bk-shell-app-header-gap: var(--bk-app-header-gap, var(--bk-space-3));
201
+ --_bk-shell-app-header-end-gap: var(--bk-app-header-end-gap, var(--bk-space-cluster));
202
+ --_bk-shell-app-nav-offset: var(--bk-app-nav-offset, var(--bk-space-4));
203
+ --_bk-shell-app-bar-padding-block: var(--bk-app-bar-padding-block, var(--bk-space-2));
204
+ --_bk-shell-app-statusbar-padding-inline: var(--bk-app-statusbar-padding-inline, var(--_bk-shell-app-region-padding));
205
+ --_bk-shell-app-statusbar-gap: var(--bk-app-statusbar-gap, var(--bk-space-4));
206
+ --_bk-shell-app-footer-padding-block: var(--bk-app-footer-padding-block, var(--bk-space-4));
207
+ --_bk-shell-app-drawer-width: var(--bk-app-drawer-width, calc(var(--bk-width-sidebar) + var(--bk-space-8)));
208
+ --_bk-shell-app-drawer-gap: var(--bk-app-drawer-gap, var(--bk-space-4));
209
+ --_bk-shell-app-aside-padding: var(--bk-app-aside-padding, var(--bk-space-5));
210
+ --_bk-shell-app-aside-min: var(--bk-app-aside-min, 240px);
211
+ --_bk-shell-app-aside-max: var(--bk-app-aside-max, 640px);
212
+ --_bk-shell-app-page-padding-block-start: var(--bk-app-page-padding-block-start, var(--bk-space-8));
213
+ --_bk-shell-app-page-padding-block-end: var(--bk-app-page-padding-block-end, var(--bk-space-8));
214
+ --_bk-shell-app-page-padding-inline: var(--bk-app-page-padding-inline, var(--bk-space-8));
215
+ --_bk-shell-app-page-padding-narrow: var(--bk-app-page-padding-narrow, var(--bk-space-4));
216
+ --_bk-shell-app-page-gap: var(--bk-app-page-gap, var(--bk-space-components));
217
+ --_bk-shell-app-bg: var(--bk-app-bg, var(--bk-layer-base-bg));
218
+ --_bk-shell-app-header-border: var(--bk-app-header-border, var(--bk-line));
219
+ --_bk-shell-app-sidebar-border: var(--bk-app-sidebar-border, var(--bk-line));
220
+ --_bk-shell-app-statusbar-border: var(--bk-app-statusbar-border, var(--bk-line));
221
+ --_bk-shell-app-hh: var(--_bk-shell-app-header-height);
222
+ --_bk-shell-app-pad: var(--_bk-shell-app-region-padding);
223
+ --_bk-shell-app-main-start: var(--_bk-shell-app-page-padding-block-start);
224
+ --_bk-shell-app-main-end: var(--_bk-shell-app-page-padding-block-end);
225
+ --_bk-shell-app-main-inline: var(--_bk-shell-app-page-padding-inline);
226
+ /* Beside a sidebar with a line, the page padding starts at the line, as on the other side at the window edge. */
227
+ --_bk-shell-app-main-inline-start: var(--_bk-shell-app-main-inline);
228
+ /* Block padding of the brand rows: a control-high first row sits centred in the header band, however many rows follow. */
229
+ --_bk-shell-app-band-pad: max(0px, calc((var(--_bk-shell-app-hh) - var(--bk-control-md)) / 2));
230
+ /* Rail icons sit exactly where they sit in the expanded nav, under the toggle button */
231
+ --_bk-shell-app-sw-rail: var(--bk-app-rail-width,
232
+ calc(2 * (var(--_bk-shell-app-pad) + var(--bk-nav-item-padding, var(--bk-row-pad-inline))) + var(--bk-nav-item-icon-size, var(--bk-icon-sm))));
233
+ /* The box in the rail that icons and marks are centred in. It is fixed, so they don't move while the sidebar changes width. */
234
+ --_bk-shell-app-rail-box: calc(var(--_bk-shell-app-sw-rail) - 2 * var(--_bk-shell-app-pad));
235
+ --_bk-shell-app-sw: calc(var(--bk-width-sidebar) + var(--bk-safe-start));
236
+ display: block; min-height: var(--_bk-shell-app-vh);
237
+ background: var(--_bk-shell-app-bg); color: var(--bk-text);
238
+ }
239
+ :host([sidebar-collapsed]:not(:state(narrow))) { --_bk-shell-app-sw: calc(var(--_bk-shell-app-sw-rail) + var(--bk-safe-start)); }
240
+ :host(:state(narrow)) {
241
+ --_bk-shell-app-main-start: var(--_bk-shell-app-page-padding-narrow); --_bk-shell-app-main-end: var(--_bk-shell-app-page-padding-narrow); --_bk-shell-app-main-inline: var(--_bk-shell-app-page-padding-narrow);
242
+ --_bk-shell-app-main-inline-start: var(--_bk-shell-app-main-inline);
243
+ --_bk-shell-app-pad: var(--bk-app-region-padding-narrow, var(--_bk-shell-app-region-padding));
244
+ --_bk-shell-app-hh: var(--bk-height-header-narrow, var(--_bk-shell-app-header-height));
245
+ }
246
+ .shell { display: contents; }
247
+
248
+ .skip {
249
+ position: absolute; z-index: calc(var(--bk-z-sticky) + 1); inset-inline-start: var(--bk-space-2); top: var(--bk-space-2);
250
+ padding: var(--bk-space-2) var(--bk-space-3); border-radius: var(--bk-radius-md);
251
+ background: var(--bk-accent-solid); color: var(--bk-on-accent); box-shadow: var(--bk-layer-overlay-shadow);
252
+ font-size: var(--bk-text-sm); font-weight: var(--bk-weight-medium); text-decoration: none;
253
+ opacity: 0; pointer-events: none; translate: 0 calc(-100% - var(--bk-space-4));
254
+ transition: translate var(--bk-duration-fast) var(--bk-ease), opacity var(--bk-duration-fast);
255
+ }
256
+ .skip:focus { opacity: 1; pointer-events: auto; translate: 0 0; outline: var(--bk-focus-ring); outline-offset: var(--bk-focus-offset); }
257
+
258
+ /* The banner element brings its own look (bk-alert banner); the shell only places it. */
259
+ .banner { display: block; }
260
+
261
+ /* Regions: all on the app background, a line between neighbours. */
262
+ .header {
263
+ position: sticky; top: 0; z-index: var(--bk-z-sticky); height: calc(var(--_bk-shell-app-hh) + var(--bk-safe-top));
264
+ /* The header draws its background under the notch and pads its content clear of it. */
265
+ padding-block-start: var(--bk-safe-top);
266
+ background: var(--bk-app-header-bg, var(--_bk-shell-app-bg));
267
+ backdrop-filter: var(--bk-app-header-backdrop, none); -webkit-backdrop-filter: var(--bk-app-header-backdrop, none);
268
+ border-block-end: var(--bk-border-width) solid var(--_bk-shell-app-header-border);
269
+ box-shadow: var(--bk-app-header-shadow, none);
270
+ }
271
+ .header-inner {
272
+ display: flex; align-items: center; gap: var(--_bk-shell-app-header-gap); height: 100%;
273
+ max-width: var(--bk-app-frame-width); margin-inline: auto;
274
+ --_bk-shell-header-pad: var(--_bk-shell-app-pad);
275
+ }
276
+ /* --bk-app-header-width: the content keeps that width in the middle, in line with the page sections.
277
+ Not with a sidebar: there the header lines up with the sidebar at the start. */
278
+ .header-inner.page-width { --_bk-shell-header-pad: max(var(--_bk-shell-app-pad), calc((100% - var(--bk-app-header-width, 100%)) / 2)); }
279
+ /* In an installed app whose window controls sit over the page (window controls overlay: a PWA,
280
+ Electron's titleBarOverlay) the header is the title bar: it drags the window, is as tall as the
281
+ title bar area at least, and keeps clear of the controls. Elsewhere the env() values are unset,
282
+ so nothing changes. What sits in the header stays clickable. */
283
+ .header {
284
+ -webkit-app-region: drag; app-region: drag;
285
+ height: calc(max(var(--_bk-shell-app-hh), env(titlebar-area-height, 0px)) + var(--_bk-shell-app-nav-row, 0px) + var(--bk-safe-top));
286
+ }
287
+ .header-inner, .nav-row {
288
+ padding-inline-start: max(var(--_bk-shell-header-pad), env(titlebar-area-x, 0px), var(--bk-safe-start));
289
+ padding-inline-end: max(var(--_bk-shell-header-pad), calc(100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw)), var(--bk-safe-end));
290
+ }
291
+ /* nav-placement="below": the nav is a second row of the header (--bk-height-header-nav, unset as high as the header band), in the width of the first row.
292
+ The line of the header is under the second row: the nav and the underline of its current item sit as in a header of one row. */
293
+ .header.has-row .header-inner { height: calc(100% - var(--_bk-shell-app-nav-row) + var(--bk-border-width)); }
294
+ .nav-row {
295
+ display: flex; align-items: center; height: calc(var(--_bk-shell-app-nav-row) - var(--bk-border-width));
296
+ max-width: var(--bk-app-frame-width); margin-inline: auto;
297
+ --_bk-shell-header-pad: var(--_bk-shell-app-pad);
298
+ }
299
+ .nav-row.page-width { --_bk-shell-header-pad: max(var(--_bk-shell-app-pad), calc((100% - var(--bk-app-header-width, 100%)) / 2)); }
300
+ .nav-row ::slotted(*) { -webkit-app-region: no-drag; app-region: no-drag; }
301
+ /* The heading of a collapsed page header (snap): the shell keeps its room, so nothing moves when it fades in. It gives way first. */
302
+ .title {
303
+ flex: 0 100 auto; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; user-select: none;
304
+ font-size: var(--bk-type-body); font-weight: var(--bk-weight-semibold); color: var(--bk-text);
305
+ opacity: 0; transition: opacity var(--bk-duration) var(--bk-ease);
306
+ }
307
+ .title.shown { opacity: 1; }
308
+ /* A search field in the header takes the width of a panel and gives way down to the minimum measure. */
309
+ :is(.header-start, .header-end) ::slotted(:is(bk-input-search, bk-input-text[type="search"], bk-combobox[type="search"], [data-header-search])) { flex: 0 1 var(--bk-width-panel); min-inline-size: var(--bk-measure-min); }
310
+ /* A search at the end of the header: on a wide screen the end region gives way first (the field gets narrower),
311
+ and the start region keeps its content. */
312
+ :host(:not(:state(narrow))) .header-end.search { flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
313
+ :host(:not(:state(narrow))) .header-end.search ::slotted(:not(bk-input-search, bk-input-text[type="search"], bk-combobox[type="search"], [data-header-search])) { flex-shrink: 0; }
314
+ :host(:not(:state(narrow))) .header.end-search .header-start { flex: 0 0 auto; }
315
+ /* While the shell measures the header (class fit), the content of the start region keeps its width: a brand is cut
316
+ only when no item can give way any more. */
317
+ .header-inner.fit .header-start ::slotted(:not(bk-input-search, bk-input-text[type="search"], bk-combobox[type="search"], [data-header-search])) { flex-shrink: 0; }
318
+ /* Search in the header: a narrow header swaps the field for an icon; the open search takes the whole row. */
319
+ :host(:state(narrow)) .search ::slotted([data-header-search]) { display: none; }
320
+ :host(:state(narrow)[search-open]) .search ::slotted([data-header-search]) { display: block; flex: 1 1 auto; min-inline-size: 0; }
321
+ :host(:state(narrow)[search-open]) .search ::slotted(:not([data-header-search])), :host([search-open]) .title,
322
+ :host([search-open]) .toggle, :host([search-open]) .nav, :host([search-open]) :is(.header-start, .header-end):not(.search) { display: none; }
323
+ :host([search-open]) .header-end.search { flex: 1 1 auto; min-width: 0; }
324
+ .search-toggle, .search-cancel { flex: none; }
325
+ .search-scopes {
326
+ position: absolute; inset-inline: 0; inset-block-start: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: var(--bk-space-cluster);
327
+ padding: var(--bk-space-2) max(var(--_bk-shell-app-pad), var(--bk-safe-start)) var(--bk-space-2) max(var(--_bk-shell-app-pad), var(--bk-safe-end));
328
+ background: var(--bk-app-header-bg, var(--_bk-shell-app-bg)); border-block-end: var(--bk-border-width) solid var(--_bk-shell-app-header-border);
329
+ }
330
+ .header-inner ::slotted(*), .header-inner button { -webkit-app-region: no-drag; app-region: no-drag; }
331
+ .header-start { display: flex; align-items: center; gap: var(--_bk-shell-app-header-gap); min-width: 0; flex: 1; }
332
+ /* Beside a nav the start region keeps its content, but a search field gives way down to its minimum. The nav keeps
333
+ its width: the header measures what does not fit and moves the nav into the drawer, before a brand is cut. */
334
+ .header.has-nav .header-start { flex: 0 1 auto; }
335
+ .header.has-nav .header-start ::slotted(:not(bk-input-search, bk-input-text[type="search"], bk-combobox[type="search"], [data-header-search])) { flex-shrink: 0; }
336
+ .nav {
337
+ display: flex; align-items: center; flex: 1 0 auto; min-width: 0; margin-inline-start: var(--_bk-shell-app-nav-offset);
338
+ /* In the header row: the line under the current item ends on the bottom edge of the header. */
339
+ --_bk-nav-indicator-offset: calc((var(--_bk-shell-app-hh) - var(--bk-border-width) - var(--bk-nav-horizontal-item-height, var(--bk-control-md))) / 2 + var(--bk-border-width));
340
+ }
341
+ /* The first label of the row stands on the edge of the brand: the row gives back the inner padding of the items. */
342
+ .nav-row .nav {
343
+ flex: 1 1 auto; margin-inline-start: calc(-1 * var(--bk-nav-horizontal-item-padding, var(--bk-space-3)));
344
+ /* The line under the current item ends on the bottom edge of the header: half the free room of the row
345
+ (without the border) below the item, plus the border. */
346
+ --_bk-nav-indicator-offset: calc((var(--_bk-shell-app-nav-row) - var(--bk-border-width) - var(--bk-nav-horizontal-item-height, var(--bk-control-md))) / 2 + var(--bk-border-width));
347
+ }
348
+ /* --bk-app-nav-align: center (the state nav-center): the outer regions have the same width, so the nav stands in the middle. */
349
+ :host(:state(nav-center)) .header.has-nav .header-start, :host(:state(nav-center)) .header.has-nav .header-end { flex: 1 1 0; min-width: 0; }
350
+ :host(:state(nav-center)) .header.has-nav .header-end { justify-content: flex-end; }
351
+ :host(:state(nav-center)) .header.has-nav .header-end ::slotted(*) { flex-shrink: 0; }
352
+ :host(:state(nav-center)) .header.has-nav .nav { flex: none; margin-inline-start: 0; }
353
+ /* Without header-end content an empty track of the same width keeps the nav in the middle. */
354
+ :host(:state(nav-center)) .header.has-nav .header-inner.no-end::after { content: ""; flex: 1 1 0; }
355
+ :host(:state(nav-center)) .nav-row .nav { justify-content: safe center; }
356
+ .header-end { display: flex; align-items: center; gap: var(--_bk-shell-app-header-end-gap); flex: none; }
357
+ .toggle { flex: none; }
358
+
359
+ .body {
360
+ display: grid; grid-template-columns: var(--_bk-shell-app-sw) minmax(0, 1fr) auto; align-items: start;
361
+ max-width: var(--bk-app-frame-width); width: 100%; margin-inline: auto;
362
+ /* The screen without header and status bar: what sidebar and aside fill, and the least the content takes. */
363
+ --_bk-shell-app-area: calc(var(--_bk-shell-app-vh) - var(--_bk-shell-app-top) - var(--_bk-shell-app-bottom));
364
+ transition: grid-template-columns var(--bk-duration) var(--bk-ease);
365
+ }
366
+ /* Without a sidebar the body runs edge to edge: sections and the page width hold the content. */
367
+ .body.no-sidebar { grid-template-columns: minmax(0, 1fr) auto; max-width: none; --_bk-shell-app-main-inline-start: var(--_bk-shell-app-main-inline); }
368
+
369
+ .sidebar, .aside, .aside-resize {
370
+ position: sticky; top: var(--_bk-shell-app-top); height: var(--_bk-shell-app-area);
371
+ overflow-x: hidden; overscroll-behavior: contain;
372
+ }
373
+ /* A brand lines up with the nav below it: the mark sits over the icons. */
374
+ .sidebar, bk-drawer.start {
375
+ --bk-nav-rail-size: var(--_bk-shell-app-rail-box);
376
+ --bk-brand-mark-box: var(--_bk-shell-app-rail-box);
377
+ }
378
+ .sidebar {
379
+ display: flex; flex-direction: column; background: var(--bk-app-sidebar-bg); padding-inline-start: var(--bk-safe-start);
380
+ border-inline-end: var(--bk-border-width) solid var(--_bk-shell-app-sidebar-border);
381
+ }
382
+ .sidebar-header { flex: none; display: flex; align-items: center; min-height: var(--_bk-shell-app-hh); padding: var(--_bk-shell-app-band-pad) var(--_bk-shell-app-pad); }
383
+ .sidebar-scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding: var(--_bk-shell-app-pad); display: flex; flex-direction: column; }
384
+ /* Expanded, the scroll bar's room is always kept and taken from the end padding: the items don't move when the list
385
+ starts to scroll, and stand as far from the sidebar's end as from its start. (--_bk-shell-app-sbw is measured.) */
386
+ :host(:not([sidebar-collapsed])) .sidebar-scroll, :host(:state(narrow)) .sidebar-scroll {
387
+ scrollbar-gutter: stable; padding-inline-end: max(0px, calc(var(--_bk-shell-app-pad) - var(--_bk-shell-app-sbw, 0px)));
388
+ }
389
+ /* It stands in the gutter beside the page, so it shows while the pointer or the focus is in the sidebar. */
390
+ @media (hover: hover) {
391
+ :host(:not([sidebar-collapsed])) .sidebar-scroll:not(:hover):not(:focus-within) { scrollbar-color: transparent transparent; }
392
+ }
393
+ .sidebar-header:not([hidden]) + .sidebar-scroll { padding-top: 0; }
394
+ .sidebar-footer { flex: none; padding: var(--_bk-shell-app-bar-padding-block) var(--_bk-shell-app-pad); border-block-start: var(--bk-border-width) solid var(--_bk-shell-app-sidebar-border); }
395
+ .sidebar-toggle { flex: none; display: flex; padding: var(--_bk-shell-app-bar-padding-block) var(--_bk-shell-app-pad); }
396
+ /* The own toggle is one more row of the footer: the gap of the nav items above it, no pad between them. */
397
+ .sidebar-footer.joined { padding-block-end: 0; }
398
+ .sidebar-footer:not([hidden]) + .sidebar-toggle { padding-block-start: var(--bk-nav-gap, var(--bk-row-spacing)); }
399
+ .sidebar-footer ::slotted(bk-button[data-sidebar-toggle]) { margin-block-start: var(--_bk-shell-app-bar-padding-block); }
400
+ .sidebar-toggle-button { flex: 1; min-width: 0; }
401
+ :host([sidebar-collapsed]) .sidebar-toggle-button { flex: none; inline-size: var(--_bk-shell-app-rail-box); }
402
+
403
+ .aside {
404
+ width: calc(var(--_bk-shell-app-aw) + var(--bk-safe-end)); overflow-y: auto; padding: var(--_bk-shell-app-aside-padding); padding-inline-end: calc(var(--_bk-shell-app-aside-padding) + var(--bk-safe-end));
405
+ background: var(--bk-app-aside-bg, var(--_bk-shell-app-bg));
406
+ border-inline-start: var(--bk-border-width) solid var(--bk-app-aside-border, var(--bk-line));
407
+ }
408
+ :host([aside-resizable]) .aside { min-width: var(--_bk-shell-app-aside-min); max-width: var(--_bk-shell-app-aside-max); }
409
+ /* The aside and its drag edge share the last column; the edge sits on the line, over the aside. */
410
+ .aside, .aside-resize { grid-row: 1; grid-column: -2 / -1; }
411
+ .aside-resize {
412
+ z-index: 1; justify-self: start; width: var(--bk-space-2); translate: -50% 0;
413
+ overflow: visible; cursor: col-resize; touch-action: none; outline: none;
414
+ }
415
+ .aside-resize:dir(rtl) { translate: 50% 0; }
416
+ /* The line lights up over the aside's border: after a short delay on hover, at once while dragging or focused. */
417
+ .aside-resize::after {
418
+ content: ""; position: absolute; inset-block: 0; left: 50%; width: var(--bk-border-width); translate: -50% 0;
419
+ transition: background-color var(--bk-duration-fast) var(--bk-ease), width var(--bk-duration-fast) var(--bk-ease);
420
+ }
421
+ @media (hover: hover) {
422
+ .aside-resize:hover::after { transition-delay: 150ms; background: var(--bk-accent-solid); width: calc(3 * var(--bk-border-width)); }
423
+ }
424
+ .aside-resize:focus-visible::after, :host([resizing]) .aside-resize::after { background: var(--bk-accent-solid); width: calc(3 * var(--bk-border-width)); }
425
+ :host([resizing]) { cursor: col-resize; user-select: none; -webkit-user-select: none; }
426
+ :host([resizing]) ::slotted(*) { pointer-events: none; }
427
+
428
+ /* Flat by default; an app that sets its work area apart (the backend of a CMS) gives it a background and a corner. */
429
+ .content {
430
+ min-width: 0; min-height: var(--_bk-shell-app-area); display: flex; flex-direction: column;
431
+ background: var(--bk-app-content-bg, transparent); border-start-start-radius: var(--bk-app-content-radius, 0px);
432
+ }
433
+ main { flex: 1; padding: var(--_bk-shell-app-main-start) var(--_bk-shell-app-main-inline) var(--_bk-shell-app-main-end); padding-inline-start: var(--_bk-shell-app-main-inline-start); scroll-margin-top: var(--bk-shell-app-sticky-top); outline: none; min-width: 0; }
434
+ .main-inner { max-width: var(--bk-width-page); margin-inline: auto; }
435
+ /* Where the page touches a screen edge it keeps clear of the notch (landscape) and the home bar. */
436
+ .body:not(.has-aside) main { padding-inline-end: max(var(--_bk-shell-app-main-inline), var(--bk-safe-end)); }
437
+ .body.no-header { padding-block-start: var(--bk-safe-top); }
438
+ .body.no-sidebar main { padding-inline-start: max(var(--_bk-shell-app-main-inline-start), var(--bk-safe-start)); }
439
+ .content.edge { padding-block-end: var(--bk-safe-bottom); }
440
+ :host([transitions]) main { view-transition-name: bk-content; }
441
+ /* The page's own stack separates page parts (header, toolbar, cards) as components; stacks inside it keep the flow. */
442
+ :host(:not(:state(workspace))) .main-inner ::slotted(bk-stack) { gap: var(--_bk-shell-app-page-gap); }
443
+ /* A page of sections: each section runs edge to edge and holds its content in its width, with the
444
+ page padding beside it (like the footer). <main> adds no padding and no page width. */
445
+ :host(:state(sections)) main { padding: 0; }
446
+ /* Columns that flow in the document have their own padding: <main> adds no padding and no page width. */
447
+ :host(:state(flow)) main { padding: 0; }
448
+ :host(:state(flow)) .main-inner { max-width: none; }
449
+ :host(:state(sections)) .main-inner { max-width: none; }
450
+ :host(:state(sections)) .main-inner ::slotted(bk-page-section) { --bk-page-section-padding-inline: max(var(--_bk-shell-app-main-inline), var(--bk-safe-start), var(--bk-safe-end)); }
451
+ :host(:state(sections)) .main-inner ::slotted(bk-page-hero) { --bk-page-hero-padding-inline: max(var(--_bk-shell-app-main-inline), var(--bk-safe-start), var(--bk-safe-end)); }
452
+ /* The footer is a bk-page-footer or sections (bk-page-section), each a band of its own with the footer's line and spacing.
453
+ Other content gets the same as one band in the page padding. */
454
+ .footer-inner {
455
+ display: flex; flex-direction: column;
456
+ --bk-page-section-border: var(--bk-border-width) solid var(--bk-app-footer-border, var(--bk-line));
457
+ --bk-page-section-padding-inline: max(var(--bk-app-footer-padding-inline, var(--_bk-shell-app-main-inline)), var(--bk-safe-start), var(--bk-safe-end));
458
+ }
459
+ .footer-inner ::slotted(:not(bk-page-section, bk-page-footer)) {
460
+ padding: var(--_bk-shell-app-footer-padding-block) max(var(--bk-app-footer-padding-inline, var(--_bk-shell-app-main-inline)), var(--bk-safe-end)) var(--_bk-shell-app-footer-padding-block) max(var(--bk-app-footer-padding-inline, var(--_bk-shell-app-main-inline)), var(--bk-safe-start));
461
+ border-block-start: var(--bk-page-section-border);
462
+ }
463
+ :host(:state(workspace)) .footer { flex: none; }
464
+ .footer.edge { padding-block-end: var(--bk-safe-bottom); }
465
+ .footer {
466
+ background: var(--bk-app-footer-bg, transparent);
467
+ font-size: var(--_bk-shell-app-bar-font-size); color: var(--bk-app-bar-fg, var(--bk-text-muted));
468
+ }
469
+ .statusbar {
470
+ position: sticky; bottom: calc(var(--_bk-shell-app-bottom-nav, 0px) + var(--bk-keyboard-inset)); z-index: var(--bk-z-sticky); display: flex; align-items: center; gap: var(--_bk-shell-app-statusbar-gap);
471
+ padding: var(--_bk-shell-app-bar-padding-block) max(var(--_bk-shell-app-statusbar-padding-inline), var(--bk-safe-end)) var(--_bk-shell-app-bar-padding-block) max(var(--_bk-shell-app-statusbar-padding-inline), var(--bk-safe-start));
472
+ background: var(--bk-app-statusbar-bg, var(--_bk-shell-app-bg)); border-block-start: var(--bk-border-width) solid var(--_bk-shell-app-statusbar-border);
473
+ font-size: var(--_bk-shell-app-bar-font-size); color: var(--bk-app-bar-fg, var(--bk-text-muted));
474
+ /* A bk-bar in the status bar keeps its facts as far apart as the bar keeps its items. */
475
+ --bk-bar-gap: var(--_bk-shell-app-statusbar-gap);
476
+ }
477
+
478
+ /* Bottom navigation: the items of the nav as a bar at the foot of the screen, icon over label, as wide as each other. It sits below
479
+ the status bar, which stands above it while both stick to the viewport. It keeps clear of the home bar of a phone. */
480
+ .bottom-nav {
481
+ position: sticky; bottom: var(--bk-keyboard-inset); z-index: var(--bk-z-sticky);
482
+ padding-block-end: var(--bk-safe-bottom); padding-inline: var(--bk-safe-start) var(--bk-safe-end);
483
+ background: var(--bk-app-bottom-nav-bg, var(--bk-app-statusbar-bg, var(--_bk-shell-app-bg)));
484
+ border-block-start: var(--bk-border-width) solid var(--bk-app-bottom-nav-border, var(--_bk-shell-app-statusbar-border));
485
+ }
486
+ .statusbar.edge { padding-block-end: calc(var(--_bk-shell-app-bar-padding-block) + var(--bk-safe-bottom)); }
487
+ .bottom-list { display: flex; margin: 0; padding: 0; list-style: none; }
488
+ .bottom-list li { flex: 1 1 0; min-width: 0; display: flex; }
489
+ .bn-item {
490
+ --_bk-interactive-hover: var(--bk-app-bottom-nav-hover, var(--bk-hover)); --_bk-interactive-pressed: var(--bk-app-bottom-nav-pressed, var(--bk-pressed)); --_bk-interactive-focus-offset: var(--bk-focus-offset-inset);
491
+ flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--bk-app-bottom-nav-gap, var(--bk-space-0));
492
+ min-block-size: var(--bk-app-bottom-nav-height, calc(var(--bk-icon-lg) + 1.4 * var(--bk-text-xs) + 2 * var(--bk-space-2)));
493
+ padding: var(--bk-space-1) var(--bk-space-1); border: 0; border-radius: 0; background: transparent; font: inherit; text-decoration: none;
494
+ color: var(--bk-app-bottom-nav-fg, var(--bk-nav-item-fg, var(--bk-text-muted)));
495
+ }
496
+ .bn-icon { position: relative; display: inline-flex; --bk-icon-size: var(--bk-app-bottom-nav-icon-size, var(--bk-icon-md)); }
497
+ .bn-label {
498
+ max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4;
499
+ font-size: var(--bk-app-bottom-nav-font-size, var(--bk-text-xs)); font-weight: var(--bk-weight-medium);
500
+ }
501
+ .bn-count { position: absolute; inset-block-start: calc(-1 * var(--bk-space-1)); inset-inline-start: 60%; }
502
+ .bn-item[aria-current="page"] { color: var(--bk-app-bottom-nav-current-fg, var(--bk-nav-item-current-icon-color, var(--bk-accent-text))); }
503
+ .bn-item[aria-current="page"] .bn-label { font-weight: var(--bk-weight-semibold); }
504
+ .bn-item:disabled, .bn-item[aria-disabled="true"] { opacity: var(--bk-disabled-opacity); }
505
+ @media (forced-colors: active) { .bottom-nav { border-color: CanvasText; } .bn-item[aria-current="page"] { color: Highlight; } }
506
+
507
+ /* Workspace: the shell is the viewport, content scrolls inside */
508
+ :host(:state(workspace)) { display: flex; flex-direction: column; height: var(--_bk-shell-app-vh); min-height: 0; overflow: hidden; }
509
+ :host(:state(workspace)) .banner, :host(:state(workspace)) .header, :host(:state(workspace)) .statusbar, :host(:state(workspace)) .bottom-nav { flex: none; position: relative; }
510
+ :host(:state(workspace)) .body { flex: 1; min-height: 0; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
511
+ :host(:state(workspace)) .sidebar, :host(:state(workspace)) .aside, :host(:state(workspace)) .aside-resize { position: relative; top: 0; height: auto; min-height: 0; }
512
+ :host(:state(workspace)) .content { min-height: 0; overflow: hidden; }
513
+ /* Scroll containers are also containing blocks: absolute content (sr-only text) must not escape them and scroll the page. */
514
+ :host(:state(workspace)) main { position: relative; padding: 0; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
515
+ :host(:state(workspace)) .main-inner { max-width: none; margin: 0; flex: 1; min-height: 0; display: flex; flex-direction: column; }
516
+ /* A bk-pane directly in the main content is the page: it fills <main> with the page padding and gap, its content scrolls inside. */
517
+ /* Through the pane's tokens, so a pane may still set its own (a tool view edge to edge: --bk-pane-padding: 0). */
518
+ :host(:state(workspace)) .main-inner ::slotted(bk-pane) { flex: 1; min-height: 0; --bk-pane-padding: var(--_bk-shell-app-main-start) var(--_bk-shell-app-main-inline) var(--_bk-shell-app-main-end) var(--_bk-shell-app-main-inline-start); --bk-pane-gap: var(--_bk-shell-app-page-gap); --bk-pane-content-width: var(--bk-width-page); --bk-pane-stack-gap: var(--_bk-shell-app-page-gap); }
519
+ /* Split and columns fill <main> edge to edge. */
520
+ :host(:state(workspace)) .main-inner ::slotted(bk-split), :host(:state(workspace)) .main-inner ::slotted(bk-columns) { flex: 1; min-height: 0; }
521
+ /* A workspace is one flat surface: <main> has no page padding (also without a sidebar or an aside), and the panels
522
+ of its split lie on the content ground, divided by the lines of the split. --bk-app-content-bg raises the whole
523
+ content region; a panel of the app can still set its own --bk-panel-bg. */
524
+ :host(:state(workspace)) .body main { padding: 0; }
525
+ :host(:state(workspace)) .main-inner ::slotted(bk-split), :host(:state(workspace)) .main-inner ::slotted(bk-columns) {
526
+ --bk-panel-bg: var(--bk-app-content-bg, var(--_bk-shell-app-bg));
527
+ }
528
+
529
+ /* Drawers: bk-drawer gives surface, motion and modality; here they have square corners and a line only towards the page. */
530
+ /* A drawer loads late (narrow shell, aside overlay): until then its content stays out of view. */
531
+ bk-drawer:not(:defined) { display: none; }
532
+ bk-drawer { --bk-drawer-radius: 0px; --bk-drawer-size: min(var(--_bk-shell-app-drawer-width), calc(100vw - var(--bk-space-12))); }
533
+ bk-drawer.end { --bk-drawer-size: min(var(--_bk-shell-app-aw), calc(100vw - var(--bk-space-12))); }
534
+ bk-drawer::part(dialog) { border-width: 0; }
535
+ bk-drawer.start::part(dialog) { border-inline-end-width: var(--bk-border-width); }
536
+ bk-drawer.end::part(dialog) { border-inline-start-width: var(--bk-border-width); }
537
+ .drawer-content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
538
+ .drawer-head { display: flex; align-items: center; gap: var(--bk-space-2); flex: none; min-height: var(--_bk-shell-app-hh); padding: var(--_bk-shell-app-band-pad) var(--_bk-shell-app-pad); }
539
+ .drawer-head .grow { flex: 1; min-width: 0; display: flex; align-items: center; }
540
+ .drawer-body { position: relative; flex: 1; overflow-y: auto; padding: 0 var(--_bk-shell-app-pad) var(--_bk-shell-app-pad); display: flex; flex-direction: column; gap: var(--_bk-shell-app-drawer-gap); }
541
+ bk-drawer.end .drawer-head { padding-inline: var(--_bk-shell-app-aside-padding); }
542
+ bk-drawer.end .drawer-body { padding: 0 var(--_bk-shell-app-aside-padding) var(--_bk-shell-app-aside-padding); }
543
+ .drawer-footer { flex: none; padding: var(--_bk-shell-app-bar-padding-block) var(--_bk-shell-app-pad); border-block-start: var(--bk-border-width) solid var(--bk-layer-modal-border); }
544
+ /* The rail and drawers clip: keyboard rings of their own buttons go inside */
545
+ .sidebar bk-button, bk-drawer bk-button { --bk-button-focus-offset: var(--bk-focus-offset-inset); }
546
+ @media (forced-colors: active) {
547
+ .header, .sidebar, .sidebar-footer, .aside, .statusbar, .footer-inner ::slotted(:not(bk-page-section, bk-page-footer)) { border-color: CanvasText; }
548
+ .skip { border: var(--bk-border-width) solid CanvasText; }
549
+ }
550
+
551
+ /* Print: only the page itself. The frame (banner, header, sidebar, aside, status bar, bottom navigation) stays on screen. */
552
+ @media print {
553
+ :is([part="skip-link"], [part="banner"], [part="header"], [part="sidebar"], [part="aside"], [part="aside-resize"], [part="statusbar"], [part="bottom-nav"]) { display: none; }
554
+ .shell, .body, .content, main { display: block; block-size: auto; min-block-size: 0; max-block-size: none; overflow: visible; }
555
+ }
556
+ `
557
+ ];
558
+ t(e) {
559
+ return this.i18n.t(e);
560
+ }
561
+ has(e) {
562
+ return this.used.has(e);
563
+ }
564
+ get hasSidebar() {
565
+ return M.some((e) => this.has(e));
566
+ }
567
+ get hasDrawer() {
568
+ return [
569
+ "nav",
570
+ "sidebar",
571
+ "sidebar-footer",
572
+ "drawer"
573
+ ].some((e) => this.has(e) && !(e === "nav" && this.navMoved));
574
+ }
575
+ get bottomNav() {
576
+ return this.navPlacement === "bottom" && this.narrow && (this.has("nav") || this.has("sidebar"));
577
+ }
578
+ get bottomSource() {
579
+ return this.has("nav") ? "nav" : "sidebar";
580
+ }
581
+ get navMoved() {
582
+ return this.bottomNav && this.has("nav");
583
+ }
584
+ get navRow() {
585
+ return this.navPlacement === "below" && !this.narrow && this.has("nav");
586
+ }
587
+ get hasHeaderContent() {
588
+ return [
589
+ "header",
590
+ "nav",
591
+ "header-end"
592
+ ].some((e) => this.has(e) && !(e === "nav" && this.navMoved));
593
+ }
594
+ get showHeader() {
595
+ return this.hasHeaderContent || this.narrow && this.hasDrawer;
596
+ }
597
+ slotOf(e) {
598
+ return [...this.children].find((t) => t.contains(e))?.getAttribute("slot") ?? "";
599
+ }
600
+ get placedToggles() {
601
+ let e = [...l(this)?.querySelectorAll("[data-sidebar-toggle]") ?? []];
602
+ return {
603
+ all: e,
604
+ inHeader: e.some((e) => [
605
+ "header",
606
+ "nav",
607
+ "header-end"
608
+ ].includes(this.slotOf(e)))
609
+ };
610
+ }
611
+ get searchElement() {
612
+ return [...l(this)?.querySelectorAll("[data-header-search]") ?? []].find((e) => z.includes(this.slotOf(e))) ?? null;
613
+ }
614
+ get hasSearch() {
615
+ return !!this.searchElement;
616
+ }
617
+ get searchSlot() {
618
+ let e = this.searchElement;
619
+ return e ? this.slotOf(e) : "";
620
+ }
621
+ get searchField() {
622
+ let e = this.searchElement;
623
+ return e ? e.matches(B) ? e : e.querySelector(B) : null;
624
+ }
625
+ openSearch() {
626
+ this.searchOpen = !0, this.updateComplete.then(() => this.searchField?.focus());
627
+ }
628
+ onSearchShortcut = () => {
629
+ let e = this.searchField;
630
+ if (!e || !this.isConnected) return !1;
631
+ this.narrow ? this.searchOpen ? e.focus() : this.openSearch() : e.focus();
632
+ };
633
+ boundSearchKeys = "";
634
+ unbindSearch;
635
+ bindSearchShortcut() {
636
+ let e = this.isConnected && this.hasSearch && this.searchShortcut !== "none" ? this.searchShortcut.trim() : "";
637
+ if (e === this.boundSearchKeys || (this.unbindSearch?.(), this.unbindSearch = void 0, this.boundSearchKeys = e, !e)) return;
638
+ let t = x([{
639
+ id: V,
640
+ keys: e,
641
+ label: this.t("searchShortcut"),
642
+ global: !0
643
+ }]), n = b(V, this.onSearchShortcut);
644
+ this.unbindSearch = () => {
645
+ n(), t();
646
+ };
647
+ }
648
+ closeSearch(e) {
649
+ let t = this.searchField;
650
+ e && t && t.value && (t.value = "", t.dispatchEvent(new Event("input", {
651
+ bubbles: !0,
652
+ composed: !0
653
+ }))), this.searchOpen = !1, this.updateComplete.then(() => this.renderRoot.querySelector(".search-toggle")?.focus());
654
+ }
655
+ onHeaderKeydown = (e) => {
656
+ e.key === "Escape" && !e.defaultPrevented && this.searchOpen && (e.preventDefault(), this.closeSearch(!0));
657
+ };
658
+ get asideVisible() {
659
+ return this.asideOverlay ? this.asideDrawerOpen : this.asideOpen;
660
+ }
661
+ onResize = (e) => {
662
+ for (let t of e) {
663
+ if (t.target === this) {
664
+ let e = t.contentBoxSize?.[0]?.inlineSize ?? t.contentRect.width;
665
+ if (e <= 0) continue;
666
+ this.width = e, this.applyWidth();
667
+ continue;
668
+ }
669
+ if (t.target.classList.contains("bottom-nav")) {
670
+ let e = Math.round(t.borderBoxSize?.[0]?.blockSize ?? t.contentRect.height);
671
+ cancelAnimationFrame(this.barFrame), this.barFrame = requestAnimationFrame(() => this.bottomNavHeight = e);
672
+ continue;
673
+ }
674
+ if (!t.target.classList.contains("statusbar")) {
675
+ let e = this.fitSizes.get(t.target), n = t.borderBoxSize?.[0]?.inlineSize ?? t.contentRect.width;
676
+ e !== void 0 && n < e - 1 && !this.gaveWay.has(t.target) && this.resetFit(), cancelAnimationFrame(this.fitFrame), this.fitFrame = requestAnimationFrame(() => this.applyWidth());
677
+ continue;
678
+ }
679
+ let e = Math.round(t.borderBoxSize?.[0]?.blockSize ?? t.contentRect.height);
680
+ cancelAnimationFrame(this.sizeFrame), this.sizeFrame = requestAnimationFrame(() => this.statusbarHeight = e);
681
+ }
682
+ };
683
+ sizeFrame = 0;
684
+ barFrame = 0;
685
+ fitFrame = 0;
686
+ width = 0;
687
+ navFitsFrom = 0;
688
+ centerFitsFrom = 0;
689
+ fitSizes = /* @__PURE__ */ new WeakMap();
690
+ watched = [];
691
+ resets = {
692
+ count: 0,
693
+ since: 0
694
+ };
695
+ gaveWay = /* @__PURE__ */ new Set();
696
+ get headerSlots() {
697
+ return this.brandInHeader ? [
698
+ "sidebar-header",
699
+ "nav",
700
+ "header-end"
701
+ ] : [
702
+ "header",
703
+ "nav",
704
+ "header-end"
705
+ ];
706
+ }
707
+ get optionalItems() {
708
+ let e = this.headerSlots;
709
+ return [...l(this)?.querySelectorAll("[data-header-priority]") ?? []].filter((t) => e.includes(this.slotOf(t))).map((e, t) => ({
710
+ el: e,
711
+ i: t,
712
+ p: Number(e.dataset.headerPriority) || 1
713
+ })).sort((e, t) => e.p - t.p || t.i - e.i).map((e) => e.el);
714
+ }
715
+ regionOverflow(e) {
716
+ if (!e || e.hidden) return 0;
717
+ let t = [...e.querySelectorAll("slot")].flatMap((e) => e.assignedElements()), n = t.map((e) => e.getBoundingClientRect().width).filter((e) => e > 0), r = parseFloat(getComputedStyle(e).columnGap) || 0, i = n.reduce((e, t) => e + t, 0) + r * Math.max(0, n.length - 1) - e.clientWidth;
718
+ return t.some((e) => e.truncated === !0) && (i = Math.max(i, 2)), i;
719
+ }
720
+ headerOverflow() {
721
+ let e = this.renderRoot.querySelector(".header-inner");
722
+ if (!e) return 0;
723
+ let t = this.regionOverflow(e.querySelector(".header-start")), n = e.querySelector(".nav"), r = n ? n.scrollWidth - n.clientWidth : 0, i = [...e.children].filter((e) => !e.hidden).at(-1)?.getBoundingClientRect(), a = e.getBoundingClientRect(), o = getComputedStyle(e), s = parseFloat(o.paddingInlineEnd) || 0, c = i ? o.direction === "rtl" ? a.left + s - i.left : i.right - (a.right - s) : 0, l = e.querySelector(".header-end.search"), u = l && !this.narrow ? this.regionOverflow(l) : 0;
724
+ return Math.max(c, Math.max(0, t) + Math.max(0, r) + Math.max(0, u));
725
+ }
726
+ navRowOverflow() {
727
+ let e = this.renderRoot.querySelector(".nav-row .nav");
728
+ return e ? e.scrollWidth - e.clientWidth : 0;
729
+ }
730
+ centerOverflow() {
731
+ let e = this.renderRoot.querySelector(".header-inner");
732
+ return e ? Math.max(this.regionOverflow(e.querySelector(".header-start")), this.regionOverflow(e.querySelector(".header-end"))) : 0;
733
+ }
734
+ isContentChange(e) {
735
+ return e.some((e) => !(e.target instanceof Element ? e.target : e.target.parentElement)?.closest("[data-sidebar-toggle]"));
736
+ }
737
+ resetFit() {
738
+ let e = performance.now();
739
+ e - this.resets.since > 1e3 && (this.resets = {
740
+ count: 0,
741
+ since: e
742
+ }), ++this.resets.count > 8 || (this.navFitsFrom = 0, this.centerFitsFrom = 0, this.fitSizes = /* @__PURE__ */ new WeakMap());
743
+ }
744
+ recordFit() {
745
+ let e = this.searchElement;
746
+ for (let t of this.children) ["header", "header-end"].includes(t.getAttribute("slot") ?? "") && t !== e && !t.matches(I) && this.fitSizes.set(t, t.getBoundingClientRect().width);
747
+ }
748
+ showGaveWay() {
749
+ for (let e of this.gaveWay) e.hidden = !1;
750
+ this.gaveWay.clear(), this.headerContent.takeRecords();
751
+ }
752
+ fitHeader() {
753
+ this.isContentChange(this.headerContent.takeRecords()) && this.resetFit(), this.showGaveWay();
754
+ let e = !!this.renderRoot.querySelector(".nav-row"), t = this.optionalItems.filter((e) => !e.hidden), n = this.renderRoot.querySelector(".header-inner");
755
+ t.length && n?.classList.add("fit");
756
+ for (let n of t) (e && this.slotOf(n) === "nav" ? this.navRowOverflow() : this.headerOverflow()) <= 1 || (n.hidden = !0, this.gaveWay.add(n));
757
+ n?.classList.remove("fit"), this.headerContent.takeRecords();
758
+ }
759
+ applyWidth() {
760
+ if (!this.width) return;
761
+ this.isContentChange(this.headerContent.takeRecords()) && this.resetFit();
762
+ let e = this.renderRoot.querySelector(".header-inner"), t = this.renderRoot.querySelector(".header .nav"), n = !!this.renderRoot.querySelector(".nav-row"), r = !!e && e.getBoundingClientRect().width < this.width - 1, i = (this.has("nav") ? getComputedStyle(this).getPropertyValue("--bk-app-nav-align").trim() : "") === "center" && (n || this.width >= this.centerFitsFrom);
763
+ if (this.setState("nav-center", i), i && t && !n) {
764
+ this.showGaveWay();
765
+ let e = this.centerOverflow();
766
+ e > 1 && (this.centerFitsFrom = r ? 1e400 : Math.ceil(this.width + 2 * e), this.recordFit(), i = !1, this.setState("nav-center", !1));
767
+ }
768
+ i && t && !n || this.fitHeader();
769
+ let a = t ? n ? this.navRowOverflow() : this.headerOverflow() : 0;
770
+ t && a > 1 && (this.navFitsFrom = r ? 1e400 : Math.ceil(this.width + a), this.recordFit());
771
+ let o = this.width < Math.max(this.breakpoint, this.navFitsFrom), s = this.width < this.asideBreakpoint;
772
+ o !== this.narrow && (this.narrow = o), s !== this.asideOverlay && (this.asideOverlay = s);
773
+ }
774
+ toggleSidebar(e) {
775
+ let t = e ?? !this.sidebarCollapsed;
776
+ t !== this.sidebarCollapsed && (this.sidebarCollapsed = t, this.fireToggle("sidebar"));
777
+ }
778
+ toggleAside(e) {
779
+ if (this.asideOverlay) {
780
+ let t = e ?? !this.asideDrawerOpen;
781
+ if (t === this.asideDrawerOpen) return;
782
+ this.asideDrawerOpen = t;
783
+ } else {
784
+ let t = e ?? !this.asideOpen;
785
+ if (t === this.asideOpen) return;
786
+ this.asideOpen = t;
787
+ }
788
+ this.fireToggle("aside");
789
+ }
790
+ showNavigation() {
791
+ this.narrow && (this.navigationOpen = !0);
792
+ }
793
+ hideNavigation() {
794
+ this.navigationOpen = !1;
795
+ }
796
+ fireToggle(e) {
797
+ let t = e === "sidebar" ? !this.sidebarCollapsed : this.asideVisible;
798
+ this.dispatchEvent(new A(e, t));
799
+ }
800
+ get drawers() {
801
+ return this.narrow || this.asideOverlay;
802
+ }
803
+ willUpdate(e) {
804
+ super.willUpdate(e), this.drawers && O.start();
805
+ let t = /* @__PURE__ */ new Set(), n = !1, r = !1, i = 0, a = !1;
806
+ for (let e of l(this)?.childNodes ?? []) if (e instanceof Element) {
807
+ this.childAttrs$.observe(e, {
808
+ attributes: !0,
809
+ attributeFilter: ["slot", "mode"]
810
+ });
811
+ let o = e.getAttribute("slot") || "default";
812
+ if (t.add(o), o !== "default" || F.has(e.localName)) continue;
813
+ e.localName === "bk-columns" && !["split", "stack"].includes(e.getAttribute("mode") ?? "") ? r = !0 : N.has(e.localName) && (n = !0), P.has(e.localName) ? i++ : a = !0;
814
+ } else e.nodeType === Node.TEXT_NODE && e.textContent?.trim() && (t.add("default"), a = !0);
815
+ this.used = t, n !== this.workspace && (this.workspace = n), this.setState("sections", !n && !a && i > 0), this.setState("flow", !n && r), (e.has("breakpoint") || e.has("asideBreakpoint")) && this.applyWidth(), !this.narrow && this.navigationOpen && (this.navigationOpen = !1), this.narrow && this.hasSearch || !this.searchOpen || (this.searchOpen = !1);
816
+ let o = l(this)?.querySelector("bk-page-header[snap]"), s = o?.headingText ?? "";
817
+ s !== this.snapTitle && (this.snapTitle = s);
818
+ let c = !!o?.collapsed;
819
+ c !== this.snapCollapsed && (this.snapCollapsed = c), !this.asideOverlay && this.asideDrawerOpen && (this.asideDrawerOpen = !1), this.setState("narrow", this.narrow), this.setState("aside-overlay", this.asideOverlay), this.setState("workspace", this.workspace);
820
+ }
821
+ setState(e, t) {
822
+ t ? this.internals.states.add(e) : this.internals.states.delete(e);
823
+ }
824
+ checkFlatSidebar() {
825
+ let e = this.renderRoot.querySelector(".sidebar");
826
+ if (!e) return;
827
+ let t = getComputedStyle(e), n = parseFloat(t.borderInlineEndWidth) || 0, r = t.borderInlineEndColor, i = n === 0 || r === "transparent" || /\/\s*0\)$|,\s*0\)$/.test(r);
828
+ this.setState("flat-sidebar", i);
829
+ }
830
+ updated(e) {
831
+ this.checkFlatSidebar(), super.updated(e), this.measureScrollbar();
832
+ for (let t of ["sidebarCollapsed", "asideOpen"]) e.has(t) && e.get(t) !== void 0 && !this.fromState.has(t) && this.persisted[t].set(this[t]);
833
+ this.fromState.clear(), this.syncNavs(), this.bindSearchShortcut(), e.has("narrow") && e.get("narrow") !== void 0 && (this.fitHeader(), requestAnimationFrame(() => this.applyWidth())), e.has("navPlacement") && e.get("navPlacement") !== void 0 && this.refit(), this.observeNav(), this.watchBottomItems(), this.observeStatusbar();
834
+ let t = this.renderRoot.querySelector(".header .toggle");
835
+ t && s(t, this.narrow ? {
836
+ haspopup: "dialog",
837
+ expanded: this.navigationOpen
838
+ } : {
839
+ haspopup: null,
840
+ expanded: null
841
+ }), this.asideTriggers = this.syncTriggers("data-aside-toggle", this.asideTriggers, this.has("aside") ? {
842
+ expanded: this.asideVisible,
843
+ haspopup: this.asideOverlay ? "dialog" : null
844
+ } : void 0), this.sidebarTriggers = this.syncTriggers("data-sidebar-toggle", this.sidebarTriggers, this.narrow ? {
845
+ expanded: this.navigationOpen,
846
+ haspopup: "dialog"
847
+ } : {
848
+ expanded: !this.sidebarCollapsed,
849
+ haspopup: null
850
+ }), this.syncToggleLook(), this.syncScrollPadding(), this.asideResizable && this.syncAsideResize();
851
+ }
852
+ syncToggleLook() {
853
+ let { icon: e, label: t } = this.toggleLook;
854
+ for (let n of this.sidebarTriggers) n.localName === "bk-button" && Object.assign(n, {
855
+ icon: e,
856
+ label: t
857
+ }), n.localName === "bk-nav-item" && (n.icon = e, n.textContent !== t && (n.textContent = t)), n.hidden = this.narrow && this.slotOf(n) === "sidebar-footer";
858
+ }
859
+ async getUpdateComplete() {
860
+ let e = await super.getUpdateComplete();
861
+ return this.drawers && await O.start(), this.asideMoves.length && await _(), await Promise.all([...this.renderRoot.querySelectorAll("bk-drawer")].map((e) => e.updateComplete)), e;
862
+ }
863
+ measureScrollbar() {
864
+ let e = this.renderRoot.querySelector(".sidebar-scroll");
865
+ if (!e || this.sidebarCollapsed && !this.narrow) return;
866
+ let t = e.offsetWidth - e.clientWidth;
867
+ t >= 0 && `${t}px` !== e.style.getPropertyValue("--_bk-shell-app-sbw") && e.style.setProperty("--_bk-shell-app-sbw", `${t}px`);
868
+ }
869
+ firstUpdated() {
870
+ this.observeStatusbar();
871
+ }
872
+ observeNav() {
873
+ let e = this.renderRoot.querySelector(".header .nav");
874
+ e && this.resizeObserver?.observe(e);
875
+ let t = this.headerSlots, n = [];
876
+ for (let r of this.children) {
877
+ let i = r.getAttribute("slot") ?? "";
878
+ i === "nav" ? e ? this.resizeObserver?.observe(r) : this.resizeObserver?.unobserve(r) : t.includes(i) ? this.resizeObserver?.observe(r) : this.resizeObserver?.unobserve(r), [
879
+ "header",
880
+ "nav",
881
+ "header-end"
882
+ ].includes(i) && n.push(r);
883
+ }
884
+ if (n.length === this.watched.length && n.every((e, t) => e === this.watched[t])) return;
885
+ let r = this.headerContent.takeRecords();
886
+ this.headerContent.disconnect();
887
+ for (let e of n) this.headerContent.observe(e, {
888
+ subtree: !0,
889
+ childList: !0,
890
+ characterData: !0,
891
+ attributes: !0,
892
+ attributeFilter: ["hidden"]
893
+ });
894
+ (this.watched.length || r.length) && this.refit(), this.watched = n;
895
+ }
896
+ headerContent = c((e) => {
897
+ this.isContentChange(e) && this.refit();
898
+ });
899
+ refit() {
900
+ this.resetFit(), cancelAnimationFrame(this.fitFrame), this.fitFrame = requestAnimationFrame(() => this.applyWidth());
901
+ }
902
+ observeStatusbar() {
903
+ let e = this.renderRoot.querySelector(".statusbar");
904
+ e && this.resizeObserver?.observe(e);
905
+ let t = this.renderRoot.querySelector(".bottom-nav");
906
+ t ? this.resizeObserver?.observe(t) : this.bottomNavHeight &&= 0;
907
+ }
908
+ bottomItems = c(() => this.requestUpdate());
909
+ watchBottomItems() {
910
+ if (this.bottomItems.disconnect(), this.bottomNav) for (let e of this.children) e.getAttribute("slot") === this.bottomSource && this.bottomItems.observe(e, {
911
+ subtree: !0,
912
+ attributes: !0,
913
+ childList: !0,
914
+ characterData: !0
915
+ });
916
+ }
917
+ bottomNavItems() {
918
+ let e = [];
919
+ for (let t of this.children) {
920
+ if (t.getAttribute("slot") !== this.bottomSource) continue;
921
+ let n = t.matches("bk-nav-item") ? [t] : [...t.querySelectorAll("bk-nav-item:not(bk-nav-group bk-nav-item)")];
922
+ for (let t of n) {
923
+ let n = D(t).replace(/\s+/g, " ").trim();
924
+ n && e.push({
925
+ el: t,
926
+ label: n,
927
+ icon: t.icon,
928
+ href: t.href,
929
+ target: t.target,
930
+ rel: t.rel,
931
+ count: t.count,
932
+ current: t.current,
933
+ disabled: t.disabled
934
+ });
935
+ }
936
+ }
937
+ return e.slice(0, 5);
938
+ }
939
+ onBottomItem(e, t) {
940
+ t.href !== void 0 && (e.metaKey || e.ctrlKey || e.shiftKey || e.button !== 0 || t.target === "_blank") || (e.preventDefault(), t.el.shadowRoot?.querySelector("[part=link]")?.click());
941
+ }
942
+ renderBottomNav() {
943
+ let t = this.bottomNavItems();
944
+ return e`<nav class="bottom-nav" part="bottom-nav" aria-label=${this.t("mainNavigation")}>
945
+ <ul class="bottom-list">${t.map((t) => {
946
+ let r = e`<span class="bn-icon">${t.icon ? e`<bk-icon name=${t.icon}></bk-icon>` : n}${t.count !== void 0 && t.count !== "" && t.count !== 0 ? e`<span class="count bn-count" part="bottom-nav-count">${t.count}</span>` : n}</span><span class="bn-label">${t.label}</span>`, i = t.current ? "page" : void 0;
947
+ return e`<li>${t.href === void 0 ? e`<button type="button" class="bn-item interactive" part="bottom-nav-item" ?disabled=${t.disabled} aria-current=${a(i)} @click=${(e) => this.onBottomItem(e, t)}>${r}</button>` : e`<a class="bn-item interactive" part="bottom-nav-item" href=${a(t.disabled ? void 0 : this.links.href(t.href))} target=${a(t.target)}
948
+ rel=${a(t.rel ?? (t.target === "_blank" ? "noopener noreferrer" : void 0))} aria-disabled=${a(t.disabled ? "true" : void 0)}
949
+ aria-current=${a(i)} @click=${(e) => this.onBottomItem(e, t)}>${r}</a>`}</li>`;
950
+ })}</ul>
951
+ </nav>`;
952
+ }
953
+ syncNavs() {
954
+ let e = this.sidebarCollapsed && !this.narrow, t = this.renderRoot.querySelector(".sidebar-toggle-button");
955
+ t && (t.collapsed = e, s(t, { expanded: !this.sidebarCollapsed }));
956
+ for (let t of this.children) {
957
+ let n = t.getAttribute("slot") ?? "";
958
+ if (!j.includes(n)) continue;
959
+ let r = [...t.matches("bk-nav, bk-brand") ? [t] : [], ...t.querySelectorAll("bk-nav, bk-brand")];
960
+ for (let t of r) t.localName === "bk-nav" && (t.drawer = this.narrow), t.collapsed = e && M.includes(n);
961
+ }
962
+ for (let e of this.children) e.localName === "bk-columns" && !e.slot && (e.narrow = this.narrow);
963
+ }
964
+ syncTriggers(e, t, n) {
965
+ let r = [...l(this)?.querySelectorAll(`[${e}]`) ?? []];
966
+ for (let e of t) r.includes(e) || s(e, {
967
+ expanded: null,
968
+ haspopup: null
969
+ });
970
+ if (n) for (let e of r) s(e, n);
971
+ return r;
972
+ }
973
+ onNavDrawerOpen(e) {
974
+ this.focusDrawer(e.currentTarget, () => {
975
+ for (let e of this.children) {
976
+ if (!j.includes(e.getAttribute("slot") ?? "")) continue;
977
+ let t = e.matches("[current]") ? e : e.querySelector("[current]");
978
+ if (t instanceof HTMLElement) return t;
979
+ }
980
+ return null;
981
+ }), m(this, "open");
982
+ }
983
+ focusDrawer(e, t = () => null) {
984
+ (t() ?? e.querySelector(".drawer-head bk-button"))?.focus();
985
+ }
986
+ onHostClick = (e) => {
987
+ let t = e.composedPath(), n = t.find((e) => e instanceof Element && e.hasAttribute?.("data-aside-toggle"));
988
+ n && this.contains(n) && this.toggleAside();
989
+ let r = t.find((e) => e instanceof Element && e.hasAttribute?.("data-sidebar-toggle"));
990
+ r && this.contains(r) && (this.narrow ? this.navigationOpen ? this.hideNavigation() : this.showNavigation() : this.toggleSidebar());
991
+ };
992
+ onSkip(e) {
993
+ e.preventDefault(), this.renderRoot.querySelector("main")?.focus();
994
+ }
995
+ onHeaderToggle() {
996
+ this.narrow ? this.showNavigation() : this.toggleSidebar();
997
+ }
998
+ onNavDrawerClick(e) {
999
+ e.metaKey || e.ctrlKey || e.shiftKey || e.button !== 0 || e.composedPath().some((e) => e instanceof HTMLAnchorElement && e.hasAttribute("href")) && this.hideNavigation();
1000
+ }
1001
+ onNavDrawerClose() {
1002
+ this.navigationOpen &&= !1, m(this, "close");
1003
+ }
1004
+ onAsideDrawerClose() {
1005
+ this.asideDrawerOpen && (this.asideDrawerOpen = !1, this.fireToggle("aside"));
1006
+ }
1007
+ get toggleLook() {
1008
+ return this.narrow ? {
1009
+ icon: "menu",
1010
+ label: this.t("openNavigation")
1011
+ } : this.sidebarCollapsed ? {
1012
+ icon: "sidebar-expand",
1013
+ label: this.t("expandSidebar")
1014
+ } : {
1015
+ icon: "sidebar-collapse",
1016
+ label: this.t("collapseSidebar")
1017
+ };
1018
+ }
1019
+ get brandInHeader() {
1020
+ return this.narrow && !this.has("header") && this.has("sidebar-header");
1021
+ }
1022
+ renderHeader() {
1023
+ let t = this.placedToggles, r = this.narrow ? this.hasDrawer && !t.inHeader : this.hasSidebar && !t.all.length, { icon: i, label: a } = this.toggleLook, o = !this.narrow && this.has("nav"), s = this.navRow, c = this.narrow && this.hasSearch, l = this.searchSlot, u = this.hasSidebar ? "" : "page-width", d = e`<div class="nav"><slot name="nav"></slot></div>`, f = c && !this.searchOpen ? e`<bk-button variant="ghost" class="search-toggle" part="search-toggle" icon="search" label=${this.t("openSearch")}
1024
+ aria-expanded="false" @click=${this.openSearch}></bk-button>` : n, p = c && this.searchOpen ? e`<bk-button variant="ghost" class="search-cancel" part="search-cancel" @click=${() => this.closeSearch(!0)}>${this.t("cancel")}</bk-button>` : n, m = l !== "header-end";
1025
+ return e`<header class="header ${o && !s ? "has-nav" : ""} ${s ? "has-row" : ""} ${l === "header-end" ? "end-search" : ""}" part="header" role="banner" @keydown=${this.onHeaderKeydown}>
1026
+ <div class="header-inner ${u} ${this.has("header-end") ? "" : "no-end"}">
1027
+ ${r ? e`<bk-button variant="ghost" class="toggle" part="toggle" icon=${i} label=${a} @click=${this.onHeaderToggle}></bk-button>` : n}
1028
+ <div class="header-start ${l === "header" ? "search" : ""}">${this.brandInHeader ? e`<slot name="sidebar-header"></slot>` : e`<slot name="header"></slot>`}${this.snapTitle ? e`<span class="title ${this.snapCollapsed ? "shown" : ""}" part="title" aria-hidden="true">${this.snapTitle}</span>` : n}</div>
1029
+ ${m ? f : n}
1030
+ ${m ? p : n}
1031
+ ${o && !s ? d : n}
1032
+ <div class="header-end ${l === "header-end" ? "search" : ""}" ?hidden=${!this.has("header-end")}>${m ? n : f}<slot name="header-end"></slot>${m ? n : p}</div>
1033
+ </div>
1034
+ ${s ? e`<div class="nav-row ${u}">${d}</div>` : n}
1035
+ <div class="search-scopes" part="search-scopes" ?hidden=${!(c && this.searchOpen && this.has("search-scopes"))}><slot name="search-scopes"></slot></div>
1036
+ </header>`;
1037
+ }
1038
+ renderSidebar() {
1039
+ let t = !this.hasHeaderContent && !this.placedToggles.all.length, { icon: r, label: i } = this.toggleLook;
1040
+ return e`<div class="sidebar" part="sidebar">
1041
+ <div class="sidebar-header" ?hidden=${!this.has("sidebar-header")}><slot name="sidebar-header"></slot></div>
1042
+ <div class="sidebar-scroll"><slot name="sidebar"></slot></div>
1043
+ <div class="sidebar-footer ${t ? "joined" : ""}" ?hidden=${!this.has("sidebar-footer")}><slot name="sidebar-footer"></slot></div>
1044
+ ${t ? e`<div class="sidebar-toggle"><bk-nav-item class="sidebar-toggle-button" part="sidebar-toggle" role="none" icon=${r} @click=${() => this.toggleSidebar()}>${i}</bk-nav-item></div>` : n}
1045
+ </div>`;
1046
+ }
1047
+ renderNavDrawer() {
1048
+ let t = this.narrow;
1049
+ return e`<bk-drawer class="start" placement="start" bare exportparts="dialog:drawer" heading=${this.t("mainNavigation")} .open=${this.navigationOpen}
1050
+ @click=${this.onNavDrawerClick} @open=${this.onNavDrawerOpen} @close=${this.onNavDrawerClose}>
1051
+ <div class="drawer-content">
1052
+ <div class="drawer-head">
1053
+ <div class="grow">${t && !this.brandInHeader ? e`<slot name="sidebar-header"></slot>` : n}</div>
1054
+ <bk-button variant="ghost" icon="close" label=${this.t("closeNavigation")} @click=${() => this.hideNavigation()}></bk-button>
1055
+ </div>
1056
+ <div class="drawer-body">${t ? e`${this.navMoved ? n : e`<slot name="nav"></slot>`}<slot name="sidebar"></slot><slot name="drawer"></slot>` : n}</div>
1057
+ <div class="drawer-footer" ?hidden=${!this.has("sidebar-footer")}>${t ? e`<slot name="sidebar-footer"></slot>` : n}</div>
1058
+ </div>
1059
+ </bk-drawer>`;
1060
+ }
1061
+ renderAsideDrawer(t) {
1062
+ return e`<bk-drawer class="end" placement="end" bare exportparts="dialog:aside-drawer" heading=${t} .open=${this.asideDrawerOpen}
1063
+ @open=${(e) => this.focusDrawer(e.currentTarget)} @close=${this.onAsideDrawerClose}>
1064
+ <div class="drawer-content">
1065
+ <div class="drawer-head"><div class="grow"></div>
1066
+ <bk-button variant="ghost" icon="close" label=${this.t("closePanel")} @click=${() => this.toggleAside(!1)}></bk-button>
1067
+ </div>
1068
+ <div class="drawer-body">${this.asideOverlay ? e`<slot name="aside"></slot>` : n}</div>
1069
+ </div>
1070
+ </bk-drawer>`;
1071
+ }
1072
+ renderAsideResize() {
1073
+ return e`<div class="aside-resize" part="aside-resize" role="separator" tabindex="0" aria-orientation="vertical"
1074
+ aria-controls="aside" aria-label=${this.asideResizeLabel || this.t("resizePanel")}
1075
+ @pointerdown=${this.onResizeStart} @keydown=${this.onResizeKey} @click=${this.onResizeClick} @dblclick=${this.resetAsideWidth}><span class="bk-grip" aria-hidden="true"></span></div>`;
1076
+ }
1077
+ asideLimits() {
1078
+ let e = this.renderRoot.querySelector(".aside");
1079
+ if (!e) return null;
1080
+ let t = getComputedStyle(e), n = parseFloat(t.minWidth) || 0;
1081
+ return {
1082
+ min: n,
1083
+ max: Math.max(n, parseFloat(t.maxWidth) || 1e400),
1084
+ now: e.getBoundingClientRect().width
1085
+ };
1086
+ }
1087
+ emitAsideResize(e) {
1088
+ let t = this.renderRoot.querySelector(".sidebar")?.getBoundingClientRect().width ?? 0, n = Math.max(this.getBoundingClientRect().width - t, e, 1), r = Math.min(Math.max(e / n, 0), 1);
1089
+ p(this, "resize", { sizes: [1 - r, r] });
1090
+ }
1091
+ setAsideWidth(e, t) {
1092
+ let n = Math.round(Math.min(t.max, Math.max(t.min, e)));
1093
+ return n !== this.asideWidth && (this.asideWidth = n, this.emitAsideResize(n), !0);
1094
+ }
1095
+ onResizeStart(e) {
1096
+ if (e.button !== 0 || this.draggingAside) return;
1097
+ let t = this.asideLimits();
1098
+ if (!t) return;
1099
+ e.preventDefault(), this.pressAt = {
1100
+ x: e.clientX,
1101
+ y: e.clientY
1102
+ };
1103
+ let n = e.currentTarget, r = this.matches(":dir(rtl)") ? 1 : -1, i = this.asideWidth, a = t.now, o = !0;
1104
+ try {
1105
+ n.setPointerCapture(e.pointerId);
1106
+ } catch {
1107
+ o = !1;
1108
+ }
1109
+ let s = o ? n : window;
1110
+ this.draggingAside = !0, this.toggleAttribute("resizing", !0);
1111
+ let c = null, l = 0, u = !1, d = () => {
1112
+ l = 0, c === null || u || (this.setAsideWidth(a + r * (c - e.clientX), t), c = null);
1113
+ }, f = (t) => {
1114
+ let n = t;
1115
+ n.pointerId === e.pointerId && (c = n.clientX, l ||= requestAnimationFrame(d));
1116
+ }, p = () => {
1117
+ this.draggingAside && (s.removeEventListener("pointermove", f), s.removeEventListener("pointerup", p), s.removeEventListener("pointercancel", p), n.removeEventListener("lostpointercapture", p), window.removeEventListener("keydown", m, !0), l && cancelAnimationFrame(l), u || d(), this.draggingAside = !1, this.toggleAttribute("resizing", !1), !u && this.asideWidth !== i && this.storedWidth.set(this.asideWidth));
1118
+ }, m = (t) => {
1119
+ t.key === "Escape" && (t.preventDefault(), t.stopPropagation(), u = !0, this.asideWidth = i, this.emitAsideResize(i ?? a), p(), o && n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId));
1120
+ };
1121
+ s.addEventListener("pointermove", f, { passive: !0 }), s.addEventListener("pointerup", p, { passive: !0 }), s.addEventListener("pointercancel", p, { passive: !0 }), o && n.addEventListener("lostpointercapture", p, { once: !0 }), window.addEventListener("keydown", m, !0);
1122
+ }
1123
+ asideStepsOf() {
1124
+ let e = this.asideLimits(), t = (e) => () => {
1125
+ let t = this.asideLimits();
1126
+ t && this.setAsideWidth(t.now + e * 64, t) && this.storedWidth.set(this.asideWidth);
1127
+ };
1128
+ return [
1129
+ {
1130
+ key: "wider",
1131
+ label: this.t("sizeWider"),
1132
+ disabled: !e || e.now >= e.max - .5,
1133
+ run: t(1)
1134
+ },
1135
+ {
1136
+ key: "narrower",
1137
+ label: this.t("sizeNarrower"),
1138
+ disabled: !e || e.now <= e.min + .5,
1139
+ run: t(-1)
1140
+ },
1141
+ {
1142
+ key: "reset",
1143
+ label: this.t("sizeReset"),
1144
+ divider: !0,
1145
+ disabled: this.asideWidth === void 0,
1146
+ run: () => this.resetAsideWidth()
1147
+ }
1148
+ ];
1149
+ }
1150
+ openAsideMenu(e, t) {
1151
+ this.draggingAside || (this.asideMoves = this.asideStepsOf(), h(this, e, t));
1152
+ }
1153
+ onResizeClick(e) {
1154
+ e.detail !== 1 || e.button !== 0 || this.draggingAside || Math.hypot(e.clientX - this.pressAt.x, e.clientY - this.pressAt.y) > 4 || this.openAsideMenu(e.currentTarget, {
1155
+ x: e.clientX,
1156
+ y: e.clientY
1157
+ });
1158
+ }
1159
+ onResizeKey(e) {
1160
+ if (this.draggingAside) return;
1161
+ if (e.key === "ContextMenu" || e.key === "F10" && e.shiftKey) {
1162
+ e.preventDefault(), this.openAsideMenu(e.currentTarget);
1163
+ return;
1164
+ }
1165
+ if (e.key === "Enter") {
1166
+ e.preventDefault(), this.resetAsideWidth();
1167
+ return;
1168
+ }
1169
+ let t = this.asideLimits();
1170
+ if (!t) return;
1171
+ let n = this.matches(":dir(rtl)"), r = e.shiftKey ? 64 : 16, i = n ? "ArrowRight" : "ArrowLeft", a = n ? "ArrowLeft" : "ArrowRight", o;
1172
+ switch (e.key) {
1173
+ case i:
1174
+ o = t.now + r;
1175
+ break;
1176
+ case a:
1177
+ o = t.now - r;
1178
+ break;
1179
+ case "Home":
1180
+ o = t.min;
1181
+ break;
1182
+ case "End":
1183
+ o = t.max;
1184
+ break;
1185
+ default: return;
1186
+ }
1187
+ e.preventDefault(), this.setAsideWidth(o, t) && this.storedWidth.set(this.asideWidth);
1188
+ }
1189
+ resetAsideWidth = () => {
1190
+ this.asideWidth !== void 0 && (this.asideWidth = void 0, this.storedWidth.set(void 0), this.updateComplete.then(() => {
1191
+ let e = this.asideLimits()?.now;
1192
+ e && this.emitAsideResize(Math.round(e));
1193
+ }));
1194
+ };
1195
+ syncAsideResize() {
1196
+ let e = this.renderRoot.querySelector(".aside-resize");
1197
+ if (!e) return;
1198
+ if (this.draggingAside && this.asideWidth) {
1199
+ e.setAttribute("aria-valuenow", String(this.asideWidth));
1200
+ return;
1201
+ }
1202
+ let t = this.asideLimits();
1203
+ t && (e.setAttribute("aria-valuenow", String(Math.round(t.now))), e.setAttribute("aria-valuemin", String(Math.round(t.min))), e.setAttribute("aria-valuemax", String(Math.round(Math.min(t.max, 1e6)))));
1204
+ }
1205
+ render() {
1206
+ let t = !this.narrow && this.hasSidebar, r = this.showHeader, i = this.asideLabel || this.t("sidePanel"), a = this.has("aside") && !this.asideOverlay && this.asideOpen, s = r && this.navRow ? R : "0px", c = r ? "calc(var(--_bk-shell-app-hh) + var(--_bk-shell-app-nav-row) + var(--bk-safe-top))" : "var(--bk-safe-top)", l = this.bottomNav ? "" : this.has("statusbar") ? "statusbar" : this.has("footer") ? "footer" : "content", u = e`<footer class="footer ${l === "footer" ? "edge" : ""}" part="footer" role="contentinfo" ?hidden=${!this.has("footer")}><div class="footer-inner"><slot name="footer"></slot></div></footer>`, d = {
1207
+ "--_bk-shell-app-nav-row": s,
1208
+ "--_bk-shell-app-top": c,
1209
+ "--_bk-shell-app-bottom": `${this.statusbarHeight + this.bottomNavHeight}px`,
1210
+ "--_bk-shell-app-bottom-nav": `${this.bottomNavHeight}px`,
1211
+ "--bk-shell-app-sticky-top": c,
1212
+ "--_bk-shell-app-aw": this.asideWidth ? `${this.asideWidth}px` : "var(--bk-width-panel)"
1213
+ };
1214
+ return e`<div class="shell" style=${o(d)}>
1215
+ <a class="skip" part="skip-link" href="#main" @click=${this.onSkip}>${this.skipLabel || this.t("skipToContent")}</a>
1216
+ <div class="banner" part="banner" ?hidden=${!this.has("banner")}><slot name="banner"></slot></div>
1217
+ ${r ? this.renderHeader() : n}
1218
+ <div class="body ${t ? "" : "no-sidebar"} ${a ? "has-aside" : ""} ${r || this.has("banner") ? "" : "no-header"}">
1219
+ ${t ? this.renderSidebar() : n}
1220
+ <div class="content ${l === "content" ? "edge" : ""}" part="content">
1221
+ <main id="main" part="main" tabindex="-1"><div class="main-inner"><slot></slot></div></main>
1222
+ ${u}
1223
+ </div>
1224
+ ${a ? e`<aside class="aside" part="aside" id="aside" aria-label=${i}><slot name="aside"></slot></aside>` : n}
1225
+ ${a && this.asideResizable ? this.renderAsideResize() : n}
1226
+ </div>
1227
+ <div class="statusbar ${l === "statusbar" ? "edge" : ""}" part="statusbar" ?hidden=${!this.has("statusbar")}><slot name="statusbar"></slot></div>
1228
+ ${this.bottomNav ? this.renderBottomNav() : n}
1229
+ ${this.renderNavDrawer()}
1230
+ ${this.has("aside") ? this.renderAsideDrawer(i) : n}
1231
+ ${this.asideMoves.length ? v(this.asideResizeLabel || this.t("resizePanel"), this.asideMoves) : n}
1232
+ </div>`;
1233
+ }
1234
+ };
1235
+ u("bk-shell-app", H);
1236
+ export { A as n, H as t };