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
@@ -48,7 +48,8 @@ handling in markup — hand `BbDropdown` an `items` array.
48
48
 
49
49
  An `items` entry is one of three shapes, and you can mix them freely:
50
50
 
51
- - a **menu item** — an object with a `value` and a `label`;
51
+ - a **menu item** — an object with a `value` and a `label`; a string or
52
+ number row is its own text and value (`items: ['Google', 'Bing']`);
52
53
  - a **separator section** — a nested `[ … ]` array, rendered as its own
53
54
  divider-separated anonymous group;
54
55
  - a **group object** — `{ id, label?, items, selectable?, … }`, a titled and/or
@@ -91,6 +92,7 @@ check` flags both (`missing-value`, `duplicate-row-label`) when the items are
91
92
  `components.BbDropdown.variants` plugin option registers more typed names, each
92
93
  rendering a `bb-dropdown__item--variant-<name>` class hook you style yourself.
93
94
  - `disabled` — non-interactive row, skipped by keyboard navigation.
95
+ - `hidden` — leaves the row out entirely (also on a group). See below.
94
96
 
95
97
  Nothing else on an item reaches the row. An attribute for it (a `data-*` test
96
98
  hook, an `aria-*`) goes through `pt:item`, per row with the function form:
@@ -123,9 +125,10 @@ yes (the plugin's `<BbHost />` renders it; nothing to mount).
123
125
  <template #activator="{ props }">
124
126
  <BbButton
125
127
  v-bind="props"
126
- aria-label="File actions"
127
- icon="lucide:ellipsis"
128
+ icon-only
129
+ prepend:icon="lucide:ellipsis"
128
130
  size="xs"
131
+ text="File actions"
129
132
  variant="ghost"
130
133
  />
131
134
  </template>
@@ -177,8 +180,8 @@ const items: BbDropdownItem[] = [
177
180
  title: 'Delete "Q3-report.pdf"?',
178
181
  text: 'The file will be removed for everyone in the workspace.',
179
182
  variant: 'destructive',
180
- yes: { text: 'Delete file', 'prepend:icon': 'lucide:trash-2' },
181
- no: 'Keep file',
183
+ ok: { text: 'Delete file', 'prepend:icon': 'lucide:trash-2' },
184
+ cancel: 'Keep file',
182
185
  });
183
186
  if (ok) last.value = 'Deleted';
184
187
  },
@@ -204,6 +207,71 @@ const items: BbDropdownItem[] = [
204
207
  </script>
205
208
  ```
206
209
 
210
+ #### Rows a user may not see: `hidden`
211
+
212
+ Gate rows by permission or record state with one `hidden` expression per row,
213
+ instead of building the list with `push` or conditional spreads. A hidden row
214
+ is not rendered, not reachable by keyboard or search, and takes its submenu
215
+ with it. A group whose rows are all hidden disappears with its label and
216
+ divider, so a destructive last group never leaves a stray line. A value the
217
+ model holds for a hidden row stays in the model. A fetched row takes it
218
+ through `itemProps`.
219
+
220
+ ```ts
221
+ import type { BbDropdownItem } from 'bitboss-ui';
222
+
223
+ declare const can: (privilege: string) => boolean;
224
+ declare const isSigned: boolean;
225
+
226
+ const items: BbDropdownItem[] = [
227
+ { value: 'edit', label: 'Edit', hidden: !can('edit') || isSigned },
228
+ { value: 'share', label: 'Share', hidden: !can('share') },
229
+ {
230
+ group: true,
231
+ items: [
232
+ {
233
+ value: 'delete',
234
+ label: 'Delete',
235
+ variant: 'destructive',
236
+ hidden: !can('delete'),
237
+ },
238
+ ],
239
+ },
240
+ ];
241
+ ```
242
+
243
+ #### No visible row: the trigger goes
244
+
245
+ When no row is left (all hidden, or `items` is empty) the dropdown never
246
+ opens and its trigger goes, so no `v-if="items.length"` guard is needed: the
247
+ activator slot is not rendered, and an `activator` element or a
248
+ `v-bb-dropdown` host is hidden. A fetched group counts as rows until it
249
+ resolves. A `contextMenu` surface stays and gets the browser's menu back.
250
+ Where the trigger must stay (a reason to show, a column to keep aligned) add
251
+ `keep-activator`: the trigger stays inert and the slot's `empty` says why.
252
+
253
+ ```vue
254
+ <template>
255
+ <BbDropdown :items="items" keep-activator>
256
+ <template #activator="{ props, empty }">
257
+ <BbButton
258
+ v-bind="props"
259
+ v-bb-tooltip="empty ? 'Signed records are locked' : ''"
260
+ :aria-disabled="empty || undefined"
261
+ icon-only
262
+ prepend:icon="lucide:ellipsis"
263
+ variant="ghost"
264
+ >
265
+ Actions
266
+ </BbButton>
267
+ </template>
268
+ </BbDropdown>
269
+ </template>
270
+ ```
271
+
272
+ For a column placeholder, the same `keep-activator` with
273
+ `:class="{ invisible: empty }"` on the trigger keeps its width.
274
+
207
275
  ### Async actions and the loading flag
208
276
 
209
277
  Clicking a plain action closes the menu immediately and returns focus to the
@@ -1632,9 +1700,10 @@ behaves exactly as with a click menu.
1632
1700
  <template #activator="{ props }">
1633
1701
  <BbButton
1634
1702
  v-bind="props"
1635
- aria-label="Invoice actions"
1636
- icon="lucide:ellipsis"
1703
+ icon-only
1704
+ prepend:icon="lucide:ellipsis"
1637
1705
  size="xs"
1706
+ text="Invoice actions"
1638
1707
  variant="ghost"
