bitboss-ui 3.0.0-beta.71 → 3.0.0-beta.73

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 (363) hide show
  1. package/README.md +2 -2
  2. package/bin/cli.mjs +9 -3
  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 +233 -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 +100 -13
  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 +242 -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 +72 -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 +152 -11
  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 +241 -199
  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 +1997 -1151
  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/utilities/functions/hash.js +90 -3
  347. package/dist/utilities/functions/isEqual.js +61 -3
  348. package/dist/utils/versionCheck.js +1 -1
  349. package/dist/vite.js +0 -1
  350. package/llms.txt +2 -2
  351. package/package.json +12 -2
  352. package/scripts/README.md +43 -39
  353. package/scripts/lib/adoption-checklist.json +2 -2
  354. package/scripts/lib/eslint-disable.mjs +5 -3
  355. package/scripts/lib/eslint-plugin.d.ts +2 -0
  356. package/scripts/lib/eslint-plugin.mjs +213 -1
  357. package/scripts/lib/helpers-add.mjs +21 -2
  358. package/scripts/lib/redundant-item-accessor.mjs +4 -1
  359. package/scripts/lib/release-results.mjs +180 -5
  360. package/scripts/lib/renamed-item-field.mjs +4 -1
  361. package/scripts/lib/tab-links.mjs +4 -1
  362. package/scripts/lib/tree-default-expandable.mjs +53 -0
  363. package/scripts/lib/validate-bb-markup.mjs +536 -52
@@ -79,6 +79,13 @@ needs is declared here, not in markup:
79
79
  - **`key`** extracts the cell from the item; dot paths reach nested fields
80
80
  (`'customer.address.city'`). Keys autocomplete from the item type (up to 3
81
81
  levels deep), but any string is accepted — that is how virtual columns work.
82
+ Columns written inline in `:columns` are checked per key: a dotted key past
83
+ a real field must exist, `actions` / `select` fail, and `formatter` reads
84
+ the field's type. Columns declared in script keep that check written
85
+ `[...] satisfies Array<BbTableColumn<Row>>` (also inside `ref(…)` or
86
+ `computed(() => …)`); an annotation (`const columns: BbTableColumn<Row>[]`)
87
+ widens every key to `string` and turns it off. The `bitboss-ui/table-columns-satisfies`
88
+ ESLint rule rewrites it.
82
89
  - **`formatter(content, key, item)`** transforms the extracted value. It runs
83
90
  even when the value is nullish, so a virtual column whose `key` matches no
84
91
  field can still compute from `item`; set `formatOnNull: false` when a
@@ -174,7 +181,7 @@ const euro = new Intl.NumberFormat('en-IE', {
174
181
  });
175
182
 
176
183
  // `placeholder` fills in when a cell resolves to nullish.
