@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
@@ -1,29 +1,31 @@
1
1
  import { a as e, n as t, s as n, t as r, u as i } from "./chunks/lit-D8x-qXgH.js";
2
2
  import { t as a } from "./chunks/style-map-BMvn17E7.js";
3
3
  import { t as o } from "./chunks/if-defined-z_20pBRr.js";
4
- import { t as s } from "./chunks/define-CzVPD4Zi.js";
5
- import { t as c } from "./chunks/i18n-CNsBRNPu.js";
6
- import { t as l } from "./chunks/styles-DwSR-9a3.js";
4
+ import { t as s } from "./chunks/define-DkVeu7e9.js";
5
+ import { t as c } from "./chunks/i18n-DFfGgd3d.js";
6
+ import { t as l } from "./chunks/styles-CaeyhYDA.js";
7
7
  import { n as u } from "./chunks/events-DQ4e9cPN.js";
8
- import { t as d } from "./chunks/link-CWSMsx04.js";
9
- import { r as f } from "./chunks/chart-tokens-D1Exf7BW.js";
10
- import { t as p } from "./chunks/i18n-CrZgrRu9.js";
11
- import { a as m, i as h, n as g, t as _ } from "./chunks/format-DEwvmPPd.js";
12
- import { a as v, n as y, t as b } from "./chunks/scale-BcW5wHaU.js";
13
- import { t as x } from "./chunks/brush-Bn3lPdHN.js";
14
- import { a as S, i as C, n as w, o as T, r as E } from "./chunks/marks-CdqbbJpM.js";
15
- import { n as D, t as O } from "./chunks/summary-BwL-Gp8w.js";
16
- import { a as k, c as A, d as j, f as M, i as N, l as P, n as F, o as I, p as L, r as R, s as z, t as B } from "./chunks/frame-BW1nKuoM.js";
8
+ import { t as d } from "./chunks/link--YWr8exL.js";
9
+ import { r as f } from "./chunks/chart-tokens-DQ4hVSmn.js";
10
+ import { t as p } from "./chunks/i18n-DQAcbHkY.js";
11
+ import { a as m, i as h, n as g, r as _, t as v } from "./chunks/brush-DALmXSru.js";
12
+ import { a as y, i as b, n as x, t as S } from "./chunks/format-DEwvmPPd.js";
13
+ import { a as C, n as w, t as T } from "./chunks/scale-BcW5wHaU.js";
14
+ import { a as E, i as D, n as O, o as k, r as A } from "./chunks/marks-pOUDNUf1.js";
15
+ import { n as j, t as M } from "./chunks/summary-W5s0TFqV.js";
16
+ import { a as N, c as P, d as F, f as I, i as L, l as R, n as z, o as B, p as V, r as H, s as U, t as W } from "./chunks/frame-xIMVEUCi.js";
17
17
  import "./bk-chart-legend.js";
18
18
  import "./chunks/grid-BV0_DQ5v.js";
19
19
  // dist/components/bk-chart-bar.js
20
20
  f();
