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
package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import ee from "
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
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 { waitFor as s } from "../../utilities/functions/waitFor.js";
|
|
9
|
+
import { transitions as ee } from "../../utilities/misc/transitions.js";
|
|
10
|
+
import te from "../CommonPopover/CommonPopover.vue.js";
|
|
11
|
+
import { parseWidthString as ne } from "../../utilities/functions/parseWidthString.js";
|
|
12
|
+
import { isTopEscapeEntry as re, pushEscapeEntry as ie, removeEscapeEntry as ae } from "../../utils/overlayEscapeStack.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";
|
|
15
16
|
import { wait as c } from "../../utilities/functions/wait.js";
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import { useHashedWatcher as
|
|
30
|
-
import
|
|
31
|
-
import { useIndexById as
|
|
32
|
-
import { useBaseOptions as
|
|
33
|
-
import { useCoherence as
|
|
34
|
-
import { usePrefill as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import { config as Ae } from "virtual:bitboss-ui/config";
|
|
17
|
+
import { get as le } from "../../utilities/functions/get.js";
|
|
18
|
+
import { useLocale as ue } from "../../composables/useLocale.js";
|
|
19
|
+
import de from "../BbIcon/BbIcon.vue.js";
|
|
20
|
+
import fe from "../BbBadge/BbBadge.vue.js";
|
|
21
|
+
import { isNil as pe } from "../../utilities/functions/isNil.js";
|
|
22
|
+
import { matchAnyKey as me } from "../../utilities/functions/matchAnyKey.js";
|
|
23
|
+
import he from "../../assets/svgs/search.svg_raw.js";
|
|
24
|
+
import { useImeDismissBlur as ge } from "../../composables/useImeDismissBlur.js";
|
|
25
|
+
import _e from "../BbOffCanvas/BbOffCanvas.vue.js";
|
|
26
|
+
import ve from "../BbSmoothHeight/BbSmoothHeight.vue.js";
|
|
27
|
+
import { hash as ye } from "../../utilities/functions/hash.js";
|
|
28
|
+
import { useArray as be } from "../../composables/useArray.js";
|
|
29
|
+
import { useItemsGetter as xe } from "../../composables/useItemsGetter.js";
|
|
30
|
+
import { useHashedWatcher as Se } from "../../composables/useHashedWatcher.js";
|
|
31
|
+
import Ce from "../ClearableButton/ClearableButton.vue.js";
|
|
32
|
+
import { useIndexById as we } from "../../composables/useIndexById.js";
|
|
33
|
+
import { useBaseOptions as Te } from "../../composables/useBaseOptions.js";
|
|
34
|
+
import { useCoherence as Ee } from "../../composables/useCoherence.js";
|
|
35
|
+
import { usePrefill as De } from "../../composables/usePrefill.js";
|
|
36
|
+
import Oe from "../ErrorIcon/ErrorIcon.vue.js";
|
|
37
|
+
import ke from "../WarningIcon/WarningIcon.vue.js";
|
|
38
|
+
import Ae from "../ListBox/ListBox.vue.js";
|
|
39
39
|
import { Fragment as je, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as Me, createSlots as Ne, createTextVNode as Pe, createVNode as p, defineComponent as Fe, guardReactiveProps as m, mergeProps as h, nextTick as Ie, normalizeClass as Le, normalizeProps as g, onBeforeMount as Re, onBeforeUnmount as ze, openBlock as _, ref as v, renderList as Be, renderSlot as y, toDisplayString as Ve, toRef as b, unref as x, vModelText as He, watch as S, withCtx as C, withDirectives as Ue, withKeys as w, withModifiers as T } from "vue";
|
|
40
40
|
import { createReusableTemplate as We, useElementSize as Ge, useIntersectionObserver as Ke } from "@vueuse/core";
|
|
41
41
|
//#region src/components/BbSelectPopover/BbSelectPopover.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -51,6 +51,7 @@ var qe = {
|
|
|
51
51
|
"aria-label",
|
|
52
52
|
"autocomplete",
|
|
53
53
|
"inputmode",
|
|
54
|
+
"placeholder",
|
|
54
55
|
"tabindex",
|
|
55
56
|
"onKeydown"
|
|
56
57
|
], Ye = {
|
|
@@ -124,7 +125,7 @@ var qe = {
|
|
|
124
125
|
default: !0
|
|
125
126
|
},
|
|
126
127
|
stash: { type: Boolean },
|
|
127
|
-
transitionDuration: { default:
|
|
128
|
+
transitionDuration: { default: ee.medium },
|
|
128
129
|
width: { default: "200" }
|
|
129
130
|
},
|
|
130
131
|
emits: [
|
|
@@ -138,77 +139,77 @@ var qe = {
|
|
|
138
139
|
"update:modelValue",
|
|
139
140
|
"option:add"
|
|
140
141
|
],
|
|
141
|
-
setup(
|
|
142
|
-
let E =
|
|
143
|
-
process.env.NODE_ENV !== "production" &&
|
|
144
|
-
let [
|
|
142
|
+
setup(ee, { emit: Fe }) {
|
|
143
|
+
let E = ee, D = Fe, tt = e();
|
|
144
|
+
process.env.NODE_ENV !== "production" && a("BbSelectPopover", r("BbSelectPopover"));
|
|
145
|
+
let [nt, rt] = We(), [it, at] = We();
|
|
145
146
|
Re(() => {
|
|
146
|
-
E.multiple && !Array.isArray(E.modelValue) &&
|
|
147
|
+
E.multiple && !Array.isArray(E.modelValue) && i().throw(`BbSelectPopover: \`multiple\` requires an array modelValue, received ${E.modelValue === null ? "null" : typeof E.modelValue}. Seed it with \`[]\` for an empty selection — \`null\`/\`undefined\` are not accepted, because a multi-select with no array has no way to express "nothing selected" separately from "not ready".`);
|
|
147
148
|
});
|
|
148
|
-
let O = v(), k = v(null), A = v(null),
|
|
149
|
+
let O = v(), k = v(null), A = v(null), ot = v(null), j = v(), M = l(() => {
|
|
149
150
|
if (E.anchor) {
|
|
150
|
-
let e =
|
|
151
|
+
let e = o(E.anchor);
|
|
151
152
|
if (e) return e;
|
|
152
153
|
}
|
|
153
154
|
return O.value;
|
|
154
155
|
}), { width: N } = Ge(M, {
|
|
155
156
|
width: 0,
|
|
156
157
|
height: 0
|
|
157
|
-
}, { box: "border-box" }),
|
|
158
|
-
let t =
|
|
158
|
+
}, { box: "border-box" }), st = l(() => E.activator != null), ct = (e) => {
|
|
159
|
+
let t = o(e);
|
|
159
160
|
t && (O.value = t);
|
|
160
161
|
};
|
|
161
162
|
S(() => E.activator, (e) => {
|
|
162
|
-
e &&
|
|
163
|
+
e && ct(e);
|
|
163
164
|
}, { immediate: !0 });
|
|
164
|
-
let { isMobile: P } =
|
|
165
|
+
let { isMobile: P } = oe(), F = l(() => E.disableWriting === "mobile" ? !P.value : E.disableWriting === "desktop" ? P.value : !E.disableWriting), lt = l(() => E.disableWriting === "mobile" && P.value || E.disableWriting === "desktop" && !P.value ? "none" : void 0), { t: ut } = ue(), dt = l(() => E.searchInputAriaLabel ?? ut("select.searchLabel").value), ft = l(() => !!E.clearable && (H.value.length > 0 || (E.multiple ? Array.isArray(E.modelValue) && E.modelValue.length > 0 : !pe(E.modelValue)))), I = E.id || t().id.value, pt = l(() => E.ariaInvalid ?? !!E.hasErrors ? "true" : void 0), mt = l(() => {
|
|
165
166
|
let e = E.ariaDescribedby;
|
|
166
167
|
if (Array.isArray(e)) return e.map((e) => e.trim()).filter(Boolean).join(" ") || void 0;
|
|
167
168
|
if (typeof e == "string") return e.trim() || void 0;
|
|
168
|
-
}),
|
|
169
|
-
if (
|
|
170
|
-
|
|
169
|
+
}), ht = !1, { resume: gt, pause: _t } = Ke(O, async ([{ intersectionRatio: e }]) => {
|
|
170
|
+
if (ht) {
|
|
171
|
+
ht = !1;
|
|
171
172
|
return;
|
|
172
173
|
}
|
|
173
174
|
e !== 1 && K.value && await Y();
|
|
174
175
|
}, {
|
|
175
176
|
threshold: [0, 1],
|
|
176
177
|
immediate: !1
|
|
177
|
-
}),
|
|
178
|
+
}), vt = l(() => {
|
|
178
179
|
if (E.width === "auto") return "auto";
|
|
179
180
|
if (E.width == null || E.width === "") return N.value ? `${N.value}px` : "320px";
|
|
180
181
|
try {
|
|
181
|
-
let { value: e, unit: t } =
|
|
182
|
+
let { value: e, unit: t } = ne(E.width);
|
|
182
183
|
return t === "%" ? N.value ? `${N.value * (e / 100)}px` : "320px" : `${e}${t}`;
|
|
183
184
|
} catch {
|
|
184
185
|
return typeof E.width == "string" ? E.width.trim() : N.value ? `${N.value}px` : "320px";
|
|
185
186
|
}
|
|
186
|
-
}),
|
|
187
|
+
}), yt = l(() => ({ "--w": vt.value })), L = () => {
|
|
187
188
|
O.value?.focus();
|
|
188
189
|
}, R = () => {
|
|
189
190
|
A.value instanceof HTMLInputElement && A.value.focus();
|
|
190
|
-
}, yt = () => {
|
|
191
|
-
at.value instanceof HTMLButtonElement && at.value.focus();
|
|
192
191
|
}, bt = () => {
|
|
192
|
+
ot.value instanceof HTMLButtonElement && ot.value.focus();
|
|
193
|
+
}, xt = () => {
|
|
193
194
|
if (F.value) {
|
|
194
195
|
R();
|
|
195
196
|
return;
|
|
196
197
|
}
|
|
197
|
-
|
|
198
|
-
},
|
|
198
|
+
bt();
|
|
199
|
+
}, St = () => {
|
|
199
200
|
let e = document.activeElement;
|
|
200
201
|
return e === A.value || !!O.value?.contains(e);
|
|
201
|
-
}, St = (e) => {
|
|
202
|
-
D("focus", e), Z();
|
|
203
202
|
}, Ct = (e) => {
|
|
204
|
-
D("
|
|
203
|
+
D("focus", e), Z();
|
|
205
204
|
}, wt = (e) => {
|
|
206
|
-
D("
|
|
205
|
+
D("blur", e), jn();
|
|
207
206
|
}, Tt = (e) => {
|
|
208
|
-
|
|
207
|
+
D("change", e);
|
|
209
208
|
}, Et = (e) => {
|
|
210
|
-
|
|
209
|
+
Z();
|
|
211
210
|
}, Dt = (e) => {
|
|
211
|
+
D("input", e), nn(), Bt(H.value, !1, E.modelValue);
|
|
212
|
+
}, Ot = (e) => {
|
|
212
213
|
j.value = e;
|
|
213
214
|
}, z = async (e) => {
|
|
214
215
|
let t = e.target instanceof Element ? e.target : e.target instanceof Text ? e.target.parentElement : null;
|
|
@@ -216,32 +217,32 @@ var qe = {
|
|
|
216
217
|
let n = M.value?.contains(t), r = !!t.closest(".bb-common-popover");
|
|
217
218
|
if (n || r) return;
|
|
218
219
|
let i = t instanceof HTMLLabelElement ? t : t.closest("label");
|
|
219
|
-
i?.control && M.value?.contains(i.control) || (await Y(),
|
|
220
|
-
},
|
|
220
|
+
i?.control && M.value?.contains(i.control) || (await Y(), On());
|
|
221
|
+
}, kt = l(() => !(E.readonly || E.disabled || G.value && !Ut.value.length)), At = new AbortController(), jt = async () => s(() => !!k.value, {
|
|
221
222
|
interval: 100,
|
|
222
|
-
signal:
|
|
223
|
-
}),
|
|
223
|
+
signal: At.signal
|
|
224
|
+
}), Mt = () => {
|
|
224
225
|
let e = W.value[0];
|
|
225
226
|
if (e?.valueHash) {
|
|
226
227
|
k.value?.focusByHash(e.valueHash);
|
|
227
228
|
return;
|
|
228
229
|
}
|
|
229
230
|
k.value?.focusFirstSelected();
|
|
230
|
-
},
|
|
231
|
+
}, Nt = () => {
|
|
231
232
|
let e = W.value[W.value.length - 1];
|
|
232
233
|
if (e?.valueHash) {
|
|
233
234
|
k.value?.focusByHash(e.valueHash);
|
|
234
235
|
return;
|
|
235
236
|
}
|
|
236
237
|
k.value?.focusLastSelected();
|
|
237
|
-
}, Nt = async () => {
|
|
238
|
-
Ot.value && (K.value ? k.value?.focusPrevious() : (await J({ focusPopoverContent: !1 }), await At(), await c(E.transitionDuration), Mt()));
|
|
239
238
|
}, Pt = async () => {
|
|
240
|
-
|
|
239
|
+
kt.value && (K.value ? k.value?.focusPrevious() : (await J({ focusPopoverContent: !1 }), await jt(), await c(E.transitionDuration), Nt()));
|
|
241
240
|
}, Ft = async () => {
|
|
242
|
-
|
|
241
|
+
kt.value && (K.value ? k.value?.focusNext() : (await J({ focusPopoverContent: !1 }), await jt(), await c(E.transitionDuration), Mt()));
|
|
242
|
+
}, It = async () => {
|
|
243
|
+
if (!kt.value) return;
|
|
243
244
|
if (!K.value) {
|
|
244
|
-
await J({ focusPopoverContent: !1 }), await
|
|
245
|
+
await J({ focusPopoverContent: !1 }), await jt(), await c(E.transitionDuration), W.value.length ? Mt() : F.value ? R() : bt();
|
|
245
246
|
return;
|
|
246
247
|
} else if (k.value?.getHighlighted()) {
|
|
247
248
|
k.value.confirmOption();
|
|
@@ -249,68 +250,70 @@ var qe = {
|
|
|
249
250
|
}
|
|
250
251
|
if (!F.value) return;
|
|
251
252
|
let e = H.value.trim();
|
|
252
|
-
|
|
253
|
+
an(e) || (D("option:add", e), H.value = "");
|
|
253
254
|
}, B = async () => {
|
|
254
255
|
K.value && (await Y(), L());
|
|
255
|
-
}, V = Symbol("bb-select-popover-escape"),
|
|
256
|
-
!K.value || e.key !== "Escape" ||
|
|
257
|
-
}, H = v(""),
|
|
256
|
+
}, V = Symbol("bb-select-popover-escape"), Lt = (e) => {
|
|
257
|
+
!K.value || e.key !== "Escape" || re(V) && (e.stopImmediatePropagation(), e.preventDefault(), B());
|
|
258
|
+
}, H = v(""), Rt = v(!1), { getter: zt, debouncedGetter: Bt, clientReproducible: Vt, hydratedFromSsr: Ht, items: Ut, loading: Wt } = xe({
|
|
258
259
|
items: b(E, "items"),
|
|
259
260
|
debounce: E.queryDebounceTime
|
|
260
|
-
}), { array:
|
|
261
|
-
|
|
261
|
+
}), { array: Gt, add: Kt, remove: qt, set: Jt } = be(), Yt = l(() => E.multiple ? !!E.modelValue?.length : !pe(E.modelValue)), Xt = l(() => E.prefill === !1 && !Array.isArray(E.items) && F.value && !Yt.value), Zt = l(() => Xt.value && !H.value ? ut("select.searchToStart").value : E.noDataText), { hasPrefilled: Qt, isPrefilling: $t, canLoad: en, prefill: tn, markPrefilled: nn } = De({
|
|
262
|
+
alreadyLoaded: Ht,
|
|
263
|
+
clientReproducible: Vt,
|
|
264
|
+
trigger: l(() => Array.isArray(E.items) || E.prefill === !0 || E.enforceCoherence && Yt.value || E.prefill === "interaction" && Rt.value),
|
|
262
265
|
currentValue: void 0,
|
|
263
266
|
multiple: !1,
|
|
264
267
|
fn: async (e) => {
|
|
265
|
-
await
|
|
268
|
+
await zt(H.value, e, E.modelValue), E.stash && Kt(...U.value.filter((e) => e.selected).map((e) => e.item)), E.enforceCoherence && !sn.value && D("update:modelValue", cn.value);
|
|
266
269
|
}
|
|
267
|
-
}), { data:
|
|
270
|
+
}), { data: rn, get: an } = we({ items: l(() => [].concat(E.modelValue)) }), { options: U } = Te({
|
|
268
271
|
disabled: b(E, "disabled"),
|
|
269
|
-
items: l(() => [...
|
|
272
|
+
items: l(() => [...Ut.value, ...Gt.value]),
|
|
270
273
|
itemText: E.itemText,
|
|
271
274
|
itemValue: E.itemValue,
|
|
272
275
|
max: E.max,
|
|
273
276
|
selectable: b(E, "selectable"),
|
|
274
|
-
selectedIndexedByHash:
|
|
275
|
-
}), { data:
|
|
277
|
+
selectedIndexedByHash: rn
|
|
278
|
+
}), { data: on } = we({
|
|
276
279
|
items: U,
|
|
277
280
|
key: "valueHash"
|
|
278
|
-
}), { coherent:
|
|
281
|
+
}), { coherent: sn, coherentValue: cn } = Ee({
|
|
279
282
|
modelValue: b(E, "modelValue"),
|
|
280
283
|
multiple: E.multiple,
|
|
281
|
-
iteratee: (e) => !!
|
|
282
|
-
}), W = l(() => [].concat(E.modelValue).map((e) =>
|
|
284
|
+
iteratee: (e) => !!on.value[ye(e)]
|
|
285
|
+
}), W = l(() => [].concat(E.modelValue).map((e) => on.value[ye(e)]).filter(Boolean)), ln = (e) => ({
|
|
283
286
|
item: e.item,
|
|
284
287
|
text: e.text,
|
|
285
288
|
value: e.value,
|
|
286
289
|
selected: e.selected ?? !0,
|
|
287
290
|
disabled: e.disabled ?? !1
|
|
288
|
-
}),
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}, { debounce: E.modelValueDebounceTime }),
|
|
292
|
-
|
|
291
|
+
}), un = l(() => W.value.map(ln)), G = l(() => !!(Wt.value || E.loading)), dn = l(() => G.value && U.value.length > 0), fn = l(() => !!E.hasErrors), pn = l(() => !!E.hasWarning && !fn.value), mn = l(() => W.value.map((e) => e.text).filter(Boolean).join(", ") || "");
|
|
292
|
+
Se(() => E.modelValue, async () => {
|
|
293
|
+
en.value && (sn.value || (await zt(H.value, !0, E.modelValue), E.enforceCoherence && (D("update:modelValue", cn.value), k.value?.blur())));
|
|
294
|
+
}, { debounce: E.modelValueDebounceTime }), Se(() => [E.dependencies, E.items], async () => {
|
|
295
|
+
en.value && (await zt(H.value, !0, E.modelValue), E.enforceCoherence && !sn.value && (D("update:modelValue", cn.value), k.value?.blur()));
|
|
293
296
|
}, { debounce: E.depsDebounceTime });
|
|
294
|
-
let
|
|
295
|
-
let t =
|
|
296
|
-
E.multiple ? (D("update:modelValue", E.modelValue.concat(e.value)), E.stash &&
|
|
297
|
-
},
|
|
298
|
-
let t =
|
|
297
|
+
let hn = async (e) => {
|
|
298
|
+
let t = St();
|
|
299
|
+
E.multiple ? (D("update:modelValue", E.modelValue.concat(e.value)), E.stash && Kt(e.item)) : (E.stash && Jt(e.item), D("update:modelValue", e.value), await Ie()), E.multiple && F.value && K.value ? t && R() : L(), E.multiple || Y();
|
|
300
|
+
}, gn = async (e) => {
|
|
301
|
+
let t = St();
|
|
299
302
|
if (!E.multiple) {
|
|
300
303
|
L(), Y();
|
|
301
304
|
return;
|
|
302
305
|
}
|
|
303
|
-
|
|
304
|
-
let n = { ...
|
|
306
|
+
qt((t) => t.valueHash !== e.valueHash);
|
|
307
|
+
let n = { ...rn.value };
|
|
305
308
|
delete n[e.valueHash], D("update:modelValue", Object.values(n)), F.value && K.value ? t && R() : L();
|
|
306
|
-
},
|
|
309
|
+
}, _n = l(() => {
|
|
307
310
|
if (!H.value || !E.multiple && W.value.some((e) => e.text === H.value)) return U.value;
|
|
308
311
|
let e = H.value.trim();
|
|
309
|
-
return E.filterBy.length ? U.value.filter((t) =>
|
|
310
|
-
}),
|
|
312
|
+
return E.filterBy.length ? U.value.filter((t) => me(t.item, E.filterBy, e)) : U.value.filter((t) => me(t, ["text"], e));
|
|
313
|
+
}), vn = Symbol("default"), yn = (e) => pe(E.groupBy) ? vn : typeof E.groupBy == "function" ? E.groupBy(e.item) : le(e.item, E.groupBy), bn = l(() => {
|
|
311
314
|
let e = {};
|
|
312
|
-
for (let t of
|
|
313
|
-
let n =
|
|
315
|
+
for (let t of _n.value) {
|
|
316
|
+
let n = yn(t), r = ye(n);
|
|
314
317
|
e[r] || (e[r] = {
|
|
315
318
|
id: r,
|
|
316
319
|
data: n ?? null,
|
|
@@ -318,72 +321,73 @@ var qe = {
|
|
|
318
321
|
}), e[r].options.push(t);
|
|
319
322
|
}
|
|
320
323
|
return Object.values(e).filter((e) => e.options.length);
|
|
321
|
-
}), K = v(!1),
|
|
324
|
+
}), K = v(!1), xn = n(K), Sn = ce(K, () => E.transitionDuration), Cn = () => (E.adaptive ?? tt.adaptive) && P.value ? "canvas" : "popover", wn = v(Cn()), q = l(() => wn.value === "canvas");
|
|
322
325
|
S([
|
|
323
326
|
() => E.adaptive,
|
|
324
327
|
P,
|
|
325
328
|
K
|
|
326
329
|
], () => {
|
|
327
|
-
K.value || (
|
|
328
|
-
}),
|
|
330
|
+
K.value || (wn.value = Cn());
|
|
331
|
+
}), se(q), ge({
|
|
329
332
|
active: () => K.value && q.value,
|
|
330
333
|
input: () => A.value
|
|
331
334
|
});
|
|
332
|
-
let
|
|
335
|
+
let Tn = l(() => ({
|
|
333
336
|
side: "bottom",
|
|
334
337
|
size: "auto",
|
|
335
338
|
draggable: !0,
|
|
336
|
-
focusTarget:
|
|
339
|
+
focusTarget: ".bb-select-popover--sheet",
|
|
340
|
+
hideClose: !0,
|
|
337
341
|
disabled: E.disabled,
|
|
338
342
|
transitionDuration: E.transitionDuration,
|
|
339
|
-
...E.offCanvasProps?.title ? {} : { "aria-labelledby":
|
|
343
|
+
...E.offCanvasProps?.title ? {} : { "aria-labelledby": Pn.value },
|
|
340
344
|
...E.offCanvasProps
|
|
341
345
|
})), J = async ({ focusPopoverContent: e = !0 } = {}) => {
|
|
342
|
-
E.disabled || E.readonly || K.value || (
|
|
346
|
+
E.disabled || E.readonly || K.value || (wn.value = Cn(), Rt.value = !0, K.value = !0, !(!Qt.value && !$t.value && !Xt.value && (await tn(), !K.value)) && (await Ie(), K.value && (q.value || (ht = !0, gt(), ie(V), document.addEventListener("click", z), document.addEventListener("focusin", z), document.addEventListener("keydown", Lt, { capture: !0 }), e && (await c(0), K.value && (F.value ? R() : bt()))))));
|
|
343
347
|
}, Y = async () => {
|
|
344
|
-
K.value && (K.value = !1, k.value?.blur(), j.value = void 0, H.value = "", !q.value && (
|
|
345
|
-
},
|
|
346
|
-
k.value?.blur(), j.value = void 0, H.value = "",
|
|
347
|
-
},
|
|
348
|
+
K.value && (K.value = !1, k.value?.blur(), j.value = void 0, H.value = "", !q.value && (_t(), ae(V), document.removeEventListener("click", z), document.removeEventListener("focusin", z), document.removeEventListener("keydown", Lt, { capture: !0 })));
|
|
349
|
+
}, En = () => {
|
|
350
|
+
k.value?.blur(), j.value = void 0, H.value = "", On(), L();
|
|
351
|
+
}, Dn = () => K.value ? Y() : J(), X = v(!1), Z = () => {
|
|
348
352
|
X.value || (X.value = !0, D("active"));
|
|
349
|
-
},
|
|
353
|
+
}, On = () => {
|
|
350
354
|
X.value && (X.value = !1, D("inactive"));
|
|
351
|
-
},
|
|
355
|
+
}, kn = (e) => {
|
|
352
356
|
if (!(e instanceof Node)) return !1;
|
|
353
357
|
let t = !!O.value?.contains(e), n = k.value?.$el, r = n instanceof Element && !!n.closest(".bb-common-popover")?.contains(e);
|
|
354
358
|
return t || r;
|
|
355
|
-
},
|
|
356
|
-
clearTimeout(
|
|
359
|
+
}, An, jn = () => {
|
|
360
|
+
clearTimeout(An), An = setTimeout(() => {
|
|
357
361
|
if (K.value) {
|
|
358
362
|
Z();
|
|
359
363
|
return;
|
|
360
364
|
}
|
|
361
|
-
if (
|
|
365
|
+
if (kn(document.activeElement)) {
|
|
362
366
|
Z();
|
|
363
367
|
return;
|
|
364
368
|
}
|
|
365
|
-
|
|
369
|
+
On();
|
|
366
370
|
}, 0);
|
|
367
|
-
},
|
|
371
|
+
}, Mn = () => {
|
|
368
372
|
D("update:modelValue", E.multiple ? [] : null);
|
|
369
|
-
},
|
|
370
|
-
H.value = "",
|
|
373
|
+
}, Nn = () => {
|
|
374
|
+
H.value = "", Mn();
|
|
371
375
|
}, Q = l(() => ({
|
|
372
376
|
close: Y,
|
|
373
|
-
clear:
|
|
374
|
-
focus:
|
|
377
|
+
clear: Mn,
|
|
378
|
+
focus: xt,
|
|
375
379
|
query: H.value,
|
|
376
|
-
selectedOptions:
|
|
377
|
-
})), $ = null,
|
|
380
|
+
selectedOptions: un.value
|
|
381
|
+
})), $ = null, Pn = v(), Fn = l(() => {
|
|
378
382
|
let e = O.value;
|
|
379
383
|
return e ? e.hasAttribute("aria-label") || e.hasAttribute("aria-labelledby") : !1;
|
|
380
|
-
}),
|
|
384
|
+
}), In = l(() => ut("select.triggerLabel").value);
|
|
381
385
|
return S(O, (e) => {
|
|
382
386
|
if ($ &&= ($(), null), !e) return;
|
|
383
387
|
e.setAttribute("role", "combobox"), e.setAttribute("aria-haspopup", "listbox");
|
|
384
388
|
let t = !e.id;
|
|
385
|
-
t && (e.id = `${I}_activator`),
|
|
386
|
-
let n =
|
|
389
|
+
t && (e.id = `${I}_activator`), Pn.value = e.id;
|
|
390
|
+
let n = Fn.value, r = async (e) => {
|
|
387
391
|
if (D("click", e), !E.disabled) {
|
|
388
392
|
if (e.preventDefault(), E.readonly) {
|
|
389
393
|
L();
|
|
@@ -400,13 +404,13 @@ var qe = {
|
|
|
400
404
|
}, a = (e) => {
|
|
401
405
|
switch (e.key) {
|
|
402
406
|
case "ArrowDown":
|
|
403
|
-
e.preventDefault(),
|
|
407
|
+
e.preventDefault(), Ft();
|
|
404
408
|
break;
|
|
405
409
|
case "ArrowUp":
|
|
406
|
-
e.preventDefault(),
|
|
410
|
+
e.preventDefault(), Pt();
|
|
407
411
|
break;
|
|
408
412
|
case "Enter":
|
|
409
|
-
e.preventDefault(),
|
|
413
|
+
e.preventDefault(), It();
|
|
410
414
|
break;
|
|
411
415
|
case "Escape":
|
|
412
416
|
K.value && (e.preventDefault(), B());
|
|
@@ -415,41 +419,41 @@ var qe = {
|
|
|
415
419
|
}, o = (e) => {
|
|
416
420
|
D("focus", e), Z();
|
|
417
421
|
}, s = (e) => {
|
|
418
|
-
D("blur", e),
|
|
422
|
+
D("blur", e), jn();
|
|
419
423
|
};
|
|
420
424
|
e.addEventListener("click", r), e.addEventListener("pointerdown", i), e.addEventListener("keydown", a), e.addEventListener("focus", o), e.addEventListener("blur", s), $ = () => {
|
|
421
|
-
e.removeEventListener("click", r), e.removeEventListener("pointerdown", i), e.removeEventListener("keydown", a), e.removeEventListener("focus", o), e.removeEventListener("blur", s), e.removeAttribute("role"), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls"), e.removeAttribute("aria-invalid"), e.removeAttribute("aria-describedby"), e.removeAttribute("aria-activedescendant"), n || e.removeAttribute("aria-label"), t && e.removeAttribute("id"),
|
|
425
|
+
e.removeEventListener("click", r), e.removeEventListener("pointerdown", i), e.removeEventListener("keydown", a), e.removeEventListener("focus", o), e.removeEventListener("blur", s), e.removeAttribute("role"), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls"), e.removeAttribute("aria-invalid"), e.removeAttribute("aria-describedby"), e.removeAttribute("aria-activedescendant"), n || e.removeAttribute("aria-label"), t && e.removeAttribute("id"), Pn.value = void 0;
|
|
422
426
|
};
|
|
423
427
|
}, { immediate: !0 }), S([
|
|
424
428
|
O,
|
|
425
429
|
K,
|
|
426
|
-
|
|
427
|
-
ft,
|
|
430
|
+
xn,
|
|
428
431
|
pt,
|
|
432
|
+
mt,
|
|
429
433
|
j,
|
|
430
|
-
|
|
431
|
-
|
|
434
|
+
Fn,
|
|
435
|
+
In
|
|
432
436
|
], ([e, t, n, r, i, a, o, s]) => {
|
|
433
437
|
e && (e.setAttribute("aria-expanded", String(t)), o || e.setAttribute("aria-label", s), r == null ? e.removeAttribute("aria-invalid") : e.setAttribute("aria-invalid", r), n ? e.setAttribute("aria-controls", `${I}_listbox`) : e.removeAttribute("aria-controls"), i == null ? e.removeAttribute("aria-describedby") : e.setAttribute("aria-describedby", i), t && a ? e.setAttribute("aria-activedescendant", a) : e.removeAttribute("aria-activedescendant"));
|
|
434
438
|
}, { immediate: !0 }), ze(() => {
|
|
435
|
-
clearTimeout(
|
|
439
|
+
clearTimeout(An), $?.(), At.abort(), ae(V), document.removeEventListener("click", z), document.removeEventListener("focusin", z), document.removeEventListener("keydown", Lt, { capture: !0 });
|
|
436
440
|
}), (e, t) => (_(), f(je, null, [
|
|
437
|
-
|
|
438
|
-
props: { ref:
|
|
441
|
+
st.value ? d("", !0) : y(e.$slots, "activator", g(h({ key: 0 }, {
|
|
442
|
+
props: { ref: ct },
|
|
439
443
|
shown: K.value,
|
|
440
444
|
disabled: e.disabled,
|
|
441
445
|
readonly: e.readonly,
|
|
442
446
|
loading: G.value,
|
|
443
447
|
query: H.value,
|
|
444
|
-
selectedOptions:
|
|
445
|
-
text:
|
|
446
|
-
clear:
|
|
447
|
-
focus:
|
|
448
|
+
selectedOptions: un.value,
|
|
449
|
+
text: mn.value,
|
|
450
|
+
clear: Mn,
|
|
451
|
+
focus: xt,
|
|
448
452
|
open: J,
|
|
449
453
|
close: Y,
|
|
450
|
-
toggle:
|
|
454
|
+
toggle: Dn
|
|
451
455
|
}))),
|
|
452
|
-
p(x(
|
|
456
|
+
p(x(nt), null, {
|
|
453
457
|
default: C(() => [F.value ? (_(), f("div", qe, [
|
|
454
458
|
Ue(Me("input", {
|
|
455
459
|
id: `${x(I)}_search`,
|
|
@@ -457,97 +461,98 @@ var qe = {
|
|
|
457
461
|
ref: A,
|
|
458
462
|
"onUpdate:modelValue": t[0] ||= (e) => H.value = e,
|
|
459
463
|
"aria-activedescendant": j.value,
|
|
460
|
-
"aria-controls": x(
|
|
461
|
-
"aria-describedby":
|
|
462
|
-
"aria-invalid":
|
|
463
|
-
"aria-label":
|
|
464
|
+
"aria-controls": x(xn) ? `${x(I)}_listbox` : void 0,
|
|
465
|
+
"aria-describedby": mt.value,
|
|
466
|
+
"aria-invalid": pt.value,
|
|
467
|
+
"aria-label": dt.value,
|
|
464
468
|
autocomplete: e.autocomplete,
|
|
465
469
|
class: "bb-select-popover__search-input",
|
|
466
|
-
inputmode:
|
|
470
|
+
inputmode: lt.value,
|
|
471
|
+
placeholder: dt.value,
|
|
467
472
|
role: "searchbox",
|
|
468
473
|
tabindex: K.value ? 0 : -1,
|
|
469
474
|
type: "text",
|
|
470
|
-
onBlur: T(
|
|
471
|
-
onChange: T(
|
|
472
|
-
onFocus: T(
|
|
473
|
-
onInput: T(
|
|
475
|
+
onBlur: T(wt, ["stop"]),
|
|
476
|
+
onChange: T(Tt, ["stop"]),
|
|
477
|
+
onFocus: T(Ct, ["stop"]),
|
|
478
|
+
onInput: T(Dt, ["stop"]),
|
|
474
479
|
onKeydown: [
|
|
475
|
-
w(T(
|
|
476
|
-
w(T(
|
|
480
|
+
w(T(Ft, ["stop", "prevent"]), ["down"]),
|
|
481
|
+
w(T(It, ["stop", "prevent"]), ["enter"]),
|
|
477
482
|
w(T(B, ["stop", "prevent"]), ["esc"]),
|
|
478
|
-
w(T(
|
|
483
|
+
w(T(Pt, ["stop", "prevent"]), ["up"])
|
|
479
484
|
]
|
|
480
485
|
}, null, 40, Je), [[He, H.value]]),
|
|
481
|
-
p(
|
|
486
|
+
p(Oe, {
|
|
482
487
|
"aria-hidden": "true",
|
|
483
488
|
class: "bb-select-popover__search-error-icon",
|
|
484
489
|
focusable: "false"
|
|
485
490
|
}),
|
|
486
|
-
p(
|
|
491
|
+
p(ke, {
|
|
487
492
|
"aria-hidden": "true",
|
|
488
493
|
class: "bb-select-popover__search-warning-icon",
|
|
489
494
|
focusable: "false"
|
|
490
495
|
}),
|
|
491
|
-
p(
|
|
496
|
+
p(de, {
|
|
492
497
|
"aria-hidden": "true",
|
|
493
498
|
class: "bb-select-popover__search-icon",
|
|
494
499
|
focusable: "false",
|
|
495
|
-
icon: x(
|
|
500
|
+
icon: x(he)
|
|
496
501
|
}, null, 8, ["icon"]),
|
|
497
|
-
e.clearable ? (_(), u(
|
|
502
|
+
e.clearable ? (_(), u(Ce, {
|
|
498
503
|
key: 0,
|
|
499
504
|
class: "bb-select-popover__search-clear",
|
|
500
|
-
tabindex:
|
|
501
|
-
onClick: T(
|
|
505
|
+
tabindex: ft.value && K.value ? 0 : -1,
|
|
506
|
+
onClick: T(Nn, ["stop"]),
|
|
502
507
|
onMousedown: t[1] ||= T(() => {}, ["prevent"])
|
|
503
508
|
}, null, 8, ["tabindex"])) : d("", !0),
|
|
504
|
-
|
|
509
|
+
dn.value ? (_(), f("div", Ye)) : d("", !0)
|
|
505
510
|
])) : (_(), f("button", {
|
|
506
511
|
key: 1,
|
|
507
512
|
ref_key: "popoverFocusProxy",
|
|
508
|
-
ref:
|
|
513
|
+
ref: ot,
|
|
509
514
|
"aria-activedescendant": j.value,
|
|
510
515
|
"aria-controls": `${x(I)}_listbox`,
|
|
511
|
-
"aria-describedby":
|
|
516
|
+
"aria-describedby": mt.value,
|
|
512
517
|
"aria-expanded": "true",
|
|
513
|
-
"aria-invalid":
|
|
514
|
-
"aria-label":
|
|
518
|
+
"aria-invalid": pt.value,
|
|
519
|
+
"aria-label": dt.value,
|
|
515
520
|
class: "bb-select-popover__focus-proxy sr-only",
|
|
516
521
|
role: "combobox",
|
|
517
522
|
tabindex: "-1",
|
|
518
523
|
type: "button",
|
|
519
|
-
onFocus:
|
|
524
|
+
onFocus: Et,
|
|
520
525
|
onKeydown: [
|
|
521
|
-
w(T(
|
|
522
|
-
w(T(
|
|
526
|
+
w(T(Ft, ["stop", "prevent"]), ["down"]),
|
|
527
|
+
w(T(It, ["stop", "prevent"]), ["enter"]),
|
|
523
528
|
w(T(B, ["stop", "prevent"]), ["esc"]),
|
|
524
|
-
w(T(
|
|
529
|
+
w(T(Pt, ["stop", "prevent"]), ["up"])
|
|
525
530
|
]
|
|
526
531
|
}, null, 40, Xe))]),
|
|
527
532
|
_: 1
|
|
528
533
|
}),
|
|
529
|
-
p(x(
|
|
530
|
-
default: C(() => [p(
|
|
534
|
+
p(x(it), null, {
|
|
535
|
+
default: C(() => [p(Ae, {
|
|
531
536
|
id: `${x(I)}_listbox`,
|
|
532
537
|
ref_key: "optionsContainer",
|
|
533
538
|
ref: k,
|
|
534
539
|
compact: e.compact,
|
|
535
|
-
groups: e.groupBy ?
|
|
540
|
+
groups: e.groupBy ? bn.value : void 0,
|
|
536
541
|
"header-height": e.headerHeight,
|
|
537
542
|
loading: G.value,
|
|
538
543
|
"loading-text": e.loadingText,
|
|
539
544
|
multiple: e.multiple,
|
|
540
|
-
"no-data-text":
|
|
545
|
+
"no-data-text": Zt.value,
|
|
541
546
|
open: K.value,
|
|
542
547
|
"option-height": e.itemHeight,
|
|
543
|
-
options: e.groupBy ? void 0 :
|
|
544
|
-
"onFocused:change":
|
|
545
|
-
"onOption:selected":
|
|
546
|
-
"onOption:unselected":
|
|
548
|
+
options: e.groupBy ? void 0 : _n.value,
|
|
549
|
+
"onFocused:change": Ot,
|
|
550
|
+
"onOption:selected": hn,
|
|
551
|
+
"onOption:unselected": gn
|
|
547
552
|
}, {
|
|
548
553
|
loading: C(() => [y(e.$slots, "loading", { query: H.value })]),
|
|
549
554
|
"no-data": C(() => [y(e.$slots, "no-data", {
|
|
550
|
-
focus:
|
|
555
|
+
focus: xt,
|
|
551
556
|
query: H.value
|
|
552
557
|
})]),
|
|
553
558
|
option: C((t) => [y(e.$slots, "option", h({ loading: G.value }, t))]),
|
|
@@ -568,37 +573,40 @@ var qe = {
|
|
|
568
573
|
])]),
|
|
569
574
|
_: 3
|
|
570
575
|
}),
|
|
571
|
-
q.value ? (_(), u(
|
|
576
|
+
q.value ? (_(), u(_e, h({
|
|
572
577
|
key: 1,
|
|
573
578
|
modelValue: K.value,
|
|
574
579
|
"onUpdate:modelValue": t[3] ||= (e) => K.value = e,
|
|
575
580
|
class: "bb-select-popover-offcanvas"
|
|
576
581
|
}, {
|
|
577
|
-
...
|
|
582
|
+
...Tn.value,
|
|
578
583
|
...e.$attrs
|
|
579
|
-
}, { onHidden:
|
|
580
|
-
default: C(() => [Me("div", {
|
|
581
|
-
"bb-select-popover--
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
584
|
+
}, { onHidden: En }), Ne({
|
|
585
|
+
default: C(() => [Me("div", {
|
|
586
|
+
class: Le(["bb-select-popover bb-select-popover--sheet", {
|
|
587
|
+
"bb-select-popover--errors": fn.value,
|
|
588
|
+
"bb-select-popover--warnings": pn.value,
|
|
589
|
+
"bb-select-popover--loading": G.value,
|
|
590
|
+
"bb-select-popover--reloading": dn.value,
|
|
591
|
+
"bb-select-popover--clearable-active": ft.value
|
|
592
|
+
}]),
|
|
593
|
+
tabindex: "-1"
|
|
594
|
+
}, [
|
|
595
|
+
e.multiple && W.value.length ? (_(), f("div", Ze, [Me("div", Qe, [(_(!0), f(je, null, Be(W.value, (n) => (_(), u(fe, {
|
|
588
596
|
key: n.valueHash,
|
|
589
597
|
class: "bb-select-popover__sheet-chip",
|
|
590
598
|
clearable: !e.disabled && !e.readonly,
|
|
591
599
|
size: "xl",
|
|
592
600
|
variant: "secondary",
|
|
593
|
-
"onClick:clear": (e) =>
|
|
601
|
+
"onClick:clear": (e) => gn(n),
|
|
594
602
|
onMousedown: t[2] ||= T(() => {}, ["prevent"])
|
|
595
603
|
}, {
|
|
596
604
|
default: C(() => [Pe(Ve(n.text), 1)]),
|
|
597
605
|
_: 2
|
|
598
606
|
}, 1032, ["clearable", "onClick:clear"]))), 128))])])) : d("", !0),
|
|
599
|
-
p(x(
|
|
600
|
-
p(
|
|
601
|
-
default: C(() => [p(x(
|
|
607
|
+
p(x(rt)),
|
|
608
|
+
p(ve, null, {
|
|
609
|
+
default: C(() => [p(x(at))]),
|
|
602
610
|
_: 1
|
|
603
611
|
})
|
|
604
612
|
], 2)]),
|
|
@@ -611,25 +619,25 @@ var qe = {
|
|
|
611
619
|
name: "footer",
|
|
612
620
|
fn: C(() => [y(e.$slots, "footer", g(m(Q.value)))]),
|
|
613
621
|
key: "1"
|
|
614
|
-
} : void 0]), 1040, ["modelValue"])) : (_(), u(
|
|
622
|
+
} : void 0]), 1040, ["modelValue"])) : (_(), u(te, h({
|
|
615
623
|
key: 2,
|
|
616
624
|
modelValue: K.value,
|
|
617
625
|
"onUpdate:modelValue": t[4] ||= (e) => K.value = e,
|
|
618
626
|
anchor: M.value,
|
|
619
627
|
boundary: e.boundary,
|
|
620
628
|
class: ["bb-select-popover", {
|
|
621
|
-
"bb-select-popover--errors":
|
|
622
|
-
"bb-select-popover--warnings":
|
|
629
|
+
"bb-select-popover--errors": fn.value,
|
|
630
|
+
"bb-select-popover--warnings": pn.value,
|
|
623
631
|
"bb-select-popover--loading": G.value,
|
|
624
|
-
"bb-select-popover--reloading":
|
|
625
|
-
"bb-select-popover--clearable-active":
|
|
632
|
+
"bb-select-popover--reloading": dn.value,
|
|
633
|
+
"bb-select-popover--clearable-active": ft.value
|
|
626
634
|
}],
|
|
627
635
|
"disable-flip": e.disableFlip,
|
|
628
636
|
"hide-arrow": "",
|
|
629
637
|
offset: e.offset,
|
|
630
638
|
padding: e.padding,
|
|
631
639
|
placement: e.placement,
|
|
632
|
-
style:
|
|
640
|
+
style: yt.value,
|
|
633
641
|
tag: "span",
|
|
634
642
|
"transition-duration": e.transitionDuration
|
|
635
643
|
}, e.$attrs), {
|
|
@@ -637,14 +645,14 @@ var qe = {
|
|
|
637
645
|
e.$slots.header ? (_(), f("div", {
|
|
638
646
|
key: 0,
|
|
639
647
|
class: "bb-select-popover__header",
|
|
640
|
-
inert: x(
|
|
648
|
+
inert: x(Sn)
|
|
641
649
|
}, [y(e.$slots, "header", g(m(Q.value)))], 8, $e)) : d("", !0),
|
|
642
|
-
p(x(
|
|
643
|
-
p(x(
|
|
650
|
+
p(x(rt)),
|
|
651
|
+
p(x(at)),
|
|
644
652
|
e.$slots.footer ? (_(), f("div", {
|
|
645
653
|
key: 1,
|
|
646
654
|
class: "bb-select-popover__footer",
|
|
647
|
-
inert: x(
|
|
655
|
+
inert: x(Sn)
|
|
648
656
|
}, [y(e.$slots, "footer", g(m(Q.value)))], 8, et)) : d("", !0)
|
|
649
657
|
]),
|
|
650
658
|
_: 3
|