bitboss-ui 3.0.0-beta.74 → 3.0.0-beta.76
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 +5 -5
- package/bin/cli.mjs +16 -10
- package/dist/ai/BbAlert.md +1 -1
- package/dist/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +3 -3
- package/dist/ai/BbButton.md +4 -4
- package/dist/ai/BbCalendar.md +5 -2
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +13 -1
- package/dist/ai/BbColorPalette.md +12 -7
- package/dist/ai/BbConfirm.md +1 -1
- package/dist/ai/BbDatePicker.md +13 -1
- package/dist/ai/BbDatePickerInput.md +18 -2
- package/dist/ai/BbDialog.md +6 -3
- package/dist/ai/BbDropdown.md +174 -77
- package/dist/ai/BbDropdownButton.md +37 -16
- package/dist/ai/BbGallery.md +3 -2
- package/dist/ai/BbIcon.md +10 -10
- package/dist/ai/BbNumberInput.md +3 -1
- package/dist/ai/BbOffCanvas.md +3 -2
- package/dist/ai/BbPopover.md +1 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +227 -105
- package/dist/ai/BbSelectPopover.md +139 -14
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +18 -17
- package/dist/ai/BbTimePicker.md +13 -1
- package/dist/ai/BbTimePickerInput.md +16 -2
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTree.md +5 -1
- package/dist/ai/CommonPopover.md +1 -0
- package/dist/ai/FlatListBox.md +1 -0
- package/dist/ai/GroupedListBox.md +3 -2
- package/dist/ai/ListBox.md +4 -2
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +310 -7
- package/dist/ai/components.json +33 -35
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +9 -5
- package/dist/ai/guides/calendars-and-digits.md +1 -1
- package/dist/ai/guides/design-tokens.md +13 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- package/dist/ai/guides/icons-policy.md +32 -11
- package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
- package/dist/ai/guides/migration/adoption-checklist.md +1 -1
- package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
- package/dist/ai/guides/migration/components/bb-icon.md +4 -4
- package/dist/ai/guides/migration/components/bb-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +70 -24
- package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
- package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
- package/dist/ai/guides/passthrough.md +58 -58
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +1 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
- package/dist/ai/manifest/components/BbCarousel.json +0 -3
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbColorInput.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbDatePicker.json +3 -0
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +3 -1
- package/dist/ai/manifest/components/BbDropdown.json +36 -28
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +21 -11
- package/dist/ai/manifest/components/BbDropdownButton.json +24 -16
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +4 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +3 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbSelect.json +47 -40
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +14 -7
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +9 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbTable.json +6 -6
- package/dist/ai/manifest/components/BbTable.tree.json +9 -1
- package/dist/ai/manifest/components/BbTimePicker.json +5 -2
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -0
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +3 -2
- package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
- package/dist/ai/manifest/components/ListBox.json +3 -2
- package/dist/ai/manifest/components/ListBox.tree.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +0 -3
- package/dist/ai/manifest/types.advanced.json +6 -6
- package/dist/ai/manifest/types.api.json +1 -3
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/onboarding.md +1 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/nuxt/onboarding.md +1 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/source/BbAccordion.md +4 -5
- package/dist/ai/source/BbAvatar.md +128 -11
- package/dist/ai/source/BbBadge.md +18 -7
- package/dist/ai/source/BbBreadcrumbs.md +57 -56
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCalendar.md +8 -6
- package/dist/ai/source/BbCarousel.md +41 -34
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +23 -2
- package/dist/ai/source/BbDatePicker.md +18 -0
- package/dist/ai/source/BbDatePickerInput.md +47 -3
- package/dist/ai/source/BbDialog.md +14 -1
- package/dist/ai/source/BbDropdown.md +296 -99
- package/dist/ai/source/BbDropdownButton.md +61 -19
- package/dist/ai/source/BbDropdownGroup.md +189 -98
- package/dist/ai/source/BbGallery.md +82 -60
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbNumberInput.md +17 -10
- package/dist/ai/source/BbOffCanvas.md +14 -1
- package/dist/ai/source/BbPagination.md +12 -28
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbRating.md +4 -4
- package/dist/ai/source/BbSelect.md +151 -112
- package/dist/ai/source/BbSelectPopover.md +244 -29
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +114 -35
- package/dist/ai/source/BbTimePicker.md +19 -0
- package/dist/ai/source/BbTimePickerInput.md +21 -2
- package/dist/ai/source/BbToast.md +2 -2
- package/dist/ai/source/BbToastPortal.md +2 -2
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/ClearableButton.md +4 -2
- package/dist/ai/source/CommonPopover.md +24 -1
- package/dist/ai/source/ErrorIcon.md +4 -3
- package/dist/ai/source/FlatListBox.md +33 -7
- package/dist/ai/source/GroupedListBox.md +85 -14
- package/dist/ai/source/ListBox.md +11 -1
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/ai/source/WarningIcon.md +4 -3
- package/dist/assets/svgs/close.svg_raw.js +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +62 -43
- package/dist/components/BbAvatar/avatarIdentity.js +25 -0
- package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
- package/dist/components/BbAvatar/types.d.ts +24 -5
- package/dist/components/BbAvatar/types.js +5 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +66 -64
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +141 -146
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +503 -502
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
- package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
- package/dist/components/BbColorInput/types.d.ts +7 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +208 -196
- package/dist/components/BbColorPalette/types.d.ts +7 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +3 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +84 -73
- package/dist/components/BbDatePicker/types.d.ts +7 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +4 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +496 -510
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +219 -211
- package/dist/components/BbDialog/leaveGhost.js +22 -17
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +106 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +416 -369
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +404 -354
- package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
- package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +117 -102
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +67 -38
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +44 -20
- package/dist/components/BbDropdown/types.d.ts +109 -87
- package/dist/components/BbDropdown/types.js +3 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +3 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +101 -65
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +153 -57
- package/dist/components/BbDropdownButton/types.d.ts +23 -10
- package/dist/components/BbDropdownButton/types.js +4 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +335 -312
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbIcon/iconCache.js +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +9 -5
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +152 -144
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
- package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
- package/dist/components/BbSelect/BbSelect.vue.d.ts +32 -20
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +217 -196
- package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
- package/dist/components/BbSelect/types.d.ts +110 -111
- package/dist/components/BbSelect/types.js +1 -27
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +8 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +728 -653
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
- package/dist/components/BbSelectPopover/types.d.ts +32 -17
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
- package/dist/components/BbSwitchGroup/types.d.ts +3 -6
- package/dist/components/BbTable/BbTable.vue.d.ts +2 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1171 -1152
- package/dist/components/BbTable/BbTableDataRow.js +97 -90
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +145 -134
- package/dist/components/BbTimePicker/types.d.ts +7 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +4 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +290 -280
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -78
- package/dist/components/BbToast/types.d.ts +2 -2
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
- package/dist/components/BbTree/types.d.ts +1 -1
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
- package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +122 -102
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +182 -153
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
- package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/composables/useInternalIcon.js +25 -0
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/locales/ar.json +2 -0
- package/dist/i18n/locales/cs.json +2 -0
- package/dist/i18n/locales/da.json +2 -0
- package/dist/i18n/locales/de-CH.json +2 -0
- package/dist/i18n/locales/de.json +2 -0
- package/dist/i18n/locales/el.json +2 -0
- package/dist/i18n/locales/en-GB.json +2 -0
- package/dist/i18n/locales/en.json +2 -0
- package/dist/i18n/locales/es-MX.json +2 -0
- package/dist/i18n/locales/es.json +2 -0
- package/dist/i18n/locales/fa.json +2 -0
- package/dist/i18n/locales/fi.json +2 -0
- package/dist/i18n/locales/fr.json +2 -0
- package/dist/i18n/locales/he.json +2 -0
- package/dist/i18n/locales/hu.json +2 -0
- package/dist/i18n/locales/it.json +2 -0
- package/dist/i18n/locales/ja.json +2 -0
- package/dist/i18n/locales/ko.json +2 -0
- package/dist/i18n/locales/nb.json +2 -0
- package/dist/i18n/locales/nl.json +2 -0
- package/dist/i18n/locales/pl.json +2 -0
- package/dist/i18n/locales/pt-BR.json +2 -0
- package/dist/i18n/locales/pt-PT.json +2 -0
- package/dist/i18n/locales/ro.json +2 -0
- package/dist/i18n/locales/ru.json +2 -0
- package/dist/i18n/locales/sv.json +2 -0
- package/dist/i18n/locales/tr.json +2 -0
- package/dist/i18n/locales/uk.json +2 -0
- package/dist/i18n/locales/zh-CN.json +2 -0
- package/dist/i18n/locales/zh-HK.json +2 -0
- package/dist/i18n/locales/zh-TW.json +2 -0
- package/dist/icon-scan.d.ts +1 -1
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +2 -2
- package/dist/llms-full.txt +1038 -451
- package/dist/llms-medium.txt +33 -28
- package/dist/llms.txt +2 -2
- package/dist/locale-blueprint.json +2 -0
- package/dist/nuxt.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -3
- package/dist/types/Config.d.ts +8 -1
- package/dist/types/ConfigDefaults.d.ts +10 -2
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/internalIcons.d.ts +89 -0
- package/dist/types/internalIcons.js +158 -0
- package/dist/types/ptComponentMap.d.ts +5 -5
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/configDefaults.js +75 -64
- package/dist/utils/iconsOption.js +48 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +10 -16
- package/dist/vite.js +323 -307
- package/llms.txt +2 -2
- package/package.json +3 -1
- package/scripts/README.md +2 -0
- package/scripts/lib/adoption-checklist.json +1 -1
- package/scripts/lib/agent-setup.mjs +44 -26
- package/scripts/lib/update-install.mjs +48 -0
- package/scripts/lib/validate-bb-markup.mjs +93 -12
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
- package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
|
@@ -2,11 +2,11 @@ import { PtValue } from '../../types/passthrough.js';
|
|
|
2
2
|
/** Every `pt:<part>` / `pt:<part>:<state>` attribute of `BbDropdown`, documented. */
|
|
3
3
|
export interface BbDropdownPtKeys {
|
|
4
4
|
/**
|
|
5
|
-
* The floating element
|
|
5
|
+
* The floating element, an invisible positioning wrapper; a `class` on the component lands here. No node on the phone sheet (style `panel` there).
|
|
6
6
|
*/
|
|
7
7
|
'pt:root'?: PtValue;
|
|
8
8
|
/**
|
|
9
|
-
* The floating element
|
|
9
|
+
* The floating element, an invisible positioning wrapper; a `class` on the component lands here. While `open`: the menu is open. See `pt:root`.
|
|
10
10
|
*/
|
|
11
11
|
'pt:root:open'?: PtValue;
|
|
12
12
|
/**
|
|
@@ -18,11 +18,11 @@ export interface BbDropdownPtKeys {
|
|
|
18
18
|
*/
|
|
19
19
|
'pt:panel:open'?: PtValue;
|
|
20
20
|
/**
|
|
21
|
-
* The bottom sheet
|
|
21
|
+
* The phone's bottom sheet (the `BbOffCanvas` root), never the desktop surface; applied after `panel`, so it wins a conflict.
|
|
22
22
|
*/
|
|
23
23
|
'pt:sheet'?: PtValue;
|
|
24
24
|
/**
|
|
25
|
-
* The bottom sheet
|
|
25
|
+
* The phone's bottom sheet (the `BbOffCanvas` root), never the desktop surface; applied after `panel`, so it wins a conflict. While `open`: the menu is open.
|
|
26
26
|
*/
|
|
27
27
|
'pt:sheet:open'?: PtValue;
|
|
28
28
|
/**
|
|
@@ -42,27 +42,51 @@ export interface BbDropdownPtKeys {
|
|
|
42
42
|
*/
|
|
43
43
|
'pt:footer:open'?: PtValue;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Every searchable group's search box (field and magnifier), as `box` on a field; desktop and phone.
|
|
46
|
+
*/
|
|
47
|
+
'pt:box'?: PtValue;
|
|
48
|
+
/**
|
|
49
|
+
* Every searchable group's search box (field and magnifier), as `box` on a field; desktop and phone. While `open`: the menu is open.
|
|
50
|
+
*/
|
|
51
|
+
'pt:box:open'?: PtValue;
|
|
52
|
+
/**
|
|
53
|
+
* Every searchable group's search field, desktop and phone alike. Its magnifier glyph is chrome.
|
|
46
54
|
*/
|
|
47
55
|
'pt:input'?: PtValue;
|
|
48
56
|
/**
|
|
49
|
-
*
|
|
57
|
+
* Every searchable group's search field, desktop and phone alike. While `open`: the menu is open. See `pt:input`.
|
|
50
58
|
*/
|
|
51
59
|
'pt:input:open'?: PtValue;
|
|
52
60
|
/**
|
|
53
|
-
* The top-level
|
|
61
|
+
* The top-level entries' container between the bands (a flex column, 1px gap; on a phone, the sheet's). A submenu's list is not reached.
|
|
54
62
|
*/
|
|
55
63
|
'pt:list'?: PtValue;
|
|
56
64
|
/**
|
|
57
|
-
* The top-level
|
|
65
|
+
* The top-level entries' container between the bands (a flex column, 1px gap; on a phone, the sheet's). While `open`: the menu is open. See `pt:list`.
|
|
58
66
|
*/
|
|
59
67
|
'pt:list:open'?: PtValue;
|
|
68
|
+
/**
|
|
69
|
+
* Every group's label row (its `label` and icons; the row an `onClick` group activates). `#<id>:label` replaces its content.
|
|
70
|
+
*/
|
|
71
|
+
'pt:groupLabel'?: PtValue;
|
|
72
|
+
/**
|
|
73
|
+
* Every group's label row (its `label` and icons; the row an `onClick` group activates). While `open`: the menu is open. See `pt:groupLabel`.
|
|
74
|
+
*/
|
|
75
|
+
'pt:groupLabel:open'?: PtValue;
|
|
76
|
+
/**
|
|
77
|
+
* Every `groupBy` heading (sticky). `#group` / `#<id>:group` replace its content.
|
|
78
|
+
*/
|
|
79
|
+
'pt:groupHeader'?: PtValue;
|
|
80
|
+
/**
|
|
81
|
+
* Every `groupBy` heading (sticky). While `open`: the menu is open. See `pt:groupHeader`.
|
|
82
|
+
*/
|
|
83
|
+
'pt:groupHeader:open'?: PtValue;
|
|
60
84
|
/**
|
|
61
85
|
* One menu entry, submenus included — a broadcast resolved per entry. Also takes a per-item function, called with the entry.
|
|
62
86
|
*/
|
|
63
87
|
'pt:item'?: unknown;
|
|
64
88
|
/**
|
|
65
|
-
* One menu entry, submenus included — a broadcast resolved per entry. While `activeLink`: an entry whose link (`to` / `href`)
|
|
89
|
+
* One menu entry, submenus included — a broadcast resolved per entry. While `activeLink`: an entry whose link (`to` / `href`) is the current page or an ancestor (its `activeClass` is on). The weakest state. See `pt:item`.
|
|
66
90
|
*/
|
|
67
91
|
'pt:item:activeLink'?: PtValue;
|
|
68
92
|
/**
|
|
@@ -94,7 +118,7 @@ export interface BbDropdownPtKeys {
|
|
|
94
118
|
*/
|
|
95
119
|
'pt:itemText'?: unknown;
|
|
96
120
|
/**
|
|
97
|
-
* An entry's label (its `label`) — resolved with that entry's states. While `activeLink`: an entry whose link (`to` / `href`)
|
|
121
|
+
* An entry's label (its `label`) — resolved with that entry's states. While `activeLink`: an entry whose link (`to` / `href`) is the current page or an ancestor (its `activeClass` is on). The weakest state. See `pt:itemText`.
|
|
98
122
|
*/
|
|
99
123
|
'pt:itemText:activeLink'?: PtValue;
|
|
100
124
|
/**
|
|
@@ -126,7 +150,7 @@ export interface BbDropdownPtKeys {
|
|
|
126
150
|
*/
|
|
127
151
|
'pt:itemIcon'?: unknown;
|
|
128
152
|
/**
|
|
129
|
-
* An entry's prepend / append icons — resolved with that entry's states. While `activeLink`: an entry whose link (`to` / `href`)
|
|
153
|
+
* An entry's prepend / append icons — resolved with that entry's states. While `activeLink`: an entry whose link (`to` / `href`) is the current page or an ancestor (its `activeClass` is on). The weakest state. See `pt:itemIcon`.
|
|
130
154
|
*/
|
|
131
155
|
'pt:itemIcon:activeLink'?: PtValue;
|
|
132
156
|
/**
|
|
@@ -154,35 +178,35 @@ export interface BbDropdownPtKeys {
|
|
|
154
178
|
*/
|
|
155
179
|
'pt:itemIcon:destructive'?: PtValue;
|
|
156
180
|
/**
|
|
157
|
-
* An entry's muted second line (its `description`)
|
|
181
|
+
* An entry's muted second line (its `description`), with the entry's states. A per-entry `#<value>` slot replaces it. Also takes a per-item function.
|
|
158
182
|
*/
|
|
159
183
|
'pt:itemDescription'?: unknown;
|
|
160
184
|
/**
|
|
161
|
-
* An entry's muted second line (its `description`)
|
|
185
|
+
* An entry's muted second line (its `description`), with the entry's states. While `activeLink`: an entry whose link (`to` / `href`) is the current page or an ancestor (its `activeClass` is on). The weakest state. See `pt:itemDescription`.
|
|
162
186
|
*/
|
|
163
187
|
'pt:itemDescription:activeLink'?: PtValue;
|
|
164
188
|
/**
|
|
165
|
-
* An entry's muted second line (its `description`)
|
|
189
|
+
* An entry's muted second line (its `description`), with the entry's states. While `exactActiveLink`: an entry whose link points at the current page itself — its `exactActiveClass` is on. See `pt:itemDescription`.
|
|
166
190
|
*/
|
|
167
191
|
'pt:itemDescription:exactActiveLink'?: PtValue;
|
|
168
192
|
/**
|
|
169
|
-
* An entry's muted second line (its `description`)
|
|
193
|
+
* An entry's muted second line (its `description`), with the entry's states. While `selected`: a selectable group's checked entry. See `pt:itemDescription`.
|
|
170
194
|
*/
|
|
171
195
|
'pt:itemDescription:selected'?: PtValue;
|
|
172
196
|
/**
|
|
173
|
-
* An entry's muted second line (its `description`)
|
|
197
|
+
* An entry's muted second line (its `description`), with the entry's states. While `disabled`: an entry that is disabled. See `pt:itemDescription`.
|
|
174
198
|
*/
|
|
175
199
|
'pt:itemDescription:disabled'?: PtValue;
|
|
176
200
|
/**
|
|
177
|
-
* An entry's muted second line (its `description`)
|
|
201
|
+
* An entry's muted second line (its `description`), with the entry's states. While `open`: the menu is open. See `pt:itemDescription`.
|
|
178
202
|
*/
|
|
179
203
|
'pt:itemDescription:open'?: PtValue;
|
|
180
204
|
/**
|
|
181
|
-
* An entry's muted second line (its `description`)
|
|
205
|
+
* An entry's muted second line (its `description`), with the entry's states. While `default`: an entry with `variant: 'default'` or none. Merged after the part's base entry and before its states, so the real states still win. See `pt:itemDescription`.
|
|
182
206
|
*/
|
|
183
207
|
'pt:itemDescription:default'?: PtValue;
|
|
184
208
|
/**
|
|
185
|
-
* An entry's muted second line (its `description`)
|
|
209
|
+
* An entry's muted second line (its `description`), with the entry's states. While `destructive`: `variant: 'destructive'`. Below the real states, like every variant. See `pt:itemDescription`.
|
|
186
210
|
*/
|
|
187
211
|
'pt:itemDescription:destructive'?: PtValue;
|
|
188
212
|
/**
|
|
@@ -190,7 +214,7 @@ export interface BbDropdownPtKeys {
|
|
|
190
214
|
*/
|
|
191
215
|
'pt:check'?: unknown;
|
|
192
216
|
/**
|
|
193
|
-
* A checked entry's tick, outside the row slots: `pt:check="hidden"` spares your own glyph. While `activeLink`: an entry whose link (`to` / `href`)
|
|
217
|
+
* A checked entry's tick, outside the row slots: `pt:check="hidden"` spares your own glyph. While `activeLink`: an entry whose link (`to` / `href`) is the current page or an ancestor (its `activeClass` is on). The weakest state. See `pt:check`.
|
|
194
218
|
*/
|
|
195
219
|
'pt:check:activeLink'?: PtValue;
|
|
196
220
|
/**
|
|
@@ -181,9 +181,9 @@ export type InternalItem = Omit<BbBaseButtonProps, 'block' | 'tag' | 'type' | 't
|
|
|
181
181
|
slotKey?: string;
|
|
182
182
|
};
|
|
183
183
|
/**
|
|
184
|
-
* An optionally titled, optionally selectable
|
|
185
|
-
* props with {@link InternalItem} but does **not** extend BbBaseButton — it
|
|
186
|
-
* descriptor, not an individually rendered button.
|
|
184
|
+
* An optionally titled, optionally selectable group of the menu's rows. Shares
|
|
185
|
+
* base props with {@link InternalItem} but does **not** extend BbBaseButton — it
|
|
186
|
+
* is a group descriptor, not an individually rendered button.
|
|
187
187
|
*/
|
|
188
188
|
/**
|
|
189
189
|
* Async/array items getter for a pipeline group, returning the raw items
|
|
@@ -214,8 +214,13 @@ export type InternalItem = Omit<BbBaseButtonProps, 'block' | 'tag' | 'type' | 't
|
|
|
214
214
|
* not fit it (its query-only member needs `searchable: true`).
|
|
215
215
|
*/
|
|
216
216
|
export type DropdownGroupItemsGetter = PlainGetter | SearchGetter;
|
|
217
|
-
/**
|
|
218
|
-
|
|
217
|
+
/**
|
|
218
|
+
* A group without a search box: no `query` arrives (`undefined`, so the two
|
|
219
|
+
* getters' contexts reject each other both ways, whatever the check order).
|
|
220
|
+
*/
|
|
221
|
+
type PlainGetter = (context: BbDropdownGroupItemsContext & {
|
|
222
|
+
query?: undefined;
|
|
223
|
+
}) => any[] | Promise<any[]>;
|
|
219
224
|
/** A `searchable` group: `query` always arrives, `''` until typed. */
|
|
220
225
|
type SearchGetter = (context: BbDropdownGroupItemsContext & {
|
|
221
226
|
query: string;
|
|
@@ -358,12 +363,19 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
358
363
|
/** Placeholder for this group's search field. Defaults to the localized label. */
|
|
359
364
|
searchPlaceholder?: string;
|
|
360
365
|
/**
|
|
361
|
-
*
|
|
366
|
+
* Characters to type before the search runs (`BbSelect`'s rule): below
|
|
367
|
+
* it the query counts as empty. Requires `searchable`.
|
|
368
|
+
*
|
|
369
|
+
* @defaultValue `0`
|
|
370
|
+
*/
|
|
371
|
+
minQueryLength?: number;
|
|
372
|
+
/**
|
|
373
|
+
* Sorts the group's rows under headings, inside the one group (one
|
|
362
374
|
* `v-model`, one search field): a field path read off each row (a fetched
|
|
363
|
-
* row: its raw item) or a getter returning the
|
|
364
|
-
* nullish
|
|
365
|
-
* which their first row appears, like `BbSelect`'s `groupBy`; a
|
|
366
|
-
* a
|
|
375
|
+
* row: its raw item) or a getter returning the heading. Rows with a
|
|
376
|
+
* nullish value are listed first, without a heading. Headings keep the
|
|
377
|
+
* order in which their first row appears, like `BbSelect`'s `groupBy`; a
|
|
378
|
+
* search hides a heading with no matching row.
|
|
367
379
|
*/
|
|
368
380
|
groupBy?: string | ((row: any) => string | null | undefined);
|
|
369
381
|
/**
|
|
@@ -397,7 +409,7 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
397
409
|
stash?: boolean;
|
|
398
410
|
/**
|
|
399
411
|
* The group's label — rendered as its heading above the items, exposed as the
|
|
400
|
-
*
|
|
412
|
+
* group's title in the adaptive sheet, and surfaced on `useBbDropdown`
|
|
401
413
|
* (handy for chip prefixes / filter summaries).
|
|
402
414
|
*/
|
|
403
415
|
label?: string;
|
|
@@ -467,7 +479,7 @@ type GroupRows = Array<InternalItem | InternalItem[]> | any[];
|
|
|
467
479
|
export declare const groupItemsAsArray: (items: InternalGroup["items"] | undefined) => Array<InternalItem | InternalItem[]>;
|
|
468
480
|
/**
|
|
469
481
|
* A string or number row: its own text and value (`'Google'` reads "Google"
|
|
470
|
-
* and picks `'Google'`), loose, in a
|
|
482
|
+
* and picks `'Google'`), loose, in a divider run, in a group's `items` or in a
|
|
471
483
|
* submenu's `items`. It declares `searchable` like every entry, so a group
|
|
472
484
|
* literal beside it still picks its plain or searchable getter.
|
|
473
485
|
*/
|
|
@@ -480,7 +492,7 @@ export type ItemEntry = Item | PrimitiveRow;
|
|
|
480
492
|
* Items accepted by the dropdown. Entries can be:
|
|
481
493
|
* - a single {@link InternalItem};
|
|
482
494
|
* - an array of items — rendered as an anonymous divider-separated group;
|
|
483
|
-
* - a {@link InternalGroup} object — a titled / selectable
|
|
495
|
+
* - a {@link InternalGroup} object — a titled / selectable group.
|
|
484
496
|
*
|
|
485
497
|
* The shapes can be mixed, e.g. `[item, [item, item], { id, label, items }]`.
|
|
486
498
|
*/
|
|
@@ -545,7 +557,9 @@ export type NormalizedGroup = {
|
|
|
545
557
|
searchable?: boolean;
|
|
546
558
|
/** Placeholder for this group's search field. */
|
|
547
559
|
searchPlaceholder?: string;
|
|
548
|
-
/**
|
|
560
|
+
/** Characters to type before the search runs (see {@link InternalGroup.minQueryLength}). */
|
|
561
|
+
minQueryLength?: number;
|
|
562
|
+
/** Heading per row (see {@link InternalGroup.groupBy}). */
|
|
549
563
|
groupBy?: InternalGroup['groupBy'];
|
|
550
564
|
selectable: boolean;
|
|
551
565
|
/** Selected row keys (`rowKey`; injected by `BbDropdown`; empty for non-selectable groups). */
|
|
@@ -567,27 +581,31 @@ export type MappedItem = InternalItem & {
|
|
|
567
581
|
onKeydown: (event: KeyboardEvent) => void;
|
|
568
582
|
};
|
|
569
583
|
/**
|
|
570
|
-
* Passthrough parts of `BbDropdown`.
|
|
571
|
-
*
|
|
584
|
+
* Passthrough parts of `BbDropdown`. A group's
|
|
585
|
+
* items box and the dividers are not parts.
|
|
572
586
|
*
|
|
573
587
|
* Per-item functions: on the instance, an entry part (`item`, `itemText`, `itemIcon`, `itemDescription`, `check`) and `submenu` (called with the entry that opens it) also accept `({ 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_.
|
|
574
588
|
*
|
|
575
|
-
* @part root - The floating element
|
|
576
|
-
* `class` on the component lands here. No node on the phone sheet
|
|
577
|
-
*
|
|
589
|
+
* @part root - The floating element, an invisible positioning wrapper; a
|
|
590
|
+
* `class` on the component lands here. No node on the phone sheet (style
|
|
591
|
+
* `panel` there).
|
|
578
592
|
* @part panel - The menu surface you see — the bordered flyout box on
|
|
579
593
|
* desktop, the sheet itself on a phone.
|
|
580
|
-
* @part sheet - The bottom sheet the
|
|
581
|
-
*
|
|
594
|
+
* @part sheet - The phone's bottom sheet (the `BbOffCanvas` root), never the
|
|
595
|
+
* desktop surface; applied after `panel`, so it wins a conflict.
|
|
582
596
|
* @part header - The menu's header band.
|
|
583
597
|
* @part footer - The menu's footer band.
|
|
584
|
-
* @part
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
* sheet's
|
|
590
|
-
*
|
|
598
|
+
* @part box - Every searchable group's search box (field and magnifier),
|
|
599
|
+
* as `box` on a field; desktop and phone.
|
|
600
|
+
* @part input - Every searchable group's search field, desktop and phone
|
|
601
|
+
* alike. Its magnifier glyph is chrome.
|
|
602
|
+
* @part list - The top-level entries' container between the bands (a flex
|
|
603
|
+
* column, 1px gap; on a phone, the sheet's). A submenu's list is not
|
|
604
|
+
* reached.
|
|
605
|
+
* @part groupLabel - Every group's label row (its `label` and icons; the
|
|
606
|
+
* row an `onClick` group activates). `#<id>:label` replaces its content.
|
|
607
|
+
* @part groupHeader - Every `groupBy` heading (sticky). `#group` /
|
|
608
|
+
* `#<id>:group` replace its content.
|
|
591
609
|
* @part item - One menu entry, submenus included — a broadcast resolved per
|
|
592
610
|
* entry. Also takes a per-item function, called with the entry.
|
|
593
611
|
* @part itemText - An entry's label (its `label`) — resolved with that
|
|
@@ -595,17 +613,17 @@ export type MappedItem = InternalItem & {
|
|
|
595
613
|
* per-item function.
|
|
596
614
|
* @part itemIcon - An entry's prepend / append icons — resolved with that
|
|
597
615
|
* entry's states. Also takes a per-item function.
|
|
598
|
-
* @part itemDescription - An entry's muted second line (its `description`)
|
|
599
|
-
*
|
|
600
|
-
*
|
|
616
|
+
* @part itemDescription - An entry's muted second line (its `description`),
|
|
617
|
+
* with the entry's states. A per-entry `#<value>` slot replaces it. Also
|
|
618
|
+
* takes a per-item function.
|
|
601
619
|
* @part check - A checked entry's tick, outside the row slots:
|
|
602
620
|
* `pt:check="hidden"` spares your own glyph. Also takes a per-item function.
|
|
603
621
|
* @part submenu - Every submenu's flyout box (desktop only). Also takes a
|
|
604
622
|
* per-item function, called with the entry that opens it.
|
|
605
623
|
*/
|
|
606
|
-
export type BbDropdownPtPart = 'root' | 'panel' | 'sheet' | 'header' | 'footer' | 'input' | 'list' | 'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check' | 'submenu';
|
|
624
|
+
export type BbDropdownPtPart = 'root' | 'panel' | 'sheet' | 'header' | 'footer' | 'box' | 'input' | 'list' | 'groupLabel' | 'groupHeader' | 'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check' | 'submenu';
|
|
607
625
|
/** The surface parts — they take a `PtValue` only. Spelled flat (T20). */
|
|
608
|
-
export type BbDropdownSurfacePtPart = 'root' | 'panel' | 'sheet' | 'header' | 'footer' | 'input' | 'list';
|
|
626
|
+
export type BbDropdownSurfacePtPart = 'root' | 'panel' | 'sheet' | 'header' | 'footer' | 'box' | 'input' | 'list' | 'groupLabel' | 'groupHeader';
|
|
609
627
|
/** The entry parts — broadcasts resolved per entry; their base key also takes a per-item function. Spelled flat (T20). */
|
|
610
628
|
export type BbDropdownItemPtPart = 'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check';
|
|
611
629
|
/**
|
|
@@ -618,8 +636,8 @@ export type BbDropdownItemFnPtPart = 'item' | 'itemText' | 'itemIcon' | 'itemDes
|
|
|
618
636
|
* (the link states: while the entry's `activeClass` / `exactActiveClass` are).
|
|
619
637
|
*
|
|
620
638
|
* @state activeLink - Per node, on the entry parts: an entry whose link
|
|
621
|
-
* (`to` / `href`)
|
|
622
|
-
*
|
|
639
|
+
* (`to` / `href`) is the current page or an ancestor (its `activeClass` is
|
|
640
|
+
* on). The weakest state.
|
|
623
641
|
* @state exactActiveLink - Per node, on the entry parts: an entry whose link
|
|
624
642
|
* points at the current page itself — its `exactActiveClass` is on.
|
|
625
643
|
* @state selected - Per node, on the entry parts: a selectable group's
|
|
@@ -637,7 +655,7 @@ export type BbDropdownEntryPtState = 'activeLink' | 'exactActiveLink' | 'selecte
|
|
|
637
655
|
export type BbDropdownPtKey = BbDropdownPtPart | `${BbDropdownPtPart}:open` | `${BbDropdownItemPtPart}:${BbDropdownEntryPtState}`;
|
|
638
656
|
/** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
|
|
639
657
|
export declare const BB_DROPDOWN_PT: {
|
|
640
|
-
readonly parts: readonly ["root", "panel", "sheet", "header", "footer", "input", "list", "item", "itemText", "itemIcon", "itemDescription", "check", "submenu"];
|
|
658
|
+
readonly parts: readonly ["root", "panel", "sheet", "header", "footer", "box", "input", "list", "groupLabel", "groupHeader", "item", "itemText", "itemIcon", "itemDescription", "check", "submenu"];
|
|
641
659
|
readonly states: readonly ["activeLink", "exactActiveLink", "selected", "disabled", "open"];
|
|
642
660
|
/** On every part: what the resolver's `active` map turns on. */
|
|
643
661
|
readonly wide: readonly ["open"];
|
|
@@ -679,26 +697,24 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
679
697
|
*/
|
|
680
698
|
activator?: ElementOrComponentRef;
|
|
681
699
|
/**
|
|
682
|
-
* On mobile (below `config.mobileMaxWidth`),
|
|
683
|
-
*
|
|
684
|
-
*
|
|
685
|
-
* `all.adaptive`.
|
|
700
|
+
* On mobile (below `config.mobileMaxWidth`), the menu is a bottom sheet
|
|
701
|
+
* drilling into submenus a level at a time, not hover flyouts; slots and
|
|
702
|
+
* selection unchanged. Unset: the global `all.adaptive`.
|
|
686
703
|
*
|
|
687
704
|
* @defaultValue `all.adaptive` (`true`)
|
|
688
705
|
*/
|
|
689
706
|
adaptive?: boolean;
|
|
690
707
|
/**
|
|
691
|
-
* Whether a selection closes the menu. Unset: a
|
|
692
|
-
*
|
|
693
|
-
* open. `true`: every
|
|
708
|
+
* Whether a selection closes the menu. Unset: a single-choice group's
|
|
709
|
+
* change closes it (an untick too, any depth), a `multiple` group stays
|
|
710
|
+
* open. `true`: every change closes it; `false`: none.
|
|
694
711
|
*
|
|
695
712
|
* @defaultValue unset (close after a single-choice change)
|
|
696
713
|
*/
|
|
697
714
|
closeOnSelect?: boolean;
|
|
698
715
|
/**
|
|
699
|
-
* Compact density, the `BbSelect` ladder: flyout rows
|
|
700
|
-
*
|
|
701
|
-
* not change.
|
|
716
|
+
* Compact density, the `BbSelect` ladder: flyout rows 28 → 24px, sheet rows
|
|
717
|
+
* 44 → 36px (still a touch target). The label size stays.
|
|
702
718
|
*/
|
|
703
719
|
compact?: boolean;
|
|
704
720
|
/**
|
|
@@ -709,11 +725,13 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
709
725
|
* @defaultValue the activator element
|
|
710
726
|
*/
|
|
711
727
|
anchor?: ElementOrComponentRef | VirtualAnchor;
|
|
728
|
+
/** Whether the menu is open (`v-model`): `true` opens it from code at its activator or `anchor`. Unbound: the initial state. */
|
|
729
|
+
modelValue?: boolean;
|
|
712
730
|
/**
|
|
713
|
-
* Keeps the panel inside this element beside its trigger (sideways
|
|
714
|
-
* menu
|
|
715
|
-
*
|
|
716
|
-
*
|
|
731
|
+
* Keeps the panel inside this element beside its trigger (sideways under a
|
|
732
|
+
* menu); away from it only the viewport flips it. An element, component ref
|
|
733
|
+
* or CSS selector (a `useTemplateRef`, not `$refs.x`). In a `BbTable`: its
|
|
734
|
+
* left and right edges.
|
|
717
735
|
*/
|
|
718
736
|
boundary?: ElementOrComponentRef | string;
|
|
719
737
|
/**
|
|
@@ -721,9 +739,9 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
721
739
|
*/
|
|
722
740
|
disabled?: boolean;
|
|
723
741
|
/**
|
|
724
|
-
* Renders the
|
|
725
|
-
*
|
|
726
|
-
*
|
|
742
|
+
* Renders the panel (the phone sheet's too) at mount, not on the first
|
|
743
|
+
* open, and keeps its rows after a close; otherwise rows mount on each open
|
|
744
|
+
* and go after the close.
|
|
727
745
|
*/
|
|
728
746
|
eager?: boolean;
|
|
729
747
|
/**
|
|
@@ -741,7 +759,7 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
741
759
|
/**
|
|
742
760
|
* The menu rows, each a `BbBaseButton` (`button`, `a` or `router-link`): a
|
|
743
761
|
* flat array for one group, nested arrays for divider-separated groups, or
|
|
744
|
-
* `InternalGroup` objects for titled / selectable
|
|
762
|
+
* `InternalGroup` objects for titled / selectable groups. A row's own
|
|
745
763
|
* `items` opens a submenu.
|
|
746
764
|
*
|
|
747
765
|
* @defaultValue `[]`
|
|
@@ -753,23 +771,11 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
753
771
|
* trigger always stays.
|
|
754
772
|
*/
|
|
755
773
|
keepActivator?: boolean;
|
|
756
|
-
/**
|
|
757
|
-
* Default placeholder text shown while a pipeline group's async items load.
|
|
758
|
-
* A group's own `loadingText` overrides this; both fall back to the localized
|
|
759
|
-
* `common.loadingText` (`'Loading...'`).
|
|
760
|
-
*/
|
|
774
|
+
/** A pipeline group's loading row; its own `loadingText` wins. Default: `common.loadingText`. */
|
|
761
775
|
loadingText?: string;
|
|
762
|
-
/**
|
|
763
|
-
* Default placeholder text shown when a pipeline group resolves to no items.
|
|
764
|
-
* A group's own `emptyText` overrides this; both fall back to the localized
|
|
765
|
-
* `common.emptyText` (`'No data to display'`).
|
|
766
|
-
*/
|
|
776
|
+
/** A pipeline group's no-items row; its own `emptyText` wins. Default: `common.emptyText`. */
|
|
767
777
|
emptyText?: string;
|
|
768
|
-
/**
|
|
769
|
-
* Default placeholder text shown when a pipeline group's latest load FAILED
|
|
770
|
-
* (its `items` getter threw). A group's own `failedText` overrides this; both
|
|
771
|
-
* fall back to the localized `common.failedText` (`"Couldn't load items"`).
|
|
772
|
-
*/
|
|
778
|
+
/** A pipeline group's failed-load row (its getter threw); its own `failedText` wins. Default: `common.failedText`. */
|
|
773
779
|
failedText?: string;
|
|
774
780
|
/**
|
|
775
781
|
* Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on
|
|
@@ -805,18 +811,16 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
805
811
|
*/
|
|
806
812
|
queryDebounceTime?: number;
|
|
807
813
|
/**
|
|
808
|
-
* The open / close transition
|
|
809
|
-
*
|
|
810
|
-
*
|
|
814
|
+
* The open / close transition (ms). Menus take the fast 150, not the
|
|
815
|
+
* popovers' 250: a menu is picked from and gone, quicker than a panel you
|
|
816
|
+
* read or edit.
|
|
811
817
|
*
|
|
812
818
|
* @defaultValue `150`
|
|
813
819
|
*/
|
|
814
820
|
transitionDuration?: number;
|
|
815
821
|
/**
|
|
816
|
-
*
|
|
817
|
-
*
|
|
818
|
-
* - `'click'` — left-click / tap (default)
|
|
819
|
-
* - `'contextMenu'` — right-click on desktop, long-press on mobile
|
|
822
|
+
* What opens the menu, one or an array: `'click'` (left-click / tap) or
|
|
823
|
+
* `'contextMenu'` (right-click; long-press on mobile).
|
|
820
824
|
*
|
|
821
825
|
* @defaultValue `'click'`
|
|
822
826
|
*/
|
|
@@ -829,6 +833,8 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
829
833
|
width?: number | string;
|
|
830
834
|
};
|
|
831
835
|
export type BbDropdownEvents = {
|
|
836
|
+
/** The menu opened or closed (`v-model`): `true` on open, `false` on close. */
|
|
837
|
+
(e: 'update:modelValue', value: boolean): void;
|
|
832
838
|
/** Emitted as soon as the menu (the popover, or the sheet on a phone) starts to open. */
|
|
833
839
|
(e: 'show'): void;
|
|
834
840
|
/** Emitted once the menu is open and its open transition has finished. */
|
|
@@ -838,9 +844,9 @@ export type BbDropdownEvents = {
|
|
|
838
844
|
/** Emitted once the menu has finished closing. */
|
|
839
845
|
(e: 'hidden'): void;
|
|
840
846
|
/**
|
|
841
|
-
* The user selected a row in a selectable group, at the click
|
|
842
|
-
* controlled companion's app then refuses
|
|
843
|
-
*
|
|
847
|
+
* The user selected a row in a selectable group, at the click, even when a
|
|
848
|
+
* controlled companion's app then refuses it. Payload: the row's value
|
|
849
|
+
* (`item-value` for pipeline groups, else `value`).
|
|
844
850
|
*/
|
|
845
851
|
(e: 'item:selected', value: any): void;
|
|
846
852
|
/**
|
|
@@ -898,6 +904,19 @@ export type BbDropdownSlotGroup = {
|
|
|
898
904
|
/** Whether the group's rows are choices. */
|
|
899
905
|
selectable: boolean;
|
|
900
906
|
};
|
|
907
|
+
/** A `groupBy` heading's slot scope (`BbSelect`'s `#group`). */
|
|
908
|
+
export type BbDropdownGroupSlotProps = {
|
|
909
|
+
/** The heading text. */
|
|
910
|
+
text: string;
|
|
911
|
+
/** The raw `groupBy` value. */
|
|
912
|
+
item: unknown;
|
|
913
|
+
/** The heading's position. */
|
|
914
|
+
index: number;
|
|
915
|
+
/** Its row count. */
|
|
916
|
+
length: number;
|
|
917
|
+
/** Every row disabled. */
|
|
918
|
+
disabled: boolean;
|
|
919
|
+
};
|
|
901
920
|
/** Props exposed by the `item:prepend` and `item:append` slots, and named item slots. */
|
|
902
921
|
export type BbDropdownItemSlotProps = {
|
|
903
922
|
/** The item's muted description line, when set. */
|
|
@@ -977,9 +996,10 @@ export type BbDropdownPlaceholderSlotProps = {
|
|
|
977
996
|
* @dynamicSlot `<groupId>:item` {BbDropdownItemSlotProps} - The content of every row of that group, and no other; a row's own `#<value>` still wins.
|
|
978
997
|
* @dynamicSlot `<groupId>:item:prepend` {BbDropdownItemSlotProps} - The leading region of every row of that group — e.g. an avatar per record, drawn from `item.meta`, while other rows keep their `prepend:icon`.
|
|
979
998
|
* @dynamicSlot `<groupId>:item:append` {BbDropdownItemSlotProps} - The trailing region of every row of that group; replaces their `append:icon`. The check takes its place on the selected row.
|
|
980
|
-
* @dynamicSlot `<groupId
|
|
999
|
+
* @dynamicSlot `<groupId>:label` {BbDropdownItemSlotProps} - That group's title content (`item` is the group, `groupTitle` is `true`).
|
|
981
1000
|
* @dynamicSlot `<groupId>:prepend` {BbDropdownItemSlotProps} - The leading region of that group's title line.
|
|
982
1001
|
* @dynamicSlot `<groupId>:append` {BbDropdownItemSlotProps} - The trailing region of that group's title line.
|
|
1002
|
+
* @dynamicSlot `<groupId>:group` {BbDropdownGroupSlotProps} - That group's `groupBy` headings; beats `group`.
|
|
983
1003
|
*/
|
|
984
1004
|
export type BbDropdownSlots = {
|
|
985
1005
|
/**
|
|
@@ -993,9 +1013,9 @@ export type BbDropdownSlots = {
|
|
|
993
1013
|
*/
|
|
994
1014
|
loading?: (props: BbDropdownPlaceholderSlotProps) => any;
|
|
995
1015
|
/**
|
|
996
|
-
* Replaces the
|
|
997
|
-
*
|
|
998
|
-
*
|
|
1016
|
+
* Replaces the placeholder row of a pipeline group that resolved to no
|
|
1017
|
+
* items, once per empty group. A failed load is not empty: it keeps its
|
|
1018
|
+
* own row (error icon, `failedText`).
|
|
999
1019
|
*/
|
|
1000
1020
|
empty?: (props: BbDropdownPlaceholderSlotProps) => any;
|
|
1001
1021
|
/**
|
|
@@ -1009,13 +1029,13 @@ export type BbDropdownSlots = {
|
|
|
1009
1029
|
header?: (props: BbDropdownEdgeSlotProps) => any;
|
|
1010
1030
|
/**
|
|
1011
1031
|
* The leading region of every row (and group title line), replacing its
|
|
1012
|
-
* `prepend:icon
|
|
1032
|
+
* `prepend:icon` wherever it renders. A named slot wins.
|
|
1013
1033
|
*/
|
|
1014
1034
|
'item:prepend'?: (props: BbDropdownItemSlotProps) => any;
|
|
1015
1035
|
/**
|
|
1016
|
-
* The trailing region of every row (and group
|
|
1017
|
-
* `append:icon
|
|
1018
|
-
*
|
|
1036
|
+
* The trailing region of every row (and group label), replacing its
|
|
1037
|
+
* `append:icon` wherever it renders. A named slot wins; a submenu chevron
|
|
1038
|
+
* or a selected row's check takes its place.
|
|
1019
1039
|
*/
|
|
1020
1040
|
'item:append'?: (props: BbDropdownItemSlotProps) => any;
|
|
1021
1041
|
/**
|
|
@@ -1023,6 +1043,8 @@ export type BbDropdownSlots = {
|
|
|
1023
1043
|
* action buttons.
|
|
1024
1044
|
*/
|
|
1025
1045
|
footer?: (props: BbDropdownEdgeSlotProps) => any;
|
|
1046
|
+
/** Every group's `groupBy` headings (`BbSelect`'s `#group` scope); `#<groupId>:group` beats it. */
|
|
1047
|
+
group?: (props: BbDropdownGroupSlotProps) => unknown;
|
|
1026
1048
|
} & Record<string, (props: BbDropdownItemSlotProps) => any>;
|
|
1027
1049
|
/**
|
|
1028
1050
|
* `v-model` value of `<BbDropdownGroup>`: the selected rows' values — a
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { FallthroughAttrs } from '../../types/fallthrough.js';
|
|
2
2
|
import { BbDropdownButtonEvents, BbDropdownButtonProps, BbDropdownButtonSlots } from './types.js';
|
|
3
|
-
export type { BbDropdownButtonEvents, BbDropdownButtonProps, BbDropdownButtonSlots, };
|
|
4
3
|
type __VLS_Props = BbDropdownButtonProps & FallthroughAttrs<'span' | 'button' | 'a', BbDropdownButtonProps, BbDropdownButtonEvents>;
|
|
5
4
|
type __VLS_Slots = BbDropdownButtonSlots;
|
|
5
|
+
export type { BbDropdownButtonEvents, BbDropdownButtonProps, BbDropdownButtonSlots, };
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
7
|
"item:selected": (value: any) => any;
|
|
8
8
|
hide: () => any;
|
|
9
9
|
show: () => any;
|
|
10
10
|
shown: () => any;
|
|
11
11
|
hidden: () => any;
|
|
12
|
+
"update:open": (value: boolean) => any;
|
|
12
13
|
"item:unselected": (value: any) => any;
|
|
13
14
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
15
|
"onItem:selected"?: ((value: any) => any) | undefined;
|
|
@@ -16,6 +17,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
16
17
|
onShow?: (() => any) | undefined;
|
|
17
18
|
onShown?: (() => any) | undefined;
|
|
18
19
|
onHidden?: (() => any) | undefined;
|
|
20
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
19
21
|
"onItem:unselected"?: ((value: any) => any) | undefined;
|
|
20
22
|
}>, {
|
|
21
23
|
block: boolean;
|