@moubing/bing-ui 0.11.1 → 0.12.0
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 +300 -171
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/bing-ui.css +1 -1
- package/dist/components/BingAnimatedText/BingAnimatedText.js +7 -0
- package/dist/components/BingAnimatedText/BingAnimatedText.vue_vue_type_script_setup_true_lang.js +194 -0
- package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.js +7 -0
- package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/BingAutocomplete/BingAutocomplete.js +7 -0
- package/dist/components/BingAutocomplete/BingAutocomplete.vue.d.ts +4 -4
- package/dist/components/BingAutocomplete/BingAutocomplete.vue_vue_type_script_setup_true_lang.js +560 -0
- package/dist/components/BingButton/BingButton.js +7 -0
- package/dist/components/BingButton/BingButton.vue.d.ts +2 -2
- package/dist/components/BingButton/BingButton.vue_vue_type_script_setup_true_lang.js +200 -0
- package/dist/components/BingCard/BingCard.js +7 -0
- package/dist/components/BingCard/BingCard.vue_vue_type_script_setup_true_lang.js +481 -0
- package/dist/components/BingCarouselTransition/BingCarouselTransition.js +7 -0
- package/dist/components/BingCarouselTransition/BingCarouselTransition.vue_vue_type_script_setup_true_lang.js +174 -0
- package/dist/components/BingCheckbox/BingCheckbox.js +7 -0
- package/dist/components/BingCheckbox/BingCheckbox.vue.d.ts +4 -4
- package/dist/components/BingCheckbox/BingCheckbox.vue_vue_type_script_setup_true_lang.js +233 -0
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.context.js +4 -0
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.js +7 -0
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/components/BingCodeBlock/BingCodeBlock.highlight.js +78 -0
- package/dist/components/BingCodeBlock/BingCodeBlock.js +7 -0
- package/dist/components/BingCodeBlock/BingCodeBlock.vue_vue_type_script_setup_true_lang.js +347 -0
- package/dist/components/BingColorPicker/BingColorPicker.js +7 -0
- package/dist/components/BingColorPicker/BingColorPicker.utils.d.ts +70 -0
- package/dist/components/BingColorPicker/BingColorPicker.utils.js +265 -0
- package/dist/components/BingColorPicker/BingColorPicker.vue.d.ts +7 -7
- package/dist/components/BingColorPicker/BingColorPicker.vue_vue_type_script_setup_true_lang.js +540 -0
- package/dist/components/BingColorPicker/BingColorPickerFormatEditor.js +7 -0
- package/dist/components/BingColorPicker/BingColorPickerFormatEditor.vue.d.ts +27 -0
- package/dist/components/BingColorPicker/BingColorPickerFormatEditor.vue_vue_type_script_setup_true_lang.js +142 -0
- package/dist/components/BingColorPicker/BingColorPickerSpectrum.js +7 -0
- package/dist/components/BingColorPicker/BingColorPickerSpectrum.vue.d.ts +26 -0
- package/dist/components/BingColorPicker/BingColorPickerSpectrum.vue_vue_type_script_setup_true_lang.js +168 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.js +5 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.types.d.ts +5 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.vue.d.ts +18 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/components/BingConfigProvider/index.d.ts +3 -0
- package/dist/components/BingCursor/BingCursor.controller.js +240 -0
- package/dist/components/BingCursor/BingCursor.js +7 -0
- package/dist/components/BingCursor/BingCursor.native.js +20 -0
- package/dist/components/BingCursor/BingCursor.presets.js +60 -0
- package/dist/components/BingCursor/BingCursor.shapes.js +83 -0
- package/dist/components/BingCursor/BingCursor.styleSource.js +83 -0
- package/dist/components/BingCursor/BingCursor.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/BingDatePicker/BingDatePicker.js +7 -0
- package/dist/components/BingDatePicker/BingDatePicker.utils.d.ts +26 -0
- package/dist/components/BingDatePicker/BingDatePicker.utils.js +137 -0
- package/dist/components/BingDatePicker/BingDatePicker.vue.d.ts +14 -14
- package/dist/components/BingDatePicker/BingDatePicker.vue_vue_type_script_setup_true_lang.js +804 -0
- package/dist/components/BingDatePicker/BingDatePickerCalendar.js +7 -0
- package/dist/components/BingDatePicker/BingDatePickerCalendar.vue.d.ts +37 -0
- package/dist/components/BingDatePicker/BingDatePickerCalendar.vue_vue_type_script_setup_true_lang.js +248 -0
- package/dist/components/BingDatePicker/BingDatePickerTimePanel.js +7 -0
- package/dist/components/BingDatePicker/BingDatePickerTimePanel.vue.d.ts +26 -0
- package/dist/components/BingDatePicker/BingDatePickerTimePanel.vue_vue_type_script_setup_true_lang.js +97 -0
- package/dist/components/BingDeckTransition/BingDeckTransition.js +7 -0
- package/dist/components/BingDeckTransition/BingDeckTransition.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/components/BingDialog/BingDialog.js +7 -0
- package/dist/components/BingDialog/BingDialog.vue.d.ts +4 -5
- package/dist/components/BingDialog/BingDialog.vue_vue_type_script_setup_true_lang.js +558 -0
- package/dist/components/BingDropDown/BingDropDown.context.js +4 -0
- package/dist/components/BingDropDown/BingDropDown.js +7 -0
- package/dist/components/BingDropDown/BingDropDown.vue.d.ts +1 -2
- package/dist/components/BingDropDown/BingDropDown.vue_vue_type_script_setup_true_lang.js +649 -0
- package/dist/components/BingDropDown/BingDropDownItem.js +7 -0
- package/dist/components/BingDropDown/BingDropDownItem.vue.d.ts +1 -1
- package/dist/components/BingDropDown/BingDropDownItem.vue_vue_type_script_setup_true_lang.js +308 -0
- package/dist/components/BingFilePreview/BingFilePreview.js +7 -0
- package/dist/components/BingFilePreview/BingFilePreview.vue.d.ts +4 -5
- package/dist/components/BingFilePreview/BingFilePreview.vue_vue_type_script_setup_true_lang.js +589 -0
- package/dist/components/BingForm/BingForm.context.js +7 -0
- package/dist/components/BingForm/BingForm.js +7 -0
- package/dist/components/BingForm/BingForm.vue.d.ts +0 -1
- package/dist/components/BingForm/BingForm.vue_vue_type_script_setup_true_lang.js +300 -0
- package/dist/components/BingForm/formFocus.js +13 -0
- package/dist/components/BingForm/formTabOrder.js +27 -0
- package/dist/components/BingForm/useFormControl.d.ts +1 -1
- package/dist/components/BingForm/useFormControl.js +24 -0
- package/dist/components/BingForm/useFormNextHint.js +135 -0
- package/dist/components/BingFormItem/BingFormItem.js +7 -0
- package/dist/components/BingFormItem/BingFormItem.vue.d.ts +1 -1
- package/dist/components/BingFormItem/BingFormItem.vue_vue_type_script_setup_true_lang.js +252 -0
- package/dist/components/BingIcon/BingIcon.js +7 -0
- package/dist/components/BingIcon/BingIcon.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/BingImage/BingImage.js +7 -0
- package/dist/components/BingImage/BingImage.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/BingImagePreview/BingImagePreview.js +7 -0
- package/dist/components/BingImagePreview/BingImagePreview.vue.d.ts +4 -5
- package/dist/components/BingImagePreview/BingImagePreview.vue_vue_type_script_setup_true_lang.js +699 -0
- package/dist/components/BingInput/BingInput.js +7 -0
- package/dist/components/BingInput/BingInput.vue.d.ts +6 -6
- package/dist/components/BingInput/BingInput.vue_vue_type_script_setup_true_lang.js +311 -0
- package/dist/components/BingRadio/BingRadio.js +7 -0
- package/dist/components/BingRadio/BingRadio.vue.d.ts +4 -4
- package/dist/components/BingRadio/BingRadio.vue_vue_type_script_setup_true_lang.js +170 -0
- package/dist/components/BingRadioGroup/BingRadioGroup.context.js +4 -0
- package/dist/components/BingRadioGroup/BingRadioGroup.js +7 -0
- package/dist/components/BingRadioGroup/BingRadioGroup.vue.d.ts +4 -4
- package/dist/components/BingRadioGroup/BingRadioGroup.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/BingResizable/BingResizable.js +7 -0
- package/dist/components/BingResizable/BingResizable.vue.d.ts +1 -1
- package/dist/components/BingResizable/BingResizable.vue_vue_type_script_setup_true_lang.js +555 -0
- package/dist/components/BingScrollbar/BingScrollbar.js +7 -0
- package/dist/components/BingScrollbar/BingScrollbar.vue.d.ts +2 -2
- package/dist/components/BingScrollbar/BingScrollbar.vue_vue_type_script_setup_true_lang.js +398 -0
- package/dist/components/BingSelect/BingSelect.js +7 -0
- package/dist/components/BingSelect/BingSelect.vue.d.ts +7 -7
- package/dist/components/BingSelect/BingSelect.vue_vue_type_script_setup_true_lang.js +1066 -0
- package/dist/components/BingSlider/BingSlider.js +7 -0
- package/dist/components/BingSlider/BingSlider.vue.d.ts +6 -6
- package/dist/components/BingSlider/BingSlider.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/components/BingSortableList/BingSortableList.js +7 -0
- package/dist/components/BingSortableList/BingSortableList.vue_vue_type_script_setup_true_lang.js +334 -0
- package/dist/components/BingSortableList/BingSortableListItem.js +7 -0
- package/dist/components/BingSortableList/BingSortableListItem.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/components/BingSplitPane/BingSplitPane.js +7 -0
- package/dist/components/BingSplitPane/BingSplitPane.vue_vue_type_script_setup_true_lang.js +167 -0
- package/dist/components/BingTable/BingTable.js +7 -0
- package/dist/components/BingTable/BingTable.measurements.js +72 -0
- package/dist/components/BingTable/BingTable.vue.d.ts +1 -2
- package/dist/components/BingTable/BingTable.vue_vue_type_script_setup_true_lang.js +1416 -0
- package/dist/components/BingTable/BingTableCellValue.js +7 -0
- package/dist/components/BingTable/BingTableCellValue.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/components/BingTable/BingTableHeaderCell.js +5 -0
- package/dist/components/BingTable/BingTableHeaderCell.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/components/BingTable/BingTableHeaderContent.js +7 -0
- package/dist/components/BingTable/BingTableHeaderContent.vue_vue_type_script_setup_true_lang.js +110 -0
- package/dist/components/BingTable/useTableColumns.js +126 -0
- package/dist/components/BingTableColumnControls/BingTableColumnControls.js +7 -0
- package/dist/components/BingTableColumnControls/BingTableColumnControls.vue.d.ts +1 -1
- package/dist/components/BingTableColumnControls/BingTableColumnControls.vue_vue_type_script_setup_true_lang.js +251 -0
- package/dist/components/BingTabs/BingTabs.js +7 -0
- package/dist/components/BingTabs/BingTabs.vue.d.ts +2 -3
- package/dist/components/BingTabs/BingTabs.vue_vue_type_script_setup_true_lang.js +320 -0
- package/dist/components/BingTag/BingTag.js +7 -0
- package/dist/components/BingTag/BingTag.vue.d.ts +0 -1
- package/dist/components/BingTag/BingTag.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/components/BingTextarea/BingTextarea.js +7 -0
- package/dist/components/BingTextarea/BingTextarea.vue.d.ts +6 -6
- package/dist/components/BingTextarea/BingTextarea.vue_vue_type_script_setup_true_lang.js +243 -0
- package/dist/components/BingToast/BingToast.js +7 -0
- package/dist/components/BingToast/BingToast.service.js +132 -0
- package/dist/components/BingToast/BingToast.types.d.ts +1 -1
- package/dist/components/BingToast/BingToast.types.js +19 -0
- package/dist/components/BingToast/BingToast.vue.d.ts +0 -1
- package/dist/components/BingToast/BingToast.vue_vue_type_script_setup_true_lang.js +307 -0
- package/dist/components/BingTooltip/BingTooltip.js +7 -0
- package/dist/components/BingTooltip/BingTooltip.shared.js +14 -0
- package/dist/components/BingTooltip/BingTooltip.vue.d.ts +4 -5
- package/dist/components/BingTooltip/BingTooltip.vue_vue_type_script_setup_true_lang.js +572 -0
- package/dist/components/BingTreeSelect/BingTreeSelect.js +7 -0
- package/dist/components/BingTreeSelect/BingTreeSelect.vue.d.ts +7 -7
- package/dist/components/BingTreeSelect/BingTreeSelect.vue_vue_type_script_setup_true_lang.js +1274 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/icons/LICENSE-lucide.txt +39 -0
- package/dist/icons/createIcon.d.ts +8 -0
- package/dist/icons/createIcon.js +36 -0
- package/dist/icons/icons.d.ts +51 -0
- package/dist/icons/icons.js +252 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/index.js +48 -0
- package/dist/motion/clickParticles.d.ts +1 -1
- package/dist/motion/clickParticles2.js +66 -0
- package/dist/motion/index.d.ts +1 -1
- package/dist/motion/index.js +17 -0
- package/dist/motion/liquidHover.js +36 -0
- package/dist/motion/optionDetailMotion.d.ts +7 -1
- package/dist/motion/optionDetailMotion.js +74 -0
- package/dist/motion/panelMotion.js +19 -0
- package/dist/motion/reducedMotion.d.ts +16 -0
- package/dist/motion/reducedMotion.js +28 -0
- package/dist/motion/selectPanelMotion.js +115 -0
- package/dist/motion/smoothScroll.d.ts +2 -0
- package/dist/motion/smoothScroll.js +276 -0
- package/dist/motion/useClickFeedback.js +47 -0
- package/dist/motion/useTextControlCaret.js +136 -0
- package/dist/utils/clipboard.d.ts +9 -0
- package/dist/utils/clipboard.js +16 -0
- package/dist/utils/config.d.ts +42 -0
- package/dist/utils/config.js +37 -0
- package/dist/utils/controlAttrs.js +37 -0
- package/dist/utils/floating.d.ts +86 -0
- package/dist/utils/floating.js +99 -0
- package/dist/utils/glass.js +25 -0
- package/dist/utils/overlay.js +94 -0
- package/dist/utils/scrollLock.js +44 -0
- package/dist/utils/search.d.ts +16 -0
- package/dist/utils/search.js +23 -0
- package/dist/utils/useClientReady.js +10 -0
- package/dist/utils/useDeferredBlurValidation.d.ts +18 -0
- package/dist/utils/useDeferredBlurValidation.js +34 -0
- package/dist/utils/useKeyboardScrollSync.d.ts +11 -0
- package/dist/utils/useKeyboardScrollSync.js +28 -0
- package/dist/utils/useOptionDetailPanel.d.ts +50 -0
- package/dist/utils/useOptionDetailPanel.js +180 -0
- package/dist/utils/useOutsidePointerDown.d.ts +8 -0
- package/dist/utils/useOutsidePointerDown.js +17 -0
- package/dist/utils/useSearchShortcutFocus.d.ts +18 -0
- package/dist/utils/useSearchShortcutFocus.js +47 -0
- package/dist/utils/useVirtualList.d.ts +42 -0
- package/dist/utils/useVirtualList.js +74 -0
- package/package.json +15 -9
- package/dist/bing-ui.es.js +0 -31276
- package/dist/bing-ui.umd.js +0 -229
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
import { useConfigSize as e, useConfigZIndex as t } from "../../utils/config.js";
|
|
2
|
+
import { useReducedMotion as n } from "../../motion/reducedMotion.js";
|
|
3
|
+
import { createSelectPanelEnter as r, createSelectPanelLeave as i } from "../../motion/selectPanelMotion.js";
|
|
4
|
+
import { useClickFeedback as a } from "../../motion/useClickFeedback.js";
|
|
5
|
+
import { useOverlay as o } from "../../utils/overlay.js";
|
|
6
|
+
import { useClientReady as s } from "../../utils/useClientReady.js";
|
|
7
|
+
import { createGlassCssVariables as c, defaultGlassEffect as l } from "../../utils/glass.js";
|
|
8
|
+
import { computeFloatingPosition as ee, useFloatingAutoUpdate as te } from "../../utils/floating.js";
|
|
9
|
+
import { bingDropDownContextKey as ne } from "./BingDropDown.context.js";
|
|
10
|
+
import { Teleport as re, computed as u, createBlock as ie, createCommentVNode as d, createElementBlock as f, createElementVNode as ae, defineComponent as oe, nextTick as p, normalizeClass as se, normalizeStyle as ce, onBeforeUnmount as le, onMounted as ue, openBlock as m, provide as de, ref as h, renderSlot as g, unref as fe, watch as _ } from "vue";
|
|
11
|
+
import { gsap as v } from "gsap";
|
|
12
|
+
//#region src/components/BingDropDown/BingDropDown.vue?vue&type=script&setup=true&lang.ts
|
|
13
|
+
var pe = ["aria-label"], me = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "bing-dropdown__header"
|
|
16
|
+
}, he = { class: "bing-dropdown__body" }, ge = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "bing-dropdown__footer"
|
|
19
|
+
}, _e = 0, ve = /* @__PURE__ */ oe({
|
|
20
|
+
__name: "BingDropDown",
|
|
21
|
+
props: {
|
|
22
|
+
open: {
|
|
23
|
+
type: [Boolean, null],
|
|
24
|
+
default: null
|
|
25
|
+
},
|
|
26
|
+
context: {},
|
|
27
|
+
trigger: { default: "click" },
|
|
28
|
+
placement: { default: "bottom-start" },
|
|
29
|
+
size: {},
|
|
30
|
+
width: {},
|
|
31
|
+
minWidth: {},
|
|
32
|
+
maxWidth: {},
|
|
33
|
+
panelClass: { default: void 0 },
|
|
34
|
+
block: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
closeOnOutside: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !0
|
|
41
|
+
},
|
|
42
|
+
closeOnEscape: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !0
|
|
45
|
+
},
|
|
46
|
+
autoFocus: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
loop: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: !0
|
|
53
|
+
},
|
|
54
|
+
ariaLabel: { default: "下拉菜单" },
|
|
55
|
+
glass: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: l.glass
|
|
58
|
+
},
|
|
59
|
+
glassBlur: { default: void 0 },
|
|
60
|
+
glassOpacity: { default: void 0 },
|
|
61
|
+
glassSaturation: { default: void 0 }
|
|
62
|
+
},
|
|
63
|
+
emits: [
|
|
64
|
+
"update:open",
|
|
65
|
+
"update:context",
|
|
66
|
+
"open",
|
|
67
|
+
"close",
|
|
68
|
+
"context-open",
|
|
69
|
+
"after-enter",
|
|
70
|
+
"after-leave"
|
|
71
|
+
],
|
|
72
|
+
setup(l, { expose: oe, emit: ve }) {
|
|
73
|
+
let { playClickFeedback: ye } = a(), y = l, b = ve, x = e(() => y.size), be = s(), S = `bing-dropdown-${++_e}`, C = h(), w = h(), xe = h(), T = h(!1), Se = h(!1), E = h(y.context ?? null), D = h(null), O = n(), k = h({
|
|
74
|
+
align: "start",
|
|
75
|
+
placement: "bottom",
|
|
76
|
+
left: 0,
|
|
77
|
+
top: 0
|
|
78
|
+
}), A, j, M, N, Ce = u(() => y.open !== null), P = u(() => Ce.value ? !!y.open : Se.value), we = u(() => [
|
|
79
|
+
"bing-dropdown",
|
|
80
|
+
`bing-dropdown--${x.value}`,
|
|
81
|
+
`bing-dropdown--${y.placement}`,
|
|
82
|
+
`bing-dropdown--trigger-${y.trigger}`,
|
|
83
|
+
{
|
|
84
|
+
"is-open": P.value,
|
|
85
|
+
"is-block": y.block
|
|
86
|
+
}
|
|
87
|
+
]), Te = u(() => Le()), Ee = u(() => [
|
|
88
|
+
"bing-dropdown__panel",
|
|
89
|
+
y.panelClass,
|
|
90
|
+
`is-placement-${k.value.placement}`,
|
|
91
|
+
`is-align-${k.value.align}`,
|
|
92
|
+
{ "is-glass": y.glass }
|
|
93
|
+
]), De = u(() => ({
|
|
94
|
+
...c("bing-dropdown", {
|
|
95
|
+
glass: y.glass,
|
|
96
|
+
glassBlur: y.glassBlur,
|
|
97
|
+
glassOpacity: y.glassOpacity,
|
|
98
|
+
glassSaturation: y.glassSaturation
|
|
99
|
+
}),
|
|
100
|
+
"--bing-dropdown-z-index": String(I.zIndex.value),
|
|
101
|
+
"--bing-dropdown-item-height": {
|
|
102
|
+
sm: "28px",
|
|
103
|
+
md: "32px",
|
|
104
|
+
lg: "36px"
|
|
105
|
+
}[x.value]
|
|
106
|
+
})), F = te(Z), Oe = t("popover"), I = o({
|
|
107
|
+
open: () => T.value,
|
|
108
|
+
elements: () => [
|
|
109
|
+
C.value,
|
|
110
|
+
w.value,
|
|
111
|
+
...Array.from(document.querySelectorAll(`[data-bing-dropdown-floating="${S}"]`))
|
|
112
|
+
],
|
|
113
|
+
zIndex: () => Oe.value,
|
|
114
|
+
closeOnEscape: () => y.closeOnEscape,
|
|
115
|
+
onEscape: () => V(!0)
|
|
116
|
+
}), ke = u(() => {
|
|
117
|
+
let e = {
|
|
118
|
+
...De.value,
|
|
119
|
+
zIndex: String(I.zIndex.value)
|
|
120
|
+
}, t = L(y.width), n = L(y.minWidth), r = L(y.maxWidth);
|
|
121
|
+
return t && (e["--bing-dropdown-width"] = t), n && (e["--bing-dropdown-min-width"] = n), r && (e["--bing-dropdown-max-width"] = r), T.value && (e.top = `${k.value.top}px`, e.left = `${k.value.left}px`), e;
|
|
122
|
+
});
|
|
123
|
+
de(ne, {
|
|
124
|
+
close: V,
|
|
125
|
+
floatingId: S,
|
|
126
|
+
getGlassStyle: () => De.value,
|
|
127
|
+
onMenuKeydown: vt
|
|
128
|
+
}), _(P, async (e, t) => {
|
|
129
|
+
if (e !== t) {
|
|
130
|
+
if (Xe(), e) {
|
|
131
|
+
T.value = !0, F.start(), b("open"), await p(), Z(), dt(), mt();
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
F.dispose(), b("close"), ft();
|
|
135
|
+
}
|
|
136
|
+
}, { flush: "post" }), _(() => y.context, (e) => {
|
|
137
|
+
E.value = e ?? null;
|
|
138
|
+
}), _(() => [
|
|
139
|
+
y.placement,
|
|
140
|
+
y.width,
|
|
141
|
+
y.minWidth,
|
|
142
|
+
y.maxWidth
|
|
143
|
+
], () => {
|
|
144
|
+
P.value && F.schedule();
|
|
145
|
+
}), ue(async () => {
|
|
146
|
+
C.value && (M = v.context(() => void 0, C.value)), P.value && (T.value = !0, Xe(), F.start(), await p(), Z(), dt(), mt());
|
|
147
|
+
}), le(() => {
|
|
148
|
+
Ze(), F.dispose(), W(), G(), K(), v.killTweensOf([w.value, ...J()].filter(Boolean)), M?.revert(), M = void 0;
|
|
149
|
+
});
|
|
150
|
+
function L(e) {
|
|
151
|
+
return typeof e == "number" ? `${e}px` : e;
|
|
152
|
+
}
|
|
153
|
+
function R() {
|
|
154
|
+
return typeof window < "u" && typeof document < "u";
|
|
155
|
+
}
|
|
156
|
+
function Ae(e, t) {
|
|
157
|
+
if (typeof e == "number") return Math.max(0, e);
|
|
158
|
+
if (typeof e == "string") {
|
|
159
|
+
let n = Number.parseFloat(e);
|
|
160
|
+
return Number.isFinite(n) ? Math.max(0, n) : t;
|
|
161
|
+
}
|
|
162
|
+
return t;
|
|
163
|
+
}
|
|
164
|
+
function je(e) {
|
|
165
|
+
let [t, n] = e.split("-");
|
|
166
|
+
return {
|
|
167
|
+
align: n,
|
|
168
|
+
side: t
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function Me() {
|
|
172
|
+
if (y.trigger === "contextmenu" && D.value) {
|
|
173
|
+
let { x: e, y: t } = D.value;
|
|
174
|
+
return {
|
|
175
|
+
bottom: t,
|
|
176
|
+
height: 0,
|
|
177
|
+
left: e,
|
|
178
|
+
right: e,
|
|
179
|
+
top: t,
|
|
180
|
+
width: 0
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
return C.value?.getBoundingClientRect();
|
|
184
|
+
}
|
|
185
|
+
function Ne(e, t) {
|
|
186
|
+
return {
|
|
187
|
+
x: e + 6,
|
|
188
|
+
y: t + 6
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function z(e) {
|
|
192
|
+
e !== P.value && (Ce.value || (Se.value = e), b("update:open", e));
|
|
193
|
+
}
|
|
194
|
+
function Pe(e) {
|
|
195
|
+
E.value = e, b("update:context", e);
|
|
196
|
+
}
|
|
197
|
+
function Fe() {
|
|
198
|
+
D.value = null, E.value !== null && Pe(null);
|
|
199
|
+
}
|
|
200
|
+
function B() {
|
|
201
|
+
W(), z(!0);
|
|
202
|
+
}
|
|
203
|
+
function V(e = !1) {
|
|
204
|
+
W(), z(!1), e && ze();
|
|
205
|
+
}
|
|
206
|
+
function H() {
|
|
207
|
+
W(), z(!P.value);
|
|
208
|
+
}
|
|
209
|
+
function U(e) {
|
|
210
|
+
return e.pointerType === "touch";
|
|
211
|
+
}
|
|
212
|
+
function W() {
|
|
213
|
+
!R() || N === void 0 || (window.clearTimeout(N), N = void 0);
|
|
214
|
+
}
|
|
215
|
+
function Ie() {
|
|
216
|
+
!R() || y.trigger !== "hover" || (W(), N = window.setTimeout(() => {
|
|
217
|
+
N = void 0, z(!1);
|
|
218
|
+
}, 110));
|
|
219
|
+
}
|
|
220
|
+
function Le(e = null) {
|
|
221
|
+
let t = {
|
|
222
|
+
"aria-expanded": P.value ? "true" : "false",
|
|
223
|
+
"aria-haspopup": "menu",
|
|
224
|
+
"data-bing-dropdown-trigger": ""
|
|
225
|
+
};
|
|
226
|
+
return y.trigger === "contextmenu" ? {
|
|
227
|
+
...t,
|
|
228
|
+
onContextmenu: (t) => {
|
|
229
|
+
He(t, e);
|
|
230
|
+
},
|
|
231
|
+
onKeydown: (t) => {
|
|
232
|
+
Ue(t, e);
|
|
233
|
+
}
|
|
234
|
+
} : {
|
|
235
|
+
...t,
|
|
236
|
+
onClick: We,
|
|
237
|
+
onKeydown: Ge,
|
|
238
|
+
onPointerenter: Ke,
|
|
239
|
+
onPointerleave: qe
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
function Re(e) {
|
|
243
|
+
e.currentTarget instanceof HTMLElement && (xe.value = e.currentTarget);
|
|
244
|
+
}
|
|
245
|
+
function ze() {
|
|
246
|
+
xe.value?.focus();
|
|
247
|
+
}
|
|
248
|
+
async function Be(e) {
|
|
249
|
+
W(), P.value || z(!0), await p(), await p(), $(e);
|
|
250
|
+
}
|
|
251
|
+
async function Ve(e, t, n, r) {
|
|
252
|
+
Re(e), W();
|
|
253
|
+
let i = Ne(n, r), a = y.trigger === "contextmenu" && P.value && T.value && w.value ? it() : void 0;
|
|
254
|
+
if (D.value = i, k.value = {
|
|
255
|
+
...k.value,
|
|
256
|
+
left: i.x,
|
|
257
|
+
top: i.y
|
|
258
|
+
}, Pe(t), b("context-open", {
|
|
259
|
+
event: e,
|
|
260
|
+
context: t,
|
|
261
|
+
x: n,
|
|
262
|
+
y: r
|
|
263
|
+
}), !P.value) {
|
|
264
|
+
z(!0), await p(), await p(), Z(), Q();
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
await p(), Z(), await p(), a && at(a), Q();
|
|
268
|
+
}
|
|
269
|
+
async function He(e, t = null) {
|
|
270
|
+
y.trigger === "contextmenu" && (e.preventDefault(), await Ve(e, t, e.clientX, e.clientY));
|
|
271
|
+
}
|
|
272
|
+
async function Ue(e, t = null) {
|
|
273
|
+
if (y.trigger !== "contextmenu" || !(e.key === "ContextMenu" || e.shiftKey && e.key === "F10")) return;
|
|
274
|
+
e.preventDefault();
|
|
275
|
+
let n = (e.currentTarget instanceof HTMLElement ? e.currentTarget : C.value)?.getBoundingClientRect();
|
|
276
|
+
await Ve(e, t, n?.left ?? 0, n?.bottom ?? 0);
|
|
277
|
+
}
|
|
278
|
+
function We(e) {
|
|
279
|
+
if (!e.defaultPrevented) {
|
|
280
|
+
if (ye(e), Re(e), W(), y.trigger === "hover") {
|
|
281
|
+
P.value || B();
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
H();
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
function Ge(e) {
|
|
288
|
+
if (Re(e), e.key === "ArrowDown") {
|
|
289
|
+
e.preventDefault(), ye(e), Be("first");
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
if (e.key === "ArrowUp") {
|
|
293
|
+
e.preventDefault(), ye(e), Be("last");
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
I.isTop(e) && e.key === "Escape" && P.value && y.closeOnEscape && (e.preventDefault(), e.stopPropagation(), V(!0));
|
|
297
|
+
}
|
|
298
|
+
function Ke(e) {
|
|
299
|
+
y.trigger !== "hover" || U(e) || (W(), B());
|
|
300
|
+
}
|
|
301
|
+
function qe(e) {
|
|
302
|
+
y.trigger !== "hover" || U(e) || Ie();
|
|
303
|
+
}
|
|
304
|
+
function Je(e) {
|
|
305
|
+
y.trigger !== "hover" || U(e) || W();
|
|
306
|
+
}
|
|
307
|
+
function Ye(e) {
|
|
308
|
+
y.trigger !== "hover" || U(e) || Ie();
|
|
309
|
+
}
|
|
310
|
+
function Xe() {
|
|
311
|
+
typeof document > "u" || (Ze(), P.value && (document.addEventListener("pointerdown", tt), document.addEventListener("keydown", nt)));
|
|
312
|
+
}
|
|
313
|
+
function Ze() {
|
|
314
|
+
typeof document > "u" || (document.removeEventListener("pointerdown", tt), document.removeEventListener("keydown", nt));
|
|
315
|
+
}
|
|
316
|
+
function Qe(e) {
|
|
317
|
+
return e instanceof Element ? e : e instanceof Node ? e.parentElement : null;
|
|
318
|
+
}
|
|
319
|
+
function $e(e) {
|
|
320
|
+
return (Qe(e)?.closest("[data-bing-dropdown-floating]"))?.dataset.bingDropdownFloating === S;
|
|
321
|
+
}
|
|
322
|
+
function et(e) {
|
|
323
|
+
return e instanceof Node ? !!(w.value?.contains(e) || $e(e) || I.contains(e) && !C.value?.contains(e)) : !1;
|
|
324
|
+
}
|
|
325
|
+
function tt(e) {
|
|
326
|
+
if (!y.closeOnOutside) return;
|
|
327
|
+
let t = e.target;
|
|
328
|
+
!(t instanceof Node) || et(t) || y.trigger === "contextmenu" && C.value?.contains(t) && (e.button === 2 || e.buttons === 2) || y.trigger !== "contextmenu" && C.value?.contains(t) || V();
|
|
329
|
+
}
|
|
330
|
+
function nt(e) {
|
|
331
|
+
e.key === "Escape" && !e.defaultPrevented && I.isTop(e) && y.closeOnEscape && (e.preventDefault(), V(!0));
|
|
332
|
+
}
|
|
333
|
+
function G() {
|
|
334
|
+
A?.kill(), A = void 0;
|
|
335
|
+
}
|
|
336
|
+
function K(e = {}) {
|
|
337
|
+
j?.kill(), j = void 0;
|
|
338
|
+
let t = w.value;
|
|
339
|
+
if (t) {
|
|
340
|
+
if (e.resetTransform) {
|
|
341
|
+
v.set(t, {
|
|
342
|
+
x: 0,
|
|
343
|
+
y: 0,
|
|
344
|
+
clearProps: "height,overflow"
|
|
345
|
+
});
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
v.set(t, { clearProps: "height,overflow" });
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
function q(e) {
|
|
352
|
+
if (M && !M.isReverted) {
|
|
353
|
+
M.add(e);
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
e();
|
|
357
|
+
}
|
|
358
|
+
function J() {
|
|
359
|
+
return Array.from(w.value?.querySelectorAll("[data-bing-dropdown-item], [data-bing-dropdown-stagger]") ?? []);
|
|
360
|
+
}
|
|
361
|
+
function rt(e = w.value) {
|
|
362
|
+
return e ? Array.from(e.querySelectorAll("[data-bing-dropdown-item]")).filter((t) => t.closest("[role=\"menu\"]") === e) : [];
|
|
363
|
+
}
|
|
364
|
+
function it() {
|
|
365
|
+
let e = w.value;
|
|
366
|
+
if (!e) return;
|
|
367
|
+
let t = e.getBoundingClientRect();
|
|
368
|
+
return {
|
|
369
|
+
height: t.height,
|
|
370
|
+
left: t.left,
|
|
371
|
+
top: t.top
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
function at(e) {
|
|
375
|
+
let t = w.value;
|
|
376
|
+
if (!t || !P.value || y.trigger !== "contextmenu") return;
|
|
377
|
+
G(), K({ resetTransform: !0 }), v.killTweensOf([t, ...J()]);
|
|
378
|
+
let n = rt(t), r = t.getBoundingClientRect(), i = r.height, a = e.left - r.left, o = e.top - r.top, s = Math.abs(a) > .5 || Math.abs(o) > .5, c = e.height > 0 && i > 0 && Math.abs(e.height - i) > .5;
|
|
379
|
+
if (O()) {
|
|
380
|
+
q(() => {
|
|
381
|
+
v.set(t, {
|
|
382
|
+
autoAlpha: 1,
|
|
383
|
+
x: 0,
|
|
384
|
+
y: 0,
|
|
385
|
+
clearProps: "height,overflow"
|
|
386
|
+
}), v.set(n, { autoAlpha: 1 });
|
|
387
|
+
});
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
q(() => {
|
|
391
|
+
j = v.timeline({
|
|
392
|
+
defaults: {
|
|
393
|
+
ease: "power3.out",
|
|
394
|
+
overwrite: "auto"
|
|
395
|
+
},
|
|
396
|
+
onComplete: () => {
|
|
397
|
+
j = void 0, v.set(t, { clearProps: "height,overflow" });
|
|
398
|
+
}
|
|
399
|
+
}), s || c ? j?.fromTo(t, {
|
|
400
|
+
...s ? {
|
|
401
|
+
x: a,
|
|
402
|
+
y: o
|
|
403
|
+
} : {
|
|
404
|
+
x: 0,
|
|
405
|
+
y: 0
|
|
406
|
+
},
|
|
407
|
+
...c ? {
|
|
408
|
+
height: e.height,
|
|
409
|
+
overflow: "hidden"
|
|
410
|
+
} : {},
|
|
411
|
+
autoAlpha: 1,
|
|
412
|
+
force3D: !0
|
|
413
|
+
}, {
|
|
414
|
+
...s ? {
|
|
415
|
+
x: 0,
|
|
416
|
+
y: 0
|
|
417
|
+
} : {},
|
|
418
|
+
...c ? { height: i } : {},
|
|
419
|
+
autoAlpha: 1,
|
|
420
|
+
duration: s ? .32 : .18,
|
|
421
|
+
force3D: !0,
|
|
422
|
+
immediateRender: !0
|
|
423
|
+
}, 0) : v.set(t, {
|
|
424
|
+
autoAlpha: 1,
|
|
425
|
+
x: 0,
|
|
426
|
+
y: 0
|
|
427
|
+
}), n.length > 0 && j?.fromTo(n, { autoAlpha: 0 }, {
|
|
428
|
+
autoAlpha: 1,
|
|
429
|
+
duration: .14,
|
|
430
|
+
stagger: .014
|
|
431
|
+
}, c || s ? .035 : 0);
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
function Y(e = w.value) {
|
|
435
|
+
return rt(e).filter((e) => e.getAttribute("aria-disabled") !== "true" && !e.matches(":disabled"));
|
|
436
|
+
}
|
|
437
|
+
function X(e) {
|
|
438
|
+
let t = e.target, n = document.activeElement, r = t instanceof HTMLElement && t.matches("[data-bing-dropdown-item]") ? t : n;
|
|
439
|
+
if (!(r instanceof HTMLElement) || !et(r)) return w.value;
|
|
440
|
+
let i = r.closest("[role=\"menu\"]");
|
|
441
|
+
return i && et(i) ? i : w.value;
|
|
442
|
+
}
|
|
443
|
+
function ot(e) {
|
|
444
|
+
let t = e.target, n = document.activeElement, r = t instanceof HTMLElement && t.matches("[data-bing-dropdown-item]") ? t : n;
|
|
445
|
+
if (r instanceof HTMLElement) return r.closest("[data-bing-dropdown-item]") ?? void 0;
|
|
446
|
+
}
|
|
447
|
+
function st(e) {
|
|
448
|
+
let t = e?.getAttribute("aria-controls");
|
|
449
|
+
if (t) return document.getElementById(t) ?? void 0;
|
|
450
|
+
let n = e?.closest(".bing-dropdown-item-shell");
|
|
451
|
+
if (n) return Array.from(n.children).find((e) => e.classList.contains("bing-dropdown-item__submenu"));
|
|
452
|
+
}
|
|
453
|
+
function ct(e) {
|
|
454
|
+
return e?.id ? Array.from(document.querySelectorAll("[data-bing-dropdown-item]")).find((t) => t.getAttribute("aria-controls") === e.id) : (e?.closest(".bing-dropdown-item-shell"))?.querySelector(":scope > [data-bing-dropdown-item]");
|
|
455
|
+
}
|
|
456
|
+
function lt(e, t) {
|
|
457
|
+
let n = e.getBoundingClientRect().height - (t?.getBoundingClientRect().height ?? 0);
|
|
458
|
+
return Math.max(2, n);
|
|
459
|
+
}
|
|
460
|
+
function ut(e, t) {
|
|
461
|
+
let n = J().length, r = x.value === "sm" ? 28 : x.value === "lg" ? 36 : 32, i = n > 0 ? n * r + 8 : 0, a = t?.scrollHeight || i;
|
|
462
|
+
return lt(e, t) + a;
|
|
463
|
+
}
|
|
464
|
+
function Z() {
|
|
465
|
+
if (!R() || !C.value || !w.value) return;
|
|
466
|
+
let e = y.trigger === "contextmenu" ? 0 : 8, t = Me();
|
|
467
|
+
if (!t) return;
|
|
468
|
+
let n = w.value, r = n.querySelector(".bing-dropdown__body"), i = window.innerWidth, a = window.innerHeight, { align: o, side: s } = je(y.placement), c = n.getBoundingClientRect(), l = ut(n, r), te = Ae(y.minWidth, 228), ne = c.width || te, re = Math.max(0, i - 24), { side: u, left: ie, top: d } = ee({
|
|
469
|
+
anchor: t,
|
|
470
|
+
floating: {
|
|
471
|
+
width: Math.min(ne, re),
|
|
472
|
+
height: l
|
|
473
|
+
},
|
|
474
|
+
side: s,
|
|
475
|
+
align: o,
|
|
476
|
+
gap: e,
|
|
477
|
+
padding: 12,
|
|
478
|
+
viewport: {
|
|
479
|
+
width: i,
|
|
480
|
+
height: a
|
|
481
|
+
},
|
|
482
|
+
shiftMainAxis: s === "left" || s === "right"
|
|
483
|
+
});
|
|
484
|
+
k.value = {
|
|
485
|
+
align: o,
|
|
486
|
+
placement: u,
|
|
487
|
+
left: ie,
|
|
488
|
+
top: d
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
function dt() {
|
|
492
|
+
let e = w.value;
|
|
493
|
+
if (!e) return;
|
|
494
|
+
let t = J();
|
|
495
|
+
if (G(), K(), v.killTweensOf([e, ...t]), O()) {
|
|
496
|
+
q(() => {
|
|
497
|
+
v.set([e, ...t], {
|
|
498
|
+
autoAlpha: 1,
|
|
499
|
+
clearProps: "transform"
|
|
500
|
+
});
|
|
501
|
+
}), b("after-enter");
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
q(() => {
|
|
505
|
+
A = r({
|
|
506
|
+
panel: e,
|
|
507
|
+
items: t,
|
|
508
|
+
actionRail: null,
|
|
509
|
+
actionButtons: [],
|
|
510
|
+
placement: k.value.placement,
|
|
511
|
+
align: k.value.align,
|
|
512
|
+
onComplete: () => {
|
|
513
|
+
A = void 0, y.autoFocus && P.value && Q(), b("after-enter");
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
function ft() {
|
|
519
|
+
let e = w.value;
|
|
520
|
+
if (!e || O()) {
|
|
521
|
+
pt();
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
let t = J();
|
|
525
|
+
G(), K(), v.killTweensOf([e, ...t]), q(() => {
|
|
526
|
+
A = i({
|
|
527
|
+
panel: e,
|
|
528
|
+
items: t,
|
|
529
|
+
actionRail: null,
|
|
530
|
+
actionButtons: [],
|
|
531
|
+
placement: k.value.placement,
|
|
532
|
+
align: k.value.align,
|
|
533
|
+
onComplete: () => {
|
|
534
|
+
A = void 0, pt();
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
function pt() {
|
|
540
|
+
T.value = !1, Fe(), b("after-leave");
|
|
541
|
+
}
|
|
542
|
+
function mt() {
|
|
543
|
+
if (y.autoFocus) {
|
|
544
|
+
if (typeof window > "u") {
|
|
545
|
+
Q();
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
window.requestAnimationFrame(() => {
|
|
549
|
+
P.value && !A && Q();
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
function Q() {
|
|
554
|
+
Y()[0]?.focus();
|
|
555
|
+
}
|
|
556
|
+
function ht(e, t = w.value) {
|
|
557
|
+
let n = Y(t);
|
|
558
|
+
if (n.length === 0) return;
|
|
559
|
+
let r = document.activeElement, i = n.findIndex((e) => e === r), a = (i === -1 ? e > 0 ? -1 : 0 : i) + e;
|
|
560
|
+
a = y.loop ? (a + n.length) % n.length : Math.max(0, Math.min(n.length - 1, a)), n[a]?.focus();
|
|
561
|
+
}
|
|
562
|
+
function $(e, t = w.value) {
|
|
563
|
+
let n = Y(t);
|
|
564
|
+
(e === "first" ? n[0] : n[n.length - 1])?.focus();
|
|
565
|
+
}
|
|
566
|
+
function gt(e) {
|
|
567
|
+
let t = st(e);
|
|
568
|
+
if (!t) return !1;
|
|
569
|
+
let n = Y(t)[0];
|
|
570
|
+
return n ? (n.focus(), !0) : !1;
|
|
571
|
+
}
|
|
572
|
+
function _t(e) {
|
|
573
|
+
if (!e || e === w.value) return !1;
|
|
574
|
+
let t = ct(e);
|
|
575
|
+
return t ? (t.focus(), !0) : !1;
|
|
576
|
+
}
|
|
577
|
+
function vt(e) {
|
|
578
|
+
if (!e.defaultPrevented && !(e.key === "Escape" && (e.defaultPrevented || !I.isTop(e)))) {
|
|
579
|
+
if (e.key === "Escape" && y.closeOnEscape) {
|
|
580
|
+
e.preventDefault(), e.stopPropagation(), V(!0);
|
|
581
|
+
return;
|
|
582
|
+
}
|
|
583
|
+
if (e.key === "ArrowDown") {
|
|
584
|
+
e.preventDefault(), ht(1, X(e));
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
if (e.key === "ArrowUp") {
|
|
588
|
+
e.preventDefault(), ht(-1, X(e));
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
if (e.key === "ArrowRight") {
|
|
592
|
+
gt(ot(e)) && e.preventDefault();
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
if (e.key === "ArrowLeft") {
|
|
596
|
+
_t(X(e)) && e.preventDefault();
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
if (e.key === "Home") {
|
|
600
|
+
e.preventDefault(), $("first", X(e));
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
e.key === "End" && (e.preventDefault(), $("last", X(e)));
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
return oe({
|
|
607
|
+
openPanel: B,
|
|
608
|
+
close: V,
|
|
609
|
+
toggle: H,
|
|
610
|
+
focusFirstItem: Q
|
|
611
|
+
}), (e, t) => (m(), f("div", {
|
|
612
|
+
ref_key: "rootRef",
|
|
613
|
+
ref: C,
|
|
614
|
+
class: se(we.value)
|
|
615
|
+
}, [g(e.$slots, "trigger", {
|
|
616
|
+
open: P.value,
|
|
617
|
+
context: E.value,
|
|
618
|
+
openPanel: B,
|
|
619
|
+
triggerProps: Te.value,
|
|
620
|
+
getTriggerProps: Le,
|
|
621
|
+
close: V,
|
|
622
|
+
toggle: H
|
|
623
|
+
}, void 0, !0), fe(be) ? (m(), ie(re, {
|
|
624
|
+
key: 0,
|
|
625
|
+
to: "body"
|
|
626
|
+
}, [T.value ? (m(), f("div", {
|
|
627
|
+
key: 0,
|
|
628
|
+
ref_key: "panelRef",
|
|
629
|
+
ref: w,
|
|
630
|
+
class: se(Ee.value),
|
|
631
|
+
style: ce(ke.value),
|
|
632
|
+
"data-bing-dropdown-floating": S,
|
|
633
|
+
role: "menu",
|
|
634
|
+
"aria-label": l.ariaLabel,
|
|
635
|
+
onKeydown: vt,
|
|
636
|
+
onPointerenter: Je,
|
|
637
|
+
onPointerleave: Ye
|
|
638
|
+
}, [
|
|
639
|
+
e.$slots.header ? (m(), f("div", me, [g(e.$slots, "header", {}, void 0, !0)])) : d("", !0),
|
|
640
|
+
ae("div", he, [g(e.$slots, "default", {
|
|
641
|
+
context: E.value,
|
|
642
|
+
close: V
|
|
643
|
+
}, void 0, !0)]),
|
|
644
|
+
e.$slots.footer ? (m(), f("div", ge, [g(e.$slots, "footer", {}, void 0, !0)])) : d("", !0)
|
|
645
|
+
], 46, pe)) : d("", !0)])) : d("", !0)], 2));
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
//#endregion
|
|
649
|
+
export { ve as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingDropDownItem.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingDropDown/BingDropDownItem.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-dd15caed"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -10,9 +10,9 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<BingDr
|
|
|
10
10
|
title: string;
|
|
11
11
|
target: string;
|
|
12
12
|
ariaLabel: string;
|
|
13
|
+
href: string;
|
|
13
14
|
icon: import('vue').Component;
|
|
14
15
|
tone: import('./BingDropDown.types').BingDropDownItemTone;
|
|
15
|
-
href: string;
|
|
16
16
|
description: string;
|
|
17
17
|
active: boolean;
|
|
18
18
|
shortcut: string | string[];
|