bitboss-ui 3.0.0-beta.48 → 3.0.0-beta.49

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 (356) hide show
  1. package/README.md +24 -7
  2. package/bin/bitboss-ui-mcp.mjs +15 -3
  3. package/bin/bitboss-ui.mjs +115 -13
  4. package/dist/ai/BbAvatar.md +1 -1
  5. package/dist/ai/BbBreadcrumbs.md +65 -65
  6. package/dist/ai/BbButton.md +16 -5
  7. package/dist/ai/BbCheckbox.md +0 -2
  8. package/dist/ai/BbCheckboxGroup.md +13 -20
  9. package/dist/ai/BbDatePickerInput.md +4 -2
  10. package/dist/ai/BbDialog.md +1 -8
  11. package/dist/ai/BbDropdown.md +231 -220
  12. package/dist/ai/BbDropdownButton.md +65 -65
  13. package/dist/ai/BbDropdownGroup.md +2 -2
  14. package/dist/ai/BbDropzone.md +10 -10
  15. package/dist/ai/BbForm.md +43 -52
  16. package/dist/ai/BbHoverCard.md +4 -2
  17. package/dist/ai/BbNumberInput.md +88 -21
  18. package/dist/ai/BbPopover.md +29 -23
  19. package/dist/ai/BbProgress.md +48 -22
  20. package/dist/ai/BbRadioGroup.md +13 -19
  21. package/dist/ai/BbSelect.md +16 -36
  22. package/dist/ai/BbSelectPopover.md +14 -30
  23. package/dist/ai/BbSmoothHeight.md +0 -2
  24. package/dist/ai/BbSwitchGroup.md +13 -20
  25. package/dist/ai/BbTable.md +11 -10
  26. package/dist/ai/BbTabs.md +106 -105
  27. package/dist/ai/BbTabsList.md +2 -2
  28. package/dist/ai/BbTabsPanels.md +1 -1
  29. package/dist/ai/BbTabsRoot.md +2 -2
  30. package/dist/ai/BbTooltip.md +24 -10
  31. package/dist/ai/BbTree.md +14 -11
  32. package/dist/ai/changelog.json +256 -5
  33. package/dist/ai/components.json +36 -34
  34. package/dist/ai/composables/useBbDropdownContext.md +16 -16
  35. package/dist/ai/composables/useBbFormField.md +5 -1
  36. package/dist/ai/composables/useBbTabsContext.md +14 -14
  37. package/dist/ai/guides/agent-contract.md +27 -27
  38. package/dist/ai/guides/ai-router.md +1 -1
  39. package/dist/ai/guides/component-picker.md +3 -3
  40. package/dist/ai/guides/fetch-items-playbook.md +1 -1
  41. package/dist/ai/guides/icons-policy.md +10 -10
  42. package/dist/ai/guides/inertia-helpers.md +120 -67
  43. package/dist/ai/guides/installation-and-plugin-setup.md +43 -15
  44. package/dist/ai/guides/migration/components/bb-breadcrumbs.md +3 -2
  45. package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -16
  46. package/dist/ai/guides/migration/components/bb-dropdown-button.md +9 -8
  47. package/dist/ai/guides/migration/components/bb-dropdown.md +15 -14
  48. package/dist/ai/guides/migration/components/bb-radio-group.md +2 -1
  49. package/dist/ai/guides/migration/components/bb-select-popover.md +6 -1
  50. package/dist/ai/guides/migration/components/bb-select.md +10 -2
  51. package/dist/ai/guides/migration/components/bb-switch-group.md +2 -1
  52. package/dist/ai/guides/migration/components/bb-tabs.md +9 -8
  53. package/dist/ai/guides/migration/components/bb-tooltip.md +1 -1
  54. package/dist/ai/guides/migration/v2-to-v3.md +114 -17
  55. package/dist/ai/guides/migration/v3-beta-tooling.md +11 -0
  56. package/dist/ai/guides/options-items-playbook.md +30 -24
  57. package/dist/ai/guides/passthrough.md +2 -2
  58. package/dist/ai/guides/preset-components.md +18 -3
  59. package/dist/ai/guides/typescript-generic-components.md +1 -1
  60. package/dist/ai/guides/validated-forms.md +11 -22
  61. package/dist/ai/guides/validation-providers.md +4 -3
  62. package/dist/ai/helpers/inertia/manifest.json +636 -0
  63. package/dist/ai/helpers/inertia/types.ts +15 -0
  64. package/dist/ai/helpers/inertia/useAsyncFn.ts +110 -0
  65. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +102 -0
  66. package/dist/ai/helpers/inertia/useDeleteCmd.ts +30 -0
  67. package/dist/ai/helpers/inertia/useHasChanged.ts +36 -0
  68. package/dist/ai/helpers/inertia/useIndexById.ts +23 -0
  69. package/dist/ai/helpers/inertia/useLazyProp.ts +148 -0
  70. package/dist/ai/helpers/inertia/useLazyPropGetter.ts +50 -0
  71. package/dist/ai/helpers/inertia/useLoading.ts +20 -0
  72. package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +88 -0
  73. package/dist/ai/helpers/inertia/usePromiseForm.ts +62 -0
  74. package/dist/ai/helpers/inertia/useProp.ts +63 -0
  75. package/dist/ai/helpers/inertia/useQuery.ts +19 -0
  76. package/dist/ai/helpers/inertia/useQueryObject.ts +116 -0
  77. package/dist/ai/helpers/inertia/useResourceContext.ts +69 -0
  78. package/dist/ai/helpers/inertia/useRouteQuery.ts +54 -0
  79. package/dist/ai/helpers/inertia/useScreenSizes.ts +23 -0
  80. package/dist/ai/helpers/inertia/useTableContext.ts +34 -0
  81. package/dist/ai/helpers/inertia/useTableSelectionContext.ts +48 -0
  82. package/dist/ai/helpers/inertia/useUntil.ts +33 -0
  83. package/dist/ai/helpers/inertia/utils.ts +24 -0
  84. package/dist/ai/index.md +6 -6
  85. package/dist/ai/manifest/components/BbBreadcrumbs.json +10 -6
  86. package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
  87. package/dist/ai/manifest/components/BbButton.json +1 -1
  88. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  89. package/dist/ai/manifest/components/BbDropdown.json +23 -20
  90. package/dist/ai/manifest/components/BbDropdown.tree.json +2 -2
  91. package/dist/ai/manifest/components/BbDropdownButton.json +22 -19
  92. package/dist/ai/manifest/components/BbDropdownButton.tree.json +1 -1
  93. package/dist/ai/manifest/components/BbDropdownGroup.json +2 -2
  94. package/dist/ai/manifest/components/BbForm.json +1 -0
  95. package/dist/ai/manifest/components/BbNumberInput.json +6 -1
  96. package/dist/ai/manifest/components/BbNumberInput.tree.json +2 -1
  97. package/dist/ai/manifest/components/BbPopover.json +1 -0
  98. package/dist/ai/manifest/components/BbProgress.json +6 -6
  99. package/dist/ai/manifest/components/BbProgress.tree.json +1 -0
  100. package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
  101. package/dist/ai/manifest/components/BbSelect.json +2 -2
  102. package/dist/ai/manifest/components/BbSelectPopover.json +2 -2
  103. package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
  104. package/dist/ai/manifest/components/BbTabs.json +7 -6
  105. package/dist/ai/manifest/components/BbTabsList.json +3 -3
  106. package/dist/ai/manifest/components/BbTabsPanels.json +1 -1
  107. package/dist/ai/manifest/components/BbTabsRoot.json +5 -4
  108. package/dist/ai/manifest/components/BbTooltip.json +1 -1
  109. package/dist/ai/manifest/index.json +2 -2
  110. package/dist/ai/manifest/meta.json +2 -0
  111. package/dist/ai/manifest/types.advanced.json +10 -9
  112. package/dist/ai/manifest/types.api.json +5 -4
  113. package/dist/ai/recipes/inertia/approvals-inbox.md +16 -18
  114. package/dist/ai/recipes/inertia/inline-edit-workspace.md +23 -33
  115. package/dist/ai/recipes/inertia/layout-scaffold.md +16 -16
  116. package/dist/ai/recipes/inertia/onboarding.md +6 -10
  117. package/dist/ai/recipes/inertia/ownership-atlas.md +15 -18
  118. package/dist/ai/recipes/inertia/record-form.md +11 -11
  119. package/dist/ai/recipes/inertia/records-workspace.md +38 -41
  120. package/dist/ai/recipes/inertia/settings-workspace.md +26 -38
  121. package/dist/ai/recipes/inertia/upload-center.md +31 -39
  122. package/dist/ai/recipes/inertia/wizard-form.md +10 -19
  123. package/dist/ai/recipes/nuxt/approvals-inbox.md +7 -8
  124. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +14 -24
  125. package/dist/ai/recipes/nuxt/layout-scaffold.md +16 -16
  126. package/dist/ai/recipes/nuxt/onboarding.md +2 -6
  127. package/dist/ai/recipes/nuxt/ownership-atlas.md +7 -9
  128. package/dist/ai/recipes/nuxt/record-form.md +5 -5
  129. package/dist/ai/recipes/nuxt/records-workspace.md +29 -31
  130. package/dist/ai/recipes/nuxt/settings-workspace.md +22 -34
  131. package/dist/ai/recipes/nuxt/upload-center.md +22 -29
  132. package/dist/ai/recipes/nuxt/wizard-form.md +3 -11
  133. package/dist/ai/recipes/vue/approvals-inbox.md +7 -8
  134. package/dist/ai/recipes/vue/inline-edit-workspace.md +14 -24
  135. package/dist/ai/recipes/vue/layout-scaffold.md +16 -16
  136. package/dist/ai/recipes/vue/onboarding.md +2 -6
  137. package/dist/ai/recipes/vue/ownership-atlas.md +7 -9
  138. package/dist/ai/recipes/vue/record-form.md +5 -5
  139. package/dist/ai/recipes/vue/records-workspace.md +29 -31
  140. package/dist/ai/recipes/vue/settings-workspace.md +22 -34
  141. package/dist/ai/recipes/vue/upload-center.md +22 -29
  142. package/dist/ai/recipes/vue/wizard-form.md +3 -11
  143. package/dist/ai/source/BbAccordion.md +1 -1
  144. package/dist/ai/source/BbAlert.md +3 -3
  145. package/dist/ai/source/BbBadge.md +2 -2
  146. package/dist/ai/source/BbBadgeButton.md +5 -4
  147. package/dist/ai/source/BbBaseButton.md +1 -1
  148. package/dist/ai/source/BbBaseRadioIcon.md +1 -0
  149. package/dist/ai/source/BbBaseSwitchIcon.md +1 -0
  150. package/dist/ai/source/BbBreadcrumbs.md +63 -42
  151. package/dist/ai/source/BbButton.md +71 -33
  152. package/dist/ai/source/BbCalendar.md +17 -16
  153. package/dist/ai/source/BbCheckbox.md +3 -2
  154. package/dist/ai/source/BbCheckboxGroup.md +11 -4
  155. package/dist/ai/source/BbColorInput.md +10 -9
  156. package/dist/ai/source/BbConfirm.md +1 -1
  157. package/dist/ai/source/BbConfirmPortal.md +1 -1
  158. package/dist/ai/source/BbDatePicker.md +2 -2
  159. package/dist/ai/source/BbDatePickerInput.md +47 -20
  160. package/dist/ai/source/BbDialog.md +5 -5
  161. package/dist/ai/source/BbDropdown.md +230 -158
  162. package/dist/ai/source/BbDropdownButton.md +19 -12
  163. package/dist/ai/source/BbDropdownGroup.md +126 -93
  164. package/dist/ai/source/BbForm.md +25 -1
  165. package/dist/ai/source/BbIndicator.md +4 -0
  166. package/dist/ai/source/BbNumberInput.md +855 -19
  167. package/dist/ai/source/BbOffCanvas.md +27 -11
  168. package/dist/ai/source/BbPagination.md +3 -3
  169. package/dist/ai/source/BbPopover.md +152 -8
  170. package/dist/ai/source/BbPopoverPortal.md +11 -0
  171. package/dist/ai/source/BbProgress.md +82 -18
  172. package/dist/ai/source/BbRadioGroup.md +12 -5
  173. package/dist/ai/source/BbRating.md +11 -9
  174. package/dist/ai/source/BbSelect.md +16 -10
  175. package/dist/ai/source/BbSelectPopover.md +29 -23
  176. package/dist/ai/source/BbSlider.md +12 -6
  177. package/dist/ai/source/BbSwitch.md +3 -2
  178. package/dist/ai/source/BbSwitchGroup.md +5 -2
  179. package/dist/ai/source/BbTable.md +102 -18
  180. package/dist/ai/source/BbTabs.md +27 -23
  181. package/dist/ai/source/BbTabsList.md +26 -22
  182. package/dist/ai/source/BbTabsPanels.md +26 -22
  183. package/dist/ai/source/BbTabsRoot.md +25 -21
  184. package/dist/ai/source/BbTag.md +10 -9
  185. package/dist/ai/source/BbTextInput.md +5 -4
  186. package/dist/ai/source/BbTextarea.md +6 -5
  187. package/dist/ai/source/BbTimePicker.md +1 -1
  188. package/dist/ai/source/BbTimePickerInput.md +46 -9
  189. package/dist/ai/source/BbToast.md +10 -7
  190. package/dist/ai/source/BbToastPortal.md +10 -7
  191. package/dist/ai/source/BbTooltip.md +54 -8
  192. package/dist/ai/source/BbTree.md +21 -3
  193. package/dist/ai/source/CommonField.md +6 -4
  194. package/dist/ai/source/CommonFieldInput.md +15 -10
  195. package/dist/ai/source/CommonPopover.md +6 -0
  196. package/dist/ai/source/CommonTimeSelector.md +5 -4
  197. package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +10 -8
  198. package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +8 -8
  199. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +45 -45
  200. package/dist/components/BbBreadcrumbs/types.d.ts +25 -17
  201. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +84 -71
  202. package/dist/components/BbButton/toggleRoving.d.ts +6 -0
  203. package/dist/components/BbButton/toggleRoving.js +45 -0
  204. package/dist/components/BbButton/types.d.ts +4 -1
  205. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +178 -178
  206. package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +15 -15
  207. package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +28 -28
  208. package/dist/components/BbCalendar/useCalendarGrid.js +141 -139
  209. package/dist/components/BbCalendar/useDayjsLocale.d.ts +38 -15
  210. package/dist/components/BbCalendar/useDayjsLocale.js +31 -30
  211. package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +48 -48
  212. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +81 -80
  213. package/dist/components/BbCheckboxGroup/types.d.ts +6 -2
  214. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +69 -69
  215. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +363 -349
  216. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +91 -86
  217. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +298 -289
  218. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +322 -356
  219. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +17 -15
  220. package/dist/components/BbDropdown/DropdownRow.vue.d.ts +40 -0
  221. package/dist/components/BbDropdown/DropdownRow.vue.js +5 -0
  222. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +60 -0
  223. package/dist/components/BbDropdown/normalizeGroups.d.ts +8 -2
  224. package/dist/components/BbDropdown/normalizeGroups.js +60 -46
  225. package/dist/components/BbDropdown/types.d.ts +119 -88
  226. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +11 -2
  227. package/dist/components/BbDropdownButton/types.d.ts +2 -2
  228. package/dist/components/BbForm/BbForm.vue.d.ts +9 -0
  229. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +114 -105
  230. package/dist/components/BbForm/BbFormCustomField.js +1 -1
  231. package/dist/components/BbForm/bindFormField.js +2 -1
  232. package/dist/components/BbForm/formFields.d.ts +5 -0
  233. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +0 -1
  234. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +452 -125
  235. package/dist/components/BbNumberInput/numberDisplay.d.ts +256 -0
  236. package/dist/components/BbNumberInput/numberDisplay.js +499 -0
  237. package/dist/components/BbNumberInput/types.d.ts +54 -1
  238. package/dist/components/BbNumberInput/warroom/corpus.d.ts +58 -0
  239. package/dist/components/BbNumberInput/warroom/currency-verify.rows.d.ts +28 -0
  240. package/dist/components/BbNumberInput/warroom/currency.rows.d.ts +2 -0
  241. package/dist/components/BbNumberInput/warroom/harness.d.ts +217 -0
  242. package/dist/components/BbNumberInput/warroom/oracle.d.ts +150 -0
  243. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +7 -7
  244. package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -0
  245. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +207 -164
  246. package/dist/components/BbPopover/types.d.ts +11 -0
  247. package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +15 -7
  248. package/dist/components/BbProgress/types.d.ts +23 -7
  249. package/dist/components/BbProgress/types.js +1 -1
  250. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +102 -101
  251. package/dist/components/BbRadioGroup/types.d.ts +6 -2
  252. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +63 -63
  253. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +156 -154
  254. package/dist/components/BbSelect/types.d.ts +6 -2
  255. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +2 -1
  256. package/dist/components/BbSelectPopover/types.d.ts +6 -2
  257. package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +153 -153
  258. package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +62 -62
  259. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +131 -130
  260. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +711 -676
  261. package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +1 -1
  262. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +1 -1
  263. package/dist/components/BbTabs/types.d.ts +25 -21
  264. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +76 -76
  265. package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +58 -58
  266. package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +82 -82
  267. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +246 -236
  268. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +102 -97
  269. package/dist/components/BbTooltip/tooltipWarmup.d.ts +23 -0
  270. package/dist/components/BbTooltip/tooltipWarmup.js +7 -0
  271. package/dist/components/BbTooltip/types.d.ts +7 -2
  272. package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +29 -21
  273. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +10 -7
  274. package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +37 -36
  275. package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +9 -9
  276. package/dist/composables/formSubmitLock.d.ts +6 -0
  277. package/dist/composables/formSubmitLock.js +4 -0
  278. package/dist/composables/useBaseOptions.d.ts +7 -1
  279. package/dist/composables/useBaseOptions.js +32 -32
  280. package/dist/composables/useBbDropdownContext.d.ts +8 -8
  281. package/dist/composables/useBbFormField.d.ts +9 -0
  282. package/dist/composables/useBbFormField.js +5 -3
  283. package/dist/composables/useBbTabsContext.d.ts +10 -10
  284. package/dist/composables/useBbTabsContext.js +18 -18
  285. package/dist/composables/useFormBinding.d.ts +11 -0
  286. package/dist/composables/useFormBinding.js +15 -13
  287. package/dist/composables/useItemText.d.ts +5 -1
  288. package/dist/composables/useItemText.js +8 -3
  289. package/dist/composables/useItemValue.d.ts +5 -1
  290. package/dist/composables/useItemValue.js +8 -3
  291. package/dist/composables/useLocale.js +10 -9
  292. package/dist/deprecation/ai-deprecations.json.d.ts +130 -0
  293. package/dist/deprecation/ai-deprecations.json.js +1 -1
  294. package/dist/deprecation/removedProps.js +1 -1
  295. package/dist/directives/bbDropdown.js +1 -1
  296. package/dist/i18n/index.d.ts +7 -12
  297. package/dist/i18n/locales/cs.json +11 -14
  298. package/dist/i18n/locales/da.json +13 -16
  299. package/dist/i18n/locales/de-CH.json +137 -0
  300. package/dist/i18n/locales/de.json +14 -17
  301. package/dist/i18n/locales/el.json +10 -13
  302. package/dist/i18n/locales/en-GB.json +137 -0
  303. package/dist/i18n/locales/en.json +8 -11
  304. package/dist/i18n/locales/es-MX.json +137 -0
  305. package/dist/i18n/locales/es.json +16 -19
  306. package/dist/i18n/locales/fi.json +8 -11
  307. package/dist/i18n/locales/fr.json +23 -26
  308. package/dist/i18n/locales/hu.json +8 -11
  309. package/dist/i18n/locales/it.json +12 -15
  310. package/dist/i18n/locales/ja.json +13 -16
  311. package/dist/i18n/locales/ko.json +10 -13
  312. package/dist/i18n/locales/nb.json +13 -16
  313. package/dist/i18n/locales/nl.json +21 -24
  314. package/dist/i18n/locales/pl.json +10 -13
  315. package/dist/i18n/locales/{pt.json → pt-BR.json} +19 -22
  316. package/dist/i18n/locales/pt-PT.json +137 -0
  317. package/dist/i18n/locales/ro.json +22 -25
  318. package/dist/i18n/locales/ru.json +11 -14
  319. package/dist/i18n/locales/sv.json +16 -19
  320. package/dist/i18n/locales/tr.json +14 -17
  321. package/dist/i18n/locales/uk.json +11 -14
  322. package/dist/i18n/locales/{zh-cn.json → zh-CN.json} +10 -13
  323. package/dist/i18n/locales/zh-HK.json +137 -0
  324. package/dist/i18n/locales/zh-TW.json +137 -0
  325. package/dist/i18n/regionHints.d.ts +16 -0
  326. package/dist/i18n/regionHints.js +49 -0
  327. package/dist/i18n/regions.d.ts +286 -0
  328. package/dist/i18n/regions.js +265 -0
  329. package/dist/index.d.ts +1 -1
  330. package/dist/index.js +4 -4
  331. package/dist/llms-full.txt +1785 -1637
  332. package/dist/llms-medium.txt +74 -46
  333. package/dist/llms.txt +7 -7
  334. package/dist/locale-blueprint.json +16 -13
  335. package/dist/styles.css +2 -2
  336. package/dist/types/ptComponentMap.d.ts +1 -1
  337. package/dist/utilities/functions/slotKey.d.ts +2 -2
  338. package/dist/utils/versionCheck.js +1 -1
  339. package/dist/vite-plugin.d.ts +22 -19
  340. package/dist/vite.js +309 -297
  341. package/llms.txt +7 -7
  342. package/package.json +5 -3
  343. package/scripts/lib/agent-manifest.mjs +2 -1
  344. package/scripts/lib/eslint-disable.mjs +12 -4
  345. package/scripts/lib/eslint-plugin.d.ts +5 -1
  346. package/scripts/lib/eslint-plugin.mjs +187 -6
  347. package/scripts/lib/helper-canon.mjs +176 -0
  348. package/scripts/lib/helpers-add.mjs +1303 -0
  349. package/scripts/lib/local-components.mjs +33 -4
  350. package/scripts/lib/locale-check.mjs +165 -0
  351. package/scripts/lib/redundant-item-accessor.mjs +398 -0
  352. package/scripts/lib/renamed-item-field.mjs +343 -0
  353. package/scripts/lib/slot-key.mjs +2 -2
  354. package/scripts/lib/slot-renames.mjs +1 -1
  355. package/scripts/lib/validate-bb-markup.mjs +123 -56
  356. package/dist/i18n/index.js +0 -27
