bitboss-ui 3.0.0-beta.53 → 3.0.0-beta.56

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 (462) hide show
  1. package/README.md +36 -43
  2. package/bin/bitboss-ui-mcp.mjs +4 -3
  3. package/bin/bitboss-ui.mjs +130 -23
  4. package/dist/ai/BbAccordion.md +119 -178
  5. package/dist/ai/BbAlert.md +44 -14
  6. package/dist/ai/BbAsterisk.md +10 -8
  7. package/dist/ai/BbAvatar.md +14 -29
  8. package/dist/ai/BbBadge.md +36 -21
  9. package/dist/ai/BbBaseButton.md +45 -21
  10. package/dist/ai/BbBaseCheckboxIcon.md +4 -4
  11. package/dist/ai/BbBreadcrumbs.md +1 -1
  12. package/dist/ai/BbButton.md +60 -49
  13. package/dist/ai/BbCalendar.md +29 -13
  14. package/dist/ai/BbCheckbox.md +28 -9
  15. package/dist/ai/BbCheckboxGroup.md +19 -8
  16. package/dist/ai/BbCollapsible.md +5 -4
  17. package/dist/ai/BbColorInput.md +9 -7
  18. package/dist/ai/BbConfirm.md +85 -113
  19. package/dist/ai/BbConfirmPortal.md +3 -3
  20. package/dist/ai/BbDatePicker.md +33 -26
  21. package/dist/ai/BbDatePickerInput.md +20 -11
  22. package/dist/ai/BbDialog.md +594 -327
  23. package/dist/ai/BbDropdown.md +14 -6
  24. package/dist/ai/BbDropdownButton.md +3 -3
  25. package/dist/ai/BbDropzone.md +88 -44
  26. package/dist/ai/BbForm.md +38 -21
  27. package/dist/ai/BbHost.md +159 -0
  28. package/dist/ai/BbHoverCard.md +12 -12
  29. package/dist/ai/BbHoverCardPortal.md +4 -4
  30. package/dist/ai/BbIndicator.md +41 -14
  31. package/dist/ai/BbNumberInput.md +8 -6
  32. package/dist/ai/BbOffCanvas.md +225 -164
  33. package/dist/ai/BbPagination.md +5 -4
  34. package/dist/ai/BbPopover.md +23 -17
  35. package/dist/ai/BbPopoverPortal.md +4 -4
  36. package/dist/ai/BbProgress.md +3 -3
  37. package/dist/ai/BbPtScope.md +5 -5
  38. package/dist/ai/BbRadio.md +7 -5
  39. package/dist/ai/BbRadioGroup.md +24 -8
  40. package/dist/ai/BbRating.md +13 -7
  41. package/dist/ai/BbSelect.md +67 -35
  42. package/dist/ai/BbSelectPopover.md +46 -22
  43. package/dist/ai/BbSlider.md +35 -12
  44. package/dist/ai/BbSpinner.md +4 -2
  45. package/dist/ai/BbSwitch.md +9 -7
  46. package/dist/ai/BbSwitchGroup.md +14 -13
  47. package/dist/ai/BbTable.md +13 -8
  48. package/dist/ai/BbTabs.md +43 -33
  49. package/dist/ai/BbTag.md +3 -3
  50. package/dist/ai/BbTextInput.md +30 -4
  51. package/dist/ai/BbTextarea.md +15 -7
  52. package/dist/ai/BbTimePicker.md +28 -13
  53. package/dist/ai/BbTimePickerInput.md +4 -4
  54. package/dist/ai/BbToast.md +109 -205
  55. package/dist/ai/BbToastPortal.md +3 -3
  56. package/dist/ai/BbTooltip.md +14 -13
  57. package/dist/ai/BbTree.md +33 -39
  58. package/dist/ai/CommonField.md +4 -4
  59. package/dist/ai/changelog.json +348 -42
  60. package/dist/ai/components.json +87 -66
  61. package/dist/ai/composables/useBbDialogContext.md +144 -0
  62. package/dist/ai/composables/useBbFormContext.md +7 -6
  63. package/dist/ai/composables/useBbOffCanvasContext.md +64 -0
  64. package/dist/ai/composables/useConfirm.md +25 -25
  65. package/dist/ai/composables/useMobile.md +2 -3
  66. package/dist/ai/composables/useToast.md +24 -24
  67. package/dist/ai/guides/agent-contract.md +9 -9
  68. package/dist/ai/guides/app-layout.md +4 -4
  69. package/dist/ai/guides/component-picker.md +2 -2
  70. package/dist/ai/guides/design-language.md +2 -6
  71. package/dist/ai/guides/design-tokens.md +7 -5
  72. package/dist/ai/guides/eslint-rules.md +67 -0
  73. package/dist/ai/guides/fetch-items-playbook.md +4 -0
  74. package/dist/ai/guides/inertia-helpers.md +188 -130
  75. package/dist/ai/guides/installation-and-plugin-setup.md +99 -97
  76. package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
  77. package/dist/ai/guides/migration/components/bb-dialog.md +12 -12
  78. package/dist/ai/guides/migration/components/bb-dropzone.md +8 -8
  79. package/dist/ai/guides/migration/components/bb-host.md +41 -0
  80. package/dist/ai/guides/migration/components/bb-offcanvas.md +9 -9
  81. package/dist/ai/guides/migration/components/bb-select-popover.md +2 -2
  82. package/dist/ai/guides/migration/components/bb-select.md +15 -15
  83. package/dist/ai/guides/migration/components/bb-toast.md +23 -17
  84. package/dist/ai/guides/migration/components/bb-tree.md +8 -8
  85. package/dist/ai/guides/migration/components/use-confirm.md +1 -1
  86. package/dist/ai/guides/migration/from-async-validator.md +2 -2
  87. package/dist/ai/guides/migration/v2-to-v3.md +184 -21
  88. package/dist/ai/guides/migration/v3-beta-css-classes.md +11 -0
  89. package/dist/ai/guides/migration/v3-beta-tooling.md +18 -2
  90. package/dist/ai/guides/options-items-playbook.md +8 -1
  91. package/dist/ai/guides/page-shell.md +11 -0
  92. package/dist/ai/guides/passthrough.md +24 -33
  93. package/dist/ai/guides/preset-components.md +32 -5
  94. package/dist/ai/guides/validated-forms.md +50 -27
  95. package/dist/ai/helpers/definePreset.json +26 -0
  96. package/dist/ai/helpers/definePreset.ts +234 -0
  97. package/dist/ai/helpers/inertia/manifest.json +21 -13
  98. package/dist/ai/helpers/inertia/types.ts +18 -7
  99. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +13 -8
  100. package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +39 -18
  101. package/dist/ai/helpers/inertia/useQueryObject.ts +68 -33
  102. package/dist/ai/index.md +18 -13
  103. package/dist/ai/manifest/components/BbAccordion.json +6 -2
  104. package/dist/ai/manifest/components/BbAccordion.tree.json +13 -3
  105. package/dist/ai/manifest/components/BbAlert.json +4 -3
  106. package/dist/ai/manifest/components/BbAlert.tree.json +3 -3
  107. package/dist/ai/manifest/components/BbBaseButton.json +1 -1
  108. package/dist/ai/manifest/components/BbBaseCheckboxIcon.tree.json +4 -4
  109. package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
  110. package/dist/ai/manifest/components/BbButton.json +1 -1
  111. package/dist/ai/manifest/components/BbCalendar.json +2 -2
  112. package/dist/ai/manifest/components/BbCheckbox.json +3 -2
  113. package/dist/ai/manifest/components/BbCheckbox.tree.json +3 -2
  114. package/dist/ai/manifest/components/BbCheckboxGroup.json +3 -2
  115. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +4 -1
  116. package/dist/ai/manifest/components/BbCollapsible.json +1 -1
  117. package/dist/ai/manifest/components/BbColorInput.json +4 -3
  118. package/dist/ai/manifest/components/BbColorInput.tree.json +1 -1
  119. package/dist/ai/manifest/components/BbColorPalette.json +1 -1
  120. package/dist/ai/manifest/components/BbColorPalette.tree.json +1 -1
  121. package/dist/ai/manifest/components/BbConfirm.json +3 -4
  122. package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
  123. package/dist/ai/manifest/components/BbConfirmPortal.json +3 -3
  124. package/dist/ai/manifest/components/BbDatePicker.json +4 -4
  125. package/dist/ai/manifest/components/BbDatePicker.tree.json +1 -1
  126. package/dist/ai/manifest/components/BbDatePickerInput.json +6 -5
  127. package/dist/ai/manifest/components/BbDatePickerInput.tree.json +1 -1
  128. package/dist/ai/manifest/components/BbDialog.json +8 -7
  129. package/dist/ai/manifest/components/BbDialog.tree.json +4 -2
  130. package/dist/ai/manifest/components/BbDropdown.json +2 -2
  131. package/dist/ai/manifest/components/BbDropdown.tree.json +1 -1
  132. package/dist/ai/manifest/components/BbDropdownButton.json +2 -2
  133. package/dist/ai/manifest/components/BbDropdownButton.tree.json +1 -1
  134. package/dist/ai/manifest/components/BbDropzone.json +1 -1
  135. package/dist/ai/manifest/components/BbHost.json +14 -0
  136. package/dist/ai/manifest/components/BbHost.tree.json +9 -0
  137. package/dist/ai/manifest/components/BbHoverCardPortal.json +3 -3
  138. package/dist/ai/manifest/components/BbNumberInput.json +4 -3
  139. package/dist/ai/manifest/components/BbOffCanvas.json +8 -7
  140. package/dist/ai/manifest/components/BbOffCanvas.tree.json +3 -1
  141. package/dist/ai/manifest/components/BbPopover.json +1 -1
  142. package/dist/ai/manifest/components/BbPopover.tree.json +1 -1
  143. package/dist/ai/manifest/components/BbPopoverPortal.json +3 -3
  144. package/dist/ai/manifest/components/BbProgress.json +1 -1
  145. package/dist/ai/manifest/components/BbRadio.json +4 -3
  146. package/dist/ai/manifest/components/BbRadio.tree.json +2 -1
  147. package/dist/ai/manifest/components/BbRadioGroup.json +3 -2
  148. package/dist/ai/manifest/components/BbRadioGroup.tree.json +3 -0
  149. package/dist/ai/manifest/components/BbRating.json +3 -2
  150. package/dist/ai/manifest/components/BbRating.tree.json +2 -0
  151. package/dist/ai/manifest/components/BbSelect.json +5 -4
  152. package/dist/ai/manifest/components/BbSelect.tree.json +1 -1
  153. package/dist/ai/manifest/components/BbSelectPopover.json +2 -2
  154. package/dist/ai/manifest/components/BbSelectPopover.tree.json +1 -1
  155. package/dist/ai/manifest/components/BbSlider.json +5 -4
  156. package/dist/ai/manifest/components/BbSwitch.json +5 -4
  157. package/dist/ai/manifest/components/BbSwitch.tree.json +2 -1
  158. package/dist/ai/manifest/components/BbSwitchGroup.json +11 -10
  159. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -0
  160. package/dist/ai/manifest/components/BbTable.json +1 -1
  161. package/dist/ai/manifest/components/BbTable.tree.json +1 -1
  162. package/dist/ai/manifest/components/BbTabs.tree.json +1 -0
  163. package/dist/ai/manifest/components/BbTag.json +3 -2
  164. package/dist/ai/manifest/components/BbTextInput.json +4 -3
  165. package/dist/ai/manifest/components/BbTextarea.json +4 -3
  166. package/dist/ai/manifest/components/BbTimePicker.json +2 -2
  167. package/dist/ai/manifest/components/BbTimePicker.tree.json +1 -1
  168. package/dist/ai/manifest/components/BbTimePickerInput.json +5 -4
  169. package/dist/ai/manifest/components/BbTimePickerInput.tree.json +1 -1
  170. package/dist/ai/manifest/components/BbToast.json +4 -8
  171. package/dist/ai/manifest/components/BbToast.removed.json +1 -1
  172. package/dist/ai/manifest/components/BbToastPortal.json +6 -3
  173. package/dist/ai/manifest/components/BbTree.json +1 -1
  174. package/dist/ai/manifest/components/CommonField.json +5 -4
  175. package/dist/ai/manifest/components/CommonField.tree.json +76 -1
  176. package/dist/ai/manifest/index.json +9 -10
  177. package/dist/ai/manifest/meta.json +28 -4
  178. package/dist/ai/manifest/types.advanced.json +15 -7
  179. package/dist/ai/manifest/types.api.json +7 -7
  180. package/dist/ai/manifest/types.wrapper.json +2 -3
  181. package/dist/ai/recipes/inertia/approvals-inbox.md +174 -157
  182. package/dist/ai/recipes/inertia/inline-edit-workspace.md +13 -14
  183. package/dist/ai/recipes/inertia/onboarding.md +15 -18
  184. package/dist/ai/recipes/inertia/ownership-atlas.md +67 -30
  185. package/dist/ai/recipes/inertia/record-form.md +8 -8
  186. package/dist/ai/recipes/inertia/records-workspace.md +122 -97
  187. package/dist/ai/recipes/inertia/settings-workspace.md +89 -96
  188. package/dist/ai/recipes/inertia/upload-center.md +30 -24
  189. package/dist/ai/recipes/inertia/wizard-form.md +9 -7
  190. package/dist/ai/recipes/nuxt/approvals-inbox.md +174 -156
  191. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +11 -13
  192. package/dist/ai/recipes/nuxt/onboarding.md +15 -18
  193. package/dist/ai/recipes/nuxt/ownership-atlas.md +63 -26
  194. package/dist/ai/recipes/nuxt/record-form.md +8 -9
  195. package/dist/ai/recipes/nuxt/records-workspace.md +112 -96
  196. package/dist/ai/recipes/nuxt/settings-workspace.md +91 -101
  197. package/dist/ai/recipes/nuxt/upload-center.md +25 -23
  198. package/dist/ai/recipes/nuxt/wizard-form.md +9 -7
  199. package/dist/ai/recipes/vue/approvals-inbox.md +175 -158
  200. package/dist/ai/recipes/vue/inline-edit-workspace.md +10 -12
  201. package/dist/ai/recipes/vue/onboarding.md +15 -20
  202. package/dist/ai/recipes/vue/ownership-atlas.md +63 -26
  203. package/dist/ai/recipes/vue/record-form.md +8 -9
  204. package/dist/ai/recipes/vue/records-workspace.md +112 -96
  205. package/dist/ai/recipes/vue/settings-workspace.md +91 -101
  206. package/dist/ai/recipes/vue/upload-center.md +25 -23
  207. package/dist/ai/recipes/vue/wizard-form.md +9 -9
  208. package/dist/ai/source/BbAccordion.md +79 -9
  209. package/dist/ai/source/BbAlert.md +34 -12
  210. package/dist/ai/source/BbBaseButton.md +15 -2
  211. package/dist/ai/source/BbBaseCheckboxIcon.md +4 -0
  212. package/dist/ai/source/BbButton.md +8 -4
  213. package/dist/ai/source/BbCalendar.md +10 -5
  214. package/dist/ai/source/BbCheckbox.md +24 -7
  215. package/dist/ai/source/BbCheckboxGroup.md +23 -5
  216. package/dist/ai/source/BbCollapsible.md +6 -7
  217. package/dist/ai/source/BbColorInput.md +6 -5
  218. package/dist/ai/source/BbColorPalette.md +0 -1
  219. package/dist/ai/source/BbConfirm.md +16 -28
  220. package/dist/ai/source/BbConfirmPortal.md +7 -14
  221. package/dist/ai/source/BbDatePicker.md +66 -2
  222. package/dist/ai/source/BbDatePickerInput.md +16 -15
  223. package/dist/ai/source/BbDialog.md +188 -36
  224. package/dist/ai/source/BbDropdown.md +5 -5
  225. package/dist/ai/source/BbDropdownGroup.md +5 -4
  226. package/dist/ai/source/BbDropzone.md +26 -9
  227. package/dist/ai/source/BbForm.md +7 -1
  228. package/dist/ai/source/BbHost.md +97 -0
  229. package/dist/ai/source/BbHoverCard.md +5 -5
  230. package/dist/ai/source/BbHoverCardPortal.md +7 -7
  231. package/dist/ai/source/BbNumberInput.md +7 -6
  232. package/dist/ai/source/BbOffCanvas.md +183 -37
  233. package/dist/ai/source/BbPopover.md +5 -6
  234. package/dist/ai/source/BbPopoverPortal.md +7 -7
  235. package/dist/ai/source/BbProgress.md +1 -1
  236. package/dist/ai/source/BbRadio.md +23 -6
  237. package/dist/ai/source/BbRadioGroup.md +22 -5
  238. package/dist/ai/source/BbRating.md +19 -5
  239. package/dist/ai/source/BbSelect.md +18 -10
  240. package/dist/ai/source/BbSelectPopover.md +10 -7
  241. package/dist/ai/source/BbSlider.md +40 -7
  242. package/dist/ai/source/BbSwitch.md +20 -3
  243. package/dist/ai/source/BbSwitchGroup.md +18 -1
  244. package/dist/ai/source/BbTable.md +5 -3
  245. package/dist/ai/source/BbTabs.md +33 -3
  246. package/dist/ai/source/BbTabsList.md +16 -3
  247. package/dist/ai/source/BbTabsPanels.md +6 -0
  248. package/dist/ai/source/BbTabsRoot.md +6 -0
  249. package/dist/ai/source/BbTag.md +6 -5
  250. package/dist/ai/source/BbTextInput.md +7 -6
  251. package/dist/ai/source/BbTextarea.md +7 -6
  252. package/dist/ai/source/BbTimePicker.md +23 -2
  253. package/dist/ai/source/BbTimePickerInput.md +11 -19
  254. package/dist/ai/source/BbToast.md +58 -27
  255. package/dist/ai/source/BbToastPortal.md +25 -14
  256. package/dist/ai/source/BbTree.md +21 -12
  257. package/dist/ai/source/CommonField.md +393 -45
  258. package/dist/ai/source/CommonPopover.md +4 -0
  259. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +47 -33
  260. package/dist/components/BbAccordion/types.d.ts +21 -6
  261. package/dist/components/BbAccordion/types.js +2 -0
  262. package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +39 -37
  263. package/dist/components/BbAlert/types.d.ts +11 -4
  264. package/dist/components/BbBaseButton/types.d.ts +3 -2
  265. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +40 -40
  266. package/dist/components/BbButton/types.d.ts +3 -2
  267. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +4 -4
  268. package/dist/components/BbCalendar/types.d.ts +6 -1
  269. package/dist/components/BbCalendar/useDayjsLocale.d.ts +8 -0
  270. package/dist/components/BbCalendar/useDayjsLocale.js +14 -2
  271. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +1 -1
  272. package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +44 -43
  273. package/dist/components/BbCheckbox/types.d.ts +6 -5
  274. package/dist/components/BbCheckboxGroup/types.d.ts +6 -5
  275. package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +1 -1
  276. package/dist/components/BbCollapsible/types.d.ts +4 -4
  277. package/dist/components/BbColorInput/types.d.ts +6 -5
  278. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +0 -1
  279. package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +46 -48
  280. package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +1 -1
  281. package/dist/components/BbConfirm/BbConfirmPortal.vue_vue_type_script_setup_true_lang.js +1 -1
  282. package/dist/components/BbConfirm/types.d.ts +5 -12
  283. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +118 -103
  284. package/dist/components/BbDatePicker/types.d.ts +8 -0
  285. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +312 -319
  286. package/dist/components/BbDatePickerInput/types.d.ts +14 -10
  287. package/dist/components/BbDialog/BbDialog.vue.d.ts +1 -0
  288. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +193 -151
  289. package/dist/components/BbDialog/types.d.ts +59 -11
  290. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +0 -1
  291. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +1 -1
  292. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +13 -13
  293. package/dist/components/BbDropdown/types.d.ts +5 -4
  294. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +2 -2
  295. package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +142 -139
  296. package/dist/components/BbDropzone/types.d.ts +7 -2
  297. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +170 -170
  298. package/dist/components/BbForm/bindFormField.d.ts +2 -3
  299. package/dist/components/BbHost/BbHost.vue.d.ts +4 -0
  300. package/dist/components/BbHost/BbHost.vue.js +5 -0
  301. package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +30 -0
  302. package/dist/components/BbHost/BbHostOpening.d.ts +27 -0
  303. package/dist/components/BbHost/BbHostOpening.js +43 -0
  304. package/dist/components/BbHost/types.d.ts +7 -0
  305. package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -2
  306. package/dist/components/BbHoverCard/types.d.ts +5 -5
  307. package/dist/components/BbNumberInput/types.d.ts +7 -6
  308. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -0
  309. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +249 -222
  310. package/dist/components/BbOffCanvas/types.d.ts +69 -18
  311. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +0 -1
  312. package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -2
  313. package/dist/components/BbPopover/types.d.ts +5 -5
  314. package/dist/components/BbProgress/types.d.ts +1 -1
  315. package/dist/components/BbRadio/BbRadio.vue.d.ts +1 -1
  316. package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +65 -64
  317. package/dist/components/BbRadio/types.d.ts +6 -5
  318. package/dist/components/BbRadioGroup/types.d.ts +6 -5
  319. package/dist/components/BbRating/types.d.ts +6 -5
  320. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +13 -10
  321. package/dist/components/BbSelect/types.d.ts +11 -9
  322. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +7 -5
  323. package/dist/components/BbSelectPopover/types.d.ts +5 -4
  324. package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +154 -146
  325. package/dist/components/BbSlider/types.d.ts +13 -5
  326. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +1 -1
  327. package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +83 -82
  328. package/dist/components/BbSwitch/types.d.ts +2 -1
  329. package/dist/components/BbSwitchGroup/types.d.ts +2 -1
  330. package/dist/components/BbTable/types.d.ts +5 -3
  331. package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +33 -30
  332. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +54 -50
  333. package/dist/components/BbTabs/tablistName.d.ts +4 -0
  334. package/dist/components/BbTabs/tablistName.js +13 -0
  335. package/dist/components/BbTag/types.d.ts +6 -5
  336. package/dist/components/BbTextInput/types.d.ts +7 -6
  337. package/dist/components/BbTextarea/types.d.ts +7 -6
  338. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +90 -86
  339. package/dist/components/BbTimePicker/types.d.ts +6 -0
  340. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +145 -151
  341. package/dist/components/BbTimePickerInput/types.d.ts +8 -7
  342. package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +41 -34
  343. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -78
  344. package/dist/components/BbToast/BbToastPortal.vue.d.ts +5 -5
  345. package/dist/components/BbToast/BbToastPortal.vue_vue_type_script_setup_true_lang.js +1 -1
  346. package/dist/components/BbToast/BbToastRegion.vue.d.ts +2 -0
  347. package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +66 -66
  348. package/dist/components/BbToast/types.d.ts +17 -8
  349. package/dist/components/BbTree/BbTree.vue.d.ts +1 -1
  350. package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +1 -1
  351. package/dist/components/BbTree/types.d.ts +6 -6
  352. package/dist/components/CommonField/CommonField.vue.d.ts +2 -1
  353. package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +146 -99
  354. package/dist/components/CommonField/types.d.ts +18 -12
  355. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +32 -29
  356. package/dist/composables/formSubmitLock.d.ts +35 -0
  357. package/dist/composables/formSubmitLock.js +17 -2
  358. package/dist/composables/hostOpenings.d.ts +82 -0
  359. package/dist/composables/hostOpenings.js +70 -0
  360. package/dist/composables/hostRegistry.d.ts +39 -0
  361. package/dist/composables/hostRegistry.js +21 -0
  362. package/dist/composables/overlayRegistry.d.ts +160 -0
  363. package/dist/composables/overlayRegistry.js +230 -0
  364. package/dist/composables/useBbDialogContext.d.ts +86 -0
  365. package/dist/composables/useBbDialogContext.js +53 -0
  366. package/dist/composables/useBbOffCanvasContext.d.ts +23 -0
  367. package/dist/composables/useBbOffCanvasContext.js +8 -0
  368. package/dist/composables/useConfig.js +4 -0
  369. package/dist/composables/useConfirm.d.ts +44 -21
  370. package/dist/composables/useConfirm.js +4 -4
  371. package/dist/composables/useOnDemandOpener.d.ts +35 -0
  372. package/dist/composables/useOnDemandOpener.js +30 -0
  373. package/dist/composables/useRefusedCloseAnnouncement.d.ts +13 -0
  374. package/dist/composables/useRefusedCloseAnnouncement.js +15 -0
  375. package/dist/composables/useToast.d.ts +5 -6
  376. package/dist/composables/useToast.js +4 -3
  377. package/dist/deprecation/ai-deprecations.json.d.ts +3 -10
  378. package/dist/deprecation/ai-deprecations.json.js +1 -1
  379. package/dist/directives/bbDate.d.ts +40 -9
  380. package/dist/directives/bbDialog.d.ts +60 -0
  381. package/dist/directives/bbDialog.js +7 -0
  382. package/dist/directives/bbHoverCard.d.ts +3 -3
  383. package/dist/directives/bbHoverCard.js +1 -1
  384. package/dist/directives/bbOffCanvas.d.ts +46 -0
  385. package/dist/directives/bbOffCanvas.js +7 -0
  386. package/dist/directives/bbPopover.d.ts +3 -3
  387. package/dist/directives/bbPopover.js +1 -1
  388. package/dist/directives/bbTime.d.ts +23 -6
  389. package/dist/directives/directivePortal.d.ts +11 -11
  390. package/dist/directives/directivePortal.js +1 -1
  391. package/dist/directives/overlayTrigger.d.ts +28 -0
  392. package/dist/directives/overlayTrigger.js +93 -0
  393. package/dist/i18n/locales/cs.json +2 -1
  394. package/dist/i18n/locales/da.json +2 -1
  395. package/dist/i18n/locales/de-CH.json +2 -1
  396. package/dist/i18n/locales/de.json +2 -1
  397. package/dist/i18n/locales/el.json +2 -1
  398. package/dist/i18n/locales/en-GB.json +2 -1
  399. package/dist/i18n/locales/en.json +2 -1
  400. package/dist/i18n/locales/es-MX.json +2 -1
  401. package/dist/i18n/locales/es.json +2 -1
  402. package/dist/i18n/locales/fi.json +2 -1
  403. package/dist/i18n/locales/fr.json +2 -1
  404. package/dist/i18n/locales/hu.json +2 -1
  405. package/dist/i18n/locales/it.json +2 -1
  406. package/dist/i18n/locales/ja.json +2 -1
  407. package/dist/i18n/locales/ko.json +2 -1
  408. package/dist/i18n/locales/nb.json +2 -1
  409. package/dist/i18n/locales/nl.json +2 -1
  410. package/dist/i18n/locales/pl.json +2 -1
  411. package/dist/i18n/locales/pt-BR.json +2 -1
  412. package/dist/i18n/locales/pt-PT.json +2 -1
  413. package/dist/i18n/locales/ro.json +2 -1
  414. package/dist/i18n/locales/ru.json +2 -1
  415. package/dist/i18n/locales/sv.json +2 -1
  416. package/dist/i18n/locales/tr.json +2 -1
  417. package/dist/i18n/locales/uk.json +2 -1
  418. package/dist/i18n/locales/zh-CN.json +2 -1
  419. package/dist/i18n/locales/zh-HK.json +2 -1
  420. package/dist/i18n/locales/zh-TW.json +2 -1
  421. package/dist/icon-scan.d.ts +21 -0
  422. package/dist/icon-scan.js +29 -26
  423. package/dist/index.d.ts +13 -4
  424. package/dist/index.js +60 -57
  425. package/dist/llms-full.txt +4978 -3435
  426. package/dist/llms-medium.txt +119 -122
  427. package/dist/llms.txt +11 -7
  428. package/dist/locale-blueprint.json +2 -1
  429. package/dist/nuxt-auto-imports.js +3 -1
  430. package/dist/nuxt-module.d.ts +7 -4
  431. package/dist/nuxt.js +23 -20
  432. package/dist/plugin.js +27 -24
  433. package/dist/project-dts.d.ts +15 -2
  434. package/dist/project-dts.js +16 -10
  435. package/dist/runtime/nuxt-plugin.js +19 -17
  436. package/dist/styles.css +2 -2
  437. package/dist/types/Config.d.ts +33 -7
  438. package/dist/types/ptComponentMap.d.ts +1 -1
  439. package/dist/utilities/functions/responsiveDefault.d.ts +7 -0
  440. package/dist/utilities/functions/responsiveDefault.js +11 -0
  441. package/dist/utils/copyData.d.ts +10 -0
  442. package/dist/utils/copyData.js +29 -0
  443. package/dist/utils/cssLayers.d.ts +10 -0
  444. package/dist/utils/cssLayers.js +23 -18
  445. package/dist/utils/versionCheck.js +1 -1
  446. package/dist/vite-plugin.d.ts +29 -14
  447. package/dist/vite.js +247 -242
  448. package/llms.txt +11 -7
  449. package/package.json +1 -1
  450. package/scripts/lib/agent-manifest.mjs +22 -3
  451. package/scripts/lib/css-class-check.mjs +33 -2
  452. package/scripts/lib/define-preset-copy.mjs +123 -0
  453. package/scripts/lib/eslint-disable.mjs +3 -2
  454. package/scripts/lib/eslint-plugin.d.ts +2 -2
  455. package/scripts/lib/eslint-plugin.mjs +73 -93
  456. package/scripts/lib/portal-names.mjs +198 -28
  457. package/scripts/lib/project-variant-dts.mjs +53 -1
  458. package/scripts/lib/rule-registry.mjs +379 -0
  459. package/scripts/lib/swap-noun.mjs +33 -0
  460. package/scripts/lib/unimported-components.mjs +3 -1
  461. package/scripts/lib/validate-bb-markup.mjs +82 -76
  462. package/scripts/lib/required-in-form.mjs +0 -240
