bitboss-ui 3.0.0-beta.71 → 3.0.0-beta.72

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 (359) hide show
  1. package/README.md +2 -2
  2. package/bin/cli.mjs +6 -1
  3. package/dist/ai/BbAccordion.md +38 -19
  4. package/dist/ai/BbBadge.md +25 -22
  5. package/dist/ai/BbBreadcrumbs.md +1 -1
  6. package/dist/ai/BbButton.md +32 -27
  7. package/dist/ai/BbCalendar.md +1 -0
  8. package/dist/ai/BbCarousel.md +6 -4
  9. package/dist/ai/BbCheckboxGroup.md +2 -1
  10. package/dist/ai/BbColorInput.md +1 -1
  11. package/dist/ai/BbConfirm.md +65 -81
  12. package/dist/ai/BbConfirmPortal.md +2 -2
  13. package/dist/ai/BbDatePicker.md +1 -6
  14. package/dist/ai/BbDatePickerInput.md +2 -2
  15. package/dist/ai/BbDialog.md +230 -164
  16. package/dist/ai/BbDropdown.md +52 -16
  17. package/dist/ai/BbDropdownButton.md +11 -12
  18. package/dist/ai/BbDropzone.md +12 -8
  19. package/dist/ai/BbForm.md +93 -7
  20. package/dist/ai/BbHost.md +2 -2
  21. package/dist/ai/BbHoverCardPortal.md +1 -1
  22. package/dist/ai/BbIcon.md +1 -1
  23. package/dist/ai/BbIndicator.md +17 -15
  24. package/dist/ai/BbNumberInput.md +7 -5
  25. package/dist/ai/BbOffCanvas.md +29 -7
  26. package/dist/ai/BbPagination.md +2 -2
  27. package/dist/ai/BbPopover.md +15 -9
  28. package/dist/ai/BbPopoverPortal.md +1 -1
  29. package/dist/ai/BbRadioGroup.md +29 -7
  30. package/dist/ai/BbRating.md +8 -7
  31. package/dist/ai/BbSelect.md +29 -8
  32. package/dist/ai/BbSelectPopover.md +9 -3
  33. package/dist/ai/BbSlider.md +12 -8
  34. package/dist/ai/BbSpinner.md +3 -2
  35. package/dist/ai/BbSwitch.md +3 -3
  36. package/dist/ai/BbSwitchGroup.md +7 -6
  37. package/dist/ai/BbTable.md +205 -82
  38. package/dist/ai/BbTabs.md +29 -4
  39. package/dist/ai/BbTag.md +1 -1
  40. package/dist/ai/BbTextInput.md +7 -5
  41. package/dist/ai/BbTextarea.md +4 -3
  42. package/dist/ai/BbTimePickerInput.md +1 -1
  43. package/dist/ai/BbToast.md +3 -2
  44. package/dist/ai/BbTooltip.md +22 -17
  45. package/dist/ai/BbTree.md +49 -24
  46. package/dist/ai/CommonFieldInput.md +1 -1
  47. package/dist/ai/changelog.json +238 -9
  48. package/dist/ai/components.json +52 -51
  49. package/dist/ai/composables/useBbDialog.md +5 -8
  50. package/dist/ai/composables/useBbForm.md +3 -0
  51. package/dist/ai/composables/useConfirm.md +65 -56
  52. package/dist/ai/composables/useToast.md +2 -1
  53. package/dist/ai/guides/agent-contract.md +3 -3
  54. package/dist/ai/guides/app-layout.md +3 -2
  55. package/dist/ai/guides/eslint-rules.md +3 -1
  56. package/dist/ai/guides/fetch-items-playbook.md +1 -1
  57. package/dist/ai/guides/floating-bottom-panel.md +3 -2
  58. package/dist/ai/guides/icons-policy.md +7 -5
  59. package/dist/ai/guides/inertia-helpers.md +35 -30
  60. package/dist/ai/guides/installation-and-plugin-setup.md +17 -14
  61. package/dist/ai/guides/migration/adoption-checklist.md +2 -2
  62. package/dist/ai/guides/migration/components/bb-badge.md +12 -1
  63. package/dist/ai/guides/migration/components/bb-button.md +24 -0
  64. package/dist/ai/guides/migration/components/bb-dropdown-button.md +11 -0
  65. package/dist/ai/guides/migration/components/bb-tabs.md +2 -2
  66. package/dist/ai/guides/migration/components/bb-toast.md +11 -0
  67. package/dist/ai/guides/migration/components/use-confirm.md +69 -26
  68. package/dist/ai/guides/migration/v2-to-v3.md +52 -10
  69. package/dist/ai/guides/migration/v3-beta-css-classes.md +1 -1
  70. package/dist/ai/guides/options-items-playbook.md +4 -3
  71. package/dist/ai/guides/passthrough.md +2 -2
  72. package/dist/ai/helpers/inertia/manifest.json +28 -15
  73. package/dist/ai/helpers/inertia/messages.ts +3 -3
  74. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +10 -10
  75. package/dist/ai/helpers/inertia/usePromiseForm.ts +1 -1
  76. package/dist/ai/helpers/inertia/usePromiseRouter.ts +7 -2
  77. package/dist/ai/index.md +3 -3
  78. package/dist/ai/manifest/common.json +3 -3
  79. package/dist/ai/manifest/components/BbAccordion.json +8 -5
  80. package/dist/ai/manifest/components/BbAccordion.tree.json +1 -0
  81. package/dist/ai/manifest/components/BbBadge.json +8 -7
  82. package/dist/ai/manifest/components/BbBadge.removed.json +3 -1
  83. package/dist/ai/manifest/components/BbBadge.tree.json +73 -0
  84. package/dist/ai/manifest/components/BbBreadcrumbs.json +1 -1
  85. package/dist/ai/manifest/components/BbButton.json +5 -6
  86. package/dist/ai/manifest/components/BbButton.removed.json +3 -1
  87. package/dist/ai/manifest/components/BbButton.tree.json +24 -7
  88. package/dist/ai/manifest/components/BbCalendar.json +2 -1
  89. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  90. package/dist/ai/manifest/components/BbColorInput.json +1 -1
  91. package/dist/ai/manifest/components/BbColorInput.tree.json +1 -1
  92. package/dist/ai/manifest/components/BbConfirm.json +2 -2
  93. package/dist/ai/manifest/components/BbConfirm.removed.json +9 -0
  94. package/dist/ai/manifest/components/BbConfirm.tree.json +4 -5
  95. package/dist/ai/manifest/components/BbConfirmPortal.json +3 -3
  96. package/dist/ai/manifest/components/BbConfirmPortal.removed.json +7 -0
  97. package/dist/ai/manifest/components/BbDatePicker.json +2 -1
  98. package/dist/ai/manifest/components/BbDatePicker.tree.json +0 -6
  99. package/dist/ai/manifest/components/BbDatePickerInput.json +2 -2
  100. package/dist/ai/manifest/components/BbDatePickerInput.tree.json +1 -1
  101. package/dist/ai/manifest/components/BbDialog.json +6 -1
  102. package/dist/ai/manifest/components/BbDialog.tree.json +41 -1
  103. package/dist/ai/manifest/components/BbDropdown.json +9 -8
  104. package/dist/ai/manifest/components/BbDropdown.tree.json +4 -0
  105. package/dist/ai/manifest/components/BbDropdownButton.json +8 -9
  106. package/dist/ai/manifest/components/BbDropdownButton.removed.json +3 -1
  107. package/dist/ai/manifest/components/BbForm.json +3 -1
  108. package/dist/ai/manifest/components/BbNumberInput.json +1 -1
  109. package/dist/ai/manifest/components/BbNumberInput.tree.json +1 -1
  110. package/dist/ai/manifest/components/BbOffCanvas.json +6 -1
  111. package/dist/ai/manifest/components/BbOffCanvas.tree.json +40 -0
  112. package/dist/ai/manifest/components/BbPagination.json +1 -1
  113. package/dist/ai/manifest/components/BbRadioGroup.json +4 -3
  114. package/dist/ai/manifest/components/BbRating.json +2 -2
  115. package/dist/ai/manifest/components/BbSelect.json +16 -15
  116. package/dist/ai/manifest/components/BbSelect.tree.json +1 -1
  117. package/dist/ai/manifest/components/BbSelectPopover.json +1 -0
  118. package/dist/ai/manifest/components/BbSwitch.json +4 -4
  119. package/dist/ai/manifest/components/BbSwitchGroup.json +7 -7
  120. package/dist/ai/manifest/components/BbTable.json +15 -14
  121. package/dist/ai/manifest/components/BbTable.tree.json +2 -0
  122. package/dist/ai/manifest/components/BbTabs.json +3 -3
  123. package/dist/ai/manifest/components/BbTabsList.json +1 -1
  124. package/dist/ai/manifest/components/BbTabsRoot.json +1 -1
  125. package/dist/ai/manifest/components/BbTag.json +1 -1
  126. package/dist/ai/manifest/components/BbTag.tree.json +1 -1
  127. package/dist/ai/manifest/components/BbTextInput.json +1 -1
  128. package/dist/ai/manifest/components/BbTextInput.tree.json +1 -1
  129. package/dist/ai/manifest/components/BbTextarea.json +1 -1
  130. package/dist/ai/manifest/components/BbTextarea.tree.json +1 -1
  131. package/dist/ai/manifest/components/BbTimePicker.json +1 -1
  132. package/dist/ai/manifest/components/BbTimePickerInput.json +1 -1
  133. package/dist/ai/manifest/components/BbTimePickerInput.tree.json +1 -1
  134. package/dist/ai/manifest/components/BbToast.removed.json +2 -1
  135. package/dist/ai/manifest/components/BbTree.json +2 -2
  136. package/dist/ai/manifest/components/CommonFieldInput.tree.json +3 -3
  137. package/dist/ai/manifest/index.json +4 -4
  138. package/dist/ai/manifest/meta.json +5 -1
  139. package/dist/ai/manifest/types.advanced.json +9 -9
  140. package/dist/ai/manifest/types.api.json +6 -5
  141. package/dist/ai/recipes/inertia/approvals-inbox.md +23 -16
  142. package/dist/ai/recipes/inertia/inline-edit-workspace.md +12 -5
  143. package/dist/ai/recipes/inertia/layout-scaffold.md +5 -3
  144. package/dist/ai/recipes/inertia/onboarding.md +23 -12
  145. package/dist/ai/recipes/inertia/ownership-atlas.md +34 -18
  146. package/dist/ai/recipes/inertia/record-form.md +12 -8
  147. package/dist/ai/recipes/inertia/records-workspace.md +14 -7
  148. package/dist/ai/recipes/inertia/settings-workspace.md +75 -60
  149. package/dist/ai/recipes/inertia/upload-center.md +17 -9
  150. package/dist/ai/recipes/inertia/wizard-form.md +2 -2
  151. package/dist/ai/recipes/nuxt/approvals-inbox.md +23 -16
  152. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +12 -5
  153. package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -3
  154. package/dist/ai/recipes/nuxt/onboarding.md +5 -4
  155. package/dist/ai/recipes/nuxt/ownership-atlas.md +34 -18
  156. package/dist/ai/recipes/nuxt/record-form.md +14 -10
  157. package/dist/ai/recipes/nuxt/records-workspace.md +14 -7
  158. package/dist/ai/recipes/nuxt/settings-workspace.md +70 -60
  159. package/dist/ai/recipes/nuxt/upload-center.md +17 -9
  160. package/dist/ai/recipes/nuxt/wizard-form.md +4 -4
  161. package/dist/ai/recipes/vue/approvals-inbox.md +23 -16
  162. package/dist/ai/recipes/vue/inline-edit-workspace.md +12 -5
  163. package/dist/ai/recipes/vue/layout-scaffold.md +5 -3
  164. package/dist/ai/recipes/vue/onboarding.md +5 -4
  165. package/dist/ai/recipes/vue/ownership-atlas.md +34 -18
  166. package/dist/ai/recipes/vue/record-form.md +14 -10
  167. package/dist/ai/recipes/vue/records-workspace.md +14 -7
  168. package/dist/ai/recipes/vue/settings-workspace.md +70 -60
  169. package/dist/ai/recipes/vue/upload-center.md +17 -9
  170. package/dist/ai/recipes/vue/wizard-form.md +4 -4
  171. package/dist/ai/source/BbAccordion.md +50 -16
  172. package/dist/ai/source/BbBadge.md +420 -26
  173. package/dist/ai/source/BbBadgeButton.md +378 -12
  174. package/dist/ai/source/BbButton.md +205 -55
  175. package/dist/ai/source/BbCalendar.md +5 -0
  176. package/dist/ai/source/BbCheckboxGroup.md +38 -13
  177. package/dist/ai/source/BbConfigScope.md +19 -2
  178. package/dist/ai/source/BbConfirm.md +74 -80
  179. package/dist/ai/source/BbConfirmPortal.md +6 -6
  180. package/dist/ai/source/BbDatePicker.md +9 -2
  181. package/dist/ai/source/BbDatePickerInput.md +3 -1
  182. package/dist/ai/source/BbDialog.md +53 -2
  183. package/dist/ai/source/BbDropdown.md +350 -98
  184. package/dist/ai/source/BbDropdownButton.md +20 -12
  185. package/dist/ai/source/BbDropdownGroup.md +136 -58
  186. package/dist/ai/source/BbForm.md +144 -10
  187. package/dist/ai/source/BbOffCanvas.md +53 -2
  188. package/dist/ai/source/BbPagination.md +1 -1
  189. package/dist/ai/source/BbRadioGroup.md +72 -10
  190. package/dist/ai/source/BbRating.md +30 -22
  191. package/dist/ai/source/BbSelect.md +11 -1
  192. package/dist/ai/source/BbSelectPopover.md +105 -34
  193. package/dist/ai/source/BbSwitch.md +23 -8
  194. package/dist/ai/source/BbSwitchGroup.md +67 -21
  195. package/dist/ai/source/BbTable.md +359 -48
  196. package/dist/ai/source/BbTabs.md +6 -0
  197. package/dist/ai/source/BbTabsList.md +10 -0
  198. package/dist/ai/source/BbTabsPanels.md +6 -0
  199. package/dist/ai/source/BbTabsRoot.md +6 -0
  200. package/dist/ai/source/BbTree.md +14 -4
  201. package/dist/ai/source/CommonFieldInput.md +2 -1
  202. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +7 -3
  203. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +52 -38
  204. package/dist/components/BbAccordion/ptKeys.generated.d.ts +20 -0
  205. package/dist/components/BbAccordion/types.d.ts +21 -7
  206. package/dist/components/BbAccordion/types.js +1 -1
  207. package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -1
  208. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +5 -5
  209. package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
  210. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +65 -42
  211. package/dist/components/BbBadge/types.d.ts +15 -12
  212. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +79 -73
  213. package/dist/components/BbButton/types.d.ts +7 -6
  214. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +2 -1
  215. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +2 -1
  216. package/dist/components/BbCalendar/types.d.ts +5 -0
  217. package/dist/components/BbCalendar/useCalendarGrid.js +1 -1
  218. package/dist/components/BbCalendar/useDayGrid.js +1 -1
  219. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +10 -4
  220. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +2 -2
  221. package/dist/components/BbCheckboxGroup/types.d.ts +2 -2
  222. package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +8 -8
  223. package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +71 -132
  224. package/dist/components/BbConfirm/ptKeys.generated.d.ts +5 -5
  225. package/dist/components/BbConfirm/types.d.ts +5 -5
  226. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +2 -1
  227. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +3 -0
  228. package/dist/components/BbDatePicker/types.d.ts +5 -0
  229. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
  230. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +2 -0
  231. package/dist/components/BbDatePickerInput/types.d.ts +2 -1
  232. package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -0
  233. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +263 -235
  234. package/dist/components/BbDialog/overlayActions.js +94 -0
  235. package/dist/components/BbDialog/types.d.ts +24 -0
  236. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +4 -3
  237. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +382 -332
  238. package/dist/components/BbDropdown/dropdownHandle.js +6 -0
  239. package/dist/components/BbDropdown/normalizeGroups.js +58 -48
  240. package/dist/components/BbDropdown/types.d.ts +107 -48
  241. package/dist/components/BbDropdown/types.js +2 -2
  242. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +71 -71
  243. package/dist/components/BbDropdownButton/types.d.ts +2 -4
  244. package/dist/components/BbForm/BbForm.vue.d.ts +2 -1
  245. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +240 -198
  246. package/dist/components/BbForm/recognizeValidation.d.ts +9 -0
  247. package/dist/components/BbForm/recognizeValidation.js +55 -0
  248. package/dist/components/BbForm/validationError.d.ts +10 -0
  249. package/dist/components/BbForm/validationError.js +11 -0
  250. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -0
  251. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +414 -389
  252. package/dist/components/BbOffCanvas/sheetAttrs.js +5 -5
  253. package/dist/components/BbOffCanvas/types.d.ts +24 -0
  254. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +3 -3
  255. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +10 -4
  256. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +173 -157
  257. package/dist/components/BbRadioGroup/types.d.ts +9 -3
  258. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +112 -103
  259. package/dist/components/BbRating/types.d.ts +3 -2
  260. package/dist/components/BbSelect/BbSelect.vue.d.ts +9 -8
  261. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +3 -1
  262. package/dist/components/BbSelect/types.d.ts +8 -0
  263. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +11 -4
  264. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +513 -502
  265. package/dist/components/BbSelectPopover/types.d.ts +10 -2
  266. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -0
  267. package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +85 -73
  268. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +10 -4
  269. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +171 -152
  270. package/dist/components/BbSwitchGroup/types.d.ts +1 -1
  271. package/dist/components/BbTable/BbTable.vue.d.ts +36 -25
  272. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1338 -1215
  273. package/dist/components/BbTable/BbTableDataRow.js +2 -1
  274. package/dist/components/BbTable/BbTableRowMenu.js +36 -0
  275. package/dist/components/BbTable/types.d.ts +32 -17
  276. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +2 -2
  277. package/dist/components/BbTabs/types.d.ts +6 -0
  278. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
  279. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
  280. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +1 -1
  281. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +88 -94
  282. package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +1 -1
  283. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +9 -9
  284. package/dist/components/BbTree/types.d.ts +8 -2
  285. package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +39 -39
  286. package/dist/composables/formSubmitLock.js +15 -8
  287. package/dist/composables/overlayRegistry.d.ts +5 -0
  288. package/dist/composables/overlayRegistry.js +154 -148
  289. package/dist/composables/useBbDropdown.d.ts +8 -0
  290. package/dist/composables/useBbDropdown.js +3 -1
  291. package/dist/composables/useBbTabs.js +138 -138
  292. package/dist/composables/useConfirm.d.ts +63 -52
  293. package/dist/composables/useConfirm.js +22 -18
  294. package/dist/deprecation/ai-deprecations.json.js +1 -1
  295. package/dist/directives/bbDropdown.d.ts +7 -7
  296. package/dist/directives/bbDropdown.js +21 -14
  297. package/dist/directives/bbTooltip.d.ts +3 -3
  298. package/dist/directives/createPopoverDirective.js +57 -35
  299. package/dist/i18n/locales/ar.json +5 -1
  300. package/dist/i18n/locales/cs.json +5 -1
  301. package/dist/i18n/locales/da.json +5 -1
  302. package/dist/i18n/locales/de-CH.json +5 -1
  303. package/dist/i18n/locales/de.json +5 -1
  304. package/dist/i18n/locales/el.json +5 -1
  305. package/dist/i18n/locales/en-GB.json +5 -1
  306. package/dist/i18n/locales/en.json +5 -1
  307. package/dist/i18n/locales/es-MX.json +5 -1
  308. package/dist/i18n/locales/es.json +5 -1
  309. package/dist/i18n/locales/fa.json +5 -1
  310. package/dist/i18n/locales/fi.json +5 -1
  311. package/dist/i18n/locales/fr.json +5 -1
  312. package/dist/i18n/locales/he.json +5 -1
  313. package/dist/i18n/locales/hu.json +5 -1
  314. package/dist/i18n/locales/it.json +5 -1
  315. package/dist/i18n/locales/ja.json +5 -1
  316. package/dist/i18n/locales/ko.json +5 -1
  317. package/dist/i18n/locales/nb.json +5 -1
  318. package/dist/i18n/locales/nl.json +5 -1
  319. package/dist/i18n/locales/pl.json +5 -1
  320. package/dist/i18n/locales/pt-BR.json +5 -1
  321. package/dist/i18n/locales/pt-PT.json +5 -1
  322. package/dist/i18n/locales/ro.json +5 -1
  323. package/dist/i18n/locales/ru.json +5 -1
  324. package/dist/i18n/locales/sv.json +5 -1
  325. package/dist/i18n/locales/tr.json +5 -1
  326. package/dist/i18n/locales/uk.json +5 -1
  327. package/dist/i18n/locales/zh-CN.json +5 -1
  328. package/dist/i18n/locales/zh-HK.json +5 -1
  329. package/dist/i18n/locales/zh-TW.json +5 -1
  330. package/dist/index.d.ts +2 -0
  331. package/dist/index.js +4 -3
  332. package/dist/llms-full.txt +1984 -1145
  333. package/dist/llms-medium.txt +21 -18
  334. package/dist/llms.txt +2 -2
  335. package/dist/locale-blueprint.json +5 -1
  336. package/dist/plugin.js +17 -40
  337. package/dist/pluginCore.js +30 -0
  338. package/dist/styles.css +2 -2
  339. package/dist/types/ActionButton.d.ts +26 -5
  340. package/dist/types/ActionButton.js +11 -0
  341. package/dist/types/ConfigDefaults.d.ts +34 -3
  342. package/dist/types/ConfigDefaults.js +14 -8
  343. package/dist/types/ItemPath.d.ts +33 -4
  344. package/dist/types/ptComponentMap.d.ts +1 -1
  345. package/dist/utilities/functions/clickCount.js +14 -0
  346. package/dist/utils/versionCheck.js +1 -1
  347. package/llms.txt +2 -2
  348. package/package.json +11 -1
  349. package/scripts/README.md +31 -27
  350. package/scripts/lib/adoption-checklist.json +2 -2
  351. package/scripts/lib/eslint-disable.mjs +5 -3
  352. package/scripts/lib/eslint-plugin.d.ts +2 -0
  353. package/scripts/lib/eslint-plugin.mjs +213 -1
  354. package/scripts/lib/redundant-item-accessor.mjs +4 -1
  355. package/scripts/lib/release-results.mjs +32 -1
  356. package/scripts/lib/renamed-item-field.mjs +4 -1
  357. package/scripts/lib/tab-links.mjs +4 -1
  358. package/scripts/lib/tree-default-expandable.mjs +53 -0
  359. package/scripts/lib/validate-bb-markup.mjs +536 -52
