bitboss-ui 3.0.0-beta.71 → 3.0.0-beta.73
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 +2 -2
- package/bin/cli.mjs +9 -3
- package/dist/ai/BbAccordion.md +38 -19
- package/dist/ai/BbBadge.md +25 -22
- package/dist/ai/BbBreadcrumbs.md +1 -1
- package/dist/ai/BbButton.md +32 -27
- package/dist/ai/BbCalendar.md +1 -0
- package/dist/ai/BbCarousel.md +6 -4
- package/dist/ai/BbCheckboxGroup.md +2 -1
- package/dist/ai/BbColorInput.md +1 -1
- package/dist/ai/BbConfirm.md +65 -81
- package/dist/ai/BbConfirmPortal.md +2 -2
- package/dist/ai/BbDatePicker.md +1 -6
- package/dist/ai/BbDatePickerInput.md +2 -2
- package/dist/ai/BbDialog.md +233 -164
- package/dist/ai/BbDropdown.md +52 -16
- package/dist/ai/BbDropdownButton.md +11 -12
- package/dist/ai/BbDropzone.md +12 -8
- package/dist/ai/BbForm.md +100 -13
- package/dist/ai/BbHost.md +2 -2
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbIcon.md +1 -1
- package/dist/ai/BbIndicator.md +17 -15
- package/dist/ai/BbNumberInput.md +7 -5
- package/dist/ai/BbOffCanvas.md +29 -7
- package/dist/ai/BbPagination.md +2 -2
- package/dist/ai/BbPopover.md +15 -9
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbRadioGroup.md +29 -7
- package/dist/ai/BbRating.md +8 -7
- package/dist/ai/BbSelect.md +29 -8
- package/dist/ai/BbSelectPopover.md +9 -3
- package/dist/ai/BbSlider.md +12 -8
- package/dist/ai/BbSpinner.md +3 -2
- package/dist/ai/BbSwitch.md +3 -3
- package/dist/ai/BbSwitchGroup.md +7 -6
- package/dist/ai/BbTable.md +205 -82
- package/dist/ai/BbTabs.md +29 -4
- package/dist/ai/BbTag.md +1 -1
- package/dist/ai/BbTextInput.md +7 -5
- package/dist/ai/BbTextarea.md +4 -3
- package/dist/ai/BbTimePickerInput.md +1 -1
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTooltip.md +22 -17
- package/dist/ai/BbTree.md +49 -24
- package/dist/ai/CommonFieldInput.md +1 -1
- package/dist/ai/changelog.json +242 -9
- package/dist/ai/components.json +52 -51
- package/dist/ai/composables/useBbDialog.md +5 -8
- package/dist/ai/composables/useBbForm.md +3 -0
- package/dist/ai/composables/useConfirm.md +65 -56
- package/dist/ai/composables/useToast.md +2 -1
- package/dist/ai/guides/agent-contract.md +3 -3
- package/dist/ai/guides/app-layout.md +3 -2
- package/dist/ai/guides/eslint-rules.md +3 -1
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/floating-bottom-panel.md +3 -2
- package/dist/ai/guides/icons-policy.md +7 -5
- package/dist/ai/guides/inertia-helpers.md +35 -30
- package/dist/ai/guides/installation-and-plugin-setup.md +17 -14
- package/dist/ai/guides/migration/adoption-checklist.md +2 -2
- package/dist/ai/guides/migration/components/bb-badge.md +12 -1
- package/dist/ai/guides/migration/components/bb-button.md +24 -0
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +11 -0
- package/dist/ai/guides/migration/components/bb-tabs.md +2 -2
- package/dist/ai/guides/migration/components/bb-toast.md +11 -0
- package/dist/ai/guides/migration/components/use-confirm.md +72 -26
- package/dist/ai/guides/migration/v2-to-v3.md +52 -10
- package/dist/ai/guides/migration/v3-beta-css-classes.md +1 -1
- package/dist/ai/guides/options-items-playbook.md +4 -3
- package/dist/ai/guides/passthrough.md +2 -2
- package/dist/ai/helpers/inertia/manifest.json +28 -15
- package/dist/ai/helpers/inertia/messages.ts +3 -3
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +10 -10
- package/dist/ai/helpers/inertia/usePromiseForm.ts +1 -1
- package/dist/ai/helpers/inertia/usePromiseRouter.ts +7 -2
- package/dist/ai/index.md +3 -3
- package/dist/ai/manifest/common.json +3 -3
- package/dist/ai/manifest/components/BbAccordion.json +8 -5
- package/dist/ai/manifest/components/BbAccordion.tree.json +1 -0
- package/dist/ai/manifest/components/BbBadge.json +8 -7
- package/dist/ai/manifest/components/BbBadge.removed.json +3 -1
- package/dist/ai/manifest/components/BbBadge.tree.json +73 -0
- package/dist/ai/manifest/components/BbBreadcrumbs.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +5 -6
- package/dist/ai/manifest/components/BbButton.removed.json +3 -1
- package/dist/ai/manifest/components/BbButton.tree.json +24 -7
- package/dist/ai/manifest/components/BbCalendar.json +2 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbColorInput.json +1 -1
- package/dist/ai/manifest/components/BbColorInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbConfirm.json +2 -2
- package/dist/ai/manifest/components/BbConfirm.removed.json +9 -0
- package/dist/ai/manifest/components/BbConfirm.tree.json +4 -5
- package/dist/ai/manifest/components/BbConfirmPortal.json +3 -3
- package/dist/ai/manifest/components/BbConfirmPortal.removed.json +7 -0
- package/dist/ai/manifest/components/BbDatePicker.json +2 -1
- package/dist/ai/manifest/components/BbDatePicker.tree.json +0 -6
- package/dist/ai/manifest/components/BbDatePickerInput.json +2 -2
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbDialog.json +6 -1
- package/dist/ai/manifest/components/BbDialog.tree.json +41 -1
- package/dist/ai/manifest/components/BbDropdown.json +9 -8
- package/dist/ai/manifest/components/BbDropdown.tree.json +4 -0
- package/dist/ai/manifest/components/BbDropdownButton.json +8 -9
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +3 -1
- package/dist/ai/manifest/components/BbForm.json +3 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.json +6 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +40 -0
- package/dist/ai/manifest/components/BbPagination.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +4 -3
- package/dist/ai/manifest/components/BbRating.json +2 -2
- package/dist/ai/manifest/components/BbSelect.json +16 -15
- package/dist/ai/manifest/components/BbSelect.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +1 -0
- package/dist/ai/manifest/components/BbSwitch.json +4 -4
- package/dist/ai/manifest/components/BbSwitchGroup.json +7 -7
- package/dist/ai/manifest/components/BbTable.json +15 -14
- package/dist/ai/manifest/components/BbTable.tree.json +2 -0
- package/dist/ai/manifest/components/BbTabs.json +3 -3
- package/dist/ai/manifest/components/BbTabsList.json +1 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +1 -1
- package/dist/ai/manifest/components/BbTag.json +1 -1
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextarea.json +1 -1
- package/dist/ai/manifest/components/BbTextarea.tree.json +1 -1
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbToast.removed.json +2 -1
- package/dist/ai/manifest/components/BbTree.json +2 -2
- package/dist/ai/manifest/components/CommonFieldInput.tree.json +3 -3
- package/dist/ai/manifest/index.json +4 -4
- package/dist/ai/manifest/meta.json +5 -1
- package/dist/ai/manifest/types.advanced.json +9 -9
- package/dist/ai/manifest/types.api.json +6 -5
- package/dist/ai/recipes/inertia/approvals-inbox.md +23 -16
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -3
- package/dist/ai/recipes/inertia/onboarding.md +23 -12
- package/dist/ai/recipes/inertia/ownership-atlas.md +34 -18
- package/dist/ai/recipes/inertia/record-form.md +12 -8
- package/dist/ai/recipes/inertia/records-workspace.md +14 -7
- package/dist/ai/recipes/inertia/settings-workspace.md +75 -60
- package/dist/ai/recipes/inertia/upload-center.md +17 -9
- package/dist/ai/recipes/inertia/wizard-form.md +2 -2
- package/dist/ai/recipes/nuxt/approvals-inbox.md +23 -16
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -3
- package/dist/ai/recipes/nuxt/onboarding.md +5 -4
- package/dist/ai/recipes/nuxt/ownership-atlas.md +34 -18
- package/dist/ai/recipes/nuxt/record-form.md +14 -10
- package/dist/ai/recipes/nuxt/records-workspace.md +14 -7
- package/dist/ai/recipes/nuxt/settings-workspace.md +70 -60
- package/dist/ai/recipes/nuxt/upload-center.md +17 -9
- package/dist/ai/recipes/nuxt/wizard-form.md +4 -4
- package/dist/ai/recipes/vue/approvals-inbox.md +23 -16
- package/dist/ai/recipes/vue/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -3
- package/dist/ai/recipes/vue/onboarding.md +5 -4
- package/dist/ai/recipes/vue/ownership-atlas.md +34 -18
- package/dist/ai/recipes/vue/record-form.md +14 -10
- package/dist/ai/recipes/vue/records-workspace.md +14 -7
- package/dist/ai/recipes/vue/settings-workspace.md +70 -60
- package/dist/ai/recipes/vue/upload-center.md +17 -9
- package/dist/ai/recipes/vue/wizard-form.md +4 -4
- package/dist/ai/source/BbAccordion.md +50 -16
- package/dist/ai/source/BbBadge.md +420 -26
- package/dist/ai/source/BbBadgeButton.md +378 -12
- package/dist/ai/source/BbButton.md +205 -55
- package/dist/ai/source/BbCalendar.md +5 -0
- package/dist/ai/source/BbCheckboxGroup.md +38 -13
- package/dist/ai/source/BbConfigScope.md +19 -2
- package/dist/ai/source/BbConfirm.md +74 -80
- package/dist/ai/source/BbConfirmPortal.md +6 -6
- package/dist/ai/source/BbDatePicker.md +9 -2
- package/dist/ai/source/BbDatePickerInput.md +3 -1
- package/dist/ai/source/BbDialog.md +53 -2
- package/dist/ai/source/BbDropdown.md +350 -98
- package/dist/ai/source/BbDropdownButton.md +20 -12
- package/dist/ai/source/BbDropdownGroup.md +136 -58
- package/dist/ai/source/BbForm.md +152 -11
- package/dist/ai/source/BbOffCanvas.md +53 -2
- package/dist/ai/source/BbPagination.md +1 -1
- package/dist/ai/source/BbRadioGroup.md +72 -10
- package/dist/ai/source/BbRating.md +30 -22
- package/dist/ai/source/BbSelect.md +11 -1
- package/dist/ai/source/BbSelectPopover.md +105 -34
- package/dist/ai/source/BbSwitch.md +23 -8
- package/dist/ai/source/BbSwitchGroup.md +67 -21
- package/dist/ai/source/BbTable.md +359 -48
- package/dist/ai/source/BbTabs.md +6 -0
- package/dist/ai/source/BbTabsList.md +10 -0
- package/dist/ai/source/BbTabsPanels.md +6 -0
- package/dist/ai/source/BbTabsRoot.md +6 -0
- package/dist/ai/source/BbTree.md +14 -4
- package/dist/ai/source/CommonFieldInput.md +2 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +7 -3
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +52 -38
- package/dist/components/BbAccordion/ptKeys.generated.d.ts +20 -0
- package/dist/components/BbAccordion/types.d.ts +21 -7
- package/dist/components/BbAccordion/types.js +1 -1
- package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +65 -42
- package/dist/components/BbBadge/types.d.ts +15 -12
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +79 -73
- package/dist/components/BbButton/types.d.ts +7 -6
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +2 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbCalendar/types.d.ts +5 -0
- package/dist/components/BbCalendar/useCalendarGrid.js +1 -1
- package/dist/components/BbCalendar/useDayGrid.js +1 -1
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +10 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbCheckboxGroup/types.d.ts +2 -2
- package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +71 -132
- package/dist/components/BbConfirm/ptKeys.generated.d.ts +5 -5
- package/dist/components/BbConfirm/types.d.ts +5 -5
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +2 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/components/BbDatePicker/types.d.ts +5 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/components/BbDatePickerInput/types.d.ts +2 -1
- package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +263 -235
- package/dist/components/BbDialog/overlayActions.js +94 -0
- package/dist/components/BbDialog/types.d.ts +24 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +382 -332
- package/dist/components/BbDropdown/dropdownHandle.js +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +58 -48
- package/dist/components/BbDropdown/types.d.ts +107 -48
- package/dist/components/BbDropdown/types.js +2 -2
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +71 -71
- package/dist/components/BbDropdownButton/types.d.ts +2 -4
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -1
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +241 -199
- package/dist/components/BbForm/recognizeValidation.d.ts +9 -0
- package/dist/components/BbForm/recognizeValidation.js +55 -0
- package/dist/components/BbForm/validationError.d.ts +10 -0
- package/dist/components/BbForm/validationError.js +11 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +414 -389
- package/dist/components/BbOffCanvas/sheetAttrs.js +5 -5
- package/dist/components/BbOffCanvas/types.d.ts +24 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +10 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +173 -157
- package/dist/components/BbRadioGroup/types.d.ts +9 -3
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +112 -103
- package/dist/components/BbRating/types.d.ts +3 -2
- package/dist/components/BbSelect/BbSelect.vue.d.ts +9 -8
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/components/BbSelect/types.d.ts +8 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +11 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +513 -502
- package/dist/components/BbSelectPopover/types.d.ts +10 -2
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -0
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +85 -73
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +10 -4
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +171 -152
- package/dist/components/BbSwitchGroup/types.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +36 -25
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1338 -1215
- package/dist/components/BbTable/BbTableDataRow.js +2 -1
- package/dist/components/BbTable/BbTableRowMenu.js +36 -0
- package/dist/components/BbTable/types.d.ts +32 -17
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbTabs/types.d.ts +6 -0
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +1 -1
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +88 -94
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/components/BbTree/types.d.ts +8 -2
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +39 -39
- package/dist/composables/formSubmitLock.js +15 -8
- package/dist/composables/overlayRegistry.d.ts +5 -0
- package/dist/composables/overlayRegistry.js +154 -148
- package/dist/composables/useBbDropdown.d.ts +8 -0
- package/dist/composables/useBbDropdown.js +3 -1
- package/dist/composables/useBbTabs.js +138 -138
- package/dist/composables/useConfirm.d.ts +63 -52
- package/dist/composables/useConfirm.js +22 -18
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +7 -7
- package/dist/directives/bbDropdown.js +21 -14
- package/dist/directives/bbTooltip.d.ts +3 -3
- package/dist/directives/createPopoverDirective.js +57 -35
- package/dist/i18n/locales/ar.json +5 -1
- package/dist/i18n/locales/cs.json +5 -1
- package/dist/i18n/locales/da.json +5 -1
- package/dist/i18n/locales/de-CH.json +5 -1
- package/dist/i18n/locales/de.json +5 -1
- package/dist/i18n/locales/el.json +5 -1
- package/dist/i18n/locales/en-GB.json +5 -1
- package/dist/i18n/locales/en.json +5 -1
- package/dist/i18n/locales/es-MX.json +5 -1
- package/dist/i18n/locales/es.json +5 -1
- package/dist/i18n/locales/fa.json +5 -1
- package/dist/i18n/locales/fi.json +5 -1
- package/dist/i18n/locales/fr.json +5 -1
- package/dist/i18n/locales/he.json +5 -1
- package/dist/i18n/locales/hu.json +5 -1
- package/dist/i18n/locales/it.json +5 -1
- package/dist/i18n/locales/ja.json +5 -1
- package/dist/i18n/locales/ko.json +5 -1
- package/dist/i18n/locales/nb.json +5 -1
- package/dist/i18n/locales/nl.json +5 -1
- package/dist/i18n/locales/pl.json +5 -1
- package/dist/i18n/locales/pt-BR.json +5 -1
- package/dist/i18n/locales/pt-PT.json +5 -1
- package/dist/i18n/locales/ro.json +5 -1
- package/dist/i18n/locales/ru.json +5 -1
- package/dist/i18n/locales/sv.json +5 -1
- package/dist/i18n/locales/tr.json +5 -1
- package/dist/i18n/locales/uk.json +5 -1
- package/dist/i18n/locales/zh-CN.json +5 -1
- package/dist/i18n/locales/zh-HK.json +5 -1
- package/dist/i18n/locales/zh-TW.json +5 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -3
- package/dist/llms-full.txt +1997 -1151
- package/dist/llms-medium.txt +21 -18
- package/dist/llms.txt +2 -2
- package/dist/locale-blueprint.json +5 -1
- package/dist/plugin.js +17 -40
- package/dist/pluginCore.js +30 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +26 -5
- package/dist/types/ActionButton.js +11 -0
- package/dist/types/ConfigDefaults.d.ts +34 -3
- package/dist/types/ConfigDefaults.js +14 -8
- package/dist/types/ItemPath.d.ts +33 -4
- package/dist/types/ptComponentMap.d.ts +1 -1
- package/dist/utilities/functions/clickCount.js +14 -0
- package/dist/utilities/functions/hash.js +90 -3
- package/dist/utilities/functions/isEqual.js +61 -3
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite.js +0 -1
- package/llms.txt +2 -2
- package/package.json +12 -2
- package/scripts/README.md +43 -39
- package/scripts/lib/adoption-checklist.json +2 -2
- package/scripts/lib/eslint-disable.mjs +5 -3
- package/scripts/lib/eslint-plugin.d.ts +2 -0
- package/scripts/lib/eslint-plugin.mjs +213 -1
- package/scripts/lib/helpers-add.mjs +21 -2
- package/scripts/lib/redundant-item-accessor.mjs +4 -1
- package/scripts/lib/release-results.mjs +180 -5
- package/scripts/lib/renamed-item-field.mjs +4 -1
- package/scripts/lib/tab-links.mjs +4 -1
- package/scripts/lib/tree-default-expandable.mjs +53 -0
- package/scripts/lib/validate-bb-markup.mjs +536 -52
|
@@ -4,43 +4,44 @@ import { useId as n } from "../../composables/useId.js";
|
|
|
4
4
|
import { isTopEscapeEntry as r, pushEscapeEntry as i, removeEscapeEntry as a } from "../../utils/overlayEscapeStack.js";
|
|
5
5
|
import { useBbDropdownHost as o } from "../../composables/useBbDropdown.js";
|
|
6
6
|
import { useLogger as s } from "../../composables/useLogger.js";
|
|
7
|
-
import { useMobile as
|
|
8
|
-
import { provideSheetSurface as
|
|
9
|
-
import { useUntil as
|
|
10
|
-
import { useClosingInert as
|
|
11
|
-
import { useConfigDefaults as
|
|
12
|
-
import { wait as
|
|
13
|
-
import {
|
|
14
|
-
import se from "
|
|
15
|
-
import ce from "
|
|
16
|
-
import le from "./
|
|
17
|
-
import ue from "./
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
7
|
+
import { useMobile as ee } from "../../composables/useMobile.js";
|
|
8
|
+
import { provideSheetSurface as te } from "../../composables/useSheetSurface.js";
|
|
9
|
+
import { useUntil as ne } from "../../composables/useUntil.js";
|
|
10
|
+
import { useClosingInert as re } from "../../composables/useClosingInert.js";
|
|
11
|
+
import { useConfigDefaults as ie, useConfigSetting as ae } from "../../composables/useConfigDefaults.js";
|
|
12
|
+
import { wait as c } from "../../utilities/functions/wait.js";
|
|
13
|
+
import { registerDropdownHandle as oe } from "./dropdownHandle.js";
|
|
14
|
+
import { focusQuietly as se } from "../../utils/focusVisibility.js";
|
|
15
|
+
import ce from "../CommonPopover/CommonPopover.vue.js";
|
|
16
|
+
import le from "./BbDropdownList.vue.js";
|
|
17
|
+
import ue from "./AdaptiveDropdown.vue.js";
|
|
18
|
+
import de from "./DropdownPipelineResolver.vue.js";
|
|
19
|
+
import { hash as fe } from "../../utilities/functions/hash.js";
|
|
20
|
+
import { readableValue as pe } from "../../utilities/functions/readableValue.js";
|
|
21
|
+
import { settlesVisible as me } from "../../utilities/functions/settlesVisible.js";
|
|
22
|
+
import { domElement as he, extractDomContainer as ge } from "../../utilities/functions/extractDomContainer.js";
|
|
23
|
+
import { parseWidthString as _e } from "../../utilities/functions/parseWidthString.js";
|
|
24
|
+
import { levelHasSearch as ve, normalizeGroups as ye } from "./normalizeGroups.js";
|
|
25
|
+
import { provideDropdownContext as be } from "./useDropdownContext.js";
|
|
26
|
+
import { provideDropdownGroupRegistry as xe } from "./useDropdownGroupRegistry.js";
|
|
27
|
+
import { BB_DROPDOWN_PT as Se, groupItemsAsArray as l, isGroup as u, isPrimitiveRow as d, isSelectableGroup as Ce } from "./types.js";
|
|
28
|
+
import { usePassthrough as we, variantPt as f } from "../../composables/usePassthrough.js";
|
|
29
|
+
import { withoutClass as Te } from "../../utils/passthrough.js";
|
|
30
|
+
import { transitions as Ee } from "../../utilities/misc/transitions.js";
|
|
31
|
+
import { removedPropsFor as De } from "../../deprecation/removedProps.js";
|
|
32
|
+
import { warnRemovedAttrs as Oe } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
33
|
+
import { Fragment as ke, computed as p, createBlock as Ae, createCommentVNode as m, createElementBlock as h, createElementVNode as je, defineComponent as g, guardReactiveProps as Me, mergeProps as _, normalizeProps as Ne, onBeforeUnmount as Pe, onDeactivated as Fe, onMounted as Ie, openBlock as v, reactive as y, ref as b, renderList as Le, renderSlot as x, toDisplayString as Re, unref as S, useSlots as ze, useTemplateRef as Be, watch as C, withCtx as Ve } from "vue";
|
|
34
|
+
import { useElementSize as He, useIntersectionObserver as Ue } from "@vueuse/core";
|
|
34
35
|
// src/components/BbDropdown/BbDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
35
|
-
var
|
|
36
|
+
var We = [
|
|
36
37
|
"id",
|
|
37
38
|
"aria-labelledby",
|
|
38
39
|
"role"
|
|
39
|
-
],
|
|
40
|
+
], Ge = {
|
|
40
41
|
class: "bb-sr-only",
|
|
41
42
|
role: "status"
|
|
42
|
-
},
|
|
43
|
-
mixins: [
|
|
43
|
+
}, Ke = "bb-dropdown:open", qe = 500, Je = 10, w = /*@__PURE__*/ g({
|
|
44
|
+
mixins: [f(Se)],
|
|
44
45
|
inheritAttrs: !1,
|
|
45
46
|
__name: "BbDropdown",
|
|
46
47
|
props: {
|
|
@@ -121,6 +122,7 @@ var He = [
|
|
|
121
122
|
enforceCoherence: { type: Boolean },
|
|
122
123
|
id: {},
|
|
123
124
|
items: {},
|
|
125
|
+
keepActivator: { type: Boolean },
|
|
124
126
|
loadingText: {},
|
|
125
127
|
emptyText: {},
|
|
126
128
|
failedText: {},
|
|
@@ -129,7 +131,7 @@ var He = [
|
|
|
129
131
|
padding: { default: 10 },
|
|
130
132
|
placement: { default: "bottom" },
|
|
131
133
|
queryDebounceTime: { default: 300 },
|
|
132
|
-
transitionDuration: { default:
|
|
134
|
+
transitionDuration: { default: Ee.fast },
|
|
133
135
|
trigger: { default: "click" },
|
|
134
136
|
width: { default: "auto" }
|
|
135
137
|
},
|
|
@@ -141,44 +143,44 @@ var He = [
|
|
|
141
143
|
"item:selected",
|
|
142
144
|
"item:unselected"
|
|
143
145
|
],
|
|
144
|
-
setup(
|
|
145
|
-
let g =
|
|
146
|
+
setup(f, { emit: Ee }) {
|
|
147
|
+
let g = f, w = Ee, Ye = ae(null, "popoverOffset"), T = we({
|
|
146
148
|
component: "BbDropdown",
|
|
147
149
|
props: g,
|
|
148
|
-
parts:
|
|
149
|
-
states:
|
|
150
|
-
active: { open: () =>
|
|
151
|
-
variant:
|
|
150
|
+
parts: Se.parts,
|
|
151
|
+
states: Se.states,
|
|
152
|
+
active: { open: () => j.value },
|
|
153
|
+
variant: Se.variant
|
|
152
154
|
});
|
|
153
|
-
process.env.NODE_ENV !== "production" &&
|
|
154
|
-
let
|
|
155
|
-
onShow: () =>
|
|
156
|
-
onShown: () =>
|
|
157
|
-
onHide: () =>
|
|
158
|
-
onHidden: () =>
|
|
159
|
-
},
|
|
160
|
-
id:
|
|
161
|
-
"aria-labelledby":
|
|
162
|
-
class: ["bb-dropdown__panel", { "bb-dropdown__panel--reserve-check":
|
|
163
|
-
"data-bb-dropdown-surface":
|
|
164
|
-
inert:
|
|
165
|
-
role:
|
|
155
|
+
process.env.NODE_ENV !== "production" && Oe("BbDropdown", De("BbDropdown"));
|
|
156
|
+
let Xe = s(), Ze = n().id.value, E = g.id ?? `bb_${Ze}`, D = Symbol("bb-dropdown-escape"), O = b(E), k = b(), A = p(() => ge(k.value)), Qe = p(() => g.activator != null), j = b(!1), $e = {
|
|
157
|
+
onShow: () => w("show"),
|
|
158
|
+
onShown: () => w("shown"),
|
|
159
|
+
onHide: () => w("hide"),
|
|
160
|
+
onHidden: () => w("hidden")
|
|
161
|
+
}, et = ne(j, { initialValue: g.eager }), tt = re(j, () => g.transitionDuration), nt = p(() => g.eager || !tt.value), rt = ({ availableHeight: e }) => _({
|
|
162
|
+
id: z.value ? `dialog_${E}` : void 0,
|
|
163
|
+
"aria-labelledby": z.value ? O.value : void 0,
|
|
164
|
+
class: ["bb-dropdown__panel", { "bb-dropdown__panel--reserve-check": Cn.value }],
|
|
165
|
+
"data-bb-dropdown-surface": E,
|
|
166
|
+
inert: tt.value,
|
|
167
|
+
role: z.value ? "dialog" : void 0,
|
|
166
168
|
style: {
|
|
167
|
-
"--w":
|
|
169
|
+
"--w": Tn.value,
|
|
168
170
|
"--max-h": e == null ? void 0 : `${e}px`
|
|
169
171
|
}
|
|
170
|
-
},
|
|
172
|
+
}, T.panel), it = y({}), at = y(/* @__PURE__ */ new Set()), { isMobile: ot } = ee(), st = ie("BbDropdown", g, {
|
|
171
173
|
adaptive: !0,
|
|
172
174
|
compact: !1
|
|
173
|
-
}),
|
|
174
|
-
|
|
175
|
-
() =>
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
}), ct = () => st.adaptive && ot.value ? "canvas" : "popover", lt = b(ct()), M = p(() => lt.value === "canvas");
|
|
176
|
+
C([
|
|
177
|
+
() => st.adaptive,
|
|
178
|
+
ot,
|
|
179
|
+
j
|
|
178
180
|
], () => {
|
|
179
|
-
|
|
180
|
-
}),
|
|
181
|
-
let
|
|
181
|
+
j.value || (lt.value = ct());
|
|
182
|
+
}), te(M);
|
|
183
|
+
let ut = p(() => ({
|
|
182
184
|
side: "bottom",
|
|
183
185
|
size: "auto",
|
|
184
186
|
draggable: !0,
|
|
@@ -186,11 +188,11 @@ var He = [
|
|
|
186
188
|
transitionDuration: g.transitionDuration,
|
|
187
189
|
hideClose: !0,
|
|
188
190
|
...g.offCanvasProps
|
|
189
|
-
})),
|
|
191
|
+
})), dt = p(() => {
|
|
190
192
|
let e = g.trigger;
|
|
191
193
|
return new Set(Array.isArray(e) ? e : [e]);
|
|
192
|
-
}),
|
|
193
|
-
let n =
|
|
194
|
+
}), ft = (e, t) => {
|
|
195
|
+
let n = A.value, r = n?.getBoundingClientRect(), i = r ? e - r.left : 0, a = r ? t - r.top : 0;
|
|
194
196
|
return {
|
|
195
197
|
contextElement: n ?? void 0,
|
|
196
198
|
getBoundingClientRect: () => {
|
|
@@ -210,25 +212,26 @@ var He = [
|
|
|
210
212
|
};
|
|
211
213
|
}
|
|
212
214
|
};
|
|
213
|
-
}, N = b(null),
|
|
214
|
-
let t =
|
|
215
|
-
t && (
|
|
216
|
-
},
|
|
217
|
-
if (
|
|
218
|
-
|
|
215
|
+
}, N = b(null), pt = p(() => g.anchor ?? k.value), mt = p(() => ge(pt.value)), ht = p(() => g.placement === "cursor" && N.value ? N.value : pt.value), gt = (e) => {
|
|
216
|
+
let t = ge(e);
|
|
217
|
+
t && (k.value = t);
|
|
218
|
+
}, _t = !1, { resume: vt, pause: yt } = Ue(() => he(A.value), async ([{ intersectionRatio: e }]) => {
|
|
219
|
+
if (_t) {
|
|
220
|
+
_t = !1;
|
|
219
221
|
return;
|
|
220
222
|
}
|
|
221
|
-
if (e >= .99 || !
|
|
222
|
-
let t =
|
|
223
|
-
t && await
|
|
223
|
+
if (e >= .99 || !j.value) return;
|
|
224
|
+
let t = A.value;
|
|
225
|
+
t && await me(t) || j.value && await $();
|
|
224
226
|
}, {
|
|
225
227
|
threshold: [0, 1],
|
|
226
228
|
immediate: !1
|
|
227
|
-
}), P = y({}),
|
|
229
|
+
}), P = y({}), bt = y(/* @__PURE__ */ new Map()), F = y(/* @__PURE__ */ new Map()), I = /* @__PURE__ */ new Map(), xt = /* @__PURE__ */ new Map(), St = !1, Ct = (e) => !!I.get(e)?.controlled(), L = (e, t) => I.get(e)?.request(t), R = (e, t) => {
|
|
228
230
|
for (let n of e) {
|
|
229
|
-
if (
|
|
231
|
+
if (d(n)) continue;
|
|
232
|
+
if (u(n)) {
|
|
230
233
|
if (n.id === t) return n;
|
|
231
|
-
for (let e of
|
|
234
|
+
for (let e of l(n.items)) {
|
|
232
235
|
let n = Array.isArray(e) ? e : [e];
|
|
233
236
|
for (let e of n) {
|
|
234
237
|
let n = e.items ? R(e.items, t) : void 0;
|
|
@@ -245,18 +248,20 @@ var He = [
|
|
|
245
248
|
let e = n.items ? R(n.items, t) : void 0;
|
|
246
249
|
if (e) return e;
|
|
247
250
|
}
|
|
248
|
-
},
|
|
249
|
-
for (let n of e) if (
|
|
250
|
-
|
|
251
|
+
}, wt = (e, t) => {
|
|
252
|
+
for (let n of e) if (d(n)) {
|
|
253
|
+
if (n === t) return "item";
|
|
254
|
+
} else if (Array.isArray(n)) {
|
|
255
|
+
let e = wt(n, t);
|
|
251
256
|
if (e) return e;
|
|
252
|
-
} else if (
|
|
257
|
+
} else if (u(n)) {
|
|
253
258
|
if (n.id === t) return "group";
|
|
254
|
-
for (let e of
|
|
259
|
+
for (let e of l(n.items)) {
|
|
255
260
|
let n = Array.isArray(e) ? e : [e];
|
|
256
261
|
for (let e of n) {
|
|
257
262
|
if (e.value === t) return "item";
|
|
258
263
|
if (e.items) {
|
|
259
|
-
let n =
|
|
264
|
+
let n = wt(e.items, t);
|
|
260
265
|
if (n) return n;
|
|
261
266
|
}
|
|
262
267
|
}
|
|
@@ -264,11 +269,11 @@ var He = [
|
|
|
264
269
|
} else {
|
|
265
270
|
if (n.value === t) return "item";
|
|
266
271
|
if (n.items) {
|
|
267
|
-
let e =
|
|
272
|
+
let e = wt(n.items, t);
|
|
268
273
|
if (e) return e;
|
|
269
274
|
}
|
|
270
275
|
}
|
|
271
|
-
},
|
|
276
|
+
}, Tt = p(() => Array.from(bt.values()).map((e) => e.value).sort((e, t) => e.order - t.order)), Et = (e, t) => ({
|
|
272
277
|
...e,
|
|
273
278
|
group: !0,
|
|
274
279
|
id: e.id,
|
|
@@ -282,7 +287,7 @@ var He = [
|
|
|
282
287
|
"append:icon": t["append:icon"] ?? e["append:icon"],
|
|
283
288
|
variant: t.variant ?? e.variant,
|
|
284
289
|
onClick: t.onClick ?? e.onClick
|
|
285
|
-
}),
|
|
290
|
+
}), Dt = (e, t) => ({
|
|
286
291
|
group: !0,
|
|
287
292
|
id: e.key,
|
|
288
293
|
label: e.label ?? t?.label,
|
|
@@ -295,10 +300,10 @@ var He = [
|
|
|
295
300
|
"append:icon": e["append:icon"] ?? t?.["append:icon"],
|
|
296
301
|
variant: e.variant ?? t?.variant,
|
|
297
302
|
onClick: e.onClick ?? t?.onClick
|
|
298
|
-
}),
|
|
303
|
+
}), Ot = (e, t) => {
|
|
299
304
|
let n = !1, r = (e) => {
|
|
300
305
|
if (!e.items) return e;
|
|
301
|
-
let r =
|
|
306
|
+
let r = Ot(e.items, t);
|
|
302
307
|
return r.found ? (n = !0, {
|
|
303
308
|
...e,
|
|
304
309
|
items: r.items
|
|
@@ -306,55 +311,57 @@ var He = [
|
|
|
306
311
|
};
|
|
307
312
|
return {
|
|
308
313
|
items: e.map((e) => {
|
|
309
|
-
if (
|
|
310
|
-
if (e.id === t.id) return n = !0,
|
|
314
|
+
if (u(e)) {
|
|
315
|
+
if (e.id === t.id) return n = !0, Et(e, t);
|
|
311
316
|
if (typeof e.items == "function") return e;
|
|
312
|
-
let i =
|
|
317
|
+
let i = l(e.items).map((e) => Array.isArray(e) ? e.map((e) => r(e)) : r(e));
|
|
313
318
|
return {
|
|
314
319
|
...e,
|
|
315
320
|
items: i
|
|
316
321
|
};
|
|
317
322
|
}
|
|
318
323
|
if (Array.isArray(e)) {
|
|
319
|
-
let r =
|
|
324
|
+
let r = Ot(e, t);
|
|
320
325
|
return r.found && (n = !0), r.items;
|
|
321
326
|
}
|
|
322
|
-
return r(e);
|
|
327
|
+
return d(e) ? e : r(e);
|
|
323
328
|
}),
|
|
324
329
|
found: n
|
|
325
330
|
};
|
|
326
|
-
},
|
|
331
|
+
}, kt = p(() => {
|
|
327
332
|
let e = [...g.items ?? []];
|
|
328
|
-
for (let t of
|
|
333
|
+
for (let t of Tt.value) {
|
|
329
334
|
let n = R(e, t.key);
|
|
330
|
-
!n && !t.items?.length && (
|
|
331
|
-
let r =
|
|
335
|
+
!n && !t.items?.length && (wt(e, t.key) === "item" && Xe.throw(`[BbDropdownGroup] "${t.key}" refers to a menu item, not a selectable group. \`<BbDropdownGroup>\` can only attach to a group (an entry with \`selectable\`, \`multiple\`, or \`group: true\`). Point \`id\` at a group \`id\`.`), Xe.throw(`[BbDropdownGroup] Missing minimum config for group "${t.key}". Provide \`items\`, \`selectable\`, \`multiple\`, or \`group\` keys in order to identify a group or define a baseline group with the same \`id\` in \`BbDropdown.items\`.`));
|
|
336
|
+
let r = Dt(t, n), i = Ot(e, r);
|
|
332
337
|
e = i.found ? i.items : [...i.items, r];
|
|
333
338
|
}
|
|
334
339
|
return e;
|
|
335
|
-
}),
|
|
340
|
+
}), At = (e) => {
|
|
336
341
|
let t = P[e.id ?? ""] ?? [];
|
|
337
342
|
if (e.multiple || t.length || !e.id) return t;
|
|
338
|
-
let n =
|
|
343
|
+
let n = V.value.includes(e.id), r = e.items.find((t) => !t.keyless && !t.placeholder && (n ? H[e.id]?.valueByKey.get(t.rowKey) === null : t.value === null));
|
|
339
344
|
return r ? [r.rowKey] : t;
|
|
340
|
-
},
|
|
345
|
+
}, jt = p(() => ye(kt.value)), Mt = p(() => jt.value.map((e) => e.selectable ? {
|
|
341
346
|
...e,
|
|
342
|
-
selected:
|
|
343
|
-
} : e)),
|
|
344
|
-
for (let n of e) if (
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
347
|
+
selected: At(e)
|
|
348
|
+
} : e)), z = p(() => ve(Mt.value)), Nt = b(), Pt = p(() => z.value || M.value ? "dialog" : "menu"), Ft = p(() => z.value && !M.value ? `dialog_${E}` : `menu_${E}`), It = (e) => typeof e.items == "function" || e.itemText != null || e.itemProps != null || e.itemValue != null || e.max != null, B = (e, t = []) => {
|
|
349
|
+
for (let n of e) if (!d(n)) {
|
|
350
|
+
if (u(n)) {
|
|
351
|
+
n.id && It(n) && t.push(n.id);
|
|
352
|
+
for (let e of l(n.items)) for (let n of Array.isArray(e) ? e : [e]) n.items && B(n.items, t);
|
|
353
|
+
} else Array.isArray(n) ? B(n, t) : n.items && B(n.items, t);
|
|
354
|
+
}
|
|
348
355
|
return t;
|
|
349
|
-
},
|
|
356
|
+
}, V = p(() => B(g.items ?? [])), Lt = p(() => (g.items ?? []).filter((e) => u(e) && !!e.id && It(e)).map((e) => e.id)), H = y({}), Rt = y({}), zt = y({}), U = (e, t) => V.value.includes(e) ? H[e]?.valueByKey.get(t) : G(e)?.items.find((e) => e.rowKey === t && !e.keyless)?.value, W = (e) => {
|
|
350
357
|
let t = R(g.items ?? [], e);
|
|
351
358
|
if (t) return {
|
|
352
359
|
multiple: t.multiple ?? !1,
|
|
353
|
-
selectable:
|
|
360
|
+
selectable: Ce(t)
|
|
354
361
|
};
|
|
355
|
-
},
|
|
362
|
+
}, G = (e) => {
|
|
356
363
|
let t = (n) => {
|
|
357
|
-
for (let r of
|
|
364
|
+
for (let r of ye(n)) {
|
|
358
365
|
if (r.id === e) return r;
|
|
359
366
|
for (let e of r.items) if (e.items) {
|
|
360
367
|
let n = t(e.items);
|
|
@@ -362,76 +369,106 @@ var He = [
|
|
|
362
369
|
}
|
|
363
370
|
}
|
|
364
371
|
};
|
|
365
|
-
return t(
|
|
366
|
-
},
|
|
372
|
+
return t(kt.value);
|
|
373
|
+
}, Bt = (e, t) => fe(t), Vt = (e) => {
|
|
367
374
|
if (F.has(e)) return F.get(e);
|
|
368
|
-
let t = (P[e] ?? []).map((t) =>
|
|
369
|
-
return
|
|
370
|
-
},
|
|
371
|
-
|
|
375
|
+
let t = (P[e] ?? []).map((t) => U(e, t));
|
|
376
|
+
return W(e)?.multiple ? t : t[0] ?? null;
|
|
377
|
+
}, Ht = (e, t) => [].concat(F.get(e) ?? []).find((n) => Bt(e, n) === t);
|
|
378
|
+
xe({
|
|
372
379
|
bindController: (e, t) => I.set(e, t),
|
|
373
380
|
unbindController: (e, t) => I.get(e) === t && (I.delete(e), !0),
|
|
374
381
|
onPick: (e, t) => {
|
|
375
|
-
t ?
|
|
382
|
+
t ? xt.set(e, t) : xt.delete(e);
|
|
376
383
|
},
|
|
377
|
-
isControlled:
|
|
384
|
+
isControlled: Ct,
|
|
378
385
|
request: L,
|
|
379
|
-
register: (e, t) =>
|
|
380
|
-
unregister: (e) =>
|
|
386
|
+
register: (e, t) => bt.set(e, t),
|
|
387
|
+
unregister: (e) => bt.delete(e),
|
|
381
388
|
seed: (e, t) => {
|
|
382
389
|
e in P || (P[e] = t);
|
|
383
390
|
},
|
|
384
391
|
setSelection: (e, t) => {
|
|
385
|
-
|
|
392
|
+
St = !0;
|
|
386
393
|
try {
|
|
387
394
|
P[e] = t;
|
|
388
395
|
} finally {
|
|
389
|
-
|
|
396
|
+
St = !1;
|
|
390
397
|
}
|
|
391
398
|
},
|
|
392
|
-
isAppWrite: () =>
|
|
399
|
+
isAppWrite: () => St,
|
|
393
400
|
selectionFor: (e) => P[e] ?? [],
|
|
394
|
-
isPipeline: (e) =>
|
|
401
|
+
isPipeline: (e) => V.value.includes(e),
|
|
395
402
|
publishPipeline: (e, t) => {
|
|
396
|
-
t ?
|
|
403
|
+
t ? H[e] = t : delete H[e];
|
|
397
404
|
},
|
|
398
405
|
publishLoading: (e, t) => {
|
|
399
|
-
t ?
|
|
406
|
+
t ? Rt[e] = !0 : delete Rt[e];
|
|
400
407
|
},
|
|
401
408
|
publishFetching: (e, t) => {
|
|
402
|
-
t ?
|
|
409
|
+
t ? zt[e] = !0 : delete zt[e];
|
|
403
410
|
},
|
|
404
411
|
publishModel: (e, t) => {
|
|
405
412
|
t === void 0 ? F.delete(e) : F.set(e, t);
|
|
406
413
|
},
|
|
407
|
-
modelValueFor:
|
|
408
|
-
valueForKey:
|
|
409
|
-
keyForValue:
|
|
410
|
-
itemForKey: (e, t) =>
|
|
414
|
+
modelValueFor: Vt,
|
|
415
|
+
valueForKey: U,
|
|
416
|
+
keyForValue: Bt,
|
|
417
|
+
itemForKey: (e, t) => H[e]?.itemByKey.get(t) ?? G(e)?.items.find((e) => e.rowKey === t),
|
|
411
418
|
configFor: (e) => R(g.items ?? [], e),
|
|
412
|
-
itemsFor: (e) =>
|
|
413
|
-
selectableFor: (e) =>
|
|
414
|
-
multipleFor: (e) =>
|
|
419
|
+
itemsFor: (e) => G(e)?.items ?? [],
|
|
420
|
+
selectableFor: (e) => W(e)?.selectable,
|
|
421
|
+
multipleFor: (e) => W(e)?.multiple
|
|
415
422
|
});
|
|
416
|
-
let
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
423
|
+
let Ut = b(!!ze().default);
|
|
424
|
+
Ie(() => Ut.value = !1);
|
|
425
|
+
let Wt = p(() => V.value.some((e) => !Tt.value.some((t) => t.key === e && Array.isArray(t.items)))), K = p(() => !Ut.value && !Wt.value && !jt.value.length), Gt = p(() => !!g.keepActivator || dt.value.has("contextMenu")), Kt = b(!1), qt = p(() => !K.value || Gt.value || Kt.value);
|
|
426
|
+
C(K, (e) => {
|
|
427
|
+
if (!e) {
|
|
428
|
+
Kt.value = !1;
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
if (j.value) {
|
|
432
|
+
let e = !!document.activeElement?.closest(`[data-bb-dropdown-surface="${CSS.escape(E)}"]`);
|
|
433
|
+
$(), e && rn();
|
|
434
|
+
}
|
|
435
|
+
let t = A.value;
|
|
436
|
+
if (Gt.value || !(t instanceof HTMLElement) || !t.contains(document.activeElement)) return;
|
|
437
|
+
Kt.value = !0;
|
|
438
|
+
let n = (e) => {
|
|
439
|
+
t.contains(e.relatedTarget) || (t.removeEventListener("focusout", n), Kt.value = !1);
|
|
440
|
+
};
|
|
441
|
+
t.addEventListener("focusout", n);
|
|
442
|
+
}), C([k, () => Qe.value && !qt.value], ([e, t], n, r) => {
|
|
443
|
+
if (!t || !e) return;
|
|
444
|
+
let { style: i } = e;
|
|
445
|
+
if (!i) return;
|
|
446
|
+
let a = i.getPropertyValue("display"), o = i.getPropertyPriority("display");
|
|
447
|
+
i.setProperty("display", "none"), r(() => {
|
|
448
|
+
i.getPropertyValue("display") === "none" && (a ? i.setProperty("display", a, o) : i.removeProperty("display"));
|
|
449
|
+
});
|
|
450
|
+
}, { immediate: !0 });
|
|
451
|
+
let Jt = (e, t = []) => {
|
|
452
|
+
for (let n of e) if (!d(n)) {
|
|
453
|
+
if (u(n)) {
|
|
454
|
+
n.id && Ce(n) && t.push(n.id);
|
|
455
|
+
for (let e of l(n.items)) for (let n of Array.isArray(e) ? e : [e]) n.items && Jt(n.items, t);
|
|
456
|
+
} else Array.isArray(n) ? Jt(n, t) : n.items && Jt(n.items, t);
|
|
457
|
+
}
|
|
421
458
|
return t;
|
|
422
|
-
},
|
|
459
|
+
}, Yt = p(() => {
|
|
423
460
|
let e = {};
|
|
424
|
-
for (let t of
|
|
425
|
-
let n =
|
|
461
|
+
for (let t of Jt(kt.value)) {
|
|
462
|
+
let n = Vt(t), r = (W(t)?.multiple ? [].concat(n) : [n]).filter((e) => e != null), i = H[t], a = G(t), o = R(kt.value, t), { items: s, ...ee } = o ?? {};
|
|
426
463
|
e[t] = {
|
|
427
|
-
...
|
|
464
|
+
...ee,
|
|
428
465
|
id: t,
|
|
429
466
|
value: n,
|
|
430
467
|
multiple: o?.multiple ?? !1,
|
|
431
|
-
selectable: o ?
|
|
432
|
-
loading: !!
|
|
468
|
+
selectable: o ? Ce(o) : !1,
|
|
469
|
+
loading: !!zt[t],
|
|
433
470
|
selectedOptions: r.map((e) => {
|
|
434
|
-
let n =
|
|
471
|
+
let n = Bt(t, e), r = a?.items.find((e) => e.rowKey === n);
|
|
435
472
|
return {
|
|
436
473
|
value: e,
|
|
437
474
|
label: i?.textByKey.get(n) ?? r?.label,
|
|
@@ -444,284 +481,297 @@ var He = [
|
|
|
444
481
|
return e;
|
|
445
482
|
});
|
|
446
483
|
o(() => g.id, {
|
|
447
|
-
open: () =>
|
|
448
|
-
|
|
484
|
+
open: () => j.value,
|
|
485
|
+
empty: () => K.value,
|
|
486
|
+
groups: () => Yt.value
|
|
449
487
|
});
|
|
450
|
-
let
|
|
488
|
+
let Xt = (e, t) => {
|
|
451
489
|
let n = e.id;
|
|
452
490
|
if (!n) return;
|
|
453
|
-
let r =
|
|
491
|
+
let r = At(e), i = new Set(r);
|
|
454
492
|
e.multiple ? i.has(t.rowKey) ? i.delete(t.rowKey) : i.add(t.rowKey) : i.has(t.rowKey) ? e.clearable && i.clear() : (i.clear(), i.add(t.rowKey));
|
|
455
|
-
let a = [...i], o = a.filter((e) => !r.includes(e)), s = r.filter((e) => !a.includes(e)),
|
|
456
|
-
if (
|
|
457
|
-
let r =
|
|
458
|
-
o.length &&
|
|
493
|
+
let a = [...i], o = a.filter((e) => !r.includes(e)), s = r.filter((e) => !a.includes(e)), ee = Ct(n);
|
|
494
|
+
if (ee) {
|
|
495
|
+
let r = U(n, t.rowKey);
|
|
496
|
+
o.length && xt.get(n)?.(t.rowKey), e.multiple ? o.length ? L(n, { add: r }) : s.length && L(n, { remove: r }) : o.length ? L(n, { replace: r }) : s.length && L(n, { clear: !0 });
|
|
459
497
|
} else P[n] = a;
|
|
460
|
-
let
|
|
498
|
+
let te = (t) => e.items.find((e) => e.rowKey === t);
|
|
461
499
|
o.forEach((e) => {
|
|
462
|
-
|
|
500
|
+
te(e) && w("item:selected", U(n, e));
|
|
463
501
|
}), s.forEach((e) => {
|
|
464
|
-
|
|
465
|
-
}), (o.length > 0 || s.length > 0 || r.includes(t.rowKey) && a.includes(t.rowKey)) && (g.closeOnSelect ?? !e.multiple) &&
|
|
466
|
-
},
|
|
502
|
+
te(e) ? w("item:unselected", U(n, e)) : ee && w("item:unselected", Ht(n, e));
|
|
503
|
+
}), (o.length > 0 || s.length > 0 || r.includes(t.rowKey) && a.includes(t.rowKey)) && (g.closeOnSelect ?? !e.multiple) && tn();
|
|
504
|
+
}, Zt = y(/* @__PURE__ */ new Set()), Qt = (e) => Zt.has(e), $t = p(() => Zt.size > 0), en = (e) => e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function", tn = async () => {
|
|
467
505
|
await $();
|
|
468
506
|
let e = document.activeElement;
|
|
469
|
-
e instanceof HTMLElement && e !== document.body && !e.closest(`[data-bb-dropdown-surface="${
|
|
470
|
-
},
|
|
507
|
+
e instanceof HTMLElement && e !== document.body && !e.closest(`[data-bb-dropdown-surface="${E}"]`) || rn();
|
|
508
|
+
}, nn = async (e, t, { close: n = !1 } = {}) => {
|
|
471
509
|
let r = e.onClick?.(t);
|
|
472
|
-
if (n && await
|
|
473
|
-
|
|
510
|
+
if (n && await tn(), en(r)) {
|
|
511
|
+
Zt.add(e.rowKey);
|
|
474
512
|
try {
|
|
475
513
|
await r;
|
|
476
514
|
} finally {
|
|
477
|
-
|
|
515
|
+
Zt.delete(e.rowKey);
|
|
478
516
|
}
|
|
479
517
|
}
|
|
480
|
-
},
|
|
481
|
-
(
|
|
482
|
-
};
|
|
483
|
-
|
|
484
|
-
passthrough:
|
|
485
|
-
rootId:
|
|
486
|
-
activatorId:
|
|
518
|
+
}, q = Be("root-list"), J, rn = () => {
|
|
519
|
+
(k.value ?? (O.value ? document.getElementById(O.value) : null) ?? an)?.focus();
|
|
520
|
+
}, an = null;
|
|
521
|
+
be({
|
|
522
|
+
passthrough: T,
|
|
523
|
+
rootId: E,
|
|
524
|
+
activatorId: O,
|
|
487
525
|
setStatus: (e) => {
|
|
488
|
-
|
|
526
|
+
Nt.value = e;
|
|
489
527
|
},
|
|
490
|
-
status:
|
|
491
|
-
open:
|
|
492
|
-
queryFor: (e) =>
|
|
528
|
+
status: Nt,
|
|
529
|
+
open: j,
|
|
530
|
+
queryFor: (e) => it[e] ?? "",
|
|
493
531
|
setQuery: (e, t) => {
|
|
494
|
-
|
|
532
|
+
it[e] = t;
|
|
495
533
|
},
|
|
496
534
|
activateGroup: (e) => {
|
|
497
|
-
|
|
535
|
+
at.has(e) || at.add(e);
|
|
498
536
|
},
|
|
499
|
-
isActivated: (e) =>
|
|
500
|
-
isPipelineGroup: (e) =>
|
|
501
|
-
isGroupLoading: (e) => !!
|
|
502
|
-
isTopLevelPipeline: (e) =>
|
|
503
|
-
queryDebounceTime:
|
|
537
|
+
isActivated: (e) => at.has(e),
|
|
538
|
+
isPipelineGroup: (e) => V.value.includes(e),
|
|
539
|
+
isGroupLoading: (e) => !!Rt[e],
|
|
540
|
+
isTopLevelPipeline: (e) => Lt.value.includes(e),
|
|
541
|
+
queryDebounceTime: p(() => g.queryDebounceTime ?? 300),
|
|
504
542
|
selectedFor: (e) => {
|
|
505
|
-
let t =
|
|
506
|
-
return t ?
|
|
543
|
+
let t = G(e);
|
|
544
|
+
return t ? At(t) : P[e] ?? [];
|
|
507
545
|
},
|
|
508
|
-
loadingText:
|
|
509
|
-
emptyText:
|
|
510
|
-
failedText:
|
|
511
|
-
enforceCoherence:
|
|
512
|
-
placement:
|
|
513
|
-
disabled:
|
|
546
|
+
loadingText: p(() => g.loadingText),
|
|
547
|
+
emptyText: p(() => g.emptyText),
|
|
548
|
+
failedText: p(() => g.failedText),
|
|
549
|
+
enforceCoherence: p(() => g.enforceCoherence),
|
|
550
|
+
placement: p(() => g.placement),
|
|
551
|
+
disabled: p(() => !!g.disabled),
|
|
514
552
|
selectedChipsFor: (e) => {
|
|
515
|
-
let t =
|
|
553
|
+
let t = G(e), n = H[e];
|
|
516
554
|
return (P[e] ?? []).map((r) => ({
|
|
517
555
|
key: r,
|
|
518
|
-
text: n?.textByKey.get(r) ?? t?.items.find((e) => e.rowKey === r)?.label ??
|
|
556
|
+
text: n?.textByKey.get(r) ?? t?.items.find((e) => e.rowKey === r)?.label ?? pe(U(e, r) ?? Ht(e, r))
|
|
519
557
|
}));
|
|
520
558
|
},
|
|
521
559
|
deselect: (e, t) => {
|
|
522
560
|
let n = P[e] ?? [];
|
|
523
561
|
if (n.includes(t)) {
|
|
524
|
-
if (
|
|
525
|
-
let n =
|
|
526
|
-
L(e, { remove: n }),
|
|
527
|
-
} else P[e] = n.filter((e) => e !== t),
|
|
562
|
+
if (Ct(e)) {
|
|
563
|
+
let n = U(e, t) ?? Ht(e, t);
|
|
564
|
+
L(e, { remove: n }), w("item:unselected", n);
|
|
565
|
+
} else P[e] = n.filter((e) => e !== t), w("item:unselected", U(e, t));
|
|
528
566
|
}
|
|
529
567
|
},
|
|
530
568
|
close: () => $(),
|
|
531
|
-
focusActivator:
|
|
532
|
-
ownsEscape: () => r(
|
|
533
|
-
openModality: () =>
|
|
534
|
-
toggleSelect:
|
|
535
|
-
isItemLoading:
|
|
536
|
-
runItemAction:
|
|
537
|
-
slots:
|
|
569
|
+
focusActivator: rn,
|
|
570
|
+
ownsEscape: () => r(D),
|
|
571
|
+
openModality: () => J,
|
|
572
|
+
toggleSelect: Xt,
|
|
573
|
+
isItemLoading: Qt,
|
|
574
|
+
runItemAction: nn,
|
|
575
|
+
slots: ze()
|
|
538
576
|
});
|
|
539
|
-
let
|
|
540
|
-
if (g.disabled) return;
|
|
541
|
-
if (
|
|
542
|
-
|
|
577
|
+
let on = (e) => {
|
|
578
|
+
if (g.disabled || K.value) return;
|
|
579
|
+
if (X) {
|
|
580
|
+
X = !1, e.preventDefault(), e.stopPropagation();
|
|
543
581
|
return;
|
|
544
582
|
}
|
|
545
|
-
e.stopPropagation(), g.placement === "cursor" && (N.value =
|
|
546
|
-
let t =
|
|
547
|
-
|
|
548
|
-
},
|
|
583
|
+
e.stopPropagation(), g.placement === "cursor" && (N.value = ft(e.clientX, e.clientY));
|
|
584
|
+
let t = j.value;
|
|
585
|
+
sn(e), J = e.detail ? "pointer" : void 0, t ? $() : Q();
|
|
586
|
+
}, sn = (e) => {
|
|
549
587
|
let t = e.currentTarget;
|
|
550
|
-
e.detail && t instanceof HTMLElement && (t.contains(document.activeElement) ||
|
|
551
|
-
},
|
|
552
|
-
if (!g.disabled) {
|
|
588
|
+
e.detail && t instanceof HTMLElement && (t.contains(document.activeElement) || se(t, { preventScroll: !0 }));
|
|
589
|
+
}, cn = async (e) => {
|
|
590
|
+
if (!(g.disabled || K.value)) {
|
|
553
591
|
if (e.preventDefault(), e.stopPropagation(), g.placement === "cursor") {
|
|
554
|
-
let t =
|
|
555
|
-
if (
|
|
556
|
-
await $(), await
|
|
592
|
+
let t = ft(e.clientX, e.clientY);
|
|
593
|
+
if (j.value) {
|
|
594
|
+
await $(), await c(g.transitionDuration), N.value = t, await Q();
|
|
557
595
|
return;
|
|
558
596
|
}
|
|
559
597
|
N.value = t;
|
|
560
598
|
}
|
|
561
|
-
|
|
599
|
+
j.value ? $() : Q();
|
|
562
600
|
}
|
|
563
|
-
},
|
|
564
|
-
clearTimeout(
|
|
565
|
-
},
|
|
566
|
-
g.disabled || e.pointerType === "mouse" || (
|
|
601
|
+
}, ln, Y = null, X = !1, un = () => {
|
|
602
|
+
clearTimeout(ln), Y = null;
|
|
603
|
+
}, dn = (e) => {
|
|
604
|
+
g.disabled || K.value || e.pointerType === "mouse" || (X = !1, Y = {
|
|
567
605
|
x: e.clientX,
|
|
568
606
|
y: e.clientY
|
|
569
|
-
},
|
|
570
|
-
|
|
571
|
-
},
|
|
572
|
-
},
|
|
573
|
-
if (!
|
|
574
|
-
let t = e.clientX -
|
|
575
|
-
Math.sqrt(t * t + n * n) >
|
|
576
|
-
},
|
|
577
|
-
|
|
578
|
-
},
|
|
579
|
-
|
|
580
|
-
},
|
|
581
|
-
|
|
607
|
+
}, ln = setTimeout(() => {
|
|
608
|
+
X = !0, g.placement === "cursor" && Y && (N.value = ft(Y.x, Y.y)), Y = null, J = "pointer", Q();
|
|
609
|
+
}, qe));
|
|
610
|
+
}, fn = (e) => {
|
|
611
|
+
if (!Y) return;
|
|
612
|
+
let t = e.clientX - Y.x, n = e.clientY - Y.y;
|
|
613
|
+
Math.sqrt(t * t + n * n) > Je && un();
|
|
614
|
+
}, pn = () => {
|
|
615
|
+
un();
|
|
616
|
+
}, mn = (e) => {
|
|
617
|
+
X && e.cancelable && (e.preventDefault(), X = !1);
|
|
618
|
+
}, hn = async (e) => {
|
|
619
|
+
g.disabled || K.value || (e.key === "ArrowDown" ? (e.preventDefault(), j.value || (J = "keyboard", await Q()), await c(0), q.value?.focusFirst(!0)) : e.key === "ArrowUp" ? (e.preventDefault(), j.value || (J = "keyboard", await Q()), await c(0), q.value?.focusLast(!0)) : e.key === "Tab" && j.value && !e.shiftKey && (e.preventDefault(), q.value?.focusFirst(!0)));
|
|
620
|
+
}, gn = !1, _n = () => {
|
|
621
|
+
gn = !0, setTimeout(() => gn = !1, 0);
|
|
582
622
|
}, Z = (e) => {
|
|
583
623
|
let t = e.target;
|
|
584
|
-
t instanceof HTMLElement && (e.type === "focusin" &&
|
|
585
|
-
},
|
|
624
|
+
t instanceof HTMLElement && (e.type === "focusin" && gn && k.value?.contains(t) || t.closest(`[data-bb-dropdown-surface="${E}"]`) || e.type === "focusin" && t.querySelector(`[data-bb-dropdown-surface="${E}"]`) || $());
|
|
625
|
+
}, vn = (e) => {
|
|
586
626
|
let t = e.detail;
|
|
587
|
-
t && t.surfaceId !==
|
|
588
|
-
},
|
|
627
|
+
t && t.surfaceId !== E && (t.activator?.closest(`[data-bb-dropdown-surface="${E}"]`) || $());
|
|
628
|
+
}, yn = () => {
|
|
589
629
|
let e = document.activeElement?.closest("[data-bb-dropdown-surface]");
|
|
590
|
-
return e?.getAttribute("data-bb-dropdown-surface") ===
|
|
591
|
-
},
|
|
592
|
-
|
|
630
|
+
return e?.getAttribute("data-bb-dropdown-surface") === E && !!e.closest(".bb-dropdown--submenu");
|
|
631
|
+
}, bn = (e) => {
|
|
632
|
+
j.value && e.key === "Escape" && r(D) && (yn() || (e.stopImmediatePropagation(), e.preventDefault(), document.activeElement !== k.value && rn(), $()));
|
|
593
633
|
}, Q = async () => {
|
|
594
|
-
|
|
595
|
-
surfaceId:
|
|
596
|
-
activator:
|
|
597
|
-
} })), M.value || (
|
|
634
|
+
K.value || (lt.value = ct(), _t = !0, j.value = !0, document.dispatchEvent(new CustomEvent(Ke, { detail: {
|
|
635
|
+
surfaceId: E,
|
|
636
|
+
activator: k.value
|
|
637
|
+
} })), M.value || (vt(), i(D, { element: () => document.querySelector(`[data-bb-dropdown-surface="${CSS.escape(String(E))}"]`) }), document.addEventListener("click", Z, { passive: !0 }), document.addEventListener("contextmenu", Z, { passive: !0 }), document.addEventListener("focusin", Z, { passive: !0 }), document.addEventListener("keydown", bn, { capture: !0 }), document.addEventListener(Ke, vn)));
|
|
598
638
|
}, $ = async () => {
|
|
599
|
-
|
|
600
|
-
}
|
|
601
|
-
|
|
639
|
+
j.value = !1, yt();
|
|
640
|
+
};
|
|
641
|
+
oe({
|
|
642
|
+
open: async (e, t, n) => {
|
|
643
|
+
j.value && (await $(), await c(g.transitionDuration)), N.value = e, an = n ?? null, J = t, await Q(), t === "keyboard" && j.value && (await c(0), q.value?.focusFirst(!0));
|
|
644
|
+
},
|
|
645
|
+
close: $,
|
|
646
|
+
isOpen: () => j.value
|
|
647
|
+
});
|
|
648
|
+
let xn = () => {
|
|
649
|
+
a(D), document.removeEventListener("click", Z), document.removeEventListener("contextmenu", Z), document.removeEventListener("focusin", Z), document.removeEventListener("keydown", bn, { capture: !0 }), document.removeEventListener(Ke, vn);
|
|
602
650
|
};
|
|
603
|
-
|
|
651
|
+
C(j, (e) => {
|
|
604
652
|
if (!e) {
|
|
605
|
-
|
|
606
|
-
for (let e of Object.keys(
|
|
653
|
+
J = void 0, xn();
|
|
654
|
+
for (let e of Object.keys(it)) it[e] = "";
|
|
607
655
|
}
|
|
608
|
-
}),
|
|
609
|
-
let r =
|
|
610
|
-
t ?
|
|
611
|
-
inPanel: (e) => !!e.closest(`[data-bb-dropdown-surface="${
|
|
656
|
+
}), C(() => g.activator, (t, n) => {
|
|
657
|
+
let r = k.value;
|
|
658
|
+
t ? k.value = ge(t) ?? void 0 : n && (k.value = void 0), r && !k.value && j.value && e({
|
|
659
|
+
inPanel: (e) => !!e.closest(`[data-bb-dropdown-surface="${E}"]`),
|
|
612
660
|
close: $,
|
|
613
|
-
activator: () =>
|
|
661
|
+
activator: () => k.value
|
|
614
662
|
});
|
|
615
663
|
}, { immediate: !0 });
|
|
616
|
-
let
|
|
617
|
-
|
|
618
|
-
if (
|
|
664
|
+
let Sn = null;
|
|
665
|
+
C([k, dt], ([e, t]) => {
|
|
666
|
+
if (Sn &&= (Sn(), null), !e) return;
|
|
619
667
|
let n = !1;
|
|
620
|
-
e.id || (e.id =
|
|
668
|
+
e.id || (e.id = E, n = !0), O.value = e.id;
|
|
621
669
|
let r = [];
|
|
622
|
-
t.has("click") && (e.addEventListener("click",
|
|
623
|
-
e.removeEventListener("click",
|
|
624
|
-
})), t.has("contextMenu") && (e.addEventListener("contextmenu",
|
|
625
|
-
e.removeEventListener("contextmenu",
|
|
626
|
-
})), e.addEventListener("keydown",
|
|
670
|
+
t.has("click") && (e.addEventListener("click", on), e.addEventListener("mousedown", _n), r.push(() => {
|
|
671
|
+
e.removeEventListener("click", on), e.removeEventListener("mousedown", _n);
|
|
672
|
+
})), t.has("contextMenu") && (e.addEventListener("contextmenu", cn), e.addEventListener("pointerdown", dn), e.addEventListener("pointermove", fn), e.addEventListener("pointerup", pn), e.addEventListener("pointercancel", pn), e.addEventListener("touchend", mn), r.push(() => {
|
|
673
|
+
e.removeEventListener("contextmenu", cn), e.removeEventListener("pointerdown", dn), e.removeEventListener("pointermove", fn), e.removeEventListener("pointerup", pn), e.removeEventListener("pointercancel", pn), e.removeEventListener("touchend", mn), un();
|
|
674
|
+
})), e.addEventListener("keydown", hn), r.push(() => e.removeEventListener("keydown", hn)), Sn = () => {
|
|
627
675
|
r.forEach((e) => e()), n && e.removeAttribute("id"), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls");
|
|
628
676
|
};
|
|
629
|
-
}, { immediate: !0 }),
|
|
630
|
-
O,
|
|
677
|
+
}, { immediate: !0 }), C([
|
|
631
678
|
k,
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
679
|
+
j,
|
|
680
|
+
et,
|
|
681
|
+
Pt,
|
|
682
|
+
Ft,
|
|
683
|
+
K
|
|
684
|
+
], ([e, t, n, r, i, a]) => {
|
|
685
|
+
e && (a ? (e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls")) : (e.setAttribute("aria-haspopup", r), e.setAttribute("aria-expanded", n ? String(t) : "false"), n ? e.setAttribute("aria-controls", i) : e.removeAttribute("aria-controls")));
|
|
686
|
+
}, { immediate: !0 }), Pe(() => {
|
|
687
|
+
un(), Sn?.(), xn();
|
|
639
688
|
});
|
|
640
|
-
let
|
|
689
|
+
let Cn = p(() => g.width === "auto"), { width: wn } = He(p(() => he(j.value ? mt.value : null)), {
|
|
641
690
|
width: 0,
|
|
642
691
|
height: 0
|
|
643
|
-
}, { box: "border-box" }),
|
|
692
|
+
}, { box: "border-box" }), Tn = p(() => {
|
|
644
693
|
if (g.width !== "auto") {
|
|
645
694
|
if (g.width) {
|
|
646
|
-
let { value: e, unit: t } =
|
|
647
|
-
return t === "%" ?
|
|
695
|
+
let { value: e, unit: t } = _e(g.width);
|
|
696
|
+
return t === "%" ? mt.value ? `${wn.value * (e / 100)}px` : "0px" : `${e}px`;
|
|
648
697
|
}
|
|
649
698
|
return "0px";
|
|
650
699
|
}
|
|
651
700
|
});
|
|
652
|
-
return
|
|
701
|
+
return Fe(() => {
|
|
653
702
|
$();
|
|
654
|
-
}), (e, n) => (v(),
|
|
655
|
-
|
|
656
|
-
props: { ref:
|
|
657
|
-
disabled:
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
(
|
|
703
|
+
}), (e, n) => (v(), h(ke, null, [
|
|
704
|
+
!Qe.value && qt.value ? x(e.$slots, "activator", Ne(Me({
|
|
705
|
+
props: { ref: gt },
|
|
706
|
+
disabled: f.disabled,
|
|
707
|
+
empty: K.value,
|
|
708
|
+
loading: $t.value,
|
|
709
|
+
open: j.value,
|
|
710
|
+
placement: f.placement
|
|
711
|
+
})), void 0, void 0, 0) : m("", !0),
|
|
712
|
+
x(e.$slots, "default"),
|
|
713
|
+
(v(!0), h(ke, null, Le(V.value, (e) => (v(), Ae(de, {
|
|
664
714
|
id: e,
|
|
665
715
|
key: e
|
|
666
716
|
}, null, 8, ["id"]))), 128)),
|
|
667
|
-
M.value ? (v(),
|
|
717
|
+
M.value ? (v(), Ae(ue, _({
|
|
668
718
|
key: 1,
|
|
669
|
-
modelValue:
|
|
670
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
671
|
-
compact:
|
|
672
|
-
"off-canvas-props":
|
|
673
|
-
"root-groups":
|
|
674
|
-
}, _(
|
|
719
|
+
modelValue: j.value,
|
|
720
|
+
"onUpdate:modelValue": n[0] ||= (e) => j.value = e,
|
|
721
|
+
compact: S(st).compact,
|
|
722
|
+
"off-canvas-props": ut.value,
|
|
723
|
+
"root-groups": Mt.value
|
|
724
|
+
}, _($e, S(t)(S(Te)(e.$attrs)))), null, 16, [
|
|
675
725
|
"modelValue",
|
|
676
726
|
"compact",
|
|
677
727
|
"off-canvas-props",
|
|
678
728
|
"root-groups"
|
|
679
|
-
])) : (v(),
|
|
729
|
+
])) : (v(), Ae(ce, _({
|
|
680
730
|
key: 2,
|
|
681
|
-
modelValue:
|
|
682
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
683
|
-
anchor:
|
|
684
|
-
boundary:
|
|
685
|
-
"bubble-attrs":
|
|
731
|
+
modelValue: j.value,
|
|
732
|
+
"onUpdate:modelValue": n[1] ||= (e) => j.value = e,
|
|
733
|
+
anchor: ht.value,
|
|
734
|
+
boundary: f.boundary,
|
|
735
|
+
"bubble-attrs": rt,
|
|
686
736
|
class: ["bb-dropdown", {
|
|
687
|
-
"bb-dropdown--mobile":
|
|
688
|
-
"bb-dropdown--compact":
|
|
737
|
+
"bb-dropdown--mobile": S(ot),
|
|
738
|
+
"bb-dropdown--compact": S(st).compact
|
|
689
739
|
}],
|
|
690
|
-
eager:
|
|
740
|
+
eager: f.eager,
|
|
691
741
|
"hide-arrow": "",
|
|
692
|
-
offset:
|
|
693
|
-
padding:
|
|
694
|
-
placement:
|
|
695
|
-
"transition-duration":
|
|
696
|
-
}, _(
|
|
697
|
-
default:
|
|
698
|
-
e.$slots.header ? (v(),
|
|
742
|
+
offset: f.offset ?? S(Ye)() ?? 4,
|
|
743
|
+
padding: f.padding,
|
|
744
|
+
placement: f.placement === "cursor" ? "bottom-start" : f.placement,
|
|
745
|
+
"transition-duration": f.transitionDuration
|
|
746
|
+
}, _($e, e.$attrs, S(T).root)), {
|
|
747
|
+
default: Ve(() => [
|
|
748
|
+
e.$slots.header ? (v(), h("div", _({
|
|
699
749
|
key: 0,
|
|
700
750
|
class: "bb-dropdown__header"
|
|
701
|
-
},
|
|
702
|
-
disabled:
|
|
703
|
-
open:
|
|
704
|
-
placement:
|
|
705
|
-
})], 16)) :
|
|
706
|
-
|
|
707
|
-
id: `menu_${
|
|
708
|
-
"aria-labelledby":
|
|
751
|
+
}, S(T).header), [x(e.$slots, "header", {
|
|
752
|
+
disabled: f.disabled,
|
|
753
|
+
open: j.value,
|
|
754
|
+
placement: f.placement
|
|
755
|
+
})], 16)) : m("", !0),
|
|
756
|
+
je("span", _({
|
|
757
|
+
id: `menu_${S(E)}`,
|
|
758
|
+
"aria-labelledby": z.value ? void 0 : O.value,
|
|
709
759
|
class: "bb-dropdown__list scrollbar-border",
|
|
710
|
-
role:
|
|
711
|
-
},
|
|
760
|
+
role: z.value ? "none" : "menu"
|
|
761
|
+
}, S(T).list), [nt.value ? (v(), Ae(le, {
|
|
712
762
|
key: 0,
|
|
713
763
|
ref: "root-list",
|
|
714
|
-
groups:
|
|
715
|
-
}, null, 8, ["groups"])) :
|
|
716
|
-
|
|
717
|
-
e.$slots.footer ? (v(),
|
|
764
|
+
groups: Mt.value
|
|
765
|
+
}, null, 8, ["groups"])) : m("", !0)], 16, We),
|
|
766
|
+
je("span", Ge, Re(Nt.value), 1),
|
|
767
|
+
e.$slots.footer ? (v(), h("div", _({
|
|
718
768
|
key: 1,
|
|
719
769
|
class: "bb-dropdown__footer"
|
|
720
|
-
},
|
|
721
|
-
disabled:
|
|
722
|
-
open:
|
|
723
|
-
placement:
|
|
724
|
-
})], 16)) :
|
|
770
|
+
}, S(T).footer), [x(e.$slots, "footer", {
|
|
771
|
+
disabled: f.disabled,
|
|
772
|
+
open: j.value,
|
|
773
|
+
placement: f.placement
|
|
774
|
+
})], 16)) : m("", !0)
|
|
725
775
|
]),
|
|
726
776
|
_: 3
|
|
727
777
|
}, 16, [
|
|
@@ -738,4 +788,4 @@ var He = [
|
|
|
738
788
|
], 64));
|
|
739
789
|
}
|
|
740
790
|
});
|
|
741
|
-
export {
|
|
791
|
+
export { w as default };
|