bitboss-ui 3.0.0-beta.73 → 3.0.0-beta.75

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 (345) hide show
  1. package/README.md +4 -2
  2. package/bin/bitboss-ui-mcp.mjs +101 -3
  3. package/bin/bitboss-ui.mjs +6 -1
  4. package/bin/cli.mjs +31 -5
  5. package/dist/ai/BbAvatar.md +86 -58
  6. package/dist/ai/BbBadge.md +5 -5
  7. package/dist/ai/BbBreadcrumbs.md +2 -2
  8. package/dist/ai/BbButton.md +2 -2
  9. package/dist/ai/BbCalendar.md +9 -5
  10. package/dist/ai/BbCheckboxGroup.md +5 -4
  11. package/dist/ai/BbColorInput.md +12 -0
  12. package/dist/ai/BbColorPalette.md +19 -15
  13. package/dist/ai/BbConfirmPortal.md +1 -1
  14. package/dist/ai/BbDatePicker.md +16 -3
  15. package/dist/ai/BbDatePickerInput.md +17 -1
  16. package/dist/ai/BbDialog.md +16 -4
  17. package/dist/ai/BbDropdown.md +175 -67
  18. package/dist/ai/BbDropdownButton.md +27 -8
  19. package/dist/ai/BbForm.md +4 -1
  20. package/dist/ai/BbHoverCardPortal.md +1 -1
  21. package/dist/ai/BbNumberInput.md +8 -4
  22. package/dist/ai/BbPopoverPortal.md +1 -1
  23. package/dist/ai/BbRadioGroup.md +4 -4
  24. package/dist/ai/BbSelect.md +79 -67
  25. package/dist/ai/BbSelectPopover.md +24 -5
  26. package/dist/ai/BbSwitchGroup.md +5 -4
  27. package/dist/ai/BbTable.md +59 -34
  28. package/dist/ai/BbTimePicker.md +16 -3
  29. package/dist/ai/BbTimePickerInput.md +15 -1
  30. package/dist/ai/BbToast.md +3 -2
  31. package/dist/ai/BbToastPortal.md +1 -1
  32. package/dist/ai/BbTree.md +5 -1
  33. package/dist/ai/CommonPopover.md +1 -0
  34. package/dist/ai/FlatListBox.md +1 -0
  35. package/dist/ai/GroupedListBox.md +1 -0
  36. package/dist/ai/ListBox.md +1 -0
  37. package/dist/ai/OptionsContainer.md +4 -4
  38. package/dist/ai/changelog.json +215 -6
  39. package/dist/ai/components.json +77 -43
  40. package/dist/ai/composables/useToast.md +2 -2
  41. package/dist/ai/design-tokens.json +60 -0
  42. package/dist/ai/guides/agent-contract.md +8 -4
  43. package/dist/ai/guides/design-tokens.md +33 -0
  44. package/dist/ai/guides/eslint-rules.md +1 -1
  45. package/dist/ai/guides/fetch-items-playbook.md +7 -11
  46. package/dist/ai/guides/inertia-helpers.md +613 -53
  47. package/dist/ai/guides/migration/adoption-checklist.md +5 -5
  48. package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
  49. package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
  50. package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
  51. package/dist/ai/guides/migration/components/bb-table.md +2 -1
  52. package/dist/ai/guides/migration/components/bb-toast.md +2 -2
  53. package/dist/ai/guides/migration/v2-to-v3.md +46 -5
  54. package/dist/ai/guides/migration/v3-beta-tooling.md +4 -0
  55. package/dist/ai/guides/passthrough.md +3 -3
  56. package/dist/ai/guides/preset-components.md +15 -2
  57. package/dist/ai/guides/reporting.md +49 -0
  58. package/dist/ai/helpers/inertia/manifest.json +33 -38
  59. package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
  60. package/dist/ai/helpers/inertia/useQuery.ts +24 -6
  61. package/dist/ai/helpers/inertia/utils.ts +552 -3
  62. package/dist/ai/index.md +2 -1
  63. package/dist/ai/manifest/common.json +1 -0
  64. package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
  65. package/dist/ai/manifest/components/BbAvatar.json +5 -2
  66. package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
  67. package/dist/ai/manifest/components/BbCalendar.json +2 -2
  68. package/dist/ai/manifest/components/BbCarousel.json +0 -3
  69. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  70. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
  71. package/dist/ai/manifest/components/BbColorInput.json +5 -2
  72. package/dist/ai/manifest/components/BbColorPalette.json +7 -4
  73. package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
  74. package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
  75. package/dist/ai/manifest/components/BbDatePicker.json +6 -3
  76. package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
  77. package/dist/ai/manifest/components/BbDialog.tree.json +7 -1
  78. package/dist/ai/manifest/components/BbDropdown.json +23 -17
  79. package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
  80. package/dist/ai/manifest/components/BbDropdown.tree.json +16 -5
  81. package/dist/ai/manifest/components/BbDropdownButton.json +15 -9
  82. package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
  83. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
  84. package/dist/ai/manifest/components/BbForm.json +1 -1
  85. package/dist/ai/manifest/components/BbHoverCard.json +1 -1
  86. package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
  87. package/dist/ai/manifest/components/BbNumberInput.json +1 -1
  88. package/dist/ai/manifest/components/BbOffCanvas.tree.json +2 -0
  89. package/dist/ai/manifest/components/BbPopover.json +1 -1
  90. package/dist/ai/manifest/components/BbPopoverPortal.json +1 -1
  91. package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
  92. package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
  93. package/dist/ai/manifest/components/BbSelect.json +10 -7
  94. package/dist/ai/manifest/components/BbSelectPopover.json +7 -4
  95. package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -1
  96. package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
  97. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
  98. package/dist/ai/manifest/components/BbTable.json +6 -6
  99. package/dist/ai/manifest/components/BbTable.tree.json +16 -6
  100. package/dist/ai/manifest/components/BbTimePicker.json +7 -4
  101. package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
  102. package/dist/ai/manifest/components/BbToastPortal.json +1 -1
  103. package/dist/ai/manifest/components/BbTree.json +1 -1
  104. package/dist/ai/manifest/components/CommonPopover.json +2 -1
  105. package/dist/ai/manifest/components/FlatListBox.json +2 -1
  106. package/dist/ai/manifest/components/GroupedListBox.json +2 -1
  107. package/dist/ai/manifest/components/ListBox.json +2 -1
  108. package/dist/ai/manifest/components/OptionsContainer.json +6 -4
  109. package/dist/ai/manifest/index.json +2 -2
  110. package/dist/ai/manifest/meta.json +36 -3
  111. package/dist/ai/manifest/types.advanced.json +81 -80
  112. package/dist/ai/manifest/types.api.json +64 -65
  113. package/dist/ai/manifest/types.wrapper.json +155 -118
  114. package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
  115. package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
  116. package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
  117. package/dist/ai/source/BbAlert.md +16 -4
  118. package/dist/ai/source/BbAvatar.md +121 -9
  119. package/dist/ai/source/BbBadge.md +12 -5
  120. package/dist/ai/source/BbBreadcrumbs.md +56 -55
  121. package/dist/ai/source/BbButton.md +41 -25
  122. package/dist/ai/source/BbCalendar.md +22 -12
  123. package/dist/ai/source/BbCarousel.md +31 -28
  124. package/dist/ai/source/BbCheckboxGroup.md +15 -9
  125. package/dist/ai/source/BbColorInput.md +19 -0
  126. package/dist/ai/source/BbColorPalette.md +59 -12
  127. package/dist/ai/source/BbConfirm.md +7 -0
  128. package/dist/ai/source/BbConfirmPortal.md +9 -4
  129. package/dist/ai/source/BbDatePicker.md +71 -22
  130. package/dist/ai/source/BbDatePickerInput.md +72 -9
  131. package/dist/ai/source/BbDialog.md +45 -2
  132. package/dist/ai/source/BbDropdown.md +263 -63
  133. package/dist/ai/source/BbDropdownButton.md +27 -2
  134. package/dist/ai/source/BbDropdownGroup.md +121 -59
  135. package/dist/ai/source/BbForm.md +73 -6
  136. package/dist/ai/source/BbGallery.md +76 -55
  137. package/dist/ai/source/BbHost.md +12 -0
  138. package/dist/ai/source/BbHoverCard.md +7 -0
  139. package/dist/ai/source/BbHoverCardPortal.md +9 -5
  140. package/dist/ai/source/BbNumberInput.md +22 -16
  141. package/dist/ai/source/BbOffCanvas.md +48 -2
  142. package/dist/ai/source/BbPopover.md +7 -0
  143. package/dist/ai/source/BbPopoverPortal.md +9 -5
  144. package/dist/ai/source/BbRadio.md +4 -3
  145. package/dist/ai/source/BbRadioGroup.md +19 -10
  146. package/dist/ai/source/BbSelect.md +35 -20
  147. package/dist/ai/source/BbSelectPopover.md +116 -8
  148. package/dist/ai/source/BbSwitchGroup.md +11 -4
  149. package/dist/ai/source/BbTable.md +126 -32
  150. package/dist/ai/source/BbTag.md +10 -3
  151. package/dist/ai/source/BbTimePicker.md +69 -15
  152. package/dist/ai/source/BbTimePickerInput.md +45 -7
  153. package/dist/ai/source/BbToast.md +16 -2
  154. package/dist/ai/source/BbToastPortal.md +18 -6
  155. package/dist/ai/source/BbTree.md +1 -1
  156. package/dist/ai/source/CommonFieldInput.md +11 -5
  157. package/dist/ai/source/CommonPopover.md +28 -2
  158. package/dist/ai/source/FlatListBox.md +26 -5
  159. package/dist/ai/source/GroupedListBox.md +63 -11
  160. package/dist/ai/source/ListBox.md +4 -0
  161. package/dist/ai/source/OptionsContainer.md +29 -11
  162. package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
  163. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
  164. package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +61 -43
  165. package/dist/components/BbAvatar/avatarIdentity.js +25 -0
  166. package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
  167. package/dist/components/BbAvatar/types.d.ts +24 -5
  168. package/dist/components/BbAvatar/types.js +5 -1
  169. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
  170. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +80 -79
  171. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +152 -158
  172. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
  173. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
  174. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +235 -234
  175. package/dist/components/BbCalendar/types.d.ts +2 -2
  176. package/dist/components/BbCalendar/useDayGrid.js +120 -123
  177. package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
  178. package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +7 -7
  179. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
  180. package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
  181. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
  182. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
  183. package/dist/components/BbColorInput/types.d.ts +7 -0
  184. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
  185. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +239 -223
  186. package/dist/components/BbColorPalette/types.d.ts +8 -1
  187. package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
  188. package/dist/components/BbConfirm/types.d.ts +5 -0
  189. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +4 -2
  190. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +160 -143
  191. package/dist/components/BbDatePicker/types.d.ts +9 -2
  192. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
  193. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +483 -496
  194. package/dist/components/BbDatePickerInput/types.d.ts +7 -0
  195. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +252 -236
  196. package/dist/components/BbDialog/leaveGhost.js +38 -0
  197. package/dist/components/BbDialog/overlayActions.js +34 -20
  198. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +92 -87
  199. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
  200. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +419 -368
  201. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +384 -340
  202. package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
  203. package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
  204. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +133 -119
  205. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +73 -45
  206. package/dist/components/BbDropdown/normalizeGroups.js +6 -2
  207. package/dist/components/BbDropdown/ptKeys.generated.d.ts +8 -0
  208. package/dist/components/BbDropdown/types.d.ts +73 -58
  209. package/dist/components/BbDropdown/types.js +1 -0
  210. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -0
  211. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -72
  212. package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +48 -0
  213. package/dist/components/BbDropdownButton/types.d.ts +13 -2
  214. package/dist/components/BbDropdownButton/types.js +2 -0
  215. package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
  216. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
  217. package/dist/components/BbForm/types.d.ts +31 -0
  218. package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +318 -296
  219. package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
  220. package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
  221. package/dist/components/BbHoverCard/types.d.ts +5 -0
  222. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +10 -6
  223. package/dist/components/BbNumberInput/numberDisplay.js +102 -106
  224. package/dist/components/BbNumberInput/types.d.ts +4 -3
  225. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +425 -409
  226. package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
  227. package/dist/components/BbPopover/types.d.ts +5 -0
  228. package/dist/components/BbRadio/types.d.ts +4 -3
  229. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -106
  230. package/dist/components/BbRadioGroup/types.d.ts +4 -7
  231. package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -1
  232. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +167 -163
  233. package/dist/components/BbSelect/types.d.ts +23 -20
  234. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +3 -1
  235. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +680 -637
  236. package/dist/components/BbSelectPopover/types.d.ts +10 -4
  237. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
  238. package/dist/components/BbSwitchGroup/types.d.ts +3 -6
  239. package/dist/components/BbTable/BbTable.vue.d.ts +1 -3
  240. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1182 -1165
  241. package/dist/components/BbTable/BbTableDataRow.js +96 -96
  242. package/dist/components/BbTable/types.d.ts +11 -10
  243. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
  244. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
  245. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +157 -140
  246. package/dist/components/BbTimePicker/types.d.ts +9 -2
  247. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +3 -1
  248. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +278 -268
  249. package/dist/components/BbTimePickerInput/types.d.ts +7 -0
  250. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +12 -12
  251. package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
  252. package/dist/components/BbToast/types.d.ts +7 -2
  253. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
  254. package/dist/components/BbTree/types.d.ts +1 -1
  255. package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
  256. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +14 -2
  257. package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
  258. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +115 -96
  259. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +194 -166
  260. package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
  261. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
  262. package/dist/composables/formSubmitLock.js +2 -1
  263. package/dist/composables/overlayRegistry.js +52 -42
  264. package/dist/composables/useActiveInactiveState.js +8 -4
  265. package/dist/composables/useBbDialog.js +5 -5
  266. package/dist/composables/useItemsGetter.js +34 -32
  267. package/dist/composables/useOpenModel.js +20 -0
  268. package/dist/composables/useOwnModel.js +16 -0
  269. package/dist/composables/useSegmentedFields.js +31 -20
  270. package/dist/deprecation/ai-deprecations.json.js +1 -1
  271. package/dist/i18n/currencyDigits.js +58 -0
  272. package/dist/i18n/locales/ar.json +2 -0
  273. package/dist/i18n/locales/cs.json +2 -0
  274. package/dist/i18n/locales/da.json +2 -0
  275. package/dist/i18n/locales/de-CH.json +2 -0
  276. package/dist/i18n/locales/de.json +2 -0
  277. package/dist/i18n/locales/el.json +2 -0
  278. package/dist/i18n/locales/en-GB.json +2 -0
  279. package/dist/i18n/locales/en.json +2 -0
  280. package/dist/i18n/locales/es-MX.json +2 -0
  281. package/dist/i18n/locales/es.json +2 -0
  282. package/dist/i18n/locales/fa.json +2 -0
  283. package/dist/i18n/locales/fi.json +2 -0
  284. package/dist/i18n/locales/fr.json +2 -0
  285. package/dist/i18n/locales/he.json +2 -0
  286. package/dist/i18n/locales/hu.json +2 -0
  287. package/dist/i18n/locales/it.json +2 -0
  288. package/dist/i18n/locales/ja.json +2 -0
  289. package/dist/i18n/locales/ko.json +2 -0
  290. package/dist/i18n/locales/nb.json +2 -0
  291. package/dist/i18n/locales/nl.json +2 -0
  292. package/dist/i18n/locales/pl.json +2 -0
  293. package/dist/i18n/locales/pt-BR.json +2 -0
  294. package/dist/i18n/locales/pt-PT.json +2 -0
  295. package/dist/i18n/locales/ro.json +2 -0
  296. package/dist/i18n/locales/ru.json +2 -0
  297. package/dist/i18n/locales/sv.json +2 -0
  298. package/dist/i18n/locales/tr.json +2 -0
  299. package/dist/i18n/locales/uk.json +2 -0
  300. package/dist/i18n/locales/zh-CN.json +2 -0
  301. package/dist/i18n/locales/zh-HK.json +2 -0
  302. package/dist/i18n/locales/zh-TW.json +2 -0
  303. package/dist/i18n/regionDates.js +250 -0
  304. package/dist/i18n/regionHints.js +30 -41
  305. package/dist/icon-scan.js +68 -61
  306. package/dist/index.d.ts +35 -31
  307. package/dist/llms-full.txt +1428 -400
  308. package/dist/llms-medium.txt +8 -4
  309. package/dist/llms.txt +4 -2
  310. package/dist/locale-blueprint.json +2 -0
  311. package/dist/styles.css +2 -2
  312. package/dist/types/ActionButton.d.ts +2 -1
  313. package/dist/types/CommonProps.d.ts +8 -0
  314. package/dist/types/Option.d.ts +10 -0
  315. package/dist/types/ptComponentMap.d.ts +3 -3
  316. package/dist/utilities/functions/hash.js +97 -64
  317. package/dist/utilities/functions/isEqual.js +33 -25
  318. package/dist/utilities/functions/slotContent.js +19 -0
  319. package/dist/utils/loadRetry.js +8 -0
  320. package/dist/utils/versionCheck.js +1 -1
  321. package/dist/vite-plugin.d.ts +2 -1
  322. package/dist/vite.js +11 -4
  323. package/llms.txt +4 -2
  324. package/package.json +3 -2
  325. package/scripts/README.md +3 -1
  326. package/scripts/lib/adoption-checklist.json +6 -5
  327. package/scripts/lib/agent-manifest.mjs +33 -6
  328. package/scripts/lib/agent-setup.mjs +90 -24
  329. package/scripts/lib/cldr-pins.ts +182 -0
  330. package/scripts/lib/engines-include.d.mts +5 -0
  331. package/scripts/lib/engines-include.mjs +40 -0
  332. package/scripts/lib/eslint-plugin.mjs +8 -2
  333. package/scripts/lib/hidden-label-placeholder.mjs +25 -5
  334. package/scripts/lib/idiom-scan.mjs +30 -3
  335. package/scripts/lib/legacy-agent-files.json +152 -0
  336. package/scripts/lib/mcp-config.mjs +74 -7
  337. package/scripts/lib/portal-names.mjs +78 -8
  338. package/scripts/lib/release-results.mjs +5 -2
  339. package/scripts/lib/report.mjs +340 -0
  340. package/scripts/lib/run-beat.mjs +14 -0
  341. package/scripts/lib/run-records.mjs +313 -0
  342. package/scripts/lib/selector-log.mjs +98 -0
  343. package/scripts/lib/ticket-beat.mjs +30 -0
  344. package/scripts/lib/validate-bb-markup.mjs +37 -2
  345. package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
