bitboss-ui 3.0.0-beta.4 → 3.0.0-beta.41
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 +317 -98
- package/bin/bitboss-ui-mcp.mjs +1566 -75
- package/bin/bitboss-ui.mjs +716 -72
- package/dist/ai/BbAccordion.md +178 -56
- package/dist/ai/BbAlert.md +140 -28
- package/dist/ai/BbAsterisk.md +61 -4
- package/dist/ai/BbAvatar.md +194 -53
- package/dist/ai/BbBadge.md +250 -50
- package/dist/ai/BbBadgeButton.md +74 -21
- package/dist/ai/BbBaseButton.md +132 -51
- package/dist/ai/BbBaseCheckboxIcon.md +118 -26
- package/dist/ai/BbBaseRadioIcon.md +115 -26
- package/dist/ai/BbBaseSwitchIcon.md +123 -28
- package/dist/ai/BbBreadcrumbs.md +221 -51
- package/dist/ai/BbButton.md +389 -107
- package/dist/ai/BbCalendar.md +667 -0
- package/dist/ai/BbCheckbox.md +242 -80
- package/dist/ai/BbCheckboxGroup.md +575 -66
- package/dist/ai/BbCollapsible.md +158 -39
- package/dist/ai/BbColorInput.md +322 -82
- package/dist/ai/BbColorPalette.md +261 -61
- package/dist/ai/BbConfirm.md +220 -51
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +272 -37
- package/dist/ai/BbDatePickerInput.md +321 -92
- package/dist/ai/BbDialog.md +492 -87
- package/dist/ai/BbDropdown.md +1182 -104
- package/dist/ai/BbDropdownButton.md +239 -61
- package/dist/ai/BbDropdownGroup.md +5 -5
- package/dist/ai/BbDropzone.md +140 -36
- package/dist/ai/BbForm.md +1165 -40
- package/dist/ai/BbIcon.md +100 -33
- package/dist/ai/BbIndicator.md +79 -12
- package/dist/ai/BbNumberInput.md +257 -87
- package/dist/ai/BbOffCanvas.md +396 -91
- package/dist/ai/BbPagination.md +199 -32
- package/dist/ai/BbPopover.md +219 -54
- package/dist/ai/BbProgress.md +137 -71
- package/dist/ai/BbPtScope.md +136 -0
- package/dist/ai/BbRadio.md +234 -43
- package/dist/ai/BbRadioGroup.md +529 -91
- package/dist/ai/BbRating.md +243 -61
- package/dist/ai/BbSelect.md +690 -120
- package/dist/ai/BbSelectPopover.md +434 -122
- package/dist/ai/BbSlider.md +275 -79
- package/dist/ai/BbSmoothHeight.md +142 -34
- package/dist/ai/BbSpinner.md +179 -81
- package/dist/ai/BbSwitch.md +249 -63
- package/dist/ai/BbSwitchGroup.md +394 -65
- package/dist/ai/BbTable.md +1666 -222
- package/dist/ai/BbTabs.md +898 -178
- package/dist/ai/BbTabsList.md +81 -7
- package/dist/ai/BbTabsPanels.md +77 -0
- package/dist/ai/BbTabsRoot.md +16 -15
- package/dist/ai/BbTag.md +256 -76
- package/dist/ai/BbTextInput.md +480 -102
- package/dist/ai/BbTextarea.md +310 -96
- package/dist/ai/BbTimePicker.md +159 -24
- package/dist/ai/BbTimePickerInput.md +277 -46
- package/dist/ai/BbToast.md +286 -40
- package/dist/ai/BbToastPortal.md +3 -3
- package/dist/ai/BbTooltip.md +187 -34
- package/dist/ai/BbTree.md +260 -85
- package/dist/ai/ChipsBox.md +43 -2
- package/dist/ai/ClearableButton.md +12 -0
- package/dist/ai/CommaBox.md +2 -1
- package/dist/ai/CommonField.md +63 -0
- package/dist/ai/CommonFieldInput.md +90 -0
- package/dist/ai/CommonPopover.md +17 -12
- package/dist/ai/CommonTimeSelector.md +63 -0
- package/dist/ai/ErrorIcon.md +20 -0
- package/dist/ai/FlatListBox.md +41 -11
- package/dist/ai/GroupedListBox.md +42 -12
- package/dist/ai/ListBox.md +46 -11
- package/dist/ai/OptionsContainer.md +13 -10
- package/dist/ai/WarningIcon.md +20 -0
- package/dist/ai/changelog.json +4025 -141
- package/dist/ai/components.json +51872 -10136
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useBbDropdownContext.md +168 -0
- package/dist/ai/composables/useBbFormContext.md +51 -24
- package/dist/ai/composables/useBbFormField.md +134 -0
- package/dist/ai/composables/useBbTableContext.md +41 -19
- package/dist/ai/composables/useConfirm.md +16 -8
- package/dist/ai/composables/useCountdown.md +1 -1
- package/dist/ai/composables/useId.md +10 -10
- package/dist/ai/composables/useMobile.md +17 -10
- package/dist/ai/composables/useToast.md +25 -19
- package/dist/ai/design-tokens.json +940 -0
- package/dist/ai/design-tokens.manifest.yaml +175 -0
- package/dist/ai/guides/agent-contract.md +168 -22
- package/dist/ai/guides/ai-router.md +79 -40
- package/dist/ai/guides/app-layout.md +8 -4
- package/dist/ai/guides/coherence-playbook.md +8 -8
- package/dist/ai/guides/component-picker.md +42 -34
- package/dist/ai/guides/design-language.md +274 -97
- package/dist/ai/guides/design-tokens.md +493 -105
- package/dist/ai/guides/fetch-items-playbook.md +22 -16
- package/dist/ai/guides/icons-policy.md +67 -35
- package/dist/ai/guides/inertia-helpers.md +4 -1
- package/dist/ai/guides/inline-edit-playbook.md +13 -6
- package/dist/ai/guides/installation-and-plugin-setup.md +817 -73
- package/dist/ai/guides/migration/components/bb-accordion.md +37 -0
- package/dist/ai/guides/migration/components/bb-alert.md +2 -2
- package/dist/ai/guides/migration/components/bb-avatar.md +13 -14
- package/dist/ai/guides/migration/components/bb-badge.md +5 -5
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +9 -8
- package/dist/ai/guides/migration/components/bb-button.md +80 -20
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +116 -29
- package/dist/ai/guides/migration/components/bb-checkbox.md +53 -10
- package/dist/ai/guides/migration/components/bb-chip.md +6 -6
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-input.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-palette.md +16 -9
- package/dist/ai/guides/migration/components/bb-date-picker-input.md +45 -35
- package/dist/ai/guides/migration/components/bb-dialog.md +69 -36
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +7 -1
- package/dist/ai/guides/migration/components/bb-dropdown.md +31 -8
- package/dist/ai/guides/migration/components/bb-dropzone.md +8 -0
- package/dist/ai/guides/migration/components/bb-icon.md +7 -7
- package/dist/ai/guides/migration/components/bb-intersection.md +1 -1
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -31
- package/dist/ai/guides/migration/components/bb-pagination.md +10 -0
- package/dist/ai/guides/migration/components/bb-popover.md +19 -11
- package/dist/ai/guides/migration/components/bb-radio-group.md +14 -0
- package/dist/ai/guides/migration/components/bb-rating.md +61 -24
- package/dist/ai/guides/migration/components/bb-select-popover.md +9 -1
- package/dist/ai/guides/migration/components/bb-select.md +21 -4
- package/dist/ai/guides/migration/components/bb-slider.md +14 -6
- package/dist/ai/guides/migration/components/bb-switch-group.md +14 -0
- package/dist/ai/guides/migration/components/bb-table.md +574 -33
- package/dist/ai/guides/migration/components/bb-tabs.md +91 -41
- package/dist/ai/guides/migration/components/bb-tag.md +9 -7
- package/dist/ai/guides/migration/components/bb-text-input.md +12 -12
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/components/bb-tooltip.md +18 -0
- package/dist/ai/guides/migration/components/bb-tree.md +11 -9
- package/dist/ai/guides/migration/components/use-confirm.md +9 -1
- package/dist/ai/guides/migration/v2-to-v3.md +828 -240
- package/dist/ai/guides/migration/v3-beta-css-classes.md +751 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +119 -0
- package/dist/ai/guides/options-items-playbook.md +161 -12
- package/dist/ai/guides/page-shell.md +1 -1
- package/dist/ai/guides/passthrough.md +958 -0
- package/dist/ai/guides/preset-components.md +361 -0
- package/dist/ai/guides/ssr-prefill.md +127 -0
- package/dist/ai/guides/validated-forms.md +466 -55
- package/dist/ai/guides/validation-libraries.md +171 -0
- package/dist/ai/guides/validation-providers.md +113 -0
- package/dist/ai/index.md +45 -44
- package/dist/ai/recipes/inertia/approvals-inbox.md +26 -10
- package/dist/ai/recipes/inertia/command-palette.md +2 -2
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +46 -30
- package/dist/ai/recipes/inertia/layout-scaffold.md +6 -2
- package/dist/ai/recipes/inertia/onboarding.md +30 -8
- package/dist/ai/recipes/inertia/ownership-atlas.md +72 -49
- package/dist/ai/recipes/inertia/record-form.md +53 -19
- package/dist/ai/recipes/inertia/records-workspace.md +201 -49
- package/dist/ai/recipes/inertia/settings-workspace.md +3809 -0
- package/dist/ai/recipes/inertia/upload-center.md +54 -43
- package/dist/ai/recipes/inertia/wizard-form.md +98 -14
- package/dist/ai/recipes/nuxt/approvals-inbox.md +26 -10
- package/dist/ai/recipes/nuxt/command-palette.md +2 -2
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +68 -52
- package/dist/ai/recipes/nuxt/layout-scaffold.md +6 -2
- package/dist/ai/recipes/nuxt/onboarding.md +30 -8
- package/dist/ai/recipes/nuxt/record-form.md +66 -22
- package/dist/ai/recipes/nuxt/records-workspace.md +199 -48
- package/dist/ai/recipes/nuxt/settings-workspace.md +3898 -0
- package/dist/ai/recipes/nuxt/upload-center.md +52 -41
- package/dist/ai/recipes/nuxt/wizard-form.md +98 -14
- package/dist/ai/recipes/vue/approvals-inbox.md +28 -12
- package/dist/ai/recipes/vue/command-palette.md +2 -2
- package/dist/ai/recipes/vue/inline-edit-workspace.md +69 -53
- package/dist/ai/recipes/vue/layout-scaffold.md +6 -2
- package/dist/ai/recipes/vue/onboarding.md +32 -8
- package/dist/ai/recipes/vue/record-form.md +81 -54
- package/dist/ai/recipes/vue/records-workspace.md +198 -49
- package/dist/ai/recipes/vue/settings-workspace.md +3836 -0
- package/dist/ai/recipes/vue/upload-center.md +53 -42
- package/dist/ai/recipes/vue/wizard-form.md +97 -14
- package/dist/ai/source/BbAccordion.md +90 -24
- package/dist/ai/source/BbAlert.md +209 -62
- package/dist/ai/source/BbAsterisk.md +54 -4
- package/dist/ai/source/BbAvatar.md +73 -16
- package/dist/ai/source/BbBadge.md +265 -97
- package/dist/ai/source/BbBadgeButton.md +218 -79
- package/dist/ai/source/BbBaseButton.md +108 -12
- package/dist/ai/source/BbBaseCheckboxIcon.md +151 -36
- package/dist/ai/source/BbBaseRadioIcon.md +121 -17
- package/dist/ai/source/BbBaseSwitchIcon.md +138 -28
- package/dist/ai/source/BbBreadcrumbs.md +363 -69
- package/dist/ai/source/BbButton.md +563 -174
- package/dist/ai/source/BbCalendar.md +1744 -0
- package/dist/ai/source/BbCheckbox.md +470 -68
- package/dist/ai/source/BbCheckboxGroup.md +976 -95
- package/dist/ai/source/BbCollapsible.md +96 -8
- package/dist/ai/source/BbColorInput.md +597 -67
- package/dist/ai/source/BbColorPalette.md +1284 -65
- package/dist/ai/source/BbConfirm.md +149 -7
- package/dist/ai/source/BbConfirmPortal.md +89 -3
- package/dist/ai/source/BbDatePicker.md +527 -381
- package/dist/ai/source/BbDatePickerInput.md +2015 -118
- package/dist/ai/source/BbDialog.md +531 -64
- package/dist/ai/source/BbDropdown.md +885 -175
- package/dist/ai/source/BbDropdownButton.md +377 -79
- package/dist/ai/source/BbDropdownGroup.md +687 -96
- package/dist/ai/source/BbDropzone.md +140 -31
- package/dist/ai/source/BbForm.md +875 -17
- package/dist/ai/source/BbIcon.md +130 -52
- package/dist/ai/source/BbIndicator.md +117 -60
- package/dist/ai/source/BbNumberInput.md +667 -84
- package/dist/ai/source/BbOffCanvas.md +1007 -261
- package/dist/ai/source/BbPagination.md +203 -31
- package/dist/ai/source/BbPopover.md +267 -90
- package/dist/ai/source/BbProgress.md +88 -26
- package/dist/ai/source/BbPtScope.md +54 -0
- package/dist/ai/source/BbRadio.md +388 -58
- package/dist/ai/source/BbRadioGroup.md +940 -109
- package/dist/ai/source/BbRating.md +736 -84
- package/dist/ai/source/BbSelect.md +1096 -96
- package/dist/ai/source/BbSelectPopover.md +807 -114
- package/dist/ai/source/BbSlider.md +1390 -98
- package/dist/ai/source/BbSmoothHeight.md +48 -2
- package/dist/ai/source/BbSpinner.md +62 -6
- package/dist/ai/source/BbSwitch.md +297 -60
- package/dist/ai/source/BbSwitchGroup.md +761 -83
- package/dist/ai/source/BbTable.md +6950 -1864
- package/dist/ai/source/BbTabs.md +368 -111
- package/dist/ai/source/BbTabsList.md +503 -146
- package/dist/ai/source/BbTabsPanels.md +625 -0
- package/dist/ai/source/BbTabsRoot.md +319 -100
- package/dist/ai/source/BbTag.md +796 -87
- package/dist/ai/source/BbTextInput.md +497 -68
- package/dist/ai/source/BbTextarea.md +550 -65
- package/dist/ai/source/BbTimePicker.md +395 -69
- package/dist/ai/source/BbTimePickerInput.md +1233 -106
- package/dist/ai/source/BbToast.md +250 -74
- package/dist/ai/source/BbToastPortal.md +210 -66
- package/dist/ai/source/BbTooltip.md +181 -30
- package/dist/ai/source/BbTree.md +76 -11
- package/dist/ai/source/ChipsBox.md +25 -5
- package/dist/ai/source/CommaBox.md +21 -6
- package/dist/ai/source/{BbBaseInputContainer.md → CommonField.md} +467 -250
- package/dist/ai/source/CommonFieldInput.md +848 -0
- package/dist/ai/source/CommonPopover.md +116 -30
- package/dist/ai/source/CommonTimeSelector.md +726 -0
- package/dist/ai/source/ErrorIcon.md +2 -2
- package/dist/ai/source/FlatListBox.md +188 -17
- package/dist/ai/source/GroupedListBox.md +236 -44
- package/dist/ai/source/GuidesComponent.md +14 -7
- package/dist/ai/source/ListBox.md +46 -8
- package/dist/ai/source/OptionsContainer.md +288 -60
- package/dist/ai/source/WarningIcon.md +2 -2
- package/dist/assets/css/reset.css_inline.js +1 -1
- package/dist/assets/svgs/star.svg_raw.js +4 -0
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +49 -32
- package/dist/components/BbAccordion/types.d.ts +35 -3
- package/dist/components/BbAccordion/types.js +11 -0
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +46 -30
- package/dist/components/BbAlert/types.d.ts +37 -3
- package/dist/components/BbAlert/types.js +13 -0
- package/dist/components/BbAsterisk/BbAsterisk.vue.d.ts +3 -1
- package/dist/components/BbAsterisk/BbAsterisk.vue_vue_type_script_setup_true_lang.js +23 -8
- package/dist/components/BbAsterisk/types.d.ts +18 -0
- package/dist/components/BbAsterisk/types.js +7 -0
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +57 -44
- package/dist/components/BbAvatar/types.d.ts +23 -0
- package/dist/components/BbAvatar/types.js +7 -0
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -18
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +96 -53
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +27 -8
- package/dist/components/BbBadge/badgeButtonContext.d.ts +25 -8
- package/dist/components/BbBadge/types.d.ts +46 -3
- package/dist/components/BbBadge/types.js +13 -0
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +109 -96
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/BbBaseButton/types.d.ts +33 -3
- package/dist/components/BbBaseButton/types.js +9 -2
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue_vue_type_script_setup_true_lang.js +50 -18
- package/dist/components/BbBaseCheckboxIcon/types.d.ts +31 -2
- package/dist/components/BbBaseCheckboxIcon/types.js +8 -0
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue_vue_type_script_setup_true_lang.js +45 -15
- package/dist/components/BbBaseRadioIcon/types.d.ts +31 -2
- package/dist/components/BbBaseRadioIcon/types.js +8 -0
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue_vue_type_script_setup_true_lang.js +48 -16
- package/dist/components/BbBaseSwitchIcon/types.d.ts +31 -2
- package/dist/components/BbBaseSwitchIcon/types.js +8 -0
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +187 -132
- package/dist/components/BbBreadcrumbs/types.d.ts +45 -3
- package/dist/components/BbBreadcrumbs/types.js +12 -0
- package/dist/components/BbButton/BbButton.vue.d.ts +5 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +107 -81
- package/dist/components/BbButton/types.d.ts +113 -2
- package/dist/components/BbButton/types.js +12 -0
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +34 -0
- package/dist/components/BbCalendar/BbCalendar.vue.js +6 -0
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +608 -0
- package/dist/components/BbCalendar/CalendarMonthPanel.vue.js +5 -0
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/components/BbCalendar/CalendarYearPanel.vue.js +5 -0
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/components/BbCalendar/calendarHost.d.ts +29 -0
- package/dist/components/BbCalendar/calendarHost.js +10 -0
- package/dist/components/BbCalendar/types.d.ts +225 -0
- package/dist/components/BbCalendar/types.js +29 -0
- package/dist/components/{BbBaseDatePicker/useDatePickerContext.d.ts → BbCalendar/useCalendarContext.d.ts} +10 -7
- package/dist/components/BbCalendar/useCalendarContext.js +11 -0
- package/dist/components/BbCalendar/useCalendarGrid.d.ts +208 -0
- package/dist/components/BbCalendar/useCalendarGrid.js +274 -0
- package/dist/components/BbCalendar/useDayGrid.d.ts +79 -0
- package/dist/components/BbCalendar/useDayGrid.js +204 -0
- package/dist/components/BbCalendar/useToday.d.ts +23 -0
- package/dist/components/BbCalendar/useToday.js +21 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +7 -7
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +214 -72
- package/dist/components/BbCheckbox/types.d.ts +180 -13
- package/dist/components/BbCheckbox/types.js +8 -0
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +15 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +338 -90
- package/dist/components/BbCheckboxGroup/types.d.ts +195 -20
- package/dist/components/BbCheckboxGroup/types.js +10 -0
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +2 -1
- package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +41 -19
- package/dist/components/BbCollapsible/types.d.ts +44 -1
- package/dist/components/BbCollapsible/types.js +7 -0
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +17 -7
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +330 -86
- package/dist/components/BbColorInput/types.d.ts +230 -12
- package/dist/components/BbColorInput/types.js +24 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +10 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +515 -108
- package/dist/components/BbColorPalette/types.d.ts +76 -7
- package/dist/components/BbColorPalette/types.js +12 -0
- package/dist/components/BbConfirm/BbConfirm.vue.d.ts +2 -1
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +125 -76
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +1 -0
- package/dist/components/BbConfirm/types.d.ts +49 -0
- package/dist/components/BbConfirm/types.js +17 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +16 -10
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +320 -223
- package/dist/components/BbDatePicker/types.d.ts +111 -17
- package/dist/components/BbDatePicker/types.js +33 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +16 -4
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +1172 -87
- package/dist/components/BbDatePickerInput/types.d.ts +224 -19
- package/dist/components/BbDatePickerInput/types.js +39 -0
- package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +227 -136
- package/dist/components/BbDialog/types.d.ts +92 -3
- package/dist/components/BbDialog/types.js +16 -0
- package/dist/components/BbDialog/useDialogStack.d.ts +12 -0
- package/dist/components/BbDialog/useDialogStack.js +9 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +108 -96
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +10 -2
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +337 -268
- package/dist/components/BbDropdown/BbDropdownGroup.vue.d.ts +5 -1
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +8 -2
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +377 -293
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +129 -118
- package/dist/components/BbDropdown/normalizeGroups.js +55 -31
- package/dist/components/BbDropdown/types.d.ts +288 -30
- package/dist/components/BbDropdown/types.js +21 -2
- package/dist/components/BbDropdown/useDropdownContext.d.ts +10 -4
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +18 -3
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +172 -40
- package/dist/components/BbDropdownButton/types.d.ts +137 -8
- package/dist/components/BbDropdownButton/types.js +35 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +2 -2
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +186 -144
- package/dist/components/BbDropzone/types.d.ts +38 -4
- package/dist/components/BbDropzone/types.js +16 -0
- package/dist/components/BbForm/BbForm.vue.d.ts +94 -0
- package/dist/{validated → components/BbForm}/BbForm.vue.js +1 -1
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +317 -0
- package/dist/components/BbForm/BbFormCustomField.d.ts +14 -0
- package/dist/components/BbForm/BbFormCustomField.js +43 -0
- package/dist/components/BbForm/bindFormField.d.ts +16 -0
- package/dist/components/BbForm/bindFormField.js +85 -0
- package/dist/components/BbForm/formFields.d.ts +64 -0
- package/dist/components/BbForm/formFields.js +11 -0
- package/dist/components/BbForm/formSchema.d.ts +56 -0
- package/dist/components/BbForm/formSchema.js +196 -0
- package/dist/components/BbForm/standardSchema.d.ts +59 -0
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +58 -48
- package/dist/components/BbIcon/iconCache.d.ts +63 -0
- package/dist/components/BbIcon/iconCache.js +35 -0
- package/dist/components/BbIcon/types.d.ts +22 -2
- package/dist/components/BbIcon/types.js +7 -0
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +34 -21
- package/dist/components/BbIndicator/types.d.ts +24 -0
- package/dist/components/BbIndicator/types.js +7 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +12 -8
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +308 -85
- package/dist/components/BbNumberInput/types.d.ts +201 -18
- package/dist/components/BbNumberInput/types.js +8 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +311 -210
- package/dist/components/BbOffCanvas/types.d.ts +79 -6
- package/dist/components/BbOffCanvas/types.js +15 -0
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +125 -90
- package/dist/components/BbPagination/types.d.ts +38 -0
- package/dist/components/BbPagination/types.js +13 -0
- package/dist/components/BbPopover/BbPopover.vue.d.ts +4 -4
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +219 -179
- package/dist/components/BbPopover/types.d.ts +51 -5
- package/dist/components/BbPopover/types.js +14 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +29 -16
- package/dist/components/BbProgress/types.d.ts +25 -0
- package/dist/components/BbProgress/types.js +7 -0
- package/dist/components/BbPtScope/BbPtScope.vue.d.ts +12 -0
- package/dist/components/BbPtScope/BbPtScope.vue.js +5 -0
- package/dist/components/BbPtScope/BbPtScope.vue_vue_type_script_setup_true_lang.js +13 -0
- package/dist/components/BbPtScope/types.d.ts +15 -0
- package/dist/components/BbRadio/BbRadio.vue.d.ts +7 -7
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +172 -59
- package/dist/components/BbRadio/types.d.ts +152 -13
- package/dist/components/BbRadio/types.js +8 -0
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +14 -2
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +319 -92
- package/dist/components/BbRadioGroup/types.d.ts +198 -22
- package/dist/components/BbRadioGroup/types.js +10 -0
- package/dist/components/BbRating/BbRating.vue.d.ts +10 -8
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +259 -78
- package/dist/components/BbRating/types.d.ts +174 -13
- package/dist/components/BbRating/types.js +21 -0
- package/dist/components/BbSelect/BbSelect.vue.d.ts +17 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +553 -83
- package/dist/components/BbSelect/types.d.ts +235 -20
- package/dist/components/BbSelect/types.js +41 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +15 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +541 -391
- package/dist/components/BbSelectPopover/types.d.ts +124 -8
- package/dist/components/BbSelectPopover/types.js +24 -0
- package/dist/components/BbSlider/BbSlider.vue.d.ts +13 -8
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +472 -96
- package/dist/components/BbSlider/types.d.ts +202 -13
- package/dist/components/BbSlider/types.js +26 -0
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue_vue_type_script_setup_true_lang.js +60 -48
- package/dist/components/BbSmoothHeight/types.d.ts +19 -0
- package/dist/components/BbSmoothHeight/types.js +7 -0
- package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +27 -14
- package/dist/components/BbSpinner/types.d.ts +22 -1
- package/dist/components/BbSpinner/types.js +7 -0
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +7 -7
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +220 -78
- package/dist/components/BbSwitch/types.d.ts +25 -10
- package/dist/components/BbSwitch/types.js +5 -0
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +14 -2
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +338 -90
- package/dist/components/BbSwitchGroup/types.d.ts +30 -7
- package/dist/components/BbSwitchGroup/types.js +5 -0
- package/dist/components/BbTable/BbTable.vue.d.ts +27 -6
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +2013 -685
- package/dist/components/BbTable/BbTableDataRow.d.ts +196 -0
- package/dist/components/BbTable/BbTableDataRow.js +151 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +84 -0
- package/dist/components/BbTable/BbTableExpandRow.js +62 -0
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +120 -0
- package/dist/components/BbTable/BbTableSelectToggle.js +122 -0
- package/dist/components/BbTable/gridWidgets.d.ts +30 -0
- package/dist/components/BbTable/gridWidgets.js +14 -0
- package/dist/components/BbTable/types.d.ts +473 -123
- package/dist/components/BbTable/types.js +31 -0
- package/dist/components/BbTable/utils.d.ts +145 -4
- package/dist/components/BbTable/utils.js +154 -37
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -1
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +62 -26
- package/dist/components/BbTabs/BbTabsList.vue.d.ts +3 -10
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +143 -81
- package/dist/components/BbTabs/BbTabsPanels.vue.d.ts +12 -0
- package/dist/components/{BbBaseSwitch/BbBaseSwitch.vue.js → BbTabs/BbTabsPanels.vue.js} +2 -2
- package/dist/components/BbTabs/BbTabsPanels.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/BbTabs/BbTabsRoot.vue.d.ts +3 -1
- package/dist/components/BbTabs/BbTabsRoot.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbTabs/types.d.ts +183 -23
- package/dist/components/BbTabs/types.js +34 -0
- package/dist/components/BbTag/BbTag.vue.d.ts +13 -10
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +383 -92
- package/dist/components/BbTag/types.d.ts +139 -14
- package/dist/components/BbTag/types.js +22 -0
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +10 -8
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +257 -84
- package/dist/components/BbTextInput/types.d.ts +168 -13
- package/dist/components/BbTextInput/types.js +8 -0
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +7 -7
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +291 -94
- package/dist/components/BbTextarea/types.d.ts +158 -14
- package/dist/components/BbTextarea/types.js +8 -0
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +12 -4
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +199 -122
- package/dist/components/BbTimePicker/types.d.ts +94 -7
- package/dist/components/BbTimePicker/types.js +18 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +14 -4
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +749 -86
- package/dist/components/BbTimePickerInput/types.d.ts +171 -22
- package/dist/components/BbTimePickerInput/types.js +25 -0
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +63 -25
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +4 -1
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -76
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +1 -0
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +4 -1
- package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +72 -64
- package/dist/components/BbToast/types.d.ts +54 -1
- package/dist/components/BbToast/types.js +28 -0
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +104 -87
- package/dist/components/BbTooltip/types.d.ts +40 -2
- package/dist/components/BbTooltip/types.js +7 -0
- package/dist/components/BbTree/BbTree.vue.d.ts +15 -3
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +51 -29
- package/dist/components/BbTree/BbTreeLevel.vue.d.ts +1 -1
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +17 -16
- package/dist/components/BbTree/context.d.ts +9 -1
- package/dist/components/BbTree/types.d.ts +40 -5
- package/dist/components/BbTree/types.js +7 -0
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +46 -44
- package/dist/components/ChipsBox/types.d.ts +7 -0
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +11 -7
- package/dist/components/CommaBox/types.d.ts +7 -0
- package/dist/components/{BbBaseInputContainer/BbBaseInputContainer.vue.d.ts → CommonField/CommonField.vue.d.ts} +5 -5
- package/dist/components/{BbBaseRadio/BbBaseRadio.vue.js → CommonField/CommonField.vue.js} +2 -2
- package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +189 -0
- package/dist/components/CommonField/messageHeightMatrix.d.ts +2 -0
- package/dist/components/{BbBaseInputContainer → CommonField}/types.d.ts +52 -16
- package/dist/components/{CommonInputWrapper/CommonInputWrapper.vue.d.ts → CommonFieldInput/CommonFieldInput.vue.d.ts} +5 -4
- package/dist/components/{BbBaseRadioGroup/BbBaseRadioGroup.vue.js → CommonFieldInput/CommonFieldInput.vue.js} +2 -2
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +120 -0
- package/dist/components/CommonFieldInput/boxBorderMatrix.d.ts +10 -0
- package/dist/components/{CommonInputWrapper → CommonFieldInput}/types.d.ts +27 -8
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +11 -2
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +76 -63
- package/dist/components/CommonPopover/types.d.ts +27 -8
- package/dist/components/{BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.d.ts → CommonTimeSelector/CommonTimeSelector.vue.d.ts} +21 -2
- package/dist/components/{BbBaseColorPalette/BbBaseColorPalette.vue.js → CommonTimeSelector/CommonTimeSelector.vue.js} +2 -2
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +232 -0
- package/dist/components/CommonTimeSelector/types.d.ts +6 -0
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +5 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +165 -95
- package/dist/components/FlatListBox/types.d.ts +24 -2
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +5 -1
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +217 -134
- package/dist/components/GroupedListBox/types.d.ts +24 -2
- package/dist/components/ListBox/ListBox.vue.d.ts +5 -1
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +95 -69
- package/dist/components/ListBox/types.d.ts +24 -2
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +109 -37
- package/dist/components/OptionsContainer/types.d.ts +53 -9
- package/dist/components/Transitions/ScaleFade.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/Transitions/Slide.vue.js +1 -1
- package/dist/composables/useBaseOptions.d.ts +12 -1
- package/dist/composables/useBaseOptions.js +77 -37
- package/dist/composables/useBbConfig.d.ts +27 -6
- package/dist/composables/useBbConfig.js +8 -2
- package/dist/composables/useBbDropdownContext.d.ts +5 -0
- package/dist/composables/useBbFormContext.d.ts +131 -8
- package/dist/composables/useBbFormContext.js +49 -30
- package/dist/composables/useBbFormField.d.ts +40 -0
- package/dist/composables/useBbFormField.js +39 -0
- package/dist/composables/useBbTableContext.d.ts +45 -1
- package/dist/composables/useBbTableContext.js +93 -87
- package/dist/composables/useBbTabsContext.d.ts +15 -9
- package/dist/composables/useBbTabsContext.js +121 -90
- package/dist/composables/useClosingInert.d.ts +4 -4
- package/dist/composables/useCoarsePointer.js +7 -10
- package/dist/composables/useCoherence.js +1 -1
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +15 -0
- package/dist/composables/useConfirm.d.ts +39 -7
- package/dist/composables/useConfirm.js +50 -41
- package/dist/composables/useEscapeStackEntry.d.ts +13 -0
- package/dist/composables/useEscapeStackEntry.js +16 -0
- package/dist/composables/useFormBinding.d.ts +116 -0
- package/dist/composables/useFormBinding.js +34 -0
- package/dist/composables/useHydrated.d.ts +18 -0
- package/dist/composables/useHydrated.js +13 -7
- package/dist/composables/useId.d.ts +4 -3
- package/dist/composables/useId.js +1 -7
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useKeyboardInset.d.ts +28 -0
- package/dist/composables/useKeyboardInset.js +32 -0
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +7 -10
- package/dist/composables/usePassthrough.d.ts +228 -0
- package/dist/composables/usePassthrough.js +247 -0
- package/dist/composables/usePrefill.d.ts +22 -2
- package/dist/composables/usePrefill.js +35 -19
- package/dist/composables/useSafeAreaInternal.js +1 -1
- package/dist/composables/useSegmentedFields.d.ts +2 -2
- package/dist/composables/useSsrState.d.ts +20 -0
- package/dist/composables/useSsrState.js +13 -0
- package/dist/composables/useTableWidthContext.d.ts +24 -4
- package/dist/composables/useTableWidthContext.js +31 -28
- package/dist/composables/useToast.d.ts +18 -1
- package/dist/composables/useToast.js +31 -18
- package/dist/composables/useToggleInput.d.ts +44 -0
- package/dist/composables/useToggleInput.js +39 -0
- package/dist/composables/useViewportWidth.d.ts +5 -25
- package/dist/composables/useViewportWidth.js +14 -7
- package/dist/deprecation/ai-deprecations.json.d.ts +1977 -289
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.js +9 -4
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/bbTooltip.d.ts +6 -0
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +92 -37
- package/dist/i18n/index.d.ts +10 -16
- package/dist/i18n/locales/cs.json +9 -5
- package/dist/i18n/locales/da.json +9 -5
- package/dist/i18n/locales/de.json +9 -5
- package/dist/i18n/locales/el.json +9 -5
- package/dist/i18n/locales/en.json +9 -5
- package/dist/i18n/locales/es.json +9 -5
- package/dist/i18n/locales/fi.json +9 -5
- package/dist/i18n/locales/fr.json +9 -5
- package/dist/i18n/locales/hu.json +9 -5
- package/dist/i18n/locales/it.json +9 -5
- package/dist/i18n/locales/ja.json +9 -5
- package/dist/i18n/locales/ko.json +9 -5
- package/dist/i18n/locales/nb.json +9 -5
- package/dist/i18n/locales/nl.json +9 -5
- package/dist/i18n/locales/pl.json +9 -5
- package/dist/i18n/locales/pt.json +9 -5
- package/dist/i18n/locales/ro.json +9 -5
- package/dist/i18n/locales/ru.json +9 -5
- package/dist/i18n/locales/sv.json +9 -5
- package/dist/i18n/locales/tr.json +9 -5
- package/dist/i18n/locales/uk.json +9 -5
- package/dist/i18n/locales/zh-cn.json +9 -5
- package/dist/icon-scan.d.ts +276 -0
- package/dist/icon-scan.js +485 -0
- package/dist/icons-whitelist.d.ts +5 -4
- package/dist/index.d.ts +40 -21
- package/dist/index.js +78 -71
- package/dist/llms-full.txt +61164 -27972
- package/dist/llms-medium.txt +1482 -366
- package/dist/llms.txt +32 -15
- package/dist/locale-blueprint.json +9 -5
- package/dist/nuxt-auto-imports.d.ts +76 -0
- package/dist/nuxt-auto-imports.js +32 -0
- package/dist/nuxt-module.d.ts +30 -15
- package/dist/nuxt.js +35 -9
- package/dist/passthrough-deduper.js +5 -0
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +29 -19
- package/dist/project-dts.d.ts +84 -0
- package/dist/project-dts.js +170 -0
- package/dist/reset.css +1 -1
- package/dist/runtime/nuxt-plugin.js +34 -21
- package/dist/styles.css +3 -2
- package/dist/types/AlertVariant.d.ts +10 -1
- package/dist/types/BadgeVariant.d.ts +16 -5
- package/dist/types/ButtonVariant.d.ts +12 -1
- package/dist/types/ColumnName.d.ts +30 -3
- package/dist/types/CommonProps.d.ts +2 -2
- package/dist/types/Config.d.ts +94 -1
- package/dist/types/ConfirmVariant.d.ts +8 -1
- package/dist/types/DropdownItemVariant.d.ts +8 -1
- package/dist/types/FieldLayout.d.ts +32 -0
- package/dist/types/IndicatorVariant.d.ts +11 -1
- package/dist/types/InputVariant.d.ts +30 -0
- package/dist/types/ItemProps.d.ts +50 -0
- package/dist/types/Option.d.ts +6 -0
- package/dist/types/PtScope.d.ts +15 -0
- package/dist/types/RegistryKey.d.ts +10 -0
- package/dist/types/TabsVariant.d.ts +25 -0
- package/dist/types/ToastVariant.d.ts +12 -2
- package/dist/types/TooltipVariant.d.ts +8 -1
- package/dist/types/passthrough.d.ts +362 -0
- package/dist/types/passthrough.js +78 -0
- package/dist/types/ptComponentMap.d.ts +62 -0
- package/dist/utilities/functions/hasVnodeListener.d.ts +16 -0
- package/dist/utilities/functions/hasVnodeListener.js +12 -0
- package/dist/utilities/functions/isImeComposing.d.ts +7 -0
- package/dist/utilities/functions/isImeComposing.js +4 -0
- package/dist/utilities/functions/itemProps.d.ts +46 -0
- package/dist/utilities/functions/itemProps.js +47 -0
- package/dist/utilities/functions/slotKey.d.ts +13 -8
- package/dist/utilities/functions/slotKey.js +78 -2
- package/dist/utilities/functions/snapToStep.js +2 -1
- package/dist/utilities/functions/toggleInput.d.ts +98 -0
- package/dist/utilities/functions/toggleInput.js +56 -0
- package/dist/utilities/functions/warnRemovedAttrs.d.ts +27 -1
- package/dist/utilities/functions/warnRemovedAttrs.js +75 -14
- package/dist/utilities/misc/listboxMetrics.d.ts +9 -3
- package/dist/utilities/misc/listboxMetrics.js +5 -2
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
- package/dist/utilities/misc/ssrStateInjectionKey.js +4 -0
- package/dist/utils/cssLayers.d.ts +91 -0
- package/dist/utils/cssLayers.js +43 -0
- package/dist/utils/injectLibraryStyles.d.ts +3 -1
- package/dist/utils/injectLibraryStyles.js +24 -23
- package/dist/utils/overlayEscapeStack.d.ts +10 -0
- package/dist/utils/overlayEscapeStack.js +5 -3
- package/dist/utils/passthrough.d.ts +67 -0
- package/dist/utils/passthrough.js +100 -0
- package/dist/utils/passthroughDeduper.d.ts +2 -0
- package/dist/utils/ptScope.d.ts +8 -0
- package/dist/utils/ptScope.js +4 -0
- package/dist/utils/versionCheck.d.ts +19 -0
- package/dist/utils/versionCheck.js +18 -0
- package/dist/vite-plugin.d.ts +301 -53
- package/dist/vite.js +547 -375
- package/llms.txt +33 -16
- package/package.json +49 -27
- package/scripts/lib/check-fix.mjs +129 -0
- package/scripts/lib/component-attr-targets.ts +123 -0
- package/scripts/lib/component-tree.ts +648 -0
- package/scripts/lib/css-class-check.mjs +326 -0
- package/scripts/lib/css-class-surface.mjs +292 -0
- package/scripts/lib/css-color-resolve.mjs +172 -0
- package/scripts/lib/css-local-check.mjs +267 -0
- package/scripts/lib/design-token-manifest.mjs +499 -0
- package/scripts/lib/doc-sections.mjs +248 -0
- package/scripts/lib/ensure-manifest.mjs +28 -5
- package/scripts/lib/eslint-disable.mjs +141 -0
- package/scripts/lib/eslint-plugin.d.ts +64 -1
- package/scripts/lib/eslint-plugin.mjs +1285 -30
- package/scripts/lib/hand-imported-styles.mjs +326 -0
- package/scripts/lib/hand-roll-hints.mjs +50 -6
- package/scripts/lib/html-attributes.mjs +353 -0
- package/scripts/lib/local-components.mjs +177 -0
- package/scripts/lib/mcp-config.mjs +87 -58
- package/scripts/lib/migrate-fix.mjs +62 -3
- package/scripts/lib/project-variant-dts.mjs +122 -0
- package/scripts/lib/public-type-exports.mjs +273 -0
- package/scripts/lib/slot-key.mjs +147 -0
- package/scripts/lib/slot-renames.mjs +46 -0
- package/scripts/lib/squashed-slot-words.mjs +133 -0
- package/scripts/lib/validate-bb-markup.mjs +2213 -76
- package/scripts/lib/wrapper-props.mjs +188 -0
- package/dist/ai/BbBaseCheckbox.md +0 -49
- package/dist/ai/BbBaseCheckboxGroup.md +0 -64
- package/dist/ai/BbBaseColorInput.md +0 -65
- package/dist/ai/BbBaseColorPalette.md +0 -39
- package/dist/ai/BbBaseDatePicker.md +0 -43
- package/dist/ai/BbBaseDatePickerInput.md +0 -73
- package/dist/ai/BbBaseInputContainer.md +0 -48
- package/dist/ai/BbBaseNumberInput.md +0 -71
- package/dist/ai/BbBaseRadio.md +0 -46
- package/dist/ai/BbBaseRadioGroup.md +0 -64
- package/dist/ai/BbBaseRating.md +0 -52
- package/dist/ai/BbBaseSelect.md +0 -88
- package/dist/ai/BbBaseSlider.md +0 -56
- package/dist/ai/BbBaseSwitch.md +0 -49
- package/dist/ai/BbBaseSwitchGroup.md +0 -64
- package/dist/ai/BbBaseTag.md +0 -68
- package/dist/ai/BbBaseTextInput.md +0 -75
- package/dist/ai/BbBaseTextarea.md +0 -62
- package/dist/ai/BbBaseTimePickerInput.md +0 -62
- package/dist/ai/BbTabsPanes.md +0 -27
- package/dist/ai/CommonInputWrapper.md +0 -42
- package/dist/ai/source/BbBaseCheckbox.md +0 -461
- package/dist/ai/source/BbBaseCheckboxGroup.md +0 -554
- package/dist/ai/source/BbBaseColorInput.md +0 -431
- package/dist/ai/source/BbBaseColorPalette.md +0 -942
- package/dist/ai/source/BbBaseDatePicker.md +0 -1448
- package/dist/ai/source/BbBaseDatePickerInput.md +0 -1940
- package/dist/ai/source/BbBaseNumberInput.md +0 -617
- package/dist/ai/source/BbBaseRadio.md +0 -381
- package/dist/ai/source/BbBaseRadioGroup.md +0 -539
- package/dist/ai/source/BbBaseRating.md +0 -607
- package/dist/ai/source/BbBaseSelect.md +0 -945
- package/dist/ai/source/BbBaseSlider.md +0 -1144
- package/dist/ai/source/BbBaseSwitch.md +0 -246
- package/dist/ai/source/BbBaseSwitchGroup.md +0 -302
- package/dist/ai/source/BbBaseTag.md +0 -694
- package/dist/ai/source/BbBaseTextInput.md +0 -511
- package/dist/ai/source/BbBaseTextarea.md +0 -504
- package/dist/ai/source/BbBaseTimePickerInput.md +0 -1037
- package/dist/ai/source/BbTabsPanes.md +0 -377
- package/dist/ai/source/CommonInputWrapper.md +0 -584
- package/dist/alert-variants.d.ts +0 -19
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/badge-variants.d.ts +0 -19
- package/dist/button-variants.d.ts +0 -21
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.d.ts +0 -40
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.js +0 -6
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +0 -145
- package/dist/components/BbBaseCheckbox/types.d.ts +0 -224
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.js +0 -6
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +0 -257
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.d.ts +0 -43
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.js +0 -6
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue_vue_type_script_setup_true_lang.js +0 -184
- package/dist/components/BbBaseColorInput/types.d.ts +0 -219
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue.d.ts +0 -13
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue_vue_type_script_setup_true_lang.js +0 -395
- package/dist/components/BbBaseColorPalette/types.d.ts +0 -40
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.d.ts +0 -20
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.js +0 -6
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +0 -407
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +0 -47
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +0 -318
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +0 -115
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue_vue_type_script_setup_true_lang.js +0 -116
- package/dist/components/BbBaseDatePicker/types.d.ts +0 -108
- package/dist/components/BbBaseDatePicker/useDatePickerContext.js +0 -11
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +0 -31
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.js +0 -6
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -737
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.js +0 -6
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue_vue_type_script_setup_true_lang.js +0 -204
- package/dist/components/BbBaseDatePickerInput/types.d.ts +0 -325
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.js +0 -6
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.d.ts +0 -52
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.js +0 -6
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue_vue_type_script_setup_true_lang.js +0 -215
- package/dist/components/BbBaseNumberInput/types.d.ts +0 -211
- package/dist/components/BbBaseRadio/BbBaseRadio.vue.d.ts +0 -33
- package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +0 -113
- package/dist/components/BbBaseRadio/types.d.ts +0 -179
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -179
- package/dist/components/BbBaseRadioGroup/types.d.ts +0 -223
- package/dist/components/BbBaseRating/BbBaseRating.vue.d.ts +0 -38
- package/dist/components/BbBaseRating/BbBaseRating.vue.js +0 -6
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +0 -192
- package/dist/components/BbBaseRating/types.d.ts +0 -176
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.d.ts +0 -19
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.js +0 -6
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +0 -311
- package/dist/components/BbBaseSelect/types.d.ts +0 -297
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.d.ts +0 -35
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.js +0 -6
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +0 -340
- package/dist/components/BbBaseSlider/types.d.ts +0 -200
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.d.ts +0 -35
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +0 -146
- package/dist/components/BbBaseSwitch/types.d.ts +0 -10
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.js +0 -6
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseSwitchGroup/types.d.ts +0 -8
- package/dist/components/BbBaseTag/BbBaseTag.vue.d.ts +0 -50
- package/dist/components/BbBaseTag/BbBaseTag.vue.js +0 -6
- package/dist/components/BbBaseTag/BbBaseTag.vue_vue_type_script_setup_true_lang.js +0 -266
- package/dist/components/BbBaseTag/types.d.ts +0 -160
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.d.ts +0 -45
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.js +0 -6
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue_vue_type_script_setup_true_lang.js +0 -200
- package/dist/components/BbBaseTextInput/types.d.ts +0 -209
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.d.ts +0 -39
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.js +0 -6
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue_vue_type_script_setup_true_lang.js +0 -187
- package/dist/components/BbBaseTextarea/types.d.ts +0 -170
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +0 -27
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.js +0 -6
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -519
- package/dist/components/BbBaseTimePickerInput/types.d.ts +0 -151
- package/dist/components/BbTabs/BbTabsPanes.vue.d.ts +0 -16
- package/dist/components/BbTabs/BbTabsPanes.vue.js +0 -6
- package/dist/components/BbTabs/BbTabsPanes.vue_vue_type_script_setup_true_lang.js +0 -35
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue.js +0 -6
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue_vue_type_script_setup_true_lang.js +0 -107
- package/dist/confirm-variants.d.ts +0 -17
- package/dist/dropdown-item-variants.d.ts +0 -17
- package/dist/indicator-variants.d.ts +0 -20
- package/dist/locale-registry.d.ts +0 -37
- package/dist/toast-variants.d.ts +0 -20
- package/dist/tooltip-variants.d.ts +0 -17
- package/dist/types/InputDirection.d.ts +0 -15
- package/dist/validated/BbCheckbox.vue.d.ts +0 -29
- package/dist/validated/BbCheckbox.vue.js +0 -5
- package/dist/validated/BbCheckbox.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbCheckboxGroup.vue.d.ts +0 -34
- package/dist/validated/BbCheckboxGroup.vue.js +0 -5
- package/dist/validated/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -82
- package/dist/validated/BbColorInput.vue.d.ts +0 -37
- package/dist/validated/BbColorInput.vue.js +0 -5
- package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbDatePickerInput.vue.d.ts +0 -41
- package/dist/validated/BbDatePickerInput.vue.js +0 -5
- package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -90
- package/dist/validated/BbDropzone.vue.d.ts +0 -24
- package/dist/validated/BbDropzone.vue.js +0 -5
- package/dist/validated/BbDropzone.vue_vue_type_script_setup_true_lang.js +0 -45
- package/dist/validated/BbForm.vue.d.ts +0 -28
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +0 -42
- package/dist/validated/BbNumberInput.vue.d.ts +0 -36
- package/dist/validated/BbNumberInput.vue.js +0 -5
- package/dist/validated/BbNumberInput.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbRadioGroup.vue.d.ts +0 -34
- package/dist/validated/BbRadioGroup.vue.js +0 -5
- package/dist/validated/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -78
- package/dist/validated/BbRating.vue.d.ts +0 -30
- package/dist/validated/BbRating.vue.js +0 -5
- package/dist/validated/BbRating.vue_vue_type_script_setup_true_lang.js +0 -63
- package/dist/validated/BbSelect.vue.d.ts +0 -46
- package/dist/validated/BbSelect.vue.js +0 -5
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +0 -109
- package/dist/validated/BbSlider.vue.d.ts +0 -36
- package/dist/validated/BbSlider.vue.js +0 -5
- package/dist/validated/BbSlider.vue_vue_type_script_setup_true_lang.js +0 -69
- package/dist/validated/BbSwitch.vue.d.ts +0 -29
- package/dist/validated/BbSwitch.vue.js +0 -5
- package/dist/validated/BbSwitch.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbSwitchGroup.vue.d.ts +0 -34
- package/dist/validated/BbSwitchGroup.vue.js +0 -5
- package/dist/validated/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -82
- package/dist/validated/BbTag.vue.d.ts +0 -36
- package/dist/validated/BbTag.vue.js +0 -5
- package/dist/validated/BbTag.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbTextInput.vue.d.ts +0 -36
- package/dist/validated/BbTextInput.vue.js +0 -5
- package/dist/validated/BbTextInput.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbTextarea.vue.d.ts +0 -36
- package/dist/validated/BbTextarea.vue.js +0 -5
- package/dist/validated/BbTextarea.vue_vue_type_script_setup_true_lang.js +0 -70
- package/dist/validated/BbTimePickerInput.vue.d.ts +0 -37
- package/dist/validated/BbTimePickerInput.vue.js +0 -5
- package/dist/validated/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -81
- package/dist/validated/index.d.ts +0 -43
- package/dist/validated/useValidatedField.d.ts +0 -93
- package/dist/validated/useValidatedField.js +0 -51
- package/dist/validated.js +0 -21
- /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.d.ts → BbCalendar/CalendarMonthPanel.vue.d.ts} +0 -0
- /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.d.ts → BbCalendar/CalendarYearPanel.vue.d.ts} +0 -0
- /package/dist/{components/BbBaseDatePicker/typeahead.d.ts → composables/useTypeahead.d.ts} +0 -0
- /package/dist/{components/BbBaseDatePicker/typeahead.js → composables/useTypeahead.js} +0 -0
package/dist/ai/BbSelect.md
CHANGED
|
@@ -8,6 +8,67 @@
|
|
|
8
8
|
- Usage rule: Prefer this component for consumer-facing implementations.
|
|
9
9
|
- Implementation source (only when the contract below is not enough): [source/BbSelect.md](./source/BbSelect.md)
|
|
10
10
|
|
|
11
|
+
## Reachable through `BbSelect`
|
|
12
|
+
|
|
13
|
+
`BbSelect` mounts other components (all of them: _Component tree_, near the end). These are the parts of its API that land inside them. Prefer these over `:deep()` on an inner class (allowed, unsupported: it can break on upgrade) — and never an import of an internal component.
|
|
14
|
+
|
|
15
|
+
| pt part | Lands on | In |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| `pt:badge` | the root of `BbBadge` | `BbBadge` ([contract](./BbBadge.md)) |
|
|
18
|
+
| `pt:panel` | `pt:panel` of `BbSelectPopover` | `BbSelectPopover` ([contract](./BbSelectPopover.md)) |
|
|
19
|
+
| `pt:sheet` | `pt:sheet` of `BbSelectPopover` | `BbSelectPopover` ([contract](./BbSelectPopover.md)) |
|
|
20
|
+
| `pt:header` | `pt:header` of `BbSelectPopover` | `BbSelectPopover` ([contract](./BbSelectPopover.md)) |
|
|
21
|
+
| `pt:footer` | `pt:footer` of `BbSelectPopover` | `BbSelectPopover` ([contract](./BbSelectPopover.md)) |
|
|
22
|
+
| `pt:input` | `pt:input` of `BbSelectPopover` | `BbSelectPopover` ([contract](./BbSelectPopover.md)) |
|
|
23
|
+
| `pt:list` | `pt:list` of `BbSelectPopover` | `BbSelectPopover` ([contract](./BbSelectPopover.md)) |
|
|
24
|
+
| `pt:option` | `pt:option` of `BbSelectPopover` | `BbSelectPopover` ([contract](./BbSelectPopover.md)) |
|
|
25
|
+
| `pt:itemText` | `pt:itemText` of `BbSelectPopover` | `BbSelectPopover` ([contract](./BbSelectPopover.md)) |
|
|
26
|
+
| `pt:itemIcon` | `pt:itemIcon` of `BbSelectPopover` | `BbSelectPopover` ([contract](./BbSelectPopover.md)) |
|
|
27
|
+
| `pt:itemDescription` | `pt:itemDescription` of `BbSelectPopover` | `BbSelectPopover` ([contract](./BbSelectPopover.md)) |
|
|
28
|
+
| `pt:root` | `div.bb-field` | `CommonField` _(internal)_ |
|
|
29
|
+
| `pt:label` | `component` | `CommonField` _(internal)_ |
|
|
30
|
+
| `pt:description` | `span.bb-field__description` | `CommonField` _(internal)_ |
|
|
31
|
+
| `pt:hint` | `span.bb-field__hint` | `CommonField` _(internal)_ |
|
|
32
|
+
| `pt:message` | `div.bb-field__message` | `CommonField` _(internal)_ |
|
|
33
|
+
| `pt:box` | `span.bb-field-input__box` | `CommonFieldInput` _(internal)_ |
|
|
34
|
+
| `pt:prefix` | `span.bb-field-input__prefix` | `CommonFieldInput` _(internal)_ |
|
|
35
|
+
| `pt:icon` | the root of `BbIcon` | `BbIcon` ([contract](./BbIcon.md)) |
|
|
36
|
+
| `pt:clear` | the root of `ClearableButton` | `ClearableButton` _(internal)_ |
|
|
37
|
+
| `pt:spinner` | the root of `BbSpinner` | `BbSpinner` ([contract](./BbSpinner.md)) |
|
|
38
|
+
| `pt:suffix` | `span.bb-field-input__suffix` | `CommonFieldInput` _(internal)_ |
|
|
39
|
+
|
|
40
|
+
**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 `BbSelect`'s root:
|
|
41
|
+
|
|
42
|
+
| Variable | Set through | Declared by | What it is |
|
|
43
|
+
| --- | --- | --- | --- |
|
|
44
|
+
| `--bg` | `pt:badge` | `BbBadge` | pill fill |
|
|
45
|
+
| `--fg` | `pt:badge` | `BbBadge` | label, icons and the clear glyph |
|
|
46
|
+
| `--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. |
|
|
47
|
+
| `--ring-color` | `pt:badge` | `BbBadge` | focus ring colour, per variant |
|
|
48
|
+
| `--ring-size` | `pt:badge` | `BbBadge` | focus ring width |
|
|
49
|
+
| `--min-size-md` | `pt:badge` | `BbBadge` | 18px at the default |
|
|
50
|
+
| `--min-size` | `pt:badge` | `BbBadge` | pill min height and min width |
|
|
51
|
+
| `--elev` | `pt:badge` | `BbBadge` | Resting lift. Invisible while `--bb-elev` is its default transparent layer. A chip is small enough that a theme wanting a different lift here than on a button sets `--elev` on this class. |
|
|
52
|
+
| `--r` | `pt:badge` | `BbBadge` | Pill corners; the body and trailing wrappers round their outer edges to match |
|
|
53
|
+
| `--fs` | `pt:badge` | `BbBadge` | 12px at the default (Q49.25) |
|
|
54
|
+
| `--icon-size` | `pt:badge` | `BbBadge` | leading/append icons (passed to BbIcon as --size) |
|
|
55
|
+
| `--gap` | `pt:badge` | `BbBadge` | space between label, icons and the trailing side |
|
|
56
|
+
| `--px` | `pt:badge` | `BbBadge` | base side padding; the modifiers below scale it per side |
|
|
57
|
+
| `--clear-size` | `pt:badge` | `BbBadge` | clear button's glyph box (the circle painted on hover is 2px smaller) |
|
|
58
|
+
| `--pad-left` | `pt:badge` | `BbBadge` | Side-owned padding: the body and trailing wrappers carry the pill's inline padding (and its radius) so their hit areas run flush to the border. The modifiers below retune these vars instead of the pill's own padding. |
|
|
59
|
+
| `--bg` | `pt:box` | `CommonFieldInput` | the shell's fill |
|
|
60
|
+
| `--bg-hover` | `pt:box` | `CommonFieldInput` | fill under the pointer |
|
|
61
|
+
| `--bg-focus` | `pt:box` | `CommonFieldInput` | fill while focus is inside, and under --active |
|
|
62
|
+
| `--bg-disabled` | `pt:box` | `CommonFieldInput` | fill while disabled; beats hover and focus |
|
|
63
|
+
| `--border-color` | `pt:box` | `CommonFieldInput` | The resting border, at the fixed --bb-border-w. Errors and warnings paint their frame over it, so `pt:box="[--border-color:…]"` recolours the rest without hiding the state; a plain `border-*` utility on the base pt:box would hide it (ESLint `no-box-border-color`). |
|
|
64
|
+
| `--border-focus` | `pt:box` | `CommonFieldInput` | frame while focused, or --active |
|
|
65
|
+
| `--ring-size` | `pt:box` | `CommonFieldInput` | ring width; 0 is a variant declining the ring |
|
|
66
|
+
| `--ring-color` | `pt:box` | `CommonFieldInput` | ring colour; state owns it, not variants |
|
|
67
|
+
| `--elev` | `pt:box` | `CommonFieldInput` | Resting lift, composed UNDER the ring at every box-shadow site below. `0 0 0 0 transparent` and not `none`, so the shadow list keeps a constant length and stays interpolable whatever a variant assigns — the same reason `--bb-elev` itself ships that value. |
|
|
68
|
+
| `--frost` | `pt:box` | `CommonFieldInput` | Plate frost — a full `backdrop-filter` value (see --bb-surface-filter). Routed through a local rather than read from the token directly, so a chrome-less variant can decline it: frosting a ghost field gives it the plate it is contractually not supposed to have. |
|
|
69
|
+
| `--inside-label-clearance` | `pt:box`, `pt:prefix`, `pt:suffix` | `CommonFieldInput` | Height and top padding added above the text for a label rendered inside the box. Zero here; the `--inside-label` rules at the bottom of this file raise it to one label line, or two with a description. |
|
|
70
|
+
| `--w` | `pt:icon` | `BbIcon` | `--w` is set inline by BbIcon from the size prop. The `initial` default seals it: without it an ancestor's `--w` (e.g. a dropdown's width bridge) would inherit in and size the icon. The `--size` indirection stays so higher-specificity rules (e.g. `.bb-badge .bb-icon`) can re-point it. |
|
|
71
|
+
|
|
11
72
|
## Usage & Guidelines
|
|
12
73
|
|
|
13
74
|
### When to use
|
|
@@ -32,6 +93,20 @@ Prefer a sibling when the shape is simpler:
|
|
|
32
93
|
|
|
33
94
|
### Map options with `item-text` and `item-value`
|
|
34
95
|
|
|
96
|
+
**Object items need `item-text`.** Without it each label is
|
|
97
|
+
`JSON.stringify(item)`, and without `item-value` the whole object is the value.
|
|
98
|
+
`{ label, value }` items take both:
|
|
99
|
+
|
|
100
|
+
```vue
|
|
101
|
+
<BbSelect
|
|
102
|
+
v-model="plan"
|
|
103
|
+
label="Plan"
|
|
104
|
+
:items="plans"
|
|
105
|
+
item-text="label"
|
|
106
|
+
item-value="value"
|
|
107
|
+
/>
|
|
108
|
+
```
|
|
109
|
+
|
|
35
110
|
Pass your domain objects to `items` **as they are** and tell the component which
|
|
36
111
|
field is the display text and which is the stored value with `item-text` /
|
|
37
112
|
`item-value` (dot-paths or extractor functions). Never pre-map `items` into
|
|
@@ -43,12 +118,12 @@ object.
|
|
|
43
118
|
|
|
44
119
|
```vue
|
|
45
120
|
<template>
|
|
46
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
121
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
47
122
|
<div class="flex items-baseline justify-between gap-2">
|
|
48
123
|
<h3 class="text-sm font-medium">ISSUE-1842</h3>
|
|
49
|
-
<span class="text-xs text-
|
|
124
|
+
<span class="text-xs text-(--bb-text-muted)">In progress</span>
|
|
50
125
|
</div>
|
|
51
|
-
<p class="text-xs text-
|
|
126
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
52
127
|
Wire invoice PDF export for the Milan office.
|
|
53
128
|
</p>
|
|
54
129
|
<BbSelect
|
|
@@ -103,6 +178,175 @@ Options and Items playbook):
|
|
|
103
178
|
the predicate. Alternatives: filter unavailable choices out of `items`, cap
|
|
104
179
|
with `max`, or disable the whole control with `disabled`.
|
|
105
180
|
|
|
181
|
+
#### Additional row fields: `item-props`
|
|
182
|
+
|
|
183
|
+
`item-text` and `item-value` are the option's label and identity. Anything
|
|
184
|
+
**additional** about a row comes from `item-props`. Select options accept three
|
|
185
|
+
fields:
|
|
186
|
+
|
|
187
|
+
- `description` — a muted line **under** the label (a user's email under their
|
|
188
|
+
name).
|
|
189
|
+
- `prepend:icon` — an icon before the label.
|
|
190
|
+
- `append:icon` — an icon after the label. On the selected row the check takes
|
|
191
|
+
its place.
|
|
192
|
+
|
|
193
|
+
```vue
|
|
194
|
+
<BbSelect
|
|
195
|
+
v-model="ownerId"
|
|
196
|
+
:items="users"
|
|
197
|
+
item-text="name"
|
|
198
|
+
item-value="id"
|
|
199
|
+
:item-props="{ description: 'email', 'prepend:icon': 'avatarIcon' }"
|
|
200
|
+
label="Owner"
|
|
201
|
+
/>
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Owner with description, icons and a selectable gate**
|
|
205
|
+
|
|
206
|
+
```vue
|
|
207
|
+
<template>
|
|
208
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
209
|
+
<BbSelect
|
|
210
|
+
v-model="ownerId"
|
|
211
|
+
:item-props="{
|
|
212
|
+
description: 'email',
|
|
213
|
+
'prepend:icon': 'roleIcon',
|
|
214
|
+
'append:icon': (user: User) =>
|
|
215
|
+
user.external ? 'lucide:external-link' : undefined,
|
|
216
|
+
}"
|
|
217
|
+
item-text="name"
|
|
218
|
+
item-value="id"
|
|
219
|
+
:items="users"
|
|
220
|
+
label="Owner"
|
|
221
|
+
:selectable="(user: User) => user.active"
|
|
222
|
+
/>
|
|
223
|
+
<p class="owner-summary text-xs text-(--bb-text-muted)">
|
|
224
|
+
Owner id: {{ ownerId ?? 'none' }}
|
|
225
|
+
</p>
|
|
226
|
+
</div>
|
|
227
|
+
</template>
|
|
228
|
+
<script setup lang="ts">
|
|
229
|
+
import { ref } from 'vue';
|
|
230
|
+
import { BbSelect } from 'bitboss-ui';
|
|
231
|
+
|
|
232
|
+
type User = {
|
|
233
|
+
id: number;
|
|
234
|
+
name: string;
|
|
235
|
+
email: string;
|
|
236
|
+
roleIcon: string;
|
|
237
|
+
external: boolean;
|
|
238
|
+
active: boolean;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
// Select options take three additional fields:
|
|
242
|
+
// - `description`: every row becomes two lines tall and the text ellipsizes on
|
|
243
|
+
// one line (the list is virtualized, so row height is fixed);
|
|
244
|
+
// - `prepend:icon` before the label;
|
|
245
|
+
// - `append:icon` after it — the selection check takes its place on the
|
|
246
|
+
// selected row.
|
|
247
|
+
// Disabling a row is `selectable`'s job, not an `item-props` field: Grace is
|
|
248
|
+
// inactive, so her row renders disabled.
|
|
249
|
+
const users: User[] = [
|
|
250
|
+
{
|
|
251
|
+
id: 1,
|
|
252
|
+
name: 'Ada Lovelace',
|
|
253
|
+
email: 'ada@example.com',
|
|
254
|
+
roleIcon: 'lucide:shield',
|
|
255
|
+
external: false,
|
|
256
|
+
active: true,
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
id: 2,
|
|
260
|
+
name: 'Grace Hopper',
|
|
261
|
+
email: 'grace@navy.example.com',
|
|
262
|
+
roleIcon: 'lucide:user',
|
|
263
|
+
external: true,
|
|
264
|
+
active: false,
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
id: 3,
|
|
268
|
+
name: 'Margaret Hamilton',
|
|
269
|
+
email: 'margaret.hamilton@apollo-guidance.example.com',
|
|
270
|
+
roleIcon: 'lucide:user',
|
|
271
|
+
external: true,
|
|
272
|
+
active: true,
|
|
273
|
+
},
|
|
274
|
+
];
|
|
275
|
+
|
|
276
|
+
const ownerId = ref<number | null>(1);
|
|
277
|
+
</script>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
**Grouped reviewers, function form and a custom option**
|
|
281
|
+
|
|
282
|
+
```vue
|
|
283
|
+
<template>
|
|
284
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
285
|
+
<BbSelect
|
|
286
|
+
v-model="reviewers"
|
|
287
|
+
group-by="team"
|
|
288
|
+
:item-props="(person: Person) => ({ description: person.focus })"
|
|
289
|
+
item-text="name"
|
|
290
|
+
item-value="id"
|
|
291
|
+
:items="people"
|
|
292
|
+
label="Reviewers"
|
|
293
|
+
multiple
|
|
294
|
+
>
|
|
295
|
+
<!-- A custom `#option` replaces only the label; it receives
|
|
296
|
+
`description` and renders it however it likes. -->
|
|
297
|
+
<template #option="{ text, description }">
|
|
298
|
+
<span class="min-w-0 flex-1 truncate">
|
|
299
|
+
<strong>{{ text }}</strong>
|
|
300
|
+
<span v-if="description" class="text-(--bb-text-muted)">
|
|
301
|
+
· {{ description }}</span
|
|
302
|
+
>
|
|
303
|
+
</span>
|
|
304
|
+
</template>
|
|
305
|
+
</BbSelect>
|
|
306
|
+
<p class="reviewers-summary text-xs text-(--bb-text-muted)">
|
|
307
|
+
{{ reviewers.length }} reviewer{{ reviewers.length === 1 ? '' : 's' }}
|
|
308
|
+
</p>
|
|
309
|
+
</div>
|
|
310
|
+
</template>
|
|
311
|
+
<script setup lang="ts">
|
|
312
|
+
import { ref } from 'vue';
|
|
313
|
+
import { BbSelect } from 'bitboss-ui';
|
|
314
|
+
|
|
315
|
+
type Person = { id: string; name: string; team: string; focus?: string };
|
|
316
|
+
|
|
317
|
+
// With the FUNCTION form the select cannot know up front whether rows need a
|
|
318
|
+
// second line, so it asks: any option returning a description makes every row
|
|
319
|
+
// two lines tall. Search matches the description too ("payments" finds Leo).
|
|
320
|
+
const people: Person[] = [
|
|
321
|
+
{ id: 'sofia', name: 'Sofia Esposito', team: 'Platform', focus: 'Infra' },
|
|
322
|
+
{ id: 'marco', name: 'Marco Bianchi', team: 'Platform' },
|
|
323
|
+
{ id: 'aisha', name: 'Aisha Khan', team: 'Product', focus: 'Design systems' },
|
|
324
|
+
{ id: 'leo', name: 'Leo Rossi', team: 'Product', focus: 'Payments' },
|
|
325
|
+
];
|
|
326
|
+
|
|
327
|
+
const reviewers = ref<string[]>([]);
|
|
328
|
+
</script>
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
Each field takes a dot-path or a getter; or pass one function that returns the
|
|
332
|
+
fields: `:item-props="(user) => ({ description: user.email })"`.
|
|
333
|
+
|
|
334
|
+
- **Only additional fields.** Text and value never go in `item-props`.
|
|
335
|
+
- **Nothing is read implicitly.** Without `item-props` nothing renders, even if
|
|
336
|
+
your items carry `description` or icon fields. An empty value renders nothing
|
|
337
|
+
for that option.
|
|
338
|
+
- **Descriptions make every row two lines tall** (the list is virtualized, so
|
|
339
|
+
row height is fixed) and stay on **one line**, cut with an ellipsis. With the
|
|
340
|
+
object form the component sees `description` up front; with the function form
|
|
341
|
+
it checks whether any option returns one.
|
|
342
|
+
- The description is announced as the option's description, never part of its
|
|
343
|
+
name, and the search matches it along with the text when `filter-by` is empty.
|
|
344
|
+
- Nothing from `item-props` appears in the trigger or the chips. A custom
|
|
345
|
+
`#option` slot replaces only the label and receives `description`; the icons
|
|
346
|
+
stay around it.
|
|
347
|
+
- **Disabling individual options is `selectable`'s job** —
|
|
348
|
+
`:selectable="(user) => user.active"` — not a field in `item-props`.
|
|
349
|
+
|
|
106
350
|
### The field around the control
|
|
107
351
|
|
|
108
352
|
`BbSelect` is a complete form field. Everything here is declarative — no custom
|
|
@@ -122,15 +366,19 @@ markup needed:
|
|
|
122
366
|
and referenced from `aria-describedby` while displayed — in
|
|
123
367
|
amber (`--bb-text-warn`), with a warning icon in the append stack, for a
|
|
124
368
|
valid-but-noteworthy selection; a non-empty `warnings` implies the warning
|
|
125
|
-
state, so `has-
|
|
369
|
+
state, so `has-warnings` just forces that chrome without a message. Unlike
|
|
126
370
|
`errors` it sets no `aria-invalid` — a soft "needs a second look" state. When
|
|
127
371
|
both are set the error state wins and the warning messages are suppressed, so
|
|
128
372
|
the field never shows amber while it has an error.
|
|
129
373
|
- **Form participation**: `name` renders hidden inputs carrying the selection
|
|
130
374
|
(one per value; non-string values are JSON-stringified), so the select posts
|
|
131
|
-
in a plain HTML form
|
|
132
|
-
|
|
133
|
-
the
|
|
375
|
+
in a plain HTML form. **`required` does NOT give you native constraint
|
|
376
|
+
validation**: the HTML spec bars `required` on `input[type=hidden]` from
|
|
377
|
+
constraint validation, so the browser will never block submission on an empty
|
|
378
|
+
select (`BbSelect.vue` says so where it builds them). `required` is kept
|
|
379
|
+
for form introspection and for the asterisk. Gate submission with `errors` /
|
|
380
|
+
`has-errors`, or with the validated entrypoint. `autocomplete` / `autofocus`
|
|
381
|
+
forward to the control.
|
|
134
382
|
- **Affixes**: `prepend:icon` / `append:icon` place icons in the control —
|
|
135
383
|
`append:icon` replaces the default chevron (there is no `#chevron` slot).
|
|
136
384
|
- **Value display**: `placeholder` shows when a _single-mode_ select is empty.
|
|
@@ -194,10 +442,10 @@ model to `[]` (or `null` in single mode).
|
|
|
194
442
|
|
|
195
443
|
```vue
|
|
196
444
|
<template>
|
|
197
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
445
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
198
446
|
<div>
|
|
199
447
|
<h3 class="text-sm font-medium">Warehouse coverage</h3>
|
|
200
|
-
<p class="text-xs text-
|
|
448
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
201
449
|
Cap at 3 hubs for the pilot route.
|
|
202
450
|
</p>
|
|
203
451
|
</div>
|
|
@@ -237,12 +485,10 @@ const cities = ref<string[]>(['ber', 'mil']);
|
|
|
237
485
|
|
|
238
486
|
```vue
|
|
239
487
|
<template>
|
|
240
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
488
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
241
489
|
<div>
|
|
242
490
|
<h3 class="text-sm font-medium">Email digests</h3>
|
|
243
|
-
<p class="text-xs text-
|
|
244
|
-
Who gets the Monday summary?
|
|
245
|
-
</p>
|
|
491
|
+
<p class="text-xs text-(--bb-text-muted)">Who gets the Monday summary?</p>
|
|
246
492
|
</div>
|
|
247
493
|
<BbSelect
|
|
248
494
|
v-model="recipients"
|
|
@@ -289,10 +535,10 @@ v-model is yours:
|
|
|
289
535
|
|
|
290
536
|
```vue
|
|
291
537
|
<template>
|
|
292
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
538
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
293
539
|
<div>
|
|
294
540
|
<h3 class="text-sm font-medium">Incident alerts</h3>
|
|
295
|
-
<p class="text-xs text-
|
|
541
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
296
542
|
Where should paging go when severity is high?
|
|
297
543
|
</p>
|
|
298
544
|
</div>
|
|
@@ -348,10 +594,10 @@ is yours:
|
|
|
348
594
|
|
|
349
595
|
```vue
|
|
350
596
|
<template>
|
|
351
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
597
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
352
598
|
<div>
|
|
353
599
|
<h3 class="text-sm font-medium">Lisbon half-day</h3>
|
|
354
|
-
<p class="text-xs text-
|
|
600
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
355
601
|
Build a route under about four hours.
|
|
356
602
|
</p>
|
|
357
603
|
</div>
|
|
@@ -368,7 +614,7 @@ is yours:
|
|
|
368
614
|
>
|
|
369
615
|
<template #header="{ clear }">
|
|
370
616
|
<div
|
|
371
|
-
class="flex w-full items-center justify-between gap-2 px-1 text-xs text-
|
|
617
|
+
class="flex w-full items-center justify-between gap-2 px-1 text-xs text-(--bb-text-muted)"
|
|
372
618
|
>
|
|
373
619
|
<span>{{ summary }}</span>
|
|
374
620
|
<BbButton
|
|
@@ -440,15 +686,29 @@ on your setup:
|
|
|
440
686
|
`'mobile'` / `'desktop'` to remove it on one platform only) — this is also
|
|
441
687
|
the supported way to disable filtering; there is no "falsy `filter-by`"
|
|
442
688
|
escape hatch.
|
|
689
|
+
- **`disable-writing="auto"` — what an unset prop means**: the field is
|
|
690
|
+
removed when an **array** `items` renders fewer options than the plugin's
|
|
691
|
+
`autoDisableWritingThreshold` (default `6`) — five statuses are quicker to
|
|
692
|
+
scan than to filter. The count is the array's: disabled options count, group
|
|
693
|
+
headers don't (a grouped array counts its options). It is decided when the
|
|
694
|
+
panel **opens** and held until it closes, so a list that crosses the
|
|
695
|
+
threshold while open never swaps the field under the user; the next open
|
|
696
|
+
re-decides. It never applies to a **provider** `items` (its size is unknown
|
|
697
|
+
until it answers), and never when you listen to **`option:add`** — a
|
|
698
|
+
creatable select keeps its field however short the list. An explicit
|
|
699
|
+
`disable-writing` on the instance — any value, the valueless shorthand
|
|
700
|
+
included — always wins. The threshold is the only global knob: set
|
|
701
|
+
`autoDisableWritingThreshold: 0` in the plugin to keep every search field;
|
|
702
|
+
there is deliberately no option that hides them all.
|
|
443
703
|
|
|
444
704
|
**Match on fields other than the display text**
|
|
445
705
|
|
|
446
706
|
```vue
|
|
447
707
|
<template>
|
|
448
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
708
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
449
709
|
<div>
|
|
450
710
|
<h3 class="text-sm font-medium">Shipping destination</h3>
|
|
451
|
-
<p class="text-xs text-
|
|
711
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
452
712
|
Search by city or country name.
|
|
453
713
|
</p>
|
|
454
714
|
</div>
|
|
@@ -503,10 +763,10 @@ short version:
|
|
|
503
763
|
|
|
504
764
|
```vue
|
|
505
765
|
<template>
|
|
506
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
766
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
507
767
|
<div>
|
|
508
768
|
<h3 class="text-sm font-medium">Pull request reviewers</h3>
|
|
509
|
-
<p class="text-xs text-
|
|
769
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
510
770
|
Search the directory; picks stay pinned.
|
|
511
771
|
</p>
|
|
512
772
|
</div>
|
|
@@ -514,6 +774,7 @@ short version:
|
|
|
514
774
|
v-model="reviewers"
|
|
515
775
|
clearable
|
|
516
776
|
compact
|
|
777
|
+
empty-text="No members match your search"
|
|
517
778
|
hint="Type a name to search"
|
|
518
779
|
item-text="name"
|
|
519
780
|
item-value="id"
|
|
@@ -521,7 +782,6 @@ short version:
|
|
|
521
782
|
label="Reviewers"
|
|
522
783
|
loading-text="Searching…"
|
|
523
784
|
multiple
|
|
524
|
-
no-data-text="No members match your search"
|
|
525
785
|
persistent-hint
|
|
526
786
|
:query-debounce-time="300"
|
|
527
787
|
stash
|
|
@@ -596,9 +856,9 @@ Runtime guarantees you should not re-implement:
|
|
|
596
856
|
- **Errors**: a rejected provider is logged (`console.error`) and the previous
|
|
597
857
|
items are kept; surface failures yourself (e.g. `useToast`) if the user must
|
|
598
858
|
know.
|
|
599
|
-
- **Panel states**: `loading-text` / `
|
|
600
|
-
"Loading..." / "No data to display") or the `#loading` / `#
|
|
601
|
-
both receive `{ query }`, `#
|
|
859
|
+
- **Panel states**: `loading-text` / `empty-text` (locale defaults
|
|
860
|
+
"Loading..." / "No data to display") or the `#loading` / `#empty` slots —
|
|
861
|
+
both receive `{ query }`, `#empty` also a `focus()` callback.
|
|
602
862
|
|
|
603
863
|
Enable `stash` to accumulate picked options across searches: selected values
|
|
604
864
|
stay resolvable (chips keep their text, coherence keeps passing) even when
|
|
@@ -609,8 +869,10 @@ later responses don't include them — no need to merge them into every response
|
|
|
609
869
|
`prefill` controls **when the first load happens**:
|
|
610
870
|
|
|
611
871
|
- `'interaction'` (default) — on the first open.
|
|
612
|
-
- `true` — immediately on mount, and during SSR
|
|
613
|
-
|
|
872
|
+
- `true` — immediately on mount, and during SSR **on hosts that can carry the
|
|
873
|
+
result to the client** (Nuxt does; see
|
|
874
|
+
[SSR prefill](./guides/ssr-prefill.md)), so the panel is warm on hydration.
|
|
875
|
+
Everywhere else the load happens on the client, right after mount.
|
|
614
876
|
- `false` — **search-first**: nothing loads until the user types. Opening is not
|
|
615
877
|
a search, so the panel opens empty and shows a _"search to begin"_ hint until
|
|
616
878
|
the first query. Use it when the result set is too big or too costly to browse
|
|
@@ -659,10 +921,10 @@ options to look, so you have to say so:
|
|
|
659
921
|
|
|
660
922
|
```vue
|
|
661
923
|
<template>
|
|
662
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
924
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
663
925
|
<div>
|
|
664
926
|
<h3 class="text-sm font-medium">Invoice filters</h3>
|
|
665
|
-
<p class="text-xs text-
|
|
927
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
666
928
|
Office location, or every office.
|
|
667
929
|
</p>
|
|
668
930
|
</div>
|
|
@@ -676,7 +938,7 @@ options to look, so you have to say so:
|
|
|
676
938
|
placeholder="Select location…"
|
|
677
939
|
prefill
|
|
678
940
|
/>
|
|
679
|
-
<p class="text-xs text-
|
|
941
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
680
942
|
Filtering by:
|
|
681
943
|
<strong>{{ location === null ? 'All locations' : location }}</strong>
|
|
682
944
|
</p>
|
|
@@ -770,10 +1032,10 @@ cleaned up automatically. Details in the Coherence playbook.
|
|
|
770
1032
|
|
|
771
1033
|
```vue
|
|
772
1034
|
<template>
|
|
773
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
1035
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
774
1036
|
<div>
|
|
775
1037
|
<h3 class="text-sm font-medium">Shipping address</h3>
|
|
776
|
-
<p class="text-xs text-
|
|
1038
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
777
1039
|
City options follow the chosen region.
|
|
778
1040
|
</p>
|
|
779
1041
|
</div>
|
|
@@ -858,10 +1120,10 @@ no watcher, no manual reset:
|
|
|
858
1120
|
|
|
859
1121
|
```vue
|
|
860
1122
|
<template>
|
|
861
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
1123
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
862
1124
|
<div>
|
|
863
1125
|
<h3 class="text-sm font-medium">Review request</h3>
|
|
864
|
-
<p class="text-xs text-
|
|
1126
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
865
1127
|
Reviewers must belong to the selected project.
|
|
866
1128
|
</p>
|
|
867
1129
|
</div>
|
|
@@ -947,10 +1209,10 @@ This is the idiomatic pattern for closed-but-growable vocabularies.
|
|
|
947
1209
|
|
|
948
1210
|
```vue
|
|
949
1211
|
<template>
|
|
950
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
1212
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
951
1213
|
<div>
|
|
952
1214
|
<h3 class="text-sm font-medium">Issue labels</h3>
|
|
953
|
-
<p class="text-xs text-
|
|
1215
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
954
1216
|
Add from the list, or invent one with Enter.
|
|
955
1217
|
</p>
|
|
956
1218
|
</div>
|
|
@@ -958,12 +1220,12 @@ This is the idiomatic pattern for closed-but-growable vocabularies.
|
|
|
958
1220
|
v-model="labels"
|
|
959
1221
|
clearable
|
|
960
1222
|
compact
|
|
1223
|
+
empty-text="No matching label — press Enter to create it"
|
|
961
1224
|
item-text="name"
|
|
962
1225
|
item-value="id"
|
|
963
1226
|
:items="available"
|
|
964
1227
|
label="Labels"
|
|
965
1228
|
multiple
|
|
966
|
-
no-data-text="No matching label — press Enter to create it"
|
|
967
1229
|
@option:add="createLabel"
|
|
968
1230
|
/>
|
|
969
1231
|
</div>
|
|
@@ -1018,12 +1280,10 @@ lists window per row) or pre-chunk the data into smaller groups.
|
|
|
1018
1280
|
|
|
1019
1281
|
```vue
|
|
1020
1282
|
<template>
|
|
1021
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
1283
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
1022
1284
|
<div>
|
|
1023
1285
|
<h3 class="text-sm font-medium">Invite teammate</h3>
|
|
1024
|
-
<p class="text-xs text-
|
|
1025
|
-
Roles grouped by department.
|
|
1026
|
-
</p>
|
|
1286
|
+
<p class="text-xs text-(--bb-text-muted)">Roles grouped by department.</p>
|
|
1027
1287
|
</div>
|
|
1028
1288
|
<BbSelect
|
|
1029
1289
|
v-model="role"
|
|
@@ -1038,7 +1298,7 @@ lists window per row) or pre-chunk the data into smaller groups.
|
|
|
1038
1298
|
>
|
|
1039
1299
|
<template #group="{ text, length }">
|
|
1040
1300
|
<div
|
|
1041
|
-
class="flex items-center justify-between px-2 text-xs font-semibold text-
|
|
1301
|
+
class="flex items-center justify-between px-2 text-xs font-semibold text-(--bb-text-muted)"
|
|
1042
1302
|
>
|
|
1043
1303
|
<span>{{ text }}</span>
|
|
1044
1304
|
<span>{{ length }}</span>
|
|
@@ -1068,10 +1328,12 @@ const role = ref<string | null>(null);
|
|
|
1068
1328
|
|
|
1069
1329
|
### Custom option rows
|
|
1070
1330
|
|
|
1071
|
-
The `#option` slot replaces the
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1331
|
+
The `#option` slot replaces the row's **text** — use it for avatars, secondary
|
|
1332
|
+
text or metadata. It exposes the raw `item`, the resolved `text` and `value`,
|
|
1333
|
+
plus `selected` / `focused` / `disabled` / `loading` / `hasErrors` flags and the
|
|
1334
|
+
row `index`. The selection check is not yours to redraw: it renders outside the
|
|
1335
|
+
slot, so a custom row keeps it (`selected` is there for rows that want to show
|
|
1336
|
+
the state some _other_ way, not for drawing a second check). Rows are fixed-height (the list is virtualized): if
|
|
1075
1337
|
your markup is taller than the default 28px (24px compact; 44px / 36px inside
|
|
1076
1338
|
the adaptive sheet), set `item-height` to match — and `header-height` for
|
|
1077
1339
|
grouped headers (defaults 32px / 24px compact; 36px / 32px in the sheet). The
|
|
@@ -1084,10 +1346,10 @@ compact control, so it keeps the compact rows on every device — turning
|
|
|
1084
1346
|
|
|
1085
1347
|
```vue
|
|
1086
1348
|
<template>
|
|
1087
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
1349
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
1088
1350
|
<div class="flex items-baseline justify-between gap-2">
|
|
1089
1351
|
<h3 class="text-sm font-medium">Code review</h3>
|
|
1090
|
-
<span class="text-xs text-
|
|
1352
|
+
<span class="text-xs text-(--bb-text-muted)">PR #842</span>
|
|
1091
1353
|
</div>
|
|
1092
1354
|
<BbSelect
|
|
1093
1355
|
v-model="assignee"
|
|
@@ -1102,7 +1364,7 @@ compact control, so it keeps the compact rows on every device — turning
|
|
|
1102
1364
|
<span class="flex w-full items-center gap-2">
|
|
1103
1365
|
<BbAvatar :alt="text" size="32">{{ item.initials }}</BbAvatar>
|
|
1104
1366
|
<span class="min-w-0 flex-1 truncate">{{ text }}</span>
|
|
1105
|
-
<span class="shrink-0 text-xs text-
|
|
1367
|
+
<span class="shrink-0 text-xs text-(--bb-text-muted)">{{
|
|
1106
1368
|
item.role
|
|
1107
1369
|
}}</span>
|
|
1108
1370
|
</span>
|
|
@@ -1148,16 +1410,96 @@ const assignee = ref<string | null>(null);
|
|
|
1148
1410
|
</script>
|
|
1149
1411
|
```
|
|
1150
1412
|
|
|
1413
|
+
### Custom chips
|
|
1414
|
+
|
|
1415
|
+
In `multiple` mode each selection renders as a badge. The `#chip` slot replaces
|
|
1416
|
+
that badge outright — a colored label, an avatar plus a name, anything — and
|
|
1417
|
+
receives `{ item, text, value, disabled, deselect }`. `item` is the raw entry
|
|
1418
|
+
from `items` (where a per-selection color or avatar lives), `disabled` is `true`
|
|
1419
|
+
while the control is `disabled` or `readonly` (render no remove affordance —
|
|
1420
|
+
`deselect` refuses anyway), and `deselect` drops just this value from the model.
|
|
1421
|
+
|
|
1422
|
+
Custom chips need none of the library's class names: the chips row supplies the
|
|
1423
|
+
spacing and keeps them from shrinking. The slot is not called in `comma` mode
|
|
1424
|
+
(there are no chips to replace) nor for the collapsed "+N" summary that appears
|
|
1425
|
+
once the chips outgrow the field — keep chips compact, or raise
|
|
1426
|
+
`max-selected-labels`.
|
|
1427
|
+
|
|
1428
|
+
**Labels as colored chips**
|
|
1429
|
+
|
|
1430
|
+
```vue
|
|
1431
|
+
<template>
|
|
1432
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-3">
|
|
1433
|
+
<BbSelect
|
|
1434
|
+
v-model="tags"
|
|
1435
|
+
clearable
|
|
1436
|
+
item-text="label"
|
|
1437
|
+
item-value="value"
|
|
1438
|
+
:items="tagItems"
|
|
1439
|
+
label="Labels"
|
|
1440
|
+
multiple
|
|
1441
|
+
placeholder="Add labels"
|
|
1442
|
+
>
|
|
1443
|
+
<template #option="{ item, text }">
|
|
1444
|
+
<span class="flex w-full items-center gap-2">
|
|
1445
|
+
<span
|
|
1446
|
+
class="size-2 shrink-0 rounded-full"
|
|
1447
|
+
:style="{ background: item.color }"
|
|
1448
|
+
></span>
|
|
1449
|
+
<span class="min-w-0 flex-1 truncate">{{ text }}</span>
|
|
1450
|
+
</span>
|
|
1451
|
+
</template>
|
|
1452
|
+
<!-- The chip slot replaces the default badge for each selection. It
|
|
1453
|
+
hands over the raw `item` (here: the label's own color), the resolved
|
|
1454
|
+
`text` / `value`, a `disabled` flag that is true while the control is
|
|
1455
|
+
disabled or readonly, and `deselect` — which drops just this value. -->
|
|
1456
|
+
<template #chip="{ item, text, disabled, deselect }">
|
|
1457
|
+
<BbBadge
|
|
1458
|
+
:clearable="!disabled"
|
|
1459
|
+
size="lg"
|
|
1460
|
+
:style="{
|
|
1461
|
+
'--bg': `color-mix(in oklab, ${item.color} 15%, transparent)`,
|
|
1462
|
+
'--fg': 'var(--bb-text)',
|
|
1463
|
+
}"
|
|
1464
|
+
@click:clear="deselect"
|
|
1465
|
+
>
|
|
1466
|
+
<span
|
|
1467
|
+
class="size-2 rounded-full"
|
|
1468
|
+
:style="{ background: item.color }"
|
|
1469
|
+
></span>
|
|
1470
|
+
{{ text }}
|
|
1471
|
+
</BbBadge>
|
|
1472
|
+
</template>
|
|
1473
|
+
</BbSelect>
|
|
1474
|
+
</div>
|
|
1475
|
+
</template>
|
|
1476
|
+
<script setup lang="ts">
|
|
1477
|
+
import { ref } from 'vue';
|
|
1478
|
+
import { BbBadge, BbSelect } from 'bitboss-ui';
|
|
1479
|
+
|
|
1480
|
+
type Label = { label: string; value: string; color: string };
|
|
1481
|
+
|
|
1482
|
+
const tagItems: Label[] = [
|
|
1483
|
+
{ label: 'Bug', value: 'bug', color: '#ef4444' },
|
|
1484
|
+
{ label: 'Enhancement', value: 'enhancement', color: '#0ea5e9' },
|
|
1485
|
+
{ label: 'Documentation', value: 'documentation', color: '#8b5cf6' },
|
|
1486
|
+
{ label: 'Good first issue', value: 'good-first-issue', color: '#22c55e' },
|
|
1487
|
+
];
|
|
1488
|
+
|
|
1489
|
+
const tags = ref<string[]>(['bug']);
|
|
1490
|
+
</script>
|
|
1491
|
+
```
|
|
1492
|
+
|
|
1151
1493
|
### Slots around the input
|
|
1152
1494
|
|
|
1153
1495
|
Beyond the panel slots, the field itself is extensible:
|
|
1154
1496
|
|
|
1155
|
-
- `#label` replaces the label text; receives `{ text, hasErrors }`.
|
|
1497
|
+
- `#label` replaces the label text; receives `{ text, hasErrors, hasWarnings }`.
|
|
1156
1498
|
- `#prefix` / `#suffix` render inline adornments inside the field (no scope) —
|
|
1157
1499
|
currency symbols, units.
|
|
1158
1500
|
- `#prepend` / `#append` render inside the field wrapper, before/after the
|
|
1159
1501
|
value area; both receive `{ query, focus, close }`.
|
|
1160
|
-
- `#prepend
|
|
1502
|
+
- `#prepend:outer` / `#append:outer` render outside the field wrapper; both
|
|
1161
1503
|
receive `{ query, close }` — e.g. a companion button acting on the field.
|
|
1162
1504
|
|
|
1163
1505
|
Prefer the icon props (`prepend:icon` / `append:icon`) over slots when an icon
|
|
@@ -1172,7 +1514,7 @@ is all you need.
|
|
|
1172
1514
|
- `loading` — external loading state: shows the control spinner and suspends
|
|
1173
1515
|
keyboard opening. Fetch-driven loading is automatic; don't mirror it here.
|
|
1174
1516
|
- `clearable` — clear affix when a value exists; emits `null` / `[]`.
|
|
1175
|
-
- Empty panel — `
|
|
1517
|
+
- Empty panel — `empty-text` or `#empty`.
|
|
1176
1518
|
|
|
1177
1519
|
### Events and v-model
|
|
1178
1520
|
|
|
@@ -1197,6 +1539,13 @@ Shipped behavior — never reimplement it:
|
|
|
1197
1539
|
`aria-activedescendant`); `Enter` confirms the highlighted option — or emits
|
|
1198
1540
|
`option:add` when none is highlighted; `Esc` closes and returns focus to the
|
|
1199
1541
|
control.
|
|
1542
|
+
- `Home` / `End` move the highlight to the first / last option — from the
|
|
1543
|
+
control (opening the panel first when it is closed) and when writing is
|
|
1544
|
+
disabled. In the search field they stay the text caret's keys.
|
|
1545
|
+
- With no search field (`disable-writing`, or `auto` hiding it), typing a
|
|
1546
|
+
letter moves the highlight to the first option starting with it — like a
|
|
1547
|
+
native `<select>`, opening the panel if needed. With a search field, typing
|
|
1548
|
+
filters instead.
|
|
1200
1549
|
- Picking in single mode closes the panel and refocuses the control; in
|
|
1201
1550
|
multiple mode the panel stays open and focus returns to the search field.
|
|
1202
1551
|
- Clicks or focus outside the control and panel close it.
|
|
@@ -1208,10 +1557,18 @@ Shipped behavior — never reimplement it:
|
|
|
1208
1557
|
- `compact` — denser control and panel (24px options, 24px group headers).
|
|
1209
1558
|
- The panel width always matches the control; the control fills its container,
|
|
1210
1559
|
so size it with layout classes on a wrapper (`class="max-w-xs"` etc.).
|
|
1211
|
-
- `
|
|
1212
|
-
library default) — `
|
|
1560
|
+
- `layout` works whenever the resolved label mode is `'outside'` (the
|
|
1561
|
+
library default) — `layout="horizontal"` gives a label-beside-field row.
|
|
1213
1562
|
Only `floating`/`inside` label modes force the vertical layout, since they
|
|
1214
1563
|
embed the label in the field itself.
|
|
1564
|
+
- **A long `placeholder` or a long selected label never widens the control's
|
|
1565
|
+
track.** The trigger is a button, not an `<input>`, so the placeholder is
|
|
1566
|
+
real text rather than a paint-only `::placeholder` — but the field's minimum
|
|
1567
|
+
size is capped so that text cannot become the floor of a grid or flex track.
|
|
1568
|
+
Put a select with a paragraph-length placeholder in
|
|
1569
|
+
`grid-template-columns: repeat(3, 1fr)` and you still get three equal
|
|
1570
|
+
columns, with the text ellipsised inside its field. You do **not** need
|
|
1571
|
+
`min-w-0` on the item or `minmax(0, 1fr)` on the track to get this.
|
|
1215
1572
|
|
|
1216
1573
|
### Adaptive mobile sheet
|
|
1217
1574
|
|
|
@@ -1233,25 +1590,156 @@ swaps popover ↔ sheet.
|
|
|
1233
1590
|
From the vite/nuxt plugin options:
|
|
1234
1591
|
|
|
1235
1592
|
- `config.adaptive` — default for `adaptive` (see above).
|
|
1593
|
+
- `config.autoDisableWritingThreshold` — the option count below which an
|
|
1594
|
+
unset `disable-writing` (`'auto'`) hides the search field (`6`; `0` turns
|
|
1595
|
+
it off). See § Search and filtering semantics.
|
|
1236
1596
|
- `config.mobileMaxWidth` — the viewport threshold for "mobile".
|
|
1237
1597
|
- `config.defaultInputLabelMode` — default `label-mode`.
|
|
1238
1598
|
- `config.locale` — built-in strings: the collapsed-chips summary ("N items
|
|
1239
|
-
selected") and the panel loading/
|
|
1599
|
+
selected") and the panel loading/empty defaults. The library ships 22
|
|
1240
1600
|
built-in dictionaries — see
|
|
1241
1601
|
[Installation and Plugin Setup](./guides/installation-and-plugin-setup.md) §
|
|
1242
1602
|
locale for the full list.
|
|
1243
1603
|
|
|
1244
1604
|
Platform notes:
|
|
1245
1605
|
|
|
1246
|
-
- **SSR / Nuxt**: `prefill: true` providers
|
|
1247
|
-
|
|
1248
|
-
|
|
1606
|
+
- **SSR / Nuxt**: under `bitboss-ui/nuxt`, `prefill: true` providers run in
|
|
1607
|
+
`onServerPrefetch` AND their result travels in the Nuxt payload, so the client
|
|
1608
|
+
hydrates with the options already in hand and never re-requests them. Under any
|
|
1609
|
+
other SSR host the provider does **not** run on the server at all — the server
|
|
1610
|
+
emits the placeholder and the client loads on mount, which keeps hydration
|
|
1611
|
+
clean. Keep providers isomorphic (no `window` access) and have them return
|
|
1612
|
+
plain, serializable rows. See [SSR prefill](./guides/ssr-prefill.md).
|
|
1249
1613
|
- **Plain HTML forms / Inertia form posts**: give the select a `name` — hidden
|
|
1250
1614
|
inputs carry the values (JSON-stringified when not strings), and `required`
|
|
1251
1615
|
participates in native validation.
|
|
1252
1616
|
- The desktop panel is anchored to the control; the mobile sheet manages its
|
|
1253
1617
|
own backdrop, Escape and focus.
|
|
1254
1618
|
|
|
1619
|
+
### Variants
|
|
1620
|
+
|
|
1621
|
+
`variant` picks the field box's look and nothing else — height, padding and
|
|
1622
|
+
border width are identical across variants. `outline` (default) is the raised
|
|
1623
|
+
panel with the neutral border, `secondary` a soft tinted surface with a faint
|
|
1624
|
+
border, and `ghost` draws **no border in any state**: a hover wash is the
|
|
1625
|
+
affordance, the focus ring still shows, and errors or warnings surface through
|
|
1626
|
+
the icon and the message rather than a tinted edge. `ghost` is the inline-edit
|
|
1627
|
+
table cell (`<BbSelect compact hide-label variant="ghost" />`) — no
|
|
1628
|
+
`:deep()` needed. The names and tokens are the `BbButton` ones; extra names
|
|
1629
|
+
register through the plugin's `inputVariants` option. The full ladder is in
|
|
1630
|
+
the `BbTextInput` guide.
|
|
1631
|
+
|
|
1632
|
+
### Restyling with passthrough
|
|
1633
|
+
|
|
1634
|
+
`pt` reaches a named part of the control with a class list — or, in the
|
|
1635
|
+
object form, a style and attributes — optionally only while a state is on.
|
|
1636
|
+
Parts: `root` (the container), `label`, `description`, `message` (the errors / warnings region — one node each, only one ever shows), `hint` (the helper line — shown on focus, or always with `persistent-hint`), `box` (the bordered field box), `activator` (the button that opens the options — BbSelect's control; the text controls call theirs `input`), `input` (the search field in the options surface, when it shows one), `icon` (`prepend:icon` + `append:icon` — a broadcast; the state glyphs are chrome), `spinner` (the spinner shown while `loading`), `prefix`, `suffix`, `clear` (the ✕ that empties the field). Plus `panel` (the options surface you see — the popover's painted bubble on desktop, the sheet itself on a phone), `sheet` (the bottom sheet on a phone only), `option` (one listbox option, a broadcast), `itemText` (that option's label), `itemIcon` (its `itemProps` prepend / append icons — never the field's `icon`) and `itemDescription` (its muted second line from `itemProps.description` — never the field's `description`), all with the option's `selected` / `disabled`; a custom `#option` slot replaces the label and description. With `multiple`, the selected values are `badge` (each chip's `BbBadge` root — not rendered when the `#chip` slot replaces it) or `comma` (each entry in `comma` mode) — the same two words as `BbTag`. The chevron and the clear ✕ are chrome.
|
|
1637
|
+
States: `errors`, `warnings` (never beside errors), `loading`, `disabled`, `readonly`, `hasValue` (written `pt:box:has-value`). Plus `open` (the options surface is showing) and `selected`, resolved per option. A name outside that list is a type error and an
|
|
1638
|
+
ESLint error.
|
|
1639
|
+
|
|
1640
|
+
The assignee field above, restyled through those parts: `pt:activator` is the
|
|
1641
|
+
button that opens the options (the chevron is chrome), `pt:option:selected` resolves per option
|
|
1642
|
+
where the selection is known, `pt:panel` / `pt:panel:open` forward to the
|
|
1643
|
+
popover (the sheet on mobile).
|
|
1644
|
+
|
|
1645
|
+
Every one of the per-value parts — `option`, `itemText`, `itemIcon`,
|
|
1646
|
+
`itemDescription`, `badge`, `comma` — also takes a **per-item function**,
|
|
1647
|
+
called with that value's raw item and every state as a boolean:
|
|
1648
|
+
`:pt:badge="({ item }) => item.role === 'owner' && 'font-semibold'"`.
|
|
1649
|
+
|
|
1650
|
+
**pt:activator / pt:option:selected / pt:panel — issue assignee**
|
|
1651
|
+
|
|
1652
|
+
```vue
|
|
1653
|
+
<template>
|
|
1654
|
+
<div
|
|
1655
|
+
class="grid max-w-sm gap-3 rounded-(--bb-radius) border border-(--bb-border) p-3"
|
|
1656
|
+
>
|
|
1657
|
+
<div class="flex items-baseline justify-between gap-2">
|
|
1658
|
+
<h3 class="text-sm font-medium">ISSUE-1842</h3>
|
|
1659
|
+
<span class="text-xs text-(--bb-text-muted)">In progress</span>
|
|
1660
|
+
</div>
|
|
1661
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
1662
|
+
Wire invoice PDF export for the Milan office.
|
|
1663
|
+
</p>
|
|
1664
|
+
<BbSelect
|
|
1665
|
+
v-model="assignee"
|
|
1666
|
+
clearable
|
|
1667
|
+
compact
|
|
1668
|
+
item-text="fullName"
|
|
1669
|
+
item-value="id"
|
|
1670
|
+
:items="teammates"
|
|
1671
|
+
label="Assignee"
|
|
1672
|
+
placeholder="Choose a teammate"
|
|
1673
|
+
pt:activator="font-medium"
|
|
1674
|
+
pt:box:has-value="border-(--bb-primary)"
|
|
1675
|
+
pt:option:selected="bg-(--bb-muted) font-semibold"
|
|
1676
|
+
pt:panel="rounded-(--bb-radius)"
|
|
1677
|
+
pt:panel:open="ring-1 ring-(--bb-primary)"
|
|
1678
|
+
/>
|
|
1679
|
+
</div>
|
|
1680
|
+
</template>
|
|
1681
|
+
|
|
1682
|
+
<script setup lang="ts">
|
|
1683
|
+
import { ref } from 'vue';
|
|
1684
|
+
import { BbSelect } from 'bitboss-ui';
|
|
1685
|
+
|
|
1686
|
+
type Teammate = {
|
|
1687
|
+
id: string;
|
|
1688
|
+
fullName: string;
|
|
1689
|
+
role: string;
|
|
1690
|
+
};
|
|
1691
|
+
|
|
1692
|
+
// Same assignee field as `AssigneeSelect.vue`, restyled through passthrough:
|
|
1693
|
+
// `pt:activator` is the activator (the chevron is chrome), `pt:option:selected`
|
|
1694
|
+
// resolves per option where the selection is known, `pt:panel` / `pt:panel:open`
|
|
1695
|
+
// forward to the popover (the sheet on mobile).
|
|
1696
|
+
const teammates: Teammate[] = [
|
|
1697
|
+
{ id: 'ada', fullName: 'Ada Lovelace', role: 'Engineering' },
|
|
1698
|
+
{ id: 'grace', fullName: 'Grace Hopper', role: 'Engineering' },
|
|
1699
|
+
{ id: 'maggie', fullName: 'Margaret Hamilton', role: 'Flight Systems' },
|
|
1700
|
+
{ id: 'katherine', fullName: 'Katherine Johnson', role: 'Mathematics' },
|
|
1701
|
+
];
|
|
1702
|
+
|
|
1703
|
+
const assignee = ref<string | null>('ada');
|
|
1704
|
+
</script>
|
|
1705
|
+
```
|
|
1706
|
+
|
|
1707
|
+
A look that depends on the OPTION'S DATA — a VIP member, an archived project
|
|
1708
|
+
— is a per-item function on an option part:
|
|
1709
|
+
`:pt:option="({ item, selected }) => item.vip && 'text-amber-700'"`, called
|
|
1710
|
+
in the popover with the raw item (typed as your item) and every state as a
|
|
1711
|
+
boolean (the option's `selected` / `disabled`, …), merged after `pt:option:selected`. Option parts
|
|
1712
|
+
only (`option`, `itemText`, `itemIcon`, `itemDescription`); `list` is the
|
|
1713
|
+
listbox node itself. A listener on `pt:activator` concatenates after the
|
|
1714
|
+
activator's own handler, never
|
|
1715
|
+
instead of it. Pick a `variant` first — `ghost` or `none` — when the whole box
|
|
1716
|
+
should change; `pt:box` is for the one-off, and
|
|
1717
|
+
`:pt:box="{ style: { '--bg': … } }"` is the sanctioned way to hand the box a
|
|
1718
|
+
look variable. Classes append to ours, an attribute in `attrs` wins over ours.
|
|
1719
|
+
The full grammar, the merge rules and the global map are in the
|
|
1720
|
+
[passthrough guide](./guides/passthrough.md).
|
|
1721
|
+
|
|
1722
|
+
A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
1723
|
+
`pt` prop) is typed as `BbSelectProps<Row>['pt']`, or `BbSelectProps['pt']`
|
|
1724
|
+
for a preset that fits any row type (never `<any>`), not an imported
|
|
1725
|
+
`PtValue`: see
|
|
1726
|
+
[passthrough § Typing `pt` in `<script>`](./guides/passthrough.md#typing-pt-in-script).
|
|
1727
|
+
|
|
1728
|
+
### Wrapping BbSelect in your own component
|
|
1729
|
+
|
|
1730
|
+
A `MemberSelect` or `PriceListSelect` that only fixes the items, accessors,
|
|
1731
|
+
label or option row is a preset: one `definePreset(BbSelect<Member>, { items,
|
|
1732
|
+
itemText, itemValue })` call, no SFC, with `v-model` typed from `itemValue`
|
|
1733
|
+
([preset-components guide](./guides/preset-components.md)).
|
|
1734
|
+
|
|
1735
|
+
A wrapper SFC with its own logic: type its props from `BbSelectProps<Row>` (the ROW, not the value), declare
|
|
1736
|
+
only what the wrapper reads and let `$attrs` carry the rest, and import the
|
|
1737
|
+
types with `import { BbSelect, type BbSelectProps } from 'bitboss-ui'`. The
|
|
1738
|
+
four rules and a complete wrapper:
|
|
1739
|
+
[options-items playbook § Wrapping BbSelect in your own component](./guides/options-items-playbook.md#wrapping-bbselect-in-your-own-component).
|
|
1740
|
+
A wrapper that declares `pt` types it as `BbSelectProps<Row>['pt']` and binds
|
|
1741
|
+
it: [passthrough guide § Typing `pt` in `<script>`](./guides/passthrough.md#typing-pt-in-script).
|
|
1742
|
+
|
|
1255
1743
|
### Works well with
|
|
1256
1744
|
|
|
1257
1745
|
- `BbSelectPopover` — the same engine on a custom trigger (status pills,
|
|
@@ -1267,6 +1755,12 @@ Platform notes:
|
|
|
1267
1755
|
|
|
1268
1756
|
### Gotchas and constraints
|
|
1269
1757
|
|
|
1758
|
+
- **A `form` attribute goes to the hidden inputs** — the select's value
|
|
1759
|
+
channel — so a select rendered outside its `<form>` still posts with it
|
|
1760
|
+
(`form="checkout"`). No other native attribute is routed: the activator is a
|
|
1761
|
+
button, not a text field, so `spellcheck` and friends have nothing to land
|
|
1762
|
+
on and stay on the field root like any attribute.
|
|
1763
|
+
|
|
1270
1764
|
- **Clicking the selected option does not clear a single select** — it re-picks
|
|
1271
1765
|
it and closes the panel. Add `clearable` for an explicit clear button; a
|
|
1272
1766
|
required status field should not empty itself because someone clicked twice.
|
|
@@ -1298,7 +1792,7 @@ Platform notes:
|
|
|
1298
1792
|
enforcement will never prune them. When an upstream change must clear
|
|
1299
1793
|
now-invalid values, skip `stash` and resolve the selection in the provider
|
|
1300
1794
|
instead.
|
|
1301
|
-
- `
|
|
1795
|
+
- `layout` is honored with `'outside'` labels (the default); it is ignored
|
|
1302
1796
|
only under `floating`/`inside` label modes.
|
|
1303
1797
|
- No `#chevron` slot — customise the trailing icon via `append:icon`.
|
|
1304
1798
|
- The multiple-mode search query persists after picking an option (it clears on
|
|
@@ -1346,97 +1840,173 @@ Platform notes:
|
|
|
1346
1840
|
|
|
1347
1841
|
| Prop | Type | Default | Required | Description |
|
|
1348
1842
|
| --- | --- | --- | --- | --- |
|
|
1349
|
-
| `
|
|
1350
|
-
| `
|
|
1843
|
+
| `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: `activator`, `badge`, `box`, `clear`, `comma`, `description`, `footer`, `header`, `hint`, `icon`, `input`, `itemDescription`, `itemIcon`, `itemText`, `label`, `list`, `message`, `option`, `panel`, `prefix`, `root`, `sheet`, `spinner`, `suffix`. States: `disabled`, `errors`, `hasValue`, `loading`, `open`, `readonly`, `selected`, `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 `BbSelectProps<Row>['pt']` (`BbSelectProps['pt']` for a preset that fits any row type, never `<any>`) (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
1844
|
+
| `adaptive` | `boolean \| undefined` | ``config.adaptive` (`true`)` | | When `true`, the options panel opens as a bottom off-canvas sheet on mobile viewports instead of a floating popover; on desktop it stays a popover. When unset, falls back to the global `config.adaptive`. |
|
|
1845
|
+
| `append:icon` | `string \| undefined` | `the chevron-down glyph` | | Name of the icon to be added at the end of the input. |
|
|
1351
1846
|
| `autocomplete` | `string \| undefined` | | | Guides to the browser as to the type of information expected in the field. |
|
|
1352
1847
|
| `autofocus` | `Booleanish \| undefined` | | | Sets autofocus on page load. |
|
|
1353
|
-
| `clearable` | `boolean \| undefined` |
|
|
1354
|
-
| `comma` | `boolean \| undefined` |
|
|
1355
|
-
| `compact` | `boolean \| undefined` |
|
|
1848
|
+
| `clearable` | `boolean \| undefined` | `false` | | Displays a clear button when the input has a value and is being interacted with. |
|
|
1849
|
+
| `comma` | `boolean \| undefined` | `false` | | Sets the display model for selected values to a list of comma separated string. In this mode the user cannot deselect an option by pressing the close button. |
|
|
1850
|
+
| `compact` | `boolean \| undefined` | `false` | | Compact density. Swaps `--bb-input-h`, `--bb-input-py` and `--bb-label-spacing-y` for their `-compact` twins on the field, so a `--bb-input-h` you set on the component is ignored while `compact` is on: size a compact field with `--bb-input-h-compact` (and `--bb-input-py-compact`) instead. |
|
|
1356
1851
|
| `dependencies` | `unknown[] \| undefined` | | | Defines an array of dependencies that will trigger actions in the component upon change. |
|
|
1357
|
-
| `depsDebounceTime` | `number \| undefined` |
|
|
1852
|
+
| `depsDebounceTime` | `number \| undefined` | `0` | | Timeout used to debounce response to changes to dependencies. |
|
|
1358
1853
|
| `description` | `string \| undefined` | | | Descriptive text displayed below the label and above the input. Unlike the hint it is always visible, and it is linked to the input via `aria-describedby` (after any `errors` / `warnings`, before the `hint`). |
|
|
1359
|
-
| `
|
|
1360
|
-
| `
|
|
1361
|
-
| `
|
|
1362
|
-
| `enforceCoherence` | `boolean \| undefined` |
|
|
1363
|
-
| `errors` | `string \| string[] \| undefined` | | | Can be a string or an array of string containing the messages to display. They render in an `aria-live="polite"` region (announced when they appear) and, while the list is non-empty, are referenced FIRST from the control's `aria-describedby
|
|
1364
|
-
| `filterBy` | `string[] \| undefined` |
|
|
1854
|
+
| `disabled` | `boolean \| undefined` | `false` | | Disables the component. |
|
|
1855
|
+
| `disableWriting` | `boolean \| "auto" \| "mobile" \| "desktop" \| undefined` | `'auto'` | | Controls whether the search input is shown inside the dropdown panel. `true` removes it everywhere; `'mobile'` / `'desktop'` remove it on that platform only; `'auto'` removes it when an **array** `items` renders fewer options than the plugin's `autoDisableWritingThreshold` (default `6`; disabled options count, group headers don't). `'auto'` is decided when the panel opens and held until it closes, never applies to a provider (function) `items`, never when you listen to `option:add` (a creatable select keeps its field), and is off when the threshold is `0`. There is no global switch: hiding or forcing a field is this prop, per instance. |
|
|
1856
|
+
| `emptyText` | `string \| undefined` | | | String displayed when there are no items to display. |
|
|
1857
|
+
| `enforceCoherence` | `boolean \| undefined` | `false` | | If coherence is enforced the input cannot have a modelValue that is incoherent with its current items. modelValue will be reset upon incoherence. |
|
|
1858
|
+
| `errors` | `string \| string[] \| undefined` | | | Can be a string or an array of string containing the messages to display. They render in an `aria-live="polite"` region (announced when they appear) and, while the list is non-empty, are referenced FIRST from the control's `aria-describedby`, so the reason the field is invalid is re-read whenever the control regains focus. |
|
|
1859
|
+
| `filterBy` | `string[] \| undefined` | `[]` | | Property paths used to filter options when the user types in the search input. When empty (default) options are matched against their display text. When non-empty the provided paths are searched instead of the display text. To disable filtering entirely set `disableWriting` so the user cannot type a query. |
|
|
1860
|
+
| `formless` | `boolean \| undefined` | `false` | | Keep this control out of the enclosing `BbForm` entirely: not submitted, not dirty, not reset, not validated. For a control that is not form data (a filter, a "show advanced" switch). |
|
|
1365
1861
|
| `groupBy` | `string \| ((item: T) => string \| number \| symbol) \| undefined` | | | Path to item property for grouping options. |
|
|
1366
|
-
| `hasErrors` | `boolean \| undefined` |
|
|
1367
|
-
| `
|
|
1862
|
+
| `hasErrors` | `boolean \| undefined` | `false` | | Define if the component should be in an error state. It usually attaches a CSS class for styling purposes. |
|
|
1863
|
+
| `hasWarnings` | `boolean \| undefined` | `false` | | Define if the component should be in a warning state. Same chrome as errors with `--bb-warn`; errors take priority. |
|
|
1368
1864
|
| `headerHeight` | `number \| undefined` | | | Height of group headers in the listbox (px). Defaults to 32px (24px compact; 36px / 32px on mobile viewports). Only applies when `groupBy` is set. An explicit value wins on every viewport. |
|
|
1369
|
-
| `hideLabel` | `boolean \| undefined` |
|
|
1865
|
+
| `hideLabel` | `boolean \| undefined` | `false` | | Visually hides the label of the input while maintaining accessibility. |
|
|
1370
1866
|
| `hint` | `string \| undefined` | | | Text box to be displayed near the input, usually to indicate instructions. |
|
|
1371
|
-
| `id` | `string \| undefined` | | | The
|
|
1372
|
-
| `itemHeight` | `number \| undefined` |
|
|
1867
|
+
| `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. |
|
|
1868
|
+
| `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. |
|
|
1869
|
+
| `itemProps` | `BbSelectItemProps<T> \| undefined` | | | ADDITIONAL row fields resolved from each item — never its text or value (those stay on `itemText` / `itemValue`). Accepted fields: - `description` — a muted line under the option label. Setting it gives every row a fixed two-line height (the list is virtualized); the description stays on one line and ellipsizes. Announced as the option's description, never part of its name; matched by the search with the text when `filterBy` is empty. - `prepend:icon` — an icon before the label. - `append:icon` — an icon after the label; on the selected row the check takes its place. Either an object with a path or getter per field (`{ description: 'email', 'prepend:icon': 'icon' }`) or a function returning the fields (`(item) => ({ description: item.email })`). Without it no field renders — nothing is read off the item implicitly — and an empty value renders nothing for that item. Never shown in the trigger or the chips. To disable individual options use `selectable`. |
|
|
1373
1870
|
| `items` | `T[] \| ((query: string, prefill: boolean, modelValue: any) => Promise<T[]>) \| ((query: string, prefill: boolean, modelValue: any) => T[])` | | yes | Used to retrieve items; can be an array or a function. |
|
|
1374
|
-
| `itemText` | `ItemAccessor<T, string> \| undefined` |
|
|
1375
|
-
| `itemValue` | `ItemAccessor<T> \| undefined` |
|
|
1871
|
+
| `itemText` | `ItemAccessor<T, string> \| undefined` | `JSON.stringify(item)` | | Defines a path that returns a property of the object to use as text or a function that returns a string. |
|
|
1872
|
+
| `itemValue` | `ItemAccessor<T> \| undefined` | `the whole item` | | Defines a path that returns a property of the object to use as value or a function that returns any value. |
|
|
1376
1873
|
| `label` | `string` | | yes | Text content of the label of the element. |
|
|
1377
|
-
| `labelMode` | `"
|
|
1874
|
+
| `labelMode` | `"outside" \| "floating" \| "inside" \| undefined` | | | Label rendering mode. |
|
|
1378
1875
|
| `labelPosition` | `"left" \| "center" \| "right" \| undefined` | | | Sets the text alignment of the label. |
|
|
1379
|
-
| `
|
|
1876
|
+
| `layout` | `FieldLayout \| undefined` | | | How the label and the input sit together: `'vertical'`, `'horizontal'` (50/50), `'auto'`, `'label-fill'` (the label takes the free space, the input keeps its size), `'input-fill'` (the other way round), or a two-word ratio pattern like `'xx xxxxx'`. |
|
|
1877
|
+
| `loading` | `boolean \| undefined` | `false` | | Sets the component in a loading state, usually triggering some visual styles. |
|
|
1380
1878
|
| `loadingText` | `string \| undefined` | | | String displayed while items are being loaded. |
|
|
1381
1879
|
| `max` | `number \| undefined` | | | Maximum number of selectable items when the multiple flag is set. |
|
|
1382
|
-
| `maxSelectedLabels` | `number \| undefined` |
|
|
1383
|
-
| `modelValue` | `any` | |
|
|
1384
|
-
| `modelValueDebounceTime` | `number \| undefined` |
|
|
1385
|
-
| `multiple` | `boolean \| undefined` |
|
|
1880
|
+
| `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. |
|
|
1881
|
+
| `modelValue` | `any` | | | Used by v-model. Can be any serializable type. |
|
|
1882
|
+
| `modelValueDebounceTime` | `number \| undefined` | `0` | | Timeout used to debounce response to changes to modelValue. |
|
|
1883
|
+
| `multiple` | `boolean \| undefined` | `false` | | Allows the selection of multiple items. |
|
|
1386
1884
|
| `name` | `string \| undefined` | | | Defines the name of the input. |
|
|
1387
|
-
| `
|
|
1388
|
-
| `
|
|
1389
|
-
| `persistentHint` | `boolean \| undefined` | | | Keeps the hint displayed. |
|
|
1885
|
+
| `offCanvasProps` | `Partial<BbOffCanvasProps> \| undefined` | | | Props for the phone sheet. A `pt` inside it, object or colon keys, styles only that sheet. Extra props forwarded to the `BbOffCanvas` sheet when `adaptive` is active on mobile. A `pt` inside it styles ONLY the sheet, in `BbOffCanvas`'s part words (`root`, `header`, `title`, `description`, `content`, `footer`, `close`; state `open`), object (`{ pt: { header: '…' } }`) or colon keys (`{ 'pt:header': '…' }`) alike. It merges after what this component forwards to its sheet, so it wins a conflict and drops nothing — see the passthrough guide § Inside the sheet. |
|
|
1886
|
+
| `persistentHint` | `boolean \| undefined` | `false` | | Keeps the hint displayed. |
|
|
1390
1887
|
| `placeholder` | `string \| undefined` | | | String displayed when there's no data. |
|
|
1391
|
-
| `prefill` | `boolean \| "interaction" \| undefined` | `
|
|
1888
|
+
| `prefill` | `boolean \| "interaction" \| undefined` | `'interaction'` | | Controls when items are pre-loaded. `'interaction'` loads on the first user interaction, `true` loads immediately on mount, `false` is *search-first*: with a provider, nothing is fetched until the user types — opening alone does not load, and the panel shows a "search to begin" hint meanwhile. `false` falls back to loading on open when the user could not otherwise reach the options: array `items` (resolved on mount regardless), or `disable-writing` (no search field to type into). When the input has a value, it always loads immediately so the selection's text can render. |
|
|
1392
1889
|
| `prepend:icon` | `string \| undefined` | | | Name of the icon to be added at the start of the input. |
|
|
1393
|
-
| `queryDebounceTime` | `number \| undefined` |
|
|
1394
|
-
| `readonly` | `boolean \| undefined` |
|
|
1395
|
-
| `required` | `boolean \| undefined` |
|
|
1396
|
-
| `reverse` | `boolean \| undefined` |
|
|
1890
|
+
| `queryDebounceTime` | `number \| undefined` | `500` | | Time to wait when the user stops writing in the input before querying data. |
|
|
1891
|
+
| `readonly` | `boolean \| undefined` | `false` | | Sets the input in a readonly state. |
|
|
1892
|
+
| `required` | `boolean \| undefined` | `false` | | Sets the input as required. |
|
|
1893
|
+
| `reverse` | `boolean \| undefined` | `false` | | Reverses the layout. Applicable in every direction the order of the label and the input is swapped. |
|
|
1894
|
+
| `rules` | `RuleExpression<any>` | | | vee-validate rules for this field. Only inside a `BbForm`. |
|
|
1397
1895
|
| `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. |
|
|
1398
1896
|
| `selectedLabelsFn` | `((count: number) => string) \| undefined` | | | Function that returns a string to be displayed when the number of selected labels is greater than `maxSelectedLabels`. |
|
|
1399
|
-
| `stash` | `boolean \| undefined` |
|
|
1400
|
-
| `transitionDuration` | `number \| undefined` |
|
|
1401
|
-
| `
|
|
1897
|
+
| `stash` | `boolean \| undefined` | `false` | | Adds a stash to accumulate selected values across searches. |
|
|
1898
|
+
| `transitionDuration` | `number \| undefined` | `250` | | How long the transition has to last in milliseconds. |
|
|
1899
|
+
| `validationLabel` | `string \| undefined` | | | The field's name in validation messages (`{field}`): "Email is not valid". Defaults to the `label` (or `legend`), then "This field"; the field's `name` never shows. Set it when the label is not a good noun for a sentence (an icon-only label, a question) or is hidden. Only inside a `BbForm`. |
|
|
1900
|
+
| `validationMode` | `'aggressive'` \| `'balanced'` \| `'lazy'` \| `'submit-only'` \| `'submit-live'` | | | When this field checks itself while the user works: `aggressive` (every change), `balanced` (on leave, then every change while it shows an error), `lazy` (on leave only), `submit-only` (on submit only) or `submit-live` (on submit, then every change while it shows an error). "Leave" is blur for a text-like control, and focus leaving the whole control for a picker or a group; a checkbox or switch commits on click. Unset, the enclosing `BbForm`'s `validation-mode` applies, then the app's `formControls.validationMode` (`'balanced'`). Only inside a `BbForm`. |
|
|
1901
|
+
| `variant` | `'outline'` \| `'secondary'` \| `'none'` \| `'ghost'` | `'outline'` | | Visual variant of the field box — the same names and tokens as the `BbButton` variants. Colours only: height, padding and border width are identical across variants, so a form never reflows when one changes. `'ghost'` has no border in any state (errors and warnings show through the icon and the messages); every variant keeps the focus ring. Register extra names with the plugin's `inputVariants` option. `'none'` is a blank starting point: the field keeps its structure and behaviour but takes no look, so your own classes don't fight a built-in one. You then own hover, focus, disabled and the error / warning states. Fine for a one-off; keep inline styling short, and register a real variant (`inputVariants`) when the look recurs. |
|
|
1902
|
+
| `warnings` | `string \| string[] \| undefined` | | | Warning messages to display beneath the field, in their own `aria-live` region and amber (`--bb-text-warn`). A string or array; a non-empty list implies the warning state. Errors suppress warnings when both are set. While displayed they are also referenced from the control's `aria-describedby`, after any errors and before the description/hint. |
|
|
1903
|
+
|
|
1904
|
+
## Passthrough parts and states
|
|
1905
|
+
|
|
1906
|
+
`pt:<part>="…"` restyles a part; `pt:<part>:<state>="…"` applies only while the state is on. A component-wide state is on for every part at once; a _per node_ state resolves on each node of a broadcast part (one row, one option, one day). Grammar and merge rules: `guides/passthrough.md`. In `<script>`, type a `pt` value as `<Component>Props['pt']` (`<Component>Props<Row>['pt']` on a generic component); `PtValue` is not exported: `guides/passthrough.md` § Typing `pt` in `<script>`.
|
|
1907
|
+
|
|
1908
|
+
| Part | What it is |
|
|
1909
|
+
| --- | --- |
|
|
1910
|
+
| `root` | The floating element — an invisible positioning wrapper; a `class` on the component lands here. No node on the phone sheet: style what you see with `panel`. |
|
|
1911
|
+
| `label` | The label text above the box (the `label` prop). |
|
|
1912
|
+
| `description` | The muted line under the label (the `description` prop). |
|
|
1913
|
+
| `message` | The errors / warnings line under the box. A node of its own: it can show at the same time as `hint`. |
|
|
1914
|
+
| `hint` | The helper line (the `hint` prop), shown on focus, or always with `persistent-hint`. |
|
|
1915
|
+
| `box` | The bordered box around the input — border, background and radius; the `variant` paints here. |
|
|
1916
|
+
| `activator` | The button you act on to open the options — the field's control (not a text field: `data-test` fits here, `autocomplete` does not). The chevron is chrome. It is `activator`, not the family's `input`: the field itself is a button (the date / time inputs' trigger is the same word). |
|
|
1917
|
+
| `input` | The search field inside the options surface, when it shows one (see `disable-writing`) — handed to the `BbSelectPopover` as its own `pt:input`. Its ✕ is chrome. |
|
|
1918
|
+
| `icon` | The content icons, prepend and append — a broadcast. Chrome (the clear ✕, a chevron, the error / warning glyph) is never in it. |
|
|
1919
|
+
| `spinner` | The spinner inside the box while `loading`. |
|
|
1920
|
+
| `prefix` | The `#prefix` slot's wrapper, inside the box before the input. |
|
|
1921
|
+
| `suffix` | The `#suffix` slot's wrapper, inside the box after the input. |
|
|
1922
|
+
| `clear` | The ✕ that empties the search field. |
|
|
1923
|
+
| `panel` | The options surface — the popover's painted bubble on desktop, the sheet itself on a phone. |
|
|
1924
|
+
| `sheet` | The bottom sheet the options open in on a phone only. |
|
|
1925
|
+
| `header` | The band around your `#header` slot: at the top of the flyout on desktop, the sheet's header on a phone. |
|
|
1926
|
+
| `footer` | The band around your `#footer` slot: at the bottom of the flyout on desktop, the sheet's footer on a phone. |
|
|
1927
|
+
| `list` | The `role="listbox"` node that holds the options. Virtualised: its height is written inline and its rows are positioned by the list, which limits what a layout utility can do there. The listbox's groups and the chips are not parts. |
|
|
1928
|
+
| `option` | One listbox option — a broadcast resolved per option. Also takes a per-item function, called with the option's raw item. |
|
|
1929
|
+
| `itemText` | An option's label — resolved with that option's states. A custom `#option` slot replaces it. Also takes a per-item function. |
|
|
1930
|
+
| `itemIcon` | An option's prepend / append icons (`itemProps`) — resolved with that option's states. Also takes a per-item function. |
|
|
1931
|
+
| `itemDescription` | An option's second line (its description) — resolved with that option's states. A custom `#option` slot replaces it. Also takes a per-item function. |
|
|
1932
|
+
| `badge` | Each selected value's `BbBadge` root with `multiple` — a broadcast resolved per value. The badge's own ✕ is chrome, never `clear`. Not rendered when the `#chip` slot replaces it, nor in `comma` mode. |
|
|
1933
|
+
| `comma` | Each selected value with `multiple` and `comma` — a broadcast resolved per value. |
|
|
1934
|
+
|
|
1935
|
+
States are listed in precedence order: when two are on at once and their entries conflict, the later one wins.
|
|
1936
|
+
|
|
1937
|
+
| State | When it is on |
|
|
1938
|
+
| --- | --- |
|
|
1939
|
+
| `hasValue` | Component-wide: the control holds a value, by its own rule (`0` counts on `BbNumberInput`, `''` on `BbColorInput`). |
|
|
1940
|
+
| `selected` | Per node, on `option` and its `item-*` parts: a chosen option. |
|
|
1941
|
+
| `readonly` | Component-wide: the control is `readonly` — shown, focusable, not editable. |
|
|
1942
|
+
| `disabled` | Component-wide while the select is `disabled`; also per node, on `option` and its `item-*` parts: an option that is disabled. |
|
|
1943
|
+
| `warnings` | Component-wide: the control is in its warning state (`warnings` / `has-warnings`) and not in an error state — errors win, so the two are never on together. |
|
|
1944
|
+
| `errors` | Component-wide: the control is in its error state (`errors` / `has-errors`, or its validation) — the message line and the box turn red. |
|
|
1945
|
+
| `open` | Component-wide: the options surface is showing. |
|
|
1946
|
+
| `loading` | Component-wide: `loading` is on; the box shows its `spinner`. |
|
|
1402
1947
|
|
|
1403
1948
|
## Events
|
|
1404
1949
|
|
|
1405
|
-
- `active` — `(
|
|
1406
|
-
- `blur` — `(
|
|
1407
|
-
- `change` — `(
|
|
1408
|
-
- `click` — `(
|
|
1409
|
-
- `focus` — `(
|
|
1410
|
-
- `
|
|
1411
|
-
- `
|
|
1412
|
-
- `
|
|
1413
|
-
- `
|
|
1950
|
+
- `active` — `(): void` — Emitted when the select becomes active (focus enters it).
|
|
1951
|
+
- `blur` — `(event: FocusEvent): void` — Emitted when the activator loses focus. Forwards the original DOM `FocusEvent`.
|
|
1952
|
+
- `change` — `(event: Event): void` — Emitted on the native `change` event. Forwards the original DOM `Event`.
|
|
1953
|
+
- `click` — `(event: MouseEvent): void` — Emitted when the activator is clicked. Forwards the original DOM `MouseEvent`.
|
|
1954
|
+
- `focus` — `(event: FocusEvent): void` — Emitted when the activator receives focus. Forwards the original DOM `FocusEvent`.
|
|
1955
|
+
- `hidden` — `(): void` — Emitted once the options surface has finished closing.
|
|
1956
|
+
- `hide` — `(): void` — Emitted as soon as the options surface starts to close.
|
|
1957
|
+
- `inactive` — `(): void` — Emitted when focus moves outside the whole select after it was active.
|
|
1958
|
+
- `input` — `(event: Event): void` — Emitted on native `input` events from the search field. Forwards the DOM `Event`.
|
|
1959
|
+
- `option:add` — `(text: string): void` — Emitted with the typed text when the user confirms a value that is not in the list (Enter in the search field). Binding it keeps the search field writable, which makes the select creatable.
|
|
1960
|
+
- `show` — `(): void` — Emitted as soon as the options surface starts to open (the popover, or the sheet on a phone).
|
|
1961
|
+
- `shown` — `(): void` — Emitted once the options surface is open and its open transition has finished.
|
|
1962
|
+
- `update:modelValue` — `(value: any): void` — Emitted with the new value whenever `v-model` changes.
|
|
1414
1963
|
|
|
1415
1964
|
## Slots
|
|
1416
1965
|
|
|
1417
1966
|
- `append` — scope: `{ query: string; focus: () => void; close: () => Promise<void>; }` — Content appended inside the input field, after the value area.
|
|
1418
|
-
- `append
|
|
1419
|
-
- `
|
|
1420
|
-
- `
|
|
1421
|
-
- `
|
|
1422
|
-
- `
|
|
1967
|
+
- `append:outer` — scope: `{ query: string; close: () => Promise<void>; }` — Content appended outside the input field wrapper.
|
|
1968
|
+
- `chip` — scope: `BbSelectChipSlotProps<T>` `{ item: T; text: string; value: any; disabled: boolean; deselect: () => void }` — Replaces the default badge rendered for each selection in `multiple` mode. Not called in `comma` mode, nor for the collapsed "+N" summary.
|
|
1969
|
+
- `description` — scope: `BbSelectDescriptionSlotProps` `{ text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the description text. Provided alone (no `description` prop) it still renders the description region and wires it into `aria-describedby`.
|
|
1970
|
+
- `empty` — scope: `{ query: string; focus: () => void; }` — Content shown when no options match the query or the list is empty.
|
|
1971
|
+
- `footer` — scope: `BbSelectPanelSlotProps` `{ close: () => Promise<void>; clear: () => void; focus: () => void; query: string; selectedOptions: BbSelectResolvedOption[] }` — Content pinned to the bottom of the options panel, below the options list. Rendered in both the desktop popover and the adaptive sheet.
|
|
1972
|
+
- `group` — scope: `BbSelectGroupSlotProps<T>` `{ text: string; item: T; index: number; length: number; disabled: boolean }` — Replaces the default group header rendered above grouped options.
|
|
1973
|
+
- `header` — scope: `BbSelectPanelSlotProps` `{ close: () => Promise<void>; clear: () => void; focus: () => void; query: string; selectedOptions: BbSelectResolvedOption[] }` — Content pinned to the top of the options panel, above the search field. Rendered in both the desktop popover and the adaptive sheet.
|
|
1974
|
+
- `label` — scope: `BbSelectLabelSlotProps` `{ text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the default label text rendered above the input.
|
|
1423
1975
|
- `loading` — scope: `{ query: string; }` — Content shown inside the options dropdown while items are loading.
|
|
1424
|
-
- `
|
|
1425
|
-
- `option` — scope: `BbSelectOptionSlotProps<T>` — Replaces the default rendering of each option row in the dropdown.
|
|
1976
|
+
- `option` — scope: `BbSelectOptionSlotProps<T>` `{ disabled: boolean; focused: boolean; index: number; hasErrors?: boolean; item: T; loading: boolean; selected: boolean; text: string; value: any; description: string }` — Replaces the default rendering of each option row in the dropdown.
|
|
1426
1977
|
- `prefix` — scope: `object` — Content rendered as an inline prefix inside the input field.
|
|
1427
1978
|
- `prepend` — scope: `{ query: string; focus: () => void; close: () => Promise<void>; }` — Content prepended inside the input field, before the value area.
|
|
1428
|
-
- `prepend
|
|
1979
|
+
- `prepend:outer` — scope: `{ query: string; close: () => Promise<void>; }` — Content prepended outside the input field wrapper.
|
|
1429
1980
|
- `suffix` — scope: `object` — Content rendered as an inline suffix inside the input field.
|
|
1430
1981
|
|
|
1431
|
-
##
|
|
1982
|
+
## CSS custom properties
|
|
1432
1983
|
|
|
1433
|
-
|
|
1984
|
+
Set these on the element, or on a class you put on it, to retune this component alone — the sanctioned alternative to reaching past the API with `:deep()`. They are this component's own locals — a **Set on** of `pt:<part>` means the local lives on that part's element, so set it through that entry (`pt:box="[--border-color:var(--color-green-500)]"`); the global `--bb-*` theme tokens are a separate tier (see the [design-tokens guide](./guides/design-tokens.md), or the MCP `list_tokens` tool).
|
|
1434
1985
|
|
|
1435
|
-
|
|
|
1436
|
-
| --- | --- | --- |
|
|
1437
|
-
| `
|
|
1438
|
-
| `
|
|
1439
|
-
|
|
1986
|
+
| Property | Set on | Default | What it is |
|
|
1987
|
+
| --- | --- | --- | --- |
|
|
1988
|
+
| `--compensation-multiplier` | `.bb-select__field` | `0.3` | Fraction of the shell's inner padding the chips row is pulled back by when no prepend icon precedes it (see the negative margin below). |
|
|
1989
|
+
| `--border-color` | `pt:box` | `per variant` | The resting border, at the fixed --bb-border-w. Errors and warnings paint their frame over it, so `pt:box="[--border-color:…]"` recolours the rest without hiding the state; a plain `border-*` utility on the base pt:box would hide it (ESLint `no-box-border-color`). |
|
|
1990
|
+
|
|
1991
|
+
## Component tree
|
|
1992
|
+
|
|
1993
|
+
`BbSelect` is not one component: rendering it mounts every component below, and each one is live inside it. **Read this before styling, theming or debugging `BbSelect`, and before concluding a part, a token or a behaviour does not exist** — it may live on a component further down. How to read it:
|
|
1994
|
+
|
|
1995
|
+
- **_internal_** nodes are building blocks with no API of their own: you reach them only through `BbSelect`. A pt part listed as landing there is set on `BbSelect` (`pt:<part>`).
|
|
1996
|
+
- **_public_** nodes are components with their own contract. `BbSelect` reaches one only through a pt part of its own that lands on it (shown on the parent node as `part → Component`, e.g. `spinner → BbSpinner`) or through a pt map it hands it (shown as "hands … the pt map", in `BbSelect`'s words → the child's). The child's other props and parts are not exposed; its contract explains what it renders.
|
|
1997
|
+
- **CSS custom properties** listed on a node are declared on THAT node's root and read by elements inside it. Set one on that node's root or on the element inside it that reads it — the pt part that lands there is how you reach it (`pt:box="[--border-color:…]"` on a text input) — never on `BbSelect`'s root, where the node's own declaration masks it (design-tokens guide, _Overriding one from a consumer app_, rule 0).
|
|
1998
|
+
- 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, repeats and undocumented locals included, is the `tree` field of this component in `components.json`.
|
|
1999
|
+
|
|
2000
|
+
- `BbSelect` _(this component)_ — its own template binds: `activator` → `input.bb-select__activator`, `comma` → `span.bb-select__comma`, `badge` → `BbBadge`, `controlAttrs` → `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' }` (ours → theirs)
|
|
2001
|
+
- `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`, `message` → `div.bb-field__message`; also mounts `BbAsterisk`
|
|
2002
|
+
- `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`, `--border-color`, `--border-focus`, `--ring-size`, `--ring-color`, `--elev`, `--frost`, `--inside-label-clearance`; also mounts `ErrorIcon`, `WarningIcon`, `ClearableButton`, `BbIcon`, `BbSpinner`
|
|
2003
|
+
- `BbBadge` _(public — [contract](./BbBadge.md))_ — its own pt parts (`BbBadge`): `spinner` → `BbSpinner`, `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`, `--pad-left`; also mounts `BbIcon`, `BbSpinner`, `BadgeBodyContent`
|
|
2004
|
+
- `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`
|
|
2005
|
+
- `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`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
|
|
2006
|
+
- `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`
|
|
2007
|
+
- `ListBox` _(internal — not importable, reach it through `BbSelectPopover`)_
|
|
2008
|
+
- `FlatListBox` _(internal — not importable, reach it through `BbSelectPopover`)_ — its own pt parts (`BbSelectPopover`): `list` → `span.bb-listbox__list`, `option` → `span.bb-listbox__option`, `itemIcon` → `BbIcon`, `itemText` → `span.bb-listbox__item-text`, `itemDescription` → `span.bb-listbox__item-description`; also mounts `BbIcon`
|
|
2009
|
+
- `GroupedListBox` _(internal — not importable, reach it through `BbSelectPopover`)_ — its own pt parts (`BbSelectPopover`): `list` → `span.bb-listbox__list`, `option` → `span.bb-listbox__option`, `itemIcon` → `BbIcon`, `itemText` → `span.bb-listbox__item-text`, `itemDescription` → `span.bb-listbox__item-description`; also mounts `BbIcon`
|
|
1440
2010
|
|
|
1441
2011
|
## See Also
|
|
1442
2012
|
|