@@ -1,6 +1,7 @@
1
1
  import { IconType } from '../../types/Icon.js';
2
2
  import { PtCompoundProps, PtValue, PtVariantAttrs } from '../../types/passthrough.js';
3
3
  import { Sizes } from '../../types/SizeScale.js';
4
+ import { Responsive } from '../../types/ResponsiveSize.js';
4
5
  import { BadgeVariantBuiltIn, BadgeVariantRegistry, BadgeVariantType } from '../../types/BadgeVariant.js';
5
6
  import { BbBaseButtonProps, BbLinkSlotProps } from '../BbBaseButton/types.js';
6
7
  import { BbBadgePtKeys } from './ptKeys.generated.js';
@@ -72,11 +73,11 @@ export type BbBadgeProps = BbBadgePtProps & {
72
73
  [K in `${BbBadgePtPart}:${BadgeVariantBuiltIn | keyof BadgeVariantRegistry}`]?: PtValue;
73
74
  };
74
75
  /**
75
- * Renders an icon-only badge. When set, `prepend:icon` / `append:icon` are
76
- * ignored and the default slot becomes the badge's visually hidden accessible
77
- * label — always provide it.
76
+ * Shows only the badge's icon (`prepend:icon` when it has both); the
77
+ * label (`text` or the slot) stays its visually hidden accessible name, so
78
+ * always write it. `true`, or per breakpoint: `{ default: true, md: false }`.
78
79
  */