@@ -4,39 +4,39 @@ import { usePassthrough as n } from "../../composables/usePassthrough.js";
4
4
  import { useConfig as r } from "../../composables/useConfig.js";
5
5
  import { hash as i } from "../../utilities/functions/hash.js";
6
6
  import { useId as a } from "../../composables/useId.js";
7
- import { isTopEscapeEntry as o, pushEscapeEntry as s, removeEscapeEntry as c } from "../../utils/overlayEscapeStack.js";
8
- import { useUntil as ee } from "../../composables/useUntil.js";
9
- import { removedPropsFor as te } from "../../deprecation/removedProps.js";
10
- import { warnRemovedAttrs as ne } from "../../utilities/functions/warnRemovedAttrs.js";
11
- import { extractDomContainer as re } from "../../utilities/functions/extractDomContainer.js";
12
- import { transitions as ie } from "../../utilities/misc/transitions.js";
13
- import ae from "../CommonPopover/CommonPopover.vue.js";
14
- import { useBbDropdownContextHost as oe } from "../../composables/useBbDropdownContext.js";
15
- import { useMobile as se } from "../../composables/useMobile.js";
16
- import { provideSheetSurface as ce } from "../../composables/useSheetSurface.js";
17
- import { useClosingInert as le } from "../../composables/useClosingInert.js";
18
- import { wait as ue } from "../../utilities/functions/wait.js";
19
- import { BB_DROPDOWN_PT as de, groupItemsAsArray as l, isGroup as u, isSelectableGroup as fe } from "./types.js";
20
- import { levelHasSearch as pe, normalizeGroups as me } from "./normalizeGroups.js";
21
- import { provideDropdownContext as he } from "./useDropdownContext.js";
22
- import ge from "./BbDropdownList.vue.js";
23
- import _e from "./AdaptiveDropdown.vue.js";
24
- import { provideDropdownGroupRegistry as ve } from "./useDropdownGroupRegistry.js";
25
- import ye from "./DropdownPipelineResolver.vue.js";
26
- import { readableValue as be } from "../../utilities/functions/readableValue.js";
27
- import { settlesVisible as xe } from "../../utilities/functions/settlesVisible.js";
28
- import { parseWidthString as Se } from "../../utilities/functions/parseWidthString.js";
29
- import { Fragment as Ce, computed as d, createBlock as we, createCommentVNode as Te, createElementBlock as f, createElementVNode as Ee, createVNode as De, defineComponent as Oe, mergeProps as p, normalizeProps as ke, onBeforeUnmount as Ae, onDeactivated as je, openBlock as m, reactive as h, ref as g, renderList as Me, renderSlot as _, toDisplayString as Ne, unref as v, useSlots as Pe, useTemplateRef as Fe, watch as y, withCtx as Ie } from "vue";
30
- import { useElementSize as Le, useIntersectionObserver as Re } from "@vueuse/core";
7
+ import { isTopEscapeEntry as o, pushEscapeEntry as s, removeEscapeEntry as ee } from "../../utils/overlayEscapeStack.js";
8
+ import { useUntil as te } from "../../composables/useUntil.js";
9
+ import { removedPropsFor as ne } from "../../deprecation/removedProps.js";
10
+ import { warnRemovedAttrs as re } from "../../utilities/functions/warnRemovedAttrs.js";
11
+ import { extractDomContainer as ie } from "../../utilities/functions/extractDomContainer.js";
12
+ import { transitions as ae } from "../../utilities/misc/transitions.js";
13
+ import oe from "../CommonPopover/CommonPopover.vue.js";
14
+ import { useBbDropdownContextHost as se } from "../../composables/useBbDropdownContext.js";
15
+ import { useMobile as ce } from "../../composables/useMobile.js";
16
+ import { provideSheetSurface as le } from "../../composables/useSheetSurface.js";
17
+ import { useClosingInert as ue } from "../../composables/useClosingInert.js";
18
+ import { wait as de } from "../../utilities/functions/wait.js";
19
+ import { BB_DROPDOWN_PT as fe, groupItemsAsArray as c, isGroup as l, isSelectableGroup as pe } from "./types.js";
20
+ import { levelHasSearch as me, normalizeGroups as he } from "./normalizeGroups.js";
21
+ import { provideDropdownContext as ge } from "./useDropdownContext.js";
22
+ import _e from "./BbDropdownList.vue.js";
23
+ import ve from "./AdaptiveDropdown.vue.js";
24
+ import { provideDropdownGroupRegistry as ye } from "./useDropdownGroupRegistry.js";
25
+ import be from "./DropdownPipelineResolver.vue.js";
26
+ import { readableValue as xe } from "../../utilities/functions/readableValue.js";
27
+ import { settlesVisible as Se } from "../../utilities/functions/settlesVisible.js";
28
+ import { parseWidthString as Ce } from "../../utilities/functions/parseWidthString.js";
29
+ import { Fragment as we, computed as u, createBlock as Te, createCommentVNode as d, createElementBlock as f, createElementVNode as Ee, defineComponent as De, mergeProps as p, normalizeProps as Oe, onBeforeUnmount as ke, onDeactivated as Ae, openBlock as m, reactive as h, ref as g, renderList as je, renderSlot as _, toDisplayString as Me, unref as v, useSlots as Ne, useTemplateRef as Pe, watch as y, withCtx as Fe } from "vue";
30
+ import { useElementSize as Ie, useIntersectionObserver as Le } from "@vueuse/core";
31
31
  //#region src/components/BbDropdown/BbDropdown.vue?vue&type=script&setup=true&lang.ts
