bitboss-ui 3.0.0-beta.74 → 3.0.0-beta.76

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 (321) hide show
  1. package/README.md +5 -5
  2. package/bin/cli.mjs +16 -10
  3. package/dist/ai/BbAlert.md +1 -1
  4. package/dist/ai/BbAvatar.md +86 -58
  5. package/dist/ai/BbBadge.md +1 -1
  6. package/dist/ai/BbBreadcrumbs.md +3 -3
  7. package/dist/ai/BbButton.md +4 -4
  8. package/dist/ai/BbCalendar.md +5 -2
  9. package/dist/ai/BbCheckboxGroup.md +5 -4
  10. package/dist/ai/BbColorInput.md +13 -1
  11. package/dist/ai/BbColorPalette.md +12 -7
  12. package/dist/ai/BbConfirm.md +1 -1
  13. package/dist/ai/BbDatePicker.md +13 -1
  14. package/dist/ai/BbDatePickerInput.md +18 -2
  15. package/dist/ai/BbDialog.md +6 -3
  16. package/dist/ai/BbDropdown.md +174 -77
  17. package/dist/ai/BbDropdownButton.md +37 -16
  18. package/dist/ai/BbGallery.md +3 -2
  19. package/dist/ai/BbIcon.md +10 -10
  20. package/dist/ai/BbNumberInput.md +3 -1
  21. package/dist/ai/BbOffCanvas.md +3 -2
  22. package/dist/ai/BbPopover.md +1 -1
  23. package/dist/ai/BbRadioGroup.md +4 -4
  24. package/dist/ai/BbSelect.md +227 -105
  25. package/dist/ai/BbSelectPopover.md +139 -14
  26. package/dist/ai/BbSwitchGroup.md +5 -4
  27. package/dist/ai/BbTable.md +18 -17
  28. package/dist/ai/BbTimePicker.md +13 -1
  29. package/dist/ai/BbTimePickerInput.md +16 -2
  30. package/dist/ai/BbToast.md +3 -2
  31. package/dist/ai/BbTree.md +5 -1
  32. package/dist/ai/CommonPopover.md +1 -0
  33. package/dist/ai/FlatListBox.md +1 -0
  34. package/dist/ai/GroupedListBox.md +3 -2
  35. package/dist/ai/ListBox.md +4 -2
  36. package/dist/ai/OptionsContainer.md +4 -4
  37. package/dist/ai/changelog.json +310 -7
  38. package/dist/ai/components.json +33 -35
  39. package/dist/ai/composables/useToast.md +2 -2
  40. package/dist/ai/design-tokens.json +60 -0
  41. package/dist/ai/guides/agent-contract.md +9 -5
  42. package/dist/ai/guides/calendars-and-digits.md +1 -1
  43. package/dist/ai/guides/design-tokens.md +13 -0
  44. package/dist/ai/guides/eslint-rules.md +1 -1
  45. package/dist/ai/guides/fetch-items-playbook.md +7 -11
  46. package/dist/ai/guides/icons-policy.md +32 -11
  47. package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
  48. package/dist/ai/guides/migration/adoption-checklist.md +1 -1
  49. package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
  50. package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
  51. package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
  52. package/dist/ai/guides/migration/components/bb-icon.md +4 -4
  53. package/dist/ai/guides/migration/components/bb-table.md +2 -1
  54. package/dist/ai/guides/migration/components/bb-toast.md +2 -2
  55. package/dist/ai/guides/migration/v2-to-v3.md +70 -24
  56. package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
  57. package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
  58. package/dist/ai/guides/passthrough.md +58 -58
  59. package/dist/ai/helpers/inertia/manifest.json +1 -1
  60. package/dist/ai/index.md +1 -1
  61. package/dist/ai/manifest/common.json +1 -0
  62. package/dist/ai/manifest/components/BbAvatar.json +5 -2
  63. package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
  64. package/dist/ai/manifest/components/BbCarousel.json +0 -3
  65. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  66. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
  67. package/dist/ai/manifest/components/BbColorInput.json +5 -2
  68. package/dist/ai/manifest/components/BbColorPalette.json +5 -2
  69. package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
  70. package/dist/ai/manifest/components/BbDatePicker.json +3 -0
  71. package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
  72. package/dist/ai/manifest/components/BbDialog.tree.json +3 -1
  73. package/dist/ai/manifest/components/BbDropdown.json +36 -28
  74. package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
  75. package/dist/ai/manifest/components/BbDropdown.tree.json +21 -11
  76. package/dist/ai/manifest/components/BbDropdownButton.json +24 -16
  77. package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
  78. package/dist/ai/manifest/components/BbDropdownButton.tree.json +4 -0
  79. package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
  80. package/dist/ai/manifest/components/BbOffCanvas.tree.json +3 -1
  81. package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
  82. package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
  83. package/dist/ai/manifest/components/BbSelect.json +47 -40
  84. package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
  85. package/dist/ai/manifest/components/BbSelectPopover.json +14 -7
  86. package/dist/ai/manifest/components/BbSelectPopover.tree.json +9 -2
  87. package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
  88. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
  89. package/dist/ai/manifest/components/BbTable.json +6 -6
  90. package/dist/ai/manifest/components/BbTable.tree.json +9 -1
  91. package/dist/ai/manifest/components/BbTimePicker.json +5 -2
  92. package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
  93. package/dist/ai/manifest/components/BbTree.json +1 -1
  94. package/dist/ai/manifest/components/CommonPopover.json +1 -0
  95. package/dist/ai/manifest/components/FlatListBox.json +2 -1
  96. package/dist/ai/manifest/components/GroupedListBox.json +3 -2
  97. package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
  98. package/dist/ai/manifest/components/ListBox.json +3 -2
  99. package/dist/ai/manifest/components/ListBox.tree.json +1 -1
  100. package/dist/ai/manifest/components/OptionsContainer.json +6 -4
  101. package/dist/ai/manifest/index.json +2 -2
  102. package/dist/ai/manifest/meta.json +0 -3
  103. package/dist/ai/manifest/types.advanced.json +6 -6
  104. package/dist/ai/manifest/types.api.json +1 -3
  105. package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
  106. package/dist/ai/recipes/inertia/onboarding.md +1 -1
  107. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
  108. package/dist/ai/recipes/nuxt/onboarding.md +1 -1
  109. package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
  110. package/dist/ai/recipes/vue/onboarding.md +2 -2
  111. package/dist/ai/source/BbAccordion.md +4 -5
  112. package/dist/ai/source/BbAvatar.md +128 -11
  113. package/dist/ai/source/BbBadge.md +18 -7
  114. package/dist/ai/source/BbBreadcrumbs.md +57 -56
  115. package/dist/ai/source/BbButton.md +41 -25
  116. package/dist/ai/source/BbCalendar.md +8 -6
  117. package/dist/ai/source/BbCarousel.md +41 -34
  118. package/dist/ai/source/BbCheckboxGroup.md +15 -9
  119. package/dist/ai/source/BbColorInput.md +19 -0
  120. package/dist/ai/source/BbColorPalette.md +23 -2
  121. package/dist/ai/source/BbDatePicker.md +18 -0
  122. package/dist/ai/source/BbDatePickerInput.md +47 -3
  123. package/dist/ai/source/BbDialog.md +14 -1
  124. package/dist/ai/source/BbDropdown.md +296 -99
  125. package/dist/ai/source/BbDropdownButton.md +61 -19
  126. package/dist/ai/source/BbDropdownGroup.md +189 -98
  127. package/dist/ai/source/BbGallery.md +82 -60
  128. package/dist/ai/source/BbHost.md +12 -0
  129. package/dist/ai/source/BbNumberInput.md +17 -10
  130. package/dist/ai/source/BbOffCanvas.md +14 -1
  131. package/dist/ai/source/BbPagination.md +12 -28
  132. package/dist/ai/source/BbRadioGroup.md +12 -5
  133. package/dist/ai/source/BbRating.md +4 -4
  134. package/dist/ai/source/BbSelect.md +151 -112
  135. package/dist/ai/source/BbSelectPopover.md +244 -29
  136. package/dist/ai/source/BbSwitchGroup.md +11 -4
  137. package/dist/ai/source/BbTable.md +114 -35
  138. package/dist/ai/source/BbTimePicker.md +19 -0
  139. package/dist/ai/source/BbTimePickerInput.md +21 -2
  140. package/dist/ai/source/BbToast.md +2 -2
  141. package/dist/ai/source/BbToastPortal.md +2 -2
  142. package/dist/ai/source/BbTree.md +1 -1
  143. package/dist/ai/source/ClearableButton.md +4 -2
  144. package/dist/ai/source/CommonPopover.md +24 -1
  145. package/dist/ai/source/ErrorIcon.md +4 -3
  146. package/dist/ai/source/FlatListBox.md +33 -7
  147. package/dist/ai/source/GroupedListBox.md +85 -14
  148. package/dist/ai/source/ListBox.md +11 -1
  149. package/dist/ai/source/OptionsContainer.md +29 -11
  150. package/dist/ai/source/WarningIcon.md +4 -3
  151. package/dist/assets/svgs/close.svg_raw.js +1 -1
  152. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
  153. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
  154. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
  155. package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +62 -43
  156. package/dist/components/BbAvatar/avatarIdentity.js +25 -0
  157. package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
  158. package/dist/components/BbAvatar/types.d.ts +24 -5
  159. package/dist/components/BbAvatar/types.js +5 -1
  160. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
  161. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +66 -64
  162. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +141 -146
  163. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
  164. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
  165. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
  166. package/dist/components/BbCalendar/useDayGrid.js +120 -123
  167. package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +503 -502
  168. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
  169. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
  170. package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
  171. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
  172. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
  173. package/dist/components/BbColorInput/types.d.ts +7 -0
  174. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
  175. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +208 -196
  176. package/dist/components/BbColorPalette/types.d.ts +7 -0
  177. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +3 -1
  178. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +84 -73
  179. package/dist/components/BbDatePicker/types.d.ts +7 -0
  180. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +4 -2
  181. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +496 -510
  182. package/dist/components/BbDatePickerInput/types.d.ts +7 -0
  183. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +219 -211
  184. package/dist/components/BbDialog/leaveGhost.js +22 -17
  185. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +106 -100
  186. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
  187. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +416 -369
  188. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +404 -354
  189. package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
  190. package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
  191. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +117 -102
  192. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +67 -38
  193. package/dist/components/BbDropdown/normalizeGroups.js +6 -2
  194. package/dist/components/BbDropdown/ptKeys.generated.d.ts +44 -20
  195. package/dist/components/BbDropdown/types.d.ts +109 -87
  196. package/dist/components/BbDropdown/types.js +3 -0
  197. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +3 -1
  198. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +101 -65
  199. package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +153 -57
  200. package/dist/components/BbDropdownButton/types.d.ts +23 -10
  201. package/dist/components/BbDropdownButton/types.js +4 -0
  202. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
  203. package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +335 -312
  204. package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
  205. package/dist/components/BbIcon/iconCache.js +1 -1
  206. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
  207. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +9 -5
  208. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +152 -144
  209. package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
  210. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
  211. package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
  212. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
  213. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
  214. package/dist/components/BbRadioGroup/types.d.ts +4 -7
  215. package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
  216. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
  217. package/dist/components/BbSelect/BbSelect.vue.d.ts +32 -20
  218. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +217 -196
  219. package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
  220. package/dist/components/BbSelect/types.d.ts +110 -111
  221. package/dist/components/BbSelect/types.js +1 -27
  222. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +8 -3
  223. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +728 -653
  224. package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
  225. package/dist/components/BbSelectPopover/types.d.ts +32 -17
  226. package/dist/components/BbSelectPopover/types.js +3 -1
  227. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
  228. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
  229. package/dist/components/BbSwitchGroup/types.d.ts +3 -6
  230. package/dist/components/BbTable/BbTable.vue.d.ts +2 -4
  231. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1171 -1152
  232. package/dist/components/BbTable/BbTableDataRow.js +97 -90
  233. package/dist/components/BbTable/types.d.ts +11 -10
  234. package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
  235. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
  236. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +145 -134
  237. package/dist/components/BbTimePicker/types.d.ts +7 -0
  238. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +4 -2
  239. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +290 -280
  240. package/dist/components/BbTimePickerInput/types.d.ts +7 -0
  241. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -78
  242. package/dist/components/BbToast/types.d.ts +2 -2
  243. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
  244. package/dist/components/BbTree/types.d.ts +1 -1
  245. package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
  246. package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
  247. package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
  248. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
  249. package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
  250. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +122 -102
  251. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +182 -153
  252. package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
  253. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
  254. package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
  255. package/dist/composables/useInternalIcon.js +25 -0
  256. package/dist/composables/useItemsGetter.js +34 -32
  257. package/dist/composables/useOpenModel.js +20 -0
  258. package/dist/deprecation/ai-deprecations.json.js +1 -1
  259. package/dist/i18n/locales/ar.json +2 -0
  260. package/dist/i18n/locales/cs.json +2 -0
  261. package/dist/i18n/locales/da.json +2 -0
  262. package/dist/i18n/locales/de-CH.json +2 -0
  263. package/dist/i18n/locales/de.json +2 -0
  264. package/dist/i18n/locales/el.json +2 -0
  265. package/dist/i18n/locales/en-GB.json +2 -0
  266. package/dist/i18n/locales/en.json +2 -0
  267. package/dist/i18n/locales/es-MX.json +2 -0
  268. package/dist/i18n/locales/es.json +2 -0
  269. package/dist/i18n/locales/fa.json +2 -0
  270. package/dist/i18n/locales/fi.json +2 -0
  271. package/dist/i18n/locales/fr.json +2 -0
  272. package/dist/i18n/locales/he.json +2 -0
  273. package/dist/i18n/locales/hu.json +2 -0
  274. package/dist/i18n/locales/it.json +2 -0
  275. package/dist/i18n/locales/ja.json +2 -0
  276. package/dist/i18n/locales/ko.json +2 -0
  277. package/dist/i18n/locales/nb.json +2 -0
  278. package/dist/i18n/locales/nl.json +2 -0
  279. package/dist/i18n/locales/pl.json +2 -0
  280. package/dist/i18n/locales/pt-BR.json +2 -0
  281. package/dist/i18n/locales/pt-PT.json +2 -0
  282. package/dist/i18n/locales/ro.json +2 -0
  283. package/dist/i18n/locales/ru.json +2 -0
  284. package/dist/i18n/locales/sv.json +2 -0
  285. package/dist/i18n/locales/tr.json +2 -0
  286. package/dist/i18n/locales/uk.json +2 -0
  287. package/dist/i18n/locales/zh-CN.json +2 -0
  288. package/dist/i18n/locales/zh-HK.json +2 -0
  289. package/dist/i18n/locales/zh-TW.json +2 -0
  290. package/dist/icon-scan.d.ts +1 -1
  291. package/dist/icon-scan.js +68 -61
  292. package/dist/index.d.ts +2 -2
  293. package/dist/llms-full.txt +1038 -451
  294. package/dist/llms-medium.txt +33 -28
  295. package/dist/llms.txt +2 -2
  296. package/dist/locale-blueprint.json +2 -0
  297. package/dist/nuxt.js +1 -1
  298. package/dist/styles.css +2 -2
  299. package/dist/types/ActionButton.d.ts +2 -3
  300. package/dist/types/Config.d.ts +8 -1
  301. package/dist/types/ConfigDefaults.d.ts +10 -2
  302. package/dist/types/Option.d.ts +10 -0
  303. package/dist/types/internalIcons.d.ts +89 -0
  304. package/dist/types/internalIcons.js +158 -0
  305. package/dist/types/ptComponentMap.d.ts +5 -5
  306. package/dist/utilities/functions/slotContent.js +19 -0
  307. package/dist/utils/configDefaults.js +75 -64
  308. package/dist/utils/iconsOption.js +48 -0
  309. package/dist/utils/loadRetry.js +8 -0
  310. package/dist/utils/versionCheck.js +1 -1
  311. package/dist/vite-plugin.d.ts +10 -16
  312. package/dist/vite.js +323 -307
  313. package/llms.txt +2 -2
  314. package/package.json +3 -1
  315. package/scripts/README.md +2 -0
  316. package/scripts/lib/adoption-checklist.json +1 -1
  317. package/scripts/lib/agent-setup.mjs +44 -26
  318. package/scripts/lib/update-install.mjs +48 -0
  319. package/scripts/lib/validate-bb-markup.mjs +93 -12
  320. package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
  321. package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
