bitboss-ui 3.0.0-beta.47 → 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 (398) hide show
  1. package/README.md +24 -7
  2. package/bin/bitboss-ui-mcp.mjs +15 -3
  3. package/bin/bitboss-ui.mjs +167 -14
  4. package/dist/ai/BbAccordion.md +1 -1
  5. package/dist/ai/BbAvatar.md +1 -1
  6. package/dist/ai/BbBreadcrumbs.md +65 -65
  7. package/dist/ai/BbButton.md +28 -8
  8. package/dist/ai/BbCheckbox.md +0 -2
  9. package/dist/ai/BbCheckboxGroup.md +13 -20
  10. package/dist/ai/BbCollapsible.md +1 -1
  11. package/dist/ai/BbColorPalette.md +1 -1
  12. package/dist/ai/BbConfirm.md +8 -0
  13. package/dist/ai/BbConfirmPortal.md +1 -1
  14. package/dist/ai/BbDatePickerInput.md +4 -2
  15. package/dist/ai/BbDialog.md +1 -8
  16. package/dist/ai/BbDropdown.md +231 -220
  17. package/dist/ai/BbDropdownButton.md +65 -65
  18. package/dist/ai/BbDropdownGroup.md +2 -2
  19. package/dist/ai/BbDropzone.md +10 -10
  20. package/dist/ai/BbForm.md +43 -52
  21. package/dist/ai/BbHoverCard.md +19 -7
  22. package/dist/ai/BbHoverCardPortal.md +1 -1
  23. package/dist/ai/BbNumberInput.md +88 -21
  24. package/dist/ai/BbPopover.md +47 -40
  25. package/dist/ai/BbPopoverPortal.md +1 -1
  26. package/dist/ai/BbProgress.md +48 -22
  27. package/dist/ai/BbRadioGroup.md +13 -19
  28. package/dist/ai/BbSelect.md +16 -36
  29. package/dist/ai/BbSelectPopover.md +14 -30
  30. package/dist/ai/BbSmoothHeight.md +0 -2
  31. package/dist/ai/BbSwitchGroup.md +13 -20
  32. package/dist/ai/BbTable.md +11 -10
  33. package/dist/ai/BbTabs.md +107 -106
  34. package/dist/ai/BbTabsList.md +2 -2
  35. package/dist/ai/BbTabsPanels.md +1 -1
  36. package/dist/ai/BbTabsRoot.md +3 -3
  37. package/dist/ai/BbTooltip.md +29 -13
  38. package/dist/ai/BbTree.md +14 -11
  39. package/dist/ai/CommonPopover.md +1 -1
  40. package/dist/ai/changelog.json +297 -6
  41. package/dist/ai/components.json +50 -45
  42. package/dist/ai/composables/useBbDropdownContext.md +16 -16
  43. package/dist/ai/composables/useBbFormField.md +5 -1
  44. package/dist/ai/composables/useBbTabsContext.md +14 -14
  45. package/dist/ai/guides/agent-contract.md +27 -27
  46. package/dist/ai/guides/ai-router.md +1 -1
  47. package/dist/ai/guides/component-picker.md +3 -3
  48. package/dist/ai/guides/fetch-items-playbook.md +1 -1
  49. package/dist/ai/guides/icons-policy.md +10 -10
  50. package/dist/ai/guides/inertia-helpers.md +120 -67
  51. package/dist/ai/guides/installation-and-plugin-setup.md +45 -15
  52. package/dist/ai/guides/migration/components/bb-breadcrumbs.md +3 -2
  53. package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -16
  54. package/dist/ai/guides/migration/components/bb-dropdown-button.md +9 -8
  55. package/dist/ai/guides/migration/components/bb-dropdown.md +15 -14
  56. package/dist/ai/guides/migration/components/bb-radio-group.md +2 -1
  57. package/dist/ai/guides/migration/components/bb-select-popover.md +6 -1
  58. package/dist/ai/guides/migration/components/bb-select.md +10 -2
  59. package/dist/ai/guides/migration/components/bb-switch-group.md +2 -1
  60. package/dist/ai/guides/migration/components/bb-tabs.md +9 -8
  61. package/dist/ai/guides/migration/components/bb-tooltip.md +1 -1
  62. package/dist/ai/guides/migration/v2-to-v3.md +143 -28
  63. package/dist/ai/guides/migration/v3-beta-css-classes.md +29 -27
  64. package/dist/ai/guides/migration/v3-beta-tooling.md +11 -0
  65. package/dist/ai/guides/options-items-playbook.md +30 -24
  66. package/dist/ai/guides/passthrough.md +4 -4
  67. package/dist/ai/guides/preset-components.md +18 -3
  68. package/dist/ai/guides/typescript-generic-components.md +1 -1
  69. package/dist/ai/guides/validated-forms.md +11 -22
  70. package/dist/ai/guides/validation-providers.md +4 -3
  71. package/dist/ai/helpers/inertia/manifest.json +636 -0
  72. package/dist/ai/helpers/inertia/types.ts +15 -0
  73. package/dist/ai/helpers/inertia/useAsyncFn.ts +110 -0
  74. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +102 -0
  75. package/dist/ai/helpers/inertia/useDeleteCmd.ts +30 -0
  76. package/dist/ai/helpers/inertia/useHasChanged.ts +36 -0
  77. package/dist/ai/helpers/inertia/useIndexById.ts +23 -0
  78. package/dist/ai/helpers/inertia/useLazyProp.ts +148 -0
  79. package/dist/ai/helpers/inertia/useLazyPropGetter.ts +50 -0
  80. package/dist/ai/helpers/inertia/useLoading.ts +20 -0
  81. package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +88 -0
  82. package/dist/ai/helpers/inertia/usePromiseForm.ts +62 -0
  83. package/dist/ai/helpers/inertia/useProp.ts +63 -0
  84. package/dist/ai/helpers/inertia/useQuery.ts +19 -0
  85. package/dist/ai/helpers/inertia/useQueryObject.ts +116 -0
  86. package/dist/ai/helpers/inertia/useResourceContext.ts +69 -0
  87. package/dist/ai/helpers/inertia/useRouteQuery.ts +54 -0
  88. package/dist/ai/helpers/inertia/useScreenSizes.ts +23 -0
  89. package/dist/ai/helpers/inertia/useTableContext.ts +34 -0
  90. package/dist/ai/helpers/inertia/useTableSelectionContext.ts +48 -0
  91. package/dist/ai/helpers/inertia/useUntil.ts +33 -0
  92. package/dist/ai/helpers/inertia/utils.ts +24 -0
  93. package/dist/ai/index.md +6 -6
  94. package/dist/ai/manifest/components/BbAccordion.json +1 -1
  95. package/dist/ai/manifest/components/BbBreadcrumbs.json +10 -6
  96. package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
  97. package/dist/ai/manifest/components/BbButton.json +2 -1
  98. package/dist/ai/manifest/components/BbButton.tree.json +1 -1
  99. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  100. package/dist/ai/manifest/components/BbCollapsible.json +1 -1
  101. package/dist/ai/manifest/components/BbColorPalette.json +1 -1
  102. package/dist/ai/manifest/components/BbConfirmPortal.json +5 -2
  103. package/dist/ai/manifest/components/BbDropdown.json +23 -20
  104. package/dist/ai/manifest/components/BbDropdown.tree.json +2 -2
  105. package/dist/ai/manifest/components/BbDropdownButton.json +22 -19
  106. package/dist/ai/manifest/components/BbDropdownButton.tree.json +1 -1
  107. package/dist/ai/manifest/components/BbDropdownGroup.json +2 -2
  108. package/dist/ai/manifest/components/BbForm.json +1 -0
  109. package/dist/ai/manifest/components/BbHoverCard.json +1 -1
  110. package/dist/ai/manifest/components/BbHoverCardPortal.json +2 -2
  111. package/dist/ai/manifest/components/BbNumberInput.json +6 -1
  112. package/dist/ai/manifest/components/BbNumberInput.tree.json +2 -1
  113. package/dist/ai/manifest/components/BbPopover.json +2 -1
  114. package/dist/ai/manifest/components/BbPopoverPortal.json +2 -2
  115. package/dist/ai/manifest/components/BbProgress.json +6 -6
  116. package/dist/ai/manifest/components/BbProgress.tree.json +1 -0
  117. package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
  118. package/dist/ai/manifest/components/BbSelect.json +2 -2
  119. package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
  120. package/dist/ai/manifest/components/BbSelectPopover.json +2 -2
  121. package/dist/ai/manifest/components/BbSelectPopover.tree.json +1 -1
  122. package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
  123. package/dist/ai/manifest/components/BbTabs.json +8 -7
  124. package/dist/ai/manifest/components/BbTabsList.json +3 -3
  125. package/dist/ai/manifest/components/BbTabsPanels.json +1 -1
  126. package/dist/ai/manifest/components/BbTabsRoot.json +6 -5
  127. package/dist/ai/manifest/components/BbTag.tree.json +1 -1
  128. package/dist/ai/manifest/components/BbTooltip.json +2 -2
  129. package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
  130. package/dist/ai/manifest/components/CommonPopover.json +1 -1
  131. package/dist/ai/manifest/index.json +2 -2
  132. package/dist/ai/manifest/meta.json +5 -0
  133. package/dist/ai/manifest/types.advanced.json +10 -9
  134. package/dist/ai/manifest/types.api.json +8 -5
  135. package/dist/ai/manifest/types.wrapper.json +1 -0
  136. package/dist/ai/recipes/inertia/approvals-inbox.md +16 -18
  137. package/dist/ai/recipes/inertia/inline-edit-workspace.md +23 -33
  138. package/dist/ai/recipes/inertia/layout-scaffold.md +16 -16
  139. package/dist/ai/recipes/inertia/onboarding.md +6 -10
  140. package/dist/ai/recipes/inertia/ownership-atlas.md +15 -18
  141. package/dist/ai/recipes/inertia/record-form.md +11 -11
  142. package/dist/ai/recipes/inertia/records-workspace.md +38 -41
  143. package/dist/ai/recipes/inertia/settings-workspace.md +26 -38
  144. package/dist/ai/recipes/inertia/upload-center.md +31 -39
  145. package/dist/ai/recipes/inertia/wizard-form.md +10 -19
  146. package/dist/ai/recipes/nuxt/approvals-inbox.md +7 -8
  147. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +14 -24
  148. package/dist/ai/recipes/nuxt/layout-scaffold.md +16 -16
  149. package/dist/ai/recipes/nuxt/onboarding.md +2 -6
  150. package/dist/ai/recipes/nuxt/ownership-atlas.md +7 -9
  151. package/dist/ai/recipes/nuxt/record-form.md +5 -5
  152. package/dist/ai/recipes/nuxt/records-workspace.md +29 -31
  153. package/dist/ai/recipes/nuxt/settings-workspace.md +22 -34
  154. package/dist/ai/recipes/nuxt/upload-center.md +22 -29
  155. package/dist/ai/recipes/nuxt/wizard-form.md +3 -11
  156. package/dist/ai/recipes/vue/approvals-inbox.md +7 -8
  157. package/dist/ai/recipes/vue/inline-edit-workspace.md +14 -24
  158. package/dist/ai/recipes/vue/layout-scaffold.md +16 -16
  159. package/dist/ai/recipes/vue/onboarding.md +2 -6
  160. package/dist/ai/recipes/vue/ownership-atlas.md +7 -9
  161. package/dist/ai/recipes/vue/record-form.md +5 -5
  162. package/dist/ai/recipes/vue/records-workspace.md +29 -31
  163. package/dist/ai/recipes/vue/settings-workspace.md +22 -34
  164. package/dist/ai/recipes/vue/upload-center.md +22 -29
  165. package/dist/ai/recipes/vue/wizard-form.md +3 -11
  166. package/dist/ai/source/BbAccordion.md +1 -1
  167. package/dist/ai/source/BbAlert.md +3 -3
  168. package/dist/ai/source/BbBadge.md +14 -10
  169. package/dist/ai/source/BbBadgeButton.md +17 -12
  170. package/dist/ai/source/BbBaseButton.md +1 -1
  171. package/dist/ai/source/BbBaseRadioIcon.md +1 -0
  172. package/dist/ai/source/BbBaseSwitchIcon.md +1 -0
  173. package/dist/ai/source/BbBreadcrumbs.md +63 -42
  174. package/dist/ai/source/BbButton.md +84 -38
  175. package/dist/ai/source/BbCalendar.md +17 -16
  176. package/dist/ai/source/BbCheckbox.md +3 -2
  177. package/dist/ai/source/BbCheckboxGroup.md +11 -4
  178. package/dist/ai/source/BbCollapsible.md +2 -1
  179. package/dist/ai/source/BbColorInput.md +10 -9
  180. package/dist/ai/source/BbColorPalette.md +2 -1
  181. package/dist/ai/source/BbConfirm.md +18 -1
  182. package/dist/ai/source/BbConfirmPortal.md +20 -6
  183. package/dist/ai/source/BbDatePicker.md +2 -2
  184. package/dist/ai/source/BbDatePickerInput.md +47 -20
  185. package/dist/ai/source/BbDialog.md +5 -5
  186. package/dist/ai/source/BbDropdown.md +231 -158
  187. package/dist/ai/source/BbDropdownButton.md +19 -12
  188. package/dist/ai/source/BbDropdownGroup.md +127 -93
  189. package/dist/ai/source/BbForm.md +25 -1
  190. package/dist/ai/source/BbHoverCard.md +30 -3
  191. package/dist/ai/source/BbHoverCardPortal.md +18 -3
  192. package/dist/ai/source/BbIndicator.md +4 -0
  193. package/dist/ai/source/BbNumberInput.md +855 -19
  194. package/dist/ai/source/BbOffCanvas.md +27 -11
  195. package/dist/ai/source/BbPagination.md +3 -3
  196. package/dist/ai/source/BbPopover.md +185 -12
  197. package/dist/ai/source/BbPopoverPortal.md +30 -3
  198. package/dist/ai/source/BbProgress.md +82 -18
  199. package/dist/ai/source/BbRadioGroup.md +12 -5
  200. package/dist/ai/source/BbRating.md +11 -9
  201. package/dist/ai/source/BbSelect.md +16 -10
  202. package/dist/ai/source/BbSelectPopover.md +29 -23
  203. package/dist/ai/source/BbSlider.md +12 -6
  204. package/dist/ai/source/BbSwitch.md +3 -2
  205. package/dist/ai/source/BbSwitchGroup.md +5 -2
  206. package/dist/ai/source/BbTable.md +102 -18
  207. package/dist/ai/source/BbTabs.md +30 -24
  208. package/dist/ai/source/BbTabsList.md +29 -23
  209. package/dist/ai/source/BbTabsPanels.md +29 -23
  210. package/dist/ai/source/BbTabsRoot.md +28 -22
  211. package/dist/ai/source/BbTag.md +10 -9
  212. package/dist/ai/source/BbTextInput.md +5 -4
  213. package/dist/ai/source/BbTextarea.md +6 -5
  214. package/dist/ai/source/BbTimePicker.md +1 -1
  215. package/dist/ai/source/BbTimePickerInput.md +46 -9
  216. package/dist/ai/source/BbToast.md +10 -7
  217. package/dist/ai/source/BbToastPortal.md +10 -7
  218. package/dist/ai/source/BbTooltip.md +88 -11
  219. package/dist/ai/source/BbTree.md +21 -3
  220. package/dist/ai/source/CommonField.md +6 -4
  221. package/dist/ai/source/CommonFieldInput.md +15 -10
  222. package/dist/ai/source/CommonPopover.md +8 -1
  223. package/dist/ai/source/CommonTimeSelector.md +5 -4
  224. package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +10 -8
  225. package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +8 -8
  226. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +45 -45
  227. package/dist/components/BbBreadcrumbs/types.d.ts +25 -17
  228. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +88 -70
  229. package/dist/components/BbButton/toggleRoving.d.ts +6 -0
  230. package/dist/components/BbButton/toggleRoving.js +45 -0
  231. package/dist/components/BbButton/types.d.ts +12 -4
  232. package/dist/components/BbButton/types.js +5 -1
  233. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +178 -178
  234. package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +15 -15
  235. package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +28 -28
  236. package/dist/components/BbCalendar/useCalendarGrid.js +141 -139
  237. package/dist/components/BbCalendar/useDayjsLocale.d.ts +38 -15
  238. package/dist/components/BbCalendar/useDayjsLocale.js +31 -30
  239. package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +48 -48
  240. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +81 -80
  241. package/dist/components/BbCheckboxGroup/types.d.ts +6 -2
  242. package/dist/components/BbCollapsible/types.d.ts +2 -1
  243. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +69 -69
  244. package/dist/components/BbColorPalette/types.d.ts +2 -1
  245. package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -5
  246. package/dist/components/BbConfirm/types.d.ts +15 -0
  247. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +363 -349
  248. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +91 -86
  249. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +298 -289
  250. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +322 -356
  251. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +17 -15
  252. package/dist/components/BbDropdown/DropdownRow.vue.d.ts +40 -0
  253. package/dist/components/BbDropdown/DropdownRow.vue.js +5 -0
  254. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +60 -0
  255. package/dist/components/BbDropdown/normalizeGroups.d.ts +8 -2
  256. package/dist/components/BbDropdown/normalizeGroups.js +60 -46
  257. package/dist/components/BbDropdown/types.d.ts +120 -88
  258. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +11 -2
  259. package/dist/components/BbDropdownButton/types.d.ts +2 -2
  260. package/dist/components/BbForm/BbForm.vue.d.ts +9 -0
  261. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +114 -105
  262. package/dist/components/BbForm/BbFormCustomField.js +1 -1
  263. package/dist/components/BbForm/bindFormField.js +2 -1
  264. package/dist/components/BbForm/formFields.d.ts +5 -0
  265. package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +145 -142
  266. package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -2
  267. package/dist/components/BbHoverCard/types.d.ts +14 -1
  268. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +0 -1
  269. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +452 -125
  270. package/dist/components/BbNumberInput/numberDisplay.d.ts +256 -0
  271. package/dist/components/BbNumberInput/numberDisplay.js +499 -0
  272. package/dist/components/BbNumberInput/types.d.ts +54 -1
  273. package/dist/components/BbNumberInput/warroom/corpus.d.ts +58 -0
  274. package/dist/components/BbNumberInput/warroom/currency-verify.rows.d.ts +28 -0
  275. package/dist/components/BbNumberInput/warroom/currency.rows.d.ts +2 -0
  276. package/dist/components/BbNumberInput/warroom/harness.d.ts +217 -0
  277. package/dist/components/BbNumberInput/warroom/oracle.d.ts +150 -0
  278. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +7 -7
  279. package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -0
  280. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +207 -162
  281. package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -2
  282. package/dist/components/BbPopover/types.d.ts +26 -1
  283. package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +15 -7
  284. package/dist/components/BbProgress/types.d.ts +23 -7
  285. package/dist/components/BbProgress/types.js +1 -1
  286. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +102 -101
  287. package/dist/components/BbRadioGroup/types.d.ts +6 -2
  288. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +63 -63
  289. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +156 -154
  290. package/dist/components/BbSelect/types.d.ts +6 -2
  291. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +2 -1
  292. package/dist/components/BbSelectPopover/types.d.ts +6 -2
  293. package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +153 -153
  294. package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +62 -62
  295. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +131 -130
  296. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +711 -676
  297. package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +1 -1
  298. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +1 -1
  299. package/dist/components/BbTabs/types.d.ts +28 -22
  300. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +76 -76
  301. package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +58 -58
  302. package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +82 -82
  303. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +246 -236
  304. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +99 -86
  305. package/dist/components/BbTooltip/tooltipWarmup.d.ts +23 -0
  306. package/dist/components/BbTooltip/tooltipWarmup.js +7 -0
  307. package/dist/components/BbTooltip/types.d.ts +10 -3
  308. package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +29 -21
  309. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +10 -7
  310. package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +37 -36
  311. package/dist/components/CommonPopover/types.d.ts +2 -1
  312. package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +9 -9
  313. package/dist/composables/formSubmitLock.d.ts +6 -0
  314. package/dist/composables/formSubmitLock.js +4 -0
  315. package/dist/composables/useBaseOptions.d.ts +7 -1
  316. package/dist/composables/useBaseOptions.js +32 -32
  317. package/dist/composables/useBbDropdownContext.d.ts +8 -8
  318. package/dist/composables/useBbFormField.d.ts +9 -0
  319. package/dist/composables/useBbFormField.js +5 -3
  320. package/dist/composables/useBbTabsContext.d.ts +10 -10
  321. package/dist/composables/useBbTabsContext.js +18 -18
  322. package/dist/composables/useFormBinding.d.ts +11 -0
  323. package/dist/composables/useFormBinding.js +15 -13
  324. package/dist/composables/useItemText.d.ts +5 -1
  325. package/dist/composables/useItemText.js +8 -3
  326. package/dist/composables/useItemValue.d.ts +5 -1
  327. package/dist/composables/useItemValue.js +8 -3
  328. package/dist/composables/useLocale.js +10 -9
  329. package/dist/deprecation/ai-deprecations.json.d.ts +130 -0
  330. package/dist/deprecation/ai-deprecations.json.js +1 -1
  331. package/dist/deprecation/removedProps.js +1 -1
  332. package/dist/directives/bbDropdown.js +1 -1
  333. package/dist/directives/directivePortal.d.ts +13 -7
  334. package/dist/directives/directivePortal.js +1 -4
  335. package/dist/i18n/index.d.ts +7 -12
  336. package/dist/i18n/locales/cs.json +11 -14
  337. package/dist/i18n/locales/da.json +13 -16
  338. package/dist/i18n/locales/de-CH.json +137 -0
  339. package/dist/i18n/locales/de.json +14 -17
  340. package/dist/i18n/locales/el.json +10 -13
  341. package/dist/i18n/locales/en-GB.json +137 -0
  342. package/dist/i18n/locales/en.json +8 -11
  343. package/dist/i18n/locales/es-MX.json +137 -0
  344. package/dist/i18n/locales/es.json +16 -19
  345. package/dist/i18n/locales/fi.json +8 -11
  346. package/dist/i18n/locales/fr.json +23 -26
  347. package/dist/i18n/locales/hu.json +8 -11
  348. package/dist/i18n/locales/it.json +12 -15
  349. package/dist/i18n/locales/ja.json +13 -16
  350. package/dist/i18n/locales/ko.json +10 -13
  351. package/dist/i18n/locales/nb.json +13 -16
  352. package/dist/i18n/locales/nl.json +21 -24
  353. package/dist/i18n/locales/pl.json +10 -13
  354. package/dist/i18n/locales/{pt.json → pt-BR.json} +19 -22
  355. package/dist/i18n/locales/pt-PT.json +137 -0
  356. package/dist/i18n/locales/ro.json +22 -25
  357. package/dist/i18n/locales/ru.json +11 -14
  358. package/dist/i18n/locales/sv.json +16 -19
  359. package/dist/i18n/locales/tr.json +14 -17
  360. package/dist/i18n/locales/uk.json +11 -14
  361. package/dist/i18n/locales/{zh-cn.json → zh-CN.json} +10 -13
  362. package/dist/i18n/locales/zh-HK.json +137 -0
  363. package/dist/i18n/locales/zh-TW.json +137 -0
  364. package/dist/i18n/regionHints.d.ts +16 -0
  365. package/dist/i18n/regionHints.js +49 -0
  366. package/dist/i18n/regions.d.ts +286 -0
  367. package/dist/i18n/regions.js +265 -0
  368. package/dist/index.d.ts +4 -4
  369. package/dist/index.js +4 -4
  370. package/dist/llms-full.txt +1914 -1714
  371. package/dist/llms-medium.txt +76 -46
  372. package/dist/llms.txt +7 -7
  373. package/dist/locale-blueprint.json +16 -13
  374. package/dist/styles.css +2 -2
  375. package/dist/types/passthrough.d.ts +1 -1
  376. package/dist/types/ptComponentMap.d.ts +2 -2
  377. package/dist/utilities/functions/slotKey.d.ts +2 -2
  378. package/dist/utils/versionCheck.js +1 -1
  379. package/dist/vite-plugin.d.ts +22 -19
  380. package/dist/vite.js +309 -297
  381. package/llms.txt +7 -7
  382. package/package.json +5 -3
  383. package/scripts/lib/agent-manifest.mjs +2 -1
  384. package/scripts/lib/eslint-disable.mjs +17 -4
  385. package/scripts/lib/eslint-plugin.d.ts +9 -1
  386. package/scripts/lib/eslint-plugin.mjs +256 -6
  387. package/scripts/lib/helper-canon.mjs +176 -0
  388. package/scripts/lib/helpers-add.mjs +1303 -0
  389. package/scripts/lib/local-components.mjs +33 -4
  390. package/scripts/lib/locale-check.mjs +165 -0
  391. package/scripts/lib/portal-names.mjs +458 -0
  392. package/scripts/lib/redundant-item-accessor.mjs +398 -0
  393. package/scripts/lib/renamed-item-field.mjs +343 -0
  394. package/scripts/lib/slot-key.mjs +2 -2
  395. package/scripts/lib/slot-renames.mjs +1 -1
  396. package/scripts/lib/unimported-components.mjs +5 -2
  397. package/scripts/lib/validate-bb-markup.mjs +123 -56
  398. 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,35 +4,41 @@ 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": {},
