bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.65

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 (396) hide show
  1. package/README.md +25 -20
  2. package/bin/bitboss-ui.mjs +73 -7
  3. package/dist/ai/BbAlert.md +10 -1
  4. package/dist/ai/BbBadge.md +35 -3
  5. package/dist/ai/BbBadgeButton.md +4 -2
  6. package/dist/ai/BbBaseButton.md +9 -3
  7. package/dist/ai/BbBreadcrumbs.md +2 -2
  8. package/dist/ai/BbButton.md +113 -8
  9. package/dist/ai/BbCheckbox.md +1 -1
  10. package/dist/ai/BbCheckboxGroup.md +94 -6
  11. package/dist/ai/BbColorInput.md +4 -1
  12. package/dist/ai/BbColorPalette.md +2 -1
  13. package/dist/ai/BbConfirm.md +7 -3
  14. package/dist/ai/BbDatePicker.md +2 -1
  15. package/dist/ai/BbDatePickerInput.md +4 -1
  16. package/dist/ai/BbDialog.md +12 -11
  17. package/dist/ai/BbDropdown.md +189 -38
  18. package/dist/ai/BbDropdownButton.md +27 -7
  19. package/dist/ai/BbForm.md +55 -22
  20. package/dist/ai/BbHost.md +2 -2
  21. package/dist/ai/BbHoverCard.md +7 -3
  22. package/dist/ai/BbIcon.md +12 -6
  23. package/dist/ai/BbIndicator.md +11 -1
  24. package/dist/ai/BbNumberInput.md +4 -1
  25. package/dist/ai/BbOffCanvas.md +37 -3
  26. package/dist/ai/BbPopover.md +2 -1
  27. package/dist/ai/BbRadio.md +1 -1
  28. package/dist/ai/BbRadioGroup.md +102 -10
  29. package/dist/ai/BbSelect.md +52 -17
  30. package/dist/ai/BbSelectPopover.md +93 -26
  31. package/dist/ai/BbSwitch.md +1 -1
  32. package/dist/ai/BbSwitchGroup.md +30 -3
  33. package/dist/ai/BbTable.md +17 -10
  34. package/dist/ai/BbTabs.md +8 -3
  35. package/dist/ai/BbTabsList.md +4 -1
  36. package/dist/ai/BbTag.md +5 -2
  37. package/dist/ai/BbTextInput.md +4 -1
  38. package/dist/ai/BbTextarea.md +4 -1
  39. package/dist/ai/BbTimePicker.md +2 -1
  40. package/dist/ai/BbTimePickerInput.md +4 -1
  41. package/dist/ai/BbToast.md +9 -3
  42. package/dist/ai/BbTooltip.md +71 -9
  43. package/dist/ai/ChipsBox.md +1 -1
  44. package/dist/ai/CommonField.md +1 -1
  45. package/dist/ai/OptionsContainer.md +42 -0
  46. package/dist/ai/changelog.json +494 -6
  47. package/dist/ai/components.json +50 -48
  48. package/dist/ai/composables/useBbConfig.md +8 -1
  49. package/dist/ai/composables/useConfirm.md +39 -1
  50. package/dist/ai/design-tokens.json +6 -6
  51. package/dist/ai/guides/agent-contract.md +2 -2
  52. package/dist/ai/guides/ai-router.md +24 -23
  53. package/dist/ai/guides/app-layout.md +5 -0
  54. package/dist/ai/guides/component-picker.md +9 -2
  55. package/dist/ai/guides/design-language.md +24 -24
  56. package/dist/ai/guides/design-tokens.md +15 -8
  57. package/dist/ai/guides/icons-policy.md +9 -2
  58. package/dist/ai/guides/inertia-helpers.md +1183 -301
  59. package/dist/ai/guides/installation-and-plugin-setup.md +12 -2
  60. package/dist/ai/guides/migration/adoption-checklist.md +235 -0
  61. package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -15
  62. package/dist/ai/guides/migration/components/bb-dialog.md +9 -9
  63. package/dist/ai/guides/migration/components/bb-dropdown.md +7 -2
  64. package/dist/ai/guides/migration/components/bb-popover.md +4 -2
  65. package/dist/ai/guides/migration/components/bb-select.md +19 -0
  66. package/dist/ai/guides/migration/components/bb-table.md +1 -0
  67. package/dist/ai/guides/migration/components/bb-toast.md +4 -0
  68. package/dist/ai/guides/migration/components/bb-tooltip.md +15 -12
  69. package/dist/ai/guides/migration/components/use-confirm.md +25 -2
  70. package/dist/ai/guides/migration/v2-to-v3.md +211 -9
  71. package/dist/ai/guides/migration/v3-beta-css-classes.md +7 -3
  72. package/dist/ai/guides/options-items-playbook.md +2 -1
  73. package/dist/ai/guides/passthrough.md +149 -85
  74. package/dist/ai/guides/preset-components.md +140 -15
  75. package/dist/ai/helpers/definePreset.json +7 -0
  76. package/dist/ai/helpers/definePreset.ts +123 -11
  77. package/dist/ai/helpers/inertia/manifest.json +151 -62
  78. package/dist/ai/helpers/inertia/messages.ts +33 -0
  79. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +120 -20
  80. package/dist/ai/helpers/inertia/useHasChanged.ts +34 -16
  81. package/dist/ai/helpers/inertia/useLazyProp.ts +102 -36
  82. package/dist/ai/helpers/inertia/useLazyPropGetter.ts +3 -1
  83. package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +154 -34
  84. package/dist/ai/helpers/inertia/usePromiseForm.ts +121 -14
  85. package/dist/ai/helpers/inertia/useQuery.ts +133 -11
  86. package/dist/ai/helpers/inertia/useQueryObject.ts +74 -67
  87. package/dist/ai/helpers/inertia/useResourceContext.ts +60 -14
  88. package/dist/ai/helpers/inertia/useRouteQuery.ts +38 -27
  89. package/dist/ai/helpers/inertia/useScreenSizes.ts +9 -7
  90. package/dist/ai/helpers/inertia/useTableContext.ts +5 -2
  91. package/dist/ai/helpers/inertia/utils.ts +14 -0
  92. package/dist/ai/index.md +1 -0
  93. package/dist/ai/manifest/common.json +0 -1
  94. package/dist/ai/manifest/components/BbAlert.json +7 -2
  95. package/dist/ai/manifest/components/BbBadge.json +13 -4
  96. package/dist/ai/manifest/components/BbBadge.tree.json +2 -0
  97. package/dist/ai/manifest/components/BbBadgeButton.json +4 -2
  98. package/dist/ai/manifest/components/BbBaseButton.json +4 -2
  99. package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
  100. package/dist/ai/manifest/components/BbButton.json +14 -3
  101. package/dist/ai/manifest/components/BbButton.tree.json +5 -1
  102. package/dist/ai/manifest/components/BbCheckboxGroup.json +13 -8
  103. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +11 -1
  104. package/dist/ai/manifest/components/BbColorInput.json +18 -15
  105. package/dist/ai/manifest/components/BbColorPalette.json +1 -1
  106. package/dist/ai/manifest/components/BbConfirm.json +4 -2
  107. package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
  108. package/dist/ai/manifest/components/BbDatePicker.json +1 -1
  109. package/dist/ai/manifest/components/BbDatePickerInput.json +17 -14
  110. package/dist/ai/manifest/components/BbDialog.tree.json +2 -1
  111. package/dist/ai/manifest/components/BbDropdown.json +24 -19
  112. package/dist/ai/manifest/components/BbDropdown.tree.json +9 -2
  113. package/dist/ai/manifest/components/BbDropdownButton.json +33 -20
  114. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -2
  115. package/dist/ai/manifest/components/BbForm.json +2 -2
  116. package/dist/ai/manifest/components/BbHost.tree.json +1 -1
  117. package/dist/ai/manifest/components/BbHoverCard.json +1 -1
  118. package/dist/ai/manifest/components/BbIndicator.json +8 -2
  119. package/dist/ai/manifest/components/BbNumberInput.json +5 -2
  120. package/dist/ai/manifest/components/BbOffCanvas.json +2 -2
  121. package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
  122. package/dist/ai/manifest/components/BbPopover.json +1 -1
  123. package/dist/ai/manifest/components/BbRadioGroup.json +17 -12
  124. package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -1
  125. package/dist/ai/manifest/components/BbSelect.json +21 -18
  126. package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
  127. package/dist/ai/manifest/components/BbSelectPopover.json +10 -10
  128. package/dist/ai/manifest/components/BbSelectPopover.tree.json +3 -2
  129. package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
  130. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -1
  131. package/dist/ai/manifest/components/BbTable.tree.json +14 -1
  132. package/dist/ai/manifest/components/BbTabs.json +9 -6
  133. package/dist/ai/manifest/components/BbTabs.tree.json +1 -1
  134. package/dist/ai/manifest/components/BbTabsList.json +6 -3
  135. package/dist/ai/manifest/components/BbTag.json +19 -16
  136. package/dist/ai/manifest/components/BbTag.tree.json +1 -1
  137. package/dist/ai/manifest/components/BbTextInput.json +6 -3
  138. package/dist/ai/manifest/components/BbTextarea.json +6 -3
  139. package/dist/ai/manifest/components/BbTimePicker.json +1 -1
  140. package/dist/ai/manifest/components/BbTimePickerInput.json +10 -7
  141. package/dist/ai/manifest/components/BbToast.json +7 -2
  142. package/dist/ai/manifest/components/BbToast.tree.json +4 -2
  143. package/dist/ai/manifest/components/BbTooltip.json +6 -5
  144. package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
  145. package/dist/ai/manifest/components/CommonField.json +1 -1
  146. package/dist/ai/manifest/components/OptionsContainer.json +3 -1
  147. package/dist/ai/manifest/components/OptionsContainer.tree.json +38 -0
  148. package/dist/ai/manifest/index.json +3 -3
  149. package/dist/ai/manifest/meta.json +5 -3
  150. package/dist/ai/manifest/types.advanced.json +5 -2
  151. package/dist/ai/manifest/types.api.json +9 -7
  152. package/dist/ai/recipes/inertia/approvals-inbox.md +1 -1
  153. package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
  154. package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
  155. package/dist/ai/recipes/inertia/ownership-atlas.md +1 -1
  156. package/dist/ai/recipes/inertia/records-workspace.md +50 -14
  157. package/dist/ai/recipes/inertia/upload-center.md +1 -1
  158. package/dist/ai/recipes/nuxt/layout-scaffold.md +19 -6
  159. package/dist/ai/recipes/nuxt/records-workspace.md +42 -12
  160. package/dist/ai/recipes/vue/layout-scaffold.md +19 -6
  161. package/dist/ai/recipes/vue/records-workspace.md +42 -12
  162. package/dist/ai/source/BbAlert.md +94 -76
  163. package/dist/ai/source/BbBadge.md +174 -72
  164. package/dist/ai/source/BbBadgeButton.md +130 -65
  165. package/dist/ai/source/BbBaseButton.md +46 -124
  166. package/dist/ai/source/BbBaseCheckboxIcon.md +38 -0
  167. package/dist/ai/source/BbBaseRadioIcon.md +18 -0
  168. package/dist/ai/source/BbBaseSwitchIcon.md +51 -0
  169. package/dist/ai/source/BbButton.md +153 -36
  170. package/dist/ai/source/BbCheckboxGroup.md +142 -18
  171. package/dist/ai/source/BbColorInput.md +240 -204
  172. package/dist/ai/source/BbColorPalette.md +7 -4
  173. package/dist/ai/source/BbConfirm.md +34 -11
  174. package/dist/ai/source/BbConfirmPortal.md +24 -9
  175. package/dist/ai/source/BbDatePicker.md +11 -7
  176. package/dist/ai/source/BbDatePickerInput.md +306 -269
  177. package/dist/ai/source/BbDialog.md +49 -14
  178. package/dist/ai/source/BbDropdown.md +314 -197
  179. package/dist/ai/source/BbDropdownButton.md +197 -31
  180. package/dist/ai/source/BbDropdownGroup.md +274 -176
  181. package/dist/ai/source/BbForm.md +50 -6
  182. package/dist/ai/source/BbHoverCard.md +12 -5
  183. package/dist/ai/source/BbIcon.md +4 -3
  184. package/dist/ai/source/BbIndicator.md +73 -52
  185. package/dist/ai/source/BbNumberInput.md +293 -257
  186. package/dist/ai/source/BbOffCanvas.md +55 -29
  187. package/dist/ai/source/BbPopover.md +14 -10
  188. package/dist/ai/source/BbRadioGroup.md +413 -297
  189. package/dist/ai/source/BbSelect.md +549 -435
  190. package/dist/ai/source/BbSelectPopover.md +153 -34
  191. package/dist/ai/source/BbSwitchGroup.md +70 -10
  192. package/dist/ai/source/BbTable.md +369 -37
  193. package/dist/ai/source/BbTabs.md +115 -39
  194. package/dist/ai/source/BbTabsList.md +106 -38
  195. package/dist/ai/source/BbTabsPanels.md +96 -36
  196. package/dist/ai/source/BbTabsRoot.md +96 -36
  197. package/dist/ai/source/BbTag.md +267 -233
  198. package/dist/ai/source/BbTextInput.md +261 -225
  199. package/dist/ai/source/BbTextarea.md +251 -215
  200. package/dist/ai/source/BbTimePicker.md +11 -7
  201. package/dist/ai/source/BbTimePickerInput.md +257 -220
  202. package/dist/ai/source/BbToast.md +73 -32
  203. package/dist/ai/source/BbToastPortal.md +65 -30
  204. package/dist/ai/source/BbTooltip.md +148 -113
  205. package/dist/ai/source/CommonPopover.md +6 -1
  206. package/dist/ai/source/FlatListBox.md +19 -9
  207. package/dist/ai/source/GroupedListBox.md +19 -9
  208. package/dist/ai/source/OptionsContainer.md +25 -9
  209. package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +61 -36
  210. package/dist/components/BbAlert/types.d.ts +9 -5
  211. package/dist/components/BbAlert/types.js +8 -3
  212. package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +3 -3
  213. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +26 -17
  214. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +103 -50
  215. package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +20 -15
  216. package/dist/components/BbBadge/badgeButtonContext.d.ts +12 -1
  217. package/dist/components/BbBadge/types.d.ts +45 -15
  218. package/dist/components/BbBadge/types.js +12 -3
  219. package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +89 -126
  220. package/dist/components/BbBaseButton/types.d.ts +23 -4
  221. package/dist/components/BbBaseButton/types.js +7 -1
  222. package/dist/components/BbBaseButton/useLinkState.d.ts +41 -0
  223. package/dist/components/BbBaseButton/useLinkState.js +70 -0
  224. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -74
  225. package/dist/components/BbButton/types.d.ts +50 -13
  226. package/dist/components/BbButton/types.js +10 -3
  227. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +148 -95
  228. package/dist/components/BbCheckboxGroup/types.d.ts +34 -11
  229. package/dist/components/BbCheckboxGroup/types.js +9 -4
  230. package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
  231. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +134 -93
  232. package/dist/components/BbColorInput/types.d.ts +11 -4
  233. package/dist/components/BbColorInput/types.js +9 -3
  234. package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +82 -59
  235. package/dist/components/BbConfirm/types.d.ts +9 -4
  236. package/dist/components/BbConfirm/types.js +8 -3
  237. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
  238. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +68 -67
  239. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
  240. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +259 -215
  241. package/dist/components/BbDatePickerInput/types.d.ts +12 -5
  242. package/dist/components/BbDatePickerInput/types.js +9 -3
  243. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +223 -219
  244. package/dist/components/BbDialog/useDialogStack.d.ts +1 -1
  245. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +104 -89
  246. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -0
  247. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +323 -285
  248. package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -0
  249. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +411 -319
  250. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -98
  251. package/dist/components/BbDropdown/DropdownRow.vue.d.ts +4 -3
  252. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +49 -28
  253. package/dist/components/BbDropdown/normalizeGroups.d.ts +6 -0
  254. package/dist/components/BbDropdown/normalizeGroups.js +21 -15
  255. package/dist/components/BbDropdown/types.d.ts +59 -12
  256. package/dist/components/BbDropdown/types.js +16 -3
  257. package/dist/components/BbDropdown/useDropdownContext.d.ts +6 -0
  258. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -1
  259. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +179 -68
  260. package/dist/components/BbDropdownButton/types.d.ts +44 -16
  261. package/dist/components/BbDropdownButton/types.js +28 -3
  262. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +111 -89
  263. package/dist/components/BbForm/formSchema.d.ts +13 -0
  264. package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +100 -100
  265. package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +40 -25
  266. package/dist/components/BbIndicator/types.d.ts +9 -5
  267. package/dist/components/BbIndicator/types.js +8 -3
  268. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +243 -202
  269. package/dist/components/BbNumberInput/types.d.ts +12 -5
  270. package/dist/components/BbNumberInput/types.js +9 -3
  271. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
  272. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +401 -399
  273. package/dist/components/BbOffCanvas/types.d.ts +6 -2
  274. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +81 -80
  275. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +158 -105
  276. package/dist/components/BbRadioGroup/types.d.ts +21 -7
  277. package/dist/components/BbRadioGroup/types.js +9 -4
  278. package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -3
  279. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +181 -137
  280. package/dist/components/BbSelect/types.d.ts +36 -22
  281. package/dist/components/BbSelect/types.js +22 -3
  282. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +4 -4
  283. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +600 -577
  284. package/dist/components/BbSelectPopover/knownItems.d.ts +5 -0
  285. package/dist/components/BbSelectPopover/types.d.ts +46 -12
  286. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
  287. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +2 -2
  288. package/dist/components/BbSwitchGroup/types.d.ts +14 -4
  289. package/dist/components/BbSwitchGroup/types.js +8 -3
  290. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1102 -995
  291. package/dist/components/BbTable/estimatedFloors.golden.d.ts +25 -0
  292. package/dist/components/BbTable/measuredFloors.d.ts +46 -0
  293. package/dist/components/BbTable/measuredFloors.js +322 -0
  294. package/dist/components/BbTable/measuredFloorsTestKit.d.ts +27 -0
  295. package/dist/components/BbTable/textRuler.d.ts +71 -0
  296. package/dist/components/BbTable/textRuler.js +121 -0
  297. package/dist/components/BbTable/utils.d.ts +113 -6
  298. package/dist/components/BbTable/utils.js +118 -65
  299. package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +53 -35
  300. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +62 -45
  301. package/dist/components/BbTabs/types.d.ts +26 -11
  302. package/dist/components/BbTabs/types.js +23 -8
  303. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +205 -164
  304. package/dist/components/BbTag/types.d.ts +11 -4
  305. package/dist/components/BbTag/types.js +9 -3
  306. package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +98 -57
  307. package/dist/components/BbTextInput/types.d.ts +12 -5
  308. package/dist/components/BbTextInput/types.js +9 -3
  309. package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +137 -96
  310. package/dist/components/BbTextarea/types.d.ts +12 -5
  311. package/dist/components/BbTextarea/types.js +9 -3
  312. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +105 -104
  313. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +241 -197
  314. package/dist/components/BbTimePickerInput/types.d.ts +12 -5
  315. package/dist/components/BbTimePickerInput/types.js +9 -3
  316. package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +74 -32
  317. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +47 -47
  318. package/dist/components/BbToast/types.d.ts +10 -5
  319. package/dist/components/BbToast/types.js +18 -3
  320. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +85 -71
  321. package/dist/components/BbTooltip/types.d.ts +13 -8
  322. package/dist/components/BbTooltip/types.js +8 -3
  323. package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
  324. package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
  325. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +69 -69
  326. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +53 -50
  327. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +146 -143
  328. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +7 -2
  329. package/dist/components/OptionsContainer/types.d.ts +14 -3
  330. package/dist/composables/useBbConfig.d.ts +1 -0
  331. package/dist/composables/useBbConfig.js +11 -7
  332. package/dist/composables/useBbFormContext.d.ts +4 -3
  333. package/dist/composables/useBbTabsContext.js +99 -85
  334. package/dist/composables/useChoiceIndicator.d.ts +58 -0
  335. package/dist/composables/useChoiceIndicator.js +197 -0
  336. package/dist/composables/useConfirm.d.ts +4 -4
  337. package/dist/composables/usePassthrough.d.ts +54 -1
  338. package/dist/composables/usePassthrough.js +100 -71
  339. package/dist/directives/bbTooltip.d.ts +12 -6
  340. package/dist/directives/createPopoverDirective.js +1 -1
  341. package/dist/index.d.ts +3 -1
  342. package/dist/llms-full.txt +3467 -801
  343. package/dist/llms-medium.txt +71 -53
  344. package/dist/llms.txt +2 -1
  345. package/dist/passthrough-deduper.js +6 -3
  346. package/dist/project-dts.d.ts +24 -0
  347. package/dist/project-dts.js +43 -17
  348. package/dist/styles.css +2 -2
  349. package/dist/types/AlertVariant.d.ts +14 -0
  350. package/dist/types/AlertVariant.js +9 -0
  351. package/dist/types/BadgeVariant.d.ts +14 -0
  352. package/dist/types/BadgeVariant.js +9 -0
  353. package/dist/types/ButtonVariant.d.ts +16 -0
  354. package/dist/types/ButtonVariant.js +11 -0
  355. package/dist/types/CheckboxVariant.d.ts +38 -0
  356. package/dist/types/CheckboxVariant.js +4 -0
  357. package/dist/types/CommonProps.d.ts +4 -3
  358. package/dist/types/Config.d.ts +7 -0
  359. package/dist/types/ConfirmVariant.d.ts +12 -0
  360. package/dist/types/ConfirmVariant.js +4 -0
  361. package/dist/types/DropdownItemVariant.d.ts +12 -0
  362. package/dist/types/DropdownItemVariant.js +4 -0
  363. package/dist/types/IndicatorVariant.d.ts +15 -0
  364. package/dist/types/IndicatorVariant.js +10 -0
  365. package/dist/types/InputVariant.d.ts +13 -0
  366. package/dist/types/InputVariant.js +8 -0
  367. package/dist/types/RadioVariant.d.ts +38 -0
  368. package/dist/types/RadioVariant.js +4 -0
  369. package/dist/types/TabsVariant.d.ts +13 -0
  370. package/dist/types/TabsVariant.js +8 -0
  371. package/dist/types/ToastVariant.d.ts +15 -0
  372. package/dist/types/ToastVariant.js +10 -0
  373. package/dist/types/TooltipVariant.d.ts +12 -0
  374. package/dist/types/TooltipVariant.js +4 -0
  375. package/dist/types/passthrough.d.ts +83 -15
  376. package/dist/types/passthrough.js +2 -2
  377. package/dist/types/ptComponentMap.d.ts +35 -23
  378. package/dist/utilities/functions/extractDomContainer.d.ts +20 -1
  379. package/dist/utilities/functions/extractDomContainer.js +8 -3
  380. package/dist/utils/focusVisibility.d.ts +6 -0
  381. package/dist/utils/focusVisibility.js +4 -1
  382. package/dist/utils/passthroughDeduper.d.ts +14 -0
  383. package/dist/utils/versionCheck.js +1 -1
  384. package/dist/vite-plugin.d.ts +64 -7
  385. package/dist/vite.js +385 -259
  386. package/llms.txt +2 -1
  387. package/package.json +5 -4
  388. package/scripts/lib/adoption-checklist.json +312 -0
  389. package/scripts/lib/eslint-plugin.d.ts +13 -0
  390. package/scripts/lib/eslint-plugin.mjs +75 -11
  391. package/scripts/lib/helpers-add.mjs +26 -2
  392. package/scripts/lib/idiom-scan.mjs +65 -0
  393. package/scripts/lib/mcp-config.mjs +203 -9
  394. package/scripts/lib/migrate-fix.mjs +42 -1
  395. package/scripts/lib/project-variant-dts.mjs +18 -0
  396. package/scripts/lib/validate-bb-markup.mjs +99 -2
