bitboss-ui 3.0.0-beta.74 → 3.0.0-beta.76

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 (321) hide show
  1. package/README.md +5 -5
  2. package/bin/cli.mjs +16 -10
  3. package/dist/ai/BbAlert.md +1 -1
  4. package/dist/ai/BbAvatar.md +86 -58
  5. package/dist/ai/BbBadge.md +1 -1
  6. package/dist/ai/BbBreadcrumbs.md +3 -3
  7. package/dist/ai/BbButton.md +4 -4
  8. package/dist/ai/BbCalendar.md +5 -2
  9. package/dist/ai/BbCheckboxGroup.md +5 -4
  10. package/dist/ai/BbColorInput.md +13 -1
  11. package/dist/ai/BbColorPalette.md +12 -7
  12. package/dist/ai/BbConfirm.md +1 -1
  13. package/dist/ai/BbDatePicker.md +13 -1
  14. package/dist/ai/BbDatePickerInput.md +18 -2
  15. package/dist/ai/BbDialog.md +6 -3
  16. package/dist/ai/BbDropdown.md +174 -77
  17. package/dist/ai/BbDropdownButton.md +37 -16
  18. package/dist/ai/BbGallery.md +3 -2
  19. package/dist/ai/BbIcon.md +10 -10
  20. package/dist/ai/BbNumberInput.md +3 -1
  21. package/dist/ai/BbOffCanvas.md +3 -2
  22. package/dist/ai/BbPopover.md +1 -1
  23. package/dist/ai/BbRadioGroup.md +4 -4
  24. package/dist/ai/BbSelect.md +227 -105
  25. package/dist/ai/BbSelectPopover.md +139 -14
  26. package/dist/ai/BbSwitchGroup.md +5 -4
  27. package/dist/ai/BbTable.md +18 -17
  28. package/dist/ai/BbTimePicker.md +13 -1
  29. package/dist/ai/BbTimePickerInput.md +16 -2
  30. package/dist/ai/BbToast.md +3 -2
  31. package/dist/ai/BbTree.md +5 -1
  32. package/dist/ai/CommonPopover.md +1 -0
  33. package/dist/ai/FlatListBox.md +1 -0
  34. package/dist/ai/GroupedListBox.md +3 -2
  35. package/dist/ai/ListBox.md +4 -2
  36. package/dist/ai/OptionsContainer.md +4 -4
  37. package/dist/ai/changelog.json +310 -7
  38. package/dist/ai/components.json +33 -35
  39. package/dist/ai/composables/useToast.md +2 -2
  40. package/dist/ai/design-tokens.json +60 -0
  41. package/dist/ai/guides/agent-contract.md +9 -5
  42. package/dist/ai/guides/calendars-and-digits.md +1 -1
  43. package/dist/ai/guides/design-tokens.md +13 -0
  44. package/dist/ai/guides/eslint-rules.md +1 -1
  45. package/dist/ai/guides/fetch-items-playbook.md +7 -11
  46. package/dist/ai/guides/icons-policy.md +32 -11
  47. package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
  48. package/dist/ai/guides/migration/adoption-checklist.md +1 -1
  49. package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
  50. package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
  51. package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
  52. package/dist/ai/guides/migration/components/bb-icon.md +4 -4
  53. package/dist/ai/guides/migration/components/bb-table.md +2 -1
  54. package/dist/ai/guides/migration/components/bb-toast.md +2 -2
  55. package/dist/ai/guides/migration/v2-to-v3.md +70 -24
  56. package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
  57. package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
  58. package/dist/ai/guides/passthrough.md +58 -58
  59. package/dist/ai/helpers/inertia/manifest.json +1 -1
  60. package/dist/ai/index.md +1 -1
  61. package/dist/ai/manifest/common.json +1 -0
  62. package/dist/ai/manifest/components/BbAvatar.json +5 -2
  63. package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
  64. package/dist/ai/manifest/components/BbCarousel.json +0 -3
  65. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  66. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
  67. package/dist/ai/manifest/components/BbColorInput.json +5 -2
  68. package/dist/ai/manifest/components/BbColorPalette.json +5 -2
  69. package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
  70. package/dist/ai/manifest/components/BbDatePicker.json +3 -0
  71. package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
  72. package/dist/ai/manifest/components/BbDialog.tree.json +3 -1
  73. package/dist/ai/manifest/components/BbDropdown.json +36 -28
  74. package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
  75. package/dist/ai/manifest/components/BbDropdown.tree.json +21 -11
  76. package/dist/ai/manifest/components/BbDropdownButton.json +24 -16
  77. package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
  78. package/dist/ai/manifest/components/BbDropdownButton.tree.json +4 -0
  79. package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
  80. package/dist/ai/manifest/components/BbOffCanvas.tree.json +3 -1
  81. package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
  82. package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
  83. package/dist/ai/manifest/components/BbSelect.json +47 -40
  84. package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
  85. package/dist/ai/manifest/components/BbSelectPopover.json +14 -7
  86. package/dist/ai/manifest/components/BbSelectPopover.tree.json +9 -2
  87. package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
  88. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
  89. package/dist/ai/manifest/components/BbTable.json +6 -6
  90. package/dist/ai/manifest/components/BbTable.tree.json +9 -1
  91. package/dist/ai/manifest/components/BbTimePicker.json +5 -2
  92. package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
  93. package/dist/ai/manifest/components/BbTree.json +1 -1
  94. package/dist/ai/manifest/components/CommonPopover.json +1 -0
  95. package/dist/ai/manifest/components/FlatListBox.json +2 -1
  96. package/dist/ai/manifest/components/GroupedListBox.json +3 -2
  97. package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
  98. package/dist/ai/manifest/components/ListBox.json +3 -2
  99. package/dist/ai/manifest/components/ListBox.tree.json +1 -1
  100. package/dist/ai/manifest/components/OptionsContainer.json +6 -4
  101. package/dist/ai/manifest/index.json +2 -2
  102. package/dist/ai/manifest/meta.json +0 -3
  103. package/dist/ai/manifest/types.advanced.json +6 -6
  104. package/dist/ai/manifest/types.api.json +1 -3
  105. package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
  106. package/dist/ai/recipes/inertia/onboarding.md +1 -1
  107. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
  108. package/dist/ai/recipes/nuxt/onboarding.md +1 -1
  109. package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
  110. package/dist/ai/recipes/vue/onboarding.md +2 -2
  111. package/dist/ai/source/BbAccordion.md +4 -5
  112. package/dist/ai/source/BbAvatar.md +128 -11
  113. package/dist/ai/source/BbBadge.md +18 -7
  114. package/dist/ai/source/BbBreadcrumbs.md +57 -56
  115. package/dist/ai/source/BbButton.md +41 -25
  116. package/dist/ai/source/BbCalendar.md +8 -6
  117. package/dist/ai/source/BbCarousel.md +41 -34
  118. package/dist/ai/source/BbCheckboxGroup.md +15 -9
  119. package/dist/ai/source/BbColorInput.md +19 -0
  120. package/dist/ai/source/BbColorPalette.md +23 -2
  121. package/dist/ai/source/BbDatePicker.md +18 -0
  122. package/dist/ai/source/BbDatePickerInput.md +47 -3
  123. package/dist/ai/source/BbDialog.md +14 -1
  124. package/dist/ai/source/BbDropdown.md +296 -99
  125. package/dist/ai/source/BbDropdownButton.md +61 -19
  126. package/dist/ai/source/BbDropdownGroup.md +189 -98
  127. package/dist/ai/source/BbGallery.md +82 -60
  128. package/dist/ai/source/BbHost.md +12 -0
  129. package/dist/ai/source/BbNumberInput.md +17 -10
  130. package/dist/ai/source/BbOffCanvas.md +14 -1
  131. package/dist/ai/source/BbPagination.md +12 -28
  132. package/dist/ai/source/BbRadioGroup.md +12 -5
  133. package/dist/ai/source/BbRating.md +4 -4
  134. package/dist/ai/source/BbSelect.md +151 -112
  135. package/dist/ai/source/BbSelectPopover.md +244 -29
  136. package/dist/ai/source/BbSwitchGroup.md +11 -4
  137. package/dist/ai/source/BbTable.md +114 -35
  138. package/dist/ai/source/BbTimePicker.md +19 -0
  139. package/dist/ai/source/BbTimePickerInput.md +21 -2
  140. package/dist/ai/source/BbToast.md +2 -2
  141. package/dist/ai/source/BbToastPortal.md +2 -2
  142. package/dist/ai/source/BbTree.md +1 -1
  143. package/dist/ai/source/ClearableButton.md +4 -2
  144. package/dist/ai/source/CommonPopover.md +24 -1
  145. package/dist/ai/source/ErrorIcon.md +4 -3
  146. package/dist/ai/source/FlatListBox.md +33 -7
  147. package/dist/ai/source/GroupedListBox.md +85 -14
  148. package/dist/ai/source/ListBox.md +11 -1
  149. package/dist/ai/source/OptionsContainer.md +29 -11
  150. package/dist/ai/source/WarningIcon.md +4 -3
  151. package/dist/assets/svgs/close.svg_raw.js +1 -1
  152. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
  153. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
  154. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
  155. package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +62 -43
  156. package/dist/components/BbAvatar/avatarIdentity.js +25 -0
  157. package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
  158. package/dist/components/BbAvatar/types.d.ts +24 -5
  159. package/dist/components/BbAvatar/types.js +5 -1
  160. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
  161. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +66 -64
  162. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +141 -146
  163. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
  164. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
  165. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
  166. package/dist/components/BbCalendar/useDayGrid.js +120 -123
  167. package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +503 -502
  168. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
  169. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
  170. package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
  171. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
  172. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
  173. package/dist/components/BbColorInput/types.d.ts +7 -0
  174. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
  175. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +208 -196
  176. package/dist/components/BbColorPalette/types.d.ts +7 -0
  177. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +3 -1
  178. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +84 -73
  179. package/dist/components/BbDatePicker/types.d.ts +7 -0
  180. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +4 -2
  181. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +496 -510
  182. package/dist/components/BbDatePickerInput/types.d.ts +7 -0
  183. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +219 -211
  184. package/dist/components/BbDialog/leaveGhost.js +22 -17
  185. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +106 -100
  186. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
  187. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +416 -369
  188. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +404 -354
  189. package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
  190. package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
  191. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +117 -102
  192. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +67 -38
  193. package/dist/components/BbDropdown/normalizeGroups.js +6 -2
  194. package/dist/components/BbDropdown/ptKeys.generated.d.ts +44 -20
  195. package/dist/components/BbDropdown/types.d.ts +109 -87
  196. package/dist/components/BbDropdown/types.js +3 -0
  197. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +3 -1
  198. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +101 -65
  199. package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +153 -57
  200. package/dist/components/BbDropdownButton/types.d.ts +23 -10
  201. package/dist/components/BbDropdownButton/types.js +4 -0
  202. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
  203. package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +335 -312
  204. package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
  205. package/dist/components/BbIcon/iconCache.js +1 -1
  206. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
  207. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +9 -5
  208. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +152 -144
  209. package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
  210. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
  211. package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
  212. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
  213. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
  214. package/dist/components/BbRadioGroup/types.d.ts +4 -7
  215. package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
  216. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
  217. package/dist/components/BbSelect/BbSelect.vue.d.ts +32 -20
  218. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +217 -196
  219. package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
  220. package/dist/components/BbSelect/types.d.ts +110 -111
  221. package/dist/components/BbSelect/types.js +1 -27
  222. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +8 -3
  223. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +728 -653
  224. package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
  225. package/dist/components/BbSelectPopover/types.d.ts +32 -17
  226. package/dist/components/BbSelectPopover/types.js +3 -1
  227. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
  228. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
  229. package/dist/components/BbSwitchGroup/types.d.ts +3 -6
  230. package/dist/components/BbTable/BbTable.vue.d.ts +2 -4
  231. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1171 -1152
  232. package/dist/components/BbTable/BbTableDataRow.js +97 -90
  233. package/dist/components/BbTable/types.d.ts +11 -10
  234. package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
  235. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
  236. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +145 -134
  237. package/dist/components/BbTimePicker/types.d.ts +7 -0
  238. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +4 -2
  239. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +290 -280
  240. package/dist/components/BbTimePickerInput/types.d.ts +7 -0
  241. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -78
  242. package/dist/components/BbToast/types.d.ts +2 -2
  243. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
  244. package/dist/components/BbTree/types.d.ts +1 -1
  245. package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
  246. package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
  247. package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
  248. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
  249. package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
  250. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +122 -102
  251. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +182 -153
  252. package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
  253. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
  254. package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
  255. package/dist/composables/useInternalIcon.js +25 -0
  256. package/dist/composables/useItemsGetter.js +34 -32
  257. package/dist/composables/useOpenModel.js +20 -0
  258. package/dist/deprecation/ai-deprecations.json.js +1 -1
  259. package/dist/i18n/locales/ar.json +2 -0
  260. package/dist/i18n/locales/cs.json +2 -0
  261. package/dist/i18n/locales/da.json +2 -0
  262. package/dist/i18n/locales/de-CH.json +2 -0
  263. package/dist/i18n/locales/de.json +2 -0
  264. package/dist/i18n/locales/el.json +2 -0
  265. package/dist/i18n/locales/en-GB.json +2 -0
  266. package/dist/i18n/locales/en.json +2 -0
  267. package/dist/i18n/locales/es-MX.json +2 -0
  268. package/dist/i18n/locales/es.json +2 -0
  269. package/dist/i18n/locales/fa.json +2 -0
  270. package/dist/i18n/locales/fi.json +2 -0
  271. package/dist/i18n/locales/fr.json +2 -0
  272. package/dist/i18n/locales/he.json +2 -0
  273. package/dist/i18n/locales/hu.json +2 -0
  274. package/dist/i18n/locales/it.json +2 -0
  275. package/dist/i18n/locales/ja.json +2 -0
  276. package/dist/i18n/locales/ko.json +2 -0
  277. package/dist/i18n/locales/nb.json +2 -0
  278. package/dist/i18n/locales/nl.json +2 -0
  279. package/dist/i18n/locales/pl.json +2 -0
  280. package/dist/i18n/locales/pt-BR.json +2 -0
  281. package/dist/i18n/locales/pt-PT.json +2 -0
  282. package/dist/i18n/locales/ro.json +2 -0
  283. package/dist/i18n/locales/ru.json +2 -0
  284. package/dist/i18n/locales/sv.json +2 -0
  285. package/dist/i18n/locales/tr.json +2 -0
  286. package/dist/i18n/locales/uk.json +2 -0
  287. package/dist/i18n/locales/zh-CN.json +2 -0
  288. package/dist/i18n/locales/zh-HK.json +2 -0
  289. package/dist/i18n/locales/zh-TW.json +2 -0
  290. package/dist/icon-scan.d.ts +1 -1
  291. package/dist/icon-scan.js +68 -61
  292. package/dist/index.d.ts +2 -2
  293. package/dist/llms-full.txt +1038 -451
  294. package/dist/llms-medium.txt +33 -28
  295. package/dist/llms.txt +2 -2
  296. package/dist/locale-blueprint.json +2 -0
  297. package/dist/nuxt.js +1 -1
  298. package/dist/styles.css +2 -2
  299. package/dist/types/ActionButton.d.ts +2 -3
  300. package/dist/types/Config.d.ts +8 -1
  301. package/dist/types/ConfigDefaults.d.ts +10 -2
  302. package/dist/types/Option.d.ts +10 -0
  303. package/dist/types/internalIcons.d.ts +89 -0
  304. package/dist/types/internalIcons.js +158 -0
  305. package/dist/types/ptComponentMap.d.ts +5 -5
  306. package/dist/utilities/functions/slotContent.js +19 -0
  307. package/dist/utils/configDefaults.js +75 -64
  308. package/dist/utils/iconsOption.js +48 -0
  309. package/dist/utils/loadRetry.js +8 -0
  310. package/dist/utils/versionCheck.js +1 -1
  311. package/dist/vite-plugin.d.ts +10 -16
  312. package/dist/vite.js +323 -307
  313. package/llms.txt +2 -2
  314. package/package.json +3 -1
  315. package/scripts/README.md +2 -0
  316. package/scripts/lib/adoption-checklist.json +1 -1
  317. package/scripts/lib/agent-setup.mjs +44 -26
  318. package/scripts/lib/update-install.mjs +48 -0
  319. package/scripts/lib/validate-bb-markup.mjs +93 -12
  320. package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
  321. package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
