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

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 (345) hide show
  1. package/README.md +4 -2
  2. package/bin/bitboss-ui-mcp.mjs +101 -3
  3. package/bin/bitboss-ui.mjs +6 -1
  4. package/bin/cli.mjs +31 -5
  5. package/dist/ai/BbAvatar.md +86 -58
  6. package/dist/ai/BbBadge.md +5 -5
  7. package/dist/ai/BbBreadcrumbs.md +2 -2
  8. package/dist/ai/BbButton.md +2 -2
  9. package/dist/ai/BbCalendar.md +9 -5
  10. package/dist/ai/BbCheckboxGroup.md +5 -4
  11. package/dist/ai/BbColorInput.md +12 -0
  12. package/dist/ai/BbColorPalette.md +19 -15
  13. package/dist/ai/BbConfirmPortal.md +1 -1
  14. package/dist/ai/BbDatePicker.md +16 -3
  15. package/dist/ai/BbDatePickerInput.md +17 -1
  16. package/dist/ai/BbDialog.md +16 -4
  17. package/dist/ai/BbDropdown.md +175 -67
  18. package/dist/ai/BbDropdownButton.md +27 -8
  19. package/dist/ai/BbForm.md +4 -1
  20. package/dist/ai/BbHoverCardPortal.md +1 -1
  21. package/dist/ai/BbNumberInput.md +8 -4
  22. package/dist/ai/BbPopoverPortal.md +1 -1
  23. package/dist/ai/BbRadioGroup.md +4 -4
  24. package/dist/ai/BbSelect.md +79 -67
  25. package/dist/ai/BbSelectPopover.md +24 -5
  26. package/dist/ai/BbSwitchGroup.md +5 -4
  27. package/dist/ai/BbTable.md +59 -34
  28. package/dist/ai/BbTimePicker.md +16 -3
  29. package/dist/ai/BbTimePickerInput.md +15 -1
  30. package/dist/ai/BbToast.md +3 -2
  31. package/dist/ai/BbToastPortal.md +1 -1
  32. package/dist/ai/BbTree.md +5 -1
  33. package/dist/ai/CommonPopover.md +1 -0
  34. package/dist/ai/FlatListBox.md +1 -0
  35. package/dist/ai/GroupedListBox.md +1 -0
  36. package/dist/ai/ListBox.md +1 -0
  37. package/dist/ai/OptionsContainer.md +4 -4
  38. package/dist/ai/changelog.json +215 -6
  39. package/dist/ai/components.json +77 -43
  40. package/dist/ai/composables/useToast.md +2 -2
  41. package/dist/ai/design-tokens.json +60 -0
  42. package/dist/ai/guides/agent-contract.md +8 -4
  43. package/dist/ai/guides/design-tokens.md +33 -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/inertia-helpers.md +613 -53
  47. package/dist/ai/guides/migration/adoption-checklist.md +5 -5
  48. package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
  49. package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
  50. package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
  51. package/dist/ai/guides/migration/components/bb-table.md +2 -1
  52. package/dist/ai/guides/migration/components/bb-toast.md +2 -2
  53. package/dist/ai/guides/migration/v2-to-v3.md +46 -5
  54. package/dist/ai/guides/migration/v3-beta-tooling.md +4 -0
  55. package/dist/ai/guides/passthrough.md +3 -3
  56. package/dist/ai/guides/preset-components.md +15 -2
  57. package/dist/ai/guides/reporting.md +49 -0
  58. package/dist/ai/helpers/inertia/manifest.json +33 -38
  59. package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
  60. package/dist/ai/helpers/inertia/useQuery.ts +24 -6
  61. package/dist/ai/helpers/inertia/utils.ts +552 -3
  62. package/dist/ai/index.md +2 -1
  63. package/dist/ai/manifest/common.json +1 -0
  64. package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
  65. package/dist/ai/manifest/components/BbAvatar.json +5 -2
  66. package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
  67. package/dist/ai/manifest/components/BbCalendar.json +2 -2
  68. package/dist/ai/manifest/components/BbCarousel.json +0 -3
  69. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  70. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
  71. package/dist/ai/manifest/components/BbColorInput.json +5 -2
  72. package/dist/ai/manifest/components/BbColorPalette.json +7 -4
  73. package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
  74. package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
  75. package/dist/ai/manifest/components/BbDatePicker.json +6 -3
  76. package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
  77. package/dist/ai/manifest/components/BbDialog.tree.json +7 -1
  78. package/dist/ai/manifest/components/BbDropdown.json +23 -17
  79. package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
  80. package/dist/ai/manifest/components/BbDropdown.tree.json +16 -5
  81. package/dist/ai/manifest/components/BbDropdownButton.json +15 -9
  82. package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
  83. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
  84. package/dist/ai/manifest/components/BbForm.json +1 -1
  85. package/dist/ai/manifest/components/BbHoverCard.json +1 -1
  86. package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
  87. package/dist/ai/manifest/components/BbNumberInput.json +1 -1
  88. package/dist/ai/manifest/components/BbOffCanvas.tree.json +2 -0
  89. package/dist/ai/manifest/components/BbPopover.json +1 -1
  90. package/dist/ai/manifest/components/BbPopoverPortal.json +1 -1
  91. package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
  92. package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
  93. package/dist/ai/manifest/components/BbSelect.json +10 -7
  94. package/dist/ai/manifest/components/BbSelectPopover.json +7 -4
  95. package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -1
  96. package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
  97. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
  98. package/dist/ai/manifest/components/BbTable.json +6 -6
  99. package/dist/ai/manifest/components/BbTable.tree.json +16 -6
  100. package/dist/ai/manifest/components/BbTimePicker.json +7 -4
  101. package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
  102. package/dist/ai/manifest/components/BbToastPortal.json +1 -1
  103. package/dist/ai/manifest/components/BbTree.json +1 -1
  104. package/dist/ai/manifest/components/CommonPopover.json +2 -1
  105. package/dist/ai/manifest/components/FlatListBox.json +2 -1
  106. package/dist/ai/manifest/components/GroupedListBox.json +2 -1
  107. package/dist/ai/manifest/components/ListBox.json +2 -1
  108. package/dist/ai/manifest/components/OptionsContainer.json +6 -4
  109. package/dist/ai/manifest/index.json +2 -2
  110. package/dist/ai/manifest/meta.json +36 -3
  111. package/dist/ai/manifest/types.advanced.json +81 -80
  112. package/dist/ai/manifest/types.api.json +64 -65
  113. package/dist/ai/manifest/types.wrapper.json +155 -118
  114. package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
  115. package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
  116. package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
  117. package/dist/ai/source/BbAlert.md +16 -4
  118. package/dist/ai/source/BbAvatar.md +121 -9
  119. package/dist/ai/source/BbBadge.md +12 -5
  120. package/dist/ai/source/BbBreadcrumbs.md +56 -55
  121. package/dist/ai/source/BbButton.md +41 -25
  122. package/dist/ai/source/BbCalendar.md +22 -12
  123. package/dist/ai/source/BbCarousel.md +31 -28
  124. package/dist/ai/source/BbCheckboxGroup.md +15 -9
  125. package/dist/ai/source/BbColorInput.md +19 -0
  126. package/dist/ai/source/BbColorPalette.md +59 -12
  127. package/dist/ai/source/BbConfirm.md +7 -0
  128. package/dist/ai/source/BbConfirmPortal.md +9 -4
  129. package/dist/ai/source/BbDatePicker.md +71 -22
  130. package/dist/ai/source/BbDatePickerInput.md +72 -9
  131. package/dist/ai/source/BbDialog.md +45 -2
  132. package/dist/ai/source/BbDropdown.md +263 -63
  133. package/dist/ai/source/BbDropdownButton.md +27 -2
  134. package/dist/ai/source/BbDropdownGroup.md +121 -59
  135. package/dist/ai/source/BbForm.md +73 -6
  136. package/dist/ai/source/BbGallery.md +76 -55
  137. package/dist/ai/source/BbHost.md +12 -0
  138. package/dist/ai/source/BbHoverCard.md +7 -0
  139. package/dist/ai/source/BbHoverCardPortal.md +9 -5
  140. package/dist/ai/source/BbNumberInput.md +22 -16
  141. package/dist/ai/source/BbOffCanvas.md +48 -2
  142. package/dist/ai/source/BbPopover.md +7 -0
  143. package/dist/ai/source/BbPopoverPortal.md +9 -5
  144. package/dist/ai/source/BbRadio.md +4 -3
  145. package/dist/ai/source/BbRadioGroup.md +19 -10
  146. package/dist/ai/source/BbSelect.md +35 -20
  147. package/dist/ai/source/BbSelectPopover.md +116 -8
  148. package/dist/ai/source/BbSwitchGroup.md +11 -4
  149. package/dist/ai/source/BbTable.md +126 -32
  150. package/dist/ai/source/BbTag.md +10 -3
  151. package/dist/ai/source/BbTimePicker.md +69 -15
  152. package/dist/ai/source/BbTimePickerInput.md +45 -7
  153. package/dist/ai/source/BbToast.md +16 -2
  154. package/dist/ai/source/BbToastPortal.md +18 -6
  155. package/dist/ai/source/BbTree.md +1 -1
  156. package/dist/ai/source/CommonFieldInput.md +11 -5
  157. package/dist/ai/source/CommonPopover.md +28 -2
  158. package/dist/ai/source/FlatListBox.md +26 -5
  159. package/dist/ai/source/GroupedListBox.md +63 -11
  160. package/dist/ai/source/ListBox.md +4 -0
  161. package/dist/ai/source/OptionsContainer.md +29 -11
  162. package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
  163. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
  164. package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +61 -43
  165. package/dist/components/BbAvatar/avatarIdentity.js +25 -0
  166. package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
  167. package/dist/components/BbAvatar/types.d.ts +24 -5
  168. package/dist/components/BbAvatar/types.js +5 -1
  169. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
  170. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +80 -79
  171. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +152 -158
  172. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
  173. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
  174. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +235 -234
  175. package/dist/components/BbCalendar/types.d.ts +2 -2
  176. package/dist/components/BbCalendar/useDayGrid.js +120 -123
  177. package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
  178. package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +7 -7
  179. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
  180. package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
  181. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
  182. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
  183. package/dist/components/BbColorInput/types.d.ts +7 -0
  184. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
  185. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +239 -223
  186. package/dist/components/BbColorPalette/types.d.ts +8 -1
  187. package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
  188. package/dist/components/BbConfirm/types.d.ts +5 -0
  189. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +4 -2
  190. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +160 -143
  191. package/dist/components/BbDatePicker/types.d.ts +9 -2
  192. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
  193. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +483 -496
  194. package/dist/components/BbDatePickerInput/types.d.ts +7 -0
  195. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +252 -236
  196. package/dist/components/BbDialog/leaveGhost.js +38 -0
  197. package/dist/components/BbDialog/overlayActions.js +34 -20
  198. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +92 -87
  199. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
  200. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +419 -368
  201. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +384 -340
  202. package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
  203. package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
  204. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +133 -119
  205. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +73 -45
  206. package/dist/components/BbDropdown/normalizeGroups.js +6 -2
  207. package/dist/components/BbDropdown/ptKeys.generated.d.ts +8 -0
  208. package/dist/components/BbDropdown/types.d.ts +73 -58
  209. package/dist/components/BbDropdown/types.js +1 -0
  210. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -0
  211. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -72
  212. package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +48 -0
  213. package/dist/components/BbDropdownButton/types.d.ts +13 -2
  214. package/dist/components/BbDropdownButton/types.js +2 -0
  215. package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
  216. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
  217. package/dist/components/BbForm/types.d.ts +31 -0
  218. package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +318 -296
  219. package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
  220. package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
  221. package/dist/components/BbHoverCard/types.d.ts +5 -0
  222. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +10 -6
  223. package/dist/components/BbNumberInput/numberDisplay.js +102 -106
  224. package/dist/components/BbNumberInput/types.d.ts +4 -3
  225. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +425 -409
  226. package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
  227. package/dist/components/BbPopover/types.d.ts +5 -0
  228. package/dist/components/BbRadio/types.d.ts +4 -3
  229. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -106
  230. package/dist/components/BbRadioGroup/types.d.ts +4 -7
  231. package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -1
  232. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +167 -163
  233. package/dist/components/BbSelect/types.d.ts +23 -20
  234. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +3 -1
  235. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +680 -637
  236. package/dist/components/BbSelectPopover/types.d.ts +10 -4
  237. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
  238. package/dist/components/BbSwitchGroup/types.d.ts +3 -6
  239. package/dist/components/BbTable/BbTable.vue.d.ts +1 -3
  240. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1182 -1165
  241. package/dist/components/BbTable/BbTableDataRow.js +96 -96
  242. package/dist/components/BbTable/types.d.ts +11 -10
  243. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
  244. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
  245. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +157 -140
  246. package/dist/components/BbTimePicker/types.d.ts +9 -2
  247. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +3 -1
  248. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +278 -268
  249. package/dist/components/BbTimePickerInput/types.d.ts +7 -0
  250. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +12 -12
  251. package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
  252. package/dist/components/BbToast/types.d.ts +7 -2
  253. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
  254. package/dist/components/BbTree/types.d.ts +1 -1
  255. package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
  256. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +14 -2
  257. package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
  258. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +115 -96
  259. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +194 -166
  260. package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
  261. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
  262. package/dist/composables/formSubmitLock.js +2 -1
  263. package/dist/composables/overlayRegistry.js +52 -42
  264. package/dist/composables/useActiveInactiveState.js +8 -4
  265. package/dist/composables/useBbDialog.js +5 -5
  266. package/dist/composables/useItemsGetter.js +34 -32
  267. package/dist/composables/useOpenModel.js +20 -0
  268. package/dist/composables/useOwnModel.js +16 -0
  269. package/dist/composables/useSegmentedFields.js +31 -20
  270. package/dist/deprecation/ai-deprecations.json.js +1 -1
  271. package/dist/i18n/currencyDigits.js +58 -0
  272. package/dist/i18n/locales/ar.json +2 -0
  273. package/dist/i18n/locales/cs.json +2 -0
  274. package/dist/i18n/locales/da.json +2 -0
  275. package/dist/i18n/locales/de-CH.json +2 -0
  276. package/dist/i18n/locales/de.json +2 -0
  277. package/dist/i18n/locales/el.json +2 -0
  278. package/dist/i18n/locales/en-GB.json +2 -0
  279. package/dist/i18n/locales/en.json +2 -0
  280. package/dist/i18n/locales/es-MX.json +2 -0
  281. package/dist/i18n/locales/es.json +2 -0
  282. package/dist/i18n/locales/fa.json +2 -0
  283. package/dist/i18n/locales/fi.json +2 -0
  284. package/dist/i18n/locales/fr.json +2 -0
  285. package/dist/i18n/locales/he.json +2 -0
  286. package/dist/i18n/locales/hu.json +2 -0
  287. package/dist/i18n/locales/it.json +2 -0
  288. package/dist/i18n/locales/ja.json +2 -0
  289. package/dist/i18n/locales/ko.json +2 -0
  290. package/dist/i18n/locales/nb.json +2 -0
  291. package/dist/i18n/locales/nl.json +2 -0
  292. package/dist/i18n/locales/pl.json +2 -0
  293. package/dist/i18n/locales/pt-BR.json +2 -0
  294. package/dist/i18n/locales/pt-PT.json +2 -0
  295. package/dist/i18n/locales/ro.json +2 -0
  296. package/dist/i18n/locales/ru.json +2 -0
  297. package/dist/i18n/locales/sv.json +2 -0
  298. package/dist/i18n/locales/tr.json +2 -0
  299. package/dist/i18n/locales/uk.json +2 -0
  300. package/dist/i18n/locales/zh-CN.json +2 -0
  301. package/dist/i18n/locales/zh-HK.json +2 -0
  302. package/dist/i18n/locales/zh-TW.json +2 -0
  303. package/dist/i18n/regionDates.js +250 -0
  304. package/dist/i18n/regionHints.js +30 -41
  305. package/dist/icon-scan.js +68 -61
  306. package/dist/index.d.ts +35 -31
  307. package/dist/llms-full.txt +1428 -400
  308. package/dist/llms-medium.txt +8 -4
  309. package/dist/llms.txt +4 -2
  310. package/dist/locale-blueprint.json +2 -0
  311. package/dist/styles.css +2 -2
  312. package/dist/types/ActionButton.d.ts +2 -1
  313. package/dist/types/CommonProps.d.ts +8 -0
  314. package/dist/types/Option.d.ts +10 -0
  315. package/dist/types/ptComponentMap.d.ts +3 -3
  316. package/dist/utilities/functions/hash.js +97 -64
  317. package/dist/utilities/functions/isEqual.js +33 -25
  318. package/dist/utilities/functions/slotContent.js +19 -0
  319. package/dist/utils/loadRetry.js +8 -0
  320. package/dist/utils/versionCheck.js +1 -1
  321. package/dist/vite-plugin.d.ts +2 -1
  322. package/dist/vite.js +11 -4
  323. package/llms.txt +4 -2
  324. package/package.json +3 -2
  325. package/scripts/README.md +3 -1
  326. package/scripts/lib/adoption-checklist.json +6 -5
  327. package/scripts/lib/agent-manifest.mjs +33 -6
  328. package/scripts/lib/agent-setup.mjs +90 -24
  329. package/scripts/lib/cldr-pins.ts +182 -0
  330. package/scripts/lib/engines-include.d.mts +5 -0
  331. package/scripts/lib/engines-include.mjs +40 -0
  332. package/scripts/lib/eslint-plugin.mjs +8 -2
  333. package/scripts/lib/hidden-label-placeholder.mjs +25 -5
  334. package/scripts/lib/idiom-scan.mjs +30 -3
  335. package/scripts/lib/legacy-agent-files.json +152 -0
  336. package/scripts/lib/mcp-config.mjs +74 -7
  337. package/scripts/lib/portal-names.mjs +78 -8
  338. package/scripts/lib/release-results.mjs +5 -2
  339. package/scripts/lib/report.mjs +340 -0
  340. package/scripts/lib/run-beat.mjs +14 -0
  341. package/scripts/lib/run-records.mjs +313 -0
  342. package/scripts/lib/selector-log.mjs +98 -0
  343. package/scripts/lib/ticket-beat.mjs +30 -0
  344. package/scripts/lib/validate-bb-markup.mjs +37 -2
  345. package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
