bitboss-ui 3.0.0-beta.71 → 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 (359) 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 +1 -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/BbCheckboxGroup.md +2 -1
  10. package/dist/ai/BbColorInput.md +1 -1
  11. package/dist/ai/BbConfirm.md +65 -81
  12. package/dist/ai/BbConfirmPortal.md +2 -2
  13. package/dist/ai/BbDatePicker.md +1 -6
  14. package/dist/ai/BbDatePickerInput.md +2 -2
  15. package/dist/ai/BbDialog.md +230 -164
  16. package/dist/ai/BbDropdown.md +52 -16
  17. package/dist/ai/BbDropdownButton.md +11 -12
  18. package/dist/ai/BbDropzone.md +12 -8
  19. package/dist/ai/BbForm.md +93 -7
  20. package/dist/ai/BbHost.md +2 -2
  21. package/dist/ai/BbHoverCardPortal.md +1 -1
  22. package/dist/ai/BbIcon.md +1 -1
  23. package/dist/ai/BbIndicator.md +17 -15
  24. package/dist/ai/BbNumberInput.md +7 -5
  25. package/dist/ai/BbOffCanvas.md +29 -7
  26. package/dist/ai/BbPagination.md +2 -2
  27. package/dist/ai/BbPopover.md +15 -9
  28. package/dist/ai/BbPopoverPortal.md +1 -1
  29. package/dist/ai/BbRadioGroup.md +29 -7
  30. package/dist/ai/BbRating.md +8 -7
  31. package/dist/ai/BbSelect.md +29 -8
  32. package/dist/ai/BbSelectPopover.md +9 -3
  33. package/dist/ai/BbSlider.md +12 -8
  34. package/dist/ai/BbSpinner.md +3 -2
  35. package/dist/ai/BbSwitch.md +3 -3
  36. package/dist/ai/BbSwitchGroup.md +7 -6
  37. package/dist/ai/BbTable.md +205 -82
  38. package/dist/ai/BbTabs.md +29 -4
  39. package/dist/ai/BbTag.md +1 -1
  40. package/dist/ai/BbTextInput.md +7 -5
  41. package/dist/ai/BbTextarea.md +4 -3
  42. package/dist/ai/BbTimePickerInput.md +1 -1
  43. package/dist/ai/BbToast.md +3 -2
  44. package/dist/ai/BbTooltip.md +22 -17
  45. package/dist/ai/BbTree.md +49 -24
  46. package/dist/ai/CommonFieldInput.md +1 -1
  47. package/dist/ai/changelog.json +238 -9
  48. package/dist/ai/components.json +52 -51
  49. package/dist/ai/composables/useBbDialog.md +5 -8
  50. package/dist/ai/composables/useBbForm.md +3 -0
  51. package/dist/ai/composables/useConfirm.md +65 -56
  52. package/dist/ai/composables/useToast.md +2 -1
  53. package/dist/ai/guides/agent-contract.md +3 -3
  54. package/dist/ai/guides/app-layout.md +3 -2
  55. package/dist/ai/guides/eslint-rules.md +3 -1
  56. package/dist/ai/guides/fetch-items-playbook.md +1 -1
  57. package/dist/ai/guides/floating-bottom-panel.md +3 -2
  58. package/dist/ai/guides/icons-policy.md +7 -5
  59. package/dist/ai/guides/inertia-helpers.md +35 -30
  60. package/dist/ai/guides/installation-and-plugin-setup.md +17 -14
  61. package/dist/ai/guides/migration/adoption-checklist.md +2 -2
  62. package/dist/ai/guides/migration/components/bb-badge.md +12 -1
  63. package/dist/ai/guides/migration/components/bb-button.md +24 -0
  64. package/dist/ai/guides/migration/components/bb-dropdown-button.md +11 -0
  65. package/dist/ai/guides/migration/components/bb-tabs.md +2 -2
  66. package/dist/ai/guides/migration/components/bb-toast.md +11 -0
  67. package/dist/ai/guides/migration/components/use-confirm.md +69 -26
  68. package/dist/ai/guides/migration/v2-to-v3.md +52 -10
  69. package/dist/ai/guides/migration/v3-beta-css-classes.md +1 -1
  70. package/dist/ai/guides/options-items-playbook.md +4 -3
  71. package/dist/ai/guides/passthrough.md +2 -2
  72. package/dist/ai/helpers/inertia/manifest.json +28 -15
  73. package/dist/ai/helpers/inertia/messages.ts +3 -3
  74. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +10 -10
  75. package/dist/ai/helpers/inertia/usePromiseForm.ts +1 -1
  76. package/dist/ai/helpers/inertia/usePromiseRouter.ts +7 -2
  77. package/dist/ai/index.md +3 -3
  78. package/dist/ai/manifest/common.json +3 -3
  79. package/dist/ai/manifest/components/BbAccordion.json +8 -5
  80. package/dist/ai/manifest/components/BbAccordion.tree.json +1 -0
  81. package/dist/ai/manifest/components/BbBadge.json +8 -7
  82. package/dist/ai/manifest/components/BbBadge.removed.json +3 -1
  83. package/dist/ai/manifest/components/BbBadge.tree.json +73 -0
  84. package/dist/ai/manifest/components/BbBreadcrumbs.json +1 -1
  85. package/dist/ai/manifest/components/BbButton.json +5 -6
  86. package/dist/ai/manifest/components/BbButton.removed.json +3 -1
  87. package/dist/ai/manifest/components/BbButton.tree.json +24 -7
  88. package/dist/ai/manifest/components/BbCalendar.json +2 -1
  89. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  90. package/dist/ai/manifest/components/BbColorInput.json +1 -1
  91. package/dist/ai/manifest/components/BbColorInput.tree.json +1 -1
  92. package/dist/ai/manifest/components/BbConfirm.json +2 -2
  93. package/dist/ai/manifest/components/BbConfirm.removed.json +9 -0
  94. package/dist/ai/manifest/components/BbConfirm.tree.json +4 -5
  95. package/dist/ai/manifest/components/BbConfirmPortal.json +3 -3
  96. package/dist/ai/manifest/components/BbConfirmPortal.removed.json +7 -0
  97. package/dist/ai/manifest/components/BbDatePicker.json +2 -1
  98. package/dist/ai/manifest/components/BbDatePicker.tree.json +0 -6
  99. package/dist/ai/manifest/components/BbDatePickerInput.json +2 -2
  100. package/dist/ai/manifest/components/BbDatePickerInput.tree.json +1 -1
  101. package/dist/ai/manifest/components/BbDialog.json +6 -1
  102. package/dist/ai/manifest/components/BbDialog.tree.json +41 -1
  103. package/dist/ai/manifest/components/BbDropdown.json +9 -8
  104. package/dist/ai/manifest/components/BbDropdown.tree.json +4 -0
  105. package/dist/ai/manifest/components/BbDropdownButton.json +8 -9
  106. package/dist/ai/manifest/components/BbDropdownButton.removed.json +3 -1
  107. package/dist/ai/manifest/components/BbForm.json +3 -1
  108. package/dist/ai/manifest/components/BbNumberInput.json +1 -1
  109. package/dist/ai/manifest/components/BbNumberInput.tree.json +1 -1
  110. package/dist/ai/manifest/components/BbOffCanvas.json +6 -1
  111. package/dist/ai/manifest/components/BbOffCanvas.tree.json +40 -0
  112. package/dist/ai/manifest/components/BbPagination.json +1 -1
  113. package/dist/ai/manifest/components/BbRadioGroup.json +4 -3
  114. package/dist/ai/manifest/components/BbRating.json +2 -2
  115. package/dist/ai/manifest/components/BbSelect.json +16 -15
  116. package/dist/ai/manifest/components/BbSelect.tree.json +1 -1
  117. package/dist/ai/manifest/components/BbSelectPopover.json +1 -0
  118. package/dist/ai/manifest/components/BbSwitch.json +4 -4
  119. package/dist/ai/manifest/components/BbSwitchGroup.json +7 -7
  120. package/dist/ai/manifest/components/BbTable.json +15 -14
  121. package/dist/ai/manifest/components/BbTable.tree.json +2 -0
  122. package/dist/ai/manifest/components/BbTabs.json +3 -3
  123. package/dist/ai/manifest/components/BbTabsList.json +1 -1
  124. package/dist/ai/manifest/components/BbTabsRoot.json +1 -1
  125. package/dist/ai/manifest/components/BbTag.json +1 -1
  126. package/dist/ai/manifest/components/BbTag.tree.json +1 -1
  127. package/dist/ai/manifest/components/BbTextInput.json +1 -1
  128. package/dist/ai/manifest/components/BbTextInput.tree.json +1 -1
  129. package/dist/ai/manifest/components/BbTextarea.json +1 -1
  130. package/dist/ai/manifest/components/BbTextarea.tree.json +1 -1
  131. package/dist/ai/manifest/components/BbTimePicker.json +1 -1
  132. package/dist/ai/manifest/components/BbTimePickerInput.json +1 -1
  133. package/dist/ai/manifest/components/BbTimePickerInput.tree.json +1 -1
  134. package/dist/ai/manifest/components/BbToast.removed.json +2 -1
  135. package/dist/ai/manifest/components/BbTree.json +2 -2
  136. package/dist/ai/manifest/components/CommonFieldInput.tree.json +3 -3
  137. package/dist/ai/manifest/index.json +4 -4
  138. package/dist/ai/manifest/meta.json +5 -1
  139. package/dist/ai/manifest/types.advanced.json +9 -9
  140. package/dist/ai/manifest/types.api.json +6 -5
  141. package/dist/ai/recipes/inertia/approvals-inbox.md +23 -16
  142. package/dist/ai/recipes/inertia/inline-edit-workspace.md +12 -5
  143. package/dist/ai/recipes/inertia/layout-scaffold.md +5 -3
  144. package/dist/ai/recipes/inertia/onboarding.md +23 -12
  145. package/dist/ai/recipes/inertia/ownership-atlas.md +34 -18
  146. package/dist/ai/recipes/inertia/record-form.md +12 -8
  147. package/dist/ai/recipes/inertia/records-workspace.md +14 -7
  148. package/dist/ai/recipes/inertia/settings-workspace.md +75 -60
  149. package/dist/ai/recipes/inertia/upload-center.md +17 -9
  150. package/dist/ai/recipes/inertia/wizard-form.md +2 -2
  151. package/dist/ai/recipes/nuxt/approvals-inbox.md +23 -16
  152. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +12 -5
  153. package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -3
  154. package/dist/ai/recipes/nuxt/onboarding.md +5 -4
  155. package/dist/ai/recipes/nuxt/ownership-atlas.md +34 -18
  156. package/dist/ai/recipes/nuxt/record-form.md +14 -10
  157. package/dist/ai/recipes/nuxt/records-workspace.md +14 -7
  158. package/dist/ai/recipes/nuxt/settings-workspace.md +70 -60
  159. package/dist/ai/recipes/nuxt/upload-center.md +17 -9
  160. package/dist/ai/recipes/nuxt/wizard-form.md +4 -4
  161. package/dist/ai/recipes/vue/approvals-inbox.md +23 -16
  162. package/dist/ai/recipes/vue/inline-edit-workspace.md +12 -5
  163. package/dist/ai/recipes/vue/layout-scaffold.md +5 -3
  164. package/dist/ai/recipes/vue/onboarding.md +5 -4
  165. package/dist/ai/recipes/vue/ownership-atlas.md +34 -18
  166. package/dist/ai/recipes/vue/record-form.md +14 -10
  167. package/dist/ai/recipes/vue/records-workspace.md +14 -7
  168. package/dist/ai/recipes/vue/settings-workspace.md +70 -60
  169. package/dist/ai/recipes/vue/upload-center.md +17 -9
  170. package/dist/ai/recipes/vue/wizard-form.md +4 -4
  171. package/dist/ai/source/BbAccordion.md +50 -16
  172. package/dist/ai/source/BbBadge.md +420 -26
  173. package/dist/ai/source/BbBadgeButton.md +378 -12
  174. package/dist/ai/source/BbButton.md +205 -55
  175. package/dist/ai/source/BbCalendar.md +5 -0
  176. package/dist/ai/source/BbCheckboxGroup.md +38 -13
  177. package/dist/ai/source/BbConfigScope.md +19 -2
  178. package/dist/ai/source/BbConfirm.md +74 -80
  179. package/dist/ai/source/BbConfirmPortal.md +6 -6
  180. package/dist/ai/source/BbDatePicker.md +9 -2
  181. package/dist/ai/source/BbDatePickerInput.md +3 -1
  182. package/dist/ai/source/BbDialog.md +53 -2
  183. package/dist/ai/source/BbDropdown.md +350 -98
  184. package/dist/ai/source/BbDropdownButton.md +20 -12
  185. package/dist/ai/source/BbDropdownGroup.md +136 -58
  186. package/dist/ai/source/BbForm.md +144 -10
  187. package/dist/ai/source/BbOffCanvas.md +53 -2
  188. package/dist/ai/source/BbPagination.md +1 -1
  189. package/dist/ai/source/BbRadioGroup.md +72 -10
  190. package/dist/ai/source/BbRating.md +30 -22
  191. package/dist/ai/source/BbSelect.md +11 -1
  192. package/dist/ai/source/BbSelectPopover.md +105 -34
  193. package/dist/ai/source/BbSwitch.md +23 -8
  194. package/dist/ai/source/BbSwitchGroup.md +67 -21
  195. package/dist/ai/source/BbTable.md +359 -48
  196. package/dist/ai/source/BbTabs.md +6 -0
  197. package/dist/ai/source/BbTabsList.md +10 -0
  198. package/dist/ai/source/BbTabsPanels.md +6 -0
  199. package/dist/ai/source/BbTabsRoot.md +6 -0
  200. package/dist/ai/source/BbTree.md +14 -4
  201. package/dist/ai/source/CommonFieldInput.md +2 -1
  202. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +7 -3
  203. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +52 -38
  204. package/dist/components/BbAccordion/ptKeys.generated.d.ts +20 -0
  205. package/dist/components/BbAccordion/types.d.ts +21 -7
  206. package/dist/components/BbAccordion/types.js +1 -1
  207. package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -1
  208. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +5 -5
  209. package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
  210. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +65 -42
  211. package/dist/components/BbBadge/types.d.ts +15 -12
  212. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +79 -73
  213. package/dist/components/BbButton/types.d.ts +7 -6
  214. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +2 -1
  215. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +2 -1
  216. package/dist/components/BbCalendar/types.d.ts +5 -0
  217. package/dist/components/BbCalendar/useCalendarGrid.js +1 -1
  218. package/dist/components/BbCalendar/useDayGrid.js +1 -1
  219. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +10 -4
  220. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +2 -2
  221. package/dist/components/BbCheckboxGroup/types.d.ts +2 -2
  222. package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +8 -8
  223. package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +71 -132
  224. package/dist/components/BbConfirm/ptKeys.generated.d.ts +5 -5
  225. package/dist/components/BbConfirm/types.d.ts +5 -5
  226. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +2 -1
  227. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +3 -0
  228. package/dist/components/BbDatePicker/types.d.ts +5 -0
  229. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
  230. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +2 -0
  231. package/dist/components/BbDatePickerInput/types.d.ts +2 -1
  232. package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -0
  233. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +263 -235
  234. package/dist/components/BbDialog/overlayActions.js +94 -0
  235. package/dist/components/BbDialog/types.d.ts +24 -0
  236. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +4 -3
  237. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +382 -332
  238. package/dist/components/BbDropdown/dropdownHandle.js +6 -0
  239. package/dist/components/BbDropdown/normalizeGroups.js +58 -48
  240. package/dist/components/BbDropdown/types.d.ts +107 -48
  241. package/dist/components/BbDropdown/types.js +2 -2
  242. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +71 -71
  243. package/dist/components/BbDropdownButton/types.d.ts +2 -4
  244. package/dist/components/BbForm/BbForm.vue.d.ts +2 -1
  245. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +240 -198
  246. package/dist/components/BbForm/recognizeValidation.d.ts +9 -0
  247. package/dist/components/BbForm/recognizeValidation.js +55 -0
  248. package/dist/components/BbForm/validationError.d.ts +10 -0
  249. package/dist/components/BbForm/validationError.js +11 -0
  250. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -0
  251. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +414 -389
  252. package/dist/components/BbOffCanvas/sheetAttrs.js +5 -5
  253. package/dist/components/BbOffCanvas/types.d.ts +24 -0
  254. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +3 -3
  255. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +10 -4
  256. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +173 -157
  257. package/dist/components/BbRadioGroup/types.d.ts +9 -3
  258. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +112 -103
  259. package/dist/components/BbRating/types.d.ts +3 -2
  260. package/dist/components/BbSelect/BbSelect.vue.d.ts +9 -8
  261. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +3 -1
  262. package/dist/components/BbSelect/types.d.ts +8 -0
  263. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +11 -4
  264. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +513 -502
  265. package/dist/components/BbSelectPopover/types.d.ts +10 -2
  266. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -0
  267. package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +85 -73
  268. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +10 -4
  269. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +171 -152
  270. package/dist/components/BbSwitchGroup/types.d.ts +1 -1
  271. package/dist/components/BbTable/BbTable.vue.d.ts +36 -25
  272. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1338 -1215
  273. package/dist/components/BbTable/BbTableDataRow.js +2 -1
  274. package/dist/components/BbTable/BbTableRowMenu.js +36 -0
  275. package/dist/components/BbTable/types.d.ts +32 -17
  276. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +2 -2
  277. package/dist/components/BbTabs/types.d.ts +6 -0
  278. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
  279. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
  280. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +1 -1
  281. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +88 -94
  282. package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +1 -1
  283. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +9 -9
  284. package/dist/components/BbTree/types.d.ts +8 -2
  285. package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +39 -39
  286. package/dist/composables/formSubmitLock.js +15 -8
  287. package/dist/composables/overlayRegistry.d.ts +5 -0
  288. package/dist/composables/overlayRegistry.js +154 -148
  289. package/dist/composables/useBbDropdown.d.ts +8 -0
  290. package/dist/composables/useBbDropdown.js +3 -1
  291. package/dist/composables/useBbTabs.js +138 -138
  292. package/dist/composables/useConfirm.d.ts +63 -52
  293. package/dist/composables/useConfirm.js +22 -18
  294. package/dist/deprecation/ai-deprecations.json.js +1 -1
  295. package/dist/directives/bbDropdown.d.ts +7 -7
  296. package/dist/directives/bbDropdown.js +21 -14
  297. package/dist/directives/bbTooltip.d.ts +3 -3
  298. package/dist/directives/createPopoverDirective.js +57 -35
  299. package/dist/i18n/locales/ar.json +5 -1
  300. package/dist/i18n/locales/cs.json +5 -1
  301. package/dist/i18n/locales/da.json +5 -1
  302. package/dist/i18n/locales/de-CH.json +5 -1
  303. package/dist/i18n/locales/de.json +5 -1
  304. package/dist/i18n/locales/el.json +5 -1
  305. package/dist/i18n/locales/en-GB.json +5 -1
  306. package/dist/i18n/locales/en.json +5 -1
  307. package/dist/i18n/locales/es-MX.json +5 -1
  308. package/dist/i18n/locales/es.json +5 -1
  309. package/dist/i18n/locales/fa.json +5 -1
  310. package/dist/i18n/locales/fi.json +5 -1
  311. package/dist/i18n/locales/fr.json +5 -1
  312. package/dist/i18n/locales/he.json +5 -1
  313. package/dist/i18n/locales/hu.json +5 -1
  314. package/dist/i18n/locales/it.json +5 -1
  315. package/dist/i18n/locales/ja.json +5 -1
  316. package/dist/i18n/locales/ko.json +5 -1
  317. package/dist/i18n/locales/nb.json +5 -1
  318. package/dist/i18n/locales/nl.json +5 -1
  319. package/dist/i18n/locales/pl.json +5 -1
  320. package/dist/i18n/locales/pt-BR.json +5 -1
  321. package/dist/i18n/locales/pt-PT.json +5 -1
  322. package/dist/i18n/locales/ro.json +5 -1
  323. package/dist/i18n/locales/ru.json +5 -1
  324. package/dist/i18n/locales/sv.json +5 -1
  325. package/dist/i18n/locales/tr.json +5 -1
  326. package/dist/i18n/locales/uk.json +5 -1
  327. package/dist/i18n/locales/zh-CN.json +5 -1
  328. package/dist/i18n/locales/zh-HK.json +5 -1
  329. package/dist/i18n/locales/zh-TW.json +5 -1
  330. package/dist/index.d.ts +2 -0
  331. package/dist/index.js +4 -3
  332. package/dist/llms-full.txt +1984 -1145
  333. package/dist/llms-medium.txt +21 -18
  334. package/dist/llms.txt +2 -2
  335. package/dist/locale-blueprint.json +5 -1
  336. package/dist/plugin.js +17 -40
  337. package/dist/pluginCore.js +30 -0
  338. package/dist/styles.css +2 -2
  339. package/dist/types/ActionButton.d.ts +26 -5
  340. package/dist/types/ActionButton.js +11 -0
  341. package/dist/types/ConfigDefaults.d.ts +34 -3
  342. package/dist/types/ConfigDefaults.js +14 -8
  343. package/dist/types/ItemPath.d.ts +33 -4
  344. package/dist/types/ptComponentMap.d.ts +1 -1
  345. package/dist/utilities/functions/clickCount.js +14 -0
  346. package/dist/utils/versionCheck.js +1 -1
  347. package/llms.txt +2 -2
  348. package/package.json +11 -1
  349. package/scripts/README.md +31 -27
  350. package/scripts/lib/adoption-checklist.json +2 -2
  351. package/scripts/lib/eslint-disable.mjs +5 -3
  352. package/scripts/lib/eslint-plugin.d.ts +2 -0
  353. package/scripts/lib/eslint-plugin.mjs +213 -1
  354. package/scripts/lib/redundant-item-accessor.mjs +4 -1
  355. package/scripts/lib/release-results.mjs +32 -1
  356. package/scripts/lib/renamed-item-field.mjs +4 -1
  357. package/scripts/lib/tab-links.mjs +4 -1
  358. package/scripts/lib/tree-default-expandable.mjs +53 -0
  359. package/scripts/lib/validate-bb-markup.mjs +536 -52
