bitboss-ui 3.0.0-beta.73 → 3.0.0-beta.75
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 +4 -2
- package/bin/bitboss-ui-mcp.mjs +101 -3
- package/bin/bitboss-ui.mjs +6 -1
- package/bin/cli.mjs +31 -5
- package/dist/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +5 -5
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +2 -2
- package/dist/ai/BbCalendar.md +9 -5
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +12 -0
- package/dist/ai/BbColorPalette.md +19 -15
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +16 -3
- package/dist/ai/BbDatePickerInput.md +17 -1
- package/dist/ai/BbDialog.md +16 -4
- package/dist/ai/BbDropdown.md +175 -67
- package/dist/ai/BbDropdownButton.md +27 -8
- package/dist/ai/BbForm.md +4 -1
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbNumberInput.md +8 -4
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +79 -67
- package/dist/ai/BbSelectPopover.md +24 -5
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +59 -34
- package/dist/ai/BbTimePicker.md +16 -3
- package/dist/ai/BbTimePickerInput.md +15 -1
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbToastPortal.md +1 -1
- 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 +1 -0
- package/dist/ai/ListBox.md +1 -0
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +215 -6
- package/dist/ai/components.json +77 -43
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +8 -4
- package/dist/ai/guides/design-tokens.md +33 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- package/dist/ai/guides/inertia-helpers.md +613 -53
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- 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-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +46 -5
- package/dist/ai/guides/migration/v3-beta-tooling.md +4 -0
- package/dist/ai/guides/passthrough.md +3 -3
- package/dist/ai/guides/preset-components.md +15 -2
- package/dist/ai/guides/reporting.md +49 -0
- package/dist/ai/helpers/inertia/manifest.json +33 -38
- package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
- package/dist/ai/helpers/inertia/useQuery.ts +24 -6
- package/dist/ai/helpers/inertia/utils.ts +552 -3
- package/dist/ai/index.md +2 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
- package/dist/ai/manifest/components/BbCalendar.json +2 -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 +7 -4
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +6 -3
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +7 -1
- package/dist/ai/manifest/components/BbDropdown.json +23 -17
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +16 -5
- package/dist/ai/manifest/components/BbDropdownButton.json +15 -9
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +2 -0
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +1 -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 +10 -7
- package/dist/ai/manifest/components/BbSelectPopover.json +7 -4
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -1
- 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 +16 -6
- package/dist/ai/manifest/components/BbTimePicker.json +7 -4
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbToastPortal.json +1 -1
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +2 -1
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +2 -1
- package/dist/ai/manifest/components/ListBox.json +2 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +36 -3
- package/dist/ai/manifest/types.advanced.json +81 -80
- package/dist/ai/manifest/types.api.json +64 -65
- package/dist/ai/manifest/types.wrapper.json +155 -118
- package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
- package/dist/ai/source/BbAlert.md +16 -4
- package/dist/ai/source/BbAvatar.md +121 -9
- package/dist/ai/source/BbBadge.md +12 -5
- package/dist/ai/source/BbBreadcrumbs.md +56 -55
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCalendar.md +22 -12
- package/dist/ai/source/BbCarousel.md +31 -28
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +59 -12
- package/dist/ai/source/BbConfirm.md +7 -0
- package/dist/ai/source/BbConfirmPortal.md +9 -4
- package/dist/ai/source/BbDatePicker.md +71 -22
- package/dist/ai/source/BbDatePickerInput.md +72 -9
- package/dist/ai/source/BbDialog.md +45 -2
- package/dist/ai/source/BbDropdown.md +263 -63
- package/dist/ai/source/BbDropdownButton.md +27 -2
- package/dist/ai/source/BbDropdownGroup.md +121 -59
- package/dist/ai/source/BbForm.md +73 -6
- package/dist/ai/source/BbGallery.md +76 -55
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbHoverCard.md +7 -0
- package/dist/ai/source/BbHoverCardPortal.md +9 -5
- package/dist/ai/source/BbNumberInput.md +22 -16
- package/dist/ai/source/BbOffCanvas.md +48 -2
- package/dist/ai/source/BbPopover.md +7 -0
- package/dist/ai/source/BbPopoverPortal.md +9 -5
- package/dist/ai/source/BbRadio.md +4 -3
- package/dist/ai/source/BbRadioGroup.md +19 -10
- package/dist/ai/source/BbSelect.md +35 -20
- package/dist/ai/source/BbSelectPopover.md +116 -8
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +126 -32
- package/dist/ai/source/BbTag.md +10 -3
- package/dist/ai/source/BbTimePicker.md +69 -15
- package/dist/ai/source/BbTimePickerInput.md +45 -7
- package/dist/ai/source/BbToast.md +16 -2
- package/dist/ai/source/BbToastPortal.md +18 -6
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/CommonFieldInput.md +11 -5
- package/dist/ai/source/CommonPopover.md +28 -2
- package/dist/ai/source/FlatListBox.md +26 -5
- package/dist/ai/source/GroupedListBox.md +63 -11
- package/dist/ai/source/ListBox.md +4 -0
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +61 -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 +80 -79
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +152 -158
- 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 +235 -234
- package/dist/components/BbCalendar/types.d.ts +2 -2
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +7 -7
- 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 +239 -223
- package/dist/components/BbColorPalette/types.d.ts +8 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
- package/dist/components/BbConfirm/types.d.ts +5 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +4 -2
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +160 -143
- package/dist/components/BbDatePicker/types.d.ts +9 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +483 -496
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +252 -236
- package/dist/components/BbDialog/leaveGhost.js +38 -0
- package/dist/components/BbDialog/overlayActions.js +34 -20
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +92 -87
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +419 -368
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +384 -340
- 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 +133 -119
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +73 -45
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbDropdown/types.d.ts +73 -58
- package/dist/components/BbDropdown/types.js +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -72
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +48 -0
- package/dist/components/BbDropdownButton/types.d.ts +13 -2
- package/dist/components/BbDropdownButton/types.js +2 -0
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
- package/dist/components/BbForm/types.d.ts +31 -0
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +318 -296
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
- package/dist/components/BbHoverCard/types.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +10 -6
- package/dist/components/BbNumberInput/numberDisplay.js +102 -106
- package/dist/components/BbNumberInput/types.d.ts +4 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +425 -409
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
- package/dist/components/BbPopover/types.d.ts +5 -0
- package/dist/components/BbRadio/types.d.ts +4 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -106
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +167 -163
- package/dist/components/BbSelect/types.d.ts +23 -20
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +3 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +680 -637
- package/dist/components/BbSelectPopover/types.d.ts +10 -4
- 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 +1 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1182 -1165
- package/dist/components/BbTable/BbTableDataRow.js +96 -96
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +157 -140
- package/dist/components/BbTimePicker/types.d.ts +9 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +3 -1
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +278 -268
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +12 -12
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
- package/dist/components/BbToast/types.d.ts +7 -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/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +14 -2
- package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +115 -96
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +194 -166
- 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/composables/formSubmitLock.js +2 -1
- package/dist/composables/overlayRegistry.js +52 -42
- package/dist/composables/useActiveInactiveState.js +8 -4
- package/dist/composables/useBbDialog.js +5 -5
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/composables/useOwnModel.js +16 -0
- package/dist/composables/useSegmentedFields.js +31 -20
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/currencyDigits.js +58 -0
- 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/i18n/regionDates.js +250 -0
- package/dist/i18n/regionHints.js +30 -41
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +35 -31
- package/dist/llms-full.txt +1428 -400
- package/dist/llms-medium.txt +8 -4
- package/dist/llms.txt +4 -2
- package/dist/locale-blueprint.json +2 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -1
- package/dist/types/CommonProps.d.ts +8 -0
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/ptComponentMap.d.ts +3 -3
- package/dist/utilities/functions/hash.js +97 -64
- package/dist/utilities/functions/isEqual.js +33 -25
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +2 -1
- package/dist/vite.js +11 -4
- package/llms.txt +4 -2
- package/package.json +3 -2
- package/scripts/README.md +3 -1
- package/scripts/lib/adoption-checklist.json +6 -5
- package/scripts/lib/agent-manifest.mjs +33 -6
- package/scripts/lib/agent-setup.mjs +90 -24
- package/scripts/lib/cldr-pins.ts +182 -0
- package/scripts/lib/engines-include.d.mts +5 -0
- package/scripts/lib/engines-include.mjs +40 -0
- package/scripts/lib/eslint-plugin.mjs +8 -2
- package/scripts/lib/hidden-label-placeholder.mjs +25 -5
- package/scripts/lib/idiom-scan.mjs +30 -3
- package/scripts/lib/legacy-agent-files.json +152 -0
- package/scripts/lib/mcp-config.mjs +74 -7
- package/scripts/lib/portal-names.mjs +78 -8
- package/scripts/lib/release-results.mjs +5 -2
- package/scripts/lib/report.mjs +340 -0
- package/scripts/lib/run-beat.mjs +14 -0
- package/scripts/lib/run-records.mjs +313 -0
- package/scripts/lib/selector-log.mjs +98 -0
- package/scripts/lib/ticket-beat.mjs +30 -0
- package/scripts/lib/validate-bb-markup.mjs +37 -2
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
|
@@ -156,18 +156,12 @@ export type InternalItem = Omit<BbBaseButtonProps, 'block' | 'tag' | 'type' | 't
|
|
|
156
156
|
* async items load (`'loading'`), when it resolved empty (`'empty'`), or
|
|
157
157
|
* when its latest load FAILED (`'failed'`: the footer under whatever rows a
|
|
158
158
|
* `stash` keeps listed). Rendered as a non-interactive row that
|
|
159
|
-
* shows `label` or, when provided, the dropdown's `loading` / `empty` slot
|
|
159
|
+
* shows `label` or, when provided, the dropdown's `loading` / `empty` slot (a
|
|
160
|
+
* `'failed'` row always shows its own).
|
|
160
161
|
*
|
|
161
162
|
* @internal Set by `BbDropdownGroup`.
|
|
162
163
|
*/
|
|
163
164
|
placeholder?: 'loading' | 'empty' | 'failed';
|
|
164
|
-
/**
|
|
165
|
-
* On a `'failed'` placeholder: what the group's `items` load rejected
|
|
166
|
-
* with, handed to the `empty` slot as `error`.
|
|
167
|
-
*
|
|
168
|
-
* @internal Set by the pipeline resolver.
|
|
169
|
-
*/
|
|
170
|
-
error?: unknown;
|
|
171
165
|
/**
|
|
172
166
|
* Marks a row built by the pipeline resolver from a fetched item. Its
|
|
173
167
|
* `selectable` predicate already ran against the RAW item there, so
|
|
@@ -187,9 +181,9 @@ export type InternalItem = Omit<BbBaseButtonProps, 'block' | 'tag' | 'type' | 't
|
|
|
187
181
|
slotKey?: string;
|
|
188
182
|
};
|
|
189
183
|
/**
|
|
190
|
-
* An optionally titled, optionally selectable
|
|
191
|
-
* props with {@link InternalItem} but does **not** extend BbBaseButton — it
|
|
192
|
-
* 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.
|
|
193
187
|
*/
|
|
194
188
|
/**
|
|
195
189
|
* Async/array items getter for a pipeline group, returning the raw items
|
|
@@ -215,11 +209,18 @@ export type InternalItem = Omit<BbBaseButtonProps, 'block' | 'tag' | 'type' | 't
|
|
|
215
209
|
* `failedText` with the error. Zero-argument providers keep working. An
|
|
216
210
|
* unannotated getter reads its context typed (`query` a string on a
|
|
217
211
|
* `searchable` group); a provider shared with other components is annotated
|
|
218
|
-
* `BbDropdownGroupItemsContext`.
|
|
212
|
+
* `BbDropdownGroupItemsContext`. A group whose `searchable` is a runtime
|
|
213
|
+
* boolean takes rows or such a provider; a value typed as this union does
|
|
214
|
+
* not fit it (its query-only member needs `searchable: true`).
|
|
219
215
|
*/
|
|
220
216
|
export type DropdownGroupItemsGetter = PlainGetter | SearchGetter;
|
|
221
|
-
/**
|
|
222
|
-
|
|
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[]>;
|
|
223
224
|
/** A `searchable` group: `query` always arrives, `''` until typed. */
|
|
224
225
|
type SearchGetter = (context: BbDropdownGroupItemsContext & {
|
|
225
226
|
query: string;
|
|
@@ -362,12 +363,19 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
362
363
|
/** Placeholder for this group's search field. Defaults to the localized label. */
|
|
363
364
|
searchPlaceholder?: string;
|
|
364
365
|
/**
|
|
365
|
-
*
|
|
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
|
|
366
374
|
* `v-model`, one search field): a field path read off each row (a fetched
|
|
367
|
-
* row: its raw item) or a getter returning the
|
|
368
|
-
* nullish
|
|
369
|
-
* which their first row appears, like `BbSelect`'s `groupBy`; a
|
|
370
|
-
* 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.
|
|
371
379
|
*/
|
|
372
380
|
groupBy?: string | ((row: any) => string | null | undefined);
|
|
373
381
|
/**
|
|
@@ -401,7 +409,7 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
401
409
|
stash?: boolean;
|
|
402
410
|
/**
|
|
403
411
|
* The group's label — rendered as its heading above the items, exposed as the
|
|
404
|
-
*
|
|
412
|
+
* group's title in the adaptive sheet, and surfaced on `useBbDropdown`
|
|
405
413
|
* (handy for chip prefixes / filter summaries).
|
|
406
414
|
*/
|
|
407
415
|
label?: string;
|
|
@@ -471,7 +479,7 @@ type GroupRows = Array<InternalItem | InternalItem[]> | any[];
|
|
|
471
479
|
export declare const groupItemsAsArray: (items: InternalGroup["items"] | undefined) => Array<InternalItem | InternalItem[]>;
|
|
472
480
|
/**
|
|
473
481
|
* A string or number row: its own text and value (`'Google'` reads "Google"
|
|
474
|
-
* and picks `'Google'`), loose, in a
|
|
482
|
+
* and picks `'Google'`), loose, in a divider run, in a group's `items` or in a
|
|
475
483
|
* submenu's `items`. It declares `searchable` like every entry, so a group
|
|
476
484
|
* literal beside it still picks its plain or searchable getter.
|
|
477
485
|
*/
|
|
@@ -484,7 +492,7 @@ export type ItemEntry = Item | PrimitiveRow;
|
|
|
484
492
|
* Items accepted by the dropdown. Entries can be:
|
|
485
493
|
* - a single {@link InternalItem};
|
|
486
494
|
* - an array of items — rendered as an anonymous divider-separated group;
|
|
487
|
-
* - a {@link InternalGroup} object — a titled / selectable
|
|
495
|
+
* - a {@link InternalGroup} object — a titled / selectable group.
|
|
488
496
|
*
|
|
489
497
|
* The shapes can be mixed, e.g. `[item, [item, item], { id, label, items }]`.
|
|
490
498
|
*/
|
|
@@ -549,7 +557,9 @@ export type NormalizedGroup = {
|
|
|
549
557
|
searchable?: boolean;
|
|
550
558
|
/** Placeholder for this group's search field. */
|
|
551
559
|
searchPlaceholder?: string;
|
|
552
|
-
/**
|
|
560
|
+
/** Characters to type before the search runs (see {@link InternalGroup.minQueryLength}). */
|
|
561
|
+
minQueryLength?: number;
|
|
562
|
+
/** Heading per row (see {@link InternalGroup.groupBy}). */
|
|
553
563
|
groupBy?: InternalGroup['groupBy'];
|
|
554
564
|
selectable: boolean;
|
|
555
565
|
/** Selected row keys (`rowKey`; injected by `BbDropdown`; empty for non-selectable groups). */
|
|
@@ -585,6 +595,8 @@ export type MappedItem = InternalItem & {
|
|
|
585
595
|
* `BbOffCanvas` root) — never the desktop surface. Applied after `panel`, so it wins a conflict there.
|
|
586
596
|
* @part header - The menu's header band.
|
|
587
597
|
* @part footer - The menu's footer band.
|
|
598
|
+
* @part box - Every searchable group's search box (field and magnifier),
|
|
599
|
+
* as `box` on a field; desktop and phone.
|
|
588
600
|
* @part input - A searchable group's search field — a broadcast: it lands on
|
|
589
601
|
* every searchable group's field, desktop and phone alike. Its magnifier
|
|
590
602
|
* glyph is chrome.
|
|
@@ -607,9 +619,9 @@ export type MappedItem = InternalItem & {
|
|
|
607
619
|
* @part submenu - Every submenu's flyout box (desktop only). Also takes a
|
|
608
620
|
* per-item function, called with the entry that opens it.
|
|
609
621
|
*/
|
|
610
|
-
export type BbDropdownPtPart = 'root' | 'panel' | 'sheet' | 'header' | 'footer' | 'input' | 'list' | 'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check' | 'submenu';
|
|
622
|
+
export type BbDropdownPtPart = 'root' | 'panel' | 'sheet' | 'header' | 'footer' | 'box' | 'input' | 'list' | 'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check' | 'submenu';
|
|
611
623
|
/** The surface parts — they take a `PtValue` only. Spelled flat (T20). */
|
|
612
|
-
export type BbDropdownSurfacePtPart = 'root' | 'panel' | 'sheet' | 'header' | 'footer' | 'input' | 'list';
|
|
624
|
+
export type BbDropdownSurfacePtPart = 'root' | 'panel' | 'sheet' | 'header' | 'footer' | 'box' | 'input' | 'list';
|
|
613
625
|
/** The entry parts — broadcasts resolved per entry; their base key also takes a per-item function. Spelled flat (T20). */
|
|
614
626
|
export type BbDropdownItemPtPart = 'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check';
|
|
615
627
|
/**
|
|
@@ -641,7 +653,7 @@ export type BbDropdownEntryPtState = 'activeLink' | 'exactActiveLink' | 'selecte
|
|
|
641
653
|
export type BbDropdownPtKey = BbDropdownPtPart | `${BbDropdownPtPart}:open` | `${BbDropdownItemPtPart}:${BbDropdownEntryPtState}`;
|
|
642
654
|
/** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
|
|
643
655
|
export declare const BB_DROPDOWN_PT: {
|
|
644
|
-
readonly parts: readonly ["root", "panel", "sheet", "header", "footer", "input", "list", "item", "itemText", "itemIcon", "itemDescription", "check", "submenu"];
|
|
656
|
+
readonly parts: readonly ["root", "panel", "sheet", "header", "footer", "box", "input", "list", "item", "itemText", "itemIcon", "itemDescription", "check", "submenu"];
|
|
645
657
|
readonly states: readonly ["activeLink", "exactActiveLink", "selected", "disabled", "open"];
|
|
646
658
|
/** On every part: what the resolver's `active` map turns on. */
|
|
647
659
|
readonly wide: readonly ["open"];
|
|
@@ -713,11 +725,13 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
713
725
|
* @defaultValue the activator element
|
|
714
726
|
*/
|
|
715
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;
|
|
716
730
|
/**
|
|
717
|
-
* Keeps the panel inside this element beside its trigger (sideways
|
|
718
|
-
* menu
|
|
719
|
-
*
|
|
720
|
-
* `
|
|
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`). Default in a
|
|
734
|
+
* `BbTable`: the table's left and right edges.
|
|
721
735
|
*/
|
|
722
736
|
boundary?: ElementOrComponentRef | string;
|
|
723
737
|
/**
|
|
@@ -745,7 +759,7 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
745
759
|
/**
|
|
746
760
|
* The menu rows, each a `BbBaseButton` (`button`, `a` or `router-link`): a
|
|
747
761
|
* flat array for one group, nested arrays for divider-separated groups, or
|
|
748
|
-
* `InternalGroup` objects for titled / selectable
|
|
762
|
+
* `InternalGroup` objects for titled / selectable groups. A row's own
|
|
749
763
|
* `items` opens a submenu.
|
|
750
764
|
*
|
|
751
765
|
* @defaultValue `[]`
|
|
@@ -757,23 +771,11 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
757
771
|
* trigger always stays.
|
|
758
772
|
*/
|
|
759
773
|
keepActivator?: boolean;
|
|
760
|
-
/**
|
|
761
|
-
* Default placeholder text shown while a pipeline group's async items load.
|
|
762
|
-
* A group's own `loadingText` overrides this; both fall back to the localized
|
|
763
|
-
* `common.loadingText` (`'Loading...'`).
|
|
764
|
-
*/
|
|
774
|
+
/** A pipeline group's loading row; its own `loadingText` wins. Default: `common.loadingText`. */
|
|
765
775
|
loadingText?: string;
|
|
766
|
-
/**
|
|
767
|
-
* Default placeholder text shown when a pipeline group resolves to no items.
|
|
768
|
-
* A group's own `emptyText` overrides this; both fall back to the localized
|
|
769
|
-
* `common.emptyText` (`'No data to display'`).
|
|
770
|
-
*/
|
|
776
|
+
/** A pipeline group's no-items row; its own `emptyText` wins. Default: `common.emptyText`. */
|
|
771
777
|
emptyText?: string;
|
|
772
|
-
/**
|
|
773
|
-
* Default placeholder text shown when a pipeline group's latest load FAILED
|
|
774
|
-
* (its `items` getter threw). A group's own `failedText` overrides this; both
|
|
775
|
-
* fall back to the localized `common.failedText` (`"Couldn't load items"`).
|
|
776
|
-
*/
|
|
778
|
+
/** A pipeline group's failed-load row (its getter threw); its own `failedText` wins. Default: `common.failedText`. */
|
|
777
779
|
failedText?: string;
|
|
778
780
|
/**
|
|
779
781
|
* Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on
|
|
@@ -833,6 +835,8 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
833
835
|
width?: number | string;
|
|
834
836
|
};
|
|
835
837
|
export type BbDropdownEvents = {
|
|
838
|
+
/** The menu opened or closed (`v-model`): `true` on open, `false` on close. */
|
|
839
|
+
(e: 'update:modelValue', value: boolean): void;
|
|
836
840
|
/** Emitted as soon as the menu (the popover, or the sheet on a phone) starts to open. */
|
|
837
841
|
(e: 'show'): void;
|
|
838
842
|
/** Emitted once the menu is open and its open transition has finished. */
|
|
@@ -902,6 +906,19 @@ export type BbDropdownSlotGroup = {
|
|
|
902
906
|
/** Whether the group's rows are choices. */
|
|
903
907
|
selectable: boolean;
|
|
904
908
|
};
|
|
909
|
+
/** A `groupBy` heading's slot scope (`BbSelect`'s `#group`). */
|
|
910
|
+
export type BbDropdownGroupSlotProps = {
|
|
911
|
+
/** The heading text. */
|
|
912
|
+
text: string;
|
|
913
|
+
/** The raw `groupBy` value. */
|
|
914
|
+
item: unknown;
|
|
915
|
+
/** The heading's position. */
|
|
916
|
+
index: number;
|
|
917
|
+
/** Its row count. */
|
|
918
|
+
length: number;
|
|
919
|
+
/** Every row disabled. */
|
|
920
|
+
disabled: boolean;
|
|
921
|
+
};
|
|
905
922
|
/** Props exposed by the `item:prepend` and `item:append` slots, and named item slots. */
|
|
906
923
|
export type BbDropdownItemSlotProps = {
|
|
907
924
|
/** The item's muted description line, when set. */
|
|
@@ -962,14 +979,8 @@ export type BbDropdownPlaceholderSlotProps = {
|
|
|
962
979
|
* e.g. for "Type at least 2 characters" under a remote search's minimum.
|
|
963
980
|
*/
|
|
964
981
|
query: string;
|
|
965
|
-
/** Resolved placeholder text (group `loadingText`/`emptyText
|
|
982
|
+
/** Resolved placeholder text (group `loadingText`/`emptyText` → dropdown default). */
|
|
966
983
|
text: string;
|
|
967
|
-
/**
|
|
968
|
-
* `empty` slot only: what the group's latest failed `items` load rejected
|
|
969
|
-
* with, untouched (a nullish rejection becomes an `Error`); `null` when the
|
|
970
|
-
* group is genuinely empty. Absent on the `loading` slot.
|
|
971
|
-
*/
|
|
972
|
-
error?: unknown;
|
|
973
984
|
};
|
|
974
985
|
/**
|
|
975
986
|
* Besides the fixed slots, every row gets named slots from its `value` (a
|
|
@@ -987,9 +998,10 @@ export type BbDropdownPlaceholderSlotProps = {
|
|
|
987
998
|
* @dynamicSlot `<groupId>:item` {BbDropdownItemSlotProps} - The content of every row of that group, and no other; a row's own `#<value>` still wins.
|
|
988
999
|
* @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`.
|
|
989
1000
|
* @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.
|
|
990
|
-
* @dynamicSlot `<groupId
|
|
1001
|
+
* @dynamicSlot `<groupId>:label` {BbDropdownItemSlotProps} - That group's title content (`item` is the group, `groupTitle` is `true`).
|
|
991
1002
|
* @dynamicSlot `<groupId>:prepend` {BbDropdownItemSlotProps} - The leading region of that group's title line.
|
|
992
1003
|
* @dynamicSlot `<groupId>:append` {BbDropdownItemSlotProps} - The trailing region of that group's title line.
|
|
1004
|
+
* @dynamicSlot `<groupId>:group` {BbDropdownGroupSlotProps} - That group's `groupBy` headings; beats `group`.
|
|
993
1005
|
*/
|
|
994
1006
|
export type BbDropdownSlots = {
|
|
995
1007
|
/**
|
|
@@ -1004,7 +1016,8 @@ export type BbDropdownSlots = {
|
|
|
1004
1016
|
loading?: (props: BbDropdownPlaceholderSlotProps) => any;
|
|
1005
1017
|
/**
|
|
1006
1018
|
* Replaces the default "no data" placeholder row shown in a pipeline group
|
|
1007
|
-
* that resolved to no items. Rendered once per empty group.
|
|
1019
|
+
* that resolved to no items. Rendered once per empty group. A failed load
|
|
1020
|
+
* is not empty: it keeps its own row (the error icon and `failedText`).
|
|
1008
1021
|
*/
|
|
1009
1022
|
empty?: (props: BbDropdownPlaceholderSlotProps) => any;
|
|
1010
1023
|
/**
|
|
@@ -1018,13 +1031,13 @@ export type BbDropdownSlots = {
|
|
|
1018
1031
|
header?: (props: BbDropdownEdgeSlotProps) => any;
|
|
1019
1032
|
/**
|
|
1020
1033
|
* The leading region of every row (and group title line), replacing its
|
|
1021
|
-
* `prepend:icon
|
|
1034
|
+
* `prepend:icon` wherever it renders. A named slot wins.
|
|
1022
1035
|
*/
|
|
1023
1036
|
'item:prepend'?: (props: BbDropdownItemSlotProps) => any;
|
|
1024
1037
|
/**
|
|
1025
1038
|
* The trailing region of every row (and group title line), replacing its
|
|
1026
|
-
* `append:icon
|
|
1027
|
-
* check on a selected row take its place.
|
|
1039
|
+
* `append:icon` wherever it renders. A named slot wins; the submenu
|
|
1040
|
+
* chevron and the check on a selected row take its place.
|
|
1028
1041
|
*/
|
|
1029
1042
|
'item:append'?: (props: BbDropdownItemSlotProps) => any;
|
|
1030
1043
|
/**
|
|
@@ -1032,6 +1045,8 @@ export type BbDropdownSlots = {
|
|
|
1032
1045
|
* action buttons.
|
|
1033
1046
|
*/
|
|
1034
1047
|
footer?: (props: BbDropdownEdgeSlotProps) => any;
|
|
1048
|
+
/** Every group's `groupBy` headings (`BbSelect`'s `#group` scope); `#<groupId>:group` beats it. */
|
|
1049
|
+
group?: (props: BbDropdownGroupSlotProps) => unknown;
|
|
1035
1050
|
} & Record<string, (props: BbDropdownItemSlotProps) => any>;
|
|
1036
1051
|
/**
|
|
1037
1052
|
* `v-model` value of `<BbDropdownGroup>`: the selected rows' values — a
|
|
@@ -9,6 +9,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
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;
|
package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -7,16 +7,17 @@ import { BB_DROPDOWN_PT as a } from "../BbDropdown/types.js";
|
|
|
7
7
|
import { BUTTON_VARIANTS as o } from "../../types/ButtonVariant.js";
|
|
8
8
|
import { DROPDOWN_ITEM_VARIANTS as s } from "../../types/DropdownItemVariant.js";
|
|
9
9
|
import { useLocale as c } from "../../composables/useLocale.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useOpenProp as l } from "../../composables/useOpenModel.js";
|
|
11
|
+
import { removedPropsFor as u } from "../../deprecation/removedProps.js";
|
|
12
|
+
import { warnRemovedAttrs as d } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
12
13
|
import "../../assets/svgs/chevron_down.svg_raw.js";
|
|
13
|
-
import { BB_DROPDOWN_BUTTON_PT as
|
|
14
|
-
import { registeredVariantNames as
|
|
15
|
-
import { useConfigDefaults as
|
|
16
|
-
import { computed as
|
|
14
|
+
import { BB_DROPDOWN_BUTTON_PT as f } from "./types.js";
|
|
15
|
+
import { registeredVariantNames as p, usePassthrough as m, variantPt as h } from "../../composables/usePassthrough.js";
|
|
16
|
+
import { useConfigDefaults as g } from "../../composables/useConfigDefaults.js";
|
|
17
|
+
import { computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createSlots as x, createVNode as S, defineComponent as C, guardReactiveProps as w, mergeProps as T, normalizeProps as E, onMounted as D, openBlock as O, ref as k, renderList as A, renderSlot as j, unref as M, useAttrs as ee, useSlots as te, useTemplateRef as N, withCtx as P } from "vue";
|
|
17
18
|
// src/components/BbDropdownButton/BbDropdownButton.vue?vue&type=script&setup=true&lang.ts
|
|
18
|
-
var F = /*@__PURE__*/
|
|
19
|
-
mixins: [
|
|
19
|
+
var F = /*@__PURE__*/ C({
|
|
20
|
+
mixins: [h(f)],
|
|
20
21
|
inheritAttrs: !1,
|
|
21
22
|
__name: "BbDropdownButton",
|
|
22
23
|
props: {
|
|
@@ -116,12 +117,24 @@ var F = /*@__PURE__*/ S({
|
|
|
116
117
|
"pt:footer:disabled": {},
|
|
117
118
|
"pt:footer:open": {},
|
|
118
119
|
"pt:footer:loading": {},
|
|
120
|
+
"pt:box": {},
|
|
121
|
+
"pt:box:activeLink": {},
|
|
122
|
+
"pt:box:exactActiveLink": {},
|
|
123
|
+
"pt:box:disabled": {},
|
|
124
|
+
"pt:box:open": {},
|
|
125
|
+
"pt:box:loading": {},
|
|
119
126
|
"pt:input": {},
|
|
120
127
|
"pt:input:activeLink": {},
|
|
121
128
|
"pt:input:exactActiveLink": {},
|
|
122
129
|
"pt:input:disabled": {},
|
|
123
130
|
"pt:input:open": {},
|
|
124
131
|
"pt:input:loading": {},
|
|
132
|
+
"pt:list": {},
|
|
133
|
+
"pt:list:activeLink": {},
|
|
134
|
+
"pt:list:exactActiveLink": {},
|
|
135
|
+
"pt:list:disabled": {},
|
|
136
|
+
"pt:list:open": {},
|
|
137
|
+
"pt:list:loading": {},
|
|
125
138
|
"pt:item": {},
|
|
126
139
|
"pt:item:activeLink": {},
|
|
127
140
|
"pt:item:exactActiveLink": {},
|
|
@@ -174,6 +187,7 @@ var F = /*@__PURE__*/ S({
|
|
|
174
187
|
"pt:submenu:open": {},
|
|
175
188
|
"pt:submenu:loading": {},
|
|
176
189
|
pt: {},
|
|
190
|
+
open: { type: Boolean },
|
|
177
191
|
adaptive: {
|
|
178
192
|
type: Boolean,
|
|
179
193
|
default: void 0
|
|
@@ -259,12 +273,13 @@ var F = /*@__PURE__*/ S({
|
|
|
259
273
|
"show",
|
|
260
274
|
"shown",
|
|
261
275
|
"hide",
|
|
276
|
+
"update:open",
|
|
262
277
|
"hidden",
|
|
263
278
|
"item:selected",
|
|
264
279
|
"item:unselected"
|
|
265
280
|
],
|
|
266
|
-
setup(
|
|
267
|
-
let F =
|
|
281
|
+
setup(h, { emit: C }) {
|
|
282
|
+
let F = h, I = C, L = te(), R = g("BbDropdownButton", F, { block: !1 }), z = g("BbButton", F, {
|
|
268
283
|
size: "md",
|
|
269
284
|
variant: "primary"
|
|
270
285
|
}), B = /* @__PURE__ */ new Set([
|
|
@@ -273,8 +288,8 @@ var F = /*@__PURE__*/ S({
|
|
|
273
288
|
"dropdown",
|
|
274
289
|
"prepend:icon",
|
|
275
290
|
"append:icon"
|
|
276
|
-
]), V = () => Object.keys(L).filter((e) => !B.has(e)), H = () => F.items ?? [], U = () => r(H()) || !!L.dropdown, W =
|
|
277
|
-
|
|
291
|
+
]), V = () => Object.keys(L).filter((e) => !B.has(e)), H = () => F.items ?? [], U = () => r(H()) || !!L.dropdown, W = k(!1), G = k(!1);
|
|
292
|
+
D(() => G.value = !0);
|
|
278
293
|
let K = () => U() && (!G.value || W.value), q = /* @__PURE__ */ new Set([
|
|
279
294
|
"adaptive",
|
|
280
295
|
"closeOnSelect",
|
|
@@ -291,121 +306,125 @@ var F = /*@__PURE__*/ S({
|
|
|
291
306
|
"toggle:icon",
|
|
292
307
|
"block",
|
|
293
308
|
"pt"
|
|
294
|
-
]), J = () => Object.fromEntries(Object.entries(F).filter(([e, t]) => t !== void 0 && !q.has(e) && !e.startsWith("pt:"))),
|
|
309
|
+
]), J = () => Object.fromEntries(Object.entries(F).filter(([e, t]) => t !== void 0 && !q.has(e) && !e.startsWith("pt:"))), ne = /^(on[A-Z].*|aria-.*|name|value|autofocus|title|formaction|formenctype|formmethod|formnovalidate|formtarget)$/, Y = () => {
|
|
295
310
|
let e = {}, t = {};
|
|
296
|
-
for (let [n, r] of Object.entries(
|
|
311
|
+
for (let [n, r] of Object.entries(Z.rootAttrs)) (ne.test(n) ? e : t)[n] = r;
|
|
297
312
|
return {
|
|
298
313
|
main: e,
|
|
299
314
|
root: t
|
|
300
315
|
};
|
|
301
|
-
},
|
|
316
|
+
}, X = t(F), Z = m({
|
|
302
317
|
component: "BbDropdownButton",
|
|
303
|
-
attrs:
|
|
318
|
+
attrs: ee(),
|
|
304
319
|
props: F,
|
|
305
|
-
parts:
|
|
306
|
-
states:
|
|
320
|
+
parts: f.parts,
|
|
321
|
+
states: f.states,
|
|
307
322
|
active: {
|
|
308
323
|
loading: () => !!F.loading,
|
|
309
324
|
disabled: () => !!F.disabled,
|
|
310
325
|
open: () => $.value,
|
|
311
|
-
activeLink: () =>
|
|
312
|
-
exactActiveLink: () =>
|
|
326
|
+
activeLink: () => X.value.activeLink,
|
|
327
|
+
exactActiveLink: () => X.value.exactActiveLink
|
|
313
328
|
},
|
|
314
329
|
variant: [{
|
|
315
|
-
...
|
|
330
|
+
...f.variant[0],
|
|
316
331
|
current: () => z.variant
|
|
317
|
-
},
|
|
318
|
-
}),
|
|
319
|
-
...
|
|
332
|
+
}, f.variant[1]]
|
|
333
|
+
}), re = [...i.states, ...p(o, "buttonVariants")], ie = [...a.states, ...p(s, "dropdownItemVariants")], ae = ["activeLink", "exactActiveLink"], oe = () => Z.forward({ toggle: "root" }, ["disabled", ...p(o, "buttonVariants")]), se = () => ({
|
|
334
|
+
...Z.forward([
|
|
320
335
|
"panel",
|
|
321
336
|
"sheet",
|
|
322
337
|
"header",
|
|
323
338
|
"footer",
|
|
339
|
+
"box",
|
|
324
340
|
"input",
|
|
341
|
+
"list",
|
|
325
342
|
"submenu"
|
|
326
|
-
], a.states.filter((e) => e !== "disabled" && !
|
|
327
|
-
...
|
|
343
|
+
], a.states.filter((e) => e !== "disabled" && !ae.includes(e))),
|
|
344
|
+
...Z.forward([
|
|
328
345
|
"item",
|
|
329
346
|
"itemText",
|
|
330
347
|
"itemIcon",
|
|
331
348
|
"itemDescription",
|
|
332
349
|
"check"
|
|
333
|
-
],
|
|
350
|
+
], ie)
|
|
334
351
|
});
|
|
335
|
-
process.env.NODE_ENV !== "production" &&
|
|
336
|
-
let
|
|
352
|
+
process.env.NODE_ENV !== "production" && d("BbDropdownButton", u("BbDropdownButton"));
|
|
353
|
+
let Q = _(() => F["toggle:icon"] ?? "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M6 9l6 6l6 -6\" />\n</svg>\n"), { t: ce } = c(), le = N("root-el"), $ = k(!1), ue = () => {
|
|
337
354
|
$.value = !0, I("show");
|
|
338
|
-
},
|
|
355
|
+
}, de = () => {
|
|
339
356
|
$.value = !1, I("hide");
|
|
340
|
-
},
|
|
341
|
-
return (t, r) => (
|
|
357
|
+
}, fe = _(() => ce("dropdownButton.open").value), { model: pe, set: me } = l(F, I);
|
|
358
|
+
return (t, r) => (O(), b("span", T({
|
|
342
359
|
ref: "root-el",
|
|
343
|
-
class: ["bb-dropdown-button", { "bb-dropdown-button--block":
|
|
344
|
-
},
|
|
360
|
+
class: ["bb-dropdown-button", { "bb-dropdown-button--block": M(R).block }]
|
|
361
|
+
}, Y().root), [S(e, T({
|
|
345
362
|
...J(),
|
|
346
|
-
...
|
|
363
|
+
...Y().main
|
|
347
364
|
}, {
|
|
348
365
|
class: "bb-dropdown-button__main",
|
|
349
366
|
group: K(),
|
|
350
|
-
pt:
|
|
367
|
+
pt: M(Z).forward({
|
|
351
368
|
main: "root",
|
|
352
369
|
icon: "icon",
|
|
353
370
|
spinner: "spinner",
|
|
354
371
|
text: "text"
|
|
355
|
-
},
|
|
356
|
-
}),
|
|
372
|
+
}, re)
|
|
373
|
+
}), x({ _: 2 }, [
|
|
357
374
|
L.default ? {
|
|
358
375
|
name: "default",
|
|
359
|
-
fn: P(() => [
|
|
376
|
+
fn: P(() => [j(t.$slots, "default")]),
|
|
360
377
|
key: "0"
|
|
361
378
|
} : void 0,
|
|
362
379
|
L["prepend:icon"] ? {
|
|
363
380
|
name: "prepend:icon",
|
|
364
|
-
fn: P((e) => [
|
|
381
|
+
fn: P((e) => [j(t.$slots, "prepend:icon", E(w(e)))]),
|
|
365
382
|
key: "1"
|
|
366
383
|
} : void 0,
|
|
367
384
|
L["append:icon"] ? {
|
|
368
385
|
name: "append:icon",
|
|
369
|
-
fn: P((e) => [
|
|
386
|
+
fn: P((e) => [j(t.$slots, "append:icon", E(w(e)))]),
|
|
370
387
|
key: "2"
|
|
371
388
|
} : void 0
|
|
372
|
-
]), 1040, ["group", "pt"]), U() ? (
|
|
389
|
+
]), 1040, ["group", "pt"]), U() ? (O(), v(n, {
|
|
373
390
|
key: 0,
|
|
374
|
-
id:
|
|
375
|
-
adaptive:
|
|
376
|
-
anchor:
|
|
377
|
-
"close-on-select":
|
|
378
|
-
compact:
|
|
379
|
-
disabled:
|
|
380
|
-
eager:
|
|
391
|
+
id: h.id,
|
|
392
|
+
adaptive: h.adaptive,
|
|
393
|
+
anchor: le.value,
|
|
394
|
+
"close-on-select": h.closeOnSelect,
|
|
395
|
+
compact: h.compact,
|
|
396
|
+
disabled: h.disabled,
|
|
397
|
+
eager: h.eager,
|
|
381
398
|
items: H(),
|
|
382
|
-
"
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
399
|
+
"model-value": M(pe),
|
|
400
|
+
"off-canvas-props": h.offCanvasProps,
|
|
401
|
+
offset: h.offset,
|
|
402
|
+
padding: h.padding,
|
|
403
|
+
placement: h.placement,
|
|
404
|
+
pt: se(),
|
|
405
|
+
"transition-duration": h.transitionDuration,
|
|
406
|
+
width: h.width,
|
|
389
407
|
onHidden: r[2] ||= (e) => I("hidden"),
|
|
390
|
-
onHide:
|
|
408
|
+
onHide: de,
|
|
391
409
|
"onItem:selected": r[3] ||= (e) => I("item:selected", e),
|
|
392
410
|
"onItem:unselected": r[4] ||= (e) => I("item:unselected", e),
|
|
393
|
-
onShow:
|
|
394
|
-
onShown: r[5] ||= (e) => I("shown")
|
|
395
|
-
|
|
396
|
-
|
|
411
|
+
onShow: ue,
|
|
412
|
+
onShown: r[5] ||= (e) => I("shown"),
|
|
413
|
+
"onUpdate:modelValue": M(me)
|
|
414
|
+
}, x({
|
|
415
|
+
activator: P(({ props: t, loading: n }) => [S(e, T({
|
|
397
416
|
class: "bb-dropdown-button__toggle",
|
|
398
417
|
"disable-auto-loading": "",
|
|
399
|
-
disabled:
|
|
418
|
+
disabled: h.disabled,
|
|
400
419
|
group: "",
|
|
401
420
|
"icon-only": "",
|
|
402
421
|
"interactive-while-loading": "",
|
|
403
422
|
loading: n,
|
|
404
|
-
"prepend:icon":
|
|
405
|
-
pt:
|
|
406
|
-
size:
|
|
407
|
-
text:
|
|
408
|
-
variant:
|
|
423
|
+
"prepend:icon": Q.value,
|
|
424
|
+
pt: oe(),
|
|
425
|
+
size: M(z).size,
|
|
426
|
+
text: fe.value,
|
|
427
|
+
variant: M(z).variant
|
|
409
428
|
}, t, {
|
|
410
429
|
onVnodeMounted: r[0] ||= (e) => W.value = !0,
|
|
411
430
|
onVnodeUnmounted: r[1] ||= (e) => W.value = !1
|
|
@@ -418,11 +437,11 @@ var F = /*@__PURE__*/ S({
|
|
|
418
437
|
"text",
|
|
419
438
|
"variant"
|
|
420
439
|
])]),
|
|
421
|
-
default: P(() => [
|
|
440
|
+
default: P(() => [j(t.$slots, "dropdown")]),
|
|
422
441
|
_: 2
|
|
423
|
-
}, [
|
|
442
|
+
}, [A(V(), (e) => ({
|
|
424
443
|
name: e,
|
|
425
|
-
fn: P((n) => [
|
|
444
|
+
fn: P((n) => [j(t.$slots, e, E(w(n)))])
|
|
426
445
|
}))]), 1032, [
|
|
427
446
|
"id",
|
|
428
447
|
"adaptive",
|
|
@@ -432,14 +451,16 @@ var F = /*@__PURE__*/ S({
|
|
|
432
451
|
"disabled",
|
|
433
452
|
"eager",
|
|
434
453
|
"items",
|
|
454
|
+
"model-value",
|
|
435
455
|
"off-canvas-props",
|
|
436
456
|
"offset",
|
|
437
457
|
"padding",
|
|
438
458
|
"placement",
|
|
439
459
|
"pt",
|
|
440
460
|
"transition-duration",
|
|
441
|
-
"width"
|
|
442
|
-
|
|
461
|
+
"width",
|
|
462
|
+
"onUpdate:modelValue"
|
|
463
|
+
])) : y("", !0)], 16));
|
|
443
464
|
}
|
|
444
465
|
});
|
|
445
466
|
export { F as default };
|