@@ -15,6 +15,13 @@
15
15
  | pt part | Lands on | In |
16
16
  | --- | --- | --- |
17
17
  | `pt:header` | the root of `BbBaseButton` | `BbBaseButton` ([contract](./BbBaseButton.md)) |
18
+ | `pt:icon` | the root of `BbIcon` | `BbIcon` ([contract](./BbIcon.md)) |
19
+
20
+ **CSS variables you can set through those parts** — declared deeper in the tree, so set one on the part that reads it (`pt:<part>="[--name:value]"`), never on `BbAccordion`'s root:
21
+
22
+ | Variable | Set through | Declared by | What it is |
23
+ | --- | --- | --- | --- |
24
+ | `--w` | `pt:icon` | `BbIcon` | `--w` is set inline by BbIcon from the size prop. The `initial` default seals it: without it an ancestor's `--w` (e.g. a dropdown's width bridge) would inherit in and size the icon. The `--size` indirection stays so higher-specificity rules (e.g. `.bb-badge .bb-icon`) can re-point it. |
18
25
 
19
26
  ## Usage & Guidelines
20
27
 
@@ -38,47 +45,31 @@ Step down the ladder when the composed header doesn't fit:
38
45
  - You only need to animate a height change, with no hide/show state at all →
39
46
  **`BbSmoothHeight`** (`./BbSmoothHeight.md`).
