bitboss-ui 3.0.0-beta.50 → 3.0.0-beta.52
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.
- package/README.md +79 -0
- package/bin/bitboss-ui-mcp.mjs +3 -2
- package/bin/bitboss-ui.mjs +25 -5
- package/dist/ai/BbAccordion.md +1 -1
- package/dist/ai/BbAlert.md +1 -1
- package/dist/ai/BbAsterisk.md +4 -2
- package/dist/ai/BbBadge.md +2 -2
- package/dist/ai/BbBadgeButton.md +3 -3
- package/dist/ai/BbBaseButton.md +8 -3
- package/dist/ai/BbBaseCheckboxIcon.md +48 -13
- package/dist/ai/BbBaseRadioIcon.md +49 -14
- package/dist/ai/BbBaseSwitchIcon.md +48 -13
- package/dist/ai/BbButton.md +6 -3
- package/dist/ai/BbCalendar.md +7 -5
- package/dist/ai/BbCheckbox.md +3 -3
- package/dist/ai/BbCheckboxGroup.md +8 -8
- package/dist/ai/BbCollapsible.md +4 -2
- package/dist/ai/BbColorInput.md +12 -9
- package/dist/ai/BbColorPalette.md +1 -1
- package/dist/ai/BbDatePicker.md +4 -4
- package/dist/ai/BbDatePickerInput.md +18 -12
- package/dist/ai/BbDialog.md +8 -6
- package/dist/ai/BbDropdown.md +10 -6
- package/dist/ai/BbDropdownButton.md +5 -5
- package/dist/ai/BbDropzone.md +4 -4
- package/dist/ai/BbForm.md +246 -11
- package/dist/ai/BbHoverCard.md +1 -1
- package/dist/ai/BbNumberInput.md +15 -9
- package/dist/ai/BbOffCanvas.md +3 -3
- package/dist/ai/BbPagination.md +2 -2
- package/dist/ai/BbPopover.md +3 -3
- package/dist/ai/BbProgress.md +1 -1
- package/dist/ai/BbRadio.md +3 -3
- package/dist/ai/BbRadioGroup.md +24 -16
- package/dist/ai/BbRating.md +3 -3
- package/dist/ai/BbSelect.md +16 -15
- package/dist/ai/BbSelectPopover.md +12 -11
- package/dist/ai/BbSlider.md +3 -3
- package/dist/ai/BbSwitch.md +3 -3
- package/dist/ai/BbSwitchGroup.md +8 -8
- package/dist/ai/BbTable.md +312 -74
- package/dist/ai/BbTabs.md +3 -3
- package/dist/ai/BbTabsRoot.md +3 -3
- package/dist/ai/BbTag.md +6 -6
- package/dist/ai/BbTextInput.md +12 -10
- package/dist/ai/BbTextarea.md +6 -6
- package/dist/ai/BbTimePicker.md +8 -4
- package/dist/ai/BbTimePickerInput.md +10 -9
- package/dist/ai/BbTooltip.md +2 -2
- package/dist/ai/CommonField.md +4 -4
- package/dist/ai/CommonFieldInput.md +2 -2
- package/dist/ai/CommonPopover.md +5 -5
- package/dist/ai/CommonTimeSelector.md +1 -1
- package/dist/ai/OptionsContainer.md +1 -1
- package/dist/ai/changelog.json +41 -3
- package/dist/ai/components.json +55 -52
- package/dist/ai/composables/useBbFormField.md +44 -10
- package/dist/ai/guides/agent-contract.md +4 -1
- package/dist/ai/guides/ai-router.md +23 -23
- package/dist/ai/guides/component-picker.md +4 -3
- package/dist/ai/guides/design-language.md +4 -2
- package/dist/ai/guides/installation-and-plugin-setup.md +34 -2
- package/dist/ai/guides/migration/components/bb-table.md +32 -31
- package/dist/ai/guides/migration/from-async-validator.md +1252 -0
- package/dist/ai/guides/migration/v2-to-v3.md +36 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +14 -9
- package/dist/ai/guides/passthrough.md +2 -2
- package/dist/ai/guides/validated-forms.md +78 -5
- package/dist/ai/guides/validation-libraries.md +5 -0
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +2 -1
- package/dist/ai/manifest/components/BbAccordion.json +1 -1
- package/dist/ai/manifest/components/BbAlert.json +1 -5
- package/dist/ai/manifest/components/BbAlert.removed.json +7 -0
- package/dist/ai/manifest/components/BbAvatar.json +0 -3
- package/dist/ai/manifest/components/BbAvatar.removed.json +6 -0
- package/dist/ai/manifest/components/BbBadge.json +2 -5
- package/dist/ai/manifest/components/BbBadge.removed.json +6 -0
- package/dist/ai/manifest/components/BbBadgeButton.json +3 -3
- package/dist/ai/manifest/components/BbBaseButton.json +3 -3
- package/dist/ai/manifest/components/BbBaseCheckboxIcon.json +0 -3
- package/dist/ai/manifest/components/BbBaseCheckboxIcon.removed.json +6 -0
- package/dist/ai/manifest/components/BbBaseRadioIcon.json +0 -3
- package/dist/ai/manifest/components/BbBaseRadioIcon.removed.json +6 -0
- package/dist/ai/manifest/components/BbBaseSwitchIcon.json +0 -3
- package/dist/ai/manifest/components/BbBaseSwitchIcon.removed.json +6 -0
- package/dist/ai/manifest/components/BbBreadcrumbs.json +0 -4
- package/dist/ai/manifest/components/BbBreadcrumbs.removed.json +7 -0
- package/dist/ai/manifest/components/BbButton.json +2 -9
- package/dist/ai/manifest/components/BbButton.removed.json +10 -0
- package/dist/ai/manifest/components/BbCalendar.json +4 -9
- package/dist/ai/manifest/components/BbCalendar.removed.json +8 -0
- package/dist/ai/manifest/components/BbCheckbox.json +3 -10
- package/dist/ai/manifest/components/BbCheckbox.removed.json +10 -0
- package/dist/ai/manifest/components/BbCheckboxGroup.json +8 -19
- package/dist/ai/manifest/components/BbCheckboxGroup.removed.json +14 -0
- package/dist/ai/manifest/components/BbCollapsible.json +1 -1
- package/dist/ai/manifest/components/BbColorInput.json +8 -17
- package/dist/ai/manifest/components/BbColorInput.removed.json +12 -0
- package/dist/ai/manifest/components/BbColorPalette.json +1 -11
- package/dist/ai/manifest/components/BbColorPalette.removed.json +13 -0
- package/dist/ai/manifest/components/BbDatePicker.json +4 -10
- package/dist/ai/manifest/components/BbDatePicker.removed.json +9 -0
- package/dist/ai/manifest/components/BbDatePickerInput.json +9 -24
- package/dist/ai/manifest/components/BbDatePickerInput.removed.json +18 -0
- package/dist/ai/manifest/components/BbDialog.json +5 -12
- package/dist/ai/manifest/components/BbDialog.removed.json +10 -0
- package/dist/ai/manifest/components/BbDropdown.json +6 -15
- package/dist/ai/manifest/components/BbDropdown.removed.json +12 -0
- package/dist/ai/manifest/components/BbDropdownButton.json +5 -15
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +13 -0
- package/dist/ai/manifest/components/BbDropzone.json +4 -9
- package/dist/ai/manifest/components/BbDropzone.removed.json +8 -0
- package/dist/ai/manifest/components/BbForm.json +5 -8
- package/dist/ai/manifest/components/BbForm.removed.json +6 -0
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbIcon.json +0 -4
- package/dist/ai/manifest/components/BbIcon.removed.json +7 -0
- package/dist/ai/manifest/components/BbNumberInput.json +9 -17
- package/dist/ai/manifest/components/BbNumberInput.removed.json +11 -0
- package/dist/ai/manifest/components/BbOffCanvas.json +3 -8
- package/dist/ai/manifest/components/BbOffCanvas.removed.json +8 -0
- package/dist/ai/manifest/components/BbPagination.json +2 -8
- package/dist/ai/manifest/components/BbPagination.removed.json +9 -0
- package/dist/ai/manifest/components/BbPopover.json +3 -16
- package/dist/ai/manifest/components/BbPopover.removed.json +16 -0
- package/dist/ai/manifest/components/BbProgress.json +1 -1
- package/dist/ai/manifest/components/BbRadio.json +3 -8
- package/dist/ai/manifest/components/BbRadio.removed.json +8 -0
- package/dist/ai/manifest/components/BbRadioGroup.json +9 -20
- package/dist/ai/manifest/components/BbRadioGroup.removed.json +14 -0
- package/dist/ai/manifest/components/BbRating.json +3 -10
- package/dist/ai/manifest/components/BbRating.removed.json +10 -0
- package/dist/ai/manifest/components/BbSelect.json +14 -27
- package/dist/ai/manifest/components/BbSelect.removed.json +16 -0
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -20
- package/dist/ai/manifest/components/BbSelectPopover.removed.json +13 -0
- package/dist/ai/manifest/components/BbSlider.json +3 -12
- package/dist/ai/manifest/components/BbSlider.removed.json +12 -0
- package/dist/ai/manifest/components/BbSpinner.json +0 -3
- package/dist/ai/manifest/components/BbSpinner.removed.json +6 -0
- package/dist/ai/manifest/components/BbSwitch.json +3 -10
- package/dist/ai/manifest/components/BbSwitch.removed.json +10 -0
- package/dist/ai/manifest/components/BbSwitchGroup.json +8 -19
- package/dist/ai/manifest/components/BbSwitchGroup.removed.json +14 -0
- package/dist/ai/manifest/components/BbTable.json +23 -32
- package/dist/ai/manifest/components/BbTable.removed.json +16 -0
- package/dist/ai/manifest/components/BbTable.tree.json +19 -1
- package/dist/ai/manifest/components/BbTabs.json +3 -12
- package/dist/ai/manifest/components/BbTabs.removed.json +12 -0
- package/dist/ai/manifest/components/BbTabsList.json +0 -5
- package/dist/ai/manifest/components/BbTabsList.removed.json +8 -0
- package/dist/ai/manifest/components/BbTabsRoot.json +3 -13
- package/dist/ai/manifest/components/BbTabsRoot.removed.json +13 -0
- package/dist/ai/manifest/components/BbTag.json +6 -16
- package/dist/ai/manifest/components/BbTag.removed.json +13 -0
- package/dist/ai/manifest/components/BbTextInput.json +8 -19
- package/dist/ai/manifest/components/BbTextInput.removed.json +14 -0
- package/dist/ai/manifest/components/BbTextarea.json +6 -14
- package/dist/ai/manifest/components/BbTextarea.removed.json +11 -0
- package/dist/ai/manifest/components/BbTimePicker.json +3 -3
- package/dist/ai/manifest/components/BbTimePickerInput.json +8 -16
- package/dist/ai/manifest/components/BbTimePickerInput.removed.json +11 -0
- package/dist/ai/manifest/components/BbToast.json +0 -6
- package/dist/ai/manifest/components/BbToast.removed.json +9 -0
- package/dist/ai/manifest/components/BbTooltip.json +2 -8
- package/dist/ai/manifest/components/BbTooltip.removed.json +9 -0
- package/dist/ai/manifest/components/BbTree.json +0 -5
- package/dist/ai/manifest/components/BbTree.removed.json +8 -0
- package/dist/ai/manifest/components/CommonField.json +4 -4
- package/dist/ai/manifest/components/CommonFieldInput.json +2 -2
- package/dist/ai/manifest/components/CommonPopover.json +5 -5
- package/dist/ai/manifest/components/CommonTimeSelector.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +1 -1
- package/dist/ai/manifest/index.json +6 -5
- package/dist/ai/manifest/meta.json +51 -1
- package/dist/ai/manifest/types.advanced.json +2 -2
- package/dist/ai/recipes/inertia/record-form.md +15 -7
- package/dist/ai/recipes/nuxt/record-form.md +1 -0
- package/dist/ai/recipes/vue/record-form.md +1 -0
- package/dist/ai/source/BbAccordion.md +4 -5
- package/dist/ai/source/BbAlert.md +3 -6
- package/dist/ai/source/BbBadge.md +6 -14
- package/dist/ai/source/BbBadgeButton.md +6 -14
- package/dist/ai/source/BbBaseButton.md +11 -25
- package/dist/ai/source/BbButton.md +8 -17
- package/dist/ai/source/BbCalendar.md +14 -29
- package/dist/ai/source/BbCheckbox.md +7 -10
- package/dist/ai/source/BbCheckboxGroup.md +42 -69
- package/dist/ai/source/BbCollapsible.md +2 -7
- package/dist/ai/source/BbColorInput.md +21 -51
- package/dist/ai/source/BbColorPalette.md +4 -18
- package/dist/ai/source/BbDatePicker.md +15 -43
- package/dist/ai/source/BbDatePickerInput.md +26 -60
- package/dist/ai/source/BbDialog.md +16 -47
- package/dist/ai/source/BbDropdown.md +70 -54
- package/dist/ai/source/BbDropdownButton.md +4 -8
- package/dist/ai/source/BbDropdownGroup.md +22 -46
- package/dist/ai/source/BbDropzone.md +11 -16
- package/dist/ai/source/BbForm.md +19 -46
- package/dist/ai/source/BbHoverCard.md +3 -5
- package/dist/ai/source/BbHoverCardPortal.md +3 -5
- package/dist/ai/source/BbNumberInput.md +43 -46
- package/dist/ai/source/BbOffCanvas.md +11 -21
- package/dist/ai/source/BbPagination.md +7 -15
- package/dist/ai/source/BbPopover.md +27 -28
- package/dist/ai/source/BbPopoverPortal.md +11 -28
- package/dist/ai/source/BbProgress.md +3 -4
- package/dist/ai/source/BbRadio.md +10 -16
- package/dist/ai/source/BbRadioGroup.md +78 -76
- package/dist/ai/source/BbRating.md +7 -10
- package/dist/ai/source/BbSelect.md +45 -112
- package/dist/ai/source/BbSelectPopover.md +35 -101
- package/dist/ai/source/BbSlider.md +7 -10
- package/dist/ai/source/BbSwitchGroup.md +48 -13
- package/dist/ai/source/BbTable.md +722 -293
- package/dist/ai/source/BbTabs.md +12 -30
- package/dist/ai/source/BbTabsList.md +12 -30
- package/dist/ai/source/BbTabsPanels.md +12 -30
- package/dist/ai/source/BbTabsRoot.md +12 -30
- package/dist/ai/source/BbTag.md +15 -28
- package/dist/ai/source/BbTextInput.md +21 -36
- package/dist/ai/source/BbTextarea.md +16 -30
- package/dist/ai/source/BbTimePicker.md +12 -28
- package/dist/ai/source/BbTimePickerInput.md +25 -51
- package/dist/ai/source/BbTooltip.md +6 -14
- package/dist/ai/source/CommonField.md +14 -21
- package/dist/ai/source/CommonFieldInput.md +7 -8
- package/dist/ai/source/CommonPopover.md +18 -28
- package/dist/ai/source/CommonTimeSelector.md +4 -5
- package/dist/ai/source/OptionsContainer.md +4 -7
- package/dist/components/BbAccordion/types.d.ts +4 -5
- package/dist/components/BbAlert/types.d.ts +3 -6
- package/dist/components/BbBadge/types.d.ts +6 -14
- package/dist/components/BbBaseButton/types.d.ts +11 -25
- package/dist/components/BbButton/types.d.ts +8 -17
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +64 -62
- package/dist/components/BbCalendar/types.d.ts +14 -29
- package/dist/components/BbCalendar/useDayGrid.js +131 -130
- package/dist/components/BbCheckbox/types.d.ts +7 -10
- package/dist/components/BbCheckboxGroup/types.d.ts +28 -58
- package/dist/components/BbCollapsible/types.d.ts +2 -7
- package/dist/components/BbColorInput/types.d.ts +21 -51
- package/dist/components/BbColorPalette/types.d.ts +4 -18
- package/dist/components/BbDatePicker/types.d.ts +15 -43
- package/dist/components/BbDatePickerInput/types.d.ts +26 -60
- package/dist/components/BbDialog/types.d.ts +16 -47
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +6 -3
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +267 -261
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +298 -301
- package/dist/components/BbDropdown/types.d.ts +22 -46
- package/dist/components/BbDropdown/useDropdownContext.d.ts +2 -0
- package/dist/components/BbDropdownButton/types.d.ts +4 -8
- package/dist/components/BbDropzone/types.d.ts +11 -16
- package/dist/components/BbForm/BbForm.vue.d.ts +19 -46
- package/dist/components/BbForm/BbFormCustomField.js +40 -34
- package/dist/components/BbForm/bindFormField.d.ts +16 -2
- package/dist/components/BbForm/bindFormField.js +53 -53
- package/dist/components/BbHoverCard/types.d.ts +3 -5
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +137 -134
- package/dist/components/BbNumberInput/platform.d.ts +7 -0
- package/dist/components/BbNumberInput/platform.js +7 -0
- package/dist/components/BbNumberInput/types.d.ts +28 -45
- package/dist/components/BbOffCanvas/types.d.ts +11 -21
- package/dist/components/BbPagination/types.d.ts +7 -15
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +23 -20
- package/dist/components/BbPopover/types.d.ts +11 -28
- package/dist/components/BbProgress/types.d.ts +3 -4
- package/dist/components/BbRadio/types.d.ts +10 -16
- package/dist/components/BbRadioGroup/types.d.ts +30 -63
- package/dist/components/BbRating/types.d.ts +7 -10
- package/dist/components/BbSelect/types.d.ts +45 -112
- package/dist/components/BbSelectPopover/types.d.ts +35 -101
- package/dist/components/BbSlider/types.d.ts +7 -10
- package/dist/components/BbTable/BbTable.vue.d.ts +5 -6
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1070 -953
- package/dist/components/BbTable/BbTableDataRow.d.ts +6 -0
- package/dist/components/BbTable/BbTableDataRow.js +67 -29
- package/dist/components/BbTable/BbTableEdgeRow.d.ts +2 -0
- package/dist/components/BbTable/BbTableEdgeRow.js +2 -2
- package/dist/components/BbTable/types.d.ts +97 -179
- package/dist/components/BbTable/types.js +1 -0
- package/dist/components/BbTable/useRowReorder.d.ts +60 -0
- package/dist/components/BbTable/useRowReorder.js +429 -0
- package/dist/components/BbTable/utils.d.ts +9 -1
- package/dist/components/BbTable/utils.js +33 -29
- package/dist/components/BbTable/warroom/harness.d.ts +253 -0
- package/dist/components/BbTabs/types.d.ts +12 -30
- package/dist/components/BbTag/types.d.ts +15 -28
- package/dist/components/BbTextInput/types.d.ts +21 -36
- package/dist/components/BbTextarea/types.d.ts +16 -30
- package/dist/components/BbTimePicker/types.d.ts +12 -28
- package/dist/components/BbTimePickerInput/types.d.ts +25 -51
- package/dist/components/BbTooltip/types.d.ts +6 -14
- package/dist/components/CommonField/types.d.ts +14 -21
- package/dist/components/CommonFieldInput/types.d.ts +7 -8
- package/dist/components/CommonPopover/types.d.ts +18 -28
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue.d.ts +4 -5
- package/dist/components/OptionsContainer/types.d.ts +4 -7
- package/dist/composables/useBbFormField.d.ts +9 -0
- package/dist/composables/useBbFormField.js +1 -0
- package/dist/composables/useBbTableContext.js +1 -0
- package/dist/composables/useFormBinding.d.ts +5 -8
- package/dist/i18n/locales/cs.json +8 -1
- package/dist/i18n/locales/da.json +8 -1
- package/dist/i18n/locales/de-CH.json +8 -1
- package/dist/i18n/locales/de.json +8 -1
- package/dist/i18n/locales/el.json +8 -1
- package/dist/i18n/locales/en-GB.json +8 -1
- package/dist/i18n/locales/en.json +8 -1
- package/dist/i18n/locales/es-MX.json +8 -1
- package/dist/i18n/locales/es.json +8 -1
- package/dist/i18n/locales/fi.json +8 -1
- package/dist/i18n/locales/fr.json +8 -1
- package/dist/i18n/locales/hu.json +8 -1
- package/dist/i18n/locales/it.json +8 -1
- package/dist/i18n/locales/ja.json +8 -1
- package/dist/i18n/locales/ko.json +8 -1
- package/dist/i18n/locales/nb.json +8 -1
- package/dist/i18n/locales/nl.json +8 -1
- package/dist/i18n/locales/pl.json +8 -1
- package/dist/i18n/locales/pt-BR.json +8 -1
- package/dist/i18n/locales/pt-PT.json +8 -1
- package/dist/i18n/locales/ro.json +8 -1
- package/dist/i18n/locales/ru.json +8 -1
- package/dist/i18n/locales/sv.json +8 -1
- package/dist/i18n/locales/tr.json +8 -1
- package/dist/i18n/locales/uk.json +8 -1
- package/dist/i18n/locales/zh-CN.json +8 -1
- package/dist/i18n/locales/zh-HK.json +8 -1
- package/dist/i18n/locales/zh-TW.json +8 -1
- package/dist/llms-full.txt +2520 -434
- package/dist/llms-medium.txt +69 -31
- package/dist/llms.txt +3 -2
- package/dist/locale-blueprint.json +8 -1
- package/dist/styles.css +2 -2
- package/dist/types/ptComponentMap.d.ts +1 -1
- package/dist/utilities/functions/toggleInput.d.ts +1 -1
- package/dist/utilities/functions/toggleInput.js +2 -2
- package/dist/utils/focusVisibility.d.ts +9 -0
- package/dist/utils/focusVisibility.js +12 -0
- package/dist/utils/versionCheck.js +1 -1
- package/llms.txt +3 -2
- package/package.json +3 -2
- package/scripts/lib/agent-manifest.mjs +44 -11
- package/scripts/lib/collapsible-trigger-aria.mjs +116 -0
- package/scripts/lib/dropdown-default-slot.mjs +118 -0
- package/scripts/lib/eslint-disable.mjs +6 -0
- package/scripts/lib/eslint-plugin.d.ts +7 -1
- package/scripts/lib/eslint-plugin.mjs +309 -0
- package/scripts/lib/project-variant-dts.mjs +79 -15
- package/scripts/lib/recipe-excerpts.mjs +98 -0
- package/scripts/lib/required-in-form.mjs +240 -0
- package/scripts/lib/validate-bb-markup.mjs +16 -0
package/README.md
CHANGED
|
@@ -550,6 +550,85 @@ reports what removing cannot change.
|
|
|
550
550
|
`bitboss-ui check` reports the same as `renamed-item-field` and
|
|
551
551
|
`redundant-item-accessor`.
|
|
552
552
|
|
|
553
|
+
#### A trigger in BbDropdown's default slot: `dropdown-default-slot`
|
|
554
|
+
|
|
555
|
+
`BbDropdown`'s default slot holds `<BbDropdownGroup>` companions, which render
|
|
556
|
+
nothing. A button written there renders with no activator wiring, so clicking
|
|
557
|
+
it opens nothing. `bitboss-ui/dropdown-default-slot` (error) reports a native
|
|
558
|
+
element or a library component other than `BbDropdownGroup` in that slot; the
|
|
559
|
+
trigger belongs in the activator slot:
|
|
560
|
+
|
|
561
|
+
```vue
|
|
562
|
+
<template>
|
|
563
|
+
<BbDropdown :items="items">
|
|
564
|
+
<template #activator="{ props }">
|
|
565
|
+
<BbButton v-bind="props" text="Actions" />
|
|
566
|
+
</template>
|
|
567
|
+
</BbDropdown>
|
|
568
|
+
</template>
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
With no slot to fill, `v-bb-dropdown="items"` on the trigger does the same.
|
|
572
|
+
Your own components there are not reported: one may render a group.
|
|
573
|
+
`bitboss-ui check` reports the same as `dropdown-default-slot`.
|
|
574
|
+
|
|
575
|
+
#### A BbCollapsible trigger without `aria-expanded`: `collapsible-trigger-aria`
|
|
576
|
+
|
|
577
|
+
`BbCollapsible` ships no trigger, so the button that opens it owns the
|
|
578
|
+
disclosure state. `bitboss-ui/collapsible-trigger-aria` (error) reports a
|
|
579
|
+
native element or a library component whose `@click` is exactly
|
|
580
|
+
`open = !open` on the ref a `BbCollapsible` binds, when it carries no
|
|
581
|
+
`aria-expanded`:
|
|
582
|
+
|
|
583
|
+
```vue
|
|
584
|
+
<template>
|
|
585
|
+
<BbButton
|
|
586
|
+
aria-controls="advanced"
|
|
587
|
+
:aria-expanded="open"
|
|
588
|
+
text="Advanced options"
|
|
589
|
+
@click="open = !open"
|
|
590
|
+
/>
|
|
591
|
+
<BbCollapsible id="advanced" v-model="open">…</BbCollapsible>
|
|
592
|
+
</template>
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
Only that certain case is judged: a handler that calls a method, a toggle in
|
|
596
|
+
script, a switch bound to the same ref and your own components are never
|
|
597
|
+
reported. `BbAccordion` wires all of it for you.
|
|
598
|
+
`bitboss-ui check` reports the same as `collapsible-trigger-aria`.
|
|
599
|
+
|
|
600
|
+
#### `required` inside a BbForm: `no-required-in-form`
|
|
601
|
+
|
|
602
|
+
A `BbForm` posts `novalidate` (vee-validate owns validation), so `required` on
|
|
603
|
+
a form control inside one shows the asterisk and enforces nothing: an empty
|
|
604
|
+
field submits. `bitboss-ui/no-required-in-form` (error) reports a static
|
|
605
|
+
`required` or a bound `:required` on a library form control inside a
|
|
606
|
+
`<BbForm>` in the same template. Write the requirement where the form
|
|
607
|
+
validates; the asterisk follows:
|
|
608
|
+
|
|
609
|
+
```vue
|
|
610
|
+
<template>
|
|
611
|
+
<BbForm :model="draft" @submit="save">
|
|
612
|
+
<BbTextInput name="email" label="Email" rules="required|email" />
|
|
613
|
+
<BbTextInput
|
|
614
|
+
name="vat"
|
|
615
|
+
label="VAT number"
|
|
616
|
+
:rules="{ required: isCompany }"
|
|
617
|
+
/>
|
|
618
|
+
</BbForm>
|
|
619
|
+
</template>
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
`--fix` rewrites a bare `required` to `rules="required"` when the control has
|
|
623
|
+
no `rules` and the form no `schema`; anything else is reported for you to move
|
|
624
|
+
(with a `schema`, require the key there). A control your own component renders
|
|
625
|
+
inside the form's slot is not seen. `required` beside a `:rules` function is
|
|
626
|
+
reported too, without a fix: the function checks a value only when there is
|
|
627
|
+
one, so register it (`defineRule('vat', isVat)`) and write
|
|
628
|
+
`rules="required|vat"`, or require the key in the schema. Outside a `BbForm`
|
|
629
|
+
`required` stays: a plain `<form>` validates natively.
|
|
630
|
+
`bitboss-ui check` reports the same as `required-in-form`.
|
|
631
|
+
|
|
553
632
|
#### Rating star colours: `no-star-color`
|
|
554
633
|
|
|
555
634
|
`bitboss-ui/no-star-color` flags any colour utility in `BbRating`'s `pt:item`,
|
package/bin/bitboss-ui-mcp.mjs
CHANGED
|
@@ -1416,13 +1416,14 @@ function getComponent({
|
|
|
1416
1416
|
// `removed` and `renamed` repeat each other with migration metadata; one
|
|
1417
1417
|
// line per old name answers "what happened to X" (include 'history' for
|
|
1418
1418
|
// the records the fixers use).
|
|
1419
|
+
// The agent file leaves both out (they are `<Name>.removed.json`).
|
|
1419
1420
|
if (wanted.has('history')) {
|
|
1421
|
+
if (entry.removed) component.removed = entry.removed;
|
|
1420
1422
|
if (entry.renamed) component.renamed = entry.renamed;
|
|
1421
1423
|
component.cssRenames = cssRenameLines(entry, manifest);
|
|
1422
1424
|
} else {
|
|
1423
1425
|
const history = historyWithCss(entry, manifest);
|
|
1424
1426
|
if (history.length) component.history = history;
|
|
1425
|
-
delete component.removed;
|
|
1426
1427
|
}
|
|
1427
1428
|
|
|
1428
1429
|
const always = guide.filter(
|
|
@@ -2732,7 +2733,7 @@ function listChanges({
|
|
|
2732
2733
|
: compareVersions(a, b)
|
|
2733
2734
|
)
|
|
2734
2735
|
),
|
|
2735
|
-
hint: 'Counts only. What
|
|
2736
|
+
hint: 'Counts only. What a bump breaks: list_changes({ since: "<your version>" }), one line per change; from v2: since: "2". One component: { component: "BbSelect" }. Full rows: detail: "rows".',
|
|
2736
2737
|
};
|
|
2737
2738
|
}
|
|
2738
2739
|
|
package/bin/bitboss-ui.mjs
CHANGED
|
@@ -97,7 +97,10 @@ import {
|
|
|
97
97
|
handImportedStylesFindings,
|
|
98
98
|
} from '../scripts/lib/hand-imported-styles.mjs';
|
|
99
99
|
import { unknownLocaleFindings } from '../scripts/lib/locale-check.mjs';
|
|
100
|
-
import {
|
|
100
|
+
import {
|
|
101
|
+
syncNotice,
|
|
102
|
+
syncProjectVariantDts,
|
|
103
|
+
} from '../scripts/lib/project-variant-dts.mjs';
|
|
101
104
|
import { refuseLinkedTarget } from '../scripts/lib/linked-target.mjs';
|
|
102
105
|
import {
|
|
103
106
|
ensureCheckUnknownComponents,
|
|
@@ -906,10 +909,10 @@ async function checkCommand(
|
|
|
906
909
|
pathToFileURL(join(PACKAGE_ROOT, 'dist', 'project-dts.js')).href
|
|
907
910
|
);
|
|
908
911
|
const synced = syncProjectVariantDts(projectRoot, projectDts);
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
);
|
|
912
|
+
const notice = syncNotice(synced);
|
|
913
|
+
// Q65.2: a skip is said too (stderr under `--json`, like `--fix`'s lines).
|
|
914
|
+
if (notice && !(jsonMode && synced.status === 'written'))
|
|
915
|
+
(jsonMode ? console.error : console.log)(notice);
|
|
913
916
|
} catch {
|
|
914
917
|
// No built `dist/project-dts.js` (the library repo before a build):
|
|
915
918
|
// nothing to write with, and nothing for `check` to fail over.
|
|
@@ -1500,6 +1503,23 @@ Commands:
|
|
|
1500
1503
|
\`reactive-v-model\` (a \`v-model\` on a \`<script
|
|
1501
1504
|
setup>\` \`const x = reactive(…)\`: a production build
|
|
1502
1505
|
rejects the write-back; hold it in a \`ref()\`),
|
|
1506
|
+
\`text-null-value\` (a \`v-model\` on BbTextInput /
|
|
1507
|
+
BbTextarea bound to a ref typed \`string\` while the
|
|
1508
|
+
field writes \`null\` once emptied: widen it to
|
|
1509
|
+
\`ref<string | null>\`, or \`null-value="string"\`),
|
|
1510
|
+
\`dropdown-default-slot\` (a trigger in a BbDropdown's
|
|
1511
|
+
default slot, which holds BbDropdownGroup companions:
|
|
1512
|
+
it opens nothing; use \`#activator="{ props }"\` with
|
|
1513
|
+
\`v-bind="props"\`, or \`v-bb-dropdown\`),
|
|
1514
|
+
\`collapsible-trigger-aria\` (an element whose
|
|
1515
|
+
\`@click="open = !open"\` flips a BbCollapsible's
|
|
1516
|
+
ref, with no \`aria-expanded\`: add
|
|
1517
|
+
\`:aria-expanded="open"\` + \`aria-controls\`),
|
|
1518
|
+
\`required-in-form\` (\`required\` on a form control
|
|
1519
|
+
inside a \`BbForm\`: the asterisk shows but the form
|
|
1520
|
+
posts \`novalidate\`, so nothing enforces it; write
|
|
1521
|
+
\`rules="required"\` or make it required in the
|
|
1522
|
+
schema),
|
|
1503
1523
|
\`form-v-model\` (\`v-model\`, \`:model-value\` or an
|
|
1504
1524
|
\`@update:model-value\` listener on a \`BbForm\`: it
|
|
1505
1525
|
takes its object one way, \`:model="draft"\`),
|
package/dist/ai/BbAccordion.md
CHANGED
|
@@ -644,7 +644,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
644
644
|
| --- | --- | --- | --- | --- |
|
|
645
645
|
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `header`, `panel`, `root`. States: `open`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbAccordionProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
646
646
|
| `eager` | `boolean \| undefined` | `false` | | Renders the content at mount, while closed, instead of on the first open. Closed content is `inert` and `aria-hidden` either way. |
|
|
647
|
-
| `headingLevel` | `1 \| 2 \| 3 \| 4 \| 5 \| 6 \| undefined` | | | Wraps the header button in a heading of this level (`<h1>`–`<h6
|
|
647
|
+
| `headingLevel` | `1 \| 2 \| 3 \| 4 \| 5 \| 6 \| undefined` | | | Wraps the header button in a heading of this level (`<h1>`–`<h6>`, the APG accordion shape) so it joins the page outline: under an `<h2>`, pass `3`. Its margins and font are reset. Omitted, no heading. |
|
|
648
648
|
| `id` | `string \| undefined` | | | The root's `id`; the header button's id (`<id>_header`) derives from it. Generated when omitted. |
|
|
649
649
|
| `modelValue` | `boolean \| undefined` | `false` | | Used by v-model to trigger opening / closing the collapsible. An accordion with no `v-model` starts closed. |
|
|
650
650
|
| `transitionDuration` | `number \| undefined` | `250` | | How long the transition has to last in milliseconds |
|
package/dist/ai/BbAlert.md
CHANGED
|
@@ -494,7 +494,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
494
494
|
|
|
495
495
|
## Slots
|
|
496
496
|
|
|
497
|
-
- `default` — scope: `any` — The alert body
|
|
497
|
+
- `default` — scope: `any` — The alert body, the shortest form: `<BbAlert>Something went wrong</BbAlert>`. The most specific source wins: `#text` > children > the `text` prop.
|
|
498
498
|
- `text` — scope: `BbAlertTextSlotProps` `{ text: string }` — Replaces the default alert body text. Wins over children and `text`.
|
|
499
499
|
- `title` — scope: `BbAlertTitleSlotProps` `{ text: string }` — Replaces the default alert title text.
|
|
500
500
|
|
package/dist/ai/BbAsterisk.md
CHANGED
|
@@ -42,8 +42,10 @@ placed in a label is not a reliable way to convey a requirement. What actually
|
|
|
42
42
|
carries mandatoriness to assistive tech is the **control itself**: the native
|
|
43
43
|
`required` attribute when you set the `required` prop, and
|
|
44
44
|
`aria-required="true"` when a `BbForm` makes the field mandatory (a `required`
|
|
45
|
-
rule or the schema). Inside a form the browser never validates
|
|
46
|
-
|
|
45
|
+
rule or the schema). Inside a form the browser never validates, so there the
|
|
46
|
+
`required` prop is an error (`bitboss-ui/no-required-in-form`): it would mark
|
|
47
|
+
the field with nothing enforcing it; write `rules="required"` or require the
|
|
48
|
+
key in the schema.
|
|
47
49
|
|
|
48
50
|
The practical consequence: the marker is a _visual_ affordance only, and the
|
|
49
51
|
control's own required state is the real thing. Never ship a field that shows
|
package/dist/ai/BbBadge.md
CHANGED
|
@@ -858,9 +858,9 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
858
858
|
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `clear`, `icon`, `root`, `spinner`, `text`. States: `loading`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbBadgeProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
859
859
|
| `append:icon` | `string \| undefined` | | | Icon rendered after the label. On a `clearable` badge it shares the trailing slot with the clear button: the icon shows at rest and the clear button reveals over it on hover/focus. |
|
|
860
860
|
| `clearable` | `boolean \| undefined` | `false` | | Renders a trailing clear button and emits `click:clear` when pressed — turns the badge into a dismissible token (the pattern formerly served by `BbChip`). |
|
|
861
|
-
| `clearableLabel` | `string \| undefined` | | | Accessible
|
|
861
|
+
| `clearableLabel` | `string \| undefined` | | | Accessible name of the clear button. Rarely needed: unset, it is composed from the localized `badge.clearLabel` verb and the badge text ("Remove Italy"), or the verb alone when a `BbBadgeButton` owns the body. |
|
|
862
862
|
| `icon` | `string \| undefined` | | | Renders an icon-only badge. When set, `prepend:icon` / `append:icon` are ignored and the default slot becomes the badge's visually hidden accessible label — always provide it. |
|
|
863
|
-
| `loading` | `boolean \| undefined` | `false` | | Shows a spinner in place of the leftmost icon
|
|
863
|
+
| `loading` | `boolean \| undefined` | `false` | | Shows a spinner in place of the leftmost icon (`icon` or `prepend:icon`; the `append:icon` when it is the only one; else the leading slot), as `BbButton` does, with a hidden loading announcement. |
|
|
864
864
|
| `prepend:icon` | `string \| undefined` | | | Icon rendered before the label. |
|
|
865
865
|
| `size` | `'xs'` \| `'sm'` \| `'md'` \| `'lg'` \| `'xl'` \| `'2xl'` | `"md"` | | Preset size of the badge. |
|
|
866
866
|
| `variant` | `'outline'` \| `'primary'` \| `'destructive'` \| `'secondary'` \| `'none'` | `"primary"` | | Visual variant: `primary`, `secondary`, `destructive`, or `outline`. Register more via the vite plugin `badgeVariants` option and style `.bb-badge--<variant>` (set `--bg` / `--fg`). `'none'` renders no variant class — an escape hatch for a one-off look set through `--bg` / `--fg` on the element. |
|
package/dist/ai/BbBadgeButton.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
| `component` | `string \| undefined` | | | Inertia: the page component this visit resolves to. Rarely set by hand — the server normally decides it. |
|
|
22
22
|
| `data` | `object \| undefined` | | | Request payload forwarded to Inertia when navigating via `href` in an Inertia-enabled app. Ignored when not using Inertia. |
|
|
23
23
|
| `disabled` | `boolean \| undefined` | `false` | | Disables user interaction. - When rendering as a native button, sets the `disabled` attribute. - When rendering as a link (anchor/Inertia), removes `href`, adds `aria-disabled="true"` and `tabindex="-1"`, and prevents navigation: the link stays announced as a link but leaves the tab order. |
|
|
24
|
-
| `download` | `string \| boolean \| undefined` | | | Marks an `href` link as a download
|
|
24
|
+
| `download` | `string \| boolean \| undefined` | | | Marks an `href` link as a download: a plain `<a download>` with a native navigation (never an Inertia or router visit), so `blob:` and `data:` files work too. A string sets the suggested filename. |
|
|
25
25
|
| `exactActiveClass` | `string \| undefined` | `'router-link-exact-active'` | | CSS class applied when the component renders as a link and the target of the link and the url matches exactly. Ported for Inertia compatibility. |
|
|
26
26
|
| `except` | `string[] \| undefined` | | | Inertia: the inverse of `only` — properties to EXCLUDE from a partial reload. Pass one or the other, not both. |
|
|
27
27
|
| `external` | `boolean \| undefined` | `false` | | Forces an `href` link to render as a plain `<a>` (native navigation), bypassing Inertia/router interception — the same intent as Nuxt's `NuxtLink` `external`. Use for links outside the SPA. One of the native-anchor signals alongside `target` and `download`. |
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
| `onBefore` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia right before the request is sent. |
|
|
33
33
|
| `onCancel` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia when a request is cancelled. |
|
|
34
34
|
| `onCancelToken` | `((cancelToken: unknown) => void) \| undefined` | | | Receives the Inertia cancel token source when a request is initiated. Can be used to cancel the request. Typed platform-agnostically (matching BbButton) so the library's types never require `@inertiajs/vue3` to be installed. |
|
|
35
|
-
| `onError` | `((errors: Record<string, string>) => void) \| undefined` | | |
|
|
35
|
+
| `onError` | `((errors: Record<string, string>) => void) \| undefined` | | | Inertia's hook for a VALIDATION error answer (the 422 path): the only failure callback `Link` accepts. `onHttpException` (5xx) and `onNetworkError` are `router.visit()` / `useForm()` options, never Link props. |
|
|
36
36
|
| `onFinish` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia after the request has finished (regardless of success or error). |
|
|
37
37
|
| `only` | `string[] \| undefined` | | | Limits the properties that are preserved in Inertia partial reloads. |
|
|
38
38
|
| `onPrefetched` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia when a prefetch for this link has completed and is cached. |
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
| `queryStringArrayFormat` | `"brackets" \| "indices" \| undefined` | `'brackets'` | | Format to use when serializing array values into the query string for Inertia requests. |
|
|
49
49
|
| `rel` | `string \| undefined` | | | Relationship between the current document and the linked resource. Useful for security when opening new tabs (e.g. `noopener noreferrer`). |
|
|
50
50
|
| `replace` | `boolean \| undefined` | `false` | | Uses history replacement instead of push navigation. - With Vue Router (`to`), calls `router.replace`. - With Inertia (`href`), performs a replace visit. |
|
|
51
|
-
| `tag` | `'button'` \| `'div'` \| `'span'` \| `'label'` | `'button'` | | Element
|
|
51
|
+
| `tag` | `'button'` \| `'div'` \| `'span'` \| `'label'` | `'button'` | | Element for the plain (non-link) button: `'button'` (default), `'div'` / `'span'` (a clickable box inside another button or link) or `'label'` (a file-upload trigger). Ignored with `href` / `to`. Off `button`, native `type` / `disabled` drop (disabled stays a class). |
|
|
52
52
|
| `target` | `string \| undefined` | | | Target browsing context for anchor/Inertia links (e.g. `_self`, `_blank`). Ignored when rendering as a native button. |
|
|
53
53
|
| `to` | `string \| wt \| bt \| undefined` | | | Route location to navigate to. When provided (and not disabled), the component renders as a Vue Router link. |
|
|
54
54
|
| `type` | `"button" \| "submit" \| "reset" \| undefined` | `'button'` | | Native `type` attribute used when rendering as a button (e.g. `button`, `submit`, `reset`). |
|
package/dist/ai/BbBaseButton.md
CHANGED
|
@@ -239,6 +239,11 @@ destination onto these props instead of an `@click` handler:
|
|
|
239
239
|
any target other than `_self` (`_blank`, named windows, …) automatically
|
|
240
240
|
merges `noopener noreferrer` into `rel`.
|
|
241
241
|
- **`to`** — a Vue Router `RouteLocationRaw`, rendered as a router/Nuxt link.
|
|
242
|
+
- **`download`** — marks an `href` link as a download: a plain `<a download>`
|
|
243
|
+
doing a native navigation, never an Inertia / router visit, so file
|
|
244
|
+
downloads work (same-origin, `blob:` and `data:` URLs included). A string
|
|
245
|
+
sets the suggested filename. It is a native-anchor signal like `target` and
|
|
246
|
+
`external`.
|
|
242
247
|
- **`replace`** — history replacement (`router.replace` under Vue Router, a
|
|
243
248
|
replace visit under Inertia).
|
|
244
249
|
- **Inertia visit options** ride along with `href`: request shape (`method`,
|
|
@@ -519,7 +524,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
519
524
|
| `component` | `string \| undefined` | | | Inertia: the page component this visit resolves to. Rarely set by hand — the server normally decides it. |
|
|
520
525
|
| `data` | `object \| undefined` | | | Request payload forwarded to Inertia when navigating via `href` in an Inertia-enabled app. Ignored when not using Inertia. |
|
|
521
526
|
| `disabled` | `boolean \| undefined` | `false` | | Disables user interaction. - When rendering as a native button, sets the `disabled` attribute. - When rendering as a link (anchor/Inertia), removes `href`, adds `aria-disabled="true"` and `tabindex="-1"`, and prevents navigation: the link stays announced as a link but leaves the tab order. |
|
|
522
|
-
| `download` | `string \| boolean \| undefined` | | | Marks an `href` link as a download
|
|
527
|
+
| `download` | `string \| boolean \| undefined` | | | Marks an `href` link as a download: a plain `<a download>` with a native navigation (never an Inertia or router visit), so `blob:` and `data:` files work too. A string sets the suggested filename. |
|
|
523
528
|
| `exactActiveClass` | `string \| undefined` | `'router-link-exact-active'` | | CSS class applied when the component renders as a link and the target of the link and the url matches exactly. Ported for Inertia compatibility. |
|
|
524
529
|
| `except` | `string[] \| undefined` | | | Inertia: the inverse of `only` — properties to EXCLUDE from a partial reload. Pass one or the other, not both. |
|
|
525
530
|
| `external` | `boolean \| undefined` | `false` | | Forces an `href` link to render as a plain `<a>` (native navigation), bypassing Inertia/router interception — the same intent as Nuxt's `NuxtLink` `external`. Use for links outside the SPA. One of the native-anchor signals alongside `target` and `download`. |
|
|
@@ -530,7 +535,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
530
535
|
| `onBefore` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia right before the request is sent. |
|
|
531
536
|
| `onCancel` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia when a request is cancelled. |
|
|
532
537
|
| `onCancelToken` | `((cancelToken: unknown) => void) \| undefined` | | | Receives the Inertia cancel token source when a request is initiated. Can be used to cancel the request. Typed platform-agnostically (matching BbButton) so the library's types never require `@inertiajs/vue3` to be installed. |
|
|
533
|
-
| `onError` | `((errors: Record<string, string>) => void) \| undefined` | | |
|
|
538
|
+
| `onError` | `((errors: Record<string, string>) => void) \| undefined` | | | Inertia's hook for a VALIDATION error answer (the 422 path): the only failure callback `Link` accepts. `onHttpException` (5xx) and `onNetworkError` are `router.visit()` / `useForm()` options, never Link props. |
|
|
534
539
|
| `onFinish` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia after the request has finished (regardless of success or error). |
|
|
535
540
|
| `only` | `string[] \| undefined` | | | Limits the properties that are preserved in Inertia partial reloads. |
|
|
536
541
|
| `onPrefetched` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia when a prefetch for this link has completed and is cached. |
|
|
@@ -546,7 +551,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
546
551
|
| `queryStringArrayFormat` | `"brackets" \| "indices" \| undefined` | `'brackets'` | | Format to use when serializing array values into the query string for Inertia requests. |
|
|
547
552
|
| `rel` | `string \| undefined` | | | Relationship between the current document and the linked resource. Useful for security when opening new tabs (e.g. `noopener noreferrer`). |
|
|
548
553
|
| `replace` | `boolean \| undefined` | `false` | | Uses history replacement instead of push navigation. - With Vue Router (`to`), calls `router.replace`. - With Inertia (`href`), performs a replace visit. |
|
|
549
|
-
| `tag` | `'button'` \| `'div'` \| `'span'` \| `'label'` | `'button'` | | Element
|
|
554
|
+
| `tag` | `'button'` \| `'div'` \| `'span'` \| `'label'` | `'button'` | | Element for the plain (non-link) button: `'button'` (default), `'div'` / `'span'` (a clickable box inside another button or link) or `'label'` (a file-upload trigger). Ignored with `href` / `to`. Off `button`, native `type` / `disabled` drop (disabled stays a class). |
|
|
550
555
|
| `target` | `string \| undefined` | | | Target browsing context for anchor/Inertia links (e.g. `_self`, `_blank`). Ignored when rendering as a native button. |
|
|
551
556
|
| `text` | `string \| undefined` | | | Fallback text content rendered when no default slot is provided. |
|
|
552
557
|
| `to` | `string \| wt \| bt \| undefined` | | | Route location to navigate to. When provided (and not disabled), the component renders as a Vue Router link. |
|
|
@@ -41,11 +41,25 @@ the glyph in for the visuals.
|
|
|
41
41
|
### Compose it into a custom control
|
|
42
42
|
|
|
43
43
|
The glyph is decorative (`aria-hidden`), so it **must** be paired with a real
|
|
44
|
-
control. The reliable pattern: a `<label>` wrapping a
|
|
45
|
-
`<input type="checkbox">`
|
|
46
|
-
`
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
control. The reliable pattern: a `<label>` wrapping a native
|
|
45
|
+
`<input type="checkbox">` stacked under the glyph, the glyph reflecting
|
|
46
|
+
`checked`. You get native keyboard support, focus, and form submission for
|
|
47
|
+
free, and total freedom over the layout around it.
|
|
48
|
+
|
|
49
|
+
**Stack the input under the glyph; never shrink it to `sr-only`.** Put both in
|
|
50
|
+
one grid cell (`grid` on a wrapper, `col-start-1 row-start-1` on each). The
|
|
51
|
+
input is `opacity-0` and fills the cell (`size-full min-w-0 m-0
|
|
52
|
+
appearance-none`); the glyph is `pointer-events-none`. Test runners click the
|
|
53
|
+
input itself and first check that it is the element under the pointer
|
|
54
|
+
(Playwright's `getByLabel(…).check()`): a 1px clipped `sr-only` input is never
|
|
55
|
+
that element, so the click times out. Stacked, the pointer, a label click and
|
|
56
|
+
the test runner all reach the input. Never `display:none` or `visibility:
|
|
57
|
+
hidden` either: the input must stay in the accessibility tree and focusable.
|
|
58
|
+
|
|
59
|
+
**Show keyboard focus on the glyph.** The input is invisible, so pass its
|
|
60
|
+
focus to the glyph's `focus-visible` prop: on the input's `focus`, keep
|
|
61
|
+
whether it `matches(':focus-visible')`; clear it on `blur` (the example does
|
|
62
|
+
this).
|
|
49
63
|
|
|
50
64
|
**Invoice alert channel cards**
|
|
51
65
|
|
|
@@ -71,14 +85,27 @@ around it.
|
|
|
71
85
|
: 'border-(--bb-border) hover:bg-(--bb-surface-hover)'
|
|
72
86
|
"
|
|
73
87
|
>
|
|
74
|
-
<!--
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
<!--
|
|
89
|
+
The input and the glyph share one grid cell. The input is invisible
|
|
90
|
+
but fills the cell, so a click (and a test runner's "is the input the
|
|
91
|
+
hit target" check) lands on it; the glyph lets the pointer through
|
|
92
|
+
and shows the input's state, keyboard focus included.
|
|
93
|
+
-->
|
|
94
|
+
<span class="grid shrink-0">
|
|
95
|
+
<input
|
|
96
|
+
v-model="selected"
|
|
97
|
+
class="col-start-1 row-start-1 m-0 size-full min-w-0 cursor-pointer appearance-none opacity-0"
|
|
98
|
+
type="checkbox"
|
|
99
|
+
:value="channel.id"
|
|
100
|
+
@blur="focusVisible = null"
|
|
101
|
+
@focus="onFocus(channel.id, $event)"
|
|
102
|
+
/>
|
|
103
|
+
<BbBaseCheckboxIcon
|
|
104
|
+
:checked="selected.includes(channel.id)"
|
|
105
|
+
class="pointer-events-none col-start-1 row-start-1"
|
|
106
|
+
:focus-visible="focusVisible === channel.id"
|
|
107
|
+
/>
|
|
108
|
+
</span>
|
|
82
109
|
<span class="flex min-w-0 flex-col">
|
|
83
110
|
<span class="text-sm font-medium">{{ channel.label }}</span>
|
|
84
111
|
<span class="text-xs text-(--bb-text-muted)">{{ channel.hint }}</span>
|
|
@@ -101,6 +128,14 @@ const channels: Channel[] = [
|
|
|
101
128
|
];
|
|
102
129
|
|
|
103
130
|
const selected = ref<string[]>(['email']);
|
|
131
|
+
|
|
132
|
+
// The ring shows for keyboard focus only, as the library's own toggles do.
|
|
133
|
+
const focusVisible = ref<string | null>(null);
|
|
134
|
+
function onFocus(id: string, event: FocusEvent) {
|
|
135
|
+
focusVisible.value = (event.target as HTMLElement).matches(':focus-visible')
|
|
136
|
+
? id
|
|
137
|
+
: null;
|
|
138
|
+
}
|
|
104
139
|
</script>
|
|
105
140
|
```
|
|
106
141
|
|
|
@@ -40,11 +40,25 @@ the glyph in for the visuals.
|
|
|
40
40
|
### Compose it into a custom control
|
|
41
41
|
|
|
42
42
|
The glyph is decorative (`aria-hidden`), so it **must** be paired with a real
|
|
43
|
-
control. The reliable pattern: a `<label>` wrapping a
|
|
44
|
-
`<input type="radio">`
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
control. The reliable pattern: a `<label>` wrapping a native
|
|
44
|
+
`<input type="radio">` stacked under the glyph, all radios in the group
|
|
45
|
+
sharing one `name`, the glyph reflecting `checked`. Native radios give you
|
|
46
|
+
exclusive selection, roving focus and arrow-key navigation for free.
|
|
47
|
+
|
|
48
|
+
**Stack the input under the glyph; never shrink it to `sr-only`.** Put both in
|
|
49
|
+
one grid cell (`grid` on a wrapper, `col-start-1 row-start-1` on each). The
|
|
50
|
+
input is `opacity-0` and fills the cell (`size-full min-w-0 m-0
|
|
51
|
+
appearance-none`); the glyph is `pointer-events-none`. Test runners click the
|
|
52
|
+
input itself and first check that it is the element under the pointer
|
|
53
|
+
(Playwright's `getByLabel(…).check()`): a 1px clipped `sr-only` input is never
|
|
54
|
+
that element, so the click times out. Stacked, the pointer, a label click and
|
|
55
|
+
the test runner all reach the input. Never `display:none` or `visibility:
|
|
56
|
+
hidden` either: the input must stay in the accessibility tree and focusable.
|
|
57
|
+
|
|
58
|
+
**Show keyboard focus on the glyph.** The input is invisible, so pass its
|
|
59
|
+
focus to the glyph's `focus-visible` prop: on the input's `focus`, keep
|
|
60
|
+
whether it `matches(':focus-visible')`; clear it on `blur` (the example does
|
|
61
|
+
this).
|
|
48
62
|
|
|
49
63
|
**Workspace plan cards**
|
|
50
64
|
|
|
@@ -70,15 +84,28 @@ and arrow-key navigation for free.
|
|
|
70
84
|
: 'border-(--bb-border) hover:bg-(--bb-surface-hover)'
|
|
71
85
|
"
|
|
72
86
|
>
|
|
73
|
-
<!--
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
87
|
+
<!--
|
|
88
|
+
Native radios sharing `name` give exclusive selection and arrow
|
|
89
|
+
keys. Each one shares a grid cell with its glyph: invisible, but
|
|
90
|
+
filling the cell, so clicks and test runners hit the input; the
|
|
91
|
+
glyph lets the pointer through and shows the input's state.
|
|
92
|
+
-->
|
|
93
|
+
<span class="grid shrink-0">
|
|
94
|
+
<input
|
|
95
|
+
v-model="selected"
|
|
96
|
+
class="col-start-1 row-start-1 m-0 size-full min-w-0 cursor-pointer appearance-none opacity-0"
|
|
97
|
+
name="plan"
|
|
98
|
+
type="radio"
|
|
99
|
+
:value="plan.id"
|
|
100
|
+
@blur="focusVisible = null"
|
|
101
|
+
@focus="onFocus(plan.id, $event)"
|
|
102
|
+
/>
|
|
103
|
+
<BbBaseRadioIcon
|
|
104
|
+
:checked="selected === plan.id"
|
|
105
|
+
class="pointer-events-none col-start-1 row-start-1"
|
|
106
|
+
:focus-visible="focusVisible === plan.id"
|
|
107
|
+
/>
|
|
108
|
+
</span>
|
|
82
109
|
<span class="flex min-w-0 flex-1 items-start justify-between gap-3">
|
|
83
110
|
<span class="flex min-w-0 flex-col">
|
|
84
111
|
<span class="text-sm font-medium">{{ plan.label }}</span>
|
|
@@ -121,6 +148,14 @@ const plans: Plan[] = [
|
|
|
121
148
|
];
|
|
122
149
|
|
|
123
150
|
const selected = ref('team');
|
|
151
|
+
|
|
152
|
+
// The ring shows for keyboard focus only, as the library's own toggles do.
|
|
153
|
+
const focusVisible = ref<string | null>(null);
|
|
154
|
+
function onFocus(id: string, event: FocusEvent) {
|
|
155
|
+
focusVisible.value = (event.target as HTMLElement).matches(':focus-visible')
|
|
156
|
+
? id
|
|
157
|
+
: null;
|
|
158
|
+
}
|
|
124
159
|
</script>
|
|
125
160
|
```
|
|
126
161
|
|
|
@@ -41,10 +41,25 @@ checkbox with `role="switch"`) and drop the glyph in for the visuals.
|
|
|
41
41
|
### Compose it into a custom control
|
|
42
42
|
|
|
43
43
|
The glyph is decorative (`aria-hidden`), so it **must** be paired with a real
|
|
44
|
-
control. The reliable pattern: a `<label>` wrapping a
|
|
45
|
-
`<input type="checkbox" role="switch">`
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
control. The reliable pattern: a `<label>` wrapping a native
|
|
45
|
+
`<input type="checkbox" role="switch">` stacked under the glyph, the glyph
|
|
46
|
+
reflecting `checked`. You get native keyboard support, focus, and switch
|
|
47
|
+
semantics for free.
|
|
48
|
+
|
|
49
|
+
**Stack the input under the glyph; never shrink it to `sr-only`.** Put both in
|
|
50
|
+
one grid cell (`grid` on a wrapper, `col-start-1 row-start-1` on each). The
|
|
51
|
+
input is `opacity-0` and fills the cell (`size-full min-w-0 m-0
|
|
52
|
+
appearance-none`); the glyph is `pointer-events-none`. Test runners click the
|
|
53
|
+
input itself and first check that it is the element under the pointer
|
|
54
|
+
(Playwright's `getByLabel(…).check()`): a 1px clipped `sr-only` input is never
|
|
55
|
+
that element, so the click times out. Stacked, the pointer, a label click and
|
|
56
|
+
the test runner all reach the input. Never `display:none` or `visibility:
|
|
57
|
+
hidden` either: the input must stay in the accessibility tree and focusable.
|
|
58
|
+
|
|
59
|
+
**Show keyboard focus on the glyph.** The input is invisible, so pass its
|
|
60
|
+
focus to the glyph's `focus-visible` prop: on the input's `focus`, keep
|
|
61
|
+
whether it `matches(':focus-visible')`; clear it on `blur` (the example does
|
|
62
|
+
this).
|
|
48
63
|
|
|
49
64
|
**Feature flag rows**
|
|
50
65
|
|
|
@@ -68,21 +83,33 @@ keyboard support, focus, and switch semantics for free.
|
|
|
68
83
|
<span class="text-sm font-medium">{{ flag.label }}</span>
|
|
69
84
|
<span class="text-xs text-(--bb-text-muted)">{{ flag.hint }}</span>
|
|
70
85
|
</span>
|
|
71
|
-
<!--
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
86
|
+
<!--
|
|
87
|
+
The input (checkbox + role="switch") and the glyph share one grid
|
|
88
|
+
cell: invisible, the input fills it, so clicks and test runners hit
|
|
89
|
+
the input; the glyph lets the pointer through and shows its state.
|
|
90
|
+
-->
|
|
91
|
+
<span class="grid shrink-0">
|
|
92
|
+
<input
|
|
93
|
+
v-model="state[flag.id]"
|
|
94
|
+
class="col-start-1 row-start-1 m-0 size-full min-w-0 cursor-pointer appearance-none opacity-0"
|
|
95
|
+
role="switch"
|
|
96
|
+
type="checkbox"
|
|
97
|
+
@blur="focusVisible = null"
|
|
98
|
+
@focus="onFocus(flag.id, $event)"
|
|
99
|
+
/>
|
|
100
|
+
<BbBaseSwitchIcon
|
|
101
|
+
:checked="state[flag.id]"
|
|
102
|
+
class="pointer-events-none col-start-1 row-start-1"
|
|
103
|
+
:focus-visible="focusVisible === flag.id"
|
|
104
|
+
/>
|
|
105
|
+
</span>
|
|
79
106
|
</label>
|
|
80
107
|
</div>
|
|
81
108
|
</div>
|
|
82
109
|
</template>
|
|
83
110
|
|
|
84
111
|
<script setup lang="ts">
|
|
85
|
-
import { reactive } from 'vue';
|
|
112
|
+
import { reactive, ref } from 'vue';
|
|
86
113
|
import { BbBaseSwitchIcon } from 'bitboss-ui';
|
|
87
114
|
|
|
88
115
|
type Flag = { id: string; label: string; hint: string };
|
|
@@ -111,6 +138,14 @@ const state = reactive<Record<string, boolean>>({
|
|
|
111
138
|
summaries: false,
|
|
112
139
|
analytics: false,
|
|
113
140
|
});
|
|
141
|
+
|
|
142
|
+
// The ring shows for keyboard focus only, as the library's own toggles do.
|
|
143
|
+
const focusVisible = ref<string | null>(null);
|
|
144
|
+
function onFocus(id: string, event: FocusEvent) {
|
|
145
|
+
focusVisible.value = (event.target as HTMLElement).matches(':focus-visible')
|
|
146
|
+
? id
|
|
147
|
+
: null;
|
|
148
|
+
}
|
|
114
149
|
</script>
|
|
115
150
|
```
|
|
116
151
|
|
package/dist/ai/BbButton.md
CHANGED
|
@@ -60,7 +60,10 @@ disguised as text — pair it with `href`/`to`, not with heavy actions.
|
|
|
60
60
|
behaviour and accessibility but takes no look, so your own classes don't have
|
|
61
61
|
to fight a built-in one. You then own hover, focus and disabled. It is fine for
|
|
62
62
|
a one-off; keep the inline styling short, and when the same look shows up
|
|
63
|
-
again, register it as a real variant instead
|
|
63
|
+
again, register it as a real variant instead: the plugin's `buttonVariants`
|
|
64
|
+
option types the name, and you style `.bb-button--<name>` (the library ships
|
|
65
|
+
no CSS for it). The same holds for `BbDropdownButton`, whose `variant` styles
|
|
66
|
+
both halves of the split control.
|
|
64
67
|
|
|
65
68
|
**`link` changes color, not layout.** It keeps the button box: the size scale's
|
|
66
69
|
height and horizontal padding still apply, so it occupies button space and never
|
|
@@ -1138,7 +1141,7 @@ Anti-patterns:
|
|
|
1138
1141
|
| `onBefore` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia right before the request is sent. |
|
|
1139
1142
|
| `onCancel` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia when a request is cancelled. |
|
|
1140
1143
|
| `onCancelToken` | `((cancelToken: unknown) => void) \| undefined` | | | Receives the Inertia cancel token source when a request is initiated. Can be used to cancel the request. Typed platform-agnostically (matching BbButton) so the library's types never require `@inertiajs/vue3` to be installed. |
|
|
1141
|
-
| `onError` | `((errors: Record<string, string>) => void) \| undefined` | | |
|
|
1144
|
+
| `onError` | `((errors: Record<string, string>) => void) \| undefined` | | | Inertia's hook for a VALIDATION error answer (the 422 path): the only failure callback `Link` accepts. `onHttpException` (5xx) and `onNetworkError` are `router.visit()` / `useForm()` options, never Link props. |
|
|
1142
1145
|
| `onFinish` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia after the request has finished (regardless of success or error). |
|
|
1143
1146
|
| `only` | `string[] \| undefined` | | | Limits the properties that are preserved in Inertia partial reloads. |
|
|
1144
1147
|
| `onPrefetched` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia when a prefetch for this link has completed and is cached. |
|
|
@@ -1161,7 +1164,7 @@ Anti-patterns:
|
|
|
1161
1164
|
| `to` | `string \| wt \| bt \| undefined` | | | Route Location the link should navigate to when clicked on. |
|
|
1162
1165
|
| `trueValue` | `any` | `true` | | Value emitted when the toggle is activated. |
|
|
1163
1166
|
| `type` | `"button" \| "submit" \| "reset" \| undefined` | | | Gets the classification and default behavior of the button. |
|
|
1164
|
-
| `variant` | `'outline'` \| `'primary'` \| `'destructive'` \| `'secondary'` \| `'none'` \| `'ghost'` \| `'link'` | `"primary"` | | Visual variant of the button
|
|
1167
|
+
| `variant` | `'outline'` \| `'primary'` \| `'destructive'` \| `'secondary'` \| `'none'` \| `'ghost'` \| `'link'` | `"primary"` | | Visual variant of the button: colours and surface only, never spacing or size. `'none'` takes no look (you own hover, focus and disabled); register a real one with the plugin's `buttonVariants` and style `.bb-button--<name>` (no CSS ships for it). |
|
|
1165
1168
|
| `viewTransition` | `boolean \| undefined` | `false` | | Inertia: run the page swap inside a View Transition, where the browser supports one. |
|
|
1166
1169
|
|
|
1167
1170
|
## Passthrough parts and states
|