@@ -1,47 +1,50 @@
1
1
  import { closeOnRelease as e } from "../../utils/releasedActivator.js";
2
2
  import { asSheetAttrs as t } from "../BbOffCanvas/sheetAttrs.js";
3
3
  import { useId as n } from "../../composables/useId.js";
4
- import { isTopEscapeEntry as r, pushEscapeEntry as i, removeEscapeEntry as a } from "../../utils/overlayEscapeStack.js";
5
- import { useBbDropdownHost as o } from "../../composables/useBbDropdown.js";
6
- import { useLogger as s } from "../../composables/useLogger.js";
4
+ import { useOwnModel as r } from "../../composables/useOwnModel.js";
5
+ import { isTopEscapeEntry as i, pushEscapeEntry as a, removeEscapeEntry as o } from "../../utils/overlayEscapeStack.js";
6
+ import { useBbDropdownHost as s } from "../../composables/useBbDropdown.js";
7
+ import { useLogger as c } from "../../composables/useLogger.js";
7
8
  import { useMobile as ee } from "../../composables/useMobile.js";
8
9
  import { provideSheetSurface as te } from "../../composables/useSheetSurface.js";
9
10
  import { useUntil as ne } from "../../composables/useUntil.js";
10
11
  import { useClosingInert as re } from "../../composables/useClosingInert.js";
11
12
  import { useConfigDefaults as ie, useConfigSetting as ae } from "../../composables/useConfigDefaults.js";
12
- import { wait as c } from "../../utilities/functions/wait.js";
13
+ import { wait as l } from "../../utilities/functions/wait.js";
13
14
  import { registerDropdownHandle as oe } from "./dropdownHandle.js";
14
15
  import { focusQuietly as se } from "../../utils/focusVisibility.js";
15
16
  import ce from "../CommonPopover/CommonPopover.vue.js";
16
17
  import le from "./BbDropdownList.vue.js";