40
47
 
41
- The public surface is small on purpose: `v-model` (boolean), `eager`,
42
- `transition-duration`, `id`, `heading-level`, two slots, and the
48
+ The public surface is small on purpose: `v-model` (boolean), `title`,
49
+ `eager`, `transition-duration`, `id`, `heading-level`, three slots, and the
43
50
  `update:modelValue` event.
44
51
  Everything else is composition.
45
52
 
46
53
  ### Composing an FAQ
47
54
 
48
55
  The classic pricing-page FAQ is independent panels — each with its own boolean.
49
- The `header` slot is rendered **inside the header button** — so put text and an
50
- indicator there, never a nested `<button>`/`<a>`. The panel is a block box
51
- inside the collapsing region, so padding, a border or a background on it —
52
- through `pt:panel` or `.bb-accordion__panel` — collapses with the body.
56
+ Give each a `title`: the trigger is then ours — the text at the start, a
57
+ chevron at the end that turns when the panel opens — in the default look:
58
+ medium weight, vertical padding, a hairline under each item and bottom padding
59
+ on the panel. Write no chevron, flex row or padding of your own.
53
60
 
54
61
  **A pricing-page FAQ of independent panels**
55
62
 
56
63
  ```vue
57
64
  <template>
58
- <div
59
- class="max-w-md overflow-hidden rounded-(--bb-radius) border border-(--bb-border)"
60
- >
65
+ <div class="max-w-md">
61
66
  <BbAccordion
62
- v-for="(faq, index) in faqs"
67
+ v-for="faq in faqs"
63
68
  :key="faq.question"
64
69
  v-model="faq.open"
65
- :class="index ? 'border-t border-(--bb-border)' : ''"
70
+ :title="faq.question"
66
71
  >
67
- <template #header="{ open }">
68
- <div
69
- class="flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm font-medium"
70
- >
71
- <span>{{ faq.question }}</span>
72
- <span
73
- class="shrink-0 text-(--bb-text-muted) transition-transform duration-200"
74
- :class="open ? 'rotate-180' : ''"
75
- >
76
- <BbIcon icon="lucide:chevron-down" size="sm" />
77
- </span>
78
- </div>
79
- </template>
80
-
81
- <p class="px-3 pb-2.5 text-sm text-(--bb-text-muted)">
72
+ <p class="text-(--bb-text-muted)">
82
73
  {{ faq.answer }}
83
74
  </p>
84
75
  </BbAccordion>
@@ -87,7 +78,7 @@ through `pt:panel` or `.bb-accordion__panel` — collapses with the body.
87
78
 
88
79
  <script setup lang="ts">
89
80
  import { ref } from 'vue';
90
- import { BbAccordion, BbIcon } from 'bitboss-ui';
81
+ import { BbAccordion } from 'bitboss-ui';
91
82
 
92
83
  type Faq = { question: string; answer: string; open: boolean };
93
84
 
@@ -115,6 +106,20 @@ const faqs = ref<Faq[]>([
115
106
  </script>
116
107
  ```