@@ -63,7 +63,7 @@
63
63
  import type { FallthroughAttrs } from '@/types/fallthrough';
64
64
  import { computed, h, useAttrs, type FunctionalComponent } from 'vue';
65
65
  import { useId } from '@/composables/useId';
66
- import chevronDownSvg from '@/assets/svgs/chevron_down.svg?raw';
66
+ import chevronDownSvgBuiltin from '@/assets/svgs/chevron_down.svg?raw';
67
67
  import BbBaseButton from '../BbBaseButton/BbBaseButton.vue';
68
68
  import BbIcon from '../BbIcon/BbIcon.vue';
69
69
  import BbCollapsible from '../BbCollapsible/BbCollapsible.vue';
@@ -75,8 +75,7 @@ import {
75
75
  } from './types';
76
76
  import { usePassthrough } from '@/composables/usePassthrough';
77
77
  import { transitions } from '@/utilities/misc/transitions';
78
- export type { BbAccordionProps, BbAccordionEvents, BbAccordionSlots };
79
-
78
+ import { useInternalIcon } from '@/composables/useInternalIcon';
80
79
  defineOptions({ inheritAttrs: false });
81
80
  /**
82
81
  * Open / closed, or with `value` the key a group of accordions shares: open
@@ -84,7 +83,6 @@ defineOptions({ inheritAttrs: false });
84
83
  */
