@bk2k/ui 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/USAGE.md +20 -9
  3. package/custom-elements.json +1 -1
  4. package/dist/charts/frame.d.ts +2 -0
  5. package/dist/components/bk-alert.js +1 -1
  6. package/dist/components/bk-button.d.ts +5 -0
  7. package/dist/components/bk-button.js +15 -4
  8. package/dist/components/bk-card.d.ts +6 -3
  9. package/dist/components/bk-card.js +15 -9
  10. package/dist/components/bk-chart-area.d.ts +4 -0
  11. package/dist/components/bk-chart-line.d.ts +15 -0
  12. package/dist/components/bk-chart-line.js +16 -6
  13. package/dist/components/bk-chip.d.ts +2 -0
  14. package/dist/components/bk-chip.js +3 -1
  15. package/dist/components/bk-combobox.d.ts +2 -2
  16. package/dist/components/bk-combobox.js +7 -20
  17. package/dist/components/bk-footnotes-item.d.ts +2 -2
  18. package/dist/components/bk-image-compare.d.ts +36 -1
  19. package/dist/components/bk-image-compare.js +47 -11
  20. package/dist/components/bk-image-viewer.d.ts +74 -3
  21. package/dist/components/bk-image-viewer.js +115 -28
  22. package/dist/components/bk-input-color.d.ts +2 -5
  23. package/dist/components/bk-input-color.js +0 -14
  24. package/dist/components/bk-input-file.d.ts +17 -0
  25. package/dist/components/bk-input-file.js +18 -8
  26. package/dist/components/bk-input-tags.d.ts +219 -0
  27. package/dist/components/bk-input-tags.js +293 -0
  28. package/dist/components/bk-input-text.d.ts +9 -0
  29. package/dist/components/bk-input-text.js +18 -2
  30. package/dist/components/bk-lightbox.d.ts +25 -1
  31. package/dist/components/bk-lightbox.js +7 -0
  32. package/dist/components/bk-page-cta.d.ts +2 -0
  33. package/dist/components/bk-page-cta.js +8 -1
  34. package/dist/components/bk-split-grid.js +7 -2
  35. package/dist/components/bk-stat.d.ts +2 -0
  36. package/dist/components/bk-stat.js +1 -1
  37. package/dist/components/bk-table.d.ts +2 -0
  38. package/dist/components/bk-table.js +1 -1
  39. package/dist/components/bk-tabs.d.ts +2 -1
  40. package/dist/components/bk-tabs.js +15 -3
  41. package/dist/index.d.ts +1 -0
  42. package/dist/index.js +1 -0
  43. package/dist/internal/announcer.d.ts +6 -0
  44. package/dist/internal/announcer.js +7 -2
  45. package/dist/internal/cloak.js +1 -0
  46. package/dist/internal/define.d.ts +9 -0
  47. package/dist/internal/define.js +47 -1
  48. package/dist/internal/elements.d.ts +6 -0
  49. package/dist/internal/elements.js +5 -0
  50. package/dist/internal/hue.d.ts +8 -0
  51. package/dist/internal/hue.js +15 -4
  52. package/dist/internal/late/bk-tabs.d.ts +4 -0
  53. package/dist/internal/late/bk-tabs.js +8 -0
  54. package/dist/internal/late.js +3 -3
  55. package/dist/internal/tags.d.ts +15 -0
  56. package/dist/internal/tags.js +44 -0
  57. package/dist/internal/text-field.d.ts +2 -0
  58. package/dist/internal/text-field.js +8 -0
  59. package/dist/internal/toggle-control.js +3 -1
  60. package/dist/jsx.d.ts +85 -6
  61. package/dist/kit.d.ts +1 -0
  62. package/dist/kit.js +3 -0
  63. package/dist/reset.css +1 -1
  64. package/dist/standalone/all.js +106 -105
  65. package/dist/standalone/bk-accordion-item.js +3 -3
  66. package/dist/standalone/bk-accordion.js +1 -1
  67. package/dist/standalone/bk-action-bar.js +1 -1
  68. package/dist/standalone/bk-alert-offline.js +1 -1
  69. package/dist/standalone/bk-alert.js +7 -4
  70. package/dist/standalone/bk-app-state.js +1 -1
  71. package/dist/standalone/bk-attachment.js +2 -2
  72. package/dist/standalone/bk-avatar-group.js +1 -1
  73. package/dist/standalone/bk-avatar.js +3 -3
  74. package/dist/standalone/bk-badge.js +1 -1
  75. package/dist/standalone/bk-bar.js +1 -1
  76. package/dist/standalone/bk-brand.js +1 -1
  77. package/dist/standalone/bk-breadcrumbs.js +2 -2
  78. package/dist/standalone/bk-button-copy.js +4 -4
  79. package/dist/standalone/bk-button-group.js +2 -2
  80. package/dist/standalone/bk-button-share.js +4 -4
  81. package/dist/standalone/bk-button-top.js +1 -1
  82. package/dist/standalone/bk-button.js +14 -6
  83. package/dist/standalone/bk-calendar-event.js +1 -1
  84. package/dist/standalone/bk-calendar-week.js +1 -1
  85. package/dist/standalone/bk-calendar.js +2 -2
  86. package/dist/standalone/bk-card.js +17 -11
  87. package/dist/standalone/bk-carousel-controls.js +2 -2
  88. package/dist/standalone/bk-carousel-item.js +1 -1
  89. package/dist/standalone/bk-carousel.js +1 -1
  90. package/dist/standalone/bk-chart-area.js +1 -1
  91. package/dist/standalone/bk-chart-bar-list.js +2 -2
  92. package/dist/standalone/bk-chart-bar.js +1 -1
  93. package/dist/standalone/bk-chart-bridge.js +1 -1
  94. package/dist/standalone/bk-chart-bullet.js +1 -1
  95. package/dist/standalone/bk-chart-calendar.js +1 -1
  96. package/dist/standalone/bk-chart-heatmap.js +1 -1
  97. package/dist/standalone/bk-chart-histogram.js +1 -1
  98. package/dist/standalone/bk-chart-legend.js +1 -1
  99. package/dist/standalone/bk-chart-line.js +16 -8
  100. package/dist/standalone/bk-chart-mark.js +1 -1
  101. package/dist/standalone/bk-chart-scatter.js +1 -1
  102. package/dist/standalone/bk-chart-sparkline.js +1 -1
  103. package/dist/standalone/bk-chart-stacked-bar.js +1 -1
  104. package/dist/standalone/bk-chart-tracker.js +1 -1
  105. package/dist/standalone/bk-chart-waterfall.js +2 -2
  106. package/dist/standalone/bk-checkbox-group.js +5 -5
  107. package/dist/standalone/bk-checkbox.js +3 -3
  108. package/dist/standalone/bk-chip-group.js +4 -4
  109. package/dist/standalone/bk-chip.js +5 -3
  110. package/dist/standalone/bk-cluster.js +1 -1
  111. package/dist/standalone/bk-code-diff.js +2 -2
  112. package/dist/standalone/bk-code-stack.js +1 -1
  113. package/dist/standalone/bk-code.js +1 -1
  114. package/dist/standalone/bk-color-panel.js +2 -2
  115. package/dist/standalone/bk-columns.js +1 -1
  116. package/dist/standalone/bk-combobox.js +21 -30
  117. package/dist/standalone/bk-command-menu.js +3 -3
  118. package/dist/standalone/bk-command-palette.js +4 -4
  119. package/dist/standalone/bk-composer.js +4 -4
  120. package/dist/standalone/bk-delta.js +1 -1
  121. package/dist/standalone/bk-diagram.js +1 -1
  122. package/dist/standalone/bk-dialog.js +1 -1
  123. package/dist/standalone/bk-disclosure.js +2 -2
  124. package/dist/standalone/bk-divider.js +4 -4
  125. package/dist/standalone/bk-drawer.js +2 -2
  126. package/dist/standalone/bk-drop-target.js +1 -1
  127. package/dist/standalone/bk-empty-state.js +2 -2
  128. package/dist/standalone/bk-error-summary.js +1 -1
  129. package/dist/standalone/bk-facts-item.js +1 -1
  130. package/dist/standalone/bk-facts.js +1 -1
  131. package/dist/standalone/bk-feature.js +2 -2
  132. package/dist/standalone/bk-fieldset.js +1 -1
  133. package/dist/standalone/bk-filter-bar.js +2 -2
  134. package/dist/standalone/bk-folder-browser.js +2 -2
  135. package/dist/standalone/bk-footnote.js +1 -1
  136. package/dist/standalone/bk-footnotes-item.js +2 -2
  137. package/dist/standalone/bk-footnotes.js +1 -1
  138. package/dist/standalone/bk-form-guard.js +1 -1
  139. package/dist/standalone/bk-form-steps.js +1 -1
  140. package/dist/standalone/bk-grid.js +1 -1
  141. package/dist/standalone/bk-icon-tile.js +2 -2
  142. package/dist/standalone/bk-icon.js +1 -1
  143. package/dist/standalone/bk-image-compare.js +55 -27
  144. package/dist/standalone/bk-image-crop.js +3 -3
  145. package/dist/standalone/bk-image-editor.js +1 -1
  146. package/dist/standalone/bk-image-viewer.js +127 -57
  147. package/dist/standalone/bk-input-code.js +2 -2
  148. package/dist/standalone/bk-input-color.js +3 -13
  149. package/dist/standalone/bk-input-date-range.js +2 -2
  150. package/dist/standalone/bk-input-date.js +2 -2
  151. package/dist/standalone/bk-input-file.js +20 -13
  152. package/dist/standalone/bk-input-group.js +2 -2
  153. package/dist/standalone/bk-input-inline.js +1 -1
  154. package/dist/standalone/bk-input-number.js +4 -4
  155. package/dist/standalone/bk-input-rating.js +4 -4
  156. package/dist/standalone/bk-input-rich.js +1 -1
  157. package/dist/standalone/bk-input-search.js +4 -4
  158. package/dist/standalone/bk-input-slider-range.js +2 -2
  159. package/dist/standalone/bk-input-slider.js +2 -2
  160. package/dist/standalone/bk-input-tags.js +224 -0
  161. package/dist/standalone/bk-input-text.js +1 -1
  162. package/dist/standalone/bk-input-time-zone.js +1 -1
  163. package/dist/standalone/bk-input-time.js +4 -4
  164. package/dist/standalone/bk-item-group.js +2 -2
  165. package/dist/standalone/bk-item.js +2 -2
  166. package/dist/standalone/bk-kbd-shortcuts.js +1 -1
  167. package/dist/standalone/bk-kbd.js +1 -1
  168. package/dist/standalone/bk-lightbox.js +16 -3
  169. package/dist/standalone/bk-lines.js +1 -1
  170. package/dist/standalone/bk-link.js +2 -2
  171. package/dist/standalone/bk-listbox-columns.js +6 -6
  172. package/dist/standalone/bk-listbox-item.js +1 -1
  173. package/dist/standalone/bk-listbox-search.js +5 -5
  174. package/dist/standalone/bk-listbox-transfer.js +4 -4
  175. package/dist/standalone/bk-listbox.js +5 -5
  176. package/dist/standalone/bk-logo-wall.js +1 -1
  177. package/dist/standalone/bk-logo.js +2 -2
  178. package/dist/standalone/bk-menu-bar.js +1 -1
  179. package/dist/standalone/bk-menu-context.js +1 -1
  180. package/dist/standalone/bk-menu-divider.js +1 -1
  181. package/dist/standalone/bk-menu-item.js +2 -2
  182. package/dist/standalone/bk-menu-label.js +1 -1
  183. package/dist/standalone/bk-menu-list.js +1 -1
  184. package/dist/standalone/bk-menu.js +4 -4
  185. package/dist/standalone/bk-message-approval.js +2 -2
  186. package/dist/standalone/bk-message-branches.js +1 -1
  187. package/dist/standalone/bk-message-citation.js +1 -1
  188. package/dist/standalone/bk-message-feedback.js +2 -2
  189. package/dist/standalone/bk-message-list.js +2 -2
  190. package/dist/standalone/bk-message-reasoning.js +3 -3
  191. package/dist/standalone/bk-message-source.js +1 -1
  192. package/dist/standalone/bk-message-tool-group.js +3 -3
  193. package/dist/standalone/bk-message-tool.js +3 -3
  194. package/dist/standalone/bk-message.js +2 -2
  195. package/dist/standalone/bk-meter.js +1 -1
  196. package/dist/standalone/bk-model-viewer.js +1 -1
  197. package/dist/standalone/bk-nav-divider.js +1 -1
  198. package/dist/standalone/bk-nav-group.js +5 -5
  199. package/dist/standalone/bk-nav-item.js +2 -2
  200. package/dist/standalone/bk-nav-toc.js +1 -1
  201. package/dist/standalone/bk-nav.js +1 -1
  202. package/dist/standalone/bk-overflow.js +1 -1
  203. package/dist/standalone/bk-page-cta.js +10 -3
  204. package/dist/standalone/bk-page-footer-column.js +1 -1
  205. package/dist/standalone/bk-page-footer.js +1 -1
  206. package/dist/standalone/bk-page-header.js +2 -2
  207. package/dist/standalone/bk-page-hero.js +2 -2
  208. package/dist/standalone/bk-page-pager.js +2 -2
  209. package/dist/standalone/bk-page-section.js +2 -2
  210. package/dist/standalone/bk-pagination.js +3 -3
  211. package/dist/standalone/bk-pane.js +2 -2
  212. package/dist/standalone/bk-panel.js +2 -2
  213. package/dist/standalone/bk-period-nav.js +2 -2
  214. package/dist/standalone/bk-picture.js +1 -175
  215. package/dist/standalone/bk-popover-help.js +1 -1
  216. package/dist/standalone/bk-popover.js +1 -1
  217. package/dist/standalone/bk-presence-cursor.js +2 -2
  218. package/dist/standalone/bk-preview.js +2 -2
  219. package/dist/standalone/bk-progress.js +1 -1
  220. package/dist/standalone/bk-prose.js +1 -1
  221. package/dist/standalone/bk-qr-code.js +1 -1
  222. package/dist/standalone/bk-radio-group.js +5 -5
  223. package/dist/standalone/bk-radio.js +2 -2
  224. package/dist/standalone/bk-rating.js +3 -3
  225. package/dist/standalone/bk-scroll.js +1 -1
  226. package/dist/standalone/bk-segmented-item.js +2 -2
  227. package/dist/standalone/bk-segmented.js +4 -4
  228. package/dist/standalone/bk-select-cascade.js +3 -3
  229. package/dist/standalone/bk-select-tree.js +4 -4
  230. package/dist/standalone/bk-select.js +4 -4
  231. package/dist/standalone/bk-shell-app.js +1 -1
  232. package/dist/standalone/bk-shell-centered.js +1 -1
  233. package/dist/standalone/bk-shell-sites.js +1 -1
  234. package/dist/standalone/bk-skeleton.js +1 -1
  235. package/dist/standalone/bk-sortable.js +2 -2
  236. package/dist/standalone/bk-spinner.js +1 -1
  237. package/dist/standalone/bk-split-grid.js +10 -7
  238. package/dist/standalone/bk-split.js +6 -6
  239. package/dist/standalone/bk-stack.js +1 -1
  240. package/dist/standalone/bk-stat-group.js +1 -1
  241. package/dist/standalone/bk-stat.js +3 -3
  242. package/dist/standalone/bk-status-dot.js +2 -2
  243. package/dist/standalone/bk-steps-item.js +2 -2
  244. package/dist/standalone/bk-steps.js +1 -1
  245. package/dist/standalone/bk-surface.js +1 -1
  246. package/dist/standalone/bk-swatch-group.js +6 -6
  247. package/dist/standalone/bk-swatch-palette.js +1 -1
  248. package/dist/standalone/bk-swatch.js +1 -1
  249. package/dist/standalone/bk-switch.js +2 -2
  250. package/dist/standalone/bk-table.js +1 -1
  251. package/dist/standalone/bk-tabs-item.js +2 -2
  252. package/dist/standalone/bk-tabs-panel.js +1 -1
  253. package/dist/standalone/bk-tabs.js +3 -414
  254. package/dist/standalone/bk-tasks-item.js +2 -2
  255. package/dist/standalone/bk-tasks.js +1 -1
  256. package/dist/standalone/bk-testimonial.js +2 -2
  257. package/dist/standalone/bk-text.js +3 -3
  258. package/dist/standalone/bk-time-countdown.js +2 -2
  259. package/dist/standalone/bk-time-relative.js +1 -1
  260. package/dist/standalone/bk-timeline-item.js +2 -2
  261. package/dist/standalone/bk-timeline.js +1 -1
  262. package/dist/standalone/bk-toast-group.js +1 -1
  263. package/dist/standalone/bk-toast.js +2 -2
  264. package/dist/standalone/bk-toolbar.js +1 -1
  265. package/dist/standalone/bk-tooltip.js +1 -1
  266. package/dist/standalone/bk-tree-item.js +3 -3
  267. package/dist/standalone/bk-tree.js +4 -4
  268. package/dist/standalone/bk-video.js +2 -2
  269. package/dist/standalone/bk-visually-hidden.js +1 -1
  270. package/dist/standalone/bk-zoom.js +3 -3
  271. package/dist/standalone/chunks/{announcer-D1zrRWwO.js → announcer-6tMlCOq1.js} +9 -4
  272. package/dist/standalone/chunks/{bk-alert-offline-Clw0ZSsH.js → bk-alert-offline-hCLuG-RM.js} +1 -1
  273. package/dist/standalone/chunks/{bk-carousel-Biz7t8sL.js → bk-carousel-_dudBMVq.js} +2 -2
  274. package/dist/standalone/chunks/{bk-diagram-D_fQf6SF.js → bk-diagram-BB2odomE.js} +2 -2
  275. package/dist/standalone/chunks/{bk-dialog-DwZyUUHh.js → bk-dialog-DcvwnOtN.js} +2 -2
  276. package/dist/standalone/chunks/{bk-icon-Bp_flKdv.js → bk-icon-D4kI4F18.js} +1 -1
  277. package/dist/standalone/chunks/{bk-image-editor-BADsoLRL.js → bk-image-editor-SRVkHI-4.js} +2 -2
  278. package/dist/standalone/chunks/{bk-input-date-range-DHcJ8-5g.js → bk-input-date-range-C0Vd-p0T.js} +2 -2
  279. package/dist/standalone/chunks/{bk-input-rich-CFhW6vRa.js → bk-input-rich-AmDv87E5.js} +3 -3
  280. package/dist/standalone/chunks/{bk-input-text-DviyLBqj.js → bk-input-text-2n89GDIT.js} +15 -5
  281. package/dist/standalone/chunks/{bk-model-viewer-w_Ah4Tvs.js → bk-model-viewer-BoNYBd6W.js} +2 -2
  282. package/dist/standalone/chunks/bk-picture-CA5gLxgZ.js +186 -0
  283. package/dist/standalone/chunks/{bk-qr-code-CYMovNVl.js → bk-qr-code-CSFfc8As.js} +1 -1
  284. package/dist/standalone/chunks/{bk-shell-app-B2lxHit8.js → bk-shell-app-BlCOG25y.js} +31 -30
  285. package/dist/standalone/chunks/{bk-surface-D7e0tErs.js → bk-surface-BULRdKam.js} +1 -1
  286. package/dist/standalone/chunks/{bk-swatch-palette-x13JgJQi.js → bk-swatch-palette-Cqj85tSW.js} +1 -1
  287. package/dist/standalone/chunks/{bk-table-CP8n_jy7.js → bk-table-DWlD7yoM.js} +72 -71
  288. package/dist/standalone/chunks/bk-tabs-STkr3-E1.js +422 -0
  289. package/dist/standalone/chunks/{bk-toast-group-CoL6W7uk.js → bk-toast-group-5nZg7BaJ.js} +2 -2
  290. package/dist/standalone/chunks/{busy-BUB22mGY.js → busy-eG3uHonz.js} +1 -1
  291. package/dist/standalone/chunks/{choice-field-poOTerh1.js → choice-field-B0oe_9fI.js} +4 -4
  292. package/dist/standalone/chunks/{date-field-B-fCXa2D.js → date-field-Dy1_qxNv.js} +2 -2
  293. package/dist/standalone/chunks/define-6OfuRn5c.js +60 -0
  294. package/dist/standalone/chunks/{form-control-CHpfKAKa.js → form-control-Bmk0SRDX.js} +1 -1
  295. package/dist/standalone/chunks/{handle-menu-BgYUbGO2.js → handle-menu-BAe9fPYJ.js} +10 -36
  296. package/dist/standalone/chunks/{heading-text-CgnCa_q2.js → heading-text-B2kF-b8p.js} +1 -1
  297. package/dist/standalone/chunks/hue-vLbNdAEl.js +20 -0
  298. package/dist/standalone/chunks/late-CPQ_RbU-.js +30 -0
  299. package/dist/standalone/chunks/{options-BdC8-KKM.js → options-ySaDL-dW.js} +1 -1
  300. package/dist/standalone/chunks/{stars-BgKEjDQx.js → stars-BAUc_LqI.js} +1 -1
  301. package/dist/standalone/chunks/tags-CMLAGsVw.js +37 -0
  302. package/dist/standalone/chunks/{text-field-CqhJSAwZ.js → text-field-CufOGdfr.js} +16 -10
  303. package/dist/standalone/chunks/{toggle-control-lvZbQtGW.js → toggle-control-Cgqp1jhf.js} +4 -2
  304. package/dist/standalone/chunks/{virtual-C_h6sHnm.js → virtual-D-qgACnE.js} +1 -1
  305. package/dist/standalone/confirm.js +2 -2
  306. package/dist/standalone/reset.css +1 -1
  307. package/dist/standalone/toast.js +1 -1
  308. package/dist/standalone/tokens.css +1 -1
  309. package/dist/tokens.css +1 -1
  310. package/package.json +2 -2
  311. package/dist/standalone/chunks/define-DkVeu7e9.js +0 -30
  312. package/dist/standalone/chunks/hue-Jvb-141g.js +0 -14
  313. package/dist/standalone/chunks/keyed-CZ2AaouM.js +0 -16