1639
1708
  />
1640
1709
  </template>
@@ -2198,8 +2267,8 @@ own sizes.
2198
2267
  action dominates.
2199
2268
  - [useConfirm](./composables/useConfirm.md) — a `variant: 'destructive'`
2200
2269
  item's `onClick` should `await confirm(...)` before acting.
2201
- - `BbTable` — a per-row overflow "…" menu (icon-only `BbButton` activator) or
2202
- a `trigger="contextMenu"` menu on the row itself.
2270
+ - `BbTable` — a per-row overflow "…" menu (icon-only `BbButton` activator);
2271
+ a right-click menu on the rows is the table's own `row-menu`.
2203
2272
  - `BbAvatar` in the activator for account menus; `BbBadge` in per-item slots
2204
2273
  for counts (see the slots example).
2205
2274
  - [useToast](./composables/useToast.md) — fire a toast from an item's
@@ -2343,14 +2412,15 @@ it, and at the top level closes the sheet.
2343
2412
  | `enforceCoherence` | `boolean \| undefined` | `false` | | Default for pipeline groups: drop selections that are no longer present in a group's current items (e.g. after a `dependencies` re-fetch) from the selection and `v-model`. A group's own `enforceCoherence` overrides this. |
2344
2413
  | `failedText` | `string \| undefined` | | | Default placeholder text shown when a pipeline group's latest load FAILED (its `items` getter threw). A group's own `failedText` overrides this; both fall back to the localized `common.failedText` (`"Couldn't load items"`). |
2345
2414
  | `id` | `string \| undefined` | | | Names this dropdown: the activator's id (unless it already has one), the menu's `menu_<id>`, and the key `useBbDropdown(id)` and a companion `BbDropdownGroup` pair by. Generated when omitted. |
2346
- | `items` | `BbDropdownItem[]` | `[]` | yes | The menu rows, each a `BbBaseButton` (`button`, `a` or `router-link`): a flat array for one group, nested arrays for divider-separated groups, or `InternalGroup` objects for titled / selectable sections. A row's own `items` opens a submenu. |
2415
+ | `items` | `(BbDropdownItem \| PrimitiveRow)[]` | `[]` | yes | The menu rows, each a `BbBaseButton` (`button`, `a` or `router-link`): a flat array for one group, nested arrays for divider-separated groups, or `InternalGroup` objects for titled / selectable sections. A row's own `items` opens a submenu. |
2416
+ | `keepActivator` | `boolean \| undefined` | `false` | | Keeps the trigger when no row is visible (by default it is hidden): inert, no popup ARIA, `empty` in the activator slot. A `contextMenu` trigger always stays. |
2347
2417
  | `loadingText` | `string \| undefined` | | | Default placeholder text shown while a pipeline group's async items load. A group's own `loadingText` overrides this; both fall back to the localized `common.loadingText` (`'Loading...'`). |
2348
2418
  | `offCanvasProps` | `Partial<BbOffCanvasProps> \| undefined` | | | Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on mobile), spread over its defaults. A `pt` inside it styles only the sheet (passthrough guide § Inside the sheet). The sheet hides its ✕; `{ hideClose: false }` brings it back. |
2349
2419
  | `offset` | `number \| undefined` | `4` | | Space the floating container will maintain from the activator. |
2350
2420
  | `padding` | `number \| undefined` | `10` | | Minimum empty space to keep from the edge of the page |
2351
- | `placement` | `'start'` \| `'end'` \| `'top'` \| `'bottom'` \| `'left'` \| `'right'` \| `'top-start'` \| `'top-end'` \| `'right-start'` \| `'right-end'` \| `'bottom-start'` \| `'bottom-end'` \| `'left-start'` \| `'left-end'` \| `'start-start'` \| `'start-end'` \| `'end-start'` \| `'end-end'` \| `'cursor'` | `"bottom"` | | Position of the dropdown relative to the activator. Use `'cursor'` to anchor at the mouse/touch coordinates. (No arrow is drawn either way — arrows are tooltip-only in v3.) |
2421
+ | `placement` | `'start'` \| `'end'` \| `'top'` \| `'bottom'` \| `'left'` \| `'right'` \| `'top-start'` \| `'top-end'` \| `'right-start'` \| `'right-end'` \| `'bottom-start'` \| `'bottom-end'` \| `'left-start'` \| `'left-end'` \| `'start-start'` \| `'start-end'` \| `'end-start'` \| `'end-end'` \| `'cursor'` | `"bottom"` | | Position relative to the activator; `'cursor'` anchors at the mouse/touch point. No arrow (tooltips only). |
2352
2422
  | `queryDebounceTime` | `number \| undefined` | `300` | | Debounce (ms) applied to the async re-fetch a `searchable` group fires as the user types. Applies to every searchable group in the menu. |
2353
- | `transitionDuration` | `number \| undefined` | `150` | | The open / close transition in milliseconds. Menus take the fast one (150), not the popovers' medium 250: a menu is opened to pick one command and gone again, so it answers faster than a panel you read or edit in. |
2423
+ | `transitionDuration` | `number \| undefined` | `150` | | The open / close transition in milliseconds. Menus take the fast one (150), not the popovers' medium 250: a menu is picked from and gone, so it answers faster than a panel you read or edit in. |
2354
2424
  | `trigger` | `DropdownTrigger \| DropdownTrigger[] \| undefined` | `"click"` | | Interaction(s) that open the dropdown. Accepts a single trigger or an array to combine them. - `'click'` — left-click / tap (default) - `'contextMenu'` — right-click on desktop, long-press on mobile |
2355
2425
  | `width` | `string \| number \| undefined` | `"auto"` | | Width of the dropdown in pixels, percentage, or 'auto' to fit content. |
