@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
@@ -0,0 +1,422 @@
1
+ import { a as e, n as t, t as n, u as r } from "./lit-D8x-qXgH.js";
2
+ import { t as i } from "./if-defined-z_20pBRr.js";
3
+ import { t as a } from "./repeat-Dxf3qZZl.js";
4
+ import { a as o, i as s, r as c, t as l } from "./define-6OfuRn5c.js";
5
+ import { i as u, n as d } from "./anchor-CNX3nt2F.js";
6
+ import { n as f, t as p } from "./events-DQ4e9cPN.js";
7
+ import { a as m } from "./link--YWr8exL.js";
8
+ import { t as h } from "./i18n-DFfGgd3d.js";
9
+ import { t as g } from "./state-XYmTmnOw.js";
10
+ import { t as _ } from "./late-CPQ_RbU-.js";
11
+ import { t as v, v as y } from "./styles-CaeyhYDA.js";
12
+ import { BkTabsItem as b } from "../bk-tabs-item.js";
13
+ import { BkTabsPanel as x } from "../bk-tabs-panel.js";
14
+ import "../bk-button.js";
15
+ import "./bk-icon-D4kI4F18.js";
16
+ import "./add-CUFUzxGc.js";
17
+ import "./more-horiz-mUorHvCo.js";
18
+ // dist/components/bk-tabs.js
19
+ var S = new _({
20
+ "bk-menu": () => import("../bk-menu.js"),
21
+ "bk-menu-item": () => import("../bk-menu-item.js")
22
+ }, "bk-menu", "bk-menu-item"), C = (e, t) => e.value || String(t), w = class extends n {
23
+ static shadowRootOptions = {
24
+ ...n.shadowRootOptions,
25
+ slotAssignment: "manual"
26
+ };
27
+ static properties = {
28
+ value: {
29
+ reflect: !0,
30
+ useDefault: !0
31
+ },
32
+ variant: {
33
+ reflect: !0,
34
+ useDefault: !0
35
+ },
36
+ size: {
37
+ reflect: !0,
38
+ useDefault: !0
39
+ },
40
+ orientation: {
41
+ reflect: !0,
42
+ useDefault: !0
43
+ },
44
+ activation: {},
45
+ label: {},
46
+ persistKey: { attribute: "persist-key" },
47
+ addable: {
48
+ type: Boolean,
49
+ reflect: !0
50
+ },
51
+ addLabel: { attribute: "add-label" },
52
+ overflow: {
53
+ reflect: !0,
54
+ useDefault: !0
55
+ },
56
+ overflowed: { state: !0 },
57
+ menuOpen: { state: !0 }
58
+ };
59
+ menuTabs = [];
60
+ stopKey;
61
+ revealed = !1;
62
+ internals = this.attachInternals();
63
+ i18n = new h(this);
64
+ resizer = o(() => this.measure());
65
+ sizes;
66
+ tabs = [];
67
+ panels = [];
68
+ others = [];
69
+ ends = [];
70
+ restored;
71
+ authored;
72
+ stored = new g(this, () => !this.linkMode && this.persistKey && `tabs:${this.persistKey}`, { onChange: (e) => {
73
+ this.authored ??= this.value, e === void 0 ? this.value = this.authored : typeof e == "string" && this.tabs.some((t, n) => !t.disabled && C(t, n) === e) && (this.value = e);
74
+ } });
75
+ observer = s((e) => {
76
+ e.some((e) => e.type === "childList" || e.target.parentElement === this) && this.requestUpdate();
77
+ });
78
+ constructor() {
79
+ super(), this.value = "", this.variant = "underline", this.size = "md", this.orientation = "horizontal", this.activation = "automatic", this.overflowed = [], this.menuOpen = !1, this.overflow = "menu", this.addable = !1, this.addEventListener("remove", this.onRemove), this.addEventListener("click", this.onClick), this.addEventListener("beforematch", this.onFound), this.addEventListener("keydown", this.onKeydown), this.addEventListener("focusout", this.onFocusout);
80
+ }
81
+ connectedCallback() {
82
+ super.connectedCallback(), this.observer.observe(this, {
83
+ childList: !0,
84
+ subtree: !0,
85
+ attributes: !0,
86
+ attributeFilter: [
87
+ "value",
88
+ "href",
89
+ "disabled",
90
+ "slot",
91
+ "dot"
92
+ ]
93
+ }), this.requestUpdate();
94
+ }
95
+ disconnectedCallback() {
96
+ super.disconnectedCallback(), this.observer.disconnect(), this.resizer.disconnect();
97
+ }
98
+ get linkMode() {
99
+ return this.tabs.some((e) => !!e.href);
100
+ }
101
+ static styles = [
102
+ v,
103
+ y,
104
+ r`
105
+ /* In a container with a height (a bk-pane) the tabs fill it and hand the rest to the selected panel; otherwise as tall as their content. */
106
+ :host {
107
+ display: flex; flex-direction: column; block-size: 100%; min-height: 0;
108
+ --_bk-tabs-panel-padding: var(--bk-space-4) 0 0;
109
+ --_bk-tab-indicator-inset: auto 0 0 0;
110
+ --_bk-tab-indicator-scale: 0.4 1;
111
+ --_bk-tab-h: var(--bk-tabs-tab-height-md, var(--bk-control-md));
112
+ --_bk-tab-px: var(--bk-tabs-tab-padding-md, var(--bk-space-3));
113
+ --_bk-tab-fs: var(--bk-tabs-tab-font-size-md, var(--bk-type-body));
114
+ --_bk-tab-icon: var(--bk-control-icon-md);
115
+ }
116
+ :host([size="sm"]) {
117
+ --_bk-tab-h: var(--bk-tabs-tab-height-sm, var(--bk-control-sm));
118
+ --_bk-tab-px: var(--bk-tabs-tab-padding-sm, var(--bk-space-2));
119
+ --_bk-tab-fs: var(--bk-tabs-tab-font-size-sm, var(--bk-type-small));
120
+ --_bk-tab-icon: var(--bk-control-icon-sm);
121
+ }
122
+ :host([size="lg"]) {
123
+ --_bk-tab-h: var(--bk-tabs-tab-height-lg, var(--bk-control-lg));
124
+ --_bk-tab-px: var(--bk-tabs-tab-padding-lg, var(--bk-space-4));
125
+ --_bk-tab-fs: var(--bk-tabs-tab-font-size-lg, var(--bk-type-lead));
126
+ --_bk-tab-icon: var(--bk-control-icon-lg);
127
+ }
128
+ .tabs { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
129
+ .bar {
130
+ position: relative; display: flex; align-items: center; gap: var(--bk-space-cluster); min-width: 0;
131
+ box-shadow: inset 0 calc(-1 * var(--bk-tabs-border-width, var(--bk-border-width))) 0 var(--bk-tabs-border, var(--bk-line));
132
+ }
133
+ .list {
134
+ display: flex; flex: 1; min-width: 0; gap: var(--bk-tabs-gap, var(--bk-space-1));
135
+ position: relative; overflow-x: hidden;
136
+ }
137
+ /* A tab that does not fit leaves the row but keeps its size, so the row can measure it. */
138
+ /* overflow="scroll": the row scrolls sideways, without a visible scroll bar. */
139
+ :host([overflow="scroll"]:not([orientation="vertical"])) .list {
140
+ overflow-x: auto; scrollbar-width: none; overscroll-behavior-inline: contain; scroll-snap-type: inline proximity;
141
+ }
142
+ :host([overflow="scroll"]) ::slotted(bk-tabs-item) { scroll-snap-align: start; }
143
+ :host([overflow="scroll"]) .more { display: none; }
144
+ .more { flex: none; display: flex; align-items: center; margin-inline-start: calc(var(--bk-tabs-more-gap, var(--bk-space-cluster)) - var(--bk-space-cluster)); }
145
+ /* Until bk-menu loads, only its trigger shows: the entries are not text in the row. */
146
+ .more:not(:defined) > :not([slot="trigger"]) { display: none; }
147
+ .more.off { position: absolute; inset-block-start: 0; inset-inline-end: 0; visibility: hidden; pointer-events: none; }
148
+ :host([orientation="vertical"]) .more { display: none; }
149
+ .end { display: flex; align-items: center; gap: var(--bk-space-cluster); flex: none; }
150
+ .add {
151
+ flex: none; display: inline-grid; place-items: center; inline-size: var(--bk-tabs-add-size, var(--_bk-tab-h)); block-size: var(--bk-tabs-add-size, var(--_bk-tab-h));
152
+ padding: 0; margin: 0; border: 0; background: none; font: inherit; color: var(--bk-tabs-add-fg, var(--bk-text-muted));
153
+ border-radius: var(--bk-tabs-add-radius, var(--bk-radius-sm));
154
+ --_bk-interactive-hover: var(--bk-tabs-add-hover-bg, var(--bk-hover)); --_bk-interactive-pressed: var(--bk-tabs-tab-pressed-bg, var(--bk-pressed));
155
+ --bk-icon-size: var(--_bk-tab-icon);
156
+ }
157
+ .panels { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
158
+ /* Only the selected panel takes the rest. A closed panel (hidden="until-found") stays in the flow and has no height. */
159
+ .panels ::slotted(bk-tabs-panel:not([hidden])) { flex: 1; min-height: 0; }
160
+
161
+ :host([orientation="vertical"]) {
162
+ --_bk-tabs-panel-padding: 0 0 0 var(--bk-space-5);
163
+ --_bk-tab-indicator-inset: 0 0 0 auto;
164
+ --_bk-tab-indicator-block: auto;
165
+ --_bk-tab-indicator-inline: var(--bk-tabs-indicator-width, var(--bk-indicator-width));
166
+ --_bk-tab-indicator-scale: 1 0.4;
167
+ --_bk-tab-justify: flex-start;
168
+ /* The tab is a grid: mark, start, label, end. The end column lines up in the list. */
169
+ --_bk-tab-display: grid;
170
+ --_bk-tab-columns: auto auto minmax(0, 1fr) auto;
171
+ --_bk-tab-row: 1;
172
+ --_bk-tab-col-mark: 1;
173
+ --_bk-tab-col-start: 2;
174
+ --_bk-tab-col-label: 3;
175
+ --_bk-tab-col-end: 4;
176
+ --_bk-tab-mark-gap: var(--bk-tabs-tab-gap, var(--bk-space-2));
177
+ --_bk-tab-column-gap: 0;
178
+ }
179
+ :host([orientation="vertical"]:state(dots)) {
180
+ --_bk-tab-columns: calc(var(--bk-tabs-dot-size, var(--bk-space-2)) + var(--bk-tabs-tab-gap, var(--bk-space-2))) auto minmax(0, 1fr) auto;
181
+ --_bk-tab-dot-gap: 0;
182
+ }
183
+ :host([orientation="vertical"]:dir(rtl)) { --_bk-tabs-panel-padding: 0 var(--bk-space-5) 0 0; --_bk-tab-indicator-inset: 0 auto 0 0; }
184
+ :host(:not([variant="pills"])) { --_bk-tab-radius-es: 0; --_bk-tab-radius-ee: 0; }
185
+ :host(:not([variant="pills"])[orientation="vertical"]) { --_bk-tab-radius-es: initial; --_bk-tab-radius-se: 0; }
186
+ :host([orientation="vertical"]) .tabs { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; }
187
+ :host([orientation="vertical"]) .bar {
188
+ flex-direction: column; align-items: stretch; box-shadow: none;
189
+ border-inline-end: var(--bk-tabs-border-width, var(--bk-border-width)) solid var(--bk-tabs-border, var(--bk-line));
190
+ }
191
+ :host([orientation="vertical"]) .list { flex-direction: column; overflow: visible; }
192
+ :host([orientation="vertical"]) .end { flex-direction: column; align-items: stretch; }
193
+
194
+ :host([variant="pills"]) {
195
+ --_bk-tab-indicator-display: none;
196
+ --_bk-tab-radius: var(--bk-tabs-pill-radius, var(--bk-radius-md));
197
+ --_bk-tab-bg-selected: var(--bk-tabs-pill-bg, var(--bk-accent-soft));
198
+ --_bk-tab-fg-selected: var(--bk-tabs-pill-fg, var(--bk-accent-text));
199
+ }
200
+ :host([variant="pills"]) .bar { box-shadow: none; border: 0; }
201
+ :host([variant="pills"][orientation="vertical"]) { --_bk-tabs-panel-padding: 0 0 0 var(--bk-space-4); }
202
+ @media (forced-colors: active) {
203
+ .bar { border-block-end: var(--bk-border-width) solid CanvasText; }
204
+ :host([variant="pills"]) .bar { border: 0; }
205
+ }
206
+ `
207
+ ];
208
+ willUpdate(e) {
209
+ super.willUpdate(e), this.tabs = [], this.panels = [], this.others = [], this.ends = [];
210
+ for (let e of c(this)?.children ?? []) e.getAttribute("slot") === "end" ? this.ends.push(e) : e instanceof b ? this.tabs.push(e) : e instanceof x ? this.panels.push(e) : this.others.push(e);
211
+ this.internals.states[this.tabs.some((e) => e.dot || e.hasAttribute("dot")) ? "add" : "delete"]("dots");
212
+ let t = this.tabs.filter((e) => !e.disabled);
213
+ if (this.persistKey && this.persistKey !== this.restored && this.tabs.length && !this.linkMode) {
214
+ this.restored = this.persistKey;
215
+ let e = this.stored.value;
216
+ typeof e == "string" && t.some((t) => C(t, this.tabs.indexOf(t)) === e) && (this.value = e);
217
+ }
218
+ !this.tabs.some((e, t) => C(e, t) === this.value) && t.length && !this.linkMode && (this.value = C(t[0], this.tabs.indexOf(t[0])));
219
+ let n = this.overflowFor();
220
+ (n.length !== this.overflowed.length || n.some((e, t) => e !== this.overflowed[t])) && (this.overflowed = n), this.overflowed.length && S.start();
221
+ }
222
+ async getUpdateComplete() {
223
+ let e = await super.getUpdateComplete();
224
+ return this.overflowed.length && await S.start(), e;
225
+ }
226
+ updated(e) {
227
+ super.updated(e);
228
+ let t = this.renderRoot;
229
+ t.querySelector("slot[name=tab]")?.assign(...this.tabs), t.querySelector("slot[name=panel]")?.assign(...this.panels, ...this.others), t.querySelector("slot[name=end]")?.assign(...this.ends);
230
+ let n = t.querySelector(".bar");
231
+ for (let e of [
232
+ n,
233
+ t.querySelector(".more"),
234
+ t.querySelector(".end"),
235
+ ...this.tabs
236
+ ]) e && this.resizer.observe(e);
237
+ this.syncTabs();
238
+ let r = this.linkMode, i = new Map(this.tabs.map((e, t) => [C(e, t), e]));
239
+ this.panels.forEach((e, t) => {
240
+ let n = C(e, t);
241
+ e.setTab(r ? null : i.get(n) ?? null), e.hasAttribute("tabindex") || (e.tabIndex = 0), n === this.value ? e.removeAttribute("hidden") : e.getAttribute("hidden") !== "until-found" && e.setAttribute("hidden", "until-found");
242
+ });
243
+ let a = !this.revealed;
244
+ (a || e.has("value") || e.has("overflow")) && this.revealSelected(a);
245
+ }
246
+ syncTabs() {
247
+ let e = this.linkMode, t = new Set(this.overflowed), n = new Map(this.panels.map((e, t) => [C(e, t), e])), r = this.stopKey ?? this.value;
248
+ this.tabs.forEach((i, a) => {
249
+ let o = C(i, a);
250
+ i.setTabState({
251
+ tab: !e,
252
+ selected: o === this.value,
253
+ tabStop: !e && o === r,
254
+ controls: e ? null : n.get(o) ?? null,
255
+ overflow: t.has(i)
256
+ });
257
+ });
258
+ }
259
+ revealSelected(e) {
260
+ if (this.overflow !== "scroll" || this.orientation === "vertical") return;
261
+ let t = this.tabs.find((e, t) => C(e, t) === this.value);
262
+ t && (this.revealed = !0, Promise.all(this.tabs.map((e) => e.updateComplete)).then(() => {
263
+ let n = this.renderRoot?.querySelector(".list");
264
+ if (!n || !t.isConnected || n.scrollWidth <= n.clientWidth) return;
265
+ let r = n.getBoundingClientRect(), i = t.getBoundingClientRect(), a = i.left < r.left ? i.left - r.left : i.right > r.right ? Math.min(i.right - r.right, i.left - r.left) : 0;
266
+ if (!a) return;
267
+ let o = e || matchMedia("(prefers-reduced-motion: reduce)").matches;
268
+ n.scrollBy({
269
+ left: a,
270
+ behavior: o ? "instant" : "smooth"
271
+ });
272
+ }));
273
+ }
274
+ tabFrom(e) {
275
+ let t = e?.closest?.("bk-tabs-item");
276
+ return t instanceof b && t.parentElement === this ? t : null;
277
+ }
278
+ select(e) {
279
+ if (e.disabled) return !0;
280
+ let t = C(e, this.tabs.indexOf(e));
281
+ return t === this.value ? !0 : f(this, "select", {
282
+ value: t,
283
+ previous: this.value
284
+ }, !0) ? (this.value = t, this.stopKey = void 0, e.href || this.stored.set(t), p(this, "change"), !0) : !1;
285
+ }
286
+ onFound = (e) => {
287
+ let t = e.target;
288
+ if (!(t instanceof x) || t.parentElement !== this) return;
289
+ let n = C(t, this.panels.indexOf(t)), r = this.tabs.find((e, t) => C(e, t) === n);
290
+ r && this.select(r);
291
+ };
292
+ onClick = (e) => {
293
+ let t = this.tabFrom(e.target);
294
+ if (t) {
295
+ if (t.disabled) e.preventDefault();
296
+ else if (t.href) {
297
+ if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) return;
298
+ this.select(t) || e.preventDefault(), m(t, e);
299
+ } else t.focus(), this.select(t);
300
+ }
301
+ };
302
+ onKeydown = (e) => {
303
+ let t = this.tabFrom(e.target);
304
+ if (!t || this.linkMode) return;
305
+ let n = this.orientation === "vertical", r = this.matches(":dir(rtl)"), i = n ? "ArrowUp" : r ? "ArrowRight" : "ArrowLeft", a = n ? "ArrowDown" : r ? "ArrowLeft" : "ArrowRight";
306
+ if (e.key === "Delete" && t.removable) {
307
+ e.preventDefault(), t.requestRemove();
308
+ return;
309
+ }
310
+ let o = new Set(this.overflowed), s = this.tabs.filter((e) => !e.disabled && !o.has(e));
311
+ if (!s.length) return;
312
+ let c, l = s.indexOf(t);
313
+ switch (e.key) {
314
+ case i:
315
+ c = s[(l - 1 + s.length) % s.length];
316
+ break;
317
+ case a:
318
+ c = s[(l + 1) % s.length];
319
+ break;
320
+ case "Home":
321
+ c = s[0];
322
+ break;
323
+ case "End":
324
+ c = s[s.length - 1];
325
+ break;
326
+ case "Enter":
327
+ case " ":
328
+ e.preventDefault(), this.select(t);
329
+ return;
330
+ default: return;
331
+ }
332
+ e.preventDefault(), this.stopKey = C(c, this.tabs.indexOf(c)), this.syncTabs(), c.focus(), this.activation !== "manual" && this.select(c);
333
+ };
334
+ onFocusout = (e) => {
335
+ this.linkMode || this.tabFrom(e.relatedTarget) || this.stopKey === void 0 || (this.stopKey = void 0, this.syncTabs());
336
+ };
337
+ measure() {
338
+ let e = this.renderRoot, t = e?.querySelector(".bar"), n = e?.querySelector(".list"), r = e?.querySelector(".more");
339
+ if (!t || !n || !r) return;
340
+ let i = parseFloat(getComputedStyle(n).columnGap) || 0, a = parseFloat(getComputedStyle(t).columnGap) || 0, o = e.querySelector(".end"), s = t.clientWidth > 0 ? t.clientWidth - (o ? o.offsetWidth + a : 0) : 0, c = new Map(this.tabs.map((e) => [e, e.offsetWidth])), l = this.sizes, u = l && l.room === s && l.more === r.offsetWidth + a && l.gap === i && l.widths.size === c.size && [...c].every(([e, t]) => l.widths.get(e) === t);
341
+ this.sizes = {
342
+ room: s,
343
+ more: r.offsetWidth + a,
344
+ gap: i,
345
+ widths: c
346
+ }, u || this.requestUpdate();
347
+ }
348
+ overflowFor() {
349
+ let e = this.sizes;
350
+ if (!e || e.room <= 0 || this.orientation === "vertical" || this.overflow === "scroll" || this.tabs.length < 2) return [];
351
+ let t = this.tabs.map((t) => e.widths.get(t) ?? 0);
352
+ if (t.reduce((e, t) => e + t, 0) + e.gap * (t.length - 1) <= e.room) return [];
353
+ let n = e.room - e.more, r = this.tabs.findIndex((e, t) => C(e, t) === this.value), i = /* @__PURE__ */ new Set(), a = 0;
354
+ r >= 0 && (i.add(r), a = t[r]);
355
+ for (let r = 0; r < this.tabs.length; r++) {
356
+ if (i.has(r)) continue;
357
+ let o = a + (i.size ? e.gap : 0) + t[r];
358
+ if (o > n) break;
359
+ i.add(r), a = o;
360
+ }
361
+ return this.tabs.filter((e, t) => !i.has(t));
362
+ }
363
+ tabOfEntry(e) {
364
+ let t = e.composedPath().find((e) => e instanceof Element && e.localName === "bk-menu-item");
365
+ return t ? this.tabs.find((e, n) => C(e, n) === t.value) : void 0;
366
+ }
367
+ onMoreClick = (e) => {
368
+ let t = this.tabOfEntry(e);
369
+ t?.href && !t.disabled && (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0 || this.select(t) || e.preventDefault());
370
+ };
371
+ onMoreNavigate = (e) => {
372
+ let t = this.tabOfEntry(e);
373
+ t && (e.stopPropagation(), f(t, "navigate", e.detail, !0) || e.preventDefault());
374
+ };
375
+ onMoreSelect = (e) => {
376
+ e.stopPropagation();
377
+ let t = this.tabs.find((t, n) => C(t, n) === e.detail.value);
378
+ t && ((t.href ? C(t, this.tabs.indexOf(t)) !== this.value : !this.select(t)) || this.updateComplete.then(() => requestAnimationFrame(() => t.focus())));
379
+ };
380
+ onMoreOpen = () => {
381
+ this.menuTabs = this.overflowed, this.menuOpen = !0;
382
+ };
383
+ onMoreClose = () => {
384
+ setTimeout(() => {
385
+ this.menuOpen = !1;
386
+ });
387
+ };
388
+ onRemove = (e) => {
389
+ let t = this.tabFrom(e.target);
390
+ t && queueMicrotask(() => {
391
+ e.defaultPrevented || this.removeTab(t);
392
+ });
393
+ };
394
+ removeTab(e) {
395
+ let t = this.tabs.indexOf(e);
396
+ if (t < 0) return;
397
+ let n = C(e, t), r = this.panels.find((e, t) => C(e, t) === n), i = d(e, u()), a = n === this.value, o = this.tabs.map((e, t) => ({
398
+ t: e,
399
+ j: t
400
+ })).filter(({ t }) => t !== e && !t.disabled), s = o.find(({ j: e }) => e > t) ?? o.at(-1), c = s ? s.t.value || String(s.j > t ? s.j - 1 : s.j) : "";
401
+ e.remove(), r?.remove(), a && (this.value = c, s && p(this, "change")), i && s && this.updateComplete.then(() => s.t.focus());
402
+ }
403
+ render() {
404
+ let n = this.orientation === "vertical", r = this.linkMode ? e`<nav class="list" part="tablist" aria-label=${i(this.label)}><slot name="tab"></slot></nav>` : e`<div class="list" part="tablist" role="tablist" aria-orientation=${n ? "vertical" : "horizontal"}
405
+ aria-label=${i(this.label)}><slot name="tab"></slot></div>`, o = this.menuOpen ? this.menuTabs : this.overflowed, s = e`<bk-menu class="more ${o.length ? "" : "off"}" part="more" placement="bottom-end" @select=${this.onMoreSelect}
406
+ @click=${{
407
+ handleEvent: this.onMoreClick,
408
+ capture: !0
409
+ }} @navigate=${this.onMoreNavigate} @open=${this.onMoreOpen} @close=${this.onMoreClose}>
410
+ <bk-button slot="trigger" variant="ghost" size=${this.size} icon="more-horiz" label=${this.i18n.t("more")}></bk-button>
411
+ ${a(o, (e) => e, (t) => e`<bk-menu-item value=${C(t, this.tabs.indexOf(t))} icon=${i(t.icon)} ?disabled=${t.disabled}
412
+ href=${i(t.href)} target=${i(t.target)} rel=${i(t.rel)} download=${i(t.download)}>${t.text}</bk-menu-item>`)}
413
+ </bk-menu>`, c = this.addable ? e`<button class="add interactive" part="add" type="button" title=${this.addLabel || this.i18n.t("tabAdd")}
414
+ aria-label=${this.addLabel || this.i18n.t("tabAdd")} @click=${() => p(this, "add")}><bk-icon name="add"></bk-icon></button>` : t;
415
+ return e`<div class="tabs">
416
+ <div class="bar" part="bar">${r}${s}${this.ends.length || this.addable ? e`<div class="end">${c}<slot name="end"></slot></div>` : t}</div>
417
+ <div class="panels" part="panels"><slot name="panel"></slot></div>
418
+ </div>`;
419
+ }
420
+ };
421
+ l("bk-tabs", w);
422
+ export { w as t };
@@ -1,9 +1,9 @@
1
1
  import { a as e, n as t, t as n, u as r } from "./lit-D8x-qXgH.js";
