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,8 +1,8 @@
1
1
  import { BbBaseButtonProps } from '../BbBaseButton/types';
2
- import { PtItemCtx, PtItemMap, PtItemResult, PtValue } from '../../types/passthrough';
2
+ import { PtItemCtx, PtItemMap, PtItemResult, PtValue, PtVariantAttrs } from '../../types/passthrough';
3
3
  import { Placement } from '../../types/Placement';
4
4
  import { IconType } from '../../types/Icon';
5
- import { DropdownItemVariantType } from '../../types/DropdownItemVariant';
5
+ import { DropdownItemVariantBuiltIn, DropdownItemVariantRegistry, DropdownItemVariantType } from '../../types/DropdownItemVariant';
6
6
  import { BbOffCanvasProps } from '../BbOffCanvas/types';
7
7
  import { ItemProps } from '../../types/ItemProps';
8
8
  import { BbDropdownGroupItemsContext } from '../../types/ItemsProvider';
@@ -361,8 +361,18 @@ export type InternalGroup = DropdownEntryBase & {
361
361
  /** Placeholder for this group's search field. Defaults to the localized label. */
362
362
  searchPlaceholder?: string;
363
363
  /**
364
- * When set, items act as selectable options that render a check on the right
365
- * and keep the menu open when toggled.
364
+ * Sorts the group's rows under titled sections, inside the one group (one
365
+ * `v-model`, one search field): a field path read off each row (a fetched
366
+ * row: its raw item) or a getter returning the section title. Rows with a
367
+ * nullish title are listed without a heading. Sections keep the order in
368
+ * which their first row appears, like `BbSelect`'s `groupBy`; a search hides
369
+ * a section with no matching row.
370
+ */
371
+ groupBy?: string | ((row: any) => string | null | undefined);
372
+ /**
373
+ * When set, items act as selectable options that render a check on the right.
374
+ * A change closes the menu in a single-choice group and keeps it open in a
375
+ * `multiple` one; the dropdown's `closeOnSelect` decides otherwise.
366
376
  *
367
377
  * Pass a function `(item) => boolean` to gate individual rows — the same
368
378
  * contract as `BbSelect` and the option groups. The group is still a
@@ -475,6 +485,8 @@ export type NormalizedGroup = {
475
485
  searchable?: boolean;
476
486
  /** Placeholder for this group's search field. */
477
487
  searchPlaceholder?: string;
488
+ /** Section title per row (see {@link InternalGroup.groupBy}). */
489
+ groupBy?: InternalGroup['groupBy'];
478
490
  selectable: boolean;
479
491
  /** Selected row keys (`rowKey`; injected by `BbDropdown`; empty for non-selectable groups). */
480
492
  selected: string[];
@@ -498,7 +510,7 @@ export type MappedItem = InternalItem & {
498
510
  * Passthrough parts of `BbDropdown` (plans/passthrough/BbDropdown.md). Groups,
499
511
  * headings and dividers are not parts.
500
512
  *
501
- * Per-item functions: on the instance, an entry part (`item`, `itemText`, `itemIcon`, `itemDescription`) also accepts `({ item, selected, … }) => PtValue | false | null | undefined` — `item` is the menu entry (an `Item`: its `label`, `value`, `description`, whatever else you put on it), and every state a boolean beside it, on for it (`selected`, `disabled`, …) — in the `pt` object or the `:pt:<part>` attribute, never on a `<part>:<state>` key and never in the global map or a scope (they ship as JSON). Its result is merged last, after every state entry, through the same deduper; a falsy result leaves the entry as it was. See the passthrough guide, _Per-item functions_.
513
+ * Per-item functions: on the instance, an entry part (`item`, `itemText`, `itemIcon`, `itemDescription`) also accepts `({ item, selected, … }) => PtValue | false | null | undefined` — `item` is the menu entry (an `Item`: its `label`, `value`, `description`, whatever else you put on it), every state a boolean beside it, on for it (`selected`, `disabled`, …), and the entry's `variant` as a string (`default` when it has none) — in the `pt` object or the `:pt:<part>` attribute, never on a `<part>:<state>` key and never in the global map or a scope (they ship as JSON). Its result is merged last, after every state entry, through the same deduper; a falsy result leaves the entry as it was. See the passthrough guide, _Per-item functions_.
502
514
  *
503
515
  * @part root - The floating element — an invisible positioning wrapper; a
504
516
  * `class` on the component lands here. No node on the phone sheet: style
@@ -533,29 +545,40 @@ export type BbDropdownSurfacePtPart = 'root' | 'panel' | 'sheet' | 'header' | 'f
533
545
  /** The entry parts — broadcasts resolved per entry; their base key also takes a per-item function. Spelled flat (T20). */
534
546
  export type BbDropdownItemPtPart = 'item' | 'itemText' | 'itemIcon' | 'itemDescription';
535
547
  /**
536
- * Passthrough states of `BbDropdown`, true while the matching `--` modifier is on.
548
+ * Passthrough states of `BbDropdown`, true while the matching `--` modifier is on
549
+ * (the link states: while the entry's `activeClass` / `exactActiveClass` are).
537
550
  *
551
+ * @state activeLink - Per node, on the entry parts: an entry whose link
552
+ * (`to` / `href`) points at the current page or one of its ancestors —
553
+ * exactly when its `activeClass` is on. The weakest state.
554
+ * @state exactActiveLink - Per node, on the entry parts: an entry whose link
555
+ * points at the current page itself — its `exactActiveClass` is on.
538
556
  * @state selected - Per node, on the entry parts: a selectable group's
539
557
  * checked entry.
540
558
  * @state disabled - Per node, on the entry parts: an entry that is disabled.
541
559
  * @state open - Component-wide: the menu is open.
542
560
  */
543
- export type BbDropdownPtState = 'open' | 'selected' | 'disabled';
561
+ export type BbDropdownPtState = 'activeLink' | 'exactActiveLink' | 'open' | 'selected' | 'disabled';
544
562
  /** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
545
563
  export declare const BB_DROPDOWN_PT: {
546
564
  readonly parts: readonly ["root", "panel", "sheet", "header", "footer", "input", "list", "item", "itemText", "itemIcon", "itemDescription"];
547
- readonly states: readonly ["selected", "disabled", "open"];
565
+ readonly states: readonly ["activeLink", "exactActiveLink", "selected", "disabled", "open"];
566
+ readonly variant: {
567
+ readonly names: readonly ["default", "destructive"];
568
+ readonly option: "dropdownItemVariants";
569
+ readonly parts: readonly ["item", "itemText", "itemIcon", "itemDescription"];
570
+ };
548
571
  };
549
572
  export type BbDropdownProps = {
550
- [K in `pt:${BbDropdownSurfacePtPart}` | `pt:${BbDropdownPtPart}:${BbDropdownPtState}`]?: PtValue;
551
- } & {
552
- [K in `pt:${BbDropdownItemPtPart}`]?: PtValue | ((ctx: PtItemCtx<InternalItem, BbDropdownPtState>) => PtItemResult);
573
+ [K in `pt:${BbDropdownSurfacePtPart}` | `pt:${BbDropdownPtPart}:${BbDropdownPtState}` | `pt:${BbDropdownItemPtPart}:${DropdownItemVariantBuiltIn}`]?: PtValue;
574
+ } & /* @vue-ignore */ PtVariantAttrs<BbDropdownItemPtPart, keyof DropdownItemVariantRegistry> & {
575
+ [K in `pt:${BbDropdownItemPtPart}`]?: PtValue | ((ctx: PtItemCtx<InternalItem, BbDropdownPtState, DropdownItemVariantBuiltIn | keyof DropdownItemVariantRegistry>) => PtItemResult);
553
576
  } & {
554
577
  /**
555
578
  * Passthrough, object form: the same keys as the `pt:*` attributes
556
579
  * without the prefix. See the `pt:<part>` row.
557
580
  */
558
- pt?: PtItemMap<BbDropdownPtPart, BbDropdownItemPtPart, BbDropdownPtState, InternalItem>;
581
+ pt?: PtItemMap<BbDropdownPtPart, BbDropdownItemPtPart, BbDropdownPtState, InternalItem, DropdownItemVariantBuiltIn | keyof DropdownItemVariantRegistry>;
559
582
  /**
560
583
  * An external activator element or component ref: the activator slot is not
561
584
  * rendered, and the listeners and ARIA (`aria-haspopup` / `aria-expanded` /
@@ -571,6 +594,14 @@ export type BbDropdownProps = {
571
594
  * @defaultValue `config.adaptive` (`true`)
572
595
  */
573
596
  adaptive?: boolean;
597
+ /**
598
+ * Whether a selection closes the menu. Unset: a change in a single-choice
599
+ * group closes it (an untick too, at any depth); a `multiple` group stays
600
+ * open. `true`: every selection change closes it. `false`: none does.
601
+ *
602
+ * @defaultValue unset (close after a single-choice change)
603
+ */
604
+ closeOnSelect?: boolean;
574
605
  /**
575
606
  * Compact density, the `BbSelect` ladder: flyout rows 28px → 24px, sheet
576
607
  * rows 44px → 36px (a sheet row stays a touch target). The label size does
@@ -809,11 +840,27 @@ export type BbDropdownItemSlotProps = {
809
840
  selected: boolean;
810
841
  /** The row's label (on a group's title line, the group's label). */
811
842
  label: InternalItem['label'];
843
+ /**
844
+ * A link entry (`to` / `href`) pointing at the current page or one of its
845
+ * ancestors: its `activeClass` is on. Not set on a group's title line.
846
+ */
847
+ activeLink?: boolean;
848
+ /**
849
+ * A link entry pointing at the current page itself: its `exactActiveClass`
850
+ * is on. Not set on a group's title line.
851
+ */
852
+ exactActiveLink?: boolean;
812
853
  };
813
854
  /** Props exposed by the `loading` and `empty` placeholder slots. */
814
855
  export type BbDropdownPlaceholderSlotProps = {
815
856
  /** Id of the group this placeholder belongs to. */
816
857
  groupId?: string;
858
+ /**
859
+ * The group's current search text, as typed (`''` when it has no search
860
+ * field or nothing is typed) — the same `query` BbSelect's `#empty` gets,
861
+ * e.g. for "Type at least 2 characters" under a remote search's minimum.
862
+ */
863
+ query: string;
817
864
  /** Resolved placeholder text (group `loadingText`/`emptyText`/`failedText` → dropdown default). */
818
865
  text: string;
819
866
  /**
@@ -1,5 +1,6 @@
1
+ import { DROPDOWN_ITEM_VARIANTS as e } from "../../types/DropdownItemVariant.js";
1
2
  //#region src/components/BbDropdown/types.ts
2
- var e = (e) => Array.isArray(e) ? e : [], t = (e) => e.selectable == null ? e.multiple != null : !!e.selectable, n = (e) => typeof e.selectable == "function" ? e.selectable : void 0, r = (e) => !Array.isArray(e) && (e.group === !0 || "selectable" in e || "multiple" in e || typeof e.items == "function"), i = {
3
+ var t = (e) => Array.isArray(e) ? e : [], n = (e) => e.selectable == null ? e.multiple != null : !!e.selectable, r = (e) => typeof e.selectable == "function" ? e.selectable : void 0, i = (e) => !Array.isArray(e) && (e.group === !0 || "selectable" in e || "multiple" in e || typeof e.items == "function"), a = {
3
4
  parts: [
4
5
  "root",
5
6
  "panel",
@@ -14,10 +15,22 @@ var e = (e) => Array.isArray(e) ? e : [], t = (e) => e.selectable == null ? e.mu
14
15
  "itemDescription"
15
16
  ],
16
17
  states: [
18
+ "activeLink",
19
+ "exactActiveLink",
17
20
  "selected",
18
21
  "disabled",
19
22
  "open"
20
- ]
23
+ ],
24
+ variant: {
25
+ names: e,
26
+ option: "dropdownItemVariants",
27
+ parts: [
28
+ "item",
29
+ "itemText",
30
+ "itemIcon",
31
+ "itemDescription"
32
+ ]
33
+ }
21
34
  };
22
35
  //#endregion
23
- export { i as BB_DROPDOWN_PT, e as groupItemsAsArray, r as isGroup, t as isSelectableGroup, n as selectablePredicateOf };
36
+ export { a as BB_DROPDOWN_PT, t as groupItemsAsArray, i as isGroup, n as isSelectableGroup, r as selectablePredicateOf };
@@ -75,6 +75,12 @@ export type DropdownContext = {
75
75
  close: () => void | Promise<void>;
76
76
  /** Returns focus to the activator. */
77
77
  focusActivator: () => void;
78
+ /**
79
+ * Whether this menu is the top of the overlay Escape stack: a submenu level
80
+ * closes on Escape only then, never under a popover or dialog opened from
81
+ * one of its items.
82
+ */
83
+ ownsEscape: () => boolean;
78
84
  /** What opened the menu (unset: a `v-model` or script open). */
79
85
  openModality: () => 'pointer' | 'keyboard' | undefined;
80
86
  /**
@@ -18,7 +18,8 @@ declare const __VLS_base: import('vue').DefineComponent<BbDropdownButtonProps, {
18
18
  }>, {
19
19
  size: import('../..').Responsive<"sm" | "md" | "lg" | "xl" | "2xl" | "xs">;
20
20
  adaptive: boolean;
21
- variant: import('../..').ButtonVariantType;
21
+ variant: import('../../types/ButtonVariant').ButtonVariantType;
22
+ closeOnSelect: boolean;
22
23
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
24
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
25
  declare const _default: typeof __VLS_export;
@@ -1,16 +1,20 @@
1
- import { usePassthrough as e } from "../../composables/usePassthrough.js";
2
- import { removedPropsFor as t } from "../../deprecation/removedProps.js";
3
- import { warnRemovedAttrs as n } from "../../utilities/functions/warnRemovedAttrs.js";
4
- import { useLocale as r } from "../../composables/useLocale.js";
5
- import { BB_DROPDOWN_PT as i } from "../BbDropdown/types.js";
6
- import { BB_BUTTON_PT as a } from "../BbButton/types.js";
7
- import o from "../BbButton/BbButton.vue.js";
8
- import s from "../BbDropdown/BbDropdown.vue.js";
1
+ import { registeredVariantNames as e, usePassthrough as t, variantPt as n } from "../../composables/usePassthrough.js";
2
+ import { removedPropsFor as r } from "../../deprecation/removedProps.js";
3
+ import { warnRemovedAttrs as i } from "../../utilities/functions/warnRemovedAttrs.js";
4
+ import { useLocale as a } from "../../composables/useLocale.js";
5
+ import { useLinkState as o } from "../BbBaseButton/useLinkState.js";
6
+ import { DROPDOWN_ITEM_VARIANTS as s } from "../../types/DropdownItemVariant.js";
7
+ import { BB_DROPDOWN_PT as c } from "../BbDropdown/types.js";
8
+ import { BUTTON_VARIANTS as l } from "../../types/ButtonVariant.js";
9
+ import { BB_BUTTON_PT as u } from "../BbButton/types.js";
10
+ import d from "../BbButton/BbButton.vue.js";
11
+ import f from "../BbDropdown/BbDropdown.vue.js";
9
12
  import "../../assets/svgs/chevron_down.svg_raw.js";
10
- import { BB_DROPDOWN_BUTTON_PT as c } from "./types.js";
11
- import { computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createSlots as p, createVNode as m, defineComponent as h, guardReactiveProps as g, mergeProps as _, normalizeProps as v, openBlock as y, ref as b, renderList as x, renderSlot as S, unref as C, useAttrs as w, useSlots as T, useTemplateRef as E, withCtx as D } from "vue";
13
+ import { BB_DROPDOWN_BUTTON_PT as p } from "./types.js";
14
+ import { computed as m, createBlock as ee, createCommentVNode as h, createElementBlock as g, createSlots as _, createVNode as v, defineComponent as y, guardReactiveProps as b, mergeProps as x, normalizeProps as S, openBlock as C, ref as w, renderList as T, renderSlot as E, unref as D, useAttrs as O, useSlots as k, useTemplateRef as A, withCtx as j } from "vue";
12
15
  //#region src/components/BbDropdownButton/BbDropdownButton.vue?vue&type=script&setup=true&lang.ts
13
- var O = /*@__PURE__*/ h({
16
+ var M = /*@__PURE__*/ y({
17
+ mixins: [n(p)],
14
18
  inheritAttrs: !1,
15
19
  __name: "BbDropdownButton",
16
20
  props: {
@@ -25,48 +29,78 @@ var O = /*@__PURE__*/ h({
25
29
  "pt:header": {},
26
30
  "pt:footer": {},
27
31
  "pt:input": {},
32
+ "pt:root:activeLink": {},
33
+ "pt:root:exactActiveLink": {},
28
34
  "pt:root:loading": {},
29
35
  "pt:root:disabled": {},
30
36
  "pt:root:open": {},
37
+ "pt:main:activeLink": {},
38
+ "pt:main:exactActiveLink": {},
31
39
  "pt:main:loading": {},
32
40
  "pt:main:disabled": {},
33
41
  "pt:main:open": {},
42
+ "pt:toggle:activeLink": {},
43
+ "pt:toggle:exactActiveLink": {},
34
44
  "pt:toggle:loading": {},
35
45
  "pt:toggle:disabled": {},
36
46
  "pt:toggle:open": {},
47
+ "pt:icon:activeLink": {},
48
+ "pt:icon:exactActiveLink": {},
37
49
  "pt:icon:loading": {},
38
50
  "pt:icon:disabled": {},
39
51
  "pt:icon:open": {},
52
+ "pt:spinner:activeLink": {},
53
+ "pt:spinner:exactActiveLink": {},
40
54
  "pt:spinner:loading": {},
41
55
  "pt:spinner:disabled": {},
42
56
  "pt:spinner:open": {},
57
+ "pt:text:activeLink": {},
58
+ "pt:text:exactActiveLink": {},
43
59
  "pt:text:loading": {},
44
60
  "pt:text:disabled": {},
45
61
  "pt:text:open": {},
62
+ "pt:panel:activeLink": {},
63
+ "pt:panel:exactActiveLink": {},
46
64
  "pt:panel:loading": {},
47
65
  "pt:panel:disabled": {},
48
66
  "pt:panel:open": {},
67
+ "pt:sheet:activeLink": {},
68
+ "pt:sheet:exactActiveLink": {},
49
69
  "pt:sheet:loading": {},
50
70
  "pt:sheet:disabled": {},
51
71
  "pt:sheet:open": {},
72
+ "pt:header:activeLink": {},
73
+ "pt:header:exactActiveLink": {},
52
74
  "pt:header:loading": {},
53
75
  "pt:header:disabled": {},
54
76
  "pt:header:open": {},
77
+ "pt:footer:activeLink": {},
78
+ "pt:footer:exactActiveLink": {},
55
79
  "pt:footer:loading": {},
56
80
  "pt:footer:disabled": {},
57
81
  "pt:footer:open": {},
82
+ "pt:input:activeLink": {},
83
+ "pt:input:exactActiveLink": {},
58
84
  "pt:input:loading": {},
59
85
  "pt:input:disabled": {},
60
86
  "pt:input:open": {},
87
+ "pt:item:activeLink": {},
88
+ "pt:item:exactActiveLink": {},
61
89
  "pt:item:loading": {},
62
90
  "pt:item:disabled": {},
63
91
  "pt:item:open": {},
92
+ "pt:itemText:activeLink": {},
93
+ "pt:itemText:exactActiveLink": {},
64
94
  "pt:itemText:loading": {},
65
95
  "pt:itemText:disabled": {},
66
96
  "pt:itemText:open": {},
97
+ "pt:itemIcon:activeLink": {},
98
+ "pt:itemIcon:exactActiveLink": {},
67
99
  "pt:itemIcon:loading": {},
68
100
  "pt:itemIcon:disabled": {},
69
101
  "pt:itemIcon:open": {},
102
+ "pt:itemDescription:activeLink": {},
103
+ "pt:itemDescription:exactActiveLink": {},
70
104
  "pt:itemDescription:loading": {},
71
105
  "pt:itemDescription:disabled": {},
72
106
  "pt:itemDescription:open": {},
@@ -74,6 +108,50 @@ var O = /*@__PURE__*/ h({
74
108
  "pt:itemText:selected": {},
75
109
  "pt:itemIcon:selected": {},
76
110
  "pt:itemDescription:selected": {},
111
+ "pt:root:primary": {},
112
+ "pt:root:outline": {},
113
+ "pt:root:secondary": {},
114
+ "pt:root:ghost": {},
115
+ "pt:root:destructive": {},
116
+ "pt:root:link": {},
117
+ "pt:main:primary": {},
118
+ "pt:main:outline": {},
119
+ "pt:main:secondary": {},
120
+ "pt:main:ghost": {},
121
+ "pt:main:destructive": {},
122
+ "pt:main:link": {},
123
+ "pt:toggle:primary": {},
124
+ "pt:toggle:outline": {},
125
+ "pt:toggle:secondary": {},
126
+ "pt:toggle:ghost": {},
127
+ "pt:toggle:destructive": {},
128
+ "pt:toggle:link": {},
129
+ "pt:icon:primary": {},
130
+ "pt:icon:outline": {},
131
+ "pt:icon:secondary": {},
132
+ "pt:icon:ghost": {},
133
+ "pt:icon:destructive": {},
134
+ "pt:icon:link": {},
135
+ "pt:spinner:primary": {},
136
+ "pt:spinner:outline": {},
137
+ "pt:spinner:secondary": {},
138
+ "pt:spinner:ghost": {},
139
+ "pt:spinner:destructive": {},
140
+ "pt:spinner:link": {},
141
+ "pt:text:primary": {},
142
+ "pt:text:outline": {},
143
+ "pt:text:secondary": {},
144
+ "pt:text:ghost": {},
145
+ "pt:text:destructive": {},
146
+ "pt:text:link": {},
147
+ "pt:item:default": {},
148
+ "pt:item:destructive": {},
149
+ "pt:itemText:default": {},
150
+ "pt:itemText:destructive": {},
151
+ "pt:itemIcon:default": {},
152
+ "pt:itemIcon:destructive": {},
153
+ "pt:itemDescription:default": {},
154
+ "pt:itemDescription:destructive": {},
77
155
  "pt:item": {},
78
156
  "pt:itemText": {},
79
157
  "pt:itemIcon": {},
@@ -83,6 +161,10 @@ var O = /*@__PURE__*/ h({
83
161
  type: Boolean,
84
162
  default: void 0
85
163
  },
164
+ closeOnSelect: {
165
+ type: Boolean,
166
+ default: void 0
167
+ },
86
168
  compact: { type: Boolean },
87
169
  eager: { type: Boolean },
88
170
  id: {},
@@ -161,13 +243,17 @@ var O = /*@__PURE__*/ h({
161
243
  "item:selected",
162
244
  "item:unselected"
163
245
  ],
164
- setup(h, { emit: O }) {
165
- let k = h, A = O, j = T(), M = /* @__PURE__ */ new Set([
246
+ setup(n, { emit: y }) {
247
+ let M = n, N = y, P = k(), F = /* @__PURE__ */ new Set([
166
248
  "activator",
167
249
  "default",
168
- "dropdown"
169
- ]), N = () => Object.keys(j).filter((e) => !M.has(e)), P = () => k.items ?? [], F = () => P().length > 0 || !!j.dropdown, I = /* @__PURE__ */ new Set([
250
+ "dropdown",
251
+ "icon",
252
+ "prepend:icon",
253
+ "append:icon"
254
+ ]), I = () => Object.keys(P).filter((e) => !F.has(e)), L = () => M.items ?? [], R = () => L().length > 0 || !!P.dropdown, z = /* @__PURE__ */ new Set([
170
255
  "adaptive",
256
+ "closeOnSelect",
171
257
  "compact",
172
258
  "eager",
173
259
  "id",
@@ -181,98 +267,122 @@ var O = /*@__PURE__*/ h({
181
267
  "toggle:icon",
182
268
  "block",
183
269
  "pt"
184
- ]), L = () => Object.fromEntries(Object.entries(k).filter(([e, t]) => t !== void 0 && !I.has(e) && !e.startsWith("pt:"))), R = /^(on[A-Z].*|aria-.*|name|value|autofocus|title|formaction|formenctype|formmethod|formnovalidate|formtarget)$/, z = () => {
270
+ ]), B = () => Object.fromEntries(Object.entries(M).filter(([e, t]) => t !== void 0 && !z.has(e) && !e.startsWith("pt:"))), V = /^(on[A-Z].*|aria-.*|name|value|autofocus|title|formaction|formenctype|formmethod|formnovalidate|formtarget)$/, H = () => {
185
271
  let e = {}, t = {};
186
- for (let [n, r] of Object.entries(B.rootAttrs)) (R.test(n) ? e : t)[n] = r;
272
+ for (let [n, r] of Object.entries(W.rootAttrs)) (V.test(n) ? e : t)[n] = r;
187
273
  return {
188
274
  main: e,
189
275
  root: t
190
276
  };
191
- }, B = e({
277
+ }, U = o(M), W = t({
192
278
  component: "BbDropdownButton",
193
- attrs: w(),
194
- props: k,
195
- parts: c.parts,
196
- states: c.states,
279
+ attrs: O(),
280
+ props: M,
281
+ parts: p.parts,
282
+ states: p.states,
197
283
  active: {
198
- loading: () => !!k.loading,
199
- disabled: () => !!k.disabled,
200
- open: () => K.value
201
- }
202
- }), V = () => B.forward({ toggle: "root" }, ["disabled"]), H = () => ({
203
- ...B.forward([
284
+ loading: () => !!M.loading,
285
+ disabled: () => !!M.disabled,
286
+ open: () => $.value,
287
+ activeLink: () => U.value.activeLink,
288
+ exactActiveLink: () => U.value.exactActiveLink
289
+ },
290
+ variant: [{
291
+ ...p.variant[0],
292
+ current: () => M.variant
293
+ }, p.variant[1]]
294
+ }), G = [...u.states, ...e(l, "buttonVariants")], K = [...c.states, ...e(s, "dropdownItemVariants")], q = ["activeLink", "exactActiveLink"], J = () => W.forward({ toggle: "root" }, ["disabled", ...e(l, "buttonVariants")]), Y = () => ({
295
+ ...W.forward([
204
296
  "panel",
205
297
  "sheet",
206
298
  "header",
207
299
  "footer",
208
300
  "input"
209
- ], i.states.filter((e) => e !== "disabled")),
210
- ...B.forward([
301
+ ], c.states.filter((e) => e !== "disabled" && !q.includes(e))),
302
+ ...W.forward([
211
303
  "item",
212
304
  "itemText",
213
305
  "itemIcon",
214
306
  "itemDescription"
215
- ], i.states)
307
+ ], K)
216
308
  });
217
- process.env.NODE_ENV !== "production" && n("BbDropdownButton", t("BbDropdownButton"));
218
- let U = l(() => k["toggle:icon"] ?? "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M6 9l6 6l6 -6\" />\n</svg>\n"), { t: W } = r(), G = E("root-el"), K = b(!1), q = () => {
219
- K.value = !0, A("show");
220
- }, J = () => {
221
- K.value = !1, A("hide");
222
- }, Y = l(() => W("dropdownButton.open").value);
223
- return (e, t) => (y(), f("span", _({
309
+ process.env.NODE_ENV !== "production" && i("BbDropdownButton", r("BbDropdownButton"));
310
+ let X = m(() => M["toggle:icon"] ?? "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M6 9l6 6l6 -6\" />\n</svg>\n"), { t: Z } = a(), Q = A("root-el"), $ = w(!1), te = () => {
311
+ $.value = !0, N("show");
312
+ }, ne = () => {
313
+ $.value = !1, N("hide");
314
+ }, re = m(() => Z("dropdownButton.open").value);
315
+ return (e, t) => (C(), g("span", x({
224
316
  ref: "root-el",
225
317
  class: ["bb-dropdown-button", { "bb-dropdown-button--block": e.block }]
226
- }, z().root), [m(o, _({
227
- ...L(),
228
- ...z().main
318
+ }, H().root), [v(d, x({
319
+ ...B(),
320
+ ...H().main
229
321
  }, {
230
322
  class: "bb-dropdown-button__main",
231
- group: F(),
232
- pt: C(B).forward({
323
+ group: R(),
324
+ pt: D(W).forward({
233
325
  main: "root",
234
326
  icon: "icon",
235
327
  spinner: "spinner",
236
328
  text: "text"
237
- }, C(a).states)
238
- }), p({ _: 2 }, [j.default ? {
239
- name: "default",
240
- fn: D(() => [S(e.$slots, "default")]),
241
- key: "0"
242
- } : void 0]), 1040, ["group", "pt"]), F() ? (y(), u(s, {
329
+ }, G)
330
+ }), _({ _: 2 }, [
331
+ P.default ? {
332
+ name: "default",
333
+ fn: j(() => [E(e.$slots, "default")]),
334
+ key: "0"
335
+ } : void 0,
336
+ P.icon ? {
337
+ name: "icon",
338
+ fn: j((t) => [E(e.$slots, "icon", S(b(t)))]),
339
+ key: "1"
340
+ } : void 0,
341
+ P["prepend:icon"] ? {
342
+ name: "prepend:icon",
343
+ fn: j((t) => [E(e.$slots, "prepend:icon", S(b(t)))]),
344
+ key: "2"
345
+ } : void 0,
346
+ P["append:icon"] ? {
347
+ name: "append:icon",
348
+ fn: j((t) => [E(e.$slots, "append:icon", S(b(t)))]),
349
+ key: "3"
350
+ } : void 0
351
+ ]), 1040, ["group", "pt"]), R() ? (C(), ee(f, {
243
352
  key: 0,
244
353
  id: e.id,
245
354
  adaptive: e.adaptive,
246
- anchor: C(G),
355
+ anchor: D(Q),
356
+ "close-on-select": e.closeOnSelect,
247
357
  compact: e.compact,
248
358
  disabled: e.disabled,
249
359
  eager: e.eager,
250
- items: P(),
360
+ items: L(),
251
361
  "off-canvas-props": e.offCanvasProps,
252
362
  offset: e.offset,
253
363
  padding: e.padding,
254
364
  placement: e.placement,
255
- pt: H(),
365
+ pt: Y(),
256
366
  "transition-duration": e.transitionDuration,
257
367
  width: e.width,
258
- onHidden: t[0] ||= (e) => A("hidden"),
259
- onHide: J,
260
- "onItem:selected": t[1] ||= (e) => A("item:selected", e),
261
- "onItem:unselected": t[2] ||= (e) => A("item:unselected", e),
262
- onShow: q,
263
- onShown: t[3] ||= (e) => A("shown")
264
- }, p({
265
- activator: D(({ props: t, open: n, loading: r }) => [m(o, _({
266
- "aria-label": Y.value,
368
+ onHidden: t[0] ||= (e) => N("hidden"),
369
+ onHide: ne,
370
+ "onItem:selected": t[1] ||= (e) => N("item:selected", e),
371
+ "onItem:unselected": t[2] ||= (e) => N("item:unselected", e),
372
+ onShow: te,
373
+ onShown: t[3] ||= (e) => N("shown")
374
+ }, _({
375
+ activator: j(({ props: t, open: n, loading: r }) => [v(d, x({
376
+ "aria-label": re.value,
267
377
  class: "bb-dropdown-button__toggle",
268
378
  "disable-auto-loading": "",
269
379
  disabled: e.disabled,
270
380
  group: "",
271
- icon: U.value,
381
+ icon: X.value,
272
382
  "interactive-while-loading": "",
273
383
  loading: r,
274
384
  "model-value": n,
275
- pt: V(),
385
+ pt: J(),
276
386
  size: e.size,
277
387
  variant: e.variant
278
388
  }, t), null, 16, [
@@ -285,15 +395,16 @@ var O = /*@__PURE__*/ h({
285
395
  "size",
286
396
  "variant"
287
397
  ])]),
288
- default: D(() => [S(e.$slots, "dropdown")]),
398
+ default: j(() => [E(e.$slots, "dropdown")]),
289
399
  _: 2
290
- }, [x(N(), (t) => ({
400
+ }, [T(I(), (t) => ({
291
401
  name: t,
292
- fn: D((n) => [S(e.$slots, t, v(g(n)))])
402
+ fn: j((n) => [E(e.$slots, t, S(b(n)))])
293
403
  }))]), 1032, [
294
404
  "id",
295
405
  "adaptive",
296
406
  "anchor",
407
+ "close-on-select",
297
408
  "compact",
298
409
  "disabled",
299
410
  "eager",
@@ -305,8 +416,8 @@ var O = /*@__PURE__*/ h({
305
416
  "pt",
306
417
  "transition-duration",
307
418
  "width"
308
- ])) : d("", !0)], 16));
419
+ ])) : h("", !0)], 16));
309
420
  }
310
421
  });
311
422
  //#endregion
312
- export { O as default };
423
+ export { M as default };