2356
2426
 
@@ -2390,18 +2460,18 @@ States are listed in precedence order: when two are on at once and their entries
2390
2460
 
2391
2461
  - `hidden` — `(): void` — Emitted once the menu has finished closing.
2392
2462
  - `hide` — `(): void` — Emitted as soon as the menu starts to close.
2393
- - `item:selected` — `(value: any): void` — The user selected a row in a selectable group, at the click — also when a controlled companion's app then refuses the value. The payload is the row's value (its `item-value` for pipeline groups, else its `value`) — symmetric with `BbTable`'s `item:selected`.
2463
+ - `item:selected` — `(value: any): void` — The user selected a row in a selectable group, at the click — also when a controlled companion's app then refuses the value. The payload is the row's value (its `item-value` for pipeline groups, else its `value`).
2394
2464
  - `item:unselected` — `(value: any): void` — The user unselected a row (a multiple toggle, a `clearable` re-click, a chip ×, or the old value a single pick replaces). Payload is the item's resolved value, matching `item:selected`.
2395
2465
  - `show` — `(): void` — Emitted as soon as the menu (the popover, or the sheet on a phone) starts to open.
2396
2466
  - `shown` — `(): void` — Emitted once the menu is open and its open transition has finished.
2397
2467
 
2398
2468
  ## Slots
2399
2469
 
2400
- - `activator` — scope: `BbDropdownActivatorSlotProps` `{ disabled?: boolean; loading: boolean; open: boolean; placement: Placement \| "cursor"; props: BbDropdownActivatorProps }` — The element that triggers the dropdown to open. Spread `props` onto your trigger element.
2470
+ - `activator` — scope: `BbDropdownActivatorSlotProps` `{ disabled?: boolean; empty: boolean; loading: boolean; open: boolean; placement: Placement \| "cursor"; props: BbDropdownActivatorProps }` — The element that triggers the dropdown to open. Spread `props` onto your trigger element.
2401
2471
  - `default` — scope: `any` — Hosts `<BbDropdownGroup>` companions. They register their group with the dropdown and render nothing themselves.
2402
2472
  - `empty` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string; error?: unknown }` — Replaces the default "no data" placeholder row shown in a pipeline group that resolved to no items. Rendered once per empty group.
2403
- - `footer` — scope: `BbDropdownEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Content pinned to the bottom of the dropdown panel, outside the scroll area. Stays visible while the items scroll and is separated from them by a divider — for action buttons.
2404
- - `header` — scope: `BbDropdownEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Content pinned to the top of the dropdown panel, outside the scroll area. Stays visible while the items scroll and is separated from them by a divider — for a title or a filter field.
2473
+ - `footer` — scope: `BbDropdownEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Pinned below the rows, outside their scroll, with a divider — for action buttons.
2474
+ - `header` — scope: `BbDropdownEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Pinned above the rows, outside their scroll, with a divider — for a title or a filter field.
2405
2475
  - `item:append` — scope: `BbDropdownItemSlotProps` `{ description?: string; disabled?: boolean; group: BbDropdownSlotGroup; groupTitle: boolean; level: number; index: number; item: InternalItem; loading: boolean; open: boolean; placement: Placement \| "cursor"; selected: boolean; label: string; activeLink?: boolean; exactActiveLink?: boolean }` — The trailing region of every row (and group title line), replacing its `append:icon`. A named slot wins over it; the submenu chevron and the check on a selected row take its place.
2406
2476
  - `item:prepend` — scope: `BbDropdownItemSlotProps` `{ description?: string; disabled?: boolean; group: BbDropdownSlotGroup; groupTitle: boolean; level: number; index: number; item: InternalItem; loading: boolean; open: boolean; placement: Placement \| "cursor"; selected: boolean; label: string; activeLink?: boolean; exactActiveLink?: boolean }` — The leading region of every row (and group title line), replacing its `prepend:icon`. A row's own or its group's named slot wins over it.
2407
2477
  - `loading` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string; error?: unknown }` — Replaces the default loading placeholder row shown in a pipeline group while its async items load. Rendered once per loading group.
@@ -2439,7 +2509,7 @@ Set these on the element, or on a class you put on it, to retune this component
2439
2509
  - `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbDropdownList`
2440
2510
  - `BbOffCanvas` _(public — [contract](./BbOffCanvas.md))_ — its own pt parts (`BbOffCanvas`): `header` → `div.bb-offcanvas__header`, `title` → `span.bb-offcanvas__title`, `description` → `p.bb-offcanvas__description`, `close` → `CloseButton`, `content` → `div.bb-offcanvas__content`, `footer` → `div.bb-offcanvas__footer`; documented CSS variables: `--stack-x`, `--snap-y`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
2441
2511
  - `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`; also mounts `BbIcon`
2442
- - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__icon`, `icon` → `BbIcon`, `icon` → `span.bb-button__prepend-icon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--ipx`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbIcon`, `BbSpinner`
2512
+ - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__prepend-icon`, `icon` → `BbIcon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--ipx`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbSpinner`, `BbIcon`
2443
2513
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
2444
2514
  - Also mounts `CommonPopover`, `DropdownPipelineResolver`
2445
2515
 
@@ -55,8 +55,9 @@ right: every entry is a row, with `BbDropdown`'s item model, so submenus,
55
55
  links, descriptions and groups all work there.
56
56
 
57
57
  A computed `items` list that comes down to nothing can stay on this
58
- component: with no items and no `#dropdown` slot there is no menu, so the chevron
59
- goes and the control renders exactly like a `BbButton`.
58
+ component: with no items (or only `hidden` ones) and no `#dropdown` slot there
59
+ is no menu, so the chevron goes and the control renders exactly like a
60
+ `BbButton`.
60
61
 