@@ -118,15 +118,12 @@ const replace = (saved: User) => {
118
118
  </BbButton>
119
119
  </li>
120
120
  </ul>
121
- <!-- No `saving` ref and no `prevent-close`: while the form saves, the
122
- dialog refuses Cancel, the ✕, Escape and the backdrop by itself. -->
123
- <BbDialog id="edit" title="Edit user">
124
- <BbForm
125
- :model="edit.data.value"
126
- @submit="async (values) => edit.complete(await save(values))"
127
- >
121
+ <!-- `ok` submits the form; the saved user is the result. No `saving`
122
+ ref, no `prevent-close`: while the form saves, the dialog refuses
123
+ Cancel, the ✕, Escape and the backdrop by itself. -->
124
+ <BbDialog id="edit" cancel ok="Save" title="Edit user">
125
+ <BbForm :model="edit.data.value" @submit="save">
128
126
  <BbTextInput label="Name" name="name" />
129
- <BbButton type="submit">Save</BbButton>
130
127
  </BbForm>
131
128
  </BbDialog>
132
129
  </template>
@@ -79,6 +79,9 @@ const sendInvite = async (values: Record<string, unknown>) => {
79
79
  </template>
80
80
  ```
81
81
 
82
+ In a dialog, its `ok` prop submits the one form inside for you (BbDialog §
83
+ Footer buttons); the handle is for any other button.
84
+
82
85
  `submit()` routes through the same handler the form's own submit button would
83
86
  trigger, so validation gates the request in exactly one place and `@submit`
84
87
  stays the only place the work happens. It resolves `true` once the save went
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: useConfirm
3
- summary: Promise-based confirm dialogs — await the user's yes/no, with yes/no button configs, async onClick busy states, and portal content. The plugin renders the <BbHost /> that shows them.
3
+ summary: Promise-based confirm dialogs — await the user's OK/Cancel, with ok/cancel button configs, async onClick busy states, and portal content. The plugin renders the <BbHost /> that shows them.
4
4
  type: composable
5
5
  ---
6
6
 
@@ -50,7 +50,7 @@ declare function confirm(message: BbConfirmMessage): Promise<boolean>;
50
50
 
51
51
  Resolves with:
52
52
 
53
- - `true` / `false` for the Yes / No outcome (also `false` on `duration`
53
+ - `true` / `false` for the OK / Cancel outcome (also `false` on `duration`
54
54
  auto-dismiss, on implicit dismiss — backdrop, Escape, X — and on owner-scope
55
55
  disposal).
56
56
  - The clicked button's `onClick` return value when `returning: true`.
@@ -58,7 +58,7 @@ Resolves with:
58
58
  Rejects **only** when a button's `onClick` throws.
59
59
 
60
60
  `false` means _not confirmed_, not necessarily _declined_ — decline-only
61
- behavior belongs in `no.onClick`, not the `if (!ok)` branch.
61
+ behavior belongs in `cancel.onClick`, not the `if (!ok)` branch.
62
62
 
63
63
  ### `close()`
64
64
 
@@ -70,7 +70,7 @@ Hides the newest open dialog opened through the same `useConfirm()` (never
70
70
  another component's) without resolving anything. Its purpose is multi-step
71
71
  flows: with `autoClose: false` the dialog stays open after the promise resolves,
72
72
  and you call `close()` when your flow is done. Server work is not such a flow:
73
- it goes in `yes.onClick` (see **Async work before the dialog closes**). Don't use it as a substitute for
73
+ it goes in `ok.onClick` (see **Async work before the dialog closes**). Don't use it as a substitute for
74
74
  the buttons — a `confirm()` closed this way before any button ran leaves its
75
75
  promise pending.
76
76
 
@@ -89,44 +89,49 @@ apps that want route-based dismissal.
89
89
 
90
90
  At least one of `title`, `text`, `portal` should be set (dev warning otherwise).
91
91
 
92
- | Option | Type | Default | Description |
93
- | ------------- | ----------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
94
- | `title` | `string` | — | Header title. Omit to render no header. |
95
- | `text` | `string` | — | Plain-text body. Takes priority over `portal`. |
96
- | `yes` | `false \| string \| ConfirmButtonConfig` | `'OK'` | Positive button: `false` hides it, a string relabels it, an object gives full control (see below). |
97
- | `no` | `false \| string \| ConfirmButtonConfig` | `'Cancel'` | Negative button: same three forms. |
98
- | `variant` | `ConfirmVariantType` | `'default'` | Dialog tone, applied as a CSS modifier class. `'destructive'` also makes the Yes button destructive. |
99
- | `returning` | `boolean` | `false` | Resolve with the clicked button's `onClick` return value instead of `true`/`false`. |
100
- | `dismissAsNo` | `boolean` | `true` | Whether user-initiated implicit dismissals (backdrop, Escape, X) invoke `no.onClick`. When `false` they resolve `false` quietly. System-initiated dismissals (`duration`, owner unmount, `dismissAll()`) are always quiet. |
101
- | `autoClose` | `boolean` | `true` | Close after the promise settles. Set `false` for multi-step flows ended by `close()`. |
102
- | `duration` | `number` | — | Auto-dismiss after N ms, resolving `false` quietly (no callback). Implies `autoClose: true`. |
103
- | `persistent` | `boolean` | `false` | Block backdrop and Escape dismissal. The X button ignores this and follows `hideClose`. Forced on while a callback runs. |
104
- | `hideClose` | `boolean` | `false` | Hide the X button. Combine with `persistent` to force a Yes/No choice. |
105
- | `actions` | `false \| ConfirmButtonConfig[]` | — | `false` hides the footer entirely (e.g. a portal owns the buttons). An array replaces Yes/No with custom buttons (see below). |
106
- | `size` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl'` | — | Maximum dialog width preset. |
107
- | `fullscreen` | `boolean \| 'mobile'` | — | Fullscreen dialog; `'mobile'` restricts it to small screens. |
108
- | `focusTarget` | `string` | — | CSS selector to focus after opening (default: first tabbable element). |
109
- | `stack` | `string` | — | The `BbDialog` stack to join instead of the confirms' own: a dialog's `stack` name replaces that dialog's view; a name nothing else uses shows it on top of the other confirms. |
110
- | `portal` | `Component \| string` | — | Custom body content. See **Portal modes**. |
111
- | `data` | `Record<string, any>` | — | Data for the portal content. |
92
+ | Option | Type | Default | Description |
93
+ | ----------------- | ----------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
94
+ | `title` | `string` | — | Header title. Omit to render no header. |
95
+ | `text` | `string` | — | Plain-text body. Takes priority over `portal`. |
96
+ | `ok` | `boolean \| string \| ConfirmButtonConfig` | `'OK'` | Confirming button: `false` hides it, `true` keeps the default, a string relabels it, an object gives full control (see below). |
97
+ | `cancel` | `boolean \| string \| ConfirmButtonConfig` | `'Cancel'` | Dismiss button, shown before OK: same forms. |
98
+ | `variant` | `ConfirmVariantType` | `'default'` | Dialog tone, applied as a CSS modifier class. `'destructive'` also makes the OK button destructive. |
99
+ | `returning` | `boolean` | `false` | Resolve with the clicked button's `onClick` return value instead of `true`/`false`. |
100
+ | `dismissAsCancel` | `boolean` | `true` | Whether user-initiated implicit dismissals (backdrop, Escape, X) invoke `cancel.onClick`. When `false` they resolve `false` quietly. System-initiated dismissals (`duration`, owner unmount, `dismissAll()`) are always quiet. |
101
+ | `autoClose` | `boolean` | `true` | Close after the promise settles. Set `false` for multi-step flows ended by `close()`. |
102
+ | `duration` | `number` | — | Auto-dismiss after N ms, resolving `false` quietly (no callback). Implies `autoClose: true`. |
103
+ | `persistent` | `boolean` | `false` | Block backdrop and Escape dismissal. The X button ignores this and follows `hideClose`. Forced on while a callback runs. |
104
+ | `hideClose` | `boolean` | `false` | Hide the X button. Combine with `persistent` to force an OK/Cancel choice. |
105
+ | `actions` | `false \| ConfirmButtonConfig[]` | — | `false` hides the footer entirely (e.g. a portal owns the buttons). An array replaces OK/Cancel with custom buttons (see below). |
106
+ | `size` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl'` | — | Maximum dialog width preset. |
107
+ | `fullscreen` | `boolean \| 'mobile'` | — | Fullscreen dialog; `'mobile'` restricts it to small screens. |
108
+ | `focusTarget` | `string` | — | CSS selector to focus after opening (default: first tabbable element). |
109
+ | `stack` | `string` | — | The `BbDialog` stack to join instead of the confirms' own: a dialog's `stack` name replaces that dialog's view; a name nothing else uses shows it on top of the other confirms. |
110
+ | `portal` | `Component \| string` | — | Custom body content. See **Portal modes**. |
111
+ | `data` | `Record<string, any>` | — | Data for the portal content. |
112
112
 
113
113
  ### `ConfirmButtonConfig`
114
114
 
115
- | Field | Type | Default | Description |
116
- | ------------------------------ | ----------------------------------- | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
117
- | `text` | `string` | `'OK'` / `'Cancel'` | Button label. Prefer a verb matching the action (_Delete_, _Publish_). |
118
- | `variant` | `ButtonVariantType` | yes: `'primary'`\*, no: `'outline'` | Button variant. \*Yes inherits `'destructive'` when the confirm variant is. |
119
- | `size` | `BbButtonProps['size']` | `'md'` | Button size. |
120
- | `prepend:icon` / `append:icon` | `IconType` | — | Icon before/after the label (`lucide:*` preferred). |
121
- | `icon` | `IconType` | — | Standalone icon button (no label). |
122
- | `block` | `boolean` | — | Stretch to full footer width. |
123
- | `onClick` | `() => unknown \| Promise<unknown>` | — | Async work done _before_ the dialog closes; the button spins while it runs. Its return value feeds the promise when `returning: true`. |
115
+ | Field | Type | Default | Description |
116
+ | ------------------------------ | ----------------------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
117
+ | `text` | `string` | `'OK'` / `'Cancel'` | Button label. Prefer a verb matching the action (_Delete_, _Publish_). |
118
+ | `variant` | `ButtonVariantType` | ok: `'primary'`\*, cancel: `'outline'` | Button variant. \*OK inherits `'destructive'` when the confirm variant is. |
119
+ | `size` | `BbButtonProps['size']` | `'md'` | Button size. |
120
+ | `prepend:icon` / `append:icon` | `IconType` | — | Icon before/after the label (`lucide:*` preferred). |
121
+ | `iconOnly` | `boolean` | — | Show only the icon; `text` stays the accessible name. |
122
+ | `block` | `boolean` | — | Stretch to full footer width. |
123
+ | `onClick` | `() => unknown \| Promise<unknown>` | — | Async work done _before_ the dialog closes; the button spins while it runs. Its return value feeds the promise when `returning: true`. |
124
+
125
+ The plugin sets the app-wide look of OK and Cancel:
126
+ `components: { BbConfirm: { okProps: { variant: 'primary' }, cancelProps: { variant: 'ghost' } } }`
127
+ (`text`, `variant`, `size`, icons, `iconOnly`, `block`). The call wins, and
128
+ the config never shows a button the call hides.
124
129
 
125
130
  ## Usage examples
126
131
 
127
132
  ### The destructive gate
128
133
 
129
- One pattern: the confirmed work goes in Yes's `onClick`. A server call or a
134
+ One pattern: the confirmed work goes in OK's `onClick`. A server call or a
130
135
  visit then spins in the button, nothing else can be clicked while it runs,
131
136
  and a failure rejects `confirm()`. `await confirm()` and act after it only for
132
137
  a local, instant step (dropping a row you hold, leaving a page).
@@ -149,12 +154,12 @@ const remove = () =>
149
154
  title: 'Delete invoice?',
150
155
  text: 'Invoice INV-2048 will be permanently removed. This cannot be undone.',
151
156
  variant: 'destructive',
152
- yes: {
157
+ ok: {
153
158
  text: 'Delete',
154
159
  'prepend:icon': 'lucide:trash-2',
155
160
  onClick: () => api.invoices.delete('INV-2048'),
156
161
  },
157
- no: 'Cancel',
162
+ cancel: 'Cancel',
158
163
  }).catch(() => toast({ title: 'Delete failed', variant: 'destructive' }));
159
164
  </script>
160
165
  ```
@@ -170,17 +175,17 @@ const post = await confirm({
170
175
  title: 'Publish post?',
171
176
  text: 'The post becomes visible to all members.',
172
177
  returning: true,
173
- yes: { text: 'Publish', onClick: () => api.posts.publish(draft.id) },
178
+ ok: { text: 'Publish', onClick: () => api.posts.publish(draft.id) },
174
179
  });
175
180
  // post is the api result, or false when the user declined
176
181
  ```
177
182
 
178
183
  An Inertia visit goes in `onClick` too, through the Inertia helpers'
179
- `usePromiseRouter` (a bare `router.delete` returns no promise): Yes spins for
184
+ `usePromiseRouter` (a bare `router.delete` returns no promise): OK spins for
180
185
  the whole visit, and the dialog closes when it settles. A failed visit rejects
181
186
  `confirm()` and still closes the dialog, so catch it: the rejection is the
182
- error bag itself on a validation error (not `{ errors }`), an `Error`
183
- otherwise.
187
+ `BbValidationError` (the bag under `.errors`) on a validation error, another
188
+ `Error` otherwise.
184
189
 
185
190
  ```ts
186
191
  import { useConfirm, useToast } from 'bitboss-ui';
@@ -194,19 +199,19 @@ const destroy = (id: number) =>
194
199
  confirm({
195
200
  title: 'Delete invoice?',
196
201
  variant: 'destructive',
197
- yes: { text: 'Delete', onClick: () => remove(`/invoices/${id}`) },
202
+ ok: { text: 'Delete', onClick: () => remove(`/invoices/${id}`) },
198
203
  }).catch(() =>
199
204
  toast({ title: 'Not deleted. Try again.', variant: 'destructive' })
200
205
  );
201
206
  ```
202
207
 
203
- Not `autoClose: false` with `close()` called from the visit callbacks: Yes
208
+ Not `autoClose: false` with `close()` called from the visit callbacks: OK
204
209
  never shows busy, and a missed callback leaves the dialog up or closes it
205
210
  mid-visit.
206
211
 
207
- ### Custom footer actions — more than yes/no
212
+ ### Custom footer actions — more than OK/Cancel
208
213
 
209
- Pass an `actions` array to replace the Yes/No footer with your own buttons.
214
+ Pass an `actions` array to replace the OK/Cancel footer with your own buttons.
210
215
  Clicking any of them resolves `true`; dismissal (backdrop, Escape, X,
211
216
  `duration`) resolves `false` without invoking any callback. Defaults per
212
217
  button: `variant: 'outline'`, `size: 'md'`.
@@ -240,8 +245,8 @@ const decision = await confirm({
240
245
  // (`as const` keeps the literals; without it each handler infers `string`)
241
246
  ```
242
247
 
243
- An `actions` array owns the footer: `yes` / `no` are ignored (dev warning) and
244
- `dismissAsNo` callbacks never fire. Everything else carries over from yes/no:
248
+ An `actions` array owns the footer: `ok` / `cancel` are ignored (dev warning) and
249
+ `dismissAsCancel` callbacks never fire. Everything else carries over from OK/Cancel:
245
250
 
246
251
  - While a handler runs, its button spins, the other actions are disabled, and
247
252
  the dialog is locked (`persistent` + `hideClose` forced on).
@@ -249,18 +254,22 @@ An `actions` array owns the footer: `yes` / `no` are ignored (dev warning) and
249
254
  `try/catch` when a handler can fail.
250
255
  - `duration` still auto-dismisses, resolving `false`.
251
256
  - Every `ConfirmButtonConfig` field works per action — `prepend:icon` /
252
- `append:icon`, icon-only via `icon`, `block`, `size`, `variant`.
257
+ `append:icon`, icon-only via `iconOnly`, `block`, `size`, `variant`.
253
258
 
254
259
  ### Acknowledgement — one button
255
260
 
256
261
  ```ts
257
- await confirm({ title: 'Saved', text: 'Your changes are live.', no: false });
262
+ await confirm({
263
+ title: 'Saved',
264
+ text: 'Your changes are live.',
265
+ cancel: false,
266
+ });
258
267
  ```
259
268
 
260
269
  ### Named portal — inline content with `data`
261
270
 
262
271
  Declare `<BbConfirmPortal>` anywhere in the tree; its slot receives
263
- `{ yes, no, data }` where `data` is the `data` you passed.
272
+ `{ ok, cancel, data }` where `data` is the `data` you passed.
264
273
 
265
274
  ```vue
266
275
  <template>
@@ -281,22 +290,22 @@ const ok = await confirm({
281
290
  variant: 'destructive',
282
291
  portal: 'remove-member',
283
292
  data: { name: 'Sofia Esposito', role: 'Editor' },
284
- yes: 'Remove',
285
- no: 'Cancel',
293
+ ok: 'Remove',
294
+ cancel: 'Cancel',
286
295
  });
287
296
  ```
288
297
 
289
298
  ### Portal owning its own buttons
290
299
 
291
- Hide the footer with `actions: false` and resolve from the slot's `yes` / `no`
300
+ Hide the footer with `actions: false` and resolve from the slot's `ok` / `cancel`
292
301
  helpers:
293
302
 
294
303
  ```vue
295
304
  <BbConfirmPortal name="upload-success">
296
- <template #default="{ yes }">
305
+ <template #default="{ ok }">
297
306
  <div class="flex flex-col items-center gap-3">
298
307
  <p class="font-semibold">Upload complete</p>
299
- <BbButton variant="primary" @click="yes">Got it</BbButton>
308
+ <BbButton variant="primary" @click="ok">Got it</BbButton>
300
309
  </div>
301
310
  </template>
302
311
  </BbConfirmPortal>
@@ -319,8 +328,8 @@ const ok = await confirm({
319
328
  title: 'Delete file?',
320
329
  portal: DeleteConfirmContent,
321
330
  data: { fileName: 'report.pdf' },
322
- yes: 'Delete',
323
- no: 'Cancel',
331
+ ok: 'Delete',
332
+ cancel: 'Cancel',
324
333
  });
325
334
  ```
326
335
 
@@ -153,7 +153,8 @@ const upload = async () => {
153
153
 
154
154
  `actions` takes an array of `ActionButtonConfig` (same shape as the confirm
155
155
  buttons: `text`, `variant` — default `'primary'` —, `size` — default `'sm'` —,
156
- `prepend:icon`/`append:icon`/`icon`, `block`, `onClick`; confirm buttons
156
+ `prepend:icon`/`append:icon`, `iconOnly` (the icon alone, `text` its
157
+ accessible name), `block`, `onClick`; confirm buttons
157
158
  default to `'outline'` / `'md'` instead). While a button's
158
159
  `onClick` runs it shows a spinner, siblings are disabled, and the auto-dismiss
159
160
  countdown is held; the toast dismisses itself (reason `'action'`) when the
@@ -17,7 +17,7 @@ a guessed name is an error (`npx bitboss-ui check` or `vue-tsc` says so).
17
17
  | `toast.success('Saved')`, `{ message }`, `{ description }`, `type` | `const { toast } = useToast(); toast({ title, text, variant: 'success' })`; variants `default` `success` `info` `warning` `destructive` |
18
18
  | `<BbToastStack>`, a toaster per page | nothing: the plugin renders the `<BbHost />` |
19
19
  | BbDialog `v-model:open`, `:open` | `v-bb-dialog="'id'"` on the button or `useBbDialog('id')`; own file / per row: `useBbDialog(Component).show(data)` |
20
- | BbDialog `@close`, `@confirm`, `@cancel`, `#actions` | `@hide` (closing starts) / `@hidden` (closed); your own buttons in `#footer="{ close }"` |
20
+ | BbDialog `@close`, `@confirm`, `@cancel`, `#actions` | `cancel` / `ok` props; `@hide`, `@hidden` |
21
21
  | BbTable `sortable`, `v-model:sorted`, `sort-order`, `@sort` | `sortable: true` per column + `v-model:sort` (a `BbTableSortEntry[]`, `[key, 'asc' \| 'desc']`); the table never sorts: you do |
22
22
  | `@row-click`, `@row:click` | `@click:row="(event, item) => …"` |
23
23
  | `row-key` | `item-value` |
@@ -30,9 +30,9 @@ a guessed name is an error (`npx bitboss-ui check` or `vue-tsc` says so).
30
30
  | `<BbDropdownItem>`, `<BbTableColumn>` | types, not components: rows are `items` objects (`{ value, label, onClick }`), columns are `columns` objects |
31
31
  | BbDropdown `#trigger`, `#button` | `#activator="{ props }"`, spread `v-bind="props"` on your button |
32
32
  | a menu row's click via `@select` / `@item:selected` | the item's `onClick` (or `href` / `to`); `@item:selected` fires only for `selectable` groups |
33
- | `icon` on BbTextInput, `#icon` on BbButton | `prepend:icon` / `append:icon`; BbButton's (and BbDropdownButton's) `icon` is the icon-only button |
33
+ | `icon` on BbTextInput or BbButton, `#icon` on BbButton | `prepend:icon` / `append:icon`; icon-only: add `icon-only`, keep the label |
34
34
  | badge `success` / `warning` / `info` / `danger` | built-ins `primary` `secondary` `destructive` `outline`; register more (§ Variants Rule) |
35
- | BbBadge `text` / `label` prop | the default slot: `<BbBadge>Paid</BbBadge>` |
35
+ | BbBadge `label` prop | `text`, or the default slot |
36
36
  | `label` on BbCheckboxGroup / BbRadioGroup / BbSwitchGroup / BbRating, a `selectable` BbTable | `legend` (they render a `<fieldset>`; the legend is its name) |
37
37
  | `{ label, value }` items as they are | they work as they are, and so do `{ text, value }`: any other shape needs `item-text` / `item-value` (BbSelect, BbSelectPopover, the groups) |
38
38
  | BbSelect `searchable` | search is on by default; `disable-writing` hides it; `multiple` for a multi-select |
@@ -51,8 +51,9 @@ tinted page canvas, wire a **dark-aware** one yourself; see
51
51
  <div class="layout__nav-head">
52
52
  <span v-if="expanded" class="layout__brand">Acme Billing</span>
53
53
  <BbButton
54
- :aria-label="expanded ? 'Collapse navigation' : 'Expand navigation'"
55
- :icon="
54
+ :text="expanded ? 'Collapse navigation' : 'Expand navigation'"
55
+ icon-only
56
+ :prepend:icon="
56
57
  expanded ? 'lucide:panel-left-close' : 'lucide:panel-left-open'
57
58
  "
58
59
  size="sm"
@@ -21,7 +21,7 @@ Two rules in `recommended` are `warn` rather than `error`, because each describe
21
21
 
22
22
  `recommended` also enables **`bitboss-ui/no-state-text-color`**: a colour-shade `text-*` utility (`text-red-800`, never `text-xs`) in `pt:icon:errors` / `warnings` / `disabled` on `BbCheckbox` / `BbRadio` / `BbSwitch` and their groups (or `pt:root:<state>` on their glyphs) paints nothing, because those states paint from the glyph's own `--accent`, not from `color` — and CSS cannot tell a state entry's colour from the resting `pt:icon` one. For errors and warnings the rule suggests `[--accent:var(--color-red-800)]`, which does recolour the state; for disabled it explains and suggests a fill or border utility. Literal classes only.
23
23
 
24
- `recommended` also enables **`bitboss-ui/require-accessible-name`**: an icon-only `BbButton` (an `icon`, `prepend:icon` or `append:icon`, and no words in the default slot, no `text`, no `aria-label` / `aria-labelledby` / `title`), an icon-only `BbBadge` (`icon` and an empty default slot, which is its label), a `BbProgress` with no `label` / `aria-label` / `aria-labelledby`, or a `BbDropdownButton` with no label (no default slot, no `text`: a split button written before beta.58, whose label came from `items[0]`, now a menu row) renders with no accessible name, so a screen reader announces a bare "button" or "progress bar". The fix is words in the slot, `<BbButton icon="lucide:trash">Delete</BbButton>`: with `icon` set they are visually hidden and still name the button. `BbSpinner` has no such rule: without `label` it is decorative, which is correct. A decorative `BbBadge` or `BbProgress` marked `aria-hidden="true"` (or `:aria-hidden="true"`) is skipped (a `BbButton` is not: hidden or not, it is focusable and needs a name); a dynamic `:aria-hidden="flag"` is still checked, since it needs a name whenever it is `false`. `bitboss-ui check` reports the same finding as `nameless-control`. For raw HTML controls, use `eslint-plugin-vuejs-accessibility`.
24
+ `recommended` also enables **`bitboss-ui/require-accessible-name`**: a `BbButton` with an icon (`prepend:icon` or `append:icon`, `icon-only` or not) and no words in the default slot, no `text`, no `aria-label` / `aria-labelledby` / `title`), an `icon-only` `BbBadge` (an empty default slot, which is its label), a `BbProgress` with no `label` / `aria-label` / `aria-labelledby`, or a `BbDropdownButton` with no label (no default slot, no `text`: a split button written before beta.58, whose label came from `items[0]`, now a menu row) renders with no accessible name, so a screen reader announces a bare "button" or "progress bar". The fix is words in the slot, `<BbButton icon-only prepend:icon="lucide:trash">Delete</BbButton>`: with `icon` set they are visually hidden and still name the button. `BbSpinner` has no such rule: without `label` it is decorative, which is correct. A decorative `BbBadge` or `BbProgress` marked `aria-hidden="true"` (or `:aria-hidden="true"`) is skipped (a `BbButton` is not: hidden or not, it is focusable and needs a name); a dynamic `:aria-hidden="flag"` is still checked, since it needs a name whenever it is `false`. `bitboss-ui check` reports the same finding as `nameless-control`. For raw HTML controls, use `eslint-plugin-vuejs-accessibility`.
25
25
 
26
26
  `recommended` also enables **`bitboss-ui/no-reactive-v-model`**: a `v-model` (or `v-model:arg`) bound to a `<script setup>` `const x = reactive(…)` runs in dev and fails the production build on Vue ≤ 3.5.25, because the compiled write-back is `x = $event`, an assignment to a `const`. Hold the object in a `ref()` (`.value` in script, the template unchanged). A `let`, a member expression (`v-model="form.name"`) and Inertia's `useForm()` are not reported, and neither is `<BbForm>`, which `form-model` covers (below). `bitboss-ui check` reports the same finding as `reactive-v-model`.
27
27
 
@@ -59,6 +59,8 @@ Two rules in `recommended` are `warn` rather than `error`, because each describe
59
59
 
60
60
  `recommended` also enables **`bitboss-ui/valid-locale`** (warn) on `.vue` and script files: a locale written with a `-u-` extension the build plugin drops or does not honour (`fa-u-ca-gregorian`, `it-u-hc-h23`), in the `locale` / `enabledLocales` of `bitbossUi({ … })`, `setConfig({ … })`, `app.use(…, { … })` or Nuxt's `bitboss: { … }`. The messages are the installed plugin's own, with its did-you-mean. A locale the library does not ship is `bitboss-ui check`'s `unknown-locale`.
61
61
 
62
+ `recommended` also enables **`bitboss-ui/table-columns-satisfies`** (warn) on `.vue` and TS files: BbTable columns declared with an annotation (`const columns: BbTableColumn<Row>[] = [...]`, `ref<…>([...])`, `computed<…>(() => [...])`, `(): BbTableColumn<Row>[] => [...]`). The annotation widens every `key` to `string`, so BbTable stops checking nested paths, reserved keys, formatter types and slot names; `[...] satisfies Array<BbTableColumn<Row>>` keeps them. `--fix` rewrites a `const` array only the template uses; anything else (a script use, which could carry the literal keys into a derived array, a `let`, a mutation, `ref` / `computed`, a return type) gets the same rewrite as a suggestion: apply it, then type-check. No `bitboss-ui check` twin.
63
+
62
64
  `recommended` also enables **`bitboss-ui/static-plugin-options`** (warn), on `vite.config.*` and `nuxt.config.*` only (`.js`, `.mjs`, `.cjs`, `.ts`, `.mts`, `.cts`; Nuxt without `.cjs` / `.cts`): a build-plugin option the bitboss-ui CLI reads from the config **without running it**, whose value is computed. `bitboss-ui check` and `bitboss-ui update` (an app's `postinstall`) read `bitbossUi({ … })` in a Vite config and the `bitboss: { … }` key of a Nuxt config that way, so `ai: process.env.X`, `locale: lang`, a shorthand `{ locale }` or a template literal cannot be read and the tooling falls back, saying so in one line. The keys and what each fallback is:
63
65
 
64
66
  - `ai`: the agent files are left as they are (the dev server reaches the same answer on the same config). To turn it off on one machine, set `BITBOSS_UI_AI=0` in that machine's environment instead of computing `ai`; `ai: false` turns it off for everyone.
@@ -118,7 +118,7 @@ const searchMembers = async ({
118
118
 
119
119
  The server matched `query`, so the select must not filter its answer again: set `:filter-by="false"` (a `BbDropdown` group: `filterBy: false`). Without it, the default local search on the display text hides rows the server matched on another field (an email) or by its own rules (a synonym, a stemmed word), and the user sees "No results". It is explicit, never implied by a provider; `disable-writing` is a different thing (it removes the search field).
120
120
 
121
- Single select: normalize before the ids request — `const ids = Array.isArray(modelValue) ? modelValue : modelValue == null || modelValue === '' ? [] : [modelValue]`. Search-first: `if (reason === 'search' && !query.trim()) return []`. Dedupe on the field that is the option's value (`item-value`, or the own `value` key when you pass none). **The merge is select-only**: a table provider returns the page as it is.
121
+ Single select: normalize before the ids request — `const ids = Array.isArray(modelValue) ? modelValue : modelValue == null || modelValue === '' ? [] : [modelValue]`. Search-first: `if (reason === 'search' && !query.trim()) return []`; a minimum length is the select's `:min-query-length="3"`, never a provider guard. Dedupe on the field that is the option's value (`item-value`, or the own `value` key when you pass none). **The merge is select-only**: a table provider returns the page as it is.
122
122
 
123
123
  ### `signal`
124
124
 
@@ -70,8 +70,9 @@ toolbar, the documented exception to the `md`-first button rule (see the
70
70
  >Delete</BbButton
71
71
  >
72
72
  <BbButton
73
- aria-label="Clear selection"
74
- icon="lucide:x"
73
+ text="Clear selection"
74
+ icon-only
75
+ prepend:icon="lucide:x"
75
76
  size="sm"
76
77
  variant="ghost"
77
78
  @click="clear"
@@ -109,8 +109,8 @@ exists.
109
109
 
110
110
  ### Button icons
111
111
 
112
- - `BbButton` — `prepend:icon` / `append:icon` beside the label; `icon` renders
113
- an icon-only button. The label content (default slot, preferred over `text`)
112
+ - `BbButton` — `prepend:icon` / `append:icon` beside the label; `icon-only`
113
+ shows just the icon. The label content (default slot, preferred over `text`)
114
114
  still supplies the accessible name — it is just rendered `sr-only`. Use
115
115
  `aria-label` only to override that name, not as the default.
116
116
 
@@ -118,7 +118,9 @@ exists.
118
118
  <BbButton prepend:icon="lucide:plus">New invoice</BbButton>
119
119
  <BbButton variant="outline" append:icon="lucide:download">Export</BbButton>
120
120
  <!-- Accessible name from slot content, hidden visually — no aria-label needed. -->
121
- <BbButton variant="ghost" icon="lucide:settings">Settings</BbButton>
121
+ <BbButton variant="ghost" icon-only prepend:icon="lucide:settings"
122
+ >Settings</BbButton
123
+ >
122
124
  ```
123
125
 
124
126
  - `BbDropdownButton` — the component is the main button, so its icons are
@@ -266,12 +268,12 @@ markup) yourself:
266
268
  - An info icon with a tip: make it an icon-only ghost `BbButton`, so keyboard
267
269
  focus reaches it and opens the tip; the slot text is its name, the tip its
268
270
  description:
269
- `<BbButton variant="ghost" icon="lucide:info" v-bb-tooltip="'Prices include VAT'">About prices</BbButton>`.
271
+ `<BbButton variant="ghost" icon-only prepend:icon="lucide:info" v-bb-tooltip="'Prices include VAT'">About prices</BbButton>`.
270
272
  When the text must be readable on touch, make it a `BbPopover` toggletip
271
273
  (the same button as its activator; see the BbPopover guide, "Inline field
272
274
  help"). `v-bb-tooltip` on a bare `BbIcon` or `<span>` is a pointer-only
273
275
  hint: keyboard and touch never open it.
274
- - Icon-only `BbButton` (the `icon` prop): supply the accessible name through the
276
+ - Icon-only `BbButton` (`icon-only`): supply the accessible name through the
275
277
  label (default slot, or `text`) — it renders `sr-only` but is still announced.
276
278
  `aria-label` is only an override; the one hard rule is that the button must
277
279
  have a name from _one_ of the two.