bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.64

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 (377) hide show
  1. package/README.md +25 -20
  2. package/bin/bitboss-ui.mjs +73 -7
  3. package/dist/ai/BbAlert.md +10 -1
  4. package/dist/ai/BbBadge.md +35 -3
  5. package/dist/ai/BbBadgeButton.md +4 -2
  6. package/dist/ai/BbBaseButton.md +9 -3
  7. package/dist/ai/BbBreadcrumbs.md +2 -2
  8. package/dist/ai/BbButton.md +113 -8
  9. package/dist/ai/BbCheckbox.md +1 -1
  10. package/dist/ai/BbCheckboxGroup.md +94 -6
  11. package/dist/ai/BbColorInput.md +4 -1
  12. package/dist/ai/BbColorPalette.md +2 -1
  13. package/dist/ai/BbConfirm.md +7 -3
  14. package/dist/ai/BbDatePicker.md +2 -1
  15. package/dist/ai/BbDatePickerInput.md +4 -1
  16. package/dist/ai/BbDialog.md +12 -11
  17. package/dist/ai/BbDropdown.md +189 -38
  18. package/dist/ai/BbDropdownButton.md +27 -7
  19. package/dist/ai/BbForm.md +55 -22
  20. package/dist/ai/BbHost.md +2 -2
  21. package/dist/ai/BbHoverCard.md +7 -3
  22. package/dist/ai/BbIcon.md +12 -6
  23. package/dist/ai/BbIndicator.md +11 -1
  24. package/dist/ai/BbNumberInput.md +4 -1
  25. package/dist/ai/BbOffCanvas.md +37 -3
  26. package/dist/ai/BbPopover.md +2 -1
  27. package/dist/ai/BbRadio.md +1 -1
  28. package/dist/ai/BbRadioGroup.md +102 -10
  29. package/dist/ai/BbSelect.md +52 -17
  30. package/dist/ai/BbSelectPopover.md +93 -26
  31. package/dist/ai/BbSwitch.md +1 -1
  32. package/dist/ai/BbSwitchGroup.md +30 -3
  33. package/dist/ai/BbTable.md +17 -10
  34. package/dist/ai/BbTabs.md +8 -3
  35. package/dist/ai/BbTabsList.md +4 -1
  36. package/dist/ai/BbTag.md +5 -2
  37. package/dist/ai/BbTextInput.md +4 -1
  38. package/dist/ai/BbTextarea.md +4 -1
  39. package/dist/ai/BbTimePicker.md +2 -1
  40. package/dist/ai/BbTimePickerInput.md +4 -1
  41. package/dist/ai/BbToast.md +9 -3
  42. package/dist/ai/BbTooltip.md +71 -9
  43. package/dist/ai/ChipsBox.md +1 -1
  44. package/dist/ai/CommonField.md +1 -1
  45. package/dist/ai/OptionsContainer.md +42 -0
  46. package/dist/ai/changelog.json +416 -6
  47. package/dist/ai/components.json +50 -48
  48. package/dist/ai/composables/useConfirm.md +39 -1
  49. package/dist/ai/design-tokens.json +6 -6
  50. package/dist/ai/guides/agent-contract.md +2 -2
  51. package/dist/ai/guides/ai-router.md +24 -23
  52. package/dist/ai/guides/app-layout.md +5 -0
  53. package/dist/ai/guides/component-picker.md +9 -2
  54. package/dist/ai/guides/design-language.md +24 -24
  55. package/dist/ai/guides/design-tokens.md +15 -8
  56. package/dist/ai/guides/icons-policy.md +9 -2
  57. package/dist/ai/guides/inertia-helpers.md +79 -49
  58. package/dist/ai/guides/installation-and-plugin-setup.md +12 -2
  59. package/dist/ai/guides/migration/adoption-checklist.md +235 -0
  60. package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -15
  61. package/dist/ai/guides/migration/components/bb-dialog.md +9 -9
  62. package/dist/ai/guides/migration/components/bb-dropdown.md +7 -2
  63. package/dist/ai/guides/migration/components/bb-popover.md +4 -2
  64. package/dist/ai/guides/migration/components/bb-select.md +19 -0
  65. package/dist/ai/guides/migration/components/bb-table.md +1 -0
  66. package/dist/ai/guides/migration/components/bb-toast.md +4 -0
  67. package/dist/ai/guides/migration/components/bb-tooltip.md +15 -12
  68. package/dist/ai/guides/migration/components/use-confirm.md +25 -2
  69. package/dist/ai/guides/migration/v2-to-v3.md +163 -9
  70. package/dist/ai/guides/migration/v3-beta-css-classes.md +7 -3
  71. package/dist/ai/guides/options-items-playbook.md +2 -1
  72. package/dist/ai/guides/passthrough.md +147 -85
  73. package/dist/ai/guides/preset-components.md +140 -15
  74. package/dist/ai/helpers/definePreset.json +7 -0
  75. package/dist/ai/helpers/definePreset.ts +123 -11
  76. package/dist/ai/helpers/inertia/manifest.json +15 -9
  77. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +4 -4
  78. package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +39 -24
  79. package/dist/ai/helpers/inertia/useRouteQuery.ts +10 -4
  80. package/dist/ai/index.md +1 -0
  81. package/dist/ai/manifest/common.json +0 -1
  82. package/dist/ai/manifest/components/BbAlert.json +7 -2
  83. package/dist/ai/manifest/components/BbBadge.json +13 -4
  84. package/dist/ai/manifest/components/BbBadge.tree.json +2 -0
  85. package/dist/ai/manifest/components/BbBadgeButton.json +4 -2
  86. package/dist/ai/manifest/components/BbBaseButton.json +4 -2
  87. package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
  88. package/dist/ai/manifest/components/BbButton.json +14 -3
  89. package/dist/ai/manifest/components/BbButton.tree.json +5 -1
  90. package/dist/ai/manifest/components/BbCheckboxGroup.json +13 -8
  91. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +11 -1
  92. package/dist/ai/manifest/components/BbColorInput.json +18 -15
  93. package/dist/ai/manifest/components/BbColorPalette.json +1 -1
  94. package/dist/ai/manifest/components/BbConfirm.json +4 -2
  95. package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
  96. package/dist/ai/manifest/components/BbDatePicker.json +1 -1
  97. package/dist/ai/manifest/components/BbDatePickerInput.json +17 -14
  98. package/dist/ai/manifest/components/BbDialog.tree.json +2 -1
  99. package/dist/ai/manifest/components/BbDropdown.json +24 -19
  100. package/dist/ai/manifest/components/BbDropdown.tree.json +9 -2
  101. package/dist/ai/manifest/components/BbDropdownButton.json +33 -20
  102. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -2
  103. package/dist/ai/manifest/components/BbForm.json +2 -2
  104. package/dist/ai/manifest/components/BbHost.tree.json +1 -1
  105. package/dist/ai/manifest/components/BbHoverCard.json +1 -1
  106. package/dist/ai/manifest/components/BbIndicator.json +8 -2
  107. package/dist/ai/manifest/components/BbNumberInput.json +5 -2
  108. package/dist/ai/manifest/components/BbOffCanvas.json +2 -2
  109. package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
  110. package/dist/ai/manifest/components/BbPopover.json +1 -1
  111. package/dist/ai/manifest/components/BbRadioGroup.json +17 -12
  112. package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -1
  113. package/dist/ai/manifest/components/BbSelect.json +21 -18
  114. package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
  115. package/dist/ai/manifest/components/BbSelectPopover.json +10 -10
  116. package/dist/ai/manifest/components/BbSelectPopover.tree.json +3 -2
  117. package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
  118. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -1
  119. package/dist/ai/manifest/components/BbTable.tree.json +14 -1
  120. package/dist/ai/manifest/components/BbTabs.json +9 -6
  121. package/dist/ai/manifest/components/BbTabs.tree.json +1 -1
  122. package/dist/ai/manifest/components/BbTabsList.json +6 -3
  123. package/dist/ai/manifest/components/BbTag.json +19 -16
  124. package/dist/ai/manifest/components/BbTag.tree.json +1 -1
  125. package/dist/ai/manifest/components/BbTextInput.json +6 -3
  126. package/dist/ai/manifest/components/BbTextarea.json +6 -3
  127. package/dist/ai/manifest/components/BbTimePicker.json +1 -1
  128. package/dist/ai/manifest/components/BbTimePickerInput.json +10 -7
  129. package/dist/ai/manifest/components/BbToast.json +7 -2
  130. package/dist/ai/manifest/components/BbToast.tree.json +4 -2
  131. package/dist/ai/manifest/components/BbTooltip.json +6 -5
  132. package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
  133. package/dist/ai/manifest/components/CommonField.json +1 -1
  134. package/dist/ai/manifest/components/OptionsContainer.json +3 -1
  135. package/dist/ai/manifest/components/OptionsContainer.tree.json +38 -0
  136. package/dist/ai/manifest/index.json +3 -3
  137. package/dist/ai/manifest/meta.json +5 -3
  138. package/dist/ai/manifest/types.advanced.json +5 -2
  139. package/dist/ai/manifest/types.api.json +9 -7
  140. package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
  141. package/dist/ai/recipes/inertia/records-workspace.md +49 -13
  142. package/dist/ai/recipes/nuxt/layout-scaffold.md +19 -6
  143. package/dist/ai/recipes/nuxt/records-workspace.md +42 -12
  144. package/dist/ai/recipes/vue/layout-scaffold.md +19 -6
  145. package/dist/ai/recipes/vue/records-workspace.md +42 -12
  146. package/dist/ai/source/BbAlert.md +94 -76
  147. package/dist/ai/source/BbBadge.md +174 -72
  148. package/dist/ai/source/BbBadgeButton.md +130 -65
  149. package/dist/ai/source/BbBaseButton.md +46 -124
  150. package/dist/ai/source/BbBaseCheckboxIcon.md +38 -0
  151. package/dist/ai/source/BbBaseRadioIcon.md +18 -0
  152. package/dist/ai/source/BbBaseSwitchIcon.md +51 -0
  153. package/dist/ai/source/BbButton.md +153 -36
  154. package/dist/ai/source/BbCheckboxGroup.md +142 -18
  155. package/dist/ai/source/BbColorInput.md +240 -204
  156. package/dist/ai/source/BbColorPalette.md +7 -4
  157. package/dist/ai/source/BbConfirm.md +34 -11
  158. package/dist/ai/source/BbConfirmPortal.md +24 -9
  159. package/dist/ai/source/BbDatePicker.md +11 -7
  160. package/dist/ai/source/BbDatePickerInput.md +306 -269
  161. package/dist/ai/source/BbDialog.md +49 -14
  162. package/dist/ai/source/BbDropdown.md +314 -197
  163. package/dist/ai/source/BbDropdownButton.md +197 -31
  164. package/dist/ai/source/BbDropdownGroup.md +274 -176
  165. package/dist/ai/source/BbForm.md +50 -6
  166. package/dist/ai/source/BbHoverCard.md +12 -5
  167. package/dist/ai/source/BbIcon.md +4 -3
  168. package/dist/ai/source/BbIndicator.md +73 -52
  169. package/dist/ai/source/BbNumberInput.md +293 -257
  170. package/dist/ai/source/BbOffCanvas.md +55 -29
  171. package/dist/ai/source/BbPopover.md +14 -10
  172. package/dist/ai/source/BbRadioGroup.md +413 -297
  173. package/dist/ai/source/BbSelect.md +549 -435
  174. package/dist/ai/source/BbSelectPopover.md +128 -33
  175. package/dist/ai/source/BbSwitchGroup.md +70 -10
  176. package/dist/ai/source/BbTable.md +369 -37
  177. package/dist/ai/source/BbTabs.md +115 -39
  178. package/dist/ai/source/BbTabsList.md +106 -38
  179. package/dist/ai/source/BbTabsPanels.md +96 -36
  180. package/dist/ai/source/BbTabsRoot.md +96 -36
  181. package/dist/ai/source/BbTag.md +267 -233
  182. package/dist/ai/source/BbTextInput.md +261 -225
  183. package/dist/ai/source/BbTextarea.md +251 -215
  184. package/dist/ai/source/BbTimePicker.md +11 -7
  185. package/dist/ai/source/BbTimePickerInput.md +257 -220
  186. package/dist/ai/source/BbToast.md +73 -32
  187. package/dist/ai/source/BbToastPortal.md +65 -30
  188. package/dist/ai/source/BbTooltip.md +148 -113
  189. package/dist/ai/source/CommonPopover.md +6 -1
  190. package/dist/ai/source/FlatListBox.md +19 -9
  191. package/dist/ai/source/GroupedListBox.md +19 -9
  192. package/dist/ai/source/OptionsContainer.md +25 -9
  193. package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +61 -36
  194. package/dist/components/BbAlert/types.d.ts +9 -5
  195. package/dist/components/BbAlert/types.js +8 -3
  196. package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +3 -3
  197. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +26 -17
  198. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +103 -50
  199. package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +20 -15
  200. package/dist/components/BbBadge/badgeButtonContext.d.ts +12 -1
  201. package/dist/components/BbBadge/types.d.ts +45 -15
  202. package/dist/components/BbBadge/types.js +12 -3
  203. package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +89 -126
  204. package/dist/components/BbBaseButton/types.d.ts +23 -4
  205. package/dist/components/BbBaseButton/types.js +7 -1
  206. package/dist/components/BbBaseButton/useLinkState.d.ts +41 -0
  207. package/dist/components/BbBaseButton/useLinkState.js +70 -0
  208. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -74
  209. package/dist/components/BbButton/types.d.ts +50 -13
  210. package/dist/components/BbButton/types.js +10 -3
  211. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +148 -95
  212. package/dist/components/BbCheckboxGroup/types.d.ts +34 -11
  213. package/dist/components/BbCheckboxGroup/types.js +9 -4
  214. package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
  215. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +134 -93
  216. package/dist/components/BbColorInput/types.d.ts +11 -4
  217. package/dist/components/BbColorInput/types.js +9 -3
  218. package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +82 -59
  219. package/dist/components/BbConfirm/types.d.ts +9 -4
  220. package/dist/components/BbConfirm/types.js +8 -3
  221. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
  222. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +68 -67
  223. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
  224. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +259 -215
  225. package/dist/components/BbDatePickerInput/types.d.ts +12 -5
  226. package/dist/components/BbDatePickerInput/types.js +9 -3
  227. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +223 -219
  228. package/dist/components/BbDialog/useDialogStack.d.ts +1 -1
  229. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +104 -89
  230. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -0
  231. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +323 -285
  232. package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -0
  233. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +411 -319
  234. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -98
  235. package/dist/components/BbDropdown/DropdownRow.vue.d.ts +4 -3
  236. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +49 -28
  237. package/dist/components/BbDropdown/normalizeGroups.d.ts +6 -0
  238. package/dist/components/BbDropdown/normalizeGroups.js +21 -15
  239. package/dist/components/BbDropdown/types.d.ts +59 -12
  240. package/dist/components/BbDropdown/types.js +16 -3
  241. package/dist/components/BbDropdown/useDropdownContext.d.ts +6 -0
  242. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -1
  243. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +179 -68
  244. package/dist/components/BbDropdownButton/types.d.ts +44 -16
  245. package/dist/components/BbDropdownButton/types.js +28 -3
  246. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +111 -89
  247. package/dist/components/BbForm/formSchema.d.ts +13 -0
  248. package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +100 -100
  249. package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +40 -25
  250. package/dist/components/BbIndicator/types.d.ts +9 -5
  251. package/dist/components/BbIndicator/types.js +8 -3
  252. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +243 -202
  253. package/dist/components/BbNumberInput/types.d.ts +12 -5
  254. package/dist/components/BbNumberInput/types.js +9 -3
  255. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
  256. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +401 -399
  257. package/dist/components/BbOffCanvas/types.d.ts +6 -2
  258. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +81 -80
  259. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +158 -105
  260. package/dist/components/BbRadioGroup/types.d.ts +21 -7
  261. package/dist/components/BbRadioGroup/types.js +9 -4
  262. package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -3
  263. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +181 -137
  264. package/dist/components/BbSelect/types.d.ts +36 -22
  265. package/dist/components/BbSelect/types.js +22 -3
  266. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +4 -4
  267. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +543 -532
  268. package/dist/components/BbSelectPopover/knownItems.d.ts +5 -0
  269. package/dist/components/BbSelectPopover/types.d.ts +46 -12
  270. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
  271. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +2 -2
  272. package/dist/components/BbSwitchGroup/types.d.ts +14 -4
  273. package/dist/components/BbSwitchGroup/types.js +8 -3
  274. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1102 -995
  275. package/dist/components/BbTable/estimatedFloors.golden.d.ts +25 -0
  276. package/dist/components/BbTable/measuredFloors.d.ts +46 -0
  277. package/dist/components/BbTable/measuredFloors.js +322 -0
  278. package/dist/components/BbTable/measuredFloorsTestKit.d.ts +27 -0
  279. package/dist/components/BbTable/textRuler.d.ts +71 -0
  280. package/dist/components/BbTable/textRuler.js +121 -0
  281. package/dist/components/BbTable/utils.d.ts +113 -6
  282. package/dist/components/BbTable/utils.js +118 -65
  283. package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +53 -35
  284. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +62 -45
  285. package/dist/components/BbTabs/types.d.ts +26 -11
  286. package/dist/components/BbTabs/types.js +23 -8
  287. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +205 -164
  288. package/dist/components/BbTag/types.d.ts +11 -4
  289. package/dist/components/BbTag/types.js +9 -3
  290. package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +98 -57
  291. package/dist/components/BbTextInput/types.d.ts +12 -5
  292. package/dist/components/BbTextInput/types.js +9 -3
  293. package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +137 -96
  294. package/dist/components/BbTextarea/types.d.ts +12 -5
  295. package/dist/components/BbTextarea/types.js +9 -3
  296. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +105 -104
  297. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +241 -197
  298. package/dist/components/BbTimePickerInput/types.d.ts +12 -5
  299. package/dist/components/BbTimePickerInput/types.js +9 -3
  300. package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +74 -32
  301. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +47 -47
  302. package/dist/components/BbToast/types.d.ts +10 -5
  303. package/dist/components/BbToast/types.js +18 -3
  304. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +85 -71
  305. package/dist/components/BbTooltip/types.d.ts +13 -8
  306. package/dist/components/BbTooltip/types.js +8 -3
  307. package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
  308. package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
  309. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +69 -69
  310. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +53 -50
  311. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +146 -143
  312. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +7 -2
  313. package/dist/components/OptionsContainer/types.d.ts +14 -3
  314. package/dist/composables/useBbFormContext.d.ts +4 -3
  315. package/dist/composables/useBbTabsContext.js +99 -85
  316. package/dist/composables/useChoiceIndicator.d.ts +58 -0
  317. package/dist/composables/useChoiceIndicator.js +197 -0
  318. package/dist/composables/useConfirm.d.ts +4 -4
  319. package/dist/composables/usePassthrough.d.ts +54 -1
  320. package/dist/composables/usePassthrough.js +100 -71
  321. package/dist/directives/bbTooltip.d.ts +12 -6
  322. package/dist/directives/createPopoverDirective.js +1 -1
  323. package/dist/index.d.ts +3 -1
  324. package/dist/llms-full.txt +2300 -543
  325. package/dist/llms-medium.txt +71 -53
  326. package/dist/llms.txt +2 -1
  327. package/dist/passthrough-deduper.js +6 -3
  328. package/dist/project-dts.d.ts +24 -0
  329. package/dist/project-dts.js +43 -17
  330. package/dist/styles.css +2 -2
  331. package/dist/types/AlertVariant.d.ts +14 -0
  332. package/dist/types/AlertVariant.js +9 -0
  333. package/dist/types/BadgeVariant.d.ts +14 -0
  334. package/dist/types/BadgeVariant.js +9 -0
  335. package/dist/types/ButtonVariant.d.ts +16 -0
  336. package/dist/types/ButtonVariant.js +11 -0
  337. package/dist/types/CheckboxVariant.d.ts +38 -0
  338. package/dist/types/CheckboxVariant.js +4 -0
  339. package/dist/types/CommonProps.d.ts +4 -3
  340. package/dist/types/Config.d.ts +7 -0
  341. package/dist/types/ConfirmVariant.d.ts +12 -0
  342. package/dist/types/ConfirmVariant.js +4 -0
  343. package/dist/types/DropdownItemVariant.d.ts +12 -0
  344. package/dist/types/DropdownItemVariant.js +4 -0
  345. package/dist/types/IndicatorVariant.d.ts +15 -0
  346. package/dist/types/IndicatorVariant.js +10 -0
  347. package/dist/types/InputVariant.d.ts +13 -0
  348. package/dist/types/InputVariant.js +8 -0
  349. package/dist/types/RadioVariant.d.ts +38 -0
  350. package/dist/types/RadioVariant.js +4 -0
  351. package/dist/types/TabsVariant.d.ts +13 -0
  352. package/dist/types/TabsVariant.js +8 -0
  353. package/dist/types/ToastVariant.d.ts +15 -0
  354. package/dist/types/ToastVariant.js +10 -0
  355. package/dist/types/TooltipVariant.d.ts +12 -0
  356. package/dist/types/TooltipVariant.js +4 -0
  357. package/dist/types/passthrough.d.ts +83 -15
  358. package/dist/types/passthrough.js +2 -2
  359. package/dist/types/ptComponentMap.d.ts +35 -23
  360. package/dist/utilities/functions/extractDomContainer.d.ts +20 -1
  361. package/dist/utilities/functions/extractDomContainer.js +8 -3
  362. package/dist/utils/focusVisibility.d.ts +6 -0
  363. package/dist/utils/focusVisibility.js +4 -1
  364. package/dist/utils/passthroughDeduper.d.ts +14 -0
  365. package/dist/utils/versionCheck.js +1 -1
  366. package/dist/vite-plugin.d.ts +64 -7
  367. package/dist/vite.js +385 -259
  368. package/llms.txt +2 -1
  369. package/package.json +3 -3
  370. package/scripts/lib/adoption-checklist.json +312 -0
  371. package/scripts/lib/eslint-plugin.d.ts +13 -0
  372. package/scripts/lib/eslint-plugin.mjs +75 -11
  373. package/scripts/lib/idiom-scan.mjs +65 -0
  374. package/scripts/lib/mcp-config.mjs +203 -9
  375. package/scripts/lib/migrate-fix.mjs +42 -1
  376. package/scripts/lib/project-variant-dts.mjs +18 -0
  377. package/scripts/lib/validate-bb-markup.mjs +99 -2