61
62
  **Save / Save as draft**
62
63
 
@@ -335,8 +336,8 @@ const items: BbDropdownItem[] = [
335
336
  title: 'Delete this deployment?',
336
337
  text: 'The deployment and its build logs are removed permanently. This cannot be undone.',
337
338
  variant: 'destructive',
338
- yes: { text: 'Delete deployment', 'prepend:icon': 'lucide:trash-2' },
339
- no: 'Keep it',
339
+ ok: { text: 'Delete deployment', 'prepend:icon': 'lucide:trash-2' },
340
+ cancel: 'Keep it',
340
341
  });
341
342
  if (ok) status.value = 'Deployment deleted';
342
343
  },
@@ -370,8 +371,8 @@ activator slot: the toggle button is part of the component's contract.
370
371
 
371
372
  ### Icons on the main button
372
373
 
373
- `icon`, `prepend:icon` and `append:icon` belong to the main button, as on
374
- `BbButton`, and so do the slots of the same names: `#prepend:icon="{ loading,
374
+ `prepend:icon`, `append:icon` and `icon-only` belong to the main button, as
375
+ on `BbButton`, and so do the slots of the same names: `#prepend:icon="{ loading,
375
376
  activeLink }"` swaps its glyph with its states, inside its `icon` part. The
376
377
  toggle keeps its chevron (`toggle:icon` above).
377
378
 
@@ -661,11 +662,11 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
661
662
  | `form` | `string \| undefined` | | | The id of the `BbForm` the main button submits from outside it (the native `form` attribute), with `type="submit"`. |
662
663
  | `headers` | `object \| undefined` | | | Additional HTTP headers forwarded to Inertia when navigating via `href` in an Inertia-enabled app. |
663
664
  | `href` | `string \| { url: string; method: "get" \| "post" \| "put" \| "patch" \| "delete"; } \| undefined` | | | The link target: renders an anchor (an Inertia `<Link>` under Inertia). Also takes Inertia's `{ url, method }`, a Wayfinder route: Inertia visits with its method; elsewhere the link is its `url`. |
664
- | `icon` | `string \| undefined` | | | Used when only an icon with no text should be displayed. |
665
+ | `iconOnly` | `Responsive<boolean> \| undefined` | | | Shows only the button's icon (`prepend:icon` when it has both); the label is hidden but stays its accessible name, so always write it. `true`, or per breakpoint: `{ default: true, md: false }`. |
665
666
  | `id` | `string \| undefined` | | | Names this dropdown: the activator's id (unless it already has one), the menu's `menu_<id>`, and the key `useBbDropdown(id)` and a companion `BbDropdownGroup` pair by. Generated when omitted. |
666
667
  | `instant` | `boolean \| undefined` | `false` | | Inertia: navigate optimistically on click and reconcile when the response lands, instead of waiting for the round trip. |
667
668
  | `interactiveWhileLoading` | `boolean \| undefined` | `false` | | Keeps the button clickable while it is loading. Buttons are disabled while loading by default; this escape hatch exists for toggles that must stay interactive (e.g. the dropdown-button caret). |