17
- import ue from "./AdaptiveDropdown.vue.js";
18
- import de from "./DropdownPipelineResolver.vue.js";
19
- import { hash as fe } from "../../utilities/functions/hash.js";
20
- import { readableValue as pe } from "../../utilities/functions/readableValue.js";
21
- import { settlesVisible as me } from "../../utilities/functions/settlesVisible.js";
22
- import { domElement as he, extractDomContainer as ge } from "../../utilities/functions/extractDomContainer.js";
23
- import { parseWidthString as _e } from "../../utilities/functions/parseWidthString.js";
24
- import { levelHasSearch as ve, normalizeGroups as ye } from "./normalizeGroups.js";
25
- import { provideDropdownContext as be } from "./useDropdownContext.js";
26
- import { provideDropdownGroupRegistry as xe } from "./useDropdownGroupRegistry.js";
27
- import { BB_DROPDOWN_PT as Se, groupItemsAsArray as l, isGroup as u, isPrimitiveRow as d, isSelectableGroup as Ce } from "./types.js";
28
- import { usePassthrough as we, variantPt as f } from "../../composables/usePassthrough.js";
29
- import { withoutClass as Te } from "../../utils/passthrough.js";
30
- import { transitions as Ee } from "../../utilities/misc/transitions.js";
31
- import { removedPropsFor as De } from "../../deprecation/removedProps.js";
32
- import { warnRemovedAttrs as Oe } from "../../utilities/functions/warnRemovedAttrs.js";
33
- import { Fragment as ke, computed as p, createBlock as Ae, createCommentVNode as m, createElementBlock as h, createElementVNode as je, defineComponent as g, guardReactiveProps as Me, mergeProps as _, normalizeProps as Ne, onBeforeUnmount as Pe, onDeactivated as Fe, onMounted as Ie, openBlock as v, reactive as y, ref as b, renderList as Le, renderSlot as x, toDisplayString as Re, unref as S, useSlots as ze, useTemplateRef as Be, watch as C, withCtx as Ve } from "vue";
34
- import { useElementSize as He, useIntersectionObserver as Ue } from "@vueuse/core";
18
+ import ue from "./DropdownFailures.vue.js";
19
+ import { runRetry as de } from "../../utils/loadRetry.js";
20
+ import fe from "./AdaptiveDropdown.vue.js";
21
+ import pe from "./DropdownPipelineResolver.vue.js";
22
+ import { hash as me } from "../../utilities/functions/hash.js";
23
+ import { readableValue as he } from "../../utilities/functions/readableValue.js";
24
+ import { settlesVisible as ge } from "../../utilities/functions/settlesVisible.js";
25
+ import { domElement as _e, extractDomContainer as ve } from "../../utilities/functions/extractDomContainer.js";
26
+ import { parseWidthString as ye } from "../../utilities/functions/parseWidthString.js";
27
+ import { levelHasSearch as be, normalizeGroups as xe } from "./normalizeGroups.js";
28
+ import { provideDropdownContext as Se } from "./useDropdownContext.js";
29
+ import { provideDropdownGroupRegistry as Ce } from "./useDropdownGroupRegistry.js";
30
+ import { BB_DROPDOWN_PT as we, groupItemsAsArray as u, isGroup as d, isPrimitiveRow as f, isSelectableGroup as Te } from "./types.js";
31
+ import { usePassthrough as Ee, variantPt as p } from "../../composables/usePassthrough.js";
32
+ import { withoutClass as De } from "../../utils/passthrough.js";
33
+ import { transitions as Oe } from "../../utilities/misc/transitions.js";
34
+ import { removedPropsFor as ke } from "../../deprecation/removedProps.js";
35
+ import { warnRemovedAttrs as Ae } from "../../utilities/functions/warnRemovedAttrs.js";
36
+ import { Fragment as je, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as Me, createVNode as Ne, defineComponent as v, getCurrentInstance as Pe, guardReactiveProps as Fe, mergeProps as y, normalizeProps as Ie, onBeforeUnmount as Le, onDeactivated as Re, onMounted as ze, openBlock as b, reactive as x, ref as S, renderList as Be, renderSlot as Ve, shallowRef as He, toDisplayString as Ue, unref as C, useSlots as We, useTemplateRef as Ge, watch as w, withCtx as Ke } from "vue";
37
+ import { useElementSize as qe, useIntersectionObserver as Je } from "@vueuse/core";
35
38
  // src/components/BbDropdown/BbDropdown.vue?vue&type=script&setup=true&lang.ts
