@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
package/dist/components/BingAutocomplete/BingAutocomplete.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
import { useConfigZIndex as e } from "../../utils/config.js";
|
|
2
|
+
import { useReducedMotion as t } from "../../motion/reducedMotion.js";
|
|
3
|
+
import { createSelectPanelEnter as n, createSelectPanelLeave as r } from "../../motion/selectPanelMotion.js";
|
|
4
|
+
import { getOptionDetailSnapshot as i, moveOptionDetailPanel as a } from "../../motion/optionDetailMotion.js";
|
|
5
|
+
import { enterLiquidHover as o, leaveLiquidHover as s, setLiquidHoverOrigin as c } from "../../motion/liquidHover.js";
|
|
6
|
+
import { isolateFormControls as l, useFormControl as u } from "../BingForm/useFormControl.js";
|
|
7
|
+
import { useControlAttrs as ee } from "../../utils/controlAttrs.js";
|
|
8
|
+
import te from "../BingInput/BingInput.js";
|
|
9
|
+
import ne from "../BingScrollbar/BingScrollbar.js";
|
|
10
|
+
import { useOverlay as re } from "../../utils/overlay.js";
|
|
11
|
+
import { useClientReady as ie } from "../../utils/useClientReady.js";
|
|
12
|
+
import { Fragment as ae, Teleport as oe, Transition as se, computed as d, createBlock as ce, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as le, createTextVNode as ue, createVNode as de, defineComponent as h, mergeProps as fe, nextTick as g, normalizeClass as pe, normalizeStyle as me, onBeforeUnmount as he, onMounted as ge, openBlock as _, ref as v, renderList as _e, renderSlot as y, shallowRef as ve, toDisplayString as b, unref as x, useId as ye, useSlots as be, watch as S, withCtx as C, withModifiers as w } from "vue";
|
|
13
|
+
import { gsap as T } from "gsap";
|
|
14
|
+
//#region src/components/BingAutocomplete/BingAutocomplete.vue?vue&type=script&setup=true&lang.ts
|
|
15
|
+
var xe = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "bing-autocomplete__header"
|
|
18
|
+
}, Se = ["aria-label", "aria-busy"], Ce = [
|
|
19
|
+
"id",
|
|
20
|
+
"aria-selected",
|
|
21
|
+
"aria-disabled",
|
|
22
|
+
"aria-label",
|
|
23
|
+
"data-autocomplete-index",
|
|
24
|
+
"onMouseenter",
|
|
25
|
+
"onMousemove",
|
|
26
|
+
"onClick"
|
|
27
|
+
], we = { class: "bing-autocomplete__option-main" }, Te = {
|
|
28
|
+
key: 1,
|
|
29
|
+
class: "bing-autocomplete__state",
|
|
30
|
+
role: "status"
|
|
31
|
+
}, Ee = {
|
|
32
|
+
key: 2,
|
|
33
|
+
class: "bing-autocomplete__state",
|
|
34
|
+
role: "alert"
|
|
35
|
+
}, De = {
|
|
36
|
+
key: 3,
|
|
37
|
+
class: "bing-autocomplete__state",
|
|
38
|
+
role: "status"
|
|
39
|
+
}, Oe = {
|
|
40
|
+
key: 4,
|
|
41
|
+
class: "bing-autocomplete__footer"
|
|
42
|
+
}, ke = { key: 0 }, Ae = { key: 1 }, je = { key: 0 }, Me = { key: 1 }, Ne = /* @__PURE__ */ h({
|
|
43
|
+
inheritAttrs: !1,
|
|
44
|
+
__name: "BingAutocomplete",
|
|
45
|
+
props: {
|
|
46
|
+
id: {},
|
|
47
|
+
modelValue: { default: "" },
|
|
48
|
+
options: { default: () => [] },
|
|
49
|
+
filter: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !0
|
|
52
|
+
},
|
|
53
|
+
openOnEmpty: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !0
|
|
56
|
+
},
|
|
57
|
+
loading: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: !1
|
|
60
|
+
},
|
|
61
|
+
error: { default: "" },
|
|
62
|
+
disabled: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: void 0
|
|
65
|
+
},
|
|
66
|
+
clearable: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: !0
|
|
69
|
+
},
|
|
70
|
+
placeholder: {},
|
|
71
|
+
emptyText: { default: "没有匹配的候选" },
|
|
72
|
+
ariaLabel: {},
|
|
73
|
+
ariaDescribedby: {},
|
|
74
|
+
size: {},
|
|
75
|
+
status: {},
|
|
76
|
+
icon: {},
|
|
77
|
+
block: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: !1
|
|
80
|
+
},
|
|
81
|
+
panelWidth: {},
|
|
82
|
+
panelMaxHeight: { default: 360 },
|
|
83
|
+
completeOnSelect: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: !0
|
|
86
|
+
},
|
|
87
|
+
closeOnSelect: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: !0
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
emits: [
|
|
93
|
+
"update:modelValue",
|
|
94
|
+
"select",
|
|
95
|
+
"open",
|
|
96
|
+
"close",
|
|
97
|
+
"clear"
|
|
98
|
+
],
|
|
99
|
+
setup(h, { expose: Ne, emit: Pe }) {
|
|
100
|
+
let Fe = t(), E = h, D = Pe, Ie = be(), { rootAttrs: Le, controlAttrs: Re } = ee(), { formItem: ze, resolvedId: Be, resolvedSize: Ve, resolvedDisabled: He, resolvedStatus: Ue, resolvedAriaDescribedby: We } = u(E);
|
|
101
|
+
l();
|
|
102
|
+
let Ge = ie(), O = `bing-autocomplete-${ye()}`, k = v(null), A = v(null), j = v(null), M = v(null), N = ve(), Ke = v("right"), P = v(null), qe = v(null), Je = v(null), F = v(!1), Ye = v(!1), I = v(-1), L = v({
|
|
103
|
+
left: 0,
|
|
104
|
+
top: 0,
|
|
105
|
+
width: 320,
|
|
106
|
+
height: 360,
|
|
107
|
+
detailHeight: 360,
|
|
108
|
+
inline: !0,
|
|
109
|
+
placement: "bottom"
|
|
110
|
+
}), Xe = 0, Ze = 0, R = 0, z = 0, Qe = !1, $e, B, V = !1, H, et = !1, U, W, tt, G, nt = !1, K = d(() => {
|
|
111
|
+
if (!E.filter) return E.options;
|
|
112
|
+
let e = E.modelValue.trim().toLocaleLowerCase();
|
|
113
|
+
return E.options.filter((t) => t.label.toLocaleLowerCase().includes(e));
|
|
114
|
+
}), q = d(() => !E.loading && !E.error), J = d(() => q.value ? K.value[I.value] : void 0), rt = d(() => Object.entries(N.value?.meta ?? {}).filter(([, e]) => e != null && e !== "")), it = d(() => L.value.inline && N.value ? Math.min(184, L.value.height / 2) : 0), at = e("popover"), ot = re({
|
|
115
|
+
open: () => F.value,
|
|
116
|
+
elements: () => [
|
|
117
|
+
k.value,
|
|
118
|
+
A.value,
|
|
119
|
+
j.value
|
|
120
|
+
],
|
|
121
|
+
zIndex: () => at.value,
|
|
122
|
+
closeOnEscape: () => !Ye.value,
|
|
123
|
+
onEscape: () => {
|
|
124
|
+
$(), nt = !0, P.value?.input?.focus({ preventScroll: !0 }), nt = !1;
|
|
125
|
+
}
|
|
126
|
+
}), st = d(() => ({
|
|
127
|
+
position: "fixed",
|
|
128
|
+
left: `${L.value.left}px`,
|
|
129
|
+
top: `${L.value.top}px`,
|
|
130
|
+
width: `${L.value.width}px`,
|
|
131
|
+
zIndex: ot.zIndex.value
|
|
132
|
+
})), ct = d(() => L.value.inline ? {} : { zIndex: ot.zIndex.value + 1 });
|
|
133
|
+
function Y(e) {
|
|
134
|
+
tt ? tt.add(e) : e();
|
|
135
|
+
}
|
|
136
|
+
function lt(e = I.value) {
|
|
137
|
+
return document.getElementById(`${O}-${e}`);
|
|
138
|
+
}
|
|
139
|
+
function X() {
|
|
140
|
+
clearTimeout($e), $e = void 0;
|
|
141
|
+
}
|
|
142
|
+
function ut() {
|
|
143
|
+
let e = lt(), t = j.value;
|
|
144
|
+
if (!F.value || !e || !t || L.value.inline) return null;
|
|
145
|
+
let n = e.getBoundingClientRect(), r = window.visualViewport, i = (r?.offsetLeft ?? 0) + 12, a = (r?.offsetTop ?? 0) + 12, o = i + (r?.width ?? innerWidth) - 24, s = a + (r?.height ?? innerHeight) - 24, c = t.offsetWidth, l = t.offsetHeight, u = L.value.left + L.value.width + 12, ee = L.value.left - c - 12, te = u + c <= o ? "right" : "left";
|
|
146
|
+
return {
|
|
147
|
+
x: Math.max(i, Math.min(te === "right" ? u : ee, o - c)),
|
|
148
|
+
y: Math.max(a, Math.min(n.top + n.height / 2 - l / 2, s - l)),
|
|
149
|
+
placement: te
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
function dt(e = !1, t) {
|
|
153
|
+
cancelAnimationFrame(R), !(!F.value || !N.value) && (R = requestAnimationFrame(() => {
|
|
154
|
+
R = 0, !(et || !F.value || !j.value || L.value.inline) && Y(() => {
|
|
155
|
+
let n = a({
|
|
156
|
+
panel: j.value,
|
|
157
|
+
content: M.value,
|
|
158
|
+
getTarget: ut,
|
|
159
|
+
animateContent: e,
|
|
160
|
+
previousSnapshot: t,
|
|
161
|
+
reducedMotion: Fe(),
|
|
162
|
+
onComplete: () => Je.value?.update()
|
|
163
|
+
});
|
|
164
|
+
n && (Ke.value = n.placement);
|
|
165
|
+
});
|
|
166
|
+
}));
|
|
167
|
+
}
|
|
168
|
+
function ft() {
|
|
169
|
+
Qe = !1, X(), clearTimeout(B);
|
|
170
|
+
let e = J.value;
|
|
171
|
+
if (!F.value || !e || e.disabled || !(Ie["option-detail"] || e.detail?.trim() || e.description?.trim() || Object.values(e.meta ?? {}).some((e) => e != null && e !== ""))) {
|
|
172
|
+
Z(!0);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
let t = N.value !== e, n = t ? i(j.value) : void 0;
|
|
176
|
+
j.value && T.killTweensOf(j.value), N.value = e;
|
|
177
|
+
let r = ++z;
|
|
178
|
+
g(() => {
|
|
179
|
+
et || r !== z || !F.value || dt(t, n);
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function Z(e = !1) {
|
|
183
|
+
Qe = !0, X(), cancelAnimationFrame(R), R = 0;
|
|
184
|
+
let t = ++z, n = j.value;
|
|
185
|
+
T.killTweensOf([n, M.value].filter(Boolean));
|
|
186
|
+
let r = () => {
|
|
187
|
+
t === z && (N.value = void 0, Qe = !1);
|
|
188
|
+
};
|
|
189
|
+
if (!n || e || L.value.inline || Fe()) {
|
|
190
|
+
r();
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
Y(() => {
|
|
194
|
+
T.to(n, {
|
|
195
|
+
autoAlpha: 0,
|
|
196
|
+
scale: .96,
|
|
197
|
+
x: `+=${Ke.value === "right" ? -6 : 6}`,
|
|
198
|
+
duration: .14,
|
|
199
|
+
ease: "power2.out",
|
|
200
|
+
overwrite: !0,
|
|
201
|
+
onComplete: r
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
function pt() {
|
|
206
|
+
X(), $e = setTimeout(() => Z(), 120);
|
|
207
|
+
}
|
|
208
|
+
function mt(e, t) {
|
|
209
|
+
let n = !H || e.clientX !== H.x || e.clientY !== H.y;
|
|
210
|
+
if (H = {
|
|
211
|
+
x: e.clientX,
|
|
212
|
+
y: e.clientY
|
|
213
|
+
}, V && (e.type !== "mousemove" || !n)) return;
|
|
214
|
+
if (V = !1, X(), K.value[t]?.disabled) {
|
|
215
|
+
Z(!0);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
let r = I.value !== t;
|
|
219
|
+
I.value = t, (r || !N.value || Qe) && ft();
|
|
220
|
+
let i = e.currentTarget, a = i.querySelector(".bing-autocomplete__option-liquid");
|
|
221
|
+
!a || Fe() || (c(i, a, e), i.classList.contains("is-liquid-active") || (i.classList.add("is-liquid-active"), Y(() => {
|
|
222
|
+
o(a);
|
|
223
|
+
})));
|
|
224
|
+
}
|
|
225
|
+
function ht(e) {
|
|
226
|
+
let t = e.currentTarget;
|
|
227
|
+
t.classList.remove("is-liquid-active");
|
|
228
|
+
let n = t.querySelector(".bing-autocomplete__option-liquid");
|
|
229
|
+
n && !Fe() && Y(() => {
|
|
230
|
+
s(n);
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
function gt() {
|
|
234
|
+
if (V) {
|
|
235
|
+
dt();
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
Z(!0), clearTimeout(B), B = setTimeout(() => {
|
|
239
|
+
if (!F.value || V || !H) return;
|
|
240
|
+
let e = document.elementFromPoint(H.x, H.y)?.closest("[data-autocomplete-index]");
|
|
241
|
+
!e || !A.value?.contains(e) || (I.value = Number(e.dataset.autocompleteIndex), ft());
|
|
242
|
+
}, 150);
|
|
243
|
+
}
|
|
244
|
+
function _t(e, t, i) {
|
|
245
|
+
if (et) {
|
|
246
|
+
t();
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
U?.kill(), W = i ? void 0 : t;
|
|
250
|
+
let a = e, o = Array.from(a.querySelectorAll(".bing-autocomplete__option")), s = a.querySelectorAll(".bing-autocomplete__option-liquid");
|
|
251
|
+
if (T.killTweensOf([
|
|
252
|
+
a,
|
|
253
|
+
...o,
|
|
254
|
+
...s
|
|
255
|
+
]), a.inert = !i, i ? (yt(), G?.observe(a)) : G?.unobserve(a), Fe()) {
|
|
256
|
+
T.set([a, ...o], {
|
|
257
|
+
autoAlpha: +!!i,
|
|
258
|
+
clearProps: "transform"
|
|
259
|
+
}), W = void 0, t();
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
Y(() => {
|
|
263
|
+
let e = i ? n : r, s = a.getBoundingClientRect(), c = o.filter((e) => {
|
|
264
|
+
let t = e.getBoundingClientRect();
|
|
265
|
+
return t.top < s.bottom && t.bottom > s.top;
|
|
266
|
+
});
|
|
267
|
+
c.forEach((e) => {
|
|
268
|
+
e.style.willChange = "transform, opacity";
|
|
269
|
+
}), U = e({
|
|
270
|
+
panel: a,
|
|
271
|
+
items: c,
|
|
272
|
+
actionRail: null,
|
|
273
|
+
actionButtons: [],
|
|
274
|
+
placement: L.value.placement,
|
|
275
|
+
align: "start",
|
|
276
|
+
onComplete: () => {
|
|
277
|
+
U = void 0, W = void 0, t(), i && dt();
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
function vt() {
|
|
283
|
+
U?.kill(), U = void 0;
|
|
284
|
+
}
|
|
285
|
+
function yt() {
|
|
286
|
+
if (Xe = 0, !F.value || !k.value) return;
|
|
287
|
+
let e = k.value.getBoundingClientRect(), t = window.visualViewport, n = (t?.offsetLeft ?? 0) + 8, r = (t?.offsetTop ?? 0) + 8, i = n + (t?.width ?? window.innerWidth) - 16, a = r + (t?.height ?? window.innerHeight) - 16, o = Math.min(Math.max(e.width, E.panelWidth ?? 320), i - n), s = Math.max(n, Math.min(e.left, i - o)), c = a - e.bottom - 10, l = e.top - r - 10, u = c >= Math.min(E.panelMaxHeight, 200) || c >= l, ee = Math.max(0, Math.min(E.panelMaxHeight, (u ? c : l) - 10)), te = Math.min(A.value?.offsetHeight ?? ee + 10, ee + 10), ne = u ? Math.min(a, e.bottom + 10) : Math.max(r, e.top - 10 - te), re = i - s - o < 260 && s - n < 260;
|
|
288
|
+
L.value.inline !== re && T.killTweensOf([j.value, M.value].filter(Boolean));
|
|
289
|
+
let ie = {
|
|
290
|
+
left: s,
|
|
291
|
+
top: ne,
|
|
292
|
+
width: o,
|
|
293
|
+
height: ee,
|
|
294
|
+
inline: re,
|
|
295
|
+
detailHeight: Math.max(0, a - r - 32),
|
|
296
|
+
placement: u ? "bottom" : "top"
|
|
297
|
+
};
|
|
298
|
+
Object.keys(ie).some((e) => ie[e] !== L.value[e]) && (L.value = ie, g(() => dt()));
|
|
299
|
+
}
|
|
300
|
+
function Q() {
|
|
301
|
+
F.value && !Xe && (Xe = requestAnimationFrame(yt));
|
|
302
|
+
}
|
|
303
|
+
function bt(e = E.modelValue) {
|
|
304
|
+
return E.openOnEmpty || !!e.trim();
|
|
305
|
+
}
|
|
306
|
+
function xt(e = E.modelValue) {
|
|
307
|
+
He.value || F.value || nt || !bt(e) || (F.value = !0, V = !1, I.value = K.value.findIndex((e) => !e.disabled), yt(), D("open"), g(() => {
|
|
308
|
+
F.value && yt();
|
|
309
|
+
}));
|
|
310
|
+
}
|
|
311
|
+
function $() {
|
|
312
|
+
F.value && (F.value = !1, V = !1, clearTimeout(B), Z(), A.value && G?.unobserve(A.value), D("close"));
|
|
313
|
+
}
|
|
314
|
+
function St() {
|
|
315
|
+
P.value?.focus(), xt();
|
|
316
|
+
}
|
|
317
|
+
function Ct(e) {
|
|
318
|
+
D("update:modelValue", String(e)), ze?.handleControlChange(), bt(String(e)) ? xt(String(e)) : $();
|
|
319
|
+
}
|
|
320
|
+
function wt(e) {
|
|
321
|
+
!q.value || e.disabled || He.value || Ye.value || (E.completeOnSelect && Ct(e.label), D("select", e), E.closeOnSelect && $());
|
|
322
|
+
}
|
|
323
|
+
function Tt() {
|
|
324
|
+
g(() => {
|
|
325
|
+
let e = qe.value?.viewport, t = document.getElementById(`${O}-${I.value}`);
|
|
326
|
+
if (!F.value || !e || !t) return;
|
|
327
|
+
qe.value?.stop();
|
|
328
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
|
|
329
|
+
r.top < n.top ? e.scrollTop += r.top - n.top : r.bottom > n.bottom && (e.scrollTop += r.bottom - n.bottom), ft();
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
function Et(e) {
|
|
333
|
+
if (!(e.isComposing || Ye.value || e.keyCode === 229 || He.value)) if (e.key === "Escape" && F.value) e.preventDefault(), e.stopPropagation(), $();
|
|
334
|
+
else if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
335
|
+
if (e.preventDefault(), !F.value) {
|
|
336
|
+
xt(), V = !0, Tt();
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
if (!q.value) return;
|
|
340
|
+
V = !0;
|
|
341
|
+
let t = e.key === "ArrowDown" ? 1 : -1;
|
|
342
|
+
for (let e = 1; e <= K.value.length; e++) {
|
|
343
|
+
let n = (I.value + t * e + K.value.length) % K.value.length;
|
|
344
|
+
if (!K.value[n]?.disabled) {
|
|
345
|
+
I.value = n, Tt();
|
|
346
|
+
break;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
} else e.key === "Enter" && F.value && J.value && (e.preventDefault(), wt(J.value));
|
|
350
|
+
}
|
|
351
|
+
function Dt(e) {
|
|
352
|
+
return !!(e && ([
|
|
353
|
+
k.value,
|
|
354
|
+
A.value,
|
|
355
|
+
j.value
|
|
356
|
+
].some((t) => t?.contains(e)) || ot.contains(e)));
|
|
357
|
+
}
|
|
358
|
+
function Ot(e) {
|
|
359
|
+
F.value && e.target instanceof Node && !Dt(e.target) && $();
|
|
360
|
+
}
|
|
361
|
+
function kt(e) {
|
|
362
|
+
let t = e.relatedTarget instanceof Node && Dt(e.relatedTarget);
|
|
363
|
+
cancelAnimationFrame(Ze), Ze = requestAnimationFrame(() => {
|
|
364
|
+
Ze = 0;
|
|
365
|
+
let n = !e.relatedTarget && e.target instanceof Node && !e.target.isConnected || t && e.relatedTarget instanceof Node && !e.relatedTarget.isConnected;
|
|
366
|
+
if (F.value && n && document.activeElement === document.body) {
|
|
367
|
+
P.value?.input?.focus({ preventScroll: !0 });
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
Dt(document.activeElement) || ($(), ze?.handleControlBlur());
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
return S([K, q], () => {
|
|
374
|
+
let e = typeof document > "u" ? null : document.activeElement, t = Dt(e);
|
|
375
|
+
I.value = K.value.findIndex((e) => !e.disabled), F.value && (Q(), V && J.value ? Tt() : Z(!0)), g(() => {
|
|
376
|
+
F.value && t && e && !e.isConnected && document.activeElement === document.body && P.value?.input?.focus({ preventScroll: !0 });
|
|
377
|
+
});
|
|
378
|
+
}), S(He, (e) => {
|
|
379
|
+
e && $();
|
|
380
|
+
}), S([() => E.modelValue, () => E.openOnEmpty], () => {
|
|
381
|
+
bt() || $();
|
|
382
|
+
}), S([() => E.panelWidth, () => E.panelMaxHeight], Q), S(it, () => {
|
|
383
|
+
V && Tt();
|
|
384
|
+
}), S(M, (e, t) => {
|
|
385
|
+
t && G?.unobserve(t), e && G?.observe(e);
|
|
386
|
+
}), ge(() => {
|
|
387
|
+
tt = T.context(() => {}, k.value), G = new ResizeObserver((e) => {
|
|
388
|
+
e.some((e) => e.target !== M.value) && Q(), e.some((e) => e.target === M.value) && !R && j.value && !T.isTweening(j.value) && dt();
|
|
389
|
+
}), k.value && G.observe(k.value), window.addEventListener("resize", Q), window.addEventListener("scroll", Q, !0), window.visualViewport?.addEventListener("resize", Q), window.visualViewport?.addEventListener("scroll", Q), document.addEventListener("pointerdown", Ot, !0), document.addEventListener("focusin", Ot);
|
|
390
|
+
}), he(() => {
|
|
391
|
+
et = !0, z++, X(), clearTimeout(B), cancelAnimationFrame(R), vt(), W?.(), W = void 0, tt?.revert(), cancelAnimationFrame(Xe), cancelAnimationFrame(Ze), G?.disconnect(), window.removeEventListener("resize", Q), window.removeEventListener("scroll", Q, !0), window.visualViewport?.removeEventListener("resize", Q), window.visualViewport?.removeEventListener("scroll", Q), document.removeEventListener("pointerdown", Ot, !0), document.removeEventListener("focusin", Ot);
|
|
392
|
+
}), Ne({
|
|
393
|
+
focus: St,
|
|
394
|
+
close: $,
|
|
395
|
+
get input() {
|
|
396
|
+
return P.value?.input ?? null;
|
|
397
|
+
}
|
|
398
|
+
}), (e, t) => (_(), p("div", fe(x(Le)(), {
|
|
399
|
+
ref_key: "root",
|
|
400
|
+
ref: k,
|
|
401
|
+
class: ["bing-autocomplete", { "is-block": h.block }],
|
|
402
|
+
onFocusout: kt
|
|
403
|
+
}), [de(te, fe(x(Re)(), {
|
|
404
|
+
id: x(Be),
|
|
405
|
+
ref_key: "input",
|
|
406
|
+
ref: P,
|
|
407
|
+
"model-value": h.modelValue,
|
|
408
|
+
disabled: x(He),
|
|
409
|
+
size: x(Ve),
|
|
410
|
+
status: x(Ue),
|
|
411
|
+
placeholder: h.placeholder,
|
|
412
|
+
clearable: h.clearable,
|
|
413
|
+
icon: h.icon,
|
|
414
|
+
block: "",
|
|
415
|
+
"aria-label": h.ariaLabel,
|
|
416
|
+
"aria-describedby": x(We),
|
|
417
|
+
role: "combobox",
|
|
418
|
+
"aria-autocomplete": "list",
|
|
419
|
+
"aria-expanded": F.value,
|
|
420
|
+
"aria-controls": F.value ? O : void 0,
|
|
421
|
+
"aria-activedescendant": F.value && J.value ? `${O}-${I.value}` : void 0,
|
|
422
|
+
spellcheck: !1,
|
|
423
|
+
"onUpdate:modelValue": Ct,
|
|
424
|
+
onFocus: t[0] ||= (e) => xt(),
|
|
425
|
+
onClick: t[1] ||= (e) => xt(),
|
|
426
|
+
onKeydown: Et,
|
|
427
|
+
onCompositionstart: t[2] ||= (e) => Ye.value = !0,
|
|
428
|
+
onCompositionend: t[3] ||= (e) => Ye.value = !1,
|
|
429
|
+
onClear: t[4] ||= (e) => D("clear")
|
|
430
|
+
}), le({ _: 2 }, [Ie.icon ? {
|
|
431
|
+
name: "icon",
|
|
432
|
+
fn: C(() => [y(e.$slots, "icon", {}, void 0, !0)]),
|
|
433
|
+
key: "0"
|
|
434
|
+
} : void 0]), 1040, [
|
|
435
|
+
"id",
|
|
436
|
+
"model-value",
|
|
437
|
+
"disabled",
|
|
438
|
+
"size",
|
|
439
|
+
"status",
|
|
440
|
+
"placeholder",
|
|
441
|
+
"clearable",
|
|
442
|
+
"icon",
|
|
443
|
+
"aria-label",
|
|
444
|
+
"aria-describedby",
|
|
445
|
+
"aria-expanded",
|
|
446
|
+
"aria-controls",
|
|
447
|
+
"aria-activedescendant"
|
|
448
|
+
]), x(Ge) ? (_(), ce(oe, {
|
|
449
|
+
key: 0,
|
|
450
|
+
to: "body"
|
|
451
|
+
}, [de(se, {
|
|
452
|
+
css: !1,
|
|
453
|
+
onEnter: t[7] ||= (e, t) => _t(e, t, !0),
|
|
454
|
+
onLeave: t[8] ||= (e, t) => _t(e, t, !1),
|
|
455
|
+
onEnterCancelled: vt,
|
|
456
|
+
onLeaveCancelled: vt
|
|
457
|
+
}, {
|
|
458
|
+
default: C(() => [F.value ? (_(), p("div", {
|
|
459
|
+
key: 0,
|
|
460
|
+
ref_key: "panel",
|
|
461
|
+
ref: A,
|
|
462
|
+
class: "bing-autocomplete__panel",
|
|
463
|
+
style: me(st.value),
|
|
464
|
+
onFocusout: kt
|
|
465
|
+
}, [de(ne, {
|
|
466
|
+
ref_key: "scrollbar",
|
|
467
|
+
ref: qe,
|
|
468
|
+
"max-height": L.value.height - it.value,
|
|
469
|
+
focusable: !1,
|
|
470
|
+
onScroll: gt
|
|
471
|
+
}, {
|
|
472
|
+
default: C(() => [
|
|
473
|
+
Ie.header ? (_(), p("div", xe, [y(e.$slots, "header", {}, void 0, !0)])) : f("", !0),
|
|
474
|
+
m("div", {
|
|
475
|
+
id: O,
|
|
476
|
+
role: "listbox",
|
|
477
|
+
"aria-label": h.ariaLabel || "搜索候选",
|
|
478
|
+
"aria-busy": h.loading,
|
|
479
|
+
onMouseenter: X,
|
|
480
|
+
onMouseleave: pt
|
|
481
|
+
}, [q.value ? (_(!0), p(ae, { key: 0 }, _e(K.value, (n, r) => (_(), p("div", {
|
|
482
|
+
id: `${O}-${r}`,
|
|
483
|
+
key: n.value,
|
|
484
|
+
role: "option",
|
|
485
|
+
class: pe(["bing-autocomplete__option", {
|
|
486
|
+
"is-active": I.value === r,
|
|
487
|
+
"is-disabled": n.disabled
|
|
488
|
+
}]),
|
|
489
|
+
"aria-selected": I.value === r,
|
|
490
|
+
"aria-disabled": n.disabled || void 0,
|
|
491
|
+
"aria-label": n.label,
|
|
492
|
+
"data-autocomplete-index": r,
|
|
493
|
+
onMousedown: t[5] ||= w(() => {}, ["prevent"]),
|
|
494
|
+
onMouseenter: (e) => mt(e, r),
|
|
495
|
+
onMousemove: (e) => mt(e, r),
|
|
496
|
+
onMouseleave: ht,
|
|
497
|
+
onClick: (e) => wt(n)
|
|
498
|
+
}, [t[12] ||= m("span", {
|
|
499
|
+
class: "bing-autocomplete__option-liquid",
|
|
500
|
+
"aria-hidden": "true"
|
|
501
|
+
}, null, -1), m("span", we, [y(e.$slots, "option", {
|
|
502
|
+
option: n,
|
|
503
|
+
active: I.value === r
|
|
504
|
+
}, () => [m("span", null, b(n.label), 1)], !0)])], 42, Ce))), 128)) : f("", !0)], 40, Se),
|
|
505
|
+
h.loading ? (_(), p("div", Te, [y(e.$slots, "loading", {}, () => [t[13] ||= ue("正在加载…", -1)], !0)])) : h.error ? (_(), p("div", Ee, [y(e.$slots, "error", { error: h.error }, () => [ue(b(h.error), 1)], !0)])) : K.value.length ? f("", !0) : (_(), p("div", De, [y(e.$slots, "empty", {}, () => [ue(b(h.emptyText), 1)], !0)])),
|
|
506
|
+
Ie.footer ? (_(), p("div", Oe, [y(e.$slots, "footer", {}, void 0, !0)])) : f("", !0)
|
|
507
|
+
]),
|
|
508
|
+
_: 3
|
|
509
|
+
}, 8, ["max-height"]), L.value.inline && N.value ? (_(), p("div", {
|
|
510
|
+
key: 0,
|
|
511
|
+
class: "bing-autocomplete__detail is-inline",
|
|
512
|
+
"aria-hidden": "true",
|
|
513
|
+
onMouseenter: X,
|
|
514
|
+
onMouseleave: pt,
|
|
515
|
+
onMousedown: t[6] ||= w(() => {}, ["prevent"])
|
|
516
|
+
}, [de(ne, {
|
|
517
|
+
"max-height": Math.max(0, it.value - 28),
|
|
518
|
+
focusable: !1
|
|
519
|
+
}, {
|
|
520
|
+
default: C(() => [y(e.$slots, "option-detail", { option: N.value }, () => [
|
|
521
|
+
m("strong", null, b(N.value.label), 1),
|
|
522
|
+
N.value.detail || N.value.description ? (_(), p("p", ke, b(N.value.detail || N.value.description), 1)) : f("", !0),
|
|
523
|
+
rt.value.length ? (_(), p("dl", Ae, [(_(!0), p(ae, null, _e(rt.value, ([e, t]) => (_(), p("div", { key: e }, [m("dt", null, b(e), 1), m("dd", null, b(t), 1)]))), 128))])) : f("", !0)
|
|
524
|
+
], !0)]),
|
|
525
|
+
_: 3
|
|
526
|
+
}, 8, ["max-height"])], 32)) : f("", !0)], 36)) : f("", !0)]),
|
|
527
|
+
_: 3
|
|
528
|
+
}), !L.value.inline && N.value ? (_(), p("div", {
|
|
529
|
+
key: 0,
|
|
530
|
+
ref_key: "detail",
|
|
531
|
+
ref: j,
|
|
532
|
+
class: "bing-autocomplete__detail",
|
|
533
|
+
style: me(ct.value),
|
|
534
|
+
"aria-hidden": "true",
|
|
535
|
+
onMouseenter: X,
|
|
536
|
+
onMouseleave: pt,
|
|
537
|
+
onMousedown: t[9] ||= w(() => {}, ["prevent"]),
|
|
538
|
+
onPointerdown: t[10] ||= w(() => {}, ["stop"]),
|
|
539
|
+
onClick: t[11] ||= w(() => {}, ["stop"])
|
|
540
|
+
}, [de(ne, {
|
|
541
|
+
ref_key: "detailScrollbar",
|
|
542
|
+
ref: Je,
|
|
543
|
+
"max-height": L.value.detailHeight,
|
|
544
|
+
focusable: !1
|
|
545
|
+
}, {
|
|
546
|
+
default: C(() => [m("div", {
|
|
547
|
+
ref_key: "detailContent",
|
|
548
|
+
ref: M,
|
|
549
|
+
class: "bing-autocomplete__detail-content"
|
|
550
|
+
}, [y(e.$slots, "option-detail", { option: N.value }, () => [
|
|
551
|
+
m("strong", null, b(N.value.label), 1),
|
|
552
|
+
N.value.detail || N.value.description ? (_(), p("p", je, b(N.value.detail || N.value.description), 1)) : f("", !0),
|
|
553
|
+
rt.value.length ? (_(), p("dl", Me, [(_(!0), p(ae, null, _e(rt.value, ([e, t]) => (_(), p("div", { key: e }, [m("dt", null, b(e), 1), m("dd", null, b(t), 1)]))), 128))])) : f("", !0)
|
|
554
|
+
], !0)], 512)]),
|
|
555
|
+
_: 3
|
|
556
|
+
}, 8, ["max-height"])], 36)) : f("", !0)])) : f("", !0)], 16));
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
//#endregion
|
|
560
|
+
export { Ne as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingButton.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingButton/BingButton.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-b82728f7"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -9,13 +9,13 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: import('vue').DefineComponent<BingButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
11
|
blur: (event: FocusEvent) => any;
|
|
12
|
-
click: (event: MouseEvent) => any;
|
|
13
12
|
focus: (event: FocusEvent) => any;
|
|
13
|
+
click: (event: MouseEvent) => any;
|
|
14
14
|
throttled: (payload: import('./BingButton.types').BingButtonThrottledPayload) => any;
|
|
15
15
|
}, string, import('vue').PublicProps, Readonly<BingButtonProps> & Readonly<{
|
|
16
16
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
17
|
-
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
18
17
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
18
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
19
19
|
onThrottled?: ((payload: import('./BingButton.types').BingButtonThrottledPayload) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
21
|
disabled: boolean;
|