668
- | `items` | `BbDropdownItem[] \| undefined` | | | The menu: every entry is a row (BbDropdown's item model, groups and submenus included). The main action is the component itself (its default slot, `@click`, `href` / `to`, `type`), never an item. Unset or empty with no `#dropdown` slot: no toggle, a plain button. |
669
+ | `items` | `(BbDropdownItem \| PrimitiveRow)[] \| undefined` | | | The menu: every entry is a row (BbDropdown's item model, groups and submenus included). The main action is the component itself (its default slot, `@click`, `href` / `to`, `type`), never an item. Unset or empty with no `#dropdown` slot: no toggle, a plain button. |
669
670
  | `loading` | `boolean \| undefined` | `false` | | Triggers a loading indicator. A loading button is soft-disabled on its own (`aria-disabled`, out of the tab order, clicks and navigation blocked) and keeps its variant colours; with `disabled` set too, loading still wins the look. |
670
671
  | `method` | `"get" \| "post" \| "put" \| "patch" \| "delete" \| undefined` | | | HTTP method used for Inertia navigation when `href` is provided in an Inertia-enabled app. Ignored otherwise. |
671
672
  | `offCanvasProps` | `Partial<BbOffCanvasProps> \| undefined` | | | Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on mobile), spread over its defaults. A `pt` inside it styles only the sheet (passthrough guide § Inside the sheet). The sheet hides its ✕; `{ hideClose: false }` brings it back. |
@@ -683,7 +684,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
683
684
  | `onSuccess` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia when a request succeeds. |
684
685
  | `padding` | `number \| undefined` | `10` | | Minimum empty space to keep from the edge of the page |
685
686
  | `pageProps` | `Record<string, unknown> \| ((currentProps: Record<string, unknown>, sharedProps: Record<string, unknown>) => Record<string, unknown>) \| null \| undefined` | | | Inertia: props to merge into the next page optimistically, before the server responds. Either an object or a function of the current props. Typed platform-agnostically (matching BbButton) so the library's types never require `@inertiajs/vue3` to be installed. |
686
- | `placement` | `'start'` \| `'end'` \| `'top'` \| `'bottom'` \| `'left'` \| `'right'` \| `'top-start'` \| `'top-end'` \| `'right-start'` \| `'right-end'` \| `'bottom-start'` \| `'bottom-end'` \| `'left-start'` \| `'left-end'` \| `'start-start'` \| `'start-end'` \| `'end-start'` \| `'end-end'` \| `'cursor'` | `'bottom'` | | Position of the dropdown relative to the activator. Use `'cursor'` to anchor at the mouse/touch coordinates. (No arrow is drawn either way — arrows are tooltip-only in v3.) |
687
+ | `placement` | `'start'` \| `'end'` \| `'top'` \| `'bottom'` \| `'left'` \| `'right'` \| `'top-start'` \| `'top-end'` \| `'right-start'` \| `'right-end'` \| `'bottom-start'` \| `'bottom-end'` \| `'left-start'` \| `'left-end'` \| `'start-start'` \| `'start-end'` \| `'end-start'` \| `'end-end'` \| `'cursor'` | `'bottom'` | | Position relative to the activator; `'cursor'` anchors at the mouse/touch point. No arrow (tooltips only). |
687
688
  | `prefetch` | `string \| boolean \| string[] \| undefined` | | | Inertia: fetch and cache this link's page ahead of the click. `true` uses the default trigger; a string or list of strings picks them (`'mount'`, `'hover'`, `'click'`). |
688
689
  | `prepend:icon` | `string \| undefined` | | | Icon to be added on the left of the text. |
689
690
  | `preserveScroll` | `boolean \| ((props: Record<string, unknown>) => boolean) \| undefined` | `false` | | Controls whether Inertia should preserve the current scroll position after navigation. Can be a boolean or a predicate receiving the visit props. |
@@ -697,7 +698,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
697
698
  | `text` | `string \| undefined` | | | Text content of the component. |
698
699
  | `to` | `string \| et \| X \| undefined` | | | Route Location the link should navigate to when clicked on. |
699
700
  | `toggle:icon` | `string \| undefined` | | | Replaces the chevron shown inside the dropdown toggle button. A constrained alternative to a slot: only the toggle's icon changes, so the button keeps its semantics. Named after the part it sits in (the `toggle`), the way `prepend:icon` / `append:icon` name theirs. |
700
- | `transitionDuration` | `number \| undefined` | `150` | | The open / close transition in milliseconds. Menus take the fast one (150), not the popovers' medium 250: a menu is opened to pick one command and gone again, so it answers faster than a panel you read or edit in. |
701
+ | `transitionDuration` | `number \| undefined` | `150` | | The open / close transition in milliseconds. Menus take the fast one (150), not the popovers' medium 250: a menu is picked from and gone, so it answers faster than a panel you read or edit in. |
701
702
  | `type` | `"button" \| "reset" \| "submit" \| undefined` | | | Gets the classification and default behavior of the button. |
702
703
  | `variant` | `'outline'` \| `'primary'` \| `'destructive'` \| `'secondary'` \| `'none'` \| `'ghost'` \| `'link'` | ``components.BbButton.variant`, else `'primary'`` | | Visual variant shared by both buttons of the split control. `'none'` takes no look (you own hover, focus and disabled); register a real one with the plugin's `components.BbButton.variants` and style `.bb-button--<name>`. Unset: `BbButton`'s `components` entry (the app's or a config scope's). |
703
704
  | `viewTransition` | `boolean \| undefined` | `false` | | Inertia: run the page swap inside a View Transition, where the browser supports one. |
@@ -762,18 +763,17 @@ States are listed in precedence order: when two are on at once and their entries
762
763
  - `empty` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string; error?: unknown }` — Replaces the default "no data" placeholder row shown in a pipeline group that resolved to no items. Rendered once per empty group. Forwarded to the underlying `BbDropdown`.
763
764
  - `footer` — scope: `BbDropdownButtonEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Content pinned to the bottom of the dropdown panel, outside the scroll area.
764
765
  - `header` — scope: `BbDropdownButtonEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Content pinned to the top of the dropdown panel, outside the scroll area.
765
- - `icon` — scope: `BbButtonIconSlotProps` `{ activeLink: boolean; exactActiveLink: boolean; pressed: boolean; loading: boolean; disabled: boolean }` — The main button's icon, replacing the `icon` prop; inside its `icon` part (`pt:icon`, `--icon-size`, the loading spinner), with its states.
766
766
  - `item:append` — scope: `BbDropdownButtonItemSlotProps` `{ disabled?: boolean; index: number; item: InternalItem; open: boolean; placement: Placement \| "cursor"; label: string }` — The trailing region of every menu row, replacing its `append:icon`; the submenu chevron and the check on a selected row take its place (BbDropdown's rules).
767
767
  - `item:prepend` — scope: `BbDropdownButtonItemSlotProps` `{ disabled?: boolean; index: number; item: InternalItem; open: boolean; placement: Placement \| "cursor"; label: string }` — The leading region of every menu row, replacing its `prepend:icon` (BbDropdown's rules).
768
768
  - `loading` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string; error?: unknown }` — Replaces the default loading placeholder row shown in a pipeline group while its async items load. Rendered once per loading group. Forwarded to the underlying `BbDropdown`.
769
- - `prepend:icon` — scope: `BbButtonIconSlotProps` `{ activeLink: boolean; exactActiveLink: boolean; pressed: boolean; loading: boolean; disabled: boolean }` — The main button's leading icon, replacing `prepend:icon`.
770
- - `#<value>` (named from data) — scope: `BbDropdownItemSlotProps` — One row's content (label and description), by its value; in a fetched group, by its resolved `itemValue`. Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `default`, `dropdown`, `empty`, `footer`, `header`, `icon`, `item`, `loading`.
769
+ - `prepend:icon` — scope: `BbButtonIconSlotProps` `{ activeLink: boolean; exactActiveLink: boolean; pressed: boolean; loading: boolean; disabled: boolean }` — The main button's leading icon, replacing `prepend:icon` (the one `icon-only` shows); inside its `icon` part, with its states.
770
+ - `#<value>` (named from data) — scope: `BbDropdownItemSlotProps` — One row's content (label and description), by its value; in a fetched group, by its resolved `itemValue`. Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `default`, `dropdown`, `empty`, `footer`, `header`, `item`, `loading`.
771
771
  - `#<value>:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — One row's leading region; replaces its `prepend:icon`.
772
772
  - `#<value>:append` (named from data) — scope: `BbDropdownItemSlotProps` — One row's trailing region; replaces its `append:icon` and its submenu chevron. The check takes its place on the selected row.