85
84
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- a boolean, or with `value` whatever key the app's group uses (see `value`): typed narrower, a `v-model` on a boolean ref would reject the write-back
86
85
  const model = defineModel<any>({ default: false });
87
-
88
86
  const props = withDefaults(
89
87
  defineProps<
90
88
  BbAccordionProps &
@@ -94,8 +92,9 @@ const props = withDefaults(
94
92
  transitionDuration: transitions.medium,
95
93
  }
96
94
  );
97
-
98
95
  defineSlots<BbAccordionSlots>();
96
+ const chevronDownSvg = useInternalIcon('expandChevron', chevronDownSvgBuiltin);
97
+ export type { BbAccordionProps, BbAccordionEvents, BbAccordionSlots };
99
98
 
100
99
  /**
101
100
  * Passthrough. `panel` is our own div inside the collapsible (the region); `header` is the trigger; `title` and `icon` (the chevron) exist only without a `#header` slot.
@@ -6,11 +6,16 @@
6
6
 
7
7
  ```vue
8
8
  <template>
9
- <span class="bb-avatar" :style="avatarStyle" v-bind="passthrough.rootAttrs">
9
+ <span
10
+ class="bb-avatar"
11
+ :class="colorClasses"
12
+ :style="avatarStyle"
13
+ v-bind="passthrough.rootAttrs"
14
+ >
10
15
  <img
11
16
  v-if="shouldRenderImage"
12
17
  ref="image"
13
- :alt="alt"
18
+ :alt="label"
14
19
  :aria-hidden="imageHidden || undefined"
15
20
  class="bb-avatar__img"
16
21
  :class="{ 'bb-avatar__img--hidden': imageHidden }"
@@ -26,7 +31,15 @@
26
31
  v-bind="fallbackAccessibilityAttributes"
27
32
  >
28
33
  <slot>
34
+ <span
35
+ v-if="initials"
36
+ aria-hidden="true"
37
+ class="bb-avatar__initials"
38
+ v-bind="passthrough.initials"
39
+ >{{ initials }}</span
40
+ >
29
41
  <BbIcon
42
+ v-else
30
43
  class="bb-avatar__default-icon"
31
44
  :icon="defaultFallbackIcon"
32
45
  v-bind="passthrough.icon"
@@ -47,11 +60,15 @@ import { useLogger } from '@/composables/useLogger';
47
60
  import { removedPropsFor } from '@/deprecation/removedProps';
48
61
  import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
49
62
  import BbIcon from '../BbIcon/BbIcon.vue';
50
- import defaultFallbackIcon from '@/assets/svgs/user.svg?raw';
63
+ import defaultFallbackIconBuiltin from '@/assets/svgs/user.svg?raw';
51
64
  import { BB_AVATAR_PT, type BbAvatarProps, type BbAvatarSlots } from './types';
52
65
  import { usePassthrough } from '@/composables/usePassthrough';
53
-
66
+ import { useConfig } from '@/composables/useConfig';
67
+ import { LOCALE_TABLE, localeKeyOf } from '@/i18n/regions';
68
+ import { avatarHue, initialsOf } from './avatarIdentity';
69
+ import { useInternalIcon } from '@/composables/useInternalIcon';
54
70
  defineOptions({ inheritAttrs: false });
71
+
55
72
  const props = withDefaults(
56
73
  defineProps<
57
74
  BbAvatarProps & /* @vue-ignore */ FallthroughAttrs<'span', BbAvatarProps>
