bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.65
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 +25 -20
- package/bin/bitboss-ui.mjs +73 -7
- package/dist/ai/BbAlert.md +10 -1
- package/dist/ai/BbBadge.md +35 -3
- package/dist/ai/BbBadgeButton.md +4 -2
- package/dist/ai/BbBaseButton.md +9 -3
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +113 -8
- package/dist/ai/BbCheckbox.md +1 -1
- package/dist/ai/BbCheckboxGroup.md +94 -6
- package/dist/ai/BbColorInput.md +4 -1
- package/dist/ai/BbColorPalette.md +2 -1
- package/dist/ai/BbConfirm.md +7 -3
- package/dist/ai/BbDatePicker.md +2 -1
- package/dist/ai/BbDatePickerInput.md +4 -1
- package/dist/ai/BbDialog.md +12 -11
- package/dist/ai/BbDropdown.md +189 -38
- package/dist/ai/BbDropdownButton.md +27 -7
- package/dist/ai/BbForm.md +55 -22
- package/dist/ai/BbHost.md +2 -2
- package/dist/ai/BbHoverCard.md +7 -3
- package/dist/ai/BbIcon.md +12 -6
- package/dist/ai/BbIndicator.md +11 -1
- package/dist/ai/BbNumberInput.md +4 -1
- package/dist/ai/BbOffCanvas.md +37 -3
- package/dist/ai/BbPopover.md +2 -1
- package/dist/ai/BbRadio.md +1 -1
- package/dist/ai/BbRadioGroup.md +102 -10
- package/dist/ai/BbSelect.md +52 -17
- package/dist/ai/BbSelectPopover.md +93 -26
- package/dist/ai/BbSwitch.md +1 -1
- package/dist/ai/BbSwitchGroup.md +30 -3
- package/dist/ai/BbTable.md +17 -10
- package/dist/ai/BbTabs.md +8 -3
- package/dist/ai/BbTabsList.md +4 -1
- package/dist/ai/BbTag.md +5 -2
- package/dist/ai/BbTextInput.md +4 -1
- package/dist/ai/BbTextarea.md +4 -1
- package/dist/ai/BbTimePicker.md +2 -1
- package/dist/ai/BbTimePickerInput.md +4 -1
- package/dist/ai/BbToast.md +9 -3
- package/dist/ai/BbTooltip.md +71 -9
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonField.md +1 -1
- package/dist/ai/OptionsContainer.md +42 -0
- package/dist/ai/changelog.json +494 -6
- package/dist/ai/components.json +50 -48
- package/dist/ai/composables/useBbConfig.md +8 -1
- package/dist/ai/composables/useConfirm.md +39 -1
- package/dist/ai/design-tokens.json +6 -6
- package/dist/ai/guides/agent-contract.md +2 -2
- package/dist/ai/guides/ai-router.md +24 -23
- package/dist/ai/guides/app-layout.md +5 -0
- package/dist/ai/guides/component-picker.md +9 -2
- package/dist/ai/guides/design-language.md +24 -24
- package/dist/ai/guides/design-tokens.md +15 -8
- package/dist/ai/guides/icons-policy.md +9 -2
- package/dist/ai/guides/inertia-helpers.md +1183 -301
- package/dist/ai/guides/installation-and-plugin-setup.md +12 -2
- package/dist/ai/guides/migration/adoption-checklist.md +235 -0
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -15
- package/dist/ai/guides/migration/components/bb-dialog.md +9 -9
- package/dist/ai/guides/migration/components/bb-dropdown.md +7 -2
- package/dist/ai/guides/migration/components/bb-popover.md +4 -2
- package/dist/ai/guides/migration/components/bb-select.md +19 -0
- package/dist/ai/guides/migration/components/bb-table.md +1 -0
- package/dist/ai/guides/migration/components/bb-toast.md +4 -0
- package/dist/ai/guides/migration/components/bb-tooltip.md +15 -12
- package/dist/ai/guides/migration/components/use-confirm.md +25 -2
- package/dist/ai/guides/migration/v2-to-v3.md +211 -9
- package/dist/ai/guides/migration/v3-beta-css-classes.md +7 -3
- package/dist/ai/guides/options-items-playbook.md +2 -1
- package/dist/ai/guides/passthrough.md +149 -85
- package/dist/ai/guides/preset-components.md +140 -15
- package/dist/ai/helpers/definePreset.json +7 -0
- package/dist/ai/helpers/definePreset.ts +123 -11
- package/dist/ai/helpers/inertia/manifest.json +151 -62
- package/dist/ai/helpers/inertia/messages.ts +33 -0
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +120 -20
- package/dist/ai/helpers/inertia/useHasChanged.ts +34 -16
- package/dist/ai/helpers/inertia/useLazyProp.ts +102 -36
- package/dist/ai/helpers/inertia/useLazyPropGetter.ts +3 -1
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +154 -34
- package/dist/ai/helpers/inertia/usePromiseForm.ts +121 -14
- package/dist/ai/helpers/inertia/useQuery.ts +133 -11
- package/dist/ai/helpers/inertia/useQueryObject.ts +74 -67
- package/dist/ai/helpers/inertia/useResourceContext.ts +60 -14
- package/dist/ai/helpers/inertia/useRouteQuery.ts +38 -27
- package/dist/ai/helpers/inertia/useScreenSizes.ts +9 -7
- package/dist/ai/helpers/inertia/useTableContext.ts +5 -2
- package/dist/ai/helpers/inertia/utils.ts +14 -0
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/common.json +0 -1
- package/dist/ai/manifest/components/BbAlert.json +7 -2
- package/dist/ai/manifest/components/BbBadge.json +13 -4
- package/dist/ai/manifest/components/BbBadge.tree.json +2 -0
- package/dist/ai/manifest/components/BbBadgeButton.json +4 -2
- package/dist/ai/manifest/components/BbBaseButton.json +4 -2
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +14 -3
- package/dist/ai/manifest/components/BbButton.tree.json +5 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +13 -8
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +11 -1
- package/dist/ai/manifest/components/BbColorInput.json +18 -15
- package/dist/ai/manifest/components/BbColorPalette.json +1 -1
- package/dist/ai/manifest/components/BbConfirm.json +4 -2
- package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +1 -1
- package/dist/ai/manifest/components/BbDatePickerInput.json +17 -14
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.json +24 -19
- package/dist/ai/manifest/components/BbDropdown.tree.json +9 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +33 -20
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +2 -2
- package/dist/ai/manifest/components/BbHost.tree.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbIndicator.json +8 -2
- package/dist/ai/manifest/components/BbNumberInput.json +5 -2
- package/dist/ai/manifest/components/BbOffCanvas.json +2 -2
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +17 -12
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -1
- package/dist/ai/manifest/components/BbSelect.json +21 -18
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -10
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +3 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -1
- package/dist/ai/manifest/components/BbTable.tree.json +14 -1
- package/dist/ai/manifest/components/BbTabs.json +9 -6
- package/dist/ai/manifest/components/BbTabs.tree.json +1 -1
- package/dist/ai/manifest/components/BbTabsList.json +6 -3
- package/dist/ai/manifest/components/BbTag.json +19 -16
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.json +6 -3
- package/dist/ai/manifest/components/BbTextarea.json +6 -3
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +10 -7
- package/dist/ai/manifest/components/BbToast.json +7 -2
- package/dist/ai/manifest/components/BbToast.tree.json +4 -2
- package/dist/ai/manifest/components/BbTooltip.json +6 -5
- package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
- package/dist/ai/manifest/components/CommonField.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +3 -1
- package/dist/ai/manifest/components/OptionsContainer.tree.json +38 -0
- package/dist/ai/manifest/index.json +3 -3
- package/dist/ai/manifest/meta.json +5 -3
- package/dist/ai/manifest/types.advanced.json +5 -2
- package/dist/ai/manifest/types.api.json +9 -7
- package/dist/ai/recipes/inertia/approvals-inbox.md +1 -1
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
- package/dist/ai/recipes/inertia/ownership-atlas.md +1 -1
- package/dist/ai/recipes/inertia/records-workspace.md +50 -14
- package/dist/ai/recipes/inertia/upload-center.md +1 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +19 -6
- package/dist/ai/recipes/nuxt/records-workspace.md +42 -12
- package/dist/ai/recipes/vue/layout-scaffold.md +19 -6
- package/dist/ai/recipes/vue/records-workspace.md +42 -12
- package/dist/ai/source/BbAlert.md +94 -76
- package/dist/ai/source/BbBadge.md +174 -72
- package/dist/ai/source/BbBadgeButton.md +130 -65
- package/dist/ai/source/BbBaseButton.md +46 -124
- package/dist/ai/source/BbBaseCheckboxIcon.md +38 -0
- package/dist/ai/source/BbBaseRadioIcon.md +18 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +51 -0
- package/dist/ai/source/BbButton.md +153 -36
- package/dist/ai/source/BbCheckboxGroup.md +142 -18
- package/dist/ai/source/BbColorInput.md +240 -204
- package/dist/ai/source/BbColorPalette.md +7 -4
- package/dist/ai/source/BbConfirm.md +34 -11
- package/dist/ai/source/BbConfirmPortal.md +24 -9
- package/dist/ai/source/BbDatePicker.md +11 -7
- package/dist/ai/source/BbDatePickerInput.md +306 -269
- package/dist/ai/source/BbDialog.md +49 -14
- package/dist/ai/source/BbDropdown.md +314 -197
- package/dist/ai/source/BbDropdownButton.md +197 -31
- package/dist/ai/source/BbDropdownGroup.md +274 -176
- package/dist/ai/source/BbForm.md +50 -6
- package/dist/ai/source/BbHoverCard.md +12 -5
- package/dist/ai/source/BbIcon.md +4 -3
- package/dist/ai/source/BbIndicator.md +73 -52
- package/dist/ai/source/BbNumberInput.md +293 -257
- package/dist/ai/source/BbOffCanvas.md +55 -29
- package/dist/ai/source/BbPopover.md +14 -10
- package/dist/ai/source/BbRadioGroup.md +413 -297
- package/dist/ai/source/BbSelect.md +549 -435
- package/dist/ai/source/BbSelectPopover.md +153 -34
- package/dist/ai/source/BbSwitchGroup.md +70 -10
- package/dist/ai/source/BbTable.md +369 -37
- package/dist/ai/source/BbTabs.md +115 -39
- package/dist/ai/source/BbTabsList.md +106 -38
- package/dist/ai/source/BbTabsPanels.md +96 -36
- package/dist/ai/source/BbTabsRoot.md +96 -36
- package/dist/ai/source/BbTag.md +267 -233
- package/dist/ai/source/BbTextInput.md +261 -225
- package/dist/ai/source/BbTextarea.md +251 -215
- package/dist/ai/source/BbTimePicker.md +11 -7
- package/dist/ai/source/BbTimePickerInput.md +257 -220
- package/dist/ai/source/BbToast.md +73 -32
- package/dist/ai/source/BbToastPortal.md +65 -30
- package/dist/ai/source/BbTooltip.md +148 -113
- package/dist/ai/source/CommonPopover.md +6 -1
- package/dist/ai/source/FlatListBox.md +19 -9
- package/dist/ai/source/GroupedListBox.md +19 -9
- package/dist/ai/source/OptionsContainer.md +25 -9
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +61 -36
- package/dist/components/BbAlert/types.d.ts +9 -5
- package/dist/components/BbAlert/types.js +8 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +3 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +26 -17
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +103 -50
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +20 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +12 -1
- package/dist/components/BbBadge/types.d.ts +45 -15
- package/dist/components/BbBadge/types.js +12 -3
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +89 -126
- package/dist/components/BbBaseButton/types.d.ts +23 -4
- package/dist/components/BbBaseButton/types.js +7 -1
- package/dist/components/BbBaseButton/useLinkState.d.ts +41 -0
- package/dist/components/BbBaseButton/useLinkState.js +70 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -74
- package/dist/components/BbButton/types.d.ts +50 -13
- package/dist/components/BbButton/types.js +10 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +148 -95
- package/dist/components/BbCheckboxGroup/types.d.ts +34 -11
- package/dist/components/BbCheckboxGroup/types.js +9 -4
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +134 -93
- package/dist/components/BbColorInput/types.d.ts +11 -4
- package/dist/components/BbColorInput/types.js +9 -3
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +82 -59
- package/dist/components/BbConfirm/types.d.ts +9 -4
- package/dist/components/BbConfirm/types.js +8 -3
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +68 -67
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +259 -215
- package/dist/components/BbDatePickerInput/types.d.ts +12 -5
- package/dist/components/BbDatePickerInput/types.js +9 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +223 -219
- package/dist/components/BbDialog/useDialogStack.d.ts +1 -1
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +104 -89
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +323 -285
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +411 -319
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -98
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +4 -3
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +49 -28
- package/dist/components/BbDropdown/normalizeGroups.d.ts +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +21 -15
- package/dist/components/BbDropdown/types.d.ts +59 -12
- package/dist/components/BbDropdown/types.js +16 -3
- package/dist/components/BbDropdown/useDropdownContext.d.ts +6 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +179 -68
- package/dist/components/BbDropdownButton/types.d.ts +44 -16
- package/dist/components/BbDropdownButton/types.js +28 -3
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +111 -89
- package/dist/components/BbForm/formSchema.d.ts +13 -0
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +40 -25
- package/dist/components/BbIndicator/types.d.ts +9 -5
- package/dist/components/BbIndicator/types.js +8 -3
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +243 -202
- package/dist/components/BbNumberInput/types.d.ts +12 -5
- package/dist/components/BbNumberInput/types.js +9 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +401 -399
- package/dist/components/BbOffCanvas/types.d.ts +6 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +158 -105
- package/dist/components/BbRadioGroup/types.d.ts +21 -7
- package/dist/components/BbRadioGroup/types.js +9 -4
- package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +181 -137
- package/dist/components/BbSelect/types.d.ts +36 -22
- package/dist/components/BbSelect/types.js +22 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +4 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +600 -577
- package/dist/components/BbSelectPopover/knownItems.d.ts +5 -0
- package/dist/components/BbSelectPopover/types.d.ts +46 -12
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbSwitchGroup/types.d.ts +14 -4
- package/dist/components/BbSwitchGroup/types.js +8 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1102 -995
- package/dist/components/BbTable/estimatedFloors.golden.d.ts +25 -0
- package/dist/components/BbTable/measuredFloors.d.ts +46 -0
- package/dist/components/BbTable/measuredFloors.js +322 -0
- package/dist/components/BbTable/measuredFloorsTestKit.d.ts +27 -0
- package/dist/components/BbTable/textRuler.d.ts +71 -0
- package/dist/components/BbTable/textRuler.js +121 -0
- package/dist/components/BbTable/utils.d.ts +113 -6
- package/dist/components/BbTable/utils.js +118 -65
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +53 -35
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +62 -45
- package/dist/components/BbTabs/types.d.ts +26 -11
- package/dist/components/BbTabs/types.js +23 -8
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +205 -164
- package/dist/components/BbTag/types.d.ts +11 -4
- package/dist/components/BbTag/types.js +9 -3
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +98 -57
- package/dist/components/BbTextInput/types.d.ts +12 -5
- package/dist/components/BbTextInput/types.js +9 -3
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +137 -96
- package/dist/components/BbTextarea/types.d.ts +12 -5
- package/dist/components/BbTextarea/types.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +105 -104
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +241 -197
- package/dist/components/BbTimePickerInput/types.d.ts +12 -5
- package/dist/components/BbTimePickerInput/types.js +9 -3
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +74 -32
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbToast/types.d.ts +10 -5
- package/dist/components/BbToast/types.js +18 -3
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +85 -71
- package/dist/components/BbTooltip/types.d.ts +13 -8
- package/dist/components/BbTooltip/types.js +8 -3
- package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +53 -50
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +146 -143
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/components/OptionsContainer/types.d.ts +14 -3
- package/dist/composables/useBbConfig.d.ts +1 -0
- package/dist/composables/useBbConfig.js +11 -7
- package/dist/composables/useBbFormContext.d.ts +4 -3
- package/dist/composables/useBbTabsContext.js +99 -85
- package/dist/composables/useChoiceIndicator.d.ts +58 -0
- package/dist/composables/useChoiceIndicator.js +197 -0
- package/dist/composables/useConfirm.d.ts +4 -4
- package/dist/composables/usePassthrough.d.ts +54 -1
- package/dist/composables/usePassthrough.js +100 -71
- package/dist/directives/bbTooltip.d.ts +12 -6
- package/dist/directives/createPopoverDirective.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/llms-full.txt +3467 -801
- package/dist/llms-medium.txt +71 -53
- package/dist/llms.txt +2 -1
- package/dist/passthrough-deduper.js +6 -3
- package/dist/project-dts.d.ts +24 -0
- package/dist/project-dts.js +43 -17
- package/dist/styles.css +2 -2
- package/dist/types/AlertVariant.d.ts +14 -0
- package/dist/types/AlertVariant.js +9 -0
- package/dist/types/BadgeVariant.d.ts +14 -0
- package/dist/types/BadgeVariant.js +9 -0
- package/dist/types/ButtonVariant.d.ts +16 -0
- package/dist/types/ButtonVariant.js +11 -0
- package/dist/types/CheckboxVariant.d.ts +38 -0
- package/dist/types/CheckboxVariant.js +4 -0
- package/dist/types/CommonProps.d.ts +4 -3
- package/dist/types/Config.d.ts +7 -0
- package/dist/types/ConfirmVariant.d.ts +12 -0
- package/dist/types/ConfirmVariant.js +4 -0
- package/dist/types/DropdownItemVariant.d.ts +12 -0
- package/dist/types/DropdownItemVariant.js +4 -0
- package/dist/types/IndicatorVariant.d.ts +15 -0
- package/dist/types/IndicatorVariant.js +10 -0
- package/dist/types/InputVariant.d.ts +13 -0
- package/dist/types/InputVariant.js +8 -0
- package/dist/types/RadioVariant.d.ts +38 -0
- package/dist/types/RadioVariant.js +4 -0
- package/dist/types/TabsVariant.d.ts +13 -0
- package/dist/types/TabsVariant.js +8 -0
- package/dist/types/ToastVariant.d.ts +15 -0
- package/dist/types/ToastVariant.js +10 -0
- package/dist/types/TooltipVariant.d.ts +12 -0
- package/dist/types/TooltipVariant.js +4 -0
- package/dist/types/passthrough.d.ts +83 -15
- package/dist/types/passthrough.js +2 -2
- package/dist/types/ptComponentMap.d.ts +35 -23
- package/dist/utilities/functions/extractDomContainer.d.ts +20 -1
- package/dist/utilities/functions/extractDomContainer.js +8 -3
- package/dist/utils/focusVisibility.d.ts +6 -0
- package/dist/utils/focusVisibility.js +4 -1
- package/dist/utils/passthroughDeduper.d.ts +14 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +64 -7
- package/dist/vite.js +385 -259
- package/llms.txt +2 -1
- package/package.json +5 -4
- package/scripts/lib/adoption-checklist.json +312 -0
- package/scripts/lib/eslint-plugin.d.ts +13 -0
- package/scripts/lib/eslint-plugin.mjs +75 -11
- package/scripts/lib/helpers-add.mjs +26 -2
- package/scripts/lib/idiom-scan.mjs +65 -0
- package/scripts/lib/mcp-config.mjs +203 -9
- package/scripts/lib/migrate-fix.mjs +42 -1
- package/scripts/lib/project-variant-dts.mjs +18 -0
- package/scripts/lib/validate-bb-markup.mjs +99 -2
|
@@ -153,7 +153,11 @@ import {
|
|
|
153
153
|
FULLY_VISIBLE,
|
|
154
154
|
settlesVisible,
|
|
155
155
|
} from '@/utilities/functions/settlesVisible';
|
|
156
|
-
import {
|
|
156
|
+
import {
|
|
157
|
+
domElement,
|
|
158
|
+
extractDomContainer,
|
|
159
|
+
type DomHost,
|
|
160
|
+
} from '@/utilities/functions/extractDomContainer';
|
|
157
161
|
import { useElementSize, useIntersectionObserver } from '@vueuse/core';
|
|
158
162
|
import { parseWidthString } from '@/utilities/functions/parseWidthString';
|
|
159
163
|
import { levelHasSearch, normalizeGroups } from './normalizeGroups';
|
|
@@ -178,7 +182,7 @@ import type {
|
|
|
178
182
|
DropdownTrigger,
|
|
179
183
|
} from './types';
|
|
180
184
|
import { BB_DROPDOWN_PT } from './types';
|
|
181
|
-
import { usePassthrough } from '@/composables/usePassthrough';
|
|
185
|
+
import { usePassthrough, variantPt } from '@/composables/usePassthrough';
|
|
182
186
|
import { withoutClass } from '@/utils/passthrough';
|
|
183
187
|
import type { Ref } from 'vue';
|
|
184
188
|
import { transitions } from '@/utilities/misc/transitions';
|
|
@@ -186,6 +190,8 @@ import { removedPropsFor } from '@/deprecation/removedProps';
|
|
|
186
190
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
187
191
|
|
|
188
192
|
defineOptions({
|
|
193
|
+
// An app's own variants as declared `pt:<part>:<name>` props (Q76.7).
|
|
194
|
+
mixins: [variantPt(BB_DROPDOWN_PT)],
|
|
189
195
|
inheritAttrs: false,
|
|
190
196
|
});
|
|
191
197
|
const props = withDefaults(defineProps<BbDropdownProps>(), {
|
|
@@ -194,6 +200,8 @@ const props = withDefaults(defineProps<BbDropdownProps>(), {
|
|
|
194
200
|
// reach the config default, while keeping the Boolean type so the valueless
|
|
195
201
|
// `<Dropdown adaptive>` shorthand still resolves to `true`.
|
|
196
202
|
adaptive: undefined,
|
|
203
|
+
// Three-state as well: unset closes after a single-choice change only.
|
|
204
|
+
closeOnSelect: undefined,
|
|
197
205
|
placement: 'bottom',
|
|
198
206
|
transitionDuration: transitions.fast,
|
|
199
207
|
trigger: 'click',
|
|
@@ -214,6 +222,8 @@ const passthrough = usePassthrough({
|
|
|
214
222
|
parts: BB_DROPDOWN_PT.parts,
|
|
215
223
|
states: BB_DROPDOWN_PT.states,
|
|
216
224
|
active: { open: () => open.value },
|
|
225
|
+
// Per entry: each row passes its own variant to `part()`.
|
|
226
|
+
variant: BB_DROPDOWN_PT.variant,
|
|
217
227
|
});
|
|
218
228
|
const config = useConfig();
|
|
219
229
|
export type {
|
|
@@ -231,7 +241,7 @@ if (process.env.NODE_ENV !== 'production')
|
|
|
231
241
|
* themselves regardless of click/contextmenu `stopPropagation`.
|
|
232
242
|
*/
|
|
233
243
|
const DROPDOWN_OPEN_EVENT = 'bb-dropdown:open';
|
|
234
|
-
type PeerOpenDetail = { surfaceId: string; activator:
|
|
244
|
+
type PeerOpenDetail = { surfaceId: string; activator: DomHost | undefined };
|
|
235
245
|
|
|
236
246
|
const logger = useLogger();
|
|
237
247
|
|
|
@@ -247,7 +257,7 @@ const escapeKey = Symbol('bb-dropdown-escape');
|
|
|
247
257
|
* a user-owned element (e.g. via a directive) never clobbers its id.
|
|
248
258
|
*/
|
|
249
259
|
const activatorId = ref(id);
|
|
250
|
-
const activator = ref<
|
|
260
|
+
const activator = ref<DomHost>();
|
|
251
261
|
const activatorDom = computed(() => extractDomContainer(activator.value));
|
|
252
262
|
const hasExternalActivator = computed(() => props.activator != null);
|
|
253
263
|
const open = ref(false);
|
|
@@ -426,7 +436,7 @@ const setActivatorRef = (reference: unknown) => {
|
|
|
426
436
|
let ignoreNextIntersection = false;
|
|
427
437
|
|
|
428
438
|
const { resume, pause } = useIntersectionObserver(
|
|
429
|
-
activatorDom,
|
|
439
|
+
() => domElement(activatorDom.value),
|
|
430
440
|
async ([{ intersectionRatio }]) => {
|
|
431
441
|
if (ignoreNextIntersection) {
|
|
432
442
|
ignoreNextIntersection = false;
|
|
@@ -1039,18 +1049,14 @@ useBbDropdownContextHost(() => props.id, {
|
|
|
1039
1049
|
groups: () => contextGroups.value,
|
|
1040
1050
|
});
|
|
1041
1051
|
|
|
1042
|
-
const selectableGroupCount = computed(
|
|
1043
|
-
() => renderGroups.value.filter((group) => group.selectable).length
|
|
1044
|
-
);
|
|
1045
|
-
|
|
1046
1052
|
/**
|
|
1047
1053
|
* Toggles `item` in `group` (passed by the panel, so nested-submenu groups work
|
|
1048
1054
|
* too). Single-select groups are radios: they keep one row, and re-clicking the
|
|
1049
1055
|
* selected item keeps it — unless the group is `clearable`, when the re-click
|
|
1050
1056
|
* clears it (Q47.2, owner 2026-09-22). Multi-select groups toggle. Emits
|
|
1051
1057
|
* `item:selected`/`item:unselected` per changed item (none for a no-op
|
|
1052
|
-
* re-click), and closes the menu
|
|
1053
|
-
* single-select group
|
|
1058
|
+
* re-click), and closes the menu as `closeOnSelect` says (unset: a change in
|
|
1059
|
+
* a single-select group, at any depth, re-picking the same value included).
|
|
1054
1060
|
*
|
|
1055
1061
|
* A CONTROLLED group (Q47.6) is not written: the pick goes to its companion as
|
|
1056
1062
|
* a request in values (`update:modelValue`, then the group's `item:*`), and the
|
|
@@ -1104,18 +1110,18 @@ const toggleSelect = (group: NormalizedGroup, item: KeyedItem) => {
|
|
|
1104
1110
|
else if (controlled) emit('item:unselected', appValueFor(groupId, key));
|
|
1105
1111
|
});
|
|
1106
1112
|
|
|
1107
|
-
//
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
// A re-click that kept the pick is a pick of the same value: close too.
|
|
1113
|
+
// ATT-03: a selection closes the menu — unset `closeOnSelect`, a change in
|
|
1114
|
+
// a single-choice group (an untick included), wherever it sits; `true`,
|
|
1115
|
+
// every change; `false`, never. A re-click that kept the pick is a pick of
|
|
1116
|
+
// the same value: it closes too.
|
|
1112
1117
|
const picked =
|
|
1113
1118
|
added.length > 0 ||
|
|
1119
|
+
removed.length > 0 ||
|
|
1114
1120
|
(prev.includes(item.rowKey) && next.includes(item.rowKey));
|
|
1115
|
-
if (picked && !group.multiple
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1121
|
+
if (picked && (props.closeOnSelect ?? !group.multiple))
|
|
1122
|
+
// Through the close, not beside it: the list puts focus back on the
|
|
1123
|
+
// clicked row after this returns, which the closing panel then drops.
|
|
1124
|
+
void closeAndRefocus();
|
|
1119
1125
|
};
|
|
1120
1126
|
|
|
1121
1127
|
// --- async action loading state (owned by the dropdown) -----------------
|
|
@@ -1252,6 +1258,7 @@ provideDropdownContext({
|
|
|
1252
1258
|
},
|
|
1253
1259
|
close: () => closeDropdown(),
|
|
1254
1260
|
focusActivator,
|
|
1261
|
+
ownsEscape: () => isTopEscapeEntry(escapeKey),
|
|
1255
1262
|
openModality: () => openModality,
|
|
1256
1263
|
toggleSelect,
|
|
1257
1264
|
isItemLoading,
|
|
@@ -1446,11 +1453,23 @@ const onPeerOpen = (event: Event) => {
|
|
|
1446
1453
|
closeDropdown();
|
|
1447
1454
|
};
|
|
1448
1455
|
|
|
1456
|
+
/** Whether focus sits in one of this menu's submenu surfaces (any depth). */
|
|
1457
|
+
const focusInSubmenu = () => {
|
|
1458
|
+
const surface = document.activeElement?.closest('[data-bb-dropdown-surface]');
|
|
1459
|
+
return (
|
|
1460
|
+
surface?.getAttribute('data-bb-dropdown-surface') === id &&
|
|
1461
|
+
!!surface.closest('.bb-dropdown--submenu')
|
|
1462
|
+
);
|
|
1463
|
+
};
|
|
1464
|
+
|
|
1449
1465
|
const onEsc = (event: KeyboardEvent) => {
|
|
1450
1466
|
if (!open.value || event.key !== 'Escape') return;
|
|
1451
1467
|
// Something opened on top of this menu (a popover or modal launched from an
|
|
1452
1468
|
// item, say) — it owns Escape until it closes.
|
|
1453
1469
|
if (!isTopEscapeEntry(escapeKey)) return;
|
|
1470
|
+
// Focus inside a submenu: Escape closes that level only (APG menu), so it
|
|
1471
|
+
// goes on to the submenu surface's own handler (`BbDropdownList`).
|
|
1472
|
+
if (focusInSubmenu()) return;
|
|
1454
1473
|
|
|
1455
1474
|
event.stopImmediatePropagation();
|
|
1456
1475
|
event.preventDefault();
|
|
@@ -1640,7 +1659,7 @@ const reservesCheckSpace = computed(() => props.width === 'auto');
|
|
|
1640
1659
|
// would otherwise fire on every layout of its host (a menu button per row of
|
|
1641
1660
|
// a virtualized table is one observer per mounted row).
|
|
1642
1661
|
const { width: anchorWidth } = useElementSize(
|
|
1643
|
-
computed(() => (open.value ? anchorDom.value : null)),
|
|
1662
|
+
computed(() => domElement(open.value ? anchorDom.value : null)),
|
|
1644
1663
|
{ width: 0, height: 0 },
|
|
1645
1664
|
{
|
|
1646
1665
|
box: 'border-box',
|
|
@@ -1682,10 +1701,16 @@ import type {
|
|
|
1682
1701
|
PtItemMap,
|
|
1683
1702
|
PtItemResult,
|
|
1684
1703
|
PtValue,
|
|
1704
|
+
PtVariantAttrs,
|
|
1685
1705
|
} from '@/types/passthrough';
|
|
1686
1706
|
import type { Placement } from '@/types/Placement';
|
|
1687
1707
|
import type { IconType } from '@/types/Icon';
|
|
1688
|
-
import
|
|
1708
|
+
import {
|
|
1709
|
+
DROPDOWN_ITEM_VARIANTS,
|
|
1710
|
+
type DropdownItemVariantBuiltIn,
|
|
1711
|
+
type DropdownItemVariantRegistry,
|
|
1712
|
+
type DropdownItemVariantType,
|
|
1713
|
+
} from '@/types/DropdownItemVariant';
|
|
1689
1714
|
import type { BbOffCanvasProps } from '../BbOffCanvas/types';
|
|
1690
1715
|
import type { ItemProps } from '@/types/ItemProps';
|
|
1691
1716
|
import type { BbDropdownGroupItemsContext } from '@/types/ItemsProvider';
|
|
@@ -2068,8 +2093,18 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
2068
2093
|
/** Placeholder for this group's search field. Defaults to the localized label. */
|
|
2069
2094
|
searchPlaceholder?: string;
|
|
2070
2095
|
/**
|
|
2071
|
-
*
|
|
2072
|
-
*
|
|
2096
|
+
* Sorts the group's rows under titled sections, inside the one group (one
|
|
2097
|
+
* `v-model`, one search field): a field path read off each row (a fetched
|
|
2098
|
+
* row: its raw item) or a getter returning the section title. Rows with a
|
|
2099
|
+
* nullish title are listed without a heading. Sections keep the order in
|
|
2100
|
+
* which their first row appears, like `BbSelect`'s `groupBy`; a search hides
|
|
2101
|
+
* a section with no matching row.
|
|
2102
|
+
*/
|
|
2103
|
+
groupBy?: string | ((row: any) => string | null | undefined);
|
|
2104
|
+
/**
|
|
2105
|
+
* When set, items act as selectable options that render a check on the right.
|
|
2106
|
+
* A change closes the menu in a single-choice group and keeps it open in a
|
|
2107
|
+
* `multiple` one; the dropdown's `closeOnSelect` decides otherwise.
|
|
2073
2108
|
*
|
|
2074
2109
|
* Pass a function `(item) => boolean` to gate individual rows — the same
|
|
2075
2110
|
* contract as `BbSelect` and the option groups. The group is still a
|
|
@@ -2201,6 +2236,8 @@ export type NormalizedGroup = {
|
|
|
2201
2236
|
searchable?: boolean;
|
|
2202
2237
|
/** Placeholder for this group's search field. */
|
|
2203
2238
|
searchPlaceholder?: string;
|
|
2239
|
+
/** Section title per row (see {@link InternalGroup.groupBy}). */
|
|
2240
|
+
groupBy?: InternalGroup['groupBy'];
|
|
2204
2241
|
selectable: boolean;
|
|
2205
2242
|
/** Selected row keys (`rowKey`; injected by `BbDropdown`; empty for non-selectable groups). */
|
|
2206
2243
|
selected: string[];
|
|
@@ -2226,7 +2263,7 @@ export type MappedItem = InternalItem & {
|
|
|
2226
2263
|
* Passthrough parts of `BbDropdown` (plans/passthrough/BbDropdown.md). Groups,
|
|
2227
2264
|
* headings and dividers are not parts.
|
|
2228
2265
|
*
|
|
2229
|
-
* 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 `label`, `value`, `description`, whatever else you put on it),
|
|
2266
|
+
* 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 `label`, `value`, `description`, whatever else you put on it), every state a boolean beside it, on for it (`selected`, `disabled`, …), and the entry's `variant` as a string (`default` when it has none) — 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_.
|
|
2230
2267
|
*
|
|
2231
2268
|
* @part root - The floating element — an invisible positioning wrapper; a
|
|
2232
2269
|
* `class` on the component lands here. No node on the phone sheet: style
|
|
@@ -2283,14 +2320,25 @@ export type BbDropdownItemPtPart =
|
|
|
2283
2320
|
| 'itemIcon'
|
|
2284
2321
|
| 'itemDescription';
|
|
2285
2322
|
/**
|
|
2286
|
-
* Passthrough states of `BbDropdown`, true while the matching `--` modifier is on
|
|
2323
|
+
* Passthrough states of `BbDropdown`, true while the matching `--` modifier is on
|
|
2324
|
+
* (the link states: while the entry's `activeClass` / `exactActiveClass` are).
|
|
2287
2325
|
*
|
|
2326
|
+
* @state activeLink - Per node, on the entry parts: an entry whose link
|
|
2327
|
+
* (`to` / `href`) points at the current page or one of its ancestors —
|
|
2328
|
+
* exactly when its `activeClass` is on. The weakest state.
|
|
2329
|
+
* @state exactActiveLink - Per node, on the entry parts: an entry whose link
|
|
2330
|
+
* points at the current page itself — its `exactActiveClass` is on.
|
|
2288
2331
|
* @state selected - Per node, on the entry parts: a selectable group's
|
|
2289
2332
|
* checked entry.
|
|
2290
2333
|
* @state disabled - Per node, on the entry parts: an entry that is disabled.
|
|
2291
2334
|
* @state open - Component-wide: the menu is open.
|
|
2292
2335
|
*/
|
|
2293
|
-
export type BbDropdownPtState =
|
|
2336
|
+
export type BbDropdownPtState =
|
|
2337
|
+
| 'activeLink'
|
|
2338
|
+
| 'exactActiveLink'
|
|
2339
|
+
| 'open'
|
|
2340
|
+
| 'selected'
|
|
2341
|
+
| 'disabled';
|
|
2294
2342
|
/** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
|
|
2295
2343
|
export const BB_DROPDOWN_PT = {
|
|
2296
2344
|
parts: [
|
|
@@ -2306,10 +2354,22 @@ export const BB_DROPDOWN_PT = {
|
|
|
2306
2354
|
'itemIcon',
|
|
2307
2355
|
'itemDescription',
|
|
2308
2356
|
],
|
|
2309
|
-
states: ['selected', 'disabled', 'open'],
|
|
2357
|
+
states: ['activeLink', 'exactActiveLink', 'selected', 'disabled', 'open'],
|
|
2358
|
+
// Each entry's `variant` is a state on the entry parts (Q76.7), below the
|
|
2359
|
+
// real ones; an entry with none is `default`.
|
|
2360
|
+
variant: {
|
|
2361
|
+
names: DROPDOWN_ITEM_VARIANTS,
|
|
2362
|
+
option: 'dropdownItemVariants',
|
|
2363
|
+
parts: ['item', 'itemText', 'itemIcon', 'itemDescription'],
|
|
2364
|
+
},
|
|
2310
2365
|
} as const satisfies {
|
|
2311
2366
|
parts: readonly BbDropdownPtPart[];
|
|
2312
2367
|
states: readonly BbDropdownPtState[];
|
|
2368
|
+
variant: {
|
|
2369
|
+
names: readonly DropdownItemVariantBuiltIn[];
|
|
2370
|
+
option: string;
|
|
2371
|
+
parts: readonly BbDropdownItemPtPart[];
|
|
2372
|
+
};
|
|
2313
2373
|
};
|
|
2314
2374
|
|
|
2315
2375
|
// Spelled INLINE with this component's own unions (Vue's SFC type resolver
|
|
@@ -2320,170 +2380,189 @@ export const BB_DROPDOWN_PT = {
|
|
|
2320
2380
|
export type BbDropdownProps = {
|
|
2321
2381
|
[K in
|
|
2322
2382
|
| `pt:${BbDropdownSurfacePtPart}`
|
|
2323
|
-
| `pt:${BbDropdownPtPart}:${BbDropdownPtState}`
|
|
2324
|
-
}
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2383
|
+
| `pt:${BbDropdownPtPart}:${BbDropdownPtState}`
|
|
2384
|
+
| `pt:${BbDropdownItemPtPart}:${DropdownItemVariantBuiltIn}`]?: PtValue;
|
|
2385
|
+
} & /* @vue-ignore */ PtVariantAttrs<
|
|
2386
|
+
BbDropdownItemPtPart,
|
|
2387
|
+
keyof DropdownItemVariantRegistry
|
|
2388
|
+
> & {
|
|
2389
|
+
// The entry parts also take a per-item function, called with the menu
|
|
2390
|
+
// entry — a literal function type, not `PtItemFn` (T23).
|
|
2391
|
+
[K in `pt:${BbDropdownItemPtPart}`]?:
|
|
2392
|
+
| PtValue
|
|
2393
|
+
| ((
|
|
2394
|
+
ctx: PtItemCtx<
|
|
2395
|
+
InternalItem,
|
|
2396
|
+
BbDropdownPtState,
|
|
2397
|
+
DropdownItemVariantBuiltIn | keyof DropdownItemVariantRegistry
|
|
2398
|
+
>
|
|
2399
|
+
) => PtItemResult);
|
|
2400
|
+
} & {
|
|
2401
|
+
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
2402
|
+
/**
|
|
2403
|
+
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
2404
|
+
* without the prefix. See the `pt:<part>` row.
|
|
2405
|
+
*/
|
|
2406
|
+
pt?: PtItemMap<
|
|
2407
|
+
BbDropdownPtPart,
|
|
2408
|
+
BbDropdownItemPtPart,
|
|
2409
|
+
BbDropdownPtState,
|
|
2410
|
+
InternalItem,
|
|
2411
|
+
DropdownItemVariantBuiltIn | keyof DropdownItemVariantRegistry
|
|
2412
|
+
>;
|
|
2413
|
+
/**
|
|
2414
|
+
* An external activator element or component ref: the activator slot is not
|
|
2415
|
+
* rendered, and the listeners and ARIA (`aria-haspopup` / `aria-expanded` /
|
|
2416
|
+
* `aria-controls`) are attached to it; don't add your own.
|
|
2417
|
+
*/
|
|
2418
|
+
activator?: HTMLElement | Record<string, any> | null;
|
|
2419
|
+
/**
|
|
2420
|
+
* On mobile (below `config.mobileMaxWidth`), renders the menu as a bottom
|
|
2421
|
+
* sheet that drills into submenus one level at a time instead of hover
|
|
2422
|
+
* flyouts; slots and selection are unchanged. Unset: the global
|
|
2423
|
+
* `config.adaptive`.
|
|
2424
|
+
*
|
|
2425
|
+
* @defaultValue `config.adaptive` (`true`)
|
|
2426
|
+
*/
|
|
2427
|
+
adaptive?: boolean;
|
|
2428
|
+
/**
|
|
2429
|
+
* Whether a selection closes the menu. Unset: a change in a single-choice
|
|
2430
|
+
* group closes it (an untick too, at any depth); a `multiple` group stays
|
|
2431
|
+
* open. `true`: every selection change closes it. `false`: none does.
|
|
2432
|
+
*
|
|
2433
|
+
* @defaultValue unset (close after a single-choice change)
|
|
2434
|
+
*/
|
|
2435
|
+
closeOnSelect?: boolean;
|
|
2436
|
+
/**
|
|
2437
|
+
* Compact density, the `BbSelect` ladder: flyout rows 28px → 24px, sheet
|
|
2438
|
+
* rows 44px → 36px (a sheet row stays a touch target). The label size does
|
|
2439
|
+
* not change.
|
|
2440
|
+
*/
|
|
2441
|
+
compact?: boolean;
|
|
2442
|
+
/**
|
|
2443
|
+
* The element the panel positions against when it should differ from the
|
|
2444
|
+
* activator (a wrapper the activator is part of); an HTMLElement or
|
|
2445
|
+
* component ref. It also drives a percentage `width`. Ignored with
|
|
2446
|
+
* `placement="cursor"`.
|
|
2447
|
+
*
|
|
2448
|
+
* @defaultValue the activator element
|
|
2449
|
+
*/
|
|
2450
|
+
anchor?: HTMLElement | Record<string, any> | null;
|
|
2451
|
+
/**
|
|
2452
|
+
* Keeps the panel inside this element alongside its trigger (sideways for
|
|
2453
|
+
* a menu above or below); away from the trigger it may pass the edge, and
|
|
2454
|
+
* only the viewport flips it. An HTMLElement, a component ref or a CSS
|
|
2455
|
+
* selector: a `useTemplateRef`, never `$refs.x` (not reactive).
|
|
2456
|
+
*/
|
|
2457
|
+
boundary?: HTMLElement | Record<string, any> | string | null;
|
|
2458
|
+
/**
|
|
2459
|
+
* Disables the component
|
|
2460
|
+
*/
|
|
2461
|
+
disabled?: boolean;
|
|
2462
|
+
/**
|
|
2463
|
+
* Renders the menu panel at mount instead of on the first open (the phone
|
|
2464
|
+
* sheet's too), and keeps its rows after a close. Without it the rows mount
|
|
2465
|
+
* on each open and go once the menu has closed.
|
|
2466
|
+
*/
|
|
2467
|
+
eager?: boolean;
|
|
2468
|
+
/**
|
|
2469
|
+
* Default for pipeline groups: drop selections that are no longer present in a
|
|
2470
|
+
* group's current items (e.g. after a `dependencies` re-fetch) from the
|
|
2471
|
+
* selection and `v-model`. A group's own `enforceCoherence` overrides this.
|
|
2472
|
+
*/
|
|
2473
|
+
enforceCoherence?: boolean;
|
|
2474
|
+
/**
|
|
2475
|
+
* Names this dropdown: the activator's id (unless it already has one),
|
|
2476
|
+
* the menu's `menu_<id>`, and the key `useBbDropdownContext(id)` and a
|
|
2477
|
+
* companion `BbDropdownGroup` pair by. Generated when omitted.
|
|
2478
|
+
*/
|
|
2479
|
+
id?: string;
|
|
2480
|
+
/**
|
|
2481
|
+
* The menu rows, each a `BbBaseButton` (`button`, `a` or `router-link`): a
|
|
2482
|
+
* flat array for one group, nested arrays for divider-separated groups, or
|
|
2483
|
+
* `InternalGroup` objects for titled / selectable sections. A row's own
|
|
2484
|
+
* `items` opens a submenu.
|
|
2485
|
+
*
|
|
2486
|
+
* @defaultValue `[]`
|
|
2487
|
+
*/
|
|
2488
|
+
items: Item[];
|
|
2489
|
+
/**
|
|
2490
|
+
* Default placeholder text shown while a pipeline group's async items load.
|
|
2491
|
+
* A group's own `loadingText` overrides this; both fall back to the localized
|
|
2492
|
+
* `common.loadingText` (`'Loading...'`).
|
|
2493
|
+
*/
|
|
2494
|
+
loadingText?: string;
|
|
2495
|
+
/**
|
|
2496
|
+
* Default placeholder text shown when a pipeline group resolves to no items.
|
|
2497
|
+
* A group's own `emptyText` overrides this; both fall back to the localized
|
|
2498
|
+
* `common.emptyText` (`'No data to display'`).
|
|
2499
|
+
*/
|
|
2500
|
+
emptyText?: string;
|
|
2501
|
+
/**
|
|
2502
|
+
* Default placeholder text shown when a pipeline group's latest load FAILED
|
|
2503
|
+
* (its `items` getter threw). A group's own `failedText` overrides this; both
|
|
2504
|
+
* fall back to the localized `common.failedText` (`"Couldn't load items"`).
|
|
2505
|
+
*/
|
|
2506
|
+
failedText?: string;
|
|
2507
|
+
/**
|
|
2508
|
+
* Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on
|
|
2509
|
+
* mobile), spread over its defaults. A `pt` inside it styles only the sheet
|
|
2510
|
+
* (passthrough guide § Inside the sheet). The sheet hides its ✕; `{
|
|
2511
|
+
* hideClose: false }` brings it back.
|
|
2512
|
+
*/
|
|
2513
|
+
offCanvasProps?: Partial<BbOffCanvasProps>;
|
|
2514
|
+
/**
|
|
2515
|
+
* Space the floating container will maintain from the activator.
|
|
2516
|
+
*
|
|
2517
|
+
* @defaultValue `4`
|
|
2518
|
+
*/
|
|
2519
|
+
offset?: number;
|
|
2520
|
+
/**
|
|
2521
|
+
* Minimum empty space to keep from the edge of the page
|
|
2522
|
+
*
|
|
2523
|
+
* @defaultValue `10`
|
|
2524
|
+
*/
|
|
2525
|
+
padding?: number;
|
|
2526
|
+
/**
|
|
2527
|
+
* Position of the dropdown relative to the activator.
|
|
2528
|
+
* Use `'cursor'` to anchor at the mouse/touch coordinates.
|
|
2529
|
+
* (No arrow is drawn either way — arrows are tooltip-only in v3.)
|
|
2530
|
+
*
|
|
2531
|
+
* @defaultValue `'bottom'`
|
|
2532
|
+
*/
|
|
2533
|
+
placement?: Placement | 'cursor';
|
|
2534
|
+
/**
|
|
2535
|
+
* Debounce (ms) applied to the async re-fetch a `searchable` group fires as the
|
|
2536
|
+
* user types. Applies to every searchable group in the menu.
|
|
2537
|
+
*
|
|
2538
|
+
* @defaultValue `300`
|
|
2539
|
+
*/
|
|
2540
|
+
queryDebounceTime?: number;
|
|
2541
|
+
/**
|
|
2542
|
+
* How long the transition has to last in milliseconds. Menus use the fast
|
|
2543
|
+
* transition (150) rather than the medium one (250) the other popovers
|
|
2544
|
+
* default to: a menu is opened to pick one command and is gone again, so
|
|
2545
|
+
* it answers faster than a panel the user reads or edits in.
|
|
2546
|
+
*
|
|
2547
|
+
* @defaultValue `150`
|
|
2548
|
+
*/
|
|
2549
|
+
transitionDuration?: number;
|
|
2550
|
+
/**
|
|
2551
|
+
* Interaction(s) that open the dropdown.
|
|
2552
|
+
* Accepts a single trigger or an array to combine them.
|
|
2553
|
+
* - `'click'` — left-click / tap (default)
|
|
2554
|
+
* - `'contextMenu'` — right-click on desktop, long-press on mobile
|
|
2555
|
+
*
|
|
2556
|
+
* @defaultValue `'click'`
|
|
2557
|
+
*/
|
|
2558
|
+
trigger?: DropdownTrigger | DropdownTrigger[];
|
|
2559
|
+
/**
|
|
2560
|
+
* Width of the dropdown in pixels, percentage, or 'auto' to fit content.
|
|
2561
|
+
*
|
|
2562
|
+
* @defaultValue `'auto'`
|
|
2563
|
+
*/
|
|
2564
|
+
width?: number | string;
|
|
2565
|
+
};
|
|
2487
2566
|
|
|
2488
2567
|
export type BbDropdownEvents = {
|
|
2489
2568
|
/** Emitted as soon as the menu (the popover, or the sheet on a phone) starts to open. */
|
|
@@ -2598,12 +2677,28 @@ export type BbDropdownItemSlotProps = {
|
|
|
2598
2677
|
selected: boolean;
|
|
2599
2678
|
/** The row's label (on a group's title line, the group's label). */
|
|
2600
2679
|
label: InternalItem['label'];
|
|
2680
|
+
/**
|
|
2681
|
+
* A link entry (`to` / `href`) pointing at the current page or one of its
|
|
2682
|
+
* ancestors: its `activeClass` is on. Not set on a group's title line.
|
|
2683
|
+
*/
|
|
2684
|
+
activeLink?: boolean;
|
|
2685
|
+
/**
|
|
2686
|
+
* A link entry pointing at the current page itself: its `exactActiveClass`
|
|
2687
|
+
* is on. Not set on a group's title line.
|
|
2688
|
+
*/
|
|
2689
|
+
exactActiveLink?: boolean;
|
|
2601
2690
|
};
|
|
2602
2691
|
|
|
2603
2692
|
/** Props exposed by the `loading` and `empty` placeholder slots. */
|
|
2604
2693
|
export type BbDropdownPlaceholderSlotProps = {
|
|
2605
2694
|
/** Id of the group this placeholder belongs to. */
|
|
2606
2695
|
groupId?: string;
|
|
2696
|
+
/**
|
|
2697
|
+
* The group's current search text, as typed (`''` when it has no search
|
|
2698
|
+
* field or nothing is typed) — the same `query` BbSelect's `#empty` gets,
|
|
2699
|
+
* e.g. for "Type at least 2 characters" under a remote search's minimum.
|
|
2700
|
+
*/
|
|
2701
|
+
query: string;
|
|
2607
2702
|
/** Resolved placeholder text (group `loadingText`/`emptyText`/`failedText` → dropdown default). */
|
|
2608
2703
|
text: string;
|
|
2609
2704
|
/**
|
|
@@ -2730,6 +2825,16 @@ export type BbDropdownGroupEvents = {
|
|
|
2730
2825
|
--bg: var(--bb-panel);
|
|
2731
2826
|
}
|
|
2732
2827
|
|
|
2828
|
+
/* The item size knobs (ATT-09), BbButton's names: `--fs` the row label,
|
|
2829
|
+
`--icon-size` its prepend / append icons. Declared at specificity 0 on the
|
|
2830
|
+
menu's root, so a consumer class or `pt` wins and a `--fs` an ancestor set
|
|
2831
|
+
(a button, a badge) never leaks in; submenus inherit the root's. The adaptive
|
|
2832
|
+
sheet reads neither: its rows keep `--sheet-option-fs` and their own icons. */
|
|
2833
|
+
:where(.bb-dropdown:not(.bb-dropdown--submenu)) {
|
|
2834
|
+
--fs: var(--bb-fs);
|
|
2835
|
+
--icon-size: 1rem;
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2733
2838
|
/* @inherit --transition-duration — set inline by the adaptive surface;
|
|
2734
2839
|
@inherit --py — the adaptive sheet's rules target BbOffCanvas elements, which
|
|
2735
2840
|
declare it on the panel */
|
|
@@ -2961,8 +3066,9 @@ export type BbDropdownGroupEvents = {
|
|
|
2961
3066
|
/* `--bb-fs`, matching the select's option label. These two menus sit at
|
|
2962
3067
|
the same 28px row height on the same screen and their labels were a
|
|
2963
3068
|
pixel apart (13 against 14) — the desktop twin of the sheet drift, and
|
|
2964
|
-
the kind of difference nobody can name but everybody sees.
|
|
2965
|
-
|
|
3069
|
+
the kind of difference nobody can name but everybody sees. `--fs`
|
|
3070
|
+
(above) is the consumer's knob. */
|
|
3071
|
+
font-size: var(--fs);
|
|
2966
3072
|
gap: 1px;
|
|
2967
3073
|
line-height: 1.2;
|
|
2968
3074
|
max-height: var(--max-h, none);
|
|
@@ -3125,9 +3231,9 @@ export type BbDropdownGroupEvents = {
|
|
|
3125
3231
|
|
|
3126
3232
|
.item__prepend-icon,
|
|
3127
3233
|
.item__append-icon {
|
|
3128
|
-
--size:
|
|
3234
|
+
--size: var(--icon-size);
|
|
3129
3235
|
flex-shrink: 0;
|
|
3130
|
-
font-size:
|
|
3236
|
+
font-size: calc(var(--icon-size) - 1px);
|
|
3131
3237
|
}
|
|
3132
3238
|
|
|
3133
3239
|
.item__content {
|
|
@@ -3188,6 +3294,11 @@ export type BbDropdownGroupEvents = {
|
|
|
3188
3294
|
flex-shrink: 0;
|
|
3189
3295
|
font-size: 19px;
|
|
3190
3296
|
margin-inline-start: auto;
|
|
3297
|
+
|
|
3298
|
+
/* Points where the flyout opens: the inline end. */
|
|
3299
|
+
&:dir(rtl) {
|
|
3300
|
+
transform: scaleX(-1);
|
|
3301
|
+
}
|
|
3191
3302
|
}
|
|
3192
3303
|
|
|
3193
3304
|
/*
|
|
@@ -3580,9 +3691,15 @@ export type BbDropdownGroupEvents = {
|
|
|
3580
3691
|
position: absolute;
|
|
3581
3692
|
top: var(--bb-panel-p);
|
|
3582
3693
|
|
|
3583
|
-
/* Same chevron_right asset the submenu rows use, pointed back
|
|
3694
|
+
/* Same chevron_right asset the submenu rows use, pointed back:
|
|
3695
|
+
toward the inline start, which is already where it points in
|
|
3696
|
+
rtl. */
|
|
3584
3697
|
.bb-button__icon {
|
|
3585
3698
|
transform: rotate(180deg);
|
|
3699
|
+
|
|
3700
|
+
&:dir(rtl) {
|
|
3701
|
+
transform: none;
|
|
3702
|
+
}
|
|
3586
3703
|
}
|
|
3587
3704
|
}
|
|
3588
3705
|
|