@@ -46,6 +46,7 @@
46
46
  v-model="open"
47
47
  :anchor="effectiveAnchor"
48
48
  :boundary="boundary"
49
+ :boundary-x="boundary ? undefined : tableEdges"
49
50
  :bubble-attrs="panelAttrs"
50
51
  class="bb-dropdown"
51
52
  :class="{
@@ -95,6 +96,7 @@
95
96
  reader in menu mode walks items — so the presentational row inside
96
97
  is skipped and an empty search would announce nothing. -->
97
98
  <span class="bb-sr-only" role="status">{{ statusText }}</span>
99
+ <DropdownFailures />
98
100
  <div
99
101
  v-if="$slots.footer"
100
102
  class="bb-dropdown__footer"
@@ -119,17 +121,20 @@ import { asSheetAttrs } from '../BbOffCanvas/sheetAttrs';
119
121
  import type { FallthroughAttrs } from '@/types/fallthrough';
120
122
  import {
121
123
  computed,
124
+ getCurrentInstance,
122
125
  mergeProps,
123
126
  onBeforeUnmount,
124
127
  onDeactivated,
125
128
  onMounted,
126
129
  reactive,
127
130
  ref,
131
+ shallowRef,
128
132
  useSlots,
129
133
  useTemplateRef,
130
134
  watch,
131
135
  } from 'vue';