package/README.md CHANGED
@@ -296,11 +296,15 @@ you never run it by hand. `ai-init` merges the server entry into each harness's
296
296
  own config (never overwriting other servers you've registered), and each write
297
297
  is idempotent:
298
298
 
299
- | File | Harness |
300
- | ------------------ | ----------------- |
301
- | `.mcp.json` | Claude Code |
302
- | `.cursor/mcp.json` | Cursor |
303
- | `.vscode/mcp.json` | VS Code / Copilot |
299
+ | File | Harness |
300
+ | -------------------- | ----------------- |
301
+ | `.mcp.json` | Claude Code |
302
+ | `.cursor/mcp.json` | Cursor |
303
+ | `.vscode/mcp.json` | VS Code / Copilot |
304
+ | `.zed/settings.json` | Zed |
305
+
306
+ Comments in a JSONC config (`.vscode/mcp.json`, `.zed/settings.json`) are
307
+ kept. Zed starts the server once you trust the project.
304
308
 
305
309
  Windsurf only reads a global config in your home directory, so the server is
306
310
  not registered for it — add the same entry to
@@ -329,13 +333,13 @@ part you need.
329
333
 
330
334
  ### CLI commands
331
335
 
332
- | Command | What it does |
333
- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
334
- | `npx bitboss-ui ai-init [--update] [--no-mcp]` | Writes the agent pointer files and registers the MCP server (installs its optional peers). |
335
- | `npx bitboss-ui check [paths… \| --changed] [--fix] [--json]` | Validates `Bb*` markup in `.vue` / `.md` files against the installed version; `--fix` applies the library's renames first (v2 → v3, and between 3.0 betas); `--changed` checks only the files git sees changed vs HEAD (plus untracked). |
336
- | `npx bitboss-ui changelog --since <version> [--until <version>] [--json]` | Lists the **breaking** changes between the version you are on and the installed one — what breaks if you bump. |
337
- | `npx bitboss-ui mcp` | Starts the MCP server on stdio (harnesses launch it for you after `ai-init`). |
338
- | `npx bitboss-ui --help` | Every command and flag. |
336
+ | Command | What it does |
337
+ | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
338
+ | `npx bitboss-ui ai-init [--update] [--no-mcp]` | Writes the agent pointer files and registers the MCP server (installs its optional peers). |
339
+ | `npx bitboss-ui check [paths… \| --changed] [--fix] [--idioms] [--json]` | Validates `Bb*` markup in `.vue` / `.md` files against the installed version; `--fix` applies the library's renames first (v2 → v3, and between 3.0 betas); `--changed` checks only the files git sees changed vs HEAD (plus untracked); `--idioms` also lists the hand-rolled controls the library ships ([adoption checklist](dist/ai/guides/migration/adoption-checklist.md), report-only). |
340
+ | `npx bitboss-ui changelog --since <version> [--until <version>] [--json]` | Lists the **breaking** changes between the version you are on and the installed one — what breaks if you bump. |
341
+ | `npx bitboss-ui mcp` | Starts the MCP server on stdio (harnesses launch it for you after `ai-init`). |
342
+ | `npx bitboss-ui --help` | Every command and flag. |
339
343
 
340
344
  ### ESLint plugin
341
345
 
@@ -379,14 +383,15 @@ export default [
379
383
  **It also migrates v2 → v3 with `eslint --fix`.** Deprecated props are rewritten
380
384
  in place — the rule is a codemod, not just a linter:
381
385
 
382
- | You wrote | `--fix` produces | Kind |
383
- | ----------------------------------------- | ---------------------------------------- | ------------------------- |
384
- | `<BbIcon type="star" />` | `<BbIcon icon="star" />` | rename |
385
- | `<BbTable :allow-select-all="x" />` | `<BbTable :disable-select-all="!(x)" />` | polarity inversion |
386
- | `<BbSelect allow-writing="not-mobile" />` | `<BbSelect disable-writing="mobile" />` | rename + value remap |
387
- | `<BbHost />` | `<BbHost />` | value map |
388
- | `<BbPopover show-arrow />` | `<BbPopover />` | removed & inert → deleted |
389
- | `<BbBadge content="5" />` | _(unchanged — reported)_ | needs a slot: manual |
386
+ | You wrote | `--fix` produces | Kind |
387
+ | ----------------------------------------- | --------------------------------------- | ------------------------- |
388
+ | `<BbIcon type="star" />` | `<BbIcon icon="star" />` | rename |
389
+ | `<BbTable :allow-select-all="x" />` | `<BbTable :disable-select-all="!x" />` | polarity inversion |
390
+ | `<BbTabs :animate-x="false" />` | `<BbTabs disable-animate-x />` | inversion, literal folded |
391
+ | `<BbSelect allow-writing="not-mobile" />` | `<BbSelect disable-writing="mobile" />` | rename + value remap |
392
+ | `<BbHost />` | `<BbHost />` | value map |
393
+ | `<BbPopover show-arrow />` | `<BbPopover />` | removed & inert → deleted |
394
+ | `<BbBadge content="5" />` | _(unchanged — reported)_ | needs a slot: manual |
390
395
 
391
396
  The fixer is conservative: it only rewrites when the transform is provably
392
397
  correct (and never toward a name that isn't a real prop), so structural
@@ -14,7 +14,7 @@
14
14
  * - `vueCompilerOptions.checkUnknownComponents: true` in the
15
15
  * tsconfig (Q60.6), unless the project already names it
16
16
  * Also registers the `bitboss-ui mcp` server for Claude Code,
17
- * Cursor and VS Code and installs its optional peers
17
+ * Cursor, VS Code and Zed and installs its optional peers
18
18
  * (`@modelcontextprotocol/sdk`, `zod`) with the project's package
19
19
  * manager; pass --no-mcp to skip both.
20
20
  * check Validate Bb* markup in .vue/.md files against the installed
@@ -69,6 +69,7 @@ import {
69
69
  findHandRollHints,
70
70
  loadKnownTokens,
71
71
  } from '../scripts/lib/hand-roll-hints.mjs';
72
+ import { loadAdoptionRows, scanIdioms } from '../scripts/lib/idiom-scan.mjs';
72
73
  import {
73
74
  disabledChecker,
74
75
  ruleForFinding,
@@ -105,6 +106,7 @@ import {
105
106
  staleDefinePresetFindings,
106
107
  } from '../scripts/lib/define-preset-copy.mjs';
107
108
  import {
109
+ readOptionsApiOff,
108
110
  readRegisteredVariants,
109
111
  syncNotice,
110
112
  syncProjectVariantDts,
@@ -136,7 +138,7 @@ import {
136
138
  presetDefinitions,
137
139
  validateMarkdown,
138
140
  validateVueSnippet,
139
- VARIANT_INTENT_OPTIONS,
141
+ REGISTERED_VARIANT_OPTIONS,
140
142
  } from '../scripts/lib/validate-bb-markup.mjs';
141
143
 
142
144
  const PACKAGE_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
@@ -393,7 +395,7 @@ function aiInit({ mcp = true } = {}) {
393
395
  );
394
396
  if (mcp) {
395
397
  console.log(
396
- 'MCP: registered the bitboss-ui server for Claude Code (.mcp.json), Cursor (.cursor/mcp.json) and VS Code/Copilot (.vscode/mcp.json) — restart your harness to pick it up. `--no-mcp` skips this.'
398
+ 'MCP: registered the bitboss-ui server for Claude Code (.mcp.json), Cursor (.cursor/mcp.json), VS Code/Copilot (.vscode/mcp.json) and Zed (.zed/settings.json) — restart your harness to pick it up; Zed starts it once you trust the project. `--no-mcp` skips this.'
397
399
  );
398
400
  } else {
399
401
  console.log(
@@ -945,6 +947,7 @@ async function checkCommand(
945
947
  manifest: manifestOverride,
946
948
  fix,
947
949
  changed: changedOnly,
950
+ idioms: wantIdioms,
948
951
  }
949
952
  ) {
950
953
  const projectRoot = process.cwd();
@@ -1149,8 +1152,9 @@ async function checkCommand(
1149
1152
  // A variant the build plugin registers is the project's own name.
1150
1153
  registeredVariants: readRegisteredVariants(
1151
1154
  projectRoot,
1152
- Object.values(VARIANT_INTENT_OPTIONS)
1155
+ REGISTERED_VARIANT_OPTIONS
1153
1156
  ),
1157
+ optionsApiOff: readOptionsApiOff(projectRoot),
1154
1158
  };
1155
1159
 
1156
1160
  const findings = [];
@@ -1250,6 +1254,31 @@ async function checkCommand(
1250
1254
  }
1251
1255
  }
1252
1256
 
1257
+ // Q76.0: `--idioms`, the adoption checklist's patterns. Opt-in and
1258
+ // report-only (scripts/lib/idiom-scan.mjs): never a finding, never the exit
1259
+ // code. Same file scope as the portal names: scripts hold confirms and
1260
+ // mobile checks too.
1261
+ const idioms = [];
1262
+ if (wantIdioms) {
1263
+ const rows = loadAdoptionRows();
1264
+ const exts = new Set(rows.flatMap((row) => row.ext));
1265
+ const TEST_FILE = /\.(?:test|spec)(?:-d)?\.[cm]?[jt]sx?$/;
1266
+ const scope = changed ? changed.all : globs.length ? files : projectSources;
1267
+ for (const path of scope) {
1268
+ const ext = path.slice(path.lastIndexOf('.') + 1);
1269
+ if (!exts.has(ext) || path.endsWith('.d.ts') || TEST_FILE.test(path))
1270
+ continue;
1271
+ let content;
1272
+ try {
1273
+ content = readText(path);
1274
+ } catch {
1275
+ continue;
1276
+ }
1277
+ for (const hit of scanIdioms(content, ext, rows))
1278
+ idioms.push({ file: relative(projectRoot, path), ...hit });
1279
+ }
1280
+ }
1281
+
1253
1282
  for (const [name, file] of projectLocal) warnLocal(name, file);
1254
1283
  // Q60.6: a `vue-tsc` below 3, read from package.json. One line, never
1255
1284
  // fatal. (A missing `checkUnknownComponents` is no longer warned about:
@@ -1347,6 +1376,26 @@ async function checkCommand(
1347
1376
  );
1348
1377
  };
1349
1378
 
1379
+ /** The adoption checklist's report (`--idioms`). Never fatal. */
1380
+ const printIdioms = () => {
1381
+ if (!wantIdioms) return;
1382
+ if (idioms.length === 0) {
1383
+ console.log(
1384
+ '\n[bitboss-ui] idioms: no hand-rolled pattern from the adoption checklist found.'
1385
+ );
1386
+ return;
1387
+ }
1388
+ console.log(
1389
+ `\n[bitboss-ui] ${idioms.length} idiom(s) — hand-rolled patterns the library ships, report-only:`
1390
+ );
1391
+ for (const idiom of idioms)
1392
+ console.log(` ${idiom.file}:${idiom.line} [${idiom.id}] → ${idiom.use}`);
1393
+ console.log(
1394
+ ' Rows, replacements and the scope rule: node_modules/bitboss-ui/dist/ai/guides/migration/adoption-checklist.md.\n' +
1395
+ ' Kept on purpose? Say why in one line of a HANDROLLED note.'
1396
+ );
1397
+ };
1398
+
1350
1399
  /*
1351
1400
  * Which API the verdict is against. Silent when it is the installed one —
1352
1401
  * that is the assumption, and a banner on every run trains people to skip
@@ -1380,6 +1429,7 @@ async function checkCommand(
1380
1429
  findings,
1381
1430
  warnings,
1382
1431
  hints,
1432
+ ...(wantIdioms ? { idioms } : {}),
1383
1433
  suppressed,
1384
1434
  files: files.length,
1385
1435
  ...(changed ? { changed: true } : {}),
@@ -1418,6 +1468,7 @@ async function checkCommand(
1418
1468
  console.log(
1419
1469
  '[bitboss-ui] check: no .vue/.md files matched — nothing to do.'
1420
1470
  );
1471
+ printIdioms();
1421
1472
  return;
1422
1473
  }
1423
1474
 
@@ -1428,6 +1479,7 @@ async function checkCommand(
1428
1479
  printSuppressed();
1429
1480
  printWarnings();
1430
1481
  printHints();
1482
+ printIdioms();
1431
1483
  return;
1432
1484
  }
1433
1485
 
@@ -1466,6 +1518,7 @@ async function checkCommand(
1466
1518
  );
1467
1519
  printFindingLegend(findings);
1468
1520
  printHints();
1521
+ printIdioms();
1469
1522
  process.exit(1);
1470
1523
  }
1471
1524
 
@@ -1481,7 +1534,8 @@ Commands:
1481
1534
  project (AGENTS.md, Cursor rules, Copilot instructions,
1482
1535
  Claude skill, Windsurf rules), register the bitboss-ui MCP
1483
1536
  server for Claude Code (.mcp.json), Cursor
1484
- (.cursor/mcp.json) and VS Code/Copilot (.vscode/mcp.json) —
1537
+ (.cursor/mcp.json), VS Code/Copilot (.vscode/mcp.json) and
1538
+ Zed (.zed/settings.json) —
1485
1539
  merges, never overwrites other servers — and install its
1486
1540
  optional peers with the project's package manager. Sets
1487
1541
  \`vueCompilerOptions.checkUnknownComponents: true\` in the
@@ -1520,7 +1574,7 @@ Commands:
1520
1574
  run add again. --yes is accepted and does nothing (the
1521
1575
  commands never prompt).
1522
1576
  check [glob…] [--changed] [--json] [--allow-empty] [--allow-component <Name>]
1523
- [--no-hints] [--manifest <path>] [--fix]
1577
+ [--no-hints] [--manifest <path>] [--fix] [--idioms]
1524
1578
  Validate \`Bb*\` markup in .vue/.md files against the
1525
1579
  installed components.json manifest (unknown/removed props,
1526
1580
  bad v-models, unknown \`<template #slot>\` names,
@@ -1557,6 +1611,15 @@ Commands:
1557
1611
  then reports what is left. Needs \`eslint\` and
1558
1612
  \`vue-eslint-parser\` in the project.
1559
1613
 
1614
+ \`--idioms\` also lists the hand-rolled controls still in
1615
+ the app that the library ships (radio cards, segmented
1616
+ controls, sortable headers, steppers, app sheets, app
1617
+ confirms, …) with file:line and the replacement: the
1618
+ adoption checklist's own rows, run over .vue and script
1619
+ files. Report-only and opt-in: it never changes the exit
1620
+ code, and plain \`check\` never runs it. Guide:
1621
+ dist/ai/guides/migration/adoption-checklist.md.
1622
+
1560
1623
  Honours ESLint disable comments in .vue files: a finding
1561
1624
  silenced for the matching \`bitboss-ui/*\` rule (or by a
1562
1625
  bare \`eslint-disable\`) is not reported, only counted:
@@ -1586,7 +1649,8 @@ Commands:
1586
1649
 
1587
1650
  \`--json\` prints \`{ findings: [...], warnings: [...], hints: [...],
1588
1651
  suppressed, files, manifestVersion, installedVersion }\`
1589
- (plus \`changed: true\` under \`--changed\`).
1652
+ (plus \`changed: true\` under \`--changed\`, and
1653
+ \`idioms: [{ file, line, id, use }]\` under \`--idioms\`).
1590
1654
  Each finding: \`{ file, line, component, attr, kind,
1591
1655
  message, hint?, to? }\` (plus \`fenceIndex\`/\`fenceInfo\`
1592
1656
  inside a markdown fence; \`line\` is absolute in the file).
@@ -1816,6 +1880,7 @@ switch (command) {
1816
1880
  fix: { type: 'boolean' },
1817
1881
  manifest: { type: 'string' },
1818
1882
  changed: { type: 'boolean' },
1883
+ idioms: { type: 'boolean' },
1819
1884
  // Accepted and ignored here — read straight off argv inside
1820
1885
  // checkCommand, but parseArgs is strict, so it must be declared.
1821
1886
  'no-hints': { type: 'boolean' },
@@ -1829,6 +1894,7 @@ switch (command) {
1829
1894
  allowComponents: values['allow-component'] ?? [],
1830
1895
  manifest: values.manifest,
1831
1896
  changed: values.changed ?? false,
1897
+ idioms: values.idioms ?? false,
1832
1898
  });
1833
1899
  break;
1834
1900
  }
@@ -495,7 +495,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
495
495
 
496
496
  | Prop | Type | Default | Required | Description |
497
497
  | --- | --- | --- | --- | --- |
498
- | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `close`, `icon`, `root`, `text`, `title`. States: —. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbAlertProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
498
+ | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `close`, `icon`, `root`, `text`, `title`. States: `destructive`, `outline`, `primary`, `warning`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbAlertProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
499
499
  | `ariaLive` | `"off" \| "polite" \| "assertive" \| undefined` | | | ARIA live region politeness. Unset, it follows `role` when you set one (`'alert'` → `'assertive'`, `'status'` → `'polite'`), else the variant: `'assertive'` for destructive/warning, otherwise `'polite'`. |
500
500
  | `closeLabel` | `string \| undefined` | | | Visually hidden string used to label the close button. |
501
501
  | `hideClose` | `boolean \| undefined` | `false` | | Defines whether to hide the close button. |
@@ -521,6 +521,15 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
521
521
  | `text` | The body copy. |
522
522
  | `close` | The ✕ that dismisses the alert. |
523
523
 
524
+ States are listed in precedence order: when two are on at once and their entries conflict, the later one wins.
525
+
526
+ | State | When it is on |
527
+ | --- | --- |
528
+ | `destructive` | Component-wide: `variant: 'destructive'`. Below the real states, like every variant. |
529
+ | `outline` | Component-wide: `variant: 'outline'`. Merged after the part's base entry and before its states, so the real states still win. |
530
+ | `primary` | Component-wide: `variant: 'primary'`. Below the real states, like every variant. |
531
+ | `warning` | Component-wide: `variant: 'warning'`. Below the real states, like every variant. |
532
+
524
533
  ## Events
525
534
 
526
535
  - `update:modelValue` — `(value: boolean): void` — Emitted with the new value whenever `v-model` changes.
@@ -265,6 +265,13 @@ hidden accessible label — always supply it.
265
265
  </div>
266
266
  ```
267
267
 
268
+ The slots named after the props (`#icon`, `#prepend:icon`, `#append:icon`)
269
+ replace them and render inside the `icon` part, so `pt:icon`, `--icon-size`
270
+ and the loading spinner still apply. Their scope is the badge's states,
271
+ `{ activeLink, exactActiveLink, loading }`: a filter chip linking to a page
272
+ can show a solid glyph while that page is open. What you put in a slot is
273
+ yours: a `BbIcon` takes the part's size, anything else you size.
274
+
268
275
  ### Loading state
269
276
 
270
277
  Add `loading` to show a spinner on the badge. It takes the place of the
@@ -476,6 +483,16 @@ Three structural rules follow from the takeover:
476
483
  - **`append:icon` and the clear button stay outside** it, on the badge's
477
484
  trailing side. That is what keeps `clearable` compatible (below).
478
485
 
486
+ A `BbBadgeButton` link's default slot gets `{ activeLink, exactActiveLink }`,
487
+ as `BbBaseButton`'s does, and the link state reaches the whole chip: the
488
+ badge's own parts (`pt:root:active-link`, …) and its icon slots. What renders
489
+ outside the button (the badge's root, and on a `clearable` badge its trailing
490
+ side: the append icon and the ✕) gets it only after hydration. The state is
491
+ read in the `BbBadgeButton`, which renders after the badge's root, so a
492
+ server-rendered page paints those plain and they switch once the page
493
+ hydrates. The two renders agree, so there is no mismatch. Everything inside
494
+ the button (the label, the leading icon) has it from the server on.
495
+
479
496
  #### Full `BbBaseButton` parity
480
497
 
481
498
  `BbBadgeButton` composes `BbBaseButton`, so the badge body accepts that
@@ -683,6 +700,12 @@ Both sides carry the pill's radius and inline padding, so each hit area runs
683
700
  extreme right edge presses the clear. The clear button's hit region spans the
684
701
  full pill height even though only the glyph's circle looks interactive.
685
702
 
703
+ So the pill itself has no padding: `px-*` on the badge (or `pt:root`) does
704
+ nothing. The side padding is two tokens, `--pad-left` / `--pad-right`, both
705
+ derived from `--px`, which each size sets (an icon side takes 65% of it, the
706
+ clear side 40%, an icon-only badge 35%). Rescale both sides with `--px`, or
707
+ set one side directly, inline: `:style="{ '--px': '10px' }"`.
708
+
686
709
  Focus is always ringed on the **whole pill** (never on the inner control), for
687
710
  the body and the clear button alike; the clear button additionally lights its
688
711
  glyph. The class hooks above are the supported styling surface —
@@ -871,10 +894,10 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
871
894
 
872
895
  | Prop | Type | Default | Required | Description |
873
896
  | --- | --- | --- | --- | --- |
874
- | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `clear`, `icon`, `root`, `spinner`, `text`. States: `loading`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbBadgeProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
897
+ | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `clear`, `icon`, `root`, `spinner`, `text`. States: `activeLink`, `destructive`, `exactActiveLink`, `loading`, `outline`, `primary`, `secondary`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbBadgeProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
875
898
  | `append:icon` | `string \| undefined` | | | Icon rendered after the label. On a `clearable` badge it shares the trailing slot with the clear button: the icon shows at rest and the clear button reveals over it on hover/focus. |
876
899
  | `clearable` | `boolean \| undefined` | `false` | | Renders a trailing clear button and emits `click:clear` when pressed — turns the badge into a dismissible token (the pattern formerly served by `BbChip`). |
877
- | `clearableLabel` | `string \| undefined` | | | Accessible name of the clear button. Rarely needed: unset, it is composed from the localized `badge.clearLabel` verb and the badge text ("Remove Italy"), or the verb alone when a `BbBadgeButton` owns the body. |
900
+ | `clearableLabel` | `string \| undefined` | | | Accessible name of the clear button, whole: set, it is the name on any body ("Remove the filter Deleted"). Rarely needed: unset, the name is composed from the localized `badge.clearLabel` verb and the badge text ("Remove Italy"), or the verb alone when a `BbBadgeButton` owns the body. |
878
901
  | `icon` | `string \| undefined` | | | Renders an icon-only badge. When set, `prepend:icon` / `append:icon` are ignored and the default slot becomes the badge's visually hidden accessible label — always provide it. |
879
902
  | `loading` | `boolean \| undefined` | `false` | | Shows a spinner in place of the leftmost icon (`icon` or `prepend:icon`; the `append:icon` when it is the only one; else the leading slot), as `BbButton` does, with a hidden loading announcement. |
880
903
  | `prepend:icon` | `string \| undefined` | | | Icon rendered before the label. |
@@ -897,7 +920,13 @@ States are listed in precedence order: when two are on at once and their entries
897
920
 
898
921
  | State | When it is on |
899
922
  | --- | --- |
923
+ | `activeLink` | Component-wide: the badge's `BbBadgeButton` is a link to the current page or one of its ancestors. The weakest state. |
924
+ | `exactActiveLink` | Component-wide: the badge's `BbBadgeButton` is a link to the current page itself (`activeLink` is on too). |
900
925
  | `loading` | Component-wide: `loading` is on; the spinner takes an icon's place. |
926
+ | `destructive` | Component-wide: `variant: 'destructive'`. Below the real states, like every variant. |
927
+ | `outline` | Component-wide: `variant: 'outline'`. Below the real states, like every variant. |
928
+ | `primary` | Component-wide: `variant: 'primary'`. Merged after the part's base entry and before its states, so the real states still win. |
929
+ | `secondary` | Component-wide: `variant: 'secondary'`. Below the real states, like every variant. |
901
930
 
902
931
  ## Events
903
932
 
@@ -905,7 +934,10 @@ States are listed in precedence order: when two are on at once and their entries
905
934
 
906
935
  ## Slots
907
936
 
937
+ - `append:icon` — scope: `BbBadgeIconSlotProps` `{ activeLink: boolean; exactActiveLink: boolean; loading: boolean }` — The trailing icon, replacing `append:icon`; inside the `icon` part.
908
938
  - `default` — scope: `object` — The badge's label content. When `icon` is set this becomes the visually hidden accessible label. Render a `BbBadgeButton` here to make the badge body interactive (the wrapper stays a passive `<span>`).
939
+ - `icon` — scope: `BbBadgeIconSlotProps` `{ activeLink: boolean; exactActiveLink: boolean; loading: boolean }` — The glyph of an icon-only badge, replacing the `icon` prop. Renders inside the `icon` part: `pt:icon`, `--icon-size` and the loading spinner apply.
940
+ - `prepend:icon` — scope: `BbBadgeIconSlotProps` `{ activeLink: boolean; exactActiveLink: boolean; loading: boolean }` — The leading icon, replacing `prepend:icon`; inside the `icon` part.
909
941
 
910
942
  ## CSS custom properties
911
943
 
@@ -944,7 +976,7 @@ Set these on the element, or on a class you put on it, to retune this component
944
976
  - **CSS custom properties** listed on a node are declared on THAT node's root and read by elements inside it. Set one on that node's root or on the element inside it that reads it — the pt part that lands there is how you reach it (`pt:box="[--border-color:…]"` on a text input) — never on `BbBadge`'s root, where the node's own declaration masks it (design-tokens guide, _Overriding one from a consumer app_, rule 0).
945
977
  - Listed nodes are the ones `BbBadge`'s API reaches or that declare a documented CSS variable; the rest fold into "also mounts". The complete tree, repeats and undocumented locals included, is `manifest/components/BbBadge.tree.json`.
946
978
 
947
- - `BbBadge` _(this component)_ — its own template binds: `spinner` → `BbSpinner`, `icon` → `BbIcon`, `clear` → `button.bb-badge__clear`
979
+ - `BbBadge` _(this component)_ — its own template binds: `spinner` → `BbSpinner`, `icon` → `span.bb-badge__append-icon`, `icon` → `BbIcon`, `clear` → `button.bb-badge__clear`
948
980
  - Also mounts `BbIcon`, `BbSpinner`, `BadgeBodyContent`
949
981
 
950
982
  ## See Also
@@ -12,7 +12,7 @@
12
12
 
13
13
  | Prop | Type | Default | Required | Description |
14
14
  | --- | --- | --- | --- | --- |
15
- | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `root`. States: `disabled`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbBadgeButtonProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
15
+ | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `root`. States: `activeLink`, `disabled`, `exactActiveLink`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbBadgeButtonProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
16
16
  | `activeClass` | `string \| undefined` | `'router-link-active'` | | CSS class applied when the component renders as a link and the target of the link is the current route or the url matches partially. Ported for Inertia compatibility. |
17
17
  | `ariaCurrentValue` | `"page" \| "step" \| "location" \| "date" \| "time" \| "true" \| "false" \| undefined` | `'page'` | | Value forwarded to the `aria-current` attribute when the component renders as a router link and the target route is an exact match. Use to communicate the current location to assistive technologies. |
18
18
  | `async` | `boolean \| undefined` | `false` | | Inertia: runs the visit without blocking — the page stays interactive and several async visits can be in flight at once. |
@@ -66,6 +66,8 @@ States are listed in precedence order: when two are on at once and their entries
66
66
 
67
67
  | State | When it is on |
68
68
  | --- | --- |
69
+ | `activeLink` | Component-wide: a link to the current page or one of its ancestors (`/users` on `/users/5`) — exactly when `activeClass` is on. The default slot gets it too, as `activeLink`. |
70
+ | `exactActiveLink` | Component-wide: a link to the current page itself — exactly when `exactActiveClass` is on (`activeLink` is on too). The default slot gets it as `exactActiveLink`. |
69
71
  | `disabled` | Component-wide: the button is `disabled`. |
70
72
 
71
73
  ## Events
@@ -74,7 +76,7 @@ States are listed in precedence order: when two are on at once and their entries
74
76
 
75
77
  ## Slots
76
78
 
77
- - `default` — scope: `object` — The action's label — what the badge displays as its body.
79
+ - `default` — scope: `BbLinkSlotProps` `{ activeLink: boolean; exactActiveLink: boolean }` — The action's label — what the badge displays as its body. A link's slot gets `{ activeLink, exactActiveLink }`, as on `BbBaseButton`.
78
80
 
79
81
  ## CSS custom properties
80
82
 
@@ -305,7 +305,11 @@ added on a path-prefix match, `exact-active-class` on an exact match (defaults
305
305
  (`to`), and ported by the library for `href` links — against the Inertia page
306
306
  under Inertia, or `window.location` in a plain app. On every platform the
307
307
  exact-active link also gets `aria-current` (default `page`, tune
308
- with `aria-current-value`). The [`BbButton` active-state
308
+ with `aria-current-value`). The same match is the `activeLink` /
309
+ `exactActiveLink` `pt` states (`pt:root:active-link="font-semibold"`) and the
310
+ default slot's `{ activeLink, exactActiveLink }` props, so content can change
311
+ with it (a solid icon on the current page); a `to` link takes vue-router's own
312
+ answer for all three. The [`BbButton` active-state
309
313
  section](./BbButton.md) covers the matching rules in depth.
310
314
 
311
315
  Because the primitive attaches only the class name, an unstyled nav item is a
@@ -538,7 +542,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
538
542
 
539
543
  | Prop | Type | Default | Required | Description |
540
544
  | --- | --- | --- | --- | --- |
541
- | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `root`. States: `disabled`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbBaseButtonProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
545
+ | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `root`. States: `activeLink`, `disabled`, `exactActiveLink`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbBaseButtonProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
542
546
  | `activeClass` | `string \| undefined` | `'router-link-active'` | | CSS class applied when the component renders as a link and the target of the link is the current route or the url matches partially. Ported for Inertia compatibility. |
543
547
  | `ariaCurrentValue` | `"page" \| "step" \| "location" \| "date" \| "time" \| "true" \| "false" \| undefined` | `'page'` | | Value forwarded to the `aria-current` attribute when the component renders as a router link and the target route is an exact match. Use to communicate the current location to assistive technologies. |
544
548
  | `async` | `boolean \| undefined` | `false` | | Inertia: runs the visit without blocking — the page stays interactive and several async visits can be in flight at once. |
@@ -594,6 +598,8 @@ States are listed in precedence order: when two are on at once and their entries
594
598
 
595
599
  | State | When it is on |
596
600
  | --- | --- |
601
+ | `activeLink` | Component-wide: a link to the current page or one of its ancestors (`/users` on `/users/5`) — exactly when `activeClass` is on. The default slot gets it too, as `activeLink`. |
602
+ | `exactActiveLink` | Component-wide: a link to the current page itself — exactly when `exactActiveClass` is on (`activeLink` is on too). The default slot gets it as `exactActiveLink`. |
597
603
  | `disabled` | Component-wide: the button is `disabled`. |
598
604
 
599
605
  ## Events
@@ -602,7 +608,7 @@ States are listed in precedence order: when two are on at once and their entries
602
608
 
603
609
  ## Slots
604
610
 
605
- - `default` — scope: `object` — Primary content rendered inside the button element. Falls back to the `text` prop when empty.
611
+ - `default` — scope: `BbLinkSlotProps` `{ activeLink: boolean; exactActiveLink: boolean }` — Primary content rendered inside the button element. Falls back to the `text` prop when empty.
606
612
 
607
613
  ## Component tree
608
614
 
@@ -748,11 +748,11 @@ States are listed in precedence order: when two are on at once and their entries
748
748
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
749
749
  - `BbDropdown` _(public — [contract](./BbDropdown.md))_ — its own pt parts (`BbDropdown`): `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-dropdown__header`, `list` → `span.bb-dropdown__list`, `footer` → `div.bb-dropdown__footer`; documented CSS variables: `--menu-inset`; also mounts `CommonPopover`, `DropdownPipelineResolver`
750
750
  - `BbDropdownList` _(internal — not importable, reach it through `BbDropdown`)_ — also mounts `BbIcon`, `ErrorIcon`, `CommonPopover`, `BbDropdownList`
751
- - `BbBadge` _(public — [contract](./BbBadge.md))_ — its own pt parts (`BbBadge`): `spinner` → `BbSpinner`, `icon` → `BbIcon`, `clear` → `button.bb-badge__clear`; documented CSS variables: `--bg`, `--fg`, `--bw`, `--ring-color`, `--ring-size`, `--min-size-md`, `--min-size`, `--elev`, `--r`, `--fs`, `--icon-size`, `--gap`, `--px`, `--clear-size`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--pad-left`; also mounts `BbIcon`, `BbSpinner`, `BadgeBodyContent`
751
+ - `BbBadge` _(public — [contract](./BbBadge.md))_ — its own pt parts (`BbBadge`): `spinner` → `BbSpinner`, `icon` → `span.bb-badge__append-icon`, `icon` → `BbIcon`, `clear` → `button.bb-badge__clear`; documented CSS variables: `--bg`, `--fg`, `--bw`, `--ring-color`, `--ring-size`, `--min-size-md`, `--min-size`, `--elev`, `--r`, `--fs`, `--icon-size`, `--gap`, `--px`, `--clear-size`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--pad-left`; also mounts `BbIcon`, `BbSpinner`, `BadgeBodyContent`
752
752
  - `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbDropdownList`
753
753
  - `BbOffCanvas` _(public — [contract](./BbOffCanvas.md))_ — its own pt parts (`BbOffCanvas`): `header` → `div.bb-offcanvas__header`, `title` → `span.bb-offcanvas__title`, `description` → `p.bb-offcanvas__description`, `close` → `CloseButton`, `content` → `div.bb-offcanvas__content`, `footer` → `div.bb-offcanvas__footer`; documented CSS variables: `--stack-x`, `--snap-y`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
754
754
  - `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`
755
- - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `BbIcon`, `text` → `span.bb-button__text`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbIcon`, `BbBaseButton`, `BbSpinner`
755
+ - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__icon`, `icon` → `BbIcon`, `icon` → `span.bb-button__prepend-icon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbIcon`, `BbBaseButton`, `BbSpinner`
756
756
  - Also mounts `BbIcon`
757
757
 
758
758
  ## See Also