36
- var We = [
39
+ var Ye = [
37
40
  "id",
38
41
  "aria-labelledby",
39
42
  "role"
40
- ], Ge = {
43
+ ], Xe = {
41
44
  class: "bb-sr-only",
42
45
  role: "status"
43
- }, Ke = "bb-dropdown:open", qe = 500, Je = 10, w = /*@__PURE__*/ g({
44
- mixins: [f(Se)],
46
+ }, Ze = "bb-dropdown:open", Qe = 500, $e = 10, T = /*@__PURE__*/ v({
47
+ mixins: [p(we)],
45
48
  inheritAttrs: !1,
46
49
  __name: "BbDropdown",
47
50
  props: {
@@ -55,6 +58,8 @@ var We = [
55
58
  "pt:header:open": {},
56
59
  "pt:footer": {},
57
60
  "pt:footer:open": {},
61
+ "pt:box": {},
62
+ "pt:box:open": {},
58
63
  "pt:input": {},
59
64
  "pt:input:open": {},
60
65
  "pt:list": {},
@@ -116,6 +121,10 @@ var We = [
116
121
  default: void 0
117
122
  },
118
123
  anchor: {},
124
+ modelValue: {
125
+ type: Boolean,
126
+ default: void 0
127
+ },
119
128
  boundary: {},
120
129
  disabled: { type: Boolean },
121
130
  eager: { type: Boolean },
@@ -131,11 +140,12 @@ var We = [
131
140
  padding: { default: 10 },
132
141
  placement: { default: "bottom" },
133
142
  queryDebounceTime: { default: 300 },
134
- transitionDuration: { default: Ee.fast },
143
+ transitionDuration: { default: Oe.fast },
135
144
  trigger: { default: "click" },
136
145
  width: { default: "auto" }
137
146
  },
138
147
  emits: [
148
+ "update:modelValue",
139
149
  "show",
140
150
  "shown",
141
151
  "hide",
@@ -143,56 +153,56 @@ var We = [
143
153
  "item:selected",
144
154
  "item:unselected"
145
155
  ],
146
- setup(f, { emit: Ee }) {
147
- let g = f, w = Ee, Ye = ae(null, "popoverOffset"), T = we({
156
+ setup(p, { emit: Oe }) {
157
+ let v = p, T = Oe, et = ae(null, "popoverOffset"), E = Ee({
148
158
  component: "BbDropdown",
149
- props: g,
150
- parts: Se.parts,
151
- states: Se.states,
152
- active: { open: () => j.value },
153
- variant: Se.variant
159
+ props: v,
160
+ parts: we.parts,
161
+ states: we.states,
162
+ active: { open: () => A.value },
163
+ variant: we.variant
154
164
  });
155
- process.env.NODE_ENV !== "production" && Oe("BbDropdown", De("BbDropdown"));
156
- let Xe = s(), Ze = n().id.value, E = g.id ?? `bb_${Ze}`, D = Symbol("bb-dropdown-escape"), O = b(E), k = b(), A = p(() => ge(k.value)), Qe = p(() => g.activator != null), j = b(!1), $e = {
157
- onShow: () => w("show"),
158
- onShown: () => w("shown"),
159
- onHide: () => w("hide"),
160
- onHidden: () => w("hidden")
161
- }, et = ne(j, { initialValue: g.eager }), tt = re(j, () => g.transitionDuration), nt = p(() => g.eager || !tt.value), rt = ({ availableHeight: e }) => _({
162
- id: z.value ? `dialog_${E}` : void 0,
165
+ process.env.NODE_ENV !== "production" && Ae("BbDropdown", ke("BbDropdown"));
166
+ let tt = c(), nt = n().id.value, D = v.id ?? `bb_${nt}`, rt = Symbol("bb-dropdown-escape"), O = S(D), k = S(), it = m(() => ve(k.value)), at = m(() => v.activator != null), A = S(!1), ot = {
167
+ onShow: () => T("show"),
168
+ onShown: () => T("shown"),
169
+ onHide: () => T("hide"),
170
+ onHidden: () => T("hidden")
171
+ }, st = ne(A, { initialValue: v.eager }), ct = re(A, () => v.transitionDuration), lt = m(() => v.eager || !ct.value), ut = ({ availableHeight: e }) => y({
172
+ id: z.value ? `dialog_${D}` : void 0,
163
173
  "aria-labelledby": z.value ? O.value : void 0,
164
- class: ["bb-dropdown__panel", { "bb-dropdown__panel--reserve-check": Cn.value }],
165
- "data-bb-dropdown-surface": E,
166
- inert: tt.value,
174
+ class: ["bb-dropdown__panel", { "bb-dropdown__panel--reserve-check": Ln.value }],
175
+ "data-bb-dropdown-surface": D,
176
+ inert: ct.value,
167
177
  role: z.value ? "dialog" : void 0,
168
178
  style: {
169
- "--w": Tn.value,
179
+ "--w": zn.value,
170
180
  "--max-h": e == null ? void 0 : `${e}px`
171
181
  }
172
- }, T.panel), it = y({}), at = y(/* @__PURE__ */ new Set()), { isMobile: ot } = ee(), st = ie("BbDropdown", g, {
182
+ }, E.panel), dt = x({}), ft = x(/* @__PURE__ */ new Set()), { isMobile: pt } = ee(), mt = ie("BbDropdown", v, {
173
183
  adaptive: !0,
174
184
  compact: !1
175
- }), ct = () => st.adaptive && ot.value ? "canvas" : "popover", lt = b(ct()), M = p(() => lt.value === "canvas");
176
- C([
177
- () => st.adaptive,
178
- ot,
179
- j
185
+ }), ht = () => mt.adaptive && pt.value ? "canvas" : "popover", gt = S(ht()), j = m(() => gt.value === "canvas");
186
+ w([
187
+ () => mt.adaptive,
188
+ pt,
189
+ A
180
190
  ], () => {
181
- j.value || (lt.value = ct());
182
- }), te(M);
183
- let ut = p(() => ({
191
+ A.value || (gt.value = ht());
192
+ }), te(j);
193
+ let _t = m(() => ({
184
194
  side: "bottom",
185
195
  size: "auto",
186
196
  draggable: !0,
187
- eager: g.eager,
188
- transitionDuration: g.transitionDuration,
197
+ eager: v.eager,
198
+ transitionDuration: v.transitionDuration,
189
199
  hideClose: !0,
190
- ...g.offCanvasProps
191
- })), dt = p(() => {
192
- let e = g.trigger;
200
+ ...v.offCanvasProps
201
+ })), vt = m(() => {
202
+ let e = v.trigger;
193
203
  return new Set(Array.isArray(e) ? e : [e]);
194
- }), ft = (e, t) => {
195
- let n = A.value, r = n?.getBoundingClientRect(), i = r ? e - r.left : 0, a = r ? t - r.top : 0;
204
+ }), yt = (e, t) => {
205
+ let n = it.value, r = n?.getBoundingClientRect(), i = r ? e - r.left : 0, a = r ? t - r.top : 0;
196
206
  return {
197
207
  contextElement: n ?? void 0,
198
208
  getBoundingClientRect: () => {
@@ -212,56 +222,58 @@ var We = [
212
222
  };
213
223
  }
214
224
  };
215
- }, N = b(null), pt = p(() => g.anchor ?? k.value), mt = p(() => ge(pt.value)), ht = p(() => g.placement === "cursor" && N.value ? N.value : pt.value), gt = (e) => {
216
- let t = ge(e);
225
+ }, M = S(null), bt = m(() => v.anchor ?? k.value), xt = m(() => ve(bt.value)), St = Pe(), Ct = He(null);
226
+ ze(() => Ct.value = St?.vnode.el?.parentElement ?? null);
227
+ let wt = m(() => (xt.value ?? Ct.value)?.closest(".bb-table") ?? void 0), Tt = m(() => v.placement === "cursor" && M.value ? M.value : bt.value), Et = (e) => {
228
+ let t = ve(e);
217
229
  t && (k.value = t);
218
- }, _t = !1, { resume: vt, pause: yt } = Ue(() => he(A.value), async ([{ intersectionRatio: e }]) => {
219
- if (_t) {
220
- _t = !1;
230
+ }, Dt = !1, { resume: Ot, pause: kt } = Je(() => _e(it.value), async ([{ intersectionRatio: e }]) => {
231
+ if (Dt) {
232
+ Dt = !1;
221
233
  return;
222
234
  }
223
- if (e >= .99 || !j.value) return;
224
- let t = A.value;
225
- t && await me(t) || j.value && await $();
235
+ if (e >= .99 || !A.value) return;
236
+ let t = it.value;
237
+ t && await ge(t) || A.value && await $();
226
238
  }, {
227
239
  threshold: [0, 1],
228
240
  immediate: !1
229
- }), P = y({}), bt = y(/* @__PURE__ */ new Map()), F = y(/* @__PURE__ */ new Map()), I = /* @__PURE__ */ new Map(), xt = /* @__PURE__ */ new Map(), St = !1, Ct = (e) => !!I.get(e)?.controlled(), L = (e, t) => I.get(e)?.request(t), R = (e, t) => {
241
+ }), N = x({}), At = x(/* @__PURE__ */ new Map()), P = x(/* @__PURE__ */ new Map()), F = /* @__PURE__ */ new Map(), jt = /* @__PURE__ */ new Map(), Mt = !1, Nt = (e) => !!F.get(e)?.controlled(), I = (e, t) => F.get(e)?.request(t), L = (e, t) => {
230
242
  for (let n of e) {
231
- if (d(n)) continue;
232
- if (u(n)) {
243
+ if (f(n)) continue;
244
+ if (d(n)) {
233
245
  if (n.id === t) return n;
234
- for (let e of l(n.items)) {
246
+ for (let e of u(n.items)) {
235
247
  let n = Array.isArray(e) ? e : [e];
236
248
  for (let e of n) {
237
- let n = e.items ? R(e.items, t) : void 0;
249
+ let n = e.items ? L(e.items, t) : void 0;
238
250
  if (n) return n;
239
251
  }
240
252
  }
241
253
  continue;
242
254
  }
243
255
  if (Array.isArray(n)) {
244
- let e = R(n, t);
256
+ let e = L(n, t);
245
257
  if (e) return e;
246
258
  continue;
247
259
  }
248
- let e = n.items ? R(n.items, t) : void 0;
260
+ let e = n.items ? L(n.items, t) : void 0;
249
261
  if (e) return e;
250
262
  }
251
- }, wt = (e, t) => {
252
- for (let n of e) if (d(n)) {
263
+ }, R = (e, t) => {
264
+ for (let n of e) if (f(n)) {
253
265
  if (n === t) return "item";
254
266
  } else if (Array.isArray(n)) {
255
- let e = wt(n, t);
267
+ let e = R(n, t);
256
268
  if (e) return e;
257
- } else if (u(n)) {
269
+ } else if (d(n)) {
258
270
  if (n.id === t) return "group";
259
- for (let e of l(n.items)) {
271
+ for (let e of u(n.items)) {
260
272
  let n = Array.isArray(e) ? e : [e];
261
273
  for (let e of n) {
262
274
  if (e.value === t) return "item";
263
275
  if (e.items) {
264
- let n = wt(e.items, t);
276
+ let n = R(e.items, t);
265
277
  if (n) return n;
266
278
  }
267
279
  }
@@ -269,11 +281,11 @@ var We = [
269
281
  } else {
270
282
  if (n.value === t) return "item";
271
283
  if (n.items) {
272
- let e = wt(n.items, t);
284
+ let e = R(n.items, t);
273
285
  if (e) return e;
274
286
  }
275
287
  }
276
- }, Tt = p(() => Array.from(bt.values()).map((e) => e.value).sort((e, t) => e.order - t.order)), Et = (e, t) => ({
288
+ }, Pt = m(() => Array.from(At.values()).map((e) => e.value).sort((e, t) => e.order - t.order)), Ft = (e, t) => ({
277
289
  ...e,
278
290
  group: !0,
279
291
  id: e.id,
@@ -287,7 +299,7 @@ var We = [
287
299
  "append:icon": t["append:icon"] ?? e["append:icon"],
288
300
  variant: t.variant ?? e.variant,
289
301
  onClick: t.onClick ?? e.onClick
290
- }), Dt = (e, t) => ({
302
+ }), It = (e, t) => ({
291
303
  group: !0,
292
304
  id: e.key,
293
305
  label: e.label ?? t?.label,
@@ -300,10 +312,10 @@ var We = [
300
312
  "append:icon": e["append:icon"] ?? t?.["append:icon"],
301
313
  variant: e.variant ?? t?.variant,
302
314
  onClick: e.onClick ?? t?.onClick
303
- }), Ot = (e, t) => {
315
+ }), Lt = (e, t) => {
304
316
  let n = !1, r = (e) => {
305
317
  if (!e.items) return e;
306
- let r = Ot(e.items, t);
318
+ let r = Lt(e.items, t);
307
319
  return r.found ? (n = !0, {
308
320
  ...e,
309
321
  items: r.items
@@ -311,57 +323,57 @@ var We = [
311
323
  };
312
324
  return {
313
325
  items: e.map((e) => {
314
- if (u(e)) {
315
- if (e.id === t.id) return n = !0, Et(e, t);
326
+ if (d(e)) {
327
+ if (e.id === t.id) return n = !0, Ft(e, t);
316
328
  if (typeof e.items == "function") return e;
317
- let i = l(e.items).map((e) => Array.isArray(e) ? e.map((e) => r(e)) : r(e));
329
+ let i = u(e.items).map((e) => Array.isArray(e) ? e.map((e) => r(e)) : r(e));
318
330
  return {
319
331
  ...e,
320
332
  items: i
321
333
  };
322
334
  }
323
335
  if (Array.isArray(e)) {
324
- let r = Ot(e, t);
336
+ let r = Lt(e, t);
325
337
  return r.found && (n = !0), r.items;
326
338
  }
327
- return d(e) ? e : r(e);
339
+ return f(e) ? e : r(e);
328
340
  }),
329
341
  found: n
330
342
  };
331
- }, kt = p(() => {
332
- let e = [...g.items ?? []];
333
- for (let t of Tt.value) {
334
- let n = R(e, t.key);
335
- !n && !t.items?.length && (wt(e, t.key) === "item" && Xe.throw(`[BbDropdownGroup] "${t.key}" refers to a menu item, not a selectable group. \`<BbDropdownGroup>\` can only attach to a group (an entry with \`selectable\`, \`multiple\`, or \`group: true\`). Point \`id\` at a group \`id\`.`), Xe.throw(`[BbDropdownGroup] Missing minimum config for group "${t.key}". Provide \`items\`, \`selectable\`, \`multiple\`, or \`group\` keys in order to identify a group or define a baseline group with the same \`id\` in \`BbDropdown.items\`.`));
336
- let r = Dt(t, n), i = Ot(e, r);
343
+ }, Rt = m(() => {
344
+ let e = [...v.items ?? []];
345
+ for (let t of Pt.value) {
346
+ let n = L(e, t.key);
347
+ !n && !t.items?.length && (R(e, t.key) === "item" && tt.throw(`[BbDropdownGroup] "${t.key}" refers to a menu item, not a selectable group. \`<BbDropdownGroup>\` can only attach to a group (an entry with \`selectable\`, \`multiple\`, or \`group: true\`). Point \`id\` at a group \`id\`.`), tt.throw(`[BbDropdownGroup] Missing minimum config for group "${t.key}". Provide \`items\`, \`selectable\`, \`multiple\`, or \`group\` keys in order to identify a group or define a baseline group with the same \`id\` in \`BbDropdown.items\`.`));
348
+ let r = It(t, n), i = Lt(e, r);
337
349
  e = i.found ? i.items : [...i.items, r];
338
350
  }
339
351
  return e;
340
- }), At = (e) => {
341
- let t = P[e.id ?? ""] ?? [];
352
+ }), zt = (e) => {
353
+ let t = N[e.id ?? ""] ?? [];
342
354
  if (e.multiple || t.length || !e.id) return t;
343
- let n = V.value.includes(e.id), r = e.items.find((t) => !t.keyless && !t.placeholder && (n ? H[e.id]?.valueByKey.get(t.rowKey) === null : t.value === null));
355
+ let n = B.value.includes(e.id), r = e.items.find((t) => !t.keyless && !t.placeholder && (n ? V[e.id]?.valueByKey.get(t.rowKey) === null : t.value === null));
344
356
  return r ? [r.rowKey] : t;
345
- }, jt = p(() => ye(kt.value)), Mt = p(() => jt.value.map((e) => e.selectable ? {
357
+ }, Bt = m(() => xe(Rt.value)), Vt = m(() => Bt.value.map((e) => e.selectable ? {
346
358
  ...e,
347
- selected: At(e)
348
- } : e)), z = p(() => ve(Mt.value)), Nt = b(), Pt = p(() => z.value || M.value ? "dialog" : "menu"), Ft = p(() => z.value && !M.value ? `dialog_${E}` : `menu_${E}`), It = (e) => typeof e.items == "function" || e.itemText != null || e.itemProps != null || e.itemValue != null || e.max != null, B = (e, t = []) => {
349
- for (let n of e) if (!d(n)) {
350
- if (u(n)) {
351
- n.id && It(n) && t.push(n.id);
352
- for (let e of l(n.items)) for (let n of Array.isArray(e) ? e : [e]) n.items && B(n.items, t);
353
- } else Array.isArray(n) ? B(n, t) : n.items && B(n.items, t);
359
+ selected: zt(e)
360
+ } : e)), z = m(() => be(Vt.value)), Ht = S(), Ut = m(() => z.value || j.value ? "dialog" : "menu"), Wt = m(() => z.value && !j.value ? `dialog_${D}` : `menu_${D}`), Gt = (e) => typeof e.items == "function" || e.itemText != null || e.itemProps != null || e.itemValue != null || e.max != null, Kt = (e, t = []) => {
361
+ for (let n of e) if (!f(n)) {
362
+ if (d(n)) {
363
+ n.id && Gt(n) && t.push(n.id);
364
+ for (let e of u(n.items)) for (let n of Array.isArray(e) ? e : [e]) n.items && Kt(n.items, t);
365
+ } else Array.isArray(n) ? Kt(n, t) : n.items && Kt(n.items, t);
354
366
  }
355
367
  return t;
356
- }, V = p(() => B(g.items ?? [])), Lt = p(() => (g.items ?? []).filter((e) => u(e) && !!e.id && It(e)).map((e) => e.id)), H = y({}), Rt = y({}), zt = y({}), U = (e, t) => V.value.includes(e) ? H[e]?.valueByKey.get(t) : G(e)?.items.find((e) => e.rowKey === t && !e.keyless)?.value, W = (e) => {
357
- let t = R(g.items ?? [], e);
368
+ }, B = m(() => Kt(v.items ?? [])), qt = m(() => (v.items ?? []).filter((e) => d(e) && !!e.id && Gt(e)).map((e) => e.id)), V = x({}), Jt = x({}), Yt = x({}), Xt = x({}), H = (e, t) => B.value.includes(e) ? V[e]?.valueByKey.get(t) : U(e)?.items.find((e) => e.rowKey === t && !e.keyless)?.value, Zt = (e) => {
369
+ let t = L(v.items ?? [], e);
358
370
  if (t) return {
359
371
  multiple: t.multiple ?? !1,
360
- selectable: Ce(t)
372
+ selectable: Te(t)
361
373
  };
362
- }, G = (e) => {
374
+ }, U = (e) => {
363
375
  let t = (n) => {
364
- for (let r of ye(n)) {
376
+ for (let r of xe(n)) {
365
377
  if (r.id === e) return r;
366
378
  for (let e of r.items) if (e.items) {
367
379
  let n = t(e.items);
@@ -369,77 +381,80 @@ var We = [
369
381
  }
370
382
  }
371
383
  };
372
- return t(kt.value);
373
- }, Bt = (e, t) => fe(t), Vt = (e) => {
374
- if (F.has(e)) return F.get(e);
375
- let t = (P[e] ?? []).map((t) => U(e, t));
376
- return W(e)?.multiple ? t : t[0] ?? null;
377
- }, Ht = (e, t) => [].concat(F.get(e) ?? []).find((n) => Bt(e, n) === t);
378
- xe({
379
- bindController: (e, t) => I.set(e, t),
380
- unbindController: (e, t) => I.get(e) === t && (I.delete(e), !0),
384
+ return t(Rt.value);
385
+ }, Qt = (e, t) => me(t), $t = (e) => {
386
+ if (P.has(e)) return P.get(e);
387
+ let t = (N[e] ?? []).map((t) => H(e, t));
388
+ return Zt(e)?.multiple ? t : t[0] ?? null;
389
+ }, en = (e, t) => [].concat(P.get(e) ?? []).find((n) => Qt(e, n) === t);
390
+ Ce({
391
+ bindController: (e, t) => F.set(e, t),
392
+ unbindController: (e, t) => F.get(e) === t && (F.delete(e), !0),
381
393
  onPick: (e, t) => {
382
- t ? xt.set(e, t) : xt.delete(e);
394
+ t ? jt.set(e, t) : jt.delete(e);
383
395
  },
384
- isControlled: Ct,
385
- request: L,
386
- register: (e, t) => bt.set(e, t),
387
- unregister: (e) => bt.delete(e),
396
+ isControlled: Nt,
397
+ request: I,
398
+ register: (e, t) => At.set(e, t),
399
+ unregister: (e) => At.delete(e),
388
400
  seed: (e, t) => {
389
- e in P || (P[e] = t);
401
+ e in N || (N[e] = t);
390
402
  },
391
403
  setSelection: (e, t) => {
392
- St = !0;
404
+ Mt = !0;
393
405
  try {
394
- P[e] = t;
406
+ N[e] = t;
395
407
  } finally {
396
- St = !1;
408
+ Mt = !1;
397
409
  }
398
410
  },
399
- isAppWrite: () => St,
400
- selectionFor: (e) => P[e] ?? [],
401
- isPipeline: (e) => V.value.includes(e),
411
+ isAppWrite: () => Mt,
412
+ selectionFor: (e) => N[e] ?? [],
413
+ isPipeline: (e) => B.value.includes(e),
402
414
  publishPipeline: (e, t) => {
403
- t ? H[e] = t : delete H[e];
415
+ t ? V[e] = t : delete V[e];
404
416
  },
405
417
  publishLoading: (e, t) => {
406
- t ? Rt[e] = !0 : delete Rt[e];
418
+ t ? Jt[e] = !0 : delete Jt[e];
407
419
  },
408
420
  publishFetching: (e, t) => {
409
- t ? zt[e] = !0 : delete zt[e];
421
+ t ? Yt[e] = !0 : delete Yt[e];
422
+ },
423
+ publishFailure: (e, t) => {
424
+ t ? Xt[e] = t : delete Xt[e];
410
425
  },
411
426
  publishModel: (e, t) => {
412
- t === void 0 ? F.delete(e) : F.set(e, t);
427
+ t === void 0 ? P.delete(e) : P.set(e, t);
413
428
  },
414
- modelValueFor: Vt,
415
- valueForKey: U,
416
- keyForValue: Bt,
417
- itemForKey: (e, t) => H[e]?.itemByKey.get(t) ?? G(e)?.items.find((e) => e.rowKey === t),
418
- configFor: (e) => R(g.items ?? [], e),
419
- itemsFor: (e) => G(e)?.items ?? [],
420
- selectableFor: (e) => W(e)?.selectable,
421
- multipleFor: (e) => W(e)?.multiple
429
+ modelValueFor: $t,
430
+ valueForKey: H,
431
+ keyForValue: Qt,
432
+ itemForKey: (e, t) => V[e]?.itemByKey.get(t) ?? U(e)?.items.find((e) => e.rowKey === t),
433
+ configFor: (e) => L(v.items ?? [], e),
434
+ itemsFor: (e) => U(e)?.items ?? [],
435
+ selectableFor: (e) => Zt(e)?.selectable,
436
+ multipleFor: (e) => Zt(e)?.multiple
422
437
  });
423
- let Ut = b(!!ze().default);
424
- Ie(() => Ut.value = !1);
425
- let Wt = p(() => V.value.some((e) => !Tt.value.some((t) => t.key === e && Array.isArray(t.items)))), K = p(() => !Ut.value && !Wt.value && !jt.value.length), Gt = p(() => !!g.keepActivator || dt.value.has("contextMenu")), Kt = b(!1), qt = p(() => !K.value || Gt.value || Kt.value);
426
- C(K, (e) => {
438
+ let tn = S(!!We().default);
439
+ ze(() => tn.value = !1);
440
+ let nn = m(() => B.value.some((e) => !Pt.value.some((t) => t.key === e && Array.isArray(t.items)))), W = m(() => !tn.value && !nn.value && !Bt.value.length), rn = m(() => !!v.keepActivator || vt.value.has("contextMenu")), an = S(!1), on = m(() => !W.value || rn.value || an.value);
441
+ w(W, (e) => {
427
442
  if (!e) {
428
- Kt.value = !1;
443
+ an.value = !1;
429
444
  return;
430
445
  }
431
- if (j.value) {
432
- let e = !!document.activeElement?.closest(`[data-bb-dropdown-surface="${CSS.escape(E)}"]`);
433
- $(), e && rn();
446
+ if (A.value) {
447
+ let e = !!document.activeElement?.closest(`[data-bb-dropdown-surface="${CSS.escape(D)}"]`);
448
+ $(), e && q();
434
449
  }
435
- let t = A.value;
436
- if (Gt.value || !(t instanceof HTMLElement) || !t.contains(document.activeElement)) return;
437
- Kt.value = !0;
450
+ let t = it.value;
451
+ if (rn.value || !(t instanceof HTMLElement) || !t.contains(document.activeElement)) return;
452
+ an.value = !0;
438
453
  let n = (e) => {
439
- t.contains(e.relatedTarget) || (t.removeEventListener("focusout", n), Kt.value = !1);
454
+ t.contains(e.relatedTarget) || (t.removeEventListener("focusout", n), an.value = !1);
440
455
  };
441
456
  t.addEventListener("focusout", n);
442
- }), C([k, () => Qe.value && !qt.value], ([e, t], n, r) => {
457
+ }), w([k, () => at.value && !on.value], ([e, t], n, r) => {
443
458
  if (!t || !e) return;
444
459
  let { style: i } = e;
445
460
  if (!i) return;
@@ -448,27 +463,27 @@ var We = [
448
463
  i.getPropertyValue("display") === "none" && (a ? i.setProperty("display", a, o) : i.removeProperty("display"));
449
464
  });
450
465
  }, { immediate: !0 });
451
- let Jt = (e, t = []) => {
452
- for (let n of e) if (!d(n)) {
453
- if (u(n)) {
454
- n.id && Ce(n) && t.push(n.id);
455
- for (let e of l(n.items)) for (let n of Array.isArray(e) ? e : [e]) n.items && Jt(n.items, t);
456
- } else Array.isArray(n) ? Jt(n, t) : n.items && Jt(n.items, t);
466
+ let sn = (e, t = []) => {
467
+ for (let n of e) if (!f(n)) {
468
+ if (d(n)) {
469
+ n.id && Te(n) && t.push(n.id);
470
+ for (let e of u(n.items)) for (let n of Array.isArray(e) ? e : [e]) n.items && sn(n.items, t);
471
+ } else Array.isArray(n) ? sn(n, t) : n.items && sn(n.items, t);
457
472
  }
458
473
  return t;
459
- }, Yt = p(() => {
474
+ }, cn = m(() => {
460
475
  let e = {};
461
- for (let t of Jt(kt.value)) {
462
- let n = Vt(t), r = (W(t)?.multiple ? [].concat(n) : [n]).filter((e) => e != null), i = H[t], a = G(t), o = R(kt.value, t), { items: s, ...ee } = o ?? {};
476
+ for (let t of sn(Rt.value)) {
477
+ let n = $t(t), r = (Zt(t)?.multiple ? [].concat(n) : [n]).filter((e) => e != null), i = V[t], a = U(t), o = L(Rt.value, t), { items: s, ...c } = o ?? {};
463
478
  e[t] = {
464
- ...ee,
479
+ ...c,
465
480
  id: t,
466
481
  value: n,
467
482
  multiple: o?.multiple ?? !1,
468
- selectable: o ? Ce(o) : !1,
469
- loading: !!zt[t],
483
+ selectable: o ? Te(o) : !1,
484
+ loading: !!Yt[t],
470
485
  selectedOptions: r.map((e) => {
471
- let n = Bt(t, e), r = a?.items.find((e) => e.rowKey === n);
486
+ let n = Qt(t, e), r = a?.items.find((e) => e.rowKey === n);
472
487
  return {
473
488
  value: e,
474
489
  label: i?.textByKey.get(n) ?? r?.label,
@@ -480,304 +495,340 @@ var We = [
480
495
  }
481
496
  return e;
482
497
  });
483
- o(() => g.id, {
484
- open: () => j.value,
485
- empty: () => K.value,
486
- groups: () => Yt.value
498
+ s(() => v.id, {
499
+ open: () => A.value,
500
+ empty: () => W.value,
501
+ groups: () => cn.value
487
502
  });
488
- let Xt = (e, t) => {
503
+ let ln = (e, t) => {
489
504
  let n = e.id;
490
505
  if (!n) return;
491
- let r = At(e), i = new Set(r);
506
+ let r = zt(e), i = new Set(r);
492
507
  e.multiple ? i.has(t.rowKey) ? i.delete(t.rowKey) : i.add(t.rowKey) : i.has(t.rowKey) ? e.clearable && i.clear() : (i.clear(), i.add(t.rowKey));
493
- let a = [...i], o = a.filter((e) => !r.includes(e)), s = r.filter((e) => !a.includes(e)), ee = Ct(n);
494
- if (ee) {
495
- let r = U(n, t.rowKey);
496
- o.length && xt.get(n)?.(t.rowKey), e.multiple ? o.length ? L(n, { add: r }) : s.length && L(n, { remove: r }) : o.length ? L(n, { replace: r }) : s.length && L(n, { clear: !0 });
497
- } else P[n] = a;
498
- let te = (t) => e.items.find((e) => e.rowKey === t);
508
+ let a = [...i], o = a.filter((e) => !r.includes(e)), s = r.filter((e) => !a.includes(e)), c = Nt(n);
509
+ if (c) {
510
+ let r = H(n, t.rowKey);
511
+ o.length && jt.get(n)?.(t.rowKey), e.multiple ? o.length ? I(n, { add: r }) : s.length && I(n, { remove: r }) : o.length ? I(n, { replace: r }) : s.length && I(n, { clear: !0 });
512
+ } else N[n] = a;
513
+ let ee = (t) => e.items.find((e) => e.rowKey === t);
499
514
  o.forEach((e) => {
500
- te(e) && w("item:selected", U(n, e));
515
+ ee(e) && T("item:selected", H(n, e));
501
516
  }), s.forEach((e) => {
502
- te(e) ? w("item:unselected", U(n, e)) : ee && w("item:unselected", Ht(n, e));
503
- }), (o.length > 0 || s.length > 0 || r.includes(t.rowKey) && a.includes(t.rowKey)) && (g.closeOnSelect ?? !e.multiple) && tn();
504
- }, Zt = y(/* @__PURE__ */ new Set()), Qt = (e) => Zt.has(e), $t = p(() => Zt.size > 0), en = (e) => e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function", tn = async () => {
517
+ ee(e) ? T("item:unselected", H(n, e)) : c && T("item:unselected", en(n, e));
518
+ }), (o.length > 0 || s.length > 0 || r.includes(t.rowKey) && a.includes(t.rowKey)) && (v.closeOnSelect ?? !e.multiple) && mn();
519
+ }, un = x(/* @__PURE__ */ new Set()), dn = (e) => un.has(e), fn = m(() => un.size > 0), pn = (e) => e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function", mn = async () => {
505
520
  await $();
506
521
  let e = document.activeElement;
507
- e instanceof HTMLElement && e !== document.body && !e.closest(`[data-bb-dropdown-surface="${E}"]`) || rn();
508
- }, nn = async (e, t, { close: n = !1 } = {}) => {
522
+ e instanceof HTMLElement && e !== document.body && !e.closest(`[data-bb-dropdown-surface="${D}"]`) || q();
523
+ }, hn = async (e, t, { close: n = !1 } = {}) => {
509
524
  let r = e.onClick?.(t);
510
- if (n && await tn(), en(r)) {
511
- Zt.add(e.rowKey);
525
+ if (n && await mn(), pn(r)) {
526
+ un.add(e.rowKey);
512
527
  try {
513
528
  await r;
514
529
  } finally {
515
- Zt.delete(e.rowKey);
530
+ un.delete(e.rowKey);
516
531
  }
517
532
  }
518
- }, q = Be("root-list"), J, rn = () => {
519
- (k.value ?? (O.value ? document.getElementById(O.value) : null) ?? an)?.focus();
520
- }, an = null;
521
- be({
522
- passthrough: T,
523
- rootId: E,
533
+ }, G = Ge("root-list"), K, q = () => {
534
+ ((k.value?.isConnected ? k.value : void 0) ?? (O.value ? document.getElementById(O.value) : null) ?? gn)?.focus();
535
+ }, gn = null;
536
+ Se({
537
+ passthrough: E,
538
+ rootId: D,
524
539
  activatorId: O,
525
540
  setStatus: (e) => {
526
- Nt.value = e;
541
+ Ht.value = e;
542
+ },
543
+ status: Ht,
544
+ failures: m(() => Object.entries(Xt).filter(([e]) => qt.value.includes(e)).map(([e, { text: t }]) => ({
545
+ key: e,
546
+ text: t
547
+ }))),
548
+ retryFailure: (e, t) => {
549
+ let n = Xt[e];
550
+ if (!n) return;
551
+ let r = t.currentTarget?.closest("[data-bb-dropdown-surface], dialog");
552
+ de(t, n.retry, () => r?.querySelector(".bb-dropdown__search-input") ?? r);
527
553
  },
528
- status: Nt,
529
- open: j,
530
- queryFor: (e) => it[e] ?? "",
554
+ open: A,
555
+ queryFor: (e) => dt[e] ?? "",
531
556
  setQuery: (e, t) => {
532
- it[e] = t;
557
+ dt[e] = t;
533
558
  },
534
559
  activateGroup: (e) => {
535
- at.has(e) || at.add(e);
560
+ ft.has(e) || ft.add(e);
536
561
  },
537
- isActivated: (e) => at.has(e),
538
- isPipelineGroup: (e) => V.value.includes(e),
539
- isGroupLoading: (e) => !!Rt[e],
540
- isTopLevelPipeline: (e) => Lt.value.includes(e),
541
- queryDebounceTime: p(() => g.queryDebounceTime ?? 300),
562
+ isActivated: (e) => ft.has(e),
563
+ isPipelineGroup: (e) => B.value.includes(e),
564
+ isGroupLoading: (e) => !!Jt[e],
565
+ isTopLevelPipeline: (e) => qt.value.includes(e),
566
+ queryDebounceTime: m(() => v.queryDebounceTime ?? 300),
542
567
  selectedFor: (e) => {
543
- let t = G(e);
544
- return t ? At(t) : P[e] ?? [];
568
+ let t = U(e);
569
+ return t ? zt(t) : N[e] ?? [];
545
570
  },
546
- loadingText: p(() => g.loadingText),
547
- emptyText: p(() => g.emptyText),
548
- failedText: p(() => g.failedText),
549
- enforceCoherence: p(() => g.enforceCoherence),
550
- placement: p(() => g.placement),
551
- disabled: p(() => !!g.disabled),
571
+ loadingText: m(() => v.loadingText),
572
+ emptyText: m(() => v.emptyText),
573
+ failedText: m(() => v.failedText),
574
+ enforceCoherence: m(() => v.enforceCoherence),
575
+ placement: m(() => v.placement),
576
+ disabled: m(() => !!v.disabled),
552
577
  selectedChipsFor: (e) => {
553
- let t = G(e), n = H[e];
554
- return (P[e] ?? []).map((r) => ({
578
+ let t = U(e), n = V[e];
579
+ return (N[e] ?? []).map((r) => ({
555
580
  key: r,
556
- text: n?.textByKey.get(r) ?? t?.items.find((e) => e.rowKey === r)?.label ?? pe(U(e, r) ?? Ht(e, r))
581
+ text: n?.textByKey.get(r) ?? t?.items.find((e) => e.rowKey === r)?.label ?? he(H(e, r) ?? en(e, r))
557
582
  }));
558
583
  },
559
584
  deselect: (e, t) => {
560
- let n = P[e] ?? [];
585
+ let n = N[e] ?? [];
561
586
  if (n.includes(t)) {
562
- if (Ct(e)) {
563
- let n = U(e, t) ?? Ht(e, t);
564
- L(e, { remove: n }), w("item:unselected", n);
565
- } else P[e] = n.filter((e) => e !== t), w("item:unselected", U(e, t));
587
+ if (Nt(e)) {
588
+ let n = H(e, t) ?? en(e, t);
589
+ I(e, { remove: n }), T("item:unselected", n);
590
+ } else N[e] = n.filter((e) => e !== t), T("item:unselected", H(e, t));
566
591
  }
567
592
  },
568
593
  close: () => $(),
569
- focusActivator: rn,
570
- ownsEscape: () => r(D),
571
- openModality: () => J,
572
- toggleSelect: Xt,
573
- isItemLoading: Qt,
574
- runItemAction: nn,
575
- slots: ze()
594
+ focusActivator: q,
595
+ ownsEscape: () => i(rt),
596
+ openModality: () => K,
597
+ toggleSelect: ln,
598
+ isItemLoading: dn,
599
+ runItemAction: hn,
600
+ slots: We()
576
601
  });
577
- let on = (e) => {
578
- if (g.disabled || K.value) return;
579
- if (X) {
580
- X = !1, e.preventDefault(), e.stopPropagation();
602
+ let _n = (e) => {
603
+ if (v.disabled || W.value) return;
604
+ if (Y) {
605
+ Y = !1, e.preventDefault(), e.stopPropagation();
581
606
  return;
582
607
  }
583
- e.stopPropagation(), g.placement === "cursor" && (N.value = ft(e.clientX, e.clientY));
584
- let t = j.value;
585
- sn(e), J = e.detail ? "pointer" : void 0, t ? $() : Q();
586
- }, sn = (e) => {
608
+ e.stopPropagation(), v.placement === "cursor" && (M.value = yt(e.clientX, e.clientY));
609
+ let t = A.value;
610
+ vn(e), K = e.detail ? "pointer" : void 0, t ? $() : Q();
611
+ }, vn = (e) => {
587
612
  let t = e.currentTarget;
588
613
  e.detail && t instanceof HTMLElement && (t.contains(document.activeElement) || se(t, { preventScroll: !0 }));
589
- }, cn = async (e) => {
590
- if (!(g.disabled || K.value)) {
591
- if (e.preventDefault(), e.stopPropagation(), g.placement === "cursor") {
592
- let t = ft(e.clientX, e.clientY);
593
- if (j.value) {
594
- await $(), await c(g.transitionDuration), N.value = t, await Q();
614
+ }, yn = async (e) => {
615
+ if (!(v.disabled || W.value)) {
616
+ if (e.preventDefault(), e.stopPropagation(), v.placement === "cursor") {
617
+ let t = yt(e.clientX, e.clientY);
618
+ if (A.value) {
619
+ await $(), await l(v.transitionDuration), M.value = t, await Q();
595
620
  return;
596
621
  }
597
- N.value = t;
622
+ M.value = t;
598
623
  }
599
- j.value ? $() : Q();
624
+ A.value ? $() : Q();
600
625
  }
601
- }, ln, Y = null, X = !1, un = () => {
602
- clearTimeout(ln), Y = null;
603
- }, dn = (e) => {
604
- g.disabled || K.value || e.pointerType === "mouse" || (X = !1, Y = {
626
+ }, bn, J = null, Y = !1, xn = () => {
627
+ clearTimeout(bn), J = null;
628
+ }, Sn = (e) => {
629
+ v.disabled || W.value || e.pointerType === "mouse" || (Y = !1, J = {
605
630
  x: e.clientX,
606
631
  y: e.clientY
607
- }, ln = setTimeout(() => {
608
- X = !0, g.placement === "cursor" && Y && (N.value = ft(Y.x, Y.y)), Y = null, J = "pointer", Q();
609
- }, qe));
610
- }, fn = (e) => {
611
- if (!Y) return;
612
- let t = e.clientX - Y.x, n = e.clientY - Y.y;
613
- Math.sqrt(t * t + n * n) > Je && un();
614
- }, pn = () => {
615
- un();
616
- }, mn = (e) => {
617
- X && e.cancelable && (e.preventDefault(), X = !1);
618
- }, hn = async (e) => {
619
- g.disabled || K.value || (e.key === "ArrowDown" ? (e.preventDefault(), j.value || (J = "keyboard", await Q()), await c(0), q.value?.focusFirst(!0)) : e.key === "ArrowUp" ? (e.preventDefault(), j.value || (J = "keyboard", await Q()), await c(0), q.value?.focusLast(!0)) : e.key === "Tab" && j.value && !e.shiftKey && (e.preventDefault(), q.value?.focusFirst(!0)));
620
- }, gn = !1, _n = () => {
621
- gn = !0, setTimeout(() => gn = !1, 0);
632
+ }, bn = setTimeout(() => {
633
+ Y = !0, v.placement === "cursor" && J && (M.value = yt(J.x, J.y)), J = null, K = "pointer", Q();
634
+ }, Qe));
635
+ }, Cn = (e) => {
636
+ if (!J) return;
637
+ let t = e.clientX - J.x, n = e.clientY - J.y;
638
+ Math.sqrt(t * t + n * n) > $e && xn();
639
+ }, X = () => {
640
+ xn();
641
+ }, wn = (e) => {
642
+ Y && e.cancelable && (e.preventDefault(), Y = !1);
643
+ }, Tn = async (e) => {
644
+ v.disabled || W.value || (e.key === "ArrowDown" ? (e.preventDefault(), A.value || (K = "keyboard", await Q()), await l(0), G.value?.focusFirst(!0)) : e.key === "ArrowUp" ? (e.preventDefault(), A.value || (K = "keyboard", await Q()), await l(0), G.value?.focusLast(!0)) : e.key === "Tab" && A.value && !e.shiftKey && (e.preventDefault(), G.value?.focusFirst(!0)));
645
+ }, En = !1, Dn = () => {
646
+ En = !0, setTimeout(() => En = !1, 0);
622
647
  }, Z = (e) => {
623
648
  let t = e.target;
624
- t instanceof HTMLElement && (e.type === "focusin" && gn && k.value?.contains(t) || t.closest(`[data-bb-dropdown-surface="${E}"]`) || e.type === "focusin" && t.querySelector(`[data-bb-dropdown-surface="${E}"]`) || $());
625
- }, vn = (e) => {
649
+ if (!(t instanceof HTMLElement) || e.type === "focusin" && En && k.value?.contains(t) || t.closest(`[data-bb-dropdown-surface="${D}"]`) || e.type === "focusin" && t.querySelector(`[data-bb-dropdown-surface="${D}"]`) || e.type !== "focusin" && k.value?.contains(t) || ($(), e.type === "focusin")) return;
650
+ let n = document.activeElement, r = k.value;
651
+ r?.isConnected && n && n !== document.body && n !== r && n.contains(r) && r.focus({ preventScroll: !0 });
652
+ }, On = (e) => {
626
653
  let t = e.detail;
627
- t && t.surfaceId !== E && (t.activator?.closest(`[data-bb-dropdown-surface="${E}"]`) || $());
628
- }, yn = () => {
654
+ t && t.surfaceId !== D && (t.activator?.closest(`[data-bb-dropdown-surface="${D}"]`) || $());
655
+ }, kn = () => {
629
656
  let e = document.activeElement?.closest("[data-bb-dropdown-surface]");
630
- return e?.getAttribute("data-bb-dropdown-surface") === E && !!e.closest(".bb-dropdown--submenu");
631
- }, bn = (e) => {
632
- j.value && e.key === "Escape" && r(D) && (yn() || (e.stopImmediatePropagation(), e.preventDefault(), document.activeElement !== k.value && rn(), $()));
657
+ return e?.getAttribute("data-bb-dropdown-surface") === D && !!e.closest(".bb-dropdown--submenu");
658
+ }, An = (e) => {
659
+ A.value && e.key === "Escape" && i(rt) && (kn() || (e.stopImmediatePropagation(), e.preventDefault(), document.activeElement !== k.value && q(), $()));
633
660
  }, Q = async () => {
634
- K.value || (lt.value = ct(), _t = !0, j.value = !0, document.dispatchEvent(new CustomEvent(Ke, { detail: {
635
- surfaceId: E,
661
+ W.value || (gt.value = ht(), Dt = !0, A.value = !0, document.dispatchEvent(new CustomEvent(Ze, { detail: {
662
+ surfaceId: D,
636
663
  activator: k.value
637
- } })), M.value || (vt(), i(D, { element: () => document.querySelector(`[data-bb-dropdown-surface="${CSS.escape(String(E))}"]`) }), document.addEventListener("click", Z, { passive: !0 }), document.addEventListener("contextmenu", Z, { passive: !0 }), document.addEventListener("focusin", Z, { passive: !0 }), document.addEventListener("keydown", bn, { capture: !0 }), document.addEventListener(Ke, vn)));
664
+ } })), j.value || (Ot(), a(rt, { element: () => document.querySelector(`[data-bb-dropdown-surface="${CSS.escape(String(D))}"]`) }), document.addEventListener("click", Z, {
665
+ passive: !0,
666
+ capture: !0
667
+ }), document.addEventListener("contextmenu", Z, {
668
+ passive: !0,
669
+ capture: !0
670
+ }), document.addEventListener("focusin", Z, { passive: !0 }), document.addEventListener("keydown", An, { capture: !0 }), document.addEventListener(Ze, On)));
638
671
  }, $ = async () => {
639
- j.value = !1, yt();
672
+ A.value = !1, kt();
673
+ }, { model: jn, set: Mn } = r(v, "modelValue", T, () => !1), Nn = async () => {
674
+ if (await l(0), !jn.value || A.value) return;
675
+ let e = document.activeElement;
676
+ gn = e instanceof HTMLElement ? e : null, K = "keyboard", await Q(), A.value ? j.value || (await l(0), G.value?.focusFirst(!0)) : Mn(!1);
677
+ };
678
+ w(A, (e) => {
679
+ jn.value !== e && Mn(e);
680
+ });
681
+ let Pn = () => {
682
+ let e = !!document.activeElement?.closest(`[data-bb-dropdown-surface="${CSS.escape(D)}"]`);
683
+ $(), e && q();
640
684
  };
641
- oe({
685
+ w(jn, (e) => {
686
+ e !== A.value && (e ? Nn() : Pn());
687
+ }), ze(() => {
688
+ jn.value && !A.value && Nn();
689
+ }), oe({
642
690
  open: async (e, t, n) => {
643
- j.value && (await $(), await c(g.transitionDuration)), N.value = e, an = n ?? null, J = t, await Q(), t === "keyboard" && j.value && (await c(0), q.value?.focusFirst(!0));
691
+ A.value && (await $(), await l(v.transitionDuration)), M.value = e, gn = n ?? null, K = t, await Q(), t === "keyboard" && A.value && (await l(0), G.value?.focusFirst(!0));
644
692
  },
645
693
  close: $,
646
- isOpen: () => j.value
694
+ isOpen: () => A.value
647
695
  });
648
- let xn = () => {
649
- a(D), document.removeEventListener("click", Z), document.removeEventListener("contextmenu", Z), document.removeEventListener("focusin", Z), document.removeEventListener("keydown", bn, { capture: !0 }), document.removeEventListener(Ke, vn);
696
+ let Fn = () => {
697
+ o(rt), document.removeEventListener("click", Z, { capture: !0 }), document.removeEventListener("contextmenu", Z, { capture: !0 }), document.removeEventListener("focusin", Z), document.removeEventListener("keydown", An, { capture: !0 }), document.removeEventListener(Ze, On);
650
698
  };
651
- C(j, (e) => {
699
+ w(A, (e) => {
652
700
  if (!e) {
653
- J = void 0, xn();
654
- for (let e of Object.keys(it)) it[e] = "";
701
+ K = void 0, Fn();
702
+ for (let e of Object.keys(dt)) dt[e] = "";
655
703
  }
656
- }), C(() => g.activator, (t, n) => {
704
+ }), w(() => v.activator, (t, n) => {
657
705
  let r = k.value;
658
- t ? k.value = ge(t) ?? void 0 : n && (k.value = void 0), r && !k.value && j.value && e({
659
- inPanel: (e) => !!e.closest(`[data-bb-dropdown-surface="${E}"]`),
706
+ t ? k.value = ve(t) ?? void 0 : n && (k.value = void 0), r && !k.value && A.value && e({
707
+ inPanel: (e) => !!e.closest(`[data-bb-dropdown-surface="${D}"]`),
660
708
  close: $,
661
709
  activator: () => k.value
662
710
  });
663
711
  }, { immediate: !0 });
664
- let Sn = null;
665
- C([k, dt], ([e, t]) => {
666
- if (Sn &&= (Sn(), null), !e) return;
712
+ let In = null;
713
+ w([k, vt], ([e, t]) => {
714
+ if (In &&= (In(), null), !e) return;
667
715
  let n = !1;
668
- e.id || (e.id = E, n = !0), O.value = e.id;
716
+ e.id || (e.id = D, n = !0), O.value = e.id;
669
717
  let r = [];
670
- t.has("click") && (e.addEventListener("click", on), e.addEventListener("mousedown", _n), r.push(() => {
671
- e.removeEventListener("click", on), e.removeEventListener("mousedown", _n);
672
- })), t.has("contextMenu") && (e.addEventListener("contextmenu", cn), e.addEventListener("pointerdown", dn), e.addEventListener("pointermove", fn), e.addEventListener("pointerup", pn), e.addEventListener("pointercancel", pn), e.addEventListener("touchend", mn), r.push(() => {
673
- e.removeEventListener("contextmenu", cn), e.removeEventListener("pointerdown", dn), e.removeEventListener("pointermove", fn), e.removeEventListener("pointerup", pn), e.removeEventListener("pointercancel", pn), e.removeEventListener("touchend", mn), un();
674
- })), e.addEventListener("keydown", hn), r.push(() => e.removeEventListener("keydown", hn)), Sn = () => {
718
+ t.has("click") && (e.addEventListener("click", _n), e.addEventListener("mousedown", Dn), r.push(() => {
719
+ e.removeEventListener("click", _n), e.removeEventListener("mousedown", Dn);
720
+ })), t.has("contextMenu") && (e.addEventListener("contextmenu", yn), e.addEventListener("pointerdown", Sn), e.addEventListener("pointermove", Cn), e.addEventListener("pointerup", X), e.addEventListener("pointercancel", X), e.addEventListener("touchend", wn), r.push(() => {
721
+ e.removeEventListener("contextmenu", yn), e.removeEventListener("pointerdown", Sn), e.removeEventListener("pointermove", Cn), e.removeEventListener("pointerup", X), e.removeEventListener("pointercancel", X), e.removeEventListener("touchend", wn), xn();
722
+ })), e.addEventListener("keydown", Tn), r.push(() => e.removeEventListener("keydown", Tn)), In = () => {
675
723
  r.forEach((e) => e()), n && e.removeAttribute("id"), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls");
676
724
  };
677
- }, { immediate: !0 }), C([
725
+ }, { immediate: !0 }), w([
678
726
  k,
679
- j,
680
- et,
681
- Pt,
682
- Ft,
683
- K
727
+ A,
728
+ st,
729
+ Ut,
730
+ Wt,
731
+ W
684
732
  ], ([e, t, n, r, i, a]) => {
685
733
  e && (a ? (e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls")) : (e.setAttribute("aria-haspopup", r), e.setAttribute("aria-expanded", n ? String(t) : "false"), n ? e.setAttribute("aria-controls", i) : e.removeAttribute("aria-controls")));
686
- }, { immediate: !0 }), Pe(() => {
687
- un(), Sn?.(), xn();
734
+ }, { immediate: !0 }), Le(() => {
735
+ xn(), In?.(), Fn();
688
736
  });
689
- let Cn = p(() => g.width === "auto"), { width: wn } = He(p(() => he(j.value ? mt.value : null)), {
737
+ let Ln = m(() => v.width === "auto"), { width: Rn } = qe(m(() => _e(A.value ? xt.value : null)), {
690
738
  width: 0,
691
739
  height: 0
692
- }, { box: "border-box" }), Tn = p(() => {
693
- if (g.width !== "auto") {
694
- if (g.width) {
695
- let { value: e, unit: t } = _e(g.width);
696
- return t === "%" ? mt.value ? `${wn.value * (e / 100)}px` : "0px" : `${e}px`;
740
+ }, { box: "border-box" }), zn = m(() => {
741
+ if (v.width !== "auto") {
742
+ if (v.width) {
743
+ let { value: e, unit: t } = ye(v.width);
744
+ return t === "%" ? xt.value ? `${Rn.value * (e / 100)}px` : "0px" : `${e}px`;
697
745
  }
698
746
  return "0px";
699
747
  }
700
748
  });
701
- return Fe(() => {
749
+ return Re(() => {
702
750
  $();
703
- }), (e, n) => (v(), h(ke, null, [
704
- !Qe.value && qt.value ? x(e.$slots, "activator", Ne(Me({
705
- props: { ref: gt },
706
- disabled: f.disabled,
707
- empty: K.value,
708
- loading: $t.value,
709
- open: j.value,
710
- placement: f.placement
711
- })), void 0, void 0, 0) : m("", !0),
712
- x(e.$slots, "default"),
713
- (v(!0), h(ke, null, Le(V.value, (e) => (v(), Ae(de, {
751
+ }), (e, n) => (b(), _(je, null, [
752
+ !at.value && on.value ? Ve(e.$slots, "activator", Ie(Fe({
753
+ props: { ref: Et },
754
+ disabled: p.disabled,
755
+ empty: W.value,
756
+ loading: fn.value,
757
+ open: A.value,
758
+ placement: p.placement
759
+ })), void 0, void 0, 0) : g("", !0),
760
+ Ve(e.$slots, "default"),
761
+ (b(!0), _(je, null, Be(B.value, (e) => (b(), h(pe, {
714
762
  id: e,
715
763
  key: e
716
764
  }, null, 8, ["id"]))), 128)),
717
- M.value ? (v(), Ae(ue, _({
765
+ j.value ? (b(), h(fe, y({
718
766
  key: 1,
719
- modelValue: j.value,
720
- "onUpdate:modelValue": n[0] ||= (e) => j.value = e,
721
- compact: S(st).compact,
722
- "off-canvas-props": ut.value,
723
- "root-groups": Mt.value
724
- }, _($e, S(t)(S(Te)(e.$attrs)))), null, 16, [
767
+ modelValue: A.value,
768
+ "onUpdate:modelValue": n[0] ||= (e) => A.value = e,
769
+ compact: C(mt).compact,
770
+ "off-canvas-props": _t.value,
771
+ "root-groups": Vt.value
772
+ }, y(ot, C(t)(C(De)(e.$attrs)))), null, 16, [
725
773
  "modelValue",
726
774
  "compact",
727
775
  "off-canvas-props",
728
776
  "root-groups"
729
- ])) : (v(), Ae(ce, _({
777
+ ])) : (b(), h(ce, y({
730
778
  key: 2,
731
- modelValue: j.value,
732
- "onUpdate:modelValue": n[1] ||= (e) => j.value = e,
733
- anchor: ht.value,
734
- boundary: f.boundary,
735
- "bubble-attrs": rt,
779
+ modelValue: A.value,
780
+ "onUpdate:modelValue": n[1] ||= (e) => A.value = e,
781
+ anchor: Tt.value,
782
+ boundary: p.boundary,
783
+ "boundary-x": p.boundary ? void 0 : wt.value,
784
+ "bubble-attrs": ut,
736
785
  class: ["bb-dropdown", {
737
- "bb-dropdown--mobile": S(ot),
738
- "bb-dropdown--compact": S(st).compact
786
+ "bb-dropdown--mobile": C(pt),
787
+ "bb-dropdown--compact": C(mt).compact
739
788
  }],
740
- eager: f.eager,
789
+ eager: p.eager,
741
790
  "hide-arrow": "",
742
- offset: f.offset ?? S(Ye)() ?? 4,
743
- padding: f.padding,
744
- placement: f.placement === "cursor" ? "bottom-start" : f.placement,
745
- "transition-duration": f.transitionDuration
746
- }, _($e, e.$attrs, S(T).root)), {
747
- default: Ve(() => [
748
- e.$slots.header ? (v(), h("div", _({
791
+ offset: p.offset ?? C(et)() ?? 4,
792
+ padding: p.padding,
793
+ placement: p.placement === "cursor" ? "bottom-start" : p.placement,
794
+ "transition-duration": p.transitionDuration
795
+ }, y(ot, e.$attrs, C(E).root)), {
796
+ default: Ke(() => [
797
+ e.$slots.header ? (b(), _("div", y({
749
798
  key: 0,
750
799
  class: "bb-dropdown__header"
751
- }, S(T).header), [x(e.$slots, "header", {
752
- disabled: f.disabled,
753
- open: j.value,
754
- placement: f.placement
755
- })], 16)) : m("", !0),
756
- je("span", _({
757
- id: `menu_${S(E)}`,
800
+ }, C(E).header), [Ve(e.$slots, "header", {
801
+ disabled: p.disabled,
802
+ open: A.value,
803
+ placement: p.placement
804
+ })], 16)) : g("", !0),
805
+ Me("span", y({
806
+ id: `menu_${C(D)}`,
758
807
  "aria-labelledby": z.value ? void 0 : O.value,
759
808
  class: "bb-dropdown__list scrollbar-border",
760
809
  role: z.value ? "none" : "menu"
761
- }, S(T).list), [nt.value ? (v(), Ae(le, {
810
+ }, C(E).list), [lt.value ? (b(), h(le, {
762
811
  key: 0,
763
812
  ref: "root-list",
764
- groups: Mt.value
765
- }, null, 8, ["groups"])) : m("", !0)], 16, We),
766
- je("span", Ge, Re(Nt.value), 1),
767
- e.$slots.footer ? (v(), h("div", _({
813
+ groups: Vt.value
814
+ }, null, 8, ["groups"])) : g("", !0)], 16, Ye),
815
+ Me("span", Xe, Ue(Ht.value), 1),
816
+ Ne(ue),
817
+ e.$slots.footer ? (b(), _("div", y({
768
818
  key: 1,
769
819
  class: "bb-dropdown__footer"
770
- }, S(T).footer), [x(e.$slots, "footer", {
771
- disabled: f.disabled,
772
- open: j.value,
773
- placement: f.placement
774
- })], 16)) : m("", !0)
820
+ }, C(E).footer), [Ve(e.$slots, "footer", {
821
+ disabled: p.disabled,
822
+ open: A.value,
823
+ placement: p.placement
824
+ })], 16)) : g("", !0)
775
825
  ]),
776
826
  _: 3
777
827
  }, 16, [
778
828
  "modelValue",
779
829
  "anchor",
780
830
  "boundary",
831
+ "boundary-x",
781
832
  "class",
782
833
  "eager",
783
834
  "offset",
@@ -788,4 +839,4 @@ var We = [
788
839
  ], 64));
789
840
  }
790
841
  });
791
- export { w as default };
842
+ export { T as default };