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

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 (377) 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 +416 -6
  47. package/dist/ai/components.json +50 -48
  48. package/dist/ai/composables/useConfirm.md +39 -1
  49. package/dist/ai/design-tokens.json +6 -6
  50. package/dist/ai/guides/agent-contract.md +2 -2
  51. package/dist/ai/guides/ai-router.md +24 -23
  52. package/dist/ai/guides/app-layout.md +5 -0
  53. package/dist/ai/guides/component-picker.md +9 -2
  54. package/dist/ai/guides/design-language.md +24 -24
  55. package/dist/ai/guides/design-tokens.md +15 -8
  56. package/dist/ai/guides/icons-policy.md +9 -2
  57. package/dist/ai/guides/inertia-helpers.md +79 -49
  58. package/dist/ai/guides/installation-and-plugin-setup.md +12 -2
  59. package/dist/ai/guides/migration/adoption-checklist.md +235 -0
  60. package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -15
  61. package/dist/ai/guides/migration/components/bb-dialog.md +9 -9
  62. package/dist/ai/guides/migration/components/bb-dropdown.md +7 -2
  63. package/dist/ai/guides/migration/components/bb-popover.md +4 -2
  64. package/dist/ai/guides/migration/components/bb-select.md +19 -0
  65. package/dist/ai/guides/migration/components/bb-table.md +1 -0
  66. package/dist/ai/guides/migration/components/bb-toast.md +4 -0
  67. package/dist/ai/guides/migration/components/bb-tooltip.md +15 -12
  68. package/dist/ai/guides/migration/components/use-confirm.md +25 -2
  69. package/dist/ai/guides/migration/v2-to-v3.md +163 -9
  70. package/dist/ai/guides/migration/v3-beta-css-classes.md +7 -3
  71. package/dist/ai/guides/options-items-playbook.md +2 -1
  72. package/dist/ai/guides/passthrough.md +147 -85
  73. package/dist/ai/guides/preset-components.md +140 -15
  74. package/dist/ai/helpers/definePreset.json +7 -0
  75. package/dist/ai/helpers/definePreset.ts +123 -11
  76. package/dist/ai/helpers/inertia/manifest.json +15 -9
  77. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +4 -4
  78. package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +39 -24
  79. package/dist/ai/helpers/inertia/useRouteQuery.ts +10 -4
  80. package/dist/ai/index.md +1 -0
  81. package/dist/ai/manifest/common.json +0 -1
  82. package/dist/ai/manifest/components/BbAlert.json +7 -2
  83. package/dist/ai/manifest/components/BbBadge.json +13 -4
  84. package/dist/ai/manifest/components/BbBadge.tree.json +2 -0
  85. package/dist/ai/manifest/components/BbBadgeButton.json +4 -2
  86. package/dist/ai/manifest/components/BbBaseButton.json +4 -2
  87. package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
  88. package/dist/ai/manifest/components/BbButton.json +14 -3
  89. package/dist/ai/manifest/components/BbButton.tree.json +5 -1
  90. package/dist/ai/manifest/components/BbCheckboxGroup.json +13 -8
  91. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +11 -1
  92. package/dist/ai/manifest/components/BbColorInput.json +18 -15
  93. package/dist/ai/manifest/components/BbColorPalette.json +1 -1
  94. package/dist/ai/manifest/components/BbConfirm.json +4 -2
  95. package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
  96. package/dist/ai/manifest/components/BbDatePicker.json +1 -1
  97. package/dist/ai/manifest/components/BbDatePickerInput.json +17 -14
  98. package/dist/ai/manifest/components/BbDialog.tree.json +2 -1
  99. package/dist/ai/manifest/components/BbDropdown.json +24 -19
  100. package/dist/ai/manifest/components/BbDropdown.tree.json +9 -2
  101. package/dist/ai/manifest/components/BbDropdownButton.json +33 -20
  102. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -2
  103. package/dist/ai/manifest/components/BbForm.json +2 -2
  104. package/dist/ai/manifest/components/BbHost.tree.json +1 -1
  105. package/dist/ai/manifest/components/BbHoverCard.json +1 -1
  106. package/dist/ai/manifest/components/BbIndicator.json +8 -2
  107. package/dist/ai/manifest/components/BbNumberInput.json +5 -2
  108. package/dist/ai/manifest/components/BbOffCanvas.json +2 -2
  109. package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
  110. package/dist/ai/manifest/components/BbPopover.json +1 -1
  111. package/dist/ai/manifest/components/BbRadioGroup.json +17 -12
  112. package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -1
  113. package/dist/ai/manifest/components/BbSelect.json +21 -18
  114. package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
  115. package/dist/ai/manifest/components/BbSelectPopover.json +10 -10
  116. package/dist/ai/manifest/components/BbSelectPopover.tree.json +3 -2
  117. package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
  118. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -1
  119. package/dist/ai/manifest/components/BbTable.tree.json +14 -1
  120. package/dist/ai/manifest/components/BbTabs.json +9 -6
  121. package/dist/ai/manifest/components/BbTabs.tree.json +1 -1
  122. package/dist/ai/manifest/components/BbTabsList.json +6 -3
  123. package/dist/ai/manifest/components/BbTag.json +19 -16
  124. package/dist/ai/manifest/components/BbTag.tree.json +1 -1
  125. package/dist/ai/manifest/components/BbTextInput.json +6 -3
  126. package/dist/ai/manifest/components/BbTextarea.json +6 -3
  127. package/dist/ai/manifest/components/BbTimePicker.json +1 -1
  128. package/dist/ai/manifest/components/BbTimePickerInput.json +10 -7
  129. package/dist/ai/manifest/components/BbToast.json +7 -2
  130. package/dist/ai/manifest/components/BbToast.tree.json +4 -2
  131. package/dist/ai/manifest/components/BbTooltip.json +6 -5
  132. package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
  133. package/dist/ai/manifest/components/CommonField.json +1 -1
  134. package/dist/ai/manifest/components/OptionsContainer.json +3 -1
  135. package/dist/ai/manifest/components/OptionsContainer.tree.json +38 -0
  136. package/dist/ai/manifest/index.json +3 -3
  137. package/dist/ai/manifest/meta.json +5 -3
  138. package/dist/ai/manifest/types.advanced.json +5 -2
  139. package/dist/ai/manifest/types.api.json +9 -7
  140. package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
  141. package/dist/ai/recipes/inertia/records-workspace.md +49 -13
  142. package/dist/ai/recipes/nuxt/layout-scaffold.md +19 -6
  143. package/dist/ai/recipes/nuxt/records-workspace.md +42 -12
  144. package/dist/ai/recipes/vue/layout-scaffold.md +19 -6
  145. package/dist/ai/recipes/vue/records-workspace.md +42 -12
  146. package/dist/ai/source/BbAlert.md +94 -76
  147. package/dist/ai/source/BbBadge.md +174 -72
  148. package/dist/ai/source/BbBadgeButton.md +130 -65
  149. package/dist/ai/source/BbBaseButton.md +46 -124
  150. package/dist/ai/source/BbBaseCheckboxIcon.md +38 -0
  151. package/dist/ai/source/BbBaseRadioIcon.md +18 -0
  152. package/dist/ai/source/BbBaseSwitchIcon.md +51 -0
  153. package/dist/ai/source/BbButton.md +153 -36
  154. package/dist/ai/source/BbCheckboxGroup.md +142 -18
  155. package/dist/ai/source/BbColorInput.md +240 -204
  156. package/dist/ai/source/BbColorPalette.md +7 -4
  157. package/dist/ai/source/BbConfirm.md +34 -11
  158. package/dist/ai/source/BbConfirmPortal.md +24 -9
  159. package/dist/ai/source/BbDatePicker.md +11 -7
  160. package/dist/ai/source/BbDatePickerInput.md +306 -269
  161. package/dist/ai/source/BbDialog.md +49 -14
  162. package/dist/ai/source/BbDropdown.md +314 -197
  163. package/dist/ai/source/BbDropdownButton.md +197 -31
  164. package/dist/ai/source/BbDropdownGroup.md +274 -176
  165. package/dist/ai/source/BbForm.md +50 -6
  166. package/dist/ai/source/BbHoverCard.md +12 -5
  167. package/dist/ai/source/BbIcon.md +4 -3
  168. package/dist/ai/source/BbIndicator.md +73 -52
  169. package/dist/ai/source/BbNumberInput.md +293 -257
  170. package/dist/ai/source/BbOffCanvas.md +55 -29
  171. package/dist/ai/source/BbPopover.md +14 -10
  172. package/dist/ai/source/BbRadioGroup.md +413 -297
  173. package/dist/ai/source/BbSelect.md +549 -435
  174. package/dist/ai/source/BbSelectPopover.md +128 -33
  175. package/dist/ai/source/BbSwitchGroup.md +70 -10
  176. package/dist/ai/source/BbTable.md +369 -37
  177. package/dist/ai/source/BbTabs.md +115 -39
  178. package/dist/ai/source/BbTabsList.md +106 -38
  179. package/dist/ai/source/BbTabsPanels.md +96 -36
  180. package/dist/ai/source/BbTabsRoot.md +96 -36
  181. package/dist/ai/source/BbTag.md +267 -233
  182. package/dist/ai/source/BbTextInput.md +261 -225
  183. package/dist/ai/source/BbTextarea.md +251 -215
  184. package/dist/ai/source/BbTimePicker.md +11 -7
  185. package/dist/ai/source/BbTimePickerInput.md +257 -220
  186. package/dist/ai/source/BbToast.md +73 -32
  187. package/dist/ai/source/BbToastPortal.md +65 -30
  188. package/dist/ai/source/BbTooltip.md +148 -113
  189. package/dist/ai/source/CommonPopover.md +6 -1
  190. package/dist/ai/source/FlatListBox.md +19 -9
  191. package/dist/ai/source/GroupedListBox.md +19 -9
  192. package/dist/ai/source/OptionsContainer.md +25 -9
  193. package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +61 -36
  194. package/dist/components/BbAlert/types.d.ts +9 -5
  195. package/dist/components/BbAlert/types.js +8 -3
  196. package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +3 -3
  197. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +26 -17
  198. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +103 -50
  199. package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +20 -15
  200. package/dist/components/BbBadge/badgeButtonContext.d.ts +12 -1
  201. package/dist/components/BbBadge/types.d.ts +45 -15
  202. package/dist/components/BbBadge/types.js +12 -3
  203. package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +89 -126
  204. package/dist/components/BbBaseButton/types.d.ts +23 -4
  205. package/dist/components/BbBaseButton/types.js +7 -1
  206. package/dist/components/BbBaseButton/useLinkState.d.ts +41 -0
  207. package/dist/components/BbBaseButton/useLinkState.js +70 -0
  208. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -74
  209. package/dist/components/BbButton/types.d.ts +50 -13
  210. package/dist/components/BbButton/types.js +10 -3
  211. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +148 -95
  212. package/dist/components/BbCheckboxGroup/types.d.ts +34 -11
  213. package/dist/components/BbCheckboxGroup/types.js +9 -4
  214. package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
  215. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +134 -93
  216. package/dist/components/BbColorInput/types.d.ts +11 -4
  217. package/dist/components/BbColorInput/types.js +9 -3
  218. package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +82 -59
  219. package/dist/components/BbConfirm/types.d.ts +9 -4
  220. package/dist/components/BbConfirm/types.js +8 -3
  221. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
  222. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +68 -67
  223. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
  224. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +259 -215
  225. package/dist/components/BbDatePickerInput/types.d.ts +12 -5
  226. package/dist/components/BbDatePickerInput/types.js +9 -3
  227. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +223 -219
  228. package/dist/components/BbDialog/useDialogStack.d.ts +1 -1
  229. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +104 -89
  230. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -0
  231. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +323 -285
  232. package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -0
  233. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +411 -319
  234. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -98
  235. package/dist/components/BbDropdown/DropdownRow.vue.d.ts +4 -3
  236. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +49 -28
  237. package/dist/components/BbDropdown/normalizeGroups.d.ts +6 -0
  238. package/dist/components/BbDropdown/normalizeGroups.js +21 -15
  239. package/dist/components/BbDropdown/types.d.ts +59 -12
  240. package/dist/components/BbDropdown/types.js +16 -3
  241. package/dist/components/BbDropdown/useDropdownContext.d.ts +6 -0
  242. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -1
  243. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +179 -68
  244. package/dist/components/BbDropdownButton/types.d.ts +44 -16
  245. package/dist/components/BbDropdownButton/types.js +28 -3
  246. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +111 -89
  247. package/dist/components/BbForm/formSchema.d.ts +13 -0
  248. package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +100 -100
  249. package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +40 -25
  250. package/dist/components/BbIndicator/types.d.ts +9 -5
  251. package/dist/components/BbIndicator/types.js +8 -3
  252. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +243 -202
  253. package/dist/components/BbNumberInput/types.d.ts +12 -5
  254. package/dist/components/BbNumberInput/types.js +9 -3
  255. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
  256. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +401 -399
  257. package/dist/components/BbOffCanvas/types.d.ts +6 -2
  258. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +81 -80
  259. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +158 -105
  260. package/dist/components/BbRadioGroup/types.d.ts +21 -7
  261. package/dist/components/BbRadioGroup/types.js +9 -4
  262. package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -3
  263. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +181 -137
  264. package/dist/components/BbSelect/types.d.ts +36 -22
  265. package/dist/components/BbSelect/types.js +22 -3
  266. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +4 -4
  267. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +543 -532
  268. package/dist/components/BbSelectPopover/knownItems.d.ts +5 -0
  269. package/dist/components/BbSelectPopover/types.d.ts +46 -12
  270. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
  271. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +2 -2
  272. package/dist/components/BbSwitchGroup/types.d.ts +14 -4
  273. package/dist/components/BbSwitchGroup/types.js +8 -3
  274. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1102 -995
  275. package/dist/components/BbTable/estimatedFloors.golden.d.ts +25 -0
  276. package/dist/components/BbTable/measuredFloors.d.ts +46 -0
  277. package/dist/components/BbTable/measuredFloors.js +322 -0
  278. package/dist/components/BbTable/measuredFloorsTestKit.d.ts +27 -0
  279. package/dist/components/BbTable/textRuler.d.ts +71 -0
  280. package/dist/components/BbTable/textRuler.js +121 -0
  281. package/dist/components/BbTable/utils.d.ts +113 -6
  282. package/dist/components/BbTable/utils.js +118 -65
  283. package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +53 -35
  284. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +62 -45
  285. package/dist/components/BbTabs/types.d.ts +26 -11
  286. package/dist/components/BbTabs/types.js +23 -8
  287. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +205 -164
  288. package/dist/components/BbTag/types.d.ts +11 -4
  289. package/dist/components/BbTag/types.js +9 -3
  290. package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +98 -57
  291. package/dist/components/BbTextInput/types.d.ts +12 -5
  292. package/dist/components/BbTextInput/types.js +9 -3
  293. package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +137 -96
  294. package/dist/components/BbTextarea/types.d.ts +12 -5
  295. package/dist/components/BbTextarea/types.js +9 -3
  296. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +105 -104
  297. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +241 -197
  298. package/dist/components/BbTimePickerInput/types.d.ts +12 -5
  299. package/dist/components/BbTimePickerInput/types.js +9 -3
  300. package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +74 -32
  301. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +47 -47
  302. package/dist/components/BbToast/types.d.ts +10 -5
  303. package/dist/components/BbToast/types.js +18 -3
  304. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +85 -71
  305. package/dist/components/BbTooltip/types.d.ts +13 -8
  306. package/dist/components/BbTooltip/types.js +8 -3
  307. package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
  308. package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
  309. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +69 -69
  310. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +53 -50
  311. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +146 -143
  312. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +7 -2
  313. package/dist/components/OptionsContainer/types.d.ts +14 -3
  314. package/dist/composables/useBbFormContext.d.ts +4 -3
  315. package/dist/composables/useBbTabsContext.js +99 -85
  316. package/dist/composables/useChoiceIndicator.d.ts +58 -0
  317. package/dist/composables/useChoiceIndicator.js +197 -0
  318. package/dist/composables/useConfirm.d.ts +4 -4
  319. package/dist/composables/usePassthrough.d.ts +54 -1
  320. package/dist/composables/usePassthrough.js +100 -71
  321. package/dist/directives/bbTooltip.d.ts +12 -6
  322. package/dist/directives/createPopoverDirective.js +1 -1
  323. package/dist/index.d.ts +3 -1
  324. package/dist/llms-full.txt +2300 -543
  325. package/dist/llms-medium.txt +71 -53
  326. package/dist/llms.txt +2 -1
  327. package/dist/passthrough-deduper.js +6 -3
  328. package/dist/project-dts.d.ts +24 -0
  329. package/dist/project-dts.js +43 -17
  330. package/dist/styles.css +2 -2
  331. package/dist/types/AlertVariant.d.ts +14 -0
  332. package/dist/types/AlertVariant.js +9 -0
  333. package/dist/types/BadgeVariant.d.ts +14 -0
  334. package/dist/types/BadgeVariant.js +9 -0
  335. package/dist/types/ButtonVariant.d.ts +16 -0
  336. package/dist/types/ButtonVariant.js +11 -0
  337. package/dist/types/CheckboxVariant.d.ts +38 -0
  338. package/dist/types/CheckboxVariant.js +4 -0
  339. package/dist/types/CommonProps.d.ts +4 -3
  340. package/dist/types/Config.d.ts +7 -0
  341. package/dist/types/ConfirmVariant.d.ts +12 -0
  342. package/dist/types/ConfirmVariant.js +4 -0
  343. package/dist/types/DropdownItemVariant.d.ts +12 -0
  344. package/dist/types/DropdownItemVariant.js +4 -0
  345. package/dist/types/IndicatorVariant.d.ts +15 -0
  346. package/dist/types/IndicatorVariant.js +10 -0
  347. package/dist/types/InputVariant.d.ts +13 -0
  348. package/dist/types/InputVariant.js +8 -0
  349. package/dist/types/RadioVariant.d.ts +38 -0
  350. package/dist/types/RadioVariant.js +4 -0
  351. package/dist/types/TabsVariant.d.ts +13 -0
  352. package/dist/types/TabsVariant.js +8 -0
  353. package/dist/types/ToastVariant.d.ts +15 -0
  354. package/dist/types/ToastVariant.js +10 -0
  355. package/dist/types/TooltipVariant.d.ts +12 -0
  356. package/dist/types/TooltipVariant.js +4 -0
  357. package/dist/types/passthrough.d.ts +83 -15
  358. package/dist/types/passthrough.js +2 -2
  359. package/dist/types/ptComponentMap.d.ts +35 -23
  360. package/dist/utilities/functions/extractDomContainer.d.ts +20 -1
  361. package/dist/utilities/functions/extractDomContainer.js +8 -3
  362. package/dist/utils/focusVisibility.d.ts +6 -0
  363. package/dist/utils/focusVisibility.js +4 -1
  364. package/dist/utils/passthroughDeduper.d.ts +14 -0
  365. package/dist/utils/versionCheck.js +1 -1
  366. package/dist/vite-plugin.d.ts +64 -7
  367. package/dist/vite.js +385 -259
  368. package/llms.txt +2 -1
  369. package/package.json +3 -3
  370. package/scripts/lib/adoption-checklist.json +312 -0
  371. package/scripts/lib/eslint-plugin.d.ts +13 -0
  372. package/scripts/lib/eslint-plugin.mjs +75 -11
  373. package/scripts/lib/idiom-scan.mjs +65 -0
  374. package/scripts/lib/mcp-config.mjs +203 -9
  375. package/scripts/lib/migrate-fix.mjs +42 -1
  376. package/scripts/lib/project-variant-dts.mjs +18 -0
  377. package/scripts/lib/validate-bb-markup.mjs +99 -2