117
108
 
109
+ Two slots change the trigger, the same rule as `BbDialog`'s header:
110
+
111
+ - **`#title`** replaces the **text only**; the chevron and the default look
112
+ stay. Use it for rich, passive content: a badge, a code path, a price.
113
+ - **`#header`** replaces the **whole trigger content** — no chevron, no
114
+ default look, your markup as it is. Reach for it only when the chevron or the
115
+ layout must go; an accordion written with `#header` before this keeps
116
+ rendering exactly as it did.
117
+
118
+ Both render inside the header button, so never put a nested `<button>`/`<a>`
119
+ there. The panel is a block box inside the collapsing region, so padding, a
120
+ border or a background on it — through `pt:panel` or `.bb-accordion__panel` —
121
+ collapses with the body.
122
+
118
123
  The header button spans the full width and is the only click target: any
119
124
  non-interactive element you slot into it is made click-transparent
120
125
  (`pointer-events: none`), so wrappers, icons and badges never swallow the toggle
@@ -122,38 +127,29 @@ click.
122
127
 
123
128
  That click-transparency is what lets headers carry rich, passive metadata. An
124
129
  API-reference disclosure list leans on it: a soft method `BbBadge` and a
125
- `<code>` path in the header, parameter details in the body — clicking anywhere
126
- on the row, badge included, toggles the panel.
130
+ `<code>` path in `#title`, parameter details in the body — clicking anywhere
131
+ on the row, badge included, toggles the panel, and the chevron stays.
127
132
 
