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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/README.md +2 -2
  2. package/bin/cli.mjs +9 -3
  3. package/dist/ai/BbAccordion.md +38 -19
  4. package/dist/ai/BbBadge.md +25 -22
  5. package/dist/ai/BbBreadcrumbs.md +1 -1
  6. package/dist/ai/BbButton.md +32 -27
  7. package/dist/ai/BbCalendar.md +1 -0
  8. package/dist/ai/BbCarousel.md +6 -4
  9. package/dist/ai/BbCheckboxGroup.md +2 -1
  10. package/dist/ai/BbColorInput.md +1 -1
  11. package/dist/ai/BbConfirm.md +65 -81
  12. package/dist/ai/BbConfirmPortal.md +2 -2
  13. package/dist/ai/BbDatePicker.md +1 -6
  14. package/dist/ai/BbDatePickerInput.md +2 -2
  15. package/dist/ai/BbDialog.md +233 -164
  16. package/dist/ai/BbDropdown.md +52 -16
  17. package/dist/ai/BbDropdownButton.md +11 -12
  18. package/dist/ai/BbDropzone.md +12 -8
  19. package/dist/ai/BbForm.md +100 -13
  20. package/dist/ai/BbHost.md +2 -2
  21. package/dist/ai/BbHoverCardPortal.md +1 -1
  22. package/dist/ai/BbIcon.md +1 -1
  23. package/dist/ai/BbIndicator.md +17 -15
  24. package/dist/ai/BbNumberInput.md +7 -5
  25. package/dist/ai/BbOffCanvas.md +29 -7
  26. package/dist/ai/BbPagination.md +2 -2
  27. package/dist/ai/BbPopover.md +15 -9
  28. package/dist/ai/BbPopoverPortal.md +1 -1
  29. package/dist/ai/BbRadioGroup.md +29 -7
  30. package/dist/ai/BbRating.md +8 -7
  31. package/dist/ai/BbSelect.md +29 -8
  32. package/dist/ai/BbSelectPopover.md +9 -3
  33. package/dist/ai/BbSlider.md +12 -8
  34. package/dist/ai/BbSpinner.md +3 -2
  35. package/dist/ai/BbSwitch.md +3 -3
  36. package/dist/ai/BbSwitchGroup.md +7 -6
  37. package/dist/ai/BbTable.md +205 -82
  38. package/dist/ai/BbTabs.md +29 -4
  39. package/dist/ai/BbTag.md +1 -1
  40. package/dist/ai/BbTextInput.md +7 -5
  41. package/dist/ai/BbTextarea.md +4 -3
  42. package/dist/ai/BbTimePickerInput.md +1 -1
  43. package/dist/ai/BbToast.md +3 -2
  44. package/dist/ai/BbTooltip.md +22 -17
  45. package/dist/ai/BbTree.md +49 -24
  46. package/dist/ai/CommonFieldInput.md +1 -1
  47. package/dist/ai/changelog.json +242 -9
  48. package/dist/ai/components.json +52 -51
  49. package/dist/ai/composables/useBbDialog.md +5 -8
  50. package/dist/ai/composables/useBbForm.md +3 -0
  51. package/dist/ai/composables/useConfirm.md +65 -56
  52. package/dist/ai/composables/useToast.md +2 -1
  53. package/dist/ai/guides/agent-contract.md +3 -3
  54. package/dist/ai/guides/app-layout.md +3 -2
  55. package/dist/ai/guides/eslint-rules.md +3 -1
  56. package/dist/ai/guides/fetch-items-playbook.md +1 -1
  57. package/dist/ai/guides/floating-bottom-panel.md +3 -2
  58. package/dist/ai/guides/icons-policy.md +7 -5
  59. package/dist/ai/guides/inertia-helpers.md +35 -30
  60. package/dist/ai/guides/installation-and-plugin-setup.md +17 -14
  61. package/dist/ai/guides/migration/adoption-checklist.md +2 -2
  62. package/dist/ai/guides/migration/components/bb-badge.md +12 -1
  63. package/dist/ai/guides/migration/components/bb-button.md +24 -0
  64. package/dist/ai/guides/migration/components/bb-dropdown-button.md +11 -0
  65. package/dist/ai/guides/migration/components/bb-tabs.md +2 -2
  66. package/dist/ai/guides/migration/components/bb-toast.md +11 -0
  67. package/dist/ai/guides/migration/components/use-confirm.md +72 -26
  68. package/dist/ai/guides/migration/v2-to-v3.md +52 -10
  69. package/dist/ai/guides/migration/v3-beta-css-classes.md +1 -1
  70. package/dist/ai/guides/options-items-playbook.md +4 -3
  71. package/dist/ai/guides/passthrough.md +2 -2
  72. package/dist/ai/helpers/inertia/manifest.json +28 -15
  73. package/dist/ai/helpers/inertia/messages.ts +3 -3
  74. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +10 -10
  75. package/dist/ai/helpers/inertia/usePromiseForm.ts +1 -1
  76. package/dist/ai/helpers/inertia/usePromiseRouter.ts +7 -2
  77. package/dist/ai/index.md +3 -3
  78. package/dist/ai/manifest/common.json +3 -3
  79. package/dist/ai/manifest/components/BbAccordion.json +8 -5
  80. package/dist/ai/manifest/components/BbAccordion.tree.json +1 -0
  81. package/dist/ai/manifest/components/BbBadge.json +8 -7
  82. package/dist/ai/manifest/components/BbBadge.removed.json +3 -1
  83. package/dist/ai/manifest/components/BbBadge.tree.json +73 -0
  84. package/dist/ai/manifest/components/BbBreadcrumbs.json +1 -1
  85. package/dist/ai/manifest/components/BbButton.json +5 -6
  86. package/dist/ai/manifest/components/BbButton.removed.json +3 -1
  87. package/dist/ai/manifest/components/BbButton.tree.json +24 -7
  88. package/dist/ai/manifest/components/BbCalendar.json +2 -1
  89. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  90. package/dist/ai/manifest/components/BbColorInput.json +1 -1
  91. package/dist/ai/manifest/components/BbColorInput.tree.json +1 -1
  92. package/dist/ai/manifest/components/BbConfirm.json +2 -2
  93. package/dist/ai/manifest/components/BbConfirm.removed.json +9 -0
  94. package/dist/ai/manifest/components/BbConfirm.tree.json +4 -5
  95. package/dist/ai/manifest/components/BbConfirmPortal.json +3 -3
  96. package/dist/ai/manifest/components/BbConfirmPortal.removed.json +7 -0
  97. package/dist/ai/manifest/components/BbDatePicker.json +2 -1
  98. package/dist/ai/manifest/components/BbDatePicker.tree.json +0 -6
  99. package/dist/ai/manifest/components/BbDatePickerInput.json +2 -2
  100. package/dist/ai/manifest/components/BbDatePickerInput.tree.json +1 -1
  101. package/dist/ai/manifest/components/BbDialog.json +6 -1
  102. package/dist/ai/manifest/components/BbDialog.tree.json +41 -1
  103. package/dist/ai/manifest/components/BbDropdown.json +9 -8
  104. package/dist/ai/manifest/components/BbDropdown.tree.json +4 -0
  105. package/dist/ai/manifest/components/BbDropdownButton.json +8 -9
  106. package/dist/ai/manifest/components/BbDropdownButton.removed.json +3 -1
  107. package/dist/ai/manifest/components/BbForm.json +3 -1
  108. package/dist/ai/manifest/components/BbNumberInput.json +1 -1
  109. package/dist/ai/manifest/components/BbNumberInput.tree.json +1 -1
  110. package/dist/ai/manifest/components/BbOffCanvas.json +6 -1
  111. package/dist/ai/manifest/components/BbOffCanvas.tree.json +40 -0
  112. package/dist/ai/manifest/components/BbPagination.json +1 -1
  113. package/dist/ai/manifest/components/BbRadioGroup.json +4 -3
  114. package/dist/ai/manifest/components/BbRating.json +2 -2
  115. package/dist/ai/manifest/components/BbSelect.json +16 -15
  116. package/dist/ai/manifest/components/BbSelect.tree.json +1 -1
  117. package/dist/ai/manifest/components/BbSelectPopover.json +1 -0
  118. package/dist/ai/manifest/components/BbSwitch.json +4 -4
  119. package/dist/ai/manifest/components/BbSwitchGroup.json +7 -7
  120. package/dist/ai/manifest/components/BbTable.json +15 -14
  121. package/dist/ai/manifest/components/BbTable.tree.json +2 -0
  122. package/dist/ai/manifest/components/BbTabs.json +3 -3
  123. package/dist/ai/manifest/components/BbTabsList.json +1 -1
  124. package/dist/ai/manifest/components/BbTabsRoot.json +1 -1
  125. package/dist/ai/manifest/components/BbTag.json +1 -1
  126. package/dist/ai/manifest/components/BbTag.tree.json +1 -1
  127. package/dist/ai/manifest/components/BbTextInput.json +1 -1
  128. package/dist/ai/manifest/components/BbTextInput.tree.json +1 -1
  129. package/dist/ai/manifest/components/BbTextarea.json +1 -1
  130. package/dist/ai/manifest/components/BbTextarea.tree.json +1 -1
  131. package/dist/ai/manifest/components/BbTimePicker.json +1 -1
  132. package/dist/ai/manifest/components/BbTimePickerInput.json +1 -1
  133. package/dist/ai/manifest/components/BbTimePickerInput.tree.json +1 -1
  134. package/dist/ai/manifest/components/BbToast.removed.json +2 -1
  135. package/dist/ai/manifest/components/BbTree.json +2 -2
  136. package/dist/ai/manifest/components/CommonFieldInput.tree.json +3 -3
  137. package/dist/ai/manifest/index.json +4 -4
  138. package/dist/ai/manifest/meta.json +5 -1
  139. package/dist/ai/manifest/types.advanced.json +9 -9
  140. package/dist/ai/manifest/types.api.json +6 -5
  141. package/dist/ai/recipes/inertia/approvals-inbox.md +23 -16
  142. package/dist/ai/recipes/inertia/inline-edit-workspace.md +12 -5
  143. package/dist/ai/recipes/inertia/layout-scaffold.md +5 -3
  144. package/dist/ai/recipes/inertia/onboarding.md +23 -12
  145. package/dist/ai/recipes/inertia/ownership-atlas.md +34 -18
  146. package/dist/ai/recipes/inertia/record-form.md +12 -8
  147. package/dist/ai/recipes/inertia/records-workspace.md +14 -7
  148. package/dist/ai/recipes/inertia/settings-workspace.md +75 -60
  149. package/dist/ai/recipes/inertia/upload-center.md +17 -9
  150. package/dist/ai/recipes/inertia/wizard-form.md +2 -2
  151. package/dist/ai/recipes/nuxt/approvals-inbox.md +23 -16
  152. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +12 -5
  153. package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -3
  154. package/dist/ai/recipes/nuxt/onboarding.md +5 -4
  155. package/dist/ai/recipes/nuxt/ownership-atlas.md +34 -18
  156. package/dist/ai/recipes/nuxt/record-form.md +14 -10
  157. package/dist/ai/recipes/nuxt/records-workspace.md +14 -7
  158. package/dist/ai/recipes/nuxt/settings-workspace.md +70 -60
  159. package/dist/ai/recipes/nuxt/upload-center.md +17 -9
  160. package/dist/ai/recipes/nuxt/wizard-form.md +4 -4
  161. package/dist/ai/recipes/vue/approvals-inbox.md +23 -16
  162. package/dist/ai/recipes/vue/inline-edit-workspace.md +12 -5
  163. package/dist/ai/recipes/vue/layout-scaffold.md +5 -3
  164. package/dist/ai/recipes/vue/onboarding.md +5 -4
  165. package/dist/ai/recipes/vue/ownership-atlas.md +34 -18
  166. package/dist/ai/recipes/vue/record-form.md +14 -10
  167. package/dist/ai/recipes/vue/records-workspace.md +14 -7
  168. package/dist/ai/recipes/vue/settings-workspace.md +70 -60
  169. package/dist/ai/recipes/vue/upload-center.md +17 -9
  170. package/dist/ai/recipes/vue/wizard-form.md +4 -4
  171. package/dist/ai/source/BbAccordion.md +50 -16
  172. package/dist/ai/source/BbBadge.md +420 -26
  173. package/dist/ai/source/BbBadgeButton.md +378 -12
  174. package/dist/ai/source/BbButton.md +205 -55
  175. package/dist/ai/source/BbCalendar.md +5 -0
  176. package/dist/ai/source/BbCheckboxGroup.md +38 -13
  177. package/dist/ai/source/BbConfigScope.md +19 -2
  178. package/dist/ai/source/BbConfirm.md +74 -80
  179. package/dist/ai/source/BbConfirmPortal.md +6 -6
  180. package/dist/ai/source/BbDatePicker.md +9 -2
  181. package/dist/ai/source/BbDatePickerInput.md +3 -1
  182. package/dist/ai/source/BbDialog.md +53 -2
  183. package/dist/ai/source/BbDropdown.md +350 -98
  184. package/dist/ai/source/BbDropdownButton.md +20 -12
  185. package/dist/ai/source/BbDropdownGroup.md +136 -58
  186. package/dist/ai/source/BbForm.md +152 -11
  187. package/dist/ai/source/BbOffCanvas.md +53 -2
  188. package/dist/ai/source/BbPagination.md +1 -1
  189. package/dist/ai/source/BbRadioGroup.md +72 -10
  190. package/dist/ai/source/BbRating.md +30 -22
  191. package/dist/ai/source/BbSelect.md +11 -1
  192. package/dist/ai/source/BbSelectPopover.md +105 -34
  193. package/dist/ai/source/BbSwitch.md +23 -8
  194. package/dist/ai/source/BbSwitchGroup.md +67 -21
  195. package/dist/ai/source/BbTable.md +359 -48
  196. package/dist/ai/source/BbTabs.md +6 -0
  197. package/dist/ai/source/BbTabsList.md +10 -0
  198. package/dist/ai/source/BbTabsPanels.md +6 -0
  199. package/dist/ai/source/BbTabsRoot.md +6 -0
  200. package/dist/ai/source/BbTree.md +14 -4
  201. package/dist/ai/source/CommonFieldInput.md +2 -1
  202. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +7 -3
  203. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +52 -38
  204. package/dist/components/BbAccordion/ptKeys.generated.d.ts +20 -0
  205. package/dist/components/BbAccordion/types.d.ts +21 -7
  206. package/dist/components/BbAccordion/types.js +1 -1
  207. package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -1
  208. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +5 -5
  209. package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
  210. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +65 -42
  211. package/dist/components/BbBadge/types.d.ts +15 -12
  212. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +79 -73
  213. package/dist/components/BbButton/types.d.ts +7 -6
  214. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +2 -1
  215. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +2 -1
  216. package/dist/components/BbCalendar/types.d.ts +5 -0
  217. package/dist/components/BbCalendar/useCalendarGrid.js +1 -1
  218. package/dist/components/BbCalendar/useDayGrid.js +1 -1
  219. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +10 -4
  220. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +2 -2
  221. package/dist/components/BbCheckboxGroup/types.d.ts +2 -2
  222. package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +8 -8
  223. package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +71 -132
  224. package/dist/components/BbConfirm/ptKeys.generated.d.ts +5 -5
  225. package/dist/components/BbConfirm/types.d.ts +5 -5
  226. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +2 -1
  227. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +3 -0
  228. package/dist/components/BbDatePicker/types.d.ts +5 -0
  229. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
  230. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +2 -0
  231. package/dist/components/BbDatePickerInput/types.d.ts +2 -1
  232. package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -0
  233. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +263 -235
  234. package/dist/components/BbDialog/overlayActions.js +94 -0
  235. package/dist/components/BbDialog/types.d.ts +24 -0
  236. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +4 -3
  237. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +382 -332
  238. package/dist/components/BbDropdown/dropdownHandle.js +6 -0
  239. package/dist/components/BbDropdown/normalizeGroups.js +58 -48
  240. package/dist/components/BbDropdown/types.d.ts +107 -48
  241. package/dist/components/BbDropdown/types.js +2 -2
  242. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +71 -71
  243. package/dist/components/BbDropdownButton/types.d.ts +2 -4
  244. package/dist/components/BbForm/BbForm.vue.d.ts +2 -1
  245. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +241 -199
  246. package/dist/components/BbForm/recognizeValidation.d.ts +9 -0
  247. package/dist/components/BbForm/recognizeValidation.js +55 -0
  248. package/dist/components/BbForm/validationError.d.ts +10 -0
  249. package/dist/components/BbForm/validationError.js +11 -0
  250. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -0
  251. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +414 -389
  252. package/dist/components/BbOffCanvas/sheetAttrs.js +5 -5
  253. package/dist/components/BbOffCanvas/types.d.ts +24 -0
  254. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +3 -3
  255. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +10 -4
  256. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +173 -157
  257. package/dist/components/BbRadioGroup/types.d.ts +9 -3
  258. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +112 -103
  259. package/dist/components/BbRating/types.d.ts +3 -2
  260. package/dist/components/BbSelect/BbSelect.vue.d.ts +9 -8
  261. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +3 -1
  262. package/dist/components/BbSelect/types.d.ts +8 -0
  263. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +11 -4
  264. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +513 -502
  265. package/dist/components/BbSelectPopover/types.d.ts +10 -2
  266. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -0
  267. package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +85 -73
  268. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +10 -4
  269. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +171 -152
  270. package/dist/components/BbSwitchGroup/types.d.ts +1 -1
  271. package/dist/components/BbTable/BbTable.vue.d.ts +36 -25
  272. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1338 -1215
  273. package/dist/components/BbTable/BbTableDataRow.js +2 -1
  274. package/dist/components/BbTable/BbTableRowMenu.js +36 -0
  275. package/dist/components/BbTable/types.d.ts +32 -17
  276. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +2 -2
  277. package/dist/components/BbTabs/types.d.ts +6 -0
  278. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
  279. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
  280. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +1 -1
  281. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +88 -94
  282. package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +1 -1
  283. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +9 -9
  284. package/dist/components/BbTree/types.d.ts +8 -2
  285. package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +39 -39
  286. package/dist/composables/formSubmitLock.js +15 -8
  287. package/dist/composables/overlayRegistry.d.ts +5 -0
  288. package/dist/composables/overlayRegistry.js +154 -148
  289. package/dist/composables/useBbDropdown.d.ts +8 -0
  290. package/dist/composables/useBbDropdown.js +3 -1
  291. package/dist/composables/useBbTabs.js +138 -138
  292. package/dist/composables/useConfirm.d.ts +63 -52
  293. package/dist/composables/useConfirm.js +22 -18
  294. package/dist/deprecation/ai-deprecations.json.js +1 -1
  295. package/dist/directives/bbDropdown.d.ts +7 -7
  296. package/dist/directives/bbDropdown.js +21 -14
  297. package/dist/directives/bbTooltip.d.ts +3 -3
  298. package/dist/directives/createPopoverDirective.js +57 -35
  299. package/dist/i18n/locales/ar.json +5 -1
  300. package/dist/i18n/locales/cs.json +5 -1
  301. package/dist/i18n/locales/da.json +5 -1
  302. package/dist/i18n/locales/de-CH.json +5 -1
  303. package/dist/i18n/locales/de.json +5 -1
  304. package/dist/i18n/locales/el.json +5 -1
  305. package/dist/i18n/locales/en-GB.json +5 -1
  306. package/dist/i18n/locales/en.json +5 -1
  307. package/dist/i18n/locales/es-MX.json +5 -1
  308. package/dist/i18n/locales/es.json +5 -1
  309. package/dist/i18n/locales/fa.json +5 -1
  310. package/dist/i18n/locales/fi.json +5 -1
  311. package/dist/i18n/locales/fr.json +5 -1
  312. package/dist/i18n/locales/he.json +5 -1
  313. package/dist/i18n/locales/hu.json +5 -1
  314. package/dist/i18n/locales/it.json +5 -1
  315. package/dist/i18n/locales/ja.json +5 -1
  316. package/dist/i18n/locales/ko.json +5 -1
  317. package/dist/i18n/locales/nb.json +5 -1
  318. package/dist/i18n/locales/nl.json +5 -1
  319. package/dist/i18n/locales/pl.json +5 -1
  320. package/dist/i18n/locales/pt-BR.json +5 -1
  321. package/dist/i18n/locales/pt-PT.json +5 -1
  322. package/dist/i18n/locales/ro.json +5 -1
  323. package/dist/i18n/locales/ru.json +5 -1
  324. package/dist/i18n/locales/sv.json +5 -1
  325. package/dist/i18n/locales/tr.json +5 -1
  326. package/dist/i18n/locales/uk.json +5 -1
  327. package/dist/i18n/locales/zh-CN.json +5 -1
  328. package/dist/i18n/locales/zh-HK.json +5 -1
  329. package/dist/i18n/locales/zh-TW.json +5 -1
  330. package/dist/index.d.ts +2 -0
  331. package/dist/index.js +4 -3
  332. package/dist/llms-full.txt +1997 -1151
  333. package/dist/llms-medium.txt +21 -18
  334. package/dist/llms.txt +2 -2
  335. package/dist/locale-blueprint.json +5 -1
  336. package/dist/plugin.js +17 -40
  337. package/dist/pluginCore.js +30 -0
  338. package/dist/styles.css +2 -2
  339. package/dist/types/ActionButton.d.ts +26 -5
  340. package/dist/types/ActionButton.js +11 -0
  341. package/dist/types/ConfigDefaults.d.ts +34 -3
  342. package/dist/types/ConfigDefaults.js +14 -8
  343. package/dist/types/ItemPath.d.ts +33 -4
  344. package/dist/types/ptComponentMap.d.ts +1 -1
  345. package/dist/utilities/functions/clickCount.js +14 -0
  346. package/dist/utilities/functions/hash.js +90 -3
  347. package/dist/utilities/functions/isEqual.js +61 -3
  348. package/dist/utils/versionCheck.js +1 -1
  349. package/dist/vite.js +0 -1
  350. package/llms.txt +2 -2
  351. package/package.json +12 -2
  352. package/scripts/README.md +43 -39
  353. package/scripts/lib/adoption-checklist.json +2 -2
  354. package/scripts/lib/eslint-disable.mjs +5 -3
  355. package/scripts/lib/eslint-plugin.d.ts +2 -0
  356. package/scripts/lib/eslint-plugin.mjs +213 -1
  357. package/scripts/lib/helpers-add.mjs +21 -2
  358. package/scripts/lib/redundant-item-accessor.mjs +4 -1
  359. package/scripts/lib/release-results.mjs +180 -5
  360. package/scripts/lib/renamed-item-field.mjs +4 -1
  361. package/scripts/lib/tab-links.mjs +4 -1
  362. package/scripts/lib/tree-default-expandable.mjs +53 -0
  363. package/scripts/lib/validate-bb-markup.mjs +536 -52