@@ -6,39 +6,39 @@ import { useUrlQueryParam as i } from "./useUrlQueryParam.js";
6
6
  import { useId as a } from "./useId.js";
7
7
  import { slotKey as o } from "../utilities/functions/slotKey.js";
8
8
  import { isNotNil as s } from "../utilities/functions/isNotNil.js";
9
- import { computed as c, getCurrentInstance as l, inject as u, onScopeDispose as d, provide as f, ref as p, shallowReactive as m, watch as h } from "vue";
9
+ import { computed as c, getCurrentInstance as l, inject as u, nextTick as d, onMounted as f, onScopeDispose as p, onUnmounted as m, provide as h, ref as g, shallowReactive as _, watch as v } from "vue";
10
10
  //#region src/composables/useBbTabsContext.ts
11
- var g = Symbol("BbTabsContext"), _ = m(/* @__PURE__ */ new Map()), v = (u, m) => {
12
- let v = i(() => u.queryKey), { route: y, router: b } = v, { error: x, warn: S } = e(), { isInertia: C } = r(), w = l(), T = a().id.value, E = u.id ?? T, D = `bb-tabs_${E}`, O = p(null), k = c(() => u.items.findIndex((e) => e.value === O.value)), A = c(() => k.value === 0), j = c(() => k.value === u.items.length - 1);
11
+ var y = Symbol("BbTabsContext"), b = _(/* @__PURE__ */ new Map()), x = /* @__PURE__ */ new Map(), S = (u, _) => {
12
+ let S = i(() => u.queryKey), { route: C, router: w } = S, { error: T, warn: E } = e(), { isInertia: ee } = r(), D = l(), O = a().id.value, k = u.id ?? O, A = `bb-tabs_${k}`, j = g(null), M = c(() => u.items.findIndex((e) => e.value === j.value)), N = c(() => M.value === 0), P = c(() => M.value === u.items.length - 1);
13
13
  u.items.forEach((e) => {
14
- e.value ? (u.server || e.server) && !u.navigation && x(`A tab item has a server property but the navigation prop is false: ${JSON.stringify(e, null, 2)}`) : x(`A tab item has no value: ${JSON.stringify(e, null, 2)}`);
14
+ e.value ? (u.server || e.server) && !u.navigation && T(`A tab item has a server property but the navigation prop is false: ${JSON.stringify(e, null, 2)}`) : T(`A tab item has no value: ${JSON.stringify(e, null, 2)}`);
15
15
  });
16
- let M = v.tracked, N = (e) => String(e).split(/\W+/g).join("_").toLowerCase(), P = (e) => {
16
+ let F = S.tracked, I = (e) => String(e).split(/\W+/g).join("_").toLowerCase(), L = (e) => {
17
17
  let t = u.items.find((t) => o(t.value) === e);
18
18
  if (t) return {
19
19
  key: t.value,
20
20
  legacy: !1
21
21
  };
22
- let n = u.items.find((t) => N(t.value) === e);
22
+ let n = u.items.find((t) => I(t.value) === e);
23
23
  return n ? {
24
24
  key: n.value,
25
25
  legacy: !0
26
26
  } : null;
27
- }, F = v.readLive, I = (e) => {
27
+ }, R = S.readLive, z = (e) => {
28
28
  if (typeof window > "u") return;
29
29
  let t = o(e);
30
- (b && y.value ? y.value.query?.[u.queryKey] : F()) !== t && v.write(t, "replace");
31
- }, L = () => {
32
- let e = v.read(), t = e ? P(e) : null, n = t?.key ?? null;
33
- if (u.navigation && n) O.value = n, t?.legacy && typeof window < "u" && queueMicrotask(() => I(n));
34
- else if (u.modelValue) O.value = u.modelValue;
30
+ (w && C.value ? C.value.query?.[u.queryKey] : R()) !== t && S.write(t, "replace");
31
+ }, B = () => {
32
+ let e = S.read(), t = e ? L(e) : null, n = t?.key ?? null;
33
+ if (u.navigation && n) j.value = n, t?.legacy && typeof window < "u" && queueMicrotask(() => z(n));
34
+ else if (u.modelValue) j.value = u.modelValue;
35
35
  else if (u.items[0]) {
36
36
  let e = u.items.find((e) => !e.disabled);
37
- e && (O.value = e.value);
37
+ e && (j.value = e.value);
38
38
  }
39
39
  };
40
- L();
41
- let R = (e) => ({
40
+ B();
41
+ let V = (e) => ({
42
42
  headers: e.headers ?? u.headers,
43
43
  only: e.only ?? u.only,
44
44
  preserveScroll: e.preserveScroll ?? u.preserveScroll,
@@ -51,35 +51,35 @@ var g = Symbol("BbTabsContext"), _ = m(/* @__PURE__ */ new Map()), v = (u, m) =>
51
51
  onError: e.onError ?? u.onError,
52
52
  onCancel: e.onCancel ?? u.onCancel,
53
53
  onFinish: e.onFinish ?? u.onFinish
54
- }), z = (e) => {
55
- u.modelValue !== e && m("update:modelValue", e), O.value = e;
56
- }, B = (e, n = u.replace) => {
54
+ }), H = (e) => {
55
+ u.modelValue !== e && _("update:modelValue", e), j.value = e;
56
+ }, U = (e, n = u.replace) => {
57
57
  let r = u.items.find((t) => t.value === e);
58
58
  if (t(r)) {
59
- S(`Cannot select tab "${e}" on tabs "${E}": no item with this key. Available keys: ${u.items.map((e) => e.value).join(", ")}. Selection unchanged.`);
59
+ E(`Cannot select tab "${e}" on tabs "${k}": no item with this key. Available keys: ${u.items.map((e) => e.value).join(", ")}. Selection unchanged.`);
60
60
  return;
61
61
  }
62
- if (r.value === O.value) return;
62
+ if (r.value === j.value) return;
63
63
  let i = o(e);
64
- if (u.navigation && y.value && b && M.value !== i) v.write(i, n ? "replace" : "push");
65
- else if (u.navigation && C && F() !== i) {
64
+ if (u.navigation && C.value && w && F.value !== i) S.write(i, n ? "replace" : "push");
65
+ else if (u.navigation && ee && R() !== i) {
66
66
  let t = r.href ?? globalThis.location.href;
67
67
  if (u.server || r.server) {
68
- let n = w?.proxy?.$inertia, a = R(r), o = Object.fromEntries(Object.entries(a).filter(([e, t]) => s(t))), c = new URL(t, window.location.origin);
68
+ let n = D?.proxy?.$inertia, a = V(r), o = Object.fromEntries(Object.entries(a).filter(([e, t]) => s(t))), c = new URL(t, window.location.origin);
69
69
  c.searchParams.set(u.queryKey, i), n.visit(c.toString(), {
70
70
  ...o,
71
- onSuccess: (...t) => (z(e), a.onSuccess?.(...t))
71
+ onSuccess: (...t) => (H(e), a.onSuccess?.(...t))
72
72
  });
73
73
  return;
74
74
  }
75
- v.write(i, n ? "replace" : "push", t);
75
+ S.write(i, n ? "replace" : "push", t);
76
76
  }
77
- z(e);
78
- }, V = () => {
79
- O.value && u.modelValue !== O.value && m("update:modelValue", O.value);
77
+ H(e);
78
+ }, W = () => {
79
+ j.value && u.modelValue !== j.value && _("update:modelValue", j.value);
80
80
  };
81
- V();
82
- let H = (e, t) => {
81
+ W();
82
+ let G = (e, t) => {
83
83
  let n = null;
84
84
  switch (e) {
85
85
  case "first":
@@ -103,35 +103,35 @@ var g = Symbol("BbTabsContext"), _ = m(/* @__PURE__ */ new Map()), v = (u, m) =>
103
103
  if (n === null) return null;
104
104
  let r = u.items[n];
105
105
  return !r || r.disabled ? null : n;
106
- }, U = (e) => {
107
- document.getElementById(`${D}_tab_${o(u.items[e].value)}`)?.focus();
108
- }, W = (e) => {
106
+ }, K = (e) => {
107
+ document.getElementById(`${A}_tab_${o(u.items[e].value)}`)?.focus();
108
+ }, q = (e) => {
109
109
  if (![
110
110
  "first",
111
111
  "previous",
112
112
  "next",
113
113
  "last"
114
114
  ].includes(e)) {
115
- S(`Invalid goTo target "${e}" on tabs "${E}". Valid targets: 'first', 'previous', 'next', 'last'. Selection unchanged.`);
115
+ E(`Invalid goTo target "${e}" on tabs "${k}". Valid targets: 'first', 'previous', 'next', 'last'. Selection unchanged.`);
116
116
  return;
117
117
  }
118
118
  if (!u.items.length) return;
119
- let t = H(e, k.value);
120
- t !== null && (U(t), B(u.items[t].value));
121
- }, G = c(() => u.manualActivation ?? (!!u.server || u.items.some((e) => !!e.server))), K = (e, t) => {
122
- if (!G.value) {
123
- W(e);
119
+ let t = G(e, M.value);
120
+ t !== null && (K(t), U(u.items[t].value));
121
+ }, J = c(() => u.manualActivation ?? (!!u.server || u.items.some((e) => !!e.server))), Y = (e, t) => {
122
+ if (!J.value) {
123
+ q(e);
124
124
  return;
125
125
  }
126
126
  if (!u.items.length) return;
127
- let n = t.currentTarget?.id, r = u.items.findIndex((e) => `${D}_tab_${o(e.value)}` === n), i = r === -1 ? k.value : r, a = H(e, i);
128
- a !== null && U(a);
129
- }, q = (e) => {
127
+ let n = t.currentTarget?.id, r = u.items.findIndex((e) => `${A}_tab_${o(e.value)}` === n), i = r === -1 ? M.value : r, a = G(e, i);
128
+ a !== null && K(a);
129
+ }, X = (e) => {
130
130
  if (u.disabled) return;
131
131
  let t = u.direction === "vertical";
132
- e.key === "ArrowRight" || t && e.key === "ArrowDown" ? (e.preventDefault(), K("next", e)) : e.key === "ArrowLeft" || t && e.key === "ArrowUp" ? (e.preventDefault(), K("previous", e)) : e.key === "Home" ? (e.preventDefault(), K("first", e)) : e.key === "End" && (e.preventDefault(), K("last", e));
133
- }, J = c(() => {
134
- let e = O.value, t = k.value;
132
+ e.key === "ArrowRight" || t && e.key === "ArrowDown" ? (e.preventDefault(), Y("next", e)) : e.key === "ArrowLeft" || t && e.key === "ArrowUp" ? (e.preventDefault(), Y("previous", e)) : e.key === "Home" ? (e.preventDefault(), Y("first", e)) : e.key === "End" && (e.preventDefault(), Y("last", e));
133
+ }, Z = c(() => {
134
+ let e = j.value, t = M.value;
135
135
  return u.items.map((n) => {
136
136
  let { value: r, label: i, eager: a } = n, s = r === e, c = !!(n.disabled || u.disabled);
137
137
  return {
@@ -139,8 +139,8 @@ var g = Symbol("BbTabsContext"), _ = m(/* @__PURE__ */ new Map()), v = (u, m) =>
139
139
  value: r,
140
140
  label: i,
141
141
  eager: a,
142
- tabId: `${D}_tab_${o(r)}`,
143
- panelId: `${D}_tabpanel_${o(r)}`,
142
+ tabId: `${A}_tab_${o(r)}`,
143
+ panelId: `${A}_tabpanel_${o(r)}`,
144
144
  labelSlotName: `${o(r)}:label`,
145
145
  panelSlotName: o(r),
146
146
  active: s,
@@ -151,40 +151,40 @@ var g = Symbol("BbTabsContext"), _ = m(/* @__PURE__ */ new Map()), v = (u, m) =>
151
151
  current: e,
152
152
  currentIndex: t,
153
153
  disabled: c,
154
- isFirst: A.value,
155
- isLast: j.value,
154
+ isFirst: N.value,
155
+ isLast: P.value,
156
156
  selected: s,
157
157
  label: i,
158
158
  value: r,
159
- goTo: W
159
+ goTo: q
160
160
  },
161
- onClick: () => B(r),
162
- onKeydown: q
161
+ onClick: () => U(r),
162
+ onKeydown: X
163
163
  };
164
164
  });
165
165
  });
166
- h(() => u.modelValue, (e) => {
167
- e && B(e);
168
- }), v.onExternalChange((e) => {
169
- if (!e || !b && !u.navigation) return;
170
- let t = P(e);
171
- t && (B(t.key, t.legacy || void 0), t.legacy && I(t.key));
166
+ v(() => u.modelValue, (e) => {
167
+ e && U(e);
168
+ }), S.onExternalChange((e) => {
169
+ if (!e || !w && !u.navigation) return;
170
+ let t = L(e);
171
+ t && (U(t.key, t.legacy || void 0), t.legacy && z(t.key));
172
172
  });
173
- let Y = p("right");
174
- h(O, (e, t) => {
173
+ let Q = g("right");
174
+ v(j, (e, t) => {
175
175
  if (e && t) {
176
176
  let n = u.items.findIndex((t) => t.value === e), r = u.items.findIndex((e) => e.value === t);
177
- Y.value = n > r ? "right" : "left";
177
+ Q.value = n > r ? "right" : "left";
178
178
  }
179
- }, { flush: "sync" }), h(() => n(u.items), () => {
180
- O.value && !u.items.find((e) => e.value === O.value) && (L(), V());
179
+ }, { flush: "sync" }), v(() => n(u.items), () => {
180
+ j.value && !u.items.find((e) => e.value === j.value) && (B(), W());
181
181
  }, {
182
182
  immediate: !0,
183
183
  deep: !0
184
184
  });
185
- let X = {
186
- id: E,
187
- instanceid: D,
185
+ let $ = {
186
+ id: k,
187
+ instanceid: A,
188
188
  items: c(() => u.items),
189
189
  disabled: c(() => !!u.disabled),
190
190
  eager: c(() => !!u.eager),
@@ -194,21 +194,35 @@ var g = Symbol("BbTabsContext"), _ = m(/* @__PURE__ */ new Map()), v = (u, m) =>
194
194
  compact: c(() => !!u.compact),
195
195
  direction: c(() => u.direction),
196
196
  variant: c(() => u.variant),
197
- currentTab: O,
198
- currentTabIndex: k,
199
- isFirst: A,
200
- isLast: j,
201
- mappedItems: J,
202
- animationDirection: Y,
203
- select: B,
204
- goTo: W
197
+ currentTab: j,
198
+ currentTabIndex: M,
199
+ isFirst: N,
200
+ isLast: P,
201
+ mappedItems: Z,
202
+ animationDirection: Q,
203
+ select: U,
204
+ goTo: q
205
205
  };
206
- return f(g, X), typeof window < "u" && (_.has(E) && x(`Duplicate tabs id "${E}": useBbTabsContext("${E}") will resolve to the most recently mounted instance.`), _.set(E, X), d(() => {
207
- _.get(E) === X && _.delete(E);
208
- })), X;
209
- }, y = () => u(g, null), b = (t) => {
206
+ if (h(y, $), typeof window < "u") {
207
+ b.set(k, $);
208
+ let e = {};
209
+ f(() => {
210
+ let t = x.get(k) ?? /* @__PURE__ */ new Set();
211
+ t.add(e), x.set(k, t), d(() => {
212
+ let t = x.get(k);
213
+ t && t.size > 1 && [...t].at(-1) === e && T(`Duplicate tabs id "${k}": useBbTabsContext("${k}") will resolve to the most recently mounted instance.`);
214
+ });
215
+ }), m(() => {
216
+ let t = x.get(k);
217
+ t?.delete(e), t?.size || x.delete(k);
218
+ }), p(() => {
219
+ b.get(k) === $ && b.delete(k);
220
+ });
221
+ }
222
+ return $;
223
+ }, C = () => u(y, null), w = (t) => {
210
224
  let { warn: n } = e(), r = (e) => {
211
- let r = _.get(t);
225
+ let r = b.get(t);
212
226
  if (!r) {
213
227
  n(`[useBbTabsContext] No mounted <BbTabs>/<BbTabsRoot> with id "${t}"; call ignored.`);
214
228
  return;
@@ -216,9 +230,9 @@ var g = Symbol("BbTabsContext"), _ = m(/* @__PURE__ */ new Map()), v = (u, m) =>
216
230
  e(r);
217
231
  };
218
232
  return {
219
- isReady: c(() => _.has(t)),
233
+ isReady: c(() => b.has(t)),
220
234
  current: c({
221
- get: () => _.get(t)?.currentTab.value ?? null,
235
+ get: () => b.get(t)?.currentTab.value ?? null,
222
236
  set: (e) => {
223
237
  if (e == null) {
224
238
  n(`[useBbTabsContext] "current" cannot be set to null for id "${t}"; a tab is always selected. Assignment ignored.`);
@@ -227,12 +241,12 @@ var g = Symbol("BbTabsContext"), _ = m(/* @__PURE__ */ new Map()), v = (u, m) =>
227
241
  r((t) => t.select(e));
228
242
  }
229
243
  }),
230
- currentIndex: c(() => _.get(t)?.currentTabIndex.value ?? -1),
231
- isFirst: c(() => _.get(t)?.isFirst.value ?? !1),
232
- isLast: c(() => _.get(t)?.isLast.value ?? !1),
244
+ currentIndex: c(() => b.get(t)?.currentTabIndex.value ?? -1),
245
+ isFirst: c(() => b.get(t)?.isFirst.value ?? !1),
246
+ isLast: c(() => b.get(t)?.isLast.value ?? !1),
233
247
  goTo: (e) => r((t) => t.goTo(e)),
234
248
  select: (e) => r((t) => t.select(e))
235
249
  };
236
250
  };
237
251
  //#endregion
238
- export { v as createTabsContext, b as useBbTabsContext, y as useInternalTabsContext };
252
+ export { S as createTabsContext, w as useBbTabsContext, C as useInternalTabsContext };
@@ -0,0 +1,58 @@
1
+ import { Ref } from 'vue';
2
+ import { Option } from '../types/Option';
3
+ type Box = {
4
+ left: number;
5
+ top: number;
6
+ width: number;
7
+ height: number;
8
+ };
9
+ /** One indicator box, measured against the list (its offset parent). */
10
+ export type ChoiceIndicatorBox = Box & {
11
+ /** Stable across measurements, so a moving or growing box animates. */
12
+ key: string;
13
+ /**
14
+ * Fading out (a run left with no pick): drawn at the centre of its old
15
+ * box at size zero on the strip's axis, transparent, then dropped.
16
+ */
17
+ vanishing?: boolean;
18
+ /** Split off another pill: no pop-in, it opens the hole from there. */
19
+ peeled?: boolean;
20
+ /**
21
+ * This pill touches another on its low (left / top) or high (right /
22
+ * bottom) side, physically: drawn as one shape with it there.
23
+ */
24
+ seamStart?: boolean;
25
+ seamEnd?: boolean;
26
+ /** Placed without a transition: a split pill's starting box. */
27
+ instant?: boolean;
28
+ };
29
+ /**
30
+ * The indicators of a choice group's tabs look (`variant`, Q76.11 d):
31
+ * BbTabs' sliding indicator on a radio or checkbox group. Measures the
32
+ * checked rows (rendered in option order, so row `i` is option `i`) against
33
+ * the list, on the strip's axis (`vertical` stacks the rows):
34
+ *
35
+ * - a radio group has ONE indicator, which slides from row to row;
36
+ * - a checkbox `line` has one bar per checked row; adjacent bars abut;
37
+ * - a checkbox `pill` (and a registered look) has persistent pills: one
38
+ * per run of adjacent picks at first, then each pill stretches, shortens,
39
+ * splits or fades as options are ticked (see `measurePills`).
40
+ *
41
+ * `ready` turns on two frames after the first real measurement, as in
42
+ * BbTabsList: until then the CSS paints the checked rows themselves and the
43
+ * indicators do not transition, so a mount never animates in from 0×0.
44
+ */
45
+ export declare const useChoiceIndicator: (options: {
46
+ kind: "radio" | "checkbox";
47
+ variant: () => string | undefined;
48
+ vertical: () => boolean;
49
+ list: () => HTMLElement | null | undefined;
50
+ rows: () => readonly Option[];
51
+ /** The row class (`bb-radio-group__item`): the list's direct children that are rows. */
52
+ rowClass: string;
53
+ }) => {
54
+ boxes: Ref<ChoiceIndicatorBox[]>;
55
+ ready: Ref<boolean>;
56
+ styleOf: (box: ChoiceIndicatorBox) => Record<string, string | undefined>;
57
+ };
58
+ export {};
@@ -0,0 +1,197 @@
1
+ import { nextTick as e, onBeforeUnmount as t, onMounted as n, ref as r, watch as i } from "vue";
2
+ //#region src/composables/useChoiceIndicator.ts
3
+ var a = 300, o = (o) => {
4
+ let s = r([]), c = r(!1), l = 0, u = (e, t) => {
5
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.devicePixelRatio || 1, a = (e) => Math.round(e * i) / i, o = a(n.left - r.left - t.clientLeft + t.scrollLeft), s = a(n.top - r.top - t.clientTop + t.scrollTop);
6
+ return {
7
+ left: o,
8
+ top: s,
9
+ width: a(n.left - r.left - t.clientLeft + t.scrollLeft + n.width) - o,
10
+ height: a(n.top - r.top - t.clientTop + t.scrollTop + n.height) - s
11
+ };
12
+ }, d = (e, t) => {
13
+ let n = Math.min(e.left, t.left), r = Math.min(e.top, t.top);
14
+ return {
15
+ left: n,
16
+ top: r,
17
+ width: Math.max(e.left + e.width, t.left + t.width) - n,
18
+ height: Math.max(e.top + e.height, t.top + t.height) - r
19
+ };
20
+ }, f = (e) => o.vertical() ? {
21
+ ...e,
22
+ top: e.top + e.height / 2,
23
+ height: 0
24
+ } : {
25
+ ...e,
26
+ left: e.left + e.width / 2,
27
+ width: 0
28
+ }, p = [], m, h = !1, g = () => {
29
+ h && (h = !1, T());
30
+ }, _ = () => {
31
+ for (let e of p) clearTimeout(e);
32
+ p = [], m !== void 0 && cancelAnimationFrame(m), m = void 0;
33
+ }, v = (e) => {
34
+ m = requestAnimationFrame(() => {
35
+ m = requestAnimationFrame(() => {
36
+ m = void 0, e();
37
+ });
38
+ });
39
+ }, y = [], b = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map(), S = [], C = /* @__PURE__ */ new Set(), w = (e) => {
40
+ let t = new Map(e.map((e) => [e.option.valueHash, e.index])), n = new Map(e.map((e) => [e.option.valueHash, e.box])), r = e.filter((e) => e.option.selected).map((e) => e.option.valueHash), i = new Set(r), u = new Set(y.flatMap((e) => e.hashes)), w = (e) => t.get(e) ?? -1, T = (e, t = n) => e.hashes.map((e) => t.get(e)).reduce(d), E = (e, t) => !!e && !!t && w(e.hashes[e.hashes.length - 1]) + 1 === w(t.hashes[0]), D = r.length === u.size && r.every((e) => u.has(e));
41
+ if (D && y.length && (p.length || m !== void 0)) {
42
+ h = !0;
43
+ return;
44
+ }
45
+ let O = /* @__PURE__ */ new Map();
46
+ if (D || _(), !y.length) for (let e of [...r].sort((e, t) => w(e) - w(t))) {
47
+ let t = y[y.length - 1];
48
+ t && w(t.hashes[t.hashes.length - 1]) === w(e) - 1 ? t.hashes.push(e) : y.push({
49
+ key: `pill-${++l}`,
50
+ seq: l,
51
+ hashes: [e]
52
+ });
53
+ }
54
+ else if (!D) {
55
+ let e = [...u].filter((e) => !i.has(e)).sort((e, t) => w(t) - w(e));
56
+ for (let t of e) {
57
+ let e = y.find((e) => e.hashes.includes(t)), n = e.hashes.indexOf(t);
58
+ if (n === 0 || n === e.hashes.length - 1) {
59
+ e.hashes.splice(n, 1);
60
+ continue;
61
+ }
62
+ let r = e.hashes.splice(n).slice(1), i = {
63
+ key: `pill-${++l}`,
64
+ seq: l,
65
+ hashes: r,
66
+ peeled: !0
67
+ };
68
+ y.push(i), O.set(i.key, [t, ...r].map((e) => b.get(e)).reduce(d));
69
+ }
70
+ for (let e of y.filter((e) => !e.hashes.length)) {
71
+ let t = x.get(e.key);
72
+ if (!t) continue;
73
+ let n = {
74
+ key: e.key,
75
+ ...f(t),
76
+ vanishing: !0
77
+ };
78
+ S.push(n);
79
+ let r = setTimeout(() => {
80
+ C.delete(r), S = S.filter((e) => e !== n), s.value = s.value.filter((e) => e.key !== n.key);
81
+ }, c.value ? a : 0);
82
+ C.add(r);
83
+ }
84
+ y = y.filter((e) => e.hashes.length);
85
+ let t = r.filter((e) => !u.has(e)).sort((e, t) => w(e) - w(t));
86
+ for (let e of t) {
87
+ let t = w(e), n = y.find((e) => w(e.hashes[e.hashes.length - 1]) === t - 1), r = y.find((e) => w(e.hashes[0]) === t + 1);
88
+ n ? n.hashes.push(e) : r ? r.hashes.unshift(e) : y.push({
89
+ key: `pill-${++l}`,
90
+ seq: l,
91
+ hashes: [e]
92
+ });
93
+ }
94
+ }
95
+ let k = [...y].sort((e, t) => w(e.hashes[0]) - w(t.hashes[0])), A = (e) => o.vertical() ? e.top : e.left, j = k.map((e) => ({
96
+ pill: e,
97
+ box: T(e)
98
+ })), M = [...y].sort((e, t) => e.seq - t.seq).map((e) => {
99
+ let t = k.indexOf(e), { box: n } = j[t], r = [E(j[t - 1]?.pill, e) ? j[t - 1] : void 0, E(e, j[t + 1]?.pill) ? j[t + 1] : void 0].filter((e) => !!e).map((e) => A(e.box) < A(n) ? "low" : "high");
100
+ return {
101
+ key: e.key,
102
+ ...n,
103
+ seamStart: r.includes("low") || void 0,
104
+ seamEnd: r.includes("high") || void 0,
105
+ peeled: e.peeled
106
+ };
107
+ });
108
+ if (b = n, x = new Map(M.map((e) => [e.key, T(y.find((t) => t.key === e.key))])), !c.value) {
109
+ s.value = M;
110
+ return;
111
+ }
112
+ O.size ? (s.value = [...M.map((e) => O.has(e.key) ? {
113
+ ...e,
114
+ ...O.get(e.key),
115
+ instant: !0
116
+ } : e), ...S], v(() => {
117
+ for (let e of Array.from(o.list()?.children ?? [])) {
118
+ let t = getComputedStyle(e);
119
+ t.left, t.top, t.width, t.height;
120
+ }
121
+ s.value = [...M, ...S], g();
122
+ })) : s.value = [...M, ...S];
123
+ }, T = () => {
124
+ let e = o.list(), t = o.variant();
125
+ if (!e || !t) {
126
+ _(), s.value = [], y = [], S = [];
127
+ return;
128
+ }
129
+ let n = Array.from(e.children).filter((e) => e instanceof HTMLElement && e.classList.contains(o.rowClass)), r = o.rows();
130
+ if (n.length !== r.length) return;
131
+ let i = r.map((t, r) => ({
132
+ option: t,
133
+ index: r,
134
+ box: u(n[r], e)
135
+ })), a = i.filter(({ option: e }) => e.selected);
136
+ if (o.kind === "radio") {
137
+ let e = a[0], t = e && n[e.index];
138
+ s.value = t ? [{
139
+ key: "one",
140
+ left: t.offsetLeft,
141
+ top: t.offsetTop,
142
+ width: t.clientWidth,
143
+ height: t.clientHeight
144
+ }] : [];
145
+ } else t === "line" ? s.value = a.map(({ option: e, box: t }) => ({
146
+ key: e.valueHash,
147
+ ...t
148
+ })) : w(i);
149
+ !c.value && s.value.some((e) => e.width > 0) && requestAnimationFrame(() => requestAnimationFrame(() => {
150
+ c.value = !0;
151
+ }));
152
+ }, E, D = () => {
153
+ E?.disconnect();
154
+ let e = o.list();
155
+ if (!(!e || !o.variant() || typeof ResizeObserver > "u")) {
156
+ E ??= new ResizeObserver(() => T()), E.observe(e);
157
+ for (let t of Array.from(e.children)) t.classList.contains(o.rowClass) && E.observe(t);
158
+ }
159
+ };
160
+ return n(() => {
161
+ T(), D(), document.fonts?.ready.then(T);
162
+ }), t(() => {
163
+ E?.disconnect(), _();
164
+ for (let e of C) clearTimeout(e);
165
+ }), i(() => [
166
+ o.variant(),
167
+ o.vertical(),
168
+ o.list(),
169
+ o.rows().map((e) => `${e.valueHash}:${+!!e.selected}`).join("|")
170
+ ], async () => {
171
+ await e(), T(), D();
172
+ }, { flush: "post" }), {
173
+ boxes: s,
174
+ ready: c,
175
+ styleOf: (e) => {
176
+ let t = o.vertical(), n = {
177
+ "--left": `${e.left}px`,
178
+ "--top": `${e.top}px`,
179
+ "--width": `${e.width + (e.seamEnd && !t ? 1 : 0)}px`,
180
+ "--height": `${e.height + (e.seamEnd && t ? 1 : 0)}px`,
181
+ opacity: e.vanishing ? "0" : void 0,
182
+ animation: e.peeled ? "none" : void 0,
183
+ transition: e.instant ? "none" : void 0
184
+ };
185
+ if (!e.seamStart && !e.seamEnd) return n;
186
+ let [r, i] = t ? ["Top", "Bottom"] : ["Left", "Right"], a = (e) => t ? [`border${e}LeftRadius`, `border${e}RightRadius`] : [`borderTop${e}Radius`, `borderBottom${e}Radius`];
187
+ for (let [t, o] of [[e.seamStart, r], [e.seamEnd, i]]) if (t) {
188
+ for (let e of a(o)) n[e] = "0";
189
+ n[`border${o}Width`] = "0";
190
+ }
191
+ let s = `${1 / (window.devicePixelRatio || 1)}px`, c = e.seamStart ? s : "-8px", l = e.seamEnd ? "0" : "-8px";
192
+ return n.clipPath = t ? `inset(${c} -8px ${l} -8px)` : `inset(-8px ${l} -8px ${c})`, n;
193
+ }
194
+ };
195
+ };
196
+ //#endregion
197
+ export { o as useChoiceIndicator };
@@ -255,15 +255,15 @@ export declare const confirmState: import('vue').ComputedRef<{
255
255
  readonly actionBusy: number | null;
256
256
  readonly current: {
257
257
  readonly fullscreen?: boolean | "mobile" | undefined;
258
- readonly text?: string | undefined;
259
- readonly size?: keyof DialogSizes | undefined;
260
- readonly title?: string | undefined;
261
258
  readonly data?: {
262
259
  readonly [x: string]: any;
263
260
  } | undefined;
261
+ readonly text?: string | undefined;
262
+ readonly size?: keyof DialogSizes | undefined;
263
+ readonly title?: string | undefined;
264
+ readonly variant?: ConfirmVariantType | undefined;
264
265
  readonly stack?: string | undefined;
265
266
  readonly hideClose?: boolean | undefined;
266
- readonly variant?: ConfirmVariantType | undefined;
267
267
  readonly duration?: number | undefined;
268
268
  readonly focusTarget?: string | undefined;
269
269
  readonly persistent?: boolean | undefined;
@@ -50,6 +50,35 @@ export interface PassthroughOptions<Part extends string, State extends string> {
50
50
  component: string;
51
51
  parts: Partial<Record<Part, string>>;
52
52
  };
53
+ /**
54
+ * The component's variant as a passthrough state (Q76.7): `pt:root:destructive`,
55
+ * `{ 'item:destructive': '…' }`. One key, `<part>:<variant>`, merged after the
56
+ * part's base entry and BEFORE its real states, so `disabled` / `selected`
57
+ * still win. `current` is the component-level variant; a per-node one (a
58
+ * dropdown entry's) is the fourth argument of `part()`. `names` are the
59
+ * built-in names, `option` the plugin option that registers the app's own
60
+ * (`buttonVariants`), both only for the dev check of unknown keys and for
61
+ * `forward()`. A list for a component with two (BbDropdownButton: its
62
+ * button's on the control parts, its menu entries' on the entry parts).
63
+ */
64
+ variant?: PassthroughVariant<Part> | ReadonlyArray<PassthroughVariant<Part>>;
65
+ /**
66
+ * A row's facts beyond its states and variant, added to every per-item
67
+ * function's context (Q77.7: a select's `known`, on for a `known-items`
68
+ * stand-in). Called only for a row that has a function to call.
69
+ */
70
+ facts?: (item: unknown) => Record<string, unknown>;
71
+ }
72
+ /** The `variant` option of `usePassthrough`. */
73
+ export interface PassthroughVariant<Part extends string> {
74
+ /** The component-level variant right now; leave it out for a per-node one. */
75
+ current?: () => string | undefined;
76
+ /** The built-in variant names (the registry interface's keys). */
77
+ names: readonly string[];
78
+ /** The build plugin option carrying the app's variant names. */
79
+ option: string;
80
+ /** The parts the variant styles. Default: every part. */
81
+ parts?: readonly Part[];
53
82
  }
54
83
  /**
55
84
  * The text-like controls' `controlAttrs`: native attributes of `<input>` /
@@ -94,7 +123,9 @@ export type PassthroughBindings<Part extends string, State extends string> = Rea
94
123
  * falsy result returns the cached binding unchanged. A part with no
95
124
  * function pays nothing beyond the cached lookup.
96
125
  */
97
- part: (part: Part, states: Partial<Record<State, boolean>>, item?: unknown) => PtBinding;
126
+ part: (part: Part, states: Partial<Record<State, boolean>>, item?: unknown,
127
+ /** A per-node variant (a dropdown entry's), over the component-level one. */
128
+ variant?: string) => PtBinding;
98
129
  /**
99
130
  * The RAW entries for some parts, re-keyed for a nested PUBLIC component's
100
131
  * own `pt` prop (`<BbSelectPopover :pt="passthrough.forward(['panel', 'option'], BB_SELECT_POPOVER_PT.states)" />`).
@@ -177,6 +208,28 @@ export declare const __ptStats: {
177
208
  * @internal
178
209
  */
179
210
  export declare const __resetPtWarningsForTest: () => void;
211
+ /**
212
+ * Every registered name of a variant registry: the built-ins plus the app's
213
+ * own from the build-time config.
214
+ */
215
+ export declare const registeredVariantNames: (names: readonly string[], option: string) => string[];
216
+ /**
217
+ * The `pt:<part>:<name>` props of an app's OWN variant names (Q76.7 part 2),
218
+ * for a component's `defineOptions({ mixins: [variantPt(BB_X_PT)] })`. The
219
+ * built-in names are declared props of the component; an app's names exist
220
+ * only once the app registers them, so they come from the build-time config
221
+ * at module evaluation, as a props-only mixin Vue merges into the
222
+ * component's props (with the Options API on, Vue's default; with
223
+ * `__VUE_OPTIONS_API__: false` mixins do not merge, so an app's names work in
224
+ * the object form and the global map only). The resolver reads them like any
225
+ * declared `pt:*` prop. No custom name, no mixin props.
226
+ */
227
+ export declare const variantPt: (pt: {
228
+ parts: readonly string[];
229
+ variant: PassthroughVariant<string> | ReadonlyArray<PassthroughVariant<string>>;
230
+ }) => {
231
+ props: Record<string, null>;
232
+ };
180
233
  /**
181
234
  * The shared passthrough resolver. Wire it once per component:
182
235
  *