128
133
  **An API reference disclosure list**
129
134
 
130
135
  ```vue
131
136
  <template>
132
- <div
133
- class="max-w-md overflow-hidden rounded-(--bb-radius) border border-(--bb-border)"
134
- >
137
+ <div class="max-w-md">
135
138
  <BbAccordion
136
- v-for="(endpoint, index) in endpoints"
139
+ v-for="endpoint in endpoints"
137
140
  :key="`${endpoint.method}:${endpoint.path}`"
138
141
  v-model="endpoint.open"
139
- :class="index ? 'border-t border-(--bb-border)' : ''"
140
142
  >
141
- <template #header="{ open }">
142
- <div class="flex w-full items-center gap-2 px-3 py-2 text-left">
143
+ <template #title>
144
+ <span class="flex items-center gap-2">
143
145
  <BbBadge size="xs" :variant="METHOD_VARIANT[endpoint.method]">{{
144
146
  endpoint.method
145
147
  }}</BbBadge>
146
148
  <code class="truncate font-mono text-xs">{{ endpoint.path }}</code>
147
- <span
148
- class="ml-auto shrink-0 text-(--bb-text-muted) transition-transform duration-200"
149
- :class="open ? 'rotate-180' : ''"
150
- >
151
- <BbIcon icon="lucide:chevron-down" size="sm" />
152
- </span>
153
- </div>
149
+ </span>
154
150
  </template>
155
151
 
156
- <div class="flex flex-col gap-1.5 px-3 pb-2.5">
152
+ <div class="flex flex-col gap-1.5">
157
153
  <p class="text-xs text-(--bb-text-muted)">
158
154
  {{ endpoint.summary }}
159
155
  </p>
@@ -176,7 +172,7 @@ on the row, badge included, toggles the panel.
176
172
 
177
173
  <script setup lang="ts">
178
174
  import { ref } from 'vue';
179
- import { BbAccordion, BbBadge, BbIcon } from 'bitboss-ui';
175
+ import { BbAccordion, BbBadge } from 'bitboss-ui';
180
176
  import type { BbBadgeProps } from 'bitboss-ui';
181
177
 
182
178
  type Endpoint = {
@@ -257,11 +253,11 @@ const endpoints = ref<Endpoint[]>([
257
253
 
258
254
  ### Slot scope: the open flag and the toggle handle
259
255
 
260
- Both slots — `header` and the default (body) slot — receive the same scope,
261
- `{ open, toggle }`:
256
+ Every slot — `title`, `header` and the default (body) slot — receives the same
257
+ scope, `{ open, toggle }`:
262
258
 
263
259
  - `open` mirrors the open state (one-way — assigning to it does nothing). Use
264
- it to spin a chevron or swap header copy.
260
+ it to swap header copy (the default chevron turns by itself).
265
261
  - `toggle()` flips the panel. In the header it is redundant (the button already
266
262
  toggles); its real use is in the **body**, for a "Show less" affordance that
267
263
  collapses the panel without reaching back to the header. Writing to your own
@@ -271,25 +267,10 @@ Both slots — `header` and the default (body) slot — receive the same scope,
271
267
 
272
268
  ```vue
273
269
  <template>
274
- <div
275
- class="max-w-md overflow-hidden rounded-(--bb-radius) border border-(--bb-border)"
276
- >
277
- <BbAccordion v-model="notes">
278
- <template #header="{ open }">
279
- <div
280
- class="flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm font-medium"
281
- >
282
- <span>Release notes</span>
283
- <span
284
- class="shrink-0 text-(--bb-text-muted) transition-transform duration-200"
285
- :class="open ? 'rotate-180' : ''"
286
- >
287
- <BbIcon icon="lucide:chevron-down" size="sm" />
288
- </span>
289
- </div>
290
- </template>
270
+ <div class="max-w-md">
271
+ <BbAccordion v-model="notes" title="Release notes">
291
272
  <template #default="{ toggle }">
292
- <div class="flex flex-col items-start gap-1.5 px-3 pb-2.5">
273
+ <div class="flex flex-col items-start gap-1.5">
293
274
  <p class="text-sm text-(--bb-text-muted)">
294
275
  Dropdown keyboard navigation, smoother select popovers, and a new
295
276
  color picker.
@@ -303,7 +284,7 @@ Both slots — `header` and the default (body) slot — receive the same scope,
303
284
 
304
285
  <script setup lang="ts">
305
286
  import { ref } from 'vue';
306
- import { BbAccordion, BbButton, BbIcon } from 'bitboss-ui';
287
+ import { BbAccordion, BbButton } from 'bitboss-ui';
307
288
 
308
289
  // Panel starts open so the in-body "Show less" affordance is visible.
309
290
  const notes = ref(true);
