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
@@ -59,7 +59,13 @@
59
59
  aria-live="polite"
60
60
  class="bb-table-loading__text bb-sr-only"
61
61
  role="status"
62
- >{{ loading ? loadingText || t('common.loadingText').value : '' }}</span
62
+ >{{
63
+ loading
64
+ ? loadingText || t('common.loadingText').value
65
+ : itemsError !== null
66
+ ? resolvedFailedText
67
+ : ''
68
+ }}</span
63
69
  >
64
70
  <!-- Row reorder (POC): the handles' keyboard instructions, the reason
65
71
  they refuse while a sort is active, and the polite region every lift,
@@ -274,8 +280,8 @@
274
280
  >
275
281
  <!-- eslint-enable vue/attributes-order -->
276
282
  <HeaderAffix
277
- v-if="headerAffixName(header.key, 'prepend')"
278
- :name="headerAffixName(header.key, 'prepend')!"
283
+ v-if="headerAffixNames(header.key, 'prepend').length"
284
+ :names="headerAffixNames(header.key, 'prepend')"
279
285
  :scope="headerAffixScope(header)"
280
286
  />
281
287
  <!-- @vue-ignore -->
@@ -315,10 +321,19 @@
315
321
  }}</span>
316
322
  <!-- One up arrow (ascending, AG Grid convention); the desc state
317
323
  rotates it 180° (the glyph is its own mirror), so the flip
318
- between directions animates. -->
324
+ between directions animates. An app's own `sortDesc` glyph
325
+ replaces the rotation. -->
319
326
  <BbIcon
320
327
  class="bb-table__sort-icon"
321
- :icon="arrowUpSvg"
328
+ :class="{
329
+ 'bb-table__sort-icon--own-desc':
330
+ header.sortOrder === 'desc' && !!sortDescIcon,
331
+ }"
332
+ :icon="
333
+ header.sortOrder === 'desc' && sortDescIcon
334
+ ? sortDescIcon
335
+ : arrowUpIcon
336
+ "
322
337
  size="1em"
323
338
  v-bind="
324
339
  passthrough.part('sortIcon', sortStates(header.sortOrder))
@@ -330,8 +345,8 @@
330
345
  }}</span>
331
346
  </slot>
332
347
  <HeaderAffix
333
- v-if="headerAffixName(header.key, 'append')"
334
- :name="headerAffixName(header.key, 'append')!"
348
+ v-if="headerAffixNames(header.key, 'append').length"
349
+ :names="headerAffixNames(header.key, 'append')"
335
350
  :scope="headerAffixScope(header)"
336
351
  />
337
352
  <!-- Resize handle on the trailing edge (root tables only — an
@@ -494,12 +509,30 @@
494
509
  class="bb-table-empty__cell"
495
510
  :role="cellRole"
496
511
  >
497
- <div class="bb-table-empty__content">
498
- <slot :error="itemsError" name="empty">
512
+ <!-- A failed load is the table's own row, never `#empty` (empty
513
+ means empty), and ends with "Try again".
514
+ The busy region above announces the message. -->
515
+ <div
516
+ v-if="itemsError !== null"
517
+ class="bb-table-empty__content bb-table-empty__content--failed"
518
+ >
519
+ <span class="bb-table-empty__failed"
520
+ ><span class="bb-table-empty__text">{{
521
+ resolvedFailedText
522
+ }}</span
523
+ ><button
524
+ class="bb-load-retry"
525
+ type="button"
526
+ @click="runRetry($event, retryLoad, () => tableRef)"
527
+ >
528
+ {{ t('common.retryLabel').value }}
529
+ </button></span
530
+ >
531
+ </div>
532
+ <div v-else class="bb-table-empty__content">
533
+ <slot name="empty">
499
534
  <span class="bb-table-empty__text">{{
500
- itemsError !== null
501
- ? failedText || t('common.failedText').value
502
- : emptyText || t('common.emptyText').value
535
+ emptyText || t('common.emptyText').value
503
536
  }}</span>
504
537
  </slot>
505
538
  </div>
@@ -631,7 +664,7 @@
631
664
  "
632
665
  >
633
666
  import BbIcon from '../BbIcon/BbIcon.vue';
634
- import moveSvg from '@/assets/svgs/move.svg?raw';
667
+ import moveSvgBuiltin from '@/assets/svgs/move.svg?raw';
635
668
  import arrowUpSvg from '@/assets/svgs/arrow_up.svg?raw';