@@ -1,20 +1,21 @@
1
1
  import { a as e, n as t, u as n } from "./chunks/lit-D8x-qXgH.js";
2
2
  import { t as r } from "./chunks/if-defined-z_20pBRr.js";
3
3
  import { t as i } from "./chunks/live-CgLyfc6z.js";
4
- import { n as a, t as o } from "./chunks/choice-field-poOTerh1.js";
5
- import { t as s } from "./chunks/define-DkVeu7e9.js";
4
+ import { n as a, t as o } from "./chunks/choice-field-B0oe_9fI.js";
5
+ import { t as s } from "./chunks/define-6OfuRn5c.js";
6
6
  import { i as c } from "./chunks/events-DQ4e9cPN.js";
7
7
  import { t as l } from "./chunks/loading-B37QBUkv.js";
8
- import { n as u, t as d, u as f } from "./chunks/options-BdC8-KKM.js";
8
+ import { n as u, t as d, u as f } from "./chunks/options-ySaDL-dW.js";
9
9
  import "./bk-chip.js";
10
- import "./chunks/bk-icon-Bp_flKdv.js";
10
+ import "./chunks/bk-icon-D4kI4F18.js";
11
11
  import "./bk-spinner.js";
12
12
  import { r as p } from "./chunks/submit-BjBGB8OW.js";