2
2
  import { t as i } from "./style-map-BMvn17E7.js";
3
3
  import { t as a } from "./repeat-Dxf3qZZl.js";
4
- import { t as o } from "./define-DkVeu7e9.js";
4
+ import { t as o } from "./define-6OfuRn5c.js";
5
5
  import { t as s } from "./i18n-DFfGgd3d.js";
6
- import { i as c, n as l } from "./announcer-D1zrRWwO.js";
6
+ import { i as c, n as l } from "./announcer-6tMlCOq1.js";
7
7
  import { r as u } from "./events-DQ4e9cPN.js";
8
8
  import { t as d, x as f } from "./styles-CaeyhYDA.js";
9
9
  import "../bk-button.js";
@@ -1,5 +1,5 @@
1
1
  import { a as e, n as t, u as n } from "./lit-D8x-qXgH.js";
2
- import { t as r } from "./announcer-D1zrRWwO.js";
2
+ import { t as r } from "./announcer-6tMlCOq1.js";
3
3
  import { t as i } from "./loading-B37QBUkv.js";
4
4
  import "../bk-spinner.js";
5
5
  // dist/internal/busy.js
@@ -1,13 +1,13 @@
1
1
  import { a as e, d as t, u as n } from "./lit-D8x-qXgH.js";