177
- const columns: Array<BbTableColumn<Invoice>> = [
184
+ const columns = [
178
185
  { key: 'number', label: 'Invoice', width: 110 },
179
186
  { key: 'client', label: 'Client' },
180
187
  {
@@ -191,7 +198,7 @@ const columns: Array<BbTableColumn<Invoice>> = [
191
198
  width: 110,
192
199
  formatter: euro.format,
193
200
  },
194
- ];
201
+ ] satisfies Array<BbTableColumn<Invoice>>;
195
202
 
196
203
  const invoices: Invoice[] = [
197
204
  {
@@ -326,14 +333,15 @@ const belowLg = breakpoints.smaller('lg');
326
333
  const belowXl = breakpoints.smaller('xl');
327
334
 
328
335
  const columns = computed(
329
- (): Array<BbTableColumn<Order>> => [
330
- { key: 'reference', label: 'Order', rowHeader: true },
331
- { key: 'customer', label: 'Customer', hidden: isMobile.value },
332
- { key: 'placedAt', label: 'Placed', hidden: belowLg.value },
333
- { key: 'channel', label: 'Channel', hidden: belowXl.value },
334
- { key: 'status', label: 'Status' },
335
- { key: 'total', label: 'Total', align: 'right' },
336
- ]
336
+ () =>
337
+ [
338
+ { key: 'reference', label: 'Order', rowHeader: true },
339
+ { key: 'customer', label: 'Customer', hidden: isMobile.value },
340
+ { key: 'placedAt', label: 'Placed', hidden: belowLg.value },
341
+ { key: 'channel', label: 'Channel', hidden: belowXl.value },
342
+ { key: 'status', label: 'Status' },
343
+ { key: 'total', label: 'Total', align: 'right' },
344
+ ] satisfies Array<BbTableColumn<Order>>
337
345
  );
338
346
  </script>
339
347
 
@@ -390,8 +398,8 @@ warns on a loop over keys it cannot see (`#[column.key]` over a prop) until
390
398
  the name goes through `slotKey`. Keep the column in `columns`
391
399
  even when you fully slot it: label, alignment and width still come from there.
392
400
 
393
- Body cell scope: `content` (the formatted value), `item` (raw row), `value`
394
- (resolved via `item-value`), `classes`, plus the row's interaction surface —
401
+ Body cell scope: `content` (this cell, formatted), `item` (raw row), `value`
402
+ (the row's `item-value`, e.g. its id — not this cell), `classes`, plus the row's interaction surface —
395
403
  `selected` / `toggleSelected`, `highlighted` / `toggleHighlighted`,
396
404
  `expanded` / `toggleExpanded` / `expandProps`, and `sortOrder`. The flags are
397
405
  one-way state; the `toggle*` callbacks are the write path.
@@ -479,12 +487,12 @@ type Invoice = {
479
487
  amount: string;
480
488
  };
481
489
 
482
- const columns: Array<BbTableColumn<Invoice>> = [
490
+ const columns = [
483
491
  { key: 'number', label: 'Invoice', width: 110 },
484
492
  { key: 'client', label: 'Client' },
485
493
  { key: 'status', label: 'Status', width: 120 },
486
494
  { key: 'amount', label: 'Amount', align: 'right', width: 110 },
487
- ];
495
+ ] satisfies Array<BbTableColumn<Invoice>>;
488
496
 
489
497
  const labels: Record<Status, string> = {
490
498
  paid: 'Paid',
@@ -658,7 +666,7 @@ type Invoice = {
658
666
  amount: number;
659
667
  };
660
668
 
661
- const columns: Array<BbTableColumn<Invoice>> = [
669
+ const columns = [
662
670
  { key: 'client', label: 'Client', fixed: 'left' },
663
671
  { key: 'project', label: 'Project' },
664
672
  { key: 'hours', label: 'Hours', align: 'right' },
@@ -668,7 +676,7 @@ const columns: Array<BbTableColumn<Invoice>> = [
668
676
  align: 'right',
669
677
  formatter: (value) => euro(value as number),
670
678
  },
671
- ];
679
+ ] satisfies Array<BbTableColumn<Invoice>>;
672
680
 
673
681
  const clients = ['Northwind Traders', 'Globex', 'Initech', 'Umbrella', 'Hooli'];
674
682
  const projects = ['Website', 'Mobile app', 'Audit', 'Support', 'Migration'];
@@ -791,11 +799,11 @@ type Member = { id: string; name: string; email: string; role: string };
791
799
 
792
800
  // `skeleton` shapes each column's placeholder while `loading` is true so the
793
801
  // skeleton mirrors the real content (avatar + text, a badge, plain text).
794
- const columns: Array<BbTableColumn<Member>> = [
802
+ const columns = [
795
803
  { key: 'name', label: 'Name', skeleton: 'avatar-text' },
796
804
  { key: 'email', label: 'Email' },
797
805
  { key: 'role', label: 'Role', skeleton: 'badge', width: 90 },
798
- ];
806
+ ] satisfies Array<BbTableColumn<Member>>;
799
807
 
800
808
  const members: Member[] = [
801
809
  { id: 'u1', name: 'Ada Lovelace', email: 'ada@acme.io', role: 'Admin' },
@@ -884,11 +892,11 @@ import type { BbTableColumn } from 'bitboss-ui';
884
892
 
885
893
  type Invoice = { id: string; number: string; client: string; amount: string };
886
894
 
887
- const columns: Array<BbTableColumn<Invoice>> = [
895
+ const columns = [
888
896
  { key: 'number', label: 'Invoice', width: 110 },
889
897
  { key: 'client', label: 'Client' },
890
898
  { key: 'amount', label: 'Amount', align: 'right', width: 100 },
891
- ];
899
+ ] satisfies Array<BbTableColumn<Invoice>>;
892
900
 
893
901
  const catalogue: Invoice[] = [
894
902
  {
@@ -1090,11 +1098,11 @@ import type { BbTableColumn } from 'bitboss-ui';
1090
1098
 
1091
1099
  type Invoice = { id: string; number: string; client: string; amount: string };
1092
1100
 
1093
- const columns: Array<BbTableColumn<Invoice>> = [
1101
+ const columns = [
1094
1102
  { key: 'number', label: 'Invoice', width: 110 },
1095
1103
  { key: 'client', label: 'Client' },
1096
1104
  { key: 'amount', label: 'Amount', align: 'right', width: 100 },
1097
- ];
1105
+ ] satisfies Array<BbTableColumn<Invoice>>;
1098
1106
 
1099
1107
  const invoices: Invoice[] = Array.from({ length: 13 }, (_, index) => ({
1100
1108
  id: String(index + 1),
@@ -1190,7 +1198,7 @@ const euro = new Intl.NumberFormat('en-IE', {
1190
1198
  currency: 'EUR',
1191
1199
  });
1192
1200
 
1193
- const columns: Array<BbTableColumn<Invoice>> = [
1201
+ const columns = [
1194
1202
  { key: 'number', label: 'Invoice', sortable: true, width: 110 },
1195
1203
  { key: 'client', label: 'Client', sortable: true },
1196
1204
  {
@@ -1201,7 +1209,7 @@ const columns: Array<BbTableColumn<Invoice>> = [
1201
1209
  width: 110,
1202
1210
  formatter: euro.format,
1203
1211
  },
1204
- ];
1212
+ ] satisfies Array<BbTableColumn<Invoice>>;
1205
1213
 
1206
1214
  const invoices: Invoice[] = [
1207
1215
  { id: '1', number: 'INV-1041', client: 'Northwind Traders', amount: 4200 },
@@ -1319,18 +1327,20 @@ the lock in place.
1319
1327
  @update:model-value="setHidden(column.key, !$event)"
1320
1328
  />
1321
1329
  <BbButton
1322
- :aria-label="`Move ${column.label} left`"
1323
1330
  :disabled="index === 0"
1324
- icon="lucide:chevron-left"
1331
+ icon-only
1332
+ prepend:icon="lucide:chevron-left"
1325
1333
  size="xs"
1334
+ :text="`Move ${column.label} left`"
1326
1335
  variant="ghost"
1327
1336
  @click="move(column.key, -1)"
1328
1337
  />
1329
1338
  <BbButton
1330
- :aria-label="`Move ${column.label} right`"
1331
1339
  :disabled="index === panelColumns.length - 1"
1332
- icon="lucide:chevron-right"
1340
+ icon-only
1341
+ prepend:icon="lucide:chevron-right"
1333
1342
  size="xs"
1343
+ :text="`Move ${column.label} right`"
1334
1344
  variant="ghost"
1335
1345
  @click="move(column.key, 1)"
1336
1346
  />
@@ -1354,9 +1364,10 @@ the lock in place.
1354
1364
  is what brings a column back. -->
1355
1365
  <template #header:append="{ hideColumn, label }">
1356
1366
  <BbButton
1357
- :aria-label="`Hide ${label}`"
1358
- icon="lucide:eye-off"
1367
+ icon-only
1368
+ prepend:icon="lucide:eye-off"
1359
1369
  size="xs"
1370
+ :text="`Hide ${label}`"
1360
1371
  variant="ghost"
1361
1372
  @click="hideColumn"
1362
1373
  />
@@ -1388,7 +1399,7 @@ const euro = new Intl.NumberFormat('en-IE', {
1388
1399
  });
1389
1400
 
1390
1401
  // The declaration: what a column IS. Never reordered, never filtered.
1391
- const definitions: Array<BbTableColumn<Invoice>> = [
1402
+ const definitions = [
1392
1403
  { key: 'number', label: 'Invoice', width: 110 },
1393
1404
  { key: 'client', label: 'Client' },
1394
1405
  { key: 'issued', label: 'Issued', width: 110 },
@@ -1399,7 +1410,7 @@ const definitions: Array<BbTableColumn<Invoice>> = [
1399
1410
  width: 110,
1400
1411
  formatter: euro.format,
1401
1412
  },
1402
- ];
1413
+ ] satisfies Array<BbTableColumn<Invoice>>;
1403
1414
 
1404
1415
  const invoices: Invoice[] = [
1405
1416
  {
@@ -1466,7 +1477,7 @@ const setHidden = (key: string, value: boolean) => {
1466
1477
  };
1467
1478
 
1468
1479
  const move = (key: string, delta: 1 | -1) => {
1469
- const next = panelColumns.value.map((column) => column.key);
1480
+ const next: string[] = panelColumns.value.map((column) => column.key);
1470
1481
  const from = next.indexOf(key);
1471
1482
  const to = from + delta;
1472
1483
  if (from < 0 || to < 0 || to >= next.length) return;
@@ -1599,11 +1610,11 @@ import type { BbTableColumn } from 'bitboss-ui';
1599
1610
 
1600
1611
  type Member = { id: string; name: string; email: string; role: string };
1601
1612
 
1602
- const columns: Array<BbTableColumn<Member>> = [
1613
+ const columns = [
1603
1614
  { key: 'name', label: 'Name' },
1604
1615
  { key: 'email', label: 'Email' },
1605
1616
  { key: 'role', label: 'Role', width: 90 },
1606
- ];
1617
+ ] satisfies Array<BbTableColumn<Member>>;
1607
1618
 
1608
1619
  const members = ref<Member[]>([
1609
1620
  { id: 'u1', name: 'Ada Lovelace', email: 'ada@acme.io', role: 'Admin' },
@@ -1646,8 +1657,8 @@ const removeSelected = async () => {
1646
1657
  title: `Delete ${ids.length} ${ids.length === 1 ? 'member' : 'members'}?`,
1647
1658
  text: 'They will lose access to this workspace immediately.',
1648
1659
  variant: 'destructive',
1649
- yes: { text: 'Delete', 'prepend:icon': 'lucide:trash-2' },
1650
- no: 'Cancel',
1660
+ ok: { text: 'Delete', 'prepend:icon': 'lucide:trash-2' },
1661
+ cancel: 'Cancel',
1651
1662
  });
1652
1663
  if (!ok) return;
1653
1664
  members.value = members.value.filter((member) => !ids.includes(member.id));
@@ -1764,11 +1775,11 @@ const roleFilters: Array<{ label: string; value: RoleFilter }> = [
1764
1775
  { label: 'Editors', value: 'Editor' },
1765
1776
  ];
1766
1777
 
1767
- const columns: Array<BbTableColumn<Member>> = [
1778
+ const columns = [
1768
1779
  { key: 'name', label: 'Name' },
1769
1780
  { key: 'email', label: 'Email' },
1770
1781
  { key: 'role', label: 'Role', width: 90 },
1771
- ];
1782
+ ] satisfies Array<BbTableColumn<Member>>;
1772
1783
 
1773
1784
  const directory: Member[] = [
1774
1785
  { id: 'u1', name: 'Ada Lovelace', email: 'ada@acme.io', role: 'Admin' },
@@ -1857,11 +1868,11 @@ import type { BbTableColumn } from 'bitboss-ui';
1857
1868
 
1858
1869
  type Plan = { id: string; name: string; seats: string; price: string };
1859
1870
 
1860
- const columns: Array<BbTableColumn<Plan>> = [
1871
+ const columns = [
1861
1872
  { key: 'name', label: 'Plan' },
1862
1873
  { key: 'seats', label: 'Seats', width: 110 },
1863
1874
  { key: 'price', label: 'Price / month', align: 'right', width: 120 },
1864
- ];
1875
+ ] satisfies Array<BbTableColumn<Plan>>;
1865
1876
 
1866
1877
  const plans: Plan[] = [
1867
1878
  { id: 'starter', name: 'Starter', seats: 'Up to 3', price: '€0' },
@@ -1962,11 +1973,11 @@ type Invoice = {
1962
1973
  lines: number;
1963
1974
  };
1964
1975
 
1965
- const columns: Array<BbTableColumn<Invoice>> = [
1976
+ const columns = [
1966
1977
  { key: 'number', label: 'Invoice', width: 110 },
1967
1978
  { key: 'client', label: 'Client' },
1968
1979
  { key: 'amount', label: 'Amount', align: 'right', width: 100 },
1969
- ];
1980
+ ] satisfies Array<BbTableColumn<Invoice>>;
1970
1981
 
1971
1982
  const invoices: Invoice[] = [
1972
1983
  {
@@ -2025,8 +2036,9 @@ is, and the actions column stays for actions.
2025
2036
  <span class="table-identity">
2026
2037
  <BbButton
2027
2038
  v-bind="expandProps"
2028
- :aria-label="expanded ? `Collapse ${content}` : `Expand ${content}`"
2029
- :icon="expanded ? 'lucide:chevron-down' : 'lucide:chevron-right'"
2039
+ :text="expanded ? `Collapse ${content}` : `Expand ${content}`"
2040
+ icon-only
2041
+ :prepend:icon="expanded ? 'lucide:chevron-down' : 'lucide:chevron-right'"
2030
2042
  size="xs"
2031
2043
  variant="ghost"
2032
2044
  />
@@ -2120,11 +2132,11 @@ type Ticket = {
2120
2132
  due: string;
2121
2133
  };
2122
2134
 
2123
- const columns: Array<BbTableColumn<Ticket>> = [
2135
+ const columns = [
2124
2136
  { key: 'subject', label: 'Ticket' },
2125
2137
  { key: 'customer', label: 'Customer' },
2126
2138
  { key: 'due', label: 'Due' },
2127
- ];
2139
+ ] satisfies Array<BbTableColumn<Ticket>>;
2128
2140
 
2129
2141
  const queue: Ticket[] = [
2130
2142
  {
@@ -2335,11 +2347,11 @@ import type { BbTableColumn } from 'bitboss-ui';
2335
2347
 
2336
2348
  type Invoice = { id: string; number: string; client: string; amount: number };
2337
2349
 
2338
- const base: Array<BbTableColumn<Invoice>> = [
2350
+ const base = [
2339
2351
  { key: 'number', label: 'Invoice' },
2340
2352
  { key: 'client', label: 'Client' },
2341
2353
  { key: 'amount', label: 'Amount', align: 'right' },
2342
- ];
2354
+ ] satisfies Array<BbTableColumn<Invoice>>;
2343
2355
  // Persist THIS (localStorage, a user preference…): key → px.
2344
2356
  const widths = ref<Record<string, number>>({});
2345
2357
  // The definition carries the persisted widths; the table treats them as the
@@ -2488,17 +2500,17 @@ type Invoice = {
2488
2500
  lines: Line[];
2489
2501
  };
2490
2502
 
2491
- const columns: Array<BbTableColumn<Invoice>> = [
2503
+ const columns = [
2492
2504
  { key: 'number', label: 'Invoice', width: 110 },
2493
2505
  { key: 'client', label: 'Client' },
2494
2506
  { key: 'amount', label: 'Amount', align: 'right', width: 100 },
2495
- ];
2507
+ ] satisfies Array<BbTableColumn<Invoice>>;
2496
2508
 
2497
- const lineColumns: Array<BbTableColumn<Line>> = [
2509
+ const lineColumns = [
2498
2510
  { key: 'description', label: 'Description' },
2499
2511
  { key: 'qty', label: 'Qty', width: 60 },
2500
2512
  { key: 'amount', label: 'Amount', align: 'right', width: 100 },
2501
- ];
2513
+ ] satisfies Array<BbTableColumn<Line>>;
2502
2514
 
2503
2515
  const invoices: Invoice[] = [
2504
2516
  {
@@ -2766,11 +2778,11 @@ import type { BbTableColumn } from 'bitboss-ui';
2766
2778
 
2767
2779
  type Invoice = { id: string; number: string; client: string; amount: string };
2768
2780
 
2769
- const columns: Array<BbTableColumn<Invoice>> = [
2781
+ const columns = [
2770
2782
  { key: 'number', label: 'Invoice', width: 110 },
2771
2783
  { key: 'client', label: 'Client' },
2772
2784
  { key: 'amount', label: 'Amount', align: 'right', width: 100 },
2773
- ];
2785
+ ] satisfies Array<BbTableColumn<Invoice>>;
2774
2786
 
2775
2787
  const invoices: Invoice[] = [
2776
2788
  {
@@ -2884,11 +2896,11 @@ import type { BbTableColumn } from 'bitboss-ui';
2884
2896
 
2885
2897
  type AuditEvent = { id: string; time: string; actor: string; action: string };
2886
2898
 
2887
- const columns: Array<BbTableColumn<AuditEvent>> = [
2899
+ const columns = [
2888
2900
  { key: 'time', label: 'Time', width: 70 },
2889
2901
  { key: 'actor', label: 'Actor' },
2890
2902
  { key: 'action', label: 'Action' },
2891
- ];
2903
+ ] satisfies Array<BbTableColumn<AuditEvent>>;
2892
2904
 
2893
2905
  const events: AuditEvent[] = [
2894
2906
  { id: 'e1', time: '09:12', actor: 'ada@acme.io', action: 'Created API key' },
@@ -2983,11 +2995,11 @@ import type { BbTableColumn } from 'bitboss-ui';
2983
2995
 
2984
2996
  type Invoice = { id: string; number: string; client: string; amount: string };
2985
2997
 
2986
- const columns: Array<BbTableColumn<Invoice>> = [
2998
+ const columns = [
2987
2999
  { key: 'number', label: 'Invoice', width: 110 },
2988
3000
  { key: 'client', label: 'Client' },
2989
3001
  { key: 'amount', label: 'Amount', align: 'right', width: 100 },
2990
- ];
3002
+ ] satisfies Array<BbTableColumn<Invoice>>;
2991
3003
 
2992
3004
  const invoices: Invoice[] = [
2993
3005
  {
@@ -3021,6 +3033,114 @@ instead of an inert `href`:
3021
3033
  </template>
3022
3034
  ```
3023
3035
 
3036
+ ### Row context menu: `row-menu`
3037
+
3038
+ `:row-menu="(item) => items"` gives every data row a context menu: one
3039
+ shared `BbDropdown` opened at the pointer by a right-click or a long press
3040
+ on touch, and under the focused cell by Shift+F10 or the Menu key. The items
3041
+ are `BbDropdown` items, built for the row they open on.
3042
+
3043
+ - Never on an in-row control: a right-click on a cell link or button keeps
3044
+ the browser's menu.
3045
+ - No visible item for a row (all `hidden`, or `[]`): the browser's menu
3046
+ shows.
3047
+ - The row the menu is open on gets the `bb-table__row--menu` fill;
3048
+ `v-model:highlighted` is untouched.
3049
+ - `contextmenu:row` still fires first. Call `event.preventDefault()` there to
3050
+ take the gesture yourself.
3051
+
3052
+ A right-click is invisible: give everyone the same menu as a visible button
3053
+ by reusing the function in `#actions` (there is no automatic column).
3054
+
3055
+ **One function, two menus**
3056
+
3057
+ ```vue
3058
+ <template>
3059
+ <!-- One function feeds both menus: right-click (long press, Shift+F10) on a
3060
+ row, and the visible ⋯ button the actions column gives everyone else. -->
3061
+ <div
3062
+ class="max-w-2xl overflow-hidden rounded-(--bb-radius) border border-(--bb-border)"
3063
+ >
3064
+ <BbTable
3065
+ actions-text="Actions"
3066
+ caption="Invoices"
3067
+ :columns="columns"
3068
+ compact
3069
+ item-value="id"
3070
+ :items="invoices"
3071
+ :row-menu="menu"
3072
+ >
3073
+ <template #actions="{ item }">
3074
+ <BbButton
3075
+ v-bb-dropdown="menu(item)"
3076
+ icon-only
3077
+ prepend:icon="lucide:ellipsis"
3078
+ size="xs"
3079
+ text="Invoice actions"
3080
+ variant="ghost"
3081
+ />
3082
+ </template>
3083
+ </BbTable>
3084
+ <p class="p-2 text-xs text-(--bb-text-muted)" data-last>{{ last }}</p>
3085
+ </div>
3086
+ </template>
3087
+ <script setup lang="ts">
3088
+ import { ref } from 'vue';
3089
+ import { BbButton, BbTable } from 'bitboss-ui';
3090
+ import type { BbDropdownItem, BbTableColumn } from 'bitboss-ui';
3091
+
3092
+ type Invoice = {
3093
+ id: string;
3094
+ number: string;
3095
+ client: string;
3096
+ amount: string;
3097
+ paid: boolean;
3098
+ };
3099
+
3100
+ const last = ref('Right-click a row');
3101
+
3102
+ const menu = (invoice: Invoice): BbDropdownItem[] => [
3103
+ {
3104
+ value: 'open',
3105
+ label: 'Open',
3106
+ 'prepend:icon': 'lucide:arrow-right',
3107
+ href: `#invoice-${invoice.id}`,
3108
+ },
3109
+ {
3110
+ value: 'remind',
3111
+ label: 'Send reminder',
3112
+ 'prepend:icon': 'lucide:mail',
3113
+ // A paid invoice has nothing to remind: the row hides it.
3114
+ hidden: invoice.paid,
3115
+ onClick: () => (last.value = `Reminder sent for ${invoice.number}`),
3116
+ },
3117
+ ];
3118
+
3119
+ const columns = [
3120
+ { key: 'number', label: 'Invoice', width: 110 },
3121
+ { key: 'client', label: 'Client' },
3122
+ { key: 'amount', label: 'Amount', align: 'right', width: 100 },
3123
+ ] satisfies Array<BbTableColumn<Invoice>>;
3124
+
3125
+ const invoices: Invoice[] = [
3126
+ {
3127
+ id: '1041',
3128
+ number: 'INV-1041',
3129
+ client: 'Northwind Traders',
3130
+ amount: '€4,200',
3131
+ paid: false,
3132
+ },
3133
+ {
3134
+ id: '1042',
3135
+ number: 'INV-1042',
3136
+ client: 'Globex',
3137
+ amount: '€980',
3138
+ paid: true,
3139
+ },
3140
+ ];
3141
+ </script>
3142
+ ```
3143
+
3024
3144
  ### Inline editing
3025
3145
 
3026
3146
  Cells can edit in place — no edit page, no modal. Two commit grammars, one
@@ -3139,11 +3259,11 @@ const VARIANT: Record<Status, BadgeVariantType> = {
3139
3259
  done: 'soft-green',
3140
3260
  };
3141
3261
 
3142
- const columns: Array<BbTableColumn<Task>> = [
3262
+ const columns = [
3143
3263
  { key: 'ref', label: 'Ref', width: 90 },
3144
3264
  { key: 'title', label: 'Title' },
3145
3265
  { key: 'status', label: 'Status', width: 140 },
3146
- ];
3266
+ ] satisfies Array<BbTableColumn<Task>>;
3147
3267
 
3148
3268
  /* Fake server, deterministic: BB-121 always rejects. */
3149
3269
 
@@ -3500,12 +3620,12 @@ type Entry = {
3500
3620
  amount: string;
3501
3621
  };
3502
3622
 
3503
- const columns: Array<BbTableColumn<Entry>> = [
3623
+ const columns = [
3504
3624
  { key: 'number', label: 'Invoice', fixed: 'left' },
3505
3625
  { key: 'client', label: 'Client' },
3506
3626
  { key: 'issued', label: 'Issued' },
3507
3627
  { key: 'amount', label: 'Amount', align: 'right' },
3508
- ];
3628
+ ] satisfies Array<BbTableColumn<Entry>>;
3509
3629
 
3510
3630
  const clients = ['Northwind Traders', 'Globex', 'Initech', 'Umbrella', 'Hooli'];
3511
3631
  const rows: Entry[] = Array.from({ length: 5000 }, (_, i) => ({
@@ -3586,11 +3706,11 @@ type Person = { id: number; name: string; email: string | null; city: string };
3586
3706
  const blank = (value: unknown) =>
3587
3707
  typeof value === 'string' && value.trim() === '' ? null : value;
3588
3708
 
3589
- const columns: Array<BbTableColumn<Person>> = [
3709
+ const columns = [
3590
3710
  { key: 'name', label: 'Nome' },
3591
3711
  { key: 'email', label: 'Email', placeholder: 'N/D' },
3592
3712
  { key: 'city', label: 'Provincia', placeholder: '–', formatter: blank },
3593
- ];
3713
+ ] satisfies Array<BbTableColumn<Person>>;
3594
3714
 
3595
3715
  const people: Person[] = [
3596
3716
  { id: 1, name: 'Giulia Bianchi', email: null, city: 'Milano' },
@@ -3870,11 +3990,11 @@ import type { BbTableColumn } from 'bitboss-ui';
3870
3990
 
3871
3991
  type Invoice = { id: string; number: string; client: string; amount: string };
3872
3992
 
3873
- const columns: Array<BbTableColumn<Invoice>> = [
3993
+ const columns = [
3874
3994
  { key: 'number', label: 'Invoice', width: 110 },
3875
3995
  { key: 'client', label: 'Client' },
3876
3996
  { key: 'amount', label: 'Amount', align: 'right', width: 100 },
3877
- ];
3997
+ ] satisfies Array<BbTableColumn<Invoice>>;
3878
3998
 
3879
3999
  const invoices: Invoice[] = [
3880
4000
  {
@@ -3953,10 +4073,10 @@ type Invoice = {
3953
4073
  note: string;
3954
4074
  };
3955
4075
 
3956
- const columns: Array<BbTableColumn<Invoice>> = [
4076
+ const columns = [
3957
4077
  { key: 'number', label: 'Invoice', width: 110, sortable: true },
3958
4078
  { key: 'client', label: 'Client', sortable: true },
3959
- ];
4079
+ ] satisfies Array<BbTableColumn<Invoice>>;
3960
4080
 
3961
4081
  const invoices: Invoice[] = [
3962
4082
  {
@@ -4051,12 +4171,12 @@ type Invoice = {
4051
4171
  status: 'paid' | 'open' | 'overdue';
4052
4172
  };
4053
4173
 
4054
- const columns: Array<BbTableColumn<Invoice>> = [
4174
+ const columns = [
4055
4175
  { key: 'number', label: 'Invoice', width: 110 },
4056
4176
  { key: 'client', label: 'Client' },
4057
4177
  { key: 'status', label: 'Status', width: 100 },
4058
4178
  { key: 'amount', label: 'Amount', align: 'right', width: 100 },
4059
- ];
4179
+ ] satisfies Array<BbTableColumn<Invoice>>;
4060
4180
 
4061
4181
  const invoices: Invoice[] = [
4062
4182
  {
@@ -4175,6 +4295,8 @@ for a preset that fits any row type (never `<any>`), not an imported
4175
4295
  - Pre-mapping items into `{ label, value }` — pass domain objects +
4176
4296
  `item-value`.
4177
4297
  - `@click:row` + `router.push` for navigation — render a real `BbButton` link.
4298
+ - A `BbDropdown` per row, or `@contextmenu:row` opening a menu by hand, for a
4299
+ right-click menu — that's `row-menu`.
4178
4300
  - Rebuilding selection controls in a cell slot — use `selectable`, the
4179
4301
  `#select` slot, or the scope's `toggleSelected`.
4180
4302
  - Mutating slot-scope flags (`expanded`, `selected`, `highlighted`) — they are
@@ -4256,8 +4378,8 @@ for a preset that fits any row type (never `<any>`), not an imported
4256
4378
  ## v-model
4257
4379
 
4258
4380
  - `v-model:expandedItems` — type: `any[] \| undefined`
4259
- - `v-model:highlighted` — type: `any`
4260
- - `v-model` — type: `any`
4381
+ - `v-model:highlighted` — type: `TableValueOf<Item, A> \| null`
4382
+ - `v-model` — type: `SelectModelOf<TableValueOf<Item, A>, M>`
4261
4383
  - `v-model:order` — type: `string[] \| undefined`
4262
4384
  - `v-model:selectAll` — type: `boolean \| undefined`
4263
4385
  - `v-model:sort` — type: `BbTableSortEntry[] \| undefined`
@@ -4291,7 +4413,7 @@ for a preset that fits any row type (never `<any>`), not an imported
4291
4413
  | `fixedSelect` | `boolean \| undefined` | `false` | | Pins the selection column to the left edge, `position: sticky`, in place. It has no column definition, so this is its `column.fixed`. No effect unless the table is `selectable`. |
4292
4414
  | `headerRowClass` | `Classes \| undefined` | | | Classes for the header row. |
4293
4415
  | `highlightable` | `boolean \| ((item: Item) => boolean) \| undefined` | `undefined` | | Which rows a click, Enter or `toggleHighlighted` may highlight: `false` for none, or a function of the row's item. Unset: every row, when `highlighted` is bound. A value the app sets still shows on a refused row. |
4294
- | `highlighted` | `any` | `undefined` | | Used by `v-model:highlighted`: the one row the UI is about (say, whose details are open), a single item value or `null`. Opt-in: bound, a row click highlights; unbound, it only emits `click:row`. The row gets `aria-current="true"` and a shipped tint. |
4416
+ | `highlighted` | `any` | ``undefined` (unset: whether it is bound is read off it)` | | Used by `v-model:highlighted`: the one row the UI is about (say, whose details are open), a single item value or `null`. Opt-in: bound, a row click highlights; unbound, it only emits `click:row`. The row gets `aria-current="true"` and a shipped tint. |
4295
4417
  | `id` | `string \| undefined` | | | Stable id for this table's width context. When omitted a unique id is generated. Nested tables use the nearest ancestor id to inherit widths. |
4296
4418
  | `inheritColumnWidths` | `string \| boolean \| undefined` | | | Snaps a nested table's columns to an ancestor table's tracks: `true` = the nearest one, a table `id` = that one (when a table in between has a different column count). Off by default: a nested table sizes itself. |
4297
4419
  | `interactiveWhileLoading` | `boolean \| undefined` | `false` | | Keeps the header and rows interactive while loading (by default they are `inert`: a refetch is about to replace them). For background refreshes that must not interrupt an open editor. |
@@ -4314,6 +4436,7 @@ for a preset that fits any row type (never `<any>`), not an imported
4314
4436
  | `reorderableRows` | `boolean \| undefined` | `false` | | Adds a drag handle at the start of each row: the user drags a row, or lifts it with Space / Enter and the arrow keys, and `reorder:rows` reports `{ item, from, to }`. The table never reorders `items`: splice it in the handler. |
4315
4437
  | `resizable` | `boolean \| undefined` | `false` | | Lets the user resize the data columns (drag a header's trailing edge, or Alt+←/→; double-click resets). Each commit fires `resize:column(key, width)` once: write the width back into the column definition to keep it. Ignored when inheriting widths. |
4316
4438
  | `rowClass` | `BbTableRowClasses<Item> \| undefined` | | | Classes for each data row, or a function of the row's item. |
4439
+ | `rowMenu` | `((item: Item) => Item[]) \| undefined` | | | A row's context menu: right-click, a long press on touch, or Shift+F10 / the Menu key on a focused row open one shared menu with these items. Never on an in-row control; with no visible item the browser's menu shows. Reuse it for the visible `#actions` menu. |
4317
4440
  | `selectable` | `boolean \| ((item: Item) => boolean) \| undefined` | | | Makes rows selectable: a boolean for every row, or a function of the row's item deciding for that row. |
4318
4441
  | `selectAll` | `boolean \| undefined` | `false` | | Whether the "Select all" checkbox is checked. |
4319
4442
  | `selectAllLabel` | `string \| undefined` | | | Label of the "Select all" checkbox. |
@@ -4372,17 +4495,17 @@ States are listed in precedence order: when two are on at once and their entries
4372
4495
  - `contextmenu:row` — `(event: MouseEvent, item: Item): void` — A body row was right-clicked. Carries the DOM `MouseEvent` and the raw record.
4373
4496
  - `dblclick:row` — `(event: MouseEvent, item: Item): void` — A body row was double-clicked. Carries the DOM `MouseEvent` and the raw record.
4374
4497
  - `hide:column` — `(key: string): void` — A column was hidden through a header slot's `hideColumn()`. Fired once; write `hidden: true` into the column definition to persist it.
4375
- - `item:selected` — `(value: any): void` — The user selected one row. Carries the row's value (read through `itemValue`, the same value the selection v-model holds).
4376
- - `item:unselected` — `(value: any): void` — The user unselected one row. Carries the row's value, like `item:selected`.
4498
+ - `item:selected` — `(value: TableValueOf<Item, A>): void` — The user selected one row. Carries the row's value (read through `itemValue`, the same value the selection v-model holds).
4499
+ - `item:unselected` — `(value: TableValueOf<Item, A>): void` — The user unselected one row. Carries the row's value, like `item:selected`.
4377
4500
  - `reorder:rows` — `(payload: { item: Item; from: number; to: number; }): void` — A row was moved (`reorderable-rows`): `item` is your object, `from` / `to` index the `items` the table holds. Splice `items` in the handler; a drop in place emits nothing.
4378
4501
  - `resize:column` — `(key: string, width: number \| null): void` — The user resized a column (`resizable`): the new width in px, or `null` after a double-click on the handle reset it to its declared width.
4379
- - `update:expandedItems` — `(value: any[]): void` — Emitted with the new value whenever `v-model:expandedItems` changes.
4380
- - `update:highlighted` — `(value: any): void` — Emitted with the new value whenever `v-model:highlighted` changes.
4381
- - `update:modelValue` — `(value: any): void` — Emitted with the new value whenever `v-model` changes.
4502
+ - `update:expandedItems` — `(value: TableValueOf<Item, A>[]): void` — Emitted with the new value whenever `v-model:expandedItems` changes.
4503
+ - `update:highlighted` — `(value: TableValueOf<Item, A> \| null): void` — Emitted with the new value whenever `v-model:highlighted` changes.
4504
+ - `update:modelValue` — `(value: SelectModelOf<TableValueOf<Item, A>, M>): void` — Emitted with the new value whenever `v-model` changes.
4382
4505
  - `update:order` — `(value: string[]): void` — Emitted with the new value whenever `v-model:order` changes.
4383
4506
  - `update:selectAll` — `(value: boolean): void` — Emitted with the new value whenever `v-model:selectAll` changes.
4384
4507
  - `update:sort` — `(value: BbTableSortEntry[]): void` — Emitted with the new value whenever `v-model:sort` changes.
4385
- - `update:unselectedItems` — `(value: any[]): void` — Emitted with the new value whenever `v-model:unselectedItems` changes.
4508
+ - `update:unselectedItems` — `(value: TableValueOf<Item, A>[]): void` — Emitted with the new value whenever `v-model:unselectedItems` changes.
4386
4509
 
4387
4510
  ## Slots
4388
4511
 
@@ -4393,12 +4516,12 @@ States are listed in precedence order: when two are on at once and their entries
4393
4516
  - `header:append` — scope: `BbTableHeaderAffixSlotProps<Item>` `{ classes?: Classes; columnKey: string; items?: Item[]; label?: string; sortable?: boolean; sortOrder?: "asc" \| "desc" \| null; toggleSort?: ((event?: MouseEvent \| KeyboardEvent \| undefined) => void); hideColumn?: (() => void) }` — Content after every data column's header content (the label + sort control, or its own `<key>:header` replacement). A column's `<key>:header:append` wins over this for that column; they never stack. Branch on `columnKey` for per-column output.
4394
4517
  - `header:prepend` — scope: `BbTableHeaderAffixSlotProps<Item>` `{ classes?: Classes; columnKey: string; items?: Item[]; label?: string; sortable?: boolean; sortOrder?: "asc" \| "desc" \| null; toggleSort?: ((event?: MouseEvent \| KeyboardEvent \| undefined) => void); hideColumn?: (() => void) }` — Content before every data column's header content (the label + sort control, or its own `<key>:header` replacement). A column's `<key>:header:prepend` wins over this for that column; they never stack. Branch on `columnKey` for per-column output.
4395
4518
  - `loading` — scope: `{ items: Item[]; }` — Content shown while table rows are loading (replaces the skeleton rows).
4396
- - `select` — scope: `{ item: Item; value: any; checked: boolean; disabled: boolean; inputName: string; readonly: boolean; toggleSelected?: (() => void) \| undefined; }` — Replaces the default checkbox/radio in the selection cell for each row.
4519
+ - `select` — scope: `{ item: Item; value: TableValueOf<Item, A>; checked: boolean; disabled: boolean; inputName: string; readonly: boolean; toggleSelected?: (() => void) \| undefine…` — Replaces the default checkbox/radio in the selection cell for each row.
4397
4520
  - `select:header` — scope: `{ multiple: boolean; selectAll: boolean; text: string; }` — Replaces the default selection header cell content (checkbox or radio label).
4398
4521
  - `tbody` — scope: `object` — Replaces the content of the body row group (`.bb-table__body`), for full control of the body markup. Provide role-complete rows (`<div role="row">` with one `<div role="cell">` per column), never `<tr>`/`<td>`. A full-width cell spans with `grid-column: 1 / -1`.
4399
4522
  - `tfoot` — scope: `{ columnCount: number; empty: boolean; }` — Fills the footer row group (`.bb-table__foot`) for footers that are not column-shaped (a note, pagination). Column-aligned totals go in `#<key>:last` (`#<key>:first` for a row before the data). Role-complete rows (`<div role="row">` of `<div role="cell">`), never `<tr>`/`<td>`.
4400
4523
  - `thead` — scope: `{ empty: boolean; }` — Replaces the header row group's content (`.bb-table__head`). The table is a CSS grid: provide `<div role="row">` rows of `<div role="columnheader">` cells, never `<tr>` / `<th>`.
4401
- - `#<key>` (named from data) — scope: `object` — One column's body cell in every row, by the column `key` through `slotKey`. Scope: `{ item, value, content, selected, expanded, highlighted, classes, sortOrder, toggleSelected, toggleExpanded, toggleHighlighted, expandProps }`. Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `actions`, `empty`, `expand`, `loading`, `select`, `tbody`, `tfoot`, `thead`.
4524
+ - `#<key>` (named from data) — scope: `object` — One column's body cell in every row, by the column `key` through `slotKey`. Scope: `{ item, value, content, selected, expanded, highlighted, classes, sortOrder, toggleSelected, toggleExpanded, toggleHighlighted, expandProps }`; `content` is this cell, `value` the row's `item-value`. Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `actions`, `empty`, `expand`, `loading`, `select`, `tbody`, `tfoot`, `thead`.
4402
4525
  - `#<key>:header` (named from data) — scope: `object` — One column's header content, replacing its label and the built-in sort button. Scope: `{ label, items, sortable, sortOrder, toggleSort, hideColumn, classes }`.
4403
4526
  - `#<key>:header:prepend` (named from data) — scope: `BbTableHeaderAffixSlotProps<Item>` — Content before one column's header, keeping the sort button; beats `header:prepend` (they never stack).
4404
4527
  - `#<key>:header:append` (named from data) — scope: `BbTableHeaderAffixSlotProps<Item>` — Content after one column's header, keeping the sort button; beats `header:append` (they never stack).