bitboss-ui 3.0.0-beta.70 → 3.0.0-beta.72

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 (413) hide show
  1. package/README.md +2 -2
  2. package/bin/cli.mjs +6 -1
  3. package/dist/ai/BbAccordion.md +38 -19
  4. package/dist/ai/BbBadge.md +25 -22
  5. package/dist/ai/BbBreadcrumbs.md +4 -1
  6. package/dist/ai/BbButton.md +32 -27
  7. package/dist/ai/BbCalendar.md +1 -0
  8. package/dist/ai/BbCarousel.md +6 -4
  9. package/dist/ai/BbCheckbox.md +5 -6
  10. package/dist/ai/BbCheckboxGroup.md +27 -27
  11. package/dist/ai/BbColorInput.md +4 -5
  12. package/dist/ai/BbConfirm.md +65 -81
  13. package/dist/ai/BbConfirmPortal.md +2 -2
  14. package/dist/ai/BbDatePicker.md +1 -6
  15. package/dist/ai/BbDatePickerInput.md +5 -6
  16. package/dist/ai/BbDialog.md +230 -164
  17. package/dist/ai/BbDropdown.md +87 -17
  18. package/dist/ai/BbDropdownButton.md +15 -15
  19. package/dist/ai/BbDropzone.md +12 -8
  20. package/dist/ai/BbForm.md +93 -7
  21. package/dist/ai/BbHost.md +2 -2
  22. package/dist/ai/BbHoverCardPortal.md +1 -1
  23. package/dist/ai/BbIcon.md +1 -1
  24. package/dist/ai/BbIndicator.md +17 -15
  25. package/dist/ai/BbNumberInput.md +10 -9
  26. package/dist/ai/BbOffCanvas.md +29 -7
  27. package/dist/ai/BbPagination.md +2 -2
  28. package/dist/ai/BbPopover.md +15 -9
  29. package/dist/ai/BbPopoverPortal.md +1 -1
  30. package/dist/ai/BbRadio.md +5 -6
  31. package/dist/ai/BbRadioGroup.md +53 -37
  32. package/dist/ai/BbRating.md +11 -16
  33. package/dist/ai/BbSelect.md +25 -5
  34. package/dist/ai/BbSelectPopover.md +9 -3
  35. package/dist/ai/BbSlider.md +15 -17
  36. package/dist/ai/BbSpinner.md +3 -2
  37. package/dist/ai/BbSwitch.md +9 -9
  38. package/dist/ai/BbSwitchGroup.md +11 -13
  39. package/dist/ai/BbTable.md +205 -82
  40. package/dist/ai/BbTabs.md +29 -4
  41. package/dist/ai/BbTag.md +4 -5
  42. package/dist/ai/BbTextInput.md +18 -16
  43. package/dist/ai/BbTextarea.md +12 -11
  44. package/dist/ai/BbTimePickerInput.md +4 -5
  45. package/dist/ai/BbToast.md +3 -2
  46. package/dist/ai/BbTooltip.md +39 -30
  47. package/dist/ai/BbTree.md +49 -24
  48. package/dist/ai/CommonField.md +2 -10
  49. package/dist/ai/CommonFieldInput.md +1 -1
  50. package/dist/ai/OptionsContainer.md +5 -13
  51. package/dist/ai/changelog.json +278 -10
  52. package/dist/ai/components.json +59 -58
  53. package/dist/ai/composables/useBbDialog.md +5 -8
  54. package/dist/ai/composables/useBbForm.md +3 -0
  55. package/dist/ai/composables/useConfirm.md +65 -56
  56. package/dist/ai/composables/useToast.md +2 -1
  57. package/dist/ai/guides/agent-contract.md +3 -3
  58. package/dist/ai/guides/app-layout.md +3 -2
  59. package/dist/ai/guides/eslint-rules.md +3 -1
  60. package/dist/ai/guides/fetch-items-playbook.md +1 -1
  61. package/dist/ai/guides/floating-bottom-panel.md +3 -2
  62. package/dist/ai/guides/icons-policy.md +7 -5
  63. package/dist/ai/guides/inertia-helpers.md +35 -30
  64. package/dist/ai/guides/installation-and-plugin-setup.md +17 -14
  65. package/dist/ai/guides/migration/adoption-checklist.md +2 -2
  66. package/dist/ai/guides/migration/components/bb-badge.md +12 -1
  67. package/dist/ai/guides/migration/components/bb-button.md +24 -0
  68. package/dist/ai/guides/migration/components/bb-dropdown-button.md +11 -0
  69. package/dist/ai/guides/migration/components/bb-tabs.md +2 -2
  70. package/dist/ai/guides/migration/components/bb-toast.md +11 -0
  71. package/dist/ai/guides/migration/components/use-confirm.md +69 -26
  72. package/dist/ai/guides/migration/v2-to-v3.md +78 -12
  73. package/dist/ai/guides/migration/v3-beta-css-classes.md +1 -1
  74. package/dist/ai/guides/options-items-playbook.md +4 -3
  75. package/dist/ai/guides/passthrough.md +2 -2
  76. package/dist/ai/guides/preset-components.md +35 -10
  77. package/dist/ai/helpers/definePreset.json +8 -1
  78. package/dist/ai/helpers/definePreset.ts +35 -10
  79. package/dist/ai/helpers/inertia/manifest.json +28 -15
  80. package/dist/ai/helpers/inertia/messages.ts +3 -3
  81. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +10 -10
  82. package/dist/ai/helpers/inertia/usePromiseForm.ts +1 -1
  83. package/dist/ai/helpers/inertia/usePromiseRouter.ts +7 -2
  84. package/dist/ai/index.md +3 -3
  85. package/dist/ai/manifest/common.json +5 -5
  86. package/dist/ai/manifest/components/BbAccordion.json +8 -5
  87. package/dist/ai/manifest/components/BbAccordion.tree.json +1 -0
  88. package/dist/ai/manifest/components/BbBadge.json +8 -7
  89. package/dist/ai/manifest/components/BbBadge.removed.json +3 -1
  90. package/dist/ai/manifest/components/BbBadge.tree.json +73 -0
  91. package/dist/ai/manifest/components/BbBreadcrumbs.json +2 -2
  92. package/dist/ai/manifest/components/BbButton.json +5 -6
  93. package/dist/ai/manifest/components/BbButton.removed.json +3 -1
  94. package/dist/ai/manifest/components/BbButton.tree.json +24 -7
  95. package/dist/ai/manifest/components/BbCalendar.json +2 -1
  96. package/dist/ai/manifest/components/BbCheckbox.json +2 -2
  97. package/dist/ai/manifest/components/BbCheckbox.tree.json +1 -1
  98. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  99. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +9 -19
  100. package/dist/ai/manifest/components/BbColorInput.json +3 -3
  101. package/dist/ai/manifest/components/BbColorInput.tree.json +2 -2
  102. package/dist/ai/manifest/components/BbConfirm.json +2 -2
  103. package/dist/ai/manifest/components/BbConfirm.removed.json +9 -0
  104. package/dist/ai/manifest/components/BbConfirm.tree.json +4 -5
  105. package/dist/ai/manifest/components/BbConfirmPortal.json +3 -3
  106. package/dist/ai/manifest/components/BbConfirmPortal.removed.json +7 -0
  107. package/dist/ai/manifest/components/BbDatePicker.json +2 -1
  108. package/dist/ai/manifest/components/BbDatePicker.tree.json +0 -6
  109. package/dist/ai/manifest/components/BbDatePickerInput.json +2 -2
  110. package/dist/ai/manifest/components/BbDatePickerInput.tree.json +2 -2
  111. package/dist/ai/manifest/components/BbDialog.json +6 -1
  112. package/dist/ai/manifest/components/BbDialog.tree.json +41 -1
  113. package/dist/ai/manifest/components/BbDropdown.json +10 -9
  114. package/dist/ai/manifest/components/BbDropdown.tree.json +4 -0
  115. package/dist/ai/manifest/components/BbDropdownButton.json +9 -10
  116. package/dist/ai/manifest/components/BbDropdownButton.removed.json +3 -1
  117. package/dist/ai/manifest/components/BbForm.json +3 -1
  118. package/dist/ai/manifest/components/BbNumberInput.json +1 -1
  119. package/dist/ai/manifest/components/BbNumberInput.tree.json +2 -2
  120. package/dist/ai/manifest/components/BbOffCanvas.json +6 -1
  121. package/dist/ai/manifest/components/BbOffCanvas.tree.json +40 -0
  122. package/dist/ai/manifest/components/BbPagination.json +1 -1
  123. package/dist/ai/manifest/components/BbRadio.tree.json +1 -1
  124. package/dist/ai/manifest/components/BbRadioGroup.json +4 -3
  125. package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -18
  126. package/dist/ai/manifest/components/BbRating.json +2 -2
  127. package/dist/ai/manifest/components/BbRating.tree.json +1 -1
  128. package/dist/ai/manifest/components/BbSelect.json +2 -1
  129. package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
  130. package/dist/ai/manifest/components/BbSelectPopover.json +1 -0
  131. package/dist/ai/manifest/components/BbSlider.tree.json +1 -1
  132. package/dist/ai/manifest/components/BbSwitch.json +4 -4
  133. package/dist/ai/manifest/components/BbSwitch.tree.json +1 -1
  134. package/dist/ai/manifest/components/BbSwitchGroup.json +7 -7
  135. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -2
  136. package/dist/ai/manifest/components/BbTable.json +15 -14
  137. package/dist/ai/manifest/components/BbTable.tree.json +2 -0
  138. package/dist/ai/manifest/components/BbTabs.json +3 -3
  139. package/dist/ai/manifest/components/BbTabsList.json +1 -1
  140. package/dist/ai/manifest/components/BbTabsRoot.json +1 -1
  141. package/dist/ai/manifest/components/BbTag.json +1 -1
  142. package/dist/ai/manifest/components/BbTag.tree.json +2 -2
  143. package/dist/ai/manifest/components/BbTextInput.json +1 -1
  144. package/dist/ai/manifest/components/BbTextInput.tree.json +2 -2
  145. package/dist/ai/manifest/components/BbTextarea.json +1 -1
  146. package/dist/ai/manifest/components/BbTextarea.tree.json +2 -2
  147. package/dist/ai/manifest/components/BbTimePicker.json +1 -1
  148. package/dist/ai/manifest/components/BbTimePickerInput.json +1 -1
  149. package/dist/ai/manifest/components/BbTimePickerInput.tree.json +2 -2
  150. package/dist/ai/manifest/components/BbToast.removed.json +2 -1
  151. package/dist/ai/manifest/components/BbTooltip.json +1 -1
  152. package/dist/ai/manifest/components/BbTooltip.tree.json +2 -2
  153. package/dist/ai/manifest/components/BbTree.json +2 -2
  154. package/dist/ai/manifest/components/CommonField.tree.json +5 -10
  155. package/dist/ai/manifest/components/CommonFieldInput.tree.json +3 -3
  156. package/dist/ai/manifest/components/OptionsContainer.tree.json +5 -13
  157. package/dist/ai/manifest/index.json +4 -4
  158. package/dist/ai/manifest/meta.json +5 -1
  159. package/dist/ai/manifest/types.advanced.json +9 -9
  160. package/dist/ai/manifest/types.api.json +7 -6
  161. package/dist/ai/recipes/inertia/approvals-inbox.md +23 -16
  162. package/dist/ai/recipes/inertia/inline-edit-workspace.md +12 -5
  163. package/dist/ai/recipes/inertia/layout-scaffold.md +5 -3
  164. package/dist/ai/recipes/inertia/onboarding.md +23 -12
  165. package/dist/ai/recipes/inertia/ownership-atlas.md +34 -18
  166. package/dist/ai/recipes/inertia/record-form.md +12 -8
  167. package/dist/ai/recipes/inertia/records-workspace.md +14 -7
  168. package/dist/ai/recipes/inertia/settings-workspace.md +75 -60
  169. package/dist/ai/recipes/inertia/upload-center.md +17 -9
  170. package/dist/ai/recipes/inertia/wizard-form.md +2 -2
  171. package/dist/ai/recipes/nuxt/approvals-inbox.md +23 -16
  172. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +12 -5
  173. package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -3
  174. package/dist/ai/recipes/nuxt/onboarding.md +5 -4
  175. package/dist/ai/recipes/nuxt/ownership-atlas.md +34 -18
  176. package/dist/ai/recipes/nuxt/record-form.md +14 -10
  177. package/dist/ai/recipes/nuxt/records-workspace.md +14 -7
  178. package/dist/ai/recipes/nuxt/settings-workspace.md +70 -60
  179. package/dist/ai/recipes/nuxt/upload-center.md +17 -9
  180. package/dist/ai/recipes/nuxt/wizard-form.md +4 -4
  181. package/dist/ai/recipes/vue/approvals-inbox.md +23 -16
  182. package/dist/ai/recipes/vue/inline-edit-workspace.md +12 -5
  183. package/dist/ai/recipes/vue/layout-scaffold.md +5 -3
  184. package/dist/ai/recipes/vue/onboarding.md +5 -4
  185. package/dist/ai/recipes/vue/ownership-atlas.md +34 -18
  186. package/dist/ai/recipes/vue/record-form.md +14 -10
  187. package/dist/ai/recipes/vue/records-workspace.md +14 -7
  188. package/dist/ai/recipes/vue/settings-workspace.md +70 -60
  189. package/dist/ai/recipes/vue/upload-center.md +17 -9
  190. package/dist/ai/recipes/vue/wizard-form.md +4 -4
  191. package/dist/ai/source/BbAccordion.md +50 -16
  192. package/dist/ai/source/BbBadge.md +420 -26
  193. package/dist/ai/source/BbBadgeButton.md +378 -12
  194. package/dist/ai/source/BbBreadcrumbs.md +31 -12
  195. package/dist/ai/source/BbButton.md +205 -55
  196. package/dist/ai/source/BbCalendar.md +5 -0
  197. package/dist/ai/source/BbCheckbox.md +36 -42
  198. package/dist/ai/source/BbCheckboxGroup.md +40 -17
  199. package/dist/ai/source/BbColorInput.md +2 -4
  200. package/dist/ai/source/BbConfigScope.md +19 -2
  201. package/dist/ai/source/BbConfirm.md +74 -80
  202. package/dist/ai/source/BbConfirmPortal.md +6 -6
  203. package/dist/ai/source/BbDatePicker.md +9 -2
  204. package/dist/ai/source/BbDatePickerInput.md +5 -5
  205. package/dist/ai/source/BbDialog.md +53 -2
  206. package/dist/ai/source/BbDropdown.md +360 -99
  207. package/dist/ai/source/BbDropdownButton.md +24 -13
  208. package/dist/ai/source/BbDropdownGroup.md +145 -60
  209. package/dist/ai/source/BbForm.md +144 -10
  210. package/dist/ai/source/BbNumberInput.md +2 -4
  211. package/dist/ai/source/BbOffCanvas.md +53 -2
  212. package/dist/ai/source/BbPagination.md +1 -1
  213. package/dist/ai/source/BbRadio.md +36 -42
  214. package/dist/ai/source/BbRadioGroup.md +74 -14
  215. package/dist/ai/source/BbRating.md +32 -36
  216. package/dist/ai/source/BbSelect.md +40 -13
  217. package/dist/ai/source/BbSelectPopover.md +105 -34
  218. package/dist/ai/source/BbSlider.md +2 -4
  219. package/dist/ai/source/BbSwitch.md +57 -46
  220. package/dist/ai/source/BbSwitchGroup.md +67 -21
  221. package/dist/ai/source/BbTable.md +363 -49
  222. package/dist/ai/source/BbTabs.md +6 -0
  223. package/dist/ai/source/BbTabsList.md +10 -0
  224. package/dist/ai/source/BbTabsPanels.md +6 -0
  225. package/dist/ai/source/BbTabsRoot.md +6 -0
  226. package/dist/ai/source/BbTag.md +2 -4
  227. package/dist/ai/source/BbTextInput.md +2 -4
  228. package/dist/ai/source/BbTextarea.md +2 -4
  229. package/dist/ai/source/BbTimePickerInput.md +2 -4
  230. package/dist/ai/source/BbTooltip.md +9 -3
  231. package/dist/ai/source/BbTree.md +14 -4
  232. package/dist/ai/source/CommonField.md +17 -106
  233. package/dist/ai/source/CommonFieldInput.md +2 -1
  234. package/dist/ai/source/GuidesComponent.md +3 -0
  235. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +7 -3
  236. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +52 -38
  237. package/dist/components/BbAccordion/ptKeys.generated.d.ts +20 -0
  238. package/dist/components/BbAccordion/types.d.ts +21 -7
  239. package/dist/components/BbAccordion/types.js +1 -1
  240. package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -1
  241. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +5 -5
  242. package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
  243. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +65 -42
  244. package/dist/components/BbBadge/types.d.ts +15 -12
  245. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +106 -106
  246. package/dist/components/BbBreadcrumbs/types.d.ts +6 -0
  247. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +79 -73
  248. package/dist/components/BbButton/types.d.ts +7 -6
  249. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +2 -1
  250. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +2 -1
  251. package/dist/components/BbCalendar/types.d.ts +5 -0
  252. package/dist/components/BbCalendar/useCalendarGrid.js +1 -1
  253. package/dist/components/BbCalendar/useDayGrid.js +1 -1
  254. package/dist/components/BbCheckbox/types.d.ts +2 -4
  255. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +10 -4
  256. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +2 -2
  257. package/dist/components/BbCheckboxGroup/types.d.ts +4 -6
  258. package/dist/components/BbColorInput/types.d.ts +2 -4
  259. package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +8 -8
  260. package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +71 -132
  261. package/dist/components/BbConfirm/ptKeys.generated.d.ts +5 -5
  262. package/dist/components/BbConfirm/types.d.ts +5 -5
  263. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +2 -1
  264. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +3 -0
  265. package/dist/components/BbDatePicker/types.d.ts +5 -0
  266. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
  267. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +2 -0
  268. package/dist/components/BbDatePickerInput/types.d.ts +4 -5
  269. package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -0
  270. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +263 -235
  271. package/dist/components/BbDialog/overlayActions.js +94 -0
  272. package/dist/components/BbDialog/types.d.ts +24 -0
  273. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +4 -3
  274. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +384 -332
  275. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +121 -120
  276. package/dist/components/BbDropdown/dropdownHandle.js +6 -0
  277. package/dist/components/BbDropdown/normalizeGroups.js +58 -44
  278. package/dist/components/BbDropdown/types.d.ts +116 -50
  279. package/dist/components/BbDropdown/types.js +2 -2
  280. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +105 -104
  281. package/dist/components/BbDropdownButton/types.d.ts +2 -4
  282. package/dist/components/BbForm/BbForm.vue.d.ts +2 -1
  283. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +240 -198
  284. package/dist/components/BbForm/recognizeValidation.d.ts +9 -0
  285. package/dist/components/BbForm/recognizeValidation.js +55 -0
  286. package/dist/components/BbForm/validationError.d.ts +10 -0
  287. package/dist/components/BbForm/validationError.js +11 -0
  288. package/dist/components/BbNumberInput/types.d.ts +2 -4
  289. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -0
  290. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +414 -389
  291. package/dist/components/BbOffCanvas/sheetAttrs.js +5 -5
  292. package/dist/components/BbOffCanvas/types.d.ts +24 -0
  293. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +3 -3
  294. package/dist/components/BbRadio/types.d.ts +2 -4
  295. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +10 -4
  296. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +173 -157
  297. package/dist/components/BbRadioGroup/types.d.ts +11 -7
  298. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +126 -119
  299. package/dist/components/BbRating/types.d.ts +5 -6
  300. package/dist/components/BbSelect/BbSelect.vue.d.ts +17 -10
  301. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +3 -1
  302. package/dist/components/BbSelect/types.d.ts +12 -6
  303. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +11 -4
  304. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +513 -502
  305. package/dist/components/BbSelectPopover/types.d.ts +10 -2
  306. package/dist/components/BbSlider/types.d.ts +2 -4
  307. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -0
  308. package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +85 -73
  309. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +10 -4
  310. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +171 -152
  311. package/dist/components/BbSwitchGroup/types.d.ts +1 -1
  312. package/dist/components/BbTable/BbTable.vue.d.ts +36 -25
  313. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1338 -1215
  314. package/dist/components/BbTable/BbTableDataRow.js +2 -1
  315. package/dist/components/BbTable/BbTableRowMenu.js +36 -0
  316. package/dist/components/BbTable/types.d.ts +33 -18
  317. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +2 -2
  318. package/dist/components/BbTabs/types.d.ts +6 -0
  319. package/dist/components/BbTag/types.d.ts +2 -4
  320. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
  321. package/dist/components/BbTextInput/types.d.ts +2 -4
  322. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
  323. package/dist/components/BbTextarea/types.d.ts +2 -4
  324. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +1 -1
  325. package/dist/components/BbTimePickerInput/types.d.ts +2 -4
  326. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +88 -94
  327. package/dist/components/BbTooltip/ptKeys.generated.d.ts +4 -4
  328. package/dist/components/BbTooltip/types.d.ts +3 -1
  329. package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +1 -1
  330. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +9 -9
  331. package/dist/components/BbTree/types.d.ts +8 -2
  332. package/dist/components/CommonField/types.d.ts +2 -4
  333. package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +39 -39
  334. package/dist/composables/formSubmitLock.js +15 -8
  335. package/dist/composables/overlayRegistry.d.ts +5 -0
  336. package/dist/composables/overlayRegistry.js +154 -148
  337. package/dist/composables/useBbDropdown.d.ts +8 -0
  338. package/dist/composables/useBbDropdown.js +3 -1
  339. package/dist/composables/useBbTabs.js +138 -138
  340. package/dist/composables/useChoiceIndicator.js +67 -64
  341. package/dist/composables/useConfirm.d.ts +63 -52
  342. package/dist/composables/useConfirm.js +22 -18
  343. package/dist/deprecation/ai-deprecations.json.js +1 -1
  344. package/dist/directives/bbDropdown.d.ts +7 -7
  345. package/dist/directives/bbDropdown.js +22 -15
  346. package/dist/directives/bbTooltip.d.ts +3 -3
  347. package/dist/directives/createPopoverDirective.js +57 -35
  348. package/dist/i18n/locales/ar.json +5 -1
  349. package/dist/i18n/locales/cs.json +5 -1
  350. package/dist/i18n/locales/da.json +5 -1
  351. package/dist/i18n/locales/de-CH.json +5 -1
  352. package/dist/i18n/locales/de.json +5 -1
  353. package/dist/i18n/locales/el.json +5 -1
  354. package/dist/i18n/locales/en-GB.json +5 -1
  355. package/dist/i18n/locales/en.json +5 -1
  356. package/dist/i18n/locales/es-MX.json +5 -1
  357. package/dist/i18n/locales/es.json +5 -1
  358. package/dist/i18n/locales/fa.json +5 -1
  359. package/dist/i18n/locales/fi.json +5 -1
  360. package/dist/i18n/locales/fr.json +5 -1
  361. package/dist/i18n/locales/he.json +5 -1
  362. package/dist/i18n/locales/hu.json +5 -1
  363. package/dist/i18n/locales/it.json +5 -1
  364. package/dist/i18n/locales/ja.json +5 -1
  365. package/dist/i18n/locales/ko.json +5 -1
  366. package/dist/i18n/locales/nb.json +5 -1
  367. package/dist/i18n/locales/nl.json +5 -1
  368. package/dist/i18n/locales/pl.json +5 -1
  369. package/dist/i18n/locales/pt-BR.json +5 -1
  370. package/dist/i18n/locales/pt-PT.json +5 -1
  371. package/dist/i18n/locales/ro.json +5 -1
  372. package/dist/i18n/locales/ru.json +5 -1
  373. package/dist/i18n/locales/sv.json +5 -1
  374. package/dist/i18n/locales/tr.json +5 -1
  375. package/dist/i18n/locales/uk.json +5 -1
  376. package/dist/i18n/locales/zh-CN.json +5 -1
  377. package/dist/i18n/locales/zh-HK.json +5 -1
  378. package/dist/i18n/locales/zh-TW.json +5 -1
  379. package/dist/index.d.ts +2 -0
  380. package/dist/index.js +4 -3
  381. package/dist/llms-full.txt +2216 -1332
  382. package/dist/llms-medium.txt +21 -18
  383. package/dist/llms.txt +2 -2
  384. package/dist/locale-blueprint.json +5 -1
  385. package/dist/plugin.js +17 -40
  386. package/dist/pluginCore.js +30 -0
  387. package/dist/styles.css +2 -2
  388. package/dist/types/ActionButton.d.ts +26 -5
  389. package/dist/types/ActionButton.js +11 -0
  390. package/dist/types/ConfigDefaults.d.ts +34 -3
  391. package/dist/types/ConfigDefaults.js +14 -8
  392. package/dist/types/FieldLayout.d.ts +4 -1
  393. package/dist/types/ItemAccessor.d.ts +3 -1
  394. package/dist/types/ItemPath.d.ts +62 -0
  395. package/dist/types/ptComponentMap.d.ts +1 -1
  396. package/dist/utilities/functions/clickCount.js +14 -0
  397. package/dist/utils/versionCheck.js +1 -1
  398. package/llms.txt +2 -2
  399. package/package.json +16 -4
  400. package/scripts/README.md +35 -29
  401. package/scripts/lib/adoption-checklist.json +2 -2
  402. package/scripts/lib/define-preset-copy.mjs +1 -1
  403. package/scripts/lib/eslint-disable.mjs +5 -3
  404. package/scripts/lib/eslint-plugin.d.ts +2 -0
  405. package/scripts/lib/eslint-plugin.mjs +213 -1
  406. package/scripts/lib/redundant-item-accessor.mjs +4 -1
  407. package/scripts/lib/release-results.mjs +32 -1
  408. package/scripts/lib/renamed-item-field.mjs +4 -1
  409. package/scripts/lib/setup.mjs +8 -0
  410. package/scripts/lib/tab-links.mjs +4 -1
  411. package/scripts/lib/toolchain-check.mjs +125 -7
  412. package/scripts/lib/tree-default-expandable.mjs +53 -0
  413. package/scripts/lib/validate-bb-markup.mjs +537 -53