13
+ import { n as m, t as h } from "./chunks/tags-CMLAGsVw.js";
13
14
  import "./chunks/add-CUFUzxGc.js";
14
15
  import "./chunks/chevron-down-CpVEjEyi.js";
15
16
  import "./chunks/search-Cm9mOqRy.js";
16
17
  // dist/components/bk-combobox.js
17
- var m = class extends o {
18
+ var g = class extends o {
18
19
  static properties = {
19
20
  ...o.properties,
20
21
  readonly: {
@@ -79,20 +80,11 @@ var m = class extends o {
79
80
  get busy() {
80
81
  return this.loading || this.searching;
81
82
  }
82
- static styles = [...a("combobox"), n`
83
+ static styles = [
84
+ ...a("combobox"),
85
+ m("combobox"),
86
+ n`
83
87
  :host { --_bk-text-field-font-size: var(--bk-combobox-font-size); }
84
- .box { cursor: text; }
85
- .values { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--bk-combobox-tag-gap, var(--bk-space-1)); }
86
- .box.has-tags { padding-block: var(--bk-combobox-tags-padding, var(--bk-space-1)); }
87
- :host([size="sm"]) .box.has-tags { padding-block: var(--bk-combobox-tags-padding, var(--bk-space-0)); }
88
- .tags { display: contents; }
89
- bk-chip { max-width: 100%; }
90
- input { text-overflow: ellipsis; }
91
- .has-tags input { min-width: var(--bk-combobox-input-min-width, 6ch); width: auto; }
92
- input:disabled { cursor: not-allowed; }
93
- /* Disabled with chips: the chips keep their text contrast (a dimmed box fails 4.5:1); the sunken fill and the cursor show the state. */
94
- :host([disabled]) .box.has-tags { opacity: 1; }
95
- :host([disabled]) .box.has-tags input { opacity: var(--bk-disabled-opacity); }
96
88
  mark {
97
89
  background: none; color: var(--bk-combobox-match-color, var(--bk-accent-text));
98
90
  font-weight: var(--bk-combobox-match-weight, var(--bk-weight-semibold));
@@ -106,7 +98,8 @@ var m = class extends o {
106
98
  }
107
99
  .status bk-spinner { --bk-spinner-size: var(--bk-icon-sm); }
108
100
  @media (forced-colors: active) { mark { color: Highlight; } }
109
- `];
101
+ `
102
+ ];
110
103
  get control() {
111
104
  return this.renderRoot?.querySelector("input") ?? null;
112
105
  }
@@ -228,15 +221,13 @@ var m = class extends o {
228
221
  }
229
222
  onPaste(e) {
230
223
  if (!this.multiple || this.isDisabled || this.readonly) return;
231
- let t = e.clipboardData?.getData("text") ?? "";
232
- if (!/[,;\n\t]/.test(t)) return;
233
- e.preventDefault();
224
+ let t = h(e, this.text);
225
+ if (!t) return;
234
226
  let n = [...this.selection];
235
- for (let e of (this.text + t).split(/[,;\n\t]+/)) {
236
- let t = e.trim();
237
- if (!t || this.max !== void 0 && this.max > 0 && n.length >= this.max) continue;
238
- let r = this.tagFor(t);
239
- r !== void 0 && !n.includes(r) && n.push(r);
227
+ for (let e of t) {
228
+ if (this.max !== void 0 && this.max > 0 && n.length >= this.max) continue;
229
+ let t = this.tagFor(e);
230
+ t !== void 0 && !n.includes(t) && n.push(t);
240
231
  }
241
232
  n.length !== this.selection.length && this.commit(n), this.query = "", this.text = "", this.visible = this.computeVisible();
242
233
  }
@@ -353,7 +344,7 @@ var m = class extends o {
353
344
  render() {
354
345
  let n = this.showInvalid, a = this.multiple && this.selection.length > 0, o = this.descriptionIds(a ? "tags-text" : void 0), s = `${this.key}-list`, c = this.label ? void 0 : this.forwardedName, l = this.popupShown, u = this.visible, d = this.busy, f = this.noResults, p = d && u.length > 0;
355
346
  return e`<div @focusout=${this.onFocusOut}>
356
- ${this.renderField(e`<div class="${this.boxClass}${a ? " has-tags" : ""}${l ? " open" : ""}" part="box" @click=${this.onBoxClick}>
347
+ ${this.renderField(e`<div class="${this.boxClass}${a ? " has-tags" : ""}${a && !this.hasLead ? " tags-first" : ""}${l ? " open" : ""}" part="box" @click=${this.onBoxClick}>
357
348
  ${this.renderStart()}
358
349
  ${this.renderPrefix()}
359
350
  <div class="values">
@@ -385,5 +376,5 @@ var m = class extends o {
385
376
  </div>`;
386
377
  }
387
378
  };
388
- s("bk-combobox", m);
389
- export { m as BkCombobox, u as matchRanges };
379
+ s("bk-combobox", g);
380
+ export { g as BkCombobox, u as matchRanges };
@@ -1,11 +1,11 @@
1
1
  import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
2
- import { t as i } from "./chunks/define-DkVeu7e9.js";
2
+ import { t as i } from "./chunks/define-6OfuRn5c.js";
3
3
  import { n as a } from "./chunks/events-DQ4e9cPN.js";
4
4
  import { t as o } from "./chunks/i18n-DFfGgd3d.js";
5
5
  import { t as s } from "./chunks/state-XYmTmnOw.js";
6
6
  import { t as c, x as l } from "./chunks/styles-CaeyhYDA.js";
7
- import { a as u, n as d, r as f } from "./chunks/options-BdC8-KKM.js";
8
- import "./chunks/bk-icon-Bp_flKdv.js";
7
+ import { a as u, n as d, r as f } from "./chunks/options-ySaDL-dW.js";
8
+ import "./chunks/bk-icon-D4kI4F18.js";
9
9
  import "./bk-kbd.js";
10
10
  import "./bk-spinner.js";
11
11
  import { t as p } from "./chunks/scroll-CB6-StUs.js";
@@ -1,10 +1,10 @@
1
1
  import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
2
- import { n as i, r as a, t as o } from "./chunks/define-DkVeu7e9.js";
2
+ import { i, r as a, t as o } from "./chunks/define-6OfuRn5c.js";
3
3
  import { r as s } from "./chunks/events-DQ4e9cPN.js";
4
4
  import { t as c } from "./chunks/i18n-DFfGgd3d.js";
5
5
  import { t as l } from "./chunks/styles-CaeyhYDA.js";
6
6
  import { d as u, p as d } from "./chunks/shortcuts-DPxCSO4M.js";
7
- import "./chunks/bk-dialog-DwZyUUHh.js";
7
+ import "./chunks/bk-dialog-DcvwnOtN.js";
8
8
  import { matchesQuery as f } from "./bk-command-menu.js";
9
9
  import "./bk-kbd.js";
10
10
  // dist/components/bk-command-palette.js
@@ -28,7 +28,7 @@ var p = 0, m = class extends n {
28
28
  i18n = new c(this);
29
29
  unregister;
30
30
  stopShortcut;
31
- children$ = a(() => this.requestUpdate());
31
+ children$ = i(() => this.requestUpdate());
32
32
  constructor() {
33
33
  super(), this.open = !1, this.items = [], this.query = "", this.shortcut = "Mod+K", this.debounce = 150, this.label = "", this.placeholder = "", this.emptyText = "";
34
34
  }
@@ -118,7 +118,7 @@ var p = 0, m = class extends n {
118
118
  });
119
119
  }
120
120
  has(e) {
121
- return !!i(this)?.querySelector(`:scope > [slot="${e}"]`);
121
+ return !!a(this)?.querySelector(`:scope > [slot="${e}"]`);
122
122
  }
123
123
  render() {
124
124
  return e`<bk-dialog bare exportparts="dialog" heading=${this.label || this.i18n.t("commandPalette")} .open=${this.open}
@@ -4,11 +4,11 @@ import { t as i } from "./chunks/live-CgLyfc6z.js";
4
4
  import { t as a } from "./chunks/style-map-BMvn17E7.js";
5
5
  import { t as o } from "./chunks/i18n-DFfGgd3d.js";
6
6
  import { o as s, t as c } from "./chunks/anchor-CNX3nt2F.js";
7
- import { t as l } from "./chunks/announcer-D1zrRWwO.js";
8
- import { a as u, c as d, d as f, t as p } from "./chunks/options-BdC8-KKM.js";
9
- import { t as m } from "./chunks/define-DkVeu7e9.js";
7
+ import { t as l } from "./chunks/announcer-6tMlCOq1.js";
8
+ import { a as u, c as d, d as f, t as p } from "./chunks/options-ySaDL-dW.js";
9
+ import { t as m } from "./chunks/define-6OfuRn5c.js";
10
10
  import { n as h, t as g } from "./chunks/events-DQ4e9cPN.js";
11
- import { t as _ } from "./chunks/form-control-CHpfKAKa.js";
11
+ import { t as _ } from "./chunks/form-control-Bmk0SRDX.js";
12
12
  import { t as v } from "./chunks/slots-BHTtBbPo.js";
13
13
  import { t as y } from "./chunks/state-XYmTmnOw.js";
14
14
  import { b, r as x, s as S, t as C } from "./chunks/styles-CaeyhYDA.js";
@@ -1,5 +1,5 @@
1
1
  import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
2
- import { t as i } from "./chunks/define-DkVeu7e9.js";
2
+ import { t as i } from "./chunks/define-6OfuRn5c.js";
3
3
  import { t as a } from "./chunks/i18n-DFfGgd3d.js";
4
4
  import { t as o, x as s } from "./chunks/styles-CaeyhYDA.js";
5
5
  import { a as c, i as l, n as u, r as d, t as f } from "./chunks/delta-C3KtTv5o.js";
@@ -1 +1 @@
1
- export { t as BkDiagram, n as registerDiagramFonts } from "./chunks/bk-diagram-D_fQf6SF.js";
1
+ export { t as BkDiagram, n as registerDiagramFonts } from "./chunks/bk-diagram-BB2odomE.js";
@@ -1 +1 @@
1
- export { t as BkDialog } from "./chunks/bk-dialog-DwZyUUHh.js";
1
+ export { t as BkDialog } from "./chunks/bk-dialog-DcvwnOtN.js";
@@ -1,9 +1,9 @@
1
1
  import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
2
- import { t as i } from "./chunks/define-DkVeu7e9.js";
2
+ import { t as i } from "./chunks/define-6OfuRn5c.js";
3
3
  import { i as a } from "./chunks/events-DQ4e9cPN.js";
4
4
  import { t as o } from "./chunks/slots-BHTtBbPo.js";
5
5
  import { t as s, v as c } from "./chunks/styles-CaeyhYDA.js";
6
- import "./chunks/bk-icon-Bp_flKdv.js";
6
+ import "./chunks/bk-icon-D4kI4F18.js";
7
7
  import "./chunks/arrow-right-BpHbedfW.js";
8
8
  import "./chunks/chevron-down-CpVEjEyi.js";
9
9
  // dist/components/bk-disclosure.js
@@ -1,5 +1,5 @@
1
1
  import { a as e, t, u as n } from "./chunks/lit-D8x-qXgH.js";
2
- import { n as r, r as i, t as a } from "./chunks/define-DkVeu7e9.js";
2
+ import { i as r, r as i, t as a } from "./chunks/define-6OfuRn5c.js";
3
3
  import { t as o } from "./chunks/styles-CaeyhYDA.js";
4
4
  // dist/components/bk-divider.js
5
5
  var s = /* @__PURE__ */ new Set([
@@ -13,7 +13,7 @@ var s = /* @__PURE__ */ new Set([
13
13
  internals = this.attachInternals();
14
14
  label = "";
15
15
  labelled = !1;
16
- observer = i(() => this.requestUpdate());
16
+ observer = r(() => this.requestUpdate());
17
17
  constructor() {
18
18
  super(), this.internals.role = "separator";
19
19
  }
@@ -60,8 +60,8 @@ var s = /* @__PURE__ */ new Set([
60
60
  super.willUpdate(e);
61
61
  let t = this.effectiveOrientation === "vertical", n = this.internals.states;
62
62
  t ? n.add("vertical") : n.delete("vertical"), s.has(this.parentElement?.localName ?? "") ? n.add("spaced") : n.delete("spaced"), this.internals.ariaOrientation = t ? "vertical" : "horizontal";
63
- let i = [...r(this)?.childNodes ?? []].some((e) => e.nodeType === Node.ELEMENT_NODE);
64
- this.label = r(this)?.textContent?.trim().replace(/\s+/g, " ") ?? "", this.internals.ariaLabel = this.label || null, this.labelled = i || !!this.label;
63
+ let r = [...i(this)?.childNodes ?? []].some((e) => e.nodeType === Node.ELEMENT_NODE);
64
+ this.label = i(this)?.textContent?.trim().replace(/\s+/g, " ") ?? "", this.internals.ariaLabel = this.label || null, this.labelled = r || !!this.label;
65
65
  }
66
66
  render() {
67
67
  let t = this.labelled;
@@ -1,8 +1,8 @@
1
1
  import { a as e, u as t } from "./chunks/lit-D8x-qXgH.js";
2
2
  import { t as n } from "./chunks/i18n-DFfGgd3d.js";
3
- import { t as r } from "./chunks/define-DkVeu7e9.js";
3
+ import { t as r } from "./chunks/define-6OfuRn5c.js";
4
4
  import { r as i } from "./chunks/events-DQ4e9cPN.js";
5
- import { t as a } from "./chunks/bk-dialog-DwZyUUHh.js";
5
+ import { t as a } from "./chunks/bk-dialog-DcvwnOtN.js";
6
6
  // dist/components/bk-drawer.js
7
7
  var o = 8, s = class extends a {
8
8
  static properties = {
@@ -1,5 +1,5 @@
1
1
  import { a as e, t, u as n } from "./chunks/lit-D8x-qXgH.js";
2
- import { t as r } from "./chunks/define-DkVeu7e9.js";
2
+ import { t as r } from "./chunks/define-6OfuRn5c.js";
3
3
  import { t as i } from "./chunks/styles-CaeyhYDA.js";
4
4
  // dist/components/bk-drop-target.js
5
5
  var a = class extends t {
@@ -1,6 +1,6 @@
1
- import { t as e } from "./chunks/heading-text-CgnCa_q2.js";
1
+ import { t as e } from "./chunks/heading-text-B2kF-b8p.js";
2
2
  import { a as t, n, t as r, u as i } from "./chunks/lit-D8x-qXgH.js";
3
- import { t as a } from "./chunks/define-DkVeu7e9.js";
3
+ import { t as a } from "./chunks/define-6OfuRn5c.js";
4
4
  import { t as o } from "./chunks/slots-BHTtBbPo.js";
5
5
  import { h as s, t as c } from "./chunks/styles-CaeyhYDA.js";
6
6
  import "./bk-icon-tile.js";
@@ -1,5 +1,5 @@
1
1
  import { a as e, t, u as n } from "./chunks/lit-D8x-qXgH.js";
2
- import { t as r } from "./chunks/define-DkVeu7e9.js";
2
+ import { t as r } from "./chunks/define-6OfuRn5c.js";
3
3
  import { t as i } from "./chunks/i18n-DFfGgd3d.js";
4
4
  import { t as a } from "./chunks/slots-BHTtBbPo.js";
5
5
  import { t as o } from "./chunks/styles-CaeyhYDA.js";
@@ -1,5 +1,5 @@
1
1
  import { a as e, t, u as n } from "./chunks/lit-D8x-qXgH.js";
2
- import { t as r } from "./chunks/define-DkVeu7e9.js";
2
+ import { t as r } from "./chunks/define-6OfuRn5c.js";
3
3
  import { t as i } from "./chunks/slots-BHTtBbPo.js";
4
4
  import { t as a } from "./chunks/styles-CaeyhYDA.js";
5
5
  // dist/components/bk-facts-item.js
@@ -1,5 +1,5 @@
1
1
  import { a as e, t, u as n } from "./chunks/lit-D8x-qXgH.js";
2
- import { t as r } from "./chunks/define-DkVeu7e9.js";
2
+ import { t as r } from "./chunks/define-6OfuRn5c.js";
3
3
  import { t as i } from "./chunks/host-vars-DTKbhBPu.js";
4
4
  import { t as a } from "./chunks/styles-CaeyhYDA.js";
5
5
  // dist/components/bk-facts.js
@@ -1,6 +1,6 @@
1
- import { t as e } from "./chunks/heading-text-CgnCa_q2.js";
1
+ import { t as e } from "./chunks/heading-text-B2kF-b8p.js";
2
2
  import { a as t, n, t as r, u as i } from "./chunks/lit-D8x-qXgH.js";
3
- import { t as a } from "./chunks/define-DkVeu7e9.js";
3
+ import { t as a } from "./chunks/define-6OfuRn5c.js";
4
4
  import { t as o } from "./chunks/slots-BHTtBbPo.js";
5
5
  import { h as s, t as c } from "./chunks/styles-CaeyhYDA.js";
6
6
  import "./bk-icon-tile.js";
@@ -1,5 +1,5 @@
1
1
  import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
2
- import { r as i, t as a } from "./chunks/define-DkVeu7e9.js";
2
+ import { i, t as a } from "./chunks/define-6OfuRn5c.js";
3
3
  import { t as o } from "./chunks/i18n-DFfGgd3d.js";
4
4
  import { r as s } from "./chunks/field-DkBkSgJI.js";
5
5
  import { t as c } from "./chunks/slots-BHTtBbPo.js";
@@ -1,7 +1,7 @@
1
1
  import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
2
2
  import { t as i } from "./chunks/repeat-Dxf3qZZl.js";
3
- import { t as a } from "./chunks/define-DkVeu7e9.js";
4
- import { t as o } from "./chunks/announcer-D1zrRWwO.js";
3
+ import { t as a } from "./chunks/define-6OfuRn5c.js";
4
+ import { t as o } from "./chunks/announcer-6tMlCOq1.js";
5
5
  import { n as s, t as c } from "./chunks/events-DQ4e9cPN.js";
6
6
  import { t as l } from "./chunks/slots-BHTtBbPo.js";
7
7
  import { t as u } from "./chunks/i18n-DFfGgd3d.js";
@@ -1,11 +1,11 @@
1
1
  import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
2
- import { t as i } from "./chunks/define-DkVeu7e9.js";
2
+ import { t as i } from "./chunks/define-6OfuRn5c.js";
3
3
  import { n as a } from "./chunks/events-DQ4e9cPN.js";
4
4
  import { t as o } from "./chunks/i18n-DFfGgd3d.js";
5
5
  import { t as s } from "./chunks/styles-CaeyhYDA.js";
6
6
  import "./bk-breadcrumbs.js";
7
7
  import "./bk-button.js";
8
- import "./chunks/bk-icon-Bp_flKdv.js";
8
+ import "./chunks/bk-icon-D4kI4F18.js";
9
9
  import "./bk-menu-item.js";
10
10
  import "./bk-menu-list.js";
11
11
  import "./chunks/chevron-right-CxqvZ6TS.js";
@@ -1,6 +1,6 @@
1
1
  import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
2
2
  import { t as i } from "./chunks/i18n-DFfGgd3d.js";
3
- import { t as a } from "./chunks/define-DkVeu7e9.js";
3
+ import { t as a } from "./chunks/define-6OfuRn5c.js";
4
4
  import { a as o, l as s, o as c, r as l, s as u, t as d, u as f } from "./chunks/footnotes-BeisMxLk.js";
5
5
  import { t as p } from "./chunks/styles-CaeyhYDA.js";
6
6
  // dist/components/bk-footnote.js
@@ -1,12 +1,12 @@
1
1
  import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
2
2
  import { t as i } from "./chunks/if-defined-z_20pBRr.js";
3
3
  import { t as a } from "./chunks/i18n-DFfGgd3d.js";
4
- import { r as o, t as s } from "./chunks/define-DkVeu7e9.js";
4
+ import { i as o, t as s } from "./chunks/define-6OfuRn5c.js";
5
5
  import { a as c, c as l, i as u, l as d, n as f, o as p, r as m, u as h } from "./chunks/footnotes-BeisMxLk.js";
6
6
  import { t as g } from "./chunks/host-vars-DTKbhBPu.js";
7
7
  import { l as _, t as v } from "./chunks/link--YWr8exL.js";
8
8
  import { t as y } from "./chunks/styles-CaeyhYDA.js";
9
- import "./chunks/bk-icon-Bp_flKdv.js";
9
+ import "./chunks/bk-icon-D4kI4F18.js";
10
10
  import "./chunks/arrow-up-BfHTuP3c.js";
11
11
  // dist/components/bk-footnotes-item.js
12
12
  function b(e, t) {
@@ -1,6 +1,6 @@
1
1
  import { a as e, t, u as n } from "./chunks/lit-D8x-qXgH.js";
2
2
  import { t as r } from "./chunks/i18n-DFfGgd3d.js";
3
- import { t as i } from "./chunks/define-DkVeu7e9.js";
3
+ import { t as i } from "./chunks/define-6OfuRn5c.js";
4
4
  import { u as a } from "./chunks/footnotes-BeisMxLk.js";
5
5
  import { t as o } from "./chunks/styles-CaeyhYDA.js";
6
6
  import "./bk-footnotes-item.js";
@@ -1,6 +1,6 @@
1
1
  import { a as e, t, u as n } from "./chunks/lit-D8x-qXgH.js";
2
2
  import { o as r, r as i, t as a } from "./chunks/i18n-DFfGgd3d.js";
3
- import { t as o } from "./chunks/define-DkVeu7e9.js";
3
+ import { t as o } from "./chunks/define-6OfuRn5c.js";
4
4
  import { confirmDialog as s } from "./confirm.js";
5
5
  // dist/components/bk-form-guard.js
6
6
  function c(e) {
@@ -1,6 +1,6 @@
1
1
  import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
2
2
  import { t as i } from "./chunks/i18n-DFfGgd3d.js";
3
- import { n as a, t as o } from "./chunks/define-DkVeu7e9.js";
3
+ import { r as a, t as o } from "./chunks/define-6OfuRn5c.js";
4
4
  import { n as s } from "./chunks/events-DQ4e9cPN.js";
5
5
  import { t as c } from "./chunks/slots-BHTtBbPo.js";
6
6
  import { t as l } from "./chunks/state-XYmTmnOw.js";
@@ -1,5 +1,5 @@
1
1
  import { a as e, t, u as n } from "./chunks/lit-D8x-qXgH.js";
2
- import { i as r, t as i } from "./chunks/define-DkVeu7e9.js";
2
+ import { a as r, t as i } from "./chunks/define-6OfuRn5c.js";
3
3
  import { t as a } from "./chunks/host-vars-DTKbhBPu.js";
4
4
  // dist/components/bk-grid.js
5
5
  var o = class extends t {
@@ -1,8 +1,8 @@
1
1
  import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
2
- import { t as i } from "./chunks/define-DkVeu7e9.js";
2
+ import { t as i } from "./chunks/define-6OfuRn5c.js";
3
3
  import { n as a, t as o } from "./chunks/slots-BHTtBbPo.js";
4
4
  import { _ as s, g as c, t as l } from "./chunks/styles-CaeyhYDA.js";
5
- import "./chunks/bk-icon-Bp_flKdv.js";
5
+ import "./chunks/bk-icon-D4kI4F18.js";
6
6
  import "./chunks/info-DxwIeCXS.js";
7
7
  import "./chunks/label-cokyRPHN.js";
8
8
  import "./chunks/warning-BxRrPipZ.js";
@@ -1 +1 @@
1
- export { t as BkIcon, n as lateIcons } from "./chunks/bk-icon-Bp_flKdv.js";
1
+ export { t as BkIcon, n as lateIcons } from "./chunks/bk-icon-D4kI4F18.js";
@@ -1,14 +1,16 @@
1
1
  import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
2
2
  import { t as i } from "./chunks/style-map-BMvn17E7.js";
3
3
  import { t as a } from "./chunks/if-defined-z_20pBRr.js";
4
- import { t as o } from "./chunks/define-DkVeu7e9.js";
4
+ import { t as o } from "./chunks/define-6OfuRn5c.js";
5
5
  import { t as s } from "./chunks/i18n-DFfGgd3d.js";
6
6
  import { n as c, t as l } from "./chunks/events-DQ4e9cPN.js";
7
7
  import { n as u, t as d } from "./chunks/pan-zoom-CbOGHBG7.js";
8
8
  import { t as f, x as p } from "./chunks/styles-CaeyhYDA.js";
9
9
  import { t as m } from "./chunks/slots-BHTtBbPo.js";
10
- import "./chunks/bk-icon-Bp_flKdv.js";
10
+ import { t as h } from "./chunks/host-vars-DTKbhBPu.js";
11
+ import "./chunks/bk-icon-D4kI4F18.js";
11
12
  import "./bk-segmented.js";
13
+ import "./bk-segmented-item.js";
12
14
  import "./bk-button.js";
13
15
  import "./bk-zoom.js";
14
16
  import "./chunks/chevron-left-BHF34JzQ.js";
@@ -17,7 +19,7 @@ import "./chunks/compare-DGPeqUw7.js";
17
19
  import "./chunks/fit-screen-zMv7w7bk.js";
18
20
  import "./chunks/group-RW5fFMy-.js";
19
21
  // dist/components/bk-image-compare.js
20
- var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = class extends n {
22
+ var g = 2, _ = 10, v = 8, y = (e, t, n) => Math.min(n, Math.max(t, e)), b = class extends n {
21
23
  static properties = {
22
24
  beforeSrc: { attribute: "before-src" },
23
25
  afterSrc: { attribute: "after-src" },
@@ -37,12 +39,17 @@ var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = clas
37
39
  type: Boolean,
38
40
  reflect: !0
39
41
  },
42
+ shaped: {
43
+ type: Boolean,
44
+ reflect: !0
45
+ },
40
46
  ratio: { state: !0 },
47
+ naturalSize: { state: !0 },
41
48
  sliding: { state: !0 }
42
49
  };
43
50
  i18n = new s(this);
44
51
  pz = new d(this, {
45
- max: _,
52
+ max: v,
46
53
  onChange: () => this.onViewChange()
47
54
  });
48
55
  quiet = !1;
@@ -50,7 +57,7 @@ var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = clas
50
57
  internals = this.attachInternals();
51
58
  slots = new m(this);
52
59
  constructor() {
53
- super(), this.beforeSrc = "", this.afterSrc = "", this.beforeLabel = "", this.afterLabel = "", this.label = "", this.variant = "slider", this.position = 50, this.show = "after", this.zoomable = !1, this.ratio = 0, this.sliding = !1, this.internals.role = "group";
60
+ super(), this.beforeSrc = "", this.afterSrc = "", this.beforeLabel = "", this.afterLabel = "", this.label = "", this.variant = "slider", this.position = 50, this.show = "after", this.zoomable = !1, this.shaped = !1, this.ratio = 0, this.naturalSize = 0, this.sliding = !1, this.internals.role = "group";
54
61
  }
55
62
  static styles = [
56
63
  f,
@@ -64,6 +71,15 @@ var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = clas
64
71
  --_bk-image-compare-control-fg: var(--bk-image-compare-control-fg, var(--bk-on-media));
65
72
  --_bk-image-compare-radius: var(--bk-image-compare-radius, var(--bk-radius-md));
66
73
  }
74
+ /* shaped: the width follows the ratio under the cap, never wider than the container or the natural pictures. With
75
+ side, the width is two boxes and the gap. */
76
+ :host([shaped]:not(:state(content))) {
77
+ --_bk-image-compare-cap: var(--bk-image-compare-max-height, calc(infinity * 1px));
78
+ --_bk-image-compare-shape: var(--bk-image-compare-ratio, var(--_bk-image-compare-ratio, 4 / 3));
79
+ inline-size: min(100%,
80
+ calc(var(--_bk-image-compare-cols, 1) * var(--_bk-image-compare-natural, calc(infinity * 1px)) + (var(--_bk-image-compare-cols, 1) - 1) * var(--_bk-image-compare-gap)),
81
+ calc(var(--_bk-image-compare-cols, 1) * var(--_bk-image-compare-cap) * var(--_bk-image-compare-shape) + (var(--_bk-image-compare-cols, 1) - 1) * var(--_bk-image-compare-gap)));
82
+ }
67
83
  .compare { display: grid; gap: var(--_bk-image-compare-gap); min-width: 0; }
68
84
  .view { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--_bk-image-compare-gap); border-radius: var(--_bk-image-compare-radius); }
69
85
  .view.side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@@ -76,6 +92,8 @@ var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = clas
76
92
  .stage {
77
93
  position: relative; grid-row: 1; grid-column: 1; overflow: hidden; isolation: isolate;
78
94
  aspect-ratio: var(--bk-image-compare-ratio, var(--_bk-image-compare-ratio, 4 / 3));
95
+ /* Under the cap the box keeps the full width: stretch, not the width from the ratio of a grid item. */
96
+ max-block-size: var(--bk-image-compare-max-height, none); justify-self: stretch;
79
97
  border-radius: var(--_bk-image-compare-radius); user-select: none; -webkit-user-select: none;
80
98
  }
81
99
  /* The backdrop stays a hairline inside the edge: the smoothed edge of a picture never mixes with it. */
@@ -85,7 +103,7 @@ var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = clas
85
103
  background: var(--bk-image-compare-bg, var(--bk-media-backdrop));
86
104
  }
87
105
  /* Content: the sides lie in one grid cell, and the larger side gives the size of the box. */
88
- .stage.content { display: grid; aspect-ratio: auto; user-select: text; -webkit-user-select: text; }
106
+ .stage.content { display: grid; aspect-ratio: auto; max-block-size: none; user-select: text; -webkit-user-select: text; }
89
107
  .stage.content::before { display: none; }
90
108
  .stage.content > .layer { position: relative; inset: auto; grid-area: 1 / 1; min-inline-size: 0; }
91
109
  .layer.slotted {
@@ -114,9 +132,12 @@ var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = clas
114
132
  .tag {
115
133
  position: absolute; inset-block-start: var(--_bk-image-compare-pad); max-inline-size: 40%;
116
134
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
117
- padding: var(--bk-space-1) var(--bk-space-2); border-radius: var(--bk-radius-full);
135
+ /* Letter spacing also follows the last letter: the end padding gives it back, so the text stays centred. */
136
+ padding-block: var(--bk-space-1); padding-inline: var(--bk-space-2) calc(var(--bk-space-2) - var(--bk-image-compare-label-tracking, 0em));
137
+ border-radius: var(--bk-radius-full);
118
138
  background: var(--_bk-image-compare-control-bg); color: var(--_bk-image-compare-control-fg); backdrop-filter: var(--bk-glass);
119
139
  font-size: var(--bk-type-small); line-height: var(--bk-line-height-tight);
140
+ text-transform: var(--bk-image-compare-label-transform, none); letter-spacing: var(--bk-image-compare-label-tracking, 0em);
120
141
  }
121
142
  .tags.before .tag { inset-inline-start: var(--_bk-image-compare-pad); }
122
143
  .tags.after .tag { inset-inline-end: var(--_bk-image-compare-pad); }
@@ -176,6 +197,8 @@ var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = clas
176
197
  .caption {
177
198
  min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
178
199
  font-size: var(--bk-type-small); color: var(--bk-image-compare-caption-color, var(--bk-text-muted));
200
+ text-transform: var(--bk-image-compare-label-transform, none); letter-spacing: var(--bk-image-compare-label-tracking, 0em);
201
+ padding-inline-start: var(--bk-image-compare-label-tracking, 0em);
179
202
  }
180
203
  .switch { justify-self: center; }
181
204
  @media (prefers-reduced-motion: reduce) { .frame, .line, .handle { transition: none; } }
@@ -210,9 +233,13 @@ var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = clas
210
233
  this.viewChanged && (this.viewChanged = !1, c(this, "viewchange", this.view));
211
234
  }
212
235
  willUpdate(e) {
213
- e.has("position") && (this.position = v(Number(this.position) || 0, 0, 100)), (e.has("afterSrc") || e.has("beforeSrc")) && (this.ratio = 0);
236
+ e.has("position") && (this.position = y(Number(this.position) || 0, 0, 100)), (e.has("afterSrc") || e.has("beforeSrc")) && (this.ratio = 0, this.naturalSize = 0);
214
237
  let t = this.zoomable && !this.content;
215
- this.pz.enabled !== t && (this.pz.enabled = t, t || this.silently(() => this.pz.set({ zoom: 1 }))), (e.has("label") || e.has("beforeLabel") || e.has("afterLabel")) && (this.internals.ariaLabel = this.label || this.i18n.t("imageCompare"));
238
+ this.pz.enabled !== t && (this.pz.enabled = t, t || this.silently(() => this.pz.set({ zoom: 1 }))), (e.has("label") || e.has("beforeLabel") || e.has("afterLabel")) && (this.internals.ariaLabel = this.label || this.i18n.t("imageCompare")), this.content ? this.internals.states?.add("content") : this.internals.states?.delete("content"), h(this, {
239
+ "--_bk-image-compare-ratio": this.ratio ? String(this.ratio) : "",
240
+ "--_bk-image-compare-natural": this.naturalSize && this.ratio ? `${this.naturalSize}px` : "",
241
+ "--_bk-image-compare-cols": this.mode === "side" ? "2" : ""
242
+ });
216
243
  }
217
244
  get content() {
218
245
  return this.slots.has("before") || this.slots.has("after");
@@ -228,10 +255,14 @@ var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = clas
228
255
  }
229
256
  onLoad(e, t) {
230
257
  let n = t.target;
231
- (e === "after" || !this.afterSrc) && n.naturalWidth && n.naturalHeight && (this.ratio = n.naturalWidth / n.naturalHeight);
258
+ (e === "after" || !this.afterSrc) && n.naturalWidth && n.naturalHeight && (this.ratio = n.naturalWidth / n.naturalHeight, this.naturalSize = n.naturalWidth), c(this, "load", {
259
+ side: e,
260
+ naturalWidth: n.naturalWidth,
261
+ naturalHeight: n.naturalHeight
262
+ });
232
263
  }
233
264
  setPosition(e, t) {
234
- let n = Math.round(v(e, 0, 100) * 10) / 10;
265
+ let n = Math.round(y(e, 0, 100) * 10) / 10;
235
266
  n !== this.position && (this.position = n, l(this, "input")), t && l(this, "change");
236
267
  }
237
268
  slideTo(e) {
@@ -251,13 +282,13 @@ var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = clas
251
282
  }
252
283
  onDividerKey(e) {
253
284
  if (e.ctrlKey || e.metaKey || e.altKey) return;
254
- let t = getComputedStyle(this).direction === "rtl", n = e.shiftKey ? g : h, r = this.position, i = {
285
+ let t = getComputedStyle(this).direction === "rtl", n = e.shiftKey ? _ : g, r = this.position, i = {
255
286
  ArrowLeft: t ? r + n : r - n,
256
287
  ArrowRight: t ? r - n : r + n,
257
288
  ArrowDown: r - n,
258
289
  ArrowUp: r + n,
259
- PageDown: r - g,
260
- PageUp: r + g,
290
+ PageDown: r - _,
291
+ PageUp: r + _,
261
292
  Home: 0,
262
293
  End: 100
263
294
  };
@@ -290,8 +321,8 @@ var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = clas
290
321
  style: "percent",
291
322
  maximumFractionDigits: 0
292
323
  }).format(p / 100), h = n === "slider" ? e`
293
- ${o ? t : e`<div class="tags before"><span class="tag" part="tag">${this.labelOf("before")}</span></div>
294
- <div class="tags after"><span class="tag" part="tag">${this.labelOf("after")}</span></div>`}
324
+ ${o ? t : e`<div class="tags before"><span class="tag" part="tag label">${this.labelOf("before")}</span></div>
325
+ <div class="tags after"><span class="tag" part="tag label">${this.labelOf("after")}</span></div>`}
295
326
  <div class="divider" part="divider" role="slider" tabindex="0"
296
327
  aria-label=${this.i18n.t("compareDivider", {
297
328
  before: this.labelOf("before"),
@@ -307,17 +338,14 @@ var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = clas
307
338
  <span class="handle ${this.sliding ? "sliding" : ""}" part="handle" aria-hidden="true"
308
339
  @pointerdown=${this.onDividerDown} @pointermove=${this.onDividerMove} @pointerup=${this.onDividerUp}
309
340
  @pointercancel=${this.onDividerUp}><bk-icon name="chevron-left"></bk-icon><bk-icon name="chevron-right"></bk-icon></span>
310
- <div class="rail"><span class="line ${this.position <= 0 || this.position >= 100 ? "ends" : ""}" part="line"></span></div>` : t, g = s ? e`<span class="zoom" part="zoom"><bk-zoom variant="compact" size="sm" min="1" max=${_} .value=${this.pz.zoom}
341
+ <div class="rail"><span class="line ${this.position <= 0 || this.position >= 100 ? "ends" : ""}" part="line"></span></div>` : t, g = s ? e`<span class="zoom" part="zoom"><bk-zoom variant="compact" size="sm" min="1" max=${v} .value=${this.pz.zoom}
311
342
  @input=${this.onZoomInput} @change=${(e) => e.stopPropagation()}>
312
343
  <bk-button slot="end" variant="ghost" size="sm" icon="fit-screen" label=${this.i18n.t("zoomFit")} ?disabled=${this.pz.zoom <= 1}
313
344
  @click=${() => this.pz.set({ zoom: 1 })}></bk-button>
314
345
  </bk-zoom></span>` : t;
315
346
  return e`<div class="compare">
316
347
  <div class="view ${n} ${o ? "has-content" : ""} ${s ? "zoomable" : ""} ${c ? "zoomed" : ""}" part="view"
317
- style=${i({
318
- "--_bk-image-compare-ratio": this.ratio || void 0,
319
- "--_bk-image-compare-pos": `${this.position}%`
320
- })}
348
+ style=${i({ "--_bk-image-compare-pos": `${this.position}%` })}
321
349
  tabindex=${a(s ? "0" : void 0)} role=${a(s ? "group" : void 0)}
322
350
  aria-label=${a(s ? this.label || this.i18n.t("imageCompare") : void 0)}
323
351
  aria-describedby=${a(s ? "zoom-help" : void 0)}
@@ -330,16 +358,16 @@ var h = 2, g = 10, _ = 8, v = (e, t, n) => Math.min(n, Math.max(t, e)), y = clas
330
358
  </div>
331
359
  ${s ? e`<span class="sr-only" id="zoom-help">${this.i18n.t("compareZoomHelp")}</span>` : t}
332
360
  ${n === "side" ? e`<div class="captions">
333
- <span class="caption" part="caption" aria-hidden="true">${this.labelOf("before")}</span>
334
- <span class="caption" part="caption" aria-hidden="true">${this.labelOf("after")}</span>
361
+ <span class="caption" part="caption label" aria-hidden="true">${this.labelOf("before")}</span>
362
+ <span class="caption" part="caption label" aria-hidden="true">${this.labelOf("after")}</span>
335
363
  </div>` : t}
336
364
  ${n === "toggle" ? e`<bk-segmented class="switch" part="switch" size="sm" aria-label=${this.i18n.t("compareShow")}
337
365
  .value=${r} @input=${this.onShow} @change=${this.onShow}>
338
- <bk-segmented-item value="before">${this.labelOf("before")}</bk-segmented-item>
339
- <bk-segmented-item value="after">${this.labelOf("after")}</bk-segmented-item>
366
+ <bk-segmented-item part="label" value="before">${this.labelOf("before")}</bk-segmented-item>
367
+ <bk-segmented-item part="label" value="after">${this.labelOf("after")}</bk-segmented-item>
340
368
  </bk-segmented>` : t}
341
369
  </div>`;
342
370
  }
343
371
  };
344
- o("bk-image-compare", y);
345
- export { y as BkImageCompare };
372
+ o("bk-image-compare", b);
373
+ export { b as BkImageCompare };