@bk2k/ui 0.6.7 → 0.7.0

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