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
@@ -62,6 +62,7 @@
62
62
  :has-errors="fieldHasErrors"
63
63
  :has-warnings="fieldHasWarnings"
64
64
  :hide-label="hideLabel"
65
+ :indicator-ready="indicatorReady"
65
66
  :item-input-align="itemInputAlign"
66
67
  :item-label-align="itemLabelAlign"
67
68
  :item-layout="itemLayout"
@@ -72,8 +73,22 @@
72
73
  :options="options"
73
74
  :passthrough="passthrough"
74
75
  :role="hasLegend() ? 'radiogroup' : undefined"
76
+ :variant="variant"
75
77
  >
76
- <template #prepend><slot name="prepend"></slot></template>
78
+ <template #prepend>
79
+ <!-- The `variant` indicators (Q76.11 d): first in the list, so the
80
+ positioned rows paint over them; hidden from the tree (the
81
+ checked state is the inputs'). -->
82
+ <span
83
+ v-for="box in indicatorBoxes"
84
+ :key="box.key"
85
+ aria-hidden="true"
86
+ class="bb-radio-group__indicator"
87
+ :style="indicatorStyle(box)"
88
+ v-bind="passthrough.indicator"
89
+ ></span>
90
+ <slot name="prepend"></slot>
91
+ </template>
77
92
  <template #loading><slot name="loading"></slot></template>
78
93
  <template #empty="data"
79
94
  ><slot name="empty" v-bind="data"></slot
@@ -138,6 +153,7 @@ import {
138
153
  formControlPtActive,
139
154
  pickActive,
140
155
  usePassthrough,
156
+ variantPt,
141
157
  } from '@/composables/usePassthrough';
142
158
  import {
143
159
  type ComponentPublicInstance,
@@ -161,6 +177,7 @@ import {
161
177
  toggleInputValue,
162
178
  } from '@/utilities/functions/toggleInput';
163
179
  import { useToggleListFocus } from '@/composables/useToggleInput';
180
+ import { useChoiceIndicator } from '@/composables/useChoiceIndicator';
164
181
  import { useItemsGetter } from '@/composables/useItemsGetter';
165
182
  import { usePrefill } from '@/composables/usePrefill';
166
183
  import { useIndexById } from '../../composables/useIndexById';
@@ -182,7 +199,11 @@ import {
182
199
  import { useFormBinding } from '@/composables/useFormBinding';
183
200
  export type { BbRadioGroupProps, BbRadioGroupEvents, BbRadioGroupSlots };
184
201
 
185
- defineOptions({ inheritAttrs: false });
202
+ defineOptions({
203
+ // An app's own variants as declared `pt:<part>:<name>` props (Q76.7).
204
+ mixins: [variantPt(BB_RADIO_GROUP_PT)],
205
+ inheritAttrs: false,
206
+ });
186
207
  const declaredProps = withDefaults(defineProps<BbRadioGroupProps<T>>(), {
187
208
  inputPosition: 'left',
188
209
  selectable: true,
@@ -400,6 +421,7 @@ const passthrough = usePassthrough({
400
421
  props,
401
422
  parts: BB_RADIO_GROUP_PT.parts,
402
423
  states: BB_RADIO_GROUP_PT.states,
424
+ variant: { ...BB_RADIO_GROUP_PT.variant, current: () => props.variant },
403
425
  active: {
404
426
  ...pickActive(
405
427
  formControlPtActive(props, () => passthroughHasValue.value),
@@ -408,6 +430,28 @@ const passthrough = usePassthrough({
408
430
  loading: () => loading.value,
409
431
  },
410
432
  });
433
+ /**
434
+ * BbTabs' look (`variant`, Q76.11 d): the indicators under the checked rows,
435
+ * measured on the list. One that slides from row to row.
436
+ */
437
+ /** `list-layout="vertical"` / `"vertical-stretch"` stack the strip into a column. */
438
+ const stripVertical = computed(
439
+ () =>
440
+ props.listLayout === 'vertical' || props.listLayout === 'vertical-stretch'
441
+ );
442
+ const {
443
+ boxes: indicatorBoxes,
444
+ ready: indicatorReady,
445
+ styleOf: indicatorStyle,
446
+ } = useChoiceIndicator({
447
+ kind: 'radio',
448
+ variant: () => props.variant,
449
+ vertical: () => stripVertical.value,
450
+ list: () => optionsElement.value,
451
+ rows: () => options.value,
452
+ rowClass: 'bb-radio-group__item',
453
+ });
454
+
411
455
  /** The container names the heading `label`; this group names it `legend`, after its props. */
412
456
  const containerPassthrough = aliasParts(passthrough, { label: 'legend' });
413
457
 
@@ -468,7 +512,7 @@ const rowListeners = (option: Option) => ({
468
512
  onMouseup: (event: MouseEvent) => emit('mouseup', event),
469
513
  });
470
514
 
471
- /** One row's native radio: named by its text when described, described by the group then its own description. */
515
+ /** One row's native radio: named by its text alone, described by the group then its own description. */
472
516
  const rowInputAttrs = (
473
517
  option: Option,
474
518
  index: number,
@@ -522,18 +566,25 @@ const rowIconSlotProps = (
522
566
 
523
567
  ```ts
524
568
  import type { Responsive } from '@/types/ResponsiveSize';
569
+ import {
570
+ RADIO_VARIANTS,
571
+ type RadioVariantBuiltIn,
572
+ type RadioVariantRegistry,
573
+ type RadioVariantType,
574
+ } from '@/types/RadioVariant';
525
575
  import type { BbOptionGroupItemProps } from '@/types/ItemProps';
526
576
  import type { HTMLAttributes, InputHTMLAttributes } from 'vue';
527
577
  import {
528
- GROUP_PT_PARTS,
578
+ CHOICE_PT_PARTS,
579
+ type PtVariantAttrs,
529
580
  GROUP_PT_STATES,
530
581
  GROUP_ROW_PT_PARTS,
531
582
  GROUP_ROW_PT_STATES,
532
- type GroupFieldPtPart,
533
- type GroupPtMap,
583
+ type ChoiceFieldPtPart,
584
+ type ChoicePtMap,
585
+ type ChoicePtPart,
534
586
  type GroupRowPtPart,
535
587
  type GroupWidePtState,
536
- type GroupPtPart,
537
588
  type GroupPtState,
538
589
  type PtItemCtx,
539
590
  type PtNoInfer,
@@ -556,21 +607,24 @@ import type { CommonFieldAsteriskSlotProps } from '../CommonField/types';
556
607
  *
557
608
  * Per-item functions: on the instance, a row part (`item`, `icon`, `label`, `itemDescription`) also accepts `({ item, checked, … }) => PtValue | false | null | undefined` — `item` is the raw item of that row, and every state a boolean beside it, on for it (`checked`, `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 row as it was. See the passthrough guide, _Per-item functions_.
558
609
  */
559
- export type BbRadioGroupPtPart = GroupPtPart;
610
+ export type BbRadioGroupPtPart = ChoicePtPart;
560
611
  /** Passthrough states of `BbRadioGroup`, true while the matching `--` modifier is on. */
561
612
  export type BbRadioGroupPtState = GroupPtState;
562
613
  /** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
563
614
  export const BB_RADIO_GROUP_PT = {
564
- parts: GROUP_PT_PARTS,
615
+ parts: CHOICE_PT_PARTS,
565
616
  states: GROUP_PT_STATES,
566
617
  /** `rowStates` are declared on `rowParts` only — the field parts never have them. */
567
618
  rowParts: GROUP_ROW_PT_PARTS,
568
619
  rowStates: GROUP_ROW_PT_STATES,
620
+ // The `variant` is a state on every part (Q76.7).
621
+ variant: { names: RADIO_VARIANTS, option: 'radioVariants' },
569
622
  } as const satisfies {
570
623
  parts: readonly BbRadioGroupPtPart[];
571
624
  states: readonly BbRadioGroupPtState[];
572
625
  rowParts: readonly GroupRowPtPart[];
573
626
  rowStates: readonly BbRadioGroupPtState[];
627
+ variant: { names: readonly RadioVariantBuiltIn[]; option: string };
574
628
  };
575
629
 
576
630
  // Spelled INLINE with this component's own unions (Vue's SFC type resolver
@@ -580,294 +634,315 @@ export const BB_RADIO_GROUP_PT = {
580
634
  /* eslint-disable @typescript-eslint/consistent-indexed-object-style */
581
635
  export type BbRadioGroupProps<T> = {
582
636
  [K in
583
- | `pt:${GroupFieldPtPart}`
584
- | `pt:${GroupFieldPtPart}:${GroupWidePtState}`
585
- | `pt:${GroupRowPtPart}:${BbRadioGroupPtState}`]?: PtValue;
586
- } & {
587
- // The row parts also take a per-item function, typed on this group's
588
- // item — a literal function type, not `PtItemFn<T, …>` (T23).
589
- [K in `pt:${GroupRowPtPart}`]?:
590
- | PtValue
591
- | ((ctx: PtItemCtx<PtNoInfer<T>, BbRadioGroupPtState>) => PtItemResult);
592
- } & {
593
- /* eslint-enable @typescript-eslint/consistent-indexed-object-style */
594
- /**
595
- * Passthrough, object form: the same keys as the `pt:*` attributes
596
- * without the prefix. See the `pt:<part>` row.
597
- */
598
- pt?: GroupPtMap<PtNoInfer<T>>;
599
- /**
600
- * Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field.
601
- */
602
- autofocus?: InputHTMLAttributes['autofocus'];
603
-
604
- /**
605
- * Compact density. Swaps `--bb-label-spacing-y` for
606
- * `--bb-label-spacing-y-compact`, so tune a compact group's label gap with
607
- * the `-compact` token, not the base one.
608
- */
609
- compact?: boolean;
610
-
611
- /**
612
- * Defines an array of dependencies that will trigger actions in the component upon change.
613
- */
614
- dependencies?: unknown[];
615
-
616
- /**
617
- * Timeout used to debounce response to changes to dependencies.
618
- */
619
- depsDebounceTime?: number;
620
-
621
- /**
622
- * Text between the label and the input. Unlike the hint it is always
623
- * visible; it joins the input's `aria-describedby` after any `errors` /
624
- * `warnings`, before the `hint`.
625
- */
626
- description?: string;
627
-
628
- /**
629
- * How label and input sit together: `'vertical'`, `'horizontal'` (50/50),
630
- * `'auto'`, `'label-fill'`, `'input-fill'`, a ratio like `'xx xxxxx'`, or a
631
- * per-breakpoint map (`{ default: 'vertical', md: 'xx xxxxx' }`).
632
- */
633
- layout?: Responsive<FieldLayout>;
634
-
635
- /**
636
- * Vertical position of the label block in a side-by-side row; not
637
- * `labelPosition`, the horizontal one. Omitted, the label's first line
638
- * meets the control's.
639
- */
640
- labelAlign?: FieldCrossAlign;
641
-
642
- /**
643
- * Vertical position of the control in a side-by-side row; not
644
- * `inputPosition`, the horizontal one. Omitted, the control's first line
645
- * meets the label's.
646
- */
647
- inputAlign?: FieldCrossAlign;
648
-
649
- /**
650
- * Disables the component.
651
- */
652
- disabled?: boolean;
653
-
654
- /**
655
- * After every applied, successful load (an empty one included), drops the
656
- * model values the options no longer contain (a single value resets to
657
- * `null`). A failed load never prunes.
658
- */
659
- enforceCoherence?: boolean;
660
-
661
- /**
662
- * Error messages under the field, a string or array, in an
663
- * `aria-live="polite"` region and first in the control's
664
- * `aria-describedby`, so they are re-read when it regains focus.
665
- */
666
- errors?: string | string[];
667
-
668
- /**
669
- * Define if the component should be in an error state.
670
- * It usually attaches a CSS class for styling purposes.
671
- */
672
- hasErrors?: boolean;
673
-
674
- /**
675
- * Warning messages under the field, a string or array: amber, in their own
676
- * `aria-live` region and in the control's `aria-describedby` after the
677
- * errors. Non-empty turns on the warning state; errors win when both are
678
- * set.
679
- */
680
- warnings?: string | string[];
681
-
682
- /**
683
- * Define if the component should be in a warning state.
684
- * Same chrome as errors with `--bb-warn`; errors take priority.
685
- */
686
- hasWarnings?: boolean;
687
-
688
- /**
689
- * Visually hides each option's label text (the text rendered next to every
690
- * input) while keeping it accessible to screen readers.
691
- * Does not affect the fieldset legend — use `hideLegend` for that.
692
- */
693
- hideLabel?: boolean;
694
-
695
- /**
696
- * Visually hides the legend of the fieldset while maintaining accessibility.
697
- */
698
- hideLegend?: boolean;
699
-
700
- /**
701
- * Text box to be displayed near the input, usually to indicate instructions.
702
- */
703
- hint?: string;
704
-
705
- /**
706
- * Prefix for the ids of each option's input and of the label, description
707
- * and message. Generated when omitted.
708
- */
709
- id?: HTMLAttributes['id'];
710
-
711
- /**
712
- * Sets the alignment of the input. Since inputs are inline block they can be aligned just as text can.
713
- *
714
- * @defaultValue `'left'`
715
- */
716
- inputPosition?: 'left' | 'center' | 'right';
717
-
718
- /**
719
- * The options: an array, or a provider called with a
720
- * `BbRadioGroupItemsContext` (`reason`, `modelValue`, `signal`), sync or
721
- * async. A provider fails by THROWING, never by returning `[]`: the rows
722
- * clear and `#empty` gets the `error`.
723
- */
724
- items: T[] | ((context: BbRadioGroupItemsContext) => T[] | Promise<T[]>);
725
-
726
- /**
727
- * Defines a path that returns a property of the object to use as text or a function that returns a string.
728
- *
729
- * Unset: own `label`, else `text` (`{ label, value }` needs no accessor).
730
- *
731
- * @defaultValue own `label`, else `text`, else `JSON.stringify(item)`
732
- */
733
- itemText?: ItemAccessor<T, string>;
734
-
735
- /**
736
- * Defines a path that returns a property of the object to use as value or a function that returns any value.
737
- *
738
- * Unset: own `value`, even `null`.
739
- *
740
- * @defaultValue own `value`, else the whole item
741
- */
742
- itemValue?: ItemAccessor<T>;
743
-
744
- /**
745
- * ADDITIONAL row fields, never the text or value: `description`, a muted
746
- * line under the label (it may wrap; announced as the option's
747
- * description). An object of paths or getters, or a function of the item;
748
- * nothing is read implicitly.
749
- */
750
- itemProps?: BbOptionGroupItemProps<T>;
751
-
752
- /**
753
- * How each row's input and label sit together, in the `layout` keywords:
754
- * `'auto'`, `'vertical'`, `'horizontal'`, `'label-fill'`, `'input-fill'`,
755
- * or a two-word ratio pattern like `'xx xxxxx'`.
756
- *
757
- * @defaultValue `'auto'`
758
- */
759
- itemLayout?: FieldLayout;
760
-
761
- /**
762
- * Swaps each row's input and label from their natural order (input first),
763
- * in every `item-layout`. `reverse` swaps the legend and the options instead.
764
- */
765
- itemReverse?: boolean;
766
-
767
- /**
768
- * Vertical position of each option's label in its row. Omitted, it stays
769
- * as it is.
770
- */
771
- itemLabelAlign?: FieldCrossAlign;
772
-
773
- /**
774
- * Vertical position of each option's control in its row; `'center'` is
775
- * the middle of the label plus its description. Omitted, it sits on the
776
- * label's first line.
777
- */
778
- itemInputAlign?: FieldCrossAlign;
779
-
780
- /**
781
- * Sets the text alignment of the label.
782
- */
783
- legendPosition?: 'left' | 'center' | 'right';
784
-
785
- /**
786
- * Text content of the legend.
787
- */
788
- legend: string;
789
-
790
- /**
791
- * Legend rendering mode. `'outside'` renders the legend above the fieldset in the normal flow;
792
- * `'inside'` overlays the legend inside the fieldset border.
793
- * Floating mode is not supported for radio groups.
794
- */
795
- legendMode?: 'outside' | 'inside';
796
-
797
- /**
798
- * How the rows sit in the list: `'horizontal'` (on a line, wrapping),
799
- * `'vertical'` (stacked), `'vertical-stretch'` (stacked, as wide as the
800
- * list) or `'tiles'` (equal boxes; `--tile-min-width` on `pt:list` sets the
801
- * narrowest). Layout only: the cards are `pt` (guide § Radio cards).
802
- *
803
- * @defaultValue `'horizontal'`
804
- */
805
- listLayout?: ListLayout;
806
-
807
- /**
808
- * String displayed while items are being loaded.
809
- */
810
- loadingText?: string;
811
-
812
- /**
813
- * Used by v-model. Can be any serializable type.
814
- */
815
- modelValue?: any;
816
-
817
- /**
818
- * Timeout used to debounce response to changes to modelValue.
819
- */
820
- modelValueDebounceTime?: number;
821
-
822
- /**
823
- * Name of the option inputs. Optional: a generated one, unique per group
824
- * and stable, groups them. Pass one only when a native (non-JS) form post
825
- * must submit the value under a known key.
826
- */
827
- name?: InputHTMLAttributes['name'];
828
-
829
- /**
830
- * String displayed when there are no items to display.
831
- */
832
- emptyText?: string;
833
-
834
- /**
835
- * String displayed in the empty state while the latest load FAILED (the
836
- * `items` provider threw): the twin of `emptyText` for that case.
837
- *
838
- * @defaultValue the localized `common.failedText` ("Couldn't load items")
839
- */
840
- failedText?: string;
841
-
842
- /**
843
- * Keeps the hint displayed.
844
- */
845
- persistentHint?: boolean;
846
-
847
- /**
848
- * Sets the input in a readonly state.
849
- */
850
- readonly?: boolean;
851
-
852
- /**
853
- * Sets the input as required.
854
- */
855
- required?: boolean;
856
-
857
- /**
858
- * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.
859
- */
860
- reverse?: boolean;
861
-
862
- /**
863
- * Defines whether options are selectable.
864
- * Can be a global boolean that affects all options or a function
865
- * that accepts an item and returns a boolean that only affects that item.
866
- * Non-selectable options are rendered disabled.
867
- * @defaultValue `true`
868
- */
869
- selectable?: boolean | ((item: T) => boolean);
870
- } & FormFieldProps<any>;
637
+ | `pt:${ChoiceFieldPtPart}`
638
+ | `pt:${ChoiceFieldPtPart}:${GroupWidePtState}`
639
+ | `pt:${ChoiceFieldPtPart}:${RadioVariantBuiltIn}`
640
+ | `pt:${GroupRowPtPart}:${BbRadioGroupPtState}`
641
+ | `pt:${GroupRowPtPart}:${RadioVariantBuiltIn}`]?: PtValue;
642
+ } & /* @vue-ignore */ PtVariantAttrs<
643
+ ChoicePtPart,
644
+ keyof RadioVariantRegistry
645
+ > & {
646
+ // The row parts also take a per-item function, typed on this group's
647
+ // item — a literal function type, not `PtItemFn<T, …>` (T23).
648
+ [K in `pt:${GroupRowPtPart}`]?:
649
+ | PtValue
650
+ | ((
651
+ ctx: PtItemCtx<
652
+ PtNoInfer<T>,
653
+ BbRadioGroupPtState,
654
+ RadioVariantBuiltIn | keyof RadioVariantRegistry
655
+ >
656
+ ) => PtItemResult);
657
+ } & {
658
+ /**
659
+ * Passthrough, object form: the same keys as the `pt:*` attributes
660
+ * without the prefix. See the `pt:<part>` row.
661
+ */
662
+ pt?: ChoicePtMap<PtNoInfer<T>> & {
663
+ [K in `${ChoicePtPart}:${RadioVariantBuiltIn | keyof RadioVariantRegistry}`]?: PtValue;
664
+ };
665
+ /* eslint-enable @typescript-eslint/consistent-indexed-object-style */
666
+ /**
667
+ * Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field.
668
+ */
669
+ autofocus?: InputHTMLAttributes['autofocus'];
670
+
671
+ /**
672
+ * Compact density. Swaps `--bb-label-spacing-y` for
673
+ * `--bb-label-spacing-y-compact`, so tune a compact group's label gap with
674
+ * the `-compact` token, not the base one.
675
+ */
676
+ compact?: boolean;
677
+
678
+ /**
679
+ * Defines an array of dependencies that will trigger actions in the component upon change.
680
+ */
681
+ dependencies?: unknown[];
682
+
683
+ /**
684
+ * Timeout used to debounce response to changes to dependencies.
685
+ */
686
+ depsDebounceTime?: number;
687
+
688
+ /**
689
+ * Text between the label and the input. Unlike the hint it is always
690
+ * visible; it joins the input's `aria-describedby` after any `errors` /
691
+ * `warnings`, before the `hint`.
692
+ */
693
+ description?: string;
694
+
695
+ /**
696
+ * How label and input sit together: `'vertical'`, `'horizontal'` (50/50),
697
+ * `'auto'`, `'label-fill'`, `'input-fill'`, a ratio like `'xx xxxxx'`, or a
698
+ * per-breakpoint map (`{ default: 'vertical', md: 'xx xxxxx' }`).
699
+ */
700
+ layout?: Responsive<FieldLayout>;
701
+
702
+ /**
703
+ * Vertical position of the label block in a side-by-side row; not
704
+ * `labelPosition`, the horizontal one. Omitted, the label's first line
705
+ * meets the control's.
706
+ */
707
+ labelAlign?: FieldCrossAlign;
708
+
709
+ /**
710
+ * Vertical position of the control in a side-by-side row; not
711
+ * `inputPosition`, the horizontal one. Omitted, the control's first line
712
+ * meets the label's.
713
+ */
714
+ inputAlign?: FieldCrossAlign;
715
+
716
+ /**
717
+ * Disables the component.
718
+ */
719
+ disabled?: boolean;
720
+
721
+ /**
722
+ * After every applied, successful load (an empty one included), drops the
723
+ * model values the options no longer contain (a single value resets to
724
+ * `null`). A failed load never prunes.
725
+ */
726
+ enforceCoherence?: boolean;
727
+
728
+ /**
729
+ * Error messages under the field, a string or array, in an
730
+ * `aria-live="polite"` region and first in the control's
731
+ * `aria-describedby`, so they are re-read when it regains focus.
732
+ */
733
+ errors?: string | string[];
734
+
735
+ /**
736
+ * Define if the component should be in an error state.
737
+ * It usually attaches a CSS class for styling purposes.
738
+ */
739
+ hasErrors?: boolean;
740
+
741
+ /**
742
+ * Warning messages under the field, a string or array: amber, in their own
743
+ * `aria-live` region and in the control's `aria-describedby` after the
744
+ * errors. Non-empty turns on the warning state; errors win when both are
745
+ * set.
746
+ */
747
+ warnings?: string | string[];
748
+
749
+ /**
750
+ * Define if the component should be in a warning state.
751
+ * Same chrome as errors with `--bb-warn`; errors take priority.
752
+ */
753
+ hasWarnings?: boolean;
754
+
755
+ /**
756
+ * Visually hides each option's label text (the text rendered next to every
757
+ * input) while keeping it accessible to screen readers.
758
+ * Does not affect the fieldset legend — use `hideLegend` for that.
759
+ */
760
+ hideLabel?: boolean;
761
+
762
+ /**
763
+ * Visually hides the legend of the fieldset while maintaining accessibility.
764
+ */
765
+ hideLegend?: boolean;
766
+
767
+ /**
768
+ * Text box to be displayed near the input, usually to indicate instructions.
769
+ */
770
+ hint?: string;
771
+
772
+ /**
773
+ * Prefix for the ids of each option's input and of the label, description
774
+ * and message. Generated when omitted.
775
+ */
776
+ id?: HTMLAttributes['id'];
777
+
778
+ /**
779
+ * Sets the alignment of the input. Since inputs are inline block they can be aligned just as text can.
780
+ *
781
+ * @defaultValue `'left'`
782
+ */
783
+ inputPosition?: 'left' | 'center' | 'right';
784
+
785
+ /**
786
+ * The options: an array, or a provider called with a
787
+ * `BbRadioGroupItemsContext` (`reason`, `modelValue`, `signal`), sync or
788
+ * async. A provider fails by THROWING, never by returning `[]`: the rows
789
+ * clear and `#empty` gets the `error`.
790
+ */
791
+ items: T[] | ((context: BbRadioGroupItemsContext) => T[] | Promise<T[]>);
792
+
793
+ /**
794
+ * Defines a path that returns a property of the object to use as text or a function that returns a string.
795
+ *
796
+ * Unset: own `label`, else `text` (`{ label, value }` needs no accessor).
797
+ *
798
+ * @defaultValue own `label`, else `text`, else `JSON.stringify(item)`
799
+ */
800
+ itemText?: ItemAccessor<T, string>;
801
+
802
+ /**
803
+ * Defines a path that returns a property of the object to use as value or a function that returns any value.
804
+ *
805
+ * Unset: own `value`, even `null`.
806
+ *
807
+ * @defaultValue own `value`, else the whole item
808
+ */
809
+ itemValue?: ItemAccessor<T>;
810
+
811
+ /**
812
+ * ADDITIONAL row fields, never the text or value: `description`, a muted
813
+ * line under the label (it may wrap; announced as the option's
814
+ * description). An object of paths or getters, or a function of the item;
815
+ * nothing is read implicitly.
816
+ */
817
+ itemProps?: BbOptionGroupItemProps<T>;
818
+
819
+ /**
820
+ * How each row's input and label sit together, in the `layout` keywords:
821
+ * `'auto'`, `'vertical'`, `'horizontal'`, `'label-fill'`, `'input-fill'`,
822
+ * or a two-word ratio pattern like `'xx xxxxx'`.
823
+ *
824
+ * @defaultValue `'auto'`
825
+ */
826
+ itemLayout?: FieldLayout;
827
+
828
+ /**
829
+ * Swaps each row's input and label from their natural order (input first),
830
+ * in every `item-layout`. `reverse` swaps the legend and the options instead.
831
+ */
832
+ itemReverse?: boolean;
833
+
834
+ /**
835
+ * Vertical position of each option's label in its row. Omitted, it stays
836
+ * as it is.
837
+ */
838
+ itemLabelAlign?: FieldCrossAlign;
839
+
840
+ /**
841
+ * Vertical position of each option's control in its row; `'center'` is
842
+ * the middle of the label plus its description. Omitted, it sits on the
843
+ * label's first line.
844
+ */
845
+ itemInputAlign?: FieldCrossAlign;
846
+
847
+ /**
848
+ * Sets the text alignment of the label.
849
+ */
850
+ legendPosition?: 'left' | 'center' | 'right';
851
+
852
+ /**
853
+ * Text content of the legend.
854
+ */
855
+ legend: string;
856
+
857
+ /**
858
+ * Legend rendering mode. `'outside'` renders the legend above the fieldset in the normal flow;
859
+ * `'inside'` overlays the legend inside the fieldset border.
860
+ * Floating mode is not supported for radio groups.
861
+ */
862
+ legendMode?: 'outside' | 'inside';
863
+
864
+ /**
865
+ * A tab-strip look (Q76.11 d): `'pill'` (a raised pill under the pick) or
866
+ * `'line'` (a bar on a baseline); the indicator slides like a tab strip's.
867
+ * `list-layout="vertical"` stacks it. Register more with `radioVariants`.
868
+ * Unset: the group's own rows.
869
+ */
870
+ variant?: RadioVariantType;
871
+
872
+ /**
873
+ * How the rows sit in the list: `'horizontal'` (on a line, wrapping),
874
+ * `'vertical'` (stacked), `'vertical-stretch'` (stacked, as wide as the
875
+ * list) or `'tiles'` (equal boxes; `--tile-min-width` on `pt:list` sets the
876
+ * narrowest). Layout only: the cards are `pt` (guide § Radio cards).
877
+ *
878
+ * @defaultValue `'horizontal'`
879
+ */
880
+ listLayout?: ListLayout;
881
+
882
+ /**
883
+ * String displayed while items are being loaded.
884
+ */
885
+ loadingText?: string;
886
+
887
+ /**
888
+ * Used by v-model. Can be any serializable type.
889
+ */
890
+ modelValue?: any;
891
+
892
+ /**
893
+ * Timeout used to debounce response to changes to modelValue.
894
+ */
895
+ modelValueDebounceTime?: number;
896
+
897
+ /**
898
+ * Name of the option inputs. Optional: a generated one, unique per group
899
+ * and stable, groups them. Pass one only when a native (non-JS) form post
900
+ * must submit the value under a known key.
901
+ */
902
+ name?: InputHTMLAttributes['name'];
903
+
904
+ /**
905
+ * String displayed when there are no items to display.
906
+ */
907
+ emptyText?: string;
908
+
909
+ /**
910
+ * String displayed in the empty state while the latest load FAILED (the
911
+ * `items` provider threw): the twin of `emptyText` for that case.
912
+ *
913
+ * @defaultValue the localized `common.failedText` ("Couldn't load items")
914
+ */
915
+ failedText?: string;
916
+
917
+ /**
918
+ * Keeps the hint displayed.
919
+ */
920
+ persistentHint?: boolean;
921
+
922
+ /**
923
+ * Sets the input in a readonly state.
924
+ */
925
+ readonly?: boolean;
926
+
927
+ /**
928
+ * Sets the input as required.
929
+ */
930
+ required?: boolean;
931
+
932
+ /**
933
+ * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.
934
+ */
935
+ reverse?: boolean;
936
+
937
+ /**
938
+ * Defines whether options are selectable.
939
+ * Can be a global boolean that affects all options or a function
940
+ * that accepts an item and returns a boolean that only affects that item.
941
+ * Non-selectable options are rendered disabled.
942
+ * @defaultValue `true`
943
+ */
944
+ selectable?: boolean | ((item: T) => boolean);
945
+ } & FormFieldProps<any>;
871
946
 
872
947
  export type BbRadioGroupEvents = {
873
948
  /**
@@ -1027,6 +1102,8 @@ export type BbRadioGroupSlots<T> = {
1027
1102
  ## Styles
1028
1103
 
1029
1104
  ```css
1105
+ @import '../OptionsContainer/choice-strip.css';
1106
+
1030
1107
  .bb-radio-group {
1031
1108
  .bb-field__layout--horizontal {
1032
1109
  .bb-field__label {
@@ -1343,6 +1420,19 @@ export type BbRadioGroupSlots<T> = {
1343
1420
  }
1344
1421
  }
1345
1422
 
1423
+ /* A side hidden with the library's or Tailwind's hiding classes takes its gap
1424
+ with it (ATT-11 e): `hideLabel` / `pt:label="sr-only"` (out of flow) or
1425
+ `pt:icon="hidden"` would leave an empty track AND the gap beside it (the
1426
+ row gap in a `vertical` item, Q76.11 c), and the side still shown sat
1427
+ off-centre. `:where` keeps the rule at the row's
1428
+ one class, so a consumer `gap-*` on `pt:item` still wins. */
1429
+ .bb-radio-group__item:where(
1430
+ :has(> .bb-radio-group__label:is(.bb-sr-only, .sr-only)),
1431
+ :has(> .bb-toggle-input + :is(.hidden, .sr-only, .bb-sr-only))
1432
+ ) {
1433
+ gap: 0;
1434
+ }
1435
+
1346
1436
  .bb-radio-group__label {
1347
1437
  color: var(--bb-text);
1348
1438
  font-size: var(--bb-label-fs);
@@ -1375,6 +1465,32 @@ export type BbRadioGroupSlots<T> = {
1375
1465
  user-select: none;
1376
1466
  }
1377
1467
 
1468
+ /*
1469
+ * `tiles` (ATT-11 d): the invisible native input covers the WHOLE tile,
1470
+ * padding included, not only the glyph's cell, so a click, a hover tooltip on
1471
+ * the input and a test runner's hit-target check land on it anywhere on the
1472
+ * tile. `grid-area: auto` is load-bearing: an absolutely positioned grid child
1473
+ * is sized against its grid area, so `inset: 0` would still be the glyph
1474
+ * cell. A link or a button inside a tile sits above the input and keeps its
1475
+ * own click. List rows keep the cell overlay.
1476
+ */
1477
+ .bb-radio-group__list--tiles > .bb-radio-group__item {
1478
+ position: relative;
1479
+
1480
+ > .bb-toggle-input {
1481
+ border-radius: inherit;
1482
+ grid-area: auto;
1483
+ inset: 0;
1484
+ position: absolute;
1485
+ z-index: 1;
1486
+ }
1487
+
1488
+ :is(a, button) {
1489
+ position: relative;
1490
+ z-index: 2;
1491
+ }
1492
+ }
1493
+
1378
1494
  /* ---- Touch targets (Q44.19) -------------------------------------------
1379
1495
  * A row is one label line (`--bb-label-lh`, 18px) and the rows sit
1380
1496
  * `--row-gap` (10px) apart. On a coarse pointer only, each row gets an