bitboss-ui 3.0.0-beta.48 → 3.0.0-beta.49

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 (356) hide show
  1. package/README.md +24 -7
  2. package/bin/bitboss-ui-mcp.mjs +15 -3
  3. package/bin/bitboss-ui.mjs +115 -13
  4. package/dist/ai/BbAvatar.md +1 -1
  5. package/dist/ai/BbBreadcrumbs.md +65 -65
  6. package/dist/ai/BbButton.md +16 -5
  7. package/dist/ai/BbCheckbox.md +0 -2
  8. package/dist/ai/BbCheckboxGroup.md +13 -20
  9. package/dist/ai/BbDatePickerInput.md +4 -2
  10. package/dist/ai/BbDialog.md +1 -8
  11. package/dist/ai/BbDropdown.md +231 -220
  12. package/dist/ai/BbDropdownButton.md +65 -65
  13. package/dist/ai/BbDropdownGroup.md +2 -2
  14. package/dist/ai/BbDropzone.md +10 -10
  15. package/dist/ai/BbForm.md +43 -52
  16. package/dist/ai/BbHoverCard.md +4 -2
  17. package/dist/ai/BbNumberInput.md +88 -21
  18. package/dist/ai/BbPopover.md +29 -23
  19. package/dist/ai/BbProgress.md +48 -22
  20. package/dist/ai/BbRadioGroup.md +13 -19
  21. package/dist/ai/BbSelect.md +16 -36
  22. package/dist/ai/BbSelectPopover.md +14 -30
  23. package/dist/ai/BbSmoothHeight.md +0 -2
  24. package/dist/ai/BbSwitchGroup.md +13 -20
  25. package/dist/ai/BbTable.md +11 -10
  26. package/dist/ai/BbTabs.md +106 -105
  27. package/dist/ai/BbTabsList.md +2 -2
  28. package/dist/ai/BbTabsPanels.md +1 -1
  29. package/dist/ai/BbTabsRoot.md +2 -2
  30. package/dist/ai/BbTooltip.md +24 -10
  31. package/dist/ai/BbTree.md +14 -11
  32. package/dist/ai/changelog.json +256 -5
  33. package/dist/ai/components.json +36 -34
  34. package/dist/ai/composables/useBbDropdownContext.md +16 -16
  35. package/dist/ai/composables/useBbFormField.md +5 -1
  36. package/dist/ai/composables/useBbTabsContext.md +14 -14
  37. package/dist/ai/guides/agent-contract.md +27 -27
  38. package/dist/ai/guides/ai-router.md +1 -1
  39. package/dist/ai/guides/component-picker.md +3 -3
  40. package/dist/ai/guides/fetch-items-playbook.md +1 -1
  41. package/dist/ai/guides/icons-policy.md +10 -10
  42. package/dist/ai/guides/inertia-helpers.md +120 -67
  43. package/dist/ai/guides/installation-and-plugin-setup.md +43 -15
  44. package/dist/ai/guides/migration/components/bb-breadcrumbs.md +3 -2
  45. package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -16
  46. package/dist/ai/guides/migration/components/bb-dropdown-button.md +9 -8
  47. package/dist/ai/guides/migration/components/bb-dropdown.md +15 -14
  48. package/dist/ai/guides/migration/components/bb-radio-group.md +2 -1
  49. package/dist/ai/guides/migration/components/bb-select-popover.md +6 -1
  50. package/dist/ai/guides/migration/components/bb-select.md +10 -2
  51. package/dist/ai/guides/migration/components/bb-switch-group.md +2 -1
  52. package/dist/ai/guides/migration/components/bb-tabs.md +9 -8
  53. package/dist/ai/guides/migration/components/bb-tooltip.md +1 -1
  54. package/dist/ai/guides/migration/v2-to-v3.md +114 -17
  55. package/dist/ai/guides/migration/v3-beta-tooling.md +11 -0
  56. package/dist/ai/guides/options-items-playbook.md +30 -24
  57. package/dist/ai/guides/passthrough.md +2 -2
  58. package/dist/ai/guides/preset-components.md +18 -3
  59. package/dist/ai/guides/typescript-generic-components.md +1 -1
  60. package/dist/ai/guides/validated-forms.md +11 -22
  61. package/dist/ai/guides/validation-providers.md +4 -3
  62. package/dist/ai/helpers/inertia/manifest.json +636 -0
  63. package/dist/ai/helpers/inertia/types.ts +15 -0
  64. package/dist/ai/helpers/inertia/useAsyncFn.ts +110 -0
  65. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +102 -0
  66. package/dist/ai/helpers/inertia/useDeleteCmd.ts +30 -0
  67. package/dist/ai/helpers/inertia/useHasChanged.ts +36 -0
  68. package/dist/ai/helpers/inertia/useIndexById.ts +23 -0
  69. package/dist/ai/helpers/inertia/useLazyProp.ts +148 -0
  70. package/dist/ai/helpers/inertia/useLazyPropGetter.ts +50 -0
  71. package/dist/ai/helpers/inertia/useLoading.ts +20 -0
  72. package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +88 -0
  73. package/dist/ai/helpers/inertia/usePromiseForm.ts +62 -0
  74. package/dist/ai/helpers/inertia/useProp.ts +63 -0
  75. package/dist/ai/helpers/inertia/useQuery.ts +19 -0
  76. package/dist/ai/helpers/inertia/useQueryObject.ts +116 -0
  77. package/dist/ai/helpers/inertia/useResourceContext.ts +69 -0
  78. package/dist/ai/helpers/inertia/useRouteQuery.ts +54 -0
  79. package/dist/ai/helpers/inertia/useScreenSizes.ts +23 -0
  80. package/dist/ai/helpers/inertia/useTableContext.ts +34 -0
  81. package/dist/ai/helpers/inertia/useTableSelectionContext.ts +48 -0
  82. package/dist/ai/helpers/inertia/useUntil.ts +33 -0
  83. package/dist/ai/helpers/inertia/utils.ts +24 -0
  84. package/dist/ai/index.md +6 -6
  85. package/dist/ai/manifest/components/BbBreadcrumbs.json +10 -6
  86. package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
  87. package/dist/ai/manifest/components/BbButton.json +1 -1
  88. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  89. package/dist/ai/manifest/components/BbDropdown.json +23 -20
  90. package/dist/ai/manifest/components/BbDropdown.tree.json +2 -2
  91. package/dist/ai/manifest/components/BbDropdownButton.json +22 -19
  92. package/dist/ai/manifest/components/BbDropdownButton.tree.json +1 -1
  93. package/dist/ai/manifest/components/BbDropdownGroup.json +2 -2
  94. package/dist/ai/manifest/components/BbForm.json +1 -0
  95. package/dist/ai/manifest/components/BbNumberInput.json +6 -1
  96. package/dist/ai/manifest/components/BbNumberInput.tree.json +2 -1
  97. package/dist/ai/manifest/components/BbPopover.json +1 -0
  98. package/dist/ai/manifest/components/BbProgress.json +6 -6
  99. package/dist/ai/manifest/components/BbProgress.tree.json +1 -0
  100. package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
  101. package/dist/ai/manifest/components/BbSelect.json +2 -2
  102. package/dist/ai/manifest/components/BbSelectPopover.json +2 -2
  103. package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
  104. package/dist/ai/manifest/components/BbTabs.json +7 -6
  105. package/dist/ai/manifest/components/BbTabsList.json +3 -3
  106. package/dist/ai/manifest/components/BbTabsPanels.json +1 -1
  107. package/dist/ai/manifest/components/BbTabsRoot.json +5 -4
  108. package/dist/ai/manifest/components/BbTooltip.json +1 -1
  109. package/dist/ai/manifest/index.json +2 -2
  110. package/dist/ai/manifest/meta.json +2 -0
  111. package/dist/ai/manifest/types.advanced.json +10 -9
  112. package/dist/ai/manifest/types.api.json +5 -4
  113. package/dist/ai/recipes/inertia/approvals-inbox.md +16 -18
  114. package/dist/ai/recipes/inertia/inline-edit-workspace.md +23 -33
  115. package/dist/ai/recipes/inertia/layout-scaffold.md +16 -16
  116. package/dist/ai/recipes/inertia/onboarding.md +6 -10
  117. package/dist/ai/recipes/inertia/ownership-atlas.md +15 -18
  118. package/dist/ai/recipes/inertia/record-form.md +11 -11
  119. package/dist/ai/recipes/inertia/records-workspace.md +38 -41
  120. package/dist/ai/recipes/inertia/settings-workspace.md +26 -38
  121. package/dist/ai/recipes/inertia/upload-center.md +31 -39
  122. package/dist/ai/recipes/inertia/wizard-form.md +10 -19
  123. package/dist/ai/recipes/nuxt/approvals-inbox.md +7 -8
  124. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +14 -24
  125. package/dist/ai/recipes/nuxt/layout-scaffold.md +16 -16
  126. package/dist/ai/recipes/nuxt/onboarding.md +2 -6
  127. package/dist/ai/recipes/nuxt/ownership-atlas.md +7 -9
  128. package/dist/ai/recipes/nuxt/record-form.md +5 -5
  129. package/dist/ai/recipes/nuxt/records-workspace.md +29 -31
  130. package/dist/ai/recipes/nuxt/settings-workspace.md +22 -34
  131. package/dist/ai/recipes/nuxt/upload-center.md +22 -29
  132. package/dist/ai/recipes/nuxt/wizard-form.md +3 -11
  133. package/dist/ai/recipes/vue/approvals-inbox.md +7 -8
  134. package/dist/ai/recipes/vue/inline-edit-workspace.md +14 -24
  135. package/dist/ai/recipes/vue/layout-scaffold.md +16 -16
  136. package/dist/ai/recipes/vue/onboarding.md +2 -6
  137. package/dist/ai/recipes/vue/ownership-atlas.md +7 -9
  138. package/dist/ai/recipes/vue/record-form.md +5 -5
  139. package/dist/ai/recipes/vue/records-workspace.md +29 -31
  140. package/dist/ai/recipes/vue/settings-workspace.md +22 -34
  141. package/dist/ai/recipes/vue/upload-center.md +22 -29
  142. package/dist/ai/recipes/vue/wizard-form.md +3 -11
  143. package/dist/ai/source/BbAccordion.md +1 -1
  144. package/dist/ai/source/BbAlert.md +3 -3
  145. package/dist/ai/source/BbBadge.md +2 -2
  146. package/dist/ai/source/BbBadgeButton.md +5 -4
  147. package/dist/ai/source/BbBaseButton.md +1 -1
  148. package/dist/ai/source/BbBaseRadioIcon.md +1 -0
  149. package/dist/ai/source/BbBaseSwitchIcon.md +1 -0
  150. package/dist/ai/source/BbBreadcrumbs.md +63 -42
  151. package/dist/ai/source/BbButton.md +71 -33
  152. package/dist/ai/source/BbCalendar.md +17 -16
  153. package/dist/ai/source/BbCheckbox.md +3 -2
  154. package/dist/ai/source/BbCheckboxGroup.md +11 -4
  155. package/dist/ai/source/BbColorInput.md +10 -9
  156. package/dist/ai/source/BbConfirm.md +1 -1
  157. package/dist/ai/source/BbConfirmPortal.md +1 -1
  158. package/dist/ai/source/BbDatePicker.md +2 -2
  159. package/dist/ai/source/BbDatePickerInput.md +47 -20
  160. package/dist/ai/source/BbDialog.md +5 -5
  161. package/dist/ai/source/BbDropdown.md +230 -158
  162. package/dist/ai/source/BbDropdownButton.md +19 -12
  163. package/dist/ai/source/BbDropdownGroup.md +126 -93
  164. package/dist/ai/source/BbForm.md +25 -1
  165. package/dist/ai/source/BbIndicator.md +4 -0
  166. package/dist/ai/source/BbNumberInput.md +855 -19
  167. package/dist/ai/source/BbOffCanvas.md +27 -11
  168. package/dist/ai/source/BbPagination.md +3 -3
  169. package/dist/ai/source/BbPopover.md +152 -8
  170. package/dist/ai/source/BbPopoverPortal.md +11 -0
  171. package/dist/ai/source/BbProgress.md +82 -18
  172. package/dist/ai/source/BbRadioGroup.md +12 -5
  173. package/dist/ai/source/BbRating.md +11 -9
  174. package/dist/ai/source/BbSelect.md +16 -10
  175. package/dist/ai/source/BbSelectPopover.md +29 -23
  176. package/dist/ai/source/BbSlider.md +12 -6
  177. package/dist/ai/source/BbSwitch.md +3 -2
  178. package/dist/ai/source/BbSwitchGroup.md +5 -2
  179. package/dist/ai/source/BbTable.md +102 -18
  180. package/dist/ai/source/BbTabs.md +27 -23
  181. package/dist/ai/source/BbTabsList.md +26 -22
  182. package/dist/ai/source/BbTabsPanels.md +26 -22
  183. package/dist/ai/source/BbTabsRoot.md +25 -21
  184. package/dist/ai/source/BbTag.md +10 -9
  185. package/dist/ai/source/BbTextInput.md +5 -4
  186. package/dist/ai/source/BbTextarea.md +6 -5
  187. package/dist/ai/source/BbTimePicker.md +1 -1
  188. package/dist/ai/source/BbTimePickerInput.md +46 -9
  189. package/dist/ai/source/BbToast.md +10 -7
  190. package/dist/ai/source/BbToastPortal.md +10 -7
  191. package/dist/ai/source/BbTooltip.md +54 -8
  192. package/dist/ai/source/BbTree.md +21 -3
  193. package/dist/ai/source/CommonField.md +6 -4
  194. package/dist/ai/source/CommonFieldInput.md +15 -10
  195. package/dist/ai/source/CommonPopover.md +6 -0
  196. package/dist/ai/source/CommonTimeSelector.md +5 -4
  197. package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +10 -8
  198. package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +8 -8
  199. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +45 -45
  200. package/dist/components/BbBreadcrumbs/types.d.ts +25 -17
  201. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +84 -71
  202. package/dist/components/BbButton/toggleRoving.d.ts +6 -0
  203. package/dist/components/BbButton/toggleRoving.js +45 -0
  204. package/dist/components/BbButton/types.d.ts +4 -1
  205. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +178 -178
  206. package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +15 -15
  207. package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +28 -28
  208. package/dist/components/BbCalendar/useCalendarGrid.js +141 -139
  209. package/dist/components/BbCalendar/useDayjsLocale.d.ts +38 -15
  210. package/dist/components/BbCalendar/useDayjsLocale.js +31 -30
  211. package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +48 -48
  212. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +81 -80
  213. package/dist/components/BbCheckboxGroup/types.d.ts +6 -2
  214. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +69 -69
  215. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +363 -349
  216. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +91 -86
  217. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +298 -289
  218. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +322 -356
  219. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +17 -15
  220. package/dist/components/BbDropdown/DropdownRow.vue.d.ts +40 -0
  221. package/dist/components/BbDropdown/DropdownRow.vue.js +5 -0
  222. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +60 -0
  223. package/dist/components/BbDropdown/normalizeGroups.d.ts +8 -2
  224. package/dist/components/BbDropdown/normalizeGroups.js +60 -46
  225. package/dist/components/BbDropdown/types.d.ts +119 -88
  226. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +11 -2
  227. package/dist/components/BbDropdownButton/types.d.ts +2 -2
  228. package/dist/components/BbForm/BbForm.vue.d.ts +9 -0
  229. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +114 -105
  230. package/dist/components/BbForm/BbFormCustomField.js +1 -1
  231. package/dist/components/BbForm/bindFormField.js +2 -1
  232. package/dist/components/BbForm/formFields.d.ts +5 -0
  233. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +0 -1
  234. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +452 -125
  235. package/dist/components/BbNumberInput/numberDisplay.d.ts +256 -0
  236. package/dist/components/BbNumberInput/numberDisplay.js +499 -0
  237. package/dist/components/BbNumberInput/types.d.ts +54 -1
  238. package/dist/components/BbNumberInput/warroom/corpus.d.ts +58 -0
  239. package/dist/components/BbNumberInput/warroom/currency-verify.rows.d.ts +28 -0
  240. package/dist/components/BbNumberInput/warroom/currency.rows.d.ts +2 -0
  241. package/dist/components/BbNumberInput/warroom/harness.d.ts +217 -0
  242. package/dist/components/BbNumberInput/warroom/oracle.d.ts +150 -0
  243. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +7 -7
  244. package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -0
  245. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +207 -164
  246. package/dist/components/BbPopover/types.d.ts +11 -0
  247. package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +15 -7
  248. package/dist/components/BbProgress/types.d.ts +23 -7
  249. package/dist/components/BbProgress/types.js +1 -1
  250. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +102 -101
  251. package/dist/components/BbRadioGroup/types.d.ts +6 -2
  252. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +63 -63
  253. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +156 -154
  254. package/dist/components/BbSelect/types.d.ts +6 -2
  255. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +2 -1
  256. package/dist/components/BbSelectPopover/types.d.ts +6 -2
  257. package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +153 -153
  258. package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +62 -62
  259. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +131 -130
  260. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +711 -676
  261. package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +1 -1
  262. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +1 -1
  263. package/dist/components/BbTabs/types.d.ts +25 -21
  264. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +76 -76
  265. package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +58 -58
  266. package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +82 -82
  267. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +246 -236
  268. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +102 -97
  269. package/dist/components/BbTooltip/tooltipWarmup.d.ts +23 -0
  270. package/dist/components/BbTooltip/tooltipWarmup.js +7 -0
  271. package/dist/components/BbTooltip/types.d.ts +7 -2
  272. package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +29 -21
  273. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +10 -7
  274. package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +37 -36
  275. package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +9 -9
  276. package/dist/composables/formSubmitLock.d.ts +6 -0
  277. package/dist/composables/formSubmitLock.js +4 -0
  278. package/dist/composables/useBaseOptions.d.ts +7 -1
  279. package/dist/composables/useBaseOptions.js +32 -32
  280. package/dist/composables/useBbDropdownContext.d.ts +8 -8
  281. package/dist/composables/useBbFormField.d.ts +9 -0
  282. package/dist/composables/useBbFormField.js +5 -3
  283. package/dist/composables/useBbTabsContext.d.ts +10 -10
  284. package/dist/composables/useBbTabsContext.js +18 -18
  285. package/dist/composables/useFormBinding.d.ts +11 -0
  286. package/dist/composables/useFormBinding.js +15 -13
  287. package/dist/composables/useItemText.d.ts +5 -1
  288. package/dist/composables/useItemText.js +8 -3
  289. package/dist/composables/useItemValue.d.ts +5 -1
  290. package/dist/composables/useItemValue.js +8 -3
  291. package/dist/composables/useLocale.js +10 -9
  292. package/dist/deprecation/ai-deprecations.json.d.ts +130 -0
  293. package/dist/deprecation/ai-deprecations.json.js +1 -1
  294. package/dist/deprecation/removedProps.js +1 -1
  295. package/dist/directives/bbDropdown.js +1 -1
  296. package/dist/i18n/index.d.ts +7 -12
  297. package/dist/i18n/locales/cs.json +11 -14
  298. package/dist/i18n/locales/da.json +13 -16
  299. package/dist/i18n/locales/de-CH.json +137 -0
  300. package/dist/i18n/locales/de.json +14 -17
  301. package/dist/i18n/locales/el.json +10 -13
  302. package/dist/i18n/locales/en-GB.json +137 -0
  303. package/dist/i18n/locales/en.json +8 -11
  304. package/dist/i18n/locales/es-MX.json +137 -0
  305. package/dist/i18n/locales/es.json +16 -19
  306. package/dist/i18n/locales/fi.json +8 -11
  307. package/dist/i18n/locales/fr.json +23 -26
  308. package/dist/i18n/locales/hu.json +8 -11
  309. package/dist/i18n/locales/it.json +12 -15
  310. package/dist/i18n/locales/ja.json +13 -16
  311. package/dist/i18n/locales/ko.json +10 -13
  312. package/dist/i18n/locales/nb.json +13 -16
  313. package/dist/i18n/locales/nl.json +21 -24
  314. package/dist/i18n/locales/pl.json +10 -13
  315. package/dist/i18n/locales/{pt.json → pt-BR.json} +19 -22
  316. package/dist/i18n/locales/pt-PT.json +137 -0
  317. package/dist/i18n/locales/ro.json +22 -25
  318. package/dist/i18n/locales/ru.json +11 -14
  319. package/dist/i18n/locales/sv.json +16 -19
  320. package/dist/i18n/locales/tr.json +14 -17
  321. package/dist/i18n/locales/uk.json +11 -14
  322. package/dist/i18n/locales/{zh-cn.json → zh-CN.json} +10 -13
  323. package/dist/i18n/locales/zh-HK.json +137 -0
  324. package/dist/i18n/locales/zh-TW.json +137 -0
  325. package/dist/i18n/regionHints.d.ts +16 -0
  326. package/dist/i18n/regionHints.js +49 -0
  327. package/dist/i18n/regions.d.ts +286 -0
  328. package/dist/i18n/regions.js +265 -0
  329. package/dist/index.d.ts +1 -1
  330. package/dist/index.js +4 -4
  331. package/dist/llms-full.txt +1785 -1637
  332. package/dist/llms-medium.txt +74 -46
  333. package/dist/llms.txt +7 -7
  334. package/dist/locale-blueprint.json +16 -13
  335. package/dist/styles.css +2 -2
  336. package/dist/types/ptComponentMap.d.ts +1 -1
  337. package/dist/utilities/functions/slotKey.d.ts +2 -2
  338. package/dist/utils/versionCheck.js +1 -1
  339. package/dist/vite-plugin.d.ts +22 -19
  340. package/dist/vite.js +309 -297
  341. package/llms.txt +7 -7
  342. package/package.json +5 -3
  343. package/scripts/lib/agent-manifest.mjs +2 -1
  344. package/scripts/lib/eslint-disable.mjs +12 -4
  345. package/scripts/lib/eslint-plugin.d.ts +5 -1
  346. package/scripts/lib/eslint-plugin.mjs +187 -6
  347. package/scripts/lib/helper-canon.mjs +176 -0
  348. package/scripts/lib/helpers-add.mjs +1303 -0
  349. package/scripts/lib/local-components.mjs +33 -4
  350. package/scripts/lib/locale-check.mjs +165 -0
  351. package/scripts/lib/redundant-item-accessor.mjs +398 -0
  352. package/scripts/lib/renamed-item-field.mjs +343 -0
  353. package/scripts/lib/slot-key.mjs +2 -2
  354. package/scripts/lib/slot-renames.mjs +1 -1
  355. package/scripts/lib/validate-bb-markup.mjs +123 -56
  356. package/dist/i18n/index.js +0 -27