2
2
  import { o as r, t as i } from "./anchor-CNX3nt2F.js";
3
3
  import { t as a } from "./events-DQ4e9cPN.js";
4
- import { a as o, c as s, d as c, i as l, l as u, o as d, s as f, t as p } from "./options-BdC8-KKM.js";
4
+ import { a as o, c as s, d as c, i as l, l as u, o as d, s as f, t as p } from "./options-ySaDL-dW.js";
5
5
  import { n as m, t as h } from "./sheet-BFSt2x3d.js";
6
6
  import { b as g, y as _ } from "./styles-CaeyhYDA.js";
7
- import { t as v } from "./text-field-CqhJSAwZ.js";
7
+ import { t as v } from "./text-field-CufOGdfr.js";
8
8
  import { t as y } from "./scroll-CB6-StUs.js";
9
- import { n as b, t as x } from "./virtual-C_h6sHnm.js";
10
- import { r as S } from "./define-DkVeu7e9.js";
9
+ import { n as b, t as x } from "./virtual-D-qgACnE.js";
10
+ import { i as S } from "./define-6OfuRn5c.js";
11
11
  // dist/internal/choice-field.js
12
12
  var C = 0;
13
13
  function w(e) {
@@ -7,8 +7,8 @@ import { o as d, t as f } from "./anchor-CNX3nt2F.js";
7
7
  import { t as p } from "./events-DQ4e9cPN.js";
8
8
  import { n as m, t as h } from "./sheet-BFSt2x3d.js";
9
9
  import { b as g, y as _ } from "./styles-CaeyhYDA.js";
10
- import { t as v } from "./text-field-CqhJSAwZ.js";
11
- import "./bk-icon-Bp_flKdv.js";
10
+ import { t as v } from "./text-field-CufOGdfr.js";
11
+ import "./bk-icon-D4kI4F18.js";
12
12
  import { r as y } from "./submit-BjBGB8OW.js";
13
13
  import "./calendar-Bbk8blkz.js";
14
14
  // dist/internal/date-field.js
@@ -0,0 +1,60 @@
1
+ import { c as e } from "./lit-D8x-qXgH.js";
2
+ import { t } from "./tokens-C_ul7pL9.js";
3
+ // dist/internal/server.js
4
+ function n(e) {
5
+ return new ResizeObserver(e);
6
+ }
7
+ function r(e) {
8
+ return new MutationObserver(e);
9
+ }
10
+ function i(e) {
11
+ return e;
12
+ }
13
+ var a = /* @__PURE__ */ new WeakSet(), o = "hydrate-internals-";
14
+ function s(t) {
15
+ let n = t.prototype;
16
+ if (a.has(n)) return;
17
+ a.add(n);
18
+ let r = n.createRenderRoot;
19
+ n.createRenderRoot = function() {
20
+ let t = this.shadowRoot;
21
+ if (!t) return r.call(this);
22
+ for (let e of this.getAttributeNames()) e.startsWith(o) && (this.removeAttribute(e.slice(18)), this.removeAttribute(e));
23
+ return t.replaceChildren(), e(t, this.constructor.elementStyles), t;
24
+ };
25
+ }
26
+ // dist/internal/elements.js
27
+ var c = "accordion accordion-item action-bar alert alert-offline app-state attachment avatar avatar-group badge bar brand breadcrumbs button button-copy button-group button-share button-top calendar calendar-event calendar-week card carousel carousel-controls carousel-item chart-area chart-bar chart-bar-list chart-bridge chart-bullet chart-calendar chart-heatmap chart-histogram chart-legend chart-line chart-mark chart-scatter chart-sparkline chart-stacked-bar chart-tracker chart-waterfall checkbox checkbox-group chip chip-group cluster code code-diff code-stack color-panel columns combobox command-menu command-palette composer delta diagram dialog disclosure divider drawer drop-target empty-state error-summary facts facts-item feature fieldset filter-bar folder-browser footnote footnotes footnotes-item form-guard form-steps grid icon icon-tile image-compare image-crop image-editor image-viewer input-code input-color input-date input-date-range input-file input-group input-inline input-number input-rating input-rich input-search input-slider input-slider-range input-tags input-text input-time input-time-zone item item-group kbd kbd-shortcuts lightbox lines link listbox listbox-columns listbox-item listbox-search listbox-transfer logo logo-wall menu menu-bar menu-context menu-divider menu-item menu-label menu-list message message-approval message-branches message-citation message-feedback message-list message-reasoning message-source message-tool message-tool-group meter model-viewer nav nav-divider nav-group nav-item nav-toc overflow page-cta page-footer page-footer-column page-header page-hero page-pager page-section pagination pane panel period-nav picture popover popover-help presence-cursor preview progress prose qr-code radio radio-group rating scroll segmented segmented-item select select-cascade select-tree shell-app shell-centered shell-sites skeleton sortable spinner split split-grid stack stat stat-group status-dot steps steps-item surface swatch swatch-group swatch-palette switch table tabs tabs-item tabs-panel tasks tasks-item testimonial text time-countdown time-relative timeline timeline-item toast toast-group toolbar tooltip tree tree-item video visually-hidden zoom";
28
+ // dist/internal/define.js
29
+ function l(e, n) {
30
+ t(), h(), customElements.get(e) || (s(n), customElements.define(e, n));
31
+ }
32
+ var u = 2e3, d = /* @__PURE__ */ new Set(), f, p, m = !1;
33
+ function h() {
34
+ m || typeof document > "u" || (clearTimeout(p), p = setTimeout(g, u));
35
+ }
36
+ function g() {
37
+ if (document.readyState !== "complete") {
38
+ p = setTimeout(g, u);
39
+ return;
40
+ }
41
+ m = !0;
42
+ let e = () => {
43
+ m = !1, _();
44
+ };
45
+ typeof requestIdleCallback == "function" ? requestIdleCallback(e, { timeout: u }) : setTimeout(e, 0);
46
+ }
47
+ function _(e = document) {
48
+ f ??= new Set(c.split(" ").map((e) => `bk-${e}`));
49
+ for (let t of e.querySelectorAll("*")) {
50
+ let e = t.localName;
51
+ if (e.startsWith("bk-") && f.has(e)) {
52
+ if (customElements.get(e)) t.shadowRoot && _(t.shadowRoot);
53
+ else {
54
+ if (d.has(e)) continue;
55
+ d.add(e), console.warn(`@bk2k/ui: <${e}> is in the page, but no code defines it. Add: import "@bk2k/ui/${e}.js";`);
56
+ }
57
+ }
58
+ }
59
+ }
60
+ export { n as a, r as i, d as n, i as r, l as t };
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./lit-D8x-qXgH.js";
2
2
  import { o as t, r as n, t as r } from "./i18n-DFfGgd3d.js";
3
- import { n as i } from "./define-DkVeu7e9.js";
3
+ import { r as i } from "./define-6OfuRn5c.js";
4
4
  import { t as a } from "./slots-BHTtBbPo.js";
5
5
  // dist/internal/number.js
6
6
  function o(e) {
@@ -1,56 +1,30 @@
1
1
  import { a as e, n as t, u as n } from "./lit-D8x-qXgH.js";
2
- // dist/internal/late.js
3
- var r = /* @__PURE__ */ new Set(), i = class {
4
- parts;
5
- loaded = !1;
6
- promise;
7
- tags;
8
- constructor(e, ...t) {
9
- this.parts = e, this.tags = t;
10
- }
11
- start() {
12
- if (!this.loaded) return this.promise ??= Promise.all(this.tags.map((e) => this.load(e))).then(() => {
13
- this.loaded = !0;
14
- }, (e) => {
15
- this.loaded = !0, console.error(e);
16
- }), this.promise;
17
- }
18
- load(e) {
19
- if (customElements.get(e)) return;
20
- let t = this.parts[e];
21
- if (t) return t();
22
- r.has(e) || (r.add(e), console.warn(`@bk2k/ui: a feature needs <${e}>, but no code defines it. Add: import "@bk2k/ui/${e}.js";`));
23
- }
24
- };
25
- function a(...e) {
26
- let t = e.filter((e) => !!e);
27
- return t.length ? Promise.all(t) : void 0;
28
- }
2
+ import { t as r } from "./late-CPQ_RbU-.js";
29
3
  // dist/internal/handle-menu.js
30
- var o = new i({
4
+ var i = new r({
31
5
  "bk-menu-context": () => import("../bk-menu-context.js"),
32
6
  "bk-menu-item": () => import("../bk-menu-item.js"),
33
7
  "bk-menu-divider": () => import("../bk-menu-divider.js")
34
8
  }, "bk-menu-context", "bk-menu-item", "bk-menu-divider");
35
- function s() {
36
- return o.start();
9
+ function a() {
10
+ return i.start();
37
11
  }
38
- function c(n, r) {
39
- return s(), e`<bk-menu-context class="handle-menu" label=${n} @select=${(e) => {
12
+ function o(n, r) {
13
+ return a(), e`<bk-menu-context class="handle-menu" label=${n} @select=${(e) => {
40
14
  e.stopPropagation(), r.find((t) => t.key === e.detail.value)?.run();
41
15
  }}>${r.map((n) => e`${n.divider ? e`<bk-menu-divider></bk-menu-divider>` : t}<bk-menu-item value=${n.key} ?disabled=${n.disabled}>${n.label}</bk-menu-item>`)}</bk-menu-context>`;
42
16
  }
43
- var l = n`
17
+ var s = n`
44
18
  .handle-menu { position: absolute; inset: 0 auto auto 0; inline-size: 0; block-size: 0; overflow: visible; }
45
19
  /* The menu loads late: until then its items stay out of view. */
46
20
  .handle-menu:not(:defined) { display: none; }
47
21
  `;
48
- async function u(e, t, n) {
49
- await s(), await e.updateComplete;
22
+ async function c(e, t, n) {
23
+ await a(), await e.updateComplete;
50
24
  let r = e.renderRoot.querySelector(".handle-menu");
51
25
  if (!r) return;
52
26
  await r.updateComplete;
53
27
  let i = t.getBoundingClientRect();
54
28
  await r.showAt(n?.x ?? i.left, n?.y ?? i.bottom, t);
55
29
  }
56
- export { i as a, u as i, l as n, a as o, s as r, c as t };
30
+ export { c as i, s as n, a as r, o as t };
@@ -1,4 +1,4 @@
1
- import { n as e } from "./define-DkVeu7e9.js";
1
+ import { r as e } from "./define-6OfuRn5c.js";
2
2
  // dist/internal/heading-text.js
3
3
  function t(t) {
4
4
  let n = e(t);
@@ -0,0 +1,20 @@
1
+ import { d as e, u as t } from "./lit-D8x-qXgH.js";
2
+ // dist/internal/hue.js
3
+ function n(e) {
4
+ let t = 0;
5
+ for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) >>> 0;
6
+ return t % 360;
7
+ }
8
+ function r(e) {
9
+ return {
10
+ bg: `light-dark(oklch(0.9 0.05 ${e}), oklch(0.36 0.06 ${e}))`,
11
+ fg: `light-dark(oklch(0.38 0.09 ${e}), oklch(0.9 0.06 ${e}))`
12
+ };
13
+ }
14
+ var i = r("var(--_bk-hue-h)"), a = t`
15
+ :host {
16
+ --_bk-hue-bg: ${e(i.bg)};
17
+ --_bk-hue-fg: ${e(i.fg)};
18
+ }
19
+ `;
20
+ export { a as n, n as t };