bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.64
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 +416 -6
- package/dist/ai/components.json +50 -48
- 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 +79 -49
- 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 +163 -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 +147 -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 +15 -9
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +4 -4
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +39 -24
- package/dist/ai/helpers/inertia/useRouteQuery.ts +10 -4
- 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/layout-scaffold.md +19 -6
- package/dist/ai/recipes/inertia/records-workspace.md +49 -13
- 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 +128 -33
- 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 +543 -532
- 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/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 +2300 -543
- 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 +3 -3
- 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/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
|
@@ -263,10 +263,16 @@ import type {
|
|
|
263
263
|
PtItemMap,
|
|
264
264
|
PtItemResult,
|
|
265
265
|
PtValue,
|
|
266
|
+
PtVariantAttrs,
|
|
266
267
|
} from '@/types/passthrough';
|
|
267
268
|
import type { Placement } from '@/types/Placement';
|
|
268
269
|
import type { IconType } from '@/types/Icon';
|
|
269
|
-
import
|
|
270
|
+
import {
|
|
271
|
+
DROPDOWN_ITEM_VARIANTS,
|
|
272
|
+
type DropdownItemVariantBuiltIn,
|
|
273
|
+
type DropdownItemVariantRegistry,
|
|
274
|
+
type DropdownItemVariantType,
|
|
275
|
+
} from '@/types/DropdownItemVariant';
|
|
270
276
|
import type { BbOffCanvasProps } from '../BbOffCanvas/types';
|
|
271
277
|
import type { ItemProps } from '@/types/ItemProps';
|
|
272
278
|
import type { BbDropdownGroupItemsContext } from '@/types/ItemsProvider';
|
|
@@ -649,8 +655,18 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
649
655
|
/** Placeholder for this group's search field. Defaults to the localized label. */
|
|
650
656
|
searchPlaceholder?: string;
|
|
651
657
|
/**
|
|
652
|
-
*
|
|
653
|
-
*
|
|
658
|
+
* Sorts the group's rows under titled sections, inside the one group (one
|
|
659
|
+
* `v-model`, one search field): a field path read off each row (a fetched
|
|
660
|
+
* row: its raw item) or a getter returning the section title. Rows with a
|
|
661
|
+
* nullish title are listed without a heading. Sections keep the order in
|
|
662
|
+
* which their first row appears, like `BbSelect`'s `groupBy`; a search hides
|
|
663
|
+
* a section with no matching row.
|
|
664
|
+
*/
|
|
665
|
+
groupBy?: string | ((row: any) => string | null | undefined);
|
|
666
|
+
/**
|
|
667
|
+
* When set, items act as selectable options that render a check on the right.
|
|
668
|
+
* A change closes the menu in a single-choice group and keeps it open in a
|
|
669
|
+
* `multiple` one; the dropdown's `closeOnSelect` decides otherwise.
|
|
654
670
|
*
|
|
655
671
|
* Pass a function `(item) => boolean` to gate individual rows — the same
|
|
656
672
|
* contract as `BbSelect` and the option groups. The group is still a
|
|
@@ -782,6 +798,8 @@ export type NormalizedGroup = {
|
|
|
782
798
|
searchable?: boolean;
|
|
783
799
|
/** Placeholder for this group's search field. */
|
|
784
800
|
searchPlaceholder?: string;
|
|
801
|
+
/** Section title per row (see {@link InternalGroup.groupBy}). */
|
|
802
|
+
groupBy?: InternalGroup['groupBy'];
|
|
785
803
|
selectable: boolean;
|
|
786
804
|
/** Selected row keys (`rowKey`; injected by `BbDropdown`; empty for non-selectable groups). */
|
|
787
805
|
selected: string[];
|
|
@@ -807,7 +825,7 @@ export type MappedItem = InternalItem & {
|
|
|
807
825
|
* Passthrough parts of `BbDropdown` (plans/passthrough/BbDropdown.md). Groups,
|
|
808
826
|
* headings and dividers are not parts.
|
|
809
827
|
*
|
|
810
|
-
* 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),
|
|
828
|
+
* 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_.
|
|
811
829
|
*
|
|
812
830
|
* @part root - The floating element — an invisible positioning wrapper; a
|
|
813
831
|
* `class` on the component lands here. No node on the phone sheet: style
|
|
@@ -864,14 +882,25 @@ export type BbDropdownItemPtPart =
|
|
|
864
882
|
| 'itemIcon'
|
|
865
883
|
| 'itemDescription';
|
|
866
884
|
/**
|
|
867
|
-
* Passthrough states of `BbDropdown`, true while the matching `--` modifier is on
|
|
885
|
+
* Passthrough states of `BbDropdown`, true while the matching `--` modifier is on
|
|
886
|
+
* (the link states: while the entry's `activeClass` / `exactActiveClass` are).
|
|
868
887
|
*
|
|
888
|
+
* @state activeLink - Per node, on the entry parts: an entry whose link
|
|
889
|
+
* (`to` / `href`) points at the current page or one of its ancestors —
|
|
890
|
+
* exactly when its `activeClass` is on. The weakest state.
|
|
891
|
+
* @state exactActiveLink - Per node, on the entry parts: an entry whose link
|
|
892
|
+
* points at the current page itself — its `exactActiveClass` is on.
|
|
869
893
|
* @state selected - Per node, on the entry parts: a selectable group's
|
|
870
894
|
* checked entry.
|
|
871
895
|
* @state disabled - Per node, on the entry parts: an entry that is disabled.
|
|
872
896
|
* @state open - Component-wide: the menu is open.
|
|
873
897
|
*/
|
|
874
|
-
export type BbDropdownPtState =
|
|
898
|
+
export type BbDropdownPtState =
|
|
899
|
+
| 'activeLink'
|
|
900
|
+
| 'exactActiveLink'
|
|
901
|
+
| 'open'
|
|
902
|
+
| 'selected'
|
|
903
|
+
| 'disabled';
|
|
875
904
|
/** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
|
|
876
905
|
export const BB_DROPDOWN_PT = {
|
|
877
906
|
parts: [
|
|
@@ -887,10 +916,22 @@ export const BB_DROPDOWN_PT = {
|
|
|
887
916
|
'itemIcon',
|
|
888
917
|
'itemDescription',
|
|
889
918
|
],
|
|
890
|
-
states: ['selected', 'disabled', 'open'],
|
|
919
|
+
states: ['activeLink', 'exactActiveLink', 'selected', 'disabled', 'open'],
|
|
920
|
+
// Each entry's `variant` is a state on the entry parts (Q76.7), below the
|
|
921
|
+
// real ones; an entry with none is `default`.
|
|
922
|
+
variant: {
|
|
923
|
+
names: DROPDOWN_ITEM_VARIANTS,
|
|
924
|
+
option: 'dropdownItemVariants',
|
|
925
|
+
parts: ['item', 'itemText', 'itemIcon', 'itemDescription'],
|
|
926
|
+
},
|
|
891
927
|
} as const satisfies {
|
|
892
928
|
parts: readonly BbDropdownPtPart[];
|
|
893
929
|
states: readonly BbDropdownPtState[];
|
|
930
|
+
variant: {
|
|
931
|
+
names: readonly DropdownItemVariantBuiltIn[];
|
|
932
|
+
option: string;
|
|
933
|
+
parts: readonly BbDropdownItemPtPart[];
|
|
934
|
+
};
|
|
894
935
|
};
|
|
895
936
|
|
|
896
937
|
// Spelled INLINE with this component's own unions (Vue's SFC type resolver
|
|
@@ -901,170 +942,189 @@ export const BB_DROPDOWN_PT = {
|
|
|
901
942
|
export type BbDropdownProps = {
|
|
902
943
|
[K in
|
|
903
944
|
| `pt:${BbDropdownSurfacePtPart}`
|
|
904
|
-
| `pt:${BbDropdownPtPart}:${BbDropdownPtState}`
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
945
|
+
| `pt:${BbDropdownPtPart}:${BbDropdownPtState}`
|
|
946
|
+
| `pt:${BbDropdownItemPtPart}:${DropdownItemVariantBuiltIn}`]?: PtValue;
|
|
947
|
+
} & /* @vue-ignore */ PtVariantAttrs<
|
|
948
|
+
BbDropdownItemPtPart,
|
|
949
|
+
keyof DropdownItemVariantRegistry
|
|
950
|
+
> & {
|
|
951
|
+
// The entry parts also take a per-item function, called with the menu
|
|
952
|
+
// entry — a literal function type, not `PtItemFn` (T23).
|
|
953
|
+
[K in `pt:${BbDropdownItemPtPart}`]?:
|
|
954
|
+
| PtValue
|
|
955
|
+
| ((
|
|
956
|
+
ctx: PtItemCtx<
|
|
957
|
+
InternalItem,
|
|
958
|
+
BbDropdownPtState,
|
|
959
|
+
DropdownItemVariantBuiltIn | keyof DropdownItemVariantRegistry
|
|
960
|
+
>
|
|
961
|
+
) => PtItemResult);
|
|
962
|
+
} & {
|
|
963
|
+
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
964
|
+
/**
|
|
965
|
+
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
966
|
+
* without the prefix. See the `pt:<part>` row.
|
|
967
|
+
*/
|
|
968
|
+
pt?: PtItemMap<
|
|
969
|
+
BbDropdownPtPart,
|
|
970
|
+
BbDropdownItemPtPart,
|
|
971
|
+
BbDropdownPtState,
|
|
972
|
+
InternalItem,
|
|
973
|
+
DropdownItemVariantBuiltIn | keyof DropdownItemVariantRegistry
|
|
974
|
+
>;
|
|
975
|
+
/**
|
|
976
|
+
* An external activator element or component ref: the activator slot is not
|
|
977
|
+
* rendered, and the listeners and ARIA (`aria-haspopup` / `aria-expanded` /
|
|
978
|
+
* `aria-controls`) are attached to it; don't add your own.
|
|
979
|
+
*/
|
|
980
|
+
activator?: HTMLElement | Record<string, any> | null;
|
|
981
|
+
/**
|
|
982
|
+
* On mobile (below `config.mobileMaxWidth`), renders the menu as a bottom
|
|
983
|
+
* sheet that drills into submenus one level at a time instead of hover
|
|
984
|
+
* flyouts; slots and selection are unchanged. Unset: the global
|
|
985
|
+
* `config.adaptive`.
|
|
986
|
+
*
|
|
987
|
+
* @defaultValue `config.adaptive` (`true`)
|
|
988
|
+
*/
|
|
989
|
+
adaptive?: boolean;
|
|
990
|
+
/**
|
|
991
|
+
* Whether a selection closes the menu. Unset: a change in a single-choice
|
|
992
|
+
* group closes it (an untick too, at any depth); a `multiple` group stays
|
|
993
|
+
* open. `true`: every selection change closes it. `false`: none does.
|
|
994
|
+
*
|
|
995
|
+
* @defaultValue unset (close after a single-choice change)
|
|
996
|
+
*/
|
|
997
|
+
closeOnSelect?: boolean;
|
|
998
|
+
/**
|
|
999
|
+
* Compact density, the `BbSelect` ladder: flyout rows 28px → 24px, sheet
|
|
1000
|
+
* rows 44px → 36px (a sheet row stays a touch target). The label size does
|
|
1001
|
+
* not change.
|
|
1002
|
+
*/
|
|
1003
|
+
compact?: boolean;
|
|
1004
|
+
/**
|
|
1005
|
+
* The element the panel positions against when it should differ from the
|
|
1006
|
+
* activator (a wrapper the activator is part of); an HTMLElement or
|
|
1007
|
+
* component ref. It also drives a percentage `width`. Ignored with
|
|
1008
|
+
* `placement="cursor"`.
|
|
1009
|
+
*
|
|
1010
|
+
* @defaultValue the activator element
|
|
1011
|
+
*/
|
|
1012
|
+
anchor?: HTMLElement | Record<string, any> | null;
|
|
1013
|
+
/**
|
|
1014
|
+
* Keeps the panel inside this element alongside its trigger (sideways for
|
|
1015
|
+
* a menu above or below); away from the trigger it may pass the edge, and
|
|
1016
|
+
* only the viewport flips it. An HTMLElement, a component ref or a CSS
|
|
1017
|
+
* selector: a `useTemplateRef`, never `$refs.x` (not reactive).
|
|
1018
|
+
*/
|
|
1019
|
+
boundary?: HTMLElement | Record<string, any> | string | null;
|
|
1020
|
+
/**
|
|
1021
|
+
* Disables the component
|
|
1022
|
+
*/
|
|
1023
|
+
disabled?: boolean;
|
|
1024
|
+
/**
|
|
1025
|
+
* Renders the menu panel at mount instead of on the first open (the phone
|
|
1026
|
+
* sheet's too), and keeps its rows after a close. Without it the rows mount
|
|
1027
|
+
* on each open and go once the menu has closed.
|
|
1028
|
+
*/
|
|
1029
|
+
eager?: boolean;
|
|
1030
|
+
/**
|
|
1031
|
+
* Default for pipeline groups: drop selections that are no longer present in a
|
|
1032
|
+
* group's current items (e.g. after a `dependencies` re-fetch) from the
|
|
1033
|
+
* selection and `v-model`. A group's own `enforceCoherence` overrides this.
|
|
1034
|
+
*/
|
|
1035
|
+
enforceCoherence?: boolean;
|
|
1036
|
+
/**
|
|
1037
|
+
* Names this dropdown: the activator's id (unless it already has one),
|
|
1038
|
+
* the menu's `menu_<id>`, and the key `useBbDropdownContext(id)` and a
|
|
1039
|
+
* companion `BbDropdownGroup` pair by. Generated when omitted.
|
|
1040
|
+
*/
|
|
1041
|
+
id?: string;
|
|
1042
|
+
/**
|
|
1043
|
+
* The menu rows, each a `BbBaseButton` (`button`, `a` or `router-link`): a
|
|
1044
|
+
* flat array for one group, nested arrays for divider-separated groups, or
|
|
1045
|
+
* `InternalGroup` objects for titled / selectable sections. A row's own
|
|
1046
|
+
* `items` opens a submenu.
|
|
1047
|
+
*
|
|
1048
|
+
* @defaultValue `[]`
|
|
1049
|
+
*/
|
|
1050
|
+
items: Item[];
|
|
1051
|
+
/**
|
|
1052
|
+
* Default placeholder text shown while a pipeline group's async items load.
|
|
1053
|
+
* A group's own `loadingText` overrides this; both fall back to the localized
|
|
1054
|
+
* `common.loadingText` (`'Loading...'`).
|
|
1055
|
+
*/
|
|
1056
|
+
loadingText?: string;
|
|
1057
|
+
/**
|
|
1058
|
+
* Default placeholder text shown when a pipeline group resolves to no items.
|
|
1059
|
+
* A group's own `emptyText` overrides this; both fall back to the localized
|
|
1060
|
+
* `common.emptyText` (`'No data to display'`).
|
|
1061
|
+
*/
|
|
1062
|
+
emptyText?: string;
|
|
1063
|
+
/**
|
|
1064
|
+
* Default placeholder text shown when a pipeline group's latest load FAILED
|
|
1065
|
+
* (its `items` getter threw). A group's own `failedText` overrides this; both
|
|
1066
|
+
* fall back to the localized `common.failedText` (`"Couldn't load items"`).
|
|
1067
|
+
*/
|
|
1068
|
+
failedText?: string;
|
|
1069
|
+
/**
|
|
1070
|
+
* Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on
|
|
1071
|
+
* mobile), spread over its defaults. A `pt` inside it styles only the sheet
|
|
1072
|
+
* (passthrough guide § Inside the sheet). The sheet hides its ✕; `{
|
|
1073
|
+
* hideClose: false }` brings it back.
|
|
1074
|
+
*/
|
|
1075
|
+
offCanvasProps?: Partial<BbOffCanvasProps>;
|
|
1076
|
+
/**
|
|
1077
|
+
* Space the floating container will maintain from the activator.
|
|
1078
|
+
*
|
|
1079
|
+
* @defaultValue `4`
|
|
1080
|
+
*/
|
|
1081
|
+
offset?: number;
|
|
1082
|
+
/**
|
|
1083
|
+
* Minimum empty space to keep from the edge of the page
|
|
1084
|
+
*
|
|
1085
|
+
* @defaultValue `10`
|
|
1086
|
+
*/
|
|
1087
|
+
padding?: number;
|
|
1088
|
+
/**
|
|
1089
|
+
* Position of the dropdown relative to the activator.
|
|
1090
|
+
* Use `'cursor'` to anchor at the mouse/touch coordinates.
|
|
1091
|
+
* (No arrow is drawn either way — arrows are tooltip-only in v3.)
|
|
1092
|
+
*
|
|
1093
|
+
* @defaultValue `'bottom'`
|
|
1094
|
+
*/
|
|
1095
|
+
placement?: Placement | 'cursor';
|
|
1096
|
+
/**
|
|
1097
|
+
* Debounce (ms) applied to the async re-fetch a `searchable` group fires as the
|
|
1098
|
+
* user types. Applies to every searchable group in the menu.
|
|
1099
|
+
*
|
|
1100
|
+
* @defaultValue `300`
|
|
1101
|
+
*/
|
|
1102
|
+
queryDebounceTime?: number;
|
|
1103
|
+
/**
|
|
1104
|
+
* How long the transition has to last in milliseconds. Menus use the fast
|
|
1105
|
+
* transition (150) rather than the medium one (250) the other popovers
|
|
1106
|
+
* default to: a menu is opened to pick one command and is gone again, so
|
|
1107
|
+
* it answers faster than a panel the user reads or edits in.
|
|
1108
|
+
*
|
|
1109
|
+
* @defaultValue `150`
|
|
1110
|
+
*/
|
|
1111
|
+
transitionDuration?: number;
|
|
1112
|
+
/**
|
|
1113
|
+
* Interaction(s) that open the dropdown.
|
|
1114
|
+
* Accepts a single trigger or an array to combine them.
|
|
1115
|
+
* - `'click'` — left-click / tap (default)
|
|
1116
|
+
* - `'contextMenu'` — right-click on desktop, long-press on mobile
|
|
1117
|
+
*
|
|
1118
|
+
* @defaultValue `'click'`
|
|
1119
|
+
*/
|
|
1120
|
+
trigger?: DropdownTrigger | DropdownTrigger[];
|
|
1121
|
+
/**
|
|
1122
|
+
* Width of the dropdown in pixels, percentage, or 'auto' to fit content.
|
|
1123
|
+
*
|
|
1124
|
+
* @defaultValue `'auto'`
|
|
1125
|
+
*/
|
|
1126
|
+
width?: number | string;
|
|
1127
|
+
};
|
|
1068
1128
|
|
|
1069
1129
|
export type BbDropdownEvents = {
|
|
1070
1130
|
/** Emitted as soon as the menu (the popover, or the sheet on a phone) starts to open. */
|
|
@@ -1179,12 +1239,28 @@ export type BbDropdownItemSlotProps = {
|
|
|
1179
1239
|
selected: boolean;
|
|
1180
1240
|
/** The row's label (on a group's title line, the group's label). */
|
|
1181
1241
|
label: InternalItem['label'];
|
|
1242
|
+
/**
|
|
1243
|
+
* A link entry (`to` / `href`) pointing at the current page or one of its
|
|
1244
|
+
* ancestors: its `activeClass` is on. Not set on a group's title line.
|
|
1245
|
+
*/
|
|
1246
|
+
activeLink?: boolean;
|
|
1247
|
+
/**
|
|
1248
|
+
* A link entry pointing at the current page itself: its `exactActiveClass`
|
|
1249
|
+
* is on. Not set on a group's title line.
|
|
1250
|
+
*/
|
|
1251
|
+
exactActiveLink?: boolean;
|
|
1182
1252
|
};
|
|
1183
1253
|
|
|
1184
1254
|
/** Props exposed by the `loading` and `empty` placeholder slots. */
|
|
1185
1255
|
export type BbDropdownPlaceholderSlotProps = {
|
|
1186
1256
|
/** Id of the group this placeholder belongs to. */
|
|
1187
1257
|
groupId?: string;
|
|
1258
|
+
/**
|
|
1259
|
+
* The group's current search text, as typed (`''` when it has no search
|
|
1260
|
+
* field or nothing is typed) — the same `query` BbSelect's `#empty` gets,
|
|
1261
|
+
* e.g. for "Type at least 2 characters" under a remote search's minimum.
|
|
1262
|
+
*/
|
|
1263
|
+
query: string;
|
|
1188
1264
|
/** Resolved placeholder text (group `loadingText`/`emptyText`/`failedText` → dropdown default). */
|
|
1189
1265
|
text: string;
|
|
1190
1266
|
/**
|
|
@@ -1311,6 +1387,16 @@ export type BbDropdownGroupEvents = {
|
|
|
1311
1387
|
--bg: var(--bb-panel);
|
|
1312
1388
|
}
|
|
1313
1389
|
|
|
1390
|
+
/* The item size knobs (ATT-09), BbButton's names: `--fs` the row label,
|
|
1391
|
+
`--icon-size` its prepend / append icons. Declared at specificity 0 on the
|
|
1392
|
+
menu's root, so a consumer class or `pt` wins and a `--fs` an ancestor set
|
|
1393
|
+
(a button, a badge) never leaks in; submenus inherit the root's. The adaptive
|
|
1394
|
+
sheet reads neither: its rows keep `--sheet-option-fs` and their own icons. */
|
|
1395
|
+
:where(.bb-dropdown:not(.bb-dropdown--submenu)) {
|
|
1396
|
+
--fs: var(--bb-fs);
|
|
1397
|
+
--icon-size: 1rem;
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1314
1400
|
/* @inherit --transition-duration — set inline by the adaptive surface;
|
|
1315
1401
|
@inherit --py — the adaptive sheet's rules target BbOffCanvas elements, which
|
|
1316
1402
|
declare it on the panel */
|
|
@@ -1542,8 +1628,9 @@ export type BbDropdownGroupEvents = {
|
|
|
1542
1628
|
/* `--bb-fs`, matching the select's option label. These two menus sit at
|
|
1543
1629
|
the same 28px row height on the same screen and their labels were a
|
|
1544
1630
|
pixel apart (13 against 14) — the desktop twin of the sheet drift, and
|
|
1545
|
-
the kind of difference nobody can name but everybody sees.
|
|
1546
|
-
|
|
1631
|
+
the kind of difference nobody can name but everybody sees. `--fs`
|
|
1632
|
+
(above) is the consumer's knob. */
|
|
1633
|
+
font-size: var(--fs);
|
|
1547
1634
|
gap: 1px;
|
|
1548
1635
|
line-height: 1.2;
|
|
1549
1636
|
max-height: var(--max-h, none);
|
|
@@ -1706,9 +1793,9 @@ export type BbDropdownGroupEvents = {
|
|
|
1706
1793
|
|
|
1707
1794
|
.item__prepend-icon,
|
|
1708
1795
|
.item__append-icon {
|
|
1709
|
-
--size:
|
|
1796
|
+
--size: var(--icon-size);
|
|
1710
1797
|
flex-shrink: 0;
|
|
1711
|
-
font-size:
|
|
1798
|
+
font-size: calc(var(--icon-size) - 1px);
|
|
1712
1799
|
}
|
|
1713
1800
|
|
|
1714
1801
|
.item__content {
|
|
@@ -1769,6 +1856,11 @@ export type BbDropdownGroupEvents = {
|
|
|
1769
1856
|
flex-shrink: 0;
|
|
1770
1857
|
font-size: 19px;
|
|
1771
1858
|
margin-inline-start: auto;
|
|
1859
|
+
|
|
1860
|
+
/* Points where the flyout opens: the inline end. */
|
|
1861
|
+
&:dir(rtl) {
|
|
1862
|
+
transform: scaleX(-1);
|
|
1863
|
+
}
|
|
1772
1864
|
}
|
|
1773
1865
|
|
|
1774
1866
|
/*
|
|
@@ -2161,9 +2253,15 @@ export type BbDropdownGroupEvents = {
|
|
|
2161
2253
|
position: absolute;
|
|
2162
2254
|
top: var(--bb-panel-p);
|
|
2163
2255
|
|
|
2164
|
-
/* Same chevron_right asset the submenu rows use, pointed back
|
|
2256
|
+
/* Same chevron_right asset the submenu rows use, pointed back:
|
|
2257
|
+
toward the inline start, which is already where it points in
|
|
2258
|
+
rtl. */
|
|
2165
2259
|
.bb-button__icon {
|
|
2166
2260
|
transform: rotate(180deg);
|
|
2261
|
+
|
|
2262
|
+
&:dir(rtl) {
|
|
2263
|
+
transform: none;
|
|
2264
|
+
}
|
|
2167
2265
|
}
|
|
2168
2266
|
}
|
|
2169
2267
|
|