@@ -60,10 +77,17 @@ const props = withDefaults(
60
77
  alt: '',
61
78
  timeout: 400,
62
79
  size: 'md',
80
+ color: false,
63
81
  }
64
82
  );
65
83
 
66
84
  defineSlots<BbAvatarSlots>();
85
+
86
+ const defaultFallbackIcon = useInternalIcon(
87
+ 'avatar',
88
+ defaultFallbackIconBuiltin
89
+ );
90
+
67
91
  /**
68
92
  * Passthrough. `root` is the frame; `icon` the default user glyph, which exists only while the fallback shows and the default slot is not overridden. Everything it paints is configuration, not state.
69
93
  */
@@ -95,11 +119,29 @@ const parsedSize = computed(() => {
95
119
  }
96
120
  });
97
121
 
122
+ const config = useConfig();
123
+ /** The initials from `name`, cased with the locale's rules. */
124
+ const initials = computed(() =>
125
+ initialsOf(props.name, LOCALE_TABLE[localeKeyOf(config.locale) ?? 'en'].tag)
126
+ );
127
+ /** The accessible name: `alt`, else `name`. */
128
+ const label = computed(() => props.alt?.trim() || props.name?.trim() || '');
129
+
130
+ /** `color`: a palette hue from `name`, or the app's colour (`--bg` below). */
131
+ const colorClasses = computed(() => {
132
+ if (typeof props.color === 'string' && props.color)
133
+ return 'bb-avatar--custom';
134
+ const hue = props.color === true ? avatarHue(props.name) : undefined;
135
+ return hue ? ['bb-avatar--colored', `bb-avatar--${hue}`] : undefined;
136
+ });
137
+
98
138
  const avatarStyle = computed(() => {
99
139
  const style: Record<string, string> = {};
100
140
  if (parsedSize.value) {
101
141
  style['--size'] = parsedSize.value;
102
142
  }
143
+ if (typeof props.color === 'string' && props.color)
144
+ style['--bg'] = props.color;
103
145
  return style;
104
146
  });