636
669
  import type { FallthroughAttrs } from '@/types/fallthrough';
637
670
  import { useConfigDefaults } from '@/composables/useConfigDefaults';
@@ -675,6 +708,7 @@ import {
675
708
  import { clamp } from '@/utilities/functions/clamp';
676
709
  import { hash } from '@/utilities/functions/hash';
677
710
  import { isNil } from '@/utilities/functions/isNil';
711
+ import { slotContent } from '@/utilities/functions/slotContent';
678
712
  import { when } from '@/utilities/functions/when';
679
713
  import { useId } from '@/composables/useId';
680
714
  import { useItemValue } from '@/composables/useItemValue';
@@ -786,6 +820,8 @@ import {
786
820
  takeOutOfTabOrder,
787
821
  } from './gridWidgets';
788
822
  import BbBaseButton from '../BbBaseButton/BbBaseButton.vue';
823
+ import { runRetry } from '@/utils/loadRetry';
824
+ import { useInternalIcon } from '@/composables/useInternalIcon';
789
825
 
790
826
  /** A row's value through `item-value`: the whole row when it is unset. */
791
827
  type RowValue = TableValueOf<Item, A>;
@@ -795,17 +831,14 @@ const selectAll = defineModel<boolean>('selectAll', {
795
831
  required: false,
796
832
  default: false,
797
833
  });
798
-
799
834
  const sort = defineModel<BbTableSortEntry[]>('sort', {
800
835
  required: false,
801
836
  default: () => [],
802
837
  });
803
-
804
838
  const order = defineModel<string[]>('order', {
805
839
  required: false,
806
840
  default: () => [],
807
841
  });
808
-
809
842
  // Highlight: documented on `BbTableProps.highlighted` (a JSDoc block here
810
843
  // would be appended to the prop's description in the manifest).
811
844
  // Typed by `item-value` on the emit side; the prop stays `any` through
@@ -815,7 +848,6 @@ const highlighted = defineModel<RowValue | null>('highlighted', {
815
848
  // Unset (not `null`): bound or not is read off it.
816
849
  default: undefined as never,
817
850
  });
818
-
819
851
  // The element(s) the fall-through attributes reach, as typed below.
820
852
  // @attrTargets div fieldset
821
853
  const props = withDefaults(
@@ -850,7 +882,6 @@ const props = withDefaults(
850
882
  );
851
883
  const emit =
852
884
  defineEmits<BbTableEvents<Item, RowValue, SelectModelOf<RowValue, M>>>();
853
-
854
885
  const slots = defineSlots<
855
886
  BbTableSlots<Item, RowValue> &
856
887
  Partial<
@@ -872,6 +903,12 @@ const slots = defineSlots<
872
903
  Record<InferredEdgeSlots, (props: BbTableEdgeCellSlotProps<Item>) => any>
873
904
  >
874
905
  >();
906
+ const moveSvg = useInternalIcon('move', moveSvgBuiltin);
907
+ const arrowUpIcon = useInternalIcon('sortAsc', arrowUpSvg);
908
+ // No built-in descending glyph: unset, the ascending one rotates.
909
+ const sortDescIcon = useInternalIcon('sortDesc', '');
910
+ // No built-in either: the row draws its own cropped grip when unset.
911
+ const dragHandleIcon = useInternalIcon('dragHandle', '');
875
912
 
876
913
  // `defineModel` would type the prop from the model too; the prop keeps
877
914
  // `BbTableProps`' `any[]` (a model of wider values still binds) and
@@ -1439,6 +1476,7 @@ const rowReorderContext = computed<RowReorderRowContext | null>(() => {
1439
1476
  describedBy: rowReorderInstructionsId.value,
1440
1477
  nameFor: (label: string) => t('table.moveRow', label).value.trim(),
1441
1478
  onKeydown: rowReorder.onKeydown,
1479
+ icon: dragHandleIcon.value,
1442
1480
  };
1443
1481
  });
1444
1482
 
@@ -4452,12 +4490,21 @@ const {
4452
4490
  items: internalItems,
4453
4491
  loading: innerLoading,
4454
4492
  error: itemsError,
4493
+ retry,
4455
4494
  ssrMarker,
4456
4495
  } = useItemsGetter({
4457
4496
  items: toRef(props, 'items'),
4458
4497
  marker: true,
4459
4498
  });
4460
4499
 
4500
+ const resolvedFailedText = computed(
4501
+ () => props.failedText || t('common.failedText').value
4502
+ );
4503
+ /** The failure row's "Try again": the failed load again, then the prune on rows it applied. */
4504
+ const retryLoad = async () => {
4505
+ if ((await retry()) === 'applied') pruneIncoherent();
4506
+ };
4507
+
4461
4508
  const { hasPrefilled, whenPrefilled } = usePrefill({
4462
4509
  alreadyLoaded: hydratedFromSsr,
4463
4510
  clientReproducible,
@@ -5390,11 +5437,11 @@ const mappedHeaders = computed(() =>
5390
5437
  * `<key>:header:prepend/append` slot wins over the table-wide
5391
5438
  * `header:prepend/append` one — they never stack (BbDropdown's item rule).
5392
5439
  */
5393
- const headerAffixName = (key: string, suffix: HeaderAffixSuffix) => {
5394
- const own = `${slotNamesByKey.value[key]}:header:${suffix}`;
5395
- if (slots[own]) return own;
5396
- return slots[`header:${suffix}`] ? `header:${suffix}` : undefined;
5397
- };
5440
+ /** A header affix's slots present, strongest first: the column's, then the table-wide one. */
5441
+ const headerAffixNames = (key: string, suffix: HeaderAffixSuffix) =>
5442
+ [`${slotNamesByKey.value[key]}:header:${suffix}`, `header:${suffix}`].filter(
5443
+ (name) => slots[name]
5444
+ );
5398
5445
 
5399
5446
  /**
5400
5447
  * Renders a header affix slot. One component type for the table's life, so
@@ -5405,10 +5452,18 @@ const headerAffixName = (key: string, suffix: HeaderAffixSuffix) => {
5405
5452
  * compiler adds `key` and `ref_for` to a spread outlet's scope.
5406
5453
  */
5407
5454
  const HeaderAffix: FunctionalComponent<{
5408
- name: string;
5455
+ names: string[];
5409
5456
  scope: BbTableHeaderAffixSlotProps<Item>;
5410
- }> = (affix) => slots[affix.name]?.(affix.scope);
5411
- HeaderAffix.props = ['name', 'scope'];
5457
+ }> = (affix) => {
5458
+ // The first that renders something: a column's affix that renders nothing
5459
+ // for it falls back to the table-wide one (the empty-slot rule).
5460
+ for (const name of affix.names) {
5461
+ const nodes = slotContent(slots[name], affix.scope);
5462
+ if (nodes) return nodes;
5463
+ }
5464
+ return null;
5465
+ };
5466
+ HeaderAffix.props = ['names', 'scope'];
5412
5467
 
5413
5468
  /**
5414
5469
  * Affix slots receive the `<key>:header` payload plus the column key so a
@@ -8825,7 +8880,7 @@ export type BbTableProps<Item = any> = BbTablePtProps & {
8825
8880
  * Rows to render: an array, or a provider called with a
8826
8881
  * `BbTableItemsContext` (`reason`, `modelValue`, `signal`), sync or async.
8827
8882
  * A provider fails by THROWING, never by returning `[]`: the rows clear and
8828
- * `#empty` gets the `error`. Return the page as it is.
8883
+ * the failure row shows `failed-text` with "Try again". Return the page as it is.
8829
8884
  *
8830
8885
  * @defaultValue `[]`
8831
8886
  */
@@ -9288,8 +9343,8 @@ type BbTableColumnSlots<Item, V> = Record<
9288
9343
  /**
9289
9344
  * @dynamicSlot `<key>` - One column's body cell in every row, by the column `key` through `slotKey`. Scope: `{ item, value, content, selected, expanded, highlighted, classes, sortOrder, toggleSelected, toggleExpanded, toggleHighlighted, expandProps }`; `content` is this cell, `value` the row's `item-value`.
9290
9345
  * @dynamicSlot `<key>:header` - One column's header content, replacing its label and the built-in sort button. Scope: `{ label, items, sortable, sortOrder, toggleSort, hideColumn, classes }`.
9291
- * @dynamicSlot `<key>:header:prepend` {BbTableHeaderAffixSlotProps<Item>} - Content before one column's header, keeping the sort button; beats `header:prepend` (they never stack).
9292
- * @dynamicSlot `<key>:header:append` {BbTableHeaderAffixSlotProps<Item>} - Content after one column's header, keeping the sort button; beats `header:append` (they never stack).
9346
+ * @dynamicSlot `<key>:header:prepend` {BbTableHeaderAffixSlotProps<Item>} - Content before one column's header, keeping the sort button; beats `header:prepend` (they never stack) unless it renders nothing.
9347
+ * @dynamicSlot `<key>:header:append` {BbTableHeaderAffixSlotProps<Item>} - Content after one column's header, keeping the sort button; beats `header:append` (they never stack) unless it renders nothing.
9293
9348
  * @dynamicSlot `<key>:first` {BbTableEdgeCellSlotProps<Item>} - One column's cell in a row before the data rows; any such slot creates the row, aligned with the columns. Only over rows.
9294
9349
  * @dynamicSlot `<key>:last` {BbTableEdgeCellSlotProps<Item>} - One column's cell in a row after the data rows (a totals row); any such slot creates that row, aligned like `<key>:first`.
9295
9350
  */
@@ -9355,14 +9410,16 @@ export type BbTableSlots<Item = any, V = any> = BbTableColumnSlots<Item, V> & {
9355
9410
  /**
9356
9411
  * Content before every data column's header content (the label + sort
9357
9412
  * control, or its own `<key>:header` replacement). A column's
9358
- * `<key>:header:prepend` wins over this for that column; they never stack.
9413
+ * `<key>:header:prepend` wins over this for that column; they never stack,
9414
+ * unless it renders nothing there.
9359
9415
  * Branch on `columnKey` for per-column output.
9360
9416
  */
9361
9417
  'header:prepend'?: (props: BbTableHeaderAffixSlotProps<Item>) => any;
9362
9418
  /**
9363
9419
  * Content after every data column's header content (the label + sort
9364
9420
  * control, or its own `<key>:header` replacement). A column's
9365
- * `<key>:header:append` wins over this for that column; they never stack.
9421
+ * `<key>:header:append` wins over this for that column; they never stack,
9422
+ * unless it renders nothing there.
9366
9423
  * Branch on `columnKey` for per-column output.
9367
9424
  */
9368
9425
  'header:append'?: (props: BbTableHeaderAffixSlotProps<Item>) => any;
@@ -9373,10 +9430,11 @@ export type BbTableSlots<Item = any, V = any> = BbTableColumnSlots<Item, V> & {
9373
9430
  loading?: (props: { items: Item[] }) => any;
9374
9431
  /**
9375
9432
  * Content shown when there are no rows and nothing is loading, inside the
9376
- * table's own full-width cell: pass content, never a row. `error` is what
9377
- * the latest failed load threw (`null` when none).
9433
+ * table's own full-width cell: pass content, never a row. Empty only: a
9434
+ * failed load shows the table's failure row instead (its message is
9435
+ * `failed-text`, and it ends with "Try again").
9378
9436
  */
9379
- empty?: (props: { error: unknown }) => any;
9437
+ empty?: (props: object) => any;
9380
9438
  /**
9381
9439
  * Content of each row's actions cell; this slot CREATES the actions column
9382
9440
  * (there is no prop). The header cell (labelled by `actions-text`, replaceable through
@@ -10199,7 +10257,7 @@ export type BbTableSlots<Item = any, V = any> = BbTableColumnSlots<Item, V> & {
10199
10257
  opacity: 1;
10200
10258
  }
10201
10259
 
10202
- &--desc .bb-table__sort-icon {
10260
+ &--desc .bb-table__sort-icon:not(.bb-table__sort-icon--own-desc) {
10203
10261
  transform: rotate(180deg);
10204
10262
  }
10205
10263
  }
@@ -10465,6 +10523,27 @@ export type BbTableSlots<Item = any, V = any> = BbTableColumnSlots<Item, V> & {
10465
10523
  pointer-events: none;
10466
10524
  }
10467
10525
 
10526
+ /* An app's `dragHandle` glyph: the built-in grip's box, never wider. A
10527
+ 24-grid grip (lucide / tabler `grip-vertical`) at 15/14em (set on the
10528
+ icon) draws its
10529
+ dots ~2.5px across like ours; its side bearings overflow, unpainted. */
10530
+ &__row-handle-icon--own {
10531
+ display: block;
10532
+ height: 1em;
10533
+ position: relative;
10534
+ width: 0.56em;
10535
+
10536
+ /* Centred on the box, overflowing it evenly (grid centring would keep
10537
+ an oversized item at the start). */
10538
+ > svg {
10539
+ /* stylelint-disable-next-line property-disallowed-list -- geometry: centring with a physical translate, the same in both directions */
10540
+ left: 50%;
10541
+ position: absolute;
10542
+ top: 50%;
10543
+ translate: -50% -50%;
10544
+ }
10545
+ }
10546
+
10468
10547
  &--row-dragging {
10469
10548
  -webkit-user-select: none;
10470
10549
  user-select: none;
@@ -147,6 +147,7 @@ import {
147
147
  } from 'vue';
148
148
  import { useId } from '@/composables/useId';
149
149
  import { useOwnModel } from '@/composables/useOwnModel';
150
+ import { useOpenModel } from '@/composables/useOpenModel';
150
151
  import { createReusableTemplate } from '@vueuse/core';
151
152
  import {
152
153
  extractDomContainer,
@@ -379,6 +380,17 @@ const onActivatorClick = (event: MouseEvent) => {
379
380
  isOpen.value = !isOpen.value;
380
381
  };
381
382
 
383
+ // `v-model:open`: the activator's own open, the same close.
384
+ useOpenModel(props, emit, {
385
+ isOpen: () => isOpen.value,
386
+ open: () => {
387
+ if (props.disabled || props.readonly) return;
388
+ surface.value = resolveSurface();
389
+ isOpen.value = true;
390
+ },
391
+ close: () => (isOpen.value = false),
392
+ });
393
+
382
394
  /**
383
395
  * a click outside the panel closes it. The panel is a modal
384
396
  * `<dialog>` whose transparent backdrop the browser does not hit-test, so the
@@ -769,6 +781,11 @@ type BbTimePickerPtProps = /* @vue-ignore */ PtCompoundProps<
769
781
  // does not substitute a generic alias's type parameters — PASSTHROUGH.md T20).
770
782
 
771
783
  export type BbTimePickerBaseProps = BbTimePickerPtProps & {
784
+ /**
785
+ * Whether the panel is open (`v-model:open`; `v-model` stays the value).
786
+ * Bound, the app opens and closes it; unbound, the initial state.
787
+ */
788
+ open?: boolean;
772
789
  /**
773
790
  * Passthrough, object form: the same keys as the `pt:*` attributes
774
791
  * without the prefix. See the `pt:<part>` row.
@@ -891,6 +908,8 @@ export type BbTimePickerEvents<R extends boolean = boolean> = {
891
908
  (e: 'shown'): void;
892
909
  /** Emitted as soon as the time panel starts to close. */
893
910
  (e: 'hide'): void;
911
+ /** The panel opened or closed (`v-model:open`). */
912
+ (e: 'update:open', value: boolean): void;
894
913
  /** Emitted once the time panel has finished closing. */
895
914
  (e: 'hidden'): void;
896
915
  /** Emitted when the selected time changes (single/range/null). */
@@ -323,6 +323,7 @@ import { useConfigDefaults } from '@/composables/useConfigDefaults';
323
323
  import { useFormBinding } from '@/composables/useFormBinding';
324
324
  import { useClosingInert } from '@/composables/useClosingInert';
325
325
  import { useLocale } from '@/composables/useLocale';
326
+ import { useOpenModel } from '@/composables/useOpenModel';
326
327
  import { useLogger } from '@/composables/useLogger';
327
328
  import { useEscapeStackEntry } from '@/composables/useEscapeStackEntry';
328
329
  import { useMobile } from '@/composables/useMobile';
@@ -342,7 +343,7 @@ import {
342
343
  import { isEmpty } from '@/utilities/functions/empty';
343
344
  import { isNotEmpty } from '@/utilities/functions/isNotEmpty';
344
345
  import { transitions } from '@/utilities/misc/transitions';
345
- import clockIcon from '@/assets/svgs/clock.svg?raw';
346
+ import clockIconBuiltin from '@/assets/svgs/clock.svg?raw';
346
347
  import BbIcon from '../BbIcon/BbIcon.vue';
347
348
  import BbOffCanvas from '../BbOffCanvas/BbOffCanvas.vue';
348
349
  import { BB_OFF_CANVAS_PT } from '../BbOffCanvas/types';
@@ -364,12 +365,13 @@ import {
364
365
  type BbTimePickerInputSlots,
365
366
  type TimePickerInputError,
366
367
  } from './types';
367
-
368
+ import { useInternalIcon } from '@/composables/useInternalIcon';
368
369
  defineOptions({
369
370
  // An app's own variants as declared `pt:<part>:<name>` props.
370
371
  mixins: [variantPt(BB_TIME_PICKER_INPUT_PT)],
371
372
  inheritAttrs: false,
372
373
  });
374
+
373
375
  const declaredProps = withDefaults(
374
376
  defineProps<
375
377
  BbTimePickerInputBaseProps &
@@ -401,6 +403,9 @@ const declaredProps = withDefaults(
401
403
  const declaredEmit = defineEmits<BbTimePickerInputEvents<R>>();
402
404
 
403
405
  defineSlots<BbTimePickerInputSlots>();
406
+
407
+ const clockIcon = useInternalIcon('clock', clockIconBuiltin);
408
+
404
409
  // `R` types the v-model for the caller; inside, the value is either shape.
405
410
  const anyRangeProps = declaredProps as unknown as ShapeErasedProps<
406
411
  BbTimePickerInputProps,
@@ -1125,6 +1130,13 @@ const open = () => {
1125
1130
  shown.value = true;
1126
1131
  };
1127
1132
 
1133
+ // `v-model:open`: the activator's own open, the same close.
1134
+ useOpenModel(props, emit, {
1135
+ isOpen: () => shown.value,
1136
+ open,
1137
+ close: () => (shown.value = false),
1138
+ });
1139
+
1128
1140
  /*
1129
1141
  * when writing is off for this device, the field
1130
1142
  * is a button for the picker — a tap or click anywhere on the box opens it,
@@ -1475,6 +1487,11 @@ type BbTimePickerInputPtProps = /* @vue-ignore */ PtCompoundProps<
1475
1487
  // does not substitute a generic alias's type parameters — PASSTHROUGH.md T20).
1476
1488
 
1477
1489
  export type BbTimePickerInputBaseProps = BbTimePickerInputPtProps & {
1490
+ /**
1491
+ * Whether the panel is open (`v-model:open`; `v-model` stays the value).
1492
+ * Bound, the app opens and closes it; unbound, the initial state.
1493
+ */
1494
+ open?: boolean;
1478
1495
  /**
1479
1496
  * Passthrough, object form: the same keys as the `pt:*` attributes
1480
1497
  * without the prefix. See the `pt:<part>` row.
@@ -1727,6 +1744,8 @@ export type BbTimePickerInputEvents<R extends boolean = boolean> = {
1727
1744
  (e: 'shown'): void;
1728
1745
  /** Emitted as soon as the time panel starts to close. */
1729
1746
  (e: 'hide'): void;
1747
+ /** The panel opened or closed (`v-model:open`). */
1748
+ (e: 'update:open', value: boolean): void;
1730
1749
  /** Emitted once the time panel has finished closing. */
1731
1750
  (e: 'hidden'): void;
1732
1751
  /** Emitted when the composite control receives focus. */
@@ -264,8 +264,8 @@ type BbToastShared = {
264
264
  data?: Record<string, any>;
265
265
  /**
266
266
  * Action buttons rendered in a row below the text. While a button's
267
- * `onClick` runs it shows a spinner, sibling buttons are disabled, and the
268
- * auto-dismiss timer is held; the toast dismisses (reason `'action'`) when
267
+ * `onClick` runs it shows a spinner, sibling buttons ignore clicks (keeping
268
+ * their look), and the auto-dismiss timer is held; the toast dismisses (reason `'action'`) when
269
269
  * the callback resolves. A rejected callback keeps the toast open.
270
270
  * Not rendered for portal toasts — portal content owns the whole body.
271
271
  */
@@ -128,8 +128,8 @@ type BbToastShared = {
128
128
  data?: Record<string, any>;
129
129
  /**
130
130
  * Action buttons rendered in a row below the text. While a button's
131
- * `onClick` runs it shows a spinner, sibling buttons are disabled, and the
132
- * auto-dismiss timer is held; the toast dismisses (reason `'action'`) when
131
+ * `onClick` runs it shows a spinner, sibling buttons ignore clicks (keeping
132
+ * their look), and the auto-dismiss timer is held; the toast dismisses (reason `'action'`) when
133
133
  * the callback resolves. A rejected callback keeps the toast open.
134
134
  * Not rendered for portal toasts — portal content owns the whole body.
135
135
  */
@@ -379,7 +379,7 @@ export type BbTreeNodeSlotProps<Meta> = {
379
379
  /**
380
380
  * @dynamicSlot `<value>` {BbTreeNodeSlotProps<Meta>} - One node, by its resolved `item-value` (string or number) through `slotKey`; beats `<depth>`, which beats `default`.
381
381
  * @dynamicSlot `<depth>` {BbTreeNodeSlotProps<Meta>} - Every node at one depth (`0` = root); a numeric value can share this name.
382
- * @dynamicSlot `<value>:children` {BbTreeNodeSlotProps<Meta>} - One node's children container, stopping the recursion there; beats `<depth>:children`. Renders for leaves too.
382
+ * @dynamicSlot `<value>:children` {BbTreeNodeSlotProps<Meta>} - One node's children container, stopping the recursion there; beats `<depth>:children`. Renders for leaves too; empty, the default children.
383
383
  * @dynamicSlot `<depth>:children` {BbTreeNodeSlotProps<Meta>} - The children container of every node at one depth.
384
384
  */
385
385
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- untyped slot scopes read freely
@@ -21,14 +21,16 @@
21
21
  import type { FallthroughAttrs } from '@/types/fallthrough';
22
22
  import { useLocale } from '@/composables/useLocale';
23
23
  import BbIcon from '../BbIcon/BbIcon.vue';
24
- import clearIcon from '@/assets/svgs/clear.svg?raw';
24
+ import clearIconBuiltin from '@/assets/svgs/clear.svg?raw';
25
25
  import type { ClearableButtonProps } from './types';
26
-
26
+ import { useInternalIcon } from '@/composables/useInternalIcon';
27
27
  const props = defineProps<
28
28
  ClearableButtonProps &
29
29
  /* @vue-ignore */ FallthroughAttrs<'button', ClearableButtonProps>
30
30
  >();
31
31
 
32
+ const clearIcon = useInternalIcon('clear', clearIconBuiltin);
33
+
32
34
  const { t } = useLocale();
33
35
  </script>
34
36
 
@@ -195,7 +195,24 @@ const middleware = computed(() => {
195
195
  // included. Its boundary stays the viewport (see `boundary`).
196
196
  offset(props.offset),
197
197
  ...(props.disableFlip ? [] : [flipMiddleware({ padding: props.padding })]),
198
- shift({ padding: props.padding, ...(boundary ? { boundary } : {}) }),
198
+ shift(
199
+ boundary || !props.boundaryX
200
+ ? { padding: props.padding, ...(boundary ? { boundary } : {}) }
201
+ : () => {
202
+ // `boundaryX`'s edges across, the viewport's up and down: a side
203
+ // placement's vertical shift never reads the element.
204
+ const { left, width } = props.boundaryX!.getBoundingClientRect();
205
+ return {
206
+ padding: props.padding,
207
+ boundary: {
208
+ x: left,
209
+ y: 0,
210
+ width,
211
+ height: document.documentElement.clientHeight,
212
+ },
213
+ };
214
+ }
215
+ ),
199
216
  sizeMiddleware({
200
217
  padding: props.padding,
201
218
  ...(overflowBoundary ? { boundary: overflowBoundary } : {}),
@@ -704,6 +721,12 @@ export type CommonPopoverProps = {
704
721
  * CSS selector.
705
722
  */
706
723
  overflowBoundary?: ElementOrComponentRefOrSelector;
724
+ /**
725
+ * Internal: keeps the popover inside this element's left and right edges
726
+ * only; its top and bottom stay the viewport's. Ignored when `boundary` is
727
+ * set. A dropdown inside a table passes the table.
728
+ */
729
+ boundaryX?: Element;
707
730
  /**
708
731
  * Renders the popover as a `<dialog>` element (modal overlay) instead of a `<span>` with the Popover API.
709
732
  */
@@ -14,12 +14,13 @@
14
14
  <script setup lang="ts">
15
15
  import BbIcon from '../BbIcon/BbIcon.vue';
16
16
  import type { FallthroughAttrs } from '@/types/fallthrough';
17
- import errorIcon from '@/assets/svgs/error.svg?raw';
17
+ import errorIconBuiltin from '@/assets/svgs/error.svg?raw';
18
18
  import type { ErrorIconProps, ErrorIconEvents, ErrorIconSlots } from './types';
19
- export type { ErrorIconProps, ErrorIconEvents, ErrorIconSlots };
20
-
19
+ import { useInternalIcon } from '@/composables/useInternalIcon';
21
20
  // Type only (`Record<never, never>` has no runtime props to resolve).
22
21
  defineProps</* @vue-ignore */ FallthroughAttrs<'svg', ErrorIconProps>>();
22
+ const errorIcon = useInternalIcon('error', errorIconBuiltin);
23
+ export type { ErrorIconProps, ErrorIconEvents, ErrorIconSlots };
23
24
  </script>
24
25
 
25
26
  <style lang="postcss">
@@ -135,7 +135,17 @@
135
135
  )
136
136
  "
137
137
  />
138
+ <span
139
+ v-if="optionsMeta[row.index].create"
140
+ class="bb-listbox__item-text bb-listbox__create"
141
+ >{{ optionsMeta[row.index].create!.before
142
+ }}<strong class="bb-listbox__create-query">{{
143
+ optionsMeta[row.index].create!.query
144
+ }}</strong
145
+ >{{ optionsMeta[row.index].create!.after }}</span
146
+ >
138
147
  <slot
148
+ v-else
139
149
  :description="optionsMeta[row.index].description"
140
150
  :disabled="optionsMeta[row.index].disabled"
141
151
  :focused="focusedIndex === row.index"
@@ -226,6 +236,9 @@
226
236
  <BbIcon
227
237
  aria-hidden="true"
228
238
  class="bb-listbox__option-check"
239
+ :class="{
240
+ 'bb-listbox__option-check--own': checkIcon !== checkIconBuiltin,
241
+ }"
229
242
  :icon="checkIcon"
230
243
  v-bind="
231
244
  passthrough?.part?.(
@@ -255,20 +268,28 @@
255
268
  under whatever is still listed (a `stash` keeps the picks' rows), in the
256
269
  destructive alert's voice. It sits OUTSIDE the scroll area and the
257
270
  listbox: a reader meets it as a status, never as an option, and the
258
- combobox is described by it while it lasts. The divider is its own only
271
+ combobox is described by its message while it lasts. It ends with "Try
272
+ again", which the host runs; `#empty`
273
+ never replaces it (empty means empty). The divider is its own only
259
274
  when rows sit above it; with nothing listed the search field's is the
260
275
  one divider. -->
261
276
  <span
262
- v-if="failedText"
263
- :id="`${id}_failed`"
277
+ v-if="failedText && !loading"
264
278
  class="bb-listbox__failed"
265
279
  :class="{ 'bb-listbox__failed--divided': hasOptions }"
266
280
  role="status"
267
281
  >
268
282
  <ErrorIcon class="bb-listbox__failed-icon" />
269
- <span class="bb-listbox__failed-text"
270
- ><slot name="empty">{{ failedText }}</slot></span
283
+ <span :id="`${id}_failed`" class="bb-listbox__failed-text">{{
284
+ failedText
285
+ }}</span>
286
+ <button
287
+ class="bb-load-retry"
288
+ type="button"
289
+ @click="emit('retry', $event)"
271
290
  >
291
+ {{ t('common.retryLabel').value }}
292
+ </button>
272
293
  </span>
273
294
  </span>
274
295
  </template>
@@ -295,9 +316,9 @@ import {
295
316
  } from '@/utilities/misc/listboxMetrics';
296
317
  import BbIcon from '../BbIcon/BbIcon.vue';
297
318
  import ErrorIcon from '../ErrorIcon/ErrorIcon.vue';
298
- import checkIcon from '@/assets/svgs/check_stroke.svg?raw';
319
+ import checkIconBuiltin from '@/assets/svgs/check_stroke.svg?raw';
299
320
  import { transitions } from '@/utilities/misc/transitions';
300
-
321
+ import { useInternalIcon } from '@/composables/useInternalIcon';
301
322
  const props = withDefaults(defineProps<FlatListBoxProps<Item>>(), {
302
323
  transitionDuration: transitions.medium,
303
324
  });
@@ -306,6 +327,8 @@ const emit = defineEmits<FlatListBoxEvents>();
306
327
 
307
328
  const slots = defineSlots<FlatListBoxSlots<Item>>();
308
329
 
330
+ const checkIcon = useInternalIcon('check', checkIconBuiltin);
331
+
309
332
  const { t } = useLocale();
310
333
 
311
334
  const innerRef = useTemplateRef('inner');
@@ -352,6 +375,7 @@ const optionsMeta = computed(() =>
352
375
  item: o.item,
353
376
  selected: !!o.selected,
354
377
  disabled: !!o.disabled,
378
+ create: o.create,
355
379
  }))
356
380
  );
357
381
  // Instance-scoped: listboxes stay mounted for the life of the page, so two
@@ -634,6 +658,8 @@ export type FlatListBoxProps<Item> = {
634
658
  };
635
659
 
636
660
  export type FlatListBoxEvents = {
661
+ /** The failure footer's "Try again" was pressed: the host runs the failed load again. */
662
+ (e: 'retry', event: MouseEvent): void;
637
663
  /**
638
664
  * Emitted when an option is selected by the user.
639
665
  * @param option - The selected option.