@@ -1,45 +1,79 @@
1
1
  import { useLogger as e } from "../../composables/useLogger.js";
2
- import { usePassthrough as t } from "../../composables/usePassthrough.js";
3
- import { useUntil as n } from "../../composables/useUntil.js";
4
- import { removedPropsFor as r } from "../../deprecation/removedProps.js";
5
- import { warnRemovedAttrs as i } from "../../utilities/functions/warnRemovedAttrs.js";
6
- import { extractDomContainer as ee } from "../../utilities/functions/extractDomContainer.js";
7
- import { BB_FORM_SUBMIT_LOCK as a } from "../../composables/formSubmitLock.js";
8
- import { useLocale as o } from "../../composables/useLocale.js";
9
- import s from "../BbIcon/BbIcon.vue.js";
10
- import c from "../BbSpinner/BbSpinner.vue.js";
2
+ import { usePassthrough as t, variantPt as n } from "../../composables/usePassthrough.js";
3
+ import { useUntil as r } from "../../composables/useUntil.js";
4
+ import { removedPropsFor as i } from "../../deprecation/removedProps.js";
5
+ import { warnRemovedAttrs as ee } from "../../utilities/functions/warnRemovedAttrs.js";
6
+ import { extractHtmlContainer as a } from "../../utilities/functions/extractDomContainer.js";
7
+ import { BB_FORM_SUBMIT_LOCK as o } from "../../composables/formSubmitLock.js";
8
+ import { useLocale as s } from "../../composables/useLocale.js";
9
+ import c from "../BbIcon/BbIcon.vue.js";
10
+ import te from "../BbSpinner/BbSpinner.vue.js";
11
+ import { provideLinkState as ne, useLinkState as re } from "../BbBaseButton/useLinkState.js";
11
12
  import l from "../BbBaseButton/BbBaseButton.vue.js";