@@ -2,15 +2,15 @@ import { useLogger as e } from "../../composables/useLogger.js";
2
2
  import { usePassthrough as t } from "../../composables/usePassthrough.js";
3
3
  import { removedPropsFor as n } from "../../deprecation/removedProps.js";
4
4
  import { slotKey as r } from "../../utilities/functions/slotKey.js";
5
- import { warnRemovedAttrs as i } from "../../utilities/functions/warnRemovedAttrs.js";
6
- import a from "../BbBaseButton/BbBaseButton.vue.js";
7
- import { useLocale as o } from "../../composables/useLocale.js";
8
- import s from "../BbIcon/BbIcon.vue.js";
9
- import c from "../../assets/svgs/chevron_right.svg_raw.js";
10
- import l from "../BbDropdown/BbDropdown.vue.js";
11
- import { estimateBreadcrumbItemWidth as ee, estimateEllipsisWidth as te } from "./estimateBreadcrumbItemWidth.js";
12
- import { BB_BREADCRUMBS_PT as u } from "./types.js";
13
- import { Fragment as d, computed as f, createBlock as ne, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createSlots as re, createTextVNode as ie, createVNode as g, defineComponent as _, guardReactiveProps as v, mergeProps as y, normalizeProps as b, onBeforeUnmount as ae, openBlock as x, ref as S, renderList as C, renderSlot as w, toDisplayString as oe, unref as T, useAttrs as se, useSlots as ce, watch as le, withCtx as E } from "vue";
5
+ import { warnRemovedAttrs as ee } from "../../utilities/functions/warnRemovedAttrs.js";
6
+ import { useLocale as i } from "../../composables/useLocale.js";
7
+ import a from "../BbIcon/BbIcon.vue.js";
8
+ import o from "../BbBaseButton/BbBaseButton.vue.js";
9
+ import s from "../../assets/svgs/chevron_right.svg_raw.js";
10
+ import c from "../BbDropdown/BbDropdown.vue.js";
11
+ import { estimateBreadcrumbItemWidth as te, estimateEllipsisWidth as ne } from "./estimateBreadcrumbItemWidth.js";
12
+ import { BB_BREADCRUMBS_PT as l } from "./types.js";
13
+ import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createSlots as re, createTextVNode as ie, createVNode as g, defineComponent as _, guardReactiveProps as v, mergeProps as y, normalizeProps as b, onBeforeUnmount as ae, openBlock as x, ref as S, renderList as C, renderSlot as w, toDisplayString as oe, unref as T, useAttrs as se, useSlots as ce, watch as le, withCtx as E } from "vue";
14
14
  import { useResizeObserver as ue } from "@vueuse/core";