21
- var V = class extends r {
21
+ var G = class extends r {
22
22
  static properties = {
23
23
  data: { attribute: !1 },
24
24
  series: { attribute: !1 },
25
25
  x: {},
26
26
  xLabel: { attribute: "x-label" },
27
+ detail: {},
28
+ detailLabel: { attribute: "detail-label" },
27
29
  orientation: {
28
30
  reflect: !0,
29
31
  useDefault: !0
@@ -84,10 +86,14 @@ var V = class extends r {
84
86
  valueFormat: {
85
87
  attribute: "value-format",
86
88
  type: Object
89
+ },
90
+ tooltipFields: {
91
+ attribute: "tooltip-fields",
92
+ converter: m
87
93
  }
88
94
  };
89
95
  i18n = new c(this);
90
- chart = new B(this);
96
+ chart = new W(this);
91
97
  hot = null;
92
98
  active = {
93
99
  i: 0,
@@ -97,7 +103,7 @@ var V = class extends r {
97
103
  viewStart = 0;
98
104
  viewRows = [];
99
105
  layoutCache = null;
100
- brush = new x((e, t) => this.applyRange(e, t));
106
+ brush = new v((e, t) => this.applyRange(e, t));
101
107
  links = new d(this);
102
108
  constructor() {
103
109
  super(), this.data = [], this.series = [], this.x = "label", this.orientation = "vertical", this.mode = "grouped", this.labels = !1, this.seriesLabels = "auto", this.contiguous = !1, this.table = !1, this.bare = !1, this.variant = "default", this.selectable = !1, this.clickable = !1, this.showSummary = !1, this.range = null;
@@ -132,7 +138,35 @@ var V = class extends r {
132
138
  return this.rawKey(n) === t || n instanceof Date && this.rawKey(n).startsWith(t) || this.category(e) === t;
133
139
  }
134
140
  categoryHref(e) {
135
- return (this.href ?? "").replace(/\{([\w-]+)\}/g, (t, n) => n in e ? encodeURIComponent(this.rawKey(e[n])) : n === "x" ? encodeURIComponent(this.rawKey(e[this.x])) : t);
141
+ let t = this.href ?? "", n = (t) => t in e || t === "x", r = (t) => t in e ? e[t] : e[this.x], i = (e) => e == null || e === "", a = /^\{([\w-]+)\}$/.exec(t);
142
+ if (a && n(a[1])) {
143
+ let e = r(a[1]);
144
+ return i(e) ? null : this.rawKey(e);
145
+ }
146
+ let o = !1, s = t.replace(/\{([\w-]+)\}/g, (e, t) => {
147
+ if (!n(t)) return e;
148
+ let a = r(t);
149
+ return i(a) && (o = !0), encodeURIComponent(this.rawKey(a));
150
+ });
151
+ return o ? null : s;
152
+ }
153
+ isEmpty(e) {
154
+ return this.effectiveSeries.every((t) => U(e?.[t.key]) === null);
155
+ }
156
+ detailText(e) {
157
+ if (!this.detail) return "";
158
+ let t = e?.[this.detail];
159
+ return t instanceof Date ? b(this.i18n.locale, t.getTime()) : t == null ? "" : String(t);
160
+ }
161
+ categoryName(e) {
162
+ let t = this.category(e), n = this.detailText(e);
163
+ return n ? p(this.i18n.locale, "chartCategoryDetail", {
164
+ category: t,
165
+ detail: n
166
+ }) : t;
167
+ }
168
+ get marksCurrent() {
169
+ return this.pickMode !== null || this.current !== void 0 && this.current !== null && this.current !== "";
136
170
  }
137
171
  choose(e) {
138
172
  let t = this.viewStart + e, n = this.data[t]?.[this.x], r = {
@@ -146,11 +180,12 @@ var V = class extends r {
146
180
  u(this, "select", r, !0) && (this.current = this.rawKey(n));
147
181
  }
148
182
  categoryLabel(e) {
149
- return (this.layoutCache?.bars.filter((t) => t.i === e) ?? []).map((e) => this.markLabel(e)).join("; ");
183
+ let t = this.layoutCache?.bars.filter((t) => t.i === e) ?? [], n = t.map((e) => this.markLabel(e, !1)).join("; ");
184
+ return this.extraFields.length && t.length ? `${n}; ${this.extraText(this.viewRows[e])}` : n;
150
185
  }
151
186
  static styles = [
152
187
  l,
153
- ...R,
188
+ ...H,
154
189
  i`
155
190
  .plot { height: var(--bk-chart-height); }
156
191
  :host([orientation="horizontal"]) .plot { height: auto; }
@@ -167,23 +202,28 @@ var V = class extends r {
167
202
  }
168
203
  .mark.rest { fill: var(--bk-chart-bar-rest, var(--bk-chart-other)); }
169
204
  text.current { fill: var(--bk-chart-bar-current-label, var(--bk-text)); font-weight: var(--bk-weight-medium); }
205
+ text.detail { fill: var(--bk-chart-bar-detail, var(--bk-chart-label)); }
206
+ .current-mark { fill: var(--bk-chart-bar-current-mark, var(--bk-accent-solid)); }
207
+ .stub { fill: none; stroke: var(--bk-chart-bar-stub, var(--bk-chart-axis)); stroke-width: 1; }
170
208
  @media (forced-colors: active) {
171
209
  .ghost { fill: none; stroke: CanvasText; } .selection { fill: Highlight; stroke: Highlight; }
172
210
  .mark.rest { fill: GrayText; }
211
+ .current-mark { fill: Highlight; }
212
+ .stub { stroke: GrayText; }
173
213
  .cat:hover { outline: var(--bk-border-width) solid Highlight; outline-offset: var(--bk-focus-offset-inset); }
174
214
  }
175
215
  `,
176
- E
216
+ A
177
217
  ];
178
218
  get effectiveSeries() {
179
- return k(this.series, this.data, this.x);
219
+ return N(this.series, this.data, this.x);
180
220
  }
181
221
  category(e) {
182
222
  let t = e?.[this.x];
183
- return t instanceof Date ? h(this.i18n.locale, t.getTime()) : t == null ? "" : String(t);
223
+ return t instanceof Date ? b(this.i18n.locale, t.getTime()) : t == null ? "" : String(t);
184
224
  }
185
225
  fmt(e) {
186
- return m(this.i18n.locale, e, this.valueFormat);
226
+ return y(this.i18n.locale, e, this.valueFormat);
187
227
  }
188
228
  willUpdate(e) {
189
229
  if ((e.has("data") || e.has("range")) && (this.range && this.range[1] >= (this.data?.length ?? 0) && (this.range = null), this.viewStart = this.range?.[0] ?? 0, this.viewRows = this.range ? (this.data ?? []).slice(this.range[0], this.range[1] + 1) : this.data ?? []), e.has("data") || e.has("series") || e.has("mode") || e.has("range")) {
@@ -195,17 +235,17 @@ var V = class extends r {
195
235
  }
196
236
  }
197
237
  layout() {
198
- let { width: e } = this.chart, t = this.chart.specs, n = this.effectiveSeries, r = this.viewRows, i = r.length, a = n.length, o = this.orientation === "horizontal", s = this.mode !== "grouped", c = this.compare?.length && !s && !this.contiguous ? this.compare : null, l = (e, t) => c ? z(c[this.viewStart + e]?.[n[t].key]) : null, u = c ? .5 : 0, d = S(this), f = this.mode === "percent", p = r.map((e) => n.map((t) => z(e[t.key]))), m = p.map((e) => e.reduce((e, t) => e + (t && t > 0 ? t : 0), 0)), h = p.map((e) => e.reduce((e, t) => e + (t && t < 0 ? t : 0), 0)), g = this.i18n.locale, x = 0, C = 0;
199
- if (f) C = 1;
200
- else if (s) x = Math.min(0, ...h), C = Math.max(0, ...m);
201
- else for (let e of p) for (let t of e) t !== null && (x = Math.min(x, t), C = Math.max(C, t));
238
+ let { width: e } = this.chart, t = this.chart.specs, n = this.effectiveSeries, r = this.viewRows, i = r.length, a = n.length, o = this.orientation === "horizontal", s = this.mode !== "grouped", c = this.compare?.length && !s && !this.contiguous ? this.compare : null, l = (e, t) => c ? U(c[this.viewStart + e]?.[n[t].key]) : null, u = c ? .5 : 0, d = E(this), f = this.mode === "percent", p = r.map((e) => n.map((t) => U(e[t.key]))), m = p.map((e) => e.reduce((e, t) => e + (t && t > 0 ? t : 0), 0)), h = p.map((e) => e.reduce((e, t) => e + (t && t < 0 ? t : 0), 0)), g = this.i18n.locale, _ = 0, v = 0;
239
+ if (f) v = 1;
240
+ else if (s) _ = Math.min(0, ...h), v = Math.max(0, ...m);
241
+ else for (let e of p) for (let t of e) t !== null && (_ = Math.min(_, t), v = Math.max(v, t));
202
242
  if (c && !f) for (let e = 0; e < i; e++) for (let t = 0; t < a; t++) {
203
243
  let n = l(e, t);
204
- n !== null && (x = Math.min(x, n), C = Math.max(C, n));
244
+ n !== null && (_ = Math.min(_, n), v = Math.max(v, n));
205
245
  }
206
- let T = f ? null : w(d);
207
- T && (x = Math.min(x, T[0]), C = Math.max(C, T[1]));
208
- let E = t.labelSize, D = t.font, O = r.map((e) => this.category(e)), k = Math.max(0, ...O.map((e) => I(e, E, D))), A = (e) => {
246
+ let y = f ? null : O(d);
247
+ y && (_ = Math.min(_, y[0]), v = Math.max(v, y[1]));
248
+ let b = t.labelSize, x = t.font, D = r.map((e) => this.category(e)), k = r.map((e) => this.detailText(e)), A = k.some(Boolean), j = Math.max(0, ...D.map((e) => B(e, b, x)), ...k.map((e) => B(e, b, x))), M = r.map((e) => this.isEmpty(e)), N = b + t.clear, P = this.marksCurrent ? t.clear + t.indicator : 0, F = (e) => {
209
249
  if (this.contiguous) return {
210
250
  t: Math.max(1, e - t.gap),
211
251
  groupW: Math.max(1, e - t.gap)
@@ -215,124 +255,139 @@ var V = class extends r {
215
255
  t: i,
216
256
  groupW: n * (i * (1 + u) + r) + (n - 1) * t.gap
217
257
  };
218
- }, j, M, N, P, L, R = this.labels ? E + 4 + t.clear + t.gap : 0, B, V;
258
+ }, I, L, R, V, H, W = this.labels ? b + 4 + t.clear + t.gap : 0, G, K;
219
259
  if (o) {
220
- let n = s ? 1 : Math.max(1, a), r = this.contiguous ? t.barMax : n * (t.barMax * (1 + u) + (u ? t.gap : 0)) + (n - 1) * t.gap, o = Math.max(r / .7, t.hitMin + 8);
221
- M = Math.ceil(Math.min(k, e * .35) + 8), P = 2, L = P + i * o, j = this.variant === "minimal" ? L + 2 : L + E + 10 + t.clear, B = f ? v(0, 1, 4) : v(x, C, Math.max(2, Math.round((e - M) / 90))), V = _(g, B.ticks, f ? { style: "percent" } : this.valueFormat);
222
- let c = I(V(B.ticks[B.ticks.length - 1]), E, D), l = this.variant === "minimal" ? 2 : c / 2 + 2;
260
+ let n = s ? 1 : Math.max(1, a), r = this.contiguous ? t.barMax : n * (t.barMax * (1 + u) + (u ? t.gap : 0)) + (n - 1) * t.gap, o = (A ? N / 2 + b / 2 : b / 2) + P, c = Math.max(r / .7, t.hitMin + 8, Math.ceil(2 * o + 2 * t.clear));
261
+ L = Math.ceil(Math.min(j, e * .35) + 8), V = 2, H = V + i * c, I = this.variant === "minimal" ? H + 2 : H + b + 10 + t.clear, G = f ? C(0, 1, 4) : C(_, v, Math.max(2, Math.round((e - L) / 90))), K = S(g, G.ticks, f ? { style: "percent" } : this.valueFormat);
262
+ let l = B(K(G.ticks[G.ticks.length - 1]), b, x), d = this.variant === "minimal" ? 2 : l / 2 + 2;
223
263
  if (this.labels && !f) {
224
- let e = Math.max(0, ...p.flatMap((e, t) => s ? [m[t]] : e).map((e) => I(this.fmt(e), E, D)));
225
- l = Math.max(l, e + 8);
264
+ let e = Math.max(0, ...p.flatMap((e, t) => s ? [m[t]] : e).map((e) => B(this.fmt(e), b, x)));
265
+ d = Math.max(d, e + 8);
226
266
  }
227
- N = e - l;
267
+ R = e - d;
228
268
  } else {
229
- j = this.chart.height, P = Math.max(R, E / 2 + 2), L = j - (E + 10 + t.clear), B = v(x, C, Math.max(2, Math.round((L - P) / 48))), f && (B = v(0, 1, 4)), V = _(g, B.ticks, f ? { style: "percent" } : this.valueFormat);
230
- let n = Math.max(...B.ticks.map((e) => I(V(e), E, D)));
231
- M = this.variant === "minimal" ? 0 : Math.ceil(n + 8), N = e - 4;
269
+ I = this.chart.height, V = Math.max(W, b / 2 + 2), H = I - (b + 10 + t.clear + (A ? N : 0) + P), G = C(_, v, Math.max(2, Math.round((H - V) / 48))), f && (G = C(0, 1, 4)), K = S(g, G.ticks, f ? { style: "percent" } : this.valueFormat);
270
+ let n = Math.max(...G.ticks.map((e) => B(K(e), b, x)));
271
+ L = this.variant === "minimal" ? 0 : Math.ceil(n + 8), R = e - 4;
232
272
  }
233
- let H = [];
273
+ let q = [];
234
274
  if (!o && s && a >= 2 && a <= 4 && i > 0 && this.seriesLabels !== "none") {
235
- let t = Math.max(...n.map((e) => I(e.label, E, D)));
236
- e - M - (t + 12) >= 200 && (N = e - (t + 12), H = n.map((e, t) => ({
275
+ let t = Math.max(...n.map((e) => B(e.label, b, x)));
276
+ e - L - (t + 12) >= 200 && (R = e - (t + 12), q = n.map((e, t) => ({
237
277
  j: t,
238
278
  y: 0,
239
279
  text: e.label
240
280
  })));
241
281
  }
242
- let U = o ? y([B.min, B.max], [M, N]) : y([B.min, B.max], [L, P]), W = o ? b(i, [P, L]) : b(i, [M, N]), { t: G, groupW: K } = A(W.width), q = U(0), J = [], Y = [];
282
+ this.variant === "minimal" && !f && v > _ && (G = {
283
+ ...G,
284
+ min: Math.min(0, _),
285
+ max: Math.max(0, v)
286
+ });
287
+ let J = o ? w([G.min, G.max], [L, R]) : w([G.min, G.max], [H, V]), Y = o ? T(i, [V, H]) : T(i, [L, R]), { t: X, groupW: ee } = F(Y.width), Z = J(0), Q = [], $ = [];
243
288
  for (let e = 0; e < i; e++) {
244
- let n = W.center(e) - K / 2, r = 0, i = 0, c = s ? p[e].reduce((e, t, n) => t && t > 0 ? n : e, -1) : -1, d = s ? p[e].reduce((e, t, n) => t && t < 0 ? n : e, -1) : -1;
289
+ let n = Y.center(e) - ee / 2, r = 0, i = 0, c = s ? p[e].reduce((e, t, n) => t && t > 0 ? n : e, -1) : -1, d = s ? p[e].reduce((e, t, n) => t && t < 0 ? n : e, -1) : -1;
245
290
  for (let h = 0; h < a; h++) {
246
291
  let g = p[e][h], _ = m[e] || 1, v = g === null ? null : f ? Math.max(0, g) / _ : g, y = g !== null && m[e] ? Math.max(0, g) / m[e] : 0, b = 0, x = v ?? 0, S = !0, C = !0;
247
292
  s && v !== null && (v >= 0 ? (b = r, x = r + v, C = r === 0, r = x, S = h === c) : (b = i, x = i + v, C = i === 0, i = x, S = h === d));
248
- let w = G * (1 + u) + (u ? t.gap : 0), T = s ? n : n + h * (w + t.gap) + (u ? G * u + t.gap : 0), E = U(b), D = U(x);
293
+ let w = X * (1 + u) + (u ? t.gap : 0), T = s ? n : n + h * (w + t.gap) + (u ? X * u + t.gap : 0), E = J(b), D = J(x);
249
294
  if (s && !C && v !== null && v !== 0) {
250
295
  let e = Math.sign(D - E);
251
296
  E += e * t.gap, Math.sign(D - E) !== e && (E = D);
252
297
  }
253
298
  let O = (v ?? 0) < 0, k;
254
299
  if (o) {
255
- let n = Math.min(E, D), r = Math.abs(D - E), i = S ? O ? "left" : "right" : "none", o = s ? Math.max(G, Math.min(t.hitMin, W.width)) : Math.max(G + t.gap, Math.min(t.hitMin, W.width / Math.max(1, a))), c = T + G / 2 - o / 2, [l, u] = s ? [n - t.gap / 2, Math.max(r + t.gap, 4)] : [M, N - M];
300
+ let n = Math.min(E, D), r = Math.abs(D - E), i = S ? O ? "left" : "right" : "none", o = s ? Math.max(X, Math.min(t.hitMin, Y.width)) : Math.max(X + t.gap, Math.min(t.hitMin, Y.width / Math.max(1, a))), c = T + X / 2 - o / 2, [l, u] = s ? [n - t.gap / 2, Math.max(r + t.gap, 4)] : [L, R - L];
256
301
  k = {
257
302
  i: e,
258
303
  j: h,
259
304
  value: g,
260
305
  share: y,
261
- path: v === null ? "" : F(n, T, r, G, t.radius, i),
306
+ path: v === null ? "" : z(n, T, r, X, t.radius, i),
262
307
  x: n,
263
308
  y: T,
264
309
  w: r,
265
- h: G,
310
+ h: X,
266
311
  hx: l,
267
312
  hy: c,
268
313
  hw: u,
269
314
  hh: o,
270
315
  ax: O ? n : n + r,
271
- ay: T + G / 2
316
+ ay: T + X / 2,
317
+ stub: ""
272
318
  };
273
319
  } else {
274
- let n = Math.min(E, D), r = Math.abs(D - E), i = S ? O ? "bottom" : "top" : "none", o = s ? Math.max(G, Math.min(t.hitMin, W.width)) : Math.max(G + t.gap, Math.min(t.hitMin, W.width / Math.max(1, a))), c = T + G / 2 - o / 2, [l, u] = s ? [n - t.gap / 2, Math.max(r + t.gap, 4)] : [P, L - P];
320
+ let n = Math.min(E, D), r = Math.abs(D - E), i = S ? O ? "bottom" : "top" : "none", o = s ? Math.max(X, Math.min(t.hitMin, Y.width)) : Math.max(X + t.gap, Math.min(t.hitMin, Y.width / Math.max(1, a))), c = T + X / 2 - o / 2, [l, u] = s ? [n - t.gap / 2, Math.max(r + t.gap, 4)] : [V, H - V];
275
321
  k = {
276
322
  i: e,
277
323
  j: h,
278
324
  value: g,
279
325
  share: y,
280
- path: v === null ? "" : F(T, n, G, r, t.radius, i),
326
+ path: v === null ? "" : z(T, n, X, r, t.radius, i),
281
327
  x: T,
282
328
  y: n,
283
- w: G,
329
+ w: X,
284
330
  h: r,
285
331
  hx: c,
286
332
  hy: l,
287
333
  hw: o,
288
334
  hh: u,
289
- ax: T + G / 2,
290
- ay: O ? n + r : n
335
+ ax: T + X / 2,
336
+ ay: O ? n + r : n,
337
+ stub: ""
291
338
  };
292
339
  }
293
- J.push(k);
340
+ if (g === null && (!s || M[e] && h === 0)) {
341
+ let e = Math.max(t.clear, Math.round(X / 2));
342
+ k.stub = o ? z(Z, T, e, X, t.radius, "right") : z(T, Z - e, X, e, t.radius, "top");
343
+ }
344
+ Q.push(k);
294
345
  let A = l(e, h);
295
346
  if (A !== null) {
296
- let e = T - G * u - t.gap, n = G * u, r = U(A), i = A < 0 ? o ? "left" : "bottom" : o ? "right" : "top";
297
- Y.push({
347
+ let e = T - X * u - t.gap, n = X * u, r = J(A), i = A < 0 ? o ? "left" : "bottom" : o ? "right" : "top";
348
+ $.push({
298
349
  j: h,
299
- path: o ? F(Math.min(q, r), e, Math.abs(r - q), n, t.radius, i) : F(e, Math.min(q, r), n, Math.abs(r - q), t.radius, i)
350
+ path: o ? z(Math.min(Z, r), e, Math.abs(r - Z), n, t.radius, i) : z(e, Math.min(Z, r), n, Math.abs(r - Z), t.radius, i)
300
351
  });
301
352
  }
302
353
  }
303
354
  }
304
- if (H.length) {
305
- let e = J.filter((e) => e.i === i - 1);
306
- H = H.map((t) => {
355
+ if (q.length) {
356
+ let e = Q.filter((e) => e.i === i - 1);
357
+ q = q.map((t) => {
307
358
  let n = e.find((e) => e.j === t.j);
308
359
  return {
309
360
  ...t,
310
- y: n && n.value && n.h >= E ? n.y + n.h / 2 : NaN
361
+ y: n && n.value && n.h >= b ? n.y + n.h / 2 : NaN
311
362
  };
312
363
  }).filter((e) => Number.isFinite(e.y));
313
- let t = H.map((e) => e.y).sort((e, t) => e - t);
314
- t.some((e, n) => n && e - t[n - 1] < E + 2) && (H = []);
364
+ let t = q.map((e) => e.y).sort((e, t) => e - t);
365
+ t.some((e, n) => n && e - t[n - 1] < b + 2) && (q = []);
315
366
  }
316
367
  return {
317
- H: j,
318
- x0: M,
319
- x1: N,
320
- y0: P,
321
- y1: L,
322
- ticks: B,
323
- fmtTick: V,
324
- valueScale: U,
325
- bands: W,
326
- bars: J,
327
- ghosts: Y,
368
+ H: I,
369
+ x0: L,
370
+ x1: R,
371
+ y0: V,
372
+ y1: H,
373
+ ticks: G,
374
+ fmtTick: K,
375
+ valueScale: J,
376
+ bands: Y,
377
+ bars: Q,
378
+ ghosts: $,
328
379
  marks: d,
329
380
  cmp: !!c,
330
- t: G,
331
- zero: q,
332
- cats: O,
381
+ t: X,
382
+ zero: Z,
383
+ cats: D,
384
+ details: k,
385
+ hasDetail: A,
386
+ empty: M,
387
+ lineStep: N,
333
388
  values: p,
334
389
  totals: m,
335
- seriesLabels: H,
390
+ seriesLabels: q,
336
391
  horizontal: o,
337
392
  stacked: s,
338
393
  percent: f,
@@ -341,21 +396,27 @@ var V = class extends r {
341
396
  k: a
342
397
  };
343
398
  }
344
- markLabel(e) {
345
- let t = this.effectiveSeries[e.j], n = this.category(this.viewRows[e.i]), r = this.mode === "percent" && e.value !== null ? `${g(this.i18n.locale, e.share, 1)} (${this.fmt(e.value)})` : this.fmt(e.value);
346
- return p(this.i18n.locale, "chartMark", {
347
- category: n,
348
- series: t?.label ?? "",
349
- value: r
399
+ markLabel(e, t = !0) {
400
+ let n = this.effectiveSeries[e.j], r = this.categoryName(this.viewRows[e.i]), i = e.value === null ? p(this.i18n.locale, "chartNoValue") : this.mode === "percent" ? `${x(this.i18n.locale, e.share, 1)} (${this.fmt(e.value)})` : this.fmt(e.value), a = p(this.i18n.locale, "chartMark", {
401
+ category: r,
402
+ series: n?.label ?? "",
403
+ value: i
350
404
  });
405
+ return t && this.extraFields.length ? `${a}; ${this.extraText(this.viewRows[e.i])}` : a;
406
+ }
407
+ get extraFields() {
408
+ return h(this.tooltipFields);
409
+ }
410
+ extraText(e) {
411
+ return this.extraFields.map((t) => `${g(t)} ${_(this.i18n.locale, e, t)}`).join(", ");
351
412
  }
352
413
  tooltipFor(e) {
353
- let t = this.effectiveSeries, n = this.viewRows[e.i], r = this.i18n.locale, i = t.reduce((e, t) => e + Math.max(0, z(n[t.key]) ?? 0), 0), a = t.map((a, o) => {
354
- let s = z(n[a.key]), c = this.mode === "percent" && s !== null ? `${g(r, i ? Math.max(0, s) / i : 0, 1)} · ${this.fmt(s)}` : this.fmt(s);
414
+ let t = this.effectiveSeries, n = this.viewRows[e.i], r = this.i18n.locale, i = t.reduce((e, t) => e + Math.max(0, U(n[t.key]) ?? 0), 0), a = t.map((a, o) => {
415
+ let s = U(n[a.key]), c = this.mode === "percent" && s !== null ? `${x(r, i ? Math.max(0, s) / i : 0, 1)} · ${this.fmt(s)}` : this.fmt(s);
355
416
  return {
356
417
  label: a.label,
357
418
  value: c,
358
- color: j(a, o, t.length),
419
+ color: F(a, o, t.length),
359
420
  marker: "rect",
360
421
  active: o === e.j && t.length > 1
361
422
  };
@@ -363,24 +424,32 @@ var V = class extends r {
363
424
  if (this.layoutCache?.cmp) {
364
425
  let i = this.compareLabel || p(r, "chartPrevious");
365
426
  t.forEach((o, s) => {
366
- let c = z(this.compare[this.viewStart + e.i]?.[o.key] ?? null), l = z(n[o.key]), u = l !== null && c !== null ? ` (${D(r, l, c, (e) => this.fmt(e))})` : "";
427
+ let c = U(this.compare[this.viewStart + e.i]?.[o.key] ?? null), l = U(n[o.key]), u = l !== null && c !== null ? ` (${j(r, l, c, (e) => this.fmt(e))})` : "";
367
428
  a.push({
368
429
  label: t.length > 1 ? `${o.label} · ${i}` : i,
369
430
  value: this.fmt(c) + u,
370
- color: j(o, s, t.length),
431
+ color: F(o, s, t.length),
371
432
  marker: "rect",
372
433
  active: !1
373
434
  });
374
435
  });
375
436
  }
376
- return this.mode !== "grouped" && t.length > 1 && a.push({
437
+ this.mode !== "grouped" && t.length > 1 && a.push({
377
438
  label: p(r, "chartTotal"),
378
439
  value: this.fmt(i),
379
440
  color: "",
380
441
  marker: "rect",
381
442
  active: !1
382
- }), {
383
- title: this.category(n),
443
+ });
444
+ for (let e of this.extraFields) a.push({
445
+ label: g(e),
446
+ value: _(r, n, e),
447
+ color: "",
448
+ marker: "rect",
449
+ active: !1
450
+ });
451
+ return {
452
+ title: this.categoryName(n),
384
453
  rows: a,
385
454
  x: e.ax,
386
455
  y: e.ay
@@ -462,52 +531,58 @@ var V = class extends r {
462
531
  }, this.requestUpdate(), await this.updateComplete, this.renderRoot.querySelector(`.hit[data-i="${r}"][data-j="${i}"]`)?.focus();
463
532
  }
464
533
  onCategoryKey = async (e) => {
465
- let t = this.viewRows.length, n = e.target.closest(".cat");
466
- if (!t || !n) return;
467
- let r = this.orientation === "horizontal", i = Number(n.dataset.i);
534
+ let t = e.target.closest("a.cat, button.cat"), n = [...this.renderRoot.querySelectorAll("a.cat, button.cat")], r = t ? n.indexOf(t) : -1;
535
+ if (r < 0) return;
536
+ let i = this.orientation === "horizontal", a = r;
468
537
  switch (e.key) {
469
- case r ? "ArrowDown" : "ArrowRight":
470
- i = Math.min(t - 1, i + 1);
538
+ case i ? "ArrowDown" : "ArrowRight":
539
+ a = Math.min(n.length - 1, r + 1);
471
540
  break;
472
- case r ? "ArrowUp" : "ArrowLeft":
473
- i = Math.max(0, i - 1);
541
+ case i ? "ArrowUp" : "ArrowLeft":
542
+ a = Math.max(0, r - 1);
474
543
  break;
475
544
  case "Home":
476
- i = 0;
545
+ a = 0;
477
546
  break;
478
547
  case "End":
479
- i = t - 1;
548
+ a = n.length - 1;
480
549
  break;
481
550
  case "Escape":
482
551
  this.chart.hideTooltip();
483
552
  return;
484
553
  default: return;
485
554
  }
555
+ let o = Number(n[a].dataset.i);
486
556
  e.preventDefault(), this.active = {
487
- i,
557
+ i: o,
488
558
  j: this.active.j
489
- }, this.requestUpdate(), await this.updateComplete, this.renderRoot.querySelector(`.cat[data-i="${i}"]`)?.focus();
559
+ }, this.requestUpdate(), await this.updateComplete, this.renderRoot.querySelector(`.cat[data-i="${o}"]`)?.focus();
490
560
  };
491
561
  toggleTable() {
492
562
  this.table = !this.table, this.chart.hideTooltip();
493
563
  }
494
564
  tableModel() {
495
565
  let e = this.i18n.locale, t = this.effectiveSeries, n = this.mode !== "grouped" && t.length > 1, r = !!this.compare?.length && this.mode === "grouped" && !this.contiguous, i = this.compareLabel || p(e, "chartPrevious"), a = [this.xLabel || p(e, "chartCategory")];
566
+ this.detail && a.push(this.detailLabel || p(e, "chartDetail"));
496
567
  for (let n of t) a.push(n.label, ...r ? [`${n.label} · ${i}`, `${n.label} · ${p(e, "chartChange")}`] : []);
497
568
  n && a.push(p(e, "chartTotal"));
498
- let o = (this.data ?? []).map((i, a) => {
499
- let o = t.map((e) => z(i[e.key])), s = [this.category(i)];
500
- return o.forEach((n, i) => {
501
- if (s.push(this.fmt(n)), r) {
502
- let r = z(this.compare[a]?.[t[i].key] ?? null);
503
- s.push(this.fmt(r), n !== null && r !== null ? D(e, n, r, (e) => this.fmt(e)) : "–");
569
+ let o = this.extraFields;
570
+ for (let e of o) a.push(g(e));
571
+ let s = (this.data ?? []).map((i, a) => {
572
+ let s = t.map((e) => U(i[e.key])), c = [this.category(i)];
573
+ this.detail && c.push(this.detailText(i)), s.forEach((n, i) => {
574
+ if (c.push(this.fmt(n)), r) {
575
+ let r = U(this.compare[a]?.[t[i].key] ?? null);
576
+ c.push(this.fmt(r), n !== null && r !== null ? j(e, n, r, (e) => this.fmt(e)) : "–");
504
577
  }
505
- }), n && s.push(this.fmt(o.reduce((e, t) => e + (t ?? 0), 0))), s;
578
+ }), n && c.push(this.fmt(s.reduce((e, t) => e + (t ?? 0), 0)));
579
+ for (let t of o) c.push(_(e, i, t));
580
+ return c;
506
581
  });
507
582
  return {
508
583
  caption: this.heading || p(e, "chartData"),
509
584
  columns: a,
510
- rows: o
585
+ rows: s
511
586
  };
512
587
  }
513
588
  renderPlot() {
@@ -516,31 +591,42 @@ var V = class extends r {
516
591
  let i = this.layout();
517
592
  this.layoutCache = i;
518
593
  let s = this.chart.specs, c = s.labelSize, l = s.font, u = this.i18n.locale;
519
- if (!i.n || !i.k) return A(u, r, this.chart.height || 120);
594
+ if (!i.n || !i.k) return P(u, r, this.chart.height || 120);
520
595
  let d = i.horizontal, f = this.variant === "minimal", m = i.ticks.ticks.filter((e) => !f || e === 0).map((e) => {
521
596
  let t = i.valueScale(e);
522
597
  return f ? d ? n`<line class="axis" x1=${Math.round(t) + .5} x2=${Math.round(t) + .5} y1=${i.y0} y2=${i.y1}></line>` : n`<line class="axis" x1=${i.x0} x2=${i.x1} y1=${Math.round(t) + .5} y2=${Math.round(t) + .5}></line>` : d ? n`<line class=${e === 0 ? "axis" : "grid"} x1=${Math.round(t) + .5} x2=${Math.round(t) + .5} y1=${i.y0} y2=${i.y1}></line>
523
598
  <text class="tick" x=${t} y=${i.y1 + c + 4 + s.clear} text-anchor="middle">${i.fmtTick(e)}</text>` : n`<line class=${e === 0 ? "axis" : "grid"} x1=${i.x0} x2=${i.x1} y1=${Math.round(t) + .5} y2=${Math.round(t) + .5}></line>
524
599
  <text class="tick" x=${i.x0 - 8} y=${t} dy="0.32em" text-anchor="end">${i.fmtTick(e)}</text>`;
525
- }), h = this.viewRows.map((e) => this.isCurrent(e)), g = h.some(Boolean), _;
526
- if (d) _ = i.cats.map((e, t) => n`<text class=${h[t] ? "current" : ""} x=${i.x0 - 8} y=${i.bands.center(t)} dy="0.32em" text-anchor="end">${N(e, i.x0 - 8, c, l)}</text>`);
527
- else {
528
- let e = Math.max(...i.cats.map((e) => I(e, c, l))), t = (e, t) => {
529
- let n = I(e, c, l) / 2;
530
- return Math.min(Math.max(i.bands.center(t), i.x0 + n), i.x1 - n);
531
- }, r = (e) => i.cats.map((n, r) => {
532
- if (r % e) return null;
533
- let a = N(n, i.bands.width * e - 4, c, l);
600
+ }), h = this.viewRows.map((e) => this.isCurrent(e)), g = h.some(Boolean), _, v = (e) => B(e, c, l), y = (e, t, r, a) => {
601
+ let o = Math.max(Math.round(t), Math.round(i.t), s.hitMin), l = Math.round(a === "middle" ? e - o / 2 : e - o), u = Math.round(r + c * .25 + s.clear / 2);
602
+ return n`<rect class="current-mark" x=${l} y=${u} width=${o} height=${s.indicator} rx=${s.indicator / 2}></rect>`;
603
+ };
604
+ if (d) {
605
+ let e = i.x0 - 8;
606
+ _ = i.cats.map((r, a) => {
607
+ let o = i.bands.center(a), s = L(r, e, c, l), u = i.details[a] ? L(i.details[a], e, c, l) : "", d = i.hasDetail ? o - i.lineStep / 2 : o, f = o + i.lineStep / 2, p = h[a] ? y(e, Math.max(v(s), v(u)), (i.hasDetail ? f : d) + c * .32, "end") : t;
608
+ return n`<text class=${h[a] ? "current" : ""} x=${e} y=${d} dy="0.32em" text-anchor="end">${s}</text>
609
+ ${u ? n`<text class="detail" x=${e} y=${f} dy="0.32em" text-anchor="end">${u}</text>` : t}${p}`;
610
+ });
611
+ } else {
612
+ let e = i.y1 + c + 4 + s.clear, r = e + i.lineStep, a = Math.max(...i.cats.map(v), ...i.details.map(v)), o = (e, t) => Math.min(Math.max(i.bands.center(t), i.x0 + e / 2), i.x1 - e / 2), u = (e) => i.cats.map((t, n) => {
613
+ if (n % e) return null;
614
+ let r = L(t, i.bands.width * e - 4, c, l), a = i.details[n] ? L(i.details[n], i.bands.width * e - 4, c, l) : "", s = Math.max(v(r), v(a));
534
615
  return {
535
- text: a,
536
- x: t(a, r),
537
- w: I(a, c, l)
616
+ text: r,
617
+ detail: a,
618
+ x: o(s, n),
619
+ w: s
538
620
  };
539
- }), a = (e) => e.filter((e) => e !== null).every((e, t, n) => t === 0 || e.x - e.w / 2 >= n[t - 1].x + n[t - 1].w / 2 + 4), o = Math.max(1, Math.ceil((e + 8) / Math.max(1, i.bands.width))), u = r(o);
540
- for (; o < i.cats.length && !a(u);) u = r(++o);
541
- _ = u.map((e, t) => e ? n`<text class=${h[t] ? "current" : ""} x=${e.x} y=${i.y1 + c + 4 + s.clear} text-anchor="middle">${e.text}</text>` : n``);
621
+ }), d = (e) => e.filter((e) => e !== null).every((e, t, n) => t === 0 || e.x - e.w / 2 >= n[t - 1].x + n[t - 1].w / 2 + 4), f = Math.max(1, Math.ceil((a + 8) / Math.max(1, i.bands.width))), p = u(f);
622
+ for (; f < i.cats.length && !d(p);) p = u(++f);
623
+ _ = p.map((a, o) => {
624
+ let s = h[o] ? y(a?.x ?? i.bands.center(o), Math.min(a?.w ?? 0, i.bands.width), i.hasDetail ? r : e, "middle") : t;
625
+ return a ? n`<text class=${h[o] ? "current" : ""} x=${a.x} y=${e} text-anchor="middle">${a.text}</text>
626
+ ${a.detail ? n`<text class="detail" x=${a.x} y=${r} text-anchor="middle">${a.detail}</text>` : t}${s}` : n`${s}`;
627
+ });
542
628
  }
543
- let v = i.series, y = this.hot, b = i.ghosts.map((e) => n`<path class="ghost" style=${a({ "--_bk-chart-c": j(v[e.j], e.j, v.length) })} d=${e.path}></path>`), x = T(i.marks, {
629
+ let b = i.series, x = this.hot, S = i.ghosts.map((e) => n`<path class="ghost" style=${a({ "--_bk-chart-c": F(b[e.j], e.j, b.length) })} d=${e.path}></path>`), C = k(i.marks, {
544
630
  vertical: !d,
545
631
  inset: s.clear,
546
632
  x0: i.x0,
@@ -557,8 +643,8 @@ var V = class extends r {
557
643
  let n = i.bands.start(t);
558
644
  return [n, n + i.bands.width];
559
645
  }
560
- }, u), S = this.brush.span, C = S && this.selectable ? d ? n`<rect class="selection" x=${i.x0} y=${i.bands.start(S[0])} width=${i.x1 - i.x0} height=${(S[1] - S[0] + 1) * i.bands.width}></rect>` : n`<rect class="selection" x=${i.bands.start(S[0])} y=${i.y0} width=${(S[1] - S[0] + 1) * i.bands.width} height=${i.y1 - i.y0}></rect>` : t, w = i.bars.map((e) => e.path ? n`<path class="mark ${y && y.i === e.i && y.j === e.j ? "hot" : ""} ${g && !h[e.i] ? "rest" : ""}" data-slot=${M(v[e.j], e.j)}
561
- style=${a({ "--_bk-chart-c": j(v[e.j], e.j, v.length) })} d=${e.path}></path>` : n``), E = [];
646
+ }, u), w = this.brush.span, T = w && this.selectable ? d ? n`<rect class="selection" x=${i.x0} y=${i.bands.start(w[0])} width=${i.x1 - i.x0} height=${(w[1] - w[0] + 1) * i.bands.width}></rect>` : n`<rect class="selection" x=${i.bands.start(w[0])} y=${i.y0} width=${(w[1] - w[0] + 1) * i.bands.width} height=${i.y1 - i.y0}></rect>` : t, E = i.bars.map((e) => e.path ? n`<path class="mark ${x && x.i === e.i && x.j === e.j ? "hot" : ""} ${g && !h[e.i] ? "rest" : ""}" data-slot=${I(b[e.j], e.j)}
647
+ style=${a({ "--_bk-chart-c": F(b[e.j], e.j, b.length) })} d=${e.path}></path>` : n``), D = i.bars.map((e) => e.stub ? n`<path class="stub" d=${e.stub}></path>` : n``), O = [];
562
648
  if (this.labels && !i.percent) {
563
649
  let e = i.stacked ? i.totals.map((e, t) => {
564
650
  let n = i.bars.filter((e) => e.i === t && e.path);
@@ -574,12 +660,12 @@ var V = class extends r {
574
660
  })), t = d ? 1e400 : i.stacked ? i.bands.width : i.t + s.gap + Math.max(0, (i.bands.width - (i.t + s.gap) * i.k) / i.k);
575
661
  for (let r of e) {
576
662
  if (!r) continue;
577
- let e = this.fmt(r.v), a = I(e, c, l);
578
- a > t || !d && r.neg && r.b.y + r.b.h + c + 2 > i.y1 || d && r.neg && r.b.x - a - 4 < i.x0 || E.push(d ? n`<text class="value-label" x=${r.neg ? r.b.x - 4 : r.b.x + r.b.w + 4} y=${r.b.y + r.b.h / 2} dy="0.32em" text-anchor=${r.neg ? "end" : "start"}>${e}</text>` : n`<text class="value-label" x=${r.b.x + r.b.w / 2} y=${r.neg ? r.b.y + r.b.h + c : r.b.y - s.clear - s.gap} text-anchor="middle">${e}</text>`);
663
+ let e = this.fmt(r.v), a = B(e, c, l);
664
+ a > t || !d && r.neg && r.b.y + r.b.h + c + 2 > i.y1 || d && r.neg && r.b.x - a - 4 < i.x0 || O.push(d ? n`<text class="value-label" x=${r.neg ? r.b.x - 4 : r.b.x + r.b.w + 4} y=${r.b.y + r.b.h / 2} dy="0.32em" text-anchor=${r.neg ? "end" : "start"}>${e}</text>` : n`<text class="value-label" x=${r.b.x + r.b.w / 2} y=${r.neg ? r.b.y + r.b.h + c : r.b.y - s.clear - s.gap} text-anchor="middle">${e}</text>`);
579
665
  }
580
666
  }
581
- let D = i.seriesLabels.map((e) => n`<text x=${i.x1 + 8} y=${e.y} dy="0.32em">${e.text}</text>`), O = this.active, k = this.pickMode;
582
- if (k) {
667
+ let A = i.seriesLabels.map((e) => n`<text x=${i.x1 + 8} y=${e.y} dy="0.32em">${e.text}</text>`), j = this.active, M = this.pickMode;
668
+ if (M) {
583
669
  let n = (e) => {
584
670
  let t = Math.round(i.bands.start(e)), n = Math.round(i.bands.start(e) + i.bands.width);
585
671
  return d ? {
@@ -593,44 +679,45 @@ var V = class extends r {
593
679
  width: `${n - t}px`,
594
680
  height: `${Math.round(i.H)}px`
595
681
  };
596
- }, s = (e) => i.bars.find((t) => t.i === e && t.j === Math.min(O.j, i.k - 1)) ?? i.bars.find((t) => t.i === e), c = {
682
+ }, s = (e) => i.bars.find((t) => t.i === e && t.j === Math.min(j.j, i.k - 1)) ?? i.bars.find((t) => t.i === e), c = {
597
683
  enter: (e) => this.enter(s(e)),
598
684
  focus: (e) => {
599
685
  this.active = {
600
686
  i: e,
601
- j: O.j
687
+ j: j.j
602
688
  }, this.enter(s(e));
603
689
  }
604
- }, l = i.cats.map((r, i) => k === "link" ? e`<a class="cat interactive" part="category" data-i=${i} href=${this.links.href(this.categoryHref(this.viewRows[i]))}
690
+ }, l = i.cats.map((e, t) => M === "link" && !i.empty[t] ? this.categoryHref(this.viewRows[t]) : null), f = (e) => M === "link" ? l[e] !== null : !i.empty[e], g = f(j.i) ? j.i : i.cats.findIndex((e, t) => f(t)), v = i.cats.map((r, i) => f(i) ? M === "link" ? e`<a class="cat interactive" part="category" data-i=${i} href=${this.links.href(l[i])}
605
691
  target=${o(this.target)} rel=${o(this.rel)} aria-current=${h[i] ? "page" : t} aria-label=${this.categoryLabel(i)}
606
- style=${a(n(i))} @click=${this.links.click} @pointerenter=${() => c.enter(i)} @focus=${() => c.focus(i)} @blur=${this.onBlur}></a>` : e`<button type="button" class="cat interactive" part="category" data-i=${i} tabindex=${i === O.i ? 0 : -1}
692
+ style=${a(n(i))} @click=${this.links.click} @pointerenter=${() => c.enter(i)} @focus=${() => c.focus(i)} @blur=${this.onBlur}></a>` : e`<button type="button" class="cat interactive" part="category" data-i=${i} tabindex=${i === g ? 0 : -1}
607
693
  aria-current=${h[i] ? "true" : t} aria-label=${this.categoryLabel(i)}
608
- style=${a(n(i))} @click=${() => this.choose(i)} @pointerenter=${() => c.enter(i)} @focus=${() => c.focus(i)} @blur=${this.onBlur}></button>`);
694
+ style=${a(n(i))} @click=${() => this.choose(i)} @pointerenter=${() => c.enter(i)} @focus=${() => c.focus(i)} @blur=${this.onBlur}></button>` : e`<div class="cat" data-i=${i} role="img" aria-label=${this.categoryLabel(i)} aria-current=${h[i] ? M === "link" ? "page" : "true" : t}
695
+ style=${a(n(i))} @pointerenter=${() => c.enter(i)}></div>`);
609
696
  return e`<div class="plot" part="plot" style=${a(d ? { height: `${i.H}px` } : {})}>
610
697
  <svg width=${r} height=${i.H} aria-hidden="true">
611
- ${L()}
698
+ ${V()}
612
699
  <g>${m}${_}</g>
613
- <g>${x.back}${b}${w}${x.front}</g>
614
- <g>${E}${D}</g>
700
+ <g>${C.back}${S}${E}${D}${C.front}</g>
701
+ <g>${O}${A}</g>
615
702
  </svg>
616
- <div class="cats" role=${k === "button" ? "toolbar" : "group"} aria-orientation=${o(k === "button" ? d ? "vertical" : "horizontal" : void 0)}
703
+ <div class="cats" role=${M === "button" ? "toolbar" : "group"} aria-orientation=${o(M === "button" ? d ? "vertical" : "horizontal" : void 0)}
617
704
  aria-label=${this.heading || this.getAttribute("aria-label") || p(u, "chartData")}
618
- @keydown=${this.onCategoryKey} @pointerleave=${this.onLeave}>${l}</div>
705
+ @keydown=${this.onCategoryKey} @pointerleave=${this.onLeave}>${v}</div>
619
706
  </div>`;
620
707
  }
621
- let P = i.bars.map((e) => n`<rect class="hit" data-i=${e.i} data-j=${e.j} role="img" aria-label=${this.markLabel(e)}
622
- tabindex=${e.i === O.i && e.j === O.j ? 0 : -1} x=${e.hx} y=${e.hy} width=${Math.max(1, e.hw)} height=${Math.max(1, e.hh)}
623
- @pointerenter=${() => this.enter(e)} @focus=${(t) => this.onFocus(t, e)} @blur=${this.onBlur}></rect>`), F = this.ring ? i.bars.find((e) => e.i === O.i && e.j === O.j) : void 0, R = F ? n`<rect class="ring" x=${F.x - 3} y=${F.y - 3} width=${F.w + 6}
624
- height=${Math.max(F.h, 1) + 6} rx=${s.radius + 2}></rect>` : t;
708
+ let N = i.bars.map((e) => n`<rect class="hit" data-i=${e.i} data-j=${e.j} role="img" aria-label=${this.markLabel(e)}
709
+ tabindex=${e.i === j.i && e.j === j.j ? 0 : -1} x=${e.hx} y=${e.hy} width=${Math.max(1, e.hw)} height=${Math.max(1, e.hh)}
710
+ @pointerenter=${() => this.enter(e)} @focus=${(t) => this.onFocus(t, e)} @blur=${this.onBlur}></rect>`), R = this.ring ? i.bars.find((e) => e.i === j.i && e.j === j.j) : void 0, z = R ? n`<rect class="ring" x=${R.x - 3} y=${R.y - 3} width=${R.w + 6}
711
+ height=${Math.max(R.h, 1) + 6} rx=${s.radius + 2}></rect>` : t;
625
712
  return e`<div class="plot" part="plot" style=${a(d ? { height: `${i.H}px` } : {})}>
626
713
  <svg width=${r} height=${i.H} role="group" aria-label=${this.heading || p(u, "chartData")}
627
714
  @keydown=${this.onKey} @pointerleave=${this.onLeave} @pointerdown=${this.onDown} @pointermove=${this.onMove} @pointerup=${this.onUp}>
628
- ${L()}
715
+ ${V()}
629
716
  <g aria-hidden="true">${m}${_}</g>
630
- <g aria-hidden="true">${x.back}${C}${b}${w}${x.front}</g>
631
- <g aria-hidden="true">${E}${D}</g>
632
- <g>${P}</g>
633
- ${R}
717
+ <g aria-hidden="true">${C.back}${T}${S}${E}${D}${C.front}</g>
718
+ <g aria-hidden="true">${O}${A}</g>
719
+ <g>${N}</g>
720
+ ${z}
634
721
  </svg>
635
722
  </div>`;
636
723
  }
@@ -642,21 +729,21 @@ var V = class extends r {
642
729
  if (this.mode !== "grouped" && t.length > 1) {
643
730
  let o = n.map((e, n) => ({
644
731
  name: i[n],
645
- value: t.reduce((t, n) => t + Math.max(0, z(e[n.key]) ?? 0), 0)
732
+ value: t.reduce((t, n) => t + Math.max(0, U(e[n.key]) ?? 0), 0)
646
733
  }));
647
- a.push(O(e, this.heading || p(e, "chartTotal"), o, r));
648
- } else t.slice(0, 3).forEach((t) => a.push(O(e, t.label, n.map((e, n) => ({
734
+ a.push(M(e, this.heading || p(e, "chartTotal"), o, r));
735
+ } else t.slice(0, 3).forEach((t) => a.push(M(e, t.label, n.map((e, n) => ({
649
736
  name: i[n],
650
- value: z(e[t.key])
737
+ value: U(e[t.key])
651
738
  })), r)));
652
739
  if (this.compare?.length && this.mode === "grouped" && !this.contiguous) {
653
- let i = n.reduce((e, n) => e + (z(n[t[0].key]) ?? 0), 0), o = n.reduce((e, n, r) => e + (z(this.compare[this.viewStart + r]?.[t[0].key] ?? null) ?? 0), 0);
740
+ let i = n.reduce((e, n) => e + (U(n[t[0].key]) ?? 0), 0), o = n.reduce((e, n, r) => e + (U(this.compare[this.viewStart + r]?.[t[0].key] ?? null) ?? 0), 0);
654
741
  a.push(p(e, "chartSummaryCompare", {
655
742
  previous: this.compareLabel || p(e, "chartPrevious"),
656
- change: D(e, i, o, r)
743
+ change: j(e, i, o, r)
657
744
  }));
658
745
  }
659
- return a.push(C(e, S(this), r, (e) => String(e))), a.filter(Boolean).join(" ");
746
+ return a.push(D(e, E(this), r, (e) => String(e))), a.filter(Boolean).join(" ");
660
747
  }
661
748
  selectionStatus() {
662
749
  if (!this.selectable) return;
@@ -672,7 +759,7 @@ var V = class extends r {
672
759
  render() {
673
760
  let n = this.i18n.locale, r = this.effectiveSeries, i = r.map((e, t) => ({
674
761
  label: e.label,
675
- color: j(e, t, r.length)
762
+ color: F(e, t, r.length)
676
763
  }));
677
764
  this.compare?.length && this.mode === "grouped" && !this.contiguous && i.push({
678
765
  label: this.compareLabel || p(n, "chartPrevious"),
@@ -680,7 +767,7 @@ var V = class extends r {
680
767
  pattern: "outlined"
681
768
  });
682
769
  let a = i.length >= 2 ? e`<bk-chart-legend marker="rect" .items=${i}></bk-chart-legend>` : t, o = this.range ? e`<div class="tools"><button type="button" class="toggle interactive" part="reset" @click=${() => this.reset()}>${p(n, "chartResetZoom")}</button></div>` : t;
683
- return P({
770
+ return R({
684
771
  locale: n,
685
772
  heading: this.heading,
686
773
  level: this.level,
@@ -700,5 +787,5 @@ var V = class extends r {
700
787
  });
701
788
  }
702
789
  };
703
- s("bk-chart-bar", V);
704
- export { V as BkChartBar };
790
+ s("bk-chart-bar", G);
791
+ export { G as BkChartBar };