105
147
  const shouldRenderImage = computed<boolean>(
@@ -116,10 +158,10 @@ const showFallback = computed<boolean>(
116
158
  () => !shouldRenderImage.value || imageHidden.value
117
159
  );
118
160
  const fallbackAccessibilityAttributes = computed(() => {
119
- if (!showFallback.value || !props.alt?.trim()) return {};
161
+ if (!showFallback.value || !label.value) return {};
120
162
  return {
121
163
  role: 'img',
122
- 'aria-label': props.alt.trim(),
164
+ 'aria-label': label.value,
123
165
  };
124
166
  });
125
167
 
@@ -196,13 +238,15 @@ import type { BbAvatarPtKeys } from './ptKeys.generated';
196
238
  *
197
239
  * @part root - The avatar frame, with the image or the fallback inside.
198
240
  * @part icon - The default user glyph — rendered only while there is no image
199
- * to show and the default slot is not overridden, so it lands nowhere
200
- * otherwise.
241
+ * to show, the default slot is not overridden and `name` gives no
242
+ * initials, so it lands nowhere otherwise.
243
+ * @part initials - The initials from `name` — rendered only while there is
244
+ * no image to show and the default slot is not overridden.
201
245
  */
202
- export type BbAvatarPtPart = 'root' | 'icon';
246
+ export type BbAvatarPtPart = 'root' | 'icon' | 'initials';
203
247
  /** The runtime lists the resolver is wired with — no states: nothing this component paints is a state. */
204
248
  export const BB_AVATAR_PT = {
205
- parts: ['root', 'icon'],
249
+ parts: ['root', 'icon', 'initials'],
206
250
  states: [],
207
251
  } as const satisfies {
208
252
  parts: readonly BbAvatarPtPart[];
@@ -221,11 +265,28 @@ export type BbAvatarProps = Pick<BbIconProps, 'size'> &
221
265
  */
222
266
  pt?: PtMap<BbAvatarPtPart, never>;
223
267
  /**
224
- * Alternative text for the image, used for accessibility.
268
+ * Alternative text for the image, used for accessibility. Without it
269
+ * the avatar is labelled with `name`.
225
270
  *
226
271
  * @defaultValue `''`
227
272
  */
228
273
  alt?: ImgHTMLAttributes['alt'];
274
+ /**
275
+ * The person's name. With no image and no default slot, the avatar
276
+ * shows its initials (first letters of the first and last word; none:
277
+ * the person icon). Also the accessible name when `alt` is empty, and
278
+ * the input of `color`.
279
+ */
280
+ name?: string;
281
+ /**
282
+ * Paints the fallback (initials or icon). `true`: a palette colour
283
+ * picked from `name`, stable across renders and the server. A string:
284
+ * any CSS colour or `var()` as the background, with black or white
285
+ * ink, whichever reads. Unset: the primary colour.
286
+ *
287
+ * @defaultValue `false`
288
+ */
289
+ color?: boolean | string;
229
290
  /**
230
291
  * Source URL of the avatar image.
231
292
  */
@@ -271,6 +332,8 @@ export type { BbIconSize as Size };
271
332
  --default-icon-size: clamp(14px, calc(var(--size) * 0.7), 48px);
272
333
  /* Initials: 40% of the avatar, floored at 8px */
273
334
  --fs: max(8px, calc(var(--size) * 0.4));
335
+ /* The palette hue `color` picks (a modifier class sets it). */
336
+ --hue: 0;
274
337
  /* The theme's resting lift on small chrome, declared here so an
275
338
  ancestor's `--elev` cannot reach in; `--elev: none` flattens one. */
276
339
  --elev: var(--bb-elev-sm);
@@ -316,9 +379,63 @@ export type { BbIconSize as Size };
316
379
  place-items: center;
317
380
  }
318
381
 
382
+ .bb-avatar__initials {
383
+ font-weight: 600;
384
+ letter-spacing: 0.02em;
385
+ }
386
+
319
387
  .bb-avatar__default-icon {
320
388
  --size: var(--default-icon-size);
321
389
  color: color-mix(in oklab, var(--fg) 80%, var(--bg));
322
390
  }
391
+
392
+ /* `color`: a palette hue from the `name` (the modifier sets `--hue`), the
393
+ scheme's fill and ink from the theme tokens. */
394
+ &.bb-avatar--colored {
395
+ --bg: oklch(var(--bb-avatar-bg-l) var(--bb-avatar-bg-c) var(--hue));
396
+ --fg: oklch(var(--bb-avatar-ink-l) var(--bb-avatar-ink-c) var(--hue));
397
+ }
398
+ &.bb-avatar--coral {
399
+ --hue: var(--bb-avatar-hue-coral);
400
+ }
401
+ &.bb-avatar--tangerine {
402
+ --hue: var(--bb-avatar-hue-tangerine);
403
+ }
404
+ &.bb-avatar--sunflower {
405
+ --hue: var(--bb-avatar-hue-sunflower);
406
+ }
407
+ &.bb-avatar--mint {
408
+ --hue: var(--bb-avatar-hue-mint);
409
+ }
410
+ &.bb-avatar--teal {
411
+ --hue: var(--bb-avatar-hue-teal);
412
+ }
413
+ &.bb-avatar--sky {
414
+ --hue: var(--bb-avatar-hue-sky);
415
+ }
416
+ &.bb-avatar--blue {
417
+ --hue: var(--bb-avatar-hue-blue);
418
+ }
419
+ &.bb-avatar--violet {
420
+ --hue: var(--bb-avatar-hue-violet);
421
+ }
422
+ &.bb-avatar--orchid {
423
+ --hue: var(--bb-avatar-hue-orchid);
424
+ }
425
+ &.bb-avatar--rose {
426
+ --hue: var(--bb-avatar-hue-rose);
427
+ }
428
+
429
+ /* `color` as a CSS colour: `--bg` is set inline; the ink is black or
430
+ white, whichever reads — `contrast-color()` where supported, else by the
431
+ colour's OKLCH lightness. */
432
+ &.bb-avatar--custom {
433
+ --fg: oklch(from var(--bg) clamp(0, (0.63 - l) * 1000, 1) 0 0);
434
+ }
435
+ @supports (color: contrast-color(white)) {
436
+ &.bb-avatar--custom {
437
+ --fg: contrast-color(var(--bg));
438
+ }
439
+ }
323
440
  }