15
15
  //#region src/components/BbBreadcrumbs/BbBreadcrumbs.vue?vue&type=script&setup=true&lang.ts
16
16
  var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
@@ -54,15 +54,15 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
54
54
  },
55
55
  setup(_) {
56
56
  let k = _;
57
- process.env.NODE_ENV !== "production" && i("BbBreadcrumbs", n("BbBreadcrumbs"), { slotKeys: () => k.items.map((e) => e.key) });
57
+ process.env.NODE_ENV !== "production" && ee("BbBreadcrumbs", n("BbBreadcrumbs"), { slotKeys: () => k.items.map((e) => e.value) });
58
58
  let A = t({
59
59
  component: "BbBreadcrumbs",
60
60
  attrs: se(),
61
61
  props: k,
62
- parts: u.parts,
63
- states: u.states,
62
+ parts: l.parts,
63
+ states: l.states,
64
64
  active: { disabled: () => !!k.disabled }
65
- }), { t: j } = o();
65
+ }), { t: j } = i();
66
66
  e();
67
67
  let M = ce(), we = /* @__PURE__ */ new Set([
68
68
  "prepend",
@@ -70,12 +70,12 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
70
70
  "ellipsis",
71
71
  "divider",
72
72
  "activator"
73
- ]), N = (e) => e.key == null || e.key === "" ? ":keyless" : r(String(e.key)), P = (e, t) => t === k.items.length - 1 && !e.href && !e.to && !e.onClick, Te = (e, t) => {
74
- let { "prepend:icon": n, "append:icon": r, ...i } = e;
73
+ ]), N = (e) => e.value == null || e.value === "" ? ":keyless" : r(String(e.value)), P = (e, t) => t === k.items.length - 1 && !e.href && !e.to && !e.onClick, Te = (e, t) => {
74
+ let { "prepend:icon": n, "append:icon": r, value: ee, label: i, ...a } = e;
75
75
  return P(e, t) ? {
76
- ...i,
76
+ ...a,
77
77
  "aria-current": "page"
78
- } : i;
78
+ } : a;
79
79
  }, F = (e, t) => {
80
80
  let n = `${N(e)}:${t}`;
81
81
  return M[n] ? {
@@ -88,10 +88,10 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
88
88
  name: n,
89
89
  exists: !1
90
90
  };
91
- }, Ee = f(() => Object.keys(M).filter((e) => !we.has(e))), I = S(null), L = S(0), R = f(() => k.gapWidth), z = f(() => Math.max(0, k.offsetWidth)), De = f(() => k.estimationBias), B = f(() => k.ellipsisWidth ?? te(O)), Oe = f(() => j("breadcrumbs.label").value), ke = f(() => j("breadcrumbs.openHiddenLabelCount", L.value).value), V = (e) => ee(e.text ?? String(e.key), {
91
+ }, Ee = d(() => Object.keys(M).filter((e) => !we.has(e))), I = S(null), L = S(0), R = d(() => k.gapWidth), z = d(() => Math.max(0, k.offsetWidth)), De = d(() => k.estimationBias), B = d(() => k.ellipsisWidth ?? ne(O)), Oe = d(() => j("breadcrumbs.label").value), ke = d(() => j("breadcrumbs.openHiddenLabelCount", L.value).value), V = (e) => te(e.label ?? "", {
92
92
  estimationBias: De.value,
93
93
  fontWidth: O
94
- }), Ae = f(() => {
94
+ }), Ae = d(() => {
95
95
  let e = k.items.length;
96
96
  if (e === 0) return 0;
97
97
  let t = k.dividerWidth, n = R.value;
@@ -101,7 +101,7 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
101
101
  if (!e) return;
102
102
  let t = getComputedStyle(e);
103
103
  H.value = t.display.includes("flex") && t.flexDirection.startsWith("column");
104
- }, je = f(() => ({
104
+ }, je = d(() => ({
105
105
  "--flex-basis": H.value ? "auto" : `${Math.ceil(Ae.value)}px`,
106
106
  "--flex-grow": L.value > 0 ? "1" : "0",
107
107
  "--gap": `${R.value}px`
@@ -111,11 +111,11 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
111
111
  L.value = 0;
112
112
  return;
113
113
  }
114
- let n = Math.max(0, e - be - z.value - D), r = k.dividerWidth, i = B.value, a = R.value, o = k.items.map(V), s = Array.from({ length: t + 1 }, () => 0);
115
- for (let e = t - 1; e >= 0; e--) s[e] = s[e + 1] + o[e];
116
- let c = (e) => n - e <= D / 2, l = s[0] + (t > 1 ? (t - 1) * (r + 2 * a) : 0);
117
- if (l <= n) {
118
- if (t > 1 && c(l)) {
114
+ let n = Math.max(0, e - be - z.value - D), r = k.dividerWidth, ee = B.value, i = R.value, a = k.items.map(V), o = Array.from({ length: t + 1 }, () => 0);
115
+ for (let e = t - 1; e >= 0; e--) o[e] = o[e + 1] + a[e];
116
+ let s = (e) => n - e <= D / 2, c = o[0] + (t > 1 ? (t - 1) * (r + 2 * i) : 0);
117
+ if (c <= n) {
118
+ if (t > 1 && s(c)) {
119
119
  L.value = 1;
120
120
  return;
121
121
  }
@@ -123,9 +123,9 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
123
123
  return;
124
124
  }
125
125
  for (let e = t - 1; e >= 1; e--) {
126
- let o = s[t - e], l = i + e * (r + 2 * a) + o;
127
- if (l <= n) {
128
- if (e > 0 && c(l)) {
126
+ let a = o[t - e], c = ee + e * (r + 2 * i) + a;
127
+ if (c <= n) {
128
+ if (e > 0 && s(c)) {
129
129
  L.value = t - (e - 1);
130
130
  return;
131
131
  }
@@ -134,7 +134,7 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
134
134
  }
135
135
  }
136
136
  L.value = t - 1;
137
- }, W = f(() => I.value), Ne = f(() => k.items.map((e) => `${String(e.key)}::${e.text ?? ""}`).join("|")), G = null, K = null, q = null, J = null, Y = 0, X = null, Z = (e, t) => Math.abs(e - t) <= xe, Q = () => {
137
+ }, W = d(() => I.value), Ne = d(() => k.items.map((e) => `${String(e.value)}::${e.label ?? ""}`).join("|")), G = null, K = null, q = null, J = null, Y = 0, X = null, Z = (e, t) => Math.abs(e - t) <= xe, Q = () => {
138
138
  X != null && clearTimeout(X), X = setTimeout(() => {
139
139
  X = null, Y = 0;
140
140
  }, Ce);
@@ -168,9 +168,9 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
168
168
  }, { immediate: !0 }), ae(() => {
169
169
  K != null && cancelAnimationFrame(K), X != null && clearTimeout(X);
170
170
  });
171
- let Fe = f(() => k.items.slice(0, L.value).map((e) => ({
171
+ let Fe = d(() => k.items.slice(0, L.value).map((e) => ({
172
172
  ...e,
173
- text: e.text ?? e.key ?? ""
173
+ label: e.label ?? ""
174
174
  })));
175
175
  return (e, t) => (x(), m("nav", y({
176
176
  ref_key: "navRef",
@@ -183,7 +183,7 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
183
183
  h("ol", me, [L.value > 0 ? (x(), m("li", y({
184
184
  key: 0,
185
185
  class: "bb-breadcrumbs__item"
186
- }, T(A).part("item", { disabled: e.disabled || void 0 })), [g(l, {
186
+ }, T(A).part("item", { disabled: e.disabled || void 0 })), [g(c, {
187
187
  items: Fe.value,
188
188
  padding: 0,
189
189
  placement: "bottom-start"
@@ -203,10 +203,10 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
203
203
  }, [C(Ee.value, (t) => ({
204
204
  name: t,
205
205
  fn: E((n) => [w(e.$slots, t, b(v(n)))])
206
- }))]), 1032, ["items"]), L.value < e.items.length ? (x(), m("span", ge, [w(e.$slots, "divider", {}, () => [g(s, {
207
- icon: T(c),
206
+ }))]), 1032, ["items"]), L.value < e.items.length ? (x(), m("span", ge, [w(e.$slots, "divider", {}, () => [g(a, {
207
+ icon: T(s),
208
208
  size: "14"
209
- }, null, 8, ["icon"])])])) : p("", !0)], 16)) : p("", !0), (x(!0), m(d, null, C(e.items, (t, n) => (x(), m(d, { key: t.key ?? `:keyless-${n}` }, [n >= L.value ? (x(), m("li", y({
209
+ }, null, 8, ["icon"])])])) : p("", !0)], 16)) : p("", !0), (x(!0), m(u, null, C(e.items, (t, n) => (x(), m(u, { key: t.value ?? `:keyless-${n}` }, [n >= L.value ? (x(), m("li", y({
210
210
  key: 0,
211
211
  class: ["bb-breadcrumbs__item", {
212
212
  "bb-breadcrumbs__item--active": P(t, n),
@@ -216,7 +216,7 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
216
216
  }, T(A).part("item", {
217
217
  active: P(t, n),
218
218
  disabled: t.disabled || e.disabled || void 0
219
- })), [g(a, y({ ref_for: !0 }, Te(t, n), {
219
+ })), [g(o, y({ ref_for: !0 }, Te(t, n), {
220
220
  class: "bb-breadcrumbs__breadcrumb",
221
221
  disabled: t.disabled || e.disabled,
222
222
  tag: P(t, n) ? "span" : void 0
@@ -226,9 +226,9 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
226
226
  disabled: !!(t.disabled || e.disabled),
227
227
  index: n,
228
228
  item: t,
229
- text: t.text
229
+ label: t.label
230
230
  }),
231
- !F(t, "prepend").exists && t["prepend:icon"] ? (x(), ne(s, y({
231
+ !F(t, "prepend").exists && t["prepend:icon"] ? (x(), f(a, y({
232
232
  key: 0,
233
233
  class: "bb-breadcrumbs__item-icon bb-breadcrumbs__item-icon--prepend",
234
234
  icon: t["prepend:icon"],
@@ -240,7 +240,7 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
240
240
  })), null, 16, ["icon"])) : p("", !0),
241
241
  h("span", y({
242
242
  class: "bb-breadcrumbs__text",
243
- title: e.items.length > 1 && L.value === e.items.length - 1 ? t.text : void 0,
243
+ title: e.items.length > 1 && L.value === e.items.length - 1 ? t.label : void 0,
244
244
  ref_for: !0
245
245
  }, T(A).part("text", {
246
246
  active: P(t, n),
@@ -249,15 +249,15 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
249
249
  disabled: !!(t.disabled || e.disabled),
250
250
  index: n,
251
251
  item: t,
252
- text: t.text
253
- }, () => [ie(oe(t.text), 1)])], 16, _e),
252
+ label: t.label
253
+ }, () => [ie(oe(t.label), 1)])], 16, _e),
254
254
  w(e.$slots, F(t, "append").name, {
255
255
  disabled: !!(t.disabled || e.disabled),
256
256
  index: n,
257
257
  item: t,
258
- text: t.text
258
+ label: t.label
259
259
  }),
260
- !F(t, "append").exists && t["append:icon"] ? (x(), ne(s, y({
260
+ !F(t, "append").exists && t["append:icon"] ? (x(), f(a, y({
261
261
  key: 1,
262
262
  class: "bb-breadcrumbs__item-icon bb-breadcrumbs__item-icon--append",
263
263
  icon: t["append:icon"],
@@ -269,8 +269,8 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
269
269
  })), null, 16, ["icon"])) : p("", !0)
270
270
  ]),
271
271
  _: 2
272
- }, 1040, ["disabled", "tag"]), n < e.items.length - 1 ? (x(), m("span", ve, [w(e.$slots, "divider", {}, () => [g(s, {
273
- icon: T(c),
272
+ }, 1040, ["disabled", "tag"]), n < e.items.length - 1 ? (x(), m("span", ve, [w(e.$slots, "divider", {}, () => [g(a, {
273
+ icon: T(s),
274
274
  size: "14"
275
275
  }, null, 8, ["icon"])])])) : p("", !0)], 16)) : p("", !0)], 64))), 128))]),
276
276
  e.$slots.append ? (x(), m("div", ye, [w(e.$slots, "append", { disabled: e.disabled })])) : p("", !0)
@@ -1,27 +1,35 @@
1
1
  import { BbBaseButtonProps } from '../BbBaseButton/types';
2
2
  import { PtMap, PtValue } from '../../types/passthrough';
3
3
  import { IconType } from '../../types/Icon';
4
- export type Item = Omit<BbBaseButtonProps, 'block' | 'tag' | 'type'> & {
4
+ export type Item = Omit<BbBaseButtonProps, 'block' | 'tag' | 'type' | 'text'> & {
5
5
  /**
6
6
  * Click handler of the button.
7
7
  */
8
8
  onClick?: (event: MouseEvent) => void | Promise<void>;
9
- /**
10
- * Key that uniquely identifies the breadcrumb, and the base for its own
11
- * named slots (`slotKey(key)`, kebab-case). Optional unless the crumb has a
12
- * slot of its own: a keyless crumb renders with the generic slots only
13
- * (Q53.17 — slot names are written, never derived from the text).
14
- */
15
- key?: string;
9
+ /** The crumb's text. */
10
+ label?: string;
11
+ /**
12
+ * Identifies the crumb, and names its own slots (`slotKey(value)`,
13
+ * kebab-case: `#<value>`, `#<value>:prepend`, `#<value>:append`). Optional
14
+ * unless the crumb has a slot of its own: a crumb without one renders with
15
+ * the generic slots only (Q53.17 — slot names are written, never derived
16
+ * from the label). A crumb hidden in the overflow menu is a dropdown row with
17
+ * the same `label` and `value`.
18
+ */
19
+ value?: string;
20
+ /** Crumbs have no `key` (that is `value`). Guards against the old shape. */
21
+ key?: never;
22
+ /** Crumbs have no `text` (that is `label`). Guards against the old shape. */
23
+ text?: never;
16
24
  /**
17
25
  * Icon rendered before the breadcrumb label, in the leading edge region
18
26
  * (outside the link, so it never inherits the link's text styling). Acts as
19
- * the fallback when no `<key>:prepend` / `item:prepend` slot is provided.
27
+ * the fallback when no `<value>:prepend` / `item:prepend` slot is provided.
20
28
  */
21
29
  'prepend:icon'?: IconType;
22
30
  /**
23
31
  * Icon rendered after the breadcrumb label, in the trailing edge region.
24
- * Fallback when no `<key>:append` / `item:append` slot is provided.
32
+ * Fallback when no `<value>:append` / `item:append` slot is provided.
25
33
  */
26
34
  'append:icon'?: IconType;
27
35
  };
@@ -111,8 +119,8 @@ export type BbBreadcrumbsItemSlotProps = {
111
119
  index: number;
112
120
  /** The raw item object from the `items` prop. */
113
121
  item: Item;
114
- /** The resolved display text for this item. */
115
- text?: string;
122
+ /** The crumb's label. */
123
+ label?: string;
116
124
  };
117
125
  /** Props exposed by the `ellipsis` slot. */
118
126
  export type BbBreadcrumbsEllipsisSlotProps = {
@@ -129,9 +137,9 @@ export type BbBreadcrumbsEllipsisSlotProps = {
129
137
  ellipsisWidth: number;
130
138
  };
131
139
  /**
132
- * @dynamicSlot `<key>` {BbBreadcrumbsItemSlotProps} - One crumb's label, by its `key` through `slotKey`; falls back to `item.text`. A crumb folded into the overflow menu follows BbDropdown's slot rules instead.
133
- * @dynamicSlot `<key>:prepend` {BbBreadcrumbsItemSlotProps} - The glyph before one crumb's label; beats `item:prepend`, which beats its `prepend:icon`.
134
- * @dynamicSlot `<key>:append` {BbBreadcrumbsItemSlotProps} - The glyph after one crumb's label; beats `item:append`, which beats its `append:icon`.
140
+ * @dynamicSlot `<value>` {BbBreadcrumbsItemSlotProps} - One crumb's label, by its `value` through `slotKey`; falls back to `item.label`. A crumb folded into the overflow menu follows BbDropdown's slot rules instead (the same `#<value>` names).
141
+ * @dynamicSlot `<value>:prepend` {BbBreadcrumbsItemSlotProps} - The glyph before one crumb's label; beats `item:prepend`, which beats its `prepend:icon`.
142
+ * @dynamicSlot `<value>:append` {BbBreadcrumbsItemSlotProps} - The glyph after one crumb's label; beats `item:append`, which beats its `append:icon`.
135
143
  */
136
144
  export type BbBreadcrumbsSlots = {
137
145
  /**
@@ -144,14 +152,14 @@ export type BbBreadcrumbsSlots = {
144
152
  append?: (props: BbBreadcrumbsEdgeSlotProps) => any;
145
153
  /**
146
154
  * Content rendered before **every** breadcrumb item's link/button, in the
147
- * leading edge region. Generic fallback: a per-item `<key>:prepend` slot
155
+ * leading edge region. Generic fallback: a per-item `<value>:prepend` slot
148
156
  * takes precedence, and the item's `prepend:icon` is used when neither slot
149
157
  * is present.
150
158
  */
151
159
  'item:prepend'?: (props: BbBreadcrumbsItemSlotProps) => any;
152
160
  /**
153
161
  * Content rendered after **every** breadcrumb item's link/button. Generic
154
- * fallback below a per-item `<key>:append` slot and above the item's
162
+ * fallback below a per-item `<value>:append` slot and above the item's
155
163
  * `append:icon`.
156
164
  */
157
165
  'item:append'?: (props: BbBreadcrumbsItemSlotProps) => any;
@@ -4,23 +4,25 @@ import { useUntil as n } from "../../composables/useUntil.js";
4
4
  import { removedPropsFor as r } from "../../deprecation/removedProps.js";
5
5
  import { warnRemovedAttrs as i } from "../../utilities/functions/warnRemovedAttrs.js";
6
6
  import { extractDomContainer as a } from "../../utilities/functions/extractDomContainer.js";
7
- import o from "../BbBaseButton/BbBaseButton.vue.js";
8
- import { useLocale as s } from "../../composables/useLocale.js";
9
- import c from "../BbIcon/BbIcon.vue.js";
10
- import l from "../BbSpinner/BbSpinner.vue.js";
7
+ import { useLocale as o } from "../../composables/useLocale.js";
8
+ import s from "../BbIcon/BbIcon.vue.js";
9
+ import ee from "../BbSpinner/BbSpinner.vue.js";
10
+ import c from "../BbBaseButton/BbBaseButton.vue.js";
11
+ import { BB_FORM_SUBMIT_LOCK as l } from "../../composables/formSubmitLock.js";
11
12
  import { pickBy as u } from "../../utilities/functions/pickBy.js";
12
13
  import { noop as d } from "../../utilities/functions/noop.js";
13
14
  import { isEqual as f } from "../../utilities/functions/isEqual.js";
14
15
  import { BB_BUTTON_PT as p } from "./types.js";
15
- import { Transition as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, defineComponent as x, mergeModels as S, mergeProps as C, openBlock as w, ref as T, renderSlot as E, toDisplayString as D, unref as O, useAttrs as k, useModel as A, watchEffect as j, withCtx as M } from "vue";
16
+ import { useToggleRoving as m } from "./toggleRoving.js";
17
+ import { Transition as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createTextVNode as te, defineComponent as x, inject as S, mergeModels as C, mergeProps as w, openBlock as T, ref as E, renderSlot as D, toDisplayString as O, unref as k, useAttrs as A, useModel as j, watchEffect as M, withCtx as N } from "vue";
16
18
  //#region src/components/BbButton/BbButton.vue?vue&type=script&setup=true&lang.ts
17
- var N = {
19
+ var P = {
18
20
  key: 3,
19
21
  class: "bb-button__loading-label bb-sr-only"
20
- }, P = /*@__PURE__*/ x({
22
+ }, F = /*@__PURE__*/ x({
21
23
  inheritAttrs: !1,
22
24
  __name: "BbButton",
23
- props: /*@__PURE__*/ S({
25
+ props: /*@__PURE__*/ C({
24
26
  "pt:root": {},
25
27
  "pt:icon": {},
26
28
  "pt:spinner": {},
@@ -103,61 +105,61 @@ var N = {
103
105
  modelModifiers: {}
104
106
  }),
105
107
  emits: ["update:modelValue"],
106
- setup(x, { expose: S }) {
107
- let P = A(x, "modelValue"), F = x;
108
+ setup(x, { expose: C }) {
109
+ let F = j(x, "modelValue"), I = x;
108
110
  process.env.NODE_ENV !== "production" && i("BbButton", r("BbButton"));
109
- let I = [
111
+ let L = [
110
112
  "xs",
111
113
  "sm",
112
114
  "md",
113
115
  "lg",
114
116
  "xl",
115
117
  "2xl"
116
- ], L = e(), R = h(() => P.value !== void 0), z = h(() => f(P.value, F.trueValue)), { t: B } = s(), V = k(), H = T();
117
- process.env.NODE_ENV !== "production" && j(() => {
118
- R.value || "aria-pressed" in V && L.warn("BbButton: `aria-pressed` is managed by the component and your binding is ignored. Bind `v-model` (with `true-value`/`false-value` when the state is not boolean) — that sets `aria-pressed`, applies `bb-button--pressed`, and flips the value on click.");
118
+ ], R = e(), z = g(() => F.value !== void 0), B = g(() => f(F.value, I.trueValue)), { t: V } = o(), H = A(), U = E();
119
+ process.env.NODE_ENV !== "production" && M(() => {
120
+ z.value || "aria-pressed" in H && R.warn("BbButton: `aria-pressed` is managed by the component and your binding is ignored. Bind `v-model` (with `true-value`/`false-value` when the state is not boolean) — that sets `aria-pressed`, applies `bb-button--pressed`, and flips the value on click.");
119
121
  });
120
- let U = (e) => {
121
- H.value = a(e) ?? void 0;
122
- }, W = h(() => {
123
- let { onClick: e, class: t, ...n } = V;
122
+ let W = (e) => {
123
+ U.value = a(e) ?? void 0;
124
+ }, G = g(() => {
125
+ let { onClick: e, class: t, ...n } = H;
124
126
  return n;
125
- }), G = T(0), K = h(() => F.loading || !!G.value && !F.disableAutoLoading), q = n(K), J = t({
127
+ }), K = E(0), q = S(l, null), J = g(() => I.loading || !!K.value && !I.disableAutoLoading || I.type === "submit" && !!q?.locked()), Y = n(J), X = t({
126
128
  component: "BbButton",
127
- attrs: V,
128
- props: F,
129
+ attrs: H,
130
+ props: I,
129
131
  parts: p.parts,
130
132
  states: p.states,
131
133
  active: {
132
- loading: () => K.value,
133
- disabled: () => !!F.disabled,
134
- pressed: () => R.value && z.value
134
+ loading: () => J.value,
135
+ disabled: () => !!I.disabled,
136
+ pressed: () => z.value && B.value
135
137
  }
136
- }), Y = async (e) => {
137
- if (K.value && !F.interactiveWhileLoading) return (F.type === "submit" || F.href || F.to) && e.preventDefault(), null;
138
- if (R.value) {
139
- let e = F.trueValue, t = F.falseValue;
140
- P.value = f(P.value, e) ? t : e;
138
+ }), Z = async (e) => {
139
+ if (J.value && !I.interactiveWhileLoading) return (I.type === "submit" || I.href || I.to) && e.preventDefault(), null;
140
+ if (z.value) {
141
+ let e = I.trueValue, t = I.falseValue;
142
+ F.value = f(F.value, e) ? t : e;
141
143
  }
142
- let t = [V.onClick ?? d].flat(), n = t.map((t) => t(e)), r = n.filter((e) => e && typeof e.then == "function");
144
+ let t = [H.onClick ?? d].flat(), n = t.map((t) => t(e)), r = n.filter((e) => e && typeof e.then == "function");
143
145
  if (!r.length) return n[0];
144
146
  let i = t.length === 1 ? n[0] : Promise.all(r).then(() => {});
145
- G.value++;
147
+ K.value++;
146
148
  try {
147
149
  return await i;
148
150
  } finally {
149
- G.value--;
151
+ K.value--;
150
152
  }
151
- }, X = h(() => {
152
- let e = typeof F.size == "string" ? { default: F.size } : {
153
+ }, ne = g(() => {
154
+ let e = typeof I.size == "string" ? { default: I.size } : {
153
155
  default: "md",
154
- ...F.size
156
+ ...I.size
155
157
  };
156
158
  return Object.fromEntries(Object.entries(e).map(([e, t]) => {
157
159
  let n = t;
158
- return I.includes(t) || (L.warn(`Invalid size: "${t}" in BbButton. Expected one of: ${I.join(", ")}. Falling back to "md".`), n = "md"), [e === "default" ? `bb-button--${n}` : `bb-button--${e}-${n}`, !0];
160
+ return L.includes(t) || (R.warn(`Invalid size: "${t}" in BbButton. Expected one of: ${L.join(", ")}. Falling back to "md".`), n = "md"), [e === "default" ? `bb-button--${n}` : `bb-button--${e}-${n}`, !0];
159
161
  }));
160
- }), Z = /* @__PURE__ */ new Set([
162
+ }), re = /* @__PURE__ */ new Set([
161
163
  "append:icon",
162
164
  "disableAutoLoading",
163
165
  "disabled",
@@ -171,61 +173,72 @@ var N = {
171
173
  "size",
172
174
  "trueValue",
173
175
  "variant"
174
- ]), Q = h(() => ({
175
- ...W.value,
176
- ...u(F, (e, t) => !Z.has(t) && t !== "pt" && !t.startsWith("pt:"))
177
- })), $ = h(() => K.value && !F.interactiveWhileLoading), ee = h(() => C(Q.value, {
178
- "aria-disabled": $.value ? !0 : void 0,
179
- "aria-pressed": R.value ? z.value : void 0,
176
+ ]), ie = g(() => ({
177
+ ...G.value,
178
+ ...u(I, (e, t) => !re.has(t) && t !== "pt" && !t.startsWith("pt:"))
179
+ })), Q = g(() => J.value && !I.interactiveWhileLoading), $ = m(U, g(() => !!I.group && z.value && !("tabindex" in H)), () => [
180
+ B.value,
181
+ I.disabled,
182
+ Q.value
183
+ ]), ae = g(() => {
184
+ let e = Q.value ? -1 : $.tabindex.value;
185
+ return {
186
+ ...Q.value ? { "aria-disabled": !0 } : {},
187
+ ...e === void 0 ? {} : { tabindex: e }
188
+ };
189
+ }), oe = g(() => w(ie.value, {
190
+ ...ae.value,
191
+ "aria-pressed": z.value ? B.value : void 0,
180
192
  class: [
181
193
  "bb-button",
182
- X.value,
194
+ ne.value,
183
195
  {
184
- "bb-button--loading": K.value,
185
- "bb-button--soft-disabled": $.value,
186
- "bb-button--group": F.group,
187
- "bb-button--icon": !!F.icon,
188
- "bb-button--pressed": R.value && z.value,
189
- [`bb-button--${F.variant}`]: F.variant !== "none"
196
+ "bb-button--loading": J.value,
197
+ "bb-button--soft-disabled": Q.value,
198
+ "bb-button--group": I.group,
199
+ "bb-button--icon": !!I.icon,
200
+ "bb-button--pressed": z.value && B.value,
201
+ [`bb-button--${I.variant}`]: I.variant !== "none"
190
202
  }
191
203
  ],
192
- disabled: F.disabled,
193
- tabindex: $.value ? -1 : void 0,
194
- onClick: Y
195
- }, J.root));
196
- return S({ $el: H }), (e, t) => (w(), g(O(o), C({ ref: U }, ee.value), {
197
- default: M(() => [
198
- O(q) ? (w(), g(m, {
204
+ disabled: I.disabled,
205
+ onClick: Z,
206
+ onFocusin: $.onFocusin,
207
+ onKeydown: $.onKeydown
208
+ }, X.root));
209
+ return C({ $el: U }), (e, t) => (T(), _(k(c), w({ ref: W }, oe.value), {
210
+ default: N(() => [
211
+ k(Y) ? (T(), _(h, {
199
212
  key: 0,
200
213
  appear: "",
201
214
  name: "bb-button-spinner"
202
215
  }, {
203
- default: M(() => [K.value ? (w(), g(O(l), C({
216
+ default: N(() => [J.value ? (T(), _(k(ee), w({
204
217
  key: 0,
205
218
  class: "bb-button__spinner"
206
- }, O(J).spinner), null, 16)) : _("", !0)]),
219
+ }, k(X).spinner), null, 16)) : v("", !0)]),
207
220
  _: 1
208
- })) : _("", !0),
209
- F.icon ? (w(), g(c, C({
221
+ })) : v("", !0),
222
+ I.icon ? (T(), _(s, w({
210
223
  key: 1,
211
224
  class: "bb-button__icon",
212
- icon: F.icon
213
- }, O(J).icon), null, 16, ["icon"])) : F["prepend:icon"] ? (w(), g(c, C({
225
+ icon: I.icon
226
+ }, k(X).icon), null, 16, ["icon"])) : I["prepend:icon"] ? (T(), _(s, w({
214
227
  key: 2,
215
228
  class: "bb-button__prepend-icon",
216
- icon: F["prepend:icon"]
217
- }, O(J).icon), null, 16, ["icon"])) : _("", !0),
218
- y("span", C({ class: ["bb-button__text", { "bb-sr-only": !!e.icon }] }, O(J).text), [E(e.$slots, "default", {}, () => [b(D(e.text), 1)])], 16),
219
- K.value ? (w(), v("span", N, D(O(B)("common.loadingText")), 1)) : _("", !0),
220
- !e.icon && F["append:icon"] ? (w(), g(c, C({
229
+ icon: I["prepend:icon"]
230
+ }, k(X).icon), null, 16, ["icon"])) : v("", !0),
231
+ b("span", w({ class: ["bb-button__text", { "bb-sr-only": !!e.icon }] }, k(X).text), [D(e.$slots, "default", {}, () => [te(O(e.text), 1)])], 16),
232
+ J.value ? (T(), y("span", P, O(k(V)("common.loadingText")), 1)) : v("", !0),
233
+ !e.icon && I["append:icon"] ? (T(), _(s, w({
221
234
  key: 4,
222
235
  class: "bb-button__append-icon",
223
- icon: F["append:icon"]
224
- }, O(J).icon), null, 16, ["icon"])) : _("", !0)
236
+ icon: I["append:icon"]
237
+ }, k(X).icon), null, 16, ["icon"])) : v("", !0)
225
238
  ]),
226
239
  _: 3
227
240
  }, 16));
228
241
  }
229
242
  });
230
243
  //#endregion
231
- export { P as default };
244
+ export { F as default };
@@ -0,0 +1,6 @@
1
+ import { Ref } from 'vue';
2
+ export declare function useToggleRoving(el: Ref<HTMLElement | undefined>, engaged: Ref<boolean>, deps: () => unknown): {
3
+ tabindex: import('vue').ComputedRef<0 | -1 | undefined>;
4
+ onFocusin: () => void;
5
+ onKeydown: (event: KeyboardEvent) => void;
6
+ };
@@ -0,0 +1,45 @@
1
+ import { computed as e, nextTick as t, onBeforeUnmount as n, onMounted as r, shallowRef as i, watch as a } from "vue";
2
+ //#region src/components/BbButton/toggleRoving.ts
3
+ var o = ".bb-button--group[aria-pressed]", s = i(0), c = () => t(() => s.value++), l = /* @__PURE__ */ new WeakMap(), u = (e) => {
4
+ if (!e.matches(o)) return [];
5
+ let t = [e];
6
+ for (let n = e.previousElementSibling; n?.matches(o); n = n.previousElementSibling) t.unshift(n);
7
+ for (let n = e.nextElementSibling; n?.matches(o); n = n.nextElementSibling) t.push(n);
8
+ return t;
9
+ }, d = (e) => !e.disabled && e.getAttribute("aria-disabled") !== "true", f = (e) => {
10
+ let t = e.filter(d), n = document.activeElement, r = e[0]?.parentElement && l.get(e[0].parentElement);
11
+ return t.find((e) => e === n) ?? t.find((e) => e === r) ?? t.find((e) => e.getAttribute("aria-pressed") === "true") ?? t[0];
12
+ };
13
+ function p(t, i, o) {
14
+ return a(i, c), a(o, () => i.value && c()), r(() => i.value && c()), n(() => i.value && c()), {
15
+ tabindex: e(() => {
16
+ if (!i.value) return;
17
+ s.value;
18
+ let e = t.value;
19
+ if (!e) return;
20
+ let n = u(e);
21
+ if (!(n.length < 2 || !d(e))) return f(n) === e ? 0 : -1;
22
+ }),
23
+ onFocusin: () => {
24
+ let e = t.value;
25
+ !i.value || !e?.parentElement || (l.set(e.parentElement, e), s.value++);
26
+ },
27
+ onKeydown: (e) => {
28
+ let n = t.value;
29
+ if (!i.value || !n || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || ![
30
+ "ArrowLeft",
31
+ "ArrowRight",
32
+ "Home",
33
+ "End"
34
+ ].includes(e.key)) return;
35
+ let r = u(n);
36
+ if (r.length < 2) return;
37
+ let a = r.filter(d), o = a.indexOf(n);
38
+ if (o === -1) return;
39
+ let s = getComputedStyle(n).direction === "rtl", c = e.key === (s ? "ArrowLeft" : "ArrowRight"), l = e.key === "Home" ? a[0] : e.key === "End" ? a[a.length - 1] : a[(o + (c ? 1 : -1) + a.length) % a.length];
40
+ e.preventDefault(), l?.focus();
41
+ }
42
+ };
43
+ }
44
+ //#endregion
45
+ export { p as useToggleRoving };
@@ -99,7 +99,10 @@ export type BbButtonProps = {
99
99
  */
100
100
  exactActiveClass?: string;
101
101
  /**
102
- * Identifies the button as part of a button group.
102
+ * Identifies the button as part of a button group: adjacent `group`
103
+ * buttons fuse into one segment (shared borders and radius). Adjacent
104
+ * `group` toggles (each with a `v-model`) are also one Tab stop, with
105
+ * ArrowLeft / ArrowRight / Home / End moving between them.
103
106
  */
104
107
  group?: boolean;
105
108
  /**