@@ -325,36 +306,23 @@ to `null`). Prefer a stable key over an index when the list can reorder.
325
306
 
326
307
  ```vue
327
308
  <template>
328
- <div
329
- class="max-w-md overflow-hidden rounded-(--bb-radius) border border-(--bb-border)"
330
- >
309
+ <div class="max-w-md">
331
310
  <BbAccordion
332
311
  v-for="(plan, index) in plans"
333
312
  :key="plan.name"
334
- :class="index ? 'border-t border-(--bb-border)' : ''"
335
313
  :model-value="openIndex === index"
336
314
  @update:model-value="openIndex = $event ? index : null"
337
315
  >
338
- <template #header="{ open }">
339
- <div
340
- class="flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm"
341
- >
342
- <span class="font-medium">{{ plan.name }}</span>
343
- <span class="flex items-center gap-1.5 text-(--bb-text-muted)">
344
- {{ plan.price }}
345
- <span
346
- class="shrink-0 transition-transform duration-200"
347
- :class="open ? 'rotate-180' : ''"
348
- >
349
- <BbIcon icon="lucide:chevron-down" size="sm" />
350
- </span>
351
- </span>
352
- </div>
316
+ <template #title>
317
+ <span class="flex items-center justify-between gap-2">
318
+ {{ plan.name }}
319
+ <span class="font-normal text-(--bb-text-muted)">{{
320
+ plan.price
321
+ }}</span>
322
+ </span>
353
323
  </template>
354
324
 
355
- <ul
356
- class="flex flex-col gap-1 px-3 pb-2.5 text-sm text-(--bb-text-muted)"
357
- >
325
+ <ul class="flex flex-col gap-1 text-(--bb-text-muted)">
358
326
  <li v-for="feature in plan.features" :key="feature">{{ feature }}</li>
359
327
  </ul>
360
328
  </BbAccordion>
@@ -363,7 +331,7 @@ to `null`). Prefer a stable key over an index when the list can reorder.
363
331
 
364
332
  <script setup lang="ts">
365
333
  import { ref } from 'vue';
366
- import { BbAccordion, BbIcon } from 'bitboss-ui';
334
+ import { BbAccordion } from 'bitboss-ui';
367
335
 
368
336
  type Plan = { name: string; price: string; features: string[] };
369
337
 
@@ -393,50 +361,21 @@ const openIndex = ref<number | null>(0);
393
361
  ### Nesting accordions
394
362
 
395
363
  Panels nest without extra wiring: the body animates with CSS grid rows, so an
396
- inner panel opening simply grows the outer one. Keep the hierarchy readable with
397
- padding on the nested body content.
364
+ inner panel opening simply grows the outer one. Each accordion's default look
365
+ and chevron follow its own panel only, and a nested `#header` accordion keeps
366
+ its own markup.
398
367
 
399
368
  **A settings section with a nested advanced panel**
400
369
 
401
370
  ```vue
402
371
  <template>
403
- <div
404
- class="max-w-md overflow-hidden rounded-(--bb-radius) border border-(--bb-border)"
405
- >
406
- <BbAccordion v-model="notifications">
407
- <template #header="{ open }">
408
- <div
409
- class="flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm font-medium"
410
- >
411
- <span>Notifications</span>
412
- <span
413
- class="shrink-0 text-(--bb-text-muted) transition-transform duration-200"
414
- :class="open ? 'rotate-180' : ''"
415
- >
416
- <BbIcon icon="lucide:chevron-down" size="sm" />
417
- </span>
418
- </div>
419
- </template>
420
- <div class="flex flex-col gap-2 px-3 pb-2.5 text-sm">
372
+ <div class="max-w-md">
373
+ <BbAccordion v-model="notifications" title="Notifications">
374
+ <div class="flex flex-col gap-2">
421
375
  <BbCheckbox v-model="mentions" label="Mentions" />
422
376
  <BbCheckbox v-model="digests" label="Weekly digest" />
423
- <BbAccordion v-model="advanced">
424
- <template #header="{ open }">
425
- <div
426
- class="flex w-full items-center justify-between gap-2 py-1 text-left text-sm text-(--bb-text-muted)"
427
- >
428
- <span>Advanced</span>
429
- <span
430
- class="shrink-0 transition-transform duration-200"
431
- :class="open ? 'rotate-180' : ''"
432
- >
433
- <BbIcon icon="lucide:chevron-down" size="sm" />
434
- </span>
435
- </div>
436
- </template>
437
- <div class="pt-1 pb-1">
438
- <BbCheckbox v-model="quiet" label="Quiet hours (22:00–08:00)" />
439
- </div>
377
+ <BbAccordion v-model="advanced" title="Advanced">
378
+ <BbCheckbox v-model="quiet" label="Quiet hours (22:00–08:00)" />
440
379
  </BbAccordion>
441
380
  </div>
442
381
  </BbAccordion>
@@ -445,7 +384,7 @@ padding on the nested body content.
445
384
 
446
385
  <script setup lang="ts">
447
386
  import { ref } from 'vue';
448
- import { BbAccordion, BbCheckbox, BbIcon } from 'bitboss-ui';
387
+ import { BbAccordion, BbCheckbox } from 'bitboss-ui';
449
388
 
450
389
  const notifications = ref(true);
451
390
  const mentions = ref(true);
@@ -473,11 +412,13 @@ get a near-instant transition automatically.
473
412
  **Eager body with a slower transition**
474
413
 
475
414
  ```vue
476
- <BbAccordion v-model="state.shipping" eager :transition-duration="350">
477
- <template #header>
478
- <span class="px-3 py-2 text-sm font-medium">Shipping details</span>
479
- </template>
480
- <p class="px-3 pb-3 text-sm text-(--bb-text-muted)">
415
+ <BbAccordion
416
+ v-model="state.shipping"
417
+ eager
418
+ title="Shipping details"
419
+ :transition-duration="350"
420
+ >
421
+ <p class="text-(--bb-text-muted)">
481
422
  Rendered up front so its text is present even while collapsed.
482
423
  </p>
483
424
  </BbAccordion>
@@ -503,8 +444,7 @@ controls, not titles.
503
444
 
504
445
  ```vue
505
446
  <h2>Billing questions</h2>
506
- <BbAccordion v-model="open" :heading-level="3">
507
- <template #header>Can I change plans?</template>
447
+ <BbAccordion v-model="open" :heading-level="3" title="Can I change plans?">
508
448
  Yes, at any time.
509
449
  </BbAccordion>
510
450
  ```
@@ -513,59 +453,48 @@ controls, not titles.
513
453
 
514
454
  `pt` reaches a named part with a class list — or, in the object form, a
515
455
  style and attributes — optionally only while a state is on. Parts: `root`,
516
- `header` (the trigger button) and `panel` (the region the header controls). State:
517
- `open`. There is no chevron of ours — the header is your slot markup — so there
518
- is no `icon`.
519
-
520
- The pricing-page FAQ above, restyled through those parts: layout, type and
521
- hover on `pt:header` (children are click-transparent, so hover belongs on the
522
- button), a heavier weight on `pt:header:open`, join lines on `pt:root`. Padding
523
- can go on `pt:panel`: the panel sits inside the collapsing region, so it
524
- collapses with the body.
456
+ `header` (the trigger button), `title` (its text), `icon` (the chevron) and
457
+ `panel` (the region the header controls). State: `open`. `title` and `icon`
458
+ exist only without a `#header` slot. The default look is one class deep, so a
459
+ `pt:*` utility overrides it.
460
+
461
+ The pricing-page FAQ above, restyled through those parts: a tighter trigger
462
+ and a hover underline on `pt:header` (children are click-transparent, so hover
463
+ belongs on the button), a brand chevron on `pt:icon`, a heavier title while
464
+ open on `pt:title:open`, and the answer's colour and padding on `pt:panel`
465
+ (inside the collapsing region, so it collapses with the body).
525
466
 
526
467
  **pt:header — the FAQ trigger, a wash while open**
527
468
 
