bitboss-ui 3.0.0-beta.2 → 3.0.0-beta.21
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 +72 -33
- package/dist/ai/BbAccordion.md +3 -3
- package/dist/ai/BbAlert.md +9 -5
- package/dist/ai/BbAsterisk.md +17 -0
- package/dist/ai/BbAvatar.md +12 -3
- package/dist/ai/BbBadge.md +15 -10
- package/dist/ai/BbBadgeButton.md +16 -16
- package/dist/ai/BbBaseButton.md +16 -16
- package/dist/ai/BbBaseCheckbox.md +8 -8
- package/dist/ai/BbBaseCheckboxGroup.md +13 -13
- package/dist/ai/BbBaseCheckboxIcon.md +26 -9
- package/dist/ai/BbBaseColorInput.md +11 -11
- package/dist/ai/BbBaseDatePicker.md +6 -6
- package/dist/ai/BbBaseDatePickerInput.md +15 -15
- package/dist/ai/BbBaseInputContainer.md +12 -12
- package/dist/ai/BbBaseNumberInput.md +8 -8
- package/dist/ai/BbBaseRadio.md +5 -5
- package/dist/ai/BbBaseRadioGroup.md +7 -7
- package/dist/ai/BbBaseRadioIcon.md +25 -9
- package/dist/ai/BbBaseRating.md +5 -5
- package/dist/ai/BbBaseSelect.md +22 -21
- package/dist/ai/BbBaseSlider.md +9 -9
- package/dist/ai/BbBaseSwitch.md +8 -8
- package/dist/ai/BbBaseSwitchGroup.md +13 -13
- package/dist/ai/BbBaseSwitchIcon.md +28 -10
- package/dist/ai/BbBaseTag.md +10 -10
- package/dist/ai/BbBaseTextInput.md +9 -9
- package/dist/ai/BbBaseTextarea.md +9 -9
- package/dist/ai/BbBaseTimePickerInput.md +13 -13
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +15 -15
- package/dist/ai/BbCheckbox.md +18 -17
- package/dist/ai/BbCheckboxGroup.md +15 -14
- package/dist/ai/BbCollapsible.md +11 -9
- package/dist/ai/BbColorInput.md +15 -15
- package/dist/ai/BbColorPalette.md +12 -6
- package/dist/ai/BbConfirm.md +12 -5
- package/dist/ai/BbDatePicker.md +13 -13
- package/dist/ai/BbDatePickerInput.md +20 -20
- package/dist/ai/BbDialog.md +78 -12
- package/dist/ai/BbDropdown.md +132 -22
- package/dist/ai/BbDropdownButton.md +12 -12
- package/dist/ai/BbDropdownGroup.md +1 -1
- package/dist/ai/BbDropzone.md +4 -4
- package/dist/ai/BbForm.md +49 -14
- package/dist/ai/BbIcon.md +6 -0
- package/dist/ai/BbIndicator.md +5 -5
- package/dist/ai/BbNumberInput.md +11 -11
- package/dist/ai/BbOffCanvas.md +90 -20
- package/dist/ai/BbPagination.md +3 -3
- package/dist/ai/BbPopover.md +32 -17
- package/dist/ai/BbProgress.md +7 -4
- package/dist/ai/BbRadio.md +16 -15
- package/dist/ai/BbRadioGroup.md +20 -17
- package/dist/ai/BbRating.md +11 -11
- package/dist/ai/BbSelect.md +138 -37
- package/dist/ai/BbSelectPopover.md +40 -41
- package/dist/ai/BbSlider.md +37 -22
- package/dist/ai/BbSmoothHeight.md +1 -1
- package/dist/ai/BbSwitch.md +25 -10
- package/dist/ai/BbSwitchGroup.md +17 -14
- package/dist/ai/BbTable.md +920 -109
- package/dist/ai/BbTabs.md +28 -14
- package/dist/ai/BbTabsList.md +1 -1
- package/dist/ai/BbTabsPanes.md +1 -1
- package/dist/ai/BbTabsRoot.md +10 -10
- package/dist/ai/BbTag.md +14 -14
- package/dist/ai/BbTextInput.md +16 -15
- package/dist/ai/BbTextarea.md +13 -13
- package/dist/ai/BbTimePicker.md +10 -10
- package/dist/ai/BbTimePickerInput.md +17 -17
- package/dist/ai/BbToast.md +1 -1
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/BbTooltip.md +12 -10
- package/dist/ai/BbTree.md +1 -1
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonInputWrapper.md +10 -10
- package/dist/ai/CommonPopover.md +6 -6
- package/dist/ai/FlatListBox.md +5 -5
- package/dist/ai/GroupedListBox.md +5 -5
- package/dist/ai/ListBox.md +4 -4
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +128 -2
- package/dist/ai/components.json +917 -100
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useConfirm.md +5 -3
- package/dist/ai/guides/ai-router.md +9 -4
- package/dist/ai/guides/component-picker.md +18 -18
- package/dist/ai/guides/design-language.md +14 -14
- package/dist/ai/guides/design-tokens.md +25 -18
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +11 -5
- package/dist/ai/guides/installation-and-plugin-setup.md +85 -23
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +30 -0
- package/dist/ai/guides/migration/components/bb-checkbox.md +37 -3
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-dialog.md +62 -34
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -13
- package/dist/ai/guides/migration/components/bb-rating.md +8 -2
- package/dist/ai/guides/migration/components/bb-select.md +5 -2
- package/dist/ai/guides/migration/components/bb-table.md +560 -28
- package/dist/ai/guides/migration/components/bb-text-input.md +6 -6
- package/dist/ai/guides/migration/v2-to-v3.md +260 -89
- package/dist/ai/guides/ssr-prefill.md +120 -0
- package/dist/ai/index.md +10 -9
- package/dist/ai/recipes/inertia/approvals-inbox.md +0 -1
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -1
- package/dist/ai/recipes/inertia/ownership-atlas.md +49 -29
- package/dist/ai/recipes/inertia/record-form.md +0 -1
- package/dist/ai/recipes/inertia/records-workspace.md +26 -8
- package/dist/ai/recipes/inertia/upload-center.md +0 -1
- package/dist/ai/recipes/nuxt/approvals-inbox.md +0 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -1
- package/dist/ai/recipes/nuxt/record-form.md +0 -1
- package/dist/ai/recipes/nuxt/records-workspace.md +26 -8
- package/dist/ai/recipes/nuxt/upload-center.md +0 -1
- package/dist/ai/recipes/vue/approvals-inbox.md +0 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -1
- package/dist/ai/recipes/vue/records-workspace.md +26 -8
- package/dist/ai/recipes/vue/upload-center.md +0 -1
- package/dist/ai/source/BbAlert.md +60 -2
- package/dist/ai/source/BbAvatar.md +3 -3
- package/dist/ai/source/BbBadge.md +60 -15
- package/dist/ai/source/BbBadgeButton.md +8 -2
- package/dist/ai/source/BbBaseButton.md +3 -1
- package/dist/ai/source/BbBaseCheckboxGroup.md +6 -2
- package/dist/ai/source/BbBaseDatePicker.md +3 -1
- package/dist/ai/source/BbBaseDatePickerInput.md +5 -1
- package/dist/ai/source/BbBaseInputContainer.md +52 -1
- package/dist/ai/source/BbBaseRadioGroup.md +4 -0
- package/dist/ai/source/BbBaseRating.md +3 -1
- package/dist/ai/source/BbBaseSelect.md +71 -16
- package/dist/ai/source/BbBaseSwitchGroup.md +4 -0
- package/dist/ai/source/BbBaseTimePickerInput.md +5 -1
- package/dist/ai/source/BbBreadcrumbs.md +31 -0
- package/dist/ai/source/BbButton.md +51 -24
- package/dist/ai/source/BbCheckbox.md +15 -1
- package/dist/ai/source/BbCheckboxGroup.md +2 -1
- package/dist/ai/source/BbCollapsible.md +7 -1
- package/dist/ai/source/BbColorInput.md +3 -4
- package/dist/ai/source/BbColorPalette.md +3 -4
- package/dist/ai/source/BbDatePicker.md +5 -1
- package/dist/ai/source/BbDatePickerInput.md +5 -1
- package/dist/ai/source/BbDialog.md +175 -19
- package/dist/ai/source/BbDropdown.md +376 -69
- package/dist/ai/source/BbDropdownGroup.md +330 -59
- package/dist/ai/source/BbForm.md +93 -5
- package/dist/ai/source/BbIcon.md +46 -36
- package/dist/ai/source/BbNumberInput.md +3 -4
- package/dist/ai/source/BbOffCanvas.md +474 -194
- package/dist/ai/source/BbPopover.md +24 -17
- package/dist/ai/source/BbProgress.md +2 -2
- package/dist/ai/source/BbRadio.md +15 -1
- package/dist/ai/source/BbRadioGroup.md +3 -1
- package/dist/ai/source/BbSelect.md +50 -2
- package/dist/ai/source/BbSelectPopover.md +171 -23
- package/dist/ai/source/BbSlider.md +3 -4
- package/dist/ai/source/BbSwitch.md +15 -1
- package/dist/ai/source/BbSwitchGroup.md +8 -5
- package/dist/ai/source/BbTable.md +5092 -1446
- package/dist/ai/source/BbTabs.md +6 -7
- package/dist/ai/source/BbTabsList.md +6 -7
- package/dist/ai/source/BbTabsPanes.md +6 -7
- package/dist/ai/source/BbTabsRoot.md +6 -7
- package/dist/ai/source/BbTag.md +3 -4
- package/dist/ai/source/BbTextInput.md +3 -4
- package/dist/ai/source/BbTextarea.md +3 -4
- package/dist/ai/source/BbTimePicker.md +4 -1
- package/dist/ai/source/BbTimePickerInput.md +5 -1
- package/dist/ai/source/BbToast.md +3 -1
- package/dist/ai/source/BbTooltip.md +5 -1
- package/dist/ai/source/CommonInputWrapper.md +4 -0
- package/dist/ai/source/CommonPopover.md +6 -0
- package/dist/ai/source/FlatListBox.md +11 -5
- package/dist/ai/source/GroupedListBox.md +7 -5
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbAlert/types.d.ts +10 -1
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +33 -33
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +22 -16
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +36 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +21 -8
- package/dist/components/BbBadge/types.d.ts +8 -2
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +2 -2
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +167 -167
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +9 -9
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +78 -78
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +64 -64
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +138 -138
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +24 -22
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +40 -40
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +74 -65
- package/dist/components/BbBaseSelect/types.d.ts +22 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +104 -104
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +35 -35
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +85 -81
- package/dist/components/BbCheckboxGroup/types.d.ts +2 -1
- package/dist/components/BbCollapsible/types.d.ts +7 -1
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +50 -50
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDialog/BbDialog.vue.d.ts +1 -1
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +133 -107
- package/dist/components/BbDialog/types.d.ts +29 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +99 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +208 -201
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +225 -208
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDropdown/types.d.ts +20 -5
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +46 -46
- package/dist/components/BbIcon/iconCache.d.ts +33 -0
- package/dist/components/BbIcon/iconCache.js +17 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +254 -208
- package/dist/components/BbOffCanvas/types.d.ts +30 -5
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +2 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +149 -146
- package/dist/components/BbPopover/types.d.ts +3 -2
- package/dist/components/BbRadioGroup/types.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +27 -23
- package/dist/components/BbSelect/types.d.ts +32 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +221 -213
- package/dist/components/BbSlider/BbSlider.vue.d.ts +1 -1
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +20 -20
- package/dist/components/BbTable/BbTable.vue.d.ts +10 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1433 -600
- package/dist/components/BbTable/BbTableDataRow.d.ts +162 -0
- package/dist/components/BbTable/BbTableDataRow.js +136 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +73 -0
- package/dist/components/BbTable/BbTableExpandRow.js +52 -0
- package/dist/components/BbTable/types.d.ts +324 -111
- package/dist/components/BbTable/utils.d.ts +92 -4
- package/dist/components/BbTable/utils.js +71 -36
- package/dist/components/BbTabs/types.d.ts +0 -8
- package/dist/components/BbTag/BbTag.vue.d.ts +1 -1
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +54 -54
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +80 -80
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +61 -61
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/components/BbTooltip/types.d.ts +5 -1
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +83 -83
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +56 -56
- package/dist/composables/useBaseOptions.js +30 -20
- package/dist/composables/useBbConfig.d.ts +27 -6
- package/dist/composables/useBbConfig.js +8 -2
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +9 -0
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +5 -5
- package/dist/composables/usePrefill.d.ts +21 -2
- package/dist/composables/usePrefill.js +25 -19
- package/dist/composables/useSsrState.d.ts +20 -0
- package/dist/composables/useSsrState.js +13 -0
- package/dist/composables/useTableWidthContext.d.ts +24 -4
- package/dist/composables/useTableWidthContext.js +31 -28
- package/dist/composables/useToast.js +5 -5
- package/dist/deprecation/ai-deprecations.json.d.ts +121 -11
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +63 -23
- package/dist/i18n/locales/cs.json +4 -1
- package/dist/i18n/locales/da.json +4 -1
- package/dist/i18n/locales/de.json +4 -1
- package/dist/i18n/locales/el.json +4 -1
- package/dist/i18n/locales/en.json +4 -1
- package/dist/i18n/locales/es.json +4 -1
- package/dist/i18n/locales/fi.json +4 -1
- package/dist/i18n/locales/fr.json +4 -1
- package/dist/i18n/locales/hu.json +4 -1
- package/dist/i18n/locales/it.json +4 -1
- package/dist/i18n/locales/ja.json +4 -1
- package/dist/i18n/locales/ko.json +4 -1
- package/dist/i18n/locales/nb.json +4 -1
- package/dist/i18n/locales/nl.json +4 -1
- package/dist/i18n/locales/pl.json +4 -1
- package/dist/i18n/locales/pt.json +4 -1
- package/dist/i18n/locales/ro.json +4 -1
- package/dist/i18n/locales/ru.json +4 -1
- package/dist/i18n/locales/sv.json +4 -1
- package/dist/i18n/locales/tr.json +4 -1
- package/dist/i18n/locales/uk.json +4 -1
- package/dist/i18n/locales/zh-cn.json +4 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +69 -67
- package/dist/llms-full.txt +3997 -1458
- package/dist/llms-medium.txt +140 -73
- package/dist/llms.txt +7 -6
- package/dist/locale-blueprint.json +4 -1
- package/dist/nuxt-auto-imports.d.ts +100 -0
- package/dist/nuxt-auto-imports.js +55 -0
- package/dist/nuxt-module.d.ts +22 -1
- package/dist/nuxt.js +22 -8
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +20 -19
- package/dist/runtime/nuxt-plugin.js +28 -21
- package/dist/styles.css +1 -1
- package/dist/utilities/misc/listboxMetrics.d.ts +3 -3
- package/dist/utilities/misc/listboxMetrics.js +2 -2
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
- package/dist/utilities/misc/ssrStateInjectionKey.js +4 -0
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +45 -27
- package/dist/validated/BbSelect.vue.d.ts +2 -0
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/useValidatedField.js +25 -23
- package/dist/vite.js +7 -3
- package/llms.txt +8 -7
- package/package.json +2 -2
- package/scripts/lib/eslint-plugin.d.ts +19 -1
- package/scripts/lib/eslint-plugin.mjs +155 -14
- package/scripts/lib/html-attributes.mjs +91 -0
- package/scripts/lib/validate-bb-markup.mjs +59 -11
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import ee from "
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
1
|
+
import { useConfig as e } from "../../composables/useConfig.js";
|
|
2
|
+
import { useId as t } from "../../composables/useId.js";
|
|
3
|
+
import { useUntil as n } from "../../composables/useUntil.js";
|
|
4
|
+
import { removedPropsFor as r } from "../../deprecation/removedProps.js";
|
|
5
|
+
import { useLogger as i } from "../../composables/useLogger.js";
|
|
6
|
+
import { warnRemovedAttrs as a } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
7
|
+
import { extractDomContainer as o } from "../../utilities/functions/extractDomContainer.js";
|
|
8
|
+
import { transitions as ee } from "../../utilities/misc/transitions.js";
|
|
9
|
+
import s from "../CommonPopover/CommonPopover.vue.js";
|
|
10
|
+
import { parseWidthString as te } from "../../utilities/functions/parseWidthString.js";
|
|
11
|
+
import { isTopEscapeEntry as ne, pushEscapeEntry as re, removeEscapeEntry as ie } from "../../utils/overlayEscapeStack.js";
|
|
12
|
+
import { useBbDropdownContextHost as ae } from "../../composables/useBbDropdownContext.js";
|
|
13
|
+
import { useMobile as oe } from "../../composables/useMobile.js";
|
|
14
|
+
import { provideSheetSurface as se } from "../../composables/useSheetSurface.js";
|
|
15
|
+
import { useClosingInert as ce } from "../../composables/useClosingInert.js";
|
|
16
|
+
import { wait as c } from "../../utilities/functions/wait.js";
|
|
17
|
+
import { groupItemsAsArray as l, isGroup as u } from "./types.js";
|
|
17
18
|
import { levelHasSearch as le, normalizeGroups as ue } from "./normalizeGroups.js";
|
|
18
19
|
import { provideDropdownContext as de } from "./useDropdownContext.js";
|
|
19
20
|
import fe from "./BbDropdownList.vue.js";
|
|
20
|
-
import pe from "
|
|
21
|
-
import
|
|
21
|
+
import { hash as pe } from "../../utilities/functions/hash.js";
|
|
22
|
+
import me from "./AdaptiveDropdown.vue.js";
|
|
22
23
|
import { provideDropdownGroupRegistry as he } from "./useDropdownGroupRegistry.js";
|
|
23
24
|
import ge from "./DropdownPipelineResolver.vue.js";
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { useElementSize as Me, useIntersectionObserver as Ne } from "@vueuse/core";
|
|
25
|
+
import { Fragment as _e, computed as d, createBlock as ve, createCommentVNode as ye, createElementBlock as f, createElementVNode as be, createVNode as xe, defineComponent as Se, mergeProps as Ce, normalizeClass as we, normalizeProps as Te, normalizeStyle as Ee, onBeforeUnmount as De, openBlock as p, reactive as m, ref as h, renderList as Oe, renderSlot as g, toDisplayString as ke, unref as _, useSlots as Ae, useTemplateRef as je, watch as v, withCtx as Me } from "vue";
|
|
26
|
+
import { useElementSize as Ne, useIntersectionObserver as Pe } from "@vueuse/core";
|
|
27
27
|
//#region src/components/BbDropdown/BbDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
28
|
-
var
|
|
28
|
+
var Fe = [
|
|
29
29
|
"id",
|
|
30
30
|
"aria-labelledby",
|
|
31
31
|
"data-bb-dropdown-surface",
|
|
32
32
|
"inert",
|
|
33
33
|
"role"
|
|
34
|
-
],
|
|
34
|
+
], Ie = {
|
|
35
35
|
key: 0,
|
|
36
36
|
class: "bb-dropdown__header"
|
|
37
|
-
},
|
|
37
|
+
}, Le = [
|
|
38
38
|
"id",
|
|
39
39
|
"aria-labelledby",
|
|
40
40
|
"role"
|
|
41
|
-
],
|
|
41
|
+
], Re = {
|
|
42
42
|
class: "sr-only",
|
|
43
43
|
role: "status"
|
|
44
|
-
},
|
|
44
|
+
}, ze = {
|
|
45
45
|
key: 1,
|
|
46
46
|
class: "bb-dropdown__footer"
|
|
47
|
-
},
|
|
47
|
+
}, Be = "bb-dropdown:open", Ve = 500, He = 10, y = /*@__PURE__*/ Se({
|
|
48
48
|
inheritAttrs: !1,
|
|
49
49
|
__name: "BbDropdown",
|
|
50
50
|
props: {
|
|
@@ -53,6 +53,7 @@ var Pe = [
|
|
|
53
53
|
type: Boolean,
|
|
54
54
|
default: void 0
|
|
55
55
|
},
|
|
56
|
+
compact: { type: Boolean },
|
|
56
57
|
anchor: {},
|
|
57
58
|
boundary: {},
|
|
58
59
|
disabled: { type: Boolean },
|
|
@@ -67,34 +68,35 @@ var Pe = [
|
|
|
67
68
|
padding: { default: 10 },
|
|
68
69
|
placement: { default: "bottom" },
|
|
69
70
|
queryDebounceTime: { default: 300 },
|
|
70
|
-
transitionDuration: { default:
|
|
71
|
+
transitionDuration: { default: ee.fast },
|
|
71
72
|
trigger: { default: "click" },
|
|
72
73
|
width: { default: "auto" }
|
|
73
74
|
},
|
|
74
75
|
emits: ["item:selected", "item:unselected"],
|
|
75
|
-
setup(
|
|
76
|
-
let y =
|
|
77
|
-
process.env.NODE_ENV !== "production" &&
|
|
78
|
-
let
|
|
76
|
+
setup(ee, { emit: Se }) {
|
|
77
|
+
let y = ee, Ue = Se, We = e();
|
|
78
|
+
process.env.NODE_ENV !== "production" && a("BbDropdown", r("BbDropdown"));
|
|
79
|
+
let Ge = i(), b = y.id ?? `bb_${t().id.value}`, x = Symbol("bb-dropdown-escape"), S = h(b), C = h(), Ke = d(() => o(C.value)), qe = d(() => y.activator != null), w = h(!1), Je = n(w, { initialValue: y.eager }), Ye = ce(w, () => y.transitionDuration), T = m({}), Xe = m(/* @__PURE__ */ new Set()), { isMobile: Ze } = oe(), Qe = () => (y.adaptive ?? We.adaptive) && Ze.value ? "canvas" : "popover", $e = h(Qe()), E = d(() => $e.value === "canvas");
|
|
79
80
|
v([
|
|
80
81
|
() => y.adaptive,
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
Ze,
|
|
83
|
+
w
|
|
83
84
|
], () => {
|
|
84
|
-
|
|
85
|
-
}),
|
|
86
|
-
let
|
|
85
|
+
w.value || ($e.value = Qe());
|
|
86
|
+
}), se(E);
|
|
87
|
+
let et = d(() => ({
|
|
87
88
|
side: "bottom",
|
|
88
89
|
size: "auto",
|
|
89
90
|
draggable: !0,
|
|
90
91
|
eager: y.eager,
|
|
91
92
|
disabled: y.disabled,
|
|
92
93
|
transitionDuration: y.transitionDuration,
|
|
94
|
+
hideClose: !0,
|
|
93
95
|
...y.offCanvasProps
|
|
94
|
-
})),
|
|
96
|
+
})), tt = d(() => {
|
|
95
97
|
let e = y.trigger;
|
|
96
98
|
return new Set(Array.isArray(e) ? e : [e]);
|
|
97
|
-
}),
|
|
99
|
+
}), nt = (e, t) => ({ getBoundingClientRect: () => ({
|
|
98
100
|
x: e,
|
|
99
101
|
y: t,
|
|
100
102
|
width: 0,
|
|
@@ -106,23 +108,23 @@ var Pe = [
|
|
|
106
108
|
toJSON() {
|
|
107
109
|
return this;
|
|
108
110
|
}
|
|
109
|
-
}) }), D = h(null),
|
|
110
|
-
let t =
|
|
111
|
-
t && (
|
|
112
|
-
},
|
|
113
|
-
if (
|
|
114
|
-
|
|
111
|
+
}) }), D = h(null), rt = d(() => y.anchor ?? C.value), it = d(() => o(rt.value)), at = d(() => y.placement === "cursor" && D.value ? D.value : rt.value), ot = (e) => {
|
|
112
|
+
let t = o(e);
|
|
113
|
+
t && (C.value = t);
|
|
114
|
+
}, st = !1, { resume: ct, pause: lt } = Pe(Ke, async ([{ intersectionRatio: e }]) => {
|
|
115
|
+
if (st) {
|
|
116
|
+
st = !1;
|
|
115
117
|
return;
|
|
116
118
|
}
|
|
117
|
-
e !== 1 &&
|
|
119
|
+
e !== 1 && w.value && await Q();
|
|
118
120
|
}, {
|
|
119
121
|
threshold: [0, 1],
|
|
120
122
|
immediate: !1
|
|
121
|
-
}), O = m({}),
|
|
123
|
+
}), O = m({}), ut = m(/* @__PURE__ */ new Map()), k = m(/* @__PURE__ */ new Map()), A = (e, t) => {
|
|
122
124
|
for (let n of e) {
|
|
123
|
-
if (
|
|
125
|
+
if (u(n)) {
|
|
124
126
|
if (n.key === t) return n;
|
|
125
|
-
for (let e of
|
|
127
|
+
for (let e of l(n.items)) {
|
|
126
128
|
let n = Array.isArray(e) ? e : [e];
|
|
127
129
|
for (let e of n) {
|
|
128
130
|
let n = e.items ? A(e.items, t) : void 0;
|
|
@@ -146,9 +148,9 @@ var Pe = [
|
|
|
146
148
|
if (e) return e;
|
|
147
149
|
continue;
|
|
148
150
|
}
|
|
149
|
-
if (
|
|
151
|
+
if (u(n)) {
|
|
150
152
|
if (n.key === t) return "group";
|
|
151
|
-
for (let e of
|
|
153
|
+
for (let e of l(n.items)) {
|
|
152
154
|
let n = Array.isArray(e) ? e : [e];
|
|
153
155
|
for (let e of n) {
|
|
154
156
|
if (e.key === t) return "item";
|
|
@@ -166,7 +168,7 @@ var Pe = [
|
|
|
166
168
|
if (e) return e;
|
|
167
169
|
}
|
|
168
170
|
}
|
|
169
|
-
},
|
|
171
|
+
}, dt = d(() => Array.from(ut.values()).map((e) => e.value).sort((e, t) => e.order - t.order)), ft = (e, t) => ({
|
|
170
172
|
...e,
|
|
171
173
|
group: !0,
|
|
172
174
|
key: e.key,
|
|
@@ -179,7 +181,7 @@ var Pe = [
|
|
|
179
181
|
"append:icon": t["append:icon"] ?? e["append:icon"],
|
|
180
182
|
variant: t.variant ?? e.variant,
|
|
181
183
|
onClick: t.onClick ?? e.onClick
|
|
182
|
-
}),
|
|
184
|
+
}), pt = (e, t) => ({
|
|
183
185
|
group: !0,
|
|
184
186
|
key: e.key,
|
|
185
187
|
label: e.label ?? t?.label,
|
|
@@ -191,10 +193,10 @@ var Pe = [
|
|
|
191
193
|
"append:icon": e["append:icon"] ?? t?.["append:icon"],
|
|
192
194
|
variant: e.variant ?? t?.variant,
|
|
193
195
|
onClick: e.onClick ?? t?.onClick
|
|
194
|
-
}),
|
|
196
|
+
}), M = (e, t) => {
|
|
195
197
|
let n = !1, r = (e) => {
|
|
196
198
|
if (!e.items) return e;
|
|
197
|
-
let r =
|
|
199
|
+
let r = M(e.items, t);
|
|
198
200
|
return r.found ? (n = !0, {
|
|
199
201
|
...e,
|
|
200
202
|
items: r.items
|
|
@@ -202,42 +204,42 @@ var Pe = [
|
|
|
202
204
|
};
|
|
203
205
|
return {
|
|
204
206
|
items: e.map((e) => {
|
|
205
|
-
if (
|
|
206
|
-
if (e.key === t.key) return n = !0,
|
|
207
|
+
if (u(e)) {
|
|
208
|
+
if (e.key === t.key) return n = !0, ft(e, t);
|
|
207
209
|
if (typeof e.items == "function") return e;
|
|
208
|
-
let i =
|
|
210
|
+
let i = l(e.items).map((e) => Array.isArray(e) ? e.map((e) => r(e)) : r(e));
|
|
209
211
|
return {
|
|
210
212
|
...e,
|
|
211
213
|
items: i
|
|
212
214
|
};
|
|
213
215
|
}
|
|
214
216
|
if (Array.isArray(e)) {
|
|
215
|
-
let r =
|
|
217
|
+
let r = M(e, t);
|
|
216
218
|
return r.found && (n = !0), r.items;
|
|
217
219
|
}
|
|
218
220
|
return r(e);
|
|
219
221
|
}),
|
|
220
222
|
found: n
|
|
221
223
|
};
|
|
222
|
-
},
|
|
224
|
+
}, N = d(() => {
|
|
223
225
|
let e = [...y.items ?? []];
|
|
224
|
-
for (let t of
|
|
226
|
+
for (let t of dt.value) {
|
|
225
227
|
let n = A(e, t.key);
|
|
226
|
-
!n && !t.items?.length && (j(e, t.key) === "item" &&
|
|
227
|
-
let r =
|
|
228
|
+
!n && !t.items?.length && (j(e, t.key) === "item" && Ge.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 key.`), Ge.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 key in \`BbDropdown.items\`.`));
|
|
229
|
+
let r = pt(t, n), i = M(e, r);
|
|
228
230
|
e = i.found ? i.items : [...i.items, r];
|
|
229
231
|
}
|
|
230
232
|
return e;
|
|
231
|
-
}),
|
|
233
|
+
}), P = d(() => ue(N.value).map((e) => e.selectable ? {
|
|
232
234
|
...e,
|
|
233
235
|
selected: O[e.key ?? ""] ?? []
|
|
234
|
-
} : e)),
|
|
235
|
-
for (let n of e) if (
|
|
236
|
+
} : e)), F = d(() => le(P.value)), I = h(), mt = d(() => F.value || E.value ? "dialog" : "menu"), ht = d(() => F.value && !E.value ? `dialog_${b}` : `menu_${b}`), gt = (e) => typeof e.items == "function" || e.itemText != null || e.itemValue != null || e.max != null, L = (e, t = []) => {
|
|
237
|
+
for (let n of e) if (u(n)) {
|
|
236
238
|
n.key && gt(n) && t.push(n.key);
|
|
237
|
-
for (let e of
|
|
238
|
-
} else Array.isArray(n) ?
|
|
239
|
+
for (let e of l(n.items)) for (let n of Array.isArray(e) ? e : [e]) n.items && L(n.items, t);
|
|
240
|
+
} else Array.isArray(n) ? L(n, t) : n.items && L(n.items, t);
|
|
239
241
|
return t;
|
|
240
|
-
},
|
|
242
|
+
}, R = d(() => L(y.items ?? [])), _t = d(() => (y.items ?? []).filter((e) => u(e) && !!e.key && gt(e)).map((e) => e.key)), z = m({}), vt = m({}), yt = m({}), B = (e, t) => R.value.includes(e) ? z[e]?.valueByKey.get(t) : t, bt = (e) => {
|
|
241
243
|
let t = A(y.items ?? [], e);
|
|
242
244
|
if (t) return {
|
|
243
245
|
multiple: t.multiple ?? !1,
|
|
@@ -253,15 +255,15 @@ var Pe = [
|
|
|
253
255
|
}
|
|
254
256
|
}
|
|
255
257
|
};
|
|
256
|
-
return t(
|
|
257
|
-
},
|
|
258
|
+
return t(N.value);
|
|
259
|
+
}, xt = (e, t) => R.value.includes(e) ? pe(t) : t, St = (e) => {
|
|
258
260
|
if (k.has(e)) return k.get(e);
|
|
259
261
|
let t = (O[e] ?? []).map((t) => B(e, t));
|
|
260
|
-
return
|
|
262
|
+
return bt(e)?.multiple ? t : t[0] ?? null;
|
|
261
263
|
};
|
|
262
264
|
he({
|
|
263
|
-
register: (e, t) =>
|
|
264
|
-
unregister: (e) =>
|
|
265
|
+
register: (e, t) => ut.set(e, t),
|
|
266
|
+
unregister: (e) => ut.delete(e),
|
|
265
267
|
seed: (e, t) => {
|
|
266
268
|
e in O || (O[e] = t);
|
|
267
269
|
},
|
|
@@ -269,48 +271,48 @@ var Pe = [
|
|
|
269
271
|
O[e] = t;
|
|
270
272
|
},
|
|
271
273
|
selectionFor: (e) => O[e] ?? [],
|
|
272
|
-
isPipeline: (e) =>
|
|
274
|
+
isPipeline: (e) => R.value.includes(e),
|
|
273
275
|
publishPipeline: (e, t) => {
|
|
274
|
-
t ?
|
|
276
|
+
t ? z[e] = t : delete z[e];
|
|
275
277
|
},
|
|
276
278
|
publishLoading: (e, t) => {
|
|
277
|
-
t ?
|
|
279
|
+
t ? vt[e] = !0 : delete vt[e];
|
|
278
280
|
},
|
|
279
281
|
publishFetching: (e, t) => {
|
|
280
|
-
t ?
|
|
282
|
+
t ? yt[e] = !0 : delete yt[e];
|
|
281
283
|
},
|
|
282
284
|
publishModel: (e, t) => {
|
|
283
285
|
t === void 0 ? k.delete(e) : k.set(e, t);
|
|
284
286
|
},
|
|
285
|
-
modelValueFor:
|
|
287
|
+
modelValueFor: St,
|
|
286
288
|
valueForKey: B,
|
|
287
|
-
keyForValue:
|
|
288
|
-
itemForKey: (e, t) =>
|
|
289
|
+
keyForValue: xt,
|
|
290
|
+
itemForKey: (e, t) => z[e]?.itemByKey.get(t) ?? V(e)?.items.find((e) => e.key === t),
|
|
289
291
|
configFor: (e) => A(y.items ?? [], e),
|
|
290
292
|
itemsFor: (e) => V(e)?.items ?? [],
|
|
291
|
-
selectableFor: (e) =>
|
|
292
|
-
multipleFor: (e) =>
|
|
293
|
+
selectableFor: (e) => bt(e)?.selectable,
|
|
294
|
+
multipleFor: (e) => bt(e)?.multiple
|
|
293
295
|
});
|
|
294
296
|
let H = (e, t = []) => {
|
|
295
|
-
for (let n of e) if (
|
|
297
|
+
for (let n of e) if (u(n)) {
|
|
296
298
|
let e = n.selectable ?? n.multiple != null;
|
|
297
299
|
n.key && e && t.push(n.key);
|
|
298
|
-
for (let e of
|
|
300
|
+
for (let e of l(n.items)) for (let n of Array.isArray(e) ? e : [e]) n.items && H(n.items, t);
|
|
299
301
|
} else Array.isArray(n) ? H(n, t) : n.items && H(n.items, t);
|
|
300
302
|
return t;
|
|
301
|
-
},
|
|
303
|
+
}, Ct = d(() => {
|
|
302
304
|
let e = {};
|
|
303
|
-
for (let t of H(
|
|
304
|
-
let n =
|
|
305
|
+
for (let t of H(N.value)) {
|
|
306
|
+
let n = St(t), r = [].concat(n).filter((e) => e != null), i = z[t], a = V(t), o = A(N.value, t), { items: ee, ...s } = o ?? {};
|
|
305
307
|
e[t] = {
|
|
306
308
|
...s,
|
|
307
309
|
key: t,
|
|
308
310
|
value: n,
|
|
309
311
|
multiple: o?.multiple ?? !1,
|
|
310
312
|
selectable: o?.selectable ?? o?.multiple != null,
|
|
311
|
-
loading: !!
|
|
313
|
+
loading: !!yt[t],
|
|
312
314
|
selectedOptions: r.map((e) => {
|
|
313
|
-
let n =
|
|
315
|
+
let n = xt(t, e);
|
|
314
316
|
return {
|
|
315
317
|
value: e,
|
|
316
318
|
text: i?.textByKey.get(n) ?? a?.items.find((e) => e.key === n)?.text,
|
|
@@ -321,11 +323,11 @@ var Pe = [
|
|
|
321
323
|
}
|
|
322
324
|
return e;
|
|
323
325
|
});
|
|
324
|
-
|
|
325
|
-
open: () =>
|
|
326
|
-
groups: () =>
|
|
326
|
+
ae(() => y.id, {
|
|
327
|
+
open: () => w.value,
|
|
328
|
+
groups: () => Ct.value
|
|
327
329
|
});
|
|
328
|
-
let
|
|
330
|
+
let wt = d(() => P.value.filter((e) => e.selectable).length), Tt = (e, t) => {
|
|
329
331
|
let n = e.key;
|
|
330
332
|
if (!n) return;
|
|
331
333
|
let r = O[n] ?? [], i = new Set(r);
|
|
@@ -334,19 +336,19 @@ var Pe = [
|
|
|
334
336
|
O[n] = a;
|
|
335
337
|
let o = a.filter((e) => !r.includes(e)), ee = r.filter((e) => !a.includes(e)), s = (t) => e.items.find((e) => e.key === t);
|
|
336
338
|
o.forEach((e) => {
|
|
337
|
-
s(e) &&
|
|
339
|
+
s(e) && Ue("item:selected", B(n, e));
|
|
338
340
|
}), ee.forEach((e) => {
|
|
339
|
-
s(e) &&
|
|
341
|
+
s(e) && Ue("item:unselected", B(n, e));
|
|
340
342
|
});
|
|
341
|
-
let te =
|
|
343
|
+
let te = wt.value === 1 && P.value.some((e) => e.selectable && e.key === n);
|
|
342
344
|
o.length && !e.multiple && te && (Q(), G());
|
|
343
|
-
}, U = m(/* @__PURE__ */ new Set()),
|
|
345
|
+
}, U = m(/* @__PURE__ */ new Set()), Et = (e) => U.has(e), Dt = d(() => U.size > 0), Ot = (e) => e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function", kt = async () => {
|
|
344
346
|
await Q();
|
|
345
347
|
let e = document.activeElement;
|
|
346
348
|
e instanceof HTMLElement && e !== document.body && !e.closest(`[data-bb-dropdown-surface="${b}"]`) || G();
|
|
347
|
-
},
|
|
349
|
+
}, At = async (e, t, { close: n = !1 } = {}) => {
|
|
348
350
|
let r = e.onClick?.(t);
|
|
349
|
-
if (n && await
|
|
351
|
+
if (n && await kt(), Ot(r)) {
|
|
350
352
|
U.add(e.key);
|
|
351
353
|
try {
|
|
352
354
|
await r;
|
|
@@ -354,37 +356,37 @@ var Pe = [
|
|
|
354
356
|
U.delete(e.key);
|
|
355
357
|
}
|
|
356
358
|
}
|
|
357
|
-
}, W =
|
|
358
|
-
(
|
|
359
|
+
}, W = je("rootList"), G = () => {
|
|
360
|
+
(C.value ?? (S.value ? document.getElementById(S.value) : null))?.focus();
|
|
359
361
|
};
|
|
360
362
|
de({
|
|
361
363
|
rootId: b,
|
|
362
|
-
activatorId:
|
|
364
|
+
activatorId: S,
|
|
363
365
|
setStatus: (e) => {
|
|
364
|
-
|
|
366
|
+
I.value = e;
|
|
365
367
|
},
|
|
366
|
-
status:
|
|
367
|
-
open:
|
|
368
|
-
queryFor: (e) =>
|
|
368
|
+
status: I,
|
|
369
|
+
open: w,
|
|
370
|
+
queryFor: (e) => T[e] ?? "",
|
|
369
371
|
setQuery: (e, t) => {
|
|
370
|
-
|
|
372
|
+
T[e] = t;
|
|
371
373
|
},
|
|
372
374
|
activateGroup: (e) => {
|
|
373
|
-
|
|
375
|
+
Xe.has(e) || Xe.add(e);
|
|
374
376
|
},
|
|
375
|
-
isActivated: (e) =>
|
|
376
|
-
isPipelineGroup: (e) =>
|
|
377
|
-
isGroupLoading: (e) => !!
|
|
377
|
+
isActivated: (e) => Xe.has(e),
|
|
378
|
+
isPipelineGroup: (e) => R.value.includes(e),
|
|
379
|
+
isGroupLoading: (e) => !!vt[e],
|
|
378
380
|
isTopLevelPipeline: (e) => _t.value.includes(e),
|
|
379
|
-
queryDebounceTime:
|
|
381
|
+
queryDebounceTime: d(() => y.queryDebounceTime ?? 300),
|
|
380
382
|
selectedFor: (e) => O[e] ?? [],
|
|
381
|
-
loadingText:
|
|
382
|
-
noDataText:
|
|
383
|
-
enforceCoherence:
|
|
384
|
-
placement:
|
|
385
|
-
disabled:
|
|
383
|
+
loadingText: d(() => y.loadingText),
|
|
384
|
+
noDataText: d(() => y.noDataText),
|
|
385
|
+
enforceCoherence: d(() => y.enforceCoherence),
|
|
386
|
+
placement: d(() => y.placement),
|
|
387
|
+
disabled: d(() => !!y.disabled),
|
|
386
388
|
selectedChipsFor: (e) => {
|
|
387
|
-
let t = V(e), n =
|
|
389
|
+
let t = V(e), n = z[e];
|
|
388
390
|
return (O[e] ?? []).map((e) => ({
|
|
389
391
|
key: e,
|
|
390
392
|
text: n?.textByKey.get(e) ?? t?.items.find((t) => t.key === e)?.text ?? e
|
|
@@ -392,142 +394,147 @@ var Pe = [
|
|
|
392
394
|
},
|
|
393
395
|
deselect: (e, t) => {
|
|
394
396
|
let n = O[e] ?? [];
|
|
395
|
-
n.includes(t) && (O[e] = n.filter((e) => e !== t),
|
|
397
|
+
n.includes(t) && (O[e] = n.filter((e) => e !== t), Ue("item:unselected", B(e, t)));
|
|
396
398
|
},
|
|
397
399
|
close: () => Q(),
|
|
398
400
|
focusActivator: G,
|
|
399
|
-
toggleSelect:
|
|
400
|
-
isItemLoading:
|
|
401
|
-
runItemAction:
|
|
402
|
-
slots:
|
|
401
|
+
toggleSelect: Tt,
|
|
402
|
+
isItemLoading: Et,
|
|
403
|
+
runItemAction: At,
|
|
404
|
+
slots: Ae()
|
|
403
405
|
});
|
|
404
|
-
let
|
|
406
|
+
let jt = (e) => {
|
|
405
407
|
if (!y.disabled) {
|
|
406
408
|
if (q) {
|
|
407
409
|
q = !1, e.preventDefault(), e.stopPropagation();
|
|
408
410
|
return;
|
|
409
411
|
}
|
|
410
|
-
e.stopPropagation(), y.placement === "cursor" && (D.value =
|
|
412
|
+
e.stopPropagation(), y.placement === "cursor" && (D.value = nt(e.clientX, e.clientY)), w.value ? Q() : Z();
|
|
411
413
|
}
|
|
412
|
-
},
|
|
414
|
+
}, Mt = async (e) => {
|
|
413
415
|
if (!y.disabled) {
|
|
414
416
|
if (e.preventDefault(), e.stopPropagation(), y.placement === "cursor") {
|
|
415
|
-
let t =
|
|
416
|
-
if (
|
|
417
|
-
await Q(), await
|
|
417
|
+
let t = nt(e.clientX, e.clientY);
|
|
418
|
+
if (w.value) {
|
|
419
|
+
await Q(), await c(y.transitionDuration), D.value = t, await Z();
|
|
418
420
|
return;
|
|
419
421
|
}
|
|
420
422
|
D.value = t;
|
|
421
423
|
}
|
|
422
|
-
|
|
424
|
+
w.value ? Q() : Z();
|
|
423
425
|
}
|
|
424
|
-
},
|
|
425
|
-
clearTimeout(
|
|
426
|
-
},
|
|
426
|
+
}, Nt, K = null, q = !1, J = () => {
|
|
427
|
+
clearTimeout(Nt), K = null;
|
|
428
|
+
}, Pt = (e) => {
|
|
427
429
|
y.disabled || e.pointerType === "mouse" || (q = !1, K = {
|
|
428
430
|
x: e.clientX,
|
|
429
431
|
y: e.clientY
|
|
430
|
-
},
|
|
431
|
-
q = !0, y.placement === "cursor" && K && (D.value =
|
|
432
|
-
},
|
|
433
|
-
},
|
|
432
|
+
}, Nt = setTimeout(() => {
|
|
433
|
+
q = !0, y.placement === "cursor" && K && (D.value = nt(K.x, K.y)), K = null, Z();
|
|
434
|
+
}, Ve));
|
|
435
|
+
}, Ft = (e) => {
|
|
434
436
|
if (!K) return;
|
|
435
437
|
let t = e.clientX - K.x, n = e.clientY - K.y;
|
|
436
|
-
Math.sqrt(t * t + n * n) >
|
|
438
|
+
Math.sqrt(t * t + n * n) > He && J();
|
|
437
439
|
}, Y = () => {
|
|
438
440
|
J();
|
|
439
|
-
},
|
|
440
|
-
y.disabled || (e.key === "ArrowDown" ? (e.preventDefault(),
|
|
441
|
+
}, It = async (e) => {
|
|
442
|
+
y.disabled || (e.key === "ArrowDown" ? (e.preventDefault(), w.value || await Z(), await c(0), W.value?.focusFirst()) : e.key === "ArrowUp" ? (e.preventDefault(), w.value || await Z(), await c(0), W.value?.focusLast()) : e.key === "Tab" && w.value && !e.shiftKey && (e.preventDefault(), W.value?.focusFirst()));
|
|
441
443
|
}, X = (e) => {
|
|
442
444
|
let t = e.target;
|
|
443
445
|
t instanceof HTMLElement && (t.closest(`[data-bb-dropdown-surface="${b}"]`) || Q());
|
|
444
|
-
},
|
|
446
|
+
}, Lt = (e) => {
|
|
445
447
|
let t = e.detail;
|
|
446
448
|
!t || t.surfaceId === b || t.activator?.closest(`[data-bb-dropdown-surface="${b}"]`) || Q();
|
|
447
|
-
},
|
|
448
|
-
!
|
|
449
|
+
}, Rt = (e) => {
|
|
450
|
+
!w.value || e.key !== "Escape" || ne(x) && (e.stopImmediatePropagation(), e.preventDefault(), document.activeElement !== C.value && G(), Q());
|
|
449
451
|
}, Z = async () => {
|
|
450
|
-
|
|
452
|
+
$e.value = Qe(), st = !0, w.value = !0, document.dispatchEvent(new CustomEvent(Be, { detail: {
|
|
451
453
|
surfaceId: b,
|
|
452
|
-
activator:
|
|
453
|
-
} })), !
|
|
454
|
+
activator: C.value
|
|
455
|
+
} })), !E.value && (ct(), re(x), document.addEventListener("click", X, { passive: !0 }), document.addEventListener("contextmenu", X, { passive: !0 }), document.addEventListener("focusin", X, { passive: !0 }), document.addEventListener("keydown", Rt, { capture: !0 }), document.addEventListener(Be, Lt));
|
|
454
456
|
}, Q = async () => {
|
|
455
|
-
|
|
456
|
-
},
|
|
457
|
-
|
|
457
|
+
w.value = !1, lt();
|
|
458
|
+
}, zt = () => {
|
|
459
|
+
ie(x), document.removeEventListener("click", X), document.removeEventListener("contextmenu", X), document.removeEventListener("focusin", X), document.removeEventListener("keydown", Rt, { capture: !0 }), document.removeEventListener(Be, Lt);
|
|
458
460
|
};
|
|
459
|
-
v(
|
|
461
|
+
v(w, (e) => {
|
|
460
462
|
if (!e) {
|
|
461
|
-
|
|
462
|
-
for (let e of Object.keys(
|
|
463
|
+
zt();
|
|
464
|
+
for (let e of Object.keys(T)) T[e] = "";
|
|
463
465
|
}
|
|
464
466
|
}), v(() => y.activator, (e) => {
|
|
465
|
-
e &&
|
|
467
|
+
e && ot(e);
|
|
466
468
|
}, { immediate: !0 });
|
|
467
469
|
let $ = null;
|
|
468
|
-
v([
|
|
470
|
+
v([C, tt], ([e, t]) => {
|
|
469
471
|
if ($ &&= ($(), null), !e) return;
|
|
470
472
|
let n = !1;
|
|
471
|
-
e.id || (e.id = b, n = !0),
|
|
473
|
+
e.id || (e.id = b, n = !0), S.value = e.id;
|
|
472
474
|
let r = [];
|
|
473
|
-
t.has("click") && (e.addEventListener("click",
|
|
474
|
-
e.removeEventListener("contextmenu",
|
|
475
|
-
})), e.addEventListener("keydown",
|
|
475
|
+
t.has("click") && (e.addEventListener("click", jt), r.push(() => e.removeEventListener("click", jt))), t.has("contextMenu") && (e.addEventListener("contextmenu", Mt), e.addEventListener("pointerdown", Pt), e.addEventListener("pointermove", Ft), e.addEventListener("pointerup", Y), e.addEventListener("pointercancel", Y), r.push(() => {
|
|
476
|
+
e.removeEventListener("contextmenu", Mt), e.removeEventListener("pointerdown", Pt), e.removeEventListener("pointermove", Ft), e.removeEventListener("pointerup", Y), e.removeEventListener("pointercancel", Y), J();
|
|
477
|
+
})), e.addEventListener("keydown", It), r.push(() => e.removeEventListener("keydown", It)), $ = () => {
|
|
476
478
|
r.forEach((e) => e()), n && e.removeAttribute("id"), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls");
|
|
477
479
|
};
|
|
478
480
|
}, { immediate: !0 }), v([
|
|
479
|
-
S,
|
|
480
481
|
C,
|
|
481
|
-
|
|
482
|
+
w,
|
|
483
|
+
Je,
|
|
482
484
|
mt,
|
|
483
485
|
ht
|
|
484
486
|
], ([e, t, n, r, i]) => {
|
|
485
487
|
e && (e.setAttribute("aria-haspopup", r), e.setAttribute("aria-expanded", n ? String(t) : "false"), n ? e.setAttribute("aria-controls", i) : e.removeAttribute("aria-controls"));
|
|
486
|
-
}, { immediate: !0 }),
|
|
487
|
-
J(), $?.(),
|
|
488
|
+
}, { immediate: !0 }), De(() => {
|
|
489
|
+
J(), $?.(), zt();
|
|
488
490
|
});
|
|
489
|
-
let { width:
|
|
491
|
+
let Bt = d(() => y.width === "auto"), { width: Vt } = Ne(d(() => w.value ? it.value : null), {
|
|
490
492
|
width: 0,
|
|
491
493
|
height: 0
|
|
492
|
-
}, { box: "border-box" }),
|
|
494
|
+
}, { box: "border-box" }), Ht = d(() => {
|
|
493
495
|
if (y.width !== "auto") {
|
|
494
496
|
if (y.width) {
|
|
495
|
-
let { value: e, unit: t } =
|
|
496
|
-
return t === "%" ?
|
|
497
|
+
let { value: e, unit: t } = te(y.width);
|
|
498
|
+
return t === "%" ? it.value ? `${Vt.value * (e / 100)}px` : "0px" : `${e}px`;
|
|
497
499
|
}
|
|
498
500
|
return "0px";
|
|
499
501
|
}
|
|
500
502
|
});
|
|
501
|
-
return (e, t) => (p(), f(
|
|
502
|
-
|
|
503
|
-
props: { ref:
|
|
503
|
+
return (e, t) => (p(), f(_e, null, [
|
|
504
|
+
qe.value ? ye("", !0) : g(e.$slots, "activator", Te(Ce({ key: 0 }, {
|
|
505
|
+
props: { ref: ot },
|
|
504
506
|
disabled: e.disabled,
|
|
505
|
-
loading:
|
|
506
|
-
open:
|
|
507
|
+
loading: Dt.value,
|
|
508
|
+
open: w.value,
|
|
507
509
|
placement: e.placement
|
|
508
510
|
}))),
|
|
509
511
|
g(e.$slots, "default"),
|
|
510
|
-
(p(!0), f(
|
|
512
|
+
(p(!0), f(_e, null, Oe(R.value, (e) => (p(), ve(ge, {
|
|
511
513
|
id: e,
|
|
512
514
|
key: e
|
|
513
515
|
}, null, 8, ["id"]))), 128)),
|
|
514
|
-
|
|
516
|
+
E.value ? (p(), ve(me, {
|
|
515
517
|
key: 1,
|
|
516
|
-
modelValue:
|
|
517
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
518
|
-
|
|
519
|
-
"
|
|
518
|
+
modelValue: w.value,
|
|
519
|
+
"onUpdate:modelValue": t[0] ||= (e) => w.value = e,
|
|
520
|
+
compact: e.compact,
|
|
521
|
+
"off-canvas-props": et.value,
|
|
522
|
+
"root-groups": P.value
|
|
520
523
|
}, null, 8, [
|
|
521
524
|
"modelValue",
|
|
525
|
+
"compact",
|
|
522
526
|
"off-canvas-props",
|
|
523
527
|
"root-groups"
|
|
524
|
-
])) : (p(),
|
|
528
|
+
])) : (p(), ve(s, Ce({
|
|
525
529
|
key: 2,
|
|
526
|
-
modelValue:
|
|
527
|
-
"onUpdate:modelValue": t[1] ||= (e) =>
|
|
528
|
-
anchor:
|
|
530
|
+
modelValue: w.value,
|
|
531
|
+
"onUpdate:modelValue": t[1] ||= (e) => w.value = e,
|
|
532
|
+
anchor: at.value,
|
|
529
533
|
boundary: e.boundary,
|
|
530
|
-
class: ["bb-dropdown", {
|
|
534
|
+
class: ["bb-dropdown", {
|
|
535
|
+
"bb-dropdown--mobile": _(Ze),
|
|
536
|
+
"bb-dropdown--compact": e.compact
|
|
537
|
+
}],
|
|
531
538
|
eager: e.eager,
|
|
532
539
|
"hide-arrow": "",
|
|
533
540
|
offset: e.offset,
|
|
@@ -535,40 +542,40 @@ var Pe = [
|
|
|
535
542
|
placement: e.placement === "cursor" ? "bottom-start" : e.placement,
|
|
536
543
|
"transition-duration": e.transitionDuration
|
|
537
544
|
}, e.$attrs), {
|
|
538
|
-
default:
|
|
539
|
-
id:
|
|
540
|
-
"aria-labelledby":
|
|
541
|
-
class: "bb-dropdown__panel",
|
|
545
|
+
default: Me(({ availableHeight: t }) => [be("span", {
|
|
546
|
+
id: F.value ? `dialog_${_(b)}` : void 0,
|
|
547
|
+
"aria-labelledby": F.value ? S.value : void 0,
|
|
548
|
+
class: we(["bb-dropdown__panel", { "bb-dropdown__panel--reserve-check": Bt.value }]),
|
|
542
549
|
"data-bb-dropdown-surface": _(b),
|
|
543
|
-
inert: _(
|
|
544
|
-
role:
|
|
545
|
-
style:
|
|
546
|
-
"--w":
|
|
550
|
+
inert: _(Ye),
|
|
551
|
+
role: F.value ? "dialog" : void 0,
|
|
552
|
+
style: Ee({
|
|
553
|
+
"--w": Ht.value,
|
|
547
554
|
"--max-h": t == null ? void 0 : `${t}px`
|
|
548
555
|
})
|
|
549
556
|
}, [
|
|
550
|
-
e.$slots.header ? (p(), f("div",
|
|
557
|
+
e.$slots.header ? (p(), f("div", Ie, [g(e.$slots, "header", {
|
|
551
558
|
disabled: e.disabled,
|
|
552
|
-
open:
|
|
559
|
+
open: w.value,
|
|
553
560
|
placement: e.placement
|
|
554
561
|
})])) : ye("", !0),
|
|
555
562
|
be("span", {
|
|
556
563
|
id: `menu_${_(b)}`,
|
|
557
|
-
"aria-labelledby":
|
|
564
|
+
"aria-labelledby": F.value ? void 0 : S.value,
|
|
558
565
|
class: "bb-dropdown__items-container scrollbar-border",
|
|
559
|
-
role:
|
|
566
|
+
role: F.value ? "none" : "menu"
|
|
560
567
|
}, [xe(fe, {
|
|
561
568
|
ref_key: "rootList",
|
|
562
569
|
ref: W,
|
|
563
|
-
groups:
|
|
564
|
-
}, null, 8, ["groups"])], 8,
|
|
565
|
-
be("span",
|
|
566
|
-
e.$slots.footer ? (p(), f("div",
|
|
570
|
+
groups: P.value
|
|
571
|
+
}, null, 8, ["groups"])], 8, Le),
|
|
572
|
+
be("span", Re, ke(I.value), 1),
|
|
573
|
+
e.$slots.footer ? (p(), f("div", ze, [g(e.$slots, "footer", {
|
|
567
574
|
disabled: e.disabled,
|
|
568
|
-
open:
|
|
575
|
+
open: w.value,
|
|
569
576
|
placement: e.placement
|
|
570
577
|
})])) : ye("", !0)
|
|
571
|
-
],
|
|
578
|
+
], 14, Fe)]),
|
|
572
579
|
_: 3
|
|
573
580
|
}, 16, [
|
|
574
581
|
"modelValue",
|