12
- import { useBbFormSavingById as u } from "../../composables/useBbFormContext.js";
13
- import { pickBy as d } from "../../utilities/functions/pickBy.js";
14
- import { noop as f } from "../../utilities/functions/noop.js";
15
- import { isEqual as p } from "../../utilities/functions/isEqual.js";
16
- import { BB_BUTTON_PT as m } from "./types.js";
17
- import { useToggleRoving as h } from "./toggleRoving.js";
18
- import { Transition as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as te, createElementVNode as ne, createTextVNode as re, defineComponent as b, inject 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";
13
+ import { useBbFormSavingById as ie } from "../../composables/useBbFormContext.js";
14
+ import { pickBy as u } from "../../utilities/functions/pickBy.js";
15
+ import { noop as d } from "../../utilities/functions/noop.js";
16
+ import { isEqual as f } from "../../utilities/functions/isEqual.js";
17
+ import { BB_BUTTON_PT as p } from "./types.js";
18
+ import { useToggleRoving as m } from "./toggleRoving.js";
19
+ import { Fragment as h, Transition as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as ae, createTextVNode as oe, defineComponent as x, guardReactiveProps as S, inject as se, mergeModels as C, mergeProps as w, normalizeProps as T, openBlock as E, ref as D, renderSlot as O, toDisplayString as k, unref as A, useAttrs as j, useModel as ce, useSlots as le, watchEffect as M, withCtx as N } from "vue";
19
20
  //#region src/components/BbButton/BbButton.vue?vue&type=script&setup=true&lang.ts
20
- var N = {
21
- key: 3,
21
+ var P = {
22
+ key: 5,
22
23
  class: "bb-button__loading-label bb-sr-only"
23
- }, P = /*@__PURE__*/ b({
24
+ }, F = /*@__PURE__*/ x({
25
+ mixins: [n(p)],
24
26
  inheritAttrs: !1,
25
27
  __name: "BbButton",
26
- props: /*@__PURE__*/ S({
28
+ props: /*@__PURE__*/ C({
27
29
  "pt:root": {},
28
30
  "pt:icon": {},
29
31
  "pt:spinner": {},
30
32
  "pt:text": {},
33
+ "pt:root:activeLink": {},
34
+ "pt:root:exactActiveLink": {},
31
35
  "pt:root:loading": {},
32
36
  "pt:root:disabled": {},
33
37
  "pt:root:pressed": {},
38
+ "pt:icon:activeLink": {},
39
+ "pt:icon:exactActiveLink": {},
34
40
  "pt:icon:loading": {},
35
41
  "pt:icon:disabled": {},
36
42
  "pt:icon:pressed": {},
43
+ "pt:spinner:activeLink": {},
44
+ "pt:spinner:exactActiveLink": {},
37
45
  "pt:spinner:loading": {},
38
46
  "pt:spinner:disabled": {},
39
47
  "pt:spinner:pressed": {},
48
+ "pt:text:activeLink": {},
49
+ "pt:text:exactActiveLink": {},
40
50
  "pt:text:loading": {},
41
51
  "pt:text:disabled": {},
42
52
  "pt:text:pressed": {},
53
+ "pt:root:primary": {},
54
+ "pt:root:outline": {},
55
+ "pt:root:secondary": {},
56
+ "pt:root:ghost": {},
57
+ "pt:root:destructive": {},
58
+ "pt:root:link": {},
59
+ "pt:icon:primary": {},
60
+ "pt:icon:outline": {},
61
+ "pt:icon:secondary": {},
62
+ "pt:icon:ghost": {},
63
+ "pt:icon:destructive": {},
64
+ "pt:icon:link": {},
65
+ "pt:spinner:primary": {},
66
+ "pt:spinner:outline": {},
67
+ "pt:spinner:secondary": {},
68
+ "pt:spinner:ghost": {},
69
+ "pt:spinner:destructive": {},
70
+ "pt:spinner:link": {},
71
+ "pt:text:primary": {},
72
+ "pt:text:outline": {},
73
+ "pt:text:secondary": {},
74
+ "pt:text:ghost": {},
75
+ "pt:text:destructive": {},
76
+ "pt:text:link": {},
43
77
  pt: {},
44
78
  disableAutoLoading: { type: Boolean },
45
79
  activeClass: {},
@@ -106,43 +140,56 @@ var N = {
106
140
  modelModifiers: {}
107
141
  }),
108
142
  emits: ["update:modelValue"],
109
- setup(b, { expose: S }) {
110
- let P = A(b, "modelValue"), F = b;
111
- process.env.NODE_ENV !== "production" && i("BbButton", r("BbButton"));
112
- let I = [
143
+ setup(n, { expose: x }) {
144
+ let C = ce(n, "modelValue"), F = n, I = le();
145
+ process.env.NODE_ENV !== "production" && ee("BbButton", i("BbButton"));
146
+ let L = [
113
147
  "xs",
114
148
  "sm",
115
149
  "md",
116
150
  "lg",
117
151
  "xl",
118
152
  "2xl"
119
- ], L = e(), R = _(() => P.value !== void 0), z = _(() => p(P.value, F.trueValue)), { t: B } = o(), V = k(), H = T();
120
- process.env.NODE_ENV !== "production" && j(() => {
121
- 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.");
153
+ ], R = e(), z = _(() => C.value !== void 0), B = _(() => f(C.value, F.trueValue)), { t: V } = s(), H = j(), U = D();
154
+ process.env.NODE_ENV !== "production" && M(() => {
155
+ 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.");
122
156
  });
123
- let U = (e) => {
124
- H.value = ee(e) ?? void 0;
125
- }, W = _(() => {
126
- let { onClick: e, class: t, ...n } = V;
157
+ let W = (e) => {
158
+ U.value = a(e) ?? void 0;
159
+ }, ue = _(() => {
160
+ let { onClick: e, class: t, ...n } = H;
127
161
  return n;
128
- }), G = T(0), K = x(a, null), q = () => F.type === "submit" && V.form != null ? String(V.form) : void 0, J = u(q), Y = () => F.type === "submit" && (q() ? J(H.value) : !!K?.savingFor(H.value)), X = _(() => F.loading || !F.disableAutoLoading && (!!G.value || Y())), ie = n(X), Z = t({
162
+ }), G = D(0), de = se(o, null), K = () => F.type === "submit" && H.form != null ? String(H.form) : void 0, fe = ie(K), pe = () => F.type === "submit" && (K() ? fe(U.value) : !!de?.savingFor(U.value)), q = _(() => F.loading || !F.disableAutoLoading && (!!G.value || pe())), me = r(q), J = re(F);
163
+ ne(J);
164
+ let Y = _(() => !!F.icon || !!I.icon), X = _(() => ({
165
+ ...J.value,
166
+ pressed: z.value && B.value,
167
+ loading: q.value,
168
+ disabled: !!F.disabled
169
+ })), Z = t({
129
170
  component: "BbButton",
130
- attrs: V,
171
+ attrs: H,
131
172
  props: F,
132
- parts: m.parts,
133
- states: m.states,
173
+ parts: p.parts,
174
+ states: p.states,
134
175
  active: {
135
- loading: () => X.value,
176
+ loading: () => q.value,
136
177
  disabled: () => !!F.disabled,
137
- pressed: () => R.value && z.value
178
+ pressed: () => z.value && B.value,
179
+ activeLink: () => J.value.activeLink,
180
+ exactActiveLink: () => J.value.exactActiveLink
181
+ },
182
+ variant: {
183
+ ...p.variant,
184
+ current: () => F.variant
138
185
  }
139
- }), ae = async (e) => {
140
- if (X.value && !F.interactiveWhileLoading) return (F.type === "submit" || F.href || F.to) && e.preventDefault(), null;
141
- if (R.value) {
186
+ }), he = async (e) => {
187
+ if (q.value && !F.interactiveWhileLoading) return (F.type === "submit" || F.href || F.to) && e.preventDefault(), null;
188
+ if (z.value) {
142
189
  let e = F.trueValue, t = F.falseValue;
143
- P.value = p(P.value, e) ? t : e;
190
+ C.value = f(C.value, e) ? t : e;
144
191
  }
145
- let t = [V.onClick ?? f].flat(), n = t.map((t) => t(e)), r = n.filter((e) => e && typeof e.then == "function");
192
+ let t = [H.onClick ?? d].flat(), n = t.map((t) => t(e)), r = n.filter((e) => e && typeof e.then == "function");
146
193
  if (!r.length) return n[0];
147
194
  let i = t.length === 1 ? n[0] : Promise.all(r).then(() => {});
148
195
  G.value++;
@@ -151,16 +198,16 @@ var N = {
151
198
  } finally {
152
199
  G.value--;
153
200
  }
154
- }, oe = _(() => {
201
+ }, ge = _(() => {
155
202
  let e = typeof F.size == "string" ? { default: F.size } : {
156
203
  default: "md",
157
204
  ...F.size
158
205
  };
159
206
  return Object.fromEntries(Object.entries(e).map(([e, t]) => {
160
207
  let n = t;
161
- 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];
208
+ 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];
162
209
  }));
163
- }), se = /* @__PURE__ */ new Set([
210
+ }), _e = /* @__PURE__ */ new Set([
164
211
  "append:icon",
165
212
  "disableAutoLoading",
166
213
  "disabled",
@@ -174,72 +221,81 @@ var N = {
174
221
  "size",
175
222
  "trueValue",
176
223
  "variant"
177
- ]), ce = _(() => ({
178
- ...W.value,
179
- ...d(F, (e, t) => !se.has(t) && t !== "pt" && !t.startsWith("pt:"))
180
- })), Q = _(() => X.value && !F.interactiveWhileLoading), $ = h(H, _(() => !!F.group && R.value && !("tabindex" in V)), () => [
181
- z.value,
224
+ ]), ve = _(() => ({
225
+ ...ue.value,
226
+ ...u(F, (e, t) => !_e.has(t) && t !== "pt" && !t.startsWith("pt:"))
227
+ })), Q = _(() => q.value && !F.interactiveWhileLoading), $ = m(U, _(() => !!F.group && z.value && !("tabindex" in H)), () => [
228
+ B.value,
182
229
  F.disabled,
183
230
  Q.value
184
- ]), le = _(() => {
231
+ ]), ye = _(() => {
185
232
  let e = Q.value ? -1 : $.tabindex.value;
186
233
  return {
187
234
  ...Q.value ? { "aria-disabled": !0 } : {},
188
235
  ...e === void 0 ? {} : { tabindex: e }
189
236
  };
190
- }), ue = _(() => C(ce.value, {
191
- ...le.value,
192
- "aria-pressed": R.value ? z.value : void 0,
237
+ }), be = _(() => w(ve.value, {
238
+ ...ye.value,
239
+ "aria-pressed": z.value ? B.value : void 0,
193
240
  class: [
194
241
  "bb-button",
195
- oe.value,
242
+ ge.value,
196
243
  {
197
- "bb-button--loading": X.value,
244
+ "bb-button--loading": q.value,
198
245
  "bb-button--soft-disabled": Q.value,
199
246
  "bb-button--group": F.group,
200
- "bb-button--icon": !!F.icon,
201
- "bb-button--pressed": R.value && z.value,
247
+ "bb-button--icon": Y.value,
248
+ "bb-button--pressed": z.value && B.value,
202
249
  [`bb-button--${F.variant}`]: F.variant !== "none"
203
250
  }
204
251
  ],
205
252
  disabled: F.disabled,
206
- onClick: ae,
253
+ onClick: he,
207
254
  onFocusin: $.onFocusin,
208
255
  onKeydown: $.onKeydown
209
256
  }, Z.root));
210
- return S({ $el: H }), (e, t) => (w(), v(O(l), C({ ref: U }, ue.value), {
211
- default: M(() => [
212
- O(ie) ? (w(), v(g, {
257
+ return x({ $el: U }), (e, t) => (E(), v(A(l), w({ ref: W }, be.value), {
258
+ default: N(() => [
259
+ A(me) ? (E(), v(g, {
213
260
  key: 0,
214
261
  appear: "",
215
262
  name: "bb-button-spinner"
216
263
  }, {
217
- default: M(() => [X.value ? (w(), v(O(c), C({
264
+ default: N(() => [q.value ? (E(), v(A(te), w({
218
265
  key: 0,
219
266
  class: "bb-button__spinner"
220
- }, O(Z).spinner), null, 16)) : y("", !0)]),
267
+ }, A(Z).spinner), null, 16)) : y("", !0)]),
221
268
  _: 1
222
269
  })) : y("", !0),
223
- F.icon ? (w(), v(s, C({
270
+ I.icon ? (E(), b("span", w({
224
271
  key: 1,
272
+ class: "bb-button__icon bb-button__icon-slot"
273
+ }, A(Z).icon), [O(e.$slots, "icon", T(S(X.value)))], 16)) : F.icon ? (E(), v(c, w({
274
+ key: 2,
225
275
  class: "bb-button__icon",
226
276
  icon: F.icon
227
- }, O(Z).icon), null, 16, ["icon"])) : F["prepend:icon"] ? (w(), v(s, C({
228
- key: 2,
277
+ }, A(Z).icon), null, 16, ["icon"])) : I["prepend:icon"] ? (E(), b("span", w({
278
+ key: 3,
279
+ class: "bb-button__prepend-icon bb-button__icon-slot"
280
+ }, A(Z).icon), [O(e.$slots, "prepend:icon", T(S(X.value)))], 16)) : F["prepend:icon"] ? (E(), v(c, w({
281
+ key: 4,
229
282
  class: "bb-button__prepend-icon",
230
283
  icon: F["prepend:icon"]
231
- }, O(Z).icon), null, 16, ["icon"])) : y("", !0),
232
- ne("span", C({ class: ["bb-button__text", { "bb-sr-only": !!e.icon }] }, O(Z).text), [E(e.$slots, "default", {}, () => [re(D(e.text), 1)])], 16),
233
- X.value ? (w(), te("span", N, D(O(B)("common.loadingText")), 1)) : y("", !0),
234
- !e.icon && F["append:icon"] ? (w(), v(s, C({
235
- key: 4,
284
+ }, A(Z).icon), null, 16, ["icon"])) : y("", !0),
285
+ ae("span", w({ class: ["bb-button__text", { "bb-sr-only": Y.value }] }, A(Z).text), [O(e.$slots, "default", T(S(A(J))), () => [oe(k(e.text), 1)])], 16),
286
+ q.value ? (E(), b("span", P, k(A(V)("common.loadingText")), 1)) : y("", !0),
287
+ Y.value ? y("", !0) : (E(), b(h, { key: 6 }, [I["append:icon"] ? (E(), b("span", w({
288
+ key: 0,
289
+ class: "bb-button__append-icon bb-button__icon-slot"
290
+ }, A(Z).icon), [O(e.$slots, "append:icon", T(S(X.value)))], 16)) : F["append:icon"] ? (E(), v(c, w({
291
+ key: 1,
236
292
  class: "bb-button__append-icon",
237
293
  icon: F["append:icon"]
238
- }, O(Z).icon), null, 16, ["icon"])) : y("", !0)
294
+ }, A(Z).icon), null, 16, ["icon"])) : y("", !0)], 64))
239
295
  ]),
240
296
  _: 3
241
297
  }, 16));
242
298
  }
243
299
  });
244
300
  //#endregion
245
- export { P as default };
301
+ export { F as default };
@@ -1,9 +1,10 @@
1
1
  import { RouteLocationRaw } from 'vue-router';
2
2
  import { ButtonTag } from '../../types/CommonProps';
3
3
  import { IconType } from '../../types/Icon';
4
- import { ButtonVariantType } from '../../types/ButtonVariant';
4
+ import { ButtonVariantBuiltIn, ButtonVariantRegistry, ButtonVariantType } from '../../types/ButtonVariant';
5
5
  import { Responsive } from '../../types/ResponsiveSize';
6
- import { PtMap, PtValue } from '../../types/passthrough';
6
+ import { PtMap, PtValue, PtVariantAttrs } from '../../types/passthrough';
7
+ import { BbLinkSlotProps } from '../BbBaseButton/types';
7
8
  type Sizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
8
9
  /**
9
10
  * Passthrough parts of `BbButton` (plans/passthrough/BbButton.md).
@@ -26,31 +27,44 @@ type Sizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
26
27
  export type BbButtonPtPart = 'root' | 'icon' | 'spinner' | 'text';
27
28
  /**
28
29
  * Passthrough states of `BbButton`: true while `--loading` / `--disabled` /
29
- * `--pressed`. There is no `active` state (the pointer press is Tailwind's
30
- * `active:` variant) and no `current` state (a link to the current route is
31
- * `activeClass` / `exactActiveClass`).
30
+ * `--pressed`, and for a link while `activeClass` / `exactActiveClass` are on.
31
+ * There is no `active` state (the pointer press is Tailwind's `active:`
32
+ * variant). A link to the current page is `activeLink` / `exactActiveLink`,
33
+ * on every part: the sidebar entry of the page you are on styles its root,
34
+ * icon and text from them, and the default slot gets the same two booleans.
32
35
  *
36
+ * @state activeLink - Component-wide: a link to the current page or one of
37
+ * its ancestors (`/users` on `/users/5`) — exactly when `activeClass` is on.
38
+ * The weakest state: `pressed`, `disabled` and `loading` win a conflict.
39
+ * @state exactActiveLink - Component-wide: a link to the current page itself
40
+ * — exactly when `exactActiveClass` is on (`activeLink` is on too, so its
41
+ * entries apply first and these win).
33
42
  * @state disabled - Component-wide: the button is `disabled`.
34
43
  * @state loading - Component-wide: `loading` is on — the spinner shows and
35
44
  * the button ignores the pointer.
36
45
  * @state pressed - Component-wide: a toggle button (`v-model`) is on —
37
46
  * `aria-pressed="true"`, `--pressed` on the root.
38
47
  */
39
- export type BbButtonPtState = 'loading' | 'disabled' | 'pressed';
48
+ export type BbButtonPtState = 'activeLink' | 'exactActiveLink' | 'loading' | 'disabled' | 'pressed';
40
49
  /** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
41
50
  export declare const BB_BUTTON_PT: {
42
51
  readonly parts: readonly ["root", "icon", "spinner", "text"];
43
- readonly states: readonly ["pressed", "disabled", "loading"];
52
+ readonly states: readonly ["activeLink", "exactActiveLink", "pressed", "disabled", "loading"];
53
+ readonly variant: {
54
+ readonly names: readonly ["primary", "outline", "secondary", "ghost", "destructive", "link"];
55
+ readonly option: "buttonVariants";
56
+ };
44
57
  };
45
58
  export type BbButtonProps = {
46
- [K in `pt:${BbButtonPtPart}` | `pt:${BbButtonPtPart}:${BbButtonPtState}`]?: PtValue;
47
- } & {
59
+ [K in `pt:${BbButtonPtPart}` | `pt:${BbButtonPtPart}:${BbButtonPtState}` | `pt:${BbButtonPtPart}:${ButtonVariantBuiltIn}`]?: PtValue;
60
+ } & /* @vue-ignore */ PtVariantAttrs<BbButtonPtPart, keyof ButtonVariantRegistry> & {
48
61
  /**
49
62
  * Passthrough, object form: `{ icon: '…', 'icon:loading': '…' }` — the same
50
63
  * keys as the `pt:*` attributes without the prefix. Parts: `root`, `icon`,
51
- * `spinner`, `text`. States: `loading`, `disabled`.
64
+ * `spinner`, `text`. States: `loading`, `disabled`, `pressed`, and the
65
+ * registered variants (an app's own included).
52
66
  */
53
- pt?: PtMap<BbButtonPtPart, BbButtonPtState>;
67
+ pt?: PtMap<BbButtonPtPart, BbButtonPtState | ButtonVariantBuiltIn | keyof ButtonVariantRegistry>;
54
68
  } & BbButtonOwnProps;
55
69
  /**
56
70
  * BbButton's props without its passthrough. `BbDropdownButton` takes them for
@@ -346,10 +360,33 @@ export type BbButtonOwnProps = {
346
360
  */
347
361
  viewTransition?: boolean;
348
362
  };
363
+ /**
364
+ * What `#icon` / `#prepend:icon` / `#append:icon` see: the button's `pt`
365
+ * states, so a glyph can follow them (a filled icon on the current page's link).
366
+ */
367
+ export type BbButtonIconSlotProps = BbLinkSlotProps & {
368
+ /** A toggle (`v-model`) that is on. */
369
+ pressed: boolean;
370
+ /** Loading, the automatic loading included: the spinner shows. */
371
+ loading: boolean;
372
+ /** The `disabled` prop. */
373
+ disabled: boolean;
374
+ };
349
375
  export type BbButtonSlots = {
350
376
  /**
351
- * Primary content rendered inside the button. Falls back to the `text` prop when empty.
377
+ * Primary content rendered inside the button. Falls back to the `text` prop
378
+ * when empty. A link's slot gets `{ activeLink, exactActiveLink }`: whether it
379
+ * points at the current page (both `false` on a button).
380
+ */
381
+ default?: (props: BbLinkSlotProps) => any;
382
+ /**
383
+ * The icon of an icon-only button, replacing the `icon` prop. Renders inside
384
+ * the `icon` part: `pt:icon`, `--icon-size` and the loading spinner apply.
352
385
  */
353
- default?: (props: object) => any;
386
+ icon?: (props: BbButtonIconSlotProps) => any;
387
+ /** The leading icon, replacing `prepend:icon`; inside the `icon` part. */
388
+ 'prepend:icon'?: (props: BbButtonIconSlotProps) => any;
389
+ /** The trailing icon, replacing `append:icon`; inside the `icon` part. */
390
+ 'append:icon'?: (props: BbButtonIconSlotProps) => any;
354
391
  };
355
392
  export {};
@@ -1,5 +1,6 @@
1
+ import { BUTTON_VARIANTS as e } from "../../types/ButtonVariant.js";
1
2
  //#region src/components/BbButton/types.ts
2
- var e = {
3
+ var t = {
3
4
  parts: [
4
5
  "root",
5
6
  "icon",
@@ -7,10 +8,16 @@ var e = {
7
8
  "text"
8
9
  ],
9
10
  states: [
11
+ "activeLink",
12
+ "exactActiveLink",
10
13
  "pressed",
11
14
  "disabled",
12
15
  "loading"
13
- ]
16
+ ],
17
+ variant: {
18
+ names: e,
19
+ option: "buttonVariants"
20
+ }
14
21
  };
15
22
  //#endregion
16
- export { e as BB_BUTTON_PT };
23
+ export { t as BB_BUTTON_PT };