@@ -7,13 +7,14 @@
7
7
  ```vue
8
8
  <template>
9
9
  <slot
10
- v-if="!hasExternalActivator"
10
+ v-if="!hasExternalActivator && showsActivator"
11
11
  name="activator"
12
12
  v-bind="{
13
13
  props: {
14
14
  ref: setActivatorRef,
15
15
  },
16
16
  disabled,
17
+ empty,
17
18
  loading: anyLoading,
18
19
  open,
19
20
  placement,
@@ -121,6 +122,7 @@ import {
121
122
  mergeProps,
122
123
  onBeforeUnmount,
123
124
  onDeactivated,
125
+ onMounted,
124
126
  reactive,
125
127
  ref,
126
128
  useSlots,
@@ -147,6 +149,8 @@ import {
147
149
  useConfigSetting,
148
150
  } from '@/composables/useConfigDefaults';
149
151
  import { wait } from '@/utilities/functions/wait';
152
+ import type { VirtualAnchor } from '@/types/CommonProps';
153
+ import { registerDropdownHandle } from './dropdownHandle';
150
154
  import { focusQuietly } from '@/utils/focusVisibility';
151
155
  import CommonPopover from '../CommonPopover/CommonPopover.vue';
152
156
  import type { CommonPopoverAvailableSpace } from '../CommonPopover/types';
@@ -174,7 +178,12 @@ import {
174
178
  type DropdownGroupDescriptor,
175
179
  type DropdownGroupRequest,
176
180
  } from './useDropdownGroupRegistry';
177
- import { groupItemsAsArray, isGroup, isSelectableGroup } from './types';
181
+ import {
182
+ groupItemsAsArray,
183
+ isGroup,
184
+ isPrimitiveRow,
185
+ isSelectableGroup,
186
+ } from './types';
178
187
  import type {
179
188
  BbDropdownProps,
180
189
  BbDropdownEvents,
@@ -182,7 +191,7 @@ import type {
182
191
  InternalGroup,
183
192
  InternalItem,
184
193
  KeyedItem,
185
- Item,
194
+ ItemEntry,
186
195
  MappedItem,
187
196
  NormalizedGroup,
188
197
  DropdownTrigger,
@@ -434,7 +443,7 @@ const createVirtualElement = (x: number, y: number) => {
434
443
  };
435
444
  };
436
445
 
437
- const cursorAnchor = ref<ReturnType<typeof createVirtualElement> | null>(null);
446
+ const cursorAnchor = ref<VirtualAnchor | null>(null);
438
447
 
439
448
  /**
440
449
  * What the panel positions against: the `anchor` prop when given (so the menu can
@@ -513,10 +522,11 @@ const requestChange = (key: string, change: DropdownGroupRequest) =>
513
522
  controllers.get(key)?.request(change);
514
523
 
515
524
  const findGroupById = (
516
- items: Item[],
525
+ items: ItemEntry[],
517
526
  groupId: string
518
527
  ): InternalGroup | undefined => {
519
528
  for (const entry of items) {
529
+ if (isPrimitiveRow(entry)) continue;
520
530
  if (isGroup(entry)) {
521
531
  if (entry.id === groupId) return entry;
522
532
  for (const child of groupItemsAsArray(entry.items)) {
@@ -552,10 +562,14 @@ const findGroupById = (
552
562
  * doesn't exist at all", so the thrown error can name the real problem.
553
563
  */
554
564
  const findEntryKindById = (
555
- items: Item[],
565
+ items: ItemEntry[],
556
566
  key: string
557
567
  ): 'group' | 'item' | undefined => {
558
568
  for (const entry of items) {
569
+ if (isPrimitiveRow(entry)) {
570
+ if (entry === key) return 'item';
571
+ continue;
572
+ }
559
573
  if (Array.isArray(entry)) {
560
574
  const found = findEntryKindById(entry, key);
561
575
  if (found) return found;
@@ -601,23 +615,26 @@ const companionGroups = computed<DropdownGroupDescriptor[]>(() =>
601
615
  const mergeCompanionGroup = (
602
616
  inline: InternalGroup,
603
617
  companion: Partial<InternalGroup>
604
- ): InternalGroup => ({
605
- ...inline,
606
- group: true,
607
- id: inline.id,
608
- // Propagate the raw values; the selectable/non-selectable decision is made
609
- // once in `normalizeGroups` (a group is selectable only when `selectable` or
610
- // `multiple` is explicitly set).
611
- selectable: companion.selectable ?? inline.selectable,
612
- multiple: companion.multiple ?? inline.multiple,
613
- label: companion.label ?? inline.label,
614
- hideLabel: companion.hideLabel ?? inline.hideLabel,
615
- items: companion.items ?? inline.items,
616
- 'prepend:icon': companion['prepend:icon'] ?? inline['prepend:icon'],
617
- 'append:icon': companion['append:icon'] ?? inline['append:icon'],
618
- variant: companion.variant ?? inline.variant,
619
- onClick: companion.onClick ?? inline.onClick,
620
- });
618
+ ): InternalGroup =>
619
+ ({
620
+ ...inline,
621
+ group: true,
622
+ id: inline.id,
623
+ // Propagate the raw values; the selectable/non-selectable decision is made
624
+ // once in `normalizeGroups` (a group is selectable only when `selectable` or
625
+ // `multiple` is explicitly set).
626
+ selectable: companion.selectable ?? inline.selectable,
627
+ multiple: companion.multiple ?? inline.multiple,
628
+ label: companion.label ?? inline.label,
629
+ hideLabel: companion.hideLabel ?? inline.hideLabel,
630
+ hidden: companion.hidden ?? inline.hidden,
631
+ items: companion.items ?? inline.items,
632
+ 'prepend:icon': companion['prepend:icon'] ?? inline['prepend:icon'],
633
+ 'append:icon': companion['append:icon'] ?? inline['append:icon'],
634
+ variant: companion.variant ?? inline.variant,
635
+ onClick: companion.onClick ?? inline.onClick,
636
+ // The merged `items` / `searchable` pair is checked where each side was written.
637
+ }) as InternalGroup;
621
638
 
622
639
  const toGroupFromCompanion = (
623
640
  companion: DropdownGroupDescriptor,
@@ -628,6 +645,7 @@ const toGroupFromCompanion = (
628
645
  id: companion.key,
629
646
  label: companion.label ?? baseline?.label,
630
647
  hideLabel: companion.hideLabel ?? baseline?.hideLabel,
648
+ hidden: companion.hidden ?? baseline?.hidden,
631
649
  items: companion.items ?? baseline?.items ?? [],
632
650
  // Raw values only — `normalizeGroups` decides whether the group is
633
651
  // selectable (both unset ⇒ non-selectable). No `?? true`/`?? false` here.
@@ -637,13 +655,13 @@ const toGroupFromCompanion = (
637
655
  'append:icon': companion['append:icon'] ?? baseline?.['append:icon'],
638
656
  variant: companion.variant ?? baseline?.variant,
639
657
  onClick: companion.onClick ?? baseline?.onClick,
640
- };
658
+ } as InternalGroup;
641
659
  };
642
660
 
643
661
  const applyCompanionToItems = (
644
- items: Item[],
662
+ items: ItemEntry[],
645
663
  group: InternalGroup
646
- ): { items: Item[]; found: boolean } => {
664
+ ): { items: ItemEntry[]; found: boolean } => {
647
665
  let found = false;
648
666
 
649
667
  const applyToItem = (item: InternalItem): InternalItem => {
@@ -679,7 +697,7 @@ const applyCompanionToItems = (
679
697
  return applied.items;
680
698
  }
681
699
 
682
- return applyToItem(entry);
700
+ return isPrimitiveRow(entry) ? entry : applyToItem(entry);
683
701
  });
684
702
 
685
703
  return { items: nextItems, found };
@@ -690,8 +708,8 @@ const applyCompanionToItems = (
690
708
  * inline group sharing its `id` (inheriting any fields it doesn't declare),
691
709
  * otherwise it is appended.
692
710
  */
693
- const mergedItems = computed<Item[]>(() => {
694
- let base: Item[] = [...(props.items ?? [])];
711
+ const mergedItems = computed<ItemEntry[]>(() => {
712
+ let base: ItemEntry[] = [...(props.items ?? [])];
695
713
 
696
714
  for (const companion of companionGroups.value) {
697
715
  const baseline = findGroupById(base, companion.key);
@@ -807,8 +825,12 @@ const isPipelineGroup = (group: InternalGroup) =>
807
825
  group.max != null;
808
826
 
809
827
  /** Ids of every pipeline group declared in `items`, at any nesting depth. */
810
- const collectPipelineKeys = (items: Item[], acc: string[] = []): string[] => {
828
+ const collectPipelineKeys = (
829
+ items: ItemEntry[],
830
+ acc: string[] = []
831
+ ): string[] => {
811
832
  for (const entry of items) {
833
+ if (isPrimitiveRow(entry)) continue;
812
834
  if (isGroup(entry)) {
813
835
  if (entry.id && isPipelineGroup(entry)) acc.push(entry.id);
814
836
  for (const child of groupItemsAsArray(entry.items)) {
@@ -898,7 +920,7 @@ const groupFlagsFor = (key: string) => {
898
920
 
899
921
  /** A normalized group (with resolved items) by id at any nesting depth. */
900
922
  const findRenderGroupDeep = (key: string): NormalizedGroup | undefined => {
901
- const walk = (items: Item[]): NormalizedGroup | undefined => {
923
+ const walk = (items: ItemEntry[]): NormalizedGroup | undefined => {
902
924
  for (const group of normalizeGroups(items)) {
903
925
  if (group.id === key) return group;
904
926
  for (const item of group.items) {
@@ -1004,11 +1026,116 @@ provideDropdownGroupRegistry({
1004
1026
  multipleFor: (key) => groupFlagsFor(key)?.multiple,
1005
1027
  });
1006
1028
 
1029
+ // --- no visible row ----------------------------
1030
+
1031
+ /**
1032
+ * Whether a pipeline group has not handed its rows over yet: its resolver
1033
+ * mounts as a child, so on the first render (the server's only one) the
1034
+ * group is still a getter. Unknown is not empty.
1035
+ */
1036
+ /**
1037
+ * `<BbDropdownGroup>` companions register from the default slot, which renders
1038
+ * after the activator: until mount (on the server, for good) the groups they
1039
+ * bring are not known yet.
1040
+ */
1041
+ const companionsPending = ref(!!useSlots().default);
1042
+ onMounted(() => (companionsPending.value = false));
1043
+
1044
+ const pipelinePending = computed(() =>
1045
+ pipelineGroupKeys.value.some(
1046
+ (key) =>
1047
+ !companionGroups.value.some(
1048
+ (group) => group.key === key && Array.isArray(group.items)
1049
+ )
1050
+ )
1051
+ );
1052
+
1053
+ /**
1054
+ * No visible row: the render groups (every `hidden` row, companion group and
1055
+ * fetched row already dropped) hold none. A group still loading or fetched
1056
+ * to nothing shows a placeholder row, so it is not empty; neither is a search
1057
+ * that matches nothing.
1058
+ */
1059
+ const empty = computed(
1060
+ () =>
1061
+ !companionsPending.value &&
1062
+ !pipelinePending.value &&
1063
+ !normalizedGroups.value.length
1064
+ );
1065
+
1066
+ /** A `contextMenu` trigger is a surface (a row, a card), never hidden. */
1067
+ const keepsActivator = computed(
1068
+ () => !!props.keepActivator || triggers.value.has('contextMenu')
1069
+ );
1070
+
1071
+ /**
1072
+ * The trigger held focus when the menu emptied: it stays, inert, until it
1073
+ * loses focus, so the keyboard user is not dropped onto the page.
1074
+ */
1075
+ const heldForFocus = ref(false);
1076
+
1077
+ /** Whether the trigger shows (the slot renders, an external one is not hidden). */
1078
+ const showsActivator = computed(
1079
+ () => !empty.value || keepsActivator.value || heldForFocus.value
1080
+ );
1081
+
1082
+ watch(empty, (isEmpty) => {
1083
+ if (!isEmpty) {
1084
+ heldForFocus.value = false;
1085
+ return;
1086
+ }
1087
+ if (open.value) {
1088
+ const focusInPanel = !!document.activeElement?.closest(
1089
+ `[data-bb-dropdown-surface="${CSS.escape(id)}"]`
1090
+ );
1091
+ void closeDropdown();
1092
+ if (focusInPanel) focusActivator();
1093
+ }
1094
+ const el = activatorDom.value;
1095
+ if (keepsActivator.value || !(el instanceof HTMLElement)) return;
1096
+ if (!el.contains(document.activeElement)) return;
1097
+ heldForFocus.value = true;
1098
+ const release = (event: FocusEvent) => {
1099
+ if (el.contains(event.relatedTarget as Node | null)) return;
1100
+ el.removeEventListener('focusout', release);
1101
+ heldForFocus.value = false;
1102
+ };
1103
+ el.addEventListener('focusout', release);
1104
+ });
1105
+
1106
+ /**
1107
+ * An external activator (the `activator` prop, `v-bb-dropdown`) is the app's
1108
+ * element: hidden with an inline `display: none`, the way its id and ARIA are
1109
+ * stamped, and given back its own inline `display` when rows return or the
1110
+ * dropdown goes.
1111
+ */
1112
+ watch(
1113
+ [activator, () => hasExternalActivator.value && !showsActivator.value],
1114
+ ([el, hide], _, onCleanup) => {
1115
+ if (!hide || !el) return;
1116
+ const { style } = el as HTMLElement;
1117
+ if (!style) return;
1118
+ const before = style.getPropertyValue('display');
1119
+ const priority = style.getPropertyPriority('display');
1120
+ style.setProperty('display', 'none');
1121
+ onCleanup(() => {
1122
+ if (style.getPropertyValue('display') !== 'none') return;
1123
+ if (before) style.setProperty('display', before, priority);
1124
+ else style.removeProperty('display');
1125
+ });
1126
+ },
1127
+ { immediate: true }
1128
+ );
1129
+
1007
1130
  // --- public read-only context (`useBbDropdown`) -------------------
1008
1131
 
1009
1132
  /** Ids of every selectable group declared in `items`, at any nesting depth. */
1010
- const collectSelectableKeys = (items: Item[], acc: string[] = []): string[] => {
1133
+ const collectSelectableKeys = (
1134
+ items: ItemEntry[],
1135
+ acc: string[] = []
1136
+ ): string[] => {
1011
1137
  for (const entry of items) {
1138
+ if (isPrimitiveRow(entry)) continue;
1012
1139
  if (isGroup(entry)) {
1013
1140
  if (entry.id && isSelectableGroup(entry)) acc.push(entry.id);
1014
1141
  for (const child of groupItemsAsArray(entry.items)) {
@@ -1080,6 +1207,7 @@ const contextGroups = computed<Record<string, BbDropdownGroupState>>(() => {
1080
1207
  // by `useBbDropdown`, so it never registers (no wasted node).
1081
1208
  useBbDropdownHost(() => props.id, {
1082
1209
  open: () => open.value,
1210
+ empty: () => empty.value,
1083
1211
  groups: () => contextGroups.value,
1084
1212
  });
1085
1213
 
@@ -1227,9 +1355,12 @@ const focusActivator = () => {
1227
1355
  // its own id (see the adoption watch), so an id lookup would no-op.
1228
1356
  const button =
1229
1357
  activator.value ??
1230
- (activatorId.value ? document.getElementById(activatorId.value) : null);
1358
+ (activatorId.value ? document.getElementById(activatorId.value) : null) ??
1359
+ returnFocusTo;
1231
1360
  button?.focus();
1232
1361
  };
1362
+ /** A menu opened from code has no activator: focus goes back where it was. */
1363
+ let returnFocusTo: HTMLElement | null = null;
1233
1364
 
1234
1365
  provideDropdownContext({
1235
1366
  passthrough,
@@ -1301,7 +1432,8 @@ provideDropdownContext({
1301
1432
  });
1302
1433
 
1303
1434
  const onClick = (event: MouseEvent) => {
1304
- if (props.disabled) return;
1435
+ // Empty: inert, and the click goes on to the app's own handlers.
1436
+ if (props.disabled || empty.value) return;
1305
1437
  if (longPressTriggered) {
1306
1438
  longPressTriggered = false;
1307
1439
  event.preventDefault();
@@ -1336,7 +1468,8 @@ const focusPressedActivator = (event: MouseEvent) => {
1336
1468
  };
1337
1469
 
1338
1470
  const onContextMenu = async (event: MouseEvent) => {
1339
- if (props.disabled) return;
1471
+ // Empty: the browser's own menu comes back (no preventDefault).
1472
+ if (props.disabled || empty.value) return;
1340
1473
  event.preventDefault();
1341
1474
  event.stopPropagation();
1342
1475
  if (props.placement === 'cursor') {
@@ -1367,7 +1500,7 @@ const clearLongPress = () => {
1367
1500
  };
1368
1501
 
1369
1502
  const onPointerDown = (event: PointerEvent) => {
1370
- if (props.disabled || event.pointerType === 'mouse') return;
1503
+ if (props.disabled || empty.value || event.pointerType === 'mouse') return;
1371
1504
  longPressTriggered = false;
1372
1505
  longPressOrigin = { x: event.clientX, y: event.clientY };
1373
1506
  longPressTimer = setTimeout(() => {
@@ -1397,8 +1530,20 @@ const onPointerUp = () => {
1397
1530
  clearLongPress();
1398
1531
  };
1399
1532
 
1533
+ /**
1534
+ * The finger lifting after a long press opened the menu: no mouse events
1535
+ * follow. The tap's mousedown / click would otherwise land
1536
+ * on the activator, or on a sheet opened under the finger, and close the
1537
+ * menu the press just opened. With no click coming, the swallow is done too.
1538
+ */
1539
+ const onTouchEnd = (event: TouchEvent) => {
1540
+ if (!longPressTriggered || !event.cancelable) return;
1541
+ event.preventDefault();
1542
+ longPressTriggered = false;
1543
+ };
1544
+
1400
1545
  const onKeydown = async (event: KeyboardEvent) => {
1401
- if (props.disabled) return;
1546
+ if (props.disabled || empty.value) return;
1402
1547
 
1403
1548
  // The row is focused a task after the key: `focusVisible`, or Firefox
1404
1549
  // draws no ring after a click-open (it grants one only inside the handler).
@@ -1514,6 +1659,8 @@ const onEsc = (event: KeyboardEvent) => {
1514
1659
  closeDropdown();
1515
1660
  };
1516
1661
  const openDropdown = async () => {
1662
+ // No visible row: nothing opens, whatever asked.
1663
+ if (empty.value) return;
1517
1664
  // Latch the surface for this open cycle before anything reads it.
1518
1665
  surface.value = resolveSurface();
1519
1666
  ignoreNextIntersection = true;
@@ -1554,6 +1701,26 @@ const closeDropdown = async () => {
1554
1701
  pause();
1555
1702
  };
1556
1703
 
1704
+ // An owner opening this menu from code: at a point, as a
1705
+ // right-click (`'pointer'`) or Shift+F10 (`'keyboard'`, first row focused) would.
1706
+ registerDropdownHandle({
1707
+ open: async (at, modality, returnTo) => {
1708
+ if (open.value) {
1709
+ await closeDropdown();
1710
+ await wait(props.transitionDuration);
1711
+ }
1712
+ cursorAnchor.value = at;
1713
+ returnFocusTo = returnTo ?? null;
1714
+ openModality = modality;
1715
+ await openDropdown();
1716
+ if (modality !== 'keyboard' || !open.value) return;
1717
+ await wait(0);
1718
+ rootList.value?.focusFirst(true);
1719
+ },
1720
+ close: closeDropdown,
1721
+ isOpen: () => open.value,
1722
+ });
1723
+
1557
1724
  const removeDocumentListeners = () => {
1558
1725
  removeEscapeEntry(escapeKey);
1559
1726
  document.removeEventListener('click', onOutsideInteraction);
@@ -1635,12 +1802,14 @@ watch(
1635
1802
  el.addEventListener('pointermove', onPointerMove);
1636
1803
  el.addEventListener('pointerup', onPointerUp);
1637
1804
  el.addEventListener('pointercancel', onPointerUp);
1805
+ el.addEventListener('touchend', onTouchEnd);
1638
1806
  removers.push(() => {
1639
1807
  el.removeEventListener('contextmenu', onContextMenu);
1640
1808
  el.removeEventListener('pointerdown', onPointerDown);
1641
1809
  el.removeEventListener('pointermove', onPointerMove);
1642
1810
  el.removeEventListener('pointerup', onPointerUp);
1643
1811
  el.removeEventListener('pointercancel', onPointerUp);
1812
+ el.removeEventListener('touchend', onTouchEnd);
1644
1813
  clearLongPress();
1645
1814
  });
1646
1815
  }
@@ -1661,9 +1830,16 @@ watch(
1661
1830
 
1662
1831
  // Update reactive ARIA attributes
1663
1832
  watch(
1664
- [activator, open, hasOpenedOnce, popupRole, controlsId] as const,
1665
- ([el, isOpen, opened, role, controls]) => {
1833
+ [activator, open, hasOpenedOnce, popupRole, controlsId, empty] as const,
1834
+ ([el, isOpen, opened, role, controls, isEmpty]) => {
1666
1835
  if (!el) return;
1836
+ // No visible row: no popup to announce.
1837
+ if (isEmpty) {
1838
+ el.removeAttribute('aria-haspopup');
1839
+ el.removeAttribute('aria-expanded');
1840
+ el.removeAttribute('aria-controls');
1841
+ return;
1842
+ }
1667
1843
 
1668
1844
  el.setAttribute('aria-haspopup', role);
1669
1845
  el.setAttribute('aria-expanded', opened ? String(isOpen) : 'false');
@@ -1783,6 +1959,13 @@ type DropdownEntryBase = {
1783
1959
  * group (the check is), or when an append slot fills the region.
1784
1960
  */
1785
1961
  'append:icon'?: IconType;
1962
+ /**
1963
+ * Leaves the entry out: not rendered, not reachable by keyboard or
1964
+ * search. A row takes its submenu with it, a group all its rows; a group
1965
+ * left with no visible row drops with its divider and label. A selected
1966
+ * value stays in the model.
1967
+ */
1968
+ hidden?: boolean;
1786
1969
  /**
1787
1970
  * Your own data for this entry, carried untouched to its slots (as
1788
1971
  * `item.meta`) and to per-item `pt` functions. The dropdown never reads it
@@ -1849,7 +2032,7 @@ export type BbDropdownItemProps<T = any> = ItemProps<T, DropdownItemFields>;
1849
2032
  */
1850
2033
  type SubmenuExclusive =
1851
2034
  | {
1852
- items: Item[];
2035
+ items: ItemEntry[];
1853
2036
  /** A submenu row opens its submenu; it cannot also run an action. */
1854
2037
  onClick?: never;
1855
2038
  /** A submenu row opens its submenu; it cannot also navigate. */
@@ -1865,6 +2048,8 @@ export type InternalItem = Omit<
1865
2048
  > &
1866
2049
  SubmenuExclusive &
1867
2050
  DropdownEntryBase & {
2051
+ /** Rows have no search box (a group has); declared so a group's `searchable` discriminates. */
2052
+ searchable?: never;
1868
2053
  /** The row's text. */
1869
2054
  label: string;
1870
2055
  /**
@@ -1926,27 +2111,32 @@ export type InternalItem = Omit<
1926
2111
  * when its latest load FAILED (`'failed'`: the footer under whatever rows a
1927
2112
  * `stash` keeps listed). Rendered as a non-interactive row that
1928
2113
  * shows `label` or, when provided, the dropdown's `loading` / `empty` slot.
1929
- * Internal — set by `BbDropdownGroup`.
2114
+ *
2115
+ * @internal Set by `BbDropdownGroup`.
1930
2116
  */
1931
2117
  placeholder?: 'loading' | 'empty' | 'failed';
1932
2118
  /**
1933
2119
  * On a `'failed'` placeholder: what the group's `items` load rejected
1934
- * with. Internal — set by the pipeline resolver, handed to the `empty`
1935
- * slot as `error`.
2120
+ * with, handed to the `empty` slot as `error`.
2121
+ *
2122
+ * @internal Set by the pipeline resolver.
1936
2123
  */
1937
2124
  error?: unknown;
1938
2125
  /**
1939
2126
  * Marks a row built by the pipeline resolver from a fetched item. Its
1940
2127
  * `selectable` predicate already ran against the RAW item there, so
1941
2128
  * `normalizeGroups` must not run it again against this row object.
1942
- * Internal.
2129
+ *
2130
+ * @internal
1943
2131
  */
1944
2132
  fetched?: true;
1945
2133
  /**
1946
2134
  * Optional slot token used to resolve per-item named slots. Primarily set
1947
2135
  * by the pipeline resolver so slot names can be derived from the resolved
1948
2136
  * `itemValue` (readable), while `rowKey` remains the hash-based selection
1949
- * id. Internal.
2137
+ * id.
2138
+ *
2139
+ * @internal
1950
2140
  */
1951
2141
  slotKey?: string;
1952
2142
  };
@@ -1977,16 +2167,24 @@ export type InternalItem = Omit<
1977
2167
  *
1978
2168
  * A provider signals a failure by THROWING, never by returning `[]`: the
1979
2169
  * rows are cleared, nothing is pruned, and the `empty` placeholder shows
1980
- * `failedText` with the error. Zero-argument providers keep working. Annotate
1981
- * the parameter `BbDropdownGroupItemsContext`.
2170
+ * `failedText` with the error. Zero-argument providers keep working. An
2171
+ * unannotated getter reads its context typed (`query` a string on a
2172
+ * `searchable` group); a provider shared with other components is annotated
2173
+ * `BbDropdownGroupItemsContext`.
1982
2174
  */
1983
- export type DropdownGroupItemsGetter =
2175
+ export type DropdownGroupItemsGetter = PlainGetter | SearchGetter;
2176
+
2177
+ /** A group without a search box: no `query` arrives. */
2178
+ type PlainGetter = (
2179
+ context: BbDropdownGroupItemsContext
1984
2180
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- a fetched group's rows are the API's records: the dropdown is not generic, so their type cannot reach the accessors
1985
- | ((context: BbDropdownGroupItemsContext) => any[] | Promise<any[]>)
1986
- | ((
1987
- context: BbDropdownGroupItemsContext & { query: string }
1988
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- a fetched group's rows are the API's records: the dropdown is not generic, so their type cannot reach the accessors
1989
- ) => any[] | Promise<any[]>);
2181
+ ) => any[] | Promise<any[]>;
2182
+
2183
+ /** A `searchable` group: `query` always arrives, `''` until typed. */
2184
+ type SearchGetter = (
2185
+ context: BbDropdownGroupItemsContext & { query: string }
2186
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- a fetched group's rows are the API's records: the dropdown is not generic, so their type cannot reach the accessors
2187
+ ) => any[] | Promise<any[]>;
1990
2188
 
1991
2189
  export type InternalGroup = DropdownEntryBase & {
1992
2190
  /**
@@ -2026,23 +2224,9 @@ export type InternalGroup = DropdownEntryBase & {
2026
2224
  */
2027
2225
  group?: true;
2028
2226
  /**
2029
- * Items of the group. Plain arrays are flattened.
2030
- *
2031
- * For a **pipeline group**, pass raw objects (`any[]`) or an (async) getter
2032
- * `({ reason, modelValue, signal }) => Item[] | Promise<Item[]>` (plus
2033
- * `query` when the group is `searchable`; see {@link DropdownGroupItemsGetter})
2034
- * and pair it with `itemText`/`itemValue`. A `<BbDropdownGroup :id v-model>`
2035
- * companion resolves such a group and surfaces the selected `itemValue`(s)
2036
- * through `v-model`.
2037
- */
2038
- items:
2039
- | Array<InternalItem | InternalItem[]>
2040
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- a fetched group's raw records, before normalisation (see `itemText`)
2041
- | any[]
2042
- | DropdownGroupItemsGetter;
2043
- /**
2044
- * Pipeline groups only. Path/getter producing each item's display text
2045
- * (a primitive item is its own text; a getter still maps it).
2227
+ * Pipeline groups only. Path/getter producing each item's display text.
2228
+ * A string or number row needs none, fetched or written: it is its own
2229
+ * text and value (a getter here still maps a fetched one).
2046
2230
  *
2047
2231
  * Unset: own `label`, else `text` (`{ label, value }` needs no accessor).
2048
2232
  *
@@ -2139,17 +2323,6 @@ export type InternalGroup = DropdownEntryBase & {
2139
2323
  * @defaultValue `'interaction'`
2140
2324
  */
2141
2325
  prefill?: boolean | 'interaction';
2142
- /**
2143
- * Renders a search field at the top of THIS group (so, inside its submenu when
2144
- * the group is one), scoped to this group alone — the nested "category ›
2145
- * searchable options" pattern. Typing narrows this group's rows by
2146
- * the ranked search (see `filterBy`) and, for an async group, passes
2147
- * the typed text to its getter as the context's `query` (a user search arrives
2148
- * with `reason: 'search'`, as on `BbSelect`; see
2149
- * `BbDropdownGroupItemsContext`). Each searchable group owns its own query,
2150
- * independent of its siblings.
2151
- */
2152
- searchable?: boolean;
2153
2326
  /** Placeholder for this group's search field. Defaults to the localized label. */
2154
2327
  searchPlaceholder?: string;
2155
2328
  /**
@@ -2206,7 +2379,65 @@ export type InternalGroup = DropdownEntryBase & {
2206
2379
  * category, yet still wants a label for chips.
2207
2380
  */
2208
2381
  hideLabel?: boolean;
2209
- };
2382
+ } & GroupSource;
2383
+
2384
+ // `searchable` picks the getter's context: a searchable group's getter always
2385
+ // gets `query`, any other group's none. Each side has one signature, so an
2386
+ // unannotated getter reads its context typed (a union of the two did not).
2387
+ type GroupSource =
2388
+ | {
2389
+ /**
2390
+ * Renders a search field at the top of THIS group (so, inside its submenu when
2391
+ * the group is one), scoped to this group alone — the nested "category ›
2392
+ * searchable options" pattern. Typing narrows this group's rows by
2393
+ * the ranked search (see `filterBy`) and, for an async group, passes
2394
+ * the typed text to its getter as the context's `query` (a user search arrives
2395
+ * with `reason: 'search'`, as on `BbSelect`; see
2396
+ * `BbDropdownGroupItemsContext`). Each searchable group owns its own query,
2397
+ * independent of its siblings.
2398
+ */
2399
+ searchable: true;
2400
+ /**
2401
+ * Items of the group. Plain arrays are flattened.
2402
+ *
2403
+ * For a **pipeline group**, pass raw objects (`any[]`) or an (async) getter
2404
+ * `({ reason, modelValue, signal }) => Item[] | Promise<Item[]>` (plus
2405
+ * `query` when the group is `searchable`; see {@link DropdownGroupItemsGetter})
2406
+ * and pair it with `itemText`/`itemValue`. A `<BbDropdownGroup :id v-model>`
2407
+ * companion resolves such a group and surfaces the selected `itemValue`(s)
2408
+ * through `v-model`.
2409
+ */
2410
+ items: GroupRows | SearchGetter;
2411
+ }
2412
+ | {
2413
+ /**
2414
+ * Renders a search field at the top of THIS group (so, inside its submenu when
2415
+ * the group is one), scoped to this group alone — the nested "category ›
2416
+ * searchable options" pattern. Typing narrows this group's rows by
2417
+ * the ranked search (see `filterBy`) and, for an async group, passes
2418
+ * the typed text to its getter as the context's `query` (a user search arrives
2419
+ * with `reason: 'search'`, as on `BbSelect`; see
2420
+ * `BbDropdownGroupItemsContext`). Each searchable group owns its own query,
2421
+ * independent of its siblings.
2422
+ */
2423
+ searchable?: false;
2424
+ /**
2425
+ * Items of the group. Plain arrays are flattened.
2426
+ *
2427
+ * For a **pipeline group**, pass raw objects (`any[]`) or an (async) getter
2428
+ * `({ reason, modelValue, signal }) => Item[] | Promise<Item[]>` (plus
2429
+ * `query` when the group is `searchable`; see {@link DropdownGroupItemsGetter})
2430
+ * and pair it with `itemText`/`itemValue`. A `<BbDropdownGroup :id v-model>`
2431
+ * companion resolves such a group and surfaces the selected `itemValue`(s)
2432
+ * through `v-model`.
2433
+ */
2434
+ items: GroupRows | PlainGetter;
2435
+ };
2436
+
2437
+ type GroupRows =
2438
+ | Array<InternalItem | InternalItem[]>
2439
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- a fetched group's raw records, before normalisation (see `itemText`)
2440
+ | any[];
2210
2441
 
2211
2442
  /**
2212
2443
  * A group's items as a raw array, or `[]` when the items are still an
@@ -2219,6 +2450,17 @@ export const groupItemsAsArray = (
2219
2450
  ): Array<InternalItem | InternalItem[]> =>
2220
2451
  Array.isArray(items) ? (items as Array<InternalItem | InternalItem[]>) : [];
2221
2452
 
2453
+ /**
2454
+ * A string or number row: its own text and value (`'Google'` reads "Google"
2455
+ * and picks `'Google'`), loose, in a section, in a group's `items` or in a
2456
+ * submenu's `items`. It declares `searchable` like every entry, so a group
2457
+ * literal beside it still picks its plain or searchable getter.
2458
+ */
2459
+ export type PrimitiveRow = (string | number) & { searchable?: never };
2460
+
2461
+ /** One entry of an `items` array: an {@link Item} or a {@link PrimitiveRow}. */
2462
+ export type ItemEntry = Item | PrimitiveRow;
2463
+
2222
2464
  /**
2223
2465
  * Items accepted by the dropdown. Entries can be:
2224
2466
  * - a single {@link InternalItem};
@@ -2227,7 +2469,12 @@ export const groupItemsAsArray = (
2227
2469
  *
2228
2470
  * The shapes can be mixed, e.g. `[item, [item, item], { id, label, items }]`.
2229
2471
  */
2230
- export type Item = InternalItem | InternalGroup | Item[];
2472
+ export type Item =
2473
+ | InternalItem
2474
+ | InternalGroup
2475
+ // The `searchable` guard lets an unwritten `searchable` pick a group's
2476
+ // plain getter: every member of the union has to declare the property.
2477
+ | (ItemEntry[] & { searchable?: never });
2231
2478
 
2232
2479
  /** Unwraps the item type out of the (possibly nested) {@link Items} shape. */
2233
2480
  export type FlatItem<T> = T extends Array<infer U> ? U : T;
@@ -2258,7 +2505,17 @@ export const selectablePredicateOf = (
2258
2505
  ): ((item: any) => boolean) | undefined =>
2259
2506
  typeof entry.selectable === 'function' ? entry.selectable : undefined;
2260
2507
 
2261
- export const isGroup = (entry: Item): entry is InternalGroup =>
2508
+ /** A string or number row: its own text and value (normalizeGroups maps it). */
2509
+ export const isPrimitiveRow = (
2510
+ entry: ItemEntry | InternalItem | InternalItem[]
2511
+ ): entry is PrimitiveRow =>
2512
+ typeof entry === 'string' || typeof entry === 'number';
2513
+
2514
+ // A primitive row (`'Google'`, `3`) is its own text and value: never a group,
2515
+ // and `in` throws on it, so the object check comes first.
2516
+ export const isGroup = (entry: ItemEntry): entry is InternalGroup =>
2517
+ typeof entry === 'object' &&
2518
+ entry !== null &&
2262
2519
  !Array.isArray(entry) &&
2263
2520
  ((entry as InternalGroup).group === true ||
2264
2521
  'selectable' in entry ||
@@ -2603,7 +2860,13 @@ export type BbDropdownProps = BbDropdownPtProps & {
2603
2860
  *
2604
2861
  * @defaultValue `[]`
2605
2862
  */
2606
- items: Item[];
2863
+ items: Array<Item | PrimitiveRow>;
2864
+ /**
2865
+ * Keeps the trigger when no row is visible (by default it is hidden):
2866
+ * inert, no popup ARIA, `empty` in the activator slot. A `contextMenu`
2867
+ * trigger always stays.
2868
+ */
2869
+ keepActivator?: boolean;
2607
2870
  /**
2608
2871
  * Default placeholder text shown while a pipeline group's async items load.
2609
2872
  * A group's own `loadingText` overrides this; both fall back to the localized
@@ -2642,9 +2905,8 @@ export type BbDropdownProps = BbDropdownPtProps & {
2642
2905
  */
2643
2906
  padding?: number;
2644
2907
  /**
2645
- * Position of the dropdown relative to the activator.
2646
- * Use `'cursor'` to anchor at the mouse/touch coordinates.
2647
- * (No arrow is drawn either way — arrows are tooltip-only in v3.)
2908
+ * Position relative to the activator; `'cursor'` anchors at the
2909
+ * mouse/touch point. No arrow (tooltips only).
2648
2910
  *
2649
2911
  * @defaultValue `'bottom'`
2650
2912
  */
@@ -2658,8 +2920,8 @@ export type BbDropdownProps = BbDropdownPtProps & {
2658
2920
  queryDebounceTime?: number;
2659
2921
  /**
2660
2922
  * The open / close transition in milliseconds. Menus take the fast one
2661
- * (150), not the popovers' medium 250: a menu is opened to pick one command
2662
- * and gone again, so it answers faster than a panel you read or edit in.
2923
+ * (150), not the popovers' medium 250: a menu is picked from and gone, so
2924
+ * it answers faster than a panel you read or edit in.
2663
2925
  *
2664
2926
  * @defaultValue `150`
2665
2927
  */
@@ -2693,8 +2955,7 @@ export type BbDropdownEvents = {
2693
2955
  /**
2694
2956
  * The user selected a row in a selectable group, at the click — also when a
2695
2957
  * controlled companion's app then refuses the value. The payload is the
2696
- * row's value (its `item-value` for pipeline groups, else its `value`) —
2697
- * symmetric with `BbTable`'s `item:selected`.
2958
+ * row's value (its `item-value` for pipeline groups, else its `value`).
2698
2959
  */
2699
2960
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- the row's resolved value, whatever a fetched group's `item-value` returns: the dropdown is not generic, and `unknown` would reject a handler annotated `(id: number)`
2700
2961
  (e: 'item:selected', value: any): void;
@@ -2717,6 +2978,8 @@ export type BbDropdownActivatorProps = {
2717
2978
  export type BbDropdownActivatorSlotProps = {
2718
2979
  /** Whether the dropdown is globally disabled. */
2719
2980
  disabled?: boolean;
2981
+ /** No row is visible: the trigger is inert. */
2982
+ empty: boolean;
2720
2983
  /**
2721
2984
  * Whether any item's async `onClick` is currently in flight. Use to reflect a
2722
2985
  * global busy state on the trigger.
@@ -2870,9 +3133,8 @@ export type BbDropdownSlots = {
2870
3133
  */
2871
3134
  activator?: (props: BbDropdownActivatorSlotProps) => any;
2872
3135
  /**
2873
- * Content pinned to the top of the dropdown panel, outside the scroll area.
2874
- * Stays visible while the items scroll and is separated from them by a
2875
- * divider — for a title or a filter field.
3136
+ * Pinned above the rows, outside their scroll, with a divider — for a
3137
+ * title or a filter field.
2876
3138
  */
2877
3139
  header?: (props: BbDropdownEdgeSlotProps) => any;
2878
3140
  /**
@@ -2887,9 +3149,8 @@ export type BbDropdownSlots = {
2887
3149
  */
2888
3150
  'item:append'?: (props: BbDropdownItemSlotProps) => any;
2889
3151
  /**
2890
- * Content pinned to the bottom of the dropdown panel, outside the scroll
2891
- * area. Stays visible while the items scroll and is separated from them by a
2892
- * divider — for action buttons.
3152
+ * Pinned below the rows, outside their scroll, with a divider — for
3153
+ * action buttons.
2893
3154
  */
2894
3155
  footer?: (props: BbDropdownEdgeSlotProps) => any;
2895
3156
  } & Record<string, (props: BbDropdownItemSlotProps) => any>;
@@ -3828,7 +4089,7 @@ export type BbDropdownGroupEvents = {
3828
4089
  /* Same chevron_right asset the submenu rows use, pointed back:
3829
4090
  toward the inline start, which is already where it points in
3830
4091
  rtl. */
3831
- .bb-button__icon {
4092
+ .bb-button__prepend-icon {
3832
4093
  transform: rotate(180deg);
3833
4094
 
3834
4095
  &:dir(rtl) {