528
469
  ```vue
529
470
  <template>
530
- <div
531
- class="max-w-2xl overflow-hidden rounded-(--bb-radius) border border-(--bb-border)"
532
- >
471
+ <div class="max-w-2xl">
533
472
  <BbAccordion
534
- v-for="(faq, index) in faqs"
473
+ v-for="faq in faqs"
535
474
  :key="faq.question"
536
475
  v-model="faq.open"
537
- pt:header="flex items-center justify-between gap-2 px-3 py-2 text-left text-sm font-medium hover:underline"
538
- pt:header:open="font-semibold"
539
- pt:panel="text-sm"
540
- :pt:root="index ? 'border-t border-(--bb-border)' : ''"
476
+ pt:header="py-3 hover:underline"
477
+ pt:icon="text-(--bb-primary)"
478
+ pt:panel="pb-3 text-(--bb-text-muted)"
479
+ pt:title:open="font-semibold"
480
+ :title="faq.question"
541
481
  >
542
- <template #header="{ open }">
543
- <span>{{ faq.question }}</span>
544
- <span
545
- class="shrink-0 text-(--bb-text-muted) transition-transform duration-200"
546
- :class="open ? 'rotate-180' : ''"
547
- >
548
- <BbIcon icon="lucide:chevron-down" size="sm" />
549
- </span>
550
- </template>
551
-
552
- <p class="px-3 pb-2.5 text-(--bb-text-muted)">
553
- {{ faq.answer }}
554
- </p>
482
+ {{ faq.answer }}
555
483
  </BbAccordion>
556
484
  </div>
557
485
  </template>
558
486
 
559
487
  <script setup lang="ts">
560
488
  import { ref } from 'vue';
561
- import { BbAccordion, BbIcon } from 'bitboss-ui';
489
+ import { BbAccordion } from 'bitboss-ui';
562
490
 
563
491
  type Faq = { question: string; answer: string; open: boolean };
564
492
 
565
- // Same pricing-page FAQ as `FaqList.vue`, restyled through passthrough:
566
- // layout and hover on `pt:header`, a heavier weight on `pt:header:open`,
567
- // join lines on `pt:root`. Padding may go on `pt:panel` or the slotted body
568
- // alike: the panel is inside the collapsing region, so both collapse.
493
+ // Same pricing-page FAQ as `FaqList.vue`, restyled through passthrough: a
494
+ // tighter trigger and a hover underline on `pt:header`, a brand chevron on
495
+ // `pt:icon`, a heavier title while open on `pt:title:open`, and the answer's
496
+ // colour and padding on `pt:panel` (inside the collapsing region, so it
497
+ // collapses with the body).
569
498
  const faqs = ref<Faq[]>([
570
499
  {
571
500
  question: 'Can I change plans mid-cycle?',
@@ -599,8 +528,6 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
599
528
 
600
529
  ### Works well with
601
530
 
602
- - `BbIcon` — a rotating chevron in the header, driven by the slot's `open` (see
603
- the FAQ example).
604
531
  - `BbBadge` — counts or soft method/status pills in the header (see the API
605
532
  reference example); non-interactive content stays click-transparent.
606
533
  - `BbCollapsible` / `BbSmoothHeight` — the rungs to step down to when the
@@ -630,8 +557,9 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
630
557
  the accordion in your own `<hN>` instead.
631
558
  - Keyboard comes free with the native button: Tab to the header, Enter/Space
632
559
  toggles. Closed content is `inert`, so it can never be tabbed into.
633
- - Provide a visible, meaningful header label; the chevron is decorative (mark
634
- custom SVGs `aria-hidden`).
560
+ - Provide a visible, meaningful header label (`title`); the built-in chevron
561
+ is decorative and hidden from assistive tech (mark your own SVGs in a
562
+ `#header` `aria-hidden`).
635
563
  - Honours `prefers-reduced-motion` via the underlying `BbCollapsible`.
636
564
 
637
565
  ## v-model
@@ -642,11 +570,12 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
642
570
 
643
571
  | Prop | Type | Default | Required | Description |
644
572
  | --- | --- | --- | --- | --- |
645
- | `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: `header`, `panel`, `root`. States: `open`. 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 `BbAccordionProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
573
+ | `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: `header`, `icon`, `panel`, `root`, `title`. States: `open`. 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 `BbAccordionProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
646
574
  | `eager` | `boolean \| undefined` | `false` | | Renders the content at mount, while closed, instead of on the first open. Closed content is `inert` and `aria-hidden` either way. |
647
575
  | `headingLevel` | `1 \| 2 \| 3 \| 4 \| 5 \| 6 \| undefined` | | | Wraps the header button in a heading of this level (`<h1>`–`<h6>`, the APG accordion shape) so it joins the page outline: under an `<h2>`, pass `3`. Its margins and font are reset. Omitted, no heading. |
648
576
  | `id` | `string \| undefined` | | | The root's `id`; the header button's id (`<id>_header`) derives from it. Generated when omitted. |
649
577
  | `modelValue` | `boolean \| undefined` | `false` | | Used by v-model to trigger opening / closing the collapsible. An accordion with no `v-model` starts closed. |
578
+ | `title` | `string \| undefined` | | | The trigger's text, with a chevron at its end that turns when open, in the default look (padding, a hairline under the item). `#title` replaces the text only; `#header` replaces the whole trigger (no chevron, no default look). |
650
579
  | `transitionDuration` | `number \| undefined` | `250` | | How long the transition has to last in milliseconds |
651
580
 
652
581
  ## Passthrough parts and states
@@ -656,7 +585,9 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
656
585
  | Part | What it is |
657
586
  | --- | --- |
658
587
  | `root` | The accordion's outer element: the header and its panel. |
659
- | `header` | The trigger button that opens and closes the panel. Its content is your slot markup — there is no chevron of ours, so no `icon` part. |
588
+ | `header` | The trigger button that opens and closes the panel. |
589
+ | `title` | The trigger's text (`title` / `#title`). Absent under a `#header` slot, which replaces the whole trigger content. |
590
+ | `icon` | The chevron at the trigger's end, turned when open. Absent under a `#header` slot. |
660
591
  | `panel` | The region the header controls (the ARIA accordion panel). |
661
592
 
662
593
  States are listed in precedence order: when two are on at once and their entries conflict, the later one wins.
@@ -672,7 +603,16 @@ States are listed in precedence order: when two are on at once and their entries
672
603
  ## Slots
673
604
 
674
605
  - `default` — scope: `BbAccordionToggleSlotProps` `{ open: boolean; toggle: () => void }` — The collapsible body content shown when the accordion is open.
675
- - `header` — scope: `BbAccordionToggleSlotProps` `{ open: boolean; toggle: () => void }` — Content rendered inside the accordion header button.
606
+ - `header` — scope: `BbAccordionToggleSlotProps` `{ open: boolean; toggle: () => void }` — Replaces the whole trigger content: the text and the chevron, and the default look with them. The button, its ARIA and its focus ring stay.
607
+ - `title` — scope: `BbAccordionToggleSlotProps` `{ open: boolean; toggle: () => void }` — Replaces the trigger's text only (the `title` prop); the chevron and the default look stay.
608
+
609
+ ## CSS custom properties
610
+
611
+ Set these on the element, or on a class you put on it, to retune this component alone — the sanctioned alternative to reaching past the API with `:deep()`. They are this component's own locals — a **Set on** of `pt:<part>` means the local lives on that part's element, so set it through that entry (`pt:box="[--border-color:var(--color-green-500)]"`); the global `--bb-*` theme tokens are a separate tier (see the [design-tokens guide](./guides/design-tokens.md), or the MCP `list_tokens` tool).
612
+
613
+ | Property | Default | What it is |
614
+ | --- | --- | --- |
615
+ | `--py` | `16px` | trigger padding, and the panel's bottom padding |
676
616
 
677
617
  ## Component tree
678
618
 
@@ -683,9 +623,10 @@ States are listed in precedence order: when two are on at once and their entries
683
623
  - **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 `BbAccordion`'s root, where the node's own declaration masks it (design-tokens guide, _Overriding one from a consumer app_, rule 0).
684
624
  - Listed nodes are the ones `BbAccordion`'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/BbAccordion.tree.json`.
685
625
 