27
29
  "pt:text": {},
28
30
  "pt:root:loading": {},
29
31
  "pt:root:disabled": {},
32
+ "pt:root:pressed": {},
30
33
  "pt:icon:loading": {},
31
34
  "pt:icon:disabled": {},
35
+ "pt:icon:pressed": {},
32
36
  "pt:spinner:loading": {},
33
37
  "pt:spinner:disabled": {},
38
+ "pt:spinner:pressed": {},
34
39
  "pt:text:loading": {},
35
40
  "pt:text:disabled": {},
41
+ "pt:text:pressed": {},
36
42
  pt: {},
37
43
  disableAutoLoading: { type: Boolean },
38
44
  activeClass: {},
@@ -99,60 +105,61 @@ var N = {
99
105
  modelModifiers: {}
100
106
  }),
101
107
  emits: ["update:modelValue"],
102
- setup(x, { expose: S }) {
103
- let P = A(x, "modelValue"), F = x;
108
+ setup(x, { expose: C }) {
109
+ let F = j(x, "modelValue"), I = x;
104
110
  process.env.NODE_ENV !== "production" && i("BbButton", r("BbButton"));
105
- let I = [
111
+ let L = [
106
112
  "xs",
107
113
  "sm",
108
114
  "md",
109
115
  "lg",
110
116
  "xl",
111
117
  "2xl"
112
- ], L = e(), R = h(() => P.value !== void 0), z = h(() => f(P.value, F.trueValue)), { t: B } = s(), V = k(), H = T();
113
- process.env.NODE_ENV !== "production" && j(() => {
114
- 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--active`, 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.");
115
121
  });
116
- let U = (e) => {
117
- H.value = a(e) ?? void 0;
118
- }, W = h(() => {
119
- 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;
120
126
  return n;
121
- }), 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({
122
128
  component: "BbButton",
123
- attrs: V,
124
- props: F,
129
+ attrs: H,
130
+ props: I,
125
131
  parts: p.parts,
126
132
  states: p.states,
127
133
  active: {
128
- loading: () => K.value,
129
- disabled: () => !!F.disabled
134
+ loading: () => J.value,
135
+ disabled: () => !!I.disabled,
136
+ pressed: () => z.value && B.value
130
137
  }
131
- }), Y = async (e) => {
132
- if (K.value && !F.interactiveWhileLoading) return (F.type === "submit" || F.href || F.to) && e.preventDefault(), null;
133
- if (R.value) {
134
- let e = F.trueValue, t = F.falseValue;
135
- 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;
136
143
  }
137
- 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");
138
145
  if (!r.length) return n[0];
139
146
  let i = t.length === 1 ? n[0] : Promise.all(r).then(() => {});
140
- G.value++;
147
+ K.value++;
141
148
  try {
142
149
  return await i;
143
150
  } finally {
144
- G.value--;
151
+ K.value--;
145
152
  }
146
- }, X = h(() => {
147
- let e = typeof F.size == "string" ? { default: F.size } : {
153
+ }, ne = g(() => {
154
+ let e = typeof I.size == "string" ? { default: I.size } : {
148
155
  default: "md",
149
- ...F.size
156
+ ...I.size
150
157
  };
151
158
  return Object.fromEntries(Object.entries(e).map(([e, t]) => {
152
159
  let n = t;
153
- 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];
154
161
  }));
155
- }), Z = /* @__PURE__ */ new Set([
162
+ }), re = /* @__PURE__ */ new Set([
156
163
  "append:icon",
157
164
  "disableAutoLoading",
158
165
  "disabled",
@@ -166,61 +173,72 @@ var N = {
166
173
  "size",
167
174
  "trueValue",
168
175
  "variant"
169
- ]), Q = h(() => ({
170
- ...W.value,
171
- ...u(F, (e, t) => !Z.has(t) && t !== "pt" && !t.startsWith("pt:"))
172
- })), $ = h(() => K.value && !F.interactiveWhileLoading), ee = h(() => C(Q.value, {
173
- "aria-disabled": $.value ? !0 : void 0,
174
- "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,
175
192
  class: [
176
193
  "bb-button",
177
- X.value,
194
+ ne.value,
178
195
  {
179
- "bb-button--loading": K.value,
180
- "bb-button--soft-disabled": $.value,
181
- "bb-button--group": F.group,
182
- "bb-button--icon": !!F.icon,
183
- "bb-button--active": R.value && z.value,
184
- [`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"
185
202
  }
186
203
  ],
187
- disabled: F.disabled,
188
- tabindex: $.value ? -1 : void 0,
189
- onClick: Y
190
- }, J.root));
191
- return S({ $el: H }), (e, t) => (w(), g(O(o), C({ ref: U }, ee.value), {
192
- default: M(() => [
193
- 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, {
194
212
  key: 0,
195
213
  appear: "",
196
214
  name: "bb-button-spinner"
197
215
  }, {
198
- default: M(() => [K.value ? (w(), g(O(l), C({
216
+ default: N(() => [J.value ? (T(), _(k(ee), w({
199
217
  key: 0,
200
218
  class: "bb-button__spinner"
201
- }, O(J).spinner), null, 16)) : _("", !0)]),
219
+ }, k(X).spinner), null, 16)) : v("", !0)]),
202
220
  _: 1
203
- })) : _("", !0),
204
- F.icon ? (w(), g(c, C({
221
+ })) : v("", !0),
222
+ I.icon ? (T(), _(s, w({
205
223
  key: 1,
206
224
  class: "bb-button__icon",
207
- icon: F.icon
208
- }, 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({
209
227
  key: 2,
210
228
  class: "bb-button__prepend-icon",
211
- icon: F["prepend:icon"]
212
- }, O(J).icon), null, 16, ["icon"])) : _("", !0),
213
- 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),
214
- K.value ? (w(), v("span", N, D(O(B)("common.loadingText")), 1)) : _("", !0),
215
- !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({
216
234
  key: 4,
217
235
  class: "bb-button__append-icon",
218
- icon: F["append:icon"]
219
- }, O(J).icon), null, 16, ["icon"])) : _("", !0)
236
+ icon: I["append:icon"]
237
+ }, k(X).icon), null, 16, ["icon"])) : v("", !0)
220
238
  ]),
221
239
  _: 3
222
240
  }, 16));
223
241
  }
224
242
  });
225
243
  //#endregion
226
- 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 };