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
|
@@ -6,152 +6,388 @@
|
|
|
6
6
|
|
|
7
7
|
```vue
|
|
8
8
|
<template>
|
|
9
|
-
<
|
|
9
|
+
<CommonField
|
|
10
10
|
:id="id"
|
|
11
11
|
class="bb-select"
|
|
12
12
|
:clearable="isClearable"
|
|
13
13
|
:compact="compact"
|
|
14
14
|
:description="description"
|
|
15
|
-
:direction="direction"
|
|
16
15
|
:disabled="disabled"
|
|
17
|
-
:errors="
|
|
16
|
+
:errors="fieldErrors"
|
|
18
17
|
:has-errors="hasErrors"
|
|
19
18
|
:has-value="hasValue"
|
|
20
|
-
:has-
|
|
19
|
+
:has-warnings="hasWarnings"
|
|
21
20
|
:hide-label="hideLabel"
|
|
22
21
|
:hint="hint"
|
|
23
22
|
:label="label"
|
|
24
23
|
:label-mode="resolvedLabelMode"
|
|
25
24
|
:label-position="labelPosition"
|
|
25
|
+
:layout="layout"
|
|
26
26
|
:loading="loading"
|
|
27
27
|
:mobile="isMobile"
|
|
28
|
-
:model-value="modelValue"
|
|
29
28
|
:name="name"
|
|
29
|
+
:passthrough="passthrough"
|
|
30
30
|
:readonly="readonly"
|
|
31
31
|
:reverse="reverse"
|
|
32
|
+
:show-asterisk="showAsterisk"
|
|
32
33
|
:show-hint="showHint"
|
|
33
34
|
:warnings="warnings"
|
|
35
|
+
v-bind="passthrough.forwardAttrs"
|
|
34
36
|
>
|
|
35
37
|
<template #label="data"><slot name="label" v-bind="data"></slot></template>
|
|
36
|
-
<template
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
<template v-if="$slots.description" #description="data"
|
|
39
|
+
><slot name="description" v-bind="data"></slot
|
|
40
|
+
></template>
|
|
41
|
+
<template
|
|
42
|
+
#input="{
|
|
43
|
+
id: fieldId,
|
|
44
|
+
hasErrors: fieldHasErrors,
|
|
45
|
+
hasWarnings: fieldHasWarnings,
|
|
46
|
+
ariaDescribedby,
|
|
47
|
+
}"
|
|
48
|
+
>
|
|
49
|
+
<BbSelectPopover
|
|
50
|
+
:id="fieldId"
|
|
39
51
|
:adaptive="adaptive"
|
|
40
|
-
:
|
|
52
|
+
:anchor="wrapperRef"
|
|
41
53
|
:aria-describedby="ariaDescribedby"
|
|
42
54
|
:autocomplete="autocomplete"
|
|
43
|
-
:autofocus="autofocus"
|
|
44
|
-
:clearable="clearable"
|
|
45
|
-
:comma="comma"
|
|
46
55
|
:compact="compact"
|
|
47
56
|
:dependencies="dependencies"
|
|
48
57
|
:deps-debounce-time="depsDebounceTime"
|
|
49
58
|
:disable-writing="disableWriting"
|
|
50
59
|
:disabled="disabled"
|
|
60
|
+
:empty-text="emptyText"
|
|
51
61
|
:enforce-coherence="enforceCoherence"
|
|
52
62
|
:filter-by="Array.isArray(filterBy) ? filterBy : undefined"
|
|
53
63
|
:group-by="groupBy"
|
|
54
|
-
:has-errors="
|
|
55
|
-
:has-
|
|
64
|
+
:has-errors="fieldHasErrors"
|
|
65
|
+
:has-warnings="fieldHasWarnings"
|
|
56
66
|
:header-height="headerHeight"
|
|
57
67
|
:item-height="itemHeight"
|
|
68
|
+
:item-props="itemProps"
|
|
58
69
|
:item-text="itemText"
|
|
59
70
|
:item-value="itemValue"
|
|
60
71
|
:items="items"
|
|
61
72
|
:loading="loading"
|
|
62
73
|
:loading-text="loadingText"
|
|
63
74
|
:max="max"
|
|
64
|
-
:
|
|
65
|
-
:model-value="modelValue"
|
|
75
|
+
:model-value="fieldModel"
|
|
66
76
|
:model-value-debounce-time="modelValueDebounceTime"
|
|
67
77
|
:multiple="multiple"
|
|
68
|
-
:
|
|
69
|
-
:
|
|
70
|
-
:
|
|
71
|
-
:placeholder="placeholder"
|
|
72
|
-
:prefill="prefill"
|
|
73
|
-
:prepend:icon="props['prepend:icon']"
|
|
78
|
+
:off-canvas-props="resolvedOffCanvasProps"
|
|
79
|
+
:prefill="computedPrefill"
|
|
80
|
+
:pt="popoverPt()"
|
|
74
81
|
:query-debounce-time="queryDebounceTime"
|
|
75
82
|
:readonly="readonly"
|
|
76
|
-
:required="required"
|
|
77
83
|
:selectable="selectable"
|
|
78
|
-
:selected-labels-fn="selectedLabelsFn"
|
|
79
84
|
:stash="stash"
|
|
80
85
|
:transition-duration="transitionDuration"
|
|
81
|
-
|
|
86
|
+
width="100%"
|
|
87
|
+
v-bind="popoverListeners()"
|
|
82
88
|
>
|
|
89
|
+
<template
|
|
90
|
+
#activator="{
|
|
91
|
+
props: activatorProps,
|
|
92
|
+
shown,
|
|
93
|
+
loading: activatorLoading,
|
|
94
|
+
text,
|
|
95
|
+
selectedOptions,
|
|
96
|
+
clear,
|
|
97
|
+
query,
|
|
98
|
+
focus,
|
|
99
|
+
close,
|
|
100
|
+
toggle,
|
|
101
|
+
}"
|
|
102
|
+
>
|
|
103
|
+
<CommonFieldInput
|
|
104
|
+
ref="wrapperRef"
|
|
105
|
+
:active="shown"
|
|
106
|
+
:append:icon="appendIcon"
|
|
107
|
+
class="bb-select__field"
|
|
108
|
+
:class="{
|
|
109
|
+
'bb-select__field--shown': shown,
|
|
110
|
+
'bb-select__field--disabled': disabled,
|
|
111
|
+
'bb-select__field--readonly': readonly,
|
|
112
|
+
}"
|
|
113
|
+
:clearable="clearable"
|
|
114
|
+
:compact="compact"
|
|
115
|
+
:disabled="disabled"
|
|
116
|
+
:has-errors="fieldHasErrors"
|
|
117
|
+
:has-value="hasValue"
|
|
118
|
+
:has-warnings="fieldHasWarnings"
|
|
119
|
+
:loading="activatorLoading"
|
|
120
|
+
:passthrough="boxRowPassthrough(activatorLoading)"
|
|
121
|
+
:prepend:icon="declaredProps['prepend:icon']"
|
|
122
|
+
:readonly="readonly"
|
|
123
|
+
:variant="variant"
|
|
124
|
+
@click:clear="
|
|
125
|
+
() => {
|
|
126
|
+
clear();
|
|
127
|
+
nextTick(refocusActivator);
|
|
128
|
+
}
|
|
129
|
+
"
|
|
130
|
+
@container:click="toggle"
|
|
131
|
+
>
|
|
132
|
+
<!-- The activator input is a transparent overlay: its own value stays
|
|
133
|
+
empty (the visible face is this span), so the resolved selection must
|
|
134
|
+
reach AT through the name — label + selection node (below), the
|
|
135
|
+
button-select labelling pattern. aria-valuetext is not supported on
|
|
136
|
+
the combobox role, so it cannot be the value channel. -->
|
|
137
|
+
<span
|
|
138
|
+
:id="`${fieldId}__value`"
|
|
139
|
+
ref="valueRef"
|
|
140
|
+
class="bb-select__value"
|
|
141
|
+
>
|
|
142
|
+
<!-- eslint-disable vue/attributes-order -- `pt` binds LAST so a consumer listener runs after ours (PASSTHROUGH.md T17) -->
|
|
143
|
+
<input
|
|
144
|
+
:id="fieldId"
|
|
145
|
+
:aria-labelledby="`${fieldId}__label ${fieldId}__selection`"
|
|
146
|
+
:autofocus="autofocus"
|
|
147
|
+
class="bb-select__activator"
|
|
148
|
+
:disabled="disabled"
|
|
149
|
+
type="button"
|
|
150
|
+
v-bind="
|
|
151
|
+
mergeProps(
|
|
152
|
+
activatorProps,
|
|
153
|
+
passthrough.part('activator', { loading: activatorLoading })
|
|
154
|
+
)
|
|
155
|
+
"
|
|
156
|
+
/>
|
|
157
|
+
<!-- eslint-enable vue/attributes-order -->
|
|
158
|
+
|
|
159
|
+
<template v-if="multiple">
|
|
160
|
+
<span
|
|
161
|
+
v-if="usesOverflowCollapse || !isCollapsed"
|
|
162
|
+
ref="chipsContainerRef"
|
|
163
|
+
class="bb-select__chips-row"
|
|
164
|
+
:class="{
|
|
165
|
+
'bb-select__chips-row--hidden': isCollapsed,
|
|
166
|
+
'bb-select__chips-row--chips':
|
|
167
|
+
!comma && !!selectedOptions.length,
|
|
168
|
+
}"
|
|
169
|
+
>
|
|
170
|
+
<template v-if="comma">
|
|
171
|
+
<!-- eslint-disable vue/attributes-order -- `pt` binds LAST so a consumer listener runs after ours (PASSTHROUGH.md T17) -->
|
|
172
|
+
<span
|
|
173
|
+
v-for="item in selectedOptions"
|
|
174
|
+
:key="hash(item.value)"
|
|
175
|
+
class="bb-select__comma"
|
|
176
|
+
v-bind="passthrough.part('comma', {}, item.item)"
|
|
177
|
+
>
|
|
178
|
+
<!-- eslint-enable vue/attributes-order -->
|
|
179
|
+
{{ item.text }}
|
|
180
|
+
</span>
|
|
181
|
+
</template>
|
|
182
|
+
<!-- One badge per selection: removable (clearable) when
|
|
183
|
+
deselection is allowed, non-removable otherwise. The `chip`
|
|
184
|
+
slot replaces the badge outright (the badge below is its
|
|
185
|
+
fallback), so a consumer can render their own chip — a colored
|
|
186
|
+
tag, an avatar row — without reaching for `prepend`. No wrapper
|
|
187
|
+
element around it: the row itself supplies the spacing (see
|
|
188
|
+
`--chips` in index.css), so custom content needs none of our
|
|
189
|
+
class names to sit correctly. -->
|
|
190
|
+
<template v-else>
|
|
191
|
+
<!-- `v-for` on a `<template>`, not on the `<slot>` itself: a
|
|
192
|
+
`key` bound on a slot outlet is passed through as a slot
|
|
193
|
+
PROP. The template renders no element of its own. -->
|
|
194
|
+
<template
|
|
195
|
+
v-for="item in selectedOptions"
|
|
196
|
+
:key="hash(item.value)"
|
|
197
|
+
>
|
|
198
|
+
<slot
|
|
199
|
+
:deselect="() => onChipUnselected(item)"
|
|
200
|
+
:disabled="!canDeselectChips"
|
|
201
|
+
:item="item.item"
|
|
202
|
+
name="chip"
|
|
203
|
+
:text="item.text"
|
|
204
|
+
:value="item.value"
|
|
205
|
+
>
|
|
206
|
+
<BbBadge
|
|
207
|
+
class="bb-select__badge"
|
|
208
|
+
:clearable="canDeselectChips"
|
|
209
|
+
size="lg"
|
|
210
|
+
variant="secondary"
|
|
211
|
+
v-bind="passthrough.part('badge', {}, item.item)"
|
|
212
|
+
@click:clear.stop="onChipUnselected(item)"
|
|
213
|
+
>
|
|
214
|
+
{{ item.text }}
|
|
215
|
+
</BbBadge>
|
|
216
|
+
</slot>
|
|
217
|
+
</template>
|
|
218
|
+
</template>
|
|
219
|
+
</span>
|
|
220
|
+
<span v-if="isCollapsed" class="bb-select__max-reached">
|
|
221
|
+
{{ collapsedSummaryText }}
|
|
222
|
+
</span>
|
|
223
|
+
<!-- Nothing picked: the placeholder, in chips and comma mode alike,
|
|
224
|
+
gone with the first pick (owner ruling Q53.4, 2026-09-24). -->
|
|
225
|
+
<span
|
|
226
|
+
v-if="!selectedOptions.length && placeholder"
|
|
227
|
+
class="bb-select__display-value bb-select__placeholder"
|
|
228
|
+
>
|
|
229
|
+
{{ placeholder }}
|
|
230
|
+
</span>
|
|
231
|
+
</template>
|
|
232
|
+
<span
|
|
233
|
+
v-else
|
|
234
|
+
class="bb-select__display-value"
|
|
235
|
+
:class="[{ 'bb-select__placeholder': !text }]"
|
|
236
|
+
>
|
|
237
|
+
{{ text || placeholder }}
|
|
238
|
+
</span>
|
|
239
|
+
</span>
|
|
240
|
+
<!-- The value half of the activator's accessible name. A node of its
|
|
241
|
+
own, OUTSIDE `__value`, for two reasons. (1) Correctness: every node an
|
|
242
|
+
aria-labelledby chain points at is flattened with name-from-content,
|
|
243
|
+
which descends into nested interactive content — pointing at `__value`
|
|
244
|
+
swept up each chip's ✕ button aria-label, so a three-pick select
|
|
245
|
+
announced "Country Italy Remove France Remove Spain Remove" on every
|
|
246
|
+
focus. (2) `__value` stays the *visible* face and nothing else: it is
|
|
247
|
+
read back as the resolved label (innerText) by the fixture e2e specs,
|
|
248
|
+
so a visually-hidden copy nested inside it would double every reading.
|
|
249
|
+
The chips keep their ✕ buttons — those are real tab stops and must stay
|
|
250
|
+
named; the activator's name just stops reading them. -->
|
|
251
|
+
<span :id="`${fieldId}__selection`" class="bb-sr-only">{{
|
|
252
|
+
accessibleSelectionText(text)
|
|
253
|
+
}}</span>
|
|
254
|
+
<template #append:outer
|
|
255
|
+
><slot name="append:outer" v-bind="{ query, close }"
|
|
256
|
+
/></template>
|
|
257
|
+
<template #append
|
|
258
|
+
><slot name="append" v-bind="{ query, focus, close }"
|
|
259
|
+
/></template>
|
|
260
|
+
<template v-if="$slots.prefix" #prefix
|
|
261
|
+
><slot name="prefix"
|
|
262
|
+
/></template>
|
|
263
|
+
<template v-if="$slots.suffix" #suffix
|
|
264
|
+
><slot name="suffix"
|
|
265
|
+
/></template>
|
|
266
|
+
<template #prepend
|
|
267
|
+
><slot name="prepend" v-bind="{ query, focus, close }"
|
|
268
|
+
/></template>
|
|
269
|
+
<template #prepend:outer
|
|
270
|
+
><slot name="prepend:outer" v-bind="{ query, close }"
|
|
271
|
+
/></template>
|
|
272
|
+
</CommonFieldInput>
|
|
273
|
+
|
|
274
|
+
<!-- The value channel: `form` (the one native attribute a hidden input
|
|
275
|
+
reads) routes here from the consumer's attributes. -->
|
|
276
|
+
<input
|
|
277
|
+
v-for="input in hiddenInputs"
|
|
278
|
+
:key="input.value"
|
|
279
|
+
v-bind="mergeProps(input, passthrough.controlAttrs)"
|
|
280
|
+
/>
|
|
281
|
+
</template>
|
|
282
|
+
|
|
83
283
|
<template v-if="$slots.header" #header="data">
|
|
84
284
|
<slot name="header" v-bind="data" />
|
|
85
285
|
</template>
|
|
86
286
|
<template v-if="$slots.footer" #footer="data">
|
|
87
287
|
<slot name="footer" v-bind="data" />
|
|
88
288
|
</template>
|
|
89
|
-
<template #append-outer="data">
|
|
90
|
-
<slot name="append-outer" v-bind="data" />
|
|
91
|
-
</template>
|
|
92
|
-
<template #append="data">
|
|
93
|
-
<slot name="append" v-bind="data" />
|
|
94
|
-
</template>
|
|
95
|
-
<template v-if="$slots.prefix" #prefix>
|
|
96
|
-
<slot name="prefix" />
|
|
97
|
-
</template>
|
|
98
|
-
<template v-if="$slots.suffix" #suffix>
|
|
99
|
-
<slot name="suffix" />
|
|
100
|
-
</template>
|
|
101
|
-
<template #prepend="data">
|
|
102
|
-
<slot name="prepend" v-bind="data" />
|
|
103
|
-
</template>
|
|
104
|
-
<template #prepend-outer="data">
|
|
105
|
-
<slot name="prepend-outer" v-bind="data" />
|
|
106
|
-
</template>
|
|
107
289
|
<template #loading="data">
|
|
108
290
|
<slot name="loading" v-bind="data" />
|
|
109
291
|
</template>
|
|
110
|
-
<template #
|
|
111
|
-
<slot name="
|
|
292
|
+
<template #empty="data">
|
|
293
|
+
<slot name="empty" v-bind="data" />
|
|
112
294
|
</template>
|
|
113
|
-
<template #option="data">
|
|
114
|
-
<slot name="option" v-bind="data" />
|
|
295
|
+
<template v-if="$slots.option" #option="data">
|
|
296
|
+
<slot :has-errors="fieldHasErrors" name="option" v-bind="data" />
|
|
115
297
|
</template>
|
|
116
298
|
<template #group="data">
|
|
117
299
|
<slot name="group" v-bind="data" />
|
|
118
300
|
</template>
|
|
119
|
-
</
|
|
301
|
+
</BbSelectPopover>
|
|
120
302
|
</template>
|
|
121
|
-
</
|
|
303
|
+
</CommonField>
|
|
122
304
|
</template>
|
|
123
305
|
|
|
124
306
|
<script setup lang="ts" generic="T = any">
|
|
125
|
-
import {
|
|
126
|
-
|
|
127
|
-
|
|
307
|
+
import {
|
|
308
|
+
computed,
|
|
309
|
+
getCurrentInstance,
|
|
310
|
+
mergeProps,
|
|
311
|
+
nextTick,
|
|
312
|
+
onMounted,
|
|
313
|
+
onUnmounted,
|
|
314
|
+
ref,
|
|
315
|
+
useAttrs,
|
|
316
|
+
watch,
|
|
317
|
+
} from 'vue';
|
|
318
|
+
import CommonField from '../CommonField/CommonField.vue';
|
|
319
|
+
import CommonFieldInput from '../CommonFieldInput/CommonFieldInput.vue';
|
|
320
|
+
import BbBadge from '../BbBadge/BbBadge.vue';
|
|
321
|
+
import BbSelectPopover from '../BbSelectPopover/BbSelectPopover.vue';
|
|
322
|
+
import {
|
|
323
|
+
BB_SELECT_POPOVER_PT,
|
|
324
|
+
type BbSelectResolvedOption,
|
|
325
|
+
} from '../BbSelectPopover/types';
|
|
128
326
|
import { useMobile } from '@/composables/useMobile';
|
|
129
|
-
import {
|
|
327
|
+
import { useConfig } from '@/composables/useConfig';
|
|
328
|
+
import { useFormBinding } from '@/composables/useFormBinding';
|
|
329
|
+
import { useLocale } from '@/composables/useLocale';
|
|
330
|
+
import {
|
|
331
|
+
formControlPtActive,
|
|
332
|
+
SELECT_CONTROL_NATIVE_ATTRS,
|
|
333
|
+
usePassthrough,
|
|
334
|
+
} from '@/composables/usePassthrough';
|
|
130
335
|
import { removedPropsFor } from '@/deprecation/removedProps';
|
|
131
336
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
337
|
+
import { hasVnodeListener } from '@/utilities/functions/hasVnodeListener';
|
|
132
338
|
import { isNotEmpty } from '@/utilities/functions/isNotEmpty';
|
|
133
|
-
import
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
339
|
+
import { throttle } from '@/utilities/functions/throttle';
|
|
340
|
+
import { when } from '@/utilities/functions/when';
|
|
341
|
+
import { hash } from '@/utilities/functions/hash';
|
|
342
|
+
import { reject } from '@/utilities/functions/reject';
|
|
343
|
+
import chevronDownSvg from '@/assets/svgs/chevron_down.svg?raw';
|
|
344
|
+
import {
|
|
345
|
+
BB_SELECT_PT,
|
|
346
|
+
type BbSelectProps,
|
|
347
|
+
type BbSelectEvents,
|
|
348
|
+
type BbSelectSlots,
|
|
349
|
+
} from './types';
|
|
350
|
+
|
|
351
|
+
defineOptions({ inheritAttrs: false });
|
|
352
|
+
const declaredProps = withDefaults(defineProps<BbSelectProps<T>>(), {
|
|
353
|
+
// `undefined` (declared, not omitted) keeps `adaptive` three-state all the
|
|
354
|
+
// way to BbSelectPopover: it disables Vue's absent→`false` Boolean cast
|
|
355
|
+
// (which would pass an explicit `false` and defeat the global
|
|
356
|
+
// `config.adaptive`), while keeping the Boolean type so the valueless
|
|
357
|
+
// `adaptive` shorthand still resolves to `true`.
|
|
141
358
|
adaptive: undefined,
|
|
359
|
+
// Same three-state reason as `adaptive`: an absent `disable-writing` must
|
|
360
|
+
// reach the popover as `undefined` so it can mean `'auto'` there; the
|
|
361
|
+
// valueless shorthand still casts to `true`.
|
|
362
|
+
disableWriting: undefined,
|
|
142
363
|
// Same three-state reason as `adaptive`: `prefill` is typed
|
|
143
364
|
// `boolean | 'interaction'`, so leaving it out lets Vue's absent→`false`
|
|
144
|
-
// Boolean cast
|
|
145
|
-
//
|
|
146
|
-
// `
|
|
147
|
-
//
|
|
365
|
+
// Boolean cast turn "not set" into an explicit `false` — which is how every
|
|
366
|
+
// BbSelect once silently ran with `prefill: false`. Harmless while `false`
|
|
367
|
+
// behaved like `'interaction'`; load-bearing now that `false` means
|
|
368
|
+
// search-first. Unset resolves to `'interaction'` in `computedPrefill`.
|
|
148
369
|
prefill: undefined,
|
|
149
370
|
selectable: true,
|
|
150
371
|
});
|
|
151
372
|
|
|
152
|
-
const
|
|
373
|
+
const declaredEmit = defineEmits<BbSelectEvents>();
|
|
153
374
|
|
|
154
375
|
defineSlots<BbSelectSlots<T>>();
|
|
376
|
+
// Inside a BbForm the field joins it (Q54.4): `props` / `emit` are bound.
|
|
377
|
+
const {
|
|
378
|
+
props,
|
|
379
|
+
emit,
|
|
380
|
+
showAsterisk,
|
|
381
|
+
errors: fieldErrors,
|
|
382
|
+
model: fieldModel,
|
|
383
|
+
} = useFormBinding(declaredProps, declaredEmit, {
|
|
384
|
+
componentName: 'BbSelect',
|
|
385
|
+
identifierFallback: () => declaredProps.label,
|
|
386
|
+
leaveOn: 'inactive',
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
const config = useConfig();
|
|
390
|
+
const { t } = useLocale();
|
|
155
391
|
|
|
156
392
|
if (process.env.NODE_ENV !== 'production')
|
|
157
393
|
warnRemovedAttrs('BbSelect', removedPropsFor('BbSelect'));
|
|
@@ -159,16 +395,297 @@ if (process.env.NODE_ENV !== 'production')
|
|
|
159
395
|
const active = ref(false);
|
|
160
396
|
const { isMobile } = useMobile();
|
|
161
397
|
const showHint = computed(() => props.persistentHint || active.value);
|
|
162
|
-
const isClearable = computed(
|
|
163
|
-
() => Boolean(props.clearable) && isNotEmpty(props.modelValue)
|
|
164
|
-
);
|
|
165
398
|
const hasValue = computed(() => isNotEmpty(props.modelValue));
|
|
399
|
+
const isClearable = computed(() => Boolean(props.clearable) && hasValue.value);
|
|
166
400
|
const resolvedLabelMode = computed(
|
|
167
401
|
() => props.labelMode ?? config.defaultInputLabelMode
|
|
168
402
|
);
|
|
169
403
|
|
|
170
404
|
/**
|
|
171
|
-
*
|
|
405
|
+
* Whether the options surface is showing: on from the popover's `show` to its
|
|
406
|
+
* `hide`. The `active` event also fires on plain focus, so it cannot stand in.
|
|
407
|
+
*/
|
|
408
|
+
const open = ref(false);
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Passthrough (plans/passthrough/BbSelect.md). `panel` and `option` are the popover's: their raw entries are forwarded to it under the same words (`panel` → its `panel`, the painted bubble), so `option:selected` is resolved per option where the selection is known.
|
|
412
|
+
*/
|
|
413
|
+
const passthrough = usePassthrough({
|
|
414
|
+
component: 'BbSelect',
|
|
415
|
+
attrs: useAttrs(),
|
|
416
|
+
controlAttrs: SELECT_CONTROL_NATIVE_ATTRS,
|
|
417
|
+
props,
|
|
418
|
+
parts: BB_SELECT_PT.parts,
|
|
419
|
+
states: BB_SELECT_PT.states,
|
|
420
|
+
active: {
|
|
421
|
+
...formControlPtActive(props, () => hasValue.value),
|
|
422
|
+
open: () => open.value,
|
|
423
|
+
},
|
|
424
|
+
});
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* The popover's `pt`. The option rows go with every popover state: it
|
|
428
|
+
* resolves `disabled` per option (and every option is disabled when this
|
|
429
|
+
* control is). The surface (`panel`, `sheet`, `input`, `list`) goes WITHOUT `disabled`:
|
|
430
|
+
* the popover has no component-level `disabled`, so an entry handed over
|
|
431
|
+
* under its own word never resolved there — left out of the child's states,
|
|
432
|
+
* it is resolved here, from this control's `disabled` (a family state,
|
|
433
|
+
* component-wide on every part).
|
|
434
|
+
*/
|
|
435
|
+
const popoverPt = () => ({
|
|
436
|
+
...passthrough.forward(
|
|
437
|
+
['panel', 'sheet', 'header', 'footer', 'input', 'list'],
|
|
438
|
+
BB_SELECT_POPOVER_PT.states.filter((state) => state !== 'disabled')
|
|
439
|
+
),
|
|
440
|
+
...passthrough.forward(
|
|
441
|
+
['option', 'itemText', 'itemIcon', 'itemDescription'],
|
|
442
|
+
BB_SELECT_POPOVER_PT.states
|
|
443
|
+
),
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* The box row's parts inside the activator slot, where the popover's own fetch
|
|
448
|
+
* is known: `loading` there is the `loading` prop OR the items the popover is
|
|
449
|
+
* fetching, so `pt:box:loading` / `pt:spinner:loading` / … follow the spinner.
|
|
450
|
+
* The frame (`root`, `label`, `hint`, `message`) sits outside the slot and
|
|
451
|
+
* follows the `loading` prop only — the popover's internal fetch is not public
|
|
452
|
+
* state. `part()` caches one binding per state combination.
|
|
453
|
+
*/
|
|
454
|
+
const BOX_ROW_PARTS = [
|
|
455
|
+
'box',
|
|
456
|
+
'icon',
|
|
457
|
+
'spinner',
|
|
458
|
+
'clear',
|
|
459
|
+
'prefix',
|
|
460
|
+
'suffix',
|
|
461
|
+
] as const;
|
|
462
|
+
const boxRowPassthrough = (activatorLoading: boolean) =>
|
|
463
|
+
Object.fromEntries(
|
|
464
|
+
BOX_ROW_PARTS.map((part) => [
|
|
465
|
+
part,
|
|
466
|
+
passthrough.part(part, { loading: activatorLoading }),
|
|
467
|
+
])
|
|
468
|
+
);
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Sheet chrome: default the adaptive off-canvas title to the field label.
|
|
472
|
+
* Consumer `offCanvasProps` spread last so an explicit `title` (or any other
|
|
473
|
+
* sheet prop) still wins — same shape as BbSelectPopover's `offcanvasBindings`.
|
|
474
|
+
*/
|
|
475
|
+
const resolvedOffCanvasProps = computed(() => ({
|
|
476
|
+
title: props.label,
|
|
477
|
+
...props.offCanvasProps,
|
|
478
|
+
}));
|
|
479
|
+
|
|
480
|
+
/** The chevron unless the consumer sets their own append icon. */
|
|
481
|
+
const appendIcon = computed(() =>
|
|
482
|
+
props['append:icon'] === undefined ? chevronDownSvg : props['append:icon']
|
|
483
|
+
);
|
|
484
|
+
|
|
485
|
+
/** No cap on the chip labels unless `maxSelectedLabels` is set. */
|
|
486
|
+
const resolvedMaxSelectedLabels = computed(() =>
|
|
487
|
+
props.maxSelectedLabels === undefined ? Infinity : props.maxSelectedLabels
|
|
488
|
+
);
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* A select with a value always prefills (the popover resolves the labels of
|
|
492
|
+
* the selection); without one it follows `prefill`, `'interaction'` unless set.
|
|
493
|
+
*/
|
|
494
|
+
const computedPrefill = computed(() => {
|
|
495
|
+
if (hasValue.value) return true;
|
|
496
|
+
return props.prefill ?? 'interaction';
|
|
497
|
+
});
|
|
498
|
+
|
|
499
|
+
const wrapperRef = ref<InstanceType<typeof CommonFieldInput>>();
|
|
500
|
+
const valueRef = ref<HTMLElement>();
|
|
501
|
+
const chipsContainerRef = ref<HTMLElement>();
|
|
502
|
+
|
|
503
|
+
const selectedCount = computed(() => {
|
|
504
|
+
if (!props.multiple) return 0;
|
|
505
|
+
if (!Array.isArray(props.modelValue)) return props.modelValue != null ? 1 : 0;
|
|
506
|
+
return props.modelValue.length;
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
const usesCountLimit = computed(
|
|
510
|
+
() => resolvedMaxSelectedLabels.value !== Infinity
|
|
511
|
+
);
|
|
512
|
+
const usesOverflowCollapse = computed(() => !usesCountLimit.value);
|
|
513
|
+
const isOverflowing = ref(false);
|
|
514
|
+
const chipsLeftInsetCompensation = ref(0);
|
|
515
|
+
const hasMeasuredChipsInsetCompensation = ref(false);
|
|
516
|
+
const isCollapsed = computed(() => {
|
|
517
|
+
if (selectedCount.value <= 1) return false;
|
|
518
|
+
if (usesCountLimit.value) {
|
|
519
|
+
return selectedCount.value > resolvedMaxSelectedLabels.value;
|
|
520
|
+
}
|
|
521
|
+
return isOverflowing.value;
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
const canDeselectChips = computed(() => !props.disabled && !props.readonly);
|
|
525
|
+
|
|
526
|
+
const onChipUnselected = (option: BbSelectResolvedOption) => {
|
|
527
|
+
if (!canDeselectChips.value) return;
|
|
528
|
+
if (props.multiple) {
|
|
529
|
+
const valueToEmit = reject(props.modelValue, option.value);
|
|
530
|
+
emit('update:modelValue', valueToEmit);
|
|
531
|
+
} else {
|
|
532
|
+
emit('update:modelValue', null);
|
|
533
|
+
}
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
const refocusActivator = () => {
|
|
537
|
+
(wrapperRef.value?.$el as HTMLElement | undefined)
|
|
538
|
+
?.querySelector<HTMLButtonElement>('.bb-select__activator')
|
|
539
|
+
?.focus();
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
const collapsedSummaryText = computed(() => {
|
|
543
|
+
if (props.selectedLabelsFn) {
|
|
544
|
+
return props.selectedLabelsFn(selectedCount.value);
|
|
545
|
+
}
|
|
546
|
+
return t('select.multipleMaxReached', selectedCount.value).value;
|
|
547
|
+
});
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* The selection half of the activator's accessible name, mirroring what the
|
|
551
|
+
* control visually shows — `text` is already the ", "-joined display text of
|
|
552
|
+
* every selection (single or multiple), a collapsed row shows its summary
|
|
553
|
+
* instead, and a single select falls back to the placeholder exactly like
|
|
554
|
+
* `__display-value` does. Multiple with nothing picked shows the placeholder
|
|
555
|
+
* too (Q53.4), so it names the empty state the same way.
|
|
556
|
+
*/
|
|
557
|
+
const accessibleSelectionText = (text: string) => {
|
|
558
|
+
if (props.multiple && isCollapsed.value) return collapsedSummaryText.value;
|
|
559
|
+
return text || props.placeholder || '';
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
const resetChipsInsetCompensation = () => {
|
|
563
|
+
hasMeasuredChipsInsetCompensation.value = false;
|
|
564
|
+
chipsLeftInsetCompensation.value = 0;
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
const updateChipsInsetCompensation = () => {
|
|
568
|
+
if (hasMeasuredChipsInsetCompensation.value || !chipsContainerRef.value) {
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
const chipsStyles = getComputedStyle(chipsContainerRef.value);
|
|
572
|
+
const chipsMarginLeft = Number.parseFloat(chipsStyles.marginLeft || '0');
|
|
573
|
+
chipsLeftInsetCompensation.value = Math.max(0, -chipsMarginLeft);
|
|
574
|
+
hasMeasuredChipsInsetCompensation.value = true;
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
const checkOverflow = () => {
|
|
578
|
+
if (
|
|
579
|
+
!usesOverflowCollapse.value ||
|
|
580
|
+
!chipsContainerRef.value ||
|
|
581
|
+
!valueRef.value ||
|
|
582
|
+
selectedCount.value <= 1
|
|
583
|
+
) {
|
|
584
|
+
isOverflowing.value = false;
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
updateChipsInsetCompensation();
|
|
588
|
+
const availableWidth =
|
|
589
|
+
valueRef.value.clientWidth + chipsLeftInsetCompensation.value;
|
|
590
|
+
// clientWidth/scrollWidth are integer-rounded while availableWidth is
|
|
591
|
+
// fractional (the negative chips margin is sub-pixel), so compare with a 1px
|
|
592
|
+
// tolerance — otherwise rounding alone reports a phantom overflow and the row
|
|
593
|
+
// collapses to the summary even with plenty of room.
|
|
594
|
+
isOverflowing.value =
|
|
595
|
+
chipsContainerRef.value.scrollWidth > availableWidth + 1;
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
const scheduleOverflowCheck = throttle(checkOverflow, 100, {
|
|
599
|
+
leading: true,
|
|
600
|
+
trailing: true,
|
|
601
|
+
});
|
|
602
|
+
|
|
603
|
+
let resizeObserver: ResizeObserver | null = null;
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Overflow collapsing is only in play while `maxSelectedLabels` is `Infinity`
|
|
607
|
+
* (otherwise the count limit decides), so the observer follows that flag rather
|
|
608
|
+
* than being wired once at mount: a select that mounts with a finite limit and
|
|
609
|
+
* later has it raised to `Infinity` would otherwise never get an observer at
|
|
610
|
+
* all, leaving `isOverflowing` false forever and the chips row spilling out of
|
|
611
|
+
* the control until the component remounts.
|
|
612
|
+
*/
|
|
613
|
+
const syncOverflowObserver = () => {
|
|
614
|
+
resizeObserver?.disconnect();
|
|
615
|
+
resizeObserver = null;
|
|
616
|
+
if (!usesOverflowCollapse.value) return;
|
|
617
|
+
|
|
618
|
+
resizeObserver = new ResizeObserver(scheduleOverflowCheck);
|
|
619
|
+
if (valueRef.value) resizeObserver.observe(valueRef.value);
|
|
620
|
+
nextTick(() => {
|
|
621
|
+
scheduleOverflowCheck();
|
|
622
|
+
});
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
onMounted(syncOverflowObserver);
|
|
626
|
+
watch(usesOverflowCollapse, syncOverflowObserver, { flush: 'post' });
|
|
627
|
+
|
|
628
|
+
onUnmounted(() => {
|
|
629
|
+
resizeObserver?.disconnect();
|
|
630
|
+
scheduleOverflowCheck.cancel();
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
watch(
|
|
634
|
+
() => [props.modelValue, resolvedMaxSelectedLabels.value] as const,
|
|
635
|
+
() => {
|
|
636
|
+
if (!usesOverflowCollapse.value) return;
|
|
637
|
+
nextTick(() => {
|
|
638
|
+
scheduleOverflowCheck();
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
);
|
|
642
|
+
|
|
643
|
+
watch(
|
|
644
|
+
() => [props.compact, props.comma, props['prepend:icon']] as const,
|
|
645
|
+
() => {
|
|
646
|
+
if (!usesOverflowCollapse.value) return;
|
|
647
|
+
resetChipsInsetCompensation();
|
|
648
|
+
nextTick(() => {
|
|
649
|
+
scheduleOverflowCheck();
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
);
|
|
653
|
+
|
|
654
|
+
const makeInputValue = when(
|
|
655
|
+
(item: unknown) => typeof item !== 'string',
|
|
656
|
+
JSON.stringify
|
|
657
|
+
);
|
|
658
|
+
|
|
659
|
+
// Empty selection (null/undefined/[]) posts NO field — mirroring a native
|
|
660
|
+
// <select multiple> with nothing chosen — instead of the literal "null".
|
|
661
|
+
// Note `required` on input[type=hidden] is barred from constraint validation
|
|
662
|
+
// by the HTML spec; it is kept for form-introspection only.
|
|
663
|
+
const hiddenInputs = computed(() =>
|
|
664
|
+
(props.multiple
|
|
665
|
+
? ([] as any[]).concat(props.modelValue ?? [])
|
|
666
|
+
: [props.modelValue]
|
|
667
|
+
)
|
|
668
|
+
.filter((current) => current !== null && current !== undefined)
|
|
669
|
+
.map((current) => ({
|
|
670
|
+
disabled: props.disabled,
|
|
671
|
+
name: props.name,
|
|
672
|
+
required: props.required,
|
|
673
|
+
type: 'hidden',
|
|
674
|
+
value: makeInputValue(current),
|
|
675
|
+
}))
|
|
676
|
+
);
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* The popover's events, re-emitted; focus / active drive the hint and
|
|
680
|
+
* show / hide drive `open`.
|
|
681
|
+
*
|
|
682
|
+
* `option:add` is the exception: forwarded ONLY when the consumer bound it on
|
|
683
|
+
* this select. The popover decides `disable-writing="auto"` off its own vnode
|
|
684
|
+
* props — a creatable select keeps its search field — so an unconditional
|
|
685
|
+
* forward would make every BbSelect look creatable to it. Read at render
|
|
686
|
+
* (`popoverListeners()`), so a conditionally bound listener is seen as it is
|
|
687
|
+
* now; the two objects are prebuilt so the popover's props keep their identity
|
|
688
|
+
* across renders.
|
|
172
689
|
*/
|
|
173
690
|
const eventListeners = {
|
|
174
691
|
onBlur: (event: FocusEvent) => {
|
|
@@ -177,7 +694,6 @@ const eventListeners = {
|
|
|
177
694
|
},
|
|
178
695
|
onChange: (event: Event) => emit('change', event),
|
|
179
696
|
onClick: (event: MouseEvent) => emit('click', event),
|
|
180
|
-
'onOption:add': (text: string) => emit('option:add', text),
|
|
181
697
|
onFocus: (event: FocusEvent) => {
|
|
182
698
|
active.value = true;
|
|
183
699
|
emit('focus', event);
|
|
@@ -186,6 +702,16 @@ const eventListeners = {
|
|
|
186
702
|
active.value = true;
|
|
187
703
|
emit('active');
|
|
188
704
|
},
|
|
705
|
+
onShow: () => {
|
|
706
|
+
open.value = true;
|
|
707
|
+
emit('show');
|
|
708
|
+
},
|
|
709
|
+
onShown: () => emit('shown'),
|
|
710
|
+
onHide: () => {
|
|
711
|
+
open.value = false;
|
|
712
|
+
emit('hide');
|
|
713
|
+
},
|
|
714
|
+
onHidden: () => emit('hidden'),
|
|
189
715
|
onInactive: () => {
|
|
190
716
|
active.value = false;
|
|
191
717
|
emit('inactive');
|
|
@@ -193,6 +719,15 @@ const eventListeners = {
|
|
|
193
719
|
onInput: (event: Event) => emit('input', event),
|
|
194
720
|
'onUpdate:modelValue': (value: any) => emit('update:modelValue', value),
|
|
195
721
|
};
|
|
722
|
+
const eventListenersWithAdd = {
|
|
723
|
+
...eventListeners,
|
|
724
|
+
'onOption:add': (text: string) => emit('option:add', text),
|
|
725
|
+
};
|
|
726
|
+
const instance = getCurrentInstance();
|
|
727
|
+
const popoverListeners = () =>
|
|
728
|
+
hasVnodeListener(instance, 'option:add')
|
|
729
|
+
? eventListenersWithAdd
|
|
730
|
+
: eventListeners;
|
|
196
731
|
</script>
|
|
197
732
|
|
|
198
733
|
<style lang="postcss">
|
|
@@ -203,15 +738,194 @@ const eventListeners = {
|
|
|
203
738
|
## Types
|
|
204
739
|
|
|
205
740
|
```ts
|
|
741
|
+
import type { BbSelectItemProps } from '@/types/ItemProps';
|
|
742
|
+
import type { InputVariantType } from '@/types/InputVariant';
|
|
743
|
+
import type {
|
|
744
|
+
PtNoInfer,
|
|
745
|
+
FormControlPtState,
|
|
746
|
+
PtItemCtx,
|
|
747
|
+
PtItemMap,
|
|
748
|
+
PtItemResult,
|
|
749
|
+
PtValue,
|
|
750
|
+
} from '@/types/passthrough';
|
|
206
751
|
import type { HTMLAttributes, InputHTMLAttributes } from 'vue';
|
|
207
|
-
import type {
|
|
752
|
+
import type { FieldLayout } from '@/types/FieldLayout';
|
|
208
753
|
import type { ItemAccessor } from '@/types/ItemAccessor';
|
|
209
754
|
import type { IconType } from '@/types/Icon';
|
|
210
|
-
import type { BaseSelectEvents } from '../BbBaseSelect/types';
|
|
211
755
|
import type { BbSelectResolvedOption } from '../BbSelectPopover/types';
|
|
212
756
|
import type { BbOffCanvasProps } from '../BbOffCanvas/types';
|
|
757
|
+
import type { FormFieldProps } from '@/composables/useFormBinding';
|
|
213
758
|
|
|
759
|
+
/**
|
|
760
|
+
* Passthrough parts of `BbSelect` (plans/passthrough/BbSelect.md): the text-
|
|
761
|
+
* control family parts, plus the options surface's, forwarded to its
|
|
762
|
+
* `BbSelectPopover`.
|
|
763
|
+
*
|
|
764
|
+
* Per-item functions: on the instance, an option part (`option`, `itemText`, `itemIcon`, `itemDescription`) and a selection part (`badge`, `comma` — called here, per selected value, with its raw item) also accept `({ item, selected, … }) => PtValue | false | null | undefined` — `item` is the raw item of that option, and every state a boolean beside it, on for it (`selected`, `disabled`, …) — in the `pt` object or the `:pt:<part>` attribute, never on a `<part>:<state>` key and never in the global map or a scope (they ship as JSON). The function travels to the popover with the part and is called there, per option; its result is merged last, after every state entry, through the same deduper; a falsy result leaves the option as it was. See the passthrough guide, _Per-item functions_.
|
|
765
|
+
*
|
|
766
|
+
* @describedBy BbSelectPopoverPtPart
|
|
767
|
+
* @describedBy TextControlPtPart
|
|
768
|
+
* @part activator - The button you act on to open the options — the field's
|
|
769
|
+
* control (not a text field: `data-test` fits here, `autocomplete` does
|
|
770
|
+
* not). The chevron is chrome. It is `activator`, not the family's `input`:
|
|
771
|
+
* the field itself is a button (the date / time inputs' trigger is the same
|
|
772
|
+
* word).
|
|
773
|
+
* @part input - The search field inside the options surface, when it shows
|
|
774
|
+
* one (see `disable-writing`) — handed to the `BbSelectPopover` as its own
|
|
775
|
+
* `pt:input`. Its ✕ is chrome.
|
|
776
|
+
* @part panel - The options surface — the popover's painted bubble on
|
|
777
|
+
* desktop, the sheet itself on a phone.
|
|
778
|
+
* @part sheet - The bottom sheet the options open in on a phone only.
|
|
779
|
+
* @part header - The band around your `#header` slot: at the top of the
|
|
780
|
+
* flyout on desktop, the sheet's header on a phone.
|
|
781
|
+
* @part footer - The band around your `#footer` slot: at the bottom of the
|
|
782
|
+
* flyout on desktop, the sheet's footer on a phone.
|
|
783
|
+
* @part badge - Each selected value's `BbBadge` root with `multiple` — a
|
|
784
|
+
* broadcast resolved per value. The badge's own ✕ is chrome, never
|
|
785
|
+
* `clear`. Not rendered when the `#chip` slot replaces it, nor in `comma`
|
|
786
|
+
* mode.
|
|
787
|
+
* @part comma - Each selected value with `multiple` and `comma` — a broadcast
|
|
788
|
+
* resolved per value.
|
|
789
|
+
*/
|
|
790
|
+
export type BbSelectPtPart =
|
|
791
|
+
| 'root'
|
|
792
|
+
| 'label'
|
|
793
|
+
| 'description'
|
|
794
|
+
| 'message'
|
|
795
|
+
| 'hint'
|
|
796
|
+
| 'box'
|
|
797
|
+
| 'activator'
|
|
798
|
+
| 'input'
|
|
799
|
+
| 'icon'
|
|
800
|
+
| 'spinner'
|
|
801
|
+
| 'prefix'
|
|
802
|
+
| 'suffix'
|
|
803
|
+
| 'clear'
|
|
804
|
+
| 'panel'
|
|
805
|
+
| 'sheet'
|
|
806
|
+
| 'header'
|
|
807
|
+
| 'footer'
|
|
808
|
+
| 'list'
|
|
809
|
+
| 'option'
|
|
810
|
+
| 'itemText'
|
|
811
|
+
| 'itemIcon'
|
|
812
|
+
| 'itemDescription'
|
|
813
|
+
| 'badge'
|
|
814
|
+
| 'comma';
|
|
815
|
+
/** The field and surface parts — they take a `PtValue` only. */
|
|
816
|
+
export type BbSelectFieldPtPart =
|
|
817
|
+
| 'root'
|
|
818
|
+
| 'label'
|
|
819
|
+
| 'description'
|
|
820
|
+
| 'message'
|
|
821
|
+
| 'hint'
|
|
822
|
+
| 'box'
|
|
823
|
+
| 'activator'
|
|
824
|
+
| 'input'
|
|
825
|
+
| 'icon'
|
|
826
|
+
| 'spinner'
|
|
827
|
+
| 'prefix'
|
|
828
|
+
| 'suffix'
|
|
829
|
+
| 'clear'
|
|
830
|
+
| 'panel'
|
|
831
|
+
| 'sheet'
|
|
832
|
+
| 'header'
|
|
833
|
+
| 'footer'
|
|
834
|
+
| 'list';
|
|
835
|
+
/**
|
|
836
|
+
* The option parts and the selection parts — broadcasts resolved per option
|
|
837
|
+
* or per selected value; their base key also takes a per-item function.
|
|
838
|
+
*/
|
|
839
|
+
export type BbSelectOptionPtPart =
|
|
840
|
+
| 'option'
|
|
841
|
+
| 'itemText'
|
|
842
|
+
| 'itemIcon'
|
|
843
|
+
| 'itemDescription'
|
|
844
|
+
| 'badge'
|
|
845
|
+
| 'comma';
|
|
846
|
+
/**
|
|
847
|
+
* Passthrough states of `BbSelect`, true while the matching `--` modifier is on.
|
|
848
|
+
*
|
|
849
|
+
* @state selected - Per node, on `option` and its `item-*` parts: a chosen
|
|
850
|
+
* option.
|
|
851
|
+
* @state disabled - Component-wide while the select is `disabled`; also per
|
|
852
|
+
* node, on `option` and its `item-*` parts: an option that is disabled.
|
|
853
|
+
* @state open - Component-wide: the options surface is showing.
|
|
854
|
+
*/
|
|
855
|
+
export type BbSelectPtState = FormControlPtState | 'open' | 'selected';
|
|
856
|
+
/** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
|
|
857
|
+
export const BB_SELECT_PT = {
|
|
858
|
+
parts: [
|
|
859
|
+
// The family's words with `activator` where the text controls say
|
|
860
|
+
// `input` — BbSelect's control is a button that opens the options;
|
|
861
|
+
// its `input` is the popover's search field.
|
|
862
|
+
'root',
|
|
863
|
+
'label',
|
|
864
|
+
'description',
|
|
865
|
+
'message',
|
|
866
|
+
'hint',
|
|
867
|
+
'box',
|
|
868
|
+
'activator',
|
|
869
|
+
'input',
|
|
870
|
+
'icon',
|
|
871
|
+
'spinner',
|
|
872
|
+
'prefix',
|
|
873
|
+
'suffix',
|
|
874
|
+
'clear',
|
|
875
|
+
'panel',
|
|
876
|
+
'sheet',
|
|
877
|
+
'header',
|
|
878
|
+
'footer',
|
|
879
|
+
'list',
|
|
880
|
+
'option',
|
|
881
|
+
'itemText',
|
|
882
|
+
'itemIcon',
|
|
883
|
+
'itemDescription',
|
|
884
|
+
'badge',
|
|
885
|
+
'comma',
|
|
886
|
+
],
|
|
887
|
+
states: [
|
|
888
|
+
'hasValue',
|
|
889
|
+
'selected',
|
|
890
|
+
'readonly',
|
|
891
|
+
'disabled',
|
|
892
|
+
'warnings',
|
|
893
|
+
'errors',
|
|
894
|
+
'open',
|
|
895
|
+
'loading',
|
|
896
|
+
],
|
|
897
|
+
} as const satisfies {
|
|
898
|
+
parts: readonly BbSelectPtPart[];
|
|
899
|
+
states: readonly BbSelectPtState[];
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
// Spelled INLINE with this component's own unions (Vue's SFC type resolver
|
|
903
|
+
// does not substitute a generic alias's type parameters — PASSTHROUGH.md T20).
|
|
904
|
+
// Two mapped types, never `Partial<Record<…>>`: the lint autofix rewrites one
|
|
905
|
+
// into the other and the SFC resolver reads only the mapped spelling (T23).
|
|
906
|
+
/* eslint-disable @typescript-eslint/consistent-indexed-object-style */
|
|
214
907
|
export type BbSelectProps<T> = {
|
|
908
|
+
[K in
|
|
909
|
+
| `pt:${BbSelectFieldPtPart}`
|
|
910
|
+
| `pt:${BbSelectPtPart}:${BbSelectPtState}`]?: PtValue;
|
|
911
|
+
} & {
|
|
912
|
+
// The option parts also take a per-item function, typed on this select's
|
|
913
|
+
// item — a literal function type, not `PtItemFn` (T23).
|
|
914
|
+
[K in `pt:${BbSelectOptionPtPart}`]?:
|
|
915
|
+
| PtValue
|
|
916
|
+
| ((ctx: PtItemCtx<PtNoInfer<T>, BbSelectPtState>) => PtItemResult);
|
|
917
|
+
} & {
|
|
918
|
+
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
919
|
+
/**
|
|
920
|
+
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
921
|
+
* without the prefix. See the `pt:<part>` row.
|
|
922
|
+
*/
|
|
923
|
+
pt?: PtItemMap<
|
|
924
|
+
BbSelectPtPart,
|
|
925
|
+
BbSelectOptionPtPart,
|
|
926
|
+
BbSelectPtState,
|
|
927
|
+
PtNoInfer<T>
|
|
928
|
+
>;
|
|
215
929
|
/**
|
|
216
930
|
* When `true`, the options panel opens as a bottom off-canvas sheet on mobile
|
|
217
931
|
* viewports instead of a floating popover; on desktop it stays a popover.
|
|
@@ -229,21 +943,39 @@ export type BbSelectProps<T> = {
|
|
|
229
943
|
description?: string;
|
|
230
944
|
|
|
231
945
|
/**
|
|
946
|
+
* Props for the phone sheet. A `pt` inside it, object or colon keys, styles
|
|
947
|
+
* only that sheet.
|
|
948
|
+
*
|
|
232
949
|
* Extra props forwarded to the `BbOffCanvas` sheet when `adaptive` is active on mobile.
|
|
950
|
+
*
|
|
951
|
+
* A `pt` inside it styles ONLY the sheet, in `BbOffCanvas`'s part words
|
|
952
|
+
* (`root`, `header`, `title`, `description`, `content`, `footer`, `close`;
|
|
953
|
+
* state `open`), object (`{ pt: { header: '…' } }`) or colon keys
|
|
954
|
+
* (`{ 'pt:header': '…' }`) alike. It merges after what this component
|
|
955
|
+
* forwards to its sheet, so it wins a conflict and drops nothing — see the
|
|
956
|
+
* passthrough guide § Inside the sheet.
|
|
233
957
|
*/
|
|
234
958
|
offCanvasProps?: Partial<BbOffCanvasProps>;
|
|
235
959
|
|
|
236
960
|
/**
|
|
237
961
|
* Controls whether the search input is shown inside the dropdown panel.
|
|
238
|
-
*
|
|
239
|
-
*
|
|
962
|
+
* `true` removes it everywhere; `'mobile'` / `'desktop'` remove it on that
|
|
963
|
+
* platform only; `'auto'` removes it when an **array** `items` renders fewer
|
|
964
|
+
* options than the plugin's `autoDisableWritingThreshold` (default `6`;
|
|
965
|
+
* disabled options count, group headers don't). `'auto'` is decided when the
|
|
966
|
+
* panel opens and held until it closes, never applies to a provider
|
|
967
|
+
* (function) `items`, never when you listen to `option:add` (a creatable
|
|
968
|
+
* select keeps its field), and is off when the threshold is `0`. There is
|
|
969
|
+
* no global switch: hiding or forcing a field is this prop, per instance.
|
|
970
|
+
* @defaultValue `'auto'`
|
|
240
971
|
*/
|
|
241
|
-
disableWriting?: boolean | 'mobile' | 'desktop';
|
|
972
|
+
disableWriting?: boolean | 'mobile' | 'desktop' | 'auto';
|
|
242
973
|
|
|
243
974
|
/**
|
|
244
975
|
* Name of the icon to be added at the end of the input.
|
|
976
|
+
*
|
|
977
|
+
* @defaultValue the chevron-down glyph
|
|
245
978
|
*/
|
|
246
|
-
|
|
247
979
|
'append:icon'?: IconType;
|
|
248
980
|
|
|
249
981
|
/**
|
|
@@ -268,10 +1000,32 @@ export type BbSelectProps<T> = {
|
|
|
268
1000
|
comma?: boolean;
|
|
269
1001
|
|
|
270
1002
|
/**
|
|
271
|
-
*
|
|
1003
|
+
* Compact density. Swaps `--bb-input-h`, `--bb-input-py` and
|
|
1004
|
+
* `--bb-label-spacing-y` for their `-compact` twins on the field, so a
|
|
1005
|
+
* `--bb-input-h` you set on the component is ignored while `compact` is on:
|
|
1006
|
+
* size a compact field with `--bb-input-h-compact` (and
|
|
1007
|
+
* `--bb-input-py-compact`) instead.
|
|
272
1008
|
*/
|
|
273
1009
|
compact?: boolean;
|
|
274
1010
|
|
|
1011
|
+
/**
|
|
1012
|
+
* Visual variant of the field box — the same names and tokens as the
|
|
1013
|
+
* `BbButton` variants. Colours only: height, padding and border width are
|
|
1014
|
+
* identical across variants, so a form never reflows when one changes.
|
|
1015
|
+
* `'ghost'` has no border in any state (errors and warnings show through
|
|
1016
|
+
* the icon and the messages); every variant keeps the focus ring.
|
|
1017
|
+
* Register extra names with the plugin's `inputVariants` option.
|
|
1018
|
+
*
|
|
1019
|
+
* `'none'` is a blank starting point: the field keeps its structure and
|
|
1020
|
+
* behaviour but takes no look, so your own classes don't fight a built-in
|
|
1021
|
+
* one. You then own hover, focus, disabled and the error / warning states.
|
|
1022
|
+
* Fine for a one-off; keep inline styling short, and register a real
|
|
1023
|
+
* variant (`inputVariants`) when the look recurs.
|
|
1024
|
+
*
|
|
1025
|
+
* @defaultValue `'outline'`
|
|
1026
|
+
*/
|
|
1027
|
+
variant?: InputVariantType;
|
|
1028
|
+
|
|
275
1029
|
/**
|
|
276
1030
|
* Defines an array of dependencies that will trigger actions in the component upon change.
|
|
277
1031
|
*/
|
|
@@ -279,14 +1033,18 @@ export type BbSelectProps<T> = {
|
|
|
279
1033
|
|
|
280
1034
|
/**
|
|
281
1035
|
* Timeout used to debounce response to changes to dependencies.
|
|
1036
|
+
*
|
|
1037
|
+
* @defaultValue `0`
|
|
282
1038
|
*/
|
|
283
1039
|
depsDebounceTime?: number;
|
|
284
1040
|
|
|
285
1041
|
/**
|
|
286
|
-
*
|
|
287
|
-
*
|
|
1042
|
+
* How the label and the input sit together: `'vertical'`, `'horizontal'` (50/50),
|
|
1043
|
+
* `'auto'`, `'label-fill'` (the label takes the free space, the input keeps
|
|
1044
|
+
* its size), `'input-fill'` (the other way round), or a two-word ratio
|
|
1045
|
+
* pattern like `'xx xxxxx'`.
|
|
288
1046
|
*/
|
|
289
|
-
|
|
1047
|
+
layout?: FieldLayout;
|
|
290
1048
|
|
|
291
1049
|
/**
|
|
292
1050
|
* Disables the component.
|
|
@@ -342,7 +1100,7 @@ export type BbSelectProps<T> = {
|
|
|
342
1100
|
* Define if the component should be in a warning state.
|
|
343
1101
|
* Same chrome as errors with `--bb-warn`; errors take priority.
|
|
344
1102
|
*/
|
|
345
|
-
|
|
1103
|
+
hasWarnings?: boolean;
|
|
346
1104
|
|
|
347
1105
|
/**
|
|
348
1106
|
* Visually hides the label of the input while maintaining accessibility.
|
|
@@ -355,7 +1113,8 @@ export type BbSelectProps<T> = {
|
|
|
355
1113
|
hint?: string;
|
|
356
1114
|
|
|
357
1115
|
/**
|
|
358
|
-
* The
|
|
1116
|
+
* The `id` of the native control; the label's `for` and the description
|
|
1117
|
+
* and message ids derive from it. Generated when omitted.
|
|
359
1118
|
*/
|
|
360
1119
|
id?: HTMLAttributes['id'];
|
|
361
1120
|
|
|
@@ -386,12 +1145,38 @@ export type BbSelectProps<T> = {
|
|
|
386
1145
|
/**
|
|
387
1146
|
* Defines a path that returns a property of the object to use as text or a function
|
|
388
1147
|
* that returns a string.
|
|
1148
|
+
*
|
|
1149
|
+
* @defaultValue `JSON.stringify(item)`
|
|
389
1150
|
*/
|
|
390
1151
|
itemText?: ItemAccessor<T, string>;
|
|
391
1152
|
|
|
1153
|
+
/**
|
|
1154
|
+
* ADDITIONAL row fields resolved from each item — never its text or value
|
|
1155
|
+
* (those stay on `itemText` / `itemValue`). Accepted fields:
|
|
1156
|
+
*
|
|
1157
|
+
* - `description` — a muted line under the option label. Setting it gives
|
|
1158
|
+
* every row a fixed two-line height (the list is virtualized); the
|
|
1159
|
+
* description stays on one line and ellipsizes. Announced as the option's
|
|
1160
|
+
* description, never part of its name; matched by the search with the text
|
|
1161
|
+
* when `filterBy` is empty.
|
|
1162
|
+
* - `prepend:icon` — an icon before the label.
|
|
1163
|
+
* - `append:icon` — an icon after the label; on the selected row the check
|
|
1164
|
+
* takes its place.
|
|
1165
|
+
*
|
|
1166
|
+
* Either an object with a path or getter per field
|
|
1167
|
+
* (`{ description: 'email', 'prepend:icon': 'icon' }`) or a function
|
|
1168
|
+
* returning the fields (`(item) => ({ description: item.email })`). Without
|
|
1169
|
+
* it no field renders — nothing is read off the item implicitly — and an empty
|
|
1170
|
+
* value renders nothing for that item. Never shown in the trigger or the
|
|
1171
|
+
* chips. To disable individual options use `selectable`.
|
|
1172
|
+
*/
|
|
1173
|
+
itemProps?: BbSelectItemProps<T>;
|
|
1174
|
+
|
|
392
1175
|
/**
|
|
393
1176
|
* Defines a path that returns a property of the object to use as value or a function
|
|
394
1177
|
* that returns any value.
|
|
1178
|
+
*
|
|
1179
|
+
* @defaultValue the whole item
|
|
395
1180
|
*/
|
|
396
1181
|
itemValue?: ItemAccessor<T>;
|
|
397
1182
|
|
|
@@ -427,16 +1212,21 @@ export type BbSelectProps<T> = {
|
|
|
427
1212
|
|
|
428
1213
|
/**
|
|
429
1214
|
* Maximum number of labels shown before collapsing to a count summary.
|
|
1215
|
+
* Unset, the labels collapse only when they overflow the field.
|
|
1216
|
+
*
|
|
1217
|
+
* @defaultValue `Infinity`
|
|
430
1218
|
*/
|
|
431
1219
|
maxSelectedLabels?: number;
|
|
432
1220
|
|
|
433
1221
|
/**
|
|
434
1222
|
* Used by v-model. Can be any serializable type.
|
|
435
1223
|
*/
|
|
436
|
-
modelValue
|
|
1224
|
+
modelValue?: any;
|
|
437
1225
|
|
|
438
1226
|
/**
|
|
439
1227
|
* Timeout used to debounce response to changes to modelValue.
|
|
1228
|
+
*
|
|
1229
|
+
* @defaultValue `0`
|
|
440
1230
|
*/
|
|
441
1231
|
modelValueDebounceTime?: number;
|
|
442
1232
|
|
|
@@ -453,7 +1243,7 @@ export type BbSelectProps<T> = {
|
|
|
453
1243
|
/**
|
|
454
1244
|
* String displayed when there are no items to display.
|
|
455
1245
|
*/
|
|
456
|
-
|
|
1246
|
+
emptyText?: string;
|
|
457
1247
|
|
|
458
1248
|
/**
|
|
459
1249
|
* Keeps the hint displayed.
|
|
@@ -494,6 +1284,8 @@ export type BbSelectProps<T> = {
|
|
|
494
1284
|
|
|
495
1285
|
/**
|
|
496
1286
|
* Time to wait when the user stops writing in the input before querying data.
|
|
1287
|
+
*
|
|
1288
|
+
* @defaultValue `500`
|
|
497
1289
|
*/
|
|
498
1290
|
queryDebounceTime?: number;
|
|
499
1291
|
|
|
@@ -530,12 +1322,54 @@ export type BbSelectProps<T> = {
|
|
|
530
1322
|
|
|
531
1323
|
/**
|
|
532
1324
|
* How long the transition has to last in milliseconds.
|
|
1325
|
+
*
|
|
1326
|
+
* @defaultValue `250`
|
|
533
1327
|
*/
|
|
534
1328
|
transitionDuration?: number;
|
|
535
|
-
}
|
|
1329
|
+
} & FormFieldProps<any>;
|
|
536
1330
|
|
|
537
1331
|
/** Re-export for consumers importing events type from BbSelect. */
|
|
538
|
-
export type BbSelectEvents =
|
|
1332
|
+
export type BbSelectEvents = {
|
|
1333
|
+
/** Emitted as soon as the options surface starts to open (the popover, or the sheet on a phone). */
|
|
1334
|
+
(e: 'show'): void;
|
|
1335
|
+
/** Emitted once the options surface is open and its open transition has finished. */
|
|
1336
|
+
(e: 'shown'): void;
|
|
1337
|
+
/** Emitted as soon as the options surface starts to close. */
|
|
1338
|
+
(e: 'hide'): void;
|
|
1339
|
+
/** Emitted once the options surface has finished closing. */
|
|
1340
|
+
(e: 'hidden'): void;
|
|
1341
|
+
/** Emitted when the activator loses focus. Forwards the original DOM `FocusEvent`. */
|
|
1342
|
+
(e: 'blur', event: FocusEvent): void;
|
|
1343
|
+
/** Emitted on the native `change` event. Forwards the original DOM `Event`. */
|
|
1344
|
+
(e: 'change', event: Event): void;
|
|
1345
|
+
/** Emitted when the select becomes active (focus enters it). */
|
|
1346
|
+
(e: 'active'): void;
|
|
1347
|
+
/** Emitted when the activator is clicked. Forwards the original DOM `MouseEvent`. */
|
|
1348
|
+
(e: 'click', event: MouseEvent): void;
|
|
1349
|
+
/** Emitted when the activator receives focus. Forwards the original DOM `FocusEvent`. */
|
|
1350
|
+
(e: 'focus', event: FocusEvent): void;
|
|
1351
|
+
/** Emitted when focus moves outside the whole select after it was active. */
|
|
1352
|
+
(e: 'inactive'): void;
|
|
1353
|
+
/** Emitted on native `input` events from the search field. Forwards the DOM `Event`. */
|
|
1354
|
+
(e: 'input', event: Event): void;
|
|
1355
|
+
(e: 'update:modelValue', value: any): void;
|
|
1356
|
+
/**
|
|
1357
|
+
* Emitted with the typed text when the user confirms a value that is not in
|
|
1358
|
+
* the list (Enter in the search field). Binding it keeps the search field
|
|
1359
|
+
* writable, which makes the select creatable.
|
|
1360
|
+
*/
|
|
1361
|
+
(e: 'option:add', text: string): void;
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1364
|
+
/** Props exposed by the `description` slot. */
|
|
1365
|
+
export type BbSelectDescriptionSlotProps = {
|
|
1366
|
+
/** The `description` prop value (empty when only the slot is provided). */
|
|
1367
|
+
text: string;
|
|
1368
|
+
/** Whether the field is in an error state. */
|
|
1369
|
+
hasErrors: boolean;
|
|
1370
|
+
/** Whether the field is in a warning state (suppressed when errors win). */
|
|
1371
|
+
hasWarnings: boolean;
|
|
1372
|
+
};
|
|
539
1373
|
|
|
540
1374
|
/** Props exposed by the `label` slot. */
|
|
541
1375
|
export type BbSelectLabelSlotProps = {
|
|
@@ -544,7 +1378,7 @@ export type BbSelectLabelSlotProps = {
|
|
|
544
1378
|
/** Whether the input is in an error state. */
|
|
545
1379
|
hasErrors: boolean;
|
|
546
1380
|
/** Whether the input is in a warning state (suppressed when errors win). */
|
|
547
|
-
|
|
1381
|
+
hasWarnings: boolean;
|
|
548
1382
|
};
|
|
549
1383
|
|
|
550
1384
|
/** Props exposed by the `option` slot. */
|
|
@@ -567,6 +1401,8 @@ export type BbSelectOptionSlotProps<T> = {
|
|
|
567
1401
|
text: string;
|
|
568
1402
|
/** The resolved value for this option. */
|
|
569
1403
|
value: any;
|
|
1404
|
+
/** The resolved `itemProps.description` for this option, when it has one. */
|
|
1405
|
+
description: string | undefined;
|
|
570
1406
|
};
|
|
571
1407
|
|
|
572
1408
|
/** Props exposed by the `group` slot. */
|
|
@@ -583,6 +1419,26 @@ export type BbSelectGroupSlotProps<T> = {
|
|
|
583
1419
|
disabled: boolean;
|
|
584
1420
|
};
|
|
585
1421
|
|
|
1422
|
+
/**
|
|
1423
|
+
* Props exposed by the `chip` slot — called once per selected value in
|
|
1424
|
+
* `multiple` mode, in place of the default badge.
|
|
1425
|
+
*/
|
|
1426
|
+
export type BbSelectChipSlotProps<T> = {
|
|
1427
|
+
/** The selected item, exactly as it was supplied in `items`. */
|
|
1428
|
+
item: T;
|
|
1429
|
+
/** The item's resolved display text (what the default badge prints). */
|
|
1430
|
+
text: string;
|
|
1431
|
+
/** The item's resolved value — what sits in the v-model. */
|
|
1432
|
+
value: any;
|
|
1433
|
+
/**
|
|
1434
|
+
* `true` while the select is disabled or readonly: the chip must not offer a
|
|
1435
|
+
* way to remove itself, and `deselect` is a no-op.
|
|
1436
|
+
*/
|
|
1437
|
+
disabled: boolean;
|
|
1438
|
+
/** Drops this value from the selection. No-op while `disabled`. */
|
|
1439
|
+
deselect: () => void;
|
|
1440
|
+
};
|
|
1441
|
+
|
|
586
1442
|
/**
|
|
587
1443
|
* Props exposed by the `header` / `footer` panel slots — identical whether the
|
|
588
1444
|
* select renders as a desktop popover or an adaptive bottom sheet.
|
|
@@ -622,7 +1478,7 @@ export type BbSelectSlots<T> = {
|
|
|
622
1478
|
/**
|
|
623
1479
|
* Content appended outside the input field wrapper.
|
|
624
1480
|
*/
|
|
625
|
-
'append
|
|
1481
|
+
'append:outer'?: (props: {
|
|
626
1482
|
query: string;
|
|
627
1483
|
close: () => Promise<void>;
|
|
628
1484
|
}) => any;
|
|
@@ -630,6 +1486,11 @@ export type BbSelectSlots<T> = {
|
|
|
630
1486
|
* Replaces the default label text rendered above the input.
|
|
631
1487
|
*/
|
|
632
1488
|
label?: (props: BbSelectLabelSlotProps) => any;
|
|
1489
|
+
/**
|
|
1490
|
+
* Replaces the description text. Provided alone (no `description` prop) it still
|
|
1491
|
+
* renders the description region and wires it into `aria-describedby`.
|
|
1492
|
+
*/
|
|
1493
|
+
description?: (props: BbSelectDescriptionSlotProps) => any;
|
|
633
1494
|
/**
|
|
634
1495
|
* Content shown inside the options dropdown while items are loading.
|
|
635
1496
|
*/
|
|
@@ -637,7 +1498,7 @@ export type BbSelectSlots<T> = {
|
|
|
637
1498
|
/**
|
|
638
1499
|
* Content shown when no options match the query or the list is empty.
|
|
639
1500
|
*/
|
|
640
|
-
|
|
1501
|
+
empty?: (props: { query: string; focus: () => void }) => any;
|
|
641
1502
|
/**
|
|
642
1503
|
* Replaces the default rendering of each option row in the dropdown.
|
|
643
1504
|
*/
|
|
@@ -646,6 +1507,11 @@ export type BbSelectSlots<T> = {
|
|
|
646
1507
|
* Replaces the default group header rendered above grouped options.
|
|
647
1508
|
*/
|
|
648
1509
|
group?: (props: BbSelectGroupSlotProps<T>) => any;
|
|
1510
|
+
/**
|
|
1511
|
+
* Replaces the default badge rendered for each selection in `multiple` mode.
|
|
1512
|
+
* Not called in `comma` mode, nor for the collapsed "+N" summary.
|
|
1513
|
+
*/
|
|
1514
|
+
chip?: (props: BbSelectChipSlotProps<T>) => any;
|
|
649
1515
|
/**
|
|
650
1516
|
* Content rendered as an inline prefix inside the input field.
|
|
651
1517
|
*/
|
|
@@ -661,7 +1527,7 @@ export type BbSelectSlots<T> = {
|
|
|
661
1527
|
/**
|
|
662
1528
|
* Content prepended outside the input field wrapper.
|
|
663
1529
|
*/
|
|
664
|
-
'prepend
|
|
1530
|
+
'prepend:outer'?: (props: {
|
|
665
1531
|
query: string;
|
|
666
1532
|
close: () => Promise<void>;
|
|
667
1533
|
}) => any;
|
|
@@ -676,13 +1542,147 @@ export type BbSelectSlots<T> = {
|
|
|
676
1542
|
|
|
677
1543
|
```css
|
|
678
1544
|
.bb-select {
|
|
679
|
-
/*
|
|
680
|
-
|
|
681
|
-
|
|
1545
|
+
/* The box row of the select: the activator overlay, the value face and the
|
|
1546
|
+
chips row live inside it. */
|
|
1547
|
+
&__field {
|
|
1548
|
+
color: var(--bb-text);
|
|
1549
|
+
font-size: var(--bb-input-fs);
|
|
1550
|
+
user-select: none;
|
|
1551
|
+
/* Fraction of the shell's inner padding the chips row is pulled back by
|
|
1552
|
+
when no prepend icon precedes it (see the negative margin below). */
|
|
1553
|
+
--compensation-multiplier: 0.3;
|
|
1554
|
+
|
|
1555
|
+
&.bb-field-input--compact {
|
|
1556
|
+
--compensation-multiplier: 0.5;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
&--disabled {
|
|
1560
|
+
color: var(--bb-text-muted);
|
|
1561
|
+
|
|
1562
|
+
.bb-select__activator {
|
|
1563
|
+
cursor: not-allowed;
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
&--readonly {
|
|
1568
|
+
.bb-select__activator {
|
|
1569
|
+
cursor: default;
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
/* If there is no prepend icon, add a negative margin to the chips row so
|
|
1574
|
+
it smoothly couples with the border */
|
|
1575
|
+
&:not(:has(.bb-field-input__prepend-icon)) {
|
|
1576
|
+
.bb-select__chips-row--chips {
|
|
1577
|
+
margin-left: calc(
|
|
1578
|
+
var(--bb-input-px) * var(--compensation-multiplier) * -1
|
|
1579
|
+
);
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
&__activator {
|
|
1585
|
+
background: none;
|
|
1586
|
+
border: none;
|
|
1587
|
+
cursor: pointer;
|
|
1588
|
+
inset: 0;
|
|
1589
|
+
padding: 0;
|
|
1590
|
+
position: absolute;
|
|
1591
|
+
|
|
1592
|
+
&:focus-visible {
|
|
1593
|
+
outline: 2px solid transparent;
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
&__value {
|
|
1598
|
+
align-items: center;
|
|
1599
|
+
align-self: stretch;
|
|
1600
|
+
display: flex;
|
|
1601
|
+
flex: 1 1 auto;
|
|
1602
|
+
flex-wrap: nowrap;
|
|
1603
|
+
gap: 0.25rem;
|
|
1604
|
+
min-width: 0;
|
|
1605
|
+
pointer-events: none;
|
|
1606
|
+
position: relative;
|
|
1607
|
+
text-align: left;
|
|
1608
|
+
|
|
1609
|
+
& input[type='button'] {
|
|
1610
|
+
pointer-events: auto;
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
&__chips-row {
|
|
1615
|
+
align-items: center;
|
|
1616
|
+
bottom: 0;
|
|
1617
|
+
display: flex;
|
|
1618
|
+
flex: 1 1 auto;
|
|
1619
|
+
flex-wrap: nowrap;
|
|
1620
|
+
left: 0;
|
|
1621
|
+
min-width: 0;
|
|
1622
|
+
overflow: hidden;
|
|
1623
|
+
/* Sits above the absolute activator overlay (later in DOM), so re-enable
|
|
1624
|
+
hit-testing: chip ✕ buttons become clickable, and clicks on the empty gaps
|
|
1625
|
+
bubble to CommonFieldInput's container:click to still toggle the popover.
|
|
1626
|
+
The activator stays behind purely as the keyboard/focus target. */
|
|
1627
|
+
pointer-events: auto;
|
|
1628
|
+
position: absolute;
|
|
1629
|
+
right: 0;
|
|
1630
|
+
top: 0;
|
|
1631
|
+
|
|
1632
|
+
&--hidden {
|
|
1633
|
+
pointer-events: none;
|
|
1634
|
+
visibility: hidden;
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
/* Chips mode with at least one selection — never comma mode, which
|
|
1638
|
+
separates with its own `,` and wants no gap. The `chip` slot lets a
|
|
1639
|
+
consumer render their own element in place of our badge, so the layout
|
|
1640
|
+
a chip needs (no shrinking, the gap between chips, and the negative
|
|
1641
|
+
inset coupling above) lives HERE, on the row, rather than on a
|
|
1642
|
+
`__chip` class custom content would have to know to apply. */
|
|
1643
|
+
&--chips {
|
|
1644
|
+
gap: 0.25rem;
|
|
1645
|
+
|
|
1646
|
+
> * {
|
|
1647
|
+
flex-shrink: 0;
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
&__comma {
|
|
1653
|
+
flex-shrink: 0;
|
|
1654
|
+
overflow: hidden;
|
|
1655
|
+
text-overflow: ellipsis;
|
|
1656
|
+
white-space: nowrap;
|
|
1657
|
+
|
|
1658
|
+
&:not(:last-child)::after {
|
|
1659
|
+
content: ',\00a0';
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
&__display-value {
|
|
1664
|
+
flex: 1 1 auto;
|
|
1665
|
+
min-width: 0;
|
|
1666
|
+
overflow: hidden;
|
|
1667
|
+
text-overflow: ellipsis;
|
|
1668
|
+
white-space: nowrap;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
&__placeholder {
|
|
1672
|
+
color: var(--bb-text-muted);
|
|
1673
|
+
opacity: 1;
|
|
1674
|
+
transition: opacity var(--bb-transition-fast) var(--bb-ease);
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
&__max-reached {
|
|
1678
|
+
flex: 1 1 auto;
|
|
1679
|
+
overflow: hidden;
|
|
1680
|
+
text-overflow: ellipsis;
|
|
1681
|
+
white-space: nowrap;
|
|
682
1682
|
}
|
|
683
1683
|
|
|
684
|
-
&.bb-
|
|
685
|
-
.bb-
|
|
1684
|
+
&.bb-field--floating-label:not(:focus-within) {
|
|
1685
|
+
.bb-select__placeholder {
|
|
686
1686
|
opacity: 0;
|
|
687
1687
|
}
|
|
688
1688
|
}
|