132
136
  import { useId } from '@/composables/useId';
137
+ import { useOwnModel } from '@/composables/useOwnModel';
133
138
  import {
134
139
  pushEscapeEntry,
135
140
  removeEscapeEntry,
@@ -155,6 +160,8 @@ import { focusQuietly } from '@/utils/focusVisibility';
155
160
  import CommonPopover from '../CommonPopover/CommonPopover.vue';
156
161
  import type { CommonPopoverAvailableSpace } from '../CommonPopover/types';
157
162
  import BbDropdownList from './BbDropdownList.vue';
163
+ import DropdownFailures from './DropdownFailures.vue';
164
+ import { runRetry } from '@/utils/loadRetry';
158
165
  import AdaptiveDropdown from './AdaptiveDropdown.vue';
159
166
  import DropdownPipelineResolver from './DropdownPipelineResolver.vue';
160
167
  import { hash } from '@/utilities/functions/hash';
@@ -236,6 +243,8 @@ const props = withDefaults(
236
243
  queryDebounceTime: 300,
237
244
  // Tri-state: unset lets the components map show through.
238
245
  compact: undefined,
246
+ // Unset, not `false`: an absent `v-model` is no initial state.
247
+ modelValue: undefined,
239
248
  }
240
249
  );
241
250
  const emit = defineEmits<BbDropdownEvents>();
@@ -451,6 +460,21 @@ const cursorAnchor = ref<VirtualAnchor | null>(null);
451
460
  */
452
461
  const anchorElement = computed(() => props.anchor ?? activator.value);
453
462
  const anchorDom = computed(() => extractDomContainer(anchorElement.value));
463
+ /** Where this dropdown sits in the page, for a menu with no element anchor (a row menu at the cursor). */
464
+ const instance = getCurrentInstance();
465
+ const mountedIn = shallowRef<Element | null>(null);
466
+ onMounted(
467
+ () =>
468
+ (mountedIn.value =
469
+ (instance?.vnode.el as Node | null)?.parentElement ?? null)
470
+ );
471
+ /**
472
+ * A menu in a `BbTable` (a row menu, a cell's ⋯) stays within the table's left
473
+ * and right edges by default; up and down it flips at the viewport as anywhere.
474
+ */
475
+ const tableEdges = computed(
476
+ () => (anchorDom.value ?? mountedIn.value)?.closest('.bb-table') ?? undefined
477
+ );
454
478
 
