bitboss-ui 3.0.0-beta.70 → 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.
- package/README.md +2 -2
- package/bin/cli.mjs +6 -1
- package/dist/ai/BbAccordion.md +38 -19
- package/dist/ai/BbBadge.md +25 -22
- package/dist/ai/BbBreadcrumbs.md +4 -1
- package/dist/ai/BbButton.md +32 -27
- package/dist/ai/BbCalendar.md +1 -0
- package/dist/ai/BbCarousel.md +6 -4
- package/dist/ai/BbCheckbox.md +5 -6
- package/dist/ai/BbCheckboxGroup.md +27 -27
- package/dist/ai/BbColorInput.md +4 -5
- package/dist/ai/BbConfirm.md +65 -81
- package/dist/ai/BbConfirmPortal.md +2 -2
- package/dist/ai/BbDatePicker.md +1 -6
- package/dist/ai/BbDatePickerInput.md +5 -6
- package/dist/ai/BbDialog.md +230 -164
- package/dist/ai/BbDropdown.md +87 -17
- package/dist/ai/BbDropdownButton.md +15 -15
- package/dist/ai/BbDropzone.md +12 -8
- package/dist/ai/BbForm.md +93 -7
- package/dist/ai/BbHost.md +2 -2
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbIcon.md +1 -1
- package/dist/ai/BbIndicator.md +17 -15
- package/dist/ai/BbNumberInput.md +10 -9
- package/dist/ai/BbOffCanvas.md +29 -7
- package/dist/ai/BbPagination.md +2 -2
- package/dist/ai/BbPopover.md +15 -9
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbRadio.md +5 -6
- package/dist/ai/BbRadioGroup.md +53 -37
- package/dist/ai/BbRating.md +11 -16
- package/dist/ai/BbSelect.md +25 -5
- package/dist/ai/BbSelectPopover.md +9 -3
- package/dist/ai/BbSlider.md +15 -17
- package/dist/ai/BbSpinner.md +3 -2
- package/dist/ai/BbSwitch.md +9 -9
- package/dist/ai/BbSwitchGroup.md +11 -13
- package/dist/ai/BbTable.md +205 -82
- package/dist/ai/BbTabs.md +29 -4
- package/dist/ai/BbTag.md +4 -5
- package/dist/ai/BbTextInput.md +18 -16
- package/dist/ai/BbTextarea.md +12 -11
- package/dist/ai/BbTimePickerInput.md +4 -5
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTooltip.md +39 -30
- package/dist/ai/BbTree.md +49 -24
- package/dist/ai/CommonField.md +2 -10
- package/dist/ai/CommonFieldInput.md +1 -1
- package/dist/ai/OptionsContainer.md +5 -13
- package/dist/ai/changelog.json +278 -10
- package/dist/ai/components.json +59 -58
- package/dist/ai/composables/useBbDialog.md +5 -8
- package/dist/ai/composables/useBbForm.md +3 -0
- package/dist/ai/composables/useConfirm.md +65 -56
- package/dist/ai/composables/useToast.md +2 -1
- package/dist/ai/guides/agent-contract.md +3 -3
- package/dist/ai/guides/app-layout.md +3 -2
- package/dist/ai/guides/eslint-rules.md +3 -1
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/floating-bottom-panel.md +3 -2
- package/dist/ai/guides/icons-policy.md +7 -5
- package/dist/ai/guides/inertia-helpers.md +35 -30
- package/dist/ai/guides/installation-and-plugin-setup.md +17 -14
- package/dist/ai/guides/migration/adoption-checklist.md +2 -2
- package/dist/ai/guides/migration/components/bb-badge.md +12 -1
- package/dist/ai/guides/migration/components/bb-button.md +24 -0
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +11 -0
- package/dist/ai/guides/migration/components/bb-tabs.md +2 -2
- package/dist/ai/guides/migration/components/bb-toast.md +11 -0
- package/dist/ai/guides/migration/components/use-confirm.md +69 -26
- package/dist/ai/guides/migration/v2-to-v3.md +78 -12
- package/dist/ai/guides/migration/v3-beta-css-classes.md +1 -1
- package/dist/ai/guides/options-items-playbook.md +4 -3
- package/dist/ai/guides/passthrough.md +2 -2
- package/dist/ai/guides/preset-components.md +35 -10
- package/dist/ai/helpers/definePreset.json +8 -1
- package/dist/ai/helpers/definePreset.ts +35 -10
- package/dist/ai/helpers/inertia/manifest.json +28 -15
- package/dist/ai/helpers/inertia/messages.ts +3 -3
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +10 -10
- package/dist/ai/helpers/inertia/usePromiseForm.ts +1 -1
- package/dist/ai/helpers/inertia/usePromiseRouter.ts +7 -2
- package/dist/ai/index.md +3 -3
- package/dist/ai/manifest/common.json +5 -5
- package/dist/ai/manifest/components/BbAccordion.json +8 -5
- package/dist/ai/manifest/components/BbAccordion.tree.json +1 -0
- package/dist/ai/manifest/components/BbBadge.json +8 -7
- package/dist/ai/manifest/components/BbBadge.removed.json +3 -1
- package/dist/ai/manifest/components/BbBadge.tree.json +73 -0
- package/dist/ai/manifest/components/BbBreadcrumbs.json +2 -2
- package/dist/ai/manifest/components/BbButton.json +5 -6
- package/dist/ai/manifest/components/BbButton.removed.json +3 -1
- package/dist/ai/manifest/components/BbButton.tree.json +24 -7
- package/dist/ai/manifest/components/BbCalendar.json +2 -1
- package/dist/ai/manifest/components/BbCheckbox.json +2 -2
- package/dist/ai/manifest/components/BbCheckbox.tree.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +9 -19
- package/dist/ai/manifest/components/BbColorInput.json +3 -3
- package/dist/ai/manifest/components/BbColorInput.tree.json +2 -2
- package/dist/ai/manifest/components/BbConfirm.json +2 -2
- package/dist/ai/manifest/components/BbConfirm.removed.json +9 -0
- package/dist/ai/manifest/components/BbConfirm.tree.json +4 -5
- package/dist/ai/manifest/components/BbConfirmPortal.json +3 -3
- package/dist/ai/manifest/components/BbConfirmPortal.removed.json +7 -0
- package/dist/ai/manifest/components/BbDatePicker.json +2 -1
- package/dist/ai/manifest/components/BbDatePicker.tree.json +0 -6
- package/dist/ai/manifest/components/BbDatePickerInput.json +2 -2
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +2 -2
- package/dist/ai/manifest/components/BbDialog.json +6 -1
- package/dist/ai/manifest/components/BbDialog.tree.json +41 -1
- package/dist/ai/manifest/components/BbDropdown.json +10 -9
- package/dist/ai/manifest/components/BbDropdown.tree.json +4 -0
- package/dist/ai/manifest/components/BbDropdownButton.json +9 -10
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +3 -1
- package/dist/ai/manifest/components/BbForm.json +3 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.tree.json +2 -2
- package/dist/ai/manifest/components/BbOffCanvas.json +6 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +40 -0
- package/dist/ai/manifest/components/BbPagination.json +1 -1
- package/dist/ai/manifest/components/BbRadio.tree.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +4 -3
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -18
- package/dist/ai/manifest/components/BbRating.json +2 -2
- package/dist/ai/manifest/components/BbRating.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelect.json +2 -1
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +1 -0
- package/dist/ai/manifest/components/BbSlider.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitch.json +4 -4
- package/dist/ai/manifest/components/BbSwitch.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.json +7 -7
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -2
- package/dist/ai/manifest/components/BbTable.json +15 -14
- package/dist/ai/manifest/components/BbTable.tree.json +2 -0
- package/dist/ai/manifest/components/BbTabs.json +3 -3
- package/dist/ai/manifest/components/BbTabsList.json +1 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +1 -1
- package/dist/ai/manifest/components/BbTag.json +1 -1
- package/dist/ai/manifest/components/BbTag.tree.json +2 -2
- package/dist/ai/manifest/components/BbTextInput.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.tree.json +2 -2
- package/dist/ai/manifest/components/BbTextarea.json +1 -1
- package/dist/ai/manifest/components/BbTextarea.tree.json +2 -2
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +2 -2
- package/dist/ai/manifest/components/BbToast.removed.json +2 -1
- package/dist/ai/manifest/components/BbTooltip.json +1 -1
- package/dist/ai/manifest/components/BbTooltip.tree.json +2 -2
- package/dist/ai/manifest/components/BbTree.json +2 -2
- package/dist/ai/manifest/components/CommonField.tree.json +5 -10
- package/dist/ai/manifest/components/CommonFieldInput.tree.json +3 -3
- package/dist/ai/manifest/components/OptionsContainer.tree.json +5 -13
- package/dist/ai/manifest/index.json +4 -4
- package/dist/ai/manifest/meta.json +5 -1
- package/dist/ai/manifest/types.advanced.json +9 -9
- package/dist/ai/manifest/types.api.json +7 -6
- package/dist/ai/recipes/inertia/approvals-inbox.md +23 -16
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -3
- package/dist/ai/recipes/inertia/onboarding.md +23 -12
- package/dist/ai/recipes/inertia/ownership-atlas.md +34 -18
- package/dist/ai/recipes/inertia/record-form.md +12 -8
- package/dist/ai/recipes/inertia/records-workspace.md +14 -7
- package/dist/ai/recipes/inertia/settings-workspace.md +75 -60
- package/dist/ai/recipes/inertia/upload-center.md +17 -9
- package/dist/ai/recipes/inertia/wizard-form.md +2 -2
- package/dist/ai/recipes/nuxt/approvals-inbox.md +23 -16
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -3
- package/dist/ai/recipes/nuxt/onboarding.md +5 -4
- package/dist/ai/recipes/nuxt/ownership-atlas.md +34 -18
- package/dist/ai/recipes/nuxt/record-form.md +14 -10
- package/dist/ai/recipes/nuxt/records-workspace.md +14 -7
- package/dist/ai/recipes/nuxt/settings-workspace.md +70 -60
- package/dist/ai/recipes/nuxt/upload-center.md +17 -9
- package/dist/ai/recipes/nuxt/wizard-form.md +4 -4
- package/dist/ai/recipes/vue/approvals-inbox.md +23 -16
- package/dist/ai/recipes/vue/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -3
- package/dist/ai/recipes/vue/onboarding.md +5 -4
- package/dist/ai/recipes/vue/ownership-atlas.md +34 -18
- package/dist/ai/recipes/vue/record-form.md +14 -10
- package/dist/ai/recipes/vue/records-workspace.md +14 -7
- package/dist/ai/recipes/vue/settings-workspace.md +70 -60
- package/dist/ai/recipes/vue/upload-center.md +17 -9
- package/dist/ai/recipes/vue/wizard-form.md +4 -4
- package/dist/ai/source/BbAccordion.md +50 -16
- package/dist/ai/source/BbBadge.md +420 -26
- package/dist/ai/source/BbBadgeButton.md +378 -12
- package/dist/ai/source/BbBreadcrumbs.md +31 -12
- package/dist/ai/source/BbButton.md +205 -55
- package/dist/ai/source/BbCalendar.md +5 -0
- package/dist/ai/source/BbCheckbox.md +36 -42
- package/dist/ai/source/BbCheckboxGroup.md +40 -17
- package/dist/ai/source/BbColorInput.md +2 -4
- package/dist/ai/source/BbConfigScope.md +19 -2
- package/dist/ai/source/BbConfirm.md +74 -80
- package/dist/ai/source/BbConfirmPortal.md +6 -6
- package/dist/ai/source/BbDatePicker.md +9 -2
- package/dist/ai/source/BbDatePickerInput.md +5 -5
- package/dist/ai/source/BbDialog.md +53 -2
- package/dist/ai/source/BbDropdown.md +360 -99
- package/dist/ai/source/BbDropdownButton.md +24 -13
- package/dist/ai/source/BbDropdownGroup.md +145 -60
- package/dist/ai/source/BbForm.md +144 -10
- package/dist/ai/source/BbNumberInput.md +2 -4
- package/dist/ai/source/BbOffCanvas.md +53 -2
- package/dist/ai/source/BbPagination.md +1 -1
- package/dist/ai/source/BbRadio.md +36 -42
- package/dist/ai/source/BbRadioGroup.md +74 -14
- package/dist/ai/source/BbRating.md +32 -36
- package/dist/ai/source/BbSelect.md +40 -13
- package/dist/ai/source/BbSelectPopover.md +105 -34
- package/dist/ai/source/BbSlider.md +2 -4
- package/dist/ai/source/BbSwitch.md +57 -46
- package/dist/ai/source/BbSwitchGroup.md +67 -21
- package/dist/ai/source/BbTable.md +363 -49
- package/dist/ai/source/BbTabs.md +6 -0
- package/dist/ai/source/BbTabsList.md +10 -0
- package/dist/ai/source/BbTabsPanels.md +6 -0
- package/dist/ai/source/BbTabsRoot.md +6 -0
- package/dist/ai/source/BbTag.md +2 -4
- package/dist/ai/source/BbTextInput.md +2 -4
- package/dist/ai/source/BbTextarea.md +2 -4
- package/dist/ai/source/BbTimePickerInput.md +2 -4
- package/dist/ai/source/BbTooltip.md +9 -3
- package/dist/ai/source/BbTree.md +14 -4
- package/dist/ai/source/CommonField.md +17 -106
- package/dist/ai/source/CommonFieldInput.md +2 -1
- package/dist/ai/source/GuidesComponent.md +3 -0
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +7 -3
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +52 -38
- package/dist/components/BbAccordion/ptKeys.generated.d.ts +20 -0
- package/dist/components/BbAccordion/types.d.ts +21 -7
- package/dist/components/BbAccordion/types.js +1 -1
- package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +65 -42
- package/dist/components/BbBadge/types.d.ts +15 -12
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +106 -106
- package/dist/components/BbBreadcrumbs/types.d.ts +6 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +79 -73
- package/dist/components/BbButton/types.d.ts +7 -6
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +2 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbCalendar/types.d.ts +5 -0
- package/dist/components/BbCalendar/useCalendarGrid.js +1 -1
- package/dist/components/BbCalendar/useDayGrid.js +1 -1
- package/dist/components/BbCheckbox/types.d.ts +2 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +10 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbCheckboxGroup/types.d.ts +4 -6
- package/dist/components/BbColorInput/types.d.ts +2 -4
- package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +71 -132
- package/dist/components/BbConfirm/ptKeys.generated.d.ts +5 -5
- package/dist/components/BbConfirm/types.d.ts +5 -5
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +2 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/components/BbDatePicker/types.d.ts +5 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/components/BbDatePickerInput/types.d.ts +4 -5
- package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +263 -235
- package/dist/components/BbDialog/overlayActions.js +94 -0
- package/dist/components/BbDialog/types.d.ts +24 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +384 -332
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +121 -120
- package/dist/components/BbDropdown/dropdownHandle.js +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +58 -44
- package/dist/components/BbDropdown/types.d.ts +116 -50
- package/dist/components/BbDropdown/types.js +2 -2
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +105 -104
- package/dist/components/BbDropdownButton/types.d.ts +2 -4
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -1
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +240 -198
- package/dist/components/BbForm/recognizeValidation.d.ts +9 -0
- package/dist/components/BbForm/recognizeValidation.js +55 -0
- package/dist/components/BbForm/validationError.d.ts +10 -0
- package/dist/components/BbForm/validationError.js +11 -0
- package/dist/components/BbNumberInput/types.d.ts +2 -4
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +414 -389
- package/dist/components/BbOffCanvas/sheetAttrs.js +5 -5
- package/dist/components/BbOffCanvas/types.d.ts +24 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbRadio/types.d.ts +2 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +10 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +173 -157
- package/dist/components/BbRadioGroup/types.d.ts +11 -7
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +126 -119
- package/dist/components/BbRating/types.d.ts +5 -6
- package/dist/components/BbSelect/BbSelect.vue.d.ts +17 -10
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/components/BbSelect/types.d.ts +12 -6
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +11 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +513 -502
- package/dist/components/BbSelectPopover/types.d.ts +10 -2
- package/dist/components/BbSlider/types.d.ts +2 -4
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -0
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +85 -73
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +10 -4
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +171 -152
- package/dist/components/BbSwitchGroup/types.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +36 -25
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1338 -1215
- package/dist/components/BbTable/BbTableDataRow.js +2 -1
- package/dist/components/BbTable/BbTableRowMenu.js +36 -0
- package/dist/components/BbTable/types.d.ts +33 -18
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbTabs/types.d.ts +6 -0
- package/dist/components/BbTag/types.d.ts +2 -4
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
- package/dist/components/BbTextInput/types.d.ts +2 -4
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTextarea/types.d.ts +2 -4
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +1 -1
- package/dist/components/BbTimePickerInput/types.d.ts +2 -4
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +88 -94
- package/dist/components/BbTooltip/ptKeys.generated.d.ts +4 -4
- package/dist/components/BbTooltip/types.d.ts +3 -1
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/components/BbTree/types.d.ts +8 -2
- package/dist/components/CommonField/types.d.ts +2 -4
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +39 -39
- package/dist/composables/formSubmitLock.js +15 -8
- package/dist/composables/overlayRegistry.d.ts +5 -0
- package/dist/composables/overlayRegistry.js +154 -148
- package/dist/composables/useBbDropdown.d.ts +8 -0
- package/dist/composables/useBbDropdown.js +3 -1
- package/dist/composables/useBbTabs.js +138 -138
- package/dist/composables/useChoiceIndicator.js +67 -64
- package/dist/composables/useConfirm.d.ts +63 -52
- package/dist/composables/useConfirm.js +22 -18
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +7 -7
- package/dist/directives/bbDropdown.js +22 -15
- package/dist/directives/bbTooltip.d.ts +3 -3
- package/dist/directives/createPopoverDirective.js +57 -35
- package/dist/i18n/locales/ar.json +5 -1
- package/dist/i18n/locales/cs.json +5 -1
- package/dist/i18n/locales/da.json +5 -1
- package/dist/i18n/locales/de-CH.json +5 -1
- package/dist/i18n/locales/de.json +5 -1
- package/dist/i18n/locales/el.json +5 -1
- package/dist/i18n/locales/en-GB.json +5 -1
- package/dist/i18n/locales/en.json +5 -1
- package/dist/i18n/locales/es-MX.json +5 -1
- package/dist/i18n/locales/es.json +5 -1
- package/dist/i18n/locales/fa.json +5 -1
- package/dist/i18n/locales/fi.json +5 -1
- package/dist/i18n/locales/fr.json +5 -1
- package/dist/i18n/locales/he.json +5 -1
- package/dist/i18n/locales/hu.json +5 -1
- package/dist/i18n/locales/it.json +5 -1
- package/dist/i18n/locales/ja.json +5 -1
- package/dist/i18n/locales/ko.json +5 -1
- package/dist/i18n/locales/nb.json +5 -1
- package/dist/i18n/locales/nl.json +5 -1
- package/dist/i18n/locales/pl.json +5 -1
- package/dist/i18n/locales/pt-BR.json +5 -1
- package/dist/i18n/locales/pt-PT.json +5 -1
- package/dist/i18n/locales/ro.json +5 -1
- package/dist/i18n/locales/ru.json +5 -1
- package/dist/i18n/locales/sv.json +5 -1
- package/dist/i18n/locales/tr.json +5 -1
- package/dist/i18n/locales/uk.json +5 -1
- package/dist/i18n/locales/zh-CN.json +5 -1
- package/dist/i18n/locales/zh-HK.json +5 -1
- package/dist/i18n/locales/zh-TW.json +5 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -3
- package/dist/llms-full.txt +2216 -1332
- package/dist/llms-medium.txt +21 -18
- package/dist/llms.txt +2 -2
- package/dist/locale-blueprint.json +5 -1
- package/dist/plugin.js +17 -40
- package/dist/pluginCore.js +30 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +26 -5
- package/dist/types/ActionButton.js +11 -0
- package/dist/types/ConfigDefaults.d.ts +34 -3
- package/dist/types/ConfigDefaults.js +14 -8
- package/dist/types/FieldLayout.d.ts +4 -1
- package/dist/types/ItemAccessor.d.ts +3 -1
- package/dist/types/ItemPath.d.ts +62 -0
- package/dist/types/ptComponentMap.d.ts +1 -1
- package/dist/utilities/functions/clickCount.js +14 -0
- package/dist/utils/versionCheck.js +1 -1
- package/llms.txt +2 -2
- package/package.json +16 -4
- package/scripts/README.md +35 -29
- package/scripts/lib/adoption-checklist.json +2 -2
- package/scripts/lib/define-preset-copy.mjs +1 -1
- package/scripts/lib/eslint-disable.mjs +5 -3
- package/scripts/lib/eslint-plugin.d.ts +2 -0
- package/scripts/lib/eslint-plugin.mjs +213 -1
- package/scripts/lib/redundant-item-accessor.mjs +4 -1
- package/scripts/lib/release-results.mjs +32 -1
- package/scripts/lib/renamed-item-field.mjs +4 -1
- package/scripts/lib/setup.mjs +8 -0
- package/scripts/lib/tab-links.mjs +4 -1
- package/scripts/lib/toolchain-check.mjs +125 -7
- package/scripts/lib/tree-default-expandable.mjs +53 -0
- package/scripts/lib/validate-bb-markup.mjs +537 -53
package/dist/ai/BbRating.md
CHANGED
|
@@ -21,12 +21,6 @@
|
|
|
21
21
|
| `pt:counter` | `span.bb-field__counter` | `CommonField` _(internal)_ |
|
|
22
22
|
| `pt:message` | `div.bb-field__message` | `CommonField` _(internal)_ |
|
|
23
23
|
|
|
24
|
-
**CSS variables you can set through those parts** — declared deeper in the tree, so set one on the part that reads it (`pt:<part>="[--name:value]"`), never on `BbRating`'s root:
|
|
25
|
-
|
|
26
|
-
| Variable | Set through | Declared by | What it is |
|
|
27
|
-
| --- | --- | --- | --- |
|
|
28
|
-
| `--ctrl-line` | `pt:label` | `CommonField` | Where the control's first line is centred, from the top of the control column (half the box height by default); the label's first line aligns to it in side-by-side layouts. |
|
|
29
|
-
|
|
30
24
|
## Usage & Guidelines
|
|
31
25
|
|
|
32
26
|
### When to use
|
|
@@ -65,9 +59,9 @@ Besides `update:modelValue` the component re-emits the native interaction events
|
|
|
65
59
|
|
|
66
60
|
### Clearing a rating
|
|
67
61
|
|
|
68
|
-
By default a
|
|
62
|
+
By default a rating cannot be un-picked. Set `clearable` to let the user
|
|
69
63
|
reset to unrated (`null`): clicking the **currently selected** star again clears
|
|
70
|
-
it, and so does
|
|
64
|
+
it, and so does **Space** on it. A double-click picks without clearing. The
|
|
71
65
|
gesture isn't obvious, so pair it with a hint.
|
|
72
66
|
|
|
73
67
|
**Clearable rating**
|
|
@@ -208,9 +202,10 @@ const love = ref<number | null>(4);
|
|
|
208
202
|
|
|
209
203
|
The stars are a standard radio group, so keyboard behaviour is the native one:
|
|
210
204
|
**Arrow** keys move the selection between adjacent stars and **Tab** moves in and
|
|
211
|
-
out of the group. When `clearable` is set, **
|
|
212
|
-
|
|
213
|
-
displayed score can't be nudged while remaining
|
|
205
|
+
out of the group. When `clearable` is set, **Space** on the selected star clears
|
|
206
|
+
it to `null`; **Delete** and **Backspace** do nothing. A `readonly` rating
|
|
207
|
+
swallows the keys so the displayed score can't be nudged while remaining
|
|
208
|
+
focusable.
|
|
214
209
|
|
|
215
210
|
### A rating inside a form
|
|
216
211
|
|
|
@@ -481,7 +476,7 @@ renders SSR-safe markup in Nuxt and Inertia apps.
|
|
|
481
476
|
| --- | --- | --- | --- | --- |
|
|
482
477
|
| `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: `description`, `hint`, `item`, `legend`, `message`, `root`. States: `disabled`, `errors`, `hasValue`, `readonly`, `warnings`, `selected`. 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 `BbRatingProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
483
478
|
| `autofocus` | `Booleanish \| undefined` | | | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
|
|
484
|
-
| `clearable` | `boolean \| undefined` | `false` | | Allows clearing the selected rating
|
|
479
|
+
| `clearable` | `boolean \| undefined` | `false` | | Allows clearing the selected rating: click the selected star, or Space on it. |
|
|
485
480
|
| `compact` | `boolean \| undefined` | `undefined` | | Compact density. Swaps `--bb-label-spacing-y` for `--bb-label-spacing-y-compact`, so tune a compact group's label gap with the `-compact` token, not the base one. |
|
|
486
481
|
| `description` | `string \| undefined` | | | Text between the label and the input. Unlike the hint it is always visible; it joins the input's `aria-describedby` after any `errors` / `warnings`, before the `hint`. |
|
|
487
482
|
| `disabled` | `boolean \| undefined` | `false` | | Disables the component. |
|
|
@@ -492,9 +487,9 @@ renders SSR-safe markup in Nuxt and Inertia apps.
|
|
|
492
487
|
| `hideLegend` | `boolean \| undefined` | `false` | | Visually hides the legend of the fieldset while maintaining accessibility. |
|
|
493
488
|
| `hint` | `string \| undefined` | | | Text box to be displayed near the input, usually to indicate instructions. |
|
|
494
489
|
| `id` | `string \| undefined` | | | Prefix for the ids of each option's input and of the label, description and message. Generated when omitted. |
|
|
495
|
-
| `inputAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the control in a side-by-side row; not `inputPosition`, the horizontal one. Omitted,
|
|
490
|
+
| `inputAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the control in a side-by-side row; not `inputPosition`, the horizontal one. Omitted, `'top'`. |
|
|
496
491
|
| `inputPosition` | `"end" \| "start" \| "center" \| "left" \| "right" \| undefined` | `'start'` | | Alignment of the input in its column. `'start'` / `'end'` follow the page direction (the inline start is the left in a left-to-right page, the right in a right-to-left one); `'left'` / `'right'` stay physical; `'center'` centres it. The default, `'start'`, follows the page direction. |
|
|
497
|
-
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted,
|
|
492
|
+
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, `'top'`. |
|
|
498
493
|
| `layout` | `Responsive<FieldLayout> \| undefined` | | | How label and input sit together: `'vertical'`, `'horizontal'` (50/50), `'auto'`, `'label-fill'`, `'input-fill'`, a ratio like `'xx xxxxx'`, or a per-breakpoint map (`{ default: 'vertical', md: 'xx xxxxx' }`). |
|
|
499
494
|
| `legend` | `string` | | yes | Text content of the legend. |
|
|
500
495
|
| `legendMode` | `"outside" \| "inside" \| undefined` | | | Legend rendering mode. `'outside'` renders the legend above the fieldset in the normal flow; `'inside'` overlays the legend inside the fieldset border. Floating mode is not supported for rating groups. |
|
|
@@ -548,7 +543,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
548
543
|
- `keydown` — `(event: KeyboardEvent): void` — Emitted for keyboard interaction on a star input. Forwards the original DOM `KeyboardEvent`.
|
|
549
544
|
- `mousedown` — `(event: MouseEvent): void` — Emitted when a pointing device button is pressed over a star input. Forwards the original DOM `MouseEvent`.
|
|
550
545
|
- `mouseup` — `(event: MouseEvent): void` — Emitted when a pointing device button is released over a star input. Forwards the original DOM `MouseEvent`.
|
|
551
|
-
- `update:modelValue` — `(value: number \| null): void` — Emitted with the selected rating (1 to `stars`) when clicked. Emits `null` only when `clearable` is enabled and the already-selected star is clicked.
|
|
546
|
+
- `update:modelValue` — `(value: number \| null): void` — Emitted with the selected rating (1 to `stars`) when clicked. Emits `null` only when `clearable` is enabled and the already-selected star is clicked (or gets Space).
|
|
552
547
|
|
|
553
548
|
## Slots
|
|
554
549
|
|
|
@@ -582,7 +577,7 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
582
577
|
- Listed nodes are the ones `BbRating`'s API reaches or that declare a documented CSS variable; the rest fold into "also mounts". The complete tree, undocumented locals included, is `manifest/components/BbRating.tree.json` (a public component in it is a name: its own tree file has the rest).
|
|
583
578
|
|
|
584
579
|
- `BbRating` _(this component)_ — its own template binds: `item` → `label.bb-rating__item`
|
|
585
|
-
- `CommonField` _(internal — not importable, reach it through `BbRating`)_ — `BbRating`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`;
|
|
580
|
+
- `CommonField` _(internal — not importable, reach it through `BbRating`)_ — `BbRating`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`; also mounts `BbAsterisk`
|
|
586
581
|
- Also mounts `BbIcon`
|
|
587
582
|
|
|
588
583
|
## See Also
|
package/dist/ai/BbSelect.md
CHANGED
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
|
|
45
45
|
| Variable | Set through | Declared by | What it is |
|
|
46
46
|
| --- | --- | --- | --- |
|
|
47
|
-
| `--ctrl-line` | `pt:badge`, `pt:label` | `CommonField` | Where the control's first line is centred, from the top of the control column (half the box height by default); the label's first line aligns to it in side-by-side layouts. |
|
|
48
47
|
| `--bg` | `pt:badge` | `BbBadge` | pill fill |
|
|
49
48
|
| `--fg` | `pt:badge` | `BbBadge` | label, icons and the clear glyph |
|
|
50
49
|
| `--bw` | `pt:badge` | `BbBadge` | Pill border. The `border` shorthand is always present, so the width is what turns it on — the filled variants leave it at 0 and the bordered ones (secondary/destructive/outline) step up to `--bb-border-w-sm`. Nothing compensates for it: the stroke sits between the label and the pill edge. |
|
|
@@ -1071,6 +1070,26 @@ the empty query is not a request to browse: `if (!query.trim()) return []` on
|
|
|
1071
1070
|
`'search'` calls, and keep the ids half for the select's own calls (a seeded
|
|
1072
1071
|
model still resolves on its first load).
|
|
1073
1072
|
|
|
1073
|
+
**A minimum query** (`min-query-length`). Don't guard `query.length < 3` in the
|
|
1074
|
+
provider: the select's own empty state would then say "No data" instead of how
|
|
1075
|
+
much to type.
|
|
1076
|
+
|
|
1077
|
+
```vue
|
|
1078
|
+
<BbSelect
|
|
1079
|
+
:items="searchPatients"
|
|
1080
|
+
:prefill="false"
|
|
1081
|
+
:min-query-length="3"
|
|
1082
|
+
label="Patient"
|
|
1083
|
+
/>
|
|
1084
|
+
```
|
|
1085
|
+
|
|
1086
|
+
Below the minimum (trimmed characters) the query counts as empty: no
|
|
1087
|
+
`'search'` call, no filtering of array items, the search-first hint says
|
|
1088
|
+
"Type at least 3 characters", and a prefilled list stays unfiltered. Loads for
|
|
1089
|
+
other reasons still run, so a seeded model resolves. Enter does not emit
|
|
1090
|
+
`option:add`. Slots still receive the typed `query`: it is what was typed,
|
|
1091
|
+
not what was searched.
|
|
1092
|
+
|
|
1074
1093
|
#### `signal`
|
|
1075
1094
|
|
|
1076
1095
|
Cancellation never depended on it — a superseded response is dropped whether or
|
|
@@ -2434,7 +2453,7 @@ it: [passthrough guide § Typing `pt` in `<script>`](./guides/passthrough.md#typ
|
|
|
2434
2453
|
| `hideLabel` | `boolean \| undefined` | `false` | | Visually hides the label of the input while maintaining accessibility. Pair it with a `placeholder`: an empty field otherwise shows nothing saying what it is for. |
|
|
2435
2454
|
| `hint` | `string \| undefined` | | | Text box to be displayed near the input, usually to indicate instructions. |
|
|
2436
2455
|
| `id` | `string \| undefined` | | | The `id` of the native control; the label's `for` and the description and message ids derive from it. Generated when omitted. |
|
|
2437
|
-
| `inputAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the control in a side-by-side row; not `inputPosition`, the horizontal one. Omitted,
|
|
2456
|
+
| `inputAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the control in a side-by-side row; not `inputPosition`, the horizontal one. Omitted, `'top'`. |
|
|
2438
2457
|
| `itemHeight` | `number \| undefined` | `28` | | Height of the options in the listbox (px). Defaults to 28px (24px compact; 44px / 36px on mobile viewports). An explicit value wins on every viewport. |
|
|
2439
2458
|
| `itemProps` | `BbSelectItemProps<T> \| undefined` | | | ADDITIONAL row fields, never the text or value: `description` (a muted line under the label), `prepend:icon`, `append:icon`. An object of paths or getters per field, or a function of the item. Nothing is read implicitly; none shows in the trigger or the chips. |
|
|
2440
2459
|
| `items` | `T[] \| ((context: BbSelectItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider called with a `BbSelectItemsContext` (`query`, `reason`, `modelValue`, `signal`), sync or async. Branch on `reason !== 'search'` to resolve the selection by id. A provider fails by THROWING, never by returning `[]`. |
|
|
@@ -2442,7 +2461,7 @@ it: [passthrough guide § Typing `pt` in `<script>`](./guides/passthrough.md#typ
|
|
|
2442
2461
|
| `itemValue` | `ItemAccessor<T> \| undefined` | `own `value`, else the whole item` | | Defines a path that returns a property of the object to use as value or a function that returns any value. Unset: own `value`, even `null`. |
|
|
2443
2462
|
| `knownItems` | `([Known] extends [undefined] ? BbSelectKnownItems : Known) \| undefined` | | | `{ value, label }` rows naming the value the app already holds, whatever the options' shape: no request until the first open (`prefill: true` still loads). Not options; the options' accessors never run on them; slots get the row as `item`, with `known: true`, until the list brings its own. |
|
|
2444
2463
|
| `label` | `string` | | yes | Text content of the label of the element. |
|
|
2445
|
-
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted,
|
|
2464
|
+
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, `'top'`. |
|
|
2446
2465
|
| `labelMode` | `"outside" \| "floating" \| "inside" \| undefined` | | | Label rendering mode. |
|
|
2447
2466
|
| `labelPosition` | `"end" \| "start" \| "center" \| "left" \| "right" \| undefined` | `'start'` | | Text alignment of the label. `'start'` / `'end'` follow the page direction (the inline start is the left in a left-to-right page, the right in a right-to-left one); `'left'` / `'right'` stay physical; `'center'` centres it. The default, `'start'`, follows the page direction. |
|
|
2448
2467
|
| `layout` | `Responsive<FieldLayout> \| undefined` | | | How label and input sit together: `'vertical'`, `'horizontal'` (50/50), `'auto'`, `'label-fill'`, `'input-fill'`, a ratio like `'xx xxxxx'`, or a per-breakpoint map (`{ default: 'vertical', md: 'xx xxxxx' }`). |
|
|
@@ -2450,6 +2469,7 @@ it: [passthrough guide § Typing `pt` in `<script>`](./guides/passthrough.md#typ
|
|
|
2450
2469
|
| `loadingText` | `string \| undefined` | | | String displayed while items are being loaded. |
|
|
2451
2470
|
| `max` | `number \| undefined` | | | Maximum number of selectable items when the multiple flag is set. |
|
|
2452
2471
|
| `maxSelectedLabels` | `number \| undefined` | `Infinity` | | Maximum number of labels shown before collapsing to a count summary. Unset, the labels collapse only when they overflow the field. |
|
|
2472
|
+
| `minQueryLength` | `number \| undefined` | `0` | | Characters to type (trimmed) before the query searches. Below it the query counts as empty: no `'search'` call, no filtering, and the panel says how many characters to type. Slots still get the typed `query`. |
|
|
2453
2473
|
| `modelValue` | `any` | | | Used by v-model. Can be any serializable type. |
|
|
2454
2474
|
| `modelValueDebounceTime` | `number \| undefined` | `0` | | Timeout used to debounce response to changes to modelValue. |
|
|
2455
2475
|
| `multiple` | `boolean \| undefined` | `false` | | Allows the selection of multiple items. |
|
|
@@ -2575,8 +2595,8 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
2575
2595
|
- Listed nodes are the ones `BbSelect`'s API reaches or that declare a documented CSS variable; the rest fold into "also mounts". The complete tree, undocumented locals included, is `manifest/components/BbSelect.tree.json` (a public component in it is a name: its own tree file has the rest).
|
|
2576
2596
|
|
|
2577
2597
|
- `BbSelect` _(this component)_ — its own template binds: `badge` → `CommonField`, `activator` → `input.bb-select__activator`, `badge` → `input.bb-select__activator`, `comma` → `span.bb-select__comma`, `badge` → `span.bb-select__comma`, `badge` → `BbBadge`, `controlAttrs` → `input`, `badge` → `input`; hands `BbSelectPopover` the pt map `{ panel: 'panel', sheet: 'sheet', header: 'header', footer: 'footer', input: 'input', list: 'list', option: 'option', itemText: 'itemText', itemIcon: 'itemIcon', itemDescription: 'itemDescription', check: 'check' }` (ours → theirs)
|
|
2578
|
-
- `CommonField` _(internal — not importable, reach it through `BbSelect`)_ — `BbSelect`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`;
|
|
2579
|
-
- `CommonFieldInput` _(internal — not importable, reach it through `BbSelect`)_ — `BbSelect`'s pt parts land here: `box` → `span.bb-field-input__box`, `prefix` → `span.bb-field-input__prefix`, `icon` → `BbIcon`, `clear` → `ClearableButton`, `spinner` → `BbSpinner`, `suffix` → `span.bb-field-input__suffix`; documented CSS variables: `--bg`, `--bg-hover`, `--bg-focus`, `--bg-disabled`, `--fg-disabled`, `--border-color`, `--border-focus`, `--ring-size`, `--ring-color`, `--elev`, `--frost`, `--ph`, `--inside-label-clearance`; also mounts `
|
|
2598
|
+
- `CommonField` _(internal — not importable, reach it through `BbSelect`)_ — `BbSelect`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`; also mounts `BbAsterisk`
|
|
2599
|
+
- `CommonFieldInput` _(internal — not importable, reach it through `BbSelect`)_ — `BbSelect`'s pt parts land here: `box` → `span.bb-field-input__box`, `prefix` → `span.bb-field-input__prefix`, `icon` → `BbIcon`, `clear` → `ClearableButton`, `spinner` → `BbSpinner`, `suffix` → `span.bb-field-input__suffix`; documented CSS variables: `--bg`, `--bg-hover`, `--bg-focus`, `--bg-disabled`, `--fg-disabled`, `--border-color`, `--border-focus`, `--ring-size`, `--ring-color`, `--elev`, `--frost`, `--ph`, `--inside-label-clearance`; also mounts `BbIcon`, `BbSpinner`, `ErrorIcon`, `WarningIcon`, `ClearableButton`
|
|
2580
2600
|
- `BbBadge` _(public — [contract](./BbBadge.md))_ — its own pt parts (`BbBadge`): `spinner` → `BbSpinner`, `icon` → `span.bb-badge__append-icon`, `icon` → `BbIcon`, `clear` → `button.bb-badge__clear`; documented CSS variables: `--bg`, `--fg`, `--bw`, `--ring-color`, `--ring-size`, `--min-size-md`, `--min-size`, `--elev`, `--r`, `--fs`, `--icon-size`, `--gap`, `--px`, `--clear-size`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--pad-left`; also mounts `BbIcon`, `BbSpinner`, `BadgeBodyContent`
|
|
2581
2601
|
- `BbSelectPopover` _(public — [contract](./BbSelectPopover.md))_ — its own pt parts (`BbSelectPopover`): `input` → `input.bb-select-popover__input`, `clear` → `ClearableButton`, `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-select-popover__header`, `footer` → `div.bb-select-popover__footer`; hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbBadge`, `BbIcon`, `ClearableButton`, `CommonPopover`, `ErrorIcon`, `WarningIcon`, `BbSmoothHeight`
|
|
2582
2602
|
- `BbOffCanvas` _(public — [contract](./BbOffCanvas.md))_ — its own pt parts (`BbOffCanvas`): `header` → `div.bb-offcanvas__header`, `title` → `span.bb-offcanvas__title`, `description` → `p.bb-offcanvas__description`, `close` → `CloseButton`, `content` → `div.bb-offcanvas__content`, `footer` → `div.bb-offcanvas__footer`; documented CSS variables: `--stack-x`, `--snap-y`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
|
|
@@ -73,7 +73,8 @@ included). An object with none of those fields falls back to
|
|
|
73
73
|
|
|
74
74
|
Pass your domain objects to `items` as they are and name the display/value
|
|
75
75
|
fields with `item-text` / `item-value` (dot-paths or extractor functions). The
|
|
76
|
-
`v-model` holds the resolved **value**, not the whole object.
|
|
76
|
+
`v-model` holds the resolved **value**, not the whole object. A typo in a path
|
|
77
|
+
is a type error; under `strictVModel` the `v-model` is typed from it. The value-identity
|
|
77
78
|
rules are the shared ones (see the Options and Items playbook), in brief:
|
|
78
79
|
|
|
79
80
|
- Primitive `items` (`string[]` / `number[]`) and `{ label, value }` /
|
|
@@ -578,6 +579,10 @@ but only on a host that can transfer the result — see
|
|
|
578
579
|
Opening the panel is not a search, so it loads nothing; until the first query the
|
|
579
580
|
list shows a _"search to begin"_ hint instead of "no data".
|
|
580
581
|
|
|
582
|
+
`:min-query-length="3"` makes a shorter query (trimmed) count as empty: no
|
|
583
|
+
`'search'` call and no filtering, the hint says "Type at least 3 characters",
|
|
584
|
+
and Enter emits no `option:add`. Slots still get the typed `query`.
|
|
585
|
+
|
|
581
586
|
Opening never waits for the first load: the panel shows its loading state and the
|
|
582
587
|
search field (or, with writing disabled, the focus proxy) takes focus at once, so
|
|
583
588
|
keys typed while the first load runs land in the search.
|
|
@@ -939,11 +944,11 @@ const tickets = ref<Ticket[]>([
|
|
|
939
944
|
},
|
|
940
945
|
]);
|
|
941
946
|
|
|
942
|
-
const columns
|
|
947
|
+
const columns = [
|
|
943
948
|
{ key: 'ref', label: 'Ref', width: 90 },
|
|
944
949
|
{ key: 'title', label: 'Title' },
|
|
945
950
|
{ key: 'status', label: 'Status', width: 140 },
|
|
946
|
-
]
|
|
951
|
+
] satisfies Array<BbTableColumn<Ticket>>;
|
|
947
952
|
|
|
948
953
|
/* Draft map: the edit lives here, never on the row. */
|
|
949
954
|
|
|
@@ -1923,6 +1928,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
1923
1928
|
| `loading` | `boolean \| undefined` | `false` | | Display the loading state styles. |
|
|
1924
1929
|
| `loadingText` | `string \| undefined` | | | Message shown while items are being loaded. |
|
|
1925
1930
|
| `max` | `number \| undefined` | `Infinity` | | Maximum number of selectable items (limits selection when `multiple` is true). |
|
|
1931
|
+
| `minQueryLength` | `number \| undefined` | `0` | | Characters to type (trimmed) before the query searches. Below it the query counts as empty: no `'search'` call, no filtering, and the panel says how many characters to type. Slots still get the typed `query`. |
|
|
1926
1932
|
| `modelValue` | `any` | | yes | v-model value. Single value for single select, array for multiple select. |
|
|
1927
1933
|
| `modelValueDebounceTime` | `number \| undefined` | `0` | | Debounce delay (ms) for modelValue change handling. |
|
|
1928
1934
|
| `multiple` | `boolean \| undefined` | `false` | | Enable multiple item selection. When true, modelValue must be an array. |
|
package/dist/ai/BbSlider.md
CHANGED
|
@@ -21,12 +21,6 @@
|
|
|
21
21
|
| `pt:counter` | `span.bb-field__counter` | `CommonField` _(internal)_ |
|
|
22
22
|
| `pt:message` | `div.bb-field__message` | `CommonField` _(internal)_ |
|
|
23
23
|
|
|
24
|
-
**CSS variables you can set through those parts** — declared deeper in the tree, so set one on the part that reads it (`pt:<part>="[--name:value]"`), never on `BbSlider`'s root:
|
|
25
|
-
|
|
26
|
-
| Variable | Set through | Declared by | What it is |
|
|
27
|
-
| --- | --- | --- | --- |
|
|
28
|
-
| `--ctrl-line` | `pt:label` | `CommonField` | Where the control's first line is centred, from the top of the control column (half the box height by default); the label's first line aligns to it in side-by-side layouts. |
|
|
29
|
-
|
|
30
24
|
## Usage & Guidelines
|
|
31
25
|
|
|
32
26
|
### When to use
|
|
@@ -384,20 +378,22 @@ a stepper around a multi-thumb slider.
|
|
|
384
378
|
is disabled or readonly), so a button never sits there inert. -->
|
|
385
379
|
<template #prepend="{ decrease, disabled }">
|
|
386
380
|
<BbButton
|
|
387
|
-
aria-label="Quieter"
|
|
388
381
|
:disabled="disabled"
|
|
389
|
-
icon
|
|
382
|
+
icon-only
|
|
383
|
+
prepend:icon="lucide:minus"
|
|
390
384
|
size="xs"
|
|
385
|
+
text="Quieter"
|
|
391
386
|
variant="ghost"
|
|
392
387
|
@click="decrease"
|
|
393
388
|
/>
|
|
394
389
|
</template>
|
|
395
390
|
<template #append="{ increase, disabled }">
|
|
396
391
|
<BbButton
|
|
397
|
-
aria-label="Louder"
|
|
398
392
|
:disabled="disabled"
|
|
399
|
-
icon
|
|
393
|
+
icon-only
|
|
394
|
+
prepend:icon="lucide:plus"
|
|
400
395
|
size="xs"
|
|
396
|
+
text="Louder"
|
|
401
397
|
variant="ghost"
|
|
402
398
|
@click="increase"
|
|
403
399
|
/>
|
|
@@ -723,20 +719,22 @@ The volume stepper above, restyled through those parts: a thicker rail on
|
|
|
723
719
|
>
|
|
724
720
|
<template #prepend="{ decrease, disabled }">
|
|
725
721
|
<BbButton
|
|
726
|
-
aria-label="Quieter"
|
|
727
722
|
:disabled="disabled"
|
|
728
|
-
icon
|
|
723
|
+
icon-only
|
|
724
|
+
prepend:icon="lucide:minus"
|
|
729
725
|
size="xs"
|
|
726
|
+
text="Quieter"
|
|
730
727
|
variant="ghost"
|
|
731
728
|
@click="decrease"
|
|
732
729
|
/>
|
|
733
730
|
</template>
|
|
734
731
|
<template #append="{ increase, disabled }">
|
|
735
732
|
<BbButton
|
|
736
|
-
aria-label="Louder"
|
|
737
733
|
:disabled="disabled"
|
|
738
|
-
icon
|
|
734
|
+
icon-only
|
|
735
|
+
prepend:icon="lucide:plus"
|
|
739
736
|
size="xs"
|
|
737
|
+
text="Louder"
|
|
740
738
|
variant="ghost"
|
|
741
739
|
@click="increase"
|
|
742
740
|
/>
|
|
@@ -827,10 +825,10 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
827
825
|
| `hideLabel` | `boolean \| undefined` | `false` | | Visually hides the label of the input while maintaining accessibility. |
|
|
828
826
|
| `hint` | `string \| undefined` | | | Text box to be displayed near the input, usually to indicate instructions. |
|
|
829
827
|
| `id` | `string \| undefined` | | | The `id` of the native control; the label's `for` and the description and message ids derive from it. Generated when omitted. |
|
|
830
|
-
| `inputAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the control in a side-by-side row; not `inputPosition`, the horizontal one. Omitted,
|
|
828
|
+
| `inputAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the control in a side-by-side row; not `inputPosition`, the horizontal one. Omitted, `'top'`. |
|
|
831
829
|
| `items` | `readonly (string \| number \| { readonly value: string \| number; readonly label?: string \| undefined; })[] \| undefined` | | | Named stops instead of a numeric scale, spaced evenly in list order: strings, numbers or `{ value, label }`. `v-model` holds the `value`; `label` is announced and passed to the slots. Replaces `min` / `max` / `step` (setting them too throws). |
|
|
832
830
|
| `label` | `string` | | yes | Text content of the label of the element. |
|
|
833
|
-
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted,
|
|
831
|
+
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, `'top'`. |
|
|
834
832
|
| `labelMode` | `"outside" \| "inside" \| undefined` | | | Label rendering mode. Sliders do not support `floating` labels. |
|
|
835
833
|
| `labelPosition` | `"end" \| "start" \| "center" \| "left" \| "right" \| undefined` | `'start'` | | Text alignment of the label. `'start'` / `'end'` follow the page direction (the inline start is the left in a left-to-right page, the right in a right-to-left one); `'left'` / `'right'` stay physical; `'center'` centres it. The default, `'start'`, follows the page direction. |
|
|
836
834
|
| `layout` | `Responsive<FieldLayout> \| undefined` | | | How label and input sit together: `'vertical'`, `'horizontal'` (50/50), `'auto'`, `'label-fill'`, `'input-fill'`, a ratio like `'xx xxxxx'`, or a per-breakpoint map (`{ default: 'vertical', md: 'xx xxxxx' }`). |
|
|
@@ -942,7 +940,7 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
942
940
|
- Listed nodes are the ones `BbSlider`'s API reaches or that declare a documented CSS variable; the rest fold into "also mounts". The complete tree, undocumented locals included, is `manifest/components/BbSlider.tree.json` (a public component in it is a name: its own tree file has the rest).
|
|
943
941
|
|
|
944
942
|
- `BbSlider` _(this component)_ — its own template binds: `box` → `span.bb-slider__box`, `ticks` → `span.bb-slider__ticks`, `tick` → `span.bb-slider__tick`, `track` → `span.bb-slider__track`, `bar` → `span`, `thumb` → `span.bb-slider__thumb`
|
|
945
|
-
- `CommonField` _(internal — not importable, reach it through `BbSlider`)_ — `BbSlider`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`;
|
|
943
|
+
- `CommonField` _(internal — not importable, reach it through `BbSlider`)_ — `BbSlider`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`; also mounts `BbAsterisk`
|
|
946
944
|
|
|
947
945
|
## See Also
|
|
948
946
|
|
package/dist/ai/BbSpinner.md
CHANGED
|
@@ -434,9 +434,10 @@ on the container makes the state audible to assistive tech, per the
|
|
|
434
434
|
<!-- Demo control: plays the save response. In an app the
|
|
435
435
|
request's completion clears `pendingId`; nothing ticks. -->
|
|
436
436
|
<BbButton
|
|
437
|
-
|
|
438
|
-
icon="lucide:check"
|
|
437
|
+
icon-only
|
|
438
|
+
prepend:icon="lucide:check"
|
|
439
439
|
size="sm"
|
|
440
|
+
text="Mark as saved"
|
|
440
441
|
variant="ghost"
|
|
441
442
|
@click="onSaved"
|
|
442
443
|
/>
|
package/dist/ai/BbSwitch.md
CHANGED
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
| `--thumb` | `pt:icon` | `BbBaseSwitchIcon` | Capped by the track's inner height, so a thick-hairline theme shrinks the thumb instead of overflowing it. Unclamped, a 6px plate hairline leaves a 12px inner track carrying a 16px thumb; `--inset` then goes negative and the thumb paints over its own border. `16px` at every hairline the library ships, so no shipped pixel moves. Do NOT floor `--inset` at 0 instead: that keeps the oversized thumb and pushes it out of the bottom of the track (measured +1px protrusion at a 6px hairline), and it uncancels `--bw` from `--travel`, which is a constant 14px by construction. |
|
|
41
41
|
| `--inset` | `pt:icon` | `BbBaseSwitchIcon` | Equal gap around the thumb — centres it vertically by construction, and is reused as the resting left/right inset. |
|
|
42
42
|
| `--travel` | `pt:icon` | `BbBaseSwitchIcon` | How far the thumb slides between off and on (inset ↔ inset). |
|
|
43
|
-
| `--ctrl-line` | `pt:label` | `CommonField` | Where the control's first line is centred, from the top of the control column (half the box height by default); the label's first line aligns to it in side-by-side layouts. |
|
|
44
43
|
|
|
45
44
|
## Usage & Guidelines
|
|
46
45
|
|
|
@@ -416,8 +415,9 @@ const usageAnalytics = ref(true);
|
|
|
416
415
|
the two parts within their tracks. `start` (the default) and `end` follow
|
|
417
416
|
the page direction; `left` and `right` stay physical.
|
|
418
417
|
- `label-align` / `input-align` (`top | center | bottom`) are the vertical
|
|
419
|
-
axis: where each column sits in a side-by-side row. Omitted
|
|
420
|
-
the
|
|
418
|
+
axis: where each column sits in a side-by-side row. Omitted, the label
|
|
419
|
+
column sits at the top of the row and the switch centres on the label's
|
|
420
|
+
first line; `input-align="center"` is the
|
|
421
421
|
described settings row, the switch on the middle of the label and its
|
|
422
422
|
description. `label-position` / `input-position` stay the horizontal axis.
|
|
423
423
|
- `compact` tightens the field's label spacing (`--bb-label-spacing-y-compact` instead of `--bb-label-spacing-y`), the same as on the groups — for dense forms and settings panels.
|
|
@@ -753,7 +753,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
753
753
|
| `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: `description`, `hint`, `icon`, `label`, `message`, `root`. States: `checked`, `disabled`, `errors`, `focused`, `focusVisible`, `indeterminate`, `readonly`, `warnings`. 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 `BbSwitchProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
754
754
|
| `autofocus` | `Booleanish \| undefined` | | | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
|
|
755
755
|
| `checked` | `boolean \| undefined` | `undefined` | | Defines the input as checked. |
|
|
756
|
-
| `compact` | `boolean \| undefined` | `
|
|
756
|
+
| `compact` | `boolean \| undefined` | `undefined` | | Compact density. Swaps `--bb-label-spacing-y` for `--bb-label-spacing-y-compact`, so tune a compact field's label gap with the `-compact` token, not the base one. The same meaning as on the checkbox, radio and switch groups. |
|
|
757
757
|
| `description` | `string \| undefined` | | | Text between the label and the input. Unlike the hint it is always visible; it joins the input's `aria-describedby` after any `errors` / `warnings`, before the `hint`. |
|
|
758
758
|
| `disabled` | `boolean \| undefined` | `false` | | Disables the component. |
|
|
759
759
|
| `errors` | `string \| string[] \| undefined` | | | Error messages under the field, a string or array, in an `aria-live="polite"` region and first in the control's `aria-describedby`, so they are re-read when it regains focus. |
|
|
@@ -765,12 +765,12 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
765
765
|
| `hint` | `string \| undefined` | | | Text box to be displayed near the input, usually to indicate instructions. |
|
|
766
766
|
| `id` | `string \| undefined` | | | The `id` of the native control; the label's `for` and the description and message ids derive from it. Generated when omitted. |
|
|
767
767
|
| `indeterminate` | `boolean \| undefined` | `false` | | Sets the input in an indeterminate state. |
|
|
768
|
-
| `inputAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the control in a side-by-side row; not `inputPosition`, the horizontal one. Omitted,
|
|
769
|
-
| `inputPosition` | `"end" \| "start" \| "center" \| "left" \| "right" \| undefined` | `
|
|
768
|
+
| `inputAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the control in a side-by-side row; not `inputPosition`, the horizontal one. Omitted, `'top'`. |
|
|
769
|
+
| `inputPosition` | `"end" \| "start" \| "center" \| "left" \| "right" \| undefined` | `'start'` | | Alignment of the input in its column. `'start'` / `'end'` follow the page direction (the inline start is the left in a left-to-right page, the right in a right-to-left one); `'left'` / `'right'` stay physical; `'center'` centres it. The default, `'start'`, follows the page direction. |
|
|
770
770
|
| `label` | `string` | | yes | Text content of the label of the element. |
|
|
771
|
-
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted,
|
|
771
|
+
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, `'top'`. |
|
|
772
772
|
| `labelPosition` | `"end" \| "start" \| "center" \| "left" \| "right" \| undefined` | `'start'` | | Text alignment of the label. `'start'` / `'end'` follow the page direction (the inline start is the left in a left-to-right page, the right in a right-to-left one); `'left'` / `'right'` stay physical; `'center'` centres it. The default, `'start'`, follows the page direction. |
|
|
773
|
-
| `layout` | `Responsive<FieldLayout> \| undefined` | `
|
|
773
|
+
| `layout` | `Responsive<FieldLayout> \| undefined` | `'auto'` | | How label and input sit together: `'vertical'`, `'horizontal'` (50/50), `'auto'`, `'label-fill'`, `'input-fill'`, a ratio like `'xx xxxxx'`, or a per-breakpoint map (`{ default: 'vertical', md: 'xx xxxxx' }`). |
|
|
774
774
|
| `modelValue` | `any` | | | Used by v-model. Can be any serializable type. |
|
|
775
775
|
| `name` | `string \| undefined` | | | Defines the name of the input. |
|
|
776
776
|
| `persistentHint` | `boolean \| undefined` | `false` | | Keeps the hint displayed. |
|
|
@@ -838,7 +838,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
838
838
|
- Listed nodes are the ones `BbSwitch`'s API reaches or that declare a documented CSS variable; the rest fold into "also mounts". The complete tree, undocumented locals included, is `manifest/components/BbSwitch.tree.json` (a public component in it is a name: its own tree file has the rest).
|
|
839
839
|
|
|
840
840
|
- `BbSwitch` _(this component)_ — its own template binds: `icon` → `BbBaseSwitchIcon`
|
|
841
|
-
- `CommonField` _(internal — not importable, reach it through `BbSwitch`)_ — `BbSwitch`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`;
|
|
841
|
+
- `CommonField` _(internal — not importable, reach it through `BbSwitch`)_ — `BbSwitch`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`; also mounts `BbAsterisk`
|
|
842
842
|
- Also mounts `BbBaseSwitchIcon`
|
|
843
843
|
|
|
844
844
|
## See Also
|
package/dist/ai/BbSwitchGroup.md
CHANGED
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
| `--thumb` | `pt:icon` | `BbBaseSwitchIcon` | Capped by the track's inner height, so a thick-hairline theme shrinks the thumb instead of overflowing it. Unclamped, a 6px plate hairline leaves a 12px inner track carrying a 16px thumb; `--inset` then goes negative and the thumb paints over its own border. `16px` at every hairline the library ships, so no shipped pixel moves. Do NOT floor `--inset` at 0 instead: that keeps the oversized thumb and pushes it out of the bottom of the track (measured +1px protrusion at a 6px hairline), and it uncancels `--bw` from `--travel`, which is a constant 14px by construction. |
|
|
45
45
|
| `--inset` | `pt:icon` | `BbBaseSwitchIcon` | Equal gap around the thumb — centres it vertically by construction, and is reused as the resting left/right inset. |
|
|
46
46
|
| `--travel` | `pt:icon` | `BbBaseSwitchIcon` | How far the thumb slides between off and on (inset ↔ inset). |
|
|
47
|
-
| `--ctrl-line` | `pt:label` | `CommonField` | Where the control's first line is centred, from the top of the control column (half the box height by default); the label's first line aligns to it in side-by-side layouts. |
|
|
48
47
|
| `--list-bg` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | The strip behind the triggers |
|
|
49
48
|
| `--list-border` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | The strip's edge line, --bb-border-w thick, painted inside the strip: under the triggers (beside them when vertical). `pill` draws none; `line` sets it to --bb-border |
|
|
50
49
|
| `--p` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | strip inner padding — the gutter the indicator sits in, and the scroll inset |
|
|
@@ -66,8 +65,6 @@
|
|
|
66
65
|
| `--indicator-inset` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | Inset of the indicator from the trigger box — shrinks the pill; a bar keeps its thickness, shortens by it at both ends and floats it above the edge |
|
|
67
66
|
| `--elev` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | The theme's resting lift, composed UNDER the indicator's own shadow |
|
|
68
67
|
| `--indicator-shadow` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | Indicator lift, painted on top of --elev |
|
|
69
|
-
| `--divider` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | Each button's frame |
|
|
70
|
-
| `--hover-bg` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | An unpicked button under the pointer |
|
|
71
68
|
|
|
72
69
|
## Usage & Guidelines
|
|
73
70
|
|
|
@@ -151,7 +148,8 @@ The mapping grammar:
|
|
|
151
148
|
|
|
152
149
|
- **Primitive `items`** (`string[]` / `number[]`): omit both props; the value is
|
|
153
150
|
the primitive.
|
|
154
|
-
- **Dot path**: `item-value="id"`, `item-text="profile.fullName"`.
|
|
151
|
+
- **Dot path**: `item-value="id"`, `item-text="profile.fullName"`. A typo is
|
|
152
|
+
a type error; under `strictVModel` the `v-model` is typed from the path.
|
|
155
153
|
- **Extractor function** for anything a path can't express.
|
|
156
154
|
|
|
157
155
|
Values are matched by **deep equality** (structural, not by reference), and two
|
|
@@ -776,8 +774,8 @@ for a preset that fits any row type (never `<any>`), not an imported
|
|
|
776
774
|
| --- | --- | --- | --- | --- |
|
|
777
775
|
| `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: `description`, `hint`, `icon`, `item`, `itemDescription`, `label`, `legend`, `list`, `message`, `root`. States: `disabled`, `errors`, `hasValue`, `loading`, `readonly`, `warnings`, `checked`, `focused`, `focusVisible`. 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 `BbSwitchGroupProps<Row>['pt']` (`BbSwitchGroupProps<object>['pt']` for a preset that fits any row type, never `<any>`) (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
778
776
|
| `autofocus` | `Booleanish \| undefined` | | | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
|
|
779
|
-
| `block` | `boolean \| undefined` | `
|
|
780
|
-
| `compact` | `boolean \| undefined` | `
|
|
777
|
+
| `block` | `boolean \| undefined` | `undefined` | | The rows take the list's full width: on a line (`horizontal`, a `variant` strip) they share it equally, stacked (`vertical`) each row is full width. Every look: plain rows, `pill`, `line`, `outline`. |
|
|
778
|
+
| `compact` | `boolean \| undefined` | `undefined` | | Compact density. Swaps `--bb-label-spacing-y` for `--bb-label-spacing-y-compact`, so tune a compact group's label gap with the `-compact` token, not the base one. |
|
|
781
779
|
| `dependencies` | `unknown[] \| undefined` | | | Defines an array of dependencies that will trigger actions in the component upon change. |
|
|
782
780
|
| `depsDebounceTime` | `number \| undefined` | | | Timeout used to debounce response to changes to dependencies. |
|
|
783
781
|
| `description` | `string \| undefined` | | | Text between the label and the input. Unlike the hint it is always visible; it joins the input's `aria-describedby` after any `errors` / `warnings`, before the `hint`. |
|
|
@@ -793,17 +791,17 @@ for a preset that fits any row type (never `<any>`), not an imported
|
|
|
793
791
|
| `hideLegend` | `boolean \| undefined` | `false` | | Visually hides the legend of the fieldset while maintaining accessibility. |
|
|
794
792
|
| `hint` | `string \| undefined` | | | Text box to be displayed near the input, usually to indicate instructions. |
|
|
795
793
|
| `id` | `string \| undefined` | | | Prefix for the ids of each option's input and of the label, description and message. Generated when omitted. |
|
|
796
|
-
| `inputAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the control in a side-by-side row; not `inputPosition`, the horizontal one. Omitted,
|
|
797
|
-
| `inputPosition` | `"end" \| "start" \| "center" \| "left" \| "right" \| undefined` | `
|
|
794
|
+
| `inputAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the control in a side-by-side row; not `inputPosition`, the horizontal one. Omitted, `'top'`. |
|
|
795
|
+
| `inputPosition` | `"end" \| "start" \| "center" \| "left" \| "right" \| undefined` | `'start'` | | Alignment of the input in its column. `'start'` / `'end'` follow the page direction (the inline start is the left in a left-to-right page, the right in a right-to-left one); `'left'` / `'right'` stay physical; `'center'` centres it. The default, `'start'`, follows the page direction. |
|
|
798
796
|
| `itemInputAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of each option's control in its row; `'center'` is the middle of the label plus its description. Omitted, it sits on the label's first line. |
|
|
799
797
|
| `itemLabelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of each option's label in its row. Omitted, it stays as it is. |
|
|
800
798
|
| `itemLayout` | `FieldLayout \| undefined` | `'auto'` | | How each row's input and label sit together, in the `layout` keywords: `'auto'`, `'vertical'`, `'horizontal'`, `'label-fill'`, `'input-fill'`, or a two-word ratio pattern like `'xx xxxxx'`. |
|
|
801
799
|
| `itemProps` | `BbOptionGroupItemProps<T> \| undefined` | | | ADDITIONAL row fields, never the text or value: `description`, a muted line under the label (it may wrap; announced as the option's description). An object of paths or getters, or a function of the item; nothing is read implicitly. |
|
|
802
|
-
| `itemReverse` | `boolean \| undefined` | `
|
|
800
|
+
| `itemReverse` | `boolean \| undefined` | `undefined` | | Swaps each row's input and label from their natural order (input first), in every `item-layout`. `reverse` swaps the legend and the options instead. |
|
|
803
801
|
| `items` | `T[] \| ((context: BbCheckboxGroupItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider called with a `BbCheckboxGroupItemsContext` (`BbSwitchGroupItemsContext` on a switch group) (`reason`, `modelValue`, `signal`), sync or async. A provider fails by THROWING, never by returning `[]`: the rows clear and `#empty` gets the `error`. |
|
|
804
802
|
| `itemText` | `ItemAccessor<T, string> \| undefined` | `own `label`, else `text`, else `JSON.stringify(item)`` | | Defines a path that returns a property of the object to use as text or a function that returns a string. Unset: own `label`, else `text` (`{ label, value }` needs no accessor). |
|
|
805
803
|
| `itemValue` | `ItemAccessor<T> \| undefined` | `own `value`, else the whole item` | | Defines a path that returns a property of the object to use as value or a function that returns any value. Unset: own `value`, even `null`. |
|
|
806
|
-
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted,
|
|
804
|
+
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, `'top'`. |
|
|
807
805
|
| `layout` | `Responsive<FieldLayout> \| undefined` | | | How label and input sit together: `'vertical'`, `'horizontal'` (50/50), `'auto'`, `'label-fill'`, `'input-fill'`, a ratio like `'xx xxxxx'`, or a per-breakpoint map (`{ default: 'vertical', md: 'xx xxxxx' }`). |
|
|
808
806
|
| `legend` | `string` | | yes | Text content of the legend. |
|
|
809
807
|
| `legendMode` | `"outside" \| "inside" \| undefined` | | | Legend rendering mode. `'outside'` renders the legend above the fieldset in the normal flow; `'inside'` overlays the legend inside the fieldset border. Floating mode is not supported for option groups (checkbox, radio or switch) — there is no single field for the legend to float against. |
|
|
@@ -817,7 +815,7 @@ for a preset that fits any row type (never `<any>`), not an imported
|
|
|
817
815
|
| `name` | `string \| undefined` | | | Defines the name of the input. |
|
|
818
816
|
| `persistentHint` | `boolean \| undefined` | `false` | | Keeps the hint displayed. |
|
|
819
817
|
| `readonly` | `boolean \| undefined` | `false` | | Sets the input in a readonly state. |
|
|
820
|
-
| `reverse` | `boolean \| undefined` | `
|
|
818
|
+
| `reverse` | `boolean \| undefined` | `undefined` | | Reverses the layout. Applicable in every direction the order of the label and the input is swapped. |
|
|
821
819
|
| `rules` | `RuleExpression<any>` | | | vee-validate rules for this field. Only inside a `BbForm`. |
|
|
822
820
|
| `selectable` | `boolean \| ((item: T) => boolean) \| undefined` | `true` | | Defines whether options are selectable. Can be a global boolean that affects all options or a function that accepts an item and returns a boolean that only affects that item. Non-selectable options are rendered disabled. |
|
|
823
821
|
| `validationLabel` | `string \| undefined` | | | The field's name in validation messages (`{field}`): "Email is not valid". Defaults to the `label` (or `legend`), then "This field"; never the `name`. Set it when the label is hidden or reads badly in a sentence (icon-only, a question). `BbForm` only. |
|
|
@@ -900,8 +898,8 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
900
898
|
- Listed nodes are the ones `BbSwitchGroup`'s API reaches or that declare a documented CSS variable; the rest fold into "also mounts". The complete tree, undocumented locals included, is `manifest/components/BbSwitchGroup.tree.json` (a public component in it is a name: its own tree file has the rest).
|
|
901
899
|
|
|
902
900
|
- `BbSwitchGroup` _(this component)_ — its own template binds: `icon` → `BbBaseSwitchIcon`
|
|
903
|
-
- `CommonField` _(internal — not importable, reach it through `BbSwitchGroup`)_ — `BbSwitchGroup`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`;
|
|
904
|
-
- `OptionsContainer` _(internal — not importable, reach it through `BbSwitchGroup`)_ — `BbSwitchGroup`'s pt parts land here: `list` → `span`, `item` → `label`, `label` → `span`, `itemDescription` → `span`; documented CSS variables: `--list-bg`, `--list-border`, `--p`, `--list-r`, `--list-h`, `--fs`, `--trigger-gap`, `--trigger-px`, `--trigger-r`, `--trigger-min-h`, `--list-fg`, `--hover-fg`, `--active-fg`, `--active-fw`, `--indicator-bg`, `--indicator-border`, `--indicator-r`, `--indicator-h`, `--indicator-inset`, `--elev`, `--indicator-shadow`, `--
|
|
901
|
+
- `CommonField` _(internal — not importable, reach it through `BbSwitchGroup`)_ — `BbSwitchGroup`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`; also mounts `BbAsterisk`
|
|
902
|
+
- `OptionsContainer` _(internal — not importable, reach it through `BbSwitchGroup`)_ — `BbSwitchGroup`'s pt parts land here: `list` → `span`, `item` → `label`, `label` → `span`, `itemDescription` → `span`; documented CSS variables: `--list-bg`, `--list-border`, `--p`, `--list-r`, `--list-h`, `--fs`, `--trigger-gap`, `--trigger-px`, `--trigger-r`, `--trigger-min-h`, `--list-fg`, `--hover-fg`, `--active-fg`, `--active-fw`, `--indicator-bg`, `--indicator-border`, `--indicator-r`, `--indicator-h`, `--indicator-inset`, `--elev`, `--indicator-shadow`, `--trigger-min-h`
|
|
905
903
|
- Also mounts `BbBaseSwitchIcon`
|
|
906
904
|
|
|
907
905
|
## See Also
|