79
- icon?: IconType;
80
+ iconOnly?: Responsive<boolean>;
80
81
  /**
81
82
  * Icon rendered before the label.
82
83
  */
@@ -88,7 +89,7 @@ export type BbBadgeProps = BbBadgePtProps & {
88
89
  */
89
90
  'append:icon'?: IconType;
90
91
  /**
91
- * Shows a spinner in place of the leftmost icon (`icon` or `prepend:icon`;
92
+ * Shows a spinner in place of the leftmost icon (`prepend:icon`;
92
93
  * the `append:icon` when it is the only one; else the leading slot), as
93
94
  * `BbButton` does, with a hidden loading announcement.
94
95
  */
@@ -106,10 +107,13 @@ export type BbBadgeProps = BbBadgePtProps & {
106
107
  */
107
108
  clearableLabel?: string;
108
109
  /**
109
- * Preset size of the badge.
110
+ * Preset size of the badge: one size, or per breakpoint
111
+ * (`{ default: 'sm', lg: 'md' }`), as on `BbButton`.
110
112
  * @defaultValue `'md'`
111
113
  */
112
- size?: keyof Sizes;
114
+ size?: Responsive<keyof Sizes>;
115
+ /** The label, when the default slot is empty (the slot wins), as on `BbButton`. */
116
+ text?: string;
113
117
  /**
114
118
  * Visual variant: `primary`, `secondary`, `destructive`, or `outline`.
115
119
  * Status colours are a registration (vite plugin `components.BbBadge.variants`, the
@@ -132,17 +136,16 @@ export type BbBadgeIconSlotProps = BbLinkSlotProps & {
132
136
  };
133
137
  export type BbBadgeSlots = {
134
138
  /**
135
- * The badge's label content. When `icon` is set this becomes the visually
139
+ * The badge's label content. With `icon-only` this becomes the visually
136
140
  * hidden accessible label. Render a `BbBadgeButton` here to make the badge
137
141
  * body interactive (the wrapper stays a passive `<span>`).
138
142
  */
139
143
  default?: (props: object) => any;
140
144
  /**
141
- * The glyph of an icon-only badge, replacing the `icon` prop. Renders inside
142
- * the `icon` part: `pt:icon`, `--icon-size` and the loading spinner apply.
145
+ * The leading icon, replacing `prepend:icon` (the one `icon-only` shows).
146
+ * Renders inside the `icon` part: `pt:icon`, `--icon-size` and the loading
147
+ * spinner apply.
143
148
  */
144
- icon?: (props: BbBadgeIconSlotProps) => any;
145
- /** The leading icon, replacing `prepend:icon`; inside the `icon` part. */
146
149
  'prepend:icon'?: (props: BbBadgeIconSlotProps) => any;
147
150
  /** The trailing icon, replacing `append:icon`; inside the `icon` part. */
148
151
  'append:icon'?: (props: BbBadgeIconSlotProps) => any;
@@ -5,22 +5,22 @@ import r from "../BbIcon/BbIcon.vue.js";
5
5
  import { BB_FORM_SUBMIT_LOCK as i } from "../../composables/formSubmitLock.js";
6
6
  import { pickBy as a } from "../../utilities/functions/pickBy.js";
7
7
  import { noop as o } from "../../utilities/functions/noop.js";
8
- import { useLocale as s } from "../../composables/useLocale.js";
9
- import { useLogger as ee } from "../../composables/useLogger.js";
10
- import { useUntil as te } from "../../composables/useUntil.js";
11
- import { removedPropsFor as ne } from "../../deprecation/removedProps.js";
12
- import { warnRemovedAttrs as c } from "../../utilities/functions/warnRemovedAttrs.js";
13
- import { extractHtmlContainer as re } from "../../utilities/functions/extractDomContainer.js";
14
- import { isEqual as l } from "../../utilities/functions/isEqual.js";
15
- import { usePassthrough as ie, variantPt as u } from "../../composables/usePassthrough.js";
8
+ import { useLocale as ee } from "../../composables/useLocale.js";
9
+ import { useLogger as te } from "../../composables/useLogger.js";
10
+ import { useUntil as ne } from "../../composables/useUntil.js";
11
+ import { removedPropsFor as re } from "../../deprecation/removedProps.js";
12
+ import { warnRemovedAttrs as ie } from "../../utilities/functions/warnRemovedAttrs.js";
13
+ import { extractHtmlContainer as s } from "../../utilities/functions/extractDomContainer.js";
14
+ import { isEqual as c } from "../../utilities/functions/isEqual.js";
15
+ import { usePassthrough as l, variantPt as u } from "../../composables/usePassthrough.js";
16
16
  import { useConfigDefaults as d } from "../../composables/useConfigDefaults.js";
17
17
  import { BB_BUTTON_PT as f } from "./types.js";
18
18
  import { useToggleRoving as p } from "./toggleRoving.js";
19
19
  import { provideLinkState as m, useLinkState as h } from "../BbBaseButton/useLinkState.js";
20
- import { Fragment as g, Transition as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as ae, createTextVNode as oe, defineComponent as S, guardReactiveProps as C, inject as se, mergeModels as w, mergeProps as T, normalizeProps as E, openBlock as D, ref as O, renderSlot as k, toDisplayString as A, unref as j, useAttrs as ce, useModel as le, useSlots as ue, watchEffect as M, withCtx as N } from "vue";
20
+ import { Transition as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as ae, defineComponent as S, guardReactiveProps as C, inject as oe, mergeModels as w, mergeProps as T, normalizeProps as E, openBlock as D, ref as O, renderSlot as k, toDisplayString as A, unref as j, useAttrs as se, useModel as ce, useSlots as le, watchEffect as M, withCtx as N } from "vue";
21
21
  // src/components/BbButton/BbButton.vue?vue&type=script&setup=true&lang.ts
22
22
  var P = {
23
- key: 5,
23
+ key: 3,
24
24
  class: "bb-button__loading-label bb-sr-only"
25
25
  }, F = /*@__PURE__*/ S({
26
26
  mixins: [u(f)],
@@ -96,7 +96,7 @@ var P = {
96
96
  href: {},
97
97
  download: { type: [Boolean, String] },
98
98
  external: { type: Boolean },
99
- icon: {},
99
+ iconOnly: { type: [Boolean, Object] },
100
100
  loading: { type: Boolean },
101
101
  method: {},
102
102
  onBefore: {},
@@ -148,13 +148,13 @@ var P = {
148
148
  }),
149
149
  emits: ["update:modelValue"],
150
150
  setup(u, { expose: S }) {
151
- let w = le(u, "modelValue"), F = u, I = ue(), L = d("BbButton", F, {
151
+ let w = ce(u, "modelValue"), F = u, I = le(), L = d("BbButton", F, {
152
152
  disableAutoLoading: !1,
153
153
  size: "md",
154
154
  variant: "primary",
155
155
  block: !1
156
156
  });
157
- process.env.NODE_ENV !== "production" && c("BbButton", ne("BbButton"));
157
+ process.env.NODE_ENV !== "production" && ie("BbButton", re("BbButton"));
158
158
  let R = [
159
159
  "xs",
160
160
  "sm",
@@ -162,62 +162,75 @@ var P = {
162
162
  "lg",
163
163
  "xl",
164
164
  "2xl"
165
- ], z = ee(), B = v(() => w.value !== void 0), V = v(() => l(w.value, F.trueValue)), { t: H } = s(), U = ce(), W = O();
165
+ ], z = [
166
+ "default",
167
+ "sm",
168
+ "md",
169
+ "lg",
170
+ "xl",
171
+ "2xl"
172
+ ], B = te(), V = _(() => w.value !== void 0), H = _(() => c(w.value, F.trueValue)), { t: U } = ee(), W = se(), G = O();
166
173
  process.env.NODE_ENV !== "production" && M(() => {
167
- B.value || "aria-pressed" in U && z.warn("BbButton: `aria-pressed` is managed by the component and your binding is ignored. Bind `v-model` (with `true-value`/`false-value` when the state is not boolean) — that sets `aria-pressed`, applies `bb-button--pressed`, and flips the value on click.");
174
+ V.value || "aria-pressed" in W && B.warn("BbButton: `aria-pressed` is managed by the component and your binding is ignored. Bind `v-model` (with `true-value`/`false-value` when the state is not boolean) — that sets `aria-pressed`, applies `bb-button--pressed`, and flips the value on click.");
168
175
  });
169
- let de = (e) => {
170
- W.value = re(e) ?? void 0;
171
- }, fe = v(() => {
172
- let { onClick: e, class: t, ...n } = U;
176
+ let ue = (e) => {
177
+ G.value = s(e) ?? void 0;
178
+ }, de = _(() => {
179
+ let { onClick: e, class: t, ...n } = W;
173
180
  return n;
174
- }), G = O(0), pe = se(i, null), K = () => F.type === "submit" && U.form != null ? String(U.form) : void 0, me = e(K), he = () => F.type === "submit" && (K() ? me(W.value) : !!pe?.savingFor(W.value)), q = v(() => F.loading || !L.disableAutoLoading && (!!G.value || he())), ge = te(q), J = h(F);
175
- m(J);
176
- let Y = v(() => !!F.icon || !!I.icon), X = v(() => ({
177
- ...J.value,
178
- pressed: B.value && V.value,
179
- loading: q.value,
181
+ }), K = O(0), fe = oe(i, null), q = () => F.type === "submit" && W.form != null ? String(W.form) : void 0, pe = e(q), me = () => F.type === "submit" && (q() ? pe(G.value) : !!fe?.savingFor(G.value)), J = _(() => F.loading || !L.disableAutoLoading && (!!K.value || me())), he = ne(J), Y = h(F);
182
+ m(Y);
183
+ let ge = _(() => {
184
+ let e = F.iconOnly;
185
+ if (!e) return [];
186
+ if (e === !0) return ["bb-button--icon"];
187
+ let t = !!e.default;
188
+ return z.flatMap((n) => (n !== "default" && e[n] !== void 0 && (t = !!e[n]), t ? [`bb-button--icon-${n}`] : []));
189
+ }), X = _(() => ({
190
+ ...Y.value,
191
+ pressed: V.value && H.value,
192
+ loading: J.value,
180
193
  disabled: !!F.disabled
181
- })), Z = ie({
194
+ })), Z = l({
182
195
  component: "BbButton",
183
- attrs: U,
196
+ attrs: W,
184
197
  props: F,
185
198
  parts: f.parts,
186
199
  states: f.states,
187
200
  active: {
188
- loading: () => q.value,
201
+ loading: () => J.value,
189
202
  disabled: () => !!F.disabled,
190
- pressed: () => B.value && V.value,
191
- activeLink: () => J.value.activeLink,
192
- exactActiveLink: () => J.value.exactActiveLink
203
+ pressed: () => V.value && H.value,
204
+ activeLink: () => Y.value.activeLink,
205
+ exactActiveLink: () => Y.value.exactActiveLink
193
206
  },
194
207
  variant: {
195
208
  ...f.variant,
196
209
  current: () => L.variant
197
210
  }
198
211
  }), _e = async (e) => {
199
- if (q.value && !F.interactiveWhileLoading) return (F.type === "submit" || F.href || F.to) && e.preventDefault(), null;
200
- if (B.value) {
212
+ if (J.value && !F.interactiveWhileLoading) return (F.type === "submit" || F.href || F.to) && e.preventDefault(), null;
213
+ if (V.value) {
201
214
  let e = F.trueValue, t = F.falseValue;
202
- w.value = l(w.value, e) ? t : e;
215
+ w.value = c(w.value, e) ? t : e;
203
216
  }
204
- let t = [U.onClick ?? o].flat(), n = t.map((t) => t(e)), r = n.filter((e) => e && typeof e.then == "function");
217
+ let t = [W.onClick ?? o].flat(), n = t.map((t) => t(e)), r = n.filter((e) => e && typeof e.then == "function");
205
218
  if (!r.length) return n[0];
206
219
  let i = t.length === 1 ? n[0] : Promise.all(r).then(() => {});
207
- G.value++;
220
+ K.value++;
208
221
  try {
209
222
  return await i;
210
223
  } finally {
211
- G.value--;
224
+ K.value--;
212
225
  }
213
- }, ve = v(() => {
226
+ }, ve = _(() => {
214
227
  let e = typeof L.size == "string" ? { default: L.size } : {
215
228
  default: "md",
216
229
  ...L.size
217
230
  };
218
231
  return Object.fromEntries(Object.entries(e).map(([e, t]) => {
219
232
  let n = t;
220
- return R.includes(t) || (z.warn(`Invalid size: "${t}" in BbButton. Expected one of: ${R.join(", ")}. Falling back to "md".`), n = "md"), [e === "default" ? `bb-button--${n}` : `bb-button--${e}-${n}`, !0];
233
+ return R.includes(t) || (B.warn(`Invalid size: "${t}" in BbButton. Expected one of: ${R.join(", ")}. Falling back to "md".`), n = "md"), [e === "default" ? `bb-button--${n}` : `bb-button--${e}-${n}`, !0];
221
234
  }));
222
235
  }), ye = /* @__PURE__ */ new Set([
223
236
  "append:icon",
@@ -226,38 +239,38 @@ var P = {
226
239
  "interactiveWhileLoading",
227
240
  "falseValue",
228
241
  "group",
229
- "icon",
242
+ "iconOnly",
230
243
  "loading",
231
244
  "modelValue",
232
245
  "prepend:icon",
233
246
  "size",
234
247
  "trueValue",
235
248
  "variant"
236
- ]), be = v(() => ({
237
- ...fe.value,
249
+ ]), be = _(() => ({
250
+ ...de.value,
238
251
  ...a(F, (e, t) => !ye.has(t) && t !== "pt" && !t.startsWith("pt:"))
239
- })), Q = v(() => q.value && !F.interactiveWhileLoading), $ = p(W, v(() => !!F.group && B.value && !("tabindex" in U)), () => [
240
- V.value,
252
+ })), Q = _(() => J.value && !F.interactiveWhileLoading), $ = p(G, _(() => !!F.group && V.value && !("tabindex" in W)), () => [
253
+ H.value,
241
254
  F.disabled,
242
255
  Q.value
243
- ]), xe = v(() => {
256
+ ]), xe = _(() => {
244
257
  let e = Q.value ? -1 : $.tabindex.value;
245
258
  return {
246
259
  ...Q.value ? { "aria-disabled": !0 } : {},
247
260
  ...e === void 0 ? {} : { tabindex: e }
248
261
  };
249
- }), Se = v(() => T(be.value, {
262
+ }), Se = _(() => T(be.value, {
250
263
  ...xe.value,
251
- "aria-pressed": B.value ? V.value : void 0,
264
+ "aria-pressed": V.value ? H.value : void 0,
252
265
  class: [
253
266
  "bb-button",
254
267
  ve.value,
268
+ ge.value,
255
269
  {
256
- "bb-button--loading": q.value,
270
+ "bb-button--loading": J.value,
257
271
  "bb-button--soft-disabled": Q.value,
258
272
  "bb-button--group": F.group,
259
- "bb-button--icon": Y.value,
260
- "bb-button--pressed": B.value && V.value,
273
+ "bb-button--pressed": V.value && H.value,
261
274
  [`bb-button--${L.variant}`]: L.variant !== "none"
262
275
  }
263
276
  ],
@@ -266,44 +279,37 @@ var P = {
266
279
  onFocusin: $.onFocusin,
267
280
  onKeydown: $.onKeydown
268
281
  }, Z.root));
269
- return S({ $el: W }), (e, i) => (D(), y(j(t), T({ ref: de }, Se.value), {
282
+ return S({ $el: G }), (e, i) => (D(), v(t, T({ ref: ue }, Se.value), {
270
283
  default: N(() => [
271
- j(ge) ? (D(), y(_, {
284
+ j(he) ? (D(), v(g, {
272
285
  key: 0,
273
286
  appear: "",
274
287
  name: "bb-button-spinner"
275
288
  }, {
276
- default: N(() => [q.value ? (D(), y(j(n), T({
289
+ default: N(() => [J.value ? (D(), v(n, T({
277
290
  key: 0,
278
291
  class: "bb-button__spinner"
279
- }, j(Z).spinner), null, 16)) : b("", !0)]),
292
+ }, j(Z).spinner), null, 16)) : y("", !0)]),
280
293
  _: 1
281
- })) : b("", !0),
282
- I.icon ? (D(), x("span", T({
294
+ })) : y("", !0),
295
+ I["prepend:icon"] ? (D(), b("span", T({
283
296
  key: 1,
284
- class: "bb-button__icon bb-button__icon-slot"
285
- }, j(Z).icon), [k(e.$slots, "icon", E(C(X.value)))], 16)) : F.icon ? (D(), y(r, T({
286
- key: 2,
287
- class: "bb-button__icon",
288
- icon: F.icon
289
- }, j(Z).icon), null, 16, ["icon"])) : I["prepend:icon"] ? (D(), x("span", T({
290
- key: 3,
291
297
  class: "bb-button__prepend-icon bb-button__icon-slot"
292
- }, j(Z).icon), [k(e.$slots, "prepend:icon", E(C(X.value)))], 16)) : F["prepend:icon"] ? (D(), y(r, T({
293
- key: 4,
298
+ }, j(Z).icon), [k(e.$slots, "prepend:icon", E(C(X.value)))], 16)) : F["prepend:icon"] ? (D(), v(r, T({
299
+ key: 2,
294
300
  class: "bb-button__prepend-icon",
295
301
  icon: F["prepend:icon"]
296
- }, j(Z).icon), null, 16, ["icon"])) : b("", !0),
297
- ae("span", T({ class: ["bb-button__text", { "bb-sr-only": Y.value }] }, j(Z).text), [k(e.$slots, "default", E(C(j(J))), () => [oe(A(u.text), 1)])], 16),
298
- q.value ? (D(), x("span", P, A(j(H)("common.loadingText")), 1)) : b("", !0),
299
- Y.value ? b("", !0) : (D(), x(g, { key: 6 }, [I["append:icon"] ? (D(), x("span", T({
300
- key: 0,
302
+ }, j(Z).icon), null, 16, ["icon"])) : y("", !0),
303
+ x("span", T({ class: ["bb-button__text", { "bb-sr-only": F.iconOnly === !0 }] }, j(Z).text), [k(e.$slots, "default", E(C(j(Y))), () => [ae(A(u.text), 1)])], 16),
304
+ J.value ? (D(), b("span", P, A(j(U)("common.loadingText")), 1)) : y("", !0),
305
+ I["append:icon"] ? (D(), b("span", T({
306
+ key: 4,
301
307
  class: "bb-button__append-icon bb-button__icon-slot"
302
- }, j(Z).icon), [k(e.$slots, "append:icon", E(C(X.value)))], 16)) : F["append:icon"] ? (D(), y(r, T({
303
- key: 1,
308
+ }, j(Z).icon), [k(e.$slots, "append:icon", E(C(X.value)))], 16)) : F["append:icon"] ? (D(), v(r, T({
309
+ key: 5,
304
310
  class: "bb-button__append-icon",
305
311
  icon: F["append:icon"]
306
- }, j(Z).icon), null, 16, ["icon"])) : b("", !0)], 64))
312
+ }, j(Z).icon), null, 16, ["icon"])) : y("", !0)
307
313
  ]),
308
314
  _: 3
309
315
  }, 16));
@@ -163,9 +163,11 @@ export type BbButtonOwnProps = {
163
163
  */
164
164
  external?: boolean;
165
165
  /**
166
- * Used when only an icon with no text should be displayed.
166
+ * Shows only the button's icon (`prepend:icon` when it has both); the
167
+ * label is hidden but stays its accessible name, so always write it.
168
+ * `true`, or per breakpoint: `{ default: true, md: false }`.
167
169
  */
168
- icon?: IconType;
170
+ iconOnly?: Responsive<boolean>;
169
171
  /**
170
172
  * Triggers a loading indicator. A loading button is soft-disabled on its
171
173
  * own (`aria-disabled`, out of the tab order, clicks and navigation
@@ -393,11 +395,10 @@ export type BbButtonSlots = {
393
395
  */
394
396
  default?: (props: BbLinkSlotProps) => any;
395
397
  /**
396
- * The icon of an icon-only button, replacing the `icon` prop. Renders inside
397
- * the `icon` part: `pt:icon`, `--icon-size` and the loading spinner apply.
398
+ * The leading icon, replacing `prepend:icon` (the one `icon-only` shows).
399
+ * Renders inside the `icon` part: `pt:icon`, `--icon-size` and the loading
400
+ * spinner apply.
398
401
  */
399
- icon?: (props: BbButtonIconSlotProps) => any;
400
- /** The leading icon, replacing `prepend:icon`; inside the `icon` part. */
401
402
  'prepend:icon'?: (props: BbButtonIconSlotProps) => any;
402
403
  /** The trailing icon, replacing `append:icon`; inside the `icon` part. */
403
404
  'append:icon'?: (props: BbButtonIconSlotProps) => any;
@@ -40,7 +40,8 @@ declare const __VLS_export: <R extends boolean = false, M extends boolean = fals
40
40
  utc?: boolean;
41
41
  disabled?: boolean;
42
42
  readonly?: boolean;
43
- } & BbCalendarModelProps<R, M> & Omit<import('vue').HTMLAttributes, `pt:${string}&${string}` | "readonly" | "disabled" | "step" | "type" | "pt" | "floating" | "max" | "selectable" | "activeSegment" | "numberOfMonths" | "seconds" | "ampm" | "min" | "firstDayOfWeek" | "utc" | keyof import('./ptKeys.generated.js').BbCalendarPtKeys | keyof BbCalendarModelProps<R, M>> & {}) & {
43
+ clearable?: boolean;
44
+ } & BbCalendarModelProps<R, M> & Omit<import('vue').HTMLAttributes, `pt:${string}&${string}` | "readonly" | "disabled" | "step" | "type" | "pt" | "floating" | "clearable" | "max" | "selectable" | "activeSegment" | "numberOfMonths" | "seconds" | "ampm" | "min" | "firstDayOfWeek" | "utc" | keyof import('./ptKeys.generated.js').BbCalendarPtKeys | keyof BbCalendarModelProps<R, M>> & {}) & {
44
45
  "onUpdate:modelValue"?: ((value: import('./types.js').BbDateValue<R, M>) => any) | undefined;
45
46
  "onUpdate:activeSegment"?: ((value: BbCalendarSegment) => any) | undefined;
46
47
  "onTime-pick"?: ((payload: {
@@ -152,7 +152,8 @@ var De = ["role"], Oe = {
152
152
  firstDayOfWeek: {},
153
153
  utc: { type: Boolean },
154
154
  disabled: { type: Boolean },
155
- readonly: { type: Boolean }
155
+ readonly: { type: Boolean },
156
+ clearable: { type: Boolean }
156
157
  },
157
158
  emits: [
158
159
  "update:modelValue",
@@ -225,6 +225,11 @@ export type BbCalendarBaseProps = BbCalendarPtProps & {
225
225
  disabled?: boolean;
226
226
  /** Shows the calendar and lets the user page through it, but no pick changes the value. */
227
227
  readonly?: boolean;
228
+ /**
229
+ * Clicking the selected date (week, month, year) again clears a single
230
+ * value. Off: re-picking keeps it. `multiple` and `range` ignore it.
231
+ */
232
+ clearable?: boolean;
228
233
  };
229
234
  /**
230
235
  * The v-model of `BbCalendar`, typed by the mode props (vmodel): what the
@@ -224,7 +224,7 @@ var x = ({ props: x, firstDayOfWeek: S, floating: Me, min: Ne, max: Pe, modelVal
224
224
  } else if (x.multiple) {
225
225
  if (!Array.isArray(i)) return;
226
226
  $(r.selected ? i.filter((e) => e !== n) : Te([...i, n]));
227
- } else $(r.selected ? null : n);
227
+ } else $(r.selected && x.clearable ? null : n);
228
228
  };
229
229
  De({
230
230
  passthrough: Ie,
@@ -192,7 +192,7 @@ var D = ({ props: D, cursor: O, panes: k, system: A, nu: j, setCursor: M, pick:
192
192
  } else N(m([...t, s(e.original, I.value)]));
193
193
  }
194
194
  }, we = (e) => {
195
- e.selected ? N(null) : N(s(e.original, I.value));
195
+ e.selected && D.clearable ? N(null) : N(s(e.original, I.value));
196
196
  }, $ = (e, t) => {
197
197
  let n = O.value.clone();
198
198
  for (let r = 0; r < 366; r++) if (n = n.add(e, t), !G(n)) return n;
@@ -1,5 +1,7 @@
1
+ import { ItemGetter } from '../../types/ItemAccessor.js';
2
+ import { ItemKeyInput, MultipleInput, OptionValueOf, SelectModelOf } from '../../types/ItemPath.js';
1
3
  import { BbCheckboxGroupEvents, BbCheckboxGroupSlots } from './types.js';
2
- declare const __VLS_export: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ declare const __VLS_export: <const T = any, A extends string | ((...args: never[]) => unknown) | undefined = undefined, Tx extends string | undefined = undefined, M extends boolean = true>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
5
  props: import('vue').PublicProps & __VLS_PrettifyLocal<({
4
6
  [x: `pt:${string}&${string}`]: unknown;
5
7
  } & {
@@ -204,10 +206,14 @@ declare const __VLS_export: <T = any>(__VLS_props: NonNullable<Awaited<typeof __
204
206
  "indicator:line"?: import('../../types/passthrough.js').PtValue | undefined;
205
207
  }) | undefined;
206
208
  variant?: import('../../index.js').CheckboxVariantType;
207
- } & Omit<import('vue').HTMLAttributes, "legend" | "reverse" | `pt:${string}&${string}` | "readonly" | "disabled" | "warnings" | "errors" | "description" | "hint" | "pt" | "block" | "dependencies" | "variant" | "compact" | "layout" | "inputPosition" | "listLayout" | "itemLayout" | "itemReverse" | "modelValue" | "autofocus" | "labelAlign" | "inputAlign" | "hasErrors" | "hasWarnings" | "hideLabel" | "id" | "name" | "persistentHint" | keyof import('../../composables/useFormBinding.js').FormFieldProps<any> | keyof import('./ptKeys.generated.js').BbCheckboxGroupPtKeys | "depsDebounceTime" | "enforceCoherence" | "hideLegend" | "items" | "itemText" | "itemValue" | "itemProps" | "itemLabelAlign" | "itemInputAlign" | "legendPosition" | "legendMode" | "loadingText" | "max" | "multiple" | "modelValueDebounceTime" | "emptyText" | "failedText" | "selectable" | "onFocus" | "onBlur" | "onChange" | "onInput" | "onKeydown" | "onMousedown" | "onMouseup" | "onClick"> & {}) & {
209
+ } & {
210
+ itemValue?: ItemKeyInput<T, A> | ItemGetter<T, any>;
211
+ itemText?: ItemKeyInput<T, Tx> | ItemGetter<T, string>;
212
+ multiple?: MultipleInput<M, true>;
213
+ } & Omit<import('vue').HTMLAttributes, "legend" | "reverse" | `pt:${string}&${string}` | "readonly" | "disabled" | "warnings" | "errors" | "description" | "hint" | "pt" | "block" | "onClick" | "variant" | "dependencies" | "compact" | "layout" | "inputPosition" | "listLayout" | "itemLayout" | "itemReverse" | "modelValue" | "autofocus" | "labelAlign" | "inputAlign" | "hasErrors" | "hasWarnings" | "hideLabel" | "id" | "name" | "persistentHint" | keyof import('../../composables/useFormBinding.js').FormFieldProps<any> | keyof import('./ptKeys.generated.js').BbCheckboxGroupPtKeys | "depsDebounceTime" | "enforceCoherence" | "hideLegend" | "items" | "itemText" | "itemValue" | "itemProps" | "itemLabelAlign" | "itemInputAlign" | "legendPosition" | "legendMode" | "loadingText" | "max" | "multiple" | "modelValueDebounceTime" | "emptyText" | "failedText" | "selectable" | "onFocus" | "onBlur" | "onChange" | "onInput" | "onKeydown" | "onMousedown" | "onMouseup"> & {}) & {
208
214
  onActive?: (() => any) | undefined;
209
215
  onInput?: ((event: Event) => any) | undefined;
210
- "onUpdate:modelValue"?: ((value: any) => any) | undefined;
216
+ "onUpdate:modelValue"?: ((value: SelectModelOf<OptionValueOf<T, A>, M>) => any) | undefined;
211
217
  onBlur?: ((event: FocusEvent) => any) | undefined;
212
218
  onInactive?: (() => any) | undefined;
213
219
  onChange?: ((event: Event) => any) | undefined;
@@ -222,7 +228,7 @@ declare const __VLS_export: <T = any>(__VLS_props: NonNullable<Awaited<typeof __
222
228
  expose: (exposed: {}) => void;
223
229
  attrs: any;
224
230
  slots: BbCheckboxGroupSlots<T>;
225
- emit: BbCheckboxGroupEvents;
231
+ emit: BbCheckboxGroupEvents<SelectModelOf<OptionValueOf<T, A>, M>>;
226
232
  }>) => import('vue').VNode & {
227
233
  __ctx?: Awaited<typeof __VLS_setup>;
228
234
  };
@@ -271,7 +271,7 @@ var A = /*@__PURE__*/ x({
271
271
  clientReproducible: Fe,
272
272
  trigger: !0,
273
273
  currentValue: M.modelValue,
274
- multiple: M.multiple,
274
+ multiple: !!M.multiple,
275
275
  fn: async () => {
276
276
  await z(void 0, "initial", M.modelValue) === "applied" && V();
277
277
  }
@@ -299,7 +299,7 @@ var A = /*@__PURE__*/ x({
299
299
  key: "valueHash"
300
300
  }), { coherent: K, coherentValue: We } = h({
301
301
  modelValue: D(() => M.modelValue),
302
- multiple: M.multiple,
302
+ multiple: !!M.multiple,
303
303
  iteratee: (e) => !!Ue.value[ee(e)]
304
304
  }), q = 0;
305
305
  g(() => M.modelValue, async () => {
@@ -291,7 +291,7 @@ export type BbCheckboxGroupBaseProps<T> = {
291
291
  */
292
292
  selectable?: boolean | ((item: T) => boolean);
293
293
  } & FormFieldProps<any>;
294
- export type BbCheckboxGroupEvents = {
294
+ export type BbCheckboxGroupEvents<V = any> = {
295
295
  /**
296
296
  * Emitted when one of the generated checkbox inputs loses focus.
297
297
  * Forwards the original DOM `FocusEvent`.
@@ -342,7 +342,7 @@ export type BbCheckboxGroupEvents = {
342
342
  /**
343
343
  * Emitted with the coherent next selection array whenever selection changes.
344
344
  */
345
- (e: 'update:modelValue', value: any): void;
345
+ (e: 'update:modelValue', value: V): void;
346
346
  };
347
347
  /**
348
348
  * BbCheckboxGroup's `pt:*` attributes: the documented keys, and the patterns
@@ -12,16 +12,16 @@ var d = /*@__PURE__*/ o({
12
12
  setup(o) {
13
13
  let d = o;
14
14
  r();
15
- let f = s(n, null), p = t, m = process.env.NODE_ENV === "production" ? null : e(), h = /* @__PURE__ */ new Set(), g, _, v = a(() => {
15
+ let f = s(n, null), p = t, m = process.env.NODE_ENV === "production" ? null : e(), h = /* @__PURE__ */ new Set(), g = (e) => Array.isArray(e) ? e.map(g) : e && typeof e == "object" && [Object.prototype, null].includes(Object.getPrototypeOf(u(e))) ? Object.fromEntries(Object.entries(u(e)).map(([e, t]) => [e, g(t)])) : e, _, v, y = a(() => {
16
16
  let e = d.config;
17
- if (!e) return g = _ = void 0;
18
- let t = JSON.stringify(u(e));
19
- if (t === g && _) return _;
17
+ if (!e) return _ = v = void 0;
18
+ let t = JSON.stringify(u(e), (e, t) => typeof t == "function" ? `fn:${String(t)}` : t);
19
+ if (t === _ && v) return v;
20
20
  if (m) for (let [t, n] of Object.entries(e)) for (let e of Object.keys(n ?? {})) (e === "variants" || p[t]?.includes(e)) && !h.has(`${t}.${e}`) && (h.add(`${t}.${e}`), m.warn(`BbConfigScope: \`config.${t}.${e}\` is app-wide only and is ignored here. Set it in the plugin's \`components\` map.`));
21
- return g = t, _ = {
21
+ return _ = t, v = {
22
22
  source: "<BbConfigScope :config>",
23
- map: JSON.parse(t)
24
- }, _;
23
+ map: g(u(e))
24
+ }, v;
25
25
  });
26
26
  return c(n, a(() => {
27
27
  let e = [...f?.value ?? []];
@@ -29,7 +29,7 @@ var d = /*@__PURE__*/ o({
29
29
  source: `configScopes.${d.name}`,
30
30
  map: i.value[d.name] ?? {}
31
31
  });
32
- let t = v.value;
32
+ let t = y.value;
33
33
  return t && e.push(t), e;
34
34
  })), (e, t) => l(e.$slots, "default");
35
35
  }