@@ -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 -->
@@ -330,8 +336,8 @@
330
336
  }}</span>
331
337
  </slot>
332
338
  <HeaderAffix
333
- v-if="headerAffixName(header.key, 'append')"
334
- :name="headerAffixName(header.key, 'append')!"
339
+ v-if="headerAffixNames(header.key, 'append').length"
340
+ :names="headerAffixNames(header.key, 'append')"
335
341
  :scope="headerAffixScope(header)"
336
342
  />
337
343
  <!-- Resize handle on the trailing edge (root tables only — an
@@ -494,12 +500,30 @@
494
500
  class="bb-table-empty__cell"
495
501
  :role="cellRole"
496
502
  >
497
- <div class="bb-table-empty__content">
498
- <slot :error="itemsError" name="empty">
503
+ <!-- A failed load is the table's own row, never `#empty` (empty
504
+ means empty), and ends with "Try again".
505
+ The busy region above announces the message. -->
506
+ <div
507
+ v-if="itemsError !== null"
508
+ class="bb-table-empty__content bb-table-empty__content--failed"
509
+ >
510
+ <span class="bb-table-empty__failed"
511
+ ><span class="bb-table-empty__text">{{
512
+ resolvedFailedText
513
+ }}</span
514
+ ><button
515
+ class="bb-load-retry"
516
+ type="button"
517
+ @click="runRetry($event, retryLoad, () => tableRef)"
518
+ >
519
+ {{ t('common.retryLabel').value }}
520
+ </button></span
521
+ >
522
+ </div>
523
+ <div v-else class="bb-table-empty__content">
524
+ <slot name="empty">
499
525
  <span class="bb-table-empty__text">{{
500
- itemsError !== null
501
- ? failedText || t('common.failedText').value
502
- : emptyText || t('common.emptyText').value
526
+ emptyText || t('common.emptyText').value
503
527
  }}</span>