686
- - `BbAccordion` _(this component)_ — its own template binds: `header` → `BbBaseButton`, `panel` → `div.bb-accordion__panel`
626
+ - `BbAccordion` _(this component)_ — its own template binds: `header` → `BbBaseButton`, `title` → `span.bb-accordion__title`, `icon` → `BbIcon`, `panel` → `div.bb-accordion__panel`
687
627
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
688
628
  - `BbCollapsible` _(public — [contract](./BbCollapsible.md))_ — its own pt parts (`BbCollapsible`): `content` → `component.bb-collapsible__content`
629
+ - Also mounts `BbIcon`
689
630
 
690
631
  ## See Also
691
632
 
@@ -51,7 +51,9 @@ Pick a variant by intent, not decoration. `outline` is the quietest (neutral
51
51
  info); `primary` carries a branded, actionable note; `warning` flags something
52
52
  the user should attend to; `destructive` reports a failure or dangerous state.
53
53
  An alert reads far better with a matching leading `icon`, so treat variant and
54
- icon as a pair.
54
+ icon as a pair, and pair them once: the object form of the plugin's
55
+ `alertVariants` sets each variant's icon for the whole app (see Variant icons
56
+ below).
55
57
 
56
58
  There is no `success` or `info` alert, on purpose (the built-in ramps stay
57
59
  closed): a confirmation is usually a toast, and a neutral note is `outline`
@@ -96,13 +98,38 @@ with an icon. When an app needs one anyway, register it with the plugin's
96
98
  The default variant is `outline`. `warning` and `destructive` are treated as
97
99
  high-priority for accessibility (see below).
98
100
 
99
- There is no `success` (or `positive`) variant, and it will not be added — the
101
+ There is no built-in `success` (or `positive`) variant, and none will be added — the
100
102
  shared status vocabulary is closed to `danger`/`warn` by ruling, see
101
103
  [Design Tokens § Brand knobs](./guides/design-tokens.md#brand-knobs-what-a-theme-builder-sets)
102
104
  ("state colors are project-owned"). Reach for `primary` for a positive
103
- confirmation, or register your own variant (below) if the project needs a
105
+ confirmation, or register your own project variant (below) if you need a
104
106
  distinct success tone.
105
107
 
108
+ #### Variant icons
109
+
110
+ ```ts
111
+ // vite.config.ts (Nuxt: the `bitboss` key)
112
+ bitbossUi({
113
+ alertVariants: {
114
+ warning: { icon: 'lucide:triangle-alert' },
115
+ destructive: { icon: 'lucide:circle-x' },
116
+ success: { icon: 'lucide:circle-check' }, // a project variant, with its icon
117
+ },
118
+ });
119
+ ```
120
+
121
+ An alert without its own `icon` shows its variant's; its own `icon` wins;
122
+ `hide-icon` hides either, and does nothing when there is no icon:
123
+
124
+ ```vue
125
+ <BbAlert variant="warning" title="Heads up" />
126
+ <BbAlert variant="warning" icon="lucide:clock" title="Runs at midnight" />
127
+ <BbAlert variant="warning" hide-icon title="Plain" />
128
+ ```
129
+
130
+ A key registers its name (a built-in name only gets its icon); the array form
131
+ still just registers names.
132
+
106
133
  #### Registering project variants
107
134
 
108
135
  Variants are an open registry, not a closed enum. The vite/nuxt plugin's
@@ -128,14 +155,14 @@ bitbossUi({
128
155
  transparent
129
156
  ); /* body + close */
130
157
  --bg: transparent;
131
- border-color: var(--bb-border);
158
+ --border-color: var(--bb-border);
132
159
  }
133
160
  ```
134
161
 
135
162
  One a11y catch: only `warning` and `destructive` are hard-coded as
136
163
  high-priority. A custom variant — however alarming its name — announces as
137
- `role="status"` / `aria-live="polite"` unless you also pass `role="alert"` /
138
- `aria-live="assertive"` on urgent instances.
164
+ `role="status"` / `aria-live="polite"` unless you pass `role="alert"` on
165
+ urgent instances (the role brings `aria-live="assertive"` with it).
139
166
 
140
167
  ### Dismissal and v-model
141
168
 
@@ -447,7 +474,9 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
447
474
  variant: `warning` / `destructive` announce as `role="alert"` /
448
475
  `aria-live="assertive"`; every other variant (built-in or custom) uses
449
476
  `role="status"` / `aria-live="polite"`. Override per instance with the
450
- `role` / `aria-live` props only with a specific reason.
477
+ `role` / `aria-live` props only with a specific reason. A `role` alone
478
+ brings its politeness (`alert` → `assertive`, `status` → `polite`); an
479
+ explicit `aria-live` wins over it.
451
480
  - The alert is `aria-atomic`, so updating its text re-announces the whole
452
481
  message rather than a fragment.
453
482
  - The close button ships with a localised label (plugin `locale`); pass
@@ -464,10 +493,11 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
464
493
  | Prop | Type | Default | Required | Description |
465
494
  | --- | --- | --- | --- | --- |
466
495
  | `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>`. |
467
- | `ariaLive` | `"off" \| "polite" \| "assertive" \| undefined` | | | ARIA live region politeness. Defaults to `'assertive'` for destructive/warning variants, otherwise `'polite'`. |
496
+ | `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'`. |
468
497
  | `closeLabel` | `string \| undefined` | | | Visually hidden string used to label the close button. |
469
498
  | `hideClose` | `boolean \| undefined` | `false` | | Defines whether to hide the close button. |
470
- | `icon` | `string \| undefined` | | | Name of a registered icon to use, or a full raw `<svg>` string (e.g. an SVG file imported with `?raw`). |
499
+ | `hideIcon` | `boolean \| undefined` | `false` | | Hide the icon, its own or its variant's; with neither it does nothing. |
500
+ | `icon` | `string \| undefined` | | | Name of a registered icon to use, or a full raw `<svg>` string (e.g. an SVG file imported with `?raw`). Without one, the variant's icon from the build plugin's `alertVariants` object form shows (none by default). |
471
501
  | `iconSize` | `number \| CssSize \| keyof Sizes \| undefined` | `"16"` | | Size of the icon to use. |
472
502
  | `modelValue` | `boolean \| undefined` | `true` | | Used by v-model. Alerts are visible on mount; the model dismisses them. |
473
503
  | `role` | `"alert" \| "status" \| undefined` | | | Accessibility role for the alert container. Defaults to `'alert'` for destructive/warning variants, otherwise `'status'`. |
@@ -483,7 +513,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
483
513
  | Part | What it is |
484
514
  | --- | --- |
485
515
  | `root` | The alert box. |
486
- | `icon` | The leading glyph — rendered only when an `icon` is set. |
516
+ | `icon` | The leading glyph — its `icon`, else its variant's from the build config; never with `hide-icon`. |
487
517
  | `title` | The heading line. |
488
518
  | `text` | The body copy. |
489
519
  | `close` | The ✕ that dismisses the alert. |
@@ -507,10 +537,10 @@ Set these on the element, or on a class you put on it, to retune this component
507
537
  | `--px` | `10px` | side padding of the plate |
508
538
  | `--py` | `6px` | top/bottom padding of the plate, and the close button's inset from those edges |
509
539
  | `--gap` | `4px` | icon column → content gap, reused between title parts and in the close button's reserved width |
510
- | `--title-size` | `14px` | icon column → content gap, reused between title parts and in the close button's reserved width |
540
+ | `--title-size` | `14px` | title font size |
511
541
  | `--title-lh` | `18px` | title line box — the close button is centred on it |
512
- | `--text-size` | `14px` | title line box — the close button is centred on it |
513
- | `--text-lh` | `18px` | |
542
+ | `--text-size` | `14px` | body text font size |
543
+ | `--text-lh` | `18px` | body text line height |
514
544
  | `--close-size` | `16px` | close glyph; also the width reserved at the end of the title |
515
545
  | `--bg` | `transparent` | plate fill |
516
546
  | `--fg` | `var(--bb-text)` | title and icon |
@@ -532,4 +562,4 @@ Set these on the element, or on a class you put on it, to retune this component
532
562
 
533
563
  ## See Also
534
564
 
535
- - [BbToast](./BbToast.md) — Shows transient notification messages (includes the co-located BbToastPortal export).
565
+ - [useToast](./composables/useToast.md)