@moubing/bing-ui 0.11.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +300 -171
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/bing-ui.css +1 -1
- package/dist/components/BingAnimatedText/BingAnimatedText.js +7 -0
- package/dist/components/BingAnimatedText/BingAnimatedText.vue_vue_type_script_setup_true_lang.js +194 -0
- package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.js +7 -0
- package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/BingAutocomplete/BingAutocomplete.js +7 -0
- package/dist/components/BingAutocomplete/BingAutocomplete.vue.d.ts +4 -4
- package/dist/components/BingAutocomplete/BingAutocomplete.vue_vue_type_script_setup_true_lang.js +560 -0
- package/dist/components/BingButton/BingButton.js +7 -0
- package/dist/components/BingButton/BingButton.vue.d.ts +2 -2
- package/dist/components/BingButton/BingButton.vue_vue_type_script_setup_true_lang.js +200 -0
- package/dist/components/BingCard/BingCard.js +7 -0
- package/dist/components/BingCard/BingCard.vue_vue_type_script_setup_true_lang.js +481 -0
- package/dist/components/BingCarouselTransition/BingCarouselTransition.js +7 -0
- package/dist/components/BingCarouselTransition/BingCarouselTransition.vue_vue_type_script_setup_true_lang.js +174 -0
- package/dist/components/BingCheckbox/BingCheckbox.js +7 -0
- package/dist/components/BingCheckbox/BingCheckbox.vue.d.ts +4 -4
- package/dist/components/BingCheckbox/BingCheckbox.vue_vue_type_script_setup_true_lang.js +233 -0
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.context.js +4 -0
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.js +7 -0
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/components/BingCodeBlock/BingCodeBlock.highlight.js +78 -0
- package/dist/components/BingCodeBlock/BingCodeBlock.js +7 -0
- package/dist/components/BingCodeBlock/BingCodeBlock.vue_vue_type_script_setup_true_lang.js +347 -0
- package/dist/components/BingColorPicker/BingColorPicker.js +7 -0
- package/dist/components/BingColorPicker/BingColorPicker.utils.d.ts +70 -0
- package/dist/components/BingColorPicker/BingColorPicker.utils.js +265 -0
- package/dist/components/BingColorPicker/BingColorPicker.vue.d.ts +7 -7
- package/dist/components/BingColorPicker/BingColorPicker.vue_vue_type_script_setup_true_lang.js +540 -0
- package/dist/components/BingColorPicker/BingColorPickerFormatEditor.js +7 -0
- package/dist/components/BingColorPicker/BingColorPickerFormatEditor.vue.d.ts +27 -0
- package/dist/components/BingColorPicker/BingColorPickerFormatEditor.vue_vue_type_script_setup_true_lang.js +142 -0
- package/dist/components/BingColorPicker/BingColorPickerSpectrum.js +7 -0
- package/dist/components/BingColorPicker/BingColorPickerSpectrum.vue.d.ts +26 -0
- package/dist/components/BingColorPicker/BingColorPickerSpectrum.vue_vue_type_script_setup_true_lang.js +168 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.js +5 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.types.d.ts +5 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.vue.d.ts +18 -0
- package/dist/components/BingConfigProvider/BingConfigProvider.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/components/BingConfigProvider/index.d.ts +3 -0
- package/dist/components/BingCursor/BingCursor.controller.js +240 -0
- package/dist/components/BingCursor/BingCursor.js +7 -0
- package/dist/components/BingCursor/BingCursor.native.js +20 -0
- package/dist/components/BingCursor/BingCursor.presets.js +60 -0
- package/dist/components/BingCursor/BingCursor.shapes.js +83 -0
- package/dist/components/BingCursor/BingCursor.styleSource.js +83 -0
- package/dist/components/BingCursor/BingCursor.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/BingDatePicker/BingDatePicker.js +7 -0
- package/dist/components/BingDatePicker/BingDatePicker.utils.d.ts +26 -0
- package/dist/components/BingDatePicker/BingDatePicker.utils.js +137 -0
- package/dist/components/BingDatePicker/BingDatePicker.vue.d.ts +14 -14
- package/dist/components/BingDatePicker/BingDatePicker.vue_vue_type_script_setup_true_lang.js +804 -0
- package/dist/components/BingDatePicker/BingDatePickerCalendar.js +7 -0
- package/dist/components/BingDatePicker/BingDatePickerCalendar.vue.d.ts +37 -0
- package/dist/components/BingDatePicker/BingDatePickerCalendar.vue_vue_type_script_setup_true_lang.js +248 -0
- package/dist/components/BingDatePicker/BingDatePickerTimePanel.js +7 -0
- package/dist/components/BingDatePicker/BingDatePickerTimePanel.vue.d.ts +26 -0
- package/dist/components/BingDatePicker/BingDatePickerTimePanel.vue_vue_type_script_setup_true_lang.js +97 -0
- package/dist/components/BingDeckTransition/BingDeckTransition.js +7 -0
- package/dist/components/BingDeckTransition/BingDeckTransition.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/components/BingDialog/BingDialog.js +7 -0
- package/dist/components/BingDialog/BingDialog.vue.d.ts +4 -5
- package/dist/components/BingDialog/BingDialog.vue_vue_type_script_setup_true_lang.js +558 -0
- package/dist/components/BingDropDown/BingDropDown.context.js +4 -0
- package/dist/components/BingDropDown/BingDropDown.js +7 -0
- package/dist/components/BingDropDown/BingDropDown.vue.d.ts +1 -2
- package/dist/components/BingDropDown/BingDropDown.vue_vue_type_script_setup_true_lang.js +649 -0
- package/dist/components/BingDropDown/BingDropDownItem.js +7 -0
- package/dist/components/BingDropDown/BingDropDownItem.vue.d.ts +1 -1
- package/dist/components/BingDropDown/BingDropDownItem.vue_vue_type_script_setup_true_lang.js +308 -0
- package/dist/components/BingFilePreview/BingFilePreview.js +7 -0
- package/dist/components/BingFilePreview/BingFilePreview.vue.d.ts +4 -5
- package/dist/components/BingFilePreview/BingFilePreview.vue_vue_type_script_setup_true_lang.js +589 -0
- package/dist/components/BingForm/BingForm.context.js +7 -0
- package/dist/components/BingForm/BingForm.js +7 -0
- package/dist/components/BingForm/BingForm.vue.d.ts +0 -1
- package/dist/components/BingForm/BingForm.vue_vue_type_script_setup_true_lang.js +300 -0
- package/dist/components/BingForm/formFocus.js +13 -0
- package/dist/components/BingForm/formTabOrder.js +27 -0
- package/dist/components/BingForm/useFormControl.d.ts +1 -1
- package/dist/components/BingForm/useFormControl.js +24 -0
- package/dist/components/BingForm/useFormNextHint.js +135 -0
- package/dist/components/BingFormItem/BingFormItem.js +7 -0
- package/dist/components/BingFormItem/BingFormItem.vue.d.ts +1 -1
- package/dist/components/BingFormItem/BingFormItem.vue_vue_type_script_setup_true_lang.js +252 -0
- package/dist/components/BingIcon/BingIcon.js +7 -0
- package/dist/components/BingIcon/BingIcon.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/BingImage/BingImage.js +7 -0
- package/dist/components/BingImage/BingImage.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/BingImagePreview/BingImagePreview.js +7 -0
- package/dist/components/BingImagePreview/BingImagePreview.vue.d.ts +4 -5
- package/dist/components/BingImagePreview/BingImagePreview.vue_vue_type_script_setup_true_lang.js +699 -0
- package/dist/components/BingInput/BingInput.js +7 -0
- package/dist/components/BingInput/BingInput.vue.d.ts +6 -6
- package/dist/components/BingInput/BingInput.vue_vue_type_script_setup_true_lang.js +311 -0
- package/dist/components/BingRadio/BingRadio.js +7 -0
- package/dist/components/BingRadio/BingRadio.vue.d.ts +4 -4
- package/dist/components/BingRadio/BingRadio.vue_vue_type_script_setup_true_lang.js +170 -0
- package/dist/components/BingRadioGroup/BingRadioGroup.context.js +4 -0
- package/dist/components/BingRadioGroup/BingRadioGroup.js +7 -0
- package/dist/components/BingRadioGroup/BingRadioGroup.vue.d.ts +4 -4
- package/dist/components/BingRadioGroup/BingRadioGroup.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/BingResizable/BingResizable.js +7 -0
- package/dist/components/BingResizable/BingResizable.vue.d.ts +1 -1
- package/dist/components/BingResizable/BingResizable.vue_vue_type_script_setup_true_lang.js +555 -0
- package/dist/components/BingScrollbar/BingScrollbar.js +7 -0
- package/dist/components/BingScrollbar/BingScrollbar.vue.d.ts +2 -2
- package/dist/components/BingScrollbar/BingScrollbar.vue_vue_type_script_setup_true_lang.js +398 -0
- package/dist/components/BingSelect/BingSelect.js +7 -0
- package/dist/components/BingSelect/BingSelect.vue.d.ts +7 -7
- package/dist/components/BingSelect/BingSelect.vue_vue_type_script_setup_true_lang.js +1066 -0
- package/dist/components/BingSlider/BingSlider.js +7 -0
- package/dist/components/BingSlider/BingSlider.vue.d.ts +6 -6
- package/dist/components/BingSlider/BingSlider.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/components/BingSortableList/BingSortableList.js +7 -0
- package/dist/components/BingSortableList/BingSortableList.vue_vue_type_script_setup_true_lang.js +334 -0
- package/dist/components/BingSortableList/BingSortableListItem.js +7 -0
- package/dist/components/BingSortableList/BingSortableListItem.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/components/BingSplitPane/BingSplitPane.js +7 -0
- package/dist/components/BingSplitPane/BingSplitPane.vue_vue_type_script_setup_true_lang.js +167 -0
- package/dist/components/BingTable/BingTable.js +7 -0
- package/dist/components/BingTable/BingTable.measurements.js +72 -0
- package/dist/components/BingTable/BingTable.vue.d.ts +1 -2
- package/dist/components/BingTable/BingTable.vue_vue_type_script_setup_true_lang.js +1416 -0
- package/dist/components/BingTable/BingTableCellValue.js +7 -0
- package/dist/components/BingTable/BingTableCellValue.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/components/BingTable/BingTableHeaderCell.js +5 -0
- package/dist/components/BingTable/BingTableHeaderCell.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/components/BingTable/BingTableHeaderContent.js +7 -0
- package/dist/components/BingTable/BingTableHeaderContent.vue_vue_type_script_setup_true_lang.js +110 -0
- package/dist/components/BingTable/useTableColumns.js +126 -0
- package/dist/components/BingTableColumnControls/BingTableColumnControls.js +7 -0
- package/dist/components/BingTableColumnControls/BingTableColumnControls.vue.d.ts +1 -1
- package/dist/components/BingTableColumnControls/BingTableColumnControls.vue_vue_type_script_setup_true_lang.js +251 -0
- package/dist/components/BingTabs/BingTabs.js +7 -0
- package/dist/components/BingTabs/BingTabs.vue.d.ts +2 -3
- package/dist/components/BingTabs/BingTabs.vue_vue_type_script_setup_true_lang.js +320 -0
- package/dist/components/BingTag/BingTag.js +7 -0
- package/dist/components/BingTag/BingTag.vue.d.ts +0 -1
- package/dist/components/BingTag/BingTag.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/components/BingTextarea/BingTextarea.js +7 -0
- package/dist/components/BingTextarea/BingTextarea.vue.d.ts +6 -6
- package/dist/components/BingTextarea/BingTextarea.vue_vue_type_script_setup_true_lang.js +243 -0
- package/dist/components/BingToast/BingToast.js +7 -0
- package/dist/components/BingToast/BingToast.service.js +132 -0
- package/dist/components/BingToast/BingToast.types.d.ts +1 -1
- package/dist/components/BingToast/BingToast.types.js +19 -0
- package/dist/components/BingToast/BingToast.vue.d.ts +0 -1
- package/dist/components/BingToast/BingToast.vue_vue_type_script_setup_true_lang.js +307 -0
- package/dist/components/BingTooltip/BingTooltip.js +7 -0
- package/dist/components/BingTooltip/BingTooltip.shared.js +14 -0
- package/dist/components/BingTooltip/BingTooltip.vue.d.ts +4 -5
- package/dist/components/BingTooltip/BingTooltip.vue_vue_type_script_setup_true_lang.js +572 -0
- package/dist/components/BingTreeSelect/BingTreeSelect.js +7 -0
- package/dist/components/BingTreeSelect/BingTreeSelect.vue.d.ts +7 -7
- package/dist/components/BingTreeSelect/BingTreeSelect.vue_vue_type_script_setup_true_lang.js +1274 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/icons/LICENSE-lucide.txt +39 -0
- package/dist/icons/createIcon.d.ts +8 -0
- package/dist/icons/createIcon.js +36 -0
- package/dist/icons/icons.d.ts +51 -0
- package/dist/icons/icons.js +252 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/index.js +48 -0
- package/dist/motion/clickParticles.d.ts +1 -1
- package/dist/motion/clickParticles2.js +66 -0
- package/dist/motion/index.d.ts +1 -1
- package/dist/motion/index.js +17 -0
- package/dist/motion/liquidHover.js +36 -0
- package/dist/motion/optionDetailMotion.d.ts +7 -1
- package/dist/motion/optionDetailMotion.js +74 -0
- package/dist/motion/panelMotion.js +19 -0
- package/dist/motion/reducedMotion.d.ts +16 -0
- package/dist/motion/reducedMotion.js +28 -0
- package/dist/motion/selectPanelMotion.js +115 -0
- package/dist/motion/smoothScroll.d.ts +2 -0
- package/dist/motion/smoothScroll.js +276 -0
- package/dist/motion/useClickFeedback.js +47 -0
- package/dist/motion/useTextControlCaret.js +136 -0
- package/dist/utils/clipboard.d.ts +9 -0
- package/dist/utils/clipboard.js +16 -0
- package/dist/utils/config.d.ts +42 -0
- package/dist/utils/config.js +37 -0
- package/dist/utils/controlAttrs.js +37 -0
- package/dist/utils/floating.d.ts +86 -0
- package/dist/utils/floating.js +99 -0
- package/dist/utils/glass.js +25 -0
- package/dist/utils/overlay.js +94 -0
- package/dist/utils/scrollLock.js +44 -0
- package/dist/utils/search.d.ts +16 -0
- package/dist/utils/search.js +23 -0
- package/dist/utils/useClientReady.js +10 -0
- package/dist/utils/useDeferredBlurValidation.d.ts +18 -0
- package/dist/utils/useDeferredBlurValidation.js +34 -0
- package/dist/utils/useKeyboardScrollSync.d.ts +11 -0
- package/dist/utils/useKeyboardScrollSync.js +28 -0
- package/dist/utils/useOptionDetailPanel.d.ts +50 -0
- package/dist/utils/useOptionDetailPanel.js +180 -0
- package/dist/utils/useOutsidePointerDown.d.ts +8 -0
- package/dist/utils/useOutsidePointerDown.js +17 -0
- package/dist/utils/useSearchShortcutFocus.d.ts +18 -0
- package/dist/utils/useSearchShortcutFocus.js +47 -0
- package/dist/utils/useVirtualList.d.ts +42 -0
- package/dist/utils/useVirtualList.js +74 -0
- package/package.json +15 -9
- package/dist/bing-ui.es.js +0 -31276
- package/dist/bing-ui.umd.js +0 -229
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingTableCellValue.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingTable/BingTableCellValue.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-8703f323"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import e from "../BingTooltip/BingTooltip.js";
|
|
2
|
+
import { bingTableMeasurementsKey as t, createTableMeasurements as n } from "./BingTable.measurements.js";
|
|
3
|
+
import { createBlock as r, createElementVNode as i, defineComponent as a, inject as o, normalizeClass as s, onBeforeUnmount as c, onMounted as l, openBlock as u, ref as d, renderSlot as f, watch as p, withCtx as m } from "vue";
|
|
4
|
+
//#region src/components/BingTable/BingTableCellValue.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var h = /* @__PURE__ */ a({
|
|
6
|
+
__name: "BingTableCellValue",
|
|
7
|
+
props: {
|
|
8
|
+
ellipsis: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: !0
|
|
11
|
+
},
|
|
12
|
+
disabled: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(a) {
|
|
18
|
+
let h = a, g = d(null), _ = d(""), v = d(!1), y = o(t, null) ?? n(g), b;
|
|
19
|
+
function x() {
|
|
20
|
+
let e = g.value;
|
|
21
|
+
if (!e) return;
|
|
22
|
+
let t = !!e.querySelector("button, a[href], input, select, textarea, [role=\"button\"], [role=\"combobox\"], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]:not([tabindex=\"-1\"])");
|
|
23
|
+
function n(e) {
|
|
24
|
+
if (e.clientWidth === 0 || e.scrollWidth <= e.clientWidth + 1) return !1;
|
|
25
|
+
let t = window.getComputedStyle(e);
|
|
26
|
+
return t.overflowX === "hidden" || t.overflowX === "clip";
|
|
27
|
+
}
|
|
28
|
+
let r = h.ellipsis && !t && (n(e) || e.childElementCount > 0 && [...e.querySelectorAll("*")].some(n)) ? (e.innerText || e.textContent || "").trim() : "";
|
|
29
|
+
return () => {
|
|
30
|
+
v.value = t, _.value = r;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function S() {
|
|
34
|
+
x()?.();
|
|
35
|
+
}
|
|
36
|
+
return l(() => {
|
|
37
|
+
g.value && (b = y.register(g.value, x));
|
|
38
|
+
}), p(() => h.ellipsis, () => {
|
|
39
|
+
g.value && y.invalidate(g.value);
|
|
40
|
+
}), c(() => b?.()), (t, n) => (u(), r(e, {
|
|
41
|
+
class: "bing-table__cell-value",
|
|
42
|
+
content: _.value,
|
|
43
|
+
disabled: a.disabled || !_.value,
|
|
44
|
+
tabindex: !a.disabled && _.value ? 0 : void 0,
|
|
45
|
+
"max-width": 420,
|
|
46
|
+
"open-delay": 180,
|
|
47
|
+
placement: "top"
|
|
48
|
+
}, {
|
|
49
|
+
default: m(() => [i("span", {
|
|
50
|
+
ref_key: "contentRef",
|
|
51
|
+
ref: g,
|
|
52
|
+
class: s(["bing-table__cell-text", {
|
|
53
|
+
"is-ellipsis": a.ellipsis,
|
|
54
|
+
"has-controls": v.value
|
|
55
|
+
}]),
|
|
56
|
+
onPointerenter: S,
|
|
57
|
+
onFocusin: S
|
|
58
|
+
}, [f(t.$slots, "default", {}, void 0, !0)], 34)]),
|
|
59
|
+
_: 3
|
|
60
|
+
}, 8, [
|
|
61
|
+
"content",
|
|
62
|
+
"disabled",
|
|
63
|
+
"tabindex"
|
|
64
|
+
]));
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
//#endregion
|
|
68
|
+
export { h as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
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/BingTable/BingTableHeaderCell.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var c = ["data-bing-table-sortable-key", "aria-grabbed"], l = /* @__PURE__ */ n({
|
|
5
|
+
__name: "BingTableHeaderCell",
|
|
6
|
+
props: {
|
|
7
|
+
columnKey: {},
|
|
8
|
+
index: {},
|
|
9
|
+
disabled: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup(n) {
|
|
15
|
+
let l = n, u = a(null), { isDragging: d, isDropping: f, isDragSource: p, isDropTarget: m } = s({
|
|
16
|
+
id: e(() => l.columnKey),
|
|
17
|
+
index: e(() => l.index),
|
|
18
|
+
element: u,
|
|
19
|
+
handle: u,
|
|
20
|
+
disabled: e(() => l.disabled),
|
|
21
|
+
alignment: {
|
|
22
|
+
x: "start",
|
|
23
|
+
y: "start"
|
|
24
|
+
},
|
|
25
|
+
transition: {
|
|
26
|
+
duration: 210,
|
|
27
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
28
|
+
idle: !1
|
|
29
|
+
}
|
|
30
|
+
}), h = e(() => d.value || f.value || p.value), g = e(() => ({
|
|
31
|
+
"is-dnd-sortable": !l.disabled,
|
|
32
|
+
"is-dnd-dragging": h.value,
|
|
33
|
+
"is-dnd-drop-target": m.value
|
|
34
|
+
}));
|
|
35
|
+
return (e, a) => (i(), t("th", {
|
|
36
|
+
ref_key: "elementRef",
|
|
37
|
+
ref: u,
|
|
38
|
+
class: r(g.value),
|
|
39
|
+
"data-bing-table-sortable-key": n.columnKey,
|
|
40
|
+
"aria-grabbed": h.value ? "true" : "false"
|
|
41
|
+
}, [o(e.$slots, "default")], 10, c));
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
export { l as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingTableHeaderContent.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingTable/BingTableHeaderContent.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-df084978"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
package/dist/components/BingTable/BingTableHeaderContent.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import e from "../BingButton/BingButton.js";
|
|
2
|
+
import { ArrowDown as t, ArrowUp as n, ArrowUpDown as r, CircleHelp as i, GripVertical as a } from "../../icons/icons.js";
|
|
3
|
+
import o from "../BingIcon/BingIcon.js";
|
|
4
|
+
import s from "../BingTooltip/BingTooltip.js";
|
|
5
|
+
import { computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, normalizeClass as g, openBlock as _, renderSlot as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
|
|
6
|
+
//#region src/components/BingTable/BingTableHeaderContent.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var S = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "bing-table__drag-mark",
|
|
10
|
+
"aria-hidden": "true"
|
|
11
|
+
}, C = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "bing-table__sort-button"
|
|
14
|
+
}, w = { class: "bing-table__header-label" }, T = { class: "bing-table__header-label" }, E = {
|
|
15
|
+
key: 3,
|
|
16
|
+
class: "bing-table__header-label"
|
|
17
|
+
}, D = {
|
|
18
|
+
key: 4,
|
|
19
|
+
class: "bing-table__header-help"
|
|
20
|
+
}, O = ["aria-label"], k = /* @__PURE__ */ h({
|
|
21
|
+
__name: "BingTableHeaderContent",
|
|
22
|
+
props: {
|
|
23
|
+
column: {},
|
|
24
|
+
reorderable: { type: Boolean },
|
|
25
|
+
resizable: { type: Boolean },
|
|
26
|
+
sortOrder: {},
|
|
27
|
+
preview: { type: Boolean }
|
|
28
|
+
},
|
|
29
|
+
emits: [
|
|
30
|
+
"sort",
|
|
31
|
+
"resizeStart",
|
|
32
|
+
"resizeKeydown"
|
|
33
|
+
],
|
|
34
|
+
setup(h, { emit: k }) {
|
|
35
|
+
let A = h, j = k, M = c(() => A.sortOrder ? A.sortOrder === "asc" ? n : t : r);
|
|
36
|
+
return (t, n) => (_(), d("div", { class: g(["bing-table__header-content", { "is-sorting": h.sortOrder }]) }, [
|
|
37
|
+
h.reorderable ? (_(), d("span", S, [m(o, {
|
|
38
|
+
icon: b(a),
|
|
39
|
+
size: "xs",
|
|
40
|
+
"stroke-width": 1.75
|
|
41
|
+
}, null, 8, ["icon"])])) : u("", !0),
|
|
42
|
+
h.column.sortable && h.preview ? (_(), d("span", C, [f("span", w, [v(t.$slots, "default", { column: h.column }, () => [p(y(h.column.title || h.column.key), 1)], !0)]), m(o, {
|
|
43
|
+
icon: M.value,
|
|
44
|
+
size: "xs",
|
|
45
|
+
"stroke-width": 1.75
|
|
46
|
+
}, null, 8, ["icon"])])) : h.column.sortable ? (_(), l(e, {
|
|
47
|
+
key: 2,
|
|
48
|
+
variant: "ghost",
|
|
49
|
+
size: "xs",
|
|
50
|
+
throttle: !1,
|
|
51
|
+
class: "bing-table__sort-button",
|
|
52
|
+
onClick: n[0] ||= (e) => j("sort")
|
|
53
|
+
}, {
|
|
54
|
+
suffix: x(() => [m(o, {
|
|
55
|
+
icon: M.value,
|
|
56
|
+
size: "xs",
|
|
57
|
+
"stroke-width": 1.75
|
|
58
|
+
}, null, 8, ["icon"])]),
|
|
59
|
+
default: x(() => [f("span", T, [v(t.$slots, "default", { column: h.column }, () => [p(y(h.column.title || h.column.key), 1)], !0)])]),
|
|
60
|
+
_: 3
|
|
61
|
+
})) : (_(), d("span", E, [v(t.$slots, "default", { column: h.column }, () => [p(y(h.column.title || h.column.key), 1)], !0)])),
|
|
62
|
+
h.column.description && h.preview ? (_(), d("span", D, [m(o, {
|
|
63
|
+
icon: b(i),
|
|
64
|
+
size: "xs",
|
|
65
|
+
"stroke-width": 1.75
|
|
66
|
+
}, null, 8, ["icon"])])) : h.column.description ? (_(), l(s, {
|
|
67
|
+
key: 5,
|
|
68
|
+
content: h.column.description,
|
|
69
|
+
trigger: "click",
|
|
70
|
+
placement: "top",
|
|
71
|
+
align: "center",
|
|
72
|
+
"open-delay": 0,
|
|
73
|
+
"close-delay": 80,
|
|
74
|
+
"max-width": 260,
|
|
75
|
+
"aria-label": `列说明: ${h.column.title || h.column.key}`
|
|
76
|
+
}, {
|
|
77
|
+
default: x(() => [m(e, {
|
|
78
|
+
variant: "ghost",
|
|
79
|
+
size: "xs",
|
|
80
|
+
rounded: "full",
|
|
81
|
+
throttle: !1,
|
|
82
|
+
class: "bing-table__header-help",
|
|
83
|
+
"aria-label": `查看列说明: ${h.column.title || h.column.key}`,
|
|
84
|
+
"data-bing-table-dnd-ignore": ""
|
|
85
|
+
}, {
|
|
86
|
+
prefix: x(() => [m(o, {
|
|
87
|
+
icon: b(i),
|
|
88
|
+
size: "xs",
|
|
89
|
+
"stroke-width": 1.75
|
|
90
|
+
}, null, 8, ["icon"])]),
|
|
91
|
+
_: 1
|
|
92
|
+
}, 8, ["aria-label"])]),
|
|
93
|
+
_: 1
|
|
94
|
+
}, 8, ["content", "aria-label"])) : u("", !0),
|
|
95
|
+
h.resizable && !h.preview ? (_(), d("button", {
|
|
96
|
+
key: 6,
|
|
97
|
+
type: "button",
|
|
98
|
+
class: "bing-table__resize-handle",
|
|
99
|
+
"aria-label": `调整列宽: ${h.column.title || h.column.key}`,
|
|
100
|
+
role: "separator",
|
|
101
|
+
"aria-orientation": "vertical",
|
|
102
|
+
"data-bing-table-dnd-ignore": "",
|
|
103
|
+
onPointerdown: n[1] ||= (e) => j("resizeStart", e),
|
|
104
|
+
onKeydown: n[2] ||= (e) => j("resizeKeydown", e)
|
|
105
|
+
}, null, 40, O)) : u("", !0)
|
|
106
|
+
], 2));
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
//#endregion
|
|
110
|
+
export { k as default };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { computed as e, ref as t } from "vue";
|
|
2
|
+
//#region src/components/BingTable/useTableColumns.ts
|
|
3
|
+
function n(e, t) {
|
|
4
|
+
return !!(e && Object.prototype.hasOwnProperty.call(e, t));
|
|
5
|
+
}
|
|
6
|
+
function r(e, t) {
|
|
7
|
+
return e.length === t.length && e.every((e, n) => e === t[n]);
|
|
8
|
+
}
|
|
9
|
+
function i(i, a) {
|
|
10
|
+
let o = t({ ...i.defaultColumnWidths }), s = t(i.defaultColumnOrder.length ? [...i.defaultColumnOrder] : i.columns.map((e) => e.key)), c = t([...new Set([...i.defaultHiddenColumnKeys, ...i.columns.filter((e) => e.hidden).map((e) => e.key)])]), l = t({ ...i.defaultColumnFixed }), u = e(() => i.columns.map((e) => ({
|
|
11
|
+
...e,
|
|
12
|
+
dataKey: e.dataKey ?? e.key
|
|
13
|
+
}))), d = e(() => b(i.columnOrder ?? s.value)), f = e(() => {
|
|
14
|
+
let e = new Map(u.value.map((e) => [e.key, e]));
|
|
15
|
+
return d.value.map((t) => e.get(t)).filter((e) => !!e);
|
|
16
|
+
}), p = e(() => {
|
|
17
|
+
let e = i.hiddenColumnKeys ?? c.value;
|
|
18
|
+
return new Set(e);
|
|
19
|
+
}), m = e(() => f.value.filter((e) => !p.value.has(e.key)));
|
|
20
|
+
function h(e) {
|
|
21
|
+
return n(i.columnFixed, e.key) ? i.columnFixed?.[e.key] ?? null : n(l.value, e.key) ? l.value[e.key] ?? null : e.fixed ?? null;
|
|
22
|
+
}
|
|
23
|
+
function g(e) {
|
|
24
|
+
return u.value.find((t) => t.key === e);
|
|
25
|
+
}
|
|
26
|
+
function _(e, t = i.columnFixed ?? l.value) {
|
|
27
|
+
return n(t, e) ? t[e] ?? null : g(e)?.fixed ?? null;
|
|
28
|
+
}
|
|
29
|
+
function v(e) {
|
|
30
|
+
i.columnFixed === void 0 && (l.value = e), a("update:columnFixed", e);
|
|
31
|
+
}
|
|
32
|
+
function y(e) {
|
|
33
|
+
let t = new Set(u.value.map((e) => e.key)), n = e.filter((e, n, r) => t.has(e) && r.indexOf(e) === n), r = u.value.map((e) => e.key).filter((e) => !n.includes(e));
|
|
34
|
+
return [...n, ...r];
|
|
35
|
+
}
|
|
36
|
+
function b(e, t = i.columnFixed ?? l.value) {
|
|
37
|
+
let n = y(e), r = n.filter((e) => _(e, t) === "left"), a = n.filter((e) => !_(e, t)), o = n.filter((e) => _(e, t) === "right");
|
|
38
|
+
return [
|
|
39
|
+
...r,
|
|
40
|
+
...a,
|
|
41
|
+
...o
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
function x(e) {
|
|
45
|
+
i.columnOrder === void 0 && (s.value = e), a("update:columnOrder", e);
|
|
46
|
+
}
|
|
47
|
+
function S(e, t) {
|
|
48
|
+
if (e === t) return;
|
|
49
|
+
let n = d.value, r = n.indexOf(e), i = n.indexOf(t);
|
|
50
|
+
if (r < 0 || i < 0) return;
|
|
51
|
+
let o = [...n], [s] = o.splice(r, 1);
|
|
52
|
+
if (!s) return;
|
|
53
|
+
o.splice(i, 0, s);
|
|
54
|
+
let c = b(o), l = c.indexOf(e);
|
|
55
|
+
x(c), a("column-reorder", {
|
|
56
|
+
key: e,
|
|
57
|
+
from: r,
|
|
58
|
+
to: l,
|
|
59
|
+
order: c
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function C(e, t, n, r) {
|
|
63
|
+
let i = b(e.map((e) => String(e))), o = i.indexOf(String(t));
|
|
64
|
+
x(i), a("column-reorder", {
|
|
65
|
+
key: String(t),
|
|
66
|
+
from: n,
|
|
67
|
+
to: o === -1 ? r : o,
|
|
68
|
+
order: i
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function w(e, t) {
|
|
72
|
+
let n = i.hiddenColumnKeys ?? c.value, r = t ? n.filter((t) => t !== e) : [...n, e].filter((e, t, n) => n.indexOf(e) === t);
|
|
73
|
+
f.value.filter((e) => !r.includes(e.key)).length !== 0 && (i.hiddenColumnKeys === void 0 && (c.value = r), a("update:hiddenColumnKeys", r), a("column-visibility-change", {
|
|
74
|
+
key: e,
|
|
75
|
+
hidden: !t,
|
|
76
|
+
hiddenColumnKeys: r
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
function T(e, t) {
|
|
80
|
+
let n = i.columnFixed ?? l.value, o = d.value, s = {
|
|
81
|
+
...n,
|
|
82
|
+
[e]: t
|
|
83
|
+
}, c = b(o, s);
|
|
84
|
+
v(s), r(o, c) || x(c), a("column-fixed-change", {
|
|
85
|
+
key: e,
|
|
86
|
+
fixed: t,
|
|
87
|
+
columnFixed: s
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function E() {
|
|
91
|
+
let e = { ...i.defaultColumnWidths }, t = i.defaultColumnOrder.length ? [...i.defaultColumnOrder] : i.columns.map((e) => e.key), n = [...new Set([...i.defaultHiddenColumnKeys, ...i.columns.filter((e) => e.hidden).map((e) => e.key)])], r = { ...i.defaultColumnFixed };
|
|
92
|
+
o.value = e, s.value = t, c.value = n, l.value = r, a("update:columnWidths", e), a("update:columnOrder", t), a("update:hiddenColumnKeys", n), a("update:columnFixed", r);
|
|
93
|
+
}
|
|
94
|
+
function D(e) {
|
|
95
|
+
i.columnWidths === void 0 && (o.value = e), a("update:columnWidths", e);
|
|
96
|
+
}
|
|
97
|
+
function O(e) {
|
|
98
|
+
i.hiddenColumnKeys === void 0 && (c.value = e), a("update:hiddenColumnKeys", e);
|
|
99
|
+
}
|
|
100
|
+
function k(e) {
|
|
101
|
+
return p.value.has(e);
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
localColumnWidths: o,
|
|
105
|
+
localColumnFixed: l,
|
|
106
|
+
allColumns: u,
|
|
107
|
+
getColumnByKey: g,
|
|
108
|
+
effectiveColumnOrder: d,
|
|
109
|
+
orderedColumns: f,
|
|
110
|
+
effectiveHiddenColumnKeySet: p,
|
|
111
|
+
visibleColumns: m,
|
|
112
|
+
getColumnFixed: h,
|
|
113
|
+
isColumnHidden: k,
|
|
114
|
+
applyColumnFixed: v,
|
|
115
|
+
applyColumnOrderValue: x,
|
|
116
|
+
applyColumnWidthsValue: D,
|
|
117
|
+
applyHiddenColumnKeys: O,
|
|
118
|
+
reorderColumns: S,
|
|
119
|
+
applyColumnOrder: C,
|
|
120
|
+
toggleColumnVisibility: w,
|
|
121
|
+
setColumnFixed: T,
|
|
122
|
+
resetColumns: E
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
//#endregion
|
|
126
|
+
export { i as useTableColumns };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingTableColumnControls.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingTableColumnControls/BingTableColumnControls.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-1fc3fa33"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -23,11 +23,11 @@ declare const __VLS_export: import('vue').DefineComponent<BingTableColumnControl
|
|
|
23
23
|
"onColumn-visibility-change"?: ((payload: import('..').BingTableColumnVisibilityPayload) => any) | undefined;
|
|
24
24
|
"onColumn-fixed-change"?: ((payload: import('..').BingTableColumnFixedPayload) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
|
+
open: boolean;
|
|
26
27
|
disabled: boolean;
|
|
27
28
|
columns: import('..').BingTableColumn[];
|
|
28
29
|
placement: import('..').BingDropDownPlacement;
|
|
29
30
|
ariaLabel: string;
|
|
30
|
-
open: boolean;
|
|
31
31
|
smoothScroll: import('../..').SmoothScrollValue;
|
|
32
32
|
defaultColumnWidths: Record<string, number>;
|
|
33
33
|
defaultColumnOrder: string[];
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import e from "../BingButton/BingButton.js";
|
|
2
|
+
import { Columns3 as t, GripVertical as n, Pin as r } from "../../icons/icons.js";
|
|
3
|
+
import i from "../BingIcon/BingIcon.js";
|
|
4
|
+
import { compactSmoothScrollOptions as a, resolveComponentSmoothScroll as o } from "../../motion/smoothScroll.js";
|
|
5
|
+
import s from "../BingScrollbar/BingScrollbar.js";
|
|
6
|
+
import c from "../BingCheckbox/BingCheckbox.js";
|
|
7
|
+
import l from "../BingDropDown/BingDropDown.js";
|
|
8
|
+
import u from "../BingSortableList/BingSortableList.js";
|
|
9
|
+
import { useTableColumns as d } from "../BingTable/useTableColumns.js";
|
|
10
|
+
import { computed as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, mergeProps as y, normalizeClass as b, openBlock as x, ref as S, toDisplayString as C, unref as w, watch as T, withCtx as E } from "vue";
|
|
11
|
+
//#region src/components/BingTableColumnControls/BingTableColumnControls.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var D = { class: "bing-table__column-controls" }, O = { class: "bing-table__column-panel-head" }, k = ["aria-label"], A = { class: "bing-table__column-meta" }, j = { class: "bing-table__column-name" }, M = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "bing-table__column-desc"
|
|
15
|
+
}, N = {
|
|
16
|
+
class: "bing-table__pin-actions",
|
|
17
|
+
"aria-label": "固定列设置"
|
|
18
|
+
}, P = /* @__PURE__ */ v({
|
|
19
|
+
__name: "BingTableColumnControls",
|
|
20
|
+
props: {
|
|
21
|
+
open: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
25
|
+
defaultOpen: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
disabled: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
placement: { default: "bottom-start" },
|
|
34
|
+
ariaLabel: { default: "列设置" },
|
|
35
|
+
columns: { default: () => [] },
|
|
36
|
+
columnWidths: { default: void 0 },
|
|
37
|
+
defaultColumnWidths: { default: () => ({}) },
|
|
38
|
+
columnOrder: { default: void 0 },
|
|
39
|
+
defaultColumnOrder: { default: () => [] },
|
|
40
|
+
hiddenColumnKeys: { default: void 0 },
|
|
41
|
+
defaultHiddenColumnKeys: { default: () => [] },
|
|
42
|
+
columnFixed: { default: void 0 },
|
|
43
|
+
defaultColumnFixed: { default: () => ({}) },
|
|
44
|
+
reorderableColumns: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !0
|
|
47
|
+
},
|
|
48
|
+
smoothScroll: {
|
|
49
|
+
type: [Boolean, Object],
|
|
50
|
+
default: !0
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
emits: [
|
|
54
|
+
"update:open",
|
|
55
|
+
"drag-start",
|
|
56
|
+
"drag-end",
|
|
57
|
+
"update:columnWidths",
|
|
58
|
+
"update:columnOrder",
|
|
59
|
+
"update:hiddenColumnKeys",
|
|
60
|
+
"update:columnFixed",
|
|
61
|
+
"column-reorder",
|
|
62
|
+
"column-visibility-change",
|
|
63
|
+
"column-fixed-change"
|
|
64
|
+
],
|
|
65
|
+
setup(v, { expose: P, emit: F }) {
|
|
66
|
+
let I = v, L = F, { orderedColumns: R, visibleColumns: z, effectiveColumnOrder: B, getColumnFixed: V, isColumnHidden: H, applyColumnOrder: U, toggleColumnVisibility: W, setColumnFixed: G, resetColumns: K } = d(I, L), q = S(I.defaultOpen), J = S(!1), Y = f({
|
|
67
|
+
get: () => I.open === void 0 ? q.value : I.open,
|
|
68
|
+
set: (e) => {
|
|
69
|
+
I.disabled && e || (I.open === void 0 && (q.value = e), L("update:open", e));
|
|
70
|
+
}
|
|
71
|
+
}), X = S(null), Z = f(() => o(I.smoothScroll, a, {
|
|
72
|
+
keyboard: !1,
|
|
73
|
+
smoothTouchpad: !1,
|
|
74
|
+
respectReducedMotion: !0
|
|
75
|
+
}));
|
|
76
|
+
function Q(e) {
|
|
77
|
+
U(e.order, e.key, e.from, e.to);
|
|
78
|
+
}
|
|
79
|
+
function $(e) {
|
|
80
|
+
X.value?.stop(), J.value = !0, L("drag-start", e);
|
|
81
|
+
}
|
|
82
|
+
function ee(e) {
|
|
83
|
+
J.value = !1, L("drag-end", e);
|
|
84
|
+
}
|
|
85
|
+
return T(Y, (e) => {
|
|
86
|
+
e || X.value?.stop();
|
|
87
|
+
}), T(() => I.disabled, (e) => {
|
|
88
|
+
e && (Y.value = !1);
|
|
89
|
+
}), P({ resetColumns: K }), (a, o) => (x(), m("div", D, [_(l, {
|
|
90
|
+
open: Y.value,
|
|
91
|
+
"onUpdate:open": o[0] ||= (e) => Y.value = e,
|
|
92
|
+
class: "bing-table__column-dropdown",
|
|
93
|
+
placement: v.placement,
|
|
94
|
+
width: 360,
|
|
95
|
+
"max-width": "calc(100vw - 24px)",
|
|
96
|
+
"panel-class": "bing-table__column-panel-shell",
|
|
97
|
+
"aria-label": v.ariaLabel
|
|
98
|
+
}, {
|
|
99
|
+
trigger: E(({ triggerProps: n }) => [_(e, y({
|
|
100
|
+
variant: "ghost",
|
|
101
|
+
size: "xs",
|
|
102
|
+
rounded: "sm",
|
|
103
|
+
throttle: !1
|
|
104
|
+
}, n, {
|
|
105
|
+
class: ["bing-table__icon-button", { "is-active": Y.value }],
|
|
106
|
+
disabled: v.disabled,
|
|
107
|
+
"aria-label": v.ariaLabel
|
|
108
|
+
}), {
|
|
109
|
+
prefix: E(() => [_(i, {
|
|
110
|
+
icon: w(t),
|
|
111
|
+
size: "sm",
|
|
112
|
+
"stroke-width": 1.75
|
|
113
|
+
}, null, 8, ["icon"])]),
|
|
114
|
+
_: 1
|
|
115
|
+
}, 16, [
|
|
116
|
+
"disabled",
|
|
117
|
+
"class",
|
|
118
|
+
"aria-label"
|
|
119
|
+
])]),
|
|
120
|
+
header: E(() => [h("div", O, [h("span", null, C(v.ariaLabel), 1), _(e, {
|
|
121
|
+
variant: "ghost",
|
|
122
|
+
size: "xs",
|
|
123
|
+
rounded: "sm",
|
|
124
|
+
throttle: !1,
|
|
125
|
+
class: "bing-table__text-button",
|
|
126
|
+
disabled: v.disabled,
|
|
127
|
+
onClick: w(K)
|
|
128
|
+
}, {
|
|
129
|
+
default: E(() => [...o[1] ||= [g(" 重置 ", -1)]]),
|
|
130
|
+
_: 1
|
|
131
|
+
}, 8, ["disabled", "onClick"])])]),
|
|
132
|
+
default: E(() => [h("div", {
|
|
133
|
+
class: b(["bing-table__column-panel", { "is-reordering": J.value }]),
|
|
134
|
+
role: "group",
|
|
135
|
+
"aria-label": v.ariaLabel
|
|
136
|
+
}, [_(s, {
|
|
137
|
+
ref_key: "columnListScrollRef",
|
|
138
|
+
ref: X,
|
|
139
|
+
class: "bing-table__column-list-scroll",
|
|
140
|
+
"max-height": 330,
|
|
141
|
+
smooth: Z.value,
|
|
142
|
+
focusable: !1,
|
|
143
|
+
"aria-label": "列设置列表"
|
|
144
|
+
}, {
|
|
145
|
+
default: E(() => [_(u, {
|
|
146
|
+
class: "bing-table__column-list",
|
|
147
|
+
items: w(R),
|
|
148
|
+
order: w(B),
|
|
149
|
+
"item-key": "key",
|
|
150
|
+
disabled: v.disabled || !v.reorderableColumns,
|
|
151
|
+
axis: "vertical",
|
|
152
|
+
"drag-overlay": "",
|
|
153
|
+
"aria-label": "列顺序",
|
|
154
|
+
"handle-aria-label": "调整列顺序",
|
|
155
|
+
onReorder: Q,
|
|
156
|
+
onDragStart: $,
|
|
157
|
+
onDragEnd: ee
|
|
158
|
+
}, {
|
|
159
|
+
default: E(({ item: t, handleProps: a }) => [h("div", {
|
|
160
|
+
class: b(["bing-table__column-option", {
|
|
161
|
+
"is-hidden": w(H)(t.key),
|
|
162
|
+
"is-fixed-left": w(V)(t) === "left",
|
|
163
|
+
"is-fixed-right": w(V)(t) === "right"
|
|
164
|
+
}]),
|
|
165
|
+
"data-bing-dropdown-stagger": ""
|
|
166
|
+
}, [
|
|
167
|
+
h("span", y(a, { class: "bing-table__column-grip" }), [_(i, {
|
|
168
|
+
icon: w(n),
|
|
169
|
+
size: "xs",
|
|
170
|
+
"stroke-width": 1.75
|
|
171
|
+
}, null, 8, ["icon"])], 16),
|
|
172
|
+
_(c, {
|
|
173
|
+
class: "bing-table__column-check",
|
|
174
|
+
size: "sm",
|
|
175
|
+
"model-value": !w(H)(t.key),
|
|
176
|
+
disabled: v.disabled || !w(H)(t.key) && w(z).length === 1,
|
|
177
|
+
"aria-label": `显示列:${t.title || t.key}`,
|
|
178
|
+
onChange: (e) => w(W)(t.key, e)
|
|
179
|
+
}, null, 8, [
|
|
180
|
+
"model-value",
|
|
181
|
+
"disabled",
|
|
182
|
+
"aria-label",
|
|
183
|
+
"onChange"
|
|
184
|
+
]),
|
|
185
|
+
h("div", A, [h("span", j, C(t.title || t.key), 1), t.description ? (x(), m("span", M, C(t.description), 1)) : p("", !0)]),
|
|
186
|
+
h("div", N, [_(e, {
|
|
187
|
+
size: "xs",
|
|
188
|
+
rounded: "sm",
|
|
189
|
+
variant: w(V)(t) === "left" ? "secondary" : "ghost",
|
|
190
|
+
throttle: !1,
|
|
191
|
+
disabled: v.disabled,
|
|
192
|
+
class: b(["bing-table__pin-button bing-table__pin-button--left", { "is-active": w(V)(t) === "left" }]),
|
|
193
|
+
"aria-pressed": w(V)(t) === "left",
|
|
194
|
+
"aria-label": "固定到左侧",
|
|
195
|
+
onClick: (e) => w(G)(t.key, w(V)(t) === "left" ? null : "left")
|
|
196
|
+
}, {
|
|
197
|
+
prefix: E(() => [_(i, {
|
|
198
|
+
icon: w(r),
|
|
199
|
+
size: "xs",
|
|
200
|
+
"stroke-width": 1.75
|
|
201
|
+
}, null, 8, ["icon"])]),
|
|
202
|
+
_: 1
|
|
203
|
+
}, 8, [
|
|
204
|
+
"variant",
|
|
205
|
+
"disabled",
|
|
206
|
+
"class",
|
|
207
|
+
"aria-pressed",
|
|
208
|
+
"onClick"
|
|
209
|
+
]), _(e, {
|
|
210
|
+
size: "xs",
|
|
211
|
+
rounded: "sm",
|
|
212
|
+
variant: w(V)(t) === "right" ? "secondary" : "ghost",
|
|
213
|
+
throttle: !1,
|
|
214
|
+
disabled: v.disabled,
|
|
215
|
+
class: b(["bing-table__pin-button bing-table__pin-button--right", { "is-active": w(V)(t) === "right" }]),
|
|
216
|
+
"aria-pressed": w(V)(t) === "right",
|
|
217
|
+
"aria-label": "固定到右侧",
|
|
218
|
+
onClick: (e) => w(G)(t.key, w(V)(t) === "right" ? null : "right")
|
|
219
|
+
}, {
|
|
220
|
+
prefix: E(() => [_(i, {
|
|
221
|
+
icon: w(r),
|
|
222
|
+
size: "xs",
|
|
223
|
+
"stroke-width": 1.75
|
|
224
|
+
}, null, 8, ["icon"])]),
|
|
225
|
+
_: 1
|
|
226
|
+
}, 8, [
|
|
227
|
+
"variant",
|
|
228
|
+
"disabled",
|
|
229
|
+
"class",
|
|
230
|
+
"aria-pressed",
|
|
231
|
+
"onClick"
|
|
232
|
+
])])
|
|
233
|
+
], 2)]),
|
|
234
|
+
_: 1
|
|
235
|
+
}, 8, [
|
|
236
|
+
"items",
|
|
237
|
+
"order",
|
|
238
|
+
"disabled"
|
|
239
|
+
])]),
|
|
240
|
+
_: 1
|
|
241
|
+
}, 8, ["smooth"])], 10, k)]),
|
|
242
|
+
_: 1
|
|
243
|
+
}, 8, [
|
|
244
|
+
"open",
|
|
245
|
+
"placement",
|
|
246
|
+
"aria-label"
|
|
247
|
+
])]));
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
//#endregion
|
|
251
|
+
export { P as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./BingTabs.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/BingTabs/BingTabs.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-0333dc77"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -8,20 +8,19 @@ type __VLS_Slots = {} & {
|
|
|
8
8
|
item?: (props: typeof __VLS_10) => any;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: import('vue').DefineComponent<BingTabsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
-
change: (payload: BingTabsChangePayload) => any;
|
|
12
11
|
blur: (payload: BingTabsFocusPayload) => any;
|
|
13
12
|
focus: (payload: BingTabsFocusPayload) => any;
|
|
13
|
+
change: (payload: BingTabsChangePayload) => any;
|
|
14
14
|
"update:modelValue": (value: BingTabValue) => any;
|
|
15
15
|
}, string, import('vue').PublicProps, Readonly<BingTabsProps> & Readonly<{
|
|
16
|
-
onChange?: ((payload: BingTabsChangePayload) => any) | undefined;
|
|
17
16
|
onBlur?: ((payload: BingTabsFocusPayload) => any) | undefined;
|
|
18
17
|
onFocus?: ((payload: BingTabsFocusPayload) => any) | undefined;
|
|
18
|
+
onChange?: ((payload: BingTabsChangePayload) => any) | undefined;
|
|
19
19
|
"onUpdate:modelValue"?: ((value: BingTabValue) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
21
|
disabled: boolean;
|
|
22
22
|
items: BingTabItem[];
|
|
23
23
|
variant: import('./BingTabs.types').BingTabsVariant;
|
|
24
|
-
size: import('./BingTabs.types').BingTabsSize;
|
|
25
24
|
block: boolean;
|
|
26
25
|
ariaLabel: string;
|
|
27
26
|
modelValue: BingTabValue;
|