@@ -391,6 +391,10 @@ const getHighlightData = () => {
391
391
  '.bb-tabs-list__item--active'
392
392
  );
393
393
  if (!activeBtn) {
394
+ // No trigger is active (the current tab is hidden, or a link strip has
395
+ // no current page): the indicator has nothing to sit under.
396
+ highlightWidth.value = 0;
397
+ highlightHeight.value = 0;
394
398
  return;
395
399
  }
396
400
  highlightLeft.value = activeBtn.offsetLeft;
@@ -586,6 +590,12 @@ export type BbTabsItem<K extends string = string> = BbTabsInertiaOptions & {
586
590
  * tab is inactive.
587
591
  */
588
592
  eager?: boolean;
593
+ /**
594
+ * Leaves the tab out: no trigger, no panel, not reachable by keyboard or
595
+ * by the URL. A `v-model` naming it keeps it, and the strip then shows no
596
+ * active tab and no panel.
597
+ */
598
+ hidden?: boolean;
589
599
  /**
590
600
  * The page this tab links to. Any item with `href` or `to` makes the strip
591
601
  * a set of links (link mode): a `<nav>` of real `<a>`s with
@@ -214,6 +214,12 @@ export type BbTabsItem<K extends string = string> = BbTabsInertiaOptions & {
214
214
  * tab is inactive.
215
215
  */
216
216
  eager?: boolean;
217
+ /**
218
+ * Leaves the tab out: no trigger, no panel, not reachable by keyboard or
219
+ * by the URL. A `v-model` naming it keeps it, and the strip then shows no
220
+ * active tab and no panel.
221
+ */
222
+ hidden?: boolean;
217
223
  /**
218
224
  * The page this tab links to. Any item with `href` or `to` makes the strip
219
225
  * a set of links (link mode): a `<nav>` of real `<a>`s with
@@ -172,6 +172,12 @@ export type BbTabsItem<K extends string = string> = BbTabsInertiaOptions & {
172
172
  * tab is inactive.
173
173
  */
174
174
  eager?: boolean;
175
+ /**
176
+ * Leaves the tab out: no trigger, no panel, not reachable by keyboard or
177
+ * by the URL. A `v-model` naming it keeps it, and the strip then shows no
178
+ * active tab and no panel.
179
+ */
180
+ hidden?: boolean;
175
181
  /**
176
182
  * The page this tab links to. Any item with `href` or `to` makes the strip
177
183
  * a set of links (link mode): a `<nav>` of real `<a>`s with
@@ -144,9 +144,13 @@ watch(
144
144
  { immediate: true, flush: 'sync' }
145
145
  );
146
146
 
147
- /* Leaves have nothing to hide, so they always count as expanded. */
147
+ /*
148
+ * Leaves have nothing to hide, so they always count as expanded; so does a
149
+ * branch whose children are all hidden.
150
+ */
148
151
  const isExpanded = (item: BbTreeItem<Meta>) =>
149
- !item.children?.length || expandedHashes.has(hashFor(item));
152
+ !item.children?.some((child) => !child.hidden) ||
153
+ expandedHashes.has(hashFor(item));
150
154
 
151
155
  const toggleExpanded = (item: BbTreeItem<Meta>) => {
152
156
  const value = valueFor(item);
@@ -236,6 +240,11 @@ export type BbTreeItem<Meta = any> = {
236
240
  * Per-node override of the tree-level `expandable`.
237
241
  */
238
242
  expandable?: BbTreeExpandable<Meta>;
243
+ /**
244
+ * Leaves the node out with its whole subtree. `expandedItems` keeps what
245
+ * it holds for it; a branch whose children are all hidden shows as a leaf.
246
+ */
247
+ hidden?: boolean;
239
248
  };
240
249
 
241
250
  /**
@@ -310,8 +319,9 @@ export type BbTreeProps<Meta = any> = BbTreePtKeys & {
310
319
  */
311
320
  itemValue: ItemAccessor<Meta>;
312
321
  /**
313
- * Defines nodes as expandable. It can be a global boolean, or a function
314
- * that receives the node, its depth, and its parent and returns a boolean.
322
+ * Which nodes get a toggle: a boolean for all, or a function of the node,
323
+ * its depth and its parent. Unset: every node with a child that is not
324
+ * `hidden`.
315
325
  */
316
326
  expandable?: BbTreeExpandable<Meta>;
317
327
  };
@@ -94,7 +94,8 @@
94
94
 
95
95
  <script setup lang="ts">
96
96
  import type { FallthroughAttrs } from '@/types/fallthrough';
97
- import { BbIcon, BbSpinner } from '@/index';
97
+ import BbIcon from '@/components/BbIcon/BbIcon.vue';
98
+ import BbSpinner from '@/components/BbSpinner/BbSpinner.vue';
98
99
  import { computed, mergeProps, onBeforeUnmount, ref } from 'vue';
99
100
  import ErrorIcon from '../ErrorIcon/ErrorIcon.vue';
100
101
  import WarningIcon from '../WarningIcon/WarningIcon.vue';
@@ -4,13 +4,17 @@ export type { BbAccordionProps, BbAccordionEvents, BbAccordionSlots };
4
4
  type __VLS_Props = BbAccordionProps & FallthroughAttrs<'div', BbAccordionProps>;
5
5
  type __VLS_Slots = BbAccordionSlots;
6
6
  type __VLS_ModelProps = {
7
- modelValue?: boolean;
7
+ /**
8
+ * Open / closed, or with `value` the key a group of accordions shares: open
9
+ * while it equals `value`.
10
+ */
11
+ modelValue?: any;
8
12
  };
9
13
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
14
  declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
- "update:modelValue": (value: boolean) => any;
15
+ "update:modelValue": (value: any) => any;
12
16
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
13
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
17
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
14
18
  }>, {
15
19
  transitionDuration: number;
16
20
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -6,86 +6,100 @@ import i from "../BbCollapsible/BbCollapsible.vue.js";
6
6
  import { BB_ACCORDION_PT as a } from "./types.js";
7
7
  import { usePassthrough as o } from "../../composables/usePassthrough.js";
8
8
  import { transitions as s } from "../../utilities/misc/transitions.js";
9
- import { createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, h as p, mergeModels as m, mergeProps as h, openBlock as g, renderSlot as _, toDisplayString as v, unref as y, useAttrs as b, useModel as x, withCtx as S } from "vue";
9
+ import { computed as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, h as m, mergeModels as h, mergeProps as g, openBlock as _, renderSlot as v, toDisplayString as y, unref as b, useAttrs as x, useModel as S, withCtx as C } from "vue";
10
10
  // src/components/BbAccordion/BbAccordion.vue?vue&type=script&setup=true&lang.ts
11
- var C = /*@__PURE__*/ f({
11
+ var w = /*@__PURE__*/ p({
12
12
  inheritAttrs: !1,
13
13
  __name: "BbAccordion",
14
- props: /*@__PURE__*/ m({
14
+ props: /*@__PURE__*/ h({
15
15
  "pt:root": {},
16
+ "pt:root:disabled": {},
16
17
  "pt:root:open": {},
17
18
  "pt:header": {},
19
+ "pt:header:disabled": {},
18
20
  "pt:header:open": {},
19
21
  "pt:title": {},
22
+ "pt:title:disabled": {},
20
23
  "pt:title:open": {},
21
24
  "pt:icon": {},
25
+ "pt:icon:disabled": {},
22
26
  "pt:icon:open": {},
23
27
  "pt:panel": {},
28
+ "pt:panel:disabled": {},
24
29
  "pt:panel:open": {},
25
30
  pt: {},
26
31
  eager: { type: Boolean },
27
32
  transitionDuration: { default: s.medium },
28
- modelValue: { type: Boolean },
33
+ modelValue: { type: [
34
+ Boolean,
35
+ String,
36
+ Number,
37
+ null
38
+ ] },
39
+ value: {},
40
+ disabled: { type: Boolean },
29
41
  title: {},
30
42
  id: {},
31
43
  headingLevel: {}
32
44
  }, {
33
- modelValue: {
34
- type: Boolean,
35
- default: !1
36
- },
45
+ modelValue: { default: !1 },
37
46
  modelModifiers: {}
38
47
  }),
39
48
  emits: ["update:modelValue"],
40
49
  setup(s) {
41
- let f = x(s, "modelValue"), m = s, C = o({
50
+ let p = S(s, "modelValue"), h = s, w = o({
42
51
  component: "BbAccordion",
43
- attrs: b(),
44
- props: m,
52
+ attrs: x(),
53
+ props: h,
45
54
  parts: a.parts,
46
55
  states: a.states,
47
- active: { open: () => f.value }
48
- }), w = e().id.value, T = m.id || `bba_${w}`, E = (e, { slots: t }) => m.headingLevel ? p(`h${m.headingLevel}`, { class: "bb-accordion__heading" }, t.default?.()) : t.default?.(), D = () => {
49
- f.value = !f.value;
56
+ active: {
57
+ open: () => O.value,
58
+ disabled: () => !!h.disabled
59
+ }
60
+ }), T = e().id.value, E = h.id || `bba_${T}`, D = (e, { slots: t }) => h.headingLevel ? m(`h${h.headingLevel}`, { class: "bb-accordion__heading" }, t.default?.()) : t.default?.(), O = c(() => h.value === void 0 ? !!p.value : p.value === h.value), k = () => {
61
+ h.disabled || (h.value === void 0 ? p.value = !p.value : p.value = O.value ? null : h.value);
50
62
  };
51
- return (e, a) => (g(), c("div", h({ class: ["bb-accordion", { "bb-accordion--titled": !e.$slots.header }] }, y(C).rootAttrs), [d(E, null, {
52
- default: S(() => [d(n, h({
53
- id: `${y(T)}_header`,
54
- "aria-controls": y(T),
55
- "aria-expanded": f.value,
63
+ return (e, a) => (_(), l("div", g({ class: ["bb-accordion", { "bb-accordion--titled": !e.$slots.header }] }, b(w).rootAttrs), [f(D, null, {
64
+ default: C(() => [f(n, g({
65
+ id: `${b(E)}_header`,
66
+ "aria-controls": b(E),
67
+ "aria-disabled": s.disabled || void 0,
68
+ "aria-expanded": O.value,
56
69
  class: "bb-accordion__header",
57
- onClick: D
58
- }, y(C).header), {
59
- default: S(() => [_(e.$slots, "header", {
60
- toggle: D,
61
- open: f.value
62
- }, () => [l("span", h({ class: "bb-accordion__title" }, y(C).title), [_(e.$slots, "title", {
63
- open: f.value,
64
- toggle: D
65
- }, () => [u(v(s.title), 1)])], 16), d(r, h({
70
+ onClick: k
71
+ }, b(w).header), {
72
+ default: C(() => [v(e.$slots, "header", {
73
+ toggle: k,
74
+ open: O.value
75
+ }, () => [u("span", g({ class: "bb-accordion__title" }, b(w).title), [v(e.$slots, "title", {
76
+ open: O.value,
77
+ toggle: k
78
+ }, () => [d(y(s.title), 1)])], 16), f(r, g({
66
79
  class: "bb-accordion__icon",
67
- icon: y(t),
80
+ icon: b(t),
68
81
  size: "16"
69
- }, y(C).icon), null, 16, ["icon"])])]),
82
+ }, b(w).icon), null, 16, ["icon"])])]),
70
83
  _: 3
71
84
  }, 16, [
72
85
  "id",
73
86
  "aria-controls",
87
+ "aria-disabled",
74
88
  "aria-expanded"
75
89
  ])]),
76
90
  _: 3
77
- }), d(i, {
78
- id: y(T),
79
- "aria-labelledby": `${y(T)}_header`,
91
+ }), f(i, {
92
+ id: b(E),
93
+ "aria-labelledby": `${b(E)}_header`,
80
94
  eager: s.eager,
81
- "model-value": f.value,
95
+ "model-value": O.value,
82
96
  role: "region",
83
97
  tag: "div",
84
98
  "transition-duration": s.transitionDuration
85
99
  }, {
86
- default: S(() => [l("div", h({ class: "bb-accordion__panel" }, y(C).panel), [_(e.$slots, "default", {
87
- open: f.value,
88
- toggle: D
100
+ default: C(() => [u("div", g({ class: "bb-accordion__panel" }, b(w).panel), [v(e.$slots, "default", {
101
+ open: O.value,
102
+ toggle: k
89
103
  })], 16)]),
90
104
  _: 3
91
105
  }, 8, [
@@ -97,4 +111,4 @@ var C = /*@__PURE__*/ f({
97
111
  ])], 16));
98
112
  }
99
113
  });
100
- export { C as default };
114
+ export { w as default };
@@ -5,6 +5,10 @@ export interface BbAccordionPtKeys {
5
5
  * The accordion's outer element: the header and its panel.
6
6
  */
7
7
  'pt:root'?: PtValue;
8
+ /**
9
+ * The accordion's outer element: the header and its panel. While `disabled`: `disabled` is set.
10
+ */
11
+ 'pt:root:disabled'?: PtValue;
8
12
  /**
9
13
  * The accordion's outer element: the header and its panel. While `open`: the panel is open (follows `v-model`).
10
14
  */
@@ -13,6 +17,10 @@ export interface BbAccordionPtKeys {
13
17
  * The trigger button that opens and closes the panel.
14
18
  */
15
19
  'pt:header'?: PtValue;
20
+ /**
21
+ * The trigger button that opens and closes the panel. While `disabled`: `disabled` is set.
22
+ */
23
+ 'pt:header:disabled'?: PtValue;
16
24
  /**
17
25
  * The trigger button that opens and closes the panel. While `open`: the panel is open (follows `v-model`).
18
26
  */
@@ -21,6 +29,10 @@ export interface BbAccordionPtKeys {
21
29
  * The trigger's text (`title` / `#title`). Absent under a `#header` slot, which replaces the whole trigger content.
22
30
  */
23
31
  'pt:title'?: PtValue;
32
+ /**
33
+ * The trigger's text (`title` / `#title`). While `disabled`: `disabled` is set. See `pt:title`.
34
+ */
35
+ 'pt:title:disabled'?: PtValue;
24
36
  /**
25
37
  * The trigger's text (`title` / `#title`). While `open`: the panel is open (follows `v-model`). See `pt:title`.
26
38
  */
@@ -29,6 +41,10 @@ export interface BbAccordionPtKeys {
29
41
  * The chevron at the trigger's end, turned when open. Absent under a `#header` slot.
30
42
  */
31
43
  'pt:icon'?: PtValue;
44
+ /**
45
+ * The chevron at the trigger's end, turned when open. While `disabled`: `disabled` is set. See `pt:icon`.
46
+ */
47
+ 'pt:icon:disabled'?: PtValue;
32
48
  /**
33
49
  * The chevron at the trigger's end, turned when open. While `open`: the panel is open (follows `v-model`). See `pt:icon`.
34
50
  */
@@ -37,6 +53,10 @@ export interface BbAccordionPtKeys {
37
53
  * The region the header controls (the ARIA accordion panel).
38
54
  */
39
55
  'pt:panel'?: PtValue;
56
+ /**
57
+ * The region the header controls (the ARIA accordion panel). While `disabled`: `disabled` is set.
58
+ */
59
+ 'pt:panel:disabled'?: PtValue;
40
60
  /**
41
61
  * The region the header controls (the ARIA accordion panel). While `open`: the panel is open (follows `v-model`).
42
62
  */
@@ -18,12 +18,13 @@ export type BbAccordionPtPart = 'root' | 'header' | 'title' | 'icon' | 'panel';
18
18
  * Passthrough states of `BbAccordion`.
19
19
  *
20
20
  * @state open - Component-wide: the panel is open (follows `v-model`).
21
+ * @state disabled - Component-wide: `disabled` is set.
21
22
  */
22
- export type BbAccordionPtState = 'open';
23
+ export type BbAccordionPtState = 'open' | 'disabled';
23
24
  /** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
24
25
  export declare const BB_ACCORDION_PT: {
25
26
  readonly parts: readonly ["root", "header", "title", "icon", "panel"];
26
- readonly states: readonly ["open"];
27
+ readonly states: readonly ["disabled", "open"];
27
28
  };
28
29
  export type BbAccordionProps = BbAccordionPtKeys & {
29
30
  /**
@@ -33,11 +34,23 @@ export type BbAccordionProps = BbAccordionPtKeys & {
33
34
  pt?: PtMap<BbAccordionPtPart, BbAccordionPtState>;
34
35
  } & Pick<BbCollapsibleProps, 'eager' | 'transitionDuration'> & {
35
36
  /**
36
- * Used by v-model to trigger opening / closing the collapsible.
37
- * An accordion with no `v-model` starts closed.
37
+ * Open (`true`) or closed. With `value`, the key a group of accordions
38
+ * shares: open while it equals `value`, `null` when none is. An
39
+ * accordion with no `v-model` starts closed.
38
40
  * @defaultValue `false`
39
41
  */
40
- modelValue?: boolean;
42
+ modelValue?: boolean | string | number | null;
43
+ /**
44
+ * This accordion's key in a group sharing one `v-model`: open while the
45
+ * model equals it; a click sets the model to it, or to `null` to close.
46
+ * One open at a time.
47
+ */
48
+ value?: string | number;
49
+ /**
50
+ * The header does not toggle and says `aria-disabled` (it stays
51
+ * focusable); an open panel stays open.
52
+ */
53
+ disabled?: boolean;
41
54
  } & {
42
55
  /**
43
56
  * The trigger's text, with a chevron at its end that turns when open,
@@ -61,9 +74,10 @@ export type BbAccordionProps = BbAccordionPtKeys & {
61
74
  };
62
75
  export type BbAccordionEvents =
63
76
  /**
64
- * Emitted when the accordion open/closed state changes.
77
+ * Emitted when the accordion opens or closes: `true` / `false`, or with
78
+ * `value` that key, or `null` on close.
65
79
  */
66
- (e: 'update:modelValue', value: boolean) => void;
80
+ (e: 'update:modelValue', value: any) => void;
67
81
  /** Props exposed by the `header` and `default` slots. */
68
82
  export type BbAccordionToggleSlotProps = {
69
83
  /** Whether the accordion panel is currently open. */
@@ -7,6 +7,6 @@ var e = {
7
7
  "icon",
8
8
  "panel"
9
9
  ],
10
- states: ["open"]
10
+ states: ["disabled", "open"]
11
11
  };
12
12
  export { e as BB_ACCORDION_PT };
@@ -11,8 +11,8 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
11
11
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
12
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
13
13
  }>, {
14
- hideClose: boolean;
15
14
  variant: import('../../index.js').AlertVariantType;
15
+ hideClose: boolean;
16
16
  transitionDuration: number;
17
17
  iconSize: number | import('../../types/CommonProps.js').CssSize | keyof import('../../index.js').BbDialogSizes;
18
18
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -7,17 +7,17 @@ import { Fragment as i, createBlock as a, createCommentVNode as o, createElement
7
7
  var _ = /*@__PURE__*/ l({
8
8
  __name: "BadgeBodyContent",
9
9
  setup(l) {
10
- let _ = r() ?? n().throw("[BbBadge] internal body renderer mounted outside a badge — this is a bug.");
11
- return (n, r) => g(_).icon.value || g(_).slots.icon ? (p(), s(i, { key: 0 }, [g(_).loading.value ? (p(), a(t, d({
10
+ let _ = r() ?? n().throw("[BbBadge] internal body renderer mounted outside a badge — this is a bug."), v = () => _.slots["prepend:icon"] ?? (_.prependIcon.value ? void 0 : _.slots["append:icon"]), y = () => _.prependIcon.value ?? _.appendIcon.value;
11
+ return (n, r) => g(_).iconOnly.value ? (p(), s(i, { key: 0 }, [g(_).loading.value ? (p(), a(t, d({
12
12
  key: 0,
13
13
  class: "bb-badge__spinner bb-badge__icon"
14
- }, g(_).passthrough.spinner), null, 16)) : g(_).slots.icon ? (p(), s("span", d({
14
+ }, g(_).passthrough.spinner), null, 16)) : v() ? (p(), s("span", d({
15
15
  key: 1,
16
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(e, d({
17
+ }, g(_).passthrough.icon), [(p(), a(h(v()), f(u(g(_).iconScope.value)), null, 16))], 16)) : y() ? (p(), a(e, d({
18
18
  key: 2,
19
19
  class: "bb-badge__icon",
20
- icon: g(_).icon.value
20
+ icon: y()
21
21
  }, g(_).passthrough.icon), null, 16, ["icon"])) : o("", !0), c("span", d({ class: "bb-badge__text bb-sr-only" }, g(_).passthrough.text), [m(n.$slots, "default")], 16)], 64)) : (p(), s(i, { key: 1 }, [
22
22
  g(_).spinnerLeads.value ? (p(), a(t, d({
23
23
  key: 0,
@@ -7,7 +7,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
7
7
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
8
  "onClick:clear"?: ((event: MouseEvent) => any) | undefined;
9
9
  }>, {
10
- size: keyof import('../../index.js').BbDialogSizes;
10
+ size: import('../../index.js').Responsive<keyof import('../../index.js').BbDialogSizes>;
11
11
  variant: import('../../index.js').BadgeVariantType;
12
12
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
13
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,18 +1,18 @@
1
1
  import { useConfigDefaults as e } from "../../composables/useConfigDefaults.js";
2
2
  import { useId as t } from "../../composables/useId.js";
3
3
  import { useLocale as n } from "../../composables/useLocale.js";
4
- import { useLogger as r } from "../../composables/useLogger.js";
5
- import { removedPropsFor as i } from "../../deprecation/removedProps.js";
6
- import { warnRemovedAttrs as ee } from "../../utilities/functions/warnRemovedAttrs.js";
7
- import a from "../BbIcon/BbIcon.vue.js";
8
- import te from "../BbSpinner/BbSpinner.vue.js";
9
- import o from "./BadgeBodyContent.vue.js";
10
- import s from "./BbBadgeButton.vue.js";
11
- import { provideBadgeHost as c } from "./badgeButtonContext.js";
12
- import l from "../../assets/svgs/clear.svg_raw.js";
13
- import { BB_BADGE_PT as u } from "./types.js";
14
- import { usePassthrough as d, variantPt as f } from "../../composables/usePassthrough.js";
15
- import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as ne, createVNode as v, defineComponent as y, guardReactiveProps as b, isVNode as x, mergeProps as S, normalizeProps as re, openBlock as C, renderSlot as w, shallowRef as T, toDisplayString as E, unref as D, useAttrs as O, useSlots as k, withCtx as A, withModifiers as j } from "vue";
4
+ import { useLogger as ee } from "../../composables/useLogger.js";
5
+ import { removedPropsFor as r } from "../../deprecation/removedProps.js";
6
+ import { warnRemovedAttrs as te } from "../../utilities/functions/warnRemovedAttrs.js";
7
+ import i from "../BbIcon/BbIcon.vue.js";
8
+ import ne from "../BbSpinner/BbSpinner.vue.js";
9
+ import a from "./BadgeBodyContent.vue.js";
10
+ import o from "./BbBadgeButton.vue.js";
11
+ import { provideBadgeHost as s } from "./badgeButtonContext.js";
12
+ import c from "../../assets/svgs/clear.svg_raw.js";
13
+ import { BB_BADGE_PT as l } from "./types.js";
14
+ import { usePassthrough as u, variantPt as d } from "../../composables/usePassthrough.js";
15
+ import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, guardReactiveProps as x, isVNode as S, mergeProps as C, normalizeProps as re, openBlock as w, renderSlot as T, shallowRef as ie, toDisplayString as E, unref as D, useAttrs as O, useSlots as k, withCtx as A, withModifiers as j } from "vue";
16
16
  // src/components/BbBadge/BbBadge.vue?vue&type=script&setup=true&lang.ts
17
17
  var M = ["id"], N = {
18
18
  key: 2,
@@ -24,8 +24,8 @@ var M = ["id"], N = {
24
24
  ], F = {
25
25
  key: 3,
26
26
  class: "bb-sr-only"
27
- }, I = /*@__PURE__*/ y({
28
- mixins: [f(u)],
27
+ }, I = /*@__PURE__*/ b({
28
+ mixins: [d(l)],
29
29
  inheritAttrs: !1,
30
30
  __name: "BbBadge",
31
31
  props: {
@@ -69,37 +69,38 @@ var M = ["id"], N = {
69
69
  "pt:clear:destructive": {},
70
70
  "pt:clear:outline": {},
71
71
  pt: {},
72
- icon: {},
72
+ iconOnly: { type: [Boolean, Object] },
73
73
  "prepend:icon": {},
74
74
  "append:icon": {},
75
75
  loading: { type: Boolean },
76
76
  clearable: { type: Boolean },
77
77
  clearableLabel: {},
78
78
  size: { default: void 0 },
79
+ text: {},
79
80
  variant: { default: void 0 }
80
81
  },
81
82
  emits: ["click:clear"],
82
- setup(f, { emit: y }) {
83
- let I = f, L = y, R = k(), z = e("BbBadge", I, {
83
+ setup(d, { emit: b }) {
84
+ let I = d, L = b, R = k(), z = e("BbBadge", I, {
84
85
  size: "md",
85
86
  variant: "primary"
86
- }), B = T(null), V = d({
87
+ }), B = ie(null), V = u({
87
88
  component: "BbBadge",
88
89
  attrs: O(),
89
90
  props: I,
90
- parts: u.parts,
91
- states: u.states,
91
+ parts: l.parts,
92
+ states: l.states,
92
93
  active: {
93
94
  loading: () => !!I.loading,
94
95
  activeLink: () => !!B.value?.value.activeLink,
95
96
  exactActiveLink: () => !!B.value?.value.exactActiveLink
96
97
  },
97
98
  variant: {
98
- ...u.variant,
99
+ ...l.variant,
99
100
  current: () => z.variant
100
101
  }
101
102
  });
102
- process.env.NODE_ENV !== "production" && ee("BbBadge", i("BbBadge"));
103
+ process.env.NODE_ENV !== "production" && te("BbBadge", r("BbBadge"));
103
104
  let H = [
104
105
  "xs",
105
106
  "sm",
@@ -107,15 +108,36 @@ var M = ["id"], N = {
107
108
  "lg",
108
109
  "xl",
109
110
  "2xl"
110
- ], { t: U } = n(), W = r(), G = m(() => H.includes(z.size) ? z.size : (W.warn(`Invalid size: "${z.size}" in BbBadge. Expected one of: ${H.join(", ")}. Falling back to "md".`), "md")), K = () => !!I.icon || !!R.icon, q = () => !!I["prepend:icon"] || !!R["prepend:icon"], J = () => !!I["append:icon"] || !!R["append:icon"], Y = () => ({
111
+ ], { t: U } = n(), W = ee(), G = p(() => {
112
+ let e = z.size, t = typeof e == "object" && e ? {
113
+ default: "md",
114
+ ...e
115
+ } : { default: e };
116
+ return Object.entries(t).map(([e, t]) => {
117
+ let n = t ?? "md";
118
+ return H.includes(n) || (W.warn(`Invalid size: "${n}" in BbBadge. Expected one of: ${H.join(", ")}. Falling back to "md".`), n = "md"), e === "default" ? `bb-badge--${n}` : `bb-badge--${e}-${n}`;
119
+ });
120
+ }), K = () => I.iconOnly === !0, q = [
121
+ "default",
122
+ "sm",
123
+ "md",
124
+ "lg",
125
+ "xl",
126
+ "2xl"
127
+ ], J = () => {
128
+ let e = I.iconOnly;
129
+ if (!e || e === !0) return [];
130
+ let t = !!e.default;
131
+ return q.flatMap((n) => (n !== "default" && e[n] !== void 0 && (t = !!e[n]), t ? [`bb-badge--icon-${n}`] : []));
132
+ }, ae = () => !!I["prepend:icon"] || !!R["prepend:icon"], oe = () => !!I["append:icon"] || !!R["append:icon"], Y = () => ({
111
133
  activeLink: !!B.value?.value.activeLink,
112
134
  exactActiveLink: !!B.value?.value.exactActiveLink,
113
135
  loading: !!I.loading
114
- }), X = () => J() && !q(), Z = (e) => Array.isArray(e) && e.some((e) => x(e) && (e.type === s || e.type === p && Z(e.children))), Q = () => Z(R.default?.({}));
115
- c({
136
+ }), X = () => oe() && !ae(), Z = (e) => Array.isArray(e) && e.some((e) => S(e) && (e.type === o || e.type === f && Z(e.children))), Q = () => Z(R.default?.({}));
137
+ s({
116
138
  passthrough: V,
117
- icon: { get value() {
118
- return I.icon;
139
+ iconOnly: { get value() {
140
+ return K();
119
141
  } },
120
142
  slots: R,
121
143
  iconScope: { get value() {
@@ -143,46 +165,47 @@ var M = ["id"], N = {
143
165
  B.value = e;
144
166
  }
145
167
  });
146
- let ie = m(() => [
168
+ let se = p(() => [
147
169
  "bb-badge",
148
- `bb-badge--${G.value}`,
170
+ ...G.value,
171
+ ...J(),
149
172
  z.variant && z.variant !== "none" && `bb-badge--${z.variant}`,
150
173
  {
151
174
  "bb-badge--icon": K(),
152
175
  "bb-badge--clearable": I.clearable,
153
176
  "bb-badge--loading": I.loading
154
177
  }
155
- ]), $ = t().id, ae = m(() => I.clearableLabel || Q() ? void 0 : `${$.value}__clear ${$.value}__body`), oe = (e) => {
178
+ ]), $ = t().id, ce = p(() => I.clearableLabel || Q() ? void 0 : `${$.value}__clear ${$.value}__body`), le = (e) => {
156
179
  L("click:clear", e);
157
180
  };
158
- return (e, t) => (C(), _("span", S({ class: ie.value }, D(V).rootAttrs), [
159
- Q() ? w(e.$slots, "default", {}, void 0, void 0, 0) : (C(), _("span", {
181
+ return (e, t) => (w(), g("span", C({ class: se.value }, D(V).rootAttrs), [
182
+ Q() ? T(e.$slots, "default", {}, void 0, void 0, 0) : (w(), g("span", {
160
183
  key: 1,
161
184
  id: `${D($)}__body`,
162
185
  class: "bb-badge__body"
163
- }, [v(o, null, {
164
- default: A(() => [w(e.$slots, "default")]),
186
+ }, [y(a, null, {
187
+ default: A(() => [T(e.$slots, "default", {}, () => [v(E(I.text), 1)])]),
165
188
  _: 3
166
189
  })], 8, M)),
167
- I.clearable ? (C(), _("span", N, [K() ? g("", !0) : (C(), _(p, { key: 0 }, [I.loading && X() ? (C(), h(te, S({
190
+ I.clearable ? (w(), g("span", N, [K() ? h("", !0) : (w(), g(f, { key: 0 }, [I.loading && X() ? (w(), m(ne, C({
168
191
  key: 0,
169
192
  class: "bb-badge__spinner bb-badge__append-icon"
170
- }, D(V).spinner), null, 16)) : R["append:icon"] ? (C(), _("span", S({
193
+ }, D(V).spinner), null, 16)) : R["append:icon"] ? (w(), g("span", C({
171
194
  key: 1,
172
195
  class: "bb-badge__append-icon bb-badge__icon-slot"
173
- }, D(V).icon), [w(e.$slots, "append:icon", re(b(Y())))], 16)) : I["append:icon"] ? (C(), h(a, S({
196
+ }, D(V).icon), [T(e.$slots, "append:icon", re(x(Y())))], 16)) : I["append:icon"] ? (w(), m(i, C({
174
197
  key: 2,
175
198
  class: "bb-badge__append-icon",
176
199
  icon: I["append:icon"]
177
- }, D(V).icon), null, 16, ["icon"])) : g("", !0)], 64)), ne("button", S({
200
+ }, D(V).icon), null, 16, ["icon"])) : h("", !0)], 64)), _("button", C({
178
201
  id: `${D($)}__clear`,
179
202
  "aria-label": I.clearableLabel || D(U)("badge.clearLabel").value,
180
- "aria-labelledby": ae.value,
203
+ "aria-labelledby": ce.value,
181
204
  class: "bb-badge__clear",
182
205
  type: "button",
183
- onClick: j(oe, ["stop"])
184
- }, D(V).clear), [v(a, { icon: D(l) }, null, 8, ["icon"])], 16, P)])) : g("", !0),
185
- I.loading ? (C(), _("span", F, E(D(U)("common.loadingText")), 1)) : g("", !0)
206
+ onClick: j(le, ["stop"])
207
+ }, D(V).clear), [y(i, { icon: D(c) }, null, 8, ["icon"])], 16, P)])) : h("", !0),
208
+ I.loading ? (w(), g("span", F, E(D(U)("common.loadingText")), 1)) : h("", !0)
186
209
  ], 16));
187
210
  }
188
211
  });