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
|
@@ -4,18 +4,19 @@ import n from "../CommonPopover/CommonPopover.vue.js";
|
|
|
4
4
|
import { useSheetSurface as r } from "../../composables/useSheetSurface.js";
|
|
5
5
|
import i from "../BbBaseButton/BbBaseButton.vue.js";
|
|
6
6
|
import { BB_BASE_BUTTON_PROP_KEYS as a } from "../BbBaseButton/types.js";
|
|
7
|
-
import o from "
|
|
8
|
-
import
|
|
7
|
+
import { useLocale as o } from "../../composables/useLocale.js";
|
|
8
|
+
import s from "../BbIcon/BbIcon.vue.js";
|
|
9
|
+
import ee from "../BbBadge/BbBadge.vue.js";
|
|
10
|
+
import { matchAnyKey as te } from "../../utilities/functions/matchAnyKey.js";
|
|
9
11
|
import { slotKey as c } from "../../utilities/functions/slotKey.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { useImeDismissBlur as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as le, createVNode as h, defineComponent as ue, mergeProps as g, nextTick as _, normalizeClass as v, normalizeStyle as de, onBeforeUnmount as fe, onMounted as pe, openBlock as y, ref as b, renderList as me, resolveDynamicComponent as x, toDisplayString as S, unref as C, watch as he, watchEffect as ge, withCtx as w, withKeys as T, withModifiers as E } from "vue";
|
|
12
|
+
import ne from "../../assets/svgs/check_stroke.svg_raw.js";
|
|
13
|
+
import re from "../../assets/svgs/chevron_right.svg_raw.js";
|
|
14
|
+
import ie from "../../assets/svgs/search.svg_raw.js";
|
|
15
|
+
import { useImeDismissBlur as ae } from "../../composables/useImeDismissBlur.js";
|
|
16
|
+
import { levelHasSearch as oe, normalizeGroups as se } from "./normalizeGroups.js";
|
|
17
|
+
import { useDropdownContext as ce } from "./useDropdownContext.js";
|
|
18
|
+
import le from "./BbDropdownList.vue.js";
|
|
19
|
+
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as ue, createVNode as h, defineComponent as de, mergeProps as g, nextTick as _, normalizeClass as v, normalizeStyle as fe, onBeforeUnmount as pe, onMounted as me, openBlock as y, ref as b, renderList as x, resolveDynamicComponent as S, toDisplayString as C, unref as w, watch as he, watchEffect as ge, withCtx as T, withKeys as E, withModifiers as D } from "vue";
|
|
19
20
|
//#region src/components/BbDropdown/BbDropdownList.vue?vue&type=script&setup=true&lang.ts
|
|
20
21
|
var _e = {
|
|
21
22
|
key: 0,
|
|
@@ -32,35 +33,38 @@ var _e = {
|
|
|
32
33
|
class: "group-title__content"
|
|
33
34
|
}, be = {
|
|
34
35
|
key: 2,
|
|
36
|
+
class: "bb-dropdown__sheet-selection"
|
|
37
|
+
}, xe = { class: "bb-dropdown__sheet-chips" }, Se = {
|
|
38
|
+
key: 3,
|
|
35
39
|
class: "bb-dropdown__group-search",
|
|
36
40
|
role: "none"
|
|
37
|
-
},
|
|
41
|
+
}, Ce = [
|
|
38
42
|
"aria-label",
|
|
39
43
|
"placeholder",
|
|
40
44
|
"value",
|
|
41
45
|
"onInput",
|
|
42
46
|
"onKeydown"
|
|
43
|
-
],
|
|
47
|
+
], we = {
|
|
44
48
|
key: 0,
|
|
45
49
|
"aria-hidden": "true",
|
|
46
50
|
class: "bb-dropdown__group-loading"
|
|
47
|
-
},
|
|
51
|
+
}, Te = ["aria-labelledby", "role"], Ee = {
|
|
48
52
|
key: 1,
|
|
49
53
|
class: "item__content"
|
|
50
|
-
},
|
|
54
|
+
}, De = {
|
|
51
55
|
key: 4,
|
|
52
56
|
class: "item__content"
|
|
53
|
-
},
|
|
57
|
+
}, Oe = {
|
|
54
58
|
key: 0,
|
|
55
59
|
class: "item__description"
|
|
56
|
-
},
|
|
60
|
+
}, ke = [
|
|
57
61
|
"id",
|
|
58
62
|
"aria-label",
|
|
59
63
|
"data-bb-dropdown-surface",
|
|
60
64
|
"inert",
|
|
61
65
|
"role",
|
|
62
66
|
"onPointerleave"
|
|
63
|
-
],
|
|
67
|
+
], Ae = 289, je = 160, Me = 100, Ne = 120, Pe = /*@__PURE__*/ de({
|
|
64
68
|
__name: "BbDropdownList",
|
|
65
69
|
props: {
|
|
66
70
|
groups: {},
|
|
@@ -69,20 +73,20 @@ var _e = {
|
|
|
69
73
|
back: {}
|
|
70
74
|
},
|
|
71
75
|
emits: ["close-level"],
|
|
72
|
-
setup(
|
|
73
|
-
let
|
|
76
|
+
setup(de, { expose: Pe, emit: Fe }) {
|
|
77
|
+
let O = de, Ie = Fe, k = ce(), { inSheet: A } = r(), { t: Le } = o(), Re = Le("select.searchLabel"), ze = Le("common.noDataText"), Be = (e, t, n) => {
|
|
74
78
|
if (e.placeholder) return !0;
|
|
75
79
|
let r = n && n.length ? n : e.description == null ? ["text"] : ["text", "description"];
|
|
76
80
|
try {
|
|
77
|
-
return
|
|
81
|
+
return te(e, r, t);
|
|
78
82
|
} catch {
|
|
79
83
|
return !1;
|
|
80
84
|
}
|
|
81
|
-
},
|
|
82
|
-
if (!e.searchable || !e.key ||
|
|
83
|
-
let t =
|
|
85
|
+
}, j = u(() => O.groups.map((e) => {
|
|
86
|
+
if (!e.searchable || !e.key || k.isPipelineGroup(e.key)) return e;
|
|
87
|
+
let t = k.queryFor(e.key).trim();
|
|
84
88
|
if (!t) return e;
|
|
85
|
-
let n = e.items.filter((n) =>
|
|
89
|
+
let n = e.items.filter((n) => Be(n, t, e.filterBy));
|
|
86
90
|
return n.length ? {
|
|
87
91
|
...e,
|
|
88
92
|
items: n
|
|
@@ -91,104 +95,105 @@ var _e = {
|
|
|
91
95
|
items: [{
|
|
92
96
|
key: "__bb-dropdown:no-results__",
|
|
93
97
|
placeholder: "no-data",
|
|
94
|
-
text:
|
|
98
|
+
text: k.noDataText.value ?? ze.value,
|
|
95
99
|
disabled: !0
|
|
96
100
|
}]
|
|
97
101
|
};
|
|
98
102
|
}));
|
|
99
103
|
ge(() => {
|
|
100
|
-
if (
|
|
101
|
-
let e =
|
|
102
|
-
|
|
104
|
+
if (O.level !== 0) return;
|
|
105
|
+
let e = j.value.flatMap((e) => e.items).find((e) => e.placeholder);
|
|
106
|
+
k.setStatus(e?.text);
|
|
103
107
|
}), ge(() => {
|
|
104
|
-
for (let e of
|
|
108
|
+
for (let e of O.groups) e.key && k.isPipelineGroup(e.key) && k.activateGroup(e.key);
|
|
105
109
|
});
|
|
106
|
-
let
|
|
110
|
+
let M = b({}), Ve = (e, n) => {
|
|
107
111
|
let r = t(n);
|
|
108
|
-
r instanceof HTMLInputElement ?
|
|
109
|
-
},
|
|
110
|
-
|
|
112
|
+
r instanceof HTMLInputElement ? M.value[e] = r : delete M.value[e];
|
|
113
|
+
}, He = u(() => j.value.find((e) => e.searchable && e.key)?.key), Ue = (e) => {
|
|
114
|
+
if (A.value) return;
|
|
115
|
+
let t = e.maxHeight ?? (e.searchable ? Ae : void 0);
|
|
111
116
|
if (!(t == null || t === 0 || t === "none")) return typeof t == "number" ? `${t}px` : t;
|
|
112
|
-
},
|
|
117
|
+
}, We = (e) => se(e).map((e) => e.selectable ? {
|
|
113
118
|
...e,
|
|
114
|
-
selected:
|
|
115
|
-
} : e),
|
|
116
|
-
let n =
|
|
119
|
+
selected: k.selectedFor(e.key ?? "")
|
|
120
|
+
} : e), Ge = (e) => c(e.key), Ke = (e) => e.slotKey ? c(e.slotKey) : Ge(e), N = (e, t) => {
|
|
121
|
+
let n = Ke(e), r = t ? `${n}:${t}` : n, i = k.slots[r];
|
|
117
122
|
if (i) return i;
|
|
118
|
-
let a =
|
|
123
|
+
let a = Ge(e);
|
|
119
124
|
if (a === n) return;
|
|
120
125
|
let o = t ? `${a}:${t}` : a;
|
|
121
|
-
return
|
|
122
|
-
},
|
|
126
|
+
return k.slots[o];
|
|
127
|
+
}, qe = (e) => e.variant && e.variant !== "default" ? `bb-dropdown__item--variant-${e.variant}` : void 0, Je = (e) => e.variant && e.variant !== "default" ? `bb-dropdown__group-title--variant-${e.variant}` : void 0, Ye = (e) => e.selectable ? e.multiple ? "menuitemcheckbox" : "menuitemradio" : "menuitem", P = (e, t) => e.selected.includes(t.key), F = (e) => {
|
|
123
128
|
let t = 0;
|
|
124
|
-
for (let n = 0; n < e; n++) t +=
|
|
129
|
+
for (let n = 0; n < e; n++) t += j.value[n]?.items.length ?? 0;
|
|
125
130
|
return t;
|
|
126
|
-
},
|
|
131
|
+
}, Xe = /* @__PURE__ */ new Set([...a.filter((e) => e !== "text" && e !== "disabled")]), Ze = (e) => {
|
|
127
132
|
let t = {};
|
|
128
|
-
for (let [n, r] of Object.entries(e)) (
|
|
133
|
+
for (let [n, r] of Object.entries(e)) (Xe.has(n) || /^(aria|data)-/.test(n)) && (t[n] = r);
|
|
129
134
|
return t;
|
|
130
|
-
},
|
|
131
|
-
disabled: t.disabled ||
|
|
135
|
+
}, Qe = (e) => e.placeholder ? k.slots[e.placeholder === "loading" ? "loading" : "no-data"] : void 0, I = (e, t, n) => ({
|
|
136
|
+
disabled: t.disabled || k.disabled.value,
|
|
132
137
|
index: n,
|
|
133
138
|
item: t,
|
|
134
|
-
selected: e.selectable &&
|
|
135
|
-
loading:
|
|
136
|
-
open:
|
|
137
|
-
placement:
|
|
139
|
+
selected: e.selectable && P(e, t),
|
|
140
|
+
loading: k.isItemLoading(t.key),
|
|
141
|
+
open: k.open.value,
|
|
142
|
+
placement: k.placement.value,
|
|
138
143
|
text: t.text,
|
|
139
144
|
description: t.description
|
|
140
|
-
}),
|
|
145
|
+
}), L = (e, t) => {
|
|
141
146
|
if (!e.key) return;
|
|
142
147
|
let n = c(e.key);
|
|
143
|
-
return
|
|
144
|
-
},
|
|
145
|
-
disabled:
|
|
148
|
+
return k.slots[t ? `${n}:${t}` : n];
|
|
149
|
+
}, R = (e) => !e.hideLabel && (!!e.label || !!e["prepend:icon"] || !!e["append:icon"] || !!L(e) || !!L(e, "prepend") || !!L(e, "append")), $e = (e) => !e.key || !e.selectable || !e.multiple ? [] : k.selectedChipsFor(e.key), et = e().id, tt = (e) => `${et.value}_group-title_${e}`, nt = u(() => oe(j.value)), rt = (e) => !!e.items && oe(We(e.items)), it = (e) => nt.value ? "menu" : R(e) ? "group" : "none", at = (e, t) => R(e) ? tt(t) : void 0, z = (e, t) => ({
|
|
150
|
+
disabled: k.disabled.value,
|
|
146
151
|
index: t,
|
|
147
152
|
item: e,
|
|
148
153
|
selected: !1,
|
|
149
154
|
loading: !1,
|
|
150
|
-
open:
|
|
151
|
-
placement:
|
|
155
|
+
open: k.open.value,
|
|
156
|
+
placement: k.placement.value,
|
|
152
157
|
text: e.label
|
|
153
|
-
}),
|
|
158
|
+
}), B = b({}), ot = (e, n) => {
|
|
154
159
|
let r = t(n);
|
|
155
|
-
r ?
|
|
156
|
-
},
|
|
160
|
+
r ? B.value[e] = r : delete B.value[e];
|
|
161
|
+
}, st = b({}), ct = (e, n) => {
|
|
157
162
|
let r = t(n);
|
|
158
|
-
r instanceof HTMLElement ?
|
|
163
|
+
r instanceof HTMLElement ? st.value[e] = r : delete st.value[e];
|
|
159
164
|
}, V = () => {
|
|
160
165
|
let e = [], t = 0;
|
|
161
|
-
for (let n of
|
|
162
|
-
n.onClick &&
|
|
163
|
-
for (let r of n.items) r.disabled ||
|
|
166
|
+
for (let n of j.value) {
|
|
167
|
+
n.onClick && R(n) && e.push(t - .5);
|
|
168
|
+
for (let r of n.items) r.disabled || k.disabled.value || e.push(t), t++;
|
|
164
169
|
}
|
|
165
170
|
return e;
|
|
166
|
-
},
|
|
171
|
+
}, lt = (e) => {
|
|
167
172
|
let t = 0;
|
|
168
|
-
for (let n = 0; n <
|
|
173
|
+
for (let n = 0; n < j.value.length; n++) {
|
|
169
174
|
if (t - .5 === e) return n;
|
|
170
|
-
t +=
|
|
175
|
+
t += j.value[n].items.length;
|
|
171
176
|
}
|
|
172
177
|
return -1;
|
|
173
178
|
}, H = (e) => {
|
|
174
179
|
if (e != null) {
|
|
175
180
|
if (Number.isInteger(e)) {
|
|
176
|
-
|
|
181
|
+
B.value[e]?.focus();
|
|
177
182
|
return;
|
|
178
183
|
}
|
|
179
|
-
|
|
184
|
+
st.value[lt(e)]?.focus();
|
|
180
185
|
}
|
|
181
|
-
},
|
|
182
|
-
|
|
183
|
-
active:
|
|
184
|
-
input: () => Object.values(
|
|
186
|
+
}, ut = () => Object.values(M.value).some((e) => e === document.activeElement);
|
|
187
|
+
ae({
|
|
188
|
+
active: A,
|
|
189
|
+
input: () => Object.values(M.value).find((e) => e === document.activeElement) ?? null
|
|
185
190
|
});
|
|
186
|
-
let
|
|
187
|
-
let e =
|
|
188
|
-
return e ? (
|
|
189
|
-
},
|
|
191
|
+
let dt = () => {
|
|
192
|
+
let e = He.value;
|
|
193
|
+
return e ? (M.value[e]?.focus(), !0) : !1;
|
|
194
|
+
}, ft = () => H(V()[0]), pt = (e) => {
|
|
190
195
|
let t = 0;
|
|
191
|
-
for (let n of
|
|
196
|
+
for (let n of j.value) for (let r of n.items) {
|
|
192
197
|
if (r.key === e) return t;
|
|
193
198
|
t++;
|
|
194
199
|
}
|
|
@@ -199,96 +204,96 @@ var _e = {
|
|
|
199
204
|
let r = n.indexOf(e), i = r === -1 ? t > 0 ? 0 : n.length - 1 : (r + t + n.length) % n.length;
|
|
200
205
|
H(n[i]);
|
|
201
206
|
}, W = () => {
|
|
202
|
-
|
|
207
|
+
!A.value && dt() || ft();
|
|
203
208
|
}, G = () => {
|
|
204
209
|
let e = V();
|
|
205
210
|
H(e[e.length - 1]);
|
|
206
211
|
};
|
|
207
|
-
|
|
208
|
-
|
|
212
|
+
me(() => {
|
|
213
|
+
O.level === 0 && He.value && !A.value && _(() => dt());
|
|
209
214
|
});
|
|
210
|
-
let K = b(null), q = b({}), J, Y,
|
|
215
|
+
let K = b(null), q = b({}), J, Y, mt = 0, X = b(null), Z;
|
|
211
216
|
he(K, (e, t) => {
|
|
212
217
|
clearTimeout(Z), X.value = t ?? null, t != null && (Z = setTimeout(() => {
|
|
213
218
|
X.value = null;
|
|
214
|
-
},
|
|
219
|
+
}, Ne));
|
|
215
220
|
});
|
|
216
|
-
let
|
|
217
|
-
let e = Object.values(
|
|
218
|
-
!e || !t || (
|
|
219
|
-
},
|
|
221
|
+
let ht = (e) => K.value !== e && X.value !== e, gt = b(0), _t = () => {
|
|
222
|
+
let e = Object.values(B.value)[0], t = e?.closest(".bb-dropdown");
|
|
223
|
+
!e || !t || (gt.value = Math.max(0, t.getBoundingClientRect().right - e.getBoundingClientRect().right));
|
|
224
|
+
}, vt = (e, t) => {
|
|
220
225
|
t ? q.value[e] = t : delete q.value[e];
|
|
221
226
|
}, Q = () => clearTimeout(J), $ = () => clearTimeout(Y);
|
|
222
|
-
|
|
227
|
+
pe(() => {
|
|
223
228
|
clearTimeout(Y), clearTimeout(J), clearTimeout(Z);
|
|
224
229
|
});
|
|
225
|
-
let
|
|
230
|
+
let yt = (e) => {
|
|
226
231
|
$(), clearTimeout(J), J = setTimeout(() => {
|
|
227
232
|
K.value === e && (K.value = null);
|
|
228
|
-
},
|
|
229
|
-
},
|
|
233
|
+
}, je);
|
|
234
|
+
}, bt = (e) => {
|
|
230
235
|
let t = e.trim();
|
|
231
236
|
return t ? t.endsWith("ms") ? Number.parseFloat(t) || 0 : t.endsWith("s") ? (Number.parseFloat(t) || 0) * 1e3 : Number.parseFloat(t) || 0 : 0;
|
|
232
|
-
},
|
|
233
|
-
let t =
|
|
237
|
+
}, xt = (e) => {
|
|
238
|
+
let t = B.value[e];
|
|
234
239
|
if (!t) return 0;
|
|
235
240
|
let n = t.closest(".bb-common-popover");
|
|
236
241
|
if (!n) return 0;
|
|
237
|
-
let r = getComputedStyle(n).getPropertyValue("--transition-duration"), i =
|
|
242
|
+
let r = getComputedStyle(n).getPropertyValue("--transition-duration"), i = bt(r);
|
|
238
243
|
if (!i) return 0;
|
|
239
|
-
let a = performance.now() -
|
|
244
|
+
let a = performance.now() - mt;
|
|
240
245
|
return Math.max(0, i - a + 16);
|
|
241
|
-
},
|
|
242
|
-
Q(),
|
|
246
|
+
}, St = async (e, t = !1) => {
|
|
247
|
+
Q(), _t(), K.value = e, t && (await _(), q.value[e]?.focusFirst());
|
|
243
248
|
};
|
|
244
|
-
he(
|
|
249
|
+
he(k.open, (e) => {
|
|
245
250
|
if (!e) {
|
|
246
251
|
$(), Q(), K.value = null;
|
|
247
252
|
return;
|
|
248
253
|
}
|
|
249
|
-
|
|
254
|
+
mt = performance.now();
|
|
250
255
|
});
|
|
251
|
-
let
|
|
256
|
+
let Ct = (e, t) => {
|
|
252
257
|
t ? K.value = e : K.value === e && (K.value = null);
|
|
253
|
-
},
|
|
258
|
+
}, wt = (e) => {
|
|
254
259
|
K.value = null, _(() => H(e));
|
|
255
|
-
},
|
|
260
|
+
}, Tt = (e, t, n) => {
|
|
256
261
|
if (n.pointerType !== "mouse") return;
|
|
257
262
|
if (Q(), $(), K.value !== null && K.value === e.key) {
|
|
258
263
|
H(t);
|
|
259
264
|
return;
|
|
260
265
|
}
|
|
261
266
|
let r = () => {
|
|
262
|
-
H(t), e.items ?
|
|
267
|
+
H(t), e.items ? St(e.key) : K.value = null;
|
|
263
268
|
};
|
|
264
269
|
if (K.value !== null) {
|
|
265
|
-
let e =
|
|
266
|
-
e >= 0 && Math.abs(t - e) <= 1 ? Y = setTimeout(r,
|
|
270
|
+
let e = pt(K.value);
|
|
271
|
+
e >= 0 && Math.abs(t - e) <= 1 ? Y = setTimeout(r, Me) : r();
|
|
267
272
|
return;
|
|
268
273
|
}
|
|
269
|
-
let i = e.items ?
|
|
274
|
+
let i = e.items ? xt(t) : 0;
|
|
270
275
|
i ? Y = setTimeout(r, i) : r();
|
|
271
|
-
},
|
|
276
|
+
}, Et = () => {
|
|
272
277
|
Q(), $();
|
|
273
|
-
},
|
|
274
|
-
t.pointerType === "mouse" && e.items &&
|
|
275
|
-
},
|
|
276
|
-
t.pointerType === "mouse" &&
|
|
277
|
-
},
|
|
278
|
+
}, Dt = (e, t) => {
|
|
279
|
+
t.pointerType === "mouse" && e.items && yt(e.key);
|
|
280
|
+
}, Ot = (e, t) => {
|
|
281
|
+
t.pointerType === "mouse" && yt(e);
|
|
282
|
+
}, kt = (e, t) => {
|
|
278
283
|
e.searchable && t.preventDefault();
|
|
279
|
-
},
|
|
280
|
-
if (!(t.disabled ||
|
|
284
|
+
}, At = (e, t, n, r) => {
|
|
285
|
+
if (!(t.disabled || k.disabled.value) && !k.isItemLoading(t.key)) {
|
|
281
286
|
if (t.items) {
|
|
282
|
-
r.stopPropagation(), Q(), $(),
|
|
287
|
+
r.stopPropagation(), Q(), $(), O.navigate ? O.navigate(t) : K.value = t.key;
|
|
283
288
|
return;
|
|
284
289
|
}
|
|
285
290
|
if (e.selectable && e.key) {
|
|
286
|
-
r.stopPropagation(),
|
|
291
|
+
r.stopPropagation(), k.toggleSelect(e, t), k.runItemAction(t, r), ut() || H(n);
|
|
287
292
|
return;
|
|
288
293
|
}
|
|
289
|
-
r.stopPropagation(),
|
|
294
|
+
r.stopPropagation(), k.runItemAction(t, r, { close: !0 });
|
|
290
295
|
}
|
|
291
|
-
},
|
|
296
|
+
}, jt = (e, t, n) => {
|
|
292
297
|
switch (n.key) {
|
|
293
298
|
case "ArrowDown":
|
|
294
299
|
n.preventDefault(), $(), Q(), K.value = null, U(t, 1);
|
|
@@ -303,14 +308,14 @@ var _e = {
|
|
|
303
308
|
n.preventDefault(), G();
|
|
304
309
|
break;
|
|
305
310
|
case "ArrowRight":
|
|
306
|
-
e.items && (n.preventDefault(), n.stopPropagation(),
|
|
311
|
+
e.items && (n.preventDefault(), n.stopPropagation(), O.navigate ? O.navigate(e) : St(e.key, !0));
|
|
307
312
|
break;
|
|
308
313
|
case "ArrowLeft":
|
|
309
|
-
|
|
314
|
+
O.back ? (n.preventDefault(), n.stopPropagation(), O.back()) : O.level > 0 && (n.preventDefault(), n.stopPropagation(), Ie("close-level"));
|
|
310
315
|
break;
|
|
311
316
|
}
|
|
312
|
-
},
|
|
313
|
-
let n =
|
|
317
|
+
}, Mt = (e, t) => {
|
|
318
|
+
let n = F(e) - .5;
|
|
314
319
|
switch (t.key) {
|
|
315
320
|
case "ArrowDown":
|
|
316
321
|
t.preventDefault(), U(n, 1);
|
|
@@ -325,159 +330,171 @@ var _e = {
|
|
|
325
330
|
t.preventDefault(), G();
|
|
326
331
|
break;
|
|
327
332
|
case "ArrowLeft":
|
|
328
|
-
|
|
333
|
+
O.back ? (t.preventDefault(), t.stopPropagation(), O.back()) : O.level > 0 && (t.preventDefault(), t.stopPropagation(), Ie("close-level"));
|
|
329
334
|
break;
|
|
330
335
|
}
|
|
331
336
|
};
|
|
332
|
-
return
|
|
337
|
+
return Pe({
|
|
333
338
|
focusFirst: W,
|
|
334
339
|
focusLast: G
|
|
335
|
-
}), (e, t) => (y(!0), p(l, null,
|
|
340
|
+
}), (e, t) => (y(!0), p(l, null, x(j.value, (r, a) => (y(), p(l, { key: r.key ?? a }, [
|
|
336
341
|
r.divider ? (y(), p("hr", _e)) : f("", !0),
|
|
337
|
-
|
|
342
|
+
R(r) ? (y(), p("div", {
|
|
338
343
|
key: 1,
|
|
339
|
-
id:
|
|
344
|
+
id: tt(a),
|
|
340
345
|
ref_for: !0,
|
|
341
|
-
ref: (e) =>
|
|
342
|
-
class: v(["bb-dropdown__group-title",
|
|
346
|
+
ref: (e) => ct(a, e),
|
|
347
|
+
class: v(["bb-dropdown__group-title", Je(r)]),
|
|
343
348
|
role: r.onClick ? "menuitem" : "presentation",
|
|
344
349
|
tabindex: r.onClick ? -1 : void 0,
|
|
345
350
|
onClick: (e) => r.onClick?.(e),
|
|
346
351
|
onKeydown: [
|
|
347
|
-
(e) => r.onClick &&
|
|
348
|
-
|
|
349
|
-
|
|
352
|
+
(e) => r.onClick && Mt(a, e),
|
|
353
|
+
E((e) => r.onClick?.(e), ["enter"]),
|
|
354
|
+
E(D((e) => r.onClick?.(e), ["prevent"]), ["space"])
|
|
350
355
|
]
|
|
351
356
|
}, [
|
|
352
|
-
|
|
357
|
+
L(r, "prepend") ? (y(), d(S(L(r, "prepend")), g({
|
|
353
358
|
key: 0,
|
|
354
359
|
ref_for: !0
|
|
355
|
-
},
|
|
360
|
+
}, z(r, F(a))), null, 16)) : w(k).slots["item:prepend"] ? (y(), d(S(w(k).slots["item:prepend"]), g({
|
|
356
361
|
key: 1,
|
|
357
362
|
ref_for: !0
|
|
358
|
-
},
|
|
363
|
+
}, z(r, F(a))), null, 16)) : r["prepend:icon"] ? (y(), d(s, {
|
|
359
364
|
key: 2,
|
|
360
365
|
class: "group-title__prepend-icon",
|
|
361
366
|
icon: r["prepend:icon"]
|
|
362
367
|
}, null, 8, ["icon"])) : f("", !0),
|
|
363
|
-
|
|
368
|
+
L(r) ? (y(), d(S(L(r)), g({
|
|
364
369
|
key: 3,
|
|
365
370
|
ref_for: !0
|
|
366
|
-
},
|
|
367
|
-
|
|
371
|
+
}, z(r, F(a))), null, 16)) : r.label ? (y(), p("span", ye, C(r.label), 1)) : f("", !0),
|
|
372
|
+
L(r, "append") ? (y(), d(S(L(r, "append")), g({
|
|
368
373
|
key: 5,
|
|
369
374
|
ref_for: !0
|
|
370
|
-
},
|
|
375
|
+
}, z(r, F(a))), null, 16)) : r["append:icon"] ? (y(), d(s, {
|
|
371
376
|
key: 6,
|
|
372
377
|
class: "group-title__append-icon",
|
|
373
378
|
icon: r["append:icon"]
|
|
374
|
-
}, null, 8, ["icon"])) :
|
|
379
|
+
}, null, 8, ["icon"])) : w(k).slots["item:append"] ? (y(), d(S(w(k).slots["item:append"]), g({
|
|
375
380
|
key: 7,
|
|
376
381
|
ref_for: !0
|
|
377
|
-
},
|
|
382
|
+
}, z(r, F(a))), null, 16)) : f("", !0)
|
|
378
383
|
], 42, ve)) : f("", !0),
|
|
379
|
-
|
|
380
|
-
|
|
384
|
+
w(A) && $e(r).length ? (y(), p("div", be, [m("div", xe, [(y(!0), p(l, null, x($e(r), (e) => (y(), d(ee, {
|
|
385
|
+
key: e.key,
|
|
386
|
+
class: "bb-dropdown__sheet-chip",
|
|
387
|
+
clearable: !w(k).disabled.value,
|
|
388
|
+
size: "xl",
|
|
389
|
+
variant: "secondary",
|
|
390
|
+
"onClick:clear": (t) => w(k).deselect(r.key, e.key),
|
|
391
|
+
onMousedown: t[0] ||= D(() => {}, ["prevent"])
|
|
392
|
+
}, {
|
|
393
|
+
default: T(() => [ue(C(e.text), 1)]),
|
|
394
|
+
_: 2
|
|
395
|
+
}, 1032, ["clearable", "onClick:clear"]))), 128))])])) : f("", !0),
|
|
396
|
+
r.searchable && r.key ? (y(), p("div", Se, [
|
|
397
|
+
h(s, {
|
|
381
398
|
"aria-hidden": "true",
|
|
382
399
|
class: "bb-dropdown__search-icon",
|
|
383
400
|
focusable: "false",
|
|
384
|
-
icon:
|
|
401
|
+
icon: w(ie)
|
|
385
402
|
}, null, 8, ["icon"]),
|
|
386
403
|
m("input", {
|
|
387
404
|
ref_for: !0,
|
|
388
|
-
ref: (e) =>
|
|
389
|
-
"aria-label": r.searchPlaceholder ||
|
|
405
|
+
ref: (e) => Ve(r.key, e),
|
|
406
|
+
"aria-label": r.searchPlaceholder || w(Re),
|
|
390
407
|
autocomplete: "off",
|
|
391
408
|
class: "bb-dropdown__search-input",
|
|
392
|
-
placeholder: r.searchPlaceholder ||
|
|
409
|
+
placeholder: r.searchPlaceholder || w(Re),
|
|
393
410
|
role: "searchbox",
|
|
394
411
|
type: "text",
|
|
395
|
-
value:
|
|
396
|
-
onInput: (e) =>
|
|
412
|
+
value: w(k).queryFor(r.key),
|
|
413
|
+
onInput: (e) => w(k).setQuery(r.key, e.target.value),
|
|
397
414
|
onKeydown: [
|
|
398
|
-
|
|
399
|
-
t[
|
|
400
|
-
|
|
415
|
+
E(D(ft, ["stop", "prevent"]), ["down"]),
|
|
416
|
+
t[1] ||= E(D((e) => w(k).close(), ["stop", "prevent"]), ["esc"]),
|
|
417
|
+
E(D(G, ["stop", "prevent"]), ["up"])
|
|
401
418
|
]
|
|
402
|
-
}, null, 40,
|
|
403
|
-
r.key &&
|
|
419
|
+
}, null, 40, Ce),
|
|
420
|
+
r.key && w(k).isGroupLoading(r.key) ? (y(), p("div", we)) : f("", !0)
|
|
404
421
|
])) : f("", !0),
|
|
405
422
|
m("div", {
|
|
406
|
-
"aria-labelledby":
|
|
423
|
+
"aria-labelledby": at(r, a),
|
|
407
424
|
class: v(["bb-dropdown__group-items", {
|
|
408
|
-
"bb-dropdown__group-items--capped": !!
|
|
409
|
-
"bb-dropdown__group-items--loading": !!r.key &&
|
|
425
|
+
"bb-dropdown__group-items--capped": !!Ue(r),
|
|
426
|
+
"bb-dropdown__group-items--loading": !!r.key && w(k).isGroupLoading(r.key)
|
|
410
427
|
}]),
|
|
411
|
-
role:
|
|
412
|
-
style:
|
|
413
|
-
}, [(y(!0), p(l, null,
|
|
428
|
+
role: it(r),
|
|
429
|
+
style: fe({ maxHeight: Ue(r) })
|
|
430
|
+
}, [(y(!0), p(l, null, x(r.items, (t, o) => (y(), p(l, { key: t.key }, [t.placeholder ? (y(), p("div", {
|
|
414
431
|
key: 0,
|
|
415
432
|
class: v(["bb-dropdown__placeholder", `bb-dropdown__placeholder--${t.placeholder}`]),
|
|
416
433
|
role: "presentation"
|
|
417
|
-
}, [
|
|
434
|
+
}, [Qe(t) ? (y(), d(S(Qe(t)), {
|
|
418
435
|
key: 0,
|
|
419
436
|
"group-key": r.key,
|
|
420
437
|
text: t.text
|
|
421
|
-
}, null, 8, ["group-key", "text"])) : (y(), p("span",
|
|
438
|
+
}, null, 8, ["group-key", "text"])) : (y(), p("span", Ee, C(t.text), 1))], 2)) : (y(), p(l, { key: 1 }, [h(i, g({
|
|
422
439
|
ref_for: !0,
|
|
423
|
-
ref: (e) =>
|
|
424
|
-
"aria-busy":
|
|
425
|
-
},
|
|
426
|
-
"aria-checked": r.selectable ?
|
|
440
|
+
ref: (e) => ot(F(a) + o, e),
|
|
441
|
+
"aria-busy": w(k).isItemLoading(t.key) || void 0
|
|
442
|
+
}, Ze(t), {
|
|
443
|
+
"aria-checked": r.selectable ? P(r, t) : void 0,
|
|
427
444
|
"aria-expanded": t.items ? K.value === t.key : void 0,
|
|
428
445
|
"aria-haspopup": t.items ? "menu" : void 0,
|
|
429
|
-
class: ["bb-dropdown__item", [
|
|
430
|
-
"bb-dropdown__item--selected": r.selectable &&
|
|
446
|
+
class: ["bb-dropdown__item", [qe(t), {
|
|
447
|
+
"bb-dropdown__item--selected": r.selectable && P(r, t),
|
|
431
448
|
"bb-dropdown__item--has-submenu": !!t.items,
|
|
432
449
|
"bb-dropdown__item--description": !!t.description
|
|
433
450
|
}]],
|
|
434
451
|
"data-dropdown-item": "",
|
|
435
|
-
disabled: t.disabled ||
|
|
436
|
-
role:
|
|
452
|
+
disabled: t.disabled || w(k).disabled.value,
|
|
453
|
+
role: Ye(r),
|
|
437
454
|
tabindex: "-1",
|
|
438
|
-
onClick: (e) =>
|
|
439
|
-
onKeydown: (e) =>
|
|
440
|
-
onMousedown: (e) =>
|
|
441
|
-
onPointerenter: (e) =>
|
|
442
|
-
onPointerleave: (e) =>
|
|
455
|
+
onClick: (e) => At(r, t, F(a) + o, e),
|
|
456
|
+
onKeydown: (e) => jt(t, F(a) + o, e),
|
|
457
|
+
onMousedown: (e) => kt(r, e),
|
|
458
|
+
onPointerenter: (e) => Tt(t, F(a) + o, e),
|
|
459
|
+
onPointerleave: (e) => Dt(t, e)
|
|
443
460
|
}), {
|
|
444
|
-
default:
|
|
445
|
-
|
|
461
|
+
default: T(() => [
|
|
462
|
+
N(t, "prepend") ? (y(), d(S(N(t, "prepend")), g({
|
|
446
463
|
key: 0,
|
|
447
464
|
ref_for: !0
|
|
448
|
-
},
|
|
465
|
+
}, I(r, t, F(a) + o)), null, 16)) : w(k).slots["item:prepend"] ? (y(), d(S(w(k).slots["item:prepend"]), g({
|
|
449
466
|
key: 1,
|
|
450
467
|
ref_for: !0
|
|
451
|
-
},
|
|
468
|
+
}, I(r, t, F(a) + o)), null, 16)) : t["prepend:icon"] ? (y(), d(s, {
|
|
452
469
|
key: 2,
|
|
453
470
|
class: "item__prepend-icon",
|
|
454
471
|
icon: t["prepend:icon"]
|
|
455
472
|
}, null, 8, ["icon"])) : f("", !0),
|
|
456
|
-
|
|
473
|
+
N(t) ? (y(), d(S(N(t)), g({
|
|
457
474
|
key: 3,
|
|
458
475
|
ref_for: !0
|
|
459
|
-
},
|
|
460
|
-
|
|
476
|
+
}, I(r, t, F(a) + o)), null, 16)) : (y(), p("span", De, [ue(C(t.text) + " ", 1), t.description ? (y(), p("span", Oe, C(t.description), 1)) : f("", !0)])),
|
|
477
|
+
N(t, "append") ? (y(), d(S(N(t, "append")), g({
|
|
461
478
|
key: 5,
|
|
462
479
|
ref_for: !0
|
|
463
|
-
},
|
|
480
|
+
}, I(r, t, F(a) + o)), null, 16)) : r.selectable ? (y(), d(s, {
|
|
464
481
|
key: 6,
|
|
465
482
|
"aria-hidden": "true",
|
|
466
483
|
class: "item__check",
|
|
467
|
-
icon:
|
|
468
|
-
}, null, 8, ["icon"])) : t.items ? (y(), d(
|
|
484
|
+
icon: w(ne)
|
|
485
|
+
}, null, 8, ["icon"])) : t.items ? (y(), d(s, {
|
|
469
486
|
key: 7,
|
|
470
487
|
"aria-hidden": "true",
|
|
471
488
|
class: "item__chevron",
|
|
472
|
-
icon:
|
|
473
|
-
}, null, 8, ["icon"])) : t["append:icon"] ? (y(), d(
|
|
489
|
+
icon: w(re)
|
|
490
|
+
}, null, 8, ["icon"])) : t["append:icon"] ? (y(), d(s, {
|
|
474
491
|
key: 8,
|
|
475
492
|
class: "item__append-icon",
|
|
476
493
|
icon: t["append:icon"]
|
|
477
|
-
}, null, 8, ["icon"])) :
|
|
494
|
+
}, null, 8, ["icon"])) : w(k).slots["item:append"] ? (y(), d(S(w(k).slots["item:append"]), g({
|
|
478
495
|
key: 9,
|
|
479
496
|
ref_for: !0
|
|
480
|
-
},
|
|
497
|
+
}, I(r, t, F(a) + o)), null, 16)) : f("", !0)
|
|
481
498
|
]),
|
|
482
499
|
_: 2
|
|
483
500
|
}, 1040, [
|
|
@@ -495,46 +512,46 @@ var _e = {
|
|
|
495
512
|
"onPointerleave"
|
|
496
513
|
]), t.items && !e.navigate ? (y(), d(n, {
|
|
497
514
|
key: 0,
|
|
498
|
-
anchor:
|
|
515
|
+
anchor: B.value[F(a) + o],
|
|
499
516
|
class: "bb-dropdown bb-dropdown--submenu",
|
|
500
517
|
"hide-arrow": "",
|
|
501
518
|
"model-value": K.value === t.key,
|
|
502
|
-
offset:
|
|
519
|
+
offset: gt.value,
|
|
503
520
|
placement: "right-start",
|
|
504
521
|
role: "none",
|
|
505
|
-
"transition-duration":
|
|
506
|
-
"onUpdate:modelValue": (e) =>
|
|
522
|
+
"transition-duration": Ne,
|
|
523
|
+
"onUpdate:modelValue": (e) => Ct(t.key, e)
|
|
507
524
|
}, {
|
|
508
|
-
default:
|
|
509
|
-
id: `submenu_${
|
|
510
|
-
"aria-label":
|
|
525
|
+
default: T(({ availableHeight: n }) => [m("span", {
|
|
526
|
+
id: `submenu_${w(k).rootId}_${t.key}`,
|
|
527
|
+
"aria-label": rt(t) ? t.text : void 0,
|
|
511
528
|
class: "bb-dropdown__items-container",
|
|
512
|
-
"data-bb-dropdown-surface":
|
|
513
|
-
inert:
|
|
514
|
-
role:
|
|
515
|
-
style:
|
|
516
|
-
onPointerenter:
|
|
517
|
-
onPointerleave: (e) =>
|
|
518
|
-
}, [h(
|
|
529
|
+
"data-bb-dropdown-surface": w(k).rootId,
|
|
530
|
+
inert: ht(t.key),
|
|
531
|
+
role: rt(t) ? "dialog" : "menu",
|
|
532
|
+
style: fe({ "--max-h": n == null ? void 0 : `${n}px` }),
|
|
533
|
+
onPointerenter: Et,
|
|
534
|
+
onPointerleave: (e) => Ot(t.key, e)
|
|
535
|
+
}, [h(le, {
|
|
519
536
|
ref_for: !0,
|
|
520
|
-
ref: (e) =>
|
|
521
|
-
groups:
|
|
537
|
+
ref: (e) => vt(t.key, e),
|
|
538
|
+
groups: We(t.items),
|
|
522
539
|
level: e.level + 1,
|
|
523
|
-
onCloseLevel: (e) =>
|
|
540
|
+
onCloseLevel: (e) => wt(F(a) + o)
|
|
524
541
|
}, null, 8, [
|
|
525
542
|
"groups",
|
|
526
543
|
"level",
|
|
527
544
|
"onCloseLevel"
|
|
528
|
-
])], 44,
|
|
545
|
+
])], 44, ke)]),
|
|
529
546
|
_: 2
|
|
530
547
|
}, 1032, [
|
|
531
548
|
"anchor",
|
|
532
549
|
"model-value",
|
|
533
550
|
"offset",
|
|
534
551
|
"onUpdate:modelValue"
|
|
535
|
-
])) : f("", !0)], 64))], 64))), 128))], 14,
|
|
552
|
+
])) : f("", !0)], 64))], 64))), 128))], 14, Te)
|
|
536
553
|
], 64))), 128));
|
|
537
554
|
}
|
|
538
555
|
});
|
|
539
556
|
//#endregion
|
|
540
|
-
export {
|
|
557
|
+
export { Pe as default };
|