@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,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingSlider.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingSlider/BingSlider.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-e5c8b181"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { BingSliderProps, BingSliderExpose } from './BingSlider.types';
|
|
2
2
|
declare const __VLS_export: import('vue').DefineComponent<BingSliderProps, BingSliderExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
-
change: (value: number) => any;
|
|
4
3
|
blur: (event: FocusEvent) => any;
|
|
5
4
|
focus: (event: FocusEvent) => any;
|
|
5
|
+
change: (value: number) => any;
|
|
6
6
|
"update:modelValue": (value: number) => any;
|
|
7
7
|
}, string, import('vue').PublicProps, Readonly<BingSliderProps> & Readonly<{
|
|
8
|
-
onChange?: ((value: number) => any) | undefined;
|
|
9
8
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
10
9
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
10
|
+
onChange?: ((value: number) => any) | undefined;
|
|
11
11
|
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
12
12
|
}>, {
|
|
13
|
+
name: string;
|
|
14
|
+
status: import('..').BingControlStatus;
|
|
13
15
|
disabled: boolean;
|
|
14
16
|
id: string;
|
|
15
17
|
ariaLabel: string;
|
|
16
|
-
modelValue: number;
|
|
17
|
-
min: number;
|
|
18
18
|
max: number;
|
|
19
|
+
min: number;
|
|
19
20
|
step: number;
|
|
21
|
+
modelValue: number;
|
|
20
22
|
ariaDescribedby: string;
|
|
21
|
-
status: import('..').BingControlStatus;
|
|
22
|
-
name: string;
|
|
23
23
|
defaultValue: number;
|
|
24
24
|
ariaLabelledby: string;
|
|
25
25
|
formatValueText: (value: number) => string;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { useFormControl as e } from "../BingForm/useFormControl.js";
|
|
2
|
+
import { computed as t, createElementBlock as n, createElementVNode as r, defineComponent as i, nextTick as a, normalizeClass as o, normalizeStyle as s, openBlock as c, ref as l, unref as u, watch as d } from "vue";
|
|
3
|
+
//#region src/components/BingSlider/BingSlider.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var f = [
|
|
5
|
+
"id",
|
|
6
|
+
"name",
|
|
7
|
+
"min",
|
|
8
|
+
"max",
|
|
9
|
+
"step",
|
|
10
|
+
"value",
|
|
11
|
+
"disabled",
|
|
12
|
+
"aria-label",
|
|
13
|
+
"aria-labelledby",
|
|
14
|
+
"aria-describedby",
|
|
15
|
+
"aria-valuetext",
|
|
16
|
+
"aria-valuenow",
|
|
17
|
+
"aria-invalid"
|
|
18
|
+
], p = /* @__PURE__ */ i({
|
|
19
|
+
__name: "BingSlider",
|
|
20
|
+
props: {
|
|
21
|
+
id: { default: void 0 },
|
|
22
|
+
modelValue: { default: void 0 },
|
|
23
|
+
defaultValue: { default: 0 },
|
|
24
|
+
min: { default: 0 },
|
|
25
|
+
max: { default: 100 },
|
|
26
|
+
step: { default: 1 },
|
|
27
|
+
disabled: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: void 0
|
|
30
|
+
},
|
|
31
|
+
name: { default: void 0 },
|
|
32
|
+
status: { default: void 0 },
|
|
33
|
+
ariaLabel: { default: void 0 },
|
|
34
|
+
ariaLabelledby: { default: void 0 },
|
|
35
|
+
ariaDescribedby: { default: void 0 },
|
|
36
|
+
formatValueText: {
|
|
37
|
+
type: Function,
|
|
38
|
+
default: void 0
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
emits: [
|
|
42
|
+
"update:modelValue",
|
|
43
|
+
"change",
|
|
44
|
+
"focus",
|
|
45
|
+
"blur"
|
|
46
|
+
],
|
|
47
|
+
setup(i, { expose: p, emit: m }) {
|
|
48
|
+
let h = i, g = m, _ = l(null), v = l(h.defaultValue), { formItem: y, resolvedId: b, resolvedDisabled: x, resolvedStatus: S, resolvedAriaDescribedby: C } = e(h), w = t(() => Number.isFinite(h.min) ? h.min : 0), T = t(() => Math.max(w.value, Number.isFinite(h.max) ? h.max : 100)), E = t(() => Number.isFinite(h.step) && h.step > 0 ? h.step : 1);
|
|
49
|
+
function D(e) {
|
|
50
|
+
let t = w.value, n = Number.isFinite(e) ? e : t, r = Math.floor((T.value - t) / E.value + 1e-9), i = Math.min(r, Math.max(0, Math.round((n - t) / E.value)));
|
|
51
|
+
return Number((t + i * E.value).toPrecision(14));
|
|
52
|
+
}
|
|
53
|
+
let O = t(() => D(h.modelValue ?? v.value)), k = t(() => x.value || T.value === w.value), A = t(() => T.value === w.value ? 0 : (O.value - w.value) / (T.value - w.value) * 100), j = t(() => h.formatValueText?.(O.value)), M, N = O.value, P = !1, F = new Set([
|
|
54
|
+
"ArrowLeft",
|
|
55
|
+
"ArrowRight",
|
|
56
|
+
"ArrowUp",
|
|
57
|
+
"ArrowDown",
|
|
58
|
+
"Home",
|
|
59
|
+
"End",
|
|
60
|
+
"PageUp",
|
|
61
|
+
"PageDown"
|
|
62
|
+
]);
|
|
63
|
+
function I(e) {
|
|
64
|
+
let t = e.target;
|
|
65
|
+
if (k.value) {
|
|
66
|
+
t.value = String(O.value);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
let n = D(t.valueAsNumber);
|
|
70
|
+
M = n, h.modelValue === void 0 && (v.value = n), g("update:modelValue", n), a(() => {
|
|
71
|
+
_.value && (_.value.value = String(O.value));
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function L(e) {
|
|
75
|
+
M = void 0, !(k.value || e === N) && (N = e, g("change", e), y?.handleControlChange());
|
|
76
|
+
}
|
|
77
|
+
function R(e) {
|
|
78
|
+
let t = D(e.target.valueAsNumber);
|
|
79
|
+
P ? M = t : L(t);
|
|
80
|
+
}
|
|
81
|
+
function z(e) {
|
|
82
|
+
!k.value && F.has(e.key) && (P = !0);
|
|
83
|
+
}
|
|
84
|
+
function B(e) {
|
|
85
|
+
F.has(e.key) && (P = !1, M !== void 0 && L(M));
|
|
86
|
+
}
|
|
87
|
+
function V(e) {
|
|
88
|
+
P = !1, M !== void 0 && L(M), g("blur", e), y?.handleControlBlur();
|
|
89
|
+
}
|
|
90
|
+
return d(O, (e) => {
|
|
91
|
+
M === void 0 && (N = e);
|
|
92
|
+
}), d(k, (e) => {
|
|
93
|
+
e && (P = !1, M = void 0);
|
|
94
|
+
}), p({
|
|
95
|
+
get input() {
|
|
96
|
+
return _.value;
|
|
97
|
+
},
|
|
98
|
+
focus: () => _.value?.focus(),
|
|
99
|
+
blur: () => _.value?.blur()
|
|
100
|
+
}), (e, t) => (c(), n("div", {
|
|
101
|
+
class: o(["bing-slider", [`bing-slider--${u(S)}`, { "is-disabled": k.value }]]),
|
|
102
|
+
style: s({ "--bing-slider-progress": `${A.value}%` })
|
|
103
|
+
}, [r("input", {
|
|
104
|
+
id: u(b),
|
|
105
|
+
ref_key: "input",
|
|
106
|
+
ref: _,
|
|
107
|
+
type: "range",
|
|
108
|
+
name: i.name,
|
|
109
|
+
min: w.value,
|
|
110
|
+
max: T.value,
|
|
111
|
+
step: E.value,
|
|
112
|
+
value: O.value,
|
|
113
|
+
disabled: k.value,
|
|
114
|
+
"aria-label": i.ariaLabel,
|
|
115
|
+
"aria-labelledby": i.ariaLabelledby,
|
|
116
|
+
"aria-describedby": u(C),
|
|
117
|
+
"aria-valuetext": j.value,
|
|
118
|
+
"aria-valuenow": O.value,
|
|
119
|
+
"aria-invalid": u(S) === "error" || void 0,
|
|
120
|
+
onInput: I,
|
|
121
|
+
onChange: R,
|
|
122
|
+
onKeydown: z,
|
|
123
|
+
onKeyup: B,
|
|
124
|
+
onFocus: t[0] ||= (e) => g("focus", e),
|
|
125
|
+
onBlur: V
|
|
126
|
+
}, null, 40, f)], 6));
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
//#endregion
|
|
130
|
+
export { p as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingSortableList.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingSortableList/BingSortableList.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-4933069b"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
package/dist/components/BingSortableList/BingSortableList.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { useReducedMotion as e } from "../../motion/reducedMotion.js";
|
|
2
|
+
import t from "./BingSortableListItem.js";
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, mergeProps as l, nextTick as ee, normalizeProps as te, onBeforeUnmount as ne, openBlock as u, ref as d, renderList as re, renderSlot as f, unref as p, useAttrs as m, watch as h, withCtx as g } from "vue";
|
|
4
|
+
import { gsap as _ } from "gsap";
|
|
5
|
+
import { DragDropProvider as ie, DragOverlay as v } from "@dnd-kit/vue";
|
|
6
|
+
import { Feedback as y, PointerActivationConstraints as ae, PointerSensor as b } from "@dnd-kit/dom";
|
|
7
|
+
import { isSortable as x } from "@dnd-kit/vue/sortable";
|
|
8
|
+
//#region src/components/BingSortableList/BingSortableList.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var oe = ["aria-label"], S = /* @__PURE__ */ c({
|
|
10
|
+
inheritAttrs: !1,
|
|
11
|
+
__name: "BingSortableList",
|
|
12
|
+
props: {
|
|
13
|
+
items: { default: () => [] },
|
|
14
|
+
order: { default: void 0 },
|
|
15
|
+
itemKey: {
|
|
16
|
+
type: Function,
|
|
17
|
+
default: "id"
|
|
18
|
+
},
|
|
19
|
+
itemDisabled: {
|
|
20
|
+
type: Function,
|
|
21
|
+
default: void 0
|
|
22
|
+
},
|
|
23
|
+
disabledKeys: { default: () => [] },
|
|
24
|
+
axis: { default: "vertical" },
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
keyboard: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !0
|
|
32
|
+
},
|
|
33
|
+
flip: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
},
|
|
37
|
+
reorderMode: { default: "drop" },
|
|
38
|
+
duration: { default: .26 },
|
|
39
|
+
settleDuration: { default: .16 },
|
|
40
|
+
dragThreshold: { default: 4 },
|
|
41
|
+
dragOverlay: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: !1
|
|
44
|
+
},
|
|
45
|
+
ariaLabel: { default: "可排序列表" },
|
|
46
|
+
handleAriaLabel: {
|
|
47
|
+
type: [String, Function],
|
|
48
|
+
default: "调整顺序"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
emits: [
|
|
52
|
+
"update:order",
|
|
53
|
+
"reorder",
|
|
54
|
+
"drag-start",
|
|
55
|
+
"drag",
|
|
56
|
+
"drag-end"
|
|
57
|
+
],
|
|
58
|
+
setup(c, { emit: S }) {
|
|
59
|
+
let C = e(), w = c, T = S, E = m(), D = d(null), O = d([]), k = d(null), A = d(null), j = d(null), M = null, N = [], se = r(() => {
|
|
60
|
+
let e = Math.max(0, w.dragThreshold);
|
|
61
|
+
return e > 0 ? [b.configure({ activationConstraints: [new ae.Distance({ value: e })] })] : [b];
|
|
62
|
+
}), P = r(() => w.settleDuration > 0 && !C() ? {
|
|
63
|
+
duration: Math.max(0, w.settleDuration * 1e3),
|
|
64
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
65
|
+
} : null), ce = r(() => (e) => e.map((e) => e === y ? y.configure({ dropAnimation: P.value }) : e)), le = r(() => [
|
|
66
|
+
"bing-sortable-list",
|
|
67
|
+
`bing-sortable-list--${w.axis}`,
|
|
68
|
+
{
|
|
69
|
+
"is-disabled": w.disabled,
|
|
70
|
+
"is-dragging": k.value !== null
|
|
71
|
+
}
|
|
72
|
+
]), ue = r(() => {
|
|
73
|
+
let { class: e, style: t, ...n } = E;
|
|
74
|
+
return n;
|
|
75
|
+
}), F = r(() => w.items.map((e, t) => G(e, t))), I = r(() => K(w.order ?? O.value)), L = r(() => j.value ?? I.value), R = r(() => {
|
|
76
|
+
let e = /* @__PURE__ */ new Map();
|
|
77
|
+
return w.items.forEach((t, n) => {
|
|
78
|
+
let r = G(t, n);
|
|
79
|
+
e.set(r, {
|
|
80
|
+
item: t,
|
|
81
|
+
key: r,
|
|
82
|
+
sourceIndex: n,
|
|
83
|
+
disabled: pe(t, n, r)
|
|
84
|
+
});
|
|
85
|
+
}), L.value.map((t) => e.get(t)).filter((e) => !!e);
|
|
86
|
+
});
|
|
87
|
+
h(F, () => {
|
|
88
|
+
O.value = K(w.order ?? O.value);
|
|
89
|
+
}, { immediate: !0 });
|
|
90
|
+
function z(e, t, n) {
|
|
91
|
+
return Math.min(n, Math.max(t, e));
|
|
92
|
+
}
|
|
93
|
+
function B(e, t) {
|
|
94
|
+
return e.length === t.length && e.every((e, n) => e === t[n]);
|
|
95
|
+
}
|
|
96
|
+
function V(e) {
|
|
97
|
+
return JSON.stringify(e);
|
|
98
|
+
}
|
|
99
|
+
function H() {
|
|
100
|
+
let e = D.value;
|
|
101
|
+
return e ? Array.from(e.children).filter((e) => e instanceof HTMLElement && !!e.dataset.bingSortableKey) : [];
|
|
102
|
+
}
|
|
103
|
+
function de() {
|
|
104
|
+
let e = /* @__PURE__ */ new Map();
|
|
105
|
+
return H().forEach((t) => {
|
|
106
|
+
let n = t.dataset.bingSortableKey;
|
|
107
|
+
n && e.set(n, t.getBoundingClientRect());
|
|
108
|
+
}), e;
|
|
109
|
+
}
|
|
110
|
+
function U(e = !0) {
|
|
111
|
+
N.length && (_.killTweensOf(N), e && _.set(N, { clearProps: "transform" }), N = []);
|
|
112
|
+
}
|
|
113
|
+
async function fe(e) {
|
|
114
|
+
if (!w.flip || w.duration <= 0 || C()) return;
|
|
115
|
+
await ee();
|
|
116
|
+
let t = /* @__PURE__ */ new WeakMap(), n = H().filter((n) => {
|
|
117
|
+
let r = n.dataset.bingSortableKey, i = r ? e.get(r) : void 0;
|
|
118
|
+
if (!i) return !1;
|
|
119
|
+
let a = n.getBoundingClientRect(), o = i.left - a.left, s = i.top - a.top, c = Math.abs(o) > .5 || Math.abs(s) > .5;
|
|
120
|
+
return c && t.set(n, {
|
|
121
|
+
x: o,
|
|
122
|
+
y: s
|
|
123
|
+
}), c;
|
|
124
|
+
});
|
|
125
|
+
n.length && (U(), N = n, _.fromTo(n, {
|
|
126
|
+
x: (e, n) => t.get(n)?.x ?? 0,
|
|
127
|
+
y: (e, n) => t.get(n)?.y ?? 0
|
|
128
|
+
}, {
|
|
129
|
+
x: 0,
|
|
130
|
+
y: 0,
|
|
131
|
+
duration: Math.max(0, w.duration),
|
|
132
|
+
ease: "power3.out",
|
|
133
|
+
stagger: {
|
|
134
|
+
each: .012,
|
|
135
|
+
from: "start"
|
|
136
|
+
},
|
|
137
|
+
overwrite: !0,
|
|
138
|
+
clearProps: "transform",
|
|
139
|
+
onComplete: () => {
|
|
140
|
+
N = [];
|
|
141
|
+
}
|
|
142
|
+
}));
|
|
143
|
+
}
|
|
144
|
+
function W(e) {
|
|
145
|
+
return typeof e == "string" || typeof e == "number";
|
|
146
|
+
}
|
|
147
|
+
function G(e, t) {
|
|
148
|
+
if (typeof w.itemKey == "function") return w.itemKey(e, t);
|
|
149
|
+
let n = e?.[w.itemKey];
|
|
150
|
+
return W(n) ? n : t;
|
|
151
|
+
}
|
|
152
|
+
function pe(e, t, n) {
|
|
153
|
+
return w.disabledKeys.includes(n) ? !0 : w.itemDisabled ? typeof w.itemDisabled == "function" ? w.itemDisabled(e, t) : !!e?.[w.itemDisabled] : !1;
|
|
154
|
+
}
|
|
155
|
+
function K(e) {
|
|
156
|
+
let t = F.value, n = new Set(t), r = e.filter((t, r) => n.has(t) && e.indexOf(t) === r), i = t.filter((e) => !r.includes(e));
|
|
157
|
+
return [...r, ...i];
|
|
158
|
+
}
|
|
159
|
+
function q(e, t) {
|
|
160
|
+
return typeof w.handleAriaLabel == "function" ? w.handleAriaLabel(e, t) : w.handleAriaLabel;
|
|
161
|
+
}
|
|
162
|
+
function J(e) {
|
|
163
|
+
return R.value.find((t) => t.key === e);
|
|
164
|
+
}
|
|
165
|
+
function me(e) {
|
|
166
|
+
let t = J(e), n = L.value.indexOf(e);
|
|
167
|
+
return {
|
|
168
|
+
item: t?.item,
|
|
169
|
+
key: e,
|
|
170
|
+
index: n,
|
|
171
|
+
active: !0,
|
|
172
|
+
dragging: !0,
|
|
173
|
+
disabled: t?.disabled ?? !1,
|
|
174
|
+
handleProps: {
|
|
175
|
+
ref: () => {},
|
|
176
|
+
role: "button",
|
|
177
|
+
tabindex: -1,
|
|
178
|
+
"aria-label": q(t?.item, n),
|
|
179
|
+
"aria-disabled": "true",
|
|
180
|
+
onKeydown: () => {}
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
function Y(e) {
|
|
185
|
+
return e.nativeEvent instanceof PointerEvent ? e.nativeEvent : void 0;
|
|
186
|
+
}
|
|
187
|
+
function X(e, t, n) {
|
|
188
|
+
let r = [...e], [i] = r.splice(t, 1);
|
|
189
|
+
return i === void 0 || r.splice(z(n, 0, r.length), 0, i), r;
|
|
190
|
+
}
|
|
191
|
+
function Z(e, t, n, r = I.value) {
|
|
192
|
+
let i = r.indexOf(e);
|
|
193
|
+
return K(X(r, i >= 0 ? i : t, n));
|
|
194
|
+
}
|
|
195
|
+
function Q(e, t, n = I.value, r = {}) {
|
|
196
|
+
let i = K(e);
|
|
197
|
+
return B(n, i) ? !1 : (r.skipFlip && (M = V(i)), w.order === void 0 && (O.value = i), T("update:order", i), T("reorder", {
|
|
198
|
+
...t,
|
|
199
|
+
order: i
|
|
200
|
+
}), !0);
|
|
201
|
+
}
|
|
202
|
+
function $(e, t, n, r) {
|
|
203
|
+
let i = J(e);
|
|
204
|
+
return i ? {
|
|
205
|
+
key: e,
|
|
206
|
+
item: i.item,
|
|
207
|
+
index: t,
|
|
208
|
+
order: n,
|
|
209
|
+
event: r
|
|
210
|
+
} : null;
|
|
211
|
+
}
|
|
212
|
+
function he(e) {
|
|
213
|
+
let { source: t } = e.operation, n = Y(e);
|
|
214
|
+
if (!n || !x(t) || !W(t.id)) return;
|
|
215
|
+
let r = J(t.id);
|
|
216
|
+
r && (k.value = t.id, A.value = t.index, T("drag-start", {
|
|
217
|
+
key: t.id,
|
|
218
|
+
item: r.item,
|
|
219
|
+
index: t.index,
|
|
220
|
+
order: L.value,
|
|
221
|
+
event: n
|
|
222
|
+
}));
|
|
223
|
+
}
|
|
224
|
+
function ge(e) {
|
|
225
|
+
let { source: t } = e.operation, n = Y(e);
|
|
226
|
+
if (!n || !x(t) || !W(t.id)) return;
|
|
227
|
+
let r = A.value ?? t.initialIndex, i = Z(t.id, r, t.index);
|
|
228
|
+
j.value = i;
|
|
229
|
+
let a = $(t.id, t.index, i, n);
|
|
230
|
+
if (a && T("drag", a), w.reorderMode === "live") {
|
|
231
|
+
let e = J(t.id);
|
|
232
|
+
e && Q(i, {
|
|
233
|
+
key: t.id,
|
|
234
|
+
item: e.item,
|
|
235
|
+
from: r,
|
|
236
|
+
to: t.index,
|
|
237
|
+
event: n
|
|
238
|
+
}, I.value, { skipFlip: !0 });
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
function _e(e) {
|
|
242
|
+
let { source: t } = e.operation, n = Y(e), r = k.value, i = A.value;
|
|
243
|
+
if (k.value = null, A.value = null, j.value = null, !n || !x(t) || !W(t.id)) return;
|
|
244
|
+
let a = J(t.id);
|
|
245
|
+
if (!a) return;
|
|
246
|
+
let o = i ?? t.initialIndex, s = e.canceled ? I.value.indexOf(t.id) : t.index, c = Z(t.id, o, s);
|
|
247
|
+
!e.canceled && w.reorderMode === "drop" && Q(c, {
|
|
248
|
+
key: t.id,
|
|
249
|
+
item: a.item,
|
|
250
|
+
from: o,
|
|
251
|
+
to: s,
|
|
252
|
+
event: n
|
|
253
|
+
}, I.value, { skipFlip: !0 });
|
|
254
|
+
let l = $(t.id, s, !e.canceled && w.reorderMode === "drop" ? K(c) : I.value, n);
|
|
255
|
+
l && r === t.id && T("drag-end", l);
|
|
256
|
+
}
|
|
257
|
+
function ve(e, t) {
|
|
258
|
+
if (w.disabled || e.disabled || !w.keyboard) return;
|
|
259
|
+
let n = t.key, r = null, i = L.value.indexOf(e.key);
|
|
260
|
+
w.axis === "vertical" ? n === "ArrowUp" ? r = i - 1 : n === "ArrowDown" && (r = i + 1) : n === "ArrowLeft" ? r = i - 1 : n === "ArrowRight" && (r = i + 1), n === "Home" ? r = 0 : n === "End" && (r = L.value.length - 1), !(r === null || i < 0) && (t.preventDefault(), Q(X(L.value, i, z(r, 0, L.value.length - 1)), {
|
|
261
|
+
key: e.key,
|
|
262
|
+
item: e.item,
|
|
263
|
+
from: i,
|
|
264
|
+
to: z(r, 0, L.value.length - 1),
|
|
265
|
+
event: t
|
|
266
|
+
}));
|
|
267
|
+
}
|
|
268
|
+
return h(I, (e, t) => {
|
|
269
|
+
if (!t.length || B(e, t)) return;
|
|
270
|
+
let n = V(e);
|
|
271
|
+
if (M === n) {
|
|
272
|
+
M = null;
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
M = null, fe(de());
|
|
276
|
+
}, { flush: "pre" }), ne(() => {
|
|
277
|
+
U(!1);
|
|
278
|
+
}), (e, r) => (u(), i(p(ie), {
|
|
279
|
+
sensors: se.value,
|
|
280
|
+
plugins: ce.value,
|
|
281
|
+
onDragStart: he,
|
|
282
|
+
onDragMove: ge,
|
|
283
|
+
onDragEnd: _e
|
|
284
|
+
}, {
|
|
285
|
+
default: g(() => [s("div", l({
|
|
286
|
+
ref_key: "rootRef",
|
|
287
|
+
ref: D
|
|
288
|
+
}, ue.value, {
|
|
289
|
+
class: [le.value, p(E).class],
|
|
290
|
+
style: p(E).style,
|
|
291
|
+
role: "list",
|
|
292
|
+
"aria-label": c.ariaLabel
|
|
293
|
+
}), [(u(!0), o(n, null, re(R.value, (n, r) => (u(), i(t, {
|
|
294
|
+
key: n.key,
|
|
295
|
+
item: n.item,
|
|
296
|
+
"item-key": n.key,
|
|
297
|
+
index: r,
|
|
298
|
+
"active-key": k.value,
|
|
299
|
+
disabled: c.disabled || n.disabled,
|
|
300
|
+
axis: c.axis,
|
|
301
|
+
flip: c.flip,
|
|
302
|
+
duration: c.duration,
|
|
303
|
+
"handle-label": q(n.item, r),
|
|
304
|
+
onKeyboardMove: (e) => ve(n, e)
|
|
305
|
+
}, {
|
|
306
|
+
default: g((t) => [f(e.$slots, "default", l({ ref_for: !0 }, t), void 0, !0)]),
|
|
307
|
+
_: 3
|
|
308
|
+
}, 8, [
|
|
309
|
+
"item",
|
|
310
|
+
"item-key",
|
|
311
|
+
"index",
|
|
312
|
+
"active-key",
|
|
313
|
+
"disabled",
|
|
314
|
+
"axis",
|
|
315
|
+
"flip",
|
|
316
|
+
"duration",
|
|
317
|
+
"handle-label",
|
|
318
|
+
"onKeyboardMove"
|
|
319
|
+
]))), 128)), c.dragOverlay ? (u(), i(p(v), {
|
|
320
|
+
key: 0,
|
|
321
|
+
class: "bing-sortable-list__overlay",
|
|
322
|
+
"drop-animation": P.value,
|
|
323
|
+
"aria-hidden": "true",
|
|
324
|
+
inert: ""
|
|
325
|
+
}, {
|
|
326
|
+
default: g(({ source: t }) => [t && J(t.id) ? f(e.$slots, "default", te(l({ key: 0 }, me(t.id))), void 0, !0) : a("", !0)]),
|
|
327
|
+
_: 3
|
|
328
|
+
}, 8, ["drop-animation"])) : a("", !0)], 16, oe)]),
|
|
329
|
+
_: 3
|
|
330
|
+
}, 8, ["sensors", "plugins"]));
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
//#endregion
|
|
334
|
+
export { S as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingSortableListItem.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingSortableList/BingSortableListItem.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-d344e4e9"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
package/dist/components/BingSortableList/BingSortableListItem.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { computed as e, createElementBlock as t, defineComponent as n, normalizeClass as r, openBlock as i, ref as a, renderSlot as o } from "vue";
|
|
2
|
+
import { useSortable as s } from "@dnd-kit/vue/sortable";
|
|
3
|
+
//#region src/components/BingSortableList/BingSortableListItem.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var c = ["aria-grabbed", "data-bing-sortable-key"], l = /* @__PURE__ */ n({
|
|
5
|
+
__name: "BingSortableListItem",
|
|
6
|
+
props: {
|
|
7
|
+
item: {},
|
|
8
|
+
itemKey: {},
|
|
9
|
+
index: {},
|
|
10
|
+
activeKey: {},
|
|
11
|
+
disabled: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !1
|
|
14
|
+
},
|
|
15
|
+
axis: { default: "vertical" },
|
|
16
|
+
flip: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !0
|
|
19
|
+
},
|
|
20
|
+
duration: { default: .26 },
|
|
21
|
+
handleLabel: {}
|
|
22
|
+
},
|
|
23
|
+
emits: ["keyboard-move"],
|
|
24
|
+
setup(n, { emit: l }) {
|
|
25
|
+
let u = n, d = l, f = a(null), p = a(null), m = e(() => u.flip ? {
|
|
26
|
+
duration: Math.max(0, u.duration * 1e3),
|
|
27
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
28
|
+
idle: !1
|
|
29
|
+
} : null), { isDragging: h, isDropping: g, isDragSource: _ } = s({
|
|
30
|
+
id: e(() => u.itemKey),
|
|
31
|
+
index: e(() => u.index),
|
|
32
|
+
element: f,
|
|
33
|
+
handle: p,
|
|
34
|
+
disabled: e(() => u.disabled),
|
|
35
|
+
transition: m
|
|
36
|
+
}), v = e(() => h.value || g.value || _.value), y = e(() => u.activeKey === u.itemKey), b = e(() => ({
|
|
37
|
+
"is-active": y.value,
|
|
38
|
+
"is-dragging": v.value,
|
|
39
|
+
"is-disabled": u.disabled
|
|
40
|
+
}));
|
|
41
|
+
function x(e) {
|
|
42
|
+
if (e && "$el" in e) {
|
|
43
|
+
p.value = e.$el;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
p.value = e;
|
|
47
|
+
}
|
|
48
|
+
let S = e(() => ({
|
|
49
|
+
ref: x,
|
|
50
|
+
class: ["bing-sortable-list__handle", { "is-disabled": u.disabled }],
|
|
51
|
+
role: "button",
|
|
52
|
+
tabindex: u.disabled ? -1 : 0,
|
|
53
|
+
"aria-label": u.handleLabel,
|
|
54
|
+
"aria-disabled": u.disabled ? "true" : "false",
|
|
55
|
+
onKeydown: (e) => d("keyboard-move", e)
|
|
56
|
+
}));
|
|
57
|
+
return (e, a) => (i(), t("div", {
|
|
58
|
+
ref_key: "elementRef",
|
|
59
|
+
ref: f,
|
|
60
|
+
class: r(["bing-sortable-list__item", b.value]),
|
|
61
|
+
role: "listitem",
|
|
62
|
+
"aria-grabbed": y.value ? "true" : "false",
|
|
63
|
+
"data-bing-sortable-key": String(n.itemKey)
|
|
64
|
+
}, [o(e.$slots, "default", {
|
|
65
|
+
item: n.item,
|
|
66
|
+
key: n.itemKey,
|
|
67
|
+
index: n.index,
|
|
68
|
+
active: y.value,
|
|
69
|
+
dragging: v.value,
|
|
70
|
+
disabled: n.disabled,
|
|
71
|
+
handleProps: S.value
|
|
72
|
+
}, void 0, !0)], 10, c));
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
//#endregion
|
|
76
|
+
export { l as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingSplitPane.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingSplitPane/BingSplitPane.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-7a1d7101"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|