@moubing/bing-ui 0.11.2 → 0.12.1
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 -31278
- package/dist/bing-ui.umd.js +0 -229
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { computed as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, normalizeStyle as a, onBeforeUnmount as o, onMounted as s, openBlock as c, ref as l, renderSlot as u, useId as d, watch as f } from "vue";
|
|
2
|
+
//#region src/components/BingSplitPane/BingSplitPane.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var p = { class: "bing-split-pane__main" }, m = [
|
|
4
|
+
"disabled",
|
|
5
|
+
"aria-disabled",
|
|
6
|
+
"aria-label",
|
|
7
|
+
"aria-valuemin",
|
|
8
|
+
"aria-valuemax",
|
|
9
|
+
"aria-valuenow",
|
|
10
|
+
"aria-valuetext"
|
|
11
|
+
], h = /* @__PURE__ */ r({
|
|
12
|
+
__name: "BingSplitPane",
|
|
13
|
+
props: {
|
|
14
|
+
sideSize: { default: void 0 },
|
|
15
|
+
defaultSideSize: { default: 320 },
|
|
16
|
+
minSideSize: { default: 160 },
|
|
17
|
+
maxSideSize: { default: 640 },
|
|
18
|
+
minMainSize: { default: 240 },
|
|
19
|
+
keyboardStep: { default: 12 },
|
|
20
|
+
disabled: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
},
|
|
24
|
+
ariaLabel: { default: "调整侧栏宽度" }
|
|
25
|
+
},
|
|
26
|
+
emits: [
|
|
27
|
+
"update:sideSize",
|
|
28
|
+
"resize-start",
|
|
29
|
+
"resize",
|
|
30
|
+
"resize-end",
|
|
31
|
+
"resize-cancel"
|
|
32
|
+
],
|
|
33
|
+
setup(r, { expose: h, emit: g }) {
|
|
34
|
+
let _ = r, v = g, y = l(null), b = l(null), x = `bing-split-pane-${d()}-side`, S = l(_.defaultSideSize), C = l(null), w = l(null), T, E;
|
|
35
|
+
function D(e, t) {
|
|
36
|
+
return Number.isFinite(e) ? e : t;
|
|
37
|
+
}
|
|
38
|
+
function O(e, t, n) {
|
|
39
|
+
return Math.min(n, Math.max(t, e));
|
|
40
|
+
}
|
|
41
|
+
let k = e(() => Math.max(0, D(_.minSideSize, 160))), A = e(() => Math.max(k.value, D(_.maxSideSize, 640))), j = e(() => O(D(_.sideSize ?? S.value, D(_.defaultSideSize, 320)), k.value, A.value)), M = e(() => w.value === null ? A.value : Math.max(0, w.value - Math.max(0, D(_.minMainSize, 240)))), N = e(() => Math.min(A.value, M.value)), P = e(() => Math.min(k.value, N.value)), F = e(() => O(C.value ?? j.value, P.value, N.value)), I = e(() => !_.disabled && N.value > P.value), L = e(() => ({ "--bing-split-side-size": `${F.value}px` }));
|
|
42
|
+
function R(e, t = F.value, n = j.value) {
|
|
43
|
+
return {
|
|
44
|
+
size: t,
|
|
45
|
+
preferredSize: n,
|
|
46
|
+
source: e
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function z() {
|
|
50
|
+
let e = E?.pointerId;
|
|
51
|
+
E = void 0, window.removeEventListener("pointermove", H), window.removeEventListener("pointerup", W), window.removeEventListener("pointercancel", G), window.removeEventListener("keydown", J, !0), window.removeEventListener("blur", q), e !== void 0 && b.value?.hasPointerCapture?.(e) && b.value.releasePointerCapture(e);
|
|
52
|
+
}
|
|
53
|
+
function B(e) {
|
|
54
|
+
E && (z(), C.value = null, v("resize-cancel", {
|
|
55
|
+
...R("pointer"),
|
|
56
|
+
reason: e
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
function V(e) {
|
|
60
|
+
if (!(!I.value || E || e.button !== 0 || e.isPrimary === !1)) {
|
|
61
|
+
e.preventDefault(), b.value?.focus({ preventScroll: !0 }), E = {
|
|
62
|
+
pointerId: e.pointerId,
|
|
63
|
+
x: e.clientX,
|
|
64
|
+
size: F.value,
|
|
65
|
+
width: w.value
|
|
66
|
+
}, C.value = F.value;
|
|
67
|
+
try {
|
|
68
|
+
b.value?.setPointerCapture(e.pointerId);
|
|
69
|
+
} catch {}
|
|
70
|
+
window.addEventListener("pointermove", H), window.addEventListener("pointerup", W), window.addEventListener("pointercancel", G), window.addEventListener("keydown", J, !0), window.addEventListener("blur", q), v("resize-start", R("pointer"));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function H(e) {
|
|
74
|
+
if (!E || e.pointerId !== E.pointerId) return;
|
|
75
|
+
let t = O(E.size + E.x - e.clientX, P.value, N.value);
|
|
76
|
+
t !== C.value && (C.value = t, v("resize", R("pointer")));
|
|
77
|
+
}
|
|
78
|
+
function U(e, t) {
|
|
79
|
+
let n = O(e, k.value, A.value), r = R(t, O(n, P.value, N.value), n);
|
|
80
|
+
n !== j.value && (_.sideSize === void 0 && (S.value = n), v("update:sideSize", n)), C.value = null, v("resize-end", r);
|
|
81
|
+
}
|
|
82
|
+
function W(e) {
|
|
83
|
+
if (!E || e.pointerId !== E.pointerId) return;
|
|
84
|
+
H(e);
|
|
85
|
+
let t = F.value === E.size ? j.value : F.value;
|
|
86
|
+
z(), U(t, "pointer");
|
|
87
|
+
}
|
|
88
|
+
function G(e) {
|
|
89
|
+
e.pointerId === E?.pointerId && B("pointercancel");
|
|
90
|
+
}
|
|
91
|
+
function K(e) {
|
|
92
|
+
e.pointerId === E?.pointerId && B("capture-lost");
|
|
93
|
+
}
|
|
94
|
+
function q() {
|
|
95
|
+
B("blur");
|
|
96
|
+
}
|
|
97
|
+
function J(e) {
|
|
98
|
+
e.key !== "Escape" || !E || (e.preventDefault(), e.stopPropagation(), B("escape"));
|
|
99
|
+
}
|
|
100
|
+
function Y(e, t) {
|
|
101
|
+
_.disabled || (B("props"), v("resize-start", R(t)), v("resize", R(t, O(e, P.value, N.value))), U(e, t));
|
|
102
|
+
}
|
|
103
|
+
function X() {
|
|
104
|
+
Y(O(D(_.defaultSideSize, 320), k.value, A.value), "reset");
|
|
105
|
+
}
|
|
106
|
+
function Z(e) {
|
|
107
|
+
if (_.disabled || E) return;
|
|
108
|
+
if (e.key === "Enter") {
|
|
109
|
+
e.preventDefault(), X();
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (!I.value) return;
|
|
113
|
+
let t = Math.max(1, D(_.keyboardStep, 12)), n = e.key === "ArrowLeft" ? F.value + t : e.key === "ArrowRight" ? F.value - t : e.key === "Home" ? P.value : e.key === "End" ? N.value : null;
|
|
114
|
+
n !== null && (e.preventDefault(), Y(O(n, P.value, N.value), "keyboard"));
|
|
115
|
+
}
|
|
116
|
+
function Q(e) {
|
|
117
|
+
E && E.width !== null && e < E.width && B("container"), w.value = Math.max(0, e);
|
|
118
|
+
}
|
|
119
|
+
return f(() => [
|
|
120
|
+
_.sideSize,
|
|
121
|
+
_.minSideSize,
|
|
122
|
+
_.maxSideSize,
|
|
123
|
+
_.minMainSize,
|
|
124
|
+
_.disabled
|
|
125
|
+
], () => B("props")), s(() => {
|
|
126
|
+
y.value && (Q(y.value.clientWidth), T = new ResizeObserver((e) => {
|
|
127
|
+
let t = e[0];
|
|
128
|
+
t && Q(t.contentRect.width);
|
|
129
|
+
}), T.observe(y.value));
|
|
130
|
+
}), o(() => {
|
|
131
|
+
B("unmount"), T?.disconnect();
|
|
132
|
+
}), h({ reset: X }), (e, o) => (c(), t("div", {
|
|
133
|
+
ref_key: "root",
|
|
134
|
+
ref: y,
|
|
135
|
+
class: i(["bing-split-pane", { "is-resizing": C.value !== null }]),
|
|
136
|
+
style: a(L.value)
|
|
137
|
+
}, [
|
|
138
|
+
n("div", p, [u(e.$slots, "default", {}, void 0, !0)]),
|
|
139
|
+
n("div", {
|
|
140
|
+
id: x,
|
|
141
|
+
class: "bing-split-pane__side"
|
|
142
|
+
}, [u(e.$slots, "side", { size: F.value }, void 0, !0)]),
|
|
143
|
+
n("button", {
|
|
144
|
+
ref_key: "handle",
|
|
145
|
+
ref: b,
|
|
146
|
+
type: "button",
|
|
147
|
+
role: "separator",
|
|
148
|
+
class: i(["bing-split-pane__handle", { "is-fixed": !I.value }]),
|
|
149
|
+
disabled: r.disabled,
|
|
150
|
+
"aria-disabled": r.disabled,
|
|
151
|
+
"aria-label": r.ariaLabel,
|
|
152
|
+
"aria-controls": x,
|
|
153
|
+
"aria-orientation": "vertical",
|
|
154
|
+
"aria-valuemin": P.value,
|
|
155
|
+
"aria-valuemax": N.value,
|
|
156
|
+
"aria-valuenow": F.value,
|
|
157
|
+
"aria-valuetext": `${Math.round(F.value)} 像素`,
|
|
158
|
+
onPointerdown: V,
|
|
159
|
+
onLostpointercapture: K,
|
|
160
|
+
onKeydown: Z,
|
|
161
|
+
onDblclick: X
|
|
162
|
+
}, null, 42, m)
|
|
163
|
+
], 6));
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
//#endregion
|
|
167
|
+
export { h as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingTable.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingTable/BingTable.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-0ac3c7de"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { nextTick as e, onBeforeUnmount as t, onMounted as n } from "vue";
|
|
2
|
+
//#region src/components/BingTable/BingTable.measurements.ts
|
|
3
|
+
var r = Symbol("bing-table-measurements");
|
|
4
|
+
function i(r, i) {
|
|
5
|
+
let a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), s, c, l, u = !1, d;
|
|
6
|
+
function f() {
|
|
7
|
+
if (l = void 0, u) return;
|
|
8
|
+
let e = [...o].filter((e) => a.has(e));
|
|
9
|
+
o.clear();
|
|
10
|
+
let t = e.map((e) => a.get(e)()), n = e.length ? i?.(e) : void 0;
|
|
11
|
+
t.forEach((e) => e?.()), n?.();
|
|
12
|
+
}
|
|
13
|
+
function p() {
|
|
14
|
+
u || l !== void 0 || !o.size || (typeof window.requestAnimationFrame == "function" ? l = window.requestAnimationFrame(f) : (l = -1, e(() => {
|
|
15
|
+
l === -1 && f();
|
|
16
|
+
})));
|
|
17
|
+
}
|
|
18
|
+
function m(e) {
|
|
19
|
+
u || (e ? a.has(e) && o.add(e) : a.forEach((e, t) => o.add(t)), p());
|
|
20
|
+
}
|
|
21
|
+
function h(e) {
|
|
22
|
+
for (let t of e) {
|
|
23
|
+
let e = t.target;
|
|
24
|
+
a.has(e) && o.add(e);
|
|
25
|
+
}
|
|
26
|
+
p();
|
|
27
|
+
}
|
|
28
|
+
function g(e) {
|
|
29
|
+
for (let t of e) {
|
|
30
|
+
let e = t.target instanceof Element ? t.target : t.target.parentElement;
|
|
31
|
+
if (!e || t.type === "attributes" && t.oldValue === e.getAttribute(t.attributeName)) continue;
|
|
32
|
+
let n = e.closest(".bing-table__cell-text");
|
|
33
|
+
n && a.has(n) ? o.add(n) : e.closest(".bing-table__row") && e.querySelectorAll(".bing-table__cell-text").forEach((e) => {
|
|
34
|
+
a.has(e) && o.add(e);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
p();
|
|
38
|
+
}
|
|
39
|
+
function _(e, t) {
|
|
40
|
+
return u ? () => {} : (a.set(e, t), typeof ResizeObserver < "u" && (s ??= new ResizeObserver(h), s.observe(e)), m(e), () => {
|
|
41
|
+
s?.unobserve(e), a.delete(e), o.delete(e);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
let v = () => m();
|
|
45
|
+
return n(() => {
|
|
46
|
+
typeof MutationObserver < "u" && r.value && (c = new MutationObserver(g), c.observe(r.value, {
|
|
47
|
+
subtree: !0,
|
|
48
|
+
childList: !0,
|
|
49
|
+
characterData: !0,
|
|
50
|
+
attributes: !0,
|
|
51
|
+
attributeOldValue: !0,
|
|
52
|
+
attributeFilter: [
|
|
53
|
+
"class",
|
|
54
|
+
"style",
|
|
55
|
+
"hidden",
|
|
56
|
+
"role",
|
|
57
|
+
"tabindex",
|
|
58
|
+
"contenteditable",
|
|
59
|
+
"href"
|
|
60
|
+
]
|
|
61
|
+
})), d = r.value?.ownerDocument.fonts, d?.addEventListener("loadingdone", v), d?.ready.then(() => {
|
|
62
|
+
u || v();
|
|
63
|
+
}), typeof ResizeObserver > "u" && window.addEventListener("resize", v);
|
|
64
|
+
}), t(() => {
|
|
65
|
+
u = !0, l !== void 0 && l !== -1 && window.cancelAnimationFrame(l), l = void 0, s?.disconnect(), c?.disconnect(), d?.removeEventListener("loadingdone", v), window.removeEventListener("resize", v), a.clear(), o.clear();
|
|
66
|
+
}), {
|
|
67
|
+
register: _,
|
|
68
|
+
invalidate: m
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
export { r as bingTableMeasurementsKey, i as createTableMeasurements };
|
|
@@ -77,16 +77,15 @@ declare const __VLS_base: import('vue').DefineComponent<BingTableProps, BingTabl
|
|
|
77
77
|
height: number | string;
|
|
78
78
|
maxHeight: number | string;
|
|
79
79
|
data: BingTableRow[];
|
|
80
|
-
size: import('./BingTable.types').BingTableSize;
|
|
81
80
|
loading: boolean;
|
|
82
81
|
ariaLabel: string;
|
|
82
|
+
page: number;
|
|
83
83
|
emptyText: string;
|
|
84
84
|
smoothScroll: import('../..').SmoothScrollValue;
|
|
85
85
|
virtual: import('./BingTable.types').BingTableVirtualMode;
|
|
86
86
|
virtualThreshold: number;
|
|
87
87
|
virtualOverscan: number;
|
|
88
88
|
selectable: boolean;
|
|
89
|
-
page: number;
|
|
90
89
|
defaultColumnWidths: Record<string, number>;
|
|
91
90
|
defaultColumnOrder: string[];
|
|
92
91
|
defaultHiddenColumnKeys: string[];
|