455
479
  const effectiveAnchor = computed(() =>
456
480
  props.placement === 'cursor' && cursorAnchor.value
@@ -886,6 +910,10 @@ const groupLoading = reactive<Record<string, boolean>>({});
886
910
 
887
911
  /** Per-group "any fetch in flight" flag — surfaced to `useBbDropdown`. */
888
912
  const groupFetching = reactive<Record<string, boolean>>({});
913
+ /** Failed pipeline groups, by key: the message and the retry (publishFailure). */
914
+ const groupFailures = reactive<
915
+ Record<string, { text: string; retry: () => unknown }>
916
+ >({});
889
917
 
890
918
  /**
891
919
  * Resolve a selection key to the row's value — the mapped `item-value` for
@@ -1003,6 +1031,10 @@ provideDropdownGroupRegistry({
1003
1031
  if (fetching) groupFetching[key] = true;
1004
1032
  else delete groupFetching[key];
1005
1033
  },
1034
+ publishFailure: (key, failure) => {
1035
+ if (failure) groupFailures[key] = failure;
1036
+ else delete groupFailures[key];
1037
+ },
1006
1038
  publishModel: (key, value) => {
1007
1039
  if (value === undefined) companionModels.delete(key);
1008
1040
  else companionModels.set(key, value);
@@ -1353,8 +1385,9 @@ let openModality: 'pointer' | 'keyboard' | undefined;
1353
1385
  const focusActivator = () => {
1354
1386
  // The tracked element, not `#${id}`: an adopted external activator keeps
1355
1387
  // its own id (see the adoption watch), so an id lookup would no-op.
1388
+ const tracked = activator.value?.isConnected ? activator.value : undefined;
1356
1389
  const button =
1357
- activator.value ??
1390
+ tracked ??
1358
1391
  (activatorId.value ? document.getElementById(activatorId.value) : null) ??
1359
1392
  returnFocusTo;
1360
1393
  button?.focus();
@@ -1370,6 +1403,26 @@ provideDropdownContext({
1370
1403
  statusText.value = text;
1371
1404
  },
1372
1405
  status: statusText,
1406
+ failures: computed(() =>
1407
+ Object.entries(groupFailures)
1408
+ .filter(([key]) => topLevelPipelineKeys.value.includes(key))
1409
+ .map(([key, { text }]) => ({ key, text }))
1410
+ ),
1411
+ retryFailure: (key, event) => {
1412
+ const failure = groupFailures[key];
1413
+ if (!failure) return;
1414
+ // The search field the user types in, else the panel itself.
1415
+ const surface = (
1416
+ event.currentTarget as HTMLElement | null
1417
+ )?.closest<HTMLElement>('[data-bb-dropdown-surface], dialog');
1418
+ runRetry(
1419
+ event,
1420
+ failure.retry,
1421
+ () =>
1422
+ surface?.querySelector<HTMLElement>('.bb-dropdown__search-input') ??
1423
+ surface
1424
+ );
1425
+ },
1373
1426
  open,
1374
1427
  queryFor: (key) => groupQueries[key] ?? '',
1375
1428
  setQuery: (key, value) => {
@@ -1729,6 +1782,59 @@ const closeDropdown = async () => {
1729
1782
  pause();
1730
1783
  };
1731
1784
 
1785
+ /*
1786
+ * `v-model` = open, the rule of every
1787
+ * `v-model` here (useOwnModel): bound, the app's value is the state and the
1788
+ * user's opens and closes are emitted; a static value with no listener seeds
1789
+ * it. An open from code is a keyboard open at the activator or `anchor`:
1790
+ * focus on the first row, and back to the activator (else where it was) on
1791
+ * close.
1792
+ */
1793
+ const { model: openModel, set: setOpenModel } = useOwnModel(
1794
+ props,
1795
+ 'modelValue',
1796
+ emit,
1797
+ () => false
1798
+ );
1799
+ const openFromModel = async () => {
1800
+ // A task later: a menu whose row set the flag (open this one from another
1801
+ // menu's item) closes and hands focus back to its own activator first, so
1802
+ // that focus is not an outside press that closes this menu at once.
1803
+ await wait(0);
1804
+ if (!openModel.value || open.value) return;
1805
+ const focused = document.activeElement;
1806
+ returnFocusTo = focused instanceof HTMLElement ? focused : null;
1807
+ openModality = 'keyboard';
1808
+ await openDropdown();
1809
+ // Nothing to show (no visible row): the menu stays closed, and says so.
1810
+ if (!open.value) {
1811
+ setOpenModel(false);
1812
+ return;
1813
+ }
1814
+ if (useOffcanvas.value) return;
1815
+ await wait(0);
1816
+ rootList.value?.focusFirst(true);
1817
+ };
1818
+ watch(open, (value) => {
1819
+ if (openModel.value !== value) setOpenModel(value);
1820
+ });
1821
+ /** A close from code: focus inside the menu goes back to the activator. */
1822
+ const closeFromModel = () => {
1823
+ const focusInPanel = !!document.activeElement?.closest(
1824
+ `[data-bb-dropdown-surface="${CSS.escape(id)}"]`
1825
+ );
1826
+ void closeDropdown();
1827
+ if (focusInPanel) focusActivator();
1828
+ };
1829
+ watch(openModel, (value) => {
1830
+ if (value === open.value) return;
1831
+ if (value) void openFromModel();
1832
+ else closeFromModel();
1833
+ });
1834
+ onMounted(() => {
1835
+ if (openModel.value && !open.value) void openFromModel();
1836
+ });
1837
+
1732
1838
  // An owner opening this menu from code: at a point, as a
1733
1839
  // right-click (`'pointer'`) or Shift+F10 (`'keyboard'`, first row focused) would.
1734
1840
  registerDropdownHandle({
@@ -2168,9 +2274,9 @@ export type InternalItem = Omit<
2168
2274
  };
2169
2275
 
2170
2276
  /**
2171
- * An optionally titled, optionally selectable section of the menu. Shares base
2172
- * props with {@link InternalItem} but does **not** extend BbBaseButton — it is a section
2173
- * descriptor, not an individually rendered button.
2277
+ * An optionally titled, optionally selectable group of the menu's rows. Shares
2278
+ * base props with {@link InternalItem} but does **not** extend BbBaseButton — it
2279
+ * is a group descriptor, not an individually rendered button.
2174
2280
  */
2175
2281
  /**
2176
2282
  * Async/array items getter for a pipeline group, returning the raw items
@@ -2202,9 +2308,12 @@ export type InternalItem = Omit<
2202
2308
  */
2203
2309
  export type DropdownGroupItemsGetter = PlainGetter | SearchGetter;
2204
2310
 
2205
- /** A group without a search box: no `query` arrives. */
2311
+ /**
2312
+ * A group without a search box: no `query` arrives (`undefined`, so the two
2313
+ * getters' contexts reject each other both ways, whatever the check order).
2314
+ */
2206
2315
  type PlainGetter = (
2207
- context: BbDropdownGroupItemsContext
2316
+ context: BbDropdownGroupItemsContext & { query?: undefined }
2208
2317
  // 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
2209
2318
  ) => any[] | Promise<any[]>;
2210
2319
 
@@ -2354,12 +2463,19 @@ export type InternalGroup = DropdownEntryBase & {
2354
2463
  /** Placeholder for this group's search field. Defaults to the localized label. */
2355
2464
  searchPlaceholder?: string;
2356
2465
  /**
2357
- * Sorts the group's rows under titled sections, inside the one group (one
2466
+ * Characters to type before the search runs (`BbSelect`'s rule): below
2467
+ * it the query counts as empty. Requires `searchable`.
2468
+ *
2469
+ * @defaultValue `0`
2470
+ */
2471
+ minQueryLength?: number;
2472
+ /**
2473
+ * Sorts the group's rows under headings, inside the one group (one
2358
2474
  * `v-model`, one search field): a field path read off each row (a fetched
2359
- * row: its raw item) or a getter returning the section title. Rows with a
2360
- * nullish title are listed without a heading. Sections keep the order in
2361
- * which their first row appears, like `BbSelect`'s `groupBy`; a search hides
2362
- * a section with no matching row.
2475
+ * row: its raw item) or a getter returning the heading. Rows with a
2476
+ * nullish value are listed first, without a heading. Headings keep the
2477
+ * order in which their first row appears, like `BbSelect`'s `groupBy`; a
2478
+ * search hides a heading with no matching row.
2363
2479
  */
2364
2480
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- the dropdown is not generic: a fetched row is whatever the getter returned, so an accessor annotated with the app's row type (`(c: Clinic) => c.name`) must fit
2365
2481
  groupBy?: string | ((row: any) => string | null | undefined);
@@ -2395,7 +2511,7 @@ export type InternalGroup = DropdownEntryBase & {
2395
2511
  stash?: boolean;
2396
2512
  /**
2397
2513
  * The group's label — rendered as its heading above the items, exposed as the
2398
- * section title in the adaptive sheet, and surfaced on `useBbDropdown`
2514
+ * group's title in the adaptive sheet, and surfaced on `useBbDropdown`
2399
2515
  * (handy for chip prefixes / filter summaries).
2400
2516
  */
2401
2517
  label?: string;
@@ -2480,7 +2596,7 @@ export const groupItemsAsArray = (
2480
2596
 
2481
2597
  /**
2482
2598
  * A string or number row: its own text and value (`'Google'` reads "Google"
2483
- * and picks `'Google'`), loose, in a section, in a group's `items` or in a
2599
+ * and picks `'Google'`), loose, in a divider run, in a group's `items` or in a
2484
2600
  * submenu's `items`. It declares `searchable` like every entry, so a group
2485
2601
  * literal beside it still picks its plain or searchable getter.
2486
2602
  */
@@ -2493,7 +2609,7 @@ export type ItemEntry = Item | PrimitiveRow;
2493
2609
  * Items accepted by the dropdown. Entries can be:
2494
2610
  * - a single {@link InternalItem};
2495
2611
  * - an array of items — rendered as an anonymous divider-separated group;
2496
- * - a {@link InternalGroup} object — a titled / selectable section.
2612
+ * - a {@link InternalGroup} object — a titled / selectable group.
2497
2613
  *
2498
2614
  * The shapes can be mixed, e.g. `[item, [item, item], { id, label, items }]`.
2499
2615
  */
@@ -2586,7 +2702,9 @@ export type NormalizedGroup = {
2586
2702
  searchable?: boolean;
2587
2703
  /** Placeholder for this group's search field. */
2588
2704
  searchPlaceholder?: string;
2589
- /** Section title per row (see {@link InternalGroup.groupBy}). */
2705
+ /** Characters to type before the search runs (see {@link InternalGroup.minQueryLength}). */
2706
+ minQueryLength?: number;
2707
+ /** Heading per row (see {@link InternalGroup.groupBy}). */
2590
2708
  groupBy?: InternalGroup['groupBy'];
2591
2709
  selectable: boolean;
2592
2710
  /** Selected row keys (`rowKey`; injected by `BbDropdown`; empty for non-selectable groups). */
@@ -2610,27 +2728,31 @@ export type MappedItem = InternalItem & {
2610
2728
  };
2611
2729
 
2612
2730
  /**
2613
- * Passthrough parts of `BbDropdown`. Groups,
2614
- * headings and dividers are not parts.
2731
+ * Passthrough parts of `BbDropdown`. A group's
2732
+ * items box and the dividers are not parts.
2615
2733
  *
2616
2734
  * Per-item functions: on the instance, an entry part (`item`, `itemText`, `itemIcon`, `itemDescription`, `check`) and `submenu` (called with the entry that opens it) also accept `({ item, selected, … }) => PtValue | false | null | undefined` — `item` is the menu entry (an `Item`: its `label`, `value`, `description`, whatever else you put on it), every state a boolean beside it, on for it (`selected`, `disabled`, …), and the entry's `variant` as a string (`default` when it has none) — in the `pt` object or the `:pt:<part>` attribute, never on a `<part>:<state>` key and never in the global map or a scope (they ship as JSON). Its result is merged last, after every state entry, through the same deduper; a falsy result leaves the entry as it was. See the passthrough guide, _Per-item functions_.
2617
2735
  *
2618
- * @part root - The floating element — an invisible positioning wrapper; a
2619
- * `class` on the component lands here. No node on the phone sheet: style
2620
- * what you see with `panel`.
2736
+ * @part root - The floating element, an invisible positioning wrapper; a
2737
+ * `class` on the component lands here. No node on the phone sheet (style
2738
+ * `panel` there).
2621
2739
  * @part panel - The menu surface you see — the bordered flyout box on
2622
2740
  * desktop, the sheet itself on a phone.
2623
- * @part sheet - The bottom sheet the menu becomes on a phone (the
2624
- * `BbOffCanvas` root) — never the desktop surface. Applied after `panel`, so it wins a conflict there.
2741
+ * @part sheet - The phone's bottom sheet (the `BbOffCanvas` root), never the
2742
+ * desktop surface; applied after `panel`, so it wins a conflict.
2625
2743
  * @part header - The menu's header band.
2626
2744
  * @part footer - The menu's footer band.
2627
- * @part input - A searchable group's search field — a broadcast: it lands on
2628
- * every searchable group's field, desktop and phone alike. Its magnifier
2629
- * glyph is chrome.
2630
- * @part list - The top-level items container between the bands — the node
2631
- * that lays the entries out (a flex column with a 1px gap; on a phone, the
2632
- * sheet's items container). A submenu's list is not reached. Groups,
2633
- * headings and dividers are not parts.
2745
+ * @part box - Every searchable group's search box (field and magnifier),
2746
+ * as `box` on a field; desktop and phone.
2747
+ * @part input - Every searchable group's search field, desktop and phone
2748
+ * alike. Its magnifier glyph is chrome.
2749
+ * @part list - The top-level entries' container between the bands (a flex
2750
+ * column, 1px gap; on a phone, the sheet's). A submenu's list is not
2751
+ * reached.
2752
+ * @part groupLabel - Every group's label row (its `label` and icons; the
2753
+ * row an `onClick` group activates). `#<id>:label` replaces its content.
2754
+ * @part groupHeader - Every `groupBy` heading (sticky). `#group` /
2755
+ * `#<id>:group` replace its content.
2634
2756
  * @part item - One menu entry, submenus included — a broadcast resolved per
2635
2757
  * entry. Also takes a per-item function, called with the entry.
2636
2758
  * @part itemText - An entry's label (its `label`) — resolved with that
@@ -2638,9 +2760,9 @@ export type MappedItem = InternalItem & {
2638
2760
  * per-item function.
2639
2761
  * @part itemIcon - An entry's prepend / append icons — resolved with that
2640
2762
  * entry's states. Also takes a per-item function.
2641
- * @part itemDescription - An entry's muted second line (its `description`) —
2642
- * resolved with that entry's states. A per-entry `#<value>` slot replaces it.
2643
- * Also takes a per-item function.
2763
+ * @part itemDescription - An entry's muted second line (its `description`),
2764
+ * with the entry's states. A per-entry `#<value>` slot replaces it. Also
2765
+ * takes a per-item function.
2644
2766
  * @part check - A checked entry's tick, outside the row slots:
2645
2767
  * `pt:check="hidden"` spares your own glyph. Also takes a per-item function.
2646
2768
  * @part submenu - Every submenu's flyout box (desktop only). Also takes a
@@ -2652,8 +2774,11 @@ export type BbDropdownPtPart =
2652
2774
  | 'sheet'
2653
2775
  | 'header'
2654
2776
  | 'footer'
2777
+ | 'box'
2655
2778
  | 'input'
2656
2779
  | 'list'
2780
+ | 'groupLabel'
2781
+ | 'groupHeader'
2657
2782
  | 'item'
2658
2783
  | 'itemText'
2659
2784
  | 'itemIcon'
@@ -2667,8 +2792,11 @@ export type BbDropdownSurfacePtPart =
2667
2792
  | 'sheet'
2668
2793
  | 'header'
2669
2794
  | 'footer'
2795
+ | 'box'
2670
2796
  | 'input'
2671
- | 'list';
2797
+ | 'list'
2798
+ | 'groupLabel'
2799
+ | 'groupHeader';
2672
2800
  /** The entry parts — broadcasts resolved per entry; their base key also takes a per-item function. Spelled flat (T20). */
2673
2801
  export type BbDropdownItemPtPart =
2674
2802
  | 'item'
@@ -2692,8 +2820,8 @@ export type BbDropdownItemFnPtPart =
2692
2820
  * (the link states: while the entry's `activeClass` / `exactActiveClass` are).
2693
2821
  *
2694
2822
  * @state activeLink - Per node, on the entry parts: an entry whose link
2695
- * (`to` / `href`) points at the current page or one of its ancestors —
2696
- * exactly when its `activeClass` is on. The weakest state.
2823
+ * (`to` / `href`) is the current page or an ancestor (its `activeClass` is
2824
+ * on). The weakest state.
2697
2825
  * @state exactActiveLink - Per node, on the entry parts: an entry whose link
2698
2826
  * points at the current page itself — its `exactActiveClass` is on.
2699
2827
  * @state selected - Per node, on the entry parts: a selectable group's
@@ -2729,8 +2857,11 @@ export const BB_DROPDOWN_PT = {
2729
2857
  'sheet',
2730
2858
  'header',
2731
2859
  'footer',
2860
+ 'box',
2732
2861
  'input',
2733
2862
  'list',
2863
+ 'groupLabel',
2864
+ 'groupHeader',
2734
2865
  'item',
2735
2866
  'itemText',
2736
2867
  'itemIcon',
@@ -2819,26 +2950,24 @@ export type BbDropdownProps = BbDropdownPtProps & {
2819
2950
  */
2820
2951
  activator?: ElementOrComponentRef;
2821
2952
  /**
2822
- * On mobile (below `config.mobileMaxWidth`), renders the menu as a bottom
2823
- * sheet that drills into submenus one level at a time instead of hover
2824
- * flyouts; slots and selection are unchanged. Unset: the global
2825
- * `all.adaptive`.
2953
+ * On mobile (below `config.mobileMaxWidth`), the menu is a bottom sheet
2954
+ * drilling into submenus a level at a time, not hover flyouts; slots and
2955
+ * selection unchanged. Unset: the global `all.adaptive`.
2826
2956
  *
2827
2957
  * @defaultValue `all.adaptive` (`true`)
2828
2958
  */
2829
2959
  adaptive?: boolean;
2830
2960
  /**
2831
- * Whether a selection closes the menu. Unset: a change in a single-choice
2832
- * group closes it (an untick too, at any depth); a `multiple` group stays
2833
- * open. `true`: every selection change closes it. `false`: none does.
2961
+ * Whether a selection closes the menu. Unset: a single-choice group's
2962
+ * change closes it (an untick too, any depth), a `multiple` group stays
2963
+ * open. `true`: every change closes it; `false`: none.
2834
2964
  *
2835
2965
  * @defaultValue unset (close after a single-choice change)
2836
2966
  */
2837
2967
  closeOnSelect?: boolean;
2838
2968
  /**
2839
- * Compact density, the `BbSelect` ladder: flyout rows 28px → 24px, sheet
2840
- * rows 44px → 36px (a sheet row stays a touch target). The label size does
2841
- * not change.
2969
+ * Compact density, the `BbSelect` ladder: flyout rows 28 → 24px, sheet rows
2970
+ * 44 → 36px (still a touch target). The label size stays.
2842
2971
  */
2843
2972
  compact?: boolean;
2844
2973
  /**
@@ -2849,11 +2978,13 @@ export type BbDropdownProps = BbDropdownPtProps & {
2849
2978
  * @defaultValue the activator element
2850
2979
  */
2851
2980
  anchor?: ElementOrComponentRef | VirtualAnchor;
2981
+ /** Whether the menu is open (`v-model`): `true` opens it from code at its activator or `anchor`. Unbound: the initial state. */
2982
+ modelValue?: boolean;
2852
2983
  /**
2853
- * Keeps the panel inside this element beside its trigger (sideways for a
2854
- * menu above or below); away from it the panel may pass the edge, and only
2855
- * the viewport flips it. An element, a component ref or a CSS selector (a
2856
- * `useTemplateRef`, not `$refs.x`: not reactive).
2984
+ * Keeps the panel inside this element beside its trigger (sideways under a
2985
+ * menu); away from it only the viewport flips it. An element, component ref
2986
+ * or CSS selector (a `useTemplateRef`, not `$refs.x`). In a `BbTable`: its
2987
+ * left and right edges.
2857
2988
  */
2858
2989
  // Spelled out, not `ElementOrComponentRefOrSelector`: one type name
2859
2990
  // fewer in the component's agent answer, which sits at its size cap.
@@ -2863,9 +2994,9 @@ export type BbDropdownProps = BbDropdownPtProps & {
2863
2994
  */
2864
2995
  disabled?: boolean;
2865
2996
  /**
2866
- * Renders the menu panel at mount instead of on the first open (the phone
2867
- * sheet's too), and keeps its rows after a close. Without it the rows mount
2868
- * on each open and go once the menu has closed.
2997
+ * Renders the panel (the phone sheet's too) at mount, not on the first
2998
+ * open, and keeps its rows after a close; otherwise rows mount on each open
2999
+ * and go after the close.
2869
3000
  */
2870
3001
  eager?: boolean;
2871
3002
  /**
@@ -2883,7 +3014,7 @@ export type BbDropdownProps = BbDropdownPtProps & {
2883
3014
  /**
2884
3015
  * The menu rows, each a `BbBaseButton` (`button`, `a` or `router-link`): a
2885
3016
  * flat array for one group, nested arrays for divider-separated groups, or
2886
- * `InternalGroup` objects for titled / selectable sections. A row's own
3017
+ * `InternalGroup` objects for titled / selectable groups. A row's own
2887
3018
  * `items` opens a submenu.
2888
3019
  *
2889
3020
  * @defaultValue `[]`
@@ -2895,23 +3026,11 @@ export type BbDropdownProps = BbDropdownPtProps & {
2895
3026
  * trigger always stays.
2896
3027
  */
2897
3028
  keepActivator?: boolean;
2898
- /**
2899
- * Default placeholder text shown while a pipeline group's async items load.
2900
- * A group's own `loadingText` overrides this; both fall back to the localized
2901
- * `common.loadingText` (`'Loading...'`).
2902
- */
3029
+ /** A pipeline group's loading row; its own `loadingText` wins. Default: `common.loadingText`. */
2903
3030
  loadingText?: string;
2904
- /**
2905
- * Default placeholder text shown when a pipeline group resolves to no items.
2906
- * A group's own `emptyText` overrides this; both fall back to the localized
2907
- * `common.emptyText` (`'No data to display'`).
2908
- */
3031
+ /** A pipeline group's no-items row; its own `emptyText` wins. Default: `common.emptyText`. */
2909
3032
  emptyText?: string;
2910
- /**
2911
- * Default placeholder text shown when a pipeline group's latest load FAILED
2912
- * (its `items` getter threw). A group's own `failedText` overrides this; both
2913
- * fall back to the localized `common.failedText` (`"Couldn't load items"`).
2914
- */
3033
+ /** A pipeline group's failed-load row (its getter threw); its own `failedText` wins. Default: `common.failedText`. */
2915
3034
  failedText?: string;
2916
3035
  /**
2917
3036
  * Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on
@@ -2947,18 +3066,16 @@ export type BbDropdownProps = BbDropdownPtProps & {
2947
3066
  */
2948
3067
  queryDebounceTime?: number;
2949
3068
  /**
2950
- * The open / close transition in milliseconds. Menus take the fast one
2951
- * (150), not the popovers' medium 250: a menu is picked from and gone, so
2952
- * it answers faster than a panel you read or edit in.
3069
+ * The open / close transition (ms). Menus take the fast 150, not the
3070
+ * popovers' 250: a menu is picked from and gone, quicker than a panel you
3071
+ * read or edit.
2953
3072
  *
2954
3073
  * @defaultValue `150`
2955
3074
  */
2956
3075
  transitionDuration?: number;
2957
3076
  /**
2958
- * Interaction(s) that open the dropdown.
2959
- * Accepts a single trigger or an array to combine them.
2960
- * - `'click'` — left-click / tap (default)
2961
- * - `'contextMenu'` — right-click on desktop, long-press on mobile
3077
+ * What opens the menu, one or an array: `'click'` (left-click / tap) or
3078
+ * `'contextMenu'` (right-click; long-press on mobile).
2962
3079
  *
2963
3080
  * @defaultValue `'click'`
2964
3081
  */
@@ -2972,6 +3089,8 @@ export type BbDropdownProps = BbDropdownPtProps & {
2972
3089
  };
2973
3090
 
2974
3091
  export type BbDropdownEvents = {
3092
+ /** The menu opened or closed (`v-model`): `true` on open, `false` on close. */
3093
+ (e: 'update:modelValue', value: boolean): void;
2975
3094
  /** Emitted as soon as the menu (the popover, or the sheet on a phone) starts to open. */
2976
3095
  (e: 'show'): void;
2977
3096
  /** Emitted once the menu is open and its open transition has finished. */
@@ -2981,9 +3100,9 @@ export type BbDropdownEvents = {
2981
3100
  /** Emitted once the menu has finished closing. */
2982
3101
  (e: 'hidden'): void;
2983
3102
  /**
2984
- * The user selected a row in a selectable group, at the click — also when a
2985
- * controlled companion's app then refuses the value. The payload is the
2986
- * row's value (its `item-value` for pipeline groups, else its `value`).
3103
+ * The user selected a row in a selectable group, at the click, even when a
3104
+ * controlled companion's app then refuses it. Payload: the row's value
3105
+ * (`item-value` for pipeline groups, else `value`).
2987
3106
  */
2988
3107
  // 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)`
2989
3108
  (e: 'item:selected', value: any): void;
@@ -3049,6 +3168,20 @@ export type BbDropdownSlotGroup = {
3049
3168
  selectable: boolean;
3050
3169
  };
3051
3170
 
3171
+ /** A `groupBy` heading's slot scope (`BbSelect`'s `#group`). */
3172
+ export type BbDropdownGroupSlotProps = {
3173
+ /** The heading text. */
3174
+ text: string;
3175
+ /** The raw `groupBy` value. */
3176
+ item: unknown;
3177
+ /** The heading's position. */
3178
+ index: number;
3179
+ /** Its row count. */
3180
+ length: number;
3181
+ /** Every row disabled. */
3182
+ disabled: boolean;
3183
+ };
3184
+
3052
3185
  /** Props exposed by the `item:prepend` and `item:append` slots, and named item slots. */
3053
3186
  export type BbDropdownItemSlotProps = {
3054
3187
  /** The item's muted description line, when set. */
@@ -3130,9 +3263,10 @@ export type BbDropdownPlaceholderSlotProps = {
3130
3263
  * @dynamicSlot `<groupId>:item` {BbDropdownItemSlotProps} - The content of every row of that group, and no other; a row's own `#<value>` still wins.
3131
3264
  * @dynamicSlot `<groupId>:item:prepend` {BbDropdownItemSlotProps} - The leading region of every row of that group — e.g. an avatar per record, drawn from `item.meta`, while other rows keep their `prepend:icon`.
3132
3265
  * @dynamicSlot `<groupId>:item:append` {BbDropdownItemSlotProps} - The trailing region of every row of that group; replaces their `append:icon`. The check takes its place on the selected row.
3133
- * @dynamicSlot `<groupId>` {BbDropdownItemSlotProps} - That group's title line (the group is passed as `item`, `groupTitle` is `true`).
3266
+ * @dynamicSlot `<groupId>:label` {BbDropdownItemSlotProps} - That group's title content (`item` is the group, `groupTitle` is `true`).
3134
3267
  * @dynamicSlot `<groupId>:prepend` {BbDropdownItemSlotProps} - The leading region of that group's title line.
3135
3268
  * @dynamicSlot `<groupId>:append` {BbDropdownItemSlotProps} - The trailing region of that group's title line.
3269
+ * @dynamicSlot `<groupId>:group` {BbDropdownGroupSlotProps} - That group's `groupBy` headings; beats `group`.
3136
3270
  */
3137
3271
  export type BbDropdownSlots = {
3138
3272
  /**
@@ -3146,9 +3280,9 @@ export type BbDropdownSlots = {
3146
3280
  */
3147
3281
  loading?: (props: BbDropdownPlaceholderSlotProps) => any;
3148
3282
  /**
3149
- * Replaces the default "no data" placeholder row shown in a pipeline group
3150
- * that resolved to no items. Rendered once per empty group. A failed load
3151
- * is not empty: it keeps its own row (the error icon and `failedText`).
3283
+ * Replaces the placeholder row of a pipeline group that resolved to no
3284
+ * items, once per empty group. A failed load is not empty: it keeps its
3285
+ * own row (error icon, `failedText`).
3152
3286
  */
3153
3287
  empty?: (props: BbDropdownPlaceholderSlotProps) => any;
3154
3288
  /**
@@ -3162,13 +3296,13 @@ export type BbDropdownSlots = {
3162
3296
  header?: (props: BbDropdownEdgeSlotProps) => any;
3163
3297
  /**
3164
3298
  * The leading region of every row (and group title line), replacing its
3165
- * `prepend:icon`. A row's own or its group's named slot wins over it.
3299
+ * `prepend:icon` wherever it renders. A named slot wins.
3166
3300
  */
3167
3301
  'item:prepend'?: (props: BbDropdownItemSlotProps) => any;
3168
3302
  /**
3169
- * The trailing region of every row (and group title line), replacing its
3170
- * `append:icon`. A named slot wins over it; the submenu chevron and the
3171
- * check on a selected row take its place.
3303
+ * The trailing region of every row (and group label), replacing its
3304
+ * `append:icon` wherever it renders. A named slot wins; a submenu chevron
3305
+ * or a selected row's check takes its place.
3172
3306
  */
3173
3307
  'item:append'?: (props: BbDropdownItemSlotProps) => any;
3174
3308
  /**
@@ -3176,6 +3310,8 @@ export type BbDropdownSlots = {
3176
3310
  * action buttons.
3177
3311
  */
3178
3312
  footer?: (props: BbDropdownEdgeSlotProps) => any;
3313
+ /** Every group's `groupBy` headings (`BbSelect`'s `#group` scope); `#<groupId>:group` beats it. */
3314
+ group?: (props: BbDropdownGroupSlotProps) => unknown;
3179
3315
  } & Record<string, (props: BbDropdownItemSlotProps) => any>;
3180
3316
 
3181
3317
  /**
@@ -3527,7 +3663,9 @@ export type BbDropdownGroupEvents = {
3527
3663
  margin-top: -1.5px;
3528
3664
  }
3529
3665
 
3530
- .bb-dropdown__group-title {
3666
+ /* A group's label and a `groupBy` heading share the look, not the class. */
3667
+ .bb-dropdown__group-label,
3668
+ .bb-dropdown__group-header {
3531
3669
  align-items: center;
3532
3670
  /* Same token as BbSelectPopover's group headers (for parity), so
3533
3671
  * the two menus can never drift. Muted, not faint: a title is read
@@ -3554,14 +3692,15 @@ export type BbDropdownGroupEvents = {
3554
3692
  }
3555
3693
  }
3556
3694
 
3557
- .group-title__prepend-icon,
3558
- .group-title__append-icon {
3695
+ .group-label__prepend-icon,
3696
+ .group-label__append-icon {
3559
3697
  --size: 14px;
3560
3698
  flex-shrink: 0;
3561
3699
  font-size: 13px;
3562
3700
  }
3563
3701
 
3564
- .group-title__content {
3702
+ .group-label__content,
3703
+ .group-header__content {
3565
3704
  flex: auto;
3566
3705
  min-width: 0;
3567
3706
  overflow: hidden;
@@ -3569,11 +3708,26 @@ export type BbDropdownGroupEvents = {
3569
3708
  white-space: nowrap;
3570
3709
  }
3571
3710
 
3572
- &.bb-dropdown__group-title--variant-destructive {
3711
+ &.bb-dropdown__group-label--variant-destructive {
3573
3712
  color: var(--bb-danger);
3574
3713
  }
3575
3714
  }
3576
3715
 
3716
+ /* `groupBy` headings are sticky, as BbSelect's group headers: the
3717
+ scrolled heading stays pinned while its rows pass under it, over the
3718
+ list's own inset so no row peeks above it. A row focused from the
3719
+ keyboard stops below it, never under it. */
3720
+ .bb-dropdown__group-header {
3721
+ background-color: var(--bg);
3722
+ position: sticky;
3723
+ top: calc(-1 * var(--menu-inset));
3724
+ z-index: 1;
3725
+ }
3726
+
3727
+ .bb-dropdown__group-section .bb-dropdown__item {
3728
+ scroll-margin-top: 1.75rem;
3729
+ }
3730
+
3577
3731
  .bb-dropdown__divider {
3578
3732
  /* Negative inline margins cancel the container padding so the rule
3579
3733
  * spans the full width of the dropdown panel, edge to edge. */
@@ -3738,6 +3892,18 @@ export type BbDropdownGroupEvents = {
3738
3892
  transition: stroke-dashoffset var(--bb-transition-medium)
3739
3893
  var(--bb-ease);
3740
3894
  }
3895
+
3896
+ /* An app's own check glyph (any set, stroked or filled) has no
3897
+ draw-in: it simply appears on the selected row. */
3898
+ &.item__check--own {
3899
+ visibility: hidden;
3900
+
3901
+ path {
3902
+ stroke-dasharray: none;
3903
+ stroke-dashoffset: 0;
3904
+ transition: none;
3905
+ }
3906
+ }
3741
3907
  }
3742
3908
 
3743
3909
  &.bb-dropdown__item--selected {
@@ -3747,6 +3913,10 @@ export type BbDropdownGroupEvents = {
3747
3913
  .item__check path {
3748
3914
  stroke-dashoffset: 0;
3749
3915
  }
3916
+
3917
+ .item__check--own {
3918
+ visibility: visible;
3919
+ }
3750
3920
  }
3751
3921
 
3752
3922
  &.bb-dropdown__item--variant-destructive {
@@ -3861,9 +4031,9 @@ export type BbDropdownGroupEvents = {
3861
4031
 
3862
4032
  /* Flat multi-group sheets: space a following section after the previous
3863
4033
  group's items/search. */
3864
- .bb-dropdown__group-items + .bb-dropdown__group-title,
3865
- .bb-dropdown__group-search + .bb-dropdown__group-title,
3866
- .bb-dropdown__divider + .bb-dropdown__group-title {
4034
+ .bb-dropdown__group-items + .bb-dropdown__group-label,
4035
+ .bb-dropdown__group-search + .bb-dropdown__group-label,
4036
+ .bb-dropdown__divider + .bb-dropdown__group-label {
3867
4037
  margin-top: 0.5rem;
3868
4038
  }
3869
4039
 
@@ -3873,7 +4043,8 @@ export type BbDropdownGroupEvents = {
3873
4043
  header, and repeating it under every group stacked like extra chrome.
3874
4044
  Nested drills with `hideLabel` skip this entirely; the drill nav title is
3875
4045
  already that label. */
3876
- .bb-dropdown__group-title {
4046
+ .bb-dropdown__group-label,
4047
+ .bb-dropdown__group-header {
3877
4048
  align-items: center;
3878
4049
  border-bottom: 0;
3879
4050
  color: var(--bb-text);
@@ -3888,7 +4059,8 @@ export type BbDropdownGroupEvents = {
3888
4059
  same way City sits above its field. */
3889
4060
  padding: 0.25rem 0 calc(var(--py, var(--bb-panel-p)) - 6px);
3890
4061
 
3891
- .group-title__content {
4062
+ .group-label__content,
4063
+ .group-header__content {
3892
4064
  flex: 1 1 auto;
3893
4065
  line-height: normal;
3894
4066
  overflow-x: clip;
@@ -3896,8 +4068,8 @@ export type BbDropdownGroupEvents = {
3896
4068
  text-align: center;
3897
4069
  }
3898
4070
 
3899
- .group-title__prepend-icon,
3900
- .group-title__append-icon {
4071
+ .group-label__prepend-icon,
4072
+ .group-label__append-icon {
3901
4073
  --size: 1.25rem;
3902
4074
  font-size: var(--size);
3903
4075
  }
@@ -3915,7 +4087,7 @@ export type BbDropdownGroupEvents = {
3915
4087
 
3916
4088
  &.bb-offcanvas--no-header
3917
4089
  .bb-dropdown__list
3918
- > .bb-dropdown__group-title:first-child {
4090
+ > .bb-dropdown__group-label:first-child {
3919
4091
  padding-top: 0;
3920
4092
  }
3921
4093
 
@@ -4216,4 +4388,29 @@ export type BbDropdownGroupEvents = {
4216
4388
  .bb-dropdown__panel--reserve-check .bb-dropdown__item:has(.item__check) {
4217
4389
  padding-inline-end: calc(6px + var(--check-w, var(--icon-size)) + 4px);
4218
4390
  }
4391
+
4392
+ /* A root-level group's failed load, drawn next to
4393
+ the menu by DropdownFailures.vue: the destructive alert's voice, as the
4394
+ in-menu row it replaces, then "Try again". Its own divider only when rows
4395
+ sit above it; otherwise the search field's is the one divider. */
4396
+ .bb-dropdown .bb-dropdown__failed {
4397
+ align-items: center;
4398
+ color: var(--bb-danger);
4399
+ column-gap: 8px;
4400
+ display: flex;
4401
+ line-height: 1.2;
4402
+ min-height: 28px;
4403
+ padding: 2px calc(6px + var(--menu-inset, 4px)) var(--menu-inset, 4px);
4404
+
4405
+ .bb-dropdown__placeholder-icon {
4406
+ --size: 1rem;
4407
+ flex: none;
4408
+ /* The seat measured level against the text (see the listbox footer). */
4409
+ margin-top: -1.5px;
4410
+ }
4411
+ }
4412
+
4413
+ .bb-dropdown .bb-dropdown__list:has(.bb-dropdown__item) ~ .bb-dropdown__failed {
4414
+ border-top: var(--bb-border-w) solid var(--bb-border);
4415
+ }
4219
4416
  ```