324
441
  ```
@@ -28,10 +28,10 @@
28
28
  v-bind="passthrough.spinner"
29
29
  />
30
30
  <span
31
- v-else-if="slots['append:icon']"
31
+ v-else-if="iconNodes('append')"
32
32
  class="bb-badge__append-icon bb-badge__icon-slot"
33
33
  v-bind="passthrough.icon"
34
- ><slot name="append:icon" v-bind="iconScope()"
34
+ ><SlotNodes :nodes="iconNodes('append')!"
35
35
  /></span>
36
36
  <BbIcon
37
37
  v-else-if="props['append:icon']"
@@ -71,11 +71,12 @@ import { removedPropsFor } from '@/deprecation/removedProps';
71
71
  import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
72
72
  import BbIcon from '../BbIcon/BbIcon.vue';
73
73
  import BbSpinner from '../BbSpinner/BbSpinner.vue';
74
+ import { SlotNodes, slotContent } from '@/utilities/functions/slotContent';
74
75
  import BadgeBodyContent from './BadgeBodyContent.vue';
75
76
  import BbBadgeButton from './BbBadgeButton.vue';
76
77
  import { provideBadgeHost, type HostValue } from './badgeButtonContext';
77
78
  import type { LinkState } from '../BbBaseButton/useLinkState';
78
- import clearIcon from '@/assets/svgs/clear.svg?raw';
79
+ import clearIconBuiltin from '@/assets/svgs/clear.svg?raw';
79
80
  import {
80
81
  BB_BADGE_PT,
81
82
  type BbBadgeProps,
@@ -84,12 +85,13 @@ import {
84
85
  type BbBadgeSlots,
85
86
  } from './types';
86
87
  import { usePassthrough, variantPt } from '@/composables/usePassthrough';
87
-
88
+ import { useInternalIcon } from '@/composables/useInternalIcon';
88
89
  defineOptions({
89
90
  // An app's own variants as declared `pt:<part>:<name>` props.
90
91
  mixins: [variantPt(BB_BADGE_PT)],
91
92
  inheritAttrs: false,
92
93
  });
94
+
93
95
  const props = withDefaults(
94
96
  defineProps<
95
97
  BbBadgeProps &
@@ -100,10 +102,13 @@ const props = withDefaults(
100
102
  variant: undefined,
101
103
  }
102
104
  );
105
+
103
106
  const emit = defineEmits<BbBadgeEvents>();
104
107
 
105
108
  const slots = defineSlots<BbBadgeSlots>();
106
109
 
110
+ const clearIcon = useInternalIcon('clear', clearIconBuiltin);
111
+
107
112
  const configDefaults = useConfigDefaults('BbBadge', props, {
108
113
  size: 'md',
109
114
  variant: 'primary',
@@ -177,8 +182,14 @@ const iconOnlyBands = () => {
177
182
  return on ? [`bb-badge--icon-${band}`] : [];
178
183
  });
179
184
  };
180
- const hasPrepend = () => !!props['prepend:icon'] || !!slots['prepend:icon'];
181
- const hasAppend = () => !!props['append:icon'] || !!slots['append:icon'];
185
+ /**
186
+ * What an icon slot renders, `undefined` for none or an empty one (the
187
+ * empty-slot rule: it falls back to the prop). Read in render only.
188
+ */
189
+ const iconNodes = (side: 'prepend' | 'append') =>
190
+ slotContent(slots[`${side}:icon`], iconScope());
191
+ const hasPrepend = () => !!props['prepend:icon'] || !!iconNodes('prepend');
192
+ const hasAppend = () => !!props['append:icon'] || !!iconNodes('append');
182
193
 
183
194
  /** What an icon slot sees: the badge's `pt` states. */
184
195
  const iconScope = (): BbBadgeIconSlotProps => ({
@@ -223,7 +234,7 @@ provideBadgeHost({
223
234
  return iconOnly();
224
235
  },
225
236
  },
226
- slots,
237
+ iconNodes,
227
238
  iconScope: {
228
239
  get value() {
229
240
  return iconScope();
@@ -110,28 +110,25 @@
110
110
  :disabled="item.disabled || disabled"
111
111
  :tag="isCurrent(item, index) ? 'span' : undefined"
112
112
  >
113
- <!-- prepend: <value>:prepend | item:prepend | inline prepend:icon -->
114
- <slot
115
- :disabled="!!(item.disabled || disabled)"
116
- :index="index"
117
- :item="item"
118
- :label="item.label"
119
- :name="edgeSlot(item, 'prepend').name"
120
- />
121
- <BbIcon
122
- v-if="
123
- !edgeSlot(item, 'prepend').exists && item['prepend:icon']
124
- "
125
- class="bb-breadcrumbs__item-icon bb-breadcrumbs__item-icon--prepend"
126
- :icon="item['prepend:icon']"
127
- size="14"
128
- v-bind="
129
- passthrough.part('icon', {
130
- active: isCurrent(item, index),
131
- disabled: item.disabled || disabled || undefined,
132
- })
133
- "
134
- />
113
+ <!-- prepend: <value>:prepend | item:prepend | inline prepend:icon; a slot
114
+ rendering nothing for this crumb falls through -->
115
+ <SlotChain
116
+ :props="edgeProps(item, index)"
117
+ :slots="edgeSlots(item, 'prepend')"
118
+ >
119
+ <BbIcon
120
+ v-if="item['prepend:icon']"
121
+ class="bb-breadcrumbs__item-icon bb-breadcrumbs__item-icon--prepend"
122
+ :icon="item['prepend:icon']"
123
+ size="14"
124
+ v-bind="
125
+ passthrough.part('icon', {
126
+ active: isCurrent(item, index),
127
+ disabled: item.disabled || disabled || undefined,
128
+ })
129
+ "
130
+ />
131
+ </SlotChain>
135
132
  <span
136
133
  class="bb-breadcrumbs__text"
137
134
  :title="
@@ -156,26 +153,25 @@
156
153
  >{{ item.label }}</slot
157
154
  >
158
155
  </span>
159
- <!-- append: <value>:append | item:append | inline append:icon -->
160
- <slot
161
- :disabled="!!(item.disabled || disabled)"
162
- :index="index"
163
- :item="item"
164
- :label="item.label"
165
- :name="edgeSlot(item, 'append').name"
166
- />
167
- <BbIcon
168
- v-if="!edgeSlot(item, 'append').exists && item['append:icon']"
169
- class="bb-breadcrumbs__item-icon bb-breadcrumbs__item-icon--append"
170
- :icon="item['append:icon']"
171
- size="14"
172
- v-bind="
173
- passthrough.part('icon', {
174
- active: isCurrent(item, index),
175
- disabled: item.disabled || disabled || undefined,
176
- })
177
- "
178
- />
156
+ <!-- append: <value>:append | item:append | inline append:icon; a slot
157
+ rendering nothing for this crumb falls through -->
158
+ <SlotChain
159
+ :props="edgeProps(item, index)"
160
+ :slots="edgeSlots(item, 'append')"
161
+ >
162
+ <BbIcon
163
+ v-if="item['append:icon']"
164
+ class="bb-breadcrumbs__item-icon bb-breadcrumbs__item-icon--append"
165
+ :icon="item['append:icon']"
166
+ size="14"
167
+ v-bind="
168
+ passthrough.part('icon', {
169
+ active: isCurrent(item, index),
170
+ disabled: item.disabled || disabled || undefined,
171
+ })
172
+ "
173
+ />
174
+ </SlotChain>
179
175
  </BbBaseButton>
180
176
  <span
181
177
  v-if="index < visibleItems.length - 1"
@@ -207,6 +203,7 @@ import { useResizeObserver } from '@vueuse/core';
207
203
  import { useLocale } from '@/composables/useLocale';
208
204
  import { useLogger } from '@/composables/useLogger';
209
205
  import { slotKey } from '@/utilities/functions/slotKey';
206
+ import { SlotChain } from '@/utilities/functions/slotContent';
210
207
  import { removedPropsFor } from '@/deprecation/removedProps';
211
208
  import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
212
209
  import BbBaseButton from '../BbBaseButton/BbBaseButton.vue';
@@ -215,7 +212,7 @@ import {
215
212
  estimateBreadcrumbItemWidth,
216
213
  estimateEllipsisWidth,
217
214
  } from './estimateBreadcrumbItemWidth';
218
- import chevronRight from '@/assets/svgs/chevron_right.svg?raw';
215
+ import chevronRightBuiltin from '@/assets/svgs/chevron_right.svg?raw';
219
216
  import {
220
217
  BB_BREADCRUMBS_PT,
221
218
  type BbBreadcrumbsProps,
@@ -225,8 +222,9 @@ import {
225
222
  import { usePassthrough } from '@/composables/usePassthrough';
226
223
  import type { InternalItem as DropdownItem } from '../BbDropdown/types';
227
224
  import BbIcon from '../BbIcon/BbIcon.vue';
228
-
225
+ import { useInternalIcon } from '@/composables/useInternalIcon';
229
226
  defineOptions({ inheritAttrs: false });
227
+
230
228
  const props = withDefaults(
231
229
  defineProps<
232
230
  BbBreadcrumbsProps &
@@ -242,6 +240,8 @@ const props = withDefaults(
242
240
 
243
241
  defineSlots<BbBreadcrumbsSlots>();
244
242
 
243
+ const chevronRight = useInternalIcon('separator', chevronRightBuiltin);
244
+
245
245
  /**
246
246
  * The crumbs that exist: a `hidden` crumb is out before width
247
247
  * estimation, overflow, the trail and the overflow menu alike — everything
@@ -358,19 +358,20 @@ const buttonProps = (item: Item, index: number) => {
358
358
  };
359
359
 
360
360
  /**
361
- * Resolves an edge region's precedence — `<value>:suffix` (per-item) →
362
- * `item:suffix` (generic) → inline `prepend:icon`/`append:icon`. Returns the
363
- * winning slot `name` plus whether a slot actually `exists`; when it doesn't,
364
- * `name` is the (absent) per-key name so the outlet renders nothing and the
365
- * inline icon takes over. The slot is rendered unconditionally (no `v-if`) so
366
- * Vue doesn't inject a branch `key` into the consumer's slot scope.
361
+ * An edge region's slots, strongest first: `<value>:suffix` (per item), then
362
+ * `item:suffix`; the inline `prepend:icon`/`append:icon` is the fallback when
363
+ * neither renders anything for the crumb.
367
364
  */
368
- const edgeSlot = (item: Item, suffix: 'prepend' | 'append') => {
369
- const perKey = `${itemSlotBase(item)}:${suffix}`;
370
- if (slots[perKey]) return { name: perKey, exists: true };
371
- if (slots[`item:${suffix}`]) return { name: `item:${suffix}`, exists: true };
372
- return { name: perKey, exists: false };
373
- };
365
+ const edgeSlots = (item: Item, suffix: 'prepend' | 'append') => [
366
+ slots[`${itemSlotBase(item)}:${suffix}`],
367
+ slots[`item:${suffix}`],
368
+ ];
369
+ const edgeProps = (item: Item, index: number) => ({
370
+ disabled: !!(item.disabled || props.disabled),
371
+ index,
372
+ item,
373
+ label: item.label,
374
+ });
374
375
 
375
376
  /** Slot names forwarded into the overflow `<BbDropdown>` (per-item slots only). */
376
377
  const forwardedItemSlots = computed(() =>
@@ -36,22 +36,30 @@
36
36
  icons render (one or both). Bound LAST on each so a consumer
37
37
  attribute beats ours and a consumer class appends. An icon slot
38
38
  beats its prop and renders INSIDE the part, a box of the
39
- same class, so `pt:icon`, `--icon-size` and the spinner swap hold.
39
+ same class, so `pt:icon`, `--icon-size` and the spinner swap hold. A
40
+ slot that renders nothing falls back to the prop (the empty-slot rule).
40
41
  `icon-only` is CSS alone: the label is hidden
41
42
  but stays the name, and the append icon goes when a prepend one is
42
43
  there, so a breakpoint can switch it with no render. -->
43
- <span
44
- v-if="slots['prepend:icon']"
45
- class="bb-button__prepend-icon bb-button__icon-slot"
46
- v-bind="passthrough.icon"
47
- ><slot name="prepend:icon" v-bind="iconScope"
48
- /></span>
49
- <BbIcon
50
- v-else-if="props['prepend:icon']"
51
- class="bb-button__prepend-icon"
52
- :icon="props['prepend:icon']"
53
- v-bind="passthrough.icon"
54
- />
44
+ <SlotContent
45
+ v-if="slots['prepend:icon'] || props['prepend:icon']"
46
+ v-slot="{ nodes: prependNodes }"
47
+ :of="slots['prepend:icon']"
48
+ :props="iconScope"
49
+ >
50
+ <span
51
+ v-if="prependNodes"
52
+ class="bb-button__prepend-icon bb-button__icon-slot"
53
+ v-bind="passthrough.icon"
54
+ ><SlotNodes :nodes="prependNodes"
55
+ /></span>
56
+ <BbIcon
57
+ v-else-if="props['prepend:icon']"
58
+ class="bb-button__prepend-icon"
59
+ :icon="props['prepend:icon']"
60
+ v-bind="passthrough.icon"
61
+ />
62
+ </SlotContent>
55
63
  <span
56
64
  class="bb-button__text"
57
65
  :class="{ 'bb-sr-only': props.iconOnly === true }"
@@ -62,18 +70,25 @@
62
70
  t('common.loadingText')
63
71
  }}</span>
64
72
 
65
- <span
66
- v-if="slots['append:icon']"
67
- class="bb-button__append-icon bb-button__icon-slot"
68
- v-bind="passthrough.icon"
69
- ><slot name="append:icon" v-bind="iconScope"
70
- /></span>
71
- <BbIcon
72
- v-else-if="props['append:icon']"
73
- class="bb-button__append-icon"
74
- :icon="props['append:icon']"
75
- v-bind="passthrough.icon"
76
- />
73
+ <SlotContent
74
+ v-if="slots['append:icon'] || props['append:icon']"
75
+ v-slot="{ nodes: appendNodes }"
76
+ :of="slots['append:icon']"
77
+ :props="iconScope"
78
+ >
79
+ <span
80
+ v-if="appendNodes"
81
+ class="bb-button__append-icon bb-button__icon-slot"
82
+ v-bind="passthrough.icon"
83
+ ><SlotNodes :nodes="appendNodes"
84
+ /></span>
85
+ <BbIcon
86
+ v-else-if="props['append:icon']"
87
+ class="bb-button__append-icon"
88
+ :icon="props['append:icon']"
89
+ v-bind="passthrough.icon"
90
+ />
91
+ </SlotContent>
77
92
  </BbBaseButton>
78
93
  </template>
79
94
 
@@ -83,6 +98,7 @@ import { useBbFormSavingById } from '@/composables/useBbForm';
83
98
  import BbBaseButton from '@/components/BbBaseButton/BbBaseButton.vue';
84
99
  import BbSpinner from '@/components/BbSpinner/BbSpinner.vue';
85
100
  import BbIcon from '../BbIcon/BbIcon.vue';
101
+ import { SlotContent, SlotNodes } from '@/utilities/functions/slotContent';
86
102
  import { computed, inject, mergeProps, ref, useAttrs, watchEffect } from 'vue';
87
103
  import { BB_FORM_SUBMIT_LOCK } from '@/composables/formSubmitLock';
88
104
  import { pickBy } from '@/utilities/functions/pickBy';
@@ -430,8 +430,8 @@
430
430
  generic="R extends boolean = false, M extends boolean = false"
431
431
  >
432
432
  import BbIcon from '../BbIcon/BbIcon.vue';
433
- import chevronLeftSmallSvg from '@/assets/svgs/chevron_left_small.svg?raw';
434
- import chevronRightSmallSvg from '@/assets/svgs/chevron_right_small.svg?raw';
433
+ import chevronLeftSmallSvgBuiltin from '@/assets/svgs/chevron_left_small.svg?raw';
434
+ import chevronRightSmallSvgBuiltin from '@/assets/svgs/chevron_right_small.svg?raw';
435
435
  import type { Dayjs } from 'dayjs';
436
436
  import type { ShapeErasedProps } from '@/types/ShapeErased';
437
437
  import type { FallthroughAttrs } from '@/types/fallthrough';
@@ -494,11 +494,10 @@ import type {
494
494
  BbCalendarSlots,
495
495
  } from './types';
496
496
  import { BB_CALENDAR_PT } from './types';
497
-
497
+ import { useInternalIcon } from '@/composables/useInternalIcon';
498
498
  // The consumer's `class` and attributes land on the root through the resolver
499
499
  // (`rootAttrs`), where `pt:root` merges after them.
500
500
  defineOptions({ inheritAttrs: false });
501
-
502
501
  const declaredProps = withDefaults(
503
502
  defineProps<
504
503
  BbCalendarBaseProps &
@@ -513,10 +512,13 @@ const declaredProps = withDefaults(
513
512
  type: 'date',
514
513
  }
515
514
  );
516
-
517
515
  const declaredEmit = defineEmits<BbCalendarEvents<R, M>>();
518
-
519
516
  defineSlots<BbCalendarSlots>();
517
+ const chevronRightSmallSvg = useInternalIcon(
518
+ 'next',
519
+ chevronRightSmallSvgBuiltin
520
+ );
521
+ const chevronLeftSmallSvg = useInternalIcon('prev', chevronLeftSmallSvgBuiltin);
520
522
 
521
523
  // `R` / `M` type the v-model for the caller; inside, the value is either shape.
522
524
  const props = declaredProps as unknown as ShapeErasedProps<