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
|
@@ -7,52 +7,52 @@ import a from "../CommonPopover/CommonPopover.vue.js";
|
|
|
7
7
|
import ee from "./BbDropdownList.vue.js";
|
|
8
8
|
import te from "./DropdownRow.vue.js";
|
|
9
9
|
import { isImeComposing as o } from "../../utilities/functions/isImeComposing.js";
|
|
10
|
-
import { extractHtmlContainer as
|
|
11
|
-
import { keyHaystacks as
|
|
12
|
-
import { slotKey as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
10
|
+
import { extractHtmlContainer as ne } from "../../utilities/functions/extractDomContainer.js";
|
|
11
|
+
import { keyHaystacks as re, rankByQuery as ie } from "../../utilities/functions/searchRank.js";
|
|
12
|
+
import { slotKey as s } from "../../utilities/functions/slotKey.js";
|
|
13
|
+
import { SlotChain as c } from "../../utilities/functions/slotContent.js";
|
|
14
|
+
import ae from "../../assets/svgs/search.svg_raw.js";
|
|
15
|
+
import { useId as oe } from "../../composables/useId.js";
|
|
16
|
+
import { useImeDismissBlur as se } from "../../composables/useImeDismissBlur.js";
|
|
17
|
+
import { useLocale as ce } from "../../composables/useLocale.js";
|
|
18
|
+
import { useConfig as le } from "../../composables/useConfig.js";
|
|
19
|
+
import { isPrintableTypeaheadKey as ue, normalizeSearchToken as de, useTypeahead as fe } from "../../composables/useTypeahead.js";
|
|
20
|
+
import { useSheetSurface as pe } from "../../composables/useSheetSurface.js";
|
|
21
|
+
import { groupByTitle as me, groupByValue as he, levelHasSearch as ge, normalizeGroups as _e } from "./normalizeGroups.js";
|
|
22
|
+
import { useDropdownContext as ve } from "./useDropdownContext.js";
|
|
23
|
+
import { markRowsChanged as ye, pointerStill as be, trackPointer as xe } from "./pointerTrail.js";
|
|
24
|
+
import { focusQuietly as Se, focusVisibly as Ce } from "../../utils/focusVisibility.js";
|
|
25
|
+
import { useInternalIcon as we } from "../../composables/useInternalIcon.js";
|
|
26
|
+
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as Te, createVNode as h, defineComponent as g, h as Ee, mergeProps as _, nextTick as De, normalizeClass as Oe, normalizeStyle as ke, onBeforeUnmount as Ae, onMounted as v, onUpdated as je, openBlock as y, ref as b, renderList as x, resolveDynamicComponent as Me, toDisplayString as S, unref as C, watch as w, watchEffect as Ne, withCtx as T, withKeys as Pe, withModifiers as Fe } from "vue";
|
|
25
27
|
// src/components/BbDropdown/BbDropdownList.vue?vue&type=script&setup=true&lang.ts
|
|
26
|
-
var
|
|
28
|
+
var Ie = {
|
|
27
29
|
key: 0,
|
|
28
30
|
"aria-hidden": "true",
|
|
29
31
|
class: "bb-dropdown__divider"
|
|
30
|
-
},
|
|
32
|
+
}, Le = [
|
|
31
33
|
"id",
|
|
32
34
|
"role",
|
|
33
35
|
"tabindex",
|
|
34
36
|
"onClick",
|
|
35
37
|
"onKeydown"
|
|
36
|
-
],
|
|
37
|
-
key:
|
|
38
|
-
class: "group-
|
|
39
|
-
},
|
|
38
|
+
], Re = {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: "group-label__content"
|
|
41
|
+
}, ze = {
|
|
40
42
|
key: 2,
|
|
41
43
|
class: "bb-dropdown__sheet-selection"
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
class: "bb-dropdown__group-search",
|
|
45
|
-
role: "none"
|
|
46
|
-
}, ze = [
|
|
44
|
+
}, Be = { class: "bb-dropdown__sheet-chips" }, Ve = [
|
|
45
|
+
"aria-describedby",
|
|
47
46
|
"aria-label",
|
|
48
47
|
"placeholder",
|
|
49
48
|
"value",
|
|
49
|
+
"onCompositionend",
|
|
50
50
|
"onInput"
|
|
51
|
-
],
|
|
52
|
-
key:
|
|
51
|
+
], He = ["id"], Ue = {
|
|
52
|
+
key: 1,
|
|
53
53
|
"aria-hidden": "true",
|
|
54
54
|
class: "bb-dropdown__group-loading"
|
|
55
|
-
},
|
|
55
|
+
}, We = ["aria-labelledby", "role"], Ge = ["id"], Ke = { class: "group-header__content" }, qe = { class: "item__content" }, Je = [
|
|
56
56
|
"id",
|
|
57
57
|
"aria-label",
|
|
58
58
|
"data-bb-dropdown-surface",
|
|
@@ -60,7 +60,7 @@ var Ne = {
|
|
|
60
60
|
"role",
|
|
61
61
|
"onKeydown",
|
|
62
62
|
"onPointerleave"
|
|
63
|
-
],
|
|
63
|
+
], Ye = 289, Xe = 160, Ze = 100, Qe = 120, $e = /*@__PURE__*/ g({
|
|
64
64
|
__name: "BbDropdownList",
|
|
65
65
|
props: {
|
|
66
66
|
groups: {},
|
|
@@ -70,19 +70,19 @@ var Ne = {
|
|
|
70
70
|
slotDepth: {}
|
|
71
71
|
},
|
|
72
72
|
emits: ["close-level"],
|
|
73
|
-
setup(
|
|
74
|
-
let E =
|
|
73
|
+
setup(g, { expose: $e, emit: et }) {
|
|
74
|
+
let E = g, tt = et, nt = we("search", ae), rt = u(() => E.slotDepth ?? E.level), D = ve(), { inSheet: O } = pe(), { t: k } = ce(), it = k("select.searchLabel"), at = k("common.emptyText"), ot = (e, t) => {
|
|
75
75
|
let n = t && t.length ? t : e.description == null ? ["label"] : ["label", "description"];
|
|
76
76
|
try {
|
|
77
|
-
return
|
|
77
|
+
return re(e, n);
|
|
78
78
|
} catch {
|
|
79
79
|
return [];
|
|
80
80
|
}
|
|
81
|
-
},
|
|
81
|
+
}, A = u(() => E.groups.map((e) => mt(lt(e)))), j = (e) => !!e.id && (e.minQueryLength ?? 0) > 0 && [...D.queryFor(e.id).trim()].length < e.minQueryLength, st = (e) => (e.minQueryLength ?? 0) > 1 ? k("select.searchMinLength", e.minQueryLength).value : k("select.searchToStart").value, ct = (e) => `${V.value}_search-hint_${e}`, lt = (e) => {
|
|
82
82
|
if (!e.searchable || !e.id || D.isPipelineGroup(e.id)) return e;
|
|
83
83
|
let t = D.queryFor(e.id).trim();
|
|
84
|
-
if (!t) return e;
|
|
85
|
-
let n = e.filterBy, r = n === !1 ? e.items : [...e.items.filter((e) => e.placeholder), ...
|
|
84
|
+
if (!t || j(e)) return e;
|
|
85
|
+
let n = e.filterBy, r = n === !1 ? e.items : [...e.items.filter((e) => e.placeholder), ...ie(e.items.filter((e) => !e.placeholder), (e) => ot(e, n), t, e.groupBy == null ? void 0 : (t) => dt(e, t))];
|
|
86
86
|
return r.length ? {
|
|
87
87
|
...e,
|
|
88
88
|
items: r
|
|
@@ -92,21 +92,30 @@ var Ne = {
|
|
|
92
92
|
rowKey: "__bb-dropdown:no-results__",
|
|
93
93
|
domKey: "no-results",
|
|
94
94
|
placeholder: "empty",
|
|
95
|
-
label: D.emptyText.value ??
|
|
95
|
+
label: D.emptyText.value ?? at.value,
|
|
96
96
|
disabled: !0
|
|
97
97
|
}]
|
|
98
98
|
};
|
|
99
|
-
},
|
|
100
|
-
if (!t.placeholder) return "
|
|
101
|
-
},
|
|
99
|
+
}, ut = (e, t) => {
|
|
100
|
+
if (!t.placeholder) return "groupByValue" in t ? t.groupByValue : he(e.groupBy, t);
|
|
101
|
+
}, dt = (e, t) => {
|
|
102
|
+
if (!t.placeholder) {
|
|
103
|
+
if ("groupByValue" in t) {
|
|
104
|
+
let e = t.groupByValue;
|
|
105
|
+
return e === void 0 ? void 0 : String(e);
|
|
106
|
+
}
|
|
107
|
+
return me(e.groupBy, t);
|
|
108
|
+
}
|
|
109
|
+
}, ft = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), mt = (e) => {
|
|
102
110
|
if (e.groupBy == null) return e;
|
|
103
|
-
let t =
|
|
111
|
+
let t = pt.get(e.items);
|
|
104
112
|
if (!t) {
|
|
105
113
|
let n = /* @__PURE__ */ new Map();
|
|
106
114
|
for (let t of e.items) {
|
|
107
|
-
let r =
|
|
115
|
+
let r = dt(e, t), i = r === void 0 ? "" : `group-by:${r}`, a = n.get(i);
|
|
108
116
|
a || n.set(i, a = {
|
|
109
117
|
title: r,
|
|
118
|
+
value: r === void 0 ? void 0 : ut(e, t),
|
|
110
119
|
items: []
|
|
111
120
|
}), a.items.push(t);
|
|
112
121
|
}
|
|
@@ -114,137 +123,147 @@ var Ne = {
|
|
|
114
123
|
n.delete("");
|
|
115
124
|
let i = r ? [["", r], ...n] : n, a = [];
|
|
116
125
|
t = [];
|
|
126
|
+
let ee = 0;
|
|
117
127
|
for (let [e, n] of i) a.push({
|
|
118
128
|
key: e,
|
|
119
129
|
title: n.title,
|
|
130
|
+
value: n.value,
|
|
131
|
+
index: n.title === void 0 ? -1 : ee++,
|
|
120
132
|
start: t.length,
|
|
121
133
|
items: n.items
|
|
122
134
|
}), t.push(...n.items);
|
|
123
|
-
|
|
135
|
+
pt.set(e.items, t), ft.set(t, a);
|
|
124
136
|
}
|
|
125
137
|
return {
|
|
126
138
|
...e,
|
|
127
139
|
items: t
|
|
128
140
|
};
|
|
129
|
-
},
|
|
141
|
+
}, ht = (e) => ft.get(e.items) ?? [{
|
|
130
142
|
key: "",
|
|
143
|
+
index: -1,
|
|
131
144
|
start: 0,
|
|
132
145
|
items: e.items
|
|
133
|
-
}],
|
|
134
|
-
|
|
135
|
-
let
|
|
136
|
-
|
|
146
|
+
}], M = (e, { slots: t, attrs: n }) => e.titled ? Ee("div", n, t.default?.()) : t.default?.();
|
|
147
|
+
M.props = ["titled"], M.inheritAttrs = !1;
|
|
148
|
+
let gt = (e) => [e.id ? D.slots[`${s(e.id)}:group`] : void 0, D.slots.group], _t = (e) => ({
|
|
149
|
+
text: e.title ?? "",
|
|
150
|
+
item: e.value,
|
|
151
|
+
index: e.index,
|
|
152
|
+
length: e.items.length,
|
|
153
|
+
disabled: e.items.every((e) => !!e.disabled)
|
|
154
|
+
}), vt = u(() => {
|
|
155
|
+
if (E.level === 0) for (let [e, t] of A.value.entries()) {
|
|
137
156
|
let n = t.items.find((e) => e.placeholder);
|
|
138
157
|
if (n) return {
|
|
139
158
|
gi: e,
|
|
140
159
|
item: n
|
|
141
160
|
};
|
|
142
161
|
}
|
|
143
|
-
}),
|
|
144
|
-
t instanceof HTMLElement ?
|
|
145
|
-
},
|
|
146
|
-
let e =
|
|
147
|
-
if (t !==
|
|
162
|
+
}), N = {}, yt = (e, t) => {
|
|
163
|
+
t instanceof HTMLElement ? N[e] = t : delete N[e];
|
|
164
|
+
}, bt, P = E.level !== 0 || typeof MutationObserver > "u" ? void 0 : new MutationObserver(() => F()), F = () => {
|
|
165
|
+
let e = vt.value, t = e ? N[e.gi] : void 0;
|
|
166
|
+
if (t !== bt && (P?.disconnect(), bt = t, t && P?.observe(t, {
|
|
148
167
|
characterData: !0,
|
|
149
168
|
childList: !0,
|
|
150
169
|
subtree: !0
|
|
151
170
|
})), E.level !== 0) return;
|
|
152
|
-
let n = t && e &&
|
|
171
|
+
let n = t && e && R(e.item) ? t.textContent?.replace(/\s+/g, " ").trim() : void 0;
|
|
153
172
|
D.setStatus(n || e?.item.label);
|
|
154
173
|
};
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}),
|
|
174
|
+
v(F), v(() => {
|
|
175
|
+
xe(), ye();
|
|
176
|
+
}), je(F), w(vt, F, { flush: "post" }), Ae(() => P?.disconnect()), Ne(() => {
|
|
158
177
|
for (let e of E.groups) e.id && D.isPipelineGroup(e.id) && D.activateGroup(e.id);
|
|
159
178
|
});
|
|
160
|
-
let
|
|
161
|
-
let n =
|
|
162
|
-
n instanceof HTMLInputElement ?
|
|
163
|
-
},
|
|
179
|
+
let I = b({}), xt = (e, t) => {
|
|
180
|
+
let n = ne(t);
|
|
181
|
+
n instanceof HTMLInputElement ? I.value[e] = n : delete I.value[e];
|
|
182
|
+
}, St = u(() => A.value.find((e) => e.searchable && e.id)?.id), Ct = (e) => {
|
|
164
183
|
if (O.value) return;
|
|
165
|
-
let t = e.maxHeight ?? (e.searchable ?
|
|
184
|
+
let t = e.maxHeight ?? (e.searchable ? Ye : void 0);
|
|
166
185
|
if (t != null && t !== 0 && t !== "none") return typeof t == "number" ? `${t}px` : t;
|
|
167
|
-
},
|
|
186
|
+
}, wt = (e) => _e(e).map((e) => e.selectable ? {
|
|
168
187
|
...e,
|
|
169
188
|
selected: D.selectedFor(e.id ?? "")
|
|
170
|
-
} : e),
|
|
171
|
-
let t =
|
|
172
|
-
return t === void 0 &&
|
|
173
|
-
},
|
|
174
|
-
if (e.slotKey) return
|
|
189
|
+
} : e), Tt = /* @__PURE__ */ new WeakMap(), Et = (e) => {
|
|
190
|
+
let t = Tt.get(e);
|
|
191
|
+
return t === void 0 && Tt.set(e, t = Dt(e)), t;
|
|
192
|
+
}, Dt = (e) => {
|
|
193
|
+
if (e.slotKey) return s(e.slotKey);
|
|
175
194
|
if (e.keyless) return null;
|
|
176
195
|
let t = e.value;
|
|
177
|
-
return typeof t == "number" ?
|
|
178
|
-
},
|
|
179
|
-
let n =
|
|
196
|
+
return typeof t == "number" ? s(String(t)) : typeof t == "string" && t !== "" ? s(t) : null;
|
|
197
|
+
}, Ot = (e, t) => {
|
|
198
|
+
let n = Et(e);
|
|
180
199
|
if (n !== null) return D.slots[t ? `${n}:${t}` : n];
|
|
181
|
-
},
|
|
200
|
+
}, kt = (e, t, n) => Ot(t, n) ?? At(e, n), At = (e, t) => {
|
|
182
201
|
if (!e.id) return;
|
|
183
|
-
let n = `${
|
|
202
|
+
let n = `${s(e.id)}:item`;
|
|
184
203
|
return D.slots[t ? `${n}:${t}` : n];
|
|
185
|
-
},
|
|
204
|
+
}, jt = (e) => e.variant && e.variant !== "default" ? `bb-dropdown__item--variant-${e.variant}` : void 0, Mt = (e) => e.variant && e.variant !== "default" ? `bb-dropdown__group-label--variant-${e.variant}` : void 0, Nt = (e) => e.selectable ? e.multiple ? "menuitemcheckbox" : "menuitemradio" : "menuitem", Pt = (e, t) => e.selected.includes(t.rowKey), Ft = /* @__PURE__ */ new WeakMap(), It = (e, t) => {
|
|
186
205
|
let n = Object.keys(e);
|
|
187
206
|
return n.length === Object.keys(t).length && n.every((n) => n === "selected" || e[n] === t[n]);
|
|
188
|
-
},
|
|
189
|
-
let t =
|
|
190
|
-
return t &&
|
|
191
|
-
},
|
|
207
|
+
}, Lt = (e) => {
|
|
208
|
+
let t = Ft.get(e.items);
|
|
209
|
+
return t && It(t, e) ? t : (Ft.set(e.items, e), e);
|
|
210
|
+
}, L = (e) => {
|
|
192
211
|
let t = 0;
|
|
193
|
-
for (let n = 0; n < e; n++) t +=
|
|
212
|
+
for (let n = 0; n < e; n++) t += A.value[n]?.items.length ?? 0;
|
|
194
213
|
return t;
|
|
195
|
-
},
|
|
214
|
+
}, Rt = /* @__PURE__ */ new Set([...t.filter((e) => e !== "text" && e !== "disabled")]), zt = (e) => {
|
|
196
215
|
let t = {};
|
|
197
|
-
for (let [n, r] of Object.entries(e))
|
|
216
|
+
for (let [n, r] of Object.entries(e)) Rt.has(n) && (t[n] = r);
|
|
198
217
|
return t;
|
|
199
|
-
},
|
|
200
|
-
let a =
|
|
201
|
-
return
|
|
218
|
+
}, Bt = (e, t, n, r, i) => {
|
|
219
|
+
let a = Vt("item", t, r, i);
|
|
220
|
+
return _(zt(t), {
|
|
202
221
|
"aria-busy": D.isItemLoading(t.rowKey) || void 0,
|
|
203
222
|
"aria-checked": e.selectable ? r : void 0,
|
|
204
|
-
"aria-labelledby":
|
|
205
|
-
"aria-expanded": t.items ?
|
|
206
|
-
"aria-haspopup": t.items ?
|
|
207
|
-
"aria-controls": t.items &&
|
|
208
|
-
class: [
|
|
223
|
+
"aria-labelledby": $t(e, t, n, a),
|
|
224
|
+
"aria-expanded": t.items ? J.value === t.rowKey : void 0,
|
|
225
|
+
"aria-haspopup": t.items ? nn(t) ? "dialog" : "menu" : void 0,
|
|
226
|
+
"aria-controls": t.items && J.value === t.rowKey ? rn(t) : void 0,
|
|
227
|
+
class: [jt(t), {
|
|
209
228
|
"bb-dropdown__item--selected": r,
|
|
210
229
|
"bb-dropdown__item--has-submenu": !!t.items,
|
|
211
230
|
"bb-dropdown__item--description": !!t.description
|
|
212
231
|
}],
|
|
213
232
|
"data-dropdown-item": "",
|
|
214
233
|
disabled: t.disabled || D.disabled.value,
|
|
215
|
-
role:
|
|
234
|
+
role: Nt(e),
|
|
216
235
|
tabindex: -1,
|
|
217
|
-
onClick: (r) =>
|
|
218
|
-
onKeydown: (e) =>
|
|
219
|
-
onMousedown: (t) =>
|
|
220
|
-
onPointerenter: (e) =>
|
|
221
|
-
onPointerleave: (e) =>
|
|
222
|
-
}, a, { "aria-describedby":
|
|
236
|
+
onClick: (r) => Xn(e, t, n, r),
|
|
237
|
+
onKeydown: (e) => Zn(t, n, e),
|
|
238
|
+
onMousedown: (t) => Yn(e, t),
|
|
239
|
+
onPointerenter: (e) => Gn(t, n, e),
|
|
240
|
+
onPointerleave: (e) => qn(t, e)
|
|
241
|
+
}, a, { "aria-describedby": en(e, t, n, a) });
|
|
223
242
|
};
|
|
224
|
-
function
|
|
243
|
+
function Vt(e, t, n, r) {
|
|
225
244
|
return D.passthrough.part(e, {
|
|
226
245
|
selected: n,
|
|
227
246
|
disabled: t.disabled || D.disabled.value || void 0,
|
|
228
247
|
activeLink: !!r?.activeLink,
|
|
229
248
|
exactActiveLink: !!r?.exactActiveLink
|
|
230
|
-
},
|
|
249
|
+
}, Wt(t), t.variant ?? "default");
|
|
231
250
|
}
|
|
232
|
-
let
|
|
233
|
-
let { rowKey: t, domKey: n, keyless: r,
|
|
251
|
+
let Ht = (e) => D.passthrough.part("submenu", {}, Wt(e), e.variant ?? "default"), Ut = (e, t) => t.placeholder === "failed" && !!e.id && D.isTopLevelPipeline(e.id), R = (e) => e.placeholder === "loading" ? D.slots.loading : e.placeholder === "empty" ? D.slots.empty : void 0, Wt = (e) => {
|
|
252
|
+
let { rowKey: t, domKey: n, keyless: r, groupByValue: i, ...a } = e;
|
|
234
253
|
return a;
|
|
235
|
-
},
|
|
254
|
+
}, Gt = (e) => ({
|
|
236
255
|
id: e.id,
|
|
237
256
|
label: e.label,
|
|
238
257
|
meta: e.meta,
|
|
239
258
|
multiple: e.multiple,
|
|
240
259
|
selectable: e.selectable
|
|
241
|
-
}),
|
|
260
|
+
}), Kt = (e, t, n, r, i) => ({
|
|
242
261
|
disabled: t.disabled || D.disabled.value,
|
|
243
|
-
group:
|
|
262
|
+
group: Gt(e),
|
|
244
263
|
groupTitle: !1,
|
|
245
264
|
index: n,
|
|
246
|
-
item:
|
|
247
|
-
level:
|
|
265
|
+
item: Wt(t),
|
|
266
|
+
level: rt.value,
|
|
248
267
|
selected: r,
|
|
249
268
|
loading: D.isItemLoading(t.rowKey),
|
|
250
269
|
open: D.open.value,
|
|
@@ -253,409 +272,440 @@ var Ne = {
|
|
|
253
272
|
description: t.description,
|
|
254
273
|
activeLink: !!i?.activeLink,
|
|
255
274
|
exactActiveLink: !!i?.exactActiveLink
|
|
256
|
-
}),
|
|
257
|
-
if (
|
|
258
|
-
|
|
259
|
-
return D.slots[t ? `${n}:${t}` : n];
|
|
260
|
-
}, L = (e) => !e.hideLabel && (!!e.label || !!e["prepend:icon"] || !!e["append:icon"] || !!I(e) || !!I(e, "prepend") || !!I(e, "append")), zt = (e) => !e.id || !e.selectable || !e.multiple ? [] : D.selectedChipsFor(e.id), R = ae().id, Bt = (e) => `${R.value}_group-title_${e}`, Vt = (e, t) => `${R.value}_section-title_${e}_${c(t) || "none"}`, Ht = (e) => `${R.value}_row-text_${e}`, Ut = (e) => `${R.value}_row-description_${e}`, Wt = (e, t) => !!t.description && !Ct(e, t), Gt = (e, t, n, r) => Wt(e, t) && !r["aria-label"] && !r["aria-labelledby"] ? Ht(n) : r["aria-labelledby"], Kt = (e, t, n, r) => {
|
|
275
|
+
}), z = (e, t = "label") => {
|
|
276
|
+
if (e.id) return D.slots[`${s(e.id)}:${t}`];
|
|
277
|
+
}, B = (e) => !e.hideLabel && (!!e.label || !!e["prepend:icon"] || !!e["append:icon"] || !!z(e) || !!z(e, "prepend") || !!z(e, "append")), qt = (e) => !e.id || !e.selectable || !e.multiple ? [] : D.selectedChipsFor(e.id), V = oe().id, Jt = (e) => `${V.value}_group-title_${e}`, Yt = (e, t) => `${V.value}_group-by-title_${e}_${s(t) || "none"}`, Xt = (e) => `${V.value}_row-text_${e}`, Zt = (e) => `${V.value}_row-description_${e}`, Qt = (e, t) => !!t.description && !kt(e, t), $t = (e, t, n, r) => Qt(e, t) && !r["aria-label"] && !r["aria-labelledby"] ? Xt(n) : r["aria-labelledby"], en = (e, t, n, r) => {
|
|
261
278
|
let i = r["aria-describedby"];
|
|
262
|
-
return
|
|
263
|
-
},
|
|
279
|
+
return Qt(e, t) ? [i, Zt(n)].filter(Boolean).join(" ") : i;
|
|
280
|
+
}, tn = u(() => ge(A.value)), nn = (e) => !!e.items && ge(wt(e.items)), rn = (e) => `submenu_${D.rootId}_${e.domKey}`, an = (e) => tn.value ? "menu" : B(e) ? "group" : "none", on = (e, t) => B(e) ? Jt(t) : void 0, sn = (e, t) => ({
|
|
264
281
|
disabled: D.disabled.value,
|
|
265
|
-
group:
|
|
282
|
+
group: Gt(e),
|
|
266
283
|
groupTitle: !0,
|
|
267
284
|
index: t,
|
|
268
285
|
item: e,
|
|
269
|
-
level:
|
|
286
|
+
level: rt.value,
|
|
270
287
|
selected: !1,
|
|
271
288
|
loading: !1,
|
|
272
289
|
open: D.open.value,
|
|
273
290
|
placement: D.placement.value,
|
|
274
291
|
label: e.label
|
|
275
|
-
}),
|
|
292
|
+
}), cn = (e) => e.key === "Escape" || e.key === "Esc", ln = (t) => {
|
|
276
293
|
let { key: n, currentTarget: r } = t;
|
|
277
294
|
return n !== "ArrowLeft" && n !== "ArrowRight" || !(r instanceof Element) || !e(r) ? n : n === "ArrowLeft" ? "ArrowRight" : "ArrowLeft";
|
|
278
|
-
},
|
|
279
|
-
let n =
|
|
280
|
-
n ?
|
|
281
|
-
},
|
|
282
|
-
let n =
|
|
283
|
-
n instanceof HTMLElement ?
|
|
284
|
-
},
|
|
295
|
+
}, H = b({}), un = (e, t) => {
|
|
296
|
+
let n = ne(t);
|
|
297
|
+
n ? H.value[e] = n : delete H.value[e];
|
|
298
|
+
}, dn = b({}), fn = (e, t) => {
|
|
299
|
+
let n = ne(t);
|
|
300
|
+
n instanceof HTMLElement ? dn.value[e] = n : delete dn.value[e];
|
|
301
|
+
}, U = () => {
|
|
285
302
|
let e = [], t = 0;
|
|
286
|
-
for (let n of
|
|
287
|
-
n.onClick &&
|
|
303
|
+
for (let n of A.value) {
|
|
304
|
+
n.onClick && B(n) && e.push(t - .5);
|
|
288
305
|
for (let r of n.items) r.disabled || D.disabled.value || e.push(t), t++;
|
|
289
306
|
}
|
|
290
307
|
return e;
|
|
291
|
-
},
|
|
308
|
+
}, pn = (e) => {
|
|
292
309
|
let t = 0;
|
|
293
|
-
for (let n = 0; n <
|
|
310
|
+
for (let n = 0; n < A.value.length; n++) {
|
|
294
311
|
if (t - .5 === e) return n;
|
|
295
|
-
t +=
|
|
312
|
+
t += A.value[n].items.length;
|
|
296
313
|
}
|
|
297
314
|
return -1;
|
|
298
|
-
},
|
|
315
|
+
}, W = (e, t) => {
|
|
299
316
|
if (e == null) return;
|
|
300
|
-
let n = Number.isInteger(e) ?
|
|
301
|
-
t === void 0 ? n?.focus() : t ?
|
|
302
|
-
},
|
|
303
|
-
|
|
317
|
+
let n = Number.isInteger(e) ? H.value[e] : dn.value[pn(e)];
|
|
318
|
+
t === void 0 ? n?.focus() : t ? Ce(n) : Se(n), t !== void 0 && n && mn(n);
|
|
319
|
+
}, mn = (e) => {
|
|
320
|
+
let t = e.closest(".bb-dropdown__group-section")?.querySelector(":scope > .bb-dropdown__group-header");
|
|
321
|
+
if (!t) return;
|
|
322
|
+
let n = t.parentElement;
|
|
323
|
+
for (; n && n.scrollHeight <= n.clientHeight;) n = n.parentElement;
|
|
324
|
+
if (n) for (let r = 0; r < 3; r++) {
|
|
325
|
+
let r = t.getBoundingClientRect().bottom - e.getBoundingClientRect().top;
|
|
326
|
+
if (r <= 0) return;
|
|
327
|
+
n.scrollTop -= r;
|
|
328
|
+
}
|
|
329
|
+
}, hn = (e, t) => {
|
|
330
|
+
t.type === "input" && t.isComposing || D.setQuery(e, t.target.value);
|
|
331
|
+
}, gn = () => Object.values(I.value).some((e) => e === document.activeElement);
|
|
332
|
+
se({
|
|
304
333
|
active: O,
|
|
305
|
-
input: () => Object.values(
|
|
334
|
+
input: () => Object.values(I.value).find((e) => e === document.activeElement) ?? null
|
|
306
335
|
});
|
|
307
|
-
let
|
|
308
|
-
let e =
|
|
309
|
-
return e ? (
|
|
310
|
-
},
|
|
336
|
+
let _n = () => {
|
|
337
|
+
let e = St.value;
|
|
338
|
+
return e ? (I.value[e]?.focus(), !0) : !1;
|
|
339
|
+
}, vn = (e) => W(U()[0], e), yn = (e) => {
|
|
311
340
|
let t = 0;
|
|
312
|
-
for (let n of
|
|
341
|
+
for (let n of A.value) for (let r of n.items) {
|
|
313
342
|
if (r.rowKey === e) return t;
|
|
314
343
|
t++;
|
|
315
344
|
}
|
|
316
345
|
return -1;
|
|
317
|
-
},
|
|
318
|
-
let n =
|
|
346
|
+
}, G = (e, t) => {
|
|
347
|
+
let n = U();
|
|
319
348
|
if (!n.length) return;
|
|
320
349
|
let r = n.indexOf(e), i = r === -1 ? t > 0 ? 0 : n.length - 1 : (r + t + n.length) % n.length;
|
|
321
|
-
|
|
350
|
+
W(n[i], !0);
|
|
351
|
+
}, K = (e) => {
|
|
352
|
+
(O.value || !_n()) && vn(e);
|
|
322
353
|
}, q = (e) => {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
n === -1 ? q(t) : U(n, t);
|
|
330
|
-
}, sn = (e) => {
|
|
354
|
+
let t = U();
|
|
355
|
+
W(t[t.length - 1], e);
|
|
356
|
+
}, bn = (e, t) => {
|
|
357
|
+
let n = yn(e);
|
|
358
|
+
n === -1 ? K(t) : W(n, t);
|
|
359
|
+
}, xn = (e) => {
|
|
331
360
|
let t = 0;
|
|
332
|
-
for (let n of
|
|
361
|
+
for (let n of A.value) for (let r of n.items) {
|
|
333
362
|
if (t === e) return r;
|
|
334
363
|
t++;
|
|
335
364
|
}
|
|
336
|
-
},
|
|
337
|
-
candidates: () =>
|
|
338
|
-
getTokens: (e) => [
|
|
365
|
+
}, Sn = le(), Cn = fe({
|
|
366
|
+
candidates: () => U().filter(Number.isInteger),
|
|
367
|
+
getTokens: (e) => [de(xn(e)?.label ?? "", Sn.locale)],
|
|
339
368
|
getCurrent: () => {
|
|
340
|
-
let e = Object.entries(
|
|
369
|
+
let e = Object.entries(H.value).find(([, e]) => e === document.activeElement);
|
|
341
370
|
return e ? Number(e[0]) : void 0;
|
|
342
371
|
},
|
|
343
|
-
onMatch: (e) =>
|
|
344
|
-
locale: () =>
|
|
345
|
-
}),
|
|
346
|
-
|
|
347
|
-
},
|
|
348
|
-
ArrowDown: () =>
|
|
349
|
-
ArrowUp: () =>
|
|
350
|
-
Down: () =>
|
|
372
|
+
onMatch: (e) => W(e, !0),
|
|
373
|
+
locale: () => Sn.locale
|
|
374
|
+
}), wn = (e) => {
|
|
375
|
+
ue(e) && Cn.onKeydown(e);
|
|
376
|
+
}, Tn = {
|
|
377
|
+
ArrowDown: () => vn(!0),
|
|
378
|
+
ArrowUp: () => q(!0),
|
|
379
|
+
Down: () => vn(!0),
|
|
351
380
|
Esc: () => D.close(),
|
|
352
381
|
Escape: () => D.close(),
|
|
353
|
-
Up: () =>
|
|
354
|
-
},
|
|
355
|
-
if (o(e) || E.level > 0 &&
|
|
356
|
-
let t =
|
|
382
|
+
Up: () => q(!0)
|
|
383
|
+
}, En = (e) => {
|
|
384
|
+
if (o(e) || E.level > 0 && cn(e)) return;
|
|
385
|
+
let t = Tn[e.key];
|
|
357
386
|
t && (e.stopPropagation(), e.preventDefault(), t());
|
|
358
387
|
};
|
|
359
|
-
|
|
360
|
-
E.level === 0 &&
|
|
388
|
+
v(() => {
|
|
389
|
+
E.level === 0 && St.value && !O.value && De(() => _n());
|
|
361
390
|
});
|
|
362
|
-
let
|
|
363
|
-
w(
|
|
364
|
-
t != null && D.open.value &&
|
|
365
|
-
|
|
366
|
-
},
|
|
391
|
+
let J = b(null), Dn = b({}), Y, X, On = 0, kn = b(null), An;
|
|
392
|
+
w(J, (e, t) => {
|
|
393
|
+
t != null && D.open.value && Ln(t) && W(yn(t)), clearTimeout(An), kn.value = t ?? null, t != null && (An = setTimeout(() => {
|
|
394
|
+
kn.value = null;
|
|
395
|
+
}, Qe));
|
|
367
396
|
});
|
|
368
|
-
let
|
|
369
|
-
let t = Object.values(
|
|
397
|
+
let jn = (e) => J.value !== e && kn.value !== e, Mn = b(0), Nn = b("right-start"), Pn = () => {
|
|
398
|
+
let t = Object.values(H.value)[0], n = t?.closest(".bb-dropdown");
|
|
370
399
|
if (!t || !n) return;
|
|
371
400
|
let r = e(t);
|
|
372
|
-
|
|
401
|
+
Nn.value = r ? "left-start" : "right-start";
|
|
373
402
|
let i = n.getBoundingClientRect(), a = t.getBoundingClientRect();
|
|
374
|
-
|
|
375
|
-
},
|
|
376
|
-
t instanceof HTMLElement ?
|
|
377
|
-
},
|
|
378
|
-
|
|
379
|
-
},
|
|
380
|
-
t ?
|
|
381
|
-
},
|
|
382
|
-
|
|
383
|
-
clearTimeout(
|
|
403
|
+
Mn.value = Math.max(0, r ? a.left - i.left : i.right - a.right);
|
|
404
|
+
}, Fn = {}, In = (e, t) => {
|
|
405
|
+
t instanceof HTMLElement ? Fn[e] = t : delete Fn[e];
|
|
406
|
+
}, Ln = (e) => !!Fn[e]?.contains(document.activeElement), Rn = (e, t) => {
|
|
407
|
+
cn(t) && !t.defaultPrevented && !o(t) && D.ownsEscape() && (t.preventDefault(), t.stopPropagation(), Wn(e));
|
|
408
|
+
}, zn = (e, t) => {
|
|
409
|
+
t ? Dn.value[e] = t : delete Dn.value[e];
|
|
410
|
+
}, Z = () => clearTimeout(Y), Q = () => clearTimeout(X);
|
|
411
|
+
Ae(() => {
|
|
412
|
+
clearTimeout(X), clearTimeout(Y), clearTimeout(An);
|
|
384
413
|
});
|
|
385
|
-
let
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
},
|
|
389
|
-
},
|
|
414
|
+
let Bn = (e) => {
|
|
415
|
+
Q(), clearTimeout(Y), Y = setTimeout(() => {
|
|
416
|
+
J.value === e && (J.value = null);
|
|
417
|
+
}, Xe);
|
|
418
|
+
}, Vn = (e) => {
|
|
390
419
|
let t = e.trim();
|
|
391
420
|
return t ? t.endsWith("ms") ? Number.parseFloat(t) || 0 : t.endsWith("s") ? (Number.parseFloat(t) || 0) * 1e3 : Number.parseFloat(t) || 0 : 0;
|
|
392
|
-
},
|
|
393
|
-
let t =
|
|
421
|
+
}, Hn = (e) => {
|
|
422
|
+
let t = H.value[e];
|
|
394
423
|
if (!t) return 0;
|
|
395
424
|
let n = t.closest(".bb-common-popover");
|
|
396
425
|
if (!n) return 0;
|
|
397
|
-
let r = getComputedStyle(n).getPropertyValue("--transition-duration"), i =
|
|
426
|
+
let r = getComputedStyle(n).getPropertyValue("--transition-duration"), i = Vn(r);
|
|
398
427
|
if (!i) return 0;
|
|
399
|
-
let a = performance.now() -
|
|
428
|
+
let a = performance.now() - On;
|
|
400
429
|
return Math.max(0, i - a + 16);
|
|
401
|
-
},
|
|
402
|
-
|
|
430
|
+
}, $ = async (e, t) => {
|
|
431
|
+
Z(), Pn(), J.value = e, t !== void 0 && (await De(), Dn.value[e]?.focusFirst(t));
|
|
403
432
|
};
|
|
404
433
|
w(D.open, (e) => {
|
|
405
|
-
e ?
|
|
434
|
+
e ? On = performance.now() : (Q(), Z(), J.value = null);
|
|
406
435
|
});
|
|
407
|
-
let
|
|
408
|
-
t ?
|
|
409
|
-
},
|
|
410
|
-
|
|
411
|
-
},
|
|
412
|
-
if (n.pointerType !== "mouse" ||
|
|
413
|
-
if (
|
|
414
|
-
|
|
436
|
+
let Un = (e, t) => {
|
|
437
|
+
t ? J.value = e : J.value === e && (J.value = null);
|
|
438
|
+
}, Wn = (e) => {
|
|
439
|
+
J.value = null, De(() => W(e, !0));
|
|
440
|
+
}, Gn = (e, t, n) => {
|
|
441
|
+
if (n.pointerType !== "mouse" || be(n)) return;
|
|
442
|
+
if (Z(), Q(), J.value !== null && J.value === e.rowKey) {
|
|
443
|
+
Ln(e.rowKey) || W(t);
|
|
415
444
|
return;
|
|
416
445
|
}
|
|
417
446
|
let r = () => {
|
|
418
|
-
|
|
447
|
+
W(t), e.items ? $(e.rowKey) : J.value = null;
|
|
419
448
|
};
|
|
420
|
-
if (
|
|
421
|
-
let e =
|
|
422
|
-
e >= 0 && Math.abs(t - e) <= 1 ?
|
|
449
|
+
if (J.value !== null) {
|
|
450
|
+
let e = yn(J.value);
|
|
451
|
+
e >= 0 && Math.abs(t - e) <= 1 ? X = setTimeout(r, Ze) : r();
|
|
423
452
|
return;
|
|
424
453
|
}
|
|
425
|
-
let i = e.items ?
|
|
426
|
-
i ?
|
|
427
|
-
},
|
|
428
|
-
|
|
429
|
-
},
|
|
430
|
-
t.pointerType === "mouse" && e.items &&
|
|
431
|
-
},
|
|
432
|
-
t.pointerType === "mouse" &&
|
|
433
|
-
},
|
|
454
|
+
let i = e.items ? Hn(t) : 0;
|
|
455
|
+
i ? X = setTimeout(r, i) : r();
|
|
456
|
+
}, Kn = () => {
|
|
457
|
+
Z(), Q();
|
|
458
|
+
}, qn = (e, t) => {
|
|
459
|
+
t.pointerType === "mouse" && e.items && Bn(e.rowKey);
|
|
460
|
+
}, Jn = (e, t) => {
|
|
461
|
+
t.pointerType === "mouse" && Bn(e);
|
|
462
|
+
}, Yn = (e, t) => {
|
|
434
463
|
e.searchable && t.preventDefault();
|
|
435
|
-
},
|
|
436
|
-
t.disabled || D.disabled.value || D.isItemLoading(t.rowKey) || (t.items ? (r.stopPropagation(),
|
|
437
|
-
},
|
|
438
|
-
switch (
|
|
464
|
+
}, Xn = (e, t, n, r) => {
|
|
465
|
+
t.disabled || D.disabled.value || D.isItemLoading(t.rowKey) || (t.items ? (r.stopPropagation(), Z(), Q(), E.navigate ? E.navigate(t) : $(t.rowKey, r.detail === 0)) : e.selectable && e.id ? (r.stopPropagation(), D.toggleSelect(e, t), D.runItemAction(t, r), gn() || W(n)) : (r.stopPropagation(), D.runItemAction(t, r, { close: !0 })));
|
|
466
|
+
}, Zn = (e, t, n) => {
|
|
467
|
+
switch (ln(n)) {
|
|
439
468
|
case "ArrowDown":
|
|
440
|
-
n.preventDefault(),
|
|
469
|
+
n.preventDefault(), Q(), Z(), J.value = null, G(t, 1);
|
|
441
470
|
break;
|
|
442
471
|
case "ArrowUp":
|
|
443
|
-
n.preventDefault(),
|
|
472
|
+
n.preventDefault(), Q(), Z(), J.value = null, G(t, -1);
|
|
444
473
|
break;
|
|
445
474
|
case "Home":
|
|
446
|
-
n.preventDefault(),
|
|
475
|
+
n.preventDefault(), K(!0);
|
|
447
476
|
break;
|
|
448
477
|
case "End":
|
|
449
|
-
n.preventDefault(),
|
|
478
|
+
n.preventDefault(), q(!0);
|
|
450
479
|
break;
|
|
451
480
|
case "ArrowRight":
|
|
452
|
-
e.items && (n.preventDefault(), n.stopPropagation(), E.navigate ? E.navigate(e) :
|
|
481
|
+
e.items && (n.preventDefault(), n.stopPropagation(), E.navigate ? E.navigate(e) : $(e.rowKey, !0));
|
|
453
482
|
break;
|
|
454
483
|
case "ArrowLeft":
|
|
455
|
-
E.back ? (n.preventDefault(), n.stopPropagation(), E.back()) : E.level > 0 && (n.preventDefault(), n.stopPropagation(),
|
|
484
|
+
E.back ? (n.preventDefault(), n.stopPropagation(), E.back()) : E.level > 0 && (n.preventDefault(), n.stopPropagation(), tt("close-level"));
|
|
456
485
|
break;
|
|
457
|
-
default:
|
|
486
|
+
default: wn(n);
|
|
458
487
|
}
|
|
459
|
-
},
|
|
460
|
-
let n =
|
|
461
|
-
switch (
|
|
488
|
+
}, Qn = (e, t) => {
|
|
489
|
+
let n = L(e) - .5;
|
|
490
|
+
switch (ln(t)) {
|
|
462
491
|
case "ArrowDown":
|
|
463
|
-
t.preventDefault(),
|
|
492
|
+
t.preventDefault(), G(n, 1);
|
|
464
493
|
break;
|
|
465
494
|
case "ArrowUp":
|
|
466
|
-
t.preventDefault(),
|
|
495
|
+
t.preventDefault(), G(n, -1);
|
|
467
496
|
break;
|
|
468
497
|
case "Home":
|
|
469
|
-
t.preventDefault(),
|
|
498
|
+
t.preventDefault(), K(!0);
|
|
470
499
|
break;
|
|
471
500
|
case "End":
|
|
472
|
-
t.preventDefault(),
|
|
501
|
+
t.preventDefault(), q(!0);
|
|
473
502
|
break;
|
|
474
503
|
case "ArrowLeft":
|
|
475
|
-
E.back ? (t.preventDefault(), t.stopPropagation(), E.back()) : E.level > 0 && (t.preventDefault(), t.stopPropagation(),
|
|
504
|
+
E.back ? (t.preventDefault(), t.stopPropagation(), E.back()) : E.level > 0 && (t.preventDefault(), t.stopPropagation(), tt("close-level"));
|
|
476
505
|
break;
|
|
477
|
-
default:
|
|
506
|
+
default: wn(t);
|
|
478
507
|
}
|
|
479
|
-
},
|
|
508
|
+
}, $n = {
|
|
480
509
|
slots: D.slots,
|
|
481
|
-
setItemEl:
|
|
482
|
-
itemAttrs:
|
|
483
|
-
rowPart:
|
|
484
|
-
slotProps:
|
|
485
|
-
rowSlot:
|
|
486
|
-
itemSlot:
|
|
487
|
-
groupRowSlot:
|
|
488
|
-
rowTextId:
|
|
489
|
-
rowDescriptionId:
|
|
510
|
+
setItemEl: un,
|
|
511
|
+
itemAttrs: Bt,
|
|
512
|
+
rowPart: Vt,
|
|
513
|
+
slotProps: Kt,
|
|
514
|
+
rowSlot: kt,
|
|
515
|
+
itemSlot: Ot,
|
|
516
|
+
groupRowSlot: At,
|
|
517
|
+
rowTextId: Xt,
|
|
518
|
+
rowDescriptionId: Zt
|
|
490
519
|
};
|
|
491
|
-
return
|
|
492
|
-
focusFirst:
|
|
493
|
-
focusLast:
|
|
494
|
-
focusRow:
|
|
495
|
-
}), (e, t) => (
|
|
496
|
-
e.divider ? (
|
|
497
|
-
|
|
520
|
+
return $e({
|
|
521
|
+
focusFirst: K,
|
|
522
|
+
focusLast: q,
|
|
523
|
+
focusRow: bn
|
|
524
|
+
}), (e, t) => (y(!0), p(l, null, x(A.value, (e, o) => (y(), p(l, { key: e.id ?? o }, [
|
|
525
|
+
e.divider ? (y(), p("hr", Ie)) : f("", !0),
|
|
526
|
+
B(e) ? (y(), p("div", _({
|
|
498
527
|
key: 1,
|
|
499
|
-
id:
|
|
528
|
+
id: Jt(o),
|
|
500
529
|
ref_for: !0,
|
|
501
|
-
ref: (e) =>
|
|
502
|
-
class:
|
|
530
|
+
ref: (e) => fn(o, e),
|
|
531
|
+
class: ["bb-dropdown__group-label", Mt(e)]
|
|
532
|
+
}, { ref_for: !0 }, C(D).passthrough.groupLabel, {
|
|
503
533
|
role: e.onClick ? "menuitem" : "presentation",
|
|
504
534
|
tabindex: e.onClick ? -1 : void 0,
|
|
505
535
|
onClick: (t) => e.onClick?.(t),
|
|
506
536
|
onKeydown: [
|
|
507
|
-
(t) => e.onClick &&
|
|
508
|
-
|
|
509
|
-
|
|
537
|
+
(t) => e.onClick && Qn(o, t),
|
|
538
|
+
Pe((t) => e.onClick?.(t), ["enter"]),
|
|
539
|
+
Pe(Fe((t) => e.onClick?.(t), ["prevent"]), ["space"])
|
|
510
540
|
]
|
|
511
|
-
}, [
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
},
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
},
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
},
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
},
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
541
|
+
}), [
|
|
542
|
+
h(C(c), {
|
|
543
|
+
props: sn(e, L(o)),
|
|
544
|
+
slots: [z(e, "prepend"), C(D).slots["item:prepend"]]
|
|
545
|
+
}, {
|
|
546
|
+
default: T(() => [e["prepend:icon"] ? (y(), d(r, {
|
|
547
|
+
key: 0,
|
|
548
|
+
class: "group-label__prepend-icon",
|
|
549
|
+
icon: e["prepend:icon"]
|
|
550
|
+
}, null, 8, ["icon"])) : f("", !0)]),
|
|
551
|
+
_: 2
|
|
552
|
+
}, 1032, ["props", "slots"]),
|
|
553
|
+
h(C(c), {
|
|
554
|
+
props: sn(e, L(o)),
|
|
555
|
+
slots: [z(e)]
|
|
556
|
+
}, {
|
|
557
|
+
default: T(() => [e.label ? (y(), p("span", Re, S(e.label), 1)) : f("", !0)]),
|
|
558
|
+
_: 2
|
|
559
|
+
}, 1032, ["props", "slots"]),
|
|
560
|
+
h(C(c), {
|
|
561
|
+
props: sn(e, L(o)),
|
|
562
|
+
slots: [z(e, "append"), C(D).slots["item:append"]]
|
|
563
|
+
}, {
|
|
564
|
+
default: T(() => [e["append:icon"] ? (y(), d(r, {
|
|
565
|
+
key: 0,
|
|
566
|
+
class: "group-label__append-icon",
|
|
567
|
+
icon: e["append:icon"]
|
|
568
|
+
}, null, 8, ["icon"])) : f("", !0)]),
|
|
569
|
+
_: 2
|
|
570
|
+
}, 1032, ["props", "slots"])
|
|
571
|
+
], 16, Le)) : f("", !0),
|
|
572
|
+
C(O) && qt(e).length ? (y(), p("div", ze, [m("div", Be, [(y(!0), p(l, null, x(qt(e), (r) => (y(), d(n, {
|
|
540
573
|
key: r.key,
|
|
541
574
|
class: "bb-dropdown__sheet-chip",
|
|
542
575
|
clearable: !C(D).disabled.value,
|
|
543
576
|
size: "xl",
|
|
544
577
|
variant: "secondary",
|
|
545
578
|
"onClick:clear": (t) => C(D).deselect(e.id, r.key),
|
|
546
|
-
onMousedown: t[0] ||=
|
|
579
|
+
onMousedown: t[0] ||= Fe(() => {}, ["prevent"])
|
|
547
580
|
}, {
|
|
548
|
-
default: T(() => [
|
|
581
|
+
default: T(() => [Te(S(r.text), 1)]),
|
|
549
582
|
_: 2
|
|
550
583
|
}, 1032, ["clearable", "onClick:clear"]))), 128))])])) : f("", !0),
|
|
551
|
-
e.searchable && e.id ? (
|
|
552
|
-
|
|
584
|
+
e.searchable && e.id ? (y(), p("div", _({
|
|
585
|
+
key: 3,
|
|
586
|
+
class: "bb-dropdown__group-search",
|
|
587
|
+
role: "none"
|
|
588
|
+
}, { ref_for: !0 }, C(D).passthrough.box), [
|
|
589
|
+
h(r, {
|
|
553
590
|
"aria-hidden": "true",
|
|
554
591
|
class: "bb-dropdown__search-icon",
|
|
555
592
|
focusable: "false",
|
|
556
|
-
icon: C(
|
|
593
|
+
icon: C(nt)
|
|
557
594
|
}, null, 8, ["icon"]),
|
|
558
|
-
m("input",
|
|
595
|
+
m("input", _({
|
|
559
596
|
ref_for: !0,
|
|
560
|
-
ref: (t) =>
|
|
561
|
-
"aria-
|
|
597
|
+
ref: (t) => xt(e.id, t),
|
|
598
|
+
"aria-describedby": j(e) ? ct(o) : void 0,
|
|
599
|
+
"aria-label": e.searchPlaceholder || C(it),
|
|
562
600
|
autocomplete: "off",
|
|
563
601
|
class: "bb-dropdown__search-input",
|
|
564
|
-
placeholder: e.searchPlaceholder || C(
|
|
602
|
+
placeholder: e.searchPlaceholder || C(it),
|
|
565
603
|
role: "searchbox",
|
|
566
604
|
type: "text",
|
|
567
605
|
value: C(D).queryFor(e.id)
|
|
568
606
|
}, { ref_for: !0 }, C(D).passthrough.input, {
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
607
|
+
onCompositionend: (t) => hn(e.id, t),
|
|
608
|
+
onInput: (t) => hn(e.id, t),
|
|
609
|
+
onKeydown: En
|
|
610
|
+
}), null, 16, Ve),
|
|
611
|
+
j(e) ? (y(), p("span", {
|
|
612
|
+
key: 0,
|
|
613
|
+
id: ct(o),
|
|
614
|
+
class: "bb-sr-only"
|
|
615
|
+
}, S(st(e)), 9, He)) : f("", !0),
|
|
616
|
+
e.id && C(D).isGroupLoading(e.id) ? (y(), p("div", Ue)) : f("", !0)
|
|
617
|
+
], 16)) : f("", !0),
|
|
574
618
|
m("div", {
|
|
575
|
-
"aria-labelledby":
|
|
576
|
-
class:
|
|
577
|
-
"bb-dropdown__group-items--capped": !!
|
|
619
|
+
"aria-labelledby": on(e, o),
|
|
620
|
+
class: Oe(["bb-dropdown__group-items", {
|
|
621
|
+
"bb-dropdown__group-items--capped": !!Ct(e),
|
|
578
622
|
"bb-dropdown__group-items--loading": !!e.id && C(D).isGroupLoading(e.id)
|
|
579
623
|
}]),
|
|
580
|
-
role:
|
|
581
|
-
style:
|
|
582
|
-
}, [(
|
|
624
|
+
role: an(e),
|
|
625
|
+
style: ke({ maxHeight: Ct(e) })
|
|
626
|
+
}, [(y(!0), p(l, null, x(ht(e), (t) => (y(), d(M, _({
|
|
583
627
|
key: t.key,
|
|
584
|
-
titled:
|
|
585
|
-
}, { ref_for: !0 }, t.title ? {
|
|
586
|
-
class: "bb-
|
|
628
|
+
titled: t.title !== void 0
|
|
629
|
+
}, { ref_for: !0 }, t.title === void 0 ? {} : {
|
|
630
|
+
class: "bb-dropdown__group-section",
|
|
587
631
|
role: "group",
|
|
588
|
-
"aria-labelledby":
|
|
589
|
-
}
|
|
590
|
-
default: T(() => [t.title ? (
|
|
632
|
+
"aria-labelledby": Yt(o, t.key)
|
|
633
|
+
}), {
|
|
634
|
+
default: T(() => [t.title === void 0 ? f("", !0) : (y(), p("div", _({
|
|
591
635
|
key: 0,
|
|
592
|
-
id:
|
|
593
|
-
class: "bb-dropdown__group-
|
|
636
|
+
id: Yt(o, t.key),
|
|
637
|
+
class: "bb-dropdown__group-header",
|
|
594
638
|
role: "presentation"
|
|
595
|
-
},
|
|
596
|
-
|
|
639
|
+
}, { ref_for: !0 }, C(D).passthrough.groupHeader), [h(C(c), {
|
|
640
|
+
props: _t(t),
|
|
641
|
+
slots: gt(e)
|
|
642
|
+
}, {
|
|
643
|
+
default: T(() => [m("span", Ke, S(t.title), 1)]),
|
|
644
|
+
_: 2
|
|
645
|
+
}, 1032, ["props", "slots"])], 16, Ge)), (y(!0), p(l, null, x(t.items, (n, r) => (y(), p(l, { key: n.rowKey }, [Ut(e, n) ? (y(), p(l, { key: 0 }, [], 64)) : n.placeholder ? (y(), p("div", {
|
|
646
|
+
key: 1,
|
|
597
647
|
ref_for: !0,
|
|
598
|
-
ref: (e) =>
|
|
599
|
-
class:
|
|
648
|
+
ref: (e) => yt(o, e),
|
|
649
|
+
class: Oe(["bb-dropdown__placeholder", `bb-dropdown__placeholder--${n.placeholder}`]),
|
|
600
650
|
role: "presentation"
|
|
601
|
-
}, [
|
|
651
|
+
}, [R(n) ? (y(), d(Me(R(n)), _({
|
|
602
652
|
key: 0,
|
|
603
653
|
ref_for: !0
|
|
604
654
|
}, {
|
|
605
655
|
groupId: e.id,
|
|
606
656
|
query: e.id ? C(D).queryFor(e.id) : "",
|
|
607
657
|
text: n.label
|
|
608
|
-
}), null, 16)) : (
|
|
658
|
+
}), null, 16)) : (y(), p(l, { key: 1 }, [n.placeholder === "failed" ? (y(), d(i, {
|
|
609
659
|
key: 0,
|
|
610
660
|
class: "bb-dropdown__placeholder-icon"
|
|
611
|
-
})) : f("", !0), m("span",
|
|
612
|
-
group:
|
|
613
|
-
index:
|
|
661
|
+
})) : f("", !0), m("span", qe, S(n.label), 1)], 64))], 2)) : (y(), p(l, { key: 2 }, [h(te, {
|
|
662
|
+
group: Lt(e),
|
|
663
|
+
index: L(o) + t.start + r,
|
|
614
664
|
item: n,
|
|
615
|
-
row:
|
|
616
|
-
selected: !!e.selectable &&
|
|
665
|
+
row: $n,
|
|
666
|
+
selected: !!e.selectable && Pt(e, n)
|
|
617
667
|
}, null, 8, [
|
|
618
668
|
"group",
|
|
619
669
|
"index",
|
|
620
670
|
"item",
|
|
621
671
|
"selected"
|
|
622
|
-
]), n.items && !
|
|
672
|
+
]), n.items && !g.navigate ? (y(), d(a, {
|
|
623
673
|
key: 0,
|
|
624
|
-
anchor:
|
|
625
|
-
"bubble-attrs":
|
|
674
|
+
anchor: H.value[L(o) + t.start + r],
|
|
675
|
+
"bubble-attrs": Ht(n),
|
|
626
676
|
class: "bb-dropdown bb-dropdown--submenu",
|
|
627
677
|
"hide-arrow": "",
|
|
628
|
-
"model-value":
|
|
629
|
-
offset:
|
|
630
|
-
placement:
|
|
678
|
+
"model-value": J.value === n.rowKey,
|
|
679
|
+
offset: Mn.value,
|
|
680
|
+
placement: Nn.value,
|
|
631
681
|
role: "none",
|
|
632
|
-
"transition-duration":
|
|
633
|
-
"onUpdate:modelValue": (e) =>
|
|
682
|
+
"transition-duration": Qe,
|
|
683
|
+
"onUpdate:modelValue": (e) => Un(n.rowKey, e)
|
|
634
684
|
}, {
|
|
635
685
|
default: T(({ availableHeight: e }) => [m("span", {
|
|
636
|
-
id:
|
|
686
|
+
id: rn(n),
|
|
637
687
|
ref_for: !0,
|
|
638
|
-
ref: (e) =>
|
|
688
|
+
ref: (e) => In(n.rowKey, e),
|
|
639
689
|
"aria-label": n.label,
|
|
640
690
|
class: "bb-dropdown__list",
|
|
641
691
|
"data-bb-dropdown-surface": C(D).rootId,
|
|
642
|
-
inert:
|
|
643
|
-
role:
|
|
644
|
-
style:
|
|
645
|
-
onKeydown: (e) =>
|
|
646
|
-
onPointerenter:
|
|
647
|
-
onPointerleave: (e) =>
|
|
648
|
-
}, [
|
|
692
|
+
inert: jn(n.rowKey),
|
|
693
|
+
role: nn(n) ? "dialog" : "menu",
|
|
694
|
+
style: ke({ "--max-h": e == null ? void 0 : `${e}px` }),
|
|
695
|
+
onKeydown: (e) => Rn(L(o) + t.start + r, e),
|
|
696
|
+
onPointerenter: Kn,
|
|
697
|
+
onPointerleave: (e) => Jn(n.rowKey, e)
|
|
698
|
+
}, [h(ee, {
|
|
649
699
|
ref_for: !0,
|
|
650
|
-
ref: (e) =>
|
|
651
|
-
groups:
|
|
652
|
-
level:
|
|
653
|
-
onCloseLevel: (e) =>
|
|
700
|
+
ref: (e) => zn(n.rowKey, e),
|
|
701
|
+
groups: wt(n.items),
|
|
702
|
+
level: g.level + 1,
|
|
703
|
+
onCloseLevel: (e) => Wn(L(o) + t.start + r)
|
|
654
704
|
}, null, 8, [
|
|
655
705
|
"groups",
|
|
656
706
|
"level",
|
|
657
707
|
"onCloseLevel"
|
|
658
|
-
])], 44,
|
|
708
|
+
])], 44, Je)]),
|
|
659
709
|
_: 2
|
|
660
710
|
}, 1032, [
|
|
661
711
|
"anchor",
|
|
@@ -666,8 +716,8 @@ var Ne = {
|
|
|
666
716
|
"onUpdate:modelValue"
|
|
667
717
|
])) : f("", !0)], 64))], 64))), 128))]),
|
|
668
718
|
_: 2
|
|
669
|
-
}, 1040, ["titled"]))), 128))], 14,
|
|
719
|
+
}, 1040, ["titled"]))), 128))], 14, We)
|
|
670
720
|
], 64))), 128));
|
|
671
721
|
}
|
|
672
722
|
});
|
|
673
|
-
export {
|
|
723
|
+
export { $e as default };
|