773
773
  - `#<groupId>:item` (named from data) — scope: `BbDropdownItemSlotProps` — The content of every row of that group, and no other; a row's own `#<value>` still wins.
774
774
  - `#<groupId>:item:prepend` (named from data) — scope: `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`.
775
775
  - `#<groupId>:item:append` (named from data) — scope: `BbDropdownItemSlotProps` — The trailing region of every row of that group; replaces their `append:icon`. The check takes its place on the selected row.
776
- - `#<groupId>` (named from data) — scope: `BbDropdownItemSlotProps` — That group's title line (the group is passed as `item`, `groupTitle` is `true`). Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `default`, `dropdown`, `empty`, `footer`, `header`, `icon`, `item`, `loading`.
776
+ - `#<groupId>` (named from data) — scope: `BbDropdownItemSlotProps` — That group's title line (the group is passed as `item`, `groupTitle` is `true`). Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `default`, `dropdown`, `empty`, `footer`, `header`, `item`, `loading`.
777
777
  - `#<groupId>:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — The leading region of that group's title line.
778
778
  - `#<groupId>:append` (named from data) — scope: `BbDropdownItemSlotProps` — The trailing region of that group's title line.
779
779
 
@@ -787,7 +787,7 @@ States are listed in precedence order: when two are on at once and their entries
787
787
  - Listed nodes are the ones `BbDropdownButton`'s API reaches or that declare a documented CSS variable; the rest fold into "also mounts". The complete tree, undocumented locals included, is `manifest/components/BbDropdownButton.tree.json` (a public component in it is a name: its own tree file has the rest).
788
788
 
789
789
  - `BbDropdownButton` _(this component)_ — hands `BbButton` the pt map `{ main: 'root', icon: 'icon', spinner: 'spinner', text: 'text' }` (ours → theirs); hands `BbDropdown` the pt map `{ item: 'item', itemText: 'itemText', itemIcon: 'itemIcon', itemDescription: 'itemDescription', check: 'check' }` (ours → theirs); hands `BbButton` the pt map `{ toggle: 'root' }` (ours → theirs)
790
- - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__icon`, `icon` → `BbIcon`, `icon` → `span.bb-button__prepend-icon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--ipx`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbIcon`, `BbSpinner`
790
+ - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__prepend-icon`, `icon` → `BbIcon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--ipx`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbSpinner`, `BbIcon`
791
791
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
792
792
  - `BbDropdown` _(public — [contract](./BbDropdown.md))_ — its own pt parts (`BbDropdown`): `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-dropdown__header`, `list` → `span.bb-dropdown__list`, `footer` → `div.bb-dropdown__footer`; documented CSS variables: `--menu-inset`; also mounts `CommonPopover`, `DropdownPipelineResolver`
793
793
  - `BbDropdownList` _(internal — not importable, reach it through `BbDropdown`)_ — also mounts `BbIcon`, `ErrorIcon`, `CommonPopover`, `BbDropdownList`
@@ -158,9 +158,10 @@ from the model (revoke the stale one when it changes) handed to
158
158
  </div>
159
159
  <BbButton
160
160
  v-if="photo"
161
- aria-label="Remove photo"
162
- icon="lucide:trash-2"
161
+ icon-only
162
+ prepend:icon="lucide:trash-2"
163
163
  size="sm"
164
+ text="Remove photo"
164
165
  variant="ghost"
165
166
  @click="photo = null"
166
167
  />
@@ -362,9 +363,10 @@ there is no separate "selected files" API. Removal is a plain
362
363
  formatSize(file.size)
363
364
  }}</span>
364
365
  <BbButton
365
- :aria-label="`Remove ${file.name}`"
366
- icon="lucide:x"
366
+ icon-only
367
+ prepend:icon="lucide:x"
367
368
  size="sm"
369
+ :text="`Remove ${file.name}`"
368
370
  variant="ghost"
369
371
  @click="remove(file)"
370
372
  />
@@ -879,9 +881,10 @@ programmatic change still goes through.
879
881
  <!-- The list is yours: readonly hides the remove buttons here. -->
880
882
  <BbButton
881
883
  v-if="!locked"
882
- :aria-label="`Remove ${file.name}`"
883
- icon="lucide:x"
884
+ icon-only
885
+ prepend:icon="lucide:x"
884
886
  size="sm"
887
+ :text="`Remove ${file.name}`"
885
888
  variant="ghost"
886
889
  @click="remove(file)"
887
890
  />
@@ -1257,9 +1260,10 @@ form library can mark the field touched and run blur-time validation.
1257
1260
  file.name
1258
1261
  }}</span>
1259
1262
  <BbButton
1260
- :aria-label="`Remove ${file.name}`"
1261
- icon="lucide:x"
1263
+ icon-only
1264
+ prepend:icon="lucide:x"
1262
1265
  size="sm"
1266
+ :text="`Remove ${file.name}`"
1263
1267
  variant="ghost"
1264
1268
  @click="remove(file)"
1265
1269
  />
package/dist/ai/BbForm.md CHANGED
@@ -250,10 +250,11 @@ The same form in Valibot, with array rows:
250
250
  :name="`lines[${index}][qty]`"
251
251
  />
252
252
  <BbButton
253
- :aria-label="`Remove line ${index + 1}`"
254
253
  class="mt-6"
