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
|
@@ -29,82 +29,91 @@
|
|
|
29
29
|
:id="key"
|
|
30
30
|
:key="key"
|
|
31
31
|
/>
|
|
32
|
+
<!-- The phone sheet takes the consumer's attributes (a `data-testid`, an
|
|
33
|
+
`aria-*`) like BbPopover's sheet does; `class` rides `pt:root`, which has no
|
|
34
|
+
node on a sheet (Q49.23). They used to be dropped here, on phones only. -->
|
|
32
35
|
<AdaptiveDropdown
|
|
33
36
|
v-if="useOffcanvas"
|
|
34
37
|
v-model="open"
|
|
38
|
+
:compact="compact"
|
|
35
39
|
:off-canvas-props="offcanvasBindings"
|
|
36
40
|
:root-groups="renderGroups"
|
|
41
|
+
v-bind="mergeProps(surfaceEvents, withoutClass($attrs))"
|
|
37
42
|
/>
|
|
38
43
|
<CommonPopover
|
|
39
44
|
v-else
|
|
40
45
|
v-model="open"
|
|
41
46
|
:anchor="effectiveAnchor"
|
|
42
47
|
:boundary="boundary"
|
|
48
|
+
:bubble-attrs="panelAttrs"
|
|
43
49
|
class="bb-dropdown"
|
|
44
|
-
:class="{
|
|
50
|
+
:class="{
|
|
51
|
+
'bb-dropdown--mobile': isMobile,
|
|
52
|
+
'bb-dropdown--compact': compact,
|
|
53
|
+
}"
|
|
45
54
|
:eager="eager"
|
|
46
55
|
hide-arrow
|
|
47
56
|
:offset="offset"
|
|
48
57
|
:padding="padding"
|
|
49
58
|
:placement="placement === 'cursor' ? 'bottom-start' : placement"
|
|
50
59
|
:transition-duration="transitionDuration"
|
|
51
|
-
v-bind="$attrs"
|
|
60
|
+
v-bind="mergeProps(surfaceEvents, $attrs, passthrough.root)"
|
|
52
61
|
>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
:placement="placement"
|
|
97
|
-
></slot>
|
|
98
|
-
</div>
|
|
99
|
-
</span>
|
|
100
|
-
</template>
|
|
62
|
+
<!-- The panel IS CommonPopover's bubble (`panelAttrs`): one bordered box
|
|
63
|
+
that also lays out header / items / footer. A panel that renders a search
|
|
64
|
+
field is a dialog, not a menu (a menu may not own a searchbox) — labelled
|
|
65
|
+
by the activator either way, and the `menu` role moves down onto each
|
|
66
|
+
group's rows inside. -->
|
|
67
|
+
<div
|
|
68
|
+
v-if="$slots.header"
|
|
69
|
+
class="bb-dropdown__header"
|
|
70
|
+
v-bind="passthrough.header"
|
|
71
|
+
>
|
|
72
|
+
<slot
|
|
73
|
+
:disabled="disabled"
|
|
74
|
+
name="header"
|
|
75
|
+
:open="open"
|
|
76
|
+
:placement="placement"
|
|
77
|
+
></slot>
|
|
78
|
+
</div>
|
|
79
|
+
<span
|
|
80
|
+
:id="`menu_${id}`"
|
|
81
|
+
:aria-labelledby="panelIsDialog ? undefined : activatorId"
|
|
82
|
+
class="bb-dropdown__list scrollbar-border"
|
|
83
|
+
:role="panelIsDialog ? 'none' : 'menu'"
|
|
84
|
+
v-bind="passthrough.list"
|
|
85
|
+
>
|
|
86
|
+
<BbDropdownList ref="root-list" :groups="renderGroups" />
|
|
87
|
+
</span>
|
|
88
|
+
<!-- Announcement channel for the placeholder rows. Sits OUTSIDE the
|
|
89
|
+
menu container: `role="menu"` admits only items and groups, and a
|
|
90
|
+
reader in menu mode walks items — so the presentational row inside
|
|
91
|
+
is skipped and an empty search would announce nothing. -->
|
|
92
|
+
<span class="bb-sr-only" role="status">{{ statusText }}</span>
|
|
93
|
+
<div
|
|
94
|
+
v-if="$slots.footer"
|
|
95
|
+
class="bb-dropdown__footer"
|
|
96
|
+
v-bind="passthrough.footer"
|
|
97
|
+
>
|
|
98
|
+
<slot
|
|
99
|
+
:disabled="disabled"
|
|
100
|
+
name="footer"
|
|
101
|
+
:open="open"
|
|
102
|
+
:placement="placement"
|
|
103
|
+
></slot>
|
|
104
|
+
</div>
|
|
101
105
|
</CommonPopover>
|
|
102
106
|
</template>
|
|
103
107
|
|
|
104
108
|
<script setup lang="ts">
|
|
109
|
+
// Attributes land on the floating menu: its `div` on desktop, the sheet's `<dialog>` on a phone (without `class`, which rides `pt:root`).
|
|
110
|
+
// Measured 2026-09-23 (Q49.23); read by components.json.
|
|
111
|
+
// @attrTargets div dialog
|
|
105
112
|
import {
|
|
106
113
|
computed,
|
|
114
|
+
mergeProps,
|
|
107
115
|
onBeforeUnmount,
|
|
116
|
+
onDeactivated,
|
|
108
117
|
reactive,
|
|
109
118
|
ref,
|
|
110
119
|
useSlots,
|
|
@@ -126,9 +135,10 @@ import { useMobile } from '@/composables/useMobile';
|
|
|
126
135
|
import { provideSheetSurface } from '@/composables/useSheetSurface';
|
|
127
136
|
import { useUntil } from '@/composables/useUntil';
|
|
128
137
|
import { useClosingInert } from '@/composables/useClosingInert';
|
|
129
|
-
import {
|
|
138
|
+
import { useConfig } from '@/composables/useConfig';
|
|
130
139
|
import { wait } from '@/utilities/functions/wait';
|
|
131
140
|
import CommonPopover from '../CommonPopover/CommonPopover.vue';
|
|
141
|
+
import type { CommonPopoverAvailableSpace } from '../CommonPopover/types';
|
|
132
142
|
import BbDropdownList from './BbDropdownList.vue';
|
|
133
143
|
import AdaptiveDropdown from './AdaptiveDropdown.vue';
|
|
134
144
|
import DropdownPipelineResolver from './DropdownPipelineResolver.vue';
|
|
@@ -142,29 +152,26 @@ import {
|
|
|
142
152
|
provideDropdownGroupRegistry,
|
|
143
153
|
type DropdownGroupDescriptor,
|
|
144
154
|
} from './useDropdownGroupRegistry';
|
|
145
|
-
import { groupItemsAsArray, isGroup } from './types';
|
|
155
|
+
import { groupItemsAsArray, isGroup, isSelectableGroup } from './types';
|
|
146
156
|
import type {
|
|
147
157
|
BbDropdownProps,
|
|
148
158
|
BbDropdownEvents,
|
|
149
159
|
BbDropdownSlots,
|
|
150
160
|
InternalGroup,
|
|
151
161
|
InternalItem,
|
|
162
|
+
KeyedItem,
|
|
152
163
|
Item,
|
|
153
164
|
MappedItem,
|
|
154
165
|
NormalizedGroup,
|
|
155
166
|
DropdownTrigger,
|
|
156
167
|
} from './types';
|
|
168
|
+
import { BB_DROPDOWN_PT } from './types';
|
|
169
|
+
import { usePassthrough } from '@/composables/usePassthrough';
|
|
170
|
+
import { withoutClass } from '@/utils/passthrough';
|
|
157
171
|
import type { Ref } from 'vue';
|
|
158
172
|
import { transitions } from '@/utilities/misc/transitions';
|
|
159
173
|
import { removedPropsFor } from '@/deprecation/removedProps';
|
|
160
174
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
161
|
-
export type {
|
|
162
|
-
BbDropdownProps,
|
|
163
|
-
BbDropdownSlots,
|
|
164
|
-
InternalItem as Item,
|
|
165
|
-
MappedItem,
|
|
166
|
-
DropdownTrigger,
|
|
167
|
-
};
|
|
168
175
|
|
|
169
176
|
defineOptions({
|
|
170
177
|
inheritAttrs: false,
|
|
@@ -180,11 +187,30 @@ const props = withDefaults(defineProps<BbDropdownProps>(), {
|
|
|
180
187
|
trigger: 'click',
|
|
181
188
|
width: 'auto',
|
|
182
189
|
padding: 10,
|
|
183
|
-
offset:
|
|
190
|
+
offset: 4,
|
|
184
191
|
queryDebounceTime: 300,
|
|
185
192
|
});
|
|
193
|
+
|
|
186
194
|
const emit = defineEmits<BbDropdownEvents>();
|
|
187
195
|
defineSlots<BbDropdownSlots>();
|
|
196
|
+
/**
|
|
197
|
+
* Passthrough (plans/passthrough/BbDropdown.md). `root` merges into the `$attrs` spread on the flyout (no node on the phone sheet, where `panel` then `sheet` land on the sheet root); `item` is resolved per entry inside BbDropdownList through the context.
|
|
198
|
+
*/
|
|
199
|
+
const passthrough = usePassthrough({
|
|
200
|
+
component: 'BbDropdown',
|
|
201
|
+
props,
|
|
202
|
+
parts: BB_DROPDOWN_PT.parts,
|
|
203
|
+
states: BB_DROPDOWN_PT.states,
|
|
204
|
+
active: { open: () => open.value },
|
|
205
|
+
});
|
|
206
|
+
const config = useConfig();
|
|
207
|
+
export type {
|
|
208
|
+
BbDropdownProps,
|
|
209
|
+
BbDropdownSlots,
|
|
210
|
+
InternalItem as Item,
|
|
211
|
+
MappedItem,
|
|
212
|
+
DropdownTrigger,
|
|
213
|
+
};
|
|
188
214
|
|
|
189
215
|
if (process.env.NODE_ENV !== 'production')
|
|
190
216
|
warnRemovedAttrs('BbDropdown', removedPropsFor('BbDropdown'));
|
|
@@ -197,7 +223,10 @@ type PeerOpenDetail = { surfaceId: string; activator: HTMLElement | undefined };
|
|
|
197
223
|
|
|
198
224
|
const logger = useLogger();
|
|
199
225
|
|
|
200
|
-
|
|
226
|
+
// Called unconditionally (see CommonField): skipping `useId()` when an `id` is
|
|
227
|
+
// passed would shift every later auto id across the hydration boundary.
|
|
228
|
+
const generatedId = useId().id.value;
|
|
229
|
+
const id = props.id ?? `bb_${generatedId}`;
|
|
201
230
|
/** Identifies this menu in the shared overlay Escape stack. */
|
|
202
231
|
const escapeKey = Symbol('bb-dropdown-escape');
|
|
203
232
|
/**
|
|
@@ -210,6 +239,13 @@ const activator = ref<HTMLElement>();
|
|
|
210
239
|
const activatorDom = computed(() => extractDomContainer(activator.value));
|
|
211
240
|
const hasExternalActivator = computed(() => props.activator != null);
|
|
212
241
|
const open = ref(false);
|
|
242
|
+
/** The surface lifecycle, relayed from the popover or the phone sheet. */
|
|
243
|
+
const surfaceEvents = {
|
|
244
|
+
onShow: () => emit('show'),
|
|
245
|
+
onShown: () => emit('shown'),
|
|
246
|
+
onHide: () => emit('hide'),
|
|
247
|
+
onHidden: () => emit('hidden'),
|
|
248
|
+
};
|
|
213
249
|
const hasOpenedOnce = useUntil(open, { initialValue: props.eager });
|
|
214
250
|
/**
|
|
215
251
|
* A closed panel is `inert` — that contract is load-bearing (the panel stays
|
|
@@ -219,6 +255,31 @@ const hasOpenedOnce = useUntil(open, { initialValue: props.eager });
|
|
|
219
255
|
*/
|
|
220
256
|
const panelInert = useClosingInert(open, () => props.transitionDuration);
|
|
221
257
|
|
|
258
|
+
/**
|
|
259
|
+
* Bound on CommonPopover's bubble, which is the root panel. `--max-h` caps it
|
|
260
|
+
* to the space the `size` middleware reports for the resolved placement;
|
|
261
|
+
* unset until first measured, so the first frame is never clamped.
|
|
262
|
+
*/
|
|
263
|
+
const panelAttrs = ({ availableHeight }: CommonPopoverAvailableSpace) =>
|
|
264
|
+
mergeProps(
|
|
265
|
+
{
|
|
266
|
+
id: panelIsDialog.value ? `dialog_${id}` : undefined,
|
|
267
|
+
'aria-labelledby': panelIsDialog.value ? activatorId.value : undefined,
|
|
268
|
+
class: [
|
|
269
|
+
'bb-dropdown__panel',
|
|
270
|
+
{ 'bb-dropdown__panel--reserve-check': reservesCheckSpace.value },
|
|
271
|
+
],
|
|
272
|
+
'data-bb-dropdown-surface': id,
|
|
273
|
+
inert: panelInert.value,
|
|
274
|
+
role: panelIsDialog.value ? 'dialog' : undefined,
|
|
275
|
+
style: {
|
|
276
|
+
'--w': parsedWidth.value,
|
|
277
|
+
'--max-h': availableHeight != null ? `${availableHeight}px` : undefined,
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
passthrough.panel
|
|
281
|
+
);
|
|
282
|
+
|
|
222
283
|
// --- per-group search ---------------------------------------------------
|
|
223
284
|
/**
|
|
224
285
|
* One live query per searchable group, keyed by group key. Owned here so a
|
|
@@ -267,6 +328,13 @@ const offcanvasBindings = computed(() => ({
|
|
|
267
328
|
eager: props.eager,
|
|
268
329
|
disabled: props.disabled,
|
|
269
330
|
transitionDuration: props.transitionDuration,
|
|
331
|
+
/*
|
|
332
|
+
* No ✕ on this sheet — same call as BbSelectPopover. A bottom sheet already
|
|
333
|
+
* offers drag-down, backdrop tap and Escape; the picker's own job (tap a
|
|
334
|
+
* row) dismisses most menus too. Before the spread so
|
|
335
|
+
* `offCanvasProps: { hideClose: false }` still brings it back.
|
|
336
|
+
*/
|
|
337
|
+
hideClose: true,
|
|
270
338
|
...props.offCanvasProps,
|
|
271
339
|
}));
|
|
272
340
|
|
|
@@ -600,8 +668,9 @@ const popupRole = computed(() =>
|
|
|
600
668
|
|
|
601
669
|
/**
|
|
602
670
|
* Element the activator's `aria-controls` points at: the panel dialog when
|
|
603
|
-
* there is one, else the menu. The sheet renders no panel — its
|
|
604
|
-
* the `menu_` id
|
|
671
|
+
* there is one, else the menu. The sheet renders no panel dialog — its menu
|
|
672
|
+
* container keeps the `menu_` id (and carries `pt:panel` there) — so the
|
|
673
|
+
* off-canvas surface always resolves to that.
|
|
605
674
|
*/
|
|
606
675
|
const controlsId = computed(() =>
|
|
607
676
|
panelIsDialog.value && !useOffcanvas.value ? `dialog_${id}` : `menu_${id}`
|
|
@@ -615,6 +684,7 @@ const controlsId = computed(() =>
|
|
|
615
684
|
const isPipelineGroup = (group: InternalGroup) =>
|
|
616
685
|
typeof group.items === 'function' ||
|
|
617
686
|
group.itemText != null ||
|
|
687
|
+
group.itemProps != null ||
|
|
618
688
|
group.itemValue != null ||
|
|
619
689
|
group.max != null;
|
|
620
690
|
|
|
@@ -650,7 +720,7 @@ const pipelineGroupKeys = computed(() =>
|
|
|
650
720
|
const topLevelPipelineKeys = computed(() =>
|
|
651
721
|
(props.items ?? [])
|
|
652
722
|
.filter(
|
|
653
|
-
(entry): entry is
|
|
723
|
+
(entry): entry is InternalGroup & { key: string } =>
|
|
654
724
|
isGroup(entry) && !!entry.key && isPipelineGroup(entry)
|
|
655
725
|
)
|
|
656
726
|
.map((entry) => entry.key as string)
|
|
@@ -664,6 +734,7 @@ const pipelineMaps = reactive<
|
|
|
664
734
|
valueByKey: Map<string, any>;
|
|
665
735
|
itemByKey: Map<string, any>;
|
|
666
736
|
textByKey: Map<string, string>;
|
|
737
|
+
descriptionByKey: Map<string, string>;
|
|
667
738
|
}
|
|
668
739
|
>
|
|
669
740
|
>({});
|
|
@@ -698,7 +769,7 @@ const groupFlagsFor = (key: string) => {
|
|
|
698
769
|
if (!cfg) return undefined;
|
|
699
770
|
return {
|
|
700
771
|
multiple: cfg.multiple ?? false,
|
|
701
|
-
selectable: cfg
|
|
772
|
+
selectable: isSelectableGroup(cfg),
|
|
702
773
|
};
|
|
703
774
|
};
|
|
704
775
|
|
|
@@ -789,8 +860,7 @@ provideDropdownGroupRegistry({
|
|
|
789
860
|
const collectSelectableKeys = (items: Item[], acc: string[] = []): string[] => {
|
|
790
861
|
for (const entry of items) {
|
|
791
862
|
if (isGroup(entry)) {
|
|
792
|
-
|
|
793
|
-
if (entry.key && selectable) acc.push(entry.key);
|
|
863
|
+
if (entry.key && isSelectableGroup(entry)) acc.push(entry.key);
|
|
794
864
|
for (const child of groupItemsAsArray(entry.items)) {
|
|
795
865
|
for (const item of Array.isArray(child) ? child : [child]) {
|
|
796
866
|
if (item.items) collectSelectableKeys(item.items, acc);
|
|
@@ -818,7 +888,9 @@ const contextGroups = computed<Record<string, BbDropdownContextGroup>>(() => {
|
|
|
818
888
|
// list is the only complete view of what the consumer declared.
|
|
819
889
|
for (const key of collectSelectableKeys(mergedItems.value)) {
|
|
820
890
|
const model = modelValueFor(key);
|
|
821
|
-
const values = (
|
|
891
|
+
const values = (
|
|
892
|
+
groupFlagsFor(key)?.multiple ? ([] as any[]).concat(model) : [model]
|
|
893
|
+
).filter((v) => v != null);
|
|
822
894
|
const maps = pipelineMaps[key];
|
|
823
895
|
const group = findRenderGroupDeep(key);
|
|
824
896
|
// The group exactly as declared — `normalizeGroups` keeps only the fields
|
|
@@ -834,7 +906,7 @@ const contextGroups = computed<Record<string, BbDropdownContextGroup>>(() => {
|
|
|
834
906
|
key,
|
|
835
907
|
value: model,
|
|
836
908
|
multiple: declared?.multiple ?? false,
|
|
837
|
-
selectable: declared
|
|
909
|
+
selectable: declared ? isSelectableGroup(declared) : false,
|
|
838
910
|
loading: !!groupFetching[key],
|
|
839
911
|
selectedOptions: values.map((value) => {
|
|
840
912
|
const itemKey = keyForValue(key, value);
|
|
@@ -843,6 +915,9 @@ const contextGroups = computed<Record<string, BbDropdownContextGroup>>(() => {
|
|
|
843
915
|
text:
|
|
844
916
|
maps?.textByKey.get(itemKey) ??
|
|
845
917
|
group?.items.find((item) => item.key === itemKey)?.text,
|
|
918
|
+
description:
|
|
919
|
+
maps?.descriptionByKey.get(itemKey) ??
|
|
920
|
+
group?.items.find((item) => item.key === itemKey)?.description,
|
|
846
921
|
original:
|
|
847
922
|
maps?.itemByKey.get(itemKey) ??
|
|
848
923
|
group?.items.find((item) => item.key === itemKey),
|
|
@@ -866,12 +941,14 @@ const selectableGroupCount = computed(
|
|
|
866
941
|
|
|
867
942
|
/**
|
|
868
943
|
* Toggles `item` in `group` (passed by the panel, so nested-submenu groups work
|
|
869
|
-
* too). Single-select groups keep one key
|
|
870
|
-
* it
|
|
871
|
-
*
|
|
872
|
-
*
|
|
944
|
+
* too). Single-select groups are radios: they keep one key, and re-clicking the
|
|
945
|
+
* selected item keeps it — unless the group is `clearable`, when the re-click
|
|
946
|
+
* clears it (Q47.2, owner 2026-09-22). Multi-select groups toggle. Emits
|
|
947
|
+
* `item:selected`/`item:unselected` per changed item (none for a no-op
|
|
948
|
+
* re-click), and closes the menu when a pick is made in a *top-level* sole
|
|
949
|
+
* single-select group — re-picking the same value included.
|
|
873
950
|
*/
|
|
874
|
-
const toggleSelect = (group: NormalizedGroup, item:
|
|
951
|
+
const toggleSelect = (group: NormalizedGroup, item: KeyedItem) => {
|
|
875
952
|
const groupId = group.key;
|
|
876
953
|
if (!groupId) return;
|
|
877
954
|
|
|
@@ -880,7 +957,7 @@ const toggleSelect = (group: NormalizedGroup, item: InternalItem) => {
|
|
|
880
957
|
if (group.multiple) {
|
|
881
958
|
set.has(item.key) ? set.delete(item.key) : set.add(item.key);
|
|
882
959
|
} else if (set.has(item.key)) {
|
|
883
|
-
set.clear();
|
|
960
|
+
if (group.clearable) set.clear();
|
|
884
961
|
} else {
|
|
885
962
|
set.clear();
|
|
886
963
|
set.add(item.key);
|
|
@@ -904,7 +981,10 @@ const toggleSelect = (group: NormalizedGroup, item: InternalItem) => {
|
|
|
904
981
|
const isTopLevelSole =
|
|
905
982
|
selectableGroupCount.value === 1 &&
|
|
906
983
|
renderGroups.value.some((g) => g.selectable && g.key === groupId);
|
|
907
|
-
|
|
984
|
+
// A re-click that kept the pick is a pick of the same value: close too.
|
|
985
|
+
const picked =
|
|
986
|
+
added.length > 0 || (prev.includes(item.key) && next.includes(item.key));
|
|
987
|
+
if (picked && !group.multiple && isTopLevelSole) {
|
|
908
988
|
closeDropdown();
|
|
909
989
|
focusActivator();
|
|
910
990
|
}
|
|
@@ -938,7 +1018,7 @@ const closeAndRefocus = async () => {
|
|
|
938
1018
|
};
|
|
939
1019
|
|
|
940
1020
|
const runItemAction = async (
|
|
941
|
-
item:
|
|
1021
|
+
item: KeyedItem,
|
|
942
1022
|
event: Event,
|
|
943
1023
|
{ close = false }: { close?: boolean } = {}
|
|
944
1024
|
) => {
|
|
@@ -964,7 +1044,7 @@ const runItemAction = async (
|
|
|
964
1044
|
const rootList = useTemplateRef<{
|
|
965
1045
|
focusFirst: () => void;
|
|
966
1046
|
focusLast: () => void;
|
|
967
|
-
}>('
|
|
1047
|
+
}>('root-list');
|
|
968
1048
|
|
|
969
1049
|
const focusActivator = () => {
|
|
970
1050
|
// The tracked element, not `#${id}`: an adopted external activator keeps
|
|
@@ -976,6 +1056,7 @@ const focusActivator = () => {
|
|
|
976
1056
|
};
|
|
977
1057
|
|
|
978
1058
|
provideDropdownContext({
|
|
1059
|
+
passthrough,
|
|
979
1060
|
rootId: id,
|
|
980
1061
|
activatorId,
|
|
981
1062
|
setStatus: (text) => {
|
|
@@ -997,7 +1078,7 @@ provideDropdownContext({
|
|
|
997
1078
|
queryDebounceTime: computed(() => props.queryDebounceTime ?? 300),
|
|
998
1079
|
selectedFor: (key) => internalSelection[key] ?? [],
|
|
999
1080
|
loadingText: computed(() => props.loadingText),
|
|
1000
|
-
|
|
1081
|
+
emptyText: computed(() => props.emptyText),
|
|
1001
1082
|
enforceCoherence: computed(() => props.enforceCoherence),
|
|
1002
1083
|
placement: computed(() => props.placement),
|
|
1003
1084
|
disabled: computed(() => !!props.disabled),
|
|
@@ -1130,6 +1211,19 @@ const onOutsideInteraction = (event: Event) => {
|
|
|
1130
1211
|
// keeps the menu open. (We have no direct ref to the popover element here,
|
|
1131
1212
|
// hence the data-attribute selector rather than an element `contains` check.)
|
|
1132
1213
|
if (target.closest(`[data-bb-dropdown-surface="${id}"]`)) return;
|
|
1214
|
+
// Focus landing on an ANCESTOR of the panel is a focus fallback, not the
|
|
1215
|
+
// user going elsewhere: the popover is not teleported, so a mousedown on a
|
|
1216
|
+
// non-focusable node inside the panel (header / footer text, padding) parks
|
|
1217
|
+
// focus on the nearest focusable ancestor — a `BbTabs` pane, a dialog — and
|
|
1218
|
+
// that arrived here as an outside `focusin` that closed the menu before the
|
|
1219
|
+
// click. Scoped to `focusin` on purpose: a CLICK on that ancestor is a real
|
|
1220
|
+
// outside click and must still close (same rule as BbSelectPopover).
|
|
1221
|
+
if (
|
|
1222
|
+
event.type === 'focusin' &&
|
|
1223
|
+
target.querySelector(`[data-bb-dropdown-surface="${id}"]`)
|
|
1224
|
+
) {
|
|
1225
|
+
return;
|
|
1226
|
+
}
|
|
1133
1227
|
closeDropdown();
|
|
1134
1228
|
};
|
|
1135
1229
|
|
|
@@ -1305,10 +1399,31 @@ onBeforeUnmount(() => {
|
|
|
1305
1399
|
removeDocumentListeners();
|
|
1306
1400
|
});
|
|
1307
1401
|
|
|
1402
|
+
/*
|
|
1403
|
+
* Q14.3 — on a SHRINKWRAPPED panel, every selectable row reserves the check's
|
|
1404
|
+
* space up front.
|
|
1405
|
+
*
|
|
1406
|
+
* The check is absolute and mounted on every row (its stroke animates in), but
|
|
1407
|
+
* only the SELECTED row pads to clear it — deliberately, because on a DECLARED
|
|
1408
|
+
* width padding every row steals that space from the label and truncates it
|
|
1409
|
+
* early. The cost of that choice shows up in the other mode: with `width:
|
|
1410
|
+
* 'auto'` the selected row's padding is part of its intrinsic width, so the
|
|
1411
|
+
* first pick widens the whole menu under the pointer.
|
|
1412
|
+
*
|
|
1413
|
+
* Both behaviours are right in their own mode, so this picks per mode rather
|
|
1414
|
+
* than picking one. On `auto` the reservation is free — the panel simply opens
|
|
1415
|
+
* that much wider, once, before the user touches anything.
|
|
1416
|
+
*/
|
|
1417
|
+
const reservesCheckSpace = computed(() => props.width === 'auto');
|
|
1418
|
+
|
|
1308
1419
|
// Measured on the anchor, not the activator: a percentage width is relative to
|
|
1309
1420
|
// whatever the panel aligns to (the two are the same unless `anchor` is set).
|
|
1421
|
+
// Observed only while open: the width feeds the panel's percentage widths,
|
|
1422
|
+
// which only exist while it is rendered — and a closed menu's ResizeObserver
|
|
1423
|
+
// would otherwise fire on every layout of its host (a menu button per row of
|
|
1424
|
+
// a virtualized table is one observer per mounted row).
|
|
1310
1425
|
const { width: anchorWidth } = useElementSize(
|
|
1311
|
-
anchorDom,
|
|
1426
|
+
computed(() => (open.value ? anchorDom.value : null)),
|
|
1312
1427
|
{ width: 0, height: 0 },
|
|
1313
1428
|
{
|
|
1314
1429
|
box: 'border-box',
|
|
@@ -1326,6 +1441,14 @@ const parsedWidth = computed(() => {
|
|
|
1326
1441
|
}
|
|
1327
1442
|
return '0px';
|
|
1328
1443
|
});
|
|
1444
|
+
|
|
1445
|
+
// Deactivated by KeepAlive while open counts as closing: the surface leaves the
|
|
1446
|
+
// document (a modal <dialog> loses its top-layer state, a flyout its anchor)
|
|
1447
|
+
// and its document listeners would otherwise keep firing for a cached, unseen
|
|
1448
|
+
// node. Reactivating shows it closed; the consumer reopens it as usual.
|
|
1449
|
+
onDeactivated(() => {
|
|
1450
|
+
void closeDropdown();
|
|
1451
|
+
});
|
|
1329
1452
|
</script>
|
|
1330
1453
|
|
|
1331
1454
|
<style lang="postcss">
|
|
@@ -1337,10 +1460,17 @@ const parsedWidth = computed(() => {
|
|
|
1337
1460
|
|
|
1338
1461
|
```ts
|
|
1339
1462
|
import type { BbBaseButtonProps } from '../BbBaseButton/types';
|
|
1463
|
+
import type {
|
|
1464
|
+
PtItemCtx,
|
|
1465
|
+
PtItemMap,
|
|
1466
|
+
PtItemResult,
|
|
1467
|
+
PtValue,
|
|
1468
|
+
} from '@/types/passthrough';
|
|
1340
1469
|
import type { Placement } from '@/types/Placement';
|
|
1341
1470
|
import type { IconType } from '@/types/Icon';
|
|
1342
1471
|
import type { DropdownItemVariantType } from '@/types/DropdownItemVariant';
|
|
1343
1472
|
import type { BbOffCanvasProps } from '../BbOffCanvas/types';
|
|
1473
|
+
import type { ItemProps } from '@/types/ItemProps';
|
|
1344
1474
|
|
|
1345
1475
|
export type { DropdownItemVariantType };
|
|
1346
1476
|
|
|
@@ -1353,15 +1483,33 @@ export type DropdownTrigger = 'click' | 'contextMenu';
|
|
|
1353
1483
|
*/
|
|
1354
1484
|
type DropdownEntryBase = {
|
|
1355
1485
|
/**
|
|
1356
|
-
* Icon to be displayed after the text.
|
|
1357
|
-
* submenu (
|
|
1486
|
+
* Icon to be displayed after the text. Not shown when the item opens a
|
|
1487
|
+
* submenu (the chevron is), when it is the selected row of a selectable
|
|
1488
|
+
* group (the check is), or when an append slot fills the region.
|
|
1358
1489
|
*/
|
|
1359
1490
|
'append:icon'?: IconType;
|
|
1360
1491
|
/**
|
|
1361
|
-
* Key used to identify the entry.
|
|
1362
|
-
*
|
|
1492
|
+
* Key used to identify the entry. REQUIRED when anything outside the menu
|
|
1493
|
+
* reads it: a row in a `selectable` group (the v-model holds it), a row or
|
|
1494
|
+
* group with its own slot (`#<key>` is named by it), a group bound by a
|
|
1495
|
+
* `<BbDropdownGroup id>` or selectable. Optional on a plain action row (it
|
|
1496
|
+
* runs its `onClick`) and a layout-only group: the dropdown then derives an
|
|
1497
|
+
* internal identity from the text that nothing outside ever sees. A keyless
|
|
1498
|
+
* row in a selectable group renders but can't be selected. Load-bearing
|
|
1499
|
+
* identifiers are written, never derived — `bitboss-ui check` flags a
|
|
1500
|
+
* missing required key where the items are in the same file.
|
|
1501
|
+
*/
|
|
1502
|
+
key?: string;
|
|
1503
|
+
/** @internal Set by the dropdown on a row it derived a key for (Q53.17). */
|
|
1504
|
+
keyless?: true;
|
|
1505
|
+
/**
|
|
1506
|
+
* Your own data for this entry, carried untouched to its slots (as
|
|
1507
|
+
* `item.meta`) and to per-item `pt` functions. The dropdown never reads it
|
|
1508
|
+
* and never puts it on the DOM. Typically the record the entry stands for,
|
|
1509
|
+
* e.g. `{ key: clinic.id, text: clinic.name, meta: clinic }`; a fetched
|
|
1510
|
+
* group sets it through `itemProps` (`(clinic) => ({ meta: clinic })`).
|
|
1363
1511
|
*/
|
|
1364
|
-
|
|
1512
|
+
meta?: any;
|
|
1365
1513
|
/** Click handler. */
|
|
1366
1514
|
onClick?: (...args: any[]) => any;
|
|
1367
1515
|
/** Icon to be displayed before the text. */
|
|
@@ -1375,6 +1523,28 @@ type DropdownEntryBase = {
|
|
|
1375
1523
|
variant?: DropdownItemVariantType;
|
|
1376
1524
|
};
|
|
1377
1525
|
|
|
1526
|
+
/**
|
|
1527
|
+
* The `itemProps` fields of a fetched (pipeline) dropdown group: everything a
|
|
1528
|
+
* hand-written row accepts except its identity and structure (`key`, `text`,
|
|
1529
|
+
* `items`, `group`) and `disabled`. See {@link InternalGroup.itemProps}.
|
|
1530
|
+
*/
|
|
1531
|
+
export type DropdownItemFields = Omit<
|
|
1532
|
+
BbBaseButtonProps,
|
|
1533
|
+
'block' | 'tag' | 'type' | 'text' | 'disabled'
|
|
1534
|
+
> &
|
|
1535
|
+
Omit<DropdownEntryBase, 'key'> & {
|
|
1536
|
+
/** Muted second line under the row text. */
|
|
1537
|
+
description: string;
|
|
1538
|
+
};
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* `itemProps` of a fetched (pipeline) dropdown group — the ADDITIONAL fields of
|
|
1542
|
+
* each fetched row (never its text or value). Public: type a standalone mapper
|
|
1543
|
+
* with it, e.g.
|
|
1544
|
+
* `const memberProps: BbDropdownItemProps<Member> = { description: 'email' }`.
|
|
1545
|
+
*/
|
|
1546
|
+
export type BbDropdownItemProps<T = any> = ItemProps<T, DropdownItemFields>;
|
|
1547
|
+
|
|
1378
1548
|
/**
|
|
1379
1549
|
* A single actionable menu entry. Extends BbBaseButton (minus layout props) and
|
|
1380
1550
|
* can open a recursive submenu via `items`.
|
|
@@ -1435,11 +1605,18 @@ export type InternalItem = Omit<BbBaseButtonProps, 'block' | 'tag' | 'type'> &
|
|
|
1435
1605
|
multiple?: never;
|
|
1436
1606
|
/**
|
|
1437
1607
|
* Marks a synthetic placeholder row produced for a pipeline group while its
|
|
1438
|
-
* async items load (`'loading'`) or when it resolved empty (`'
|
|
1608
|
+
* async items load (`'loading'`) or when it resolved empty (`'empty'`).
|
|
1439
1609
|
* Rendered as a non-interactive row that shows `text` or, when provided, the
|
|
1440
|
-
* dropdown's `loading` / `
|
|
1610
|
+
* dropdown's `loading` / `empty` slot. Internal — set by `BbDropdownGroup`.
|
|
1611
|
+
*/
|
|
1612
|
+
placeholder?: 'loading' | 'empty';
|
|
1613
|
+
/**
|
|
1614
|
+
* Marks a row built by the pipeline resolver from a fetched item. Its
|
|
1615
|
+
* `selectable` predicate already ran against the RAW item there, so
|
|
1616
|
+
* `normalizeGroups` must not run it again against this row object.
|
|
1617
|
+
* Internal.
|
|
1441
1618
|
*/
|
|
1442
|
-
|
|
1619
|
+
fetched?: true;
|
|
1443
1620
|
/**
|
|
1444
1621
|
* Optional slot token used to resolve per-item named slots. Primarily set
|
|
1445
1622
|
* by the pipeline resolver so slot names can be derived from the resolved
|
|
@@ -1524,12 +1701,36 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
1524
1701
|
/**
|
|
1525
1702
|
* Pipeline groups only. Path/getter producing each item's display text.
|
|
1526
1703
|
* Defaults to `JSON.stringify(item)` (or the string itself for strings).
|
|
1704
|
+
*
|
|
1705
|
+
* @defaultValue `JSON.stringify(item)`
|
|
1527
1706
|
*/
|
|
1528
1707
|
itemText?: string | ((item: any) => string);
|
|
1708
|
+
/**
|
|
1709
|
+
* Pipeline groups only. The ADDITIONAL fields of each fetched row — never its
|
|
1710
|
+
* text or value, which stay on `itemText` / `itemValue`. A fetched row takes
|
|
1711
|
+
* every field a hand-written row accepts except its identity and structure
|
|
1712
|
+
* (`key`, `text`, `items`, `group`) and `disabled`: `description`, the icons,
|
|
1713
|
+
* `variant`, `onClick`, `href` / `to` and the rest of the link and Inertia
|
|
1714
|
+
* options.
|
|
1715
|
+
*
|
|
1716
|
+
* Either an object with a path or getter per field
|
|
1717
|
+
* (`{ description: 'email', href: 'url' }`) or one function returning the
|
|
1718
|
+
* fields (`(user) => ({ description: user.email, href: user.url })`). In
|
|
1719
|
+
* the object form a function is always a getter, so a handler field returns
|
|
1720
|
+
* the handler: `onClick: (user) => () => open(user)`.
|
|
1721
|
+
*
|
|
1722
|
+
* Nothing is read off the raw item implicitly — without `itemProps` a row
|
|
1723
|
+
* has only its text. An empty value means the field is absent. To disable
|
|
1724
|
+
* individual rows use a `selectable` predicate on the group; fetched groups
|
|
1725
|
+
* are for selection (see plans/ITEM-DESCRIPTION.md v2.4).
|
|
1726
|
+
*/
|
|
1727
|
+
itemProps?: BbDropdownItemProps;
|
|
1529
1728
|
/**
|
|
1530
1729
|
* Pipeline groups only. Path/getter producing each item's value — what
|
|
1531
1730
|
* `v-model` surfaces; its hash is the internal selection key. Defaults to the
|
|
1532
1731
|
* whole item (so the key is the hash of the entire object).
|
|
1732
|
+
*
|
|
1733
|
+
* @defaultValue the whole item
|
|
1533
1734
|
*/
|
|
1534
1735
|
itemValue?: string | ((item: any) => any);
|
|
1535
1736
|
/** Pipeline groups only. Placeholder row text while async items load. */
|
|
@@ -1544,11 +1745,14 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
1544
1745
|
* predictable size regardless of row content. A `number` is pixels; a `string`
|
|
1545
1746
|
* is any CSS length (`'50vh'`, `'20rem'`). `'none'` (or `0`) removes the cap.
|
|
1546
1747
|
*
|
|
1547
|
-
* `searchable` groups default to `280` (≈ 10 rows of 28px)
|
|
1548
|
-
* list is usually long; set your own value to tweak, or
|
|
1549
|
-
*
|
|
1748
|
+
* `searchable` groups default to `280` (≈ 10 rows of 28px) **on the flyout**,
|
|
1749
|
+
* since a searched list is usually long; set your own value to tweak, or
|
|
1750
|
+
* `'none'` to uncap. The adaptive sheet ignores the cap so the OffCanvas
|
|
1751
|
+
* body stays the only scroller (nested group overflow trapped swipes that
|
|
1752
|
+
* started on a row). Non-searchable flyout groups are uncapped unless you
|
|
1753
|
+
* set this.
|
|
1550
1754
|
*
|
|
1551
|
-
* @defaultValue `280` for `searchable` groups, otherwise unset
|
|
1755
|
+
* @defaultValue `280` for `searchable` flyout groups, otherwise unset
|
|
1552
1756
|
*/
|
|
1553
1757
|
maxHeight?: number | string;
|
|
1554
1758
|
/**
|
|
@@ -1557,8 +1761,17 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
1557
1761
|
* @defaultValue `false`
|
|
1558
1762
|
*/
|
|
1559
1763
|
multiple?: boolean;
|
|
1764
|
+
/**
|
|
1765
|
+
* Single selectable groups only: re-clicking the selected row clears the
|
|
1766
|
+
* group (`item:unselected`, `v-model` → `null`). Without it a single group
|
|
1767
|
+
* behaves like a radio group, and a re-click keeps the pick. Means nothing
|
|
1768
|
+
* on a `multiple` group, where a checkbox always unchecks.
|
|
1769
|
+
*
|
|
1770
|
+
* @defaultValue `false`
|
|
1771
|
+
*/
|
|
1772
|
+
clearable?: boolean;
|
|
1560
1773
|
/** Pipeline groups only. Placeholder row text when there are no items. */
|
|
1561
|
-
|
|
1774
|
+
emptyText?: string;
|
|
1562
1775
|
/**
|
|
1563
1776
|
* Pipeline groups only. When the group's async items are fetched — same
|
|
1564
1777
|
* three-state contract as `BbSelect`'s `prefill`:
|
|
@@ -1585,10 +1798,20 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
1585
1798
|
/** Placeholder for this group's search field. Defaults to the localized label. */
|
|
1586
1799
|
searchPlaceholder?: string;
|
|
1587
1800
|
/**
|
|
1588
|
-
* When
|
|
1589
|
-
*
|
|
1801
|
+
* When set, items act as selectable options that render a check on the right
|
|
1802
|
+
* and keep the menu open when toggled.
|
|
1803
|
+
*
|
|
1804
|
+
* Pass a function `(item) => boolean` to gate individual rows — the same
|
|
1805
|
+
* contract as `BbSelect` and the option groups. The group is still a
|
|
1806
|
+
* selectable group; a row the function rejects renders disabled (clicks do
|
|
1807
|
+
* nothing, keyboard navigation skips it), and the lock holds on a row that is
|
|
1808
|
+
* already selected. `max` stays a soft cap on top. The function receives the
|
|
1809
|
+
* raw fetched item in a fetched group, the row object in a hand-written one.
|
|
1810
|
+
*
|
|
1811
|
+
* This is how a fetched row is disabled: fetched groups are for selection, so
|
|
1812
|
+
* their `itemProps` has no `disabled` (see the guide).
|
|
1590
1813
|
*/
|
|
1591
|
-
selectable?: boolean;
|
|
1814
|
+
selectable?: boolean | ((item: any) => boolean);
|
|
1592
1815
|
/**
|
|
1593
1816
|
* Searchable pipeline groups only. Accumulate the items behind *selected* keys
|
|
1594
1817
|
* so they stay resolvable across searches. Without it, selecting an item in one
|
|
@@ -1646,6 +1869,23 @@ export type FlatItem<T> = T extends Array<infer U> ? U : T;
|
|
|
1646
1869
|
* item's `items` is a submenu array). Without this last case such an entry would
|
|
1647
1870
|
* be treated as a plain item and its function `items` iterated ("not iterable").
|
|
1648
1871
|
*/
|
|
1872
|
+
/**
|
|
1873
|
+
* Whether a declared group is selectable: `selectable` set (a boolean, or a
|
|
1874
|
+
* predicate — which counts as `true`), or `multiple` given an explicit value.
|
|
1875
|
+
* Both unset ⇒ non-selectable. Value-based, not key presence: companion merges
|
|
1876
|
+
* write `multiple: undefined` keys that must not read as selectable.
|
|
1877
|
+
*/
|
|
1878
|
+
export const isSelectableGroup = (
|
|
1879
|
+
entry: Pick<InternalGroup, 'selectable' | 'multiple'>
|
|
1880
|
+
): boolean =>
|
|
1881
|
+
entry.selectable != null ? !!entry.selectable : entry.multiple != null;
|
|
1882
|
+
|
|
1883
|
+
/** The group's per-row `selectable` predicate, when it passed one. */
|
|
1884
|
+
export const selectablePredicateOf = (
|
|
1885
|
+
entry: Pick<InternalGroup, 'selectable'>
|
|
1886
|
+
): ((item: any) => boolean) | undefined =>
|
|
1887
|
+
typeof entry.selectable === 'function' ? entry.selectable : undefined;
|
|
1888
|
+
|
|
1649
1889
|
export const isGroup = (entry: Item): entry is InternalGroup =>
|
|
1650
1890
|
!Array.isArray(entry) &&
|
|
1651
1891
|
((entry as InternalGroup).group === true ||
|
|
@@ -1658,17 +1898,27 @@ export const isGroup = (entry: Item): entry is InternalGroup =>
|
|
|
1658
1898
|
* non-selectable groups; {@link InternalGroup} objects keep their metadata. Selection
|
|
1659
1899
|
* defaults are resolved here. Produced by `normalizeGroups`.
|
|
1660
1900
|
*/
|
|
1901
|
+
/**
|
|
1902
|
+
* A row after normalization: its `key` is always set — the consumer's, or one
|
|
1903
|
+
* the dropdown derived for a keyless action row (`keyless`, Q53.17).
|
|
1904
|
+
*/
|
|
1905
|
+
export type KeyedItem = InternalItem & { key: string };
|
|
1906
|
+
|
|
1661
1907
|
export type NormalizedGroup = {
|
|
1662
1908
|
'append:icon'?: IconType;
|
|
1909
|
+
/** Single groups: a re-click on the selected row clears it. */
|
|
1910
|
+
clearable?: boolean;
|
|
1663
1911
|
/** Whether a divider is rendered before this group. */
|
|
1664
1912
|
divider: boolean;
|
|
1665
1913
|
/** Keys matched against each raw item when searching (empty ⇒ match text). */
|
|
1666
1914
|
filterBy?: string[];
|
|
1667
|
-
items:
|
|
1915
|
+
items: KeyedItem[];
|
|
1668
1916
|
/** Group key (when it originated from a {@link InternalGroup} object). */
|
|
1669
1917
|
key?: string;
|
|
1670
1918
|
/** Fixed max-height (px number or CSS length) of this group's item region. */
|
|
1671
1919
|
maxHeight?: number | string;
|
|
1920
|
+
/** The group's own `meta`, untouched. */
|
|
1921
|
+
meta?: any;
|
|
1672
1922
|
multiple: boolean;
|
|
1673
1923
|
onClick?: (...args: any[]) => any;
|
|
1674
1924
|
'prepend:icon'?: IconType;
|
|
@@ -1697,7 +1947,123 @@ export type MappedItem = InternalItem & {
|
|
|
1697
1947
|
onKeydown: (event: KeyboardEvent) => void;
|
|
1698
1948
|
};
|
|
1699
1949
|
|
|
1950
|
+
/**
|
|
1951
|
+
* Passthrough parts of `BbDropdown` (plans/passthrough/BbDropdown.md). Groups,
|
|
1952
|
+
* headings and dividers are not parts.
|
|
1953
|
+
*
|
|
1954
|
+
* Per-item functions: on the instance, an entry part (`item`, `itemText`, `itemIcon`, `itemDescription`) also accepts `({ item, selected, … }) => PtValue | false | null | undefined` — `item` is the menu entry (an `Item`: its `text`, `key`, `description`, whatever else you put on it), 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). Its result is merged last, after every state entry, through the same deduper; a falsy result leaves the entry as it was. See the passthrough guide, _Per-item functions_.
|
|
1955
|
+
*
|
|
1956
|
+
* @part root - The floating element — an invisible positioning wrapper; a
|
|
1957
|
+
* `class` on the component lands here. No node on the phone sheet: style
|
|
1958
|
+
* what you see with `panel`.
|
|
1959
|
+
* @part panel - The menu surface you see — the bordered flyout box on
|
|
1960
|
+
* desktop, the sheet itself on a phone.
|
|
1961
|
+
* @part sheet - The bottom sheet the menu becomes on a phone (the
|
|
1962
|
+
* `BbOffCanvas` root) — never the desktop surface. Applied after `panel`, so it wins a conflict there.
|
|
1963
|
+
* @part header - The menu's header band.
|
|
1964
|
+
* @part footer - The menu's footer band.
|
|
1965
|
+
* @part input - A searchable group's search field — a broadcast: it lands on
|
|
1966
|
+
* every searchable group's field, desktop and phone alike. Its magnifier
|
|
1967
|
+
* glyph is chrome.
|
|
1968
|
+
* @part list - The top-level items container between the bands — the node
|
|
1969
|
+
* that lays the entries out (a flex column with a 1px gap; on a phone, the
|
|
1970
|
+
* sheet's items container). A submenu's list is not reached. Groups,
|
|
1971
|
+
* headings and dividers are not parts.
|
|
1972
|
+
* @part item - One menu entry, submenus included — a broadcast resolved per
|
|
1973
|
+
* entry. Also takes a per-item function, called with the entry.
|
|
1974
|
+
* @part itemText - An entry's label (its `text`) — resolved with that
|
|
1975
|
+
* entry's states. A per-entry `#<key>` slot replaces it. Also takes a
|
|
1976
|
+
* per-item function.
|
|
1977
|
+
* @part itemIcon - An entry's prepend / append icons — resolved with that
|
|
1978
|
+
* entry's states. Also takes a per-item function.
|
|
1979
|
+
* @part itemDescription - An entry's muted second line (its `description`) —
|
|
1980
|
+
* resolved with that entry's states. A per-entry `#<key>` slot replaces it.
|
|
1981
|
+
* Also takes a per-item function.
|
|
1982
|
+
*/
|
|
1983
|
+
export type BbDropdownPtPart =
|
|
1984
|
+
| 'root'
|
|
1985
|
+
| 'panel'
|
|
1986
|
+
| 'sheet'
|
|
1987
|
+
| 'header'
|
|
1988
|
+
| 'footer'
|
|
1989
|
+
| 'input'
|
|
1990
|
+
| 'list'
|
|
1991
|
+
| 'item'
|
|
1992
|
+
| 'itemText'
|
|
1993
|
+
| 'itemIcon'
|
|
1994
|
+
| 'itemDescription';
|
|
1995
|
+
/** The surface parts — they take a `PtValue` only. Spelled flat (T20). */
|
|
1996
|
+
export type BbDropdownSurfacePtPart =
|
|
1997
|
+
| 'root'
|
|
1998
|
+
| 'panel'
|
|
1999
|
+
| 'sheet'
|
|
2000
|
+
| 'header'
|
|
2001
|
+
| 'footer'
|
|
2002
|
+
| 'input'
|
|
2003
|
+
| 'list';
|
|
2004
|
+
/** The entry parts — broadcasts resolved per entry; their base key also takes a per-item function. Spelled flat (T20). */
|
|
2005
|
+
export type BbDropdownItemPtPart =
|
|
2006
|
+
| 'item'
|
|
2007
|
+
| 'itemText'
|
|
2008
|
+
| 'itemIcon'
|
|
2009
|
+
| 'itemDescription';
|
|
2010
|
+
/**
|
|
2011
|
+
* Passthrough states of `BbDropdown`, true while the matching `--` modifier is on.
|
|
2012
|
+
*
|
|
2013
|
+
* @state selected - Per node, on the entry parts: a selectable group's
|
|
2014
|
+
* checked entry.
|
|
2015
|
+
* @state disabled - Per node, on the entry parts: an entry that is disabled.
|
|
2016
|
+
* @state open - Component-wide: the menu is open.
|
|
2017
|
+
*/
|
|
2018
|
+
export type BbDropdownPtState = 'open' | 'selected' | 'disabled';
|
|
2019
|
+
/** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
|
|
2020
|
+
export const BB_DROPDOWN_PT = {
|
|
2021
|
+
parts: [
|
|
2022
|
+
'root',
|
|
2023
|
+
'panel',
|
|
2024
|
+
'sheet',
|
|
2025
|
+
'header',
|
|
2026
|
+
'footer',
|
|
2027
|
+
'input',
|
|
2028
|
+
'list',
|
|
2029
|
+
'item',
|
|
2030
|
+
'itemText',
|
|
2031
|
+
'itemIcon',
|
|
2032
|
+
'itemDescription',
|
|
2033
|
+
],
|
|
2034
|
+
states: ['selected', 'disabled', 'open'],
|
|
2035
|
+
} as const satisfies {
|
|
2036
|
+
parts: readonly BbDropdownPtPart[];
|
|
2037
|
+
states: readonly BbDropdownPtState[];
|
|
2038
|
+
};
|
|
2039
|
+
|
|
2040
|
+
// Spelled INLINE with this component's own unions (Vue's SFC type resolver
|
|
2041
|
+
// does not substitute a generic alias's type parameters — PASSTHROUGH.md T20).
|
|
2042
|
+
// Two mapped types, never `Partial<Record<…>>`: the lint autofix rewrites one
|
|
2043
|
+
// into the other and the SFC resolver reads only the mapped spelling (T23).
|
|
2044
|
+
/* eslint-disable @typescript-eslint/consistent-indexed-object-style */
|
|
1700
2045
|
export type BbDropdownProps = {
|
|
2046
|
+
[K in
|
|
2047
|
+
| `pt:${BbDropdownSurfacePtPart}`
|
|
2048
|
+
| `pt:${BbDropdownPtPart}:${BbDropdownPtState}`]?: PtValue;
|
|
2049
|
+
} & {
|
|
2050
|
+
// The entry parts also take a per-item function, called with the menu
|
|
2051
|
+
// entry — a literal function type, not `PtItemFn` (T23).
|
|
2052
|
+
[K in `pt:${BbDropdownItemPtPart}`]?:
|
|
2053
|
+
| PtValue
|
|
2054
|
+
| ((ctx: PtItemCtx<InternalItem, BbDropdownPtState>) => PtItemResult);
|
|
2055
|
+
} & {
|
|
2056
|
+
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
2057
|
+
/**
|
|
2058
|
+
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
2059
|
+
* without the prefix. See the `pt:<part>` row.
|
|
2060
|
+
*/
|
|
2061
|
+
pt?: PtItemMap<
|
|
2062
|
+
BbDropdownPtPart,
|
|
2063
|
+
BbDropdownItemPtPart,
|
|
2064
|
+
BbDropdownPtState,
|
|
2065
|
+
InternalItem
|
|
2066
|
+
>;
|
|
1701
2067
|
/**
|
|
1702
2068
|
* External activator element or component ref.
|
|
1703
2069
|
* When provided, the activator slot is not rendered and event listeners
|
|
@@ -1717,6 +2083,17 @@ export type BbDropdownProps = {
|
|
|
1717
2083
|
* @defaultValue `config.adaptive` (`true`)
|
|
1718
2084
|
*/
|
|
1719
2085
|
adaptive?: boolean;
|
|
2086
|
+
/**
|
|
2087
|
+
* Apply the compact density variant — the same ladder `BbSelect` uses, on
|
|
2088
|
+
* both surfaces: flyout rows go 28px → 24px, sheet rows 44px → 36px. The
|
|
2089
|
+
* label size does not change; density here is height, as it is for a select.
|
|
2090
|
+
*
|
|
2091
|
+
* A menu row is a touch target in a way a select option is not quite — a
|
|
2092
|
+
* mis-tap fires the neighbouring COMMAND rather than picking the wrong value
|
|
2093
|
+
* — so the compact sheet stops at 36px and never follows the flyout down to
|
|
2094
|
+
* 24px. That is the same floor the select's sheet holds.
|
|
2095
|
+
*/
|
|
2096
|
+
compact?: boolean;
|
|
1720
2097
|
/**
|
|
1721
2098
|
* Element the panel positions itself against, when it should differ from the
|
|
1722
2099
|
* activator — e.g. a wrapper that the activator is only a part of, so the menu
|
|
@@ -1748,7 +2125,9 @@ export type BbDropdownProps = {
|
|
|
1748
2125
|
*/
|
|
1749
2126
|
enforceCoherence?: boolean;
|
|
1750
2127
|
/**
|
|
1751
|
-
*
|
|
2128
|
+
* Names this dropdown: the activator's id (unless it already has one),
|
|
2129
|
+
* the menu's `menu_<id>`, and the key `useBbDropdownContext(id)` and a
|
|
2130
|
+
* companion `BbDropdownGroup` pair by. Generated when omitted.
|
|
1752
2131
|
*/
|
|
1753
2132
|
id?: string;
|
|
1754
2133
|
/**
|
|
@@ -1771,21 +2150,31 @@ export type BbDropdownProps = {
|
|
|
1771
2150
|
loadingText?: string;
|
|
1772
2151
|
/**
|
|
1773
2152
|
* Default placeholder text shown when a pipeline group resolves to no items.
|
|
1774
|
-
* A group's own `
|
|
1775
|
-
* `common.
|
|
2153
|
+
* A group's own `emptyText` overrides this; both fall back to the localized
|
|
2154
|
+
* `common.emptyText` (`'No data to display'`).
|
|
1776
2155
|
*/
|
|
1777
|
-
|
|
2156
|
+
emptyText?: string;
|
|
1778
2157
|
/**
|
|
2158
|
+
* Props for the phone sheet. A `pt` inside it, object or colon keys, styles
|
|
2159
|
+
* only that sheet.
|
|
2160
|
+
*
|
|
1779
2161
|
* Overrides forwarded to the underlying `BbOffCanvas` when `adaptive` renders
|
|
1780
2162
|
* the sheet on mobile. Merged over the adaptive defaults
|
|
1781
|
-
* (`
|
|
2163
|
+
* (`side: 'bottom'`, `size: 'auto'`, `draggable: true`). Ignored when
|
|
1782
2164
|
* `adaptive` is `false`.
|
|
2165
|
+
*
|
|
2166
|
+
* A `pt` inside it styles ONLY the sheet, in `BbOffCanvas`'s part words
|
|
2167
|
+
* (`root`, `header`, `title`, `description`, `content`, `footer`, `close`;
|
|
2168
|
+
* state `open`), object (`{ pt: { header: '…' } }`) or colon keys
|
|
2169
|
+
* (`{ 'pt:header': '…' }`) alike. It merges after what this component
|
|
2170
|
+
* forwards to its sheet, so it wins a conflict and drops nothing — see the
|
|
2171
|
+
* passthrough guide § Inside the sheet.
|
|
1783
2172
|
*/
|
|
1784
2173
|
offCanvasProps?: Partial<BbOffCanvasProps>;
|
|
1785
2174
|
/**
|
|
1786
2175
|
* Space the floating container will maintain from the activator.
|
|
1787
2176
|
*
|
|
1788
|
-
* @defaultValue `
|
|
2177
|
+
* @defaultValue `4`
|
|
1789
2178
|
*/
|
|
1790
2179
|
offset?: number;
|
|
1791
2180
|
/**
|
|
@@ -1796,7 +2185,8 @@ export type BbDropdownProps = {
|
|
|
1796
2185
|
padding?: number;
|
|
1797
2186
|
/**
|
|
1798
2187
|
* Position of the dropdown relative to the activator.
|
|
1799
|
-
* Use `'cursor'` to anchor at the mouse/touch coordinates
|
|
2188
|
+
* Use `'cursor'` to anchor at the mouse/touch coordinates.
|
|
2189
|
+
* (No arrow is drawn either way — arrows are tooltip-only in v3.)
|
|
1800
2190
|
*
|
|
1801
2191
|
* @defaultValue `'bottom'`
|
|
1802
2192
|
*/
|
|
@@ -1810,7 +2200,9 @@ export type BbDropdownProps = {
|
|
|
1810
2200
|
queryDebounceTime?: number;
|
|
1811
2201
|
/**
|
|
1812
2202
|
* How long the transition has to last in milliseconds. Menus use the fast
|
|
1813
|
-
* transition rather than the medium one the other popovers
|
|
2203
|
+
* transition (150) rather than the medium one (250) the other popovers
|
|
2204
|
+
* default to: a menu is opened to pick one command and is gone again, so
|
|
2205
|
+
* it answers faster than a panel the user reads or edits in.
|
|
1814
2206
|
*
|
|
1815
2207
|
* @defaultValue `150`
|
|
1816
2208
|
*/
|
|
@@ -1833,6 +2225,14 @@ export type BbDropdownProps = {
|
|
|
1833
2225
|
};
|
|
1834
2226
|
|
|
1835
2227
|
export type BbDropdownEvents = {
|
|
2228
|
+
/** Emitted as soon as the menu (the popover, or the sheet on a phone) starts to open. */
|
|
2229
|
+
(e: 'show'): void;
|
|
2230
|
+
/** Emitted once the menu is open and its open transition has finished. */
|
|
2231
|
+
(e: 'shown'): void;
|
|
2232
|
+
/** Emitted as soon as the menu starts to close. */
|
|
2233
|
+
(e: 'hide'): void;
|
|
2234
|
+
/** Emitted once the menu has finished closing. */
|
|
2235
|
+
(e: 'hidden'): void;
|
|
1836
2236
|
/**
|
|
1837
2237
|
* Fired when an item in any selectable group becomes selected. The payload is
|
|
1838
2238
|
* the item's resolved value (its `item-value` for pipeline groups, else its
|
|
@@ -1879,12 +2279,45 @@ export type BbDropdownEdgeSlotProps = {
|
|
|
1879
2279
|
placement: BbDropdownProps['placement'];
|
|
1880
2280
|
};
|
|
1881
2281
|
|
|
2282
|
+
/**
|
|
2283
|
+
* The group a slot renders in, as item slots see it. Anonymous groups (loose
|
|
2284
|
+
* items, plain arrays) have no `key` and no `label`.
|
|
2285
|
+
*/
|
|
2286
|
+
export type BbDropdownSlotGroup = {
|
|
2287
|
+
/** The group's key, when it was declared as a group object. */
|
|
2288
|
+
key?: string;
|
|
2289
|
+
/** The group's label, when it has one (also when `hideLabel` hides it). */
|
|
2290
|
+
label?: string;
|
|
2291
|
+
/** The group's own `meta`. */
|
|
2292
|
+
meta?: any;
|
|
2293
|
+
/** Whether the group is multi-select. */
|
|
2294
|
+
multiple: boolean;
|
|
2295
|
+
/** Whether the group's rows are choices. */
|
|
2296
|
+
selectable: boolean;
|
|
2297
|
+
};
|
|
2298
|
+
|
|
1882
2299
|
/** Props exposed by the `item:prepend` and `item:append` slots, and named item slots. */
|
|
1883
2300
|
export type BbDropdownItemSlotProps = {
|
|
1884
2301
|
/** The item's muted description line, when set. */
|
|
1885
2302
|
description?: InternalItem['description'];
|
|
1886
2303
|
/** Whether this item is disabled. */
|
|
1887
2304
|
disabled?: InternalItem['disabled'];
|
|
2305
|
+
/**
|
|
2306
|
+
* The group this row sits in. On a group's title line (`groupTitle`), the
|
|
2307
|
+
* group itself.
|
|
2308
|
+
*/
|
|
2309
|
+
group: BbDropdownSlotGroup;
|
|
2310
|
+
/**
|
|
2311
|
+
* `true` when the slot is drawing a group's title line rather than a row.
|
|
2312
|
+
* The shared `item:prepend` / `item:append` slots run for both, with the
|
|
2313
|
+
* group passed as `item` on a title line.
|
|
2314
|
+
*/
|
|
2315
|
+
groupTitle: boolean;
|
|
2316
|
+
/**
|
|
2317
|
+
* Nesting depth of the menu the slot renders in: `0` for the root menu,
|
|
2318
|
+
* `1` for a submenu, and so on — the same on the flyout and the phone sheet.
|
|
2319
|
+
*/
|
|
2320
|
+
level: number;
|
|
1888
2321
|
/** The zero-based index of this item among the flattened items. */
|
|
1889
2322
|
index: number;
|
|
1890
2323
|
/** The raw item object from the `items` prop. */
|
|
@@ -1904,14 +2337,33 @@ export type BbDropdownItemSlotProps = {
|
|
|
1904
2337
|
text: InternalItem['text'];
|
|
1905
2338
|
};
|
|
1906
2339
|
|
|
1907
|
-
/** Props exposed by the `loading` and `
|
|
2340
|
+
/** Props exposed by the `loading` and `empty` placeholder slots. */
|
|
1908
2341
|
export type BbDropdownPlaceholderSlotProps = {
|
|
1909
2342
|
/** Key of the group this placeholder belongs to. */
|
|
1910
2343
|
groupKey?: string;
|
|
1911
|
-
/** Resolved placeholder text (group `loadingText`/`
|
|
2344
|
+
/** Resolved placeholder text (group `loadingText`/`emptyText` → dropdown default). */
|
|
1912
2345
|
text: string;
|
|
1913
2346
|
};
|
|
1914
2347
|
|
|
2348
|
+
/**
|
|
2349
|
+
* Besides the fixed slots, every entry gets named slots from its key run
|
|
2350
|
+
* through `slotKey` (`'practice-switcher'` → `practice_switcher`). The most
|
|
2351
|
+
* specific slot a row has wins: its own, then its group's, then the shared
|
|
2352
|
+
* `item:prepend` / `item:append`. Each edge has ONE occupant: a slot replaces
|
|
2353
|
+
* the `prepend:icon` / `append:icon`. On the trailing edge the selected row's
|
|
2354
|
+
* check beats every slot, a row's own `#<key>:append` beats the submenu
|
|
2355
|
+
* chevron, and the chevron beats the group-wide and shared slots.
|
|
2356
|
+
*
|
|
2357
|
+
* @dynamicSlot `<key>` {BbDropdownItemSlotProps} - One row's content (text and description), by its key; in a fetched group, by its resolved `itemValue`.
|
|
2358
|
+
* @dynamicSlot `<key>:prepend` {BbDropdownItemSlotProps} - One row's leading region; replaces its `prepend:icon`.
|
|
2359
|
+
* @dynamicSlot `<key>:append` {BbDropdownItemSlotProps} - One row's trailing region; replaces its `append:icon` and its submenu chevron. The check takes its place on the selected row.
|
|
2360
|
+
* @dynamicSlot `<groupKey>:item` {BbDropdownItemSlotProps} - The content of every row of that group, and no other; a row's own `#<key>` still wins.
|
|
2361
|
+
* @dynamicSlot `<groupKey>:item:prepend` {BbDropdownItemSlotProps} - The leading region of every row of that group — e.g. an avatar per record, drawn from `item.meta`, while other rows keep their `prepend:icon`.
|
|
2362
|
+
* @dynamicSlot `<groupKey>:item:append` {BbDropdownItemSlotProps} - The trailing region of every row of that group; replaces their `append:icon`. The check takes its place on the selected row.
|
|
2363
|
+
* @dynamicSlot `<groupKey>` {BbDropdownItemSlotProps} - That group's title line (the group is passed as `item`, `groupTitle` is `true`).
|
|
2364
|
+
* @dynamicSlot `<groupKey>:prepend` {BbDropdownItemSlotProps} - The leading region of that group's title line.
|
|
2365
|
+
* @dynamicSlot `<groupKey>:append` {BbDropdownItemSlotProps} - The trailing region of that group's title line.
|
|
2366
|
+
*/
|
|
1915
2367
|
export type BbDropdownSlots = {
|
|
1916
2368
|
/**
|
|
1917
2369
|
* Hosts `<BbDropdownGroup>` companions. They register their group with the
|
|
@@ -1927,7 +2379,7 @@ export type BbDropdownSlots = {
|
|
|
1927
2379
|
* Replaces the default "no data" placeholder row shown in a pipeline group
|
|
1928
2380
|
* that resolved to no items. Rendered once per empty group.
|
|
1929
2381
|
*/
|
|
1930
|
-
|
|
2382
|
+
empty?: (props: BbDropdownPlaceholderSlotProps) => any;
|
|
1931
2383
|
/**
|
|
1932
2384
|
* The element that triggers the dropdown to open. Spread `props` onto your trigger element.
|
|
1933
2385
|
*/
|
|
@@ -1939,11 +2391,14 @@ export type BbDropdownSlots = {
|
|
|
1939
2391
|
*/
|
|
1940
2392
|
header?: (props: BbDropdownEdgeSlotProps) => any;
|
|
1941
2393
|
/**
|
|
1942
|
-
*
|
|
2394
|
+
* The leading region of every row (and group title line), replacing its
|
|
2395
|
+
* `prepend:icon`. A row's own or its group's named slot wins over it.
|
|
1943
2396
|
*/
|
|
1944
2397
|
'item:prepend'?: (props: BbDropdownItemSlotProps) => any;
|
|
1945
2398
|
/**
|
|
1946
|
-
*
|
|
2399
|
+
* The trailing region of every row (and group title line), replacing its
|
|
2400
|
+
* `append:icon`. A named slot wins over it; the submenu chevron and the
|
|
2401
|
+
* check on a selected row take its place.
|
|
1947
2402
|
*/
|
|
1948
2403
|
'item:append'?: (props: BbDropdownItemSlotProps) => any;
|
|
1949
2404
|
/**
|
|
@@ -1997,7 +2452,16 @@ export type BbDropdownGroupEvents = {
|
|
|
1997
2452
|
## Styles
|
|
1998
2453
|
|
|
1999
2454
|
```css
|
|
2000
|
-
/*
|
|
2455
|
+
/* Sealed fill (Q44.15): the plate paints `--bg`, defaulted to the panel at
|
|
2456
|
+
specificity 0 — a `pt` class or a theme island retints this one surface
|
|
2457
|
+
without moving `--bb-panel` for every panel on the page. */
|
|
2458
|
+
:where(.bb-dropdown__group-search) {
|
|
2459
|
+
--bg: var(--bb-panel);
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
/* @inherit --transition-duration — set inline by the adaptive surface;
|
|
2463
|
+
@inherit --py — the adaptive sheet's rules target BbOffCanvas elements, which
|
|
2464
|
+
declare it on the panel */
|
|
2001
2465
|
.bb-dropdown {
|
|
2002
2466
|
overflow: visible;
|
|
2003
2467
|
|
|
@@ -2007,7 +2471,7 @@ export type BbDropdownGroupEvents = {
|
|
|
2007
2471
|
}
|
|
2008
2472
|
|
|
2009
2473
|
/* Inset between the menu's outer chrome and its first item — owned here and
|
|
2010
|
-
* consumed by both `.bb-
|
|
2474
|
+
* consumed by both `.bb-dropdown__list`'s padding and the submenu
|
|
2011
2475
|
* lead-in below, so the two can never drift apart. */
|
|
2012
2476
|
--menu-inset: 4px;
|
|
2013
2477
|
|
|
@@ -2017,7 +2481,9 @@ export type BbDropdownGroupEvents = {
|
|
|
2017
2481
|
* BOTH: the previous `-4px` covered the padding only and left every submenu
|
|
2018
2482
|
* sitting exactly 1px low (measured, GROK-BTG-035). */
|
|
2019
2483
|
&.bb-dropdown--submenu > .bb-common-popover__bubble {
|
|
2020
|
-
margin-top: calc(
|
|
2484
|
+
margin-top: calc(
|
|
2485
|
+
-1 * (var(--menu-inset) + var(--bubble-border-w, var(--bb-border-w)))
|
|
2486
|
+
);
|
|
2021
2487
|
}
|
|
2022
2488
|
|
|
2023
2489
|
/* Submenus: shadcn-style soft zoom + a slight sideways slide from the side
|
|
@@ -2051,12 +2517,23 @@ export type BbDropdownGroupEvents = {
|
|
|
2051
2517
|
}
|
|
2052
2518
|
}
|
|
2053
2519
|
|
|
2054
|
-
/* Root panel
|
|
2055
|
-
*
|
|
2056
|
-
*
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2520
|
+
/* Root panel = CommonPopover's bubble itself (bound through `bubble-attrs`,
|
|
2521
|
+
* as on BbPopover): a flex column so `header`/`footer` pin outside the
|
|
2522
|
+
* scrolling items region. Owns the height cap for the root menu; submenus
|
|
2523
|
+
* have no panel and cap on the items-container itself (below).
|
|
2524
|
+
*
|
|
2525
|
+
* Compounded with the bubble class: the bubble's own `display: block` is
|
|
2526
|
+
* (0,2,0) too, so a plain `.bb-dropdown .bb-dropdown__panel` would be decided
|
|
2527
|
+
* by sheet order. No `border-radius` here — the bubble's radius is the one
|
|
2528
|
+
* that paints.
|
|
2529
|
+
*
|
|
2530
|
+
* `content-box`, deliberately: `--w`, `min-width` and `--max-h` size the box
|
|
2531
|
+
* INSIDE the border, exactly as they did when the panel was a borderless box
|
|
2532
|
+
* nested in the bubble. The items container below also takes `--w` and
|
|
2533
|
+
* `min-width` as its own border-box width, so a border-box panel would be
|
|
2534
|
+
* 2px narrower inside than its items and `overflow: clip` would cut them. */
|
|
2535
|
+
.bb-dropdown__panel.bb-common-popover__bubble {
|
|
2536
|
+
box-sizing: content-box;
|
|
2060
2537
|
color: var(--bb-text);
|
|
2061
2538
|
display: flex;
|
|
2062
2539
|
flex-direction: column;
|
|
@@ -2082,11 +2559,11 @@ export type BbDropdownGroupEvents = {
|
|
|
2082
2559
|
}
|
|
2083
2560
|
|
|
2084
2561
|
.bb-dropdown__header {
|
|
2085
|
-
border-bottom:
|
|
2562
|
+
border-bottom: var(--bb-border-w) solid var(--bb-border);
|
|
2086
2563
|
}
|
|
2087
2564
|
|
|
2088
2565
|
.bb-dropdown__footer {
|
|
2089
|
-
border-top:
|
|
2566
|
+
border-top: var(--bb-border-w) solid var(--bb-border);
|
|
2090
2567
|
}
|
|
2091
2568
|
|
|
2092
2569
|
/* Per-group search row: rendered at the top of a `searchable` group's list
|
|
@@ -2094,8 +2571,8 @@ export type BbDropdownGroupEvents = {
|
|
|
2094
2571
|
* put while that group's rows scroll under it. */
|
|
2095
2572
|
.bb-dropdown__group-search {
|
|
2096
2573
|
align-items: center;
|
|
2097
|
-
background: var(--
|
|
2098
|
-
border-bottom:
|
|
2574
|
+
background: var(--bg);
|
|
2575
|
+
border-bottom: var(--bb-border-w) solid var(--bb-border);
|
|
2099
2576
|
box-sizing: border-box;
|
|
2100
2577
|
color: var(--bb-text-muted);
|
|
2101
2578
|
display: flex;
|
|
@@ -2199,7 +2676,7 @@ export type BbDropdownGroupEvents = {
|
|
|
2199
2676
|
}
|
|
2200
2677
|
}
|
|
2201
2678
|
|
|
2202
|
-
.bb-
|
|
2679
|
+
.bb-dropdown__list {
|
|
2203
2680
|
border-radius: var(--bb-radius);
|
|
2204
2681
|
box-sizing: border-box;
|
|
2205
2682
|
color: var(--bb-text);
|
|
@@ -2210,7 +2687,11 @@ export type BbDropdownGroupEvents = {
|
|
|
2210
2687
|
* is inert there and `max-height` alone caps it. */
|
|
2211
2688
|
flex: 1 1 auto;
|
|
2212
2689
|
flex-direction: column;
|
|
2213
|
-
|
|
2690
|
+
/* `--bb-fs`, matching the select's option label. These two menus sit at
|
|
2691
|
+
the same 28px row height on the same screen and their labels were a
|
|
2692
|
+
pixel apart (13 against 14) — the desktop twin of the sheet drift, and
|
|
2693
|
+
the kind of difference nobody can name but everybody sees. */
|
|
2694
|
+
font-size: var(--bb-fs);
|
|
2214
2695
|
gap: 1px;
|
|
2215
2696
|
line-height: 1.2;
|
|
2216
2697
|
max-height: var(--max-h, none);
|
|
@@ -2236,9 +2717,10 @@ export type BbDropdownGroupEvents = {
|
|
|
2236
2717
|
|
|
2237
2718
|
.bb-dropdown__group-title {
|
|
2238
2719
|
align-items: center;
|
|
2239
|
-
/* Same
|
|
2240
|
-
*
|
|
2241
|
-
|
|
2720
|
+
/* Same token as BbSelectPopover's group headers (parity ruling), so
|
|
2721
|
+
* the two menus can never drift. Muted, not faint: a title is read
|
|
2722
|
+
* (and can be clicked), and faint fails AA on live text (Q44.18). */
|
|
2723
|
+
color: var(--bb-text-muted);
|
|
2242
2724
|
column-gap: 6px;
|
|
2243
2725
|
display: inline-flex;
|
|
2244
2726
|
/* Don't let the flex column squash rows when `max-height` kicks in —
|
|
@@ -2284,7 +2766,7 @@ export type BbDropdownGroupEvents = {
|
|
|
2284
2766
|
/* Negative inline margins cancel the container padding so the rule
|
|
2285
2767
|
* spans the full width of the dropdown panel, edge to edge. */
|
|
2286
2768
|
border: none;
|
|
2287
|
-
border-top:
|
|
2769
|
+
border-top: var(--bb-border-w) solid var(--bb-border);
|
|
2288
2770
|
height: 0;
|
|
2289
2771
|
margin: var(--menu-inset) calc(-1 * var(--menu-inset));
|
|
2290
2772
|
}
|
|
@@ -2362,7 +2844,7 @@ export type BbDropdownGroupEvents = {
|
|
|
2362
2844
|
white-space: nowrap;
|
|
2363
2845
|
}
|
|
2364
2846
|
|
|
2365
|
-
.
|
|
2847
|
+
.bb-dropdown__item-description {
|
|
2366
2848
|
color: var(--bb-text-muted);
|
|
2367
2849
|
display: block;
|
|
2368
2850
|
font-size: calc(var(--bb-fs) - 2px);
|
|
@@ -2472,7 +2954,7 @@ export type BbDropdownGroupEvents = {
|
|
|
2472
2954
|
/* The group search is a real text field: below 16px mobile Safari force-zooms
|
|
2473
2955
|
the page when it takes focus. `--bb-input-fs-mobile` is the existing
|
|
2474
2956
|
`max(--bb-input-fs, 16px)` token the wrapped controls use — this is a bare
|
|
2475
|
-
`<input>` outside
|
|
2957
|
+
`<input>` outside CommonFieldInput, so it never inherited that rule.
|
|
2476
2958
|
Gated on the pointer rather than `--mobile` so it also covers touch devices
|
|
2477
2959
|
above `mobileMaxWidth`, and so it can never feed back into the width signal
|
|
2478
2960
|
(see `useMobile`). */
|
|
@@ -2482,6 +2964,24 @@ export type BbDropdownGroupEvents = {
|
|
|
2482
2964
|
}
|
|
2483
2965
|
}
|
|
2484
2966
|
|
|
2967
|
+
/* ---- Compact density --------------------------------------------------
|
|
2968
|
+
* The same ladder `BbSelect` walks, so a dense toolbar can hold a select and a
|
|
2969
|
+
* menu that agree: the flyout drops 28px → 24px here, and the SHEET drops
|
|
2970
|
+
* 44px → 36px through `--sheet-row-h` (AdaptiveDropdown reads
|
|
2971
|
+
* `listboxOptionHeight`, the helper the listbox reads, so neither can drift).
|
|
2972
|
+
* The label does not shrink — density is height, exactly as it is for a select
|
|
2973
|
+
* — and the sheet never follows the flyout to 24px, because a menu row is a
|
|
2974
|
+
* touch target whose mis-tap fires the neighbouring COMMAND. */
|
|
2975
|
+
.bb-dropdown.bb-dropdown--compact {
|
|
2976
|
+
.bb-dropdown__item {
|
|
2977
|
+
height: 24px;
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2980
|
+
.bb-dropdown__placeholder {
|
|
2981
|
+
min-height: 24px;
|
|
2982
|
+
}
|
|
2983
|
+
}
|
|
2984
|
+
|
|
2485
2985
|
/* ---- Adaptive drill-down sheet ----------------------------------------
|
|
2486
2986
|
* The mobile surface (`AdaptiveDropdown`) reuses the `.bb-dropdown` classes
|
|
2487
2987
|
* above by carrying `.bb-dropdown` on the off-canvas root; these rules only
|
|
@@ -2491,7 +2991,102 @@ export type BbDropdownGroupEvents = {
|
|
|
2491
2991
|
/* Shrink the off-canvas chrome so the sheet reads as compact as the desktop
|
|
2492
2992
|
panel rather than a full dialog. */
|
|
2493
2993
|
--dialog-gap: 8px;
|
|
2494
|
-
|
|
2994
|
+
/* The title tracks the row label rather than the off-canvas default. It was
|
|
2995
|
+
pulled DOWN to `--bb-fs - 1` (13px) once, which put it under the rows it
|
|
2996
|
+
heads; the default (`--bb-fs + 2`) fixed that until the rows moved to 18px
|
|
2997
|
+
and passed it again. Tied to the same constant, a title can no longer end
|
|
2998
|
+
up smaller than the list beneath it whatever that constant becomes. */
|
|
2999
|
+
--dialog-title-fs: var(--sheet-option-fs, 1rem);
|
|
3000
|
+
|
|
3001
|
+
/* Root sheet title via `offCanvasProps.title` (no drill nav / custom
|
|
3002
|
+
`#header`): centre it and tighten the title→divider air like BbSelect.
|
|
3003
|
+
`:not(:has(.bb-dropdown__nav))` keeps consumer `#header` content and the
|
|
3004
|
+
drill nav on their own layouts. */
|
|
3005
|
+
.bb-offcanvas__header:not(:has(.bb-dropdown__nav)) {
|
|
3006
|
+
border-bottom: var(--bb-border-w) solid var(--bb-border);
|
|
3007
|
+
padding-bottom: calc(var(--py) - 6px);
|
|
3008
|
+
|
|
3009
|
+
> .bb-offcanvas__title {
|
|
3010
|
+
flex: 1 1 auto;
|
|
3011
|
+
text-align: center;
|
|
3012
|
+
}
|
|
3013
|
+
}
|
|
3014
|
+
|
|
3015
|
+
/* Drill nav owns the title→body air. Drop the OffCanvas header's own bottom
|
|
3016
|
+
pad so it does not stack under the nav and push chips / search below
|
|
3017
|
+
BbSelect's. */
|
|
3018
|
+
.bb-offcanvas__header:has(.bb-dropdown__nav--drill) {
|
|
3019
|
+
padding-bottom: 0;
|
|
3020
|
+
}
|
|
3021
|
+
|
|
3022
|
+
/* Body used to start flush under the header. Match BbSelect's step down
|
|
3023
|
+
from the title rule. Specificity beats OffCanvas's nested shorthand.
|
|
3024
|
+
Skip headerless sheets (`--no-header`): OffCanvas already supplies the
|
|
3025
|
+
top inset (and the handle clearance) that this would otherwise crush to
|
|
3026
|
+
0.5rem — the filters root with no title / drill nav / `#header`. */
|
|
3027
|
+
&.bb-offcanvas:not(.bb-offcanvas--no-header) .bb-offcanvas__content {
|
|
3028
|
+
padding-top: 0.5rem;
|
|
3029
|
+
}
|
|
3030
|
+
|
|
3031
|
+
/* Flat multi-group sheets: space a following section after the previous
|
|
3032
|
+
group's items/search. */
|
|
3033
|
+
.bb-dropdown__group-items + .bb-dropdown__group-title,
|
|
3034
|
+
.bb-dropdown__group-search + .bb-dropdown__group-title,
|
|
3035
|
+
.bb-dropdown__divider + .bb-dropdown__group-title {
|
|
3036
|
+
margin-top: 0.5rem;
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
/* Group headers on the sheet read as BbSelect's sheet label — centred title
|
|
3040
|
+
weight/size, not the flyout's faint left-aligned section caption. No
|
|
3041
|
+
hairline here: the select sheet label's rule lives on the OffCanvas
|
|
3042
|
+
header, and repeating it under every group stacked like extra chrome.
|
|
3043
|
+
Nested drills with `hideLabel` skip this entirely; the drill nav title is
|
|
3044
|
+
already that label. */
|
|
3045
|
+
.bb-dropdown__group-title {
|
|
3046
|
+
align-items: center;
|
|
3047
|
+
border-bottom: 0;
|
|
3048
|
+
color: var(--bb-text);
|
|
3049
|
+
column-gap: 6px;
|
|
3050
|
+
display: flex;
|
|
3051
|
+
font-size: var(--dialog-title-fs, var(--sheet-option-fs, 1rem));
|
|
3052
|
+
font-weight: 500;
|
|
3053
|
+
justify-content: center;
|
|
3054
|
+
letter-spacing: normal;
|
|
3055
|
+
/* Match select's title→body air (`padding-bottom: calc(var(--py) - 6px)`
|
|
3056
|
+
on the OffCanvas header) so the label sits above the soft search the
|
|
3057
|
+
same way City sits above its field. */
|
|
3058
|
+
padding: 0.25rem 0 calc(var(--py, var(--bb-panel-p)) - 6px);
|
|
3059
|
+
|
|
3060
|
+
.group-title__content {
|
|
3061
|
+
flex: 1 1 auto;
|
|
3062
|
+
line-height: normal;
|
|
3063
|
+
overflow-x: clip;
|
|
3064
|
+
overflow-y: visible;
|
|
3065
|
+
text-align: center;
|
|
3066
|
+
}
|
|
3067
|
+
|
|
3068
|
+
.group-title__prepend-icon,
|
|
3069
|
+
.group-title__append-icon {
|
|
3070
|
+
--size: 1.25rem;
|
|
3071
|
+
font-size: var(--size);
|
|
3072
|
+
}
|
|
3073
|
+
}
|
|
3074
|
+
|
|
3075
|
+
/* Headerless sheet: the first group title IS the sheet label (Flat filters'
|
|
3076
|
+
"Status" beside BbSelect's "City"). Body already clears the handle via
|
|
3077
|
+
`--no-header` padding (`calc(var(--py) + 12px)`); the items-container's
|
|
3078
|
+
4px (meant for air under a nav divider) and the title's own 0.25rem top
|
|
3079
|
+
pad were stacking on top and dropping the label ~8px below City.
|
|
3080
|
+
Measured: City title @29px, Flat Status @33–37px before this. */
|
|
3081
|
+
&.bb-offcanvas--no-header .bb-dropdown__list {
|
|
3082
|
+
padding-top: 0;
|
|
3083
|
+
}
|
|
3084
|
+
|
|
3085
|
+
&.bb-offcanvas--no-header
|
|
3086
|
+
.bb-dropdown__list
|
|
3087
|
+
> .bb-dropdown__group-title:first-child {
|
|
3088
|
+
padding-top: 0;
|
|
3089
|
+
}
|
|
2495
3090
|
|
|
2496
3091
|
/* Clip the sideways level slide so it never spills a horizontal scrollbar. */
|
|
2497
3092
|
.bb-dropdown__adaptive-body {
|
|
@@ -2521,55 +3116,132 @@ export type BbDropdownGroupEvents = {
|
|
|
2521
3116
|
* construction, so this selector needs no viewport clause of its own. The
|
|
2522
3117
|
* JS half lives in `useTouchRowLadder`, for the virtualized option lists
|
|
2523
3118
|
* whose row heights feed a virtualizer instead of a stylesheet. */
|
|
2524
|
-
|
|
2525
|
-
|
|
3119
|
+
/* Belt for an explicit `maxHeight` leaking onto the sheet: never nest a
|
|
3120
|
+
second scrollport inside the OffCanvas body. */
|
|
3121
|
+
.bb-dropdown__group-items--capped {
|
|
3122
|
+
display: contents;
|
|
3123
|
+
max-height: none;
|
|
3124
|
+
overflow: visible;
|
|
3125
|
+
}
|
|
3126
|
+
|
|
3127
|
+
.bb-dropdown__list {
|
|
3128
|
+
/* Published by AdaptiveDropdown from `listboxMetrics`, the same helpers the
|
|
3129
|
+
select's sheet reads. The fallbacks are the shipped touch values, so the
|
|
3130
|
+
stylesheet still reads on its own. */
|
|
3131
|
+
font-size: var(--sheet-option-fs, 1rem);
|
|
2526
3132
|
max-height: none;
|
|
2527
3133
|
min-width: 0;
|
|
2528
3134
|
overflow-y: visible;
|
|
2529
|
-
|
|
3135
|
+
/* Horizontal inset is the OffCanvas body's `--px`. Do not re-pad here
|
|
3136
|
+
(or on the rows) to fake alignment with search/chips. */
|
|
3137
|
+
padding: 4px 0 0;
|
|
2530
3138
|
width: 100%;
|
|
2531
3139
|
|
|
2532
3140
|
.bb-dropdown__item {
|
|
2533
|
-
height: 44px;
|
|
2534
|
-
|
|
3141
|
+
height: var(--sheet-row-h, 44px);
|
|
3142
|
+
/* Flyout rows are `2px 6px`. +4px start so the label shares the
|
|
3143
|
+
search field's text edge (`padding-inline: 0.75rem` on the fill). */
|
|
3144
|
+
padding-left: calc(6px + 4px);
|
|
3145
|
+
/* iOS treats a <button> as a tap target and will not hand the pan to
|
|
3146
|
+
the sheet body unless the control itself opts into vertical panning.
|
|
3147
|
+
Without this, dismiss/scroll work on the handle and miss on rows. */
|
|
3148
|
+
touch-action: pan-y;
|
|
2535
3149
|
|
|
2536
3150
|
&.bb-dropdown__item--description {
|
|
2537
|
-
min-height: 44px;
|
|
3151
|
+
min-height: var(--sheet-row-h, 44px);
|
|
3152
|
+
}
|
|
3153
|
+
|
|
3154
|
+
.item__content {
|
|
3155
|
+
line-height: normal;
|
|
3156
|
+
overflow-x: clip;
|
|
3157
|
+
overflow-y: visible;
|
|
2538
3158
|
}
|
|
2539
3159
|
|
|
2540
|
-
|
|
2541
|
-
|
|
3160
|
+
/* One step under the row label, the same step the listbox puts between
|
|
3161
|
+
an option and its group header — so the two sheets' secondary text
|
|
3162
|
+
agrees as well as their primary. */
|
|
3163
|
+
.bb-dropdown__item-description {
|
|
3164
|
+
font-size: calc(var(--sheet-option-fs, 1rem) - 2px);
|
|
2542
3165
|
line-height: 18px;
|
|
2543
3166
|
}
|
|
2544
3167
|
}
|
|
2545
3168
|
|
|
2546
3169
|
.bb-dropdown__placeholder {
|
|
2547
|
-
min-height: 44px;
|
|
2548
|
-
padding:
|
|
3170
|
+
min-height: var(--sheet-row-h, 44px);
|
|
3171
|
+
padding-left: calc(6px + 4px);
|
|
2549
3172
|
}
|
|
2550
3173
|
|
|
2551
|
-
.
|
|
2552
|
-
|
|
2553
|
-
|
|
3174
|
+
/* Icons scale with the label they sit beside. The desktop sizes (16px
|
|
3175
|
+
glyphs against a 13px label) were tuned for a 28px row; left alone in a
|
|
3176
|
+
44px row with an 18px label they read as undersized — the chevron that
|
|
3177
|
+
says "this opens another level" ended up the smallest thing in the row.
|
|
3178
|
+
One step up, so the glyph keeps roughly the proportion to its label that
|
|
3179
|
+
it has on the desktop panel. BbIcon reads `--size`; keep `font-size` on
|
|
3180
|
+
the same token so the glyph box and the type size cannot drift. */
|
|
3181
|
+
.item__prepend-icon,
|
|
3182
|
+
.item__append-icon,
|
|
3183
|
+
.item__check,
|
|
3184
|
+
.item__chevron {
|
|
3185
|
+
--size: 1.25rem;
|
|
3186
|
+
font-size: var(--size);
|
|
2554
3187
|
}
|
|
3188
|
+
|
|
3189
|
+
/* Group titles are restyled as select-sheet labels on `--adaptive`
|
|
3190
|
+
(see block above); do not re-apply the flyout caption metrics here. */
|
|
2555
3191
|
}
|
|
2556
3192
|
|
|
3193
|
+
/* Soft filled search — mirrors BbSelectPopover's sheet field: no underline
|
|
3194
|
+
rule, faint `--bb-muted` wash, and the same inset as sheet chips / row
|
|
3195
|
+
padding so the fill lines up. */
|
|
2557
3196
|
.bb-dropdown__group-search {
|
|
2558
|
-
|
|
3197
|
+
background-color: var(--bb-muted);
|
|
3198
|
+
border-bottom: 0;
|
|
3199
|
+
border-radius: var(--bb-radius);
|
|
3200
|
+
/* Undo the flyout's full-bleed negative margins. No extra inline inset —
|
|
3201
|
+
the OffCanvas body already pads `--px`. */
|
|
3202
|
+
margin: 0 0 0.25rem;
|
|
3203
|
+
padding: 0.625rem 0.75rem;
|
|
3204
|
+
position: relative;
|
|
3205
|
+
top: auto;
|
|
3206
|
+
transition: background-color var(--bb-transition-fast) ease;
|
|
3207
|
+
/* Flyout search is sticky `z-index: 1`; that same stacking painted over
|
|
3208
|
+
the sheet's grab handle once the body scrolled. */
|
|
3209
|
+
z-index: auto;
|
|
3210
|
+
|
|
3211
|
+
/* One emphasis stop above the resting --bb-muted (6%) fill. */
|
|
3212
|
+
&:focus-within {
|
|
3213
|
+
background-color: color-mix(in oklab, var(--bb-text) 8%, var(--bb-panel));
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3216
|
+
/* Lens on the trailing edge, same side as BbSelect's sheet search. */
|
|
3217
|
+
.bb-dropdown__search-icon {
|
|
3218
|
+
order: 1;
|
|
3219
|
+
}
|
|
3220
|
+
|
|
3221
|
+
.bb-dropdown__search-input {
|
|
3222
|
+
font-size: var(--bb-input-fs);
|
|
3223
|
+
order: 0;
|
|
3224
|
+
}
|
|
3225
|
+
|
|
3226
|
+
/* Busy strip sits on the field's bottom edge (no border to overlay). */
|
|
3227
|
+
.bb-dropdown__group-loading {
|
|
3228
|
+
border-radius: 0 0 var(--bb-radius) var(--bb-radius);
|
|
3229
|
+
bottom: 0;
|
|
3230
|
+
}
|
|
2559
3231
|
}
|
|
2560
3232
|
|
|
2561
3233
|
/* Removable selection chips for the current multi-select level — sit above the
|
|
2562
3234
|
menu (and its search), mirroring BbSelect's sheet. */
|
|
2563
3235
|
.bb-dropdown__sheet-selection {
|
|
2564
3236
|
flex-shrink: 0;
|
|
2565
|
-
padding: 0
|
|
3237
|
+
padding: 0 0 0.5rem;
|
|
2566
3238
|
text-align: left;
|
|
2567
3239
|
}
|
|
2568
3240
|
|
|
2569
3241
|
.bb-dropdown__sheet-chips {
|
|
2570
3242
|
display: flex;
|
|
2571
3243
|
flex-wrap: wrap;
|
|
2572
|
-
gap:
|
|
3244
|
+
gap: 0.5rem;
|
|
2573
3245
|
}
|
|
2574
3246
|
|
|
2575
3247
|
/* Touch target: the xl badge is a ~24px pill — fine inline on desktop, too
|
|
@@ -2578,9 +3250,9 @@ export type BbDropdownGroupEvents = {
|
|
|
2578
3250
|
padding and a bigger clear glyph; the badge API stays untouched. Mirrors
|
|
2579
3251
|
BbSelectPopover's sheet chips. */
|
|
2580
3252
|
.bb-dropdown__sheet-chip {
|
|
2581
|
-
--min-size:
|
|
2582
|
-
--
|
|
2583
|
-
--clear-size:
|
|
3253
|
+
--min-size: 2.125rem;
|
|
3254
|
+
--px: 0.75rem;
|
|
3255
|
+
--clear-size: 1.25rem;
|
|
2584
3256
|
}
|
|
2585
3257
|
|
|
2586
3258
|
.bb-dropdown__nav {
|
|
@@ -2588,42 +3260,69 @@ export type BbDropdownGroupEvents = {
|
|
|
2588
3260
|
column-gap: 6px;
|
|
2589
3261
|
display: flex;
|
|
2590
3262
|
width: 100%;
|
|
2591
|
-
}
|
|
2592
3263
|
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
3264
|
+
/* Drilled in: a navigation bar. The TITLE LINE sets the bar height — same
|
|
3265
|
+
as BbSelect's OffCanvas title — so City and Status share one baseline.
|
|
3266
|
+
The back control is a BbButton ghost sm, absolutely pinned to the
|
|
3267
|
+
OffCanvas header with equal inset from the sheet's top and left. */
|
|
3268
|
+
&--drill {
|
|
3269
|
+
/* Title line sets the bar height — same as BbSelect's OffCanvas title.
|
|
3270
|
+
Sit in the header's `--px`; do not pull out and re-pad to fake a
|
|
3271
|
+
full-bleed bar. Bottom pad matches BbSelect's
|
|
3272
|
+
`calc(var(--py) - 6px)`. No `position: relative` — the back button's
|
|
3273
|
+
containing block is the header. */
|
|
3274
|
+
display: block;
|
|
3275
|
+
padding-bottom: calc(var(--py, var(--bb-panel-p)) - 6px);
|
|
3276
|
+
|
|
3277
|
+
/* Equal inset from the sheet edges. Header is `position: relative`
|
|
3278
|
+
in OffCanvas. Size/chrome come from BbButton ghost sm.
|
|
3279
|
+
Use `--bb-panel-p`, not `--px`: BbButton redefines `--px` as its
|
|
3280
|
+
own padding token, which collapsed the inset to 10px. */
|
|
3281
|
+
.bb-dropdown__nav-back {
|
|
3282
|
+
left: var(--bb-panel-p);
|
|
3283
|
+
position: absolute;
|
|
3284
|
+
top: var(--bb-panel-p);
|
|
2607
3285
|
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
3286
|
+
/* Same chevron_right asset the submenu rows use, pointed back. */
|
|
3287
|
+
.bb-button__icon {
|
|
3288
|
+
transform: rotate(180deg);
|
|
3289
|
+
}
|
|
3290
|
+
}
|
|
2611
3291
|
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
3292
|
+
/* Spacer kept in the DOM for the drill a11y tests; layout is now the
|
|
3293
|
+
title's equal inline gutters below. */
|
|
3294
|
+
.bb-dropdown__nav-gutter {
|
|
3295
|
+
display: none;
|
|
3296
|
+
}
|
|
2616
3297
|
}
|
|
2617
3298
|
}
|
|
2618
3299
|
|
|
2619
|
-
|
|
3300
|
+
/* Pure spacer, mirroring the back button's box (root / non-drill layouts). */
|
|
3301
|
+
.bb-dropdown__nav-gutter {
|
|
3302
|
+
height: 24px;
|
|
3303
|
+
width: 24px;
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3306
|
+
.bb-offcanvas__title.bb-dropdown__nav-title {
|
|
2620
3307
|
flex: auto;
|
|
2621
3308
|
font-weight: 500;
|
|
3309
|
+
/* Same 1em line box as BbSelect's sheet title so the cap sits on the
|
|
3310
|
+
same baseline. Descenders ("Tags") paint into the drill nav's bottom
|
|
3311
|
+
pad — `overflow-y: visible`; ellipsis still clips on X only. */
|
|
2622
3312
|
min-width: 0;
|
|
2623
|
-
overflow:
|
|
3313
|
+
overflow-x: clip;
|
|
3314
|
+
overflow-y: visible;
|
|
2624
3315
|
text-overflow: ellipsis;
|
|
2625
3316
|
white-space: nowrap;
|
|
2626
3317
|
}
|
|
3318
|
+
|
|
3319
|
+
.bb-dropdown__nav--drill .bb-dropdown__nav-title {
|
|
3320
|
+
/* Equal side gutters matching BbButton sm icon-only (24px) so the label
|
|
3321
|
+
centres. */
|
|
3322
|
+
display: block;
|
|
3323
|
+
padding-inline: 24px;
|
|
3324
|
+
text-align: center;
|
|
3325
|
+
}
|
|
2627
3326
|
}
|
|
2628
3327
|
|
|
2629
3328
|
/* Level slide: drilling in enters from the right and the old level exits left;
|
|
@@ -2659,4 +3358,15 @@ export type BbDropdownGroupEvents = {
|
|
|
2659
3358
|
opacity: 0;
|
|
2660
3359
|
transform: translateX(28px);
|
|
2661
3360
|
}
|
|
3361
|
+
|
|
3362
|
+
/*
|
|
3363
|
+
* Q14.3 — see `reservesCheckSpace` in BbDropdown.vue for why this is scoped to
|
|
3364
|
+
* an auto-width panel. `:has(.item__check)` targets exactly the rows a
|
|
3365
|
+
* selectable group mounts a check on, so a non-selectable group in the same
|
|
3366
|
+
* menu is untouched. The value matches the `--selected` rule's clearance; when
|
|
3367
|
+
* both apply they agree, so nothing shifts on selection.
|
|
3368
|
+
*/
|
|
3369
|
+
.bb-dropdown__panel--reserve-check .bb-dropdown__item:has(.item__check) {
|
|
3370
|
+
padding-inline-end: calc(6px + 16px + 4px);
|
|
3371
|
+
}
|
|
2662
3372
|
```
|