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
@@ -1,23 +1,44 @@
1
- import { usePassthrough as e } from "../../composables/usePassthrough.js";
2
- import { useConfig as t } from "../../composables/useConfig.js";
3
- import { removedPropsFor as n } from "../../deprecation/removedProps.js";
4
- import { warnRemovedAttrs as r } from "../../utilities/functions/warnRemovedAttrs.js";
5
- import { transitions as i } from "../../utilities/misc/transitions.js";
6
- import { useLocale as a } from "../../composables/useLocale.js";
7
- import o from "../BbIcon/BbIcon.vue.js";
8
- import s from "../ClearableButton/ClearableButton.vue.js";
9
- import { BB_ALERT_PT as c } from "./types.js";
10
- import { Transition as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, defineComponent as g, guardReactiveProps as _, mergeModels as v, mergeProps as y, normalizeProps as b, openBlock as x, renderSlot as S, toDisplayString as C, unref as w, useAttrs as T, useModel as E, withCtx as D } from "vue";
1
+ import { usePassthrough as e, variantPt as t } from "../../composables/usePassthrough.js";
2
+ import { useConfig as n } from "../../composables/useConfig.js";
3
+ import { removedPropsFor as r } from "../../deprecation/removedProps.js";
4
+ import { warnRemovedAttrs as i } from "../../utilities/functions/warnRemovedAttrs.js";
5
+ import { transitions as a } from "../../utilities/misc/transitions.js";
6
+ import { useLocale as o } from "../../composables/useLocale.js";
7
+ import s from "../BbIcon/BbIcon.vue.js";
8
+ import c from "../ClearableButton/ClearableButton.vue.js";
9
+ import { BB_ALERT_PT as l } from "./types.js";
10
+ import { Transition as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, defineComponent as _, guardReactiveProps as v, mergeModels as y, mergeProps as b, normalizeProps as x, openBlock as S, renderSlot as C, toDisplayString as w, unref as T, useAttrs as E, useModel as D, withCtx as O } from "vue";
11
11
  //#region src/components/BbAlert/BbAlert.vue?vue&type=script&setup=true&lang.ts
