hys-ui 0.3.0 → 0.5.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/CHANGELOG.md +27 -0
- package/README.md +68 -73
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +5 -41
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber2.vue.js +467 -2
- package/dist/components/HysAnimatedNumber/NumberAnimationCanvas/NumberAnimationCanvas.vue.js +7 -0
- package/dist/components/HysAnimatedNumber/NumberAnimationCanvas/NumberAnimationCanvas2.vue.js +166 -0
- package/dist/components/HysAnimatedNumber/NumberDigits/NumberDigits.vue.js +7 -0
- package/dist/components/HysAnimatedNumber/NumberDigits/NumberDigits2.vue.js +105 -0
- package/dist/components/HysAnimatedNumber/animation/digital.js +186 -0
- package/dist/components/HysAnimatedNumber/animation/morph.js +110 -0
- package/dist/components/HysAnimatedNumber/animation/paint.js +34 -0
- package/dist/components/HysAnimatedNumber/animation/particles.js +51 -0
- package/dist/components/HysAnimatedNumber/animation/paths.js +165 -0
- package/dist/components/HysAnimatedNumber/animation/physics.js +66 -0
- package/dist/components/HysAnimatedNumber/animation/render.js +89 -0
- package/dist/components/HysAnimatedNumber/animation/reveal.js +125 -0
- package/dist/components/HysAnimatedNumber/animation/rolling.js +66 -0
- package/dist/components/HysAnimatedNumber/animation/scenarios.js +217 -0
- package/dist/components/HysAnimatedNumber/animation/spatial.js +112 -0
- package/dist/components/HysAnimatedNumber/useNumberCountdown.js +58 -0
- package/dist/components/HysAnimatedNumber/useNumberVisuals.js +60 -0
- package/dist/components/HysButton/HysButton.vue.js +2 -2
- package/dist/components/HysButton/HysButton2.vue.js +227 -60
- package/dist/components/HysButtonGroup/HysButtonGroup.vue.js +7 -0
- package/dist/components/HysButtonGroup/HysButtonGroup2.vue.js +51 -0
- package/dist/components/HysFormItem/HysFormItem.vue.js +1 -1
- package/dist/components/HysFormItem/HysFormItem2.vue.js +231 -229
- package/dist/components/HysInput/HysInput.vue.js +2 -2
- package/dist/components/HysInput/HysInput2.vue.js +327 -274
- package/dist/components/HysMention/HysMention.vue.js +1 -1
- package/dist/components/HysMention/HysMention2.vue.js +1092 -154
- package/dist/components/HysModal/HysModal.vue.js +3 -3
- package/dist/components/HysModal/HysModal2.vue.js +81 -80
- package/dist/components/HysPagination/HysPagination.vue.js +2 -2
- package/dist/components/HysPagination/HysPagination2.vue.js +243 -180
- package/dist/components/HysSearch/HysSearch.vue.js +5 -82
- package/dist/components/HysSearch/HysSearch2.vue.js +176 -2
- package/dist/components/HysSelect/HysSelect.vue.js +2 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +472 -443
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +315 -58
- package/dist/components/HysSplitPane/HysSplitPane3.vue.js +5 -0
- package/dist/components/HysTable/HysTable.vue.js +2 -2
- package/dist/components/HysTable/HysTable2.vue.js +1418 -1150
- package/dist/components/HysTextarea/HysTextarea.vue.js +56 -32
- package/dist/components/HysTour/HysTour.vue.js +291 -67
- package/dist/components/HysTour/HysTour3.vue.js +5 -0
- package/dist/composables/animatedNumberDigits.js +106 -0
- package/dist/composables/animatedNumberFormat.js +222 -0
- package/dist/composables/animatedNumberTiming.js +66 -0
- package/dist/composables/buttonGroup.js +12 -0
- package/dist/composables/floatingPosition.js +18 -0
- package/dist/composables/mentionDocument.js +79 -0
- package/dist/composables/mentionEditor.js +58 -0
- package/dist/composables/numberAnimation.js +72 -0
- package/dist/composables/numberAnimationCatalog.js +301 -0
- package/dist/composables/numberAnimationSequence.js +45 -0
- package/dist/composables/selectOptions.js +44 -38
- package/dist/composables/splitPaneSizes.js +58 -0
- package/dist/composables/table.js +128 -105
- package/dist/composables/textInput.js +23 -14
- package/dist/composables/useDialog.js +50 -50
- package/dist/composables/useFloating.js +107 -103
- package/dist/composables/useHysAnimatedNumber.js +264 -0
- package/dist/composables/useHysNumberAnimationGroup.js +23 -0
- package/dist/composables/useMentionCaret.js +81 -0
- package/dist/composables/useMentionList.js +81 -0
- package/dist/composables/useMentionModel.js +90 -0
- package/dist/composables/useMentionOptions.js +421 -0
- package/dist/composables/useSplitPaneDrag.js +52 -0
- package/dist/composables/useSplitPaneStorage.js +38 -0
- package/dist/composables/useTable.js +344 -312
- package/dist/composables/useTableSticky.js +79 -0
- package/dist/composables/useTextareaSize.js +62 -46
- package/dist/composables/useTourLayout.js +129 -0
- package/dist/config.js +11 -11
- package/dist/index.js +183 -152
- package/dist/internal/MultiSplitPane.vue.js +305 -0
- package/dist/internal/MultiSplitPane2.vue.js +4 -0
- package/dist/style.css +1 -1
- package/dist/types/components/HysAnimatedNumber/HysAnimatedNumber.vue.d.ts +99 -6
- package/dist/types/components/HysAnimatedNumber/NumberAnimationCanvas/NumberAnimationCanvas.vue.d.ts +19 -0
- package/dist/types/components/HysAnimatedNumber/NumberDigits/NumberDigits.vue.d.ts +31 -0
- package/dist/types/components/HysAnimatedNumber/animation/digital.d.ts +3 -0
- package/dist/types/components/HysAnimatedNumber/animation/morph.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/paint.d.ts +44 -0
- package/dist/types/components/HysAnimatedNumber/animation/particles.d.ts +5 -0
- package/dist/types/components/HysAnimatedNumber/animation/paths.d.ts +12 -0
- package/dist/types/components/HysAnimatedNumber/animation/physics.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/render.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/reveal.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/rolling.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/scenarios.d.ts +4 -0
- package/dist/types/components/HysAnimatedNumber/animation/spatial.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/useNumberCountdown.d.ts +8 -0
- package/dist/types/components/HysAnimatedNumber/useNumberVisuals.d.ts +12 -0
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +12 -3
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +2 -2
- package/dist/types/components/HysButton/HysButton.vue.d.ts +82 -22
- package/dist/types/components/HysButtonGroup/HysButtonGroup.vue.d.ts +30 -0
- package/dist/types/components/HysCard/HysCard.vue.d.ts +1 -1
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +3 -3
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +3 -3
- package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +3 -3
- package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +2 -2
- package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +3 -3
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +6 -6
- package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +3 -3
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +2 -2
- package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +1 -1
- package/dist/types/components/HysInput/HysInput.vue.d.ts +13 -1
- package/dist/types/components/HysMention/HysMention.vue.d.ts +91 -40
- package/dist/types/components/HysModal/HysModal.vue.d.ts +1 -1
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +2 -2
- package/dist/types/components/HysPagination/HysPagination.vue.d.ts +55 -4
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +1 -1
- package/dist/types/components/HysRating/HysRating.vue.d.ts +1 -1
- package/dist/types/components/HysSearch/HysSearch.vue.d.ts +46 -8
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +6 -1
- package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +2 -2
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +125 -14
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +1 -1
- package/dist/types/components/HysTable/HysTable.vue.d.ts +1740 -3
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +1 -1
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +1 -1
- package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +13 -2
- package/dist/types/components/HysToast/HysToast.vue.d.ts +1 -1
- package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +1 -1
- package/dist/types/components/HysTour/HysTour.vue.d.ts +46 -9
- package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +3 -3
- package/dist/types/components/HysUpload/HysUpload.vue.d.ts +2 -2
- package/dist/types/composables/animatedNumber.d.ts +220 -0
- package/dist/types/composables/animatedNumberDigits.d.ts +32 -0
- package/dist/types/composables/animatedNumberFormat.d.ts +16 -0
- package/dist/types/composables/animatedNumberTiming.d.ts +21 -0
- package/dist/types/composables/buttonGroup.d.ts +9 -0
- package/dist/types/composables/drawer.d.ts +1 -1
- package/dist/types/composables/floatingPosition.d.ts +14 -0
- package/dist/types/composables/mention.d.ts +284 -0
- package/dist/types/composables/mentionDocument.d.ts +15 -0
- package/dist/types/composables/mentionEditor.d.ts +7 -0
- package/dist/types/composables/modal.d.ts +2 -0
- package/dist/types/composables/numberAnimation.d.ts +29 -0
- package/dist/types/composables/numberAnimationCatalog.d.ts +58 -0
- package/dist/types/composables/numberAnimationSequence.d.ts +13 -0
- package/dist/types/composables/selectOptions.d.ts +5 -0
- package/dist/types/composables/splitPaneSizes.d.ts +11 -0
- package/dist/types/composables/table.d.ts +116 -6
- package/dist/types/composables/textInput.d.ts +39 -4
- package/dist/types/composables/tour.d.ts +68 -0
- package/dist/types/composables/useFloating.d.ts +1 -1
- package/dist/types/composables/useHysAnimatedNumber.d.ts +37 -0
- package/dist/types/composables/useHysNumberAnimationGroup.d.ts +4 -0
- package/dist/types/composables/useMentionCaret.d.ts +6 -0
- package/dist/types/composables/useMentionList.d.ts +23 -0
- package/dist/types/composables/useMentionModel.d.ts +14 -0
- package/dist/types/composables/useMentionOptions.d.ts +26 -0
- package/dist/types/composables/useSplitPaneDrag.d.ts +14 -0
- package/dist/types/composables/useSplitPaneStorage.d.ts +4 -0
- package/dist/types/composables/useTable.d.ts +7 -3
- package/dist/types/composables/useTableSticky.d.ts +22 -0
- package/dist/types/composables/useTextareaSize.d.ts +5 -2
- package/dist/types/composables/useTourLayout.d.ts +33 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/index.d.ts +46 -1
- package/dist/types/internal/MultiSplitPane.vue.d.ts +54 -0
- package/package.json +3 -2
- package/dist/components/HysSplitPane/HysSplitPane2.vue.js +0 -4
- package/dist/components/HysTour/HysTour2.vue.js +0 -4
|
@@ -1,71 +1,328 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { defineComponent as ze, useId as he, ref as b, computed as d, watch as B, onMounted as Pe, onActivated as ke, onDeactivated as we, onBeforeUnmount as Se, openBlock as h, createBlock as J, mergeProps as oe, createSlots as Ce, withCtx as Q, renderSlot as y, normalizeProps as g, guardReactiveProps as z, createElementBlock as j, unref as X, createElementVNode as A, resolveDynamicComponent as re, createCommentVNode as Y, nextTick as Z } from "vue";
|
|
2
|
+
import { ChevronUp as Re, ChevronRight as ue, ChevronLeft as de, ChevronDown as xe } from "lucide-vue-next";
|
|
3
|
+
import { useHysRootAttrs as Ve } from "../../config.js";
|
|
4
|
+
import { useSplitPaneDrag as Ae } from "../../composables/useSplitPaneDrag.js";
|
|
5
|
+
import { useSplitPaneStorage as $e } from "../../composables/useSplitPaneStorage.js";
|
|
6
|
+
import Ee from "../../internal/MultiSplitPane.vue.js";
|
|
7
|
+
const Le = ["inert"], Me = ["tabindex", "aria-label", "aria-controls", "aria-disabled", "aria-orientation", "aria-valuenow", "aria-valuemin", "aria-valuemax", "data-resizing", "aria-keyshortcuts"], Be = {
|
|
8
|
+
class: "hys-ui-splitter-grip",
|
|
9
|
+
"aria-hidden": "true"
|
|
10
|
+
}, De = ["aria-label", "aria-expanded", "data-collapsed", "disabled"], Ne = ["aria-label", "aria-expanded", "data-collapsed", "disabled"], Fe = ["inert"], He = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "hys-ui-splitter-preview",
|
|
13
|
+
"aria-hidden": "true"
|
|
14
|
+
}, Te = /* @__PURE__ */ ze({
|
|
4
15
|
__name: "HysSplitPane",
|
|
5
16
|
props: {
|
|
6
|
-
modelValue: {
|
|
17
|
+
modelValue: {},
|
|
18
|
+
defaultValue: { default: 40 },
|
|
7
19
|
min: { default: 15 },
|
|
8
20
|
max: { default: 85 },
|
|
9
|
-
vertical: { type: Boolean
|
|
21
|
+
vertical: { type: Boolean },
|
|
22
|
+
layout: {},
|
|
10
23
|
disabled: { type: Boolean },
|
|
11
|
-
step: { default: 2 }
|
|
24
|
+
step: { default: 2 },
|
|
25
|
+
lazy: { type: Boolean },
|
|
26
|
+
firstPanel: {},
|
|
27
|
+
secondPanel: {},
|
|
28
|
+
panels: {},
|
|
29
|
+
sizes: {},
|
|
30
|
+
storageKey: {},
|
|
31
|
+
dividerSize: {},
|
|
32
|
+
doubleClickAction: {},
|
|
33
|
+
ariaLabel: { default: "调整面板比例" },
|
|
34
|
+
firstLabel: { default: "前面板" },
|
|
35
|
+
secondLabel: { default: "后面板" }
|
|
12
36
|
},
|
|
13
|
-
emits: ["update:modelValue", "resizeStart", "resizeEnd"],
|
|
14
|
-
setup(
|
|
15
|
-
const a =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
e.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
emits: ["update:modelValue", "resizeStart", "resize", "resizeEnd", "collapse", "update:sizes", "panelResizeStart", "panelResize", "panelResizeEnd", "panelCollapse"],
|
|
38
|
+
setup(t, { expose: ce, emit: ve }) {
|
|
39
|
+
const a = t, u = ve, fe = Ve(), _ = he(), O = _ + "-first", T = _ + "-second", $ = b(), P = b(), k = b(), E = b(0), w = b(!1), L = b(), D = b(), N = b(!1), F = d(() => Number.isFinite(a.dividerSize) ? Math.max(1, Math.min(48, a.dividerSize)) : 6);
|
|
40
|
+
$e(
|
|
41
|
+
() => a.panels === void 0 && a.modelValue === void 0 && a.storageKey ? a.storageKey + ":ratio" : void 0,
|
|
42
|
+
D,
|
|
43
|
+
(e) => typeof e == "number" && Number.isFinite(e) ? e : void 0
|
|
44
|
+
);
|
|
45
|
+
const r = d(() => a.layout ? a.layout === "vertical" : a.vertical), S = d(() => {
|
|
46
|
+
var e, l;
|
|
47
|
+
return !a.disabled && ((e = a.firstPanel) == null ? void 0 : e.resizable) !== !1 && ((l = a.secondPanel) == null ? void 0 : l.resizable) !== !1;
|
|
48
|
+
}), H = (e, l) => Number.isFinite(e) ? Math.min(100, Math.max(0, e)) : l;
|
|
49
|
+
function K(e, l) {
|
|
50
|
+
if (e === void 0) return l;
|
|
51
|
+
const i = typeof e == "number" ? e : Number.parseFloat(e);
|
|
52
|
+
return typeof e == "string" && e.endsWith("%") ? H(i, l) : E.value > 0 ? H(i / E.value * 100, l) : l;
|
|
53
|
+
}
|
|
54
|
+
const C = d(() => {
|
|
55
|
+
var e, l;
|
|
56
|
+
return Math.max(
|
|
57
|
+
K((e = a.firstPanel) == null ? void 0 : e.min, H(a.min, 0)),
|
|
58
|
+
100 - K((l = a.secondPanel) == null ? void 0 : l.max, 100)
|
|
59
|
+
);
|
|
60
|
+
}), I = d(() => {
|
|
61
|
+
var e, l;
|
|
62
|
+
return Math.max(C.value, Math.min(
|
|
63
|
+
K((e = a.firstPanel) == null ? void 0 : e.max, H(a.max, 100)),
|
|
64
|
+
100 - K((l = a.secondPanel) == null ? void 0 : l.min, 0)
|
|
65
|
+
));
|
|
66
|
+
});
|
|
67
|
+
function R(e) {
|
|
68
|
+
return Math.min(I.value, Math.max(C.value, Number.isFinite(e) ? e : C.value));
|
|
69
|
+
}
|
|
70
|
+
const o = d(() => {
|
|
71
|
+
var l, i;
|
|
72
|
+
const e = a.modelValue ?? D.value ?? a.defaultValue;
|
|
73
|
+
return e === 0 && ((l = a.firstPanel) != null && l.collapsible) || e === 100 && ((i = a.secondPanel) != null && i.collapsible) ? e : R(e);
|
|
74
|
+
}), x = d(
|
|
75
|
+
() => o.value === 0 ? "first" : o.value === 100 ? "second" : void 0
|
|
76
|
+
);
|
|
77
|
+
let ee = o.value > 0 && o.value < 100 ? o.value : R(a.defaultValue);
|
|
78
|
+
B(o, (e) => {
|
|
79
|
+
e > 0 && e < 100 && (ee = e);
|
|
80
|
+
}, { flush: "sync" }), B(x, (e, l) => {
|
|
81
|
+
a.panels === void 0 && (l && u("collapse", l, !1), e && u("collapse", e, !0));
|
|
82
|
+
});
|
|
83
|
+
function U(e) {
|
|
84
|
+
e !== o.value && (a.modelValue === void 0 && (D.value = e), u("update:modelValue", e));
|
|
85
|
+
}
|
|
86
|
+
async function V(e) {
|
|
87
|
+
if (a.panels !== void 0) return !1;
|
|
88
|
+
const l = e === "first" ? a.firstPanel : a.secondPanel;
|
|
89
|
+
if (a.disabled || !(l != null && l.collapsible)) return !1;
|
|
90
|
+
const i = x.value, n = i === e ? R(ee) : e === "first" ? 0 : 100;
|
|
91
|
+
return c.finish(!0), U(n), await Z(), i !== x.value;
|
|
92
|
+
}
|
|
93
|
+
const v = d(() => ({
|
|
94
|
+
collapsed: x.value === "first",
|
|
95
|
+
toggle: () => V("first")
|
|
96
|
+
})), f = d(() => ({
|
|
97
|
+
collapsed: x.value === "second",
|
|
98
|
+
toggle: () => V("second")
|
|
99
|
+
})), le = d(() => r.value ? Re : w.value ? ue : de), ae = d(() => r.value ? xe : w.value ? de : ue), pe = d(() => ({
|
|
100
|
+
separator: 0,
|
|
101
|
+
before: "first",
|
|
102
|
+
after: "second",
|
|
103
|
+
vertical: r.value,
|
|
104
|
+
disabled: !S.value,
|
|
105
|
+
resizing: N.value
|
|
106
|
+
}));
|
|
107
|
+
async function ie() {
|
|
108
|
+
var i, n, m;
|
|
109
|
+
if (a.disabled) return !1;
|
|
110
|
+
if (a.panels !== void 0) return ((i = k.value) == null ? void 0 : i.resetSizes()) ?? !1;
|
|
111
|
+
c.finish(!0);
|
|
112
|
+
const e = a.defaultValue, l = e === 0 && ((n = a.firstPanel) != null && n.collapsible) || e === 100 && ((m = a.secondPanel) != null && m.collapsible) ? e : R(e);
|
|
113
|
+
return a.modelValue === void 0 && (D.value = void 0), a.modelValue !== l && u("update:modelValue", l), await Z(), o.value === l;
|
|
114
|
+
}
|
|
115
|
+
function te() {
|
|
116
|
+
var l, i, n;
|
|
117
|
+
const e = x.value;
|
|
118
|
+
if (e && ((l = e === "first" ? a.firstPanel : a.secondPanel) != null && l.collapsible))
|
|
119
|
+
return V(e);
|
|
120
|
+
if ((i = a.firstPanel) != null && i.collapsible) return V("first");
|
|
121
|
+
if ((n = a.secondPanel) != null && n.collapsible) return V("second");
|
|
34
122
|
}
|
|
35
|
-
function
|
|
36
|
-
|
|
123
|
+
function me() {
|
|
124
|
+
a.doubleClickAction === "reset" ? ie() : a.doubleClickAction === "collapse" && te();
|
|
125
|
+
}
|
|
126
|
+
let p;
|
|
127
|
+
function W() {
|
|
128
|
+
if (!$.value || !P.value) return;
|
|
129
|
+
const e = $.value, l = e.getBoundingClientRect(), i = r.value ? e.clientHeight || l.height : e.clientWidth || l.width, n = r.value ? P.value.offsetHeight : P.value.offsetWidth;
|
|
130
|
+
E.value = Math.max(0, i - (n || F.value)), w.value = getComputedStyle(e).direction === "rtl";
|
|
131
|
+
}
|
|
132
|
+
function q() {
|
|
133
|
+
p || !$.value || !P.value || (W(), typeof ResizeObserver == "function" && (p = new ResizeObserver(W), p.observe($.value), p.observe(P.value)));
|
|
134
|
+
}
|
|
135
|
+
const c = Ae(
|
|
136
|
+
(e) => {
|
|
137
|
+
a.lazy ? L.value = e : U(e), u("resize", e);
|
|
138
|
+
},
|
|
139
|
+
(e, l, i) => {
|
|
140
|
+
N.value = !1, !l && a.lazy && U(e), L.value = void 0, i && Z(() => u("resizeEnd", o.value, { cancelled: l }));
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
function be(e) {
|
|
144
|
+
!S.value || c.active() || e.button !== 0 || (W(), c.start(e, {
|
|
145
|
+
vertical: r.value,
|
|
146
|
+
direction: !r.value && w.value ? -1 : 1,
|
|
147
|
+
available: E.value,
|
|
148
|
+
initial: o.value,
|
|
149
|
+
constrain: (l) => R(Math.round(l))
|
|
150
|
+
}) && (N.value = !0, a.lazy && (L.value = o.value), u("resizeStart")));
|
|
151
|
+
}
|
|
152
|
+
function ye(e) {
|
|
153
|
+
var m, M;
|
|
154
|
+
if (e.key === "Enter" && !a.disabled && !c.active() && ((m = a.firstPanel) != null && m.collapsible || (M = a.secondPanel) != null && M.collapsible)) {
|
|
155
|
+
e.preventDefault(), te();
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
if (!S.value || c.active() || !["ArrowLeft", "ArrowUp", "ArrowRight", "ArrowDown", "Home", "End"].includes(e.key)) return;
|
|
37
159
|
e.preventDefault();
|
|
38
|
-
const
|
|
39
|
-
|
|
160
|
+
const l = (Number.isFinite(a.step) && a.step > 0 ? a.step : 2) * (e.shiftKey ? 5 : 1), i = e.key === "ArrowDown" || e.key === (w.value && !r.value ? "ArrowLeft" : "ArrowRight"), n = e.key === "Home" ? C.value : e.key === "End" ? I.value : R(o.value + (i ? l : -l));
|
|
161
|
+
U(n);
|
|
162
|
+
}
|
|
163
|
+
function G() {
|
|
164
|
+
c.finish(!0, !1), p == null || p.disconnect(), p = void 0;
|
|
40
165
|
}
|
|
41
|
-
return (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
166
|
+
return B(
|
|
167
|
+
[S, r, C, I, E, w, () => a.lazy],
|
|
168
|
+
() => c.finish(!0),
|
|
169
|
+
{ flush: "sync" }
|
|
170
|
+
), B([r, F], W, { flush: "post" }), B(() => a.panels !== void 0, (e) => {
|
|
171
|
+
e ? G() : q();
|
|
172
|
+
}, { flush: "post" }), Pe(q), ke(q), we(G), Se(G), ce({
|
|
173
|
+
togglePanel: V,
|
|
174
|
+
togglePane: (e, l) => {
|
|
175
|
+
var i;
|
|
176
|
+
return ((i = k.value) == null ? void 0 : i.togglePane(e, l)) ?? Promise.resolve(!1);
|
|
177
|
+
},
|
|
178
|
+
getPanelSizes: () => {
|
|
179
|
+
var e;
|
|
180
|
+
return ((e = k.value) == null ? void 0 : e.getPanelSizes()) ?? {};
|
|
181
|
+
},
|
|
182
|
+
getPaneElement: (e) => {
|
|
183
|
+
var l;
|
|
184
|
+
return (l = k.value) == null ? void 0 : l.getPaneElement(e);
|
|
185
|
+
},
|
|
186
|
+
resizePane: (e, l, i) => {
|
|
187
|
+
var n;
|
|
188
|
+
return ((n = k.value) == null ? void 0 : n.resizePane(e, l, i)) ?? Promise.resolve(!1);
|
|
189
|
+
},
|
|
190
|
+
resetSizes: ie
|
|
191
|
+
}), (e, l) => {
|
|
192
|
+
var i, n, m, M, se, ne;
|
|
193
|
+
return t.panels !== void 0 ? (h(), J(Ee, oe({
|
|
194
|
+
key: 0,
|
|
195
|
+
ref_key: "multi",
|
|
196
|
+
ref: k,
|
|
197
|
+
panels: t.panels,
|
|
198
|
+
sizes: t.sizes,
|
|
199
|
+
vertical: r.value,
|
|
200
|
+
disabled: t.disabled,
|
|
201
|
+
lazy: t.lazy,
|
|
202
|
+
step: t.step,
|
|
203
|
+
"storage-key": t.storageKey,
|
|
204
|
+
"divider-size": F.value,
|
|
205
|
+
"double-click-action": t.doubleClickAction
|
|
206
|
+
}, { ariaLabel: t.ariaLabel }, {
|
|
207
|
+
"onUpdate:sizes": l[0] || (l[0] = (s) => u("update:sizes", s)),
|
|
208
|
+
onPanelResizeStart: l[1] || (l[1] = (s) => u("panelResizeStart", s)),
|
|
209
|
+
onPanelResize: l[2] || (l[2] = (s) => u("panelResize", s)),
|
|
210
|
+
onPanelResizeEnd: l[3] || (l[3] = (s) => u("panelResizeEnd", s)),
|
|
211
|
+
onPanelCollapse: l[4] || (l[4] = (s, ge) => u("panelCollapse", s, ge))
|
|
212
|
+
}), Ce({ _: 2 }, [
|
|
213
|
+
e.$slots.panel ? {
|
|
214
|
+
name: "panel",
|
|
215
|
+
fn: Q((s) => [
|
|
216
|
+
y(e.$slots, "panel", g(z(s)))
|
|
217
|
+
]),
|
|
218
|
+
key: "0"
|
|
219
|
+
} : void 0,
|
|
220
|
+
e.$slots["panel-collapse"] ? {
|
|
221
|
+
name: "panel-collapse",
|
|
222
|
+
fn: Q((s) => [
|
|
223
|
+
y(e.$slots, "panel-collapse", g(z(s)))
|
|
224
|
+
]),
|
|
225
|
+
key: "1"
|
|
226
|
+
} : void 0,
|
|
227
|
+
e.$slots.handle ? {
|
|
228
|
+
name: "handle",
|
|
229
|
+
fn: Q((s) => [
|
|
230
|
+
y(e.$slots, "handle", g(z(s)))
|
|
231
|
+
]),
|
|
232
|
+
key: "2"
|
|
233
|
+
} : void 0
|
|
234
|
+
]), 1040, ["panels", "sizes", "vertical", "disabled", "lazy", "step", "storage-key", "divider-size", "double-click-action"])) : (h(), j("div", oe({ key: 1 }, X(fe), {
|
|
235
|
+
ref_key: "host",
|
|
236
|
+
ref: $,
|
|
237
|
+
class: ["hys-ui-ent-split", { "hys-ui-vertical": r.value }],
|
|
238
|
+
style: {
|
|
239
|
+
"--hys-ui-splitter-size": F.value + "px",
|
|
240
|
+
"--hys-ui-split-ratio": o.value / 100,
|
|
241
|
+
"--hys-ui-split-preview": (L.value ?? 0) / 100
|
|
242
|
+
}
|
|
243
|
+
}), [
|
|
244
|
+
A("div", {
|
|
245
|
+
id: O,
|
|
246
|
+
class: "hys-ui-ent-split-first",
|
|
247
|
+
inert: v.value.collapsed
|
|
248
|
+
}, [
|
|
249
|
+
y(e.$slots, "first", g(z(v.value)))
|
|
250
|
+
], 8, Le),
|
|
251
|
+
A("div", {
|
|
252
|
+
ref_key: "bar",
|
|
253
|
+
ref: P,
|
|
254
|
+
class: "hys-ui-splitter-bar"
|
|
255
|
+
}, [
|
|
256
|
+
A("div", {
|
|
257
|
+
class: "hys-ui-ent-split-handle",
|
|
258
|
+
role: "separator",
|
|
259
|
+
tabindex: S.value ? 0 : -1,
|
|
260
|
+
"aria-label": t.ariaLabel,
|
|
261
|
+
"aria-controls": `${O} ${T}`,
|
|
262
|
+
"aria-disabled": !S.value || void 0,
|
|
263
|
+
"aria-orientation": r.value ? "horizontal" : "vertical",
|
|
264
|
+
"aria-valuenow": o.value,
|
|
265
|
+
"aria-valuemin": (i = t.firstPanel) != null && i.collapsible ? 0 : C.value,
|
|
266
|
+
"aria-valuemax": (n = t.secondPanel) != null && n.collapsible ? 100 : I.value,
|
|
267
|
+
"data-resizing": N.value || void 0,
|
|
268
|
+
"aria-keyshortcuts": (m = t.firstPanel) != null && m.collapsible || (M = t.secondPanel) != null && M.collapsible ? "Enter" : void 0,
|
|
269
|
+
onPointerdown: be,
|
|
270
|
+
onLostpointercapture: l[5] || (l[5] = //@ts-ignore
|
|
271
|
+
(...s) => X(c).cancel && X(c).cancel(...s)),
|
|
272
|
+
onKeydown: ye,
|
|
273
|
+
onDblclick: me
|
|
274
|
+
}, [
|
|
275
|
+
A("span", Be, [
|
|
276
|
+
y(e.$slots, "handle", g(z(pe.value)), () => [
|
|
277
|
+
l[8] || (l[8] = A("span", { class: "hys-ui-splitter-dots" }, null, -1))
|
|
278
|
+
])
|
|
279
|
+
])
|
|
280
|
+
], 40, Me),
|
|
281
|
+
(se = t.firstPanel) != null && se.collapsible ? (h(), j("button", {
|
|
282
|
+
key: 0,
|
|
283
|
+
class: "hys-ui-splitter-toggle hys-ui-splitter-toggle-first",
|
|
284
|
+
type: "button",
|
|
285
|
+
"aria-label": (v.value.collapsed ? "展开" : "折叠") + t.firstLabel,
|
|
286
|
+
"aria-controls": O,
|
|
287
|
+
"aria-expanded": !v.value.collapsed,
|
|
288
|
+
"data-collapsed": v.value.collapsed || void 0,
|
|
289
|
+
disabled: t.disabled,
|
|
290
|
+
onClick: l[6] || (l[6] = //@ts-ignore
|
|
291
|
+
(...s) => v.value.toggle && v.value.toggle(...s))
|
|
292
|
+
}, [
|
|
293
|
+
y(e.$slots, "first-collapse", g(z(v.value)), () => [
|
|
294
|
+
(h(), J(re(v.value.collapsed ? ae.value : le.value), { size: 13 }))
|
|
295
|
+
])
|
|
296
|
+
], 8, De)) : Y("", !0),
|
|
297
|
+
(ne = t.secondPanel) != null && ne.collapsible ? (h(), j("button", {
|
|
298
|
+
key: 1,
|
|
299
|
+
class: "hys-ui-splitter-toggle hys-ui-splitter-toggle-second",
|
|
300
|
+
type: "button",
|
|
301
|
+
"aria-label": (f.value.collapsed ? "展开" : "折叠") + t.secondLabel,
|
|
302
|
+
"aria-controls": T,
|
|
303
|
+
"aria-expanded": !f.value.collapsed,
|
|
304
|
+
"data-collapsed": f.value.collapsed || void 0,
|
|
305
|
+
disabled: t.disabled,
|
|
306
|
+
onClick: l[7] || (l[7] = //@ts-ignore
|
|
307
|
+
(...s) => f.value.toggle && f.value.toggle(...s))
|
|
308
|
+
}, [
|
|
309
|
+
y(e.$slots, "second-collapse", g(z(f.value)), () => [
|
|
310
|
+
(h(), J(re(f.value.collapsed ? le.value : ae.value), { size: 13 }))
|
|
311
|
+
])
|
|
312
|
+
], 8, Ne)) : Y("", !0)
|
|
313
|
+
], 512),
|
|
314
|
+
A("div", {
|
|
315
|
+
id: T,
|
|
316
|
+
class: "hys-ui-ent-split-second",
|
|
317
|
+
inert: f.value.collapsed
|
|
318
|
+
}, [
|
|
319
|
+
y(e.$slots, "second", g(z(f.value)))
|
|
320
|
+
], 8, Fe),
|
|
321
|
+
L.value !== void 0 ? (h(), j("div", He)) : Y("", !0)
|
|
322
|
+
], 16));
|
|
323
|
+
};
|
|
67
324
|
}
|
|
68
325
|
});
|
|
69
326
|
export {
|
|
70
|
-
|
|
327
|
+
Te as default
|
|
71
328
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HysTable2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0fbf300e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|