255
254
  :disabled="draft.lines.length === 1"
256
- icon="lucide:x"
255
+ icon-only
256
+ prepend:icon="lucide:x"
257
+ :text="`Remove line ${index + 1}`"
257
258
  variant="ghost"
258
259
  @click="draft.lines.splice(index, 1)"
259
260
  />
@@ -1228,16 +1229,97 @@ element, so tell them apart by an attribute you put on it:
1228
1229
  for anything more than one word.
1229
1230
 
1230
1231
  A synchronous handler never locks. A handler that throws or rejects still ends
1231
- the save (nothing spins forever), and the error goes to
1232
- `app.config.errorHandler`, where Vue sends any other event-handler failure.
1233
- `isSubmitting` (slot) and `submitting` (`useBbForm`) follow the same
1234
- save, for anything else you show meanwhile.
1232
+ the save (nothing spins forever); what the rejection means is the next
1233
+ section's. `isSubmitting` (slot) and `submitting` (`useBbForm`) follow the
1234
+ same save, for anything else you show meanwhile.
1235
1235
 
1236
1236
  To keep the fields editable during the save, set `disable-submit-lock` on the
1237
1237
  form. It also leaves the dialog around the form closable. The submit button
1238
1238
  still spins while the save is pending: the prop only lifts the locks. A submit
1239
1239
  button with `disable-auto-loading` never spins on its own; give it `loading`.
1240
1240
 