12
- var O = ["aria-live", "role"], k = { class: "bb-alert__inner-container" }, A = { class: "bb-alert__icon-container" }, j = { class: "bb-alert__content" }, M = /*@__PURE__*/ g({
12
+ var k = ["aria-live", "role"], A = { class: "bb-alert__inner-container" }, j = { class: "bb-alert__icon-container" }, M = { class: "bb-alert__content" }, N = /*@__PURE__*/ _({
13
+ mixins: [t(l)],
13
14
  inheritAttrs: !1,
14
15
  __name: "BbAlert",
15
- props: /*@__PURE__*/ v({
16
+ props: /*@__PURE__*/ y({
16
17
  "pt:root": {},
17
18
  "pt:icon": {},
18
19
  "pt:title": {},
19
20
  "pt:text": {},
20
21
  "pt:close": {},
22
+ "pt:root:outline": {},
23
+ "pt:root:primary": {},
24
+ "pt:root:destructive": {},
25
+ "pt:root:warning": {},
26
+ "pt:icon:outline": {},
27
+ "pt:icon:primary": {},
28
+ "pt:icon:destructive": {},
29
+ "pt:icon:warning": {},
30
+ "pt:title:outline": {},
31
+ "pt:title:primary": {},
32
+ "pt:title:destructive": {},
33
+ "pt:title:warning": {},
34
+ "pt:text:outline": {},
35
+ "pt:text:primary": {},
36
+ "pt:text:destructive": {},
37
+ "pt:text:warning": {},
38
+ "pt:close:outline": {},
39
+ "pt:close:primary": {},
40
+ "pt:close:destructive": {},
41
+ "pt:close:warning": {},
21
42
  pt: {},
22
43
  closeLabel: {},
23
44
  hideClose: { type: Boolean },
@@ -26,7 +47,7 @@ var O = ["aria-live", "role"], k = { class: "bb-alert__inner-container" }, A = {
26
47
  variant: { default: "outline" },
27
48
  role: {},
28
49
  ariaLive: {},
29
- transitionDuration: { default: i.medium },
50
+ transitionDuration: { default: a.medium },
30
51
  icon: {},
31
52
  hideIcon: { type: Boolean },
32
53
  iconSize: { default: "16" },
@@ -39,45 +60,49 @@ var O = ["aria-live", "role"], k = { class: "bb-alert__inner-container" }, A = {
39
60
  modelModifiers: {}
40
61
  }),
41
62
  emits: ["update:modelValue"],
42
- setup(i) {
43
- let g = E(i, "modelValue"), v = i, M = e({
63
+ setup(t) {
64
+ let a = D(t, "modelValue"), _ = t, y = e({
44
65
  component: "BbAlert",
45
- attrs: T(),
46
- props: v,
47
- parts: c.parts,
48
- states: c.states,
49
- active: {}
66
+ attrs: E(),
67
+ props: _,
68
+ parts: l.parts,
69
+ states: l.states,
70
+ active: {},
71
+ variant: {
72
+ ...l.variant,
73
+ current: () => _.variant
74
+ }
50
75
  });
51
- process.env.NODE_ENV !== "production" && r("BbAlert", n("BbAlert"));
52
- let { t: N } = a(), P = t(), F = u(() => v.hideIcon ? void 0 : v.icon ?? P.variantIcons?.alert?.[v.variant]), I = u(() => v.variant === "destructive" || v.variant === "warning"), L = u(() => v.role ?? (I.value ? "alert" : "status")), R = u(() => v.ariaLive ? v.ariaLive : v.role ? v.role === "alert" ? "assertive" : "polite" : I.value ? "assertive" : "polite"), z = () => {
53
- g.value = !1;
76
+ process.env.NODE_ENV !== "production" && i("BbAlert", r("BbAlert"));
77
+ let { t: N } = o(), P = n(), F = d(() => _.hideIcon ? void 0 : _.icon ?? P.variantIcons?.alert?.[_.variant]), I = d(() => _.variant === "destructive" || _.variant === "warning"), L = d(() => _.role ?? (I.value ? "alert" : "status")), R = d(() => _.ariaLive ? _.ariaLive : _.role ? _.role === "alert" ? "assertive" : "polite" : I.value ? "assertive" : "polite"), z = () => {
78
+ a.value = !1;
54
79
  };
55
- return (e, t) => (x(), d(l, { name: "bb-alert-transition" }, {
56
- default: D(() => [g.value ? (x(), p("div", y({
80
+ return (e, t) => (S(), f(u, { name: "bb-alert-transition" }, {
81
+ default: O(() => [a.value ? (S(), m("div", b({
57
82
  key: 0,
58
83
  "aria-atomic": "true",
59
84
  "aria-live": R.value,
60
- class: ["bb-alert", `bb-alert--${v.variant}`],
85
+ class: ["bb-alert", `bb-alert--${_.variant}`],
61
86
  role: L.value,
62
- style: { "--transition-duration": `${v.transitionDuration}ms` }
63
- }, w(M).rootAttrs), [m("div", k, [m("div", A, [F.value ? (x(), d(o, y({
87
+ style: { "--transition-duration": `${_.transitionDuration}ms` }
88
+ }, T(y).rootAttrs), [h("div", A, [h("div", j, [F.value ? (S(), f(s, b({
64
89
  key: 0,
65
90
  class: "bb-alert__icon",
66
91
  icon: F.value,
67
92
  size: e.iconSize
68
- }, w(M).icon), null, 16, ["icon", "size"])) : f("", !0)]), m("div", j, [
69
- e.hideClose ? f("", !0) : (x(), d(s, y({
93
+ }, T(y).icon), null, 16, ["icon", "size"])) : p("", !0)]), h("div", M, [
94
+ e.hideClose ? p("", !0) : (S(), f(c, b({
70
95
  key: 0,
71
96
  class: "bb-alert__close",
72
- label: e.closeLabel || w(N)("common.closeLabel").value,
97
+ label: e.closeLabel || T(N)("common.closeLabel").value,
73
98
  onClick: z
74
- }, w(M).close), null, 16, ["label"])),
75
- m("div", y({ class: "bb-alert__title" }, w(M).title), [S(e.$slots, "title", b(_({ text: e.title })), () => [h(C(e.title), 1)])], 16),
76
- m("div", y({ class: "bb-alert__text" }, w(M).text), [S(e.$slots, "text", b(_({ text: e.text })), () => [S(e.$slots, "default", {}, () => [h(C(e.text), 1)])])], 16)
77
- ])])], 16, O)) : f("", !0)]),
99
+ }, T(y).close), null, 16, ["label"])),
100
+ h("div", b({ class: "bb-alert__title" }, T(y).title), [C(e.$slots, "title", x(v({ text: e.title })), () => [g(w(e.title), 1)])], 16),
101
+ h("div", b({ class: "bb-alert__text" }, T(y).text), [C(e.$slots, "text", x(v({ text: e.text })), () => [C(e.$slots, "default", {}, () => [g(w(e.text), 1)])])], 16)
102
+ ])])], 16, k)) : p("", !0)]),
78
103
  _: 3
79
104
  }));
80
105
  }
81
106
  });
82
107
  //#endregion
83
- export { M as default };
108
+ export { N as default };
@@ -1,5 +1,5 @@
1
- import { AlertVariantType } from '../../types/AlertVariant';
2
- import { PtMap, PtValue } from '../../types/passthrough';
1
+ import { AlertVariantBuiltIn, AlertVariantRegistry, AlertVariantType } from '../../types/AlertVariant';
2
+ import { PtMap, PtValue, PtVariantAttrs } from '../../types/passthrough';
3
3
  import { IconType } from '../../types/Icon';
4
4
  import { BbIconProps } from '../BbIcon/types';
5
5
  /**
@@ -18,15 +18,19 @@ export type BbAlertPtPart = 'root' | 'icon' | 'title' | 'text' | 'close';
18
18
  export declare const BB_ALERT_PT: {
19
19
  readonly parts: readonly ["root", "icon", "title", "text", "close"];
20
20
  readonly states: readonly [];
21
+ readonly variant: {
22
+ readonly names: readonly ["outline", "primary", "destructive", "warning"];
23
+ readonly option: "alertVariants";
24
+ };
21
25
  };
22
26
  export type BbAlertProps = {
23
- [K in `pt:${BbAlertPtPart}`]?: PtValue;
24
- } & {
27
+ [K in `pt:${BbAlertPtPart}` | `pt:${BbAlertPtPart}:${AlertVariantBuiltIn}`]?: PtValue;
28
+ } & /* @vue-ignore */ PtVariantAttrs<BbAlertPtPart, keyof AlertVariantRegistry> & {
25
29
  /**
26
30
  * Passthrough, object form: the same keys as the `pt:*` attributes
27
31
  * without the prefix. See the `pt:<part>` row.
28
32
  */
29
- pt?: PtMap<BbAlertPtPart, never>;
33
+ pt?: PtMap<BbAlertPtPart, AlertVariantBuiltIn | keyof AlertVariantRegistry>;
30
34
  /**
31
35
  * Visually hidden string used to label the close button.
32
36
  */
@@ -1,5 +1,6 @@
1
+ import { ALERT_VARIANTS as e } from "../../types/AlertVariant.js";
1
2
  //#region src/components/BbAlert/types.ts
2
- var e = {
3
+ var t = {
3
4
  parts: [
4
5
  "root",
5
6
  "icon",
@@ -7,7 +8,11 @@ var e = {
7
8
  "text",
8
9
  "close"
9
10
  ],
10
- states: []
11
+ states: [],
12
+ variant: {
13
+ names: e,
14
+ option: "alertVariants"
15
+ }
11
16
  };
12
17
  //#endregion
13
- export { e as BB_ALERT_PT };
18
+ export { t as BB_ALERT_PT };
@@ -1,8 +1,8 @@
1
- declare var __VLS_11: {}, __VLS_23: {};
1
+ declare var __VLS_16: {}, __VLS_33: {};
2
2
  type __VLS_Slots = {} & {
3
- default?: (props: typeof __VLS_11) => any;
3
+ default?: (props: typeof __VLS_16) => any;
4
4
  } & {
5
- default?: (props: typeof __VLS_23) => any;
5
+ default?: (props: typeof __VLS_33) => any;
6
6
  };
7
7
  declare const __VLS_base: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
8
8
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -2,39 +2,48 @@ import { useLogger as e } from "../../composables/useLogger.js";
2
2
  import t from "../BbIcon/BbIcon.vue.js";
3
3
  import n from "../BbSpinner/BbSpinner.vue.js";
4
4
  import { useBadgeHost as r } from "./badgeButtonContext.js";
5
- import { Fragment as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l, mergeProps as u, openBlock as d, renderSlot as f, unref as p } from "vue";
5
+ import { Fragment as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeProps as f, openBlock as p, renderSlot as m, resolveDynamicComponent as h, unref as g } from "vue";
6
6
  //#region src/components/BbBadge/BadgeBodyContent.vue?vue&type=script&setup=true&lang.ts
7
- var m = /*@__PURE__*/ l({
7
+ var _ = /*@__PURE__*/ l({
8
8
  __name: "BadgeBodyContent",
9
9
  setup(l) {
10
- let m = r() ?? e().throw("[BbBadge] internal body renderer mounted outside a badge — this is a bug.");
11
- return (e, r) => p(m).icon.value ? (d(), s(i, { key: 0 }, [p(m).loading.value ? (d(), a(n, u({
10
+ let _ = r() ?? e().throw("[BbBadge] internal body renderer mounted outside a badge — this is a bug.");
11
+ return (e, r) => g(_).icon.value || g(_).slots.icon ? (p(), s(i, { key: 0 }, [g(_).loading.value ? (p(), a(n, d({
12
12
  key: 0,
13
13
  class: "bb-badge__spinner bb-badge__icon"
14
- }, p(m).passthrough.spinner), null, 16)) : (d(), a(t, u({
14
+ }, g(_).passthrough.spinner), null, 16)) : g(_).slots.icon ? (p(), s("span", d({
15
15
  key: 1,
16
+ class: "bb-badge__icon bb-badge__icon-slot"
17
+ }, g(_).passthrough.icon), [(p(), a(h(g(_).slots.icon), f(u(g(_).iconScope.value)), null, 16))], 16)) : g(_).icon.value ? (p(), a(t, d({
18
+ key: 2,
16
19
  class: "bb-badge__icon",
17
- icon: p(m).icon.value
18
- }, p(m).passthrough.icon), null, 16, ["icon"])), c("span", u({ class: "bb-badge__text bb-sr-only" }, p(m).passthrough.text), [f(e.$slots, "default")], 16)], 64)) : (d(), s(i, { key: 1 }, [
19
- p(m).spinnerLeads.value ? (d(), a(n, u({
20
+ icon: g(_).icon.value
21
+ }, g(_).passthrough.icon), null, 16, ["icon"])) : o("", !0), c("span", d({ class: "bb-badge__text bb-sr-only" }, g(_).passthrough.text), [m(e.$slots, "default")], 16)], 64)) : (p(), s(i, { key: 1 }, [
22
+ g(_).spinnerLeads.value ? (p(), a(n, d({
20
23
  key: 0,
21
24
  class: "bb-badge__spinner bb-badge__prepend-icon"
22
- }, p(m).passthrough.spinner), null, 16)) : p(m).prependIcon.value ? (d(), a(t, u({
25
+ }, g(_).passthrough.spinner), null, 16)) : g(_).slots["prepend:icon"] ? (p(), s("span", d({
23
26
  key: 1,
27
+ class: "bb-badge__prepend-icon bb-badge__icon-slot"
28
+ }, g(_).passthrough.icon), [(p(), a(h(g(_).slots["prepend:icon"]), f(u(g(_).iconScope.value)), null, 16))], 16)) : g(_).prependIcon.value ? (p(), a(t, d({
29
+ key: 2,
24
30
  class: "bb-badge__prepend-icon",
25
- icon: p(m).prependIcon.value
26
- }, p(m).passthrough.icon), null, 16, ["icon"])) : o("", !0),
27
- c("span", u({ class: "bb-badge__text" }, p(m).passthrough.text), [f(e.$slots, "default")], 16),
28
- p(m).clearable.value ? o("", !0) : (d(), s(i, { key: 2 }, [p(m).spinnerTrails.value ? (d(), a(n, u({
31
+ icon: g(_).prependIcon.value
32
+ }, g(_).passthrough.icon), null, 16, ["icon"])) : o("", !0),
33
+ c("span", d({ class: "bb-badge__text" }, g(_).passthrough.text), [m(e.$slots, "default")], 16),
34
+ g(_).clearable.value ? o("", !0) : (p(), s(i, { key: 3 }, [g(_).spinnerTrails.value ? (p(), a(n, d({
29
35
  key: 0,
30
36
  class: "bb-badge__append-icon"
31
- }, p(m).passthrough.spinner), null, 16)) : p(m).appendIcon.value ? (d(), a(t, u({
37
+ }, g(_).passthrough.spinner), null, 16)) : g(_).slots["append:icon"] ? (p(), s("span", d({
32
38
  key: 1,
39
+ class: "bb-badge__append-icon bb-badge__icon-slot"
40
+ }, g(_).passthrough.icon), [(p(), a(h(g(_).slots["append:icon"]), f(u(g(_).iconScope.value)), null, 16))], 16)) : g(_).appendIcon.value ? (p(), a(t, d({
41
+ key: 2,
33
42
  class: "bb-badge__append-icon",
34
- icon: p(m).appendIcon.value
35
- }, p(m).passthrough.icon), null, 16, ["icon"])) : o("", !0)], 64))
43
+ icon: g(_).appendIcon.value
44
+ }, g(_).passthrough.icon), null, 16, ["icon"])) : o("", !0)], 64))
36
45
  ], 64));
37
46
  }
38
47
  });
39
48
  //#endregion
40
- export { m as default };
49
+ export { _ as default };
@@ -1,8 +1,8 @@
1
1
  import { useLogger as e } from "../../composables/useLogger.js";
2
- import { usePassthrough as t } from "../../composables/usePassthrough.js";
3
- import { useId as n } from "../../composables/useId.js";
4
- import { removedPropsFor as r } from "../../deprecation/removedProps.js";
5
- import { warnRemovedAttrs as i } from "../../utilities/functions/warnRemovedAttrs.js";
2
+ import { usePassthrough as t, variantPt as n } from "../../composables/usePassthrough.js";
3
+ import { useId as r } from "../../composables/useId.js";
4
+ import { removedPropsFor as i } from "../../deprecation/removedProps.js";
5
+ import { warnRemovedAttrs as ee } from "../../utilities/functions/warnRemovedAttrs.js";
6
6
  import { useLocale as a } from "../../composables/useLocale.js";
7
7
  import o from "../BbIcon/BbIcon.vue.js";
8
8
  import s from "../BbSpinner/BbSpinner.vue.js";
@@ -11,19 +11,20 @@ import l from "./BadgeBodyContent.vue.js";
11
11
  import u from "./BbBadgeButton.vue.js";
12
12
  import d from "../../assets/svgs/clear.svg_raw.js";
13
13
  import { BB_BADGE_PT as f } from "./types.js";
14
- import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createVNode as y, defineComponent as b, isVNode as x, mergeProps as S, openBlock as C, renderSlot as w, toDisplayString as T, unref as E, useAttrs as D, useSlots as O, withCtx as k, withModifiers as A } from "vue";
14
+ import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createVNode as y, defineComponent as b, guardReactiveProps as x, isVNode as S, mergeProps as C, normalizeProps as w, openBlock as T, renderSlot as E, shallowRef as te, toDisplayString as D, unref as O, useAttrs as k, useSlots as A, withCtx as j, withModifiers as M } from "vue";
15
15
  //#region src/components/BbBadge/BbBadge.vue?vue&type=script&setup=true&lang.ts
16
- var j = ["id"], M = {
16
+ var N = ["id"], P = {
17
17
  key: 2,
18
18
  class: "bb-badge__trailing"
19
- }, N = [
19
+ }, F = [
20
20
  "id",
21
21
  "aria-label",
22
22
  "aria-labelledby"
23
- ], P = {
23
+ ], I = {
24
24
  key: 3,
25
25
  class: "bb-sr-only"
26
- }, F = /*@__PURE__*/ b({
26
+ }, L = /*@__PURE__*/ b({
27
+ mixins: [n(f)],
27
28
  inheritAttrs: !1,
28
29
  __name: "BbBadge",
29
30
  props: {
@@ -32,11 +33,41 @@ var j = ["id"], M = {
32
33
  "pt:spinner": {},
33
34
  "pt:text": {},
34
35
  "pt:clear": {},
36
+ "pt:root:activeLink": {},
37
+ "pt:root:exactActiveLink": {},
35
38
  "pt:root:loading": {},
39
+ "pt:icon:activeLink": {},
40
+ "pt:icon:exactActiveLink": {},
36
41
  "pt:icon:loading": {},
42
+ "pt:spinner:activeLink": {},
43
+ "pt:spinner:exactActiveLink": {},
37
44
  "pt:spinner:loading": {},
45
+ "pt:text:activeLink": {},
46
+ "pt:text:exactActiveLink": {},
38
47
  "pt:text:loading": {},
48
+ "pt:clear:activeLink": {},
49
+ "pt:clear:exactActiveLink": {},
39
50
  "pt:clear:loading": {},
51
+ "pt:root:primary": {},
52
+ "pt:root:secondary": {},
53
+ "pt:root:destructive": {},
54
+ "pt:root:outline": {},
55
+ "pt:icon:primary": {},
56
+ "pt:icon:secondary": {},
57
+ "pt:icon:destructive": {},
58
+ "pt:icon:outline": {},
59
+ "pt:spinner:primary": {},
60
+ "pt:spinner:secondary": {},
61
+ "pt:spinner:destructive": {},
62
+ "pt:spinner:outline": {},
63
+ "pt:text:primary": {},
64
+ "pt:text:secondary": {},
65
+ "pt:text:destructive": {},
66
+ "pt:text:outline": {},
67
+ "pt:clear:primary": {},
68
+ "pt:clear:secondary": {},
69
+ "pt:clear:destructive": {},
70
+ "pt:clear:outline": {},
40
71
  pt: {},
41
72
  icon: {},
42
73
  "prepend:icon": {},
@@ -48,87 +79,109 @@ var j = ["id"], M = {
48
79
  variant: { default: "primary" }
49
80
  },
50
81
  emits: ["click:clear"],
51
- setup(b, { emit: F }) {
52
- let I = b, L = F, R = O(), z = t({
82
+ setup(n, { emit: b }) {
83
+ let L = n, R = b, z = A(), B = te(null), V = t({
53
84
  component: "BbBadge",
54
- attrs: D(),
55
- props: I,
85
+ attrs: k(),
86
+ props: L,
56
87
  parts: f.parts,
57
88
  states: f.states,
58
- active: { loading: () => !!I.loading }
89
+ active: {
90
+ loading: () => !!L.loading,
91
+ activeLink: () => !!B.value?.value.activeLink,
92
+ exactActiveLink: () => !!B.value?.value.exactActiveLink
93
+ },
94
+ variant: {
95
+ ...f.variant,
96
+ current: () => L.variant
97
+ }
59
98
  });
60
- process.env.NODE_ENV !== "production" && i("BbBadge", r("BbBadge"));
61
- let B = [
99
+ process.env.NODE_ENV !== "production" && ee("BbBadge", i("BbBadge"));
100
+ let H = [
62
101
  "xs",
63
102
  "sm",
64
103
  "md",
65
104
  "lg",
66
105
  "xl",
67
106
  "2xl"
68
- ], { t: V } = a(), H = e(), U = m(() => B.includes(I.size) ? I.size : (H.warn(`Invalid size: "${I.size}" in BbBadge. Expected one of: ${B.join(", ")}. Falling back to "md".`), "md")), W = () => !!I["append:icon"] && !I["prepend:icon"], G = (e) => Array.isArray(e) && e.some((e) => x(e) && (e.type === u || e.type === p && G(e.children))), K = () => G(R.default?.({}));
107
+ ], { t: U } = a(), W = e(), G = m(() => H.includes(L.size) ? L.size : (W.warn(`Invalid size: "${L.size}" in BbBadge. Expected one of: ${H.join(", ")}. Falling back to "md".`), "md")), K = () => !!L.icon || !!z.icon, q = () => !!L["prepend:icon"] || !!z["prepend:icon"], J = () => !!L["append:icon"] || !!z["append:icon"], Y = () => ({
108
+ activeLink: !!B.value?.value.activeLink,
109
+ exactActiveLink: !!B.value?.value.exactActiveLink,
110
+ loading: !!L.loading
111
+ }), X = () => J() && !q(), Z = (e) => Array.isArray(e) && e.some((e) => S(e) && (e.type === u || e.type === p && Z(e.children))), Q = () => Z(z.default?.({}));
69
112
  c({
70
- passthrough: z,
113
+ passthrough: V,
71
114
  icon: { get value() {
72
- return I.icon;
115
+ return L.icon;
116
+ } },
117
+ slots: z,
118
+ iconScope: { get value() {
119
+ return Y();
73
120
  } },
74
121
  prependIcon: { get value() {
75
- return I["prepend:icon"];
122
+ return L["prepend:icon"];
76
123
  } },
77
124
  appendIcon: { get value() {
78
- return I["append:icon"];
125
+ return L["append:icon"];
79
126
  } },
80
127
  loading: { get value() {
81
- return !!I.loading;
128
+ return !!L.loading;
82
129
  } },
83
130
  spinnerLeads: { get value() {
84
- return !!I.loading && !W();
131
+ return !!L.loading && !X();
85
132
  } },
86
133
  spinnerTrails: { get value() {
87
- return !!I.loading && W();
134
+ return !!L.loading && X();
88
135
  } },
89
136
  clearable: { get value() {
90
- return !!I.clearable;
91
- } }
137
+ return !!L.clearable;
138
+ } },
139
+ reportLink: (e) => {
140
+ B.value = e;
141
+ }
92
142
  });
93
- let q = m(() => [
143
+ let ne = m(() => [
94
144
  "bb-badge",
95
- `bb-badge--${U.value}`,
96
- I.variant && I.variant !== "none" && `bb-badge--${I.variant}`,
145
+ `bb-badge--${G.value}`,
146
+ L.variant && L.variant !== "none" && `bb-badge--${L.variant}`,
97
147
  {
98
- "bb-badge--icon": !!I.icon,
99
- "bb-badge--clearable": I.clearable,
100
- "bb-badge--loading": I.loading
148
+ "bb-badge--icon": K(),
149
+ "bb-badge--clearable": L.clearable,
150
+ "bb-badge--loading": L.loading
101
151
  }
102
- ]), J = n().id, Y = m(() => K() ? void 0 : `${J.value}__clear ${J.value}__body`), X = (e) => {
103
- L("click:clear", e);
152
+ ]), $ = r().id, re = m(() => L.clearableLabel || Q() ? void 0 : `${$.value}__clear ${$.value}__body`), ie = (e) => {
153
+ R("click:clear", e);
104
154
  };
105
- return (e, t) => (C(), _("span", S({ class: q.value }, E(z).rootAttrs), [
106
- K() ? w(e.$slots, "default", { key: 0 }) : (C(), _("span", {
155
+ return (e, t) => (T(), _("span", C({ class: ne.value }, O(V).rootAttrs), [
156
+ Q() ? E(e.$slots, "default", { key: 0 }) : (T(), _("span", {
107
157
  key: 1,
108
- id: `${E(J)}__body`,
158
+ id: `${O($)}__body`,
109
159
  class: "bb-badge__body"
110
160
  }, [y(l, null, {
111
- default: k(() => [w(e.$slots, "default")]),
161
+ default: j(() => [E(e.$slots, "default")]),
112
162
  _: 3
113
- })], 8, j)),
114
- I.clearable ? (C(), _("span", M, [I.icon ? g("", !0) : (C(), _(p, { key: 0 }, [I.loading && W() ? (C(), h(s, S({
163
+ })], 8, N)),
164
+ L.clearable ? (T(), _("span", P, [K() ? g("", !0) : (T(), _(p, { key: 0 }, [L.loading && X() ? (T(), h(s, C({
115
165
  key: 0,
116
166
  class: "bb-badge__spinner bb-badge__append-icon"
117
- }, E(z).spinner), null, 16)) : I["append:icon"] ? (C(), h(o, S({
167
+ }, O(V).spinner), null, 16)) : z["append:icon"] ? (T(), _("span", C({
118
168
  key: 1,
169
+ class: "bb-badge__append-icon bb-badge__icon-slot"
170
+ }, O(V).icon), [E(e.$slots, "append:icon", w(x(Y())))], 16)) : L["append:icon"] ? (T(), h(o, C({
171
+ key: 2,
119
172
  class: "bb-badge__append-icon",
120
- icon: I["append:icon"]
121
- }, E(z).icon), null, 16, ["icon"])) : g("", !0)], 64)), v("button", S({
122
- id: `${E(J)}__clear`,
123
- "aria-label": I.clearableLabel || E(V)("badge.clearLabel").value,
124
- "aria-labelledby": Y.value,
173
+ icon: L["append:icon"]
174
+ }, O(V).icon), null, 16, ["icon"])) : g("", !0)], 64)), v("button", C({
175
+ id: `${O($)}__clear`,
176
+ "aria-label": L.clearableLabel || O(U)("badge.clearLabel").value,
177
+ "aria-labelledby": re.value,
125
178
  class: "bb-badge__clear",
126
179
  type: "button",
127
- onClick: A(X, ["stop"])
128
- }, E(z).clear), [y(o, { icon: E(d) }, null, 8, ["icon"])], 16, N)])) : g("", !0),
129
- I.loading ? (C(), _("span", P, T(E(V)("common.loadingText")), 1)) : g("", !0)
180
+ onClick: M(ie, ["stop"])
181
+ }, O(V).clear), [y(o, { icon: O(d) }, null, 8, ["icon"])], 16, F)])) : g("", !0),
182
+ L.loading ? (T(), _("span", I, D(O(U)("common.loadingText")), 1)) : g("", !0)
130
183
  ], 16));
131
184
  }
132
185
  });
133
186
  //#endregion
134
- export { F as default };
187
+ export { L as default };
@@ -1,14 +1,17 @@
1
1
  import { useLogger as e } from "../../composables/useLogger.js";
2
2
  import { useBadgeHost as t } from "./badgeButtonContext.js";
3
3
  import n from "./BadgeBodyContent.vue.js";
4
- import r from "../BbBaseButton/BbBaseButton.vue.js";
5
- import { computed as i, createBlock as a, createVNode as o, defineComponent as s, mergeProps as c, openBlock as l, renderSlot as u, useAttrs as d, withCtx as f } from "vue";
4
+ import { provideLinkState as r, useLinkState as i } from "../BbBaseButton/useLinkState.js";
5
+ import a from "../BbBaseButton/BbBaseButton.vue.js";
6
+ import { computed as o, createBlock as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeProps as f, onBeforeUnmount as p, openBlock as m, renderSlot as h, unref as g, useAttrs as _, withCtx as v } from "vue";
6
7
  //#region src/components/BbBadge/BbBadgeButton.vue?vue&type=script&setup=true&lang.ts
7
- var p = /*@__PURE__*/ s({
8
+ var y = /*@__PURE__*/ l({
8
9
  inheritAttrs: !1,
9
10
  __name: "BbBadgeButton",
10
11
  props: {
11
12
  "pt:root": {},
13
+ "pt:root:activeLink": {},
14
+ "pt:root:exactActiveLink": {},
12
15
  "pt:root:disabled": {},
13
16
  pt: {},
14
17
  activeClass: {},
@@ -64,18 +67,20 @@ var p = /*@__PURE__*/ s({
64
67
  preserveUrl: { type: Boolean },
65
68
  viewTransition: { type: Boolean }
66
69
  },
67
- setup(s) {
68
- let p = s, m = t();
69
- m || e().throw("[BbBadgeButton] must be rendered inside a <BbBadge> default slot.");
70
- let h = d(), g = i(() => !!m?.loading.value), _ = i(() => {
71
- let { onClick: e, ...t } = h, n = [].concat(e ?? []).filter((e) => typeof e == "function");
72
- return c(t, p, {
73
- ...g.value ? {
70
+ setup(l) {
71
+ let y = l, b = t();
72
+ b || e().throw("[BbBadgeButton] must be rendered inside a <BbBadge> default slot.");
73
+ let x = i(y);
74
+ r(x), b?.reportLink(x), p(() => b?.reportLink(null));
75
+ let S = _(), C = o(() => !!b?.loading.value), w = o(() => {
76
+ let { onClick: e, ...t } = S, n = [].concat(e ?? []).filter((e) => typeof e == "function");
77
+ return d(t, y, {
78
+ ...C.value ? {
74
79
  "aria-disabled": !0,
75
80
  tabindex: -1
76
81
  } : {},
77
82
  onClick: (e) => {
78
- if (g.value) {
83
+ if (C.value) {
79
84
  e.preventDefault();
80
85
  return;
81
86
  }
@@ -83,9 +88,9 @@ var p = /*@__PURE__*/ s({
83
88
  }
84
89
  });
85
90
  });
86
- return (e, t) => (l(), a(r, c({ class: "bb-badge__body" }, _.value), {
87
- default: f(() => [o(n, null, {
88
- default: f(() => [u(e.$slots, "default")]),
91
+ return (e, t) => (m(), s(a, d({ class: "bb-badge__body" }, w.value), {
92
+ default: v(() => [c(n, null, {
93
+ default: v(() => [h(e.$slots, "default", f(u(g(x))))]),
89
94
  _: 3
90
95
  })]),
91
96
  _: 3
@@ -93,4 +98,4 @@ var p = /*@__PURE__*/ s({
93
98
  }
94
99
  });
95
100
  //#endregion
96
- export { p as default };
101
+ export { y as default };
@@ -1,6 +1,7 @@
1
1
  import { IconType } from '../../types/Icon';
2
+ import { LinkState } from '../BbBaseButton/useLinkState';
2
3
  import { PassthroughBindings } from '../../composables/usePassthrough';
3
- import { BbBadgePtPart, BbBadgePtState } from './types';
4
+ import { BbBadgeIconSlotProps, BbBadgePtPart, BbBadgePtState, BbBadgeSlots } from './types';
4
5
  /**
5
6
  * A read-only view of one piece of the host's state.
6
7
  *
@@ -28,6 +29,10 @@ export type BadgeHostContext = {
28
29
  icon: HostValue<IconType | undefined>;
29
30
  prependIcon: HostValue<IconType | undefined>;
30
31
  appendIcon: HostValue<IconType | undefined>;
32
+ /** The badge's own slots: an icon slot beats its prop (Q81.4). */
33
+ slots: BbBadgeSlots;
34
+ /** What an icon slot sees. */
35
+ iconScope: HostValue<BbBadgeIconSlotProps>;
31
36
  loading: HostValue<boolean>;
32
37
  /** Whether the loading spinner takes the leading slot (BbButton convention). */
33
38
  spinnerLeads: HostValue<boolean>;
@@ -39,6 +44,12 @@ export type BadgeHostContext = {
39
44
  * the append icon only when the badge is *not* clearable.
40
45
  */
41
46
  clearable: HostValue<boolean>;
47
+ /**
48
+ * A slotted `BbBadgeButton` hands the badge its link state (`null` when it
49
+ * unmounts), so the badge's own parts get `activeLink` / `exactActiveLink`:
50
+ * the whole chip changes, not just the inner button.
51
+ */
52
+ reportLink: (state: HostValue<LinkState> | null) => void;
42
53
  };
43
54
  export declare const provideBadgeHost: (context: BadgeHostContext) => void;
44
55
  export declare const useBadgeHost: () => BadgeHostContext | null;