bitboss-ui 3.0.0-beta.48 → 3.0.0-beta.49
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 +24 -7
- package/bin/bitboss-ui-mcp.mjs +15 -3
- package/bin/bitboss-ui.mjs +115 -13
- package/dist/ai/BbAvatar.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +65 -65
- package/dist/ai/BbButton.md +16 -5
- package/dist/ai/BbCheckbox.md +0 -2
- package/dist/ai/BbCheckboxGroup.md +13 -20
- package/dist/ai/BbDatePickerInput.md +4 -2
- package/dist/ai/BbDialog.md +1 -8
- package/dist/ai/BbDropdown.md +231 -220
- package/dist/ai/BbDropdownButton.md +65 -65
- package/dist/ai/BbDropdownGroup.md +2 -2
- package/dist/ai/BbDropzone.md +10 -10
- package/dist/ai/BbForm.md +43 -52
- package/dist/ai/BbHoverCard.md +4 -2
- package/dist/ai/BbNumberInput.md +88 -21
- package/dist/ai/BbPopover.md +29 -23
- package/dist/ai/BbProgress.md +48 -22
- package/dist/ai/BbRadioGroup.md +13 -19
- package/dist/ai/BbSelect.md +16 -36
- package/dist/ai/BbSelectPopover.md +14 -30
- package/dist/ai/BbSmoothHeight.md +0 -2
- package/dist/ai/BbSwitchGroup.md +13 -20
- package/dist/ai/BbTable.md +11 -10
- package/dist/ai/BbTabs.md +106 -105
- package/dist/ai/BbTabsList.md +2 -2
- package/dist/ai/BbTabsPanels.md +1 -1
- package/dist/ai/BbTabsRoot.md +2 -2
- package/dist/ai/BbTooltip.md +24 -10
- package/dist/ai/BbTree.md +14 -11
- package/dist/ai/changelog.json +256 -5
- package/dist/ai/components.json +36 -34
- package/dist/ai/composables/useBbDropdownContext.md +16 -16
- package/dist/ai/composables/useBbFormField.md +5 -1
- package/dist/ai/composables/useBbTabsContext.md +14 -14
- package/dist/ai/guides/agent-contract.md +27 -27
- package/dist/ai/guides/ai-router.md +1 -1
- package/dist/ai/guides/component-picker.md +3 -3
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +10 -10
- package/dist/ai/guides/inertia-helpers.md +120 -67
- package/dist/ai/guides/installation-and-plugin-setup.md +43 -15
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +3 -2
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -16
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +9 -8
- package/dist/ai/guides/migration/components/bb-dropdown.md +15 -14
- package/dist/ai/guides/migration/components/bb-radio-group.md +2 -1
- package/dist/ai/guides/migration/components/bb-select-popover.md +6 -1
- package/dist/ai/guides/migration/components/bb-select.md +10 -2
- package/dist/ai/guides/migration/components/bb-switch-group.md +2 -1
- package/dist/ai/guides/migration/components/bb-tabs.md +9 -8
- package/dist/ai/guides/migration/components/bb-tooltip.md +1 -1
- package/dist/ai/guides/migration/v2-to-v3.md +114 -17
- package/dist/ai/guides/migration/v3-beta-tooling.md +11 -0
- package/dist/ai/guides/options-items-playbook.md +30 -24
- package/dist/ai/guides/passthrough.md +2 -2
- package/dist/ai/guides/preset-components.md +18 -3
- package/dist/ai/guides/typescript-generic-components.md +1 -1
- package/dist/ai/guides/validated-forms.md +11 -22
- package/dist/ai/guides/validation-providers.md +4 -3
- package/dist/ai/helpers/inertia/manifest.json +636 -0
- package/dist/ai/helpers/inertia/types.ts +15 -0
- package/dist/ai/helpers/inertia/useAsyncFn.ts +110 -0
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +102 -0
- package/dist/ai/helpers/inertia/useDeleteCmd.ts +30 -0
- package/dist/ai/helpers/inertia/useHasChanged.ts +36 -0
- package/dist/ai/helpers/inertia/useIndexById.ts +23 -0
- package/dist/ai/helpers/inertia/useLazyProp.ts +148 -0
- package/dist/ai/helpers/inertia/useLazyPropGetter.ts +50 -0
- package/dist/ai/helpers/inertia/useLoading.ts +20 -0
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +88 -0
- package/dist/ai/helpers/inertia/usePromiseForm.ts +62 -0
- package/dist/ai/helpers/inertia/useProp.ts +63 -0
- package/dist/ai/helpers/inertia/useQuery.ts +19 -0
- package/dist/ai/helpers/inertia/useQueryObject.ts +116 -0
- package/dist/ai/helpers/inertia/useResourceContext.ts +69 -0
- package/dist/ai/helpers/inertia/useRouteQuery.ts +54 -0
- package/dist/ai/helpers/inertia/useScreenSizes.ts +23 -0
- package/dist/ai/helpers/inertia/useTableContext.ts +34 -0
- package/dist/ai/helpers/inertia/useTableSelectionContext.ts +48 -0
- package/dist/ai/helpers/inertia/useUntil.ts +33 -0
- package/dist/ai/helpers/inertia/utils.ts +24 -0
- package/dist/ai/index.md +6 -6
- package/dist/ai/manifest/components/BbBreadcrumbs.json +10 -6
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbDropdown.json +23 -20
- package/dist/ai/manifest/components/BbDropdown.tree.json +2 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +22 -19
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdownGroup.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +1 -0
- package/dist/ai/manifest/components/BbNumberInput.json +6 -1
- package/dist/ai/manifest/components/BbNumberInput.tree.json +2 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -0
- package/dist/ai/manifest/components/BbProgress.json +6 -6
- package/dist/ai/manifest/components/BbProgress.tree.json +1 -0
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbSelect.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbTabs.json +7 -6
- package/dist/ai/manifest/components/BbTabsList.json +3 -3
- package/dist/ai/manifest/components/BbTabsPanels.json +1 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +5 -4
- package/dist/ai/manifest/components/BbTooltip.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +2 -0
- package/dist/ai/manifest/types.advanced.json +10 -9
- package/dist/ai/manifest/types.api.json +5 -4
- package/dist/ai/recipes/inertia/approvals-inbox.md +16 -18
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +23 -33
- package/dist/ai/recipes/inertia/layout-scaffold.md +16 -16
- package/dist/ai/recipes/inertia/onboarding.md +6 -10
- package/dist/ai/recipes/inertia/ownership-atlas.md +15 -18
- package/dist/ai/recipes/inertia/record-form.md +11 -11
- package/dist/ai/recipes/inertia/records-workspace.md +38 -41
- package/dist/ai/recipes/inertia/settings-workspace.md +26 -38
- package/dist/ai/recipes/inertia/upload-center.md +31 -39
- package/dist/ai/recipes/inertia/wizard-form.md +10 -19
- package/dist/ai/recipes/nuxt/approvals-inbox.md +7 -8
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +14 -24
- package/dist/ai/recipes/nuxt/layout-scaffold.md +16 -16
- package/dist/ai/recipes/nuxt/onboarding.md +2 -6
- package/dist/ai/recipes/nuxt/ownership-atlas.md +7 -9
- package/dist/ai/recipes/nuxt/record-form.md +5 -5
- package/dist/ai/recipes/nuxt/records-workspace.md +29 -31
- package/dist/ai/recipes/nuxt/settings-workspace.md +22 -34
- package/dist/ai/recipes/nuxt/upload-center.md +22 -29
- package/dist/ai/recipes/nuxt/wizard-form.md +3 -11
- package/dist/ai/recipes/vue/approvals-inbox.md +7 -8
- package/dist/ai/recipes/vue/inline-edit-workspace.md +14 -24
- package/dist/ai/recipes/vue/layout-scaffold.md +16 -16
- package/dist/ai/recipes/vue/onboarding.md +2 -6
- package/dist/ai/recipes/vue/ownership-atlas.md +7 -9
- package/dist/ai/recipes/vue/record-form.md +5 -5
- package/dist/ai/recipes/vue/records-workspace.md +29 -31
- package/dist/ai/recipes/vue/settings-workspace.md +22 -34
- package/dist/ai/recipes/vue/upload-center.md +22 -29
- package/dist/ai/recipes/vue/wizard-form.md +3 -11
- package/dist/ai/source/BbAccordion.md +1 -1
- package/dist/ai/source/BbAlert.md +3 -3
- package/dist/ai/source/BbBadge.md +2 -2
- package/dist/ai/source/BbBadgeButton.md +5 -4
- package/dist/ai/source/BbBaseButton.md +1 -1
- package/dist/ai/source/BbBaseRadioIcon.md +1 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +1 -0
- package/dist/ai/source/BbBreadcrumbs.md +63 -42
- package/dist/ai/source/BbButton.md +71 -33
- package/dist/ai/source/BbCalendar.md +17 -16
- package/dist/ai/source/BbCheckbox.md +3 -2
- package/dist/ai/source/BbCheckboxGroup.md +11 -4
- package/dist/ai/source/BbColorInput.md +10 -9
- package/dist/ai/source/BbConfirm.md +1 -1
- package/dist/ai/source/BbConfirmPortal.md +1 -1
- package/dist/ai/source/BbDatePicker.md +2 -2
- package/dist/ai/source/BbDatePickerInput.md +47 -20
- package/dist/ai/source/BbDialog.md +5 -5
- package/dist/ai/source/BbDropdown.md +230 -158
- package/dist/ai/source/BbDropdownButton.md +19 -12
- package/dist/ai/source/BbDropdownGroup.md +126 -93
- package/dist/ai/source/BbForm.md +25 -1
- package/dist/ai/source/BbIndicator.md +4 -0
- package/dist/ai/source/BbNumberInput.md +855 -19
- package/dist/ai/source/BbOffCanvas.md +27 -11
- package/dist/ai/source/BbPagination.md +3 -3
- package/dist/ai/source/BbPopover.md +152 -8
- package/dist/ai/source/BbPopoverPortal.md +11 -0
- package/dist/ai/source/BbProgress.md +82 -18
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbRating.md +11 -9
- package/dist/ai/source/BbSelect.md +16 -10
- package/dist/ai/source/BbSelectPopover.md +29 -23
- package/dist/ai/source/BbSlider.md +12 -6
- package/dist/ai/source/BbSwitch.md +3 -2
- package/dist/ai/source/BbSwitchGroup.md +5 -2
- package/dist/ai/source/BbTable.md +102 -18
- package/dist/ai/source/BbTabs.md +27 -23
- package/dist/ai/source/BbTabsList.md +26 -22
- package/dist/ai/source/BbTabsPanels.md +26 -22
- package/dist/ai/source/BbTabsRoot.md +25 -21
- package/dist/ai/source/BbTag.md +10 -9
- package/dist/ai/source/BbTextInput.md +5 -4
- package/dist/ai/source/BbTextarea.md +6 -5
- package/dist/ai/source/BbTimePicker.md +1 -1
- package/dist/ai/source/BbTimePickerInput.md +46 -9
- package/dist/ai/source/BbToast.md +10 -7
- package/dist/ai/source/BbToastPortal.md +10 -7
- package/dist/ai/source/BbTooltip.md +54 -8
- package/dist/ai/source/BbTree.md +21 -3
- package/dist/ai/source/CommonField.md +6 -4
- package/dist/ai/source/CommonFieldInput.md +15 -10
- package/dist/ai/source/CommonPopover.md +6 -0
- package/dist/ai/source/CommonTimeSelector.md +5 -4
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +10 -8
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +45 -45
- package/dist/components/BbBreadcrumbs/types.d.ts +25 -17
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +84 -71
- package/dist/components/BbButton/toggleRoving.d.ts +6 -0
- package/dist/components/BbButton/toggleRoving.js +45 -0
- package/dist/components/BbButton/types.d.ts +4 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +178 -178
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +28 -28
- package/dist/components/BbCalendar/useCalendarGrid.js +141 -139
- package/dist/components/BbCalendar/useDayjsLocale.d.ts +38 -15
- package/dist/components/BbCalendar/useDayjsLocale.js +31 -30
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +48 -48
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbCheckboxGroup/types.d.ts +6 -2
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +363 -349
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +91 -86
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +298 -289
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +322 -356
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +17 -15
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +40 -0
- package/dist/components/BbDropdown/DropdownRow.vue.js +5 -0
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/BbDropdown/normalizeGroups.d.ts +8 -2
- package/dist/components/BbDropdown/normalizeGroups.js +60 -46
- package/dist/components/BbDropdown/types.d.ts +119 -88
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +11 -2
- package/dist/components/BbDropdownButton/types.d.ts +2 -2
- package/dist/components/BbForm/BbForm.vue.d.ts +9 -0
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +114 -105
- package/dist/components/BbForm/BbFormCustomField.js +1 -1
- package/dist/components/BbForm/bindFormField.js +2 -1
- package/dist/components/BbForm/formFields.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +0 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +452 -125
- package/dist/components/BbNumberInput/numberDisplay.d.ts +256 -0
- package/dist/components/BbNumberInput/numberDisplay.js +499 -0
- package/dist/components/BbNumberInput/types.d.ts +54 -1
- package/dist/components/BbNumberInput/warroom/corpus.d.ts +58 -0
- package/dist/components/BbNumberInput/warroom/currency-verify.rows.d.ts +28 -0
- package/dist/components/BbNumberInput/warroom/currency.rows.d.ts +2 -0
- package/dist/components/BbNumberInput/warroom/harness.d.ts +217 -0
- package/dist/components/BbNumberInput/warroom/oracle.d.ts +150 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -0
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +207 -164
- package/dist/components/BbPopover/types.d.ts +11 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +15 -7
- package/dist/components/BbProgress/types.d.ts +23 -7
- package/dist/components/BbProgress/types.js +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +102 -101
- package/dist/components/BbRadioGroup/types.d.ts +6 -2
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +63 -63
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +156 -154
- package/dist/components/BbSelect/types.d.ts +6 -2
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbSelectPopover/types.d.ts +6 -2
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +153 -153
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +62 -62
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +131 -130
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +711 -676
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/types.d.ts +25 -21
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +76 -76
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +58 -58
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +82 -82
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +246 -236
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +102 -97
- package/dist/components/BbTooltip/tooltipWarmup.d.ts +23 -0
- package/dist/components/BbTooltip/tooltipWarmup.js +7 -0
- package/dist/components/BbTooltip/types.d.ts +7 -2
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +29 -21
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +10 -7
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +37 -36
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/composables/formSubmitLock.d.ts +6 -0
- package/dist/composables/formSubmitLock.js +4 -0
- package/dist/composables/useBaseOptions.d.ts +7 -1
- package/dist/composables/useBaseOptions.js +32 -32
- package/dist/composables/useBbDropdownContext.d.ts +8 -8
- package/dist/composables/useBbFormField.d.ts +9 -0
- package/dist/composables/useBbFormField.js +5 -3
- package/dist/composables/useBbTabsContext.d.ts +10 -10
- package/dist/composables/useBbTabsContext.js +18 -18
- package/dist/composables/useFormBinding.d.ts +11 -0
- package/dist/composables/useFormBinding.js +15 -13
- package/dist/composables/useItemText.d.ts +5 -1
- package/dist/composables/useItemText.js +8 -3
- package/dist/composables/useItemValue.d.ts +5 -1
- package/dist/composables/useItemValue.js +8 -3
- package/dist/composables/useLocale.js +10 -9
- package/dist/deprecation/ai-deprecations.json.d.ts +130 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.js +1 -1
- package/dist/directives/bbDropdown.js +1 -1
- package/dist/i18n/index.d.ts +7 -12
- package/dist/i18n/locales/cs.json +11 -14
- package/dist/i18n/locales/da.json +13 -16
- package/dist/i18n/locales/de-CH.json +137 -0
- package/dist/i18n/locales/de.json +14 -17
- package/dist/i18n/locales/el.json +10 -13
- package/dist/i18n/locales/en-GB.json +137 -0
- package/dist/i18n/locales/en.json +8 -11
- package/dist/i18n/locales/es-MX.json +137 -0
- package/dist/i18n/locales/es.json +16 -19
- package/dist/i18n/locales/fi.json +8 -11
- package/dist/i18n/locales/fr.json +23 -26
- package/dist/i18n/locales/hu.json +8 -11
- package/dist/i18n/locales/it.json +12 -15
- package/dist/i18n/locales/ja.json +13 -16
- package/dist/i18n/locales/ko.json +10 -13
- package/dist/i18n/locales/nb.json +13 -16
- package/dist/i18n/locales/nl.json +21 -24
- package/dist/i18n/locales/pl.json +10 -13
- package/dist/i18n/locales/{pt.json → pt-BR.json} +19 -22
- package/dist/i18n/locales/pt-PT.json +137 -0
- package/dist/i18n/locales/ro.json +22 -25
- package/dist/i18n/locales/ru.json +11 -14
- package/dist/i18n/locales/sv.json +16 -19
- package/dist/i18n/locales/tr.json +14 -17
- package/dist/i18n/locales/uk.json +11 -14
- package/dist/i18n/locales/{zh-cn.json → zh-CN.json} +10 -13
- package/dist/i18n/locales/zh-HK.json +137 -0
- package/dist/i18n/locales/zh-TW.json +137 -0
- package/dist/i18n/regionHints.d.ts +16 -0
- package/dist/i18n/regionHints.js +49 -0
- package/dist/i18n/regions.d.ts +286 -0
- package/dist/i18n/regions.js +265 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/llms-full.txt +1785 -1637
- package/dist/llms-medium.txt +74 -46
- package/dist/llms.txt +7 -7
- package/dist/locale-blueprint.json +16 -13
- package/dist/styles.css +2 -2
- package/dist/types/ptComponentMap.d.ts +1 -1
- package/dist/utilities/functions/slotKey.d.ts +2 -2
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +22 -19
- package/dist/vite.js +309 -297
- package/llms.txt +7 -7
- package/package.json +5 -3
- package/scripts/lib/agent-manifest.mjs +2 -1
- package/scripts/lib/eslint-disable.mjs +12 -4
- package/scripts/lib/eslint-plugin.d.ts +5 -1
- package/scripts/lib/eslint-plugin.mjs +187 -6
- package/scripts/lib/helper-canon.mjs +176 -0
- package/scripts/lib/helpers-add.mjs +1303 -0
- package/scripts/lib/local-components.mjs +33 -4
- package/scripts/lib/locale-check.mjs +165 -0
- package/scripts/lib/redundant-item-accessor.mjs +398 -0
- package/scripts/lib/renamed-item-field.mjs +343 -0
- package/scripts/lib/slot-key.mjs +2 -2
- package/scripts/lib/slot-renames.mjs +1 -1
- package/scripts/lib/validate-bb-markup.mjs +123 -56
- package/dist/i18n/index.js +0 -27
|
@@ -5,63 +5,58 @@ import { extractDomContainer as r } from "../../utilities/functions/extractDomCo
|
|
|
5
5
|
import i from "../CommonPopover/CommonPopover.vue.js";
|
|
6
6
|
import { useSheetSurface as a } from "../../composables/useSheetSurface.js";
|
|
7
7
|
import { BB_BASE_BUTTON_PROP_KEYS as ee } from "../BbBaseButton/types.js";
|
|
8
|
-
import te from "
|
|
9
|
-
import { useLocale as ne } from "../../composables/useLocale.js";
|
|
8
|
+
import { useLocale as te } from "../../composables/useLocale.js";
|
|
10
9
|
import o from "../BbIcon/BbIcon.vue.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
10
|
+
import ne from "../BbBadge/BbBadge.vue.js";
|
|
11
|
+
import re from "../ErrorIcon/ErrorIcon.vue.js";
|
|
12
|
+
import ie from "./DropdownRow.vue.js";
|
|
13
13
|
import { isImeComposing as ae } from "../../utilities/functions/isImeComposing.js";
|
|
14
14
|
import { matchAnyKey as oe } from "../../utilities/functions/matchAnyKey.js";
|
|
15
|
-
import se from "../../assets/svgs/
|
|
16
|
-
import ce from "../../
|
|
17
|
-
import le from "../../
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import _e from "./BbDropdownList.vue.js";
|
|
23
|
-
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as ve, createVNode as ye, defineComponent as be, mergeProps as p, nextTick as m, normalizeClass as h, normalizeStyle as xe, onBeforeUnmount as Se, onMounted as Ce, openBlock as g, ref as _, renderList as v, resolveDynamicComponent as y, toDisplayString as b, unref as x, watch as we, watchEffect as Te, withCtx as S, withKeys as Ee, withModifiers as De } from "vue";
|
|
15
|
+
import se from "../../assets/svgs/search.svg_raw.js";
|
|
16
|
+
import { useImeDismissBlur as ce } from "../../composables/useImeDismissBlur.js";
|
|
17
|
+
import { isPrintableTypeaheadKey as le, normalizeSearchToken as ue, useTypeahead as de } from "../../composables/useTypeahead.js";
|
|
18
|
+
import { levelHasSearch as fe, normalizeGroups as pe } from "./normalizeGroups.js";
|
|
19
|
+
import { useDropdownContext as me } from "./useDropdownContext.js";
|
|
20
|
+
import he from "./BbDropdownList.vue.js";
|
|
21
|
+
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as ge, createVNode as p, defineComponent as _e, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle as ve, onBeforeUnmount as ye, onMounted as be, openBlock as _, ref as v, renderList as y, resolveDynamicComponent as b, toDisplayString as x, unref as S, watch as xe, watchEffect as Se, withCtx as Ce, withKeys as we, withModifiers as Te } from "vue";
|
|
24
22
|
//#region src/components/BbDropdown/BbDropdownList.vue?vue&type=script&setup=true&lang.ts
|
|
25
|
-
var
|
|
23
|
+
var Ee = {
|
|
26
24
|
key: 0,
|
|
27
25
|
"aria-hidden": "true",
|
|
28
26
|
class: "bb-dropdown__divider"
|
|
29
|
-
},
|
|
27
|
+
}, De = [
|
|
30
28
|
"id",
|
|
31
29
|
"role",
|
|
32
30
|
"tabindex",
|
|
33
31
|
"onClick",
|
|
34
32
|
"onKeydown"
|
|
35
|
-
],
|
|
33
|
+
], Oe = {
|
|
36
34
|
key: 4,
|
|
37
35
|
class: "group-title__content"
|
|
38
|
-
},
|
|
36
|
+
}, ke = {
|
|
39
37
|
key: 2,
|
|
40
38
|
class: "bb-dropdown__sheet-selection"
|
|
41
|
-
},
|
|
39
|
+
}, Ae = { class: "bb-dropdown__sheet-chips" }, je = {
|
|
42
40
|
key: 3,
|
|
43
41
|
class: "bb-dropdown__group-search",
|
|
44
42
|
role: "none"
|
|
45
|
-
},
|
|
43
|
+
}, Me = [
|
|
46
44
|
"aria-label",
|
|
47
45
|
"placeholder",
|
|
48
46
|
"value",
|
|
49
47
|
"onInput"
|
|
50
|
-
],
|
|
48
|
+
], Ne = {
|
|
51
49
|
key: 0,
|
|
52
50
|
"aria-hidden": "true",
|
|
53
51
|
class: "bb-dropdown__group-loading"
|
|
54
|
-
},
|
|
55
|
-
key: 4,
|
|
56
|
-
class: "item__content"
|
|
57
|
-
}, ze = ["id"], Be = ["id"], Ve = [
|
|
52
|
+
}, Pe = ["aria-labelledby", "role"], Fe = { class: "item__content" }, Ie = [
|
|
58
53
|
"id",
|
|
59
54
|
"aria-label",
|
|
60
55
|
"data-bb-dropdown-surface",
|
|
61
56
|
"inert",
|
|
62
57
|
"role",
|
|
63
58
|
"onPointerleave"
|
|
64
|
-
],
|
|
59
|
+
], Le = 289, Re = 160, ze = 100, C = 120, w = /*@__PURE__*/ _e({
|
|
65
60
|
__name: "BbDropdownList",
|
|
66
61
|
props: {
|
|
67
62
|
groups: {},
|
|
@@ -71,560 +66,531 @@ var Oe = {
|
|
|
71
66
|
slotDepth: {}
|
|
72
67
|
},
|
|
73
68
|
emits: ["close-level"],
|
|
74
|
-
setup(
|
|
75
|
-
let
|
|
69
|
+
setup(_e, { expose: w, emit: Be }) {
|
|
70
|
+
let T = _e, E = Be, D = c(() => T.slotDepth ?? T.level), O = me(), { inSheet: k } = a(), { t: Ve } = te(), He = Ve("select.searchLabel"), Ue = Ve("common.emptyText"), We = (e, t, n) => {
|
|
76
71
|
if (e.placeholder) return !0;
|
|
77
|
-
let r = n && n.length ? n : e.description == null ? ["
|
|
72
|
+
let r = n && n.length ? n : e.description == null ? ["label"] : ["label", "description"];
|
|
78
73
|
try {
|
|
79
74
|
return oe(e, r, t);
|
|
80
75
|
} catch {
|
|
81
76
|
return !1;
|
|
82
77
|
}
|
|
83
|
-
},
|
|
84
|
-
if (!e.searchable || !e.
|
|
85
|
-
let t =
|
|
78
|
+
}, A = c(() => T.groups.map((e) => {
|
|
79
|
+
if (!e.searchable || !e.id || O.isPipelineGroup(e.id)) return e;
|
|
80
|
+
let t = O.queryFor(e.id).trim();
|
|
86
81
|
if (!t) return e;
|
|
87
|
-
let n = e.items.filter((n) =>
|
|
82
|
+
let n = e.items.filter((n) => We(n, t, e.filterBy));
|
|
88
83
|
return n.length ? {
|
|
89
84
|
...e,
|
|
90
85
|
items: n
|
|
91
86
|
} : {
|
|
92
87
|
...e,
|
|
93
88
|
items: [{
|
|
94
|
-
|
|
89
|
+
rowKey: "__bb-dropdown:no-results__",
|
|
90
|
+
domKey: "no-results",
|
|
95
91
|
placeholder: "empty",
|
|
96
|
-
|
|
92
|
+
label: O.emptyText.value ?? Ue.value,
|
|
97
93
|
disabled: !0
|
|
98
94
|
}]
|
|
99
95
|
};
|
|
100
96
|
}));
|
|
101
|
-
|
|
102
|
-
if (
|
|
103
|
-
let e =
|
|
104
|
-
|
|
105
|
-
}),
|
|
106
|
-
for (let e of
|
|
97
|
+
Se(() => {
|
|
98
|
+
if (T.level !== 0) return;
|
|
99
|
+
let e = A.value.flatMap((e) => e.items).find((e) => e.placeholder);
|
|
100
|
+
O.setStatus(e?.label);
|
|
101
|
+
}), Se(() => {
|
|
102
|
+
for (let e of T.groups) e.id && O.isPipelineGroup(e.id) && O.activateGroup(e.id);
|
|
107
103
|
});
|
|
108
|
-
let
|
|
104
|
+
let j = v({}), Ge = (e, t) => {
|
|
109
105
|
let n = r(t);
|
|
110
|
-
n instanceof HTMLInputElement ?
|
|
111
|
-
},
|
|
112
|
-
if (
|
|
113
|
-
let t = e.maxHeight ?? (e.searchable ?
|
|
106
|
+
n instanceof HTMLInputElement ? j.value[e] = n : delete j.value[e];
|
|
107
|
+
}, Ke = c(() => A.value.find((e) => e.searchable && e.id)?.id), qe = (e) => {
|
|
108
|
+
if (k.value) return;
|
|
109
|
+
let t = e.maxHeight ?? (e.searchable ? Le : void 0);
|
|
114
110
|
if (!(t == null || t === 0 || t === "none")) return typeof t == "number" ? `${t}px` : t;
|
|
115
|
-
},
|
|
111
|
+
}, Je = (e) => pe(e).map((e) => e.selectable ? {
|
|
116
112
|
...e,
|
|
117
|
-
selected:
|
|
118
|
-
} : e),
|
|
119
|
-
let
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
113
|
+
selected: O.selectedFor(e.id ?? "")
|
|
114
|
+
} : e), Ye = /* @__PURE__ */ new WeakMap(), Xe = (e) => {
|
|
115
|
+
let t = Ye.get(e);
|
|
116
|
+
return t === void 0 && Ye.set(e, t = Ze(e)), t;
|
|
117
|
+
}, Ze = (e) => {
|
|
118
|
+
if (e.slotKey) return n(e.slotKey);
|
|
119
|
+
if (e.keyless) return null;
|
|
120
|
+
let t = e.value;
|
|
121
|
+
return typeof t == "number" ? n(String(t)) : typeof t == "string" && t !== "" ? n(t) : null;
|
|
122
|
+
}, Qe = (e, t) => {
|
|
123
|
+
let n = Xe(e);
|
|
124
|
+
if (n !== null) return O.slots[t ? `${n}:${t}` : n];
|
|
125
|
+
}, $e = (e, t, n) => Qe(t, n) ?? et(e, n), et = (e, t) => {
|
|
126
|
+
if (!e.id) return;
|
|
127
|
+
let r = `${n(e.id)}:item`;
|
|
128
|
+
return O.slots[t ? `${r}:${t}` : r];
|
|
129
|
+
}, tt = (e) => e.variant && e.variant !== "default" ? `bb-dropdown__item--variant-${e.variant}` : void 0, nt = (e) => e.variant && e.variant !== "default" ? `bb-dropdown__group-title--variant-${e.variant}` : void 0, rt = (e) => e.selectable ? e.multiple ? "menuitemcheckbox" : "menuitemradio" : "menuitem", it = (e, t) => e.selected.includes(t.rowKey), at = /* @__PURE__ */ new WeakMap(), ot = (e, t) => {
|
|
130
|
+
let n = Object.keys(e);
|
|
131
|
+
return n.length === Object.keys(t).length && n.every((n) => n === "selected" || e[n] === t[n]);
|
|
132
|
+
}, st = (e) => {
|
|
133
|
+
let t = at.get(e.items);
|
|
134
|
+
return t && ot(t, e) ? t : (at.set(e.items, e), e);
|
|
135
|
+
}, M = (e) => {
|
|
132
136
|
let t = 0;
|
|
133
|
-
for (let n = 0; n < e; n++) t +=
|
|
137
|
+
for (let n = 0; n < e; n++) t += A.value[n]?.items.length ?? 0;
|
|
134
138
|
return t;
|
|
135
|
-
},
|
|
139
|
+
}, ct = /* @__PURE__ */ new Set([...ee.filter((e) => e !== "text" && e !== "disabled")]), lt = (e) => {
|
|
136
140
|
let t = {};
|
|
137
|
-
for (let [n, r] of Object.entries(e)) (
|
|
141
|
+
for (let [n, r] of Object.entries(e)) (ct.has(n) || /^(aria|data)-/.test(n)) && (t[n] = r);
|
|
138
142
|
return t;
|
|
139
|
-
},
|
|
140
|
-
"aria-busy":
|
|
141
|
-
"aria-checked": e.selectable ?
|
|
142
|
-
"aria-describedby":
|
|
143
|
-
"aria-labelledby":
|
|
144
|
-
"aria-expanded": t.items ?
|
|
143
|
+
}, ut = (e, t, n, r) => m(lt(t), {
|
|
144
|
+
"aria-busy": O.isItemLoading(t.rowKey) || void 0,
|
|
145
|
+
"aria-checked": e.selectable ? r : void 0,
|
|
146
|
+
"aria-describedby": St(e, t, n),
|
|
147
|
+
"aria-labelledby": xt(e, t, n),
|
|
148
|
+
"aria-expanded": t.items ? G.value === t.rowKey : void 0,
|
|
145
149
|
"aria-haspopup": t.items ? "menu" : void 0,
|
|
146
|
-
class: [
|
|
147
|
-
"bb-dropdown__item--selected":
|
|
150
|
+
class: [tt(t), {
|
|
151
|
+
"bb-dropdown__item--selected": r,
|
|
148
152
|
"bb-dropdown__item--has-submenu": !!t.items,
|
|
149
153
|
"bb-dropdown__item--description": !!t.description
|
|
150
154
|
}],
|
|
151
155
|
"data-dropdown-item": "",
|
|
152
|
-
disabled: t.disabled ||
|
|
153
|
-
role:
|
|
156
|
+
disabled: t.disabled || O.disabled.value,
|
|
157
|
+
role: rt(e),
|
|
154
158
|
tabindex: -1,
|
|
155
|
-
onClick: (r) =>
|
|
156
|
-
onKeydown: (e) =>
|
|
157
|
-
onMousedown: (t) =>
|
|
158
|
-
onPointerenter: (e) =>
|
|
159
|
-
onPointerleave: (e) =>
|
|
160
|
-
},
|
|
161
|
-
function
|
|
162
|
-
return
|
|
163
|
-
selected:
|
|
164
|
-
disabled:
|
|
165
|
-
}, pt(
|
|
159
|
+
onClick: (r) => en(e, t, n, r),
|
|
160
|
+
onKeydown: (e) => tn(t, n, e),
|
|
161
|
+
onMousedown: (t) => $t(e, t),
|
|
162
|
+
onPointerenter: (e) => Yt(t, n, e),
|
|
163
|
+
onPointerleave: (e) => Zt(t, e)
|
|
164
|
+
}, dt("item", t, r));
|
|
165
|
+
function dt(e, t, n) {
|
|
166
|
+
return O.passthrough.part(e, {
|
|
167
|
+
selected: n,
|
|
168
|
+
disabled: t.disabled || O.disabled.value || void 0
|
|
169
|
+
}, pt(t));
|
|
166
170
|
}
|
|
167
|
-
let ft = (e) => e.placeholder ?
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return r;
|
|
171
|
+
let ft = (e) => e.placeholder ? O.slots[e.placeholder === "loading" ? "loading" : "empty"] : void 0, pt = (e) => {
|
|
172
|
+
let { rowKey: t, domKey: n, keyless: r, ...i } = e;
|
|
173
|
+
return i;
|
|
171
174
|
}, mt = (e) => ({
|
|
172
|
-
|
|
175
|
+
id: e.id,
|
|
173
176
|
label: e.label,
|
|
174
177
|
meta: e.meta,
|
|
175
178
|
multiple: e.multiple,
|
|
176
179
|
selectable: e.selectable
|
|
177
|
-
}),
|
|
178
|
-
disabled: t.disabled ||
|
|
180
|
+
}), ht = (e, t, n, r) => ({
|
|
181
|
+
disabled: t.disabled || O.disabled.value,
|
|
179
182
|
group: mt(e),
|
|
180
183
|
groupTitle: !1,
|
|
181
184
|
index: n,
|
|
182
185
|
item: pt(t),
|
|
183
|
-
level:
|
|
184
|
-
selected:
|
|
185
|
-
loading:
|
|
186
|
-
open:
|
|
187
|
-
placement:
|
|
188
|
-
|
|
186
|
+
level: D.value,
|
|
187
|
+
selected: r,
|
|
188
|
+
loading: O.isItemLoading(t.rowKey),
|
|
189
|
+
open: O.open.value,
|
|
190
|
+
placement: O.placement.value,
|
|
191
|
+
label: t.label,
|
|
189
192
|
description: t.description
|
|
190
|
-
}),
|
|
191
|
-
if (!e.
|
|
192
|
-
let r = n(e.
|
|
193
|
-
return
|
|
194
|
-
},
|
|
193
|
+
}), N = (e, t) => {
|
|
194
|
+
if (!e.id) return;
|
|
195
|
+
let r = n(e.id);
|
|
196
|
+
return O.slots[t ? `${r}:${t}` : r];
|
|
197
|
+
}, P = (e) => !e.hideLabel && (!!e.label || !!e["prepend:icon"] || !!e["append:icon"] || !!N(e) || !!N(e, "prepend") || !!N(e, "append")), gt = (e) => !e.id || !e.selectable || !e.multiple ? [] : O.selectedChipsFor(e.id), F = t().id, _t = (e) => `${F.value}_group-title_${e}`, vt = (e) => `${F.value}_row-text_${e}`, yt = (e) => `${F.value}_row-description_${e}`, bt = (e, t) => !!t.description && !$e(e, t), xt = (e, t, n) => {
|
|
195
198
|
let r = t;
|
|
196
|
-
return
|
|
197
|
-
},
|
|
199
|
+
return bt(e, t) && !r["aria-label"] && !r["aria-labelledby"] ? vt(n) : r["aria-labelledby"];
|
|
200
|
+
}, St = (e, t, n) => {
|
|
198
201
|
let r = t["aria-describedby"];
|
|
199
|
-
return
|
|
200
|
-
},
|
|
201
|
-
disabled:
|
|
202
|
+
return bt(e, t) ? [r, yt(n)].filter(Boolean).join(" ") : r;
|
|
203
|
+
}, Ct = c(() => fe(A.value)), wt = (e) => !!e.items && fe(Je(e.items)), Tt = (e) => Ct.value ? "menu" : P(e) ? "group" : "none", Et = (e, t) => P(e) ? _t(t) : void 0, I = (e, t) => ({
|
|
204
|
+
disabled: O.disabled.value,
|
|
202
205
|
group: mt(e),
|
|
203
206
|
groupTitle: !0,
|
|
204
207
|
index: t,
|
|
205
208
|
item: e,
|
|
206
|
-
level:
|
|
209
|
+
level: D.value,
|
|
207
210
|
selected: !1,
|
|
208
211
|
loading: !1,
|
|
209
|
-
open:
|
|
210
|
-
placement:
|
|
211
|
-
|
|
212
|
-
}),
|
|
212
|
+
open: O.open.value,
|
|
213
|
+
placement: O.placement.value,
|
|
214
|
+
label: e.label
|
|
215
|
+
}), L = v({}), Dt = (e, t) => {
|
|
213
216
|
let n = r(t);
|
|
214
|
-
n ?
|
|
215
|
-
},
|
|
217
|
+
n ? L.value[e] = n : delete L.value[e];
|
|
218
|
+
}, R = v({}), Ot = (e, t) => {
|
|
216
219
|
let n = r(t);
|
|
217
|
-
n instanceof HTMLElement ?
|
|
218
|
-
},
|
|
220
|
+
n instanceof HTMLElement ? R.value[e] = n : delete R.value[e];
|
|
221
|
+
}, z = () => {
|
|
219
222
|
let e = [], t = 0;
|
|
220
|
-
for (let n of
|
|
221
|
-
n.onClick &&
|
|
222
|
-
for (let r of n.items) r.disabled ||
|
|
223
|
+
for (let n of A.value) {
|
|
224
|
+
n.onClick && P(n) && e.push(t - .5);
|
|
225
|
+
for (let r of n.items) r.disabled || O.disabled.value || e.push(t), t++;
|
|
223
226
|
}
|
|
224
227
|
return e;
|
|
225
|
-
},
|
|
228
|
+
}, kt = (e) => {
|
|
226
229
|
let t = 0;
|
|
227
|
-
for (let n = 0; n <
|
|
230
|
+
for (let n = 0; n < A.value.length; n++) {
|
|
228
231
|
if (t - .5 === e) return n;
|
|
229
|
-
t +=
|
|
232
|
+
t += A.value[n].items.length;
|
|
230
233
|
}
|
|
231
234
|
return -1;
|
|
232
|
-
},
|
|
235
|
+
}, B = (e) => {
|
|
233
236
|
if (e != null) {
|
|
234
237
|
if (Number.isInteger(e)) {
|
|
235
|
-
|
|
238
|
+
L.value[e]?.focus();
|
|
236
239
|
return;
|
|
237
240
|
}
|
|
238
|
-
|
|
241
|
+
R.value[kt(e)]?.focus();
|
|
239
242
|
}
|
|
240
|
-
},
|
|
241
|
-
|
|
242
|
-
active:
|
|
243
|
-
input: () => Object.values(
|
|
243
|
+
}, At = () => Object.values(j.value).some((e) => e === document.activeElement);
|
|
244
|
+
ce({
|
|
245
|
+
active: k,
|
|
246
|
+
input: () => Object.values(j.value).find((e) => e === document.activeElement) ?? null
|
|
244
247
|
});
|
|
245
|
-
let
|
|
246
|
-
let e =
|
|
247
|
-
return e ? (
|
|
248
|
-
},
|
|
248
|
+
let jt = () => {
|
|
249
|
+
let e = Ke.value;
|
|
250
|
+
return e ? (j.value[e]?.focus(), !0) : !1;
|
|
251
|
+
}, V = () => B(z()[0]), Mt = (e) => {
|
|
249
252
|
let t = 0;
|
|
250
|
-
for (let n of
|
|
251
|
-
if (r.
|
|
253
|
+
for (let n of A.value) for (let r of n.items) {
|
|
254
|
+
if (r.rowKey === e) return t;
|
|
252
255
|
t++;
|
|
253
256
|
}
|
|
254
257
|
return -1;
|
|
255
|
-
},
|
|
256
|
-
let n =
|
|
258
|
+
}, H = (e, t) => {
|
|
259
|
+
let n = z();
|
|
257
260
|
if (!n.length) return;
|
|
258
261
|
let r = n.indexOf(e), i = r === -1 ? t > 0 ? 0 : n.length - 1 : (r + t + n.length) % n.length;
|
|
259
|
-
|
|
260
|
-
},
|
|
261
|
-
!
|
|
262
|
-
},
|
|
263
|
-
let e =
|
|
264
|
-
|
|
265
|
-
},
|
|
262
|
+
B(n[i]);
|
|
263
|
+
}, U = () => {
|
|
264
|
+
!k.value && jt() || V();
|
|
265
|
+
}, W = () => {
|
|
266
|
+
let e = z();
|
|
267
|
+
B(e[e.length - 1]);
|
|
268
|
+
}, Nt = (e) => {
|
|
266
269
|
let t = 0;
|
|
267
|
-
for (let n of
|
|
270
|
+
for (let n of A.value) for (let r of n.items) {
|
|
268
271
|
if (t === e) return r;
|
|
269
272
|
t++;
|
|
270
273
|
}
|
|
271
|
-
},
|
|
272
|
-
candidates: () =>
|
|
273
|
-
getTokens: (e) => [
|
|
274
|
+
}, Pt = e(), Ft = de({
|
|
275
|
+
candidates: () => z().filter(Number.isInteger),
|
|
276
|
+
getTokens: (e) => [ue(Nt(e)?.label ?? "", Pt.locale)],
|
|
274
277
|
getCurrent: () => {
|
|
275
|
-
let e = Object.entries(
|
|
278
|
+
let e = Object.entries(L.value).find(([, e]) => e === document.activeElement);
|
|
276
279
|
return e ? Number(e[0]) : void 0;
|
|
277
280
|
},
|
|
278
|
-
onMatch: (e) =>
|
|
279
|
-
locale: () =>
|
|
280
|
-
}),
|
|
281
|
-
|
|
282
|
-
},
|
|
283
|
-
ArrowDown: () =>
|
|
284
|
-
ArrowUp: () =>
|
|
285
|
-
Down: () =>
|
|
286
|
-
Esc: () =>
|
|
287
|
-
Escape: () =>
|
|
288
|
-
Up: () =>
|
|
289
|
-
},
|
|
281
|
+
onMatch: (e) => B(e),
|
|
282
|
+
locale: () => Pt.locale
|
|
283
|
+
}), It = (e) => {
|
|
284
|
+
le(e) && Ft.onKeydown(e);
|
|
285
|
+
}, Lt = {
|
|
286
|
+
ArrowDown: () => V(),
|
|
287
|
+
ArrowUp: () => W(),
|
|
288
|
+
Down: () => V(),
|
|
289
|
+
Esc: () => O.close(),
|
|
290
|
+
Escape: () => O.close(),
|
|
291
|
+
Up: () => W()
|
|
292
|
+
}, Rt = (e) => {
|
|
290
293
|
if (ae(e)) return;
|
|
291
|
-
let t =
|
|
294
|
+
let t = Lt[e.key];
|
|
292
295
|
t && (e.stopPropagation(), e.preventDefault(), t());
|
|
293
296
|
};
|
|
294
|
-
|
|
295
|
-
|
|
297
|
+
be(() => {
|
|
298
|
+
T.level === 0 && Ke.value && !k.value && h(() => jt());
|
|
296
299
|
});
|
|
297
|
-
let
|
|
298
|
-
|
|
299
|
-
clearTimeout(
|
|
300
|
-
|
|
301
|
-
},
|
|
300
|
+
let G = v(null), K = v({}), q, J, zt = 0, Y = v(null), X;
|
|
301
|
+
xe(G, (e, t) => {
|
|
302
|
+
clearTimeout(X), Y.value = t ?? null, t != null && (X = setTimeout(() => {
|
|
303
|
+
Y.value = null;
|
|
304
|
+
}, C));
|
|
302
305
|
});
|
|
303
|
-
let Bt = (e) =>
|
|
304
|
-
let e = Object.values(
|
|
306
|
+
let Bt = (e) => G.value !== e && Y.value !== e, Vt = v(0), Ht = () => {
|
|
307
|
+
let e = Object.values(L.value)[0], t = e?.closest(".bb-dropdown");
|
|
305
308
|
!e || !t || (Vt.value = Math.max(0, t.getBoundingClientRect().right - e.getBoundingClientRect().right));
|
|
306
309
|
}, Ut = (e, t) => {
|
|
307
|
-
t ?
|
|
308
|
-
},
|
|
309
|
-
|
|
310
|
-
clearTimeout(
|
|
310
|
+
t ? K.value[e] = t : delete K.value[e];
|
|
311
|
+
}, Z = () => clearTimeout(q), Q = () => clearTimeout(J);
|
|
312
|
+
ye(() => {
|
|
313
|
+
clearTimeout(J), clearTimeout(q), clearTimeout(X);
|
|
311
314
|
});
|
|
312
315
|
let Wt = (e) => {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
},
|
|
316
|
+
Q(), clearTimeout(q), q = setTimeout(() => {
|
|
317
|
+
G.value === e && (G.value = null);
|
|
318
|
+
}, Re);
|
|
316
319
|
}, Gt = (e) => {
|
|
317
320
|
let t = e.trim();
|
|
318
321
|
return t ? t.endsWith("ms") ? Number.parseFloat(t) || 0 : t.endsWith("s") ? (Number.parseFloat(t) || 0) * 1e3 : Number.parseFloat(t) || 0 : 0;
|
|
319
322
|
}, Kt = (e) => {
|
|
320
|
-
let t =
|
|
323
|
+
let t = L.value[e];
|
|
321
324
|
if (!t) return 0;
|
|
322
325
|
let n = t.closest(".bb-common-popover");
|
|
323
326
|
if (!n) return 0;
|
|
324
327
|
let r = getComputedStyle(n).getPropertyValue("--transition-duration"), i = Gt(r);
|
|
325
328
|
if (!i) return 0;
|
|
326
|
-
let a = performance.now() -
|
|
329
|
+
let a = performance.now() - zt;
|
|
327
330
|
return Math.max(0, i - a + 16);
|
|
328
|
-
},
|
|
329
|
-
|
|
331
|
+
}, $ = async (e, t = !1) => {
|
|
332
|
+
Z(), Ht(), G.value = e, t && (await h(), K.value[e]?.focusFirst());
|
|
330
333
|
};
|
|
331
|
-
|
|
334
|
+
xe(O.open, (e) => {
|
|
332
335
|
if (!e) {
|
|
333
|
-
|
|
336
|
+
Q(), Z(), G.value = null;
|
|
334
337
|
return;
|
|
335
338
|
}
|
|
336
|
-
|
|
339
|
+
zt = performance.now();
|
|
337
340
|
});
|
|
338
|
-
let
|
|
339
|
-
t ?
|
|
340
|
-
},
|
|
341
|
-
|
|
342
|
-
},
|
|
341
|
+
let qt = (e, t) => {
|
|
342
|
+
t ? G.value = e : G.value === e && (G.value = null);
|
|
343
|
+
}, Jt = (e) => {
|
|
344
|
+
G.value = null, h(() => B(e));
|
|
345
|
+
}, Yt = (e, t, n) => {
|
|
343
346
|
if (n.pointerType !== "mouse") return;
|
|
344
|
-
if (
|
|
345
|
-
|
|
347
|
+
if (Z(), Q(), G.value !== null && G.value === e.rowKey) {
|
|
348
|
+
B(t);
|
|
346
349
|
return;
|
|
347
350
|
}
|
|
348
351
|
let r = () => {
|
|
349
|
-
|
|
352
|
+
B(t), e.items ? $(e.rowKey) : G.value = null;
|
|
350
353
|
};
|
|
351
|
-
if (
|
|
352
|
-
let e =
|
|
353
|
-
e >= 0 && Math.abs(t - e) <= 1 ?
|
|
354
|
+
if (G.value !== null) {
|
|
355
|
+
let e = Mt(G.value);
|
|
356
|
+
e >= 0 && Math.abs(t - e) <= 1 ? J = setTimeout(r, ze) : r();
|
|
354
357
|
return;
|
|
355
358
|
}
|
|
356
359
|
let i = e.items ? Kt(t) : 0;
|
|
357
|
-
i ?
|
|
358
|
-
},
|
|
359
|
-
|
|
360
|
+
i ? J = setTimeout(r, i) : r();
|
|
361
|
+
}, Xt = () => {
|
|
362
|
+
Z(), Q();
|
|
363
|
+
}, Zt = (e, t) => {
|
|
364
|
+
t.pointerType === "mouse" && e.items && Wt(e.rowKey);
|
|
360
365
|
}, Qt = (e, t) => {
|
|
361
|
-
t.pointerType === "mouse" && e.items && Wt(e.key);
|
|
362
|
-
}, $t = (e, t) => {
|
|
363
366
|
t.pointerType === "mouse" && Wt(e);
|
|
364
|
-
},
|
|
367
|
+
}, $t = (e, t) => {
|
|
365
368
|
e.searchable && t.preventDefault();
|
|
366
|
-
},
|
|
367
|
-
if (!(t.disabled ||
|
|
369
|
+
}, en = (e, t, n, r) => {
|
|
370
|
+
if (!(t.disabled || O.disabled.value) && !O.isItemLoading(t.rowKey)) {
|
|
368
371
|
if (t.items) {
|
|
369
|
-
r.stopPropagation(),
|
|
372
|
+
r.stopPropagation(), Z(), Q(), T.navigate ? T.navigate(t) : G.value = t.rowKey;
|
|
370
373
|
return;
|
|
371
374
|
}
|
|
372
|
-
if (e.selectable && e.
|
|
373
|
-
r.stopPropagation(),
|
|
375
|
+
if (e.selectable && e.id) {
|
|
376
|
+
r.stopPropagation(), O.toggleSelect(e, t), O.runItemAction(t, r), At() || B(n);
|
|
374
377
|
return;
|
|
375
378
|
}
|
|
376
|
-
r.stopPropagation(),
|
|
379
|
+
r.stopPropagation(), O.runItemAction(t, r, { close: !0 });
|
|
377
380
|
}
|
|
378
|
-
},
|
|
381
|
+
}, tn = (e, t, n) => {
|
|
379
382
|
switch (n.key) {
|
|
380
383
|
case "ArrowDown":
|
|
381
|
-
n.preventDefault(),
|
|
384
|
+
n.preventDefault(), Q(), Z(), G.value = null, H(t, 1);
|
|
382
385
|
break;
|
|
383
386
|
case "ArrowUp":
|
|
384
|
-
n.preventDefault(),
|
|
387
|
+
n.preventDefault(), Q(), Z(), G.value = null, H(t, -1);
|
|
385
388
|
break;
|
|
386
389
|
case "Home":
|
|
387
|
-
n.preventDefault(),
|
|
390
|
+
n.preventDefault(), U();
|
|
388
391
|
break;
|
|
389
392
|
case "End":
|
|
390
|
-
n.preventDefault(),
|
|
393
|
+
n.preventDefault(), W();
|
|
391
394
|
break;
|
|
392
395
|
case "ArrowRight":
|
|
393
|
-
e.items && (n.preventDefault(), n.stopPropagation(),
|
|
396
|
+
e.items && (n.preventDefault(), n.stopPropagation(), T.navigate ? T.navigate(e) : $(e.rowKey, !0));
|
|
394
397
|
break;
|
|
395
398
|
case "ArrowLeft":
|
|
396
|
-
|
|
399
|
+
T.back ? (n.preventDefault(), n.stopPropagation(), T.back()) : T.level > 0 && (n.preventDefault(), n.stopPropagation(), E("close-level"));
|
|
397
400
|
break;
|
|
398
|
-
default:
|
|
401
|
+
default: It(n);
|
|
399
402
|
}
|
|
400
|
-
},
|
|
403
|
+
}, nn = (e, t) => {
|
|
401
404
|
let n = M(e) - .5;
|
|
402
405
|
switch (t.key) {
|
|
403
406
|
case "ArrowDown":
|
|
404
|
-
t.preventDefault(),
|
|
407
|
+
t.preventDefault(), H(n, 1);
|
|
405
408
|
break;
|
|
406
409
|
case "ArrowUp":
|
|
407
|
-
t.preventDefault(),
|
|
410
|
+
t.preventDefault(), H(n, -1);
|
|
408
411
|
break;
|
|
409
412
|
case "Home":
|
|
410
|
-
t.preventDefault(),
|
|
413
|
+
t.preventDefault(), U();
|
|
411
414
|
break;
|
|
412
415
|
case "End":
|
|
413
|
-
t.preventDefault(),
|
|
416
|
+
t.preventDefault(), W();
|
|
414
417
|
break;
|
|
415
418
|
case "ArrowLeft":
|
|
416
|
-
|
|
419
|
+
T.back ? (t.preventDefault(), t.stopPropagation(), T.back()) : T.level > 0 && (t.preventDefault(), t.stopPropagation(), E("close-level"));
|
|
417
420
|
break;
|
|
418
|
-
default:
|
|
421
|
+
default: It(t);
|
|
419
422
|
}
|
|
423
|
+
}, rn = {
|
|
424
|
+
slots: O.slots,
|
|
425
|
+
setItemEl: Dt,
|
|
426
|
+
itemAttrs: ut,
|
|
427
|
+
rowPart: dt,
|
|
428
|
+
slotProps: ht,
|
|
429
|
+
rowSlot: $e,
|
|
430
|
+
itemSlot: Qe,
|
|
431
|
+
groupRowSlot: et,
|
|
432
|
+
rowTextId: vt,
|
|
433
|
+
rowDescriptionId: yt
|
|
420
434
|
};
|
|
421
|
-
return
|
|
422
|
-
focusFirst:
|
|
423
|
-
focusLast:
|
|
424
|
-
}), (e, t) => (
|
|
425
|
-
n.divider ? (
|
|
426
|
-
|
|
435
|
+
return w({
|
|
436
|
+
focusFirst: U,
|
|
437
|
+
focusLast: W
|
|
438
|
+
}), (e, t) => (_(!0), d(s, null, y(A.value, (n, r) => (_(), d(s, { key: n.id ?? r }, [
|
|
439
|
+
n.divider ? (_(), d("hr", Ee)) : u("", !0),
|
|
440
|
+
P(n) ? (_(), d("div", {
|
|
427
441
|
key: 1,
|
|
428
|
-
id:
|
|
442
|
+
id: _t(r),
|
|
429
443
|
ref_for: !0,
|
|
430
|
-
ref: (e) =>
|
|
431
|
-
class:
|
|
444
|
+
ref: (e) => Ot(r, e),
|
|
445
|
+
class: g(["bb-dropdown__group-title", nt(n)]),
|
|
432
446
|
role: n.onClick ? "menuitem" : "presentation",
|
|
433
447
|
tabindex: n.onClick ? -1 : void 0,
|
|
434
448
|
onClick: (e) => n.onClick?.(e),
|
|
435
449
|
onKeydown: [
|
|
436
|
-
(e) => n.onClick &&
|
|
437
|
-
|
|
438
|
-
|
|
450
|
+
(e) => n.onClick && nn(r, e),
|
|
451
|
+
we((e) => n.onClick?.(e), ["enter"]),
|
|
452
|
+
we(Te((e) => n.onClick?.(e), ["prevent"]), ["space"])
|
|
439
453
|
]
|
|
440
454
|
}, [
|
|
441
|
-
|
|
455
|
+
N(n, "prepend") ? (_(), l(b(N(n, "prepend")), m({
|
|
442
456
|
key: 0,
|
|
443
457
|
ref_for: !0
|
|
444
|
-
},
|
|
458
|
+
}, I(n, M(r))), null, 16)) : S(O).slots["item:prepend"] ? (_(), l(b(S(O).slots["item:prepend"]), m({
|
|
445
459
|
key: 1,
|
|
446
460
|
ref_for: !0
|
|
447
|
-
},
|
|
461
|
+
}, I(n, M(r))), null, 16)) : n["prepend:icon"] ? (_(), l(o, {
|
|
448
462
|
key: 2,
|
|
449
463
|
class: "group-title__prepend-icon",
|
|
450
464
|
icon: n["prepend:icon"]
|
|
451
465
|
}, null, 8, ["icon"])) : u("", !0),
|
|
452
|
-
|
|
466
|
+
N(n) ? (_(), l(b(N(n)), m({
|
|
453
467
|
key: 3,
|
|
454
468
|
ref_for: !0
|
|
455
|
-
},
|
|
456
|
-
|
|
469
|
+
}, I(n, M(r))), null, 16)) : n.label ? (_(), d("span", Oe, x(n.label), 1)) : u("", !0),
|
|
470
|
+
N(n, "append") ? (_(), l(b(N(n, "append")), m({
|
|
457
471
|
key: 5,
|
|
458
472
|
ref_for: !0
|
|
459
|
-
},
|
|
473
|
+
}, I(n, M(r))), null, 16)) : S(O).slots["item:append"] ? (_(), l(b(S(O).slots["item:append"]), m({
|
|
460
474
|
key: 6,
|
|
461
475
|
ref_for: !0
|
|
462
|
-
},
|
|
476
|
+
}, I(n, M(r))), null, 16)) : n["append:icon"] ? (_(), l(o, {
|
|
463
477
|
key: 7,
|
|
464
478
|
class: "group-title__append-icon",
|
|
465
479
|
icon: n["append:icon"]
|
|
466
480
|
}, null, 8, ["icon"])) : u("", !0)
|
|
467
|
-
], 42,
|
|
468
|
-
|
|
481
|
+
], 42, De)) : u("", !0),
|
|
482
|
+
S(k) && gt(n).length ? (_(), d("div", ke, [f("div", Ae, [(_(!0), d(s, null, y(gt(n), (e) => (_(), l(ne, {
|
|
469
483
|
key: e.key,
|
|
470
484
|
class: "bb-dropdown__sheet-chip",
|
|
471
|
-
clearable: !
|
|
485
|
+
clearable: !S(O).disabled.value,
|
|
472
486
|
size: "xl",
|
|
473
487
|
variant: "secondary",
|
|
474
|
-
"onClick:clear": (t) =>
|
|
475
|
-
onMousedown: t[0] ||=
|
|
488
|
+
"onClick:clear": (t) => S(O).deselect(n.id, e.key),
|
|
489
|
+
onMousedown: t[0] ||= Te(() => {}, ["prevent"])
|
|
476
490
|
}, {
|
|
477
|
-
default:
|
|
491
|
+
default: Ce(() => [ge(x(e.text), 1)]),
|
|
478
492
|
_: 2
|
|
479
493
|
}, 1032, ["clearable", "onClick:clear"]))), 128))])])) : u("", !0),
|
|
480
|
-
n.searchable && n.
|
|
481
|
-
|
|
494
|
+
n.searchable && n.id ? (_(), d("div", je, [
|
|
495
|
+
p(o, {
|
|
482
496
|
"aria-hidden": "true",
|
|
483
497
|
class: "bb-dropdown__search-icon",
|
|
484
498
|
focusable: "false",
|
|
485
|
-
icon:
|
|
499
|
+
icon: S(se)
|
|
486
500
|
}, null, 8, ["icon"]),
|
|
487
|
-
f("input",
|
|
501
|
+
f("input", m({
|
|
488
502
|
ref_for: !0,
|
|
489
|
-
ref: (e) =>
|
|
490
|
-
"aria-label": n.searchPlaceholder ||
|
|
503
|
+
ref: (e) => Ge(n.id, e),
|
|
504
|
+
"aria-label": n.searchPlaceholder || S(He),
|
|
491
505
|
autocomplete: "off",
|
|
492
506
|
class: "bb-dropdown__search-input",
|
|
493
|
-
placeholder: n.searchPlaceholder ||
|
|
507
|
+
placeholder: n.searchPlaceholder || S(He),
|
|
494
508
|
role: "searchbox",
|
|
495
509
|
type: "text",
|
|
496
|
-
value:
|
|
497
|
-
},
|
|
498
|
-
onInput: (e) =>
|
|
499
|
-
onKeydown:
|
|
500
|
-
}), null, 16,
|
|
501
|
-
n.
|
|
510
|
+
value: S(O).queryFor(n.id)
|
|
511
|
+
}, S(O).passthrough.input, {
|
|
512
|
+
onInput: (e) => S(O).setQuery(n.id, e.target.value),
|
|
513
|
+
onKeydown: Rt
|
|
514
|
+
}), null, 16, Me),
|
|
515
|
+
n.id && S(O).isGroupLoading(n.id) ? (_(), d("div", Ne)) : u("", !0)
|
|
502
516
|
])) : u("", !0),
|
|
503
517
|
f("div", {
|
|
504
|
-
"aria-labelledby":
|
|
505
|
-
class:
|
|
506
|
-
"bb-dropdown__group-items--capped": !!
|
|
507
|
-
"bb-dropdown__group-items--loading": !!n.
|
|
518
|
+
"aria-labelledby": Et(n, r),
|
|
519
|
+
class: g(["bb-dropdown__group-items", {
|
|
520
|
+
"bb-dropdown__group-items--capped": !!qe(n),
|
|
521
|
+
"bb-dropdown__group-items--loading": !!n.id && S(O).isGroupLoading(n.id)
|
|
508
522
|
}]),
|
|
509
|
-
role:
|
|
510
|
-
style:
|
|
511
|
-
}, [(
|
|
523
|
+
role: Tt(n),
|
|
524
|
+
style: ve({ maxHeight: qe(n) })
|
|
525
|
+
}, [(_(!0), d(s, null, y(n.items, (t, a) => (_(), d(s, { key: t.rowKey }, [t.placeholder ? (_(), d("div", {
|
|
512
526
|
key: 0,
|
|
513
|
-
class:
|
|
527
|
+
class: g(["bb-dropdown__placeholder", `bb-dropdown__placeholder--${t.placeholder}`]),
|
|
514
528
|
role: "presentation"
|
|
515
|
-
}, [ft(t) ? (
|
|
529
|
+
}, [ft(t) ? (_(), l(b(ft(t)), {
|
|
516
530
|
key: 0,
|
|
517
531
|
error: t.placeholder === "loading" ? void 0 : t.error ?? null,
|
|
518
|
-
"group-
|
|
519
|
-
text: t.
|
|
532
|
+
"group-id": n.id,
|
|
533
|
+
text: t.label
|
|
520
534
|
}, null, 8, [
|
|
521
535
|
"error",
|
|
522
|
-
"group-
|
|
536
|
+
"group-id",
|
|
523
537
|
"text"
|
|
524
|
-
])) : (
|
|
538
|
+
])) : (_(), d(s, { key: 1 }, [t.placeholder === "failed" ? (_(), l(re, {
|
|
525
539
|
key: 0,
|
|
526
540
|
class: "bb-dropdown__placeholder-icon"
|
|
527
|
-
})) : u("", !0), f("span",
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
}, P(n, t, M(r) + a)), null, 16)) : t["prepend:icon"] ? (g(), l(o, p({
|
|
540
|
-
key: 2,
|
|
541
|
-
class: "bb-dropdown__item-icon item__prepend-icon",
|
|
542
|
-
icon: t["prepend:icon"],
|
|
543
|
-
ref_for: !0
|
|
544
|
-
}, N("itemIcon", n, t)), null, 16, ["icon"])) : u("", !0),
|
|
545
|
-
k(n, t) ? (g(), l(y(k(n, t)), p({
|
|
546
|
-
key: 3,
|
|
547
|
-
ref_for: !0
|
|
548
|
-
}, P(n, t, M(r) + a)), null, 16)) : (g(), d("span", Re, [f("span", p({
|
|
549
|
-
id: _t(M(r) + a),
|
|
550
|
-
class: "bb-dropdown__item-text",
|
|
551
|
-
ref_for: !0
|
|
552
|
-
}, N("itemText", n, t)), b(t.text), 17, ze), t.description ? (g(), d("span", p({
|
|
553
|
-
key: 0,
|
|
554
|
-
id: vt(M(r) + a),
|
|
555
|
-
class: "bb-dropdown__item-description",
|
|
556
|
-
ref_for: !0
|
|
557
|
-
}, N("itemDescription", n, t)), b(t.description), 17, Be)) : u("", !0)])),
|
|
558
|
-
n.selectable ? (g(), l(o, {
|
|
559
|
-
key: 5,
|
|
560
|
-
"aria-hidden": "true",
|
|
561
|
-
class: "item__check",
|
|
562
|
-
icon: x(se)
|
|
563
|
-
}, null, 8, ["icon"])) : u("", !0),
|
|
564
|
-
n.selectable && j(n, t) ? u("", !0) : (g(), d(s, { key: 6 }, [O(t, "append") ? (g(), l(y(O(t, "append")), p({
|
|
565
|
-
key: 0,
|
|
566
|
-
ref_for: !0
|
|
567
|
-
}, P(n, t, M(r) + a)), null, 16)) : t.items ? (g(), l(o, {
|
|
568
|
-
key: 1,
|
|
569
|
-
"aria-hidden": "true",
|
|
570
|
-
class: "item__chevron",
|
|
571
|
-
icon: x(ce)
|
|
572
|
-
}, null, 8, ["icon"])) : A(n, "append") ? (g(), l(y(A(n, "append")), p({
|
|
573
|
-
key: 2,
|
|
574
|
-
ref_for: !0
|
|
575
|
-
}, P(n, t, M(r) + a)), null, 16)) : x(w).slots["item:append"] ? (g(), l(y(x(w).slots["item:append"]), p({
|
|
576
|
-
key: 3,
|
|
577
|
-
ref_for: !0
|
|
578
|
-
}, P(n, t, M(r) + a)), null, 16)) : t["append:icon"] ? (g(), l(o, p({
|
|
579
|
-
key: 4,
|
|
580
|
-
class: "bb-dropdown__item-icon item__append-icon",
|
|
581
|
-
icon: t["append:icon"],
|
|
582
|
-
ref_for: !0
|
|
583
|
-
}, N("itemIcon", n, t)), null, 16, ["icon"])) : u("", !0)], 64))
|
|
584
|
-
]),
|
|
585
|
-
_: 2
|
|
586
|
-
}, 1040), t.items && !e.navigate ? (g(), l(i, {
|
|
541
|
+
})) : u("", !0), f("span", Fe, x(t.label), 1)], 64))], 2)) : (_(), d(s, { key: 1 }, [p(ie, {
|
|
542
|
+
group: st(n),
|
|
543
|
+
index: M(r) + a,
|
|
544
|
+
item: t,
|
|
545
|
+
row: rn,
|
|
546
|
+
selected: !!n.selectable && it(n, t)
|
|
547
|
+
}, null, 8, [
|
|
548
|
+
"group",
|
|
549
|
+
"index",
|
|
550
|
+
"item",
|
|
551
|
+
"selected"
|
|
552
|
+
]), t.items && !e.navigate ? (_(), l(i, {
|
|
587
553
|
key: 0,
|
|
588
|
-
anchor:
|
|
554
|
+
anchor: L.value[M(r) + a],
|
|
589
555
|
class: "bb-dropdown bb-dropdown--submenu",
|
|
590
556
|
"hide-arrow": "",
|
|
591
|
-
"model-value":
|
|
557
|
+
"model-value": G.value === t.rowKey,
|
|
592
558
|
offset: Vt.value,
|
|
593
559
|
placement: "right-start",
|
|
594
560
|
role: "none",
|
|
595
|
-
"transition-duration":
|
|
596
|
-
"onUpdate:modelValue": (e) =>
|
|
561
|
+
"transition-duration": C,
|
|
562
|
+
"onUpdate:modelValue": (e) => qt(t.rowKey, e)
|
|
597
563
|
}, {
|
|
598
|
-
default:
|
|
599
|
-
id: `submenu_${
|
|
600
|
-
"aria-label":
|
|
564
|
+
default: Ce(({ availableHeight: n }) => [f("span", {
|
|
565
|
+
id: `submenu_${S(O).rootId}_${t.domKey}`,
|
|
566
|
+
"aria-label": wt(t) ? t.label : void 0,
|
|
601
567
|
class: "bb-dropdown__list",
|
|
602
|
-
"data-bb-dropdown-surface":
|
|
603
|
-
inert: Bt(t.
|
|
604
|
-
role:
|
|
605
|
-
style:
|
|
606
|
-
onPointerenter:
|
|
607
|
-
onPointerleave: (e) =>
|
|
608
|
-
}, [
|
|
568
|
+
"data-bb-dropdown-surface": S(O).rootId,
|
|
569
|
+
inert: Bt(t.rowKey),
|
|
570
|
+
role: wt(t) ? "dialog" : "menu",
|
|
571
|
+
style: ve({ "--max-h": n == null ? void 0 : `${n}px` }),
|
|
572
|
+
onPointerenter: Xt,
|
|
573
|
+
onPointerleave: (e) => Qt(t.rowKey, e)
|
|
574
|
+
}, [p(he, {
|
|
609
575
|
ref_for: !0,
|
|
610
|
-
ref: (e) => Ut(t.
|
|
611
|
-
groups:
|
|
576
|
+
ref: (e) => Ut(t.rowKey, e),
|
|
577
|
+
groups: Je(t.items),
|
|
612
578
|
level: e.level + 1,
|
|
613
|
-
onCloseLevel: (e) =>
|
|
579
|
+
onCloseLevel: (e) => Jt(M(r) + a)
|
|
614
580
|
}, null, 8, [
|
|
615
581
|
"groups",
|
|
616
582
|
"level",
|
|
617
583
|
"onCloseLevel"
|
|
618
|
-
])], 44,
|
|
584
|
+
])], 44, Ie)]),
|
|
619
585
|
_: 2
|
|
620
586
|
}, 1032, [
|
|
621
587
|
"anchor",
|
|
622
588
|
"model-value",
|
|
623
589
|
"offset",
|
|
624
590
|
"onUpdate:modelValue"
|
|
625
|
-
])) : u("", !0)], 64))], 64))), 128))], 14,
|
|
591
|
+
])) : u("", !0)], 64))], 64))), 128))], 14, Pe)
|
|
626
592
|
], 64))), 128));
|
|
627
593
|
}
|
|
628
594
|
});
|
|
629
595
|
//#endregion
|
|
630
|
-
export {
|
|
596
|
+
export { w as default };
|