1241
+ ### What the save's answer means
1242
+
1243
+ `@submit` does the save; the form reads its answer. Return the request's
1244
+ promise and let a failure reject: no `try`/`catch`, no `setErrors`.
1245
+
1246
+ ```vue
1247
+ <script setup lang="ts">
1248
+ import { reactive } from 'vue';
1249
+ import { BbButton, BbForm, BbTextInput } from 'bitboss-ui';
1250
+
1251
+ const model = reactive({ name: '', email: '' });
1252
+ // Laravel + axios; FastAPI + $fetch is the same line.
1253
+ const save = () => api.post('/api/users', model);
1254
+ </script>
1255
+
1256
+ <template>
1257
+ <BbForm :model="model" @submit="save">
1258
+ <BbTextInput label="Name" name="name" />
1259
+ <BbTextInput label="Email" name="email" type="email" />
1260
+ <BbButton type="submit">Create</BbButton>
1261
+ </BbForm>
1262
+ </template>
1263
+ ```
1264
+
1265
+ - **Resolves** (anything but `false`): saved. `submit()` resolves `true`; in
1266
+ a dialog, the dialog completes.
1267
+ - **Resolves (or returns) `false`**: not saved, already shown (a cancelled
1268
+ Inertia visit). Nothing fires, nothing is reported.
1269
+ - **Rejects with a validation answer**: the DATA is wrong. The messages land
1270
+ on the fields like `setErrors`, `@invalid` fires once (`source: 'server'`),
1271
+ focus moves, nothing is reported.
1272
+ - **Rejects with anything else, or throws**: the SAVE failed.
1273
+ `@submit-error(error)` gets it when bound (handled), else
1274
+ `app.config.errorHandler`, once.
1275
+
1276
+ **A validation answer** is one of these, and nothing else:
1277
+
1278
+ - a **`BbValidationError`** (`import { BbValidationError } from 'bitboss-ui'`),
1279
+ `throw new BbValidationError({ email: ['Taken.'] })`. The Inertia helpers'
1280
+ `usePromiseForm` / `usePromiseRouter` reject with one on a 422.
1281
+ - by default, a **422** from **axios** (`error.response`) or **ofetch /
1282
+ `$fetch`** (`error.status`, `error.data`) whose body is Laravel's
1283
+ `{ errors: { field: ['…'] } }`, FastAPI's `{ detail: [{ loc, msg }] }`
1284
+ (`loc`'s `body` / `query` / `path` / `header` / `cookie` dropped), or API
1285
+ Platform's `{ violations: [{ propertyPath, message }] }`, every entry of
1286
+ that shape. A 400, a bare object, an unknown envelope, a `fetch` `Response`
1287
+ are real errors.
1288
+
1289
+ A key no field has goes to `unmatchedErrors`, as with `setErrors`. With
1290
+ `field-errors` bound to the same answer (Inertia's `form.errors`), the
1291
+ rejection and the object are one answer: one `@invalid`, each message once.
1292
+
1293
+ **`@submit-error`** is for the real failures only (a 500, offline, a bug).
1294
+ Bound, the failure is yours: nothing reaches the global handler, so a toast
1295
+ there and one here never both show. Rethrow inside it to report it anyway
1296
+ (once).
1297
+
1298
+ ```vue
1299
+ <BbForm :model="model" @submit="save" @submit-error="toastSaveFailed">
1300
+ ```
1301
+
1302
+ **Another backend's shape** is one line of plugin config,
1303
+ `BbForm.isValidationError`: a function that gets the rejection and returns
1304
+ its messages by field (`true`: a validation failure with nothing to show;
1305
+ anything else: a real error). It replaces the default list. `false` turns
1306
+ the default off, so only a `BbValidationError` counts.
1307
+
1308
+ ```ts
1309
+ // Django REST Framework answers 400 with the bag as the body.
1310
+ app.use(bitbossUiPlugin, {
1311
+ components: {
1312
+ BbForm: {
1313
+ isValidationError: (error: any) =>
1314
+ error?.response?.status === 400 ? error.response.data : false,
1315
+ },
1316
+ },
1317
+ });
1318
+ ```
1319
+
1320
+ A save with no throwing client (plain `fetch`) answers the same way: read the
1321
+ 422 and `throw new BbValidationError(body.errors)`.
1322
+
1241
1323
  ### Saving in place: `snapshot()`
1242
1324
 
1243
1325
  `dirty` compares against the values the form started with. A page that saves
@@ -1505,7 +1587,10 @@ Every provider's shape and its one-line bridge (Inertia visits, error bags
1505
1587
  and `useForm`, a Laravel 422, Precognition, vee-validate, Nuxt UI):
1506
1588
  [Error providers](./guides/validation-providers.md).
1507
1589
 
1508
- `setErrors` takes Laravel's `{ key: string[] }` and Inertia's
1590
+ An axios or `$fetch` 422 needs nothing: let `@submit` reject (see
1591
+ [What the save's answer means](#what-the-saves-answer-means)). `setErrors` is
1592
+ for a message from anywhere else (a plain `fetch`, a websocket, a check of
1593
+ your own after the save). It takes Laravel's `{ key: string[] }` and Inertia's
1509
1594
  `{ key: string }` (a string is read as one message). Keys are field paths,
1510
1595
  dots or brackets (`address.city`, `address[city]`), matched against `fields`.
1511
1596
  It returns nothing: read the state afterwards.
@@ -1898,6 +1983,7 @@ marker stays consistent with the rules.
1898
1983
 
1899
1984
  - `invalid` — `(payload: BbFormInvalidPayload): void` — Fired when a submit fails validation (`source: 'submit'`) or server errors land (`'server'`: `setErrors()`, a new `field-errors` message), before the form's own focus; a handler that moves focus keeps it. `unmatched`: the paths no field claims.
1900
1985
  - `submit` — `(values: BbFormSubmitValues<S>, meta: BbFormSubmitMeta): void` — Fired only when every field passes. Carries the values — with a schema, its parsed OUTPUT (transforms and coercions applied), typed from it.
1986
+ - `submit-error` — `(error: unknown): void` — The save failed for a reason other than the data (a 500, offline, a bug): a `@submit` listener rejected or threw, and the rejection is not a validation answer. Bound, it is handled (nothing reported; rethrow to report it once); unbound, it goes to `app.config.errorHandler`.
1901
1987
 
1902
1988
  ## Slots
1903
1989
 
package/dist/ai/BbHost.md CHANGED
@@ -140,12 +140,12 @@ without a mismatch.
140
140
  - `BbToast` _(internal — not importable, reach it through `BbToast`)_ — documented CSS variables: `--gap`, `--pile-gap`, `--offset`, `--width`, `--lift`, `--stack-y`, `--stack-scale`, `--enter-y`, `--swipe-amount`, `--z`, `--r`, `--ring-size`, `--bg`, `--border-color`, `--bw`, `--fg`, `--icon-color`, `--gap`
141
141
  - `BbToastRegion` _(internal — not importable, reach it through `BbToast`)_ — its own pt parts (`BbToast`): `root` → `ol.bb-toast`
142
142
  - `BbToastMessage` _(internal — not importable, reach it through `BbToast`)_ — also mounts `BbIcon`, `BbSpinner`
143
- - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__icon`, `icon` → `BbIcon`, `icon` → `span.bb-button__prepend-icon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--ipx`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbIcon`, `BbSpinner`
143
+ - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__prepend-icon`, `icon` → `BbIcon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--ipx`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbSpinner`, `BbIcon`
144
144
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
145
145
 
146
146
  ## See Also
147
147
 
148
148
  - [useConfirm](./composables/useConfirm.md)
149
149
  - [useToast](./composables/useToast.md)
150
- - [BbConfirmPortal](./BbConfirmPortal.md) — Registers named slot content that confirm() renders via `portal`; slot `{ data, yes, no }`.
150
+ - [BbConfirmPortal](./BbConfirmPortal.md) — Registers named slot content that confirm() renders via `portal`; slot `{ data, ok, cancel }`.
151
151
  - [BbToastPortal](./BbToastPortal.md) — Registers named slot content that toast() renders via `portal`; slot `{ data, close, toast }`.
@@ -26,4 +26,4 @@
26
26
 
27
27
  - [BbHoverCard](./BbHoverCard.md) — A rich preview card that opens on hover or keyboard focus (a person, an event, a link) — BbPopover's panel without the click; may hold commands that also exist elsewhere; also the v-bb-hover-card directive.
28
28
  - [BbPopoverPortal](./BbPopoverPortal.md) — Registers named slot content that `v-bb-popover="'name'"` (or `{ portal: 'name' }`) renders in the popover; slot `{ data, close }`.
29
- - [BbConfirmPortal](./BbConfirmPortal.md) — Registers named slot content that confirm() renders via `portal`; slot `{ data, yes, no }`.
29
+ - [BbConfirmPortal](./BbConfirmPortal.md) — Registers named slot content that confirm() renders via `portal`; slot `{ data, ok, cancel }`.
package/dist/ai/BbIcon.md CHANGED
@@ -452,7 +452,7 @@ belongs to the `BbButton`/`BbBaseButton` wrapping it.
452
452
 
453
453
  An info icon with a tip is therefore a button, not a bare icon: an icon-only
454
454
  ghost `BbButton` takes keyboard focus, which opens the tip, and its slot text
455
- is the name (`<BbButton variant="ghost" icon="lucide:info" v-bb-tooltip="'Prices include VAT'">About prices</BbButton>`).
455
+ is the name (`<BbButton variant="ghost" icon-only prepend:icon="lucide:info" v-bb-tooltip="'Prices include VAT'">About prices</BbButton>`).
456
456
  For text that must be readable on touch, use a `BbPopover` toggletip. A
457
457
  `v-bb-tooltip` on a bare `BbIcon` is a pointer-only hint: keyboard and touch
458
458
  never open it.