32
- var ze = [
32
+ var Re = [
33
33
  "id",
34
34
  "aria-labelledby",
35
35
  "role"
36
- ], Be = {
36
+ ], ze = {
37
37
  class: "bb-sr-only",
38
38
  role: "status"
39
- }, Ve = "bb-dropdown:open", He = 500, Ue = 10, b = /*@__PURE__*/ Oe({
39
+ }, Be = "bb-dropdown:open", Ve = 500, He = 10, b = /*@__PURE__*/ De({
40
40
  inheritAttrs: !1,
41
41
  __name: "BbDropdown",
42
42
  props: {
@@ -106,7 +106,7 @@ var ze = [
106
106
  padding: { default: 10 },
107
107
  placement: { default: "bottom" },
108
108
  queryDebounceTime: { default: 300 },
109
- transitionDuration: { default: ie.fast },
109
+ transitionDuration: { default: ae.fast },
110
110
  trigger: { default: "click" },
111
111
  width: { default: "auto" }
112
112
  },
@@ -118,40 +118,40 @@ var ze = [
118
118
  "item:selected",
119
119
  "item:unselected"
120
120
  ],
121
- setup(ie, { emit: Oe }) {
122
- let b = ie, x = Oe, S = n({
121
+ setup(ae, { emit: De }) {
122
+ let b = ae, x = De, S = n({
123
123
  component: "BbDropdown",
124
124
  props: b,
125
- parts: de.parts,
126
- states: de.states,
125
+ parts: fe.parts,
126
+ states: fe.states,
127
127
  active: { open: () => E.value }
128
- }), We = r();
129
- process.env.NODE_ENV !== "production" && ne("BbDropdown", te("BbDropdown"));
130
- let Ge = e(), Ke = a().id.value, C = b.id ?? `bb_${Ke}`, qe = Symbol("bb-dropdown-escape"), w = g(C), T = g(), Je = d(() => re(T.value)), Ye = d(() => b.activator != null), E = g(!1), Xe = {
128
+ }), Ue = r();
129
+ process.env.NODE_ENV !== "production" && re("BbDropdown", ne("BbDropdown"));
130
+ let We = e(), Ge = a().id.value, C = b.id ?? `bb_${Ge}`, Ke = Symbol("bb-dropdown-escape"), w = g(C), T = g(), qe = u(() => ie(T.value)), Je = u(() => b.activator != null), E = g(!1), Ye = {
131
131
  onShow: () => x("show"),
132
132
  onShown: () => x("shown"),
133
133
  onHide: () => x("hide"),
134
134
  onHidden: () => x("hidden")
135
- }, Ze = ee(E, { initialValue: b.eager }), Qe = le(E, () => b.transitionDuration), $e = ({ availableHeight: e }) => p({
136
- id: L.value ? `dialog_${C}` : void 0,
137
- "aria-labelledby": L.value ? w.value : void 0,
138
- class: ["bb-dropdown__panel", { "bb-dropdown__panel--reserve-check": en.value }],
135
+ }, Xe = te(E, { initialValue: b.eager }), Ze = ue(E, () => b.transitionDuration), Qe = u(() => b.eager || !Ze.value), $e = ({ availableHeight: e }) => p({
136
+ id: R.value ? `dialog_${C}` : void 0,
137
+ "aria-labelledby": R.value ? w.value : void 0,
138
+ class: ["bb-dropdown__panel", { "bb-dropdown__panel--reserve-check": nn.value }],
139
139
  "data-bb-dropdown-surface": C,
140
- inert: Qe.value,
141
- role: L.value ? "dialog" : void 0,
140
+ inert: Ze.value,
141
+ role: R.value ? "dialog" : void 0,
142
142
  style: {
143
- "--w": nn.value,
143
+ "--w": an.value,
144
144
  "--max-h": e == null ? void 0 : `${e}px`
145
145
  }
146
- }, S.panel), et = h({}), tt = h(/* @__PURE__ */ new Set()), { isMobile: nt } = se(), rt = () => (b.adaptive ?? We.adaptive) && nt.value ? "canvas" : "popover", it = g(rt()), D = d(() => it.value === "canvas");
146
+ }, S.panel), D = h({}), et = h(/* @__PURE__ */ new Set()), { isMobile: tt } = ce(), nt = () => (b.adaptive ?? Ue.adaptive) && tt.value ? "canvas" : "popover", rt = g(nt()), O = u(() => rt.value === "canvas");
147
147
  y([
148
148
  () => b.adaptive,
149
- nt,
149
+ tt,
150
150
  E
151
151
  ], () => {
152
- E.value || (it.value = rt());
153
- }), ce(D);
154
- let at = d(() => ({
152
+ E.value || (rt.value = nt());
153
+ }), le(O);
154
+ let it = u(() => ({
155
155
  side: "bottom",
156
156
  size: "auto",
157
157
  draggable: !0,
@@ -160,11 +160,11 @@ var ze = [
160
160
  transitionDuration: b.transitionDuration,
161
161
  hideClose: !0,
162
162
  ...b.offCanvasProps
163
- })), ot = d(() => {
163
+ })), at = u(() => {
164
164
  let e = b.trigger;
165
165
  return new Set(Array.isArray(e) ? e : [e]);
166
- }), st = (e, t) => {
167
- let n = Je.value, r = n?.getBoundingClientRect(), i = r ? e - r.left : 0, a = r ? t - r.top : 0;
166
+ }), ot = (e, t) => {
167
+ let n = qe.value, r = n?.getBoundingClientRect(), i = r ? e - r.left : 0, a = r ? t - r.top : 0;
168
168
  return {
169
169
  contextElement: n ?? void 0,
170
170
  getBoundingClientRect: () => {
@@ -184,72 +184,72 @@ var ze = [
184
184
  };
185
185
  }
186
186
  };
187
- }, O = g(null), ct = d(() => b.anchor ?? T.value), lt = d(() => re(ct.value)), ut = d(() => b.placement === "cursor" && O.value ? O.value : ct.value), dt = (e) => {
188
- let t = re(e);
187
+ }, k = g(null), st = u(() => b.anchor ?? T.value), ct = u(() => ie(st.value)), lt = u(() => b.placement === "cursor" && k.value ? k.value : st.value), ut = (e) => {
188
+ let t = ie(e);
189
189
  t && (T.value = t);
190
- }, ft = !1, { resume: pt, pause: mt } = Re(Je, async ([{ intersectionRatio: e }]) => {
191
- if (ft) {
192
- ft = !1;
190
+ }, dt = !1, { resume: ft, pause: pt } = Le(qe, async ([{ intersectionRatio: e }]) => {
191
+ if (dt) {
192
+ dt = !1;
193
193
  return;
194
194
  }
195
195
  if (e >= .99 || !E.value) return;
196
- let t = Je.value;
197
- t && await xe(t) || E.value && await $();
196
+ let t = qe.value;
197
+ t && await Se(t) || E.value && await Q();
198
198
  }, {
199
199
  threshold: [0, 1],
200
200
  immediate: !1
201
- }), k = h({}), ht = h(/* @__PURE__ */ new Map()), A = h(/* @__PURE__ */ new Map()), j = /* @__PURE__ */ new Map(), gt = /* @__PURE__ */ new Map(), _t = !1, vt = (e) => !!j.get(e)?.controlled(), M = (e, t) => j.get(e)?.request(t), N = (e, t) => {
201
+ }), A = h({}), mt = h(/* @__PURE__ */ new Map()), j = h(/* @__PURE__ */ new Map()), M = /* @__PURE__ */ new Map(), ht = /* @__PURE__ */ new Map(), gt = !1, _t = (e) => !!M.get(e)?.controlled(), N = (e, t) => M.get(e)?.request(t), P = (e, t) => {
202
202
  for (let n of e) {
203
- if (u(n)) {
204
- if (n.key === t) return n;
205
- for (let e of l(n.items)) {
203
+ if (l(n)) {
204
+ if (n.id === t) return n;
205
+ for (let e of c(n.items)) {
206
206
  let n = Array.isArray(e) ? e : [e];
207
207
  for (let e of n) {
208
- let n = e.items ? N(e.items, t) : void 0;
208
+ let n = e.items ? P(e.items, t) : void 0;
209
209
  if (n) return n;
210
210
  }
211
211
  }
212
212
  continue;
213
213
  }
214
214
  if (Array.isArray(n)) {
215
- let e = N(n, t);
215
+ let e = P(n, t);
216
216
  if (e) return e;
217
217
  continue;
218
218
  }
219
- let e = n.items ? N(n.items, t) : void 0;
219
+ let e = n.items ? P(n.items, t) : void 0;
220
220
  if (e) return e;
221
221
  }
222
- }, P = (e, t) => {
222
+ }, F = (e, t) => {
223
223
  for (let n of e) {
224
224
  if (Array.isArray(n)) {
225
- let e = P(n, t);
225
+ let e = F(n, t);
226
226
  if (e) return e;
227
227
  continue;
228
228
  }
229
- if (u(n)) {
230
- if (n.key === t) return "group";
231
- for (let e of l(n.items)) {
229
+ if (l(n)) {
230
+ if (n.id === t) return "group";
231
+ for (let e of c(n.items)) {
232
232
  let n = Array.isArray(e) ? e : [e];
233
233
  for (let e of n) {
234
- if (e.key === t) return "item";
234
+ if (e.value === t) return "item";
235
235
  if (e.items) {
236
- let n = P(e.items, t);
236
+ let n = F(e.items, t);
237
237
  if (n) return n;
238
238
  }
239
239
  }
240
240
  }
241
241
  continue;
242
242
  }
243
- if (n.key === t) return "item";
243
+ if (n.value === t) return "item";
244
244
  if (n.items) {
245
- let e = P(n.items, t);
245
+ let e = F(n.items, t);
246
246
  if (e) return e;
247
247
  }
248
248
  }
249
- }, yt = d(() => Array.from(ht.values()).map((e) => e.value).sort((e, t) => e.order - t.order)), bt = (e, t) => ({
249
+ }, vt = u(() => Array.from(mt.values()).map((e) => e.value).sort((e, t) => e.order - t.order)), yt = (e, t) => ({
250
250
  ...e,
251
251
  group: !0,
252
- key: e.key,
252
+ id: e.id,
253
253
  selectable: t.selectable ?? e.selectable,
254
254
  multiple: t.multiple ?? e.multiple,
255
255
  label: t.label ?? e.label,
@@ -259,9 +259,9 @@ var ze = [
259
259
  "append:icon": t["append:icon"] ?? e["append:icon"],
260
260
  variant: t.variant ?? e.variant,
261
261
  onClick: t.onClick ?? e.onClick
262
- }), xt = (e, t) => ({
262
+ }), bt = (e, t) => ({
263
263
  group: !0,
264
- key: e.key,
264
+ id: e.key,
265
265
  label: e.label ?? t?.label,
266
266
  hideLabel: e.hideLabel ?? t?.hideLabel,
267
267
  items: e.items ?? t?.items ?? [],
@@ -271,10 +271,10 @@ var ze = [
271
271
  "append:icon": e["append:icon"] ?? t?.["append:icon"],
272
272
  variant: e.variant ?? t?.variant,
273
273
  onClick: e.onClick ?? t?.onClick
274
- }), St = (e, t) => {
274
+ }), xt = (e, t) => {
275
275
  let n = !1, r = (e) => {
276
276
  if (!e.items) return e;
277
- let r = St(e.items, t);
277
+ let r = xt(e.items, t);
278
278
  return r.found ? (n = !0, {
279
279
  ...e,
280
280
  items: r.items
@@ -282,367 +282,375 @@ var ze = [
282
282
  };
283
283
  return {
284
284
  items: e.map((e) => {
285
- if (u(e)) {
286
- if (e.key === t.key) return n = !0, bt(e, t);
285
+ if (l(e)) {
286
+ if (e.id === t.id) return n = !0, yt(e, t);
287
287
  if (typeof e.items == "function") return e;
288
- let i = l(e.items).map((e) => Array.isArray(e) ? e.map((e) => r(e)) : r(e));
288
+ let i = c(e.items).map((e) => Array.isArray(e) ? e.map((e) => r(e)) : r(e));
289
289
  return {
290
290
  ...e,
291
291
  items: i
292
292
  };
293
293
  }
294
294
  if (Array.isArray(e)) {
295
- let r = St(e, t);
295
+ let r = xt(e, t);
296
296
  return r.found && (n = !0), r.items;
297
297
  }
298
298
  return r(e);
299
299
  }),
300
300
  found: n
301
301
  };
302
- }, F = d(() => {
302
+ }, I = u(() => {
303
303
  let e = [...b.items ?? []];
304
- for (let t of yt.value) {
305
- let n = N(e, t.key);
306
- !n && !t.items?.length && (P(e, t.key) === "item" && Ge.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 key.`), Ge.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 key in \`BbDropdown.items\`.`));
307
- let r = xt(t, n), i = St(e, r);
304
+ for (let t of vt.value) {
305
+ let n = P(e, t.key);
306
+ !n && !t.items?.length && (F(e, t.key) === "item" && We.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\`.`), We.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\`.`));
307
+ let r = bt(t, n), i = xt(e, r);
308
308
  e = i.found ? i.items : [...i.items, r];
309
309
  }
310
310
  return e;
311
- }), I = d(() => me(F.value).map((e) => e.selectable ? {
311
+ }), St = (e) => {
312
+ let t = A[e.id ?? ""] ?? [];
313
+ if (e.multiple || t.length || !e.id) return t;
314
+ 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));
315
+ return r ? [r.rowKey] : t;
316
+ }, Ct = u(() => he(I.value)), L = u(() => Ct.value.map((e) => e.selectable ? {
312
317
  ...e,
313
- selected: k[e.key ?? ""] ?? []
314
- } : e)), L = d(() => pe(I.value)), Ct = g(), wt = d(() => L.value || D.value ? "dialog" : "menu"), Tt = d(() => L.value && !D.value ? `dialog_${C}` : `menu_${C}`), Et = (e) => typeof e.items == "function" || e.itemText != null || e.itemProps != null || e.itemValue != null || e.max != null, R = (e, t = []) => {
315
- for (let n of e) if (u(n)) {
316
- n.key && Et(n) && t.push(n.key);
317
- for (let e of l(n.items)) for (let n of Array.isArray(e) ? e : [e]) n.items && R(n.items, t);
318
- } else Array.isArray(n) ? R(n, t) : n.items && R(n.items, t);
318
+ selected: St(e)
319
+ } : e)), R = u(() => me(L.value)), wt = g(), Tt = u(() => R.value || O.value ? "dialog" : "menu"), Et = u(() => R.value && !O.value ? `dialog_${C}` : `menu_${C}`), Dt = (e) => typeof e.items == "function" || e.itemText != null || e.itemProps != null || e.itemValue != null || e.max != null, z = (e, t = []) => {
320
+ for (let n of e) if (l(n)) {
321
+ n.id && Dt(n) && t.push(n.id);
322
+ for (let e of c(n.items)) for (let n of Array.isArray(e) ? e : [e]) n.items && z(n.items, t);
323
+ } else Array.isArray(n) ? z(n, t) : n.items && z(n.items, t);
319
324
  return t;
320
- }, z = d(() => R(b.items ?? [])), Dt = d(() => (b.items ?? []).filter((e) => u(e) && !!e.key && Et(e)).map((e) => e.key)), B = h({}), Ot = h({}), kt = h({}), V = (e, t) => z.value.includes(e) ? B[e]?.valueByKey.get(t) : t, H = (e) => {
321
- let t = N(b.items ?? [], e);
325
+ }, B = u(() => z(b.items ?? [])), Ot = u(() => (b.items ?? []).filter((e) => l(e) && !!e.id && Dt(e)).map((e) => e.id)), V = h({}), kt = h({}), At = h({}), H = (e, t) => B.value.includes(e) ? V[e]?.valueByKey.get(t) : W(e)?.items.find((e) => e.rowKey === t && !e.keyless)?.value, U = (e) => {
326
+ let t = P(b.items ?? [], e);
322
327
  if (t) return {
323
328
  multiple: t.multiple ?? !1,
324
- selectable: fe(t)
329
+ selectable: pe(t)
325
330
  };
326
- }, U = (e) => {
331
+ }, W = (e) => {
327
332
  let t = (n) => {
328
- for (let r of me(n)) {
329
- if (r.key === e) return r;
333
+ for (let r of he(n)) {
334
+ if (r.id === e) return r;
330
335
  for (let e of r.items) if (e.items) {
331
336
  let n = t(e.items);
332
337
  if (n) return n;
333
338
  }
334
339
  }
335
340
  };
336
- return t(F.value);
337
- }, At = (e, t) => z.value.includes(e) ? i(t) : t, jt = (e) => {
338
- if (A.has(e)) return A.get(e);
339
- let t = (k[e] ?? []).map((t) => V(e, t));
340
- return H(e)?.multiple ? t : t[0] ?? null;
341
- }, Mt = (e, t) => [].concat(A.get(e) ?? []).find((n) => At(e, n) === t);
342
- ve({
343
- bindController: (e, t) => j.set(e, t),
344
- unbindController: (e, t) => j.get(e) === t ? (j.delete(e), !0) : !1,
341
+ return t(I.value);
342
+ }, jt = (e, t) => i(t), Mt = (e) => {
343
+ if (j.has(e)) return j.get(e);
344
+ let t = (A[e] ?? []).map((t) => H(e, t));
345
+ return U(e)?.multiple ? t : t[0] ?? null;
346
+ }, Nt = (e, t) => [].concat(j.get(e) ?? []).find((n) => jt(e, n) === t);
347
+ ye({
348
+ bindController: (e, t) => M.set(e, t),
349
+ unbindController: (e, t) => M.get(e) === t ? (M.delete(e), !0) : !1,
345
350
  onPick: (e, t) => {
346
- t ? gt.set(e, t) : gt.delete(e);
351
+ t ? ht.set(e, t) : ht.delete(e);
347
352
  },
348
- isControlled: vt,
349
- request: M,
350
- register: (e, t) => ht.set(e, t),
351
- unregister: (e) => ht.delete(e),
353
+ isControlled: _t,
354
+ request: N,
355
+ register: (e, t) => mt.set(e, t),
356
+ unregister: (e) => mt.delete(e),
352
357
  seed: (e, t) => {
353
- e in k || (k[e] = t);
358
+ e in A || (A[e] = t);
354
359
  },
355
360
  setSelection: (e, t) => {
356
- _t = !0;
361
+ gt = !0;
357
362
  try {
358
- k[e] = t;
363
+ A[e] = t;
359
364
  } finally {
360
- _t = !1;
365
+ gt = !1;
361
366
  }
362
367
  },
363
- isAppWrite: () => _t,
364
- selectionFor: (e) => k[e] ?? [],
365
- isPipeline: (e) => z.value.includes(e),
368
+ isAppWrite: () => gt,
369
+ selectionFor: (e) => A[e] ?? [],
370
+ isPipeline: (e) => B.value.includes(e),
366
371
  publishPipeline: (e, t) => {
367
- t ? B[e] = t : delete B[e];
372
+ t ? V[e] = t : delete V[e];
368
373
  },
369
374
  publishLoading: (e, t) => {
370
- t ? Ot[e] = !0 : delete Ot[e];
375
+ t ? kt[e] = !0 : delete kt[e];
371
376
  },
372
377
  publishFetching: (e, t) => {
373
- t ? kt[e] = !0 : delete kt[e];
378
+ t ? At[e] = !0 : delete At[e];
374
379
  },
375
380
  publishModel: (e, t) => {
376
- t === void 0 ? A.delete(e) : A.set(e, t);
381
+ t === void 0 ? j.delete(e) : j.set(e, t);
377
382
  },
378
- modelValueFor: jt,
379
- valueForKey: V,
380
- keyForValue: At,
381
- itemForKey: (e, t) => B[e]?.itemByKey.get(t) ?? U(e)?.items.find((e) => e.key === t),
382
- configFor: (e) => N(b.items ?? [], e),
383
- itemsFor: (e) => U(e)?.items ?? [],
384
- selectableFor: (e) => H(e)?.selectable,
385
- multipleFor: (e) => H(e)?.multiple
383
+ modelValueFor: Mt,
384
+ valueForKey: H,
385
+ keyForValue: jt,
386
+ itemForKey: (e, t) => V[e]?.itemByKey.get(t) ?? W(e)?.items.find((e) => e.rowKey === t),
387
+ configFor: (e) => P(b.items ?? [], e),
388
+ itemsFor: (e) => W(e)?.items ?? [],
389
+ selectableFor: (e) => U(e)?.selectable,
390
+ multipleFor: (e) => U(e)?.multiple
386
391
  });
387
- let W = (e, t = []) => {
388
- for (let n of e) if (u(n)) {
389
- n.key && fe(n) && t.push(n.key);
390
- for (let e of l(n.items)) for (let n of Array.isArray(e) ? e : [e]) n.items && W(n.items, t);
391
- } else Array.isArray(n) ? W(n, t) : n.items && W(n.items, t);
392
+ let G = (e, t = []) => {
393
+ for (let n of e) if (l(n)) {
394
+ n.id && pe(n) && t.push(n.id);
395
+ for (let e of c(n.items)) for (let n of Array.isArray(e) ? e : [e]) n.items && G(n.items, t);
396
+ } else Array.isArray(n) ? G(n, t) : n.items && G(n.items, t);
392
397
  return t;
393
- }, Nt = d(() => {
398
+ }, Pt = u(() => {
394
399
  let e = {};
395
- for (let t of W(F.value)) {
396
- let n = jt(t), r = (H(t)?.multiple ? [].concat(n) : [n]).filter((e) => e != null), i = B[t], a = U(t), o = N(F.value, t), { items: s, ...c } = o ?? {};
400
+ for (let t of G(I.value)) {
401
+ let n = Mt(t), r = (U(t)?.multiple ? [].concat(n) : [n]).filter((e) => e != null), i = V[t], a = W(t), o = P(I.value, t), { items: s, ...ee } = o ?? {};
397
402
  e[t] = {
398
- ...c,
399
- key: t,
403
+ ...ee,
404
+ id: t,
400
405
  value: n,
401
406
  multiple: o?.multiple ?? !1,
402
- selectable: o ? fe(o) : !1,
403
- loading: !!kt[t],
407
+ selectable: o ? pe(o) : !1,
408
+ loading: !!At[t],
404
409
  selectedOptions: r.map((e) => {
405
- let n = At(t, e);
410
+ let n = jt(t, e), r = a?.items.find((e) => e.rowKey === n);
406
411
  return {
407
412
  value: e,
408
- text: i?.textByKey.get(n) ?? a?.items.find((e) => e.key === n)?.text,
409
- description: i?.descriptionByKey.get(n) ?? a?.items.find((e) => e.key === n)?.description,
410
- original: i?.itemByKey.get(n) ?? a?.items.find((e) => e.key === n)
413
+ label: i?.textByKey.get(n) ?? r?.label,
414
+ description: i?.descriptionByKey.get(n) ?? r?.description,
415
+ original: i?.itemByKey.get(n) ?? r
411
416
  };
412
417
  })
413
418
  };
414
419
  }
415
420
  return e;
416
421
  });
417
- oe(() => b.id, {
422
+ se(() => b.id, {
418
423
  open: () => E.value,
419
- groups: () => Nt.value
424
+ groups: () => Pt.value
420
425
  });
421
- let Pt = d(() => I.value.filter((e) => e.selectable).length), Ft = (e, t) => {
422
- let n = e.key;
426
+ let Ft = u(() => L.value.filter((e) => e.selectable).length), It = (e, t) => {
427
+ let n = e.id;
423
428
  if (!n) return;
424
- let r = k[n] ?? [], i = new Set(r);
425
- e.multiple ? i.has(t.key) ? i.delete(t.key) : i.add(t.key) : i.has(t.key) ? e.clearable && i.clear() : (i.clear(), i.add(t.key));
426
- let a = [...i], o = a.filter((e) => !r.includes(e)), s = r.filter((e) => !a.includes(e)), c = vt(n);
427
- if (c) {
428
- let r = V(n, t.key);
429
- o.length && gt.get(n)?.(t.key), e.multiple ? o.length ? M(n, { add: r }) : s.length && M(n, { remove: r }) : o.length ? M(n, { replace: r }) : s.length && M(n, { clear: !0 });
430
- } else k[n] = a;
431
- let ee = (t) => e.items.find((e) => e.key === t);
429
+ let r = St(e), i = new Set(r);
430
+ 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));
431
+ let a = [...i], o = a.filter((e) => !r.includes(e)), s = r.filter((e) => !a.includes(e)), ee = _t(n);
432
+ if (ee) {
433
+ let r = H(n, t.rowKey);
434
+ o.length && ht.get(n)?.(t.rowKey), e.multiple ? o.length ? N(n, { add: r }) : s.length && N(n, { remove: r }) : o.length ? N(n, { replace: r }) : s.length && N(n, { clear: !0 });
435
+ } else A[n] = a;
436
+ let te = (t) => e.items.find((e) => e.rowKey === t);
432
437
  o.forEach((e) => {
433
- ee(e) && x("item:selected", V(n, e));
438
+ te(e) && x("item:selected", H(n, e));
434
439
  }), s.forEach((e) => {
435
- ee(e) ? x("item:unselected", V(n, e)) : c && x("item:unselected", Mt(n, e));
440
+ te(e) ? x("item:unselected", H(n, e)) : ee && x("item:unselected", Nt(n, e));
436
441
  });
437
- let te = Pt.value === 1 && I.value.some((e) => e.selectable && e.key === n);
438
- (o.length > 0 || r.includes(t.key) && a.includes(t.key)) && !e.multiple && te && ($(), K());
439
- }, G = h(/* @__PURE__ */ new Set()), It = (e) => G.has(e), Lt = d(() => G.size > 0), Rt = (e) => e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function", zt = async () => {
440
- await $();
442
+ let ne = Ft.value === 1 && L.value.some((e) => e.selectable && e.id === n);
443
+ (o.length > 0 || r.includes(t.rowKey) && a.includes(t.rowKey)) && !e.multiple && ne && (Q(), q());
444
+ }, K = h(/* @__PURE__ */ new Set()), Lt = (e) => K.has(e), Rt = u(() => K.size > 0), zt = (e) => e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function", Bt = async () => {
445
+ await Q();
441
446
  let e = document.activeElement;
442
- e instanceof HTMLElement && e !== document.body && !e.closest(`[data-bb-dropdown-surface="${C}"]`) || K();
443
- }, Bt = async (e, t, { close: n = !1 } = {}) => {
447
+ e instanceof HTMLElement && e !== document.body && !e.closest(`[data-bb-dropdown-surface="${C}"]`) || q();
448
+ }, Vt = async (e, t, { close: n = !1 } = {}) => {
444
449
  let r = e.onClick?.(t);
445
- if (n && await zt(), Rt(r)) {
446
- G.add(e.key);
450
+ if (n && await Bt(), zt(r)) {
451
+ K.add(e.rowKey);
447
452
  try {
448
453
  await r;
449
454
  } finally {
450
- G.delete(e.key);
455
+ K.delete(e.rowKey);
451
456
  }
452
457
  }
453
- }, Vt = Fe("root-list"), K = () => {
458
+ }, Ht = Pe("root-list"), q = () => {
454
459
  (T.value ?? (w.value ? document.getElementById(w.value) : null))?.focus();
455
460
  };
456
- he({
461
+ ge({
457
462
  passthrough: S,
458
463
  rootId: C,
459
464
  activatorId: w,
460
465
  setStatus: (e) => {
461
- Ct.value = e;
466
+ wt.value = e;
462
467
  },
463
- status: Ct,
468
+ status: wt,
464
469
  open: E,
465
- queryFor: (e) => et[e] ?? "",
470
+ queryFor: (e) => D[e] ?? "",
466
471
  setQuery: (e, t) => {
467
- et[e] = t;
472
+ D[e] = t;
468
473
  },
469
474
  activateGroup: (e) => {
470
- tt.has(e) || tt.add(e);
475
+ et.has(e) || et.add(e);
471
476
  },
472
- isActivated: (e) => tt.has(e),
473
- isPipelineGroup: (e) => z.value.includes(e),
474
- isGroupLoading: (e) => !!Ot[e],
475
- isTopLevelPipeline: (e) => Dt.value.includes(e),
476
- queryDebounceTime: d(() => b.queryDebounceTime ?? 300),
477
- selectedFor: (e) => k[e] ?? [],
478
- loadingText: d(() => b.loadingText),
479
- emptyText: d(() => b.emptyText),
480
- failedText: d(() => b.failedText),
481
- enforceCoherence: d(() => b.enforceCoherence),
482
- placement: d(() => b.placement),
483
- disabled: d(() => !!b.disabled),
477
+ isActivated: (e) => et.has(e),
478
+ isPipelineGroup: (e) => B.value.includes(e),
479
+ isGroupLoading: (e) => !!kt[e],
480
+ isTopLevelPipeline: (e) => Ot.value.includes(e),
481
+ queryDebounceTime: u(() => b.queryDebounceTime ?? 300),
482
+ selectedFor: (e) => {
483
+ let t = W(e);
484
+ return t ? St(t) : A[e] ?? [];
485
+ },
486
+ loadingText: u(() => b.loadingText),
487
+ emptyText: u(() => b.emptyText),
488
+ failedText: u(() => b.failedText),
489
+ enforceCoherence: u(() => b.enforceCoherence),
490
+ placement: u(() => b.placement),
491
+ disabled: u(() => !!b.disabled),
484
492
  selectedChipsFor: (e) => {
485
- let t = U(e), n = B[e];
486
- return (k[e] ?? []).map((r) => ({
493
+ let t = W(e), n = V[e];
494
+ return (A[e] ?? []).map((r) => ({
487
495
  key: r,
488
- text: n?.textByKey.get(r) ?? t?.items.find((e) => e.key === r)?.text ?? be(V(e, r) ?? Mt(e, r))
496
+ text: n?.textByKey.get(r) ?? t?.items.find((e) => e.rowKey === r)?.label ?? xe(H(e, r) ?? Nt(e, r))
489
497
  }));
490
498
  },
491
499
  deselect: (e, t) => {
492
- let n = k[e] ?? [];
500
+ let n = A[e] ?? [];
493
501
  if (n.includes(t)) {
494
- if (vt(e)) {
495
- let n = V(e, t) ?? Mt(e, t);
496
- M(e, { remove: n }), x("item:unselected", n);
502
+ if (_t(e)) {
503
+ let n = H(e, t) ?? Nt(e, t);
504
+ N(e, { remove: n }), x("item:unselected", n);
497
505
  return;
498
506
  }
499
- k[e] = n.filter((e) => e !== t), x("item:unselected", V(e, t));
507
+ A[e] = n.filter((e) => e !== t), x("item:unselected", H(e, t));
500
508
  }
501
509
  },
502
- close: () => $(),
503
- focusActivator: K,
504
- toggleSelect: Ft,
505
- isItemLoading: It,
506
- runItemAction: Bt,
507
- slots: Pe()
510
+ close: () => Q(),
511
+ focusActivator: q,
512
+ toggleSelect: It,
513
+ isItemLoading: Lt,
514
+ runItemAction: Vt,
515
+ slots: Ne()
508
516
  });
509
- let Ht = (e) => {
517
+ let Ut = (e) => {
510
518
  if (!b.disabled) {
511
- if (J) {
512
- J = !1, e.preventDefault(), e.stopPropagation();
519
+ if (Y) {
520
+ Y = !1, e.preventDefault(), e.stopPropagation();
513
521
  return;
514
522
  }
515
- e.stopPropagation(), b.placement === "cursor" && (O.value = st(e.clientX, e.clientY)), E.value ? $() : Q();
523
+ e.stopPropagation(), b.placement === "cursor" && (k.value = ot(e.clientX, e.clientY)), E.value ? Q() : Z();
516
524
  }
517
- }, Ut = async (e) => {
525
+ }, Wt = async (e) => {
518
526
  if (!b.disabled) {
519
527
  if (e.preventDefault(), e.stopPropagation(), b.placement === "cursor") {
520
- let t = st(e.clientX, e.clientY);
528
+ let t = ot(e.clientX, e.clientY);
521
529
  if (E.value) {
522
- await $(), await ue(b.transitionDuration), O.value = t, await Q();
530
+ await Q(), await de(b.transitionDuration), k.value = t, await Z();
523
531
  return;
524
532
  }
525
- O.value = t;
533
+ k.value = t;
526
534
  }
527
- E.value ? $() : Q();
535
+ E.value ? Q() : Z();
528
536
  }
529
- }, Wt, q = null, J = !1, Y = () => {
530
- clearTimeout(Wt), q = null;
531
- }, Gt = (e) => {
532
- b.disabled || e.pointerType === "mouse" || (J = !1, q = {
537
+ }, Gt, J = null, Y = !1, Kt = () => {
538
+ clearTimeout(Gt), J = null;
539
+ }, qt = (e) => {
540
+ b.disabled || e.pointerType === "mouse" || (Y = !1, J = {
533
541
  x: e.clientX,
534
542
  y: e.clientY
535
- }, Wt = setTimeout(() => {
536
- J = !0, b.placement === "cursor" && q && (O.value = st(q.x, q.y)), q = null, Q();
537
- }, He));
538
- }, Kt = (e) => {
539
- if (!q) return;
540
- let t = e.clientX - q.x, n = e.clientY - q.y;
541
- Math.sqrt(t * t + n * n) > Ue && Y();
542
- }, X = () => {
543
- Y();
544
- }, qt = async (e) => {
545
- b.disabled || (e.key === "ArrowDown" ? (e.preventDefault(), E.value || await Q(), await ue(0), Vt.value?.focusFirst()) : e.key === "ArrowUp" ? (e.preventDefault(), E.value || await Q(), await ue(0), Vt.value?.focusLast()) : e.key === "Tab" && E.value && !e.shiftKey && (e.preventDefault(), Vt.value?.focusFirst()));
546
- }, Jt = !1, Yt = () => {
547
- Jt = !0, setTimeout(() => Jt = !1, 0);
548
- }, Z = (e) => {
543
+ }, Gt = setTimeout(() => {
544
+ Y = !0, b.placement === "cursor" && J && (k.value = ot(J.x, J.y)), J = null, Z();
545
+ }, Ve));
546
+ }, Jt = (e) => {
547
+ if (!J) return;
548
+ let t = e.clientX - J.x, n = e.clientY - J.y;
549
+ Math.sqrt(t * t + n * n) > He && Kt();
550
+ }, Yt = () => {
551
+ Kt();
552
+ }, Xt = async (e) => {
553
+ b.disabled || (e.key === "ArrowDown" ? (e.preventDefault(), E.value || await Z(), await de(0), Ht.value?.focusFirst()) : e.key === "ArrowUp" ? (e.preventDefault(), E.value || await Z(), await de(0), Ht.value?.focusLast()) : e.key === "Tab" && E.value && !e.shiftKey && (e.preventDefault(), Ht.value?.focusFirst()));
554
+ }, Zt = !1, Qt = () => {
555
+ Zt = !0, setTimeout(() => Zt = !1, 0);
556
+ }, X = (e) => {
549
557
  let t = e.target;
550
- t instanceof HTMLElement && (e.type === "focusin" && Jt && T.value?.contains(t) || t.closest(`[data-bb-dropdown-surface="${C}"]`) || e.type === "focusin" && t.querySelector(`[data-bb-dropdown-surface="${C}"]`) || $());
551
- }, Xt = (e) => {
558
+ t instanceof HTMLElement && (e.type === "focusin" && Zt && T.value?.contains(t) || t.closest(`[data-bb-dropdown-surface="${C}"]`) || e.type === "focusin" && t.querySelector(`[data-bb-dropdown-surface="${C}"]`) || Q());
559
+ }, $t = (e) => {
552
560
  let t = e.detail;
553
- !t || t.surfaceId === C || t.activator?.closest(`[data-bb-dropdown-surface="${C}"]`) || $();
554
- }, Zt = (e) => {
555
- !E.value || e.key !== "Escape" || o(qe) && (e.stopImmediatePropagation(), e.preventDefault(), document.activeElement !== T.value && K(), $());
556
- }, Q = async () => {
557
- it.value = rt(), ft = !0, E.value = !0, document.dispatchEvent(new CustomEvent(Ve, { detail: {
561
+ !t || t.surfaceId === C || t.activator?.closest(`[data-bb-dropdown-surface="${C}"]`) || Q();
562
+ }, en = (e) => {
563
+ !E.value || e.key !== "Escape" || o(Ke) && (e.stopImmediatePropagation(), e.preventDefault(), document.activeElement !== T.value && q(), Q());
564
+ }, Z = async () => {
565
+ rt.value = nt(), dt = !0, E.value = !0, document.dispatchEvent(new CustomEvent(Be, { detail: {
558
566
  surfaceId: C,
559
567
  activator: T.value
560
- } })), !D.value && (pt(), s(qe, { element: () => document.querySelector(`[data-bb-dropdown-surface="${CSS.escape(String(C))}"]`) }), document.addEventListener("click", Z, { passive: !0 }), document.addEventListener("contextmenu", Z, { passive: !0 }), document.addEventListener("focusin", Z, { passive: !0 }), document.addEventListener("keydown", Zt, { capture: !0 }), document.addEventListener(Ve, Xt));
561
- }, $ = async () => {
562
- E.value = !1, mt();
563
- }, Qt = () => {
564
- c(qe), document.removeEventListener("click", Z), document.removeEventListener("contextmenu", Z), document.removeEventListener("focusin", Z), document.removeEventListener("keydown", Zt, { capture: !0 }), document.removeEventListener(Ve, Xt);
568
+ } })), !O.value && (ft(), s(Ke, { element: () => document.querySelector(`[data-bb-dropdown-surface="${CSS.escape(String(C))}"]`) }), document.addEventListener("click", X, { passive: !0 }), document.addEventListener("contextmenu", X, { passive: !0 }), document.addEventListener("focusin", X, { passive: !0 }), document.addEventListener("keydown", en, { capture: !0 }), document.addEventListener(Be, $t));
569
+ }, Q = async () => {
570
+ E.value = !1, pt();
571
+ }, tn = () => {
572
+ ee(Ke), document.removeEventListener("click", X), document.removeEventListener("contextmenu", X), document.removeEventListener("focusin", X), document.removeEventListener("keydown", en, { capture: !0 }), document.removeEventListener(Be, $t);
565
573
  };
566
574
  y(E, (e) => {
567
575
  if (!e) {
568
- Qt();
569
- for (let e of Object.keys(et)) et[e] = "";
576
+ tn();
577
+ for (let e of Object.keys(D)) D[e] = "";
570
578
  }
571
579
  }), y(() => b.activator, (e) => {
572
- e && dt(e);
580
+ e && ut(e);
573
581
  }, { immediate: !0 });
574
- let $t = null;
575
- y([T, ot], ([e, t]) => {
576
- if ($t &&= ($t(), null), !e) return;
582
+ let $ = null;
583
+ y([T, at], ([e, t]) => {
584
+ if ($ &&= ($(), null), !e) return;
577
585
  let n = !1;
578
586
  e.id || (e.id = C, n = !0), w.value = e.id;
579
587
  let r = [];
580
- t.has("click") && (e.addEventListener("click", Ht), e.addEventListener("mousedown", Yt), r.push(() => {
581
- e.removeEventListener("click", Ht), e.removeEventListener("mousedown", Yt);
582
- })), t.has("contextMenu") && (e.addEventListener("contextmenu", Ut), e.addEventListener("pointerdown", Gt), e.addEventListener("pointermove", Kt), e.addEventListener("pointerup", X), e.addEventListener("pointercancel", X), r.push(() => {
583
- e.removeEventListener("contextmenu", Ut), e.removeEventListener("pointerdown", Gt), e.removeEventListener("pointermove", Kt), e.removeEventListener("pointerup", X), e.removeEventListener("pointercancel", X), Y();
584
- })), e.addEventListener("keydown", qt), r.push(() => e.removeEventListener("keydown", qt)), $t = () => {
588
+ t.has("click") && (e.addEventListener("click", Ut), e.addEventListener("mousedown", Qt), r.push(() => {
589
+ e.removeEventListener("click", Ut), e.removeEventListener("mousedown", Qt);
590
+ })), t.has("contextMenu") && (e.addEventListener("contextmenu", Wt), e.addEventListener("pointerdown", qt), e.addEventListener("pointermove", Jt), e.addEventListener("pointerup", Yt), e.addEventListener("pointercancel", Yt), r.push(() => {
591
+ e.removeEventListener("contextmenu", Wt), e.removeEventListener("pointerdown", qt), e.removeEventListener("pointermove", Jt), e.removeEventListener("pointerup", Yt), e.removeEventListener("pointercancel", Yt), Kt();
592
+ })), e.addEventListener("keydown", Xt), r.push(() => e.removeEventListener("keydown", Xt)), $ = () => {
585
593
  r.forEach((e) => e()), n && e.removeAttribute("id"), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls");
586
594
  };
587
595
  }, { immediate: !0 }), y([
588
596
  T,
589
597
  E,
590
- Ze,
591
- wt,
592
- Tt
598
+ Xe,
599
+ Tt,
600
+ Et
593
601
  ], ([e, t, n, r, i]) => {
594
602
  e && (e.setAttribute("aria-haspopup", r), e.setAttribute("aria-expanded", n ? String(t) : "false"), n ? e.setAttribute("aria-controls", i) : e.removeAttribute("aria-controls"));
595
- }, { immediate: !0 }), Ae(() => {
596
- Y(), $t?.(), Qt();
603
+ }, { immediate: !0 }), ke(() => {
604
+ Kt(), $?.(), tn();
597
605
  });
598
- let en = d(() => b.width === "auto"), { width: tn } = Le(d(() => E.value ? lt.value : null), {
606
+ let nn = u(() => b.width === "auto"), { width: rn } = Ie(u(() => E.value ? ct.value : null), {
599
607
  width: 0,
600
608
  height: 0
601
- }, { box: "border-box" }), nn = d(() => {
609
+ }, { box: "border-box" }), an = u(() => {
602
610
  if (b.width !== "auto") {
603
611
  if (b.width) {
604
- let { value: e, unit: t } = Se(b.width);
605
- return t === "%" ? lt.value ? `${tn.value * (e / 100)}px` : "0px" : `${e}px`;
612
+ let { value: e, unit: t } = Ce(b.width);
613
+ return t === "%" ? ct.value ? `${rn.value * (e / 100)}px` : "0px" : `${e}px`;
606
614
  }
607
615
  return "0px";
608
616
  }
609
617
  });
610
- return je(() => {
611
- $();
612
- }), (e, n) => (m(), f(Ce, null, [
613
- Ye.value ? Te("", !0) : _(e.$slots, "activator", ke(p({ key: 0 }, {
614
- props: { ref: dt },
618
+ return Ae(() => {
619
+ Q();
620
+ }), (e, n) => (m(), f(we, null, [
621
+ Je.value ? d("", !0) : _(e.$slots, "activator", Oe(p({ key: 0 }, {
622
+ props: { ref: ut },
615
623
  disabled: e.disabled,
616
- loading: Lt.value,
624
+ loading: Rt.value,
617
625
  open: E.value,
618
626
  placement: e.placement
619
627
  }))),
620
628
  _(e.$slots, "default"),
621
- (m(!0), f(Ce, null, Me(z.value, (e) => (m(), we(ye, {
629
+ (m(!0), f(we, null, je(B.value, (e) => (m(), Te(be, {
622
630
  id: e,
623
631
  key: e
624
632
  }, null, 8, ["id"]))), 128)),
625
- D.value ? (m(), we(_e, p({
633
+ O.value ? (m(), Te(ve, p({
626
634
  key: 1,
627
635
  modelValue: E.value,
628
636
  "onUpdate:modelValue": n[0] ||= (e) => E.value = e,
629
637
  compact: e.compact,
630
- "off-canvas-props": at.value,
631
- "root-groups": I.value
632
- }, p(Xe, v(t)(e.$attrs))), null, 16, [
638
+ "off-canvas-props": it.value,
639
+ "root-groups": L.value
640
+ }, p(Ye, v(t)(e.$attrs))), null, 16, [
633
641
  "modelValue",
634
642
  "compact",
635
643
  "off-canvas-props",
636
644
  "root-groups"
637
- ])) : (m(), we(ae, p({
645
+ ])) : (m(), Te(oe, p({
638
646
  key: 2,
639
647
  modelValue: E.value,
640
648
  "onUpdate:modelValue": n[1] ||= (e) => E.value = e,
641
- anchor: ut.value,
649
+ anchor: lt.value,
642
650
  boundary: e.boundary,
643
651
  "bubble-attrs": $e,
644
652
  class: ["bb-dropdown", {
645
- "bb-dropdown--mobile": v(nt),
653
+ "bb-dropdown--mobile": v(tt),
646
654
  "bb-dropdown--compact": e.compact
647
655
  }],
648
656
  eager: e.eager,
@@ -651,8 +659,8 @@ var ze = [
651
659
  padding: e.padding,
652
660
  placement: e.placement === "cursor" ? "bottom-start" : e.placement,
653
661
  "transition-duration": e.transitionDuration
654
- }, p(Xe, e.$attrs, v(S).root)), {
655
- default: Ie(() => [
662
+ }, p(Ye, e.$attrs, v(S).root)), {
663
+ default: Fe(() => [
656
664
  e.$slots.header ? (m(), f("div", p({
657
665
  key: 0,
658
666
  class: "bb-dropdown__header"
@@ -660,17 +668,18 @@ var ze = [
660
668
  disabled: e.disabled,
661
669
  open: E.value,
662
670
  placement: e.placement
663
- })], 16)) : Te("", !0),
671
+ })], 16)) : d("", !0),
664
672
  Ee("span", p({
665
673
  id: `menu_${v(C)}`,
666
- "aria-labelledby": L.value ? void 0 : w.value,
674
+ "aria-labelledby": R.value ? void 0 : w.value,
667
675
  class: "bb-dropdown__list scrollbar-border",
668
- role: L.value ? "none" : "menu"
669
- }, v(S).list), [De(ge, {
676
+ role: R.value ? "none" : "menu"
677
+ }, v(S).list), [Qe.value ? (m(), Te(_e, {
678
+ key: 0,
670
679
  ref: "root-list",
671
- groups: I.value
672
- }, null, 8, ["groups"])], 16, ze),
673
- Ee("span", Be, Ne(Ct.value), 1),
680
+ groups: L.value
681
+ }, null, 8, ["groups"])) : d("", !0)], 16, Re),
682
+ Ee("span", ze, Me(wt.value), 1),
674
683
  e.$slots.footer ? (m(), f("div", p({
675
684
  key: 1,
676
685
  class: "bb-dropdown__footer"
@@ -678,7 +687,7 @@ var ze = [
678
687
  disabled: e.disabled,
679
688
  open: E.value,
680
689
  placement: e.placement
681
- })], 16)) : Te("", !0)
690
+ })], 16)) : d("", !0)
682
691
  ]),
683
692
  _: 3
684
693
  }, 16, [