504
528
  </slot>
505
529
  </div>
@@ -675,6 +699,7 @@ import {
675
699
  import { clamp } from '@/utilities/functions/clamp';
676
700
  import { hash } from '@/utilities/functions/hash';
677
701
  import { isNil } from '@/utilities/functions/isNil';
702
+ import { slotContent } from '@/utilities/functions/slotContent';
678
703
  import { when } from '@/utilities/functions/when';
679
704
  import { useId } from '@/composables/useId';
680
705
  import { useItemValue } from '@/composables/useItemValue';
@@ -786,6 +811,7 @@ import {
786
811
  takeOutOfTabOrder,
787
812
  } from './gridWidgets';
788
813
  import BbBaseButton from '../BbBaseButton/BbBaseButton.vue';
814
+ import { runRetry } from '@/utils/loadRetry';
789
815
 
790
816
  /** A row's value through `item-value`: the whole row when it is unset. */
791
817
  type RowValue = TableValueOf<Item, A>;
@@ -3793,10 +3819,18 @@ const columnTracks = computed(() => {
3793
3819
  // the frozen lengths become proportional floors instead of hard sizes. A
3794
3820
  // user-resized column opts out of that share (it is an exact track, see
3795
3821
  // `isResized`); the declared-only columns keep filling around it.
3822
+ // Every width a LENGTH: a keyword track (`1fr`,
3823
+ // `minmax(…)`, `auto`) sizes itself, so a table that has one is not all
3824
+ // frozen, and its bare lengths hold as declared.
3796
3825
  const allFrozen =
3797
3826
  !isInheriting.value &&
3798
3827
  columns.length > 0 &&
3799
- columns.every((column) => column.width != null);
3828
+ columns.every(
3829
+ // The DECLARED width: a virtual table's measured one is not a
3830
+ // declaration (`isVirtualFrozen` sizes those).
3831
+ (column) =>
3832
+ column.width != null && !isTrackKeyword(toLength(column.width))
3833
+ );
3800
3834
  columns.forEach((column, index) => {
3801
3835
  const key = String(column.key);
3802
3836
  const declared = effectiveWidth(column);
@@ -4444,12 +4478,21 @@ const {
4444
4478
  items: internalItems,
4445
4479
  loading: innerLoading,
4446
4480
  error: itemsError,
4481
+ retry,
4447
4482
  ssrMarker,
4448
4483
  } = useItemsGetter({
4449
4484
  items: toRef(props, 'items'),
4450
4485
  marker: true,
4451
4486
  });
4452
4487
 
4488
+ const resolvedFailedText = computed(
4489
+ () => props.failedText || t('common.failedText').value
4490
+ );
4491
+ /** The failure row's "Try again": the failed load again, then the prune on rows it applied. */
4492
+ const retryLoad = async () => {
4493
+ if ((await retry()) === 'applied') pruneIncoherent();
4494
+ };
4495
+
4453
4496
  const { hasPrefilled, whenPrefilled } = usePrefill({
4454
4497
  alreadyLoaded: hydratedFromSsr,
4455
4498
  clientReproducible,
@@ -5382,11 +5425,11 @@ const mappedHeaders = computed(() =>
5382
5425
  * `<key>:header:prepend/append` slot wins over the table-wide
5383
5426
  * `header:prepend/append` one — they never stack (BbDropdown's item rule).
5384
5427
  */
5385
- const headerAffixName = (key: string, suffix: HeaderAffixSuffix) => {
5386
- const own = `${slotNamesByKey.value[key]}:header:${suffix}`;
5387
- if (slots[own]) return own;
5388
- return slots[`header:${suffix}`] ? `header:${suffix}` : undefined;
5389
- };
5428
+ /** A header affix's slots present, strongest first: the column's, then the table-wide one. */
5429
+ const headerAffixNames = (key: string, suffix: HeaderAffixSuffix) =>
5430
+ [`${slotNamesByKey.value[key]}:header:${suffix}`, `header:${suffix}`].filter(
5431
+ (name) => slots[name]
5432
+ );
5390
5433
 
5391
5434
  /**
5392
5435
  * Renders a header affix slot. One component type for the table's life, so
@@ -5397,10 +5440,18 @@ const headerAffixName = (key: string, suffix: HeaderAffixSuffix) => {
5397
5440
  * compiler adds `key` and `ref_for` to a spread outlet's scope.
5398
5441
  */
5399
5442
  const HeaderAffix: FunctionalComponent<{
5400
- name: string;
5443
+ names: string[];
5401
5444
  scope: BbTableHeaderAffixSlotProps<Item>;
5402
- }> = (affix) => slots[affix.name]?.(affix.scope);
5403
- HeaderAffix.props = ['name', 'scope'];
5445
+ }> = (affix) => {
5446
+ // The first that renders something: a column's affix that renders nothing
5447
+ // for it falls back to the table-wide one (the empty-slot rule).
5448
+ for (const name of affix.names) {
5449
+ const nodes = slotContent(slots[name], affix.scope);
5450
+ if (nodes) return nodes;
5451
+ }
5452
+ return null;
5453
+ };
5454
+ HeaderAffix.props = ['names', 'scope'];
5404
5455
 
5405
5456
  /**
5406
5457
  * Affix slots receive the `<key>:header` payload plus the column key so a
@@ -8817,7 +8868,7 @@ export type BbTableProps<Item = any> = BbTablePtProps & {
8817
8868
  * Rows to render: an array, or a provider called with a
8818
8869
  * `BbTableItemsContext` (`reason`, `modelValue`, `signal`), sync or async.
8819
8870
  * A provider fails by THROWING, never by returning `[]`: the rows clear and
8820
- * `#empty` gets the `error`. Return the page as it is.
8871
+ * the failure row shows `failed-text` with "Try again". Return the page as it is.
8821
8872
  *
8822
8873
  * @defaultValue `[]`
8823
8874
  */
@@ -9280,8 +9331,8 @@ type BbTableColumnSlots<Item, V> = Record<
9280
9331
  /**
9281
9332
  * @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`.
9282
9333
  * @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 }`.
9283
- * @dynamicSlot `<key>:header:prepend` {BbTableHeaderAffixSlotProps<Item>} - Content before one column's header, keeping the sort button; beats `header:prepend` (they never stack).
9284
- * @dynamicSlot `<key>:header:append` {BbTableHeaderAffixSlotProps<Item>} - Content after one column's header, keeping the sort button; beats `header:append` (they never stack).
9334
+ * @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.
9335
+ * @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.
9285
9336
  * @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.
9286
9337
  * @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`.
9287
9338
  */
@@ -9347,14 +9398,16 @@ export type BbTableSlots<Item = any, V = any> = BbTableColumnSlots<Item, V> & {
9347
9398
  /**
9348
9399
  * Content before every data column's header content (the label + sort
9349
9400
  * control, or its own `<key>:header` replacement). A column's
9350
- * `<key>:header:prepend` wins over this for that column; they never stack.
9401
+ * `<key>:header:prepend` wins over this for that column; they never stack,
9402
+ * unless it renders nothing there.
9351
9403
  * Branch on `columnKey` for per-column output.
9352
9404
  */
9353
9405
  'header:prepend'?: (props: BbTableHeaderAffixSlotProps<Item>) => any;
9354
9406
  /**
9355
9407
  * Content after every data column's header content (the label + sort
9356
9408
  * control, or its own `<key>:header` replacement). A column's
9357
- * `<key>:header:append` wins over this for that column; they never stack.
9409
+ * `<key>:header:append` wins over this for that column; they never stack,
9410
+ * unless it renders nothing there.
9358
9411
  * Branch on `columnKey` for per-column output.
9359
9412
  */
9360
9413
  'header:append'?: (props: BbTableHeaderAffixSlotProps<Item>) => any;
@@ -9365,10 +9418,11 @@ export type BbTableSlots<Item = any, V = any> = BbTableColumnSlots<Item, V> & {
9365
9418
  loading?: (props: { items: Item[] }) => any;
9366
9419
  /**
9367
9420
  * Content shown when there are no rows and nothing is loading, inside the
9368
- * table's own full-width cell: pass content, never a row. `error` is what
9369
- * the latest failed load threw (`null` when none).
9421
+ * table's own full-width cell: pass content, never a row. Empty only: a
9422
+ * failed load shows the table's failure row instead (its message is
9423
+ * `failed-text`, and it ends with "Try again").
9370
9424
  */
9371
- empty?: (props: { error: unknown }) => any;
9425
+ empty?: (props: object) => any;
9372
9426
  /**
9373
9427
  * Content of each row's actions cell; this slot CREATES the actions column
9374
9428
  * (there is no prop). The header cell (labelled by `actions-text`, replaceable through
@@ -9450,11 +9504,13 @@ export type BbTableSlots<Item = any, V = any> = BbTableColumnSlots<Item, V> & {
9450
9504
  }
9451
9505
 
9452
9506
  .bb-table {
9453
- /* The table's surface colour. Cells are transparent at rest so the row can
9454
- tint them, but anything that sticks over scrolled content — the stuck
9455
- head band and pinned (`column.fixed`) cells — must be opaque, and paints this.
9456
- Set it on the table (`.my-table { --bg: … }`) when the table sits on a
9457
- surface that is not `--bb-panel`; a nested table re-declares its own. */
9507
+ /* The table's surface colour. A root table PAINTS it (below), so the
9508
+ whole table is one solid surface: pinned cells, the
9509
+ stuck head band and the rows between them always match, whatever the
9510
+ table sits on. Set it on the table (`.my-table { --bg: … }`) to blend
9511
+ into another surface. Rows and cells stay transparent so the row
9512
+ states and tones lay over it; a nested table re-declares its own and
9513
+ paints nothing (it sits on its parent's rows). */
9458
9514
  --bg: var(--bb-panel);
9459
9515
  /* The row hover's fill: the faint wash by default. Retint it or
9460
9516
  switch it off here (`transparent`), never with a `hover:bg-*` on the
@@ -9462,6 +9518,16 @@ export type BbTableSlots<Item = any, V = any> = BbTableColumnSlots<Item, V> & {
9462
9518
  one would let the scrolled cells show through it. This one knob reaches
9463
9519
  the row and its pinned cells alike. */
9464
9520
  --row-hover: var(--bb-surface-hover);
9521
+ /* A row's resting tone: set `--row-tone` on a row (`pt:row`, `row-class`)
9522
+ on an open row's expansion (`pt:expand`) or on a `#<key>:first` /
9523
+ `:last` row (`pt:firstRow` / `pt:lastRow`), never a `bg-*`. It paints
9524
+ as one translucent layer (`--row-tone-mix` of the colour) ABOVE every
9525
+ state fill, so hover and highlighted still show through it, and pinned
9526
+ cells and sticky rows lay the same layer over their opaque base.
9527
+ Re-declared on every table, so a table nested in a toned row starts
9528
+ untoned (the row's value would otherwise inherit into it). */
9529
+ --row-tone: initial;
9530
+ --row-tone-mix: 8%;
9465
9531
  /* Plate frost. `--bb-surface-filter` is a full `backdrop-filter` VALUE and
9466
9532
  defaults to `none` — the property's own initial value — so this pair is a
9467
9533
  measured no-op until a theme sets the knob: no containing block for fixed
@@ -9881,6 +9947,8 @@ export type BbTableSlots<Item = any, V = any> = BbTableColumnSlots<Item, V> & {
9881
9947
  from color-mix(in oklab, var(--row-bg, transparent) 99.9%, var(--bg)) r g
9882
9948
  b / 1
9883
9949
  );
9950
+ /* The row's tone layer, over the opaque base (`--row-tone`). */
9951
+ background-image: inherit;
9884
9952
  /* Same curve and duration as the row's own tint transition, so a pinned
9885
9953
  cell fades in step with its row instead of snapping ahead of it. */
9886
9954
  transition: background-color var(--bb-transition-fast) var(--bb-ease);
@@ -10774,6 +10842,22 @@ export type BbTableSlots<Item = any, V = any> = BbTableColumnSlots<Item, V> & {
10774
10842
  white-space: nowrap;
10775
10843
  }
10776
10844
 
10845
+ /* The tone layer (see `--row-tone` on the root). An image, so it sits
10846
+ above the row's `background-color`: the library's states and an app's
10847
+ `bg-*` stay under it and keep showing. A pinned cell inherits the
10848
+ image over its own opaque base (below), so it shows the same
10849
+ composite, never the rows scrolled under it. */
10850
+ &__row,
10851
+ &__edge-row,
10852
+ &-expand__cell {
10853
+ --tone: color-mix(
10854
+ in oklab,
10855
+ var(--row-tone, transparent) var(--row-tone-mix),
10856
+ transparent
10857
+ );
10858
+ background-image: linear-gradient(var(--tone), var(--tone));
10859
+ }
10860
+
10777
10861
  &__row {
10778
10862
  /* Keep a row on one printed page. */
10779
10863
  break-inside: avoid;
@@ -11153,6 +11237,16 @@ export type BbTableSlots<Item = any, V = any> = BbTableColumnSlots<Item, V> & {
11153
11237
  }
11154
11238
  }
11155
11239
 
11240
+ /* A root table paints its surface at rest: one solid
11241
+ table on any surface, so a pinned cell can never differ from its
11242
+ neighbours. A nested table paints nothing: it sits on its parent's rows
11243
+ and lets their hover, highlight and tone show. Under a glass theme `--bg`
11244
+ is the translucent panel, so the table reads as a frosted plate like a
11245
+ dialog. One class of specificity, like the `--bg` it paints. */
11246
+ .bb-table:where(:not(.bb-table .bb-table)) {
11247
+ background-color: var(--bg);
11248
+ }
11249
+
11156
11250
  /* The nested-indent tokens, defaulted on ROOT tables only (zero specificity):
11157
11251
  a consumer sets them on the root table (`.my-table { --indent: 24px;
11158
11252
  --indent-at: select }`) and every nested table inherits them, while a
@@ -409,7 +409,9 @@ const setInactive = () => {
409
409
  const onWrapperFocusIn = () => {
410
410
  if (active.value) return;
411
411
  setActive();
412
- document.addEventListener('click', onOutsideInteraction);
412
+ // Capture: a dialog around the field stops `click` at
413
+ // its root, so a click elsewhere in it never bubbles here.
414
+ document.addEventListener('click', onOutsideInteraction, true);
413
415
  document.addEventListener('focusin', onOutsideInteraction);
414
416
  };
415
417
 
@@ -606,9 +608,14 @@ const onWrapperClick = (event: MouseEvent) => {
606
608
  const onOutsideInteraction = async (event: Event) => {
607
609
  if (event.target instanceof Node) {
608
610
  if (wrapper.value) {
611
+ // a press on the field's own padding parks focus
612
+ // on the nearest focusable ancestor (the dialog around it): not the
613
+ // user going elsewhere. A CLICK on that ancestor still is.
614
+ if (event.type === 'focusin' && event.target.contains(wrapper.value.$el))
615
+ return;
609
616
  if (!wrapper.value.$el.contains(event.target)) {
610
617
  setInactive();
611
- document.removeEventListener('click', onOutsideInteraction);
618
+ document.removeEventListener('click', onOutsideInteraction, true);
612
619
  document.removeEventListener('focusin', onOutsideInteraction);
613
620
  alignQueryToState();
614
621
  return;
@@ -656,7 +663,7 @@ const leave = () => {
656
663
  } else {
657
664
  activity.value = 'idle';
658
665
  }
659
- document.removeEventListener('click', onOutsideInteraction);
666
+ document.removeEventListener('click', onOutsideInteraction, true);
660
667
  document.removeEventListener('focusin', onOutsideInteraction);
661
668
  };
662
669
 
@@ -22,7 +22,7 @@
22
22
  },
23
23
  anchorProps: { ref: setAnchorRef },
24
24
  open: isOpen,
25
- value: modelValue,
25
+ value: ownModel,
26
26
  text: activatorText,
27
27
  disabled: !!disabled,
28
28
  }"
@@ -146,6 +146,8 @@ import {
146
146
  watch,
147
147
  } from 'vue';
148
148
  import { useId } from '@/composables/useId';
149
+ import { useOwnModel } from '@/composables/useOwnModel';
150
+ import { useOpenModel } from '@/composables/useOpenModel';
149
151
  import { createReusableTemplate } from '@vueuse/core';
150
152
  import {
151
153
  extractDomContainer,
@@ -158,6 +160,7 @@ import { useMobile } from '@/composables/useMobile';
158
160
  import { transitions } from '@/utilities/misc/transitions';
159
161
  import CommonTimeSelector from '../CommonTimeSelector/CommonTimeSelector.vue';
160
162
  import { spokenTimeOf } from '../BbCalendar/useDayjsLocale';
163
+ import { useHydrated } from '@/composables/useHydrated';
161
164
  import type { TimeUnit } from '../CommonTimeSelector/types';
162
165
  import BbOffCanvas from '../BbOffCanvas/BbOffCanvas.vue';
163
166
  import { BB_OFF_CANVAS_PT } from '../BbOffCanvas/types';
@@ -213,6 +216,15 @@ const props = declaredProps as unknown as ShapeErasedProps<
213
216
  >;
214
217
  const emit = declaredEmit as unknown as BbTimePickerEvents;
215
218
 
219
+ type TimeModel = Exclude<BbTimePickerProps['modelValue'], undefined>;
220
+ // No `v-model`: the picker keeps its own value, like an input.
221
+ const { model: ownModel, set: setModel } = useOwnModel<'modelValue', TimeModel>(
222
+ props,
223
+ 'modelValue',
224
+ (event, value) => emit(event, value),
225
+ () => (props.range ? [] : null)
226
+ );
227
+
216
228
  /**
217
229
  * Passthrough. `root` lands on the floating popover, where a consumer `class` lands too (no node on the phone sheet); `panel` on the surface you see (the popover's painted bubble, or the sheet itself on a phone); `item` lives in the shared time selector, which binds what it is given per entry.
218
230
  */
@@ -231,11 +243,19 @@ const config = useConfig();
231
243
  * The value as the picker shows it, for a trigger's label:
232
244
  * 12-hour with the locale's day period under `ampm` ("9:30 PM",
233
245
  * "午後9:30"), else 24-hour; a range is `start – end`; empty is `''`.
246
+ * Before hydration, the model as written (`spokenTimeOf`).
234
247
  */
248
+ const { isHydrated } = useHydrated();
235
249
  const activatorText = computed(() => {
236
250
  const say = (value: string) =>
237
- spokenTimeOf(value, config.locale, !!props.ampm, !!props.seconds);
238
- const value = props.modelValue;
251
+ spokenTimeOf(
252
+ value,
253
+ config.locale,
254
+ !!props.ampm,
255
+ !!props.seconds,
256
+ isHydrated.value
257
+ );
258
+ const value = ownModel.value;
239
259
  if (Array.isArray(value)) return value.filter(Boolean).map(say).join(' – ');
240
260
  return value ? say(value) : '';
241
261
  });
@@ -360,11 +380,31 @@ const onActivatorClick = (event: MouseEvent) => {
360
380
  isOpen.value = !isOpen.value;
361
381
  };
362
382
 
363
- /** Close when the backdrop (the dialog element itself) is clicked. */
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
+
394
+ /**
395
+ * a click outside the panel closes it. The panel is a modal
396
+ * `<dialog>` whose transparent backdrop the browser does not hit-test, so the
397
+ * click lands on the page, not on the dialog; heard in the capture phase, as
398
+ * a dialog around the picker stops `click` at its root. The activator's own
399
+ * click toggles it itself. Closing hands focus back to the activator.
400
+ */
364
401
  const onClickDocument = (event: Event) => {
365
- if (event.target instanceof HTMLDialogElement) {
366
- isOpen.value = false;
367
- }
402
+ const target = event.target;
403
+ if (!(target instanceof Node)) return;
404
+ const panel = document.getElementById(panelId)?.closest('.bb-common-popover');
405
+ if (panel?.contains(target)) return;
406
+ if (activatorEl.value?.contains(target)) return;
407
+ isOpen.value = false;
368
408
  };
369
409
 
370
410
  watch(isOpen, async (val) => {
@@ -375,7 +415,10 @@ watch(isOpen, async (val) => {
375
415
  : null;
376
416
  // The floating <dialog> is modal; the sheet manages its own backdrop.
377
417
  if (!useOffcanvas.value) {
378
- document.addEventListener('click', onClickDocument, { passive: true });
418
+ document.addEventListener('click', onClickDocument, {
419
+ passive: true,
420
+ capture: true,
421
+ });
379
422
  }
380
423
  await nextTick();
381
424
  firstFocusableMatch(
@@ -383,7 +426,9 @@ watch(isOpen, async (val) => {
383
426
  '[tabindex="0"]'
384
427
  )?.focus();
385
428
  } else {
386
- document.removeEventListener('click', onClickDocument);
429
+ document.removeEventListener('click', onClickDocument, {
430
+ capture: true,
431
+ });
387
432
  previousFocus?.focus();
388
433
  previousFocus = null;
389
434
  }
@@ -460,7 +505,9 @@ watch(
460
505
 
461
506
  onBeforeUnmount(() => {
462
507
  cleanupActivator?.();
463
- document.removeEventListener('click', onClickDocument);
508
+ document.removeEventListener('click', onClickDocument, {
509
+ capture: true,
510
+ });
464
511
  });
465
512
 
466
513
  // ---- Adaptive surface (popover on desktop, bottom sheet on mobile) --------------
@@ -520,7 +567,7 @@ const segIndex = (segment: BbTimePickerSegment) => (segment === 'end' ? 1 : 0);
520
567
 
521
568
  /** The raw `HH:mm[:ss]` string carried in `modelValue` for a segment. */
522
569
  const timeStringFor = (segment: BbTimePickerSegment): string | null => {
523
- const mv = props.modelValue;
570
+ const mv = ownModel.value;
524
571
  if (mv == null) return null;
525
572
  if (Array.isArray(mv)) return mv[segIndex(segment)] ?? null;
526
573
  return segment === 'start' && typeof mv === 'string' ? mv : null;
@@ -597,7 +644,7 @@ const onTimePick = (payload: { unit: TimeUnit; value: string }) => {
597
644
  }
598
645
 
599
646
  if (!props.range) {
600
- emit('update:modelValue', clamped);
647
+ setModel(clamped);
601
648
  return;
602
649
  }
603
650
 
@@ -609,7 +656,7 @@ const onTimePick = (payload: { unit: TimeUnit; value: string }) => {
609
656
  if (startStr) out.push(startStr);
610
657
  if (endStr) out.push(endStr);
611
658
  // A range is always an array, `[]` included.
612
- emit('update:modelValue', out);
659
+ setModel(out);
613
660
  };
614
661
 
615
662
  // Deactivated by KeepAlive while open counts as closing: the surface leaves the
@@ -734,6 +781,11 @@ type BbTimePickerPtProps = /* @vue-ignore */ PtCompoundProps<
734
781
  // does not substitute a generic alias's type parameters — PASSTHROUGH.md T20).
735
782
 
736
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;
737
789
  /**
738
790
  * Passthrough, object form: the same keys as the `pt:*` attributes
739
791
  * without the prefix. See the `pt:<part>` row.
@@ -756,7 +808,7 @@ export type BbTimePickerBaseProps = BbTimePickerPtProps & {
756
808
  * v-model value: `null` for empty, a 24-hour `HH:mm` (or `HH:mm:ss` with
757
809
  * `seconds`) string, or a two-element `[start, end]` array when `range` is true.
758
810
  */
759
- modelValue: string | string[] | null;
811
+ modelValue?: string | string[] | null;
760
812
  /**
761
813
  * Which end the columns edit in range mode (`v-model:active-segment`).
762
814
  * Standalone use manages this internally via the in-panel toggle; a host can
@@ -843,7 +895,7 @@ export type BbTimePickerBaseProps = BbTimePickerPtProps & {
843
895
  */
844
896
  export type BbTimePickerModelProps<R extends boolean = boolean> = {
845
897
  range?: R;
846
- modelValue: PtNoInfer<BbTimeModel<R>>;
898
+ modelValue?: PtNoInfer<BbTimeModel<R>>;
847
899
  };
848
900
 
849
901
  export type BbTimePickerProps<R extends boolean = boolean> =
@@ -856,6 +908,8 @@ export type BbTimePickerEvents<R extends boolean = boolean> = {
856
908
  (e: 'shown'): void;
857
909
  /** Emitted as soon as the time panel starts to close. */
858
910
  (e: 'hide'): void;
911
+ /** The panel opened or closed (`v-model:open`). */
912
+ (e: 'update:open', value: boolean): void;
859
913
  /** Emitted once the time panel has finished closing. */
860
914
  (e: 'hidden'): void;
861
915
  /** Emitted when the selected time changes (single/range/null). */